{"version":3,"sources":["node_modules\\react\\lib\\ReactElementValidator.js"],"names":["ReactCurrentOwner","require","ReactComponentTreeHook","ReactElement","checkReactTypeSpec","canDefineProperty","getIteratorFn","warning","lowPriorityWarning","getDeclarationErrorAddendum","current","name","getName","getSourceInfoErrorAddendum","elementProps","undefined","__source","source","fileName","replace","lineNumber","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","displayName","validateExplicitKey","element","_store","validated","key","memoizer","uniqueKey","currentComponentErrorInfo","childOwner","_owner","process","env","NODE_ENV","getCurrentStackAddendum","validateChildKeys","node","Array","isArray","i","length","child","isValidElement","iteratorFn","entries","iterator","call","step","next","done","value","validatePropTypes","componentClass","type","propTypes","props","getDefaultProps","isReactClassApproved","ReactElementValidator","createElement","children","validType","Object","keys","sourceInfo","currentSource","pushNonStandardWarningStack","popNonStandardWarningStack","apply","arguments","createFactory","validatedFactory","bind","defineProperty","enumerable","get","cloneElement","newElement","module","exports"],"mappings":";;;;;;;;;;;;;;;;;AAiBA;;AAEA,GAAIA,mBAAoBC,QAAQ,qBAAR,CAAxB;AACA,GAAIC,wBAAyBD,QAAQ,0BAAR,CAA7B;AACA,GAAIE,cAAeF,QAAQ,gBAAR,CAAnB;;AAEA,GAAIG,oBAAqBH,QAAQ,sBAAR,CAAzB;;AAEA,GAAII,mBAAoBJ,QAAQ,qBAAR,CAAxB;AACA,GAAIK,eAAgBL,QAAQ,iBAAR,CAApB;AACA,GAAIM,SAAUN,QAAQ,kBAAR,CAAd;AACA,GAAIO,oBAAqBP,QAAQ,sBAAR,CAAzB;;AAEA,QAASQ,4BAAT,EAAuC;AACrC,GAAIT,kBAAkBU,OAAtB,CAA+B;AAC7B,GAAIC,MAAOX,kBAAkBU,OAAlB,CAA0BE,OAA1B,EAAX;AACA,GAAID,IAAJ,CAAU;AACR,MAAO,gCAAkCA,IAAlC,CAAyC,IAAhD;AACD;AACF;AACD,MAAO,EAAP;AACD;;AAED,QAASE,2BAAT,CAAoCC,YAAp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AAZ,GAAyB,YAA7B,CAA2C;AACzC,GAAIlC,iBAAJ,CAAuB;AACrB+D,OAAOW,cAAP,CAAsBF,gBAAtB,CAAwC,MAAxC,CAAgD;AAC9CG,WAAY,KADkC;AAE9CC,IAAK,cAAY;AACfzE,mBAAmB,KAAnB,CAA0B,yDAA2D,qCAArF;AACA4D,OAAOW,cAAP,CAAsB,IAAtB,CAA4B,MAA5B,CAAoC;AAClCvB,MAAOG,IAD2B,CAApC;;AAGA,MAAOA,KAAP;AACD,CAR6C,CAAhD;;AAUD;AACF;;AAED,MAAOkB,iBAAP;AACD,CAzEyB;;AA2E1BK,aAAc,sBAAUtD,OAAV,CAAmBiC,KAAnB,CAA0BK,QAA1B,CAAoC;AAChD,GAAIiB,YAAahF,aAAa+E,YAAb,CAA0BR,KAA1B,CAAgC,IAAhC,CAAsCC,SAAtC,CAAjB;AACA,IAAK,GAAI9B,GAAI,CAAb,CAAgBA,EAAI8B,UAAU7B,MAA9B,CAAsCD,GAAtC,CAA2C;AACzCJ,kBAAkBkC,UAAU9B,CAAV,CAAlB,CAAgCsC,WAAWxB,IAA3C;AACD;AACDF,kBAAkB0B,UAAlB;AACA,MAAOA,WAAP;AACD,CAlFyB,CAA5B;;;AAqFAC,OAAOC,OAAP,CAAiBrB,qBAAjB","file":"ReactElementValidator.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/**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\n\n'use strict';\n\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\nvar ReactComponentTreeHook = require('./ReactComponentTreeHook');\nvar ReactElement = require('./ReactElement');\n\nvar checkReactTypeSpec = require('./checkReactTypeSpec');\n\nvar canDefineProperty = require('./canDefineProperty');\nvar getIteratorFn = require('./getIteratorFn');\nvar warning = require('fbjs/lib/warning');\nvar lowPriorityWarning = require('./lowPriorityWarning');\n\nfunction getDeclarationErrorAddendum() {\n  if (ReactCurrentOwner.current) {\n    var name = ReactCurrentOwner.current.getName();\n    if (name) {\n      return ' Check the render method of `' + name + '`.';\n    }\n  }\n  return '';\n}\n\nfunction getSourceInfoErrorAddendum(elementProps) {\n  if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {\n    var source = elementProps.__source;\n    var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n    var lineNumber = source.lineNumber;\n    return ' Check your code at ' + fileName + ':' + lineNumber + '.';\n  }\n  return '';\n}\n\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n  var info = getDeclarationErrorAddendum();\n\n  if (!info) {\n    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n    if (parentName) {\n      info = ' Check the top-level render call using <' + parentName + '>.';\n    }\n  }\n  return info;\n}\n\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\nfunction validateExplicitKey(element, parentType) {\n  if (!element._store || element._store.validated || element.key != null) {\n    return;\n  }\n  element._store.validated = true;\n\n  var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});\n\n  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n  if (memoizer[currentComponentErrorInfo]) {\n    return;\n  }\n  memoizer[currentComponentErrorInfo] = true;\n\n  // Usually the current owner is the offender, but if it accepts children as a\n  // property, it may be the creator of the child that's responsible for\n  // assigning it a key.\n  var childOwner = '';\n  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n    // Give the component that originally created this child.\n    childOwner = ' It was passed a child from ' + element._owner.getName() + '.';\n  }\n\n  process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;\n}\n\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\nfunction validateChildKeys(node, parentType) {\n  if (typeof node !== 'object') {\n    return;\n  }\n  if (Array.isArray(node)) {\n    for (var i = 0; i < node.length; i++) {\n      var child = node[i];\n      if (ReactElement.isValidElement(child)) {\n        validateExplicitKey(child, parentType);\n      }\n    }\n  } else if (ReactElement.isValidElement(node)) {\n    // This element was passed in a valid location.\n    if (node._store) {\n      node._store.validated = true;\n    }\n  } else if (node) {\n    var iteratorFn = getIteratorFn(node);\n    // Entry iterators provide implicit keys.\n    if (iteratorFn) {\n      if (iteratorFn !== node.entries) {\n        var iterator = iteratorFn.call(node);\n        var step;\n        while (!(step = iterator.next()).done) {\n          if (ReactElement.isValidElement(step.value)) {\n            validateExplicitKey(step.value, parentType);\n          }\n        }\n      }\n    }\n  }\n}\n\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\nfunction validatePropTypes(element) {\n  var componentClass = element.type;\n  if (typeof componentClass !== 'function') {\n    return;\n  }\n  var name = componentClass.displayName || componentClass.name;\n  if (componentClass.propTypes) {\n    checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);\n  }\n  if (typeof componentClass.getDefaultProps === 'function') {\n    process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;\n  }\n}\n\nvar ReactElementValidator = {\n  createElement: function (type, props, children) {\n    var validType = typeof type === 'string' || typeof type === 'function';\n    // We warn in this case but don't throw. We expect the element creation to\n    // succeed and there will likely be errors in render.\n    if (!validType) {\n      if (typeof type !== 'function' && typeof type !== 'string') {\n        var info = '';\n        if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n          info += ' You likely forgot to export your component from the file ' + \"it's defined in.\";\n        }\n\n        var sourceInfo = getSourceInfoErrorAddendum(props);\n        if (sourceInfo) {\n          info += sourceInfo;\n        } else {\n          info += getDeclarationErrorAddendum();\n        }\n\n        info += ReactComponentTreeHook.getCurrentStackAddendum();\n\n        var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;\n        ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);\n        process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;\n        ReactComponentTreeHook.popNonStandardWarningStack();\n      }\n    }\n\n    var element = ReactElement.createElement.apply(this, arguments);\n\n    // The result can be nullish if a mock or a custom function is used.\n    // TODO: Drop this when these are no longer allowed as the type argument.\n    if (element == null) {\n      return element;\n    }\n\n    // Skip key warning if the type isn't valid since our key validation logic\n    // doesn't expect a non-string/function type and can throw confusing errors.\n    // We don't want exception behavior to differ between dev and prod.\n    // (Rendering will throw with a helpful message and as soon as the type is\n    // fixed, the key warnings will appear.)\n    if (validType) {\n      for (var i = 2; i < arguments.length; i++) {\n        validateChildKeys(arguments[i], type);\n      }\n    }\n\n    validatePropTypes(element);\n\n    return element;\n  },\n\n  createFactory: function (type) {\n    var validatedFactory = ReactElementValidator.createElement.bind(null, type);\n    // Legacy hook TODO: Warn if this is accessed\n    validatedFactory.type = type;\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (canDefineProperty) {\n        Object.defineProperty(validatedFactory, 'type', {\n          enumerable: false,\n          get: function () {\n            lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n            Object.defineProperty(this, 'type', {\n              value: type\n            });\n            return type;\n          }\n        });\n      }\n    }\n\n    return validatedFactory;\n  },\n\n  cloneElement: function (element, props, children) {\n    var newElement = ReactElement.cloneElement.apply(this, arguments);\n    for (var i = 2; i < arguments.length; i++) {\n      validateChildKeys(arguments[i], newElement.type);\n    }\n    validatePropTypes(newElement);\n    return newElement;\n  }\n};\n\nmodule.exports = ReactElementValidator;"]}