seeder-st2110-components 1.6.10 → 1.7.1
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 +1826 -232
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1827 -232
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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$1(e, r, t) {
|
|
9
|
+
return (r = _toPropertyKey$1(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$1(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$1(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$1(Object(t), !0).forEach(function (r) {
|
|
30
|
+
_defineProperty$1(e, r, t[r]);
|
|
31
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(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$1(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$1(t) {
|
|
68
|
+
var i = _toPrimitive$1(t, "string");
|
|
69
69
|
return "symbol" == typeof i ? i : i + "";
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -112,7 +112,7 @@ const useHardwareWebSocket = socketUrl => {
|
|
|
112
112
|
const handleMessage = useCallback(message => {
|
|
113
113
|
try {
|
|
114
114
|
if (message) {
|
|
115
|
-
setSystemStatus(prev => _objectSpread2(_objectSpread2({}, prev), message));
|
|
115
|
+
setSystemStatus(prev => _objectSpread2$1(_objectSpread2$1({}, prev), message));
|
|
116
116
|
}
|
|
117
117
|
} catch (error) {
|
|
118
118
|
console.error('Message processing error:', error);
|
|
@@ -207,7 +207,7 @@ const getItems = details => {
|
|
|
207
207
|
items.push(createMetricItem('CPU Temperature', 'seeder-icon-CPUwendu', details.cpu_temp, '℃'));
|
|
208
208
|
}
|
|
209
209
|
if (details.mem_usage !== null && details.mem_usage !== undefined) {
|
|
210
|
-
items.push(_objectSpread2(_objectSpread2({}, createMetricItem('Memory Usage', 'seeder-icon-shiyongshuai', details.mem_usage, '%')), {}, {
|
|
210
|
+
items.push(_objectSpread2$1(_objectSpread2$1({}, createMetricItem('Memory Usage', 'seeder-icon-shiyongshuai', details.mem_usage, '%')), {}, {
|
|
211
211
|
memTotal: details.mem_total
|
|
212
212
|
}));
|
|
213
213
|
}
|
|
@@ -251,15 +251,15 @@ const useHardwareUsage = socketUrl => {
|
|
|
251
251
|
};
|
|
252
252
|
var useHardwareUsage$1 = useHardwareUsage;
|
|
253
253
|
|
|
254
|
-
const _excluded$
|
|
255
|
-
const StyledModal = props => {
|
|
254
|
+
const _excluded$3 = ["width", "okText", "cancelText", "styles"];
|
|
255
|
+
const StyledModal$2 = props => {
|
|
256
256
|
const {
|
|
257
257
|
width = "520px",
|
|
258
258
|
okText = "Apply",
|
|
259
259
|
cancelText = "Close",
|
|
260
260
|
styles: propStyles = {}
|
|
261
261
|
} = props,
|
|
262
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
262
|
+
restProps = _objectWithoutProperties$1(props, _excluded$3);
|
|
263
263
|
|
|
264
264
|
// 基础样式配置
|
|
265
265
|
const baseStyles = {
|
|
@@ -287,15 +287,15 @@ const StyledModal = props => {
|
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
// 合并样式
|
|
290
|
-
const styles = _objectSpread2(_objectSpread2({}, baseStyles), propStyles);
|
|
291
|
-
return /*#__PURE__*/jsx(Modal, _objectSpread2({
|
|
290
|
+
const styles = _objectSpread2$1(_objectSpread2$1({}, baseStyles), propStyles);
|
|
291
|
+
return /*#__PURE__*/jsx(Modal, _objectSpread2$1({
|
|
292
292
|
width: width,
|
|
293
293
|
okText: okText,
|
|
294
294
|
cancelText: cancelText,
|
|
295
295
|
styles: styles
|
|
296
296
|
}, restProps));
|
|
297
297
|
};
|
|
298
|
-
var StyledModal$
|
|
298
|
+
var StyledModal$3 = StyledModal$2;
|
|
299
299
|
|
|
300
300
|
const AuthorizationModal = _ref => {
|
|
301
301
|
let {
|
|
@@ -335,7 +335,7 @@ const AuthorizationModal = _ref => {
|
|
|
335
335
|
showIcon: true
|
|
336
336
|
});
|
|
337
337
|
const defaultOkText = isActivated ? "Reactivate" : "Activate Now";
|
|
338
|
-
return /*#__PURE__*/jsx(StyledModal$
|
|
338
|
+
return /*#__PURE__*/jsx(StyledModal$3, {
|
|
339
339
|
title: title,
|
|
340
340
|
width: width,
|
|
341
341
|
open: true,
|
|
@@ -852,7 +852,7 @@ const NetworkFieldGroup = _ref => {
|
|
|
852
852
|
enabled: true
|
|
853
853
|
}
|
|
854
854
|
};
|
|
855
|
-
const mergedFieldConfig = _objectSpread2(_objectSpread2(_objectSpread2({}, defaultFieldConfig), fieldConfig), {}, {
|
|
855
|
+
const mergedFieldConfig = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, defaultFieldConfig), fieldConfig), {}, {
|
|
856
856
|
netmask: {
|
|
857
857
|
label: "Netmask",
|
|
858
858
|
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 // 合并 enabled
|
|
@@ -928,18 +928,18 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
928
928
|
hasInitialized: false
|
|
929
929
|
});
|
|
930
930
|
const preparedFieldConfig = useMemo(() => {
|
|
931
|
-
const config = _objectSpread2({}, fieldConfig);
|
|
931
|
+
const config = _objectSpread2$1({}, fieldConfig);
|
|
932
932
|
|
|
933
933
|
// 确保LAN和QSFP的配置存在
|
|
934
934
|
config.LAN = config.LAN || {};
|
|
935
935
|
config.QSFP = config.QSFP || {};
|
|
936
936
|
if (sections.includes('LAN')) {
|
|
937
|
-
config.LAN.netmask = _objectSpread2(_objectSpread2({}, config.LAN.netmask || {}), {}, {
|
|
937
|
+
config.LAN.netmask = _objectSpread2$1(_objectSpread2$1({}, config.LAN.netmask || {}), {}, {
|
|
938
938
|
enabled: showNetmask.LAN
|
|
939
939
|
});
|
|
940
940
|
}
|
|
941
941
|
if (sections.includes('QSFP')) {
|
|
942
|
-
config.QSFP.netmask = _objectSpread2(_objectSpread2({}, config.QSFP.netmask || {}), {}, {
|
|
942
|
+
config.QSFP.netmask = _objectSpread2$1(_objectSpread2$1({}, config.QSFP.netmask || {}), {}, {
|
|
943
943
|
enabled: showNetmask.QSFP
|
|
944
944
|
});
|
|
945
945
|
}
|
|
@@ -1009,7 +1009,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1009
1009
|
const initialValues = useMemo(() => {
|
|
1010
1010
|
const values = {};
|
|
1011
1011
|
if (sections.includes('LAN') && lanConfigs.length > 0) {
|
|
1012
|
-
values.LAN = lanConfigs.map(config => _objectSpread2({
|
|
1012
|
+
values.LAN = lanConfigs.map(config => _objectSpread2$1({
|
|
1013
1013
|
connection_id: config.connection_id,
|
|
1014
1014
|
display_name: config.display_name,
|
|
1015
1015
|
ip_address: config.ip_address
|
|
@@ -1018,7 +1018,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1018
1018
|
} : {}));
|
|
1019
1019
|
}
|
|
1020
1020
|
if (sections.includes('QSFP') && st2110Interfaces.length > 0) {
|
|
1021
|
-
values.QSFP = st2110Interfaces.map(iface => _objectSpread2(_objectSpread2({}, iface.id !== undefined && {
|
|
1021
|
+
values.QSFP = st2110Interfaces.map(iface => _objectSpread2$1(_objectSpread2$1({}, iface.id !== undefined && {
|
|
1022
1022
|
id: iface.id
|
|
1023
1023
|
}), {}, {
|
|
1024
1024
|
display_name: iface.display_name,
|
|
@@ -1087,7 +1087,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1087
1087
|
if (sections.includes('LAN') && values.LAN) {
|
|
1088
1088
|
const lanData = values.LAN.map((item, index) => {
|
|
1089
1089
|
var _lanConfigs$index;
|
|
1090
|
-
return _objectSpread2({
|
|
1090
|
+
return _objectSpread2$1({
|
|
1091
1091
|
connection_id: (_lanConfigs$index = lanConfigs[index]) === null || _lanConfigs$index === void 0 ? void 0 : _lanConfigs$index.connection_id,
|
|
1092
1092
|
ip_address: item.ip_address
|
|
1093
1093
|
}, showNetmask.LAN ? {
|
|
@@ -1101,7 +1101,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1101
1101
|
if (sections.includes('QSFP') && values.QSFP) {
|
|
1102
1102
|
const interfacesData = values.QSFP.map((item, index) => {
|
|
1103
1103
|
var _st2110Interfaces$ind, _st2110Interfaces$ind2, _st2110Interfaces$ind3;
|
|
1104
|
-
return _objectSpread2(_objectSpread2(_objectSpread2({}, (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind = st2110Interfaces[index]) === null || _st2110Interfaces$ind === void 0 ? void 0 : _st2110Interfaces$ind.id) !== undefined && {
|
|
1104
|
+
return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind = st2110Interfaces[index]) === null || _st2110Interfaces$ind === void 0 ? void 0 : _st2110Interfaces$ind.id) !== undefined && {
|
|
1105
1105
|
id: st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind2 = st2110Interfaces[index]) === null || _st2110Interfaces$ind2 === void 0 ? void 0 : _st2110Interfaces$ind2.id
|
|
1106
1106
|
}), (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind3 = st2110Interfaces[index]) === null || _st2110Interfaces$ind3 === void 0 ? void 0 : _st2110Interfaces$ind3.ip) !== undefined ? {
|
|
1107
1107
|
ip: item.ip_address
|
|
@@ -1133,7 +1133,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1133
1133
|
}, [form, sections, lanConfigs, st2110Interfaces, updateLanConfig, updateSysConfig, handleSuccess]);
|
|
1134
1134
|
|
|
1135
1135
|
// 合并默认模态框属性和传入的属性
|
|
1136
|
-
const mergedModalProps = _objectSpread2({
|
|
1136
|
+
const mergedModalProps = _objectSpread2$1({
|
|
1137
1137
|
title: "Network Settings",
|
|
1138
1138
|
width: 650,
|
|
1139
1139
|
open,
|
|
@@ -1148,7 +1148,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1148
1148
|
}, modalProps);
|
|
1149
1149
|
|
|
1150
1150
|
// 合并默认表单属性和传入的属性
|
|
1151
|
-
const mergedFormProps = _objectSpread2({
|
|
1151
|
+
const mergedFormProps = _objectSpread2$1({
|
|
1152
1152
|
form: form,
|
|
1153
1153
|
labelCol: {
|
|
1154
1154
|
span: 6
|
|
@@ -1158,8 +1158,8 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1158
1158
|
},
|
|
1159
1159
|
autoComplete: "off"
|
|
1160
1160
|
}, formProps);
|
|
1161
|
-
return /*#__PURE__*/jsxs(StyledModal$
|
|
1162
|
-
children: [/*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
|
|
1161
|
+
return /*#__PURE__*/jsxs(StyledModal$3, _objectSpread2$1(_objectSpread2$1({}, mergedModalProps), {}, {
|
|
1162
|
+
children: [/*#__PURE__*/jsxs(Form, _objectSpread2$1(_objectSpread2$1({}, mergedFormProps), {}, {
|
|
1163
1163
|
children: [sections.includes('LAN') && lanConfigs.length > 0 && /*#__PURE__*/jsxs(Fragment, {
|
|
1164
1164
|
children: [/*#__PURE__*/jsx(NetworkFieldGroup, {
|
|
1165
1165
|
prefix: "LAN",
|
|
@@ -1281,7 +1281,7 @@ function convertPtpStatusToArray(ptpStatus, fieldConfigs, fieldOrder) {
|
|
|
1281
1281
|
formType: 'text'
|
|
1282
1282
|
};
|
|
1283
1283
|
const value = ptpStatus[key];
|
|
1284
|
-
return _objectSpread2(_objectSpread2({
|
|
1284
|
+
return _objectSpread2$1(_objectSpread2$1({
|
|
1285
1285
|
key,
|
|
1286
1286
|
value
|
|
1287
1287
|
}, config), {}, {
|
|
@@ -1301,34 +1301,39 @@ const PtpModal = _ref => {
|
|
|
1301
1301
|
formProps = {}
|
|
1302
1302
|
} = _ref;
|
|
1303
1303
|
const [ptpStatus, setPtpStatus] = useState(null);
|
|
1304
|
+
const [loading, setLoading] = useState(false);
|
|
1304
1305
|
const [form] = Form.useForm();
|
|
1305
1306
|
const {
|
|
1306
1307
|
message
|
|
1307
1308
|
} = App.useApp();
|
|
1308
1309
|
useEffect(() => {
|
|
1309
1310
|
if (open) {
|
|
1311
|
+
setLoading(true);
|
|
1310
1312
|
getPtpInfo().then(data => {
|
|
1311
1313
|
if (data !== null && data !== void 0 && data[0]) {
|
|
1312
1314
|
setPtpStatus(data[0]);
|
|
1315
|
+
// 数据加载后设置表单值
|
|
1313
1316
|
form.setFieldsValue(data[0]);
|
|
1314
1317
|
}
|
|
1318
|
+
}).catch(err => {
|
|
1319
|
+
console.error("Failed to fetch ptp", err);
|
|
1320
|
+
}).finally(() => {
|
|
1321
|
+
setLoading(false);
|
|
1315
1322
|
});
|
|
1323
|
+
} else {
|
|
1324
|
+
// 关闭时重置表单
|
|
1325
|
+
form.resetFields();
|
|
1326
|
+
setPtpStatus(null);
|
|
1316
1327
|
}
|
|
1317
1328
|
}, [open, form, getPtpInfo]);
|
|
1318
1329
|
const ptpStatusArray = useMemo(() => {
|
|
1319
1330
|
if (!ptpStatus) return [];
|
|
1320
1331
|
return convertPtpStatusToArray(ptpStatus, fieldConfigs, fieldOrder);
|
|
1321
|
-
}, [ptpStatus]);
|
|
1322
|
-
const handleValueChange = changedValues => {
|
|
1323
|
-
if ('t1_domain_number' in changedValues) {
|
|
1324
|
-
setPtpStatus(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
1325
|
-
t1_domain_number: changedValues.t1_domain_number
|
|
1326
|
-
}));
|
|
1327
|
-
}
|
|
1328
|
-
};
|
|
1332
|
+
}, [ptpStatus, fieldConfigs, fieldOrder]);
|
|
1329
1333
|
const handleSubmit = async () => {
|
|
1334
|
+
const values = await form.getFieldsValue();
|
|
1335
|
+
setLoading(true);
|
|
1330
1336
|
try {
|
|
1331
|
-
const values = await form.validateFields();
|
|
1332
1337
|
const response = await updatePtpInfo(values);
|
|
1333
1338
|
if (response) {
|
|
1334
1339
|
message.success('Success');
|
|
@@ -1338,6 +1343,8 @@ const PtpModal = _ref => {
|
|
|
1338
1343
|
}
|
|
1339
1344
|
} catch (error) {
|
|
1340
1345
|
console.error('Update failed:', error);
|
|
1346
|
+
} finally {
|
|
1347
|
+
setLoading(false);
|
|
1341
1348
|
}
|
|
1342
1349
|
};
|
|
1343
1350
|
const renderFormItem = item => {
|
|
@@ -1386,18 +1393,19 @@ const PtpModal = _ref => {
|
|
|
1386
1393
|
if (!open || !ptpStatus) return null;
|
|
1387
1394
|
|
|
1388
1395
|
// 合并默认模态框属性和传入的属性
|
|
1389
|
-
const mergedModalProps = _objectSpread2({
|
|
1396
|
+
const mergedModalProps = _objectSpread2$1({
|
|
1390
1397
|
title: "PTP",
|
|
1391
1398
|
width: 650,
|
|
1392
1399
|
open,
|
|
1393
1400
|
okText: "Apply",
|
|
1394
1401
|
cancelText: "Close",
|
|
1395
1402
|
onCancel: onClose,
|
|
1396
|
-
onOk: handleSubmit
|
|
1403
|
+
onOk: handleSubmit,
|
|
1404
|
+
confirmLoading: loading
|
|
1397
1405
|
}, modalProps);
|
|
1398
1406
|
|
|
1399
1407
|
// 合并默认表单属性和传入的属性
|
|
1400
|
-
const mergedFormProps = _objectSpread2({
|
|
1408
|
+
const mergedFormProps = _objectSpread2$1({
|
|
1401
1409
|
form: form,
|
|
1402
1410
|
name: "ptpForm",
|
|
1403
1411
|
labelCol: {
|
|
@@ -1406,11 +1414,10 @@ const PtpModal = _ref => {
|
|
|
1406
1414
|
wrapperCol: {
|
|
1407
1415
|
span: 16
|
|
1408
1416
|
},
|
|
1409
|
-
autoComplete: "off"
|
|
1410
|
-
onValuesChange: handleValueChange
|
|
1417
|
+
autoComplete: "off"
|
|
1411
1418
|
}, formProps);
|
|
1412
|
-
return /*#__PURE__*/jsx(StyledModal$
|
|
1413
|
-
children: /*#__PURE__*/jsx(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
|
|
1419
|
+
return /*#__PURE__*/jsx(StyledModal$3, _objectSpread2$1(_objectSpread2$1({}, mergedModalProps), {}, {
|
|
1420
|
+
children: /*#__PURE__*/jsx(Form, _objectSpread2$1(_objectSpread2$1({}, mergedFormProps), {}, {
|
|
1414
1421
|
children: ptpStatusArray.map(item => /*#__PURE__*/jsx(Form.Item, {
|
|
1415
1422
|
label: item.label,
|
|
1416
1423
|
name: item.key,
|
|
@@ -1533,17 +1540,21 @@ const SubmitButton = _ref2 => {
|
|
|
1533
1540
|
loading,
|
|
1534
1541
|
action,
|
|
1535
1542
|
children,
|
|
1536
|
-
disabled = false
|
|
1543
|
+
disabled = false,
|
|
1544
|
+
editButtonEle = null
|
|
1537
1545
|
} = _ref2;
|
|
1538
1546
|
return /*#__PURE__*/jsx("div", {
|
|
1539
1547
|
className: "submit-btn-wrapper",
|
|
1540
|
-
children: /*#__PURE__*/
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1548
|
+
children: /*#__PURE__*/jsxs(Space, {
|
|
1549
|
+
size: "middle",
|
|
1550
|
+
children: [editButtonEle, /*#__PURE__*/jsx(Button, {
|
|
1551
|
+
type: "default",
|
|
1552
|
+
className: "btn-gray",
|
|
1553
|
+
loading: loading,
|
|
1554
|
+
onClick: action,
|
|
1555
|
+
disabled: disabled,
|
|
1556
|
+
children: children
|
|
1557
|
+
})]
|
|
1547
1558
|
})
|
|
1548
1559
|
});
|
|
1549
1560
|
};
|
|
@@ -1552,8 +1563,11 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1552
1563
|
form,
|
|
1553
1564
|
onSave,
|
|
1554
1565
|
onLoad,
|
|
1566
|
+
onEdit,
|
|
1567
|
+
onCancelEdit,
|
|
1568
|
+
onUpdate,
|
|
1555
1569
|
isLoading,
|
|
1556
|
-
|
|
1570
|
+
isSavedPreset,
|
|
1557
1571
|
originalPresetData,
|
|
1558
1572
|
fields = {
|
|
1559
1573
|
name: {
|
|
@@ -1564,11 +1578,16 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1564
1578
|
},
|
|
1565
1579
|
texts = {
|
|
1566
1580
|
loadButton: "Load",
|
|
1567
|
-
saveButton: "Save"
|
|
1581
|
+
saveButton: "Save",
|
|
1582
|
+
editButton: "Edit",
|
|
1583
|
+
cancelButton: "Cancel"
|
|
1568
1584
|
},
|
|
1569
|
-
presetChanged
|
|
1585
|
+
presetChanged,
|
|
1586
|
+
// 作用:在切换选中预设时强制触发 Checkbox 的重新初始化
|
|
1587
|
+
enableEdit = true
|
|
1570
1588
|
} = _ref3;
|
|
1571
1589
|
const [initialSelected, setInitialSelected] = useState([]);
|
|
1590
|
+
const [isEditMode, setIsEditMode] = useState(false); // 是否进入编辑模式
|
|
1572
1591
|
const currentSelected = Form.useWatch('category_list', form) || [];
|
|
1573
1592
|
|
|
1574
1593
|
// 检查是否包含category_list字段
|
|
@@ -1582,23 +1601,53 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1582
1601
|
}
|
|
1583
1602
|
}, [presetChanged, form, hasCategoryList]); // 当presetChanged变化时更新
|
|
1584
1603
|
|
|
1604
|
+
// 当 isSavedPreset 或 presetChanged 变化时,重置编辑模式
|
|
1605
|
+
useEffect(() => {
|
|
1606
|
+
setIsEditMode(false);
|
|
1607
|
+
}, [isSavedPreset, presetChanged]);
|
|
1608
|
+
|
|
1585
1609
|
// 动态生成 checkbox 选项
|
|
1586
1610
|
const checkboxOptions = useMemo(() => {
|
|
1587
1611
|
if (!hasCategoryList) return [];
|
|
1588
1612
|
return fields.category_list.options.map(category => {
|
|
1589
1613
|
const isInitiallySelected = initialSelected.includes(category.name);
|
|
1590
|
-
const shouldDisable =
|
|
1591
|
-
return _objectSpread2(_objectSpread2({}, category), {}, {
|
|
1614
|
+
const shouldDisable = isSavedPreset ? !isInitiallySelected : false;
|
|
1615
|
+
return _objectSpread2$1(_objectSpread2$1({}, category), {}, {
|
|
1592
1616
|
disabled: shouldDisable,
|
|
1593
1617
|
initiallySelected: isInitiallySelected
|
|
1594
1618
|
});
|
|
1595
1619
|
});
|
|
1596
|
-
}, [initialSelected,
|
|
1620
|
+
}, [initialSelected, isSavedPreset, hasCategoryList, fields.category_list]);
|
|
1597
1621
|
const handleCheckboxChange = checkedValues => {
|
|
1598
1622
|
form.setFieldsValue({
|
|
1599
1623
|
category_list: checkedValues
|
|
1600
1624
|
});
|
|
1601
1625
|
};
|
|
1626
|
+
const handleEditClick = () => {
|
|
1627
|
+
setIsEditMode(true);
|
|
1628
|
+
if (onEdit) {
|
|
1629
|
+
onEdit(); // 如果有外部回调
|
|
1630
|
+
}
|
|
1631
|
+
};
|
|
1632
|
+
const handleCancelEdit = () => {
|
|
1633
|
+
if (originalPresetData) {
|
|
1634
|
+
form.setFieldsValue(originalPresetData);
|
|
1635
|
+
}
|
|
1636
|
+
setIsEditMode(false);
|
|
1637
|
+
if (onCancelEdit) {
|
|
1638
|
+
onCancelEdit();
|
|
1639
|
+
}
|
|
1640
|
+
};
|
|
1641
|
+
const handleSaveEdit = async () => {
|
|
1642
|
+
try {
|
|
1643
|
+
if (onUpdate) {
|
|
1644
|
+
await onUpdate();
|
|
1645
|
+
}
|
|
1646
|
+
setIsEditMode(false);
|
|
1647
|
+
} catch (error) {
|
|
1648
|
+
console.error('update fail:', error);
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1602
1651
|
const handleLoad = async () => {
|
|
1603
1652
|
try {
|
|
1604
1653
|
const formValues = await form.validateFields();
|
|
@@ -1613,6 +1662,11 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1613
1662
|
console.error('表单验证失败:', error);
|
|
1614
1663
|
}
|
|
1615
1664
|
};
|
|
1665
|
+
|
|
1666
|
+
// 在编辑模式下,name 和 description 可以编辑,但 categories 不可编辑
|
|
1667
|
+
const shouldDisableNameAndDesc = isSavedPreset && !isEditMode;
|
|
1668
|
+
const shouldDisableCategories = isEditMode; // categories 在编辑模式下总是不可编辑
|
|
1669
|
+
|
|
1616
1670
|
return /*#__PURE__*/jsxs(Flex, {
|
|
1617
1671
|
vertical: true,
|
|
1618
1672
|
style: {
|
|
@@ -1644,7 +1698,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1644
1698
|
required: true,
|
|
1645
1699
|
children: /*#__PURE__*/jsx(Input, {
|
|
1646
1700
|
placeholder: fields.name.placeholder,
|
|
1647
|
-
disabled:
|
|
1701
|
+
disabled: shouldDisableNameAndDesc
|
|
1648
1702
|
})
|
|
1649
1703
|
}), hasCategoryList && /*#__PURE__*/jsx(Form.Item, {
|
|
1650
1704
|
name: "category_list",
|
|
@@ -1666,9 +1720,10 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1666
1720
|
children: /*#__PURE__*/jsx(Checkbox.Group, {
|
|
1667
1721
|
className: "grid grid-cols-2 gap-2",
|
|
1668
1722
|
onChange: handleCheckboxChange,
|
|
1723
|
+
disabled: shouldDisableCategories,
|
|
1669
1724
|
children: checkboxOptions.map(category => /*#__PURE__*/jsx(Checkbox, {
|
|
1670
1725
|
value: category.name,
|
|
1671
|
-
disabled: category.disabled,
|
|
1726
|
+
disabled: category.disabled || shouldDisableCategories,
|
|
1672
1727
|
children: category.label
|
|
1673
1728
|
}, category.name))
|
|
1674
1729
|
})
|
|
@@ -1678,17 +1733,46 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1678
1733
|
children: /*#__PURE__*/jsx(Input.TextArea, {
|
|
1679
1734
|
rows: 4,
|
|
1680
1735
|
placeholder: fields.description.placeholder,
|
|
1681
|
-
disabled:
|
|
1736
|
+
disabled: shouldDisableNameAndDesc,
|
|
1682
1737
|
style: {
|
|
1683
1738
|
resize: 'none'
|
|
1684
1739
|
}
|
|
1685
1740
|
})
|
|
1686
1741
|
})]
|
|
1687
|
-
}),
|
|
1742
|
+
}), isSavedPreset ? isEditMode ?
|
|
1743
|
+
/*#__PURE__*/
|
|
1744
|
+
// 编辑模式下的按钮
|
|
1745
|
+
jsx("div", {
|
|
1746
|
+
className: "submit-btn-wrapper",
|
|
1747
|
+
children: /*#__PURE__*/jsxs(Space, {
|
|
1748
|
+
size: "middle",
|
|
1749
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
1750
|
+
type: "default",
|
|
1751
|
+
className: "btn-gray",
|
|
1752
|
+
onClick: handleCancelEdit,
|
|
1753
|
+
children: texts.cancelButton
|
|
1754
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
1755
|
+
type: "default",
|
|
1756
|
+
className: "btn-gray",
|
|
1757
|
+
onClick: handleSaveEdit,
|
|
1758
|
+
loading: isLoading,
|
|
1759
|
+
children: texts.saveButton
|
|
1760
|
+
})]
|
|
1761
|
+
})
|
|
1762
|
+
}) :
|
|
1763
|
+
/*#__PURE__*/
|
|
1764
|
+
// 非编辑模式下的按钮
|
|
1765
|
+
jsx(SubmitButton, _objectSpread2$1(_objectSpread2$1({
|
|
1688
1766
|
action: handleLoad
|
|
1689
1767
|
}, hasCategoryList && {
|
|
1690
1768
|
disabled: !currentSelected.length
|
|
1691
1769
|
}), {}, {
|
|
1770
|
+
editButtonEle: enableEdit ? /*#__PURE__*/jsx(Button, {
|
|
1771
|
+
type: "default",
|
|
1772
|
+
className: "btn-gray",
|
|
1773
|
+
onClick: handleEditClick,
|
|
1774
|
+
children: texts.editButton
|
|
1775
|
+
}) : null,
|
|
1692
1776
|
children: texts.loadButton
|
|
1693
1777
|
})) : /*#__PURE__*/jsx(SubmitButton, {
|
|
1694
1778
|
action: onSave,
|
|
@@ -1707,10 +1791,12 @@ const Preset = _ref => {
|
|
|
1707
1791
|
savePreset,
|
|
1708
1792
|
removePreset,
|
|
1709
1793
|
loadPreset,
|
|
1794
|
+
updatePreset,
|
|
1710
1795
|
onLoadSuccess,
|
|
1711
1796
|
// 加载成功后的回调
|
|
1712
1797
|
onLoadError,
|
|
1713
1798
|
// 加载失败后的回调
|
|
1799
|
+
|
|
1714
1800
|
// 字段配置
|
|
1715
1801
|
fields = {
|
|
1716
1802
|
name: {
|
|
@@ -1729,12 +1815,16 @@ const Preset = _ref => {
|
|
|
1729
1815
|
newButton: "New Preset",
|
|
1730
1816
|
removeButton: "Delete",
|
|
1731
1817
|
loadButton: "Load",
|
|
1732
|
-
saveButton: "Save"
|
|
1818
|
+
saveButton: "Save",
|
|
1819
|
+
editButton: "Edit",
|
|
1820
|
+
cancelButton: "Cancel"
|
|
1733
1821
|
},
|
|
1734
1822
|
// 样式定制
|
|
1735
1823
|
width = 1000,
|
|
1736
1824
|
height = 680,
|
|
1737
|
-
className = ""
|
|
1825
|
+
className = "",
|
|
1826
|
+
// 功能配置
|
|
1827
|
+
enableEdit = true
|
|
1738
1828
|
} = _ref;
|
|
1739
1829
|
const {
|
|
1740
1830
|
message: AntdMessage,
|
|
@@ -1874,7 +1964,7 @@ const Preset = _ref => {
|
|
|
1874
1964
|
}
|
|
1875
1965
|
});
|
|
1876
1966
|
try {
|
|
1877
|
-
await loadPreset(_objectSpread2({
|
|
1967
|
+
await loadPreset(_objectSpread2$1({
|
|
1878
1968
|
id: loadData.id
|
|
1879
1969
|
}, loadData.category_list && {
|
|
1880
1970
|
category_list: loadData.category_list
|
|
@@ -1946,12 +2036,53 @@ const Preset = _ref => {
|
|
|
1946
2036
|
setLoading(false);
|
|
1947
2037
|
}
|
|
1948
2038
|
}, [form, AntdMessage, texts, savePreset, getPresetList]);
|
|
2039
|
+
const handleUpdate = useCallback(async () => {
|
|
2040
|
+
if (!selectedPreset || !selectedPreset.id) {
|
|
2041
|
+
AntdMessage.error('No preset selected or preset ID is missing.');
|
|
2042
|
+
return;
|
|
2043
|
+
}
|
|
2044
|
+
setLoading(true);
|
|
2045
|
+
try {
|
|
2046
|
+
var _fields$name2;
|
|
2047
|
+
const values = await form.getFieldsValue();
|
|
2048
|
+
|
|
2049
|
+
// 验证预设名称
|
|
2050
|
+
if ((_fields$name2 = fields.name) !== null && _fields$name2 !== void 0 && _fields$name2.required) {
|
|
2051
|
+
if (!values.name || values.name.trim() === '') {
|
|
2052
|
+
AntdMessage.error('Name is required.');
|
|
2053
|
+
return; // 直接返回 不执行
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
await updatePreset({
|
|
2057
|
+
id: selectedPreset.id,
|
|
2058
|
+
name: values.name,
|
|
2059
|
+
description: values.description
|
|
2060
|
+
});
|
|
2061
|
+
|
|
2062
|
+
// 刷新列表
|
|
2063
|
+
const data = await getPresetList();
|
|
2064
|
+
const presets = (data === null || data === void 0 ? void 0 : data.preset_list) || data || [];
|
|
2065
|
+
setPresetList(presets);
|
|
2066
|
+
|
|
2067
|
+
// 更新当前选中的预设
|
|
2068
|
+
const updatedPreset = presets.find(item => item.id === selectedPreset.id);
|
|
2069
|
+
if (updatedPreset) {
|
|
2070
|
+
setSelectedPreset(updatedPreset);
|
|
2071
|
+
}
|
|
2072
|
+
AntdMessage.success(texts.successText);
|
|
2073
|
+
} catch (error) {
|
|
2074
|
+
console.error('Failed to update preset:', error);
|
|
2075
|
+
throw error;
|
|
2076
|
+
} finally {
|
|
2077
|
+
setLoading(false);
|
|
2078
|
+
}
|
|
2079
|
+
}, [form, AntdMessage, texts, updatePreset, selectedPreset]);
|
|
1949
2080
|
|
|
1950
2081
|
// 初始化数据
|
|
1951
2082
|
useEffect(() => {
|
|
1952
2083
|
fetchPresetList();
|
|
1953
2084
|
}, [fetchPresetList]);
|
|
1954
|
-
return /*#__PURE__*/jsx(StyledModal$
|
|
2085
|
+
return /*#__PURE__*/jsx(StyledModal$3, {
|
|
1955
2086
|
title: texts.title,
|
|
1956
2087
|
width: width,
|
|
1957
2088
|
open: open,
|
|
@@ -1991,16 +2122,20 @@ const Preset = _ref => {
|
|
|
1991
2122
|
form: form,
|
|
1992
2123
|
onSave: handleSave,
|
|
1993
2124
|
onLoad: handleLoadPreset,
|
|
2125
|
+
onUpdate: handleUpdate,
|
|
1994
2126
|
isLoading: loading,
|
|
1995
|
-
|
|
2127
|
+
isSavedPreset: !!(selectedPreset !== null && selectedPreset !== void 0 && selectedPreset.id),
|
|
1996
2128
|
originalPresetData: selectedPreset // 传递原始数据
|
|
1997
2129
|
,
|
|
1998
2130
|
fields: fields,
|
|
1999
2131
|
texts: {
|
|
2000
2132
|
loadButton: texts.loadButton,
|
|
2001
|
-
saveButton: texts.saveButton
|
|
2133
|
+
saveButton: texts.saveButton,
|
|
2134
|
+
editButton: texts.editButton,
|
|
2135
|
+
cancelButton: texts.cancelButton
|
|
2002
2136
|
},
|
|
2003
|
-
presetChanged: presetChanged
|
|
2137
|
+
presetChanged: presetChanged,
|
|
2138
|
+
enableEdit: enableEdit
|
|
2004
2139
|
}) : /*#__PURE__*/jsx(Flex, {
|
|
2005
2140
|
vertical: true,
|
|
2006
2141
|
justify: "center",
|
|
@@ -2030,7 +2165,7 @@ const UpgradeManager = _ref => {
|
|
|
2030
2165
|
statusPollingInterval = 1000,
|
|
2031
2166
|
children
|
|
2032
2167
|
} = _ref,
|
|
2033
|
-
dropdownProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
2168
|
+
dropdownProps = _objectWithoutProperties$1(_ref, _excluded$1);
|
|
2034
2169
|
const [upgradeElement] = useUpgrade$1({
|
|
2035
2170
|
menuItems,
|
|
2036
2171
|
onMenuClick,
|
|
@@ -2046,7 +2181,7 @@ const UpgradeManager = _ref => {
|
|
|
2046
2181
|
const dropdownElement = upgradeElement.props.children[0];
|
|
2047
2182
|
const otherElements = upgradeElement.props.children.slice(1);
|
|
2048
2183
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2049
|
-
children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2(_objectSpread2({}, dropdownProps), dropdownElement.props), {}, {
|
|
2184
|
+
children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, dropdownProps), dropdownElement.props), {}, {
|
|
2050
2185
|
children: children
|
|
2051
2186
|
})), otherElements]
|
|
2052
2187
|
});
|
|
@@ -2061,15 +2196,15 @@ UpgradeManager.defaultProps = {
|
|
|
2061
2196
|
};
|
|
2062
2197
|
var UpgradeManager$1 = UpgradeManager;
|
|
2063
2198
|
|
|
2064
|
-
function getDefaultExportFromCjs (x) {
|
|
2199
|
+
function getDefaultExportFromCjs$1 (x) {
|
|
2065
2200
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
2066
2201
|
}
|
|
2067
2202
|
|
|
2068
|
-
var propTypes = {exports: {}};
|
|
2203
|
+
var propTypes$1 = {exports: {}};
|
|
2069
2204
|
|
|
2070
|
-
var reactIs = {exports: {}};
|
|
2205
|
+
var reactIs$1 = {exports: {}};
|
|
2071
2206
|
|
|
2072
|
-
var reactIs_production_min = {};
|
|
2207
|
+
var reactIs_production_min$1 = {};
|
|
2073
2208
|
|
|
2074
2209
|
/** @license React v16.13.1
|
|
2075
2210
|
* react-is.production.min.js
|
|
@@ -2080,21 +2215,21 @@ var reactIs_production_min = {};
|
|
|
2080
2215
|
* LICENSE file in the root directory of this source tree.
|
|
2081
2216
|
*/
|
|
2082
2217
|
|
|
2083
|
-
var hasRequiredReactIs_production_min;
|
|
2218
|
+
var hasRequiredReactIs_production_min$1;
|
|
2084
2219
|
|
|
2085
|
-
function requireReactIs_production_min () {
|
|
2086
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
2087
|
-
hasRequiredReactIs_production_min = 1;
|
|
2220
|
+
function requireReactIs_production_min$1 () {
|
|
2221
|
+
if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1;
|
|
2222
|
+
hasRequiredReactIs_production_min$1 = 1;
|
|
2088
2223
|
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?
|
|
2089
2224
|
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;
|
|
2090
|
-
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.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
2091
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
|
2092
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
2093
|
-
reactIs_production_min.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.typeOf=z;
|
|
2094
|
-
return reactIs_production_min;
|
|
2225
|
+
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$1.AsyncMode=l;reactIs_production_min$1.ConcurrentMode=m;reactIs_production_min$1.ContextConsumer=k;reactIs_production_min$1.ContextProvider=h;reactIs_production_min$1.Element=c;reactIs_production_min$1.ForwardRef=n;reactIs_production_min$1.Fragment=e;reactIs_production_min$1.Lazy=t;reactIs_production_min$1.Memo=r;reactIs_production_min$1.Portal=d;
|
|
2226
|
+
reactIs_production_min$1.Profiler=g;reactIs_production_min$1.StrictMode=f;reactIs_production_min$1.Suspense=p;reactIs_production_min$1.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$1.isConcurrentMode=A;reactIs_production_min$1.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$1.isContextProvider=function(a){return z(a)===h};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$1.isForwardRef=function(a){return z(a)===n};reactIs_production_min$1.isFragment=function(a){return z(a)===e};reactIs_production_min$1.isLazy=function(a){return z(a)===t};
|
|
2227
|
+
reactIs_production_min$1.isMemo=function(a){return z(a)===r};reactIs_production_min$1.isPortal=function(a){return z(a)===d};reactIs_production_min$1.isProfiler=function(a){return z(a)===g};reactIs_production_min$1.isStrictMode=function(a){return z(a)===f};reactIs_production_min$1.isSuspense=function(a){return z(a)===p};
|
|
2228
|
+
reactIs_production_min$1.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$1.typeOf=z;
|
|
2229
|
+
return reactIs_production_min$1;
|
|
2095
2230
|
}
|
|
2096
2231
|
|
|
2097
|
-
var reactIs_development = {};
|
|
2232
|
+
var reactIs_development$1 = {};
|
|
2098
2233
|
|
|
2099
2234
|
/** @license React v16.13.1
|
|
2100
2235
|
* react-is.development.js
|
|
@@ -2105,11 +2240,11 @@ var reactIs_development = {};
|
|
|
2105
2240
|
* LICENSE file in the root directory of this source tree.
|
|
2106
2241
|
*/
|
|
2107
2242
|
|
|
2108
|
-
var hasRequiredReactIs_development;
|
|
2243
|
+
var hasRequiredReactIs_development$1;
|
|
2109
2244
|
|
|
2110
|
-
function requireReactIs_development () {
|
|
2111
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
2112
|
-
hasRequiredReactIs_development = 1;
|
|
2245
|
+
function requireReactIs_development$1 () {
|
|
2246
|
+
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
|
2247
|
+
hasRequiredReactIs_development$1 = 1;
|
|
2113
2248
|
|
|
2114
2249
|
|
|
2115
2250
|
|
|
@@ -2250,51 +2385,51 @@ function requireReactIs_development () {
|
|
|
2250
2385
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
2251
2386
|
}
|
|
2252
2387
|
|
|
2253
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
2254
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
2255
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
2256
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
2257
|
-
reactIs_development.Element = Element;
|
|
2258
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
2259
|
-
reactIs_development.Fragment = Fragment;
|
|
2260
|
-
reactIs_development.Lazy = Lazy;
|
|
2261
|
-
reactIs_development.Memo = Memo;
|
|
2262
|
-
reactIs_development.Portal = Portal;
|
|
2263
|
-
reactIs_development.Profiler = Profiler;
|
|
2264
|
-
reactIs_development.StrictMode = StrictMode;
|
|
2265
|
-
reactIs_development.Suspense = Suspense;
|
|
2266
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
2267
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
2268
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
2269
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
2270
|
-
reactIs_development.isElement = isElement;
|
|
2271
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
2272
|
-
reactIs_development.isFragment = isFragment;
|
|
2273
|
-
reactIs_development.isLazy = isLazy;
|
|
2274
|
-
reactIs_development.isMemo = isMemo;
|
|
2275
|
-
reactIs_development.isPortal = isPortal;
|
|
2276
|
-
reactIs_development.isProfiler = isProfiler;
|
|
2277
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
2278
|
-
reactIs_development.isSuspense = isSuspense;
|
|
2279
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
2280
|
-
reactIs_development.typeOf = typeOf;
|
|
2388
|
+
reactIs_development$1.AsyncMode = AsyncMode;
|
|
2389
|
+
reactIs_development$1.ConcurrentMode = ConcurrentMode;
|
|
2390
|
+
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
2391
|
+
reactIs_development$1.ContextProvider = ContextProvider;
|
|
2392
|
+
reactIs_development$1.Element = Element;
|
|
2393
|
+
reactIs_development$1.ForwardRef = ForwardRef;
|
|
2394
|
+
reactIs_development$1.Fragment = Fragment;
|
|
2395
|
+
reactIs_development$1.Lazy = Lazy;
|
|
2396
|
+
reactIs_development$1.Memo = Memo;
|
|
2397
|
+
reactIs_development$1.Portal = Portal;
|
|
2398
|
+
reactIs_development$1.Profiler = Profiler;
|
|
2399
|
+
reactIs_development$1.StrictMode = StrictMode;
|
|
2400
|
+
reactIs_development$1.Suspense = Suspense;
|
|
2401
|
+
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
2402
|
+
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
2403
|
+
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
2404
|
+
reactIs_development$1.isContextProvider = isContextProvider;
|
|
2405
|
+
reactIs_development$1.isElement = isElement;
|
|
2406
|
+
reactIs_development$1.isForwardRef = isForwardRef;
|
|
2407
|
+
reactIs_development$1.isFragment = isFragment;
|
|
2408
|
+
reactIs_development$1.isLazy = isLazy;
|
|
2409
|
+
reactIs_development$1.isMemo = isMemo;
|
|
2410
|
+
reactIs_development$1.isPortal = isPortal;
|
|
2411
|
+
reactIs_development$1.isProfiler = isProfiler;
|
|
2412
|
+
reactIs_development$1.isStrictMode = isStrictMode;
|
|
2413
|
+
reactIs_development$1.isSuspense = isSuspense;
|
|
2414
|
+
reactIs_development$1.isValidElementType = isValidElementType;
|
|
2415
|
+
reactIs_development$1.typeOf = typeOf;
|
|
2281
2416
|
})();
|
|
2282
2417
|
}
|
|
2283
|
-
return reactIs_development;
|
|
2418
|
+
return reactIs_development$1;
|
|
2284
2419
|
}
|
|
2285
2420
|
|
|
2286
|
-
var hasRequiredReactIs;
|
|
2421
|
+
var hasRequiredReactIs$1;
|
|
2287
2422
|
|
|
2288
|
-
function requireReactIs () {
|
|
2289
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
2290
|
-
hasRequiredReactIs = 1;
|
|
2423
|
+
function requireReactIs$1 () {
|
|
2424
|
+
if (hasRequiredReactIs$1) return reactIs$1.exports;
|
|
2425
|
+
hasRequiredReactIs$1 = 1;
|
|
2291
2426
|
|
|
2292
2427
|
if (process.env.NODE_ENV === 'production') {
|
|
2293
|
-
reactIs.exports = requireReactIs_production_min();
|
|
2428
|
+
reactIs$1.exports = requireReactIs_production_min$1();
|
|
2294
2429
|
} else {
|
|
2295
|
-
reactIs.exports = requireReactIs_development();
|
|
2430
|
+
reactIs$1.exports = requireReactIs_development$1();
|
|
2296
2431
|
}
|
|
2297
|
-
return reactIs.exports;
|
|
2432
|
+
return reactIs$1.exports;
|
|
2298
2433
|
}
|
|
2299
2434
|
|
|
2300
2435
|
/*
|
|
@@ -2303,12 +2438,12 @@ object-assign
|
|
|
2303
2438
|
@license MIT
|
|
2304
2439
|
*/
|
|
2305
2440
|
|
|
2306
|
-
var objectAssign;
|
|
2307
|
-
var hasRequiredObjectAssign;
|
|
2441
|
+
var objectAssign$1;
|
|
2442
|
+
var hasRequiredObjectAssign$1;
|
|
2308
2443
|
|
|
2309
|
-
function requireObjectAssign () {
|
|
2310
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
2311
|
-
hasRequiredObjectAssign = 1;
|
|
2444
|
+
function requireObjectAssign$1 () {
|
|
2445
|
+
if (hasRequiredObjectAssign$1) return objectAssign$1;
|
|
2446
|
+
hasRequiredObjectAssign$1 = 1;
|
|
2312
2447
|
/* eslint-disable no-unused-vars */
|
|
2313
2448
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
2314
2449
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -2366,7 +2501,7 @@ function requireObjectAssign () {
|
|
|
2366
2501
|
}
|
|
2367
2502
|
}
|
|
2368
2503
|
|
|
2369
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
2504
|
+
objectAssign$1 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
2370
2505
|
var from;
|
|
2371
2506
|
var to = toObject(target);
|
|
2372
2507
|
var symbols;
|
|
@@ -2392,7 +2527,7 @@ function requireObjectAssign () {
|
|
|
2392
2527
|
|
|
2393
2528
|
return to;
|
|
2394
2529
|
};
|
|
2395
|
-
return objectAssign;
|
|
2530
|
+
return objectAssign$1;
|
|
2396
2531
|
}
|
|
2397
2532
|
|
|
2398
2533
|
/**
|
|
@@ -2402,27 +2537,27 @@ function requireObjectAssign () {
|
|
|
2402
2537
|
* LICENSE file in the root directory of this source tree.
|
|
2403
2538
|
*/
|
|
2404
2539
|
|
|
2405
|
-
var ReactPropTypesSecret_1;
|
|
2406
|
-
var hasRequiredReactPropTypesSecret;
|
|
2540
|
+
var ReactPropTypesSecret_1$1;
|
|
2541
|
+
var hasRequiredReactPropTypesSecret$1;
|
|
2407
2542
|
|
|
2408
|
-
function requireReactPropTypesSecret () {
|
|
2409
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
2410
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
2543
|
+
function requireReactPropTypesSecret$1 () {
|
|
2544
|
+
if (hasRequiredReactPropTypesSecret$1) return ReactPropTypesSecret_1$1;
|
|
2545
|
+
hasRequiredReactPropTypesSecret$1 = 1;
|
|
2411
2546
|
|
|
2412
2547
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
2413
2548
|
|
|
2414
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
2415
|
-
return ReactPropTypesSecret_1;
|
|
2549
|
+
ReactPropTypesSecret_1$1 = ReactPropTypesSecret;
|
|
2550
|
+
return ReactPropTypesSecret_1$1;
|
|
2416
2551
|
}
|
|
2417
2552
|
|
|
2418
|
-
var has;
|
|
2419
|
-
var hasRequiredHas;
|
|
2553
|
+
var has$1;
|
|
2554
|
+
var hasRequiredHas$1;
|
|
2420
2555
|
|
|
2421
|
-
function requireHas () {
|
|
2422
|
-
if (hasRequiredHas) return has;
|
|
2423
|
-
hasRequiredHas = 1;
|
|
2424
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2425
|
-
return has;
|
|
2556
|
+
function requireHas$1 () {
|
|
2557
|
+
if (hasRequiredHas$1) return has$1;
|
|
2558
|
+
hasRequiredHas$1 = 1;
|
|
2559
|
+
has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2560
|
+
return has$1;
|
|
2426
2561
|
}
|
|
2427
2562
|
|
|
2428
2563
|
/**
|
|
@@ -2432,19 +2567,19 @@ function requireHas () {
|
|
|
2432
2567
|
* LICENSE file in the root directory of this source tree.
|
|
2433
2568
|
*/
|
|
2434
2569
|
|
|
2435
|
-
var checkPropTypes_1;
|
|
2436
|
-
var hasRequiredCheckPropTypes;
|
|
2570
|
+
var checkPropTypes_1$1;
|
|
2571
|
+
var hasRequiredCheckPropTypes$1;
|
|
2437
2572
|
|
|
2438
|
-
function requireCheckPropTypes () {
|
|
2439
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
2440
|
-
hasRequiredCheckPropTypes = 1;
|
|
2573
|
+
function requireCheckPropTypes$1 () {
|
|
2574
|
+
if (hasRequiredCheckPropTypes$1) return checkPropTypes_1$1;
|
|
2575
|
+
hasRequiredCheckPropTypes$1 = 1;
|
|
2441
2576
|
|
|
2442
2577
|
var printWarning = function() {};
|
|
2443
2578
|
|
|
2444
2579
|
if (process.env.NODE_ENV !== 'production') {
|
|
2445
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
|
|
2580
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$1();
|
|
2446
2581
|
var loggedTypeFailures = {};
|
|
2447
|
-
var has = /*@__PURE__*/ requireHas();
|
|
2582
|
+
var has = /*@__PURE__*/ requireHas$1();
|
|
2448
2583
|
|
|
2449
2584
|
printWarning = function(text) {
|
|
2450
2585
|
var message = 'Warning: ' + text;
|
|
@@ -2532,8 +2667,8 @@ function requireCheckPropTypes () {
|
|
|
2532
2667
|
}
|
|
2533
2668
|
};
|
|
2534
2669
|
|
|
2535
|
-
checkPropTypes_1 = checkPropTypes;
|
|
2536
|
-
return checkPropTypes_1;
|
|
2670
|
+
checkPropTypes_1$1 = checkPropTypes;
|
|
2671
|
+
return checkPropTypes_1$1;
|
|
2537
2672
|
}
|
|
2538
2673
|
|
|
2539
2674
|
/**
|
|
@@ -2543,19 +2678,19 @@ function requireCheckPropTypes () {
|
|
|
2543
2678
|
* LICENSE file in the root directory of this source tree.
|
|
2544
2679
|
*/
|
|
2545
2680
|
|
|
2546
|
-
var factoryWithTypeCheckers;
|
|
2547
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
2681
|
+
var factoryWithTypeCheckers$1;
|
|
2682
|
+
var hasRequiredFactoryWithTypeCheckers$1;
|
|
2548
2683
|
|
|
2549
|
-
function requireFactoryWithTypeCheckers () {
|
|
2550
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
2551
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
2684
|
+
function requireFactoryWithTypeCheckers$1 () {
|
|
2685
|
+
if (hasRequiredFactoryWithTypeCheckers$1) return factoryWithTypeCheckers$1;
|
|
2686
|
+
hasRequiredFactoryWithTypeCheckers$1 = 1;
|
|
2552
2687
|
|
|
2553
|
-
var ReactIs = requireReactIs();
|
|
2554
|
-
var assign = requireObjectAssign();
|
|
2688
|
+
var ReactIs = requireReactIs$1();
|
|
2689
|
+
var assign = requireObjectAssign$1();
|
|
2555
2690
|
|
|
2556
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
|
|
2557
|
-
var has = /*@__PURE__*/ requireHas();
|
|
2558
|
-
var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes();
|
|
2691
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$1();
|
|
2692
|
+
var has = /*@__PURE__*/ requireHas$1();
|
|
2693
|
+
var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$1();
|
|
2559
2694
|
|
|
2560
2695
|
var printWarning = function() {};
|
|
2561
2696
|
|
|
@@ -2578,7 +2713,7 @@ function requireFactoryWithTypeCheckers () {
|
|
|
2578
2713
|
return null;
|
|
2579
2714
|
}
|
|
2580
2715
|
|
|
2581
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
2716
|
+
factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
2582
2717
|
/* global Symbol */
|
|
2583
2718
|
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
2584
2719
|
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
@@ -3151,7 +3286,7 @@ function requireFactoryWithTypeCheckers () {
|
|
|
3151
3286
|
|
|
3152
3287
|
return ReactPropTypes;
|
|
3153
3288
|
};
|
|
3154
|
-
return factoryWithTypeCheckers;
|
|
3289
|
+
return factoryWithTypeCheckers$1;
|
|
3155
3290
|
}
|
|
3156
3291
|
|
|
3157
3292
|
/**
|
|
@@ -3161,20 +3296,20 @@ function requireFactoryWithTypeCheckers () {
|
|
|
3161
3296
|
* LICENSE file in the root directory of this source tree.
|
|
3162
3297
|
*/
|
|
3163
3298
|
|
|
3164
|
-
var factoryWithThrowingShims;
|
|
3165
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
3299
|
+
var factoryWithThrowingShims$1;
|
|
3300
|
+
var hasRequiredFactoryWithThrowingShims$1;
|
|
3166
3301
|
|
|
3167
|
-
function requireFactoryWithThrowingShims () {
|
|
3168
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
3169
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
3302
|
+
function requireFactoryWithThrowingShims$1 () {
|
|
3303
|
+
if (hasRequiredFactoryWithThrowingShims$1) return factoryWithThrowingShims$1;
|
|
3304
|
+
hasRequiredFactoryWithThrowingShims$1 = 1;
|
|
3170
3305
|
|
|
3171
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
|
|
3306
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$1();
|
|
3172
3307
|
|
|
3173
3308
|
function emptyFunction() {}
|
|
3174
3309
|
function emptyFunctionWithReset() {}
|
|
3175
3310
|
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3176
3311
|
|
|
3177
|
-
factoryWithThrowingShims = function() {
|
|
3312
|
+
factoryWithThrowingShims$1 = function() {
|
|
3178
3313
|
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3179
3314
|
if (secret === ReactPropTypesSecret) {
|
|
3180
3315
|
// It is still safe when called from React.
|
|
@@ -3222,7 +3357,7 @@ function requireFactoryWithThrowingShims () {
|
|
|
3222
3357
|
|
|
3223
3358
|
return ReactPropTypes;
|
|
3224
3359
|
};
|
|
3225
|
-
return factoryWithThrowingShims;
|
|
3360
|
+
return factoryWithThrowingShims$1;
|
|
3226
3361
|
}
|
|
3227
3362
|
|
|
3228
3363
|
/**
|
|
@@ -3232,28 +3367,28 @@ function requireFactoryWithThrowingShims () {
|
|
|
3232
3367
|
* LICENSE file in the root directory of this source tree.
|
|
3233
3368
|
*/
|
|
3234
3369
|
|
|
3235
|
-
var hasRequiredPropTypes;
|
|
3370
|
+
var hasRequiredPropTypes$1;
|
|
3236
3371
|
|
|
3237
|
-
function requirePropTypes () {
|
|
3238
|
-
if (hasRequiredPropTypes) return propTypes.exports;
|
|
3239
|
-
hasRequiredPropTypes = 1;
|
|
3372
|
+
function requirePropTypes$1 () {
|
|
3373
|
+
if (hasRequiredPropTypes$1) return propTypes$1.exports;
|
|
3374
|
+
hasRequiredPropTypes$1 = 1;
|
|
3240
3375
|
if (process.env.NODE_ENV !== 'production') {
|
|
3241
|
-
var ReactIs = requireReactIs();
|
|
3376
|
+
var ReactIs = requireReactIs$1();
|
|
3242
3377
|
|
|
3243
3378
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
3244
3379
|
// http://fb.me/prop-types-in-prod
|
|
3245
3380
|
var throwOnDirectAccess = true;
|
|
3246
|
-
propTypes.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
3381
|
+
propTypes$1.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$1()(ReactIs.isElement, throwOnDirectAccess);
|
|
3247
3382
|
} else {
|
|
3248
3383
|
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
3249
3384
|
// http://fb.me/prop-types-in-prod
|
|
3250
|
-
propTypes.exports = /*@__PURE__*/ requireFactoryWithThrowingShims()();
|
|
3385
|
+
propTypes$1.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$1()();
|
|
3251
3386
|
}
|
|
3252
|
-
return propTypes.exports;
|
|
3387
|
+
return propTypes$1.exports;
|
|
3253
3388
|
}
|
|
3254
3389
|
|
|
3255
|
-
var propTypesExports = /*@__PURE__*/ requirePropTypes();
|
|
3256
|
-
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
3390
|
+
var propTypesExports$1 = /*@__PURE__*/ requirePropTypes$1();
|
|
3391
|
+
var PropTypes$1 = /*@__PURE__*/getDefaultExportFromCjs$1(propTypesExports$1);
|
|
3257
3392
|
|
|
3258
3393
|
const SystemOperations = _ref => {
|
|
3259
3394
|
let {
|
|
@@ -3335,15 +3470,15 @@ const SystemOperations = _ref => {
|
|
|
3335
3470
|
});
|
|
3336
3471
|
};
|
|
3337
3472
|
SystemOperations.propTypes = {
|
|
3338
|
-
onPowerOff: PropTypes.func,
|
|
3339
|
-
onRestart: PropTypes.func,
|
|
3340
|
-
powerOffLabel: PropTypes.string,
|
|
3341
|
-
restartLabel: PropTypes.string,
|
|
3342
|
-
iconClassName: PropTypes.string,
|
|
3343
|
-
confirmTitle: PropTypes.string,
|
|
3344
|
-
cancelText: PropTypes.string,
|
|
3345
|
-
okText: PropTypes.string,
|
|
3346
|
-
run: PropTypes.func
|
|
3473
|
+
onPowerOff: PropTypes$1.func,
|
|
3474
|
+
onRestart: PropTypes$1.func,
|
|
3475
|
+
powerOffLabel: PropTypes$1.string,
|
|
3476
|
+
restartLabel: PropTypes$1.string,
|
|
3477
|
+
iconClassName: PropTypes$1.string,
|
|
3478
|
+
confirmTitle: PropTypes$1.string,
|
|
3479
|
+
cancelText: PropTypes$1.string,
|
|
3480
|
+
okText: PropTypes$1.string,
|
|
3481
|
+
run: PropTypes$1.func
|
|
3347
3482
|
};
|
|
3348
3483
|
var SystemOperations$1 = SystemOperations;
|
|
3349
3484
|
|
|
@@ -3386,10 +3521,10 @@ const useSpaLogo = function () {
|
|
|
3386
3521
|
}, "logo")];
|
|
3387
3522
|
};
|
|
3388
3523
|
useSpaLogo.propTypes = {
|
|
3389
|
-
logoUrl: PropTypes.string,
|
|
3390
|
-
logoWidth: PropTypes.number,
|
|
3391
|
-
logoAlt: PropTypes.string,
|
|
3392
|
-
onClick: PropTypes.func
|
|
3524
|
+
logoUrl: PropTypes$1.string,
|
|
3525
|
+
logoWidth: PropTypes$1.number,
|
|
3526
|
+
logoAlt: PropTypes$1.string,
|
|
3527
|
+
onClick: PropTypes$1.func
|
|
3393
3528
|
};
|
|
3394
3529
|
var useSpaLogo$1 = useSpaLogo;
|
|
3395
3530
|
|
|
@@ -3435,9 +3570,7 @@ const CommonHeader = _ref => {
|
|
|
3435
3570
|
className = '',
|
|
3436
3571
|
style = {},
|
|
3437
3572
|
// 新增插槽
|
|
3438
|
-
leftContent
|
|
3439
|
-
// 左侧额外内容
|
|
3440
|
-
rightContent = null // 右侧额外内容
|
|
3573
|
+
leftContent // 左侧额外内容
|
|
3441
3574
|
} = _ref;
|
|
3442
3575
|
const [logo] = useSpaLogo$1(logoProps);
|
|
3443
3576
|
|
|
@@ -3471,7 +3604,7 @@ const CommonHeader = _ref => {
|
|
|
3471
3604
|
}), /*#__PURE__*/jsxs(Flex, {
|
|
3472
3605
|
align: "center",
|
|
3473
3606
|
gap: 10,
|
|
3474
|
-
children: [
|
|
3607
|
+
children: [showHardwareUsage && usageElement, /*#__PURE__*/jsxs("div", {
|
|
3475
3608
|
className: "header-controls",
|
|
3476
3609
|
children: [menuElement && /*#__PURE__*/jsx("div", {
|
|
3477
3610
|
className: "control-icon",
|
|
@@ -3491,23 +3624,23 @@ const CommonHeader = _ref => {
|
|
|
3491
3624
|
|
|
3492
3625
|
// PropTypes 类型检查
|
|
3493
3626
|
CommonHeader.propTypes = {
|
|
3494
|
-
menuElement: PropTypes.node,
|
|
3495
|
-
productInfo: PropTypes.shape({
|
|
3496
|
-
productName: PropTypes.string,
|
|
3497
|
-
version: PropTypes.string
|
|
3627
|
+
menuElement: PropTypes$1.node,
|
|
3628
|
+
productInfo: PropTypes$1.shape({
|
|
3629
|
+
productName: PropTypes$1.string,
|
|
3630
|
+
version: PropTypes$1.string
|
|
3498
3631
|
}),
|
|
3499
|
-
showLogo: PropTypes.bool,
|
|
3500
|
-
showProductInfo: PropTypes.bool,
|
|
3501
|
-
showHardwareUsage: PropTypes.bool,
|
|
3502
|
-
showSystemOperations: PropTypes.bool,
|
|
3503
|
-
onPowerOff: PropTypes.func,
|
|
3504
|
-
onRestart: PropTypes.func,
|
|
3505
|
-
onRun: PropTypes.func,
|
|
3506
|
-
hardwareMonitorUrl: PropTypes.string,
|
|
3507
|
-
getSocketUrl: PropTypes.func,
|
|
3508
|
-
logoProps: PropTypes.object,
|
|
3509
|
-
className: PropTypes.string,
|
|
3510
|
-
style: PropTypes.object
|
|
3632
|
+
showLogo: PropTypes$1.bool,
|
|
3633
|
+
showProductInfo: PropTypes$1.bool,
|
|
3634
|
+
showHardwareUsage: PropTypes$1.bool,
|
|
3635
|
+
showSystemOperations: PropTypes$1.bool,
|
|
3636
|
+
onPowerOff: PropTypes$1.func,
|
|
3637
|
+
onRestart: PropTypes$1.func,
|
|
3638
|
+
onRun: PropTypes$1.func,
|
|
3639
|
+
hardwareMonitorUrl: PropTypes$1.string,
|
|
3640
|
+
getSocketUrl: PropTypes$1.func,
|
|
3641
|
+
logoProps: PropTypes$1.object,
|
|
3642
|
+
className: PropTypes$1.string,
|
|
3643
|
+
style: PropTypes$1.object
|
|
3511
3644
|
};
|
|
3512
3645
|
var CommonHeader$1 = CommonHeader;
|
|
3513
3646
|
|
|
@@ -3537,10 +3670,10 @@ const LSMLabelField = props => {
|
|
|
3537
3670
|
};
|
|
3538
3671
|
loadLsmData();
|
|
3539
3672
|
}, [fetchLsmData]);
|
|
3540
|
-
return /*#__PURE__*/jsx(Form.Item, _objectSpread2(_objectSpread2({
|
|
3673
|
+
return /*#__PURE__*/jsx(Form.Item, _objectSpread2$1(_objectSpread2$1({
|
|
3541
3674
|
label: label
|
|
3542
3675
|
}, formItemProps), {}, {
|
|
3543
|
-
children: /*#__PURE__*/jsx(Select, _objectSpread2(_objectSpread2(_objectSpread2({}, field), selectProps), {}, {
|
|
3676
|
+
children: /*#__PURE__*/jsx(Select, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, field), selectProps), {}, {
|
|
3544
3677
|
options: lsmList,
|
|
3545
3678
|
fieldNames: fieldNames,
|
|
3546
3679
|
allowClear: true,
|
|
@@ -3556,6 +3689,1467 @@ const LSMLabelField = props => {
|
|
|
3556
3689
|
};
|
|
3557
3690
|
var LSMLabelField$1 = /*#__PURE__*/memo(LSMLabelField);
|
|
3558
3691
|
|
|
3692
|
+
function _defineProperty(e, r, t) {
|
|
3693
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
3694
|
+
value: t,
|
|
3695
|
+
enumerable: !0,
|
|
3696
|
+
configurable: !0,
|
|
3697
|
+
writable: !0
|
|
3698
|
+
}) : e[r] = t, e;
|
|
3699
|
+
}
|
|
3700
|
+
function ownKeys(e, r) {
|
|
3701
|
+
var t = Object.keys(e);
|
|
3702
|
+
if (Object.getOwnPropertySymbols) {
|
|
3703
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
3704
|
+
r && (o = o.filter(function (r) {
|
|
3705
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
3706
|
+
})), t.push.apply(t, o);
|
|
3707
|
+
}
|
|
3708
|
+
return t;
|
|
3709
|
+
}
|
|
3710
|
+
function _objectSpread2(e) {
|
|
3711
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
3712
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
3713
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
3714
|
+
_defineProperty(e, r, t[r]);
|
|
3715
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
3716
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
3717
|
+
});
|
|
3718
|
+
}
|
|
3719
|
+
return e;
|
|
3720
|
+
}
|
|
3721
|
+
function _objectWithoutProperties(e, t) {
|
|
3722
|
+
if (null == e) return {};
|
|
3723
|
+
var o,
|
|
3724
|
+
r,
|
|
3725
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
3726
|
+
if (Object.getOwnPropertySymbols) {
|
|
3727
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
3728
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
3729
|
+
}
|
|
3730
|
+
return i;
|
|
3731
|
+
}
|
|
3732
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
3733
|
+
if (null == r) return {};
|
|
3734
|
+
var t = {};
|
|
3735
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
3736
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
3737
|
+
t[n] = r[n];
|
|
3738
|
+
}
|
|
3739
|
+
return t;
|
|
3740
|
+
}
|
|
3741
|
+
function _toPrimitive(t, r) {
|
|
3742
|
+
if ("object" != typeof t || !t) return t;
|
|
3743
|
+
var e = t[Symbol.toPrimitive];
|
|
3744
|
+
if (void 0 !== e) {
|
|
3745
|
+
var i = e.call(t, r || "default");
|
|
3746
|
+
if ("object" != typeof i) return i;
|
|
3747
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3748
|
+
}
|
|
3749
|
+
return ("string" === r ? String : Number)(t);
|
|
3750
|
+
}
|
|
3751
|
+
function _toPropertyKey(t) {
|
|
3752
|
+
var i = _toPrimitive(t, "string");
|
|
3753
|
+
return "symbol" == typeof i ? i : i + "";
|
|
3754
|
+
}
|
|
3755
|
+
const _excluded$2 = ["width", "okText", "cancelText", "styles"];
|
|
3756
|
+
const StyledModal = props => {
|
|
3757
|
+
const {
|
|
3758
|
+
width = "520px",
|
|
3759
|
+
okText = "Apply",
|
|
3760
|
+
cancelText = "Close",
|
|
3761
|
+
styles: propStyles = {}
|
|
3762
|
+
} = props,
|
|
3763
|
+
restProps = _objectWithoutProperties(props, _excluded$2);
|
|
3764
|
+
|
|
3765
|
+
// 基础样式配置
|
|
3766
|
+
const baseStyles = {
|
|
3767
|
+
content: {
|
|
3768
|
+
padding: 0
|
|
3769
|
+
// background: "#282828"
|
|
3770
|
+
},
|
|
3771
|
+
header: {
|
|
3772
|
+
marginBottom: 0,
|
|
3773
|
+
padding: 0,
|
|
3774
|
+
paddingBlock: 16,
|
|
3775
|
+
paddingInlineStart: 24,
|
|
3776
|
+
background: "#000000"
|
|
3777
|
+
},
|
|
3778
|
+
body: {
|
|
3779
|
+
paddingBlock: 20,
|
|
3780
|
+
paddingInline: 24
|
|
3781
|
+
},
|
|
3782
|
+
footer: {
|
|
3783
|
+
marginTop: 0,
|
|
3784
|
+
padding: 0,
|
|
3785
|
+
paddingBlockEnd: 20,
|
|
3786
|
+
paddingInline: 24
|
|
3787
|
+
}
|
|
3788
|
+
};
|
|
3789
|
+
|
|
3790
|
+
// 合并样式
|
|
3791
|
+
const styles = _objectSpread2(_objectSpread2({}, baseStyles), propStyles);
|
|
3792
|
+
return /*#__PURE__*/jsx(Modal, _objectSpread2({
|
|
3793
|
+
width: width,
|
|
3794
|
+
okText: okText,
|
|
3795
|
+
cancelText: cancelText,
|
|
3796
|
+
styles: styles
|
|
3797
|
+
}, restProps));
|
|
3798
|
+
};
|
|
3799
|
+
var StyledModal$1 = StyledModal;
|
|
3800
|
+
function getDefaultExportFromCjs(x) {
|
|
3801
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3802
|
+
}
|
|
3803
|
+
var propTypes = {
|
|
3804
|
+
exports: {}
|
|
3805
|
+
};
|
|
3806
|
+
var reactIs = {
|
|
3807
|
+
exports: {}
|
|
3808
|
+
};
|
|
3809
|
+
var reactIs_production_min = {};
|
|
3810
|
+
|
|
3811
|
+
/** @license React v16.13.1
|
|
3812
|
+
* react-is.production.min.js
|
|
3813
|
+
*
|
|
3814
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3815
|
+
*
|
|
3816
|
+
* This source code is licensed under the MIT license found in the
|
|
3817
|
+
* LICENSE file in the root directory of this source tree.
|
|
3818
|
+
*/
|
|
3819
|
+
|
|
3820
|
+
var hasRequiredReactIs_production_min;
|
|
3821
|
+
function requireReactIs_production_min() {
|
|
3822
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
3823
|
+
hasRequiredReactIs_production_min = 1;
|
|
3824
|
+
var b = "function" === typeof Symbol && Symbol.for,
|
|
3825
|
+
c = b ? Symbol.for("react.element") : 60103,
|
|
3826
|
+
d = b ? Symbol.for("react.portal") : 60106,
|
|
3827
|
+
e = b ? Symbol.for("react.fragment") : 60107,
|
|
3828
|
+
f = b ? Symbol.for("react.strict_mode") : 60108,
|
|
3829
|
+
g = b ? Symbol.for("react.profiler") : 60114,
|
|
3830
|
+
h = b ? Symbol.for("react.provider") : 60109,
|
|
3831
|
+
k = b ? Symbol.for("react.context") : 60110,
|
|
3832
|
+
l = b ? Symbol.for("react.async_mode") : 60111,
|
|
3833
|
+
m = b ? Symbol.for("react.concurrent_mode") : 60111,
|
|
3834
|
+
n = b ? Symbol.for("react.forward_ref") : 60112,
|
|
3835
|
+
p = b ? Symbol.for("react.suspense") : 60113,
|
|
3836
|
+
q = b ? Symbol.for("react.suspense_list") : 60120,
|
|
3837
|
+
r = b ? Symbol.for("react.memo") : 60115,
|
|
3838
|
+
t = b ? Symbol.for("react.lazy") : 60116,
|
|
3839
|
+
v = b ? Symbol.for("react.block") : 60121,
|
|
3840
|
+
w = b ? Symbol.for("react.fundamental") : 60117,
|
|
3841
|
+
x = b ? Symbol.for("react.responder") : 60118,
|
|
3842
|
+
y = b ? Symbol.for("react.scope") : 60119;
|
|
3843
|
+
function z(a) {
|
|
3844
|
+
if ("object" === typeof a && null !== a) {
|
|
3845
|
+
var u = a.$$typeof;
|
|
3846
|
+
switch (u) {
|
|
3847
|
+
case c:
|
|
3848
|
+
switch (a = a.type, a) {
|
|
3849
|
+
case l:
|
|
3850
|
+
case m:
|
|
3851
|
+
case e:
|
|
3852
|
+
case g:
|
|
3853
|
+
case f:
|
|
3854
|
+
case p:
|
|
3855
|
+
return a;
|
|
3856
|
+
default:
|
|
3857
|
+
switch (a = a && a.$$typeof, a) {
|
|
3858
|
+
case k:
|
|
3859
|
+
case n:
|
|
3860
|
+
case t:
|
|
3861
|
+
case r:
|
|
3862
|
+
case h:
|
|
3863
|
+
return a;
|
|
3864
|
+
default:
|
|
3865
|
+
return u;
|
|
3866
|
+
}
|
|
3867
|
+
}
|
|
3868
|
+
case d:
|
|
3869
|
+
return u;
|
|
3870
|
+
}
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
function A(a) {
|
|
3874
|
+
return z(a) === m;
|
|
3875
|
+
}
|
|
3876
|
+
reactIs_production_min.AsyncMode = l;
|
|
3877
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
3878
|
+
reactIs_production_min.ContextConsumer = k;
|
|
3879
|
+
reactIs_production_min.ContextProvider = h;
|
|
3880
|
+
reactIs_production_min.Element = c;
|
|
3881
|
+
reactIs_production_min.ForwardRef = n;
|
|
3882
|
+
reactIs_production_min.Fragment = e;
|
|
3883
|
+
reactIs_production_min.Lazy = t;
|
|
3884
|
+
reactIs_production_min.Memo = r;
|
|
3885
|
+
reactIs_production_min.Portal = d;
|
|
3886
|
+
reactIs_production_min.Profiler = g;
|
|
3887
|
+
reactIs_production_min.StrictMode = f;
|
|
3888
|
+
reactIs_production_min.Suspense = p;
|
|
3889
|
+
reactIs_production_min.isAsyncMode = function (a) {
|
|
3890
|
+
return A(a) || z(a) === l;
|
|
3891
|
+
};
|
|
3892
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
3893
|
+
reactIs_production_min.isContextConsumer = function (a) {
|
|
3894
|
+
return z(a) === k;
|
|
3895
|
+
};
|
|
3896
|
+
reactIs_production_min.isContextProvider = function (a) {
|
|
3897
|
+
return z(a) === h;
|
|
3898
|
+
};
|
|
3899
|
+
reactIs_production_min.isElement = function (a) {
|
|
3900
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
3901
|
+
};
|
|
3902
|
+
reactIs_production_min.isForwardRef = function (a) {
|
|
3903
|
+
return z(a) === n;
|
|
3904
|
+
};
|
|
3905
|
+
reactIs_production_min.isFragment = function (a) {
|
|
3906
|
+
return z(a) === e;
|
|
3907
|
+
};
|
|
3908
|
+
reactIs_production_min.isLazy = function (a) {
|
|
3909
|
+
return z(a) === t;
|
|
3910
|
+
};
|
|
3911
|
+
reactIs_production_min.isMemo = function (a) {
|
|
3912
|
+
return z(a) === r;
|
|
3913
|
+
};
|
|
3914
|
+
reactIs_production_min.isPortal = function (a) {
|
|
3915
|
+
return z(a) === d;
|
|
3916
|
+
};
|
|
3917
|
+
reactIs_production_min.isProfiler = function (a) {
|
|
3918
|
+
return z(a) === g;
|
|
3919
|
+
};
|
|
3920
|
+
reactIs_production_min.isStrictMode = function (a) {
|
|
3921
|
+
return z(a) === f;
|
|
3922
|
+
};
|
|
3923
|
+
reactIs_production_min.isSuspense = function (a) {
|
|
3924
|
+
return z(a) === p;
|
|
3925
|
+
};
|
|
3926
|
+
reactIs_production_min.isValidElementType = function (a) {
|
|
3927
|
+
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);
|
|
3928
|
+
};
|
|
3929
|
+
reactIs_production_min.typeOf = z;
|
|
3930
|
+
return reactIs_production_min;
|
|
3931
|
+
}
|
|
3932
|
+
var reactIs_development = {};
|
|
3933
|
+
|
|
3934
|
+
/** @license React v16.13.1
|
|
3935
|
+
* react-is.development.js
|
|
3936
|
+
*
|
|
3937
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3938
|
+
*
|
|
3939
|
+
* This source code is licensed under the MIT license found in the
|
|
3940
|
+
* LICENSE file in the root directory of this source tree.
|
|
3941
|
+
*/
|
|
3942
|
+
|
|
3943
|
+
var hasRequiredReactIs_development;
|
|
3944
|
+
function requireReactIs_development() {
|
|
3945
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
3946
|
+
hasRequiredReactIs_development = 1;
|
|
3947
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3948
|
+
(function () {
|
|
3949
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
3950
|
+
// nor polyfill, then a plain number is used for performance.
|
|
3951
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
3952
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
3953
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
3954
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
3955
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
3956
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
3957
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
3958
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
3959
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
3960
|
+
|
|
3961
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
3962
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
3963
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
3964
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
3965
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
3966
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
3967
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
3968
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
3969
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
3970
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
3971
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
3972
|
+
function isValidElementType(type) {
|
|
3973
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
3974
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
3975
|
+
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);
|
|
3976
|
+
}
|
|
3977
|
+
function typeOf(object) {
|
|
3978
|
+
if (typeof object === 'object' && object !== null) {
|
|
3979
|
+
var $$typeof = object.$$typeof;
|
|
3980
|
+
switch ($$typeof) {
|
|
3981
|
+
case REACT_ELEMENT_TYPE:
|
|
3982
|
+
var type = object.type;
|
|
3983
|
+
switch (type) {
|
|
3984
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
3985
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
3986
|
+
case REACT_FRAGMENT_TYPE:
|
|
3987
|
+
case REACT_PROFILER_TYPE:
|
|
3988
|
+
case REACT_STRICT_MODE_TYPE:
|
|
3989
|
+
case REACT_SUSPENSE_TYPE:
|
|
3990
|
+
return type;
|
|
3991
|
+
default:
|
|
3992
|
+
var $$typeofType = type && type.$$typeof;
|
|
3993
|
+
switch ($$typeofType) {
|
|
3994
|
+
case REACT_CONTEXT_TYPE:
|
|
3995
|
+
case REACT_FORWARD_REF_TYPE:
|
|
3996
|
+
case REACT_LAZY_TYPE:
|
|
3997
|
+
case REACT_MEMO_TYPE:
|
|
3998
|
+
case REACT_PROVIDER_TYPE:
|
|
3999
|
+
return $$typeofType;
|
|
4000
|
+
default:
|
|
4001
|
+
return $$typeof;
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
case REACT_PORTAL_TYPE:
|
|
4005
|
+
return $$typeof;
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
4008
|
+
return undefined;
|
|
4009
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
4010
|
+
|
|
4011
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
4012
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
4013
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
4014
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
4015
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
4016
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
4017
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
4018
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
4019
|
+
var Memo = REACT_MEMO_TYPE;
|
|
4020
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
4021
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
4022
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
4023
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
4024
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
4025
|
+
|
|
4026
|
+
function isAsyncMode(object) {
|
|
4027
|
+
{
|
|
4028
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
4029
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
4030
|
+
|
|
4031
|
+
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.');
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
4035
|
+
}
|
|
4036
|
+
function isConcurrentMode(object) {
|
|
4037
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
4038
|
+
}
|
|
4039
|
+
function isContextConsumer(object) {
|
|
4040
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
4041
|
+
}
|
|
4042
|
+
function isContextProvider(object) {
|
|
4043
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
4044
|
+
}
|
|
4045
|
+
function isElement(object) {
|
|
4046
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
4047
|
+
}
|
|
4048
|
+
function isForwardRef(object) {
|
|
4049
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
4050
|
+
}
|
|
4051
|
+
function isFragment(object) {
|
|
4052
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
4053
|
+
}
|
|
4054
|
+
function isLazy(object) {
|
|
4055
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
4056
|
+
}
|
|
4057
|
+
function isMemo(object) {
|
|
4058
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
4059
|
+
}
|
|
4060
|
+
function isPortal(object) {
|
|
4061
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
4062
|
+
}
|
|
4063
|
+
function isProfiler(object) {
|
|
4064
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
4065
|
+
}
|
|
4066
|
+
function isStrictMode(object) {
|
|
4067
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
4068
|
+
}
|
|
4069
|
+
function isSuspense(object) {
|
|
4070
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
4071
|
+
}
|
|
4072
|
+
reactIs_development.AsyncMode = AsyncMode;
|
|
4073
|
+
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
4074
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
4075
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
4076
|
+
reactIs_development.Element = Element;
|
|
4077
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
4078
|
+
reactIs_development.Fragment = Fragment;
|
|
4079
|
+
reactIs_development.Lazy = Lazy;
|
|
4080
|
+
reactIs_development.Memo = Memo;
|
|
4081
|
+
reactIs_development.Portal = Portal;
|
|
4082
|
+
reactIs_development.Profiler = Profiler;
|
|
4083
|
+
reactIs_development.StrictMode = StrictMode;
|
|
4084
|
+
reactIs_development.Suspense = Suspense;
|
|
4085
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
4086
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
4087
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
4088
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
4089
|
+
reactIs_development.isElement = isElement;
|
|
4090
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
4091
|
+
reactIs_development.isFragment = isFragment;
|
|
4092
|
+
reactIs_development.isLazy = isLazy;
|
|
4093
|
+
reactIs_development.isMemo = isMemo;
|
|
4094
|
+
reactIs_development.isPortal = isPortal;
|
|
4095
|
+
reactIs_development.isProfiler = isProfiler;
|
|
4096
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
4097
|
+
reactIs_development.isSuspense = isSuspense;
|
|
4098
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
4099
|
+
reactIs_development.typeOf = typeOf;
|
|
4100
|
+
})();
|
|
4101
|
+
}
|
|
4102
|
+
return reactIs_development;
|
|
4103
|
+
}
|
|
4104
|
+
var hasRequiredReactIs;
|
|
4105
|
+
function requireReactIs() {
|
|
4106
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
4107
|
+
hasRequiredReactIs = 1;
|
|
4108
|
+
if (process.env.NODE_ENV === 'production') {
|
|
4109
|
+
reactIs.exports = requireReactIs_production_min();
|
|
4110
|
+
} else {
|
|
4111
|
+
reactIs.exports = requireReactIs_development();
|
|
4112
|
+
}
|
|
4113
|
+
return reactIs.exports;
|
|
4114
|
+
}
|
|
4115
|
+
|
|
4116
|
+
/*
|
|
4117
|
+
object-assign
|
|
4118
|
+
(c) Sindre Sorhus
|
|
4119
|
+
@license MIT
|
|
4120
|
+
*/
|
|
4121
|
+
|
|
4122
|
+
var objectAssign;
|
|
4123
|
+
var hasRequiredObjectAssign;
|
|
4124
|
+
function requireObjectAssign() {
|
|
4125
|
+
if (hasRequiredObjectAssign) return objectAssign;
|
|
4126
|
+
hasRequiredObjectAssign = 1;
|
|
4127
|
+
/* eslint-disable no-unused-vars */
|
|
4128
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
4129
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4130
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
4131
|
+
function toObject(val) {
|
|
4132
|
+
if (val === null || val === undefined) {
|
|
4133
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
4134
|
+
}
|
|
4135
|
+
return Object(val);
|
|
4136
|
+
}
|
|
4137
|
+
function shouldUseNative() {
|
|
4138
|
+
try {
|
|
4139
|
+
if (!Object.assign) {
|
|
4140
|
+
return false;
|
|
4141
|
+
}
|
|
4142
|
+
|
|
4143
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
4144
|
+
|
|
4145
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
4146
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
4147
|
+
test1[5] = 'de';
|
|
4148
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
4149
|
+
return false;
|
|
4150
|
+
}
|
|
4151
|
+
|
|
4152
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
4153
|
+
var test2 = {};
|
|
4154
|
+
for (var i = 0; i < 10; i++) {
|
|
4155
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
4156
|
+
}
|
|
4157
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
4158
|
+
return test2[n];
|
|
4159
|
+
});
|
|
4160
|
+
if (order2.join('') !== '0123456789') {
|
|
4161
|
+
return false;
|
|
4162
|
+
}
|
|
4163
|
+
|
|
4164
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
4165
|
+
var test3 = {};
|
|
4166
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
4167
|
+
test3[letter] = letter;
|
|
4168
|
+
});
|
|
4169
|
+
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
|
|
4170
|
+
return false;
|
|
4171
|
+
}
|
|
4172
|
+
return true;
|
|
4173
|
+
} catch (err) {
|
|
4174
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
4175
|
+
return false;
|
|
4176
|
+
}
|
|
4177
|
+
}
|
|
4178
|
+
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
4179
|
+
var from;
|
|
4180
|
+
var to = toObject(target);
|
|
4181
|
+
var symbols;
|
|
4182
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
4183
|
+
from = Object(arguments[s]);
|
|
4184
|
+
for (var key in from) {
|
|
4185
|
+
if (hasOwnProperty.call(from, key)) {
|
|
4186
|
+
to[key] = from[key];
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
if (getOwnPropertySymbols) {
|
|
4190
|
+
symbols = getOwnPropertySymbols(from);
|
|
4191
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
4192
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
4193
|
+
to[symbols[i]] = from[symbols[i]];
|
|
4194
|
+
}
|
|
4195
|
+
}
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4198
|
+
return to;
|
|
4199
|
+
};
|
|
4200
|
+
return objectAssign;
|
|
4201
|
+
}
|
|
4202
|
+
|
|
4203
|
+
/**
|
|
4204
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4205
|
+
*
|
|
4206
|
+
* This source code is licensed under the MIT license found in the
|
|
4207
|
+
* LICENSE file in the root directory of this source tree.
|
|
4208
|
+
*/
|
|
4209
|
+
|
|
4210
|
+
var ReactPropTypesSecret_1;
|
|
4211
|
+
var hasRequiredReactPropTypesSecret;
|
|
4212
|
+
function requireReactPropTypesSecret() {
|
|
4213
|
+
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
4214
|
+
hasRequiredReactPropTypesSecret = 1;
|
|
4215
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
4216
|
+
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
4217
|
+
return ReactPropTypesSecret_1;
|
|
4218
|
+
}
|
|
4219
|
+
var has;
|
|
4220
|
+
var hasRequiredHas;
|
|
4221
|
+
function requireHas() {
|
|
4222
|
+
if (hasRequiredHas) return has;
|
|
4223
|
+
hasRequiredHas = 1;
|
|
4224
|
+
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
4225
|
+
return has;
|
|
4226
|
+
}
|
|
4227
|
+
|
|
4228
|
+
/**
|
|
4229
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4230
|
+
*
|
|
4231
|
+
* This source code is licensed under the MIT license found in the
|
|
4232
|
+
* LICENSE file in the root directory of this source tree.
|
|
4233
|
+
*/
|
|
4234
|
+
|
|
4235
|
+
var checkPropTypes_1;
|
|
4236
|
+
var hasRequiredCheckPropTypes;
|
|
4237
|
+
function requireCheckPropTypes() {
|
|
4238
|
+
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
4239
|
+
hasRequiredCheckPropTypes = 1;
|
|
4240
|
+
var printWarning = function () {};
|
|
4241
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4242
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret();
|
|
4243
|
+
var loggedTypeFailures = {};
|
|
4244
|
+
var has = /*@__PURE__*/requireHas();
|
|
4245
|
+
printWarning = function (text) {
|
|
4246
|
+
var message = 'Warning: ' + text;
|
|
4247
|
+
if (typeof console !== 'undefined') {
|
|
4248
|
+
console.error(message);
|
|
4249
|
+
}
|
|
4250
|
+
try {
|
|
4251
|
+
// --- Welcome to debugging React ---
|
|
4252
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
4253
|
+
// to find the callsite that caused this warning to fire.
|
|
4254
|
+
throw new Error(message);
|
|
4255
|
+
} catch (x) {/**/}
|
|
4256
|
+
};
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4259
|
+
/**
|
|
4260
|
+
* Assert that the values match with the type specs.
|
|
4261
|
+
* Error messages are memorized and will only be shown once.
|
|
4262
|
+
*
|
|
4263
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
4264
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
4265
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
4266
|
+
* @param {string} componentName Name of the component for error messages.
|
|
4267
|
+
* @param {?Function} getStack Returns the component stack.
|
|
4268
|
+
* @private
|
|
4269
|
+
*/
|
|
4270
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
4271
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4272
|
+
for (var typeSpecName in typeSpecs) {
|
|
4273
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
4274
|
+
var error;
|
|
4275
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
4276
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
4277
|
+
// After these have been cleaned up, we'll let them throw.
|
|
4278
|
+
try {
|
|
4279
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
4280
|
+
// behavior as without this statement except with a better message.
|
|
4281
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
4282
|
+
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`.');
|
|
4283
|
+
err.name = 'Invariant Violation';
|
|
4284
|
+
throw err;
|
|
4285
|
+
}
|
|
4286
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
4287
|
+
} catch (ex) {
|
|
4288
|
+
error = ex;
|
|
4289
|
+
}
|
|
4290
|
+
if (error && !(error instanceof Error)) {
|
|
4291
|
+
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).');
|
|
4292
|
+
}
|
|
4293
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
4294
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
4295
|
+
// same error.
|
|
4296
|
+
loggedTypeFailures[error.message] = true;
|
|
4297
|
+
var stack = getStack ? getStack() : '';
|
|
4298
|
+
printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
|
|
4299
|
+
}
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
}
|
|
4304
|
+
|
|
4305
|
+
/**
|
|
4306
|
+
* Resets warning cache when testing.
|
|
4307
|
+
*
|
|
4308
|
+
* @private
|
|
4309
|
+
*/
|
|
4310
|
+
checkPropTypes.resetWarningCache = function () {
|
|
4311
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4312
|
+
loggedTypeFailures = {};
|
|
4313
|
+
}
|
|
4314
|
+
};
|
|
4315
|
+
checkPropTypes_1 = checkPropTypes;
|
|
4316
|
+
return checkPropTypes_1;
|
|
4317
|
+
}
|
|
4318
|
+
|
|
4319
|
+
/**
|
|
4320
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4321
|
+
*
|
|
4322
|
+
* This source code is licensed under the MIT license found in the
|
|
4323
|
+
* LICENSE file in the root directory of this source tree.
|
|
4324
|
+
*/
|
|
4325
|
+
|
|
4326
|
+
var factoryWithTypeCheckers;
|
|
4327
|
+
var hasRequiredFactoryWithTypeCheckers;
|
|
4328
|
+
function requireFactoryWithTypeCheckers() {
|
|
4329
|
+
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
4330
|
+
hasRequiredFactoryWithTypeCheckers = 1;
|
|
4331
|
+
var ReactIs = requireReactIs();
|
|
4332
|
+
var assign = requireObjectAssign();
|
|
4333
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret();
|
|
4334
|
+
var has = /*@__PURE__*/requireHas();
|
|
4335
|
+
var checkPropTypes = /*@__PURE__*/requireCheckPropTypes();
|
|
4336
|
+
var printWarning = function () {};
|
|
4337
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4338
|
+
printWarning = function (text) {
|
|
4339
|
+
var message = 'Warning: ' + text;
|
|
4340
|
+
if (typeof console !== 'undefined') {
|
|
4341
|
+
console.error(message);
|
|
4342
|
+
}
|
|
4343
|
+
try {
|
|
4344
|
+
// --- Welcome to debugging React ---
|
|
4345
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
4346
|
+
// to find the callsite that caused this warning to fire.
|
|
4347
|
+
throw new Error(message);
|
|
4348
|
+
} catch (x) {}
|
|
4349
|
+
};
|
|
4350
|
+
}
|
|
4351
|
+
function emptyFunctionThatReturnsNull() {
|
|
4352
|
+
return null;
|
|
4353
|
+
}
|
|
4354
|
+
factoryWithTypeCheckers = function (isValidElement, throwOnDirectAccess) {
|
|
4355
|
+
/* global Symbol */
|
|
4356
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
4357
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
4358
|
+
|
|
4359
|
+
/**
|
|
4360
|
+
* Returns the iterator method function contained on the iterable object.
|
|
4361
|
+
*
|
|
4362
|
+
* Be sure to invoke the function with the iterable as context:
|
|
4363
|
+
*
|
|
4364
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
4365
|
+
* if (iteratorFn) {
|
|
4366
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
4367
|
+
* ...
|
|
4368
|
+
* }
|
|
4369
|
+
*
|
|
4370
|
+
* @param {?object} maybeIterable
|
|
4371
|
+
* @return {?function}
|
|
4372
|
+
*/
|
|
4373
|
+
function getIteratorFn(maybeIterable) {
|
|
4374
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
4375
|
+
if (typeof iteratorFn === 'function') {
|
|
4376
|
+
return iteratorFn;
|
|
4377
|
+
}
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
/**
|
|
4381
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
4382
|
+
* supplied to React components. Example usage:
|
|
4383
|
+
*
|
|
4384
|
+
* var Props = require('ReactPropTypes');
|
|
4385
|
+
* var MyArticle = React.createClass({
|
|
4386
|
+
* propTypes: {
|
|
4387
|
+
* // An optional string prop named "description".
|
|
4388
|
+
* description: Props.string,
|
|
4389
|
+
*
|
|
4390
|
+
* // A required enum prop named "category".
|
|
4391
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
4392
|
+
*
|
|
4393
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
4394
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
4395
|
+
* },
|
|
4396
|
+
* render: function() { ... }
|
|
4397
|
+
* });
|
|
4398
|
+
*
|
|
4399
|
+
* A more formal specification of how these methods are used:
|
|
4400
|
+
*
|
|
4401
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
4402
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
4403
|
+
*
|
|
4404
|
+
* Each and every declaration produces a function with the same signature. This
|
|
4405
|
+
* allows the creation of custom validation functions. For example:
|
|
4406
|
+
*
|
|
4407
|
+
* var MyLink = React.createClass({
|
|
4408
|
+
* propTypes: {
|
|
4409
|
+
* // An optional string or URI prop named "href".
|
|
4410
|
+
* href: function(props, propName, componentName) {
|
|
4411
|
+
* var propValue = props[propName];
|
|
4412
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
4413
|
+
* !(propValue instanceof URI)) {
|
|
4414
|
+
* return new Error(
|
|
4415
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
4416
|
+
* componentName
|
|
4417
|
+
* );
|
|
4418
|
+
* }
|
|
4419
|
+
* }
|
|
4420
|
+
* },
|
|
4421
|
+
* render: function() {...}
|
|
4422
|
+
* });
|
|
4423
|
+
*
|
|
4424
|
+
* @internal
|
|
4425
|
+
*/
|
|
4426
|
+
|
|
4427
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
4428
|
+
|
|
4429
|
+
// Important!
|
|
4430
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
4431
|
+
var ReactPropTypes = {
|
|
4432
|
+
array: createPrimitiveTypeChecker('array'),
|
|
4433
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
4434
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
4435
|
+
func: createPrimitiveTypeChecker('function'),
|
|
4436
|
+
number: createPrimitiveTypeChecker('number'),
|
|
4437
|
+
object: createPrimitiveTypeChecker('object'),
|
|
4438
|
+
string: createPrimitiveTypeChecker('string'),
|
|
4439
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
4440
|
+
any: createAnyTypeChecker(),
|
|
4441
|
+
arrayOf: createArrayOfTypeChecker,
|
|
4442
|
+
element: createElementTypeChecker(),
|
|
4443
|
+
elementType: createElementTypeTypeChecker(),
|
|
4444
|
+
instanceOf: createInstanceTypeChecker,
|
|
4445
|
+
node: createNodeChecker(),
|
|
4446
|
+
objectOf: createObjectOfTypeChecker,
|
|
4447
|
+
oneOf: createEnumTypeChecker,
|
|
4448
|
+
oneOfType: createUnionTypeChecker,
|
|
4449
|
+
shape: createShapeTypeChecker,
|
|
4450
|
+
exact: createStrictShapeTypeChecker
|
|
4451
|
+
};
|
|
4452
|
+
|
|
4453
|
+
/**
|
|
4454
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
4455
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
4456
|
+
*/
|
|
4457
|
+
/*eslint-disable no-self-compare*/
|
|
4458
|
+
function is(x, y) {
|
|
4459
|
+
// SameValue algorithm
|
|
4460
|
+
if (x === y) {
|
|
4461
|
+
// Steps 1-5, 7-10
|
|
4462
|
+
// Steps 6.b-6.e: +0 != -0
|
|
4463
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
4464
|
+
} else {
|
|
4465
|
+
// Step 6.a: NaN == NaN
|
|
4466
|
+
return x !== x && y !== y;
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
/*eslint-enable no-self-compare*/
|
|
4470
|
+
|
|
4471
|
+
/**
|
|
4472
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
4473
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
4474
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
4475
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
4476
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
4477
|
+
*/
|
|
4478
|
+
function PropTypeError(message, data) {
|
|
4479
|
+
this.message = message;
|
|
4480
|
+
this.data = data && typeof data === 'object' ? data : {};
|
|
4481
|
+
this.stack = '';
|
|
4482
|
+
}
|
|
4483
|
+
// Make `instanceof Error` still work for returned errors.
|
|
4484
|
+
PropTypeError.prototype = Error.prototype;
|
|
4485
|
+
function createChainableTypeChecker(validate) {
|
|
4486
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4487
|
+
var manualPropTypeCallCache = {};
|
|
4488
|
+
var manualPropTypeWarningCount = 0;
|
|
4489
|
+
}
|
|
4490
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
4491
|
+
componentName = componentName || ANONYMOUS;
|
|
4492
|
+
propFullName = propFullName || propName;
|
|
4493
|
+
if (secret !== ReactPropTypesSecret) {
|
|
4494
|
+
if (throwOnDirectAccess) {
|
|
4495
|
+
// New behavior only for users of `prop-types` package
|
|
4496
|
+
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');
|
|
4497
|
+
err.name = 'Invariant Violation';
|
|
4498
|
+
throw err;
|
|
4499
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
4500
|
+
// Old behavior for people using React.PropTypes
|
|
4501
|
+
var cacheKey = componentName + ':' + propName;
|
|
4502
|
+
if (!manualPropTypeCallCache[cacheKey] &&
|
|
4503
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
4504
|
+
manualPropTypeWarningCount < 3) {
|
|
4505
|
+
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.');
|
|
4506
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
4507
|
+
manualPropTypeWarningCount++;
|
|
4508
|
+
}
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
if (props[propName] == null) {
|
|
4512
|
+
if (isRequired) {
|
|
4513
|
+
if (props[propName] === null) {
|
|
4514
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
4515
|
+
}
|
|
4516
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
4517
|
+
}
|
|
4518
|
+
return null;
|
|
4519
|
+
} else {
|
|
4520
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
4521
|
+
}
|
|
4522
|
+
}
|
|
4523
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
4524
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
4525
|
+
return chainedCheckType;
|
|
4526
|
+
}
|
|
4527
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
4528
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
4529
|
+
var propValue = props[propName];
|
|
4530
|
+
var propType = getPropType(propValue);
|
|
4531
|
+
if (propType !== expectedType) {
|
|
4532
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
4533
|
+
// check, but we can offer a more precise error message here rather than
|
|
4534
|
+
// 'of type `object`'.
|
|
4535
|
+
var preciseType = getPreciseType(propValue);
|
|
4536
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
|
|
4537
|
+
expectedType: expectedType
|
|
4538
|
+
});
|
|
4539
|
+
}
|
|
4540
|
+
return null;
|
|
4541
|
+
}
|
|
4542
|
+
return createChainableTypeChecker(validate);
|
|
4543
|
+
}
|
|
4544
|
+
function createAnyTypeChecker() {
|
|
4545
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
4546
|
+
}
|
|
4547
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
4548
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4549
|
+
if (typeof typeChecker !== 'function') {
|
|
4550
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
4551
|
+
}
|
|
4552
|
+
var propValue = props[propName];
|
|
4553
|
+
if (!Array.isArray(propValue)) {
|
|
4554
|
+
var propType = getPropType(propValue);
|
|
4555
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
4556
|
+
}
|
|
4557
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
4558
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
4559
|
+
if (error instanceof Error) {
|
|
4560
|
+
return error;
|
|
4561
|
+
}
|
|
4562
|
+
}
|
|
4563
|
+
return null;
|
|
4564
|
+
}
|
|
4565
|
+
return createChainableTypeChecker(validate);
|
|
4566
|
+
}
|
|
4567
|
+
function createElementTypeChecker() {
|
|
4568
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4569
|
+
var propValue = props[propName];
|
|
4570
|
+
if (!isValidElement(propValue)) {
|
|
4571
|
+
var propType = getPropType(propValue);
|
|
4572
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
4573
|
+
}
|
|
4574
|
+
return null;
|
|
4575
|
+
}
|
|
4576
|
+
return createChainableTypeChecker(validate);
|
|
4577
|
+
}
|
|
4578
|
+
function createElementTypeTypeChecker() {
|
|
4579
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4580
|
+
var propValue = props[propName];
|
|
4581
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
4582
|
+
var propType = getPropType(propValue);
|
|
4583
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
4584
|
+
}
|
|
4585
|
+
return null;
|
|
4586
|
+
}
|
|
4587
|
+
return createChainableTypeChecker(validate);
|
|
4588
|
+
}
|
|
4589
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
4590
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4591
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
4592
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
4593
|
+
var actualClassName = getClassName(props[propName]);
|
|
4594
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
4595
|
+
}
|
|
4596
|
+
return null;
|
|
4597
|
+
}
|
|
4598
|
+
return createChainableTypeChecker(validate);
|
|
4599
|
+
}
|
|
4600
|
+
function createEnumTypeChecker(expectedValues) {
|
|
4601
|
+
if (!Array.isArray(expectedValues)) {
|
|
4602
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4603
|
+
if (arguments.length > 1) {
|
|
4604
|
+
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]).');
|
|
4605
|
+
} else {
|
|
4606
|
+
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4609
|
+
return emptyFunctionThatReturnsNull;
|
|
4610
|
+
}
|
|
4611
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4612
|
+
var propValue = props[propName];
|
|
4613
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
4614
|
+
if (is(propValue, expectedValues[i])) {
|
|
4615
|
+
return null;
|
|
4616
|
+
}
|
|
4617
|
+
}
|
|
4618
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
4619
|
+
var type = getPreciseType(value);
|
|
4620
|
+
if (type === 'symbol') {
|
|
4621
|
+
return String(value);
|
|
4622
|
+
}
|
|
4623
|
+
return value;
|
|
4624
|
+
});
|
|
4625
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
4626
|
+
}
|
|
4627
|
+
return createChainableTypeChecker(validate);
|
|
4628
|
+
}
|
|
4629
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
4630
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4631
|
+
if (typeof typeChecker !== 'function') {
|
|
4632
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
4633
|
+
}
|
|
4634
|
+
var propValue = props[propName];
|
|
4635
|
+
var propType = getPropType(propValue);
|
|
4636
|
+
if (propType !== 'object') {
|
|
4637
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
4638
|
+
}
|
|
4639
|
+
for (var key in propValue) {
|
|
4640
|
+
if (has(propValue, key)) {
|
|
4641
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4642
|
+
if (error instanceof Error) {
|
|
4643
|
+
return error;
|
|
4644
|
+
}
|
|
4645
|
+
}
|
|
4646
|
+
}
|
|
4647
|
+
return null;
|
|
4648
|
+
}
|
|
4649
|
+
return createChainableTypeChecker(validate);
|
|
4650
|
+
}
|
|
4651
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
4652
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
4653
|
+
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
4654
|
+
return emptyFunctionThatReturnsNull;
|
|
4655
|
+
}
|
|
4656
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4657
|
+
var checker = arrayOfTypeCheckers[i];
|
|
4658
|
+
if (typeof checker !== 'function') {
|
|
4659
|
+
printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
|
|
4660
|
+
return emptyFunctionThatReturnsNull;
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4664
|
+
var expectedTypes = [];
|
|
4665
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4666
|
+
var checker = arrayOfTypeCheckers[i];
|
|
4667
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
4668
|
+
if (checkerResult == null) {
|
|
4669
|
+
return null;
|
|
4670
|
+
}
|
|
4671
|
+
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
4672
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
4673
|
+
}
|
|
4674
|
+
}
|
|
4675
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
|
|
4676
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
4677
|
+
}
|
|
4678
|
+
return createChainableTypeChecker(validate);
|
|
4679
|
+
}
|
|
4680
|
+
function createNodeChecker() {
|
|
4681
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4682
|
+
if (!isNode(props[propName])) {
|
|
4683
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
4684
|
+
}
|
|
4685
|
+
return null;
|
|
4686
|
+
}
|
|
4687
|
+
return createChainableTypeChecker(validate);
|
|
4688
|
+
}
|
|
4689
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
4690
|
+
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 + '`.');
|
|
4691
|
+
}
|
|
4692
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
4693
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4694
|
+
var propValue = props[propName];
|
|
4695
|
+
var propType = getPropType(propValue);
|
|
4696
|
+
if (propType !== 'object') {
|
|
4697
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
4698
|
+
}
|
|
4699
|
+
for (var key in shapeTypes) {
|
|
4700
|
+
var checker = shapeTypes[key];
|
|
4701
|
+
if (typeof checker !== 'function') {
|
|
4702
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
4703
|
+
}
|
|
4704
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4705
|
+
if (error) {
|
|
4706
|
+
return error;
|
|
4707
|
+
}
|
|
4708
|
+
}
|
|
4709
|
+
return null;
|
|
4710
|
+
}
|
|
4711
|
+
return createChainableTypeChecker(validate);
|
|
4712
|
+
}
|
|
4713
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
4714
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4715
|
+
var propValue = props[propName];
|
|
4716
|
+
var propType = getPropType(propValue);
|
|
4717
|
+
if (propType !== 'object') {
|
|
4718
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
4719
|
+
}
|
|
4720
|
+
// We need to check all keys in case some are required but missing from props.
|
|
4721
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
4722
|
+
for (var key in allKeys) {
|
|
4723
|
+
var checker = shapeTypes[key];
|
|
4724
|
+
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
4725
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
4726
|
+
}
|
|
4727
|
+
if (!checker) {
|
|
4728
|
+
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, ' '));
|
|
4729
|
+
}
|
|
4730
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4731
|
+
if (error) {
|
|
4732
|
+
return error;
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
return null;
|
|
4736
|
+
}
|
|
4737
|
+
return createChainableTypeChecker(validate);
|
|
4738
|
+
}
|
|
4739
|
+
function isNode(propValue) {
|
|
4740
|
+
switch (typeof propValue) {
|
|
4741
|
+
case 'number':
|
|
4742
|
+
case 'string':
|
|
4743
|
+
case 'undefined':
|
|
4744
|
+
return true;
|
|
4745
|
+
case 'boolean':
|
|
4746
|
+
return !propValue;
|
|
4747
|
+
case 'object':
|
|
4748
|
+
if (Array.isArray(propValue)) {
|
|
4749
|
+
return propValue.every(isNode);
|
|
4750
|
+
}
|
|
4751
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
4752
|
+
return true;
|
|
4753
|
+
}
|
|
4754
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
4755
|
+
if (iteratorFn) {
|
|
4756
|
+
var iterator = iteratorFn.call(propValue);
|
|
4757
|
+
var step;
|
|
4758
|
+
if (iteratorFn !== propValue.entries) {
|
|
4759
|
+
while (!(step = iterator.next()).done) {
|
|
4760
|
+
if (!isNode(step.value)) {
|
|
4761
|
+
return false;
|
|
4762
|
+
}
|
|
4763
|
+
}
|
|
4764
|
+
} else {
|
|
4765
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
4766
|
+
while (!(step = iterator.next()).done) {
|
|
4767
|
+
var entry = step.value;
|
|
4768
|
+
if (entry) {
|
|
4769
|
+
if (!isNode(entry[1])) {
|
|
4770
|
+
return false;
|
|
4771
|
+
}
|
|
4772
|
+
}
|
|
4773
|
+
}
|
|
4774
|
+
}
|
|
4775
|
+
} else {
|
|
4776
|
+
return false;
|
|
4777
|
+
}
|
|
4778
|
+
return true;
|
|
4779
|
+
default:
|
|
4780
|
+
return false;
|
|
4781
|
+
}
|
|
4782
|
+
}
|
|
4783
|
+
function isSymbol(propType, propValue) {
|
|
4784
|
+
// Native Symbol.
|
|
4785
|
+
if (propType === 'symbol') {
|
|
4786
|
+
return true;
|
|
4787
|
+
}
|
|
4788
|
+
|
|
4789
|
+
// falsy value can't be a Symbol
|
|
4790
|
+
if (!propValue) {
|
|
4791
|
+
return false;
|
|
4792
|
+
}
|
|
4793
|
+
|
|
4794
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
4795
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
4796
|
+
return true;
|
|
4797
|
+
}
|
|
4798
|
+
|
|
4799
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
4800
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
4801
|
+
return true;
|
|
4802
|
+
}
|
|
4803
|
+
return false;
|
|
4804
|
+
}
|
|
4805
|
+
|
|
4806
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
4807
|
+
function getPropType(propValue) {
|
|
4808
|
+
var propType = typeof propValue;
|
|
4809
|
+
if (Array.isArray(propValue)) {
|
|
4810
|
+
return 'array';
|
|
4811
|
+
}
|
|
4812
|
+
if (propValue instanceof RegExp) {
|
|
4813
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
4814
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
4815
|
+
// passes PropTypes.object.
|
|
4816
|
+
return 'object';
|
|
4817
|
+
}
|
|
4818
|
+
if (isSymbol(propType, propValue)) {
|
|
4819
|
+
return 'symbol';
|
|
4820
|
+
}
|
|
4821
|
+
return propType;
|
|
4822
|
+
}
|
|
4823
|
+
|
|
4824
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
4825
|
+
// See `createPrimitiveTypeChecker`.
|
|
4826
|
+
function getPreciseType(propValue) {
|
|
4827
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
4828
|
+
return '' + propValue;
|
|
4829
|
+
}
|
|
4830
|
+
var propType = getPropType(propValue);
|
|
4831
|
+
if (propType === 'object') {
|
|
4832
|
+
if (propValue instanceof Date) {
|
|
4833
|
+
return 'date';
|
|
4834
|
+
} else if (propValue instanceof RegExp) {
|
|
4835
|
+
return 'regexp';
|
|
4836
|
+
}
|
|
4837
|
+
}
|
|
4838
|
+
return propType;
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4841
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
4842
|
+
// For example, "undefined" or "of type array"
|
|
4843
|
+
function getPostfixForTypeWarning(value) {
|
|
4844
|
+
var type = getPreciseType(value);
|
|
4845
|
+
switch (type) {
|
|
4846
|
+
case 'array':
|
|
4847
|
+
case 'object':
|
|
4848
|
+
return 'an ' + type;
|
|
4849
|
+
case 'boolean':
|
|
4850
|
+
case 'date':
|
|
4851
|
+
case 'regexp':
|
|
4852
|
+
return 'a ' + type;
|
|
4853
|
+
default:
|
|
4854
|
+
return type;
|
|
4855
|
+
}
|
|
4856
|
+
}
|
|
4857
|
+
|
|
4858
|
+
// Returns class name of the object, if any.
|
|
4859
|
+
function getClassName(propValue) {
|
|
4860
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
4861
|
+
return ANONYMOUS;
|
|
4862
|
+
}
|
|
4863
|
+
return propValue.constructor.name;
|
|
4864
|
+
}
|
|
4865
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
4866
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
4867
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
4868
|
+
return ReactPropTypes;
|
|
4869
|
+
};
|
|
4870
|
+
return factoryWithTypeCheckers;
|
|
4871
|
+
}
|
|
4872
|
+
|
|
4873
|
+
/**
|
|
4874
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4875
|
+
*
|
|
4876
|
+
* This source code is licensed under the MIT license found in the
|
|
4877
|
+
* LICENSE file in the root directory of this source tree.
|
|
4878
|
+
*/
|
|
4879
|
+
|
|
4880
|
+
var factoryWithThrowingShims;
|
|
4881
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
4882
|
+
function requireFactoryWithThrowingShims() {
|
|
4883
|
+
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
4884
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
4885
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret();
|
|
4886
|
+
function emptyFunction() {}
|
|
4887
|
+
function emptyFunctionWithReset() {}
|
|
4888
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
4889
|
+
factoryWithThrowingShims = function () {
|
|
4890
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
4891
|
+
if (secret === ReactPropTypesSecret) {
|
|
4892
|
+
// It is still safe when called from React.
|
|
4893
|
+
return;
|
|
4894
|
+
}
|
|
4895
|
+
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');
|
|
4896
|
+
err.name = 'Invariant Violation';
|
|
4897
|
+
throw err;
|
|
4898
|
+
}
|
|
4899
|
+
shim.isRequired = shim;
|
|
4900
|
+
function getShim() {
|
|
4901
|
+
return shim;
|
|
4902
|
+
} // Important!
|
|
4903
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
4904
|
+
var ReactPropTypes = {
|
|
4905
|
+
array: shim,
|
|
4906
|
+
bigint: shim,
|
|
4907
|
+
bool: shim,
|
|
4908
|
+
func: shim,
|
|
4909
|
+
number: shim,
|
|
4910
|
+
object: shim,
|
|
4911
|
+
string: shim,
|
|
4912
|
+
symbol: shim,
|
|
4913
|
+
any: shim,
|
|
4914
|
+
arrayOf: getShim,
|
|
4915
|
+
element: shim,
|
|
4916
|
+
elementType: shim,
|
|
4917
|
+
instanceOf: getShim,
|
|
4918
|
+
node: shim,
|
|
4919
|
+
objectOf: getShim,
|
|
4920
|
+
oneOf: getShim,
|
|
4921
|
+
oneOfType: getShim,
|
|
4922
|
+
shape: getShim,
|
|
4923
|
+
exact: getShim,
|
|
4924
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
4925
|
+
resetWarningCache: emptyFunction
|
|
4926
|
+
};
|
|
4927
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
4928
|
+
return ReactPropTypes;
|
|
4929
|
+
};
|
|
4930
|
+
return factoryWithThrowingShims;
|
|
4931
|
+
}
|
|
4932
|
+
|
|
4933
|
+
/**
|
|
4934
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4935
|
+
*
|
|
4936
|
+
* This source code is licensed under the MIT license found in the
|
|
4937
|
+
* LICENSE file in the root directory of this source tree.
|
|
4938
|
+
*/
|
|
4939
|
+
|
|
4940
|
+
var hasRequiredPropTypes;
|
|
4941
|
+
function requirePropTypes() {
|
|
4942
|
+
if (hasRequiredPropTypes) return propTypes.exports;
|
|
4943
|
+
hasRequiredPropTypes = 1;
|
|
4944
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4945
|
+
var ReactIs = requireReactIs();
|
|
4946
|
+
|
|
4947
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
4948
|
+
// http://fb.me/prop-types-in-prod
|
|
4949
|
+
var throwOnDirectAccess = true;
|
|
4950
|
+
propTypes.exports = /*@__PURE__*/requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
4951
|
+
} else {
|
|
4952
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
4953
|
+
// http://fb.me/prop-types-in-prod
|
|
4954
|
+
propTypes.exports = /*@__PURE__*/requireFactoryWithThrowingShims()();
|
|
4955
|
+
}
|
|
4956
|
+
return propTypes.exports;
|
|
4957
|
+
}
|
|
4958
|
+
var propTypesExports = /*@__PURE__*/requirePropTypes();
|
|
4959
|
+
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
4960
|
+
({
|
|
4961
|
+
onPowerOff: PropTypes.func,
|
|
4962
|
+
onRestart: PropTypes.func,
|
|
4963
|
+
powerOffLabel: PropTypes.string,
|
|
4964
|
+
restartLabel: PropTypes.string,
|
|
4965
|
+
iconClassName: PropTypes.string,
|
|
4966
|
+
confirmTitle: PropTypes.string,
|
|
4967
|
+
cancelText: PropTypes.string,
|
|
4968
|
+
okText: PropTypes.string,
|
|
4969
|
+
run: PropTypes.func
|
|
4970
|
+
});
|
|
4971
|
+
({
|
|
4972
|
+
logoUrl: PropTypes.string,
|
|
4973
|
+
logoWidth: PropTypes.number,
|
|
4974
|
+
logoAlt: PropTypes.string,
|
|
4975
|
+
onClick: PropTypes.func
|
|
4976
|
+
});
|
|
4977
|
+
|
|
4978
|
+
// PropTypes 类型检查
|
|
4979
|
+
({
|
|
4980
|
+
menuElement: PropTypes.node,
|
|
4981
|
+
productInfo: PropTypes.shape({
|
|
4982
|
+
productName: PropTypes.string,
|
|
4983
|
+
version: PropTypes.string
|
|
4984
|
+
}),
|
|
4985
|
+
showLogo: PropTypes.bool,
|
|
4986
|
+
showProductInfo: PropTypes.bool,
|
|
4987
|
+
showHardwareUsage: PropTypes.bool,
|
|
4988
|
+
showSystemOperations: PropTypes.bool,
|
|
4989
|
+
onPowerOff: PropTypes.func,
|
|
4990
|
+
onRestart: PropTypes.func,
|
|
4991
|
+
onRun: PropTypes.func,
|
|
4992
|
+
hardwareMonitorUrl: PropTypes.string,
|
|
4993
|
+
getSocketUrl: PropTypes.func,
|
|
4994
|
+
logoProps: PropTypes.object,
|
|
4995
|
+
className: PropTypes.string,
|
|
4996
|
+
style: PropTypes.object
|
|
4997
|
+
});
|
|
4998
|
+
|
|
4999
|
+
const numberProps = {
|
|
5000
|
+
controls: false,
|
|
5001
|
+
keyboard: false,
|
|
5002
|
+
changeOnWheel: false,
|
|
5003
|
+
precision: 0
|
|
5004
|
+
};
|
|
5005
|
+
const NmosModal = _ref => {
|
|
5006
|
+
let {
|
|
5007
|
+
open,
|
|
5008
|
+
onClose,
|
|
5009
|
+
getNmosSettings,
|
|
5010
|
+
updateNmosSettings,
|
|
5011
|
+
hostAddressOptions = [],
|
|
5012
|
+
modalProps = {},
|
|
5013
|
+
formProps = {}
|
|
5014
|
+
} = _ref;
|
|
5015
|
+
const [nmosSettings, setNmosSettings] = useState(null);
|
|
5016
|
+
const [loading, setLoading] = useState(false);
|
|
5017
|
+
const [form] = Form.useForm();
|
|
5018
|
+
const {
|
|
5019
|
+
message
|
|
5020
|
+
} = App.useApp();
|
|
5021
|
+
useEffect(() => {
|
|
5022
|
+
// 重置表单和状态当 Modal 打开时
|
|
5023
|
+
if (open) {
|
|
5024
|
+
setLoading(true);
|
|
5025
|
+
getNmosSettings().then(data => {
|
|
5026
|
+
if (data) {
|
|
5027
|
+
setNmosSettings(data);
|
|
5028
|
+
// 数据加载后设置表单值
|
|
5029
|
+
form.setFieldsValue({
|
|
5030
|
+
host_addresses: data.host_addresses || [],
|
|
5031
|
+
domain: data.domain,
|
|
5032
|
+
registry_address: data.registry_address,
|
|
5033
|
+
registration_port: data.registration_port,
|
|
5034
|
+
registry_version: data.registry_version,
|
|
5035
|
+
logging_level: data.logging_level
|
|
5036
|
+
});
|
|
5037
|
+
}
|
|
5038
|
+
}).catch(err => {
|
|
5039
|
+
console.error("Failed to fetch settings", err);
|
|
5040
|
+
}).finally(() => {
|
|
5041
|
+
setLoading(false);
|
|
5042
|
+
});
|
|
5043
|
+
} else {
|
|
5044
|
+
// 关闭时重置表单
|
|
5045
|
+
form.resetFields();
|
|
5046
|
+
setNmosSettings(null);
|
|
5047
|
+
}
|
|
5048
|
+
}, [open, form, getNmosSettings]);
|
|
5049
|
+
const handleSubmit = async () => {
|
|
5050
|
+
const values = await form.getFieldsValue();
|
|
5051
|
+
setLoading(true);
|
|
5052
|
+
try {
|
|
5053
|
+
const response = await updateNmosSettings(_objectSpread2$1(_objectSpread2$1({}, nmosSettings), values));
|
|
5054
|
+
if (response) {
|
|
5055
|
+
message.success('Success');
|
|
5056
|
+
setTimeout(() => {
|
|
5057
|
+
onClose();
|
|
5058
|
+
}, 1500);
|
|
5059
|
+
}
|
|
5060
|
+
} catch (error) {
|
|
5061
|
+
console.error('Update failed:', error);
|
|
5062
|
+
} finally {
|
|
5063
|
+
setLoading(false);
|
|
5064
|
+
}
|
|
5065
|
+
};
|
|
5066
|
+
return /*#__PURE__*/jsx(StyledModal$1, _objectSpread2$1(_objectSpread2$1({
|
|
5067
|
+
title: "NMOS",
|
|
5068
|
+
width: 650,
|
|
5069
|
+
open: open,
|
|
5070
|
+
onOk: handleSubmit,
|
|
5071
|
+
onCancel: onClose,
|
|
5072
|
+
confirmLoading: loading,
|
|
5073
|
+
destroyOnClose: true // 关闭时销毁组件,确保下次打开重新初始化
|
|
5074
|
+
}, modalProps), {}, {
|
|
5075
|
+
children: /*#__PURE__*/jsxs(Form, _objectSpread2$1(_objectSpread2$1({
|
|
5076
|
+
form: form,
|
|
5077
|
+
name: "nmosForm",
|
|
5078
|
+
labelCol: {
|
|
5079
|
+
span: 5
|
|
5080
|
+
},
|
|
5081
|
+
wrapperCol: {
|
|
5082
|
+
span: 19
|
|
5083
|
+
},
|
|
5084
|
+
autoComplete: "off",
|
|
5085
|
+
disabled: loading
|
|
5086
|
+
}, formProps), {}, {
|
|
5087
|
+
children: [/*#__PURE__*/jsx(Form.Item, {
|
|
5088
|
+
label: "Host Addresses",
|
|
5089
|
+
name: "host_addresses",
|
|
5090
|
+
children: /*#__PURE__*/jsx(Select, {
|
|
5091
|
+
mode: "multiple",
|
|
5092
|
+
options: hostAddressOptions,
|
|
5093
|
+
fieldNames: {
|
|
5094
|
+
label: "display_name",
|
|
5095
|
+
value: "ip_address"
|
|
5096
|
+
},
|
|
5097
|
+
placeholder: "Select host address",
|
|
5098
|
+
allowClear: true
|
|
5099
|
+
})
|
|
5100
|
+
}), /*#__PURE__*/jsx(Form.Item, {
|
|
5101
|
+
label: "Domain",
|
|
5102
|
+
name: "domain",
|
|
5103
|
+
children: /*#__PURE__*/jsx(Input, {})
|
|
5104
|
+
}), /*#__PURE__*/jsx(Form.Item, {
|
|
5105
|
+
label: "Registry Address",
|
|
5106
|
+
name: "registry_address",
|
|
5107
|
+
children: /*#__PURE__*/jsx(Input, {})
|
|
5108
|
+
}), /*#__PURE__*/jsx(Form.Item, {
|
|
5109
|
+
label: "Registry Port",
|
|
5110
|
+
name: "registration_port",
|
|
5111
|
+
children: /*#__PURE__*/jsx(InputNumber, _objectSpread2$1(_objectSpread2$1({}, numberProps), {}, {
|
|
5112
|
+
min: 0,
|
|
5113
|
+
max: 65535,
|
|
5114
|
+
style: {
|
|
5115
|
+
width: '100%'
|
|
5116
|
+
}
|
|
5117
|
+
}))
|
|
5118
|
+
}), /*#__PURE__*/jsx(Form.Item, {
|
|
5119
|
+
label: "Registry Version",
|
|
5120
|
+
name: "registry_version",
|
|
5121
|
+
children: /*#__PURE__*/jsx(Select, {
|
|
5122
|
+
options: [{
|
|
5123
|
+
label: "v1.0",
|
|
5124
|
+
value: "v1.0"
|
|
5125
|
+
}, {
|
|
5126
|
+
label: "v1.1",
|
|
5127
|
+
value: "v1.1"
|
|
5128
|
+
}, {
|
|
5129
|
+
label: "v1.2",
|
|
5130
|
+
value: "v1.2"
|
|
5131
|
+
}, {
|
|
5132
|
+
label: "v1.3",
|
|
5133
|
+
value: "v1.3"
|
|
5134
|
+
}],
|
|
5135
|
+
placeholder: "Select version"
|
|
5136
|
+
})
|
|
5137
|
+
}), /*#__PURE__*/jsx(Form.Item, {
|
|
5138
|
+
label: "Logging Level",
|
|
5139
|
+
name: "logging_level",
|
|
5140
|
+
children: /*#__PURE__*/jsx(InputNumber, _objectSpread2$1(_objectSpread2$1({}, numberProps), {}, {
|
|
5141
|
+
min: -40,
|
|
5142
|
+
max: 40,
|
|
5143
|
+
style: {
|
|
5144
|
+
width: '100%'
|
|
5145
|
+
}
|
|
5146
|
+
}))
|
|
5147
|
+
})]
|
|
5148
|
+
}))
|
|
5149
|
+
}));
|
|
5150
|
+
};
|
|
5151
|
+
var NmosModal$1 = /*#__PURE__*/memo(NmosModal);
|
|
5152
|
+
|
|
3559
5153
|
const _excluded = ["value", "min", "max", "className", "disablePointerLock", "modifierKeys", "decimalPlaces", "onChange", "onDragStart", "onDragEnd", "disabled", "style"];
|
|
3560
5154
|
|
|
3561
5155
|
// 默认配置
|
|
@@ -3651,7 +5245,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
3651
5245
|
// 新增 disabled 属性
|
|
3652
5246
|
style
|
|
3653
5247
|
} = _ref2,
|
|
3654
|
-
restProps = _objectWithoutProperties(_ref2, _excluded);
|
|
5248
|
+
restProps = _objectWithoutProperties$1(_ref2, _excluded);
|
|
3655
5249
|
const inputRef = useRef(null);
|
|
3656
5250
|
const [isMouseDown, setIsMouseDown] = useState(false);
|
|
3657
5251
|
const [isDragging, setIsDragging] = useState(false);
|
|
@@ -3760,7 +5354,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
3760
5354
|
applyMovement(totalMovement.current, e);
|
|
3761
5355
|
}, [isMouseDown, disabled]);
|
|
3762
5356
|
const getModifiers = useCallback(e => {
|
|
3763
|
-
const mods = _objectSpread2(_objectSpread2({}, defaultModifiers), modifierKeys);
|
|
5357
|
+
const mods = _objectSpread2$1(_objectSpread2$1({}, defaultModifiers), modifierKeys);
|
|
3764
5358
|
for (const key in mods) {
|
|
3765
5359
|
if (key !== "default" && e[key]) {
|
|
3766
5360
|
currentMultiplier.current = mods[key].multiplier;
|
|
@@ -3876,7 +5470,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
3876
5470
|
background: 'rgba(255, 255, 255, 0.08)',
|
|
3877
5471
|
color: 'rgba(255, 255, 255, 0.25)'
|
|
3878
5472
|
} : {};
|
|
3879
|
-
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement("input", _objectSpread2({
|
|
5473
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement("input", _objectSpread2$1({
|
|
3880
5474
|
ref: inputRef,
|
|
3881
5475
|
type: "text",
|
|
3882
5476
|
inputMode: "numeric",
|
|
@@ -3890,7 +5484,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
3890
5484
|
disabled: disabled,
|
|
3891
5485
|
// 添加 disabled 属性
|
|
3892
5486
|
className: "draggable-number-input ".concat(className, " ").concat(isDragging ? "dragging" : "", " ").concat(disabled ? "disabled" : ""),
|
|
3893
|
-
style: _objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
5487
|
+
style: _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, {
|
|
3894
5488
|
cursor: disabled ? 'not-allowed' : 'ew-resize',
|
|
3895
5489
|
userSelect: disabled ? 'none' : 'auto',
|
|
3896
5490
|
caretColor: isDragging ? "transparent" : "initial"
|
|
@@ -3900,5 +5494,5 @@ function DraggableNumberInput(_ref2) {
|
|
|
3900
5494
|
}));
|
|
3901
5495
|
}
|
|
3902
5496
|
|
|
3903
|
-
export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, NetworkSettingsModal$1 as NetworkSettingsModal, PresetModal, PtpModal$1 as PtpModal, StyledModal$
|
|
5497
|
+
export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PresetModal, PtpModal$1 as PtpModal, StyledModal$3 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, useAuth, useHardwareUsage$1 as useHardwareUsage, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade };
|
|
3904
5498
|
//# sourceMappingURL=index.esm.js.map
|