{"ast":null,"code":"'use strict';\n\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _get from \"@babel/runtime/helpers/get\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nimport AnimatedInterpolation from \"./AnimatedInterpolation\";\nimport AnimatedWithChildren from \"./AnimatedWithChildren\";\nimport InteractionManager from \"../../../../exports/InteractionManager\";\nimport NativeAnimatedHelper from \"../NativeAnimatedHelper\";\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\nfunction _flush(rootNode) {\n var animatedStyles = new Set();\n function findAnimatedStyles(node) {\n if (typeof node.update === 'function') {\n animatedStyles.add(node);\n } else {\n node.__getChildren().forEach(findAnimatedStyles);\n }\n }\n findAnimatedStyles(rootNode);\n animatedStyles.forEach(function (animatedStyle) {\n return animatedStyle.update();\n });\n}\nvar AnimatedValue = function (_AnimatedWithChildren) {\n _inherits(AnimatedValue, _AnimatedWithChildren);\n var _super = _createSuper(AnimatedValue);\n function AnimatedValue(value) {\n var _this;\n _classCallCheck(this, AnimatedValue);\n _this = _super.call(this);\n if (typeof value !== 'number') {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n _this._startingValue = _this._value = value;\n _this._offset = 0;\n _this._animation = null;\n return _this;\n }\n _createClass(AnimatedValue, [{\n key: \"__detach\",\n value: function __detach() {\n var _this2 = this;\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), function (value) {\n _this2._value = value;\n });\n }\n this.stopAnimation();\n _get(_getPrototypeOf(AnimatedValue.prototype), \"__detach\", this).call(this);\n }\n }, {\n key: \"__getValue\",\n value: function __getValue() {\n return this._value + this._offset;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n if (this._animation) {\n this._animation.stop();\n this._animation = null;\n }\n this._updateValue(value, !this.__isNative);\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), value);\n }\n }\n }, {\n key: \"setOffset\",\n value: function setOffset(offset) {\n this._offset = offset;\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);\n }\n }\n }, {\n key: \"flattenOffset\",\n value: function flattenOffset() {\n this._value += this._offset;\n this._offset = 0;\n if (this.__isNative) {\n NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n }, {\n key: \"extractOffset\",\n value: function extractOffset() {\n this._offset += this._value;\n this._value = 0;\n if (this.__isNative) {\n NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n }, {\n key: \"stopAnimation\",\n value: function stopAnimation(callback) {\n this.stopTracking();\n this._animation && this._animation.stop();\n this._animation = null;\n callback && callback(this.__getValue());\n }\n }, {\n key: \"resetAnimation\",\n value: function resetAnimation(callback) {\n this.stopAnimation(callback);\n this._value = this._startingValue;\n }\n }, {\n key: \"_onAnimatedValueUpdateReceived\",\n value: function _onAnimatedValueUpdateReceived(value) {\n this._updateValue(value, false);\n }\n }, {\n key: \"interpolate\",\n value: function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n }, {\n key: \"animate\",\n value: function animate(animation, callback) {\n var _this3 = this;\n var handle = null;\n if (animation.__isInteraction) {\n handle = InteractionManager.createInteractionHandle();\n }\n var previousAnimation = this._animation;\n this._animation && this._animation.stop();\n this._animation = animation;\n animation.start(this._value, function (value) {\n _this3._updateValue(value, true);\n }, function (result) {\n _this3._animation = null;\n if (handle !== null) {\n InteractionManager.clearInteractionHandle(handle);\n }\n callback && callback(result);\n }, previousAnimation, this);\n }\n }, {\n key: \"stopTracking\",\n value: function stopTracking() {\n this._tracking && this._tracking.__detach();\n this._tracking = null;\n }\n }, {\n key: \"track\",\n value: function track(tracking) {\n this.stopTracking();\n this._tracking = tracking;\n }\n }, {\n key: \"_updateValue\",\n value: function _updateValue(value, flush) {\n if (value === undefined) {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n this._value = value;\n if (flush) {\n _flush(this);\n }\n _get(_getPrototypeOf(AnimatedValue.prototype), \"__callListeners\", this).call(this, this.__getValue());\n }\n }, {\n key: \"__getNativeConfig\",\n value: function __getNativeConfig() {\n return {\n type: 'value',\n value: this._value,\n offset: this._offset\n };\n }\n }]);\n return AnimatedValue;\n}(AnimatedWithChildren);\nexport default AnimatedValue;","map":{"version":3,"names":["AnimatedInterpolation","AnimatedWithChildren","InteractionManager","NativeAnimatedHelper","NativeAnimatedAPI","API","_flush","rootNode","animatedStyles","Set","findAnimatedStyles","node","update","add","__getChildren","forEach","animatedStyle","AnimatedValue","value","Error","_startingValue","_value","_offset","_animation","__isNative","getValue","__getNativeTag","stopAnimation","stop","_updateValue","setAnimatedNodeValue","offset","setAnimatedNodeOffset","flattenAnimatedNodeOffset","extractAnimatedNodeOffset","callback","stopTracking","__getValue","config","animation","handle","__isInteraction","createInteractionHandle","previousAnimation","start","result","clearInteractionHandle","_tracking","__detach","tracking","flush","undefined","type"],"sources":["/Users/mathildejean/Documents/BUT/LaSuperMeteo/LaSuperMeteo/iut-expo-starter/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValue.js"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport InteractionManager from '../../../../exports/InteractionManager';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\n/**\n * Animated works by building a directed acyclic graph of dependencies\n * transparently when you render your Animated components.\n *\n * new Animated.Value(0)\n * .interpolate() .interpolate() new Animated.Value(1)\n * opacity translateY scale\n * style transform\n * View#234 style\n * View#123\n *\n * A) Top Down phase\n * When an Animated.Value is updated, we recursively go down through this\n * graph in order to find leaf nodes: the views that we flag as needing\n * an update.\n *\n * B) Bottom Up phase\n * When a view is flagged as needing an update, we recursively go back up\n * in order to build the new value that it needs. The reason why we need\n * this two-phases process is to deal with composite props such as\n * transform which can receive values from multiple parents.\n */\n\nfunction _flush(rootNode) {\n var animatedStyles = new Set();\n\n function findAnimatedStyles(node) {\n /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.68 was deployed. To see the error delete this\n * comment and run Flow. */\n if (typeof node.update === 'function') {\n animatedStyles.add(node);\n } else {\n node.__getChildren().forEach(findAnimatedStyles);\n }\n }\n\n findAnimatedStyles(rootNode);\n /* $FlowFixMe */\n\n animatedStyles.forEach(animatedStyle => animatedStyle.update());\n}\n/**\n * Standard value for driving animations. One `Animated.Value` can drive\n * multiple properties in a synchronized fashion, but can only be driven by one\n * mechanism at a time. Using a new mechanism (e.g. starting a new animation,\n * or calling `setValue`) will stop any previous ones.\n *\n * See https://reactnative.dev/docs/animatedvalue.html\n */\n\n\nclass AnimatedValue extends AnimatedWithChildren {\n constructor(value) {\n super();\n\n if (typeof value !== 'number') {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n\n this._startingValue = this._value = value;\n this._offset = 0;\n this._animation = null;\n }\n\n __detach() {\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), value => {\n this._value = value;\n });\n }\n\n this.stopAnimation();\n\n super.__detach();\n }\n\n __getValue() {\n return this._value + this._offset;\n }\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#setvalue\n */\n\n\n setValue(value) {\n if (this._animation) {\n this._animation.stop();\n\n this._animation = null;\n }\n\n this._updateValue(value, !this.__isNative\n /* don't perform a flush for natively driven values */\n );\n\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), value);\n }\n }\n /**\n * Sets an offset that is applied on top of whatever value is set, whether via\n * `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#setoffset\n */\n\n\n setOffset(offset) {\n this._offset = offset;\n\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);\n }\n }\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#flattenoffset\n */\n\n\n flattenOffset() {\n this._value += this._offset;\n this._offset = 0;\n\n if (this.__isNative) {\n NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n /**\n * Sets the offset value to the base value, and resets the base value to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#extractoffset\n */\n\n\n extractOffset() {\n this._offset += this._value;\n this._value = 0;\n\n if (this.__isNative) {\n NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#stopanimation\n */\n\n\n stopAnimation(callback) {\n this.stopTracking();\n this._animation && this._animation.stop();\n this._animation = null;\n callback && callback(this.__getValue());\n }\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#resetanimation\n */\n\n\n resetAnimation(callback) {\n this.stopAnimation(callback);\n this._value = this._startingValue;\n }\n\n _onAnimatedValueUpdateReceived(value) {\n this._updateValue(value, false\n /*flush*/\n );\n }\n /**\n * Interpolates the value before updating the property, e.g. mapping 0-1 to\n * 0-10.\n */\n\n\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n /**\n * Typically only used internally, but could be used by a custom Animation\n * class.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#animate\n */\n\n\n animate(animation, callback) {\n var handle = null;\n\n if (animation.__isInteraction) {\n handle = InteractionManager.createInteractionHandle();\n }\n\n var previousAnimation = this._animation;\n this._animation && this._animation.stop();\n this._animation = animation;\n animation.start(this._value, value => {\n // Natively driven animations will never call into that callback, therefore we can always\n // pass flush = true to allow the updated value to propagate to native with setNativeProps\n this._updateValue(value, true\n /* flush */\n );\n }, result => {\n this._animation = null;\n\n if (handle !== null) {\n InteractionManager.clearInteractionHandle(handle);\n }\n\n callback && callback(result);\n }, previousAnimation, this);\n }\n /**\n * Typically only used internally.\n */\n\n\n stopTracking() {\n this._tracking && this._tracking.__detach();\n this._tracking = null;\n }\n /**\n * Typically only used internally.\n */\n\n\n track(tracking) {\n this.stopTracking();\n this._tracking = tracking;\n }\n\n _updateValue(value, flush) {\n if (value === undefined) {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n\n this._value = value;\n\n if (flush) {\n _flush(this);\n }\n\n super.__callListeners(this.__getValue());\n }\n\n __getNativeConfig() {\n return {\n type: 'value',\n value: this._value,\n offset: this._offset\n };\n }\n\n}\n\nexport default AnimatedValue;"],"mappings":"AASA,YAAY;;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEb,OAAOA,qBAAqB;AAC5B,OAAOC,oBAAoB;AAC3B,OAAOC,kBAAkB;AACzB,OAAOC,oBAAoB;AAC3B,IA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