gz-ui-web 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/gz-ui-web-lib/ValuationLogDataChart-B-SqmKbD.js +4053 -0
  2. package/gz-ui-web-lib/ValuationLogDataChart-DIG1E6i_.cjs +49 -0
  3. package/gz-ui-web-lib/{agGridThemeCssVariables-CerlH-2H.js → agGridThemeCssVariables-BsssdLnP.js} +1 -1
  4. package/gz-ui-web-lib/{agGridThemeCssVariables-CXTSdLd3.cjs → agGridThemeCssVariables-LxqGcBN_.cjs} +1 -1
  5. package/gz-ui-web-lib/business-components/pcs/index.cjs +1 -1
  6. package/gz-ui-web-lib/business-components/pcs/index.js +1 -1
  7. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/IndicativePricingforSelectedContracts.d.ts +3 -2
  8. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/MultipleResultGrid.d.ts +2 -1
  9. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/PricingContextForm.d.ts +3 -2
  10. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/PricingFooter.d.ts +4 -2
  11. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/grid-shared.d.ts +2 -2
  12. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/components/grid-utils.d.ts +2 -2
  13. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/constants.d.ts +34 -0
  14. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/hooks/useIndicativePricingController.d.ts +3 -15
  15. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/index.d.ts +1 -1
  16. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/reducer.d.ts +1 -1
  17. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/types.d.ts +36 -7
  18. package/gz-ui-web-lib/business-components/pcs/indicative-pricing-for-selected-contracts/utils/formatter.d.ts +1 -1
  19. package/gz-ui-web-lib/components/form/Form.d.ts +2 -0
  20. package/gz-ui-web-lib/{goldLightAgGridTokens-DdscbP4x.js → goldLightAgGridTokens-C71rk0pu.js} +1 -1
  21. package/gz-ui-web-lib/{goldLightAgGridTokens-fKRumAcu.cjs → goldLightAgGridTokens-tfYATIrl.cjs} +1 -1
  22. package/gz-ui-web-lib/gz-table/index.cjs +1 -1
  23. package/gz-ui-web-lib/gz-table/index.js +2 -2
  24. package/gz-ui-web-lib/gz-ui-web.css +1 -1
  25. package/gz-ui-web-lib/index.cjs +1 -1
  26. package/gz-ui-web-lib/index.d.ts +1 -1
  27. package/gz-ui-web-lib/index.js +3 -3
  28. package/package.json +1 -1
  29. package/gz-ui-web-lib/ValuationLogDataChart-D7bsKVgw.cjs +0 -49
  30. package/gz-ui-web-lib/ValuationLogDataChart-p81GFhgO.js +0 -3923
