{"ast":null,"code":"import { motionValue } from '../../value/index.js';\nimport { isMotionValue } from '../../value/utils/is-motion-value.js';\nfunction updateMotionValuesFromProps(element, next, prev) {\n  var _a;\n  for (var key in next) {\n    var nextValue = next[key];\n    var prevValue = prev[key];\n    if (isMotionValue(nextValue)) {\n      /**\n       * If this is a motion value found in props or style, we want to add it\n       * to our visual element's motion value map.\n       */\n      element.addValue(key, nextValue);\n    } else if (isMotionValue(prevValue)) {\n      /**\n       * If we're swapping to a new motion value, create a new motion value\n       * from that\n       */\n      element.addValue(key, motionValue(nextValue));\n    } else if (prevValue !== nextValue) {\n      /**\n       * If this is a flat value that has changed, update the motion value\n       * or create one if it doesn't exist. We only want to do this if we're\n       * not handling the value with our animation state.\n       */\n      if (element.hasValue(key)) {\n        var existingValue = element.getValue(key);\n        // TODO: Only update values that aren't being animated or even looked at\n        !existingValue.hasAnimated && existingValue.set(nextValue);\n      } else {\n        element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));\n      }\n    }\n  }\n  // Handle removed values\n  for (var key in prev) {\n    if (next[key] === undefined) element.removeValue(key);\n  }\n  return next;\n}\nexport { updateMotionValuesFromProps };","map":{"version":3,"names":["motionValue","isMotionValue","updateMotionValuesFromProps","element","next","prev","_a","key","nextValue","prevValue","addValue","hasValue","existingValue","getValue","hasAnimated","set","getStaticValue","undefined","removeValue"],"sources":["C:/ldt/LDT/Safemate_Management/node_modules/framer-motion/dist/es/render/utils/motion-values.js"],"sourcesContent":["import { motionValue } from '../../value/index.js';\nimport { isMotionValue } from '../../value/utils/is-motion-value.js';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n    var _a;\n    for (var key in next) {\n        var nextValue = next[key];\n        var prevValue = prev[key];\n        if (isMotionValue(nextValue)) {\n            /**\n             * If this is a motion value found in props or style, we want to add it\n             * to our visual element's motion value map.\n             */\n            element.addValue(key, nextValue);\n        }\n        else if (isMotionValue(prevValue)) {\n            /**\n             * If we're swapping to a new motion value, create a new motion value\n             * from that\n             */\n            element.addValue(key, motionValue(nextValue));\n        }\n        else if (prevValue !== nextValue) {\n            /**\n             * If this is a flat value that has changed, update the motion value\n             * or create one if it doesn't exist. We only want to do this if we're\n             * not handling the value with our animation state.\n             */\n            if (element.hasValue(key)) {\n                var existingValue = element.getValue(key);\n                // TODO: Only update values that aren't being animated or even looked at\n                !existingValue.hasAnimated && existingValue.set(nextValue);\n            }\n            else {\n                element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));\n            }\n        }\n    }\n    // Handle removed values\n    for (var key in prev) {\n        if (next[key] === undefined)\n            element.removeValue(key);\n    }\n    return next;\n}\n\nexport { updateMotionValuesFromProps };\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,sBAAsB;AAClD,SAASC,aAAa,QAAQ,sCAAsC;AAEpE,SAASC,2BAA2BA,CAACC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAE;EACtD,IAAIC,EAAE;EACN,KAAK,IAAIC,GAAG,IAAIH,IAAI,EAAE;IAClB,IAAII,SAAS,GAAGJ,IAAI,CAACG,GAAG,CAAC;IACzB,IAAIE,SAAS,GAAGJ,IAAI,CAACE,GAAG,CAAC;IACzB,IAAIN,aAAa,CAACO,SAAS,CAAC,EAAE;MAC1B;AACZ;AACA;AACA;MACYL,OAAO,CAACO,QAAQ,CAACH,GAAG,EAAEC,SAAS,CAAC;IACpC,CAAC,MACI,IAAIP,aAAa,CAACQ,SAAS,CAAC,EAAE;MAC/B;AACZ;AACA;AACA;MACYN,OAAO,CAACO,QAAQ,CAACH,GAAG,EAAEP,WAAW,CAACQ,SAAS,CAAC,CAAC;IACjD,CAAC,MACI,IAAIC,SAAS,KAAKD,SAAS,EAAE;MAC9B;AACZ;AACA;AACA;AACA;MACY,IAAIL,OAAO,CAACQ,QAAQ,CAACJ,GAAG,CAAC,EAAE;QACvB,IAAIK,aAAa,GAAGT,OAAO,CAACU,QAAQ,CAACN,GAAG,CAAC;Q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