seeder-st2110-components 1.7.4 → 1.7.6

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.
package/dist/index.esm.js CHANGED
@@ -481,17 +481,22 @@ const useUpgrade = _ref => {
481
481
  onMenuClick,
482
482
  downloadFiles,
483
483
  upgradeExecute,
484
+ // 上传接口:(formData, config) => Promise<response>
484
485
  upgradeStatus,
486
+ // 状态轮询接口:(config) => Promise<response>
485
487
  acceptFileTypes = "application/octet-stream",
486
488
  uploadCompleteDelay = 3000,
487
489
  statusPollingInterval = 1000
488
490
  } = _ref;
489
491
  const [isSpinning, setIsSpinning] = useState(false);
490
- const [interval, setInterval] = useState(undefined); // 间隔时间,当设置值为 undefined 时会停止计时器
491
- const inputRef = useRef(null);
492
- const [currentStatus, setCurrentStatus] = useState('idle'); // 'idle' | 'uploading' | 'upgrading'
493
- const isUploadCompleteRef = useRef(false); // 安装包上传是否完成
492
+ const [pollingInterval, setPollingInterval] = useState(undefined); // 间隔时间,当设置值为 undefined 时会停止计时器
493
+ const [currentStatus, setCurrentStatus] = useState('idle'); // 'idle' | 'uploading' | 'Upload complete, starting upgrade...' | 'upgrading'
494
494
  const [uploadProgress, setUploadProgress] = useState(0);
495
+ const inputRef = useRef(null);
496
+ // 控制并发上传
497
+ const isUploadingRef = useRef(false);
498
+ // 标记组件是否已卸载
499
+ const isMountedRef = useRef(true);
495
500
 
496
501
  // 分别创建独立的取消令牌
497
502
  const uploadCancelToken = useRef(axios.CancelToken.source());
@@ -617,62 +622,80 @@ const useUpgrade = _ref => {
617
622
  }
618
623
  };
