@carbonorm/carbonreact 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -0
  3. package/dist/CarbonReact.cjs.css +13298 -0
  4. package/dist/CarbonReact.cjs.css.map +1 -0
  5. package/dist/CarbonReact.cjs.js +4659 -0
  6. package/dist/CarbonReact.cjs.js.map +1 -0
  7. package/dist/CarbonReact.d.ts +31 -0
  8. package/dist/CarbonReact.umd.css +13298 -0
  9. package/dist/CarbonReact.umd.css.map +1 -0
  10. package/dist/CarbonReact.umd.js +4653 -0
  11. package/dist/CarbonReact.umd.js.map +1 -0
  12. package/dist/_virtual/_commonjsHelpers.js +6 -0
  13. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  14. package/dist/_virtual/_react.js +3 -0
  15. package/dist/_virtual/_react.js.map +1 -0
  16. package/dist/_virtual/react-jsx-runtime.development.js +6 -0
  17. package/dist/_virtual/react-jsx-runtime.development.js.map +1 -0
  18. package/dist/_virtual/react-jsx-runtime.production.min.js +6 -0
  19. package/dist/_virtual/react-jsx-runtime.production.min.js.map +1 -0
  20. package/dist/components/Alert/Alert.d.ts +24 -0
  21. package/dist/components/Errors/AccessDenied.d.ts +4 -0
  22. package/dist/components/Errors/BackendThrowable.d.ts +1 -0
  23. package/dist/components/Errors/ErrorHttpCode.d.ts +5 -0
  24. package/dist/components/Errors/Localhost.d.ts +1 -0
  25. package/dist/components/Errors/PageNotFound.d.ts +1 -0
  26. package/dist/components/Loading/Loading.d.ts +9 -0
  27. package/dist/components/Nest/Nest.d.ts +49 -0
  28. package/dist/components/Popup/Popup.d.ts +9 -0
  29. package/dist/hoc/GlobalHistory.d.ts +6 -0
  30. package/dist/hoc/addValidSQL.d.ts +2 -0
  31. package/dist/hoc/axiosInstance.d.ts +5 -0
  32. package/dist/hoc/changed.d.ts +2 -0
  33. package/dist/hoc/deleteRestfulObjectArrays.d.ts +2 -0
  34. package/dist/hoc/getStyles.d.ts +7 -0
  35. package/dist/hoc/hexToRgb.d.ts +1 -0
  36. package/dist/hoc/isEdgeBrowser.d.ts +2 -0
  37. package/dist/hoc/parseMultipleJson.d.ts +1 -0
  38. package/dist/hoc/scrollIntoView.d.ts +1 -0
  39. package/dist/hoc/setUrl.d.ts +1 -0
  40. package/dist/hoc/updateRestfulObjectArrays.d.ts +17 -0
  41. package/dist/hoc/uploadImage.d.ts +4 -0
  42. package/dist/hoc/windowDimensions.d.ts +4 -0
  43. package/dist/index.css +13298 -0
  44. package/dist/index.css.map +1 -0
  45. package/dist/index.d.ts +52 -0
  46. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1313 -0
  47. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
  48. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +13 -0
  49. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
  50. package/dist/node_modules/react/jsx-runtime.js +18 -0
  51. package/dist/node_modules/react/jsx-runtime.js.map +1 -0
  52. package/dist/node_modules/react-toastify/dist/ReactToastify.min.css.js +5 -0
  53. package/dist/node_modules/react-toastify/dist/ReactToastify.min.css.js.map +1 -0
  54. package/dist/node_modules/style-inject/dist/style-inject.es.js +29 -0
  55. package/dist/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
  56. package/dist/node_modules/tslib/tslib.es6.js +34 -0
  57. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  58. package/dist/src/CarbonReact.js +68 -0
  59. package/dist/src/CarbonReact.js.map +1 -0
  60. package/dist/src/components/Alert/Alert.js +124 -0
  61. package/dist/src/components/Alert/Alert.js.map +1 -0
  62. package/dist/src/components/Errors/AccessDenied.js +20 -0
  63. package/dist/src/components/Errors/AccessDenied.js.map +1 -0
  64. package/dist/src/components/Errors/BackendThrowable.js +24 -0
  65. package/dist/src/components/Errors/BackendThrowable.js.map +1 -0
  66. package/dist/src/components/Errors/ErrorHttpCode.js +9 -0
  67. package/dist/src/components/Errors/ErrorHttpCode.js.map +1 -0
  68. package/dist/src/components/Errors/Localhost.js +28 -0
  69. package/dist/src/components/Errors/Localhost.js.map +1 -0
  70. package/dist/src/components/Errors/PageNotFound.js +9 -0
  71. package/dist/src/components/Errors/PageNotFound.js.map +1 -0
  72. package/dist/src/components/Errors/style.module.scss.js +4 -0
  73. package/dist/src/components/Errors/style.module.scss.js.map +1 -0
  74. package/dist/src/components/Loading/Loading.js +18 -0
  75. package/dist/src/components/Loading/Loading.js.map +1 -0
  76. package/dist/src/components/Nest/Nest.js +136 -0
  77. package/dist/src/components/Nest/Nest.js.map +1 -0
  78. package/dist/src/components/Popup/Popup.js +16 -0
  79. package/dist/src/components/Popup/Popup.js.map +1 -0
  80. package/dist/src/hoc/GlobalHistory.js +11 -0
  81. package/dist/src/hoc/GlobalHistory.js.map +1 -0
  82. package/dist/src/hoc/addValidSQL.js +8 -0
  83. package/dist/src/hoc/addValidSQL.js.map +1 -0
  84. package/dist/src/hoc/axiosInstance.js +317 -0
  85. package/dist/src/hoc/axiosInstance.js.map +1 -0
  86. package/dist/src/hoc/changed.js +32 -0
  87. package/dist/src/hoc/changed.js.map +1 -0
  88. package/dist/src/hoc/deleteRestfulObjectArrays.js +17 -0
  89. package/dist/src/hoc/deleteRestfulObjectArrays.js.map +1 -0
  90. package/dist/src/hoc/getStyles.js +26 -0
  91. package/dist/src/hoc/getStyles.js.map +1 -0
  92. package/dist/src/hoc/hexToRgb.js +11 -0
  93. package/dist/src/hoc/hexToRgb.js.map +1 -0
  94. package/dist/src/hoc/isEdgeBrowser.js +7 -0
  95. package/dist/src/hoc/isEdgeBrowser.js.map +1 -0
  96. package/dist/src/hoc/parseMultipleJson.js +29 -0
  97. package/dist/src/hoc/parseMultipleJson.js.map +1 -0
  98. package/dist/src/hoc/scrollIntoView.js +6 -0
  99. package/dist/src/hoc/scrollIntoView.js.map +1 -0
  100. package/dist/src/hoc/setUrl.js +41 -0
  101. package/dist/src/hoc/setUrl.js.map +1 -0
  102. package/dist/src/hoc/updateRestfulObjectArrays.js +64 -0
  103. package/dist/src/hoc/updateRestfulObjectArrays.js.map +1 -0
  104. package/dist/src/hoc/uploadImage.js +59 -0
  105. package/dist/src/hoc/uploadImage.js.map +1 -0
  106. package/dist/src/hoc/windowDimensions.js +23 -0
  107. package/dist/src/hoc/windowDimensions.js.map +1 -0
  108. package/dist/src/index.js +27 -0
  109. package/dist/src/index.js.map +1 -0
  110. package/dist/src/style.module.css.js +4 -0
  111. package/dist/src/style.module.css.js.map +1 -0
  112. package/dist/src/variables/C6.js +2227 -0
  113. package/dist/src/variables/C6.js.map +1 -0
  114. package/dist/src/variables/bootstrap.module.css.js +4 -0
  115. package/dist/src/variables/bootstrap.module.css.js.map +1 -0
  116. package/dist/src/variables/isProduction.js +4 -0
  117. package/dist/src/variables/isProduction.js.map +1 -0
  118. package/dist/variables/C6.d.ts +1008 -0
  119. package/dist/variables/isProduction.d.ts +2 -0
  120. package/package.json +73 -0
