@1agh/maude 0.39.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +1 -1
  2. package/apps/studio/acp/bridge.ts +144 -5
  3. package/apps/studio/acp/index.ts +11 -1
  4. package/apps/studio/annotations-context-toolbar.tsx +44 -1
  5. package/apps/studio/annotations-layer.tsx +253 -3
  6. package/apps/studio/annotations-model.ts +107 -6
  7. package/apps/studio/api.ts +812 -64
  8. package/apps/studio/bin/_html-playwright.mjs +9 -1
  9. package/apps/studio/bin/_pdf-playwright.mjs +8 -1
  10. package/apps/studio/bin/_png-playwright.mjs +8 -1
  11. package/apps/studio/bin/_pw-launch.mjs +54 -0
  12. package/apps/studio/bin/_svg-playwright.mjs +8 -1
  13. package/apps/studio/bin/_video-playwright.mjs +452 -0
  14. package/apps/studio/bin/prep.sh +8 -1
  15. package/apps/studio/canvas-edit.ts +1885 -104
  16. package/apps/studio/canvas-lib.tsx +19 -0
  17. package/apps/studio/canvas-list-watch.ts +6 -2
  18. package/apps/studio/canvas-shell.tsx +27 -0
  19. package/apps/studio/client/app.jsx +1029 -30
  20. package/apps/studio/client/github.js +7 -0
  21. package/apps/studio/client/panels/TimelinePanel.jsx +860 -0
  22. package/apps/studio/client/panels/timeline-parse.js +229 -0
  23. package/apps/studio/client/panels/timeline-snap.js +55 -0
  24. package/apps/studio/client/styles/3-shell-maude.css +107 -0
  25. package/apps/studio/config.schema.json +14 -0
  26. package/apps/studio/context-menu.tsx +1 -1
  27. package/apps/studio/context.ts +113 -1
  28. package/apps/studio/dist/client.bundle.js +88 -16
  29. package/apps/studio/dist/comment-mount.js +1 -1
  30. package/apps/studio/dist/runtime/.min-sizes.json +11 -1
  31. package/apps/studio/dist/runtime/@remotion_media.js +491 -0
  32. package/apps/studio/dist/runtime/@remotion_player.js +56 -0
  33. package/apps/studio/dist/runtime/@remotion_transitions.js +300 -0
  34. package/apps/studio/dist/runtime/@remotion_transitions_clock-wipe.js +1 -0
  35. package/apps/studio/dist/runtime/@remotion_transitions_fade.js +1 -0
  36. package/apps/studio/dist/runtime/@remotion_transitions_flip.js +1 -0
  37. package/apps/studio/dist/runtime/@remotion_transitions_none.js +1 -0
  38. package/apps/studio/dist/runtime/@remotion_transitions_slide.js +1 -0
  39. package/apps/studio/dist/runtime/@remotion_transitions_wipe.js +1 -0
  40. package/apps/studio/dist/runtime/REMOTION-LICENSE.md +28 -0
  41. package/apps/studio/dist/runtime/remotion.js +42 -0
  42. package/apps/studio/dist/styles.css +1 -1
  43. package/apps/studio/exporters/_browser-bundles.ts +117 -0
  44. package/apps/studio/exporters/_runtime.ts +69 -0
  45. package/apps/studio/exporters/html.ts +4 -3
  46. package/apps/studio/exporters/index.ts +28 -2
  47. package/apps/studio/exporters/pdf.ts +4 -3
  48. package/apps/studio/exporters/png.ts +5 -3
  49. package/apps/studio/exporters/pptx.ts +6 -4
  50. package/apps/studio/exporters/svg.ts +9 -5
  51. package/apps/studio/exporters/video-encode-lib.ts +200 -0
  52. package/apps/studio/exporters/video-render-lib.ts +108 -0
  53. package/apps/studio/exporters/video.ts +184 -0
  54. package/apps/studio/http.ts +535 -27
  55. package/apps/studio/input-router.tsx +7 -1
  56. package/apps/studio/runtime-bundle.ts +30 -0
  57. package/apps/studio/server.ts +34 -9
  58. package/apps/studio/test/acp-bridge.test.ts +132 -0
  59. package/apps/studio/test/acp-commands.test.ts +8 -3
  60. package/apps/studio/test/annotations-roundtrip.test.ts +47 -0
  61. package/apps/studio/test/canvas-create-api.test.ts +76 -0
  62. package/apps/studio/test/canvas-edit.test.ts +90 -0
  63. package/apps/studio/test/canvas-list-watch.test.ts +49 -0
  64. package/apps/studio/test/canvas-media-drop.test.ts +30 -1
  65. package/apps/studio/test/canvas-origin-gate.test.ts +36 -0
  66. package/apps/studio/test/clip-addressing.test.ts +732 -0
  67. package/apps/studio/test/config-reload.test.ts +230 -0
  68. package/apps/studio/test/dns-rebinding-guard.test.ts +74 -0
  69. package/apps/studio/test/edit-persistence.test.ts +91 -0
  70. package/apps/studio/test/exporters/runtime.test.ts +59 -0
  71. package/apps/studio/test/file-lock.test.ts +84 -0
  72. package/apps/studio/test/fixtures/mock-acp-agent.mjs +24 -1
  73. package/apps/studio/test/fixtures/video-comp-fixture.tsx +82 -0
  74. package/apps/studio/test/timeline-parse.test.ts +127 -0
  75. package/apps/studio/test/timeline-snap.test.ts +85 -0
  76. package/apps/studio/test/video-asset.test.ts +163 -0
  77. package/apps/studio/test/video-comp-fixture.test.ts +50 -0
  78. package/apps/studio/test/video-comp.test.ts +168 -0
  79. package/apps/studio/test/video-render-bridge.test.ts +149 -0
  80. package/apps/studio/use-annotation-resize.tsx +6 -3
  81. package/apps/studio/use-canvas-media-drop.tsx +66 -4
  82. package/apps/studio/video-comp.tsx +444 -0
  83. package/apps/studio/whats-new.json +36 -0
  84. package/apps/studio/ws.ts +5 -0
  85. package/package.json +8 -8
  86. package/plugins/design/templates/_shell.html +25 -2
  87. package/plugins/design/templates/design-system-inspiration/_MAPPING.md +1 -1
