63cc92ba10a14ceb7747d902e487b3c9.json 7.7 KB
{"ast":null,"code":"'use strict';var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _AnimatedNode2=_interopRequireDefault(require(\"./AnimatedNode\"));var _NativeAnimatedHelper=_interopRequireDefault(require(\"../NativeAnimatedHelper\"));function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}var AnimatedWithChildren=function(_AnimatedNode){_inheritsLoose(AnimatedWithChildren,_AnimatedNode);function AnimatedWithChildren(){var _this;_this=_AnimatedNode.call(this)||this;_this._children=[];return _this;}var _proto=AnimatedWithChildren.prototype;_proto.__makeNative=function __makeNative(){if(!this.__isNative){this.__isNative=true;for(var _iterator=this._children,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[typeof Symbol===\"function\"?Symbol.iterator:\"@@iterator\"]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++];}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value;}var child=_ref;child.__makeNative();_NativeAnimatedHelper.default.API.connectAnimatedNodes(this.__getNativeTag(),child.__getNativeTag());}}};_proto.__addChild=function __addChild(child){if(this._children.length===0){this.__attach();}this._children.push(child);if(this.__isNative){child.__makeNative();_NativeAnimatedHelper.default.API.connectAnimatedNodes(this.__getNativeTag(),child.__getNativeTag());}};_proto.__removeChild=function __removeChild(child){var index=this._children.indexOf(child);if(index===-1){console.warn(\"Trying to remove a child that doesn't exist\");return;}if(this.__isNative&&child.__isNative){_NativeAnimatedHelper.default.API.disconnectAnimatedNodes(this.__getNativeTag(),child.__getNativeTag());}this._children.splice(index,1);if(this._children.length===0){this.__detach();}};_proto.__getChildren=function __getChildren(){return this._children;};return AnimatedWithChildren;}(_AnimatedNode2.default);var _default=AnimatedWithChildren;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/nodes/AnimatedWithChildren.js"],"names":["_inheritsLoose","subClass","superClass","prototype","Object","create","constructor","__proto__","AnimatedWithChildren","_AnimatedNode","_this","call","_children","_proto","__makeNative","__isNative","_iterator","_isArray","Array","isArray","_i","Symbol","iterator","_ref","length","next","done","value","child","NativeAnimatedHelper","API","connectAnimatedNodes","__getNativeTag","__addChild","__attach","push","__removeChild","index","indexOf","console","warn","disconnectAnimatedNodes","splice","__detach","__getChildren","AnimatedNode"],"mappings":"AASA,a,mKAIA,qEACA,qFAHA,QAASA,CAAAA,cAAT,CAAwBC,QAAxB,CAAkCC,UAAlC,CAA8C,CAAED,QAAQ,CAACE,SAAT,CAAqBC,MAAM,CAACC,MAAP,CAAcH,UAAU,CAACC,SAAzB,CAArB,CAA0DF,QAAQ,CAACE,SAAT,CAAmBG,WAAnB,CAAiCL,QAAjC,CAA2CA,QAAQ,CAACM,SAAT,CAAqBL,UAArB,CAAkC,CAKvL,GAAIM,CAAAA,oBAAoB,CAExB,SAAUC,aAAV,CAAyB,CACvBT,cAAc,CAACQ,oBAAD,CAAuBC,aAAvB,CAAd,CAEA,QAASD,CAAAA,oBAAT,EAAgC,CAC9B,GAAIE,CAAAA,KAAJ,CAEAA,KAAK,CAAGD,aAAa,CAACE,IAAd,CAAmB,IAAnB,GAA4B,IAApC,CACAD,KAAK,CAACE,SAAN,CAAkB,EAAlB,CACA,MAAOF,CAAAA,KAAP,CACD,CAED,GAAIG,CAAAA,MAAM,CAAGL,oBAAoB,CAACL,SAAlC,CAEAU,MAAM,CAACC,YAAP,CAAsB,QAASA,CAAAA,YAAT,EAAwB,CAC5C,GAAI,CAAC,KAAKC,UAAV,CAAsB,CACpB,KAAKA,UAAL,CAAkB,IAAlB,CAEA,IAAK,GAAIC,CAAAA,SAAS,CAAG,KAAKJ,SAArB,CAAgCK,QAAQ,CAAGC,KAAK,CAACC,OAAN,CAAcH,SAAd,CAA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AACC,IAAR,CAAa,6CAAb,EACA,OACD,CAED,GAAI,KAAKzB,UAAL,EAAmBa,KAAK,CAACb,UAA7B,CAAyC,CACvCc,8BAAqBC,GAArB,CAAyBW,uBAAzB,CAAiD,KAAKT,cAAL,EAAjD,CAAwEJ,KAAK,CAACI,cAAN,EAAxE,EACD,CAED,KAAKpB,SAAL,CAAe8B,MAAf,CAAsBL,KAAtB,CAA6B,CAA7B,EAEA,GAAI,KAAKzB,SAAL,CAAeY,MAAf,GAA0B,CAA9B,CAAiC,CAC/B,KAAKmB,QAAL,GACD,CACF,CAjBD,CAmBA9B,MAAM,CAAC+B,aAAP,CAAuB,QAASA,CAAAA,aAAT,EAAyB,CAC9C,MAAO,MAAKhC,SAAZ,CACD,CAFD,CAIA,MAAOJ,CAAAA,oBAAP,CACD,CA7ED,CA6EEqC,sBA7EF,CAFA,C,aAiFerC,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\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nimport AnimatedNode from './AnimatedNode';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\n\nvar AnimatedWithChildren =\n/*#__PURE__*/\nfunction (_AnimatedNode) {\n  _inheritsLoose(AnimatedWithChildren, _AnimatedNode);\n\n  function AnimatedWithChildren() {\n    var _this;\n\n    _this = _AnimatedNode.call(this) || this;\n    _this._children = [];\n    return _this;\n  }\n\n  var _proto = AnimatedWithChildren.prototype;\n\n  _proto.__makeNative = function __makeNative() {\n    if (!this.__isNative) {\n      this.__isNative = true;\n\n      for (var _iterator = this._children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n        var _ref;\n\n        if (_isArray) {\n          if (_i >= _iterator.length) break;\n          _ref = _iterator[_i++];\n        } else {\n          _i = _iterator.next();\n          if (_i.done) break;\n          _ref = _i.value;\n        }\n\n        var child = _ref;\n\n        child.__makeNative();\n\n        NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n      }\n    }\n  };\n\n  _proto.__addChild = function __addChild(child) {\n    if (this._children.length === 0) {\n      this.__attach();\n    }\n\n    this._children.push(child);\n\n    if (this.__isNative) {\n      // Only accept \"native\" animated nodes as children\n      child.__makeNative();\n\n      NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n    }\n  };\n\n  _proto.__removeChild = function __removeChild(child) {\n    var index = this._children.indexOf(child);\n\n    if (index === -1) {\n      console.warn(\"Trying to remove a child that doesn't exist\");\n      return;\n    }\n\n    if (this.__isNative && child.__isNative) {\n      NativeAnimatedHelper.API.disconnectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n    }\n\n    this._children.splice(index, 1);\n\n    if (this._children.length === 0) {\n      this.__detach();\n    }\n  };\n\n  _proto.__getChildren = function __getChildren() {\n    return this._children;\n  };\n\n  return AnimatedWithChildren;\n}(AnimatedNode);\n\nexport default AnimatedWithChildren;"]},"metadata":{},"sourceType":"script"}