@@ -0,0 +1,1313 @@
1
+ import { createCommonjsModule } from '../../../_virtual/_commonjsHelpers.js';
2
+ import React from 'react';
3
+
4
+ var reactJsxRuntime_development = createCommonjsModule(function (module, exports) {
5
+
6
+ if (process.env.NODE_ENV !== "production") {
7
+ (function() {
8
+
9
+ var React$1 = React;
10
+
11
+ // ATTENTION
12
+ // When adding new symbols to this file,
13
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
14
+ // The Symbol used to tag the ReactElement-like types.
15
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
16
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
17
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
18
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
19
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
20
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
21
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
22
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
23
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
24
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
25
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
26
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
27
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
28
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
29
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
30
+ function getIteratorFn(maybeIterable) {
31
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
32
+ return null;
33
+ }
34
+
35
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
36
+
37
+ if (typeof maybeIterator === 'function') {
38
+ return maybeIterator;
39
+ }
40
+
41
+ return null;
42
+ }
43
+
44
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
45
+
46
+ function error(format) {
47
+ {
48
+ {
49
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
50
+ args[_key2 - 1] = arguments[_key2];
51
+ }
52
+
53
+ printWarning('error', format, args);
54
+ }
55
+ }
56
+ }
57
+
58
+ function printWarning(level, format, args) {
59
+ // When changing this logic, you might want to also
60
+ // update consoleWithStackDev.www.js as well.
61
+ {
62
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
63
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
64
+
65
+ if (stack !== '') {
66
+ format += '%s';
67
+ args = args.concat([stack]);
68
+ } // eslint-disable-next-line react-internal/safe-string-coercion
69
+
70
+
71
+ var argsWithFormat = args.map(function (item) {
72
+ return String(item);
73
+ }); // Careful: RN currently depends on this prefix
74
+
75
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
76
+ // breaks IE9: https://github.com/facebook/react/issues/13610
77
+ // eslint-disable-next-line react-internal/no-production-logging
78
+
79
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
80
+ }
81
+ }
82
+
83
+ // -----------------------------------------------------------------------------
84
+
85
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
86
+ var enableCacheElement = false;
87
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
88
+
89
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
90
+ // stuff. Intended to enable React core members to more easily debug scheduling
91
+ // issues in DEV builds.
92
+
93
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
94
+
95
+ var REACT_MODULE_REFERENCE;
96
+
97
+ {
98
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
99
+ }
100
+
101
+ function isValidElementType(type) {
102
+ if (typeof type === 'string' || typeof type === 'function') {
103
+ return true;
104
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
105
+
106
+
107
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
108
+ return true;
109
+ }
110
+
111
+ if (typeof type === 'object' && type !== null) {
112
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
113
+ // types supported by any Flight configuration anywhere since
114
+ // we don't know which Flight build this will end up being used
115
+ // with.
116
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
117
+ return true;
118
+ }
119
+ }
120
+
121
+ return false;
122
+ }
123
+
124
+ function getWrappedName(outerType, innerType, wrapperName) {
125
+ var displayName = outerType.displayName;
126
+
127
+ if (displayName) {
128
+ return displayName;
129
+ }
130
+
131
+ var functionName = innerType.displayName || innerType.name || '';
132
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
133
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
134
+
135
+
136
+ function getContextName(type) {
137
+ return type.displayName || 'Context';
138
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
139
+
140
+
141
+ function getComponentNameFromType(type) {
142
+ if (type == null) {
143
+ // Host root, text node or just invalid type.
144
+ return null;
145
+ }
146
+
147
+ {
148
+ if (typeof type.tag === 'number') {
149
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
150
+ }
151
+ }
152
+
153
+ if (typeof type === 'function') {
154
+ return type.displayName || type.name || null;
155
+ }
156
+
157
+ if (typeof type === 'string') {
158
+ return type;
159
+ }
160
+
161
+ switch (type) {
162
+ case REACT_FRAGMENT_TYPE:
163
+ return 'Fragment';
164
+
165
+ case REACT_PORTAL_TYPE:
166
+ return 'Portal';
167
+
168
+ case REACT_PROFILER_TYPE:
169
+ return 'Profiler';
170
+
171
+ case REACT_STRICT_MODE_TYPE:
172
+ return 'StrictMode';
173
+
174
+ case REACT_SUSPENSE_TYPE:
175
+ return 'Suspense';
176
+
177
+ case REACT_SUSPENSE_LIST_TYPE:
178
+ return 'SuspenseList';
179
+
180
+ }
181
+
182
+ if (typeof type === 'object') {
183
+ switch (type.$$typeof) {
184
+ case REACT_CONTEXT_TYPE:
185
+ var context = type;
186
+ return getContextName(context) + '.Consumer';
187
+
188
+ case REACT_PROVIDER_TYPE:
189
+ var provider = type;
190
+ return getContextName(provider._context) + '.Provider';
191
+
192
+ case REACT_FORWARD_REF_TYPE:
193
+ return getWrappedName(type, type.render, 'ForwardRef');
194
+
195
+ case REACT_MEMO_TYPE:
196
+ var outerName = type.displayName || null;
197
+
198
+ if (outerName !== null) {
199
+ return outerName;
200
+ }
201
+
202
+ return getComponentNameFromType(type.type) || 'Memo';
203
+
204
+ case REACT_LAZY_TYPE:
205
+ {
206
+ var lazyComponent = type;
207
+ var payload = lazyComponent._payload;
208
+ var init = lazyComponent._init;
209
+
210
+ try {
211
+ return getComponentNameFromType(init(payload));
212
+ } catch (x) {
213
+ return null;
214
+ }
215
+ }
216
+
217
+ // eslint-disable-next-line no-fallthrough
218
+ }
219
+ }
220
+
221
+ return null;
222
+ }
223
+
224
+ var assign = Object.assign;
225
+
226
+ // Helpers to patch console.logs to avoid logging during side-effect free
227
+ // replaying on render function. This currently only patches the object
228
+ // lazily which won't cover if the log function was extracted eagerly.
229
+ // We could also eagerly patch the method.
230
+ var disabledDepth = 0;
231
+ var prevLog;
232
+ var prevInfo;
233
+ var prevWarn;
234
+ var prevError;
235
+ var prevGroup;
236
+ var prevGroupCollapsed;
237
+ var prevGroupEnd;
238
+
239
+ function disabledLog() {}
240
+
241
+ disabledLog.__reactDisabledLog = true;
242
+ function disableLogs() {
243
+ {
244
+ if (disabledDepth === 0) {
245
+ /* eslint-disable react-internal/no-production-logging */
246
+ prevLog = console.log;
247
+ prevInfo = console.info;
248
+ prevWarn = console.warn;
249
+ prevError = console.error;
250
+ prevGroup = console.group;
251
+ prevGroupCollapsed = console.groupCollapsed;
252
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
253
+
254
+ var props = {
255
+ configurable: true,
256
+ enumerable: true,
257
+ value: disabledLog,
258
+ writable: true
259
+ }; // $FlowFixMe Flow thinks console is immutable.
260
+
261
+ Object.defineProperties(console, {
262
+ info: props,
263
+ log: props,
264
+ warn: props,
265
+ error: props,
266
+ group: props,
267
+ groupCollapsed: props,
268
+ groupEnd: props
269
+ });
270
+ /* eslint-enable react-internal/no-production-logging */
271
+ }
272
+
273
+ disabledDepth++;
274
+ }
275
+ }
276
+ function reenableLogs() {
277
+ {
278
+ disabledDepth--;
279
+
280
+ if (disabledDepth === 0) {
281
+ /* eslint-disable react-internal/no-production-logging */
282
+ var props = {
283
+ configurable: true,
284
+ enumerable: true,
285
+ writable: true
286
+ }; // $FlowFixMe Flow thinks console is immutable.
287
+
288
+ Object.defineProperties(console, {
289
+ log: assign({}, props, {
290
+ value: prevLog
291
+ }),
292
+ info: assign({}, props, {
293
+ value: prevInfo
294
+ }),
295
+ warn: assign({}, props, {
296
+ value: prevWarn
297
+ }),
298
+ error: assign({}, props, {
299
+ value: prevError
300
+ }),
301
+ group: assign({}, props, {
302
+ value: prevGroup
303
+ }),
304
+ groupCollapsed: assign({}, props, {
305
+ value: prevGroupCollapsed
306
+ }),
307
+ groupEnd: assign({}, props, {
308
+ value: prevGroupEnd
309
+ })
310
+ });
311
+ /* eslint-enable react-internal/no-production-logging */
312
+ }
313
+
314
+ if (disabledDepth < 0) {
315
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
316
+ }
317
+ }
318
+ }
319
+
320
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
321
+ var prefix;
322
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
323
+ {
324
+ if (prefix === undefined) {
325
+ // Extract the VM specific prefix used by each line.
326
+ try {
327
+ throw Error();
328
+ } catch (x) {
329
+ var match = x.stack.trim().match(/\n( *(at )?)/);
330
+ prefix = match && match[1] || '';
331
+ }
332
+ } // We use the prefix to ensure our stacks line up with native stack frames.
333
+
334
+
335
+ return '\n' + prefix + name;
336
+ }
337
+ }
338
+ var reentry = false;
339
+ var componentFrameCache;
340
+
341
+ {
342
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
343
+ componentFrameCache = new PossiblyWeakMap();
344
+ }
345
+
346
+ function describeNativeComponentFrame(fn, construct) {
347
+ // If something asked for a stack inside a fake render, it should get ignored.
348
+ if ( !fn || reentry) {
349
+ return '';
350
+ }
351
+
352
+ {
353
+ var frame = componentFrameCache.get(fn);
354
+
355
+ if (frame !== undefined) {
356
+ return frame;
357
+ }
358
+ }
359
+
360
+ var control;
361
+ reentry = true;
362
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
363
+
364
+ Error.prepareStackTrace = undefined;
365
+ var previousDispatcher;
366
+
367
+ {
368
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
369
+ // for warnings.
370
+
371
+ ReactCurrentDispatcher.current = null;
372
+ disableLogs();
373
+ }
374
+
375
+ try {
376
+ // This should throw.
377
+ if (construct) {
378
+ // Something should be setting the props in the constructor.
379
+ var Fake = function () {
380
+ throw Error();
381
+ }; // $FlowFixMe
382
+
383
+
384
+ Object.defineProperty(Fake.prototype, 'props', {
385
+ set: function () {
386
+ // We use a throwing setter instead of frozen or non-writable props
387
+ // because that won't throw in a non-strict mode function.
388
+ throw Error();
389
+ }
390
+ });
391
+
392
+ if (typeof Reflect === 'object' && Reflect.construct) {
393
+ // We construct a different control for this case to include any extra
394
+ // frames added by the construct call.
395
+ try {
396
+ Reflect.construct(Fake, []);
397
+ } catch (x) {
398
+ control = x;
399
+ }
400
+
401
+ Reflect.construct(fn, [], Fake);
402
+ } else {
403
+ try {
404
+ Fake.call();
405
+ } catch (x) {
406
+ control = x;
407
+ }
408
+
409
+ fn.call(Fake.prototype);
410
+ }
411
+ } else {
412
+ try {
413
+ throw Error();
414
+ } catch (x) {
415
+ control = x;
416
+ }
417
+
418
+ fn();
419
+ }
420
+ } catch (sample) {
421
+ // This is inlined manually because closure doesn't do it for us.
422
+ if (sample && control && typeof sample.stack === 'string') {
423
+ // This extracts the first frame from the sample that isn't also in the control.
424
+ // Skipping one frame that we assume is the frame that calls the two.
425
+ var sampleLines = sample.stack.split('\n');
426
+ var controlLines = control.stack.split('\n');
427
+ var s = sampleLines.length - 1;
428
+ var c = controlLines.length - 1;
429
+
430
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
431
+ // We expect at least one stack frame to be shared.
432
+ // Typically this will be the root most one. However, stack frames may be
433
+ // cut off due to maximum stack limits. In this case, one maybe cut off
434
+ // earlier than the other. We assume that the sample is longer or the same
435
+ // and there for cut off earlier. So we should find the root most frame in
436
+ // the sample somewhere in the control.
437
+ c--;
438
+ }
439
+
440
+ for (; s >= 1 && c >= 0; s--, c--) {
441
+ // Next we find the first one that isn't the same which should be the
442
+ // frame that called our sample function and the control.
443
+ if (sampleLines[s] !== controlLines[c]) {
444
+ // In V8, the first line is describing the message but other VMs don't.
445
+ // If we're about to return the first line, and the control is also on the same
446
+ // line, that's a pretty good indicator that our sample threw at same line as
447
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
448
+ // This can happen if you passed a class to function component, or non-function.
449
+ if (s !== 1 || c !== 1) {
450
+ do {
451
+ s--;
452
+ c--; // We may still have similar intermediate frames from the construct call.
453
+ // The next one that isn't the same should be our match though.
454
+
455
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
456
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
457
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
458
+ // but we have a user-provided "displayName"
459
+ // splice it in to make the stack more readable.
460
+
461
+
462
+ if (fn.displayName && _frame.includes('<anonymous>')) {
463
+ _frame = _frame.replace('<anonymous>', fn.displayName);
464
+ }
465
+
466
+ {
467
+ if (typeof fn === 'function') {
468
+ componentFrameCache.set(fn, _frame);
469
+ }
470
+ } // Return the line we found.
471
+
472
+
473
+ return _frame;
474
+ }
475
+ } while (s >= 1 && c >= 0);
476
+ }
477
+
478
+ break;
479
+ }
480
+ }
481
+ }
482
+ } finally {
483
+ reentry = false;
484
+
485
+ {
486
+ ReactCurrentDispatcher.current = previousDispatcher;
487
+ reenableLogs();
488
+ }
489
+
490
+ Error.prepareStackTrace = previousPrepareStackTrace;
491
+ } // Fallback to just using the name if we couldn't make it throw.
492
+
493
+
494
+ var name = fn ? fn.displayName || fn.name : '';
495
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
496
+
497
+ {
498
+ if (typeof fn === 'function') {
499
+ componentFrameCache.set(fn, syntheticFrame);
500
+ }
501
+ }
502
+
503
+ return syntheticFrame;
504
+ }
505
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
506
+ {
507
+ return describeNativeComponentFrame(fn, false);
508
+ }
509
+ }
510
+
511
+ function shouldConstruct(Component) {
512
+ var prototype = Component.prototype;
513
+ return !!(prototype && prototype.isReactComponent);
514
+ }
515
+
516
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
517
+
518
+ if (type == null) {
519
+ return '';
520
+ }
521
+
522
+ if (typeof type === 'function') {
523
+ {
524
+ return describeNativeComponentFrame(type, shouldConstruct(type));
525
+ }
526
+ }
527
+
528
+ if (typeof type === 'string') {
529
+ return describeBuiltInComponentFrame(type);
530
+ }
531
+
532
+ switch (type) {
533
+ case REACT_SUSPENSE_TYPE:
534
+ return describeBuiltInComponentFrame('Suspense');
535
+
536
+ case REACT_SUSPENSE_LIST_TYPE:
537
+ return describeBuiltInComponentFrame('SuspenseList');
538
+ }
539
+
540
+ if (typeof type === 'object') {
541
+ switch (type.$$typeof) {
542
+ case REACT_FORWARD_REF_TYPE:
543
+ return describeFunctionComponentFrame(type.render);
544
+
545
+ case REACT_MEMO_TYPE:
546
+ // Memo may contain any component type so we recursively resolve it.
547
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
548
+
549
+ case REACT_LAZY_TYPE:
550
+ {
551
+ var lazyComponent = type;
552
+ var payload = lazyComponent._payload;
553
+ var init = lazyComponent._init;
554
+
555
+ try {
556
+ // Lazy may contain any component type so we recursively resolve it.
557
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
558
+ } catch (x) {}
559
+ }
560
+ }
561
+ }
562
+
563
+ return '';
564
+ }
565
+
566
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
567
+
568
+ var loggedTypeFailures = {};
569
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
570
+
571
+ function setCurrentlyValidatingElement(element) {
572
+ {
573
+ if (element) {
574
+ var owner = element._owner;
575
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
576
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
577
+ } else {
578
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
579
+ }
580
+ }
581
+ }
582
+
583
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
584
+ {
585
+ // $FlowFixMe This is okay but Flow doesn't know it.
586
+ var has = Function.call.bind(hasOwnProperty);
587
+
588
+ for (var typeSpecName in typeSpecs) {
589
+ if (has(typeSpecs, typeSpecName)) {
590
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
591
+ // fail the render phase where it didn't fail before. So we log it.
592
+ // After these have been cleaned up, we'll let them throw.
593
+
594
+ try {
595
+ // This is intentionally an invariant that gets caught. It's the same
596
+ // behavior as without this statement except with a better message.
597
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
598
+ // eslint-disable-next-line react-internal/prod-error-codes
599
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
600
+ err.name = 'Invariant Violation';
601
+ throw err;
602
+ }
603
+
604
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
605
+ } catch (ex) {
606
+ error$1 = ex;
607
+ }
608
+
609
+ if (error$1 && !(error$1 instanceof Error)) {
610
+ setCurrentlyValidatingElement(element);
611
+
612
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
613
+
614
+ setCurrentlyValidatingElement(null);
615
+ }
616
+
617
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
618
+ // Only monitor this failure once because there tends to be a lot of the
619
+ // same error.
620
+ loggedTypeFailures[error$1.message] = true;
621
+ setCurrentlyValidatingElement(element);
622
+
623
+ error('Failed %s type: %s', location, error$1.message);
624
+
625
+ setCurrentlyValidatingElement(null);
626
+ }
627
+ }
628
+ }
629
+ }
630
+ }
631
+
632
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
633
+
634
+ function isArray(a) {
635
+ return isArrayImpl(a);
636
+ }
637
+
638
+ /*
639
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
640
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
641
+ *
642
+ * The functions in this module will throw an easier-to-understand,
643
+ * easier-to-debug exception with a clear errors message message explaining the
644
+ * problem. (Instead of a confusing exception thrown inside the implementation
645
+ * of the `value` object).
646
+ */
647
+ // $FlowFixMe only called in DEV, so void return is not possible.
648
+ function typeName(value) {
649
+ {
650
+ // toStringTag is needed for namespaced types like Temporal.Instant
651
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
652
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
653
+ return type;
654
+ }
655
+ } // $FlowFixMe only called in DEV, so void return is not possible.
656
+
657
+
658
+ function willCoercionThrow(value) {
659
+ {
660
+ try {
661
+ testStringCoercion(value);
662
+ return false;
663
+ } catch (e) {
664
+ return true;
665
+ }
666
+ }
667
+ }
668
+
669
+ function testStringCoercion(value) {
670
+ // If you ended up here by following an exception call stack, here's what's
671
+ // happened: you supplied an object or symbol value to React (as a prop, key,
672
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
673
+ // coerce it to a string using `'' + value`, an exception was thrown.
674
+ //
675
+ // The most common types that will cause this exception are `Symbol` instances
676
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
677
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
678
+ // exception. (Library authors do this to prevent users from using built-in
679
+ // numeric operators like `+` or comparison operators like `>=` because custom
680
+ // methods are needed to perform accurate arithmetic or comparison.)
681
+ //
682
+ // To fix the problem, coerce this object or symbol value to a string before
683
+ // passing it to React. The most reliable way is usually `String(value)`.
684
+ //
685
+ // To find which value is throwing, check the browser or debugger console.
686
+ // Before this exception was thrown, there should be `console.error` output
687
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
688
+ // problem and how that type was used: key, atrribute, input value prop, etc.
689
+ // In most cases, this console output also shows the component and its
690
+ // ancestor components where the exception happened.
691
+ //
692
+ // eslint-disable-next-line react-internal/safe-string-coercion
693
+ return '' + value;
694
+ }
695
+ function checkKeyStringCoercion(value) {
696
+ {
697
+ if (willCoercionThrow(value)) {
698
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
699
+
700
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
701
+ }
702
+ }
703
+ }
704
+
705
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
706
+ var RESERVED_PROPS = {
707
+ key: true,
708
+ ref: true,
709
+ __self: true,
710
+ __source: true
711
+ };
712
+ var specialPropKeyWarningShown;
713
+ var specialPropRefWarningShown;
714
+ var didWarnAboutStringRefs;
715
+
716
+ {
717
+ didWarnAboutStringRefs = {};
718
+ }
719
+
720
+ function hasValidRef(config) {
721
+ {
722
+ if (hasOwnProperty.call(config, 'ref')) {
723
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
724
+
725
+ if (getter && getter.isReactWarning) {
726
+ return false;
727
+ }
728
+ }
729
+ }
730
+
731
+ return config.ref !== undefined;
732
+ }
733
+
734
+ function hasValidKey(config) {
735
+ {
736
+ if (hasOwnProperty.call(config, 'key')) {
737
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
738
+
739
+ if (getter && getter.isReactWarning) {
740
+ return false;
741
+ }
742
+ }
743
+ }
744
+
745
+ return config.key !== undefined;
746
+ }
747
+
748
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
749
+ {
750
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
751
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
752
+
753
+ if (!didWarnAboutStringRefs[componentName]) {
754
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
755
+
756
+ didWarnAboutStringRefs[componentName] = true;
757
+ }
758
+ }
759
+ }
760
+ }
761
+
762
+ function defineKeyPropWarningGetter(props, displayName) {
763
+ {
764
+ var warnAboutAccessingKey = function () {
765
+ if (!specialPropKeyWarningShown) {
766
+ specialPropKeyWarningShown = true;
767
+
768
+ error('%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://reactjs.org/link/special-props)', displayName);
769
+ }
770
+ };
771
+
772
+ warnAboutAccessingKey.isReactWarning = true;
773
+ Object.defineProperty(props, 'key', {
774
+ get: warnAboutAccessingKey,
775
+ configurable: true
776
+ });
777
+ }
778
+ }
779
+
780
+ function defineRefPropWarningGetter(props, displayName) {
781
+ {
782
+ var warnAboutAccessingRef = function () {
783
+ if (!specialPropRefWarningShown) {
784
+ specialPropRefWarningShown = true;
785
+
786
+ error('%s: `ref` 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://reactjs.org/link/special-props)', displayName);
787
+ }
788
+ };
789
+
790
+ warnAboutAccessingRef.isReactWarning = true;
791
+ Object.defineProperty(props, 'ref', {
792
+ get: warnAboutAccessingRef,
793
+ configurable: true
794
+ });
795
+ }
796
+ }
797
+ /**
798
+ * Factory method to create a new React element. This no longer adheres to
799
+ * the class pattern, so do not use new to call it. Also, instanceof check
800
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
801
+ * if something is a React Element.
802
+ *
803
+ * @param {*} type
804
+ * @param {*} props
805
+ * @param {*} key
806
+ * @param {string|object} ref
807
+ * @param {*} owner
808
+ * @param {*} self A *temporary* helper to detect places where `this` is
809
+ * different from the `owner` when React.createElement is called, so that we
810
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
811
+ * functions, and as long as `this` and owner are the same, there will be no
812
+ * change in behavior.
813
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
814
+ * indicating filename, line number, and/or other information.
815
+ * @internal
816
+ */
817
+
818
+
819
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
820
+ var element = {
821
+ // This tag allows us to uniquely identify this as a React Element
822
+ $$typeof: REACT_ELEMENT_TYPE,
823
+ // Built-in properties that belong on the element
824
+ type: type,
825
+ key: key,
826
+ ref: ref,
827
+ props: props,
828
+ // Record the component responsible for creating this element.
829
+ _owner: owner
830
+ };
831
+
832
+ {
833
+ // The validation flag is currently mutative. We put it on
834
+ // an external backing store so that we can freeze the whole object.
835
+ // This can be replaced with a WeakMap once they are implemented in
836
+ // commonly used development environments.
837
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
838
+ // the validation flag non-enumerable (where possible, which should
839
+ // include every environment we run tests in), so the test framework
840
+ // ignores it.
841
+
842
+ Object.defineProperty(element._store, 'validated', {
843
+ configurable: false,
844
+ enumerable: false,
845
+ writable: true,
846
+ value: false
847
+ }); // self and source are DEV only properties.
848
+
849
+ Object.defineProperty(element, '_self', {
850
+ configurable: false,
851
+ enumerable: false,
852
+ writable: false,
853
+ value: self
854
+ }); // Two elements created in two different places should be considered
855
+ // equal for testing purposes and therefore we hide it from enumeration.
856
+
857
+ Object.defineProperty(element, '_source', {
858
+ configurable: false,
859
+ enumerable: false,
860
+ writable: false,
861
+ value: source
862
+ });
863
+
864
+ if (Object.freeze) {
865
+ Object.freeze(element.props);
866
+ Object.freeze(element);
867
+ }
868
+ }
869
+
870
+ return element;
871
+ };
872
+ /**
873
+ * https://github.com/reactjs/rfcs/pull/107
874
+ * @param {*} type
875
+ * @param {object} props
876
+ * @param {string} key
877
+ */
878
+
879
+ function jsxDEV(type, config, maybeKey, source, self) {
880
+ {
881
+ var propName; // Reserved names are extracted
882
+
883
+ var props = {};
884
+ var key = null;
885
+ var ref = null; // Currently, key can be spread in as a prop. This causes a potential
886
+ // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
887
+ // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
888
+ // but as an intermediary step, we will use jsxDEV for everything except
889
+ // <div {...props} key="Hi" />, because we aren't currently able to tell if
890
+ // key is explicitly declared to be undefined or not.
891
+
892
+ if (maybeKey !== undefined) {
893
+ {
894
+ checkKeyStringCoercion(maybeKey);
895
+ }
896
+
897
+ key = '' + maybeKey;
898
+ }
899
+
900
+ if (hasValidKey(config)) {
901
+ {
902
+ checkKeyStringCoercion(config.key);
903
+ }
904
+
905
+ key = '' + config.key;
906
+ }
907
+
908
+ if (hasValidRef(config)) {
909
+ ref = config.ref;
910
+ warnIfStringRefCannotBeAutoConverted(config, self);
911
+ } // Remaining properties are added to a new props object
912
+
913
+
914
+ for (propName in config) {
915
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
916
+ props[propName] = config[propName];
917
+ }
918
+ } // Resolve default props
919
+
920
+
921
+ if (type && type.defaultProps) {
922
+ var defaultProps = type.defaultProps;
923
+
924
+ for (propName in defaultProps) {
925
+ if (props[propName] === undefined) {
926
+ props[propName] = defaultProps[propName];
927
+ }
928
+ }
929
+ }
930
+
931
+ if (key || ref) {
932
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
933
+
934
+ if (key) {
935
+ defineKeyPropWarningGetter(props, displayName);
936
+ }
937
+
938
+ if (ref) {
939
+ defineRefPropWarningGetter(props, displayName);
940
+ }
941
+ }
942
+
943
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
944
+ }
945
+ }
946
+
947
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
948
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
949
+
950
+ function setCurrentlyValidatingElement$1(element) {
951
+ {
952
+ if (element) {
953
+ var owner = element._owner;
954
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
955
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
956
+ } else {
957
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
958
+ }
959
+ }
960
+ }
961
+
962
+ var propTypesMisspellWarningShown;
963
+
964
+ {
965
+ propTypesMisspellWarningShown = false;
966
+ }
967
+ /**
968
+ * Verifies the object is a ReactElement.
969
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
970
+ * @param {?object} object
971
+ * @return {boolean} True if `object` is a ReactElement.
972
+ * @final
973
+ */
974
+
975
+
976
+ function isValidElement(object) {
977
+ {
978
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
979
+ }
980
+ }
981
+
982
+ function getDeclarationErrorAddendum() {
983
+ {
984
+ if (ReactCurrentOwner$1.current) {
985
+ var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
986
+
987
+ if (name) {
988
+ return '\n\nCheck the render method of `' + name + '`.';
989
+ }
990
+ }
991
+
992
+ return '';
993
+ }
994
+ }
995
+
996
+ function getSourceInfoErrorAddendum(source) {
997
+ {
998
+ if (source !== undefined) {
999
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
1000
+ var lineNumber = source.lineNumber;
1001
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
1002
+ }
1003
+
1004
+ return '';
1005
+ }
1006
+ }
1007
+ /**
1008
+ * Warn if there's no key explicitly set on dynamic arrays of children or
1009
+ * object keys are not valid. This allows us to keep track of children between
1010
+ * updates.
1011
+ */
1012
+
1013
+
1014
+ var ownerHasKeyUseWarning = {};
1015
+
1016
+ function getCurrentComponentErrorInfo(parentType) {
1017
+ {
1018
+ var info = getDeclarationErrorAddendum();
1019
+
1020
+ if (!info) {
1021
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
1022
+
1023
+ if (parentName) {
1024
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1025
+ }
1026
+ }
1027
+
1028
+ return info;
1029
+ }
1030
+ }
1031
+ /**
1032
+ * Warn if the element doesn't have an explicit key assigned to it.
1033
+ * This element is in an array. The array could grow and shrink or be
1034
+ * reordered. All children that haven't already been validated are required to
1035
+ * have a "key" property assigned to it. Error statuses are cached so a warning
1036
+ * will only be shown once.
1037
+ *
1038
+ * @internal
1039
+ * @param {ReactElement} element Element that requires a key.
1040
+ * @param {*} parentType element's parent's type.
1041
+ */
1042
+
1043
+
1044
+ function validateExplicitKey(element, parentType) {
1045
+ {
1046
+ if (!element._store || element._store.validated || element.key != null) {
1047
+ return;
1048
+ }
1049
+
1050
+ element._store.validated = true;
1051
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1052
+
1053
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1054
+ return;
1055
+ }
1056
+
1057
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1058
+ // property, it may be the creator of the child that's responsible for
1059
+ // assigning it a key.
1060
+
1061
+ var childOwner = '';
1062
+
1063
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
1064
+ // Give the component that originally created this child.
1065
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1066
+ }
1067
+
1068
+ setCurrentlyValidatingElement$1(element);
1069
+
1070
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1071
+
1072
+ setCurrentlyValidatingElement$1(null);
1073
+ }
1074
+ }
1075
+ /**
1076
+ * Ensure that every element either is passed in a static location, in an
1077
+ * array with an explicit keys property defined, or in an object literal
1078
+ * with valid key property.
1079
+ *
1080
+ * @internal
1081
+ * @param {ReactNode} node Statically passed child of any type.
1082
+ * @param {*} parentType node's parent's type.
1083
+ */
1084
+
1085
+
1086
+ function validateChildKeys(node, parentType) {
1087
+ {
1088
+ if (typeof node !== 'object') {
1089
+ return;
1090
+ }
1091
+
1092
+ if (isArray(node)) {
1093
+ for (var i = 0; i < node.length; i++) {
1094
+ var child = node[i];
1095
+
1096
+ if (isValidElement(child)) {
1097
+ validateExplicitKey(child, parentType);
1098
+ }
1099
+ }
1100
+ } else if (isValidElement(node)) {
1101
+ // This element was passed in a valid location.
1102
+ if (node._store) {
1103
+ node._store.validated = true;
1104
+ }
1105
+ } else if (node) {
1106
+ var iteratorFn = getIteratorFn(node);
1107
+
1108
+ if (typeof iteratorFn === 'function') {
1109
+ // Entry iterators used to provide implicit keys,
1110
+ // but now we print a separate warning for them later.
1111
+ if (iteratorFn !== node.entries) {
1112
+ var iterator = iteratorFn.call(node);
1113
+ var step;
1114
+
1115
+ while (!(step = iterator.next()).done) {
1116
+ if (isValidElement(step.value)) {
1117
+ validateExplicitKey(step.value, parentType);
1118
+ }
1119
+ }
1120
+ }
1121
+ }
1122
+ }
1123
+ }
1124
+ }
1125
+ /**
1126
+ * Given an element, validate that its props follow the propTypes definition,
1127
+ * provided by the type.
1128
+ *
1129
+ * @param {ReactElement} element
1130
+ */
1131
+
1132
+
1133
+ function validatePropTypes(element) {
1134
+ {
1135
+ var type = element.type;
1136
+
1137
+ if (type === null || type === undefined || typeof type === 'string') {
1138
+ return;
1139
+ }
1140
+
1141
+ var propTypes;
1142
+
1143
+ if (typeof type === 'function') {
1144
+ propTypes = type.propTypes;
1145
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1146
+ // Inner props are checked in the reconciler.
1147
+ type.$$typeof === REACT_MEMO_TYPE)) {
1148
+ propTypes = type.propTypes;
1149
+ } else {
1150
+ return;
1151
+ }
1152
+
1153
+ if (propTypes) {
1154
+ // Intentionally inside to avoid triggering lazy initializers:
1155
+ var name = getComponentNameFromType(type);
1156
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
1157
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
1158
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
1159
+
1160
+ var _name = getComponentNameFromType(type);
1161
+
1162
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
1163
+ }
1164
+
1165
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
1166
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1167
+ }
1168
+ }
1169
+ }
1170
+ /**
1171
+ * Given a fragment, validate that it can only be provided with fragment props
1172
+ * @param {ReactElement} fragment
1173
+ */
1174
+
1175
+
1176
+ function validateFragmentProps(fragment) {
1177
+ {
1178
+ var keys = Object.keys(fragment.props);
1179
+
1180
+ for (var i = 0; i < keys.length; i++) {
1181
+ var key = keys[i];
1182
+
1183
+ if (key !== 'children' && key !== 'key') {
1184
+ setCurrentlyValidatingElement$1(fragment);
1185
+
1186
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
1187
+
1188
+ setCurrentlyValidatingElement$1(null);
1189
+ break;
1190
+ }
1191
+ }
1192
+
1193
+ if (fragment.ref !== null) {
1194
+ setCurrentlyValidatingElement$1(fragment);
1195
+
1196
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
1197
+
1198
+ setCurrentlyValidatingElement$1(null);
1199
+ }
1200
+ }
1201
+ }
1202
+
1203
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
1204
+ {
1205
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
1206
+ // succeed and there will likely be errors in render.
1207
+
1208
+ if (!validType) {
1209
+ var info = '';
1210
+
1211
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1212
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
1213
+ }
1214
+
1215
+ var sourceInfo = getSourceInfoErrorAddendum(source);
1216
+
1217
+ if (sourceInfo) {
1218
+ info += sourceInfo;
1219
+ } else {
1220
+ info += getDeclarationErrorAddendum();
1221
+ }
1222
+
1223
+ var typeString;
1224
+
1225
+ if (type === null) {
1226
+ typeString = 'null';
1227
+ } else if (isArray(type)) {
1228
+ typeString = 'array';
1229
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1230
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
1231
+ info = ' Did you accidentally export a JSX literal instead of a component?';
1232
+ } else {
1233
+ typeString = typeof type;
1234
+ }
1235
+
1236
+ error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
1237
+ }
1238
+
1239
+ var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
1240
+ // TODO: Drop this when these are no longer allowed as the type argument.
1241
+
1242
+ if (element == null) {
1243
+ return element;
1244
+ } // Skip key warning if the type isn't valid since our key validation logic
1245
+ // doesn't expect a non-string/function type and can throw confusing errors.
1246
+ // We don't want exception behavior to differ between dev and prod.
1247
+ // (Rendering will throw with a helpful message and as soon as the type is
1248
+ // fixed, the key warnings will appear.)
1249
+
1250
+
1251
+ if (validType) {
1252
+ var children = props.children;
1253
+
1254
+ if (children !== undefined) {
1255
+ if (isStaticChildren) {
1256
+ if (isArray(children)) {
1257
+ for (var i = 0; i < children.length; i++) {
1258
+ validateChildKeys(children[i], type);
1259
+ }
1260
+
1261
+ if (Object.freeze) {
1262
+ Object.freeze(children);
1263
+ }
1264
+ } else {
1265
+ error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
1266
+ }
1267
+ } else {
1268
+ validateChildKeys(children, type);
1269
+ }
1270
+ }
1271
+ }
1272
+
1273
+ if (type === REACT_FRAGMENT_TYPE) {
1274
+ validateFragmentProps(element);
1275
+ } else {
1276
+ validatePropTypes(element);
1277
+ }
1278
+
1279
+ return element;
1280
+ }
1281
+ } // These two functions exist to still get child warnings in dev
1282
+ // even with the prod transform. This means that jsxDEV is purely
1283
+ // opt-in behavior for better messages but that we won't stop
1284
+ // giving you warnings if you use production apis.
1285
+
1286
+ function jsxWithValidationStatic(type, props, key) {
1287
+ {
1288
+ return jsxWithValidation(type, props, key, true);
1289
+ }
1290
+ }
1291
+ function jsxWithValidationDynamic(type, props, key) {
1292
+ {
1293
+ return jsxWithValidation(type, props, key, false);
1294
+ }
1295
+ }
1296
+
1297
+ var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
1298
+ // for now we can ship identical prod functions
1299
+
1300
+ var jsxs = jsxWithValidationStatic ;
1301
+
1302
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1303
+ exports.jsx = jsx;
1304
+ exports.jsxs = jsxs;
1305
+ })();
1306
+ }
1307
+ });
1308
+ reactJsxRuntime_development.Fragment;
1309
+ reactJsxRuntime_development.jsx;
1310
+ reactJsxRuntime_development.jsxs;
1311
+
1312
+ export { reactJsxRuntime_development as __moduleExports, reactJsxRuntime_development as default };
1313
+ //# sourceMappingURL=react-jsx-runtime.development.js.map