619
624
  const onUpload = () => {
620
- if (inputRef !== null && inputRef !== void 0 && inputRef.current) {
625
+ if (inputRef !== null && inputRef !== void 0 && inputRef.current && !isUploadingRef.current) {
621
626
  inputRef.current.click();
622
627
  }
623
628
  };
624
629
  const updatePackage = async event => {
625
- if (!upgradeExecute) {
626
- console.error('upgradeExecute function is required for upload operation');
627
- message.error('Upload functionality not configured');
630
+ var _event$target$files;
631
+ if (isUploadingRef.current) return; // 防止重复上传
632
+
633
+ const file = (_event$target$files = event.target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files[0];
634
+ if (!file || !upgradeExecute) {
635
+ if (inputRef.current) inputRef.current.value = "";
628
636
  return;
629
637
  }
630
- try {
631
- var _event$target$files;
632
- const file = (_event$target$files = event.target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files[0];
633
- if (!file) return;
634
- showLoader();
635
- setCurrentStatus('Uploading...');
636
- setUploadProgress(0); // 重置进度
638
+ isUploadingRef.current = true;
639
+ showLoader();
640
+ setCurrentStatus('Uploading...');
641
+ setUploadProgress(0);
637
642
 
643
+ // 重置取消令牌
644
+ uploadCancelToken.current.cancel();
645
+ uploadCancelToken.current = axios.CancelToken.source();
646
+ try {
638
647
  const formData = new FormData();
639
648
  formData.append('file', file);
640
- isUploadCompleteRef.current = false;
641
649
 
642
- // 上传文件(不等待响应)
643
- upgradeExecute(formData, {
650
+ // 清除文件选择
651
+ if (inputRef.current) inputRef.current.value = "";
652
+
653
+ // 上传后立即检查业务状态码
654
+ const response = await upgradeExecute(formData, {
644
655
  onUploadProgress: progressEvent => {
656
+ if (!isMountedRef.current) return;
645
657
  const percentCompleted = Math.round(progressEvent.loaded * 100 / progressEvent.total);
646
658
  setUploadProgress(percentCompleted); // 更新进度状态
647
-
648
- if (percentCompleted === 100) {
649
- isUploadCompleteRef.current = true;
650
- // 等待3秒 开始状态轮询
651
- setTimeout(() => {
652
- setInterval(statusPollingInterval);
653
- setCurrentStatus('Upgrading...');
654
- }, uploadCompleteDelay);
655
- }
656
659
  },
657
660
  cancelToken: uploadCancelToken.current.token
658
661
  });
659
662
 
660
- // 清除文件选择
661
- if (inputRef.current) inputRef.current.value = "";
663
+ // 检查业务 code
664
+ if ((response === null || response === void 0 ? void 0 : response.code) !== 200) {
665
+ // 即使上传成功,但如果服务器返回非200,说明有问题
666
+ if (isMountedRef.current) {
667
+ const errorMsg = (response === null || response === void 0 ? void 0 : response.message) || 'Upload failed due to invalid file format';
668
+ message.error(errorMsg);
669
+ cancelRequest();
670
+ }
671
+ return;
672
+ }
673
+
674
+ // 上传成功,进入等待升级阶段
675
+ if (!isMountedRef.current) return;
676
+ setCurrentStatus('Upload complete, starting upgrade...');
677
+
678
+ // 延迟后启动轮询
679
+ setTimeout(() => {
680
+ if (!isMountedRef.current) return;
681
+ setPollingInterval(statusPollingInterval);
682
+ setCurrentStatus('Upgrading...');
683
+ }, uploadCompleteDelay);
662
684
  } catch (error) {
685
+ if (!isMountedRef.current) return;
663
686
  if (!axios.isCancel(error)) {
664
687
  console.error("Upload error:", error);
665
688
  message.error('Upload failed');
666
689
  }
667
690
  cancelRequest();
691
+ } finally {
692
+ if (isMountedRef.current) {
693
+ isUploadingRef.current = false;
694
+ }
668
695
  }
669
696
  };
670
697
  const fetchUpgradeStatus = async () => {
671
- if (!upgradeStatus) {
672
- console.error('upgradeStatus function is required for status checking');
673
- cancelRequest();
674
- return;
675
- }
698
+ if (!upgradeStatus || !isMountedRef.current) return;
676
699
  try {
677
700
  const response = await upgradeStatus({
678
701
  cancelToken: statusCancelToken.current.token
@@ -688,30 +711,36 @@ const useUpgrade = _ref => {
688
711
  case 200:
689
712
  // 升级成功
690
713
  message.success(statusMessage, 2.5, () => {
691
- cancelRequest();
714
+ if (isMountedRef.current) {
715
+ cancelRequest();
716
+ }
692
717
  window.location.reload();
693
718
  });
694
719
  break;
695
720
  case 201:
696
- // 升级中
697
- // code为201时,每隔一秒请求一次。直到请求到其他的code,直接弹出message提示。
721
+ // 升级中 — 继续轮询
698
722
  break;
699
723
  case 202: // 升级失败
700
724
  case 203:
701
725
  // 升级异常
702
- message.error(statusMessage);
703
- cancelRequest();
726
+ if (isMountedRef.current) {
727
+ message.error(statusMessage);
728
+ cancelRequest();
729
+ }
704
730
  break;
705
731
  default:
732
+ // 其他 code 如 500、400 等
733
+ if (isMountedRef.current) {
734
+ message.error(statusMessage || 'Upgrade process failed');
735
+ cancelRequest();
736
+ }
706
737
  break;
707
738
  }
708
739
  }
709
740
  } catch (error) {
710
- if (axios.isCancel(error)) {
711
- console.log('Status polling canceled');
712
- } else {
741
+ if (!isMountedRef.current) return;
742
+ if (!axios.isCancel(error)) {
713
743
  console.error('Status check failed:', error);
714
- // 网络错误时自动重试
715
744
  }
716
745
  }
717
746
  };
@@ -723,17 +752,20 @@ const useUpgrade = _ref => {
723
752
  statusCancelToken.current = axios.CancelToken.source();
724
753
 
725
754
  // 重置所有状态
726
- setInterval(undefined);
755
+ setPollingInterval(undefined);
727
756
  setCurrentStatus('idle');
757
+ setUploadProgress(0);
758
+ isUploadingRef.current = false;
728
759
  hideLoader();
729
760
  };
730
761
 
731
762
  // 轮询状态
732
- useInterval(fetchUpgradeStatus, interval);
763
+ useInterval(fetchUpgradeStatus, pollingInterval);
733
764
 
734
765
  // 组件卸载时清理
735
766
  useEffect(() => {
736
767
  return () => {
768
+ isMountedRef.current = false;
737
769
  uploadCancelToken.current.cancel();
738
770
  statusCancelToken.current.cancel();
739
771
  };
@@ -2005,8 +2037,10 @@ const Preset = _ref => {
2005
2037
  }, [selectedPreset, form, modal, message, texts, removePreset, getPresetList]);
2006
2038
  const handleLoadPreset = useCallback(async loadData => {
2007
2039
  if (!loadData) return;
2008
- let resolveLoading = null;
2009
- const modalInstance = modal.confirm({
2040
+ let modalInstance = null;
2041
+ let resolveOk = null; // 用于控制 confirm 关闭时机
2042
+
2043
+ modalInstance = modal.confirm({
2010
2044
  title: 'Load Preset',
2011
2045
  content: "".concat(texts.loadConfirm, " \"").concat(loadData.name, "\"?"),
2012
2046
  cancelText: 'No',
@@ -2014,7 +2048,7 @@ const Preset = _ref => {
2014
2048
  // onOk 返回一个 pending Promise
2015
2049
  onOk: () => {
2016
2050
  return new Promise((resolve, reject) => {
2017
- resolveLoading = resolve;
2051
+ resolveOk = resolve;
2018
2052
 
2019
2053
  // 立即切换为 loading 状态
2020
2054
  modalInstance.update({
@@ -2036,42 +2070,40 @@ const Preset = _ref => {
2036
2070
  maskClosable: false,
2037
2071
  closable: false
2038
2072
  });
2073
+ (async () => {
2074
+ try {
2075
+ await loadPreset(_objectSpread2$1({
2076
+ id: loadData.id
2077
+ }, loadData.category_list && {
2078
+ category_list: loadData.category_list
2079
+ }));
2080
+
2081
+ // 成功:1秒后自动关闭
2082
+ setTimeout(() => {
2083
+ var _resolveOk;
2084
+ (_resolveOk = resolveOk) === null || _resolveOk === void 0 || _resolveOk();
2085
+ message.success(texts.successText);
2086
+ // 加载成功的外部回调
2087
+ if (onLoadSuccess) {
2088
+ onLoadSuccess(loadData);
2089
+ }
2090
+ }, 1000);
2091
+ } catch (error) {
2092
+ console.error('Failed to load preset:', error);
2093
+ // 失败:直接关闭 modal
2094
+ modalInstance.destroy();
2095
+ // 加载失败的外部回调
2096
+ if (onLoadError) {
2097
+ onLoadError(error, loadData);
2098
+ }
2099
+ }
2100
+ })();
2039
2101
  });
2040
2102
  },
2041
2103
  onCancel: () => {
2042
2104
  // 用户取消
2043
2105
  }
2044
2106
  });
2045
-
2046
- // 延迟执行异步操作,确保 update 生效
2047
- setTimeout(async () => {
2048
- try {
2049
- await loadPreset(_objectSpread2$1({
2050
- id: loadData.id
2051
- }, loadData.category_list && {
2052
- category_list: loadData.category_list
2053
- }));
2054
-
2055
- // 成功 1秒后自动关闭
2056
- setTimeout(() => {
2057
- var _resolveLoading;
2058
- (_resolveLoading = resolveLoading) === null || _resolveLoading === void 0 || _resolveLoading();
2059
- message.success(texts.successText);
2060
-
2061
- // 加载成功的外部回调
2062
- if (onLoadSuccess) {
2063
- onLoadSuccess(loadData);
2064
- }
2065
- }, 2000);
2066
- } catch (error) {
2067
- console.error('Failed to load preset:', error);
2068
- modalInstance.destroy();
2069
- // 加载失败的外部回调
2070
- if (onLoadError) {
2071
- onLoadError(error, loadData);
2072
- }
2073
- }
2074
- }, 100);
2075
2107
  }, [loadPreset, texts, message, modal, onLoadSuccess, onLoadError]);
2076
2108
  const handleSave = useCallback(async () => {
2077
2109
  setLoading(true);
@@ -2278,15 +2310,15 @@ UpgradeManager.defaultProps = {
2278
2310
  };
2279
2311
  var UpgradeManager$1 = UpgradeManager;
2280
2312
 
2281
- function getDefaultExportFromCjs$3 (x) {
2313
+ function getDefaultExportFromCjs$5 (x) {
2282
2314
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
2283
2315
  }
2284
2316
 
2285
- var propTypes$3 = {exports: {}};
2317
+ var propTypes$5 = {exports: {}};
2286
2318
 
2287
- var reactIs$3 = {exports: {}};
2319
+ var reactIs$5 = {exports: {}};
2288
2320
 
2289
- var reactIs_production_min$3 = {};
2321
+ var reactIs_production_min$5 = {};
2290
2322
 
2291
2323
  /** @license React v16.13.1
2292
2324
  * react-is.production.min.js
@@ -2297,21 +2329,21 @@ var reactIs_production_min$3 = {};
2297
2329
  * LICENSE file in the root directory of this source tree.
2298
2330
  */
2299
2331
 
2300
- var hasRequiredReactIs_production_min$3;
2332
+ var hasRequiredReactIs_production_min$5;
2301
2333
 
2302
- function requireReactIs_production_min$3 () {
2303
- if (hasRequiredReactIs_production_min$3) return reactIs_production_min$3;
2304
- hasRequiredReactIs_production_min$3 = 1;
2334
+ function requireReactIs_production_min$5 () {
2335
+ if (hasRequiredReactIs_production_min$5) return reactIs_production_min$5;
2336
+ hasRequiredReactIs_production_min$5 = 1;
2305
2337
  var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
2306
2338
  Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
2307
- function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min$3.AsyncMode=l;reactIs_production_min$3.ConcurrentMode=m;reactIs_production_min$3.ContextConsumer=k;reactIs_production_min$3.ContextProvider=h;reactIs_production_min$3.Element=c;reactIs_production_min$3.ForwardRef=n;reactIs_production_min$3.Fragment=e;reactIs_production_min$3.Lazy=t;reactIs_production_min$3.Memo=r;reactIs_production_min$3.Portal=d;
2308
- reactIs_production_min$3.Profiler=g;reactIs_production_min$3.StrictMode=f;reactIs_production_min$3.Suspense=p;reactIs_production_min$3.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$3.isConcurrentMode=A;reactIs_production_min$3.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$3.isContextProvider=function(a){return z(a)===h};reactIs_production_min$3.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$3.isForwardRef=function(a){return z(a)===n};reactIs_production_min$3.isFragment=function(a){return z(a)===e};reactIs_production_min$3.isLazy=function(a){return z(a)===t};
2309
- reactIs_production_min$3.isMemo=function(a){return z(a)===r};reactIs_production_min$3.isPortal=function(a){return z(a)===d};reactIs_production_min$3.isProfiler=function(a){return z(a)===g};reactIs_production_min$3.isStrictMode=function(a){return z(a)===f};reactIs_production_min$3.isSuspense=function(a){return z(a)===p};
2310
- reactIs_production_min$3.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min$3.typeOf=z;
2311
- return reactIs_production_min$3;
2339
+ function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min$5.AsyncMode=l;reactIs_production_min$5.ConcurrentMode=m;reactIs_production_min$5.ContextConsumer=k;reactIs_production_min$5.ContextProvider=h;reactIs_production_min$5.Element=c;reactIs_production_min$5.ForwardRef=n;reactIs_production_min$5.Fragment=e;reactIs_production_min$5.Lazy=t;reactIs_production_min$5.Memo=r;reactIs_production_min$5.Portal=d;
2340
+ reactIs_production_min$5.Profiler=g;reactIs_production_min$5.StrictMode=f;reactIs_production_min$5.Suspense=p;reactIs_production_min$5.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$5.isConcurrentMode=A;reactIs_production_min$5.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$5.isContextProvider=function(a){return z(a)===h};reactIs_production_min$5.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$5.isForwardRef=function(a){return z(a)===n};reactIs_production_min$5.isFragment=function(a){return z(a)===e};reactIs_production_min$5.isLazy=function(a){return z(a)===t};
2341
+ reactIs_production_min$5.isMemo=function(a){return z(a)===r};reactIs_production_min$5.isPortal=function(a){return z(a)===d};reactIs_production_min$5.isProfiler=function(a){return z(a)===g};reactIs_production_min$5.isStrictMode=function(a){return z(a)===f};reactIs_production_min$5.isSuspense=function(a){return z(a)===p};
2342
+ reactIs_production_min$5.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min$5.typeOf=z;
2343
+ return reactIs_production_min$5;
2312
2344
  }
2313
2345
 
2314
- var reactIs_development$3 = {};
2346
+ var reactIs_development$5 = {};
2315
2347
 
2316
2348
  /** @license React v16.13.1
2317
2349
  * react-is.development.js
@@ -2322,11 +2354,11 @@ var reactIs_development$3 = {};
2322
2354
  * LICENSE file in the root directory of this source tree.
2323
2355
  */
2324
2356
 
2325
- var hasRequiredReactIs_development$3;
2357
+ var hasRequiredReactIs_development$5;
2326
2358
 
2327
- function requireReactIs_development$3 () {
2328
- if (hasRequiredReactIs_development$3) return reactIs_development$3;
2329
- hasRequiredReactIs_development$3 = 1;
2359
+ function requireReactIs_development$5 () {
2360
+ if (hasRequiredReactIs_development$5) return reactIs_development$5;
2361
+ hasRequiredReactIs_development$5 = 1;
2330
2362
 
2331
2363
 
2332
2364
 
@@ -2467,51 +2499,51 @@ function requireReactIs_development$3 () {
2467
2499
  return typeOf(object) === REACT_SUSPENSE_TYPE;
2468
2500
  }
2469
2501
 
2470
- reactIs_development$3.AsyncMode = AsyncMode;
2471
- reactIs_development$3.ConcurrentMode = ConcurrentMode;
2472
- reactIs_development$3.ContextConsumer = ContextConsumer;
2473
- reactIs_development$3.ContextProvider = ContextProvider;
2474
- reactIs_development$3.Element = Element;
2475
- reactIs_development$3.ForwardRef = ForwardRef;
2476
- reactIs_development$3.Fragment = Fragment;
2477
- reactIs_development$3.Lazy = Lazy;
2478
- reactIs_development$3.Memo = Memo;
2479
- reactIs_development$3.Portal = Portal;
2480
- reactIs_development$3.Profiler = Profiler;
2481
- reactIs_development$3.StrictMode = StrictMode;
2482
- reactIs_development$3.Suspense = Suspense;
2483
- reactIs_development$3.isAsyncMode = isAsyncMode;
2484
- reactIs_development$3.isConcurrentMode = isConcurrentMode;
2485
- reactIs_development$3.isContextConsumer = isContextConsumer;
2486
- reactIs_development$3.isContextProvider = isContextProvider;
2487
- reactIs_development$3.isElement = isElement;
2488
- reactIs_development$3.isForwardRef = isForwardRef;
2489
- reactIs_development$3.isFragment = isFragment;
2490
- reactIs_development$3.isLazy = isLazy;
2491
- reactIs_development$3.isMemo = isMemo;
2492
- reactIs_development$3.isPortal = isPortal;
2493
- reactIs_development$3.isProfiler = isProfiler;
2494
- reactIs_development$3.isStrictMode = isStrictMode;
2495
- reactIs_development$3.isSuspense = isSuspense;
2496
- reactIs_development$3.isValidElementType = isValidElementType;
2497
- reactIs_development$3.typeOf = typeOf;
2502
+ reactIs_development$5.AsyncMode = AsyncMode;
2503
+ reactIs_development$5.ConcurrentMode = ConcurrentMode;
2504
+ reactIs_development$5.ContextConsumer = ContextConsumer;
2505
+ reactIs_development$5.ContextProvider = ContextProvider;
2506
+ reactIs_development$5.Element = Element;
2507
+ reactIs_development$5.ForwardRef = ForwardRef;
2508
+ reactIs_development$5.Fragment = Fragment;
2509
+ reactIs_development$5.Lazy = Lazy;
2510
+ reactIs_development$5.Memo = Memo;
2511
+ reactIs_development$5.Portal = Portal;
2512
+ reactIs_development$5.Profiler = Profiler;
2513
+ reactIs_development$5.StrictMode = StrictMode;
2514
+ reactIs_development$5.Suspense = Suspense;
2515
+ reactIs_development$5.isAsyncMode = isAsyncMode;
2516
+ reactIs_development$5.isConcurrentMode = isConcurrentMode;
2517
+ reactIs_development$5.isContextConsumer = isContextConsumer;
2518
+ reactIs_development$5.isContextProvider = isContextProvider;
2519
+ reactIs_development$5.isElement = isElement;
2520
+ reactIs_development$5.isForwardRef = isForwardRef;
2521
+ reactIs_development$5.isFragment = isFragment;
2522
+ reactIs_development$5.isLazy = isLazy;
2523
+ reactIs_development$5.isMemo = isMemo;
2524
+ reactIs_development$5.isPortal = isPortal;
2525
+ reactIs_development$5.isProfiler = isProfiler;
2526
+ reactIs_development$5.isStrictMode = isStrictMode;
2527
+ reactIs_development$5.isSuspense = isSuspense;
2528
+ reactIs_development$5.isValidElementType = isValidElementType;
2529
+ reactIs_development$5.typeOf = typeOf;
2498
2530
  })();
2499
2531
  }
2500
- return reactIs_development$3;
2532
+ return reactIs_development$5;
2501
2533
  }
2502
2534
 
2503
- var hasRequiredReactIs$3;
2535
+ var hasRequiredReactIs$5;
2504
2536
 
2505
- function requireReactIs$3 () {
2506
- if (hasRequiredReactIs$3) return reactIs$3.exports;
2507
- hasRequiredReactIs$3 = 1;
2537
+ function requireReactIs$5 () {
2538
+ if (hasRequiredReactIs$5) return reactIs$5.exports;
2539
+ hasRequiredReactIs$5 = 1;
2508
2540
 
2509
2541
  if (process.env.NODE_ENV === 'production') {
2510
- reactIs$3.exports = requireReactIs_production_min$3();
2542
+ reactIs$5.exports = requireReactIs_production_min$5();
2511
2543
  } else {
2512
- reactIs$3.exports = requireReactIs_development$3();
2544
+ reactIs$5.exports = requireReactIs_development$5();
2513
2545
  }
2514
- return reactIs$3.exports;
2546
+ return reactIs$5.exports;
2515
2547
  }
2516
2548
 
2517
2549
  /*
@@ -2520,12 +2552,12 @@ object-assign
2520
2552
  @license MIT
2521
2553
  */
2522
2554
 
2523
- var objectAssign$3;
2524
- var hasRequiredObjectAssign$3;
2555
+ var objectAssign$5;
2556
+ var hasRequiredObjectAssign$5;
2525
2557
 
2526
- function requireObjectAssign$3 () {
2527
- if (hasRequiredObjectAssign$3) return objectAssign$3;
2528
- hasRequiredObjectAssign$3 = 1;
2558
+ function requireObjectAssign$5 () {
2559
+ if (hasRequiredObjectAssign$5) return objectAssign$5;
2560
+ hasRequiredObjectAssign$5 = 1;
2529
2561
  /* eslint-disable no-unused-vars */
2530
2562
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2531
2563
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -2583,7 +2615,7 @@ function requireObjectAssign$3 () {
2583
2615
  }
2584
2616
  }
2585
2617
 
2586
- objectAssign$3 = shouldUseNative() ? Object.assign : function (target, source) {
2618
+ objectAssign$5 = shouldUseNative() ? Object.assign : function (target, source) {
2587
2619
  var from;
2588
2620
  var to = toObject(target);
2589
2621
  var symbols;
@@ -2609,7 +2641,7 @@ function requireObjectAssign$3 () {
2609
2641
 
2610
2642
  return to;
2611
2643
  };
2612
- return objectAssign$3;
2644
+ return objectAssign$5;
2613
2645
  }
2614
2646
 
2615
2647
  /**
@@ -2619,27 +2651,27 @@ function requireObjectAssign$3 () {
2619
2651
  * LICENSE file in the root directory of this source tree.
2620
2652
  */
2621
2653
 
2622
- var ReactPropTypesSecret_1$3;
2623
- var hasRequiredReactPropTypesSecret$3;
2654
+ var ReactPropTypesSecret_1$5;
2655
+ var hasRequiredReactPropTypesSecret$5;
2624
2656
 
2625
- function requireReactPropTypesSecret$3 () {
2626
- if (hasRequiredReactPropTypesSecret$3) return ReactPropTypesSecret_1$3;
2627
- hasRequiredReactPropTypesSecret$3 = 1;
2657
+ function requireReactPropTypesSecret$5 () {
2658
+ if (hasRequiredReactPropTypesSecret$5) return ReactPropTypesSecret_1$5;
2659
+ hasRequiredReactPropTypesSecret$5 = 1;
2628
2660
 
2629
2661
  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2630
2662
 
2631
- ReactPropTypesSecret_1$3 = ReactPropTypesSecret;
2632
- return ReactPropTypesSecret_1$3;
2663
+ ReactPropTypesSecret_1$5 = ReactPropTypesSecret;
2664
+ return ReactPropTypesSecret_1$5;
2633
2665
  }
2634
2666
 
2635
- var has$3;
2636
- var hasRequiredHas$3;
2667
+ var has$5;
2668
+ var hasRequiredHas$5;
2637
2669
 
2638
- function requireHas$3 () {
2639
- if (hasRequiredHas$3) return has$3;
2640
- hasRequiredHas$3 = 1;
2641
- has$3 = Function.call.bind(Object.prototype.hasOwnProperty);
2642
- return has$3;
2670
+ function requireHas$5 () {
2671
+ if (hasRequiredHas$5) return has$5;
2672
+ hasRequiredHas$5 = 1;
2673
+ has$5 = Function.call.bind(Object.prototype.hasOwnProperty);
2674
+ return has$5;
2643
2675
  }
2644
2676
 
2645
2677
  /**
@@ -2649,19 +2681,19 @@ function requireHas$3 () {
2649
2681
  * LICENSE file in the root directory of this source tree.
2650
2682
  */
2651
2683
 
2652
- var checkPropTypes_1$3;
2653
- var hasRequiredCheckPropTypes$3;
2684
+ var checkPropTypes_1$5;
2685
+ var hasRequiredCheckPropTypes$5;
2654
2686
 
2655
- function requireCheckPropTypes$3 () {
2656
- if (hasRequiredCheckPropTypes$3) return checkPropTypes_1$3;
2657
- hasRequiredCheckPropTypes$3 = 1;
2687
+ function requireCheckPropTypes$5 () {
2688
+ if (hasRequiredCheckPropTypes$5) return checkPropTypes_1$5;
2689
+ hasRequiredCheckPropTypes$5 = 1;
2658
2690
 
2659
2691
  var printWarning = function() {};
2660
2692
 
2661
2693
  if (process.env.NODE_ENV !== 'production') {
2662
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$3();
2694
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$5();
2663
2695
  var loggedTypeFailures = {};
2664
- var has = /*@__PURE__*/ requireHas$3();
2696
+ var has = /*@__PURE__*/ requireHas$5();
2665
2697
 
2666
2698
  printWarning = function(text) {
2667
2699
  var message = 'Warning: ' + text;
@@ -2749,8 +2781,8 @@ function requireCheckPropTypes$3 () {
2749
2781
  }
2750
2782
  };
2751
2783
 
2752
- checkPropTypes_1$3 = checkPropTypes;
2753
- return checkPropTypes_1$3;
2784
+ checkPropTypes_1$5 = checkPropTypes;
2785
+ return checkPropTypes_1$5;
2754
2786
  }
2755
2787
 
2756
2788
  /**
@@ -2760,19 +2792,19 @@ function requireCheckPropTypes$3 () {
2760
2792
  * LICENSE file in the root directory of this source tree.
2761
2793
  */
2762
2794
 
2763
- var factoryWithTypeCheckers$3;
2764
- var hasRequiredFactoryWithTypeCheckers$3;
2795
+ var factoryWithTypeCheckers$5;
2796
+ var hasRequiredFactoryWithTypeCheckers$5;
2765
2797
 
2766
- function requireFactoryWithTypeCheckers$3 () {
2767
- if (hasRequiredFactoryWithTypeCheckers$3) return factoryWithTypeCheckers$3;
2768
- hasRequiredFactoryWithTypeCheckers$3 = 1;
2798
+ function requireFactoryWithTypeCheckers$5 () {
2799
+ if (hasRequiredFactoryWithTypeCheckers$5) return factoryWithTypeCheckers$5;
2800
+ hasRequiredFactoryWithTypeCheckers$5 = 1;
2769
2801
 
2770
- var ReactIs = requireReactIs$3();
2771
- var assign = requireObjectAssign$3();
2802
+ var ReactIs = requireReactIs$5();
2803
+ var assign = requireObjectAssign$5();
2772
2804
 
2773
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$3();
2774
- var has = /*@__PURE__*/ requireHas$3();
2775
- var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$3();
2805
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$5();
2806
+ var has = /*@__PURE__*/ requireHas$5();
2807
+ var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$5();
2776
2808
 
2777
2809
  var printWarning = function() {};
2778
2810
 
@@ -2795,7 +2827,7 @@ function requireFactoryWithTypeCheckers$3 () {
2795
2827
  return null;
2796
2828
  }
2797
2829
 
2798
- factoryWithTypeCheckers$3 = function(isValidElement, throwOnDirectAccess) {
2830
+ factoryWithTypeCheckers$5 = function(isValidElement, throwOnDirectAccess) {
2799
2831
  /* global Symbol */
2800
2832
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2801
2833
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
@@ -3368,7 +3400,7 @@ function requireFactoryWithTypeCheckers$3 () {
3368
3400
 
3369
3401
  return ReactPropTypes;
3370
3402
  };
3371
- return factoryWithTypeCheckers$3;
3403
+ return factoryWithTypeCheckers$5;
3372
3404
  }
3373
3405
 
3374
3406
  /**
@@ -3378,20 +3410,20 @@ function requireFactoryWithTypeCheckers$3 () {
3378
3410
  * LICENSE file in the root directory of this source tree.
3379
3411
  */
3380
3412
 
3381
- var factoryWithThrowingShims$3;
3382
- var hasRequiredFactoryWithThrowingShims$3;
3413
+ var factoryWithThrowingShims$5;
3414
+ var hasRequiredFactoryWithThrowingShims$5;
3383
3415
 
3384
- function requireFactoryWithThrowingShims$3 () {
3385
- if (hasRequiredFactoryWithThrowingShims$3) return factoryWithThrowingShims$3;
3386
- hasRequiredFactoryWithThrowingShims$3 = 1;
3416
+ function requireFactoryWithThrowingShims$5 () {
3417
+ if (hasRequiredFactoryWithThrowingShims$5) return factoryWithThrowingShims$5;
3418
+ hasRequiredFactoryWithThrowingShims$5 = 1;
3387
3419
 
3388
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$3();
3420
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$5();
3389
3421
 
3390
3422
  function emptyFunction() {}
3391
3423
  function emptyFunctionWithReset() {}
3392
3424
  emptyFunctionWithReset.resetWarningCache = emptyFunction;
3393
3425
 
3394
- factoryWithThrowingShims$3 = function() {
3426
+ factoryWithThrowingShims$5 = function() {
3395
3427
  function shim(props, propName, componentName, location, propFullName, secret) {
3396
3428
  if (secret === ReactPropTypesSecret) {
3397
3429
  // It is still safe when called from React.
@@ -3439,7 +3471,7 @@ function requireFactoryWithThrowingShims$3 () {
3439
3471
 
3440
3472
  return ReactPropTypes;
3441
3473
  };
3442
- return factoryWithThrowingShims$3;
3474
+ return factoryWithThrowingShims$5;
3443
3475
  }
3444
3476
 
3445
3477
  /**
@@ -3449,28 +3481,28 @@ function requireFactoryWithThrowingShims$3 () {
3449
3481
  * LICENSE file in the root directory of this source tree.
3450
3482
  */
3451
3483
 
3452
- var hasRequiredPropTypes$3;
3484
+ var hasRequiredPropTypes$5;
3453
3485
 
3454
- function requirePropTypes$3 () {
3455
- if (hasRequiredPropTypes$3) return propTypes$3.exports;
3456
- hasRequiredPropTypes$3 = 1;
3486
+ function requirePropTypes$5 () {
3487
+ if (hasRequiredPropTypes$5) return propTypes$5.exports;
3488
+ hasRequiredPropTypes$5 = 1;
3457
3489
  if (process.env.NODE_ENV !== 'production') {
3458
- var ReactIs = requireReactIs$3();
3490
+ var ReactIs = requireReactIs$5();
3459
3491
 
3460
3492
  // By explicitly using `prop-types` you are opting into new development behavior.
3461
3493
  // http://fb.me/prop-types-in-prod
3462
3494
  var throwOnDirectAccess = true;
3463
- propTypes$3.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$3()(ReactIs.isElement, throwOnDirectAccess);
3495
+ propTypes$5.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$5()(ReactIs.isElement, throwOnDirectAccess);
3464
3496
  } else {
3465
3497
  // By explicitly using `prop-types` you are opting into new production behavior.
3466
3498
  // http://fb.me/prop-types-in-prod
3467
- propTypes$3.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$3()();
3499
+ propTypes$5.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$5()();
3468
3500
  }
3469
- return propTypes$3.exports;
3501
+ return propTypes$5.exports;
3470
3502
  }
3471
3503
 
3472
- var propTypesExports$3 = /*@__PURE__*/ requirePropTypes$3();
3473
- var PropTypes$3 = /*@__PURE__*/getDefaultExportFromCjs$3(propTypesExports$3);
3504
+ var propTypesExports$5 = /*@__PURE__*/ requirePropTypes$5();
3505
+ var PropTypes$5 = /*@__PURE__*/getDefaultExportFromCjs$5(propTypesExports$5);
3474
3506
 
3475
3507
  const SystemOperations = _ref => {
3476
3508
  let {
@@ -3552,15 +3584,15 @@ const SystemOperations = _ref => {
3552
3584
  });
3553
3585
  };
3554
3586
  SystemOperations.propTypes = {
3555
- onPowerOff: PropTypes$3.func,
3556
- onRestart: PropTypes$3.func,
3557
- powerOffLabel: PropTypes$3.string,
3558
- restartLabel: PropTypes$3.string,
3559
- iconClassName: PropTypes$3.string,
3560
- confirmTitle: PropTypes$3.string,
3561
- cancelText: PropTypes$3.string,
3562
- okText: PropTypes$3.string,
3563
- run: PropTypes$3.func
3587
+ onPowerOff: PropTypes$5.func,
3588
+ onRestart: PropTypes$5.func,
3589
+ powerOffLabel: PropTypes$5.string,
3590
+ restartLabel: PropTypes$5.string,
3591
+ iconClassName: PropTypes$5.string,
3592
+ confirmTitle: PropTypes$5.string,
3593
+ cancelText: PropTypes$5.string,
3594
+ okText: PropTypes$5.string,
3595
+ run: PropTypes$5.func
3564
3596
  };
3565
3597
  var SystemOperations$1 = SystemOperations;
3566
3598
 
@@ -3603,10 +3635,10 @@ const useSpaLogo = function () {
3603
3635
  }, "logo")];
3604
3636
  };
3605
3637
  useSpaLogo.propTypes = {
3606
- logoUrl: PropTypes$3.string,
3607
- logoWidth: PropTypes$3.number,
3608
- logoAlt: PropTypes$3.string,
3609
- onClick: PropTypes$3.func
3638
+ logoUrl: PropTypes$5.string,
3639
+ logoWidth: PropTypes$5.number,
3640
+ logoAlt: PropTypes$5.string,
3641
+ onClick: PropTypes$5.func
3610
3642
  };
3611
3643
  var useSpaLogo$1 = useSpaLogo;
3612
3644
 
@@ -3708,23 +3740,23 @@ const CommonHeader = _ref => {
3708
3740
 
3709
3741
  // PropTypes 类型检查
3710
3742
  CommonHeader.propTypes = {
3711
- menuElement: PropTypes$3.node,
3712
- productInfo: PropTypes$3.shape({
3713
- productName: PropTypes$3.string,
3714
- version: PropTypes$3.string
3743
+ menuElement: PropTypes$5.node,
3744
+ productInfo: PropTypes$5.shape({
3745
+ productName: PropTypes$5.string,
3746
+ version: PropTypes$5.string
3715
3747
  }),
3716
- showLogo: PropTypes$3.bool,
3717
- showProductInfo: PropTypes$3.bool,
3718
- showHardwareUsage: PropTypes$3.bool,
3719
- showSystemOperations: PropTypes$3.bool,
3720
- onPowerOff: PropTypes$3.func,
3721
- onRestart: PropTypes$3.func,
3722
- onRun: PropTypes$3.func,
3723
- hardwareMonitorUrl: PropTypes$3.string,
3724
- getSocketUrl: PropTypes$3.func,
3725
- logoProps: PropTypes$3.object,
3726
- className: PropTypes$3.string,
3727
- style: PropTypes$3.object
3748
+ showLogo: PropTypes$5.bool,
3749
+ showProductInfo: PropTypes$5.bool,
3750
+ showHardwareUsage: PropTypes$5.bool,
3751
+ showSystemOperations: PropTypes$5.bool,
3752
+ onPowerOff: PropTypes$5.func,
3753
+ onRestart: PropTypes$5.func,
3754
+ onRun: PropTypes$5.func,
3755
+ hardwareMonitorUrl: PropTypes$5.string,
3756
+ getSocketUrl: PropTypes$5.func,
3757
+ logoProps: PropTypes$5.object,
3758
+ className: PropTypes$5.string,
3759
+ style: PropTypes$5.object
3728
3760
  };
3729
3761
  var CommonHeader$1 = CommonHeader;
3730
3762
 
@@ -3881,6 +3913,2402 @@ const StyledModal = props => {
3881
3913
  }, restProps));
3882
3914
  };
3883
3915
  var StyledModal$1 = StyledModal;
3916
+ function getDefaultExportFromCjs$4(x) {
3917
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3918
+ }
3919
+ var propTypes$4 = {
3920
+ exports: {}
3921
+ };
3922
+ var reactIs$4 = {
3923
+ exports: {}
3924
+ };
3925
+ var reactIs_production_min$4 = {};
3926
+
3927
+ /** @license React v16.13.1
3928
+ * react-is.production.min.js
3929
+ *
3930
+ * Copyright (c) Facebook, Inc. and its affiliates.
3931
+ *
3932
+ * This source code is licensed under the MIT license found in the
3933
+ * LICENSE file in the root directory of this source tree.
3934
+ */
3935
+
3936
+ var hasRequiredReactIs_production_min$4;
3937
+ function requireReactIs_production_min$4() {
3938
+ if (hasRequiredReactIs_production_min$4) return reactIs_production_min$4;
3939
+ hasRequiredReactIs_production_min$4 = 1;
3940
+ var b = "function" === typeof Symbol && Symbol.for,
3941
+ c = b ? Symbol.for("react.element") : 60103,
3942
+ d = b ? Symbol.for("react.portal") : 60106,
3943
+ e = b ? Symbol.for("react.fragment") : 60107,
3944
+ f = b ? Symbol.for("react.strict_mode") : 60108,
3945
+ g = b ? Symbol.for("react.profiler") : 60114,
3946
+ h = b ? Symbol.for("react.provider") : 60109,
3947
+ k = b ? Symbol.for("react.context") : 60110,
3948
+ l = b ? Symbol.for("react.async_mode") : 60111,
3949
+ m = b ? Symbol.for("react.concurrent_mode") : 60111,
3950
+ n = b ? Symbol.for("react.forward_ref") : 60112,
3951
+ p = b ? Symbol.for("react.suspense") : 60113,
3952
+ q = b ? Symbol.for("react.suspense_list") : 60120,
3953
+ r = b ? Symbol.for("react.memo") : 60115,
3954
+ t = b ? Symbol.for("react.lazy") : 60116,
3955
+ v = b ? Symbol.for("react.block") : 60121,
3956
+ w = b ? Symbol.for("react.fundamental") : 60117,
3957
+ x = b ? Symbol.for("react.responder") : 60118,
3958
+ y = b ? Symbol.for("react.scope") : 60119;
3959
+ function z(a) {
3960
+ if ("object" === typeof a && null !== a) {
3961
+ var u = a.$$typeof;
3962
+ switch (u) {
3963
+ case c:
3964
+ switch (a = a.type, a) {
3965
+ case l:
3966
+ case m:
3967
+ case e:
3968
+ case g:
3969
+ case f:
3970
+ case p:
3971
+ return a;
3972
+ default:
3973
+ switch (a = a && a.$$typeof, a) {
3974
+ case k:
3975
+ case n:
3976
+ case t:
3977
+ case r:
3978
+ case h:
3979
+ return a;
3980
+ default:
3981
+ return u;
3982
+ }
3983
+ }
3984
+ case d:
3985
+ return u;
3986
+ }
3987
+ }
3988
+ }
3989
+ function A(a) {
3990
+ return z(a) === m;
3991
+ }
3992
+ reactIs_production_min$4.AsyncMode = l;
3993
+ reactIs_production_min$4.ConcurrentMode = m;
3994
+ reactIs_production_min$4.ContextConsumer = k;
3995
+ reactIs_production_min$4.ContextProvider = h;
3996
+ reactIs_production_min$4.Element = c;
3997
+ reactIs_production_min$4.ForwardRef = n;
3998
+ reactIs_production_min$4.Fragment = e;
3999
+ reactIs_production_min$4.Lazy = t;
4000
+ reactIs_production_min$4.Memo = r;
4001
+ reactIs_production_min$4.Portal = d;
4002
+ reactIs_production_min$4.Profiler = g;
4003
+ reactIs_production_min$4.StrictMode = f;
4004
+ reactIs_production_min$4.Suspense = p;
4005
+ reactIs_production_min$4.isAsyncMode = function (a) {
4006
+ return A(a) || z(a) === l;
4007
+ };
4008
+ reactIs_production_min$4.isConcurrentMode = A;
4009
+ reactIs_production_min$4.isContextConsumer = function (a) {
4010
+ return z(a) === k;
4011
+ };
4012
+ reactIs_production_min$4.isContextProvider = function (a) {
4013
+ return z(a) === h;
4014
+ };
4015
+ reactIs_production_min$4.isElement = function (a) {
4016
+ return "object" === typeof a && null !== a && a.$$typeof === c;
4017
+ };
4018
+ reactIs_production_min$4.isForwardRef = function (a) {
4019
+ return z(a) === n;
4020
+ };
4021
+ reactIs_production_min$4.isFragment = function (a) {
4022
+ return z(a) === e;
4023
+ };
4024
+ reactIs_production_min$4.isLazy = function (a) {
4025
+ return z(a) === t;
4026
+ };
4027
+ reactIs_production_min$4.isMemo = function (a) {
4028
+ return z(a) === r;
4029
+ };
4030
+ reactIs_production_min$4.isPortal = function (a) {
4031
+ return z(a) === d;
4032
+ };
4033
+ reactIs_production_min$4.isProfiler = function (a) {
4034
+ return z(a) === g;
4035
+ };
4036
+ reactIs_production_min$4.isStrictMode = function (a) {
4037
+ return z(a) === f;
4038
+ };
4039
+ reactIs_production_min$4.isSuspense = function (a) {
4040
+ return z(a) === p;
4041
+ };
4042
+ reactIs_production_min$4.isValidElementType = function (a) {
4043
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
4044
+ };
4045
+ reactIs_production_min$4.typeOf = z;
4046
+ return reactIs_production_min$4;
4047
+ }
4048
+ var reactIs_development$4 = {};
4049
+
4050
+ /** @license React v16.13.1
4051
+ * react-is.development.js
4052
+ *
4053
+ * Copyright (c) Facebook, Inc. and its affiliates.
4054
+ *
4055
+ * This source code is licensed under the MIT license found in the
4056
+ * LICENSE file in the root directory of this source tree.
4057
+ */
4058
+
4059
+ var hasRequiredReactIs_development$4;
4060
+ function requireReactIs_development$4() {
4061
+ if (hasRequiredReactIs_development$4) return reactIs_development$4;
4062
+ hasRequiredReactIs_development$4 = 1;
4063
+ if (process.env.NODE_ENV !== "production") {
4064
+ (function () {
4065
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
4066
+ // nor polyfill, then a plain number is used for performance.
4067
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
4068
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
4069
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
4070
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
4071
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
4072
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
4073
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
4074
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
4075
+ // (unstable) APIs that have been removed. Can we remove the symbols?
4076
+
4077
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
4078
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
4079
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
4080
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
4081
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
4082
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
4083
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
4084
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
4085
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
4086
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
4087
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
4088
+ function isValidElementType(type) {
4089
+ return typeof type === 'string' || typeof type === 'function' ||
4090
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
4091
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
4092
+ }
4093
+ function typeOf(object) {
4094
+ if (typeof object === 'object' && object !== null) {
4095
+ var $$typeof = object.$$typeof;
4096
+ switch ($$typeof) {
4097
+ case REACT_ELEMENT_TYPE:
4098
+ var type = object.type;
4099
+ switch (type) {
4100
+ case REACT_ASYNC_MODE_TYPE:
4101
+ case REACT_CONCURRENT_MODE_TYPE:
4102
+ case REACT_FRAGMENT_TYPE:
4103
+ case REACT_PROFILER_TYPE:
4104
+ case REACT_STRICT_MODE_TYPE:
4105
+ case REACT_SUSPENSE_TYPE:
4106
+ return type;
4107
+ default:
4108
+ var $$typeofType = type && type.$$typeof;
4109
+ switch ($$typeofType) {
4110
+ case REACT_CONTEXT_TYPE:
4111
+ case REACT_FORWARD_REF_TYPE:
4112
+ case REACT_LAZY_TYPE:
4113
+ case REACT_MEMO_TYPE:
4114
+ case REACT_PROVIDER_TYPE:
4115
+ return $$typeofType;
4116
+ default:
4117
+ return $$typeof;
4118
+ }
4119
+ }
4120
+ case REACT_PORTAL_TYPE:
4121
+ return $$typeof;
4122
+ }
4123
+ }
4124
+ return undefined;
4125
+ } // AsyncMode is deprecated along with isAsyncMode
4126
+
4127
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
4128
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
4129
+ var ContextConsumer = REACT_CONTEXT_TYPE;
4130
+ var ContextProvider = REACT_PROVIDER_TYPE;
4131
+ var Element = REACT_ELEMENT_TYPE;
4132
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
4133
+ var Fragment = REACT_FRAGMENT_TYPE;
4134
+ var Lazy = REACT_LAZY_TYPE;
4135
+ var Memo = REACT_MEMO_TYPE;
4136
+ var Portal = REACT_PORTAL_TYPE;
4137
+ var Profiler = REACT_PROFILER_TYPE;
4138
+ var StrictMode = REACT_STRICT_MODE_TYPE;
4139
+ var Suspense = REACT_SUSPENSE_TYPE;
4140
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
4141
+
4142
+ function isAsyncMode(object) {
4143
+ {
4144
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
4145
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
4146
+
4147
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
4148
+ }
4149
+ }
4150
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
4151
+ }
4152
+ function isConcurrentMode(object) {
4153
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
4154
+ }
4155
+ function isContextConsumer(object) {
4156
+ return typeOf(object) === REACT_CONTEXT_TYPE;
4157
+ }
4158
+ function isContextProvider(object) {
4159
+ return typeOf(object) === REACT_PROVIDER_TYPE;
4160
+ }
4161
+ function isElement(object) {
4162
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
4163
+ }
4164
+ function isForwardRef(object) {
4165
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
4166
+ }
4167
+ function isFragment(object) {
4168
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
4169
+ }
4170
+ function isLazy(object) {
4171
+ return typeOf(object) === REACT_LAZY_TYPE;
4172
+ }
4173
+ function isMemo(object) {
4174
+ return typeOf(object) === REACT_MEMO_TYPE;
4175
+ }
4176
+ function isPortal(object) {
4177
+ return typeOf(object) === REACT_PORTAL_TYPE;
4178
+ }
4179
+ function isProfiler(object) {
4180
+ return typeOf(object) === REACT_PROFILER_TYPE;
4181
+ }
4182
+ function isStrictMode(object) {
4183
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
4184
+ }
4185
+ function isSuspense(object) {
4186
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
4187
+ }
4188
+ reactIs_development$4.AsyncMode = AsyncMode;
4189
+ reactIs_development$4.ConcurrentMode = ConcurrentMode;
4190
+ reactIs_development$4.ContextConsumer = ContextConsumer;
4191
+ reactIs_development$4.ContextProvider = ContextProvider;
4192
+ reactIs_development$4.Element = Element;
4193
+ reactIs_development$4.ForwardRef = ForwardRef;
4194
+ reactIs_development$4.Fragment = Fragment;
4195
+ reactIs_development$4.Lazy = Lazy;
4196
+ reactIs_development$4.Memo = Memo;
4197
+ reactIs_development$4.Portal = Portal;
4198
+ reactIs_development$4.Profiler = Profiler;
4199
+ reactIs_development$4.StrictMode = StrictMode;
4200
+ reactIs_development$4.Suspense = Suspense;
4201
+ reactIs_development$4.isAsyncMode = isAsyncMode;
4202
+ reactIs_development$4.isConcurrentMode = isConcurrentMode;
4203
+ reactIs_development$4.isContextConsumer = isContextConsumer;
4204
+ reactIs_development$4.isContextProvider = isContextProvider;
4205
+ reactIs_development$4.isElement = isElement;
4206
+ reactIs_development$4.isForwardRef = isForwardRef;
4207
+ reactIs_development$4.isFragment = isFragment;
4208
+ reactIs_development$4.isLazy = isLazy;
4209
+ reactIs_development$4.isMemo = isMemo;
4210
+ reactIs_development$4.isPortal = isPortal;
4211
+ reactIs_development$4.isProfiler = isProfiler;
4212
+ reactIs_development$4.isStrictMode = isStrictMode;
4213
+ reactIs_development$4.isSuspense = isSuspense;
4214
+ reactIs_development$4.isValidElementType = isValidElementType;
4215
+ reactIs_development$4.typeOf = typeOf;
4216
+ })();
4217
+ }
4218
+ return reactIs_development$4;
4219
+ }
4220
+ var hasRequiredReactIs$4;
4221
+ function requireReactIs$4() {
4222
+ if (hasRequiredReactIs$4) return reactIs$4.exports;
4223
+ hasRequiredReactIs$4 = 1;
4224
+ if (process.env.NODE_ENV === 'production') {
4225
+ reactIs$4.exports = requireReactIs_production_min$4();
4226
+ } else {
4227
+ reactIs$4.exports = requireReactIs_development$4();
4228
+ }
4229
+ return reactIs$4.exports;
4230
+ }
4231
+
4232
+ /*
4233
+ object-assign
4234
+ (c) Sindre Sorhus
4235
+ @license MIT
4236
+ */
4237
+
4238
+ var objectAssign$4;
4239
+ var hasRequiredObjectAssign$4;
4240
+ function requireObjectAssign$4() {
4241
+ if (hasRequiredObjectAssign$4) return objectAssign$4;
4242
+ hasRequiredObjectAssign$4 = 1;
4243
+ /* eslint-disable no-unused-vars */
4244
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4245
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
4246
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4247
+ function toObject(val) {
4248
+ if (val === null || val === undefined) {
4249
+ throw new TypeError('Object.assign cannot be called with null or undefined');
4250
+ }
4251
+ return Object(val);
4252
+ }
4253
+ function shouldUseNative() {
4254
+ try {
4255
+ if (!Object.assign) {
4256
+ return false;
4257
+ }
4258
+
4259
+ // Detect buggy property enumeration order in older V8 versions.
4260
+
4261
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4262
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4263
+ test1[5] = 'de';
4264
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
4265
+ return false;
4266
+ }
4267
+
4268
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4269
+ var test2 = {};
4270
+ for (var i = 0; i < 10; i++) {
4271
+ test2['_' + String.fromCharCode(i)] = i;
4272
+ }
4273
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4274
+ return test2[n];
4275
+ });
4276
+ if (order2.join('') !== '0123456789') {
4277
+ return false;
4278
+ }
4279
+
4280
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4281
+ var test3 = {};
4282
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4283
+ test3[letter] = letter;
4284
+ });
4285
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
4286
+ return false;
4287
+ }
4288
+ return true;
4289
+ } catch (err) {
4290
+ // We don't expect any of the above to throw, but better to be safe.
4291
+ return false;
4292
+ }
4293
+ }
4294
+ objectAssign$4 = shouldUseNative() ? Object.assign : function (target, source) {
4295
+ var from;
4296
+ var to = toObject(target);
4297
+ var symbols;
4298
+ for (var s = 1; s < arguments.length; s++) {
4299
+ from = Object(arguments[s]);
4300
+ for (var key in from) {
4301
+ if (hasOwnProperty.call(from, key)) {
4302
+ to[key] = from[key];
4303
+ }
4304
+ }
4305
+ if (getOwnPropertySymbols) {
4306
+ symbols = getOwnPropertySymbols(from);
4307
+ for (var i = 0; i < symbols.length; i++) {
4308
+ if (propIsEnumerable.call(from, symbols[i])) {
4309
+ to[symbols[i]] = from[symbols[i]];
4310
+ }
4311
+ }
4312
+ }
4313
+ }
4314
+ return to;
4315
+ };
4316
+ return objectAssign$4;
4317
+ }
4318
+
4319
+ /**
4320
+ * Copyright (c) 2013-present, Facebook, Inc.
4321
+ *
4322
+ * This source code is licensed under the MIT license found in the
4323
+ * LICENSE file in the root directory of this source tree.
4324
+ */
4325
+
4326
+ var ReactPropTypesSecret_1$4;
4327
+ var hasRequiredReactPropTypesSecret$4;
4328
+ function requireReactPropTypesSecret$4() {
4329
+ if (hasRequiredReactPropTypesSecret$4) return ReactPropTypesSecret_1$4;
4330
+ hasRequiredReactPropTypesSecret$4 = 1;
4331
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4332
+ ReactPropTypesSecret_1$4 = ReactPropTypesSecret;
4333
+ return ReactPropTypesSecret_1$4;
4334
+ }
4335
+ var has$4;
4336
+ var hasRequiredHas$4;
4337
+ function requireHas$4() {
4338
+ if (hasRequiredHas$4) return has$4;
4339
+ hasRequiredHas$4 = 1;
4340
+ has$4 = Function.call.bind(Object.prototype.hasOwnProperty);
4341
+ return has$4;
4342
+ }
4343
+
4344
+ /**
4345
+ * Copyright (c) 2013-present, Facebook, Inc.
4346
+ *
4347
+ * This source code is licensed under the MIT license found in the
4348
+ * LICENSE file in the root directory of this source tree.
4349
+ */
4350
+
4351
+ var checkPropTypes_1$4;
4352
+ var hasRequiredCheckPropTypes$4;
4353
+ function requireCheckPropTypes$4() {
4354
+ if (hasRequiredCheckPropTypes$4) return checkPropTypes_1$4;
4355
+ hasRequiredCheckPropTypes$4 = 1;
4356
+ var printWarning = function () {};
4357
+ if (process.env.NODE_ENV !== 'production') {
4358
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$4();
4359
+ var loggedTypeFailures = {};
4360
+ var has = /*@__PURE__*/requireHas$4();
4361
+ printWarning = function (text) {
4362
+ var message = 'Warning: ' + text;
4363
+ if (typeof console !== 'undefined') {
4364
+ console.error(message);
4365
+ }
4366
+ try {
4367
+ // --- Welcome to debugging React ---
4368
+ // This error was thrown as a convenience so that you can use this stack
4369
+ // to find the callsite that caused this warning to fire.
4370
+ throw new Error(message);
4371
+ } catch (x) {/**/}
4372
+ };
4373
+ }
4374
+
4375
+ /**
4376
+ * Assert that the values match with the type specs.
4377
+ * Error messages are memorized and will only be shown once.
4378
+ *
4379
+ * @param {object} typeSpecs Map of name to a ReactPropType
4380
+ * @param {object} values Runtime values that need to be type-checked
4381
+ * @param {string} location e.g. "prop", "context", "child context"
4382
+ * @param {string} componentName Name of the component for error messages.
4383
+ * @param {?Function} getStack Returns the component stack.
4384
+ * @private
4385
+ */
4386
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4387
+ if (process.env.NODE_ENV !== 'production') {
4388
+ for (var typeSpecName in typeSpecs) {
4389
+ if (has(typeSpecs, typeSpecName)) {
4390
+ var error;
4391
+ // Prop type validation may throw. In case they do, we don't want to
4392
+ // fail the render phase where it didn't fail before. So we log it.
4393
+ // After these have been cleaned up, we'll let them throw.
4394
+ try {
4395
+ // This is intentionally an invariant that gets caught. It's the same
4396
+ // behavior as without this statement except with a better message.
4397
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
4398
+ 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`.');
4399
+ err.name = 'Invariant Violation';
4400
+ throw err;
4401
+ }
4402
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4403
+ } catch (ex) {
4404
+ error = ex;
4405
+ }
4406
+ if (error && !(error instanceof Error)) {
4407
+ printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
4408
+ }
4409
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4410
+ // Only monitor this failure once because there tends to be a lot of the
4411
+ // same error.
4412
+ loggedTypeFailures[error.message] = true;
4413
+ var stack = getStack ? getStack() : '';
4414
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
4415
+ }
4416
+ }
4417
+ }
4418
+ }
4419
+ }
4420
+
4421
+ /**
4422
+ * Resets warning cache when testing.
4423
+ *
4424
+ * @private
4425
+ */
4426
+ checkPropTypes.resetWarningCache = function () {
4427
+ if (process.env.NODE_ENV !== 'production') {
4428
+ loggedTypeFailures = {};
4429
+ }
4430
+ };
4431
+ checkPropTypes_1$4 = checkPropTypes;
4432
+ return checkPropTypes_1$4;
4433
+ }
4434
+
4435
+ /**
4436
+ * Copyright (c) 2013-present, Facebook, Inc.
4437
+ *
4438
+ * This source code is licensed under the MIT license found in the
4439
+ * LICENSE file in the root directory of this source tree.
4440
+ */
4441
+
4442
+ var factoryWithTypeCheckers$4;
4443
+ var hasRequiredFactoryWithTypeCheckers$4;
4444
+ function requireFactoryWithTypeCheckers$4() {
4445
+ if (hasRequiredFactoryWithTypeCheckers$4) return factoryWithTypeCheckers$4;
4446
+ hasRequiredFactoryWithTypeCheckers$4 = 1;
4447
+ var ReactIs = requireReactIs$4();
4448
+ var assign = requireObjectAssign$4();
4449
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$4();
4450
+ var has = /*@__PURE__*/requireHas$4();
4451
+ var checkPropTypes = /*@__PURE__*/requireCheckPropTypes$4();
4452
+ var printWarning = function () {};
4453
+ if (process.env.NODE_ENV !== 'production') {
4454
+ printWarning = function (text) {
4455
+ var message = 'Warning: ' + text;
4456
+ if (typeof console !== 'undefined') {
4457
+ console.error(message);
4458
+ }
4459
+ try {
4460
+ // --- Welcome to debugging React ---
4461
+ // This error was thrown as a convenience so that you can use this stack
4462
+ // to find the callsite that caused this warning to fire.
4463
+ throw new Error(message);
4464
+ } catch (x) {}
4465
+ };
4466
+ }
4467
+ function emptyFunctionThatReturnsNull() {
4468
+ return null;
4469
+ }
4470
+ factoryWithTypeCheckers$4 = function (isValidElement, throwOnDirectAccess) {
4471
+ /* global Symbol */
4472
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4473
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4474
+
4475
+ /**
4476
+ * Returns the iterator method function contained on the iterable object.
4477
+ *
4478
+ * Be sure to invoke the function with the iterable as context:
4479
+ *
4480
+ * var iteratorFn = getIteratorFn(myIterable);
4481
+ * if (iteratorFn) {
4482
+ * var iterator = iteratorFn.call(myIterable);
4483
+ * ...
4484
+ * }
4485
+ *
4486
+ * @param {?object} maybeIterable
4487
+ * @return {?function}
4488
+ */
4489
+ function getIteratorFn(maybeIterable) {
4490
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4491
+ if (typeof iteratorFn === 'function') {
4492
+ return iteratorFn;
4493
+ }
4494
+ }
4495
+
4496
+ /**
4497
+ * Collection of methods that allow declaration and validation of props that are
4498
+ * supplied to React components. Example usage:
4499
+ *
4500
+ * var Props = require('ReactPropTypes');
4501
+ * var MyArticle = React.createClass({
4502
+ * propTypes: {
4503
+ * // An optional string prop named "description".
4504
+ * description: Props.string,
4505
+ *
4506
+ * // A required enum prop named "category".
4507
+ * category: Props.oneOf(['News','Photos']).isRequired,
4508
+ *
4509
+ * // A prop named "dialog" that requires an instance of Dialog.
4510
+ * dialog: Props.instanceOf(Dialog).isRequired
4511
+ * },
4512
+ * render: function() { ... }
4513
+ * });
4514
+ *
4515
+ * A more formal specification of how these methods are used:
4516
+ *
4517
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4518
+ * decl := ReactPropTypes.{type}(.isRequired)?
4519
+ *
4520
+ * Each and every declaration produces a function with the same signature. This
4521
+ * allows the creation of custom validation functions. For example:
4522
+ *
4523
+ * var MyLink = React.createClass({
4524
+ * propTypes: {
4525
+ * // An optional string or URI prop named "href".
4526
+ * href: function(props, propName, componentName) {
4527
+ * var propValue = props[propName];
4528
+ * if (propValue != null && typeof propValue !== 'string' &&
4529
+ * !(propValue instanceof URI)) {
4530
+ * return new Error(
4531
+ * 'Expected a string or an URI for ' + propName + ' in ' +
4532
+ * componentName
4533
+ * );
4534
+ * }
4535
+ * }
4536
+ * },
4537
+ * render: function() {...}
4538
+ * });
4539
+ *
4540
+ * @internal
4541
+ */
4542
+
4543
+ var ANONYMOUS = '<<anonymous>>';
4544
+
4545
+ // Important!
4546
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4547
+ var ReactPropTypes = {
4548
+ array: createPrimitiveTypeChecker('array'),
4549
+ bigint: createPrimitiveTypeChecker('bigint'),
4550
+ bool: createPrimitiveTypeChecker('boolean'),
4551
+ func: createPrimitiveTypeChecker('function'),
4552
+ number: createPrimitiveTypeChecker('number'),
4553
+ object: createPrimitiveTypeChecker('object'),
4554
+ string: createPrimitiveTypeChecker('string'),
4555
+ symbol: createPrimitiveTypeChecker('symbol'),
4556
+ any: createAnyTypeChecker(),
4557
+ arrayOf: createArrayOfTypeChecker,
4558
+ element: createElementTypeChecker(),
4559
+ elementType: createElementTypeTypeChecker(),
4560
+ instanceOf: createInstanceTypeChecker,
4561
+ node: createNodeChecker(),
4562
+ objectOf: createObjectOfTypeChecker,
4563
+ oneOf: createEnumTypeChecker,
4564
+ oneOfType: createUnionTypeChecker,
4565
+ shape: createShapeTypeChecker,
4566
+ exact: createStrictShapeTypeChecker
4567
+ };
4568
+
4569
+ /**
4570
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
4571
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
4572
+ */
4573
+ /*eslint-disable no-self-compare*/
4574
+ function is(x, y) {
4575
+ // SameValue algorithm
4576
+ if (x === y) {
4577
+ // Steps 1-5, 7-10
4578
+ // Steps 6.b-6.e: +0 != -0
4579
+ return x !== 0 || 1 / x === 1 / y;
4580
+ } else {
4581
+ // Step 6.a: NaN == NaN
4582
+ return x !== x && y !== y;
4583
+ }
4584
+ }
4585
+ /*eslint-enable no-self-compare*/
4586
+
4587
+ /**
4588
+ * We use an Error-like object for backward compatibility as people may call
4589
+ * PropTypes directly and inspect their output. However, we don't use real
4590
+ * Errors anymore. We don't inspect their stack anyway, and creating them
4591
+ * is prohibitively expensive if they are created too often, such as what
4592
+ * happens in oneOfType() for any type before the one that matched.
4593
+ */
4594
+ function PropTypeError(message, data) {
4595
+ this.message = message;
4596
+ this.data = data && typeof data === 'object' ? data : {};
4597
+ this.stack = '';
4598
+ }
4599
+ // Make `instanceof Error` still work for returned errors.
4600
+ PropTypeError.prototype = Error.prototype;
4601
+ function createChainableTypeChecker(validate) {
4602
+ if (process.env.NODE_ENV !== 'production') {
4603
+ var manualPropTypeCallCache = {};
4604
+ var manualPropTypeWarningCount = 0;
4605
+ }
4606
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
4607
+ componentName = componentName || ANONYMOUS;
4608
+ propFullName = propFullName || propName;
4609
+ if (secret !== ReactPropTypesSecret) {
4610
+ if (throwOnDirectAccess) {
4611
+ // New behavior only for users of `prop-types` package
4612
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
4613
+ err.name = 'Invariant Violation';
4614
+ throw err;
4615
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
4616
+ // Old behavior for people using React.PropTypes
4617
+ var cacheKey = componentName + ':' + propName;
4618
+ if (!manualPropTypeCallCache[cacheKey] &&
4619
+ // Avoid spamming the console because they are often not actionable except for lib authors
4620
+ manualPropTypeWarningCount < 3) {
4621
+ printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
4622
+ manualPropTypeCallCache[cacheKey] = true;
4623
+ manualPropTypeWarningCount++;
4624
+ }
4625
+ }
4626
+ }
4627
+ if (props[propName] == null) {
4628
+ if (isRequired) {
4629
+ if (props[propName] === null) {
4630
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
4631
+ }
4632
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
4633
+ }
4634
+ return null;
4635
+ } else {
4636
+ return validate(props, propName, componentName, location, propFullName);
4637
+ }
4638
+ }
4639
+ var chainedCheckType = checkType.bind(null, false);
4640
+ chainedCheckType.isRequired = checkType.bind(null, true);
4641
+ return chainedCheckType;
4642
+ }
4643
+ function createPrimitiveTypeChecker(expectedType) {
4644
+ function validate(props, propName, componentName, location, propFullName, secret) {
4645
+ var propValue = props[propName];
4646
+ var propType = getPropType(propValue);
4647
+ if (propType !== expectedType) {
4648
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
4649
+ // check, but we can offer a more precise error message here rather than
4650
+ // 'of type `object`'.
4651
+ var preciseType = getPreciseType(propValue);
4652
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
4653
+ expectedType: expectedType
4654
+ });
4655
+ }
4656
+ return null;
4657
+ }
4658
+ return createChainableTypeChecker(validate);
4659
+ }
4660
+ function createAnyTypeChecker() {
4661
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
4662
+ }
4663
+ function createArrayOfTypeChecker(typeChecker) {
4664
+ function validate(props, propName, componentName, location, propFullName) {
4665
+ if (typeof typeChecker !== 'function') {
4666
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
4667
+ }
4668
+ var propValue = props[propName];
4669
+ if (!Array.isArray(propValue)) {
4670
+ var propType = getPropType(propValue);
4671
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
4672
+ }
4673
+ for (var i = 0; i < propValue.length; i++) {
4674
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
4675
+ if (error instanceof Error) {
4676
+ return error;
4677
+ }
4678
+ }
4679
+ return null;
4680
+ }
4681
+ return createChainableTypeChecker(validate);
4682
+ }
4683
+ function createElementTypeChecker() {
4684
+ function validate(props, propName, componentName, location, propFullName) {
4685
+ var propValue = props[propName];
4686
+ if (!isValidElement(propValue)) {
4687
+ var propType = getPropType(propValue);
4688
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
4689
+ }
4690
+ return null;
4691
+ }
4692
+ return createChainableTypeChecker(validate);
4693
+ }
4694
+ function createElementTypeTypeChecker() {
4695
+ function validate(props, propName, componentName, location, propFullName) {
4696
+ var propValue = props[propName];
4697
+ if (!ReactIs.isValidElementType(propValue)) {
4698
+ var propType = getPropType(propValue);
4699
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
4700
+ }
4701
+ return null;
4702
+ }
4703
+ return createChainableTypeChecker(validate);
4704
+ }
4705
+ function createInstanceTypeChecker(expectedClass) {
4706
+ function validate(props, propName, componentName, location, propFullName) {
4707
+ if (!(props[propName] instanceof expectedClass)) {
4708
+ var expectedClassName = expectedClass.name || ANONYMOUS;
4709
+ var actualClassName = getClassName(props[propName]);
4710
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
4711
+ }
4712
+ return null;
4713
+ }
4714
+ return createChainableTypeChecker(validate);
4715
+ }
4716
+ function createEnumTypeChecker(expectedValues) {
4717
+ if (!Array.isArray(expectedValues)) {
4718
+ if (process.env.NODE_ENV !== 'production') {
4719
+ if (arguments.length > 1) {
4720
+ printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
4721
+ } else {
4722
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
4723
+ }
4724
+ }
4725
+ return emptyFunctionThatReturnsNull;
4726
+ }
4727
+ function validate(props, propName, componentName, location, propFullName) {
4728
+ var propValue = props[propName];
4729
+ for (var i = 0; i < expectedValues.length; i++) {
4730
+ if (is(propValue, expectedValues[i])) {
4731
+ return null;
4732
+ }
4733
+ }
4734
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
4735
+ var type = getPreciseType(value);
4736
+ if (type === 'symbol') {
4737
+ return String(value);
4738
+ }
4739
+ return value;
4740
+ });
4741
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
4742
+ }
4743
+ return createChainableTypeChecker(validate);
4744
+ }
4745
+ function createObjectOfTypeChecker(typeChecker) {
4746
+ function validate(props, propName, componentName, location, propFullName) {
4747
+ if (typeof typeChecker !== 'function') {
4748
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
4749
+ }
4750
+ var propValue = props[propName];
4751
+ var propType = getPropType(propValue);
4752
+ if (propType !== 'object') {
4753
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
4754
+ }
4755
+ for (var key in propValue) {
4756
+ if (has(propValue, key)) {
4757
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4758
+ if (error instanceof Error) {
4759
+ return error;
4760
+ }
4761
+ }
4762
+ }
4763
+ return null;
4764
+ }
4765
+ return createChainableTypeChecker(validate);
4766
+ }
4767
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
4768
+ if (!Array.isArray(arrayOfTypeCheckers)) {
4769
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
4770
+ return emptyFunctionThatReturnsNull;
4771
+ }
4772
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
4773
+ var checker = arrayOfTypeCheckers[i];
4774
+ if (typeof checker !== 'function') {
4775
+ printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
4776
+ return emptyFunctionThatReturnsNull;
4777
+ }
4778
+ }
4779
+ function validate(props, propName, componentName, location, propFullName) {
4780
+ var expectedTypes = [];
4781
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
4782
+ var checker = arrayOfTypeCheckers[i];
4783
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
4784
+ if (checkerResult == null) {
4785
+ return null;
4786
+ }
4787
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
4788
+ expectedTypes.push(checkerResult.data.expectedType);
4789
+ }
4790
+ }
4791
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
4792
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
4793
+ }
4794
+ return createChainableTypeChecker(validate);
4795
+ }
4796
+ function createNodeChecker() {
4797
+ function validate(props, propName, componentName, location, propFullName) {
4798
+ if (!isNode(props[propName])) {
4799
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
4800
+ }
4801
+ return null;
4802
+ }
4803
+ return createChainableTypeChecker(validate);
4804
+ }
4805
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
4806
+ return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
4807
+ }
4808
+ function createShapeTypeChecker(shapeTypes) {
4809
+ function validate(props, propName, componentName, location, propFullName) {
4810
+ var propValue = props[propName];
4811
+ var propType = getPropType(propValue);
4812
+ if (propType !== 'object') {
4813
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
4814
+ }
4815
+ for (var key in shapeTypes) {
4816
+ var checker = shapeTypes[key];
4817
+ if (typeof checker !== 'function') {
4818
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
4819
+ }
4820
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4821
+ if (error) {
4822
+ return error;
4823
+ }
4824
+ }
4825
+ return null;
4826
+ }
4827
+ return createChainableTypeChecker(validate);
4828
+ }
4829
+ function createStrictShapeTypeChecker(shapeTypes) {
4830
+ function validate(props, propName, componentName, location, propFullName) {
4831
+ var propValue = props[propName];
4832
+ var propType = getPropType(propValue);
4833
+ if (propType !== 'object') {
4834
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
4835
+ }
4836
+ // We need to check all keys in case some are required but missing from props.
4837
+ var allKeys = assign({}, props[propName], shapeTypes);
4838
+ for (var key in allKeys) {
4839
+ var checker = shapeTypes[key];
4840
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
4841
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
4842
+ }
4843
+ if (!checker) {
4844
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
4845
+ }
4846
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4847
+ if (error) {
4848
+ return error;
4849
+ }
4850
+ }
4851
+ return null;
4852
+ }
4853
+ return createChainableTypeChecker(validate);
4854
+ }
4855
+ function isNode(propValue) {
4856
+ switch (typeof propValue) {
4857
+ case 'number':
4858
+ case 'string':
4859
+ case 'undefined':
4860
+ return true;
4861
+ case 'boolean':
4862
+ return !propValue;
4863
+ case 'object':
4864
+ if (Array.isArray(propValue)) {
4865
+ return propValue.every(isNode);
4866
+ }
4867
+ if (propValue === null || isValidElement(propValue)) {
4868
+ return true;
4869
+ }
4870
+ var iteratorFn = getIteratorFn(propValue);
4871
+ if (iteratorFn) {
4872
+ var iterator = iteratorFn.call(propValue);
4873
+ var step;
4874
+ if (iteratorFn !== propValue.entries) {
4875
+ while (!(step = iterator.next()).done) {
4876
+ if (!isNode(step.value)) {
4877
+ return false;
4878
+ }
4879
+ }
4880
+ } else {
4881
+ // Iterator will provide entry [k,v] tuples rather than values.
4882
+ while (!(step = iterator.next()).done) {
4883
+ var entry = step.value;
4884
+ if (entry) {
4885
+ if (!isNode(entry[1])) {
4886
+ return false;
4887
+ }
4888
+ }
4889
+ }
4890
+ }
4891
+ } else {
4892
+ return false;
4893
+ }
4894
+ return true;
4895
+ default:
4896
+ return false;
4897
+ }
4898
+ }
4899
+ function isSymbol(propType, propValue) {
4900
+ // Native Symbol.
4901
+ if (propType === 'symbol') {
4902
+ return true;
4903
+ }
4904
+
4905
+ // falsy value can't be a Symbol
4906
+ if (!propValue) {
4907
+ return false;
4908
+ }
4909
+
4910
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
4911
+ if (propValue['@@toStringTag'] === 'Symbol') {
4912
+ return true;
4913
+ }
4914
+
4915
+ // Fallback for non-spec compliant Symbols which are polyfilled.
4916
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
4917
+ return true;
4918
+ }
4919
+ return false;
4920
+ }
4921
+
4922
+ // Equivalent of `typeof` but with special handling for array and regexp.
4923
+ function getPropType(propValue) {
4924
+ var propType = typeof propValue;
4925
+ if (Array.isArray(propValue)) {
4926
+ return 'array';
4927
+ }
4928
+ if (propValue instanceof RegExp) {
4929
+ // Old webkits (at least until Android 4.0) return 'function' rather than
4930
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
4931
+ // passes PropTypes.object.
4932
+ return 'object';
4933
+ }
4934
+ if (isSymbol(propType, propValue)) {
4935
+ return 'symbol';
4936
+ }
4937
+ return propType;
4938
+ }
4939
+
4940
+ // This handles more types than `getPropType`. Only used for error messages.
4941
+ // See `createPrimitiveTypeChecker`.
4942
+ function getPreciseType(propValue) {
4943
+ if (typeof propValue === 'undefined' || propValue === null) {
4944
+ return '' + propValue;
4945
+ }
4946
+ var propType = getPropType(propValue);
4947
+ if (propType === 'object') {
4948
+ if (propValue instanceof Date) {
4949
+ return 'date';
4950
+ } else if (propValue instanceof RegExp) {
4951
+ return 'regexp';
4952
+ }
4953
+ }
4954
+ return propType;
4955
+ }
4956
+
4957
+ // Returns a string that is postfixed to a warning about an invalid type.
4958
+ // For example, "undefined" or "of type array"
4959
+ function getPostfixForTypeWarning(value) {
4960
+ var type = getPreciseType(value);
4961
+ switch (type) {
4962
+ case 'array':
4963
+ case 'object':
4964
+ return 'an ' + type;
4965
+ case 'boolean':
4966
+ case 'date':
4967
+ case 'regexp':
4968
+ return 'a ' + type;
4969
+ default:
4970
+ return type;
4971
+ }
4972
+ }
4973
+
4974
+ // Returns class name of the object, if any.
4975
+ function getClassName(propValue) {
4976
+ if (!propValue.constructor || !propValue.constructor.name) {
4977
+ return ANONYMOUS;
4978
+ }
4979
+ return propValue.constructor.name;
4980
+ }
4981
+ ReactPropTypes.checkPropTypes = checkPropTypes;
4982
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
4983
+ ReactPropTypes.PropTypes = ReactPropTypes;
4984
+ return ReactPropTypes;
4985
+ };
4986
+ return factoryWithTypeCheckers$4;
4987
+ }
4988
+
4989
+ /**
4990
+ * Copyright (c) 2013-present, Facebook, Inc.
4991
+ *
4992
+ * This source code is licensed under the MIT license found in the
4993
+ * LICENSE file in the root directory of this source tree.
4994
+ */
4995
+
4996
+ var factoryWithThrowingShims$4;
4997
+ var hasRequiredFactoryWithThrowingShims$4;
4998
+ function requireFactoryWithThrowingShims$4() {
4999
+ if (hasRequiredFactoryWithThrowingShims$4) return factoryWithThrowingShims$4;
5000
+ hasRequiredFactoryWithThrowingShims$4 = 1;
5001
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$4();
5002
+ function emptyFunction() {}
5003
+ function emptyFunctionWithReset() {}
5004
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
5005
+ factoryWithThrowingShims$4 = function () {
5006
+ function shim(props, propName, componentName, location, propFullName, secret) {
5007
+ if (secret === ReactPropTypesSecret) {
5008
+ // It is still safe when called from React.
5009
+ return;
5010
+ }
5011
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
5012
+ err.name = 'Invariant Violation';
5013
+ throw err;
5014
+ }
5015
+ shim.isRequired = shim;
5016
+ function getShim() {
5017
+ return shim;
5018
+ } // Important!
5019
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5020
+ var ReactPropTypes = {
5021
+ array: shim,
5022
+ bigint: shim,
5023
+ bool: shim,
5024
+ func: shim,
5025
+ number: shim,
5026
+ object: shim,
5027
+ string: shim,
5028
+ symbol: shim,
5029
+ any: shim,
5030
+ arrayOf: getShim,
5031
+ element: shim,
5032
+ elementType: shim,
5033
+ instanceOf: getShim,
5034
+ node: shim,
5035
+ objectOf: getShim,
5036
+ oneOf: getShim,
5037
+ oneOfType: getShim,
5038
+ shape: getShim,
5039
+ exact: getShim,
5040
+ checkPropTypes: emptyFunctionWithReset,
5041
+ resetWarningCache: emptyFunction
5042
+ };
5043
+ ReactPropTypes.PropTypes = ReactPropTypes;
5044
+ return ReactPropTypes;
5045
+ };
5046
+ return factoryWithThrowingShims$4;
5047
+ }
5048
+
5049
+ /**
5050
+ * Copyright (c) 2013-present, Facebook, Inc.
5051
+ *
5052
+ * This source code is licensed under the MIT license found in the
5053
+ * LICENSE file in the root directory of this source tree.
5054
+ */
5055
+
5056
+ var hasRequiredPropTypes$4;
5057
+ function requirePropTypes$4() {
5058
+ if (hasRequiredPropTypes$4) return propTypes$4.exports;
5059
+ hasRequiredPropTypes$4 = 1;
5060
+ if (process.env.NODE_ENV !== 'production') {
5061
+ var ReactIs = requireReactIs$4();
5062
+
5063
+ // By explicitly using `prop-types` you are opting into new development behavior.
5064
+ // http://fb.me/prop-types-in-prod
5065
+ var throwOnDirectAccess = true;
5066
+ propTypes$4.exports = /*@__PURE__*/requireFactoryWithTypeCheckers$4()(ReactIs.isElement, throwOnDirectAccess);
5067
+ } else {
5068
+ // By explicitly using `prop-types` you are opting into new production behavior.
5069
+ // http://fb.me/prop-types-in-prod
5070
+ propTypes$4.exports = /*@__PURE__*/requireFactoryWithThrowingShims$4()();
5071
+ }
5072
+ return propTypes$4.exports;
5073
+ }
5074
+ var propTypesExports$4 = /*@__PURE__*/requirePropTypes$4();
5075
+ var PropTypes$4 = /*@__PURE__*/getDefaultExportFromCjs$4(propTypesExports$4);
5076
+ ({
5077
+ onPowerOff: PropTypes$4.func,
5078
+ onRestart: PropTypes$4.func,
5079
+ powerOffLabel: PropTypes$4.string,
5080
+ restartLabel: PropTypes$4.string,
5081
+ iconClassName: PropTypes$4.string,
5082
+ confirmTitle: PropTypes$4.string,
5083
+ cancelText: PropTypes$4.string,
5084
+ okText: PropTypes$4.string,
5085
+ run: PropTypes$4.func
5086
+ });
5087
+ ({
5088
+ logoUrl: PropTypes$4.string,
5089
+ logoWidth: PropTypes$4.number,
5090
+ logoAlt: PropTypes$4.string,
5091
+ onClick: PropTypes$4.func
5092
+ });
5093
+
5094
+ // PropTypes 类型检查
5095
+ ({
5096
+ menuElement: PropTypes$4.node,
5097
+ productInfo: PropTypes$4.shape({
5098
+ productName: PropTypes$4.string,
5099
+ version: PropTypes$4.string
5100
+ }),
5101
+ showLogo: PropTypes$4.bool,
5102
+ showProductInfo: PropTypes$4.bool,
5103
+ showHardwareUsage: PropTypes$4.bool,
5104
+ showSystemOperations: PropTypes$4.bool,
5105
+ onPowerOff: PropTypes$4.func,
5106
+ onRestart: PropTypes$4.func,
5107
+ onRun: PropTypes$4.func,
5108
+ hardwareMonitorUrl: PropTypes$4.string,
5109
+ getSocketUrl: PropTypes$4.func,
5110
+ logoProps: PropTypes$4.object,
5111
+ className: PropTypes$4.string,
5112
+ style: PropTypes$4.object
5113
+ });
5114
+ function getDefaultExportFromCjs$3(x) {
5115
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5116
+ }
5117
+ var propTypes$3 = {
5118
+ exports: {}
5119
+ };
5120
+ var reactIs$3 = {
5121
+ exports: {}
5122
+ };
5123
+ var reactIs_production_min$3 = {};
5124
+
5125
+ /** @license React v16.13.1
5126
+ * react-is.production.min.js
5127
+ *
5128
+ * Copyright (c) Facebook, Inc. and its affiliates.
5129
+ *
5130
+ * This source code is licensed under the MIT license found in the
5131
+ * LICENSE file in the root directory of this source tree.
5132
+ */
5133
+
5134
+ var hasRequiredReactIs_production_min$3;
5135
+ function requireReactIs_production_min$3() {
5136
+ if (hasRequiredReactIs_production_min$3) return reactIs_production_min$3;
5137
+ hasRequiredReactIs_production_min$3 = 1;
5138
+ var b = "function" === typeof Symbol && Symbol.for,
5139
+ c = b ? Symbol.for("react.element") : 60103,
5140
+ d = b ? Symbol.for("react.portal") : 60106,
5141
+ e = b ? Symbol.for("react.fragment") : 60107,
5142
+ f = b ? Symbol.for("react.strict_mode") : 60108,
5143
+ g = b ? Symbol.for("react.profiler") : 60114,
5144
+ h = b ? Symbol.for("react.provider") : 60109,
5145
+ k = b ? Symbol.for("react.context") : 60110,
5146
+ l = b ? Symbol.for("react.async_mode") : 60111,
5147
+ m = b ? Symbol.for("react.concurrent_mode") : 60111,
5148
+ n = b ? Symbol.for("react.forward_ref") : 60112,
5149
+ p = b ? Symbol.for("react.suspense") : 60113,
5150
+ q = b ? Symbol.for("react.suspense_list") : 60120,
5151
+ r = b ? Symbol.for("react.memo") : 60115,
5152
+ t = b ? Symbol.for("react.lazy") : 60116,
5153
+ v = b ? Symbol.for("react.block") : 60121,
5154
+ w = b ? Symbol.for("react.fundamental") : 60117,
5155
+ x = b ? Symbol.for("react.responder") : 60118,
5156
+ y = b ? Symbol.for("react.scope") : 60119;
5157
+ function z(a) {
5158
+ if ("object" === typeof a && null !== a) {
5159
+ var u = a.$$typeof;
5160
+ switch (u) {
5161
+ case c:
5162
+ switch (a = a.type, a) {
5163
+ case l:
5164
+ case m:
5165
+ case e:
5166
+ case g:
5167
+ case f:
5168
+ case p:
5169
+ return a;
5170
+ default:
5171
+ switch (a = a && a.$$typeof, a) {
5172
+ case k:
5173
+ case n:
5174
+ case t:
5175
+ case r:
5176
+ case h:
5177
+ return a;
5178
+ default:
5179
+ return u;
5180
+ }
5181
+ }
5182
+ case d:
5183
+ return u;
5184
+ }
5185
+ }
5186
+ }
5187
+ function A(a) {
5188
+ return z(a) === m;
5189
+ }
5190
+ reactIs_production_min$3.AsyncMode = l;
5191
+ reactIs_production_min$3.ConcurrentMode = m;
5192
+ reactIs_production_min$3.ContextConsumer = k;
5193
+ reactIs_production_min$3.ContextProvider = h;
5194
+ reactIs_production_min$3.Element = c;
5195
+ reactIs_production_min$3.ForwardRef = n;
5196
+ reactIs_production_min$3.Fragment = e;
5197
+ reactIs_production_min$3.Lazy = t;
5198
+ reactIs_production_min$3.Memo = r;
5199
+ reactIs_production_min$3.Portal = d;
5200
+ reactIs_production_min$3.Profiler = g;
5201
+ reactIs_production_min$3.StrictMode = f;
5202
+ reactIs_production_min$3.Suspense = p;
5203
+ reactIs_production_min$3.isAsyncMode = function (a) {
5204
+ return A(a) || z(a) === l;
5205
+ };
5206
+ reactIs_production_min$3.isConcurrentMode = A;
5207
+ reactIs_production_min$3.isContextConsumer = function (a) {
5208
+ return z(a) === k;
5209
+ };
5210
+ reactIs_production_min$3.isContextProvider = function (a) {
5211
+ return z(a) === h;
5212
+ };
5213
+ reactIs_production_min$3.isElement = function (a) {
5214
+ return "object" === typeof a && null !== a && a.$$typeof === c;
5215
+ };
5216
+ reactIs_production_min$3.isForwardRef = function (a) {
5217
+ return z(a) === n;
5218
+ };
5219
+ reactIs_production_min$3.isFragment = function (a) {
5220
+ return z(a) === e;
5221
+ };
5222
+ reactIs_production_min$3.isLazy = function (a) {
5223
+ return z(a) === t;
5224
+ };
5225
+ reactIs_production_min$3.isMemo = function (a) {
5226
+ return z(a) === r;
5227
+ };
5228
+ reactIs_production_min$3.isPortal = function (a) {
5229
+ return z(a) === d;
5230
+ };
5231
+ reactIs_production_min$3.isProfiler = function (a) {
5232
+ return z(a) === g;
5233
+ };
5234
+ reactIs_production_min$3.isStrictMode = function (a) {
5235
+ return z(a) === f;
5236
+ };
5237
+ reactIs_production_min$3.isSuspense = function (a) {
5238
+ return z(a) === p;
5239
+ };
5240
+ reactIs_production_min$3.isValidElementType = function (a) {
5241
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
5242
+ };
5243
+ reactIs_production_min$3.typeOf = z;
5244
+ return reactIs_production_min$3;
5245
+ }
5246
+ var reactIs_development$3 = {};
5247
+
5248
+ /** @license React v16.13.1
5249
+ * react-is.development.js
5250
+ *
5251
+ * Copyright (c) Facebook, Inc. and its affiliates.
5252
+ *
5253
+ * This source code is licensed under the MIT license found in the
5254
+ * LICENSE file in the root directory of this source tree.
5255
+ */
5256
+
5257
+ var hasRequiredReactIs_development$3;
5258
+ function requireReactIs_development$3() {
5259
+ if (hasRequiredReactIs_development$3) return reactIs_development$3;
5260
+ hasRequiredReactIs_development$3 = 1;
5261
+ if (process.env.NODE_ENV !== "production") {
5262
+ (function () {
5263
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
5264
+ // nor polyfill, then a plain number is used for performance.
5265
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
5266
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
5267
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
5268
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
5269
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
5270
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
5271
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
5272
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
5273
+ // (unstable) APIs that have been removed. Can we remove the symbols?
5274
+
5275
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
5276
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
5277
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
5278
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
5279
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
5280
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
5281
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
5282
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
5283
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
5284
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
5285
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
5286
+ function isValidElementType(type) {
5287
+ return typeof type === 'string' || typeof type === 'function' ||
5288
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
5289
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
5290
+ }
5291
+ function typeOf(object) {
5292
+ if (typeof object === 'object' && object !== null) {
5293
+ var $$typeof = object.$$typeof;
5294
+ switch ($$typeof) {
5295
+ case REACT_ELEMENT_TYPE:
5296
+ var type = object.type;
5297
+ switch (type) {
5298
+ case REACT_ASYNC_MODE_TYPE:
5299
+ case REACT_CONCURRENT_MODE_TYPE:
5300
+ case REACT_FRAGMENT_TYPE:
5301
+ case REACT_PROFILER_TYPE:
5302
+ case REACT_STRICT_MODE_TYPE:
5303
+ case REACT_SUSPENSE_TYPE:
5304
+ return type;
5305
+ default:
5306
+ var $$typeofType = type && type.$$typeof;
5307
+ switch ($$typeofType) {
5308
+ case REACT_CONTEXT_TYPE:
5309
+ case REACT_FORWARD_REF_TYPE:
5310
+ case REACT_LAZY_TYPE:
5311
+ case REACT_MEMO_TYPE:
5312
+ case REACT_PROVIDER_TYPE:
5313
+ return $$typeofType;
5314
+ default:
5315
+ return $$typeof;
5316
+ }
5317
+ }
5318
+ case REACT_PORTAL_TYPE:
5319
+ return $$typeof;
5320
+ }
5321
+ }
5322
+ return undefined;
5323
+ } // AsyncMode is deprecated along with isAsyncMode
5324
+
5325
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
5326
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
5327
+ var ContextConsumer = REACT_CONTEXT_TYPE;
5328
+ var ContextProvider = REACT_PROVIDER_TYPE;
5329
+ var Element = REACT_ELEMENT_TYPE;
5330
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
5331
+ var Fragment = REACT_FRAGMENT_TYPE;
5332
+ var Lazy = REACT_LAZY_TYPE;
5333
+ var Memo = REACT_MEMO_TYPE;
5334
+ var Portal = REACT_PORTAL_TYPE;
5335
+ var Profiler = REACT_PROFILER_TYPE;
5336
+ var StrictMode = REACT_STRICT_MODE_TYPE;
5337
+ var Suspense = REACT_SUSPENSE_TYPE;
5338
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
5339
+
5340
+ function isAsyncMode(object) {
5341
+ {
5342
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
5343
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
5344
+
5345
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
5346
+ }
5347
+ }
5348
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
5349
+ }
5350
+ function isConcurrentMode(object) {
5351
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
5352
+ }
5353
+ function isContextConsumer(object) {
5354
+ return typeOf(object) === REACT_CONTEXT_TYPE;
5355
+ }
5356
+ function isContextProvider(object) {
5357
+ return typeOf(object) === REACT_PROVIDER_TYPE;
5358
+ }
5359
+ function isElement(object) {
5360
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
5361
+ }
5362
+ function isForwardRef(object) {
5363
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
5364
+ }
5365
+ function isFragment(object) {
5366
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
5367
+ }
5368
+ function isLazy(object) {
5369
+ return typeOf(object) === REACT_LAZY_TYPE;
5370
+ }
5371
+ function isMemo(object) {
5372
+ return typeOf(object) === REACT_MEMO_TYPE;
5373
+ }
5374
+ function isPortal(object) {
5375
+ return typeOf(object) === REACT_PORTAL_TYPE;
5376
+ }
5377
+ function isProfiler(object) {
5378
+ return typeOf(object) === REACT_PROFILER_TYPE;
5379
+ }
5380
+ function isStrictMode(object) {
5381
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
5382
+ }
5383
+ function isSuspense(object) {
5384
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
5385
+ }
5386
+ reactIs_development$3.AsyncMode = AsyncMode;
5387
+ reactIs_development$3.ConcurrentMode = ConcurrentMode;
5388
+ reactIs_development$3.ContextConsumer = ContextConsumer;
5389
+ reactIs_development$3.ContextProvider = ContextProvider;
5390
+ reactIs_development$3.Element = Element;
5391
+ reactIs_development$3.ForwardRef = ForwardRef;
5392
+ reactIs_development$3.Fragment = Fragment;
5393
+ reactIs_development$3.Lazy = Lazy;
5394
+ reactIs_development$3.Memo = Memo;
5395
+ reactIs_development$3.Portal = Portal;
5396
+ reactIs_development$3.Profiler = Profiler;
5397
+ reactIs_development$3.StrictMode = StrictMode;
5398
+ reactIs_development$3.Suspense = Suspense;
5399
+ reactIs_development$3.isAsyncMode = isAsyncMode;
5400
+ reactIs_development$3.isConcurrentMode = isConcurrentMode;
5401
+ reactIs_development$3.isContextConsumer = isContextConsumer;
5402
+ reactIs_development$3.isContextProvider = isContextProvider;
5403
+ reactIs_development$3.isElement = isElement;
5404
+ reactIs_development$3.isForwardRef = isForwardRef;
5405
+ reactIs_development$3.isFragment = isFragment;
5406
+ reactIs_development$3.isLazy = isLazy;
5407
+ reactIs_development$3.isMemo = isMemo;
5408
+ reactIs_development$3.isPortal = isPortal;
5409
+ reactIs_development$3.isProfiler = isProfiler;
5410
+ reactIs_development$3.isStrictMode = isStrictMode;
5411
+ reactIs_development$3.isSuspense = isSuspense;
5412
+ reactIs_development$3.isValidElementType = isValidElementType;
5413
+ reactIs_development$3.typeOf = typeOf;
5414
+ })();
5415
+ }
5416
+ return reactIs_development$3;
5417
+ }
5418
+ var hasRequiredReactIs$3;
5419
+ function requireReactIs$3() {
5420
+ if (hasRequiredReactIs$3) return reactIs$3.exports;
5421
+ hasRequiredReactIs$3 = 1;
5422
+ if (process.env.NODE_ENV === 'production') {
5423
+ reactIs$3.exports = requireReactIs_production_min$3();
5424
+ } else {
5425
+ reactIs$3.exports = requireReactIs_development$3();
5426
+ }
5427
+ return reactIs$3.exports;
5428
+ }
5429
+
5430
+ /*
5431
+ object-assign
5432
+ (c) Sindre Sorhus
5433
+ @license MIT
5434
+ */
5435
+
5436
+ var objectAssign$3;
5437
+ var hasRequiredObjectAssign$3;
5438
+ function requireObjectAssign$3() {
5439
+ if (hasRequiredObjectAssign$3) return objectAssign$3;
5440
+ hasRequiredObjectAssign$3 = 1;
5441
+ /* eslint-disable no-unused-vars */
5442
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
5443
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
5444
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
5445
+ function toObject(val) {
5446
+ if (val === null || val === undefined) {
5447
+ throw new TypeError('Object.assign cannot be called with null or undefined');
5448
+ }
5449
+ return Object(val);
5450
+ }
5451
+ function shouldUseNative() {
5452
+ try {
5453
+ if (!Object.assign) {
5454
+ return false;
5455
+ }
5456
+
5457
+ // Detect buggy property enumeration order in older V8 versions.
5458
+
5459
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
5460
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
5461
+ test1[5] = 'de';
5462
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
5463
+ return false;
5464
+ }
5465
+
5466
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5467
+ var test2 = {};
5468
+ for (var i = 0; i < 10; i++) {
5469
+ test2['_' + String.fromCharCode(i)] = i;
5470
+ }
5471
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
5472
+ return test2[n];
5473
+ });
5474
+ if (order2.join('') !== '0123456789') {
5475
+ return false;
5476
+ }
5477
+
5478
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5479
+ var test3 = {};
5480
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
5481
+ test3[letter] = letter;
5482
+ });
5483
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
5484
+ return false;
5485
+ }
5486
+ return true;
5487
+ } catch (err) {
5488
+ // We don't expect any of the above to throw, but better to be safe.
5489
+ return false;
5490
+ }
5491
+ }
5492
+ objectAssign$3 = shouldUseNative() ? Object.assign : function (target, source) {
5493
+ var from;
5494
+ var to = toObject(target);
5495
+ var symbols;
5496
+ for (var s = 1; s < arguments.length; s++) {
5497
+ from = Object(arguments[s]);
5498
+ for (var key in from) {
5499
+ if (hasOwnProperty.call(from, key)) {
5500
+ to[key] = from[key];
5501
+ }
5502
+ }
5503
+ if (getOwnPropertySymbols) {
5504
+ symbols = getOwnPropertySymbols(from);
5505
+ for (var i = 0; i < symbols.length; i++) {
5506
+ if (propIsEnumerable.call(from, symbols[i])) {
5507
+ to[symbols[i]] = from[symbols[i]];
5508
+ }
5509
+ }
5510
+ }
5511
+ }
5512
+ return to;
5513
+ };
5514
+ return objectAssign$3;
5515
+ }
5516
+
5517
+ /**
5518
+ * Copyright (c) 2013-present, Facebook, Inc.
5519
+ *
5520
+ * This source code is licensed under the MIT license found in the
5521
+ * LICENSE file in the root directory of this source tree.
5522
+ */
5523
+
5524
+ var ReactPropTypesSecret_1$3;
5525
+ var hasRequiredReactPropTypesSecret$3;
5526
+ function requireReactPropTypesSecret$3() {
5527
+ if (hasRequiredReactPropTypesSecret$3) return ReactPropTypesSecret_1$3;
5528
+ hasRequiredReactPropTypesSecret$3 = 1;
5529
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5530
+ ReactPropTypesSecret_1$3 = ReactPropTypesSecret;
5531
+ return ReactPropTypesSecret_1$3;
5532
+ }
5533
+ var has$3;
5534
+ var hasRequiredHas$3;
5535
+ function requireHas$3() {
5536
+ if (hasRequiredHas$3) return has$3;
5537
+ hasRequiredHas$3 = 1;
5538
+ has$3 = Function.call.bind(Object.prototype.hasOwnProperty);
5539
+ return has$3;
5540
+ }
5541
+
5542
+ /**
5543
+ * Copyright (c) 2013-present, Facebook, Inc.
5544
+ *
5545
+ * This source code is licensed under the MIT license found in the
5546
+ * LICENSE file in the root directory of this source tree.
5547
+ */
5548
+
5549
+ var checkPropTypes_1$3;
5550
+ var hasRequiredCheckPropTypes$3;
5551
+ function requireCheckPropTypes$3() {
5552
+ if (hasRequiredCheckPropTypes$3) return checkPropTypes_1$3;
5553
+ hasRequiredCheckPropTypes$3 = 1;
5554
+ var printWarning = function () {};
5555
+ if (process.env.NODE_ENV !== 'production') {
5556
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$3();
5557
+ var loggedTypeFailures = {};
5558
+ var has = /*@__PURE__*/requireHas$3();
5559
+ printWarning = function (text) {
5560
+ var message = 'Warning: ' + text;
5561
+ if (typeof console !== 'undefined') {
5562
+ console.error(message);
5563
+ }
5564
+ try {
5565
+ // --- Welcome to debugging React ---
5566
+ // This error was thrown as a convenience so that you can use this stack
5567
+ // to find the callsite that caused this warning to fire.
5568
+ throw new Error(message);
5569
+ } catch (x) {/**/}
5570
+ };
5571
+ }
5572
+
5573
+ /**
5574
+ * Assert that the values match with the type specs.
5575
+ * Error messages are memorized and will only be shown once.
5576
+ *
5577
+ * @param {object} typeSpecs Map of name to a ReactPropType
5578
+ * @param {object} values Runtime values that need to be type-checked
5579
+ * @param {string} location e.g. "prop", "context", "child context"
5580
+ * @param {string} componentName Name of the component for error messages.
5581
+ * @param {?Function} getStack Returns the component stack.
5582
+ * @private
5583
+ */
5584
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
5585
+ if (process.env.NODE_ENV !== 'production') {
5586
+ for (var typeSpecName in typeSpecs) {
5587
+ if (has(typeSpecs, typeSpecName)) {
5588
+ var error;
5589
+ // Prop type validation may throw. In case they do, we don't want to
5590
+ // fail the render phase where it didn't fail before. So we log it.
5591
+ // After these have been cleaned up, we'll let them throw.
5592
+ try {
5593
+ // This is intentionally an invariant that gets caught. It's the same
5594
+ // behavior as without this statement except with a better message.
5595
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
5596
+ 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`.');
5597
+ err.name = 'Invariant Violation';
5598
+ throw err;
5599
+ }
5600
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
5601
+ } catch (ex) {
5602
+ error = ex;
5603
+ }
5604
+ if (error && !(error instanceof Error)) {
5605
+ printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
5606
+ }
5607
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
5608
+ // Only monitor this failure once because there tends to be a lot of the
5609
+ // same error.
5610
+ loggedTypeFailures[error.message] = true;
5611
+ var stack = getStack ? getStack() : '';
5612
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
5613
+ }
5614
+ }
5615
+ }
5616
+ }
5617
+ }
5618
+
5619
+ /**
5620
+ * Resets warning cache when testing.
5621
+ *
5622
+ * @private
5623
+ */
5624
+ checkPropTypes.resetWarningCache = function () {
5625
+ if (process.env.NODE_ENV !== 'production') {
5626
+ loggedTypeFailures = {};
5627
+ }
5628
+ };
5629
+ checkPropTypes_1$3 = checkPropTypes;
5630
+ return checkPropTypes_1$3;
5631
+ }
5632
+
5633
+ /**
5634
+ * Copyright (c) 2013-present, Facebook, Inc.
5635
+ *
5636
+ * This source code is licensed under the MIT license found in the
5637
+ * LICENSE file in the root directory of this source tree.
5638
+ */
5639
+
5640
+ var factoryWithTypeCheckers$3;
5641
+ var hasRequiredFactoryWithTypeCheckers$3;
5642
+ function requireFactoryWithTypeCheckers$3() {
5643
+ if (hasRequiredFactoryWithTypeCheckers$3) return factoryWithTypeCheckers$3;
5644
+ hasRequiredFactoryWithTypeCheckers$3 = 1;
5645
+ var ReactIs = requireReactIs$3();
5646
+ var assign = requireObjectAssign$3();
5647
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$3();
5648
+ var has = /*@__PURE__*/requireHas$3();
5649
+ var checkPropTypes = /*@__PURE__*/requireCheckPropTypes$3();
5650
+ var printWarning = function () {};
5651
+ if (process.env.NODE_ENV !== 'production') {
5652
+ printWarning = function (text) {
5653
+ var message = 'Warning: ' + text;
5654
+ if (typeof console !== 'undefined') {
5655
+ console.error(message);
5656
+ }
5657
+ try {
5658
+ // --- Welcome to debugging React ---
5659
+ // This error was thrown as a convenience so that you can use this stack
5660
+ // to find the callsite that caused this warning to fire.
5661
+ throw new Error(message);
5662
+ } catch (x) {}
5663
+ };
5664
+ }
5665
+ function emptyFunctionThatReturnsNull() {
5666
+ return null;
5667
+ }
5668
+ factoryWithTypeCheckers$3 = function (isValidElement, throwOnDirectAccess) {
5669
+ /* global Symbol */
5670
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
5671
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
5672
+
5673
+ /**
5674
+ * Returns the iterator method function contained on the iterable object.
5675
+ *
5676
+ * Be sure to invoke the function with the iterable as context:
5677
+ *
5678
+ * var iteratorFn = getIteratorFn(myIterable);
5679
+ * if (iteratorFn) {
5680
+ * var iterator = iteratorFn.call(myIterable);
5681
+ * ...
5682
+ * }
5683
+ *
5684
+ * @param {?object} maybeIterable
5685
+ * @return {?function}
5686
+ */
5687
+ function getIteratorFn(maybeIterable) {
5688
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
5689
+ if (typeof iteratorFn === 'function') {
5690
+ return iteratorFn;
5691
+ }
5692
+ }
5693
+
5694
+ /**
5695
+ * Collection of methods that allow declaration and validation of props that are
5696
+ * supplied to React components. Example usage:
5697
+ *
5698
+ * var Props = require('ReactPropTypes');
5699
+ * var MyArticle = React.createClass({
5700
+ * propTypes: {
5701
+ * // An optional string prop named "description".
5702
+ * description: Props.string,
5703
+ *
5704
+ * // A required enum prop named "category".
5705
+ * category: Props.oneOf(['News','Photos']).isRequired,
5706
+ *
5707
+ * // A prop named "dialog" that requires an instance of Dialog.
5708
+ * dialog: Props.instanceOf(Dialog).isRequired
5709
+ * },
5710
+ * render: function() { ... }
5711
+ * });
5712
+ *
5713
+ * A more formal specification of how these methods are used:
5714
+ *
5715
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
5716
+ * decl := ReactPropTypes.{type}(.isRequired)?
5717
+ *
5718
+ * Each and every declaration produces a function with the same signature. This
5719
+ * allows the creation of custom validation functions. For example:
5720
+ *
5721
+ * var MyLink = React.createClass({
5722
+ * propTypes: {
5723
+ * // An optional string or URI prop named "href".
5724
+ * href: function(props, propName, componentName) {
5725
+ * var propValue = props[propName];
5726
+ * if (propValue != null && typeof propValue !== 'string' &&
5727
+ * !(propValue instanceof URI)) {
5728
+ * return new Error(
5729
+ * 'Expected a string or an URI for ' + propName + ' in ' +
5730
+ * componentName
5731
+ * );
5732
+ * }
5733
+ * }
5734
+ * },
5735
+ * render: function() {...}
5736
+ * });
5737
+ *
5738
+ * @internal
5739
+ */
5740
+
5741
+ var ANONYMOUS = '<<anonymous>>';
5742
+
5743
+ // Important!
5744
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
5745
+ var ReactPropTypes = {
5746
+ array: createPrimitiveTypeChecker('array'),
5747
+ bigint: createPrimitiveTypeChecker('bigint'),
5748
+ bool: createPrimitiveTypeChecker('boolean'),
5749
+ func: createPrimitiveTypeChecker('function'),
5750
+ number: createPrimitiveTypeChecker('number'),
5751
+ object: createPrimitiveTypeChecker('object'),
5752
+ string: createPrimitiveTypeChecker('string'),
5753
+ symbol: createPrimitiveTypeChecker('symbol'),
5754
+ any: createAnyTypeChecker(),
5755
+ arrayOf: createArrayOfTypeChecker,
5756
+ element: createElementTypeChecker(),
5757
+ elementType: createElementTypeTypeChecker(),
5758
+ instanceOf: createInstanceTypeChecker,
5759
+ node: createNodeChecker(),
5760
+ objectOf: createObjectOfTypeChecker,
5761
+ oneOf: createEnumTypeChecker,
5762
+ oneOfType: createUnionTypeChecker,
5763
+ shape: createShapeTypeChecker,
5764
+ exact: createStrictShapeTypeChecker
5765
+ };
5766
+
5767
+ /**
5768
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
5769
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5770
+ */
5771
+ /*eslint-disable no-self-compare*/
5772
+ function is(x, y) {
5773
+ // SameValue algorithm
5774
+ if (x === y) {
5775
+ // Steps 1-5, 7-10
5776
+ // Steps 6.b-6.e: +0 != -0
5777
+ return x !== 0 || 1 / x === 1 / y;
5778
+ } else {
5779
+ // Step 6.a: NaN == NaN
5780
+ return x !== x && y !== y;
5781
+ }
5782
+ }
5783
+ /*eslint-enable no-self-compare*/
5784
+
5785
+ /**
5786
+ * We use an Error-like object for backward compatibility as people may call
5787
+ * PropTypes directly and inspect their output. However, we don't use real
5788
+ * Errors anymore. We don't inspect their stack anyway, and creating them
5789
+ * is prohibitively expensive if they are created too often, such as what
5790
+ * happens in oneOfType() for any type before the one that matched.
5791
+ */
5792
+ function PropTypeError(message, data) {
5793
+ this.message = message;
5794
+ this.data = data && typeof data === 'object' ? data : {};
5795
+ this.stack = '';
5796
+ }
5797
+ // Make `instanceof Error` still work for returned errors.
5798
+ PropTypeError.prototype = Error.prototype;
5799
+ function createChainableTypeChecker(validate) {
5800
+ if (process.env.NODE_ENV !== 'production') {
5801
+ var manualPropTypeCallCache = {};
5802
+ var manualPropTypeWarningCount = 0;
5803
+ }
5804
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5805
+ componentName = componentName || ANONYMOUS;
5806
+ propFullName = propFullName || propName;
5807
+ if (secret !== ReactPropTypesSecret) {
5808
+ if (throwOnDirectAccess) {
5809
+ // New behavior only for users of `prop-types` package
5810
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
5811
+ err.name = 'Invariant Violation';
5812
+ throw err;
5813
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
5814
+ // Old behavior for people using React.PropTypes
5815
+ var cacheKey = componentName + ':' + propName;
5816
+ if (!manualPropTypeCallCache[cacheKey] &&
5817
+ // Avoid spamming the console because they are often not actionable except for lib authors
5818
+ manualPropTypeWarningCount < 3) {
5819
+ printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
5820
+ manualPropTypeCallCache[cacheKey] = true;
5821
+ manualPropTypeWarningCount++;
5822
+ }
5823
+ }
5824
+ }
5825
+ if (props[propName] == null) {
5826
+ if (isRequired) {
5827
+ if (props[propName] === null) {
5828
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5829
+ }
5830
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5831
+ }
5832
+ return null;
5833
+ } else {
5834
+ return validate(props, propName, componentName, location, propFullName);
5835
+ }
5836
+ }
5837
+ var chainedCheckType = checkType.bind(null, false);
5838
+ chainedCheckType.isRequired = checkType.bind(null, true);
5839
+ return chainedCheckType;
5840
+ }
5841
+ function createPrimitiveTypeChecker(expectedType) {
5842
+ function validate(props, propName, componentName, location, propFullName, secret) {
5843
+ var propValue = props[propName];
5844
+ var propType = getPropType(propValue);
5845
+ if (propType !== expectedType) {
5846
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
5847
+ // check, but we can offer a more precise error message here rather than
5848
+ // 'of type `object`'.
5849
+ var preciseType = getPreciseType(propValue);
5850
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
5851
+ expectedType: expectedType
5852
+ });
5853
+ }
5854
+ return null;
5855
+ }
5856
+ return createChainableTypeChecker(validate);
5857
+ }
5858
+ function createAnyTypeChecker() {
5859
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5860
+ }
5861
+ function createArrayOfTypeChecker(typeChecker) {
5862
+ function validate(props, propName, componentName, location, propFullName) {
5863
+ if (typeof typeChecker !== 'function') {
5864
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5865
+ }
5866
+ var propValue = props[propName];
5867
+ if (!Array.isArray(propValue)) {
5868
+ var propType = getPropType(propValue);
5869
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5870
+ }
5871
+ for (var i = 0; i < propValue.length; i++) {
5872
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5873
+ if (error instanceof Error) {
5874
+ return error;
5875
+ }
5876
+ }
5877
+ return null;
5878
+ }
5879
+ return createChainableTypeChecker(validate);
5880
+ }
5881
+ function createElementTypeChecker() {
5882
+ function validate(props, propName, componentName, location, propFullName) {
5883
+ var propValue = props[propName];
5884
+ if (!isValidElement(propValue)) {
5885
+ var propType = getPropType(propValue);
5886
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5887
+ }
5888
+ return null;
5889
+ }
5890
+ return createChainableTypeChecker(validate);
5891
+ }
5892
+ function createElementTypeTypeChecker() {
5893
+ function validate(props, propName, componentName, location, propFullName) {
5894
+ var propValue = props[propName];
5895
+ if (!ReactIs.isValidElementType(propValue)) {
5896
+ var propType = getPropType(propValue);
5897
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5898
+ }
5899
+ return null;
5900
+ }
5901
+ return createChainableTypeChecker(validate);
5902
+ }
5903
+ function createInstanceTypeChecker(expectedClass) {
5904
+ function validate(props, propName, componentName, location, propFullName) {
5905
+ if (!(props[propName] instanceof expectedClass)) {
5906
+ var expectedClassName = expectedClass.name || ANONYMOUS;
5907
+ var actualClassName = getClassName(props[propName]);
5908
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5909
+ }
5910
+ return null;
5911
+ }
5912
+ return createChainableTypeChecker(validate);
5913
+ }
5914
+ function createEnumTypeChecker(expectedValues) {
5915
+ if (!Array.isArray(expectedValues)) {
5916
+ if (process.env.NODE_ENV !== 'production') {
5917
+ if (arguments.length > 1) {
5918
+ printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
5919
+ } else {
5920
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
5921
+ }
5922
+ }
5923
+ return emptyFunctionThatReturnsNull;
5924
+ }
5925
+ function validate(props, propName, componentName, location, propFullName) {
5926
+ var propValue = props[propName];
5927
+ for (var i = 0; i < expectedValues.length; i++) {
5928
+ if (is(propValue, expectedValues[i])) {
5929
+ return null;
5930
+ }
5931
+ }
5932
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5933
+ var type = getPreciseType(value);
5934
+ if (type === 'symbol') {
5935
+ return String(value);
5936
+ }
5937
+ return value;
5938
+ });
5939
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5940
+ }
5941
+ return createChainableTypeChecker(validate);
5942
+ }
5943
+ function createObjectOfTypeChecker(typeChecker) {
5944
+ function validate(props, propName, componentName, location, propFullName) {
5945
+ if (typeof typeChecker !== 'function') {
5946
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5947
+ }
5948
+ var propValue = props[propName];
5949
+ var propType = getPropType(propValue);
5950
+ if (propType !== 'object') {
5951
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5952
+ }
5953
+ for (var key in propValue) {
5954
+ if (has(propValue, key)) {
5955
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5956
+ if (error instanceof Error) {
5957
+ return error;
5958
+ }
5959
+ }
5960
+ }
5961
+ return null;
5962
+ }
5963
+ return createChainableTypeChecker(validate);
5964
+ }
5965
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
5966
+ if (!Array.isArray(arrayOfTypeCheckers)) {
5967
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
5968
+ return emptyFunctionThatReturnsNull;
5969
+ }
5970
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5971
+ var checker = arrayOfTypeCheckers[i];
5972
+ if (typeof checker !== 'function') {
5973
+ printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
5974
+ return emptyFunctionThatReturnsNull;
5975
+ }
5976
+ }
5977
+ function validate(props, propName, componentName, location, propFullName) {
5978
+ var expectedTypes = [];
5979
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5980
+ var checker = arrayOfTypeCheckers[i];
5981
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5982
+ if (checkerResult == null) {
5983
+ return null;
5984
+ }
5985
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5986
+ expectedTypes.push(checkerResult.data.expectedType);
5987
+ }
5988
+ }
5989
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
5990
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5991
+ }
5992
+ return createChainableTypeChecker(validate);
5993
+ }
5994
+ function createNodeChecker() {
5995
+ function validate(props, propName, componentName, location, propFullName) {
5996
+ if (!isNode(props[propName])) {
5997
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5998
+ }
5999
+ return null;
6000
+ }
6001
+ return createChainableTypeChecker(validate);
6002
+ }
6003
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
6004
+ return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
6005
+ }
6006
+ function createShapeTypeChecker(shapeTypes) {
6007
+ function validate(props, propName, componentName, location, propFullName) {
6008
+ var propValue = props[propName];
6009
+ var propType = getPropType(propValue);
6010
+ if (propType !== 'object') {
6011
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
6012
+ }
6013
+ for (var key in shapeTypes) {
6014
+ var checker = shapeTypes[key];
6015
+ if (typeof checker !== 'function') {
6016
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
6017
+ }
6018
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
6019
+ if (error) {
6020
+ return error;
6021
+ }
6022
+ }
6023
+ return null;
6024
+ }
6025
+ return createChainableTypeChecker(validate);
6026
+ }
6027
+ function createStrictShapeTypeChecker(shapeTypes) {
6028
+ function validate(props, propName, componentName, location, propFullName) {
6029
+ var propValue = props[propName];
6030
+ var propType = getPropType(propValue);
6031
+ if (propType !== 'object') {
6032
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
6033
+ }
6034
+ // We need to check all keys in case some are required but missing from props.
6035
+ var allKeys = assign({}, props[propName], shapeTypes);
6036
+ for (var key in allKeys) {
6037
+ var checker = shapeTypes[key];
6038
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
6039
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
6040
+ }
6041
+ if (!checker) {
6042
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
6043
+ }
6044
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
6045
+ if (error) {
6046
+ return error;
6047
+ }
6048
+ }
6049
+ return null;
6050
+ }
6051
+ return createChainableTypeChecker(validate);
6052
+ }
6053
+ function isNode(propValue) {
6054
+ switch (typeof propValue) {
6055
+ case 'number':
6056
+ case 'string':
6057
+ case 'undefined':
6058
+ return true;
6059
+ case 'boolean':
6060
+ return !propValue;
6061
+ case 'object':
6062
+ if (Array.isArray(propValue)) {
6063
+ return propValue.every(isNode);
6064
+ }
6065
+ if (propValue === null || isValidElement(propValue)) {
6066
+ return true;
6067
+ }
6068
+ var iteratorFn = getIteratorFn(propValue);
6069
+ if (iteratorFn) {
6070
+ var iterator = iteratorFn.call(propValue);
6071
+ var step;
6072
+ if (iteratorFn !== propValue.entries) {
6073
+ while (!(step = iterator.next()).done) {
6074
+ if (!isNode(step.value)) {
6075
+ return false;
6076
+ }
6077
+ }
6078
+ } else {
6079
+ // Iterator will provide entry [k,v] tuples rather than values.
6080
+ while (!(step = iterator.next()).done) {
6081
+ var entry = step.value;
6082
+ if (entry) {
6083
+ if (!isNode(entry[1])) {
6084
+ return false;
6085
+ }
6086
+ }
6087
+ }
6088
+ }
6089
+ } else {
6090
+ return false;
6091
+ }
6092
+ return true;
6093
+ default:
6094
+ return false;
6095
+ }
6096
+ }
6097
+ function isSymbol(propType, propValue) {
6098
+ // Native Symbol.
6099
+ if (propType === 'symbol') {
6100
+ return true;
6101
+ }
6102
+
6103
+ // falsy value can't be a Symbol
6104
+ if (!propValue) {
6105
+ return false;
6106
+ }
6107
+
6108
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
6109
+ if (propValue['@@toStringTag'] === 'Symbol') {
6110
+ return true;
6111
+ }
6112
+
6113
+ // Fallback for non-spec compliant Symbols which are polyfilled.
6114
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
6115
+ return true;
6116
+ }
6117
+ return false;
6118
+ }
6119
+
6120
+ // Equivalent of `typeof` but with special handling for array and regexp.
6121
+ function getPropType(propValue) {
6122
+ var propType = typeof propValue;
6123
+ if (Array.isArray(propValue)) {
6124
+ return 'array';
6125
+ }
6126
+ if (propValue instanceof RegExp) {
6127
+ // Old webkits (at least until Android 4.0) return 'function' rather than
6128
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
6129
+ // passes PropTypes.object.
6130
+ return 'object';
6131
+ }
6132
+ if (isSymbol(propType, propValue)) {
6133
+ return 'symbol';
6134
+ }
6135
+ return propType;
6136
+ }
6137
+
6138
+ // This handles more types than `getPropType`. Only used for error messages.
6139
+ // See `createPrimitiveTypeChecker`.
6140
+ function getPreciseType(propValue) {
6141
+ if (typeof propValue === 'undefined' || propValue === null) {
6142
+ return '' + propValue;
6143
+ }
6144
+ var propType = getPropType(propValue);
6145
+ if (propType === 'object') {
6146
+ if (propValue instanceof Date) {
6147
+ return 'date';
6148
+ } else if (propValue instanceof RegExp) {
6149
+ return 'regexp';
6150
+ }
6151
+ }
6152
+ return propType;
6153
+ }
6154
+
6155
+ // Returns a string that is postfixed to a warning about an invalid type.
6156
+ // For example, "undefined" or "of type array"
6157
+ function getPostfixForTypeWarning(value) {
6158
+ var type = getPreciseType(value);
6159
+ switch (type) {
6160
+ case 'array':
6161
+ case 'object':
6162
+ return 'an ' + type;
6163
+ case 'boolean':
6164
+ case 'date':
6165
+ case 'regexp':
6166
+ return 'a ' + type;
6167
+ default:
6168
+ return type;
6169
+ }
6170
+ }
6171
+
6172
+ // Returns class name of the object, if any.
6173
+ function getClassName(propValue) {
6174
+ if (!propValue.constructor || !propValue.constructor.name) {
6175
+ return ANONYMOUS;
6176
+ }
6177
+ return propValue.constructor.name;
6178
+ }
6179
+ ReactPropTypes.checkPropTypes = checkPropTypes;
6180
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
6181
+ ReactPropTypes.PropTypes = ReactPropTypes;
6182
+ return ReactPropTypes;
6183
+ };
6184
+ return factoryWithTypeCheckers$3;
6185
+ }
6186
+
6187
+ /**
6188
+ * Copyright (c) 2013-present, Facebook, Inc.
6189
+ *
6190
+ * This source code is licensed under the MIT license found in the
6191
+ * LICENSE file in the root directory of this source tree.
6192
+ */
6193
+
6194
+ var factoryWithThrowingShims$3;
6195
+ var hasRequiredFactoryWithThrowingShims$3;
6196
+ function requireFactoryWithThrowingShims$3() {
6197
+ if (hasRequiredFactoryWithThrowingShims$3) return factoryWithThrowingShims$3;
6198
+ hasRequiredFactoryWithThrowingShims$3 = 1;
6199
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$3();
6200
+ function emptyFunction() {}
6201
+ function emptyFunctionWithReset() {}
6202
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
6203
+ factoryWithThrowingShims$3 = function () {
6204
+ function shim(props, propName, componentName, location, propFullName, secret) {
6205
+ if (secret === ReactPropTypesSecret) {
6206
+ // It is still safe when called from React.
6207
+ return;
6208
+ }
6209
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
6210
+ err.name = 'Invariant Violation';
6211
+ throw err;
6212
+ }
6213
+ shim.isRequired = shim;
6214
+ function getShim() {
6215
+ return shim;
6216
+ } // Important!
6217
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
6218
+ var ReactPropTypes = {
6219
+ array: shim,
6220
+ bigint: shim,
6221
+ bool: shim,
6222
+ func: shim,
6223
+ number: shim,
6224
+ object: shim,
6225
+ string: shim,
6226
+ symbol: shim,
6227
+ any: shim,
6228
+ arrayOf: getShim,
6229
+ element: shim,
6230
+ elementType: shim,
6231
+ instanceOf: getShim,
6232
+ node: shim,
6233
+ objectOf: getShim,
6234
+ oneOf: getShim,
6235
+ oneOfType: getShim,
6236
+ shape: getShim,
6237
+ exact: getShim,
6238
+ checkPropTypes: emptyFunctionWithReset,
6239
+ resetWarningCache: emptyFunction
6240
+ };
6241
+ ReactPropTypes.PropTypes = ReactPropTypes;
6242
+ return ReactPropTypes;
6243
+ };
6244
+ return factoryWithThrowingShims$3;
6245
+ }
6246
+
6247
+ /**
6248
+ * Copyright (c) 2013-present, Facebook, Inc.
6249
+ *
6250
+ * This source code is licensed under the MIT license found in the
6251
+ * LICENSE file in the root directory of this source tree.
6252
+ */
6253
+
6254
+ var hasRequiredPropTypes$3;
6255
+ function requirePropTypes$3() {
6256
+ if (hasRequiredPropTypes$3) return propTypes$3.exports;
6257
+ hasRequiredPropTypes$3 = 1;
6258
+ if (process.env.NODE_ENV !== 'production') {
6259
+ var ReactIs = requireReactIs$3();
6260
+
6261
+ // By explicitly using `prop-types` you are opting into new development behavior.
6262
+ // http://fb.me/prop-types-in-prod
6263
+ var throwOnDirectAccess = true;
6264
+ propTypes$3.exports = /*@__PURE__*/requireFactoryWithTypeCheckers$3()(ReactIs.isElement, throwOnDirectAccess);
6265
+ } else {
6266
+ // By explicitly using `prop-types` you are opting into new production behavior.
6267
+ // http://fb.me/prop-types-in-prod
6268
+ propTypes$3.exports = /*@__PURE__*/requireFactoryWithThrowingShims$3()();
6269
+ }
6270
+ return propTypes$3.exports;
6271
+ }
6272
+ var propTypesExports$3 = /*@__PURE__*/requirePropTypes$3();
6273
+ var PropTypes$3 = /*@__PURE__*/getDefaultExportFromCjs$3(propTypesExports$3);
6274
+ ({
6275
+ onPowerOff: PropTypes$3.func,
6276
+ onRestart: PropTypes$3.func,
6277
+ powerOffLabel: PropTypes$3.string,
6278
+ restartLabel: PropTypes$3.string,
6279
+ iconClassName: PropTypes$3.string,
6280
+ confirmTitle: PropTypes$3.string,
6281
+ cancelText: PropTypes$3.string,
6282
+ okText: PropTypes$3.string,
6283
+ run: PropTypes$3.func
6284
+ });
6285
+ ({
6286
+ logoUrl: PropTypes$3.string,
6287
+ logoWidth: PropTypes$3.number,
6288
+ logoAlt: PropTypes$3.string,
6289
+ onClick: PropTypes$3.func
6290
+ });
6291
+
6292
+ // PropTypes 类型检查
6293
+ ({
6294
+ menuElement: PropTypes$3.node,
6295
+ productInfo: PropTypes$3.shape({
6296
+ productName: PropTypes$3.string,
6297
+ version: PropTypes$3.string
6298
+ }),
6299
+ showLogo: PropTypes$3.bool,
6300
+ showProductInfo: PropTypes$3.bool,
6301
+ showHardwareUsage: PropTypes$3.bool,
6302
+ showSystemOperations: PropTypes$3.bool,
6303
+ onPowerOff: PropTypes$3.func,
6304
+ onRestart: PropTypes$3.func,
6305
+ onRun: PropTypes$3.func,
6306
+ hardwareMonitorUrl: PropTypes$3.string,
6307
+ getSocketUrl: PropTypes$3.func,
6308
+ logoProps: PropTypes$3.object,
6309
+ className: PropTypes$3.string,
6310
+ style: PropTypes$3.object
6311
+ });
3884
6312
  function getDefaultExportFromCjs$2(x) {
3885
6313
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3886
6314
  }