seeder-st2110-components 1.7.8 → 1.7.10
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 +3090 -157
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3094 -156
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -928,6 +928,555 @@ const usePageReload = () => {
|
|
|
928
928
|
};
|
|
929
929
|
var usePageReload$1 = usePageReload;
|
|
930
930
|
|
|
931
|
+
const getReadyStateText = state => {
|
|
932
|
+
const states = {
|
|
933
|
+
0: 'CONNECTING',
|
|
934
|
+
1: 'OPEN',
|
|
935
|
+
2: 'CLOSING',
|
|
936
|
+
3: 'CLOSED'
|
|
937
|
+
};
|
|
938
|
+
return states[state] || "UNKNOWN(".concat(state, ")");
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
// 创建空日志器
|
|
942
|
+
const createDummyLogger = () => {
|
|
943
|
+
const dummyFn = () => {};
|
|
944
|
+
return {
|
|
945
|
+
log: dummyFn,
|
|
946
|
+
exportLogs: dummyFn,
|
|
947
|
+
getLogStats: () => ({
|
|
948
|
+
total: 0,
|
|
949
|
+
errors: 0,
|
|
950
|
+
warnings: 0,
|
|
951
|
+
info: 0,
|
|
952
|
+
lastTimestamp: null
|
|
953
|
+
}),
|
|
954
|
+
clearLogs: dummyFn,
|
|
955
|
+
logs: []
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
|
|
959
|
+
// 创建通用的日志器
|
|
960
|
+
const createGlobalLogger = function () {
|
|
961
|
+
let webSocketUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
962
|
+
const logs = [];
|
|
963
|
+
const maxLogs = 1000;
|
|
964
|
+
|
|
965
|
+
// 判断是否为开发环境
|
|
966
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
967
|
+
const log = function (level, message) {
|
|
968
|
+
let data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
969
|
+
const timestamp = new Date().toISOString();
|
|
970
|
+
const logEntry = {
|
|
971
|
+
timestamp,
|
|
972
|
+
level,
|
|
973
|
+
message,
|
|
974
|
+
data,
|
|
975
|
+
timestampDisplay: new Date().toLocaleString('zh-CN', {
|
|
976
|
+
year: 'numeric',
|
|
977
|
+
month: '2-digit',
|
|
978
|
+
day: '2-digit',
|
|
979
|
+
hour: '2-digit',
|
|
980
|
+
minute: '2-digit',
|
|
981
|
+
second: '2-digit',
|
|
982
|
+
hour12: false
|
|
983
|
+
})
|
|
984
|
+
};
|
|
985
|
+
logs.push(logEntry);
|
|
986
|
+
if (logs.length > maxLogs) logs.shift();
|
|
987
|
+
|
|
988
|
+
// 只在开发环境下输出到控制台
|
|
989
|
+
if (isDevelopment) {
|
|
990
|
+
const consoleMessage = "[".concat(logEntry.timestampDisplay, "] [WebSocket] [").concat(level, "] ").concat(message);
|
|
991
|
+
const consoleArgs = [consoleMessage];
|
|
992
|
+
if (Object.keys(data).length > 0) consoleArgs.push(data);
|
|
993
|
+
switch (level) {
|
|
994
|
+
case 'ERROR':
|
|
995
|
+
console.error(...consoleArgs);
|
|
996
|
+
break;
|
|
997
|
+
case 'WARN':
|
|
998
|
+
console.warn(...consoleArgs);
|
|
999
|
+
break;
|
|
1000
|
+
case 'INFO':
|
|
1001
|
+
console.info(...consoleArgs);
|
|
1002
|
+
break;
|
|
1003
|
+
default:
|
|
1004
|
+
console.log(...consoleArgs);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
return logEntry;
|
|
1008
|
+
};
|
|
1009
|
+
const exportLogs = function () {
|
|
1010
|
+
let filenamePrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'websocket';
|
|
1011
|
+
if (logs.length === 0) {
|
|
1012
|
+
log('WARN', '没有日志可导出', {
|
|
1013
|
+
filenamePrefix
|
|
1014
|
+
});
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
const logText = logs.map(entry => "[".concat(entry.timestampDisplay, "] [").concat(entry.level, "] ").concat(entry.message, "\n\u6570\u636E: ").concat(JSON.stringify(entry.data, null, 2))).join('\n' + '='.repeat(50) + '\n');
|
|
1018
|
+
const blob = new Blob([logText], {
|
|
1019
|
+
type: 'text/plain;charset=utf-8'
|
|
1020
|
+
});
|
|
1021
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
1022
|
+
let hostname = 'unknown';
|
|
1023
|
+
let pathname = 'unknown';
|
|
1024
|
+
try {
|
|
1025
|
+
if (webSocketUrl) {
|
|
1026
|
+
const urlObj = new URL(webSocketUrl.replace(/^ws/, 'http'));
|
|
1027
|
+
hostname = urlObj.hostname.replace(/\./g, '-');
|
|
1028
|
+
pathname = urlObj.pathname.replace(/\//g, '-').replace(/^-|-$/g, '') || 'root';
|
|
1029
|
+
}
|
|
1030
|
+
} catch (error) {
|
|
1031
|
+
console.warn('无法解析WebSocket URL:', error);
|
|
1032
|
+
}
|
|
1033
|
+
const readableTime = new Date().toLocaleString('zh-CN', {
|
|
1034
|
+
year: 'numeric',
|
|
1035
|
+
month: '2-digit',
|
|
1036
|
+
day: '2-digit',
|
|
1037
|
+
hour: '2-digit',
|
|
1038
|
+
minute: '2-digit',
|
|
1039
|
+
second: '2-digit',
|
|
1040
|
+
hour12: false
|
|
1041
|
+
}).replace(/[\/:\s]/g, '-');
|
|
1042
|
+
const filename = "".concat(filenamePrefix, "-").concat(hostname, "-").concat(pathname, "-").concat(readableTime, ".log");
|
|
1043
|
+
const a = document.createElement('a');
|
|
1044
|
+
a.href = blobUrl;
|
|
1045
|
+
a.download = filename;
|
|
1046
|
+
document.body.appendChild(a);
|
|
1047
|
+
a.click();
|
|
1048
|
+
document.body.removeChild(a);
|
|
1049
|
+
URL.revokeObjectURL(blobUrl);
|
|
1050
|
+
log('INFO', '日志文件已导出', {
|
|
1051
|
+
count: logs.length,
|
|
1052
|
+
filename
|
|
1053
|
+
});
|
|
1054
|
+
};
|
|
1055
|
+
const getLogStats = () => {
|
|
1056
|
+
var _logs;
|
|
1057
|
+
return {
|
|
1058
|
+
total: logs.length,
|
|
1059
|
+
errors: logs.filter(l => l.level === 'ERROR').length,
|
|
1060
|
+
warnings: logs.filter(l => l.level === 'WARN').length,
|
|
1061
|
+
info: logs.filter(l => l.level === 'INFO').length,
|
|
1062
|
+
lastTimestamp: (_logs = logs[logs.length - 1]) === null || _logs === void 0 ? void 0 : _logs.timestampDisplay
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
const clearLogs = () => {
|
|
1066
|
+
logs.length = 0;
|
|
1067
|
+
log('INFO', '日志已清空');
|
|
1068
|
+
};
|
|
1069
|
+
return {
|
|
1070
|
+
log,
|
|
1071
|
+
exportLogs,
|
|
1072
|
+
getLogStats,
|
|
1073
|
+
clearLogs,
|
|
1074
|
+
logs
|
|
1075
|
+
};
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
// 心跳管理器
|
|
1079
|
+
const useHeartbeat = function (sendMessage, readyState, config, logger) {
|
|
1080
|
+
let enabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1081
|
+
const heartbeatTimerRef = useRef(null);
|
|
1082
|
+
const lastHeartbeatTimeRef = useRef(Date.now());
|
|
1083
|
+
const isMountedRef = useRef(true);
|
|
1084
|
+
const configRef = useRef({
|
|
1085
|
+
interval: (config === null || config === void 0 ? void 0 : config.interval) || 20000,
|
|
1086
|
+
message: (config === null || config === void 0 ? void 0 : config.message) || {
|
|
1087
|
+
type: 'ping'
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
const stateRef = useRef({
|
|
1091
|
+
sendMessage,
|
|
1092
|
+
readyState,
|
|
1093
|
+
enabled
|
|
1094
|
+
});
|
|
1095
|
+
useEffect(() => {
|
|
1096
|
+
configRef.current = {
|
|
1097
|
+
interval: (config === null || config === void 0 ? void 0 : config.interval) || 20000,
|
|
1098
|
+
message: (config === null || config === void 0 ? void 0 : config.message) || {
|
|
1099
|
+
type: 'ping'
|
|
1100
|
+
}
|
|
1101
|
+
};
|
|
1102
|
+
}, [config === null || config === void 0 ? void 0 : config.interval, config === null || config === void 0 ? void 0 : config.message]);
|
|
1103
|
+
useEffect(() => {
|
|
1104
|
+
stateRef.current = {
|
|
1105
|
+
sendMessage,
|
|
1106
|
+
readyState,
|
|
1107
|
+
enabled
|
|
1108
|
+
};
|
|
1109
|
+
}, [sendMessage, readyState, enabled]);
|
|
1110
|
+
useEffect(() => {
|
|
1111
|
+
return () => {
|
|
1112
|
+
isMountedRef.current = false;
|
|
1113
|
+
if (heartbeatTimerRef.current) {
|
|
1114
|
+
clearInterval(heartbeatTimerRef.current);
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
}, []);
|
|
1118
|
+
const stopHeartbeat = useCallback(() => {
|
|
1119
|
+
if (heartbeatTimerRef.current) {
|
|
1120
|
+
clearInterval(heartbeatTimerRef.current);
|
|
1121
|
+
heartbeatTimerRef.current = null;
|
|
1122
|
+
if (stateRef.current.enabled) {
|
|
1123
|
+
logger.log('INFO', '停止心跳机制');
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
}, [logger]);
|
|
1127
|
+
const startHeartbeat = useCallback(() => {
|
|
1128
|
+
stopHeartbeat();
|
|
1129
|
+
const currentState = stateRef.current;
|
|
1130
|
+
const currentConfig = configRef.current;
|
|
1131
|
+
if (!currentState.enabled) return;
|
|
1132
|
+
logger.log('INFO', '启动心跳机制', {
|
|
1133
|
+
interval: currentConfig.interval
|
|
1134
|
+
});
|
|
1135
|
+
heartbeatTimerRef.current = setInterval(() => {
|
|
1136
|
+
// 检查组件是否挂载
|
|
1137
|
+
if (!isMountedRef.current || !heartbeatTimerRef.current) {
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
// 目的: 总是获取最新的值
|
|
1142
|
+
const latestState = stateRef.current;
|
|
1143
|
+
const latestConfig = configRef.current;
|
|
1144
|
+
if (latestState.sendMessage && latestState.readyState === 1) {
|
|
1145
|
+
try {
|
|
1146
|
+
latestState.sendMessage(JSON.stringify(latestConfig.message));
|
|
1147
|
+
lastHeartbeatTimeRef.current = Date.now();
|
|
1148
|
+
logger.log('DEBUG', '发送心跳包', {
|
|
1149
|
+
timeSinceLastHeartbeat: Date.now() - lastHeartbeatTimeRef.current,
|
|
1150
|
+
readyState: getReadyStateText(latestState.readyState)
|
|
1151
|
+
});
|
|
1152
|
+
} catch (error) {
|
|
1153
|
+
logger.log('ERROR', '发送心跳失败', {
|
|
1154
|
+
error: error.message,
|
|
1155
|
+
readyState: getReadyStateText(latestState.readyState)
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}, currentConfig.interval);
|
|
1160
|
+
}, [stopHeartbeat, logger]);
|
|
1161
|
+
|
|
1162
|
+
// 自动管理心跳
|
|
1163
|
+
useEffect(() => {
|
|
1164
|
+
const currentState = stateRef.current;
|
|
1165
|
+
if (currentState.enabled) {
|
|
1166
|
+
if (currentState.readyState === 1) {
|
|
1167
|
+
startHeartbeat();
|
|
1168
|
+
} else {
|
|
1169
|
+
stopHeartbeat();
|
|
1170
|
+
}
|
|
1171
|
+
} else {
|
|
1172
|
+
stopHeartbeat();
|
|
1173
|
+
}
|
|
1174
|
+
return () => {
|
|
1175
|
+
if (heartbeatTimerRef.current) {
|
|
1176
|
+
clearInterval(heartbeatTimerRef.current);
|
|
1177
|
+
heartbeatTimerRef.current = null;
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
}, [readyState, enabled, startHeartbeat, stopHeartbeat]);
|
|
1181
|
+
const heartbeatImpl = useMemo(() => {
|
|
1182
|
+
if (!enabled) {
|
|
1183
|
+
return {
|
|
1184
|
+
startHeartbeat: () => {},
|
|
1185
|
+
stopHeartbeat: () => {},
|
|
1186
|
+
getLastHeartbeatTime: () => null,
|
|
1187
|
+
isEnabled: false
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
return {
|
|
1191
|
+
startHeartbeat,
|
|
1192
|
+
stopHeartbeat,
|
|
1193
|
+
getLastHeartbeatTime: () => lastHeartbeatTimeRef.current,
|
|
1194
|
+
isEnabled: true
|
|
1195
|
+
};
|
|
1196
|
+
}, [enabled, startHeartbeat, stopHeartbeat]);
|
|
1197
|
+
return heartbeatImpl;
|
|
1198
|
+
};
|
|
1199
|
+
const useWebSocketWithFeatures = config => {
|
|
1200
|
+
const {
|
|
1201
|
+
url,
|
|
1202
|
+
options = {},
|
|
1203
|
+
heartbeat: heartbeatConfig = false,
|
|
1204
|
+
enableLog = true
|
|
1205
|
+
} = config;
|
|
1206
|
+
const [isConnected, setIsConnected] = useState(false);
|
|
1207
|
+
|
|
1208
|
+
// 创建 logger 实例
|
|
1209
|
+
const logger = useMemo(() => {
|
|
1210
|
+
if (enableLog) {
|
|
1211
|
+
return createGlobalLogger(url);
|
|
1212
|
+
}
|
|
1213
|
+
return createDummyLogger();
|
|
1214
|
+
}, [url, enableLog]);
|
|
1215
|
+
const websocketOptions = useMemo(() => _objectSpread2$1(_objectSpread2$1({}, options), {}, {
|
|
1216
|
+
onOpen: event => {
|
|
1217
|
+
var _options$onOpen;
|
|
1218
|
+
logger.log('INFO', 'WebSocket 连接成功', {
|
|
1219
|
+
url,
|
|
1220
|
+
readyState: getReadyStateText(1),
|
|
1221
|
+
// 连接成功时 readyState 为 1
|
|
1222
|
+
eventCode: event === null || event === void 0 ? void 0 : event.code
|
|
1223
|
+
});
|
|
1224
|
+
setIsConnected(true);
|
|
1225
|
+
(_options$onOpen = options.onOpen) === null || _options$onOpen === void 0 || _options$onOpen.call(options, event);
|
|
1226
|
+
},
|
|
1227
|
+
onError: error => {
|
|
1228
|
+
var _options$onError;
|
|
1229
|
+
logger.log('ERROR', 'WebSocket 连接错误', {
|
|
1230
|
+
url,
|
|
1231
|
+
error: error.message,
|
|
1232
|
+
errorType: error.type,
|
|
1233
|
+
readyState: getReadyStateText(3) // 错误时 readyState 为 3
|
|
1234
|
+
});
|
|
1235
|
+
setIsConnected(false);
|
|
1236
|
+
(_options$onError = options.onError) === null || _options$onError === void 0 || _options$onError.call(options, error);
|
|
1237
|
+
},
|
|
1238
|
+
onClose: event => {
|
|
1239
|
+
var _options$onClose;
|
|
1240
|
+
logger.log('WARN', 'WebSocket 连接断开', {
|
|
1241
|
+
url,
|
|
1242
|
+
code: event.code,
|
|
1243
|
+
reason: event.reason,
|
|
1244
|
+
wasClean: event.wasClean,
|
|
1245
|
+
readyState: getReadyStateText(3) // 关闭时 readyState 为 3
|
|
1246
|
+
});
|
|
1247
|
+
setIsConnected(false);
|
|
1248
|
+
(_options$onClose = options.onClose) === null || _options$onClose === void 0 || _options$onClose.call(options, event);
|
|
1249
|
+
},
|
|
1250
|
+
onReconnect: count => {
|
|
1251
|
+
var _options$onReconnect;
|
|
1252
|
+
logger.log('INFO', '尝试重新连接', {
|
|
1253
|
+
url,
|
|
1254
|
+
attempt: count,
|
|
1255
|
+
maxAttempts: options.reconnectLimit || 10
|
|
1256
|
+
});
|
|
1257
|
+
(_options$onReconnect = options.onReconnect) === null || _options$onReconnect === void 0 || _options$onReconnect.call(options, count);
|
|
1258
|
+
}
|
|
1259
|
+
}), [url, options, logger]);
|
|
1260
|
+
const {
|
|
1261
|
+
latestMessage,
|
|
1262
|
+
readyState,
|
|
1263
|
+
sendMessage,
|
|
1264
|
+
connect,
|
|
1265
|
+
disconnect
|
|
1266
|
+
} = useWebSocket(url, websocketOptions);
|
|
1267
|
+
const heartbeatOptions = useMemo(() => heartbeatConfig === true ? {} : heartbeatConfig, [heartbeatConfig]);
|
|
1268
|
+
const heartbeatEnabled = useMemo(() => heartbeatConfig !== false, [heartbeatConfig]);
|
|
1269
|
+
const heartbeat = useHeartbeat(sendMessage, readyState, heartbeatOptions, logger, heartbeatEnabled);
|
|
1270
|
+
|
|
1271
|
+
// 在全局暴露日志方法
|
|
1272
|
+
useEffect(() => {
|
|
1273
|
+
if (typeof window !== 'undefined' && enableLog) {
|
|
1274
|
+
// 生成唯一的键名:基于URL进行base64编码
|
|
1275
|
+
const key = "exportWebSocketLogs_".concat(btoa(url));
|
|
1276
|
+
// 在window对象上添加方法
|
|
1277
|
+
window[key] = () => logger.exportLogs();
|
|
1278
|
+
}
|
|
1279
|
+
return () => {
|
|
1280
|
+
if (typeof window !== 'undefined' && enableLog) {
|
|
1281
|
+
const key = "exportWebSocketLogs_".concat(btoa(url));
|
|
1282
|
+
delete window[key];
|
|
1283
|
+
}
|
|
1284
|
+
};
|
|
1285
|
+
}, [url, enableLog, logger]);
|
|
1286
|
+
const loggerMethods = useMemo(() => ({
|
|
1287
|
+
log: (level, message, data) => logger.log(level, message, data),
|
|
1288
|
+
exportLogs: () => logger.exportLogs(),
|
|
1289
|
+
getLogStats: () => logger.getLogStats(),
|
|
1290
|
+
clearLogs: () => logger.clearLogs()
|
|
1291
|
+
}), [logger]);
|
|
1292
|
+
return {
|
|
1293
|
+
latestMessage,
|
|
1294
|
+
readyState,
|
|
1295
|
+
sendMessage,
|
|
1296
|
+
connect,
|
|
1297
|
+
disconnect,
|
|
1298
|
+
isConnected,
|
|
1299
|
+
readyStateText: getReadyStateText(readyState),
|
|
1300
|
+
// 心跳功能
|
|
1301
|
+
heartbeat,
|
|
1302
|
+
// 日志功能
|
|
1303
|
+
logger: enableLog ? loggerMethods : null
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1306
|
+
var useWebSocketWithFeatures$1 = useWebSocketWithFeatures;
|
|
1307
|
+
|
|
1308
|
+
// 在控制台中直接查看所有可用的导出方法 Object.keys(window).filter(key => key.startsWith('exportWebSocketLogs_'))
|
|
1309
|
+
// 导出特定连接的日志 window['exportWebSocketLogs_d3M6Ly8xOTIuMTY4LjEyMy4yMDQvd3MvZHZyL3ZpZGVvX3N0YXR1c19jaGFuZ2U=']();
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* seeder-st2110-components 组件库国际化 Hook
|
|
1313
|
+
*
|
|
1314
|
+
* 设计目标:
|
|
1315
|
+
* 1. 不依赖特定的国际化库(react-intl, i18next 等)
|
|
1316
|
+
* 2. 可以与主项目(Umi)的国际化集成
|
|
1317
|
+
* 3. 支持简单的变量替换
|
|
1318
|
+
* 4. 降级处理:如果没有翻译,显示 key 本身
|
|
1319
|
+
*/
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* 获取当前语言环境
|
|
1323
|
+
* 优先从 Umi 全局变量读取,其次使用默认值
|
|
1324
|
+
*/
|
|
1325
|
+
const getLocale = () => {
|
|
1326
|
+
// 尝试从 Umi 获取语言设置
|
|
1327
|
+
if (typeof window !== 'undefined') {
|
|
1328
|
+
var _window$g_initialProp;
|
|
1329
|
+
if ((_window$g_initialProp = window.g_initialProps) !== null && _window$g_initialProp !== void 0 && _window$g_initialProp.locale) {
|
|
1330
|
+
return window.g_initialProps.locale;
|
|
1331
|
+
}
|
|
1332
|
+
if (window.__UMI_LOCALE__) {
|
|
1333
|
+
return window.__UMI_LOCALE__;
|
|
1334
|
+
}
|
|
1335
|
+
if (window.__COMPONENT_LOCALE__) {
|
|
1336
|
+
return window.__COMPONENT_LOCALE__;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
return 'zh-CN';
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* 获取语言包
|
|
1344
|
+
*/
|
|
1345
|
+
const getMessages = () => {
|
|
1346
|
+
if (typeof window !== 'undefined') {
|
|
1347
|
+
return window.__COMPONENT_I18N_MESSAGES__ || {};
|
|
1348
|
+
}
|
|
1349
|
+
return {};
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* 格式化消息
|
|
1354
|
+
* @param {string} id - 国际化 key
|
|
1355
|
+
* @param {object} values - 变量替换值
|
|
1356
|
+
* @param {string} locale - 语言环境
|
|
1357
|
+
* @param {object} messages - 语言包
|
|
1358
|
+
*/
|
|
1359
|
+
const formatMessage = function (_ref) {
|
|
1360
|
+
var _messages$locale, _messages$enUS;
|
|
1361
|
+
let {
|
|
1362
|
+
id
|
|
1363
|
+
} = _ref;
|
|
1364
|
+
let values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1365
|
+
let locale = arguments.length > 2 ? arguments[2] : undefined;
|
|
1366
|
+
let messages = arguments.length > 3 ? arguments[3] : undefined;
|
|
1367
|
+
const message = ((_messages$locale = messages[locale]) === null || _messages$locale === void 0 ? void 0 : _messages$locale[id]) || ((_messages$enUS = messages['en-US']) === null || _messages$enUS === void 0 ? void 0 : _messages$enUS[id]) || id;
|
|
1368
|
+
|
|
1369
|
+
// 支持变量替换 {min}, {max}, {value} 等
|
|
1370
|
+
return message.replace(/\{(\w+)\}/g, (match, key) => {
|
|
1371
|
+
return values[key] !== undefined ? values[key] : match;
|
|
1372
|
+
});
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* 国际化 Hook
|
|
1377
|
+
*
|
|
1378
|
+
* @returns {{
|
|
1379
|
+
* locale: string,
|
|
1380
|
+
* formatMessage: function,
|
|
1381
|
+
* messages: object
|
|
1382
|
+
* }}
|
|
1383
|
+
*
|
|
1384
|
+
* @example
|
|
1385
|
+
* const intl = useIntl();
|
|
1386
|
+
* const title = intl.formatMessage({ id: 'networkSettings.title' });
|
|
1387
|
+
* const message = intl.formatMessage({ id: 'validation.minLength' }, { min: 3 });
|
|
1388
|
+
*/
|
|
1389
|
+
const useIntl = () => {
|
|
1390
|
+
const locale = getLocale();
|
|
1391
|
+
const messages = getMessages();
|
|
1392
|
+
const formatMessageFn = function (_ref2) {
|
|
1393
|
+
let {
|
|
1394
|
+
id
|
|
1395
|
+
} = _ref2;
|
|
1396
|
+
let values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1397
|
+
return formatMessage({
|
|
1398
|
+
id
|
|
1399
|
+
}, values, locale, messages);
|
|
1400
|
+
};
|
|
1401
|
+
return {
|
|
1402
|
+
locale,
|
|
1403
|
+
formatMessage: formatMessageFn,
|
|
1404
|
+
messages
|
|
1405
|
+
};
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* 设置语言环境(可选)
|
|
1410
|
+
* 如果需要在运行时切换语言,可以调用此函数
|
|
1411
|
+
*
|
|
1412
|
+
* @param {string} locale - 语言代码,如 'zh-CN' 或 'en-US'
|
|
1413
|
+
*/
|
|
1414
|
+
const setLocale = locale => {
|
|
1415
|
+
if (typeof window !== 'undefined') {
|
|
1416
|
+
window.__COMPONENT_LOCALE__ = locale;
|
|
1417
|
+
}
|
|
1418
|
+
};
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* 注册语言包(可选)
|
|
1422
|
+
* 如果需要在运行时注册语言包,可以调用此函数
|
|
1423
|
+
*
|
|
1424
|
+
* @param {string} locale - 语言代码
|
|
1425
|
+
* @param {object} messages - 语言包对象
|
|
1426
|
+
*/
|
|
1427
|
+
const addMessages = (locale, messages) => {
|
|
1428
|
+
if (typeof window !== 'undefined') {
|
|
1429
|
+
if (!window.__COMPONENT_I18N_MESSAGES__) {
|
|
1430
|
+
window.__COMPONENT_I18N_MESSAGES__ = {};
|
|
1431
|
+
}
|
|
1432
|
+
window.__COMPONENT_I18N_MESSAGES__[locale] = messages;
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* 初始化国际化
|
|
1438
|
+
* 在组件库初始化时调用,注册默认语言包
|
|
1439
|
+
*/
|
|
1440
|
+
const initI18n = () => {
|
|
1441
|
+
// 注册中文语言包
|
|
1442
|
+
addMessages('zh-CN', {
|
|
1443
|
+
'button.ok': '确定',
|
|
1444
|
+
'button.cancel': '取消',
|
|
1445
|
+
'button.save': '保存',
|
|
1446
|
+
'button.delete': '删除',
|
|
1447
|
+
'button.edit': '编辑',
|
|
1448
|
+
'button.add': '添加',
|
|
1449
|
+
'button.confirm': '确认',
|
|
1450
|
+
'button.close': '关闭',
|
|
1451
|
+
'button.apply': '应用',
|
|
1452
|
+
'menu.networkSettings': '网络设置',
|
|
1453
|
+
'menu.ptp': 'PTP',
|
|
1454
|
+
'menu.nmos': 'NMOS',
|
|
1455
|
+
'menu.preset': '预设',
|
|
1456
|
+
'menu.license': '许可证'
|
|
1457
|
+
// ... 其他默认翻译
|
|
1458
|
+
});
|
|
1459
|
+
|
|
1460
|
+
// 注册英文语言包
|
|
1461
|
+
addMessages('en-US', {
|
|
1462
|
+
'button.ok': 'OK',
|
|
1463
|
+
'button.cancel': 'Cancel',
|
|
1464
|
+
'button.save': 'Save',
|
|
1465
|
+
'button.delete': 'Delete',
|
|
1466
|
+
'button.edit': 'Edit',
|
|
1467
|
+
'button.add': 'Add',
|
|
1468
|
+
'button.confirm': 'Confirm',
|
|
1469
|
+
'button.close': 'Close',
|
|
1470
|
+
'button.apply': 'Apply',
|
|
1471
|
+
'menu.networkSettings': 'Network Settings',
|
|
1472
|
+
'menu.ptp': 'PTP',
|
|
1473
|
+
'menu.nmos': 'NMOS',
|
|
1474
|
+
'menu.preset': 'Preset',
|
|
1475
|
+
'menu.license': 'License'
|
|
1476
|
+
// ... 其他默认翻译
|
|
1477
|
+
});
|
|
1478
|
+
};
|
|
1479
|
+
|
|
931
1480
|
const NetworkFieldGroup = _ref => {
|
|
932
1481
|
var _fieldConfig$netmask$, _fieldConfig$netmask;
|
|
933
1482
|
let {
|
|
@@ -935,18 +1484,26 @@ const NetworkFieldGroup = _ref => {
|
|
|
935
1484
|
interfaces,
|
|
936
1485
|
fieldConfig = {}
|
|
937
1486
|
} = _ref;
|
|
1487
|
+
const intl = useIntl();
|
|
1488
|
+
|
|
938
1489
|
// 默认字段配置
|
|
939
1490
|
const defaultFieldConfig = {
|
|
940
1491
|
name: {
|
|
941
|
-
label:
|
|
1492
|
+
label: intl.formatMessage({
|
|
1493
|
+
id: 'label.name'
|
|
1494
|
+
}),
|
|
942
1495
|
enabled: true
|
|
943
1496
|
},
|
|
944
1497
|
ip: {
|
|
945
|
-
label:
|
|
1498
|
+
label: intl.formatMessage({
|
|
1499
|
+
id: 'networkSettings.ipAddress'
|
|
1500
|
+
}),
|
|
946
1501
|
enabled: true
|
|
947
1502
|
},
|
|
948
1503
|
netmask: {
|
|
949
|
-
label:
|
|
1504
|
+
label: intl.formatMessage({
|
|
1505
|
+
id: 'networkSettings.subnetMask'
|
|
1506
|
+
}),
|
|
950
1507
|
enabled: true
|
|
951
1508
|
}
|
|
952
1509
|
};
|
|
@@ -994,11 +1551,11 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
994
1551
|
open,
|
|
995
1552
|
onClose,
|
|
996
1553
|
getLanConfig,
|
|
997
|
-
// 可选 - 单独获取LAN配置的函数
|
|
1554
|
+
// 可选 - 单独获取 LAN 配置的函数
|
|
998
1555
|
getSysConfig,
|
|
999
|
-
// 可选 - 单独获取QSFP配置的函数
|
|
1556
|
+
// 可选 - 单独获取 QSFP 配置的函数
|
|
1000
1557
|
getConfig,
|
|
1001
|
-
// 可选 - 统一获取配置的函数 ipgweb专用
|
|
1558
|
+
// 可选 - 统一获取配置的函数 ipgweb 专用
|
|
1002
1559
|
updateLanConfig,
|
|
1003
1560
|
updateSysConfig,
|
|
1004
1561
|
restart,
|
|
@@ -1014,6 +1571,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1014
1571
|
},
|
|
1015
1572
|
restartRemark
|
|
1016
1573
|
} = _ref2;
|
|
1574
|
+
const intl = useIntl();
|
|
1017
1575
|
const {
|
|
1018
1576
|
message,
|
|
1019
1577
|
modal
|
|
@@ -1149,11 +1707,14 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1149
1707
|
// 成功处理
|
|
1150
1708
|
const handleSuccess = useCallback(async function () {
|
|
1151
1709
|
let {
|
|
1152
|
-
messageText
|
|
1710
|
+
messageText,
|
|
1153
1711
|
isPopup = false,
|
|
1154
1712
|
refresh = !restart
|
|
1155
1713
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1156
|
-
|
|
1714
|
+
const defaultMessage = intl.formatMessage({
|
|
1715
|
+
id: 'networkSettings.saveSuccess'
|
|
1716
|
+
});
|
|
1717
|
+
message.success(messageText || defaultMessage);
|
|
1157
1718
|
if (refresh && getConfig) {
|
|
1158
1719
|
try {
|
|
1159
1720
|
const newConfig = await getConfig();
|
|
@@ -1177,9 +1738,15 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1177
1738
|
if (updatedConfig !== null && updatedConfig !== void 0 && updatedConfig.is_restart_required) {
|
|
1178
1739
|
modal.confirm({
|
|
1179
1740
|
icon: /*#__PURE__*/jsx(ExclamationCircleFilled, {}),
|
|
1180
|
-
title:
|
|
1181
|
-
|
|
1182
|
-
|
|
1741
|
+
title: intl.formatMessage({
|
|
1742
|
+
id: 'networkSettings.restartRequired'
|
|
1743
|
+
}),
|
|
1744
|
+
cancelText: intl.formatMessage({
|
|
1745
|
+
id: 'networkSettings.restartLater'
|
|
1746
|
+
}),
|
|
1747
|
+
okText: intl.formatMessage({
|
|
1748
|
+
id: 'networkSettings.restartNow'
|
|
1749
|
+
}),
|
|
1183
1750
|
onOk: async () => {
|
|
1184
1751
|
await restart();
|
|
1185
1752
|
if (onRestartSuccess && typeof onRestartSuccess === 'function') {
|
|
@@ -1195,9 +1762,15 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1195
1762
|
// 无接口:直接弹出重启确认框
|
|
1196
1763
|
modal.confirm({
|
|
1197
1764
|
icon: /*#__PURE__*/jsx(ExclamationCircleFilled, {}),
|
|
1198
|
-
title:
|
|
1199
|
-
|
|
1200
|
-
|
|
1765
|
+
title: intl.formatMessage({
|
|
1766
|
+
id: 'networkSettings.restartRequired'
|
|
1767
|
+
}),
|
|
1768
|
+
cancelText: intl.formatMessage({
|
|
1769
|
+
id: 'networkSettings.restartLater'
|
|
1770
|
+
}),
|
|
1771
|
+
okText: intl.formatMessage({
|
|
1772
|
+
id: 'networkSettings.restartNow'
|
|
1773
|
+
}),
|
|
1201
1774
|
onOk: async () => {
|
|
1202
1775
|
await restart();
|
|
1203
1776
|
if (onRestartSuccess && typeof onRestartSuccess === 'function') {
|
|
@@ -1208,7 +1781,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1208
1781
|
}
|
|
1209
1782
|
}
|
|
1210
1783
|
onClose();
|
|
1211
|
-
}, [message, modal, getSysConfig, restart, getConfig, sections, onClose]);
|
|
1784
|
+
}, [intl, message, modal, getSysConfig, restart, getConfig, sections, onClose]);
|
|
1212
1785
|
const handleSubmit = useCallback(async () => {
|
|
1213
1786
|
setSubmitLoading(true);
|
|
1214
1787
|
try {
|
|
@@ -1289,14 +1862,20 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1289
1862
|
|
|
1290
1863
|
// 合并默认模态框属性和传入的属性
|
|
1291
1864
|
const mergedModalProps = _objectSpread2$1({
|
|
1292
|
-
title:
|
|
1865
|
+
title: intl.formatMessage({
|
|
1866
|
+
id: 'networkSettings.title'
|
|
1867
|
+
}),
|
|
1293
1868
|
width: 650,
|
|
1294
1869
|
open,
|
|
1295
1870
|
confirmLoading: submitLoading,
|
|
1296
1871
|
onOk: handleSubmit,
|
|
1297
1872
|
onCancel: onClose,
|
|
1298
|
-
okText:
|
|
1299
|
-
|
|
1873
|
+
okText: intl.formatMessage({
|
|
1874
|
+
id: 'button.apply'
|
|
1875
|
+
}),
|
|
1876
|
+
cancelText: intl.formatMessage({
|
|
1877
|
+
id: 'button.close'
|
|
1878
|
+
}),
|
|
1300
1879
|
centered: true,
|
|
1301
1880
|
destroyOnHidden: true,
|
|
1302
1881
|
forceRender: true
|
|
@@ -2045,8 +2624,8 @@ const Preset = _ref => {
|
|
|
2045
2624
|
icon: /*#__PURE__*/jsx(ExclamationCircleFilled, {}),
|
|
2046
2625
|
title: 'Delete Preset',
|
|
2047
2626
|
content: "".concat(texts.deleteConfirm, " \"").concat(presetName, "\"?"),
|
|
2048
|
-
cancelText: '
|
|
2049
|
-
okText: '
|
|
2627
|
+
cancelText: 'Cancel',
|
|
2628
|
+
okText: 'Delete',
|
|
2050
2629
|
onOk: async () => {
|
|
2051
2630
|
// 在删除前记录当前选中项的位置
|
|
2052
2631
|
const currentIndex = presetList.findIndex(item => isUnsavedPreset ? !item.id : item.id === selectedPreset.id);
|
|
@@ -2102,8 +2681,8 @@ const Preset = _ref => {
|
|
|
2102
2681
|
modalInstance = modal.confirm({
|
|
2103
2682
|
title: 'Load Preset',
|
|
2104
2683
|
content: "".concat(texts.loadConfirm, " \"").concat(loadData.name, "\"?"),
|
|
2105
|
-
cancelText: '
|
|
2106
|
-
okText: '
|
|
2684
|
+
cancelText: 'Cancel',
|
|
2685
|
+
okText: 'Load',
|
|
2107
2686
|
// onOk 返回一个 pending Promise
|
|
2108
2687
|
onOk: () => {
|
|
2109
2688
|
return new Promise((resolve, reject) => {
|
|
@@ -2323,7 +2902,7 @@ const Preset = _ref => {
|
|
|
2323
2902
|
};
|
|
2324
2903
|
var PresetModal = /*#__PURE__*/memo(Preset);
|
|
2325
2904
|
|
|
2326
|
-
const _excluded$
|
|
2905
|
+
const _excluded$2 = ["menuItems", "onMenuClick", "downloadFiles", "upgradeExecute", "upgradeStatus", "acceptFileTypes", "uploadCompleteDelay", "statusPollingInterval", "children"];
|
|
2327
2906
|
const UpgradeManager = _ref => {
|
|
2328
2907
|
let {
|
|
2329
2908
|
menuItems = [],
|
|
@@ -2336,7 +2915,7 @@ const UpgradeManager = _ref => {
|
|
|
2336
2915
|
statusPollingInterval = 1000,
|
|
2337
2916
|
children
|
|
2338
2917
|
} = _ref,
|
|
2339
|
-
dropdownProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
2918
|
+
dropdownProps = _objectWithoutProperties$1(_ref, _excluded$2);
|
|
2340
2919
|
const [upgradeElement] = useUpgrade$1({
|
|
2341
2920
|
menuItems,
|
|
2342
2921
|
onMenuClick,
|
|
@@ -2367,15 +2946,15 @@ UpgradeManager.defaultProps = {
|
|
|
2367
2946
|
};
|
|
2368
2947
|
var UpgradeManager$1 = UpgradeManager;
|
|
2369
2948
|
|
|
2370
|
-
function getDefaultExportFromCjs$
|
|
2949
|
+
function getDefaultExportFromCjs$7 (x) {
|
|
2371
2950
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
2372
2951
|
}
|
|
2373
2952
|
|
|
2374
|
-
var propTypes$
|
|
2953
|
+
var propTypes$7 = {exports: {}};
|
|
2375
2954
|
|
|
2376
|
-
var reactIs$
|
|
2955
|
+
var reactIs$7 = {exports: {}};
|
|
2377
2956
|
|
|
2378
|
-
var reactIs_production_min$
|
|
2957
|
+
var reactIs_production_min$7 = {};
|
|
2379
2958
|
|
|
2380
2959
|
/** @license React v16.13.1
|
|
2381
2960
|
* react-is.production.min.js
|
|
@@ -2386,21 +2965,21 @@ var reactIs_production_min$5 = {};
|
|
|
2386
2965
|
* LICENSE file in the root directory of this source tree.
|
|
2387
2966
|
*/
|
|
2388
2967
|
|
|
2389
|
-
var hasRequiredReactIs_production_min$
|
|
2968
|
+
var hasRequiredReactIs_production_min$7;
|
|
2390
2969
|
|
|
2391
|
-
function requireReactIs_production_min$
|
|
2392
|
-
if (hasRequiredReactIs_production_min$
|
|
2393
|
-
hasRequiredReactIs_production_min$
|
|
2970
|
+
function requireReactIs_production_min$7 () {
|
|
2971
|
+
if (hasRequiredReactIs_production_min$7) return reactIs_production_min$7;
|
|
2972
|
+
hasRequiredReactIs_production_min$7 = 1;
|
|
2394
2973
|
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?
|
|
2395
2974
|
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;
|
|
2396
|
-
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$
|
|
2397
|
-
reactIs_production_min$
|
|
2398
|
-
reactIs_production_min$
|
|
2399
|
-
reactIs_production_min$
|
|
2400
|
-
return reactIs_production_min$
|
|
2975
|
+
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$7.AsyncMode=l;reactIs_production_min$7.ConcurrentMode=m;reactIs_production_min$7.ContextConsumer=k;reactIs_production_min$7.ContextProvider=h;reactIs_production_min$7.Element=c;reactIs_production_min$7.ForwardRef=n;reactIs_production_min$7.Fragment=e;reactIs_production_min$7.Lazy=t;reactIs_production_min$7.Memo=r;reactIs_production_min$7.Portal=d;
|
|
2976
|
+
reactIs_production_min$7.Profiler=g;reactIs_production_min$7.StrictMode=f;reactIs_production_min$7.Suspense=p;reactIs_production_min$7.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$7.isConcurrentMode=A;reactIs_production_min$7.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$7.isContextProvider=function(a){return z(a)===h};reactIs_production_min$7.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$7.isForwardRef=function(a){return z(a)===n};reactIs_production_min$7.isFragment=function(a){return z(a)===e};reactIs_production_min$7.isLazy=function(a){return z(a)===t};
|
|
2977
|
+
reactIs_production_min$7.isMemo=function(a){return z(a)===r};reactIs_production_min$7.isPortal=function(a){return z(a)===d};reactIs_production_min$7.isProfiler=function(a){return z(a)===g};reactIs_production_min$7.isStrictMode=function(a){return z(a)===f};reactIs_production_min$7.isSuspense=function(a){return z(a)===p};
|
|
2978
|
+
reactIs_production_min$7.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$7.typeOf=z;
|
|
2979
|
+
return reactIs_production_min$7;
|
|
2401
2980
|
}
|
|
2402
2981
|
|
|
2403
|
-
var reactIs_development$
|
|
2982
|
+
var reactIs_development$7 = {};
|
|
2404
2983
|
|
|
2405
2984
|
/** @license React v16.13.1
|
|
2406
2985
|
* react-is.development.js
|
|
@@ -2411,11 +2990,11 @@ var reactIs_development$5 = {};
|
|
|
2411
2990
|
* LICENSE file in the root directory of this source tree.
|
|
2412
2991
|
*/
|
|
2413
2992
|
|
|
2414
|
-
var hasRequiredReactIs_development$
|
|
2993
|
+
var hasRequiredReactIs_development$7;
|
|
2415
2994
|
|
|
2416
|
-
function requireReactIs_development$
|
|
2417
|
-
if (hasRequiredReactIs_development$
|
|
2418
|
-
hasRequiredReactIs_development$
|
|
2995
|
+
function requireReactIs_development$7 () {
|
|
2996
|
+
if (hasRequiredReactIs_development$7) return reactIs_development$7;
|
|
2997
|
+
hasRequiredReactIs_development$7 = 1;
|
|
2419
2998
|
|
|
2420
2999
|
|
|
2421
3000
|
|
|
@@ -2556,51 +3135,51 @@ function requireReactIs_development$5 () {
|
|
|
2556
3135
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
2557
3136
|
}
|
|
2558
3137
|
|
|
2559
|
-
reactIs_development$
|
|
2560
|
-
reactIs_development$
|
|
2561
|
-
reactIs_development$
|
|
2562
|
-
reactIs_development$
|
|
2563
|
-
reactIs_development$
|
|
2564
|
-
reactIs_development$
|
|
2565
|
-
reactIs_development$
|
|
2566
|
-
reactIs_development$
|
|
2567
|
-
reactIs_development$
|
|
2568
|
-
reactIs_development$
|
|
2569
|
-
reactIs_development$
|
|
2570
|
-
reactIs_development$
|
|
2571
|
-
reactIs_development$
|
|
2572
|
-
reactIs_development$
|
|
2573
|
-
reactIs_development$
|
|
2574
|
-
reactIs_development$
|
|
2575
|
-
reactIs_development$
|
|
2576
|
-
reactIs_development$
|
|
2577
|
-
reactIs_development$
|
|
2578
|
-
reactIs_development$
|
|
2579
|
-
reactIs_development$
|
|
2580
|
-
reactIs_development$
|
|
2581
|
-
reactIs_development$
|
|
2582
|
-
reactIs_development$
|
|
2583
|
-
reactIs_development$
|
|
2584
|
-
reactIs_development$
|
|
2585
|
-
reactIs_development$
|
|
2586
|
-
reactIs_development$
|
|
3138
|
+
reactIs_development$7.AsyncMode = AsyncMode;
|
|
3139
|
+
reactIs_development$7.ConcurrentMode = ConcurrentMode;
|
|
3140
|
+
reactIs_development$7.ContextConsumer = ContextConsumer;
|
|
3141
|
+
reactIs_development$7.ContextProvider = ContextProvider;
|
|
3142
|
+
reactIs_development$7.Element = Element;
|
|
3143
|
+
reactIs_development$7.ForwardRef = ForwardRef;
|
|
3144
|
+
reactIs_development$7.Fragment = Fragment;
|
|
3145
|
+
reactIs_development$7.Lazy = Lazy;
|
|
3146
|
+
reactIs_development$7.Memo = Memo;
|
|
3147
|
+
reactIs_development$7.Portal = Portal;
|
|
3148
|
+
reactIs_development$7.Profiler = Profiler;
|
|
3149
|
+
reactIs_development$7.StrictMode = StrictMode;
|
|
3150
|
+
reactIs_development$7.Suspense = Suspense;
|
|
3151
|
+
reactIs_development$7.isAsyncMode = isAsyncMode;
|
|
3152
|
+
reactIs_development$7.isConcurrentMode = isConcurrentMode;
|
|
3153
|
+
reactIs_development$7.isContextConsumer = isContextConsumer;
|
|
3154
|
+
reactIs_development$7.isContextProvider = isContextProvider;
|
|
3155
|
+
reactIs_development$7.isElement = isElement;
|
|
3156
|
+
reactIs_development$7.isForwardRef = isForwardRef;
|
|
3157
|
+
reactIs_development$7.isFragment = isFragment;
|
|
3158
|
+
reactIs_development$7.isLazy = isLazy;
|
|
3159
|
+
reactIs_development$7.isMemo = isMemo;
|
|
3160
|
+
reactIs_development$7.isPortal = isPortal;
|
|
3161
|
+
reactIs_development$7.isProfiler = isProfiler;
|
|
3162
|
+
reactIs_development$7.isStrictMode = isStrictMode;
|
|
3163
|
+
reactIs_development$7.isSuspense = isSuspense;
|
|
3164
|
+
reactIs_development$7.isValidElementType = isValidElementType;
|
|
3165
|
+
reactIs_development$7.typeOf = typeOf;
|
|
2587
3166
|
})();
|
|
2588
3167
|
}
|
|
2589
|
-
return reactIs_development$
|
|
3168
|
+
return reactIs_development$7;
|
|
2590
3169
|
}
|
|
2591
3170
|
|
|
2592
|
-
var hasRequiredReactIs$
|
|
3171
|
+
var hasRequiredReactIs$7;
|
|
2593
3172
|
|
|
2594
|
-
function requireReactIs$
|
|
2595
|
-
if (hasRequiredReactIs$
|
|
2596
|
-
hasRequiredReactIs$
|
|
3173
|
+
function requireReactIs$7 () {
|
|
3174
|
+
if (hasRequiredReactIs$7) return reactIs$7.exports;
|
|
3175
|
+
hasRequiredReactIs$7 = 1;
|
|
2597
3176
|
|
|
2598
3177
|
if (process.env.NODE_ENV === 'production') {
|
|
2599
|
-
reactIs$
|
|
3178
|
+
reactIs$7.exports = requireReactIs_production_min$7();
|
|
2600
3179
|
} else {
|
|
2601
|
-
reactIs$
|
|
3180
|
+
reactIs$7.exports = requireReactIs_development$7();
|
|
2602
3181
|
}
|
|
2603
|
-
return reactIs$
|
|
3182
|
+
return reactIs$7.exports;
|
|
2604
3183
|
}
|
|
2605
3184
|
|
|
2606
3185
|
/*
|
|
@@ -2609,12 +3188,12 @@ object-assign
|
|
|
2609
3188
|
@license MIT
|
|
2610
3189
|
*/
|
|
2611
3190
|
|
|
2612
|
-
var objectAssign$
|
|
2613
|
-
var hasRequiredObjectAssign$
|
|
3191
|
+
var objectAssign$7;
|
|
3192
|
+
var hasRequiredObjectAssign$7;
|
|
2614
3193
|
|
|
2615
|
-
function requireObjectAssign$
|
|
2616
|
-
if (hasRequiredObjectAssign$
|
|
2617
|
-
hasRequiredObjectAssign$
|
|
3194
|
+
function requireObjectAssign$7 () {
|
|
3195
|
+
if (hasRequiredObjectAssign$7) return objectAssign$7;
|
|
3196
|
+
hasRequiredObjectAssign$7 = 1;
|
|
2618
3197
|
/* eslint-disable no-unused-vars */
|
|
2619
3198
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
2620
3199
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -2672,7 +3251,7 @@ function requireObjectAssign$5 () {
|
|
|
2672
3251
|
}
|
|
2673
3252
|
}
|
|
2674
3253
|
|
|
2675
|
-
objectAssign$
|
|
3254
|
+
objectAssign$7 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
2676
3255
|
var from;
|
|
2677
3256
|
var to = toObject(target);
|
|
2678
3257
|
var symbols;
|
|
@@ -2698,7 +3277,7 @@ function requireObjectAssign$5 () {
|
|
|
2698
3277
|
|
|
2699
3278
|
return to;
|
|
2700
3279
|
};
|
|
2701
|
-
return objectAssign$
|
|
3280
|
+
return objectAssign$7;
|
|
2702
3281
|
}
|
|
2703
3282
|
|
|
2704
3283
|
/**
|
|
@@ -2708,27 +3287,27 @@ function requireObjectAssign$5 () {
|
|
|
2708
3287
|
* LICENSE file in the root directory of this source tree.
|
|
2709
3288
|
*/
|
|
2710
3289
|
|
|
2711
|
-
var ReactPropTypesSecret_1$
|
|
2712
|
-
var hasRequiredReactPropTypesSecret$
|
|
3290
|
+
var ReactPropTypesSecret_1$7;
|
|
3291
|
+
var hasRequiredReactPropTypesSecret$7;
|
|
2713
3292
|
|
|
2714
|
-
function requireReactPropTypesSecret$
|
|
2715
|
-
if (hasRequiredReactPropTypesSecret$
|
|
2716
|
-
hasRequiredReactPropTypesSecret$
|
|
3293
|
+
function requireReactPropTypesSecret$7 () {
|
|
3294
|
+
if (hasRequiredReactPropTypesSecret$7) return ReactPropTypesSecret_1$7;
|
|
3295
|
+
hasRequiredReactPropTypesSecret$7 = 1;
|
|
2717
3296
|
|
|
2718
3297
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
2719
3298
|
|
|
2720
|
-
ReactPropTypesSecret_1$
|
|
2721
|
-
return ReactPropTypesSecret_1$
|
|
3299
|
+
ReactPropTypesSecret_1$7 = ReactPropTypesSecret;
|
|
3300
|
+
return ReactPropTypesSecret_1$7;
|
|
2722
3301
|
}
|
|
2723
3302
|
|
|
2724
|
-
var has$
|
|
2725
|
-
var hasRequiredHas$
|
|
3303
|
+
var has$7;
|
|
3304
|
+
var hasRequiredHas$7;
|
|
2726
3305
|
|
|
2727
|
-
function requireHas$
|
|
2728
|
-
if (hasRequiredHas$
|
|
2729
|
-
hasRequiredHas$
|
|
2730
|
-
has$
|
|
2731
|
-
return has$
|
|
3306
|
+
function requireHas$7 () {
|
|
3307
|
+
if (hasRequiredHas$7) return has$7;
|
|
3308
|
+
hasRequiredHas$7 = 1;
|
|
3309
|
+
has$7 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
3310
|
+
return has$7;
|
|
2732
3311
|
}
|
|
2733
3312
|
|
|
2734
3313
|
/**
|
|
@@ -2738,19 +3317,19 @@ function requireHas$5 () {
|
|
|
2738
3317
|
* LICENSE file in the root directory of this source tree.
|
|
2739
3318
|
*/
|
|
2740
3319
|
|
|
2741
|
-
var checkPropTypes_1$
|
|
2742
|
-
var hasRequiredCheckPropTypes$
|
|
3320
|
+
var checkPropTypes_1$7;
|
|
3321
|
+
var hasRequiredCheckPropTypes$7;
|
|
2743
3322
|
|
|
2744
|
-
function requireCheckPropTypes$
|
|
2745
|
-
if (hasRequiredCheckPropTypes$
|
|
2746
|
-
hasRequiredCheckPropTypes$
|
|
3323
|
+
function requireCheckPropTypes$7 () {
|
|
3324
|
+
if (hasRequiredCheckPropTypes$7) return checkPropTypes_1$7;
|
|
3325
|
+
hasRequiredCheckPropTypes$7 = 1;
|
|
2747
3326
|
|
|
2748
3327
|
var printWarning = function() {};
|
|
2749
3328
|
|
|
2750
3329
|
if (process.env.NODE_ENV !== 'production') {
|
|
2751
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$
|
|
3330
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$7();
|
|
2752
3331
|
var loggedTypeFailures = {};
|
|
2753
|
-
var has = /*@__PURE__*/ requireHas$
|
|
3332
|
+
var has = /*@__PURE__*/ requireHas$7();
|
|
2754
3333
|
|
|
2755
3334
|
printWarning = function(text) {
|
|
2756
3335
|
var message = 'Warning: ' + text;
|
|
@@ -2838,8 +3417,8 @@ function requireCheckPropTypes$5 () {
|
|
|
2838
3417
|
}
|
|
2839
3418
|
};
|
|
2840
3419
|
|
|
2841
|
-
checkPropTypes_1$
|
|
2842
|
-
return checkPropTypes_1$
|
|
3420
|
+
checkPropTypes_1$7 = checkPropTypes;
|
|
3421
|
+
return checkPropTypes_1$7;
|
|
2843
3422
|
}
|
|
2844
3423
|
|
|
2845
3424
|
/**
|
|
@@ -2849,19 +3428,19 @@ function requireCheckPropTypes$5 () {
|
|
|
2849
3428
|
* LICENSE file in the root directory of this source tree.
|
|
2850
3429
|
*/
|
|
2851
3430
|
|
|
2852
|
-
var factoryWithTypeCheckers$
|
|
2853
|
-
var hasRequiredFactoryWithTypeCheckers$
|
|
3431
|
+
var factoryWithTypeCheckers$7;
|
|
3432
|
+
var hasRequiredFactoryWithTypeCheckers$7;
|
|
2854
3433
|
|
|
2855
|
-
function requireFactoryWithTypeCheckers$
|
|
2856
|
-
if (hasRequiredFactoryWithTypeCheckers$
|
|
2857
|
-
hasRequiredFactoryWithTypeCheckers$
|
|
3434
|
+
function requireFactoryWithTypeCheckers$7 () {
|
|
3435
|
+
if (hasRequiredFactoryWithTypeCheckers$7) return factoryWithTypeCheckers$7;
|
|
3436
|
+
hasRequiredFactoryWithTypeCheckers$7 = 1;
|
|
2858
3437
|
|
|
2859
|
-
var ReactIs = requireReactIs$
|
|
2860
|
-
var assign = requireObjectAssign$
|
|
3438
|
+
var ReactIs = requireReactIs$7();
|
|
3439
|
+
var assign = requireObjectAssign$7();
|
|
2861
3440
|
|
|
2862
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$
|
|
2863
|
-
var has = /*@__PURE__*/ requireHas$
|
|
2864
|
-
var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$
|
|
3441
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$7();
|
|
3442
|
+
var has = /*@__PURE__*/ requireHas$7();
|
|
3443
|
+
var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$7();
|
|
2865
3444
|
|
|
2866
3445
|
var printWarning = function() {};
|
|
2867
3446
|
|
|
@@ -2884,7 +3463,7 @@ function requireFactoryWithTypeCheckers$5 () {
|
|
|
2884
3463
|
return null;
|
|
2885
3464
|
}
|
|
2886
3465
|
|
|
2887
|
-
factoryWithTypeCheckers$
|
|
3466
|
+
factoryWithTypeCheckers$7 = function(isValidElement, throwOnDirectAccess) {
|
|
2888
3467
|
/* global Symbol */
|
|
2889
3468
|
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
2890
3469
|
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
@@ -3457,7 +4036,7 @@ function requireFactoryWithTypeCheckers$5 () {
|
|
|
3457
4036
|
|
|
3458
4037
|
return ReactPropTypes;
|
|
3459
4038
|
};
|
|
3460
|
-
return factoryWithTypeCheckers$
|
|
4039
|
+
return factoryWithTypeCheckers$7;
|
|
3461
4040
|
}
|
|
3462
4041
|
|
|
3463
4042
|
/**
|
|
@@ -3467,20 +4046,20 @@ function requireFactoryWithTypeCheckers$5 () {
|
|
|
3467
4046
|
* LICENSE file in the root directory of this source tree.
|
|
3468
4047
|
*/
|
|
3469
4048
|
|
|
3470
|
-
var factoryWithThrowingShims$
|
|
3471
|
-
var hasRequiredFactoryWithThrowingShims$
|
|
4049
|
+
var factoryWithThrowingShims$7;
|
|
4050
|
+
var hasRequiredFactoryWithThrowingShims$7;
|
|
3472
4051
|
|
|
3473
|
-
function requireFactoryWithThrowingShims$
|
|
3474
|
-
if (hasRequiredFactoryWithThrowingShims$
|
|
3475
|
-
hasRequiredFactoryWithThrowingShims$
|
|
4052
|
+
function requireFactoryWithThrowingShims$7 () {
|
|
4053
|
+
if (hasRequiredFactoryWithThrowingShims$7) return factoryWithThrowingShims$7;
|
|
4054
|
+
hasRequiredFactoryWithThrowingShims$7 = 1;
|
|
3476
4055
|
|
|
3477
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$
|
|
4056
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$7();
|
|
3478
4057
|
|
|
3479
4058
|
function emptyFunction() {}
|
|
3480
4059
|
function emptyFunctionWithReset() {}
|
|
3481
4060
|
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3482
4061
|
|
|
3483
|
-
factoryWithThrowingShims$
|
|
4062
|
+
factoryWithThrowingShims$7 = function() {
|
|
3484
4063
|
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3485
4064
|
if (secret === ReactPropTypesSecret) {
|
|
3486
4065
|
// It is still safe when called from React.
|
|
@@ -3528,7 +4107,7 @@ function requireFactoryWithThrowingShims$5 () {
|
|
|
3528
4107
|
|
|
3529
4108
|
return ReactPropTypes;
|
|
3530
4109
|
};
|
|
3531
|
-
return factoryWithThrowingShims$
|
|
4110
|
+
return factoryWithThrowingShims$7;
|
|
3532
4111
|
}
|
|
3533
4112
|
|
|
3534
4113
|
/**
|
|
@@ -3538,28 +4117,28 @@ function requireFactoryWithThrowingShims$5 () {
|
|
|
3538
4117
|
* LICENSE file in the root directory of this source tree.
|
|
3539
4118
|
*/
|
|
3540
4119
|
|
|
3541
|
-
var hasRequiredPropTypes$
|
|
4120
|
+
var hasRequiredPropTypes$7;
|
|
3542
4121
|
|
|
3543
|
-
function requirePropTypes$
|
|
3544
|
-
if (hasRequiredPropTypes$
|
|
3545
|
-
hasRequiredPropTypes$
|
|
4122
|
+
function requirePropTypes$7 () {
|
|
4123
|
+
if (hasRequiredPropTypes$7) return propTypes$7.exports;
|
|
4124
|
+
hasRequiredPropTypes$7 = 1;
|
|
3546
4125
|
if (process.env.NODE_ENV !== 'production') {
|
|
3547
|
-
var ReactIs = requireReactIs$
|
|
4126
|
+
var ReactIs = requireReactIs$7();
|
|
3548
4127
|
|
|
3549
4128
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
3550
4129
|
// http://fb.me/prop-types-in-prod
|
|
3551
4130
|
var throwOnDirectAccess = true;
|
|
3552
|
-
propTypes$
|
|
4131
|
+
propTypes$7.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$7()(ReactIs.isElement, throwOnDirectAccess);
|
|
3553
4132
|
} else {
|
|
3554
4133
|
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
3555
4134
|
// http://fb.me/prop-types-in-prod
|
|
3556
|
-
propTypes$
|
|
4135
|
+
propTypes$7.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$7()();
|
|
3557
4136
|
}
|
|
3558
|
-
return propTypes$
|
|
4137
|
+
return propTypes$7.exports;
|
|
3559
4138
|
}
|
|
3560
4139
|
|
|
3561
|
-
var propTypesExports$
|
|
3562
|
-
var PropTypes$
|
|
4140
|
+
var propTypesExports$7 = /*@__PURE__*/ requirePropTypes$7();
|
|
4141
|
+
var PropTypes$7 = /*@__PURE__*/getDefaultExportFromCjs$7(propTypesExports$7);
|
|
3563
4142
|
|
|
3564
4143
|
const SystemOperations = _ref => {
|
|
3565
4144
|
let {
|
|
@@ -3574,8 +4153,8 @@ const SystemOperations = _ref => {
|
|
|
3574
4153
|
iconClassName = "seeder-iconfont seeder-icon-guanji1 text-xl text-neutral-400",
|
|
3575
4154
|
confirmMessage = "Are you sure you want to {action} the system? This action cannot be undone.",
|
|
3576
4155
|
confirmTitle = "Confirmation Required",
|
|
3577
|
-
cancelText = "
|
|
3578
|
-
okText = "
|
|
4156
|
+
cancelText = "Cancel",
|
|
4157
|
+
okText = "Confirm"
|
|
3579
4158
|
} = _ref;
|
|
3580
4159
|
const {
|
|
3581
4160
|
modal
|
|
@@ -3650,15 +4229,15 @@ const SystemOperations = _ref => {
|
|
|
3650
4229
|
});
|
|
3651
4230
|
};
|
|
3652
4231
|
SystemOperations.propTypes = {
|
|
3653
|
-
onPowerOff: PropTypes$
|
|
3654
|
-
onRestart: PropTypes$
|
|
3655
|
-
powerOffLabel: PropTypes$
|
|
3656
|
-
restartLabel: PropTypes$
|
|
3657
|
-
iconClassName: PropTypes$
|
|
3658
|
-
confirmTitle: PropTypes$
|
|
3659
|
-
cancelText: PropTypes$
|
|
3660
|
-
okText: PropTypes$
|
|
3661
|
-
run: PropTypes$
|
|
4232
|
+
onPowerOff: PropTypes$7.func,
|
|
4233
|
+
onRestart: PropTypes$7.func,
|
|
4234
|
+
powerOffLabel: PropTypes$7.string,
|
|
4235
|
+
restartLabel: PropTypes$7.string,
|
|
4236
|
+
iconClassName: PropTypes$7.string,
|
|
4237
|
+
confirmTitle: PropTypes$7.string,
|
|
4238
|
+
cancelText: PropTypes$7.string,
|
|
4239
|
+
okText: PropTypes$7.string,
|
|
4240
|
+
run: PropTypes$7.func
|
|
3662
4241
|
};
|
|
3663
4242
|
var SystemOperations$1 = SystemOperations;
|
|
3664
4243
|
|
|
@@ -3701,10 +4280,10 @@ const useSpaLogo = function () {
|
|
|
3701
4280
|
}, "logo")];
|
|
3702
4281
|
};
|
|
3703
4282
|
useSpaLogo.propTypes = {
|
|
3704
|
-
logoUrl: PropTypes$
|
|
3705
|
-
logoWidth: PropTypes$
|
|
3706
|
-
logoAlt: PropTypes$
|
|
3707
|
-
onClick: PropTypes$
|
|
4283
|
+
logoUrl: PropTypes$7.string,
|
|
4284
|
+
logoWidth: PropTypes$7.number,
|
|
4285
|
+
logoAlt: PropTypes$7.string,
|
|
4286
|
+
onClick: PropTypes$7.func
|
|
3708
4287
|
};
|
|
3709
4288
|
var useSpaLogo$1 = useSpaLogo;
|
|
3710
4289
|
|
|
@@ -3898,7 +4477,7 @@ function _toPropertyKey(t) {
|
|
|
3898
4477
|
var i = _toPrimitive(t, "string");
|
|
3899
4478
|
return "symbol" == typeof i ? i : i + "";
|
|
3900
4479
|
}
|
|
3901
|
-
const _excluded$
|
|
4480
|
+
const _excluded$3 = ["width", "okText", "cancelText", "styles"];
|
|
3902
4481
|
const StyledModal = props => {
|
|
3903
4482
|
const {
|
|
3904
4483
|
width = "520px",
|
|
@@ -3906,7 +4485,7 @@ const StyledModal = props => {
|
|
|
3906
4485
|
cancelText = "Close",
|
|
3907
4486
|
styles: propStyles = {}
|
|
3908
4487
|
} = props,
|
|
3909
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
4488
|
+
restProps = _objectWithoutProperties(props, _excluded$3);
|
|
3910
4489
|
|
|
3911
4490
|
// 基础样式配置
|
|
3912
4491
|
const baseStyles = {
|
|
@@ -3943,6 +4522,2360 @@ const StyledModal = props => {
|
|
|
3943
4522
|
}, restProps));
|
|
3944
4523
|
};
|
|
3945
4524
|
var StyledModal$1 = StyledModal;
|
|
4525
|
+
function getDefaultExportFromCjs$6(x) {
|
|
4526
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
4527
|
+
}
|
|
4528
|
+
var propTypes$6 = {
|
|
4529
|
+
exports: {}
|
|
4530
|
+
};
|
|
4531
|
+
var reactIs$6 = {
|
|
4532
|
+
exports: {}
|
|
4533
|
+
};
|
|
4534
|
+
var reactIs_production_min$6 = {};
|
|
4535
|
+
|
|
4536
|
+
/** @license React v16.13.1
|
|
4537
|
+
* react-is.production.min.js
|
|
4538
|
+
*
|
|
4539
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4540
|
+
*
|
|
4541
|
+
* This source code is licensed under the MIT license found in the
|
|
4542
|
+
* LICENSE file in the root directory of this source tree.
|
|
4543
|
+
*/
|
|
4544
|
+
|
|
4545
|
+
var hasRequiredReactIs_production_min$6;
|
|
4546
|
+
function requireReactIs_production_min$6() {
|
|
4547
|
+
if (hasRequiredReactIs_production_min$6) return reactIs_production_min$6;
|
|
4548
|
+
hasRequiredReactIs_production_min$6 = 1;
|
|
4549
|
+
var b = "function" === typeof Symbol && Symbol.for,
|
|
4550
|
+
c = b ? Symbol.for("react.element") : 60103,
|
|
4551
|
+
d = b ? Symbol.for("react.portal") : 60106,
|
|
4552
|
+
e = b ? Symbol.for("react.fragment") : 60107,
|
|
4553
|
+
f = b ? Symbol.for("react.strict_mode") : 60108,
|
|
4554
|
+
g = b ? Symbol.for("react.profiler") : 60114,
|
|
4555
|
+
h = b ? Symbol.for("react.provider") : 60109,
|
|
4556
|
+
k = b ? Symbol.for("react.context") : 60110,
|
|
4557
|
+
l = b ? Symbol.for("react.async_mode") : 60111,
|
|
4558
|
+
m = b ? Symbol.for("react.concurrent_mode") : 60111,
|
|
4559
|
+
n = b ? Symbol.for("react.forward_ref") : 60112,
|
|
4560
|
+
p = b ? Symbol.for("react.suspense") : 60113,
|
|
4561
|
+
q = b ? Symbol.for("react.suspense_list") : 60120,
|
|
4562
|
+
r = b ? Symbol.for("react.memo") : 60115,
|
|
4563
|
+
t = b ? Symbol.for("react.lazy") : 60116,
|
|
4564
|
+
v = b ? Symbol.for("react.block") : 60121,
|
|
4565
|
+
w = b ? Symbol.for("react.fundamental") : 60117,
|
|
4566
|
+
x = b ? Symbol.for("react.responder") : 60118,
|
|
4567
|
+
y = b ? Symbol.for("react.scope") : 60119;
|
|
4568
|
+
function z(a) {
|
|
4569
|
+
if ("object" === typeof a && null !== a) {
|
|
4570
|
+
var u = a.$$typeof;
|
|
4571
|
+
switch (u) {
|
|
4572
|
+
case c:
|
|
4573
|
+
switch (a = a.type, a) {
|
|
4574
|
+
case l:
|
|
4575
|
+
case m:
|
|
4576
|
+
case e:
|
|
4577
|
+
case g:
|
|
4578
|
+
case f:
|
|
4579
|
+
case p:
|
|
4580
|
+
return a;
|
|
4581
|
+
default:
|
|
4582
|
+
switch (a = a && a.$$typeof, a) {
|
|
4583
|
+
case k:
|
|
4584
|
+
case n:
|
|
4585
|
+
case t:
|
|
4586
|
+
case r:
|
|
4587
|
+
case h:
|
|
4588
|
+
return a;
|
|
4589
|
+
default:
|
|
4590
|
+
return u;
|
|
4591
|
+
}
|
|
4592
|
+
}
|
|
4593
|
+
case d:
|
|
4594
|
+
return u;
|
|
4595
|
+
}
|
|
4596
|
+
}
|
|
4597
|
+
}
|
|
4598
|
+
function A(a) {
|
|
4599
|
+
return z(a) === m;
|
|
4600
|
+
}
|
|
4601
|
+
reactIs_production_min$6.AsyncMode = l;
|
|
4602
|
+
reactIs_production_min$6.ConcurrentMode = m;
|
|
4603
|
+
reactIs_production_min$6.ContextConsumer = k;
|
|
4604
|
+
reactIs_production_min$6.ContextProvider = h;
|
|
4605
|
+
reactIs_production_min$6.Element = c;
|
|
4606
|
+
reactIs_production_min$6.ForwardRef = n;
|
|
4607
|
+
reactIs_production_min$6.Fragment = e;
|
|
4608
|
+
reactIs_production_min$6.Lazy = t;
|
|
4609
|
+
reactIs_production_min$6.Memo = r;
|
|
4610
|
+
reactIs_production_min$6.Portal = d;
|
|
4611
|
+
reactIs_production_min$6.Profiler = g;
|
|
4612
|
+
reactIs_production_min$6.StrictMode = f;
|
|
4613
|
+
reactIs_production_min$6.Suspense = p;
|
|
4614
|
+
reactIs_production_min$6.isAsyncMode = function (a) {
|
|
4615
|
+
return A(a) || z(a) === l;
|
|
4616
|
+
};
|
|
4617
|
+
reactIs_production_min$6.isConcurrentMode = A;
|
|
4618
|
+
reactIs_production_min$6.isContextConsumer = function (a) {
|
|
4619
|
+
return z(a) === k;
|
|
4620
|
+
};
|
|
4621
|
+
reactIs_production_min$6.isContextProvider = function (a) {
|
|
4622
|
+
return z(a) === h;
|
|
4623
|
+
};
|
|
4624
|
+
reactIs_production_min$6.isElement = function (a) {
|
|
4625
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
4626
|
+
};
|
|
4627
|
+
reactIs_production_min$6.isForwardRef = function (a) {
|
|
4628
|
+
return z(a) === n;
|
|
4629
|
+
};
|
|
4630
|
+
reactIs_production_min$6.isFragment = function (a) {
|
|
4631
|
+
return z(a) === e;
|
|
4632
|
+
};
|
|
4633
|
+
reactIs_production_min$6.isLazy = function (a) {
|
|
4634
|
+
return z(a) === t;
|
|
4635
|
+
};
|
|
4636
|
+
reactIs_production_min$6.isMemo = function (a) {
|
|
4637
|
+
return z(a) === r;
|
|
4638
|
+
};
|
|
4639
|
+
reactIs_production_min$6.isPortal = function (a) {
|
|
4640
|
+
return z(a) === d;
|
|
4641
|
+
};
|
|
4642
|
+
reactIs_production_min$6.isProfiler = function (a) {
|
|
4643
|
+
return z(a) === g;
|
|
4644
|
+
};
|
|
4645
|
+
reactIs_production_min$6.isStrictMode = function (a) {
|
|
4646
|
+
return z(a) === f;
|
|
4647
|
+
};
|
|
4648
|
+
reactIs_production_min$6.isSuspense = function (a) {
|
|
4649
|
+
return z(a) === p;
|
|
4650
|
+
};
|
|
4651
|
+
reactIs_production_min$6.isValidElementType = function (a) {
|
|
4652
|
+
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);
|
|
4653
|
+
};
|
|
4654
|
+
reactIs_production_min$6.typeOf = z;
|
|
4655
|
+
return reactIs_production_min$6;
|
|
4656
|
+
}
|
|
4657
|
+
var reactIs_development$6 = {};
|
|
4658
|
+
|
|
4659
|
+
/** @license React v16.13.1
|
|
4660
|
+
* react-is.development.js
|
|
4661
|
+
*
|
|
4662
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4663
|
+
*
|
|
4664
|
+
* This source code is licensed under the MIT license found in the
|
|
4665
|
+
* LICENSE file in the root directory of this source tree.
|
|
4666
|
+
*/
|
|
4667
|
+
|
|
4668
|
+
var hasRequiredReactIs_development$6;
|
|
4669
|
+
function requireReactIs_development$6() {
|
|
4670
|
+
if (hasRequiredReactIs_development$6) return reactIs_development$6;
|
|
4671
|
+
hasRequiredReactIs_development$6 = 1;
|
|
4672
|
+
if (process.env.NODE_ENV !== "production") {
|
|
4673
|
+
(function () {
|
|
4674
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
4675
|
+
// nor polyfill, then a plain number is used for performance.
|
|
4676
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
4677
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
4678
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
4679
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
4680
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
4681
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
4682
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
4683
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
4684
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
4685
|
+
|
|
4686
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
4687
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
4688
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
4689
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
4690
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
4691
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
4692
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
4693
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
4694
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
4695
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
4696
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
4697
|
+
function isValidElementType(type) {
|
|
4698
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
4699
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
4700
|
+
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);
|
|
4701
|
+
}
|
|
4702
|
+
function typeOf(object) {
|
|
4703
|
+
if (typeof object === 'object' && object !== null) {
|
|
4704
|
+
var $$typeof = object.$$typeof;
|
|
4705
|
+
switch ($$typeof) {
|
|
4706
|
+
case REACT_ELEMENT_TYPE:
|
|
4707
|
+
var type = object.type;
|
|
4708
|
+
switch (type) {
|
|
4709
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
4710
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
4711
|
+
case REACT_FRAGMENT_TYPE:
|
|
4712
|
+
case REACT_PROFILER_TYPE:
|
|
4713
|
+
case REACT_STRICT_MODE_TYPE:
|
|
4714
|
+
case REACT_SUSPENSE_TYPE:
|
|
4715
|
+
return type;
|
|
4716
|
+
default:
|
|
4717
|
+
var $$typeofType = type && type.$$typeof;
|
|
4718
|
+
switch ($$typeofType) {
|
|
4719
|
+
case REACT_CONTEXT_TYPE:
|
|
4720
|
+
case REACT_FORWARD_REF_TYPE:
|
|
4721
|
+
case REACT_LAZY_TYPE:
|
|
4722
|
+
case REACT_MEMO_TYPE:
|
|
4723
|
+
case REACT_PROVIDER_TYPE:
|
|
4724
|
+
return $$typeofType;
|
|
4725
|
+
default:
|
|
4726
|
+
return $$typeof;
|
|
4727
|
+
}
|
|
4728
|
+
}
|
|
4729
|
+
case REACT_PORTAL_TYPE:
|
|
4730
|
+
return $$typeof;
|
|
4731
|
+
}
|
|
4732
|
+
}
|
|
4733
|
+
return undefined;
|
|
4734
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
4735
|
+
|
|
4736
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
4737
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
4738
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
4739
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
4740
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
4741
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
4742
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
4743
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
4744
|
+
var Memo = REACT_MEMO_TYPE;
|
|
4745
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
4746
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
4747
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
4748
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
4749
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
4750
|
+
|
|
4751
|
+
function isAsyncMode(object) {
|
|
4752
|
+
{
|
|
4753
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
4754
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
4755
|
+
|
|
4756
|
+
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.');
|
|
4757
|
+
}
|
|
4758
|
+
}
|
|
4759
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
4760
|
+
}
|
|
4761
|
+
function isConcurrentMode(object) {
|
|
4762
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
4763
|
+
}
|
|
4764
|
+
function isContextConsumer(object) {
|
|
4765
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
4766
|
+
}
|
|
4767
|
+
function isContextProvider(object) {
|
|
4768
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
4769
|
+
}
|
|
4770
|
+
function isElement(object) {
|
|
4771
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
4772
|
+
}
|
|
4773
|
+
function isForwardRef(object) {
|
|
4774
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
4775
|
+
}
|
|
4776
|
+
function isFragment(object) {
|
|
4777
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
4778
|
+
}
|
|
4779
|
+
function isLazy(object) {
|
|
4780
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
4781
|
+
}
|
|
4782
|
+
function isMemo(object) {
|
|
4783
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
4784
|
+
}
|
|
4785
|
+
function isPortal(object) {
|
|
4786
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
4787
|
+
}
|
|
4788
|
+
function isProfiler(object) {
|
|
4789
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
4790
|
+
}
|
|
4791
|
+
function isStrictMode(object) {
|
|
4792
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
4793
|
+
}
|
|
4794
|
+
function isSuspense(object) {
|
|
4795
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
4796
|
+
}
|
|
4797
|
+
reactIs_development$6.AsyncMode = AsyncMode;
|
|
4798
|
+
reactIs_development$6.ConcurrentMode = ConcurrentMode;
|
|
4799
|
+
reactIs_development$6.ContextConsumer = ContextConsumer;
|
|
4800
|
+
reactIs_development$6.ContextProvider = ContextProvider;
|
|
4801
|
+
reactIs_development$6.Element = Element;
|
|
4802
|
+
reactIs_development$6.ForwardRef = ForwardRef;
|
|
4803
|
+
reactIs_development$6.Fragment = Fragment;
|
|
4804
|
+
reactIs_development$6.Lazy = Lazy;
|
|
4805
|
+
reactIs_development$6.Memo = Memo;
|
|
4806
|
+
reactIs_development$6.Portal = Portal;
|
|
4807
|
+
reactIs_development$6.Profiler = Profiler;
|
|
4808
|
+
reactIs_development$6.StrictMode = StrictMode;
|
|
4809
|
+
reactIs_development$6.Suspense = Suspense;
|
|
4810
|
+
reactIs_development$6.isAsyncMode = isAsyncMode;
|
|
4811
|
+
reactIs_development$6.isConcurrentMode = isConcurrentMode;
|
|
4812
|
+
reactIs_development$6.isContextConsumer = isContextConsumer;
|
|
4813
|
+
reactIs_development$6.isContextProvider = isContextProvider;
|
|
4814
|
+
reactIs_development$6.isElement = isElement;
|
|
4815
|
+
reactIs_development$6.isForwardRef = isForwardRef;
|
|
4816
|
+
reactIs_development$6.isFragment = isFragment;
|
|
4817
|
+
reactIs_development$6.isLazy = isLazy;
|
|
4818
|
+
reactIs_development$6.isMemo = isMemo;
|
|
4819
|
+
reactIs_development$6.isPortal = isPortal;
|
|
4820
|
+
reactIs_development$6.isProfiler = isProfiler;
|
|
4821
|
+
reactIs_development$6.isStrictMode = isStrictMode;
|
|
4822
|
+
reactIs_development$6.isSuspense = isSuspense;
|
|
4823
|
+
reactIs_development$6.isValidElementType = isValidElementType;
|
|
4824
|
+
reactIs_development$6.typeOf = typeOf;
|
|
4825
|
+
})();
|
|
4826
|
+
}
|
|
4827
|
+
return reactIs_development$6;
|
|
4828
|
+
}
|
|
4829
|
+
var hasRequiredReactIs$6;
|
|
4830
|
+
function requireReactIs$6() {
|
|
4831
|
+
if (hasRequiredReactIs$6) return reactIs$6.exports;
|
|
4832
|
+
hasRequiredReactIs$6 = 1;
|
|
4833
|
+
if (process.env.NODE_ENV === 'production') {
|
|
4834
|
+
reactIs$6.exports = requireReactIs_production_min$6();
|
|
4835
|
+
} else {
|
|
4836
|
+
reactIs$6.exports = requireReactIs_development$6();
|
|
4837
|
+
}
|
|
4838
|
+
return reactIs$6.exports;
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4841
|
+
/*
|
|
4842
|
+
object-assign
|
|
4843
|
+
(c) Sindre Sorhus
|
|
4844
|
+
@license MIT
|
|
4845
|
+
*/
|
|
4846
|
+
|
|
4847
|
+
var objectAssign$6;
|
|
4848
|
+
var hasRequiredObjectAssign$6;
|
|
4849
|
+
function requireObjectAssign$6() {
|
|
4850
|
+
if (hasRequiredObjectAssign$6) return objectAssign$6;
|
|
4851
|
+
hasRequiredObjectAssign$6 = 1;
|
|
4852
|
+
/* eslint-disable no-unused-vars */
|
|
4853
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
4854
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4855
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
4856
|
+
function toObject(val) {
|
|
4857
|
+
if (val === null || val === undefined) {
|
|
4858
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
4859
|
+
}
|
|
4860
|
+
return Object(val);
|
|
4861
|
+
}
|
|
4862
|
+
function shouldUseNative() {
|
|
4863
|
+
try {
|
|
4864
|
+
if (!Object.assign) {
|
|
4865
|
+
return false;
|
|
4866
|
+
}
|
|
4867
|
+
|
|
4868
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
4869
|
+
|
|
4870
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
4871
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
4872
|
+
test1[5] = 'de';
|
|
4873
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
4874
|
+
return false;
|
|
4875
|
+
}
|
|
4876
|
+
|
|
4877
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
4878
|
+
var test2 = {};
|
|
4879
|
+
for (var i = 0; i < 10; i++) {
|
|
4880
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
4881
|
+
}
|
|
4882
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
4883
|
+
return test2[n];
|
|
4884
|
+
});
|
|
4885
|
+
if (order2.join('') !== '0123456789') {
|
|
4886
|
+
return false;
|
|
4887
|
+
}
|
|
4888
|
+
|
|
4889
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
4890
|
+
var test3 = {};
|
|
4891
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
4892
|
+
test3[letter] = letter;
|
|
4893
|
+
});
|
|
4894
|
+
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
|
|
4895
|
+
return false;
|
|
4896
|
+
}
|
|
4897
|
+
return true;
|
|
4898
|
+
} catch (err) {
|
|
4899
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
4900
|
+
return false;
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
objectAssign$6 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
4904
|
+
var from;
|
|
4905
|
+
var to = toObject(target);
|
|
4906
|
+
var symbols;
|
|
4907
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
4908
|
+
from = Object(arguments[s]);
|
|
4909
|
+
for (var key in from) {
|
|
4910
|
+
if (hasOwnProperty.call(from, key)) {
|
|
4911
|
+
to[key] = from[key];
|
|
4912
|
+
}
|
|
4913
|
+
}
|
|
4914
|
+
if (getOwnPropertySymbols) {
|
|
4915
|
+
symbols = getOwnPropertySymbols(from);
|
|
4916
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
4917
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
4918
|
+
to[symbols[i]] = from[symbols[i]];
|
|
4919
|
+
}
|
|
4920
|
+
}
|
|
4921
|
+
}
|
|
4922
|
+
}
|
|
4923
|
+
return to;
|
|
4924
|
+
};
|
|
4925
|
+
return objectAssign$6;
|
|
4926
|
+
}
|
|
4927
|
+
|
|
4928
|
+
/**
|
|
4929
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4930
|
+
*
|
|
4931
|
+
* This source code is licensed under the MIT license found in the
|
|
4932
|
+
* LICENSE file in the root directory of this source tree.
|
|
4933
|
+
*/
|
|
4934
|
+
|
|
4935
|
+
var ReactPropTypesSecret_1$6;
|
|
4936
|
+
var hasRequiredReactPropTypesSecret$6;
|
|
4937
|
+
function requireReactPropTypesSecret$6() {
|
|
4938
|
+
if (hasRequiredReactPropTypesSecret$6) return ReactPropTypesSecret_1$6;
|
|
4939
|
+
hasRequiredReactPropTypesSecret$6 = 1;
|
|
4940
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
4941
|
+
ReactPropTypesSecret_1$6 = ReactPropTypesSecret;
|
|
4942
|
+
return ReactPropTypesSecret_1$6;
|
|
4943
|
+
}
|
|
4944
|
+
var has$6;
|
|
4945
|
+
var hasRequiredHas$6;
|
|
4946
|
+
function requireHas$6() {
|
|
4947
|
+
if (hasRequiredHas$6) return has$6;
|
|
4948
|
+
hasRequiredHas$6 = 1;
|
|
4949
|
+
has$6 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
4950
|
+
return has$6;
|
|
4951
|
+
}
|
|
4952
|
+
|
|
4953
|
+
/**
|
|
4954
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4955
|
+
*
|
|
4956
|
+
* This source code is licensed under the MIT license found in the
|
|
4957
|
+
* LICENSE file in the root directory of this source tree.
|
|
4958
|
+
*/
|
|
4959
|
+
|
|
4960
|
+
var checkPropTypes_1$6;
|
|
4961
|
+
var hasRequiredCheckPropTypes$6;
|
|
4962
|
+
function requireCheckPropTypes$6() {
|
|
4963
|
+
if (hasRequiredCheckPropTypes$6) return checkPropTypes_1$6;
|
|
4964
|
+
hasRequiredCheckPropTypes$6 = 1;
|
|
4965
|
+
var printWarning = function () {};
|
|
4966
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4967
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$6();
|
|
4968
|
+
var loggedTypeFailures = {};
|
|
4969
|
+
var has = /*@__PURE__*/requireHas$6();
|
|
4970
|
+
printWarning = function (text) {
|
|
4971
|
+
var message = 'Warning: ' + text;
|
|
4972
|
+
if (typeof console !== 'undefined') {
|
|
4973
|
+
console.error(message);
|
|
4974
|
+
}
|
|
4975
|
+
try {
|
|
4976
|
+
// --- Welcome to debugging React ---
|
|
4977
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
4978
|
+
// to find the callsite that caused this warning to fire.
|
|
4979
|
+
throw new Error(message);
|
|
4980
|
+
} catch (x) {/**/}
|
|
4981
|
+
};
|
|
4982
|
+
}
|
|
4983
|
+
|
|
4984
|
+
/**
|
|
4985
|
+
* Assert that the values match with the type specs.
|
|
4986
|
+
* Error messages are memorized and will only be shown once.
|
|
4987
|
+
*
|
|
4988
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
4989
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
4990
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
4991
|
+
* @param {string} componentName Name of the component for error messages.
|
|
4992
|
+
* @param {?Function} getStack Returns the component stack.
|
|
4993
|
+
* @private
|
|
4994
|
+
*/
|
|
4995
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
4996
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4997
|
+
for (var typeSpecName in typeSpecs) {
|
|
4998
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
4999
|
+
var error;
|
|
5000
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
5001
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
5002
|
+
// After these have been cleaned up, we'll let them throw.
|
|
5003
|
+
try {
|
|
5004
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
5005
|
+
// behavior as without this statement except with a better message.
|
|
5006
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
5007
|
+
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`.');
|
|
5008
|
+
err.name = 'Invariant Violation';
|
|
5009
|
+
throw err;
|
|
5010
|
+
}
|
|
5011
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
5012
|
+
} catch (ex) {
|
|
5013
|
+
error = ex;
|
|
5014
|
+
}
|
|
5015
|
+
if (error && !(error instanceof Error)) {
|
|
5016
|
+
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).');
|
|
5017
|
+
}
|
|
5018
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
5019
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
5020
|
+
// same error.
|
|
5021
|
+
loggedTypeFailures[error.message] = true;
|
|
5022
|
+
var stack = getStack ? getStack() : '';
|
|
5023
|
+
printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
}
|
|
5029
|
+
|
|
5030
|
+
/**
|
|
5031
|
+
* Resets warning cache when testing.
|
|
5032
|
+
*
|
|
5033
|
+
* @private
|
|
5034
|
+
*/
|
|
5035
|
+
checkPropTypes.resetWarningCache = function () {
|
|
5036
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5037
|
+
loggedTypeFailures = {};
|
|
5038
|
+
}
|
|
5039
|
+
};
|
|
5040
|
+
checkPropTypes_1$6 = checkPropTypes;
|
|
5041
|
+
return checkPropTypes_1$6;
|
|
5042
|
+
}
|
|
5043
|
+
|
|
5044
|
+
/**
|
|
5045
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5046
|
+
*
|
|
5047
|
+
* This source code is licensed under the MIT license found in the
|
|
5048
|
+
* LICENSE file in the root directory of this source tree.
|
|
5049
|
+
*/
|
|
5050
|
+
|
|
5051
|
+
var factoryWithTypeCheckers$6;
|
|
5052
|
+
var hasRequiredFactoryWithTypeCheckers$6;
|
|
5053
|
+
function requireFactoryWithTypeCheckers$6() {
|
|
5054
|
+
if (hasRequiredFactoryWithTypeCheckers$6) return factoryWithTypeCheckers$6;
|
|
5055
|
+
hasRequiredFactoryWithTypeCheckers$6 = 1;
|
|
5056
|
+
var ReactIs = requireReactIs$6();
|
|
5057
|
+
var assign = requireObjectAssign$6();
|
|
5058
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$6();
|
|
5059
|
+
var has = /*@__PURE__*/requireHas$6();
|
|
5060
|
+
var checkPropTypes = /*@__PURE__*/requireCheckPropTypes$6();
|
|
5061
|
+
var printWarning = function () {};
|
|
5062
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5063
|
+
printWarning = function (text) {
|
|
5064
|
+
var message = 'Warning: ' + text;
|
|
5065
|
+
if (typeof console !== 'undefined') {
|
|
5066
|
+
console.error(message);
|
|
5067
|
+
}
|
|
5068
|
+
try {
|
|
5069
|
+
// --- Welcome to debugging React ---
|
|
5070
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
5071
|
+
// to find the callsite that caused this warning to fire.
|
|
5072
|
+
throw new Error(message);
|
|
5073
|
+
} catch (x) {}
|
|
5074
|
+
};
|
|
5075
|
+
}
|
|
5076
|
+
function emptyFunctionThatReturnsNull() {
|
|
5077
|
+
return null;
|
|
5078
|
+
}
|
|
5079
|
+
factoryWithTypeCheckers$6 = function (isValidElement, throwOnDirectAccess) {
|
|
5080
|
+
/* global Symbol */
|
|
5081
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
5082
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
5083
|
+
|
|
5084
|
+
/**
|
|
5085
|
+
* Returns the iterator method function contained on the iterable object.
|
|
5086
|
+
*
|
|
5087
|
+
* Be sure to invoke the function with the iterable as context:
|
|
5088
|
+
*
|
|
5089
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
5090
|
+
* if (iteratorFn) {
|
|
5091
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
5092
|
+
* ...
|
|
5093
|
+
* }
|
|
5094
|
+
*
|
|
5095
|
+
* @param {?object} maybeIterable
|
|
5096
|
+
* @return {?function}
|
|
5097
|
+
*/
|
|
5098
|
+
function getIteratorFn(maybeIterable) {
|
|
5099
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
5100
|
+
if (typeof iteratorFn === 'function') {
|
|
5101
|
+
return iteratorFn;
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
|
|
5105
|
+
/**
|
|
5106
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
5107
|
+
* supplied to React components. Example usage:
|
|
5108
|
+
*
|
|
5109
|
+
* var Props = require('ReactPropTypes');
|
|
5110
|
+
* var MyArticle = React.createClass({
|
|
5111
|
+
* propTypes: {
|
|
5112
|
+
* // An optional string prop named "description".
|
|
5113
|
+
* description: Props.string,
|
|
5114
|
+
*
|
|
5115
|
+
* // A required enum prop named "category".
|
|
5116
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
5117
|
+
*
|
|
5118
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
5119
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
5120
|
+
* },
|
|
5121
|
+
* render: function() { ... }
|
|
5122
|
+
* });
|
|
5123
|
+
*
|
|
5124
|
+
* A more formal specification of how these methods are used:
|
|
5125
|
+
*
|
|
5126
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
5127
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
5128
|
+
*
|
|
5129
|
+
* Each and every declaration produces a function with the same signature. This
|
|
5130
|
+
* allows the creation of custom validation functions. For example:
|
|
5131
|
+
*
|
|
5132
|
+
* var MyLink = React.createClass({
|
|
5133
|
+
* propTypes: {
|
|
5134
|
+
* // An optional string or URI prop named "href".
|
|
5135
|
+
* href: function(props, propName, componentName) {
|
|
5136
|
+
* var propValue = props[propName];
|
|
5137
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
5138
|
+
* !(propValue instanceof URI)) {
|
|
5139
|
+
* return new Error(
|
|
5140
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
5141
|
+
* componentName
|
|
5142
|
+
* );
|
|
5143
|
+
* }
|
|
5144
|
+
* }
|
|
5145
|
+
* },
|
|
5146
|
+
* render: function() {...}
|
|
5147
|
+
* });
|
|
5148
|
+
*
|
|
5149
|
+
* @internal
|
|
5150
|
+
*/
|
|
5151
|
+
|
|
5152
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
5153
|
+
|
|
5154
|
+
// Important!
|
|
5155
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
5156
|
+
var ReactPropTypes = {
|
|
5157
|
+
array: createPrimitiveTypeChecker('array'),
|
|
5158
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
5159
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
5160
|
+
func: createPrimitiveTypeChecker('function'),
|
|
5161
|
+
number: createPrimitiveTypeChecker('number'),
|
|
5162
|
+
object: createPrimitiveTypeChecker('object'),
|
|
5163
|
+
string: createPrimitiveTypeChecker('string'),
|
|
5164
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
5165
|
+
any: createAnyTypeChecker(),
|
|
5166
|
+
arrayOf: createArrayOfTypeChecker,
|
|
5167
|
+
element: createElementTypeChecker(),
|
|
5168
|
+
elementType: createElementTypeTypeChecker(),
|
|
5169
|
+
instanceOf: createInstanceTypeChecker,
|
|
5170
|
+
node: createNodeChecker(),
|
|
5171
|
+
objectOf: createObjectOfTypeChecker,
|
|
5172
|
+
oneOf: createEnumTypeChecker,
|
|
5173
|
+
oneOfType: createUnionTypeChecker,
|
|
5174
|
+
shape: createShapeTypeChecker,
|
|
5175
|
+
exact: createStrictShapeTypeChecker
|
|
5176
|
+
};
|
|
5177
|
+
|
|
5178
|
+
/**
|
|
5179
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
5180
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
5181
|
+
*/
|
|
5182
|
+
/*eslint-disable no-self-compare*/
|
|
5183
|
+
function is(x, y) {
|
|
5184
|
+
// SameValue algorithm
|
|
5185
|
+
if (x === y) {
|
|
5186
|
+
// Steps 1-5, 7-10
|
|
5187
|
+
// Steps 6.b-6.e: +0 != -0
|
|
5188
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
5189
|
+
} else {
|
|
5190
|
+
// Step 6.a: NaN == NaN
|
|
5191
|
+
return x !== x && y !== y;
|
|
5192
|
+
}
|
|
5193
|
+
}
|
|
5194
|
+
/*eslint-enable no-self-compare*/
|
|
5195
|
+
|
|
5196
|
+
/**
|
|
5197
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
5198
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
5199
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
5200
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
5201
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
5202
|
+
*/
|
|
5203
|
+
function PropTypeError(message, data) {
|
|
5204
|
+
this.message = message;
|
|
5205
|
+
this.data = data && typeof data === 'object' ? data : {};
|
|
5206
|
+
this.stack = '';
|
|
5207
|
+
}
|
|
5208
|
+
// Make `instanceof Error` still work for returned errors.
|
|
5209
|
+
PropTypeError.prototype = Error.prototype;
|
|
5210
|
+
function createChainableTypeChecker(validate) {
|
|
5211
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5212
|
+
var manualPropTypeCallCache = {};
|
|
5213
|
+
var manualPropTypeWarningCount = 0;
|
|
5214
|
+
}
|
|
5215
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
5216
|
+
componentName = componentName || ANONYMOUS;
|
|
5217
|
+
propFullName = propFullName || propName;
|
|
5218
|
+
if (secret !== ReactPropTypesSecret) {
|
|
5219
|
+
if (throwOnDirectAccess) {
|
|
5220
|
+
// New behavior only for users of `prop-types` package
|
|
5221
|
+
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');
|
|
5222
|
+
err.name = 'Invariant Violation';
|
|
5223
|
+
throw err;
|
|
5224
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
5225
|
+
// Old behavior for people using React.PropTypes
|
|
5226
|
+
var cacheKey = componentName + ':' + propName;
|
|
5227
|
+
if (!manualPropTypeCallCache[cacheKey] &&
|
|
5228
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
5229
|
+
manualPropTypeWarningCount < 3) {
|
|
5230
|
+
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.');
|
|
5231
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
5232
|
+
manualPropTypeWarningCount++;
|
|
5233
|
+
}
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5236
|
+
if (props[propName] == null) {
|
|
5237
|
+
if (isRequired) {
|
|
5238
|
+
if (props[propName] === null) {
|
|
5239
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
5240
|
+
}
|
|
5241
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
5242
|
+
}
|
|
5243
|
+
return null;
|
|
5244
|
+
} else {
|
|
5245
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
5246
|
+
}
|
|
5247
|
+
}
|
|
5248
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
5249
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
5250
|
+
return chainedCheckType;
|
|
5251
|
+
}
|
|
5252
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
5253
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
5254
|
+
var propValue = props[propName];
|
|
5255
|
+
var propType = getPropType(propValue);
|
|
5256
|
+
if (propType !== expectedType) {
|
|
5257
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
5258
|
+
// check, but we can offer a more precise error message here rather than
|
|
5259
|
+
// 'of type `object`'.
|
|
5260
|
+
var preciseType = getPreciseType(propValue);
|
|
5261
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
|
|
5262
|
+
expectedType: expectedType
|
|
5263
|
+
});
|
|
5264
|
+
}
|
|
5265
|
+
return null;
|
|
5266
|
+
}
|
|
5267
|
+
return createChainableTypeChecker(validate);
|
|
5268
|
+
}
|
|
5269
|
+
function createAnyTypeChecker() {
|
|
5270
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
5271
|
+
}
|
|
5272
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
5273
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5274
|
+
if (typeof typeChecker !== 'function') {
|
|
5275
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
5276
|
+
}
|
|
5277
|
+
var propValue = props[propName];
|
|
5278
|
+
if (!Array.isArray(propValue)) {
|
|
5279
|
+
var propType = getPropType(propValue);
|
|
5280
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
5281
|
+
}
|
|
5282
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
5283
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
5284
|
+
if (error instanceof Error) {
|
|
5285
|
+
return error;
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5288
|
+
return null;
|
|
5289
|
+
}
|
|
5290
|
+
return createChainableTypeChecker(validate);
|
|
5291
|
+
}
|
|
5292
|
+
function createElementTypeChecker() {
|
|
5293
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5294
|
+
var propValue = props[propName];
|
|
5295
|
+
if (!isValidElement(propValue)) {
|
|
5296
|
+
var propType = getPropType(propValue);
|
|
5297
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
5298
|
+
}
|
|
5299
|
+
return null;
|
|
5300
|
+
}
|
|
5301
|
+
return createChainableTypeChecker(validate);
|
|
5302
|
+
}
|
|
5303
|
+
function createElementTypeTypeChecker() {
|
|
5304
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5305
|
+
var propValue = props[propName];
|
|
5306
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
5307
|
+
var propType = getPropType(propValue);
|
|
5308
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
5309
|
+
}
|
|
5310
|
+
return null;
|
|
5311
|
+
}
|
|
5312
|
+
return createChainableTypeChecker(validate);
|
|
5313
|
+
}
|
|
5314
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
5315
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5316
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
5317
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
5318
|
+
var actualClassName = getClassName(props[propName]);
|
|
5319
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
5320
|
+
}
|
|
5321
|
+
return null;
|
|
5322
|
+
}
|
|
5323
|
+
return createChainableTypeChecker(validate);
|
|
5324
|
+
}
|
|
5325
|
+
function createEnumTypeChecker(expectedValues) {
|
|
5326
|
+
if (!Array.isArray(expectedValues)) {
|
|
5327
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5328
|
+
if (arguments.length > 1) {
|
|
5329
|
+
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]).');
|
|
5330
|
+
} else {
|
|
5331
|
+
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
5332
|
+
}
|
|
5333
|
+
}
|
|
5334
|
+
return emptyFunctionThatReturnsNull;
|
|
5335
|
+
}
|
|
5336
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5337
|
+
var propValue = props[propName];
|
|
5338
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
5339
|
+
if (is(propValue, expectedValues[i])) {
|
|
5340
|
+
return null;
|
|
5341
|
+
}
|
|
5342
|
+
}
|
|
5343
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
5344
|
+
var type = getPreciseType(value);
|
|
5345
|
+
if (type === 'symbol') {
|
|
5346
|
+
return String(value);
|
|
5347
|
+
}
|
|
5348
|
+
return value;
|
|
5349
|
+
});
|
|
5350
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
5351
|
+
}
|
|
5352
|
+
return createChainableTypeChecker(validate);
|
|
5353
|
+
}
|
|
5354
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
5355
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5356
|
+
if (typeof typeChecker !== 'function') {
|
|
5357
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
5358
|
+
}
|
|
5359
|
+
var propValue = props[propName];
|
|
5360
|
+
var propType = getPropType(propValue);
|
|
5361
|
+
if (propType !== 'object') {
|
|
5362
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
5363
|
+
}
|
|
5364
|
+
for (var key in propValue) {
|
|
5365
|
+
if (has(propValue, key)) {
|
|
5366
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
5367
|
+
if (error instanceof Error) {
|
|
5368
|
+
return error;
|
|
5369
|
+
}
|
|
5370
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
return null;
|
|
5373
|
+
}
|
|
5374
|
+
return createChainableTypeChecker(validate);
|
|
5375
|
+
}
|
|
5376
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
5377
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
5378
|
+
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
5379
|
+
return emptyFunctionThatReturnsNull;
|
|
5380
|
+
}
|
|
5381
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
5382
|
+
var checker = arrayOfTypeCheckers[i];
|
|
5383
|
+
if (typeof checker !== 'function') {
|
|
5384
|
+
printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
|
|
5385
|
+
return emptyFunctionThatReturnsNull;
|
|
5386
|
+
}
|
|
5387
|
+
}
|
|
5388
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5389
|
+
var expectedTypes = [];
|
|
5390
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
5391
|
+
var checker = arrayOfTypeCheckers[i];
|
|
5392
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
5393
|
+
if (checkerResult == null) {
|
|
5394
|
+
return null;
|
|
5395
|
+
}
|
|
5396
|
+
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
5397
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
|
|
5401
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
5402
|
+
}
|
|
5403
|
+
return createChainableTypeChecker(validate);
|
|
5404
|
+
}
|
|
5405
|
+
function createNodeChecker() {
|
|
5406
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5407
|
+
if (!isNode(props[propName])) {
|
|
5408
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
5409
|
+
}
|
|
5410
|
+
return null;
|
|
5411
|
+
}
|
|
5412
|
+
return createChainableTypeChecker(validate);
|
|
5413
|
+
}
|
|
5414
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
5415
|
+
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 + '`.');
|
|
5416
|
+
}
|
|
5417
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
5418
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5419
|
+
var propValue = props[propName];
|
|
5420
|
+
var propType = getPropType(propValue);
|
|
5421
|
+
if (propType !== 'object') {
|
|
5422
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
5423
|
+
}
|
|
5424
|
+
for (var key in shapeTypes) {
|
|
5425
|
+
var checker = shapeTypes[key];
|
|
5426
|
+
if (typeof checker !== 'function') {
|
|
5427
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
5428
|
+
}
|
|
5429
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
5430
|
+
if (error) {
|
|
5431
|
+
return error;
|
|
5432
|
+
}
|
|
5433
|
+
}
|
|
5434
|
+
return null;
|
|
5435
|
+
}
|
|
5436
|
+
return createChainableTypeChecker(validate);
|
|
5437
|
+
}
|
|
5438
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
5439
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
5440
|
+
var propValue = props[propName];
|
|
5441
|
+
var propType = getPropType(propValue);
|
|
5442
|
+
if (propType !== 'object') {
|
|
5443
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
5444
|
+
}
|
|
5445
|
+
// We need to check all keys in case some are required but missing from props.
|
|
5446
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
5447
|
+
for (var key in allKeys) {
|
|
5448
|
+
var checker = shapeTypes[key];
|
|
5449
|
+
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
5450
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
5451
|
+
}
|
|
5452
|
+
if (!checker) {
|
|
5453
|
+
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, ' '));
|
|
5454
|
+
}
|
|
5455
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
5456
|
+
if (error) {
|
|
5457
|
+
return error;
|
|
5458
|
+
}
|
|
5459
|
+
}
|
|
5460
|
+
return null;
|
|
5461
|
+
}
|
|
5462
|
+
return createChainableTypeChecker(validate);
|
|
5463
|
+
}
|
|
5464
|
+
function isNode(propValue) {
|
|
5465
|
+
switch (typeof propValue) {
|
|
5466
|
+
case 'number':
|
|
5467
|
+
case 'string':
|
|
5468
|
+
case 'undefined':
|
|
5469
|
+
return true;
|
|
5470
|
+
case 'boolean':
|
|
5471
|
+
return !propValue;
|
|
5472
|
+
case 'object':
|
|
5473
|
+
if (Array.isArray(propValue)) {
|
|
5474
|
+
return propValue.every(isNode);
|
|
5475
|
+
}
|
|
5476
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
5477
|
+
return true;
|
|
5478
|
+
}
|
|
5479
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
5480
|
+
if (iteratorFn) {
|
|
5481
|
+
var iterator = iteratorFn.call(propValue);
|
|
5482
|
+
var step;
|
|
5483
|
+
if (iteratorFn !== propValue.entries) {
|
|
5484
|
+
while (!(step = iterator.next()).done) {
|
|
5485
|
+
if (!isNode(step.value)) {
|
|
5486
|
+
return false;
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5489
|
+
} else {
|
|
5490
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
5491
|
+
while (!(step = iterator.next()).done) {
|
|
5492
|
+
var entry = step.value;
|
|
5493
|
+
if (entry) {
|
|
5494
|
+
if (!isNode(entry[1])) {
|
|
5495
|
+
return false;
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5498
|
+
}
|
|
5499
|
+
}
|
|
5500
|
+
} else {
|
|
5501
|
+
return false;
|
|
5502
|
+
}
|
|
5503
|
+
return true;
|
|
5504
|
+
default:
|
|
5505
|
+
return false;
|
|
5506
|
+
}
|
|
5507
|
+
}
|
|
5508
|
+
function isSymbol(propType, propValue) {
|
|
5509
|
+
// Native Symbol.
|
|
5510
|
+
if (propType === 'symbol') {
|
|
5511
|
+
return true;
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5514
|
+
// falsy value can't be a Symbol
|
|
5515
|
+
if (!propValue) {
|
|
5516
|
+
return false;
|
|
5517
|
+
}
|
|
5518
|
+
|
|
5519
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
5520
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
5521
|
+
return true;
|
|
5522
|
+
}
|
|
5523
|
+
|
|
5524
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
5525
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
5526
|
+
return true;
|
|
5527
|
+
}
|
|
5528
|
+
return false;
|
|
5529
|
+
}
|
|
5530
|
+
|
|
5531
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
5532
|
+
function getPropType(propValue) {
|
|
5533
|
+
var propType = typeof propValue;
|
|
5534
|
+
if (Array.isArray(propValue)) {
|
|
5535
|
+
return 'array';
|
|
5536
|
+
}
|
|
5537
|
+
if (propValue instanceof RegExp) {
|
|
5538
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
5539
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
5540
|
+
// passes PropTypes.object.
|
|
5541
|
+
return 'object';
|
|
5542
|
+
}
|
|
5543
|
+
if (isSymbol(propType, propValue)) {
|
|
5544
|
+
return 'symbol';
|
|
5545
|
+
}
|
|
5546
|
+
return propType;
|
|
5547
|
+
}
|
|
5548
|
+
|
|
5549
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
5550
|
+
// See `createPrimitiveTypeChecker`.
|
|
5551
|
+
function getPreciseType(propValue) {
|
|
5552
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
5553
|
+
return '' + propValue;
|
|
5554
|
+
}
|
|
5555
|
+
var propType = getPropType(propValue);
|
|
5556
|
+
if (propType === 'object') {
|
|
5557
|
+
if (propValue instanceof Date) {
|
|
5558
|
+
return 'date';
|
|
5559
|
+
} else if (propValue instanceof RegExp) {
|
|
5560
|
+
return 'regexp';
|
|
5561
|
+
}
|
|
5562
|
+
}
|
|
5563
|
+
return propType;
|
|
5564
|
+
}
|
|
5565
|
+
|
|
5566
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
5567
|
+
// For example, "undefined" or "of type array"
|
|
5568
|
+
function getPostfixForTypeWarning(value) {
|
|
5569
|
+
var type = getPreciseType(value);
|
|
5570
|
+
switch (type) {
|
|
5571
|
+
case 'array':
|
|
5572
|
+
case 'object':
|
|
5573
|
+
return 'an ' + type;
|
|
5574
|
+
case 'boolean':
|
|
5575
|
+
case 'date':
|
|
5576
|
+
case 'regexp':
|
|
5577
|
+
return 'a ' + type;
|
|
5578
|
+
default:
|
|
5579
|
+
return type;
|
|
5580
|
+
}
|
|
5581
|
+
}
|
|
5582
|
+
|
|
5583
|
+
// Returns class name of the object, if any.
|
|
5584
|
+
function getClassName(propValue) {
|
|
5585
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
5586
|
+
return ANONYMOUS;
|
|
5587
|
+
}
|
|
5588
|
+
return propValue.constructor.name;
|
|
5589
|
+
}
|
|
5590
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
5591
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
5592
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
5593
|
+
return ReactPropTypes;
|
|
5594
|
+
};
|
|
5595
|
+
return factoryWithTypeCheckers$6;
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
/**
|
|
5599
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5600
|
+
*
|
|
5601
|
+
* This source code is licensed under the MIT license found in the
|
|
5602
|
+
* LICENSE file in the root directory of this source tree.
|
|
5603
|
+
*/
|
|
5604
|
+
|
|
5605
|
+
var factoryWithThrowingShims$6;
|
|
5606
|
+
var hasRequiredFactoryWithThrowingShims$6;
|
|
5607
|
+
function requireFactoryWithThrowingShims$6() {
|
|
5608
|
+
if (hasRequiredFactoryWithThrowingShims$6) return factoryWithThrowingShims$6;
|
|
5609
|
+
hasRequiredFactoryWithThrowingShims$6 = 1;
|
|
5610
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$6();
|
|
5611
|
+
function emptyFunction() {}
|
|
5612
|
+
function emptyFunctionWithReset() {}
|
|
5613
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
5614
|
+
factoryWithThrowingShims$6 = function () {
|
|
5615
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
5616
|
+
if (secret === ReactPropTypesSecret) {
|
|
5617
|
+
// It is still safe when called from React.
|
|
5618
|
+
return;
|
|
5619
|
+
}
|
|
5620
|
+
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');
|
|
5621
|
+
err.name = 'Invariant Violation';
|
|
5622
|
+
throw err;
|
|
5623
|
+
}
|
|
5624
|
+
shim.isRequired = shim;
|
|
5625
|
+
function getShim() {
|
|
5626
|
+
return shim;
|
|
5627
|
+
} // Important!
|
|
5628
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
5629
|
+
var ReactPropTypes = {
|
|
5630
|
+
array: shim,
|
|
5631
|
+
bigint: shim,
|
|
5632
|
+
bool: shim,
|
|
5633
|
+
func: shim,
|
|
5634
|
+
number: shim,
|
|
5635
|
+
object: shim,
|
|
5636
|
+
string: shim,
|
|
5637
|
+
symbol: shim,
|
|
5638
|
+
any: shim,
|
|
5639
|
+
arrayOf: getShim,
|
|
5640
|
+
element: shim,
|
|
5641
|
+
elementType: shim,
|
|
5642
|
+
instanceOf: getShim,
|
|
5643
|
+
node: shim,
|
|
5644
|
+
objectOf: getShim,
|
|
5645
|
+
oneOf: getShim,
|
|
5646
|
+
oneOfType: getShim,
|
|
5647
|
+
shape: getShim,
|
|
5648
|
+
exact: getShim,
|
|
5649
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
5650
|
+
resetWarningCache: emptyFunction
|
|
5651
|
+
};
|
|
5652
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
5653
|
+
return ReactPropTypes;
|
|
5654
|
+
};
|
|
5655
|
+
return factoryWithThrowingShims$6;
|
|
5656
|
+
}
|
|
5657
|
+
|
|
5658
|
+
/**
|
|
5659
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5660
|
+
*
|
|
5661
|
+
* This source code is licensed under the MIT license found in the
|
|
5662
|
+
* LICENSE file in the root directory of this source tree.
|
|
5663
|
+
*/
|
|
5664
|
+
|
|
5665
|
+
var hasRequiredPropTypes$6;
|
|
5666
|
+
function requirePropTypes$6() {
|
|
5667
|
+
if (hasRequiredPropTypes$6) return propTypes$6.exports;
|
|
5668
|
+
hasRequiredPropTypes$6 = 1;
|
|
5669
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5670
|
+
var ReactIs = requireReactIs$6();
|
|
5671
|
+
|
|
5672
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
5673
|
+
// http://fb.me/prop-types-in-prod
|
|
5674
|
+
var throwOnDirectAccess = true;
|
|
5675
|
+
propTypes$6.exports = /*@__PURE__*/requireFactoryWithTypeCheckers$6()(ReactIs.isElement, throwOnDirectAccess);
|
|
5676
|
+
} else {
|
|
5677
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
5678
|
+
// http://fb.me/prop-types-in-prod
|
|
5679
|
+
propTypes$6.exports = /*@__PURE__*/requireFactoryWithThrowingShims$6()();
|
|
5680
|
+
}
|
|
5681
|
+
return propTypes$6.exports;
|
|
5682
|
+
}
|
|
5683
|
+
var propTypesExports$6 = /*@__PURE__*/requirePropTypes$6();
|
|
5684
|
+
var PropTypes$6 = /*@__PURE__*/getDefaultExportFromCjs$6(propTypesExports$6);
|
|
5685
|
+
({
|
|
5686
|
+
onPowerOff: PropTypes$6.func,
|
|
5687
|
+
onRestart: PropTypes$6.func,
|
|
5688
|
+
powerOffLabel: PropTypes$6.string,
|
|
5689
|
+
restartLabel: PropTypes$6.string,
|
|
5690
|
+
iconClassName: PropTypes$6.string,
|
|
5691
|
+
confirmTitle: PropTypes$6.string,
|
|
5692
|
+
cancelText: PropTypes$6.string,
|
|
5693
|
+
okText: PropTypes$6.string,
|
|
5694
|
+
run: PropTypes$6.func
|
|
5695
|
+
});
|
|
5696
|
+
({
|
|
5697
|
+
logoUrl: PropTypes$6.string,
|
|
5698
|
+
logoWidth: PropTypes$6.number,
|
|
5699
|
+
logoAlt: PropTypes$6.string,
|
|
5700
|
+
onClick: PropTypes$6.func
|
|
5701
|
+
});
|
|
5702
|
+
function getDefaultExportFromCjs$5(x) {
|
|
5703
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5704
|
+
}
|
|
5705
|
+
var propTypes$5 = {
|
|
5706
|
+
exports: {}
|
|
5707
|
+
};
|
|
5708
|
+
var reactIs$5 = {
|
|
5709
|
+
exports: {}
|
|
5710
|
+
};
|
|
5711
|
+
var reactIs_production_min$5 = {};
|
|
5712
|
+
|
|
5713
|
+
/** @license React v16.13.1
|
|
5714
|
+
* react-is.production.min.js
|
|
5715
|
+
*
|
|
5716
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5717
|
+
*
|
|
5718
|
+
* This source code is licensed under the MIT license found in the
|
|
5719
|
+
* LICENSE file in the root directory of this source tree.
|
|
5720
|
+
*/
|
|
5721
|
+
|
|
5722
|
+
var hasRequiredReactIs_production_min$5;
|
|
5723
|
+
function requireReactIs_production_min$5() {
|
|
5724
|
+
if (hasRequiredReactIs_production_min$5) return reactIs_production_min$5;
|
|
5725
|
+
hasRequiredReactIs_production_min$5 = 1;
|
|
5726
|
+
var b = "function" === typeof Symbol && Symbol.for,
|
|
5727
|
+
c = b ? Symbol.for("react.element") : 60103,
|
|
5728
|
+
d = b ? Symbol.for("react.portal") : 60106,
|
|
5729
|
+
e = b ? Symbol.for("react.fragment") : 60107,
|
|
5730
|
+
f = b ? Symbol.for("react.strict_mode") : 60108,
|
|
5731
|
+
g = b ? Symbol.for("react.profiler") : 60114,
|
|
5732
|
+
h = b ? Symbol.for("react.provider") : 60109,
|
|
5733
|
+
k = b ? Symbol.for("react.context") : 60110,
|
|
5734
|
+
l = b ? Symbol.for("react.async_mode") : 60111,
|
|
5735
|
+
m = b ? Symbol.for("react.concurrent_mode") : 60111,
|
|
5736
|
+
n = b ? Symbol.for("react.forward_ref") : 60112,
|
|
5737
|
+
p = b ? Symbol.for("react.suspense") : 60113,
|
|
5738
|
+
q = b ? Symbol.for("react.suspense_list") : 60120,
|
|
5739
|
+
r = b ? Symbol.for("react.memo") : 60115,
|
|
5740
|
+
t = b ? Symbol.for("react.lazy") : 60116,
|
|
5741
|
+
v = b ? Symbol.for("react.block") : 60121,
|
|
5742
|
+
w = b ? Symbol.for("react.fundamental") : 60117,
|
|
5743
|
+
x = b ? Symbol.for("react.responder") : 60118,
|
|
5744
|
+
y = b ? Symbol.for("react.scope") : 60119;
|
|
5745
|
+
function z(a) {
|
|
5746
|
+
if ("object" === typeof a && null !== a) {
|
|
5747
|
+
var u = a.$$typeof;
|
|
5748
|
+
switch (u) {
|
|
5749
|
+
case c:
|
|
5750
|
+
switch (a = a.type, a) {
|
|
5751
|
+
case l:
|
|
5752
|
+
case m:
|
|
5753
|
+
case e:
|
|
5754
|
+
case g:
|
|
5755
|
+
case f:
|
|
5756
|
+
case p:
|
|
5757
|
+
return a;
|
|
5758
|
+
default:
|
|
5759
|
+
switch (a = a && a.$$typeof, a) {
|
|
5760
|
+
case k:
|
|
5761
|
+
case n:
|
|
5762
|
+
case t:
|
|
5763
|
+
case r:
|
|
5764
|
+
case h:
|
|
5765
|
+
return a;
|
|
5766
|
+
default:
|
|
5767
|
+
return u;
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
case d:
|
|
5771
|
+
return u;
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
}
|
|
5775
|
+
function A(a) {
|
|
5776
|
+
return z(a) === m;
|
|
5777
|
+
}
|
|
5778
|
+
reactIs_production_min$5.AsyncMode = l;
|
|
5779
|
+
reactIs_production_min$5.ConcurrentMode = m;
|
|
5780
|
+
reactIs_production_min$5.ContextConsumer = k;
|
|
5781
|
+
reactIs_production_min$5.ContextProvider = h;
|
|
5782
|
+
reactIs_production_min$5.Element = c;
|
|
5783
|
+
reactIs_production_min$5.ForwardRef = n;
|
|
5784
|
+
reactIs_production_min$5.Fragment = e;
|
|
5785
|
+
reactIs_production_min$5.Lazy = t;
|
|
5786
|
+
reactIs_production_min$5.Memo = r;
|
|
5787
|
+
reactIs_production_min$5.Portal = d;
|
|
5788
|
+
reactIs_production_min$5.Profiler = g;
|
|
5789
|
+
reactIs_production_min$5.StrictMode = f;
|
|
5790
|
+
reactIs_production_min$5.Suspense = p;
|
|
5791
|
+
reactIs_production_min$5.isAsyncMode = function (a) {
|
|
5792
|
+
return A(a) || z(a) === l;
|
|
5793
|
+
};
|
|
5794
|
+
reactIs_production_min$5.isConcurrentMode = A;
|
|
5795
|
+
reactIs_production_min$5.isContextConsumer = function (a) {
|
|
5796
|
+
return z(a) === k;
|
|
5797
|
+
};
|
|
5798
|
+
reactIs_production_min$5.isContextProvider = function (a) {
|
|
5799
|
+
return z(a) === h;
|
|
5800
|
+
};
|
|
5801
|
+
reactIs_production_min$5.isElement = function (a) {
|
|
5802
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
5803
|
+
};
|
|
5804
|
+
reactIs_production_min$5.isForwardRef = function (a) {
|
|
5805
|
+
return z(a) === n;
|
|
5806
|
+
};
|
|
5807
|
+
reactIs_production_min$5.isFragment = function (a) {
|
|
5808
|
+
return z(a) === e;
|
|
5809
|
+
};
|
|
5810
|
+
reactIs_production_min$5.isLazy = function (a) {
|
|
5811
|
+
return z(a) === t;
|
|
5812
|
+
};
|
|
5813
|
+
reactIs_production_min$5.isMemo = function (a) {
|
|
5814
|
+
return z(a) === r;
|
|
5815
|
+
};
|
|
5816
|
+
reactIs_production_min$5.isPortal = function (a) {
|
|
5817
|
+
return z(a) === d;
|
|
5818
|
+
};
|
|
5819
|
+
reactIs_production_min$5.isProfiler = function (a) {
|
|
5820
|
+
return z(a) === g;
|
|
5821
|
+
};
|
|
5822
|
+
reactIs_production_min$5.isStrictMode = function (a) {
|
|
5823
|
+
return z(a) === f;
|
|
5824
|
+
};
|
|
5825
|
+
reactIs_production_min$5.isSuspense = function (a) {
|
|
5826
|
+
return z(a) === p;
|
|
5827
|
+
};
|
|
5828
|
+
reactIs_production_min$5.isValidElementType = function (a) {
|
|
5829
|
+
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);
|
|
5830
|
+
};
|
|
5831
|
+
reactIs_production_min$5.typeOf = z;
|
|
5832
|
+
return reactIs_production_min$5;
|
|
5833
|
+
}
|
|
5834
|
+
var reactIs_development$5 = {};
|
|
5835
|
+
|
|
5836
|
+
/** @license React v16.13.1
|
|
5837
|
+
* react-is.development.js
|
|
5838
|
+
*
|
|
5839
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5840
|
+
*
|
|
5841
|
+
* This source code is licensed under the MIT license found in the
|
|
5842
|
+
* LICENSE file in the root directory of this source tree.
|
|
5843
|
+
*/
|
|
5844
|
+
|
|
5845
|
+
var hasRequiredReactIs_development$5;
|
|
5846
|
+
function requireReactIs_development$5() {
|
|
5847
|
+
if (hasRequiredReactIs_development$5) return reactIs_development$5;
|
|
5848
|
+
hasRequiredReactIs_development$5 = 1;
|
|
5849
|
+
if (process.env.NODE_ENV !== "production") {
|
|
5850
|
+
(function () {
|
|
5851
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
5852
|
+
// nor polyfill, then a plain number is used for performance.
|
|
5853
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
5854
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
5855
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
5856
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
5857
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
5858
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
5859
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
5860
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
5861
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
5862
|
+
|
|
5863
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
5864
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
5865
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
5866
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
5867
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
5868
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
5869
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
5870
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
5871
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
5872
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
5873
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
5874
|
+
function isValidElementType(type) {
|
|
5875
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
5876
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
5877
|
+
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);
|
|
5878
|
+
}
|
|
5879
|
+
function typeOf(object) {
|
|
5880
|
+
if (typeof object === 'object' && object !== null) {
|
|
5881
|
+
var $$typeof = object.$$typeof;
|
|
5882
|
+
switch ($$typeof) {
|
|
5883
|
+
case REACT_ELEMENT_TYPE:
|
|
5884
|
+
var type = object.type;
|
|
5885
|
+
switch (type) {
|
|
5886
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
5887
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
5888
|
+
case REACT_FRAGMENT_TYPE:
|
|
5889
|
+
case REACT_PROFILER_TYPE:
|
|
5890
|
+
case REACT_STRICT_MODE_TYPE:
|
|
5891
|
+
case REACT_SUSPENSE_TYPE:
|
|
5892
|
+
return type;
|
|
5893
|
+
default:
|
|
5894
|
+
var $$typeofType = type && type.$$typeof;
|
|
5895
|
+
switch ($$typeofType) {
|
|
5896
|
+
case REACT_CONTEXT_TYPE:
|
|
5897
|
+
case REACT_FORWARD_REF_TYPE:
|
|
5898
|
+
case REACT_LAZY_TYPE:
|
|
5899
|
+
case REACT_MEMO_TYPE:
|
|
5900
|
+
case REACT_PROVIDER_TYPE:
|
|
5901
|
+
return $$typeofType;
|
|
5902
|
+
default:
|
|
5903
|
+
return $$typeof;
|
|
5904
|
+
}
|
|
5905
|
+
}
|
|
5906
|
+
case REACT_PORTAL_TYPE:
|
|
5907
|
+
return $$typeof;
|
|
5908
|
+
}
|
|
5909
|
+
}
|
|
5910
|
+
return undefined;
|
|
5911
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
5912
|
+
|
|
5913
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
5914
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
5915
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
5916
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
5917
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
5918
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
5919
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
5920
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
5921
|
+
var Memo = REACT_MEMO_TYPE;
|
|
5922
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
5923
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
5924
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
5925
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
5926
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
5927
|
+
|
|
5928
|
+
function isAsyncMode(object) {
|
|
5929
|
+
{
|
|
5930
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
5931
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
5932
|
+
|
|
5933
|
+
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.');
|
|
5934
|
+
}
|
|
5935
|
+
}
|
|
5936
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
5937
|
+
}
|
|
5938
|
+
function isConcurrentMode(object) {
|
|
5939
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
5940
|
+
}
|
|
5941
|
+
function isContextConsumer(object) {
|
|
5942
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
5943
|
+
}
|
|
5944
|
+
function isContextProvider(object) {
|
|
5945
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
5946
|
+
}
|
|
5947
|
+
function isElement(object) {
|
|
5948
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
5949
|
+
}
|
|
5950
|
+
function isForwardRef(object) {
|
|
5951
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
5952
|
+
}
|
|
5953
|
+
function isFragment(object) {
|
|
5954
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
5955
|
+
}
|
|
5956
|
+
function isLazy(object) {
|
|
5957
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
5958
|
+
}
|
|
5959
|
+
function isMemo(object) {
|
|
5960
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
5961
|
+
}
|
|
5962
|
+
function isPortal(object) {
|
|
5963
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
5964
|
+
}
|
|
5965
|
+
function isProfiler(object) {
|
|
5966
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
5967
|
+
}
|
|
5968
|
+
function isStrictMode(object) {
|
|
5969
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
5970
|
+
}
|
|
5971
|
+
function isSuspense(object) {
|
|
5972
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
5973
|
+
}
|
|
5974
|
+
reactIs_development$5.AsyncMode = AsyncMode;
|
|
5975
|
+
reactIs_development$5.ConcurrentMode = ConcurrentMode;
|
|
5976
|
+
reactIs_development$5.ContextConsumer = ContextConsumer;
|
|
5977
|
+
reactIs_development$5.ContextProvider = ContextProvider;
|
|
5978
|
+
reactIs_development$5.Element = Element;
|
|
5979
|
+
reactIs_development$5.ForwardRef = ForwardRef;
|
|
5980
|
+
reactIs_development$5.Fragment = Fragment;
|
|
5981
|
+
reactIs_development$5.Lazy = Lazy;
|
|
5982
|
+
reactIs_development$5.Memo = Memo;
|
|
5983
|
+
reactIs_development$5.Portal = Portal;
|
|
5984
|
+
reactIs_development$5.Profiler = Profiler;
|
|
5985
|
+
reactIs_development$5.StrictMode = StrictMode;
|
|
5986
|
+
reactIs_development$5.Suspense = Suspense;
|
|
5987
|
+
reactIs_development$5.isAsyncMode = isAsyncMode;
|
|
5988
|
+
reactIs_development$5.isConcurrentMode = isConcurrentMode;
|
|
5989
|
+
reactIs_development$5.isContextConsumer = isContextConsumer;
|
|
5990
|
+
reactIs_development$5.isContextProvider = isContextProvider;
|
|
5991
|
+
reactIs_development$5.isElement = isElement;
|
|
5992
|
+
reactIs_development$5.isForwardRef = isForwardRef;
|
|
5993
|
+
reactIs_development$5.isFragment = isFragment;
|
|
5994
|
+
reactIs_development$5.isLazy = isLazy;
|
|
5995
|
+
reactIs_development$5.isMemo = isMemo;
|
|
5996
|
+
reactIs_development$5.isPortal = isPortal;
|
|
5997
|
+
reactIs_development$5.isProfiler = isProfiler;
|
|
5998
|
+
reactIs_development$5.isStrictMode = isStrictMode;
|
|
5999
|
+
reactIs_development$5.isSuspense = isSuspense;
|
|
6000
|
+
reactIs_development$5.isValidElementType = isValidElementType;
|
|
6001
|
+
reactIs_development$5.typeOf = typeOf;
|
|
6002
|
+
})();
|
|
6003
|
+
}
|
|
6004
|
+
return reactIs_development$5;
|
|
6005
|
+
}
|
|
6006
|
+
var hasRequiredReactIs$5;
|
|
6007
|
+
function requireReactIs$5() {
|
|
6008
|
+
if (hasRequiredReactIs$5) return reactIs$5.exports;
|
|
6009
|
+
hasRequiredReactIs$5 = 1;
|
|
6010
|
+
if (process.env.NODE_ENV === 'production') {
|
|
6011
|
+
reactIs$5.exports = requireReactIs_production_min$5();
|
|
6012
|
+
} else {
|
|
6013
|
+
reactIs$5.exports = requireReactIs_development$5();
|
|
6014
|
+
}
|
|
6015
|
+
return reactIs$5.exports;
|
|
6016
|
+
}
|
|
6017
|
+
|
|
6018
|
+
/*
|
|
6019
|
+
object-assign
|
|
6020
|
+
(c) Sindre Sorhus
|
|
6021
|
+
@license MIT
|
|
6022
|
+
*/
|
|
6023
|
+
|
|
6024
|
+
var objectAssign$5;
|
|
6025
|
+
var hasRequiredObjectAssign$5;
|
|
6026
|
+
function requireObjectAssign$5() {
|
|
6027
|
+
if (hasRequiredObjectAssign$5) return objectAssign$5;
|
|
6028
|
+
hasRequiredObjectAssign$5 = 1;
|
|
6029
|
+
/* eslint-disable no-unused-vars */
|
|
6030
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
6031
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
6032
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
6033
|
+
function toObject(val) {
|
|
6034
|
+
if (val === null || val === undefined) {
|
|
6035
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
6036
|
+
}
|
|
6037
|
+
return Object(val);
|
|
6038
|
+
}
|
|
6039
|
+
function shouldUseNative() {
|
|
6040
|
+
try {
|
|
6041
|
+
if (!Object.assign) {
|
|
6042
|
+
return false;
|
|
6043
|
+
}
|
|
6044
|
+
|
|
6045
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
6046
|
+
|
|
6047
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
6048
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
6049
|
+
test1[5] = 'de';
|
|
6050
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
6051
|
+
return false;
|
|
6052
|
+
}
|
|
6053
|
+
|
|
6054
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
6055
|
+
var test2 = {};
|
|
6056
|
+
for (var i = 0; i < 10; i++) {
|
|
6057
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
6058
|
+
}
|
|
6059
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
6060
|
+
return test2[n];
|
|
6061
|
+
});
|
|
6062
|
+
if (order2.join('') !== '0123456789') {
|
|
6063
|
+
return false;
|
|
6064
|
+
}
|
|
6065
|
+
|
|
6066
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
6067
|
+
var test3 = {};
|
|
6068
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
6069
|
+
test3[letter] = letter;
|
|
6070
|
+
});
|
|
6071
|
+
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
|
|
6072
|
+
return false;
|
|
6073
|
+
}
|
|
6074
|
+
return true;
|
|
6075
|
+
} catch (err) {
|
|
6076
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
6077
|
+
return false;
|
|
6078
|
+
}
|
|
6079
|
+
}
|
|
6080
|
+
objectAssign$5 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
6081
|
+
var from;
|
|
6082
|
+
var to = toObject(target);
|
|
6083
|
+
var symbols;
|
|
6084
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
6085
|
+
from = Object(arguments[s]);
|
|
6086
|
+
for (var key in from) {
|
|
6087
|
+
if (hasOwnProperty.call(from, key)) {
|
|
6088
|
+
to[key] = from[key];
|
|
6089
|
+
}
|
|
6090
|
+
}
|
|
6091
|
+
if (getOwnPropertySymbols) {
|
|
6092
|
+
symbols = getOwnPropertySymbols(from);
|
|
6093
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
6094
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
6095
|
+
to[symbols[i]] = from[symbols[i]];
|
|
6096
|
+
}
|
|
6097
|
+
}
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
6100
|
+
return to;
|
|
6101
|
+
};
|
|
6102
|
+
return objectAssign$5;
|
|
6103
|
+
}
|
|
6104
|
+
|
|
6105
|
+
/**
|
|
6106
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
6107
|
+
*
|
|
6108
|
+
* This source code is licensed under the MIT license found in the
|
|
6109
|
+
* LICENSE file in the root directory of this source tree.
|
|
6110
|
+
*/
|
|
6111
|
+
|
|
6112
|
+
var ReactPropTypesSecret_1$5;
|
|
6113
|
+
var hasRequiredReactPropTypesSecret$5;
|
|
6114
|
+
function requireReactPropTypesSecret$5() {
|
|
6115
|
+
if (hasRequiredReactPropTypesSecret$5) return ReactPropTypesSecret_1$5;
|
|
6116
|
+
hasRequiredReactPropTypesSecret$5 = 1;
|
|
6117
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
6118
|
+
ReactPropTypesSecret_1$5 = ReactPropTypesSecret;
|
|
6119
|
+
return ReactPropTypesSecret_1$5;
|
|
6120
|
+
}
|
|
6121
|
+
var has$5;
|
|
6122
|
+
var hasRequiredHas$5;
|
|
6123
|
+
function requireHas$5() {
|
|
6124
|
+
if (hasRequiredHas$5) return has$5;
|
|
6125
|
+
hasRequiredHas$5 = 1;
|
|
6126
|
+
has$5 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
6127
|
+
return has$5;
|
|
6128
|
+
}
|
|
6129
|
+
|
|
6130
|
+
/**
|
|
6131
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
6132
|
+
*
|
|
6133
|
+
* This source code is licensed under the MIT license found in the
|
|
6134
|
+
* LICENSE file in the root directory of this source tree.
|
|
6135
|
+
*/
|
|
6136
|
+
|
|
6137
|
+
var checkPropTypes_1$5;
|
|
6138
|
+
var hasRequiredCheckPropTypes$5;
|
|
6139
|
+
function requireCheckPropTypes$5() {
|
|
6140
|
+
if (hasRequiredCheckPropTypes$5) return checkPropTypes_1$5;
|
|
6141
|
+
hasRequiredCheckPropTypes$5 = 1;
|
|
6142
|
+
var printWarning = function () {};
|
|
6143
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6144
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$5();
|
|
6145
|
+
var loggedTypeFailures = {};
|
|
6146
|
+
var has = /*@__PURE__*/requireHas$5();
|
|
6147
|
+
printWarning = function (text) {
|
|
6148
|
+
var message = 'Warning: ' + text;
|
|
6149
|
+
if (typeof console !== 'undefined') {
|
|
6150
|
+
console.error(message);
|
|
6151
|
+
}
|
|
6152
|
+
try {
|
|
6153
|
+
// --- Welcome to debugging React ---
|
|
6154
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
6155
|
+
// to find the callsite that caused this warning to fire.
|
|
6156
|
+
throw new Error(message);
|
|
6157
|
+
} catch (x) {/**/}
|
|
6158
|
+
};
|
|
6159
|
+
}
|
|
6160
|
+
|
|
6161
|
+
/**
|
|
6162
|
+
* Assert that the values match with the type specs.
|
|
6163
|
+
* Error messages are memorized and will only be shown once.
|
|
6164
|
+
*
|
|
6165
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
6166
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
6167
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
6168
|
+
* @param {string} componentName Name of the component for error messages.
|
|
6169
|
+
* @param {?Function} getStack Returns the component stack.
|
|
6170
|
+
* @private
|
|
6171
|
+
*/
|
|
6172
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
6173
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6174
|
+
for (var typeSpecName in typeSpecs) {
|
|
6175
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
6176
|
+
var error;
|
|
6177
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
6178
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
6179
|
+
// After these have been cleaned up, we'll let them throw.
|
|
6180
|
+
try {
|
|
6181
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
6182
|
+
// behavior as without this statement except with a better message.
|
|
6183
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
6184
|
+
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`.');
|
|
6185
|
+
err.name = 'Invariant Violation';
|
|
6186
|
+
throw err;
|
|
6187
|
+
}
|
|
6188
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
6189
|
+
} catch (ex) {
|
|
6190
|
+
error = ex;
|
|
6191
|
+
}
|
|
6192
|
+
if (error && !(error instanceof Error)) {
|
|
6193
|
+
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).');
|
|
6194
|
+
}
|
|
6195
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
6196
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
6197
|
+
// same error.
|
|
6198
|
+
loggedTypeFailures[error.message] = true;
|
|
6199
|
+
var stack = getStack ? getStack() : '';
|
|
6200
|
+
printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
|
|
6201
|
+
}
|
|
6202
|
+
}
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
|
|
6207
|
+
/**
|
|
6208
|
+
* Resets warning cache when testing.
|
|
6209
|
+
*
|
|
6210
|
+
* @private
|
|
6211
|
+
*/
|
|
6212
|
+
checkPropTypes.resetWarningCache = function () {
|
|
6213
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6214
|
+
loggedTypeFailures = {};
|
|
6215
|
+
}
|
|
6216
|
+
};
|
|
6217
|
+
checkPropTypes_1$5 = checkPropTypes;
|
|
6218
|
+
return checkPropTypes_1$5;
|
|
6219
|
+
}
|
|
6220
|
+
|
|
6221
|
+
/**
|
|
6222
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
6223
|
+
*
|
|
6224
|
+
* This source code is licensed under the MIT license found in the
|
|
6225
|
+
* LICENSE file in the root directory of this source tree.
|
|
6226
|
+
*/
|
|
6227
|
+
|
|
6228
|
+
var factoryWithTypeCheckers$5;
|
|
6229
|
+
var hasRequiredFactoryWithTypeCheckers$5;
|
|
6230
|
+
function requireFactoryWithTypeCheckers$5() {
|
|
6231
|
+
if (hasRequiredFactoryWithTypeCheckers$5) return factoryWithTypeCheckers$5;
|
|
6232
|
+
hasRequiredFactoryWithTypeCheckers$5 = 1;
|
|
6233
|
+
var ReactIs = requireReactIs$5();
|
|
6234
|
+
var assign = requireObjectAssign$5();
|
|
6235
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$5();
|
|
6236
|
+
var has = /*@__PURE__*/requireHas$5();
|
|
6237
|
+
var checkPropTypes = /*@__PURE__*/requireCheckPropTypes$5();
|
|
6238
|
+
var printWarning = function () {};
|
|
6239
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6240
|
+
printWarning = function (text) {
|
|
6241
|
+
var message = 'Warning: ' + text;
|
|
6242
|
+
if (typeof console !== 'undefined') {
|
|
6243
|
+
console.error(message);
|
|
6244
|
+
}
|
|
6245
|
+
try {
|
|
6246
|
+
// --- Welcome to debugging React ---
|
|
6247
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
6248
|
+
// to find the callsite that caused this warning to fire.
|
|
6249
|
+
throw new Error(message);
|
|
6250
|
+
} catch (x) {}
|
|
6251
|
+
};
|
|
6252
|
+
}
|
|
6253
|
+
function emptyFunctionThatReturnsNull() {
|
|
6254
|
+
return null;
|
|
6255
|
+
}
|
|
6256
|
+
factoryWithTypeCheckers$5 = function (isValidElement, throwOnDirectAccess) {
|
|
6257
|
+
/* global Symbol */
|
|
6258
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
6259
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
6260
|
+
|
|
6261
|
+
/**
|
|
6262
|
+
* Returns the iterator method function contained on the iterable object.
|
|
6263
|
+
*
|
|
6264
|
+
* Be sure to invoke the function with the iterable as context:
|
|
6265
|
+
*
|
|
6266
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
6267
|
+
* if (iteratorFn) {
|
|
6268
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
6269
|
+
* ...
|
|
6270
|
+
* }
|
|
6271
|
+
*
|
|
6272
|
+
* @param {?object} maybeIterable
|
|
6273
|
+
* @return {?function}
|
|
6274
|
+
*/
|
|
6275
|
+
function getIteratorFn(maybeIterable) {
|
|
6276
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
6277
|
+
if (typeof iteratorFn === 'function') {
|
|
6278
|
+
return iteratorFn;
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6281
|
+
|
|
6282
|
+
/**
|
|
6283
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
6284
|
+
* supplied to React components. Example usage:
|
|
6285
|
+
*
|
|
6286
|
+
* var Props = require('ReactPropTypes');
|
|
6287
|
+
* var MyArticle = React.createClass({
|
|
6288
|
+
* propTypes: {
|
|
6289
|
+
* // An optional string prop named "description".
|
|
6290
|
+
* description: Props.string,
|
|
6291
|
+
*
|
|
6292
|
+
* // A required enum prop named "category".
|
|
6293
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
6294
|
+
*
|
|
6295
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
6296
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
6297
|
+
* },
|
|
6298
|
+
* render: function() { ... }
|
|
6299
|
+
* });
|
|
6300
|
+
*
|
|
6301
|
+
* A more formal specification of how these methods are used:
|
|
6302
|
+
*
|
|
6303
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
6304
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
6305
|
+
*
|
|
6306
|
+
* Each and every declaration produces a function with the same signature. This
|
|
6307
|
+
* allows the creation of custom validation functions. For example:
|
|
6308
|
+
*
|
|
6309
|
+
* var MyLink = React.createClass({
|
|
6310
|
+
* propTypes: {
|
|
6311
|
+
* // An optional string or URI prop named "href".
|
|
6312
|
+
* href: function(props, propName, componentName) {
|
|
6313
|
+
* var propValue = props[propName];
|
|
6314
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
6315
|
+
* !(propValue instanceof URI)) {
|
|
6316
|
+
* return new Error(
|
|
6317
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
6318
|
+
* componentName
|
|
6319
|
+
* );
|
|
6320
|
+
* }
|
|
6321
|
+
* }
|
|
6322
|
+
* },
|
|
6323
|
+
* render: function() {...}
|
|
6324
|
+
* });
|
|
6325
|
+
*
|
|
6326
|
+
* @internal
|
|
6327
|
+
*/
|
|
6328
|
+
|
|
6329
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
6330
|
+
|
|
6331
|
+
// Important!
|
|
6332
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
6333
|
+
var ReactPropTypes = {
|
|
6334
|
+
array: createPrimitiveTypeChecker('array'),
|
|
6335
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
6336
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
6337
|
+
func: createPrimitiveTypeChecker('function'),
|
|
6338
|
+
number: createPrimitiveTypeChecker('number'),
|
|
6339
|
+
object: createPrimitiveTypeChecker('object'),
|
|
6340
|
+
string: createPrimitiveTypeChecker('string'),
|
|
6341
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
6342
|
+
any: createAnyTypeChecker(),
|
|
6343
|
+
arrayOf: createArrayOfTypeChecker,
|
|
6344
|
+
element: createElementTypeChecker(),
|
|
6345
|
+
elementType: createElementTypeTypeChecker(),
|
|
6346
|
+
instanceOf: createInstanceTypeChecker,
|
|
6347
|
+
node: createNodeChecker(),
|
|
6348
|
+
objectOf: createObjectOfTypeChecker,
|
|
6349
|
+
oneOf: createEnumTypeChecker,
|
|
6350
|
+
oneOfType: createUnionTypeChecker,
|
|
6351
|
+
shape: createShapeTypeChecker,
|
|
6352
|
+
exact: createStrictShapeTypeChecker
|
|
6353
|
+
};
|
|
6354
|
+
|
|
6355
|
+
/**
|
|
6356
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
6357
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
6358
|
+
*/
|
|
6359
|
+
/*eslint-disable no-self-compare*/
|
|
6360
|
+
function is(x, y) {
|
|
6361
|
+
// SameValue algorithm
|
|
6362
|
+
if (x === y) {
|
|
6363
|
+
// Steps 1-5, 7-10
|
|
6364
|
+
// Steps 6.b-6.e: +0 != -0
|
|
6365
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
6366
|
+
} else {
|
|
6367
|
+
// Step 6.a: NaN == NaN
|
|
6368
|
+
return x !== x && y !== y;
|
|
6369
|
+
}
|
|
6370
|
+
}
|
|
6371
|
+
/*eslint-enable no-self-compare*/
|
|
6372
|
+
|
|
6373
|
+
/**
|
|
6374
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
6375
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
6376
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
6377
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
6378
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
6379
|
+
*/
|
|
6380
|
+
function PropTypeError(message, data) {
|
|
6381
|
+
this.message = message;
|
|
6382
|
+
this.data = data && typeof data === 'object' ? data : {};
|
|
6383
|
+
this.stack = '';
|
|
6384
|
+
}
|
|
6385
|
+
// Make `instanceof Error` still work for returned errors.
|
|
6386
|
+
PropTypeError.prototype = Error.prototype;
|
|
6387
|
+
function createChainableTypeChecker(validate) {
|
|
6388
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6389
|
+
var manualPropTypeCallCache = {};
|
|
6390
|
+
var manualPropTypeWarningCount = 0;
|
|
6391
|
+
}
|
|
6392
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
6393
|
+
componentName = componentName || ANONYMOUS;
|
|
6394
|
+
propFullName = propFullName || propName;
|
|
6395
|
+
if (secret !== ReactPropTypesSecret) {
|
|
6396
|
+
if (throwOnDirectAccess) {
|
|
6397
|
+
// New behavior only for users of `prop-types` package
|
|
6398
|
+
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');
|
|
6399
|
+
err.name = 'Invariant Violation';
|
|
6400
|
+
throw err;
|
|
6401
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
6402
|
+
// Old behavior for people using React.PropTypes
|
|
6403
|
+
var cacheKey = componentName + ':' + propName;
|
|
6404
|
+
if (!manualPropTypeCallCache[cacheKey] &&
|
|
6405
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
6406
|
+
manualPropTypeWarningCount < 3) {
|
|
6407
|
+
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.');
|
|
6408
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
6409
|
+
manualPropTypeWarningCount++;
|
|
6410
|
+
}
|
|
6411
|
+
}
|
|
6412
|
+
}
|
|
6413
|
+
if (props[propName] == null) {
|
|
6414
|
+
if (isRequired) {
|
|
6415
|
+
if (props[propName] === null) {
|
|
6416
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
6417
|
+
}
|
|
6418
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
6419
|
+
}
|
|
6420
|
+
return null;
|
|
6421
|
+
} else {
|
|
6422
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
6423
|
+
}
|
|
6424
|
+
}
|
|
6425
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
6426
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
6427
|
+
return chainedCheckType;
|
|
6428
|
+
}
|
|
6429
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
6430
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
6431
|
+
var propValue = props[propName];
|
|
6432
|
+
var propType = getPropType(propValue);
|
|
6433
|
+
if (propType !== expectedType) {
|
|
6434
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
6435
|
+
// check, but we can offer a more precise error message here rather than
|
|
6436
|
+
// 'of type `object`'.
|
|
6437
|
+
var preciseType = getPreciseType(propValue);
|
|
6438
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
|
|
6439
|
+
expectedType: expectedType
|
|
6440
|
+
});
|
|
6441
|
+
}
|
|
6442
|
+
return null;
|
|
6443
|
+
}
|
|
6444
|
+
return createChainableTypeChecker(validate);
|
|
6445
|
+
}
|
|
6446
|
+
function createAnyTypeChecker() {
|
|
6447
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
6448
|
+
}
|
|
6449
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
6450
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6451
|
+
if (typeof typeChecker !== 'function') {
|
|
6452
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
6453
|
+
}
|
|
6454
|
+
var propValue = props[propName];
|
|
6455
|
+
if (!Array.isArray(propValue)) {
|
|
6456
|
+
var propType = getPropType(propValue);
|
|
6457
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
6458
|
+
}
|
|
6459
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
6460
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
6461
|
+
if (error instanceof Error) {
|
|
6462
|
+
return error;
|
|
6463
|
+
}
|
|
6464
|
+
}
|
|
6465
|
+
return null;
|
|
6466
|
+
}
|
|
6467
|
+
return createChainableTypeChecker(validate);
|
|
6468
|
+
}
|
|
6469
|
+
function createElementTypeChecker() {
|
|
6470
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6471
|
+
var propValue = props[propName];
|
|
6472
|
+
if (!isValidElement(propValue)) {
|
|
6473
|
+
var propType = getPropType(propValue);
|
|
6474
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
6475
|
+
}
|
|
6476
|
+
return null;
|
|
6477
|
+
}
|
|
6478
|
+
return createChainableTypeChecker(validate);
|
|
6479
|
+
}
|
|
6480
|
+
function createElementTypeTypeChecker() {
|
|
6481
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6482
|
+
var propValue = props[propName];
|
|
6483
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
6484
|
+
var propType = getPropType(propValue);
|
|
6485
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
6486
|
+
}
|
|
6487
|
+
return null;
|
|
6488
|
+
}
|
|
6489
|
+
return createChainableTypeChecker(validate);
|
|
6490
|
+
}
|
|
6491
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
6492
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6493
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
6494
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
6495
|
+
var actualClassName = getClassName(props[propName]);
|
|
6496
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
6497
|
+
}
|
|
6498
|
+
return null;
|
|
6499
|
+
}
|
|
6500
|
+
return createChainableTypeChecker(validate);
|
|
6501
|
+
}
|
|
6502
|
+
function createEnumTypeChecker(expectedValues) {
|
|
6503
|
+
if (!Array.isArray(expectedValues)) {
|
|
6504
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6505
|
+
if (arguments.length > 1) {
|
|
6506
|
+
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]).');
|
|
6507
|
+
} else {
|
|
6508
|
+
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
6509
|
+
}
|
|
6510
|
+
}
|
|
6511
|
+
return emptyFunctionThatReturnsNull;
|
|
6512
|
+
}
|
|
6513
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6514
|
+
var propValue = props[propName];
|
|
6515
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
6516
|
+
if (is(propValue, expectedValues[i])) {
|
|
6517
|
+
return null;
|
|
6518
|
+
}
|
|
6519
|
+
}
|
|
6520
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
6521
|
+
var type = getPreciseType(value);
|
|
6522
|
+
if (type === 'symbol') {
|
|
6523
|
+
return String(value);
|
|
6524
|
+
}
|
|
6525
|
+
return value;
|
|
6526
|
+
});
|
|
6527
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
6528
|
+
}
|
|
6529
|
+
return createChainableTypeChecker(validate);
|
|
6530
|
+
}
|
|
6531
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
6532
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6533
|
+
if (typeof typeChecker !== 'function') {
|
|
6534
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
6535
|
+
}
|
|
6536
|
+
var propValue = props[propName];
|
|
6537
|
+
var propType = getPropType(propValue);
|
|
6538
|
+
if (propType !== 'object') {
|
|
6539
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
6540
|
+
}
|
|
6541
|
+
for (var key in propValue) {
|
|
6542
|
+
if (has(propValue, key)) {
|
|
6543
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
6544
|
+
if (error instanceof Error) {
|
|
6545
|
+
return error;
|
|
6546
|
+
}
|
|
6547
|
+
}
|
|
6548
|
+
}
|
|
6549
|
+
return null;
|
|
6550
|
+
}
|
|
6551
|
+
return createChainableTypeChecker(validate);
|
|
6552
|
+
}
|
|
6553
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
6554
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
6555
|
+
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
6556
|
+
return emptyFunctionThatReturnsNull;
|
|
6557
|
+
}
|
|
6558
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
6559
|
+
var checker = arrayOfTypeCheckers[i];
|
|
6560
|
+
if (typeof checker !== 'function') {
|
|
6561
|
+
printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
|
|
6562
|
+
return emptyFunctionThatReturnsNull;
|
|
6563
|
+
}
|
|
6564
|
+
}
|
|
6565
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6566
|
+
var expectedTypes = [];
|
|
6567
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
6568
|
+
var checker = arrayOfTypeCheckers[i];
|
|
6569
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
6570
|
+
if (checkerResult == null) {
|
|
6571
|
+
return null;
|
|
6572
|
+
}
|
|
6573
|
+
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
6574
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
6575
|
+
}
|
|
6576
|
+
}
|
|
6577
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
|
|
6578
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
6579
|
+
}
|
|
6580
|
+
return createChainableTypeChecker(validate);
|
|
6581
|
+
}
|
|
6582
|
+
function createNodeChecker() {
|
|
6583
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6584
|
+
if (!isNode(props[propName])) {
|
|
6585
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
6586
|
+
}
|
|
6587
|
+
return null;
|
|
6588
|
+
}
|
|
6589
|
+
return createChainableTypeChecker(validate);
|
|
6590
|
+
}
|
|
6591
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
6592
|
+
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 + '`.');
|
|
6593
|
+
}
|
|
6594
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
6595
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6596
|
+
var propValue = props[propName];
|
|
6597
|
+
var propType = getPropType(propValue);
|
|
6598
|
+
if (propType !== 'object') {
|
|
6599
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
6600
|
+
}
|
|
6601
|
+
for (var key in shapeTypes) {
|
|
6602
|
+
var checker = shapeTypes[key];
|
|
6603
|
+
if (typeof checker !== 'function') {
|
|
6604
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
6605
|
+
}
|
|
6606
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
6607
|
+
if (error) {
|
|
6608
|
+
return error;
|
|
6609
|
+
}
|
|
6610
|
+
}
|
|
6611
|
+
return null;
|
|
6612
|
+
}
|
|
6613
|
+
return createChainableTypeChecker(validate);
|
|
6614
|
+
}
|
|
6615
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
6616
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
6617
|
+
var propValue = props[propName];
|
|
6618
|
+
var propType = getPropType(propValue);
|
|
6619
|
+
if (propType !== 'object') {
|
|
6620
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
6621
|
+
}
|
|
6622
|
+
// We need to check all keys in case some are required but missing from props.
|
|
6623
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
6624
|
+
for (var key in allKeys) {
|
|
6625
|
+
var checker = shapeTypes[key];
|
|
6626
|
+
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
6627
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
6628
|
+
}
|
|
6629
|
+
if (!checker) {
|
|
6630
|
+
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, ' '));
|
|
6631
|
+
}
|
|
6632
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
6633
|
+
if (error) {
|
|
6634
|
+
return error;
|
|
6635
|
+
}
|
|
6636
|
+
}
|
|
6637
|
+
return null;
|
|
6638
|
+
}
|
|
6639
|
+
return createChainableTypeChecker(validate);
|
|
6640
|
+
}
|
|
6641
|
+
function isNode(propValue) {
|
|
6642
|
+
switch (typeof propValue) {
|
|
6643
|
+
case 'number':
|
|
6644
|
+
case 'string':
|
|
6645
|
+
case 'undefined':
|
|
6646
|
+
return true;
|
|
6647
|
+
case 'boolean':
|
|
6648
|
+
return !propValue;
|
|
6649
|
+
case 'object':
|
|
6650
|
+
if (Array.isArray(propValue)) {
|
|
6651
|
+
return propValue.every(isNode);
|
|
6652
|
+
}
|
|
6653
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
6654
|
+
return true;
|
|
6655
|
+
}
|
|
6656
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
6657
|
+
if (iteratorFn) {
|
|
6658
|
+
var iterator = iteratorFn.call(propValue);
|
|
6659
|
+
var step;
|
|
6660
|
+
if (iteratorFn !== propValue.entries) {
|
|
6661
|
+
while (!(step = iterator.next()).done) {
|
|
6662
|
+
if (!isNode(step.value)) {
|
|
6663
|
+
return false;
|
|
6664
|
+
}
|
|
6665
|
+
}
|
|
6666
|
+
} else {
|
|
6667
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
6668
|
+
while (!(step = iterator.next()).done) {
|
|
6669
|
+
var entry = step.value;
|
|
6670
|
+
if (entry) {
|
|
6671
|
+
if (!isNode(entry[1])) {
|
|
6672
|
+
return false;
|
|
6673
|
+
}
|
|
6674
|
+
}
|
|
6675
|
+
}
|
|
6676
|
+
}
|
|
6677
|
+
} else {
|
|
6678
|
+
return false;
|
|
6679
|
+
}
|
|
6680
|
+
return true;
|
|
6681
|
+
default:
|
|
6682
|
+
return false;
|
|
6683
|
+
}
|
|
6684
|
+
}
|
|
6685
|
+
function isSymbol(propType, propValue) {
|
|
6686
|
+
// Native Symbol.
|
|
6687
|
+
if (propType === 'symbol') {
|
|
6688
|
+
return true;
|
|
6689
|
+
}
|
|
6690
|
+
|
|
6691
|
+
// falsy value can't be a Symbol
|
|
6692
|
+
if (!propValue) {
|
|
6693
|
+
return false;
|
|
6694
|
+
}
|
|
6695
|
+
|
|
6696
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
6697
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
6698
|
+
return true;
|
|
6699
|
+
}
|
|
6700
|
+
|
|
6701
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
6702
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
6703
|
+
return true;
|
|
6704
|
+
}
|
|
6705
|
+
return false;
|
|
6706
|
+
}
|
|
6707
|
+
|
|
6708
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
6709
|
+
function getPropType(propValue) {
|
|
6710
|
+
var propType = typeof propValue;
|
|
6711
|
+
if (Array.isArray(propValue)) {
|
|
6712
|
+
return 'array';
|
|
6713
|
+
}
|
|
6714
|
+
if (propValue instanceof RegExp) {
|
|
6715
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
6716
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
6717
|
+
// passes PropTypes.object.
|
|
6718
|
+
return 'object';
|
|
6719
|
+
}
|
|
6720
|
+
if (isSymbol(propType, propValue)) {
|
|
6721
|
+
return 'symbol';
|
|
6722
|
+
}
|
|
6723
|
+
return propType;
|
|
6724
|
+
}
|
|
6725
|
+
|
|
6726
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
6727
|
+
// See `createPrimitiveTypeChecker`.
|
|
6728
|
+
function getPreciseType(propValue) {
|
|
6729
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
6730
|
+
return '' + propValue;
|
|
6731
|
+
}
|
|
6732
|
+
var propType = getPropType(propValue);
|
|
6733
|
+
if (propType === 'object') {
|
|
6734
|
+
if (propValue instanceof Date) {
|
|
6735
|
+
return 'date';
|
|
6736
|
+
} else if (propValue instanceof RegExp) {
|
|
6737
|
+
return 'regexp';
|
|
6738
|
+
}
|
|
6739
|
+
}
|
|
6740
|
+
return propType;
|
|
6741
|
+
}
|
|
6742
|
+
|
|
6743
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
6744
|
+
// For example, "undefined" or "of type array"
|
|
6745
|
+
function getPostfixForTypeWarning(value) {
|
|
6746
|
+
var type = getPreciseType(value);
|
|
6747
|
+
switch (type) {
|
|
6748
|
+
case 'array':
|
|
6749
|
+
case 'object':
|
|
6750
|
+
return 'an ' + type;
|
|
6751
|
+
case 'boolean':
|
|
6752
|
+
case 'date':
|
|
6753
|
+
case 'regexp':
|
|
6754
|
+
return 'a ' + type;
|
|
6755
|
+
default:
|
|
6756
|
+
return type;
|
|
6757
|
+
}
|
|
6758
|
+
}
|
|
6759
|
+
|
|
6760
|
+
// Returns class name of the object, if any.
|
|
6761
|
+
function getClassName(propValue) {
|
|
6762
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
6763
|
+
return ANONYMOUS;
|
|
6764
|
+
}
|
|
6765
|
+
return propValue.constructor.name;
|
|
6766
|
+
}
|
|
6767
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
6768
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
6769
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
6770
|
+
return ReactPropTypes;
|
|
6771
|
+
};
|
|
6772
|
+
return factoryWithTypeCheckers$5;
|
|
6773
|
+
}
|
|
6774
|
+
|
|
6775
|
+
/**
|
|
6776
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
6777
|
+
*
|
|
6778
|
+
* This source code is licensed under the MIT license found in the
|
|
6779
|
+
* LICENSE file in the root directory of this source tree.
|
|
6780
|
+
*/
|
|
6781
|
+
|
|
6782
|
+
var factoryWithThrowingShims$5;
|
|
6783
|
+
var hasRequiredFactoryWithThrowingShims$5;
|
|
6784
|
+
function requireFactoryWithThrowingShims$5() {
|
|
6785
|
+
if (hasRequiredFactoryWithThrowingShims$5) return factoryWithThrowingShims$5;
|
|
6786
|
+
hasRequiredFactoryWithThrowingShims$5 = 1;
|
|
6787
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$5();
|
|
6788
|
+
function emptyFunction() {}
|
|
6789
|
+
function emptyFunctionWithReset() {}
|
|
6790
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
6791
|
+
factoryWithThrowingShims$5 = function () {
|
|
6792
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
6793
|
+
if (secret === ReactPropTypesSecret) {
|
|
6794
|
+
// It is still safe when called from React.
|
|
6795
|
+
return;
|
|
6796
|
+
}
|
|
6797
|
+
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');
|
|
6798
|
+
err.name = 'Invariant Violation';
|
|
6799
|
+
throw err;
|
|
6800
|
+
}
|
|
6801
|
+
shim.isRequired = shim;
|
|
6802
|
+
function getShim() {
|
|
6803
|
+
return shim;
|
|
6804
|
+
} // Important!
|
|
6805
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
6806
|
+
var ReactPropTypes = {
|
|
6807
|
+
array: shim,
|
|
6808
|
+
bigint: shim,
|
|
6809
|
+
bool: shim,
|
|
6810
|
+
func: shim,
|
|
6811
|
+
number: shim,
|
|
6812
|
+
object: shim,
|
|
6813
|
+
string: shim,
|
|
6814
|
+
symbol: shim,
|
|
6815
|
+
any: shim,
|
|
6816
|
+
arrayOf: getShim,
|
|
6817
|
+
element: shim,
|
|
6818
|
+
elementType: shim,
|
|
6819
|
+
instanceOf: getShim,
|
|
6820
|
+
node: shim,
|
|
6821
|
+
objectOf: getShim,
|
|
6822
|
+
oneOf: getShim,
|
|
6823
|
+
oneOfType: getShim,
|
|
6824
|
+
shape: getShim,
|
|
6825
|
+
exact: getShim,
|
|
6826
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
6827
|
+
resetWarningCache: emptyFunction
|
|
6828
|
+
};
|
|
6829
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
6830
|
+
return ReactPropTypes;
|
|
6831
|
+
};
|
|
6832
|
+
return factoryWithThrowingShims$5;
|
|
6833
|
+
}
|
|
6834
|
+
|
|
6835
|
+
/**
|
|
6836
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
6837
|
+
*
|
|
6838
|
+
* This source code is licensed under the MIT license found in the
|
|
6839
|
+
* LICENSE file in the root directory of this source tree.
|
|
6840
|
+
*/
|
|
6841
|
+
|
|
6842
|
+
var hasRequiredPropTypes$5;
|
|
6843
|
+
function requirePropTypes$5() {
|
|
6844
|
+
if (hasRequiredPropTypes$5) return propTypes$5.exports;
|
|
6845
|
+
hasRequiredPropTypes$5 = 1;
|
|
6846
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6847
|
+
var ReactIs = requireReactIs$5();
|
|
6848
|
+
|
|
6849
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
6850
|
+
// http://fb.me/prop-types-in-prod
|
|
6851
|
+
var throwOnDirectAccess = true;
|
|
6852
|
+
propTypes$5.exports = /*@__PURE__*/requireFactoryWithTypeCheckers$5()(ReactIs.isElement, throwOnDirectAccess);
|
|
6853
|
+
} else {
|
|
6854
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
6855
|
+
// http://fb.me/prop-types-in-prod
|
|
6856
|
+
propTypes$5.exports = /*@__PURE__*/requireFactoryWithThrowingShims$5()();
|
|
6857
|
+
}
|
|
6858
|
+
return propTypes$5.exports;
|
|
6859
|
+
}
|
|
6860
|
+
var propTypesExports$5 = /*@__PURE__*/requirePropTypes$5();
|
|
6861
|
+
var PropTypes$5 = /*@__PURE__*/getDefaultExportFromCjs$5(propTypesExports$5);
|
|
6862
|
+
({
|
|
6863
|
+
onPowerOff: PropTypes$5.func,
|
|
6864
|
+
onRestart: PropTypes$5.func,
|
|
6865
|
+
powerOffLabel: PropTypes$5.string,
|
|
6866
|
+
restartLabel: PropTypes$5.string,
|
|
6867
|
+
iconClassName: PropTypes$5.string,
|
|
6868
|
+
confirmTitle: PropTypes$5.string,
|
|
6869
|
+
cancelText: PropTypes$5.string,
|
|
6870
|
+
okText: PropTypes$5.string,
|
|
6871
|
+
run: PropTypes$5.func
|
|
6872
|
+
});
|
|
6873
|
+
({
|
|
6874
|
+
logoUrl: PropTypes$5.string,
|
|
6875
|
+
logoWidth: PropTypes$5.number,
|
|
6876
|
+
logoAlt: PropTypes$5.string,
|
|
6877
|
+
onClick: PropTypes$5.func
|
|
6878
|
+
});
|
|
3946
6879
|
function getDefaultExportFromCjs$4(x) {
|
|
3947
6880
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3948
6881
|
}
|
|
@@ -10008,7 +12941,7 @@ const NmosModal = _ref => {
|
|
|
10008
12941
|
onOk: handleSubmit,
|
|
10009
12942
|
onCancel: onClose,
|
|
10010
12943
|
confirmLoading: loading,
|
|
10011
|
-
|
|
12944
|
+
destroyOnHidden: true // 关闭时销毁组件,确保下次打开重新初始化
|
|
10012
12945
|
}, modalProps), {}, {
|
|
10013
12946
|
children: /*#__PURE__*/jsxs(Form, _objectSpread2$1(_objectSpread2$1({
|
|
10014
12947
|
form: form,
|
|
@@ -10695,5 +13628,5 @@ const PayloadInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2$1({
|
|
|
10695
13628
|
placeholder: "Enter payload (96-127)"
|
|
10696
13629
|
}, props));
|
|
10697
13630
|
|
|
10698
|
-
export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, MaintenancePage, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PayloadInput, PortInput, PresetModal, PtpModal$1 as PtpModal, StyledModal$3 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, useAuth, useHardwareUsage$1 as useHardwareUsage, usePageReload$1 as usePageReload, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade };
|
|
13631
|
+
export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, MaintenancePage, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PayloadInput, PortInput, PresetModal, PtpModal$1 as PtpModal, StyledModal$3 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, addMessages, initI18n, setLocale, useAuth, useHardwareUsage$1 as useHardwareUsage, useIntl, usePageReload$1 as usePageReload, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade, useWebSocketWithFeatures$1 as useWebSocketWithFeatures };
|
|
10699
13632
|
//# sourceMappingURL=index.esm.js.map
|