dsh-metaphysics 0.46.5 → 0.50.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/engine/diff.js CHANGED
@@ -1,197 +1,301 @@
1
- // 口径差异:同一组参数在不同流派口径下排出的盘,逐字段比对
2
- //
3
- // 用途:口径(晚子时换日、真太阳时、拆补/超神接气/置闰、闰月归月)是命理圈争执最多的地方。
4
- // 多数工具切换后只给新结果,用户不知道「哪里变了」。这里把变化摊开:
5
- // 变化字段路径 + 旧值 → 新值 + 一句话总结。
6
- //
7
- // 只做结构化比对,不改动任何引擎的输出。
8
-
9
- /** 比对时忽略的字段:文案、时间戳、口径回显、内部儒略日数字 */
10
- const IGNORE_KEYS = new Set([
11
- 'summary', 'interpret', 'castAt', 'asOf', 'precision', 'disclaimer', 'note',
12
- 'trueSolarText', 'civilText', 'offsetMinutes',
13
- 'input', // 只是把调用参数回显出来,不是盘面变化
14
- 'jd', // 内部儒略日,人类不可读;对外展示用 time 等格式化字段
15
- ]);
16
-
17
- const isObject = (v) => v !== null && typeof v === 'object';
18
-
19
- /**
20
- * 结构化差异
21
- * @returns {{path:string, from:any, to:any}[]}
22
- */
23
- export function diffObjects(a, b, path = '', out = []) {
24
- if (a === b) return out;
25
- if (!isObject(a) || !isObject(b)) {
26
- out.push({ path: path || '(root)', from: a, to: b });
27
- return out;
28
- }
29
- const keys = new Set([...Object.keys(a), ...Object.keys(b)]);
30
- for (const k of keys) {
31
- if (IGNORE_KEYS.has(k)) continue;
32
- const p = path ? `${path}.${k}` : k;
33
- const va = a[k];
34
- const vb = b[k];
35
- if (isObject(va) && isObject(vb)) {
36
- diffObjects(va, vb, p, out);
37
- } else if (JSON.stringify(va) !== JSON.stringify(vb)) {
38
- out.push({ path: p, from: va, to: vb });
39
- }
40
- }
41
- return out;
42
- }
43
-
44
- /** 路径 → 盘面栏位名;未命中细分规则时退回所属大类 */
45
- const LABELS = [
46
- [/^pillars\.year\.ganzhi$/, '年柱'],
47
- [/^pillars\.month\.ganzhi$/, '月柱'],
48
- [/^pillars\.day\.ganzhi$/, '日柱'],
49
- [/^pillars\.hour\.ganzhi$/, '时柱'],
50
- [/^pillars\.\w+\.hidden/, '藏干'],
51
- [/^pillars\.\w+\.stemTenGod$/, '十神'],
52
- [/^pillars\.\w+\.kongwang/, '空亡'],
53
- [/^pillars\.\w+\.dishi$|^pillars\.\w+\.zizuo$/, '十二长生'],
54
- [/^pillars\.\w+\.nayin$/, '纳音'],
55
- [/^dayMaster\./, '日主'],
56
- [/^palaces\./, '命身宫'],
57
- [/^dayun\.list\.(\d+)\.ganzhi$/, '大运干支'],
58
- [/^dayun\.startAge\./, '起运时间'],
59
- [/^dayun\./, '大运评分'],
60
- [/^liunian\./, '流年'],
61
- [/^jieqi\./, '节气边界'],
62
- [/^solarTime\./, '真太阳时'],
63
- [/^dayGanZhi$/, '日辰'],
64
- [/^hourZhi$/, '时支'],
65
- [/^yueJiang\./, '月将'],
66
- [/^ju(Num|Name)?$/, '局数'],
67
- [/^xunKong$/, '旬空'],
68
- [/^lines\.(\d+)\./, '爻'],
69
- [/^shensha\./, '神煞'],
70
- [/^frame\./, '格局用神'],
71
- [/^strength\./, '旺衰'],
72
- [/^wuxing\./, '五行计数'],
73
- [/^relations\./, '干支关系'],
74
- [/^input\./, '输入回显'],
75
- ];
76
-
77
- /** 大类:用于把几百处连带变化归成几句话 */
78
- const CATEGORY = [
79
- [/^pillars\./, '四柱'],
80
- [/^shensha\./, '神煞'],
81
- [/^dayun\./, '大运'],
82
- [/^liunian\./, '流年'],
83
- [/^frame\./, '格局用神'],
84
- [/^strength\./, '旺衰'],
85
- [/^wuxing\./, '五行计数'],
86
- [/^dayMaster\./, '日主'],
87
- [/^relations\./, '干支关系'],
88
- [/^palaces\./, '命身宫'],
89
- [/^jieqi\./, '节气'],
90
- [/^solarTime\./, '真太阳时'],
91
- [/^input\./, '输入回显'],
92
- [/^lines\./, '爻'],
93
- ];
94
-
95
- /**
96
- * 根因字段:真正被口径直接改动的干支/局数/爻。
97
- * 其余几百处都是从这里派生出去的——把这层关系讲清楚,才是「口径对照」的价值。
98
- */
99
- const ROOT = [
100
- [/^pillars\.(year|month|day|hour)\.ganzhi$/, '柱'],
101
- [/^dayGanZhi$/, '日辰'],
102
- [/^hourZhi$/, '时支'],
103
- [/^ju(Num|Name)?$/, '局数'],
104
- [/^lines\.\d+\.(ganzhi|yinYang|name)$/, '爻'],
105
- [/^yueJiang\.(name|zhi)$/, '月将'],
106
- ];
107
-
108
- export function labelOf(path) {
109
- for (const [re, label] of LABELS) {
110
- if (re.test(path)) return label;
111
- }
112
- return categoryOf(path) || path;
113
- }
114
-
115
- export function categoryOf(path) {
116
- for (const [re, cat] of CATEGORY) {
117
- if (re.test(path)) return cat;
118
- }
119
- return '';
120
- }
121
-
122
- export function rootOf(path) {
123
- for (const [re, label] of ROOT) {
124
- if (re.test(path)) return label;
125
- }
126
- return '';
127
- }
128
-
129
- /** 自然排序:行运类按序号,其余按字符串 */
130
- export function sortDiffs(diffs) {
131
- return [...diffs].sort((x, y) => x.path.localeCompare(y.path, 'zh-Hans-CN', { numeric: true }));
132
- }
133
-
134
- /**
135
- * 把一组变化归纳成因果式一句话:
136
- * 「根因:日柱 丙子 → 乙亥;连带影响 四柱、神煞、大运、流年 等 6 类(共 407 处)」
137
- */
138
- export function summarize(diffs) {
139
- if (!diffs.length) return '本盘不受此口径影响:所有字段一致。';
140
- const roots = diffs.filter((d) => rootOf(d.path));
141
- const cats = [...new Set(diffs.map((d) => categoryOf(d.path)).filter(Boolean))];
142
- const head = roots.length
143
- ? `根因 ${roots.length} 处:` + roots.slice(0, 4)
144
- .map((d) => `${labelOf(d.path)} ${fmt(d.from)}→${fmt(d.to)}`).join('、')
145
- + (roots.length > 4 ? ' 等' : '')
146
- : '无单一根因';
147
- const tail = cats.length
148
- ? `;连带影响 ${cats.slice(0, 6).join('、')}${cats.length > 6 ? ' 等' : ''} ${cats.length} 类,共 ${diffs.length} 处`
149
- : `;共 ${diffs.length} 处`;
150
- return head + tail + '。';
151
- }
152
-
153
- const fmt = (v) => {
154
- if (v === undefined) return '—';
155
- if (v === null) return 'null';
156
- if (typeof v === 'string') return v;
157
- if (Array.isArray(v)) return v.join('') || '[]';
158
- if (typeof v === 'object') return JSON.stringify(v);
159
- return String(v);
160
- };
161
-
162
- /**
163
- * 文本版对照:先列根因,再列连带变化(默认最多 12 处,其余按类归并)
164
- */
165
- export function renderDiff(diffs, { title = '', limit = 12 } = {}) {
166
- const lines = [];
167
- if (title) lines.push(`【${title}】`);
168
- lines.push(summarize(diffs));
169
- if (!diffs.length) return lines.join('\n');
170
-
171
- const roots = sortDiffs(diffs.filter((d) => rootOf(d.path)));
172
- const rest = sortDiffs(diffs.filter((d) => !rootOf(d.path)));
173
-
174
- if (roots.length) {
175
- lines.push('');
176
- lines.push(' 根因(口径直接改动):');
177
- for (const d of roots) {
178
- lines.push(` ${labelOf(d.path).padEnd(6)} ${fmt(d.from)} → ${fmt(d.to)}`);
179
- }
180
- }
181
- if (rest.length) {
182
- lines.push('');
183
- lines.push(` 连带变化(${rest.length} 处,展示前 ${Math.min(limit, rest.length)} 处):`);
184
- for (const d of rest.slice(0, limit)) {
185
- lines.push(` ${labelOf(d.path).padEnd(6)} ${fmt(d.from)} → ${fmt(d.to)}`);
186
- }
187
- if (rest.length > limit) {
188
- const byCat = {};
189
- for (const d of rest.slice(limit)) {
190
- const c = categoryOf(d.path) || '其他';
191
- byCat[c] = (byCat[c] || 0) + 1;
192
- }
193
- lines.push(' 其余:' + Object.entries(byCat).map(([c, n]) => `${c} ${n} 处`).join('、'));
194
- }
195
- }
196
- return lines.join('\n');
197
- }
1
+ // 口径差异:同一组参数在不同流派口径下排出的盘,逐字段比对
2
+ //
3
+ // 用途:口径(晚子时换日、真太阳时、拆补/超神接气/置闰、闰月归月)是命理圈争执最多的地方。
4
+ // 多数工具切换后只给新结果,用户不知道「哪里变了」。这里把变化摊开:
5
+ // 变化字段路径 + 旧值 → 新值 + 一句话总结。
6
+ //
7
+ // 只做结构化比对,不改动任何引擎的输出。
8
+
9
+ /** 比对时忽略的字段:文案、时间戳、口径回显、内部儒略日数字 */
10
+ const IGNORE_KEYS = new Set([
11
+ 'summary', 'interpret', 'castAt', 'asOf', 'precision', 'disclaimer', 'note',
12
+ 'trueSolarText', 'civilText', 'offsetMinutes',
13
+ 'input', // 只是把调用参数回显出来,不是盘面变化
14
+ 'jd', // 内部儒略日,人类不可读;对外展示用 time 等格式化字段
15
+ // 奇门把「这次用了哪个取局流派 / 晚子时归哪一天」写在结果里;换了开关它必然变,
16
+ // 但它只是口径回显,不是盘面。不剔掉的话,两张完全相同的盘会被报成「2 处差异」。
17
+ 'juMethod', 'juMethodNote', 'lateZiHourMode',
18
+ // 紫微把「闰月按哪种政策起盘」回显在 lunar 里;非闰月盘换政策时它也会变,
19
+ // 但农历月份与宫位一字未动,不该报成差异。
20
+ 'leapPolicy',
21
+ ]);
22
+
23
+ const isObject = (v) => v !== null && typeof v === 'object';
24
+
25
+ /**
26
+ * 结构化差异
27
+ * @returns {{path:string, from:any, to:any}[]}
28
+ */
29
+ export function diffObjects(a, b, path = '', out = []) {
30
+ if (a === b) return out;
31
+ if (!isObject(a) || !isObject(b)) {
32
+ out.push({ path: path || '(root)', from: a, to: b });
33
+ return out;
34
+ }
35
+ const keys = new Set([...Object.keys(a), ...Object.keys(b)]);
36
+ for (const k of keys) {
37
+ if (IGNORE_KEYS.has(k)) continue;
38
+ const p = path ? `${path}.${k}` : k;
39
+ const va = a[k];
40
+ const vb = b[k];
41
+ if (isObject(va) && isObject(vb)) {
42
+ diffObjects(va, vb, p, out);
43
+ } else if (JSON.stringify(va) !== JSON.stringify(vb)) {
44
+ out.push({ path: p, from: va, to: vb });
45
+ }
46
+ }
47
+ return out;
48
+ }
49
+
50
+ /** 路径 → 盘面栏位名;未命中细分规则时退回所属大类 */
51
+ const LABELS = [
52
+ [/^pillars\.year\.ganzhi$/, '年柱'],
53
+ [/^pillars\.month\.ganzhi$/, '月柱'],
54
+ [/^pillars\.day\.ganzhi$/, '日柱'],
55
+ [/^pillars\.hour\.ganzhi$/, '时柱'],
56
+ [/^pillars\.\w+\.hidden/, '藏干'],
57
+ [/^pillars\.\w+\.stemTenGod$/, '十神'],
58
+ [/^pillars\.\w+\.kongwang/, '空亡'],
59
+ [/^pillars\.\w+\.dishi$|^pillars\.\w+\.zizuo$/, '十二长生'],
60
+ [/^pillars\.\w+\.nayin$/, '纳音'],
61
+ [/^dayMaster\./, '日主'],
62
+ [/^palaces\.(taiyuan|minggong|shengong)\./, '命身宫'],
63
+ [/^palaces\.\d+\.(palace|branch|stem|ganzhi)$/, '宫位'],
64
+ [/^palaces\.\d+\.stars\.\d+\.(name|brightness|type)$/, '星曜'],
65
+ [/^palaces\.\d+\.shensha\./, '神煞'],
66
+ [/^palaces\.\d+\.(daxian|xiaoxian)\./, '大限'],
67
+ [/^palaces\.\d+\.sanfang\./, '三方四正'],
68
+ [/^palaces\.\d+\./, '宫位'],
69
+ [/^palaces\./, '命身宫'],
70
+ [/^soul\./, '命宫'],
71
+ [/^body\./, '身宫'],
72
+ [/^doujun\./, '流年斗君'],
73
+ [/^siZhu\.year$/, '年柱'],
74
+ [/^siZhu\.month$/, '月柱'],
75
+ [/^siZhu\.day$/, '日柱'],
76
+ [/^siZhu\.time$/, '时柱'],
77
+ [/^ju$|^juNumber$/, '局数'],
78
+ [/^yuan$/, '三元'],
79
+ [/^dun$/, '阴阳遁'],
80
+ [/^daxian(List)?\./, '大限'],
81
+ [/^fly(Chains|Composite)?\./, '飞星'],
82
+ [/^pattern/, '格局'],
83
+ [/^schools\./, '流派回显'],
84
+ [/^dayun\.jiao\./, '起运'],
85
+ [/^dayun\.toNextJieDays$/, '起运时间'],
86
+ [/^dayun\.list\.(\d+)\.ganzhi$/, '大运干支'],
87
+ [/^dayun\.startAge\./, '起运时间'],
88
+ [/^dayun\./, '大运评分'],
89
+ [/^liunian\./, '流年'],
90
+ [/^jieqi\./, '节气边界'],
91
+ [/^solarTime\./, '真太阳时'],
92
+ [/^dayGanZhi$/, '日辰'],
93
+ [/^hourZhi$/, '时支'],
94
+ [/^yueJiang\./, '月将'],
95
+ [/^xunKong$/, '旬空'],
96
+ [/^lines\.(\d+)\./, '爻'],
97
+ [/^shensha\./, '神煞'],
98
+ [/^frame\./, '格局用神'],
99
+ [/^strength\./, '旺衰'],
100
+ [/^wuxing\./, '五行计数'],
101
+ [/^relations\./, '干支关系'],
102
+ [/^input\./, '输入回显'],
103
+ ];
104
+
105
+ /** 大类:用于把几百处连带变化归成几句话 */
106
+ const CATEGORY = [
107
+ [/^pillars\./, '四柱'],
108
+ [/^shensha\./, '神煞'],
109
+ [/^dayun\./, '大运'],
110
+ [/^liunian\./, '流年'],
111
+ [/^frame\./, '格局用神'],
112
+ [/^strength\./, '旺衰'],
113
+ [/^wuxing\./, '五行计数'],
114
+ [/^dayMaster\./, '日主'],
115
+ [/^relations\./, '干支关系'],
116
+ [/^palaces\.(taiyuan|minggong|shengong)\./, '命身宫'],
117
+ [/^palaces\.\d+\./, '宫位'],
118
+ [/^palaces\./, '命身宫'],
119
+ [/^soul\.|^body\.|^doujun\./, '命身宫'],
120
+ [/^siZhu\./, '四柱'],
121
+ [/^ju$|^juNumber$|^yuan$|^dun$/, '局数'],
122
+ [/^daxian/, '大限'],
123
+ [/^fly/, '飞星'],
124
+ [/^pattern/, '格局'],
125
+ [/^jieqi\./, '节气'],
126
+ [/^solarTime\./, '真太阳时'],
127
+ [/^input\./, '输入回显'],
128
+ [/^lines\./, '爻'],
129
+ ];
130
+
131
+ /**
132
+ * 根因字段:真正被口径直接改动的干支/局数/爻。
133
+ * 其余几百处都是从这里派生出去的——把这层关系讲清楚,才是「口径对照」的价值。
134
+ */
135
+ const ROOT = [
136
+ [/^pillars\.(year|month|day|hour)\.ganzhi$/, '柱'],
137
+ [/^palaces\.(minggong|shengong)\.ganzhi$/, '命身宫'],
138
+ [/^soul\.ganzhi$/, '命宫'],
139
+ [/^body\.branch$/, '身宫'],
140
+ [/^siZhu\.(year|month|day|time)$/, '柱'],
141
+ [/^dayun\.jiao\.at$/, '起运'],
142
+ [/^dayGanZhi$/, '日辰'],
143
+ [/^hourZhi$/, '时支'],
144
+ [/^ju$|^juNumber$|^juName$/, '局数'],
145
+ [/^dun$/, '阴阳遁'],
146
+ [/^lines\.\d+\.(ganzhi|yinYang|name)$/, '爻'],
147
+ [/^yueJiang\.(name|zhi)$/, '月将'],
148
+ ];
149
+
150
+ export function labelOf(path) {
151
+ for (const [re, label] of LABELS) {
152
+ if (re.test(path)) return label;
153
+ }
154
+ return categoryOf(path) || path;
155
+ }
156
+
157
+ export function categoryOf(path) {
158
+ for (const [re, cat] of CATEGORY) {
159
+ if (re.test(path)) return cat;
160
+ }
161
+ return '';
162
+ }
163
+
164
+ export function rootOf(path) {
165
+ for (const [re, label] of ROOT) {
166
+ if (re.test(path)) return label;
167
+ }
168
+ return '';
169
+ }
170
+
171
+ /** 自然排序:行运类按序号,其余按字符串 */
172
+ export function sortDiffs(diffs) {
173
+ return [...diffs].sort((x, y) => x.path.localeCompare(y.path, 'zh-Hans-CN', { numeric: true }));
174
+ }
175
+
176
+ /**
177
+ * 把一组变化归纳成因果式一句话:
178
+ * 「根因:日柱 丙子 → 乙亥;连带影响 四柱、神煞、大运、流年 等 6 类(共 407 处)」
179
+ */
180
+ export function summarize(diffs) {
181
+ if (!diffs.length) return '本盘不受此口径影响:所有字段一致。';
182
+ const roots = diffs.filter((d) => rootOf(d.path));
183
+ const cats = [...new Set(diffs.map((d) => categoryOf(d.path)).filter(Boolean))];
184
+ const head = roots.length
185
+ ? `根因 ${roots.length} 处:` + roots.slice(0, 4)
186
+ .map((d) => `${labelOf(d.path)} ${formatValue(d.from)}→${formatValue(d.to)}`).join('、')
187
+ + (roots.length > 4 ? ' 等' : '')
188
+ : '无单一根因';
189
+ const tail = cats.length
190
+ ? `;连带影响 ${cats.slice(0, 6).join('、')}${cats.length > 6 ? ' 等' : ''} ${cats.length} 类,共 ${diffs.length} 处`
191
+ : `;共 ${diffs.length} 处`;
192
+ return head + tail + '。';
193
+ }
194
+
195
+ export const formatValue = (v) => {
196
+ if (v === undefined) return '—';
197
+ if (v === null) return 'null';
198
+ if (typeof v === 'string') return v;
199
+ if (Array.isArray(v)) return v.join('') || '[]';
200
+ if (typeof v === 'object') return JSON.stringify(v);
201
+ return String(v);
202
+ };
203
+
204
+ /**
205
+ * 文本版对照:先列根因,再列连带变化(默认最多 12 处,其余按类归并)
206
+ */
207
+ export function renderDiff(diffs, { title = '', limit = 12 } = {}) {
208
+ const lines = [];
209
+ if (title) lines.push(`【${title}】`);
210
+ lines.push(summarize(diffs));
211
+ if (!diffs.length) return lines.join('\n');
212
+
213
+ const roots = sortDiffs(diffs.filter((d) => rootOf(d.path)));
214
+ const rest = sortDiffs(diffs.filter((d) => !rootOf(d.path)));
215
+
216
+ if (roots.length) {
217
+ lines.push('');
218
+ lines.push(' 根因(口径直接改动):');
219
+ for (const d of roots) {
220
+ lines.push(` ${labelOf(d.path).padEnd(6)} ${formatValue(d.from)} → ${formatValue(d.to)}`);
221
+ }
222
+ }
223
+ if (rest.length) {
224
+ lines.push('');
225
+ lines.push(` 连带变化(${rest.length} 处,展示前 ${Math.min(limit, rest.length)} 处):`);
226
+ for (const d of rest.slice(0, limit)) {
227
+ lines.push(` ${labelOf(d.path).padEnd(6)} ${formatValue(d.from)} → ${formatValue(d.to)}`);
228
+ }
229
+ if (rest.length > limit) {
230
+ const byCat = {};
231
+ for (const d of rest.slice(limit)) {
232
+ const c = categoryOf(d.path) || '其他';
233
+ byCat[c] = (byCat[c] || 0) + 1;
234
+ }
235
+ lines.push(' 其余:' + Object.entries(byCat).map(([c, n]) => `${c} ${n} 处`).join('、'));
236
+ }
237
+ }
238
+ return lines.join('\n');
239
+ }
240
+
241
+ /**
242
+ * 口径开关表:每个体系 2–3 组「只差一个维度」的对照。
243
+ * read 取当前口径(没传时按引擎默认),alt 给另一口径,label 是给人看的短名。
244
+ * UI、CLI 与工具参数 diff 共用这一份,默认值不在别处再抄一遍。
245
+ */
246
+ export const CALIBER_SWITCHES = {
247
+ bazi: [
248
+ {
249
+ key: 'lateZi',
250
+ title: '晚子时:23:00 后是否换日',
251
+ short: '晚子时',
252
+ read: (a) => a.lateZi !== false,
253
+ alt: (v) => !v,
254
+ label: (v) => (v ? '换日' : '不换日'),
255
+ },
256
+ {
257
+ key: 'trueSolar',
258
+ title: '真太阳时:是否按出生地经度修正',
259
+ short: '真太阳时',
260
+ read: (a) => a.trueSolar !== false,
261
+ alt: (v) => !v,
262
+ label: (v) => (v ? '修正' : '不修正'),
263
+ },
264
+ ],
265
+ ziwei: [
266
+ {
267
+ key: 'leapMonth',
268
+ title: '闰月归月:按日切分 / 整月归次月',
269
+ short: '闰月归月',
270
+ read: (a) => (a.leapMonth === 'next' || a.leapMonth === 'prev' ? a.leapMonth : 'split'),
271
+ alt: (v) => (v === 'split' ? 'next' : 'split'),
272
+ label: (v) => ({ split: '按日切分', next: '整月归次月', prev: '整月归本月' }[v] || v),
273
+ },
274
+ {
275
+ key: 'trueSolar',
276
+ title: '真太阳时:是否按出生地经度修正',
277
+ short: '真太阳时',
278
+ read: (a) => a.trueSolar !== false,
279
+ alt: (v) => !v,
280
+ label: (v) => (v ? '修正' : '不修正'),
281
+ },
282
+ ],
283
+ qimen: [
284
+ {
285
+ key: 'juMethod',
286
+ title: '取局流派:拆补 / 超神接气 / 置闰',
287
+ short: '取局流派',
288
+ read: (a) => (['chaibu', 'chaoshen', 'zhirun'].includes(a.juMethod) ? a.juMethod : 'chaibu'),
289
+ alt: (v) => (v === 'chaibu' ? 'zhirun' : 'chaibu'),
290
+ label: (v) => ({ chaibu: '拆补法', chaoshen: '超神接气', zhirun: '置闰法' }[v] || v),
291
+ },
292
+ {
293
+ key: 'lateZiHourMode',
294
+ title: '晚子时:23:00 后归当日 / 次日',
295
+ short: '晚子时归日',
296
+ read: (a) => (a.lateZiHourMode === 'next-day' ? 'next-day' : 'same-day'),
297
+ alt: (v) => (v === 'next-day' ? 'same-day' : 'next-day'),
298
+ label: (v) => (v === 'next-day' ? '归次日' : '归当日'),
299
+ },
300
+ ],
301
+ };