keycloakify 11.4.0-rc.0 → 11.4.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 (93) hide show
  1. package/README.md +2 -0
  2. package/account/i18n/noJsx/getI18n.js +5 -7
  3. package/account/i18n/noJsx/getI18n.js.map +1 -1
  4. package/account/i18n/withJsx/useI18n.js +15 -4
  5. package/account/i18n/withJsx/useI18n.js.map +1 -1
  6. package/bin/20.index.js +0 -85
  7. package/bin/33.index.js +55 -212
  8. package/bin/356.index.js +106 -45
  9. package/bin/36.index.js +1 -2922
  10. package/bin/{526.index.js → 392.index.js} +89 -3
  11. package/bin/40.index.js +1 -86
  12. package/bin/453.index.js +85 -22
  13. package/bin/573.index.js +4 -86
  14. package/bin/653.index.js +752 -0
  15. package/bin/658.index.js +197 -0
  16. package/bin/735.index.js +343 -116
  17. package/bin/786.index.js +78 -14
  18. package/bin/805.index.js +15 -18
  19. package/bin/921.index.js +79 -18
  20. package/bin/97.index.js +64 -13
  21. package/bin/main.js +165 -86
  22. package/bin/shared/constants.d.ts +2 -0
  23. package/bin/shared/constants.js +3 -1
  24. package/bin/shared/constants.js.map +1 -1
  25. package/bin/start-keycloak/startViteDevServer.d.ts +7 -0
  26. package/bin/tools/crawlAsync.d.ts +1 -1
  27. package/bin/tools/isTrackedByGit.d.ts +3 -0
  28. package/bin/tools/runPrettier.d.ts +5 -5
  29. package/bin/tools/untrackFromGit.d.ts +3 -0
  30. package/lib/getKcClsx.js +1 -2
  31. package/lib/getKcClsx.js.map +1 -1
  32. package/login/KcContext/KcContext.d.ts +2 -2
  33. package/login/KcContext/kcContextMocks.d.ts +1 -1
  34. package/login/TemplateProps.d.ts +0 -1
  35. package/login/i18n/noJsx/getI18n.js +5 -7
  36. package/login/i18n/noJsx/getI18n.js.map +1 -1
  37. package/login/i18n/withJsx/useI18n.js +15 -4
  38. package/login/i18n/withJsx/useI18n.js.map +1 -1
  39. package/login/pages/LoginConfigTotp.js +1 -1
  40. package/login/pages/LoginConfigTotp.js.map +1 -1
  41. package/login/pages/LoginPasskeysConditionalAuthenticate.js +16 -18
  42. package/login/pages/LoginPasskeysConditionalAuthenticate.js.map +1 -1
  43. package/package.json +17 -7
  44. package/src/account/i18n/noJsx/getI18n.tsx +5 -7
  45. package/src/account/i18n/withJsx/useI18n.tsx +18 -4
  46. package/src/bin/eject-page.ts +28 -10
  47. package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +3 -18
  48. package/src/bin/initialize-account-theme/updateAccountThemeImplementationInConfig.ts +1 -2
  49. package/src/bin/keycloakify/generateFtl/kcContextDeclarationTemplate.ftl +39 -0
  50. package/src/bin/keycloakify/generateResources/generateResources.ts +6 -2
  51. package/src/bin/main.ts +51 -4
  52. package/src/bin/postinstall/getUiModuleFileSourceCodeReadyToBeCopied.ts +30 -19
  53. package/src/bin/postinstall/installUiModulesPeerDependencies.ts +3 -3
  54. package/src/bin/postinstall/managedGitignoreFile.ts +4 -3
  55. package/src/bin/postinstall/postinstall.ts +24 -2
  56. package/src/bin/postinstall/uiModuleMeta.ts +14 -9
  57. package/src/bin/shared/buildContext.ts +1 -2
  58. package/src/bin/shared/constants.ts +4 -1
  59. package/src/bin/start-keycloak/myrealm-realm-25.json +21 -34
  60. package/src/bin/start-keycloak/myrealm-realm-26.json +32 -35
  61. package/src/bin/start-keycloak/start-keycloak.ts +93 -1
  62. package/src/bin/start-keycloak/startViteDevServer.ts +39 -0
  63. package/src/bin/tools/crawlAsync.ts +6 -6
  64. package/src/bin/tools/isTrackedByGit.ts +29 -0
  65. package/src/bin/tools/listInstalledModules.ts +1 -2
  66. package/src/bin/tools/npmInstall.ts +396 -1
  67. package/src/bin/tools/runPrettier.ts +63 -14
  68. package/src/bin/tools/untrackFromGit.ts +24 -0
  69. package/src/bin/tsconfig.json +1 -1
  70. package/src/bin/update-kc-gen.ts +17 -2
  71. package/src/lib/getKcClsx.ts +1 -2
  72. package/src/login/KcContext/KcContext.ts +2 -2
  73. package/src/login/KcContext/kcContextMocks.ts +1 -1
  74. package/src/login/TemplateProps.ts +0 -1
  75. package/src/login/i18n/noJsx/getI18n.tsx +5 -7
  76. package/src/login/i18n/withJsx/useI18n.tsx +18 -4
  77. package/src/login/pages/LoginConfigTotp.tsx +18 -20
  78. package/src/login/pages/LoginPasskeysConditionalAuthenticate.tsx +51 -52
  79. package/src/tools/StatefulObservable/StatefulObservable.ts +1 -2
  80. package/src/tools/deepAssign.ts +1 -2
  81. package/src/tools/extractLastParenthesisContent.ts +43 -0
  82. package/src/vite-plugin/vite-plugin.ts +67 -0
  83. package/stories/login/pages/Info.stories.tsx +3 -39
  84. package/tools/StatefulObservable/StatefulObservable.js +1 -2
  85. package/tools/StatefulObservable/StatefulObservable.js.map +1 -1
  86. package/tools/deepAssign.js +1 -2
  87. package/tools/deepAssign.js.map +1 -1
  88. package/tools/extractLastParenthesisContent.d.ts +6 -0
  89. package/tools/extractLastParenthesisContent.js +36 -0
  90. package/tools/extractLastParenthesisContent.js.map +1 -0
  91. package/vite-plugin/index.js +326 -186
  92. package/bin/124.index.js +0 -348
  93. package/stories/login/pages/LoginDeviceVerifyUserCode.stories.tsx +0 -18
package/bin/36.index.js CHANGED
@@ -6020,130 +6020,6 @@ exports.createStatefulObservable = createStatefulObservable;
6020
6020
 
6021
6021
  /***/ }),
6022
6022
 
6023
- /***/ 37457:
6024
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6025
-
6026
- "use strict";
6027
-
6028
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6029
- if (k2 === undefined) k2 = k;
6030
- var desc = Object.getOwnPropertyDescriptor(m, k);
6031
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6032
- desc = { enumerable: true, get: function() { return m[k]; } };
6033
- }
6034
- Object.defineProperty(o, k2, desc);
6035
- }) : (function(o, m, k, k2) {
6036
- if (k2 === undefined) k2 = k;
6037
- o[k2] = m[k];
6038
- }));
6039
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
6040
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
6041
- };
6042
- Object.defineProperty(exports, "__esModule", ({ value: true }));
6043
- __exportStar(__webpack_require__(35522), exports);
6044
- __exportStar(__webpack_require__(83143), exports);
6045
- //# sourceMappingURL=index.js.map
6046
-
6047
- /***/ }),
6048
-
6049
- /***/ 35522:
6050
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6051
-
6052
- "use strict";
6053
-
6054
- Object.defineProperty(exports, "__esModule", ({ value: true }));
6055
- exports.useObservable = void 0;
6056
- var react_1 = __webpack_require__(18444);
6057
- /**
6058
- * Equivalent of https://docs.evt.land/api/react-hooks
6059
- */
6060
- function useObservable(effect, deps) {
6061
- (0, react_1.useEffect)(function () {
6062
- var subscriptions = [];
6063
- effect({
6064
- "registerSubscription": function (subscription) { return subscriptions.push(subscription); }
6065
- });
6066
- return function () {
6067
- subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });
6068
- subscriptions.length = 0;
6069
- };
6070
- }, deps);
6071
- }
6072
- exports.useObservable = useObservable;
6073
- //# sourceMappingURL=useObservable.js.map
6074
-
6075
- /***/ }),
6076
-
6077
- /***/ 83143:
6078
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6079
-
6080
- "use strict";
6081
-
6082
- var __read = (this && this.__read) || function (o, n) {
6083
- var m = typeof Symbol === "function" && o[Symbol.iterator];
6084
- if (!m) return o;
6085
- var i = m.call(o), r, ar = [], e;
6086
- try {
6087
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
6088
- }
6089
- catch (error) { e = { error: error }; }
6090
- finally {
6091
- try {
6092
- if (r && !r.done && (m = i["return"])) m.call(i);
6093
- }
6094
- finally { if (e) throw e.error; }
6095
- }
6096
- return ar;
6097
- };
6098
- Object.defineProperty(exports, "__esModule", ({ value: true }));
6099
- exports.useRerenderOnChange = void 0;
6100
- var useObservable_1 = __webpack_require__(35522);
6101
- var react_1 = __webpack_require__(18444);
6102
- /**
6103
- * Equivalent of https://docs.evt.land/api/react-hooks
6104
- * */
6105
- function useRerenderOnChange($) {
6106
- //NOTE: We use function in case the state is a function
6107
- var _a = __read((0, react_1.useState)(function () { return $.current; }), 2), setCurrent = _a[1];
6108
- (0, useObservable_1.useObservable)(function (_a) {
6109
- var registerSubscription = _a.registerSubscription;
6110
- var next = function (current) { return setCurrent(function () { return current; }); };
6111
- next($.current);
6112
- var subscription = $.subscribe(next);
6113
- registerSubscription(subscription);
6114
- }, [$]);
6115
- }
6116
- exports.useRerenderOnChange = useRerenderOnChange;
6117
- //# sourceMappingURL=useRerenderOnChange.js.map
6118
-
6119
- /***/ }),
6120
-
6121
- /***/ 2291:
6122
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6123
-
6124
- "use strict";
6125
-
6126
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6127
- if (k2 === undefined) k2 = k;
6128
- var desc = Object.getOwnPropertyDescriptor(m, k);
6129
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6130
- desc = { enumerable: true, get: function() { return m[k]; } };
6131
- }
6132
- Object.defineProperty(o, k2, desc);
6133
- }) : (function(o, m, k, k2) {
6134
- if (k2 === undefined) k2 = k;
6135
- o[k2] = m[k];
6136
- }));
6137
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
6138
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
6139
- };
6140
- Object.defineProperty(exports, "__esModule", ({ value: true }));
6141
- __exportStar(__webpack_require__(32692), exports);
6142
- __exportStar(__webpack_require__(37457), exports);
6143
- //# sourceMappingURL=index.js.map
6144
-
6145
- /***/ }),
6146
-
6147
6023
  /***/ 18721:
6148
6024
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6149
6025
 
@@ -6153,7 +6029,7 @@ var __webpack_unused_export__;
6153
6029
  __webpack_unused_export__ = ({ value: true });
6154
6030
  exports.z = void 0;
6155
6031
  var Deferred_1 = __webpack_require__(50689);
