{"version":3,"sources":["node_modules\\react-dom\\lib\\ReactChildReconciler.js"],"names":["ReactReconciler","require","instantiateReactComponent","KeyEscapeUtils","shouldUpdateReactComponent","traverseAllChildren","warning","ReactComponentTreeHook","process","env","NODE_ENV","instantiateChild","childInstances","child","name","selfDebugID","keyUnique","undefined","unescape","getStackAddendumByID","ReactChildReconciler","instantiateChildren","nestedChildNodes","transaction","context","childInsts","updateChildren","prevChildren","nextChildren","mountImages","removedNodes","hostParent","hostContainerInfo","prevChild","hasOwnProperty","prevElement","_currentElement","nextElement","receiveComponent","getHostNode","unmountComponent","nextChildInstance","nextChildMountImage","mountComponent","push","unmountChildren","renderedChildren","safely","renderedChild","module","exports"],"mappings":";;;;;;;;;;AAUA;;AAEA,GAAIA,iBAAkBC,QAAQ,mBAAR,CAAtB;;AAEA,GAAIC,2BAA4BD,QAAQ,6BAAR,CAAhC;AACA,GAAIE,gBAAiBF,QAAQ,kBAAR,CAArB;AACA,GAAIG,4BAA6BH,QAAQ,8BAAR,CAAjC;AACA,GAAII,qBAAsBJ,QAAQ,uBAAR,CAA1B;AACA,GAAIK,SAAUL,QAAQ,kBAAR,CAAd;;AAEA,GAAIM,uBAAJ;;AAEA,GAAI,MAAOC,QAAP,GAAmB,WAAnB,EAAkCA,QAAQC,GAA1C,EAAiDD,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,MAA9E,CAAsF;;;;;;AAMpFH,uBAAyBN,QAAQ,kCAAR,CAAzB;AACD;;AAED,QAASU,iBAAT,CAA0BC,cAA1B,CAA0CC,KAA1C,CAAiDC,IAAjD,CAAuDC,WAAvD,CAAoE;;AAElE,GAAIC,WAAYJ,eAAeE,IAAf,IAAyBG,SAAzC;AACA,GAAIT,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C;AACzC,GAAI,CAACH,sBAAL,CAA6B;AAC3BA,uBAAyBN,QAAQ,kCAAR,CAAzB;AACD;AACD,GAAI,CAACe,SAAL,CAAgB;AACdR,QAAQC,GA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;;;;;;;;;AAyFzBY,gBAAiB,yBAAUC,gBAAV,CAA4BC,MAA5B,CAAoC;AACnD,IAAK,GAAIjC,KAAT,GAAiBgC,iBAAjB,CAAmC;AACjC,GAAIA,iBAAiBZ,cAAjB,CAAgCpB,IAAhC,CAAJ,CAA2C;AACzC,GAAIkC,eAAgBF,iBAAiBhC,IAAjB,CAApB;AACAd,gBAAgBwC,gBAAhB,CAAiCQ,aAAjC,CAAgDD,MAAhD;AACD;AACF;AACF,CAhGwB,CAA3B;;;AAmGAE,OAAOC,OAAP,CAAiB9B,oBAAjB","file":"ReactChildReconciler.js","sourceRoot":"d:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar ReactReconciler = require('./ReactReconciler');\n\nvar instantiateReactComponent = require('./instantiateReactComponent');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar shouldUpdateReactComponent = require('./shouldUpdateReactComponent');\nvar traverseAllChildren = require('./traverseAllChildren');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {\n  // Temporary hack.\n  // Inline requires don't work well with Jest:\n  // https://github.com/facebook/react/issues/7240\n  // Remove the inline requires when we don't need them anymore:\n  // https://github.com/facebook/react/pull/7178\n  ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n}\n\nfunction instantiateChild(childInstances, child, name, selfDebugID) {\n  // We found a component instance.\n  var keyUnique = childInstances[name] === undefined;\n  if (process.env.NODE_ENV !== 'production') {\n    if (!ReactComponentTreeHook) {\n      ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n    }\n    if (!keyUnique) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n    }\n  }\n  if (child != null && keyUnique) {\n    childInstances[name] = instantiateReactComponent(child, true);\n  }\n}\n\n/**\n * ReactChildReconciler provides helpers for initializing or updating a set of\n * children. Its output is suitable for passing it onto ReactMultiChild which\n * does diffed reordering and insertion.\n */\nvar ReactChildReconciler = {\n  /**\n   * Generates a \"mount image\" for each of the supplied children. In the case\n   * of `ReactDOMComponent`, a mount image is a string of markup.\n   *\n   * @param {?object} nestedChildNodes Nested child maps.\n   * @return {?object} A set of child instances.\n   * @internal\n   */\n  instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots\n  {\n    if (nestedChildNodes == null) {\n      return null;\n    }\n    var childInstances = {};\n\n    if (process.env.NODE_ENV !== 'production') {\n      traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {\n        return instantiateChild(childInsts, child, name, selfDebugID);\n      }, childInstances);\n    } else {\n      traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);\n    }\n    return childInstances;\n  },\n\n  /**\n   * Updates the rendered children and returns a new set of children.\n   *\n   * @param {?object} prevChildren Previously initialized set of children.\n   * @param {?object} nextChildren Flat child element maps.\n   * @param {ReactReconcileTransaction} transaction\n   * @param {object} context\n   * @return {?object} A new set of child instances.\n   * @internal\n   */\n  updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots\n  {\n    // We currently don't have a way to track moves here but if we use iterators\n    // instead of for..in we can zip the iterators and check if an item has\n    // moved.\n    // TODO: If nothing has changed, return the prevChildren object so that we\n    // can quickly bailout if nothing has changed.\n    if (!nextChildren && !prevChildren) {\n      return;\n    }\n    var name;\n    var prevChild;\n    for (name in nextChildren) {\n      if (!nextChildren.hasOwnProperty(name)) {\n        continue;\n      }\n      prevChild = prevChildren && prevChildren[name];\n      var prevElement = prevChild && prevChild._currentElement;\n      var nextElement = nextChildren[name];\n      if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {\n        ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);\n        nextChildren[name] = prevChild;\n      } else {\n        if (prevChild) {\n          removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n          ReactReconciler.unmountComponent(prevChild, false);\n        }\n        // The child must be instantiated before it's mounted.\n        var nextChildInstance = instantiateReactComponent(nextElement, true);\n        nextChildren[name] = nextChildInstance;\n        // Creating mount image now ensures refs are resolved in right order\n        // (see https://github.com/facebook/react/pull/7101 for explanation).\n        var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);\n        mountImages.push(nextChildMountImage);\n      }\n    }\n    // Unmount children that are no longer present.\n    for (name in prevChildren) {\n      if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {\n        prevChild = prevChildren[name];\n        removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n        ReactReconciler.unmountComponent(prevChild, false);\n      }\n    }\n  },\n\n  /**\n   * Unmounts all rendered children. This should be used to clean up children\n   * when this component is unmounted.\n   *\n   * @param {?object} renderedChildren Previously initialized set of children.\n   * @internal\n   */\n  unmountChildren: function (renderedChildren, safely) {\n    for (var name in renderedChildren) {\n      if (renderedChildren.hasOwnProperty(name)) {\n        var renderedChild = renderedChildren[name];\n        ReactReconciler.unmountComponent(renderedChild, safely);\n      }\n    }\n  }\n};\n\nmodule.exports = ReactChildReconciler;"]}