@fses/workbench-app 0.2.1 → 0.2.3
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/WORKBENCH-CLOSURE.json +12 -12
- package/dist/Workspace-fYH2XNdb.js +22699 -0
- package/dist/fses-workbench-app.js +2 -2
- package/dist/{index-DbH6tMQy.js → index-CbIJlts1.js} +8 -8
- package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +2 -2
- package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +41 -2
- package/dist/internal/personal-workbench/lib/deepAgentQueueState.d.ts +111 -0
- package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +72 -0
- package/dist/internal/personal-workbench/lib/workbenchSocketClient.d.ts +1 -1
- package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +2 -0
- package/dist/runtime/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useWorkbenchRuntime-XpOzwm56.js → useWorkbenchRuntime-Ch8lqkjO.js} +6707 -6315
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +293 -293
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +1 -1
- package/node_modules/@fses/ai-chat/dist/style.css +1 -1
- package/node_modules/@fses/ai-chat/package.json +3 -3
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card-echarts-protocol.js +656 -641
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +3700 -3674
- package/node_modules/@fses/workbench-card/dist/types/block.d.ts +9 -0
- package/node_modules/@fses/workbench-card/package.json +4 -3
- package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.js +19950 -0
- package/node_modules/@fses/workbench-card/src/renderers/WorkbenchBlockRenderer.vue +2 -2
- package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/series.converter.ts +34 -13
- package/node_modules/@fses/workbench-card/src/renderers/native/nativeBindings.ts +20 -5
- package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceCompositeBindings.ts +5 -1
- package/node_modules/@fses/workbench-card/src/types/block.ts +9 -0
- package/package.json +3 -3
- package/dist/Workspace-DMye5DU8.js +0 -43113
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var be = Object.defineProperty;
|
|
2
|
+
var xe = (t, e, r) => e in t ? be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var et = (t, e, r) => xe(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
/**
|
|
5
5
|
* @vue/shared v3.5.32
|
|
6
6
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
7
7
|
* @license MIT
|
|
8
8
|
**/
|
|
9
|
-
const
|
|
9
|
+
const at = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
10
10
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
11
|
-
const
|
|
12
|
-
},
|
|
13
|
-
(t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97),
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
function
|
|
11
|
+
const Gt = () => {
|
|
12
|
+
}, _e = (t) => t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter
|
|
13
|
+
(t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97), Oe = (t) => t.startsWith("onUpdate:"), Q = Object.assign, A = Array.isArray, w = (t) => typeof t == "function", N = (t) => typeof t == "string", Se = (t) => typeof t == "symbol", C = (t) => t !== null && typeof t == "object";
|
|
14
|
+
let Ct;
|
|
15
|
+
const tt = () => Ct || (Ct = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
16
|
+
function At(t) {
|
|
17
17
|
if (A(t)) {
|
|
18
18
|
const e = {};
|
|
19
19
|
for (let r = 0; r < t.length; r++) {
|
|
20
|
-
const n = t[r],
|
|
21
|
-
if (
|
|
22
|
-
for (const
|
|
23
|
-
e[
|
|
20
|
+
const n = t[r], o = N(n) ? we(n) : At(n);
|
|
21
|
+
if (o)
|
|
22
|
+
for (const s in o)
|
|
23
|
+
e[s] = o[s];
|
|
24
24
|
}
|
|
25
25
|
return e;
|
|
26
26
|
} else if (N(t) || C(t))
|
|
27
27
|
return t;
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
function
|
|
29
|
+
const Ne = /;(?![^(]*\))/g, Ce = /:([^]+)/, Ee = /\/\*[^]*?\*\//g;
|
|
30
|
+
function we(t) {
|
|
31
31
|
const e = {};
|
|
32
|
-
return t.replace(
|
|
32
|
+
return t.replace(Ee, "").split(Ne).forEach((r) => {
|
|
33
33
|
if (r) {
|
|
34
|
-
const n = r.split(
|
|
34
|
+
const n = r.split(Ce);
|
|
35
35
|
n.length > 1 && (e[n[0].trim()] = n[1].trim());
|
|
36
36
|
}
|
|
37
37
|
}), e;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function bt(t) {
|
|
40
40
|
let e = "";
|
|
41
41
|
if (N(t))
|
|
42
42
|
e = t;
|
|
43
43
|
else if (A(t))
|
|
44
44
|
for (let r = 0; r < t.length; r++) {
|
|
45
|
-
const n =
|
|
45
|
+
const n = bt(t[r]);
|
|
46
46
|
n && (e += n + " ");
|
|
47
47
|
}
|
|
48
48
|
else if (C(t))
|
|
@@ -59,22 +59,22 @@ process.env.NODE_ENV;
|
|
|
59
59
|
process.env.NODE_ENV;
|
|
60
60
|
process.env.NODE_ENV;
|
|
61
61
|
new Set(
|
|
62
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(
|
|
62
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((t) => t !== "arguments" && t !== "caller").map((t) => Symbol[t]).filter(Se)
|
|
63
63
|
);
|
|
64
64
|
// @__NO_SIDE_EFFECTS__
|
|
65
|
-
function
|
|
66
|
-
return /* @__PURE__ */
|
|
65
|
+
function Zt(t) {
|
|
66
|
+
return /* @__PURE__ */ ct(t) ? /* @__PURE__ */ Zt(t.__v_raw) : !!(t && t.__v_isReactive);
|
|
67
67
|
}
|
|
68
68
|
// @__NO_SIDE_EFFECTS__
|
|
69
|
-
function
|
|
69
|
+
function ct(t) {
|
|
70
70
|
return !!(t && t.__v_isReadonly);
|
|
71
71
|
}
|
|
72
72
|
// @__NO_SIDE_EFFECTS__
|
|
73
|
-
function
|
|
73
|
+
function rt(t) {
|
|
74
74
|
return !!(t && t.__v_isShallow);
|
|
75
75
|
}
|
|
76
76
|
// @__NO_SIDE_EFFECTS__
|
|
77
|
-
function
|
|
77
|
+
function U(t) {
|
|
78
78
|
return t ? !!t.__v_raw : !1;
|
|
79
79
|
}
|
|
80
80
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -83,7 +83,7 @@ function S(t) {
|
|
|
83
83
|
return e ? /* @__PURE__ */ S(e) : t;
|
|
84
84
|
}
|
|
85
85
|
// @__NO_SIDE_EFFECTS__
|
|
86
|
-
function
|
|
86
|
+
function xt(t) {
|
|
87
87
|
return t ? t.__v_isRef === !0 : !1;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
@@ -92,44 +92,44 @@ function bt(t) {
|
|
|
92
92
|
* @license MIT
|
|
93
93
|
**/
|
|
94
94
|
const E = [];
|
|
95
|
-
function
|
|
95
|
+
function De(t) {
|
|
96
96
|
E.push(t);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Pe() {
|
|
99
99
|
E.pop();
|
|
100
100
|
}
|
|
101
|
-
let
|
|
101
|
+
let nt = !1;
|
|
102
102
|
function T(t, ...e) {
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
const r = E.length ? E[E.length - 1].component : null, n = r && r.appContext.config.warnHandler,
|
|
103
|
+
if (nt) return;
|
|
104
|
+
nt = !0;
|
|
105
|
+
const r = E.length ? E[E.length - 1].component : null, n = r && r.appContext.config.warnHandler, o = Re();
|
|
106
106
|
if (n)
|
|
107
|
-
|
|
107
|
+
_t(
|
|
108
108
|
n,
|
|
109
109
|
r,
|
|
110
110
|
11,
|
|
111
111
|
[
|
|
112
112
|
// eslint-disable-next-line no-restricted-syntax
|
|
113
|
-
t + e.map((
|
|
113
|
+
t + e.map((s) => {
|
|
114
114
|
var i, c;
|
|
115
|
-
return (c = (i =
|
|
115
|
+
return (c = (i = s.toString) == null ? void 0 : i.call(s)) != null ? c : JSON.stringify(s);
|
|
116
116
|
}).join(""),
|
|
117
117
|
r && r.proxy,
|
|
118
|
-
|
|
119
|
-
({ vnode:
|
|
118
|
+
o.map(
|
|
119
|
+
({ vnode: s }) => `at <${ae(r, s.type)}>`
|
|
120
120
|
).join(`
|
|
121
121
|
`),
|
|
122
|
-
|
|
122
|
+
o
|
|
123
123
|
]
|
|
124
124
|
);
|
|
125
125
|
else {
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
`, ...
|
|
126
|
+
const s = [`[Vue warn]: ${t}`, ...e];
|
|
127
|
+
o.length && s.push(`
|
|
128
|
+
`, ...Ie(o)), console.warn(...s);
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
nt = !1;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Re() {
|
|
133
133
|
let t = E[E.length - 1];
|
|
134
134
|
if (!t)
|
|
135
135
|
return [];
|
|
@@ -145,31 +145,31 @@ function Pe() {
|
|
|
145
145
|
}
|
|
146
146
|
return e;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Ie(t) {
|
|
149
149
|
const e = [];
|
|
150
150
|
return t.forEach((r, n) => {
|
|
151
151
|
e.push(...n === 0 ? [] : [`
|
|
152
|
-
`], ...
|
|
152
|
+
`], ...Te(r));
|
|
153
153
|
}), e;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
const r = e > 0 ? `... (${e} recursive calls)` : "", n = t.component ? t.component.parent == null : !1,
|
|
155
|
+
function Te({ vnode: t, recurseCount: e }) {
|
|
156
|
+
const r = e > 0 ? `... (${e} recursive calls)` : "", n = t.component ? t.component.parent == null : !1, o = ` at <${ae(
|
|
157
157
|
t.component,
|
|
158
158
|
t.type,
|
|
159
159
|
n
|
|
160
|
-
)}`,
|
|
161
|
-
return t.props ? [
|
|
160
|
+
)}`, s = ">" + r;
|
|
161
|
+
return t.props ? [o, ...Ve(t.props), s] : [o + s];
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Ve(t) {
|
|
164
164
|
const e = [], r = Object.keys(t);
|
|
165
165
|
return r.slice(0, 3).forEach((n) => {
|
|
166
|
-
e.push(...
|
|
166
|
+
e.push(...Xt(n, t[n]));
|
|
167
167
|
}), r.length > 3 && e.push(" ..."), e;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
return N(e) ? (e = JSON.stringify(e), r ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? r ? e : [`${t}=${e}`] : /* @__PURE__ */
|
|
169
|
+
function Xt(t, e, r) {
|
|
170
|
+
return N(e) ? (e = JSON.stringify(e), r ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? r ? e : [`${t}=${e}`] : /* @__PURE__ */ xt(e) ? (e = Xt(t, /* @__PURE__ */ S(e.value), !0), r ? e : [`${t}=Ref<`, e, ">"]) : w(e) ? [`${t}=fn${e.name ? `<${e.name}>` : ""}`] : (e = /* @__PURE__ */ S(e), r ? e : [`${t}=`, e]);
|
|
171
171
|
}
|
|
172
|
-
const
|
|
172
|
+
const Kt = {
|
|
173
173
|
sp: "serverPrefetch hook",
|
|
174
174
|
bc: "beforeCreate hook",
|
|
175
175
|
c: "created hook",
|
|
@@ -202,18 +202,18 @@ const Xt = {
|
|
|
202
202
|
15: "component update",
|
|
203
203
|
16: "app unmount cleanup function"
|
|
204
204
|
};
|
|
205
|
-
function
|
|
205
|
+
function _t(t, e, r, n) {
|
|
206
206
|
try {
|
|
207
207
|
return n ? t(...n) : t();
|
|
208
|
-
} catch (
|
|
209
|
-
|
|
208
|
+
} catch (o) {
|
|
209
|
+
qt(o, e, r);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
const
|
|
212
|
+
function qt(t, e, r, n = !0) {
|
|
213
|
+
const o = e ? e.vnode : null, { errorHandler: s, throwUnhandledErrorInProduction: i } = e && e.appContext.config || at;
|
|
214
214
|
if (e) {
|
|
215
215
|
let c = e.parent;
|
|
216
|
-
const a = e.proxy, l = process.env.NODE_ENV !== "production" ?
|
|
216
|
+
const a = e.proxy, l = process.env.NODE_ENV !== "production" ? Kt[r] : `https://vuejs.org/error-reference/#runtime-${r}`;
|
|
217
217
|
for (; c; ) {
|
|
218
218
|
const p = c.ec;
|
|
219
219
|
if (p) {
|
|
@@ -223,8 +223,8 @@ function Kt(t, e, r, n = !0) {
|
|
|
223
223
|
}
|
|
224
224
|
c = c.parent;
|
|
225
225
|
}
|
|
226
|
-
if (
|
|
227
|
-
|
|
226
|
+
if (s) {
|
|
227
|
+
_t(s, null, 10, [
|
|
228
228
|
t,
|
|
229
229
|
a,
|
|
230
230
|
l
|
|
@@ -232,16 +232,16 @@ function Kt(t, e, r, n = !0) {
|
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
|
|
235
|
+
Me(t, r, o, n, i);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Me(t, e, r, n = !0, o = !1) {
|
|
238
238
|
if (process.env.NODE_ENV !== "production") {
|
|
239
|
-
const
|
|
240
|
-
if (r &&
|
|
239
|
+
const s = Kt[e];
|
|
240
|
+
if (r && De(r), T(`Unhandled error${s ? ` during execution of ${s}` : ""}`), r && Pe(), n)
|
|
241
241
|
throw t;
|
|
242
242
|
console.error(t);
|
|
243
243
|
} else {
|
|
244
|
-
if (
|
|
244
|
+
if (o)
|
|
245
245
|
throw t;
|
|
246
246
|
console.error(t);
|
|
247
247
|
}
|
|
@@ -250,34 +250,34 @@ const g = [];
|
|
|
250
250
|
let x = -1;
|
|
251
251
|
const R = [];
|
|
252
252
|
let O = null, D = 0;
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
const
|
|
256
|
-
function
|
|
253
|
+
const Fe = /* @__PURE__ */ Promise.resolve();
|
|
254
|
+
let ut = null;
|
|
255
|
+
const je = 100;
|
|
256
|
+
function ke(t) {
|
|
257
257
|
let e = x + 1, r = g.length;
|
|
258
258
|
for (; e < r; ) {
|
|
259
|
-
const n = e + r >>> 1,
|
|
260
|
-
|
|
259
|
+
const n = e + r >>> 1, o = g[n], s = j(o);
|
|
260
|
+
s < t || s === t && o.flags & 2 ? e = n + 1 : r = n;
|
|
261
261
|
}
|
|
262
262
|
return e;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function ze(t) {
|
|
265
265
|
if (!(t.flags & 1)) {
|
|
266
|
-
const e =
|
|
266
|
+
const e = j(t), r = g[g.length - 1];
|
|
267
267
|
!r || // fast path when the job id is larger than the tail
|
|
268
|
-
!(t.flags & 2) && e >=
|
|
268
|
+
!(t.flags & 2) && e >= j(r) ? g.push(t) : g.splice(ke(e), 0, t), t.flags |= 1, Jt();
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
function ze(t) {
|
|
275
|
-
A(t) ? R.push(...t) : O && t.id === -1 ? O.splice(D + 1, 0, t) : t.flags & 1 || (R.push(t), t.flags |= 1), qt();
|
|
271
|
+
function Jt() {
|
|
272
|
+
ut || (ut = Fe.then(Yt));
|
|
276
273
|
}
|
|
277
274
|
function Le(t) {
|
|
275
|
+
A(t) ? R.push(...t) : O && t.id === -1 ? O.splice(D + 1, 0, t) : t.flags & 1 || (R.push(t), t.flags |= 1), Jt();
|
|
276
|
+
}
|
|
277
|
+
function $e(t) {
|
|
278
278
|
if (R.length) {
|
|
279
279
|
const e = [...new Set(R)].sort(
|
|
280
|
-
(r, n) =>
|
|
280
|
+
(r, n) => j(r) - j(n)
|
|
281
281
|
);
|
|
282
282
|
if (R.length = 0, O) {
|
|
283
283
|
O.push(...e);
|
|
@@ -285,22 +285,22 @@ function Le(t) {
|
|
|
285
285
|
}
|
|
286
286
|
for (O = e, process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map()), D = 0; D < O.length; D++) {
|
|
287
287
|
const r = O[D];
|
|
288
|
-
process.env.NODE_ENV !== "production" &&
|
|
288
|
+
process.env.NODE_ENV !== "production" && vt(t, r) || (r.flags & 4 && (r.flags &= -2), r.flags & 8 || r(), r.flags &= -2);
|
|
289
289
|
}
|
|
290
290
|
O = null, D = 0;
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
const
|
|
294
|
-
function
|
|
293
|
+
const j = (t) => t.id == null ? t.flags & 2 ? -1 : 1 / 0 : t.id;
|
|
294
|
+
function Yt(t) {
|
|
295
295
|
process.env.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map());
|
|
296
|
-
const e = process.env.NODE_ENV !== "production" ? (r) =>
|
|
296
|
+
const e = process.env.NODE_ENV !== "production" ? (r) => vt(t, r) : Gt;
|
|
297
297
|
try {
|
|
298
298
|
for (x = 0; x < g.length; x++) {
|
|
299
299
|
const r = g[x];
|
|
300
300
|
if (r && !(r.flags & 8)) {
|
|
301
301
|
if (process.env.NODE_ENV !== "production" && e(r))
|
|
302
302
|
continue;
|
|
303
|
-
r.flags & 4 && (r.flags &= -2),
|
|
303
|
+
r.flags & 4 && (r.flags &= -2), _t(
|
|
304
304
|
r,
|
|
305
305
|
r.i,
|
|
306
306
|
r.i ? 15 : 14
|
|
@@ -312,62 +312,62 @@ function Jt(t) {
|
|
|
312
312
|
const r = g[x];
|
|
313
313
|
r && (r.flags &= -2);
|
|
314
314
|
}
|
|
315
|
-
x = -1, g.length = 0,
|
|
315
|
+
x = -1, g.length = 0, $e(t), ut = null, (g.length || R.length) && Yt(t);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function vt(t, e) {
|
|
319
319
|
const r = t.get(e) || 0;
|
|
320
|
-
if (r >
|
|
321
|
-
const n = e.i,
|
|
322
|
-
return
|
|
323
|
-
`Maximum recursive updates exceeded${
|
|
320
|
+
if (r > je) {
|
|
321
|
+
const n = e.i, o = n && ie(n.type);
|
|
322
|
+
return qt(
|
|
323
|
+
`Maximum recursive updates exceeded${o ? ` in component <${o}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
324
324
|
null,
|
|
325
325
|
10
|
|
326
326
|
), !0;
|
|
327
327
|
}
|
|
328
328
|
return t.set(e, r + 1), !1;
|
|
329
329
|
}
|
|
330
|
-
const
|
|
331
|
-
process.env.NODE_ENV !== "production" && (
|
|
332
|
-
createRecord: st(
|
|
333
|
-
rerender: st(
|
|
334
|
-
reload: st(
|
|
330
|
+
const ot = /* @__PURE__ */ new Map();
|
|
331
|
+
process.env.NODE_ENV !== "production" && (tt().__VUE_HMR_RUNTIME__ = {
|
|
332
|
+
createRecord: st(He),
|
|
333
|
+
rerender: st(We),
|
|
334
|
+
reload: st(Be)
|
|
335
335
|
});
|
|
336
|
-
const
|
|
337
|
-
function
|
|
338
|
-
return
|
|
339
|
-
initialDef:
|
|
336
|
+
const G = /* @__PURE__ */ new Map();
|
|
337
|
+
function He(t, e) {
|
|
338
|
+
return G.has(t) ? !1 : (G.set(t, {
|
|
339
|
+
initialDef: Z(e),
|
|
340
340
|
instances: /* @__PURE__ */ new Set()
|
|
341
341
|
}), !0);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
return
|
|
343
|
+
function Z(t) {
|
|
344
|
+
return ce(t) ? t.__vccOpts : t;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
const r =
|
|
346
|
+
function We(t, e) {
|
|
347
|
+
const r = G.get(t);
|
|
348
348
|
r && (r.initialDef.render = e, [...r.instances].forEach((n) => {
|
|
349
|
-
e && (n.render = e,
|
|
349
|
+
e && (n.render = e, Z(n.type).render = e), n.renderCache = [], n.job.flags & 8 || n.update();
|
|
350
350
|
}));
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
const r =
|
|
352
|
+
function Be(t, e) {
|
|
353
|
+
const r = G.get(t);
|
|
354
354
|
if (!r) return;
|
|
355
|
-
e =
|
|
355
|
+
e = Z(e), Et(r.initialDef, e);
|
|
356
356
|
const n = [...r.instances];
|
|
357
|
-
for (let
|
|
358
|
-
const
|
|
359
|
-
let c =
|
|
360
|
-
c || (i !== r.initialDef &&
|
|
361
|
-
|
|
362
|
-
}) :
|
|
357
|
+
for (let o = 0; o < n.length; o++) {
|
|
358
|
+
const s = n[o], i = Z(s.type);
|
|
359
|
+
let c = ot.get(i);
|
|
360
|
+
c || (i !== r.initialDef && Et(i, e), ot.set(i, c = /* @__PURE__ */ new Set())), c.add(s), s.appContext.propsCache.delete(s.type), s.appContext.emitsCache.delete(s.type), s.appContext.optionsCache.delete(s.type), s.ceReload ? (c.add(s), s.ceReload(e.styles), c.delete(s)) : s.parent ? ze(() => {
|
|
361
|
+
s.job.flags & 8 || (s.parent.update(), c.delete(s));
|
|
362
|
+
}) : s.appContext.reload ? s.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
|
|
363
363
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
364
|
-
),
|
|
364
|
+
), s.root.ce && s !== s.root && s.root.ce._removeChildStyle(i);
|
|
365
365
|
}
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
Le(() => {
|
|
367
|
+
ot.clear();
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Et(t, e) {
|
|
371
371
|
Q(t, e);
|
|
372
372
|
for (const r in t)
|
|
373
373
|
r !== "__file" && !(r in e) && delete t[r];
|
|
@@ -383,49 +383,49 @@ function st(t) {
|
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
let P,
|
|
386
|
+
let P, z = [];
|
|
387
387
|
function Qt(t, e) {
|
|
388
388
|
var r, n;
|
|
389
|
-
P = t, P ? (P.enabled = !0,
|
|
389
|
+
P = t, P ? (P.enabled = !0, z.forEach(({ event: o, args: s }) => P.emit(o, ...s)), z = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
|
|
390
390
|
window.HTMLElement && // also exclude jsdom
|
|
391
391
|
// eslint-disable-next-line no-restricted-syntax
|
|
392
|
-
!((n = (r = window.navigator) == null ? void 0 : r.userAgent) != null && n.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((
|
|
393
|
-
Qt(
|
|
392
|
+
!((n = (r = window.navigator) == null ? void 0 : r.userAgent) != null && n.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((s) => {
|
|
393
|
+
Qt(s, e);
|
|
394
394
|
}), setTimeout(() => {
|
|
395
|
-
P || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null,
|
|
396
|
-
}, 3e3)) :
|
|
397
|
-
}
|
|
398
|
-
let
|
|
399
|
-
const
|
|
400
|
-
function
|
|
401
|
-
t.shapeFlag & 6 && t.component ? (t.transition = e,
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const
|
|
406
|
-
process.env.NODE_ENV !== "production" && (
|
|
395
|
+
P || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, z = []);
|
|
396
|
+
}, 3e3)) : z = [];
|
|
397
|
+
}
|
|
398
|
+
let X = null, Ue = null;
|
|
399
|
+
const Ge = (t) => t.__isTeleport;
|
|
400
|
+
function te(t, e) {
|
|
401
|
+
t.shapeFlag & 6 && t.component ? (t.transition = e, te(t.component.subTree, e)) : t.shapeFlag & 128 ? (t.ssContent.transition = e.clone(t.ssContent), t.ssFallback.transition = e.clone(t.ssFallback)) : t.transition = e;
|
|
402
|
+
}
|
|
403
|
+
tt().requestIdleCallback;
|
|
404
|
+
tt().cancelIdleCallback;
|
|
405
|
+
const Ze = /* @__PURE__ */ Symbol.for("v-ndc"), Xe = {};
|
|
406
|
+
process.env.NODE_ENV !== "production" && (Xe.ownKeys = (t) => (T(
|
|
407
407
|
"Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
|
|
408
408
|
), Reflect.ownKeys(t)));
|
|
409
|
-
const
|
|
410
|
-
function
|
|
409
|
+
const Ke = {}, ee = (t) => Object.getPrototypeOf(t) === Ke, qe = (t) => t.__isSuspense, re = /* @__PURE__ */ Symbol.for("v-fgt"), Je = /* @__PURE__ */ Symbol.for("v-txt"), Ye = /* @__PURE__ */ Symbol.for("v-cmt");
|
|
410
|
+
function ve(t) {
|
|
411
411
|
return t ? t.__v_isVNode === !0 : !1;
|
|
412
412
|
}
|
|
413
|
-
const Qe = (...t) =>
|
|
413
|
+
const Qe = (...t) => oe(
|
|
414
414
|
...t
|
|
415
|
-
),
|
|
415
|
+
), ne = ({ key: t }) => t ?? null, B = ({
|
|
416
416
|
ref: t,
|
|
417
417
|
ref_key: e,
|
|
418
418
|
ref_for: r
|
|
419
|
-
}) => (typeof t == "number" && (t = "" + t), t != null ? N(t) || /* @__PURE__ */
|
|
420
|
-
function
|
|
419
|
+
}) => (typeof t == "number" && (t = "" + t), t != null ? N(t) || /* @__PURE__ */ xt(t) || w(t) ? { i: X, r: t, k: e, f: !!r } : t : null);
|
|
420
|
+
function tr(t, e = null, r = null, n = 0, o = null, s = t === re ? 0 : 1, i = !1, c = !1) {
|
|
421
421
|
const a = {
|
|
422
422
|
__v_isVNode: !0,
|
|
423
423
|
__v_skip: !0,
|
|
424
424
|
type: t,
|
|
425
425
|
props: e,
|
|
426
|
-
key: e &&
|
|
427
|
-
ref: e &&
|
|
428
|
-
scopeId:
|
|
426
|
+
key: e && ne(e),
|
|
427
|
+
ref: e && B(e),
|
|
428
|
+
scopeId: Ue,
|
|
429
429
|
slotScopeIds: null,
|
|
430
430
|
children: r,
|
|
431
431
|
component: null,
|
|
@@ -440,64 +440,64 @@ function ve(t, e = null, r = null, n = 0, s = null, o = t === ee ? 0 : 1, i = !1
|
|
|
440
440
|
targetStart: null,
|
|
441
441
|
targetAnchor: null,
|
|
442
442
|
staticCount: 0,
|
|
443
|
-
shapeFlag:
|
|
443
|
+
shapeFlag: s,
|
|
444
444
|
patchFlag: n,
|
|
445
|
-
dynamicProps:
|
|
445
|
+
dynamicProps: o,
|
|
446
446
|
dynamicChildren: null,
|
|
447
447
|
appContext: null,
|
|
448
|
-
ctx:
|
|
448
|
+
ctx: X
|
|
449
449
|
};
|
|
450
|
-
return c ? (
|
|
450
|
+
return c ? (Ot(a, r), s & 128 && t.normalize(a)) : r && (a.shapeFlag |= N(r) ? 8 : 16), process.env.NODE_ENV !== "production" && a.key !== a.key && T("VNode created with invalid key (NaN). VNode type:", a.type), a;
|
|
451
451
|
}
|
|
452
|
-
const
|
|
453
|
-
function
|
|
454
|
-
if ((!t || t ===
|
|
455
|
-
const c =
|
|
452
|
+
const er = process.env.NODE_ENV !== "production" ? Qe : oe;
|
|
453
|
+
function oe(t, e = null, r = null, n = 0, o = null, s = !1) {
|
|
454
|
+
if ((!t || t === Ze) && (process.env.NODE_ENV !== "production" && !t && T(`Invalid vnode type when creating vnode: ${t}.`), t = Ye), ve(t)) {
|
|
455
|
+
const c = K(
|
|
456
456
|
t,
|
|
457
457
|
e,
|
|
458
458
|
!0
|
|
459
459
|
/* mergeRef: true */
|
|
460
460
|
);
|
|
461
|
-
return r &&
|
|
461
|
+
return r && Ot(c, r), c.patchFlag = -2, c;
|
|
462
462
|
}
|
|
463
|
-
if (
|
|
464
|
-
e =
|
|
463
|
+
if (ce(t) && (t = t.__vccOpts), e) {
|
|
464
|
+
e = rr(e);
|
|
465
465
|
let { class: c, style: a } = e;
|
|
466
|
-
c && !N(c) && (e.class =
|
|
466
|
+
c && !N(c) && (e.class = bt(c)), C(a) && (/* @__PURE__ */ U(a) && !A(a) && (a = Q({}, a)), e.style = At(a));
|
|
467
467
|
}
|
|
468
|
-
const i = N(t) ? 1 :
|
|
469
|
-
return process.env.NODE_ENV !== "production" && i & 4 && /* @__PURE__ */
|
|
468
|
+
const i = N(t) ? 1 : qe(t) ? 128 : Ge(t) ? 64 : C(t) ? 4 : w(t) ? 2 : 0;
|
|
469
|
+
return process.env.NODE_ENV !== "production" && i & 4 && /* @__PURE__ */ U(t) && (t = /* @__PURE__ */ S(t), T(
|
|
470
470
|
"Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
|
|
471
471
|
`
|
|
472
472
|
Component that was made reactive: `,
|
|
473
473
|
t
|
|
474
|
-
)),
|
|
474
|
+
)), tr(
|
|
475
475
|
t,
|
|
476
476
|
e,
|
|
477
477
|
r,
|
|
478
478
|
n,
|
|
479
|
-
s,
|
|
480
|
-
i,
|
|
481
479
|
o,
|
|
480
|
+
i,
|
|
481
|
+
s,
|
|
482
482
|
!0
|
|
483
483
|
);
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return t ? /* @__PURE__ */
|
|
485
|
+
function rr(t) {
|
|
486
|
+
return t ? /* @__PURE__ */ U(t) || ee(t) ? Q({}, t) : t : null;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
const { props:
|
|
488
|
+
function K(t, e, r = !1, n = !1) {
|
|
489
|
+
const { props: o, ref: s, patchFlag: i, children: c, transition: a } = t, l = e ? or(o || {}, e) : o, p = {
|
|
490
490
|
__v_isVNode: !0,
|
|
491
491
|
__v_skip: !0,
|
|
492
492
|
type: t.type,
|
|
493
493
|
props: l,
|
|
494
|
-
key: l &&
|
|
494
|
+
key: l && ne(l),
|
|
495
495
|
ref: e && e.ref ? (
|
|
496
496
|
// #2078 in the case of <component :is="vnode" ref="extra"/>
|
|
497
497
|
// if the vnode itself already has a ref, cloneVNode will need to merge
|
|
498
498
|
// the refs so the single vnode can be set on multiple refs
|
|
499
|
-
r &&
|
|
500
|
-
) :
|
|
499
|
+
r && s ? A(s) ? s.concat(B(e)) : [s, B(e)] : B(e)
|
|
500
|
+
) : s,
|
|
501
501
|
scopeId: t.scopeId,
|
|
502
502
|
slotScopeIds: t.slotScopeIds,
|
|
503
503
|
children: process.env.NODE_ENV !== "production" && i === -1 && A(c) ? c.map(se) : c,
|
|
@@ -510,7 +510,7 @@ function X(t, e, r = !1, n = !1) {
|
|
|
510
510
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
511
511
|
// note: preserve flag for fragments since they use the flag for children
|
|
512
512
|
// fast paths only.
|
|
513
|
-
patchFlag: e && t.type !==
|
|
513
|
+
patchFlag: e && t.type !== re ? i === -1 ? 16 : i | 16 : i,
|
|
514
514
|
dynamicProps: t.dynamicProps,
|
|
515
515
|
dynamicChildren: t.dynamicChildren,
|
|
516
516
|
appContext: t.appContext,
|
|
@@ -522,27 +522,27 @@ function X(t, e, r = !1, n = !1) {
|
|
|
522
522
|
// they will simply be overwritten.
|
|
523
523
|
component: t.component,
|
|
524
524
|
suspense: t.suspense,
|
|
525
|
-
ssContent: t.ssContent &&
|
|
526
|
-
ssFallback: t.ssFallback &&
|
|
525
|
+
ssContent: t.ssContent && K(t.ssContent),
|
|
526
|
+
ssFallback: t.ssFallback && K(t.ssFallback),
|
|
527
527
|
placeholder: t.placeholder,
|
|
528
528
|
el: t.el,
|
|
529
529
|
anchor: t.anchor,
|
|
530
530
|
ctx: t.ctx,
|
|
531
531
|
ce: t.ce
|
|
532
532
|
};
|
|
533
|
-
return a && n &&
|
|
533
|
+
return a && n && te(
|
|
534
534
|
p,
|
|
535
535
|
a.clone(p)
|
|
536
536
|
), p;
|
|
537
537
|
}
|
|
538
538
|
function se(t) {
|
|
539
|
-
const e =
|
|
539
|
+
const e = K(t);
|
|
540
540
|
return A(t.children) && (e.children = t.children.map(se)), e;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
542
|
+
function nr(t = " ", e = 0) {
|
|
543
|
+
return er(Je, null, t, e);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Ot(t, e) {
|
|
546
546
|
let r = 0;
|
|
547
547
|
const { shapeFlag: n } = t;
|
|
548
548
|
if (e == null)
|
|
@@ -551,37 +551,37 @@ function _t(t, e) {
|
|
|
551
551
|
r = 16;
|
|
552
552
|
else if (typeof e == "object")
|
|
553
553
|
if (n & 65) {
|
|
554
|
-
const
|
|
555
|
-
|
|
554
|
+
const o = e.default;
|
|
555
|
+
o && (o._c && (o._d = !1), Ot(t, o()), o._c && (o._d = !0));
|
|
556
556
|
return;
|
|
557
557
|
} else
|
|
558
|
-
r = 32, !e._ && !
|
|
559
|
-
else w(e) ? (e = { default: e, _ctx:
|
|
558
|
+
r = 32, !e._ && !ee(e) && (e._ctx = X);
|
|
559
|
+
else w(e) ? (e = { default: e, _ctx: X }, r = 32) : (e = String(e), n & 64 ? (r = 16, e = [nr(e)]) : r = 8);
|
|
560
560
|
t.children = e, t.shapeFlag |= r;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function or(...t) {
|
|
563
563
|
const e = {};
|
|
564
564
|
for (let r = 0; r < t.length; r++) {
|
|
565
565
|
const n = t[r];
|
|
566
|
-
for (const
|
|
567
|
-
if (
|
|
568
|
-
e.class !== n.class && (e.class =
|
|
569
|
-
else if (
|
|
570
|
-
e.style =
|
|
571
|
-
else if (
|
|
572
|
-
const
|
|
573
|
-
i &&
|
|
566
|
+
for (const o in n)
|
|
567
|
+
if (o === "class")
|
|
568
|
+
e.class !== n.class && (e.class = bt([e.class, n.class]));
|
|
569
|
+
else if (o === "style")
|
|
570
|
+
e.style = At([e.style, n.style]);
|
|
571
|
+
else if (_e(o)) {
|
|
572
|
+
const s = e[o], i = n[o];
|
|
573
|
+
i && s !== i && !(A(s) && s.includes(i)) ? e[o] = s ? [].concat(s, i) : i : i == null && s == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
574
574
|
// the model listener.
|
|
575
|
-
!
|
|
576
|
-
} else
|
|
575
|
+
!Oe(o) && (e[o] = i);
|
|
576
|
+
} else o !== "" && (e[o] = n[o]);
|
|
577
577
|
}
|
|
578
578
|
return e;
|
|
579
579
|
}
|
|
580
580
|
{
|
|
581
|
-
const t =
|
|
582
|
-
let
|
|
583
|
-
return (
|
|
584
|
-
|
|
581
|
+
const t = tt(), e = (r, n) => {
|
|
582
|
+
let o;
|
|
583
|
+
return (o = t[r]) || (o = t[r] = []), o.push(n), (s) => {
|
|
584
|
+
o.length > 1 ? o.forEach((i) => i(s)) : o[0](s);
|
|
585
585
|
};
|
|
586
586
|
};
|
|
587
587
|
e(
|
|
@@ -593,42 +593,42 @@ function nr(...t) {
|
|
|
593
593
|
);
|
|
594
594
|
}
|
|
595
595
|
process.env.NODE_ENV;
|
|
596
|
-
const sr = /(?:^|[-_])\w/g,
|
|
597
|
-
function
|
|
596
|
+
const sr = /(?:^|[-_])\w/g, ir = (t) => t.replace(sr, (e) => e.toUpperCase()).replace(/[-_]/g, "");
|
|
597
|
+
function ie(t, e = !0) {
|
|
598
598
|
return w(t) ? t.displayName || t.name : t.name || e && t.__name;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
let n =
|
|
600
|
+
function ae(t, e, r = !1) {
|
|
601
|
+
let n = ie(e);
|
|
602
602
|
if (!n && e.__file) {
|
|
603
|
-
const
|
|
604
|
-
|
|
603
|
+
const o = e.__file.match(/([^/\\]+)\.\w+$/);
|
|
604
|
+
o && (n = o[1]);
|
|
605
605
|
}
|
|
606
606
|
if (!n && t) {
|
|
607
|
-
const
|
|
608
|
-
for (const i in
|
|
609
|
-
if (
|
|
607
|
+
const o = (s) => {
|
|
608
|
+
for (const i in s)
|
|
609
|
+
if (s[i] === e)
|
|
610
610
|
return i;
|
|
611
611
|
};
|
|
612
|
-
n =
|
|
612
|
+
n = o(t.components) || t.parent && o(
|
|
613
613
|
t.parent.type.components
|
|
614
|
-
) ||
|
|
614
|
+
) || o(t.appContext.components);
|
|
615
615
|
}
|
|
616
|
-
return n ?
|
|
616
|
+
return n ? ir(n) : r ? "App" : "Anonymous";
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function ce(t) {
|
|
619
619
|
return w(t) && "__vccOpts" in t;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function ar() {
|
|
622
622
|
if (process.env.NODE_ENV === "production" || typeof window > "u")
|
|
623
623
|
return;
|
|
624
|
-
const t = { style: "color:#3ba776" }, e = { style: "color:#1677ff" }, r = { style: "color:#f5222d" }, n = { style: "color:#eb2f96" },
|
|
624
|
+
const t = { style: "color:#3ba776" }, e = { style: "color:#1677ff" }, r = { style: "color:#f5222d" }, n = { style: "color:#eb2f96" }, o = {
|
|
625
625
|
__vue_custom_formatter: !0,
|
|
626
626
|
header(u) {
|
|
627
627
|
if (!C(u))
|
|
628
628
|
return null;
|
|
629
629
|
if (u.__isVue)
|
|
630
630
|
return ["div", t, "VueInstance"];
|
|
631
|
-
if (/* @__PURE__ */
|
|
631
|
+
if (/* @__PURE__ */ xt(u)) {
|
|
632
632
|
const d = u.value;
|
|
633
633
|
return [
|
|
634
634
|
"div",
|
|
@@ -639,20 +639,20 @@ function ir() {
|
|
|
639
639
|
">"
|
|
640
640
|
];
|
|
641
641
|
} else {
|
|
642
|
-
if (/* @__PURE__ */
|
|
642
|
+
if (/* @__PURE__ */ Zt(u))
|
|
643
643
|
return [
|
|
644
644
|
"div",
|
|
645
645
|
{},
|
|
646
|
-
["span", t, /* @__PURE__ */
|
|
646
|
+
["span", t, /* @__PURE__ */ rt(u) ? "ShallowReactive" : "Reactive"],
|
|
647
647
|
"<",
|
|
648
648
|
c(u),
|
|
649
|
-
`>${/* @__PURE__ */
|
|
649
|
+
`>${/* @__PURE__ */ ct(u) ? " (readonly)" : ""}`
|
|
650
650
|
];
|
|
651
|
-
if (/* @__PURE__ */
|
|
651
|
+
if (/* @__PURE__ */ ct(u))
|
|
652
652
|
return [
|
|
653
653
|
"div",
|
|
654
654
|
{},
|
|
655
|
-
["span", t, /* @__PURE__ */
|
|
655
|
+
["span", t, /* @__PURE__ */ rt(u) ? "ShallowReadonly" : "Readonly"],
|
|
656
656
|
"<",
|
|
657
657
|
c(u),
|
|
658
658
|
">"
|
|
@@ -668,13 +668,13 @@ function ir() {
|
|
|
668
668
|
return [
|
|
669
669
|
"div",
|
|
670
670
|
{},
|
|
671
|
-
...
|
|
671
|
+
...s(u.$)
|
|
672
672
|
];
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
|
-
function
|
|
675
|
+
function s(u) {
|
|
676
676
|
const d = [];
|
|
677
|
-
u.type.props && u.props && d.push(i("props", /* @__PURE__ */ S(u.props))), u.setupState !==
|
|
677
|
+
u.type.props && u.props && d.push(i("props", /* @__PURE__ */ S(u.props))), u.setupState !== at && d.push(i("setup", u.setupState)), u.data !== at && d.push(i("data", /* @__PURE__ */ S(u.data)));
|
|
678
678
|
const y = a(u, "computed");
|
|
679
679
|
y && d.push(i("computed", y));
|
|
680
680
|
const h = a(u, "inject");
|
|
@@ -734,9 +734,9 @@ function ir() {
|
|
|
734
734
|
return !0;
|
|
735
735
|
}
|
|
736
736
|
function p(u) {
|
|
737
|
-
return /* @__PURE__ */
|
|
737
|
+
return /* @__PURE__ */ rt(u) ? "ShallowRef" : u.effect ? "ComputedRef" : "Ref";
|
|
738
738
|
}
|
|
739
|
-
window.devtoolsFormatters ? window.devtoolsFormatters.push(
|
|
739
|
+
window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
|
|
740
740
|
}
|
|
741
741
|
process.env.NODE_ENV;
|
|
742
742
|
process.env.NODE_ENV;
|
|
@@ -746,91 +746,102 @@ process.env.NODE_ENV;
|
|
|
746
746
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
747
747
|
* @license MIT
|
|
748
748
|
**/
|
|
749
|
-
function
|
|
750
|
-
|
|
749
|
+
function cr() {
|
|
750
|
+
ar();
|
|
751
751
|
}
|
|
752
|
-
process.env.NODE_ENV !== "production" &&
|
|
753
|
-
const
|
|
752
|
+
process.env.NODE_ENV !== "production" && cr();
|
|
753
|
+
const wt = "__workbenchMetricRowContext";
|
|
754
754
|
function m(t) {
|
|
755
755
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function L(t) {
|
|
758
758
|
return Array.isArray(t) ? t.map((e) => String(e ?? "")) : [];
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
if (typeof t == "number" && Number.isFinite(t)) return t;
|
|
762
|
-
if (typeof t == "string" && t.trim()) {
|
|
763
|
-
const e = Number(t);
|
|
764
|
-
return Number.isFinite(e) ? e : t;
|
|
765
|
-
}
|
|
760
|
+
function ur(t) {
|
|
766
761
|
if (m(t) && "value" in t) {
|
|
767
|
-
const
|
|
762
|
+
const r = t.value, n = V(r);
|
|
768
763
|
return {
|
|
769
764
|
...t,
|
|
770
|
-
value:
|
|
765
|
+
value: n !== void 0 ? n : r
|
|
771
766
|
};
|
|
772
767
|
}
|
|
773
|
-
|
|
768
|
+
const e = V(t);
|
|
769
|
+
return e !== void 0 ? e : t;
|
|
770
|
+
}
|
|
771
|
+
function V(t) {
|
|
772
|
+
if (typeof t == "number") return Number.isFinite(t) ? t : void 0;
|
|
773
|
+
if (typeof t == "bigint") {
|
|
774
|
+
const e = Number(t);
|
|
775
|
+
return Number.isFinite(e) ? e : void 0;
|
|
776
|
+
}
|
|
777
|
+
if (typeof t == "string") {
|
|
778
|
+
const e = t.replace(/[,,\s]/gu, "").trim();
|
|
779
|
+
if (!e) return;
|
|
780
|
+
const r = Number(e);
|
|
781
|
+
return Number.isFinite(r) ? r : void 0;
|
|
782
|
+
}
|
|
783
|
+
if (m(t))
|
|
784
|
+
for (const e of ["value", "raw_value", "numeric_value", "metric_value", "count", "amount"]) {
|
|
785
|
+
if (!Object.prototype.hasOwnProperty.call(t, e)) continue;
|
|
786
|
+
const r = V(t[e]);
|
|
787
|
+
if (r !== void 0) return r;
|
|
788
|
+
}
|
|
774
789
|
}
|
|
775
|
-
function
|
|
790
|
+
function Dt(t) {
|
|
776
791
|
const e = t.categories;
|
|
777
|
-
if (Array.isArray(e)) return
|
|
778
|
-
if (m(e)) return
|
|
792
|
+
if (Array.isArray(e)) return L(e);
|
|
793
|
+
if (m(e)) return L(e.xAxis);
|
|
779
794
|
const r = t.xAxis;
|
|
780
|
-
return Array.isArray(r) ?
|
|
795
|
+
return Array.isArray(r) ? L(r) : m(r) ? L(r.data) : [];
|
|
781
796
|
}
|
|
782
|
-
function
|
|
797
|
+
function lr(t) {
|
|
783
798
|
const e = t.categories;
|
|
784
799
|
return !m(e) || !Array.isArray(e.indicators) ? [] : e.indicators.filter(m).map((r) => {
|
|
785
|
-
const n = typeof r.name == "string" && r.name.trim() ? r.name.trim() : "",
|
|
786
|
-
return n ? { name: n, ...
|
|
800
|
+
const n = typeof r.name == "string" && r.name.trim() ? r.name.trim() : "", o = typeof r.max == "number" && Number.isFinite(r.max) ? r.max : void 0;
|
|
801
|
+
return n ? { name: n, ...o === void 0 ? {} : { max: o } } : null;
|
|
787
802
|
}).filter((r) => !!r);
|
|
788
803
|
}
|
|
789
|
-
function
|
|
804
|
+
function Pt(t) {
|
|
790
805
|
const e = t.series;
|
|
791
806
|
return Array.isArray(e) ? e.filter(m).map((r, n) => {
|
|
792
|
-
const
|
|
793
|
-
return { id:
|
|
807
|
+
const o = typeof r.id == "string" && r.id.trim() ? r.id.trim() : void 0, s = typeof r.name == "string" && r.name.trim() ? r.name.trim() : o || `series-${n + 1}`, i = typeof r.typeHint == "string" && r.typeHint.trim() ? r.typeHint.trim() : typeof r.type == "string" && r.type.trim() ? r.type.trim() : void 0, c = Array.isArray(r.data) ? r.data.map(ur) : [];
|
|
808
|
+
return { id: o, name: s, typeHint: i, data: c };
|
|
794
809
|
}) : [];
|
|
795
810
|
}
|
|
796
|
-
function
|
|
811
|
+
function fr(...t) {
|
|
797
812
|
for (const e of t) {
|
|
798
813
|
if (!e) continue;
|
|
799
|
-
const r = m(e.extension) ? e.extension : void 0, n = m(e.metric_context) ? e.metric_context : m(r == null ? void 0 : r.metric_context) ? r.metric_context : void 0,
|
|
800
|
-
if (Array.isArray(
|
|
814
|
+
const r = m(e.extension) ? e.extension : void 0, n = m(e.metric_context) ? e.metric_context : m(r == null ? void 0 : r.metric_context) ? r.metric_context : void 0, o = n == null ? void 0 : n.row_contexts;
|
|
815
|
+
if (Array.isArray(o)) return o.filter(m);
|
|
801
816
|
}
|
|
802
817
|
return [];
|
|
803
818
|
}
|
|
804
|
-
function fr(t, e) {
|
|
805
|
-
return e ? m(t) ? { ...t, [Et]: e } : { value: t, [Et]: e } : t;
|
|
806
|
-
}
|
|
807
819
|
function pr(t, e) {
|
|
820
|
+
return e ? m(t) ? { ...t, [wt]: e } : { value: t, [wt]: e } : t;
|
|
821
|
+
}
|
|
822
|
+
function dr(t, e) {
|
|
808
823
|
return e.length === 0 ? t : t.map((r) => ({
|
|
809
824
|
...r,
|
|
810
|
-
data: r.data.map((n,
|
|
825
|
+
data: r.data.map((n, o) => pr(n, e[o]))
|
|
811
826
|
}));
|
|
812
827
|
}
|
|
813
|
-
function
|
|
814
|
-
const e = m(t) ? t : {}, r = m(e.dataset) ? e.dataset : void 0, n = r &&
|
|
828
|
+
function mr(t) {
|
|
829
|
+
const e = m(t) ? t : {}, r = m(e.dataset) ? e.dataset : void 0, n = r && Dt(r).length > 0 ? r : e, o = r && Pt(r).length > 0 ? r : e, s = fr(e, r);
|
|
815
830
|
return {
|
|
816
|
-
categories:
|
|
817
|
-
indicators:
|
|
818
|
-
series:
|
|
831
|
+
categories: Dt(n),
|
|
832
|
+
indicators: lr(n),
|
|
833
|
+
series: dr(Pt(o), s)
|
|
819
834
|
};
|
|
820
835
|
}
|
|
821
|
-
function
|
|
836
|
+
function ue(t) {
|
|
822
837
|
return t.type === "pie";
|
|
823
838
|
}
|
|
824
|
-
function
|
|
839
|
+
function le(t) {
|
|
825
840
|
return t.type === "radar";
|
|
826
841
|
}
|
|
827
|
-
function
|
|
842
|
+
function fe(t) {
|
|
828
843
|
return t.type === "funnel";
|
|
829
844
|
}
|
|
830
|
-
function mr(t) {
|
|
831
|
-
const e = t.series;
|
|
832
|
-
return Array.isArray(e) && e.some((r) => m(r) && ce(r));
|
|
833
|
-
}
|
|
834
845
|
function yr(t) {
|
|
835
846
|
const e = t.series;
|
|
836
847
|
return Array.isArray(e) && e.some((r) => m(r) && ue(r));
|
|
@@ -839,110 +850,114 @@ function hr(t) {
|
|
|
839
850
|
const e = t.series;
|
|
840
851
|
return Array.isArray(e) && e.some((r) => m(r) && le(r));
|
|
841
852
|
}
|
|
842
|
-
function
|
|
853
|
+
function gr(t) {
|
|
854
|
+
const e = t.series;
|
|
855
|
+
return Array.isArray(e) && e.some((r) => m(r) && fe(r));
|
|
856
|
+
}
|
|
857
|
+
function $(t) {
|
|
843
858
|
const e = typeof t == "string" ? t.trim().toLowerCase().replace(/\s+/gu, "") : "";
|
|
844
859
|
return e === "transparent" || e === "rgba(0,0,0,0)" || e === "rgba(255,255,255,0)";
|
|
845
860
|
}
|
|
846
|
-
function
|
|
861
|
+
function Rt(t) {
|
|
847
862
|
if (t.type !== "bar" || typeof t.stack != "string") return !1;
|
|
848
863
|
const e = m(t.itemStyle) ? t.itemStyle : {}, r = m(t.emphasis) ? t.emphasis : {}, n = m(r.itemStyle) ? r.itemStyle : {};
|
|
849
|
-
return
|
|
850
|
-
}
|
|
851
|
-
function gr(t) {
|
|
852
|
-
const e = m(t) && "value" in t ? t.value : t, r = typeof e == "string" && e.trim() ? Number(e) : e;
|
|
853
|
-
return typeof r == "number" && Number.isFinite(r) ? Math.max(0, r) : 0;
|
|
864
|
+
return $(e.color) || $(e.borderColor) || $(n.color) || $(n.borderColor);
|
|
854
865
|
}
|
|
855
866
|
function Ar(t) {
|
|
867
|
+
const e = m(t) && "value" in t ? t.value : t, r = V(e);
|
|
868
|
+
return r !== void 0 ? Math.max(0, r) : 0;
|
|
869
|
+
}
|
|
870
|
+
function br(t) {
|
|
856
871
|
let e = 0;
|
|
857
872
|
return t.map((r, n) => {
|
|
858
|
-
const
|
|
859
|
-
return e +=
|
|
873
|
+
const o = n === 0 ? 0 : e;
|
|
874
|
+
return e += Ar(r), o;
|
|
860
875
|
});
|
|
861
876
|
}
|
|
862
|
-
function
|
|
877
|
+
function xr(t, e) {
|
|
863
878
|
if (e.length !== 1) return;
|
|
864
879
|
const r = t.filter(m);
|
|
865
880
|
if (r.length !== t.length) return;
|
|
866
|
-
const n = r.findIndex(
|
|
881
|
+
const n = r.findIndex(Rt);
|
|
867
882
|
if (n < 0) return;
|
|
868
|
-
const
|
|
883
|
+
const o = r[n], s = typeof o.stack == "string" ? o.stack : void 0, i = r.findIndex((a, l) => l !== n && a.type === "bar" && typeof a.stack == "string" && a.stack === s && !Rt(a));
|
|
869
884
|
if (i < 0) return;
|
|
870
885
|
const c = e[0];
|
|
871
886
|
return r.map((a, l) => l === n ? {
|
|
872
887
|
...a,
|
|
873
|
-
data:
|
|
888
|
+
data: br(c.data)
|
|
874
889
|
} : l === i ? {
|
|
875
890
|
...a,
|
|
876
891
|
data: c.data,
|
|
877
892
|
name: c.name
|
|
878
893
|
} : a);
|
|
879
894
|
}
|
|
880
|
-
function
|
|
895
|
+
function H(t, e) {
|
|
881
896
|
if (e.length === 0) return;
|
|
882
897
|
const r = t, n = r.legend;
|
|
883
898
|
if (Array.isArray(n)) {
|
|
884
|
-
r.legend = n.map((
|
|
899
|
+
r.legend = n.map((o, s) => s === 0 && m(o) ? { ...o, data: e } : o);
|
|
885
900
|
return;
|
|
886
901
|
}
|
|
887
902
|
n !== !1 && (r.legend = m(n) ? { ...n, data: e } : { data: e });
|
|
888
903
|
}
|
|
889
|
-
function
|
|
904
|
+
function _r(t, e) {
|
|
890
905
|
const r = t, n = r.xAxis;
|
|
891
906
|
if (Array.isArray(n)) {
|
|
892
|
-
r.xAxis = n.map((
|
|
907
|
+
r.xAxis = n.map((o, s) => s === 0 && m(o) ? { ...o, data: e } : o);
|
|
893
908
|
return;
|
|
894
909
|
}
|
|
895
910
|
m(n) && (r.xAxis = { ...n, data: e });
|
|
896
911
|
}
|
|
897
|
-
function
|
|
912
|
+
function It(t) {
|
|
898
913
|
return m(t) && t.type === "time";
|
|
899
914
|
}
|
|
900
|
-
function
|
|
915
|
+
function Or(t) {
|
|
901
916
|
const e = t.xAxis;
|
|
902
|
-
return Array.isArray(e) ? e.some(
|
|
917
|
+
return Array.isArray(e) ? e.some(It) : It(e);
|
|
903
918
|
}
|
|
904
|
-
function
|
|
919
|
+
function Sr(t) {
|
|
905
920
|
const e = t.trim();
|
|
906
921
|
return e ? /^\d{10,13}$/u.test(e) ? !0 : /(?:^\d{4}(?:[-/]\d{1,2})?|T\d{2}:\d{2}|\d{1,2}:\d{2})/u.test(e) ? Number.isFinite(Date.parse(e)) : !1 : !1;
|
|
907
922
|
}
|
|
908
|
-
function
|
|
909
|
-
return t.length > 0 && t.every(
|
|
923
|
+
function Nr(t) {
|
|
924
|
+
return t.length > 0 && t.every(Sr);
|
|
910
925
|
}
|
|
911
|
-
function
|
|
912
|
-
return
|
|
926
|
+
function Cr(t, e) {
|
|
927
|
+
return Or(t) ? Nr(e) ? (Er(t), "time") : (wr(t, e), "category") : (_r(t, e), "category");
|
|
913
928
|
}
|
|
914
|
-
function
|
|
915
|
-
const e = t, r = e.xAxis, n = (
|
|
916
|
-
if (!m(
|
|
917
|
-
const { data:
|
|
929
|
+
function Er(t) {
|
|
930
|
+
const e = t, r = e.xAxis, n = (o) => {
|
|
931
|
+
if (!m(o)) return o;
|
|
932
|
+
const { data: s, ...i } = o;
|
|
918
933
|
return { ...i, type: "time" };
|
|
919
934
|
};
|
|
920
935
|
e.xAxis = Array.isArray(r) ? r.map(n) : n(r);
|
|
921
936
|
}
|
|
922
|
-
function Er(t, e) {
|
|
923
|
-
const r = t, n = r.xAxis, s = (o, i = 0) => i === 0 && m(o) ? { ...o, type: "category", data: e } : o;
|
|
924
|
-
r.xAxis = Array.isArray(n) ? n.map((o, i) => s(o, i)) : m(n) ? s(n) : { type: "category", data: e };
|
|
925
|
-
}
|
|
926
937
|
function wr(t, e) {
|
|
938
|
+
const r = t, n = r.xAxis, o = (s, i = 0) => i === 0 && m(s) ? { ...s, type: "category", data: e } : s;
|
|
939
|
+
r.xAxis = Array.isArray(n) ? n.map((s, i) => o(s, i)) : m(n) ? o(n) : { type: "category", data: e };
|
|
940
|
+
}
|
|
941
|
+
function Dr(t, e) {
|
|
927
942
|
return t.data.map((r, n) => {
|
|
928
|
-
const
|
|
929
|
-
return m(r) ? { ...r, value: [e[n],
|
|
943
|
+
const o = m(r) && "value" in r ? r.value : r;
|
|
944
|
+
return m(r) ? { ...r, value: [e[n], o] } : [e[n], r];
|
|
930
945
|
});
|
|
931
946
|
}
|
|
932
|
-
function
|
|
947
|
+
function pe(t, e) {
|
|
933
948
|
return t.data.every(m) ? t.data.map((r, n) => ({
|
|
934
949
|
...r,
|
|
935
950
|
name: typeof r.name == "string" && r.name.trim() ? r.name.trim() : e[n] || t.name || `item-${n + 1}`,
|
|
936
|
-
value:
|
|
951
|
+
value: V(r.value) ?? 0
|
|
937
952
|
})) : t.data.map((r, n) => ({
|
|
938
953
|
name: e[n] || `item-${n + 1}`,
|
|
939
|
-
value: r
|
|
954
|
+
value: V(r) ?? r
|
|
940
955
|
}));
|
|
941
956
|
}
|
|
942
|
-
function
|
|
943
|
-
return
|
|
957
|
+
function Pr(t, e) {
|
|
958
|
+
return pe(t, e);
|
|
944
959
|
}
|
|
945
|
-
function
|
|
960
|
+
function Rr(t) {
|
|
946
961
|
return [{
|
|
947
962
|
name: t.name,
|
|
948
963
|
value: t.data.map((e) => {
|
|
@@ -954,16 +969,16 @@ function Pr(t) {
|
|
|
954
969
|
function _(t) {
|
|
955
970
|
return m(t) ? t : {};
|
|
956
971
|
}
|
|
957
|
-
const
|
|
972
|
+
const Ir = {
|
|
958
973
|
/**
|
|
959
974
|
* 根据协议配置构建 ECharts option 骨架。
|
|
960
975
|
* @param config - 协议配置载荷,包含系列定义和展示配置
|
|
961
976
|
* @returns 包含标题、提示框、图例、坐标轴和空系列的 ECharts option
|
|
962
977
|
*/
|
|
963
978
|
buildOption(t) {
|
|
964
|
-
const e = t.series.some((
|
|
979
|
+
const e = t.series.some((s) => s.type === "pie"), r = t.series.some((s) => s.type === "radar"), n = t.series.some((s) => s.type === "funnel");
|
|
965
980
|
if (e) {
|
|
966
|
-
const
|
|
981
|
+
const s = {
|
|
967
982
|
title: {
|
|
968
983
|
text: t.chart.title
|
|
969
984
|
},
|
|
@@ -979,10 +994,10 @@ const Rr = {
|
|
|
979
994
|
data: []
|
|
980
995
|
}))
|
|
981
996
|
};
|
|
982
|
-
return t.optionPatch && Object.assign(
|
|
997
|
+
return t.optionPatch && Object.assign(s, t.optionPatch), s;
|
|
983
998
|
}
|
|
984
999
|
if (r) {
|
|
985
|
-
const
|
|
1000
|
+
const s = {
|
|
986
1001
|
title: {
|
|
987
1002
|
text: t.chart.title
|
|
988
1003
|
},
|
|
@@ -1001,10 +1016,10 @@ const Rr = {
|
|
|
1001
1016
|
data: []
|
|
1002
1017
|
}))
|
|
1003
1018
|
};
|
|
1004
|
-
return t.optionPatch && Object.assign(
|
|
1019
|
+
return t.optionPatch && Object.assign(s, t.optionPatch), s;
|
|
1005
1020
|
}
|
|
1006
1021
|
if (n) {
|
|
1007
|
-
const
|
|
1022
|
+
const s = {
|
|
1008
1023
|
title: {
|
|
1009
1024
|
text: t.chart.title
|
|
1010
1025
|
},
|
|
@@ -1019,9 +1034,9 @@ const Rr = {
|
|
|
1019
1034
|
data: []
|
|
1020
1035
|
}))
|
|
1021
1036
|
};
|
|
1022
|
-
return t.optionPatch && Object.assign(
|
|
1037
|
+
return t.optionPatch && Object.assign(s, t.optionPatch), s;
|
|
1023
1038
|
}
|
|
1024
|
-
const
|
|
1039
|
+
const o = {
|
|
1025
1040
|
title: {
|
|
1026
1041
|
text: t.chart.title
|
|
1027
1042
|
},
|
|
@@ -1037,13 +1052,13 @@ const Rr = {
|
|
|
1037
1052
|
type: "value"
|
|
1038
1053
|
},
|
|
1039
1054
|
// SeriesDef.type 为通用 string,需断言为 any 以满足 ECharts SeriesOption 字面量联合类型。
|
|
1040
|
-
series: t.series.map((
|
|
1041
|
-
id:
|
|
1042
|
-
type:
|
|
1055
|
+
series: t.series.map((s) => ({
|
|
1056
|
+
id: s.id,
|
|
1057
|
+
type: s.type,
|
|
1043
1058
|
data: []
|
|
1044
1059
|
}))
|
|
1045
1060
|
};
|
|
1046
|
-
return t.optionPatch && Object.assign(
|
|
1061
|
+
return t.optionPatch && Object.assign(o, t.optionPatch), o;
|
|
1047
1062
|
},
|
|
1048
1063
|
/**
|
|
1049
1064
|
* 将数据载荷合并到已有的 ECharts option 中。
|
|
@@ -1052,95 +1067,95 @@ const Rr = {
|
|
|
1052
1067
|
* @returns 更新后的 ECharts option
|
|
1053
1068
|
*/
|
|
1054
1069
|
mergeData(t, e) {
|
|
1055
|
-
const r =
|
|
1070
|
+
const r = mr(e), n = { ...t }, o = yr(n), s = hr(n), i = gr(n);
|
|
1056
1071
|
let c = "category";
|
|
1057
|
-
if (!
|
|
1058
|
-
const a = !
|
|
1072
|
+
if (!o && !s && !i && (c = Cr(n, r.categories)), Array.isArray(n.series)) {
|
|
1073
|
+
const a = !o && !s && !i ? xr(n.series, r.series) : void 0;
|
|
1059
1074
|
n.series = a ?? n.series.map((l, p) => {
|
|
1060
1075
|
const u = l, d = u.id || `series-${p + 1}`, y = r.series.find(
|
|
1061
1076
|
(h) => h.id === d
|
|
1062
1077
|
) || r.series[p];
|
|
1063
|
-
return y ?
|
|
1078
|
+
return y ? ue(u) ? {
|
|
1064
1079
|
...u,
|
|
1065
|
-
data:
|
|
1080
|
+
data: pe(y, r.categories),
|
|
1066
1081
|
name: y.name
|
|
1067
|
-
} :
|
|
1082
|
+
} : le(u) ? {
|
|
1068
1083
|
...u,
|
|
1069
|
-
data:
|
|
1084
|
+
data: Rr(y),
|
|
1070
1085
|
name: y.name
|
|
1071
|
-
} :
|
|
1086
|
+
} : fe(u) ? {
|
|
1072
1087
|
...u,
|
|
1073
|
-
data:
|
|
1088
|
+
data: Pr(y, r.categories),
|
|
1074
1089
|
name: y.name
|
|
1075
1090
|
} : {
|
|
1076
1091
|
...u,
|
|
1077
|
-
data: c === "time" ?
|
|
1092
|
+
data: c === "time" ? Dr(y, r.categories) : y.data,
|
|
1078
1093
|
name: y.name
|
|
1079
1094
|
} : u;
|
|
1080
1095
|
});
|
|
1081
1096
|
}
|
|
1082
|
-
if (
|
|
1097
|
+
if (o) {
|
|
1083
1098
|
const a = n;
|
|
1084
1099
|
delete a.xAxis, delete a.yAxis;
|
|
1085
1100
|
const l = Array.isArray(n.series) ? n.series.flatMap((p) => m(p) && Array.isArray(p.data) ? p.data.filter(m).flatMap((u) => typeof u.name == "string" && u.name.trim() ? [u.name.trim()] : []) : []) : [];
|
|
1086
|
-
|
|
1087
|
-
} else if (
|
|
1101
|
+
H(n, l);
|
|
1102
|
+
} else if (s) {
|
|
1088
1103
|
const a = n;
|
|
1089
1104
|
delete a.xAxis, delete a.yAxis;
|
|
1090
1105
|
const l = a.radar;
|
|
1091
|
-
a.radar = m(l) ? { ...l, indicator: r.indicators } : { indicator: r.indicators },
|
|
1106
|
+
a.radar = m(l) ? { ...l, indicator: r.indicators } : { indicator: r.indicators }, H(
|
|
1092
1107
|
n,
|
|
1093
1108
|
r.series.flatMap((p) => p.name ? [p.name] : [])
|
|
1094
1109
|
);
|
|
1095
1110
|
} else if (i) {
|
|
1096
1111
|
const a = n;
|
|
1097
|
-
delete a.xAxis, delete a.yAxis, delete a.grid,
|
|
1112
|
+
delete a.xAxis, delete a.yAxis, delete a.grid, H(
|
|
1098
1113
|
n,
|
|
1099
1114
|
r.series.flatMap((l) => l.name ? [l.name] : [])
|
|
1100
1115
|
);
|
|
1101
1116
|
} else
|
|
1102
|
-
|
|
1117
|
+
H(
|
|
1103
1118
|
n,
|
|
1104
1119
|
r.series.flatMap((a) => a.name ? [a.name] : [])
|
|
1105
1120
|
);
|
|
1106
1121
|
return n;
|
|
1107
1122
|
}
|
|
1108
1123
|
};
|
|
1109
|
-
function
|
|
1124
|
+
function q(t) {
|
|
1110
1125
|
return !!(t && typeof t == "object" && !Array.isArray(t));
|
|
1111
1126
|
}
|
|
1112
|
-
function
|
|
1127
|
+
function Tr(t) {
|
|
1113
1128
|
return t.datasets[0];
|
|
1114
1129
|
}
|
|
1115
|
-
function
|
|
1130
|
+
function Vr(t) {
|
|
1116
1131
|
var e;
|
|
1117
1132
|
return (e = t.rows) != null && e.length ? t.rows : t.source;
|
|
1118
1133
|
}
|
|
1119
|
-
function
|
|
1120
|
-
return t ? (Array.isArray(t) ? t : [t]).filter(
|
|
1134
|
+
function Mr(t) {
|
|
1135
|
+
return t ? (Array.isArray(t) ? t : [t]).filter(q) : [];
|
|
1121
1136
|
}
|
|
1122
|
-
function
|
|
1123
|
-
return
|
|
1137
|
+
function Fr(t, e) {
|
|
1138
|
+
return Mr(t.series).map((n) => n.datasetId).find((n) => typeof n == "string" && n.trim().length > 0) || e || "main";
|
|
1124
1139
|
}
|
|
1125
|
-
function
|
|
1140
|
+
function Tt(t, e) {
|
|
1126
1141
|
const r = { ...t };
|
|
1127
1142
|
return !r.datasetId && r.datasetIndex === void 0 && (r.datasetId = e), Array.isArray(r.data) && r.data.length === 0 && (r.datasetId || r.datasetIndex !== void 0) && delete r.data, r;
|
|
1128
1143
|
}
|
|
1129
|
-
function
|
|
1130
|
-
return t && (Array.isArray(t) ? t.map((r) =>
|
|
1144
|
+
function jr(t, e) {
|
|
1145
|
+
return t && (Array.isArray(t) ? t.map((r) => q(r) ? Tt(r, e) : r) : q(t) ? Tt(t, e) : t);
|
|
1131
1146
|
}
|
|
1132
|
-
function
|
|
1147
|
+
function lt(t, e, r, n) {
|
|
1133
1148
|
return {
|
|
1134
|
-
...
|
|
1149
|
+
...q(t) ? t : {},
|
|
1135
1150
|
id: e,
|
|
1136
1151
|
source: r,
|
|
1137
1152
|
...n != null && n.length ? { dimensions: n } : {}
|
|
1138
1153
|
};
|
|
1139
1154
|
}
|
|
1140
|
-
function
|
|
1141
|
-
return t.length === 0 ? [
|
|
1155
|
+
function kr(t, e, r, n) {
|
|
1156
|
+
return t.length === 0 ? [lt({}, e, r, n)] : t.map((o, s) => s === 0 ? lt(o, e, r, n) : o);
|
|
1142
1157
|
}
|
|
1143
|
-
const
|
|
1158
|
+
const zr = {
|
|
1144
1159
|
/**
|
|
1145
1160
|
* Builds the empty dataset option skeleton from table config.
|
|
1146
1161
|
* @param config - Protocol config payload.
|
|
@@ -1148,15 +1163,15 @@ const kr = {
|
|
|
1148
1163
|
*/
|
|
1149
1164
|
buildOption(t) {
|
|
1150
1165
|
var n;
|
|
1151
|
-
const e = ((n = t.series.find((
|
|
1166
|
+
const e = ((n = t.series.find((o) => o.datasetId)) == null ? void 0 : n.datasetId) || "main", r = {
|
|
1152
1167
|
dataset: {
|
|
1153
1168
|
id: e,
|
|
1154
1169
|
source: []
|
|
1155
1170
|
},
|
|
1156
|
-
series: t.series.map((
|
|
1157
|
-
id:
|
|
1158
|
-
type:
|
|
1159
|
-
datasetId:
|
|
1171
|
+
series: t.series.map((o) => ({
|
|
1172
|
+
id: o.id,
|
|
1173
|
+
type: o.type,
|
|
1174
|
+
datasetId: o.datasetId || e
|
|
1160
1175
|
}))
|
|
1161
1176
|
};
|
|
1162
1177
|
return t.optionPatch && Object.assign(r, t.optionPatch), r;
|
|
@@ -1168,16 +1183,16 @@ const kr = {
|
|
|
1168
1183
|
* @returns Updated ECharts option.
|
|
1169
1184
|
*/
|
|
1170
1185
|
mergeData(t, e) {
|
|
1171
|
-
const r = { ...t }, n =
|
|
1186
|
+
const r = { ...t }, n = Tr(e);
|
|
1172
1187
|
if (!n) return r;
|
|
1173
|
-
const
|
|
1174
|
-
return r.dataset = Array.isArray(r.dataset) ?
|
|
1188
|
+
const o = Vr(n), s = Array.isArray(n.dimensions) ? n.dimensions : void 0, i = Fr(r, n.id);
|
|
1189
|
+
return r.dataset = Array.isArray(r.dataset) ? kr(r.dataset, i, o, s) : lt(r.dataset, i, o, s), r.series = jr(r.series, i), r;
|
|
1175
1190
|
}
|
|
1176
1191
|
};
|
|
1177
|
-
function
|
|
1192
|
+
function Lr(t, e) {
|
|
1178
1193
|
return t === "candlestick" || t === "boxplot" || t === "heatmap" || e === "candlestick" || e === "boxplot" || e === "heatmap";
|
|
1179
1194
|
}
|
|
1180
|
-
const
|
|
1195
|
+
const $r = {
|
|
1181
1196
|
/**
|
|
1182
1197
|
* 根据协议配置构建包含类别轴和数值轴的 ECharts option 骨架
|
|
1183
1198
|
* @param config - 协议配置载荷
|
|
@@ -1208,28 +1223,28 @@ const Lr = {
|
|
|
1208
1223
|
*/
|
|
1209
1224
|
mergeData(t, e) {
|
|
1210
1225
|
var i, c;
|
|
1211
|
-
const r = e, n = { ...t },
|
|
1212
|
-
(i =
|
|
1213
|
-
const
|
|
1214
|
-
return
|
|
1226
|
+
const r = e, n = { ...t }, o = r.dataset;
|
|
1227
|
+
(i = o.categories) != null && i.xAxis && n.xAxis && typeof n.xAxis == "object" && !Array.isArray(n.xAxis) && (n.xAxis = { ...n.xAxis, data: o.categories.xAxis });
|
|
1228
|
+
const s = (c = o.categories) == null ? void 0 : c.yAxis;
|
|
1229
|
+
return s && n.yAxis && typeof n.yAxis == "object" && !Array.isArray(n.yAxis) && (n.yAxis = {
|
|
1215
1230
|
...n.yAxis,
|
|
1216
1231
|
type: "category",
|
|
1217
|
-
data:
|
|
1232
|
+
data: s
|
|
1218
1233
|
}), Array.isArray(n.series) && (n.series = n.series.map((a, l) => {
|
|
1219
1234
|
const p = a;
|
|
1220
|
-
if (
|
|
1235
|
+
if (Lr(o.tupleKind, p.type))
|
|
1221
1236
|
return {
|
|
1222
1237
|
...p,
|
|
1223
|
-
data:
|
|
1238
|
+
data: o.rows
|
|
1224
1239
|
};
|
|
1225
|
-
const u =
|
|
1240
|
+
const u = o.rows.map((d) => d[l]);
|
|
1226
1241
|
return {
|
|
1227
1242
|
...p,
|
|
1228
1243
|
data: u
|
|
1229
1244
|
};
|
|
1230
1245
|
})), n;
|
|
1231
1246
|
}
|
|
1232
|
-
},
|
|
1247
|
+
}, Hr = {
|
|
1233
1248
|
/**
|
|
1234
1249
|
* 根据协议配置构建树形图表的 ECharts option 骨架
|
|
1235
1250
|
* 对 type='tree' 的系列添加布局定位参数
|
|
@@ -1257,12 +1272,12 @@ const Lr = {
|
|
|
1257
1272
|
*/
|
|
1258
1273
|
mergeData(t, e) {
|
|
1259
1274
|
const r = e, n = { ...t };
|
|
1260
|
-
return Array.isArray(n.series) && (n.series = n.series.map((
|
|
1261
|
-
...
|
|
1275
|
+
return Array.isArray(n.series) && (n.series = n.series.map((o) => ({
|
|
1276
|
+
...o,
|
|
1262
1277
|
data: r.dataset.roots
|
|
1263
1278
|
}))), n;
|
|
1264
1279
|
}
|
|
1265
|
-
},
|
|
1280
|
+
}, Wr = {
|
|
1266
1281
|
/**
|
|
1267
1282
|
* 根据协议配置构建关系图的 ECharts option 骨架
|
|
1268
1283
|
* 对 type='graph' 的系列添加力引导布局和漫游支持
|
|
@@ -1290,21 +1305,21 @@ const Lr = {
|
|
|
1290
1305
|
* @returns 更新后的 ECharts option
|
|
1291
1306
|
*/
|
|
1292
1307
|
mergeData(t, e) {
|
|
1293
|
-
const r = e, n = { ...t },
|
|
1294
|
-
return Array.isArray(n.series) && (n.series = n.series.map((
|
|
1295
|
-
const i = { ...
|
|
1296
|
-
return i.data =
|
|
1308
|
+
const r = e, n = { ...t }, o = r.dataset;
|
|
1309
|
+
return Array.isArray(n.series) && (n.series = n.series.map((s) => {
|
|
1310
|
+
const i = { ...s };
|
|
1311
|
+
return i.data = o.nodes, i.links = o.links, o.categories && (i.categories = o.categories), i;
|
|
1297
1312
|
})), n;
|
|
1298
1313
|
}
|
|
1299
1314
|
};
|
|
1300
|
-
function
|
|
1315
|
+
function Br(t) {
|
|
1301
1316
|
return (Array.isArray(t) ? t : t ? [t] : []).some((r) => {
|
|
1302
1317
|
if (!r || typeof r != "object" || Array.isArray(r)) return !1;
|
|
1303
1318
|
const n = r;
|
|
1304
1319
|
return n.type !== "map" || n.coordinateSystem === "geo";
|
|
1305
1320
|
});
|
|
1306
1321
|
}
|
|
1307
|
-
const
|
|
1322
|
+
const Ur = {
|
|
1308
1323
|
/**
|
|
1309
1324
|
* 根据协议配置构建地理图表的 ECharts option 骨架
|
|
1310
1325
|
* 包含视觉映射组件用于区域着色
|
|
@@ -1338,16 +1353,16 @@ const Br = {
|
|
|
1338
1353
|
* @returns 更新后的 ECharts option
|
|
1339
1354
|
*/
|
|
1340
1355
|
mergeData(t, e) {
|
|
1341
|
-
const r = e, n = { ...t },
|
|
1342
|
-
return !
|
|
1356
|
+
const r = e, n = { ...t }, o = r.dataset;
|
|
1357
|
+
return !o || typeof o != "object" || (o.mapName && Br(n.series) && (n.geo = {
|
|
1343
1358
|
...n.geo || {},
|
|
1344
|
-
map:
|
|
1345
|
-
}), Array.isArray(n.series) && Array.isArray(
|
|
1346
|
-
...
|
|
1347
|
-
data:
|
|
1359
|
+
map: o.mapName
|
|
1360
|
+
}), Array.isArray(n.series) && Array.isArray(o.regions) && (n.series = n.series.map((s) => ({
|
|
1361
|
+
...s,
|
|
1362
|
+
data: o.regions
|
|
1348
1363
|
})))), n;
|
|
1349
1364
|
}
|
|
1350
|
-
},
|
|
1365
|
+
}, Gr = {
|
|
1351
1366
|
/**
|
|
1352
1367
|
* 根据协议配置构建 3D 场景的 ECharts option 骨架
|
|
1353
1368
|
* @param config - 协议配置载荷
|
|
@@ -1372,15 +1387,15 @@ const Br = {
|
|
|
1372
1387
|
* @returns 更新后的 ECharts option
|
|
1373
1388
|
*/
|
|
1374
1389
|
mergeData(t, e) {
|
|
1375
|
-
const r = e, n = { ...t },
|
|
1390
|
+
const r = e, n = { ...t }, o = r.dataset, s = o.data || o.points || o.rows;
|
|
1376
1391
|
Array.isArray(n.series) && (n.series = n.series.map((l) => ({
|
|
1377
1392
|
...l,
|
|
1378
|
-
data:
|
|
1393
|
+
data: s
|
|
1379
1394
|
})));
|
|
1380
|
-
const { id: i, shape: c, ...a } =
|
|
1395
|
+
const { id: i, shape: c, ...a } = o;
|
|
1381
1396
|
return Object.assign(n, a), n;
|
|
1382
1397
|
}
|
|
1383
|
-
},
|
|
1398
|
+
}, Zr = {
|
|
1384
1399
|
/**
|
|
1385
1400
|
* 根据协议配置构建包含时间轴的 ECharts option 骨架
|
|
1386
1401
|
* @param config - 协议配置载荷
|
|
@@ -1405,12 +1420,12 @@ const Br = {
|
|
|
1405
1420
|
* @returns 更新后的 ECharts option
|
|
1406
1421
|
*/
|
|
1407
1422
|
mergeData(t, e) {
|
|
1408
|
-
const r = e, n = { ...t },
|
|
1409
|
-
if (!
|
|
1410
|
-
const { id:
|
|
1423
|
+
const r = e, n = { ...t }, o = r.dataset;
|
|
1424
|
+
if (!o) return n;
|
|
1425
|
+
const { id: s, shape: i, ...c } = o;
|
|
1411
1426
|
return Object.assign(n, c), n;
|
|
1412
1427
|
}
|
|
1413
|
-
},
|
|
1428
|
+
}, Xr = {
|
|
1414
1429
|
/**
|
|
1415
1430
|
* 根据协议配置构建动画过渡图表的 ECharts option 骨架
|
|
1416
1431
|
* 仅创建空系列数组,系列结构由 optionPatch 定义
|
|
@@ -1431,12 +1446,12 @@ const Br = {
|
|
|
1431
1446
|
* @returns 更新后的 ECharts option
|
|
1432
1447
|
*/
|
|
1433
1448
|
mergeData(t, e) {
|
|
1434
|
-
const r = e, n = { ...t },
|
|
1435
|
-
if (!
|
|
1436
|
-
const { id:
|
|
1449
|
+
const r = e, n = { ...t }, o = r.dataset;
|
|
1450
|
+
if (!o) return n;
|
|
1451
|
+
const { id: s, shape: i, ...c } = o;
|
|
1437
1452
|
return Object.assign(n, c), n;
|
|
1438
1453
|
}
|
|
1439
|
-
},
|
|
1454
|
+
}, Kr = {
|
|
1440
1455
|
/**
|
|
1441
1456
|
* 根据协议配置构建自定义图形的 ECharts option 骨架
|
|
1442
1457
|
* @param config - 协议配置载荷
|
|
@@ -1463,7 +1478,7 @@ const Br = {
|
|
|
1463
1478
|
elements: r.dataset.elements
|
|
1464
1479
|
}), n;
|
|
1465
1480
|
}
|
|
1466
|
-
},
|
|
1481
|
+
}, qr = {
|
|
1467
1482
|
/**
|
|
1468
1483
|
* 直接将 optionPatch 展开为 ECharts option
|
|
1469
1484
|
* 布局类图表完全由 optionPatch 定义结构
|
|
@@ -1484,7 +1499,7 @@ const Br = {
|
|
|
1484
1499
|
const r = e, n = { ...t };
|
|
1485
1500
|
return r.dataset && (n.grid = r.dataset.grids), n;
|
|
1486
1501
|
}
|
|
1487
|
-
},
|
|
1502
|
+
}, Jr = {
|
|
1488
1503
|
/**
|
|
1489
1504
|
* 根据协议配置构建组合图表的 ECharts option 骨架
|
|
1490
1505
|
* 包含坐标轴、系列、提示框和图例等基础配置
|
|
@@ -1518,12 +1533,12 @@ const Br = {
|
|
|
1518
1533
|
* @returns 更新后的 ECharts option
|
|
1519
1534
|
*/
|
|
1520
1535
|
mergeData(t, e) {
|
|
1521
|
-
const r = e, n = { ...t },
|
|
1522
|
-
if (!
|
|
1523
|
-
const { id:
|
|
1536
|
+
const r = e, n = { ...t }, o = r.dataset;
|
|
1537
|
+
if (!o) return n;
|
|
1538
|
+
const { id: s, shape: i, ...c } = o;
|
|
1524
1539
|
return Object.assign(n, c), n;
|
|
1525
1540
|
}
|
|
1526
|
-
},
|
|
1541
|
+
}, Yr = {
|
|
1527
1542
|
/**
|
|
1528
1543
|
* 直接将 optionPatch 展开为 ECharts option
|
|
1529
1544
|
* 此类图表的所有数据已包含在配置中,无需外部数据源
|
|
@@ -1544,21 +1559,21 @@ const Br = {
|
|
|
1544
1559
|
return t;
|
|
1545
1560
|
}
|
|
1546
1561
|
};
|
|
1547
|
-
function
|
|
1562
|
+
function M(t) {
|
|
1548
1563
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
1549
1564
|
}
|
|
1550
|
-
function
|
|
1565
|
+
function Vt(t) {
|
|
1551
1566
|
const e = t.id ?? t.name;
|
|
1552
1567
|
return typeof e == "string" && e.trim() ? e : void 0;
|
|
1553
1568
|
}
|
|
1554
|
-
function
|
|
1555
|
-
return e.some((n) => !
|
|
1556
|
-
const i =
|
|
1569
|
+
function vr(t, e) {
|
|
1570
|
+
return e.some((n) => !M(n)) ? [...e] : e.reduce((n, o, s) => {
|
|
1571
|
+
const i = Vt(o), c = n.findIndex((a) => M(a) && i && Vt(a) === i);
|
|
1557
1572
|
if (c === -1) {
|
|
1558
|
-
const a =
|
|
1559
|
-
return a === -1 ? [...n,
|
|
1573
|
+
const a = M(n[s]) ? s : -1;
|
|
1574
|
+
return a === -1 ? [...n, o] : n.map((l, p) => p === a ? I(l, o) : l);
|
|
1560
1575
|
}
|
|
1561
|
-
return n.map((a, l) => l === c ? I(a,
|
|
1576
|
+
return n.map((a, l) => l === c ? I(a, o) : a);
|
|
1562
1577
|
}, [...t]);
|
|
1563
1578
|
}
|
|
1564
1579
|
function Qr(t) {
|
|
@@ -1567,15 +1582,15 @@ function Qr(t) {
|
|
|
1567
1582
|
function I(t, e) {
|
|
1568
1583
|
const r = { ...t };
|
|
1569
1584
|
for (const n of Object.keys(e)) {
|
|
1570
|
-
const
|
|
1571
|
-
Array.isArray(
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
) : r[n] =
|
|
1585
|
+
const o = r[n], s = e[n];
|
|
1586
|
+
Array.isArray(o) && Array.isArray(s) && Qr(n) ? r[n] = vr(o, s) : M(o) && M(s) ? r[n] = I(
|
|
1587
|
+
o,
|
|
1588
|
+
s
|
|
1589
|
+
) : r[n] = s;
|
|
1575
1590
|
}
|
|
1576
1591
|
return r;
|
|
1577
1592
|
}
|
|
1578
|
-
const
|
|
1593
|
+
const tn = "https://echarts.apache.org/examples", en = /* @__PURE__ */ new Set([
|
|
1579
1594
|
"baseTexture",
|
|
1580
1595
|
"heightTexture",
|
|
1581
1596
|
"texture",
|
|
@@ -1586,123 +1601,123 @@ const vr = "https://echarts.apache.org/examples", tn = /* @__PURE__ */ new Set([
|
|
|
1586
1601
|
"metalnessTexture",
|
|
1587
1602
|
"emissionTexture",
|
|
1588
1603
|
"matcap"
|
|
1589
|
-
]),
|
|
1590
|
-
function
|
|
1591
|
-
const r = /* @__PURE__ */
|
|
1604
|
+
]), rn = "#103b5d", nn = "#000";
|
|
1605
|
+
function J(t, e = /* @__PURE__ */ new WeakMap()) {
|
|
1606
|
+
const r = /* @__PURE__ */ U(t) ? /* @__PURE__ */ S(t) : t;
|
|
1592
1607
|
if (!r || typeof r != "object") return r;
|
|
1593
1608
|
if (e.has(r)) return e.get(r);
|
|
1594
1609
|
if (Array.isArray(r)) {
|
|
1595
|
-
const
|
|
1596
|
-
return e.set(r,
|
|
1597
|
-
|
|
1598
|
-
}),
|
|
1610
|
+
const o = [];
|
|
1611
|
+
return e.set(r, o), r.forEach((s, i) => {
|
|
1612
|
+
o[i] = J(s, e);
|
|
1613
|
+
}), o;
|
|
1599
1614
|
}
|
|
1600
1615
|
if (r instanceof Date)
|
|
1601
1616
|
return new Date(r.getTime());
|
|
1602
1617
|
if (r instanceof RegExp)
|
|
1603
1618
|
return new RegExp(r.source, r.flags);
|
|
1604
1619
|
const n = {};
|
|
1605
|
-
return e.set(r, n), Object.entries(r).forEach(([
|
|
1606
|
-
n[
|
|
1620
|
+
return e.set(r, n), Object.entries(r).forEach(([o, s]) => {
|
|
1621
|
+
n[o] = J(s, e);
|
|
1607
1622
|
}), n;
|
|
1608
1623
|
}
|
|
1609
1624
|
function f(t) {
|
|
1610
1625
|
return !!(t && typeof t == "object" && !Array.isArray(t));
|
|
1611
1626
|
}
|
|
1612
|
-
function
|
|
1613
|
-
return t.startsWith(`${
|
|
1627
|
+
function on(t) {
|
|
1628
|
+
return t.startsWith(`${tn}/data-gl/asset/`);
|
|
1614
1629
|
}
|
|
1615
|
-
function
|
|
1630
|
+
function ft(t) {
|
|
1616
1631
|
return Array.isArray(t) ? t.flatMap((e) => {
|
|
1617
1632
|
if (typeof e == "string" || typeof e == "number") return [String(e)];
|
|
1618
1633
|
if (!f(e)) return [];
|
|
1619
|
-
if (Array.isArray(e.children)) return
|
|
1634
|
+
if (Array.isArray(e.children)) return ft(e.children);
|
|
1620
1635
|
const r = e.value;
|
|
1621
1636
|
return typeof r == "string" || typeof r == "number" ? [String(r)] : [];
|
|
1622
1637
|
}) : [];
|
|
1623
1638
|
}
|
|
1624
1639
|
function sn(t, e, r) {
|
|
1625
1640
|
if (!Array.isArray(t)) return t;
|
|
1626
|
-
const n = new Map(e.map((
|
|
1627
|
-
return t.map((
|
|
1628
|
-
if (!Array.isArray(
|
|
1629
|
-
const i = String(
|
|
1641
|
+
const n = new Map(e.map((s, i) => [s, i])), o = new Map(r.map((s, i) => [s, i]));
|
|
1642
|
+
return t.map((s) => {
|
|
1643
|
+
if (!Array.isArray(s) || s.length < 2) return s;
|
|
1644
|
+
const i = String(s[0] ?? ""), c = String(s[1] ?? "");
|
|
1630
1645
|
return [
|
|
1631
|
-
n.get(i) ??
|
|
1632
|
-
|
|
1633
|
-
...
|
|
1646
|
+
n.get(i) ?? s[0],
|
|
1647
|
+
o.get(c) ?? s[1],
|
|
1648
|
+
...s.slice(2)
|
|
1634
1649
|
];
|
|
1635
1650
|
});
|
|
1636
1651
|
}
|
|
1637
|
-
function
|
|
1652
|
+
function Mt(t) {
|
|
1638
1653
|
return f(t) && t.coordinateSystem === "matrix";
|
|
1639
1654
|
}
|
|
1640
|
-
function
|
|
1655
|
+
function an(t) {
|
|
1641
1656
|
if (!f(t)) return "";
|
|
1642
1657
|
const e = t.type;
|
|
1643
1658
|
return typeof e == "string" ? e : "";
|
|
1644
1659
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const e =
|
|
1660
|
+
function Ft(t) {
|
|
1661
|
+
const e = an(t);
|
|
1647
1662
|
return e.startsWith("ecStat:") || e.startsWith("ecSimpleTransform:");
|
|
1648
1663
|
}
|
|
1649
|
-
function
|
|
1664
|
+
function cn(t) {
|
|
1650
1665
|
if (!f(t)) return !1;
|
|
1651
1666
|
const e = t.transform;
|
|
1652
|
-
return Array.isArray(e) ? e.some(
|
|
1667
|
+
return Array.isArray(e) ? e.some(Ft) : Ft(e);
|
|
1653
1668
|
}
|
|
1654
|
-
function
|
|
1669
|
+
function un(t) {
|
|
1655
1670
|
return Array.isArray(t) ? t.map((e) => {
|
|
1656
1671
|
if (!f(e)) return e;
|
|
1657
1672
|
const {
|
|
1658
1673
|
datasetId: r,
|
|
1659
1674
|
datasetIndex: n,
|
|
1660
|
-
encode:
|
|
1661
|
-
...
|
|
1675
|
+
encode: o,
|
|
1676
|
+
...s
|
|
1662
1677
|
} = e;
|
|
1663
|
-
return
|
|
1678
|
+
return s;
|
|
1664
1679
|
}) : t;
|
|
1665
1680
|
}
|
|
1666
|
-
function
|
|
1681
|
+
function pt(t) {
|
|
1667
1682
|
if (Array.isArray(t))
|
|
1668
|
-
return t.map((r) =>
|
|
1683
|
+
return t.map((r) => pt(r));
|
|
1669
1684
|
if (!f(t)) return t;
|
|
1670
1685
|
const e = {};
|
|
1671
1686
|
return Object.entries(t).forEach(([r, n]) => {
|
|
1672
|
-
e[r] =
|
|
1687
|
+
e[r] = pt(n);
|
|
1673
1688
|
}), e.type === "custom" && !e.renderItem && !e.render && (e.type = "scatter"), e;
|
|
1674
1689
|
}
|
|
1675
|
-
function
|
|
1690
|
+
function ln(t) {
|
|
1676
1691
|
return Array.isArray(t) ? t.map((e) => {
|
|
1677
1692
|
if (!f(e) || !Array.isArray(e.data) || e.data.length > 0) return e;
|
|
1678
1693
|
const { data: r, ...n } = e;
|
|
1679
1694
|
return n;
|
|
1680
1695
|
}) : t;
|
|
1681
1696
|
}
|
|
1682
|
-
function
|
|
1697
|
+
function de(t) {
|
|
1683
1698
|
var n;
|
|
1684
|
-
return !t || t.protocolType !== "table" ? [] : (((n = t.datasets[0]) == null ? void 0 : n.source) || []).map((
|
|
1699
|
+
return !t || t.protocolType !== "table" ? [] : (((n = t.datasets[0]) == null ? void 0 : n.source) || []).map((o) => Array.isArray(o) ? [Number(o[0]), Number(o[1])] : [Number.NaN, Number.NaN]).filter(([o, s]) => Number.isFinite(o) && Number.isFinite(s));
|
|
1685
1700
|
}
|
|
1686
|
-
function
|
|
1701
|
+
function me(t) {
|
|
1687
1702
|
var r;
|
|
1688
1703
|
if (!t || t.protocolType !== "table") return [];
|
|
1689
1704
|
const e = t.datasets[0];
|
|
1690
1705
|
return e ? (r = e.rows) != null && r.length ? e.rows : e.source : [];
|
|
1691
1706
|
}
|
|
1692
|
-
function
|
|
1707
|
+
function fn(t) {
|
|
1693
1708
|
var e;
|
|
1694
1709
|
return !t || t.protocolType !== "table" ? [] : ((e = t.datasets[0]) == null ? void 0 : e.dimensions) || [];
|
|
1695
1710
|
}
|
|
1696
|
-
function
|
|
1711
|
+
function pn(t) {
|
|
1697
1712
|
const e = t.length, r = t.map((n) => [...n]);
|
|
1698
1713
|
for (let n = 0; n < e; n += 1) {
|
|
1699
|
-
let
|
|
1714
|
+
let o = n;
|
|
1700
1715
|
for (let i = n + 1; i < e; i += 1)
|
|
1701
|
-
Math.abs(r[i][n]) > Math.abs(r[
|
|
1702
|
-
if (Math.abs(r[
|
|
1703
|
-
[r[n], r[
|
|
1704
|
-
const
|
|
1705
|
-
for (let i = n; i <= e; i += 1) r[n][i] /=
|
|
1716
|
+
Math.abs(r[i][n]) > Math.abs(r[o][n]) && (o = i);
|
|
1717
|
+
if (Math.abs(r[o][n]) < 1e-12) return [];
|
|
1718
|
+
[r[n], r[o]] = [r[o], r[n]];
|
|
1719
|
+
const s = r[n][n];
|
|
1720
|
+
for (let i = n; i <= e; i += 1) r[n][i] /= s;
|
|
1706
1721
|
for (let i = 0; i < e; i += 1) {
|
|
1707
1722
|
if (i === n) continue;
|
|
1708
1723
|
const c = r[i][n];
|
|
@@ -1712,157 +1727,157 @@ function fn(t) {
|
|
|
1712
1727
|
}
|
|
1713
1728
|
return r.map((n) => n[e]);
|
|
1714
1729
|
}
|
|
1715
|
-
function
|
|
1730
|
+
function it(t) {
|
|
1716
1731
|
if (t.length < 2) return null;
|
|
1717
|
-
const e = t.length, r = t.reduce((l, [p]) => l + p, 0), n = t.reduce((l, [, p]) => l + p, 0),
|
|
1732
|
+
const e = t.length, r = t.reduce((l, [p]) => l + p, 0), n = t.reduce((l, [, p]) => l + p, 0), o = t.reduce((l, [p]) => l + p * p, 0), s = t.reduce((l, [p, u]) => l + p * u, 0), i = e * o - r * r;
|
|
1718
1733
|
if (Math.abs(i) < 1e-12) return null;
|
|
1719
|
-
const c = (e *
|
|
1734
|
+
const c = (e * s - r * n) / i, a = (n - c * r) / e;
|
|
1720
1735
|
return { slope: c, intercept: a };
|
|
1721
1736
|
}
|
|
1722
|
-
function
|
|
1737
|
+
function dn(t, e) {
|
|
1723
1738
|
const r = Math.max(1, Math.min(6, Math.round(e)));
|
|
1724
1739
|
if (t.length < r + 1) return [];
|
|
1725
|
-
const n = Array.from({ length: r + 1 }, (
|
|
1726
|
-
return
|
|
1740
|
+
const n = Array.from({ length: r + 1 }, (o, s) => Array.from({ length: r + 2 }, (i, c) => c === r + 1 ? t.reduce((a, [l, p]) => a + p * l ** s, 0) : t.reduce((a, [l]) => a + l ** (s + c), 0)));
|
|
1741
|
+
return pn(n);
|
|
1727
1742
|
}
|
|
1728
|
-
function
|
|
1729
|
-
const r =
|
|
1743
|
+
function mn(t, e) {
|
|
1744
|
+
const r = de(t).sort(([i], [c]) => i - c);
|
|
1730
1745
|
if (!r.length) return [];
|
|
1731
|
-
const n = typeof e.method == "string" ? e.method : "linear",
|
|
1746
|
+
const n = typeof e.method == "string" ? e.method : "linear", o = `y = ${n}`;
|
|
1732
1747
|
if (n === "exponential") {
|
|
1733
|
-
const i = r.filter(([, a]) => a > 0), c =
|
|
1734
|
-
return c ? r.map(([a]) => [a, Math.exp(c.intercept + c.slope * a),
|
|
1748
|
+
const i = r.filter(([, a]) => a > 0), c = it(i.map(([a, l]) => [a, Math.log(l)]));
|
|
1749
|
+
return c ? r.map(([a]) => [a, Math.exp(c.intercept + c.slope * a), o]) : r.map(([a, l]) => [a, l, o]);
|
|
1735
1750
|
}
|
|
1736
1751
|
if (n === "logarithmic") {
|
|
1737
|
-
const i = r.filter(([a]) => a > 0), c =
|
|
1738
|
-
return c ? r.map(([a]) => [a, c.slope * Math.log(a) + c.intercept,
|
|
1752
|
+
const i = r.filter(([a]) => a > 0), c = it(i.map(([a, l]) => [Math.log(a), l]));
|
|
1753
|
+
return c ? r.map(([a]) => [a, c.slope * Math.log(a) + c.intercept, o]) : r.map(([a, l]) => [a, l, o]);
|
|
1739
1754
|
}
|
|
1740
1755
|
if (n === "polynomial") {
|
|
1741
|
-
const i =
|
|
1756
|
+
const i = dn(r, Number(e.order) || 2);
|
|
1742
1757
|
return i.length ? r.map(([c]) => [
|
|
1743
1758
|
c,
|
|
1744
1759
|
i.reduce((a, l, p) => a + l * c ** p, 0),
|
|
1745
|
-
|
|
1746
|
-
]) : r.map(([c, a]) => [c, a,
|
|
1760
|
+
o
|
|
1761
|
+
]) : r.map(([c, a]) => [c, a, o]);
|
|
1747
1762
|
}
|
|
1748
|
-
const
|
|
1749
|
-
return
|
|
1763
|
+
const s = it(r);
|
|
1764
|
+
return s ? r.map(([i]) => [i, s.slope * i + s.intercept, o]) : r.map(([i, c]) => [i, c, o]);
|
|
1750
1765
|
}
|
|
1751
|
-
function
|
|
1766
|
+
function jt(t) {
|
|
1752
1767
|
if (!f(t)) return null;
|
|
1753
1768
|
const e = t.transform;
|
|
1754
1769
|
return !f(e) || e.type !== "ecStat:regression" ? null : f(e.config) ? e.config : {};
|
|
1755
1770
|
}
|
|
1756
|
-
function
|
|
1771
|
+
function kt(t) {
|
|
1757
1772
|
if (!f(t)) return null;
|
|
1758
1773
|
const e = t.transform;
|
|
1759
1774
|
return !f(e) || e.type !== "ecStat:histogram" ? null : f(e.config) ? e.config : {};
|
|
1760
1775
|
}
|
|
1761
|
-
function
|
|
1776
|
+
function yn(t) {
|
|
1762
1777
|
const e = t.dimensions;
|
|
1763
1778
|
return Array.isArray(e) && typeof e[0] == "number" ? e[0] : typeof e == "number" ? e : 0;
|
|
1764
1779
|
}
|
|
1765
|
-
function
|
|
1780
|
+
function zt(t, e) {
|
|
1766
1781
|
if (!t.length) return Number.NaN;
|
|
1767
|
-
const r = (t.length - 1) * e, n = Math.floor(r),
|
|
1768
|
-
return n ===
|
|
1782
|
+
const r = (t.length - 1) * e, n = Math.floor(r), o = Math.ceil(r);
|
|
1783
|
+
return n === o ? t[n] : t[n] + (t[o] - t[n]) * (r - n);
|
|
1769
1784
|
}
|
|
1770
|
-
function
|
|
1771
|
-
const r =
|
|
1785
|
+
function hn(t, e) {
|
|
1786
|
+
const r = yn(e), n = me(t).map((d) => Array.isArray(d) ? Number(d[r]) : Number.NaN).filter((d) => Number.isFinite(d)).sort((d, y) => d - y);
|
|
1772
1787
|
if (!n.length) return [];
|
|
1773
|
-
const
|
|
1788
|
+
const o = n[0], s = n[n.length - 1], i = zt(n, 0.75) - zt(n, 0.25), c = i > 0 ? 2 * i / Math.cbrt(n.length) : (s - o) / Math.sqrt(n.length), a = Number.isFinite(c) && c > 0 ? c : 1, l = Math.max(1, Math.ceil((s - o || 1) / a)), p = (s - o || 1) / l, u = Array.from({ length: l }, () => 0);
|
|
1774
1789
|
return n.forEach((d) => {
|
|
1775
|
-
const y = Math.floor((d -
|
|
1790
|
+
const y = Math.floor((d - o) / p), h = Math.min(l - 1, Math.max(0, y));
|
|
1776
1791
|
u[h] += 1;
|
|
1777
1792
|
}), u.map((d, y) => {
|
|
1778
|
-
const h =
|
|
1793
|
+
const h = o + y * p, b = y === l - 1 ? s : h + p;
|
|
1779
1794
|
return [(h + b) / 2, d, h, b, `${h.toFixed(2)} - ${b.toFixed(2)}`];
|
|
1780
1795
|
});
|
|
1781
1796
|
}
|
|
1782
|
-
function
|
|
1783
|
-
const r =
|
|
1784
|
-
return !r.length && !n.length ? t : t.map((
|
|
1785
|
-
...
|
|
1797
|
+
function gn(t, e) {
|
|
1798
|
+
const r = me(e), n = fn(e);
|
|
1799
|
+
return !r.length && !n.length ? t : t.map((o, s) => s !== 0 || !f(o) ? o : {
|
|
1800
|
+
...o,
|
|
1786
1801
|
...r.length ? { source: r } : {},
|
|
1787
1802
|
...n.length ? { dimensions: n } : {}
|
|
1788
1803
|
});
|
|
1789
1804
|
}
|
|
1790
|
-
function
|
|
1791
|
-
return t.some((r) =>
|
|
1792
|
-
const
|
|
1793
|
-
if (!
|
|
1805
|
+
function An(t, e) {
|
|
1806
|
+
return t.some((r) => kt(r)) ? t.map((r, n) => {
|
|
1807
|
+
const o = kt(r);
|
|
1808
|
+
if (!o) return n === 0 && f(r), r;
|
|
1794
1809
|
if (!f(r)) return r;
|
|
1795
|
-
const { transform:
|
|
1810
|
+
const { transform: s, ...i } = r;
|
|
1796
1811
|
return {
|
|
1797
1812
|
...i,
|
|
1798
|
-
source:
|
|
1813
|
+
source: hn(e, o)
|
|
1799
1814
|
};
|
|
1800
1815
|
}) : null;
|
|
1801
1816
|
}
|
|
1802
|
-
function
|
|
1817
|
+
function bn(t) {
|
|
1803
1818
|
if (!f(t) || t.type !== "pattern") return !1;
|
|
1804
1819
|
const e = t.image;
|
|
1805
1820
|
return !!(e && typeof e == "object");
|
|
1806
1821
|
}
|
|
1807
|
-
function
|
|
1822
|
+
function dt(t) {
|
|
1808
1823
|
if (Array.isArray(t))
|
|
1809
|
-
return t.map((r) =>
|
|
1824
|
+
return t.map((r) => dt(r));
|
|
1810
1825
|
if (!f(t)) return t;
|
|
1811
1826
|
const e = {};
|
|
1812
1827
|
return Object.entries(t).forEach(([r, n]) => {
|
|
1813
|
-
|
|
1828
|
+
bn(n) || (e[r] = dt(n));
|
|
1814
1829
|
}), e;
|
|
1815
1830
|
}
|
|
1816
|
-
function
|
|
1831
|
+
function xn(t) {
|
|
1817
1832
|
return (t.type === "linear" || t.type === "radial") && Array.isArray(t.colorStops);
|
|
1818
1833
|
}
|
|
1819
|
-
function
|
|
1834
|
+
function _n(t, e, r) {
|
|
1820
1835
|
if (!f(t)) return t;
|
|
1821
|
-
const n = r <= 1 ? 0 : e / (r - 1),
|
|
1822
|
-
return { ...t, offset:
|
|
1836
|
+
const n = r <= 1 ? 0 : e / (r - 1), o = Number(t.offset), s = Number.isFinite(o) ? Math.min(1, Math.max(0, o)) : n;
|
|
1837
|
+
return { ...t, offset: s };
|
|
1823
1838
|
}
|
|
1824
|
-
function
|
|
1839
|
+
function mt(t) {
|
|
1825
1840
|
if (Array.isArray(t))
|
|
1826
|
-
return t.map((r) =>
|
|
1841
|
+
return t.map((r) => mt(r));
|
|
1827
1842
|
if (!f(t)) return t;
|
|
1828
1843
|
const e = {};
|
|
1829
1844
|
if (Object.entries(t).forEach(([r, n]) => {
|
|
1830
|
-
e[r] =
|
|
1831
|
-
}),
|
|
1845
|
+
e[r] = mt(n);
|
|
1846
|
+
}), xn(e)) {
|
|
1832
1847
|
const r = e.colorStops;
|
|
1833
|
-
e.colorStops = r.map((n,
|
|
1848
|
+
e.colorStops = r.map((n, o) => _n(n, o, r.length));
|
|
1834
1849
|
}
|
|
1835
1850
|
return e;
|
|
1836
1851
|
}
|
|
1837
|
-
function mt(t) {
|
|
1838
|
-
return Array.isArray(t) ? t.some(mt) : f(t) ? Object.entries(t).some(([e, r]) => e === "coordinateSystem" && r === "bmap" || e === "bmap" || mt(r)) : !1;
|
|
1839
|
-
}
|
|
1840
1852
|
function yt(t) {
|
|
1841
|
-
return Array.isArray(t) ? t.some(yt) : f(t) ? Object.entries(t).some(([e, r]) => e === "coordinateSystem" &&
|
|
1853
|
+
return Array.isArray(t) ? t.some(yt) : f(t) ? Object.entries(t).some(([e, r]) => e === "coordinateSystem" && r === "bmap" || e === "bmap" || yt(r)) : !1;
|
|
1854
|
+
}
|
|
1855
|
+
function ht(t) {
|
|
1856
|
+
return Array.isArray(t) ? t.some(ht) : f(t) ? Object.entries(t).some(([e, r]) => e === "coordinateSystem" && (r === "calendar" || r === "matrix") || e === "calendar" || e === "matrix" || ht(r)) : !1;
|
|
1842
1857
|
}
|
|
1843
|
-
function
|
|
1844
|
-
if (Array.isArray(t)) return t.map((n) =>
|
|
1858
|
+
function Y(t) {
|
|
1859
|
+
if (Array.isArray(t)) return t.map((n) => Y(n));
|
|
1845
1860
|
if (!f(t)) return t;
|
|
1846
|
-
const e =
|
|
1847
|
-
return Object.entries(t).forEach(([n,
|
|
1848
|
-
e && (n === "xAxis" || n === "yAxis" || n === "grid") || (r[n] =
|
|
1861
|
+
const e = ht(t), r = {};
|
|
1862
|
+
return Object.entries(t).forEach(([n, o]) => {
|
|
1863
|
+
e && (n === "xAxis" || n === "yAxis" || n === "grid") || (r[n] = Y(o));
|
|
1849
1864
|
}), r;
|
|
1850
1865
|
}
|
|
1851
|
-
function
|
|
1866
|
+
function ye(t) {
|
|
1852
1867
|
return t.type === "funnel" || t.type === "pie" || t.type === "radar" || t.type === "gauge";
|
|
1853
1868
|
}
|
|
1854
|
-
function
|
|
1855
|
-
if (!
|
|
1869
|
+
function On(t) {
|
|
1870
|
+
if (!ye(t)) return t;
|
|
1856
1871
|
const {
|
|
1857
1872
|
coordinateSystem: e,
|
|
1858
1873
|
xAxisIndex: r,
|
|
1859
1874
|
yAxisIndex: n,
|
|
1860
|
-
gridIndex:
|
|
1861
|
-
...
|
|
1875
|
+
gridIndex: o,
|
|
1876
|
+
...s
|
|
1862
1877
|
} = t;
|
|
1863
|
-
return
|
|
1878
|
+
return s;
|
|
1864
1879
|
}
|
|
1865
|
-
function
|
|
1880
|
+
function Sn(t) {
|
|
1866
1881
|
if (t.type !== "funnel") return t;
|
|
1867
1882
|
const { right: e, ...r } = t;
|
|
1868
1883
|
return {
|
|
@@ -1871,34 +1886,34 @@ function On(t) {
|
|
|
1871
1886
|
width: "70%"
|
|
1872
1887
|
};
|
|
1873
1888
|
}
|
|
1874
|
-
function
|
|
1889
|
+
function Lt(t) {
|
|
1875
1890
|
if (!f(t)) return t;
|
|
1876
1891
|
const e = t, r = e.series, n = Array.isArray(r) ? r.filter(f) : f(r) ? [r] : [];
|
|
1877
1892
|
if (n.length === 0) return t;
|
|
1878
|
-
let
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1893
|
+
let o = n.map(On);
|
|
1894
|
+
const s = o.every(ye);
|
|
1895
|
+
o.length === 1 && o[0].type === "funnel" && (o = [Sn(o[0])]);
|
|
1881
1896
|
const i = {
|
|
1882
1897
|
...e,
|
|
1883
|
-
series: Array.isArray(r) ?
|
|
1898
|
+
series: Array.isArray(r) ? o : o[0]
|
|
1884
1899
|
};
|
|
1885
|
-
return
|
|
1900
|
+
return s && (delete i.xAxis, delete i.yAxis, delete i.grid), i;
|
|
1886
1901
|
}
|
|
1887
|
-
function
|
|
1902
|
+
function $t(t) {
|
|
1888
1903
|
const e = t;
|
|
1889
1904
|
if (!f(e.matrix)) return t;
|
|
1890
1905
|
const r = Array.isArray(e.series) ? e.series : e.series ? [e.series] : [];
|
|
1891
|
-
if (!r.some(
|
|
1892
|
-
const n = e.matrix,
|
|
1906
|
+
if (!r.some(Mt)) return t;
|
|
1907
|
+
const n = e.matrix, o = f(n.x) ? n.x : {}, s = f(n.y) ? n.y : {}, i = ft(o.data), c = ft(s.data);
|
|
1893
1908
|
if (!i.length || !c.length) return t;
|
|
1894
1909
|
const { matrix: a, ...l } = e;
|
|
1895
1910
|
return {
|
|
1896
1911
|
...l,
|
|
1897
1912
|
grid: f(e.grid) ? { containLabel: !0, ...e.grid } : { left: 72, right: 32, top: 72, bottom: 48, containLabel: !0 },
|
|
1898
|
-
xAxis: { type: "category", ...
|
|
1899
|
-
yAxis: { type: "category", ...
|
|
1913
|
+
xAxis: { type: "category", ...o.show === !1 ? { show: !1 } : {}, data: i },
|
|
1914
|
+
yAxis: { type: "category", ...s.show === !1 ? { show: !1 } : {}, data: c },
|
|
1900
1915
|
series: r.map((p) => {
|
|
1901
|
-
if (!
|
|
1916
|
+
if (!Mt(p)) return p;
|
|
1902
1917
|
const { coordinateSystem: u, ...d } = p;
|
|
1903
1918
|
return {
|
|
1904
1919
|
...d,
|
|
@@ -1907,8 +1922,8 @@ function Lt(t) {
|
|
|
1907
1922
|
})
|
|
1908
1923
|
};
|
|
1909
1924
|
}
|
|
1910
|
-
function
|
|
1911
|
-
if (Array.isArray(t)) return t.map((r) =>
|
|
1925
|
+
function k(t) {
|
|
1926
|
+
if (Array.isArray(t)) return t.map((r) => k(r));
|
|
1912
1927
|
if (!f(t)) return t;
|
|
1913
1928
|
const e = {};
|
|
1914
1929
|
return Object.entries(t).forEach(([r, n]) => {
|
|
@@ -1921,43 +1936,43 @@ function j(t) {
|
|
|
1921
1936
|
e[r] = "geo";
|
|
1922
1937
|
return;
|
|
1923
1938
|
}
|
|
1924
|
-
e[r] =
|
|
1939
|
+
e[r] = k(n);
|
|
1925
1940
|
}
|
|
1926
1941
|
}), e.type === "map" && typeof e.map != "string" && typeof e.mapType != "string" && (e.map = "workbench-regions"), e;
|
|
1927
1942
|
}
|
|
1928
|
-
function
|
|
1929
|
-
if (Array.isArray(t)) return t.map((
|
|
1943
|
+
function gt(t, e = "") {
|
|
1944
|
+
if (Array.isArray(t)) return t.map((o) => gt(o, e));
|
|
1930
1945
|
if (!f(t)) return t;
|
|
1931
1946
|
const r = {};
|
|
1932
1947
|
let n = !1;
|
|
1933
|
-
return Object.entries(t).forEach(([
|
|
1934
|
-
if (typeof
|
|
1935
|
-
if (
|
|
1936
|
-
r[
|
|
1948
|
+
return Object.entries(t).forEach(([o, s]) => {
|
|
1949
|
+
if (typeof s == "string" && on(s)) {
|
|
1950
|
+
if (o === "environment") {
|
|
1951
|
+
r[o] = nn;
|
|
1937
1952
|
return;
|
|
1938
1953
|
}
|
|
1939
|
-
if (
|
|
1954
|
+
if (o === "baseTexture" || o === "heightTexture") {
|
|
1940
1955
|
n = !0;
|
|
1941
1956
|
return;
|
|
1942
1957
|
}
|
|
1943
|
-
if (
|
|
1958
|
+
if (en.has(o)) return;
|
|
1944
1959
|
}
|
|
1945
|
-
r[
|
|
1946
|
-
}), e === "globe" && n && !r.baseColor && (r.baseColor =
|
|
1960
|
+
r[o] = gt(s, o);
|
|
1961
|
+
}), e === "globe" && n && !r.baseColor && (r.baseColor = rn), r;
|
|
1947
1962
|
}
|
|
1948
|
-
function
|
|
1963
|
+
function he(t) {
|
|
1949
1964
|
if (Array.isArray(t))
|
|
1950
|
-
return t.map((n) =>
|
|
1965
|
+
return t.map((n) => he(n));
|
|
1951
1966
|
if (!f(t)) return t;
|
|
1952
1967
|
const { data: e, ...r } = t;
|
|
1953
1968
|
return r;
|
|
1954
1969
|
}
|
|
1955
|
-
function
|
|
1970
|
+
function ge(t) {
|
|
1956
1971
|
if (!t || t.protocolType !== "series") return !1;
|
|
1957
1972
|
const e = f(t.categories) && Array.isArray(t.categories.xAxis) ? t.categories.xAxis : Array.isArray(t.categories) ? t.categories : [], r = Array.isArray(t.series) ? t.series : [];
|
|
1958
1973
|
return e.length > 0 || r.some((n) => f(n) && Array.isArray(n.data) && n.data.length > 0);
|
|
1959
1974
|
}
|
|
1960
|
-
function
|
|
1975
|
+
function Ht(t) {
|
|
1961
1976
|
if (!f(t)) return t;
|
|
1962
1977
|
const {
|
|
1963
1978
|
startValue: e,
|
|
@@ -1970,23 +1985,23 @@ function $t(t) {
|
|
|
1970
1985
|
end: 100
|
|
1971
1986
|
};
|
|
1972
1987
|
}
|
|
1973
|
-
function
|
|
1974
|
-
return Array.isArray(t) ? t.map(
|
|
1988
|
+
function Ae(t) {
|
|
1989
|
+
return Array.isArray(t) ? t.map(Ht) : Ht(t);
|
|
1975
1990
|
}
|
|
1976
|
-
function
|
|
1991
|
+
function Nn(t, e) {
|
|
1977
1992
|
if (!f(t)) return t;
|
|
1978
1993
|
const r = t, n = r.dataZoom;
|
|
1979
|
-
return n === void 0 || !
|
|
1994
|
+
return n === void 0 || !ge(e) ? t : {
|
|
1980
1995
|
...r,
|
|
1981
|
-
dataZoom:
|
|
1996
|
+
dataZoom: Ae(n)
|
|
1982
1997
|
};
|
|
1983
1998
|
}
|
|
1984
|
-
function
|
|
1985
|
-
const r =
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1999
|
+
function Wt(t, e) {
|
|
2000
|
+
const r = yt(t), n = k(
|
|
2001
|
+
gt(
|
|
2002
|
+
dt(
|
|
2003
|
+
mt(
|
|
2004
|
+
pt(J(t))
|
|
1990
2005
|
)
|
|
1991
2006
|
)
|
|
1992
2007
|
)
|
|
@@ -1994,125 +2009,125 @@ function Ht(t, e) {
|
|
|
1994
2009
|
if (r && !n.geo && (n.geo = {
|
|
1995
2010
|
map: "workbench-regions",
|
|
1996
2011
|
roam: !0
|
|
1997
|
-
}), e && n.legend !== void 0 && (n.legend =
|
|
1998
|
-
n.title =
|
|
1999
|
-
const l =
|
|
2012
|
+
}), e && n.legend !== void 0 && (n.legend = he(n.legend)), n.dataZoom !== void 0 && ge(e) && (n.dataZoom = Ae(n.dataZoom)), F(e)) {
|
|
2013
|
+
n.title = St(n.title), n.tooltip = Nt(n.tooltip);
|
|
2014
|
+
const l = En(n.series, e);
|
|
2000
2015
|
l === void 0 ? delete n.series : n.series = l;
|
|
2001
2016
|
}
|
|
2002
|
-
n.dataset && Array.isArray(n.series) && (n.series =
|
|
2003
|
-
const
|
|
2004
|
-
if (!Array.isArray(
|
|
2005
|
-
const
|
|
2006
|
-
n.dataset = i ||
|
|
2007
|
-
const c = n.dataset, a = c.findIndex((l) =>
|
|
2017
|
+
n.dataset && Array.isArray(n.series) && (n.series = ln(n.series));
|
|
2018
|
+
const o = n.dataset;
|
|
2019
|
+
if (!Array.isArray(o)) return n;
|
|
2020
|
+
const s = gn(o, e), i = An(s, e);
|
|
2021
|
+
n.dataset = i || s;
|
|
2022
|
+
const c = n.dataset, a = c.findIndex((l) => jt(l));
|
|
2008
2023
|
if (a > 0) {
|
|
2009
|
-
const l =
|
|
2024
|
+
const l = jt(c[a]) || {};
|
|
2010
2025
|
return n.dataset = [
|
|
2011
|
-
{ source:
|
|
2012
|
-
{ source:
|
|
2026
|
+
{ source: de(e) },
|
|
2027
|
+
{ source: mn(e, l) }
|
|
2013
2028
|
], n;
|
|
2014
2029
|
}
|
|
2015
|
-
if (c.some(
|
|
2030
|
+
if (c.some(cn)) {
|
|
2016
2031
|
const { dataset: l, visualMap: p, ...u } = n;
|
|
2017
2032
|
return {
|
|
2018
2033
|
...u,
|
|
2019
|
-
...Array.isArray(u.series) ? { series:
|
|
2034
|
+
...Array.isArray(u.series) ? { series: un(u.series) } : {}
|
|
2020
2035
|
};
|
|
2021
2036
|
}
|
|
2022
2037
|
return n;
|
|
2023
2038
|
}
|
|
2024
|
-
function
|
|
2039
|
+
function F(t) {
|
|
2025
2040
|
return !!(t && t.protocolType === "series");
|
|
2026
2041
|
}
|
|
2027
|
-
function
|
|
2042
|
+
function Cn(t) {
|
|
2028
2043
|
const e = t;
|
|
2029
2044
|
if (Array.isArray(e.series)) return e.series.filter(f).length;
|
|
2030
2045
|
const r = f(e.dataset) ? e.dataset : void 0;
|
|
2031
2046
|
return Array.isArray(r == null ? void 0 : r.series) ? r.series.filter(f).length : 0;
|
|
2032
2047
|
}
|
|
2033
|
-
function
|
|
2034
|
-
if (Array.isArray(t)) return t.map(
|
|
2048
|
+
function St(t) {
|
|
2049
|
+
if (Array.isArray(t)) return t.map(St);
|
|
2035
2050
|
if (!f(t)) return t;
|
|
2036
2051
|
const {
|
|
2037
2052
|
text: e,
|
|
2038
2053
|
subtext: r,
|
|
2039
2054
|
link: n,
|
|
2040
|
-
sublink:
|
|
2041
|
-
target:
|
|
2055
|
+
sublink: o,
|
|
2056
|
+
target: s,
|
|
2042
2057
|
subtarget: i,
|
|
2043
2058
|
...c
|
|
2044
2059
|
} = t;
|
|
2045
2060
|
return c;
|
|
2046
2061
|
}
|
|
2047
|
-
function
|
|
2048
|
-
if (Array.isArray(t)) return t.map(
|
|
2062
|
+
function Nt(t) {
|
|
2063
|
+
if (Array.isArray(t)) return t.map(Nt);
|
|
2049
2064
|
if (!f(t)) return t;
|
|
2050
2065
|
const { formatter: e, ...r } = t;
|
|
2051
2066
|
return r;
|
|
2052
2067
|
}
|
|
2053
|
-
function
|
|
2054
|
-
const r =
|
|
2068
|
+
function En(t, e) {
|
|
2069
|
+
const r = Cn(e);
|
|
2055
2070
|
if (r <= 0) return;
|
|
2056
2071
|
if (!Array.isArray(t))
|
|
2057
|
-
return [
|
|
2058
|
-
const n = r === 1 ?
|
|
2059
|
-
return n || Array.from({ length: r }, (
|
|
2072
|
+
return [v(t) ?? {}];
|
|
2073
|
+
const n = r === 1 ? wn(t) : void 0;
|
|
2074
|
+
return n || Array.from({ length: r }, (o, s) => v(t[s]) ?? {});
|
|
2060
2075
|
}
|
|
2061
|
-
function
|
|
2076
|
+
function W(t) {
|
|
2062
2077
|
const e = typeof t == "string" ? t.trim().toLowerCase().replace(/\s+/gu, "") : "";
|
|
2063
2078
|
return e === "transparent" || e === "rgba(0,0,0,0)" || e === "rgba(255,255,255,0)";
|
|
2064
2079
|
}
|
|
2065
|
-
function
|
|
2080
|
+
function Bt(t) {
|
|
2066
2081
|
if (!f(t) || t.type !== "bar" || typeof t.stack != "string") return !1;
|
|
2067
2082
|
const e = f(t.itemStyle) ? t.itemStyle : {}, r = f(t.emphasis) ? t.emphasis : {}, n = f(r.itemStyle) ? r.itemStyle : {};
|
|
2068
|
-
return
|
|
2083
|
+
return W(e.color) || W(e.borderColor) || W(n.color) || W(n.borderColor);
|
|
2069
2084
|
}
|
|
2070
|
-
function
|
|
2071
|
-
const e = t.findIndex(
|
|
2085
|
+
function wn(t) {
|
|
2086
|
+
const e = t.findIndex(Bt);
|
|
2072
2087
|
if (e < 0) return;
|
|
2073
|
-
const r = t[e], n = typeof r.stack == "string" ? r.stack : void 0,
|
|
2074
|
-
if (!(
|
|
2088
|
+
const r = t[e], n = typeof r.stack == "string" ? r.stack : void 0, o = t.findIndex((s, i) => i !== e && f(s) && s.type === "bar" && typeof s.stack == "string" && s.stack === n && !Bt(s));
|
|
2089
|
+
if (!(o < 0))
|
|
2075
2090
|
return [
|
|
2076
|
-
|
|
2077
|
-
|
|
2091
|
+
v(t[e]) ?? {},
|
|
2092
|
+
v(t[o]) ?? {}
|
|
2078
2093
|
];
|
|
2079
2094
|
}
|
|
2080
|
-
function
|
|
2095
|
+
function v(t) {
|
|
2081
2096
|
if (!f(t)) return;
|
|
2082
2097
|
const {
|
|
2083
2098
|
id: e,
|
|
2084
2099
|
name: r,
|
|
2085
2100
|
data: n,
|
|
2086
|
-
...
|
|
2101
|
+
...o
|
|
2087
2102
|
} = t;
|
|
2088
|
-
return
|
|
2103
|
+
return o;
|
|
2089
2104
|
}
|
|
2090
|
-
function
|
|
2091
|
-
if (!
|
|
2105
|
+
function Ut(t, e) {
|
|
2106
|
+
if (!F(e)) return t;
|
|
2092
2107
|
const r = { ...t };
|
|
2093
|
-
return r.title =
|
|
2094
|
-
}
|
|
2095
|
-
const
|
|
2096
|
-
series:
|
|
2097
|
-
table:
|
|
2098
|
-
tuple:
|
|
2099
|
-
tree:
|
|
2100
|
-
network:
|
|
2101
|
-
geo:
|
|
2102
|
-
scene3D:
|
|
2103
|
-
timeline:
|
|
2104
|
-
transition:
|
|
2105
|
-
graphic:
|
|
2106
|
-
layout:
|
|
2107
|
-
composite:
|
|
2108
|
-
configOnly:
|
|
2108
|
+
return r.title = St(r.title), r.tooltip = Nt(r.tooltip), r;
|
|
2109
|
+
}
|
|
2110
|
+
const Dn = {
|
|
2111
|
+
series: Ir,
|
|
2112
|
+
table: zr,
|
|
2113
|
+
tuple: $r,
|
|
2114
|
+
tree: Hr,
|
|
2115
|
+
network: Wr,
|
|
2116
|
+
geo: Ur,
|
|
2117
|
+
scene3D: Gr,
|
|
2118
|
+
timeline: Zr,
|
|
2119
|
+
transition: Xr,
|
|
2120
|
+
graphic: Kr,
|
|
2121
|
+
layout: qr,
|
|
2122
|
+
composite: Jr,
|
|
2123
|
+
configOnly: Yr
|
|
2109
2124
|
};
|
|
2110
|
-
class
|
|
2125
|
+
class In {
|
|
2111
2126
|
constructor() {
|
|
2112
2127
|
/** 当前已生成的 ECharts option */
|
|
2113
|
-
|
|
2128
|
+
et(this, "currentOption", null);
|
|
2114
2129
|
/** 当前保存的协议配置 */
|
|
2115
|
-
|
|
2130
|
+
et(this, "config", null);
|
|
2116
2131
|
}
|
|
2117
2132
|
/**
|
|
2118
2133
|
* 设置协议配置并生成初始 ECharts option。
|
|
@@ -2147,9 +2162,9 @@ class Rn {
|
|
|
2147
2162
|
if (!this.config || !this.currentOption)
|
|
2148
2163
|
return this.currentOption;
|
|
2149
2164
|
try {
|
|
2150
|
-
const r = this.resolveConverter(this.config.protocolType), n = f(this.currentOption) ? this.currentOption.dataZoom : void 0,
|
|
2151
|
-
|
|
2152
|
-
|
|
2165
|
+
const r = this.resolveConverter(this.config.protocolType), n = f(this.currentOption) ? this.currentOption.dataZoom : void 0, o = r.buildOption(this.configWithoutOptionPatch(this.config)), s = F(e) && this.config.optionPatch ? I(o, Wt(this.config.optionPatch, e)) : o, i = J(s), c = r.mergeData(i, e), a = F(e) ? $t(Lt(
|
|
2166
|
+
Y(
|
|
2167
|
+
k(Ut(c, e))
|
|
2153
2168
|
)
|
|
2154
2169
|
)) : this.applyOptionPatch(c, e), l = n !== void 0 && f(a) && a.dataZoom === void 0 ? { ...a, dataZoom: n } : a;
|
|
2155
2170
|
this.currentOption = this.normalizeRuntimeDataZoom(l, e);
|
|
@@ -2183,7 +2198,7 @@ class Rn {
|
|
|
2183
2198
|
* @throws 当协议类型未注册时抛出错误
|
|
2184
2199
|
*/
|
|
2185
2200
|
resolveConverter(e) {
|
|
2186
|
-
const r =
|
|
2201
|
+
const r = Dn[e];
|
|
2187
2202
|
if (!r)
|
|
2188
2203
|
throw new Error(
|
|
2189
2204
|
`[EChartsProtocolAdapter] No converter registered for protocol type: "${e}"`
|
|
@@ -2206,11 +2221,11 @@ class Rn {
|
|
|
2206
2221
|
*/
|
|
2207
2222
|
applyOptionPatch(e, r) {
|
|
2208
2223
|
var i;
|
|
2209
|
-
const n = (i = this.config) != null && i.optionPatch ? I(e,
|
|
2210
|
-
|
|
2224
|
+
const n = (i = this.config) != null && i.optionPatch ? I(e, Wt(this.config.optionPatch, r)) : e, o = Ut(n, r), s = Y(
|
|
2225
|
+
k(o)
|
|
2211
2226
|
);
|
|
2212
|
-
return
|
|
2213
|
-
|
|
2227
|
+
return $t(
|
|
2228
|
+
F(r) ? Lt(s) : s
|
|
2214
2229
|
);
|
|
2215
2230
|
}
|
|
2216
2231
|
/**
|
|
@@ -2221,10 +2236,10 @@ class Rn {
|
|
|
2221
2236
|
* @returns dataZoom 已被归一化为 start:0,end:100 的 option
|
|
2222
2237
|
*/
|
|
2223
2238
|
normalizeRuntimeDataZoom(e, r) {
|
|
2224
|
-
return
|
|
2239
|
+
return Nn(e, r);
|
|
2225
2240
|
}
|
|
2226
2241
|
}
|
|
2227
2242
|
export {
|
|
2228
|
-
|
|
2243
|
+
In as EChartsProtocolAdapter,
|
|
2229
2244
|
I as deepMergeOption
|
|
2230
2245
|
};
|