jsx.js 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. var _Symbol = require("@babel/runtime-corejs3/core-js/symbol");
  2. var _Symbol$for = require("@babel/runtime-corejs3/core-js/symbol/for");
  3. var REACT_ELEMENT_TYPE;
  4. function _createRawReactElement(type, props, key, children) {
  5. REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof _Symbol && _Symbol$for && _Symbol$for("react.element") || 60103);
  6. var defaultProps = type && type.defaultProps,
  7. childrenLength = arguments.length - 3;
  8. if (props || 0 === childrenLength || (props = {
  9. children: void 0
  10. }), 1 === childrenLength) props.children = children;else if (childrenLength > 1) {
  11. for (var childArray = new Array(childrenLength), i = 0; i < childrenLength; i++) {
  12. childArray[i] = arguments[i + 3];
  13. }
  14. props.children = childArray;
  15. }
  16. if (props && defaultProps) for (var propName in defaultProps) {
  17. void 0 === props[propName] && (props[propName] = defaultProps[propName]);
  18. } else props || (props = defaultProps || {});
  19. return {
  20. $$typeof: REACT_ELEMENT_TYPE,
  21. type: type,
  22. key: void 0 === key ? null : "" + key,
  23. ref: null,
  24. props: props,
  25. _owner: null
  26. };
  27. }
  28. module.exports = _createRawReactElement, module.exports.__esModule = true, module.exports["default"] = module.exports;