react_jsx-dev-runtime.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. import {
  2. require_react
  3. } from "./chunk-6KCF6AHO.js";
  4. import {
  5. __commonJS
  6. } from "./chunk-DC5AMYBS.js";
  7. // node_modules/react/cjs/react-jsx-dev-runtime.development.js
  8. var require_react_jsx_dev_runtime_development = __commonJS({
  9. "node_modules/react/cjs/react-jsx-dev-runtime.development.js"(exports) {
  10. "use strict";
  11. (function() {
  12. function getComponentNameFromType(type) {
  13. if (null == type) return null;
  14. if ("function" === typeof type)
  15. return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
  16. if ("string" === typeof type) return type;
  17. switch (type) {
  18. case REACT_FRAGMENT_TYPE:
  19. return "Fragment";
  20. case REACT_PROFILER_TYPE:
  21. return "Profiler";
  22. case REACT_STRICT_MODE_TYPE:
  23. return "StrictMode";
  24. case REACT_SUSPENSE_TYPE:
  25. return "Suspense";
  26. case REACT_SUSPENSE_LIST_TYPE:
  27. return "SuspenseList";
  28. case REACT_ACTIVITY_TYPE:
  29. return "Activity";
  30. }
  31. if ("object" === typeof type)
  32. switch ("number" === typeof type.tag && console.error(
  33. "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
  34. ), type.$$typeof) {
  35. case REACT_PORTAL_TYPE:
  36. return "Portal";
  37. case REACT_CONTEXT_TYPE:
  38. return type.displayName || "Context";
  39. case REACT_CONSUMER_TYPE:
  40. return (type._context.displayName || "Context") + ".Consumer";
  41. case REACT_FORWARD_REF_TYPE:
  42. var innerType = type.render;
  43. type = type.displayName;
  44. type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
  45. return type;
  46. case REACT_MEMO_TYPE:
  47. return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
  48. case REACT_LAZY_TYPE:
  49. innerType = type._payload;
  50. type = type._init;
  51. try {
  52. return getComponentNameFromType(type(innerType));
  53. } catch (x) {
  54. }
  55. }
  56. return null;
  57. }
  58. function testStringCoercion(value) {
  59. return "" + value;
  60. }
  61. function checkKeyStringCoercion(value) {
  62. try {
  63. testStringCoercion(value);
  64. var JSCompiler_inline_result = false;
  65. } catch (e) {
  66. JSCompiler_inline_result = true;
  67. }
  68. if (JSCompiler_inline_result) {
  69. JSCompiler_inline_result = console;
  70. var JSCompiler_temp_const = JSCompiler_inline_result.error;
  71. var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
  72. JSCompiler_temp_const.call(
  73. JSCompiler_inline_result,
  74. "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
  75. JSCompiler_inline_result$jscomp$0
  76. );
  77. return testStringCoercion(value);
  78. }
  79. }
  80. function getTaskName(type) {
  81. if (type === REACT_FRAGMENT_TYPE) return "<>";
  82. if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
  83. return "<...>";
  84. try {
  85. var name = getComponentNameFromType(type);
  86. return name ? "<" + name + ">" : "<...>";
  87. } catch (x) {
  88. return "<...>";
  89. }
  90. }
  91. function getOwner() {
  92. var dispatcher = ReactSharedInternals.A;
  93. return null === dispatcher ? null : dispatcher.getOwner();
  94. }
  95. function UnknownOwner() {
  96. return Error("react-stack-top-frame");
  97. }
  98. function hasValidKey(config) {
  99. if (hasOwnProperty.call(config, "key")) {
  100. var getter = Object.getOwnPropertyDescriptor(config, "key").get;
  101. if (getter && getter.isReactWarning) return false;
  102. }
  103. return void 0 !== config.key;
  104. }
  105. function defineKeyPropWarningGetter(props, displayName) {
  106. function warnAboutAccessingKey() {
  107. specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
  108. "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
  109. displayName
  110. ));
  111. }
  112. warnAboutAccessingKey.isReactWarning = true;
  113. Object.defineProperty(props, "key", {
  114. get: warnAboutAccessingKey,
  115. configurable: true
  116. });
  117. }
  118. function elementRefGetterWithDeprecationWarning() {
  119. var componentName = getComponentNameFromType(this.type);
  120. didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
  121. "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
  122. ));
  123. componentName = this.props.ref;
  124. return void 0 !== componentName ? componentName : null;
  125. }
  126. function ReactElement(type, key, props, owner, debugStack, debugTask) {
  127. var refProp = props.ref;
  128. type = {
  129. $$typeof: REACT_ELEMENT_TYPE,
  130. type,
  131. key,
  132. props,
  133. _owner: owner
  134. };
  135. null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
  136. enumerable: false,
  137. get: elementRefGetterWithDeprecationWarning
  138. }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
  139. type._store = {};
  140. Object.defineProperty(type._store, "validated", {
  141. configurable: false,
  142. enumerable: false,
  143. writable: true,
  144. value: 0
  145. });
  146. Object.defineProperty(type, "_debugInfo", {
  147. configurable: false,
  148. enumerable: false,
  149. writable: true,
  150. value: null
  151. });
  152. Object.defineProperty(type, "_debugStack", {
  153. configurable: false,
  154. enumerable: false,
  155. writable: true,
  156. value: debugStack
  157. });
  158. Object.defineProperty(type, "_debugTask", {
  159. configurable: false,
  160. enumerable: false,
  161. writable: true,
  162. value: debugTask
  163. });
  164. Object.freeze && (Object.freeze(type.props), Object.freeze(type));
  165. return type;
  166. }
  167. function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
  168. var children = config.children;
  169. if (void 0 !== children)
  170. if (isStaticChildren)
  171. if (isArrayImpl(children)) {
  172. for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
  173. validateChildKeys(children[isStaticChildren]);
  174. Object.freeze && Object.freeze(children);
  175. } else
  176. console.error(
  177. "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
  178. );
  179. else validateChildKeys(children);
  180. if (hasOwnProperty.call(config, "key")) {
  181. children = getComponentNameFromType(type);
  182. var keys = Object.keys(config).filter(function(k) {
  183. return "key" !== k;
  184. });
  185. isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
  186. didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
  187. 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
  188. isStaticChildren,
  189. children,
  190. keys,
  191. children
  192. ), didWarnAboutKeySpread[children + isStaticChildren] = true);
  193. }
  194. children = null;
  195. void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
  196. hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
  197. if ("key" in config) {
  198. maybeKey = {};
  199. for (var propName in config)
  200. "key" !== propName && (maybeKey[propName] = config[propName]);
  201. } else maybeKey = config;
  202. children && defineKeyPropWarningGetter(
  203. maybeKey,
  204. "function" === typeof type ? type.displayName || type.name || "Unknown" : type
  205. );
  206. return ReactElement(
  207. type,
  208. children,
  209. maybeKey,
  210. getOwner(),
  211. debugStack,
  212. debugTask
  213. );
  214. }
  215. function validateChildKeys(node) {
  216. isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
  217. }
  218. function isValidElement(object) {
  219. return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
  220. }
  221. var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
  222. return null;
  223. };
  224. React = {
  225. react_stack_bottom_frame: function(callStackForError) {
  226. return callStackForError();
  227. }
  228. };
  229. var specialPropKeyWarningShown;
  230. var didWarnAboutElementRef = {};
  231. var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
  232. React,
  233. UnknownOwner
  234. )();
  235. var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
  236. var didWarnAboutKeySpread = {};
  237. exports.Fragment = REACT_FRAGMENT_TYPE;
  238. exports.jsxDEV = function(type, config, maybeKey, isStaticChildren) {
  239. var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
  240. return jsxDEVImpl(
  241. type,
  242. config,
  243. maybeKey,
  244. isStaticChildren,
  245. trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
  246. trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
  247. );
  248. };
  249. })();
  250. }
  251. });
  252. // node_modules/react/jsx-dev-runtime.js
  253. var require_jsx_dev_runtime = __commonJS({
  254. "node_modules/react/jsx-dev-runtime.js"(exports, module) {
  255. if (false) {
  256. module.exports = null;
  257. } else {
  258. module.exports = require_react_jsx_dev_runtime_development();
  259. }
  260. }
  261. });
  262. export default require_jsx_dev_runtime();
  263. /*! Bundled license information:
  264. react/cjs/react-jsx-dev-runtime.development.js:
  265. (**
  266. * @license React
  267. * react-jsx-dev-runtime.development.js
  268. *
  269. * Copyright (c) Meta Platforms, Inc. and affiliates.
  270. *
  271. * This source code is licensed under the MIT license found in the
  272. * LICENSE file in the root directory of this source tree.
  273. *)
  274. */
  275. //# sourceMappingURL=react_jsx-dev-runtime.js.map