@nocobase/plugin-ai 2.1.0-alpha.14 → 2.1.0-alpha.16
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/ai/skills/business-analysis-report/SKILLS.md +97 -0
- package/dist/ai/tools/businessReportGenerator.d.ts +10 -0
- package/dist/ai/tools/businessReportGenerator.js +98 -0
- package/dist/ai/tools/subAgentWebSearch.d.ts +10 -0
- package/dist/ai/tools/subAgentWebSearch.js +103 -0
- package/dist/client/0e94d90f0134df30.js +10 -0
- package/dist/client/{4f9117811ffc7ab3.js → 1c3ef55a6d63c9a3.js} +1 -1
- package/dist/client/44a97eeb67ff35d9.js +10 -0
- package/dist/client/55d67b74f02b8d74.js +10 -0
- package/dist/client/{6dc8c9b641452067.js → 5d5c118d11e91913.js} +1 -1
- package/dist/client/6a8fa308c9f51507.js +10 -0
- package/dist/client/8c8f0213e3b46621.js +10 -0
- package/dist/client/8e82080c5e8ccfb7.js +10 -0
- package/dist/client/ai-employees/business-report/tools/index.d.ts +10 -0
- package/dist/client/ai-employees/business-report/ui/BusinessReportCard.d.ts +12 -0
- package/dist/client/ai-employees/business-report/ui/BusinessReportModal.d.ts +17 -0
- package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +38 -0
- package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +1 -2
- package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +1 -1
- package/dist/client/c065565ccbb41f99.js +10 -0
- package/dist/client/f87cff5213f94856.js +10 -0
- package/dist/client/f8a32cc1ac47cf6b.js +10 -0
- package/dist/client/f8c075896e8b9c0b.js +10 -0
- package/dist/client/index.js +4 -4
- package/dist/client/manager/ai-manager.d.ts +4 -23
- package/dist/externalVersion.js +15 -14
- package/dist/locale/en-US.json +20 -0
- package/dist/locale/zh-CN.json +20 -0
- package/dist/node_modules/fast-glob/package.json +1 -1
- package/dist/node_modules/flexsearch/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-employee.d.ts +4 -6
- package/dist/server/ai-employees/ai-employee.js +74 -54
- package/dist/server/ai-employees/prompts.d.ts +2 -0
- package/dist/server/ai-employees/prompts.js +5 -0
- package/dist/server/ai-employees/utils.js +1 -1
- package/dist/server/llm-providers/dashscope.js +1 -3
- package/dist/server/manager/ai-context-datasource-manager.js +30 -1
- package/dist/server/manager/ai-manager.d.ts +10 -0
- package/dist/server/manager/ai-manager.js +32 -0
- package/dist/server/utils.js +3 -0
- package/package.json +2 -2
- package/dist/client/39492c2121f4c722.js +0 -10
- package/dist/client/53190ab4290ef9d5.js +0 -10
- package/dist/client/7237366e104efa7a.js +0 -10
- package/dist/client/9c00efb8eb0b4d69.js +0 -10
- package/dist/client/d4e2ed9fa44a82b2.js +0 -10
|
@@ -97,7 +97,9 @@ class AIEmployee {
|
|
|
97
97
|
this.protocol = ChatStreamProtocol.fromContext(ctx);
|
|
98
98
|
}
|
|
99
99
|
async getFormatMessages(userMessages) {
|
|
100
|
-
const { provider } = await this.getLLMService(
|
|
100
|
+
const { provider } = await this.plugin.aiManager.getLLMService({
|
|
101
|
+
...this.model
|
|
102
|
+
});
|
|
101
103
|
const { messages } = await this.aiChatConversation.getChatContext({
|
|
102
104
|
userMessages,
|
|
103
105
|
formatMessages: (messages2) => this.formatMessages({ messages: messages2, provider })
|
|
@@ -154,7 +156,9 @@ class AIEmployee {
|
|
|
154
156
|
userMessages,
|
|
155
157
|
userDecisions
|
|
156
158
|
}) {
|
|
157
|
-
const { provider, model, service } = await this.getLLMService(
|
|
159
|
+
const { provider, model, service } = await this.plugin.aiManager.getLLMService({
|
|
160
|
+
...this.model
|
|
161
|
+
});
|
|
158
162
|
const { historyMessages, tools, middleware, config, state } = await this.initSession({
|
|
159
163
|
messageId,
|
|
160
164
|
provider,
|
|
@@ -236,41 +240,6 @@ class AIEmployee {
|
|
|
236
240
|
throw err;
|
|
237
241
|
}
|
|
238
242
|
}
|
|
239
|
-
// === LLM/provider setup ===
|
|
240
|
-
async getLLMService() {
|
|
241
|
-
var _a, _b;
|
|
242
|
-
if (!((_a = this.model) == null ? void 0 : _a.llmService) || !((_b = this.model) == null ? void 0 : _b.model)) {
|
|
243
|
-
throw new Error("LLM service not configured");
|
|
244
|
-
}
|
|
245
|
-
const llmServiceName = this.model.llmService;
|
|
246
|
-
const model = this.model.model;
|
|
247
|
-
const modelOptions = {
|
|
248
|
-
llmService: llmServiceName,
|
|
249
|
-
model
|
|
250
|
-
};
|
|
251
|
-
if (this.webSearch === true) {
|
|
252
|
-
modelOptions.builtIn = { webSearch: true };
|
|
253
|
-
}
|
|
254
|
-
const service = await this.db.getRepository("llmServices").findOne({
|
|
255
|
-
filter: {
|
|
256
|
-
name: llmServiceName
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
if (!service) {
|
|
260
|
-
throw new Error("LLM service not found");
|
|
261
|
-
}
|
|
262
|
-
const providerOptions = this.plugin.aiManager.llmProviders.get(service.provider);
|
|
263
|
-
if (!providerOptions) {
|
|
264
|
-
throw new Error("LLM service provider not found");
|
|
265
|
-
}
|
|
266
|
-
const Provider = providerOptions.provider;
|
|
267
|
-
const provider = new Provider({
|
|
268
|
-
app: this.ctx.app,
|
|
269
|
-
serviceOptions: service.options,
|
|
270
|
-
modelOptions
|
|
271
|
-
});
|
|
272
|
-
return { provider, model, service };
|
|
273
|
-
}
|
|
274
243
|
// === Agent wiring & execution ===
|
|
275
244
|
async createAgent({
|
|
276
245
|
provider,
|
|
@@ -350,25 +319,29 @@ class AIEmployee {
|
|
|
350
319
|
}
|
|
351
320
|
}
|
|
352
321
|
async processChatStream(stream, options) {
|
|
353
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
322
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
354
323
|
const aiMessageIdMap = /* @__PURE__ */ new Map();
|
|
355
324
|
const { signal, providerName, model, provider, responseMetadata, allowEmpty = false } = options;
|
|
356
325
|
let isReasoning = false;
|
|
357
326
|
let gathered;
|
|
358
327
|
signal.addEventListener("abort", async () => {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
values
|
|
328
|
+
try {
|
|
329
|
+
if ((gathered == null ? void 0 : gathered.type) === "ai") {
|
|
330
|
+
const values = (0, import_utils2.convertAIMessage)({
|
|
331
|
+
aiEmployee: this,
|
|
332
|
+
providerName,
|
|
333
|
+
model,
|
|
334
|
+
aiMessage: gathered
|
|
335
|
+
});
|
|
336
|
+
if (values) {
|
|
337
|
+
values.metadata.interrupted = true;
|
|
338
|
+
}
|
|
339
|
+
await this.aiChatConversation.withTransaction(async (conversation, transaction) => {
|
|
340
|
+
const result = await conversation.addMessages(values);
|
|
341
|
+
});
|
|
368
342
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
});
|
|
343
|
+
} catch (e) {
|
|
344
|
+
this.logger.error("Fail to save message after conversation abort", gathered);
|
|
372
345
|
}
|
|
373
346
|
});
|
|
374
347
|
try {
|
|
@@ -493,7 +466,10 @@ class AIEmployee {
|
|
|
493
466
|
willInterrupt
|
|
494
467
|
},
|
|
495
468
|
invokeStatus: "done",
|
|
496
|
-
status: (_s = (_r = chunks.body) == null ? void 0 : _r.toolCallResult) == null ? void 0 : _s.status
|
|
469
|
+
status: (_s = (_r = chunks.body) == null ? void 0 : _r.toolCallResult) == null ? void 0 : _s.status,
|
|
470
|
+
invokeStartTime: (_u = (_t = chunks.body) == null ? void 0 : _t.toolCallResult) == null ? void 0 : _u.invokeStartTime,
|
|
471
|
+
invokeEndTime: (_w = (_v = chunks.body) == null ? void 0 : _v.toolCallResult) == null ? void 0 : _w.invokeEndTime,
|
|
472
|
+
content: (_y = (_x = chunks.body) == null ? void 0 : _x.toolCallResult) == null ? void 0 : _y.content
|
|
497
473
|
});
|
|
498
474
|
} else if (chunks.action === "beforeSendToolMessage") {
|
|
499
475
|
const { messageId, messages } = chunks.body ?? {};
|
|
@@ -514,7 +490,10 @@ class AIEmployee {
|
|
|
514
490
|
willInterrupt: this.shouldInterruptToolCall(tools)
|
|
515
491
|
},
|
|
516
492
|
invokeStatus: "confirmed",
|
|
517
|
-
status: toolCallResult == null ? void 0 : toolCallResult.status
|
|
493
|
+
status: toolCallResult == null ? void 0 : toolCallResult.status,
|
|
494
|
+
invokeStartTime: toolCallResult == null ? void 0 : toolCallResult.invokeStartTime,
|
|
495
|
+
invokeEndTime: toolCallResult == null ? void 0 : toolCallResult.invokeEndTime,
|
|
496
|
+
content: toolCallResult == null ? void 0 : toolCallResult.content
|
|
518
497
|
});
|
|
519
498
|
}
|
|
520
499
|
}
|
|
@@ -634,7 +613,9 @@ ${workContextBackground.join("\n")}`;
|
|
|
634
613
|
dataSources: dataSourceMessage,
|
|
635
614
|
environment: {
|
|
636
615
|
database: this.db.sequelize.getDialect(),
|
|
637
|
-
locale: this.ctx.getCurrentLocale() || "en-US"
|
|
616
|
+
locale: this.ctx.getCurrentLocale() || "en-US",
|
|
617
|
+
currentDateTime: getCurrentDateTimeForPrompt(this.ctx.getCurrentLocale(), getCurrentTimezone(this.ctx)),
|
|
618
|
+
timezone: getCurrentTimezone(this.ctx)
|
|
638
619
|
},
|
|
639
620
|
knowledgeBase,
|
|
640
621
|
availableSkills,
|
|
@@ -911,7 +892,9 @@ If information is missing, clearly state it in the summary.</Important>`;
|
|
|
911
892
|
if (!toolMessages || import_lodash.default.isEmpty(toolMessages)) {
|
|
912
893
|
return;
|
|
913
894
|
}
|
|
914
|
-
const { model, service } = await this.getLLMService(
|
|
895
|
+
const { model, service } = await this.plugin.aiManager.getLLMService({
|
|
896
|
+
...this.model
|
|
897
|
+
});
|
|
915
898
|
const toolCallMap = await this.getToolCallMap(messageId);
|
|
916
899
|
const now = /* @__PURE__ */ new Date();
|
|
917
900
|
const toolMessageContent = "The user ignored the application for tools usage and will continued to ask questions";
|
|
@@ -1161,6 +1144,10 @@ If information is missing, clearly state it in the summary.</Important>`;
|
|
|
1161
1144
|
async getAIEmployeeTools() {
|
|
1162
1145
|
var _a, _b;
|
|
1163
1146
|
const tools = await this.listTools({ scope: "GENERAL" });
|
|
1147
|
+
if (this.webSearch === true) {
|
|
1148
|
+
const subAgentWebSearch = await this.toolsManager.getTools("subAgentWebSearch");
|
|
1149
|
+
tools.push(subAgentWebSearch);
|
|
1150
|
+
}
|
|
1164
1151
|
const generalToolsNameSet = new Set(tools.map((x) => x.definition.name));
|
|
1165
1152
|
const toolMap = await this.getToolsMap();
|
|
1166
1153
|
const employeeTools = ((_a = this.employee.skillSettings) == null ? void 0 : _a.tools) ?? [];
|
|
@@ -1334,6 +1321,33 @@ If information is missing, clearly state it in the summary.</Important>`;
|
|
|
1334
1321
|
return this.ctx.db.getModel("aiFiles");
|
|
1335
1322
|
}
|
|
1336
1323
|
}
|
|
1324
|
+
function getCurrentTimezone(ctx) {
|
|
1325
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1326
|
+
const value = ((_a = ctx.get) == null ? void 0 : _a.call(ctx, "x-timezone")) || ((_c = (_b = ctx.request) == null ? void 0 : _b.get) == null ? void 0 : _c.call(_b, "x-timezone")) || ((_e = (_d = ctx.request) == null ? void 0 : _d.header) == null ? void 0 : _e["x-timezone"]) || ((_g = (_f = ctx.req) == null ? void 0 : _f.headers) == null ? void 0 : _g["x-timezone"]) || Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1327
|
+
if (Array.isArray(value)) {
|
|
1328
|
+
return value[0];
|
|
1329
|
+
}
|
|
1330
|
+
return typeof value === "string" ? value : void 0;
|
|
1331
|
+
}
|
|
1332
|
+
function getCurrentDateTimeForPrompt(locale, timezone) {
|
|
1333
|
+
const now = /* @__PURE__ */ new Date();
|
|
1334
|
+
const normalizedLocale = locale || "en-US";
|
|
1335
|
+
try {
|
|
1336
|
+
const formatter = new Intl.DateTimeFormat(normalizedLocale, {
|
|
1337
|
+
timeZone: timezone,
|
|
1338
|
+
year: "numeric",
|
|
1339
|
+
month: "2-digit",
|
|
1340
|
+
day: "2-digit",
|
|
1341
|
+
hour: "2-digit",
|
|
1342
|
+
minute: "2-digit",
|
|
1343
|
+
second: "2-digit",
|
|
1344
|
+
hour12: false
|
|
1345
|
+
});
|
|
1346
|
+
return `${formatter.format(now)}${timezone ? ` (${timezone})` : ""}`;
|
|
1347
|
+
} catch (error) {
|
|
1348
|
+
return `${now.toISOString()}${timezone ? ` (${timezone})` : ""}`;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1337
1351
|
class AgentThread {
|
|
1338
1352
|
constructor(_sessionId, _thread) {
|
|
1339
1353
|
this._sessionId = _sessionId;
|
|
@@ -1422,6 +1436,9 @@ class ChatStreamProtocol {
|
|
|
1422
1436
|
toolCall,
|
|
1423
1437
|
invokeStatus,
|
|
1424
1438
|
status,
|
|
1439
|
+
invokeStartTime,
|
|
1440
|
+
invokeEndTime,
|
|
1441
|
+
content,
|
|
1425
1442
|
interruptAction
|
|
1426
1443
|
}) => {
|
|
1427
1444
|
write({
|
|
@@ -1430,6 +1447,9 @@ class ChatStreamProtocol {
|
|
|
1430
1447
|
toolCall,
|
|
1431
1448
|
invokeStatus,
|
|
1432
1449
|
status,
|
|
1450
|
+
invokeStartTime,
|
|
1451
|
+
invokeEndTime,
|
|
1452
|
+
content,
|
|
1433
1453
|
interruptAction
|
|
1434
1454
|
}
|
|
1435
1455
|
});
|
|
@@ -76,6 +76,8 @@ This prompt uses a structured tag system to organize your operational framework:
|
|
|
76
76
|
- **\`<environment>\`** - System configuration parameters
|
|
77
77
|
- \`<main_database>\` - Main database engine type (affects SQL syntax and identifier quoting)
|
|
78
78
|
- \`<locale>\` - Communication language and regional formatting
|
|
79
|
+
- \`<current_datetime>\` - Current system date and time for this conversation
|
|
80
|
+
- \`<timezone>\` - User or request timezone when available
|
|
79
81
|
|
|
80
82
|
|
|
81
83
|
### Resources
|
|
@@ -106,6 +108,7 @@ This prompt uses a structured tag system to organize your operational framework:
|
|
|
106
108
|
|
|
107
109
|
4. **Communication Standards**
|
|
108
110
|
- Use language specified in \`<locale>\`: ${environment.locale}, unless the user requests otherwise
|
|
111
|
+
- When the task depends on "now", "today", reporting timestamps, or time ranges, use \`<current_datetime>\` and \`<timezone>\` as the authoritative time context instead of guessing
|
|
109
112
|
- Be professional, concise, and helpful
|
|
110
113
|
|
|
111
114
|
5. **Tool Integration**
|
|
@@ -136,6 +139,8 @@ ${task.context}
|
|
|
136
139
|
<environment>
|
|
137
140
|
<main_database>${environment.database}</main_database>
|
|
138
141
|
<locale>${environment.locale}</locale>
|
|
142
|
+
${environment.currentDateTime ? `<current_datetime>${environment.currentDateTime}</current_datetime>` : ""}
|
|
143
|
+
${environment.timezone ? `<timezone>${environment.timezone}</timezone>` : ""}
|
|
139
144
|
</environment>
|
|
140
145
|
|
|
141
146
|
${(availableSkills == null ? void 0 : availableSkills.length) ? `<skills>
|
|
@@ -41,7 +41,7 @@ const convertAIMessage = ({
|
|
|
41
41
|
const message = aiMessage.content;
|
|
42
42
|
const toolCalls = aiMessage.tool_calls;
|
|
43
43
|
const tools = (_a = aiEmployee.skillSettings) == null ? void 0 : _a.tools;
|
|
44
|
-
if (
|
|
44
|
+
if (message == null && !(toolCalls == null ? void 0 : toolCalls.length)) {
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
let textContent = message;
|
|
@@ -57,9 +57,7 @@ class DashscopeProvider extends import_provider.LLMProvider {
|
|
|
57
57
|
const { baseURL, apiKey } = this.serviceOptions || {};
|
|
58
58
|
const { responseFormat, structuredOutput } = this.modelOptions || {};
|
|
59
59
|
const { schema } = structuredOutput || {};
|
|
60
|
-
const modelKwargs = {
|
|
61
|
-
thinking_budget: 4e4
|
|
62
|
-
};
|
|
60
|
+
const modelKwargs = {};
|
|
63
61
|
if (responseFormat) {
|
|
64
62
|
const responseFormatOptions = {
|
|
65
63
|
type: responseFormat
|
|
@@ -31,6 +31,35 @@ __export(ai_context_datasource_manager_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(ai_context_datasource_manager_exports);
|
|
32
32
|
var import_utils = require("@nocobase/utils");
|
|
33
33
|
var import_acl = require("@nocobase/acl");
|
|
34
|
+
function serializeQueryFieldValue(value) {
|
|
35
|
+
if (value === null || value === void 0) {
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
if (value instanceof Date) {
|
|
39
|
+
return value.toISOString();
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
return value.map((item) => serializeQueryFieldValue(item));
|
|
43
|
+
}
|
|
44
|
+
if (typeof value === "object") {
|
|
45
|
+
if (typeof value.toISOString === "function") {
|
|
46
|
+
try {
|
|
47
|
+
return value.toISOString();
|
|
48
|
+
} catch (error) {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (typeof value.toJSON === "function") {
|
|
52
|
+
try {
|
|
53
|
+
const jsonValue = value.toJSON();
|
|
54
|
+
if (jsonValue !== value) {
|
|
55
|
+
return serializeQueryFieldValue(jsonValue);
|
|
56
|
+
}
|
|
57
|
+
} catch (error) {
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
34
63
|
class AIContextDatasourceManager {
|
|
35
64
|
constructor(plugin) {
|
|
36
65
|
this.plugin = plugin;
|
|
@@ -127,7 +156,7 @@ class AIContextDatasourceManager {
|
|
|
127
156
|
(x) => fields.map((field) => {
|
|
128
157
|
var _a2;
|
|
129
158
|
const { name, type } = ((_a2 = collection.getField(field)) == null ? void 0 : _a2.options) || {};
|
|
130
|
-
const value = x[field];
|
|
159
|
+
const value = serializeQueryFieldValue(x[field]);
|
|
131
160
|
return {
|
|
132
161
|
name,
|
|
133
162
|
type,
|
|
@@ -21,6 +21,11 @@ export declare enum SupportedModel {
|
|
|
21
21
|
LLM = "LLM",
|
|
22
22
|
EMBEDDING = "EMBEDDING"
|
|
23
23
|
}
|
|
24
|
+
export type LLMModelOptions = {
|
|
25
|
+
llmService: string;
|
|
26
|
+
model: string;
|
|
27
|
+
webSearch?: boolean;
|
|
28
|
+
};
|
|
24
29
|
export declare class AIManager {
|
|
25
30
|
protected plugin: PluginAIServer;
|
|
26
31
|
llmProviders: Map<string, LLMProviderMeta>;
|
|
@@ -34,4 +39,9 @@ export declare class AIManager {
|
|
|
34
39
|
supportWebSearch: boolean;
|
|
35
40
|
}[];
|
|
36
41
|
getSupportedProvider(model: SupportedModel): string[];
|
|
42
|
+
getLLMService(options: LLMModelOptions): Promise<{
|
|
43
|
+
provider: LLMProvider;
|
|
44
|
+
model: string;
|
|
45
|
+
service: any;
|
|
46
|
+
}>;
|
|
37
47
|
}
|
|
@@ -57,6 +57,38 @@ class AIManager {
|
|
|
57
57
|
getSupportedProvider(model) {
|
|
58
58
|
return Array.from(this.llmProviders.entries()).filter(([_2, { supportedModel }]) => supportedModel && supportedModel.includes(model)).map(([name]) => name);
|
|
59
59
|
}
|
|
60
|
+
async getLLMService(options) {
|
|
61
|
+
const { llmService, model, webSearch } = options ?? {};
|
|
62
|
+
if (!llmService || !model) {
|
|
63
|
+
throw new Error("LLM service not configured");
|
|
64
|
+
}
|
|
65
|
+
const modelOptions = {
|
|
66
|
+
llmService,
|
|
67
|
+
model
|
|
68
|
+
};
|
|
69
|
+
if (webSearch === true) {
|
|
70
|
+
modelOptions.builtIn = { webSearch: true };
|
|
71
|
+
}
|
|
72
|
+
const service = await this.plugin.db.getRepository("llmServices").findOne({
|
|
73
|
+
filter: {
|
|
74
|
+
name: llmService
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
if (!service) {
|
|
78
|
+
throw new Error("LLM service not found");
|
|
79
|
+
}
|
|
80
|
+
const providerOptions = this.llmProviders.get(service.provider);
|
|
81
|
+
if (!providerOptions) {
|
|
82
|
+
throw new Error("LLM service provider not found");
|
|
83
|
+
}
|
|
84
|
+
const Provider = providerOptions.provider;
|
|
85
|
+
const provider = new Provider({
|
|
86
|
+
app: this.plugin.app,
|
|
87
|
+
serviceOptions: service.options,
|
|
88
|
+
modelOptions
|
|
89
|
+
});
|
|
90
|
+
return { provider, model, service };
|
|
91
|
+
}
|
|
60
92
|
}
|
|
61
93
|
// Annotate the CommonJS export names for ESM import in node:
|
|
62
94
|
0 && (module.exports = {
|
package/dist/server/utils.js
CHANGED
|
@@ -92,6 +92,9 @@ function parseResponseMessage(row) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
async function encodeLocalFile(url) {
|
|
95
|
+
if (process.env.APP_PUBLIC_PATH && url.startsWith(process.env.APP_PUBLIC_PATH)) {
|
|
96
|
+
url = url.slice(process.env.APP_PUBLIC_PATH.length);
|
|
97
|
+
}
|
|
95
98
|
url = import_path.default.join(process.cwd(), url);
|
|
96
99
|
const data = await import_fs.default.promises.readFile(url);
|
|
97
100
|
return Buffer.from(data).toString("base64");
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Create AI employees with diverse skills to collaborate with humans, build systems, and handle business operations.",
|
|
7
7
|
"description.ru-RU": "Поддержка интеграции с AI-сервисами: предоставляются AI-узлы для рабочих процессов, расширяя возможности бизнес-обработки.",
|
|
8
8
|
"description.zh-CN": "创建各种技能的 AI 员工,与人类协同,搭建系统,处理业务。",
|
|
9
|
-
"version": "2.1.0-alpha.
|
|
9
|
+
"version": "2.1.0-alpha.16",
|
|
10
10
|
"main": "dist/server/index.js",
|
|
11
11
|
"homepage": "https://docs.nocobase.com/handbook/action-ai",
|
|
12
12
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/action-ai",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"keywords": [
|
|
62
62
|
"AI"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "14cf3dbdb9f0a9669602de4ad21a9464fa27c105"
|
|
65
65
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
(self.webpackChunk_nocobase_plugin_ai=self.webpackChunk_nocobase_plugin_ai||[]).push([["406"],{2341:function(e,t,n){"use strict";n.d(t,{A:function(){return A}});var r=n(1426),o=n(3059),i=n.n(o),a=n(9155),c=n.n(a),u=n(2059);let l=c().createContext(null);var s=({children:e})=>{let{prefixCls:t}=c().useContext(l);return c().createElement("div",{className:i()(`${t}-group-title`)},e&&c().createElement(u.Typography.Text,null,e))},f=n(7375),d=n(7782);let h=e=>{e.stopPropagation()};var p=e=>{let t,{prefixCls:n,info:o,className:l,direction:s,onClick:p,active:v,menu:m,...g}=e,y=(0,d.A)(g,{aria:!0,data:!0,attr:!0}),{disabled:b}=o,[w,E]=c().useState(!1),[A,S]=c().useState(!1),T=i()(l,`${n}-item`,{[`${n}-item-active`]:v&&!b},{[`${n}-item-disabled`]:b}),[O,x]=(0,a.useMemo)(()=>{let{trigger:e,...t}=m||{};return[e,t]},[m]);return c().createElement(u.Tooltip,{title:o.label,open:w&&A,onOpenChange:S,placement:"rtl"===s?"left":"right"},c().createElement("li",(0,r.A)({},y,{className:T,onClick:()=>{!b&&p&&p(o)}}),o.icon&&c().createElement("div",{className:`${n}-icon`},o.icon),c().createElement(u.Typography.Text,{className:`${n}-label`,ellipsis:{onEllipsis:E}},o.label),!b&&m&&c().createElement(u.Dropdown,{menu:x,placement:"rtl"===s?"bottomLeft":"bottomRight",trigger:["click"],disabled:b,onOpenChange:e=>{e&&S(!e)}},(t=c().createElement(f.EllipsisOutlined,{onClick:h,className:`${n}-menu-icon`}),O?"function"==typeof O?O(o,{originNode:t}):O:t))))},v=n(4921),m=n(5327),g=n(7790);let y="__ungrouped";var b=n(2019),w=n(9980),E=(0,n(7030).OF)("Conversations",e=>(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${(0,b.zA)(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${(0,b.zA)(e.paddingXS)}`}}}})((0,w.oX)(e,{})),()=>({})),A=e=>{let{prefixCls:t,rootClassName:n,items:o,activeKey:a,defaultActiveKey:u,onActiveChange:f,menu:h,styles:b={},classNames:w={},groupable:A,className:S,style:T,...O}=e,x=(0,d.A)(O,{attr:!0,aria:!0,data:!0}),[C,_]=(0,v.A)(u,{value:a}),[R,k]=((e,t=[])=>{let[n,r,o]=c().useMemo(()=>{if(!e)return[!1,void 0,void 0];let t={sort:void 0,title:void 0};return"object"==typeof e&&(t={...t,...e}),[!0,t.sort,t.title]},[e]);return c().useMemo(()=>{if(!n)return[[{name:y,data:t,title:void 0}],n];let e=t.reduce((e,t)=>{let n=t.group||y;return e[n]||(e[n]=[]),e[n].push(t),e},{});return[(r?Object.keys(e).sort(r):Object.keys(e)).map(t=>({name:t===y?void 0:t,title:o,data:e[t]})),n]},[t,e])})(A,o),{getPrefixCls:M,direction:j}=(0,g.A)(),L=M("conversations",t),N=(0,m.A)("conversations"),[P,$,I]=E(L),D=i()(L,N.className,S,n,$,I,{[`${L}-rtl`]:"rtl"===j}),H=e=>{_(e.key),f&&f(e.key)};return P(c().createElement("ul",(0,r.A)({},x,{style:{...N.style,...T},className:D}),R.map((e,t)=>{let n=e.data.map((e,t)=>c().createElement(p,{key:e.key||`key-${t}`,info:e,prefixCls:L,direction:j,className:i()(w.item,N.classNames.item),style:{...N.styles.item,...b.item},menu:"function"==typeof h?h(e):h,active:C===e.key,onClick:H}));return k?c().createElement("li",{key:e.name||`key-${t}`},c().createElement(l.Provider,{value:{prefixCls:L}},e.title?.(e.name,{components:{GroupTitle:s}})||c().createElement(s,{key:e.name},e.name)),c().createElement("ul",{className:`${L}-list`},n)):n})))}},606:function(e,t,n){"use strict";let r;n.d(t,{A:function(){return j}});var o=n(1426),i=n(2059),a=n(3059),c=n.n(a),u=n(8993),l=n(7782),s=n(9155),f=n.n(s),d=n(5327),h=n(7790),p=n(7375),v=n(2094);let m=s.createContext({}),g=()=>({height:0}),y=e=>({height:e.scrollHeight}),b=s.createContext(null);var w=s.forwardRef(function(e,t){let{className:n,action:r,onClick:a,...u}=e,l=s.useContext(b),{prefixCls:f,disabled:d}=l,h=l[r],p=d??u.disabled??l[`${r}Disabled`];return s.createElement(i.Button,(0,o.A)({type:"text"},u,{ref:t,onClick:e=>{!p&&(h&&h(),a&&a(e))},className:c()(f,n,{[`${f}-disabled`]:p})}))}),E=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ClearOutlined,null)},e,{action:"onClear",ref:t}))});let A=(0,s.memo)(e=>{let{className:t}=e;return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:t},f().createElement("title",null,"Stop Loading"),f().createElement("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",opacity:"0.45"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",strokeDasharray:"600 9999999"},f().createElement("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"})))});var S=s.forwardRef(function(e,t){let{prefixCls:n}=s.useContext(b),{className:r}=e;return s.createElement(w,(0,o.A)({icon:null,color:"primary",variant:"text",shape:"circle"},e,{className:c()(r,`${n}-loading-button`),action:"onCancel",ref:t}),s.createElement(A,{className:`${n}-loading-icon`}))}),T=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ArrowUpOutlined,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))});function O({className:e}){return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:e},f().createElement("title",null,"Speech Recording"),Array.from({length:4}).map((e,t)=>f().createElement("rect",{fill:"currentColor",rx:70,ry:70,height:250,width:140,x:286.66666666666663*t,y:375,key:t},f().createElement("animate",{attributeName:"height",values:"250; 500; 250",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}),f().createElement("animate",{attributeName:"y",values:"375; 250; 375",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}))))}var x=s.forwardRef(function(e,t){let{speechRecording:n,onSpeechDisabled:r,prefixCls:i}=s.useContext(b),a=null;return a=n?s.createElement(O,{className:`${i}-recording-icon`}):r?s.createElement(p.AudioMutedOutlined,null):s.createElement(p.AudioOutlined,null),s.createElement(w,(0,o.A)({icon:a,color:"primary",variant:"text"},e,{action:"onSpeech",ref:t}))}),C=n(2019),_=n(9980),R=(0,n(7030).OF)("Sender",e=>{let{paddingXS:t,calc:n}=e,r=(0,_.oX)(e,{SenderContentMaxWidth:`calc(100% - ${(0,C.zA)(n(t).add(32).equal())})`});return[(e=>{let{componentCls:t,padding:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,lineWidthBold:c,calc:u}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:u(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:a},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:c}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:n,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${t}-footer`]:{paddingInlineStart:n,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}})(r),(e=>{let{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[r]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-header":{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",[`${r}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(t=>`${t} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}}})(r)]},()=>({}));!r&&"u">typeof window&&(r=window.SpeechRecognition||window.webkitSpeechRecognition);let k={SendButton:T,ClearButton:E,LoadingButton:S,SpeechButton:x},M=f().forwardRef((e,t)=>{var n,a;let{prefixCls:p,styles:v={},classNames:g={},className:y,rootClassName:w,style:E,defaultValue:A,value:O,readOnly:C,submitType:_="enter",onSubmit:M,loading:j,components:L,onCancel:N,onChange:P,actions:$,onKeyPress:I,onKeyDown:D,disabled:H,allowSpeech:z,prefix:B,footer:q,header:W,onPaste:Y,onPasteFile:F,autoSize:X={maxRows:8},...V}=e,{direction:K,getPrefixCls:G}=(0,h.A)(),U=G("sender",p),J=f().useRef(null),Q=f().useRef(null);(0,s.useImperativeHandle)(t,()=>{let e=(()=>({nativeElement:J.current,focus:Q.current?.focus,blur:Q.current?.blur}))(),{nativeElement:t}=e;return new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)})});let Z=(0,d.A)("sender"),ee=`${U}-input`,[et,en,er]=R(U),eo=c()(U,Z.className,y,w,en,er,{[`${U}-rtl`]:"rtl"===K,[`${U}-disabled`]:H}),ei=`${U}-actions-btn`,ea=`${U}-actions-list`,[ec,eu]=(0,u.vz)(A||"",{value:O}),el=(e,t)=>{eu(e),P&&P(e,t)},[es,ef,ed]=function(e,t){let n=(0,u._q)(e),[o,i,a]=f().useMemo(()=>"object"==typeof t?[t.recording,t.onRecordingChange,"boolean"==typeof t.recording]:[void 0,void 0,!1],[t]),[c,l]=f().useState(null);f().useEffect(()=>{if("u">typeof navigator&&"permissions"in navigator){let e=null;return navigator.permissions.query({name:"microphone"}).then(t=>{l(t.state),t.onchange=function(){l(this.state)},e=t}),()=>{e&&(e.onchange=null)}}},[]);let s=r&&"denied"!==c,d=f().useRef(null),[h,p]=(0,u.vz)(!1,{value:o}),v=f().useRef(!1),m=(0,u._q)(e=>{if(!e||h)if(v.current=e,a)i?.(!h);else{if(s&&!d.current){let e=new r;e.onstart=()=>{p(!0)},e.onend=()=>{p(!1)},e.onresult=e=>{v.current||n(e.results?.[0]?.[0]?.transcript),v.current=!1},d.current=e}d.current&&(h?(d.current.stop(),i?.(!1)):(d.current.start(),i?.(!0)))}});return[s,m,h]}(e=>{el(`${ec} ${e}`)},z),eh=(n=["input"],a=i.Input.TextArea,function(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}(L,n)||a),ep={...(0,l.A)(V,{attr:!0,aria:!0,data:!0}),ref:Q},ev=()=>{ec&&M&&!j&&M(ec)},em=f().useRef(!1),eg=f().createElement(i.Flex,{className:`${ea}-presets`},z&&f().createElement(x,null),j?f().createElement(S,null):f().createElement(T,null));"function"==typeof $?eg=$(eg,{components:k}):($||!1===$)&&(eg=$);let ey=null;return"function"==typeof q?ey=q({components:k}):q&&(ey=q),et(f().createElement("div",{ref:J,className:eo,style:{...Z.style,...E}},W&&f().createElement(m.Provider,{value:{prefixCls:U}},W),f().createElement(b.Provider,{value:{prefixCls:ei,onSend:ev,onSendDisabled:!ec,onClear:()=>{el("")},onClearDisabled:!ec,onCancel:N,onCancelDisabled:!j,onSpeech:()=>ef(!1),onSpeechDisabled:!es,speechRecording:ed,disabled:H}},f().createElement("div",{className:`${U}-content`,onMouseDown:e=>{e.target!==J.current?.querySelector(`.${ee}`)&&e.preventDefault(),Q.current?.focus()}},B&&f().createElement("div",{className:c()(`${U}-prefix`,Z.classNames.prefix,g.prefix),style:{...Z.styles.prefix,...v.prefix}},B),f().createElement(eh,(0,o.A)({},ep,{disabled:H,style:{...Z.styles.input,...v.input},className:c()(ee,Z.classNames.input,g.input),autoSize:X,value:ec,onChange:e=>{el(e.target.value,e),ef(!0)},onPressEnter:e=>{let t="Enter"===e.key&&!em.current;switch(_){case"enter":t&&!e.shiftKey&&(e.preventDefault(),ev());break;case"shiftEnter":t&&e.shiftKey&&(e.preventDefault(),ev())}I&&I(e)},onCompositionStart:()=>{em.current=!0},onCompositionEnd:()=>{em.current=!1},onKeyDown:D,onPaste:e=>{let t=e.clipboardData?.files;t?.length&&F&&(F(t[0],t),e.preventDefault()),Y?.(e)},variant:"borderless",readOnly:C})),eg&&f().createElement("div",{className:c()(ea,Z.classNames.actions,g.actions),style:{...Z.styles.actions,...v.actions}},eg)),ey&&f().createElement("div",{className:c()(`${U}-footer`,Z.classNames.footer,g.footer),style:{...Z.styles.footer,...v.footer}},ey))))});M.Header=function(e){let{title:t,onOpenChange:n,open:r,children:o,className:a,style:u,classNames:l={},styles:f={},closable:d,forceRender:h}=e,{prefixCls:b}=s.useContext(m),w=`${b}-header`;return s.createElement(v.Ay,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:g,onEnterActive:y,onLeaveStart:y,onLeaveActive:g,visible:r,forceRender:h},({className:e,style:h})=>s.createElement("div",{className:c()(w,e,a),style:{...h,...u}},(!1!==d||t)&&s.createElement("div",{className:c()(`${w}-header`,l.header),style:{...f.header}},s.createElement("div",{className:`${w}-title`},t),!1!==d&&s.createElement("div",{className:`${w}-close`},s.createElement(i.Button,{type:"text",icon:s.createElement(p.CloseOutlined,null),size:"small",onClick:()=>{n?.(!r)}}))),o&&s.createElement("div",{className:c()(`${w}-content`,l.content),style:{...f.content}},o)))};var j=M},1911:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};if("abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},o)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,o){for(var i,a,c=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in i=Object(arguments[u]))n.call(i,l)&&(c[l]=i[l]);if(t){a=t(i);for(var s=0;s<a.length;s++)r.call(i,a[s])&&(c[a[s]]=i[a[s]])}}return c}:Object.assign},8405:function(e,t,n){"use strict";var r=n(5126);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=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");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},7465:function(e,t,n){e.exports=n(8405)()},5126:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6768:function(e,t,n){"use strict";n.d(t,{A:function(){return ed}});var r=n(2549),o=n(942),i=n(5739),a=n(1114),c=n(2256),u=n(9155),l=n.n(u),s=n(1098),f=n(3059),d=n.n(f),h=n(8578);function p(e){return e instanceof HTMLElement||e instanceof SVGElement?e:e instanceof l().Component?s.findDOMNode(e):null}n(3455);var v=n(1834),m=u.createContext(null),g=function(){if("u">typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}(),y="u">typeof window&&"u">typeof document&&window.document===document,b=void 0!==n.g&&n.g.Math===Math?n.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),w="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(b):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},E=["top","right","bottom","left","width","height","size","weight"],A="u">typeof MutationObserver,S=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function o(){t&&(t=!1,e()),n&&a()}function i(){w(o)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(i,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){y&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),A?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){y&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;E.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),T=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},O=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||b},x=k(0,0,0,0);function C(e){return parseFloat(e)||0}function _(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+C(e["border-"+n+"-width"])},0)}var R="u">typeof SVGGraphicsElement?function(e){return e instanceof O(e).SVGGraphicsElement}:function(e){return e instanceof O(e).SVGElement&&"function"==typeof e.getBBox};function k(e,t,n,r){return{x:e,y:t,width:n,height:r}}var M=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=k(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!y)return x;if(R(e)){var t;return k(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t,n=e.clientWidth,r=e.clientHeight;if(!n&&!r)return x;var o=O(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=C(i)}return t}(o),a=i.left+i.right,c=i.top+i.bottom,u=C(o.width),l=C(o.height);if("border-box"===o.boxSizing&&(Math.round(u+a)!==n&&(u-=_(o,"left","right")+a),Math.round(l+c)!==r&&(l-=_(o,"top","bottom")+c)),(t=e)!==O(t).document.documentElement){var s=Math.round(u+a)-n,f=Math.round(l+c)-r;1!==Math.abs(s)&&(u-=s),1!==Math.abs(f)&&(l-=f)}return k(i.left,i.top,u,l)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),j=function(e,t){var n,r,o,i,a,c=(n=t.x,r=t.y,o=t.width,i=t.height,T(a=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:o,height:i,top:r,right:n+o,bottom:i+r,left:n}),a);T(this,{target:e,contentRect:c})},L=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new g,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof O(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new M(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof O(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new j(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),N="u">typeof WeakMap?new WeakMap:new g,P=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new L(t,S.getInstance(),this);N.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){P.prototype[e]=function(){var t;return(t=N.get(this))[e].apply(t,arguments)}});var $=void 0!==b.ResizeObserver?b.ResizeObserver:P,I=new Map,D=new $(function(e){e.forEach(function(e){var t,n=e.target;null==(t=I.get(n))||t.forEach(function(e){return e(n)})})}),H=n(582),z=n(9520),B=n(126),q=n(6439),W=function(e){(0,B.A)(n,e);var t=(0,q.A)(n);function n(){return(0,H.A)(this,n),t.apply(this,arguments)}return(0,z.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(u.Component),Y=u.forwardRef(function(e,t){var n=e.children,r=e.disabled,a=u.useRef(null),c=u.useRef(null),l=u.useContext(m),s="function"==typeof n,f=s?n(a):n,d=u.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),h=!s&&u.isValidElement(f)&&(0,v.f3)(f),g=h?f.ref:null,y=(0,v.xK)(g,a),b=function(){var e;return p(a.current)||(a.current&&"object"===(0,i.A)(a.current)?p(null==(e=a.current)?void 0:e.nativeElement):null)||p(c.current)};u.useImperativeHandle(t,function(){return b()});var w=u.useRef(e);w.current=e;var E=u.useCallback(function(e){var t=w.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),a=i.width,c=i.height,u=e.offsetWidth,s=e.offsetHeight,f=Math.floor(a),h=Math.floor(c);if(d.current.width!==f||d.current.height!==h||d.current.offsetWidth!==u||d.current.offsetHeight!==s){var p={width:f,height:h,offsetWidth:u,offsetHeight:s};d.current=p;var v=u===Math.round(a)?a:u,m=s===Math.round(c)?c:s,g=(0,o.A)((0,o.A)({},p),{},{offsetWidth:v,offsetHeight:m});null==l||l(g,e,r),n&&Promise.resolve().then(function(){n(g,e)})}},[]);return u.useEffect(function(){var e=b();return e&&!r&&(I.has(e)||(I.set(e,new Set),D.observe(e)),I.get(e).add(E)),function(){I.has(e)&&(I.get(e).delete(E),!I.get(e).size&&(D.unobserve(e),I.delete(e)))}},[a.current,r]),u.createElement(W,{ref:c},h?u.cloneElement(f,{ref:y}):f)}),F=u.forwardRef(function(e,t){var n=e.children;return("function"==typeof n?[n]:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return l().Children.forEach(t,function(t){(null!=t||n.keepEmpty)&&(Array.isArray(t)?r=r.concat(e(t)):(0,h.isFragment)(t)&&t.props?r=r.concat(e(t.props.children,n)):r.push(t))}),r}(n)).map(function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return u.createElement(Y,(0,r.A)({},e,{key:i,ref:0===o?t:void 0}),n)})});F.Collection=function(e){var t=e.children,n=e.onBatchResize,r=u.useRef(0),o=u.useRef([]),i=u.useContext(m),a=u.useCallback(function(e,t,a){r.current+=1;var c=r.current;o.current.push({size:e,element:t,data:a}),Promise.resolve().then(function(){c===r.current&&(null==n||n(o.current),o.current=[])}),null==i||i(e,t,a)},[n,i]);return u.createElement(m.Provider,{value:a},t)};var X=u.forwardRef(function(e,t){var n,i=e.height,a=e.offsetY,l=e.offsetX,s=e.children,f=e.prefixCls,h=e.onInnerResize,p=e.innerProps,v=e.rtl,m=e.extra,g={},y={display:"flex",flexDirection:"column"};return void 0!==a&&(g={height:i,position:"relative",overflow:"hidden"},y=(0,o.A)((0,o.A)({},y),{},(n={transform:"translateY(".concat(a,"px)")},(0,c.A)(n,v?"marginRight":"marginLeft",-l),(0,c.A)(n,"position","absolute"),(0,c.A)(n,"left",0),(0,c.A)(n,"right",0),(0,c.A)(n,"top",0),n))),u.createElement("div",{style:g},u.createElement(F,{onResize:function(e){e.offsetHeight&&h&&h()}},u.createElement("div",(0,r.A)({style:y,className:d()((0,c.A)({},"".concat(f,"-holder-inner"),f)),ref:t},p),s,m)))});X.displayName="Filler";var V=function(e){return+setTimeout(e,16)},K=function(e){return clearTimeout(e)};"u">typeof window&&"requestAnimationFrame"in window&&(V=function(e){return window.requestAnimationFrame(e)},K=function(e){return window.cancelAnimationFrame(e)});var G=0,U=new Map,J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=G+=1;return!function t(r){if(0===r)U.delete(n),e();else{var o=V(function(){t(r-1)});U.set(n,o)}}(t),n};function Q(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}J.cancel=function(e){var t=U.get(e);return U.delete(e),K(t)};var Z=u.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.rtl,l=e.scrollOffset,s=e.scrollRange,f=e.onStartMove,h=e.onStopMove,p=e.onScroll,v=e.horizontal,m=e.spinSize,g=e.containerSize,y=e.style,b=e.thumbStyle,w=u.useState(!1),E=(0,a.A)(w,2),A=E[0],S=E[1],T=u.useState(null),O=(0,a.A)(T,2),x=O[0],C=O[1],_=u.useState(null),R=(0,a.A)(_,2),k=R[0],M=R[1],j=!i,L=u.useRef(),N=u.useRef(),P=u.useState(!1),$=(0,a.A)(P,2),I=$[0],D=$[1],H=u.useRef(),z=function(){clearTimeout(H.current),D(!0),H.current=setTimeout(function(){D(!1)},3e3)},B=s-g||0,q=g-m||0,W=u.useMemo(function(){return 0===l||0===B?0:l/B*q},[l,B,q]),Y=u.useRef({top:W,dragging:A,pageY:x,startTop:k});Y.current={top:W,dragging:A,pageY:x,startTop:k};var F=function(e){S(!0),C(Q(e,v)),M(Y.current.top),f(),e.stopPropagation(),e.preventDefault()};u.useEffect(function(){var e=function(e){e.preventDefault()},t=L.current,n=N.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",F),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",F)}},[]);var X=u.useRef();X.current=B;var V=u.useRef();V.current=q,u.useEffect(function(){if(A){var e,t=function(t){var n=Y.current,r=n.dragging,o=n.pageY,i=n.startTop;if(J.cancel(e),r){var a=Q(t,v)-o,c=i;!j&&v?c-=a:c+=a;var u=X.current,l=V.current,s=Math.ceil((l?c/l:0)*u);s=Math.min(s=Math.max(s,0),u),e=J(function(){p(s,v)})}},n=function(){S(!1),h()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),J.cancel(e)}}},[A]),u.useEffect(function(){z()},[l]),u.useImperativeHandle(t,function(){return{delayHidden:z}});var K="".concat(r,"-scrollbar"),G={position:"absolute",visibility:I&&B>0?null:"hidden"},U={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return v?(G.height=8,G.left=0,G.right=0,G.bottom=0,U.height="100%",U.width=m,j?U.left=W:U.right=W):(G.width=8,G.top=0,G.bottom=0,j?G.right=0:G.left=0,U.width="100%",U.height=m,U.top=W),u.createElement("div",{ref:L,className:d()(K,(n={},(0,c.A)(n,"".concat(K,"-horizontal"),v),(0,c.A)(n,"".concat(K,"-vertical"),!v),(0,c.A)(n,"".concat(K,"-visible"),I),n)),style:(0,o.A)((0,o.A)({},G),y),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:z},u.createElement("div",{ref:N,className:d()("".concat(K,"-thumb"),(0,c.A)({},"".concat(K,"-thumb-moving"),A)),style:(0,o.A)((0,o.A)({},U),b),onMouseDown:F}))});function ee(e){var t=e.children,n=e.setRef,r=u.useCallback(function(e){n(e)},[]);return u.cloneElement(t,{ref:r})}var et=function(){function e(){(0,H.A)(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,z.A)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),en=n(4148),er=n(2761),eo=("u"<typeof navigator?"undefined":(0,i.A)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ei=function(e,t){var n=(0,u.useRef)(!1),r=(0,u.useRef)(null),o=(0,u.useRef)({top:e,bottom:t});return o.current.top=e,o.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e<0&&o.current.top||e>0&&o.current.bottom;return t&&i?(clearTimeout(r.current),n.current=!1):(!i||n.current)&&(clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)),!n.current&&i}},ea=14/15;function ec(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*100;return isNaN(n)&&(n=0),Math.floor(n=Math.min(n=Math.max(n,20),e/2))}var eu=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],el=[],es={overflowY:"auto",overflowAnchor:"none"},ef=u.forwardRef(function(e,t){var n,l,f,h,v,m,g,y,b,w,E,A,S,T,O,x,C,_,R,k,M,j,L,N,P,$,I,D,H,z,B,q,W,Y,V,K=e.prefixCls,G=void 0===K?"rc-virtual-list":K,U=e.className,Q=e.height,ef=e.itemHeight,ed=e.fullHeight,eh=e.style,ep=e.data,ev=e.children,em=e.itemKey,eg=e.virtual,ey=e.direction,eb=e.scrollWidth,ew=e.component,eE=e.onScroll,eA=e.onVirtualScroll,eS=e.onVisibleChange,eT=e.innerProps,eO=e.extraRender,ex=e.styles,eC=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||({}).propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eu),e_=!!(!1!==eg&&Q&&ef),eR=e_&&ep&&(ef*ep.length>Q||!!eb),ek="rtl"===ey,eM=d()(G,(0,c.A)({},"".concat(G,"-rtl"),ek),U),ej=ep||el,eL=(0,u.useRef)(),eN=(0,u.useRef)(),eP=(0,u.useState)(0),e$=(0,a.A)(eP,2),eI=e$[0],eD=e$[1],eH=(0,u.useState)(0),ez=(0,a.A)(eH,2),eB=ez[0],eq=ez[1],eW=(0,u.useState)(!1),eY=(0,a.A)(eW,2),eF=eY[0],eX=eY[1],eV=function(){eX(!0)},eK=function(){eX(!1)},eG=u.useCallback(function(e){return"function"==typeof em?em(e):null==e?void 0:e[em]},[em]);function eU(e){eD(function(t){var n,r=(n="function"==typeof e?e(t):e,Number.isNaN(ts.current)||(n=Math.min(n,ts.current)),n=Math.max(n,0));return eL.current.scrollTop=r,r})}var eJ=(0,u.useRef)({start:0,end:ej.length}),eQ=(0,u.useRef)(),eZ=(n=u.useState(ej),f=(l=(0,a.A)(n,2))[0],h=l[1],v=u.useState(null),g=(m=(0,a.A)(v,2))[0],y=m[1],u.useEffect(function(){var e=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;i<a?(r=e,o=t):(r=t,o=e);var c={__EMPTY_ITEM__:!0};function u(e){return void 0!==e?n(e):c}for(var l=null,s=1!==Math.abs(i-a),f=0;f<o.length;f+=1){var d=u(r[f]);if(d!==u(o[f])){l=f,s=s||d!==u(o[f+1]);break}}return null===l?null:{index:l,multiple:s}}(f||[],ej||[],eG);(null==e?void 0:e.index)!==void 0&&y(ej[e.index]),h(ej)},[ej]),[g]);eQ.current=(0,a.A)(eZ,1)[0];var e0=function(e,t,n){var r=u.useState(0),o=(0,a.A)(r,2),i=o[0],c=o[1],l=(0,u.useRef)(new Map),s=(0,u.useRef)(new et),f=(0,u.useRef)();function d(){J.cancel(f.current)}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){l.current.forEach(function(e,t){if(e&&e.offsetParent){var n=p(e),r=n.offsetHeight;s.current.get(t)!==r&&s.current.set(t,n.offsetHeight)}}),c(function(e){return e+1})};e?t():f.current=J(t)}return(0,u.useEffect)(function(){return d},[]),[function(r,o){var i=e(r),a=l.current.get(i);o?(l.current.set(i,o),h()):l.current.delete(i),!a!=!o&&(o?null==t||t(r):null==n||n(r))},h,s.current,i]}(eG,null,null),e1=(0,a.A)(e0,4),e5=e1[0],e2=e1[1],e9=e1[2],e6=e1[3],e3=u.useMemo(function(){if(!e_)return{scrollHeight:void 0,start:0,end:ej.length-1,offset:void 0};if(!eR)return{scrollHeight:(null==(e=eN.current)?void 0:e.offsetHeight)||0,start:0,end:ej.length-1,offset:void 0};for(var e,t,n,r,o=0,i=ej.length,a=0;a<i;a+=1){var c=eG(ej[a]),u=e9.get(c),l=o+(void 0===u?ef:u);l>=eI&&void 0===t&&(t=a,n=o),l>eI+Q&&void 0===r&&(r=a),o=l}return void 0===t&&(t=0,n=0,r=Math.ceil(Q/ef)),void 0===r&&(r=ej.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,ej.length-1),offset:n}},[eR,e_,eI,ej,e6,Q]),e7=e3.scrollHeight,e4=e3.start,e8=e3.end,te=e3.offset;eJ.current.start=e4,eJ.current.end=e8;var tt=u.useState({width:0,height:Q}),tn=(0,a.A)(tt,2),tr=tn[0],to=tn[1],ti=(0,u.useRef)(),ta=(0,u.useRef)(),tc=u.useMemo(function(){return ec(tr.width,eb)},[tr.width,eb]),tu=u.useMemo(function(){return ec(tr.height,e7)},[tr.height,e7]),tl=e7-Q,ts=(0,u.useRef)(tl);ts.current=tl;var tf=eI<=0,td=eI>=tl,th=ei(tf,td),tp=function(){return{x:ek?-eB:eB,y:eI}},tv=(0,u.useRef)(tp()),tm=(0,er._q)(function(){if(eA){var e=tp();(tv.current.x!==e.x||tv.current.y!==e.y)&&(eA(e),tv.current=e)}});function tg(e,t){t?((0,s.flushSync)(function(){eq(e)}),tm()):eU(e)}var ty=function(e){var t=e,n=eb-tr.width;return Math.min(t=Math.max(t,0),n)},tb=(0,er._q)(function(e,t){t?((0,s.flushSync)(function(){eq(function(t){return ty(t+(ek?-e:e))})}),tm()):eU(function(t){return t+e})}),tw=(b=!!eb,w=(0,u.useRef)(0),E=(0,u.useRef)(null),A=(0,u.useRef)(null),S=(0,u.useRef)(!1),T=ei(tf,td),O=(0,u.useRef)(null),x=(0,u.useRef)(null),[function(e){if(e_){J.cancel(x.current),x.current=J(function(){O.current=null},2);var t,n=e.deltaX,r=e.deltaY,o=e.shiftKey,i=n,a=r;("sx"===O.current||!O.current&&o&&r&&!n)&&(i=r,a=0,O.current="sx");var c=Math.abs(i),u=Math.abs(a);(null===O.current&&(O.current=b&&c>u?"x":"y"),"y"===O.current)?(t=a,J.cancel(E.current),w.current+=t,A.current=t,T(t)||(eo||e.preventDefault(),E.current=J(function(){var e=S.current?10:1;tb(w.current*e),w.current=0}))):(tb(i,!0),eo||e.preventDefault())}},function(e){e_&&(S.current=e.detail===A.current)}]),tE=(0,a.A)(tw,2),tA=tE[0],tS=tE[1];C=function(e,t){return!th(e,t)&&(tA({preventDefault:function(){},deltaY:e}),!0)},R=(0,u.useRef)(!1),k=(0,u.useRef)(0),M=(0,u.useRef)(null),j=(0,u.useRef)(null),L=function(e){if(R.current){var t=Math.ceil(e.touches[0].pageY),n=k.current-t;k.current=t,C(n)&&e.preventDefault(),clearInterval(j.current),j.current=setInterval(function(){(!C(n*=ea,!0)||.1>=Math.abs(n))&&clearInterval(j.current)},16)}},N=function(){R.current=!1,_()},P=function(e){_(),1!==e.touches.length||R.current||(R.current=!0,k.current=Math.ceil(e.touches[0].pageY),M.current=e.target,M.current.addEventListener("touchmove",L),M.current.addEventListener("touchend",N))},_=function(){M.current&&(M.current.removeEventListener("touchmove",L),M.current.removeEventListener("touchend",N))},(0,en.A)(function(){return e_&&eL.current.addEventListener("touchstart",P),function(){var e;null==(e=eL.current)||e.removeEventListener("touchstart",P),_(),clearInterval(j.current)}},[e_]),(0,en.A)(function(){function e(e){e_&&e.preventDefault()}var t=eL.current;return t.addEventListener("wheel",tA),t.addEventListener("DOMMouseScroll",tS),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",tA),t.removeEventListener("DOMMouseScroll",tS),t.removeEventListener("MozMousePixelScroll",e)}},[e_]),(0,en.A)(function(){eb&&eq(function(e){return ty(e)})},[tr.width,eb]);var tT=function(){var e,t;null==(e=ti.current)||e.delayHidden(),null==(t=ta.current)||t.delayHidden()},tO=($=function(){return e2(!0)},I=u.useRef(),D=u.useState(null),z=(H=(0,a.A)(D,2))[0],B=H[1],(0,en.A)(function(){if(z&&z.times<10){if(!eL.current)return void B(function(e){return(0,o.A)({},e)});$();var e=z.targetAlign,t=z.originAlign,n=z.index,r=z.offset,i=eL.current.clientHeight,a=!1,c=e,u=null;if(i){for(var l=e||t,s=0,f=0,d=0,h=Math.min(ej.length-1,n),p=0;p<=h;p+=1){var v=eG(ej[p]);f=s;var m=e9.get(v);s=d=f+(void 0===m?ef:m)}for(var g="top"===l?r:i-r,y=h;y>=0;y-=1){var b=eG(ej[y]),w=e9.get(b);if(void 0===w){a=!0;break}if((g-=w)<=0)break}switch(l){case"top":u=f-r;break;case"bottom":u=d-i+r;break;default:var E=eL.current.scrollTop;f<E?c="top":d>E+i&&(c="bottom")}null!==u&&eU(u),u!==z.lastTop&&(a=!0)}a&&B((0,o.A)((0,o.A)({},z),{},{times:z.times+1,targetAlign:c,lastTop:u}))}},[z,eL.current]),function(e){if(null==e)return void tT();if(J.cancel(I.current),"number"==typeof e)eU(e);else if(e&&"object"===(0,i.A)(e)){var t,n=e.align;t="index"in e?e.index:ej.findIndex(function(t){return eG(t)===e.key});var r=e.offset;B({times:0,index:t,offset:void 0===r?0:r,originAlign:n})}});u.useImperativeHandle(t,function(){return{getScrollInfo:tp,scrollTo:function(e){e&&"object"===(0,i.A)(e)&&("left"in e||"top"in e)?(void 0!==e.left&&eq(ty(e.left)),tO(e.top)):tO(e)}}}),(0,en.A)(function(){eS&&eS(ej.slice(e4,e8+1),ej)},[e4,e8,ej]);var tx=(q=u.useMemo(function(){return[new Map,[]]},[ej,e9.id,ef]),Y=(W=(0,a.A)(q,2))[0],V=W[1],function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=Y.get(e),r=Y.get(t);if(void 0===n||void 0===r)for(var o=ej.length,i=V.length;i<o;i+=1){var a,c=eG(ej[i]);Y.set(c,i);var u=null!=(a=e9.get(c))?a:ef;if(V[i]=(V[i-1]||0)+u,c===e&&(n=i),c===t&&(r=i),void 0!==n&&void 0!==r)break}return{top:V[n-1]||0,bottom:V[r]}}),tC=null==eO?void 0:eO({start:e4,end:e8,virtual:eR,offsetX:eB,offsetY:te,rtl:ek,getSize:tx}),t_=ej.slice(e4,e8+1).map(function(e,t){var n=ev(e,e4+t,{style:{width:eb}}),r=eG(e);return u.createElement(ee,{key:r,setRef:function(t){return e5(e,t)}},n)}),tR=null;Q&&(tR=(0,o.A)((0,c.A)({},void 0===ed||ed?"height":"maxHeight",Q),es),e_&&(tR.overflowY="hidden",eb&&(tR.overflowX="hidden"),eF&&(tR.pointerEvents="none")));var tk={};return ek&&(tk.dir="rtl"),u.createElement("div",(0,r.A)({style:(0,o.A)((0,o.A)({},eh),{},{position:"relative"}),className:eM},tk,eC),u.createElement(F,{onResize:function(e){to({width:e.width||e.offsetWidth,height:e.height||e.offsetHeight})}},u.createElement(void 0===ew?"div":ew,{className:"".concat(G,"-holder"),style:tR,ref:eL,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==eI&&eU(t),null==eE||eE(e),tm()},onMouseEnter:tT},u.createElement(X,{prefixCls:G,height:e7,offsetX:eB,offsetY:te,scrollWidth:eb,onInnerResize:e2,ref:eN,innerProps:eT,rtl:ek,extra:tC},t_))),eR&&e7>Q&&u.createElement(Z,{ref:ti,prefixCls:G,scrollOffset:eI,scrollRange:e7,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tu,containerSize:tr.height,style:null==ex?void 0:ex.verticalScrollBar,thumbStyle:null==ex?void 0:ex.verticalScrollBarThumb}),eR&&eb&&u.createElement(Z,{ref:ta,prefixCls:G,scrollOffset:eB,scrollRange:eb,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tc,containerSize:tr.width,horizontal:!0,style:null==ex?void 0:ex.horizontalScrollBar,thumbStyle:null==ex?void 0:ex.horizontalScrollBarThumb}))});ef.displayName="List";var ed=ef},5098:function(e){var t="u">typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,i){try{return function e(i,a){if(i===a)return!0;if(i&&a&&"object"==typeof i&&"object"==typeof a){var c,u,l,s;if(i.constructor!==a.constructor)return!1;if(Array.isArray(i)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(!e(i[u],a[u]))return!1;return!0}if(n&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;for(s=i.entries();!(u=s.next()).done;)if(!e(u.value[1],a.get(u.value[0])))return!1;return!0}if(r&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(i[u]!==a[u])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof a.valueOf)return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof a.toString)return i.toString()===a.toString();if((c=(l=Object.keys(i)).length)!==Object.keys(a).length)return!1;for(u=c;0!=u--;)if(!Object.prototype.hasOwnProperty.call(a,l[u]))return!1;if(t&&i instanceof Element)return!1;for(u=c;0!=u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!i.$$typeof)&&!e(i[l[u]],a[l[u]]))return!1;return!0}return i!=i&&a!=a}(e,i)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},5195:function(e,t,n){"use strict";n.d(t,{m:function(){return eo}});var r,o,i,a,c=n(7465),u=n.n(c),l=n(3813),s=n.n(l),f=n(5098),d=n.n(f),h=n(9155),p=n.n(h),v=n(1911),m=n.n(v),g="bodyAttributes",y="htmlAttributes",b={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(b).map(function(e){return b[e]});var w="cssText",E="href",A="innerHTML",S="itemprop",T={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},O=Object.keys(T).reduce(function(e,t){return e[T[t]]=t,e},{}),x=[b.NOSCRIPT,b.SCRIPT,b.STYLE],C="data-react-helmet",_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},L=function(e,t){var n={};for(var r in e)!(t.indexOf(r)>=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},N=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},P=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},$=function(e){var t=H(e,b.TITLE),n=H(e,"titleTemplate");if(n&&t)return n.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var r=H(e,"defaultTitle");return t||r||void 0},I=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return M({},e,t)},{})},D=function(e,t,n){var r={};return n.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&Y("Helmet: "+e+' should be of type "Array". Instead found type "'+_(t[e])+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var o={};n.filter(function(e){for(var n=void 0,i=Object.keys(e),a=0;a<i.length;a++){var c=i[a],u=c.toLowerCase();-1!==t.indexOf(u)&&("rel"!==n||"canonical"!==e[n].toLowerCase())&&("rel"!==u||"stylesheet"!==e[u].toLowerCase())&&(n=u),-1!==t.indexOf(c)&&(c===A||c===w||c===S)&&(n=c)}if(!n||!e[n])return!1;var l=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][l]&&(o[n][l]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var i=Object.keys(o),a=0;a<i.length;a++){var c=i[a],u=m()({},r[c],o[c]);r[c]=u}return e},[]).reverse()},H=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},z=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout(function(){z(e)},0)}),B=function(e){return clearTimeout(e)},q="u">typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||z:n.g.requestAnimationFrame||z,W="u">typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||B:n.g.cancelAnimationFrame||B,Y=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},F=null,X=function(e,t){var n=e.baseTag,r=e.bodyAttributes,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.onChangeClientState,l=e.scriptTags,s=e.styleTags,f=e.title,d=e.titleAttributes;G(b.BODY,r),G(b.HTML,o),K(f,d);var h={baseTag:U(b.BASE,n),linkTags:U(b.LINK,i),metaTags:U(b.META,a),noscriptTags:U(b.NOSCRIPT,c),scriptTags:U(b.SCRIPT,l),styleTags:U(b.STYLE,s)},p={},v={};Object.keys(h).forEach(function(e){var t=h[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(v[e]=h[e].oldTags)}),t&&t(),u(e,p,v)},V=function(e){return Array.isArray(e)?e.join(""):e},K=function(e,t){void 0!==e&&document.title!==e&&(document.title=V(e)),G(b.TITLE,t)},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(C),o=r?r.split(","):[],i=[].concat(o),a=Object.keys(t),c=0;c<a.length;c++){var u=a[c],l=t[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),-1===o.indexOf(u)&&o.push(u);var s=i.indexOf(u);-1!==s&&i.splice(s,1)}for(var f=i.length-1;f>=0;f--)n.removeAttribute(i[f]);o.length===i.length?n.removeAttribute(C):n.getAttribute(C)!==a.join(",")&&n.setAttribute(C,a.join(","))}},U=function(e,t){var n=document.head||document.querySelector(b.HEAD),r=n.querySelectorAll(e+"["+C+"]"),o=Array.prototype.slice.call(r),i=[],a=void 0;return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===A)n.innerHTML=t.innerHTML;else if(r===w)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var c=void 0===t[r]?"":t[r];n.setAttribute(r,c)}n.setAttribute(C,"true"),o.some(function(e,t){return a=t,n.isEqualNode(e)})?o.splice(a,1):i.push(n)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return n.appendChild(e)}),{oldTags:o,newTags:i}},J=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},Q=function(e,t,n,r){var o=J(n),i=V(t);return o?"<"+e+" "+C+'="true" '+o+">"+P(i,r)+"</"+e+">":"<"+e+" "+C+'="true">'+P(i,r)+"</"+e+">"},Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[T[n]||n]=e[n],t},t)},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[O[n]||n]=e[n],t},t)},et=function(e,t,n){var r,o=Z(n,((r={key:t})[C]=!0,r));return[p().createElement(b.TITLE,o,t)]},en=function(e,t,n){switch(e){case b.TITLE:return{toComponent:function(){return et(e,t.title,t.titleAttributes,n)},toString:function(){return Q(e,t.title,t.titleAttributes,n)}};case g:case y:return{toComponent:function(){return Z(t)},toString:function(){return J(t)}};default:return{toComponent:function(){return t.map(function(t,n){var r,o=((r={key:n})[C]=!0,r);return Object.keys(t).forEach(function(e){var n=T[e]||e;n===A||n===w?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),p().createElement(e,o)})},toString:function(){return t.reduce(function(t,r){var o=Object.keys(r).filter(function(e){return e!==A&&e!==w}).reduce(function(e,t){var o=void 0===r[t]?t:t+'="'+P(r[t],n)+'"';return e?e+" "+o:o},""),i=r.innerHTML||r.cssText||"",a=-1===x.indexOf(e);return t+"<"+e+" "+C+'="true" '+o+(a?"/>":">"+i+"</"+e+">")},"")}}}},er=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.scriptTags,l=e.styleTags,s=e.title,f=e.titleAttributes;return{base:en(b.BASE,t,r),bodyAttributes:en(g,n,r),htmlAttributes:en(y,o,r),link:en(b.LINK,i,r),meta:en(b.META,a,r),noscript:en(b.NOSCRIPT,c,r),script:en(b.SCRIPT,u,r),style:en(b.STYLE,l,r),title:en(b.TITLE,{title:void 0===s?"":s,titleAttributes:f},r)}},eo=(o=s()(function(e){var t;return{baseTag:(t=[E,"target"],e.filter(function(e){return void 0!==e[b.BASE]}).map(function(e){return e[b.BASE]}).reverse().reduce(function(e,n){if(!e.length)for(var r=Object.keys(n),o=0;o<r.length;o++){var i=r[o].toLowerCase();if(-1!==t.indexOf(i)&&n[i])return e.concat(n)}return e},[])),bodyAttributes:I(g,e),defer:H(e,"defer"),encode:H(e,"encodeSpecialCharacters"),htmlAttributes:I(y,e),linkTags:D(b.LINK,["rel",E],e),metaTags:D(b.META,["name","charset","http-equiv","property",S],e),noscriptTags:D(b.NOSCRIPT,[A],e),onChangeClientState:H(e,"onChangeClientState")||function(){},scriptTags:D(b.SCRIPT,["src",A],e),styleTags:D(b.STYLE,[w],e),title:$(e),titleAttributes:I("titleAttributes",e)}},function(e){F&&W(F),e.defer?F=q(function(){X(e,function(){F=null})}):(X(e),F=null)},er)(function(){return null}),a=i=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case b.SCRIPT:case b.NOSCRIPT:return{innerHTML:t};case b.STYLE:return{cssText:t}}throw Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,o=e.newChildProps,i=e.nestedChildren;return M({},r,((t={})[n.type]=[].concat(r[n.type]||[],[M({},o,this.mapNestedChildrenToProps(n,i))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,i=e.newChildProps,a=e.nestedChildren;switch(r.type){case b.TITLE:return M({},o,((t={})[r.type]=a,t.titleAttributes=M({},i),t));case b.BODY:return M({},o,{bodyAttributes:M({},i)});case b.HTML:return M({},o,{htmlAttributes:M({},i)})}return M({},o,((n={})[r.type]=M({},i),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=M({},t);return Object.keys(e).forEach(function(t){var r;n=M({},n,((r={})[t]=e[t],r))}),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return p().Children.forEach(e,function(e){if(e&&e.props){var o=e.props,i=o.children,a=ee(L(o,["children"]));switch(n.warnOnInvalidChildren(e,i),e.type){case b.LINK:case b.META:case b.NOSCRIPT:case b.SCRIPT:case b.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:a,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:i})}}}),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=M({},L(e,["children"]));return t&&(n=this.mapChildrenToProps(t,n)),p().createElement(o,n)},k(t,null,[{key:"canUseDOM",set:function(e){o.canUseDOM=e}}]),t}(p().Component),i.propTypes={base:u().object,bodyAttributes:u().object,children:u().oneOfType([u().arrayOf(u().node),u().node]),defaultTitle:u().string,defer:u().bool,encodeSpecialCharacters:u().bool,htmlAttributes:u().object,link:u().arrayOf(u().object),meta:u().arrayOf(u().object),noscript:u().arrayOf(u().object),onChangeClientState:u().func,script:u().arrayOf(u().object),style:u().arrayOf(u().object),title:u().string,titleAttributes:u().object,titleTemplate:u().string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var e=o.rewind();return e||(e=er({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);eo.renderStatic=eo.rewind},3813:function(e,t,n){"use strict";var r=n(9155),o=r&&"object"==typeof r&&"default"in r?r.default:r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=!!("u">typeof window&&window.document&&window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw Error("Expected mapStateOnServer to either be undefined or a function.");return function(c){if("function"!=typeof c)throw Error("Expected WrappedComponent to be a React component.");var u,l=[];function s(){u=e(l.map(function(e){return e.props})),f.canUseDOM?t(u):n&&(u=n(u))}var f=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t.peek=function(){return u},t.rewind=function(){if(t.canUseDOM)throw Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,l=[],e};var n=t.prototype;return n.UNSAFE_componentWillMount=function(){l.push(this),s()},n.componentDidUpdate=function(){s()},n.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),s()},n.render=function(){return o.createElement(c,this.props)},t}(r.PureComponent);return i(f,"displayName","SideEffect("+(c.displayName||c.name||"Component")+")"),i(f,"canUseDOM",a),f}}}}]);
|