{"ast":null,"code":"import { __read } from 'tslib';\nimport { useContext, useState, useEffect } from 'react';\nimport { motionValue } from './index.js';\nimport { MotionConfigContext } from '../context/MotionConfigContext.js';\nimport { useConstant } from '../utils/use-constant.js';\n\n/**\n * Creates a `MotionValue` to track the state and velocity of a value.\n *\n * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.\n *\n * @library\n *\n * ```jsx\n * export function MyComponent() {\n *   const scale = useMotionValue(1)\n *\n *   return <Frame scale={scale} />\n * }\n * ```\n *\n * @motion\n *\n * ```jsx\n * export const MyComponent = () => {\n *   const scale = useMotionValue(1)\n *\n *   return <motion.div style={{ scale }} />\n * }\n * ```\n *\n * @param initial - The initial state.\n *\n * @public\n */\nfunction useMotionValue(initial) {\n  var value = useConstant(function () {\n    return motionValue(initial);\n  });\n  /**\n   * If this motion value is being used in static mode, like on\n   * the Framer canvas, force components to rerender when the motion\n   * value is updated.\n   */\n  var isStatic = useContext(MotionConfigContext).isStatic;\n  if (isStatic) {\n    var _a = __read(useState(initial), 2),\n      setLatest_1 = _a[1];\n    useEffect(function () {\n      return value.onChange(setLatest_1);\n    }, []);\n  }\n  return value;\n}\nexport { useMotionValue };","map":{"version":3,"names":["__read","useContext","useState","useEffect","motionValue","MotionConfigContext","useConstant","useMotionValue","initial","value","isStatic","_a","setLatest_1","onChange"],"sources":["C:/LDT/DSP_Management/node_modules/framer-motion/dist/es/value/use-motion-value.js"],"sourcesContent":["import { __read } from 'tslib';\nimport { useContext, useState, useEffect } from 'react';\nimport { motionValue } from './index.js';\nimport { MotionConfigContext } from '../context/MotionConfigContext.js';\nimport { useConstant } from '../utils/use-constant.js';\n\n/**\n * Creates a `MotionValue` to track the state and velocity of a value.\n *\n * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.\n *\n * @library\n *\n * ```jsx\n * export function MyComponent() {\n *   const scale = useMotionValue(1)\n *\n *   return <Frame scale={scale} />\n * }\n * ```\n *\n * @motion\n *\n * ```jsx\n * export const MyComponent = () => {\n *   const scale = useMotionValue(1)\n *\n *   return <motion.div style={{ scale }} />\n * }\n * ```\n *\n * @param initial - The initial state.\n *\n * @public\n */\nfunction useMotionValue(initial) {\n    var value = useConstant(function () { return motionValue(initial); });\n    /**\n     * If this motion value is being used in static mode, like on\n     * the Framer canvas, force components to rerender when the motion\n     * value is updated.\n     */\n    var isStatic = useContext(MotionConfigContext).isStatic;\n    if (isStatic) {\n        var _a = __read(useState(initial), 2), setLatest_1 = _a[1];\n        useEffect(function () { return value.onChange(setLatest_1); }, []);\n    }\n    return value;\n}\n\nexport { useMotionValue };\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,UAAU,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AACvD,SAASC,WAAW,QAAQ,YAAY;AACxC,SAASC,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,WAAW,QAAQ,0BAA0B;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAACC,OAAO,EAAE;EAC7B,IAAIC,KAAK,GAAGH,WAAW,CAAC,YAAY;IAAE,OAAOF,WAAW,CAACI,OAAO,CAAC;EAAE,CAAC,CAAC;EACrE;AACJ;AACA;AACA;AACA;EACI,IAAIE,QAAQ,GAAGT,UAAU,CAACI,mBAAmB,CAAC,CAACK,QAAQ;EACvD,IAAIA,QAAQ,EAAE;IACV,IAAIC,EAAE,GAAGX,MAAM,CAACE,QAAQ,CAACM,OAAO,CAAC,EAAE,CAAC,CAAC;MAAEI,WAAW,GAAGD,EAAE,CAAC,CAAC,CAAC;IAC1DR,SAAS,CAAC,YAAY;MAAE,OAAOM,KAAK,CAACI,QAAQ,CAACD,WAAW,CAAC;IAAE,CAAC,EAAE,EAAE,CAAC;EACtE;EACA,OAAOH,KAAK;AAChB;AAEA,SAASF,cAAc","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}