{"version":3,"file":"static/js/412.chunk.js","mappings":"wKAOA,SAASA,IAIL,IAAIC,GAAa,EAKjB,MAAMC,EAAoB,GAIpBC,EAAc,IAAIC,IAClBC,EAAW,CACbC,UAAUC,IACNJ,EAAYK,IAAID,GACT,KAAWJ,EAAYM,OAAOF,EAAc,GAEvDG,KAAAA,CAAMC,EAAYC,GAOd,GAAIX,EAAY,CACZ,MAAMY,EAAa,GAMnB,OALAV,EAAYW,SAASP,IACjBM,EAAWE,MAAKC,EAAAA,EAAAA,IAAqBT,EAAeI,EAAY,CAC5DC,uBACD,IAEAK,QAAQC,IAAIL,EACvB,CAEI,OAAO,IAAII,SAASE,IAChBjB,EAAkBa,KAAK,CACnBK,UAAW,CAACT,EAAYC,GACxBO,WACF,GAGd,EACAE,IAAIV,KACAW,EAAAA,EAAAA,GAAUrB,EAAY,iHACfE,EAAYW,SAASP,KACxBgB,EAAAA,EAAAA,IAAUhB,EAAeI,EAAW,KAG5Ca,IAAAA,GACIrB,EAAYW,SAASP,KACjBkB,EAAAA,EAAAA,IAAclB,EAAc,GAEpC,EACAmB,MAAKA,KACDzB,GAAa,EACbC,EAAkBY,SAAQa,IAA4B,IAA3B,UAAEP,EAAS,QAAED,GAASQ,EAC7CtB,EAASK,SAASU,GAAWQ,KAAKT,EAAQ,IAEvC,KACHlB,GAAa,EACbI,EAASmB,MAAM,IAI3B,OAAOnB,CACX,C,wBCpCA,MAAMwB,EALN,WACI,MAAMxB,GAAWyB,EAAAA,EAAAA,GAAY9B,GAE7B,OADA+B,EAAAA,EAAAA,WAAU1B,EAASqB,MAAO,IACnBrB,CACX,C","sources":["../node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs","../node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs"],"sourcesContent":["import { invariant } from 'hey-listen';\nimport { stopAnimation, animateVisualElement } from '../../render/utils/animation.mjs';\nimport { setValues } from '../../render/utils/setters.mjs';\n\n/**\n * @public\n */\nfunction animationControls() {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false;\n /**\n * Pending animations that are started before a component is mounted.\n * TODO: Remove this as animations should only run in effects\n */\n const pendingAnimations = [];\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set();\n const controls = {\n subscribe(visualElement) {\n subscribers.add(visualElement);\n return () => void subscribers.delete(visualElement);\n },\n start(definition, transitionOverride) {\n /**\n * TODO: We only perform this hasMounted check because in Framer we used to\n * encourage the ability to start an animation within the render phase. This\n * isn't behaviour concurrent-safe so when we make Framer concurrent-safe\n * we can ditch this.\n */\n if (hasMounted) {\n const animations = [];\n subscribers.forEach((visualElement) => {\n animations.push(animateVisualElement(visualElement, definition, {\n transitionOverride,\n }));\n });\n return Promise.all(animations);\n }\n else {\n return new Promise((resolve) => {\n pendingAnimations.push({\n animation: [definition, transitionOverride],\n resolve,\n });\n });\n }\n },\n set(definition) {\n invariant(hasMounted, \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition);\n });\n },\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement);\n });\n },\n mount() {\n hasMounted = true;\n pendingAnimations.forEach(({ animation, resolve }) => {\n controls.start(...animation).then(resolve);\n });\n return () => {\n hasMounted = false;\n controls.stop();\n };\n },\n };\n return controls;\n}\n\nexport { animationControls };\n","import { animationControls } from './animation-controls.mjs';\nimport { useEffect } from 'react';\nimport { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * Creates `AnimationControls`, which can be used to manually start, stop\n * and sequence animations on one or more components.\n *\n * The returned `AnimationControls` should be passed to the `animate` property\n * of the components you want to animate.\n *\n * These components can then be animated with the `start` method.\n *\n * ```jsx\n * import * as React from 'react'\n * import { motion, useAnimation } from 'framer-motion'\n *\n * export function MyComponent(props) {\n * const controls = useAnimation()\n *\n * controls.start({\n * x: 100,\n * transition: { duration: 0.5 },\n * })\n *\n * return \n * }\n * ```\n *\n * @returns Animation controller with `start` and `stop` methods\n *\n * @public\n */\nfunction useAnimationControls() {\n const controls = useConstant(animationControls);\n useEffect(controls.mount, []);\n return controls;\n}\nconst useAnimation = useAnimationControls;\n\nexport { useAnimation, useAnimationControls };\n"],"names":["animationControls","hasMounted","pendingAnimations","subscribers","Set","controls","subscribe","visualElement","add","delete","start","definition","transitionOverride","animations","forEach","push","animateVisualElement","Promise","all","resolve","animation","set","invariant","setValues","stop","stopAnimation","mount","_ref","then","useAnimation","useConstant","useEffect"],"sourceRoot":""}