waveform-analysis 0.1.31 → 0.1.35
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/README.md +26 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +430 -401
- package/dist/types/components/WaveformChart.vue.d.ts +3 -2
- package/dist/types/components/core/trackLayoutBuilder.d.ts +2 -1
- package/dist/types/components/core/useWaveformChartController.d.ts +1 -0
- package/dist/types/components/core/waveformChartTypes.d.ts +4 -3
- package/dist/types/components/core/xDomain.d.ts +3 -0
- package/dist/types/components/data/types.d.ts +1 -1
- package/dist/types/components/waveform.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/chart.d.ts +15 -0
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/WaveformChart.vue +1 -0
- package/src/components/core/trackLayoutBuilder.ts +19 -7
- package/src/components/core/useWaveformChartLifecycle.ts +1 -0
- package/src/components/core/useWaveformLayout.ts +19 -6
- package/src/components/core/waveformChartTypes.ts +5 -1
- package/src/components/core/xDomain.test.ts +28 -0
- package/src/components/core/xDomain.ts +25 -0
- package/src/components/data/types.ts +2 -0
- package/src/components/interaction/useWaveformViewport.ts +15 -1
- package/src/components/waveform.ts +1 -0
- package/src/components/waveformChartCases/viewportConstraintsAndReset.test.ts +0 -65
- package/src/components/waveformChartCases/viewportReset.test.ts +149 -0
- package/src/components/waveformChartCases/xDomainStrategy.test.ts +96 -0
- package/src/index.ts +2 -0
- package/src/types/chart.ts +17 -0
- package/src/types/index.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, getCurrentInstance as l, markRaw as u, nextTick as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as m, onMounted as h, openBlock as g, reactive as _, ref as v, renderList as y, shallowReactive as b, shallowRef as x, toDisplayString as S, toRefs as C, unref as w, vModelText as T, watch as E, watchEffect as D, withDirectives as O, withModifiers as k } from "vue";
|
|
2
|
-
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as U, symbolDiamond as ee, symbolSquare as
|
|
3
|
-
import { Pagination as
|
|
4
|
-
import { ColorPicker as
|
|
2
|
+
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as U, symbolDiamond as ee, symbolSquare as te, symbolTriangle as ne, zoom as W, zoomIdentity as G, zoomTransform as re } from "d3";
|
|
3
|
+
import { Pagination as ie } from "ant-design-vue";
|
|
4
|
+
import { ColorPicker as K } from "vue3-colorpicker";
|
|
5
5
|
import "vue3-colorpicker/style.css";
|
|
6
6
|
//#region src/utils/waveformId.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var ae = 0;
|
|
8
|
+
function oe(e = "waveform") {
|
|
9
9
|
let t = l();
|
|
10
|
-
return `${e}-${t ? `v${t.uid}` : `f${++
|
|
10
|
+
return `${e}-${t ? `v${t.uid}` : `f${++ae}`}`;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/components/annotation/annotationLayout.ts
|
|
14
|
-
function
|
|
14
|
+
function se(e, t) {
|
|
15
15
|
return e >= Math.min(t[0], t[1]) && e <= Math.max(t[0], t[1]);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ce(e, t, n) {
|
|
18
18
|
let r = Math.max(0, Math.min(e.x, Math.max(0, t - e.width))), i = Math.max(0, Math.min(e.y, Math.max(0, n - e.height)));
|
|
19
19
|
return {
|
|
20
20
|
...e,
|
|
@@ -24,11 +24,11 @@ function se(e, t, n) {
|
|
|
24
24
|
lineEndY: Math.max(i, Math.min(e.lineEndY, i + e.height))
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let s =
|
|
27
|
+
function le(e, t, n, r, i, a, o) {
|
|
28
|
+
let s = fe(e, t, n, r, i);
|
|
29
29
|
return s.x >= 0 && s.y >= 0 && s.x + n <= a && s.y + r <= o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ue(e, t, n, r, i, a) {
|
|
32
32
|
for (let o of [
|
|
33
33
|
"top",
|
|
34
34
|
"bottom",
|
|
@@ -38,10 +38,10 @@ function le(e, t, n, r, i, a) {
|
|
|
38
38
|
"top-left",
|
|
39
39
|
"bottom-right",
|
|
40
40
|
"bottom-left"
|
|
41
|
-
]) if (
|
|
41
|
+
]) if (le(e, t, n, r, o, i, a)) return o;
|
|
42
42
|
return "top";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function de(e, t, n) {
|
|
45
45
|
let r = e.x + e.width / 2, i = e.y + e.height / 2, a = t - r, o = n - i;
|
|
46
46
|
if (Math.abs(a) * e.height > Math.abs(o) * e.width) {
|
|
47
47
|
let t = a >= 0 ? e.x + e.width : e.x, n = a === 0 ? 0 : (t - r) / a;
|
|
@@ -56,7 +56,7 @@ function ue(e, t, n) {
|
|
|
56
56
|
y: s
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function fe(e, t, n, r, i) {
|
|
60
60
|
let a = e - n / 2, o = t - r / 2, s = e + 32, c = e - n - 32, l = t - r - 32, u = t + 32;
|
|
61
61
|
switch (i) {
|
|
62
62
|
case "top": return {
|
|
@@ -93,36 +93,36 @@ function de(e, t, n, r, i) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function q(e, t, n) {
|
|
97
97
|
return {
|
|
98
98
|
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(be), 0)) + 16))),
|
|
99
99
|
height: Math.min(n, Math.max(26, (e.length - 1) * 16 + 14 + 16))
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
let { width: c, height: l } =
|
|
102
|
+
function pe(e, t, n, r, i, a, o = 0, s = 0) {
|
|
103
|
+
let { width: c, height: l } = q(n, r, i), u = fe(e, t, c, l, a), d = ce({
|
|
104
104
|
x: u.x + o,
|
|
105
105
|
y: u.y + s,
|
|
106
106
|
width: c,
|
|
107
107
|
height: l,
|
|
108
108
|
lineEndX: e,
|
|
109
109
|
lineEndY: t
|
|
110
|
-
}, r, i), f =
|
|
110
|
+
}, r, i), f = de(d, e, t);
|
|
111
111
|
return {
|
|
112
112
|
...d,
|
|
113
113
|
lineEndX: f.x,
|
|
114
114
|
lineEndY: f.y
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function me(e, t, n, r) {
|
|
118
118
|
let i = [];
|
|
119
119
|
return e.forEach((e) => {
|
|
120
120
|
if (!xe(e)) return;
|
|
121
121
|
let a = t.find((t) => t.series.id === e.seriesId);
|
|
122
122
|
if (!a) return;
|
|
123
123
|
let o = a.xScale.domain(), s = a.yScale.domain();
|
|
124
|
-
if (!
|
|
125
|
-
let c = Se(e.text), l = a.left ?? 0, u = a.width ?? n, d = a.xScale(e.x), f = l + d, p = a.yScale(e.y) + a.top, m = Math.min(a.height, Math.max(0, r - a.top)), h = p - a.top, g = Number.isFinite(e.labelOffsetX) && e.labelOffsetX !== 0 || Number.isFinite(e.labelOffsetY) && e.labelOffsetY !== 0, { width: _, height: v } =
|
|
124
|
+
if (!se(e.x, o) || !se(e.y, s)) return;
|
|
125
|
+
let c = Se(e.text), l = a.left ?? 0, u = a.width ?? n, d = a.xScale(e.x), f = l + d, p = a.yScale(e.y) + a.top, m = Math.min(a.height, Math.max(0, r - a.top)), h = p - a.top, g = Number.isFinite(e.labelOffsetX) && e.labelOffsetX !== 0 || Number.isFinite(e.labelOffsetY) && e.labelOffsetY !== 0, { width: _, height: v } = q(c, u, m), y = g ? "top" : ue(d, h, _, v, u, m), b = pe(d, h, c, u, m, y, Number.isFinite(e.labelOffsetX) ? e.labelOffsetX : 0, Number.isFinite(e.labelOffsetY) ? e.labelOffsetY : 0), x = {
|
|
126
126
|
...b,
|
|
127
127
|
x: b.x + l,
|
|
128
128
|
y: b.y + a.top,
|
|
@@ -143,14 +143,14 @@ function pe(e, t, n, r) {
|
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/components/annotation/markup.ts
|
|
146
|
-
var
|
|
146
|
+
var J = {
|
|
147
147
|
borderColor: "#1677ff",
|
|
148
148
|
textColor: "#333333",
|
|
149
149
|
backgroundColor: "rgba(255, 255, 255, 0.92)"
|
|
150
|
-
},
|
|
150
|
+
}, he = "12px Arial, sans-serif", Y = N((e) => e.x);
|
|
151
151
|
function ge(e, t) {
|
|
152
152
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
153
|
-
let n =
|
|
153
|
+
let n = Y.center(e, t), r = e[Math.min(n, e.length - 1)], i = e[Math.max(0, n - 1)];
|
|
154
154
|
return Math.abs(t - i.x) < Math.abs(r.x - t) ? i : r;
|
|
155
155
|
}
|
|
156
156
|
function _e(e, t, n = "linear") {
|
|
@@ -158,7 +158,7 @@ function _e(e, t, n = "linear") {
|
|
|
158
158
|
let r = e[0], i = e[e.length - 1];
|
|
159
159
|
if (t < r.x || t > i.x) return null;
|
|
160
160
|
if (e.length === 1) return t === r.x ? { ...r } : null;
|
|
161
|
-
let a =
|
|
161
|
+
let a = Y.left(e, t), o = e[Math.min(a, e.length - 1)];
|
|
162
162
|
if (o.x === t || a === 0) return {
|
|
163
163
|
x: t,
|
|
164
164
|
y: o.y
|
|
@@ -199,7 +199,7 @@ function ve(e, t, n, r) {
|
|
|
199
199
|
trackIndex: e.index,
|
|
200
200
|
seriesId: e.series.id,
|
|
201
201
|
name: e.series.name?.trim() || e.series.id,
|
|
202
|
-
color: e.series.color ||
|
|
202
|
+
color: e.series.color || J.borderColor,
|
|
203
203
|
unit: e.series.unit,
|
|
204
204
|
point: a,
|
|
205
205
|
screenX: c,
|
|
@@ -213,13 +213,13 @@ function ye(e) {
|
|
|
213
213
|
return Array.from(e).reduce((e, t) => e + (t.codePointAt(0) > 255 ? 12 : 6.7), 0);
|
|
214
214
|
}
|
|
215
215
|
function be(e) {
|
|
216
|
-
return X === void 0 && (X = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (X = document.createElement("canvas").getContext("2d"), X && (X.font =
|
|
216
|
+
return X === void 0 && (X = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (X = document.createElement("canvas").getContext("2d"), X && (X.font = he))), X?.measureText(e).width ?? ye(e);
|
|
217
217
|
}
|
|
218
218
|
function Z(e) {
|
|
219
219
|
return {
|
|
220
|
-
borderColor: e?.borderColor ||
|
|
221
|
-
textColor: e?.textColor ||
|
|
222
|
-
backgroundColor: e?.backgroundColor ||
|
|
220
|
+
borderColor: e?.borderColor || J.borderColor,
|
|
221
|
+
textColor: e?.textColor || J.textColor,
|
|
222
|
+
backgroundColor: e?.backgroundColor || J.backgroundColor
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
function xe(e) {
|
|
@@ -425,7 +425,7 @@ var Ce = [
|
|
|
425
425
|
x: b(t).x + b(t).width / 2,
|
|
426
426
|
y: b(t).y + b(t).height / 2 - (t.lines.length - 1) * w(16) / 2,
|
|
427
427
|
fill: t.style.textColor,
|
|
428
|
-
style: p({ font: w(
|
|
428
|
+
style: p({ font: w(he) }),
|
|
429
429
|
"text-anchor": "middle",
|
|
430
430
|
"dominant-baseline": "central"
|
|
431
431
|
}, [(g(!0), i(e, null, y(t.lines, (e, n) => (g(), i("tspan", {
|
|
@@ -1073,8 +1073,23 @@ function nn(e, t) {
|
|
|
1073
1073
|
return n;
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
|
+
//#region src/components/core/xDomain.ts
|
|
1077
|
+
var rn = 10;
|
|
1078
|
+
function an(e) {
|
|
1079
|
+
return !Number.isFinite(e) || (e ?? 0) < 1 ? rn : Math.max(1, Math.trunc(e));
|
|
1080
|
+
}
|
|
1081
|
+
function on(e, t, n = !1) {
|
|
1082
|
+
if (t.type !== "nice" || n && !t.includeExplicit) return [...e];
|
|
1083
|
+
let r = B().domain(e).nice(an(t.tickCount)).domain();
|
|
1084
|
+
return t.bounds === "end" ? [e[0], r[1]] : r;
|
|
1085
|
+
}
|
|
1086
|
+
//#endregion
|
|
1076
1087
|
//#region src/components/core/trackLayoutBuilder.ts
|
|
1077
|
-
function
|
|
1088
|
+
function sn(e, t, n) {
|
|
1089
|
+
let r = n.xDomainStrategy ?? { type: "data" }, i = n.initialXDomains?.[e.id] ?? n.initialXDomains?.[t] ?? n.initialXDomain;
|
|
1090
|
+
return i ? on(i, r, !0) : on(e.xDomain, r);
|
|
1091
|
+
}
|
|
1092
|
+
function cn(e) {
|
|
1078
1093
|
let t = e.cells.map((e) => ({
|
|
1079
1094
|
...e,
|
|
1080
1095
|
hasSeries: !!e.series
|
|
@@ -1104,7 +1119,7 @@ function rn(e) {
|
|
|
1104
1119
|
visibleSeries: [a],
|
|
1105
1120
|
xDomain: a.xDomain,
|
|
1106
1121
|
yDomain: a.yDomain
|
|
1107
|
-
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(
|
|
1122
|
+
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(sn(o, c.id, e), [0, t.width]) : B(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ?? G : G).rescaleX(l), d = e.yDomains?.[o.id], f = _n(o, e.overlayMode, e.fixedYDomain, e.fixedYDomains).map((e) => !e.fixed && d ? {
|
|
1108
1123
|
...e,
|
|
1109
1124
|
domain: d
|
|
1110
1125
|
} : e), p = {
|
|
@@ -1117,7 +1132,7 @@ function rn(e) {
|
|
|
1117
1132
|
a,
|
|
1118
1133
|
...c,
|
|
1119
1134
|
...s ? [o] : []
|
|
1120
|
-
])), { tickTextWidth: u } =
|
|
1135
|
+
])), { tickTextWidth: u } = vn(n.domain, !n.fixed, l), d = u + 7 + 6 + 24 + 4, f = n.side === "left" ? -p.left : t.width + p.right, m = u + 7 + 6 + 24 / 2, h = f + (n.side === "left" ? -m : m);
|
|
1121
1136
|
return p[n.side] += d, {
|
|
1122
1137
|
index: n.index,
|
|
1123
1138
|
side: n.side,
|
|
@@ -1188,8 +1203,8 @@ function rn(e) {
|
|
|
1188
1203
|
}
|
|
1189
1204
|
//#endregion
|
|
1190
1205
|
//#region src/components/core/layout.ts
|
|
1191
|
-
var
|
|
1192
|
-
function
|
|
1206
|
+
var ln = 7, un = 7, dn = 4, fn = 6, pn = 24;
|
|
1207
|
+
function mn(e) {
|
|
1193
1208
|
return e >= 4 ? [
|
|
1194
1209
|
"left",
|
|
1195
1210
|
"left",
|
|
@@ -1201,13 +1216,13 @@ function un(e) {
|
|
|
1201
1216
|
"right"
|
|
1202
1217
|
] : e === 2 ? ["left", "right"] : ["left"];
|
|
1203
1218
|
}
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
let n =
|
|
1207
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
1219
|
+
var hn = /* @__PURE__ */ new WeakMap();
|
|
1220
|
+
function gn(e, t) {
|
|
1221
|
+
let n = hn.get(e);
|
|
1222
|
+
n || (n = /* @__PURE__ */ new Map(), hn.set(e, n));
|
|
1208
1223
|
let r = n.get(t);
|
|
1209
1224
|
if (r) return r;
|
|
1210
|
-
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a =
|
|
1225
|
+
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a = mn(i), o = Array.from({ length: i }, (e, t) => ({
|
|
1211
1226
|
index: t,
|
|
1212
1227
|
side: a[t],
|
|
1213
1228
|
seriesList: [],
|
|
@@ -1224,9 +1239,9 @@ function fn(e, t) {
|
|
|
1224
1239
|
}
|
|
1225
1240
|
}), n.set(t, o), o;
|
|
1226
1241
|
}
|
|
1227
|
-
function
|
|
1242
|
+
function _n(e, t, n, r) {
|
|
1228
1243
|
let i = xt(e, r);
|
|
1229
|
-
return
|
|
1244
|
+
return gn(e, t).map((e) => {
|
|
1230
1245
|
if (i) return {
|
|
1231
1246
|
...e,
|
|
1232
1247
|
domain: i,
|
|
@@ -1240,7 +1255,7 @@ function pn(e, t, n, r) {
|
|
|
1240
1255
|
} : e;
|
|
1241
1256
|
});
|
|
1242
1257
|
}
|
|
1243
|
-
function
|
|
1258
|
+
function vn(e, t = !0, n) {
|
|
1244
1259
|
let r = B(e, [1, 0]);
|
|
1245
1260
|
t && r.nice();
|
|
1246
1261
|
let [i, a] = r.domain(), o = n ?? Array.from(/* @__PURE__ */ new Set([
|
|
@@ -1252,21 +1267,21 @@ function mn(e, t = !0, n) {
|
|
|
1252
1267
|
axisMin: i,
|
|
1253
1268
|
axisMax: a,
|
|
1254
1269
|
topTickValue: s
|
|
1255
|
-
}).length)) *
|
|
1270
|
+
}).length)) * ln };
|
|
1256
1271
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1272
|
+
function yn(e) {
|
|
1273
|
+
return vn(e.domain, !e.fixed).tickTextWidth + un + fn + pn + dn;
|
|
1259
1274
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return
|
|
1275
|
+
function bn(e) {
|
|
1276
|
+
return vn(e.domain, !e.fixed).tickTextWidth + un + dn;
|
|
1262
1277
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1278
|
+
function xn(e, t, n, r) {
|
|
1279
|
+
return _n(e, t, n, r).reduce((n, r) => (n[r.side] += t === "multi-axis" || e.visibleSeries.length === 1 ? yn(r) : bn(r), n), {
|
|
1265
1280
|
left: 0,
|
|
1266
1281
|
right: 0
|
|
1267
1282
|
});
|
|
1268
1283
|
}
|
|
1269
|
-
function
|
|
1284
|
+
function Sn(e, t, n) {
|
|
1270
1285
|
let r = (e) => {
|
|
1271
1286
|
let r = t < e.left ? e.left - t : t > e.left + e.width ? t - e.left - e.width : 0;
|
|
1272
1287
|
return n < e.top ? e.top - n : n > e.top + e.height ? n - (e.top + e.height) : r;
|
|
@@ -1285,11 +1300,11 @@ function vn(e, t, n) {
|
|
|
1285
1300
|
}
|
|
1286
1301
|
//#endregion
|
|
1287
1302
|
//#region src/components/annotation/useWaveformChartAnnotations.ts
|
|
1288
|
-
var
|
|
1289
|
-
function
|
|
1290
|
-
return
|
|
1303
|
+
var Cn = 0;
|
|
1304
|
+
function wn() {
|
|
1305
|
+
return Cn += 1, typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `annotation-${Date.now()}-${Cn}`;
|
|
1291
1306
|
}
|
|
1292
|
-
function
|
|
1307
|
+
function Tn(e) {
|
|
1293
1308
|
let { props: t, emit: n, container: r, chartSeries: i, hiddenSeriesIdSet: a, internalHiddenSeriesIds: o, annotationInteraction: s, editorSeriesOptions: c, trackLayouts: l, annotationLayoutsForTrack: u, resolveSeriesYScale: d, chartWidth: f, chartHeight: p, innerWidth: m, resolvedChartLeftMargin: h, titleAreaHeight: g, chartTopMargin: _, activeInteractionMode: v, isPresentationMode: y } = e;
|
|
1294
1309
|
function b(e) {
|
|
1295
1310
|
if (!i.value.some((t) => t.id === e)) return;
|
|
@@ -1322,7 +1337,7 @@ function xn(e) {
|
|
|
1322
1337
|
};
|
|
1323
1338
|
}
|
|
1324
1339
|
function C(e, t, n) {
|
|
1325
|
-
s.openCreate(e,
|
|
1340
|
+
s.openCreate(e, wn, t), c.value = n;
|
|
1326
1341
|
let r = s.editorDraft.value, i = l.value.find((t) => t.index === e.trackIndex)?.seriesList.find((t) => t.id === e.seriesId);
|
|
1327
1342
|
r?.mode === "add" && (r.annotation.style = {
|
|
1328
1343
|
borderColor: i?.color || "#1677ff",
|
|
@@ -1351,7 +1366,7 @@ function xn(e) {
|
|
|
1351
1366
|
let e = l.value[n];
|
|
1352
1367
|
return e?.hasVisibleSeries ? e : void 0;
|
|
1353
1368
|
}
|
|
1354
|
-
return
|
|
1369
|
+
return Sn(l.value.filter((e) => e.hasVisibleSeries), e, t);
|
|
1355
1370
|
}
|
|
1356
1371
|
function D(e, t) {
|
|
1357
1372
|
let n = e.currentTarget;
|
|
@@ -1439,8 +1454,8 @@ function xn(e) {
|
|
|
1439
1454
|
}
|
|
1440
1455
|
//#endregion
|
|
1441
1456
|
//#region src/components/interaction/useWaveformHover.ts
|
|
1442
|
-
var
|
|
1443
|
-
function
|
|
1457
|
+
var En = N((e) => e.x);
|
|
1458
|
+
function Dn(e) {
|
|
1444
1459
|
let { emit: t, hoverState: n, suppressHoverUntilMove: r, hoverThrottle: i, selection: a, trackLayouts: o, innerWidth: s, resolvedChartLeftMargin: c, titleAreaHeight: l, chartTopMargin: u, sharedOverlayElement: d, isPresentationMode: f, updateViewportDrag: p, resolveTrackAtPointer: m } = e, h = () => i.cancel(), g = (e) => i.schedule(e), _ = (e) => n.points.length === e.length && e.every((e, t) => {
|
|
1445
1460
|
let r = n.points[t];
|
|
1446
1461
|
return r?.id === e.id && r.trackIndex === e.trackIndex && r.point === e.point;
|
|
@@ -1461,7 +1476,7 @@ function Cn(e) {
|
|
|
1461
1476
|
r.value = !0, y();
|
|
1462
1477
|
}, C = (e = !1) => {
|
|
1463
1478
|
r.value = !e, y();
|
|
1464
|
-
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[
|
|
1479
|
+
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[En.center(e.points, t)];
|
|
1465
1480
|
return {
|
|
1466
1481
|
cancelPendingHover: h,
|
|
1467
1482
|
clearHover: y,
|
|
@@ -1516,14 +1531,14 @@ function Cn(e) {
|
|
|
1516
1531
|
}
|
|
1517
1532
|
//#endregion
|
|
1518
1533
|
//#region src/components/interaction/pointerCapture.ts
|
|
1519
|
-
function
|
|
1534
|
+
function On(e, t) {
|
|
1520
1535
|
try {
|
|
1521
1536
|
e?.releasePointerCapture?.(t);
|
|
1522
1537
|
} catch {}
|
|
1523
1538
|
}
|
|
1524
1539
|
//#endregion
|
|
1525
1540
|
//#region src/components/interaction/viewportInteractionState.ts
|
|
1526
|
-
function
|
|
1541
|
+
function kn(e) {
|
|
1527
1542
|
return {
|
|
1528
1543
|
...e,
|
|
1529
1544
|
currentX: e.startX,
|
|
@@ -1532,37 +1547,37 @@ function Tn(e) {
|
|
|
1532
1547
|
yDomains: Object.fromEntries(Object.entries(e.yDomains).map(([e, t]) => [e, [...t]]))
|
|
1533
1548
|
};
|
|
1534
1549
|
}
|
|
1535
|
-
function
|
|
1550
|
+
function An(e, t) {
|
|
1536
1551
|
return {
|
|
1537
1552
|
...e,
|
|
1538
1553
|
...t
|
|
1539
1554
|
};
|
|
1540
1555
|
}
|
|
1541
|
-
function
|
|
1556
|
+
function jn(e) {
|
|
1542
1557
|
return {
|
|
1543
1558
|
state: e,
|
|
1544
1559
|
accepted: !1,
|
|
1545
1560
|
completed: null
|
|
1546
1561
|
};
|
|
1547
1562
|
}
|
|
1548
|
-
function
|
|
1563
|
+
function Mn(e, t) {
|
|
1549
1564
|
switch (t.type) {
|
|
1550
|
-
case "begin": return e ?
|
|
1551
|
-
state:
|
|
1565
|
+
case "begin": return e ? jn(e) : {
|
|
1566
|
+
state: kn(t.gesture),
|
|
1552
1567
|
accepted: !0,
|
|
1553
1568
|
completed: null
|
|
1554
1569
|
};
|
|
1555
|
-
case "move": return !e || e.pointerId !== t.pointerId ?
|
|
1556
|
-
state:
|
|
1570
|
+
case "move": return !e || e.pointerId !== t.pointerId ? jn(e) : {
|
|
1571
|
+
state: An(e, t.position),
|
|
1557
1572
|
accepted: !0,
|
|
1558
1573
|
completed: null
|
|
1559
1574
|
};
|
|
1560
|
-
case "finish": return !e || e.pointerId !== t.pointerId ?
|
|
1575
|
+
case "finish": return !e || e.pointerId !== t.pointerId ? jn(e) : {
|
|
1561
1576
|
state: null,
|
|
1562
1577
|
accepted: !0,
|
|
1563
|
-
completed:
|
|
1578
|
+
completed: An(e, t.position)
|
|
1564
1579
|
};
|
|
1565
|
-
case "cancel": return !e || t.pointerId !== void 0 && e.pointerId !== t.pointerId ?
|
|
1580
|
+
case "cancel": return !e || t.pointerId !== void 0 && e.pointerId !== t.pointerId ? jn(e) : {
|
|
1566
1581
|
state: null,
|
|
1567
1582
|
accepted: !0,
|
|
1568
1583
|
completed: null
|
|
@@ -1576,26 +1591,26 @@ function On(e, t) {
|
|
|
1576
1591
|
}
|
|
1577
1592
|
//#endregion
|
|
1578
1593
|
//#region src/components/interaction/zoomConstraints.ts
|
|
1579
|
-
var
|
|
1580
|
-
function
|
|
1594
|
+
var Nn = /* @__PURE__ */ new WeakMap();
|
|
1595
|
+
function Pn(e) {
|
|
1581
1596
|
return e[0] <= e[1] ? [...e] : [e[1], e[0]];
|
|
1582
1597
|
}
|
|
1583
|
-
function
|
|
1598
|
+
function Fn(e) {
|
|
1584
1599
|
return Number.isFinite(e) && (e ?? 0) > 0 ? Math.ceil(e) : 0;
|
|
1585
1600
|
}
|
|
1586
|
-
function
|
|
1587
|
-
let n = `${t[0]}\u0000${t[1]}`, r =
|
|
1601
|
+
function In(e, t) {
|
|
1602
|
+
let n = `${t[0]}\u0000${t[1]}`, r = Nn.get(e)?.get(n);
|
|
1588
1603
|
if (r) return r;
|
|
1589
1604
|
let i = /* @__PURE__ */ new Set();
|
|
1590
1605
|
for (let n of e) for (let e of n.points) e.x >= t[0] && e.x <= t[1] && i.add(e.x);
|
|
1591
|
-
let a = Array.from(i).sort((e, t) => e - t), o =
|
|
1592
|
-
return o.set(n, a),
|
|
1606
|
+
let a = Array.from(i).sort((e, t) => e - t), o = Nn.get(e) ?? /* @__PURE__ */ new Map();
|
|
1607
|
+
return o.set(n, a), Nn.set(e, o), a;
|
|
1593
1608
|
}
|
|
1594
|
-
function
|
|
1609
|
+
function Ln(e, t, n) {
|
|
1595
1610
|
if (n <= 1) return 0;
|
|
1596
1611
|
let r = 0;
|
|
1597
1612
|
for (let i of e) {
|
|
1598
|
-
let e =
|
|
1613
|
+
let e = In(i, t);
|
|
1599
1614
|
if (e.length < n) return t[1] - t[0];
|
|
1600
1615
|
let a = Infinity;
|
|
1601
1616
|
for (let t = 0; t + n <= e.length; t += 1) a = Math.min(a, e[t + n - 1] - e[t]);
|
|
@@ -1604,17 +1619,17 @@ function Nn(e, t, n) {
|
|
|
1604
1619
|
}
|
|
1605
1620
|
return r;
|
|
1606
1621
|
}
|
|
1607
|
-
function
|
|
1608
|
-
let r =
|
|
1622
|
+
function Rn(e, t, n) {
|
|
1623
|
+
let r = Pn(e), i = r[1] - r[0];
|
|
1609
1624
|
if (!Number.isFinite(i) || i <= 0) return 0;
|
|
1610
|
-
let a = Number.isFinite(n.minZoomSpan) && (n.minZoomSpan ?? 0) > 0 ? Math.min(i, n.minZoomSpan) : 0, o =
|
|
1625
|
+
let a = Number.isFinite(n.minZoomSpan) && (n.minZoomSpan ?? 0) > 0 ? Math.min(i, n.minZoomSpan) : 0, o = Fn(n.minVisiblePoints), s = Ln(t, r, o);
|
|
1611
1626
|
return a > 0 || o > 0 ? Math.max(a, s) : i / mt.DEFAULT_MAX_SCALE;
|
|
1612
1627
|
}
|
|
1613
|
-
function
|
|
1628
|
+
function zn(e, t, n, r) {
|
|
1614
1629
|
if (r <= 0) return e;
|
|
1615
1630
|
let i = 2 ** -52 * Math.max(1, Math.abs(t[0]), Math.abs(t[1])) * 16, a = e;
|
|
1616
1631
|
for (let e of n) {
|
|
1617
|
-
let n =
|
|
1632
|
+
let n = In(e, t);
|
|
1618
1633
|
if (n.length < r) return [...t];
|
|
1619
1634
|
if (n.filter((e) => e >= a[0] && e <= a[1]).length >= r) continue;
|
|
1620
1635
|
let o, s = Infinity, c = Infinity, l = (a[0] + a[1]) / 2;
|
|
@@ -1626,27 +1641,27 @@ function Fn(e, t, n, r) {
|
|
|
1626
1641
|
}
|
|
1627
1642
|
return a;
|
|
1628
1643
|
}
|
|
1629
|
-
function
|
|
1630
|
-
let i =
|
|
1644
|
+
function Bn(e, t, n, r) {
|
|
1645
|
+
let i = Pn(t), a = i[1] - i[0];
|
|
1631
1646
|
if (!Number.isFinite(a) || a <= 0 || Math.abs(e[1] - e[0]) >= a * .999999999999) return i;
|
|
1632
|
-
let o =
|
|
1647
|
+
let o = zn([Math.max(i[0], Math.min(e[0], e[1])), Math.min(i[1], Math.max(e[0], e[1]))], i, n, Fn(r.minVisiblePoints)), s = Rn(i, n, r), c = Math.max(s, Math.min(a, o[1] - o[0])), l = (o[0] + o[1]) / 2, u = Math.max(i[0], Math.min(l - c / 2, i[1] - c));
|
|
1633
1648
|
return [u, u + c];
|
|
1634
1649
|
}
|
|
1635
|
-
function
|
|
1650
|
+
function Vn(e, t, n) {
|
|
1636
1651
|
let r = t[1] - t[0], i = e[1] - e[0];
|
|
1637
|
-
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return
|
|
1652
|
+
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return G;
|
|
1638
1653
|
let a = r / i, o = B(t, [0, n]);
|
|
1639
|
-
return
|
|
1654
|
+
return G.translate(-a * o(e[0]), 0).scale(a);
|
|
1640
1655
|
}
|
|
1641
1656
|
//#endregion
|
|
1642
1657
|
//#region src/components/interaction/useWaveformViewport.ts
|
|
1643
|
-
function
|
|
1658
|
+
function Hn(e) {
|
|
1644
1659
|
let { props: n, emit: r, selection: i, spacePressed: a, trackLayouts: o, chartTracks: s, initialXDomain: c, innerWidth: l, innerHeight: u, sharedOverlayElement: f, sharedTransform: p, independentTransforms: m, sharedYDomains: h, independentYDomains: g, isZoomMode: _, isPresentationMode: v, editorSeriesOptions: y, resolveInitialTrackDomain: b, canZoomTrack: S, canZoomSharedTracks: C, configureZoom: w, cancelPendingZoom: T, clearHover: E, resolveTrackAtPointer: D } = e, O = x(), k = (e, t) => {
|
|
1645
1660
|
let n = O.value, r = t?.currentTarget;
|
|
1646
|
-
|
|
1661
|
+
On(n, e), r && r !== n && On(r, e);
|
|
1647
1662
|
}, A = (e, t) => {
|
|
1648
1663
|
let n = i.value;
|
|
1649
|
-
!n || n.pointerId !== e || (k(e, t), i.value =
|
|
1664
|
+
!n || n.pointerId !== e || (k(e, t), i.value = Mn(i.value, {
|
|
1650
1665
|
type: "cancel",
|
|
1651
1666
|
pointerId: e
|
|
1652
1667
|
}).state, O.value = void 0);
|
|
@@ -1669,7 +1684,7 @@ function Rn(e) {
|
|
|
1669
1684
|
if (!n.zoomable && !s || !_.value || e.button !== 0) return;
|
|
1670
1685
|
let c = e.currentTarget, d = o.value.find((e) => e.index === t);
|
|
1671
1686
|
if (!d) return;
|
|
1672
|
-
let [f, p] = z(e, c), m = Math.max(0, Math.min(r ? d.width : l.value, f)), h = Math.max(0, Math.min(r ? d.height : u.value, p)), g =
|
|
1687
|
+
let [f, p] = z(e, c), m = Math.max(0, Math.min(r ? d.width : l.value, f)), h = Math.max(0, Math.min(r ? d.height : u.value, p)), g = Mn(i.value, {
|
|
1673
1688
|
type: "begin",
|
|
1674
1689
|
gesture: {
|
|
1675
1690
|
trackIndex: t,
|
|
@@ -1691,8 +1706,8 @@ function Rn(e) {
|
|
|
1691
1706
|
let i = t.width || 1, a = t.height || 1, u = e.currentX - e.startX, d = e.currentY - e.startY, f = e.xDomain[1] - e.xDomain[0], _ = e.independent ? b(t) : c.value, v = M([e.xDomain[0] - u / i * f, e.xDomain[1] - u / i * f], _);
|
|
1692
1707
|
if (e.independent) {
|
|
1693
1708
|
let e = [...m.value];
|
|
1694
|
-
e[t.index] =
|
|
1695
|
-
} else p.value =
|
|
1709
|
+
e[t.index] = Vn(v, _, i), m.value = e;
|
|
1710
|
+
} else p.value = Vn(v, _, l.value);
|
|
1696
1711
|
let y = e.independent ? [t] : o.value, x = { ...g.value }, S = { ...h.value };
|
|
1697
1712
|
y.forEach((t) => {
|
|
1698
1713
|
let r = s.value.find((e) => e.id === t.id);
|
|
@@ -1706,7 +1721,7 @@ function Rn(e) {
|
|
|
1706
1721
|
if (!t || !n || e.pointerId !== t.pointerId) return;
|
|
1707
1722
|
let r = o.value.find((e) => e.index === t.trackIndex);
|
|
1708
1723
|
if (!r) return;
|
|
1709
|
-
let [a, s] = z(e, n), c = Math.max(0, Math.min(t.independent ? r.width : l.value, a)), d = Math.max(0, Math.min(t.independent ? r.height : u.value, s)), f =
|
|
1724
|
+
let [a, s] = z(e, n), c = Math.max(0, Math.min(t.independent ? r.width : l.value, a)), d = Math.max(0, Math.min(t.independent ? r.height : u.value, s)), f = Mn(i.value, {
|
|
1710
1725
|
type: "move",
|
|
1711
1726
|
pointerId: e.pointerId,
|
|
1712
1727
|
position: {
|
|
@@ -1725,11 +1740,11 @@ function Rn(e) {
|
|
|
1725
1740
|
if (!t || (e.independent ? !S(t) : !C())) return;
|
|
1726
1741
|
let i = e.independent ? 0 : t.left, a = Math.max(0, Math.min(t.width, Math.min(e.startX, e.currentX) - i)), s = Math.max(0, Math.min(t.width, Math.max(e.startX, e.currentX) - i));
|
|
1727
1742
|
if (s - a < 6) return;
|
|
1728
|
-
let u = e.independent ? b(t) : c.value, f = e.independent ? [t.seriesList] : o.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), h =
|
|
1743
|
+
let u = e.independent ? b(t) : c.value, f = e.independent ? [t.seriesList] : o.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), h = Bn([t.xScale.invert(a), t.xScale.invert(s)], u, f, n);
|
|
1729
1744
|
if (e.independent) {
|
|
1730
1745
|
let e = [...m.value];
|
|
1731
|
-
e[t.index] =
|
|
1732
|
-
} else p.value =
|
|
1746
|
+
e[t.index] = Vn(h, u, t.width), m.value = e;
|
|
1747
|
+
} else p.value = Vn(h, u, l.value);
|
|
1733
1748
|
let g = e.independent ? [t] : o.value, _ = Object.fromEntries(g.map((e) => [e.series.trackId ?? e.series.id, e.yScale.domain()]));
|
|
1734
1749
|
if (r("zoom-change", h), e.independent) {
|
|
1735
1750
|
let e = _[t.series.trackId ?? t.series.id];
|
|
@@ -1770,7 +1785,7 @@ function Rn(e) {
|
|
|
1770
1785
|
A(t.pointerId, e);
|
|
1771
1786
|
return;
|
|
1772
1787
|
}
|
|
1773
|
-
let [a, s] = z(e, r), c = Math.max(0, Math.min(t.independent ? n.width : l.value, a)), f = Math.max(0, Math.min(t.independent ? n.height : u.value, s)), p =
|
|
1788
|
+
let [a, s] = z(e, r), c = Math.max(0, Math.min(t.independent ? n.width : l.value, a)), f = Math.max(0, Math.min(t.independent ? n.height : u.value, s)), p = Mn(i.value, {
|
|
1774
1789
|
type: "finish",
|
|
1775
1790
|
pointerId: e.pointerId,
|
|
1776
1791
|
position: {
|
|
@@ -1788,10 +1803,10 @@ function Rn(e) {
|
|
|
1788
1803
|
}, H = (e) => {
|
|
1789
1804
|
if (T(), R(), n.displayMode === "independent" && e !== void 0) {
|
|
1790
1805
|
let t = [...m.value];
|
|
1791
|
-
t[e] =
|
|
1806
|
+
t[e] = G, m.value = t;
|
|
1792
1807
|
let n = { ...g.value };
|
|
1793
1808
|
delete n[e], g.value = n;
|
|
1794
|
-
} else p.value =
|
|
1809
|
+
} else p.value = G, m.value = s.value.map(() => G), h.value = {}, g.value = {};
|
|
1795
1810
|
E(), y.value = [], d(w);
|
|
1796
1811
|
};
|
|
1797
1812
|
return {
|
|
@@ -1803,13 +1818,24 @@ function Rn(e) {
|
|
|
1803
1818
|
cancelViewportDrag: R,
|
|
1804
1819
|
resetViewport: H,
|
|
1805
1820
|
requestViewportReset: (e) => {
|
|
1806
|
-
v.value || !n.zoomable || !_.value
|
|
1821
|
+
if (!(v.value || !n.zoomable || !_.value)) {
|
|
1822
|
+
if (n.displayMode === "independent") {
|
|
1823
|
+
let t = (e.target instanceof Element ? e.target : null)?.closest("[data-independent-overlay-index]"), n = Number(t?.getAttribute("data-independent-overlay-index")), i = o.value.find((e) => e.index === n);
|
|
1824
|
+
if (!i) return;
|
|
1825
|
+
e.preventDefault(), H(n), r("zoom-reset", {
|
|
1826
|
+
trackIndex: n,
|
|
1827
|
+
seriesIds: i.legendSeries.map((e) => e.id)
|
|
1828
|
+
});
|
|
1829
|
+
return;
|
|
1830
|
+
}
|
|
1831
|
+
e.preventDefault(), H(), r("zoom-reset", {});
|
|
1832
|
+
}
|
|
1807
1833
|
}
|
|
1808
1834
|
};
|
|
1809
1835
|
}
|
|
1810
1836
|
//#endregion
|
|
1811
1837
|
//#region src/components/utils/useAnimationFrameThrottle.ts
|
|
1812
|
-
function
|
|
1838
|
+
function Un() {
|
|
1813
1839
|
let e = null, t = null;
|
|
1814
1840
|
function n(n) {
|
|
1815
1841
|
t = n, e === null && (e = requestAnimationFrame(() => {
|
|
@@ -1838,8 +1864,8 @@ function zn() {
|
|
|
1838
1864
|
}
|
|
1839
1865
|
//#endregion
|
|
1840
1866
|
//#region src/components/interaction/useWaveformZoom.ts
|
|
1841
|
-
function
|
|
1842
|
-
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v =
|
|
1867
|
+
function Wn(e) {
|
|
1868
|
+
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v = Un(), y = !1, b = null, x = null, S = null, C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Set(), D, O = () => v.schedule(j), k = (e) => {
|
|
1843
1869
|
y || m.value || (g(), b = e.transform, x = "wheel", O(), P());
|
|
1844
1870
|
}, A = (e, t) => {
|
|
1845
1871
|
y || m.value || (g(), C.set(t, e.transform), w.set(t, "wheel"), O(), P());
|
|
@@ -1927,9 +1953,9 @@ function Bn(e) {
|
|
|
1927
1953
|
}, L = (e, n) => {
|
|
1928
1954
|
let r = Math.abs(e[1] - e[0]);
|
|
1929
1955
|
if (!Number.isFinite(r) || r <= 0) return mt.MIN_SCALE;
|
|
1930
|
-
let i =
|
|
1956
|
+
let i = Rn(e, n, t);
|
|
1931
1957
|
return Math.max(mt.MIN_SCALE, i > 0 ? r / i : mt.DEFAULT_MAX_SCALE);
|
|
1932
|
-
}, R = (e, n, r, i) =>
|
|
1958
|
+
}, R = (e, n, r, i) => Vn(Bn(e.rescaleX(B(n, [0, r])).domain(), n, i, t), n, r), z = (e) => {
|
|
1933
1959
|
let n = Number(t.minVisiblePoints);
|
|
1934
1960
|
return Ut(e.seriesList, e.xScale.domain(), Number.isFinite(n) && n > 0 ? Math.ceil(n) + 1 : n);
|
|
1935
1961
|
}, H = () => {
|
|
@@ -1938,7 +1964,7 @@ function Bn(e) {
|
|
|
1938
1964
|
}, U = (e, t) => {
|
|
1939
1965
|
if (e.type !== "wheel") return !1;
|
|
1940
1966
|
let n = e.deltaY;
|
|
1941
|
-
return n < 0 ? t : n > 0 &&
|
|
1967
|
+
return n < 0 ? t : n > 0 && re(e.currentTarget).k > mt.MIN_SCALE;
|
|
1942
1968
|
};
|
|
1943
1969
|
return {
|
|
1944
1970
|
cancelPendingZoom: F,
|
|
@@ -1951,13 +1977,13 @@ function Bn(e) {
|
|
|
1951
1977
|
s.value.forEach((e) => {
|
|
1952
1978
|
let t = r.value?.querySelector(`[data-independent-overlay-index="${e.index}"]`);
|
|
1953
1979
|
if (!t) return;
|
|
1954
|
-
let n = h(e), i = [e.seriesList], a =
|
|
1980
|
+
let n = h(e), i = [e.seriesList], a = W().filter((t) => {
|
|
1955
1981
|
let n = s.value.find((t) => t.index === e.index) ?? e;
|
|
1956
1982
|
return U(t, z(n));
|
|
1957
1983
|
}).scaleExtent([1, L(n, i)]).constrain((t) => R(t, n, e.width, i)).extent([[0, 0], [e.width, e.height]]).translateExtent([[0, 0], [e.width, e.height]]).on("zoom", (t) => A(t, e.index)).on("end", N);
|
|
1958
1984
|
_.set(e.index, a), y = !0;
|
|
1959
1985
|
try {
|
|
1960
|
-
V(t).call(a).on("dblclick.zoom", null).call(a.transform, o.value[e.index] ??
|
|
1986
|
+
V(t).call(a).on("dblclick.zoom", null).call(a.transform, o.value[e.index] ?? G);
|
|
1961
1987
|
} finally {
|
|
1962
1988
|
y = !1;
|
|
1963
1989
|
}
|
|
@@ -1966,7 +1992,7 @@ function Bn(e) {
|
|
|
1966
1992
|
}
|
|
1967
1993
|
let e = i.value;
|
|
1968
1994
|
if (!e) return;
|
|
1969
|
-
let n = s.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), l =
|
|
1995
|
+
let n = s.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), l = W().filter((e) => U(e, H())).scaleExtent([1, L(c.value, n)]).constrain((e) => R(e, c.value, u.value, n)).extent([[0, 0], [u.value, d.value]]).translateExtent([[0, 0], [u.value, d.value]]).on("zoom", k).on("end", N);
|
|
1970
1996
|
_.set("shared", l), y = !0;
|
|
1971
1997
|
try {
|
|
1972
1998
|
V(e).call(l).on("dblclick.zoom", null).call(l.transform, a.value);
|
|
@@ -1978,45 +2004,45 @@ function Bn(e) {
|
|
|
1978
2004
|
}
|
|
1979
2005
|
//#endregion
|
|
1980
2006
|
//#region src/components/core/useWaveformChartLifecycle.ts
|
|
1981
|
-
function
|
|
2007
|
+
function Gn(e) {
|
|
1982
2008
|
return e instanceof Element && !!e.closest("button, input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
1983
2009
|
}
|
|
1984
|
-
function
|
|
2010
|
+
function Kn(e) {
|
|
1985
2011
|
let { props: t, emit: n, container: r, titleMeasureElement: i, resizeObserver: a, observedWidth: o, observedHeight: s, measuredTitleWidth: c, measuredTitleHeight: l, resolvedTitleText: u, titleAreaReserved: f, titleMeasureStyle: p, spacePressed: g, pointerInsideChart: _, currentPage: v, pageCount: y, pagedTracks: b, gridOptions: x, chartSeries: S, chartTracks: C, trackLayouts: w, innerWidth: T, innerHeight: D, activeInteractionMode: O, hiddenSeriesIdSet: k, internalHiddenSeriesIds: A, independentTransforms: j, independentYDomains: M, resolveInitialTrackDomain: N, annotationInteraction: P, editorSeriesOptions: F, isPresentationMode: I, clearHover: L, cancelAnnotation: R, configureZoom: z, resetViewport: B, cancelViewportDrag: V, cancelPendingHover: H, clearZoomBindings: U } = e;
|
|
1986
2012
|
function ee(e) {
|
|
1987
|
-
I.value || e.code !== "Space" || !t.pannable || !_.value ||
|
|
2013
|
+
I.value || e.code !== "Space" || !t.pannable || !_.value || Gn(e.target) || (g.value = !0, e.preventDefault());
|
|
1988
2014
|
}
|
|
1989
|
-
function
|
|
2015
|
+
function te(e) {
|
|
1990
2016
|
e.code === "Space" && (g.value = !1);
|
|
1991
2017
|
}
|
|
1992
|
-
function
|
|
2018
|
+
function ne(e) {
|
|
1993
2019
|
let r = Math.min(y.value, Math.max(1, Math.floor(e)));
|
|
1994
|
-
r !== v.value && (v.value = r, L(), P.closeContextMenu(), R(), t.displayMode === "independent" && (j.value = b.value.map(() =>
|
|
2020
|
+
r !== v.value && (v.value = r, L(), P.closeContextMenu(), R(), t.displayMode === "independent" && (j.value = b.value.map(() => G), M.value = {}), d(z), n("page-change", r, y.value));
|
|
1995
2021
|
}
|
|
1996
|
-
let
|
|
1997
|
-
function
|
|
1998
|
-
t.displayMode === "independent" && (
|
|
2022
|
+
let W;
|
|
2023
|
+
function re() {
|
|
2024
|
+
t.displayMode === "independent" && (W = w.value.map((e) => {
|
|
1999
2025
|
let n = t.initialXDomains?.[e.series.trackId ?? e.series.id] ?? t.initialXDomains?.[e.series.id] ?? t.initialXDomain;
|
|
2000
2026
|
if (!(!n || !Number.isFinite(n[0]) || !Number.isFinite(n[1]) || n[0] === n[1])) return e.xScale.domain();
|
|
2001
2027
|
}));
|
|
2002
2028
|
}
|
|
2003
|
-
function
|
|
2029
|
+
function ie() {
|
|
2004
2030
|
if (t.displayMode === "independent") {
|
|
2005
2031
|
let e = j.value;
|
|
2006
|
-
j.value = C.value.map((t, n) => e[n] ??
|
|
2032
|
+
j.value = C.value.map((t, n) => e[n] ?? G);
|
|
2007
2033
|
}
|
|
2008
2034
|
L(), F.value = [], d(() => {
|
|
2009
|
-
if (t.displayMode === "independent" &&
|
|
2010
|
-
let e = C.value.map(() =>
|
|
2035
|
+
if (t.displayMode === "independent" && W) {
|
|
2036
|
+
let e = C.value.map(() => G);
|
|
2011
2037
|
w.value.forEach((n) => {
|
|
2012
|
-
let r =
|
|
2038
|
+
let r = W?.[n.index];
|
|
2013
2039
|
if (!r) return;
|
|
2014
|
-
let i = N(n), a =
|
|
2015
|
-
e[n.index] =
|
|
2016
|
-
}), j.value = e,
|
|
2040
|
+
let i = N(n), a = Bn(r, i, [n.seriesList], t);
|
|
2041
|
+
e[n.index] = Vn(a, i, n.width);
|
|
2042
|
+
}), j.value = e, W = void 0, d(z);
|
|
2017
2043
|
return;
|
|
2018
2044
|
}
|
|
2019
|
-
|
|
2045
|
+
W = void 0, z();
|
|
2020
2046
|
});
|
|
2021
2047
|
}
|
|
2022
2048
|
E([
|
|
@@ -2028,6 +2054,7 @@ function Hn(e) {
|
|
|
2028
2054
|
() => t.minVisiblePoints,
|
|
2029
2055
|
() => t.initialXDomain,
|
|
2030
2056
|
() => t.initialXDomains,
|
|
2057
|
+
() => t.xDomainStrategy,
|
|
2031
2058
|
() => t.displayMode,
|
|
2032
2059
|
() => C.value.length,
|
|
2033
2060
|
v,
|
|
@@ -2068,7 +2095,7 @@ function Hn(e) {
|
|
|
2068
2095
|
let n = P.editorDraft.value;
|
|
2069
2096
|
n?.mode === "edit" && !e.some((e) => e.id === n.annotation.id) && P.closeEditor();
|
|
2070
2097
|
}, { deep: !0 });
|
|
2071
|
-
function
|
|
2098
|
+
function K() {
|
|
2072
2099
|
if (!f.value || !i.value) {
|
|
2073
2100
|
c.value = 0, l.value = 0;
|
|
2074
2101
|
return;
|
|
@@ -2081,22 +2108,22 @@ function Hn(e) {
|
|
|
2081
2108
|
f,
|
|
2082
2109
|
p
|
|
2083
2110
|
], async () => {
|
|
2084
|
-
c.value = 0, l.value = 0, await d(),
|
|
2111
|
+
c.value = 0, l.value = 0, await d(), K();
|
|
2085
2112
|
}, { immediate: !0 }), h(() => {
|
|
2086
|
-
window.addEventListener("keydown", ee), window.addEventListener("keyup",
|
|
2087
|
-
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(
|
|
2113
|
+
window.addEventListener("keydown", ee), window.addEventListener("keyup", te), r.value && (a.value = new ResizeObserver(([e]) => {
|
|
2114
|
+
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(K);
|
|
2088
2115
|
}), a.value.observe(r.value));
|
|
2089
2116
|
}), m(() => {
|
|
2090
|
-
window.removeEventListener("keydown", ee), window.removeEventListener("keyup",
|
|
2117
|
+
window.removeEventListener("keydown", ee), window.removeEventListener("keyup", te), H(), a.value?.disconnect(), U(), F.value = [];
|
|
2091
2118
|
}), {
|
|
2092
|
-
goToPage:
|
|
2093
|
-
handleBeforeDataReferenceChange:
|
|
2094
|
-
handleDataReferenceChange:
|
|
2119
|
+
goToPage: ne,
|
|
2120
|
+
handleBeforeDataReferenceChange: re,
|
|
2121
|
+
handleDataReferenceChange: ie
|
|
2095
2122
|
};
|
|
2096
2123
|
}
|
|
2097
2124
|
//#endregion
|
|
2098
2125
|
//#region src/components/core/useWaveformData.ts
|
|
2099
|
-
function
|
|
2126
|
+
function qn(e, t = !1) {
|
|
2100
2127
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity, o = !1;
|
|
2101
2128
|
for (let s of e) if (s.x < n && (n = s.x), s.x > r && (r = s.x), s.y < i && (i = s.y), s.y > a && (a = s.y), t) {
|
|
2102
2129
|
let e = At(s);
|
|
@@ -2108,24 +2135,24 @@ function Un(e, t = !1) {
|
|
|
2108
2135
|
hasErrorPoints: o
|
|
2109
2136
|
};
|
|
2110
2137
|
}
|
|
2111
|
-
function
|
|
2138
|
+
function Jn(e) {
|
|
2112
2139
|
return Mt(e).map((e) => {
|
|
2113
|
-
let t =
|
|
2140
|
+
let t = qn(e.points, e.errorBar.visible);
|
|
2114
2141
|
return {
|
|
2115
2142
|
...e,
|
|
2116
2143
|
...t
|
|
2117
2144
|
};
|
|
2118
2145
|
});
|
|
2119
2146
|
}
|
|
2120
|
-
function
|
|
2121
|
-
let r = x(
|
|
2147
|
+
function Yn(e, t, n) {
|
|
2148
|
+
let r = x(Jn(e()));
|
|
2122
2149
|
return E(e, (e) => {
|
|
2123
|
-
t(), r.value =
|
|
2150
|
+
t(), r.value = Jn(e), n();
|
|
2124
2151
|
}), r;
|
|
2125
2152
|
}
|
|
2126
2153
|
//#endregion
|
|
2127
2154
|
//#region src/components/core/useWaveformLayout.ts
|
|
2128
|
-
function
|
|
2155
|
+
function Xn(e) {
|
|
2129
2156
|
let { props: n, preparedSeries: r, currentPage: i, hiddenSeriesIdSet: a, chartWidth: o, innerHeight: s, isCleanView: c, sharedTransform: l, independentTransforms: u, sharedYDomains: d, independentYDomains: f, annotationInteraction: p } = e, m = t(() => r.value.map((e, t) => ({
|
|
2130
2157
|
...e,
|
|
2131
2158
|
color: e.color ?? (t === 0 ? n.lineColor : _t[t % _t.length])
|
|
@@ -2147,14 +2174,14 @@ function Kn(e) {
|
|
|
2147
2174
|
};
|
|
2148
2175
|
});
|
|
2149
2176
|
}), g = t(() => Xt(n.grid)), _ = t(() => zt(n.rendering)), v = t(() => Qt(h.value.length, g.value)), y = t(() => $t(h.value, i.value, g.value)), b = t(() => {
|
|
2150
|
-
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) =>
|
|
2177
|
+
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => _n(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) => vn(e.domain, !e.fixed).tickTextWidth), t = Math.max(7, ...e), r = t + 7 + 4, i = -(7 + t + 6 + 24 / 2);
|
|
2151
2178
|
return {
|
|
2152
2179
|
tickClearance: r,
|
|
2153
2180
|
fullClearance: t + 7 + 6 + 24 + 4,
|
|
2154
2181
|
labelCenterX: i
|
|
2155
2182
|
};
|
|
2156
2183
|
}), x = t(() => h.value.some((e) => e.visibleSeries.length === 1 && !!(e.visibleSeries[0]?.name.trim() || n.yLabel))), S = t(() => h.value.some((e) => e.visibleSeries.length > 0)), C = t(() => Math.max(pt.left, x.value ? b.value.fullClearance : S.value ? b.value.tickClearance : 0)), w = t(() => h.value.reduce((e, t) => {
|
|
2157
|
-
let r =
|
|
2184
|
+
let r = xn(t, n.overlayMode, n.yDomain, n.yDomains);
|
|
2158
2185
|
return {
|
|
2159
2186
|
left: Math.max(e.left, r.left),
|
|
2160
2187
|
right: Math.max(e.right, r.right)
|
|
@@ -2175,14 +2202,14 @@ function Kn(e) {
|
|
|
2175
2202
|
}), $(e);
|
|
2176
2203
|
}), F = t(() => {
|
|
2177
2204
|
let e = n.initialXDomain;
|
|
2178
|
-
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? e[0] < e[1] ? e : [e[1], e[0]] : P.value;
|
|
2205
|
+
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? on(e[0] < e[1] ? e : [e[1], e[0]], n.xDomainStrategy, !0) : on(P.value, n.xDomainStrategy);
|
|
2179
2206
|
}), I = (e) => {
|
|
2180
2207
|
let t = n.initialXDomains?.[e.series.trackId ?? e.series.id] ?? n.initialXDomains?.[e.series.id] ?? n.initialXDomain;
|
|
2181
|
-
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? t[0] < t[1] ? t : [t[1], t[0]] : $(e.seriesList.flatMap((e) => e.xDomain));
|
|
2208
|
+
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? on(t[0] < t[1] ? t : [t[1], t[0]], n.xDomainStrategy, !0) : on($(e.seriesList.flatMap((e) => e.xDomain)), n.xDomainStrategy);
|
|
2182
2209
|
}, L = t(() => l.value.rescaleX(B(F.value, [0, D.value])).domain()), R = t(() => tn(D.value, s.value, g.value, n.displayMode, y.value.map(Boolean), O.value.horizontalGap).map((e, t) => ({
|
|
2183
2210
|
...e,
|
|
2184
2211
|
series: y.value[t]
|
|
2185
|
-
}))), z = t(() =>
|
|
2212
|
+
}))), z = t(() => cn({
|
|
2186
2213
|
cells: R.value,
|
|
2187
2214
|
grid: g.value,
|
|
2188
2215
|
displayMode: n.displayMode,
|
|
@@ -2191,6 +2218,7 @@ function Kn(e) {
|
|
|
2191
2218
|
sharedZoomDomain: L.value,
|
|
2192
2219
|
initialXDomain: n.initialXDomain ? F.value : void 0,
|
|
2193
2220
|
initialXDomains: n.initialXDomains,
|
|
2221
|
+
xDomainStrategy: n.xDomainStrategy,
|
|
2194
2222
|
fixedYDomain: n.yDomain,
|
|
2195
2223
|
fixedYDomains: n.yDomains,
|
|
2196
2224
|
yDomains: n.displayMode === "independent" ? Object.fromEntries(h.value.flatMap((e, t) => {
|
|
@@ -2230,7 +2258,7 @@ function Kn(e) {
|
|
|
2230
2258
|
annotationLayoutsForTrack: V,
|
|
2231
2259
|
resolveSeriesYScale: H,
|
|
2232
2260
|
annotationTrackLayouts: U,
|
|
2233
|
-
renderedAnnotations: t(() => n.annotationsVisible ?
|
|
2261
|
+
renderedAnnotations: t(() => n.annotationsVisible ? me(n.annotations, U.value, D.value, s.value) : []),
|
|
2234
2262
|
editorSeries: t(() => {
|
|
2235
2263
|
let e = p.editorDraft.value?.annotation.seriesId, t = m.value.find((t) => t.id === e);
|
|
2236
2264
|
return t ? {
|
|
@@ -2245,13 +2273,13 @@ function Kn(e) {
|
|
|
2245
2273
|
}
|
|
2246
2274
|
};
|
|
2247
2275
|
}
|
|
2248
|
-
var
|
|
2249
|
-
function
|
|
2276
|
+
var Zn = 1e-6;
|
|
2277
|
+
function Qn(e) {
|
|
2250
2278
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
2251
2279
|
}
|
|
2252
|
-
function
|
|
2253
|
-
let i =
|
|
2254
|
-
if (!(d >
|
|
2280
|
+
function $n({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r }) {
|
|
2281
|
+
let i = Qn(e), a = Qn(t), o = Qn(n), s = Number.isFinite(r) ? r : 0, c = s * Math.PI / 180, l = Math.abs(Math.cos(c)), u = Math.abs(Math.sin(c)), d = (s % 360 + 360) % 360;
|
|
2282
|
+
if (!(d > Zn && Math.abs(d - 360) > Zn)) {
|
|
2255
2283
|
let e = Math.max(1, Math.ceil(i / o)), t = o, n = a * e;
|
|
2256
2284
|
return {
|
|
2257
2285
|
textWidth: t,
|
|
@@ -2276,7 +2304,7 @@ function Yn({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r
|
|
|
2276
2304
|
}
|
|
2277
2305
|
//#endregion
|
|
2278
2306
|
//#region src/components/core/useWaveformPresentation.ts
|
|
2279
|
-
function
|
|
2307
|
+
function er(e) {
|
|
2280
2308
|
let { props: n, observedWidth: r, observedHeight: i, measuredTitleWidth: a, measuredTitleHeight: o, internalHiddenSeriesIds: s, paginationBandHeight: c } = e, l = t(() => Number.isFinite(n.width) ? Math.max(0, n.width ?? 0) : void 0), u = t(() => Number.isFinite(n.height) ? Math.max(180, n.height ?? 0) : void 0), d = t(() => r.value > 0 ? r.value : l.value ?? 0), f = t(() => i.value > 0 ? i.value : u.value ?? 180), p = t(() => ({
|
|
2281
2309
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
2282
2310
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -2321,7 +2349,7 @@ function Xn(e) {
|
|
|
2321
2349
|
maxWidth: O.value ? "none" : `${j.value}px`,
|
|
2322
2350
|
whiteSpace: O.value ? "nowrap" : "normal",
|
|
2323
2351
|
overflowWrap: O.value ? "normal" : "anywhere"
|
|
2324
|
-
})), N = t(() =>
|
|
2352
|
+
})), N = t(() => $n({
|
|
2325
2353
|
naturalWidth: a.value || A.value,
|
|
2326
2354
|
naturalHeight: o.value || E.value * 1.2,
|
|
2327
2355
|
availableWidth: j.value,
|
|
@@ -2377,22 +2405,22 @@ function Xn(e) {
|
|
|
2377
2405
|
}
|
|
2378
2406
|
//#endregion
|
|
2379
2407
|
//#region src/components/core/useWaveformChartController.ts
|
|
2380
|
-
function
|
|
2408
|
+
function tr(e, t) {
|
|
2381
2409
|
e.value = t instanceof Element ? t : void 0;
|
|
2382
2410
|
}
|
|
2383
|
-
function
|
|
2384
|
-
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(
|
|
2411
|
+
function nr(e, t) {
|
|
2412
|
+
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(G), p = x([]), m = v({}), h = v({}), g = b({
|
|
2385
2413
|
points: [],
|
|
2386
2414
|
trackIndex: null,
|
|
2387
2415
|
position: {
|
|
2388
2416
|
x: 0,
|
|
2389
2417
|
y: 0
|
|
2390
2418
|
}
|
|
2391
|
-
}), y = v(!1), S = v(1), w = x(), T =
|
|
2419
|
+
}), y = v(!1), S = v(1), w = x(), T = oe("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ge(), A = v([]), j = Un();
|
|
2392
2420
|
E([() => e.yDomain, () => e.yDomains], () => {
|
|
2393
2421
|
m.value = {}, h.value = {};
|
|
2394
2422
|
}, { deep: !0 });
|
|
2395
|
-
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L =
|
|
2423
|
+
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L = Yn(() => e.data, () => F(), () => I()), R = er({
|
|
2396
2424
|
props: e,
|
|
2397
2425
|
observedWidth: o,
|
|
2398
2426
|
observedHeight: s,
|
|
@@ -2400,76 +2428,76 @@ function Qn(e, t) {
|
|
|
2400
2428
|
measuredTitleHeight: l,
|
|
2401
2429
|
internalHiddenSeriesIds: O,
|
|
2402
2430
|
paginationBandHeight: d
|
|
2403
|
-
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved:
|
|
2431
|
+
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: W, chartTopMargin: re, innerHeight: ie } = R, K = Xn({
|
|
2404
2432
|
props: e,
|
|
2405
2433
|
preparedSeries: L,
|
|
2406
2434
|
currentPage: S,
|
|
2407
2435
|
hiddenSeriesIdSet: U,
|
|
2408
2436
|
chartWidth: z,
|
|
2409
|
-
innerHeight:
|
|
2437
|
+
innerHeight: ie,
|
|
2410
2438
|
isCleanView: V,
|
|
2411
2439
|
sharedTransform: f,
|
|
2412
2440
|
independentTransforms: p,
|
|
2413
2441
|
sharedYDomains: m,
|
|
2414
2442
|
independentYDomains: h,
|
|
2415
2443
|
annotationInteraction: u(k)
|
|
2416
|
-
}), { chartSeries:
|
|
2444
|
+
}), { chartSeries: ae, chartTracks: se, trackLayouts: ce, gridOptions: le, pageCount: ue, pagedTracks: de, resolvedChartLeftMargin: fe, innerWidth: q, hasChartArea: pe, activeInteractionMode: me, isZoomMode: J, initialXDomain: he, sharedZoomDomain: Y, resolveInitialTrackDomain: ge, annotationLayoutsForTrack: _e, resolveSeriesYScale: ve } = K;
|
|
2417
2445
|
D(() => {
|
|
2418
|
-
d.value =
|
|
2446
|
+
d.value = le.value.showPagination && ue.value > 1 && z.value <= 520 ? 40 : 0;
|
|
2419
2447
|
});
|
|
2420
|
-
let X =
|
|
2448
|
+
let X = Wn({
|
|
2421
2449
|
props: e,
|
|
2422
2450
|
emit: t,
|
|
2423
2451
|
svgElement: r,
|
|
2424
2452
|
sharedOverlayElement: a,
|
|
2425
2453
|
sharedTransform: f,
|
|
2426
2454
|
independentTransforms: p,
|
|
2427
|
-
trackLayouts:
|
|
2428
|
-
initialXDomain:
|
|
2429
|
-
sharedZoomDomain:
|
|
2430
|
-
innerWidth:
|
|
2431
|
-
innerHeight:
|
|
2432
|
-
hasChartArea:
|
|
2433
|
-
isZoomMode:
|
|
2455
|
+
trackLayouts: ce,
|
|
2456
|
+
initialXDomain: he,
|
|
2457
|
+
sharedZoomDomain: Y,
|
|
2458
|
+
innerWidth: q,
|
|
2459
|
+
innerHeight: ie,
|
|
2460
|
+
hasChartArea: pe,
|
|
2461
|
+
isZoomMode: J,
|
|
2434
2462
|
isPresentationMode: H,
|
|
2435
2463
|
resolveInitialTrackDomain: ge,
|
|
2436
2464
|
cancelPendingHover: () => Z.cancelPendingHover()
|
|
2437
|
-
}), ye =
|
|
2465
|
+
}), ye = Tn({
|
|
2438
2466
|
props: e,
|
|
2439
2467
|
emit: t,
|
|
2440
2468
|
container: n,
|
|
2441
|
-
chartSeries:
|
|
2469
|
+
chartSeries: ae,
|
|
2442
2470
|
hiddenSeriesIdSet: U,
|
|
2443
2471
|
internalHiddenSeriesIds: O,
|
|
2444
2472
|
annotationInteraction: k,
|
|
2445
2473
|
editorSeriesOptions: A,
|
|
2446
|
-
trackLayouts:
|
|
2474
|
+
trackLayouts: ce,
|
|
2447
2475
|
annotationLayoutsForTrack: _e,
|
|
2448
2476
|
resolveSeriesYScale: ve,
|
|
2449
2477
|
chartWidth: z,
|
|
2450
2478
|
chartHeight: B,
|
|
2451
|
-
innerWidth:
|
|
2452
|
-
resolvedChartLeftMargin:
|
|
2453
|
-
titleAreaHeight:
|
|
2454
|
-
chartTopMargin:
|
|
2455
|
-
activeInteractionMode:
|
|
2479
|
+
innerWidth: q,
|
|
2480
|
+
resolvedChartLeftMargin: fe,
|
|
2481
|
+
titleAreaHeight: W,
|
|
2482
|
+
chartTopMargin: re,
|
|
2483
|
+
activeInteractionMode: me,
|
|
2456
2484
|
isPresentationMode: H
|
|
2457
|
-
}), be =
|
|
2485
|
+
}), be = Hn({
|
|
2458
2486
|
props: e,
|
|
2459
2487
|
emit: t,
|
|
2460
2488
|
selection: M,
|
|
2461
2489
|
spacePressed: N,
|
|
2462
|
-
trackLayouts:
|
|
2463
|
-
chartTracks:
|
|
2464
|
-
initialXDomain:
|
|
2465
|
-
innerWidth:
|
|
2466
|
-
innerHeight:
|
|
2490
|
+
trackLayouts: ce,
|
|
2491
|
+
chartTracks: se,
|
|
2492
|
+
initialXDomain: he,
|
|
2493
|
+
innerWidth: q,
|
|
2494
|
+
innerHeight: ie,
|
|
2467
2495
|
sharedOverlayElement: a,
|
|
2468
2496
|
sharedTransform: f,
|
|
2469
2497
|
independentTransforms: p,
|
|
2470
2498
|
sharedYDomains: m,
|
|
2471
2499
|
independentYDomains: h,
|
|
2472
|
-
isZoomMode:
|
|
2500
|
+
isZoomMode: J,
|
|
2473
2501
|
isPresentationMode: H,
|
|
2474
2502
|
editorSeriesOptions: A,
|
|
2475
2503
|
resolveInitialTrackDomain: ge,
|
|
@@ -2479,22 +2507,22 @@ function Qn(e, t) {
|
|
|
2479
2507
|
cancelPendingZoom: X.cancelPendingZoom,
|
|
2480
2508
|
clearHover: () => Z.clearHover(),
|
|
2481
2509
|
resolveTrackAtPointer: ye.resolveTrackAtPointer
|
|
2482
|
-
}), Z =
|
|
2510
|
+
}), Z = Dn({
|
|
2483
2511
|
emit: t,
|
|
2484
2512
|
hoverState: g,
|
|
2485
2513
|
suppressHoverUntilMove: y,
|
|
2486
2514
|
hoverThrottle: j,
|
|
2487
2515
|
selection: M,
|
|
2488
|
-
trackLayouts:
|
|
2489
|
-
innerWidth:
|
|
2490
|
-
resolvedChartLeftMargin:
|
|
2491
|
-
titleAreaHeight:
|
|
2492
|
-
chartTopMargin:
|
|
2516
|
+
trackLayouts: ce,
|
|
2517
|
+
innerWidth: q,
|
|
2518
|
+
resolvedChartLeftMargin: fe,
|
|
2519
|
+
titleAreaHeight: W,
|
|
2520
|
+
chartTopMargin: re,
|
|
2493
2521
|
sharedOverlayElement: a,
|
|
2494
2522
|
isPresentationMode: H,
|
|
2495
2523
|
updateViewportDrag: be.updateViewportDrag,
|
|
2496
2524
|
resolveTrackAtPointer: ye.resolveTrackAtPointer
|
|
2497
|
-
}), xe =
|
|
2525
|
+
}), xe = Kn({
|
|
2498
2526
|
props: e,
|
|
2499
2527
|
emit: t,
|
|
2500
2528
|
container: n,
|
|
@@ -2505,20 +2533,20 @@ function Qn(e, t) {
|
|
|
2505
2533
|
measuredTitleWidth: c,
|
|
2506
2534
|
measuredTitleHeight: l,
|
|
2507
2535
|
resolvedTitleText: ee,
|
|
2508
|
-
titleAreaReserved:
|
|
2509
|
-
titleMeasureStyle:
|
|
2536
|
+
titleAreaReserved: te,
|
|
2537
|
+
titleMeasureStyle: ne,
|
|
2510
2538
|
spacePressed: N,
|
|
2511
2539
|
pointerInsideChart: P,
|
|
2512
2540
|
currentPage: S,
|
|
2513
|
-
pageCount:
|
|
2514
|
-
pagedTracks:
|
|
2515
|
-
gridOptions:
|
|
2516
|
-
chartSeries:
|
|
2517
|
-
chartTracks:
|
|
2518
|
-
trackLayouts:
|
|
2519
|
-
innerWidth:
|
|
2520
|
-
innerHeight:
|
|
2521
|
-
activeInteractionMode:
|
|
2541
|
+
pageCount: ue,
|
|
2542
|
+
pagedTracks: de,
|
|
2543
|
+
gridOptions: le,
|
|
2544
|
+
chartSeries: ae,
|
|
2545
|
+
chartTracks: se,
|
|
2546
|
+
trackLayouts: ce,
|
|
2547
|
+
innerWidth: q,
|
|
2548
|
+
innerHeight: ie,
|
|
2549
|
+
activeInteractionMode: me,
|
|
2522
2550
|
hiddenSeriesIdSet: U,
|
|
2523
2551
|
internalHiddenSeriesIds: O,
|
|
2524
2552
|
independentTransforms: p,
|
|
@@ -2538,7 +2566,7 @@ function Qn(e, t) {
|
|
|
2538
2566
|
return F = xe.handleBeforeDataReferenceChange, I = xe.handleDataReferenceChange, _({
|
|
2539
2567
|
...C(e),
|
|
2540
2568
|
...R,
|
|
2541
|
-
...
|
|
2569
|
+
...K,
|
|
2542
2570
|
...ye,
|
|
2543
2571
|
...be,
|
|
2544
2572
|
...Z,
|
|
@@ -2554,31 +2582,31 @@ function Qn(e, t) {
|
|
|
2554
2582
|
editorSeriesOptions: A,
|
|
2555
2583
|
clipPathId: T,
|
|
2556
2584
|
goToPage: xe.goToPage,
|
|
2557
|
-
setContainer: (e) =>
|
|
2558
|
-
setSvgElement: (e) =>
|
|
2559
|
-
setTitleMeasureElement: (e) =>
|
|
2560
|
-
setSharedOverlayElement: (e) =>
|
|
2585
|
+
setContainer: (e) => tr(n, e),
|
|
2586
|
+
setSvgElement: (e) => tr(r, e),
|
|
2587
|
+
setTitleMeasureElement: (e) => tr(i, e),
|
|
2588
|
+
setSharedOverlayElement: (e) => tr(a, e)
|
|
2561
2589
|
});
|
|
2562
2590
|
}
|
|
2563
2591
|
//#endregion
|
|
2564
2592
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
2565
|
-
var
|
|
2593
|
+
var rr = ["aria-labelledby"], ir = { class: "waveform-annotation-editor__panel" }, ar = { class: "waveform-annotation-editor__header" }, or = ["id"], sr = {
|
|
2566
2594
|
class: "waveform-annotation-editor__coordinates",
|
|
2567
2595
|
"aria-label": "标注坐标"
|
|
2568
|
-
},
|
|
2596
|
+
}, cr = {
|
|
2569
2597
|
key: 0,
|
|
2570
2598
|
class: "waveform-annotation-editor__series",
|
|
2571
2599
|
"aria-label": "标注所属波形"
|
|
2572
|
-
},
|
|
2600
|
+
}, lr = { class: "waveform-annotation-editor__series-label" }, ur = ["value"], dr = ["value"], fr = { key: 1 }, pr = { class: "waveform-annotation-editor__field" }, mr = { class: "waveform-annotation-editor__label-row" }, hr = ["maxlength"], gr = { class: "waveform-annotation-editor__colors" }, _r = {
|
|
2573
2601
|
class: "waveform-annotation-editor__color-field",
|
|
2574
2602
|
title: "调整标注边框色和透明度"
|
|
2575
|
-
},
|
|
2603
|
+
}, vr = {
|
|
2576
2604
|
class: "waveform-annotation-editor__color-field",
|
|
2577
2605
|
title: "调整标注文字色和透明度"
|
|
2578
|
-
},
|
|
2606
|
+
}, yr = {
|
|
2579
2607
|
class: "waveform-annotation-editor__color-field",
|
|
2580
2608
|
title: "调整标注背景色和透明度"
|
|
2581
|
-
},
|
|
2609
|
+
}, br = { class: "waveform-annotation-editor__actions" }, xr = ["disabled"], Sr = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2582
2610
|
__name: "WaveformAnnotationEditor",
|
|
2583
2611
|
props: {
|
|
2584
2612
|
annotation: {},
|
|
@@ -2593,7 +2621,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2593
2621
|
"series-change"
|
|
2594
2622
|
],
|
|
2595
2623
|
setup(n, { emit: o }) {
|
|
2596
|
-
let c = n, l = o, u = v(), f =
|
|
2624
|
+
let c = n, l = o, u = v(), f = oe("waveform-annotation-editor-title"), m = v(""), h = v(""), _ = v(""), b = v(""), x = t(() => m.value.trim().length > 0), C = t(() => m.value.length), D = t(() => {
|
|
2597
2625
|
let e = c.seriesOptions?.find((e) => e.seriesId === c.annotation.seriesId);
|
|
2598
2626
|
return e ? {
|
|
2599
2627
|
id: e.seriesId,
|
|
@@ -2631,21 +2659,21 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2631
2659
|
"aria-modal": "true",
|
|
2632
2660
|
"aria-labelledby": w(f),
|
|
2633
2661
|
onClick: n[6] ||= k((e) => l("cancel"), ["self"])
|
|
2634
|
-
}, [a("section",
|
|
2635
|
-
a("header",
|
|
2662
|
+
}, [a("section", ir, [
|
|
2663
|
+
a("header", ar, [a("div", null, [a("h2", { id: w(f) }, S(c.mode === "add" ? "添加标注" : "编辑标注"), 9, or)]), a("button", {
|
|
2636
2664
|
type: "button",
|
|
2637
2665
|
class: "waveform-annotation-editor__close",
|
|
2638
2666
|
"aria-label": "关闭标注编辑器",
|
|
2639
2667
|
title: "关闭",
|
|
2640
2668
|
onClick: n[0] ||= (e) => l("cancel")
|
|
2641
2669
|
}, " × ")]),
|
|
2642
|
-
a("div",
|
|
2643
|
-
D.value ? (g(), i("label",
|
|
2670
|
+
a("div", sr, [a("span", null, [a("b", null, "X (" + S(c.timeUnit) + ")", 1), a("code", null, S(w(ut)(c.annotation.x, c.timeUnit)), 1)]), a("span", null, [n[7] ||= a("b", null, "Y", -1), a("code", null, S(w(it)(c.annotation.y)), 1)])]),
|
|
2671
|
+
D.value ? (g(), i("label", cr, [
|
|
2644
2672
|
a("i", {
|
|
2645
2673
|
style: p({ backgroundColor: D.value.color }),
|
|
2646
2674
|
"aria-hidden": "true"
|
|
2647
2675
|
}, null, 4),
|
|
2648
|
-
a("span",
|
|
2676
|
+
a("span", lr, [n[8] ||= a("small", null, "标注波形", -1), a("b", null, S(D.value.name), 1)]),
|
|
2649
2677
|
c.seriesOptions?.length ? (g(), i("select", {
|
|
2650
2678
|
key: 0,
|
|
2651
2679
|
value: c.annotation.seriesId,
|
|
@@ -2654,9 +2682,9 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2654
2682
|
}, [(g(!0), i(e, null, y(c.seriesOptions, (e) => (g(), i("option", {
|
|
2655
2683
|
key: e.seriesId,
|
|
2656
2684
|
value: e.seriesId
|
|
2657
|
-
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9,
|
|
2685
|
+
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9, dr))), 128))], 40, ur)) : D.value.unit ? (g(), i("code", fr, S(D.value.unit), 1)) : r("", !0)
|
|
2658
2686
|
])) : r("", !0),
|
|
2659
|
-
a("label",
|
|
2687
|
+
a("label", pr, [a("span", mr, [n[9] ||= a("b", null, "标注文本", -1), a("small", null, S(C.value) + "/" + S(w(40)), 1)]), O(a("textarea", {
|
|
2660
2688
|
ref_key: "textarea",
|
|
2661
2689
|
ref: u,
|
|
2662
2690
|
"onUpdate:modelValue": n[1] ||= (e) => m.value = e,
|
|
@@ -2665,10 +2693,10 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2665
2693
|
"aria-label": "标注文本",
|
|
2666
2694
|
placeholder: "输入这处波形的说明",
|
|
2667
2695
|
onKeydown: M
|
|
2668
|
-
}, null, 40,
|
|
2669
|
-
a("fieldset",
|
|
2696
|
+
}, null, 40, hr), [[T, m.value]])]),
|
|
2697
|
+
a("fieldset", gr, [
|
|
2670
2698
|
n[13] ||= a("legend", null, "颜色与透明度", -1),
|
|
2671
|
-
a("label",
|
|
2699
|
+
a("label", _r, [n[10] ||= a("span", null, "边框色", -1), s(w(K), {
|
|
2672
2700
|
"pure-color": h.value,
|
|
2673
2701
|
"onUpdate:pureColor": n[2] ||= (e) => h.value = e,
|
|
2674
2702
|
"aria-label": "标注边框色",
|
|
@@ -2678,7 +2706,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2678
2706
|
"disable-alpha": !1,
|
|
2679
2707
|
"blur-close": !0
|
|
2680
2708
|
}, null, 8, ["pure-color"])]),
|
|
2681
|
-
a("label",
|
|
2709
|
+
a("label", vr, [n[11] ||= a("span", null, "文字色", -1), s(w(K), {
|
|
2682
2710
|
"pure-color": _.value,
|
|
2683
2711
|
"onUpdate:pureColor": n[3] ||= (e) => _.value = e,
|
|
2684
2712
|
"aria-label": "标注文字色",
|
|
@@ -2688,7 +2716,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2688
2716
|
"disable-alpha": !1,
|
|
2689
2717
|
"blur-close": !0
|
|
2690
2718
|
}, null, 8, ["pure-color"])]),
|
|
2691
|
-
a("label",
|
|
2719
|
+
a("label", yr, [n[12] ||= a("span", null, "背景色", -1), s(w(K), {
|
|
2692
2720
|
"pure-color": b.value,
|
|
2693
2721
|
"onUpdate:pureColor": n[4] ||= (e) => b.value = e,
|
|
2694
2722
|
"aria-label": "标注背景色",
|
|
@@ -2699,7 +2727,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2699
2727
|
"blur-close": !0
|
|
2700
2728
|
}, null, 8, ["pure-color"])])
|
|
2701
2729
|
]),
|
|
2702
|
-
a("footer",
|
|
2730
|
+
a("footer", br, [a("button", {
|
|
2703
2731
|
type: "button",
|
|
2704
2732
|
onClick: n[5] ||= (e) => l("cancel")
|
|
2705
2733
|
}, "取消"), a("button", {
|
|
@@ -2707,10 +2735,10 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2707
2735
|
class: "is-primary",
|
|
2708
2736
|
disabled: !x.value,
|
|
2709
2737
|
onClick: j
|
|
2710
|
-
}, " 保存标注 ", 8,
|
|
2711
|
-
])], 8,
|
|
2738
|
+
}, " 保存标注 ", 8, xr)])
|
|
2739
|
+
])], 8, rr));
|
|
2712
2740
|
}
|
|
2713
|
-
}), [["__scopeId", "data-v-52818b45"]]),
|
|
2741
|
+
}), [["__scopeId", "data-v-52818b45"]]), Cr = { class: "waveform-tooltip__time waveform-chart__tooltip-time" }, wr = { class: "waveform-tooltip__series-content" }, Tr = { key: 0 }, Er = { class: "waveform-tooltip__value" }, Dr = { key: 0 }, Or = 12, kr = 8, Ar = 238, jr = 320, Mr = 20, Nr = 20, Pr = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2714
2742
|
__name: "WaveformTooltip",
|
|
2715
2743
|
props: {
|
|
2716
2744
|
visible: { type: Boolean },
|
|
@@ -2724,7 +2752,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2724
2752
|
setup(n) {
|
|
2725
2753
|
let s = n;
|
|
2726
2754
|
function c(e, t) {
|
|
2727
|
-
let n = Math.max(1, t -
|
|
2755
|
+
let n = Math.max(1, t - Mr - 14), r = Math.max(1, Math.floor(n / 7.2));
|
|
2728
2756
|
return Math.max(1, Math.ceil([...e].length / r));
|
|
2729
2757
|
}
|
|
2730
2758
|
function l(e) {
|
|
@@ -2733,18 +2761,18 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2733
2761
|
}
|
|
2734
2762
|
function u(e, t) {
|
|
2735
2763
|
let n = s.seriesPoints.reduce((t, n) => t + c(l(n), e), 0);
|
|
2736
|
-
return 16 +
|
|
2764
|
+
return 16 + Nr * (c(t, e) + n) + 5;
|
|
2737
2765
|
}
|
|
2738
2766
|
let d = t(() => {
|
|
2739
2767
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
2740
|
-
let e = s.position.x +
|
|
2768
|
+
let e = s.position.x + Or, t = s.position.x - Or - Ar, n = s.containerWidth - kr - e, r = s.position.x - Or - kr, i = Math.max(1, Math.min(jr, s.containerWidth - kr * 2)), a = e + Ar <= s.containerWidth - kr ? {
|
|
2741
2769
|
left: `${e}px`,
|
|
2742
|
-
maxWidth: `${Math.min(
|
|
2743
|
-
} : t >=
|
|
2744
|
-
right: `${s.containerWidth - s.position.x +
|
|
2745
|
-
maxWidth: `${Math.min(
|
|
2770
|
+
maxWidth: `${Math.min(jr, n)}px`
|
|
2771
|
+
} : t >= kr ? {
|
|
2772
|
+
right: `${s.containerWidth - s.position.x + Or}px`,
|
|
2773
|
+
maxWidth: `${Math.min(jr, r)}px`
|
|
2746
2774
|
} : {
|
|
2747
|
-
left: `${
|
|
2775
|
+
left: `${kr}px`,
|
|
2748
2776
|
maxWidth: `${i}px`
|
|
2749
2777
|
}, o = Number.parseFloat(a.maxWidth), c = `${s.timeUnit}: ${lt(s.hoveredPoint.x, s.timeUnit)}`;
|
|
2750
2778
|
return {
|
|
@@ -2760,12 +2788,12 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2760
2788
|
key: 0,
|
|
2761
2789
|
class: "waveform-tooltip waveform-chart__tooltip",
|
|
2762
2790
|
style: p(d.value)
|
|
2763
|
-
}, [a("span",
|
|
2791
|
+
}, [a("span", Cr, S(n.timeUnit) + ": " + S(w(lt)(n.hoveredPoint.x, n.timeUnit)), 1), (g(!0), i(e, null, y(n.seriesPoints, (e) => (g(), i("span", {
|
|
2764
2792
|
key: `${e.trackIndex}-${e.name}`,
|
|
2765
2793
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
2766
|
-
}, [a("i", { style: p({ backgroundColor: e.color }) }, null, 4), a("span",
|
|
2794
|
+
}, [a("i", { style: p({ backgroundColor: e.color }) }, null, 4), a("span", wr, [e.name ? (g(), i("strong", Tr, S(e.name) + ":", 1)) : r("", !0), a("span", Er, [o(S(w(rt)(e.point.y)) + S(e.unit ? ` ${e.unit}` : "") + " ", 1), f(e.point) ? (g(), i("small", Dr, S(f(e.point)), 1)) : r("", !0)])])]))), 128))], 4)) : r("", !0);
|
|
2767
2795
|
}
|
|
2768
|
-
}), [["__scopeId", "data-v-93daa641"]]),
|
|
2796
|
+
}), [["__scopeId", "data-v-93daa641"]]), Fr = /* @__PURE__ */ c({
|
|
2769
2797
|
__name: "WaveformHoverHost",
|
|
2770
2798
|
props: {
|
|
2771
2799
|
state: {},
|
|
@@ -2776,7 +2804,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2776
2804
|
},
|
|
2777
2805
|
setup(e) {
|
|
2778
2806
|
let r = e, i = t(() => r.state.points[0]?.point ?? null);
|
|
2779
|
-
return (t, r) => (g(), n(
|
|
2807
|
+
return (t, r) => (g(), n(Pr, {
|
|
2780
2808
|
visible: e.visible && i.value !== null,
|
|
2781
2809
|
position: e.state.position,
|
|
2782
2810
|
"time-unit": e.timeUnit,
|
|
@@ -2794,16 +2822,16 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2794
2822
|
"container-height"
|
|
2795
2823
|
]));
|
|
2796
2824
|
}
|
|
2797
|
-
}),
|
|
2825
|
+
}), Ir = 13, Lr = 2, Rr = 14, zr = 8, Br = 24, Vr = {
|
|
2798
2826
|
circle: U,
|
|
2799
|
-
square:
|
|
2800
|
-
triangle:
|
|
2827
|
+
square: te,
|
|
2828
|
+
triangle: ne,
|
|
2801
2829
|
diamond: ee
|
|
2802
2830
|
};
|
|
2803
|
-
function
|
|
2804
|
-
return e === "none" ? null : H().type(
|
|
2831
|
+
function Hr(e, t = 48) {
|
|
2832
|
+
return e === "none" ? null : H().type(Vr[e]).size(t)() ?? null;
|
|
2805
2833
|
}
|
|
2806
|
-
function
|
|
2834
|
+
function Ur(e, t, n = 48) {
|
|
2807
2835
|
if (e === "none" || t.length === 0) return null;
|
|
2808
2836
|
if (e === "circle") {
|
|
2809
2837
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -2820,24 +2848,24 @@ function zr(e, t, n = 48) {
|
|
|
2820
2848
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
2821
2849
|
return t.map(({ x: e, y: t }) => `M${e},${t - r}L${e + i},${t}L${e},${t + r}L${e - i},${t}Z`).join("");
|
|
2822
2850
|
}
|
|
2823
|
-
function
|
|
2851
|
+
function Wr(e) {
|
|
2824
2852
|
return e === "none" ? null : "M1 8H25";
|
|
2825
2853
|
}
|
|
2826
|
-
function
|
|
2854
|
+
function Gr(e) {
|
|
2827
2855
|
if (e === "dashed") return "8 5";
|
|
2828
2856
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
2829
2857
|
}
|
|
2830
|
-
function
|
|
2831
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
2858
|
+
function Kr(e) {
|
|
2859
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, Br) : zr) / 2, n = Ir - t, r = Ir + t;
|
|
2832
2860
|
return [
|
|
2833
|
-
`M${n} ${
|
|
2834
|
-
`M${
|
|
2835
|
-
`M${n} ${
|
|
2861
|
+
`M${n} ${Lr}H${r}`,
|
|
2862
|
+
`M${Ir} ${Lr}V${Rr}`,
|
|
2863
|
+
`M${n} ${Rr}H${r}`
|
|
2836
2864
|
].join("");
|
|
2837
2865
|
}
|
|
2838
2866
|
//#endregion
|
|
2839
2867
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
2840
|
-
var
|
|
2868
|
+
var qr = ["clip-path"], Jr = ["data-series-id", "data-series-name"], Yr = [
|
|
2841
2869
|
"data-series-id",
|
|
2842
2870
|
"data-series-name",
|
|
2843
2871
|
"data-y-axis-index",
|
|
@@ -2846,11 +2874,11 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2846
2874
|
"d",
|
|
2847
2875
|
"stroke",
|
|
2848
2876
|
"stroke-dasharray"
|
|
2849
|
-
],
|
|
2877
|
+
], Xr = ["data-series-id"], Zr = [
|
|
2850
2878
|
"d",
|
|
2851
2879
|
"stroke",
|
|
2852
2880
|
"stroke-width"
|
|
2853
|
-
],
|
|
2881
|
+
], Qr = ["data-series-id", "data-point-type"], $r = ["d", "fill"], ei = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2854
2882
|
__name: "WaveformSeriesLayer",
|
|
2855
2883
|
props: {
|
|
2856
2884
|
track: {},
|
|
@@ -2858,7 +2886,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2858
2886
|
},
|
|
2859
2887
|
setup(n) {
|
|
2860
2888
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
2861
|
-
let t =
|
|
2889
|
+
let t = Ur(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
2862
2890
|
x: a.track.xScale(t.x),
|
|
2863
2891
|
y: e.yScale(t.y)
|
|
2864
2892
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
@@ -2895,8 +2923,8 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2895
2923
|
"data-line-style": e.series.lineStyle,
|
|
2896
2924
|
d: e.path,
|
|
2897
2925
|
stroke: e.series.color,
|
|
2898
|
-
"stroke-dasharray": w(
|
|
2899
|
-
}, null, 8,
|
|
2926
|
+
"stroke-dasharray": w(Gr)(e.series.lineStyle)
|
|
2927
|
+
}, null, 8, Yr)) : r("", !0),
|
|
2900
2928
|
e.series.errorBar.visible ? (g(), i("g", {
|
|
2901
2929
|
key: 1,
|
|
2902
2930
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -2907,7 +2935,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2907
2935
|
d: e.errorBarPath,
|
|
2908
2936
|
stroke: e.series.errorBar.color || e.series.color,
|
|
2909
2937
|
"stroke-width": e.series.errorBar.width
|
|
2910
|
-
}, null, 8,
|
|
2938
|
+
}, null, 8, Zr)) : r("", !0)], 8, Xr)) : r("", !0),
|
|
2911
2939
|
e.series.pointType === "none" ? r("", !0) : (g(), i("g", {
|
|
2912
2940
|
key: 2,
|
|
2913
2941
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -2918,20 +2946,20 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2918
2946
|
class: "waveform-track__point waveform-chart__point",
|
|
2919
2947
|
d: e.pointPath,
|
|
2920
2948
|
fill: e.series.color
|
|
2921
|
-
}, null, 8,
|
|
2922
|
-
], 8,
|
|
2949
|
+
}, null, 8, $r)) : r("", !0)], 8, Qr))
|
|
2950
|
+
], 8, Jr))), 128))], 8, qr)) : r("", !0);
|
|
2923
2951
|
}
|
|
2924
|
-
}), [["__scopeId", "data-v-42a3fd47"]]),
|
|
2952
|
+
}), [["__scopeId", "data-v-42a3fd47"]]), ti = ["transform"], ni = ["transform"], ri = {
|
|
2925
2953
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
2926
2954
|
x: "0",
|
|
2927
2955
|
y: "7",
|
|
2928
2956
|
dy: "0.71em",
|
|
2929
2957
|
"text-anchor": "start"
|
|
2930
|
-
},
|
|
2958
|
+
}, ii = ["x"], ai = [
|
|
2931
2959
|
"data-y-axis-index",
|
|
2932
2960
|
"data-y-axis-side",
|
|
2933
2961
|
"transform"
|
|
2934
|
-
],
|
|
2962
|
+
], oi = { key: 2 }, si = ["x", "y"], ci = ["fill", "transform"], li = ["data-y-axis-title-index"], ui = ["x", "y"], di = ["fill", "transform"], fi = /* @__PURE__ */ c({
|
|
2935
2963
|
__name: "WaveformTrackAxes",
|
|
2936
2964
|
props: {
|
|
2937
2965
|
track: {},
|
|
@@ -2990,7 +3018,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2990
3018
|
ref: o,
|
|
2991
3019
|
class: f(["waveform-track__axis waveform-track__axis--x waveform-chart__axis waveform-chart__axis--x", { "waveform-track__axis--line-hidden": t.axes?.x?.lineVisible === !1 }]),
|
|
2992
3020
|
transform: `translate(0, ${t.track.height})`
|
|
2993
|
-
}, null, 10,
|
|
3021
|
+
}, null, 10, ti)) : r("", !0),
|
|
2994
3022
|
t.track.showXAxis ? (g(), i("g", {
|
|
2995
3023
|
key: 1,
|
|
2996
3024
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -2998,13 +3026,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2998
3026
|
"font-family": "sans-serif",
|
|
2999
3027
|
"font-size": "10",
|
|
3000
3028
|
"aria-hidden": "true"
|
|
3001
|
-
}, [a("text",
|
|
3029
|
+
}, [a("text", ri, S(t.track.endpointLabels.start), 1), a("text", {
|
|
3002
3030
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
3003
3031
|
x: t.track.width ?? t.innerWidth,
|
|
3004
3032
|
y: "7",
|
|
3005
3033
|
dy: "0.71em",
|
|
3006
3034
|
"text-anchor": "end"
|
|
3007
|
-
}, S(t.track.endpointLabels.end), 9,
|
|
3035
|
+
}, S(t.track.endpointLabels.end), 9, ii)], 8, ni)) : r("", !0),
|
|
3008
3036
|
(g(!0), i(e, null, y(t.track.isEmpty ? [] : t.track.yAxes, (e) => (g(), i("g", {
|
|
3009
3037
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
3010
3038
|
ref_for: !0,
|
|
@@ -3013,21 +3041,21 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3013
3041
|
"data-y-axis-index": e.index,
|
|
3014
3042
|
"data-y-axis-side": e.side,
|
|
3015
3043
|
transform: `translate(${e.x}, 0)`
|
|
3016
|
-
}, null, 10,
|
|
3017
|
-
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g",
|
|
3044
|
+
}, null, 10, ai))), 128)),
|
|
3045
|
+
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g", oi, [a("rect", {
|
|
3018
3046
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
3019
3047
|
x: t.track.yAxisLabelX - 12,
|
|
3020
3048
|
y: t.track.height / 2 - 40,
|
|
3021
3049
|
width: "24",
|
|
3022
3050
|
height: "80",
|
|
3023
3051
|
rx: "2"
|
|
3024
|
-
}, null, 8,
|
|
3052
|
+
}, null, 8, si), a("text", {
|
|
3025
3053
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3026
3054
|
fill: t.track.series.color,
|
|
3027
3055
|
transform: `translate(${t.track.yAxisLabelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3028
3056
|
"text-anchor": "middle",
|
|
3029
3057
|
"dominant-baseline": "central"
|
|
3030
|
-
}, S(c(t.track.series)), 9,
|
|
3058
|
+
}, S(c(t.track.series)), 9, ci)])) : r("", !0),
|
|
3031
3059
|
(g(!0), i(e, null, y(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (g(), i("g", {
|
|
3032
3060
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
3033
3061
|
class: "waveform-track__multi-axis-title",
|
|
@@ -3039,40 +3067,40 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3039
3067
|
width: "24",
|
|
3040
3068
|
height: "80",
|
|
3041
3069
|
rx: "2"
|
|
3042
|
-
}, null, 8,
|
|
3070
|
+
}, null, 8, ui), a("text", {
|
|
3043
3071
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3044
3072
|
fill: e.seriesList[0].color,
|
|
3045
3073
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3046
3074
|
"text-anchor": "middle",
|
|
3047
3075
|
"dominant-baseline": "central"
|
|
3048
|
-
}, S(c(e.seriesList[0])), 9,
|
|
3076
|
+
}, S(c(e.seriesList[0])), 9, di)], 8, li))), 128))
|
|
3049
3077
|
], 64));
|
|
3050
3078
|
}
|
|
3051
|
-
}),
|
|
3079
|
+
}), pi = [
|
|
3052
3080
|
"width",
|
|
3053
3081
|
"height",
|
|
3054
3082
|
"fill"
|
|
3055
|
-
],
|
|
3083
|
+
], mi = ["clip-path"], hi = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, gi = [
|
|
3056
3084
|
"stroke",
|
|
3057
3085
|
"x1",
|
|
3058
3086
|
"x2",
|
|
3059
3087
|
"y2"
|
|
3060
|
-
],
|
|
3088
|
+
], _i = [
|
|
3061
3089
|
"stroke",
|
|
3062
3090
|
"x2",
|
|
3063
3091
|
"y1",
|
|
3064
3092
|
"y2"
|
|
3065
|
-
],
|
|
3093
|
+
], vi = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, yi = [
|
|
3066
3094
|
"stroke",
|
|
3067
3095
|
"x1",
|
|
3068
3096
|
"x2",
|
|
3069
3097
|
"y2"
|
|
3070
|
-
],
|
|
3098
|
+
], bi = [
|
|
3071
3099
|
"stroke",
|
|
3072
3100
|
"x2",
|
|
3073
3101
|
"y1",
|
|
3074
3102
|
"y2"
|
|
3075
|
-
],
|
|
3103
|
+
], xi = ["clip-path"], Si = [
|
|
3076
3104
|
"data-y-axis-index",
|
|
3077
3105
|
"x2",
|
|
3078
3106
|
"y1",
|
|
@@ -3080,7 +3108,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3080
3108
|
"stroke",
|
|
3081
3109
|
"stroke-width",
|
|
3082
3110
|
"stroke-dasharray"
|
|
3083
|
-
],
|
|
3111
|
+
], Ci = ["x", "y"], wi = /* @__PURE__ */ c({
|
|
3084
3112
|
__name: "WaveformTrackBackdrop",
|
|
3085
3113
|
props: {
|
|
3086
3114
|
track: {},
|
|
@@ -3105,12 +3133,12 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3105
3133
|
height: t.track.height,
|
|
3106
3134
|
fill: t.frameStyle.backgroundColor,
|
|
3107
3135
|
"aria-hidden": "true"
|
|
3108
|
-
}, null, 8,
|
|
3136
|
+
}, null, 8, pi)) : r("", !0),
|
|
3109
3137
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (g(), i("g", {
|
|
3110
3138
|
key: 1,
|
|
3111
3139
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
3112
3140
|
"aria-hidden": "true"
|
|
3113
|
-
}, [a("g",
|
|
3141
|
+
}, [a("g", hi, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMinorTicks, (e) => (g(), i("line", {
|
|
3114
3142
|
key: `x-minor-${t.track.index}-${e}`,
|
|
3115
3143
|
"data-grid-direction": "vertical",
|
|
3116
3144
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3118,7 +3146,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3118
3146
|
x2: t.track.xScale(e),
|
|
3119
3147
|
y1: "0",
|
|
3120
3148
|
y2: t.track.height
|
|
3121
|
-
}, null, 8,
|
|
3149
|
+
}, null, 8, gi))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMinorTicks, (e) => (g(), i("line", {
|
|
3122
3150
|
key: `y-minor-${t.track.index}-${e}`,
|
|
3123
3151
|
"data-grid-direction": "horizontal",
|
|
3124
3152
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3126,7 +3154,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3126
3154
|
x2: t.track.width ?? t.innerWidth,
|
|
3127
3155
|
y1: t.track.yScale(e),
|
|
3128
3156
|
y2: t.track.yScale(e)
|
|
3129
|
-
}, null, 8,
|
|
3157
|
+
}, null, 8, _i))), 128)) : r("", !0)]), a("g", vi, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMajorTicks, (e) => (g(), i("line", {
|
|
3130
3158
|
key: `x-major-${t.track.index}-${e}`,
|
|
3131
3159
|
"data-grid-direction": "vertical",
|
|
3132
3160
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3134,7 +3162,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3134
3162
|
x2: t.track.xScale(e),
|
|
3135
3163
|
y1: "0",
|
|
3136
3164
|
y2: t.track.height
|
|
3137
|
-
}, null, 8,
|
|
3165
|
+
}, null, 8, yi))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMajorTicks, (e) => (g(), i("line", {
|
|
3138
3166
|
key: `y-major-${t.track.index}-${e}`,
|
|
3139
3167
|
"data-grid-direction": "horizontal",
|
|
3140
3168
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3142,7 +3170,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3142
3170
|
x2: t.track.width ?? t.innerWidth,
|
|
3143
3171
|
y1: t.track.yScale(e),
|
|
3144
3172
|
y2: t.track.yScale(e)
|
|
3145
|
-
}, null, 8,
|
|
3173
|
+
}, null, 8, bi))), 128)) : r("", !0)])], 8, mi)) : r("", !0),
|
|
3146
3174
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.zeroLine.visible && !t.cleanView ? (g(), i("g", {
|
|
3147
3175
|
key: 2,
|
|
3148
3176
|
class: "waveform-track__zero-lines waveform-chart__zero-lines",
|
|
@@ -3159,7 +3187,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3159
3187
|
stroke: t.zeroLine.color,
|
|
3160
3188
|
"stroke-width": t.zeroLine.width,
|
|
3161
3189
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
3162
|
-
}, null, 8,
|
|
3190
|
+
}, null, 8, Si))], 64))), 128))], 8, xi)) : r("", !0),
|
|
3163
3191
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (g(), i("text", {
|
|
3164
3192
|
key: 3,
|
|
3165
3193
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -3169,10 +3197,10 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3169
3197
|
"text-anchor": "middle",
|
|
3170
3198
|
"dominant-baseline": "central",
|
|
3171
3199
|
"aria-hidden": "true"
|
|
3172
|
-
}, S(t.frameNumber), 13,
|
|
3200
|
+
}, S(t.frameNumber), 13, Ci)) : r("", !0)
|
|
3173
3201
|
], 64));
|
|
3174
3202
|
}
|
|
3175
|
-
}),
|
|
3203
|
+
}), Ti = [
|
|
3176
3204
|
"data-track-index",
|
|
3177
3205
|
"data-track-empty",
|
|
3178
3206
|
"data-track-left",
|
|
@@ -3181,19 +3209,19 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3181
3209
|
"data-track-top",
|
|
3182
3210
|
"data-track-height",
|
|
3183
3211
|
"transform"
|
|
3184
|
-
],
|
|
3212
|
+
], Ei = [
|
|
3185
3213
|
"width",
|
|
3186
3214
|
"height",
|
|
3187
3215
|
"stroke",
|
|
3188
3216
|
"stroke-width",
|
|
3189
3217
|
"stroke-dasharray",
|
|
3190
3218
|
"stroke-linecap"
|
|
3191
|
-
],
|
|
3219
|
+
], Di = [
|
|
3192
3220
|
"data-interactive",
|
|
3193
3221
|
"data-independent-overlay-index",
|
|
3194
3222
|
"width",
|
|
3195
3223
|
"height"
|
|
3196
|
-
],
|
|
3224
|
+
], Oi = ["x", "y"], ki = /* @__PURE__ */ c({
|
|
3197
3225
|
__name: "WaveformTrack",
|
|
3198
3226
|
props: {
|
|
3199
3227
|
track: {},
|
|
@@ -3252,7 +3280,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3252
3280
|
"data-track-height": e.track.height,
|
|
3253
3281
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
3254
3282
|
}, [
|
|
3255
|
-
s(
|
|
3283
|
+
s(wi, {
|
|
3256
3284
|
track: e.track,
|
|
3257
3285
|
"clip-path-id": e.clipPathId,
|
|
3258
3286
|
"inner-width": e.innerWidth,
|
|
@@ -3269,7 +3297,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3269
3297
|
"frame-style",
|
|
3270
3298
|
"zero-line"
|
|
3271
3299
|
]),
|
|
3272
|
-
s(
|
|
3300
|
+
s(fi, {
|
|
3273
3301
|
track: e.track,
|
|
3274
3302
|
"inner-width": e.innerWidth,
|
|
3275
3303
|
"clean-view": e.cleanView,
|
|
@@ -3295,8 +3323,8 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3295
3323
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
3296
3324
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
3297
3325
|
"aria-hidden": "true"
|
|
3298
|
-
}, null, 8,
|
|
3299
|
-
s(
|
|
3326
|
+
}, null, 8, Ei)),
|
|
3327
|
+
s(ei, {
|
|
3300
3328
|
track: e.track,
|
|
3301
3329
|
"clip-path-id": e.clipPathId
|
|
3302
3330
|
}, null, 8, ["track", "clip-path-id"]),
|
|
@@ -3318,7 +3346,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3318
3346
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
3319
3347
|
onClick: n[5] ||= (e) => o("click", e),
|
|
3320
3348
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
3321
|
-
}, null, 42,
|
|
3349
|
+
}, null, 42, Di)) : r("", !0),
|
|
3322
3350
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (g(), i("text", {
|
|
3323
3351
|
key: 2,
|
|
3324
3352
|
class: "waveform-track__no-visible-series",
|
|
@@ -3326,33 +3354,33 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3326
3354
|
y: e.track.height / 2,
|
|
3327
3355
|
"text-anchor": "middle",
|
|
3328
3356
|
"dominant-baseline": "central"
|
|
3329
|
-
}, " 暂无可见曲线 ", 8,
|
|
3330
|
-
], 10,
|
|
3357
|
+
}, " 暂无可见曲线 ", 8, Oi)) : r("", !0)
|
|
3358
|
+
], 10, Ti));
|
|
3331
3359
|
}
|
|
3332
|
-
}),
|
|
3360
|
+
}), Ai = [
|
|
3333
3361
|
"width",
|
|
3334
3362
|
"height",
|
|
3335
3363
|
"data-position",
|
|
3336
3364
|
"data-orientation"
|
|
3337
|
-
],
|
|
3365
|
+
], ji = [
|
|
3338
3366
|
"disabled",
|
|
3339
3367
|
"aria-pressed",
|
|
3340
3368
|
"aria-label",
|
|
3341
3369
|
"onClick"
|
|
3342
|
-
],
|
|
3370
|
+
], Mi = [
|
|
3343
3371
|
"data-line-type",
|
|
3344
3372
|
"data-line-style",
|
|
3345
3373
|
"data-point-type",
|
|
3346
3374
|
"data-error-bar-visible"
|
|
3347
|
-
],
|
|
3375
|
+
], Ni = [
|
|
3348
3376
|
"d",
|
|
3349
3377
|
"stroke",
|
|
3350
3378
|
"stroke-dasharray"
|
|
3351
|
-
],
|
|
3379
|
+
], Pi = [
|
|
3352
3380
|
"d",
|
|
3353
3381
|
"stroke",
|
|
3354
3382
|
"stroke-width"
|
|
3355
|
-
],
|
|
3383
|
+
], Fi = ["d", "fill"], Ii = ["title"], Li = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
3356
3384
|
__name: "WaveformLegend",
|
|
3357
3385
|
props: {
|
|
3358
3386
|
series: {},
|
|
@@ -3410,45 +3438,45 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3410
3438
|
"data-point-type": e.pointType,
|
|
3411
3439
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
3412
3440
|
}, [
|
|
3413
|
-
w(
|
|
3441
|
+
w(Wr)(e.lineType) ? (g(), i("path", {
|
|
3414
3442
|
key: 0,
|
|
3415
3443
|
class: "waveform-legend__line",
|
|
3416
|
-
d: w(
|
|
3444
|
+
d: w(Wr)(e.lineType) ?? void 0,
|
|
3417
3445
|
stroke: e.color,
|
|
3418
|
-
"stroke-dasharray": w(
|
|
3446
|
+
"stroke-dasharray": w(Gr)(e.lineStyle),
|
|
3419
3447
|
"stroke-width": "1.5",
|
|
3420
3448
|
fill: "none"
|
|
3421
|
-
}, null, 8,
|
|
3449
|
+
}, null, 8, Ni)) : r("", !0),
|
|
3422
3450
|
e.errorBar.visible ? (g(), i("path", {
|
|
3423
3451
|
key: 1,
|
|
3424
3452
|
class: "waveform-legend__error-bar",
|
|
3425
|
-
d: w(
|
|
3453
|
+
d: w(Kr)(e.errorBar.capWidth),
|
|
3426
3454
|
stroke: e.errorBar.color || e.color,
|
|
3427
3455
|
"stroke-width": e.errorBar.width,
|
|
3428
3456
|
"stroke-linecap": "butt",
|
|
3429
3457
|
fill: "none"
|
|
3430
|
-
}, null, 8,
|
|
3458
|
+
}, null, 8, Pi)) : r("", !0),
|
|
3431
3459
|
e.pointType === "none" ? r("", !0) : (g(), i("path", {
|
|
3432
3460
|
key: 2,
|
|
3433
3461
|
class: "waveform-legend__point",
|
|
3434
|
-
d: w(
|
|
3462
|
+
d: w(Hr)(e.pointType, 30) ?? void 0,
|
|
3435
3463
|
fill: e.color,
|
|
3436
3464
|
transform: "translate(13 8)"
|
|
3437
|
-
}, null, 8,
|
|
3438
|
-
], 8,
|
|
3465
|
+
}, null, 8, Fi))
|
|
3466
|
+
], 8, Mi)), a("span", {
|
|
3439
3467
|
class: "waveform-legend__label",
|
|
3440
3468
|
title: e.name
|
|
3441
|
-
}, S(e.name), 9,
|
|
3469
|
+
}, S(e.name), 9, Ii)], 10, ji))), 128))], 6)], 2)], 8, Ai));
|
|
3442
3470
|
}
|
|
3443
|
-
}), [["__scopeId", "data-v-2ae12e71"]]),
|
|
3471
|
+
}), [["__scopeId", "data-v-2ae12e71"]]), Ri = {
|
|
3444
3472
|
class: "waveform-chart__hover-layer",
|
|
3445
3473
|
"pointer-events": "none",
|
|
3446
3474
|
"aria-hidden": "true"
|
|
3447
|
-
},
|
|
3475
|
+
}, zi = ["clip-path", "transform"], Bi = [
|
|
3448
3476
|
"x1",
|
|
3449
3477
|
"x2",
|
|
3450
3478
|
"y2"
|
|
3451
|
-
],
|
|
3479
|
+
], Vi = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
3452
3480
|
__name: "WaveformHoverLayer",
|
|
3453
3481
|
props: {
|
|
3454
3482
|
state: {},
|
|
@@ -3471,7 +3499,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3471
3499
|
}] : [];
|
|
3472
3500
|
});
|
|
3473
3501
|
});
|
|
3474
|
-
return (t, r) => (g(), i("g",
|
|
3502
|
+
return (t, r) => (g(), i("g", Ri, [(g(!0), i(e, null, y(o.value, (e) => (g(), i("g", {
|
|
3475
3503
|
key: e.track.index,
|
|
3476
3504
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
3477
3505
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -3481,9 +3509,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3481
3509
|
x2: e.x,
|
|
3482
3510
|
y1: "0",
|
|
3483
3511
|
y2: e.track.height
|
|
3484
|
-
}, null, 8,
|
|
3512
|
+
}, null, 8, Bi)], 8, zi))), 128))]));
|
|
3485
3513
|
}
|
|
3486
|
-
}), [["__scopeId", "data-v-a6f82099"]]),
|
|
3514
|
+
}), [["__scopeId", "data-v-a6f82099"]]), Hi = [
|
|
3487
3515
|
"data-display-mode",
|
|
3488
3516
|
"data-interaction-mode",
|
|
3489
3517
|
"data-presentation-mode",
|
|
@@ -3492,35 +3520,35 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3492
3520
|
"data-plot-margin-top",
|
|
3493
3521
|
"data-plot-margin-bottom",
|
|
3494
3522
|
"data-title-area-height"
|
|
3495
|
-
],
|
|
3523
|
+
], Ui = [
|
|
3496
3524
|
"role",
|
|
3497
3525
|
"aria-level",
|
|
3498
3526
|
"aria-hidden"
|
|
3499
|
-
],
|
|
3527
|
+
], Wi = ["data-title-scale", "data-title-wrapped"], Gi = [
|
|
3500
3528
|
"width",
|
|
3501
3529
|
"height",
|
|
3502
3530
|
"aria-label"
|
|
3503
|
-
],
|
|
3531
|
+
], Ki = ["id"], qi = ["width", "height"], Ji = ["transform"], Yi = {
|
|
3504
3532
|
key: 0,
|
|
3505
3533
|
class: "waveform-chart__grid-slots",
|
|
3506
3534
|
"aria-hidden": "true"
|
|
3507
|
-
},
|
|
3535
|
+
}, Xi = ["transform"], Zi = ["width", "height"], Qi = ["width", "height"], $i = [
|
|
3508
3536
|
"x",
|
|
3509
3537
|
"y",
|
|
3510
3538
|
"width",
|
|
3511
3539
|
"height"
|
|
3512
|
-
],
|
|
3540
|
+
], ea = {
|
|
3513
3541
|
key: 4,
|
|
3514
3542
|
class: "waveform-chart__legend-layer"
|
|
3515
|
-
},
|
|
3543
|
+
}, ta = [
|
|
3516
3544
|
"data-legend-track-index",
|
|
3517
3545
|
"data-legend-track-id",
|
|
3518
3546
|
"transform"
|
|
3519
|
-
],
|
|
3547
|
+
], na = ["x", "y"], ra = ["x", "y"], ia = /* @__PURE__ */ c({
|
|
3520
3548
|
__name: "WaveformChartView",
|
|
3521
3549
|
props: { controller: {} },
|
|
3522
3550
|
setup(t) {
|
|
3523
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth:
|
|
3551
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: W, beginSharedViewportDrag: G, finishViewportDrag: re, cancelViewportDrag: K, handlePointerLeave: ae, handleAnnotationClick: oe, handleAnnotationContextMenu: se, resolveFrameNumber: ce, frameStyle: le, axes: ue, resolvedZeroLine: de, timeUnit: fe, yLabel: q, handleIndependentPointerMove: pe, beginViewportDrag: me, hoverState: J, showTooltip: he, selectionBox: Y, renderedAnnotations: ge, annotationsVisible: _e, handleExistingAnnotationContextMenu: ve, beginAnnotationDrag: X, handleAnnotationMove: ye, endAnnotationDrag: be, resolveLegendPosition: Z, resolveLegendOrientation: xe, legendBackgroundColor: Se, legendInteractive: Ce, resolvedHiddenSeriesIds: we, toggleSeriesVisibility: Te, resolvedXLabel: Ee, xAxisTitleY: De, hasChartArea: Oe, gridOptions: ke, pageCount: Ae, currentPage: je, getPageSize: Pe, chartTracks: Q, goToPage: Fe, annotationInteraction: Ie, editorDraft: Le, contextMenu: Re, editorSeries: ze, editorSeriesOptions: Be, confirmAnnotation: Ve, cancelAnnotation: He, changeDraftSeries: Ue, editContextAnnotation: We, deleteContextAnnotation: Ge, chartHeight: $, setContainer: Ke, setSvgElement: qe, setTitleMeasureElement: Je, setSharedOverlayElement: Ye } = C(t.controller);
|
|
3524
3552
|
return (t, C) => (g(), i("div", {
|
|
3525
3553
|
ref: w(Ke),
|
|
3526
3554
|
class: f(["waveform-chart", [
|
|
@@ -3566,7 +3594,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3566
3594
|
style: p(w(M)),
|
|
3567
3595
|
"data-title-scale": w(N).scale,
|
|
3568
3596
|
"data-title-wrapped": w(N).wrapped || void 0
|
|
3569
|
-
}, S(w(A)), 13,
|
|
3597
|
+
}, S(w(A)), 13, Wi)], 4)) : r("", !0)], 12, Ui)) : r("", !0),
|
|
3570
3598
|
(g(), i("svg", {
|
|
3571
3599
|
ref: w(qe),
|
|
3572
3600
|
class: "waveform-chart__svg",
|
|
@@ -3583,9 +3611,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3583
3611
|
}, [a("rect", {
|
|
3584
3612
|
width: e.width,
|
|
3585
3613
|
height: e.height
|
|
3586
|
-
}, null, 8,
|
|
3614
|
+
}, null, 8, qi)], 8, Ki))), 128))]),
|
|
3587
3615
|
a("g", { transform: `translate(${w(_)}, ${w(B)})` }, [
|
|
3588
|
-
w(o) !== "compact" && !w(l) ? (g(), i("g",
|
|
3616
|
+
w(o) !== "compact" && !w(l) ? (g(), i("g", Yi, [(g(!0), i(e, null, y(w(V), (e) => (g(), i("g", {
|
|
3589
3617
|
key: `grid-slot-${e.slotIndex}`,
|
|
3590
3618
|
transform: `translate(${e.left}, ${e.top})`
|
|
3591
3619
|
}, [e.series ? r("", !0) : (g(), i("rect", {
|
|
@@ -3593,7 +3621,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3593
3621
|
class: "waveform-chart__grid-slot-placeholder",
|
|
3594
3622
|
width: e.width,
|
|
3595
3623
|
height: e.cellHeight
|
|
3596
|
-
}, null, 8,
|
|
3624
|
+
}, null, 8, Zi))], 8, Xi))), 128))])) : r("", !0),
|
|
3597
3625
|
w(o) !== "independent" && w(R).length && w(H) ? (g(), i("rect", {
|
|
3598
3626
|
key: 1,
|
|
3599
3627
|
ref: w(Ye),
|
|
@@ -3601,39 +3629,39 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3601
3629
|
"is-zoomable": !w(u) && w(U) && w(ee),
|
|
3602
3630
|
"is-annotating": !w(u) && w(c) === "annotation"
|
|
3603
3631
|
}]),
|
|
3604
|
-
width: w(
|
|
3605
|
-
height: w(
|
|
3606
|
-
onPointermove: C[0] ||= (...e) => w(
|
|
3607
|
-
onPointerdown: C[1] ||= (...e) => w(
|
|
3608
|
-
onPointerup: C[2] ||= (...e) => w(
|
|
3609
|
-
onPointercancel: C[3] ||= (...e) => w(
|
|
3610
|
-
onPointerleave: C[4] ||= (...e) => w(
|
|
3611
|
-
onClick: C[5] ||= (...e) => w(
|
|
3612
|
-
onContextmenu: C[6] ||= (...e) => w(
|
|
3613
|
-
}, null, 42,
|
|
3614
|
-
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(
|
|
3632
|
+
width: w(te),
|
|
3633
|
+
height: w(ne),
|
|
3634
|
+
onPointermove: C[0] ||= (...e) => w(W) && w(W)(...e),
|
|
3635
|
+
onPointerdown: C[1] ||= (...e) => w(G) && w(G)(...e),
|
|
3636
|
+
onPointerup: C[2] ||= (...e) => w(re) && w(re)(...e),
|
|
3637
|
+
onPointercancel: C[3] ||= (...e) => w(K) && w(K)(...e),
|
|
3638
|
+
onPointerleave: C[4] ||= (...e) => w(ae) && w(ae)(...e),
|
|
3639
|
+
onClick: C[5] ||= (...e) => w(oe) && w(oe)(...e),
|
|
3640
|
+
onContextmenu: C[6] ||= (...e) => w(se) && w(se)(...e)
|
|
3641
|
+
}, null, 42, Qi)) : r("", !0),
|
|
3642
|
+
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(ki), {
|
|
3615
3643
|
key: `${e.index}-${e.series.name}`,
|
|
3616
3644
|
track: e,
|
|
3617
3645
|
"clip-path-id": w(z),
|
|
3618
|
-
"inner-width": w(
|
|
3646
|
+
"inner-width": w(te),
|
|
3619
3647
|
zoomable: w(U),
|
|
3620
3648
|
interactive: !w(u),
|
|
3621
3649
|
"display-mode": w(o),
|
|
3622
3650
|
"interaction-mode": w(c),
|
|
3623
|
-
"frame-number": w(
|
|
3624
|
-
"frame-style": w(
|
|
3625
|
-
axes: w(
|
|
3651
|
+
"frame-number": w(ce)(e.index),
|
|
3652
|
+
"frame-style": w(le),
|
|
3653
|
+
axes: w(ue),
|
|
3626
3654
|
"clean-view": w(l),
|
|
3627
|
-
"zero-line": w(
|
|
3628
|
-
"time-unit": w(
|
|
3629
|
-
"y-label": w(
|
|
3630
|
-
onPointerMove: (t) => w(
|
|
3631
|
-
onPointerDown: (t) => w(
|
|
3632
|
-
onPointerUp: w(
|
|
3633
|
-
onPointerCancel: w(
|
|
3634
|
-
onPointerLeave: w(
|
|
3635
|
-
onClick: (t) => w(
|
|
3636
|
-
onContextmenu: (t) => w(
|
|
3655
|
+
"zero-line": w(de),
|
|
3656
|
+
"time-unit": w(fe),
|
|
3657
|
+
"y-label": w(q),
|
|
3658
|
+
onPointerMove: (t) => w(pe)(t, e.index),
|
|
3659
|
+
onPointerDown: (t) => w(me)(t, e.index, !0),
|
|
3660
|
+
onPointerUp: w(re),
|
|
3661
|
+
onPointerCancel: w(K),
|
|
3662
|
+
onPointerLeave: w(ae),
|
|
3663
|
+
onClick: (t) => w(oe)(t, e.index),
|
|
3664
|
+
onContextmenu: (t) => w(se)(t, e.index)
|
|
3637
3665
|
}, null, 8, [
|
|
3638
3666
|
"track",
|
|
3639
3667
|
"clip-path-id",
|
|
@@ -3657,26 +3685,26 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3657
3685
|
"onClick",
|
|
3658
3686
|
"onContextmenu"
|
|
3659
3687
|
]))), 128)),
|
|
3660
|
-
s(w(
|
|
3661
|
-
state: w(
|
|
3688
|
+
s(w(Vi), {
|
|
3689
|
+
state: w(J),
|
|
3662
3690
|
tracks: w(R),
|
|
3663
3691
|
"clip-path-id": w(z),
|
|
3664
|
-
visible: w(
|
|
3692
|
+
visible: w(he) && !w(u)
|
|
3665
3693
|
}, null, 8, [
|
|
3666
3694
|
"state",
|
|
3667
3695
|
"tracks",
|
|
3668
3696
|
"clip-path-id",
|
|
3669
3697
|
"visible"
|
|
3670
3698
|
]),
|
|
3671
|
-
w(
|
|
3699
|
+
w(Y) && w(d)?.kind === "box" ? (g(), i("rect", {
|
|
3672
3700
|
key: 2,
|
|
3673
3701
|
class: "waveform-chart__zoom-selection",
|
|
3674
|
-
x: w(
|
|
3675
|
-
y: w(
|
|
3676
|
-
width: w(
|
|
3677
|
-
height: w(
|
|
3702
|
+
x: w(Y).x,
|
|
3703
|
+
y: w(Y).y,
|
|
3704
|
+
width: w(Y).width,
|
|
3705
|
+
height: w(Y).height,
|
|
3678
3706
|
"aria-hidden": "true"
|
|
3679
|
-
}, null, 8,
|
|
3707
|
+
}, null, 8, $i)) : r("", !0),
|
|
3680
3708
|
w(l) ? r("", !0) : (g(), n(w(Me), {
|
|
3681
3709
|
key: 3,
|
|
3682
3710
|
annotations: w(ge),
|
|
@@ -3695,13 +3723,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3695
3723
|
"onMove",
|
|
3696
3724
|
"onDragEnd"
|
|
3697
3725
|
])),
|
|
3698
|
-
w(l) ? r("", !0) : (g(), i("g",
|
|
3726
|
+
w(l) ? r("", !0) : (g(), i("g", ea, [(g(!0), i(e, null, y(w(R), (e) => (g(), i("g", {
|
|
3699
3727
|
key: `legend-${e.index}-${e.series.name}`,
|
|
3700
3728
|
class: "waveform-chart__legend-track",
|
|
3701
3729
|
"data-legend-track-index": e.index,
|
|
3702
3730
|
"data-legend-track-id": e.id,
|
|
3703
3731
|
transform: `translate(${e.left}, ${e.top})`
|
|
3704
|
-
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(
|
|
3732
|
+
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(Li), {
|
|
3705
3733
|
key: 0,
|
|
3706
3734
|
series: e.legendSeries,
|
|
3707
3735
|
position: w(Z)(e.id),
|
|
@@ -3709,7 +3737,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3709
3737
|
"background-color": w(Se),
|
|
3710
3738
|
interactive: w(Ce),
|
|
3711
3739
|
"hidden-series-ids": w(we),
|
|
3712
|
-
width: e.width ?? w(
|
|
3740
|
+
width: e.width ?? w(te),
|
|
3713
3741
|
height: e.height,
|
|
3714
3742
|
onToggle: w(Te)
|
|
3715
3743
|
}, null, 8, [
|
|
@@ -3722,24 +3750,24 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3722
3750
|
"width",
|
|
3723
3751
|
"height",
|
|
3724
3752
|
"onToggle"
|
|
3725
|
-
])) : r("", !0)], 8,
|
|
3726
|
-
], 8,
|
|
3753
|
+
])) : r("", !0)], 8, ta))), 128))]))
|
|
3754
|
+
], 8, Ji),
|
|
3727
3755
|
w(Ee) && !w(l) ? (g(), i("text", {
|
|
3728
3756
|
key: 0,
|
|
3729
3757
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
3730
|
-
x: w(_) + w(
|
|
3758
|
+
x: w(_) + w(te) / 2,
|
|
3731
3759
|
y: w(De),
|
|
3732
3760
|
"text-anchor": "middle"
|
|
3733
|
-
}, S(w(Ee)), 9,
|
|
3761
|
+
}, S(w(Ee)), 9, na)) : r("", !0),
|
|
3734
3762
|
w(Oe) && !w(I) ? (g(), i("text", {
|
|
3735
3763
|
key: 1,
|
|
3736
3764
|
class: "waveform-chart__empty",
|
|
3737
3765
|
x: w(P) / 2,
|
|
3738
3766
|
y: w(F) / 2,
|
|
3739
3767
|
"text-anchor": "middle"
|
|
3740
|
-
}, " 暂无有效波形数据 ", 8,
|
|
3741
|
-
], 40,
|
|
3742
|
-
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(
|
|
3768
|
+
}, " 暂无有效波形数据 ", 8, ra)) : r("", !0)
|
|
3769
|
+
], 40, Gi)),
|
|
3770
|
+
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(ie), {
|
|
3743
3771
|
key: 1,
|
|
3744
3772
|
class: "waveform-chart__pagination",
|
|
3745
3773
|
"aria-label": "波形分页",
|
|
@@ -3755,13 +3783,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3755
3783
|
"total",
|
|
3756
3784
|
"onChange"
|
|
3757
3785
|
])) : r("", !0),
|
|
3758
|
-
w(Le) && !w(l) && !w(u) ? (g(), n(
|
|
3786
|
+
w(Le) && !w(l) && !w(u) ? (g(), n(Sr, {
|
|
3759
3787
|
key: 2,
|
|
3760
3788
|
annotation: w(Le).annotation,
|
|
3761
3789
|
mode: w(Le).mode,
|
|
3762
3790
|
series: w(ze),
|
|
3763
3791
|
"series-options": w(Be),
|
|
3764
|
-
"time-unit": w(
|
|
3792
|
+
"time-unit": w(fe),
|
|
3765
3793
|
onConfirm: w(Ve),
|
|
3766
3794
|
onCancel: w(He),
|
|
3767
3795
|
onSeriesChange: w(Ue)
|
|
@@ -3793,10 +3821,10 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3793
3821
|
"onDelete",
|
|
3794
3822
|
"onClose"
|
|
3795
3823
|
])) : r("", !0),
|
|
3796
|
-
s(w(
|
|
3797
|
-
state: w(
|
|
3798
|
-
visible: w(
|
|
3799
|
-
"time-unit": w(
|
|
3824
|
+
s(w(Fr), {
|
|
3825
|
+
state: w(J),
|
|
3826
|
+
visible: w(he) && !w(u),
|
|
3827
|
+
"time-unit": w(fe),
|
|
3800
3828
|
"container-width": w(P),
|
|
3801
3829
|
"container-height": w($)
|
|
3802
3830
|
}, null, 8, [
|
|
@@ -3806,9 +3834,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3806
3834
|
"container-width",
|
|
3807
3835
|
"container-height"
|
|
3808
3836
|
])
|
|
3809
|
-
], 46,
|
|
3837
|
+
], 46, Hi));
|
|
3810
3838
|
}
|
|
3811
|
-
}),
|
|
3839
|
+
}), aa = /* @__PURE__ */ c({
|
|
3812
3840
|
__name: "WaveformChart",
|
|
3813
3841
|
props: {
|
|
3814
3842
|
data: {},
|
|
@@ -3835,6 +3863,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3835
3863
|
minVisiblePoints: { default: 0 },
|
|
3836
3864
|
initialXDomain: {},
|
|
3837
3865
|
initialXDomains: {},
|
|
3866
|
+
xDomainStrategy: { default: () => ({ type: "data" }) },
|
|
3838
3867
|
yDomain: {},
|
|
3839
3868
|
yDomains: {},
|
|
3840
3869
|
timeUnit: { default: "ms" },
|
|
@@ -3885,9 +3914,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3885
3914
|
"page-change"
|
|
3886
3915
|
],
|
|
3887
3916
|
setup(e, { expose: t, emit: r }) {
|
|
3888
|
-
let i =
|
|
3889
|
-
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(
|
|
3917
|
+
let i = nr(e, r);
|
|
3918
|
+
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(ia, { controller: w(i) }, null, 8, ["controller"]));
|
|
3890
3919
|
}
|
|
3891
3920
|
});
|
|
3892
3921
|
//#endregion
|
|
3893
|
-
export { Rt as DEFAULT_WAVEFORM_RENDERING_OPTIONS,
|
|
3922
|
+
export { Rt as DEFAULT_WAVEFORM_RENDERING_OPTIONS, aa as WaveformChart, Ke as buildMinorTicks, ft as clamp, at as displayTime, ct as formatAxisTime, st as formatEndpointTime, lt as formatTooltipTime, jt as normalizeWaveformData, Mt as normalizeWaveformSeries, $ as paddedDomain, We as parseWaveformAnnotations, dt as resolveTrackGeometry, zt as resolveWaveformRenderingOptions, Gt as selectRenderablePoints, Ue as serializeWaveformAnnotations };
|