@@ -0,0 +1,4053 @@
1
+ import { jsx as F, jsxs as ke } from "react/jsx-runtime";
2
+ import Uu, { forwardRef as ee, createContext as Gt, useRef as te, useContext as Wu, useMemo as Pe, useCallback as ge, useEffect as pe, useState as Oe, useReducer as Ht, useImperativeHandle as Ut, useLayoutEffect as xu } from "react";
3
+ import { Alert as Zu, App as qu, Button as Wt, Empty as Eu, Spin as ju, theme as Xu, Tag as Fu, Tooltip as Zt, DatePicker as Re, Form as Me, ConfigProvider as qt, Select as Cu, Radio as fu } from "antd";
4
+ import Ge from "big.js";
5
+ import { AllEnterpriseModule as jt } from "ag-grid-enterprise";
6
+ import { AgGridProvider as Xt, AgGridReact as Qt } from "ag-grid-react";
7
+ import { themeQuartz as Jt, createPart as Qu } from "ag-grid-community";
8
+ import { g as Kt, a as er } from "./goldLightAgGridTokens-C71rk0pu.js";
9
+ import * as Ju from "echarts/core";
10
+ import { LineChart as ur } from "echarts/charts";
11
+ import { GridComponent as tr, TooltipComponent as rr } from "echarts/components";
12
+ import { CanvasRenderer as nr } from "echarts/renderers";
13
+ function Ku(r) {
14
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
15
+ }
16
+ var We = { exports: {} }, ru = {};
17
+ var ku;
18
+ function or() {
19
+ if (ku) return ru;
20
+ ku = 1;
21
+ var r = Uu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
22
+ return ru.c = function(e) {
23
+ return r.H.useMemoCache(e);
24
+ }, ru;
25
+ }
26
+ var nu = {};
27
+ var wu;
28
+ function ar() {
29
+ return wu || (wu = 1, process.env.NODE_ENV !== "production" && (function() {
30
+ var r = Uu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
31
+ nu.c = function(e) {
32
+ var u = r.H;
33
+ return u === null && console.error(
34
+ `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
35
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
36
+ 2. You might be breaking the Rules of Hooks
37
+ 3. You might have more than one copy of React in the same app
38
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
39
+ ), u.useMemoCache(e);
40
+ };
41
+ })()), nu;
42
+ }
43
+ var Mu;
44
+ function ir() {
45
+ return Mu || (Mu = 1, process.env.NODE_ENV === "production" ? We.exports = or() : We.exports = ar()), We.exports;
46
+ }
47
+ var Y = ir();
48
+ function et(r) {
49
+ var e, u, t = "";
50
+ if (typeof r == "string" || typeof r == "number") t += r;
51
+ else if (typeof r == "object") if (Array.isArray(r)) {
52
+ var n = r.length;
53
+ for (e = 0; e < n; e++) r[e] && (u = et(r[e])) && (t && (t += " "), t += u);
54
+ } else for (u in r) r[u] && (t && (t += " "), t += u);
55
+ return t;
56
+ }
57
+ function gu() {
58
+ for (var r, e, u = 0, t = "", n = arguments.length; u < n; u++) (r = arguments[u]) && (e = et(r)) && (t && (t += " "), t += e);
59
+ return t;
60
+ }
61
+ const ut = ee((r, e) => {
62
+ const u = Y.c(3);
63
+ let t;
64
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Zu, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
65
+ });
66
+ ut.displayName = "GZAlert";
67
+ const lr = Zu.ErrorBoundary, tt = (r) => {
68
+ const e = Y.c(2);
69
+ let u;
70
+ return e[0] !== r ? (u = /* @__PURE__ */ F(lr, { ...r }), e[0] = r, e[1] = u) : u = e[1], u;
71
+ };
72
+ tt.displayName = "GZAlertErrorBoundary";
73
+ const Ye = ut;
74
+ Ye.ErrorBoundary = tt;
75
+ const rt = ee((r, e) => {
76
+ const u = Y.c(3);
77
+ let t;
78
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(qu, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
79
+ });
80
+ rt.displayName = "GZApp";
81
+ const pu = rt;
82
+ Object.assign(pu, qu);
83
+ const Le = ee((r, e) => {
84
+ const u = Y.c(9);
85
+ let t, n, o;
86
+ u[0] !== r ? ({
87
+ children: t,
88
+ type: o,
89
+ ...n
90
+ } = r, u[0] = r, u[1] = t, u[2] = n, u[3] = o) : (t = u[1], n = u[2], o = u[3]);
91
+ const a = o === void 0 ? "default" : o;
92
+ let s;
93
+ return u[4] !== t || u[5] !== e || u[6] !== n || u[7] !== a ? (s = /* @__PURE__ */ F(Wt, { ref: e, type: a, ...n, children: t }), u[4] = t, u[5] = e, u[6] = n, u[7] = a, u[8] = s) : s = u[8], s;
94
+ });
95
+ Le.displayName = "GZButton";
96
+ const nt = (r) => {
97
+ const e = Y.c(2);
98
+ let u;
99
+ return e[0] !== r ? (u = /* @__PURE__ */ F(Eu, { ...r }), e[0] = r, e[1] = u) : u = e[1], u;
100
+ };
101
+ nt.displayName = "GZEmpty";
102
+ const Ve = nt;
103
+ Ve.PRESENTED_IMAGE_DEFAULT = Eu.PRESENTED_IMAGE_DEFAULT;
104
+ Ve.PRESENTED_IMAGE_SIMPLE = Eu.PRESENTED_IMAGE_SIMPLE;
105
+ const ot = (r) => {
106
+ const e = Y.c(2);
107
+ let u;
108
+ return e[0] !== r ? (u = /* @__PURE__ */ F(ju, { ...r }), e[0] = r, e[1] = u) : u = e[1], u;
109
+ };
110
+ ot.displayName = "GZSpin";
111
+ const hu = ot;
112
+ Object.assign(hu, ju);
113
+ const sr = 1e3, lu = 3, ae = "-", vu = {
114
+ pricingEnvironment: null,
115
+ carbonForwardCurve: null,
116
+ discountCurve: null,
117
+ valuationDate: null
118
+ }, _u = {
119
+ pricingEnvironment: "请选择定价环境",
120
+ carbonForwardCurve: "请选择碳金融远期价格曲线",
121
+ discountCurve: "请选择无风险利率曲线",
122
+ valuationDate: "请选择估值日"
123
+ }, su = [{
124
+ key: "instrumentCode",
125
+ label: "成交编号",
126
+ kind: "contract"
127
+ }, {
128
+ key: "scrtyCode",
129
+ label: "标的代码",
130
+ kind: "contract"
131
+ }, {
132
+ key: "fwdMaturityDate",
133
+ label: "远期到期日",
134
+ kind: "contract"
135
+ }, {
136
+ key: "settleDate",
137
+ label: "结算支付日",
138
+ kind: "contract"
139
+ }, {
140
+ key: "physicalDelivery",
141
+ label: "交割方式",
142
+ kind: "contract"
143
+ }, {
144
+ key: "direction",
145
+ label: "买入/卖出",
146
+ kind: "contract"
147
+ }, {
148
+ key: "fwdDlvPrice",
149
+ label: "远期交割价格",
150
+ kind: "contract"
151
+ }, {
152
+ key: "npv",
153
+ label: "净现值NPV(估值日)",
154
+ kind: "result"
155
+ }, {
156
+ key: "forwardPrice",
157
+ label: "远期价格(远期到期日)",
158
+ kind: "result"
159
+ }, {
160
+ key: "discountFactor",
161
+ label: "支付日贴现因子",
162
+ kind: "result"
163
+ }], cr = [{
164
+ key: "instrumentCode",
165
+ label: "成交编号",
166
+ kind: "contract"
167
+ }, {
168
+ key: "scrtyCode",
169
+ label: "标的代码",
170
+ kind: "contract"
171
+ }, {
172
+ key: "direction",
173
+ label: "买入/卖出",
174
+ kind: "contract"
175
+ }, {
176
+ key: "fwdMaturityDate",
177
+ label: "远期到期日",
178
+ kind: "contract"
179
+ }, {
180
+ key: "targtVol",
181
+ label: "买卖数量",
182
+ kind: "contract"
183
+ }, {
184
+ key: "npv",
185
+ label: "净现值NPV(估值日)",
186
+ kind: "result"
187
+ }, {
188
+ key: "forwardPrice",
189
+ label: "远期价格(远期到期日)",
190
+ kind: "result"
191
+ }, {
192
+ key: "discountFactor",
193
+ label: "支付日贴现因子",
194
+ kind: "result"
195
+ }], at = Gt({});
196
+ var dr = {
197
+ // Set Filter
198
+ selectAll: "(全选)",
199
+ selectAllSearchResults: "(全选搜索结果)",
200
+ addCurrentSelectionToFilter: "将当前选择添加到筛选器",
201
+ searchOoo: "搜索...",
202
+ blanks: "(空白)",
203
+ noMatches: "无匹配项",
204
+ typeToSearchOoo: "输入内容进行搜索...",
205
+ // Number Filter & Text Filter
206
+ filterOoo: "过滤...",
207
+ equals: "等于",
208
+ notEqual: "不等于",
209
+ blank: "空白",
210
+ notBlank: "非空",
211
+ empty: "选择一个",
212
+ // Number Filter
213
+ lessThan: "小于",
214
+ greaterThan: "大于",
215
+ lessThanOrEqual: "小于等于",
216
+ greaterThanOrEqual: "大于等于",
217
+ inRange: "介于",
218
+ inRangeStart: "从",
219
+ inRangeEnd: "到",
220
+ // Text Filter
221
+ contains: "包含",
222
+ notContains: "不包含",
223
+ startsWith: "开始于",
224
+ endsWith: "结束于",
225
+ // Date Filter
226
+ dateFormatOoo: "yyyy-mm-dd",
227
+ before: "之前",
228
+ after: "之后",
229
+ yesterday: "昨天",
230
+ today: "今天",
231
+ tomorrow: "明天",
232
+ last7Days: "最近7天",
233
+ lastWeek: "上周",
234
+ thisWeek: "本周",
235
+ nextWeek: "下周",
236
+ last30Days: "最近30天",
237
+ lastMonth: "上个月",
238
+ thisMonth: "这个月",
239
+ nextMonth: "下个月",
240
+ last90Days: "最近90天",
241
+ lastQuarter: "上个季度",
242
+ thisQuarter: "这个季度",
243
+ nextQuarter: "下个季度",
244
+ lastYear: "去年",
245
+ thisYear: "今年",
246
+ yearToDate: "年初至今",
247
+ nextYear: "明年",
248
+ last6Months: "最近6个月",
249
+ last12Months: "最近12个月",
250
+ last24Months: "最近24个月",
251
+ // Filter Conditions
252
+ andCondition: "和",
253
+ orCondition: "或",
254
+ // Filter Buttons
255
+ applyFilter: "应用",
256
+ applyColumnToolPanel: "应用",
257
+ resetFilter: "重置",
258
+ clearFilter: "清除",
259
+ cancelFilter: "取消",
260
+ cancelColumnToolPanel: "取消",
261
+ // Filter Titles
262
+ textFilter: "文本过滤器",
263
+ numberFilter: "数字过滤器",
264
+ dateFilter: "日期过滤器",
265
+ setFilter: "集合过滤器",
266
+ // Group Column Filter
267
+ groupFilterSelect: "选择字段:",
268
+ // New Filter Tool Panel
269
+ filterSummaryInactive: "是(全部)",
270
+ filterSummaryContains: "包含",
271
+ filterSummaryNotContains: "不包含",
272
+ filterSummaryTextEquals: "等于",
273
+ filterSummaryTextNotEqual: "不等于",
274
+ filterSummaryStartsWith: "开始于",
275
+ filterSummaryEndsWith: "结束于",
276
+ filterSummaryBlank: "为空",
277
+ filterSummaryNotBlank: "不为空",
278
+ filterSummaryEquals: "=",
279
+ filterSummaryNotEqual: "!=",
280
+ filterSummaryGreaterThan: ">",
281
+ filterSummaryGreaterThanOrEqual: ">=",
282
+ filterSummaryLessThan: "<",
283
+ filterSummaryLessThanOrEqual: "<=",
284
+ filterSummaryInRange: "介于",
285
+ filterSummaryInRangeValues: "(${variable}, ${variable})",
286
+ filterSummaryTextQuote: ' "${variable}"',
287
+ filterSummaryListInactive: "是(全部)",
288
+ filterSummaryListSeparator: ", ",
289
+ filterSummaryListShort: "是(${variable})",
290
+ filterSummaryListLong: "是(${variable})和${variable}更多",
291
+ addFilterCard: "添加过滤器",
292
+ agTextColumnFilterDisplayName: "简单过滤器",
293
+ agNumberColumnFilterDisplayName: "简单过滤器",
294
+ agDateColumnFilterDisplayName: "简单过滤器",
295
+ agSetColumnFilterDisplayName: "选择过滤器",
296
+ agMultiColumnFilterDisplayName: "组合过滤器",
297
+ addFilterPlaceholder: "搜索列...",
298
+ // Advanced Filter
299
+ advancedFilterContains: "包含",
300
+ advancedFilterNotContains: "不包含",
301
+ advancedFilterTextEquals: "等于",
302
+ advancedFilterTextNotEqual: "不等于",
303
+ advancedFilterStartsWith: "开始于",
304
+ advancedFilterEndsWith: "结束于",
305
+ advancedFilterBlank: "为空",
306
+ advancedFilterNotBlank: "不为空",
307
+ advancedFilterEquals: "=",
308
+ advancedFilterNotEqual: "!=",
309
+ advancedFilterGreaterThan: ">",
310
+ advancedFilterGreaterThanOrEqual: ">=",
311
+ advancedFilterLessThan: "<",
312
+ advancedFilterLessThanOrEqual: "<=",
313
+ advancedFilterTrue: "为真",
314
+ advancedFilterFalse: "为假",
315
+ advancedFilterAnd: "且",
316
+ advancedFilterOr: "或",
317
+ advancedFilterApply: "应用",
318
+ advancedFilterReset: "重置",
319
+ advancedFilterCancel: "取消",
320
+ advancedFilterClear: "清除",
321
+ advancedFilterBuilder: "构建器",
322
+ advancedFilterValidationMissingColumn: "缺少列",
323
+ advancedFilterValidationMissingOption: "缺少选项",
324
+ advancedFilterValidationMissingValue: "缺少值",
325
+ advancedFilterValidationInvalidColumn: "找不到列",
326
+ advancedFilterValidationInvalidOption: "找不到选项",
327
+ advancedFilterValidationMissingQuote: "值缺少结束引号",
328
+ advancedFilterValidationNotANumber: "值不是一个数字",
329
+ advancedFilterValidationInvalidDate: "值不是一个有效日期",
330
+ advancedFilterValidationMissingCondition: "缺少条件",
331
+ advancedFilterValidationJoinOperatorMismatch: "一个条件内的连接操作符必须相同",
332
+ advancedFilterValidationInvalidJoinOperator: "找不到连接操作符",
333
+ advancedFilterValidationMissingEndBracket: "缺少结束括号",
334
+ advancedFilterValidationExtraEndBracket: "结束括号过多",
335
+ advancedFilterValidationMessage: "表达式有错误。${variable} - ${variable}。",
336
+ advancedFilterValidationMessageAtEnd: "表达式有错误。表达式末尾的${variable}。",
337
+ advancedFilterBuilderTitle: "高级筛选",
338
+ advancedFilterBuilderApply: "应用",
339
+ advancedFilterBuilderClear: "清除",
340
+ advancedFilterBuilderReset: "重置",
341
+ advancedFilterBuilderCancel: "取消",
342
+ advancedFilterBuilderAddButtonTooltip: "添加筛选或组",
343
+ advancedFilterBuilderRemoveButtonTooltip: "移除",
344
+ advancedFilterBuilderMoveUpButtonTooltip: "上移",
345
+ advancedFilterBuilderMoveDownButtonTooltip: "下移",
346
+ advancedFilterBuilderAddJoin: "添加组",
347
+ advancedFilterBuilderAddCondition: "添加筛选",
348
+ advancedFilterBuilderSelectColumn: "选择一个列",
349
+ advancedFilterBuilderSelectOption: "选择一个选项",
350
+ advancedFilterBuilderEnterValue: "输入一个值...",
351
+ advancedFilterBuilderValidationAlreadyApplied: "当前筛选已应用。",
352
+ advancedFilterBuilderValidationIncomplete: "并非所有条件都已完成。",
353
+ advancedFilterBuilderValidationSelectColumn: "必须选择一个列。",
354
+ advancedFilterBuilderValidationSelectOption: "必须选择一个选项。",
355
+ advancedFilterBuilderValidationEnterValue: "必须输入一个值。",
356
+ // Editor Validation Errors
357
+ minDateValidation: "日期必须在 ${variable} 之后",
358
+ maxDateValidation: "日期必须在 ${variable} 之前",
359
+ maxLengthValidation: "必须少于或等于 ${variable} 个字符",
360
+ minValueValidation: "必须大于或等于 ${variable}",
361
+ maxValueValidation: "必须小于或等于${variable}",
362
+ strictMinValueValidation: "必须大于${variable}",
363
+ strictMaxValueValidation: "必须小于${variable}",
364
+ invalidSelectionValidation: "无效的选择",
365
+ // Formulas
366
+ invalidFormulaValidation: "无效公式。",
367
+ formulaParseInvalidCellReference: "无效的单元格引用:${variable}。",
368
+ formulaParseInvalidRangeEndReference: "无效的范围结束引用。",
369
+ formulaParseUnterminatedString: "未终止的字符串。",
370
+ formulaParseUnexpectedCharacter: "意外字符:${variable}。",
371
+ formulaParseOperatorStackUnderflow: "运算符栈下溢。",
372
+ formulaParseMissingOperand: "缺少 '${variable}' 的操作数。",
373
+ formulaParseInternalUnexpectedFrameDuringReduction: "内部错误:归约期间出现意外帧。",
374
+ formulaParseInternalUnexpectedFrameBeforeOpenParen: "内部错误:'(' 前出现意外帧。",
375
+ formulaParseMisplacedComma: "逗号位置错误。",
376
+ formulaParseCommaOutsideFunctionCall: "函数调用外出现逗号。",
377
+ formulaParseInternalUnexpectedFrameBeforeCloseParen: "内部错误:')' 前出现意外帧。",
378
+ formulaParseMismatchedParentheses: "括号不匹配。",
379
+ formulaParseUnsupportedOperand: "不支持的操作数:${variable}。",
380
+ formulaParseMismatchedParenthesesOrUnfinishedFunctionCall: "括号不匹配或函数调用未完成。",
381
+ formulaParseInvalidExpression: "无效表达式。",
382
+ formulaParseFormulasMustBeginWithEquals: "公式必须以 = 开头。",
383
+ formulaSerializeStringContainsQuote: '字符串包含引号 ("),分词器不支持。',
384
+ formulaSerializeCannotProduceAbsoluteColumnLabelFromId: "无法从 ID '${variable}' 生成绝对列标签。",
385
+ formulaSerializeCannotProduceAbsoluteRowIndexFromId: "无法从 ID '${variable}' 生成绝对行索引。",
386
+ formulaSerializeCannotProduceRowIndexFromId: "无法从 ID '${variable}' 生成行索引。",
387
+ formulaSerializeCannotMapColumnIdToA1Label: "无法将列 ID '${variable}' 映射为 A1 标签。",
388
+ formulaSerializeCannotParseAbsoluteRowIndex: "无法解析绝对行索引 '${variable}'。",
389
+ formulaSerializeCannotMapRowIdToA1Index: "无法将行 ID '${variable}' 映射为 A1 索引。",
390
+ formulaEvalRangeNotAllowedInScalarContext: "标量上下文中不允许范围。",
391
+ formulaEvalUnknownReferenceToCell: "未知的单元格引用。",
392
+ formulaEvalUnsupportedOperation: "不支持的操作:${variable}。",
393
+ formulaEvalInvalidAbsoluteRow: "无效的绝对行。",
394
+ formulaEvalUnrecognisedRowId: "无法识别的行 ID。",
395
+ formulaEvalInvalidAbsoluteColumn: "无效的绝对列。",
396
+ formulaEvalUnrecognisedColumnId: "无法识别的列 ID。",
397
+ formulaEvalUnrecognisedRowInRange: "范围中存在无法识别的行。",
398
+ formulaEvalUnrecognisedReferenceToCell: "无法识别的单元格引用。",
399
+ formulaEvalIncompleteRangeReference: "不完整的范围引用。",
400
+ formulaFunctionExpectedExactlyArguments: "${variable}: 需要恰好 ${variable} 个参数。",
401
+ formulaFunctionExpectedAtMostArguments: "${variable}: 最多需要 ${variable} 个参数。",
402
+ formulaFunctionExpectedAtLeastArguments: "${variable}: 至少需要 ${variable} 个参数。",
403
+ formulaFunctionInvalidCriteriaWildcardsWithComparator: "无效条件:比较运算符不能与通配符同时使用。",
404
+ formulaFunctionNonNumericArgument: "${variable}: 参数必须为数值。",
405
+ formulaFunctionDivisionByZero: "${variable}: 除数不能为 0。",
406
+ formulaFunctionCannotCombineDatesWithBigInt: "${variable}: 不能将日期与 BigInt 混合。",
407
+ formulaFunctionRequiresAtLeastOneNumericValue: "${variable}: 至少需要一个数值。",
408
+ formulaFunctionRequiresAtLeastOneValue: "${variable}: 至少需要一个值。",
409
+ formulaFunctionAllValuesMustBeNumbers: "${variable}: 所有值都必须是数字。",
410
+ formulaFunctionArgumentMustBeRange: "${variable}: 第 ${variable} 个参数必须是范围。",
411
+ formulaFunctionArgumentMustBeValue: "${variable}: 第 ${variable} 个参数必须是值。",
412
+ formulaFunctionRangesHaveDifferentSizes: "${variable}: 范围大小不一致。",
413
+ formulaFunctionValuesMustBeNumeric: "${variable}: 值必须为数值。",
414
+ formulaFunctionValuesMustBeIntegers: "${variable}: 值必须为整数。",
415
+ formulaFunctionUnsupportedValueType: "${variable}: 不支持的值类型。",
416
+ formulaFunctionDivNonNumericArgument: "DIV:参数必须为数值。",
417
+ formulaFunctionDivDivisionByZero: "DIV:除数不能为 0。",
418
+ formulaFunctionSumCannotCombineDatesWithBigInt: "SUM:不能将日期与 BigInt 混合。",
419
+ formulaFunctionSumRequiresAtLeastOneNumericValue: "SUM:至少需要一个数值。",
420
+ formulaFunctionAvgRequiresAtLeastOneValue: "AVG:至少需要一个值。",
421
+ formulaFunctionMedianAllValuesMustBeNumbers: "MEDIAN:所有值都必须是数字。",
422
+ formulaFunctionMedianRequiresAtLeastOneValue: "MEDIAN:至少需要一个值。",
423
+ formulaFunctionSumifFirstArgumentMustBeRange: "SUMIF:第一个参数必须是范围。",
424
+ formulaFunctionSumifSecondArgumentMustBeValue: "SUMIF:第二个参数必须是值(criteria)。",
425
+ formulaFunctionSumifThirdArgumentMustBeRange: "SUMIF:第三个参数必须是范围(sum_range)。",
426
+ formulaFunctionSumifRangesHaveDifferentSizes: "SUMIF:范围大小不一致。",
427
+ formulaFunctionCountifFirstArgumentMustBeRange: "COUNTIF:第一个参数必须是范围。",
428
+ formulaFunctionCountifSecondArgumentMustBeValue: "COUNTIF:第二个参数必须是值(criteria)。",
429
+ formulaFunctionConcatUnsupportedValueType: "CONCAT:不支持的值类型。",
430
+ formulaFunctionMinRequiresAtLeastOneValue: "MIN:至少需要一个值。",
431
+ formulaFunctionMaxRequiresAtLeastOneValue: "MAX:至少需要一个值。",
432
+ formulaFunctionPercentNonNumericArgument: "PERCENT:参数必须为数值。",
433
+ formulaFunctionPowerNonNumericArgument: "POWER:参数必须为数值。",
434
+ formulaServiceCircularReference: "循环引用。",
435
+ formulaServiceExpectedParsableFormula: "期望可解析的公式。",
436
+ formulaServiceInternalSchedulingError: "内部调度错误。",
437
+ tooltipValidationErrorSeparator: "。",
438
+ // Side Bar
439
+ columns: "列",
440
+ filters: "过滤器",
441
+ // columns tool panel
442
+ pivotMode: "透视模式",
443
+ groups: "行组",
444
+ rowGroupColumnsEmptyMessage: "拖动到此处设置行组",
445
+ values: "值",
446
+ valueColumnsEmptyMessage: "拖动到此处聚合",
447
+ pivots: "列标签",
448
+ pivotColumnsEmptyMessage: "拖动到此处设置列标签",
449
+ // Header of the Default Group Column
450
+ group: "组",
451
+ // Row Drag
452
+ rowDragRow: "行",
453
+ rowDragRows: "行",
454
+ // Other
455
+ loadingOoo: "加载中...",
456
+ loadingError: "错误",
457
+ noRowsToShow: "无显示行",
458
+ noMatchingRows: "无匹配行",
459
+ exportingOoo: "正在导出...",
460
+ fileInputOverlay: "拖放文件以导入数据",
461
+ fileInputOverlayBrowse: "浏览文件",
462
+ fileInputProcessing: "正在处理 ${variable}",
463
+ fileInputProcessingFailed: "处理 ${variable} 时出错",
464
+ enabled: "启用",
465
+ // Menu
466
+ pinColumn: "固定列",
467
+ pinLeft: "固定在左侧",
468
+ pinRight: "固定在右侧",
469
+ noPin: "取消固定",
470
+ pinRow: "锁定行",
471
+ pinTop: "固定到顶部",
472
+ pinBottom: "固定到底部",
473
+ unpinRow: "取消锁定行",
474
+ valueAggregation: "值汇总",
475
+ noAggregation: "无",
476
+ showValuesAs: "值显示方式",
477
+ showValuesAsNone: "无",
478
+ percentOfGrandTotal: "占总计的百分比",
479
+ percentOfColumnTotal: "占列总计的百分比",
480
+ percentOfRowTotal: "占行总计的百分比",
481
+ percentOfParentRowTotal: "占父行总计的百分比",
482
+ percentOfParentColumnTotal: "占父列总计的百分比",
483
+ percentOfGrandTotalDescription: "每个值占该列总计的百分比。",
484
+ percentOfColumnTotalDescription: "每个值占其列总计的百分比——每列合计为 100%。",
485
+ percentOfRowTotalDescription: "每个值占透视列中该行总计的百分比。",
486
+ percentOfParentRowTotalDescription: "每个值占其父分组的百分比。",
487
+ percentOfParentColumnTotalDescription: "每个值占其父透视列的百分比。",
488
+ autosizeThisColumn: "自动调整该列",
489
+ autosizeAllColumns: "自动调整所有列",
490
+ groupBy: "按${variable}分组",
491
+ ungroupBy: "取消按${variable}分组",
492
+ ungroupAll: "取消全部分组",
493
+ addToValues: "将${variable}添加到值",
494
+ removeFromValues: "将${variable}从值中移除",
495
+ addToLabels: "将${variable}添加到标签",
496
+ removeFromLabels: "将${variable}从标签中移除",
497
+ resetColumns: "重置列",
498
+ expandAll: "展开所有行组",
499
+ collapseAll: "关闭所有行组",
500
+ copy: "复制",
501
+ ctrlC: "Ctrl+C",
502
+ ctrlX: "Ctrl+X",
503
+ copyWithHeaders: "复制包含标题",
504
+ copyWithGroupHeaders: "复制包含组标题",
505
+ cut: "剪切",
506
+ paste: "粘贴",
507
+ ctrlV: "Ctrl+V",
508
+ export: "导出",
509
+ csvExport: "导出为CSV",
510
+ excelExport: "导出为Excel",
511
+ columnFilter: "列过滤",
512
+ columnChooser: "选择列",
513
+ chooseColumns: "选择列",
514
+ sortAscending: "升序排列",
515
+ sortDescending: "降序排列",
516
+ sortAbsoluteAscending: "绝对升序排序",
517
+ sortAbsoluteDescending: "绝对降序排序",
518
+ sortUnSort: "清除排序",
519
+ shiftF2: "Shift+F2",
520
+ toolbarFind: "查找",
521
+ toolbarFindPreviousMatch: "上一个匹配",
522
+ toolbarFindNextMatch: "下一个匹配",
523
+ toolbarQuickFilter: "筛选",
524
+ toolbarMenu: "菜单",
525
+ // Enterprise Menu Aggregation and Status Bar
526
+ sum: "总和",
527
+ first: "第一个",
528
+ last: "最后一个",
529
+ min: "最小值",
530
+ max: "最大值",
531
+ none: "无",
532
+ count: "计数",
533
+ avg: "平均",
534
+ filteredRows: "已筛选",
535
+ selectedRows: "已选中",
536
+ totalRows: "总行数",
537
+ totalAndFilteredRows: "行",
538
+ more: "更多",
539
+ to: "至",
540
+ of: "的",
541
+ page: "页",
542
+ pageLastRowUnknown: "?",
543
+ nextPage: "下一页",
544
+ lastPage: "最后一页",
545
+ firstPage: "第一页",
546
+ previousPage: "上一页",
547
+ pageSizeSelectorLabel: "每页大小:",
548
+ footerTotal: "合计",
549
+ statusBarLastRowUnknown: "?",
550
+ scrollColumnIntoView: "滚动${variable}到视图内",
551
+ // Pivoting
552
+ pivotColumnGroupTotals: "总计",
553
+ // Enterprise Menu (Charts)
554
+ pivotChartAndPivotMode: "数据透视图和数据透视模式",
555
+ pivotChart: "数据透视图",
556
+ chartRange: "图表范围",
557
+ columnChart: "柱状图",
558
+ groupedColumn: "分组",
559
+ stackedColumn: "堆积",
560
+ normalizedColumn: "100% 堆积",
561
+ barChart: "条形图",
562
+ groupedBar: "分组",
563
+ stackedBar: "堆积",
564
+ normalizedBar: "100% 堆积",
565
+ pieChart: "饼图",
566
+ pie: "饼图",
567
+ donut: "环形图",
568
+ lineChart: "折线图",
569
+ stackedLine: "堆叠",
570
+ normalizedLine: "100% 堆叠",
571
+ xyChart: "X Y (散点图)",
572
+ scatter: "散点图",
573
+ bubble: "气泡图",
574
+ areaChart: "面积图",
575
+ area: "面积",
576
+ stackedArea: "堆积",
577
+ normalizedArea: "100% 堆积",
578
+ histogramChart: "直方图",
579
+ polarChart: "极地图",
580
+ radarLine: "雷达线",
581
+ radarArea: "雷达面积",
582
+ nightingale: "夜莺图",
583
+ radialColumn: "径向柱状图",
584
+ radialBar: "径向条形图",
585
+ statisticalChart: "统计图",
586
+ boxPlot: "箱线图",
587
+ rangeBar: "区间条形图",
588
+ rangeArea: "区间面积图",
589
+ hierarchicalChart: "层次图",
590
+ treemap: "树图",
591
+ sunburst: "旭日图",
592
+ specializedChart: "专项图",
593
+ waterfall: "瀑布图",
594
+ heatmap: "热力图",
595
+ combinationChart: "组合图",
596
+ columnLineCombo: "柱状图和折线图组合",
597
+ AreaColumnCombo: "面积图和柱状图组合",
598
+ // Charts
599
+ pivotChartTitle: "数据透视图",
600
+ rangeChartTitle: "范围图",
601
+ settings: "图表",
602
+ data: "设置",
603
+ format: "自定义",
604
+ categories: "类别",
605
+ defaultCategory: "(无)",
606
+ series: "系列",
607
+ switchCategorySeries: "切换类别 / 系列",
608
+ categoryValues: "类别值",
609
+ seriesLabels: "系列标签",
610
+ aggregate: "汇总",
611
+ xyValues: "XY 值",
612
+ paired: "配对模式",
613
+ axis: "轴",
614
+ xAxis: "水平轴",
615
+ yAxis: "垂直轴",
616
+ polarAxis: "极坐标轴",
617
+ radiusAxis: "半径轴",
618
+ navigator: "导航器",
619
+ zoom: "缩放",
620
+ animation: "动画",
621
+ crosshair: "准星",
622
+ color: "颜色",
623
+ thickness: "厚度",
624
+ preferredLength: "首选长度",
625
+ xType: "X 类型",
626
+ axisType: "轴类型",
627
+ automatic: "自动",
628
+ category: "类别",
629
+ number: "数值",
630
+ time: "时间",
631
+ timeFormat: "时间格式",
632
+ autoRotate: "自动旋转",
633
+ labelRotation: "旋转",
634
+ circle: "圆形",
635
+ polygon: "多边形",
636
+ square: "方形",
637
+ cross: "十字符",
638
+ diamond: "菱形",
639
+ plus: "加号",
640
+ triangle: "三角形",
641
+ heart: "爱心",
642
+ orientation: "方向",
643
+ fixed: "固定",
644
+ parallel: "平行",
645
+ perpendicular: "垂直",
646
+ radiusAxisPosition: "位置",
647
+ ticks: "刻度",
648
+ gridLines: "网格线",
649
+ width: "宽度",
650
+ height: "高度",
651
+ length: "长度",
652
+ padding: "内边距",
653
+ spacing: "间距",
654
+ chartStyle: "图表样式",
655
+ title: "标题",
656
+ chartTitles: "标题",
657
+ chartTitle: "图表标题",
658
+ chartSubtitle: "副标题",
659
+ horizontalAxisTitle: "水平轴标题",
660
+ verticalAxisTitle: "垂直轴标题",
661
+ polarAxisTitle: "极坐标轴标题",
662
+ titlePlaceholder: "图表标题",
663
+ background: "背景",
664
+ font: "字体",
665
+ weight: "粗细",
666
+ top: "顶部",
667
+ right: "右边",
668
+ bottom: "底部",
669
+ left: "左边",
670
+ labels: "标签",
671
+ calloutLabels: "标注标签",
672
+ sectorLabels: "扇区标签",
673
+ positionRatio: "位置比例",
674
+ size: "大小",
675
+ shape: "形状",
676
+ minSize: "最小大小",
677
+ maxSize: "最大大小",
678
+ legend: "图例",
679
+ position: "位置",
680
+ markerSize: "标记大小",
681
+ markerStroke: "标记描边",
682
+ markerPadding: "标记内边距",
683
+ itemSpacing: "项目间距",
684
+ itemPaddingX: "项目内边距 X",
685
+ itemPaddingY: "项目内边距 Y",
686
+ layoutHorizontalSpacing: "横向间距",
687
+ layoutVerticalSpacing: "纵向间距",
688
+ strokeWidth: "描边宽度",
689
+ offset: "偏移",
690
+ offsets: "偏移",
691
+ tooltips: "工具提示",
692
+ callout: "标注",
693
+ markers: "标记",
694
+ shadow: "阴影",
695
+ blur: "模糊",
696
+ xOffset: "X 偏移",
697
+ yOffset: "Y 偏移",
698
+ lineWidth: "线宽",
699
+ lineDash: "线条虚线",
700
+ lineDashOffset: "虚线偏移",
701
+ scrollingZoom: "滚动",
702
+ scrollingStep: "滚动步骤",
703
+ selectingZoom: "选择",
704
+ durationMillis: "持续时间 (毫秒)",
705
+ crosshairLabel: "标签",
706
+ crosshairSnap: "对节点对齐",
707
+ normal: "常规",
708
+ bold: "加粗",
709
+ italic: "斜体",
710
+ boldItalic: "加粗斜体",
711
+ predefined: "预定义",
712
+ fillOpacity: "填充不透明度",
713
+ strokeColor: "线条颜色",
714
+ strokeOpacity: "线条不透明度",
715
+ miniChart: "迷你图表",
716
+ histogramBinCount: "箱数",
717
+ connectorLine: "连接线",
718
+ seriesItems: "系列项目",
719
+ seriesItemType: "项目类型",
720
+ seriesItemPositive: "正面",
721
+ seriesItemNegative: "负面",
722
+ seriesItemLabels: "项目标签",
723
+ columnGroup: "柱形图",
724
+ barGroup: "条形图",
725
+ pieGroup: "饼图",
726
+ lineGroup: "折线图",
727
+ scatterGroup: "散点图",
728
+ areaGroup: "面积图",
729
+ polarGroup: "极坐标图",
730
+ statisticalGroup: "统计图",
731
+ hierarchicalGroup: "层次图",
732
+ specializedGroup: "专用图",
733
+ combinationGroup: "组合图",
734
+ groupedColumnTooltip: "分组",
735
+ stackedColumnTooltip: "堆积",
736
+ normalizedColumnTooltip: "100% 堆积",
737
+ groupedBarTooltip: "分组",
738
+ stackedBarTooltip: "堆积",
739
+ normalizedBarTooltip: "100% 堆积",
740
+ pieTooltip: "饼图",
741
+ donutTooltip: "环形图",
742
+ lineTooltip: "折线图",
743
+ stackedLineTooltip: "堆叠",
744
+ normalizedLineTooltip: "百分比堆叠",
745
+ groupedAreaTooltip: "面积图",
746
+ stackedAreaTooltip: "堆积",
747
+ normalizedAreaTooltip: "100% 堆积",
748
+ scatterTooltip: "散点图",
749
+ bubbleTooltip: "气泡图",
750
+ histogramTooltip: "直方图",
751
+ radialColumnTooltip: "径向柱图",
752
+ radialBarTooltip: "径向条图",
753
+ radarLineTooltip: "雷达线图",
754
+ radarAreaTooltip: "雷达面积图",
755
+ nightingaleTooltip: "玫瑰图",
756
+ rangeBarTooltip: "范围条图",
757
+ rangeAreaTooltip: "范围面积图",
758
+ boxPlotTooltip: "箱线图",
759
+ treemapTooltip: "树状图",
760
+ sunburstTooltip: "旭日图",
761
+ waterfallTooltip: "瀑布图",
762
+ heatmapTooltip: "热力图",
763
+ columnLineComboTooltip: "柱图与折线图",
764
+ areaColumnComboTooltip: "面积图与柱图",
765
+ customComboTooltip: "自定义组合",
766
+ innerRadius: "内半径",
767
+ startAngle: "起始角度",
768
+ endAngle: "终止角度",
769
+ reverseDirection: "反向",
770
+ groupPadding: "组间距",
771
+ seriesPadding: "系列间距",
772
+ tile: "瓦片",
773
+ whisker: "须",
774
+ cap: "顶部",
775
+ capLengthRatio: "顶部长度比",
776
+ labelPlacement: "标签位置",
777
+ inside: "内部",
778
+ outside: "外部",
779
+ noDataToChart: "无可绘制的数据。",
780
+ pivotChartRequiresPivotMode: "数据透视图需要启用数据透视模式。",
781
+ chartSettingsToolbarTooltip: "菜单",
782
+ chartLinkToolbarTooltip: "链接到网格",
783
+ chartUnlinkToolbarTooltip: "从网格中取消链接",
784
+ chartDownloadToolbarTooltip: "下载图表",
785
+ chartMenuToolbarTooltip: "菜单",
786
+ chartEdit: "编辑图表",
787
+ chartAdvancedSettings: "高级设置",
788
+ chartLink: "链接到网格",
789
+ chartUnlink: "从网格中取消链接",
790
+ chartDownload: "下载图表",
791
+ histogramFrequency: "频率",
792
+ seriesChartType: "系列图表类型",
793
+ seriesType: "系列类型",
794
+ secondaryAxis: "次轴",
795
+ seriesAdd: "添加系列",
796
+ categoryAdd: "添加类别",
797
+ bar: "条形图",
798
+ column: "柱形图",
799
+ histogram: "直方图",
800
+ advancedSettings: "高级设置",
801
+ direction: "方向",
802
+ horizontal: "水平",
803
+ vertical: "垂直",
804
+ seriesGroupType: "分组类型",
805
+ groupedSeriesGroupType: "分组",
806
+ stackedSeriesGroupType: "堆积",
807
+ normalizedSeriesGroupType: "100% 堆积",
808
+ legendEnabled: "启用",
809
+ invalidColor: "无效的颜色值",
810
+ groupedColumnFull: "分组柱形图",
811
+ stackedColumnFull: "堆积柱形图",
812
+ normalizedColumnFull: "100% 堆积柱形图",
813
+ groupedBarFull: "分组条形图",
814
+ stackedBarFull: "堆积条形图",
815
+ normalizedBarFull: "100% 堆积条形图",
816
+ stackedAreaFull: "堆积面积图",
817
+ normalizedAreaFull: "100% 堆积面积图",
818
+ customCombo: "自定义组合",
819
+ funnel: "漏斗",
820
+ coneFunnel: "圆锥漏斗",
821
+ pyramid: "金字塔",
822
+ funnelGroup: "漏斗",
823
+ funnelTooltip: "漏斗",
824
+ coneFunnelTooltip: "圆锥漏斗",
825
+ pyramidTooltip: "金字塔",
826
+ dropOff: "流失",
827
+ stageLabels: "阶段标签",
828
+ reverse: "反向",
829
+ tooltipMode: "工具提示模式",
830
+ tooltipModeSingle: "单个",
831
+ tooltipModeShared: "多个",
832
+ tooltipModeCompact: "紧凑",
833
+ // ARIA
834
+ ariaAdvancedFilterBuilderItem: "${variable}. 级别 ${variable}. 按 ENTER 进行编辑。",
835
+ ariaAdvancedFilterBuilderItemValidation: "${variable}. 级别 ${variable}. ${variable} 按 ENTER 进行编辑。",
836
+ ariaAdvancedFilterBuilderList: "高级过滤器构建器列表",
837
+ ariaAdvancedFilterBuilderFilterItem: "过滤条件",
838
+ ariaAdvancedFilterBuilderGroupItem: "过滤组",
839
+ ariaAdvancedFilterBuilderColumn: "列",
840
+ ariaAdvancedFilterBuilderOption: "选项",
841
+ ariaAdvancedFilterBuilderValueP: "值",
842
+ ariaAdvancedFilterBuilderJoinOperator: "连接运算符",
843
+ ariaAdvancedFilterInput: "高级过滤器输入",
844
+ ariaChecked: "已选中",
845
+ ariaColumn: "列",
846
+ ariaColumnGroup: "列组",
847
+ ariaFilterActive: "筛选已激活",
848
+ ariaColumnFiltered: "列已过滤",
849
+ ariaCalculatedColumn: "计算列",
850
+ ariaColumnShowValuesAs: "正在以此方式显示值",
851
+ ariaColumnSelectAll: "切换所有列的可见性",
852
+ ariaDateFilterInput: "日期过滤器输入",
853
+ ariaDefaultListName: "列表",
854
+ ariaFilterColumnsInput: "过滤列输入",
855
+ ariaFilterFromValue: "过滤从值",
856
+ ariaFilterInput: "过滤器输入",
857
+ ariaFilterList: "过滤器列表",
858
+ ariaFilterToValue: "过滤至值",
859
+ ariaFilterValue: "过滤值",
860
+ ariaFilterMenuOpen: "打开过滤器菜单",
861
+ ariaFilteringOperator: "过滤运算符",
862
+ ariaHidden: "隐藏",
863
+ ariaIndeterminate: "不确定",
864
+ ariaInputEditor: "输入编辑器",
865
+ ariaMenuColumn: "按 ALT 向下 打开列菜单",
866
+ ariaFilterColumn: "按 CTRL ENTER 打开过滤器",
867
+ ariaRowDeselect: "按 SPACE 取消选择此行",
868
+ ariaHeaderSelection: "具有标题选择的列",
869
+ ariaSelectAllCells: "按空格键或回车键选择所有单元格",
870
+ ariaSelectAllRowCells: "按 Enter 键选择此行中的所有单元格",
871
+ ariaColumnCellSelection: "按 Enter 键切换此列中所有可见单元格的选择",
872
+ ariaColumnGroupCellSelection: "按 Enter 键切换此列组中所有可见单元格的选择",
873
+ ariaColumnGroupExpansion: "按 ENTER 键展开或折叠此列组",
874
+ ariaColumnGroupCellSelectionAndExpansion: "按 Enter 键切换此列组中所有可见单元格的选择. 按 ALT ENTER 键展开或折叠此列组",
875
+ ariaRowSelectAll: "按 Space 切换所有行选择",
876
+ ariaRowToggleSelection: "按 Space 切换行选择",
877
+ ariaRowSelect: "按 SPACE 选择此行",
878
+ ariaRowSelectionDisabled: "此行的行选择功能被禁用",
879
+ ariaSearch: "搜索",
880
+ ariaSortableColumn: "按 ENTER 排序",
881
+ ariaSortableColumnWithCellSelection: "按 ALT ENTER 排序",
882
+ ariaToggleVisibility: "按 Space 切换可见性",
883
+ ariaToggleCellValue: "按 Space 切换单元格值",
884
+ ariaUnchecked: "未选中",
885
+ ariaVisible: "可见",
886
+ ariaSearchFilterValues: "搜索过滤值",
887
+ ariaPageSizeSelectorLabel: "页面大小",
888
+ ariaChartMenuClose: "关闭图表编辑菜单",
889
+ ariaChartSelected: "已选择",
890
+ ariaSparklineChartDescription: "迷你图 - ${chartType} 显示 ${count} 个值,范围在 ${min} 到 ${max} 之间。起始于 ${start},结束于 ${end}。",
891
+ ariaSparklineChartDescriptionSingleValue: "迷你图 - ${chartType} 显示 1 个值:${value}。",
892
+ ariaSparklineChartDescriptionEmpty: "迷你图 - ${chartType},无值。",
893
+ ariaSkeletonCellLoadingFailed: "行加载失败",
894
+ ariaSkeletonCellLoading: "行数据加载中",
895
+ ariaDeferSkeletonCellLoading: "单元格正在加载",
896
+ // ARIA for Batch Edit
897
+ ariaPendingChange: "待处理的变更",
898
+ // ARIA Labels for Drop Zones
899
+ ariaRowGroupDropZonePanelLabel: "行分组",
900
+ ariaValuesDropZonePanelLabel: "值",
901
+ ariaPivotDropZonePanelLabel: "列标签",
902
+ ariaDropZoneColumnComponentDescription: "按 DELETE 键移除",
903
+ ariaDropZoneColumnValueItemDescription: "按 ENTER 键更改聚合类型",
904
+ ariaDropZoneColumnGroupItemDescription: "按 ENTER 键排序",
905
+ // used for aggregate drop zone, format: {aggregation}{ariaDropZoneColumnComponentAggFuncSeparator}{column name}
906
+ ariaDropZoneColumnComponentAggFuncSeparator: " 的 ",
907
+ ariaDropZoneColumnComponentSortAscending: "升序",
908
+ ariaDropZoneColumnComponentSortDescending: "降序",
909
+ ariaDropZoneColumnComponentSortAbsoluteAscending: "绝对升序",
910
+ ariaDropZoneColumnComponentSortAbsoluteDescending: "绝对降序",
911
+ ariaLabelDialog: "对话框",
912
+ ariaLabelColumnMenu: "列菜单",
913
+ ariaLabelColumnFilter: "列过滤器",
914
+ ariaLabelSelectField: "选择字段",
915
+ // Cell Editor
916
+ ariaValidationErrorPrefix: "单元格编辑器验证",
917
+ ariaLabelLoadingContextMenu: "正在加载上下文菜单",
918
+ // aria labels for rich select
919
+ ariaLabelRichSelectField: "丰富选择字段",
920
+ ariaLabelRichSelectToggleSelection: "按下空格键以切换选择",
921
+ ariaLabelRichSelectDeselectAllItems: "按下删除键来取消选择所有项目",
922
+ ariaLabelRichSelectDeleteSelection: "按下删除键来取消选择项目",
923
+ ariaLabelTooltip: "工具提示",
924
+ ariaLabelContextMenu: "上下文菜单",
925
+ ariaLabelSubMenu: "子菜单",
926
+ ariaLabelAggregationFunction: "聚合函数",
927
+ ariaLabelAdvancedFilterAutocomplete: "高级筛选自动完成",
928
+ ariaLabelAdvancedFilterBuilderAddField: "高级筛选生成器添加字段",
929
+ ariaLabelAdvancedFilterBuilderColumnSelectField: "高级筛选生成器列选择字段",
930
+ ariaLabelAdvancedFilterBuilderOptionSelectField: "高级筛选生成器选项选择字段",
931
+ ariaLabelAdvancedFilterBuilderJoinSelectField: "高级筛选生成器连接操作符选择字段",
932
+ // ARIA Labels for the Side Bar
933
+ ariaColumnPanelList: "列列表",
934
+ ariaFilterPanelList: "过滤列表",
935
+ // ARIA labels for new Filters Tool Panel
936
+ ariaLabelAddFilterField: "添加过滤字段",
937
+ ariaLabelFilterCardDelete: "删除过滤器",
938
+ ariaLabelFilterCardHasEdits: "有编辑",
939
+ ariaHasNote: "此单元格有备注。",
940
+ // Number Format (Status Bar, Pagination Panel)
941
+ thousandSeparator: ",",
942
+ decimalSeparator: ".",
943
+ // Data types
944
+ dataTypeText: "文本",
945
+ dataTypeNumber: "数字",
946
+ dataTypeBigInt: "BigInt",
947
+ dataTypeBoolean: "布尔值",
948
+ dataTypeDate: "日期",
949
+ dataTypeDateString: "日期字符串",
950
+ dataTypeDateTime: "日期时间",
951
+ dataTypeDateTimeString: "日期时间字符串",
952
+ dataTypeObject: "对象",
953
+ true: "真",
954
+ false: "假",
955
+ invalidDate: "无效日期",
956
+ invalidNumber: "无效数字",
957
+ invalidBigInt: "无效BigInt",
958
+ january: "一月",
959
+ february: "二月",
960
+ march: "三月",
961
+ april: "四月",
962
+ may: "五月",
963
+ june: "六月",
964
+ july: "七月",
965
+ august: "八月",
966
+ september: "九月",
967
+ october: "十月",
968
+ november: "十一月",
969
+ december: "十二月",
970
+ // Date-time parts
971
+ year: "年",
972
+ quarter: "季度",
973
+ month: "月",
974
+ day: "日",
975
+ hour: "小时",
976
+ minute: "分钟",
977
+ second: "秒",
978
+ // Time formats
979
+ timeFormatSlashesDDMMYYYY: "DD/MM/YYYY",
980
+ timeFormatSlashesMMDDYYYY: "MM/DD/YYYY",
981
+ timeFormatSlashesDDMMYY: "DD/MM/YY",
982
+ timeFormatSlashesMMDDYY: "MM/DD/YY",
983
+ timeFormatDotsDDMYY: "DD.M.YY",
984
+ timeFormatDotsMDDYY: "M.DD.YY",
985
+ timeFormatDashesYYYYMMDD: "YYYY-MM-DD",
986
+ timeFormatSpacesDDMMMMYYYY: "DD MMMM YYYY",
987
+ timeFormatHHMMSS: "HH:MM:SS",
988
+ timeFormatHHMMSSAmPm: "HH:MM:SS 上午/下午",
989
+ // Calculated Columns
990
+ calculatedColumn: "计算列",
991
+ calculatedColumnAdd: "添加计算列",
992
+ calculatedColumnEdit: "编辑计算列",
993
+ calculatedColumnRemove: "删除计算列",
994
+ calculatedColumnTitle: "标题",
995
+ calculatedColumnType: "类型",
996
+ calculatedColumnExpression: "表达式",
997
+ calculatedColumnExpressionPlaceholder: "在此输入",
998
+ calculatedColumnExpressionToolsLabel: "插入",
999
+ calculatedColumnColumns: "列",
1000
+ calculatedColumnFunctions: "函数",
1001
+ calculatedColumnOperators: "运算符",
1002
+ calculatedColumnSuggestions: "计算列建议",
1003
+ calculatedColumnDefaultTitle: "未命名",
1004
+ calculatedColumnExpressionAmbiguousReference: '列引用不明确 "${variable}"。请使用“列”列表或更具体的分组路径。',
1005
+ calculatedColumnExpressionUnknownReference: '未知的列引用 "${variable}"。',
1006
+ calculatedColumnExpressionEmpty: "请输入表达式",
1007
+ calculatedColumnTitleEmpty: "请输入标题",
1008
+ calculatedColumnApply: "应用",
1009
+ calculatedColumnCancel: "取消",
1010
+ // Notes
1011
+ note: "单元格备注",
1012
+ addNote: "添加备注",
1013
+ viewNote: "查看备注",
1014
+ editNote: "编辑备注",
1015
+ deleteNote: "删除备注",
1016
+ notePlaceholder: "添加备注..."
1017
+ };
1018
+ const mr = (r) => {
1019
+ const e = Y.c(2), {
1020
+ text: u
1021
+ } = r, t = u === void 0 ? "暂无符合条件的数据" : u;
1022
+ let n;
1023
+ return e[0] !== t ? (n = /* @__PURE__ */ F("div", { className: "gz-table-no-rows-overlay", role: "status", children: t }), e[0] = t, e[1] = n) : n = e[1], n;
1024
+ }, Er = Qu({
1025
+ feature: "gzTableDisabledCheckboxCursor",
1026
+ css: `
1027
+ .ag-checkbox-input:disabled,
1028
+ .ag-checkbox-input-wrapper.ag-disabled,
1029
+ .ag-selection-checkbox .ag-checkbox-input-wrapper.ag-disabled::before {
1030
+ cursor: not-allowed;
1031
+ }
1032
+ `
1033
+ }), Fr = Qu({
1034
+ feature: "gzTablePaginationPickerWidth",
1035
+ css: `
1036
+ /* 覆盖分页器选择框的宽度,以及补充缺失的边框 */
1037
+ .ag-paging-panel .ag-picker-field-wrapper {
1038
+ min-width: 48px !important;
1039
+ min-height: 24px !important;
1040
+ border: 1px solid var(--gz-color-border) !important;
1041
+ cursor: pointer;
1042
+ transition: border-color 0.3s ease-in-out;
1043
+
1044
+ &:hover {
1045
+ border-color: var(--gz-color-primary-hover) !important;
1046
+ }
1047
+ }
1048
+
1049
+ /* 覆盖分页器输入框的宽度,以及补充缺失的边框 */
1050
+ .ag-number-field-input-wrapper .ag-input-field-input.ag-number-field-input {
1051
+ border: 1px solid var(--gz-color-border) !important;
1052
+ cursor: pointer;
1053
+ transition: border-color 0.3s ease-in-out;
1054
+
1055
+ &:hover {
1056
+ border-color: var(--gz-color-primary-hover) !important;
1057
+ }
1058
+ }
1059
+
1060
+ .ag-text-field-input-wrapper .ag-input-field-input.ag-text-field-input {
1061
+ border: 1px solid var(--gz-color-border) !important;
1062
+ cursor: pointer;
1063
+ transition: border-color 0.3s ease-in-out;
1064
+
1065
+ &:hover {
1066
+ border-color: var(--gz-color-primary-hover) !important;
1067
+ }
1068
+ }
1069
+
1070
+ .ag-paging-panel-content{
1071
+ padding: 0 !important;
1072
+ }
1073
+ `
1074
+ }), Du = Jt.withPart(Er).withPart(Fr).withParams({
1075
+ fontFamily: "var(--gz-font-family)",
1076
+ fontSize: "calc(var(--gz-font-size) * 1px)",
1077
+ fontWeight: "var(--gz-font-weight-normal)",
1078
+ iconSize: "calc(var(--gz-checkbox-size) * 1px)",
1079
+ focusShadow: {
1080
+ spread: "0px"
1081
+ },
1082
+ cellFontSize: "calc(var(--gz-font-size) * 1px)",
1083
+ cellFontWeight: "var(--gz-font-weight-normal)",
1084
+ cellHorizontalPadding: "calc(var(--gz-padding-xs) * 1px)",
1085
+ headerFontSize: "calc(var(--gz-font-size) * 1px)",
1086
+ headerFontWeight: "var(--gz-font-weight-normal)",
1087
+ headerHeight: 31,
1088
+ rowHeight: 28,
1089
+ headerBackgroundColor: "var(--gz-components-table-header-bg, var(--gz-color-border))",
1090
+ headerTextColor: "var(--gz-components-table-header-text-color, var(--gz-color-text-secondary))",
1091
+ headerColumnBorder: {
1092
+ style: "solid",
1093
+ width: 2,
1094
+ color: "var(--gz-color-split)"
1095
+ },
1096
+ headerColumnBorderHeight: 14,
1097
+ pinnedColumnBorder: {
1098
+ style: "solid",
1099
+ width: 1,
1100
+ color: "var(--gz-color-split)"
1101
+ },
1102
+ checkboxBorderRadius: "calc(var(--gz-border-radius-sm) * 1px)",
1103
+ checkboxBorderWidth: 1,
1104
+ checkboxUncheckedBackgroundColor: "var(--gz-color-bg-container)",
1105
+ checkboxUncheckedBorderColor: "var(--gz-color-border-secondary)",
1106
+ checkboxCheckedBackgroundColor: "var(--gz-color-primary)",
1107
+ checkboxCheckedBorderColor: "var(--gz-color-primary)",
1108
+ checkboxCheckedShapeColor: "var(--gz-color-text-on-light)",
1109
+ checkboxIndeterminateBackgroundColor: "var(--gz-color-primary)",
1110
+ checkboxIndeterminateBorderColor: "var(--gz-color-primary)",
1111
+ checkboxIndeterminateShapeColor: "var(--gz-color-text-on-light)",
1112
+ borderColor: "var(--gz-components-table-border-color, var(--gz-color-border))",
1113
+ oddRowBackgroundColor: "var(--gz-color-bg-container)",
1114
+ backgroundColor: "var(--gz-color-bg-container)",
1115
+ dataBackgroundColor: "var(--gz-color-bg-container)",
1116
+ foregroundColor: "var(--gz-color-text)",
1117
+ cellTextColor: "var(--gz-color-text)",
1118
+ rowHoverColor: "color-mix(in srgb, transparent, var(--gz-color-primary) 15%)",
1119
+ selectedRowBackgroundColor: "color-mix(in srgb, transparent, var(--gz-color-primary) 12%)",
1120
+ paginationPanelHeight: 40
1121
+ }), Cr = Du.withParams(Kt), fr = Du.withParams(er), gr = "AgGridLicense66fwc79n[NORMAL][v0102]_NDA3MDk2NjQwMDAwMA==80908dd5fb71b58d3ce28b2ed320216d", ou = {
1122
+ theme: Du,
1123
+ // 允许鼠标划选并复制单元格里的文本(AG Grid 默认是 false,防止和拖拽冲突,但业务通常需要复制)
1124
+ enableCellTextSelection: !0,
1125
+ // 自定义空状态组件:当 rowData 为空时,展示我们自己写的 NoRowsOverlay 组件
1126
+ noRowsOverlayComponent: mr,
1127
+ // 注入官方的纯中文语言包,并覆盖部分默认文案以符合业务习惯
1128
+ localeText: {
1129
+ ...dr,
1130
+ pageSizeSelectorLabel: "每页条数",
1131
+ page: "第",
1132
+ of: "页/共",
1133
+ collapseAll: "收起所有行组"
1134
+ },
1135
+ // 默认表头高度和行高
1136
+ headerHeight: 31,
1137
+ rowHeight: 28,
1138
+ // 禁用原生的右键菜单(界面更干净,如有需要业务侧可自行开启)
1139
+ suppressContextMenu: !1,
1140
+ // 拖动列交换位置时,关闭动画(可能为了性能或视觉统一)
1141
+ suppressColumnMoveAnimation: !0,
1142
+ // 禁用单元格的焦点框(点击单元格时不会出现蓝色边框,类似普通网页体验)
1143
+ suppressCellFocus: !0,
1144
+ // 把列拖出表格范围时,不隐藏该列
1145
+ suppressDragLeaveHidesColumns: !0,
1146
+ // 滚动条宽度(10px)
1147
+ scrollbarWidth: 10,
1148
+ // 默认关闭分页。如果要开启,使用者必须显式传 pagination: true
1149
+ pagination: !1
1150
+ }, pr = {
1151
+ sortable: !0,
1152
+ resizable: !0,
1153
+ // 根据基线产品需求:开启按列聚合功能,并限制只能使用以下 5 种汇总方式(原生的 first/last 等被剔除)
1154
+ enableValue: !0,
1155
+ // 限制只能使用以下 5 种汇总方式(原生的 first/last 等被剔除)
1156
+ allowedAggFuncs: ["sum", "avg", "max", "min", "count"]
1157
+ }, hr = [jt], vr = ["rowSummary", "pageSize", "pageSummary"], Bu = ee((r, e) => {
1158
+ const u = te(null), {
1159
+ themeMode: t
1160
+ } = Wu(at), {
1161
+ gridOptions: n
1162
+ } = r, o = r.pagination ?? n?.pagination ?? ou.pagination, a = r.paginationPanels ?? n?.paginationPanels, s = o && a === void 0, E = s ? vr : a, m = t === "gold-dark" ? Cr : t === "gold-light" ? fr : void 0, p = r.theme ?? n?.theme ?? m, g = Pe(() => ({
1163
+ ...ou,
1164
+ ...n,
1165
+ paginationPanels: E
1166
+ }), [n, E]), M = Pe(() => ({
1167
+ ...ou.localeText,
1168
+ ...n?.localeText,
1169
+ ...r.localeText
1170
+ }), [n?.localeText, r.localeText]), B = ["gz-table", o ? "gz-table-pagination" : void 0, s ? "gz-table-default-pagination-layout" : void 0, t === "gold-dark" ? "gz-table-gold-dark" : void 0, t === "gold-light" ? "gz-table-gold-light" : void 0, r.className].filter(Boolean).join(" "), k = Pe(() => ({
1171
+ ...pr,
1172
+ ...n?.defaultColDef,
1173
+ ...r.defaultColDef
1174
+ }), [n?.defaultColDef, r.defaultColDef]), R = ge((h) => {
1175
+ const w = u.current;
1176
+ if (!w || !h) return;
1177
+ const $ = w.querySelector(".ag-body-horizontal-scroll-viewport");
1178
+ if ($) {
1179
+ const {
1180
+ scrollLeft: v,
1181
+ clientWidth: A,
1182
+ scrollWidth: C
1183
+ } = $, N = v > 0, f = Math.ceil(v + A) < C - 1;
1184
+ w.classList.toggle("gz-table-ping-left", N), w.classList.toggle("gz-table-ping-right", f);
1185
+ } else
1186
+ w.classList.remove("gz-table-ping-left", "gz-table-ping-right");
1187
+ }, []), y = ge((h) => {
1188
+ h.direction === "horizontal" && R(h.api), r.onBodyScroll && r.onBodyScroll(h), n?.onBodyScroll && n.onBodyScroll(h);
1189
+ }, [R, r.onBodyScroll, n?.onBodyScroll]), _ = ge((h) => {
1190
+ R(h.api), r.onGridReady && r.onGridReady(h), n?.onGridReady && n.onGridReady(h);
1191
+ }, [R, r.onGridReady, n?.onGridReady]), b = ge((h) => {
1192
+ R(h.api), r.onGridSizeChanged && r.onGridSizeChanged(h), n?.onGridSizeChanged && n.onGridSizeChanged(h);
1193
+ }, [R, r.onGridSizeChanged, n?.onGridSizeChanged]), T = ge((h) => {
1194
+ R(h.api), r.onModelUpdated && r.onModelUpdated(h), n?.onModelUpdated && n.onModelUpdated(h);
1195
+ }, [R, r.onModelUpdated, n?.onModelUpdated]), P = ge((h) => {
1196
+ R(h.api), r.onDisplayedColumnsChanged && r.onDisplayedColumnsChanged(h), n?.onDisplayedColumnsChanged && n.onDisplayedColumnsChanged(h);
1197
+ }, [R, r.onDisplayedColumnsChanged, n?.onDisplayedColumnsChanged]), I = r.getContextMenuItems ?? n?.getContextMenuItems, L = ge((h) => {
1198
+ const w = {
1199
+ name: "复制整行数据",
1200
+ icon: '<span class="ag-icon ag-icon-copy" unselectable="on" role="presentation"></span>',
1201
+ action: () => {
1202
+ const C = h.node;
1203
+ if (!C || !C.data) return;
1204
+ const f = (h.api.getAllDisplayedColumns() || []).map((c) => {
1205
+ const i = c.getColId(), l = C.data[i];
1206
+ return typeof l == "object" ? JSON.stringify(l) : String(l ?? "");
1207
+ }).join(" ");
1208
+ if (navigator.clipboard && window.isSecureContext)
1209
+ navigator.clipboard.writeText(f).catch((c) => {
1210
+ console.error("复制整行数据失败: ", c);
1211
+ });
1212
+ else {
1213
+ const c = document.createElement("textarea");
1214
+ c.value = f, c.style.position = "fixed", c.style.left = "-999999px", c.style.top = "-999999px", document.body.appendChild(c), c.focus(), c.select();
1215
+ try {
1216
+ document.execCommand("copy");
1217
+ } catch (i) {
1218
+ console.error("降级复制失败", i);
1219
+ }
1220
+ c.remove();
1221
+ }
1222
+ }
1223
+ };
1224
+ let $ = h.defaultItems || [];
1225
+ const v = $.indexOf("copy");
1226
+ return v !== -1 && ($[v] = w), h.api.getRowGroupColumns().length > 0 && ($ = [
1227
+ ...$,
1228
+ "separator",
1229
+ "expandAll",
1230
+ "contractAll"
1231
+ // AG Grid 中“收起全部”对应的内部指令是 contractAll
1232
+ ]), I ? I({
1233
+ ...h,
1234
+ defaultItems: $
1235
+ }) : $;
1236
+ }, [I]);
1237
+ return /* @__PURE__ */ F("div", { ref: u, className: "gz-table-wrapper", style: {
1238
+ height: "100%",
1239
+ width: "100%",
1240
+ display: "flex",
1241
+ flexDirection: "column"
1242
+ }, children: /* @__PURE__ */ F(Xt, { modules: hr, licenseKey: gr, children: /* @__PURE__ */ F(Qt, { ref: e, ...r, gridOptions: g, ...p === void 0 ? {} : {
1243
+ theme: p
1244
+ }, className: B || void 0, defaultColDef: k, localeText: M, getContextMenuItems: L, onBodyScroll: y, onGridReady: _, onGridSizeChanged: b, onModelUpdated: T, onDisplayedColumnsChanged: P }) }) });
1245
+ }), Dr = "_root_168ty_1", Br = "_section_168ty_11", yr = "_sectionTitle_168ty_17", br = "_contextForm_168ty_24", Ar = "_fixedSingle_168ty_30", Sr = "_multiple_168ty_35", Tr = "_single_168ty_40", xr = "_contextFormItem_168ty_50", kr = "_contextFormLabel_168ty_53", wr = "_contextFormContent_168ty_57", Mr = "_contextFormLabelText_168ty_82", _r = "_selectPopup_168ty_92", $r = "_selectPopupListItem_168ty_95", Ir = "_resourceIssues_168ty_111", Rr = "_limitAlert_168ty_115", Pr = "_fixedGrid_168ty_118", Lr = "_multipleGrid_168ty_119", Nr = "_singleGrid_168ty_156", Or = "_fieldCell_168ty_160", Vr = "_singleContractHeader_168ty_165", zr = "_negativeValue_168ty_188", Yr = "_gridErrorAlert_168ty_191", Gr = "_gridErrorIcon_168ty_203", Hr = "_gridErrorSection_168ty_206", Ur = "_gridErrorMessage_168ty_210", Wr = "_mergedErrorGridCell_168ty_217", Zr = "_mergedErrorCell_168ty_225", qr = "_mergedErrorText_168ty_240", jr = "_emptyState_168ty_246", Xr = "_footer_168ty_254", Qr = "_navigateButton_168ty_260", Jr = "_navigateIcon_168ty_263", G = {
1246
+ root: Dr,
1247
+ section: Br,
1248
+ sectionTitle: yr,
1249
+ contextForm: br,
1250
+ fixedSingle: Ar,
1251
+ multiple: Sr,
1252
+ single: Tr,
1253
+ contextFormItem: xr,
1254
+ contextFormLabel: kr,
1255
+ contextFormContent: wr,
1256
+ contextFormLabelText: Mr,
1257
+ selectPopup: _r,
1258
+ selectPopupListItem: $r,
1259
+ resourceIssues: Ir,
1260
+ limitAlert: Rr,
1261
+ fixedGrid: Pr,
1262
+ multipleGrid: Lr,
1263
+ singleGrid: Nr,
1264
+ fieldCell: Or,
1265
+ singleContractHeader: Vr,
1266
+ negativeValue: zr,
1267
+ gridErrorAlert: Yr,
1268
+ gridErrorIcon: Gr,
1269
+ gridErrorSection: Hr,
1270
+ gridErrorMessage: Ur,
1271
+ mergedErrorGridCell: Wr,
1272
+ mergedErrorCell: Zr,
1273
+ mergedErrorText: qr,
1274
+ emptyState: jr,
1275
+ footer: Xr,
1276
+ navigateButton: Qr,
1277
+ navigateIcon: Jr
1278
+ }, it = {
1279
+ red: ["red1", "red3", "red6", "red7"],
1280
+ volcano: ["volcano1", "volcano3", "volcano6", "volcano7"],
1281
+ orange: ["orange1", "orange3", "orange6", "orange7"],
1282
+ gold: ["guotai gold1", "guotai gold3", "guotai gold6", "guotai gold7"],
1283
+ yellow: ["yellow1", "yellow3", "yellow6", "yellow7"],
1284
+ // Figma 中 lime outlined 使用 lime4,其余预设色使用色板第 3 阶作为边框色。
1285
+ lime: ["lime1", "lime4", "lime6", "lime7"],
1286
+ green: ["green1", "green3", "green6", "green7"],
1287
+ cyan: ["cyan1", "cyan3", "cyan6", "cyan7"],
1288
+ geekblue: ["galaxy blue1", "galaxy blue3", "galaxy blue6", "galaxy blue7"],
1289
+ purple: ["purple1", "purple3", "purple6", "purple7"],
1290
+ magenta: ["magenta1", "magenta3", "magenta6", "magenta7"]
1291
+ }, de = (r, e) => {
1292
+ const u = r[e];
1293
+ return typeof u == "string" ? u : void 0;
1294
+ }, Kr = (r) => Object.prototype.hasOwnProperty.call(it, r), en = (r, e, u) => {
1295
+ if (r === "default" || r === void 0) {
1296
+ if (e !== "solid") return;
1297
+ const E = de(u, "colorBgSolid");
1298
+ return {
1299
+ color: de(u, "colorTextOnLight"),
1300
+ backgroundColor: E,
1301
+ borderColor: E
1302
+ };
1303
+ }
1304
+ if (r === "primary") {
1305
+ const E = de(u, "colorPrimary");
1306
+ return {
1307
+ // primary 三种 variant 都使用浅色背景和 on-light 文字色。
1308
+ color: de(u, "colorTextOnLight"),
1309
+ backgroundColor: E,
1310
+ // outlined 使用设计描边色;solid 的边框与背景保持一致;filled 不额外设置边框。
1311
+ ...e === "outlined" ? {
1312
+ borderColor: de(u, "colorPrimaryBorder")
1313
+ } : e === "solid" ? {
1314
+ borderColor: E
1315
+ } : void 0
1316
+ };
1317
+ }
1318
+ if (!Kr(r)) return;
1319
+ const t = it[r], [n, o, a, s] = t;
1320
+ if (e === "solid") {
1321
+ const E = de(u, a);
1322
+ return {
1323
+ color: de(u, "colorTextLightSolid"),
1324
+ backgroundColor: E,
1325
+ borderColor: E
1326
+ };
1327
+ }
1328
+ return {
1329
+ color: de(u, s),
1330
+ backgroundColor: de(u, n),
1331
+ ...e === "outlined" ? {
1332
+ borderColor: de(u, o)
1333
+ } : void 0
1334
+ };
1335
+ }, un = (r, e) => {
1336
+ if (r === "primary")
1337
+ return {
1338
+ color: de(e, "colorTextOnLight"),
1339
+ backgroundColor: de(e, "colorPrimary"),
1340
+ borderColor: "transparent"
1341
+ };
1342
+ }, lt = ee((r, e) => {
1343
+ const u = Y.c(33);
1344
+ let t, n, o, a, s;
1345
+ u[0] !== r ? ({
1346
+ color: t,
1347
+ style: o,
1348
+ styles: a,
1349
+ variant: s,
1350
+ ...n
1351
+ } = r, u[0] = r, u[1] = t, u[2] = n, u[3] = o, u[4] = a, u[5] = s) : (t = u[1], n = u[2], o = u[3], a = u[4], s = u[5]);
1352
+ const E = s === void 0 ? "solid" : s, {
1353
+ themeMode: m
1354
+ } = Wu(at), {
1355
+ token: p
1356
+ } = Xu.useToken(), g = p;
1357
+ let M;
1358
+ u[6] !== t || u[7] !== g || u[8] !== m || u[9] !== E ? (M = m === "gold-dark" ? en(t, E, g) : m === "gold-light" ? un(t, g) : void 0, u[6] = t, u[7] = g, u[8] = m, u[9] = E, u[10] = M) : M = u[10];
1359
+ const B = M;
1360
+ let k;
1361
+ u[11] !== t || u[12] !== g || u[13] !== m || u[14] !== E ? (k = m === "gold-dark" && E === "solid" && (t === "primary" || t === "default" || t === void 0) ? {
1362
+ color: de(g, "colorTextOnLight")
1363
+ } : void 0, u[11] = t, u[12] = g, u[13] = m, u[14] = E, u[15] = k) : k = u[15];
1364
+ const R = k;
1365
+ let y;
1366
+ u[16] !== t || u[17] !== g || u[18] !== m ? (y = m === "gold-light" && t === "primary" ? {
1367
+ color: de(g, "colorTextOnLight")
1368
+ } : void 0, u[16] = t, u[17] = g, u[18] = m, u[19] = y) : y = u[19];
1369
+ const b = R ?? y;
1370
+ let T;
1371
+ u[20] !== B || u[21] !== o ? (T = B ? {
1372
+ ...B,
1373
+ ...o
1374
+ } : o, u[20] = B, u[21] = o, u[22] = T) : T = u[22];
1375
+ const P = T;
1376
+ let I;
1377
+ u[23] !== b || u[24] !== a ? (I = b ? typeof a == "function" ? ($) => {
1378
+ const v = a($);
1379
+ return {
1380
+ ...v,
1381
+ close: {
1382
+ ...b,
1383
+ ...v?.close
1384
+ }
1385
+ };
1386
+ } : {
1387
+ ...a,
1388
+ close: {
1389
+ ...b,
1390
+ ...a?.close
1391
+ }
1392
+ } : a, u[23] = b, u[24] = a, u[25] = I) : I = u[25];
1393
+ const L = I, h = m === "gold-dark" && t === "default" ? void 0 : t;
1394
+ let w;
1395
+ return u[26] !== h || u[27] !== P || u[28] !== L || u[29] !== e || u[30] !== n || u[31] !== E ? (w = /* @__PURE__ */ F(Fu, { ref: e, color: h, variant: E, style: P, styles: L, ...n }), u[26] = h, u[27] = P, u[28] = L, u[29] = e, u[30] = n, u[31] = E, u[32] = w) : w = u[32], w;
1396
+ });
1397
+ lt.displayName = "GZTag";
1398
+ const st = ee((r, e) => {
1399
+ const u = Y.c(3);
1400
+ let t;
1401
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Fu.CheckableTag, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
1402
+ });
1403
+ st.displayName = "GZCheckableTag";
1404
+ const ct = ee((r, e) => {
1405
+ const u = Y.c(3);
1406
+ let t;
1407
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Fu.CheckableTagGroup, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
1408
+ });
1409
+ ct.displayName = "GZCheckableTagGroup";
1410
+ const yu = lt;
1411
+ yu.CheckableTag = st;
1412
+ yu.CheckableTagGroup = ct;
1413
+ function dt(r, e) {
1414
+ if (r == null || r === "") return ae;
1415
+ try {
1416
+ return new Ge(r).toFixed(e);
1417
+ } catch {
1418
+ return ae;
1419
+ }
1420
+ }
1421
+ function bu(r, e) {
1422
+ const u = dt(r, e);
1423
+ if (u === ae) return u;
1424
+ const [t, n] = u.split("."), o = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1425
+ return n == null ? o : `${o}.${n}`;
1426
+ }
1427
+ function $u(r, e, u = 2) {
1428
+ const t = dt(r, u);
1429
+ if (t === ae) return t;
1430
+ const n = t.startsWith("-") ? t.slice(1) : t, o = bu(n, u);
1431
+ try {
1432
+ const s = new Intl.NumberFormat("zh-CN", {
1433
+ style: "currency",
1434
+ currency: e,
1435
+ currencyDisplay: "symbol",
1436
+ minimumFractionDigits: u,
1437
+ maximumFractionDigits: u
1438
+ }).formatToParts(0).find((E) => E.type === "currency")?.value ?? e;
1439
+ return `${t.startsWith("-") ? "-" : ""}${s}${o}`;
1440
+ } catch {
1441
+ return `${e} ${t}`.trim();
1442
+ }
1443
+ }
1444
+ function tn(r) {
1445
+ try {
1446
+ return r != null && new Ge(r).lt(0);
1447
+ } catch {
1448
+ return !1;
1449
+ }
1450
+ }
1451
+ function mt(r) {
1452
+ const e = Y.c(3), u = tn(r.rawValue) ? G.negativeValue : void 0;
1453
+ let t;
1454
+ return e[0] !== r.value || e[1] !== u ? (t = /* @__PURE__ */ F("span", { className: u, children: r.value }), e[0] = r.value, e[1] = u, e[2] = t) : t = e[2], t;
1455
+ }
1456
+ function Et(r) {
1457
+ const e = Y.c(4);
1458
+ if (r.field === "direction") {
1459
+ let t;
1460
+ return e[0] !== r.value ? (t = r.value ? /* @__PURE__ */ F(yu, { variant: "outlined", color: r.value === "买入" ? "gold" : "green", children: r.value }) : "-", e[0] = r.value, e[1] = t) : t = e[1], t;
1461
+ }
1462
+ let u;
1463
+ return e[2] !== r.value ? (u = /* @__PURE__ */ F("span", { children: r.value }), e[2] = r.value, e[3] = u) : u = e[3], u;
1464
+ }
1465
+ var Xe = { exports: {} }, rn = Xe.exports, Iu;
1466
+ function nn() {
1467
+ return Iu || (Iu = 1, (function(r, e) {
1468
+ (function(u, t) {
1469
+ r.exports = t();
1470
+ })(rn, (function() {
1471
+ var u = 1e3, t = 6e4, n = 36e5, o = "millisecond", a = "second", s = "minute", E = "hour", m = "day", p = "week", g = "month", M = "quarter", B = "year", k = "date", R = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, _ = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, b = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(f) {
1472
+ var c = ["th", "st", "nd", "rd"], i = f % 100;
1473
+ return "[" + f + (c[(i - 20) % 10] || c[i] || c[0]) + "]";
1474
+ } }, T = function(f, c, i) {
1475
+ var l = String(f);
1476
+ return !l || l.length >= c ? f : "" + Array(c + 1 - l.length).join(i) + f;
1477
+ }, P = { s: T, z: function(f) {
1478
+ var c = -f.utcOffset(), i = Math.abs(c), l = Math.floor(i / 60), d = i % 60;
1479
+ return (c <= 0 ? "+" : "-") + T(l, 2, "0") + ":" + T(d, 2, "0");
1480
+ }, m: function f(c, i) {
1481
+ if (c.date() < i.date()) return -f(i, c);
1482
+ var l = 12 * (i.year() - c.year()) + (i.month() - c.month()), d = c.clone().add(l, g), D = i - d < 0, S = c.clone().add(l + (D ? -1 : 1), g);
1483
+ return +(-(l + (i - d) / (D ? d - S : S - d)) || 0);
1484
+ }, a: function(f) {
1485
+ return f < 0 ? Math.ceil(f) || 0 : Math.floor(f);
1486
+ }, p: function(f) {
1487
+ return { M: g, y: B, w: p, d: m, D: k, h: E, m: s, s: a, ms: o, Q: M }[f] || String(f || "").toLowerCase().replace(/s$/, "");
1488
+ }, u: function(f) {
1489
+ return f === void 0;
1490
+ } }, I = "en", L = {};
1491
+ L[I] = b;
1492
+ var h = "$isDayjsObject", w = function(f) {
1493
+ return f instanceof C || !(!f || !f[h]);
1494
+ }, $ = function f(c, i, l) {
1495
+ var d;
1496
+ if (!c) return I;
1497
+ if (typeof c == "string") {
1498
+ var D = c.toLowerCase();
1499
+ L[D] && (d = D), i && (L[D] = i, d = D);
1500
+ var S = c.split("-");
1501
+ if (!d && S.length > 1) return f(S[0]);
1502
+ } else {
1503
+ var x = c.name;
1504
+ L[x] = c, d = x;
1505
+ }
1506
+ return !l && d && (I = d), d || !l && I;
1507
+ }, v = function(f, c) {
1508
+ if (w(f)) return f.clone();
1509
+ var i = typeof c == "object" ? c : {};
1510
+ return i.date = f, i.args = arguments, new C(i);
1511
+ }, A = P;
1512
+ A.l = $, A.i = w, A.w = function(f, c) {
1513
+ return v(f, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1514
+ };
1515
+ var C = (function() {
1516
+ function f(i) {
1517
+ this.$L = $(i.locale, null, !0), this.parse(i), this.$x = this.$x || i.x || {}, this[h] = !0;
1518
+ }
1519
+ var c = f.prototype;
1520
+ return c.parse = function(i) {
1521
+ this.$d = (function(l) {
1522
+ var d = l.date, D = l.utc;
1523
+ if (d === null) return /* @__PURE__ */ new Date(NaN);
1524
+ if (A.u(d)) return /* @__PURE__ */ new Date();
1525
+ if (d instanceof Date) return new Date(d);
1526
+ if (typeof d == "string" && !/Z$/i.test(d)) {
1527
+ var S = d.match(y);
1528
+ if (S) {
1529
+ var x = S[2] - 1 || 0, O = (S[7] || "0").substring(0, 3);
1530
+ return D ? new Date(Date.UTC(S[1], x, S[3] || 1, S[4] || 0, S[5] || 0, S[6] || 0, O)) : new Date(S[1], x, S[3] || 1, S[4] || 0, S[5] || 0, S[6] || 0, O);
1531
+ }
1532
+ }
1533
+ return new Date(d);
1534
+ })(i), this.init();
1535
+ }, c.init = function() {
1536
+ var i = this.$d;
1537
+ this.$y = i.getFullYear(), this.$M = i.getMonth(), this.$D = i.getDate(), this.$W = i.getDay(), this.$H = i.getHours(), this.$m = i.getMinutes(), this.$s = i.getSeconds(), this.$ms = i.getMilliseconds();
1538
+ }, c.$utils = function() {
1539
+ return A;
1540
+ }, c.isValid = function() {
1541
+ return this.$d.toString() !== R;
1542
+ }, c.isSame = function(i, l) {
1543
+ var d = v(i);
1544
+ return this.startOf(l) <= d && d <= this.endOf(l);
1545
+ }, c.isAfter = function(i, l) {
1546
+ return v(i) < this.startOf(l);
1547
+ }, c.isBefore = function(i, l) {
1548
+ return this.endOf(l) < v(i);
1549
+ }, c.$g = function(i, l, d) {
1550
+ return A.u(i) ? this[l] : this.set(d, i);
1551
+ }, c.unix = function() {
1552
+ return Math.floor(this.valueOf() / 1e3);
1553
+ }, c.valueOf = function() {
1554
+ return this.$d.getTime();
1555
+ }, c.startOf = function(i, l) {
1556
+ var d = this, D = !!A.u(l) || l, S = A.p(i), x = function(q, H) {
1557
+ var Q = A.w(d.$u ? Date.UTC(d.$y, H, q) : new Date(d.$y, H, q), d);
1558
+ return D ? Q : Q.endOf(m);
1559
+ }, O = function(q, H) {
1560
+ return A.w(d.toDate()[q].apply(d.toDate("s"), (D ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(H)), d);
1561
+ }, V = this.$W, z = this.$M, W = this.$D, U = "set" + (this.$u ? "UTC" : "");
1562
+ switch (S) {
1563
+ case B:
1564
+ return D ? x(1, 0) : x(31, 11);
1565
+ case g:
1566
+ return D ? x(1, z) : x(0, z + 1);
1567
+ case p:
1568
+ var X = this.$locale().weekStart || 0, Z = (V < X ? V + 7 : V) - X;
1569
+ return x(D ? W - Z : W + (6 - Z), z);
1570
+ case m:
1571
+ case k:
1572
+ return O(U + "Hours", 0);
1573
+ case E:
1574
+ return O(U + "Minutes", 1);
1575
+ case s:
1576
+ return O(U + "Seconds", 2);
1577
+ case a:
1578
+ return O(U + "Milliseconds", 3);
1579
+ default:
1580
+ return this.clone();
1581
+ }
1582
+ }, c.endOf = function(i) {
1583
+ return this.startOf(i, !1);
1584
+ }, c.$set = function(i, l) {
1585
+ var d, D = A.p(i), S = "set" + (this.$u ? "UTC" : ""), x = (d = {}, d[m] = S + "Date", d[k] = S + "Date", d[g] = S + "Month", d[B] = S + "FullYear", d[E] = S + "Hours", d[s] = S + "Minutes", d[a] = S + "Seconds", d[o] = S + "Milliseconds", d)[D], O = D === m ? this.$D + (l - this.$W) : l;
1586
+ if (D === g || D === B) {
1587
+ var V = this.clone().set(k, 1);
1588
+ V.$d[x](O), V.init(), this.$d = V.set(k, Math.min(this.$D, V.daysInMonth())).$d;
1589
+ } else x && this.$d[x](O);
1590
+ return this.init(), this;
1591
+ }, c.set = function(i, l) {
1592
+ return this.clone().$set(i, l);
1593
+ }, c.get = function(i) {
1594
+ return this[A.p(i)]();
1595
+ }, c.add = function(i, l) {
1596
+ var d, D = this;
1597
+ i = Number(i);
1598
+ var S = A.p(l), x = function(z) {
1599
+ var W = v(D);
1600
+ return A.w(W.date(W.date() + Math.round(z * i)), D);
1601
+ };
1602
+ if (S === g) return this.set(g, this.$M + i);
1603
+ if (S === B) return this.set(B, this.$y + i);
1604
+ if (S === m) return x(1);
1605
+ if (S === p) return x(7);
1606
+ var O = (d = {}, d[s] = t, d[E] = n, d[a] = u, d)[S] || 1, V = this.$d.getTime() + i * O;
1607
+ return A.w(V, this);
1608
+ }, c.subtract = function(i, l) {
1609
+ return this.add(-1 * i, l);
1610
+ }, c.format = function(i) {
1611
+ var l = this, d = this.$locale();
1612
+ if (!this.isValid()) return d.invalidDate || R;
1613
+ var D = i || "YYYY-MM-DDTHH:mm:ssZ", S = A.z(this), x = this.$H, O = this.$m, V = this.$M, z = d.weekdays, W = d.months, U = d.meridiem, X = function(H, Q, K, j) {
1614
+ return H && (H[Q] || H(l, D)) || K[Q].slice(0, j);
1615
+ }, Z = function(H) {
1616
+ return A.s(x % 12 || 12, H, "0");
1617
+ }, q = U || function(H, Q, K) {
1618
+ var j = H < 12 ? "AM" : "PM";
1619
+ return K ? j.toLowerCase() : j;
1620
+ };
1621
+ return D.replace(_, (function(H, Q) {
1622
+ return Q || (function(K) {
1623
+ switch (K) {
1624
+ case "YY":
1625
+ return String(l.$y).slice(-2);
1626
+ case "YYYY":
1627
+ return A.s(l.$y, 4, "0");
1628
+ case "M":
1629
+ return V + 1;
1630
+ case "MM":
1631
+ return A.s(V + 1, 2, "0");
1632
+ case "MMM":
1633
+ return X(d.monthsShort, V, W, 3);
1634
+ case "MMMM":
1635
+ return X(W, V);
1636
+ case "D":
1637
+ return l.$D;
1638
+ case "DD":
1639
+ return A.s(l.$D, 2, "0");
1640
+ case "d":
1641
+ return String(l.$W);
1642
+ case "dd":
1643
+ return X(d.weekdaysMin, l.$W, z, 2);
1644
+ case "ddd":
1645
+ return X(d.weekdaysShort, l.$W, z, 3);
1646
+ case "dddd":
1647
+ return z[l.$W];
1648
+ case "H":
1649
+ return String(x);
1650
+ case "HH":
1651
+ return A.s(x, 2, "0");
1652
+ case "h":
1653
+ return Z(1);
1654
+ case "hh":
1655
+ return Z(2);
1656
+ case "a":
1657
+ return q(x, O, !0);
1658
+ case "A":
1659
+ return q(x, O, !1);
1660
+ case "m":
1661
+ return String(O);
1662
+ case "mm":
1663
+ return A.s(O, 2, "0");
1664
+ case "s":
1665
+ return String(l.$s);
1666
+ case "ss":
1667
+ return A.s(l.$s, 2, "0");
1668
+ case "SSS":
1669
+ return A.s(l.$ms, 3, "0");
1670
+ case "Z":
1671
+ return S;
1672
+ }
1673
+ return null;
1674
+ })(H) || S.replace(":", "");
1675
+ }));
1676
+ }, c.utcOffset = function() {
1677
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1678
+ }, c.diff = function(i, l, d) {
1679
+ var D, S = this, x = A.p(l), O = v(i), V = (O.utcOffset() - this.utcOffset()) * t, z = this - O, W = function() {
1680
+ return A.m(S, O);
1681
+ };
1682
+ switch (x) {
1683
+ case B:
1684
+ D = W() / 12;
1685
+ break;
1686
+ case g:
1687
+ D = W();
1688
+ break;
1689
+ case M:
1690
+ D = W() / 3;
1691
+ break;
1692
+ case p:
1693
+ D = (z - V) / 6048e5;
1694
+ break;
1695
+ case m:
1696
+ D = (z - V) / 864e5;
1697
+ break;
1698
+ case E:
1699
+ D = z / n;
1700
+ break;
1701
+ case s:
1702
+ D = z / t;
1703
+ break;
1704
+ case a:
1705
+ D = z / u;
1706
+ break;
1707
+ default:
1708
+ D = z;
1709
+ }
1710
+ return d ? D : A.a(D);
1711
+ }, c.daysInMonth = function() {
1712
+ return this.endOf(g).$D;
1713
+ }, c.$locale = function() {
1714
+ return L[this.$L];
1715
+ }, c.locale = function(i, l) {
1716
+ if (!i) return this.$L;
1717
+ var d = this.clone(), D = $(i, l, !0);
1718
+ return D && (d.$L = D), d;
1719
+ }, c.clone = function() {
1720
+ return A.w(this.$d, this);
1721
+ }, c.toDate = function() {
1722
+ return new Date(this.valueOf());
1723
+ }, c.toJSON = function() {
1724
+ return this.isValid() ? this.toISOString() : null;
1725
+ }, c.toISOString = function() {
1726
+ return this.$d.toISOString();
1727
+ }, c.toString = function() {
1728
+ return this.$d.toUTCString();
1729
+ }, f;
1730
+ })(), N = C.prototype;
1731
+ return v.prototype = N, [["$ms", o], ["$s", a], ["$m", s], ["$H", E], ["$W", m], ["$M", g], ["$y", B], ["$D", k]].forEach((function(f) {
1732
+ N[f[1]] = function(c) {
1733
+ return this.$g(c, f[0], f[1]);
1734
+ };
1735
+ })), v.extend = function(f, c) {
1736
+ return f.$i || (f(c, C, v), f.$i = !0), v;
1737
+ }, v.locale = $, v.isDayjs = w, v.unix = function(f) {
1738
+ return v(1e3 * f);
1739
+ }, v.en = L[I], v.Ls = L, v.p = {}, v;
1740
+ }));
1741
+ })(Xe)), Xe.exports;
1742
+ }
1743
+ var on = nn();
1744
+ const He = /* @__PURE__ */ Ku(on);
1745
+ var Qe = { exports: {} }, an = Qe.exports, Ru;
1746
+ function ln() {
1747
+ return Ru || (Ru = 1, (function(r, e) {
1748
+ (function(u, t) {
1749
+ r.exports = t();
1750
+ })(an, (function() {
1751
+ var u = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, o = /\d\d/, a = /\d\d?/, s = /\d*[^-_:/,()\s\d]+/, E = {}, m = function(y) {
1752
+ return (y = +y) + (y > 68 ? 1900 : 2e3);
1753
+ }, p = function(y) {
1754
+ return function(_) {
1755
+ this[y] = +_;
1756
+ };
1757
+ }, g = [/[+-]\d\d:?(\d\d)?|Z/, function(y) {
1758
+ (this.zone || (this.zone = {})).offset = (function(_) {
1759
+ if (!_ || _ === "Z") return 0;
1760
+ var b = _.match(/([+-]|\d\d)/g), T = 60 * b[1] + (+b[2] || 0);
1761
+ return T === 0 ? 0 : b[0] === "+" ? -T : T;
1762
+ })(y);
1763
+ }], M = function(y) {
1764
+ var _ = E[y];
1765
+ return _ && (_.indexOf ? _ : _.s.concat(_.f));
1766
+ }, B = function(y, _) {
1767
+ var b, T = E.meridiem;
1768
+ if (T) {
1769
+ for (var P = 1; P <= 24; P += 1) if (y.indexOf(T(P, 0, _)) > -1) {
1770
+ b = P > 12;
1771
+ break;
1772
+ }
1773
+ } else b = y === (_ ? "pm" : "PM");
1774
+ return b;
1775
+ }, k = { A: [s, function(y) {
1776
+ this.afternoon = B(y, !1);
1777
+ }], a: [s, function(y) {
1778
+ this.afternoon = B(y, !0);
1779
+ }], Q: [n, function(y) {
1780
+ this.month = 3 * (y - 1) + 1;
1781
+ }], S: [n, function(y) {
1782
+ this.milliseconds = 100 * +y;
1783
+ }], SS: [o, function(y) {
1784
+ this.milliseconds = 10 * +y;
1785
+ }], SSS: [/\d{3}/, function(y) {
1786
+ this.milliseconds = +y;
1787
+ }], s: [a, p("seconds")], ss: [a, p("seconds")], m: [a, p("minutes")], mm: [a, p("minutes")], H: [a, p("hours")], h: [a, p("hours")], HH: [a, p("hours")], hh: [a, p("hours")], D: [a, p("day")], DD: [o, p("day")], Do: [s, function(y) {
1788
+ var _ = E.ordinal, b = y.match(/\d+/);
1789
+ if (this.day = b[0], _) for (var T = 1; T <= 31; T += 1) _(T).replace(/\[|\]/g, "") === y && (this.day = T);
1790
+ }], w: [a, p("week")], ww: [o, p("week")], M: [a, p("month")], MM: [o, p("month")], MMM: [s, function(y) {
1791
+ var _ = M("months"), b = (M("monthsShort") || _.map((function(T) {
1792
+ return T.slice(0, 3);
1793
+ }))).indexOf(y) + 1;
1794
+ if (b < 1) throw new Error();
1795
+ this.month = b % 12 || b;
1796
+ }], MMMM: [s, function(y) {
1797
+ var _ = M("months").indexOf(y) + 1;
1798
+ if (_ < 1) throw new Error();
1799
+ this.month = _ % 12 || _;
1800
+ }], Y: [/[+-]?\d+/, p("year")], YY: [o, function(y) {
1801
+ this.year = m(y);
1802
+ }], YYYY: [/\d{4}/, p("year")], Z: g, ZZ: g };
1803
+ function R(y) {
1804
+ var _, b;
1805
+ _ = y, b = E && E.formats;
1806
+ for (var T = (y = _.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(v, A, C) {
1807
+ var N = C && C.toUpperCase();
1808
+ return A || b[C] || u[C] || b[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(f, c, i) {
1809
+ return c || i.slice(1);
1810
+ }));
1811
+ }))).match(t), P = T.length, I = 0; I < P; I += 1) {
1812
+ var L = T[I], h = k[L], w = h && h[0], $ = h && h[1];
1813
+ T[I] = $ ? { regex: w, parser: $ } : L.replace(/^\[|\]$/g, "");
1814
+ }
1815
+ return function(v) {
1816
+ for (var A = {}, C = 0, N = 0; C < P; C += 1) {
1817
+ var f = T[C];
1818
+ if (typeof f == "string") N += f.length;
1819
+ else {
1820
+ var c = f.regex, i = f.parser, l = v.slice(N), d = c.exec(l)[0];
1821
+ i.call(A, d), v = v.replace(d, "");
1822
+ }
1823
+ }
1824
+ return (function(D) {
1825
+ var S = D.afternoon;
1826
+ if (S !== void 0) {
1827
+ var x = D.hours;
1828
+ S ? x < 12 && (D.hours += 12) : x === 12 && (D.hours = 0), delete D.afternoon;
1829
+ }
1830
+ })(A), A;
1831
+ };
1832
+ }
1833
+ return function(y, _, b) {
1834
+ b.p.customParseFormat = !0, y && y.parseTwoDigitYear && (m = y.parseTwoDigitYear);
1835
+ var T = _.prototype, P = T.parse;
1836
+ T.parse = function(I) {
1837
+ var L = I.date, h = I.utc, w = I.args;
1838
+ this.$u = h;
1839
+ var $ = w[1];
1840
+ if (typeof $ == "string") {
1841
+ var v = w[2] === !0, A = w[3] === !0, C = v || A, N = w[2];
1842
+ A && (N = w[2]), E = this.$locale(), !v && N && (E = b.Ls[N]), this.$d = (function(l, d, D, S) {
1843
+ try {
1844
+ if (["x", "X"].indexOf(d) > -1) return new Date((d === "X" ? 1e3 : 1) * l);
1845
+ var x = R(d)(l), O = x.year, V = x.month, z = x.day, W = x.hours, U = x.minutes, X = x.seconds, Z = x.milliseconds, q = x.zone, H = x.week, Q = /* @__PURE__ */ new Date(), K = z || (O || V ? 1 : Q.getDate()), j = O || Q.getFullYear(), ue = 0;
1846
+ O && !V || (ue = V > 0 ? V - 1 : Q.getMonth());
1847
+ var ne, le = W || 0, se = U || 0, ce = X || 0, oe = Z || 0;
1848
+ return q ? new Date(Date.UTC(j, ue, K, le, se, ce, oe + 60 * q.offset * 1e3)) : D ? new Date(Date.UTC(j, ue, K, le, se, ce, oe)) : (ne = new Date(j, ue, K, le, se, ce, oe), H && (ne = S(ne).week(H).toDate()), ne);
1849
+ } catch {
1850
+ return /* @__PURE__ */ new Date("");
1851
+ }
1852
+ })(L, $, h, b), this.init(), N && N !== !0 && (this.$L = this.locale(N).$L), C && L != this.format($) && (this.$d = /* @__PURE__ */ new Date("")), E = {};
1853
+ } else if ($ instanceof Array) for (var f = $.length, c = 1; c <= f; c += 1) {
1854
+ w[1] = $[c - 1];
1855
+ var i = b.apply(this, w);
1856
+ if (i.isValid()) {
1857
+ this.$d = i.$d, this.$L = i.$L, this.init();
1858
+ break;
1859
+ }
1860
+ c === f && (this.$d = /* @__PURE__ */ new Date(""));
1861
+ }
1862
+ else P.call(this, I);
1863
+ };
1864
+ };
1865
+ }));
1866
+ })(Qe)), Qe.exports;
1867
+ }
1868
+ var sn = ln();
1869
+ const cn = /* @__PURE__ */ Ku(sn);
1870
+ He.extend(cn);
1871
+ function Ft(r) {
1872
+ return !!(r && He(r, "YYYY-MM-DD", !0).isValid());
1873
+ }
1874
+ function Au(r) {
1875
+ return !!(r && He(r, "YYYYMMDD", !0).isValid());
1876
+ }
1877
+ function Ct(r) {
1878
+ return r.replaceAll("-", "");
1879
+ }
1880
+ function cu(r) {
1881
+ return Au(r) ? He(r, "YYYYMMDD", !0).format("YYYY-MM-DD") : r;
1882
+ }
1883
+ function Su(r) {
1884
+ const e = r.trim(), u = e.slice(0, 8);
1885
+ return Au(u) ? cu(u) : e.slice(0, 10);
1886
+ }
1887
+ function ft(r, e) {
1888
+ switch (e) {
1889
+ case "instrumentCode":
1890
+ return r.instrumentCode || ae;
1891
+ case "scrtyCode":
1892
+ return r.scrtyCode || ae;
1893
+ case "fwdMaturityDate":
1894
+ return r.fwdMaturityDate ? cu(r.fwdMaturityDate) : ae;
1895
+ case "settleDate":
1896
+ return r.settleDate ? cu(r.settleDate) : ae;
1897
+ case "physicalDelivery":
1898
+ return r.physicalDelivery === "1" ? "实物交割" : r.physicalDelivery === "2" ? "现金交割" : ae;
1899
+ case "direction":
1900
+ return r.direction === "L" ? "买入" : r.direction === "S" ? "卖出" : "";
1901
+ case "fwdDlvPrice":
1902
+ return r.fwdDlvPrice || ae;
1903
+ case "targtVol":
1904
+ return bu(r.targtVol);
1905
+ default:
1906
+ return ae;
1907
+ }
1908
+ }
1909
+ function gt(r, e, u) {
1910
+ return e === "npv" ? $u(r?.npv, u) : e === "forwardPrice" ? $u(r?.forwardPrice, u, 8) : bu(r?.discountFactor, 4);
1911
+ }
1912
+ const dn = ["npv", "forwardPrice", "discountFactor"], mn = {
1913
+ suppressHeaderMenuButton: !0,
1914
+ suppressHeaderContextMenu: !0
1915
+ }, En = {
1916
+ type: "fitCellContents",
1917
+ skipHeader: !1,
1918
+ scaleUpToFitGridWidth: !0,
1919
+ defaultMinWidth: 112,
1920
+ defaultMaxWidth: 240,
1921
+ columnLimits: [{
1922
+ colId: "npv",
1923
+ minWidth: 190,
1924
+ maxWidth: 220
1925
+ }, {
1926
+ colId: "forwardPrice",
1927
+ minWidth: 220,
1928
+ maxWidth: 260
1929
+ }, {
1930
+ colId: "discountFactor",
1931
+ minWidth: 150,
1932
+ maxWidth: 190
1933
+ }]
1934
+ }, Fn = ({
1935
+ rowNode: r
1936
+ }) => r.data?.kind === "error";
1937
+ function Cn(r) {
1938
+ const e = Y.c(3), {
1939
+ data: u
1940
+ } = r, t = String(u?.instrumentCode ?? "定价计算失败");
1941
+ let n;
1942
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = {
1943
+ icon: G.gridErrorIcon,
1944
+ section: G.gridErrorSection
1945
+ }, e[0] = n) : n = e[0];
1946
+ let o;
1947
+ return e[1] !== t ? (o = /* @__PURE__ */ F(Ye, { className: G.gridErrorAlert, classNames: n, type: "error", showIcon: !0, title: /* @__PURE__ */ ke("span", { className: G.gridErrorMessage, title: t, children: [
1948
+ "计算失败,失败原因:",
1949
+ t
1950
+ ] }) }), e[1] = t, e[2] = o) : o = e[2], o;
1951
+ }
1952
+ function fn(r) {
1953
+ const e = Y.c(15), {
1954
+ contract: u,
1955
+ calculation: t,
1956
+ loading: n
1957
+ } = r, o = te(null), a = te(null);
1958
+ let s;
1959
+ e[0] !== u ? (s = [{
1960
+ id: "contract",
1961
+ kind: "contract",
1962
+ ...Object.fromEntries(su.map((b) => [b.key, b.kind === "contract" ? ft(u, b.key) : ae]))
1963
+ }], e[0] = u, e[1] = s) : s = e[1];
1964
+ const E = s;
1965
+ let m;
1966
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = su.map(hn), e[2] = m) : m = e[2];
1967
+ const p = m;
1968
+ let g;
1969
+ e[3] !== t || e[4] !== u.currency ? (g = (b) => {
1970
+ const T = b.getRowNode("contract"), P = T?.data ? {
1971
+ ...T.data
1972
+ } : null;
1973
+ if (dn.forEach((I) => {
1974
+ const L = t?.status === "success" ? gt(t.result, I, u.currency) : ae;
1975
+ T?.setDataValue(I, L), P && (P[I] = L);
1976
+ }), T && P && T.setData(P), a.current && (b.applyTransaction({
1977
+ remove: [a.current]
1978
+ }), a.current = null), t?.status === "error") {
1979
+ const I = {
1980
+ id: "error",
1981
+ kind: "error",
1982
+ instrumentCode: t.message ?? "定价计算失败"
1983
+ };
1984
+ b.applyTransaction({
1985
+ add: [I]
1986
+ }), a.current = I;
1987
+ }
1988
+ b.resetRowHeights();
1989
+ }, e[3] = t, e[4] = u.currency, e[5] = g) : g = e[5];
1990
+ const M = g;
1991
+ let B, k;
1992
+ e[6] !== M ? (B = () => {
1993
+ o.current && M(o.current);
1994
+ }, k = [M], e[6] = M, e[7] = B, e[8] = k) : (B = e[7], k = e[8]), pe(B, k);
1995
+ let R;
1996
+ e[9] !== M ? (R = (b) => {
1997
+ o.current = b.api, M(b.api);
1998
+ }, e[9] = M, e[10] = R) : R = e[10];
1999
+ const y = R;
2000
+ let _;
2001
+ return e[11] !== n || e[12] !== y || e[13] !== E ? (_ = /* @__PURE__ */ F("div", { className: G.fixedGrid, "aria-label": "单笔合约定价结果", children: /* @__PURE__ */ F(Bu, { rowData: E, columnDefs: p, defaultColDef: mn, onGridReady: y, getRowId: pn, isFullWidthRow: Fn, fullWidthCellRenderer: Cn, getRowHeight: gn, headerHeight: 32, rowHeight: 32, autoSizeStrategy: En, autoSizePadding: 16, suppressColumnVirtualisation: !0, tooltipShowMode: "whenTruncated", tooltipShowDelay: 0, domLayout: "autoHeight", pagination: !1, loading: n, suppressCellFocus: !0, suppressDragLeaveHidesColumns: !0 }) }), e[11] = n, e[12] = y, e[13] = E, e[14] = _) : _ = e[14], _;
2002
+ }
2003
+ function gn(r) {
2004
+ return r.data?.kind === "error" ? 28 : 32;
2005
+ }
2006
+ function pn(r) {
2007
+ return r.data.id;
2008
+ }
2009
+ function hn(r) {
2010
+ return {
2011
+ field: r.key,
2012
+ colId: r.key,
2013
+ headerName: r.label,
2014
+ headerTooltip: r.label,
2015
+ width: r.kind === "result" ? 148 : 128,
2016
+ minWidth: r.kind === "result" ? 148 : 112,
2017
+ sortable: !1,
2018
+ resizable: !1,
2019
+ suppressMovable: !0,
2020
+ cellRenderer: (e) => r.kind === "result" ? /* @__PURE__ */ F(mt, { value: String(e.value ?? ae) }) : /* @__PURE__ */ F(Et, { field: r.key, value: String(e.value ?? ae) })
2021
+ };
2022
+ }
2023
+ const Tu = ee((r, e) => {
2024
+ const u = Y.c(3);
2025
+ let t;
2026
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Zt, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
2027
+ });
2028
+ Tu.displayName = "GZTooltip";
2029
+ const vn = ["npv", "forwardPrice", "discountFactor"], Dn = {
2030
+ suppressHeaderMenuButton: !0,
2031
+ suppressHeaderContextMenu: !0
2032
+ }, Pu = {
2033
+ kind: "empty",
2034
+ display: ae
2035
+ };
2036
+ function Ke(r) {
2037
+ return !!(r && typeof r == "object" && "kind" in r);
2038
+ }
2039
+ function Bn(r) {
2040
+ const e = Y.c(32), {
2041
+ single: u,
2042
+ contracts: t,
2043
+ results: n,
2044
+ loading: o
2045
+ } = r, a = u === void 0 ? !1 : u, s = te(null), E = a ? cr : su;
2046
+ let m;
2047
+ if (e[0] !== t || e[1] !== E) {
2048
+ let A;
2049
+ e[3] !== t ? (A = (C) => ({
2050
+ id: C.key,
2051
+ label: C.label,
2052
+ kind: C.kind,
2053
+ ...Object.fromEntries(t.map((N) => [N.contractId, C.kind === "contract" ? ft(N, C.key) : Pu]))
2054
+ }), e[3] = t, e[4] = A) : A = e[4], m = E.map(A), e[0] = t, e[1] = E, e[2] = m;
2055
+ } else
2056
+ m = e[2];
2057
+ const p = m, g = a ? "" : "字段", M = a ? 160 : 180, B = a ? 160 : 180;
2058
+ let k;
2059
+ e[5] !== g || e[6] !== M || e[7] !== B ? (k = {
2060
+ field: "label",
2061
+ colId: "field",
2062
+ headerName: g,
2063
+ pinned: "left",
2064
+ lockPinned: !0,
2065
+ width: M,
2066
+ minWidth: B,
2067
+ sortable: !1,
2068
+ resizable: !1,
2069
+ suppressMovable: !0,
2070
+ cellClass: G.fieldCell
2071
+ }, e[5] = g, e[6] = M, e[7] = B, e[8] = k) : k = e[8];
2072
+ let R;
2073
+ if (e[9] !== t || e[10] !== a || e[11] !== k) {
2074
+ let A;
2075
+ e[13] !== a ? (A = (C, N) => ({
2076
+ field: C.contractId,
2077
+ colId: C.contractId,
2078
+ headerName: String(N + 1).padStart(3, "0"),
2079
+ headerClass: a ? G.singleContractHeader : void 0,
2080
+ flex: 1,
2081
+ width: 180,
2082
+ minWidth: 180,
2083
+ sortable: !1,
2084
+ resizable: !1,
2085
+ suppressMovable: !0,
2086
+ spanRows: Sn,
2087
+ cellClass: An,
2088
+ cellRenderer: bn
2089
+ }), e[13] = a, e[14] = A) : A = e[14], R = [k, ...t.map(A)], e[9] = t, e[10] = a, e[11] = k, e[12] = R;
2090
+ } else
2091
+ R = e[12];
2092
+ const y = R;
2093
+ let _;
2094
+ e[15] !== t || e[16] !== n ? (_ = (A) => {
2095
+ vn.forEach((C) => {
2096
+ const N = A.getRowNode(C);
2097
+ if (!N?.data)
2098
+ return;
2099
+ const f = {
2100
+ ...N.data
2101
+ };
2102
+ t.forEach((c) => {
2103
+ const i = n[c.contractId];
2104
+ let l = Pu;
2105
+ i?.status === "success" ? l = {
2106
+ kind: "value",
2107
+ display: gt(i.result, C, c.currency),
2108
+ rawValue: i.result?.[C]
2109
+ } : i?.status === "error" && (l = {
2110
+ kind: "error",
2111
+ display: i.message ?? "定价计算失败"
2112
+ }), N.setDataValue(c.contractId, l), f[c.contractId] = l;
2113
+ }), N.setData(f);
2114
+ }), A.refreshCells({
2115
+ force: !0
2116
+ }), A.resetRowHeights();
2117
+ }, e[15] = t, e[16] = n, e[17] = _) : _ = e[17];
2118
+ const b = _;
2119
+ let T, P;
2120
+ e[18] !== b ? (T = () => {
2121
+ s.current && b(s.current);
2122
+ }, P = [b], e[18] = b, e[19] = T, e[20] = P) : (T = e[19], P = e[20]), pe(T, P);
2123
+ let I;
2124
+ e[21] !== b ? (I = (A) => {
2125
+ s.current = A.api, b(A.api);
2126
+ }, e[21] = b, e[22] = I) : I = e[22];
2127
+ const L = I, h = `${G.multipleGrid}${a ? ` ${G.singleGrid}` : ""}`, w = a ? "单笔合约定价结果" : "多笔合约定价结果";
2128
+ let $;
2129
+ e[23] !== y || e[24] !== o || e[25] !== L || e[26] !== p ? ($ = /* @__PURE__ */ F(Bu, { rowData: p, columnDefs: y, defaultColDef: Dn, onGridReady: L, getRowId: yn, headerHeight: 32, rowHeight: 28, domLayout: "autoHeight", pagination: !1, loading: o, enableCellSpan: !0, suppressCellFocus: !0, suppressDragLeaveHidesColumns: !0 }), e[23] = y, e[24] = o, e[25] = L, e[26] = p, e[27] = $) : $ = e[27];
2130
+ let v;
2131
+ return e[28] !== h || e[29] !== w || e[30] !== $ ? (v = /* @__PURE__ */ F("div", { className: h, "aria-label": w, children: $ }), e[28] = h, e[29] = w, e[30] = $, e[31] = v) : v = e[31], v;
2132
+ }
2133
+ function yn(r) {
2134
+ return r.data.id;
2135
+ }
2136
+ function bn(r) {
2137
+ const e = r.data?.id, u = r.value;
2138
+ if (Ke(u)) {
2139
+ if (u.kind === "error") {
2140
+ const t = `计算失败,失败原因:${u.display}`;
2141
+ return /* @__PURE__ */ F(Tu, { title: t, children: /* @__PURE__ */ F("div", { className: G.mergedErrorCell, children: /* @__PURE__ */ F("span", { className: G.mergedErrorText, children: t }) }) });
2142
+ }
2143
+ return /* @__PURE__ */ F(mt, { value: u.display, rawValue: u.rawValue });
2144
+ }
2145
+ return e ? /* @__PURE__ */ F(Et, { field: e, value: String(u ?? ae) }) : null;
2146
+ }
2147
+ function An(r) {
2148
+ return Ke(r.value) && r.value.kind === "error" ? G.mergedErrorGridCell : void 0;
2149
+ }
2150
+ function Sn(r) {
2151
+ const e = r.valueA, u = r.valueB;
2152
+ return Ke(e) && Ke(u) && e.kind === "error" && u.kind === "error" && e.display === u.display;
2153
+ }
2154
+ const pt = ee((r, e) => {
2155
+ const u = Y.c(3);
2156
+ let t;
2157
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Re.MonthPicker, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
2158
+ });
2159
+ pt.displayName = "GZMonthPicker";
2160
+ const ht = ee((r, e) => {
2161
+ const u = Y.c(3);
2162
+ let t;
2163
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Re.QuarterPicker, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
2164
+ });
2165
+ ht.displayName = "GZQuarterPicker";
2166
+ const vt = ee((r, e) => {
2167
+ const u = Y.c(7);
2168
+ let t, n;
2169
+ u[0] !== r ? ({
2170
+ children: t,
2171
+ ...n
2172
+ } = r, u[0] = r, u[1] = t, u[2] = n) : (t = u[1], n = u[2]);
2173
+ let o;
2174
+ return u[3] !== t || u[4] !== e || u[5] !== n ? (o = /* @__PURE__ */ F(Re.RangePicker, { ref: e, ...n, children: t }), u[3] = t, u[4] = e, u[5] = n, u[6] = o) : o = u[6], o;
2175
+ });
2176
+ vt.displayName = "GZRangePicker";
2177
+ const Dt = ee((r, e) => {
2178
+ const u = Y.c(3);
2179
+ let t;
2180
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Re.TimePicker, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
2181
+ });
2182
+ Dt.displayName = "GZTimePicker";
2183
+ const Bt = ee((r, e) => {
2184
+ const u = Y.c(3);
2185
+ let t;
2186
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Re.WeekPicker, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
2187
+ });
2188
+ Bt.displayName = "GZWeekPicker";
2189
+ const yt = ee((r, e) => {
2190
+ const u = Y.c(3);
2191
+ let t;
2192
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Re.YearPicker, { ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
2193
+ });
2194
+ yt.displayName = "GZYearPicker";
2195
+ const Tn = ee((r, e) => {
2196
+ const u = Y.c(3);
2197
+ let t;
2198
+ return u[0] !== r || u[1] !== e ? (t = /* @__PURE__ */ F(Re, { format: "YYYY-MM-DD", ref: e, ...r }), u[0] = r, u[1] = e, u[2] = t) : t = u[2], t;
2199
+ }), _e = Tn;
2200
+ _e.RangePicker = vt;
2201
+ _e.WeekPicker = Bt;
2202
+ _e.MonthPicker = pt;
2203
+ _e.YearPicker = yt;
2204
+ _e.QuarterPicker = ht;
2205
+ _e.TimePicker = Dt;
2206
+ _e.displayName = "GZDatePicker";
2207
+ const bt = ee((r, e) => {
2208
+ const u = Y.c(13);
2209
+ let t, n, o;
2210
+ u[0] !== r ? ({
2211
+ children: t,
2212
+ itemBottomSpace: n,
2213
+ ...o
2214
+ } = r, u[0] = r, u[1] = t, u[2] = n, u[3] = o) : (t = u[1], n = u[2], o = u[3]);
2215
+ let a;
2216
+ u[4] !== n ? (a = n === void 0 ? void 0 : {
2217
+ components: {
2218
+ Form: {
2219
+ itemMarginBottom: n
2220
+ }
2221
+ }
2222
+ }, u[4] = n, u[5] = a) : a = u[5];
2223
+ const s = a, E = o;
2224
+ let m;
2225
+ u[6] !== t || u[7] !== e || u[8] !== E ? (m = /* @__PURE__ */ F(Me, { ref: e, ...E, children: t }), u[6] = t, u[7] = e, u[8] = E, u[9] = m) : m = u[9];
2226
+ let p;
2227
+ return u[10] !== m || u[11] !== s ? (p = /* @__PURE__ */ F(qt, { theme: s, children: m }), u[10] = m, u[11] = s, u[12] = p) : p = u[12], p;
2228
+ });
2229
+ bt.displayName = "GZForm";
2230
+ const At = (r) => {
2231
+ const e = Y.c(6);
2232
+ let u, t;
2233
+ e[0] !== r ? ({
2234
+ children: u,
2235
+ ...t
2236
+ } = r, e[0] = r, e[1] = u, e[2] = t) : (u = e[1], t = e[2]);
2237
+ const n = t;
2238
+ let o;
2239
+ return e[3] !== u || e[4] !== n ? (o = /* @__PURE__ */ F(Me.Item, { ...n, children: u }), e[3] = u, e[4] = n, e[5] = o) : o = e[5], o;
2240
+ };
2241
+ At.displayName = "GZFormItem";
2242
+ const St = (r) => {
2243
+ const e = Y.c(2);
2244
+ let u;
2245
+ return e[0] !== r ? (u = /* @__PURE__ */ F(Me.List, { ...r }), e[0] = r, e[1] = u) : u = e[1], u;
2246
+ };
2247
+ St.displayName = "GZFormList";
2248
+ const Tt = (r) => {
2249
+ const e = Y.c(2);
2250
+ let u;
2251
+ return e[0] !== r ? (u = /* @__PURE__ */ F(Me.ErrorList, { ...r }), e[0] = r, e[1] = u) : u = e[1], u;
2252
+ };
2253
+ Tt.displayName = "GZErrorList";
2254
+ const xt = (r) => {
2255
+ const e = Y.c(2);
2256
+ let u;
2257
+ return e[0] !== r ? (u = /* @__PURE__ */ F(Me.Provider, { ...r }), e[0] = r, e[1] = u) : u = e[1], u;
2258
+ };
2259
+ xt.displayName = "GZFormProvider";
2260
+ const De = bt;
2261
+ De.Item = At;
2262
+ De.List = St;
2263
+ De.ErrorList = Tt;
2264
+ De.Provider = xt;
2265
+ De.useForm = Me.useForm;
2266
+ De.useFormInstance = Me.useFormInstance;
2267
+ De.useWatch = Me.useWatch;
2268
+ const kt = ee((r, e) => {
2269
+ const u = Y.c(7);
2270
+ let t, n;
2271
+ u[0] !== r ? ({
2272
+ children: t,
2273
+ ...n
2274
+ } = r, u[0] = r, u[1] = t, u[2] = n) : (t = u[1], n = u[2]);
2275
+ const o = e;
2276
+ let a;
2277
+ return u[3] !== t || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ F(Cu.Option, { ref: o, ...n, children: t }), u[3] = t, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
2278
+ });
2279
+ kt.displayName = "GZSelectOption";
2280
+ const wt = ee((r, e) => {
2281
+ const u = Y.c(7);
2282
+ let t, n;
2283
+ u[0] !== r ? ({
2284
+ children: t,
2285
+ ...n
2286
+ } = r, u[0] = r, u[1] = t, u[2] = n) : (t = u[1], n = u[2]);
2287
+ const o = e;
2288
+ let a;
2289
+ return u[3] !== t || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ F(Cu.OptGroup, { ref: o, ...n, children: t }), u[3] = t, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
2290
+ });
2291
+ wt.displayName = "GZSelectOptGroup";
2292
+ const xn = ee((r, e) => {
2293
+ const u = Y.c(3), t = e;
2294
+ let n;
2295
+ return u[0] !== r || u[1] !== t ? (n = /* @__PURE__ */ F(Cu, { ref: t, ...r }), u[0] = r, u[1] = t, u[2] = n) : n = u[2], n;
2296
+ }), Ne = xn;
2297
+ Ne.Option = kt;
2298
+ Ne.OptGroup = wt;
2299
+ Ne.displayName = "GZSelect";
2300
+ function Lu(r, e) {
2301
+ if (r?.source !== "custom" || !e) return;
2302
+ const u = r.executeDay ? Su(r.executeDay) : void 0;
2303
+ return !u || u !== e ? "曲线日与估值日非同一日" : void 0;
2304
+ }
2305
+ function kn(r) {
2306
+ const e = {};
2307
+ return Object.keys(_u).forEach((u) => {
2308
+ r[u] || (e[u] = [_u[u]]);
2309
+ }), r.valuationDate && !Ft(r.valuationDate) && (e.valuationDate = ["估值日格式必须为 YYYY-MM-DD"]), e;
2310
+ }
2311
+ function wn(r, e) {
2312
+ if (!r || !Ft(r) || e.length === 0)
2313
+ return {
2314
+ latestSettlementDate: null,
2315
+ valid: !0,
2316
+ message: null
2317
+ };
2318
+ const u = e.map((o) => o.settleDate);
2319
+ if (u.some((o) => !Au(o)))
2320
+ return {
2321
+ latestSettlementDate: null,
2322
+ valid: !0,
2323
+ message: null
2324
+ };
2325
+ const t = u.reduce((o, a) => a > o ? a : o), n = Ct(r) <= t;
2326
+ return {
2327
+ latestSettlementDate: t,
2328
+ valid: n,
2329
+ message: n ? null : "估值日必须小于或等于所选合约最久的结算支付日"
2330
+ };
2331
+ }
2332
+ function Ze(r) {
2333
+ return {
2334
+ validateStatus: r?.length ? "error" : void 0,
2335
+ help: r?.join(";")
2336
+ };
2337
+ }
2338
+ function Mt(r, e, u = "") {
2339
+ return r && e ? `${r}(${e})` : r || e || u;
2340
+ }
2341
+ function du(r) {
2342
+ if (!r) return "";
2343
+ const e = Mt(r.name, r.code, r.label);
2344
+ return r.source === "custom" && r.executeDay ? `${e}-${Su(r.executeDay)}` : e;
2345
+ }
2346
+ function qe(r) {
2347
+ const e = Y.c(7), {
2348
+ text: u
2349
+ } = r, t = te(null), [n, o] = Oe(!1);
2350
+ let a;
2351
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (m) => {
2352
+ const p = t.current, g = !!(p && p.scrollWidth > p.clientWidth);
2353
+ o(m && g);
2354
+ }, e[0] = a) : a = e[0];
2355
+ let s;
2356
+ e[1] !== u ? (s = /* @__PURE__ */ F("span", { ref: t, className: G.contextFormLabelText, children: u }), e[1] = u, e[2] = s) : s = e[2];
2357
+ let E;
2358
+ return e[3] !== s || e[4] !== u || e[5] !== n ? (E = /* @__PURE__ */ F(Tu, { title: u, open: n, onOpenChange: a, children: s }), e[3] = s, e[4] = u, e[5] = n, e[6] = E) : E = e[6], E;
2359
+ }
2360
+ function Mn(r) {
2361
+ const e = Y.c(110), {
2362
+ mode: u,
2363
+ layout: t,
2364
+ value: n,
2365
+ errors: o,
2366
+ environments: a,
2367
+ discountCurves: s,
2368
+ carbonForwardCurves: E,
2369
+ environmentsLoading: m,
2370
+ curvesLoading: p,
2371
+ curvesDisabled: g,
2372
+ disabled: M,
2373
+ onChange: B
2374
+ } = r, k = u === "single" && t === "vertical", R = u === "single" && t === "horizontal", y = u === "multiple" ? G.multiple : k ? G.single : G.fixedSingle;
2375
+ let _;
2376
+ e[0] !== a ? (_ = a.map(In), e[0] = a, e[1] = _) : _ = e[1];
2377
+ const b = _, T = _n;
2378
+ let P;
2379
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
2380
+ popup: {
2381
+ root: G.selectPopup,
2382
+ listItem: G.selectPopupListItem
2383
+ }
2384
+ }, e[2] = P) : P = e[2];
2385
+ const I = R ? 420 : 432;
2386
+ let L;
2387
+ e[3] !== I ? (L = {
2388
+ popupMatchSelectWidth: !1,
2389
+ classNames: P,
2390
+ styles: {
2391
+ popup: {
2392
+ root: {
2393
+ maxWidth: I
2394
+ }
2395
+ }
2396
+ }
2397
+ }, e[3] = I, e[4] = L) : L = e[4];
2398
+ const h = L;
2399
+ let w;
2400
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ F(qe, { text: "碳金融远期价格曲线" }), e[5] = w) : w = e[5];
2401
+ let $;
2402
+ e[6] !== n.carbonForwardCurve || e[7] !== n.valuationDate ? ($ = Lu(n.carbonForwardCurve, n.valuationDate), e[6] = n.carbonForwardCurve, e[7] = n.valuationDate, e[8] = $) : $ = e[8];
2403
+ let v;
2404
+ e[9] !== o.carbonForwardCurve ? (v = Ze(o.carbonForwardCurve), e[9] = o.carbonForwardCurve, e[10] = v) : v = e[10];
2405
+ const A = M || g;
2406
+ let C;
2407
+ e[11] !== E ? (C = T(E), e[11] = E, e[12] = C) : C = e[12];
2408
+ const N = n.carbonForwardCurve?.key;
2409
+ let f;
2410
+ e[13] !== n.carbonForwardCurve ? (f = () => du(n.carbonForwardCurve), e[13] = n.carbonForwardCurve, e[14] = f) : f = e[14];
2411
+ let c;
2412
+ e[15] !== E || e[16] !== B ? (c = (J) => B("carbonForwardCurve", E.find((Ae) => Ae.key === J) ?? null), e[15] = E, e[16] = B, e[17] = c) : c = e[17];
2413
+ let i;
2414
+ e[18] !== B ? (i = () => B("carbonForwardCurve", null), e[18] = B, e[19] = i) : i = e[19];
2415
+ let l;
2416
+ e[20] !== p || e[21] !== h || e[22] !== f || e[23] !== c || e[24] !== i || e[25] !== A || e[26] !== C || e[27] !== N ? (l = /* @__PURE__ */ F(Ne, { ...h, "aria-label": "碳金融远期价格曲线", allowClear: !0, showSearch: !0, optionFilterProp: "label", loading: p, disabled: A, placeholder: "请选择碳金融远期价格曲线", options: C, value: N, labelRender: f, onChange: c, onClear: i }), e[20] = p, e[21] = h, e[22] = f, e[23] = c, e[24] = i, e[25] = A, e[26] = C, e[27] = N, e[28] = l) : l = e[28];
2417
+ let d;
2418
+ e[29] !== l || e[30] !== $ || e[31] !== v ? (d = /* @__PURE__ */ F(De.Item, { className: G.contextFormItem, label: w, required: !0, extra: $, ...v, children: l }), e[29] = l, e[30] = $, e[31] = v, e[32] = d) : d = e[32];
2419
+ const D = d;
2420
+ let S;
2421
+ e[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ F(qe, { text: "无风险利率曲线" }), e[33] = S) : S = e[33];
2422
+ let x;
2423
+ e[34] !== n.discountCurve || e[35] !== n.valuationDate ? (x = Lu(n.discountCurve, n.valuationDate), e[34] = n.discountCurve, e[35] = n.valuationDate, e[36] = x) : x = e[36];
2424
+ let O;
2425
+ e[37] !== o.discountCurve ? (O = Ze(o.discountCurve), e[37] = o.discountCurve, e[38] = O) : O = e[38];
2426
+ const V = M || g;
2427
+ let z;
2428
+ e[39] !== s ? (z = T(s), e[39] = s, e[40] = z) : z = e[40];
2429
+ const W = n.discountCurve?.key;
2430
+ let U;
2431
+ e[41] !== n.discountCurve ? (U = () => du(n.discountCurve), e[41] = n.discountCurve, e[42] = U) : U = e[42];
2432
+ let X;
2433
+ e[43] !== s || e[44] !== B ? (X = (J) => B("discountCurve", s.find((Ae) => Ae.key === J) ?? null), e[43] = s, e[44] = B, e[45] = X) : X = e[45];
2434
+ let Z;
2435
+ e[46] !== B ? (Z = () => B("discountCurve", null), e[46] = B, e[47] = Z) : Z = e[47];
2436
+ let q;
2437
+ e[48] !== p || e[49] !== h || e[50] !== V || e[51] !== z || e[52] !== W || e[53] !== U || e[54] !== X || e[55] !== Z ? (q = /* @__PURE__ */ F(Ne, { ...h, "aria-label": "无风险利率曲线", allowClear: !0, showSearch: !0, optionFilterProp: "label", loading: p, disabled: V, placeholder: "请选择无风险利率曲线", options: z, value: W, labelRender: U, onChange: X, onClear: Z }), e[48] = p, e[49] = h, e[50] = V, e[51] = z, e[52] = W, e[53] = U, e[54] = X, e[55] = Z, e[56] = q) : q = e[56];
2438
+ let H;
2439
+ e[57] !== x || e[58] !== O || e[59] !== q ? (H = /* @__PURE__ */ F(De.Item, { className: G.contextFormItem, label: S, required: !0, extra: x, ...O, children: q }), e[57] = x, e[58] = O, e[59] = q, e[60] = H) : H = e[60];
2440
+ const Q = H, K = k ? "left" : "right";
2441
+ let j;
2442
+ e[61] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = {
2443
+ flex: "0 0 var(--pricing-form-label-width)"
2444
+ }, e[61] = j) : j = e[61];
2445
+ const ue = k ? "1 1 0" : "0 0 var(--pricing-form-control-width)";
2446
+ let ne;
2447
+ e[62] !== ue ? (ne = {
2448
+ flex: ue
2449
+ }, e[62] = ue, e[63] = ne) : ne = e[63];
2450
+ const le = `${G.contextForm} ${y}`;
2451
+ let se;
2452
+ e[64] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (se = {
2453
+ label: G.contextFormLabel,
2454
+ content: G.contextFormContent
2455
+ }, e[64] = se) : se = e[64];
2456
+ let ce;
2457
+ e[65] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = /* @__PURE__ */ F(qe, { text: "定价环境" }), e[65] = ce) : ce = e[65];
2458
+ let oe;
2459
+ e[66] !== o.pricingEnvironment ? (oe = Ze(o.pricingEnvironment), e[66] = o.pricingEnvironment, e[67] = oe) : oe = e[67];
2460
+ const Be = n.pricingEnvironment?.id;
2461
+ let me;
2462
+ e[68] !== n.pricingEnvironment?.code || e[69] !== n.pricingEnvironment?.name ? (me = () => Mt(n.pricingEnvironment?.name, n.pricingEnvironment?.code), e[68] = n.pricingEnvironment?.code, e[69] = n.pricingEnvironment?.name, e[70] = me) : me = e[70];
2463
+ let Ee;
2464
+ e[71] !== a || e[72] !== B ? (Ee = (J) => B("pricingEnvironment", a.find((Ae) => Ae.id === J) ?? null), e[71] = a, e[72] = B, e[73] = Ee) : Ee = e[73];
2465
+ let Se;
2466
+ e[74] !== B ? (Se = () => B("pricingEnvironment", null), e[74] = B, e[75] = Se) : Se = e[75];
2467
+ let Te;
2468
+ e[76] !== M || e[77] !== b || e[78] !== m || e[79] !== h || e[80] !== Be || e[81] !== me || e[82] !== Ee || e[83] !== Se ? (Te = /* @__PURE__ */ F(Ne, { ...h, "aria-label": "定价环境", allowClear: !0, showSearch: !0, optionFilterProp: "label", loading: m, disabled: M, placeholder: "请选择定价环境", options: b, value: Be, labelRender: me, onChange: Ee, onClear: Se }), e[76] = M, e[77] = b, e[78] = m, e[79] = h, e[80] = Be, e[81] = me, e[82] = Ee, e[83] = Se, e[84] = Te) : Te = e[84];
2469
+ let Fe;
2470
+ e[85] !== oe || e[86] !== Te ? (Fe = /* @__PURE__ */ F(De.Item, { className: G.contextFormItem, label: ce, required: !0, ...oe, children: Te }), e[85] = oe, e[86] = Te, e[87] = Fe) : Fe = e[87];
2471
+ const xe = k ? Q : D, we = k ? D : Q;
2472
+ let ye;
2473
+ e[88] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ye = /* @__PURE__ */ F(qe, { text: "估值日" }), e[88] = ye) : ye = e[88];
2474
+ let Ce;
2475
+ e[89] !== o.valuationDate ? (Ce = Ze(o.valuationDate), e[89] = o.valuationDate, e[90] = Ce) : Ce = e[90];
2476
+ let fe;
2477
+ e[91] !== n.valuationDate ? (fe = n.valuationDate ? He(n.valuationDate) : null, e[91] = n.valuationDate, e[92] = fe) : fe = e[92];
2478
+ let be;
2479
+ e[93] !== B ? (be = (J) => {
2480
+ const Ae = Array.isArray(J) ? J[0] : J;
2481
+ B("valuationDate", Ae?.format("YYYY-MM-DD") ?? null);
2482
+ }, e[93] = B, e[94] = be) : be = e[94];
2483
+ let re;
2484
+ e[95] !== M || e[96] !== fe || e[97] !== be ? (re = /* @__PURE__ */ F(_e, { "aria-label": "估值日", allowClear: !0, disabled: M, value: fe, onChange: be }), e[95] = M, e[96] = fe, e[97] = be, e[98] = re) : re = e[98];
2485
+ let he;
2486
+ e[99] !== Ce || e[100] !== re ? (he = /* @__PURE__ */ F(De.Item, { className: G.contextFormItem, label: ye, required: !0, ...Ce, children: re }), e[99] = Ce, e[100] = re, e[101] = he) : he = e[101];
2487
+ let ve;
2488
+ return e[102] !== K || e[103] !== ne || e[104] !== le || e[105] !== Fe || e[106] !== xe || e[107] !== we || e[108] !== he ? (ve = /* @__PURE__ */ ke(De, { component: "div", layout: "horizontal", labelAlign: K, labelCol: j, wrapperCol: ne, colon: !1, requiredMark: !0, className: le, classNames: se, children: [
2489
+ Fe,
2490
+ xe,
2491
+ we,
2492
+ he
2493
+ ] }), e[102] = K, e[103] = ne, e[104] = le, e[105] = Fe, e[106] = xe, e[107] = we, e[108] = he, e[109] = ve) : ve = e[109], ve;
2494
+ }
2495
+ function _n(r) {
2496
+ return r.map($n);
2497
+ }
2498
+ function $n(r) {
2499
+ return {
2500
+ label: du(r),
2501
+ value: r.key
2502
+ };
2503
+ }
2504
+ function In(r) {
2505
+ return {
2506
+ label: `${r.name}(${r.code})`,
2507
+ value: r.id
2508
+ };
2509
+ }
2510
+ function Rn(r) {
2511
+ const e = Y.c(17), {
2512
+ mode: u,
2513
+ layout: t,
2514
+ allDisabled: n,
2515
+ calculateDisabled: o,
2516
+ submitting: a,
2517
+ onReset: s,
2518
+ onNavigateToPricingPage: E,
2519
+ onCalculate: m
2520
+ } = r;
2521
+ let p;
2522
+ e[0] !== n || e[1] !== t || e[2] !== u || e[3] !== E || e[4] !== a ? (p = u === "multiple" || t === "horizontal" ? /* @__PURE__ */ F(Le, { className: G.navigateButton, icon: /* @__PURE__ */ F("span", { className: G.navigateIcon, "aria-hidden": "true" }), iconPlacement: "end", disabled: n || a || !E, onClick: E, children: "转定价界面" }) : null, e[0] = n, e[1] = t, e[2] = u, e[3] = E, e[4] = a, e[5] = p) : p = e[5];
2523
+ const g = n || a;
2524
+ let M;
2525
+ e[6] !== s || e[7] !== g ? (M = /* @__PURE__ */ F(Le, { disabled: g, onClick: s, children: "重置" }), e[6] = s, e[7] = g, e[8] = M) : M = e[8];
2526
+ const B = n || o;
2527
+ let k;
2528
+ e[9] !== m || e[10] !== a || e[11] !== B ? (k = /* @__PURE__ */ F(Le, { type: "primary", loading: a, disabled: B, onClick: m, children: "计算" }), e[9] = m, e[10] = a, e[11] = B, e[12] = k) : k = e[12];
2529
+ let R;
2530
+ return e[13] !== p || e[14] !== M || e[15] !== k ? (R = /* @__PURE__ */ ke("div", { className: G.footer, children: [
2531
+ p,
2532
+ M,
2533
+ k
2534
+ ] }), e[13] = p, e[14] = M, e[15] = k, e[16] = R) : R = e[16], R;
2535
+ }
2536
+ const Pn = {
2537
+ environments: "定价环境",
2538
+ discountDefinitions: "无风险利率曲线定义",
2539
+ customDiscountCurves: "自定义无风险利率曲线",
2540
+ carbonDefinitions: "碳金融远期价格曲线定义",
2541
+ customCarbonCurves: "自定义碳金融远期价格曲线"
2542
+ };
2543
+ function Ln(r) {
2544
+ const e = Y.c(9), {
2545
+ resources: u,
2546
+ onRetry: t
2547
+ } = r;
2548
+ let n;
2549
+ e[0] !== u ? (n = Object.keys(u), e[0] = u, e[1] = n) : n = e[1];
2550
+ const o = n;
2551
+ let a;
2552
+ e[2] !== u || e[3] !== o ? (a = o.filter((m) => u[m].status === "error"), e[2] = u, e[3] = o, e[4] = a) : a = e[4];
2553
+ const s = a;
2554
+ if (s.length === 0)
2555
+ return null;
2556
+ let E;
2557
+ return e[5] !== s || e[6] !== t || e[7] !== u ? (E = /* @__PURE__ */ F("div", { className: G.resourceIssues, "aria-label": "资源加载异常", children: s.map((m) => {
2558
+ const p = u[m], g = p.attempts >= lu;
2559
+ return /* @__PURE__ */ F(Ye, { type: "error", showIcon: !0, title: `${Pn[m]}加载失败`, description: g ? `${p.error ?? "未知错误"}(已达到 3 次尝试上限)` : p.error, action: /* @__PURE__ */ F(Le, { size: "small", disabled: g, onClick: () => t(m), children: "重试" }) }, m);
2560
+ }) }), e[5] = s, e[6] = t, e[7] = u, e[8] = E) : E = e[8], E;
2561
+ }
2562
+ function ze(r) {
2563
+ return {
2564
+ status: "idle",
2565
+ data: r,
2566
+ error: null,
2567
+ attempts: 0
2568
+ };
2569
+ }
2570
+ function Nn(r) {
2571
+ return {
2572
+ context: {
2573
+ ...vu
2574
+ },
2575
+ contextErrors: {},
2576
+ resources: {
2577
+ environments: ze([]),
2578
+ discountDefinitions: ze([]),
2579
+ customDiscountCurves: ze([]),
2580
+ carbonDefinitions: ze([]),
2581
+ customCarbonCurves: ze([])
2582
+ },
2583
+ environmentCurvesStatus: "idle",
2584
+ environmentCurvesError: null,
2585
+ environmentCurvesAttempts: 0,
2586
+ resultByContractId: Object.fromEntries(r.map((e) => [e, {
2587
+ contractId: e,
2588
+ status: "idle",
2589
+ result: null,
2590
+ message: null,
2591
+ resultInputVersion: null
2592
+ }])),
2593
+ inputVersion: 0,
2594
+ submitting: !1
2595
+ };
2596
+ }
2597
+ function Nu(r) {
2598
+ return Object.fromEntries(Object.keys(r.resultByContractId).map((e) => [e, {
2599
+ contractId: e,
2600
+ status: "idle",
2601
+ result: null,
2602
+ message: null,
2603
+ resultInputVersion: null
2604
+ }]));
2605
+ }
2606
+ function On(r, e) {
2607
+ switch (e.type) {
2608
+ case "resource/loading": {
2609
+ const u = r.resources[e.key];
2610
+ return {
2611
+ ...r,
2612
+ resources: {
2613
+ ...r.resources,
2614
+ [e.key]: {
2615
+ ...u,
2616
+ status: "loading",
2617
+ error: null,
2618
+ attempts: u.attempts + 1
2619
+ }
2620
+ }
2621
+ };
2622
+ }
2623
+ case "resource/success":
2624
+ return {
2625
+ ...r,
2626
+ resources: {
2627
+ ...r.resources,
2628
+ [e.key]: {
2629
+ ...r.resources[e.key],
2630
+ status: e.data.length === 0 ? "empty" : "success",
2631
+ data: e.data,
2632
+ error: null
2633
+ }
2634
+ }
2635
+ };
2636
+ case "resource/error":
2637
+ return {
2638
+ ...r,
2639
+ resources: {
2640
+ ...r.resources,
2641
+ [e.key]: {
2642
+ ...r.resources[e.key],
2643
+ status: "error",
2644
+ error: e.error
2645
+ }
2646
+ }
2647
+ };
2648
+ case "context/set": {
2649
+ const u = e.field === "pricingEnvironment", t = {
2650
+ ...r.context,
2651
+ [e.field]: e.value,
2652
+ ...u ? {
2653
+ discountCurve: null,
2654
+ carbonForwardCurve: null
2655
+ } : void 0
2656
+ }, n = {
2657
+ ...r.contextErrors
2658
+ };
2659
+ return delete n[e.field], u && (delete n.discountCurve, delete n.carbonForwardCurve), {
2660
+ ...r,
2661
+ context: t,
2662
+ contextErrors: n,
2663
+ environmentCurvesStatus: u ? "idle" : r.environmentCurvesStatus,
2664
+ environmentCurvesError: u ? null : r.environmentCurvesError,
2665
+ environmentCurvesAttempts: u ? 0 : r.environmentCurvesAttempts,
2666
+ resultByContractId: Nu(r),
2667
+ inputVersion: r.inputVersion + 1,
2668
+ submitting: !1
2669
+ };
2670
+ }
2671
+ case "context/errors":
2672
+ return {
2673
+ ...r,
2674
+ contextErrors: e.errors
2675
+ };
2676
+ case "environment-curves/loading":
2677
+ return {
2678
+ ...r,
2679
+ environmentCurvesStatus: "loading",
2680
+ environmentCurvesError: null,
2681
+ environmentCurvesAttempts: r.environmentCurvesAttempts + 1
2682
+ };
2683
+ case "environment-curves/error":
2684
+ return {
2685
+ ...r,
2686
+ environmentCurvesStatus: "error",
2687
+ environmentCurvesError: e.error
2688
+ };
2689
+ case "environment-curves/success":
2690
+ return {
2691
+ ...r,
2692
+ context: {
2693
+ ...r.context,
2694
+ discountCurve: e.discountCurve,
2695
+ carbonForwardCurve: e.carbonForwardCurve
2696
+ },
2697
+ environmentCurvesStatus: e.discountCurve && e.carbonForwardCurve ? "success" : "empty",
2698
+ environmentCurvesError: null,
2699
+ environmentCurvesAttempts: 0
2700
+ };
2701
+ case "calculation/submitting":
2702
+ return {
2703
+ ...r,
2704
+ submitting: !0,
2705
+ resultByContractId: Object.fromEntries(e.contractIds.map((u) => [u, {
2706
+ contractId: u,
2707
+ status: "submitting",
2708
+ result: null,
2709
+ message: null,
2710
+ resultInputVersion: null
2711
+ }]))
2712
+ };
2713
+ case "calculation/settled":
2714
+ return {
2715
+ ...r,
2716
+ submitting: !1,
2717
+ resultByContractId: e.results
2718
+ };
2719
+ case "reset":
2720
+ return {
2721
+ ...r,
2722
+ context: {
2723
+ ...vu
2724
+ },
2725
+ contextErrors: {},
2726
+ environmentCurvesStatus: "idle",
2727
+ environmentCurvesError: null,
2728
+ environmentCurvesAttempts: 0,
2729
+ resultByContractId: Nu(r),
2730
+ inputVersion: r.inputVersion + 1,
2731
+ submitting: !1
2732
+ };
2733
+ }
2734
+ }
2735
+ const Vn = "3", zn = "11";
2736
+ function Ie(r) {
2737
+ return typeof r == "object" && r !== null;
2738
+ }
2739
+ function Yn(r) {
2740
+ return Ie(r) && typeof r.key == "string" && typeof r.id == "string" && typeof r.label == "string" && (r.kind === "discount" || r.kind === "carbonForward") && (r.source === "definition" || r.source === "custom") && Ie(r.requestMapping);
2741
+ }
2742
+ function Gn(r) {
2743
+ return !Array.isArray(r) && Ie(r) && Ie(r.discountCurve) && Ie(r.carbonForwardCurve);
2744
+ }
2745
+ function _t(r, e, u) {
2746
+ const t = r && e ? `${e}(${r})` : e || r;
2747
+ return u ? `${t}-${Su(u)}` : t;
2748
+ }
2749
+ function eu(r, e) {
2750
+ return Array.isArray(r) ? r.flatMap((u) => {
2751
+ if (Yn(u)) return [u];
2752
+ if (!Ie(u)) return [];
2753
+ const t = u[e.idField];
2754
+ if (t == null || t === "") return [];
2755
+ const n = String(t), o = String(u.code ?? ""), a = String(u.name ?? ""), s = String(u.currency ?? ""), E = e.source === "custom" && typeof u.createDate == "string" ? u.createDate : void 0, m = e.source === "custom" && typeof u.executeDay == "string" ? u.executeDay : void 0, p = {
2756
+ [e.idField]: n
2757
+ };
2758
+ return [{
2759
+ key: `${e.kind}:${e.source}:${n}`,
2760
+ id: n,
2761
+ label: _t(o, a, m),
2762
+ code: o,
2763
+ name: a,
2764
+ kind: e.kind,
2765
+ source: e.source,
2766
+ currency: s,
2767
+ createDate: E,
2768
+ executeDay: m,
2769
+ requestMapping: p
2770
+ }];
2771
+ }) : [];
2772
+ }
2773
+ function Hn(r) {
2774
+ return Array.isArray(r) ? r.flatMap((e) => {
2775
+ if (!Ie(e)) return [];
2776
+ const u = e, t = u.id ?? ("pricingEnvId" in u ? u.pricingEnvId : "");
2777
+ return t === "" || t === null || t === void 0 ? [] : [{
2778
+ ...u,
2779
+ // 真实接口使用 pricingEnvId,组件内部统一使用字符串 id 维护 Select 值和联动请求。
2780
+ id: String(t)
2781
+ }];
2782
+ }) : [];
2783
+ }
2784
+ function Un(r) {
2785
+ return eu(r, {
2786
+ idField: "disCurveDefId",
2787
+ kind: "discount",
2788
+ source: "definition"
2789
+ });
2790
+ }
2791
+ function Wn(r) {
2792
+ return eu(r, {
2793
+ idField: "disCurveId",
2794
+ kind: "discount",
2795
+ source: "custom"
2796
+ });
2797
+ }
2798
+ function Zn(r) {
2799
+ return eu(r, {
2800
+ idField: "comCurveDefId",
2801
+ kind: "carbonForward",
2802
+ source: "definition"
2803
+ });
2804
+ }
2805
+ function qn(r) {
2806
+ return eu(r, {
2807
+ idField: "comCurveId",
2808
+ kind: "carbonForward",
2809
+ source: "custom"
2810
+ });
2811
+ }
2812
+ function Ou(r, e) {
2813
+ const u = String(r.curveId);
2814
+ return {
2815
+ id: u,
2816
+ label: _t(String(r.curveCode ?? ""), String(r.curveName ?? "")),
2817
+ code: String(r.curveCode ?? ""),
2818
+ name: String(r.curveName ?? ""),
2819
+ kind: e.kind,
2820
+ source: "definition",
2821
+ requestMapping: e.requestMapping(u)
2822
+ };
2823
+ }
2824
+ function jn(r) {
2825
+ if (r === null) return null;
2826
+ if (Gn(r)) return r;
2827
+ if (!Array.isArray(r)) return null;
2828
+ const e = r.find((t) => String(t.curveType) === Vn), u = r.find((t) => String(t.curveType) === zn);
2829
+ return !e?.curveId || !u?.curveId ? null : {
2830
+ discountCurve: Ou(e, {
2831
+ kind: "discount",
2832
+ requestMapping: (t) => ({
2833
+ disCurveDefId: t
2834
+ })
2835
+ }),
2836
+ carbonForwardCurve: Ou(u, {
2837
+ kind: "carbonForward",
2838
+ requestMapping: (t) => ({
2839
+ comCurveDefId: t
2840
+ })
2841
+ })
2842
+ };
2843
+ }
2844
+ function Vu(r) {
2845
+ return {
2846
+ disCurveDefId: "disCurveDefId" in r ? r.disCurveDefId : "",
2847
+ disCurveId: "disCurveId" in r ? r.disCurveId : "",
2848
+ comCurveDefId: "comCurveDefId" in r ? r.comCurveDefId : "",
2849
+ comCurveId: "comCurveId" in r ? r.comCurveId : ""
2850
+ };
2851
+ }
2852
+ function Xn(r, e) {
2853
+ const {
2854
+ pricingEnvironment: u,
2855
+ discountCurve: t,
2856
+ carbonForwardCurve: n,
2857
+ valuationDate: o
2858
+ } = e;
2859
+ if (!u || !t || !n || !o)
2860
+ return [];
2861
+ const a = Vu(t.requestMapping), s = Vu(n.requestMapping), E = {
2862
+ valDate: Ct(o),
2863
+ disCurveDefId: a.disCurveDefId,
2864
+ disCurveId: a.disCurveId,
2865
+ comCurveDefId: s.comCurveDefId,
2866
+ comCurveId: s.comCurveId
2867
+ };
2868
+ return r.map((m) => ({
2869
+ astType: "",
2870
+ targtAllVarCodeSum: m.targtAllVarCodeSum,
2871
+ scrtyCode: m.scrtyCode,
2872
+ currency: m.currency,
2873
+ fwdMaturityDate: m.fwdMaturityDate,
2874
+ settleDate: m.settleDate,
2875
+ physicalDelivery: m.physicalDelivery,
2876
+ direction: m.direction,
2877
+ fwdDlvPrice: m.fwdDlvPrice,
2878
+ targtVol: m.targtVol,
2879
+ ...m.productType ? {
2880
+ productType: m.productType
2881
+ } : {},
2882
+ ...m.instrumentId ? {
2883
+ instrumentId: m.instrumentId
2884
+ } : {},
2885
+ ...m.instrumentCode ? {
2886
+ instrumentCode: m.instrumentCode
2887
+ } : {},
2888
+ ...m.instrumentName ? {
2889
+ instrumentName: m.instrumentName
2890
+ } : {},
2891
+ ...m.tradeContpId ? {
2892
+ tradeContpId: m.tradeContpId
2893
+ } : {},
2894
+ ...E
2895
+ }));
2896
+ }
2897
+ function je(r) {
2898
+ return r == null || r === "" ? null : String(r);
2899
+ }
2900
+ function Qn(r, e, u) {
2901
+ if (!e || typeof e != "object")
2902
+ return {
2903
+ contractId: r,
2904
+ status: "error",
2905
+ result: null,
2906
+ message: "未返回计算结果",
2907
+ resultInputVersion: u
2908
+ };
2909
+ const t = e.code, n = t == null || t === 0 || t === 200 || t === "0" || t === "200", o = [e.npv, e.forwardPrice, e.discountFactor, e.maturityTime].some((a) => a != null && a !== "");
2910
+ return !n || !o ? {
2911
+ contractId: r,
2912
+ status: "error",
2913
+ result: null,
2914
+ message: e.msg ?? "定价计算失败",
2915
+ resultInputVersion: u
2916
+ } : {
2917
+ contractId: r,
2918
+ status: "success",
2919
+ result: {
2920
+ npv: je(e.npv),
2921
+ forwardPrice: je(e.forwardPrice),
2922
+ discountFactor: je(e.discountFactor),
2923
+ maturityTime: je(e.maturityTime)
2924
+ },
2925
+ message: e.msg ?? null,
2926
+ resultInputVersion: u
2927
+ };
2928
+ }
2929
+ function Jn(r, e, u) {
2930
+ return Object.fromEntries(r.map((t, n) => [t, Qn(t, e[n], u)]));
2931
+ }
2932
+ const zu = {
2933
+ environments: "定价环境加载失败",
2934
+ discountDefinitions: "无风险利率曲线定义加载失败",
2935
+ customDiscountCurves: "自定义无风险利率曲线加载失败",
2936
+ carbonDefinitions: "碳金融远期价格曲线定义加载失败",
2937
+ customCarbonCurves: "自定义碳金融远期价格曲线加载失败"
2938
+ };
2939
+ function Kn(r) {
2940
+ if (r && typeof r == "object" && "response" in r) {
2941
+ const e = r.response;
2942
+ if (e && typeof e == "object" && "data" in e) {
2943
+ const u = e.data;
2944
+ if (u && typeof u == "object" && "msg" in u && typeof u.msg == "string" && u.msg.trim())
2945
+ return u.msg;
2946
+ }
2947
+ }
2948
+ return r instanceof Error && r.message ? r.message : "定价服务请求失败";
2949
+ }
2950
+ function $e(r, e) {
2951
+ return e;
2952
+ }
2953
+ function eo(r) {
2954
+ const {
2955
+ contracts: e,
2956
+ productType: u,
2957
+ dataSource: t
2958
+ } = r, [n, o] = Ht(On, void 0, () => Nn(e.map((i) => i.contractId))), a = te(!0), s = te(0), E = te(0), m = te(null), p = te(null), g = te(null), M = te(/* @__PURE__ */ new Map()), [B, k] = Oe(0), R = te(/* @__PURE__ */ new Map());
2959
+ pe(() => () => {
2960
+ a.current = !1, p.current?.abort(), g.current?.abort(), M.current.forEach((i) => i.abort());
2961
+ }, []);
2962
+ const y = ge(async (i) => {
2963
+ if (n.resources[i].attempts >= lu) return;
2964
+ o({
2965
+ type: "resource/loading",
2966
+ key: i
2967
+ }), M.current.get(i)?.abort();
2968
+ const l = new AbortController();
2969
+ M.current.set(i, l);
2970
+ try {
2971
+ let d;
2972
+ switch (i) {
2973
+ case "environments": {
2974
+ const D = await t.listPricingEnvironments({
2975
+ status: !0
2976
+ }, {
2977
+ signal: l.signal
2978
+ });
2979
+ d = Hn($e("listPricingEnvironments", D));
2980
+ break;
2981
+ }
2982
+ case "discountDefinitions": {
2983
+ const D = await t.listDiscountCurveDefinitions({
2984
+ type: "3",
2985
+ status: !0
2986
+ }, {
2987
+ signal: l.signal
2988
+ });
2989
+ d = Un($e("listDiscountCurveDefinitions", D));
2990
+ break;
2991
+ }
2992
+ case "customDiscountCurves": {
2993
+ const D = await t.listCustomDiscountCurves({
2994
+ type: "3",
2995
+ isCustom: !0
2996
+ }, {
2997
+ signal: l.signal
2998
+ });
2999
+ d = Wn($e("listCustomDiscountCurves", D));
3000
+ break;
3001
+ }
3002
+ case "carbonDefinitions": {
3003
+ const D = await t.listCarbonForwardCurveDefinitions({
3004
+ type: "11",
3005
+ status: !0
3006
+ }, {
3007
+ signal: l.signal
3008
+ });
3009
+ d = Zn($e("listCarbonForwardCurveDefinitions", D));
3010
+ break;
3011
+ }
3012
+ case "customCarbonCurves": {
3013
+ const D = await t.listCustomCarbonForwardCurves({
3014
+ type: "11",
3015
+ isCustom: !0
3016
+ }, {
3017
+ signal: l.signal
3018
+ });
3019
+ d = qn($e("listCustomCarbonForwardCurves", D));
3020
+ break;
3021
+ }
3022
+ }
3023
+ a.current && o({
3024
+ type: "resource/success",
3025
+ key: i,
3026
+ data: d
3027
+ });
3028
+ } catch (d) {
3029
+ a.current && !l.signal.aborted && o({
3030
+ type: "resource/error",
3031
+ key: i,
3032
+ error: d instanceof Error ? d.message : zu[i]
3033
+ });
3034
+ }
3035
+ }, [t, n.resources]), _ = te(!1);
3036
+ pe(() => {
3037
+ _.current || (_.current = !0, Promise.allSettled(Object.keys(zu).map((i) => y(i))));
3038
+ }, [y]);
3039
+ const b = Pe(() => [...n.resources.discountDefinitions.data, ...n.resources.customDiscountCurves.data, ...n.resources.carbonDefinitions.data, ...n.resources.customCarbonCurves.data], [n.resources]), T = Pe(() => b.filter((i) => i.kind === "discount"), [b]), P = Pe(() => b.filter((i) => i.kind === "carbonForward"), [b]), I = te(b);
3040
+ pe(() => {
3041
+ I.current = b;
3042
+ }, [b]);
3043
+ const L = ge((i, l) => I.current.find((d) => d.kind === i.kind && (d.id === i.id || d.key === i.id)) ?? {
3044
+ ...i,
3045
+ key: `${i.kind}:${i.source}:${i.id}`,
3046
+ currency: l
3047
+ }, []), h = n.context.pricingEnvironment;
3048
+ pe(() => {
3049
+ if (!h || !u) return;
3050
+ g.current?.abort();
3051
+ const i = new AbortController();
3052
+ g.current = i;
3053
+ const l = ++s.current, d = JSON.stringify([h.id, u]);
3054
+ o({
3055
+ type: "environment-curves/loading"
3056
+ });
3057
+ let D = R.current.get(d);
3058
+ return D || (D = t.getEnvironmentCurveSelection({
3059
+ pricingEnvId: h.id,
3060
+ productType: u
3061
+ }, {
3062
+ signal: i.signal
3063
+ }).then((S) => jn($e("getEnvironmentCurveSelection", S))), R.current.set(d, D)), D.then((S) => {
3064
+ !a.current || l !== s.current || o({
3065
+ type: "environment-curves/success",
3066
+ discountCurve: S ? L(S.discountCurve, h.currency) : null,
3067
+ carbonForwardCurve: S ? L(S.carbonForwardCurve, h.currency) : null
3068
+ });
3069
+ }).catch((S) => {
3070
+ R.current.delete(d), !i.signal.aborted && (!a.current || l !== s.current || o({
3071
+ type: "environment-curves/error",
3072
+ error: S instanceof Error ? S.message : "环境关联曲线加载失败"
3073
+ }));
3074
+ }), () => i.abort();
3075
+ }, [t, B, u, L, h]);
3076
+ const w = te(u);
3077
+ pe(() => {
3078
+ w.current !== u && (w.current = u, n.context.pricingEnvironment && o({
3079
+ type: "context/set",
3080
+ field: "pricingEnvironment",
3081
+ value: n.context.pricingEnvironment
3082
+ }));
3083
+ }, [u, n.context.pricingEnvironment]);
3084
+ const $ = te(n.context);
3085
+ pe(() => {
3086
+ $.current = n.context;
3087
+ }, [n.context]);
3088
+ const v = ge((i, l) => {
3089
+ const d = $.current[i];
3090
+ d === l || d != null && l != null && typeof d == "object" && typeof l == "object" && ("key" in d && "key" in l && d.key === l.key || "id" in d && "id" in l && d.id === l.id) || (i === "pricingEnvironment" && l && console.log("[IndicativePricingforSelectedContracts] selected pricing environment id:", l.id), $.current = {
3091
+ ...$.current,
3092
+ [i]: l
3093
+ }, E.current += 1, p.current?.abort(), m.current = null, o({
3094
+ type: "context/set",
3095
+ field: i,
3096
+ value: l
3097
+ }));
3098
+ }, []), A = te(!1);
3099
+ pe(() => {
3100
+ const i = n.resources.environments;
3101
+ if (A.current || i.status !== "success" && i.status !== "empty" || (A.current = !0, n.context.pricingEnvironment)) return;
3102
+ const l = i.data.find((d) => d.isDefaultForSelf === !0);
3103
+ l && v("pricingEnvironment", l);
3104
+ }, [v, n.context.pricingEnvironment, n.resources.environments]);
3105
+ const C = ge(async () => {
3106
+ if (!a.current) return {
3107
+ kind: "cancelled"
3108
+ };
3109
+ if (m.current !== null)
3110
+ return {
3111
+ kind: "blocked",
3112
+ reason: "submitting"
3113
+ };
3114
+ if (e.length === 0) return {
3115
+ kind: "empty"
3116
+ };
3117
+ const i = $.current, l = kn(i), d = wn(i.valuationDate, e);
3118
+ if (!d.valid && d.message && (l.valuationDate = [d.message]), o({
3119
+ type: "context/errors",
3120
+ errors: l
3121
+ }), Object.keys(l).length > 0)
3122
+ return {
3123
+ kind: "invalid"
3124
+ };
3125
+ const D = Xn(e, i), S = n.inputVersion, x = ++E.current;
3126
+ m.current = x, p.current?.abort();
3127
+ const O = new AbortController();
3128
+ p.current = O, o({
3129
+ type: "calculation/submitting",
3130
+ contractIds: e.map((V) => V.contractId)
3131
+ });
3132
+ try {
3133
+ const V = $e("calculate", await t.calculate(D, {
3134
+ signal: O.signal
3135
+ }));
3136
+ if (!a.current || x !== E.current)
3137
+ return {
3138
+ kind: "cancelled"
3139
+ };
3140
+ const z = Array.isArray(V) ? V : [], W = Jn(e.map((U) => U.contractId), z, S);
3141
+ return o({
3142
+ type: "calculation/settled",
3143
+ results: W
3144
+ }), {
3145
+ kind: "success",
3146
+ hasErrors: Object.values(W).some((U) => U.status === "error"),
3147
+ hasExtraItems: z.length > e.length
3148
+ };
3149
+ } catch (V) {
3150
+ if (!a.current || x !== E.current)
3151
+ return {
3152
+ kind: "cancelled"
3153
+ };
3154
+ const z = Kn(V), W = Object.fromEntries(e.map((U) => [U.contractId, {
3155
+ contractId: U.contractId,
3156
+ status: "error",
3157
+ result: null,
3158
+ message: z,
3159
+ resultInputVersion: S
3160
+ }]));
3161
+ return o({
3162
+ type: "calculation/settled",
3163
+ results: W
3164
+ }), {
3165
+ kind: "requestError"
3166
+ };
3167
+ } finally {
3168
+ m.current === x && (m.current = null);
3169
+ }
3170
+ }, [e, t, n.inputVersion]), N = ge(() => m.current !== null, []), f = ge(() => {
3171
+ E.current += 1, p.current?.abort(), m.current = null, s.current += 1, g.current?.abort(), $.current = {
3172
+ ...vu
3173
+ }, o({
3174
+ type: "reset"
3175
+ });
3176
+ }, []), c = Object.keys(n.resources).every((i) => n.resources[i].status !== "idle" && n.resources[i].status !== "loading");
3177
+ return {
3178
+ state: n,
3179
+ initialized: c,
3180
+ discountCurves: T,
3181
+ carbonForwardCurves: P,
3182
+ setContext: v,
3183
+ retryResource: y,
3184
+ retryEnvironmentCurves: () => {
3185
+ if (!h || n.environmentCurvesAttempts >= lu)
3186
+ return;
3187
+ const i = JSON.stringify([h.id, u]);
3188
+ R.current.delete(i), k((l) => l + 1);
3189
+ },
3190
+ calculate: C,
3191
+ isCalculating: N,
3192
+ reset: f
3193
+ };
3194
+ }
3195
+ const uo = ee(function(e, u) {
3196
+ const t = Y.c(112), {
3197
+ mode: n,
3198
+ layout: o,
3199
+ productType: a,
3200
+ contractData: s,
3201
+ dataSource: E,
3202
+ showFooter: m,
3203
+ onNavigateToPricingPage: p,
3204
+ className: g,
3205
+ style: M
3206
+ } = e, B = n === void 0 ? "multiple" : n, k = o === void 0 ? "horizontal" : o, R = m === void 0 ? !0 : m, y = B === "single" && k === "vertical", _ = B === "single" && k === "horizontal", b = B === "multiple" ? G.multiple : y ? G.single : G.fixedSingle, {
3207
+ message: T
3208
+ } = pu.useApp();
3209
+ let P;
3210
+ t[0] !== s || t[1] !== B ? (P = () => Object.freeze((B === "multiple" ? [...s] : s.slice(0, 1)).map(to)), t[0] = s, t[1] = B, t[2] = P) : P = t[2];
3211
+ const [I] = Oe(P);
3212
+ let L;
3213
+ t[3] !== s.length ? (L = () => s.length, t[3] = s.length, t[4] = L) : L = t[4];
3214
+ const [h] = Oe(L), w = B === "multiple" && h > sr;
3215
+ let $;
3216
+ t[5] !== I || t[6] !== w ? ($ = w ? [] : I, t[5] = I, t[6] = w, t[7] = $) : $ = t[7];
3217
+ const v = $;
3218
+ let A;
3219
+ t[8] !== v || t[9] !== E || t[10] !== a ? (A = {
3220
+ contracts: v,
3221
+ productType: a,
3222
+ dataSource: E
3223
+ }, t[8] = v, t[9] = E, t[10] = a, t[11] = A) : A = t[11];
3224
+ const C = eo(A), {
3225
+ calculate: N,
3226
+ initialized: f,
3227
+ isCalculating: c,
3228
+ reset: i,
3229
+ state: l
3230
+ } = C, d = te(!1);
3231
+ let D, S;
3232
+ t[12] !== v.length || t[13] !== T || t[14] !== w ? (D = () => {
3233
+ v.length === 0 && !w && !d.current && (d.current = !0, T.warning("请先选择一笔合约"));
3234
+ }, S = [v.length, T, w], t[12] = v.length, t[13] = T, t[14] = w, t[15] = D, t[16] = S) : (D = t[15], S = t[16]), pe(D, S);
3235
+ const x = v.length === 0 || w, O = !C.initialized || l.submitting || l.environmentCurvesStatus === "loading", V = [l.resources.discountDefinitions.status, l.resources.customDiscountCurves.status, l.resources.carbonDefinitions.status, l.resources.customCarbonCurves.status].some(ro), z = l.environmentCurvesStatus === "loading";
3236
+ let W;
3237
+ t[17] !== x || t[18] !== c || t[19] !== i ? (W = () => x || c() ? !1 : (i(), !0), t[17] = x, t[18] = c, t[19] = i, t[20] = W) : W = t[20];
3238
+ const U = W;
3239
+ let X;
3240
+ t[21] !== x || t[22] !== s || t[23] !== c || t[24] !== T || t[25] !== p || t[26] !== a ? (X = () => {
3241
+ if (x || c())
3242
+ return !1;
3243
+ const re = s.map(no).filter(oo);
3244
+ if (re.length === 0)
3245
+ return T.info("所选合约成交编号为空,请返回重新选择"), !1;
3246
+ const he = re.length < s.length, ve = `/price-contracts-list?productType=${encodeURIComponent(a)}&instrumentCodes=${encodeURIComponent(re.join("&"))}&partialInstrumentCodeEmpty=${he}`;
3247
+ return p ? p(ve) : window.parent?.postMessage({
3248
+ event: "g-navigate",
3249
+ payload: {
3250
+ appId: "GZ0303",
3251
+ routePath: ve
3252
+ },
3253
+ timestamp: Date.now()
3254
+ }, "*"), !0;
3255
+ }, t[21] = x, t[22] = s, t[23] = c, t[24] = T, t[25] = p, t[26] = a, t[27] = X) : X = t[27];
3256
+ const Z = X;
3257
+ let q;
3258
+ t[28] !== N || t[29] !== v.length || t[30] !== z || t[31] !== f || t[32] !== c || t[33] !== T || t[34] !== w ? (q = async () => {
3259
+ if (w)
3260
+ return {
3261
+ kind: "blocked",
3262
+ reason: "overLimit"
3263
+ };
3264
+ if (v.length === 0)
3265
+ return {
3266
+ kind: "empty"
3267
+ };
3268
+ if (c())
3269
+ return {
3270
+ kind: "blocked",
3271
+ reason: "submitting"
3272
+ };
3273
+ if (!f || z)
3274
+ return {
3275
+ kind: "blocked",
3276
+ reason: "loading"
3277
+ };
3278
+ const re = await N();
3279
+ return re.kind === "invalid" ? T.error("请完成所有定价要素配置") : re.kind === "success" && re.hasExtraItems && T.warning("定价服务返回了多余结果,已按请求顺序忽略"), re;
3280
+ }, t[28] = N, t[29] = v.length, t[30] = z, t[31] = f, t[32] = c, t[33] = T, t[34] = w, t[35] = q) : q = t[35];
3281
+ const H = q;
3282
+ let Q, K;
3283
+ t[36] !== H || t[37] !== Z || t[38] !== U ? (Q = () => ({
3284
+ reset: U,
3285
+ navigateToPricingPage: Z,
3286
+ calculate: H
3287
+ }), K = [H, Z, U], t[36] = H, t[37] = Z, t[38] = U, t[39] = Q, t[40] = K) : (Q = t[39], K = t[40]), Ut(u, Q, K);
3288
+ let j;
3289
+ e: {
3290
+ if (w) {
3291
+ let J;
3292
+ t[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ F("div", { className: G.emptyState, children: /* @__PURE__ */ F(Ve, { description: "合约数量超出支持范围" }) }), t[41] = J) : J = t[41], j = J;
3293
+ break e;
3294
+ }
3295
+ if (v.length === 0) {
3296
+ let J;
3297
+ t[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ F("div", { className: G.emptyState, children: /* @__PURE__ */ F(Ve, { description: "请先选择一笔合约" }) }), t[42] = J) : J = t[42], j = J;
3298
+ break e;
3299
+ }
3300
+ if (_) {
3301
+ const J = v[0], Ae = l.resultByContractId[J.contractId], tu = !C.initialized || l.submitting;
3302
+ let Ue;
3303
+ t[43] !== J || t[44] !== Ae || t[45] !== tu ? (Ue = /* @__PURE__ */ F(fn, { contract: J, calculation: Ae, loading: tu }), t[43] = J, t[44] = Ae, t[45] = tu, t[46] = Ue) : Ue = t[46], j = Ue;
3304
+ break e;
3305
+ }
3306
+ const re = B === "single", he = !C.initialized || l.submitting;
3307
+ let ve;
3308
+ t[47] !== v || t[48] !== l.resultByContractId || t[49] !== re || t[50] !== he ? (ve = /* @__PURE__ */ F(Bn, { single: re, contracts: v, results: l.resultByContractId, loading: he }), t[47] = v, t[48] = l.resultByContractId, t[49] = re, t[50] = he, t[51] = ve) : ve = t[51], j = ve;
3309
+ }
3310
+ const ue = j;
3311
+ let ne;
3312
+ t[52] !== g || t[53] !== b ? (ne = gu(G.root, b, g), t[52] = g, t[53] = b, t[54] = ne) : ne = t[54];
3313
+ const le = l.submitting ? "submitting" : C.initialized ? "ready" : "loading", se = !C.initialized;
3314
+ let ce;
3315
+ t[55] !== y ? (ce = y ? null : /* @__PURE__ */ F("h3", { className: G.sectionTitle, children: "定价要素" }), t[55] = y, t[56] = ce) : ce = t[56];
3316
+ let oe;
3317
+ t[57] !== w || t[58] !== h ? (oe = w ? /* @__PURE__ */ F(Ye, { className: G.limitAlert, type: "error", showIcon: !0, title: `最多支持1000笔,当前${h}笔,请返回重新选择` }) : null, t[57] = w, t[58] = h, t[59] = oe) : oe = t[59];
3318
+ let Be;
3319
+ t[60] !== C ? (Be = (re) => {
3320
+ C.retryResource(re);
3321
+ }, t[60] = C, t[61] = Be) : Be = t[61];
3322
+ let me;
3323
+ t[62] !== l.resources || t[63] !== Be ? (me = /* @__PURE__ */ F(Ln, { resources: l.resources, onRetry: Be }), t[62] = l.resources, t[63] = Be, t[64] = me) : me = t[64];
3324
+ let Ee;
3325
+ t[65] !== C.retryEnvironmentCurves || t[66] !== l.environmentCurvesAttempts || t[67] !== l.environmentCurvesError || t[68] !== l.environmentCurvesStatus ? (Ee = l.environmentCurvesStatus === "error" ? /* @__PURE__ */ F(Ye, { type: "error", showIcon: !0, title: "环境关联曲线加载失败", description: l.environmentCurvesError, action: /* @__PURE__ */ F(Le, { size: "small", disabled: l.environmentCurvesAttempts >= 3, onClick: C.retryEnvironmentCurves, children: "重试" }) }) : null, t[65] = C.retryEnvironmentCurves, t[66] = l.environmentCurvesAttempts, t[67] = l.environmentCurvesError, t[68] = l.environmentCurvesStatus, t[69] = Ee) : Ee = t[69];
3326
+ const Se = l.resources.environments.status === "loading", Te = V || z;
3327
+ let Fe;
3328
+ t[70] !== C.carbonForwardCurves || t[71] !== C.discountCurves || t[72] !== C.setContext || t[73] !== z || t[74] !== k || t[75] !== B || t[76] !== l.context || t[77] !== l.contextErrors || t[78] !== l.resources.environments.data || t[79] !== l.submitting || t[80] !== Se || t[81] !== Te ? (Fe = /* @__PURE__ */ F(Mn, { mode: B, layout: k, value: l.context, errors: l.contextErrors, environments: l.resources.environments.data, discountCurves: C.discountCurves, carbonForwardCurves: C.carbonForwardCurves, environmentsLoading: Se, curvesLoading: Te, curvesDisabled: z, disabled: l.submitting, onChange: C.setContext }), t[70] = C.carbonForwardCurves, t[71] = C.discountCurves, t[72] = C.setContext, t[73] = z, t[74] = k, t[75] = B, t[76] = l.context, t[77] = l.contextErrors, t[78] = l.resources.environments.data, t[79] = l.submitting, t[80] = Se, t[81] = Te, t[82] = Fe) : Fe = t[82];
3329
+ let xe;
3330
+ t[83] !== ce || t[84] !== oe || t[85] !== me || t[86] !== Ee || t[87] !== Fe ? (xe = /* @__PURE__ */ ke("div", { className: G.section, children: [
3331
+ ce,
3332
+ oe,
3333
+ me,
3334
+ Ee,
3335
+ Fe
3336
+ ] }), t[83] = ce, t[84] = oe, t[85] = me, t[86] = Ee, t[87] = Fe, t[88] = xe) : xe = t[88];
3337
+ let we;
3338
+ t[89] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (we = /* @__PURE__ */ F("div", { className: G.sectionTitle, children: "定价结果" }), t[89] = we) : we = t[89];
3339
+ let ye;
3340
+ t[90] !== ue ? (ye = /* @__PURE__ */ ke("div", { className: G.section, children: [
3341
+ we,
3342
+ ue
3343
+ ] }), t[90] = ue, t[91] = ye) : ye = t[91];
3344
+ let Ce;
3345
+ t[92] !== x || t[93] !== O || t[94] !== H || t[95] !== Z || t[96] !== U || t[97] !== k || t[98] !== B || t[99] !== R || t[100] !== l.submitting ? (Ce = R ? /* @__PURE__ */ F(Rn, { mode: B, layout: k, allDisabled: x, calculateDisabled: O, submitting: l.submitting, onReset: U, onNavigateToPricingPage: Z, onCalculate: () => {
3346
+ H();
3347
+ } }) : null, t[92] = x, t[93] = O, t[94] = H, t[95] = Z, t[96] = U, t[97] = k, t[98] = B, t[99] = R, t[100] = l.submitting, t[101] = Ce) : Ce = t[101];
3348
+ let fe;
3349
+ t[102] !== se || t[103] !== xe || t[104] !== ye || t[105] !== Ce ? (fe = /* @__PURE__ */ ke(hu, { spinning: se, description: "定价资源加载中", children: [
3350
+ xe,
3351
+ ye,
3352
+ Ce
3353
+ ] }), t[102] = se, t[103] = xe, t[104] = ye, t[105] = Ce, t[106] = fe) : fe = t[106];
3354
+ let be;
3355
+ return t[107] !== M || t[108] !== ne || t[109] !== le || t[110] !== fe ? (be = /* @__PURE__ */ F("section", { className: ne, style: M, "aria-label": "交易合约试定价", "data-status": le, children: fe }), t[107] = M, t[108] = ne, t[109] = le, t[110] = fe, t[111] = be) : be = t[111], be;
3356
+ });
3357
+ uo.displayName = "IndicativePricingforSelectedContracts";
3358
+ function to(r, e) {
3359
+ return Object.freeze({
3360
+ ...r,
3361
+ contractId: `contract-${String(e + 1).padStart(3, "0")}`
3362
+ });
3363
+ }
3364
+ function ro(r) {
3365
+ return r === "loading";
3366
+ }
3367
+ function no(r) {
3368
+ return r.instrumentCode?.trim();
3369
+ }
3370
+ function oo(r) {
3371
+ return !!r;
3372
+ }
3373
+ const $t = ee((r, e) => {
3374
+ const u = Y.c(7);
3375
+ let t, n;
3376
+ u[0] !== r ? ({
3377
+ children: t,
3378
+ ...n
3379
+ } = r, u[0] = r, u[1] = t, u[2] = n) : (t = u[1], n = u[2]);
3380
+ let o;
3381
+ return u[3] !== t || u[4] !== e || u[5] !== n ? (o = /* @__PURE__ */ F(fu.Group, { ref: e, ...n, children: t }), u[3] = t, u[4] = e, u[5] = n, u[6] = o) : o = u[6], o;
3382
+ });
3383
+ $t.displayName = "GZRadioGroup";
3384
+ const It = ee((r, e) => {
3385
+ const u = Y.c(7);
3386
+ let t, n;
3387
+ u[0] !== r ? ({
3388
+ children: t,
3389
+ ...n
3390
+ } = r, u[0] = r, u[1] = t, u[2] = n) : (t = u[1], n = u[2]);
3391
+ const o = e;
3392
+ let a;
3393
+ return u[3] !== t || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ F(fu.Button, { ref: o, ...n, children: t }), u[3] = t, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
3394
+ });
3395
+ It.displayName = "GZRadioButton";
3396
+ const ao = ee((r, e) => {
3397
+ const u = Y.c(7);
3398
+ let t, n;
3399
+ u[0] !== r ? ({
3400
+ children: t,
3401
+ ...n
3402
+ } = r, u[0] = r, u[1] = t, u[2] = n) : (t = u[1], n = u[2]);
3403
+ const o = e;
3404
+ let a;
3405
+ return u[3] !== t || u[4] !== n || u[5] !== o ? (a = /* @__PURE__ */ F(fu, { ref: o, ...n, children: t }), u[3] = t, u[4] = n, u[5] = o, u[6] = a) : a = u[6], a;
3406
+ }), uu = ao;
3407
+ uu.Group = $t;
3408
+ uu.Button = It;
3409
+ uu.displayName = "GZRadio";
3410
+ const Yu = "-";
3411
+ function io(r, e) {
3412
+ const u = Date.parse(r), t = Date.parse(e);
3413
+ return Number.isFinite(u) && Number.isFinite(t) ? u - t : r.localeCompare(e);
3414
+ }
3415
+ function lo(r) {
3416
+ return r.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3");
3417
+ }
3418
+ function so(r) {
3419
+ const e = new Date(r);
3420
+ e.setDate(e.getDate() - 1);
3421
+ const u = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
3422
+ return `${u}${t}${n}`;
3423
+ }
3424
+ function co(r) {
3425
+ return r.map(({
3426
+ busnsDate: e,
3427
+ valtnPrice: u,
3428
+ mval: t,
3429
+ tradeCrrc: n
3430
+ }) => ({
3431
+ date: lo(e),
3432
+ price: u,
3433
+ npv: t,
3434
+ currency: n
3435
+ }));
3436
+ }
3437
+ function Rt(r, e) {
3438
+ const u = e === "ascending" ? 1 : -1;
3439
+ return [...r].sort((t, n) => u * io(t.date, n.date));
3440
+ }
3441
+ function mo(r) {
3442
+ if (r == null || typeof r == "string" && r.trim() === "")
3443
+ return 0;
3444
+ try {
3445
+ const e = new Ge(r).toNumber();
3446
+ return Number.isFinite(e) ? e : null;
3447
+ } catch {
3448
+ return null;
3449
+ }
3450
+ }
3451
+ function Pt(r) {
3452
+ try {
3453
+ return r != null && new Ge(r).lt(0);
3454
+ } catch {
3455
+ return !1;
3456
+ }
3457
+ }
3458
+ function mu(r, e, u) {
3459
+ if (r == null || r === "") return Yu;
3460
+ let t;
3461
+ try {
3462
+ t = new Ge(r).toFixed(2);
3463
+ } catch {
3464
+ return Yu;
3465
+ }
3466
+ const n = t.startsWith("-"), [o, a] = (n ? t.slice(1) : t).split("."), s = o.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
3467
+ try {
3468
+ const E = new Intl.NumberFormat(u, {
3469
+ style: "currency",
3470
+ currency: e,
3471
+ currencyDisplay: "narrowSymbol"
3472
+ }).formatToParts(0).find((m) => m.type === "currency")?.value;
3473
+ return `${n ? "-" : ""}${E ?? e}${s}.${a}`;
3474
+ } catch {
3475
+ return `${n ? "-" : ""}${e} ${s}.${a}`;
3476
+ }
3477
+ }
3478
+ function Eo(r) {
3479
+ const e = /^(\d{4})-(\d{2})-(\d{2})/.exec(r);
3480
+ return e ? `${e[1].slice(2)}-${e[2]}-${e[3]}` : r;
3481
+ }
3482
+ const Gu = 0.05, Lt = 7, Fo = [8, 8];
3483
+ function Nt(r) {
3484
+ return r.filter((e) => typeof e == "number" && Number.isFinite(e));
3485
+ }
3486
+ function Co(r) {
3487
+ const e = Nt(r);
3488
+ if (e.length === 0) return {};
3489
+ const u = Math.min(...e), t = Math.max(...e), n = t - u, o = n > 0 ? n * Gu : t !== 0 ? Math.abs(t) * Gu : 1, a = u - o, s = t + o;
3490
+ return u >= 0 ? {
3491
+ min: Math.max(0, a),
3492
+ max: s
3493
+ } : t <= 0 ? {
3494
+ min: a,
3495
+ max: Math.min(0, s)
3496
+ } : {
3497
+ min: a,
3498
+ max: s
3499
+ };
3500
+ }
3501
+ function fo(r) {
3502
+ const e = Nt(r);
3503
+ if (e.length === 0)
3504
+ return {
3505
+ position: "bottom",
3506
+ onZero: !1
3507
+ };
3508
+ const u = Math.min(...e), t = Math.max(...e), n = t <= 0 && u < 0 ? "top" : "bottom", o = u <= 0 && t >= 0;
3509
+ return {
3510
+ position: n,
3511
+ onZero: o
3512
+ };
3513
+ }
3514
+ function Je(r, e) {
3515
+ return Number(r.toFixed(Math.min(Math.max(e, 0), 20)));
3516
+ }
3517
+ function go(r, e) {
3518
+ const u = (e - r) / Lt, t = Math.floor(Math.log10(u)), n = 10 ** t, o = u / n, a = o < 1.5 ? 1 : o < 2.5 ? 2 : o < 4 ? 3 : o < 7 ? 5 : 10;
3519
+ return Je(a * n, -t);
3520
+ }
3521
+ function po({
3522
+ min: r,
3523
+ max: e
3524
+ }) {
3525
+ if (r == null || e == null || r >= e) return;
3526
+ const u = go(r, e), t = Math.max(0, -Math.floor(Math.log10(u))) + 2, n = Je(Math.ceil(r / u) * u, t), o = Je(Math.floor(e / u) * u, t), a = r < n ? [r] : [];
3527
+ for (let s = n; s <= o; s = Je(s + u, t))
3528
+ a.push(s);
3529
+ return e > o && a.push(e), r < 0 && e > 0 ? a.filter((s) => s !== 0) : a;
3530
+ }
3531
+ function ho({
3532
+ data: r,
3533
+ metric: e,
3534
+ currency: u,
3535
+ locale: t,
3536
+ theme: n
3537
+ }) {
3538
+ const o = Rt(r, "ascending"), a = e === "price" ? "价格" : "NPV", s = o.map((M) => mo(M[e])), E = Co(s), m = fo(s), p = po(E), g = o.map(({
3539
+ date: M
3540
+ }) => Eo(M));
3541
+ return {
3542
+ // 数据或指标切换时使用 300ms 过渡动画。
3543
+ animationDuration: 300,
3544
+ // 透出宿主面板背景,避免图表画布覆盖组件主题色。
3545
+ backgroundColor: "transparent",
3546
+ // 统一图表内文字的主题颜色、字体和字号。
3547
+ textStyle: {
3548
+ // 默认文字使用主题主文字色。
3549
+ color: n.text,
3550
+ // 字体与当前 gz-ui 主题保持一致。
3551
+ fontFamily: n.fontFamily,
3552
+ // 字号与当前 gz-ui 主题保持一致。
3553
+ fontSize: n.fontSize
3554
+ },
3555
+ // 通过四周留白为坐标轴标签和旋转后的日期文本预留空间。
3556
+ grid: {
3557
+ // 顶部为纵轴最大刻度和折线预留空间。
3558
+ top: 16,
3559
+ // 右侧避免最后一个数据点贴近画布边缘。
3560
+ right: 24,
3561
+ // 底部容纳旋转 45 度后的日期标签。
3562
+ bottom: 58,
3563
+ // 左侧为纵轴刻度标签预留显示空间。
3564
+ left: 64
3565
+ },
3566
+ // 鼠标悬停时展示当前日期对应的指标金额。
3567
+ tooltip: {
3568
+ // 按横轴类目触发,指向日期时展示该日期的数据。
3569
+ trigger: "axis",
3570
+ // 将浮层限制在图表区域内,避免被外层滚动容器裁切。
3571
+ confine: !0,
3572
+ // 对齐 gz-ui 浮层背景,避免 ECharts 默认的白色 Tooltip。
3573
+ backgroundColor: n.backgroundElevated,
3574
+ // Figma 浮层没有描边,关闭 ECharts 默认边框。
3575
+ borderWidth: 0,
3576
+ borderRadius: 4,
3577
+ padding: 12,
3578
+ textStyle: {
3579
+ color: n.text,
3580
+ fontFamily: n.fontFamily,
3581
+ fontSize: n.fontSize
3582
+ },
3583
+ // 按当前币种和区域格式化提示框中的金额。
3584
+ valueFormatter: (M) => mu(typeof M == "number" || typeof M == "string" ? M : null, u, t)
3585
+ },
3586
+ // 日期标签轴与符号基准线分离,避免全负数据把日期标签一起移动到顶部。
3587
+ xAxis: [{
3588
+ // 日期是离散类目,而非连续时间刻度。
3589
+ type: "category",
3590
+ position: "bottom",
3591
+ // 在首尾类目两侧保留半个类目间距,防止端点贴边。
3592
+ boundaryGap: !0,
3593
+ // 将日期转换为 YY-MM-DD 后写入横轴。
3594
+ data: g,
3595
+ // 横轴仅保留标签,不显示刻度短线。
3596
+ axisTick: {
3597
+ // 隐藏每个日期下方的刻度短线。
3598
+ show: !1
3599
+ },
3600
+ // 标签轴不绘制实线,也不参与零点吸附。
3601
+ axisLine: {
3602
+ show: !1,
3603
+ onZero: !1
3604
+ },
3605
+ // 配置横轴日期标签的颜色、密度、角度和间距。
3606
+ axisLabel: {
3607
+ // 日期标签使用主题次级文字色。
3608
+ color: n.textSecondary,
3609
+ // 强制展示每一个日期标签,不让 ECharts 自动抽稀。
3610
+ interval: 0,
3611
+ // 日期旋转 45 度以降低相邻标签重叠概率。
3612
+ rotate: 45,
3613
+ // 标签与绘图区底边保持 12px 间距。
3614
+ margin: 12
3615
+ }
3616
+ }, {
3617
+ type: "category",
3618
+ position: m.position,
3619
+ boundaryGap: !0,
3620
+ data: g,
3621
+ axisTick: {
3622
+ show: !1
3623
+ },
3624
+ axisLabel: {
3625
+ show: !1
3626
+ },
3627
+ // 实线仅表达符号方向:全负在顶部、全正在底部、跨零时吸附 0。
3628
+ axisLine: {
3629
+ show: !0,
3630
+ onZero: m.onZero,
3631
+ lineStyle: {
3632
+ color: n.baseline,
3633
+ type: "solid"
3634
+ }
3635
+ }
3636
+ }],
3637
+ // 纵轴以连续数值刻度展示当前价格或 NPV。
3638
+ yAxis: {
3639
+ // 使用连续数值轴,支持正数、负数和小数。
3640
+ type: "value",
3641
+ // 应用根据绘图值及 5% 留白计算出的固定上下限。
3642
+ ...E,
3643
+ // 期望约分为 7 段,实际刻度数和间隔仍由 ECharts 取易读值。
3644
+ splitNumber: Lt,
3645
+ // 纵轴通过网格线表达刻度,不额外显示刻度短线。
3646
+ axisTick: {
3647
+ // 隐藏纵轴刻度短线。
3648
+ show: !1,
3649
+ customValues: p
3650
+ },
3651
+ // 隐藏纵轴自身的竖直轴线,减少视觉干扰。
3652
+ axisLine: {
3653
+ // 不绘制纵轴轴线。
3654
+ show: !1
3655
+ },
3656
+ // 配置纵轴刻度标签的主题颜色和数值精度。
3657
+ axisLabel: {
3658
+ // 纵轴标签使用主题次级文字色。
3659
+ color: n.textSecondary,
3660
+ // 刻度最多展示两位小数,并按当前区域添加数字分组格式。
3661
+ formatter: (M) => new Intl.NumberFormat(t, {
3662
+ maximumFractionDigits: 2
3663
+ }).format(M)
3664
+ },
3665
+ // 为每个纵轴主刻度绘制水平辅助线。
3666
+ splitLine: {
3667
+ // 边界只保留符号基准线,避免最大、最小端点虚线与实线重叠。
3668
+ showMinLine: !1,
3669
+ showMaxLine: !1,
3670
+ // 网格线使用主题分割色和自定义虚线节奏。
3671
+ lineStyle: {
3672
+ // 颜色读取当前 gz-ui 主题的分割线 Token。
3673
+ color: n.split,
3674
+ // 使用统一的线段与间隔长度绘制虚线。
3675
+ type: Fo
3676
+ }
3677
+ }
3678
+ },
3679
+ // 当前图表只绘制一个价格或 NPV 折线系列。
3680
+ series: [{
3681
+ // 系列名称随当前选中的指标切换。
3682
+ name: a,
3683
+ // 数据系列使用第一个横轴;第二个横轴只负责绘制符号基准线。
3684
+ xAxisIndex: 0,
3685
+ // 使用折线图连接相邻日期的数据点。
3686
+ type: "line",
3687
+ // 传入已转换的数值、0 或空点序列。
3688
+ data: s,
3689
+ // 每个有效数据点使用圆形标记。
3690
+ symbol: "circle",
3691
+ // 数据点直径固定为 5px。
3692
+ symbolSize: 5,
3693
+ // 常态下始终展示数据点标记。
3694
+ showSymbol: !0,
3695
+ // 遇到无法转换的空点时断开折线,不跨点连接。
3696
+ connectNulls: !1,
3697
+ // 配置折线本身的主题颜色和宽度。
3698
+ lineStyle: {
3699
+ // 折线颜色使用当前主题主色。
3700
+ color: n.primary,
3701
+ // 折线宽度固定为 2px。
3702
+ width: 2
3703
+ },
3704
+ // 配置数据点标记的填充色。
3705
+ itemStyle: {
3706
+ // 数据点与折线统一使用主题主色。
3707
+ color: n.primary
3708
+ },
3709
+ // 鼠标悬停数据点时提供轻微放大反馈。
3710
+ emphasis: {
3711
+ // 高亮数据点放大到默认尺寸的 1.3 倍。
3712
+ scale: 1.3
3713
+ }
3714
+ }]
3715
+ };
3716
+ }
3717
+ const vo = "_root_nkh0k_1", Do = "_title_nkh0k_12", Bo = "_loading_nkh0k_19", yo = "_content_nkh0k_26", bo = "_tablePanel_nkh0k_32", Ao = "_chartPanel_nkh0k_33", So = "_table_nkh0k_32", To = "_negativeValue_nkh0k_69", xo = "_chartHeader_nkh0k_76", ko = "_chartTitle_nkh0k_85", wo = "_chart_nkh0k_33", Mo = "_chartEmpty_nkh0k_93", _o = "_chartScrollable_nkh0k_102", $o = "_chartCanvas_nkh0k_142", ie = {
3718
+ root: vo,
3719
+ title: Do,
3720
+ loading: Bo,
3721
+ content: yo,
3722
+ tablePanel: bo,
3723
+ chartPanel: Ao,
3724
+ table: So,
3725
+ negativeValue: To,
3726
+ chartHeader: xo,
3727
+ chartTitle: ko,
3728
+ chart: wo,
3729
+ chartEmpty: Mo,
3730
+ chartScrollable: _o,
3731
+ chartCanvas: $o
3732
+ };
3733
+ Ju.use([ur, tr, rr, nr]);
3734
+ const Hu = 10, Io = 800;
3735
+ function Ro(r) {
3736
+ const e = Y.c(29), {
3737
+ data: u,
3738
+ metric: t,
3739
+ currency: n,
3740
+ locale: o,
3741
+ theme: a,
3742
+ className: s
3743
+ } = r, E = te(null), m = te(null), p = te(null), g = u.length > Hu, M = `${Math.max(u.length / Hu, 1) * 100}%`;
3744
+ let B;
3745
+ e[0] !== n || e[1] !== u || e[2] !== o || e[3] !== t || e[4] !== a ? (B = ho({
3746
+ data: u,
3747
+ metric: t,
3748
+ currency: n,
3749
+ locale: o,
3750
+ theme: a
3751
+ }), e[0] = n, e[1] = u, e[2] = o, e[3] = t, e[4] = a, e[5] = B) : B = e[5];
3752
+ const k = B;
3753
+ let R, y;
3754
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = () => {
3755
+ const C = m.current;
3756
+ if (!C)
3757
+ return;
3758
+ const N = Ju.init(C, void 0, {
3759
+ renderer: "canvas"
3760
+ });
3761
+ p.current = N;
3762
+ const f = () => N.resize(), c = typeof ResizeObserver > "u" ? null : new ResizeObserver(f);
3763
+ return c ? c.observe(C) : window.addEventListener("resize", f), () => {
3764
+ c?.disconnect(), window.removeEventListener("resize", f), N.dispose(), p.current = null;
3765
+ };
3766
+ }, y = [], e[6] = R, e[7] = y) : (R = e[6], y = e[7]), xu(R, y);
3767
+ let _, b;
3768
+ e[8] !== k ? (_ = () => {
3769
+ p.current?.setOption(k, {
3770
+ notMerge: !0
3771
+ });
3772
+ }, b = [k], e[8] = k, e[9] = _, e[10] = b) : (_ = e[9], b = e[10]), pe(_, b);
3773
+ let T, P;
3774
+ e[11] !== g ? (T = () => {
3775
+ const C = E.current;
3776
+ if (!C || !g)
3777
+ return;
3778
+ let N;
3779
+ const f = () => {
3780
+ C.dataset.scrolling = "true", window.clearTimeout(N), N = window.setTimeout(() => {
3781
+ delete C.dataset.scrolling;
3782
+ }, Io);
3783
+ };
3784
+ return C.addEventListener("scroll", f, {
3785
+ passive: !0
3786
+ }), () => {
3787
+ C.removeEventListener("scroll", f), window.clearTimeout(N), delete C.dataset.scrolling;
3788
+ };
3789
+ }, P = [g], e[11] = g, e[12] = T, e[13] = P) : (T = e[12], P = e[13]), pe(T, P);
3790
+ let I;
3791
+ e[14] !== g ? (I = () => {
3792
+ const C = E.current;
3793
+ !C || !g || (C.scrollLeft = C.scrollWidth - C.clientWidth);
3794
+ }, e[14] = g, e[15] = I) : I = e[15];
3795
+ let L;
3796
+ e[16] !== u || e[17] !== g ? (L = [u, g], e[16] = u, e[17] = g, e[18] = L) : L = e[18], xu(I, L);
3797
+ const h = t === "price" ? "价格" : "NPV";
3798
+ let w;
3799
+ e[19] !== s || e[20] !== g ? (w = gu(s, {
3800
+ [ie.chartScrollable]: g
3801
+ }), e[19] = s, e[20] = g, e[21] = w) : w = e[21];
3802
+ const $ = `按日期展示的${h}折线图`;
3803
+ let v;
3804
+ e[22] !== M ? (v = /* @__PURE__ */ F("div", { ref: m, className: ie.chartCanvas, style: {
3805
+ width: M
3806
+ } }), e[22] = M, e[23] = v) : v = e[23];
3807
+ let A;
3808
+ return e[24] !== g || e[25] !== w || e[26] !== $ || e[27] !== v ? (A = /* @__PURE__ */ F("div", { ref: E, className: w, role: "img", "aria-label": $, "data-scrollable": g, children: v }), e[24] = g, e[25] = w, e[26] = $, e[27] = v, e[28] = A) : A = e[28], A;
3809
+ }
3810
+ const Po = "数据加载失败,请稍后重试", au = [], Lo = "CNY", iu = "zh-CN", Ot = 32, Vt = 28, zt = 7, No = Ot + Vt * zt + 2, Oo = {
3811
+ suppressHeaderMenuButton: !0,
3812
+ suppressHeaderContextMenu: !0
3813
+ }, Vo = {
3814
+ root: {
3815
+ margin: 0
3816
+ },
3817
+ image: {
3818
+ width: 56,
3819
+ height: 35,
3820
+ marginBottom: 8
3821
+ }
3822
+ };
3823
+ function Yt(r) {
3824
+ const e = Y.c(4), {
3825
+ ariaLabel: u,
3826
+ className: t
3827
+ } = r;
3828
+ let n;
3829
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ F(Ve, { image: Ve.PRESENTED_IMAGE_SIMPLE, description: "暂无数据", styles: Vo }), e[0] = n) : n = e[0];
3830
+ let o;
3831
+ return e[1] !== u || e[2] !== t ? (o = /* @__PURE__ */ F("div", { className: t, role: "status", "aria-label": u, children: n }), e[1] = u, e[2] = t, e[3] = o) : o = e[3], o;
3832
+ }
3833
+ function zo() {
3834
+ const r = Y.c(1);
3835
+ let e;
3836
+ return r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ F(Yt, { ariaLabel: "暂无估值日志数据" }), r[0] = e) : e = r[0], e;
3837
+ }
3838
+ function Yo(r) {
3839
+ return r instanceof DOMException && r.name === "AbortError";
3840
+ }
3841
+ function na(r) {
3842
+ const e = Y.c(67), {
3843
+ adapter: u,
3844
+ allVarCodeSnum: t,
3845
+ className: n,
3846
+ style: o
3847
+ } = r, {
3848
+ message: a
3849
+ } = pu.useApp(), {
3850
+ token: s
3851
+ } = Xu.useToken();
3852
+ let E;
3853
+ e[0] !== u || e[1] !== t ? (E = () => ({
3854
+ adapter: u,
3855
+ allVarCodeSnum: t,
3856
+ status: "loading",
3857
+ data: au
3858
+ }), e[0] = u, e[1] = t, e[2] = E) : E = e[2];
3859
+ const [m, p] = Oe(E), [g, M] = Oe("price"), B = m.adapter === u && m.allVarCodeSnum === t, k = B ? m.status : "loading", R = B ? m.data : au;
3860
+ let y, _;
3861
+ e[3] !== u || e[4] !== t || e[5] !== a ? (y = () => {
3862
+ const j = new AbortController();
3863
+ let ue = !0;
3864
+ const ne = {
3865
+ allVarCodeSnum: t,
3866
+ endTime: so(/* @__PURE__ */ new Date()),
3867
+ size: "30"
3868
+ };
3869
+ return u.getValuationLogs(ne, {
3870
+ signal: j.signal
3871
+ }).then((le) => {
3872
+ if (!ue)
3873
+ return;
3874
+ const se = co(le);
3875
+ p({
3876
+ adapter: u,
3877
+ allVarCodeSnum: t,
3878
+ status: se.length === 0 ? "empty" : "success",
3879
+ data: se
3880
+ });
3881
+ }).catch((le) => {
3882
+ !ue || j.signal.aborted || Yo(le) || (p({
3883
+ adapter: u,
3884
+ allVarCodeSnum: t,
3885
+ status: "error",
3886
+ data: au
3887
+ }), a.error(Po));
3888
+ }), () => {
3889
+ ue = !1, j.abort();
3890
+ };
3891
+ }, _ = [u, t, a], e[3] = u, e[4] = t, e[5] = a, e[6] = y, e[7] = _) : (y = e[6], _ = e[7]), pe(y, _);
3892
+ let b;
3893
+ e[8] !== R ? (b = Rt(R, "descending").map(Wo), e[8] = R, e[9] = b) : b = e[9];
3894
+ const T = b, P = R[0]?.currency || Lo;
3895
+ let I;
3896
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
3897
+ headerName: "日期",
3898
+ field: "date",
3899
+ width: 120,
3900
+ minWidth: 120,
3901
+ sortable: !1
3902
+ }, e[10] = I) : I = e[10];
3903
+ let L;
3904
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = {
3905
+ [ie.negativeValue]: Uo
3906
+ }, e[11] = L) : L = e[11];
3907
+ let h;
3908
+ e[12] !== P ? (h = {
3909
+ headerName: "价格",
3910
+ field: "price",
3911
+ flex: 1,
3912
+ minWidth: 140,
3913
+ sortable: !1,
3914
+ type: "rightAligned",
3915
+ cellClassRules: L,
3916
+ valueFormatter: (j) => {
3917
+ const {
3918
+ value: ue
3919
+ } = j;
3920
+ return mu(ue, P, iu);
3921
+ }
3922
+ }, e[12] = P, e[13] = h) : h = e[13];
3923
+ let w;
3924
+ e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = {
3925
+ [ie.negativeValue]: Ho
3926
+ }, e[14] = w) : w = e[14];
3927
+ let $;
3928
+ e[15] !== P ? ($ = {
3929
+ headerName: "NPV",
3930
+ field: "npv",
3931
+ flex: 1,
3932
+ minWidth: 140,
3933
+ sortable: !1,
3934
+ type: "rightAligned",
3935
+ cellClassRules: w,
3936
+ valueFormatter: (j) => {
3937
+ const {
3938
+ value: ue
3939
+ } = j;
3940
+ return mu(ue, P, iu);
3941
+ }
3942
+ }, e[15] = P, e[16] = $) : $ = e[16];
3943
+ let v;
3944
+ e[17] !== h || e[18] !== $ ? (v = [I, h, $], e[17] = h, e[18] = $, e[19] = v) : v = e[19];
3945
+ const A = v;
3946
+ let C;
3947
+ e[20] !== s.colorBgElevated || e[21] !== s.colorBorder || e[22] !== s.colorPrimary || e[23] !== s.colorSplit || e[24] !== s.colorText || e[25] !== s.colorTextSecondary || e[26] !== s.fontFamily || e[27] !== s.fontSize ? (C = {
3948
+ primary: s.colorPrimary,
3949
+ baseline: s.colorBorder,
3950
+ backgroundElevated: s.colorBgElevated,
3951
+ text: s.colorText,
3952
+ textSecondary: s.colorTextSecondary,
3953
+ split: s.colorSplit,
3954
+ fontFamily: s.fontFamily,
3955
+ fontSize: s.fontSize
3956
+ }, e[20] = s.colorBgElevated, e[21] = s.colorBorder, e[22] = s.colorPrimary, e[23] = s.colorSplit, e[24] = s.colorText, e[25] = s.colorTextSecondary, e[26] = s.fontFamily, e[27] = s.fontSize, e[28] = C) : C = e[28];
3957
+ const N = C, f = k === "success", c = T.length > zt;
3958
+ let i;
3959
+ e[29] !== n ? (i = gu(ie.root, n), e[29] = n, e[30] = i) : i = e[30];
3960
+ const l = k === "loading";
3961
+ let d;
3962
+ e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ F("h2", { className: ie.title, children: "最大展示30条日志数据" }), e[31] = d) : d = e[31];
3963
+ const D = k === "loading", S = c ? No : "auto";
3964
+ let x;
3965
+ e[32] !== S ? (x = {
3966
+ height: S
3967
+ }, e[32] = S, e[33] = x) : x = e[33];
3968
+ const O = c ? "normal" : "autoHeight";
3969
+ let V;
3970
+ e[34] !== A || e[35] !== x || e[36] !== O || e[37] !== c || e[38] !== T ? (V = /* @__PURE__ */ F("div", { className: ie.tablePanel, "aria-label": "估值日志表格", children: /* @__PURE__ */ F(Bu, { className: ie.table, containerStyle: x, domLayout: O, rowData: T, columnDefs: A, defaultColDef: Oo, getRowId: Go, headerHeight: Ot, rowHeight: Vt, pagination: !1, noRowsOverlayComponent: zo, suppressMovableColumns: !0, suppressCellFocus: !0, suppressContextMenu: !0, alwaysShowVerticalScroll: c }) }), e[34] = A, e[35] = x, e[36] = O, e[37] = c, e[38] = T, e[39] = V) : V = e[39];
3971
+ let z;
3972
+ e[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ F("h3", { className: ie.chartTitle, children: "结果图形展示" }), e[40] = z) : z = e[40];
3973
+ let W, U;
3974
+ e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = [{
3975
+ label: "价格",
3976
+ value: "price"
3977
+ }, {
3978
+ label: "NPV",
3979
+ value: "npv"
3980
+ }], U = (j) => {
3981
+ const {
3982
+ target: ue
3983
+ } = j;
3984
+ return M(ue.value);
3985
+ }, e[41] = W, e[42] = U) : (W = e[41], U = e[42]);
3986
+ let X;
3987
+ e[43] !== g ? (X = /* @__PURE__ */ ke("div", { className: ie.chartHeader, children: [
3988
+ z,
3989
+ /* @__PURE__ */ F(uu.Group, { size: "small", optionType: "button", buttonStyle: "solid", "aria-label": "估值指标", value: g, options: W, onChange: U })
3990
+ ] }), e[43] = g, e[44] = X) : X = e[44];
3991
+ let Z;
3992
+ e[45] !== N || e[46] !== R || e[47] !== g || e[48] !== P || e[49] !== f || e[50] !== k ? (Z = f ? /* @__PURE__ */ F(Ro, { className: ie.chart, data: R, metric: g, currency: P, locale: iu, theme: N }) : k === "empty" ? /* @__PURE__ */ F(Yt, { className: ie.chartEmpty, ariaLabel: "暂无估值曲线数据" }) : /* @__PURE__ */ F("div", { className: ie.chartEmpty, "aria-label": "暂无估值曲线数据" }), e[45] = N, e[46] = R, e[47] = g, e[48] = P, e[49] = f, e[50] = k, e[51] = Z) : Z = e[51];
3993
+ let q;
3994
+ e[52] !== X || e[53] !== Z ? (q = /* @__PURE__ */ ke("section", { className: ie.chartPanel, "aria-label": "估值日志图形展示", children: [
3995
+ X,
3996
+ Z
3997
+ ] }), e[52] = X, e[53] = Z, e[54] = q) : q = e[54];
3998
+ let H;
3999
+ e[55] !== V || e[56] !== q ? (H = /* @__PURE__ */ ke("div", { className: ie.content, children: [
4000
+ V,
4001
+ q
4002
+ ] }), e[55] = V, e[56] = q, e[57] = H) : H = e[57];
4003
+ let Q;
4004
+ e[58] !== D || e[59] !== H ? (Q = /* @__PURE__ */ F(hu, { className: ie.loading, spinning: D, description: "估值日志加载中", children: H }), e[58] = D, e[59] = H, e[60] = Q) : Q = e[60];
4005
+ let K;
4006
+ return e[61] !== k || e[62] !== o || e[63] !== i || e[64] !== l || e[65] !== Q ? (K = /* @__PURE__ */ ke("section", { className: i, style: o, "aria-label": "估值日志数据图表", "aria-busy": l, "data-status": k, children: [
4007
+ d,
4008
+ Q
4009
+ ] }), e[61] = k, e[62] = o, e[63] = i, e[64] = l, e[65] = Q, e[66] = K) : K = e[66], K;
4010
+ }
4011
+ function Go(r) {
4012
+ const {
4013
+ data: e
4014
+ } = r;
4015
+ return e.rowId;
4016
+ }
4017
+ function Ho(r) {
4018
+ const {
4019
+ value: e
4020
+ } = r;
4021
+ return Pt(e);
4022
+ }
4023
+ function Uo(r) {
4024
+ const {
4025
+ value: e
4026
+ } = r;
4027
+ return Pt(e);
4028
+ }
4029
+ function Wo(r, e) {
4030
+ return {
4031
+ ...r,
4032
+ rowId: `${r.date}-${e}`
4033
+ };
4034
+ }
4035
+ export {
4036
+ Le as B,
4037
+ at as G,
4038
+ uo as I,
4039
+ Ye as T,
4040
+ na as V,
4041
+ pu as a,
4042
+ _e as b,
4043
+ Y as c,
4044
+ Ve as d,
4045
+ De as e,
4046
+ uu as f,
4047
+ Ku as g,
4048
+ Ne as h,
4049
+ hu as i,
4050
+ Bu as j,
4051
+ yu as k,
4052
+ Tu as l
4053
+ };