6156
- var StatefulObservable_1 = __webpack_require__(2291);
6032
+ var StatefulObservable_1 = __webpack_require__(32692);
6157
6033
  function waitForDebounceFactory(params) {
6158
6034
  var delay = params.delay;
6159
6035
  var obsCurr = (0, StatefulObservable_1.createStatefulObservable)(function () { return undefined; });
@@ -6187,2803 +6063,6 @@ function waitForDebounceFactory(params) {
6187
6063
  exports.z = waitForDebounceFactory;
6188
6064
  //# sourceMappingURL=waitForDebounce.js.map
6189
6065
 
6190
- /***/ }),
6191
-
6192
- /***/ 35857:
6193
- /***/ ((module, exports, __webpack_require__) => {
6194
-
6195
- "use strict";
6196
- /* module decorator */ module = __webpack_require__.nmd(module);
6197
- /**
6198
- * @license React
6199
- * react.development.js
6200
- *
6201
- * Copyright (c) Facebook, Inc. and its affiliates.
6202
- *
6203
- * This source code is licensed under the MIT license found in the
6204
- * LICENSE file in the root directory of this source tree.
6205
- */
6206
-
6207
-
6208
-
6209
- if (process.env.NODE_ENV !== "production") {
6210
- (function() {
6211
-
6212
- 'use strict';
6213
-
6214
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
6215
- if (
6216
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
6217
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
6218
- 'function'
6219
- ) {
6220
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
6221
- }
6222
- var ReactVersion = '18.2.0';
6223
-
6224
- // ATTENTION
6225
- // When adding new symbols to this file,
6226
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
6227
- // The Symbol used to tag the ReactElement-like types.
6228
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
6229
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
6230
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
6231
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
6232
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
6233
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
6234
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
6235
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
6236
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
6237
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
6238
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
6239
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
6240
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
6241
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
6242
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
6243
- function getIteratorFn(maybeIterable) {
6244
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
6245
- return null;
6246
- }
6247
-
6248
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
6249
-
6250
- if (typeof maybeIterator === 'function') {
6251
- return maybeIterator;
6252
- }
6253
-
6254
- return null;
6255
- }
6256
-
6257
- /**
6258
- * Keeps track of the current dispatcher.
6259
- */
6260
- var ReactCurrentDispatcher = {
6261
- /**
6262
- * @internal
6263
- * @type {ReactComponent}
6264
- */
6265
- current: null
6266
- };
6267
-
6268
- /**
6269
- * Keeps track of the current batch's configuration such as how long an update
6270
- * should suspend for if it needs to.
6271
- */
6272
- var ReactCurrentBatchConfig = {
6273
- transition: null
6274
- };
6275
-
6276
- var ReactCurrentActQueue = {
6277
- current: null,
6278
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
6279
- isBatchingLegacy: false,
6280
- didScheduleLegacyUpdate: false
6281
- };
6282
-
6283
- /**
6284
- * Keeps track of the current owner.
6285
- *
6286
- * The current owner is the component who should own any components that are
6287
- * currently being constructed.
6288
- */
6289
- var ReactCurrentOwner = {
6290
- /**
6291
- * @internal
6292
- * @type {ReactComponent}
6293
- */
6294
- current: null
6295
- };
6296
-
6297
- var ReactDebugCurrentFrame = {};
6298
- var currentExtraStackFrame = null;
6299
- function setExtraStackFrame(stack) {
6300
- {
6301
- currentExtraStackFrame = stack;
6302
- }
6303
- }
6304
-
6305
- {
6306
- ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
6307
- {
6308
- currentExtraStackFrame = stack;
6309
- }
6310
- }; // Stack implementation injected by the current renderer.
6311
-
6312
-
6313
- ReactDebugCurrentFrame.getCurrentStack = null;
6314
-
6315
- ReactDebugCurrentFrame.getStackAddendum = function () {
6316
- var stack = ''; // Add an extra top frame while an element is being validated
6317
-
6318
- if (currentExtraStackFrame) {
6319
- stack += currentExtraStackFrame;
6320
- } // Delegate to the injected renderer-specific implementation
6321
-
6322
-
6323
- var impl = ReactDebugCurrentFrame.getCurrentStack;
6324
-
6325
- if (impl) {
6326
- stack += impl() || '';
6327
- }
6328
-
6329
- return stack;
6330
- };
6331
- }
6332
-
6333
- // -----------------------------------------------------------------------------
6334
-
6335
- var enableScopeAPI = false; // Experimental Create Event Handle API.
6336
- var enableCacheElement = false;
6337
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
6338
-
6339
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
6340
- // stuff. Intended to enable React core members to more easily debug scheduling
6341
- // issues in DEV builds.
6342
-
6343
- var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
6344
-
6345
- var ReactSharedInternals = {
6346
- ReactCurrentDispatcher: ReactCurrentDispatcher,
6347
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
6348
- ReactCurrentOwner: ReactCurrentOwner
6349
- };
6350
-
6351
- {
6352
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
6353
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
6354
- }
6355
-
6356
- // by calls to these methods by a Babel plugin.
6357
- //
6358
- // In PROD (or in packages without access to React internals),
6359
- // they are left as they are instead.
6360
-
6361
- function warn(format) {
6362
- {
6363
- {
6364
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6365
- args[_key - 1] = arguments[_key];
6366
- }
6367
-
6368
- printWarning('warn', format, args);
6369
- }
6370
- }
6371
- }
6372
- function error(format) {
6373
- {
6374
- {
6375
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
6376
- args[_key2 - 1] = arguments[_key2];
6377
- }
6378
-
6379
- printWarning('error', format, args);
6380
- }
6381
- }
6382
- }
6383
-
6384
- function printWarning(level, format, args) {
6385
- // When changing this logic, you might want to also
6386
- // update consoleWithStackDev.www.js as well.
6387
- {
6388
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
6389
- var stack = ReactDebugCurrentFrame.getStackAddendum();
6390
-
6391
- if (stack !== '') {
6392
- format += '%s';
6393
- args = args.concat([stack]);
6394
- } // eslint-disable-next-line react-internal/safe-string-coercion
6395
-
6396
-
6397
- var argsWithFormat = args.map(function (item) {
6398
- return String(item);
6399
- }); // Careful: RN currently depends on this prefix
6400
-
6401
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
6402
- // breaks IE9: https://github.com/facebook/react/issues/13610
6403
- // eslint-disable-next-line react-internal/no-production-logging
6404
-
6405
- Function.prototype.apply.call(console[level], console, argsWithFormat);
6406
- }
6407
- }
6408
-
6409
- var didWarnStateUpdateForUnmountedComponent = {};
6410
-
6411
- function warnNoop(publicInstance, callerName) {
6412
- {
6413
- var _constructor = publicInstance.constructor;
6414
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
6415
- var warningKey = componentName + "." + callerName;
6416
-
6417
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
6418
- return;
6419
- }
6420
-
6421
- error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
6422
-
6423
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
6424
- }
6425
- }
6426
- /**
6427
- * This is the abstract API for an update queue.
6428
- */
6429
-
6430
-
6431
- var ReactNoopUpdateQueue = {
6432
- /**
6433
- * Checks whether or not this composite component is mounted.
6434
- * @param {ReactClass} publicInstance The instance we want to test.
6435
- * @return {boolean} True if mounted, false otherwise.
6436
- * @protected
6437
- * @final
6438
- */
6439
- isMounted: function (publicInstance) {
6440
- return false;
6441
- },
6442
-
6443
- /**
6444
- * Forces an update. This should only be invoked when it is known with
6445
- * certainty that we are **not** in a DOM transaction.
6446
- *
6447
- * You may want to call this when you know that some deeper aspect of the
6448
- * component's state has changed but `setState` was not called.
6449
- *
6450
- * This will not invoke `shouldComponentUpdate`, but it will invoke
6451
- * `componentWillUpdate` and `componentDidUpdate`.
6452
- *
6453
- * @param {ReactClass} publicInstance The instance that should rerender.
6454
- * @param {?function} callback Called after component is updated.
6455
- * @param {?string} callerName name of the calling function in the public API.
6456
- * @internal
6457
- */
6458
- enqueueForceUpdate: function (publicInstance, callback, callerName) {
6459
- warnNoop(publicInstance, 'forceUpdate');
6460
- },
6461
-
6462
- /**
6463
- * Replaces all of the state. Always use this or `setState` to mutate state.
6464
- * You should treat `this.state` as immutable.
6465
- *
6466
- * There is no guarantee that `this.state` will be immediately updated, so
6467
- * accessing `this.state` after calling this method may return the old value.
6468
- *
6469
- * @param {ReactClass} publicInstance The instance that should rerender.
6470
- * @param {object} completeState Next state.
6471
- * @param {?function} callback Called after component is updated.
6472
- * @param {?string} callerName name of the calling function in the public API.
6473
- * @internal
6474
- */
6475
- enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
6476
- warnNoop(publicInstance, 'replaceState');
6477
- },
6478
-
6479
- /**
6480
- * Sets a subset of the state. This only exists because _pendingState is
6481
- * internal. This provides a merging strategy that is not available to deep
6482
- * properties which is confusing. TODO: Expose pendingState or don't use it
6483
- * during the merge.
6484
- *
6485
- * @param {ReactClass} publicInstance The instance that should rerender.
6486
- * @param {object} partialState Next partial state to be merged with state.
6487
- * @param {?function} callback Called after component is updated.
6488
- * @param {?string} Name of the calling function in the public API.
6489
- * @internal
6490
- */
6491
- enqueueSetState: function (publicInstance, partialState, callback, callerName) {
6492
- warnNoop(publicInstance, 'setState');
6493
- }
6494
- };
6495
-
6496
- var assign = Object.assign;
6497
-
6498
- var emptyObject = {};
6499
-
6500
- {
6501
- Object.freeze(emptyObject);
6502
- }
6503
- /**
6504
- * Base class helpers for the updating state of a component.
6505
- */
6506
-
6507
-
6508
- function Component(props, context, updater) {
6509
- this.props = props;
6510
- this.context = context; // If a component has string refs, we will assign a different object later.
6511
-
6512
- this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
6513
- // renderer.
6514
-
6515
- this.updater = updater || ReactNoopUpdateQueue;
6516
- }
6517
-
6518
- Component.prototype.isReactComponent = {};
6519
- /**
6520
- * Sets a subset of the state. Always use this to mutate
6521
- * state. You should treat `this.state` as immutable.
6522
- *
6523
- * There is no guarantee that `this.state` will be immediately updated, so
6524
- * accessing `this.state` after calling this method may return the old value.
6525
- *
6526
- * There is no guarantee that calls to `setState` will run synchronously,
6527
- * as they may eventually be batched together. You can provide an optional
6528
- * callback that will be executed when the call to setState is actually
6529
- * completed.
6530
- *
6531
- * When a function is provided to setState, it will be called at some point in
6532
- * the future (not synchronously). It will be called with the up to date
6533
- * component arguments (state, props, context). These values can be different
6534
- * from this.* because your function may be called after receiveProps but before
6535
- * shouldComponentUpdate, and this new state, props, and context will not yet be
6536
- * assigned to this.
6537
- *
6538
- * @param {object|function} partialState Next partial state or function to
6539
- * produce next partial state to be merged with current state.
6540
- * @param {?function} callback Called after state is updated.
6541
- * @final
6542
- * @protected
6543
- */
6544
-
6545
- Component.prototype.setState = function (partialState, callback) {
6546
- if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
6547
- throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
6548
- }
6549
-
6550
- this.updater.enqueueSetState(this, partialState, callback, 'setState');
6551
- };
6552
- /**
6553
- * Forces an update. This should only be invoked when it is known with
6554
- * certainty that we are **not** in a DOM transaction.
6555
- *
6556
- * You may want to call this when you know that some deeper aspect of the
6557
- * component's state has changed but `setState` was not called.
6558
- *
6559
- * This will not invoke `shouldComponentUpdate`, but it will invoke
6560
- * `componentWillUpdate` and `componentDidUpdate`.
6561
- *
6562
- * @param {?function} callback Called after update is complete.
6563
- * @final
6564
- * @protected
6565
- */
6566
-
6567
-
6568
- Component.prototype.forceUpdate = function (callback) {
6569
- this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
6570
- };
6571
- /**
6572
- * Deprecated APIs. These APIs used to exist on classic React classes but since
6573
- * we would like to deprecate them, we're not going to move them over to this
6574
- * modern base class. Instead, we define a getter that warns if it's accessed.
6575
- */
6576
-
6577
-
6578
- {
6579
- var deprecatedAPIs = {
6580
- isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
6581
- replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
6582
- };
6583
-
6584
- var defineDeprecationWarning = function (methodName, info) {
6585
- Object.defineProperty(Component.prototype, methodName, {
6586
- get: function () {
6587
- warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
6588
-
6589
- return undefined;
6590
- }
6591
- });
6592
- };
6593
-
6594
- for (var fnName in deprecatedAPIs) {
6595
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
6596
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
6597
- }
6598
- }
6599
- }
6600
-
6601
- function ComponentDummy() {}
6602
-
6603
- ComponentDummy.prototype = Component.prototype;
6604
- /**
6605
- * Convenience component with default shallow equality check for sCU.
6606
- */
6607
-
6608
- function PureComponent(props, context, updater) {
6609
- this.props = props;
6610
- this.context = context; // If a component has string refs, we will assign a different object later.
6611
-
6612
- this.refs = emptyObject;
6613
- this.updater = updater || ReactNoopUpdateQueue;
6614
- }
6615
-
6616
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
6617
- pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
6618
-
6619
- assign(pureComponentPrototype, Component.prototype);
6620
- pureComponentPrototype.isPureReactComponent = true;
6621
-
6622
- // an immutable object with a single mutable value
6623
- function createRef() {
6624
- var refObject = {
6625
- current: null
6626
- };
6627
-
6628
- {
6629
- Object.seal(refObject);
6630
- }
6631
-
6632
- return refObject;
6633
- }
6634
-
6635
- var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
6636
-
6637
- function isArray(a) {
6638
- return isArrayImpl(a);
6639
- }
6640
-
6641
- /*
6642
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
6643
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
6644
- *
6645
- * The functions in this module will throw an easier-to-understand,
6646
- * easier-to-debug exception with a clear errors message message explaining the
6647
- * problem. (Instead of a confusing exception thrown inside the implementation
6648
- * of the `value` object).
6649
- */
6650
- // $FlowFixMe only called in DEV, so void return is not possible.
6651
- function typeName(value) {
6652
- {
6653
- // toStringTag is needed for namespaced types like Temporal.Instant
6654
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
6655
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
6656
- return type;
6657
- }
6658
- } // $FlowFixMe only called in DEV, so void return is not possible.
6659
-
6660
-
6661
- function willCoercionThrow(value) {
6662
- {
6663
- try {
6664
- testStringCoercion(value);
6665
- return false;
6666
- } catch (e) {
6667
- return true;
6668
- }
6669
- }
6670
- }
6671
-
6672
- function testStringCoercion(value) {
6673
- // If you ended up here by following an exception call stack, here's what's
6674
- // happened: you supplied an object or symbol value to React (as a prop, key,
6675
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
6676
- // coerce it to a string using `'' + value`, an exception was thrown.
6677
- //
6678
- // The most common types that will cause this exception are `Symbol` instances
6679
- // and Temporal objects like `Temporal.Instant`. But any object that has a
6680
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
6681
- // exception. (Library authors do this to prevent users from using built-in
6682
- // numeric operators like `+` or comparison operators like `>=` because custom
6683
- // methods are needed to perform accurate arithmetic or comparison.)
6684
- //
6685
- // To fix the problem, coerce this object or symbol value to a string before
6686
- // passing it to React. The most reliable way is usually `String(value)`.
6687
- //
6688
- // To find which value is throwing, check the browser or debugger console.
6689
- // Before this exception was thrown, there should be `console.error` output
6690
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
6691
- // problem and how that type was used: key, atrribute, input value prop, etc.
6692
- // In most cases, this console output also shows the component and its
6693
- // ancestor components where the exception happened.
6694
- //
6695
- // eslint-disable-next-line react-internal/safe-string-coercion
6696
- return '' + value;
6697
- }
6698
- function checkKeyStringCoercion(value) {
6699
- {
6700
- if (willCoercionThrow(value)) {
6701
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
6702
-
6703
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
6704
- }
6705
- }
6706
- }
6707
-
6708
- function getWrappedName(outerType, innerType, wrapperName) {
6709
- var displayName = outerType.displayName;
6710
-
6711
- if (displayName) {
6712
- return displayName;
6713
- }
6714
-
6715
- var functionName = innerType.displayName || innerType.name || '';
6716
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
6717
- } // Keep in sync with react-reconciler/getComponentNameFromFiber
6718
-
6719
-
6720
- function getContextName(type) {
6721
- return type.displayName || 'Context';
6722
- } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
6723
-
6724
-
6725
- function getComponentNameFromType(type) {
6726
- if (type == null) {
6727
- // Host root, text node or just invalid type.
6728
- return null;
6729
- }
6730
-
6731
- {
6732
- if (typeof type.tag === 'number') {
6733
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
6734
- }
6735
- }
6736
-
6737
- if (typeof type === 'function') {
6738
- return type.displayName || type.name || null;
6739
- }
6740
-
6741
- if (typeof type === 'string') {
6742
- return type;
6743
- }
6744
-
6745
- switch (type) {
6746
- case REACT_FRAGMENT_TYPE:
6747
- return 'Fragment';
6748
-
6749
- case REACT_PORTAL_TYPE:
6750
- return 'Portal';
6751
-
6752
- case REACT_PROFILER_TYPE:
6753
- return 'Profiler';
6754
-
6755
- case REACT_STRICT_MODE_TYPE:
6756
- return 'StrictMode';
6757
-
6758
- case REACT_SUSPENSE_TYPE:
6759
- return 'Suspense';
6760
-
6761
- case REACT_SUSPENSE_LIST_TYPE:
6762
- return 'SuspenseList';
6763
-
6764
- }
6765
-
6766
- if (typeof type === 'object') {
6767
- switch (type.$$typeof) {
6768
- case REACT_CONTEXT_TYPE:
6769
- var context = type;
6770
- return getContextName(context) + '.Consumer';
6771
-
6772
- case REACT_PROVIDER_TYPE:
6773
- var provider = type;
6774
- return getContextName(provider._context) + '.Provider';
6775
-
6776
- case REACT_FORWARD_REF_TYPE:
6777
- return getWrappedName(type, type.render, 'ForwardRef');
6778
-
6779
- case REACT_MEMO_TYPE:
6780
- var outerName = type.displayName || null;
6781
-
6782
- if (outerName !== null) {
6783
- return outerName;
6784
- }
6785
-
6786
- return getComponentNameFromType(type.type) || 'Memo';
6787
-
6788
- case REACT_LAZY_TYPE:
6789
- {
6790
- var lazyComponent = type;
6791
- var payload = lazyComponent._payload;
6792
- var init = lazyComponent._init;
6793
-
6794
- try {
6795
- return getComponentNameFromType(init(payload));
6796
- } catch (x) {
6797
- return null;
6798
- }
6799
- }
6800
-
6801
- // eslint-disable-next-line no-fallthrough
6802
- }
6803
- }
6804
-
6805
- return null;
6806
- }
6807
-
6808
- var hasOwnProperty = Object.prototype.hasOwnProperty;
6809
-
6810
- var RESERVED_PROPS = {
6811
- key: true,
6812
- ref: true,
6813
- __self: true,
6814
- __source: true
6815
- };
6816
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
6817
-
6818
- {
6819
- didWarnAboutStringRefs = {};
6820
- }
6821
-
6822
- function hasValidRef(config) {
6823
- {
6824
- if (hasOwnProperty.call(config, 'ref')) {
6825
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
6826
-
6827
- if (getter && getter.isReactWarning) {
6828
- return false;
6829
- }
6830
- }
6831
- }
6832
-
6833
- return config.ref !== undefined;
6834
- }
6835
-
6836
- function hasValidKey(config) {
6837
- {
6838
- if (hasOwnProperty.call(config, 'key')) {
6839
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
6840
-
6841
- if (getter && getter.isReactWarning) {
6842
- return false;
6843
- }
6844
- }
6845
- }
6846
-
6847
- return config.key !== undefined;
6848
- }
6849
-
6850
- function defineKeyPropWarningGetter(props, displayName) {
6851
- var warnAboutAccessingKey = function () {
6852
- {
6853
- if (!specialPropKeyWarningShown) {
6854
- specialPropKeyWarningShown = true;
6855
-
6856
- 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);
6857
- }
6858
- }
6859
- };
6860
-
6861
- warnAboutAccessingKey.isReactWarning = true;
6862
- Object.defineProperty(props, 'key', {
6863
- get: warnAboutAccessingKey,
6864
- configurable: true
6865
- });
6866
- }
6867
-
6868
- function defineRefPropWarningGetter(props, displayName) {
6869
- var warnAboutAccessingRef = function () {
6870
- {
6871
- if (!specialPropRefWarningShown) {
6872
- specialPropRefWarningShown = true;
6873
-
6874
- 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);
6875
- }
6876
- }
6877
- };
6878
-
6879
- warnAboutAccessingRef.isReactWarning = true;
6880
- Object.defineProperty(props, 'ref', {
6881
- get: warnAboutAccessingRef,
6882
- configurable: true
6883
- });
6884
- }
6885
-
6886
- function warnIfStringRefCannotBeAutoConverted(config) {
6887
- {
6888
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
6889
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
6890
-
6891
- if (!didWarnAboutStringRefs[componentName]) {
6892
- 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', componentName, config.ref);
6893
-
6894
- didWarnAboutStringRefs[componentName] = true;
6895
- }
6896
- }
6897
- }
6898
- }
6899
- /**
6900
- * Factory method to create a new React element. This no longer adheres to
6901
- * the class pattern, so do not use new to call it. Also, instanceof check
6902
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
6903
- * if something is a React Element.
6904
- *
6905
- * @param {*} type
6906
- * @param {*} props
6907
- * @param {*} key
6908
- * @param {string|object} ref
6909
- * @param {*} owner
6910
- * @param {*} self A *temporary* helper to detect places where `this` is
6911
- * different from the `owner` when React.createElement is called, so that we
6912
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
6913
- * functions, and as long as `this` and owner are the same, there will be no
6914
- * change in behavior.
6915
- * @param {*} source An annotation object (added by a transpiler or otherwise)
6916
- * indicating filename, line number, and/or other information.
6917
- * @internal
6918
- */
6919
-
6920
-
6921
- var ReactElement = function (type, key, ref, self, source, owner, props) {
6922
- var element = {
6923
- // This tag allows us to uniquely identify this as a React Element
6924
- $$typeof: REACT_ELEMENT_TYPE,
6925
- // Built-in properties that belong on the element
6926
- type: type,
6927
- key: key,
6928
- ref: ref,
6929
- props: props,
6930
- // Record the component responsible for creating this element.
6931
- _owner: owner
6932
- };
6933
-
6934
- {
6935
- // The validation flag is currently mutative. We put it on
6936
- // an external backing store so that we can freeze the whole object.
6937
- // This can be replaced with a WeakMap once they are implemented in
6938
- // commonly used development environments.
6939
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
6940
- // the validation flag non-enumerable (where possible, which should
6941
- // include every environment we run tests in), so the test framework
6942
- // ignores it.
6943
-
6944
- Object.defineProperty(element._store, 'validated', {
6945
- configurable: false,
6946
- enumerable: false,
6947
- writable: true,
6948
- value: false
6949
- }); // self and source are DEV only properties.
6950
-
6951
- Object.defineProperty(element, '_self', {
6952
- configurable: false,
6953
- enumerable: false,
6954
- writable: false,
6955
- value: self
6956
- }); // Two elements created in two different places should be considered
6957
- // equal for testing purposes and therefore we hide it from enumeration.
6958
-
6959
- Object.defineProperty(element, '_source', {
6960
- configurable: false,
6961
- enumerable: false,
6962
- writable: false,
6963
- value: source
6964
- });
6965
-
6966
- if (Object.freeze) {
6967
- Object.freeze(element.props);
6968
- Object.freeze(element);
6969
- }
6970
- }
6971
-
6972
- return element;
6973
- };
6974
- /**
6975
- * Create and return a new ReactElement of the given type.
6976
- * See https://reactjs.org/docs/react-api.html#createelement
6977
- */
6978
-
6979
- function createElement(type, config, children) {
6980
- var propName; // Reserved names are extracted
6981
-
6982
- var props = {};
6983
- var key = null;
6984
- var ref = null;
6985
- var self = null;
6986
- var source = null;
6987
-
6988
- if (config != null) {
6989
- if (hasValidRef(config)) {
6990
- ref = config.ref;
6991
-
6992
- {
6993
- warnIfStringRefCannotBeAutoConverted(config);
6994
- }
6995
- }
6996
-
6997
- if (hasValidKey(config)) {
6998
- {
6999
- checkKeyStringCoercion(config.key);
7000
- }
7001
-
7002
- key = '' + config.key;
7003
- }
7004
-
7005
- self = config.__self === undefined ? null : config.__self;
7006
- source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
7007
-
7008
- for (propName in config) {
7009
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
7010
- props[propName] = config[propName];
7011
- }
7012
- }
7013
- } // Children can be more than one argument, and those are transferred onto
7014
- // the newly allocated props object.
7015
-
7016
-
7017
- var childrenLength = arguments.length - 2;
7018
-
7019
- if (childrenLength === 1) {
7020
- props.children = children;
7021
- } else if (childrenLength > 1) {
7022
- var childArray = Array(childrenLength);
7023
-
7024
- for (var i = 0; i < childrenLength; i++) {
7025
- childArray[i] = arguments[i + 2];
7026
- }
7027
-
7028
- {
7029
- if (Object.freeze) {
7030
- Object.freeze(childArray);
7031
- }
7032
- }
7033
-
7034
- props.children = childArray;
7035
- } // Resolve default props
7036
-
7037
-
7038
- if (type && type.defaultProps) {
7039
- var defaultProps = type.defaultProps;
7040
-
7041
- for (propName in defaultProps) {
7042
- if (props[propName] === undefined) {
7043
- props[propName] = defaultProps[propName];
7044
- }
7045
- }
7046
- }
7047
-
7048
- {
7049
- if (key || ref) {
7050
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
7051
-
7052
- if (key) {
7053
- defineKeyPropWarningGetter(props, displayName);
7054
- }
7055
-
7056
- if (ref) {
7057
- defineRefPropWarningGetter(props, displayName);
7058
- }
7059
- }
7060
- }
7061
-
7062
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
7063
- }
7064
- function cloneAndReplaceKey(oldElement, newKey) {
7065
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
7066
- return newElement;
7067
- }
7068
- /**
7069
- * Clone and return a new ReactElement using element as the starting point.
7070
- * See https://reactjs.org/docs/react-api.html#cloneelement
7071
- */
7072
-
7073
- function cloneElement(element, config, children) {
7074
- if (element === null || element === undefined) {
7075
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
7076
- }
7077
-
7078
- var propName; // Original props are copied
7079
-
7080
- var props = assign({}, element.props); // Reserved names are extracted
7081
-
7082
- var key = element.key;
7083
- var ref = element.ref; // Self is preserved since the owner is preserved.
7084
-
7085
- var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
7086
- // transpiler, and the original source is probably a better indicator of the
7087
- // true owner.
7088
-
7089
- var source = element._source; // Owner will be preserved, unless ref is overridden
7090
-
7091
- var owner = element._owner;
7092
-
7093
- if (config != null) {
7094
- if (hasValidRef(config)) {
7095
- // Silently steal the ref from the parent.
7096
- ref = config.ref;
7097
- owner = ReactCurrentOwner.current;
7098
- }
7099
-
7100
- if (hasValidKey(config)) {
7101
- {
7102
- checkKeyStringCoercion(config.key);
7103
- }
7104
-
7105
- key = '' + config.key;
7106
- } // Remaining properties override existing props
7107
-
7108
-
7109
- var defaultProps;
7110
-
7111
- if (element.type && element.type.defaultProps) {
7112
- defaultProps = element.type.defaultProps;
7113
- }
7114
-
7115
- for (propName in config) {
7116
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
7117
- if (config[propName] === undefined && defaultProps !== undefined) {
7118
- // Resolve default props
7119
- props[propName] = defaultProps[propName];
7120
- } else {
7121
- props[propName] = config[propName];
7122
- }
7123
- }
7124
- }
7125
- } // Children can be more than one argument, and those are transferred onto
7126
- // the newly allocated props object.
7127
-
7128
-
7129
- var childrenLength = arguments.length - 2;
7130
-
7131
- if (childrenLength === 1) {
7132
- props.children = children;
7133
- } else if (childrenLength > 1) {
7134
- var childArray = Array(childrenLength);
7135
-
7136
- for (var i = 0; i < childrenLength; i++) {
7137
- childArray[i] = arguments[i + 2];
7138
- }
7139
-
7140
- props.children = childArray;
7141
- }
7142
-
7143
- return ReactElement(element.type, key, ref, self, source, owner, props);
7144
- }
7145
- /**
7146
- * Verifies the object is a ReactElement.
7147
- * See https://reactjs.org/docs/react-api.html#isvalidelement
7148
- * @param {?object} object
7149
- * @return {boolean} True if `object` is a ReactElement.
7150
- * @final
7151
- */
7152
-
7153
- function isValidElement(object) {
7154
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
7155
- }
7156
-
7157
- var SEPARATOR = '.';
7158
- var SUBSEPARATOR = ':';
7159
- /**
7160
- * Escape and wrap key so it is safe to use as a reactid
7161
- *
7162
- * @param {string} key to be escaped.
7163
- * @return {string} the escaped key.
7164
- */
7165
-
7166
- function escape(key) {
7167
- var escapeRegex = /[=:]/g;
7168
- var escaperLookup = {
7169
- '=': '=0',
7170
- ':': '=2'
7171
- };
7172
- var escapedString = key.replace(escapeRegex, function (match) {
7173
- return escaperLookup[match];
7174
- });
7175
- return '$' + escapedString;
7176
- }
7177
- /**
7178
- * TODO: Test that a single child and an array with one item have the same key
7179
- * pattern.
7180
- */
7181
-
7182
-
7183
- var didWarnAboutMaps = false;
7184
- var userProvidedKeyEscapeRegex = /\/+/g;
7185
-
7186
- function escapeUserProvidedKey(text) {
7187
- return text.replace(userProvidedKeyEscapeRegex, '$&/');
7188
- }
7189
- /**
7190
- * Generate a key string that identifies a element within a set.
7191
- *
7192
- * @param {*} element A element that could contain a manual key.
7193
- * @param {number} index Index that is used if a manual key is not provided.
7194
- * @return {string}
7195
- */
7196
-
7197
-
7198
- function getElementKey(element, index) {
7199
- // Do some typechecking here since we call this blindly. We want to ensure
7200
- // that we don't block potential future ES APIs.
7201
- if (typeof element === 'object' && element !== null && element.key != null) {
7202
- // Explicit key
7203
- {
7204
- checkKeyStringCoercion(element.key);
7205
- }
7206
-
7207
- return escape('' + element.key);
7208
- } // Implicit key determined by the index in the set
7209
-
7210
-
7211
- return index.toString(36);
7212
- }
7213
-
7214
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
7215
- var type = typeof children;
7216
-
7217
- if (type === 'undefined' || type === 'boolean') {
7218
- // All of the above are perceived as null.
7219
- children = null;
7220
- }
7221
-
7222
- var invokeCallback = false;
7223
-
7224
- if (children === null) {
7225
- invokeCallback = true;
7226
- } else {
7227
- switch (type) {
7228
- case 'string':
7229
- case 'number':
7230
- invokeCallback = true;
7231
- break;
7232
-
7233
- case 'object':
7234
- switch (children.$$typeof) {
7235
- case REACT_ELEMENT_TYPE:
7236
- case REACT_PORTAL_TYPE:
7237
- invokeCallback = true;
7238
- }
7239
-
7240
- }
7241
- }
7242
-
7243
- if (invokeCallback) {
7244
- var _child = children;
7245
- var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
7246
- // so that it's consistent if the number of children grows:
7247
-
7248
- var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
7249
-
7250
- if (isArray(mappedChild)) {
7251
- var escapedChildKey = '';
7252
-
7253
- if (childKey != null) {
7254
- escapedChildKey = escapeUserProvidedKey(childKey) + '/';
7255
- }
7256
-
7257
- mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
7258
- return c;
7259
- });
7260
- } else if (mappedChild != null) {
7261
- if (isValidElement(mappedChild)) {
7262
- {
7263
- // The `if` statement here prevents auto-disabling of the safe
7264
- // coercion ESLint rule, so we must manually disable it below.
7265
- // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
7266
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
7267
- checkKeyStringCoercion(mappedChild.key);
7268
- }
7269
- }
7270
-
7271
- mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
7272
- // traverseAllChildren used to do for objects as children
7273
- escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
7274
- mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
7275
- // eslint-disable-next-line react-internal/safe-string-coercion
7276
- escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
7277
- }
7278
-
7279
- array.push(mappedChild);
7280
- }
7281
-
7282
- return 1;
7283
- }
7284
-
7285
- var child;
7286
- var nextName;
7287
- var subtreeCount = 0; // Count of children found in the current subtree.
7288
-
7289
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
7290
-
7291
- if (isArray(children)) {
7292
- for (var i = 0; i < children.length; i++) {
7293
- child = children[i];
7294
- nextName = nextNamePrefix + getElementKey(child, i);
7295
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
7296
- }
7297
- } else {
7298
- var iteratorFn = getIteratorFn(children);
7299
-
7300
- if (typeof iteratorFn === 'function') {
7301
- var iterableChildren = children;
7302
-
7303
- {
7304
- // Warn about using Maps as children
7305
- if (iteratorFn === iterableChildren.entries) {
7306
- if (!didWarnAboutMaps) {
7307
- warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
7308
- }
7309
-
7310
- didWarnAboutMaps = true;
7311
- }
7312
- }
7313
-
7314
- var iterator = iteratorFn.call(iterableChildren);
7315
- var step;
7316
- var ii = 0;
7317
-
7318
- while (!(step = iterator.next()).done) {
7319
- child = step.value;
7320
- nextName = nextNamePrefix + getElementKey(child, ii++);
7321
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
7322
- }
7323
- } else if (type === 'object') {
7324
- // eslint-disable-next-line react-internal/safe-string-coercion
7325
- var childrenString = String(children);
7326
- throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
7327
- }
7328
- }
7329
-
7330
- return subtreeCount;
7331
- }
7332
-
7333
- /**
7334
- * Maps children that are typically specified as `props.children`.
7335
- *
7336
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
7337
- *
7338
- * The provided mapFunction(child, index) will be called for each
7339
- * leaf child.
7340
- *
7341
- * @param {?*} children Children tree container.
7342
- * @param {function(*, int)} func The map function.
7343
- * @param {*} context Context for mapFunction.
7344
- * @return {object} Object containing the ordered map of results.
7345
- */
7346
- function mapChildren(children, func, context) {
7347
- if (children == null) {
7348
- return children;
7349
- }
7350
-
7351
- var result = [];
7352
- var count = 0;
7353
- mapIntoArray(children, result, '', '', function (child) {
7354
- return func.call(context, child, count++);
7355
- });
7356
- return result;
7357
- }
7358
- /**
7359
- * Count the number of children that are typically specified as
7360
- * `props.children`.
7361
- *
7362
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
7363
- *
7364
- * @param {?*} children Children tree container.
7365
- * @return {number} The number of children.
7366
- */
7367
-
7368
-
7369
- function countChildren(children) {
7370
- var n = 0;
7371
- mapChildren(children, function () {
7372
- n++; // Don't return anything
7373
- });
7374
- return n;
7375
- }
7376
-
7377
- /**
7378
- * Iterates through children that are typically specified as `props.children`.
7379
- *
7380
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
7381
- *
7382
- * The provided forEachFunc(child, index) will be called for each
7383
- * leaf child.
7384
- *
7385
- * @param {?*} children Children tree container.
7386
- * @param {function(*, int)} forEachFunc
7387
- * @param {*} forEachContext Context for forEachContext.
7388
- */
7389
- function forEachChildren(children, forEachFunc, forEachContext) {
7390
- mapChildren(children, function () {
7391
- forEachFunc.apply(this, arguments); // Don't return anything.
7392
- }, forEachContext);
7393
- }
7394
- /**
7395
- * Flatten a children object (typically specified as `props.children`) and
7396
- * return an array with appropriately re-keyed children.
7397
- *
7398
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
7399
- */
7400
-
7401
-
7402
- function toArray(children) {
7403
- return mapChildren(children, function (child) {
7404
- return child;
7405
- }) || [];
7406
- }
7407
- /**
7408
- * Returns the first child in a collection of children and verifies that there
7409
- * is only one child in the collection.
7410
- *
7411
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
7412
- *
7413
- * The current implementation of this function assumes that a single child gets
7414
- * passed without a wrapper, but the purpose of this helper function is to
7415
- * abstract away the particular structure of children.
7416
- *
7417
- * @param {?object} children Child collection structure.
7418
- * @return {ReactElement} The first and only `ReactElement` contained in the
7419
- * structure.
7420
- */
7421
-
7422
-
7423
- function onlyChild(children) {
7424
- if (!isValidElement(children)) {
7425
- throw new Error('React.Children.only expected to receive a single React element child.');
7426
- }
7427
-
7428
- return children;
7429
- }
7430
-
7431
- function createContext(defaultValue) {
7432
- // TODO: Second argument used to be an optional `calculateChangedBits`
7433
- // function. Warn to reserve for future use?
7434
- var context = {
7435
- $$typeof: REACT_CONTEXT_TYPE,
7436
- // As a workaround to support multiple concurrent renderers, we categorize
7437
- // some renderers as primary and others as secondary. We only expect
7438
- // there to be two concurrent renderers at most: React Native (primary) and
7439
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
7440
- // Secondary renderers store their context values on separate fields.
7441
- _currentValue: defaultValue,
7442
- _currentValue2: defaultValue,
7443
- // Used to track how many concurrent renderers this context currently
7444
- // supports within in a single renderer. Such as parallel server rendering.
7445
- _threadCount: 0,
7446
- // These are circular
7447
- Provider: null,
7448
- Consumer: null,
7449
- // Add these to use same hidden class in VM as ServerContext
7450
- _defaultValue: null,
7451
- _globalName: null
7452
- };
7453
- context.Provider = {
7454
- $$typeof: REACT_PROVIDER_TYPE,
7455
- _context: context
7456
- };
7457
- var hasWarnedAboutUsingNestedContextConsumers = false;
7458
- var hasWarnedAboutUsingConsumerProvider = false;
7459
- var hasWarnedAboutDisplayNameOnConsumer = false;
7460
-
7461
- {
7462
- // A separate object, but proxies back to the original context object for
7463
- // backwards compatibility. It has a different $$typeof, so we can properly
7464
- // warn for the incorrect usage of Context as a Consumer.
7465
- var Consumer = {
7466
- $$typeof: REACT_CONTEXT_TYPE,
7467
- _context: context
7468
- }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
7469
-
7470
- Object.defineProperties(Consumer, {
7471
- Provider: {
7472
- get: function () {
7473
- if (!hasWarnedAboutUsingConsumerProvider) {
7474
- hasWarnedAboutUsingConsumerProvider = true;
7475
-
7476
- error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
7477
- }
7478
-
7479
- return context.Provider;
7480
- },
7481
- set: function (_Provider) {
7482
- context.Provider = _Provider;
7483
- }
7484
- },
7485
- _currentValue: {
7486
- get: function () {
7487
- return context._currentValue;
7488
- },
7489
- set: function (_currentValue) {
7490
- context._currentValue = _currentValue;
7491
- }
7492
- },
7493
- _currentValue2: {
7494
- get: function () {
7495
- return context._currentValue2;
7496
- },
7497
- set: function (_currentValue2) {
7498
- context._currentValue2 = _currentValue2;
7499
- }
7500
- },
7501
- _threadCount: {
7502
- get: function () {
7503
- return context._threadCount;
7504
- },
7505
- set: function (_threadCount) {
7506
- context._threadCount = _threadCount;
7507
- }
7508
- },
7509
- Consumer: {
7510
- get: function () {
7511
- if (!hasWarnedAboutUsingNestedContextConsumers) {
7512
- hasWarnedAboutUsingNestedContextConsumers = true;
7513
-
7514
- error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
7515
- }
7516
-
7517
- return context.Consumer;
7518
- }
7519
- },
7520
- displayName: {
7521
- get: function () {
7522
- return context.displayName;
7523
- },
7524
- set: function (displayName) {
7525
- if (!hasWarnedAboutDisplayNameOnConsumer) {
7526
- warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
7527
-
7528
- hasWarnedAboutDisplayNameOnConsumer = true;
7529
- }
7530
- }
7531
- }
7532
- }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
7533
-
7534
- context.Consumer = Consumer;
7535
- }
7536
-
7537
- {
7538
- context._currentRenderer = null;
7539
- context._currentRenderer2 = null;
7540
- }
7541
-
7542
- return context;
7543
- }
7544
-
7545
- var Uninitialized = -1;
7546
- var Pending = 0;
7547
- var Resolved = 1;
7548
- var Rejected = 2;
7549
-
7550
- function lazyInitializer(payload) {
7551
- if (payload._status === Uninitialized) {
7552
- var ctor = payload._result;
7553
- var thenable = ctor(); // Transition to the next state.
7554
- // This might throw either because it's missing or throws. If so, we treat it
7555
- // as still uninitialized and try again next time. Which is the same as what
7556
- // happens if the ctor or any wrappers processing the ctor throws. This might
7557
- // end up fixing it if the resolution was a concurrency bug.
7558
-
7559
- thenable.then(function (moduleObject) {
7560
- if (payload._status === Pending || payload._status === Uninitialized) {
7561
- // Transition to the next state.
7562
- var resolved = payload;
7563
- resolved._status = Resolved;
7564
- resolved._result = moduleObject;
7565
- }
7566
- }, function (error) {
7567
- if (payload._status === Pending || payload._status === Uninitialized) {
7568
- // Transition to the next state.
7569
- var rejected = payload;
7570
- rejected._status = Rejected;
7571
- rejected._result = error;
7572
- }
7573
- });
7574
-
7575
- if (payload._status === Uninitialized) {
7576
- // In case, we're still uninitialized, then we're waiting for the thenable
7577
- // to resolve. Set it as pending in the meantime.
7578
- var pending = payload;
7579
- pending._status = Pending;
7580
- pending._result = thenable;
7581
- }
7582
- }
7583
-
7584
- if (payload._status === Resolved) {
7585
- var moduleObject = payload._result;
7586
-
7587
- {
7588
- if (moduleObject === undefined) {
7589
- error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
7590
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
7591
- }
7592
- }
7593
-
7594
- {
7595
- if (!('default' in moduleObject)) {
7596
- error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
7597
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
7598
- }
7599
- }
7600
-
7601
- return moduleObject.default;
7602
- } else {
7603
- throw payload._result;
7604
- }
7605
- }
7606
-
7607
- function lazy(ctor) {
7608
- var payload = {
7609
- // We use these fields to store the result.
7610
- _status: Uninitialized,
7611
- _result: ctor
7612
- };
7613
- var lazyType = {
7614
- $$typeof: REACT_LAZY_TYPE,
7615
- _payload: payload,
7616
- _init: lazyInitializer
7617
- };
7618
-
7619
- {
7620
- // In production, this would just set it on the object.
7621
- var defaultProps;
7622
- var propTypes; // $FlowFixMe
7623
-
7624
- Object.defineProperties(lazyType, {
7625
- defaultProps: {
7626
- configurable: true,
7627
- get: function () {
7628
- return defaultProps;
7629
- },
7630
- set: function (newDefaultProps) {
7631
- error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
7632
-
7633
- defaultProps = newDefaultProps; // Match production behavior more closely:
7634
- // $FlowFixMe
7635
-
7636
- Object.defineProperty(lazyType, 'defaultProps', {
7637
- enumerable: true
7638
- });
7639
- }
7640
- },
7641
- propTypes: {
7642
- configurable: true,
7643
- get: function () {
7644
- return propTypes;
7645
- },
7646
- set: function (newPropTypes) {
7647
- error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
7648
-
7649
- propTypes = newPropTypes; // Match production behavior more closely:
7650
- // $FlowFixMe
7651
-
7652
- Object.defineProperty(lazyType, 'propTypes', {
7653
- enumerable: true
7654
- });
7655
- }
7656
- }
7657
- });
7658
- }
7659
-
7660
- return lazyType;
7661
- }
7662
-
7663
- function forwardRef(render) {
7664
- {
7665
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
7666
- error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
7667
- } else if (typeof render !== 'function') {
7668
- error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
7669
- } else {
7670
- if (render.length !== 0 && render.length !== 2) {
7671
- error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
7672
- }
7673
- }
7674
-
7675
- if (render != null) {
7676
- if (render.defaultProps != null || render.propTypes != null) {
7677
- error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
7678
- }
7679
- }
7680
- }
7681
-
7682
- var elementType = {
7683
- $$typeof: REACT_FORWARD_REF_TYPE,
7684
- render: render
7685
- };
7686
-
7687
- {
7688
- var ownName;
7689
- Object.defineProperty(elementType, 'displayName', {
7690
- enumerable: false,
7691
- configurable: true,
7692
- get: function () {
7693
- return ownName;
7694
- },
7695
- set: function (name) {
7696
- ownName = name; // The inner component shouldn't inherit this display name in most cases,
7697
- // because the component may be used elsewhere.
7698
- // But it's nice for anonymous functions to inherit the name,
7699
- // so that our component-stack generation logic will display their frames.
7700
- // An anonymous function generally suggests a pattern like:
7701
- // React.forwardRef((props, ref) => {...});
7702
- // This kind of inner function is not used elsewhere so the side effect is okay.
7703
-
7704
- if (!render.name && !render.displayName) {
7705
- render.displayName = name;
7706
- }
7707
- }
7708
- });
7709
- }
7710
-
7711
- return elementType;
7712
- }
7713
-
7714
- var REACT_MODULE_REFERENCE;
7715
-
7716
- {
7717
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
7718
- }
7719
-
7720
- function isValidElementType(type) {
7721
- if (typeof type === 'string' || typeof type === 'function') {
7722
- return true;
7723
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
7724
-
7725
-
7726
- 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 ) {
7727
- return true;
7728
- }
7729
-
7730
- if (typeof type === 'object' && type !== null) {
7731
- 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
7732
- // types supported by any Flight configuration anywhere since
7733
- // we don't know which Flight build this will end up being used
7734
- // with.
7735
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
7736
- return true;
7737
- }
7738
- }
7739
-
7740
- return false;
7741
- }
7742
-
7743
- function memo(type, compare) {
7744
- {
7745
- if (!isValidElementType(type)) {
7746
- error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
7747
- }
7748
- }
7749
-
7750
- var elementType = {
7751
- $$typeof: REACT_MEMO_TYPE,
7752
- type: type,
7753
- compare: compare === undefined ? null : compare
7754
- };
7755
-
7756
- {
7757
- var ownName;
7758
- Object.defineProperty(elementType, 'displayName', {
7759
- enumerable: false,
7760
- configurable: true,
7761
- get: function () {
7762
- return ownName;
7763
- },
7764
- set: function (name) {
7765
- ownName = name; // The inner component shouldn't inherit this display name in most cases,
7766
- // because the component may be used elsewhere.
7767
- // But it's nice for anonymous functions to inherit the name,
7768
- // so that our component-stack generation logic will display their frames.
7769
- // An anonymous function generally suggests a pattern like:
7770
- // React.memo((props) => {...});
7771
- // This kind of inner function is not used elsewhere so the side effect is okay.
7772
-
7773
- if (!type.name && !type.displayName) {
7774
- type.displayName = name;
7775
- }
7776
- }
7777
- });
7778
- }
7779
-
7780
- return elementType;
7781
- }
7782
-
7783
- function resolveDispatcher() {
7784
- var dispatcher = ReactCurrentDispatcher.current;
7785
-
7786
- {
7787
- if (dispatcher === null) {
7788
- error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
7789
- }
7790
- } // Will result in a null access error if accessed outside render phase. We
7791
- // intentionally don't throw our own error because this is in a hot path.
7792
- // Also helps ensure this is inlined.
7793
-
7794
-
7795
- return dispatcher;
7796
- }
7797
- function useContext(Context) {
7798
- var dispatcher = resolveDispatcher();
7799
-
7800
- {
7801
- // TODO: add a more generic warning for invalid values.
7802
- if (Context._context !== undefined) {
7803
- var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
7804
- // and nobody should be using this in existing code.
7805
-
7806
- if (realContext.Consumer === Context) {
7807
- error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
7808
- } else if (realContext.Provider === Context) {
7809
- error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
7810
- }
7811
- }
7812
- }
7813
-
7814
- return dispatcher.useContext(Context);
7815
- }
7816
- function useState(initialState) {
7817
- var dispatcher = resolveDispatcher();
7818
- return dispatcher.useState(initialState);
7819
- }
7820
- function useReducer(reducer, initialArg, init) {
7821
- var dispatcher = resolveDispatcher();
7822
- return dispatcher.useReducer(reducer, initialArg, init);
7823
- }
7824
- function useRef(initialValue) {
7825
- var dispatcher = resolveDispatcher();
7826
- return dispatcher.useRef(initialValue);
7827
- }
7828
- function useEffect(create, deps) {
7829
- var dispatcher = resolveDispatcher();
7830
- return dispatcher.useEffect(create, deps);
7831
- }
7832
- function useInsertionEffect(create, deps) {
7833
- var dispatcher = resolveDispatcher();
7834
- return dispatcher.useInsertionEffect(create, deps);
7835
- }
7836
- function useLayoutEffect(create, deps) {
7837
- var dispatcher = resolveDispatcher();
7838
- return dispatcher.useLayoutEffect(create, deps);
7839
- }
7840
- function useCallback(callback, deps) {
7841
- var dispatcher = resolveDispatcher();
7842
- return dispatcher.useCallback(callback, deps);
7843
- }
7844
- function useMemo(create, deps) {
7845
- var dispatcher = resolveDispatcher();
7846
- return dispatcher.useMemo(create, deps);
7847
- }
7848
- function useImperativeHandle(ref, create, deps) {
7849
- var dispatcher = resolveDispatcher();
7850
- return dispatcher.useImperativeHandle(ref, create, deps);
7851
- }
7852
- function useDebugValue(value, formatterFn) {
7853
- {
7854
- var dispatcher = resolveDispatcher();
7855
- return dispatcher.useDebugValue(value, formatterFn);
7856
- }
7857
- }
7858
- function useTransition() {
7859
- var dispatcher = resolveDispatcher();
7860
- return dispatcher.useTransition();
7861
- }
7862
- function useDeferredValue(value) {
7863
- var dispatcher = resolveDispatcher();
7864
- return dispatcher.useDeferredValue(value);
7865
- }
7866
- function useId() {
7867
- var dispatcher = resolveDispatcher();
7868
- return dispatcher.useId();
7869
- }
7870
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
7871
- var dispatcher = resolveDispatcher();
7872
- return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
7873
- }
7874
-
7875
- // Helpers to patch console.logs to avoid logging during side-effect free
7876
- // replaying on render function. This currently only patches the object
7877
- // lazily which won't cover if the log function was extracted eagerly.
7878
- // We could also eagerly patch the method.
7879
- var disabledDepth = 0;
7880
- var prevLog;
7881
- var prevInfo;
7882
- var prevWarn;
7883
- var prevError;
7884
- var prevGroup;
7885
- var prevGroupCollapsed;
7886
- var prevGroupEnd;
7887
-
7888
- function disabledLog() {}
7889
-
7890
- disabledLog.__reactDisabledLog = true;
7891
- function disableLogs() {
7892
- {
7893
- if (disabledDepth === 0) {
7894
- /* eslint-disable react-internal/no-production-logging */
7895
- prevLog = console.log;
7896
- prevInfo = console.info;
7897
- prevWarn = console.warn;
7898
- prevError = console.error;
7899
- prevGroup = console.group;
7900
- prevGroupCollapsed = console.groupCollapsed;
7901
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
7902
-
7903
- var props = {
7904
- configurable: true,
7905
- enumerable: true,
7906
- value: disabledLog,
7907
- writable: true
7908
- }; // $FlowFixMe Flow thinks console is immutable.
7909
-
7910
- Object.defineProperties(console, {
7911
- info: props,
7912
- log: props,
7913
- warn: props,
7914
- error: props,
7915
- group: props,
7916
- groupCollapsed: props,
7917
- groupEnd: props
7918
- });
7919
- /* eslint-enable react-internal/no-production-logging */
7920
- }
7921
-
7922
- disabledDepth++;
7923
- }
7924
- }
7925
- function reenableLogs() {
7926
- {
7927
- disabledDepth--;
7928
-
7929
- if (disabledDepth === 0) {
7930
- /* eslint-disable react-internal/no-production-logging */
7931
- var props = {
7932
- configurable: true,
7933
- enumerable: true,
7934
- writable: true
7935
- }; // $FlowFixMe Flow thinks console is immutable.
7936
-
7937
- Object.defineProperties(console, {
7938
- log: assign({}, props, {
7939
- value: prevLog
7940
- }),
7941
- info: assign({}, props, {
7942
- value: prevInfo
7943
- }),
7944
- warn: assign({}, props, {
7945
- value: prevWarn
7946
- }),
7947
- error: assign({}, props, {
7948
- value: prevError
7949
- }),
7950
- group: assign({}, props, {
7951
- value: prevGroup
7952
- }),
7953
- groupCollapsed: assign({}, props, {
7954
- value: prevGroupCollapsed
7955
- }),
7956
- groupEnd: assign({}, props, {
7957
- value: prevGroupEnd
7958
- })
7959
- });
7960
- /* eslint-enable react-internal/no-production-logging */
7961
- }
7962
-
7963
- if (disabledDepth < 0) {
7964
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
7965
- }
7966
- }
7967
- }
7968
-
7969
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
7970
- var prefix;
7971
- function describeBuiltInComponentFrame(name, source, ownerFn) {
7972
- {
7973
- if (prefix === undefined) {
7974
- // Extract the VM specific prefix used by each line.
7975
- try {
7976
- throw Error();
7977
- } catch (x) {
7978
- var match = x.stack.trim().match(/\n( *(at )?)/);
7979
- prefix = match && match[1] || '';
7980
- }
7981
- } // We use the prefix to ensure our stacks line up with native stack frames.
7982
-
7983
-
7984
- return '\n' + prefix + name;
7985
- }
7986
- }
7987
- var reentry = false;
7988
- var componentFrameCache;
7989
-
7990
- {
7991
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
7992
- componentFrameCache = new PossiblyWeakMap();
7993
- }
7994
-
7995
- function describeNativeComponentFrame(fn, construct) {
7996
- // If something asked for a stack inside a fake render, it should get ignored.
7997
- if ( !fn || reentry) {
7998
- return '';
7999
- }
8000
-
8001
- {
8002
- var frame = componentFrameCache.get(fn);
8003
-
8004
- if (frame !== undefined) {
8005
- return frame;
8006
- }
8007
- }
8008
-
8009
- var control;
8010
- reentry = true;
8011
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
8012
-
8013
- Error.prepareStackTrace = undefined;
8014
- var previousDispatcher;
8015
-
8016
- {
8017
- previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
8018
- // for warnings.
8019
-
8020
- ReactCurrentDispatcher$1.current = null;
8021
- disableLogs();
8022
- }
8023
-
8024
- try {
8025
- // This should throw.
8026
- if (construct) {
8027
- // Something should be setting the props in the constructor.
8028
- var Fake = function () {
8029
- throw Error();
8030
- }; // $FlowFixMe
8031
-
8032
-
8033
- Object.defineProperty(Fake.prototype, 'props', {
8034
- set: function () {
8035
- // We use a throwing setter instead of frozen or non-writable props
8036
- // because that won't throw in a non-strict mode function.
8037
- throw Error();
8038
- }
8039
- });
8040
-
8041
- if (typeof Reflect === 'object' && Reflect.construct) {
8042
- // We construct a different control for this case to include any extra
8043
- // frames added by the construct call.
8044
- try {
8045
- Reflect.construct(Fake, []);
8046
- } catch (x) {
8047
- control = x;
8048
- }
8049
-
8050
- Reflect.construct(fn, [], Fake);
8051
- } else {
8052
- try {
8053
- Fake.call();
8054
- } catch (x) {
8055
- control = x;
8056
- }
8057
-
8058
- fn.call(Fake.prototype);
8059
- }
8060
- } else {
8061
- try {
8062
- throw Error();
8063
- } catch (x) {
8064
- control = x;
8065
- }
8066
-
8067
- fn();
8068
- }
8069
- } catch (sample) {
8070
- // This is inlined manually because closure doesn't do it for us.
8071
- if (sample && control && typeof sample.stack === 'string') {
8072
- // This extracts the first frame from the sample that isn't also in the control.
8073
- // Skipping one frame that we assume is the frame that calls the two.
8074
- var sampleLines = sample.stack.split('\n');
8075
- var controlLines = control.stack.split('\n');
8076
- var s = sampleLines.length - 1;
8077
- var c = controlLines.length - 1;
8078
-
8079
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
8080
- // We expect at least one stack frame to be shared.
8081
- // Typically this will be the root most one. However, stack frames may be
8082
- // cut off due to maximum stack limits. In this case, one maybe cut off
8083
- // earlier than the other. We assume that the sample is longer or the same
8084
- // and there for cut off earlier. So we should find the root most frame in
8085
- // the sample somewhere in the control.
8086
- c--;
8087
- }
8088
-
8089
- for (; s >= 1 && c >= 0; s--, c--) {
8090
- // Next we find the first one that isn't the same which should be the
8091
- // frame that called our sample function and the control.
8092
- if (sampleLines[s] !== controlLines[c]) {
8093
- // In V8, the first line is describing the message but other VMs don't.
8094
- // If we're about to return the first line, and the control is also on the same
8095
- // line, that's a pretty good indicator that our sample threw at same line as
8096
- // the control. I.e. before we entered the sample frame. So we ignore this result.
8097
- // This can happen if you passed a class to function component, or non-function.
8098
- if (s !== 1 || c !== 1) {
8099
- do {
8100
- s--;
8101
- c--; // We may still have similar intermediate frames from the construct call.
8102
- // The next one that isn't the same should be our match though.
8103
-
8104
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
8105
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
8106
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
8107
- // but we have a user-provided "displayName"
8108
- // splice it in to make the stack more readable.
8109
-
8110
-
8111
- if (fn.displayName && _frame.includes('<anonymous>')) {
8112
- _frame = _frame.replace('<anonymous>', fn.displayName);
8113
- }
8114
-
8115
- {
8116
- if (typeof fn === 'function') {
8117
- componentFrameCache.set(fn, _frame);
8118
- }
8119
- } // Return the line we found.
8120
-
8121
-
8122
- return _frame;
8123
- }
8124
- } while (s >= 1 && c >= 0);
8125
- }
8126
-
8127
- break;
8128
- }
8129
- }
8130
- }
8131
- } finally {
8132
- reentry = false;
8133
-
8134
- {
8135
- ReactCurrentDispatcher$1.current = previousDispatcher;
8136
- reenableLogs();
8137
- }
8138
-
8139
- Error.prepareStackTrace = previousPrepareStackTrace;
8140
- } // Fallback to just using the name if we couldn't make it throw.
8141
-
8142
-
8143
- var name = fn ? fn.displayName || fn.name : '';
8144
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
8145
-
8146
- {
8147
- if (typeof fn === 'function') {
8148
- componentFrameCache.set(fn, syntheticFrame);
8149
- }
8150
- }
8151
-
8152
- return syntheticFrame;
8153
- }
8154
- function describeFunctionComponentFrame(fn, source, ownerFn) {
8155
- {
8156
- return describeNativeComponentFrame(fn, false);
8157
- }
8158
- }
8159
-
8160
- function shouldConstruct(Component) {
8161
- var prototype = Component.prototype;
8162
- return !!(prototype && prototype.isReactComponent);
8163
- }
8164
-
8165
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
8166
-
8167
- if (type == null) {
8168
- return '';
8169
- }
8170
-
8171
- if (typeof type === 'function') {
8172
- {
8173
- return describeNativeComponentFrame(type, shouldConstruct(type));
8174
- }
8175
- }
8176
-
8177
- if (typeof type === 'string') {
8178
- return describeBuiltInComponentFrame(type);
8179
- }
8180
-
8181
- switch (type) {
8182
- case REACT_SUSPENSE_TYPE:
8183
- return describeBuiltInComponentFrame('Suspense');
8184
-
8185
- case REACT_SUSPENSE_LIST_TYPE:
8186
- return describeBuiltInComponentFrame('SuspenseList');
8187
- }
8188
-
8189
- if (typeof type === 'object') {
8190
- switch (type.$$typeof) {
8191
- case REACT_FORWARD_REF_TYPE:
8192
- return describeFunctionComponentFrame(type.render);
8193
-
8194
- case REACT_MEMO_TYPE:
8195
- // Memo may contain any component type so we recursively resolve it.
8196
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
8197
-
8198
- case REACT_LAZY_TYPE:
8199
- {
8200
- var lazyComponent = type;
8201
- var payload = lazyComponent._payload;
8202
- var init = lazyComponent._init;
8203
-
8204
- try {
8205
- // Lazy may contain any component type so we recursively resolve it.
8206
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
8207
- } catch (x) {}
8208
- }
8209
- }
8210
- }
8211
-
8212
- return '';
8213
- }
8214
-
8215
- var loggedTypeFailures = {};
8216
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
8217
-
8218
- function setCurrentlyValidatingElement(element) {
8219
- {
8220
- if (element) {
8221
- var owner = element._owner;
8222
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
8223
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
8224
- } else {
8225
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
8226
- }
8227
- }
8228
- }
8229
-
8230
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
8231
- {
8232
- // $FlowFixMe This is okay but Flow doesn't know it.
8233
- var has = Function.call.bind(hasOwnProperty);
8234
-
8235
- for (var typeSpecName in typeSpecs) {
8236
- if (has(typeSpecs, typeSpecName)) {
8237
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
8238
- // fail the render phase where it didn't fail before. So we log it.
8239
- // After these have been cleaned up, we'll let them throw.
8240
-
8241
- try {
8242
- // This is intentionally an invariant that gets caught. It's the same
8243
- // behavior as without this statement except with a better message.
8244
- if (typeof typeSpecs[typeSpecName] !== 'function') {
8245
- // eslint-disable-next-line react-internal/prod-error-codes
8246
- 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`.');
8247
- err.name = 'Invariant Violation';
8248
- throw err;
8249
- }
8250
-
8251
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
8252
- } catch (ex) {
8253
- error$1 = ex;
8254
- }
8255
-
8256
- if (error$1 && !(error$1 instanceof Error)) {
8257
- setCurrentlyValidatingElement(element);
8258
-
8259
- 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);
8260
-
8261
- setCurrentlyValidatingElement(null);
8262
- }
8263
-
8264
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
8265
- // Only monitor this failure once because there tends to be a lot of the
8266
- // same error.
8267
- loggedTypeFailures[error$1.message] = true;
8268
- setCurrentlyValidatingElement(element);
8269
-
8270
- error('Failed %s type: %s', location, error$1.message);
8271
-
8272
- setCurrentlyValidatingElement(null);
8273
- }
8274
- }
8275
- }
8276
- }
8277
- }
8278
-
8279
- function setCurrentlyValidatingElement$1(element) {
8280
- {
8281
- if (element) {
8282
- var owner = element._owner;
8283
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
8284
- setExtraStackFrame(stack);
8285
- } else {
8286
- setExtraStackFrame(null);
8287
- }
8288
- }
8289
- }
8290
-
8291
- var propTypesMisspellWarningShown;
8292
-
8293
- {
8294
- propTypesMisspellWarningShown = false;
8295
- }
8296
-
8297
- function getDeclarationErrorAddendum() {
8298
- if (ReactCurrentOwner.current) {
8299
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
8300
-
8301
- if (name) {
8302
- return '\n\nCheck the render method of `' + name + '`.';
8303
- }
8304
- }
8305
-
8306
- return '';
8307
- }
8308
-
8309
- function getSourceInfoErrorAddendum(source) {
8310
- if (source !== undefined) {
8311
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
8312
- var lineNumber = source.lineNumber;
8313
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
8314
- }
8315
-
8316
- return '';
8317
- }
8318
-
8319
- function getSourceInfoErrorAddendumForProps(elementProps) {
8320
- if (elementProps !== null && elementProps !== undefined) {
8321
- return getSourceInfoErrorAddendum(elementProps.__source);
8322
- }
8323
-
8324
- return '';
8325
- }
8326
- /**
8327
- * Warn if there's no key explicitly set on dynamic arrays of children or
8328
- * object keys are not valid. This allows us to keep track of children between
8329
- * updates.
8330
- */
8331
-
8332
-
8333
- var ownerHasKeyUseWarning = {};
8334
-
8335
- function getCurrentComponentErrorInfo(parentType) {
8336
- var info = getDeclarationErrorAddendum();
8337
-
8338
- if (!info) {
8339
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
8340
-
8341
- if (parentName) {
8342
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
8343
- }
8344
- }
8345
-
8346
- return info;
8347
- }
8348
- /**
8349
- * Warn if the element doesn't have an explicit key assigned to it.
8350
- * This element is in an array. The array could grow and shrink or be
8351
- * reordered. All children that haven't already been validated are required to
8352
- * have a "key" property assigned to it. Error statuses are cached so a warning
8353
- * will only be shown once.
8354
- *
8355
- * @internal
8356
- * @param {ReactElement} element Element that requires a key.
8357
- * @param {*} parentType element's parent's type.
8358
- */
8359
-
8360
-
8361
- function validateExplicitKey(element, parentType) {
8362
- if (!element._store || element._store.validated || element.key != null) {
8363
- return;
8364
- }
8365
-
8366
- element._store.validated = true;
8367
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
8368
-
8369
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
8370
- return;
8371
- }
8372
-
8373
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
8374
- // property, it may be the creator of the child that's responsible for
8375
- // assigning it a key.
8376
-
8377
- var childOwner = '';
8378
-
8379
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
8380
- // Give the component that originally created this child.
8381
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
8382
- }
8383
-
8384
- {
8385
- setCurrentlyValidatingElement$1(element);
8386
-
8387
- 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);
8388
-
8389
- setCurrentlyValidatingElement$1(null);
8390
- }
8391
- }
8392
- /**
8393
- * Ensure that every element either is passed in a static location, in an
8394
- * array with an explicit keys property defined, or in an object literal
8395
- * with valid key property.
8396
- *
8397
- * @internal
8398
- * @param {ReactNode} node Statically passed child of any type.
8399
- * @param {*} parentType node's parent's type.
8400
- */
8401
-
8402
-
8403
- function validateChildKeys(node, parentType) {
8404
- if (typeof node !== 'object') {
8405
- return;
8406
- }
8407
-
8408
- if (isArray(node)) {
8409
- for (var i = 0; i < node.length; i++) {
8410
- var child = node[i];
8411
-
8412
- if (isValidElement(child)) {
8413
- validateExplicitKey(child, parentType);
8414
- }
8415
- }
8416
- } else if (isValidElement(node)) {
8417
- // This element was passed in a valid location.
8418
- if (node._store) {
8419
- node._store.validated = true;
8420
- }
8421
- } else if (node) {
8422
- var iteratorFn = getIteratorFn(node);
8423
-
8424
- if (typeof iteratorFn === 'function') {
8425
- // Entry iterators used to provide implicit keys,
8426
- // but now we print a separate warning for them later.
8427
- if (iteratorFn !== node.entries) {
8428
- var iterator = iteratorFn.call(node);
8429
- var step;
8430
-
8431
- while (!(step = iterator.next()).done) {
8432
- if (isValidElement(step.value)) {
8433
- validateExplicitKey(step.value, parentType);
8434
- }
8435
- }
8436
- }
8437
- }
8438
- }
8439
- }
8440
- /**
8441
- * Given an element, validate that its props follow the propTypes definition,
8442
- * provided by the type.
8443
- *
8444
- * @param {ReactElement} element
8445
- */
8446
-
8447
-
8448
- function validatePropTypes(element) {
8449
- {
8450
- var type = element.type;
8451
-
8452
- if (type === null || type === undefined || typeof type === 'string') {
8453
- return;
8454
- }
8455
-
8456
- var propTypes;
8457
-
8458
- if (typeof type === 'function') {
8459
- propTypes = type.propTypes;
8460
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
8461
- // Inner props are checked in the reconciler.
8462
- type.$$typeof === REACT_MEMO_TYPE)) {
8463
- propTypes = type.propTypes;
8464
- } else {
8465
- return;
8466
- }
8467
-
8468
- if (propTypes) {
8469
- // Intentionally inside to avoid triggering lazy initializers:
8470
- var name = getComponentNameFromType(type);
8471
- checkPropTypes(propTypes, element.props, 'prop', name, element);
8472
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
8473
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
8474
-
8475
- var _name = getComponentNameFromType(type);
8476
-
8477
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
8478
- }
8479
-
8480
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
8481
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
8482
- }
8483
- }
8484
- }
8485
- /**
8486
- * Given a fragment, validate that it can only be provided with fragment props
8487
- * @param {ReactElement} fragment
8488
- */
8489
-
8490
-
8491
- function validateFragmentProps(fragment) {
8492
- {
8493
- var keys = Object.keys(fragment.props);
8494
-
8495
- for (var i = 0; i < keys.length; i++) {
8496
- var key = keys[i];
8497
-
8498
- if (key !== 'children' && key !== 'key') {
8499
- setCurrentlyValidatingElement$1(fragment);
8500
-
8501
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
8502
-
8503
- setCurrentlyValidatingElement$1(null);
8504
- break;
8505
- }
8506
- }
8507
-
8508
- if (fragment.ref !== null) {
8509
- setCurrentlyValidatingElement$1(fragment);
8510
-
8511
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
8512
-
8513
- setCurrentlyValidatingElement$1(null);
8514
- }
8515
- }
8516
- }
8517
- function createElementWithValidation(type, props, children) {
8518
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
8519
- // succeed and there will likely be errors in render.
8520
-
8521
- if (!validType) {
8522
- var info = '';
8523
-
8524
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
8525
- 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.";
8526
- }
8527
-
8528
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
8529
-
8530
- if (sourceInfo) {
8531
- info += sourceInfo;
8532
- } else {
8533
- info += getDeclarationErrorAddendum();
8534
- }
8535
-
8536
- var typeString;
8537
-
8538
- if (type === null) {
8539
- typeString = 'null';
8540
- } else if (isArray(type)) {
8541
- typeString = 'array';
8542
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
8543
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
8544
- info = ' Did you accidentally export a JSX literal instead of a component?';
8545
- } else {
8546
- typeString = typeof type;
8547
- }
8548
-
8549
- {
8550
- error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
8551
- }
8552
- }
8553
-
8554
- var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
8555
- // TODO: Drop this when these are no longer allowed as the type argument.
8556
-
8557
- if (element == null) {
8558
- return element;
8559
- } // Skip key warning if the type isn't valid since our key validation logic
8560
- // doesn't expect a non-string/function type and can throw confusing errors.
8561
- // We don't want exception behavior to differ between dev and prod.
8562
- // (Rendering will throw with a helpful message and as soon as the type is
8563
- // fixed, the key warnings will appear.)
8564
-
8565
-
8566
- if (validType) {
8567
- for (var i = 2; i < arguments.length; i++) {
8568
- validateChildKeys(arguments[i], type);
8569
- }
8570
- }
8571
-
8572
- if (type === REACT_FRAGMENT_TYPE) {
8573
- validateFragmentProps(element);
8574
- } else {
8575
- validatePropTypes(element);
8576
- }
8577
-
8578
- return element;
8579
- }
8580
- var didWarnAboutDeprecatedCreateFactory = false;
8581
- function createFactoryWithValidation(type) {
8582
- var validatedFactory = createElementWithValidation.bind(null, type);
8583
- validatedFactory.type = type;
8584
-
8585
- {
8586
- if (!didWarnAboutDeprecatedCreateFactory) {
8587
- didWarnAboutDeprecatedCreateFactory = true;
8588
-
8589
- warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
8590
- } // Legacy hook: remove it
8591
-
8592
-
8593
- Object.defineProperty(validatedFactory, 'type', {
8594
- enumerable: false,
8595
- get: function () {
8596
- warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
8597
-
8598
- Object.defineProperty(this, 'type', {
8599
- value: type
8600
- });
8601
- return type;
8602
- }
8603
- });
8604
- }
8605
-
8606
- return validatedFactory;
8607
- }
8608
- function cloneElementWithValidation(element, props, children) {
8609
- var newElement = cloneElement.apply(this, arguments);
8610
-
8611
- for (var i = 2; i < arguments.length; i++) {
8612
- validateChildKeys(arguments[i], newElement.type);
8613
- }
8614
-
8615
- validatePropTypes(newElement);
8616
- return newElement;
8617
- }
8618
-
8619
- function startTransition(scope, options) {
8620
- var prevTransition = ReactCurrentBatchConfig.transition;
8621
- ReactCurrentBatchConfig.transition = {};
8622
- var currentTransition = ReactCurrentBatchConfig.transition;
8623
-
8624
- {
8625
- ReactCurrentBatchConfig.transition._updatedFibers = new Set();
8626
- }
8627
-
8628
- try {
8629
- scope();
8630
- } finally {
8631
- ReactCurrentBatchConfig.transition = prevTransition;
8632
-
8633
- {
8634
- if (prevTransition === null && currentTransition._updatedFibers) {
8635
- var updatedFibersCount = currentTransition._updatedFibers.size;
8636
-
8637
- if (updatedFibersCount > 10) {
8638
- warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
8639
- }
8640
-
8641
- currentTransition._updatedFibers.clear();
8642
- }
8643
- }
8644
- }
8645
- }
8646
-
8647
- var didWarnAboutMessageChannel = false;
8648
- var enqueueTaskImpl = null;
8649
- function enqueueTask(task) {
8650
- if (enqueueTaskImpl === null) {
8651
- try {
8652
- // read require off the module object to get around the bundlers.
8653
- // we don't want them to detect a require and bundle a Node polyfill.
8654
- var requireString = ('require' + Math.random()).slice(0, 7);
8655
- var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
8656
- // version of setImmediate, bypassing fake timers if any.
8657
-
8658
- enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
8659
- } catch (_err) {
8660
- // we're in a browser
8661
- // we can't use regular timers because they may still be faked
8662
- // so we try MessageChannel+postMessage instead
8663
- enqueueTaskImpl = function (callback) {
8664
- {
8665
- if (didWarnAboutMessageChannel === false) {
8666
- didWarnAboutMessageChannel = true;
8667
-
8668
- if (typeof MessageChannel === 'undefined') {
8669
- error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
8670
- }
8671
- }
8672
- }
8673
-
8674
- var channel = new MessageChannel();
8675
- channel.port1.onmessage = callback;
8676
- channel.port2.postMessage(undefined);
8677
- };
8678
- }
8679
- }
8680
-
8681
- return enqueueTaskImpl(task);
8682
- }
8683
-
8684
- var actScopeDepth = 0;
8685
- var didWarnNoAwaitAct = false;
8686
- function act(callback) {
8687
- {
8688
- // `act` calls can be nested, so we track the depth. This represents the
8689
- // number of `act` scopes on the stack.
8690
- var prevActScopeDepth = actScopeDepth;
8691
- actScopeDepth++;
8692
-
8693
- if (ReactCurrentActQueue.current === null) {
8694
- // This is the outermost `act` scope. Initialize the queue. The reconciler
8695
- // will detect the queue and use it instead of Scheduler.
8696
- ReactCurrentActQueue.current = [];
8697
- }
8698
-
8699
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
8700
- var result;
8701
-
8702
- try {
8703
- // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
8704
- // set to `true` while the given callback is executed, not for updates
8705
- // triggered during an async event, because this is how the legacy
8706
- // implementation of `act` behaved.
8707
- ReactCurrentActQueue.isBatchingLegacy = true;
8708
- result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
8709
- // which flushed updates immediately after the scope function exits, even
8710
- // if it's an async function.
8711
-
8712
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
8713
- var queue = ReactCurrentActQueue.current;
8714
-
8715
- if (queue !== null) {
8716
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
8717
- flushActQueue(queue);
8718
- }
8719
- }
8720
- } catch (error) {
8721
- popActScope(prevActScopeDepth);
8722
- throw error;
8723
- } finally {
8724
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
8725
- }
8726
-
8727
- if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
8728
- var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
8729
- // for it to resolve before exiting the current scope.
8730
-
8731
- var wasAwaited = false;
8732
- var thenable = {
8733
- then: function (resolve, reject) {
8734
- wasAwaited = true;
8735
- thenableResult.then(function (returnValue) {
8736
- popActScope(prevActScopeDepth);
8737
-
8738
- if (actScopeDepth === 0) {
8739
- // We've exited the outermost act scope. Recursively flush the
8740
- // queue until there's no remaining work.
8741
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
8742
- } else {
8743
- resolve(returnValue);
8744
- }
8745
- }, function (error) {
8746
- // The callback threw an error.
8747
- popActScope(prevActScopeDepth);
8748
- reject(error);
8749
- });
8750
- }
8751
- };
8752
-
8753
- {
8754
- if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
8755
- // eslint-disable-next-line no-undef
8756
- Promise.resolve().then(function () {}).then(function () {
8757
- if (!wasAwaited) {
8758
- didWarnNoAwaitAct = true;
8759
-
8760
- error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
8761
- }
8762
- });
8763
- }
8764
- }
8765
-
8766
- return thenable;
8767
- } else {
8768
- var returnValue = result; // The callback is not an async function. Exit the current scope
8769
- // immediately, without awaiting.
8770
-
8771
- popActScope(prevActScopeDepth);
8772
-
8773
- if (actScopeDepth === 0) {
8774
- // Exiting the outermost act scope. Flush the queue.
8775
- var _queue = ReactCurrentActQueue.current;
8776
-
8777
- if (_queue !== null) {
8778
- flushActQueue(_queue);
8779
- ReactCurrentActQueue.current = null;
8780
- } // Return a thenable. If the user awaits it, we'll flush again in
8781
- // case additional work was scheduled by a microtask.
8782
-
8783
-
8784
- var _thenable = {
8785
- then: function (resolve, reject) {
8786
- // Confirm we haven't re-entered another `act` scope, in case
8787
- // the user does something weird like await the thenable
8788
- // multiple times.
8789
- if (ReactCurrentActQueue.current === null) {
8790
- // Recursively flush the queue until there's no remaining work.
8791
- ReactCurrentActQueue.current = [];
8792
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
8793
- } else {
8794
- resolve(returnValue);
8795
- }
8796
- }
8797
- };
8798
- return _thenable;
8799
- } else {
8800
- // Since we're inside a nested `act` scope, the returned thenable
8801
- // immediately resolves. The outer scope will flush the queue.
8802
- var _thenable2 = {
8803
- then: function (resolve, reject) {
8804
- resolve(returnValue);
8805
- }
8806
- };
8807
- return _thenable2;
8808
- }
8809
- }
8810
- }
8811
- }
8812
-
8813
- function popActScope(prevActScopeDepth) {
8814
- {
8815
- if (prevActScopeDepth !== actScopeDepth - 1) {
8816
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
8817
- }
8818
-
8819
- actScopeDepth = prevActScopeDepth;
8820
- }
8821
- }
8822
-
8823
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
8824
- {
8825
- var queue = ReactCurrentActQueue.current;
8826
-
8827
- if (queue !== null) {
8828
- try {
8829
- flushActQueue(queue);
8830
- enqueueTask(function () {
8831
- if (queue.length === 0) {
8832
- // No additional work was scheduled. Finish.
8833
- ReactCurrentActQueue.current = null;
8834
- resolve(returnValue);
8835
- } else {
8836
- // Keep flushing work until there's none left.
8837
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
8838
- }
8839
- });
8840
- } catch (error) {
8841
- reject(error);
8842
- }
8843
- } else {
8844
- resolve(returnValue);
8845
- }
8846
- }
8847
- }
8848
-
8849
- var isFlushing = false;
8850
-
8851
- function flushActQueue(queue) {
8852
- {
8853
- if (!isFlushing) {
8854
- // Prevent re-entrance.
8855
- isFlushing = true;
8856
- var i = 0;
8857
-
8858
- try {
8859
- for (; i < queue.length; i++) {
8860
- var callback = queue[i];
8861
-
8862
- do {
8863
- callback = callback(true);
8864
- } while (callback !== null);
8865
- }
8866
-
8867
- queue.length = 0;
8868
- } catch (error) {
8869
- // If something throws, leave the remaining callbacks on the queue.
8870
- queue = queue.slice(i + 1);
8871
- throw error;
8872
- } finally {
8873
- isFlushing = false;
8874
- }
8875
- }
8876
- }
8877
- }
8878
-
8879
- var createElement$1 = createElementWithValidation ;
8880
- var cloneElement$1 = cloneElementWithValidation ;
8881
- var createFactory = createFactoryWithValidation ;
8882
- var Children = {
8883
- map: mapChildren,
8884
- forEach: forEachChildren,
8885
- count: countChildren,
8886
- toArray: toArray,
8887
- only: onlyChild
8888
- };
8889
-
8890
- exports.Children = Children;
8891
- exports.Component = Component;
8892
- exports.Fragment = REACT_FRAGMENT_TYPE;
8893
- exports.Profiler = REACT_PROFILER_TYPE;
8894
- exports.PureComponent = PureComponent;
8895
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
8896
- exports.Suspense = REACT_SUSPENSE_TYPE;
8897
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
8898
- exports.cloneElement = cloneElement$1;
8899
- exports.createContext = createContext;
8900
- exports.createElement = createElement$1;
8901
- exports.createFactory = createFactory;
8902
- exports.createRef = createRef;
8903
- exports.forwardRef = forwardRef;
8904
- exports.isValidElement = isValidElement;
8905
- exports.lazy = lazy;
8906
- exports.memo = memo;
8907
- exports.startTransition = startTransition;
8908
- exports.unstable_act = act;
8909
- exports.useCallback = useCallback;
8910
- exports.useContext = useContext;
8911
- exports.useDebugValue = useDebugValue;
8912
- exports.useDeferredValue = useDeferredValue;
8913
- exports.useEffect = useEffect;
8914
- exports.useId = useId;
8915
- exports.useImperativeHandle = useImperativeHandle;
8916
- exports.useInsertionEffect = useInsertionEffect;
8917
- exports.useLayoutEffect = useLayoutEffect;
8918
- exports.useMemo = useMemo;
8919
- exports.useReducer = useReducer;
8920
- exports.useRef = useRef;
8921
- exports.useState = useState;
8922
- exports.useSyncExternalStore = useSyncExternalStore;
8923
- exports.useTransition = useTransition;
8924
- exports.version = ReactVersion;
8925
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
8926
- if (
8927
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
8928
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
8929
- 'function'
8930
- ) {
8931
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
8932
- }
8933
-
8934
- })();
8935
- }
8936
-
8937
-
8938
- /***/ }),
8939
-
8940
- /***/ 77696:
8941
- /***/ ((__unused_webpack_module, exports) => {
8942
-
8943
- "use strict";
8944
- /**
8945
- * @license React
8946
- * react.production.min.js
8947
- *
8948
- * Copyright (c) Facebook, Inc. and its affiliates.
8949
- *
8950
- * This source code is licensed under the MIT license found in the
8951
- * LICENSE file in the root directory of this source tree.
8952
- */
8953
- var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null}
8954
- var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};
8955
- E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;
8956
- H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};
8957
- function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}
8958
- function N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
8959
- function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k=
8960
- a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}
8961
- function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}
8962
- var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=p;
8963
- exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;
8964
- exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);
8965
- for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};
8966
- exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};
8967
- exports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};
8968
- exports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};
8969
- exports.useTransition=function(){return U.current.useTransition()};exports.version="18.2.0";
8970
-
8971
-
8972
- /***/ }),
8973
-
8974
- /***/ 18444:
8975
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8976
-
8977
- "use strict";
8978
-
8979
-
8980
- if (process.env.NODE_ENV === 'production') {
8981
- module.exports = __webpack_require__(77696);
8982
- } else {
8983
- module.exports = __webpack_require__(35857);
8984
- }
8985
-
8986
-
8987
6066
  /***/ }),
8988
6067
 
8989
6068
  /***/ 29556: