seeder-st2110-components 2.0.3 → 2.0.4

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
@@ -5,15 +5,15 @@ import { useWebSocket, useInterval } from 'ahooks';
5
5
  import { LoadingOutlined, ExclamationCircleFilled, PlusOutlined } from '@ant-design/icons';
6
6
  import axios from 'axios';
7
7
 
8
- function _defineProperty(e, r, t) {
9
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
8
+ function _defineProperty$2(e, r, t) {
9
+ return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, {
10
10
  value: t,
11
11
  enumerable: !0,
12
12
  configurable: !0,
13
13
  writable: !0
14
14
  }) : e[r] = t, e;
15
15
  }
16
- function ownKeys(e, r) {
16
+ function ownKeys$2(e, r) {
17
17
  var t = Object.keys(e);
18
18
  if (Object.getOwnPropertySymbols) {
19
19
  var o = Object.getOwnPropertySymbols(e);
@@ -23,29 +23,29 @@ function ownKeys(e, r) {
23
23
  }
24
24
  return t;
25
25
  }
26
- function _objectSpread2(e) {
26
+ function _objectSpread2$2(e) {
27
27
  for (var r = 1; r < arguments.length; r++) {
28
28
  var t = null != arguments[r] ? arguments[r] : {};
29
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
30
- _defineProperty(e, r, t[r]);
31
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
29
+ r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) {
30
+ _defineProperty$2(e, r, t[r]);
31
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) {
32
32
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
33
33
  });
34
34
  }
35
35
  return e;
36
36
  }
37
- function _objectWithoutProperties(e, t) {
37
+ function _objectWithoutProperties$1(e, t) {
38
38
  if (null == e) return {};
39
39
  var o,
40
40
  r,
41
- i = _objectWithoutPropertiesLoose(e, t);
41
+ i = _objectWithoutPropertiesLoose$1(e, t);
42
42
  if (Object.getOwnPropertySymbols) {
43
43
  var n = Object.getOwnPropertySymbols(e);
44
44
  for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
45
45
  }
46
46
  return i;
47
47
  }
48
- function _objectWithoutPropertiesLoose(r, e) {
48
+ function _objectWithoutPropertiesLoose$1(r, e) {
49
49
  if (null == r) return {};
50
50
  var t = {};
51
51
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
@@ -54,7 +54,7 @@ function _objectWithoutPropertiesLoose(r, e) {
54
54
  }
55
55
  return t;
56
56
  }
57
- function _toPrimitive(t, r) {
57
+ function _toPrimitive$2(t, r) {
58
58
  if ("object" != typeof t || !t) return t;
59
59
  var e = t[Symbol.toPrimitive];
60
60
  if (void 0 !== e) {
@@ -64,8 +64,8 @@ function _toPrimitive(t, r) {
64
64
  }
65
65
  return ("string" === r ? String : Number)(t);
66
66
  }
67
- function _toPropertyKey(t) {
68
- var i = _toPrimitive(t, "string");
67
+ function _toPropertyKey$2(t) {
68
+ var i = _toPrimitive$2(t, "string");
69
69
  return "symbol" == typeof i ? i : i + "";
70
70
  }
71
71
 
@@ -74,7 +74,7 @@ function _toPropertyKey(t) {
74
74
  * 在浏览器控制台运行 window.debugI18n() 查看当前国际化状态
75
75
  */
76
76
 
77
- const debugI18n$1 = () => {
77
+ const debugI18n$2 = () => {
78
78
  var _window$g_initialProp, _window$g_initialProp2, _window$g_initialProp3, _window$g_initialProp4, _window$g_initialProp5, _window$g_initialProp6;
79
79
  if (typeof window === 'undefined') {
80
80
  console.log('[i18n debug] Not in browser environment');
@@ -106,7 +106,7 @@ const debugI18n$1 = () => {
106
106
  const allLocales = new Set([...Object.keys(componentMessages), ...Object.keys(projectMessages), ...Object.keys(umiMessages)]);
107
107
  console.log('\n🔧 Merged Locales:', Array.from(allLocales));
108
108
  allLocales.forEach(locale => {
109
- const merged = _objectSpread2(_objectSpread2(_objectSpread2({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
109
+ const merged = _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
110
110
  console.log("\n \uD83D\uDCC4 ".concat(locale, " (").concat(Object.keys(merged).length, " keys):"), merged);
111
111
  });
112
112
 
@@ -116,7 +116,7 @@ const debugI18n$1 = () => {
116
116
  const currentLocale = ((_window$g_initialProp5 = window.g_initialProps) === null || _window$g_initialProp5 === void 0 ? void 0 : _window$g_initialProp5.locale) || ((_window$g_initialProp6 = window.g_initialProps) === null || _window$g_initialProp6 === void 0 || (_window$g_initialProp6 = _window$g_initialProp6.___g_initialPropsFromServer) === null || _window$g_initialProp6 === void 0 ? void 0 : _window$g_initialProp6.locale) || localStorage.getItem('umi-locale') || 'zh-CN';
117
117
  const allMessages = {};
118
118
  allLocales.forEach(locale => {
119
- allMessages[locale] = _objectSpread2(_objectSpread2(_objectSpread2({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
119
+ allMessages[locale] = _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
120
120
  });
121
121
  testKeys.forEach(key => {
122
122
  var _allMessages$currentL, _allMessages$enUS;
@@ -128,7 +128,7 @@ const debugI18n$1 = () => {
128
128
 
129
129
  // 自动在开发环境注册到 window
130
130
  if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
131
- window.debugI18n = debugI18n$1;
131
+ window.debugI18n = debugI18n$2;
132
132
  console.log('💡 I18n debug tool available. Run window.debugI18n() in console to check i18n status.');
133
133
  }
134
134
 
@@ -146,7 +146,7 @@ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
146
146
  * 获取当前语言环境
147
147
  * 优先从 Umi 全局变量读取,其次使用默认值
148
148
  */
149
- const getLocale$1 = () => {
149
+ const getLocale = () => {
150
150
  // 尝试从 Umi 获取语言设置
151
151
  if (typeof window !== 'undefined') {
152
152
  var _window$g_initialProp, _window$g_initialProp2, _window$g_initialProp3;
@@ -197,7 +197,7 @@ const getLocale$1 = () => {
197
197
  * 获取语言包
198
198
  * 优先从主项目读取,其次使用组件库自带的语言包
199
199
  */
200
- const getMessages$1 = () => {
200
+ const getMessages = () => {
201
201
  if (typeof window !== 'undefined') {
202
202
  var _window$g_initialProp4;
203
203
  // 尝试从多个来源读取语言包
@@ -215,7 +215,7 @@ const getMessages$1 = () => {
215
215
  // 合并语言包(组件库的优先级最高,其次是主项目,最后是 Umi)
216
216
  const allLocales = new Set([...Object.keys(componentMessages), ...Object.keys(projectMessages), ...Object.keys(umiMessages)]);
217
217
  allLocales.forEach(locale => {
218
- messages[locale] = _objectSpread2(_objectSpread2(_objectSpread2({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
218
+ messages[locale] = _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
219
219
  });
220
220
  return messages;
221
221
  }
@@ -229,7 +229,7 @@ const getMessages$1 = () => {
229
229
  * @param {string} locale - 语言环境
230
230
  * @param {object} messages - 语言包
231
231
  */
232
- const formatMessage$1 = function (_ref) {
232
+ const formatMessage = function (_ref) {
233
233
  var _messages$locale, _messages$enUS;
234
234
  let {
235
235
  id
@@ -259,15 +259,15 @@ const formatMessage$1 = function (_ref) {
259
259
  * const title = intl.formatMessage({ id: 'networkSettings.title' });
260
260
  * const message = intl.formatMessage({ id: 'validation.minLength' }, { min: 3 });
261
261
  */
262
- const useIntl$1 = () => {
263
- const locale = getLocale$1();
264
- const messages = getMessages$1();
262
+ const useIntl = () => {
263
+ const locale = getLocale();
264
+ const messages = getMessages();
265
265
  const formatMessageFn = function (_ref2) {
266
266
  let {
267
267
  id
268
268
  } = _ref2;
269
269
  let values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
270
- return formatMessage$1({
270
+ return formatMessage({
271
271
  id
272
272
  }, values, locale, messages);
273
273
  };
@@ -310,7 +310,7 @@ const UsageItem = /*#__PURE__*/memo(_ref => {
310
310
  children,
311
311
  memTotal
312
312
  } = _ref;
313
- const intl = useIntl$1();
313
+ const intl = useIntl();
314
314
  return /*#__PURE__*/jsx(Tooltip, {
315
315
  title: /*#__PURE__*/jsxs(Fragment, {
316
316
  children: [/*#__PURE__*/jsx("div", {
@@ -342,7 +342,7 @@ const useHardwareWebSocket = socketUrl => {
342
342
  const handleMessage = useCallback(message => {
343
343
  try {
344
344
  if (message) {
345
- setSystemStatus(prev => _objectSpread2(_objectSpread2({}, prev), message));
345
+ setSystemStatus(prev => _objectSpread2$2(_objectSpread2$2({}, prev), message));
346
346
  }
347
347
  } catch (error) {
348
348
  console.error('Message processing error:', error);
@@ -441,7 +441,7 @@ const getItems = (details, intl) => {
441
441
  }), 'seeder-icon-CPUwendu', details.cpu_temp, '℃'));
442
442
  }
443
443
  if (details.mem_usage !== null && details.mem_usage !== undefined) {
444
- items.push(_objectSpread2(_objectSpread2({}, createMetricItem(intl.formatMessage({
444
+ items.push(_objectSpread2$2(_objectSpread2$2({}, createMetricItem(intl.formatMessage({
445
445
  id: 'usage.memory'
446
446
  }), 'seeder-icon-shiyongshuai', details.mem_usage, '%')), {}, {
447
447
  memTotal: details.mem_total
@@ -475,7 +475,7 @@ const getItems = (details, intl) => {
475
475
  return items;
476
476
  };
477
477
  const useHardwareUsage = socketUrl => {
478
- const intl = useIntl$1();
478
+ const intl = useIntl();
479
479
  const {
480
480
  ps_status
481
481
  } = useHardwareWebSocket$1(socketUrl);
@@ -498,16 +498,16 @@ const useHardwareUsage = socketUrl => {
498
498
  };
499
499
  var useHardwareUsage$1 = useHardwareUsage;
500
500
 
501
- const _excluded$3 = ["width", "okText", "cancelText", "styles"];
502
- const StyledModal = props => {
503
- const intl = useIntl$1();
501
+ const _excluded$4 = ["width", "okText", "cancelText", "styles"];
502
+ const StyledModal$2 = props => {
503
+ const intl = useIntl();
504
504
  const {
505
505
  width = "520px",
506
506
  okText = "button.apply",
507
507
  cancelText = "button.close",
508
508
  styles: propStyles = {}
509
509
  } = props,
510
- restProps = _objectWithoutProperties(props, _excluded$3);
510
+ restProps = _objectWithoutProperties$1(props, _excluded$4);
511
511
 
512
512
  // 处理国际化文本
513
513
  const okButtonText = typeof okText === 'string' && okText.includes('.') ? intl.formatMessage({
@@ -543,15 +543,15 @@ const StyledModal = props => {
543
543
  };
544
544
 
545
545
  // 合并样式
546
- const styles = _objectSpread2(_objectSpread2({}, baseStyles), propStyles);
547
- return /*#__PURE__*/jsx(Modal, _objectSpread2({
546
+ const styles = _objectSpread2$2(_objectSpread2$2({}, baseStyles), propStyles);
547
+ return /*#__PURE__*/jsx(Modal, _objectSpread2$2({
548
548
  width: width,
549
549
  okText: okButtonText,
550
550
  cancelText: cancelButtonText,
551
551
  styles: styles
552
552
  }, restProps));
553
553
  };
554
- var StyledModal$1 = StyledModal;
554
+ var StyledModal$3 = StyledModal$2;
555
555
 
556
556
  const AuthorizationModal = _ref => {
557
557
  let {
@@ -563,7 +563,7 @@ const AuthorizationModal = _ref => {
563
563
  cancelText = 'license.button.ignore',
564
564
  width = 600
565
565
  } = _ref;
566
- const intl = useIntl$1();
566
+ const intl = useIntl();
567
567
  const {
568
568
  message
569
569
  } = App.useApp();
@@ -619,7 +619,7 @@ const AuthorizationModal = _ref => {
619
619
  }) : intl.formatMessage({
620
620
  id: 'license.button.activate'
621
621
  });
622
- return /*#__PURE__*/jsx(StyledModal$1, {
622
+ return /*#__PURE__*/jsx(StyledModal$3, {
623
623
  title: intl.formatMessage({
624
624
  id: title
625
625
  }),
@@ -691,7 +691,7 @@ const DEFAULT_AUTH = {
691
691
  expires_time: '' // 授权到期时间
692
692
  };
693
693
  const useAuth = options => {
694
- const intl = useIntl$1();
694
+ const intl = useIntl();
695
695
  const {
696
696
  fetchAuthInfo,
697
697
  authorize,
@@ -788,7 +788,7 @@ const useUpgrade = _ref => {
788
788
  uploadCompleteDelay = 3000,
789
789
  statusPollingInterval = 1000
790
790
  } = _ref;
791
- const intl = useIntl$1();
791
+ const intl = useIntl();
792
792
  const [isSpinning, setIsSpinning] = useState(false);
793
793
  const [pollingInterval, setPollingInterval] = useState(undefined); // 间隔时间,当设置值为 undefined 时会停止计时器
794
794
  const [currentStatus, setCurrentStatus] = useState(intl.formatMessage({
@@ -1142,7 +1142,7 @@ const useSystemOperations = function () {
1142
1142
  okText = "system.button.confirm",
1143
1143
  run
1144
1144
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1145
- const intl = useIntl$1();
1145
+ const intl = useIntl();
1146
1146
  const {
1147
1147
  modal: AntdModal
1148
1148
  } = App.useApp();
@@ -1557,7 +1557,7 @@ const useWebSocketWithFeatures = config => {
1557
1557
  }
1558
1558
  return createDummyLogger();
1559
1559
  }, [url, enableLog]);
1560
- const websocketOptions = useMemo(() => _objectSpread2(_objectSpread2({}, options), {}, {
1560
+ const websocketOptions = useMemo(() => _objectSpread2$2(_objectSpread2$2({}, options), {}, {
1561
1561
  onOpen: event => {
1562
1562
  var _options$onOpen;
1563
1563
  logger.log('INFO', 'WebSocket 连接成功', {
@@ -1966,7 +1966,7 @@ const NetworkFieldGroup = _ref => {
1966
1966
  interfaces,
1967
1967
  fieldConfig = {}
1968
1968
  } = _ref;
1969
- const intl = useIntl$1();
1969
+ const intl = useIntl();
1970
1970
 
1971
1971
  // 默认字段配置
1972
1972
  const defaultFieldConfig = {
@@ -1989,7 +1989,7 @@ const NetworkFieldGroup = _ref => {
1989
1989
  enabled: true
1990
1990
  }
1991
1991
  };
1992
- const mergedFieldConfig = _objectSpread2(_objectSpread2(_objectSpread2({}, defaultFieldConfig), fieldConfig), {}, {
1992
+ const mergedFieldConfig = _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, defaultFieldConfig), fieldConfig), {}, {
1993
1993
  netmask: {
1994
1994
  label: defaultFieldConfig.netmask.label,
1995
1995
  enabled: (_fieldConfig$netmask$ = (_fieldConfig$netmask = fieldConfig.netmask) === null || _fieldConfig$netmask === void 0 ? void 0 : _fieldConfig$netmask.enabled) !== null && _fieldConfig$netmask$ !== void 0 ? _fieldConfig$netmask$ : defaultFieldConfig.netmask.enabled
@@ -2053,7 +2053,7 @@ const NetworkSettingsModal = _ref2 => {
2053
2053
  },
2054
2054
  restartRemark
2055
2055
  } = _ref2;
2056
- const intl = useIntl$1();
2056
+ const intl = useIntl();
2057
2057
  const {
2058
2058
  message,
2059
2059
  modal
@@ -2071,18 +2071,18 @@ const NetworkSettingsModal = _ref2 => {
2071
2071
  hasInitialized: false
2072
2072
  });
2073
2073
  const preparedFieldConfig = useMemo(() => {
2074
- const config = _objectSpread2({}, fieldConfig);
2074
+ const config = _objectSpread2$2({}, fieldConfig);
2075
2075
 
2076
2076
  // 确保LAN和QSFP的配置存在
2077
2077
  config.LAN = config.LAN || {};
2078
2078
  config.QSFP = config.QSFP || {};
2079
2079
  if (sections.includes('LAN')) {
2080
- config.LAN.netmask = _objectSpread2(_objectSpread2({}, config.LAN.netmask || {}), {}, {
2080
+ config.LAN.netmask = _objectSpread2$2(_objectSpread2$2({}, config.LAN.netmask || {}), {}, {
2081
2081
  enabled: showNetmask.LAN
2082
2082
  });
2083
2083
  }
2084
2084
  if (sections.includes('QSFP')) {
2085
- config.QSFP.netmask = _objectSpread2(_objectSpread2({}, config.QSFP.netmask || {}), {}, {
2085
+ config.QSFP.netmask = _objectSpread2$2(_objectSpread2$2({}, config.QSFP.netmask || {}), {}, {
2086
2086
  enabled: showNetmask.QSFP
2087
2087
  });
2088
2088
  }
@@ -2110,7 +2110,7 @@ const NetworkSettingsModal = _ref2 => {
2110
2110
  if (sections.includes('LAN')) {
2111
2111
  promises.push(getLanConfig());
2112
2112
  }
2113
- if (sections.includes('QSFP')) {
2113
+ if (sections.includes('QSFP') && getSysConfig) {
2114
2114
  promises.push(getSysConfig());
2115
2115
  }
2116
2116
  const results = await Promise.allSettled(promises);
@@ -2157,7 +2157,7 @@ const NetworkSettingsModal = _ref2 => {
2157
2157
  const initialValues = useMemo(() => {
2158
2158
  const values = {};
2159
2159
  if (sections.includes('LAN') && lanConfigs.length > 0) {
2160
- values.LAN = lanConfigs.map(config => _objectSpread2({
2160
+ values.LAN = lanConfigs.map(config => _objectSpread2$2({
2161
2161
  connection_id: config.connection_id,
2162
2162
  display_name: config.display_name,
2163
2163
  ip_address: config.ip_address
@@ -2166,7 +2166,7 @@ const NetworkSettingsModal = _ref2 => {
2166
2166
  } : {}));
2167
2167
  }
2168
2168
  if (sections.includes('QSFP') && st2110Interfaces.length > 0) {
2169
- values.QSFP = st2110Interfaces.map(iface => _objectSpread2(_objectSpread2({}, iface.id !== undefined && {
2169
+ values.QSFP = st2110Interfaces.map(iface => _objectSpread2$2(_objectSpread2$2({}, iface.id !== undefined && {
2170
2170
  id: iface.id
2171
2171
  }), {}, {
2172
2172
  display_name: iface.display_name,
@@ -2287,7 +2287,7 @@ const NetworkSettingsModal = _ref2 => {
2287
2287
  if (sections.includes('LAN') && values.LAN) {
2288
2288
  const lanData = values.LAN.map((item, index) => {
2289
2289
  var _lanConfigs$index;
2290
- return _objectSpread2({
2290
+ return _objectSpread2$2({
2291
2291
  connection_id: (_lanConfigs$index = lanConfigs[index]) === null || _lanConfigs$index === void 0 ? void 0 : _lanConfigs$index.connection_id,
2292
2292
  ip_address: item.ip_address
2293
2293
  }, showNetmask.LAN ? {
@@ -2301,7 +2301,7 @@ const NetworkSettingsModal = _ref2 => {
2301
2301
  if (sections.includes('QSFP') && values.QSFP) {
2302
2302
  const interfacesData = values.QSFP.map((item, index) => {
2303
2303
  var _st2110Interfaces$ind, _st2110Interfaces$ind2, _st2110Interfaces$ind3;
2304
- return _objectSpread2(_objectSpread2(_objectSpread2({}, (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind = st2110Interfaces[index]) === null || _st2110Interfaces$ind === void 0 ? void 0 : _st2110Interfaces$ind.id) !== undefined && {
2304
+ return _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind = st2110Interfaces[index]) === null || _st2110Interfaces$ind === void 0 ? void 0 : _st2110Interfaces$ind.id) !== undefined && {
2305
2305
  id: st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind2 = st2110Interfaces[index]) === null || _st2110Interfaces$ind2 === void 0 ? void 0 : _st2110Interfaces$ind2.id
2306
2306
  }), (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind3 = st2110Interfaces[index]) === null || _st2110Interfaces$ind3 === void 0 ? void 0 : _st2110Interfaces$ind3.ip) !== undefined ? {
2307
2307
  ip: item.ip_address
@@ -2343,7 +2343,7 @@ const NetworkSettingsModal = _ref2 => {
2343
2343
  }, [form, sections, lanConfigs, st2110Interfaces, updateLanConfig, updateSysConfig, handleSuccess]);
2344
2344
 
2345
2345
  // 合并默认模态框属性和传入的属性
2346
- const mergedModalProps = _objectSpread2({
2346
+ const mergedModalProps = _objectSpread2$2({
2347
2347
  title: intl.formatMessage({
2348
2348
  id: 'networkSettings.title'
2349
2349
  }),
@@ -2364,7 +2364,7 @@ const NetworkSettingsModal = _ref2 => {
2364
2364
  }, modalProps);
2365
2365
 
2366
2366
  // 合并默认表单属性和传入的属性
2367
- const mergedFormProps = _objectSpread2({
2367
+ const mergedFormProps = _objectSpread2$2({
2368
2368
  form: form,
2369
2369
  labelCol: {
2370
2370
  span: 6
@@ -2374,8 +2374,8 @@ const NetworkSettingsModal = _ref2 => {
2374
2374
  },
2375
2375
  autoComplete: "off"
2376
2376
  }, formProps);
2377
- return /*#__PURE__*/jsxs(StyledModal$1, _objectSpread2(_objectSpread2({}, mergedModalProps), {}, {
2378
- children: [/*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
2377
+ return /*#__PURE__*/jsxs(StyledModal$3, _objectSpread2$2(_objectSpread2$2({}, mergedModalProps), {}, {
2378
+ children: [/*#__PURE__*/jsxs(Form, _objectSpread2$2(_objectSpread2$2({}, mergedFormProps), {}, {
2379
2379
  children: [sections.includes('LAN') && lanConfigs.length > 0 && /*#__PURE__*/jsxs(Fragment, {
2380
2380
  children: [/*#__PURE__*/jsx(NetworkFieldGroup, {
2381
2381
  prefix: "LAN",
@@ -2497,7 +2497,7 @@ function convertPtpStatusToArray(ptpStatus, fieldConfigs, fieldOrder) {
2497
2497
  formType: 'text'
2498
2498
  };
2499
2499
  const value = ptpStatus[key];
2500
- return _objectSpread2(_objectSpread2({
2500
+ return _objectSpread2$2(_objectSpread2$2({
2501
2501
  key,
2502
2502
  value
2503
2503
  }, config), {}, {
@@ -2516,7 +2516,7 @@ const PtpModal = _ref => {
2516
2516
  modalProps = {},
2517
2517
  formProps = {}
2518
2518
  } = _ref;
2519
- const intl = useIntl$1();
2519
+ const intl = useIntl();
2520
2520
  const [ptpStatus, setPtpStatus] = useState(null);
2521
2521
  const [loading, setLoading] = useState(false);
2522
2522
  const [form] = Form.useForm();
@@ -2581,7 +2581,7 @@ const PtpModal = _ref => {
2581
2581
  var _item$options, _item$statusMap, _item$min, _item$max;
2582
2582
  switch (item.formType) {
2583
2583
  case 'select':
2584
- const selectOptions = (_item$options = item.options) === null || _item$options === void 0 ? void 0 : _item$options.map(opt => _objectSpread2(_objectSpread2({}, opt), {}, {
2584
+ const selectOptions = (_item$options = item.options) === null || _item$options === void 0 ? void 0 : _item$options.map(opt => _objectSpread2$2(_objectSpread2$2({}, opt), {}, {
2585
2585
  label: intl.formatMessage({
2586
2586
  id: opt.label
2587
2587
  }, {
@@ -2634,7 +2634,7 @@ const PtpModal = _ref => {
2634
2634
  if (!open || !ptpStatus) return null;
2635
2635
 
2636
2636
  // 合并默认模态框属性和传入的属性
2637
- const mergedModalProps = _objectSpread2({
2637
+ const mergedModalProps = _objectSpread2$2({
2638
2638
  title: intl.formatMessage({
2639
2639
  id: 'ptp.title'
2640
2640
  }),
@@ -2652,7 +2652,7 @@ const PtpModal = _ref => {
2652
2652
  }, modalProps);
2653
2653
 
2654
2654
  // 合并默认表单属性和传入的属性
2655
- const mergedFormProps = _objectSpread2({
2655
+ const mergedFormProps = _objectSpread2$2({
2656
2656
  form: form,
2657
2657
  name: "ptpForm",
2658
2658
  labelCol: {
@@ -2663,8 +2663,8 @@ const PtpModal = _ref => {
2663
2663
  },
2664
2664
  autoComplete: "off"
2665
2665
  }, formProps);
2666
- return /*#__PURE__*/jsx(StyledModal$1, _objectSpread2(_objectSpread2({}, mergedModalProps), {}, {
2667
- children: /*#__PURE__*/jsx(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
2666
+ return /*#__PURE__*/jsx(StyledModal$3, _objectSpread2$2(_objectSpread2$2({}, mergedModalProps), {}, {
2667
+ children: /*#__PURE__*/jsx(Form, _objectSpread2$2(_objectSpread2$2({}, mergedFormProps), {}, {
2668
2668
  children: ptpStatusArray.map(item => /*#__PURE__*/jsx(Form.Item, {
2669
2669
  label: renderLabel(item),
2670
2670
  name: item.key,
@@ -2694,7 +2694,7 @@ const LeftList = /*#__PURE__*/memo(_ref => {
2694
2694
  exportButton: "preset.button.export"
2695
2695
  }
2696
2696
  } = _ref;
2697
- const intl = useIntl$1();
2697
+ const intl = useIntl();
2698
2698
 
2699
2699
  // 格式化文本的辅助函数
2700
2700
  const fmt = key => {
@@ -2869,7 +2869,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
2869
2869
  // 作用:在切换选中预设时强制触发 Checkbox 的重新初始化
2870
2870
  enableEdit = true
2871
2871
  } = _ref3;
2872
- const intl = useIntl$1();
2872
+ const intl = useIntl();
2873
2873
  const [initialSelected, setInitialSelected] = useState([]);
2874
2874
  const [isEditMode, setIsEditMode] = useState(false); // 是否进入编辑模式
2875
2875
  const currentSelected = Form.useWatch('category_list', form) || [];
@@ -2906,7 +2906,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
2906
2906
  return fields.category_list.options.map(category => {
2907
2907
  const isInitiallySelected = initialSelected.includes(category.name);
2908
2908
  const shouldDisable = isSavedPreset ? !isInitiallySelected : false;
2909
- return _objectSpread2(_objectSpread2({}, category), {}, {
2909
+ return _objectSpread2$2(_objectSpread2$2({}, category), {}, {
2910
2910
  disabled: shouldDisable,
2911
2911
  initiallySelected: isInitiallySelected
2912
2912
  });
@@ -3032,7 +3032,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
3032
3032
  }) :
3033
3033
  /*#__PURE__*/
3034
3034
  // 非编辑模式下的按钮
3035
- jsx(SubmitButton, _objectSpread2(_objectSpread2({
3035
+ jsx(SubmitButton, _objectSpread2$2(_objectSpread2$2({
3036
3036
  action: handleLoad
3037
3037
  }, hasCategoryList && {
3038
3038
  disabled: !currentSelected.length
@@ -3101,7 +3101,7 @@ const Preset = _ref => {
3101
3101
  enableEdit = true,
3102
3102
  enableImportAndExport = false
3103
3103
  } = _ref;
3104
- const intl = useIntl$1();
3104
+ const intl = useIntl();
3105
3105
  const {
3106
3106
  message,
3107
3107
  modal
@@ -3327,7 +3327,7 @@ const Preset = _ref => {
3327
3327
  });
3328
3328
  (async () => {
3329
3329
  try {
3330
- await loadPreset(_objectSpread2({
3330
+ await loadPreset(_objectSpread2$2({
3331
3331
  id: loadData.id
3332
3332
  }, loadData.category_list && {
3333
3333
  category_list: loadData.category_list
@@ -3451,7 +3451,7 @@ const Preset = _ref => {
3451
3451
  useEffect(() => {
3452
3452
  fetchPresetList();
3453
3453
  }, [fetchPresetList]);
3454
- return /*#__PURE__*/jsx(StyledModal$1, {
3454
+ return /*#__PURE__*/jsx(StyledModal$3, {
3455
3455
  title: fmt(texts.title),
3456
3456
  width: width,
3457
3457
  open: open,
@@ -3537,7 +3537,7 @@ const UpgradeManager = _ref => {
3537
3537
  statusPollingInterval = 1000,
3538
3538
  children
3539
3539
  } = _ref,
3540
- dropdownProps = _objectWithoutProperties(_ref, _excluded$2);
3540
+ dropdownProps = _objectWithoutProperties$1(_ref, _excluded$2);
3541
3541
  const [upgradeElement] = useUpgrade$1({
3542
3542
  menuItems,
3543
3543
  onMenuClick,
@@ -3553,7 +3553,7 @@ const UpgradeManager = _ref => {
3553
3553
  const dropdownElement = upgradeElement.props.children[0];
3554
3554
  const otherElements = upgradeElement.props.children.slice(1);
3555
3555
  return /*#__PURE__*/jsxs(Fragment, {
3556
- children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2(_objectSpread2({}, dropdownProps), dropdownElement.props), {}, {
3556
+ children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, dropdownProps), dropdownElement.props), {}, {
3557
3557
  children: children
3558
3558
  })), otherElements]
3559
3559
  });
@@ -3568,15 +3568,15 @@ UpgradeManager.defaultProps = {
3568
3568
  };
3569
3569
  var UpgradeManager$1 = UpgradeManager;
3570
3570
 
3571
- function getDefaultExportFromCjs$8 (x) {
3571
+ function getDefaultExportFromCjs$9 (x) {
3572
3572
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3573
3573
  }
3574
3574
 
3575
- var propTypes$8 = {exports: {}};
3575
+ var propTypes$9 = {exports: {}};
3576
3576
 
3577
- var reactIs$8 = {exports: {}};
3577
+ var reactIs$9 = {exports: {}};
3578
3578
 
3579
- var reactIs_production_min$8 = {};
3579
+ var reactIs_production_min$9 = {};
3580
3580
 
3581
3581
  /** @license React v16.13.1
3582
3582
  * react-is.production.min.js
@@ -3587,21 +3587,21 @@ var reactIs_production_min$8 = {};
3587
3587
  * LICENSE file in the root directory of this source tree.
3588
3588
  */
3589
3589
 
3590
- var hasRequiredReactIs_production_min$8;
3590
+ var hasRequiredReactIs_production_min$9;
3591
3591
 
3592
- function requireReactIs_production_min$8 () {
3593
- if (hasRequiredReactIs_production_min$8) return reactIs_production_min$8;
3594
- hasRequiredReactIs_production_min$8 = 1;
3592
+ function requireReactIs_production_min$9 () {
3593
+ if (hasRequiredReactIs_production_min$9) return reactIs_production_min$9;
3594
+ hasRequiredReactIs_production_min$9 = 1;
3595
3595
  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?
3596
3596
  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;
3597
- 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$8.AsyncMode=l;reactIs_production_min$8.ConcurrentMode=m;reactIs_production_min$8.ContextConsumer=k;reactIs_production_min$8.ContextProvider=h;reactIs_production_min$8.Element=c;reactIs_production_min$8.ForwardRef=n;reactIs_production_min$8.Fragment=e;reactIs_production_min$8.Lazy=t;reactIs_production_min$8.Memo=r;reactIs_production_min$8.Portal=d;
3598
- reactIs_production_min$8.Profiler=g;reactIs_production_min$8.StrictMode=f;reactIs_production_min$8.Suspense=p;reactIs_production_min$8.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$8.isConcurrentMode=A;reactIs_production_min$8.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$8.isContextProvider=function(a){return z(a)===h};reactIs_production_min$8.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$8.isForwardRef=function(a){return z(a)===n};reactIs_production_min$8.isFragment=function(a){return z(a)===e};reactIs_production_min$8.isLazy=function(a){return z(a)===t};
3599
- reactIs_production_min$8.isMemo=function(a){return z(a)===r};reactIs_production_min$8.isPortal=function(a){return z(a)===d};reactIs_production_min$8.isProfiler=function(a){return z(a)===g};reactIs_production_min$8.isStrictMode=function(a){return z(a)===f};reactIs_production_min$8.isSuspense=function(a){return z(a)===p};
3600
- reactIs_production_min$8.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$8.typeOf=z;
3601
- return reactIs_production_min$8;
3597
+ 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$9.AsyncMode=l;reactIs_production_min$9.ConcurrentMode=m;reactIs_production_min$9.ContextConsumer=k;reactIs_production_min$9.ContextProvider=h;reactIs_production_min$9.Element=c;reactIs_production_min$9.ForwardRef=n;reactIs_production_min$9.Fragment=e;reactIs_production_min$9.Lazy=t;reactIs_production_min$9.Memo=r;reactIs_production_min$9.Portal=d;
3598
+ reactIs_production_min$9.Profiler=g;reactIs_production_min$9.StrictMode=f;reactIs_production_min$9.Suspense=p;reactIs_production_min$9.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$9.isConcurrentMode=A;reactIs_production_min$9.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$9.isContextProvider=function(a){return z(a)===h};reactIs_production_min$9.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$9.isForwardRef=function(a){return z(a)===n};reactIs_production_min$9.isFragment=function(a){return z(a)===e};reactIs_production_min$9.isLazy=function(a){return z(a)===t};
3599
+ reactIs_production_min$9.isMemo=function(a){return z(a)===r};reactIs_production_min$9.isPortal=function(a){return z(a)===d};reactIs_production_min$9.isProfiler=function(a){return z(a)===g};reactIs_production_min$9.isStrictMode=function(a){return z(a)===f};reactIs_production_min$9.isSuspense=function(a){return z(a)===p};
3600
+ reactIs_production_min$9.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$9.typeOf=z;
3601
+ return reactIs_production_min$9;
3602
3602
  }
3603
3603
 
3604
- var reactIs_development$8 = {};
3604
+ var reactIs_development$9 = {};
3605
3605
 
3606
3606
  /** @license React v16.13.1
3607
3607
  * react-is.development.js
@@ -3612,11 +3612,11 @@ var reactIs_development$8 = {};
3612
3612
  * LICENSE file in the root directory of this source tree.
3613
3613
  */
3614
3614
 
3615
- var hasRequiredReactIs_development$8;
3615
+ var hasRequiredReactIs_development$9;
3616
3616
 
3617
- function requireReactIs_development$8 () {
3618
- if (hasRequiredReactIs_development$8) return reactIs_development$8;
3619
- hasRequiredReactIs_development$8 = 1;
3617
+ function requireReactIs_development$9 () {
3618
+ if (hasRequiredReactIs_development$9) return reactIs_development$9;
3619
+ hasRequiredReactIs_development$9 = 1;
3620
3620
 
3621
3621
 
3622
3622
 
@@ -3757,51 +3757,51 @@ function requireReactIs_development$8 () {
3757
3757
  return typeOf(object) === REACT_SUSPENSE_TYPE;
3758
3758
  }
3759
3759
 
3760
- reactIs_development$8.AsyncMode = AsyncMode;
3761
- reactIs_development$8.ConcurrentMode = ConcurrentMode;
3762
- reactIs_development$8.ContextConsumer = ContextConsumer;
3763
- reactIs_development$8.ContextProvider = ContextProvider;
3764
- reactIs_development$8.Element = Element;
3765
- reactIs_development$8.ForwardRef = ForwardRef;
3766
- reactIs_development$8.Fragment = Fragment;
3767
- reactIs_development$8.Lazy = Lazy;
3768
- reactIs_development$8.Memo = Memo;
3769
- reactIs_development$8.Portal = Portal;
3770
- reactIs_development$8.Profiler = Profiler;
3771
- reactIs_development$8.StrictMode = StrictMode;
3772
- reactIs_development$8.Suspense = Suspense;
3773
- reactIs_development$8.isAsyncMode = isAsyncMode;
3774
- reactIs_development$8.isConcurrentMode = isConcurrentMode;
3775
- reactIs_development$8.isContextConsumer = isContextConsumer;
3776
- reactIs_development$8.isContextProvider = isContextProvider;
3777
- reactIs_development$8.isElement = isElement;
3778
- reactIs_development$8.isForwardRef = isForwardRef;
3779
- reactIs_development$8.isFragment = isFragment;
3780
- reactIs_development$8.isLazy = isLazy;
3781
- reactIs_development$8.isMemo = isMemo;
3782
- reactIs_development$8.isPortal = isPortal;
3783
- reactIs_development$8.isProfiler = isProfiler;
3784
- reactIs_development$8.isStrictMode = isStrictMode;
3785
- reactIs_development$8.isSuspense = isSuspense;
3786
- reactIs_development$8.isValidElementType = isValidElementType;
3787
- reactIs_development$8.typeOf = typeOf;
3760
+ reactIs_development$9.AsyncMode = AsyncMode;
3761
+ reactIs_development$9.ConcurrentMode = ConcurrentMode;
3762
+ reactIs_development$9.ContextConsumer = ContextConsumer;
3763
+ reactIs_development$9.ContextProvider = ContextProvider;
3764
+ reactIs_development$9.Element = Element;
3765
+ reactIs_development$9.ForwardRef = ForwardRef;
3766
+ reactIs_development$9.Fragment = Fragment;
3767
+ reactIs_development$9.Lazy = Lazy;
3768
+ reactIs_development$9.Memo = Memo;
3769
+ reactIs_development$9.Portal = Portal;
3770
+ reactIs_development$9.Profiler = Profiler;
3771
+ reactIs_development$9.StrictMode = StrictMode;
3772
+ reactIs_development$9.Suspense = Suspense;
3773
+ reactIs_development$9.isAsyncMode = isAsyncMode;
3774
+ reactIs_development$9.isConcurrentMode = isConcurrentMode;
3775
+ reactIs_development$9.isContextConsumer = isContextConsumer;
3776
+ reactIs_development$9.isContextProvider = isContextProvider;
3777
+ reactIs_development$9.isElement = isElement;
3778
+ reactIs_development$9.isForwardRef = isForwardRef;
3779
+ reactIs_development$9.isFragment = isFragment;
3780
+ reactIs_development$9.isLazy = isLazy;
3781
+ reactIs_development$9.isMemo = isMemo;
3782
+ reactIs_development$9.isPortal = isPortal;
3783
+ reactIs_development$9.isProfiler = isProfiler;
3784
+ reactIs_development$9.isStrictMode = isStrictMode;
3785
+ reactIs_development$9.isSuspense = isSuspense;
3786
+ reactIs_development$9.isValidElementType = isValidElementType;
3787
+ reactIs_development$9.typeOf = typeOf;
3788
3788
  })();
3789
3789
  }
3790
- return reactIs_development$8;
3790
+ return reactIs_development$9;
3791
3791
  }
3792
3792
 
3793
- var hasRequiredReactIs$8;
3793
+ var hasRequiredReactIs$9;
3794
3794
 
3795
- function requireReactIs$8 () {
3796
- if (hasRequiredReactIs$8) return reactIs$8.exports;
3797
- hasRequiredReactIs$8 = 1;
3795
+ function requireReactIs$9 () {
3796
+ if (hasRequiredReactIs$9) return reactIs$9.exports;
3797
+ hasRequiredReactIs$9 = 1;
3798
3798
 
3799
3799
  if (process.env.NODE_ENV === 'production') {
3800
- reactIs$8.exports = requireReactIs_production_min$8();
3800
+ reactIs$9.exports = requireReactIs_production_min$9();
3801
3801
  } else {
3802
- reactIs$8.exports = requireReactIs_development$8();
3802
+ reactIs$9.exports = requireReactIs_development$9();
3803
3803
  }
3804
- return reactIs$8.exports;
3804
+ return reactIs$9.exports;
3805
3805
  }
3806
3806
 
3807
3807
  /*
@@ -3810,12 +3810,12 @@ object-assign
3810
3810
  @license MIT
3811
3811
  */
3812
3812
 
3813
- var objectAssign$8;
3814
- var hasRequiredObjectAssign$8;
3813
+ var objectAssign$9;
3814
+ var hasRequiredObjectAssign$9;
3815
3815
 
3816
- function requireObjectAssign$8 () {
3817
- if (hasRequiredObjectAssign$8) return objectAssign$8;
3818
- hasRequiredObjectAssign$8 = 1;
3816
+ function requireObjectAssign$9 () {
3817
+ if (hasRequiredObjectAssign$9) return objectAssign$9;
3818
+ hasRequiredObjectAssign$9 = 1;
3819
3819
  /* eslint-disable no-unused-vars */
3820
3820
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
3821
3821
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -3873,7 +3873,7 @@ function requireObjectAssign$8 () {
3873
3873
  }
3874
3874
  }
3875
3875
 
3876
- objectAssign$8 = shouldUseNative() ? Object.assign : function (target, source) {
3876
+ objectAssign$9 = shouldUseNative() ? Object.assign : function (target, source) {
3877
3877
  var from;
3878
3878
  var to = toObject(target);
3879
3879
  var symbols;
@@ -3899,7 +3899,7 @@ function requireObjectAssign$8 () {
3899
3899
 
3900
3900
  return to;
3901
3901
  };
3902
- return objectAssign$8;
3902
+ return objectAssign$9;
3903
3903
  }
3904
3904
 
3905
3905
  /**
@@ -3909,27 +3909,27 @@ function requireObjectAssign$8 () {
3909
3909
  * LICENSE file in the root directory of this source tree.
3910
3910
  */
3911
3911
 
3912
- var ReactPropTypesSecret_1$8;
3913
- var hasRequiredReactPropTypesSecret$8;
3912
+ var ReactPropTypesSecret_1$9;
3913
+ var hasRequiredReactPropTypesSecret$9;
3914
3914
 
3915
- function requireReactPropTypesSecret$8 () {
3916
- if (hasRequiredReactPropTypesSecret$8) return ReactPropTypesSecret_1$8;
3917
- hasRequiredReactPropTypesSecret$8 = 1;
3915
+ function requireReactPropTypesSecret$9 () {
3916
+ if (hasRequiredReactPropTypesSecret$9) return ReactPropTypesSecret_1$9;
3917
+ hasRequiredReactPropTypesSecret$9 = 1;
3918
3918
 
3919
3919
  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
3920
3920
 
3921
- ReactPropTypesSecret_1$8 = ReactPropTypesSecret;
3922
- return ReactPropTypesSecret_1$8;
3921
+ ReactPropTypesSecret_1$9 = ReactPropTypesSecret;
3922
+ return ReactPropTypesSecret_1$9;
3923
3923
  }
3924
3924
 
3925
- var has$8;
3926
- var hasRequiredHas$8;
3925
+ var has$9;
3926
+ var hasRequiredHas$9;
3927
3927
 
3928
- function requireHas$8 () {
3929
- if (hasRequiredHas$8) return has$8;
3930
- hasRequiredHas$8 = 1;
3931
- has$8 = Function.call.bind(Object.prototype.hasOwnProperty);
3932
- return has$8;
3928
+ function requireHas$9 () {
3929
+ if (hasRequiredHas$9) return has$9;
3930
+ hasRequiredHas$9 = 1;
3931
+ has$9 = Function.call.bind(Object.prototype.hasOwnProperty);
3932
+ return has$9;
3933
3933
  }
3934
3934
 
3935
3935
  /**
@@ -3939,19 +3939,19 @@ function requireHas$8 () {
3939
3939
  * LICENSE file in the root directory of this source tree.
3940
3940
  */
3941
3941
 
3942
- var checkPropTypes_1$8;
3943
- var hasRequiredCheckPropTypes$8;
3942
+ var checkPropTypes_1$9;
3943
+ var hasRequiredCheckPropTypes$9;
3944
3944
 
3945
- function requireCheckPropTypes$8 () {
3946
- if (hasRequiredCheckPropTypes$8) return checkPropTypes_1$8;
3947
- hasRequiredCheckPropTypes$8 = 1;
3945
+ function requireCheckPropTypes$9 () {
3946
+ if (hasRequiredCheckPropTypes$9) return checkPropTypes_1$9;
3947
+ hasRequiredCheckPropTypes$9 = 1;
3948
3948
 
3949
3949
  var printWarning = function() {};
3950
3950
 
3951
3951
  if (process.env.NODE_ENV !== 'production') {
3952
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$8();
3952
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$9();
3953
3953
  var loggedTypeFailures = {};
3954
- var has = /*@__PURE__*/ requireHas$8();
3954
+ var has = /*@__PURE__*/ requireHas$9();
3955
3955
 
3956
3956
  printWarning = function(text) {
3957
3957
  var message = 'Warning: ' + text;
@@ -4039,8 +4039,8 @@ function requireCheckPropTypes$8 () {
4039
4039
  }
4040
4040
  };
4041
4041
 
4042
- checkPropTypes_1$8 = checkPropTypes;
4043
- return checkPropTypes_1$8;
4042
+ checkPropTypes_1$9 = checkPropTypes;
4043
+ return checkPropTypes_1$9;
4044
4044
  }
4045
4045
 
4046
4046
  /**
@@ -4050,19 +4050,19 @@ function requireCheckPropTypes$8 () {
4050
4050
  * LICENSE file in the root directory of this source tree.
4051
4051
  */
4052
4052
 
4053
- var factoryWithTypeCheckers$8;
4054
- var hasRequiredFactoryWithTypeCheckers$8;
4053
+ var factoryWithTypeCheckers$9;
4054
+ var hasRequiredFactoryWithTypeCheckers$9;
4055
4055
 
4056
- function requireFactoryWithTypeCheckers$8 () {
4057
- if (hasRequiredFactoryWithTypeCheckers$8) return factoryWithTypeCheckers$8;
4058
- hasRequiredFactoryWithTypeCheckers$8 = 1;
4056
+ function requireFactoryWithTypeCheckers$9 () {
4057
+ if (hasRequiredFactoryWithTypeCheckers$9) return factoryWithTypeCheckers$9;
4058
+ hasRequiredFactoryWithTypeCheckers$9 = 1;
4059
4059
 
4060
- var ReactIs = requireReactIs$8();
4061
- var assign = requireObjectAssign$8();
4060
+ var ReactIs = requireReactIs$9();
4061
+ var assign = requireObjectAssign$9();
4062
4062
 
4063
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$8();
4064
- var has = /*@__PURE__*/ requireHas$8();
4065
- var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$8();
4063
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$9();
4064
+ var has = /*@__PURE__*/ requireHas$9();
4065
+ var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$9();
4066
4066
 
4067
4067
  var printWarning = function() {};
4068
4068
 
@@ -4085,7 +4085,7 @@ function requireFactoryWithTypeCheckers$8 () {
4085
4085
  return null;
4086
4086
  }
4087
4087
 
4088
- factoryWithTypeCheckers$8 = function(isValidElement, throwOnDirectAccess) {
4088
+ factoryWithTypeCheckers$9 = function(isValidElement, throwOnDirectAccess) {
4089
4089
  /* global Symbol */
4090
4090
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4091
4091
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
@@ -4658,7 +4658,7 @@ function requireFactoryWithTypeCheckers$8 () {
4658
4658
 
4659
4659
  return ReactPropTypes;
4660
4660
  };
4661
- return factoryWithTypeCheckers$8;
4661
+ return factoryWithTypeCheckers$9;
4662
4662
  }
4663
4663
 
4664
4664
  /**
@@ -4668,20 +4668,20 @@ function requireFactoryWithTypeCheckers$8 () {
4668
4668
  * LICENSE file in the root directory of this source tree.
4669
4669
  */
4670
4670
 
4671
- var factoryWithThrowingShims$8;
4672
- var hasRequiredFactoryWithThrowingShims$8;
4671
+ var factoryWithThrowingShims$9;
4672
+ var hasRequiredFactoryWithThrowingShims$9;
4673
4673
 
4674
- function requireFactoryWithThrowingShims$8 () {
4675
- if (hasRequiredFactoryWithThrowingShims$8) return factoryWithThrowingShims$8;
4676
- hasRequiredFactoryWithThrowingShims$8 = 1;
4674
+ function requireFactoryWithThrowingShims$9 () {
4675
+ if (hasRequiredFactoryWithThrowingShims$9) return factoryWithThrowingShims$9;
4676
+ hasRequiredFactoryWithThrowingShims$9 = 1;
4677
4677
 
4678
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$8();
4678
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$9();
4679
4679
 
4680
4680
  function emptyFunction() {}
4681
4681
  function emptyFunctionWithReset() {}
4682
4682
  emptyFunctionWithReset.resetWarningCache = emptyFunction;
4683
4683
 
4684
- factoryWithThrowingShims$8 = function() {
4684
+ factoryWithThrowingShims$9 = function() {
4685
4685
  function shim(props, propName, componentName, location, propFullName, secret) {
4686
4686
  if (secret === ReactPropTypesSecret) {
4687
4687
  // It is still safe when called from React.
@@ -4729,7 +4729,7 @@ function requireFactoryWithThrowingShims$8 () {
4729
4729
 
4730
4730
  return ReactPropTypes;
4731
4731
  };
4732
- return factoryWithThrowingShims$8;
4732
+ return factoryWithThrowingShims$9;
4733
4733
  }
4734
4734
 
4735
4735
  /**
@@ -4739,28 +4739,28 @@ function requireFactoryWithThrowingShims$8 () {
4739
4739
  * LICENSE file in the root directory of this source tree.
4740
4740
  */
4741
4741
 
4742
- var hasRequiredPropTypes$8;
4742
+ var hasRequiredPropTypes$9;
4743
4743
 
4744
- function requirePropTypes$8 () {
4745
- if (hasRequiredPropTypes$8) return propTypes$8.exports;
4746
- hasRequiredPropTypes$8 = 1;
4744
+ function requirePropTypes$9 () {
4745
+ if (hasRequiredPropTypes$9) return propTypes$9.exports;
4746
+ hasRequiredPropTypes$9 = 1;
4747
4747
  if (process.env.NODE_ENV !== 'production') {
4748
- var ReactIs = requireReactIs$8();
4748
+ var ReactIs = requireReactIs$9();
4749
4749
 
4750
4750
  // By explicitly using `prop-types` you are opting into new development behavior.
4751
4751
  // http://fb.me/prop-types-in-prod
4752
4752
  var throwOnDirectAccess = true;
4753
- propTypes$8.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$8()(ReactIs.isElement, throwOnDirectAccess);
4753
+ propTypes$9.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$9()(ReactIs.isElement, throwOnDirectAccess);
4754
4754
  } else {
4755
4755
  // By explicitly using `prop-types` you are opting into new production behavior.
4756
4756
  // http://fb.me/prop-types-in-prod
4757
- propTypes$8.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$8()();
4757
+ propTypes$9.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$9()();
4758
4758
  }
4759
- return propTypes$8.exports;
4759
+ return propTypes$9.exports;
4760
4760
  }
4761
4761
 
4762
- var propTypesExports$8 = /*@__PURE__*/ requirePropTypes$8();
4763
- var PropTypes$8 = /*@__PURE__*/getDefaultExportFromCjs$8(propTypesExports$8);
4762
+ var propTypesExports$9 = /*@__PURE__*/ requirePropTypes$9();
4763
+ var PropTypes$9 = /*@__PURE__*/getDefaultExportFromCjs$9(propTypesExports$9);
4764
4764
 
4765
4765
  const SystemOperations = _ref => {
4766
4766
  let {
@@ -4778,7 +4778,7 @@ const SystemOperations = _ref => {
4778
4778
  cancelText = "system.button.cancel",
4779
4779
  okText = "system.button.confirm"
4780
4780
  } = _ref;
4781
- const intl = useIntl$1();
4781
+ const intl = useIntl();
4782
4782
  const {
4783
4783
  modal
4784
4784
  } = App.useApp();
@@ -4872,15 +4872,15 @@ const SystemOperations = _ref => {
4872
4872
  });
4873
4873
  };
4874
4874
  SystemOperations.propTypes = {
4875
- onPowerOff: PropTypes$8.func,
4876
- onRestart: PropTypes$8.func,
4877
- powerOffLabel: PropTypes$8.string,
4878
- restartLabel: PropTypes$8.string,
4879
- iconClassName: PropTypes$8.string,
4880
- confirmTitle: PropTypes$8.string,
4881
- cancelText: PropTypes$8.string,
4882
- okText: PropTypes$8.string,
4883
- run: PropTypes$8.func
4875
+ onPowerOff: PropTypes$9.func,
4876
+ onRestart: PropTypes$9.func,
4877
+ powerOffLabel: PropTypes$9.string,
4878
+ restartLabel: PropTypes$9.string,
4879
+ iconClassName: PropTypes$9.string,
4880
+ confirmTitle: PropTypes$9.string,
4881
+ cancelText: PropTypes$9.string,
4882
+ okText: PropTypes$9.string,
4883
+ run: PropTypes$9.func
4884
4884
  };
4885
4885
  var SystemOperations$1 = SystemOperations;
4886
4886
 
@@ -4923,10 +4923,10 @@ const useSpaLogo = function () {
4923
4923
  }, "logo")];
4924
4924
  };
4925
4925
  useSpaLogo.propTypes = {
4926
- logoUrl: PropTypes$8.string,
4927
- logoWidth: PropTypes$8.number,
4928
- logoAlt: PropTypes$8.string,
4929
- onClick: PropTypes$8.func
4926
+ logoUrl: PropTypes$9.string,
4927
+ logoWidth: PropTypes$9.number,
4928
+ logoAlt: PropTypes$9.string,
4929
+ onClick: PropTypes$9.func
4930
4930
  };
4931
4931
  var useSpaLogo$1 = useSpaLogo;
4932
4932
 
@@ -5013,7 +5013,7 @@ const CommonHeader = _ref => {
5013
5013
  var CommonHeader$1 = CommonHeader;
5014
5014
 
5015
5015
  const LSMLabelField = props => {
5016
- const intl = useIntl$1();
5016
+ const intl = useIntl();
5017
5017
  const [lsmList, setLsmList] = useState([]);
5018
5018
  const {
5019
5019
  label = "lsm.label",
@@ -5039,12 +5039,12 @@ const LSMLabelField = props => {
5039
5039
  };
5040
5040
  loadLsmData();
5041
5041
  }, [fetchLsmData]);
5042
- return /*#__PURE__*/jsx(Form.Item, _objectSpread2(_objectSpread2({
5042
+ return /*#__PURE__*/jsx(Form.Item, _objectSpread2$2(_objectSpread2$2({
5043
5043
  label: typeof label === 'string' && label.includes('.') ? intl.formatMessage({
5044
5044
  id: label
5045
5045
  }) : label
5046
5046
  }, formItemProps), {}, {
5047
- children: /*#__PURE__*/jsx(Select, _objectSpread2(_objectSpread2(_objectSpread2({}, field), selectProps), {}, {
5047
+ children: /*#__PURE__*/jsx(Select, _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, field), selectProps), {}, {
5048
5048
  options: lsmList,
5049
5049
  fieldNames: fieldNames,
5050
5050
  allowClear: true,
@@ -5062,15 +5062,15 @@ const LSMLabelField = props => {
5062
5062
  };
5063
5063
  var LSMLabelField$1 = /*#__PURE__*/memo(LSMLabelField);
5064
5064
 
5065
- function _defineProperty$1(e,r,t){return (r=_toPropertyKey$1(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread2$1(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1(Object(t),!0).forEach(function(r){_defineProperty$1(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys$1(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _objectWithoutProperties$1(e,t){if(null==e)return {};var o,r,i=_objectWithoutPropertiesLoose$1(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose$1(r,e){if(null==r)return {};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}function _toPrimitive$1(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string"===r?String:Number)(t);}function _toPropertyKey$1(t){var i=_toPrimitive$1(t,"string");return "symbol"==typeof i?i:i+"";}/**
5065
+ function _defineProperty(e,r,t){return (r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _objectWithoutProperties(e,t){if(null==e)return {};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return {};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string"===r?String:Number)(t);}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return "symbol"==typeof i?i:i+"";}/**
5066
5066
  * 国际化调试工具
5067
5067
  * 在浏览器控制台运行 window.debugI18n() 查看当前国际化状态
5068
- */const debugI18n=()=>{var _window$g_initialProp,_window$g_initialProp2,_window$g_initialProp3,_window$g_initialProp4,_window$g_initialProp5,_window$g_initialProp6;if(typeof window==='undefined'){console.log('[i18n debug] Not in browser environment');return;}console.group('🌍 I18n Debug Information');// 1. 当前语言环境
5068
+ */const debugI18n$1=()=>{var _window$g_initialProp,_window$g_initialProp2,_window$g_initialProp3,_window$g_initialProp4,_window$g_initialProp5,_window$g_initialProp6;if(typeof window==='undefined'){console.log('[i18n debug] Not in browser environment');return;}console.group('🌍 I18n Debug Information');// 1. 当前语言环境
5069
5069
  console.log('📍 Current Locale Sources:');console.log(' - window.g_initialProps?.locale:',(_window$g_initialProp=window.g_initialProps)===null||_window$g_initialProp===void 0?void 0:_window$g_initialProp.locale);console.log(' - window.g_initialProps?.___g_initialPropsFromServer?.locale:',(_window$g_initialProp2=window.g_initialProps)===null||_window$g_initialProp2===void 0||(_window$g_initialProp2=_window$g_initialProp2.___g_initialPropsFromServer)===null||_window$g_initialProp2===void 0?void 0:_window$g_initialProp2.locale);try{console.log(' - localStorage.umi-locale:',localStorage.getItem('umi-locale'));}catch(e){console.log(' - localStorage: not available');}console.log(' - window.__COMPONENT_LOCALE__:',window.__COMPONENT_LOCALE__);// 2. 语言包
5070
5070
  console.log('\n📦 Available Message Sources:');console.log(' - window.__COMPONENT_I18N_MESSAGES__:',window.__COMPONENT_I18N_MESSAGES__);console.log(' - window.__PROJECT_I18N_MESSAGES__:',window.__PROJECT_I18N_MESSAGES__);console.log(' - window.g_initialProps?.messages:',(_window$g_initialProp3=window.g_initialProps)===null||_window$g_initialProp3===void 0?void 0:_window$g_initialProp3.messages);// 3. 合并后的语言包
5071
- const componentMessages=window.__COMPONENT_I18N_MESSAGES__||{};const projectMessages=window.__PROJECT_I18N_MESSAGES__||{};const umiMessages=((_window$g_initialProp4=window.g_initialProps)===null||_window$g_initialProp4===void 0?void 0:_window$g_initialProp4.messages)||{};const allLocales=new Set([...Object.keys(componentMessages),...Object.keys(projectMessages),...Object.keys(umiMessages)]);console.log('\n🔧 Merged Locales:',Array.from(allLocales));allLocales.forEach(locale=>{const merged=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});console.log("\n \uD83D\uDCC4 ".concat(locale," (").concat(Object.keys(merged).length," keys):"),merged);});// 4. 测试几个关键的 key
5072
- console.log('\n🧪 Test Translation:');const testKeys=['networkSettings.title','button.ok','button.cancel','button.apply','button.close'];const currentLocale=((_window$g_initialProp5=window.g_initialProps)===null||_window$g_initialProp5===void 0?void 0:_window$g_initialProp5.locale)||((_window$g_initialProp6=window.g_initialProps)===null||_window$g_initialProp6===void 0||(_window$g_initialProp6=_window$g_initialProp6.___g_initialPropsFromServer)===null||_window$g_initialProp6===void 0?void 0:_window$g_initialProp6.locale)||localStorage.getItem('umi-locale')||'zh-CN';const allMessages={};allLocales.forEach(locale=>{allMessages[locale]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});});testKeys.forEach(key=>{var _allMessages$currentL,_allMessages$enUS;const translation=((_allMessages$currentL=allMessages[currentLocale])===null||_allMessages$currentL===void 0?void 0:_allMessages$currentL[key])||((_allMessages$enUS=allMessages['en-US'])===null||_allMessages$enUS===void 0?void 0:_allMessages$enUS[key])||'❌ NOT FOUND';console.log(" - ".concat(key,": ").concat(translation));});console.groupEnd();};// 自动在开发环境注册到 window
5073
- if(process.env.NODE_ENV==='development'&&typeof window!=='undefined'){window.debugI18n=debugI18n;console.log('💡 I18n debug tool available. Run window.debugI18n() in console to check i18n status.');}/**
5071
+ const componentMessages=window.__COMPONENT_I18N_MESSAGES__||{};const projectMessages=window.__PROJECT_I18N_MESSAGES__||{};const umiMessages=((_window$g_initialProp4=window.g_initialProps)===null||_window$g_initialProp4===void 0?void 0:_window$g_initialProp4.messages)||{};const allLocales=new Set([...Object.keys(componentMessages),...Object.keys(projectMessages),...Object.keys(umiMessages)]);console.log('\n🔧 Merged Locales:',Array.from(allLocales));allLocales.forEach(locale=>{const merged=_objectSpread2(_objectSpread2(_objectSpread2({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});console.log("\n \uD83D\uDCC4 ".concat(locale," (").concat(Object.keys(merged).length," keys):"),merged);});// 4. 测试几个关键的 key
5072
+ console.log('\n🧪 Test Translation:');const testKeys=['networkSettings.title','button.ok','button.cancel','button.apply','button.close'];const currentLocale=((_window$g_initialProp5=window.g_initialProps)===null||_window$g_initialProp5===void 0?void 0:_window$g_initialProp5.locale)||((_window$g_initialProp6=window.g_initialProps)===null||_window$g_initialProp6===void 0||(_window$g_initialProp6=_window$g_initialProp6.___g_initialPropsFromServer)===null||_window$g_initialProp6===void 0?void 0:_window$g_initialProp6.locale)||localStorage.getItem('umi-locale')||'zh-CN';const allMessages={};allLocales.forEach(locale=>{allMessages[locale]=_objectSpread2(_objectSpread2(_objectSpread2({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});});testKeys.forEach(key=>{var _allMessages$currentL,_allMessages$enUS;const translation=((_allMessages$currentL=allMessages[currentLocale])===null||_allMessages$currentL===void 0?void 0:_allMessages$currentL[key])||((_allMessages$enUS=allMessages['en-US'])===null||_allMessages$enUS===void 0?void 0:_allMessages$enUS[key])||'❌ NOT FOUND';console.log(" - ".concat(key,": ").concat(translation));});console.groupEnd();};// 自动在开发环境注册到 window
5073
+ if(process.env.NODE_ENV==='development'&&typeof window!=='undefined'){window.debugI18n=debugI18n$1;console.log('💡 I18n debug tool available. Run window.debugI18n() in console to check i18n status.');}/**
5074
5074
  * seeder-st2110-components 组件库国际化 Hook
5075
5075
  *
5076
5076
  * 设计目标:
@@ -5081,7 +5081,7 @@ if(process.env.NODE_ENV==='development'&&typeof window!=='undefined'){window.deb
5081
5081
  *//**
5082
5082
  * 获取当前语言环境
5083
5083
  * 优先从 Umi 全局变量读取,其次使用默认值
5084
- */const getLocale=()=>{// 尝试从 Umi 获取语言设置
5084
+ */const getLocale$1=()=>{// 尝试从 Umi 获取语言设置
5085
5085
  if(typeof window!=='undefined'){var _window$g_initialProp,_window$g_initialProp2,_window$g_initialProp3;// 方式 1:Umi 的运行时语言(通过 umi 的 locale 服务)
5086
5086
  // Umi 会在 window.g_lang 或 window.LOCALE 中存储当前语言
5087
5087
  if(window.g_lang){return window.g_lang;}if(window.LOCALE){return window.LOCALE;}// 方式 2:Umi 的 g_initialProps
@@ -5094,18 +5094,18 @@ if(window.__COMPONENT_LOCALE__){return window.__COMPONENT_LOCALE__;}}// 默认
5094
5094
  return 'en-US';};/**
5095
5095
  * 获取语言包
5096
5096
  * 优先从主项目读取,其次使用组件库自带的语言包
5097
- */const getMessages=()=>{if(typeof window!=='undefined'){var _window$g_initialProp4;// 尝试从多个来源读取语言包
5097
+ */const getMessages$1=()=>{if(typeof window!=='undefined'){var _window$g_initialProp4;// 尝试从多个来源读取语言包
5098
5098
  const messages={};// 1. 组件库注册的语言包
5099
5099
  const componentMessages=window.__COMPONENT_I18N_MESSAGES__||{};// 2. 主项目的语言包
5100
5100
  const projectMessages=window.__PROJECT_I18N_MESSAGES__||{};// 3. Umi 的语言包
5101
5101
  const umiMessages=((_window$g_initialProp4=window.g_initialProps)===null||_window$g_initialProp4===void 0?void 0:_window$g_initialProp4.messages)||{};// 合并语言包(组件库的优先级最高,其次是主项目,最后是 Umi)
5102
- const allLocales=new Set([...Object.keys(componentMessages),...Object.keys(projectMessages),...Object.keys(umiMessages)]);allLocales.forEach(locale=>{messages[locale]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});});return messages;}return {};};/**
5102
+ const allLocales=new Set([...Object.keys(componentMessages),...Object.keys(projectMessages),...Object.keys(umiMessages)]);allLocales.forEach(locale=>{messages[locale]=_objectSpread2(_objectSpread2(_objectSpread2({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});});return messages;}return {};};/**
5103
5103
  * 格式化消息
5104
5104
  * @param {string} id - 国际化 key
5105
5105
  * @param {object} values - 变量替换值
5106
5106
  * @param {string} locale - 语言环境
5107
5107
  * @param {object} messages - 语言包
5108
- */const formatMessage=function(_ref){var _messages$locale,_messages$enUS;let{id}=_ref;let values=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let locale=arguments.length>2?arguments[2]:undefined;let messages=arguments.length>3?arguments[3]:undefined;const message=((_messages$locale=messages[locale])===null||_messages$locale===void 0?void 0:_messages$locale[id])||((_messages$enUS=messages['en-US'])===null||_messages$enUS===void 0?void 0:_messages$enUS[id])||id;// 支持变量替换 {min}, {max}, {value} 等
5108
+ */const formatMessage$1=function(_ref){var _messages$locale,_messages$enUS;let{id}=_ref;let values=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let locale=arguments.length>2?arguments[2]:undefined;let messages=arguments.length>3?arguments[3]:undefined;const message=((_messages$locale=messages[locale])===null||_messages$locale===void 0?void 0:_messages$locale[id])||((_messages$enUS=messages['en-US'])===null||_messages$enUS===void 0?void 0:_messages$enUS[id])||id;// 支持变量替换 {min}, {max}, {value} 等
5109
5109
  return message.replace(/\{(\w+)\}/g,(match,key)=>{return values[key]!==undefined?values[key]:match;});};/**
5110
5110
  * 国际化 Hook
5111
5111
  *
@@ -5119,11 +5119,206 @@ return message.replace(/\{(\w+)\}/g,(match,key)=>{return values[key]!==undefined
5119
5119
  * const intl = useIntl();
5120
5120
  * const title = intl.formatMessage({ id: 'networkSettings.title' });
5121
5121
  * const message = intl.formatMessage({ id: 'validation.minLength' }, { min: 3 });
5122
- */const useIntl=()=>{const locale=getLocale();const messages=getMessages();const formatMessageFn=function(_ref2){let{id}=_ref2;let values=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return formatMessage({id},values,locale,messages);};return {locale,formatMessage:formatMessageFn,messages};};const _excluded$4=["width","okText","cancelText","styles"];const StyledModal$2=props=>{const intl=useIntl();const{width="520px",okText="button.apply",cancelText="button.close",styles:propStyles={}}=props,restProps=_objectWithoutProperties$1(props,_excluded$4);// 处理国际化文本
5122
+ */const useIntl$1=()=>{const locale=getLocale$1();const messages=getMessages$1();const formatMessageFn=function(_ref2){let{id}=_ref2;let values=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return formatMessage$1({id},values,locale,messages);};return {locale,formatMessage:formatMessageFn,messages};};const _excluded$3=["width","okText","cancelText","styles"];const StyledModal=props=>{const intl=useIntl$1();const{width="520px",okText="button.apply",cancelText="button.close",styles:propStyles={}}=props,restProps=_objectWithoutProperties(props,_excluded$3);// 处理国际化文本
5123
5123
  const okButtonText=typeof okText==='string'&&okText.includes('.')?intl.formatMessage({id:okText}):okText;const cancelButtonText=typeof cancelText==='string'&&cancelText.includes('.')?intl.formatMessage({id:cancelText}):cancelText;// 基础样式配置
5124
5124
  const baseStyles={content:{padding:0// background: "#282828"
5125
5125
  },header:{marginBottom:0,padding:0,paddingBlock:16,paddingInlineStart:24,background:"#000000"},body:{paddingBlock:20,paddingInline:24},footer:{marginTop:0,padding:0,paddingBlockEnd:20,paddingInline:24}};// 合并样式
5126
- const styles=_objectSpread2$1(_objectSpread2$1({},baseStyles),propStyles);return/*#__PURE__*/jsx(Modal,_objectSpread2$1({width:width,okText:okButtonText,cancelText:cancelButtonText,styles:styles},restProps));};var StyledModal$3=StyledModal$2;function getDefaultExportFromCjs$7(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,'default')?x['default']:x;}var propTypes$7={exports:{}};var reactIs$7={exports:{}};var reactIs_production_min$7={};/** @license React v16.13.1
5126
+ const styles=_objectSpread2(_objectSpread2({},baseStyles),propStyles);return/*#__PURE__*/jsx(Modal,_objectSpread2({width:width,okText:okButtonText,cancelText:cancelButtonText,styles:styles},restProps));};var StyledModal$1=StyledModal;function getDefaultExportFromCjs$8(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,'default')?x['default']:x;}var propTypes$8={exports:{}};var reactIs$8={exports:{}};var reactIs_production_min$8={};/** @license React v16.13.1
5127
+ * react-is.production.min.js
5128
+ *
5129
+ * Copyright (c) Facebook, Inc. and its affiliates.
5130
+ *
5131
+ * This source code is licensed under the MIT license found in the
5132
+ * LICENSE file in the root directory of this source tree.
5133
+ */var hasRequiredReactIs_production_min$8;function requireReactIs_production_min$8(){if(hasRequiredReactIs_production_min$8)return reactIs_production_min$8;hasRequiredReactIs_production_min$8=1;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?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;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$8.AsyncMode=l;reactIs_production_min$8.ConcurrentMode=m;reactIs_production_min$8.ContextConsumer=k;reactIs_production_min$8.ContextProvider=h;reactIs_production_min$8.Element=c;reactIs_production_min$8.ForwardRef=n;reactIs_production_min$8.Fragment=e;reactIs_production_min$8.Lazy=t;reactIs_production_min$8.Memo=r;reactIs_production_min$8.Portal=d;reactIs_production_min$8.Profiler=g;reactIs_production_min$8.StrictMode=f;reactIs_production_min$8.Suspense=p;reactIs_production_min$8.isAsyncMode=function(a){return A(a)||z(a)===l;};reactIs_production_min$8.isConcurrentMode=A;reactIs_production_min$8.isContextConsumer=function(a){return z(a)===k;};reactIs_production_min$8.isContextProvider=function(a){return z(a)===h;};reactIs_production_min$8.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c;};reactIs_production_min$8.isForwardRef=function(a){return z(a)===n;};reactIs_production_min$8.isFragment=function(a){return z(a)===e;};reactIs_production_min$8.isLazy=function(a){return z(a)===t;};reactIs_production_min$8.isMemo=function(a){return z(a)===r;};reactIs_production_min$8.isPortal=function(a){return z(a)===d;};reactIs_production_min$8.isProfiler=function(a){return z(a)===g;};reactIs_production_min$8.isStrictMode=function(a){return z(a)===f;};reactIs_production_min$8.isSuspense=function(a){return z(a)===p;};reactIs_production_min$8.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$8.typeOf=z;return reactIs_production_min$8;}var reactIs_development$8={};/** @license React v16.13.1
5134
+ * react-is.development.js
5135
+ *
5136
+ * Copyright (c) Facebook, Inc. and its affiliates.
5137
+ *
5138
+ * This source code is licensed under the MIT license found in the
5139
+ * LICENSE file in the root directory of this source tree.
5140
+ */var hasRequiredReactIs_development$8;function requireReactIs_development$8(){if(hasRequiredReactIs_development$8)return reactIs_development$8;hasRequiredReactIs_development$8=1;if(process.env.NODE_ENV!=="production"){(function(){// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
5141
+ // nor polyfill, then a plain number is used for performance.
5142
+ var hasSymbol=typeof Symbol==='function'&&Symbol.for;var REACT_ELEMENT_TYPE=hasSymbol?Symbol.for('react.element'):0xeac7;var REACT_PORTAL_TYPE=hasSymbol?Symbol.for('react.portal'):0xeaca;var REACT_FRAGMENT_TYPE=hasSymbol?Symbol.for('react.fragment'):0xeacb;var REACT_STRICT_MODE_TYPE=hasSymbol?Symbol.for('react.strict_mode'):0xeacc;var REACT_PROFILER_TYPE=hasSymbol?Symbol.for('react.profiler'):0xead2;var REACT_PROVIDER_TYPE=hasSymbol?Symbol.for('react.provider'):0xeacd;var REACT_CONTEXT_TYPE=hasSymbol?Symbol.for('react.context'):0xeace;// TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
5143
+ // (unstable) APIs that have been removed. Can we remove the symbols?
5144
+ var REACT_ASYNC_MODE_TYPE=hasSymbol?Symbol.for('react.async_mode'):0xeacf;var REACT_CONCURRENT_MODE_TYPE=hasSymbol?Symbol.for('react.concurrent_mode'):0xeacf;var REACT_FORWARD_REF_TYPE=hasSymbol?Symbol.for('react.forward_ref'):0xead0;var REACT_SUSPENSE_TYPE=hasSymbol?Symbol.for('react.suspense'):0xead1;var REACT_SUSPENSE_LIST_TYPE=hasSymbol?Symbol.for('react.suspense_list'):0xead8;var REACT_MEMO_TYPE=hasSymbol?Symbol.for('react.memo'):0xead3;var REACT_LAZY_TYPE=hasSymbol?Symbol.for('react.lazy'):0xead4;var REACT_BLOCK_TYPE=hasSymbol?Symbol.for('react.block'):0xead9;var REACT_FUNDAMENTAL_TYPE=hasSymbol?Symbol.for('react.fundamental'):0xead5;var REACT_RESPONDER_TYPE=hasSymbol?Symbol.for('react.responder'):0xead6;var REACT_SCOPE_TYPE=hasSymbol?Symbol.for('react.scope'):0xead7;function isValidElementType(type){return typeof type==='string'||typeof type==='function'||// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
5145
+ 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);}function typeOf(object){if(typeof object==='object'&&object!==null){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:var type=object.type;switch(type){case REACT_ASYNC_MODE_TYPE:case REACT_CONCURRENT_MODE_TYPE:case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:return type;default:var $$typeofType=type&&type.$$typeof;switch($$typeofType){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_PROVIDER_TYPE:return $$typeofType;default:return $$typeof;}}case REACT_PORTAL_TYPE:return $$typeof;}}return undefined;}// AsyncMode is deprecated along with isAsyncMode
5146
+ var AsyncMode=REACT_ASYNC_MODE_TYPE;var ConcurrentMode=REACT_CONCURRENT_MODE_TYPE;var ContextConsumer=REACT_CONTEXT_TYPE;var ContextProvider=REACT_PROVIDER_TYPE;var Element=REACT_ELEMENT_TYPE;var ForwardRef=REACT_FORWARD_REF_TYPE;var Fragment=REACT_FRAGMENT_TYPE;var Lazy=REACT_LAZY_TYPE;var Memo=REACT_MEMO_TYPE;var Portal=REACT_PORTAL_TYPE;var Profiler=REACT_PROFILER_TYPE;var StrictMode=REACT_STRICT_MODE_TYPE;var Suspense=REACT_SUSPENSE_TYPE;var hasWarnedAboutDeprecatedIsAsyncMode=false;// AsyncMode should be deprecated
5147
+ function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;// Using console['warn'] to evade Babel and ESLint
5148
+ 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.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}function isConcurrentMode(object){return typeOf(object)===REACT_CONCURRENT_MODE_TYPE;}function isContextConsumer(object){return typeOf(object)===REACT_CONTEXT_TYPE;}function isContextProvider(object){return typeOf(object)===REACT_PROVIDER_TYPE;}function isElement(object){return typeof object==='object'&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE;}function isForwardRef(object){return typeOf(object)===REACT_FORWARD_REF_TYPE;}function isFragment(object){return typeOf(object)===REACT_FRAGMENT_TYPE;}function isLazy(object){return typeOf(object)===REACT_LAZY_TYPE;}function isMemo(object){return typeOf(object)===REACT_MEMO_TYPE;}function isPortal(object){return typeOf(object)===REACT_PORTAL_TYPE;}function isProfiler(object){return typeOf(object)===REACT_PROFILER_TYPE;}function isStrictMode(object){return typeOf(object)===REACT_STRICT_MODE_TYPE;}function isSuspense(object){return typeOf(object)===REACT_SUSPENSE_TYPE;}reactIs_development$8.AsyncMode=AsyncMode;reactIs_development$8.ConcurrentMode=ConcurrentMode;reactIs_development$8.ContextConsumer=ContextConsumer;reactIs_development$8.ContextProvider=ContextProvider;reactIs_development$8.Element=Element;reactIs_development$8.ForwardRef=ForwardRef;reactIs_development$8.Fragment=Fragment;reactIs_development$8.Lazy=Lazy;reactIs_development$8.Memo=Memo;reactIs_development$8.Portal=Portal;reactIs_development$8.Profiler=Profiler;reactIs_development$8.StrictMode=StrictMode;reactIs_development$8.Suspense=Suspense;reactIs_development$8.isAsyncMode=isAsyncMode;reactIs_development$8.isConcurrentMode=isConcurrentMode;reactIs_development$8.isContextConsumer=isContextConsumer;reactIs_development$8.isContextProvider=isContextProvider;reactIs_development$8.isElement=isElement;reactIs_development$8.isForwardRef=isForwardRef;reactIs_development$8.isFragment=isFragment;reactIs_development$8.isLazy=isLazy;reactIs_development$8.isMemo=isMemo;reactIs_development$8.isPortal=isPortal;reactIs_development$8.isProfiler=isProfiler;reactIs_development$8.isStrictMode=isStrictMode;reactIs_development$8.isSuspense=isSuspense;reactIs_development$8.isValidElementType=isValidElementType;reactIs_development$8.typeOf=typeOf;})();}return reactIs_development$8;}var hasRequiredReactIs$8;function requireReactIs$8(){if(hasRequiredReactIs$8)return reactIs$8.exports;hasRequiredReactIs$8=1;if(process.env.NODE_ENV==='production'){reactIs$8.exports=requireReactIs_production_min$8();}else {reactIs$8.exports=requireReactIs_development$8();}return reactIs$8.exports;}/*
5149
+ object-assign
5150
+ (c) Sindre Sorhus
5151
+ @license MIT
5152
+ */var objectAssign$8;var hasRequiredObjectAssign$8;function requireObjectAssign$8(){if(hasRequiredObjectAssign$8)return objectAssign$8;hasRequiredObjectAssign$8=1;/* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function shouldUseNative(){try{if(!Object.assign){return false;}// Detect buggy property enumeration order in older V8 versions.
5153
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
5154
+ var test1=new String('abc');// eslint-disable-line no-new-wrappers
5155
+ test1[5]='de';if(Object.getOwnPropertyNames(test1)[0]==='5'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056
5156
+ var test2={};for(var i=0;i<10;i++){test2['_'+String.fromCharCode(i)]=i;}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n];});if(order2.join('')!=='0123456789'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056
5157
+ var test3={};'abcdefghijklmnopqrst'.split('').forEach(function(letter){test3[letter]=letter;});if(Object.keys(Object.assign({},test3)).join('')!=='abcdefghijklmnopqrst'){return false;}return true;}catch(err){// We don't expect any of the above to throw, but better to be safe.
5158
+ return false;}}objectAssign$8=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s<arguments.length;s++){from=Object(arguments[s]);for(var key in from){if(hasOwnProperty.call(from,key)){to[key]=from[key];}}if(getOwnPropertySymbols){symbols=getOwnPropertySymbols(from);for(var i=0;i<symbols.length;i++){if(propIsEnumerable.call(from,symbols[i])){to[symbols[i]]=from[symbols[i]];}}}}return to;};return objectAssign$8;}/**
5159
+ * Copyright (c) 2013-present, Facebook, Inc.
5160
+ *
5161
+ * This source code is licensed under the MIT license found in the
5162
+ * LICENSE file in the root directory of this source tree.
5163
+ */var ReactPropTypesSecret_1$8;var hasRequiredReactPropTypesSecret$8;function requireReactPropTypesSecret$8(){if(hasRequiredReactPropTypesSecret$8)return ReactPropTypesSecret_1$8;hasRequiredReactPropTypesSecret$8=1;var ReactPropTypesSecret='SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';ReactPropTypesSecret_1$8=ReactPropTypesSecret;return ReactPropTypesSecret_1$8;}var has$8;var hasRequiredHas$8;function requireHas$8(){if(hasRequiredHas$8)return has$8;hasRequiredHas$8=1;has$8=Function.call.bind(Object.prototype.hasOwnProperty);return has$8;}/**
5164
+ * Copyright (c) 2013-present, Facebook, Inc.
5165
+ *
5166
+ * This source code is licensed under the MIT license found in the
5167
+ * LICENSE file in the root directory of this source tree.
5168
+ */var checkPropTypes_1$8;var hasRequiredCheckPropTypes$8;function requireCheckPropTypes$8(){if(hasRequiredCheckPropTypes$8)return checkPropTypes_1$8;hasRequiredCheckPropTypes$8=1;var printWarning=function(){};if(process.env.NODE_ENV!=='production'){var ReactPropTypesSecret=/*@__PURE__*/requireReactPropTypesSecret$8();var loggedTypeFailures={};var has=/*@__PURE__*/requireHas$8();printWarning=function(text){var message='Warning: '+text;if(typeof console!=='undefined'){console.error(message);}try{// --- Welcome to debugging React ---
5169
+ // This error was thrown as a convenience so that you can use this stack
5170
+ // to find the callsite that caused this warning to fire.
5171
+ throw new Error(message);}catch(x){/**/}};}/**
5172
+ * Assert that the values match with the type specs.
5173
+ * Error messages are memorized and will only be shown once.
5174
+ *
5175
+ * @param {object} typeSpecs Map of name to a ReactPropType
5176
+ * @param {object} values Runtime values that need to be type-checked
5177
+ * @param {string} location e.g. "prop", "context", "child context"
5178
+ * @param {string} componentName Name of the component for error messages.
5179
+ * @param {?Function} getStack Returns the component stack.
5180
+ * @private
5181
+ */function checkPropTypes(typeSpecs,values,location,componentName,getStack){if(process.env.NODE_ENV!=='production'){for(var typeSpecName in typeSpecs){if(has(typeSpecs,typeSpecName)){var error;// Prop type validation may throw. In case they do, we don't want to
5182
+ // fail the render phase where it didn't fail before. So we log it.
5183
+ // After these have been cleaned up, we'll let them throw.
5184
+ try{// This is intentionally an invariant that gets caught. It's the same
5185
+ // behavior as without this statement except with a better message.
5186
+ if(typeof typeSpecs[typeSpecName]!=='function'){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`.');err.name='Invariant Violation';throw err;}error=typeSpecs[typeSpecName](values,typeSpecName,componentName,location,null,ReactPropTypesSecret);}catch(ex){error=ex;}if(error&&!(error instanceof Error)){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).');}if(error instanceof Error&&!(error.message in loggedTypeFailures)){// Only monitor this failure once because there tends to be a lot of the
5187
+ // same error.
5188
+ loggedTypeFailures[error.message]=true;var stack=getStack?getStack():'';printWarning('Failed '+location+' type: '+error.message+(stack!=null?stack:''));}}}}}/**
5189
+ * Resets warning cache when testing.
5190
+ *
5191
+ * @private
5192
+ */checkPropTypes.resetWarningCache=function(){if(process.env.NODE_ENV!=='production'){loggedTypeFailures={};}};checkPropTypes_1$8=checkPropTypes;return checkPropTypes_1$8;}/**
5193
+ * Copyright (c) 2013-present, Facebook, Inc.
5194
+ *
5195
+ * This source code is licensed under the MIT license found in the
5196
+ * LICENSE file in the root directory of this source tree.
5197
+ */var factoryWithTypeCheckers$8;var hasRequiredFactoryWithTypeCheckers$8;function requireFactoryWithTypeCheckers$8(){if(hasRequiredFactoryWithTypeCheckers$8)return factoryWithTypeCheckers$8;hasRequiredFactoryWithTypeCheckers$8=1;var ReactIs=requireReactIs$8();var assign=requireObjectAssign$8();var ReactPropTypesSecret=/*@__PURE__*/requireReactPropTypesSecret$8();var has=/*@__PURE__*/requireHas$8();var checkPropTypes=/*@__PURE__*/requireCheckPropTypes$8();var printWarning=function(){};if(process.env.NODE_ENV!=='production'){printWarning=function(text){var message='Warning: '+text;if(typeof console!=='undefined'){console.error(message);}try{// --- Welcome to debugging React ---
5198
+ // This error was thrown as a convenience so that you can use this stack
5199
+ // to find the callsite that caused this warning to fire.
5200
+ throw new Error(message);}catch(x){}};}function emptyFunctionThatReturnsNull(){return null;}factoryWithTypeCheckers$8=function(isValidElement,throwOnDirectAccess){/* global Symbol */var ITERATOR_SYMBOL=typeof Symbol==='function'&&Symbol.iterator;var FAUX_ITERATOR_SYMBOL='@@iterator';// Before Symbol spec.
5201
+ /**
5202
+ * Returns the iterator method function contained on the iterable object.
5203
+ *
5204
+ * Be sure to invoke the function with the iterable as context:
5205
+ *
5206
+ * var iteratorFn = getIteratorFn(myIterable);
5207
+ * if (iteratorFn) {
5208
+ * var iterator = iteratorFn.call(myIterable);
5209
+ * ...
5210
+ * }
5211
+ *
5212
+ * @param {?object} maybeIterable
5213
+ * @return {?function}
5214
+ */function getIteratorFn(maybeIterable){var iteratorFn=maybeIterable&&(ITERATOR_SYMBOL&&maybeIterable[ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL]);if(typeof iteratorFn==='function'){return iteratorFn;}}/**
5215
+ * Collection of methods that allow declaration and validation of props that are
5216
+ * supplied to React components. Example usage:
5217
+ *
5218
+ * var Props = require('ReactPropTypes');
5219
+ * var MyArticle = React.createClass({
5220
+ * propTypes: {
5221
+ * // An optional string prop named "description".
5222
+ * description: Props.string,
5223
+ *
5224
+ * // A required enum prop named "category".
5225
+ * category: Props.oneOf(['News','Photos']).isRequired,
5226
+ *
5227
+ * // A prop named "dialog" that requires an instance of Dialog.
5228
+ * dialog: Props.instanceOf(Dialog).isRequired
5229
+ * },
5230
+ * render: function() { ... }
5231
+ * });
5232
+ *
5233
+ * A more formal specification of how these methods are used:
5234
+ *
5235
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
5236
+ * decl := ReactPropTypes.{type}(.isRequired)?
5237
+ *
5238
+ * Each and every declaration produces a function with the same signature. This
5239
+ * allows the creation of custom validation functions. For example:
5240
+ *
5241
+ * var MyLink = React.createClass({
5242
+ * propTypes: {
5243
+ * // An optional string or URI prop named "href".
5244
+ * href: function(props, propName, componentName) {
5245
+ * var propValue = props[propName];
5246
+ * if (propValue != null && typeof propValue !== 'string' &&
5247
+ * !(propValue instanceof URI)) {
5248
+ * return new Error(
5249
+ * 'Expected a string or an URI for ' + propName + ' in ' +
5250
+ * componentName
5251
+ * );
5252
+ * }
5253
+ * }
5254
+ * },
5255
+ * render: function() {...}
5256
+ * });
5257
+ *
5258
+ * @internal
5259
+ */var ANONYMOUS='<<anonymous>>';// Important!
5260
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
5261
+ var ReactPropTypes={array:createPrimitiveTypeChecker('array'),bigint:createPrimitiveTypeChecker('bigint'),bool:createPrimitiveTypeChecker('boolean'),func:createPrimitiveTypeChecker('function'),number:createPrimitiveTypeChecker('number'),object:createPrimitiveTypeChecker('object'),string:createPrimitiveTypeChecker('string'),symbol:createPrimitiveTypeChecker('symbol'),any:createAnyTypeChecker(),arrayOf:createArrayOfTypeChecker,element:createElementTypeChecker(),elementType:createElementTypeTypeChecker(),instanceOf:createInstanceTypeChecker,node:createNodeChecker(),objectOf:createObjectOfTypeChecker,oneOf:createEnumTypeChecker,oneOfType:createUnionTypeChecker,shape:createShapeTypeChecker,exact:createStrictShapeTypeChecker};/**
5262
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
5263
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5264
+ *//*eslint-disable no-self-compare*/function is(x,y){// SameValue algorithm
5265
+ if(x===y){// Steps 1-5, 7-10
5266
+ // Steps 6.b-6.e: +0 != -0
5267
+ return x!==0||1/x===1/y;}else {// Step 6.a: NaN == NaN
5268
+ return x!==x&&y!==y;}}/*eslint-enable no-self-compare*//**
5269
+ * We use an Error-like object for backward compatibility as people may call
5270
+ * PropTypes directly and inspect their output. However, we don't use real
5271
+ * Errors anymore. We don't inspect their stack anyway, and creating them
5272
+ * is prohibitively expensive if they are created too often, such as what
5273
+ * happens in oneOfType() for any type before the one that matched.
5274
+ */function PropTypeError(message,data){this.message=message;this.data=data&&typeof data==='object'?data:{};this.stack='';}// Make `instanceof Error` still work for returned errors.
5275
+ PropTypeError.prototype=Error.prototype;function createChainableTypeChecker(validate){if(process.env.NODE_ENV!=='production'){var manualPropTypeCallCache={};var manualPropTypeWarningCount=0;}function checkType(isRequired,props,propName,componentName,location,propFullName,secret){componentName=componentName||ANONYMOUS;propFullName=propFullName||propName;if(secret!==ReactPropTypesSecret){if(throwOnDirectAccess){// New behavior only for users of `prop-types` package
5276
+ 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');err.name='Invariant Violation';throw err;}else if(process.env.NODE_ENV!=='production'&&typeof console!=='undefined'){// Old behavior for people using React.PropTypes
5277
+ var cacheKey=componentName+':'+propName;if(!manualPropTypeCallCache[cacheKey]&&// Avoid spamming the console because they are often not actionable except for lib authors
5278
+ manualPropTypeWarningCount<3){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.');manualPropTypeCallCache[cacheKey]=true;manualPropTypeWarningCount++;}}}if(props[propName]==null){if(isRequired){if(props[propName]===null){return new PropTypeError('The '+location+' `'+propFullName+'` is marked as required '+('in `'+componentName+'`, but its value is `null`.'));}return new PropTypeError('The '+location+' `'+propFullName+'` is marked as required in '+('`'+componentName+'`, but its value is `undefined`.'));}return null;}else {return validate(props,propName,componentName,location,propFullName);}}var chainedCheckType=checkType.bind(null,false);chainedCheckType.isRequired=checkType.bind(null,true);return chainedCheckType;}function createPrimitiveTypeChecker(expectedType){function validate(props,propName,componentName,location,propFullName,secret){var propValue=props[propName];var propType=getPropType(propValue);if(propType!==expectedType){// `propValue` being instance of, say, date/regexp, pass the 'object'
5279
+ // check, but we can offer a more precise error message here rather than
5280
+ // 'of type `object`'.
5281
+ var preciseType=getPreciseType(propValue);return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type '+('`'+preciseType+'` supplied to `'+componentName+'`, expected ')+('`'+expectedType+'`.'),{expectedType:expectedType});}return null;}return createChainableTypeChecker(validate);}function createAnyTypeChecker(){return createChainableTypeChecker(emptyFunctionThatReturnsNull);}function createArrayOfTypeChecker(typeChecker){function validate(props,propName,componentName,location,propFullName){if(typeof typeChecker!=='function'){return new PropTypeError('Property `'+propFullName+'` of component `'+componentName+'` has invalid PropType notation inside arrayOf.');}var propValue=props[propName];if(!Array.isArray(propValue)){var propType=getPropType(propValue);return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type '+('`'+propType+'` supplied to `'+componentName+'`, expected an array.'));}for(var i=0;i<propValue.length;i++){var error=typeChecker(propValue,i,componentName,location,propFullName+'['+i+']',ReactPropTypesSecret);if(error instanceof Error){return error;}}return null;}return createChainableTypeChecker(validate);}function createElementTypeChecker(){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];if(!isValidElement(propValue)){var propType=getPropType(propValue);return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type '+('`'+propType+'` supplied to `'+componentName+'`, expected a single ReactElement.'));}return null;}return createChainableTypeChecker(validate);}function createElementTypeTypeChecker(){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];if(!ReactIs.isValidElementType(propValue)){var propType=getPropType(propValue);return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type '+('`'+propType+'` supplied to `'+componentName+'`, expected a single ReactElement type.'));}return null;}return createChainableTypeChecker(validate);}function createInstanceTypeChecker(expectedClass){function validate(props,propName,componentName,location,propFullName){if(!(props[propName]instanceof expectedClass)){var expectedClassName=expectedClass.name||ANONYMOUS;var actualClassName=getClassName(props[propName]);return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type '+('`'+actualClassName+'` supplied to `'+componentName+'`, expected ')+('instance of `'+expectedClassName+'`.'));}return null;}return createChainableTypeChecker(validate);}function createEnumTypeChecker(expectedValues){if(!Array.isArray(expectedValues)){if(process.env.NODE_ENV!=='production'){if(arguments.length>1){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]).');}else {printWarning('Invalid argument supplied to oneOf, expected an array.');}}return emptyFunctionThatReturnsNull;}function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];for(var i=0;i<expectedValues.length;i++){if(is(propValue,expectedValues[i])){return null;}}var valuesString=JSON.stringify(expectedValues,function replacer(key,value){var type=getPreciseType(value);if(type==='symbol'){return String(value);}return value;});return new PropTypeError('Invalid '+location+' `'+propFullName+'` of value `'+String(propValue)+'` '+('supplied to `'+componentName+'`, expected one of '+valuesString+'.'));}return createChainableTypeChecker(validate);}function createObjectOfTypeChecker(typeChecker){function validate(props,propName,componentName,location,propFullName){if(typeof typeChecker!=='function'){return new PropTypeError('Property `'+propFullName+'` of component `'+componentName+'` has invalid PropType notation inside objectOf.');}var propValue=props[propName];var propType=getPropType(propValue);if(propType!=='object'){return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type '+('`'+propType+'` supplied to `'+componentName+'`, expected an object.'));}for(var key in propValue){if(has(propValue,key)){var error=typeChecker(propValue,key,componentName,location,propFullName+'.'+key,ReactPropTypesSecret);if(error instanceof Error){return error;}}}return null;}return createChainableTypeChecker(validate);}function createUnionTypeChecker(arrayOfTypeCheckers){if(!Array.isArray(arrayOfTypeCheckers)){process.env.NODE_ENV!=='production'?printWarning('Invalid argument supplied to oneOfType, expected an instance of array.'):void 0;return emptyFunctionThatReturnsNull;}for(var i=0;i<arrayOfTypeCheckers.length;i++){var checker=arrayOfTypeCheckers[i];if(typeof checker!=='function'){printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but '+'received '+getPostfixForTypeWarning(checker)+' at index '+i+'.');return emptyFunctionThatReturnsNull;}}function validate(props,propName,componentName,location,propFullName){var expectedTypes=[];for(var i=0;i<arrayOfTypeCheckers.length;i++){var checker=arrayOfTypeCheckers[i];var checkerResult=checker(props,propName,componentName,location,propFullName,ReactPropTypesSecret);if(checkerResult==null){return null;}if(checkerResult.data&&has(checkerResult.data,'expectedType')){expectedTypes.push(checkerResult.data.expectedType);}}var expectedTypesMessage=expectedTypes.length>0?', expected one of type ['+expectedTypes.join(', ')+']':'';return new PropTypeError('Invalid '+location+' `'+propFullName+'` supplied to '+('`'+componentName+'`'+expectedTypesMessage+'.'));}return createChainableTypeChecker(validate);}function createNodeChecker(){function validate(props,propName,componentName,location,propFullName){if(!isNode(props[propName])){return new PropTypeError('Invalid '+location+' `'+propFullName+'` supplied to '+('`'+componentName+'`, expected a ReactNode.'));}return null;}return createChainableTypeChecker(validate);}function invalidValidatorError(componentName,location,propFullName,key,type){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+'`.');}function createShapeTypeChecker(shapeTypes){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=='object'){return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type `'+propType+'` '+('supplied to `'+componentName+'`, expected `object`.'));}for(var key in shapeTypes){var checker=shapeTypes[key];if(typeof checker!=='function'){return invalidValidatorError(componentName,location,propFullName,key,getPreciseType(checker));}var error=checker(propValue,key,componentName,location,propFullName+'.'+key,ReactPropTypesSecret);if(error){return error;}}return null;}return createChainableTypeChecker(validate);}function createStrictShapeTypeChecker(shapeTypes){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=='object'){return new PropTypeError('Invalid '+location+' `'+propFullName+'` of type `'+propType+'` '+('supplied to `'+componentName+'`, expected `object`.'));}// We need to check all keys in case some are required but missing from props.
5282
+ var allKeys=assign({},props[propName],shapeTypes);for(var key in allKeys){var checker=shapeTypes[key];if(has(shapeTypes,key)&&typeof checker!=='function'){return invalidValidatorError(componentName,location,propFullName,key,getPreciseType(checker));}if(!checker){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,' '));}var error=checker(propValue,key,componentName,location,propFullName+'.'+key,ReactPropTypesSecret);if(error){return error;}}return null;}return createChainableTypeChecker(validate);}function isNode(propValue){switch(typeof propValue){case'number':case'string':case'undefined':return true;case'boolean':return !propValue;case'object':if(Array.isArray(propValue)){return propValue.every(isNode);}if(propValue===null||isValidElement(propValue)){return true;}var iteratorFn=getIteratorFn(propValue);if(iteratorFn){var iterator=iteratorFn.call(propValue);var step;if(iteratorFn!==propValue.entries){while(!(step=iterator.next()).done){if(!isNode(step.value)){return false;}}}else {// Iterator will provide entry [k,v] tuples rather than values.
5283
+ while(!(step=iterator.next()).done){var entry=step.value;if(entry){if(!isNode(entry[1])){return false;}}}}}else {return false;}return true;default:return false;}}function isSymbol(propType,propValue){// Native Symbol.
5284
+ if(propType==='symbol'){return true;}// falsy value can't be a Symbol
5285
+ if(!propValue){return false;}// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5286
+ if(propValue['@@toStringTag']==='Symbol'){return true;}// Fallback for non-spec compliant Symbols which are polyfilled.
5287
+ if(typeof Symbol==='function'&&propValue instanceof Symbol){return true;}return false;}// Equivalent of `typeof` but with special handling for array and regexp.
5288
+ function getPropType(propValue){var propType=typeof propValue;if(Array.isArray(propValue)){return 'array';}if(propValue instanceof RegExp){// Old webkits (at least until Android 4.0) return 'function' rather than
5289
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5290
+ // passes PropTypes.object.
5291
+ return 'object';}if(isSymbol(propType,propValue)){return 'symbol';}return propType;}// This handles more types than `getPropType`. Only used for error messages.
5292
+ // See `createPrimitiveTypeChecker`.
5293
+ function getPreciseType(propValue){if(typeof propValue==='undefined'||propValue===null){return ''+propValue;}var propType=getPropType(propValue);if(propType==='object'){if(propValue instanceof Date){return 'date';}else if(propValue instanceof RegExp){return 'regexp';}}return propType;}// Returns a string that is postfixed to a warning about an invalid type.
5294
+ // For example, "undefined" or "of type array"
5295
+ function getPostfixForTypeWarning(value){var type=getPreciseType(value);switch(type){case'array':case'object':return 'an '+type;case'boolean':case'date':case'regexp':return 'a '+type;default:return type;}}// Returns class name of the object, if any.
5296
+ function getClassName(propValue){if(!propValue.constructor||!propValue.constructor.name){return ANONYMOUS;}return propValue.constructor.name;}ReactPropTypes.checkPropTypes=checkPropTypes;ReactPropTypes.resetWarningCache=checkPropTypes.resetWarningCache;ReactPropTypes.PropTypes=ReactPropTypes;return ReactPropTypes;};return factoryWithTypeCheckers$8;}/**
5297
+ * Copyright (c) 2013-present, Facebook, Inc.
5298
+ *
5299
+ * This source code is licensed under the MIT license found in the
5300
+ * LICENSE file in the root directory of this source tree.
5301
+ */var factoryWithThrowingShims$8;var hasRequiredFactoryWithThrowingShims$8;function requireFactoryWithThrowingShims$8(){if(hasRequiredFactoryWithThrowingShims$8)return factoryWithThrowingShims$8;hasRequiredFactoryWithThrowingShims$8=1;var ReactPropTypesSecret=/*@__PURE__*/requireReactPropTypesSecret$8();function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;factoryWithThrowingShims$8=function(){function shim(props,propName,componentName,location,propFullName,secret){if(secret===ReactPropTypesSecret){// It is still safe when called from React.
5302
+ return;}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');err.name='Invariant Violation';throw err;}shim.isRequired=shim;function getShim(){return shim;}// Important!
5303
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5304
+ var ReactPropTypes={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};ReactPropTypes.PropTypes=ReactPropTypes;return ReactPropTypes;};return factoryWithThrowingShims$8;}/**
5305
+ * Copyright (c) 2013-present, Facebook, Inc.
5306
+ *
5307
+ * This source code is licensed under the MIT license found in the
5308
+ * LICENSE file in the root directory of this source tree.
5309
+ */var hasRequiredPropTypes$8;function requirePropTypes$8(){if(hasRequiredPropTypes$8)return propTypes$8.exports;hasRequiredPropTypes$8=1;if(process.env.NODE_ENV!=='production'){var ReactIs=requireReactIs$8();// By explicitly using `prop-types` you are opting into new development behavior.
5310
+ // http://fb.me/prop-types-in-prod
5311
+ var throwOnDirectAccess=true;propTypes$8.exports=/*@__PURE__*/requireFactoryWithTypeCheckers$8()(ReactIs.isElement,throwOnDirectAccess);}else {// By explicitly using `prop-types` you are opting into new production behavior.
5312
+ // http://fb.me/prop-types-in-prod
5313
+ propTypes$8.exports=/*@__PURE__*/requireFactoryWithThrowingShims$8()();}return propTypes$8.exports;}var propTypesExports$8=/*@__PURE__*/requirePropTypes$8();var PropTypes$8=/*@__PURE__*/getDefaultExportFromCjs$8(propTypesExports$8);({onPowerOff:PropTypes$8.func,onRestart:PropTypes$8.func,powerOffLabel:PropTypes$8.string,restartLabel:PropTypes$8.string,iconClassName:PropTypes$8.string,confirmTitle:PropTypes$8.string,cancelText:PropTypes$8.string,okText:PropTypes$8.string,run:PropTypes$8.func});({logoUrl:PropTypes$8.string,logoWidth:PropTypes$8.number,logoAlt:PropTypes$8.string,onClick:PropTypes$8.func});function _defineProperty$1(e,r,t){return (r=_toPropertyKey$1(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread2$1(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1(Object(t),!0).forEach(function(r){_defineProperty$1(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys$1(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _toPrimitive$1(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string"===r?String:Number)(t);}function _toPropertyKey$1(t){var i=_toPrimitive$1(t,"string");return "symbol"==typeof i?i:i+"";}/**
5314
+ * 国际化调试工具
5315
+ * 在浏览器控制台运行 window.debugI18n() 查看当前国际化状态
5316
+ */const debugI18n=()=>{var _window$g_initialProp,_window$g_initialProp2,_window$g_initialProp3,_window$g_initialProp4,_window$g_initialProp5,_window$g_initialProp6;if(typeof window==='undefined'){console.log('[i18n debug] Not in browser environment');return;}console.group('🌍 I18n Debug Information');// 1. 当前语言环境
5317
+ console.log('📍 Current Locale Sources:');console.log(' - window.g_initialProps?.locale:',(_window$g_initialProp=window.g_initialProps)===null||_window$g_initialProp===void 0?void 0:_window$g_initialProp.locale);console.log(' - window.g_initialProps?.___g_initialPropsFromServer?.locale:',(_window$g_initialProp2=window.g_initialProps)===null||_window$g_initialProp2===void 0||(_window$g_initialProp2=_window$g_initialProp2.___g_initialPropsFromServer)===null||_window$g_initialProp2===void 0?void 0:_window$g_initialProp2.locale);try{console.log(' - localStorage.umi-locale:',localStorage.getItem('umi-locale'));}catch(e){console.log(' - localStorage: not available');}console.log(' - window.__COMPONENT_LOCALE__:',window.__COMPONENT_LOCALE__);// 2. 语言包
5318
+ console.log('\n📦 Available Message Sources:');console.log(' - window.__COMPONENT_I18N_MESSAGES__:',window.__COMPONENT_I18N_MESSAGES__);console.log(' - window.__PROJECT_I18N_MESSAGES__:',window.__PROJECT_I18N_MESSAGES__);console.log(' - window.g_initialProps?.messages:',(_window$g_initialProp3=window.g_initialProps)===null||_window$g_initialProp3===void 0?void 0:_window$g_initialProp3.messages);// 3. 合并后的语言包
5319
+ const componentMessages=window.__COMPONENT_I18N_MESSAGES__||{};const projectMessages=window.__PROJECT_I18N_MESSAGES__||{};const umiMessages=((_window$g_initialProp4=window.g_initialProps)===null||_window$g_initialProp4===void 0?void 0:_window$g_initialProp4.messages)||{};const allLocales=new Set([...Object.keys(componentMessages),...Object.keys(projectMessages),...Object.keys(umiMessages)]);console.log('\n🔧 Merged Locales:',Array.from(allLocales));allLocales.forEach(locale=>{const merged=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});console.log("\n \uD83D\uDCC4 ".concat(locale," (").concat(Object.keys(merged).length," keys):"),merged);});// 4. 测试几个关键的 key
5320
+ console.log('\n🧪 Test Translation:');const testKeys=['networkSettings.title','button.ok','button.cancel','button.apply','button.close'];const currentLocale=((_window$g_initialProp5=window.g_initialProps)===null||_window$g_initialProp5===void 0?void 0:_window$g_initialProp5.locale)||((_window$g_initialProp6=window.g_initialProps)===null||_window$g_initialProp6===void 0||(_window$g_initialProp6=_window$g_initialProp6.___g_initialPropsFromServer)===null||_window$g_initialProp6===void 0?void 0:_window$g_initialProp6.locale)||localStorage.getItem('umi-locale')||'zh-CN';const allMessages={};allLocales.forEach(locale=>{allMessages[locale]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},umiMessages[locale]||{}),projectMessages[locale]||{}),componentMessages[locale]||{});});testKeys.forEach(key=>{var _allMessages$currentL,_allMessages$enUS;const translation=((_allMessages$currentL=allMessages[currentLocale])===null||_allMessages$currentL===void 0?void 0:_allMessages$currentL[key])||((_allMessages$enUS=allMessages['en-US'])===null||_allMessages$enUS===void 0?void 0:_allMessages$enUS[key])||'❌ NOT FOUND';console.log(" - ".concat(key,": ").concat(translation));});console.groupEnd();};// 自动在开发环境注册到 window
5321
+ if(process.env.NODE_ENV==='development'&&typeof window!=='undefined'){window.debugI18n=debugI18n;console.log('💡 I18n debug tool available. Run window.debugI18n() in console to check i18n status.');}function getDefaultExportFromCjs$7(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,'default')?x['default']:x;}var propTypes$7={exports:{}};var reactIs$7={exports:{}};var reactIs_production_min$7={};/** @license React v16.13.1
5127
5322
  * react-is.production.min.js
5128
5323
  *
5129
5324
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -6642,7 +6837,7 @@ const NmosModal = _ref => {
6642
6837
  modalProps = {},
6643
6838
  formProps = {}
6644
6839
  } = _ref;
6645
- const intl = useIntl$1();
6840
+ const intl = useIntl();
6646
6841
  const [nmosSettings, setNmosSettings] = useState(null);
6647
6842
  const [loading, setLoading] = useState(false);
6648
6843
  const [form] = Form.useForm();
@@ -6681,7 +6876,7 @@ const NmosModal = _ref => {
6681
6876
  const values = await form.getFieldsValue();
6682
6877
  setLoading(true);
6683
6878
  try {
6684
- const response = await updateNmosSettings(_objectSpread2(_objectSpread2({}, nmosSettings), values));
6879
+ const response = await updateNmosSettings(_objectSpread2$2(_objectSpread2$2({}, nmosSettings), values));
6685
6880
  if (response) {
6686
6881
  message.success(intl.formatMessage({
6687
6882
  id: 'nmos.saveSuccess'
@@ -6696,7 +6891,7 @@ const NmosModal = _ref => {
6696
6891
  setLoading(false);
6697
6892
  }
6698
6893
  };
6699
- return /*#__PURE__*/jsx(StyledModal$3, _objectSpread2(_objectSpread2({
6894
+ return /*#__PURE__*/jsx(StyledModal$1, _objectSpread2$2(_objectSpread2$2({
6700
6895
  title: intl.formatMessage({
6701
6896
  id: 'nmos.title'
6702
6897
  }),
@@ -6713,7 +6908,7 @@ const NmosModal = _ref => {
6713
6908
  confirmLoading: loading,
6714
6909
  destroyOnHidden: true // 关闭时销毁组件,确保下次打开重新初始化
6715
6910
  }, modalProps), {}, {
6716
- children: /*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({
6911
+ children: /*#__PURE__*/jsxs(Form, _objectSpread2$2(_objectSpread2$2({
6717
6912
  form: form,
6718
6913
  name: "nmosForm",
6719
6914
  labelCol: {
@@ -6759,7 +6954,7 @@ const NmosModal = _ref => {
6759
6954
  id: 'nmos.registrationPort'
6760
6955
  }),
6761
6956
  name: "registration_port",
6762
- children: /*#__PURE__*/jsx(InputNumber, _objectSpread2(_objectSpread2({}, numberProps), {}, {
6957
+ children: /*#__PURE__*/jsx(InputNumber, _objectSpread2$2(_objectSpread2$2({}, numberProps), {}, {
6763
6958
  min: 0,
6764
6959
  max: 65535,
6765
6960
  style: {
@@ -6794,7 +6989,7 @@ const NmosModal = _ref => {
6794
6989
  id: 'nmos.loggingLevel'
6795
6990
  }),
6796
6991
  name: "logging_level",
6797
- children: /*#__PURE__*/jsx(InputNumber, _objectSpread2(_objectSpread2({}, numberProps), {}, {
6992
+ children: /*#__PURE__*/jsx(InputNumber, _objectSpread2$2(_objectSpread2$2({}, numberProps), {}, {
6798
6993
  min: -40,
6799
6994
  max: 40,
6800
6995
  style: {
@@ -6905,7 +7100,7 @@ const MaintenancePage = _ref => {
6905
7100
  // 每 2 秒重试
6906
7101
  countdownSeconds = 30 // 倒计时初始值,单位秒
6907
7102
  } = _ref;
6908
- const intl = useIntl$1();
7103
+ const intl = useIntl();
6909
7104
  const [countdown, setCountdown] = useState(countdownSeconds);
6910
7105
  const {
6911
7106
  error,
@@ -7088,7 +7283,7 @@ const DraggableNumberInput = _ref2 => {
7088
7283
  disabled = false,
7089
7284
  style
7090
7285
  } = _ref2,
7091
- restProps = _objectWithoutProperties(_ref2, _excluded$1);
7286
+ restProps = _objectWithoutProperties$1(_ref2, _excluded$1);
7092
7287
  const inputRef = useRef(null);
7093
7288
  const [isMouseDown, setIsMouseDown] = useState(false);
7094
7289
  const [isDragging, setIsDragging] = useState(false);
@@ -7170,7 +7365,7 @@ const DraggableNumberInput = _ref2 => {
7170
7365
  });
7171
7366
  }, [value, disablePointerLock, disabled]);
7172
7367
  const getModifiers = useCallback(e => {
7173
- const mods = _objectSpread2(_objectSpread2({}, defaultModifiers), modifierKeys);
7368
+ const mods = _objectSpread2$2(_objectSpread2$2({}, defaultModifiers), modifierKeys);
7174
7369
  for (const key in mods) {
7175
7370
  if (key !== "default" && e[key]) {
7176
7371
  currentMultiplier.current = mods[key].multiplier;
@@ -7278,7 +7473,7 @@ const DraggableNumberInput = _ref2 => {
7278
7473
  color: "rgba(255, 255, 255, 0.25)"
7279
7474
  } : {};
7280
7475
  return /*#__PURE__*/jsxs(Fragment, {
7281
- children: [/*#__PURE__*/jsx("input", _objectSpread2({
7476
+ children: [/*#__PURE__*/jsx("input", _objectSpread2$2({
7282
7477
  ref: inputRef,
7283
7478
  type: "text",
7284
7479
  inputMode: "numeric",
@@ -7291,7 +7486,7 @@ const DraggableNumberInput = _ref2 => {
7291
7486
  onKeyDown: handleArrowKeyDown,
7292
7487
  disabled: disabled,
7293
7488
  className: "draggable-number-input ".concat(className, " ").concat(isDragging ? "dragging" : "", " ").concat(disabled ? "disabled" : ""),
7294
- style: _objectSpread2(_objectSpread2({
7489
+ style: _objectSpread2$2(_objectSpread2$2({
7295
7490
  cursor: disabled ? "not-allowed" : "ew-resize",
7296
7491
  userSelect: disabled ? "none" : "auto",
7297
7492
  caretColor: isDragging ? "transparent" : "initial"
@@ -7313,8 +7508,8 @@ const BoundedInput = _ref => {
7313
7508
  placeholder = 'input.placeholder.enterInteger',
7314
7509
  disabled = false
7315
7510
  } = _ref,
7316
- props = _objectWithoutProperties(_ref, _excluded);
7317
- const intl = useIntl$1();
7511
+ props = _objectWithoutProperties$1(_ref, _excluded);
7512
+ const intl = useIntl();
7318
7513
 
7319
7514
  // 处理国际化文本
7320
7515
  const placeholderText = typeof placeholder === 'string' && placeholder.includes('.') ? intl.formatMessage({
@@ -7352,7 +7547,7 @@ const BoundedInput = _ref => {
7352
7547
  onChange === null || onChange === void 0 || onChange(safeVal);
7353
7548
  }
7354
7549
  };
7355
- return /*#__PURE__*/jsx(InputNumber, _objectSpread2({
7550
+ return /*#__PURE__*/jsx(InputNumber, _objectSpread2$2({
7356
7551
  value: value,
7357
7552
  onChange: handleChange,
7358
7553
  onBlur: handleBlur,
@@ -7379,7 +7574,7 @@ const BoundedInput = _ref => {
7379
7574
  /**
7380
7575
  * 专用端口输入框
7381
7576
  */
7382
- const PortInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2({
7577
+ const PortInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2$2({
7383
7578
  min: 0,
7384
7579
  max: 65535,
7385
7580
  placeholder: "input.placeholder.enterPort"
@@ -7388,7 +7583,7 @@ const PortInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2({
7388
7583
  /**
7389
7584
  * 专用 Payload 输入框
7390
7585
  */
7391
- const PayloadInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2({
7586
+ const PayloadInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2$2({
7392
7587
  min: 96,
7393
7588
  max: 127,
7394
7589
  placeholder: "input.placeholder.enterPayload"
@@ -7410,6 +7605,31 @@ function getSocketUrl(path) {
7410
7605
  return "".concat(protocol, "//").concat(window.location.host).concat(normalizedPath);
7411
7606
  }
7412
7607
 
7608
+ /**
7609
+ * 将相对路径解析为绝对 URL
7610
+ * @param {string|null|undefined} path - 资源路径
7611
+ * @param {string} [baseUrl] - 基础域名,未传时取当前页面 origin
7612
+ * @returns {string|null} 完整 URL;path 为空时返回 null
7613
+ */
7614
+ function resolveUrl(path, baseUrl) {
7615
+ // 空值保护
7616
+ if (!path || typeof path !== 'string') {
7617
+ return null;
7618
+ }
7619
+
7620
+ // 已是完整 URL 直接返回
7621
+ if (/^https?:\/\//i.test(path)) {
7622
+ return path;
7623
+ }
7624
+
7625
+ // 安全获取 baseUrl,兼容 SSR/Node 环境
7626
+ const base = baseUrl || (typeof window !== 'undefined' ? window.location.origin : '');
7627
+
7628
+ // 标准化路径前缀,防止拼接错误
7629
+ const normalizedPath = path.startsWith('/') ? path : '/' + path;
7630
+ return base + normalizedPath;
7631
+ }
7632
+
7413
7633
  /**
7414
7634
  * @internal 安全查找选项的通用内核
7415
7635
  */
@@ -7487,5 +7707,5 @@ const getCachedNameByValue = function (value) {
7487
7707
  return result;
7488
7708
  };
7489
7709
 
7490
- export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, MaintenancePage, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PayloadInput, PortInput, PresetModal, PtpModal$1 as PtpModal, StyledModal$1 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, addMessages, debugI18n$1 as debugI18n, getCachedNameByValue, getDefaultValue, getNameByValue, getSocketUrl, enUS as localesEnUS, zhCN as localesZhCN, useAuth, useHardwareUsage$1 as useHardwareUsage, useIntl$1 as useIntl, usePageReload$1 as usePageReload, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade, useWebSocketWithFeatures$1 as useWebSocketWithFeatures };
7710
+ export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, MaintenancePage, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PayloadInput, PortInput, PresetModal, PtpModal$1 as PtpModal, StyledModal$3 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, addMessages, debugI18n$2 as debugI18n, getCachedNameByValue, getDefaultValue, getNameByValue, getSocketUrl, enUS as localesEnUS, zhCN as localesZhCN, resolveUrl, useAuth, useHardwareUsage$1 as useHardwareUsage, useIntl, usePageReload$1 as usePageReload, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade, useWebSocketWithFeatures$1 as useWebSocketWithFeatures };
7491
7711
  //# sourceMappingURL=index.esm.js.map