8d1ff570f85a610611da531578674498.json 20.8 KB
{"ast":null,"code":"'use strict';var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.addWhitelistedStyleProp=addWhitelistedStyleProp;exports.addWhitelistedTransformProp=addWhitelistedTransformProp;exports.addWhitelistedInterpolationParam=addWhitelistedInterpolationParam;exports.validateStyles=validateStyles;exports.validateTransform=validateTransform;exports.validateInterpolation=validateInterpolation;exports.generateNewNodeTag=generateNewNodeTag;exports.generateNewAnimationId=generateNewAnimationId;exports.assertNativeAnimatedModule=assertNativeAnimatedModule;exports.shouldUseNativeDriver=shouldUseNativeDriver;exports.default=exports.API=void 0;var _invariant=_interopRequireDefault(require(\"fbjs/lib/invariant\"));var _NativeModules=_interopRequireDefault(require(\"../../../exports/NativeModules\"));var _NativeEventEmitter=_interopRequireDefault(require(\"../NativeEventEmitter\"));var NativeAnimatedModule=_NativeModules.default.NativeAnimatedModule;var __nativeAnimatedNodeTagCount=1;var __nativeAnimationIdCount=1;var nativeEventEmitter;var API={createAnimatedNode:function createAnimatedNode(tag,config){assertNativeAnimatedModule();NativeAnimatedModule.createAnimatedNode(tag,config);},startListeningToAnimatedNodeValue:function startListeningToAnimatedNodeValue(tag){assertNativeAnimatedModule();NativeAnimatedModule.startListeningToAnimatedNodeValue(tag);},stopListeningToAnimatedNodeValue:function stopListeningToAnimatedNodeValue(tag){assertNativeAnimatedModule();NativeAnimatedModule.stopListeningToAnimatedNodeValue(tag);},connectAnimatedNodes:function connectAnimatedNodes(parentTag,childTag){assertNativeAnimatedModule();NativeAnimatedModule.connectAnimatedNodes(parentTag,childTag);},disconnectAnimatedNodes:function disconnectAnimatedNodes(parentTag,childTag){assertNativeAnimatedModule();NativeAnimatedModule.disconnectAnimatedNodes(parentTag,childTag);},startAnimatingNode:function startAnimatingNode(animationId,nodeTag,config,endCallback){assertNativeAnimatedModule();NativeAnimatedModule.startAnimatingNode(animationId,nodeTag,config,endCallback);},stopAnimation:function stopAnimation(animationId){assertNativeAnimatedModule();NativeAnimatedModule.stopAnimation(animationId);},setAnimatedNodeValue:function setAnimatedNodeValue(nodeTag,value){assertNativeAnimatedModule();NativeAnimatedModule.setAnimatedNodeValue(nodeTag,value);},setAnimatedNodeOffset:function setAnimatedNodeOffset(nodeTag,offset){assertNativeAnimatedModule();NativeAnimatedModule.setAnimatedNodeOffset(nodeTag,offset);},flattenAnimatedNodeOffset:function flattenAnimatedNodeOffset(nodeTag){assertNativeAnimatedModule();NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag);},extractAnimatedNodeOffset:function extractAnimatedNodeOffset(nodeTag){assertNativeAnimatedModule();NativeAnimatedModule.extractAnimatedNodeOffset(nodeTag);},connectAnimatedNodeToView:function connectAnimatedNodeToView(nodeTag,viewTag){assertNativeAnimatedModule();NativeAnimatedModule.connectAnimatedNodeToView(nodeTag,viewTag);},disconnectAnimatedNodeFromView:function disconnectAnimatedNodeFromView(nodeTag,viewTag){assertNativeAnimatedModule();NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag,viewTag);},dropAnimatedNode:function dropAnimatedNode(tag){assertNativeAnimatedModule();NativeAnimatedModule.dropAnimatedNode(tag);},addAnimatedEventToView:function addAnimatedEventToView(viewTag,eventName,eventMapping){assertNativeAnimatedModule();NativeAnimatedModule.addAnimatedEventToView(viewTag,eventName,eventMapping);},removeAnimatedEventFromView:function removeAnimatedEventFromView(viewTag,eventName,animatedNodeTag){assertNativeAnimatedModule();NativeAnimatedModule.removeAnimatedEventFromView(viewTag,eventName,animatedNodeTag);}};exports.API=API;var STYLES_WHITELIST={opacity:true,transform:true,shadowOpacity:true,shadowRadius:true,scaleX:true,scaleY:true,translateX:true,translateY:true};var TRANSFORM_WHITELIST={translateX:true,translateY:true,scale:true,scaleX:true,scaleY:true,rotate:true,rotateX:true,rotateY:true,perspective:true};var SUPPORTED_INTERPOLATION_PARAMS={inputRange:true,outputRange:true,extrapolate:true,extrapolateRight:true,extrapolateLeft:true};function addWhitelistedStyleProp(prop){STYLES_WHITELIST[prop]=true;}function addWhitelistedTransformProp(prop){TRANSFORM_WHITELIST[prop]=true;}function addWhitelistedInterpolationParam(param){SUPPORTED_INTERPOLATION_PARAMS[param]=true;}function validateTransform(configs){configs.forEach(function(config){if(!TRANSFORM_WHITELIST.hasOwnProperty(config.property)){throw new Error(\"Property '\"+config.property+\"' is not supported by native animated module\");}});}function validateStyles(styles){for(var key in styles){if(!STYLES_WHITELIST.hasOwnProperty(key)){throw new Error(\"Style property '\"+key+\"' is not supported by native animated module\");}}}function validateInterpolation(config){for(var key in config){if(!SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(key)){throw new Error(\"Interpolation property '\"+key+\"' is not supported by native animated module\");}}}function generateNewNodeTag(){return __nativeAnimatedNodeTagCount++;}function generateNewAnimationId(){return __nativeAnimationIdCount++;}function assertNativeAnimatedModule(){(0,_invariant.default)(NativeAnimatedModule,'Native animated module is not available');}var _warnedMissingNativeAnimated=false;function shouldUseNativeDriver(config){if(config.useNativeDriver&&!NativeAnimatedModule){if(!_warnedMissingNativeAnimated){console.warn('Animated: `useNativeDriver` is not supported because the native '+'animated module is missing. Falling back to JS-based animation. To '+'resolve this, add `RCTAnimation` module to this app, or remove '+'`useNativeDriver`. '+'More info: https://github.com/facebook/react-native/issues/11094#issuecomment-263240420');_warnedMissingNativeAnimated=true;}return false;}return config.useNativeDriver||false;}var NativeAnimatedHelper={API:API,addWhitelistedStyleProp:addWhitelistedStyleProp,addWhitelistedTransformProp:addWhitelistedTransformProp,addWhitelistedInterpolationParam:addWhitelistedInterpolationParam,validateStyles:validateStyles,validateTransform:validateTransform,validateInterpolation:validateInterpolation,generateNewNodeTag:generateNewNodeTag,generateNewAnimationId:generateNewAnimationId,assertNativeAnimatedModule:assertNativeAnimatedModule,shouldUseNativeDriver:shouldUseNativeDriver,get nativeEventEmitter(){if(!nativeEventEmitter){nativeEventEmitter=new _NativeEventEmitter.default(NativeAnimatedModule);}return nativeEventEmitter;}};var _default=NativeAnimatedHelper;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedHelper.js"],"names":["NativeAnimatedModule","NativeModules","__nativeAnimatedNodeTagCount","__nativeAnimationIdCount","nativeEventEmitter","API","createAnimatedNode","tag","config","assertNativeAnimatedModule","startListeningToAnimatedNodeValue","stopListeningToAnimatedNodeValue","connectAnimatedNodes","parentTag","childTag","disconnectAnimatedNodes","startAnimatingNode","animationId","nodeTag","endCallback","stopAnimation","setAnimatedNodeValue","value","setAnimatedNodeOffset","offset","flattenAnimatedNodeOffset","extractAnimatedNodeOffset","connectAnimatedNodeToView","viewTag","disconnectAnimatedNodeFromView","dropAnimatedNode","addAnimatedEventToView","eventName","eventMapping","removeAnimatedEventFromView","animatedNodeTag","STYLES_WHITELIST","opacity","transform","shadowOpacity","shadowRadius","scaleX","scaleY","translateX","translateY","TRANSFORM_WHITELIST","scale","rotate","rotateX","rotateY","perspective","SUPPORTED_INTERPOLATION_PARAMS","inputRange","outputRange","extrapolate","extrapolateRight","extrapolateLeft","addWhitelistedStyleProp","prop","addWhitelistedTransformProp","addWhitelistedInterpolationParam","param","validateTransform","configs","forEach","hasOwnProperty","property","Error","validateStyles","styles","key","validateInterpolation","generateNewNodeTag","generateNewAnimationId","_warnedMissingNativeAnimated","shouldUseNativeDriver","useNativeDriver","console","warn","NativeAnimatedHelper","NativeEventEmitter"],"mappings":"AASA,a,6sBAEA,qEACA,qFACA,iFACA,GAAIA,CAAAA,oBAAoB,CAAGC,uBAAcD,oBAAzC,CACA,GAAIE,CAAAA,4BAA4B,CAAG,CAAnC,CAGA,GAAIC,CAAAA,wBAAwB,CAAG,CAA/B,CAGA,GAAIC,CAAAA,kBAAJ,CAMA,GAAIC,CAAAA,GAAG,CAAG,CACRC,kBAAkB,CAAE,QAASA,CAAAA,kBAAT,CAA4BC,GAA5B,CAAiCC,MAAj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AAqE,qEAArE,CAA6I,iEAA7I,CAAiN,qBAAjN,CAAyO,yFAAtP,EACAJ,4BAA4B,CAAG,IAA/B,CACD,CAED,MAAO,MAAP,CACD,CAED,MAAOlE,CAAAA,MAAM,CAACoE,eAAP,EAA0B,KAAjC,CACD,CAED,GAAIG,CAAAA,oBAAoB,CAAG,CACzB1E,GAAG,CAAEA,GADoB,CAEzBoD,uBAAuB,CAAEA,uBAFA,CAGzBE,2BAA2B,CAAEA,2BAHJ,CAIzBC,gCAAgC,CAAEA,gCAJT,CAKzBQ,cAAc,CAAEA,cALS,CAMzBN,iBAAiB,CAAEA,iBANM,CAOzBS,qBAAqB,CAAEA,qBAPE,CAQzBC,kBAAkB,CAAEA,kBARK,CASzBC,sBAAsB,CAAEA,sBATC,CAUzBhE,0BAA0B,CAAEA,0BAVH,CAWzBkE,qBAAqB,CAAEA,qBAXE,CAazB,GAAIvE,CAAAA,kBAAJ,EAAyB,CACvB,GAAI,CAACA,kBAAL,CAAyB,CACvBA,kBAAkB,CAAG,GAAI4E,4BAAJ,CAAuBhF,oBAAvB,CAArB,CACD,CAED,MAAOI,CAAAA,kBAAP,CACD,CAnBwB,CAA3B,C,aAuBe2E,oB","sourcesContent":["/**\n * Copyright (c) 2015-present, Facebook, Inc.\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 invariant from 'fbjs/lib/invariant';\nimport NativeModules from '../../../exports/NativeModules';\nimport NativeEventEmitter from '../NativeEventEmitter';\nvar NativeAnimatedModule = NativeModules.NativeAnimatedModule;\nvar __nativeAnimatedNodeTagCount = 1;\n/* used for animated nodes */\n\nvar __nativeAnimationIdCount = 1;\n/* used for started animations */\n\nvar nativeEventEmitter;\n/**\n * Simple wrappers around NativeAnimatedModule to provide flow and autocmplete support for\n * the native module methods\n */\n\nvar API = {\n  createAnimatedNode: function createAnimatedNode(tag, config) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.createAnimatedNode(tag, config);\n  },\n  startListeningToAnimatedNodeValue: function startListeningToAnimatedNodeValue(tag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.startListeningToAnimatedNodeValue(tag);\n  },\n  stopListeningToAnimatedNodeValue: function stopListeningToAnimatedNodeValue(tag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.stopListeningToAnimatedNodeValue(tag);\n  },\n  connectAnimatedNodes: function connectAnimatedNodes(parentTag, childTag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.connectAnimatedNodes(parentTag, childTag);\n  },\n  disconnectAnimatedNodes: function disconnectAnimatedNodes(parentTag, childTag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.disconnectAnimatedNodes(parentTag, childTag);\n  },\n  startAnimatingNode: function startAnimatingNode(animationId, nodeTag, config, endCallback) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.startAnimatingNode(animationId, nodeTag, config, endCallback);\n  },\n  stopAnimation: function stopAnimation(animationId) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.stopAnimation(animationId);\n  },\n  setAnimatedNodeValue: function setAnimatedNodeValue(nodeTag, value) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.setAnimatedNodeValue(nodeTag, value);\n  },\n  setAnimatedNodeOffset: function setAnimatedNodeOffset(nodeTag, offset) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.setAnimatedNodeOffset(nodeTag, offset);\n  },\n  flattenAnimatedNodeOffset: function flattenAnimatedNodeOffset(nodeTag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag);\n  },\n  extractAnimatedNodeOffset: function extractAnimatedNodeOffset(nodeTag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.extractAnimatedNodeOffset(nodeTag);\n  },\n  connectAnimatedNodeToView: function connectAnimatedNodeToView(nodeTag, viewTag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.connectAnimatedNodeToView(nodeTag, viewTag);\n  },\n  disconnectAnimatedNodeFromView: function disconnectAnimatedNodeFromView(nodeTag, viewTag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag, viewTag);\n  },\n  dropAnimatedNode: function dropAnimatedNode(tag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.dropAnimatedNode(tag);\n  },\n  addAnimatedEventToView: function addAnimatedEventToView(viewTag, eventName, eventMapping) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.addAnimatedEventToView(viewTag, eventName, eventMapping);\n  },\n  removeAnimatedEventFromView: function removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag) {\n    assertNativeAnimatedModule();\n    NativeAnimatedModule.removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag);\n  }\n};\n/**\n * Styles allowed by the native animated implementation.\n *\n * In general native animated implementation should support any numeric property that doesn't need\n * to be updated through the shadow view hierarchy (all non-layout properties).\n */\n\nvar STYLES_WHITELIST = {\n  opacity: true,\n  transform: true,\n\n  /* ios styles */\n  shadowOpacity: true,\n  shadowRadius: true,\n\n  /* legacy android transform properties */\n  scaleX: true,\n  scaleY: true,\n  translateX: true,\n  translateY: true\n};\nvar TRANSFORM_WHITELIST = {\n  translateX: true,\n  translateY: true,\n  scale: true,\n  scaleX: true,\n  scaleY: true,\n  rotate: true,\n  rotateX: true,\n  rotateY: true,\n  perspective: true\n};\nvar SUPPORTED_INTERPOLATION_PARAMS = {\n  inputRange: true,\n  outputRange: true,\n  extrapolate: true,\n  extrapolateRight: true,\n  extrapolateLeft: true\n};\n\nfunction addWhitelistedStyleProp(prop) {\n  STYLES_WHITELIST[prop] = true;\n}\n\nfunction addWhitelistedTransformProp(prop) {\n  TRANSFORM_WHITELIST[prop] = true;\n}\n\nfunction addWhitelistedInterpolationParam(param) {\n  SUPPORTED_INTERPOLATION_PARAMS[param] = true;\n}\n\nfunction validateTransform(configs) {\n  configs.forEach(function (config) {\n    if (!TRANSFORM_WHITELIST.hasOwnProperty(config.property)) {\n      throw new Error(\"Property '\" + config.property + \"' is not supported by native animated module\");\n    }\n  });\n}\n\nfunction validateStyles(styles) {\n  for (var key in styles) {\n    if (!STYLES_WHITELIST.hasOwnProperty(key)) {\n      throw new Error(\"Style property '\" + key + \"' is not supported by native animated module\");\n    }\n  }\n}\n\nfunction validateInterpolation(config) {\n  for (var key in config) {\n    if (!SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(key)) {\n      throw new Error(\"Interpolation property '\" + key + \"' is not supported by native animated module\");\n    }\n  }\n}\n\nfunction generateNewNodeTag() {\n  return __nativeAnimatedNodeTagCount++;\n}\n\nfunction generateNewAnimationId() {\n  return __nativeAnimationIdCount++;\n}\n\nfunction assertNativeAnimatedModule() {\n  invariant(NativeAnimatedModule, 'Native animated module is not available');\n}\n\nvar _warnedMissingNativeAnimated = false;\n\nfunction shouldUseNativeDriver(config) {\n  if (config.useNativeDriver && !NativeAnimatedModule) {\n    if (!_warnedMissingNativeAnimated) {\n      console.warn('Animated: `useNativeDriver` is not supported because the native ' + 'animated module is missing. Falling back to JS-based animation. To ' + 'resolve this, add `RCTAnimation` module to this app, or remove ' + '`useNativeDriver`. ' + 'More info: https://github.com/facebook/react-native/issues/11094#issuecomment-263240420');\n      _warnedMissingNativeAnimated = true;\n    }\n\n    return false;\n  }\n\n  return config.useNativeDriver || false;\n}\n\nvar NativeAnimatedHelper = {\n  API: API,\n  addWhitelistedStyleProp: addWhitelistedStyleProp,\n  addWhitelistedTransformProp: addWhitelistedTransformProp,\n  addWhitelistedInterpolationParam: addWhitelistedInterpolationParam,\n  validateStyles: validateStyles,\n  validateTransform: validateTransform,\n  validateInterpolation: validateInterpolation,\n  generateNewNodeTag: generateNewNodeTag,\n  generateNewAnimationId: generateNewAnimationId,\n  assertNativeAnimatedModule: assertNativeAnimatedModule,\n  shouldUseNativeDriver: shouldUseNativeDriver,\n\n  get nativeEventEmitter() {\n    if (!nativeEventEmitter) {\n      nativeEventEmitter = new NativeEventEmitter(NativeAnimatedModule);\n    }\n\n    return nativeEventEmitter;\n  }\n\n};\nexport { API, addWhitelistedStyleProp, addWhitelistedTransformProp, addWhitelistedInterpolationParam, validateStyles, validateTransform, validateInterpolation, generateNewNodeTag, generateNewAnimationId, assertNativeAnimatedModule, shouldUseNativeDriver };\nexport default NativeAnimatedHelper;"]},"metadata":{},"sourceType":"script"}