{"ast":null,"code":"'use strict';\n\nimport AnimatedValue from \"./AnimatedValue\";\nimport AnimatedWithChildren from \"./AnimatedWithChildren\";\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\nclass AnimatedValueXY extends AnimatedWithChildren {\n  constructor(valueIn) {\n    super();\n    var value = valueIn || {\n      x: 0,\n      y: 0\n    };\n    if (typeof value.x === 'number' && typeof value.y === 'number') {\n      this.x = new AnimatedValue(value.x);\n      this.y = new AnimatedValue(value.y);\n    } else {\n      invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initialized with an object of numbers or ' + 'AnimatedValues.');\n      this.x = value.x;\n      this.y = value.y;\n    }\n    this._listeners = {};\n  }\n  setValue(value) {\n    this.x.setValue(value.x);\n    this.y.setValue(value.y);\n  }\n  setOffset(offset) {\n    this.x.setOffset(offset.x);\n    this.y.setOffset(offset.y);\n  }\n  flattenOffset() {\n    this.x.flattenOffset();\n    this.y.flattenOffset();\n  }\n  extractOffset() {\n    this.x.extractOffset();\n    this.y.extractOffset();\n  }\n  __getValue() {\n    return {\n      x: this.x.__getValue(),\n      y: this.y.__getValue()\n    };\n  }\n  resetAnimation(callback) {\n    this.x.resetAnimation();\n    this.y.resetAnimation();\n    callback && callback(this.__getValue());\n  }\n  stopAnimation(callback) {\n    this.x.stopAnimation();\n    this.y.stopAnimation();\n    callback && callback(this.__getValue());\n  }\n  addListener(callback) {\n    var id = String(_uniqueId++);\n    var jointCallback = _ref => {\n      var number = _ref.value;\n      callback(this.__getValue());\n    };\n    this._listeners[id] = {\n      x: this.x.addListener(jointCallback),\n      y: this.y.addListener(jointCallback)\n    };\n    return id;\n  }\n  removeListener(id) {\n    this.x.removeListener(this._listeners[id].x);\n    this.y.removeListener(this._listeners[id].y);\n    delete this._listeners[id];\n  }\n  removeAllListeners() {\n    this.x.removeAllListeners();\n    this.y.removeAllListeners();\n    this._listeners = {};\n  }\n  getLayout() {\n    return {\n      left: this.x,\n      top: this.y\n    };\n  }\n  getTranslateTransform() {\n    return [{\n      translateX: this.x\n    }, {\n      translateY: this.y\n    }];\n  }\n}\nexport default AnimatedValueXY;","map":{"version":3,"names":["AnimatedValue","AnimatedWithChildren","invariant","_uniqueId","AnimatedValueXY","constructor","valueIn","value","x","y","_listeners","setValue","setOffset","offset","flattenOffset","extractOffset","__getValue","resetAnimation","callback","stopAnimation","addListener","id","String","jointCallback","_ref","number","removeListener","removeAllListeners","getLayout","left","top","getTranslateTransform","translateX","translateY"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValueXY.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\n'use strict';\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\n\n/**\n * 2D Value for driving 2D animations, such as pan gestures. Almost identical\n * API to normal `Animated.Value`, but multiplexed.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html\n */\nclass AnimatedValueXY extends AnimatedWithChildren {\n  constructor(valueIn) {\n    super();\n    var value = valueIn || {\n      x: 0,\n      y: 0\n    }; // fixme: shouldn't need `: any`\n    if (typeof value.x === 'number' && typeof value.y === 'number') {\n      this.x = new AnimatedValue(value.x);\n      this.y = new AnimatedValue(value.y);\n    } else {\n      invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initialized with an object of numbers or ' + 'AnimatedValues.');\n      this.x = value.x;\n      this.y = value.y;\n    }\n    this._listeners = {};\n  }\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/animatedvaluexy.html#setvalue\n   */\n  setValue(value) {\n    this.x.setValue(value.x);\n    this.y.setValue(value.y);\n  }\n\n  /**\n   * Sets an offset that is applied on top of whatever value is set, whether\n   * via `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/animatedvaluexy.html#setoffset\n   */\n  setOffset(offset) {\n    this.x.setOffset(offset.x);\n    this.y.setOffset(offset.y);\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/animatedvaluexy.html#flattenoffset\n   */\n  flattenOffset() {\n    this.x.flattenOffset();\n    this.y.flattenOffset();\n  }\n\n  /**\n   * Sets the offset value to the base value, and resets the base value to\n   * zero. The final output of the value is unchanged.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#extractoffset\n   */\n  extractOffset() {\n    this.x.extractOffset();\n    this.y.extractOffset();\n  }\n  __getValue() {\n    return {\n      x: this.x.__getValue(),\n      y: this.y.__getValue()\n    };\n  }\n\n  /**\n   * Stops any animation and resets the value to its original.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#resetanimation\n   */\n  resetAnimation(callback) {\n    this.x.resetAnimation();\n    this.y.resetAnimation();\n    callback && callback(this.__getValue());\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/animatedvaluexy.html#stopanimation\n   */\n  stopAnimation(callback) {\n    this.x.stopAnimation();\n    this.y.stopAnimation();\n    callback && callback(this.__getValue());\n  }\n\n  /**\n   * Adds an asynchronous listener to the value so you can observe updates from\n   * animations.  This is useful because there is no way to synchronously read\n   * the value because it might be driven natively.\n   *\n   * Returns a string that serves as an identifier for the listener.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#addlistener\n   */\n  addListener(callback) {\n    var id = String(_uniqueId++);\n    var jointCallback = _ref => {\n      var number = _ref.value;\n      callback(this.__getValue());\n    };\n    this._listeners[id] = {\n      x: this.x.addListener(jointCallback),\n      y: this.y.addListener(jointCallback)\n    };\n    return id;\n  }\n\n  /**\n   * Unregister a listener. The `id` param shall match the identifier\n   * previously returned by `addListener()`.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#removelistener\n   */\n  removeListener(id) {\n    this.x.removeListener(this._listeners[id].x);\n    this.y.removeListener(this._listeners[id].y);\n    delete this._listeners[id];\n  }\n\n  /**\n   * Remove all registered listeners.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners\n   */\n  removeAllListeners() {\n    this.x.removeAllListeners();\n    this.y.removeAllListeners();\n    this._listeners = {};\n  }\n\n  /**\n   * Converts `{x, y}` into `{left, top}` for use in style.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#getlayout\n   */\n  getLayout() {\n    return {\n      left: this.x,\n      top: this.y\n    };\n  }\n\n  /**\n   * Converts `{x, y}` into a useable translation transform.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform\n   */\n  getTranslateTransform() {\n    return [{\n      translateX: this.x\n    }, {\n      translateY: this.y\n    }];\n  }\n}\nexport default AnimatedValueXY;"],"mappings":"AAUA,YAAY;;AAEZ,OAAOA,aAAa;AACpB,OAAOC,oBAAoB;AAC3B,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,IAAIC,SAAS,GAAG,CAAC;AAQjB,MAAMC,eAAe,SAASH,oBAAoB,CAAC;EACjDI,WAAWA,CAACC,OAAO,EAAE;IACnB,KAAK,CAAC,CAAC;IACP,IAAIC,KAAK,GAAGD,OAAO,IAAI;MACrBE,CAAC,EAAE,CAAC;MACJC,CAAC,EAAE;IACL,CAAC;IACD,IAAI,OAAOF,KAAK,CAACC,CAAC,KAAK,QAAQ,IAAI,OAAOD,KAAK,CAACE,CAAC,KAAK,QAAQ,EAAE;MAC9D,IAAI,CAACD,CAAC,GAAG,IAAIR,aAAa,CAACO,KAAK,CAACC,CAAC,CAAC;MACnC,IAAI,CAACC,CAAC,GAAG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AkB,SAASA,CAAA,EAAG;IACV,OAAO;MACLC,IAAI,EAAE,IAAI,CAACrB,CAAC;MACZsB,GAAG,EAAE,IAAI,CAACrB;IACZ,CAAC;EACH;EAOAsB,qBAAqBA,CAAA,EAAG;IACtB,OAAO,CAAC;MACNC,UAAU,EAAE,IAAI,CAACxB;IACnB,CAAC,EAAE;MACDyB,UAAU,EAAE,IAAI,CAACxB;IACnB,CAAC,CAAC;EACJ;AACF;AACA,eAAeL,eAAe","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}