{"ast":null,"code":"'use strict';\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n\n  _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nimport AnimatedValue from \"./AnimatedValue\";\nimport AnimatedWithChildren from \"./AnimatedWithChildren\";\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\n\nvar AnimatedValueXY = function (_AnimatedWithChildren) {\n  _inheritsLoose(AnimatedValueXY, _AnimatedWithChildren);\n\n  function AnimatedValueXY(valueIn) {\n    var _this;\n\n    _this = _AnimatedWithChildren.call(this) || this;\n    var value = valueIn || {\n      x: 0,\n      y: 0\n    };\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\n    _this._listeners = {};\n    return _this;\n  }\n\n  var _proto = AnimatedValueXY.prototype;\n\n  _proto.setValue = function setValue(value) {\n    this.x.setValue(value.x);\n    this.y.setValue(value.y);\n  };\n\n  _proto.setOffset = function setOffset(offset) {\n    this.x.setOffset(offset.x);\n    this.y.setOffset(offset.y);\n  };\n\n  _proto.flattenOffset = function flattenOffset() {\n    this.x.flattenOffset();\n    this.y.flattenOffset();\n  };\n\n  _proto.extractOffset = function extractOffset() {\n    this.x.extractOffset();\n    this.y.extractOffset();\n  };\n\n  _proto.__getValue = function __getValue() {\n    return {\n      x: this.x.__getValue(),\n      y: this.y.__getValue()\n    };\n  };\n\n  _proto.resetAnimation = function resetAnimation(callback) {\n    this.x.resetAnimation();\n    this.y.resetAnimation();\n    callback && callback(this.__getValue());\n  };\n\n  _proto.stopAnimation = function stopAnimation(callback) {\n    this.x.stopAnimation();\n    this.y.stopAnimation();\n    callback && callback(this.__getValue());\n  };\n\n  _proto.addListener = function addListener(callback) {\n    var _this2 = this;\n\n    var id = String(_uniqueId++);\n\n    var jointCallback = function jointCallback(_ref) {\n      var number = _ref.value;\n      callback(_this2.__getValue());\n    };\n\n    this._listeners[id] = {\n      x: this.x.addListener(jointCallback),\n      y: this.y.addListener(jointCallback)\n    };\n    return id;\n  };\n\n  _proto.removeListener = function 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  _proto.removeAllListeners = function removeAllListeners() {\n    this.x.removeAllListeners();\n    this.y.removeAllListeners();\n    this._listeners = {};\n  };\n\n  _proto.getLayout = function getLayout() {\n    return {\n      left: this.x,\n      top: this.y\n    };\n  };\n\n  _proto.getTranslateTransform = function getTranslateTransform() {\n    return [{\n      translateX: this.x\n    }, {\n      translateY: this.y\n    }];\n  };\n\n  return AnimatedValueXY;\n}(AnimatedWithChildren);\n\nexport default AnimatedValueXY;","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValueXY.js"],"names":["_inheritsLoose","subClass","superClass","prototype","Object","create","constructor","_setPrototypeOf","o","p","setPrototypeOf","__proto__","AnimatedValue","AnimatedWithChildren","invariant","_uniqueId","AnimatedValueXY","_AnimatedWithChildren","valueIn","_this","call","value","x","y","_listeners","_proto","setValue","setOffset","offset","flattenOffset","extractOffset","__getValue","resetAnimation","callback","stopAnimation","addListener","_this2","id","String","jointCallback","_ref","number","removeListener","removeAllListeners","getLayout","left","top","getTranslateTransform","translateX","translateY"],"mappings":"AASA;;AAEA,SAASA,cAAT,CAAwBC,QAAxB,EAAkCC,UAAlC,EAA8C;AAAED,EAAAA,QA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oBf,CAA1C;AACA,SAAKC,CAAL,CAAOmB,cAAP,CAAsB,KAAKlB,UAAL,CAAgBa,EAAhB,EAAoBd,CAA1C;AACA,WAAO,KAAKC,UAAL,CAAgBa,EAAhB,CAAP;AACD,GAJD;;AAYAZ,EAAAA,MAAM,CAACkB,kBAAP,GAA4B,SAASA,kBAAT,GAA8B;AACxD,SAAKrB,CAAL,CAAOqB,kBAAP;AACA,SAAKpB,CAAL,CAAOoB,kBAAP;AACA,SAAKnB,UAAL,GAAkB,EAAlB;AACD,GAJD;;AAYAC,EAAAA,MAAM,CAACmB,SAAP,GAAmB,SAASA,SAAT,GAAqB;AACtC,WAAO;AACLC,MAAAA,IAAI,EAAE,KAAKvB,CADN;AAELwB,MAAAA,GAAG,EAAE,KAAKvB;AAFL,KAAP;AAID,GALD;;AAaAE,EAAAA,MAAM,CAACsB,qBAAP,GAA+B,SAASA,qBAAT,GAAiC;AAC9D,WAAO,CAAC;AACNC,MAAAA,UAAU,EAAE,KAAK1B;AADX,KAAD,EAEJ;AACD2B,MAAAA,UAAU,EAAE,KAAK1B;AADhB,KAFI,CAAP;AAKD,GAND;;AAQA,SAAOP,eAAP;AACD,CA7LkC,CA6LjCH,oBA7LiC,CAAnC;;AA+LA,eAAeG,eAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its 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\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\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 */\n\nvar AnimatedValueXY = /*#__PURE__*/function (_AnimatedWithChildren) {\n  _inheritsLoose(AnimatedValueXY, _AnimatedWithChildren);\n\n  function AnimatedValueXY(valueIn) {\n    var _this;\n\n    _this = _AnimatedWithChildren.call(this) || this;\n    var value = valueIn || {\n      x: 0,\n      y: 0\n    }; // fixme: shouldn't need `: any`\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\n    _this._listeners = {};\n    return _this;\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\n\n  var _proto = AnimatedValueXY.prototype;\n\n  _proto.setValue = function setValue(value) {\n    this.x.setValue(value.x);\n    this.y.setValue(value.y);\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  ;\n\n  _proto.setOffset = function setOffset(offset) {\n    this.x.setOffset(offset.x);\n    this.y.setOffset(offset.y);\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  ;\n\n  _proto.flattenOffset = function flattenOffset() {\n    this.x.flattenOffset();\n    this.y.flattenOffset();\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  ;\n\n  _proto.extractOffset = function extractOffset() {\n    this.x.extractOffset();\n    this.y.extractOffset();\n  };\n\n  _proto.__getValue = function __getValue() {\n    return {\n      x: this.x.__getValue(),\n      y: this.y.__getValue()\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  ;\n\n  _proto.resetAnimation = function resetAnimation(callback) {\n    this.x.resetAnimation();\n    this.y.resetAnimation();\n    callback && callback(this.__getValue());\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  ;\n\n  _proto.stopAnimation = function stopAnimation(callback) {\n    this.x.stopAnimation();\n    this.y.stopAnimation();\n    callback && callback(this.__getValue());\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  ;\n\n  _proto.addListener = function addListener(callback) {\n    var _this2 = this;\n\n    var id = String(_uniqueId++);\n\n    var jointCallback = function jointCallback(_ref) {\n      var number = _ref.value;\n      callback(_this2.__getValue());\n    };\n\n    this._listeners[id] = {\n      x: this.x.addListener(jointCallback),\n      y: this.y.addListener(jointCallback)\n    };\n    return id;\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  ;\n\n  _proto.removeListener = function 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   * Remove all registered listeners.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners\n   */\n  ;\n\n  _proto.removeAllListeners = function removeAllListeners() {\n    this.x.removeAllListeners();\n    this.y.removeAllListeners();\n    this._listeners = {};\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  ;\n\n  _proto.getLayout = function getLayout() {\n    return {\n      left: this.x,\n      top: this.y\n    };\n  }\n  /**\n   * Converts `{x, y}` into a useable translation transform.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform\n   */\n  ;\n\n  _proto.getTranslateTransform = function getTranslateTransform() {\n    return [{\n      translateX: this.x\n    }, {\n      translateY: this.y\n    }];\n  };\n\n  return AnimatedValueXY;\n}(AnimatedWithChildren);\n\nexport default AnimatedValueXY;"]},"metadata":{},"sourceType":"module"}