{"ast":null,"code":"'use strict';\n\nimport NativeAnimatedHelper from \"../NativeAnimatedHelper\";\nvar startNativeAnimationNextId = 1;\n\nvar Animation = function () {\n  function Animation() {}\n\n  var _proto = Animation.prototype;\n\n  _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {};\n\n  _proto.stop = function stop() {\n    if (this.__nativeId) {\n      NativeAnimatedHelper.API.stopAnimation(this.__nativeId);\n    }\n  };\n\n  _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n    throw new Error('This animation type cannot be offloaded to native');\n  };\n\n  _proto.__debouncedOnEnd = function __debouncedOnEnd(result) {\n    var onEnd = this.__onEnd;\n    this.__onEnd = null;\n    onEnd && onEnd(result);\n  };\n\n  _proto.__startNativeAnimation = function __startNativeAnimation(animatedValue) {\n    var startNativeAnimationWaitId = startNativeAnimationNextId + \":startAnimation\";\n    startNativeAnimationNextId += 1;\n    NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId);\n\n    try {\n      animatedValue.__makeNative();\n\n      this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();\n      NativeAnimatedHelper.API.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), this.__getNativeAnimationConfig(), this.__debouncedOnEnd.bind(this));\n    } catch (e) {\n      throw e;\n    } finally {\n      NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId);\n    }\n  };\n\n  return Animation;\n}();\n\nexport default Animation;","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-web/dist/vendor/react-native/Animated/animations/Animation.js"],"names":["NativeAnimatedHelper","startNativeAnimationNextId","Animation","_proto","prototype","start","fromValue","onUpdate","onEnd","previousAnimation","animatedValue","stop","__nativeId","API","stopAnimation","__getNativeAnimationConfig","Error","__debouncedOnEnd","result","__onEnd","__startNativeAnimation","startNativeAnimationWaitId","setWaitingForIdentifier","__makeNative","generateNewAnimationId","startAnimatingNode","__getN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oB,CAACa,GAArB,CAAyBY,kBAAzB,CAA4C,KAAKb,UAAjD,EAA6DF,aAAa,CAACgB,cAAd,EAA7D,EAA6F,KAAKX,0BAAL,EAA7F,EAAgI,KAAKE,gBAAL,CAAsBU,IAAtB,CAA2B,IAA3B,CAAhI;AACD,KALD,CAKE,OAAOC,CAAP,EAAU;AACV,YAAMA,CAAN;AACD,KAPD,SAOU;AACR5B,MAAAA,oBAAoB,CAACa,GAArB,CAAyBgB,yBAAzB,CAAmDR,0BAAnD;AACD;AACF,GAfD;;AAiBA,SAAOnB,SAAP;AACD,CA5C4B,EAA7B;;AA8CA,eAAeA,SAAf","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\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar startNativeAnimationNextId = 1; // Important note: start() and stop() will only be called at most once.\n// Once an animation has been stopped or finished its course, it will\n// not be reused.\n\nvar Animation = /*#__PURE__*/function () {\n  function Animation() {}\n\n  var _proto = Animation.prototype;\n\n  _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {};\n\n  _proto.stop = function stop() {\n    if (this.__nativeId) {\n      NativeAnimatedHelper.API.stopAnimation(this.__nativeId);\n    }\n  };\n\n  _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n    // Subclasses that have corresponding animation implementation done in native\n    // should override this method\n    throw new Error('This animation type cannot be offloaded to native');\n  } // Helper function for subclasses to make sure onEnd is only called once.\n  ;\n\n  _proto.__debouncedOnEnd = function __debouncedOnEnd(result) {\n    var onEnd = this.__onEnd;\n    this.__onEnd = null;\n    onEnd && onEnd(result);\n  };\n\n  _proto.__startNativeAnimation = function __startNativeAnimation(animatedValue) {\n    var startNativeAnimationWaitId = startNativeAnimationNextId + \":startAnimation\";\n    startNativeAnimationNextId += 1;\n    NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId);\n\n    try {\n      animatedValue.__makeNative();\n\n      this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();\n      NativeAnimatedHelper.API.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), this.__getNativeAnimationConfig(), this.__debouncedOnEnd.bind(this));\n    } catch (e) {\n      throw e;\n    } finally {\n      NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId);\n    }\n  };\n\n  return Animation;\n}();\n\nexport default Animation;"]},"metadata":{},"sourceType":"module"}