@@ -0,0 +1,300 @@
1
+ var LJ=Object.defineProperty;var OJ=(J,j)=>{for(var Q in j)LJ(J,Q,{get:j[Q],enumerable:!0,configurable:!0,set:($)=>j[Q]=()=>$})};var Uj={};OJ(Uj,{useTransitionProgress:()=>U0,springTiming:()=>H0,makeHtmlInCanvasPresentation:()=>Jj,linearTiming:()=>Q0,linearBlur:()=>j0,filmBurn:()=>nQ,dreamyZoom:()=>iQ,crossZoom:()=>fQ,TransitionSeries:()=>Qj});import{useMemo as nj}from"react";import{AbsoluteFill as zQ}from"remotion";import{jsx as MQ}from"react/jsx-runtime";import{useCallback as bQ,useLayoutEffect as e,useMemo as CQ,useRef as Mj,useState as rj}from"react";import{AbsoluteFill as EQ,HTML_IN_CANVAS_UNSUPPORTED_MESSAGE as kQ,HtmlInCanvas as SQ,Internals as Lj,useDelayRender as wQ}from"remotion";import{jsx as bj}from"react/jsx-runtime";import{interpolate as J0}from"remotion";import{measureSpring as $0,spring as Z0}from"remotion";import{Children as K0,useCallback as Oj,useMemo as HJ,useRef as KJ}from"react";import{Internals as d,Interactive as W0,Sequence as Y0,useCurrentFrame as X0,useVideoConfig as G0}from"remotion";var Yj=(J)=>{return Math.round(J*1e6)/1e6},bJ=new Set(["deg","rad","grad","turn"]),hj=new Set(["%","cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvh","dvw","em","ex","ic","in","lh","lvh","lvw","mm","pc","pt","px","q","rem","rlh","svh","svw","vb","vh","vi","vmax","vmin","vw"]),dj=/^([+-]?(?:\d+\.?\d*|\.\d+))([a-zA-Z%]+)?$/,cj=new Set(["left","center","right","top","bottom"]),p=(J)=>{if(J==="left")return[{axis:"x",value:{value:0,unit:"%"}}];if(J==="right")return[{axis:"x",value:{value:100,unit:"%"}}];if(J==="top")return[{axis:"y",value:{value:0,unit:"%"}}];if(J==="bottom")return[{axis:"y",value:{value:100,unit:"%"}}];return[{axis:"x",value:{value:50,unit:"%"}},{axis:"y",value:{value:50,unit:"%"}}]},n={value:50,unit:"%"},Sj=(J)=>{return String(Yj(J))},CJ=(J,j)=>{let Q=dj.exec(J);if(Q===null)throw TypeError(`Cannot interpolate "${j}" because "${J}" is not a supported scale, translate, or rotate value`);let $=Q[2]??null,Z=Number(Q[1]);if(!Number.isFinite(Z))throw TypeError(`Cannot interpolate "${j}" because "${J}" is not finite`);if($===null)return{kind:"scale",value:Z,unit:null};if(bJ.has($))return{kind:"rotate",value:Z,unit:$};if(hj.has($))return{kind:"translate",value:Z,unit:$};throw TypeError(`Cannot interpolate "${j}" because "${$}" is not a supported translate or rotate unit`)},uj=({component:J,value:j,allowPercentage:Q})=>{let $=dj.exec(J);if($===null)throw TypeError(`Cannot interpolate "${j}" because "${J}" is not a supported transform-origin ${Q?"length-percentage":"z length"}`);let Z=$[2]??null,H=Number($[1]);if(!Number.isFinite(H))throw TypeError(`Cannot interpolate "${j}" because "${J}" is not finite`);if(Z===null||!hj.has(Z)||!Q&&Z==="%")throw TypeError(`Cannot interpolate "${j}" because "${J}" is not a supported transform-origin ${Q?"length-percentage":"z length"}`);return{value:H,unit:Z}},qj=(J,j)=>{let Q=J.toLowerCase();if(cj.has(Q))return{type:"keyword",keyword:Q};return{type:"length-percentage",parsed:uj({component:J,value:j,allowPercentage:!0})}},EJ=(J,j,Q)=>{let $=[];for(let Z of p(J))for(let H of p(j)){if(Z.axis===H.axis)continue;$.push(Z.axis==="x"?[Z.value,H.value]:[H.value,Z.value])}if($.length===0)throw TypeError(`Cannot interpolate "${Q}" because "${J} ${j}" is not a valid transform-origin keyword pair`);return $[0]},kJ=(J,j)=>{if(J.length===1){let K=qj(J[0],j);if(K.type==="length-percentage")return[K.parsed,n];if(K.keyword==="top"||K.keyword==="bottom")return[n,p(K.keyword)[0].value];return[p(K.keyword)[0].value,n]}let Q=qj(J[0],j),$=qj(J[1],j);if(Q.type==="length-percentage"&&$.type==="length-percentage")return[Q.parsed,$.parsed];if(Q.type==="keyword"&&$.type==="keyword")return EJ(Q.keyword,$.keyword,j);let Z=Q.type==="keyword"?Q:$.type==="keyword"?$:null,H=Q.type==="length-percentage"?Q.parsed:$.type==="length-percentage"?$.parsed:null;if(Z===null||H===null)throw Error("Expected a keyword and a length-percentage value");let Y=Q.type==="keyword";if(Z.keyword==="left"||Z.keyword==="right"){if(!Y)throw TypeError(`Cannot interpolate "${j}" because horizontal transform-origin keywords must come before a length-percentage value`);return[p(Z.keyword)[0].value,H]}if(Z.keyword==="top"||Z.keyword==="bottom")return[H,p(Z.keyword)[0].value];return Y?[n,H]:[H,n]},SJ=(J,j)=>{let[Q,$]=kJ(j.slice(0,2),J),Z=j[2]===void 0?{value:0,unit:null}:uj({component:j[2],value:J,allowPercentage:!1});return{kind:"translate",values:[Q.value,$.value,Z.value],units:[Q.unit,$.unit,Z.unit],dimensions:j[2]===void 0?2:3}},wJ=(J)=>{if(typeof J==="number"){if(!Number.isFinite(J))throw Error(`outputRange must contain only finite numbers, but got [${J}]`);return{kind:"scale",values:[J,J,1],units:[null,null,null],dimensions:1}}let j=J.trim().split(/\s+/);if(j.length<1||j.length>3||j[0]==="")throw TypeError(`String outputRange values must contain 1 to 3 components, but got "${J}"`);if(j.some((Z)=>cj.has(Z.toLowerCase())))return SJ(J,j);let Q=j.map((Z)=>CJ(Z,J)),[{kind:$}]=Q;for(let Z of Q)if(Z.kind!==$)throw TypeError(`Cannot interpolate "${J}" because it mixes ${$} and ${Z.kind} values`);if($==="scale"){let Z=Q[0].value,H=Q[1]?.value??Z,Y=Q[2]?.value??1;return{kind:$,values:[Z,H,Y],units:[null,null,null],dimensions:Q.length}}return{kind:$,values:[Q[0].value,Q[1]?.value??0,Q[2]?.value??0],units:[Q[0].unit,Q[1]?.unit??null,Q[2]?.unit??null],dimensions:Q.length}},FJ=({kind:J,values:j,units:Q,dimensions:$})=>{if(J==="scale")return j.slice(0,$).map((Z)=>Sj(Z)).join(" ");return j.slice(0,$).map((Z,H)=>`${Sj(Z)}${Q[H]}`).join(" ")};function yJ(J,j,Q,$){let{extrapolateLeft:Z,extrapolateRight:H,easing:Y}=$,K=J,[W,X]=j,[G,D]=Q;if(K<W){if(Z==="identity")return K;if(Z==="clamp")K=W;else if(Z==="wrap"){let _=X-W;K=((K-W)%_+_)%_+W}}if(K>X){if(H==="identity")return K;if(H==="clamp")K=X;else if(H==="wrap"){let _=X-W;K=((K-W)%_+_)%_+W}}if(G===D)return G;return K=(K-W)/(X-W),K=Y(K),K=K*(D-G)+G,K}function RJ(J,j){let Q;for(Q=1;Q<j.length-1;++Q)if(j[Q]>=J)break;return Q-1}var PJ=(J)=>J,mj=(J)=>{return J.remotionShouldExtendRight===!0},wj=({easing:J,segmentIndex:j})=>{if(J===void 0)return PJ;if(typeof J==="function")return J;return J[j]},Fj=({input:J,inputRange:j,outputRange:Q,easing:$,extrapolateLeft:Z,extrapolateRight:H})=>{return yJ(J,j,Q,{easing:$,extrapolateLeft:Z,extrapolateRight:J>j[1]&&H==="clamp"&&mj($)?"extend":H})},zj=({input:J,inputRange:j,outputRange:Q,options:$})=>{if(j.length===1)return Q[0];let Z=$?.easing,H="extend";if($?.extrapolateLeft!==void 0)H=$.extrapolateLeft;let Y="extend";if($?.extrapolateRight!==void 0)Y=$.extrapolateRight;let K=$?.posterize===void 0?J:Math.floor(J/$.posterize)*$.posterize,W=RJ(K,j),X=wj({easing:Z,segmentIndex:W}),G=Fj({input:K,inputRange:[j[W],j[W+1]],outputRange:[Q[W],Q[W+1]],easing:X,extrapolateLeft:H,extrapolateRight:Y});for(let D=0;D<W;D++){let _=wj({easing:Z,segmentIndex:D});if(!mj(_))continue;let T=j[D+1];if(K<=T)continue;let E=Fj({input:K,inputRange:[j[D],T],outputRange:[Q[D],Q[D+1]],easing:_,extrapolateLeft:H,extrapolateRight:"extend"});G+=E-Q[D+1]}return G},xJ=({input:J,inputRange:j,outputRange:Q,options:$})=>{let Z=Q.map(wJ),H=Z[0]?.kind;if(H===void 0)throw Error("outputRange must have at least 1 element");for(let W of Z)if(W.kind!==H)throw TypeError(`Cannot interpolate ${H} values with ${W.kind} values`);let Y=Math.max(...Z.map((W)=>W.dimensions)),K=[null,null,null];if(H!=="scale")for(let W=0;W<Y;W++){for(let X of Z){let G=X.units[W];if(G===null)continue;if(K[W]===null){K[W]=G;continue}if(K[W]!==G)throw TypeError(`Cannot interpolate ${H} values with different units on axis ${W+1}: ${K[W]} and ${G}`)}if(K[W]===null)throw TypeError(`Cannot interpolate ${H} values because axis ${W+1} has no unit`)}return FJ({kind:H,values:[0,0,0].map((W,X)=>zj({input:J,inputRange:j,outputRange:Z.map((G)=>G.values[X]),options:$})),units:K,dimensions:Y})},IJ=(J)=>{let j=J[0]?.length;if(j===void 0)throw Error("outputRange must have at least 1 element");if(j===0)throw TypeError("outputRange tuples must contain at least 1 number");for(let Q of J){if(Q.length!==j)throw TypeError(`outputRange tuples must all have the same length, but got ${j} and ${Q.length}`);for(let $ of Q)if(typeof $!=="number"||!Number.isFinite($))throw TypeError(`outputRange tuples must contain only finite numbers, but got [${Q.join(",")}]`)}return j},fJ=({input:J,inputRange:j,outputRange:Q,options:$})=>{let Z=IJ(Q);return Array(Z).fill(!0).map((H,Y)=>zj({input:J,inputRange:j,outputRange:Q.map((K)=>K[Y]),options:$}))};function vJ(J){for(let j=1;j<J.length;++j)if(!(J[j]>J[j-1]))throw Error(`inputRange must be strictly monotonically increasing but got [${J.join(",")}]`)}function yj(J,j){if(j.length<1)throw Error(J+" must have at least 1 element");for(let Q of j){if(typeof Q!=="number")throw Error(`${J} must contain only numbers`);if(!Number.isFinite(Q))throw Error(`${J} must contain only finite numbers, but got [${j.join(",")}]`)}}function hJ(J,j){if(J===void 0)return;if(typeof J==="function")return;let Q=j-1;if(J.length!==Q)throw Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${Q}), but got length ${J.length}`);for(let $=0;$<J.length;$++)if(typeof J[$]!=="function")throw Error(`easing[${$}] must be a function`)}function dJ(J){if(J===void 0)return;if(typeof J!=="number"||!Number.isFinite(J)||J<=0)throw Error(`posterize must be a positive finite number, but got ${J}`)}function cJ(J,j,Q,$){if(typeof J>"u")throw Error("input can not be undefined");if(typeof j>"u")throw Error("inputRange can not be undefined");if(typeof Q>"u")throw Error("outputRange can not be undefined");if(j.length!==Q.length)throw Error("inputRange ("+j.length+") and outputRange ("+Q.length+") must have the same length");if(yj("inputRange",j),vJ(j),hJ($?.easing,j.length),dJ($?.posterize),typeof J!=="number")throw TypeError("Cannot interpolate an input which is not a number");if(!Array.isArray(Q))throw Error("outputRange must contain only numbers");if(Q.some((H)=>typeof H==="string")){if(!Q.every((H)=>typeof H==="string"||typeof H==="number"))throw TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");return xJ({input:J,inputRange:j,outputRange:Q,options:$})}if(Q.every((H)=>Array.isArray(H)))return fJ({input:J,inputRange:j,outputRange:Q,options:$});if(!Q.every((H)=>typeof H==="number"))throw TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");return yj("outputRange",Q),zj({input:J,inputRange:j,outputRange:Q,options:$})}function uJ(J){return Boolean(J)}if(typeof window<"u"){if(window.remotion_renderReady=!1,!window.remotion_delayRenderTimeouts)window.remotion_delayRenderTimeouts={};window.remotion_delayRenderHandles=[]}var mJ="The delayRender was called:",iJ="Retries left: ",pJ="- Rendering the frame will be retried.",sJ="handle was cleared after",oJ=({schema:J,key:j,value:Q})=>{let $=J[j];if(!$)throw Error("Key "+JSON.stringify(j)+" not found in schema");if(typeof Q!=="string")throw Error("Value must be a string, but is "+JSON.stringify(Q));if($.type!=="enum")throw Error("Key "+JSON.stringify(j)+" is not an enum");if(!$.variants[Q])throw Error("Value for "+JSON.stringify(j)+" must be one of "+Object.keys($.variants).map((K)=>JSON.stringify(K)).join(", ")+", got "+JSON.stringify(Q));let H=Object.keys($.variants).filter((K)=>K!==Q),Y=new Set;for(let K of H){let W=$.variants[K],X=Object.keys(W);for(let G of X)Y.add(G)}return[...Y]},Xj="remotion-date:",Gj="remotion-file:",lJ=({data:J,indent:j,staticBase:Q})=>{let $=!1,Z=!1,H=!1,Y=!1;try{return{serializedString:JSON.stringify(J,function(W,X){let G=this[W];if(G instanceof Date)return $=!0,`${Xj}${G.toISOString()}`;if(G instanceof Map)return H=!0,X;if(G instanceof Set)return Y=!0,X;if(typeof G==="string"&&Q!==null&&G.startsWith(Q))return Z=!0,`${Gj}${G.replace(Q+"/","")}`;return X},j),customDateUsed:$,customFileUsed:Z,mapUsed:H,setUsed:Y}}catch(K){throw Error("Could not serialize the passed input props to JSON: "+K.message)}},gJ=(J)=>{return JSON.parse(J,(j,Q)=>{if(typeof Q==="string"&&Q.startsWith(Xj))return new Date(Q.replace(Xj,""));if(typeof Q==="string"&&Q.startsWith(Gj))return`${window.remotion_staticBase}/${Q.replace(Gj,"")}`;return Q})},nJ={"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:0.01,default:1,description:"Scale"},"style.rotate":{type:"rotation-css",step:1,default:"0deg",description:"Rotation"},"style.opacity":{type:"number",min:0,max:1,step:0.01,default:1,description:"Opacity",hiddenFromList:!1}},rJ={premountFor:{type:"number",default:0,description:"Premount For",min:0,step:1,hiddenFromList:!1},postmountFor:{type:"number",default:0,min:0,step:1,hiddenFromList:!0},styleWhilePremounted:{type:"hidden"},styleWhilePostmounted:{type:"hidden"}},tJ={...nJ,...rJ},ij={type:"boolean",default:!1,description:"Hidden"},pj={type:"hidden"},sj={type:"hidden"},oj={type:"number",default:void 0,min:1,step:1,hiddenFromList:!0},aJ={type:"number",default:0,step:1,hiddenFromList:!0},lj={type:"number",default:0,min:0,step:1,hiddenFromList:!0},gj={type:"number",default:null,step:1,hiddenFromList:!0},eJ={durationInFrames:oj,from:aJ,trimBefore:lj,freeze:gj,hidden:ij,name:sj,showInTimeline:pj},Bj={...eJ,layout:{type:"enum",default:"absolute-fill",description:"Layout",variants:{"absolute-fill":tJ,none:{}}}},jQ={durationInFrames:oj,trimBefore:lj,freeze:gj,hidden:ij,name:sj,showInTimeline:pj},N0={...jQ,layout:Bj.layout},T0={...Bj,layout:{...Bj.layout,default:"none"}},P="[-+]?\\d*\\.?\\d+",$j=P+"%";function Zj(...J){return"\\(\\s*("+J.join(")\\s*,\\s*(")+")\\s*\\)"}var Hj="(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";function r(J){return new RegExp(J+"\\(\\s*("+Hj+")\\s+("+Hj+")\\s+("+Hj+")(?:\\s*\\/\\s*("+Hj+"))?\\s*\\)")}function JQ(){let J={rgb:void 0,rgba:void 0,hsl:void 0,hsla:void 0,hex3:void 0,hex4:void 0,hex5:void 0,hex6:void 0,hex8:void 0,oklch:void 0,oklab:void 0,lab:void 0,lch:void 0,hwb:void 0};if(J.rgb===void 0)J.rgb=new RegExp("rgb"+Zj(P,P,P)),J.rgba=new RegExp("rgba"+Zj(P,P,P,P)),J.hsl=new RegExp("hsl"+Zj(P,$j,$j)),J.hsla=new RegExp("hsla"+Zj(P,$j,$j,P)),J.hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,J.hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,J.hex6=/^#([0-9a-fA-F]{6})$/,J.hex8=/^#([0-9a-fA-F]{8})$/,J.oklch=r("oklch"),J.oklab=r("oklab"),J.lab=r("lab"),J.lch=r("lch"),J.hwb=r("hwb");return J}function s(J,j,Q){if(Q<0)Q+=1;if(Q>1)Q-=1;if(Q<0.16666666666666666)return J+(j-J)*6*Q;if(Q<0.5)return j;if(Q<0.6666666666666666)return J+(j-J)*(0.6666666666666666-Q)*6;return J}function Rj(J,j,Q){let $=Q<0.5?Q*(1+j):Q+j-Q*j,Z=2*Q-$,H=s(Z,$,J+0.3333333333333333),Y=s(Z,$,J),K=s(Z,$,J-0.3333333333333333);return Math.round(H*255)<<24|Math.round(Y*255)<<16|Math.round(K*255)<<8}function i(J){let j=Number.parseInt(J,10);if(j<0)return 0;if(j>255)return 255;return j}function Pj(J){return(Number.parseFloat(J)%360+360)%360/360}function xj(J){let j=Number.parseFloat(J);if(j<0)return 0;if(j>1)return 255;return Math.round(j*255)}function Kj(J){let j=Number.parseFloat(J);if(j<0)return 0;if(j>100)return 1;return j/100}function R(J,j){if(J==="none")return 0;if(J.endsWith("%"))return Number.parseFloat(J)/100*j;return Number.parseFloat(J)}function Aj(J){if(J==="none")return 0;if(J.endsWith("rad"))return Number.parseFloat(J)*180/Math.PI;if(J.endsWith("grad"))return Number.parseFloat(J)*0.9;if(J.endsWith("turn"))return Number.parseFloat(J)*360;return Number.parseFloat(J)}function t(J){if(J===void 0||J==="none")return 1;if(J.endsWith("%"))return Math.max(0,Math.min(1,Number.parseFloat(J)/100));return Math.max(0,Math.min(1,Number.parseFloat(J)))}function o(J){if(J<=0.0031308)return 12.92*J;return 1.055*J**0.4166666666666667-0.055}function Wj(J){return Math.max(0,Math.min(1,J))}function a(J,j,Q,$){let Z=Math.round(Wj(J)*255),H=Math.round(Wj(j)*255),Y=Math.round(Wj(Q)*255),K=Math.round(Wj($)*255);return(Z<<24|H<<16|Y<<8|K)>>>0}function Ij(J,j,Q){let $=J+0.3963377774*j+0.2158037573*Q,Z=J-0.1055613458*j-0.0638541728*Q,H=J-0.0894841775*j-1.291485548*Q,Y=$*$*$,K=Z*Z*Z,W=H*H*H,X=4.0767416621*Y-3.3077115913*K+0.2309699292*W,G=-1.2684380046*Y+2.6097574011*K-0.3413193965*W,D=-0.0041960863*Y-0.7034186147*K+1.707614701*W;return[o(X),o(G),o(D)]}function fj(J,j,Q){let W=(J+16)/116,X=j/500+W,G=W-Q/200,D=X*X*X,_=G*G*G,T=D>0.008856451679035631?D:(116*X-16)/903.2962962962963,E=J>8?((J+16)/116)**3:J/903.2962962962963,V=_>0.008856451679035631?_:(116*G-16)/903.2962962962963,q=T*0.95047,N=E*1,B=V*1.08883,z=3.2404542*q-1.5371385*N-0.4985314*B,A=-0.969266*q+1.8760108*N+0.041556*B,U=0.0556434*q-0.2040259*N+1.0572252*B;return[o(z),o(A),o(U)]}function QQ(J,j,Q){if(j+Q>=1){let X=j/(j+Q);return[X,X,X]}let $=1,Z=0,H=s(Z,$,J+0.3333333333333333),Y=s(Z,$,J),K=s(Z,$,J-0.3333333333333333),W=1-j-Q;return[H*W+j,Y*W+j,K*W+j]}var Tj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function $Q(J){let j=JQ(),Q;if(j.hex6){if(Q=j.hex6.exec(J))return Number.parseInt(Q[1]+"ff",16)>>>0}if(Tj[J]!==void 0)return Tj[J];if(j.rgb){if(Q=j.rgb.exec(J))return(i(Q[1])<<24|i(Q[2])<<16|i(Q[3])<<8|255)>>>0}if(j.rgba){if(Q=j.rgba.exec(J))return(i(Q[1])<<24|i(Q[2])<<16|i(Q[3])<<8|xj(Q[4]))>>>0}if(j.hex3){if(Q=j.hex3.exec(J))return Number.parseInt(Q[1]+Q[1]+Q[2]+Q[2]+Q[3]+Q[3]+"ff",16)>>>0}if(j.hex8){if(Q=j.hex8.exec(J))return Number.parseInt(Q[1],16)>>>0}if(j.hex4){if(Q=j.hex4.exec(J))return Number.parseInt(Q[1]+Q[1]+Q[2]+Q[2]+Q[3]+Q[3]+Q[4]+Q[4],16)>>>0}if(j.hsl){if(Q=j.hsl.exec(J))return(Rj(Pj(Q[1]),Kj(Q[2]),Kj(Q[3]))|255)>>>0}if(j.hsla){if(Q=j.hsla.exec(J))return(Rj(Pj(Q[1]),Kj(Q[2]),Kj(Q[3]))|xj(Q[4]))>>>0}if(j.oklch){if(Q=j.oklch.exec(J)){let $=R(Q[1],1),Z=R(Q[2],0.4),H=Aj(Q[3]),Y=t(Q[4]),K=H*Math.PI/180,[W,X,G]=Ij($,Z*Math.cos(K),Z*Math.sin(K));return a(W,X,G,Y)}}if(j.oklab){if(Q=j.oklab.exec(J)){let $=R(Q[1],1),Z=R(Q[2],0.4),H=R(Q[3],0.4),Y=t(Q[4]),[K,W,X]=Ij($,Z,H);return a(K,W,X,Y)}}if(j.lab){if(Q=j.lab.exec(J)){let $=R(Q[1],100),Z=R(Q[2],125),H=R(Q[3],125),Y=t(Q[4]),[K,W,X]=fj($,Z,H);return a(K,W,X,Y)}}if(j.lch){if(Q=j.lch.exec(J)){let $=R(Q[1],100),Z=R(Q[2],150),H=Aj(Q[3]),Y=t(Q[4]),K=H*Math.PI/180,[W,X,G]=fj($,Z*Math.cos(K),Z*Math.sin(K));return a(W,X,G,Y)}}if(j.hwb){if(Q=j.hwb.exec(J)){let $=Aj(Q[1]),Z=R(Q[2],1),H=R(Q[3],1),Y=t(Q[4]),[K,W,X]=QQ($/360,Z,H);return a(K,W,X,Y)}}throw Error(`invalid color string ${J} provided`)}function ZQ(J){let j=$Q(J);return(j<<24|j>>>8)>>>0}var HQ=["4444-xq","4444","hq","standard","light","proxy"],KQ=[1,1,1],WQ=(J)=>{let j=J.trim().split(/\s+/);if(j.length<1||j.length>3||j[0]==="")return null;let Q=j.map((Y)=>Number(Y));if(!Q.every((Y)=>Number.isFinite(Y)))return null;let $=Q[0],Z=Q[1]??$,H=Q[2]??1;return[$,Z,H]},YQ=(J)=>{if(typeof J==="number")return Number.isFinite(J)?[J,J,1]:null;if(typeof J==="string")return WQ(J);return null},XQ=(J)=>{return YQ(J)??KQ},GQ=([J,j,Q])=>{let $=Yj(J),Z=Yj(j),H=Yj(Q);if($===Z&&H===1)return $;if(H===1)return`${$} ${Z}`;return`${$} ${Z} ${H}`},Nj=!1,BQ=({allowFloats:J,durationInFrames:j,frame:Q})=>{if(typeof Q>"u")throw TypeError('Argument missing for parameter "frame"');if(typeof Q!=="number")throw TypeError(`Argument passed for "frame" is not a number: ${Q}`);if(!Number.isFinite(Q))throw RangeError(`Frame ${Q} is not finite`);if(Q%1!==0&&!J)throw RangeError(`Argument for frame must be an integer, but got ${Q}`);if(Q<0&&Q<-j)throw RangeError(`Cannot use frame ${Q}: Duration of composition is ${j}, therefore the lowest frame that can be rendered is ${-j}`);if(Q>j-1)throw RangeError(`Cannot use frame ${Q}: Duration of composition is ${j}, therefore the highest frame that can be rendered is ${j-1}`)},vj=["h264","h265","vp8","vp9","av1","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function DQ(J,j,Q){if(typeof J>"u")return;if(typeof J!=="string")throw TypeError(`The "${Q}" prop ${j} must be a string, but you passed a value of type ${typeof J}.`);if(!vj.includes(J))throw Error(`The "${Q}" prop ${j} must be one of ${vj.join(", ")}, but you passed ${J}.`)}var _Q=(J,j,Q)=>{if(!J)return;if(typeof J!=="object")throw Error(`"${j}" must be an object, but you passed a value of type ${typeof J}`);if(Array.isArray(J))throw Error(`"${j}" must be an object, an array was passed ${Q?`for composition "${Q}"`:""}`)};function UQ(J,j,Q){if(typeof J!=="number")throw Error(`The "${j}" prop ${Q} must be a number, but you passed a value of type ${typeof J}`);if(isNaN(J))throw TypeError(`The "${j}" prop ${Q} must not be NaN, but is NaN.`);if(!Number.isFinite(J))throw TypeError(`The "${j}" prop ${Q} must be finite, but is ${J}.`);if(J%1!==0)throw TypeError(`The "${j}" prop ${Q} must be an integer, but is ${J}.`);if(J<=0)throw TypeError(`The "${j}" prop ${Q} must be positive, but got ${J}.`)}function VQ(J,j){let{allowFloats:Q,component:$}=j;if(typeof J>"u")throw Error(`The "durationInFrames" prop ${$} is missing.`);if(typeof J!=="number")throw Error(`The "durationInFrames" prop ${$} must be a number, but you passed a value of type ${typeof J}`);if(J<=0)throw TypeError(`The "durationInFrames" prop ${$} must be positive, but got ${J}.`);if(!Q&&J%1!==0)throw TypeError(`The "durationInFrames" prop ${$} must be an integer, but got ${J}.`);if(!Number.isFinite(J))throw TypeError(`The "durationInFrames" prop ${$} must be finite, but got ${J}.`)}function qQ(J,j,Q){if(typeof J!=="number")throw Error(`"fps" must be a number, but you passed a value of type ${typeof J} ${j}`);if(!Number.isFinite(J))throw Error(`"fps" must be a finite, but you passed ${J} ${j}`);if(isNaN(J))throw Error(`"fps" must not be NaN, but got ${J} ${j}`);if(J<=0)throw TypeError(`"fps" must be positive, but got ${J} ${j}`);if(Q&&J>50)throw TypeError("The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif")}var AQ=({frame:J,playbackRate:j,startFrom:Q})=>{return cJ(J,[-1,Q,Q+1],[-1,Q,Q+j])},NQ=(J)=>{if(typeof window>"u")return J;if(J.startsWith("http://")||J.startsWith("https://")||J.startsWith("file://")||J.startsWith("blob:")||J.startsWith("data:"))return J;return new URL(J,window.origin).href},TQ=({src:J,transparent:j,currentTime:Q,toneMapped:$})=>{return`http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(NQ(J))}&time=${encodeURIComponent(Math.max(0,Q))}&transparent=${String(j)}&toneMapped=${String($)}`},Dj={processColor:ZQ,truthy:uJ,validateFps:qQ,validateDimension:UQ,validateDurationInFrames:VQ,validateDefaultAndInputProps:_Q,validateFrame:BQ,serializeJSONWithSpecialTypes:lJ,bundleName:"bundle.js",bundleMapName:"bundle.js.map",deserializeJSONWithSpecialTypes:gJ,DELAY_RENDER_CALLSTACK_TOKEN:mJ,DELAY_RENDER_RETRY_TOKEN:pJ,DELAY_RENDER_CLEAR_TOKEN:sJ,DELAY_RENDER_ATTEMPT_TOKEN:iJ,getOffthreadVideoSource:TQ,getExpectedMediaFrameUncorrected:AQ,ENABLE_V5_BREAKING_CHANGES:Nj,MIN_NODE_VERSION:Nj?18:16,MIN_BUN_VERSION:Nj?"1.1.3":"1.0.3",colorNames:Tj,DATE_TOKEN:Xj,FILE_TOKEN:Gj,validateCodec:DQ,proResProfileOptions:HQ,findPropsToDelete:oJ,sequenceSchema:Bj,parseScaleValue:XQ,serializeScaleValue:GQ};import DJ,{useMemo as _J}from"react";import{jsx as UJ}from"react/jsx-runtime";import XJ from"react";import{jsx as b,Fragment as NJ}from"react/jsx-runtime";import BJ from"react";var LQ=0.01,OQ=({children:J,presentationProgress:j,presentationDirection:Q,passedProps:{direction:$="from-left",enterStyle:Z,exitStyle:H}})=>{let Y=nj(()=>{let W=j===1?j*100:j*100-LQ;if(Q==="exiting")switch($){case"from-left":return{transform:`translateX(${W}%)`};case"from-right":return{transform:`translateX(${-j*100}%)`};case"from-top":return{transform:`translateY(${W}%)`};case"from-bottom":return{transform:`translateY(${-j*100}%)`};default:throw Error(`Invalid direction: ${$}`)}switch($){case"from-left":return{transform:`translateX(${-100+j*100}%)`};case"from-right":return{transform:`translateX(${100-W}%)`};case"from-top":return{transform:`translateY(${-100+j*100}%)`};case"from-bottom":return{transform:`translateY(${100-W}%)`};default:throw Error(`Invalid direction: ${$}`)}},[Q,j,$]),K=nj(()=>{return{width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...Y,...Q==="entering"?Z:H}},[Y,Z,H,Q]);return MQ(zQ,{style:K,children:J})},_j=(J)=>{return{component:OQ,props:J??{}}},FQ=({children:J,onElementImage:j,onUnmount:Q,presentationProgress:$,presentationDirection:Z,shader:H,effects:Y,passedProps:K,bothEnteringAndExiting:W})=>{if(!SQ.isSupported())throw Error(kQ);let X=Mj(null),G=CQ(()=>{return{width:"100%",height:"100%",position:"absolute",top:0,left:0,right:0,bottom:0}},[]),[D]=rj(()=>new OffscreenCanvas(1,1)),_=Mj(K);_.current=K;let T=Lj.useMemoizedEffects({effects:Y??[],overrideId:null}),E=Mj(T);E.current=T;let[V]=rj(()=>H(D));e(()=>{return()=>{V.cleanup()}},[D,V]);let q=Lj.useEffectChainState(),{delayRender:N,continueRender:B}=wQ(),z=bQ(async(U,O,w)=>{if(!X.current)throw Error("Canvas not found");let M=N("onPaint");if(!U&&!O){B(M),V.clear();return}let L=U?.width??O?.width??0,x=U?.height??O?.height??0;if(L===0||x===0){B(M),V.clear();return}D.width=L,D.height=x,V.draw({prevImage:U,nextImage:O,width:L,height:x,time:w,passedProps:_.current}),await Lj.runEffectChain({state:q.get(L,x),source:D,effects:E.current??[],width:L,height:x,output:X.current}),B(M)},[q,V,D,B,N]),A=W&&Z==="exiting";if(e(()=>{if(A)return;let U=X.current;if(!U)throw Error("Canvas not found");U.layoutSubtree=!0;let O=()=>{let w=U.firstChild;if(!w)return;let M=U.captureElementImage(w);j(M,z)};return U.addEventListener("paint",O),()=>{U.removeEventListener("paint",O)}},[j,Z,z,A]),e(()=>{if(A)return;let U=X.current;if(!U)throw Error("Canvas not found");U.requestPaint?.()},[$,A,T]),e(()=>{if(A)return;return()=>{Q()}},[Q,A]),e(()=>{if(A)return;let U=X.current;if(!U)return;new ResizeObserver(([w])=>{U.width=w.devicePixelContentBoxSize[0].inlineSize,U.height=w.devicePixelContentBoxSize[0].blockSize}).observe(U,{box:"device-pixel-content-box"})},[A]),A)return J;return bj(EQ,{children:bj("canvas",{ref:X,style:G,children:J})})},Jj=(J)=>{let j=(Q)=>{let{passedProps:$,...Z}=Q,{effects:H,...Y}=Q.passedProps;return bj(FQ,{shader:J,passedProps:Y,effects:H,...Z})};return(Q)=>{return{component:j,props:Q}}},yQ=0.4,RQ=`#version 300 es
2
+ in vec2 a_pos;
3
+ out vec2 v_uv;
4
+ void main() {
5
+ v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
6
+ gl_Position = vec4(a_pos, 0.0, 1.0);
7
+ }`,PQ=`#version 300 es
8
+ precision highp float;
9
+
10
+ uniform sampler2D u_prev;
11
+ uniform sampler2D u_next;
12
+ uniform float u_time;
13
+ uniform float u_strength;
14
+
15
+ in vec2 v_uv;
16
+ out vec4 outColor;
17
+
18
+ const float PI = 3.141592653589793;
19
+
20
+ float linearEase(float begin, float change, float duration, float time) {
21
+ return change * time / duration + begin;
22
+ }
23
+
24
+ float exponentialEaseInOut(float begin, float change, float duration, float time) {
25
+ if (time == 0.0) {
26
+ return begin;
27
+ }
28
+
29
+ if (time == duration) {
30
+ return begin + change;
31
+ }
32
+
33
+ float t = time / (duration / 2.0);
34
+ if (t < 1.0) {
35
+ return change / 2.0 * pow(2.0, 10.0 * (t - 1.0)) + begin;
36
+ }
37
+
38
+ return change / 2.0 * (-pow(2.0, -10.0 * (t - 1.0)) + 2.0) + begin;
39
+ }
40
+
41
+ float sinusoidalEaseInOut(float begin, float change, float duration, float time) {
42
+ return -change / 2.0 * (cos(PI * time / duration) - 1.0) + begin;
43
+ }
44
+
45
+ float random(vec2 co) {
46
+ return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
47
+ }
48
+
49
+ vec4 crossFade(vec2 uv, float dissolve) {
50
+ return mix(texture(u_prev, uv), texture(u_next, uv), dissolve);
51
+ }
52
+
53
+ vec4 transition(vec2 uv, float progress) {
54
+ vec2 center = vec2(linearEase(0.25, 0.5, 1.0, progress), 0.5);
55
+ float dissolve = exponentialEaseInOut(0.0, 1.0, 1.0, progress);
56
+ float strength = sinusoidalEaseInOut(0.0, u_strength, 0.5, progress);
57
+
58
+ vec4 color = vec4(0.0);
59
+ float total = 0.0;
60
+ vec2 toCenter = center - uv;
61
+ float offset = random(uv);
62
+
63
+ for (int i = 0; i <= 40; i++) {
64
+ float percent = (float(i) + offset) / 40.0;
65
+ float weight = 4.0 * (percent - percent * percent);
66
+ color += crossFade(uv + toCenter * percent * strength, dissolve) * weight;
67
+ total += weight;
68
+ }
69
+
70
+ return color / total;
71
+ }
72
+
73
+ void main() {
74
+ float progress = 1.0 - u_time;
75
+ outColor = transition(v_uv, progress);
76
+ }`,tj=(J,j,Q)=>{let $=J.createShader(Q);if(!$)throw Error("Failed to create shader");if(J.shaderSource($,j),J.compileShader($),!J.getShaderParameter($,J.COMPILE_STATUS)){let Z=J.getShaderInfoLog($);throw J.deleteShader($),Error(`Failed to compile shader: ${Z}`)}return $},xQ=(J)=>{let j=J.createProgram();if(!j)throw Error("Failed to create WebGL program");let Q=tj(J,RQ,J.VERTEX_SHADER),$=tj(J,PQ,J.FRAGMENT_SHADER);if(J.attachShader(j,Q),J.attachShader(j,$),J.linkProgram(j),!J.getProgramParameter(j,J.LINK_STATUS)){let Z=J.getProgramInfoLog(j);throw J.deleteProgram(j),Error(`Failed to link program: ${Z}`)}return j},aj=(J)=>{let j=J.createTexture();if(!j)throw Error("Failed to create texture");return J.bindTexture(J.TEXTURE_2D,j),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.RGBA,1,1,0,J.RGBA,J.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},IQ=(J)=>{let j=J.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let Q=xQ(j),$=aj(j),Z=aj(j),H=j.createVertexArray();j.bindVertexArray(H);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let K=j.getAttribLocation(Q,"a_pos");j.enableVertexAttribArray(K),j.vertexAttribPointer(K,2,j.FLOAT,!1,0,0);let W=j.getUniformLocation(Q,"u_time"),X=j.getUniformLocation(Q,"u_prev"),G=j.getUniformLocation(Q,"u_next"),D=j.getUniformLocation(Q,"u_strength");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(Q),j.deleteTexture($),j.deleteTexture(Z)},draw:({prevImage:V,nextImage:q,width:N,height:B,time:z,passedProps:A})=>{let{strength:U=yQ}=A;if(!V&&!q)return;if(V&&(V.width===0||V.height===0))return;if(q&&(q.width===0||q.height===0))return;let O=!V?0:!q?1:z;if(j.viewport(0,0,N,B),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(Q),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,$),V)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,V);if(j.uniform1i(X,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,Z),q)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,q);j.uniform1i(G,1),j.uniform1f(W,O),j.uniform1f(D,U),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},fQ=Jj(IQ),vQ=6,hQ=1.2,dQ=`#version 300 es
77
+ in vec2 a_pos;
78
+ out vec2 v_uv;
79
+ void main() {
80
+ v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
81
+ gl_Position = vec4(a_pos, 0.0, 1.0);
82
+ }`,cQ=`#version 300 es
83
+ precision highp float;
84
+
85
+ uniform sampler2D u_prev;
86
+ uniform sampler2D u_next;
87
+ uniform float u_time;
88
+ uniform float u_rotation;
89
+ uniform float u_scale;
90
+ uniform float u_ratio;
91
+
92
+ in vec2 v_uv;
93
+ out vec4 outColor;
94
+
95
+ const float DEG2RAD = 0.03926990816987241548078304229099;
96
+
97
+ vec4 transition(vec2 uv, float progress) {
98
+ float phase = progress < 0.5 ? progress * 2.0 : (progress - 0.5) * 2.0;
99
+ float angleOffset = progress < 0.5 ? mix(0.0, u_rotation * DEG2RAD, phase) : mix(-u_rotation * DEG2RAD, 0.0, phase);
100
+ float newScale = progress < 0.5 ? mix(1.0, u_scale, phase) : mix(u_scale, 1.0, phase);
101
+
102
+ vec2 center = vec2(0.0, 0.0);
103
+ vec2 p = (uv.xy - vec2(0.5, 0.5)) / newScale * vec2(u_ratio, 1.0);
104
+ float angle = atan(p.y, p.x) + angleOffset;
105
+ float dist = distance(center, p);
106
+
107
+ p.x = cos(angle) * dist / u_ratio + 0.5;
108
+ p.y = sin(angle) * dist + 0.5;
109
+
110
+ vec4 c = progress < 0.5 ? texture(u_prev, p) : texture(u_next, p);
111
+ return c + (progress < 0.5 ? mix(0.0, 1.0, phase) : mix(1.0, 0.0, phase));
112
+ }
113
+
114
+ void main() {
115
+ float progress = 1.0 - u_time;
116
+ outColor = transition(v_uv, progress);
117
+ }`,ej=(J,j,Q)=>{let $=J.createShader(Q);if(!$)throw Error("Failed to create shader");if(J.shaderSource($,j),J.compileShader($),!J.getShaderParameter($,J.COMPILE_STATUS)){let Z=J.getShaderInfoLog($);throw J.deleteShader($),Error(`Failed to compile shader: ${Z}`)}return $},uQ=(J)=>{let j=J.createProgram();if(!j)throw Error("Failed to create WebGL program");let Q=ej(J,dQ,J.VERTEX_SHADER),$=ej(J,cQ,J.FRAGMENT_SHADER);if(J.attachShader(j,Q),J.attachShader(j,$),J.linkProgram(j),!J.getProgramParameter(j,J.LINK_STATUS)){let Z=J.getProgramInfoLog(j);throw J.deleteProgram(j),Error(`Failed to link program: ${Z}`)}return j},jJ=(J)=>{let j=J.createTexture();if(!j)throw Error("Failed to create texture");return J.bindTexture(J.TEXTURE_2D,j),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.RGBA,1,1,0,J.RGBA,J.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},mQ=(J)=>{let j=J.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let Q=uQ(j),$=jJ(j),Z=jJ(j),H=j.createVertexArray();j.bindVertexArray(H);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let K=j.getAttribLocation(Q,"a_pos");j.enableVertexAttribArray(K),j.vertexAttribPointer(K,2,j.FLOAT,!1,0,0);let W=j.getUniformLocation(Q,"u_time"),X=j.getUniformLocation(Q,"u_prev"),G=j.getUniformLocation(Q,"u_next"),D=j.getUniformLocation(Q,"u_rotation"),_=j.getUniformLocation(Q,"u_scale"),T=j.getUniformLocation(Q,"u_ratio");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(Q),j.deleteTexture($),j.deleteTexture(Z)},draw:({prevImage:N,nextImage:B,width:z,height:A,time:U,passedProps:O})=>{let{rotation:w=vQ,scale:M=hQ}=O;if(!N&&!B)return;if(N&&(N.width===0||N.height===0))return;if(B&&(B.width===0||B.height===0))return;let L=!N?0:!B?1:U;if(j.viewport(0,0,z,A),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(Q),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,$),N)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,N);if(j.uniform1i(X,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,Z),B)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,B);j.uniform1i(G,1),j.uniform1f(W,L),j.uniform1f(D,w),j.uniform1f(_,M),j.uniform1f(T,z/A),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},iQ=Jj(mQ),pQ=2.31,sQ=`#version 300 es
118
+ in vec2 a_pos;
119
+ out vec2 v_uv;
120
+ void main() {
121
+ v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
122
+ gl_Position = vec4(a_pos, 0.0, 1.0);
123
+ }`,oQ=`#version 300 es
124
+ precision highp float;
125
+
126
+ uniform sampler2D u_prev;
127
+ uniform sampler2D u_next;
128
+ uniform float u_time;
129
+ uniform float u_seed;
130
+
131
+ in vec2 v_uv;
132
+ out vec4 outColor;
133
+
134
+ #define PI 3.14159265358979323
135
+ #define CLAMPS(x) clamp(x, 0.0, 1.0)
136
+ #define REPEATS 50.0
137
+
138
+ float sigmoid(float x, float a) {
139
+ float b = pow(x * 2.0, a) / 2.0;
140
+ if (x > 0.5) {
141
+ b = 1.0 - pow(2.0 - (x * 2.0), a) / 2.0;
142
+ }
143
+ return b;
144
+ }
145
+
146
+ float rand(float co) {
147
+ return fract(sin((co * 24.9898) + u_seed) * 43758.5453);
148
+ }
149
+
150
+ float rand(vec2 co) {
151
+ return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
152
+ }
153
+
154
+ float apow(float a, float b) {
155
+ return pow(abs(a), b) * sign(b);
156
+ }
157
+
158
+ vec3 pow3(vec3 a, vec3 b) {
159
+ return vec3(apow(a.r, b.r), apow(a.g, b.g), apow(a.b, b.b));
160
+ }
161
+
162
+ float smoothMix(float a, float b, float c) {
163
+ return mix(a, b, sigmoid(c, 2.0));
164
+ }
165
+
166
+ float random(vec2 co, float shft) {
167
+ co += 10.0;
168
+ return smoothMix(
169
+ fract(
170
+ sin(
171
+ dot(
172
+ co.xy,
173
+ vec2(12.9898 + (floor(shft) * 0.5), 78.233 + u_seed)
174
+ )
175
+ ) * 43758.5453
176
+ ),
177
+ fract(
178
+ sin(
179
+ dot(
180
+ co.xy,
181
+ vec2(12.9898 + (floor(shft + 1.0) * 0.5), 78.233 + u_seed)
182
+ )
183
+ ) * 43758.5453
184
+ ),
185
+ fract(shft)
186
+ );
187
+ }
188
+
189
+ float smoothRandom(vec2 co, float shft) {
190
+ return smoothMix(
191
+ smoothMix(
192
+ random(floor(co), shft),
193
+ random(floor(co + vec2(1.0, 0.0)), shft),
194
+ fract(co.x)
195
+ ),
196
+ smoothMix(
197
+ random(floor(co + vec2(0.0, 1.0)), shft),
198
+ random(floor(co + vec2(1.0, 1.0)), shft),
199
+ fract(co.x)
200
+ ),
201
+ fract(co.y)
202
+ );
203
+ }
204
+
205
+ vec4 sampleTexture(vec2 p, float progress) {
206
+ return mix(texture(u_prev, p), texture(u_next, p), sigmoid(progress, 10.0));
207
+ }
208
+
209
+ vec4 transition(vec2 p, float progress) {
210
+ vec3 f = vec3(0.0);
211
+ for (float i = 0.0; i < 13.0; i++) {
212
+ f += sin(((p.x * rand(i) * 6.0) + (progress * 8.0)) + rand(i + 1.43)) *
213
+ sin(
214
+ ((p.y * rand(i + 4.4) * 6.0) + (progress * 6.0)) +
215
+ rand(i + 2.4)
216
+ );
217
+ f += 1.0 - CLAMPS(
218
+ length(
219
+ p -
220
+ vec2(
221
+ smoothRandom(vec2(progress * 1.3), i + 1.0),
222
+ smoothRandom(vec2(progress * 0.5), i + 6.25)
223
+ )
224
+ ) * mix(20.0, 70.0, rand(i))
225
+ );
226
+ }
227
+
228
+ f += 4.0;
229
+ f /= 11.0;
230
+ f = pow3(
231
+ f * vec3(1.0, 0.7, 0.6),
232
+ vec3(1.0, 2.0 - sin(progress * PI), 1.3)
233
+ );
234
+ f *= sin(progress * PI);
235
+
236
+ p -= 0.5;
237
+ p *= 1.0 + (smoothRandom(vec2(progress * 5.0), 6.3) * sin(progress * PI) * 0.05);
238
+ p += 0.5;
239
+
240
+ vec4 blurredImage = vec4(0.0);
241
+ float blurAmount = sin(progress * PI) * 0.03;
242
+ for (float i = 0.0; i < REPEATS; i++) {
243
+ vec2 q = vec2(
244
+ cos(degrees((i / REPEATS) * 360.0)),
245
+ sin(degrees((i / REPEATS) * 360.0))
246
+ ) * (rand(vec2(i, p.x + p.y)) + blurAmount);
247
+ vec2 uv2 = p + (q * blurAmount);
248
+ blurredImage += sampleTexture(uv2, progress);
249
+ }
250
+
251
+ blurredImage /= REPEATS;
252
+ return blurredImage + vec4(f, 0.0);
253
+ }
254
+
255
+ void main() {
256
+ float progress = 1.0 - u_time;
257
+ outColor = transition(v_uv, progress);
258
+ }`,JJ=(J,j,Q)=>{let $=J.createShader(Q);if(!$)throw Error("Failed to create shader");if(J.shaderSource($,j),J.compileShader($),!J.getShaderParameter($,J.COMPILE_STATUS)){let Z=J.getShaderInfoLog($);throw J.deleteShader($),Error(`Failed to compile shader: ${Z}`)}return $},lQ=(J)=>{let j=J.createProgram();if(!j)throw Error("Failed to create WebGL program");let Q=JJ(J,sQ,J.VERTEX_SHADER),$=JJ(J,oQ,J.FRAGMENT_SHADER);if(J.attachShader(j,Q),J.attachShader(j,$),J.linkProgram(j),!J.getProgramParameter(j,J.LINK_STATUS)){let Z=J.getProgramInfoLog(j);throw J.deleteProgram(j),Error(`Failed to link program: ${Z}`)}return j},QJ=(J)=>{let j=J.createTexture();if(!j)throw Error("Failed to create texture");return J.bindTexture(J.TEXTURE_2D,j),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.RGBA,1,1,0,J.RGBA,J.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},gQ=(J)=>{let j=J.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let Q=lQ(j),$=QJ(j),Z=QJ(j),H=j.createVertexArray();j.bindVertexArray(H);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let K=j.getAttribLocation(Q,"a_pos");j.enableVertexAttribArray(K),j.vertexAttribPointer(K,2,j.FLOAT,!1,0,0);let W=j.getUniformLocation(Q,"u_time"),X=j.getUniformLocation(Q,"u_prev"),G=j.getUniformLocation(Q,"u_next"),D=j.getUniformLocation(Q,"u_seed");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(Q),j.deleteTexture($),j.deleteTexture(Z)},draw:({prevImage:V,nextImage:q,width:N,height:B,time:z,passedProps:A})=>{let{seed:U=pQ}=A;if(!V&&!q)return;if(V&&(V.width===0||V.height===0))return;if(q&&(q.width===0||q.height===0))return;let O=!V?0:!q?1:z;if(j.viewport(0,0,N,B),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(Q),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,$),V)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,V);if(j.uniform1i(X,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,Z),q)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,q);j.uniform1i(G,1),j.uniform1f(W,O),j.uniform1f(D,U),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},nQ=Jj(gQ),rQ=`#version 300 es
259
+ in vec2 a_pos;
260
+ out vec2 v_uv;
261
+ void main() {
262
+ v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
263
+ gl_Position = vec4(a_pos, 0.0, 1.0);
264
+ }`,tQ=`#version 300 es
265
+ precision highp float;
266
+
267
+ uniform sampler2D u_prev;
268
+ uniform sampler2D u_next;
269
+ uniform float u_time;
270
+ uniform float u_intensity;
271
+
272
+ in vec2 v_uv;
273
+ out vec4 outColor;
274
+
275
+ const int PASSES = 20;
276
+
277
+ vec4 transition(vec2 uv, float progress) {
278
+ vec4 c1 = vec4(0.0);
279
+ vec4 c2 = vec4(0.0);
280
+
281
+ float disp = u_intensity * (0.5 - distance(0.5, progress));
282
+ for (int xi = 0; xi < PASSES; xi++) {
283
+ float x = float(xi) / float(PASSES) - 0.5;
284
+ for (int yi = 0; yi < PASSES; yi++) {
285
+ float y = float(yi) / float(PASSES) - 0.5;
286
+ vec2 v = vec2(x, y);
287
+ c1 += texture(u_prev, uv + disp * v);
288
+ c2 += texture(u_next, uv + disp * v);
289
+ }
290
+ }
291
+
292
+ c1 /= float(PASSES * PASSES);
293
+ c2 /= float(PASSES * PASSES);
294
+ return mix(c1, c2, progress);
295
+ }
296
+
297
+ void main() {
298
+ float progress = 1.0 - u_time;
299
+ outColor = transition(v_uv, progress);
300
+ }`,$J=(J,j,Q)=>{let $=J.createShader(Q);if(!$)throw Error("Failed to create shader");if(J.shaderSource($,j),J.compileShader($),!J.getShaderParameter($,J.COMPILE_STATUS)){let Z=J.getShaderInfoLog($);throw J.deleteShader($),Error(`Failed to compile shader: ${Z}`)}return $},aQ=(J)=>{let j=J.createProgram();if(!j)throw Error("Failed to create WebGL program");let Q=$J(J,rQ,J.VERTEX_SHADER),$=$J(J,tQ,J.FRAGMENT_SHADER);if(J.attachShader(j,Q),J.attachShader(j,$),J.linkProgram(j),!J.getProgramParameter(j,J.LINK_STATUS)){let Z=J.getProgramInfoLog(j);throw J.deleteProgram(j),Error(`Failed to link program: ${Z}`)}return j},ZJ=(J)=>{let j=J.createTexture();if(!j)throw Error("Failed to create texture");return J.bindTexture(J.TEXTURE_2D,j),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.RGBA,1,1,0,J.RGBA,J.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},eQ=(J)=>{let j=J.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let Q=aQ(j),$=ZJ(j),Z=ZJ(j),H=j.createVertexArray();j.bindVertexArray(H);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let K=j.getAttribLocation(Q,"a_pos");j.enableVertexAttribArray(K),j.vertexAttribPointer(K,2,j.FLOAT,!1,0,0);let W=j.getUniformLocation(Q,"u_time"),X=j.getUniformLocation(Q,"u_prev"),G=j.getUniformLocation(Q,"u_next"),D=j.getUniformLocation(Q,"u_intensity");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(Q),j.deleteTexture($),j.deleteTexture(Z)},draw:({prevImage:V,nextImage:q,width:N,height:B,time:z,passedProps:A})=>{let{intensity:U=0.1}=A;if(!V&&!q)return;if(V&&(V.width===0||V.height===0))return;if(q&&(q.width===0||q.height===0))return;let O=!V?0:!q?1:z;if(j.viewport(0,0,N,B),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(Q),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,$),V)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,V);if(j.uniform1i(X,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,Z),q)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,q);j.uniform1i(G,1),j.uniform1f(W,O),j.uniform1f(D,U),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},j0=Jj(eQ),Q0=(J)=>{return{getDurationInFrames:()=>{return J.durationInFrames},getProgress:({frame:j})=>{return J0(j,[0,J.durationInFrames],[0,1],{easing:J.easing,extrapolateLeft:"clamp",extrapolateRight:"clamp"})}}},H0=(J={})=>{return{getDurationInFrames:({fps:j})=>{if(J.durationInFrames)return J.durationInFrames;return $0({config:J.config,threshold:J.durationRestThreshold,fps:j})},getProgress:({fps:j,frame:Q})=>{let $=J.reverse?0:1,Z=J.reverse?1:0;return Z0({fps:j,frame:Q,to:$,from:Z,config:J.config,durationInFrames:J.durationInFrames,durationRestThreshold:J.durationRestThreshold,reverse:J.reverse})}}},VJ=DJ.createContext(null),qJ=DJ.createContext(null),WJ=({presentationProgress:J,children:j})=>{let Q=_J(()=>{return{enteringProgress:J}},[J]);return UJ(VJ.Provider,{value:Q,children:j})},YJ=({presentationProgress:J,children:j})=>{let Q=_J(()=>{return{exitingProgress:J}},[J]);return UJ(qJ.Provider,{value:Q,children:j})},AJ=(J)=>{return XJ.Children.toArray(J).reduce((Q,$)=>{if($.type===XJ.Fragment)return Q.concat(AJ($.props.children));return Q.push($),Q},[])},GJ=Dj.validateDurationInFrames,{SequenceWithoutSchema:jj}=d,l=function(J){return null},Cj=()=>{return null},TJ=({children:J})=>{return b(NJ,{children:J})},B0={name:d.sequenceSchema.name,hidden:d.sequenceSchema.hidden,showInTimeline:d.sequenceSchema.showInTimeline,from:d.fromField,freeze:d.freezeField,layout:d.sequenceSchema.layout},D0=({children:J})=>{let{fps:j}=G0(),Q=X0(),$=KJ({}),Z=KJ({}),H=HJ(()=>{return AJ(J)},[J]),Y=Oj((G)=>{let D=$?.current?.[G],_=Z?.current?.[G];if(!_?.elementImage&&D?.elementImage){_?.draw?.(null,null,0),D?.draw?.(D?.elementImage??null,null,0);return}if(!D?.elementImage&&_?.elementImage){D?.draw?.(null,null,0),_?.draw?.(null,_?.elementImage??null,0);return}if(D&&_&&D.progress===_.progress||!D?.elementImage||!_?.elementImage)D?.draw?.(D?.elementImage??null,_?.elementImage??null,D?.progress??_?.progress??0),_?.draw?.(null,null,0)},[]),K=Oj((G,D,_,T)=>{$.current[T]={elementImage:G,progress:D,draw:_},Y(T)},[Y]),W=Oj((G,D,_,T)=>{Z.current[T]={elementImage:G,progress:D,draw:_},Y(T)},[Y]),X=HJ(()=>{let G=0,D=0,_=[],T=[],E=!1,V=K0.map(H,(N,B)=>{let z=N;if(typeof z==="string"){if(z.trim()==="")return null;throw TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${z}"`)}let A=H[B-1],U=H[B+1],O=typeof A==="string"||typeof A>"u"?!1:A.type===l,w=typeof A==="string"||typeof A>"u"?!1:A.type===Cj;if(z.type===Cj){if(w)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by another <TransitionSeries.Overlay /> component (nth children = ${B-1} and ${B})`);if(O)throw TypeError(`A <TransitionSeries.Transition /> component must not be followed by a <TransitionSeries.Overlay /> component (nth children = ${B-1} and ${B})`);if(typeof U==="string"||typeof U>"u"?!1:U.type===l)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by a <TransitionSeries.Transition /> component (nth children = ${B} and ${B+1})`);let C=z.props;GJ(C.durationInFrames,{component:"of a <TransitionSeries.Overlay /> component",allowFloats:!1});let k=C.offset??0;if(Number.isNaN(k))throw TypeError('The "offset" property of a <TransitionSeries.Overlay /> must not be NaN, but got NaN.');if(!Number.isFinite(k))throw TypeError(`The "offset" property of a <TransitionSeries.Overlay /> must be finite, but got ${k}.`);if(k%1!==0)throw TypeError(`The "offset" property of a <TransitionSeries.Overlay /> must be an integer, but got ${k}.`);let h=D+G,u=C.durationInFrames/2,m=h-u+k;if(m<0)throw TypeError(`A <TransitionSeries.Overlay /> extends before frame 0. The overlay starts at frame ${m}. Reduce the duration or adjust the offset.`);let Vj=T.length-1;if(Vj>=0){let kj=u-k;if(kj>T[Vj])throw TypeError(`A <TransitionSeries.Overlay /> extends beyond the previous sequence. The overlay needs ${kj} frames before the cut, but the previous sequence is only ${T[Vj]} frames long.`)}return E=!0,_.push({cutPoint:h,overlayFrom:m,durationInFrames:C.durationInFrames,overlayOffset:k,halfDuration:u,children:C.children,index:B}),null}if(z.type===l){if(O)throw TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${B-1} and ${B})`);if(w)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by a <TransitionSeries.Transition /> component (nth children = ${B-1} and ${B})`);return null}if(z.type!==TJ)throw TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence />, <TransitionSeries.Transition />, and <TransitionSeries.Overlay /> components as its children, but got ${z} instead`);let M=typeof A==="string"||typeof A>"u"?null:A.type===l?A:null,L=typeof U==="string"||typeof U>"u"?null:U.type===l?U:null,x=z,g=`index = ${B}, duration = ${x.props.durationInFrames}`,S=x.props.durationInFrames,{durationInFrames:zJ,children:V0,from:q0,...F}=x.props;GJ(S,{component:"of a <TransitionSeries.Sequence /> component",allowFloats:!0});let c=x.props.offset??0;if(Number.isNaN(c))throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${g}).`);if(!Number.isFinite(c))throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${c} (${g}).`);if(c%1!==0)throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${c} (${g}).`);let MJ=D+c,Ej=0;if(M)Ej=M.props.timing.getDurationInFrames({fps:j}),G-=Ej;let I=MJ+G;if(D+=S+c,I<0)D-=I,I=0;if(T.push(S),E){E=!1;let y=_[_.length-1],C=y.halfDuration+y.overlayOffset;if(C>S)throw TypeError(`A <TransitionSeries.Overlay /> extends beyond the next sequence. The overlay needs ${C} frames after the cut, but the next sequence is only ${S} frames long.`)}let f=L?L.props.timing.getProgress({frame:Q-I-zJ+L.props.timing.getDurationInFrames({fps:j}),fps:j}):null,v=M?M.props.timing.getProgress({frame:Q-I,fps:j}):null;if(L&&S<L.props.timing.getDurationInFrames({fps:j}))throw Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${L.props.timing.getDurationInFrames({fps:j})} frames long, but the sequence is only ${S} frames long (${g})`);if(M&&S<M.props.timing.getDurationInFrames({fps:j}))throw Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${M.props.timing.getDurationInFrames({fps:j})} frames long, but the sequence is only ${S} frames long (${g})`);if(L&&M&&f!==null&&v!==null){let y=L.props.presentation??_j(),C=M.props.presentation??_j(),k=y.component,h=C.component;return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:b(k,{passedProps:y.props??{},presentationDirection:"exiting",presentationProgress:f,presentationDurationInFrames:L.props.timing.getDurationInFrames({fps:j}),onElementImage:()=>{throw Error("Should not call when exiting")},onUnmount:()=>{throw Error("Should not call when exiting")},bothEnteringAndExiting:!0,children:b(YJ,{presentationProgress:f,children:b(h,{passedProps:C.props??{},presentationDirection:"entering",presentationProgress:v,presentationDurationInFrames:M.props.timing.getDurationInFrames({fps:j}),onElementImage:(u,m)=>{W(u,f,m,B+1),K(u,v,m,B-1)},onUnmount:()=>{W(null,null,null,B+1),K(null,null,null,B-1)},bothEnteringAndExiting:!0,children:b(WJ,{presentationProgress:v,children:N})})})})},B)}if(v!==null&&M){let y=M.props.presentation??_j(),C=y.component;return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:b(C,{passedProps:y.props??{},presentationDirection:"entering",presentationProgress:v,presentationDurationInFrames:M.props.timing.getDurationInFrames({fps:j}),onElementImage:(k,h)=>K(k,v,h,B-1),onUnmount:()=>{K(null,null,null,B-1)},bothEnteringAndExiting:!1,children:b(WJ,{presentationProgress:v,children:N})})},B)}if(f!==null&&L){let y=L.props.presentation??_j(),C=y.component;return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:b(C,{passedProps:y.props??{},presentationDirection:"exiting",presentationProgress:f,presentationDurationInFrames:L.props.timing.getDurationInFrames({fps:j}),onElementImage:(k,h)=>W(k,f,h,B+1),onUnmount:()=>{W(null,null,null,B+1)},bothEnteringAndExiting:!1,children:b(YJ,{presentationProgress:f,children:N})})},B)}return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:N},B)}),q=_.map((N)=>{let B=N;return b(jj,{from:Math.round(B.overlayFrom),durationInFrames:B.durationInFrames,name:"<TS.Overlay>",_remotionInternalDocumentationLink:"https://www.remotion.dev/docs/transitions/transitionseries",layout:"absolute-fill",children:B.children},`overlay-${B.index}`)});return[...V||[],...q]},[H,j,Q,W,K]);return b(NJ,{children:X})},_0=(J)=>{let{children:j,name:Q,layout:$,controls:Z,...H}=J,{stack:Y,...K}=H,W=Q??"<TransitionSeries>",X=$??"absolute-fill";if(Dj.ENABLE_V5_BREAKING_CHANGES&&X!=="absolute-fill")throw TypeError(`The "layout" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);return b(Y0,{name:W,layout:X,_remotionInternalDocumentationLink:Q===void 0?"https://www.remotion.dev/docs/transitions/transitionseries":void 0,...K,_remotionInternalStack:Y??void 0,controls:Z??void 0,children:b(D0,{children:j})})},Qj=W0.withSchema({Component:_0,componentName:"<TransitionSeries>",componentIdentity:"dev.remotion.transitions.TransitionSeries",schema:B0,supportsEffects:!1});Qj.Sequence=TJ;Qj.Transition=l;Qj.Overlay=Cj;d.addSequenceStackTraces(Qj);var U0=()=>{let J=BJ.useContext(VJ),j=BJ.useContext(qJ);if(!J&&!j)return{isInTransitionSeries:!1,entering:1,exiting:0};return{isInTransitionSeries:!0,entering:J?.enteringProgress??1,exiting:j?.exitingProgress??0}};var{TransitionSeries:h0,crossZoom:d0,dreamyZoom:c0,filmBurn:u0,linearBlur:m0,linearTiming:i0,makeHtmlInCanvasPresentation:p0,springTiming:s0,useTransitionProgress:o0}=Uj;var g0=Uj;export{o0 as useTransitionProgress,s0 as springTiming,p0 as makeHtmlInCanvasPresentation,i0 as linearTiming,m0 as linearBlur,u0 as filmBurn,c0 as dreamyZoom,g0 as default,d0 as crossZoom,h0 as TransitionSeries};
@@ -0,0 +1 @@
1
+ var f0=Object.defineProperty;var v0=($,G)=>{for(var J in G)f0($,J,{get:G[J],enumerable:!0,configurable:!0,set:(Z)=>G[J]=()=>Z})};var e={};v0(e,{clockWipe:()=>cG});var y0=({instruction:$,lastPoint:G,progress:J})=>{let Z=G.x+($.x-G.x)*J,N=G.y+($.y-G.y)*J;return{type:"L",x:Z,y:N}};function y($,G,J){return{x:$.x+(G.x-$.x)*J,y:$.y+(G.y-$.y)*J}}function x0({progress:$,lastPoint:G,instruction:J}){let Z=$,N={x:G.x,y:G.y},K={x:J.cp1x,y:J.cp1y},U={x:J.cp2x,y:J.cp2y},Q={x:J.x,y:J.y},O=y(N,K,Z),H=y(K,U,Z),q=y(U,Q,Z),M=y(O,H,Z),j=y(H,q,Z),V=y(M,j,Z);return{type:"C",cp1x:O.x,cp1y:O.y,cp2x:M.x,cp2y:M.y,x:V.x,y:V.y}}var l0=({instruction:$,lastPoint:G,progress:J})=>{if($.type==="M")return $;if($.type==="L")return y0({instruction:$,lastPoint:G,progress:J});if($.type==="C")return x0({instruction:$,lastPoint:G,progress:J});if($.type==="Z")return $;throw TypeError(`${$.type} is not supported.`)},h0=[[],[],[-0.5773502691896257,0.5773502691896257],[0,-0.7745966692414834,0.7745966692414834],[-0.33998104358485626,0.33998104358485626,-0.8611363115940526,0.8611363115940526],[0,-0.5384693101056831,0.5384693101056831,-0.906179845938664,0.906179845938664],[0.6612093864662645,-0.6612093864662645,-0.2386191860831969,0.2386191860831969,-0.932469514203152,0.932469514203152],[0,0.4058451513773972,-0.4058451513773972,-0.7415311855993945,0.7415311855993945,-0.9491079123427585,0.9491079123427585],[-0.1834346424956498,0.1834346424956498,-0.525532409916329,0.525532409916329,-0.7966664774136267,0.7966664774136267,-0.9602898564975363,0.9602898564975363],[0,-0.8360311073266358,0.8360311073266358,-0.9681602395076261,0.9681602395076261,-0.3242534234038089,0.3242534234038089,-0.6133714327005904,0.6133714327005904],[-0.14887433898163122,0.14887433898163122,-0.4333953941292472,0.4333953941292472,-0.6794095682990244,0.6794095682990244,-0.8650633666889845,0.8650633666889845,-0.9739065285171717,0.9739065285171717],[0,-0.26954315595234496,0.26954315595234496,-0.5190961292068118,0.5190961292068118,-0.7301520055740494,0.7301520055740494,-0.8870625997680953,0.8870625997680953,-0.978228658146057,0.978228658146057],[-0.1252334085114689,0.1252334085114689,-0.3678314989981802,0.3678314989981802,-0.5873179542866175,0.5873179542866175,-0.7699026741943047,0.7699026741943047,-0.9041172563704749,0.9041172563704749,-0.9815606342467192,0.9815606342467192],[0,-0.2304583159551348,0.2304583159551348,-0.44849275103644687,0.44849275103644687,-0.6423493394403402,0.6423493394403402,-0.8015780907333099,0.8015780907333099,-0.9175983992229779,0.9175983992229779,-0.9841830547185881,0.9841830547185881],[-0.10805494870734367,0.10805494870734367,-0.31911236892788974,0.31911236892788974,-0.5152486363581541,0.5152486363581541,-0.6872929048116855,0.6872929048116855,-0.827201315069765,0.827201315069765,-0.9284348836635735,0.9284348836635735,-0.9862838086968123,0.9862838086968123],[0,-0.20119409399743451,0.20119409399743451,-0.3941513470775634,0.3941513470775634,-0.5709721726085388,0.5709721726085388,-0.7244177313601701,0.7244177313601701,-0.8482065834104272,0.8482065834104272,-0.937273392400706,0.937273392400706,-0.9879925180204854,0.9879925180204854],[-0.09501250983763744,0.09501250983763744,-0.2816035507792589,0.2816035507792589,-0.45801677765722737,0.45801677765722737,-0.6178762444026438,0.6178762444026438,-0.755404408355003,0.755404408355003,-0.8656312023878318,0.8656312023878318,-0.9445750230732326,0.9445750230732326,-0.9894009349916499,0.9894009349916499],[0,-0.17848418149584785,0.17848418149584785,-0.3512317634538763,0.3512317634538763,-0.5126905370864769,0.5126905370864769,-0.6576711592166907,0.6576711592166907,-0.7815140038968014,0.7815140038968014,-0.8802391537269859,0.8802391537269859,-0.9506755217687678,0.9506755217687678,-0.9905754753144174,0.9905754753144174],[-0.0847750130417353,0.0847750130417353,-0.2518862256915055,0.2518862256915055,-0.41175116146284263,0.41175116146284263,-0.5597708310739475,0.5597708310739475,-0.6916870430603532,0.6916870430603532,-0.8037049589725231,0.8037049589725231,-0.8926024664975557,0.8926024664975557,-0.9558239495713977,0.9558239495713977,-0.9915651684209309,0.9915651684209309],[0,-0.16035864564022537,0.16035864564022537,-0.31656409996362983,0.31656409996362983,-0.46457074137596094,0.46457074137596094,-0.600545304661681,0.600545304661681,-0.7209661773352294,0.7209661773352294,-0.8227146565371428,0.8227146565371428,-0.9031559036148179,0.9031559036148179,-0.96020815213483,0.96020815213483,-0.9924068438435844,0.9924068438435844],[-0.07652652113349734,0.07652652113349734,-0.22778585114164507,0.22778585114164507,-0.37370608871541955,0.37370608871541955,-0.5108670019508271,0.5108670019508271,-0.636053680726515,0.636053680726515,-0.7463319064601508,0.7463319064601508,-0.8391169718222188,0.8391169718222188,-0.912234428251326,0.912234428251326,-0.9639719272779138,0.9639719272779138,-0.9931285991850949,0.9931285991850949],[0,-0.1455618541608951,0.1455618541608951,-0.2880213168024011,0.2880213168024011,-0.4243421202074388,0.4243421202074388,-0.5516188358872198,0.5516188358872198,-0.6671388041974123,0.6671388041974123,-0.7684399634756779,0.7684399634756779,-0.8533633645833173,0.8533633645833173,-0.9200993341504008,0.9200993341504008,-0.9672268385663063,0.9672268385663063,-0.9937521706203895,0.9937521706203895],[-0.06973927331972223,0.06973927331972223,-0.20786042668822127,0.20786042668822127,-0.34193582089208424,0.34193582089208424,-0.469355837986757,0.469355837986757,-0.5876404035069116,0.5876404035069116,-0.6944872631866827,0.6944872631866827,-0.7878168059792081,0.7878168059792081,-0.8658125777203002,0.8658125777203002,-0.926956772187174,0.926956772187174,-0.9700604978354287,0.9700604978354287,-0.9942945854823992,0.9942945854823992],[0,-0.1332568242984661,0.1332568242984661,-0.26413568097034495,0.26413568097034495,-0.3903010380302908,0.3903010380302908,-0.5095014778460075,0.5095014778460075,-0.6196098757636461,0.6196098757636461,-0.7186613631319502,0.7186613631319502,-0.8048884016188399,0.8048884016188399,-0.8767523582704416,0.8767523582704416,-0.9329710868260161,0.9329710868260161,-0.9725424712181152,0.9725424712181152,-0.9947693349975522,0.9947693349975522],[-0.06405689286260563,0.06405689286260563,-0.1911188674736163,0.1911188674736163,-0.3150426796961634,0.3150426796961634,-0.4337935076260451,0.4337935076260451,-0.5454214713888396,0.5454214713888396,-0.6480936519369755,0.6480936519369755,-0.7401241915785544,0.7401241915785544,-0.820001985973903,0.820001985973903,-0.8864155270044011,0.8864155270044011,-0.9382745520027328,0.9382745520027328,-0.9747285559713095,0.9747285559713095,-0.9951872199970213,0.9951872199970213]],p0=[[],[],[1,1],[0.8888888888888888,0.5555555555555556,0.5555555555555556],[0.6521451548625461,0.6521451548625461,0.34785484513745385,0.34785484513745385],[0.5688888888888889,0.47862867049936647,0.47862867049936647,0.23692688505618908,0.23692688505618908],[0.3607615730481386,0.3607615730481386,0.46791393457269104,0.46791393457269104,0.17132449237917036,0.17132449237917036],[0.4179591836734694,0.3818300505051189,0.3818300505051189,0.27970539148927664,0.27970539148927664,0.1294849661688697,0.1294849661688697],[0.362683783378362,0.362683783378362,0.31370664587788727,0.31370664587788727,0.22238103445337448,0.22238103445337448,0.10122853629037626,0.10122853629037626],[0.3302393550012598,0.1806481606948574,0.1806481606948574,0.08127438836157441,0.08127438836157441,0.31234707704000286,0.31234707704000286,0.26061069640293544,0.26061069640293544],[0.29552422471475287,0.29552422471475287,0.26926671930999635,0.26926671930999635,0.21908636251598204,0.21908636251598204,0.1494513491505806,0.1494513491505806,0.06667134430868814,0.06667134430868814],[0.2729250867779006,0.26280454451024665,0.26280454451024665,0.23319376459199048,0.23319376459199048,0.18629021092773426,0.18629021092773426,0.1255803694649046,0.1255803694649046,0.05566856711617366,0.05566856711617366],[0.24914704581340277,0.24914704581340277,0.2334925365383548,0.2334925365383548,0.20316742672306592,0.20316742672306592,0.16007832854334622,0.16007832854334622,0.10693932599531843,0.10693932599531843,0.04717533638651183,0.04717533638651183],[0.2325515532308739,0.22628318026289723,0.22628318026289723,0.2078160475368885,0.2078160475368885,0.17814598076194574,0.17814598076194574,0.13887351021978725,0.13887351021978725,0.09212149983772845,0.09212149983772845,0.04048400476531588,0.04048400476531588],[0.2152638534631578,0.2152638534631578,0.2051984637212956,0.2051984637212956,0.18553839747793782,0.18553839747793782,0.15720316715819355,0.15720316715819355,0.12151857068790319,0.12151857068790319,0.08015808715976021,0.08015808715976021,0.03511946033175186,0.03511946033175186],[0.2025782419255613,0.19843148532711158,0.19843148532711158,0.1861610000155622,0.1861610000155622,0.16626920581699392,0.16626920581699392,0.13957067792615432,0.13957067792615432,0.10715922046717194,0.10715922046717194,0.07036604748810812,0.07036604748810812,0.03075324199611727,0.03075324199611727],[0.1894506104550685,0.1894506104550685,0.18260341504492358,0.18260341504492358,0.16915651939500254,0.16915651939500254,0.14959598881657674,0.14959598881657674,0.12462897125553388,0.12462897125553388,0.09515851168249279,0.09515851168249279,0.062253523938647894,0.062253523938647894,0.027152459411754096,0.027152459411754096],[0.17944647035620653,0.17656270536699264,0.17656270536699264,0.16800410215645004,0.16800410215645004,0.15404576107681028,0.15404576107681028,0.13513636846852548,0.13513636846852548,0.11188384719340397,0.11188384719340397,0.08503614831717918,0.08503614831717918,0.0554595293739872,0.0554595293739872,0.02414830286854793,0.02414830286854793],[0.1691423829631436,0.1691423829631436,0.16427648374583273,0.16427648374583273,0.15468467512626524,0.15468467512626524,0.14064291467065065,0.14064291467065065,0.12255520671147846,0.12255520671147846,0.10094204410628717,0.10094204410628717,0.07642573025488905,0.07642573025488905,0.0497145488949698,0.0497145488949698,0.02161601352648331,0.02161601352648331],[0.1610544498487837,0.15896884339395434,0.15896884339395434,0.15276604206585967,0.15276604206585967,0.1426067021736066,0.1426067021736066,0.12875396253933621,0.12875396253933621,0.11156664554733399,0.11156664554733399,0.09149002162245,0.09149002162245,0.06904454273764123,0.06904454273764123,0.0448142267656996,0.0448142267656996,0.019461788229726478,0.019461788229726478],[0.15275338713072584,0.15275338713072584,0.14917298647260374,0.14917298647260374,0.14209610931838204,0.14209610931838204,0.13168863844917664,0.13168863844917664,0.11819453196151841,0.11819453196151841,0.10193011981724044,0.10193011981724044,0.08327674157670475,0.08327674157670475,0.06267204833410907,0.06267204833410907,0.04060142980038694,0.04060142980038694,0.017614007139152118,0.017614007139152118],[0.14608113364969041,0.14452440398997005,0.14452440398997005,0.13988739479107315,0.13988739479107315,0.13226893863333747,0.13226893863333747,0.12183141605372853,0.12183141605372853,0.10879729916714838,0.10879729916714838,0.09344442345603386,0.09344442345603386,0.0761001136283793,0.0761001136283793,0.057134425426857205,0.057134425426857205,0.036953789770852494,0.036953789770852494,0.016017228257774335,0.016017228257774335],[0.13925187285563198,0.13925187285563198,0.13654149834601517,0.13654149834601517,0.13117350478706238,0.13117350478706238,0.12325237681051242,0.12325237681051242,0.11293229608053922,0.11293229608053922,0.10041414444288096,0.10041414444288096,0.08594160621706773,0.08594160621706773,0.06979646842452049,0.06979646842452049,0.052293335152683286,0.052293335152683286,0.03377490158481415,0.03377490158481415,0.0146279952982722,0.0146279952982722],[0.13365457218610619,0.1324620394046966,0.1324620394046966,0.12890572218808216,0.12890572218808216,0.12304908430672953,0.12304908430672953,0.11499664022241136,0.11499664022241136,0.10489209146454141,0.10489209146454141,0.09291576606003515,0.09291576606003515,0.07928141177671895,0.07928141177671895,0.06423242140852585,0.06423242140852585,0.04803767173108467,0.04803767173108467,0.030988005856979445,0.030988005856979445,0.013411859487141771,0.013411859487141771],[0.12793819534675216,0.12793819534675216,0.1258374563468283,0.1258374563468283,0.12167047292780339,0.12167047292780339,0.1155056680537256,0.1155056680537256,0.10744427011596563,0.10744427011596563,0.09761865210411388,0.09761865210411388,0.08619016153195327,0.08619016153195327,0.0733464814110803,0.0733464814110803,0.05929858491543678,0.05929858491543678,0.04427743881741981,0.04427743881741981,0.028531388628933663,0.028531388628933663,0.0123412297999872,0.0123412297999872]],g0=[[1],[1,1],[1,2,1],[1,3,3,1]],m0=($,G,J)=>{let Z=(1-J)*(1-J)*(1-J)*$[0]+3*(1-J)*(1-J)*J*$[1]+3*(1-J)*J*J*$[2]+J*J*J*$[3],N=(1-J)*(1-J)*(1-J)*G[0]+3*(1-J)*(1-J)*J*G[1]+3*(1-J)*J*J*G[2]+J*J*J*G[3];return{x:Z,y:N}},G0=($,G,J)=>{let Z=J.length-1,N;if(Z===0)return 0;if($===0){N=0;for(let U=0;U<=Z;U++)N+=g0[Z][U]*(1-G)**(Z-U)*G**U*J[U];return N}let K=Array(Z);for(let U=0;U<Z;U++)K[U]=Z*(J[U+1]-J[U]);return G0($-1,G,K)};function d0($,G,J){let Z=G0(1,J,$),N=G0(1,J,G),K=Z*Z+N*N;return Math.sqrt(K)}var $0=({sx:$,sy:G,t:J})=>{let Z,N=20,K=J/2,U=0;for(let Q=0;Q<20;Q++)Z=K*h0[20][Q]+K,U+=p0[20][Q]*d0($,G,Z);return K*U},a0=($,G,J)=>{let Z=(1-J)*(1-J)*$[0]+2*(1-J)*J*$[1]+J*J*$[2],N=(1-J)*(1-J)*G[0]+2*(1-J)*J*G[1]+J*J*G[2];return{x:Z,y:N}},u0=($,G,J)=>{return a0([3*($[1]-$[0]),3*($[2]-$[1]),3*($[3]-$[2])],[3*(G[1]-G[0]),3*(G[2]-G[1]),3*(G[3]-G[2])],J)};var Q0=({length:$,totalLength:G,func:J})=>{let Z=1,N=$/G,K=($-J(N))/G,U=0;while(Z>0.001){let Q=J(N+K),O=Math.abs($-Q)/G;if(O<Z)Z=O,N+=K;else{let H=J(N-K),q=Math.abs($-H)/G;if(q<Z)Z=q,N-=K;else K/=2}if(U++,U>500)break}return N};var c0=({startX:$,startY:G,cp1x:J,cp1y:Z,cp2x:N,cp2y:K,x:U,y:Q})=>{let O={x:$,y:G},H={x:J,y:Z},q={x:N,y:K},M={x:U,y:Q},j=$0({sx:[O.x,H.x,q.x,M.x],sy:[O.y,H.y,q.y,M.y],t:1});return{getPointAtLength:(I)=>{let z=[O.x,H.x,q.x,M.x],W=[O.y,H.y,q.y,M.y],w=Q0({length:I,totalLength:j,func:(_)=>{return $0({sx:z,sy:W,t:_})}});return m0(z,W,w)},getTangentAtLength:(I)=>{let z=[O.x,H.x,q.x,M.x],W=[O.y,H.y,q.y,M.y],w=Q0({length:I,totalLength:j,func:(l)=>$0({sx:z,sy:W,t:l})}),_=u0(z,W,w),P=Math.sqrt(_.x*_.x+_.y*_.y),C;if(P>0)C={x:_.x/P,y:_.y/P};else C={x:0,y:0};return C},getTotalLength:()=>{return j},getC:()=>{return q},getD:()=>{return M},type:"cubic-bezier"}},H0=({x0:$,x1:G,y0:J,y1:Z})=>{return{getTotalLength:()=>{return Math.sqrt(($-G)**2+(J-Z)**2)},getPointAtLength:(N)=>{let K=N/Math.sqrt(($-G)**2+(J-Z)**2);K=Number.isNaN(K)?1:K;let U=(G-$)*K,Q=(Z-J)*K;return{x:$+U,y:J+Q}},getTangentAtLength:()=>{let N=Math.sqrt((G-$)*(G-$)+(Z-J)*(Z-J));return{x:(G-$)/N,y:(Z-J)/N}},type:"linear"}},o0=($)=>{let G={x:0,y:0},J={x:0,y:0},Z=[];for(let N=0;N<$.length;N++){let K=$[N];if(K.type==="M")G={x:K.x,y:K.y},J={x:G.x,y:G.y},Z.push({startPoint:{x:K.x,y:K.y},instructionsAndInfo:[{instruction:K,function:null,length:0,startPoint:G}]});if(K.type==="L"){if(Z.length>0){let U=Math.sqrt((G.x-K.x)**2+(G.y-K.y)**2);Z[Z.length-1].instructionsAndInfo.push({instruction:K,length:U,function:H0({x0:G.x,x1:K.x,y0:G.y,y1:K.y}),startPoint:G})}G={x:K.x,y:K.y}}if(K.type==="Z"){if(Z.length>0){let U=Math.sqrt((Z[Z.length-1].startPoint.x-G.x)**2+(Z[Z.length-1].startPoint.y-G.y)**2);Z[Z.length-1].instructionsAndInfo.push({instruction:K,function:H0({x0:G.x,x1:J.x,y0:G.y,y1:J.y}),length:U,startPoint:{...G}})}G={x:J.x,y:J.y}}if(K.type==="C"){let U=c0({startX:G.x,startY:G.y,cp1x:K.cp1x,cp1y:K.cp1y,cp2x:K.cp2x,cp2y:K.cp2y,x:K.x,y:K.y}),Q=U.getTotalLength();if(Z.length>0)Z[Z.length-1].instructionsAndInfo.push({instruction:K,length:Q,function:U,startPoint:{...G}});G={x:K.x,y:K.y}}}return Z},j0={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},r0=($,G)=>{let J=[],Z=j0[G];if($.length%Z!==0)throw Error(`Expected number of arguments of SVG instruction "${G} ${$.join(" ")}" to be a multiple of ${Z}`);for(let N=0;N<$.length;N+=Z)J.push($.slice(N,N+Z));return J},S=($,G,J)=>{return r0($,G).map((Z)=>{return J(Z)})},s0=/([astvzqmhlc])([^astvzqmhlc]*)/gi,e0=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,i0=($,G)=>{let J=$.match(e0);if(!J){if(G==="Z"||G==="z")return[];throw Error(`Malformed path data: ${G} was expected to have numbers afterwards`)}let Z=j0[G];if(J.length%Z!==0)throw Error(`Malformed path data: ${G} was expected to have a multiple of ${Z} numbers, but got "${G} ${J.join(" ")} instead"`);return J.map(Number)},m=($)=>{if(!$)throw Error("No path provided");let G=$.match(s0);if(!G)throw Error(`No path elements found in string ${$}`);return G.map((J)=>{let Z=J.charAt(0),N=i0(J.substring(1),Z);if(Z==="M"&&N.length>2){let K=[];return K.push({type:Z,x:N[0],y:N[1]}),K.push(...S(N.slice(2),"L",(U)=>({type:"L",x:U[0],y:U[1]}))),K}if(Z==="m"&&N.length>2){let K=[];return K.push({type:Z,dx:N[0],dy:N[1]}),K.push(...S(N.slice(2),"l",(U)=>({type:"l",dx:U[0],dy:U[1]}))),K}if(Z==="Z"||Z==="z")return[{type:"Z"}];if(Z==="A")return S(N,Z,(K)=>({type:Z,rx:K[0],ry:K[1],xAxisRotation:K[2],largeArcFlag:K[3]===1,sweepFlag:K[4]===1,x:K[5],y:K[6]}));if(Z==="a")return S(N,Z,(K)=>({type:Z,rx:K[0],ry:K[1],xAxisRotation:K[2],largeArcFlag:K[3]===1,sweepFlag:K[4]===1,dx:K[5],dy:K[6]}));if(Z==="C")return S(N,Z,(K)=>({type:Z,cp1x:K[0],cp1y:K[1],cp2x:K[2],cp2y:K[3],x:K[4],y:K[5]}));if(Z==="c")return S(N,Z,(K)=>({type:Z,cp1dx:K[0],cp1dy:K[1],cp2dx:K[2],cp2dy:K[3],dx:K[4],dy:K[5]}));if(Z==="S")return S(N,Z,(K)=>({type:Z,cpx:K[0],cpy:K[1],x:K[2],y:K[3]}));if(Z==="s")return S(N,Z,(K)=>({type:Z,cpdx:K[0],cpdy:K[1],dx:K[2],dy:K[3]}));if(Z==="H")return S(N,Z,(K)=>({type:Z,x:K[0]}));if(Z==="h")return S(N,Z,(K)=>({type:Z,dx:K[0]}));if(Z==="V")return S(N,Z,(K)=>({type:Z,y:K[0]}));if(Z==="v")return S(N,Z,(K)=>({type:Z,dy:K[0]}));if(Z==="L")return S(N,Z,(K)=>({type:Z,x:K[0],y:K[1]}));if(Z==="M")return S(N,Z,(K)=>({type:Z,x:K[0],y:K[1]}));if(Z==="m")return S(N,Z,(K)=>({type:Z,dx:K[0],dy:K[1]}));if(Z==="l")return S(N,Z,(K)=>({type:Z,dx:K[0],dy:K[1]}));if(Z==="Q")return S(N,Z,(K)=>({type:Z,cpx:K[0],cpy:K[1],x:K[2],y:K[3]}));if(Z==="q")return S(N,Z,(K)=>({type:Z,cpdx:K[0],cpdy:K[1],dx:K[2],dy:K[3]}));if(Z==="T")return S(N,Z,(K)=>({type:Z,x:K[0],y:K[1]}));if(Z==="t")return S(N,Z,(K)=>({type:Z,dx:K[0],dy:K[1]}));throw Error(`Invalid path element ${J}`)},[]).flat(1)},O0=($,G)=>{let J=G.x+0.6666666666666666*($.cpx-G.x),Z=G.y+0.6666666666666666*($.cpy-G.y),N=$.x+0.6666666666666666*($.cpx-$.x),K=$.y+0.6666666666666666*($.cpy-$.y);return{type:"C",cp1x:J,cp1y:Z,cp2x:N,cp2y:K,x:$.x,y:$.y}},n0=({segments:$,iterate:G})=>{let J=0,Z=0,N=0,K=0,U=null,Q=null;return $.map((H,q)=>{let M=G({segment:H,x:J,y:Z,prevSegment:$[q-1]??null,initialX:N,initialY:K,cpX:U,cpY:Q});switch(H.type){case"M":N=H.x,K=H.y,J=H.x,Z=H.y,U=null,Q=null;break;case"Q":J=H.x,Z=H.y,U=H.cpx,Q=H.cpy;break;case"A":J=H.x,Z=H.y,U=null,Q=null;break;case"C":J=H.x,Z=H.y,U=H.cp2x,Q=H.cp2y;break;case"S":J=H.x,Z=H.y,U=H.cpx,Q=H.cpy;break;case"T":if(U!==null&&Q!==null)U=J-(U-J),Q=Z-(Q-Z);J=H.x,Z=H.y;break;case"L":J=H.x,Z=H.y,U=null,Q=null;break;case"V":Z=H.y,U=null,Q=null;break;case"H":J=H.x,U=null,Q=null;break;case"Z":J=N,Z=K,U=null,Q=null;break;default:throw Error(`Unexpected instruction ${H.type}`)}return M}).flat(1)},h=Math.PI*2;function t0($,G){let J=1.3333333333333333*Math.tan(G/4),Z=Math.cos($),N=Math.sin($),K=Math.cos($+G),U=Math.sin($+G);return[Z,N,Z-N*J,N+Z*J,K+U*J,U-K*J,K,U]}function q0($,G,J,Z){let N=$*Z-G*J<0?-1:1,K=$*J+G*Z;if(K>1)K=1;if(K<-1)K=-1;return N*Math.acos(K)}function $$({x1:$,y1:G,x2:J,y2:Z,largeArcFlag:N,sweepFlag:K,rx:U,ry:Q,sin_phi:O,cos_phi:H}){let q=H*($-J)/2+O*(G-Z)/2,M=-O*($-J)/2+H*(G-Z)/2,j=U*U,V=Q*Q,F=q*q,k=M*M,T=j*V-j*k-V*F;if(T<0)T=0;T/=j*k+V*F,T=Math.sqrt(T)*(N===K?-1:1);let D=T*U/Q*M,I=T*-Q/U*q,z=H*D-O*I+($+J)/2,W=O*D+H*I+(G+Z)/2,w=(q-D)/U,_=(M-I)/Q,P=(-q-D)/U,C=(-M-I)/Q,l=q0(1,0,w,_),f=q0(w,_,P,C);if(K===!1&&f>0)f-=h;if(K===!0&&f<0)f+=h;return[z,W,l,f]}function G$({x1:$,y1:G,x2:J,y2:Z,largeArcFlag:N,sweepFlag:K,rx:U,ry:Q,phi:O}){let H=Math.sin(O*h/360),q=Math.cos(O*h/360),M=q*($-J)/2+H*(G-Z)/2,j=-H*($-J)/2+q*(G-Z)/2;if(M===0&&j===0)return[];if(U===0||Q===0)return[];U=Math.abs(U),Q=Math.abs(Q);let V=M*M/(U*U)+j*j/(Q*Q);if(V>1)U*=Math.sqrt(V),Q*=Math.sqrt(V);let F=$$({x1:$,y1:G,x2:J,y2:Z,largeArcFlag:N,sweepFlag:K,rx:U,ry:Q,sin_phi:H,cos_phi:q}),k=[],T=F[2],D=F[3],I=Math.max(Math.ceil(Math.abs(D)/(h/4)),1);D/=I;for(let z=0;z<I;z++)k.push(t0(T,D)),T+=D;return k.map((z)=>{for(let W=0;W<z.length;W+=2){let w=z[W+0],_=z[W+1];w*=U,_*=Q;let P=q*w-H*_,C=H*w+q*_;z[W+0]=P+F[0],z[W+1]=C+F[1]}return z})}var V0=($)=>{return n0({segments:$,iterate:({segment:G,prevSegment:J,x:Z,y:N,cpX:K,cpY:U})=>{if(G.type==="H")return[{type:"L",x:G.x,y:N}];if(G.type==="V")return[{type:"L",x:Z,y:G.y}];if(G.type==="A"){let{x:Q,y:O}=G,H=G$({x1:Z,y1:N,x2:Q,y2:O,largeArcFlag:G.largeArcFlag,sweepFlag:G.sweepFlag,rx:G.rx,ry:G.ry,phi:G.xAxisRotation});if(H.length===0)return[{type:"L",x:G.x,y:G.y}];return H.map((M)=>{return{type:"C",cp1x:M[2],cp1y:M[3],cp2x:M[4],cp2y:M[5],x:M[6],y:M[7]}})}if(G.type==="T"){let Q=0,O=0;if(J&&(J.type==="Q"||J.type==="T"))Q=K,O=U;else Q=Z,O=N;let H=Q-Z,q=O-N,M=Z-H,j=N-q;return[O0({type:"Q",cpx:M,cpy:j,x:G.x,y:G.y},{x:Z,y:N})]}if(G.type==="S"){let Q=0,O=0;if(J&&J.type==="C")Q=J.cp2x,O=J.cp2y;else if(J&&J.type==="S")Q=J.cpx,O=J.cpy;else Q=Z,O=N;let H=Q-Z,q=O-N,M=Z-H,j=N-q;return[{type:"C",cp1x:M,cp1y:j,cp2x:G.cpx,cp2y:G.cpy,x:G.x,y:G.y}]}if(G.type==="Q")return[O0(G,{x:Z,y:N})];return[G]}})},J$=($)=>{if($.type==="A")return`A ${$.rx} ${$.ry} ${$.xAxisRotation} ${Number($.largeArcFlag)} ${Number($.sweepFlag)} ${$.x} ${$.y}`;if($.type==="a")return`a ${$.rx} ${$.ry} ${$.xAxisRotation} ${Number($.largeArcFlag)} ${Number($.sweepFlag)} ${$.dx} ${$.dy}`;if($.type==="C")return`C ${$.cp1x} ${$.cp1y} ${$.cp2x} ${$.cp2y} ${$.x} ${$.y}`;if($.type==="c")return`c ${$.cp1dx} ${$.cp1dy} ${$.cp2dx} ${$.cp2dy} ${$.dx} ${$.dy}`;if($.type==="S")return`S ${$.cpx} ${$.cpy} ${$.x} ${$.y}`;if($.type==="s")return`s ${$.cpdx} ${$.cpdy} ${$.dx} ${$.dy}`;if($.type==="Q")return`Q ${$.cpx} ${$.cpy} ${$.x} ${$.y}`;if($.type==="q")return`q ${$.cpdx} ${$.cpdy} ${$.dx} ${$.dy}`;if($.type==="Z")return"Z";if($.type==="H")return`H ${$.x}`;if($.type==="h")return`h ${$.dx}`;if($.type==="V")return`V ${$.y}`;if($.type==="v")return`v ${$.dy}`;if($.type==="L")return`L ${$.x} ${$.y}`;if($.type==="l")return`l ${$.dx} ${$.dy}`;if($.type==="M")return`M ${$.x} ${$.y}`;if($.type==="m")return`m ${$.dx} ${$.dy}`;if($.type==="T")return`T ${$.x} ${$.y}`;if($.type==="t")return`t ${$.dx} ${$.dy}`;throw Error(`Unknown instruction type: ${$.type}`)},E=($)=>{return $.map((G)=>{return J$(G)}).join(" ")},J0=($)=>{let G=[],J=0,Z=0,N=0,K=0;for(let U=0;U<$.length;U++){let Q=$[U];if(Q.type==="M")N=Q.x,K=Q.y;else if(Q.type==="m")N+=Q.dx,K+=Q.dy;if(Q.type==="A"||Q.type==="C"||Q.type==="L"||Q.type==="M"||Q.type==="Q"||Q.type==="S"||Q.type==="T"){G.push(Q),J=Q.x,Z=Q.y;continue}if(Q.type==="a"||Q.type==="c"||Q.type==="l"||Q.type==="m"||Q.type==="q"||Q.type==="s"||Q.type==="t"){let O=J,H=Z;if(J+=Q.dx,Z+=Q.dy,Q.type==="a"){G.push({type:"A",largeArcFlag:Q.largeArcFlag,rx:Q.rx,ry:Q.ry,sweepFlag:Q.sweepFlag,xAxisRotation:Q.xAxisRotation,x:J,y:Z});continue}if(Q.type==="c"){G.push({type:"C",cp1x:Q.cp1dx+O,cp1y:Q.cp1dy+H,cp2x:Q.cp2dx+O,cp2y:Q.cp2dy+H,x:J,y:Z});continue}if(Q.type==="l"){G.push({type:"L",x:J,y:Z});continue}if(Q.type==="m"){G.push({type:"M",x:J,y:Z});continue}if(Q.type==="q"){G.push({type:"Q",cpx:Q.cpdx+O,cpy:Q.cpdy+H,x:J,y:Z});continue}if(Q.type==="s"){G.push({type:"S",cpx:Q.cpdx+O,cpy:Q.cpdy+H,x:J,y:Z});continue}if(Q.type==="t"){G.push({type:"T",x:J,y:Z});continue}}if(Q.type==="H"){G.push(Q),J=Q.x;continue}if(Q.type==="V"){G.push(Q),Z=Q.y;continue}if(Q.type==="Z"){G.push(Q),J=N,Z=K;continue}if(Q.type==="h"){J+=Q.dx,G.push({type:"H",x:J});continue}if(Q.type==="v"){Z+=Q.dy,G.push({type:"V",y:Z});continue}throw Error("Unknown instruction type: "+Q.type)}return G};var p=($)=>{let G=J0($);return V0(G)},Z$=($,G)=>{let J=m($),Z=p(J),N=o0(Z),K=[],U=0;for(let Q of N)for(let O of Q.instructionsAndInfo){if(U+O.length>G){let q=(G-U)/O.length,M=l0({instruction:O.instruction,lastPoint:O.startPoint,progress:q});return K.push(M),E(K)}if(U+=O.length,K.push(O.instruction),U===G)return E(K)}return E(K)},K$=($)=>{let G=J0(m($));return G.map((J,Z)=>{if(J.type==="Z")return null;if(J.type==="H"||J.type==="V")return null;let N=[J.x-5,J.y-5],K=[J.x+5,J.y-5],U=[J.x-5,J.y+5],Q=[J.x+5,J.y+5],O=[{type:"M",x:N[0],y:N[1]},{type:"L",x:K[0],y:K[1]},{type:"L",x:Q[0],y:Q[1]},{type:"L",x:U[0],y:U[1]},{type:"Z"}];return{d:E(O),color:Z===G.length-1?"red":J.type==="M"?"blue":"green"}}).filter(Boolean)},N$=0.00000001;function U$($){let G=Math.min($[0],$[2]),J=Math.max($[0],$[2]);if($[1]>$[0]?$[2]>=$[1]:$[2]<=$[1])return[G,J];let Z=($[0]*$[2]-$[1]*$[1])/($[0]-2*$[1]+$[2]);return Z<G?[Z,J]:[G,Z]}function M0($){let G=$[0]-3*$[1]+3*$[2]-$[3];if(Math.abs(G)<N$){if($[0]===$[3]&&$[0]===$[1])return[$[0],$[3]];return U$([$[0],-0.5*$[0]+1.5*$[1],$[0]-3*$[1]+3*$[2]])}let J=-$[0]*$[2]+$[0]*$[3]-$[1]*$[2]-$[1]*$[3]+$[1]*$[1]+$[2]*$[2];if(J<=0)return[Math.min($[0],$[3]),Math.max($[0],$[3])];let Z=Math.sqrt(J),N=Math.min($[0],$[3]),K=Math.max($[0],$[3]),U=$[0]-2*$[1]+$[2];for(let Q=(U+Z)/G,O=1;O<=2;Q=(U-Z)/G,O++)if(Q>0&&Q<1){let H=$[0]*(1-Q)*(1-Q)*(1-Q)+$[1]*3*(1-Q)*(1-Q)*Q+$[2]*3*(1-Q)*Q*Q+$[3]*Q*Q*Q;if(H<N)N=H;if(H>K)K=H}return[N,K]}var B0=($)=>{let G=1/0,J=1/0,Z=-1/0,N=-1/0,K=0,U=0,Q=0,O=0;for(let H of $)switch(H.type){case"M":{if(Q=H.x,O=H.y,G>H.x)G=H.x;if(J>H.y)J=H.y;if(Z<H.x)Z=H.x;if(N<H.y)N=H.y;K=H.x,U=H.y;break}case"L":{if(G>H.x)G=H.x;if(J>H.y)J=H.y;if(Z<H.x)Z=H.x;if(N<H.y)N=H.y;K=H.x,U=H.y;break}case"C":{let q=M0([K,H.cp1x,H.cp2x,H.x]);if(G>q[0])G=q[0];if(Z<q[1])Z=q[1];let M=M0([U,H.cp1y,H.cp2y,H.y]);if(J>M[0])J=M[0];if(N<M[1])N=M[1];K=H.x,U=H.y;break}case"Z":K=Q,U=O;break;default:throw Error(`Unknown instruction ${H.type}`)}return{x1:G,y1:J,x2:Z,y2:N,viewBox:`${G} ${J} ${Z-G} ${N-J}`,width:Z-G,height:N-J}},Q$=($)=>{let G=m($),J=V0(J0(G));return B0(J)};var H$=($,G,J)=>{return $.map((Z)=>{if(Z.type==="a"||Z.type==="c"||Z.type==="v"||Z.type==="s"||Z.type==="h"||Z.type==="l"||Z.type==="m"||Z.type==="q"||Z.type==="t")return Z;if(Z.type==="V")return{type:"V",y:Z.y+J};if(Z.type==="H")return{type:"H",x:Z.x+G};if(Z.type==="A")return{type:"A",rx:Z.rx,ry:Z.ry,largeArcFlag:Z.largeArcFlag,sweepFlag:Z.sweepFlag,xAxisRotation:Z.xAxisRotation,x:Z.x+G,y:Z.y+J};if(Z.type==="Z")return Z;if(Z.type==="C")return{type:"C",cp1x:Z.cp1x+G,cp1y:Z.cp1y+J,cp2x:Z.cp2x+G,cp2y:Z.cp2y+J,x:Z.x+G,y:Z.y+J};if(Z.type==="Q")return{type:"Q",cpx:Z.cpx+G,cpy:Z.cpy+J,x:Z.x+G,y:Z.y+J};if(Z.type==="S")return{type:"S",cpx:Z.cpx+G,cpy:Z.cpy+J,x:Z.x+G,y:Z.y+J};if(Z.type==="T")return{type:"T",x:Z.x+G,y:Z.y+J};if(Z.type==="L")return{type:"L",x:Z.x+G,y:Z.y+J};if(Z.type==="M")return{type:"M",x:Z.x+G,y:Z.y+J};throw Error(`Unknown segment type: ${Z.type}`)})},Z0=($,G,J)=>{return E(H$(m($),G,J))},d=($)=>{let G=Q$($);return Z0($,-G.x1,-G.y1)};var a={getBoundingBoxFromInstructions:B0,debugPath:K$,cutPath:Z$};import{Internals as O$,Interactive as q$}from"remotion";import V$,{useCallback as z0,useMemo as F0,useRef as B$}from"react";import{version as z$}from"react-dom";import{HtmlInCanvas as F$,Internals as E0,Sequence as E$}from"remotion";import{jsx as v,jsxs as D0}from"react/jsx-runtime";import{Internals as T0}from"remotion";import{jsx as k$}from"react/jsx-runtime";import{Internals as X$,Interactive as Y$}from"remotion";import{jsx as A$}from"react/jsx-runtime";import{Internals as f$,Interactive as v$}from"remotion";import{jsx as x$}from"react/jsx-runtime";import{Internals as g$,Interactive as m$}from"remotion";import{jsx as a$}from"react/jsx-runtime";import{Internals as r$,Interactive as s$}from"remotion";import{jsx as i$}from"react/jsx-runtime";import{Internals as GG,Interactive as JG}from"remotion";import{jsx as ZG}from"react/jsx-runtime";import{Internals as QG,Interactive as HG}from"remotion";import{jsx as MG}from"react/jsx-runtime";import{Internals as zG,Interactive as FG}from"remotion";import{jsx as DG}from"react/jsx-runtime";import{Internals as IG,Interactive as SG}from"remotion";import{jsx as YG}from"react/jsx-runtime";import{Internals as AG,Interactive as PG}from"remotion";import{jsx as fG}from"react/jsx-runtime";import{Internals as lG,Interactive as hG}from"remotion";import{jsx as gG}from"react/jsx-runtime";var u=($,G)=>{let J=G[0]-$[0],Z=G[1]-$[1],N=Math.sqrt(J*J+Z*Z);return N===0?[0,0]:[J/N,Z/N]},M$=($,G,J)=>{let Z=$.length;if(J===0)return[{type:"M",x:$[0][0],y:$[0][1]},...$.slice(1).map(([H,q])=>({type:"L",x:H,y:q})),{type:"Z"}];let N=u($[0],$[1]),K=$[0][0]+N[0]*J,U=$[0][1]+N[1]*J,Q=[{type:"M",x:K,y:U}];for(let H=1;H<Z;H++){let q=$[H];if(G.has(H)){let M=$[H-1],j=$[(H+1)%Z],V=u(M,q),F=u(q,j);Q.push({type:"L",x:q[0]-V[0]*J,y:q[1]-V[1]*J},{type:"C",cp1x:q[0],cp1y:q[1],cp2x:q[0],cp2y:q[1],x:q[0]+F[0]*J,y:q[1]+F[1]*J})}else Q.push({type:"L",x:q[0],y:q[1]})}let O=u($[Z-1],$[0]);return Q.push({type:"L",x:$[0][0]-O[0]*J,y:$[0][1]-O[1]*J},{type:"C",cp1x:$[0][0],cp1y:$[0][1],cp2x:$[0][0],cp2y:$[0][1],x:K,y:U},{type:"Z"}),Q},j$=({length:$=300,headWidth:G=185,headLength:J=120,shaftWidth:Z=80,direction:N="right",cornerRadius:K=0})=>{if($<=0||G<=0||J<=0||Z<=0)throw Error('All dimension parameters ("length", "headWidth", "headLength", "shaftWidth") must be positive numbers');if(G<Z)throw Error(`"headWidth" must be greater than or equal to "shaftWidth", got headWidth=${G} and shaftWidth=${Z}`);if(J>$)throw Error(`"headLength" must be less than or equal to "length", got headLength=${J} and length=${$}`);let U=(G-Z)/2,Q=U+Z,O=$-J,H=[[0,U],[O,U],[O,0],[$,G/2],[O,G],[O,Q],[0,Q]],q,M,j;if(N==="right")q=H,M=$,j=G;else if(N==="left")q=H.map(([T,D])=>[$-T,D]),M=$,j=G;else if(N==="down")q=[[U,0],[Q,0],[Q,O],[G,O],[G/2,$],[0,O],[U,O]],M=G,j=$;else q=[[U,$],[Q,$],[Q,J],[G,J],[G/2,0],[0,J],[U,J]],M=G,j=$;let F=M$(q,N==="right"||N==="left"?new Set([0,2,3,4,6]):new Set([0,1,3,4,5]),K);return{path:E(F),instructions:F,width:M,height:j,transformOrigin:`${M/2} ${j/2}`}},D$=($)=>{if($.includes("canary")||$.includes("experimental"))return parseInt($.slice(-8),10)>20230209;let[G]=$.split(".").map(Number);return G>18},T$=F$,L=({defaultName:$,documentationLink:G,width:J,height:Z,path:N,style:K,pathStyle:U,transformOrigin:Q,debug:O,effects:H=[],instructions:q,pixelDensity:M,durationInFrames:j,from:V,trimBefore:F,freeze:k,hidden:T,name:D,showInTimeline:I,controls:z,stack:W,...w})=>{let _=F0(()=>{return{overflow:"visible",...K??{}}},[K]),P=F0(()=>{return{transformBox:"fill-box",...U??{}}},[U]),C=B$(null),l=z0((X)=>{C.current=X},[]),f=z0((X)=>{C.current=X},[]),C0=E0.useMemoizedEffectDefinitions(H),i=E0.useUnsafeVideoConfig(),L0=D$(z$),n=D0("svg",{ref:H.length===0||!i?l:void 0,width:J,height:Z,viewBox:`0 0 ${J} ${Z}`,xmlns:"http://www.w3.org/2000/svg",style:H.length===0||!i?_:{overflow:"visible"},children:[v("path",{...L0?{transformOrigin:Q}:{"transform-origin":Q},d:N,style:P,...w}),O?q.map((X,t)=>{if(X.type==="C"){let Y=t===0?q[q.length-1]:q[t-1];if(Y.type==="V"||Y.type==="H"||Y.type==="a"||Y.type==="Z"||Y.type==="t"||Y.type==="q"||Y.type==="l"||Y.type==="c"||Y.type==="m"||Y.type==="h"||Y.type==="s"||Y.type==="v")return null;let{x:b0,y:R0}=Y;return D0(V$.Fragment,{children:[v("path",{d:`M ${b0} ${R0} ${X.cp1x} ${X.cp1y}`,strokeWidth:2,stroke:"rgba(0, 0, 0, 0.4)"}),v("path",{d:`M ${X.x} ${X.y} ${X.cp2x} ${X.cp2y}`,strokeWidth:2,stroke:"rgba(0, 0, 0, 0.4)"}),v("circle",{cx:X.cp1x,cy:X.cp1y,r:3,fill:"white",strokeWidth:2,stroke:"black"}),v("circle",{cx:X.cp2x,cy:X.cp2y,r:3,strokeWidth:2,fill:"white",stroke:"black"})]},t)}return null}):null]}),A0=H.length===0?n:v(T$,{ref:f,width:Math.ceil(J),height:Math.ceil(Z),effects:H,pixelDensity:M,showInTimeline:!1,style:_,controls:z,children:n}),P0=W===void 0?null:{stack:W};if(!i)return n;return v(E$,{layout:"none",from:V,trimBefore:F,freeze:k,hidden:T,showInTimeline:I,controls:z,_remotionInternalEffects:C0,durationInFrames:j,name:D??$,outlineRef:C,_remotionInternalDocumentationLink:D===void 0?G:void 0,...P0,children:A0})},B=({defaultValue:$,description:G,hiddenFromList:J=!1,max:Z,min:N,step:K=1})=>{return{type:"number",default:$,description:G,hiddenFromList:J,max:Z,min:N,step:K}},W0=({defaultValue:$,description:G})=>{return{type:"boolean",default:$,description:G}},W$=({defaultValue:$,description:G})=>{return{type:"color",default:$,description:G}},N0=({defaultValue:$,description:G,variants:J})=>{return{type:"enum",default:$,description:G,variants:Object.fromEntries(J.map((Z)=>[Z,{}]))}},A=($)=>{return{...T0.baseSchema,...$,fill:W$({defaultValue:"#0b84ff",description:"Fill"}),...T0.transformSchema}},I$=A({length:B({defaultValue:300,description:"Length",min:0}),headWidth:B({defaultValue:185,description:"Head Width",min:0}),headLength:B({defaultValue:120,description:"Head Length",min:0}),shaftWidth:B({defaultValue:80,description:"Shaft Width",min:0}),direction:N0({defaultValue:"right",description:"Direction",variants:["right","left","up","down"]}),cornerRadius:B({defaultValue:0,description:"Corner Radius",min:0})}),S$=({length:$,headWidth:G,headLength:J,shaftWidth:Z,direction:N,cornerRadius:K,...U})=>{return k$(L,{defaultName:"<Arrow>",documentationLink:"https://www.remotion.dev/docs/shapes/arrow",...j$({length:$,headWidth:G,headLength:J,shaftWidth:Z,direction:N,cornerRadius:K}),...U})},_$=q$.withSchema({Component:S$,componentName:"<Arrow>",componentIdentity:"dev.remotion.shapes.Arrow",schema:I$,supportsEffects:!0});O$.addSequenceStackTraces(_$);var k0=($,G)=>{let[J,Z]=$,N=Math.sqrt(J*J+Z*Z),K=(N-G)/N;return[J*K,Z*K]},I0=($,G)=>{let[J,Z]=$,N=Math.sqrt(J*J+Z*Z),K=G/N;return[J*K,Z*K]},g=($,{edgeRoundness:G,cornerRadius:J,roundCornerStrategy:Z})=>{return $.map(([N,K],U)=>{let Q=U===0?$.length-2:U-1,O=$[Q],H=U===$.length-1?1:U+1,q=$[H],M=[(N+q[0])/2,(K+q[1])/2],j=[(N+O[0])/2,(K+O[1])/2],V=[N-O[0],K-O[1]],F=[q[0]-N,q[1]-K];if(U===0){if(G!==null)return[{type:"M",x:M[0],y:M[1]}];if(J!==0){let D=k0(F,J);return[{type:"M",x:D[0]+N,y:D[1]+K}]}return[{type:"M",x:N,y:K}]}if(J&&G!==null)throw Error('"cornerRadius" and "edgeRoundness" cannot be specified at the same time.');if(G===null){if(J===0)return[{type:"L",x:N,y:K}];let D=k0(V,J),I=I0(V,J),z=I0(F,J),W=[O[0]+D[0],O[1]+D[1]];return[{type:"L",x:W[0],y:W[1]},Z==="arc"?{type:"a",rx:J,ry:J,xAxisRotation:0,dx:I[0]+z[0],dy:I[1]+z[1],largeArcFlag:!1,sweepFlag:!0}:{type:"C",x:W[0]+I[0]+z[0],y:W[1]+I[1]+z[1],cp1x:N,cp1y:K,cp2x:N,cp2y:K}]}let k=[j[0]+V[0]*G*0.5,j[1]+V[1]*G*0.5],T=[M[0]-F[0]*G*0.5,M[1]-F[1]*G*0.5];return[{type:"C",cp1x:k[0],cp1y:k[1],cp2x:T[0],cp2y:T[1],x:M[0],y:M[1]}]}).flat(1)},c=($,G)=>{if(typeof G!=="number"||G<=0)throw Error(`"${$}" must be a positive number, got ${G}`)},S0=({availableLength:$,pointerBaseWidth:G,pointerPosition:J})=>{let Z=$*J,N=G/2;return{center:Z,start:Math.max(0,Z-N),end:Math.min($,Z+N)}},K0=($,G)=>{return $[0]===G[0]&&$[1]===G[1]},w$=($)=>{let G=$.reduce((N,K)=>{let U=N[N.length-1];if(U&&K0(U.point,K.point))return N[N.length-1]={point:U.point,round:U.round&&K.round},N;return[...N,K]},[]);if(G.length===0)return G;let J=G[0],Z=G[G.length-1];if(K0(J.point,Z.point)){let[N,...K]=G,U=K.slice(0,-1),Q={point:N.point,round:N.round&&Z.round};return[Q,...U,Q]}return[...G,J]},o=($,G)=>{let J=G[0]-$[0],Z=G[1]-$[1],N=Math.sqrt(J*J+Z*Z);if(N===0)return[0,0];return[J/N,Z/N]},C$=({points:$,edgeRoundness:G,cornerRadius:J})=>{let Z=$.map((H)=>H.point);if(G!==null||J===0)return[...g(Z,{edgeRoundness:G,cornerRadius:J,roundCornerStrategy:"arc"}),{type:"Z"}];let N=K0($[0].point,$[$.length-1].point)?$.slice(0,-1):$,K=N[0],U=K.round?o(N[0].point,N[1].point):null,Q=U?[K.point[0]+U[0]*J,K.point[1]+U[1]*J]:K.point,O=[{type:"M",x:Q[0],y:Q[1]}];for(let H=1;H<N.length;H++){let q=N[H];if(!q.round){O.push({type:"L",x:q.point[0],y:q.point[1]});continue}let M=N[H-1].point,j=N[(H+1)%N.length].point,V=o(M,q.point),F=o(q.point,j),k=[q.point[0]-V[0]*J,q.point[1]-V[1]*J];O.push({type:"L",x:k[0],y:k[1]},{type:"a",rx:J,ry:J,xAxisRotation:0,dx:V[0]*J+F[0]*J,dy:V[1]*J+F[1]*J,largeArcFlag:!1,sweepFlag:!0})}if(K.round){let H=N[N.length-1].point,q=o(H,K.point);O.push({type:"L",x:K.point[0]-q[0]*J,y:K.point[1]-q[1]*J},{type:"a",rx:J,ry:J,xAxisRotation:0,dx:q[0]*J+U[0]*J,dy:q[1]*J+U[1]*J,largeArcFlag:!1,sweepFlag:!0})}return O.push({type:"Z"}),O},L$=({width:$=500,height:G=200,pointerLength:J=40,pointerBaseWidth:Z=60,pointerPosition:N=0.5,pointerDirection:K="down",edgeRoundness:U=null,cornerRadius:Q=0})=>{if(c("width",$),c("height",G),c("pointerLength",J),c("pointerBaseWidth",Z),typeof N!=="number"||N<0||N>1)throw Error(`"pointerPosition" must be a number between 0 and 1, got ${N}`);let O=S0({availableLength:$,pointerBaseWidth:Z,pointerPosition:N}),H=S0({availableLength:G,pointerBaseWidth:Z,pointerPosition:N}),q={up:[{point:[0,J],round:!0},{point:[O.start,J],round:!1},{point:[O.center,0],round:!1},{point:[O.end,J],round:!1},{point:[$,J],round:!0},{point:[$,G+J],round:!0},{point:[0,G+J],round:!0},{point:[0,J],round:!0}],down:[{point:[0,0],round:!0},{point:[$,0],round:!0},{point:[$,G],round:!0},{point:[O.end,G],round:!1},{point:[O.center,G+J],round:!1},{point:[O.start,G],round:!1},{point:[0,G],round:!0},{point:[0,0],round:!0}],left:[{point:[J,0],round:!0},{point:[$+J,0],round:!0},{point:[$+J,G],round:!0},{point:[J,G],round:!0},{point:[J,H.end],round:!1},{point:[0,H.center],round:!1},{point:[J,H.start],round:!1},{point:[J,0],round:!0}],right:[{point:[0,0],round:!0},{point:[$,0],round:!0},{point:[$,H.start],round:!1},{point:[$+J,H.center],round:!1},{point:[$,H.end],round:!1},{point:[$,G],round:!0},{point:[0,G],round:!0},{point:[0,0],round:!0}]},M=w$(q[K]),j=C$({points:M,edgeRoundness:U,cornerRadius:Q}),V=E(j),F=K==="left"||K==="right"?$+J:$,k=K==="up"||K==="down"?G+J:G,T=K==="left"?J:0,D=K==="up"?J:0;return{width:F,height:k,instructions:j,path:V,transformOrigin:`${T+$/2} ${D+G/2}`}},P$=A({width:B({defaultValue:500,description:"Width",min:1}),height:B({defaultValue:200,description:"Height",min:1}),pointerLength:B({defaultValue:40,description:"Pointer Length",min:1}),pointerBaseWidth:B({defaultValue:60,description:"Pointer Base Width",min:1}),pointerPosition:B({defaultValue:0.5,description:"Pointer Position",min:0,max:1,step:0.01}),pointerDirection:N0({defaultValue:"down",description:"Pointer Direction",variants:["up","down","left","right"]}),cornerRadius:B({defaultValue:0,description:"Corner Radius",min:0})}),b$=({width:$,height:G,pointerLength:J,pointerBaseWidth:Z,pointerPosition:N,pointerDirection:K,edgeRoundness:U,cornerRadius:Q,...O})=>{return A$(L,{defaultName:"<Callout>",documentationLink:"https://www.remotion.dev/docs/shapes/callout",...L$({width:$,height:G,pointerLength:J,pointerBaseWidth:Z,pointerPosition:N,pointerDirection:K,edgeRoundness:U,cornerRadius:Q}),...O})},R$=Y$.withSchema({Component:b$,componentName:"<Callout>",componentIdentity:"dev.remotion.shapes.Callout",schema:P$,supportsEffects:!0});X$.addSequenceStackTraces(R$);var y$=({radius:$})=>{let G=[{type:"M",x:$,y:0},{type:"a",rx:$,ry:$,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!0,dx:0,dy:$*2},{type:"a",rx:$,ry:$,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!0,dx:0,dy:-$*2},{type:"Z"}],J=E(G);return{height:$*2,width:$*2,path:J,instructions:G,transformOrigin:`${$} ${$}`}},l$=A({radius:B({defaultValue:100,description:"Radius",min:0})}),h$=({radius:$,...G})=>{return x$(L,{defaultName:"<Circle>",documentationLink:"https://www.remotion.dev/docs/shapes/circle",...y$({radius:$}),...G})},p$=v$.withSchema({Component:h$,componentName:"<Circle>",componentIdentity:"dev.remotion.shapes.Circle",schema:l$,supportsEffects:!0});f$.addSequenceStackTraces(p$);var d$=({rx:$,ry:G})=>{let J=[{type:"M",x:$,y:0},{type:"a",rx:$,ry:G,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!1,dx:1,dy:0},{type:"Z"}],Z=E(J);return{width:$*2,height:G*2,path:Z,instructions:J,transformOrigin:`${$} ${G}`}},u$=A({rx:B({defaultValue:100,description:"X Radius",min:0}),ry:B({defaultValue:50,description:"Y Radius",min:0})}),c$=({rx:$,ry:G,...J})=>{return a$(L,{defaultName:"<Ellipse>",documentationLink:"https://www.remotion.dev/docs/shapes/ellipse",...d$({rx:$,ry:G}),...J})},o$=m$.withSchema({Component:c$,componentName:"<Ellipse>",componentIdentity:"dev.remotion.shapes.Ellipse",schema:u$,supportsEffects:!0});g$.addSequenceStackTraces(o$);var e$=({height:$,aspectRatio:G=1.1,bottomRoundnessAdjustment:J=0,depthAdjustment:Z=0})=>{let N=$*G,K=0.20909090909090908*N+J*N,U=0.69*$,Q=0.6*$,O=0.13*$,H=0.2636363636363636*N,q=0.13636363636363635*N,M=0.045454545454545456*N,j=0.07*$,V=0.17*$+Z*$,F=[{type:"M",x:N/2,y:$},{type:"C",cp1x:N/2-K,cp1y:U,cp2x:0,cp2y:Q,x:0,y:$/4},{type:"C",cp1x:0,cp1y:O,cp2x:N/4-H/2,cp2y:0,x:N/4,y:0},{type:"C",cp1x:N/4+H/2,cp1y:0,cp2x:N/2-M,cp2y:j,x:N/2,y:V},{type:"C",cp1x:N/2+M,cp1y:j,cp2x:N/2+q,cp2y:0,x:N/4*3,y:0},{type:"C",cp1x:N/4*3+H/2,cp1y:0,cp2x:N,cp2y:O,x:N,y:$/4},{type:"C",x:N/2,y:$,cp1x:N,cp1y:Q,cp2x:N/2+K,cp2y:U},{type:"Z"}];return{path:E(F),width:N,height:$,transformOrigin:`${N/2} ${$/2}`,instructions:F}},n$=A({height:B({defaultValue:100,description:"Height",min:0}),aspectRatio:B({defaultValue:1.1,description:"Aspect Ratio",min:0,step:0.01}),bottomRoundnessAdjustment:B({defaultValue:0,description:"Bottom Roundness Adjustment",step:0.01}),depthAdjustment:B({defaultValue:0,description:"Depth Adjustment",step:0.01})}),t$=({aspectRatio:$,height:G,bottomRoundnessAdjustment:J=0,depthAdjustment:Z=0,...N})=>{return i$(L,{defaultName:"<Heart>",documentationLink:"https://www.remotion.dev/docs/shapes/heart",...e$({aspectRatio:$,height:G,bottomRoundnessAdjustment:J,depthAdjustment:Z}),...N})},$G=s$.withSchema({Component:t$,componentName:"<Heart>",componentIdentity:"dev.remotion.shapes.Heart",schema:n$,supportsEffects:!0});r$.addSequenceStackTraces($G);var x=({counterClockwise:$,actualProgress:G,rotation:J,radius:Z,coord:N})=>{let K=$?-1:1,U=Math[N==="x"?"cos":"sin"](K*G*Math.PI*2+Math.PI*1.5+J)*Z+Z;return Math.round(U*1e5)/1e5},U0=({progress:$,radius:G,closePath:J=!0,counterClockwise:Z=!1,rotation:N=0})=>{let K=Math.min(Math.max($,0),1),U=x({actualProgress:K,coord:"x",counterClockwise:Z,radius:G,rotation:N}),Q=x({actualProgress:K,coord:"y",counterClockwise:Z,radius:G,rotation:N}),O={x:x({actualProgress:0,coord:"x",counterClockwise:Z,radius:G,rotation:N}),y:x({actualProgress:0,coord:"y",counterClockwise:Z,radius:G,rotation:N})},H={x:U,y:Q},q=[{type:"M",...O},{type:"A",rx:G,ry:G,xAxisRotation:0,largeArcFlag:!1,sweepFlag:!Z,x:K<=0.5?U:x({actualProgress:0.5,coord:"x",counterClockwise:Z,radius:G,rotation:N}),y:K<=0.5?Q:x({actualProgress:0.5,coord:"y",counterClockwise:Z,radius:G,rotation:N})},K>0.5?{type:"A",rx:G,ry:G,xAxisRotation:0,largeArcFlag:!1,sweepFlag:!Z,...H}:null,K>0&&K<1&&J?{type:"L",x:G,y:G}:null,J?{type:"Z"}:null].filter(Boolean),M=E(q);return{height:G*2,width:G*2,path:M,instructions:q,transformOrigin:`${G} ${G}`}},KG=A({radius:B({defaultValue:100,description:"Radius",min:0}),progress:B({defaultValue:0.5,description:"Progress",max:1,min:0,step:0.01}),closePath:W0({defaultValue:!0,description:"Close Path"}),counterClockwise:W0({defaultValue:!1,description:"Counter Clockwise"}),rotation:B({defaultValue:0,description:"Rotation",step:0.01})}),NG=({radius:$,progress:G,closePath:J,counterClockwise:Z,rotation:N,...K})=>{return ZG(L,{defaultName:"<Pie>",documentationLink:"https://www.remotion.dev/docs/shapes/pie",...U0({radius:$,progress:G,closePath:J,counterClockwise:Z,rotation:N}),...K})},UG=JG.withSchema({Component:NG,componentName:"<Pie>",componentIdentity:"dev.remotion.shapes.Pie",schema:KG,supportsEffects:!0});GG.addSequenceStackTraces(UG);function OG({points:$,radius:G,centerX:J,centerY:Z,cornerRadius:N,edgeRoundness:K}){let U=Math.PI*2/$,Q=Array($).fill(0).map((O,H)=>{let q=U*H-Math.PI/2,M={x:J+G*Math.cos(q),y:Z+G*Math.sin(q)};return[M.x,M.y]});return g([...Q,Q[0]],{edgeRoundness:K,cornerRadius:N,roundCornerStrategy:N>0?"bezier":"arc"})}var qG=({points:$,radius:G,cornerRadius:J=0,edgeRoundness:Z=null})=>{if($<3)throw Error(`"points" should be minimum 3, got ${$}`);let N=2*G,K=2*G,U=N/2,Q=K/2,O=OG({points:$,radius:G,centerX:U,centerY:Q,cornerRadius:J,edgeRoundness:Z}),H=p(O),q=d(E(H)),M=a.getBoundingBoxFromInstructions(H);return{path:q,width:M.width,height:M.height,transformOrigin:`${U} ${Q}`,instructions:O}},jG=A({points:B({defaultValue:5,description:"Points",min:3,step:1}),radius:B({defaultValue:100,description:"Radius",min:0}),cornerRadius:B({defaultValue:0,description:"Corner Radius",min:0})}),VG=({points:$,radius:G,cornerRadius:J,edgeRoundness:Z,...N})=>{return MG(L,{defaultName:"<Polygon>",documentationLink:"https://www.remotion.dev/docs/shapes/polygon",...qG({points:$,cornerRadius:J,edgeRoundness:Z,radius:G}),...N})},BG=HG.withSchema({Component:VG,componentName:"<Polygon>",componentIdentity:"dev.remotion.shapes.Polygon",schema:jG,supportsEffects:!0});QG.addSequenceStackTraces(BG);var EG=({width:$,height:G,edgeRoundness:J=null,cornerRadius:Z=0})=>{let N=[$/2,G/2],K=[...g([[Z,0],[$,0],[$,G],[0,G],[0,0]],{edgeRoundness:J,cornerRadius:Z,roundCornerStrategy:"arc"}),{type:"Z"}],U=E(K);return{width:$,height:G,instructions:K,path:U,transformOrigin:N.join(" ")}},TG=A({width:B({defaultValue:100,description:"Width",min:0}),height:B({defaultValue:100,description:"Height",min:0}),cornerRadius:B({defaultValue:0,description:"Corner Radius",min:0})}),WG=({width:$,edgeRoundness:G,height:J,cornerRadius:Z,...N})=>{return DG(L,{defaultName:"<Rect>",documentationLink:"https://www.remotion.dev/docs/shapes/rect",...EG({height:J,width:$,edgeRoundness:G,cornerRadius:Z}),...N})},kG=FG.withSchema({Component:WG,componentName:"<Rect>",componentIdentity:"dev.remotion.shapes.Rect",schema:TG,supportsEffects:!0});zG.addSequenceStackTraces(kG);var _0=0.5522847498307936,b=1.3333333333333333,R=({to:$,cp1:G,cp2:J})=>{return{type:"C",cp1x:G[0],cp1y:G[1],cp2x:J[0],cp2y:J[1],x:$[0],y:$[1]}},r=({from:$,to:G,radius:J,direction:Z})=>{if(Z==="top")return R({to:G,cp1:[$[0],$[1]-J*b],cp2:[G[0],G[1]-J*b]});if(Z==="right")return R({to:G,cp1:[$[0]+J*b,$[1]],cp2:[G[0]+J*b,G[1]]});if(Z==="bottom")return R({to:G,cp1:[$[0],$[1]+J*b],cp2:[G[0],G[1]+J*b]});return R({to:G,cp1:[$[0]-J*b,$[1]],cp2:[G[0]-J*b,G[1]]})},s=({from:$,to:G,edgeRoundness:J,direction:Z})=>{let N=G[0]-$[0],K=G[1]-$[1],U=Math.abs(N)*_0*J,Q=Math.abs(K)*_0*J;if(Z==="top-right")return R({to:G,cp1:[$[0],$[1]+Q],cp2:[G[0]-U,G[1]]});if(Z==="right-bottom")return R({to:G,cp1:[$[0]-U,$[1]],cp2:[G[0],G[1]-Q]});if(Z==="bottom-left")return R({to:G,cp1:[$[0],$[1]-Q],cp2:[G[0]+U,G[1]]});return R({to:G,cp1:[$[0]+U,$[1]],cp2:[G[0],G[1]+Q]})},_G=({cornerRadius:$,width:G,height:J})=>{return Math.min(Math.max($,0),G/2,J/2)},XG=({width:$,height:G,edgeRoundness:J=1,cornerRadius:Z=0})=>{let N=$/2,K=G/2,U=_G({cornerRadius:Z,width:$,height:G}),Q=[N,0],O=[$,K],H=[N,G],q=[0,K],M=U===0?Q:[N+U,U],j=U===0?O:[$-U,K-U],V=U===0?O:[$-U,K+U],F=U===0?H:[N+U,G-U],k=U===0?H:[N-U,G-U],T=U===0?q:[U,K+U],D=U===0?q:[U,K-U],I=U===0?Q:[N-U,U],z=[{type:"M",x:M[0],y:M[1]},s({from:M,to:j,edgeRoundness:J,direction:"top-right"})];if(U>0)z.push(r({from:j,to:V,radius:U,direction:"right"}));if(z.push(s({from:V,to:F,edgeRoundness:J,direction:"right-bottom"})),U>0)z.push(r({from:F,to:k,radius:U,direction:"bottom"}));if(z.push(s({from:k,to:T,edgeRoundness:J,direction:"bottom-left"})),U>0)z.push(r({from:T,to:D,radius:U,direction:"left"}));if(z.push(s({from:D,to:I,edgeRoundness:J,direction:"left-top"})),U>0)z.push(r({from:I,to:M,radius:U,direction:"top"}));return z.push({type:"Z"}),{path:E(z),width:$,height:G,transformOrigin:`${N} ${K}`,instructions:z}},wG=A({width:B({defaultValue:100,description:"Width",min:0}),height:B({defaultValue:140,description:"Height",min:0}),edgeRoundness:B({defaultValue:1,description:"Edge Roundness",min:0,step:0.01}),cornerRadius:B({defaultValue:0,description:"Corner Radius",min:0})}),CG=({width:$,height:G,edgeRoundness:J,cornerRadius:Z,...N})=>{return YG(L,{defaultName:"<Spark>",documentationLink:"https://www.remotion.dev/docs/shapes/spark",...XG({width:$,height:G,edgeRoundness:J,cornerRadius:Z}),...N})},LG=SG.withSchema({Component:CG,componentName:"<Spark>",componentIdentity:"dev.remotion.shapes.Spark",schema:wG,supportsEffects:!0});IG.addSequenceStackTraces(LG);var bG=({centerX:$,centerY:G,points:J,innerRadius:Z,outerRadius:N,cornerRadius:K,edgeRoundness:U})=>{let Q=Math.PI*2/(J*2),O=Array(J*2).fill(!0).map((H,q)=>{let M=q%2===0?N:Z,j=Q*q-Math.PI/2,V={x:$+M*Math.cos(j),y:G+M*Math.sin(j)};return[V.x,V.y]});return[...g([...O,O[0]],{edgeRoundness:U,cornerRadius:K,roundCornerStrategy:K>0?"bezier":"arc"}),{type:"Z"}]},RG=({points:$,innerRadius:G,outerRadius:J,cornerRadius:Z=0,edgeRoundness:N=null})=>{let K=J*2,U=J*2,Q=K/2,O=U/2,H=bG({centerX:Q,centerY:O,points:$,innerRadius:G,outerRadius:J,cornerRadius:Z,edgeRoundness:N}),q=p(H),M=d(E(q)),j=a.getBoundingBoxFromInstructions(q);return{path:M,width:j.width,height:j.height,transformOrigin:`${Q} ${O}`,instructions:H}},vG=A({points:B({defaultValue:5,description:"Points",min:3,step:1}),innerRadius:B({defaultValue:50,description:"Inner Radius",min:0}),outerRadius:B({defaultValue:100,description:"Outer Radius",min:0}),cornerRadius:B({defaultValue:0,description:"Corner Radius",min:0})}),yG=({innerRadius:$,outerRadius:G,points:J,cornerRadius:Z,edgeRoundness:N,...K})=>{return fG(L,{defaultName:"<Star>",documentationLink:"https://www.remotion.dev/docs/shapes/star",...RG({innerRadius:$,outerRadius:G,points:J,cornerRadius:Z,edgeRoundness:N}),...K})},xG=PG.withSchema({Component:yG,componentName:"<Star>",componentIdentity:"dev.remotion.shapes.Star",schema:vG,supportsEffects:!0});AG.addSequenceStackTraces(xG);var pG=({length:$,direction:G="right",edgeRoundness:J=null,cornerRadius:Z=0})=>{if(typeof $!=="number")throw Error(`"length" of a triangle must be a number, got ${JSON.stringify($)}`);let N=$,K=Math.sqrt($**2*0.75),U={up:[[N/2,0],[0,K],[N,K],[N/2,0]],right:[[0,0],[0,N],[K,N/2],[0,0]],down:[[0,0],[N,0],[N/2,K],[0,0]],left:[[K,0],[K,N],[0,N/2],[K,0]]},Q={left:K/3*2,right:K/3,up:N/2,down:N/2}[G],O={up:K/3*2,down:K/3,left:N/2,right:N/2}[G],H=[...g(U[G],{edgeRoundness:J,cornerRadius:Z,roundCornerStrategy:"bezier"}),{type:"Z"}];return{path:E(H),instructions:H,width:G==="up"||G==="down"?$:K,height:G==="up"||G==="down"?K:$,transformOrigin:`${Q} ${O}`}},mG=A({length:B({defaultValue:100,description:"Length",min:0}),direction:N0({defaultValue:"right",description:"Direction",variants:["right","left","up","down"]}),cornerRadius:B({defaultValue:0,description:"Corner Radius",min:0})}),dG=({length:$,direction:G,edgeRoundness:J,cornerRadius:Z,...N})=>{return gG(L,{defaultName:"<Triangle>",documentationLink:"https://www.remotion.dev/docs/shapes/triangle",...pG({length:$,direction:G,edgeRoundness:J,cornerRadius:Z}),...N})},aG=hG.withSchema({Component:dG,componentName:"<Triangle>",componentIdentity:"dev.remotion.shapes.Triangle",schema:mG,supportsEffects:!0});lG.addSequenceStackTraces(aG);import{useMemo as X0}from"react";import{AbsoluteFill as Y0}from"remotion";import{jsx as w0}from"react/jsx-runtime";var uG=({children:$,presentationDirection:G,presentationProgress:J,passedProps:Z})=>{let N=Math.sqrt(Z.width**2+Z.height**2)/2,{path:K}=U0({radius:N,progress:J}),U=Z0(K,-(N*2-Z.width)/2,-(N*2-Z.height)/2),Q=X0(()=>{return{width:"100%",height:"100%",clipPath:G==="exiting"?void 0:`path("${U}")`,...G==="entering"?Z.innerEnterStyle:Z.innerExitStyle}},[U,Z.innerEnterStyle,Z.innerExitStyle,G]),O=X0(()=>{return G==="entering"?Z.outerEnterStyle:Z.outerExitStyle},[Z.outerEnterStyle,Z.outerExitStyle,G]);return w0(Y0,{style:O,children:w0(Y0,{style:Q,children:$})})},cG=($)=>{return{component:uG,props:$??{}}};var{clockWipe:hJ}=e;var gJ=e;export{gJ as default,hJ as clockWipe};
@@ -0,0 +1 @@
1
+ var i=Object.defineProperty;var u=(r,e)=>{for(var n in e)i(r,n,{get:e[n],enumerable:!0,configurable:!0,set:(t)=>e[n]=()=>t})};var o={};u(o,{fade:()=>c});import{useMemo as x}from"react";import{AbsoluteFill as f}from"remotion";import{jsx as y}from"react/jsx-runtime";var a=({children:r,presentationDirection:e,presentationProgress:n,passedProps:t})=>{let l=e==="entering",m=x(()=>{return{opacity:l?n:t.shouldFadeOutExitingScene?1-n:1,...e==="entering"?t.enterStyle:t.exitStyle}},[l,t.enterStyle,t.exitStyle,t.shouldFadeOutExitingScene,e,n]);return y(f,{style:m,children:r})},c=(r)=>{return{component:a,props:r??{}}};var{fade:g}=o;var h=o;export{g as fade,h as default};
@@ -0,0 +1 @@
1
+ var y=Object.defineProperty;var R=(m,t)=>{for(var r in t)y(m,r,{get:t[r],enumerable:!0,configurable:!0,set:(o)=>t[r]=()=>o})};var a={};R(a,{flip:()=>c});import{useMemo as l}from"react";import{AbsoluteFill as g,interpolate as h}from"remotion";import{jsx as i}from"react/jsx-runtime";var _=({children:m,presentationDirection:t,presentationProgress:r,passedProps:{direction:o="from-left",perspective:f=1000,innerEnterStyle:s,innerExitStyle:p,outerEnterStyle:n,outerExitStyle:e}})=>{let d=l(()=>{let u=t==="entering"?h(r,[0,1],[o==="from-right"||o==="from-top"?180:-180,0]):h(r,[0,1],[0,o==="from-right"||o==="from-top"?-180:180]);return{width:"100%",height:"100%",transform:`${o==="from-top"||o==="from-bottom"?"rotateX":"rotateY"}(${u}deg)`,backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",...t==="entering"?s:p}},[o,s,p,t,r]),b=l(()=>{return{perspective:f,transformStyle:"preserve-3d",...t==="entering"?n:e}},[n,e,f,t]);return i(g,{style:b,children:i(g,{style:d,children:m})})},c=(m)=>{return{component:_,props:m??{}}};var{flip:w}=a;var B=a;export{w as flip,B as default};
@@ -0,0 +1 @@
1
+ var m=Object.defineProperty;var l=(r,e)=>{for(var t in e)m(r,t,{get:e[t],enumerable:!0,configurable:!0,set:(o)=>e[t]=()=>o})};var n={};l(n,{none:()=>f});import{useMemo as i}from"react";import{AbsoluteFill as x}from"remotion";import{jsx as u}from"react/jsx-runtime";var y=({children:r,presentationDirection:e,passedProps:t})=>{let o=i(()=>{return{...e==="entering"?t.enterStyle:t.exitStyle}},[t.enterStyle,t.exitStyle,e]);return u(x,{style:o,children:r})},f=(r)=>{return{component:y,props:r??{}}};var{none:_}=n;var v=n;export{_ as none,v as default};
@@ -0,0 +1 @@
1
+ var q=Object.defineProperty;var v=(f,_)=>{for(var d in _)q(f,d,{get:_[d],enumerable:!0,configurable:!0,set:(m)=>_[d]=()=>m})};var u={};v(u,{slide:()=>D});import{useMemo as j}from"react";import{AbsoluteFill as w}from"remotion";import{jsx as z}from"react/jsx-runtime";var A=0.01,B=({children:f,presentationProgress:_,presentationDirection:d,passedProps:{direction:m="from-left",enterStyle:y,exitStyle:a}})=>{let b=j(()=>{let x=_===1?_*100:_*100-A;if(d==="exiting")switch(m){case"from-left":return{transform:`translateX(${x}%)`};case"from-right":return{transform:`translateX(${-_*100}%)`};case"from-top":return{transform:`translateY(${x}%)`};case"from-bottom":return{transform:`translateY(${-_*100}%)`};default:throw Error(`Invalid direction: ${m}`)}switch(m){case"from-left":return{transform:`translateX(${-100+_*100}%)`};case"from-right":return{transform:`translateX(${100-x}%)`};case"from-top":return{transform:`translateY(${-100+_*100}%)`};case"from-bottom":return{transform:`translateY(${100-x}%)`};default:throw Error(`Invalid direction: ${m}`)}},[d,_,m]),k=j(()=>{return{width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...b,...d==="entering"?y:a}},[b,y,a,d]);return z(w,{style:k,children:f})},D=(f)=>{return{component:B,props:f??{}}};var{slide:J}=u;var L=u;export{J as slide,L as default};
@@ -0,0 +1 @@
1
+ var h=Object.defineProperty;var i=(t,r)=>{for(var o in r)h(t,o,{get:r[o],enumerable:!0,configurable:!0,set:(e)=>r[o]=()=>e})};var n={};i(n,{wipe:()=>k});import{useMemo as g}from"react";import{AbsoluteFill as a}from"remotion";import{jsx as c}from"react/jsx-runtime";var w=(t,r)=>{let o=t*100;switch(r){case"from-left":return`polygon(0% 0%, ${o}% 0%, ${o}% 100%, 0% 100%)`;case"from-top-left":return`polygon(0% 0%, ${o*2}% 0%, 0% ${o*2}%)`;case"from-top":return`polygon(0% 0%, 100% 0%, 100% ${o}%, 0% ${o}%)`;case"from-top-right":return`polygon(100% 0%, ${100-o*2}% 0%, 100% ${o*2}%)`;case"from-right":return`polygon(100% 0%, 100% 100%, ${100-o}% 100%, ${100-o}% 0%)`;case"from-bottom-right":return`polygon(100% 100%, ${100-o*2}% 100%, 100% ${100-o*2}%)`;case"from-bottom":return`polygon(0% 100%, 100% 100%, 100% ${100-o}%, 0% ${100-o}%)`;case"from-bottom-left":return`polygon(0% 100%, 0% ${100-o*2}%, ${o*2}% 100%)`;default:throw Error(`Unknown direction ${JSON.stringify(r)}`)}},b=(t,r)=>{let o=t*100;switch(r){case"from-left":return`polygon(100% 100%, ${100-o}% 100%, ${100-o}% 0%, 100% 0%)`;case"from-top-left":return`polygon(100% 100%, ${100-o*2}% 100%, 100% ${100-o*2}%)`;case"from-top":return`polygon(100% 100%, 0% 100%, 0% ${100-o}%, 100% ${100-o}%)`;case"from-top-right":return`polygon(0% 100%, ${o*2}% 100%, 0% ${100-o*2}%)`;case"from-right":return`polygon(0% 0%, ${o}% 0%, ${o}% 100%, 0% 100%)`;case"from-bottom-right":return`polygon(0% 0%, ${o*2}% 0%, 0% ${o*2}%)`;case"from-bottom":return`polygon(100% 0%, 0% 0%, 0% ${o}%, 100% ${o}%)`;case"from-bottom-left":return`polygon(100% 0%, ${100-o*2}% 0%, 100% ${o*2}%)`;default:throw Error(`Unknown direction ${JSON.stringify(r)}`)}},d=({children:t,presentationProgress:r,presentationDirection:o,passedProps:{direction:e="from-left",innerEnterStyle:s,innerExitStyle:m,outerEnterStyle:p,outerExitStyle:f}})=>{let $=o==="entering"?r:1-r,l=o==="entering"?w($,e):b($,e),u=g(()=>{return{width:"100%",height:"100%",justifyContent:"center",alignItems:"center",clipPath:l,...o==="entering"?s:m}},[l,s,m,o]),y=g(()=>{return o==="entering"?p:f},[p,f,o]);return c(a,{style:y,children:c(a,{style:u,children:t})})},k=(t)=>{return{component:d,props:t??{}}};var{wipe:I}=n;var j=n;export{I as wipe,j as default};
@@ -0,0 +1,28 @@
1
+ # Remotion license notice (ships alongside the pre-bundled Remotion runtime)
2
+
3
+ Maude's **video-comp** canvas kind bundles the Remotion runtime
4
+ (`remotion`, `@remotion/player`, `@remotion/transitions`) into the pre-built
5
+ `/_canvas-runtime/*.js` bundles in this directory. See
6
+ [DDR-148](../../../.ai/decisions/DDR-148-video-comp-remotion-authoring-capture-export.md).
7
+
8
+ **Remotion is source-available software — it is NOT MIT-licensed.** It is
9
+ free for individuals and for companies of up to 3 people (unlimited commercial
10
+ use). For-profit organizations of **4 or more people** need their own Remotion
11
+ Company License. That obligation attaches to **you** — the party that owns or
12
+ controls the Remotion code (the compositions live in *your* project), not to
13
+ Maude.
14
+
15
+ - License: <https://www.remotion.dev/docs/license>
16
+ - Company licensing / terms: <https://www.remotion.pro/license> ·
17
+ <https://www.remotion.pro/terms>
18
+ - FAQ (AI-generation carve-out, "what is an automation"):
19
+ <https://www.remotion.pro/faq>
20
+
21
+ Remotion explicitly permits AI-generated Remotion code and lets end-users edit
22
+ code a service initially generated — which is exactly how Maude authors
23
+ video-comps. Maude never ships `@remotion/renderer` or `@remotion/web-renderer`;
24
+ export runs through Maude's own capture spine (no renderer binaries, no
25
+ telemetry, no license key). See DDR-148 for the full posture.
26
+
27
+ © Remotion. This notice is a good-faith attribution + disclosure. The
28
+ authoritative license text lives at the URLs above.