waveform-analysis 0.1.26 → 0.1.27
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 +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +491 -487
- package/package.json +1 -1
- package/src/components/core/trackLayoutBuilder.ts +1 -0
- package/src/components/interaction/useWaveformZoom.ts +12 -8
- package/src/components/waveformChartCases/layoutAndDomains.test.ts +4 -2
- package/src/components/waveformChartCases/presentationMode.test.ts +1 -1
- package/src/components/waveformChartCases/viewportBoxAndPan.test.ts +15 -0
- package/src/components/waveformChartCases/viewportConstraintsAndReset.test.ts +51 -3
- package/src/components/waveformChartCases/wheelZoomOut.test.ts +114 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 ee, symbolDiamond as te, symbolSquare as ne, symbolTriangle as re, zoom as ie, zoomIdentity as U } from "d3";
|
|
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 ee, symbolDiamond as te, symbolSquare as ne, symbolTriangle as re, zoom as ie, zoomIdentity as U, zoomTransform as W } from "d3";
|
|
3
3
|
import { Pagination as ae } from "ant-design-vue";
|
|
4
|
-
import { ColorPicker as
|
|
4
|
+
import { ColorPicker as G } from "vue3-colorpicker";
|
|
5
5
|
import "vue3-colorpicker/style.css";
|
|
6
6
|
//#region src/utils/waveformId.ts
|
|
7
7
|
var oe = 0;
|
|
@@ -25,7 +25,7 @@ function le(e, t, n) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
function ue(e, t, n, r, i, a, o) {
|
|
28
|
-
let s =
|
|
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
31
|
function de(e, t, n, r, i, a) {
|
|
@@ -41,7 +41,7 @@ function de(e, t, n, r, i, a) {
|
|
|
41
41
|
]) if (ue(e, t, n, r, o, i, a)) return o;
|
|
42
42
|
return "top";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function K(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 fe(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 {
|
|
@@ -95,19 +95,19 @@ function G(e, t, n, r, i) {
|
|
|
95
95
|
}
|
|
96
96
|
function pe(e, t, n) {
|
|
97
97
|
return {
|
|
98
|
-
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(
|
|
98
|
+
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(X), 0)) + 16))),
|
|
99
99
|
height: Math.min(n, Math.max(26, (e.length - 1) * 16 + 14 + 16))
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
function me(e, t, n, r, i, a, o = 0, s = 0) {
|
|
103
|
-
let { width: c, height: l } = pe(n, r, i), u =
|
|
103
|
+
let { width: c, height: l } = pe(n, r, i), u = fe(e, t, c, l, a), d = le({
|
|
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 = K(d, e, t);
|
|
111
111
|
return {
|
|
112
112
|
...d,
|
|
113
113
|
lineEndX: f.x,
|
|
@@ -137,28 +137,28 @@ function he(e, t, n, r) {
|
|
|
137
137
|
placement: y,
|
|
138
138
|
lines: c,
|
|
139
139
|
box: { ...x },
|
|
140
|
-
style:
|
|
140
|
+
style: xe(e.style)
|
|
141
141
|
});
|
|
142
142
|
}), i;
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/components/annotation/markup.ts
|
|
146
|
-
var
|
|
146
|
+
var ge = {
|
|
147
147
|
borderColor: "#1677ff",
|
|
148
148
|
textColor: "#333333",
|
|
149
149
|
backgroundColor: "rgba(255, 255, 255, 0.92)"
|
|
150
|
-
},
|
|
151
|
-
function
|
|
150
|
+
}, q = "12px Arial, sans-serif", _e = N((e) => e.x);
|
|
151
|
+
function ve(e, t) {
|
|
152
152
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
153
|
-
let n =
|
|
153
|
+
let n = _e.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
|
-
function
|
|
156
|
+
function ye(e, t, n = "linear") {
|
|
157
157
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
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 = _e.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
|
|
@@ -188,18 +188,18 @@ function ve(e, t, n = "linear") {
|
|
|
188
188
|
y: s.y + (o.y - s.y) * l
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function J(e, t, n, r) {
|
|
192
192
|
return e.flatMap((e) => {
|
|
193
|
-
let i =
|
|
193
|
+
let i = ye(e.series.points, t, e.series.lineType);
|
|
194
194
|
if (!i) return [];
|
|
195
|
-
let a =
|
|
195
|
+
let a = ve(e.series.points, t);
|
|
196
196
|
if (!a) return [];
|
|
197
197
|
let o = e.xScale(i.x), s = e.top + e.yScale(i.y), c = e.xScale(a.x), l = e.top + e.yScale(a.y);
|
|
198
198
|
return [{
|
|
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 || ge.borderColor,
|
|
203
203
|
unit: e.series.unit,
|
|
204
204
|
point: a,
|
|
205
205
|
screenX: c,
|
|
@@ -208,18 +208,18 @@ function ye(e, t, n, r) {
|
|
|
208
208
|
}];
|
|
209
209
|
}).sort((e, t) => e.distance - t.distance || e.trackIndex - t.trackIndex);
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var Y;
|
|
212
212
|
function be(e) {
|
|
213
213
|
return Array.from(e).reduce((e, t) => e + (t.codePointAt(0) > 255 ? 12 : 6.7), 0);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
return
|
|
215
|
+
function X(e) {
|
|
216
|
+
return Y === void 0 && (Y = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (Y = document.createElement("canvas").getContext("2d"), Y && (Y.font = q))), Y?.measureText(e).width ?? be(e);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function xe(e) {
|
|
219
219
|
return {
|
|
220
|
-
borderColor: e?.borderColor ||
|
|
221
|
-
textColor: e?.textColor ||
|
|
222
|
-
backgroundColor: e?.backgroundColor ||
|
|
220
|
+
borderColor: e?.borderColor || ge.borderColor,
|
|
221
|
+
textColor: e?.textColor || ge.textColor,
|
|
222
|
+
backgroundColor: e?.backgroundColor || ge.backgroundColor
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
function Se(e) {
|
|
@@ -425,7 +425,7 @@ var we = [
|
|
|
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(q) }),
|
|
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", {
|
|
@@ -435,11 +435,11 @@ var we = [
|
|
|
435
435
|
}, S(e), 9, Ae))), 128))], 12, ke)
|
|
436
436
|
], 40, we))), 128))], 2)) : r("", !0);
|
|
437
437
|
}
|
|
438
|
-
}),
|
|
438
|
+
}), Z = (e, t) => {
|
|
439
439
|
let n = e.__vccOpts || e;
|
|
440
440
|
for (let [e, r] of t) n[e] = r;
|
|
441
441
|
return n;
|
|
442
|
-
}, Me = /*#__PURE__*/
|
|
442
|
+
}, Me = /*#__PURE__*/ Z(je, [["__scopeId", "data-v-7254383e"]]), Ne = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
443
443
|
__name: "WaveformAnnotationContextMenu",
|
|
444
444
|
props: {
|
|
445
445
|
visible: { type: Boolean },
|
|
@@ -482,7 +482,7 @@ var we = [
|
|
|
482
482
|
], 36)) : r("", !0);
|
|
483
483
|
}
|
|
484
484
|
}), [["__scopeId", "data-v-c70c98a1"]]), Pe = 1;
|
|
485
|
-
function
|
|
485
|
+
function Q(e) {
|
|
486
486
|
throw TypeError(`Invalid waveform annotation file: ${e}`);
|
|
487
487
|
}
|
|
488
488
|
function Fe(e) {
|
|
@@ -490,23 +490,23 @@ function Fe(e) {
|
|
|
490
490
|
}
|
|
491
491
|
function Ie(e, t, n) {
|
|
492
492
|
let r = e[t];
|
|
493
|
-
return (typeof r != "string" || r.trim().length === 0) &&
|
|
493
|
+
return (typeof r != "string" || r.trim().length === 0) && Q(`${n}.${t} must be a non-empty string`), r;
|
|
494
494
|
}
|
|
495
495
|
function Le(e, t, n) {
|
|
496
496
|
let r = e[t];
|
|
497
|
-
if (r !== void 0) return typeof r != "string" &&
|
|
497
|
+
if (r !== void 0) return typeof r != "string" && Q(`${n}.${t} must be a string`), r;
|
|
498
498
|
}
|
|
499
499
|
function Re(e, t, n) {
|
|
500
500
|
let r = e[t];
|
|
501
|
-
return (typeof r != "number" || !Number.isFinite(r)) &&
|
|
501
|
+
return (typeof r != "number" || !Number.isFinite(r)) && Q(`${n}.${t} must be a finite number`), r;
|
|
502
502
|
}
|
|
503
503
|
function ze(e, t, n) {
|
|
504
504
|
let r = e[t];
|
|
505
|
-
if (r !== void 0) return (typeof r != "number" || !Number.isFinite(r)) &&
|
|
505
|
+
if (r !== void 0) return (typeof r != "number" || !Number.isFinite(r)) && Q(`${n}.${t} must be a finite number`), r;
|
|
506
506
|
}
|
|
507
507
|
function Be(e, t) {
|
|
508
508
|
if (e === void 0) return;
|
|
509
|
-
Fe(e) ||
|
|
509
|
+
Fe(e) || Q(`${t} must be an object`);
|
|
510
510
|
let n = Le(e, "borderColor", t), r = Le(e, "textColor", t), i = Le(e, "backgroundColor", t);
|
|
511
511
|
return {
|
|
512
512
|
...n !== void 0 && { borderColor: n },
|
|
@@ -516,9 +516,9 @@ function Be(e, t) {
|
|
|
516
516
|
}
|
|
517
517
|
function Ve(e, t) {
|
|
518
518
|
let n = `annotations[${t}]`;
|
|
519
|
-
Fe(e) ||
|
|
519
|
+
Fe(e) || Q(`${n} must be an object`);
|
|
520
520
|
let r = Ie(e, "text", n);
|
|
521
|
-
r.length > 40 &&
|
|
521
|
+
r.length > 40 && Q(`${n}.text must not exceed 40 characters`);
|
|
522
522
|
let i = ze(e, "labelOffsetX", n), a = ze(e, "labelOffsetY", n), o = Le(e, "createdAt", n), s = Be(e.style, `${n}.style`);
|
|
523
523
|
return {
|
|
524
524
|
id: Ie(e, "id", n),
|
|
@@ -535,7 +535,7 @@ function Ve(e, t) {
|
|
|
535
535
|
function He(e) {
|
|
536
536
|
let t = e.map(Ve), n = /* @__PURE__ */ new Set();
|
|
537
537
|
return t.forEach((e, t) => {
|
|
538
|
-
n.has(e.id) &&
|
|
538
|
+
n.has(e.id) && Q(`annotations[${t}].id must be unique`), n.add(e.id);
|
|
539
539
|
}), t;
|
|
540
540
|
}
|
|
541
541
|
function Ue(e) {
|
|
@@ -545,14 +545,14 @@ function Ue(e) {
|
|
|
545
545
|
}, null, 2);
|
|
546
546
|
}
|
|
547
547
|
function We(e) {
|
|
548
|
-
typeof e != "string" &&
|
|
548
|
+
typeof e != "string" && Q("input must be a JSON string");
|
|
549
549
|
let t;
|
|
550
550
|
try {
|
|
551
551
|
t = JSON.parse(e);
|
|
552
552
|
} catch {
|
|
553
|
-
|
|
553
|
+
Q("input is not valid JSON");
|
|
554
554
|
}
|
|
555
|
-
return Fe(t) ||
|
|
555
|
+
return Fe(t) || Q("root must be an object"), t.version !== Pe && Q(`version must be ${Pe}`), Array.isArray(t.annotations) || Q("annotations must be an array"), He(t.annotations);
|
|
556
556
|
}
|
|
557
557
|
//#endregion
|
|
558
558
|
//#region src/components/annotation/useWaveformAnnotationInteraction.ts
|
|
@@ -596,7 +596,7 @@ function Ge() {
|
|
|
596
596
|
}
|
|
597
597
|
//#endregion
|
|
598
598
|
//#region src/utils/domain.ts
|
|
599
|
-
function
|
|
599
|
+
function $(e) {
|
|
600
600
|
if (e.length === 0) return [0, 1];
|
|
601
601
|
let [t = 0, n = 1] = L(e);
|
|
602
602
|
if (t !== n) return [t, n];
|
|
@@ -659,39 +659,39 @@ function it(e) {
|
|
|
659
659
|
let [t, n] = e.toExponential().split("e"), r = Number(n), i = t.startsWith("-"), a = t.replace("-", "").replace(".", ""), o = r + 1, s;
|
|
660
660
|
return s = o <= 0 ? `0.${"0".repeat(Math.abs(o))}${a}` : o >= a.length ? `${a}${"0".repeat(o - a.length)}` : `${a.slice(0, o)}.${a.slice(o)}`, `${i ? "-" : ""}${s}`;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function at(e, t) {
|
|
663
663
|
return t === "ms" ? e * 1e3 : e;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
let [r, i] = t.map((e) =>
|
|
667
|
-
return tt(
|
|
665
|
+
function ot(e, t, n) {
|
|
666
|
+
let [r, i] = t.map((e) => at(e, n));
|
|
667
|
+
return tt(at(e, n), {
|
|
668
668
|
axisMin: r,
|
|
669
669
|
axisMax: i
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
let r =
|
|
672
|
+
function st(e, t, n) {
|
|
673
|
+
let r = at(e, t), i = n?.map((e) => at(e, t));
|
|
674
674
|
return tt(r, {
|
|
675
675
|
axisMin: i?.[0],
|
|
676
676
|
axisMax: i?.[1]
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
let [n, r] = e.map((e) =>
|
|
679
|
+
function ct(e, t) {
|
|
680
|
+
let [n, r] = e.map((e) => at(e, t));
|
|
681
681
|
return nt(n, r);
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
return
|
|
683
|
+
function lt(e, t) {
|
|
684
|
+
return at(e, t).toLocaleString("zh-CN", {
|
|
685
685
|
minimumFractionDigits: 4,
|
|
686
686
|
maximumFractionDigits: 4
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
return Number.isFinite(e) ? Ze(
|
|
689
|
+
function ut(e, t) {
|
|
690
|
+
return Number.isFinite(e) ? Ze(at(e, t), 3) : String(e);
|
|
691
691
|
}
|
|
692
692
|
//#endregion
|
|
693
693
|
//#region src/utils/geometry.ts
|
|
694
|
-
function
|
|
694
|
+
function dt(e, t, n) {
|
|
695
695
|
if (e <= 0) return {
|
|
696
696
|
gap: 0,
|
|
697
697
|
axisBand: 0,
|
|
@@ -704,20 +704,20 @@ function ut(e, t, n) {
|
|
|
704
704
|
height: Math.max(1, (n - (e - 1) * (c + l)) / e)
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function ft(e, t, n) {
|
|
708
708
|
return Math.min(Math.max(e, t), n);
|
|
709
709
|
}
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region src/components/core/constants.ts
|
|
712
|
-
var
|
|
712
|
+
var pt = {
|
|
713
713
|
top: 18,
|
|
714
714
|
right: 24,
|
|
715
715
|
bottom: 52,
|
|
716
716
|
left: 64
|
|
717
|
-
},
|
|
717
|
+
}, mt = {
|
|
718
718
|
DEFAULT_MAX_SCALE: 40,
|
|
719
719
|
MIN_SCALE: 1
|
|
720
|
-
},
|
|
720
|
+
}, ht = .62, gt = 1.2, _t = [
|
|
721
721
|
"#0960bd",
|
|
722
722
|
"#ff7f0e",
|
|
723
723
|
"#389e0d",
|
|
@@ -728,42 +728,42 @@ var ft = {
|
|
|
728
728
|
"#434343",
|
|
729
729
|
"#7cb305",
|
|
730
730
|
"#1d39c4"
|
|
731
|
-
],
|
|
731
|
+
], vt = {
|
|
732
732
|
WIDTH: 1.5,
|
|
733
733
|
CAP_WIDTH: 8
|
|
734
|
-
},
|
|
734
|
+
}, yt = {
|
|
735
735
|
COLOR: "#98a2b3",
|
|
736
736
|
WIDTH: 1,
|
|
737
737
|
DASH: "6 4"
|
|
738
738
|
};
|
|
739
739
|
//#endregion
|
|
740
740
|
//#region src/components/core/yDomain.ts
|
|
741
|
-
function
|
|
741
|
+
function bt(e) {
|
|
742
742
|
if (!(!e || !Number.isFinite(e[0]) || !Number.isFinite(e[1]) || e[0] === e[1])) return e[0] < e[1] ? [e[0], e[1]] : [e[1], e[0]];
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
return
|
|
746
|
-
}
|
|
747
|
-
function xt(e, t, n) {
|
|
748
|
-
return yt(n?.[e.id]) ?? yt(t);
|
|
744
|
+
function xt(e, t) {
|
|
745
|
+
return bt(t?.[e.id]);
|
|
749
746
|
}
|
|
750
747
|
function St(e, t, n) {
|
|
751
|
-
return
|
|
748
|
+
return bt(n?.[e.id]) ?? bt(t);
|
|
749
|
+
}
|
|
750
|
+
function Ct(e, t, n) {
|
|
751
|
+
return !!(xt(e, n) || e.visibleSeries.some((e) => St(e, t, n)));
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function wt(e) {
|
|
754
754
|
return [Math.min(...e.map((e) => e[0])), Math.max(...e.map((e) => e[1]))];
|
|
755
755
|
}
|
|
756
756
|
//#endregion
|
|
757
757
|
//#region src/core/data.ts
|
|
758
|
-
var
|
|
759
|
-
function
|
|
758
|
+
var Tt = vt.WIDTH, Et = vt.CAP_WIDTH;
|
|
759
|
+
function Dt(e) {
|
|
760
760
|
return e === "dashed" || e === "dash-dot" ? e : "solid";
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function Ot(e) {
|
|
763
763
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 ? e : void 0;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
let t =
|
|
765
|
+
function kt(e) {
|
|
766
|
+
let t = Ot(e.error), n = Ot(e.lowerError), r = Ot(e.upperError);
|
|
767
767
|
return {
|
|
768
768
|
x: e.x,
|
|
769
769
|
y: e.y,
|
|
@@ -772,14 +772,14 @@ function Ot(e) {
|
|
|
772
772
|
...r === void 0 ? {} : { upperError: r }
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
function
|
|
776
|
-
let t =
|
|
775
|
+
function At(e) {
|
|
776
|
+
let t = Ot(e.error) ?? 0;
|
|
777
777
|
return {
|
|
778
|
-
lower:
|
|
779
|
-
upper:
|
|
778
|
+
lower: Ot(e.lowerError) ?? t,
|
|
779
|
+
upper: Ot(e.upperError) ?? t
|
|
780
780
|
};
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function jt(e) {
|
|
783
783
|
if (e.kind === "samples") {
|
|
784
784
|
if (!Number.isFinite(e.sampleRate) || e.sampleRate <= 0) return [];
|
|
785
785
|
let t = Number.isFinite(e.startTime) ? e.startTime ?? 0 : 0, n = [];
|
|
@@ -795,14 +795,14 @@ function At(e) {
|
|
|
795
795
|
let t = [], n = -Infinity, r = !0;
|
|
796
796
|
for (let i of e.points) {
|
|
797
797
|
if (!Number.isFinite(i.x) || !Number.isFinite(i.y)) continue;
|
|
798
|
-
let e =
|
|
798
|
+
let e = kt(i);
|
|
799
799
|
e.x < n && (r = !1), n = e.x, t.push(e);
|
|
800
800
|
}
|
|
801
801
|
return r || t.sort((e, t) => e.x - t.x), t;
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function Mt(e) {
|
|
804
804
|
if (e.kind !== "series") {
|
|
805
|
-
let t =
|
|
805
|
+
let t = jt(e);
|
|
806
806
|
return t.length > 0 ? [{
|
|
807
807
|
id: "series-0",
|
|
808
808
|
name: "",
|
|
@@ -811,8 +811,8 @@ function jt(e) {
|
|
|
811
811
|
pointType: "none",
|
|
812
812
|
errorBar: {
|
|
813
813
|
visible: !1,
|
|
814
|
-
width:
|
|
815
|
-
capWidth:
|
|
814
|
+
width: Tt,
|
|
815
|
+
capWidth: Et
|
|
816
816
|
},
|
|
817
817
|
points: t
|
|
818
818
|
}] : [];
|
|
@@ -822,7 +822,7 @@ function jt(e) {
|
|
|
822
822
|
let r = e.id?.trim() || `series-${n}`, i = r, a = 1;
|
|
823
823
|
for (; t.has(i);) i = `${r}-${a}`, a++;
|
|
824
824
|
t.add(i);
|
|
825
|
-
let o = e.lineType ?? "linear", s =
|
|
825
|
+
let o = e.lineType ?? "linear", s = Dt(e.lineStyle), c = e.pointType ?? "none", l = e.errorBar?.visible === !0, u = o === "none" && c === "none" && !l ? "linear" : o, d = Number(e.errorBar?.width), f = Number(e.errorBar?.capWidth);
|
|
826
826
|
return {
|
|
827
827
|
id: i,
|
|
828
828
|
trackId: e.trackId?.trim() || void 0,
|
|
@@ -835,55 +835,55 @@ function jt(e) {
|
|
|
835
835
|
errorBar: {
|
|
836
836
|
visible: l,
|
|
837
837
|
color: e.errorBar?.color,
|
|
838
|
-
width: Number.isFinite(d) && d > 0 ? d :
|
|
839
|
-
capWidth: Number.isFinite(f) && f > 0 ? f :
|
|
838
|
+
width: Number.isFinite(d) && d > 0 ? d : Tt,
|
|
839
|
+
capWidth: Number.isFinite(f) && f > 0 ? f : Et
|
|
840
840
|
},
|
|
841
|
-
points:
|
|
841
|
+
points: jt(e.data)
|
|
842
842
|
};
|
|
843
843
|
}).filter((e) => e.points.length > 0);
|
|
844
844
|
}
|
|
845
845
|
//#endregion
|
|
846
846
|
//#region src/core/renderingOptions.ts
|
|
847
|
-
var
|
|
847
|
+
var Nt = {
|
|
848
848
|
downsample: !0,
|
|
849
849
|
downsampleThreshold: 2e3,
|
|
850
850
|
maxPointsPerPixel: 4,
|
|
851
851
|
pointMinSpacing: 10,
|
|
852
852
|
errorBarMinSpacing: 12
|
|
853
853
|
};
|
|
854
|
-
function
|
|
854
|
+
function Pt(e) {
|
|
855
855
|
let t = Number(e?.downsampleThreshold), n = Number(e?.maxPointsPerPixel), r = Number(e?.pointMinSpacing), i = Number(e?.errorBarMinSpacing);
|
|
856
856
|
return {
|
|
857
|
-
downsample: e?.downsample ??
|
|
858
|
-
downsampleThreshold: Number.isFinite(t) && t >= 2 ? Math.floor(t) :
|
|
859
|
-
maxPointsPerPixel: Number.isFinite(n) && n > 0 ? n :
|
|
860
|
-
pointMinSpacing: Number.isFinite(r) && r >= 0 ? r :
|
|
861
|
-
errorBarMinSpacing: Number.isFinite(i) && i >= 0 ? i :
|
|
857
|
+
downsample: e?.downsample ?? Nt.downsample,
|
|
858
|
+
downsampleThreshold: Number.isFinite(t) && t >= 2 ? Math.floor(t) : Nt.downsampleThreshold,
|
|
859
|
+
maxPointsPerPixel: Number.isFinite(n) && n > 0 ? n : Nt.maxPointsPerPixel,
|
|
860
|
+
pointMinSpacing: Number.isFinite(r) && r >= 0 ? r : Nt.pointMinSpacing,
|
|
861
|
+
errorBarMinSpacing: Number.isFinite(i) && i >= 0 ? i : Nt.errorBarMinSpacing
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
864
|
//#endregion
|
|
865
865
|
//#region src/core/rendering.ts
|
|
866
|
-
var
|
|
867
|
-
function
|
|
866
|
+
var Ft = N((e) => e.x), It = () => !0;
|
|
867
|
+
function Lt(e, t) {
|
|
868
868
|
let n = Math.min(t[0], t[1]), r = Math.max(t[0], t[1]);
|
|
869
869
|
return {
|
|
870
|
-
start:
|
|
871
|
-
end:
|
|
870
|
+
start: Ft.left(e, n),
|
|
871
|
+
end: Ft.right(e, r)
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Rt(e, t, n) {
|
|
875
875
|
if (!Number.isFinite(n) || n <= 0) return !0;
|
|
876
876
|
let r = Math.ceil(n), i = /* @__PURE__ */ new Set();
|
|
877
877
|
for (let n of e) {
|
|
878
|
-
let e =
|
|
878
|
+
let e = Lt(n.points, t);
|
|
879
879
|
for (let t = e.start; t < e.end; t += 1) if (i.add(n.points[t].x), i.size >= r) return !0;
|
|
880
880
|
}
|
|
881
881
|
return !1;
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function zt(e, t) {
|
|
884
884
|
t && e[e.length - 1] !== t && e.push(t);
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function Bt(e, t, n, r, i) {
|
|
887
887
|
let a = Math.min(n[0], n[1]), o = Math.max(n[0], n[1]), s = Math.max(0, t.start - 1), c = Math.min(e.length, t.end + 1), l = c - s;
|
|
888
888
|
if (l <= 0) return [];
|
|
889
889
|
if (!i.downsample || l <= i.downsampleThreshold) return e.slice(s, c);
|
|
@@ -902,9 +902,9 @@ function zt(e, t, n, r, i) {
|
|
|
902
902
|
for (; n >= 0 && m[n] > t;) m[n + 1] = m[n], --n;
|
|
903
903
|
m[n + 1] = t;
|
|
904
904
|
}
|
|
905
|
-
for (let n = 0; n < t; n += 1)
|
|
905
|
+
for (let n = 0; n < t; n += 1) zt(f, e[m[n]]);
|
|
906
906
|
};
|
|
907
|
-
|
|
907
|
+
zt(f, e[s]);
|
|
908
908
|
for (let n = t.start; n < t.end; n += 1) {
|
|
909
909
|
let t = e[n], r = Math.min(d - 1, Math.max(0, Math.floor((t.x - a) / p * d)));
|
|
910
910
|
if (r !== h) {
|
|
@@ -913,14 +913,14 @@ function zt(e, t, n, r, i) {
|
|
|
913
913
|
}
|
|
914
914
|
_ = n, t.y < e[v].y && (v = n), t.y > e[y].y && (y = n);
|
|
915
915
|
}
|
|
916
|
-
return x(),
|
|
916
|
+
return x(), zt(f, e[c - 1]), f;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return !e.length || n <= 0 ? [] :
|
|
918
|
+
function Vt(e, t, n, r) {
|
|
919
|
+
return !e.length || n <= 0 ? [] : Bt(e, Lt(e, t), t, n, r);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Ht(e, t, n, r, i, a, o, s) {
|
|
922
922
|
if (!a || i === 0) {
|
|
923
|
-
if (o ===
|
|
923
|
+
if (o === It) return e.slice(t.start, t.end);
|
|
924
924
|
let n = [];
|
|
925
925
|
for (let r = t.start; r < t.end; r += 1) o(e[r]) && n.push(e[r]);
|
|
926
926
|
return n;
|
|
@@ -953,36 +953,36 @@ function Vt(e, t, n, r, i, a, o, s) {
|
|
|
953
953
|
let w = (f ?? []).map((e, t) => m?.[t] ?? e).filter((e) => e !== void 0);
|
|
954
954
|
return v && w[0] !== v && w.unshift(v), y && w.at(-1) !== y && w.push(y), w;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
let { lower: t, upper: n } =
|
|
956
|
+
function Ut(e) {
|
|
957
|
+
let { lower: t, upper: n } = At(e);
|
|
958
958
|
return t !== 0 || n !== 0;
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function Wt(e, t, n, r, i) {
|
|
961
961
|
if (!e.length || n <= 0) return {
|
|
962
962
|
linePoints: [],
|
|
963
963
|
pointRenderPoints: [],
|
|
964
964
|
errorBarRenderPoints: []
|
|
965
965
|
};
|
|
966
|
-
let a =
|
|
966
|
+
let a = Lt(e, t), o = i.lineVisible ? Bt(e, a, t, n, r) : [], s = i.errorBarVisible && i.hasErrorPoints;
|
|
967
967
|
if (i.pointVisible && s) {
|
|
968
|
-
let i =
|
|
968
|
+
let i = Ht(e, a, t, n, Math.max(r.pointMinSpacing, r.errorBarMinSpacing), r.downsample, It, Ut);
|
|
969
969
|
return {
|
|
970
970
|
linePoints: o,
|
|
971
971
|
pointRenderPoints: i,
|
|
972
|
-
errorBarRenderPoints: i.filter(
|
|
972
|
+
errorBarRenderPoints: i.filter(Ut)
|
|
973
973
|
};
|
|
974
974
|
}
|
|
975
975
|
return {
|
|
976
976
|
linePoints: o,
|
|
977
|
-
pointRenderPoints: i.pointVisible ?
|
|
978
|
-
errorBarRenderPoints: s ?
|
|
977
|
+
pointRenderPoints: i.pointVisible ? Ht(e, a, t, n, r.pointMinSpacing, r.downsample, It) : [],
|
|
978
|
+
errorBarRenderPoints: s ? Ht(e, a, t, n, r.errorBarMinSpacing, r.downsample, Ut) : []
|
|
979
979
|
};
|
|
980
980
|
}
|
|
981
|
-
var
|
|
981
|
+
var Gt = (e, t) => {
|
|
982
982
|
let n = typeof e == "number" ? e : Number(e);
|
|
983
983
|
return Number.isFinite(n) ? Math.min(10, Math.max(1, Math.floor(n))) : t;
|
|
984
984
|
};
|
|
985
|
-
function
|
|
985
|
+
function Kt(e) {
|
|
986
986
|
let t = Object.fromEntries(Object.entries(e?.trackLines ?? {}).map(([e, t]) => [e, {
|
|
987
987
|
horizontal: typeof t?.horizontal != "boolean" || t.horizontal,
|
|
988
988
|
vertical: typeof t?.vertical != "boolean" || t.vertical,
|
|
@@ -990,37 +990,37 @@ function Gt(e) {
|
|
|
990
990
|
verticalColor: typeof t?.verticalColor == "string" && t.verticalColor.trim() ? t.verticalColor : void 0
|
|
991
991
|
}]));
|
|
992
992
|
return {
|
|
993
|
-
rowCount:
|
|
994
|
-
columnCount:
|
|
993
|
+
rowCount: Gt(e?.rowCount, 2),
|
|
994
|
+
columnCount: Gt(e?.columnCount, 1),
|
|
995
995
|
showPagination: e?.showPagination ?? !0,
|
|
996
996
|
trackLines: t
|
|
997
997
|
};
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function qt(e) {
|
|
1000
1000
|
return e.rowCount * e.columnCount;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
return Math.max(1, Math.ceil(Math.max(0, e) /
|
|
1002
|
+
function Jt(e, t) {
|
|
1003
|
+
return Math.max(1, Math.ceil(Math.max(0, e) / qt(t)));
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
let r =
|
|
1007
|
-
return e.slice(i, i +
|
|
1005
|
+
function Yt(e, t, n) {
|
|
1006
|
+
let r = Jt(e.length, n), i = (Math.min(r, Math.max(1, Math.floor(t))) - 1) * qt(n);
|
|
1007
|
+
return e.slice(i, i + qt(n));
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Xt(e) {
|
|
1010
1010
|
return e === "compact" ? 0 : e === "separated" ? 16 : 14;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1013
|
-
let s =
|
|
1012
|
+
function Zt(e, t, n, r, i = [], a, o = !0) {
|
|
1013
|
+
let s = Xt(r), c = Number.isFinite(a) ? Math.max(0, a) : s, l = Math.max(0, n.columnCount - 1) * c, u = /* @__PURE__ */ new Set();
|
|
1014
1014
|
if (o) {
|
|
1015
1015
|
if (r === "independent") for (let e = 0; e < n.rowCount; e += 1) u.add(e);
|
|
1016
1016
|
else if (r === "compact") u.add(n.rowCount - 1);
|
|
1017
|
-
else for (let e = 0; e < n.columnCount; e += 1) for (let t =
|
|
1017
|
+
else for (let e = 0; e < n.columnCount; e += 1) for (let t = qt(n) - 1; t >= 0; --t) if (t % n.columnCount === e && i[t]) {
|
|
1018
1018
|
u.add(Math.floor(t / n.columnCount));
|
|
1019
1019
|
break;
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
let d = Math.max(0, n.rowCount - 1) * s, f = u.size * 30, p = Math.max(1, (e - l) / n.columnCount), m = Math.max(1, (t - d - f) / n.rowCount);
|
|
1023
|
-
return Array.from({ length:
|
|
1023
|
+
return Array.from({ length: qt(n) }, (e, t) => {
|
|
1024
1024
|
let r = Math.floor(t / n.columnCount), i = t % n.columnCount, a = u.has(r) ? 30 : 0, o = m + a, l = Array.from({ length: r }, (e, t) => {
|
|
1025
1025
|
let n = u.has(t) ? 30 : 0;
|
|
1026
1026
|
return m + n + s;
|
|
@@ -1039,7 +1039,7 @@ function Xt(e, t, n, r, i = [], a, o = !0) {
|
|
|
1039
1039
|
};
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function Qt(e, t) {
|
|
1043
1043
|
let n = /* @__PURE__ */ new Set();
|
|
1044
1044
|
for (let r = 0; r < t; r += 1) for (let t = e.length - 1; t >= 0; --t) {
|
|
1045
1045
|
let i = e[t];
|
|
@@ -1052,11 +1052,11 @@ function Zt(e, t) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
//#endregion
|
|
1054
1054
|
//#region src/components/core/trackLayoutBuilder.ts
|
|
1055
|
-
function
|
|
1055
|
+
function $t(e) {
|
|
1056
1056
|
let t = e.cells.map((e) => ({
|
|
1057
1057
|
...e,
|
|
1058
1058
|
hasSeries: !!e.series
|
|
1059
|
-
})), n =
|
|
1059
|
+
})), n = Qt(t, e.grid.columnCount);
|
|
1060
1060
|
return t.flatMap((t, r) => {
|
|
1061
1061
|
let i = !t.series;
|
|
1062
1062
|
if (i && (e.displayMode !== "compact" || !e.showCompactEmptyTracks)) return [];
|
|
@@ -1082,7 +1082,7 @@ function Qt(e) {
|
|
|
1082
1082
|
visibleSeries: [a],
|
|
1083
1083
|
xDomain: a.xDomain,
|
|
1084
1084
|
yDomain: a.yDomain
|
|
1085
|
-
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(e.initialXDomains?.[o.id] ?? e.initialXDomains?.[c.id] ?? o.xDomain, [0, t.width]) : B(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ?? U : U).rescaleX(l), d = e.yDomains?.[o.id], f =
|
|
1085
|
+
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(e.initialXDomains?.[o.id] ?? e.initialXDomains?.[c.id] ?? e.initialXDomain ?? o.xDomain, [0, t.width]) : B(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ?? U : U).rescaleX(l), d = e.yDomains?.[o.id], f = ln(o, e.overlayMode, e.fixedYDomain, e.fixedYDomains).map((e) => !e.fixed && d ? {
|
|
1086
1086
|
...e,
|
|
1087
1087
|
domain: d
|
|
1088
1088
|
} : e), p = {
|
|
@@ -1095,7 +1095,7 @@ function Qt(e) {
|
|
|
1095
1095
|
a,
|
|
1096
1096
|
...c,
|
|
1097
1097
|
...s ? [o] : []
|
|
1098
|
-
])), { exponentLabel: u, exponentWidth: d, tickTextWidth: f } =
|
|
1098
|
+
])), { exponentLabel: u, exponentWidth: d, tickTextWidth: f } = un(n.domain, !n.fixed), m = u ? d + 8 : 0, h = f + 7 + m + 6 + 24 + 4, g = n.side === "left" ? -p.left : t.width + p.right, _ = g + (n.side === "left" ? -(7 + f + 8) : 7 + f + 8), v = f + 7 + m + d + 6 + 24 / 2, y = g + (n.side === "left" ? -v : v);
|
|
1099
1099
|
return p[n.side] += h, {
|
|
1100
1100
|
index: n.index,
|
|
1101
1101
|
side: n.side,
|
|
@@ -1110,13 +1110,13 @@ function Qt(e) {
|
|
|
1110
1110
|
seriesList: n.seriesList
|
|
1111
1111
|
};
|
|
1112
1112
|
}), h = m[0]?.scale ?? B(o.yDomain, [t.plotHeight, 0]).nice(), g = u.ticks(Math.max(2, Math.floor(t.width / 100))), _ = m[0]?.majorTicks ?? [], v = m[0]?.tickValues ?? [], y = u.domain(), b = {
|
|
1113
|
-
start:
|
|
1114
|
-
end:
|
|
1115
|
-
}, x =
|
|
1113
|
+
start: ot(y[0], y, e.timeUnit),
|
|
1114
|
+
end: ot(y[1], y, e.timeUnit)
|
|
1115
|
+
}, x = ct(y, e.timeUnit), S = b.start.length * 7 + 10, C = b.end.length * 7 + 10, w = g.filter((e) => {
|
|
1116
1116
|
let n = u(e);
|
|
1117
1117
|
return n > S && n < t.width - C;
|
|
1118
1118
|
}), T = o.visibleSeries.map((n) => {
|
|
1119
|
-
let r = m.find((e) => e.seriesList.some((e) => e.id === n.id)), a = r?.scale ?? h, o =
|
|
1119
|
+
let r = m.find((e) => e.seriesList.some((e) => e.id === n.id)), a = r?.scale ?? h, o = Wt(n.points, y, t.width, e.rendering, {
|
|
1120
1120
|
lineVisible: !i && n.lineType !== "none",
|
|
1121
1121
|
pointVisible: n.pointType !== "none",
|
|
1122
1122
|
errorBarVisible: n.errorBar.visible,
|
|
@@ -1169,8 +1169,8 @@ function Qt(e) {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
//#endregion
|
|
1171
1171
|
//#region src/components/core/layout.ts
|
|
1172
|
-
var
|
|
1173
|
-
function
|
|
1172
|
+
var en = 7, tn = 7, nn = 4, rn = 6, an = 24;
|
|
1173
|
+
function on(e) {
|
|
1174
1174
|
return e >= 4 ? [
|
|
1175
1175
|
"left",
|
|
1176
1176
|
"left",
|
|
@@ -1182,13 +1182,13 @@ function an(e) {
|
|
|
1182
1182
|
"right"
|
|
1183
1183
|
] : e === 2 ? ["left", "right"] : ["left"];
|
|
1184
1184
|
}
|
|
1185
|
-
var
|
|
1186
|
-
function
|
|
1187
|
-
let n =
|
|
1188
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
1185
|
+
var sn = /* @__PURE__ */ new WeakMap();
|
|
1186
|
+
function cn(e, t) {
|
|
1187
|
+
let n = sn.get(e);
|
|
1188
|
+
n || (n = /* @__PURE__ */ new Map(), sn.set(e, n));
|
|
1189
1189
|
let r = n.get(t);
|
|
1190
1190
|
if (r) return r;
|
|
1191
|
-
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a =
|
|
1191
|
+
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a = on(i), o = Array.from({ length: i }, (e, t) => ({
|
|
1192
1192
|
index: t,
|
|
1193
1193
|
side: a[t],
|
|
1194
1194
|
seriesList: [],
|
|
@@ -1201,27 +1201,27 @@ function sn(e, t) {
|
|
|
1201
1201
|
if (t === "single-axis") n.domain = e.yDomain;
|
|
1202
1202
|
else {
|
|
1203
1203
|
let t = n.seriesList.flatMap((e) => e.yDomain);
|
|
1204
|
-
n.domain = t.length > 0 ?
|
|
1204
|
+
n.domain = t.length > 0 ? $(t) : e.yDomain;
|
|
1205
1205
|
}
|
|
1206
1206
|
}), n.set(t, o), o;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1209
|
-
let i =
|
|
1210
|
-
return
|
|
1208
|
+
function ln(e, t, n, r) {
|
|
1209
|
+
let i = xt(e, r);
|
|
1210
|
+
return cn(e, t).map((e) => {
|
|
1211
1211
|
if (i) return {
|
|
1212
1212
|
...e,
|
|
1213
1213
|
domain: i,
|
|
1214
1214
|
fixed: !0
|
|
1215
1215
|
};
|
|
1216
|
-
let t = e.seriesList.map((e) =>
|
|
1216
|
+
let t = e.seriesList.map((e) => St(e, n, r) ?? e.yDomain), a = e.seriesList.some((e) => St(e, n, r));
|
|
1217
1217
|
return a ? {
|
|
1218
1218
|
...e,
|
|
1219
|
-
domain:
|
|
1219
|
+
domain: wt(t),
|
|
1220
1220
|
fixed: a
|
|
1221
1221
|
} : e;
|
|
1222
1222
|
});
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function un(e, t = !0) {
|
|
1225
1225
|
let n = B(e, [1, 0]);
|
|
1226
1226
|
t && n.nice();
|
|
1227
1227
|
let [r, i] = n.domain(), a = n.ticks(10), o = Math.max(1, ...a.map((e) => tt(e, {
|
|
@@ -1230,27 +1230,27 @@ function ln(e, t = !0) {
|
|
|
1230
1230
|
}).length)), s = nt(r, i);
|
|
1231
1231
|
return {
|
|
1232
1232
|
exponentLabel: s,
|
|
1233
|
-
exponentWidth: s ? s.length *
|
|
1234
|
-
tickTextWidth: o *
|
|
1233
|
+
exponentWidth: s ? s.length * en : 0,
|
|
1234
|
+
tickTextWidth: o * en
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1238
|
-
let { exponentLabel: n, exponentWidth: r } =
|
|
1237
|
+
function dn(e, t) {
|
|
1238
|
+
let { exponentLabel: n, exponentWidth: r } = un(e, t);
|
|
1239
1239
|
return n ? r + 8 : 0;
|
|
1240
1240
|
}
|
|
1241
|
-
function dn(e) {
|
|
1242
|
-
return ln(e.domain, !e.fixed).tickTextWidth + un(e.domain, !e.fixed) + en + nn + rn + tn;
|
|
1243
|
-
}
|
|
1244
1241
|
function fn(e) {
|
|
1245
|
-
return
|
|
1242
|
+
return un(e.domain, !e.fixed).tickTextWidth + dn(e.domain, !e.fixed) + tn + rn + an + nn;
|
|
1243
|
+
}
|
|
1244
|
+
function pn(e) {
|
|
1245
|
+
return un(e.domain, !e.fixed).tickTextWidth + dn(e.domain, !e.fixed) + tn + nn;
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1248
|
-
return
|
|
1247
|
+
function mn(e, t, n, r) {
|
|
1248
|
+
return ln(e, t, n, r).reduce((n, r) => (n[r.side] += t === "multi-axis" || e.visibleSeries.length === 1 ? fn(r) : pn(r), n), {
|
|
1249
1249
|
left: 0,
|
|
1250
1250
|
right: 0
|
|
1251
1251
|
});
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1253
|
+
function hn(e, t, n) {
|
|
1254
1254
|
let r = (e) => {
|
|
1255
1255
|
let r = t < e.left ? e.left - t : t > e.left + e.width ? t - e.left - e.width : 0;
|
|
1256
1256
|
return n < e.top ? e.top - n : n > e.top + e.height ? n - (e.top + e.height) : r;
|
|
@@ -1269,11 +1269,11 @@ function mn(e, t, n) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
//#endregion
|
|
1271
1271
|
//#region src/components/annotation/useWaveformChartAnnotations.ts
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1274
|
-
return
|
|
1272
|
+
var gn = 0;
|
|
1273
|
+
function _n() {
|
|
1274
|
+
return gn += 1, typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `annotation-${Date.now()}-${gn}`;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function vn(e) {
|
|
1277
1277
|
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;
|
|
1278
1278
|
function b(e) {
|
|
1279
1279
|
if (!i.value.some((t) => t.id === e)) return;
|
|
@@ -1306,7 +1306,7 @@ function _n(e) {
|
|
|
1306
1306
|
};
|
|
1307
1307
|
}
|
|
1308
1308
|
function C(e, t, n) {
|
|
1309
|
-
s.openCreate(e,
|
|
1309
|
+
s.openCreate(e, _n, t), c.value = n;
|
|
1310
1310
|
let r = s.editorDraft.value, i = l.value.find((t) => t.index === e.trackIndex)?.seriesList.find((t) => t.id === e.seriesId);
|
|
1311
1311
|
r?.mode === "add" && (r.annotation.style = {
|
|
1312
1312
|
borderColor: i?.color || "#1677ff",
|
|
@@ -1316,7 +1316,7 @@ function _n(e) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
function w(e) {
|
|
1318
1318
|
if (y.value) return;
|
|
1319
|
-
let t = s.editorDraft.value, n = c.value.find((t) => t.seriesId === e), r = l.value.find((t) => t.seriesList.some((t) => t.id === e)), i = r?.seriesList.find((t) => t.id === e), a = i && t ?
|
|
1319
|
+
let t = s.editorDraft.value, n = c.value.find((t) => t.seriesId === e), r = l.value.find((t) => t.seriesList.some((t) => t.id === e)), i = r?.seriesList.find((t) => t.id === e), a = i && t ? ye(i.points, t.annotation.x, i.lineType) : null;
|
|
1320
1320
|
!t || !n || !r || !a || (t.annotation = {
|
|
1321
1321
|
...t.annotation,
|
|
1322
1322
|
seriesId: e,
|
|
@@ -1335,7 +1335,7 @@ function _n(e) {
|
|
|
1335
1335
|
let e = l.value[n];
|
|
1336
1336
|
return e?.hasVisibleSeries ? e : void 0;
|
|
1337
1337
|
}
|
|
1338
|
-
return
|
|
1338
|
+
return hn(l.value.filter((e) => e.hasVisibleSeries), e, t);
|
|
1339
1339
|
}
|
|
1340
1340
|
function D(e, t) {
|
|
1341
1341
|
let n = e.currentTarget;
|
|
@@ -1344,7 +1344,7 @@ function _n(e) {
|
|
|
1344
1344
|
if (!o) return null;
|
|
1345
1345
|
let s = Math.max(0, Math.min(m.value, r)), c = Math.max(0, Math.min(o.width, s - o.left)), d = o.xScale.invert(c);
|
|
1346
1346
|
return {
|
|
1347
|
-
candidates:
|
|
1347
|
+
candidates: J(u(o), d, c, a),
|
|
1348
1348
|
editorAnchor: x(e, t)
|
|
1349
1349
|
};
|
|
1350
1350
|
}
|
|
@@ -1394,7 +1394,7 @@ function _n(e) {
|
|
|
1394
1394
|
let e = s.contextMenu.value, n = t.annotations.find((t) => t.id === e?.annotationId);
|
|
1395
1395
|
if (!n) return;
|
|
1396
1396
|
let r = l.value.find((e) => e.seriesList.some((e) => e.id === n.seriesId));
|
|
1397
|
-
c.value = r ?
|
|
1397
|
+
c.value = r ? J(u(r), n.x, r.xScale(n.x), r.top + d(r, n.seriesId)(n.y)) : [], s.openEdit(n, e?.editorAnchor ?? S(n));
|
|
1398
1398
|
}
|
|
1399
1399
|
function F() {
|
|
1400
1400
|
if (y.value) return;
|
|
@@ -1423,8 +1423,8 @@ function _n(e) {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
//#endregion
|
|
1425
1425
|
//#region src/components/interaction/useWaveformHover.ts
|
|
1426
|
-
var
|
|
1427
|
-
function
|
|
1426
|
+
var yn = N((e) => e.x);
|
|
1427
|
+
function bn(e) {
|
|
1428
1428
|
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) => {
|
|
1429
1429
|
let r = n.points[t];
|
|
1430
1430
|
return r?.id === e.id && r.trackIndex === e.trackIndex && r.point === e.point;
|
|
@@ -1445,7 +1445,7 @@ function yn(e) {
|
|
|
1445
1445
|
r.value = !0, y();
|
|
1446
1446
|
}, C = (e = !1) => {
|
|
1447
1447
|
r.value = !e, y();
|
|
1448
|
-
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[
|
|
1448
|
+
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[yn.center(e.points, t)];
|
|
1449
1449
|
return {
|
|
1450
1450
|
cancelPendingHover: h,
|
|
1451
1451
|
clearHover: y,
|
|
@@ -1500,7 +1500,7 @@ function yn(e) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
//#endregion
|
|
1502
1502
|
//#region src/components/interaction/useWaveformViewport.ts
|
|
1503
|
-
function
|
|
1503
|
+
function xn(e) {
|
|
1504
1504
|
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: x, canZoomSharedTracks: S, configureZoom: C, cancelPendingZoom: w, clearHover: T, resolveTrackAtPointer: E } = e, D = t(() => {
|
|
1505
1505
|
let e = i.value;
|
|
1506
1506
|
if (!e) return null;
|
|
@@ -1562,7 +1562,7 @@ function bn(e) {
|
|
|
1562
1562
|
let y = e.independent ? [t] : o.value, x = { ...g.value }, S = { ...h.value };
|
|
1563
1563
|
y.forEach((t) => {
|
|
1564
1564
|
let r = s.value.find((e) => e.id === t.id);
|
|
1565
|
-
if (r &&
|
|
1565
|
+
if (r && Ct(r, n.yDomain, n.yDomains)) return;
|
|
1566
1566
|
let i = t.series.trackId ?? t.series.id, o = e.yDomains[i] ?? t.yScale.domain(), c = r?.yDomain ?? o, l = o[1] - o[0], u = j([o[0] + d / a * l, o[1] + d / a * l], c);
|
|
1567
1567
|
e.independent ? x[t.index] = u : S[i] = u;
|
|
1568
1568
|
}), e.independent ? g.value = x : h.value = S, r("zoom-change", v);
|
|
@@ -1652,7 +1652,7 @@ function bn(e) {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
//#endregion
|
|
1654
1654
|
//#region src/components/utils/useAnimationFrameThrottle.ts
|
|
1655
|
-
function
|
|
1655
|
+
function Sn() {
|
|
1656
1656
|
let e = null, t = null;
|
|
1657
1657
|
function n(n) {
|
|
1658
1658
|
t = n, e === null && (e = requestAnimationFrame(() => {
|
|
@@ -1681,8 +1681,8 @@ function xn() {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
//#endregion
|
|
1683
1683
|
//#region src/components/interaction/useWaveformZoom.ts
|
|
1684
|
-
function
|
|
1685
|
-
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 =
|
|
1684
|
+
function Cn(e) {
|
|
1685
|
+
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 = Sn(), 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) => {
|
|
1686
1686
|
y || m.value || (g(), b = e.transform, x = "wheel", O(), P());
|
|
1687
1687
|
}, A = (e, t) => {
|
|
1688
1688
|
y || m.value || (g(), C.set(t, e.transform), w.set(t, "wheel"), O(), P());
|
|
@@ -1769,12 +1769,16 @@ function Sn(e) {
|
|
|
1769
1769
|
F(), r.value?.querySelectorAll(".waveform-chart__overlay").forEach((e) => V(e).on(".zoom", null)), _.clear();
|
|
1770
1770
|
}, L = (e) => {
|
|
1771
1771
|
let n = t.minZoomSpan;
|
|
1772
|
-
if (!Number.isFinite(n) || (n ?? 0) <= 0) return
|
|
1772
|
+
if (!Number.isFinite(n) || (n ?? 0) <= 0) return mt.DEFAULT_MAX_SCALE;
|
|
1773
1773
|
let r = Math.abs(e[1] - e[0]);
|
|
1774
|
-
return !Number.isFinite(r) || r <= 0 ?
|
|
1775
|
-
}, R = (e) =>
|
|
1774
|
+
return !Number.isFinite(r) || r <= 0 ? mt.MIN_SCALE : Math.min(mt.DEFAULT_MAX_SCALE, Math.max(mt.MIN_SCALE, r / (n ?? r)));
|
|
1775
|
+
}, R = (e) => Rt(e.seriesList, e.xScale.domain(), Number(t.minVisiblePoints)), z = () => {
|
|
1776
1776
|
let e = s.value.filter((e) => e.hasVisibleSeries);
|
|
1777
1777
|
return e.length > 0 && e.every(R);
|
|
1778
|
+
}, H = (e, t) => {
|
|
1779
|
+
if (e.type !== "wheel") return !1;
|
|
1780
|
+
let n = e.deltaY;
|
|
1781
|
+
return n < 0 ? t : n > 0 && W(e.currentTarget).k > mt.MIN_SCALE;
|
|
1778
1782
|
};
|
|
1779
1783
|
return {
|
|
1780
1784
|
cancelPendingZoom: F,
|
|
@@ -1787,7 +1791,7 @@ function Sn(e) {
|
|
|
1787
1791
|
s.value.forEach((e) => {
|
|
1788
1792
|
let t = r.value?.querySelector(`[data-independent-overlay-index="${e.index}"]`);
|
|
1789
1793
|
if (!t) return;
|
|
1790
|
-
let n = h(e), i = ie().filter((t) => t
|
|
1794
|
+
let n = h(e), i = ie().filter((t) => H(t, R(e))).scaleExtent([1, L(n)]).extent([[0, 0], [e.width, e.height]]).translateExtent([[0, 0], [e.width, e.height]]).on("zoom", (t) => A(t, e.index)).on("end", N);
|
|
1791
1795
|
_.set(e.index, i), y = !0;
|
|
1792
1796
|
try {
|
|
1793
1797
|
V(t).call(i).on("dblclick.zoom", null).call(i.transform, o.value[e.index] ?? U);
|
|
@@ -1799,7 +1803,7 @@ function Sn(e) {
|
|
|
1799
1803
|
}
|
|
1800
1804
|
let e = i.value;
|
|
1801
1805
|
if (!e) return;
|
|
1802
|
-
let n = ie().filter((e) => e
|
|
1806
|
+
let n = ie().filter((e) => H(e, z())).scaleExtent([1, L(c.value)]).extent([[0, 0], [u.value, d.value]]).translateExtent([[0, 0], [u.value, d.value]]).on("zoom", k).on("end", N);
|
|
1803
1807
|
_.set("shared", n), y = !0;
|
|
1804
1808
|
try {
|
|
1805
1809
|
V(e).call(n).on("dblclick.zoom", null).call(n.transform, a.value);
|
|
@@ -1811,13 +1815,13 @@ function Sn(e) {
|
|
|
1811
1815
|
}
|
|
1812
1816
|
//#endregion
|
|
1813
1817
|
//#region src/components/core/useWaveformChartLifecycle.ts
|
|
1814
|
-
function
|
|
1818
|
+
function wn(e) {
|
|
1815
1819
|
return e instanceof Element && !!e.closest("button, input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
1816
1820
|
}
|
|
1817
|
-
function
|
|
1821
|
+
function Tn(e) {
|
|
1818
1822
|
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, innerWidth: w, innerHeight: T, activeInteractionMode: D, hiddenSeriesIdSet: O, internalHiddenSeriesIds: k, independentTransforms: A, independentYDomains: j, annotationInteraction: M, editorSeriesOptions: N, isPresentationMode: P, clearHover: F, cancelAnnotation: I, configureZoom: L, resetViewport: R, cancelViewportDrag: z, cancelPendingHover: B, clearZoomBindings: V } = e;
|
|
1819
1823
|
function H(e) {
|
|
1820
|
-
P.value || e.code !== "Space" || !t.pannable || !_.value ||
|
|
1824
|
+
P.value || e.code !== "Space" || !t.pannable || !_.value || wn(e.target) || (g.value = !0, e.preventDefault());
|
|
1821
1825
|
}
|
|
1822
1826
|
function ee(e) {
|
|
1823
1827
|
e.code === "Space" && (g.value = !1);
|
|
@@ -1908,39 +1912,39 @@ function wn(e) {
|
|
|
1908
1912
|
}
|
|
1909
1913
|
//#endregion
|
|
1910
1914
|
//#region src/components/core/useWaveformData.ts
|
|
1911
|
-
function
|
|
1915
|
+
function En(e, t = !1) {
|
|
1912
1916
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity, o = !1;
|
|
1913
1917
|
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) {
|
|
1914
|
-
let e =
|
|
1918
|
+
let e = At(s);
|
|
1915
1919
|
(e.lower !== 0 || e.upper !== 0) && (o = !0), i = Math.min(i, s.y - e.lower), a = Math.max(a, s.y + e.upper);
|
|
1916
1920
|
}
|
|
1917
1921
|
return {
|
|
1918
|
-
xDomain:
|
|
1919
|
-
yDomain:
|
|
1922
|
+
xDomain: $(Number.isFinite(n) ? [n, r] : []),
|
|
1923
|
+
yDomain: $(Number.isFinite(i) ? [i, a] : []),
|
|
1920
1924
|
hasErrorPoints: o
|
|
1921
1925
|
};
|
|
1922
1926
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
1925
|
-
let t =
|
|
1927
|
+
function Dn(e) {
|
|
1928
|
+
return Mt(e).map((e) => {
|
|
1929
|
+
let t = En(e.points, e.errorBar.visible);
|
|
1926
1930
|
return {
|
|
1927
1931
|
...e,
|
|
1928
1932
|
...t
|
|
1929
1933
|
};
|
|
1930
1934
|
});
|
|
1931
1935
|
}
|
|
1932
|
-
function
|
|
1933
|
-
let n = x(
|
|
1936
|
+
function On(e, t) {
|
|
1937
|
+
let n = x(Dn(e()));
|
|
1934
1938
|
return E(e, (e) => {
|
|
1935
|
-
n.value =
|
|
1939
|
+
n.value = Dn(e), t();
|
|
1936
1940
|
}), n;
|
|
1937
1941
|
}
|
|
1938
1942
|
//#endregion
|
|
1939
1943
|
//#region src/components/core/useWaveformLayout.ts
|
|
1940
|
-
function
|
|
1944
|
+
function kn(e) {
|
|
1941
1945
|
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) => ({
|
|
1942
1946
|
...e,
|
|
1943
|
-
color: e.color ?? (t === 0 ? n.lineColor :
|
|
1947
|
+
color: e.color ?? (t === 0 ? n.lineColor : _t[t % _t.length])
|
|
1944
1948
|
}))), h = t(() => {
|
|
1945
1949
|
let e = /* @__PURE__ */ new Map();
|
|
1946
1950
|
return m.value.forEach((t) => {
|
|
@@ -1954,12 +1958,12 @@ function On(e) {
|
|
|
1954
1958
|
id: e,
|
|
1955
1959
|
series: t,
|
|
1956
1960
|
visibleSeries: n,
|
|
1957
|
-
xDomain:
|
|
1958
|
-
yDomain:
|
|
1961
|
+
xDomain: $(r),
|
|
1962
|
+
yDomain: $(i)
|
|
1959
1963
|
};
|
|
1960
1964
|
});
|
|
1961
|
-
}), g = t(() =>
|
|
1962
|
-
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) =>
|
|
1965
|
+
}), g = t(() => Kt(n.grid)), _ = t(() => Pt(n.rendering)), v = t(() => Jt(h.value.length, g.value)), y = t(() => Yt(h.value, i.value, g.value)), b = t(() => {
|
|
1966
|
+
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => ln(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) => {
|
|
1963
1967
|
let t = B(e.domain, [1, 0]);
|
|
1964
1968
|
e.fixed || t.nice();
|
|
1965
1969
|
let [n, r] = t.domain();
|
|
@@ -1976,8 +1980,8 @@ function On(e) {
|
|
|
1976
1980
|
fullClearance: t + 7 + i + 6 + 24 + 4,
|
|
1977
1981
|
labelCenterX: o
|
|
1978
1982
|
};
|
|
1979
|
-
}), 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(
|
|
1980
|
-
let r =
|
|
1983
|
+
}), 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) => {
|
|
1984
|
+
let r = mn(t, n.overlayMode, n.yDomain, n.yDomains);
|
|
1981
1985
|
return {
|
|
1982
1986
|
left: Math.max(e.left, r.left),
|
|
1983
1987
|
right: Math.max(e.right, r.right)
|
|
@@ -1985,8 +1989,8 @@ function On(e) {
|
|
|
1985
1989
|
}, {
|
|
1986
1990
|
left: 0,
|
|
1987
1991
|
right: 0
|
|
1988
|
-
})), T = t(() => n.overlayMode === "multi-axis" ? Math.max(C.value, w.value.left) : C.value), E = t(() => n.overlayMode === "multi-axis" ? Math.max(
|
|
1989
|
-
let e =
|
|
1992
|
+
})), T = t(() => n.overlayMode === "multi-axis" ? Math.max(C.value, w.value.left) : C.value), E = t(() => n.overlayMode === "multi-axis" ? Math.max(pt.right, w.value.right) : pt.right), D = t(() => Math.max(0, o.value - T.value - E.value)), O = t(() => {
|
|
1993
|
+
let e = Xt(n.displayMode), t = g.value.columnCount, r = t > 1, i = Math.max(e, b.value.fullClearance), a = Math.max(e, b.value.tickClearance), o = (D.value - i * Math.max(0, t - 1)) / t >= 120;
|
|
1990
1994
|
return {
|
|
1991
1995
|
horizontalGap: n.overlayMode === "multi-axis" && r && S.value ? Math.max(e, w.value.left + w.value.right) : r && S.value ? x.value && o ? i : a : e,
|
|
1992
1996
|
hideSecondaryLabels: n.overlayMode !== "multi-axis" && r && x.value && !o
|
|
@@ -1995,17 +1999,17 @@ function On(e) {
|
|
|
1995
1999
|
let e = [];
|
|
1996
2000
|
return h.value.forEach((t) => {
|
|
1997
2001
|
t.visibleSeries.length && e.push(t.xDomain[0], t.xDomain[1]);
|
|
1998
|
-
}),
|
|
2002
|
+
}), $(e);
|
|
1999
2003
|
}), F = t(() => {
|
|
2000
2004
|
let e = n.initialXDomain;
|
|
2001
2005
|
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;
|
|
2002
2006
|
}), I = (e) => {
|
|
2003
2007
|
let t = n.initialXDomains?.[e.series.trackId ?? e.series.id] ?? n.initialXDomains?.[e.series.id] ?? n.initialXDomain;
|
|
2004
|
-
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? t[0] < t[1] ? t : [t[1], t[0]] :
|
|
2005
|
-
}, L = t(() => l.value.rescaleX(B(F.value, [0, D.value])).domain()), R = t(() =>
|
|
2008
|
+
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));
|
|
2009
|
+
}, L = t(() => l.value.rescaleX(B(F.value, [0, D.value])).domain()), R = t(() => Zt(D.value, s.value, g.value, n.displayMode, y.value.map(Boolean), O.value.horizontalGap).map((e, t) => ({
|
|
2006
2010
|
...e,
|
|
2007
2011
|
series: y.value[t]
|
|
2008
|
-
}))), z = t(() =>
|
|
2012
|
+
}))), z = t(() => $t({
|
|
2009
2013
|
cells: R.value,
|
|
2010
2014
|
grid: g.value,
|
|
2011
2015
|
displayMode: n.displayMode,
|
|
@@ -2068,13 +2072,13 @@ function On(e) {
|
|
|
2068
2072
|
}
|
|
2069
2073
|
};
|
|
2070
2074
|
}
|
|
2071
|
-
var
|
|
2072
|
-
function
|
|
2075
|
+
var An = 1e-6;
|
|
2076
|
+
function jn(e) {
|
|
2073
2077
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
2074
2078
|
}
|
|
2075
|
-
function
|
|
2076
|
-
let i =
|
|
2077
|
-
if (!(d >
|
|
2079
|
+
function Mn({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r }) {
|
|
2080
|
+
let i = jn(e), a = jn(t), o = jn(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;
|
|
2081
|
+
if (!(d > An && Math.abs(d - 360) > An)) {
|
|
2078
2082
|
let e = Math.max(1, Math.ceil(i / o)), t = o, n = a * e;
|
|
2079
2083
|
return {
|
|
2080
2084
|
textWidth: t,
|
|
@@ -2099,7 +2103,7 @@ function jn({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r
|
|
|
2099
2103
|
}
|
|
2100
2104
|
//#endregion
|
|
2101
2105
|
//#region src/components/core/useWaveformPresentation.ts
|
|
2102
|
-
function
|
|
2106
|
+
function Nn(e) {
|
|
2103
2107
|
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(() => ({
|
|
2104
2108
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
2105
2109
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -2107,9 +2111,9 @@ function Mn(e) {
|
|
|
2107
2111
|
let e = n.zeroLine.width;
|
|
2108
2112
|
return {
|
|
2109
2113
|
visible: n.zeroLine.visible === !0,
|
|
2110
|
-
color: n.zeroLine.color ||
|
|
2111
|
-
width: typeof e == "number" && Number.isFinite(e) && e > 0 ? e :
|
|
2112
|
-
dash: n.zeroLine.dash ??
|
|
2114
|
+
color: n.zeroLine.color || yt.COLOR,
|
|
2115
|
+
width: typeof e == "number" && Number.isFinite(e) && e > 0 ? e : yt.WIDTH,
|
|
2116
|
+
dash: n.zeroLine.dash ?? yt.DASH
|
|
2113
2117
|
};
|
|
2114
2118
|
}), _ = t(() => n.legend.backgroundColor || "rgba(255, 255, 255, 0.7)"), v = t(() => n.legend.interactive === !0), y = t(() => n.hiddenSeriesIds === void 0 ? s.value : new Set(n.hiddenSeriesIds)), b = t(() => Array.from(y.value)), x = (e) => n.legend.trackPositions?.[e] ?? n.legend.position ?? "top-right", S = (e) => {
|
|
2115
2119
|
let t = n.legend.orientation ?? "auto";
|
|
@@ -2131,10 +2135,10 @@ function Mn(e) {
|
|
|
2131
2135
|
fontStyle: n.title?.textStyle?.fontStyle ?? "normal",
|
|
2132
2136
|
textDecoration: n.title?.textStyle?.textDecoration ?? "none",
|
|
2133
2137
|
letterSpacing: n.title?.textStyle?.letterSpacing ?? "normal",
|
|
2134
|
-
lineHeight: String(
|
|
2138
|
+
lineHeight: String(gt)
|
|
2135
2139
|
})), A = t(() => {
|
|
2136
2140
|
let e = Number.parseFloat(n.title?.textStyle?.letterSpacing ?? ""), t = Number.isFinite(e) ? Math.max(0, C.value.length - 1) * e : 0;
|
|
2137
|
-
return Math.max(1, C.value.length * E.value *
|
|
2141
|
+
return Math.max(1, C.value.length * E.value * ht + t);
|
|
2138
2142
|
}), j = t(() => {
|
|
2139
2143
|
let e = d.value - 48;
|
|
2140
2144
|
return e > 0 ? e : A.value;
|
|
@@ -2144,12 +2148,12 @@ function Mn(e) {
|
|
|
2144
2148
|
maxWidth: O.value ? "none" : `${j.value}px`,
|
|
2145
2149
|
whiteSpace: O.value ? "nowrap" : "normal",
|
|
2146
2150
|
overflowWrap: O.value ? "normal" : "anywhere"
|
|
2147
|
-
})), N = t(() =>
|
|
2151
|
+
})), N = t(() => Mn({
|
|
2148
2152
|
naturalWidth: a.value || A.value,
|
|
2149
2153
|
naturalHeight: o.value || E.value * 1.2,
|
|
2150
2154
|
availableWidth: j.value,
|
|
2151
2155
|
rotation: D.value
|
|
2152
|
-
})), P = t(() => w.value ? N.value.areaHeight : 0), F = t(() =>
|
|
2156
|
+
})), P = t(() => w.value ? N.value.areaHeight : 0), F = t(() => pt.top), I = t(() => Math.max(0, f.value - P.value - c.value));
|
|
2153
2157
|
return {
|
|
2154
2158
|
fixedWidth: l,
|
|
2155
2159
|
fixedHeight: u,
|
|
@@ -2173,7 +2177,7 @@ function Mn(e) {
|
|
|
2173
2177
|
titleAreaHeight: P,
|
|
2174
2178
|
chartTopMargin: F,
|
|
2175
2179
|
drawingHeight: I,
|
|
2176
|
-
innerHeight: t(() => Math.max(0, I.value -
|
|
2180
|
+
innerHeight: t(() => Math.max(0, I.value - pt.top - pt.bottom)),
|
|
2177
2181
|
titleAreaStyle: t(() => ({
|
|
2178
2182
|
height: `${P.value}px`,
|
|
2179
2183
|
justifyContent: n.title?.align === "left" ? "flex-start" : n.title?.align === "right" ? "flex-end" : "center"
|
|
@@ -2195,10 +2199,10 @@ function Mn(e) {
|
|
|
2195
2199
|
}
|
|
2196
2200
|
//#endregion
|
|
2197
2201
|
//#region src/components/core/useWaveformChartController.ts
|
|
2198
|
-
function
|
|
2202
|
+
function Pn(e, t) {
|
|
2199
2203
|
e.value = t instanceof Element ? t : void 0;
|
|
2200
2204
|
}
|
|
2201
|
-
function
|
|
2205
|
+
function Fn(e, t) {
|
|
2202
2206
|
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(U), p = x([]), m = v({}), h = v({}), g = b({
|
|
2203
2207
|
points: [],
|
|
2204
2208
|
trackIndex: null,
|
|
@@ -2206,11 +2210,11 @@ function Pn(e, t) {
|
|
|
2206
2210
|
x: 0,
|
|
2207
2211
|
y: 0
|
|
2208
2212
|
}
|
|
2209
|
-
}), y = v(!1), S = v(1), w = x(), T = se("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ge(), A = v([]), j =
|
|
2213
|
+
}), y = v(!1), S = v(1), w = x(), T = se("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ge(), A = v([]), j = Sn();
|
|
2210
2214
|
E([() => e.yDomain, () => e.yDomains], () => {
|
|
2211
2215
|
m.value = {}, h.value = {};
|
|
2212
2216
|
}, { deep: !0 });
|
|
2213
|
-
let M = v(null), N = v(!1), P = v(!1), F = () => void 0, I =
|
|
2217
|
+
let M = v(null), N = v(!1), P = v(!1), F = () => void 0, I = On(() => e.data, () => F()), L = Nn({
|
|
2214
2218
|
props: e,
|
|
2215
2219
|
observedWidth: o,
|
|
2216
2220
|
observedHeight: s,
|
|
@@ -2218,24 +2222,24 @@ function Pn(e, t) {
|
|
|
2218
2222
|
measuredTitleHeight: l,
|
|
2219
2223
|
internalHiddenSeriesIds: O,
|
|
2220
2224
|
paginationBandHeight: d
|
|
2221
|
-
}), { chartWidth: R, chartHeight: z, isCleanView: B, isPresentationMode: V, hiddenSeriesIdSet: H, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight:
|
|
2225
|
+
}), { chartWidth: R, chartHeight: z, isCleanView: B, isPresentationMode: V, hiddenSeriesIdSet: H, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: W } = L, ae = kn({
|
|
2222
2226
|
props: e,
|
|
2223
2227
|
preparedSeries: I,
|
|
2224
2228
|
currentPage: S,
|
|
2225
2229
|
hiddenSeriesIdSet: H,
|
|
2226
2230
|
chartWidth: R,
|
|
2227
|
-
innerHeight:
|
|
2231
|
+
innerHeight: W,
|
|
2228
2232
|
isCleanView: B,
|
|
2229
2233
|
sharedTransform: f,
|
|
2230
2234
|
independentTransforms: p,
|
|
2231
2235
|
sharedYDomains: m,
|
|
2232
2236
|
independentYDomains: h,
|
|
2233
2237
|
annotationInteraction: u(k)
|
|
2234
|
-
}), { chartSeries:
|
|
2238
|
+
}), { chartSeries: G, chartTracks: oe, gridOptions: ce, pageCount: le, pagedTracks: ue, resolvedChartLeftMargin: de, innerWidth: K, hasChartArea: fe, activeInteractionMode: pe, isZoomMode: me, initialXDomain: he, sharedZoomDomain: ge, resolveInitialTrackDomain: q, trackLayouts: _e, annotationLayoutsForTrack: ve, resolveSeriesYScale: ye } = ae;
|
|
2235
2239
|
D(() => {
|
|
2236
|
-
d.value =
|
|
2240
|
+
d.value = ce.value.showPagination && le.value > 1 && R.value <= 520 ? 40 : 0;
|
|
2237
2241
|
});
|
|
2238
|
-
let J =
|
|
2242
|
+
let J = Cn({
|
|
2239
2243
|
props: e,
|
|
2240
2244
|
emit: t,
|
|
2241
2245
|
svgElement: r,
|
|
@@ -2243,20 +2247,20 @@ function Pn(e, t) {
|
|
|
2243
2247
|
sharedTransform: f,
|
|
2244
2248
|
independentTransforms: p,
|
|
2245
2249
|
trackLayouts: _e,
|
|
2246
|
-
initialXDomain:
|
|
2250
|
+
initialXDomain: he,
|
|
2247
2251
|
sharedZoomDomain: ge,
|
|
2248
|
-
innerWidth:
|
|
2249
|
-
innerHeight:
|
|
2250
|
-
hasChartArea:
|
|
2251
|
-
isZoomMode:
|
|
2252
|
+
innerWidth: K,
|
|
2253
|
+
innerHeight: W,
|
|
2254
|
+
hasChartArea: fe,
|
|
2255
|
+
isZoomMode: me,
|
|
2252
2256
|
isPresentationMode: V,
|
|
2253
2257
|
resolveInitialTrackDomain: q,
|
|
2254
|
-
cancelPendingHover: () =>
|
|
2255
|
-
}),
|
|
2258
|
+
cancelPendingHover: () => X.cancelPendingHover()
|
|
2259
|
+
}), Y = vn({
|
|
2256
2260
|
props: e,
|
|
2257
2261
|
emit: t,
|
|
2258
2262
|
container: n,
|
|
2259
|
-
chartSeries:
|
|
2263
|
+
chartSeries: G,
|
|
2260
2264
|
hiddenSeriesIdSet: H,
|
|
2261
2265
|
internalHiddenSeriesIds: O,
|
|
2262
2266
|
annotationInteraction: k,
|
|
@@ -2266,28 +2270,28 @@ function Pn(e, t) {
|
|
|
2266
2270
|
resolveSeriesYScale: ye,
|
|
2267
2271
|
chartWidth: R,
|
|
2268
2272
|
chartHeight: z,
|
|
2269
|
-
innerWidth:
|
|
2270
|
-
resolvedChartLeftMargin:
|
|
2273
|
+
innerWidth: K,
|
|
2274
|
+
resolvedChartLeftMargin: de,
|
|
2271
2275
|
titleAreaHeight: re,
|
|
2272
2276
|
chartTopMargin: ie,
|
|
2273
|
-
activeInteractionMode:
|
|
2277
|
+
activeInteractionMode: pe,
|
|
2274
2278
|
isPresentationMode: V
|
|
2275
|
-
}),
|
|
2279
|
+
}), be = xn({
|
|
2276
2280
|
props: e,
|
|
2277
2281
|
emit: t,
|
|
2278
2282
|
selection: M,
|
|
2279
2283
|
spacePressed: N,
|
|
2280
2284
|
trackLayouts: _e,
|
|
2281
|
-
chartTracks:
|
|
2282
|
-
initialXDomain:
|
|
2283
|
-
innerWidth:
|
|
2284
|
-
innerHeight:
|
|
2285
|
+
chartTracks: oe,
|
|
2286
|
+
initialXDomain: he,
|
|
2287
|
+
innerWidth: K,
|
|
2288
|
+
innerHeight: W,
|
|
2285
2289
|
sharedOverlayElement: a,
|
|
2286
2290
|
sharedTransform: f,
|
|
2287
2291
|
independentTransforms: p,
|
|
2288
2292
|
sharedYDomains: m,
|
|
2289
2293
|
independentYDomains: h,
|
|
2290
|
-
isZoomMode:
|
|
2294
|
+
isZoomMode: me,
|
|
2291
2295
|
isPresentationMode: V,
|
|
2292
2296
|
editorSeriesOptions: A,
|
|
2293
2297
|
resolveInitialTrackDomain: q,
|
|
@@ -2295,24 +2299,24 @@ function Pn(e, t) {
|
|
|
2295
2299
|
canZoomSharedTracks: J.canZoomSharedTracks,
|
|
2296
2300
|
configureZoom: J.configureZoom,
|
|
2297
2301
|
cancelPendingZoom: J.cancelPendingZoom,
|
|
2298
|
-
clearHover: () =>
|
|
2299
|
-
resolveTrackAtPointer:
|
|
2300
|
-
}),
|
|
2302
|
+
clearHover: () => X.clearHover(),
|
|
2303
|
+
resolveTrackAtPointer: Y.resolveTrackAtPointer
|
|
2304
|
+
}), X = bn({
|
|
2301
2305
|
emit: t,
|
|
2302
2306
|
hoverState: g,
|
|
2303
2307
|
suppressHoverUntilMove: y,
|
|
2304
2308
|
hoverThrottle: j,
|
|
2305
2309
|
selection: M,
|
|
2306
2310
|
trackLayouts: _e,
|
|
2307
|
-
innerWidth:
|
|
2308
|
-
resolvedChartLeftMargin:
|
|
2311
|
+
innerWidth: K,
|
|
2312
|
+
resolvedChartLeftMargin: de,
|
|
2309
2313
|
titleAreaHeight: re,
|
|
2310
2314
|
chartTopMargin: ie,
|
|
2311
2315
|
sharedOverlayElement: a,
|
|
2312
2316
|
isPresentationMode: V,
|
|
2313
|
-
updateViewportDrag:
|
|
2314
|
-
resolveTrackAtPointer:
|
|
2315
|
-
}),
|
|
2317
|
+
updateViewportDrag: be.updateViewportDrag,
|
|
2318
|
+
resolveTrackAtPointer: Y.resolveTrackAtPointer
|
|
2319
|
+
}), xe = Tn({
|
|
2316
2320
|
props: e,
|
|
2317
2321
|
emit: t,
|
|
2318
2322
|
container: n,
|
|
@@ -2328,14 +2332,14 @@ function Pn(e, t) {
|
|
|
2328
2332
|
spacePressed: N,
|
|
2329
2333
|
pointerInsideChart: P,
|
|
2330
2334
|
currentPage: S,
|
|
2331
|
-
pageCount:
|
|
2332
|
-
pagedTracks:
|
|
2333
|
-
gridOptions:
|
|
2334
|
-
chartSeries:
|
|
2335
|
-
chartTracks:
|
|
2336
|
-
innerWidth:
|
|
2337
|
-
innerHeight:
|
|
2338
|
-
activeInteractionMode:
|
|
2335
|
+
pageCount: le,
|
|
2336
|
+
pagedTracks: ue,
|
|
2337
|
+
gridOptions: ce,
|
|
2338
|
+
chartSeries: G,
|
|
2339
|
+
chartTracks: oe,
|
|
2340
|
+
innerWidth: K,
|
|
2341
|
+
innerHeight: W,
|
|
2342
|
+
activeInteractionMode: pe,
|
|
2339
2343
|
hiddenSeriesIdSet: H,
|
|
2340
2344
|
internalHiddenSeriesIds: O,
|
|
2341
2345
|
independentTransforms: p,
|
|
@@ -2343,23 +2347,23 @@ function Pn(e, t) {
|
|
|
2343
2347
|
annotationInteraction: k,
|
|
2344
2348
|
editorSeriesOptions: A,
|
|
2345
2349
|
isPresentationMode: V,
|
|
2346
|
-
clearHover:
|
|
2347
|
-
cancelAnnotation:
|
|
2350
|
+
clearHover: X.clearHover,
|
|
2351
|
+
cancelAnnotation: Y.cancelAnnotation,
|
|
2348
2352
|
configureZoom: J.configureZoom,
|
|
2349
|
-
resetViewport:
|
|
2350
|
-
cancelViewportDrag:
|
|
2351
|
-
cancelPendingHover:
|
|
2353
|
+
resetViewport: be.resetViewport,
|
|
2354
|
+
cancelViewportDrag: be.cancelViewportDrag,
|
|
2355
|
+
cancelPendingHover: X.cancelPendingHover,
|
|
2352
2356
|
clearZoomBindings: J.clearZoomBindings
|
|
2353
2357
|
});
|
|
2354
|
-
return F =
|
|
2358
|
+
return F = xe.handleDataReferenceChange, _({
|
|
2355
2359
|
...C(e),
|
|
2356
2360
|
...L,
|
|
2357
|
-
...
|
|
2358
|
-
...be,
|
|
2359
|
-
...xe,
|
|
2361
|
+
...ae,
|
|
2360
2362
|
...Y,
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
+
...be,
|
|
2364
|
+
...X,
|
|
2365
|
+
margin: pt,
|
|
2366
|
+
getPageSize: qt,
|
|
2363
2367
|
currentPage: S,
|
|
2364
2368
|
selection: M,
|
|
2365
2369
|
pointerInsideChart: P,
|
|
@@ -2369,32 +2373,32 @@ function Pn(e, t) {
|
|
|
2369
2373
|
contextMenu: k.contextMenu,
|
|
2370
2374
|
editorSeriesOptions: A,
|
|
2371
2375
|
clipPathId: T,
|
|
2372
|
-
goToPage:
|
|
2373
|
-
setContainer: (e) =>
|
|
2374
|
-
setSvgElement: (e) =>
|
|
2375
|
-
setTitleMeasureElement: (e) =>
|
|
2376
|
-
setSharedOverlayElement: (e) =>
|
|
2376
|
+
goToPage: xe.goToPage,
|
|
2377
|
+
setContainer: (e) => Pn(n, e),
|
|
2378
|
+
setSvgElement: (e) => Pn(r, e),
|
|
2379
|
+
setTitleMeasureElement: (e) => Pn(i, e),
|
|
2380
|
+
setSharedOverlayElement: (e) => Pn(a, e)
|
|
2377
2381
|
});
|
|
2378
2382
|
}
|
|
2379
2383
|
//#endregion
|
|
2380
2384
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
2381
|
-
var
|
|
2385
|
+
var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel" }, Rn = { class: "waveform-annotation-editor__header" }, zn = ["id"], Bn = {
|
|
2382
2386
|
class: "waveform-annotation-editor__coordinates",
|
|
2383
2387
|
"aria-label": "标注坐标"
|
|
2384
|
-
},
|
|
2388
|
+
}, Vn = {
|
|
2385
2389
|
key: 0,
|
|
2386
2390
|
class: "waveform-annotation-editor__series",
|
|
2387
2391
|
"aria-label": "标注所属波形"
|
|
2388
|
-
},
|
|
2392
|
+
}, Hn = { class: "waveform-annotation-editor__series-label" }, Un = ["value"], Wn = ["value"], Gn = { key: 1 }, Kn = { class: "waveform-annotation-editor__field" }, qn = { class: "waveform-annotation-editor__label-row" }, Jn = ["maxlength"], Yn = { class: "waveform-annotation-editor__colors" }, Xn = {
|
|
2389
2393
|
class: "waveform-annotation-editor__color-field",
|
|
2390
2394
|
title: "调整标注边框色和透明度"
|
|
2391
|
-
},
|
|
2395
|
+
}, Zn = {
|
|
2392
2396
|
class: "waveform-annotation-editor__color-field",
|
|
2393
2397
|
title: "调整标注文字色和透明度"
|
|
2394
|
-
},
|
|
2398
|
+
}, Qn = {
|
|
2395
2399
|
class: "waveform-annotation-editor__color-field",
|
|
2396
2400
|
title: "调整标注背景色和透明度"
|
|
2397
|
-
},
|
|
2401
|
+
}, $n = { class: "waveform-annotation-editor__actions" }, er = ["disabled"], tr = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
2398
2402
|
__name: "WaveformAnnotationEditor",
|
|
2399
2403
|
props: {
|
|
2400
2404
|
annotation: {},
|
|
@@ -2419,7 +2423,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2419
2423
|
} : c.series;
|
|
2420
2424
|
});
|
|
2421
2425
|
function A() {
|
|
2422
|
-
let e =
|
|
2426
|
+
let e = xe(c.annotation.style);
|
|
2423
2427
|
m.value = c.annotation.text, h.value = e.borderColor, _.value = e.textColor, b.value = e.backgroundColor, d(() => u.value?.focus());
|
|
2424
2428
|
}
|
|
2425
2429
|
E(() => c.annotation, A, { immediate: !0 });
|
|
@@ -2447,21 +2451,21 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2447
2451
|
"aria-modal": "true",
|
|
2448
2452
|
"aria-labelledby": w(f),
|
|
2449
2453
|
onClick: n[6] ||= k((e) => l("cancel"), ["self"])
|
|
2450
|
-
}, [a("section",
|
|
2451
|
-
a("header",
|
|
2454
|
+
}, [a("section", Ln, [
|
|
2455
|
+
a("header", Rn, [a("div", null, [a("h2", { id: w(f) }, S(c.mode === "add" ? "添加标注" : "编辑标注"), 9, zn)]), a("button", {
|
|
2452
2456
|
type: "button",
|
|
2453
2457
|
class: "waveform-annotation-editor__close",
|
|
2454
2458
|
"aria-label": "关闭标注编辑器",
|
|
2455
2459
|
title: "关闭",
|
|
2456
2460
|
onClick: n[0] ||= (e) => l("cancel")
|
|
2457
2461
|
}, " × ")]),
|
|
2458
|
-
a("div",
|
|
2459
|
-
D.value ? (g(), i("label",
|
|
2462
|
+
a("div", Bn, [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)])]),
|
|
2463
|
+
D.value ? (g(), i("label", Vn, [
|
|
2460
2464
|
a("i", {
|
|
2461
2465
|
style: p({ backgroundColor: D.value.color }),
|
|
2462
2466
|
"aria-hidden": "true"
|
|
2463
2467
|
}, null, 4),
|
|
2464
|
-
a("span",
|
|
2468
|
+
a("span", Hn, [n[8] ||= a("small", null, "标注波形", -1), a("b", null, S(D.value.name), 1)]),
|
|
2465
2469
|
c.seriesOptions?.length ? (g(), i("select", {
|
|
2466
2470
|
key: 0,
|
|
2467
2471
|
value: c.annotation.seriesId,
|
|
@@ -2470,9 +2474,9 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2470
2474
|
}, [(g(!0), i(e, null, y(c.seriesOptions, (e) => (g(), i("option", {
|
|
2471
2475
|
key: e.seriesId,
|
|
2472
2476
|
value: e.seriesId
|
|
2473
|
-
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9,
|
|
2477
|
+
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9, Wn))), 128))], 40, Un)) : D.value.unit ? (g(), i("code", Gn, S(D.value.unit), 1)) : r("", !0)
|
|
2474
2478
|
])) : r("", !0),
|
|
2475
|
-
a("label",
|
|
2479
|
+
a("label", Kn, [a("span", qn, [n[9] ||= a("b", null, "标注文本", -1), a("small", null, S(C.value) + "/" + S(w(40)), 1)]), O(a("textarea", {
|
|
2476
2480
|
ref_key: "textarea",
|
|
2477
2481
|
ref: u,
|
|
2478
2482
|
"onUpdate:modelValue": n[1] ||= (e) => m.value = e,
|
|
@@ -2481,10 +2485,10 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2481
2485
|
"aria-label": "标注文本",
|
|
2482
2486
|
placeholder: "输入这处波形的说明",
|
|
2483
2487
|
onKeydown: M
|
|
2484
|
-
}, null, 40,
|
|
2485
|
-
a("fieldset",
|
|
2488
|
+
}, null, 40, Jn), [[T, m.value]])]),
|
|
2489
|
+
a("fieldset", Yn, [
|
|
2486
2490
|
n[13] ||= a("legend", null, "颜色与透明度", -1),
|
|
2487
|
-
a("label",
|
|
2491
|
+
a("label", Xn, [n[10] ||= a("span", null, "边框色", -1), s(w(G), {
|
|
2488
2492
|
"pure-color": h.value,
|
|
2489
2493
|
"onUpdate:pureColor": n[2] ||= (e) => h.value = e,
|
|
2490
2494
|
"aria-label": "标注边框色",
|
|
@@ -2494,7 +2498,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2494
2498
|
"disable-alpha": !1,
|
|
2495
2499
|
"blur-close": !0
|
|
2496
2500
|
}, null, 8, ["pure-color"])]),
|
|
2497
|
-
a("label",
|
|
2501
|
+
a("label", Zn, [n[11] ||= a("span", null, "文字色", -1), s(w(G), {
|
|
2498
2502
|
"pure-color": _.value,
|
|
2499
2503
|
"onUpdate:pureColor": n[3] ||= (e) => _.value = e,
|
|
2500
2504
|
"aria-label": "标注文字色",
|
|
@@ -2504,7 +2508,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2504
2508
|
"disable-alpha": !1,
|
|
2505
2509
|
"blur-close": !0
|
|
2506
2510
|
}, null, 8, ["pure-color"])]),
|
|
2507
|
-
a("label",
|
|
2511
|
+
a("label", Qn, [n[12] ||= a("span", null, "背景色", -1), s(w(G), {
|
|
2508
2512
|
"pure-color": b.value,
|
|
2509
2513
|
"onUpdate:pureColor": n[4] ||= (e) => b.value = e,
|
|
2510
2514
|
"aria-label": "标注背景色",
|
|
@@ -2515,7 +2519,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2515
2519
|
"blur-close": !0
|
|
2516
2520
|
}, null, 8, ["pure-color"])])
|
|
2517
2521
|
]),
|
|
2518
|
-
a("footer",
|
|
2522
|
+
a("footer", $n, [a("button", {
|
|
2519
2523
|
type: "button",
|
|
2520
2524
|
onClick: n[5] ||= (e) => l("cancel")
|
|
2521
2525
|
}, "取消"), a("button", {
|
|
@@ -2523,10 +2527,10 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2523
2527
|
class: "is-primary",
|
|
2524
2528
|
disabled: !x.value,
|
|
2525
2529
|
onClick: j
|
|
2526
|
-
}, " 保存标注 ", 8,
|
|
2527
|
-
])], 8,
|
|
2530
|
+
}, " 保存标注 ", 8, er)])
|
|
2531
|
+
])], 8, In));
|
|
2528
2532
|
}
|
|
2529
|
-
}), [["__scopeId", "data-v-52818b45"]]),
|
|
2533
|
+
}), [["__scopeId", "data-v-52818b45"]]), nr = { class: "waveform-tooltip__time waveform-chart__tooltip-time" }, rr = { key: 0 }, ir = { class: "waveform-tooltip__value" }, ar = { key: 0 }, or = 12, sr = 8, cr = 238, lr = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
2530
2534
|
__name: "WaveformTooltip",
|
|
2531
2535
|
props: {
|
|
2532
2536
|
visible: { type: Boolean },
|
|
@@ -2540,30 +2544,30 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2540
2544
|
setup(n) {
|
|
2541
2545
|
let s = n, c = t(() => {
|
|
2542
2546
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
2543
|
-
let e = 44 + s.seriesPoints.length * 22, t = s.position.x +
|
|
2547
|
+
let e = 44 + s.seriesPoints.length * 22, t = s.position.x + or, n = s.position.x - or - cr;
|
|
2544
2548
|
return {
|
|
2545
|
-
...t +
|
|
2549
|
+
...t + cr <= s.containerWidth - sr ? { left: `${t}px` } : n >= sr ? { right: `${s.containerWidth - s.position.x + or}px` } : { left: `${sr}px` },
|
|
2546
2550
|
top: `${Math.max(8, Math.min(s.position.y - 18, s.containerHeight - e - 8))}px`
|
|
2547
2551
|
};
|
|
2548
2552
|
});
|
|
2549
2553
|
function l(e) {
|
|
2550
|
-
let { lower: t, upper: n } =
|
|
2554
|
+
let { lower: t, upper: n } = At(e);
|
|
2551
2555
|
return t === 0 && n === 0 ? null : `(+${rt(n)} / -${rt(t)})`;
|
|
2552
2556
|
}
|
|
2553
2557
|
return (t, s) => n.visible && n.hoveredPoint ? (g(), i("div", {
|
|
2554
2558
|
key: 0,
|
|
2555
2559
|
class: "waveform-tooltip waveform-chart__tooltip",
|
|
2556
2560
|
style: p(c.value)
|
|
2557
|
-
}, [a("span",
|
|
2561
|
+
}, [a("span", nr, S(n.timeUnit) + ": " + S(w(lt)(n.hoveredPoint.x, n.timeUnit)), 1), (g(!0), i(e, null, y(n.seriesPoints, (e) => (g(), i("span", {
|
|
2558
2562
|
key: `${e.trackIndex}-${e.name}`,
|
|
2559
2563
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
2560
2564
|
}, [
|
|
2561
2565
|
a("i", { style: p({ backgroundColor: e.color }) }, null, 4),
|
|
2562
|
-
e.name ? (g(), i("strong",
|
|
2563
|
-
a("span",
|
|
2566
|
+
e.name ? (g(), i("strong", rr, S(e.name) + ":", 1)) : r("", !0),
|
|
2567
|
+
a("span", ir, [o(S(w(rt)(e.point.y)) + S(e.unit ? ` ${e.unit}` : "") + " ", 1), l(e.point) ? (g(), i("small", ar, S(l(e.point)), 1)) : r("", !0)])
|
|
2564
2568
|
]))), 128))], 4)) : r("", !0);
|
|
2565
2569
|
}
|
|
2566
|
-
}), [["__scopeId", "data-v-b8b5592a"]]),
|
|
2570
|
+
}), [["__scopeId", "data-v-b8b5592a"]]), ur = /* @__PURE__ */ c({
|
|
2567
2571
|
__name: "WaveformHoverHost",
|
|
2568
2572
|
props: {
|
|
2569
2573
|
state: {},
|
|
@@ -2574,7 +2578,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2574
2578
|
},
|
|
2575
2579
|
setup(e) {
|
|
2576
2580
|
let r = e, i = t(() => r.state.points[0]?.point ?? null);
|
|
2577
|
-
return (t, r) => (g(), n(
|
|
2581
|
+
return (t, r) => (g(), n(lr, {
|
|
2578
2582
|
visible: e.visible && i.value !== null,
|
|
2579
2583
|
position: e.state.position,
|
|
2580
2584
|
"time-unit": e.timeUnit,
|
|
@@ -2592,16 +2596,16 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2592
2596
|
"container-height"
|
|
2593
2597
|
]));
|
|
2594
2598
|
}
|
|
2595
|
-
}),
|
|
2599
|
+
}), dr = 13, fr = 2, pr = 14, mr = 8, hr = 24, gr = {
|
|
2596
2600
|
circle: ee,
|
|
2597
2601
|
square: ne,
|
|
2598
2602
|
triangle: re,
|
|
2599
2603
|
diamond: te
|
|
2600
2604
|
};
|
|
2601
|
-
function
|
|
2602
|
-
return e === "none" ? null : H().type(
|
|
2605
|
+
function _r(e, t = 48) {
|
|
2606
|
+
return e === "none" ? null : H().type(gr[e]).size(t)() ?? null;
|
|
2603
2607
|
}
|
|
2604
|
-
function
|
|
2608
|
+
function vr(e, t, n = 48) {
|
|
2605
2609
|
if (e === "none" || t.length === 0) return null;
|
|
2606
2610
|
if (e === "circle") {
|
|
2607
2611
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -2618,24 +2622,24 @@ function _r(e, t, n = 48) {
|
|
|
2618
2622
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
2619
2623
|
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("");
|
|
2620
2624
|
}
|
|
2621
|
-
function
|
|
2625
|
+
function yr(e) {
|
|
2622
2626
|
return e === "none" ? null : "M1 8H25";
|
|
2623
2627
|
}
|
|
2624
|
-
function
|
|
2628
|
+
function br(e) {
|
|
2625
2629
|
if (e === "dashed") return "8 5";
|
|
2626
2630
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
2627
2631
|
}
|
|
2628
|
-
function
|
|
2629
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
2632
|
+
function xr(e) {
|
|
2633
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, hr) : mr) / 2, n = dr - t, r = dr + t;
|
|
2630
2634
|
return [
|
|
2631
|
-
`M${n} ${
|
|
2632
|
-
`M${
|
|
2633
|
-
`M${n} ${
|
|
2635
|
+
`M${n} ${fr}H${r}`,
|
|
2636
|
+
`M${dr} ${fr}V${pr}`,
|
|
2637
|
+
`M${n} ${pr}H${r}`
|
|
2634
2638
|
].join("");
|
|
2635
2639
|
}
|
|
2636
2640
|
//#endregion
|
|
2637
2641
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
2638
|
-
var
|
|
2642
|
+
var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
2639
2643
|
"data-series-id",
|
|
2640
2644
|
"data-series-name",
|
|
2641
2645
|
"data-y-axis-index",
|
|
@@ -2644,11 +2648,11 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2644
2648
|
"d",
|
|
2645
2649
|
"stroke",
|
|
2646
2650
|
"stroke-dasharray"
|
|
2647
|
-
],
|
|
2651
|
+
], Tr = ["data-series-id"], Er = [
|
|
2648
2652
|
"d",
|
|
2649
2653
|
"stroke",
|
|
2650
2654
|
"stroke-width"
|
|
2651
|
-
],
|
|
2655
|
+
], Dr = ["data-series-id", "data-point-type"], Or = ["d", "fill"], kr = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
2652
2656
|
__name: "WaveformSeriesLayer",
|
|
2653
2657
|
props: {
|
|
2654
2658
|
track: {},
|
|
@@ -2656,11 +2660,11 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2656
2660
|
},
|
|
2657
2661
|
setup(n) {
|
|
2658
2662
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
2659
|
-
let t =
|
|
2663
|
+
let t = vr(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
2660
2664
|
x: a.track.xScale(t.x),
|
|
2661
2665
|
y: e.yScale(t.y)
|
|
2662
2666
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
2663
|
-
let { lower: r, upper: i } =
|
|
2667
|
+
let { lower: r, upper: i } = At(t), o = a.track.xScale(t.x), s = e.yScale(t.y - r), c = e.yScale(t.y + i);
|
|
2664
2668
|
return [
|
|
2665
2669
|
`M${o - n},${s}H${o + n}`,
|
|
2666
2670
|
`M${o},${s}V${c}`,
|
|
@@ -2693,8 +2697,8 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2693
2697
|
"data-line-style": e.series.lineStyle,
|
|
2694
2698
|
d: e.path,
|
|
2695
2699
|
stroke: e.series.color,
|
|
2696
|
-
"stroke-dasharray": w(
|
|
2697
|
-
}, null, 8,
|
|
2700
|
+
"stroke-dasharray": w(br)(e.series.lineStyle)
|
|
2701
|
+
}, null, 8, wr)) : r("", !0),
|
|
2698
2702
|
e.series.errorBar.visible ? (g(), i("g", {
|
|
2699
2703
|
key: 1,
|
|
2700
2704
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -2705,7 +2709,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2705
2709
|
d: e.errorBarPath,
|
|
2706
2710
|
stroke: e.series.errorBar.color || e.series.color,
|
|
2707
2711
|
"stroke-width": e.series.errorBar.width
|
|
2708
|
-
}, null, 8,
|
|
2712
|
+
}, null, 8, Er)) : r("", !0)], 8, Tr)) : r("", !0),
|
|
2709
2713
|
e.series.pointType === "none" ? r("", !0) : (g(), i("g", {
|
|
2710
2714
|
key: 2,
|
|
2711
2715
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -2716,24 +2720,24 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2716
2720
|
class: "waveform-track__point waveform-chart__point",
|
|
2717
2721
|
d: e.pointPath,
|
|
2718
2722
|
fill: e.series.color
|
|
2719
|
-
}, null, 8,
|
|
2720
|
-
], 8,
|
|
2723
|
+
}, null, 8, Or)) : r("", !0)], 8, Dr))
|
|
2724
|
+
], 8, Cr))), 128))], 8, Sr)) : r("", !0);
|
|
2721
2725
|
}
|
|
2722
|
-
}), [["__scopeId", "data-v-42a3fd47"]]),
|
|
2726
|
+
}), [["__scopeId", "data-v-42a3fd47"]]), Ar = ["transform"], jr = ["transform"], Mr = {
|
|
2723
2727
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
2724
2728
|
x: "0",
|
|
2725
2729
|
y: "7",
|
|
2726
2730
|
dy: "0.71em",
|
|
2727
2731
|
"text-anchor": "start"
|
|
2728
|
-
},
|
|
2732
|
+
}, Nr = ["x"], Pr = ["x", "y"], Fr = [
|
|
2729
2733
|
"data-y-axis-index",
|
|
2730
2734
|
"data-y-axis-side",
|
|
2731
2735
|
"transform"
|
|
2732
|
-
],
|
|
2736
|
+
], Ir = [
|
|
2733
2737
|
"data-y-axis-index",
|
|
2734
2738
|
"x",
|
|
2735
2739
|
"text-anchor"
|
|
2736
|
-
],
|
|
2740
|
+
], Lr = { key: 3 }, Rr = ["x", "y"], zr = ["fill", "transform"], Br = ["data-y-axis-title-index"], Vr = ["x", "y"], Hr = ["fill", "transform"], Ur = /* @__PURE__ */ c({
|
|
2737
2741
|
__name: "WaveformTrackAxes",
|
|
2738
2742
|
props: {
|
|
2739
2743
|
track: {},
|
|
@@ -2769,7 +2773,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2769
2773
|
c.call(o), c.selectAll("path.domain").attr("display", n.axes?.y?.lineVisible === !1 ? "none" : null);
|
|
2770
2774
|
}), !o.value) return;
|
|
2771
2775
|
let e = V(o.value);
|
|
2772
|
-
e.call(A(n.track.xScale).tickValues(n.track.xAxisTickValues).tickFormat((e) =>
|
|
2776
|
+
e.call(A(n.track.xScale).tickValues(n.track.xAxisTickValues).tickFormat((e) => st(Number(e), n.timeUnit, n.track.xScale.domain())).tickSize(-4).tickPadding(7).tickSizeOuter(0)), e.selectAll("path.domain").attr("display", n.axes?.x?.lineVisible === !1 ? "none" : null);
|
|
2773
2777
|
}
|
|
2774
2778
|
return h(async () => {
|
|
2775
2779
|
await d(), m();
|
|
@@ -2790,7 +2794,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2790
2794
|
ref: o,
|
|
2791
2795
|
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 }]),
|
|
2792
2796
|
transform: `translate(0, ${t.track.height})`
|
|
2793
|
-
}, null, 10,
|
|
2797
|
+
}, null, 10, Ar)) : r("", !0),
|
|
2794
2798
|
t.track.showXAxis ? (g(), i("g", {
|
|
2795
2799
|
key: 1,
|
|
2796
2800
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -2798,13 +2802,13 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2798
2802
|
"font-family": "sans-serif",
|
|
2799
2803
|
"font-size": "10",
|
|
2800
2804
|
"aria-hidden": "true"
|
|
2801
|
-
}, [a("text",
|
|
2805
|
+
}, [a("text", Mr, S(t.track.endpointLabels.start), 1), a("text", {
|
|
2802
2806
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
2803
2807
|
x: t.track.width ?? t.innerWidth,
|
|
2804
2808
|
y: "7",
|
|
2805
2809
|
dy: "0.71em",
|
|
2806
2810
|
"text-anchor": "end"
|
|
2807
|
-
}, S(t.track.endpointLabels.end), 9,
|
|
2811
|
+
}, S(t.track.endpointLabels.end), 9, Nr)], 8, jr)) : r("", !0),
|
|
2808
2812
|
t.track.showXAxis && t.track.xAxisExponent ? (g(), i("text", {
|
|
2809
2813
|
key: 2,
|
|
2810
2814
|
class: "waveform-track__axis-exponent waveform-track__axis-exponent--x waveform-chart__axis-exponent waveform-chart__axis-exponent--x",
|
|
@@ -2812,7 +2816,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2812
2816
|
y: t.track.height + 27,
|
|
2813
2817
|
"text-anchor": "end",
|
|
2814
2818
|
"aria-hidden": "true"
|
|
2815
|
-
}, S(t.track.xAxisExponent), 9,
|
|
2819
|
+
}, S(t.track.xAxisExponent), 9, Pr)) : r("", !0),
|
|
2816
2820
|
(g(!0), i(e, null, y(t.track.isEmpty ? [] : t.track.yAxes, (e) => (g(), i("g", {
|
|
2817
2821
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
2818
2822
|
ref_for: !0,
|
|
@@ -2821,7 +2825,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2821
2825
|
"data-y-axis-index": e.index,
|
|
2822
2826
|
"data-y-axis-side": e.side,
|
|
2823
2827
|
transform: `translate(${e.x}, 0)`
|
|
2824
|
-
}, null, 10,
|
|
2828
|
+
}, null, 10, Fr))), 128)),
|
|
2825
2829
|
(g(!0), i(e, null, y(t.track.isEmpty ? [] : t.track.yAxes.filter((e) => e.exponentLabel), (e) => (g(), i("text", {
|
|
2826
2830
|
key: `y-axis-exponent-${t.track.index}-${e.index}`,
|
|
2827
2831
|
class: "waveform-track__axis-exponent waveform-track__axis-exponent--y waveform-chart__axis-exponent waveform-chart__axis-exponent--y",
|
|
@@ -2831,21 +2835,21 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2831
2835
|
dy: "0.32em",
|
|
2832
2836
|
"text-anchor": e.side === "left" ? "end" : "start",
|
|
2833
2837
|
"aria-hidden": "true"
|
|
2834
|
-
}, S(e.exponentLabel), 9,
|
|
2835
|
-
!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",
|
|
2838
|
+
}, S(e.exponentLabel), 9, Ir))), 128)),
|
|
2839
|
+
!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", Lr, [a("rect", {
|
|
2836
2840
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
2837
2841
|
x: t.track.yAxisLabelX - 12,
|
|
2838
2842
|
y: t.track.height / 2 - 40,
|
|
2839
2843
|
width: "24",
|
|
2840
2844
|
height: "80",
|
|
2841
2845
|
rx: "2"
|
|
2842
|
-
}, null, 8,
|
|
2846
|
+
}, null, 8, Rr), a("text", {
|
|
2843
2847
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
2844
2848
|
fill: t.track.series.color,
|
|
2845
2849
|
transform: `translate(${t.track.yAxisLabelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
2846
2850
|
"text-anchor": "middle",
|
|
2847
2851
|
"dominant-baseline": "central"
|
|
2848
|
-
}, S(c(t.track.series)), 9,
|
|
2852
|
+
}, S(c(t.track.series)), 9, zr)])) : r("", !0),
|
|
2849
2853
|
(g(!0), i(e, null, y(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (g(), i("g", {
|
|
2850
2854
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
2851
2855
|
class: "waveform-track__multi-axis-title",
|
|
@@ -2857,40 +2861,40 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2857
2861
|
width: "24",
|
|
2858
2862
|
height: "80",
|
|
2859
2863
|
rx: "2"
|
|
2860
|
-
}, null, 8,
|
|
2864
|
+
}, null, 8, Vr), a("text", {
|
|
2861
2865
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
2862
2866
|
fill: e.seriesList[0].color,
|
|
2863
2867
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
2864
2868
|
"text-anchor": "middle",
|
|
2865
2869
|
"dominant-baseline": "central"
|
|
2866
|
-
}, S(c(e.seriesList[0])), 9,
|
|
2870
|
+
}, S(c(e.seriesList[0])), 9, Hr)], 8, Br))), 128))
|
|
2867
2871
|
], 64));
|
|
2868
2872
|
}
|
|
2869
|
-
}),
|
|
2873
|
+
}), Wr = [
|
|
2870
2874
|
"width",
|
|
2871
2875
|
"height",
|
|
2872
2876
|
"fill"
|
|
2873
|
-
],
|
|
2877
|
+
], Gr = ["clip-path"], Kr = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, qr = [
|
|
2874
2878
|
"stroke",
|
|
2875
2879
|
"x1",
|
|
2876
2880
|
"x2",
|
|
2877
2881
|
"y2"
|
|
2878
|
-
],
|
|
2882
|
+
], Jr = [
|
|
2879
2883
|
"stroke",
|
|
2880
2884
|
"x2",
|
|
2881
2885
|
"y1",
|
|
2882
2886
|
"y2"
|
|
2883
|
-
],
|
|
2887
|
+
], Yr = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, Xr = [
|
|
2884
2888
|
"stroke",
|
|
2885
2889
|
"x1",
|
|
2886
2890
|
"x2",
|
|
2887
2891
|
"y2"
|
|
2888
|
-
],
|
|
2892
|
+
], Zr = [
|
|
2889
2893
|
"stroke",
|
|
2890
2894
|
"x2",
|
|
2891
2895
|
"y1",
|
|
2892
2896
|
"y2"
|
|
2893
|
-
],
|
|
2897
|
+
], Qr = ["clip-path"], $r = [
|
|
2894
2898
|
"data-y-axis-index",
|
|
2895
2899
|
"x2",
|
|
2896
2900
|
"y1",
|
|
@@ -2898,7 +2902,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2898
2902
|
"stroke",
|
|
2899
2903
|
"stroke-width",
|
|
2900
2904
|
"stroke-dasharray"
|
|
2901
|
-
],
|
|
2905
|
+
], ei = ["x", "y"], ti = /* @__PURE__ */ c({
|
|
2902
2906
|
__name: "WaveformTrackBackdrop",
|
|
2903
2907
|
props: {
|
|
2904
2908
|
track: {},
|
|
@@ -2923,12 +2927,12 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2923
2927
|
height: t.track.height,
|
|
2924
2928
|
fill: t.frameStyle.backgroundColor,
|
|
2925
2929
|
"aria-hidden": "true"
|
|
2926
|
-
}, null, 8,
|
|
2930
|
+
}, null, 8, Wr)) : r("", !0),
|
|
2927
2931
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (g(), i("g", {
|
|
2928
2932
|
key: 1,
|
|
2929
2933
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
2930
2934
|
"aria-hidden": "true"
|
|
2931
|
-
}, [a("g",
|
|
2935
|
+
}, [a("g", Kr, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMinorTicks, (e) => (g(), i("line", {
|
|
2932
2936
|
key: `x-minor-${t.track.index}-${e}`,
|
|
2933
2937
|
"data-grid-direction": "vertical",
|
|
2934
2938
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -2936,7 +2940,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2936
2940
|
x2: t.track.xScale(e),
|
|
2937
2941
|
y1: "0",
|
|
2938
2942
|
y2: t.track.height
|
|
2939
|
-
}, null, 8,
|
|
2943
|
+
}, null, 8, qr))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMinorTicks, (e) => (g(), i("line", {
|
|
2940
2944
|
key: `y-minor-${t.track.index}-${e}`,
|
|
2941
2945
|
"data-grid-direction": "horizontal",
|
|
2942
2946
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -2944,7 +2948,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2944
2948
|
x2: t.track.width ?? t.innerWidth,
|
|
2945
2949
|
y1: t.track.yScale(e),
|
|
2946
2950
|
y2: t.track.yScale(e)
|
|
2947
|
-
}, null, 8,
|
|
2951
|
+
}, null, 8, Jr))), 128)) : r("", !0)]), a("g", Yr, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMajorTicks, (e) => (g(), i("line", {
|
|
2948
2952
|
key: `x-major-${t.track.index}-${e}`,
|
|
2949
2953
|
"data-grid-direction": "vertical",
|
|
2950
2954
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -2952,7 +2956,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2952
2956
|
x2: t.track.xScale(e),
|
|
2953
2957
|
y1: "0",
|
|
2954
2958
|
y2: t.track.height
|
|
2955
|
-
}, null, 8,
|
|
2959
|
+
}, null, 8, Xr))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMajorTicks, (e) => (g(), i("line", {
|
|
2956
2960
|
key: `y-major-${t.track.index}-${e}`,
|
|
2957
2961
|
"data-grid-direction": "horizontal",
|
|
2958
2962
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -2960,7 +2964,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2960
2964
|
x2: t.track.width ?? t.innerWidth,
|
|
2961
2965
|
y1: t.track.yScale(e),
|
|
2962
2966
|
y2: t.track.yScale(e)
|
|
2963
|
-
}, null, 8,
|
|
2967
|
+
}, null, 8, Zr))), 128)) : r("", !0)])], 8, Gr)) : r("", !0),
|
|
2964
2968
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.zeroLine.visible && !t.cleanView ? (g(), i("g", {
|
|
2965
2969
|
key: 2,
|
|
2966
2970
|
class: "waveform-track__zero-lines waveform-chart__zero-lines",
|
|
@@ -2977,7 +2981,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2977
2981
|
stroke: t.zeroLine.color,
|
|
2978
2982
|
"stroke-width": t.zeroLine.width,
|
|
2979
2983
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
2980
|
-
}, null, 8,
|
|
2984
|
+
}, null, 8, $r))], 64))), 128))], 8, Qr)) : r("", !0),
|
|
2981
2985
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (g(), i("text", {
|
|
2982
2986
|
key: 3,
|
|
2983
2987
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -2987,10 +2991,10 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2987
2991
|
"text-anchor": "middle",
|
|
2988
2992
|
"dominant-baseline": "central",
|
|
2989
2993
|
"aria-hidden": "true"
|
|
2990
|
-
}, S(t.frameNumber), 13,
|
|
2994
|
+
}, S(t.frameNumber), 13, ei)) : r("", !0)
|
|
2991
2995
|
], 64));
|
|
2992
2996
|
}
|
|
2993
|
-
}),
|
|
2997
|
+
}), ni = [
|
|
2994
2998
|
"data-track-index",
|
|
2995
2999
|
"data-track-empty",
|
|
2996
3000
|
"data-track-left",
|
|
@@ -2999,19 +3003,19 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2999
3003
|
"data-track-top",
|
|
3000
3004
|
"data-track-height",
|
|
3001
3005
|
"transform"
|
|
3002
|
-
],
|
|
3006
|
+
], ri = [
|
|
3003
3007
|
"width",
|
|
3004
3008
|
"height",
|
|
3005
3009
|
"stroke",
|
|
3006
3010
|
"stroke-width",
|
|
3007
3011
|
"stroke-dasharray",
|
|
3008
3012
|
"stroke-linecap"
|
|
3009
|
-
],
|
|
3013
|
+
], ii = [
|
|
3010
3014
|
"data-interactive",
|
|
3011
3015
|
"data-independent-overlay-index",
|
|
3012
3016
|
"width",
|
|
3013
3017
|
"height"
|
|
3014
|
-
],
|
|
3018
|
+
], ai = ["x", "y"], oi = /* @__PURE__ */ c({
|
|
3015
3019
|
__name: "WaveformTrack",
|
|
3016
3020
|
props: {
|
|
3017
3021
|
track: {},
|
|
@@ -3070,7 +3074,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3070
3074
|
"data-track-height": e.track.height,
|
|
3071
3075
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
3072
3076
|
}, [
|
|
3073
|
-
s(
|
|
3077
|
+
s(ti, {
|
|
3074
3078
|
track: e.track,
|
|
3075
3079
|
"clip-path-id": e.clipPathId,
|
|
3076
3080
|
"inner-width": e.innerWidth,
|
|
@@ -3087,7 +3091,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3087
3091
|
"frame-style",
|
|
3088
3092
|
"zero-line"
|
|
3089
3093
|
]),
|
|
3090
|
-
s(
|
|
3094
|
+
s(Ur, {
|
|
3091
3095
|
track: e.track,
|
|
3092
3096
|
"inner-width": e.innerWidth,
|
|
3093
3097
|
"clean-view": e.cleanView,
|
|
@@ -3113,8 +3117,8 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3113
3117
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
3114
3118
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
3115
3119
|
"aria-hidden": "true"
|
|
3116
|
-
}, null, 8,
|
|
3117
|
-
s(
|
|
3120
|
+
}, null, 8, ri)),
|
|
3121
|
+
s(kr, {
|
|
3118
3122
|
track: e.track,
|
|
3119
3123
|
"clip-path-id": e.clipPathId
|
|
3120
3124
|
}, null, 8, ["track", "clip-path-id"]),
|
|
@@ -3136,7 +3140,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3136
3140
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
3137
3141
|
onClick: n[5] ||= (e) => o("click", e),
|
|
3138
3142
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
3139
|
-
}, null, 42,
|
|
3143
|
+
}, null, 42, ii)) : r("", !0),
|
|
3140
3144
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (g(), i("text", {
|
|
3141
3145
|
key: 2,
|
|
3142
3146
|
class: "waveform-track__no-visible-series",
|
|
@@ -3144,33 +3148,33 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3144
3148
|
y: e.track.height / 2,
|
|
3145
3149
|
"text-anchor": "middle",
|
|
3146
3150
|
"dominant-baseline": "central"
|
|
3147
|
-
}, " 暂无可见曲线 ", 8,
|
|
3148
|
-
], 10,
|
|
3151
|
+
}, " 暂无可见曲线 ", 8, ai)) : r("", !0)
|
|
3152
|
+
], 10, ni));
|
|
3149
3153
|
}
|
|
3150
|
-
}),
|
|
3154
|
+
}), si = [
|
|
3151
3155
|
"width",
|
|
3152
3156
|
"height",
|
|
3153
3157
|
"data-position",
|
|
3154
3158
|
"data-orientation"
|
|
3155
|
-
],
|
|
3159
|
+
], ci = [
|
|
3156
3160
|
"disabled",
|
|
3157
3161
|
"aria-pressed",
|
|
3158
3162
|
"aria-label",
|
|
3159
3163
|
"onClick"
|
|
3160
|
-
],
|
|
3164
|
+
], li = [
|
|
3161
3165
|
"data-line-type",
|
|
3162
3166
|
"data-line-style",
|
|
3163
3167
|
"data-point-type",
|
|
3164
3168
|
"data-error-bar-visible"
|
|
3165
|
-
],
|
|
3169
|
+
], ui = [
|
|
3166
3170
|
"d",
|
|
3167
3171
|
"stroke",
|
|
3168
3172
|
"stroke-dasharray"
|
|
3169
|
-
],
|
|
3173
|
+
], di = [
|
|
3170
3174
|
"d",
|
|
3171
3175
|
"stroke",
|
|
3172
3176
|
"stroke-width"
|
|
3173
|
-
],
|
|
3177
|
+
], fi = ["d", "fill"], pi = ["title"], mi = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
3174
3178
|
__name: "WaveformLegend",
|
|
3175
3179
|
props: {
|
|
3176
3180
|
series: {},
|
|
@@ -3228,45 +3232,45 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3228
3232
|
"data-point-type": e.pointType,
|
|
3229
3233
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
3230
3234
|
}, [
|
|
3231
|
-
w(
|
|
3235
|
+
w(yr)(e.lineType) ? (g(), i("path", {
|
|
3232
3236
|
key: 0,
|
|
3233
3237
|
class: "waveform-legend__line",
|
|
3234
|
-
d: w(
|
|
3238
|
+
d: w(yr)(e.lineType) ?? void 0,
|
|
3235
3239
|
stroke: e.color,
|
|
3236
|
-
"stroke-dasharray": w(
|
|
3240
|
+
"stroke-dasharray": w(br)(e.lineStyle),
|
|
3237
3241
|
"stroke-width": "1.5",
|
|
3238
3242
|
fill: "none"
|
|
3239
|
-
}, null, 8,
|
|
3243
|
+
}, null, 8, ui)) : r("", !0),
|
|
3240
3244
|
e.errorBar.visible ? (g(), i("path", {
|
|
3241
3245
|
key: 1,
|
|
3242
3246
|
class: "waveform-legend__error-bar",
|
|
3243
|
-
d: w(
|
|
3247
|
+
d: w(xr)(e.errorBar.capWidth),
|
|
3244
3248
|
stroke: e.errorBar.color || e.color,
|
|
3245
3249
|
"stroke-width": e.errorBar.width,
|
|
3246
3250
|
"stroke-linecap": "butt",
|
|
3247
3251
|
fill: "none"
|
|
3248
|
-
}, null, 8,
|
|
3252
|
+
}, null, 8, di)) : r("", !0),
|
|
3249
3253
|
e.pointType === "none" ? r("", !0) : (g(), i("path", {
|
|
3250
3254
|
key: 2,
|
|
3251
3255
|
class: "waveform-legend__point",
|
|
3252
|
-
d: w(
|
|
3256
|
+
d: w(_r)(e.pointType, 30) ?? void 0,
|
|
3253
3257
|
fill: e.color,
|
|
3254
3258
|
transform: "translate(13 8)"
|
|
3255
|
-
}, null, 8,
|
|
3256
|
-
], 8,
|
|
3259
|
+
}, null, 8, fi))
|
|
3260
|
+
], 8, li)), a("span", {
|
|
3257
3261
|
class: "waveform-legend__label",
|
|
3258
3262
|
title: e.name
|
|
3259
|
-
}, S(e.name), 9,
|
|
3263
|
+
}, S(e.name), 9, pi)], 10, ci))), 128))], 6)], 2)], 8, si));
|
|
3260
3264
|
}
|
|
3261
|
-
}), [["__scopeId", "data-v-2ae12e71"]]),
|
|
3265
|
+
}), [["__scopeId", "data-v-2ae12e71"]]), hi = {
|
|
3262
3266
|
class: "waveform-chart__hover-layer",
|
|
3263
3267
|
"pointer-events": "none",
|
|
3264
3268
|
"aria-hidden": "true"
|
|
3265
|
-
},
|
|
3269
|
+
}, gi = ["clip-path", "transform"], _i = [
|
|
3266
3270
|
"x1",
|
|
3267
3271
|
"x2",
|
|
3268
3272
|
"y2"
|
|
3269
|
-
],
|
|
3273
|
+
], vi = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
3270
3274
|
__name: "WaveformHoverLayer",
|
|
3271
3275
|
props: {
|
|
3272
3276
|
state: {},
|
|
@@ -3289,7 +3293,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3289
3293
|
}] : [];
|
|
3290
3294
|
});
|
|
3291
3295
|
});
|
|
3292
|
-
return (t, r) => (g(), i("g",
|
|
3296
|
+
return (t, r) => (g(), i("g", hi, [(g(!0), i(e, null, y(o.value, (e) => (g(), i("g", {
|
|
3293
3297
|
key: e.track.index,
|
|
3294
3298
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
3295
3299
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -3299,46 +3303,46 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3299
3303
|
x2: e.x,
|
|
3300
3304
|
y1: "0",
|
|
3301
3305
|
y2: e.track.height
|
|
3302
|
-
}, null, 8,
|
|
3306
|
+
}, null, 8, _i)], 8, gi))), 128))]));
|
|
3303
3307
|
}
|
|
3304
|
-
}), [["__scopeId", "data-v-a6f82099"]]),
|
|
3308
|
+
}), [["__scopeId", "data-v-a6f82099"]]), yi = [
|
|
3305
3309
|
"data-display-mode",
|
|
3306
3310
|
"data-interaction-mode",
|
|
3307
3311
|
"data-presentation-mode",
|
|
3308
3312
|
"data-overlay-mode",
|
|
3309
3313
|
"data-chart-left-margin",
|
|
3310
3314
|
"data-title-area-height"
|
|
3311
|
-
],
|
|
3315
|
+
], bi = [
|
|
3312
3316
|
"role",
|
|
3313
3317
|
"aria-level",
|
|
3314
3318
|
"aria-hidden"
|
|
3315
|
-
],
|
|
3319
|
+
], xi = ["data-title-scale", "data-title-wrapped"], Si = [
|
|
3316
3320
|
"width",
|
|
3317
3321
|
"height",
|
|
3318
3322
|
"aria-label"
|
|
3319
|
-
],
|
|
3323
|
+
], Ci = ["id"], wi = ["width", "height"], Ti = ["transform"], Ei = {
|
|
3320
3324
|
key: 0,
|
|
3321
3325
|
class: "waveform-chart__grid-slots",
|
|
3322
3326
|
"aria-hidden": "true"
|
|
3323
|
-
},
|
|
3327
|
+
}, Di = ["transform"], Oi = ["width", "height"], ki = ["width", "height"], Ai = [
|
|
3324
3328
|
"x",
|
|
3325
3329
|
"y",
|
|
3326
3330
|
"width",
|
|
3327
3331
|
"height"
|
|
3328
|
-
],
|
|
3332
|
+
], ji = {
|
|
3329
3333
|
key: 4,
|
|
3330
3334
|
class: "waveform-chart__legend-layer"
|
|
3331
|
-
},
|
|
3335
|
+
}, Mi = [
|
|
3332
3336
|
"data-legend-track-index",
|
|
3333
3337
|
"data-legend-track-id",
|
|
3334
3338
|
"transform"
|
|
3335
|
-
],
|
|
3339
|
+
], Ni = ["x", "y"], Pi = ["x", "y"], Fi = /* @__PURE__ */ c({
|
|
3336
3340
|
__name: "WaveformChartView",
|
|
3337
3341
|
props: { controller: {} },
|
|
3338
3342
|
setup(t) {
|
|
3339
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, pointerInsideChart: b, handleNativeContextMenu: x, titleAreaReserved: T, titleAreaStyle: E, titleVisible: D, titleMeasureStyle: O, resolvedTitleText: k, titleVisualStyle: A, titleTextStyle: j, titleLayout: M, chartWidth: N, drawingHeight: P, hasWaveformData: F, requestViewportReset: I, trackLayouts: L, clipPathId: R, chartTopMargin: z, gridCells: B, hasVisibleWaveformData: V, zoomable: H, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: re, beginSharedViewportDrag: ie, finishViewportDrag: U, cancelViewportDrag: W, handlePointerLeave:
|
|
3343
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, pointerInsideChart: b, handleNativeContextMenu: x, titleAreaReserved: T, titleAreaStyle: E, titleVisible: D, titleMeasureStyle: O, resolvedTitleText: k, titleVisualStyle: A, titleTextStyle: j, titleLayout: M, chartWidth: N, drawingHeight: P, hasWaveformData: F, requestViewportReset: I, trackLayouts: L, clipPathId: R, chartTopMargin: z, gridCells: B, hasVisibleWaveformData: V, zoomable: H, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: re, beginSharedViewportDrag: ie, finishViewportDrag: U, cancelViewportDrag: W, handlePointerLeave: G, handleAnnotationClick: oe, handleAnnotationContextMenu: se, resolveFrameNumber: ce, frameStyle: le, axes: ue, resolvedZeroLine: de, timeUnit: K, yLabel: fe, handleIndependentPointerMove: pe, beginViewportDrag: me, hoverState: he, showTooltip: ge, selectionBox: q, renderedAnnotations: _e, annotationsVisible: ve, handleExistingAnnotationContextMenu: ye, beginAnnotationDrag: J, handleAnnotationMove: Y, endAnnotationDrag: be, resolveLegendPosition: X, resolveLegendOrientation: xe, legendBackgroundColor: Se, legendInteractive: Ce, resolvedHiddenSeriesIds: we, toggleSeriesVisibility: Te, resolvedXLabel: Ee, xAxisTitleY: De, hasChartArea: Oe, gridOptions: ke, pageCount: Ae, currentPage: je, getPageSize: Z, chartTracks: Pe, goToPage: Q, annotationInteraction: Fe, editorDraft: Ie, contextMenu: Le, editorSeries: Re, editorSeriesOptions: ze, confirmAnnotation: Be, cancelAnnotation: Ve, changeDraftSeries: He, editContextAnnotation: Ue, deleteContextAnnotation: We, chartHeight: Ge, setContainer: $, setSvgElement: Ke, setTitleMeasureElement: qe, setSharedOverlayElement: Je } = C(t.controller);
|
|
3340
3344
|
return (t, C) => (g(), i("div", {
|
|
3341
|
-
ref: w(
|
|
3345
|
+
ref: w($),
|
|
3342
3346
|
class: f(["waveform-chart", [
|
|
3343
3347
|
`waveform-chart--${w(o)}`,
|
|
3344
3348
|
`waveform-chart--interaction-${w(c)}`,
|
|
@@ -3367,7 +3371,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3367
3371
|
"aria-level": w(D) ? 2 : void 0,
|
|
3368
3372
|
"aria-hidden": w(l) || void 0
|
|
3369
3373
|
}, [a("span", {
|
|
3370
|
-
ref: w(
|
|
3374
|
+
ref: w(qe),
|
|
3371
3375
|
class: "waveform-chart__title-measure",
|
|
3372
3376
|
style: p(w(O)),
|
|
3373
3377
|
"aria-hidden": "true"
|
|
@@ -3380,9 +3384,9 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3380
3384
|
style: p(w(j)),
|
|
3381
3385
|
"data-title-scale": w(M).scale,
|
|
3382
3386
|
"data-title-wrapped": w(M).wrapped || void 0
|
|
3383
|
-
}, S(w(k)), 13,
|
|
3387
|
+
}, S(w(k)), 13, xi)], 4)) : r("", !0)], 12, bi)) : r("", !0),
|
|
3384
3388
|
(g(), i("svg", {
|
|
3385
|
-
ref: w(
|
|
3389
|
+
ref: w(Ke),
|
|
3386
3390
|
class: "waveform-chart__svg",
|
|
3387
3391
|
width: w(N),
|
|
3388
3392
|
height: w(P),
|
|
@@ -3397,9 +3401,9 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3397
3401
|
}, [a("rect", {
|
|
3398
3402
|
width: e.width,
|
|
3399
3403
|
height: e.height
|
|
3400
|
-
}, null, 8,
|
|
3404
|
+
}, null, 8, wi)], 8, Ci))), 128))]),
|
|
3401
3405
|
a("g", { transform: `translate(${w(_)}, ${w(z)})` }, [
|
|
3402
|
-
w(o) !== "compact" && !w(l) ? (g(), i("g",
|
|
3406
|
+
w(o) !== "compact" && !w(l) ? (g(), i("g", Ei, [(g(!0), i(e, null, y(w(B), (e) => (g(), i("g", {
|
|
3403
3407
|
key: `grid-slot-${e.slotIndex}`,
|
|
3404
3408
|
transform: `translate(${e.left}, ${e.top})`
|
|
3405
3409
|
}, [e.series ? r("", !0) : (g(), i("rect", {
|
|
@@ -3407,10 +3411,10 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3407
3411
|
class: "waveform-chart__grid-slot-placeholder",
|
|
3408
3412
|
width: e.width,
|
|
3409
3413
|
height: e.cellHeight
|
|
3410
|
-
}, null, 8,
|
|
3414
|
+
}, null, 8, Oi))], 8, Di))), 128))])) : r("", !0),
|
|
3411
3415
|
w(o) !== "independent" && w(L).length && w(V) ? (g(), i("rect", {
|
|
3412
3416
|
key: 1,
|
|
3413
|
-
ref: w(
|
|
3417
|
+
ref: w(Je),
|
|
3414
3418
|
class: f(["waveform-chart__overlay waveform-chart__overlay--shared", {
|
|
3415
3419
|
"is-zoomable": !w(u) && w(H) && w(ee),
|
|
3416
3420
|
"is-annotating": !w(u) && w(c) === "annotation"
|
|
@@ -3421,11 +3425,11 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3421
3425
|
onPointerdown: C[1] ||= (...e) => w(ie) && w(ie)(...e),
|
|
3422
3426
|
onPointerup: C[2] ||= (...e) => w(U) && w(U)(...e),
|
|
3423
3427
|
onPointercancel: C[3] ||= (...e) => w(W) && w(W)(...e),
|
|
3424
|
-
onPointerleave: C[4] ||= (...e) => w(
|
|
3425
|
-
onClick: C[5] ||= (...e) => w(
|
|
3426
|
-
onContextmenu: C[6] ||= (...e) => w(
|
|
3427
|
-
}, null, 42,
|
|
3428
|
-
(g(!0), i(e, null, y(w(L), (e) => (g(), n(w(
|
|
3428
|
+
onPointerleave: C[4] ||= (...e) => w(G) && w(G)(...e),
|
|
3429
|
+
onClick: C[5] ||= (...e) => w(oe) && w(oe)(...e),
|
|
3430
|
+
onContextmenu: C[6] ||= (...e) => w(se) && w(se)(...e)
|
|
3431
|
+
}, null, 42, ki)) : r("", !0),
|
|
3432
|
+
(g(!0), i(e, null, y(w(L), (e) => (g(), n(w(oi), {
|
|
3429
3433
|
key: `${e.index}-${e.series.name}`,
|
|
3430
3434
|
track: e,
|
|
3431
3435
|
"clip-path-id": w(R),
|
|
@@ -3434,20 +3438,20 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3434
3438
|
interactive: !w(u),
|
|
3435
3439
|
"display-mode": w(o),
|
|
3436
3440
|
"interaction-mode": w(c),
|
|
3437
|
-
"frame-number": w(
|
|
3438
|
-
"frame-style": w(
|
|
3439
|
-
axes: w(
|
|
3441
|
+
"frame-number": w(ce)(e.index),
|
|
3442
|
+
"frame-style": w(le),
|
|
3443
|
+
axes: w(ue),
|
|
3440
3444
|
"clean-view": w(l),
|
|
3441
|
-
"zero-line": w(
|
|
3442
|
-
"time-unit": w(
|
|
3443
|
-
"y-label": w(
|
|
3444
|
-
onPointerMove: (t) => w(
|
|
3445
|
-
onPointerDown: (t) => w(
|
|
3445
|
+
"zero-line": w(de),
|
|
3446
|
+
"time-unit": w(K),
|
|
3447
|
+
"y-label": w(fe),
|
|
3448
|
+
onPointerMove: (t) => w(pe)(t, e.index),
|
|
3449
|
+
onPointerDown: (t) => w(me)(t, e.index, !0),
|
|
3446
3450
|
onPointerUp: w(U),
|
|
3447
3451
|
onPointerCancel: w(W),
|
|
3448
|
-
onPointerLeave: w(
|
|
3449
|
-
onClick: (t) => w(
|
|
3450
|
-
onContextmenu: (t) => w(
|
|
3452
|
+
onPointerLeave: w(G),
|
|
3453
|
+
onClick: (t) => w(oe)(t, e.index),
|
|
3454
|
+
onContextmenu: (t) => w(se)(t, e.index)
|
|
3451
3455
|
}, null, 8, [
|
|
3452
3456
|
"track",
|
|
3453
3457
|
"clip-path-id",
|
|
@@ -3471,8 +3475,8 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3471
3475
|
"onClick",
|
|
3472
3476
|
"onContextmenu"
|
|
3473
3477
|
]))), 128)),
|
|
3474
|
-
s(w(
|
|
3475
|
-
state: w(
|
|
3478
|
+
s(w(vi), {
|
|
3479
|
+
state: w(he),
|
|
3476
3480
|
tracks: w(L),
|
|
3477
3481
|
"clip-path-id": w(R),
|
|
3478
3482
|
visible: w(ge) && !w(u)
|
|
@@ -3490,7 +3494,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3490
3494
|
width: w(q).width,
|
|
3491
3495
|
height: w(q).height,
|
|
3492
3496
|
"aria-hidden": "true"
|
|
3493
|
-
}, null, 8,
|
|
3497
|
+
}, null, 8, Ai)) : r("", !0),
|
|
3494
3498
|
w(l) ? r("", !0) : (g(), n(w(Me), {
|
|
3495
3499
|
key: 3,
|
|
3496
3500
|
annotations: w(_e),
|
|
@@ -3498,8 +3502,8 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3498
3502
|
interactive: !w(u),
|
|
3499
3503
|
onContextmenu: w(ye),
|
|
3500
3504
|
onDragStart: w(J),
|
|
3501
|
-
onMove: w(
|
|
3502
|
-
onDragEnd: w(
|
|
3505
|
+
onMove: w(Y),
|
|
3506
|
+
onDragEnd: w(be)
|
|
3503
3507
|
}, null, 8, [
|
|
3504
3508
|
"annotations",
|
|
3505
3509
|
"visible",
|
|
@@ -3509,23 +3513,23 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3509
3513
|
"onMove",
|
|
3510
3514
|
"onDragEnd"
|
|
3511
3515
|
])),
|
|
3512
|
-
w(l) ? r("", !0) : (g(), i("g",
|
|
3516
|
+
w(l) ? r("", !0) : (g(), i("g", ji, [(g(!0), i(e, null, y(w(L), (e) => (g(), i("g", {
|
|
3513
3517
|
key: `legend-${e.index}-${e.series.name}`,
|
|
3514
3518
|
class: "waveform-chart__legend-track",
|
|
3515
3519
|
"data-legend-track-index": e.index,
|
|
3516
3520
|
"data-legend-track-id": e.id,
|
|
3517
3521
|
transform: `translate(${e.left}, ${e.top})`
|
|
3518
|
-
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(
|
|
3522
|
+
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(mi), {
|
|
3519
3523
|
key: 0,
|
|
3520
3524
|
series: e.legendSeries,
|
|
3521
|
-
position: w(
|
|
3522
|
-
orientation: w(
|
|
3523
|
-
"background-color": w(
|
|
3524
|
-
interactive: w(
|
|
3525
|
-
"hidden-series-ids": w(
|
|
3525
|
+
position: w(X)(e.id),
|
|
3526
|
+
orientation: w(xe)(w(X)(e.id)),
|
|
3527
|
+
"background-color": w(Se),
|
|
3528
|
+
interactive: w(Ce),
|
|
3529
|
+
"hidden-series-ids": w(we),
|
|
3526
3530
|
width: e.width ?? w(te),
|
|
3527
3531
|
height: e.height,
|
|
3528
|
-
onToggle: w(
|
|
3532
|
+
onToggle: w(Te)
|
|
3529
3533
|
}, null, 8, [
|
|
3530
3534
|
"series",
|
|
3531
3535
|
"position",
|
|
@@ -3536,49 +3540,49 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3536
3540
|
"width",
|
|
3537
3541
|
"height",
|
|
3538
3542
|
"onToggle"
|
|
3539
|
-
])) : r("", !0)], 8,
|
|
3540
|
-
w(
|
|
3543
|
+
])) : r("", !0)], 8, Mi))), 128))])),
|
|
3544
|
+
w(Ee) && !w(l) ? (g(), i("text", {
|
|
3541
3545
|
key: 5,
|
|
3542
3546
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
3543
3547
|
x: w(te) / 2,
|
|
3544
|
-
y: w(
|
|
3548
|
+
y: w(De),
|
|
3545
3549
|
"text-anchor": "middle"
|
|
3546
|
-
}, S(w(
|
|
3547
|
-
], 8,
|
|
3548
|
-
w(
|
|
3550
|
+
}, S(w(Ee)), 9, Ni)) : r("", !0)
|
|
3551
|
+
], 8, Ti),
|
|
3552
|
+
w(Oe) && !w(F) ? (g(), i("text", {
|
|
3549
3553
|
key: 0,
|
|
3550
3554
|
class: "waveform-chart__empty",
|
|
3551
3555
|
x: w(N) / 2,
|
|
3552
3556
|
y: w(P) / 2,
|
|
3553
3557
|
"text-anchor": "middle"
|
|
3554
|
-
}, " 暂无有效波形数据 ", 8,
|
|
3555
|
-
], 40,
|
|
3556
|
-
w(
|
|
3558
|
+
}, " 暂无有效波形数据 ", 8, Pi)) : r("", !0)
|
|
3559
|
+
], 40, Si)),
|
|
3560
|
+
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(ae), {
|
|
3557
3561
|
key: 1,
|
|
3558
3562
|
class: "waveform-chart__pagination",
|
|
3559
3563
|
"aria-label": "波形分页",
|
|
3560
|
-
current: w(
|
|
3561
|
-
"page-size": w(
|
|
3562
|
-
total: w(
|
|
3564
|
+
current: w(je),
|
|
3565
|
+
"page-size": w(Z)(w(ke)),
|
|
3566
|
+
total: w(Pe).length,
|
|
3563
3567
|
"show-size-changer": !1,
|
|
3564
3568
|
"show-quick-jumper": !1,
|
|
3565
|
-
onChange: w(
|
|
3569
|
+
onChange: w(Q)
|
|
3566
3570
|
}, null, 8, [
|
|
3567
3571
|
"current",
|
|
3568
3572
|
"page-size",
|
|
3569
3573
|
"total",
|
|
3570
3574
|
"onChange"
|
|
3571
3575
|
])) : r("", !0),
|
|
3572
|
-
w(
|
|
3576
|
+
w(Ie) && !w(l) && !w(u) ? (g(), n(tr, {
|
|
3573
3577
|
key: 2,
|
|
3574
|
-
annotation: w(
|
|
3575
|
-
mode: w(
|
|
3576
|
-
series: w(
|
|
3577
|
-
"series-options": w(
|
|
3578
|
-
"time-unit": w(
|
|
3579
|
-
onConfirm: w(
|
|
3580
|
-
onCancel: w(
|
|
3581
|
-
onSeriesChange: w(
|
|
3578
|
+
annotation: w(Ie).annotation,
|
|
3579
|
+
mode: w(Ie).mode,
|
|
3580
|
+
series: w(Re),
|
|
3581
|
+
"series-options": w(ze),
|
|
3582
|
+
"time-unit": w(K),
|
|
3583
|
+
onConfirm: w(Be),
|
|
3584
|
+
onCancel: w(Ve),
|
|
3585
|
+
onSeriesChange: w(He)
|
|
3582
3586
|
}, null, 8, [
|
|
3583
3587
|
"annotation",
|
|
3584
3588
|
"mode",
|
|
@@ -3591,13 +3595,13 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3591
3595
|
])) : r("", !0),
|
|
3592
3596
|
!w(l) && !w(u) ? (g(), n(w(Ne), {
|
|
3593
3597
|
key: 3,
|
|
3594
|
-
visible: w(
|
|
3595
|
-
x: w(
|
|
3596
|
-
y: w(
|
|
3597
|
-
"can-edit": !!w(
|
|
3598
|
-
onEdit: w(
|
|
3599
|
-
onDelete: w(
|
|
3600
|
-
onClose: w(
|
|
3598
|
+
visible: w(Le) !== null,
|
|
3599
|
+
x: w(Le)?.x || 0,
|
|
3600
|
+
y: w(Le)?.y || 0,
|
|
3601
|
+
"can-edit": !!w(Le)?.annotationId,
|
|
3602
|
+
onEdit: w(Ue),
|
|
3603
|
+
onDelete: w(We),
|
|
3604
|
+
onClose: w(Fe).closeContextMenu
|
|
3601
3605
|
}, null, 8, [
|
|
3602
3606
|
"visible",
|
|
3603
3607
|
"x",
|
|
@@ -3607,12 +3611,12 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3607
3611
|
"onDelete",
|
|
3608
3612
|
"onClose"
|
|
3609
3613
|
])) : r("", !0),
|
|
3610
|
-
s(w(
|
|
3611
|
-
state: w(
|
|
3614
|
+
s(w(ur), {
|
|
3615
|
+
state: w(he),
|
|
3612
3616
|
visible: w(ge) && !w(u),
|
|
3613
|
-
"time-unit": w(
|
|
3617
|
+
"time-unit": w(K),
|
|
3614
3618
|
"container-width": w(N),
|
|
3615
|
-
"container-height": w(
|
|
3619
|
+
"container-height": w(Ge)
|
|
3616
3620
|
}, null, 8, [
|
|
3617
3621
|
"state",
|
|
3618
3622
|
"visible",
|
|
@@ -3620,9 +3624,9 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3620
3624
|
"container-width",
|
|
3621
3625
|
"container-height"
|
|
3622
3626
|
])
|
|
3623
|
-
], 46,
|
|
3627
|
+
], 46, yi));
|
|
3624
3628
|
}
|
|
3625
|
-
}),
|
|
3629
|
+
}), Ii = /* @__PURE__ */ c({
|
|
3626
3630
|
__name: "WaveformChart",
|
|
3627
3631
|
props: {
|
|
3628
3632
|
data: {},
|
|
@@ -3698,9 +3702,9 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3698
3702
|
"page-change"
|
|
3699
3703
|
],
|
|
3700
3704
|
setup(e, { expose: t, emit: r }) {
|
|
3701
|
-
let i =
|
|
3702
|
-
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(
|
|
3705
|
+
let i = Fn(e, r);
|
|
3706
|
+
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(Fi, { controller: w(i) }, null, 8, ["controller"]));
|
|
3703
3707
|
}
|
|
3704
3708
|
});
|
|
3705
3709
|
//#endregion
|
|
3706
|
-
export {
|
|
3710
|
+
export { Nt as DEFAULT_WAVEFORM_RENDERING_OPTIONS, Ii as WaveformChart, Ke as buildMinorTicks, ft as clamp, at as displayTime, st as formatAxisTime, ot as formatEndpointTime, lt as formatTooltipTime, jt as normalizeWaveformData, Mt as normalizeWaveformSeries, $ as paddedDomain, We as parseWaveformAnnotations, dt as resolveTrackGeometry, Pt as resolveWaveformRenderingOptions, Vt as selectRenderablePoints, Ue as serializeWaveformAnnotations };
|