waveform-analysis 0.1.57 → 0.1.58
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 +3 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +359 -348
- package/dist/types/components/core/grid.d.ts +3 -0
- package/dist/types/components/core/trackPagination.d.ts +4 -0
- package/dist/types/components/core/useWaveformChartController.d.ts +3 -1
- package/dist/types/components/core/useWaveformLayout.d.ts +2 -1
- package/dist/types/components/core/waveformChartTypes.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/WaveformChartView.vue +3 -3
- package/src/components/core/grid.test.ts +3 -0
- package/src/components/core/grid.ts +4 -0
- package/src/components/core/trackPagination.ts +40 -0
- package/src/components/core/useWaveformLayout.ts +12 -9
- package/src/components/core/waveformChartTypes.ts +2 -0
- package/src/components/waveformChartCases/trackOrder.test.ts +62 -0
package/dist/index.js
CHANGED
|
@@ -1439,6 +1439,7 @@ function zn(e) {
|
|
|
1439
1439
|
showPagination: e?.showPagination ?? !0,
|
|
1440
1440
|
fillIncompleteLastRow: e?.fillIncompleteLastRow ?? !1,
|
|
1441
1441
|
trackOrder: Rn(e?.trackOrder),
|
|
1442
|
+
hideEmptyTracks: e?.hideEmptyTracks ?? !1,
|
|
1442
1443
|
trackLines: t
|
|
1443
1444
|
};
|
|
1444
1445
|
}
|
|
@@ -2839,8 +2840,18 @@ async function pi(e, t, n) {
|
|
|
2839
2840
|
return [r[0], r[1]];
|
|
2840
2841
|
}
|
|
2841
2842
|
//#endregion
|
|
2843
|
+
//#region src/components/core/trackPagination.ts
|
|
2844
|
+
var mi = (e, t) => t ? e.filter((e) => e.series.length > 0) : e, hi = (e, t, n, r, i) => {
|
|
2845
|
+
let a = t?.[i];
|
|
2846
|
+
if (a !== void 0) return a;
|
|
2847
|
+
if (e !== void 0) return n === 1 ? e : typeof e == "number" ? e + r : `${e}-${r + 1}`;
|
|
2848
|
+
}, gi = (e, t, n) => (r) => {
|
|
2849
|
+
let i = n(), a = i.findIndex((e) => e.id === r);
|
|
2850
|
+
return hi(e(), t(), i.length, a >= 0 ? a : 0, r);
|
|
2851
|
+
};
|
|
2852
|
+
//#endregion
|
|
2842
2853
|
//#region src/components/core/useWaveformLayout.ts
|
|
2843
|
-
function
|
|
2854
|
+
function _i(e) {
|
|
2844
2855
|
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, linePointOverrides: m } = e, h = t(() => r.value.map((e, t) => ({
|
|
2845
2856
|
...e,
|
|
2846
2857
|
color: e.color ?? (t === 0 ? n.lineColor : Vt[t % Vt.length])
|
|
@@ -2863,44 +2874,44 @@ function mi(e) {
|
|
|
2863
2874
|
yDomain: o.length ? ht(o) : [0, 1]
|
|
2864
2875
|
};
|
|
2865
2876
|
});
|
|
2866
|
-
}), v = t(() => Tn(n.rendering)), y = t(() =>
|
|
2867
|
-
let e =
|
|
2868
|
-
return g.value.fillIncompleteLastRow && e.length > 0 ? e :
|
|
2869
|
-
}),
|
|
2877
|
+
}), v = t(() => Tn(n.rendering)), y = t(() => mi(_.value, g.value.hideEmptyTracks)), b = t(() => Vn(y.value.length, g.value)), x = t(() => Hn(y.value, i.value, g.value)), S = t(() => {
|
|
2878
|
+
let e = x.value.filter((e) => e.series.length > 0);
|
|
2879
|
+
return g.value.fillIncompleteLastRow && e.length > 0 ? e : x.value;
|
|
2880
|
+
}), C = t(() => {
|
|
2870
2881
|
let e = _.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => or(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) => sr(e.domain, n.axes?.y?.nice !== !1, void 0, e.seriesList[0]?.unit, n.axes?.y?.splitNumber).tickTextWidth), t = Math.max(7, ...e), r = t + 7 + 4, i = -(7 + t + 0 + 12 / 2);
|
|
2871
2882
|
return {
|
|
2872
2883
|
tickClearance: r,
|
|
2873
2884
|
fullClearance: t + 7 + 0 + 12 + 4,
|
|
2874
2885
|
labelCenterX: i
|
|
2875
2886
|
};
|
|
2876
|
-
}),
|
|
2877
|
-
let e = Un(n.displayMode), t = g.value.columnCount, r = t > 1, i = Math.max(e,
|
|
2887
|
+
}), w = t(() => _.value.some((e) => e.visibleSeries.length === 1 && !!(e.visibleSeries[0]?.name.trim() || n.yLabel))), T = t(() => _.value.some((e) => e.visibleSeries.length > 0)), E = t(() => Math.max(Lt.left, w.value ? C.value.fullClearance : T.value ? C.value.tickClearance : 0)), D = t(() => cr(S.value.filter((e) => e.visibleSeries.length > 0), n.overlayMode, n.yDomain, n.yDomains, n.axes?.y?.splitNumber, n.axes?.y?.nice !== !1)), O = t(() => n.overlayMode === "multi-axis" ? Math.max(E.value, D.value.clearance.left) : E.value), k = t(() => n.overlayMode === "multi-axis" ? Math.max(Lt.right, D.value.clearance.right) : Lt.right), A = t(() => Math.max(0, o.value - O.value - k.value)), j = t(() => {
|
|
2888
|
+
let e = Un(n.displayMode), t = g.value.columnCount, r = t > 1, i = Math.max(e, C.value.fullClearance), a = Math.max(e, C.value.tickClearance), o = (A.value - i * Math.max(0, t - 1)) / t >= 120;
|
|
2878
2889
|
return {
|
|
2879
|
-
horizontalGap: n.overlayMode === "multi-axis" && r &&
|
|
2880
|
-
hideSecondaryLabels: n.overlayMode !== "multi-axis" && r &&
|
|
2890
|
+
horizontalGap: n.overlayMode === "multi-axis" && r && T.value ? Math.max(e, D.value.clearance.left + D.value.clearance.right) : r && T.value ? w.value && o ? i : a : e,
|
|
2891
|
+
hideSecondaryLabels: n.overlayMode !== "multi-axis" && r && w.value && !o
|
|
2881
2892
|
};
|
|
2882
|
-
}),
|
|
2893
|
+
}), M = t(() => h.value.length > 0), N = t(() => A.value > 0 && s.value > 0), P = t(() => n.xLabel ?? `时间(${n.timeUnit})`), F = t(() => n.interactionMode), I = t(() => F.value !== "annotation"), L = t(() => {
|
|
2883
2894
|
let e = [];
|
|
2884
2895
|
return _.value.forEach((t) => {
|
|
2885
2896
|
t.visibleSeries.length && e.push(t.xDomain[0], t.xDomain[1]);
|
|
2886
2897
|
}), ht(e);
|
|
2887
|
-
}),
|
|
2898
|
+
}), R = t(() => {
|
|
2888
2899
|
let e = n.initialXDomain;
|
|
2889
|
-
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? Jn(e[0] < e[1] ? e : [e[1], e[0]], n.xDomainStrategy, !0) : Jn(
|
|
2890
|
-
}),
|
|
2900
|
+
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? Jn(e[0] < e[1] ? e : [e[1], e[0]], n.xDomainStrategy, !0) : Jn(L.value, n.xDomainStrategy);
|
|
2901
|
+
}), z = (e) => {
|
|
2891
2902
|
let t = n.initialXDomains?.[e.series?.trackId ?? e.series?.id ?? e.id] ?? (e.series ? n.initialXDomains?.[e.series.id] : void 0) ?? n.initialXDomain;
|
|
2892
2903
|
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? Jn(t[0] < t[1] ? t : [t[1], t[0]], n.xDomainStrategy, !0) : Jn(ht(e.seriesList.flatMap((e) => e.xDomain)), n.xDomainStrategy);
|
|
2893
|
-
},
|
|
2904
|
+
}, B = t(() => l.value.rescaleX(U(R.value, [0, A.value])).domain()), V = t(() => Wn(A.value, s.value, g.value, n.displayMode, S.value.map(Boolean), j.value.horizontalGap).map((e, t) => ({
|
|
2894
2905
|
...e,
|
|
2895
|
-
series:
|
|
2896
|
-
}))),
|
|
2897
|
-
cells:
|
|
2906
|
+
series: S.value[t]
|
|
2907
|
+
}))), H = t(() => Xn({
|
|
2908
|
+
cells: V.value,
|
|
2898
2909
|
grid: g.value,
|
|
2899
2910
|
displayMode: n.displayMode,
|
|
2900
2911
|
overlayMode: n.overlayMode,
|
|
2901
2912
|
independentTransforms: u.value,
|
|
2902
|
-
sharedZoomDomain:
|
|
2903
|
-
initialXDomain: n.initialXDomain ?
|
|
2913
|
+
sharedZoomDomain: B.value,
|
|
2914
|
+
initialXDomain: n.initialXDomain ? R.value : void 0,
|
|
2904
2915
|
initialXDomains: n.initialXDomains,
|
|
2905
2916
|
xDomainStrategy: n.xDomainStrategy,
|
|
2906
2917
|
fixedYDomain: n.yDomain,
|
|
@@ -2915,39 +2926,40 @@ function mi(e) {
|
|
|
2915
2926
|
yAxisNice: n.axes?.y?.nice,
|
|
2916
2927
|
rendering: v.value,
|
|
2917
2928
|
linePointOverrides: m?.value,
|
|
2918
|
-
hideSecondaryLabels: c.value ||
|
|
2919
|
-
yAxisLabelX:
|
|
2920
|
-
yAxisSlots: n.overlayMode === "multi-axis" ?
|
|
2921
|
-
showCompactEmptyTracks: n.displayMode === "compact" &&
|
|
2922
|
-
})),
|
|
2929
|
+
hideSecondaryLabels: c.value || j.value.hideSecondaryLabels,
|
|
2930
|
+
yAxisLabelX: D.value.slots.find((e) => e.side === "left" && e.sideIndex === 0)?.labelOffset ?? C.value.labelCenterX,
|
|
2931
|
+
yAxisSlots: n.overlayMode === "multi-axis" ? D.value.slots : void 0,
|
|
2932
|
+
showCompactEmptyTracks: n.displayMode === "compact" && M.value
|
|
2933
|
+
})), W = (e) => e.seriesList.map((t) => ({
|
|
2923
2934
|
...e,
|
|
2924
2935
|
series: t,
|
|
2925
2936
|
yScale: e.seriesPaths.find((e) => e.series.id === t.id)?.yScale ?? e.yScale
|
|
2926
|
-
})),
|
|
2937
|
+
})), ee = (e, t) => e.seriesPaths.find((e) => e.series.id === t)?.yScale ?? e.yScale, te = t(() => H.value.flatMap(W));
|
|
2927
2938
|
return {
|
|
2928
2939
|
chartSeries: h,
|
|
2929
2940
|
chartTracks: _,
|
|
2941
|
+
pageableTracks: y,
|
|
2930
2942
|
renderingOptions: v,
|
|
2931
2943
|
gridOptions: g,
|
|
2932
|
-
pageCount:
|
|
2933
|
-
pagedTracks:
|
|
2934
|
-
resolvedChartLeftMargin:
|
|
2935
|
-
innerWidth:
|
|
2936
|
-
hasVisibleWaveformData:
|
|
2937
|
-
hasWaveformData:
|
|
2938
|
-
hasChartArea:
|
|
2939
|
-
resolvedXLabel:
|
|
2940
|
-
activeInteractionMode:
|
|
2941
|
-
isZoomMode:
|
|
2942
|
-
initialXDomain:
|
|
2943
|
-
sharedZoomDomain:
|
|
2944
|
-
resolveInitialTrackDomain:
|
|
2945
|
-
gridCells:
|
|
2946
|
-
trackLayouts:
|
|
2947
|
-
annotationLayoutsForTrack:
|
|
2948
|
-
resolveSeriesYScale:
|
|
2949
|
-
annotationTrackLayouts:
|
|
2950
|
-
renderedAnnotations: t(() => n.annotationsVisible ? Me(n.annotations,
|
|
2944
|
+
pageCount: b,
|
|
2945
|
+
pagedTracks: x,
|
|
2946
|
+
resolvedChartLeftMargin: O,
|
|
2947
|
+
innerWidth: A,
|
|
2948
|
+
hasVisibleWaveformData: T,
|
|
2949
|
+
hasWaveformData: M,
|
|
2950
|
+
hasChartArea: N,
|
|
2951
|
+
resolvedXLabel: P,
|
|
2952
|
+
activeInteractionMode: F,
|
|
2953
|
+
isZoomMode: I,
|
|
2954
|
+
initialXDomain: R,
|
|
2955
|
+
sharedZoomDomain: B,
|
|
2956
|
+
resolveInitialTrackDomain: z,
|
|
2957
|
+
gridCells: V,
|
|
2958
|
+
trackLayouts: H,
|
|
2959
|
+
annotationLayoutsForTrack: W,
|
|
2960
|
+
resolveSeriesYScale: ee,
|
|
2961
|
+
annotationTrackLayouts: te,
|
|
2962
|
+
renderedAnnotations: t(() => n.annotationsVisible ? Me(n.annotations, te.value, A.value, s.value) : []),
|
|
2951
2963
|
editorSeries: t(() => {
|
|
2952
2964
|
let e = p.editorDraft.value?.annotation.seriesId, t = h.value.find((t) => t.id === e);
|
|
2953
2965
|
return t ? {
|
|
@@ -2957,18 +2969,16 @@ function mi(e) {
|
|
|
2957
2969
|
unit: t.unit
|
|
2958
2970
|
} : void 0;
|
|
2959
2971
|
}),
|
|
2960
|
-
resolveFrameNumber: (
|
|
2961
|
-
if (!(n.frameNumber === void 0 || n.frameNumber === null)) return _.value.length === 1 ? n.frameNumber : typeof n.frameNumber == "number" ? n.frameNumber + e : `${n.frameNumber}-${e + 1}`;
|
|
2962
|
-
}
|
|
2972
|
+
resolveFrameNumber: gi(() => n.frameNumber, () => n.frameNumbers, () => _.value)
|
|
2963
2973
|
};
|
|
2964
2974
|
}
|
|
2965
|
-
var
|
|
2966
|
-
function
|
|
2975
|
+
var vi = 1e-6;
|
|
2976
|
+
function yi(e) {
|
|
2967
2977
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
2968
2978
|
}
|
|
2969
|
-
function
|
|
2970
|
-
let i =
|
|
2971
|
-
if (!(d >
|
|
2979
|
+
function bi({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r }) {
|
|
2980
|
+
let i = yi(e), a = yi(t), o = yi(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;
|
|
2981
|
+
if (!(d > vi && Math.abs(d - 360) > vi)) {
|
|
2972
2982
|
let e = Math.max(1, Math.ceil(i / o)), t = o, n = a * e;
|
|
2973
2983
|
return {
|
|
2974
2984
|
textWidth: t,
|
|
@@ -2993,7 +3003,7 @@ function _i({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r
|
|
|
2993
3003
|
}
|
|
2994
3004
|
//#endregion
|
|
2995
3005
|
//#region src/components/core/useWaveformPresentation.ts
|
|
2996
|
-
function
|
|
3006
|
+
function xi(e) {
|
|
2997
3007
|
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(() => ({
|
|
2998
3008
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
2999
3009
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -3038,7 +3048,7 @@ function vi(e) {
|
|
|
3038
3048
|
maxWidth: O.value ? "none" : `${j.value}px`,
|
|
3039
3049
|
whiteSpace: O.value ? "nowrap" : "normal",
|
|
3040
3050
|
overflowWrap: O.value ? "normal" : "anywhere"
|
|
3041
|
-
})), N = t(() =>
|
|
3051
|
+
})), N = t(() => bi({
|
|
3042
3052
|
naturalWidth: a.value || A.value,
|
|
3043
3053
|
naturalHeight: o.value || E.value * 1.2,
|
|
3044
3054
|
availableWidth: j.value,
|
|
@@ -3094,66 +3104,66 @@ function vi(e) {
|
|
|
3094
3104
|
}
|
|
3095
3105
|
//#endregion
|
|
3096
3106
|
//#region src/core/samplingReferenceValues.ts
|
|
3097
|
-
function
|
|
3107
|
+
function Si(e, t) {
|
|
3098
3108
|
return t === 0 ? 0 : Number.isFinite(e) ? Math.min(t, Math.max(1, Math.floor(e))) : t;
|
|
3099
3109
|
}
|
|
3100
|
-
function
|
|
3110
|
+
function Ci(e, t, n, r) {
|
|
3101
3111
|
let i = r - n;
|
|
3102
3112
|
return {
|
|
3103
3113
|
start: n + Math.floor(e * i / t),
|
|
3104
3114
|
end: n + Math.floor((e + 1) * i / t)
|
|
3105
3115
|
};
|
|
3106
3116
|
}
|
|
3107
|
-
function
|
|
3117
|
+
function wi(e, t) {
|
|
3108
3118
|
e[e.length - 1] !== t && e.push(t);
|
|
3109
3119
|
}
|
|
3110
|
-
function
|
|
3120
|
+
function Ti(e, t, n) {
|
|
3111
3121
|
if (e <= t) return Array.from({ length: e }, (e, t) => t);
|
|
3112
3122
|
if (t === 1) return [0];
|
|
3113
3123
|
if (t === 2) return [0, e - 1];
|
|
3114
3124
|
let r = [0];
|
|
3115
|
-
return n().forEach((e) =>
|
|
3125
|
+
return n().forEach((e) => wi(r, e)), wi(r, e - 1), r;
|
|
3116
3126
|
}
|
|
3117
|
-
function
|
|
3127
|
+
function Ei(e, t, n) {
|
|
3118
3128
|
let r = n === "minmax" ? Math.floor((t - 2) / 2) : Math.max(0, t - 2);
|
|
3119
|
-
return
|
|
3129
|
+
return Ti(e.length, t, () => {
|
|
3120
3130
|
if (!r) return [];
|
|
3121
3131
|
let t = [];
|
|
3122
3132
|
for (let i = 0; i < r; i += 1) {
|
|
3123
|
-
let a =
|
|
3133
|
+
let a = Ci(i, r, 1, e.length - 1), o = a.start, s = a.start;
|
|
3124
3134
|
for (let t = a.start + 1; t < a.end; t += 1) e[t] < e[o] && (o = t), e[t] > e[s] && (s = t);
|
|
3125
|
-
n === "min" ?
|
|
3135
|
+
n === "min" ? wi(t, o) : n === "max" ? wi(t, s) : o <= s ? (wi(t, o), wi(t, s)) : (wi(t, s), wi(t, o));
|
|
3126
3136
|
}
|
|
3127
3137
|
return t;
|
|
3128
3138
|
});
|
|
3129
3139
|
}
|
|
3130
|
-
function
|
|
3140
|
+
function Di(e, t) {
|
|
3131
3141
|
let n = Math.floor((t - 2) / 4);
|
|
3132
|
-
return
|
|
3142
|
+
return Ti(e.length, t, () => {
|
|
3133
3143
|
if (!n) return [];
|
|
3134
3144
|
let t = [];
|
|
3135
3145
|
for (let r = 0; r < n; r += 1) {
|
|
3136
|
-
let i =
|
|
3146
|
+
let i = Ci(r, n, 1, e.length - 1), a = i.start, o = i.start;
|
|
3137
3147
|
for (let t = i.start + 1; t < i.end; t += 1) e[t] < e[a] && (a = t), e[t] > e[o] && (o = t);
|
|
3138
3148
|
[
|
|
3139
3149
|
i.start,
|
|
3140
3150
|
a,
|
|
3141
3151
|
o,
|
|
3142
3152
|
i.end - 1
|
|
3143
|
-
].sort((e, t) => e - t).forEach((e) =>
|
|
3153
|
+
].sort((e, t) => e - t).forEach((e) => wi(t, e));
|
|
3144
3154
|
}
|
|
3145
3155
|
return t;
|
|
3146
3156
|
});
|
|
3147
3157
|
}
|
|
3148
|
-
function
|
|
3149
|
-
return
|
|
3158
|
+
function Oi(e, t, n) {
|
|
3159
|
+
return Ti(e.length, n, () => {
|
|
3150
3160
|
let r = (e.length - 2) / (n - 2), i = [], a = 0;
|
|
3151
3161
|
for (let o = 0; o < n - 2; o += 1) {
|
|
3152
3162
|
let s = Math.min(e.length, Math.floor((o + 1) * r) + 1), c = Math.min(e.length, Math.floor((o + 2) * r) + 1), l = 0, u = 0;
|
|
3153
3163
|
for (let n = s; n < c; n += 1) l += e[n], u += t[n];
|
|
3154
3164
|
let d = c - s;
|
|
3155
3165
|
d ? (l /= d, u /= d) : (l = e[e.length - 1], u = t[t.length - 1]);
|
|
3156
|
-
let f =
|
|
3166
|
+
let f = Ci(o, n - 2, 1, e.length - 1), p = f.start, m = -1;
|
|
3157
3167
|
for (let n = f.start; n < f.end; n += 1) {
|
|
3158
3168
|
let r = Math.abs((e[a] - l) * (t[n] - t[a]) - (e[a] - e[n]) * (u - t[a]));
|
|
3159
3169
|
r > m && (m = r, p = n);
|
|
@@ -3163,10 +3173,10 @@ function Ti(e, t, n) {
|
|
|
3163
3173
|
return i;
|
|
3164
3174
|
});
|
|
3165
3175
|
}
|
|
3166
|
-
function
|
|
3167
|
-
let i =
|
|
3176
|
+
function ki(e, t, n, r) {
|
|
3177
|
+
let i = Si(n, e.length), a = new Float64Array(i), o = new Float64Array(i);
|
|
3168
3178
|
for (let n = 0; n < i; n += 1) {
|
|
3169
|
-
let s =
|
|
3179
|
+
let s = Ci(n, i, 0, e.length);
|
|
3170
3180
|
for (let r = s.start; r < s.end; r += 1) a[n] += e[r], o[n] += t[r];
|
|
3171
3181
|
let c = s.end - s.start;
|
|
3172
3182
|
a[n] /= c, r === "average" && (o[n] /= c);
|
|
@@ -3177,10 +3187,10 @@ function Ei(e, t, n, r) {
|
|
|
3177
3187
|
y: o
|
|
3178
3188
|
};
|
|
3179
3189
|
}
|
|
3180
|
-
function
|
|
3190
|
+
function Ai(e, t, n, r) {
|
|
3181
3191
|
if (e.length !== t.length) throw Error("x and y must have the same length");
|
|
3182
|
-
if (n === "average" || n === "sum") return
|
|
3183
|
-
let i =
|
|
3192
|
+
if (n === "average" || n === "sum") return ki(e, t, r, n);
|
|
3193
|
+
let i = Si(r, e.length), a = n === "none" || e.length <= i ? Array.from({ length: e.length }, (e, t) => t) : n === "peak" ? Di(t, i) : n === "lttb" ? Oi(e, t, i) : Ei(t, i, n);
|
|
3184
3194
|
return {
|
|
3185
3195
|
kind: "source-indexes",
|
|
3186
3196
|
sourceIndexes: Uint32Array.from(a)
|
|
@@ -3188,41 +3198,41 @@ function Di(e, t, n, r) {
|
|
|
3188
3198
|
}
|
|
3189
3199
|
//#endregion
|
|
3190
3200
|
//#region src/core/workerSampling/javascriptBackend.ts
|
|
3191
|
-
var
|
|
3201
|
+
var ji = {
|
|
3192
3202
|
kind: "javascript",
|
|
3193
3203
|
sample(e) {
|
|
3194
|
-
return
|
|
3204
|
+
return Ai(e.x, e.y, e.strategy, e.targetPointCount);
|
|
3195
3205
|
}
|
|
3196
|
-
},
|
|
3197
|
-
function
|
|
3206
|
+
}, Mi = 8 * 1024 * 1024;
|
|
3207
|
+
function Ni(e, t) {
|
|
3198
3208
|
return t === 0 ? 0 : Number.isFinite(e) ? Math.min(t, Math.max(1, Math.floor(e))) : t;
|
|
3199
3209
|
}
|
|
3200
|
-
function
|
|
3210
|
+
function Pi(e, t, n, r) {
|
|
3201
3211
|
let i = r - n;
|
|
3202
3212
|
return {
|
|
3203
3213
|
start: n + Math.floor(e * i / t),
|
|
3204
3214
|
end: n + Math.floor((e + 1) * i / t)
|
|
3205
3215
|
};
|
|
3206
3216
|
}
|
|
3207
|
-
function
|
|
3217
|
+
function Fi(e, t) {
|
|
3208
3218
|
e[e.length - 1] !== t && e.push(t);
|
|
3209
3219
|
}
|
|
3210
|
-
function
|
|
3220
|
+
function Ii(e) {
|
|
3211
3221
|
return "minimumIndexes" in e ? e.minimumIndexes.byteLength + e.maximumIndexes.byteLength : e.x.byteLength + e.y.byteLength + e.count.byteLength;
|
|
3212
3222
|
}
|
|
3213
|
-
function
|
|
3223
|
+
function Li(e, t) {
|
|
3214
3224
|
let n = 1;
|
|
3215
3225
|
for (; n * 2 <= t && e % (n * 2) == 0;) n *= 2;
|
|
3216
3226
|
return n;
|
|
3217
3227
|
}
|
|
3218
|
-
var
|
|
3228
|
+
var Ri = class {
|
|
3219
3229
|
points;
|
|
3220
3230
|
extremaLayers = [];
|
|
3221
3231
|
sumLayers = [];
|
|
3222
3232
|
indexBytes = 0;
|
|
3223
3233
|
maxBytes;
|
|
3224
3234
|
constructor(e, t = {}) {
|
|
3225
|
-
this.points = e, this.maxBytes = Number.isFinite(t.maxBytes) ? Math.max(0, Math.floor(t.maxBytes ?? 0)) :
|
|
3235
|
+
this.points = e, this.maxBytes = Number.isFinite(t.maxBytes) ? Math.max(0, Math.floor(t.maxBytes ?? 0)) : Mi;
|
|
3226
3236
|
}
|
|
3227
3237
|
get byteLength() {
|
|
3228
3238
|
return this.indexBytes;
|
|
@@ -3231,7 +3241,7 @@ var Fi = class {
|
|
|
3231
3241
|
this.extremaLayers.length = 0, this.sumLayers.length = 0, this.indexBytes = 0;
|
|
3232
3242
|
}
|
|
3233
3243
|
sample(e, t, n, r) {
|
|
3234
|
-
let i = Math.max(0, Math.min(this.points.length, Math.floor(e))), a = Math.max(i, Math.min(this.points.length, Math.floor(t))), o = a - i, s =
|
|
3244
|
+
let i = Math.max(0, Math.min(this.points.length, Math.floor(e))), a = Math.max(i, Math.min(this.points.length, Math.floor(t))), o = a - i, s = Ni(r, o);
|
|
3235
3245
|
if (n !== "lttb") return n === "average" || n === "sum" ? this.aggregate(i, a, s, n) : n === "none" || o <= s ? this.allIndexes(i, a) : s === 1 ? this.indexes([i]) : s === 2 ? this.indexes([i, a - 1]) : this.extrema(i, a, s, n);
|
|
3236
3246
|
}
|
|
3237
3247
|
allIndexes(e, t) {
|
|
@@ -3251,24 +3261,24 @@ var Fi = class {
|
|
|
3251
3261
|
if (i === 0) return this.indexes([e, t - 1]);
|
|
3252
3262
|
let a = [e];
|
|
3253
3263
|
for (let n = 0; n < i; n += 1) {
|
|
3254
|
-
let o =
|
|
3264
|
+
let o = Pi(n, i, e + 1, t - 1), s = this.queryExtrema(o.start, o.end);
|
|
3255
3265
|
if (!s) return;
|
|
3256
|
-
if (r === "min")
|
|
3257
|
-
else if (r === "max")
|
|
3258
|
-
else if (r === "minmax") s.minimum <= s.maximum ? (
|
|
3266
|
+
if (r === "min") Fi(a, s.minimum);
|
|
3267
|
+
else if (r === "max") Fi(a, s.maximum);
|
|
3268
|
+
else if (r === "minmax") s.minimum <= s.maximum ? (Fi(a, s.minimum), Fi(a, s.maximum)) : (Fi(a, s.maximum), Fi(a, s.minimum));
|
|
3259
3269
|
else for (let e of [
|
|
3260
3270
|
o.start,
|
|
3261
3271
|
s.minimum,
|
|
3262
3272
|
s.maximum,
|
|
3263
3273
|
o.end - 1
|
|
3264
|
-
].sort((e, t) => e - t))
|
|
3274
|
+
].sort((e, t) => e - t)) Fi(a, e);
|
|
3265
3275
|
}
|
|
3266
|
-
return
|
|
3276
|
+
return Fi(a, t - 1), this.indexes(a);
|
|
3267
3277
|
}
|
|
3268
3278
|
aggregate(e, t, n, r) {
|
|
3269
3279
|
let i = new Float64Array(n), a = new Float64Array(n);
|
|
3270
3280
|
for (let o = 0; o < n; o += 1) {
|
|
3271
|
-
let s =
|
|
3281
|
+
let s = Pi(o, n, e, t), c = this.querySum(s.start, s.end);
|
|
3272
3282
|
if (!c || c.count === 0) return;
|
|
3273
3283
|
i[o] = c.x / c.count, a[o] = r === "average" ? c.y / c.count : c.y;
|
|
3274
3284
|
}
|
|
@@ -3283,7 +3293,7 @@ var Fi = class {
|
|
|
3283
3293
|
if (!this.ensureExtrema(n)) return;
|
|
3284
3294
|
let r = e, i = e;
|
|
3285
3295
|
for (let n = e; n < t;) {
|
|
3286
|
-
let e =
|
|
3296
|
+
let e = Li(n, t - n), a = Math.floor(Math.log2(e)), o = n / e, s = this.extremaLayers[a], c = s ? s.minimumIndexes[o] : n, l = s ? s.maximumIndexes[o] : n;
|
|
3287
3297
|
this.isMinimum(c, r) && (r = c), this.isMaximum(l, i) && (i = l), n += e;
|
|
3288
3298
|
}
|
|
3289
3299
|
return {
|
|
@@ -3296,7 +3306,7 @@ var Fi = class {
|
|
|
3296
3306
|
if (!this.ensureSum(n)) return;
|
|
3297
3307
|
let r = 0, i = 0, a = 0;
|
|
3298
3308
|
for (let n = e; n < t;) {
|
|
3299
|
-
let e =
|
|
3309
|
+
let e = Li(n, t - n), o = Math.floor(Math.log2(e)), s = n / e, c = this.sumLayers[o];
|
|
3300
3310
|
if (c) r += c.x[s], i += c.y[s], a += c.count[s];
|
|
3301
3311
|
else {
|
|
3302
3312
|
let e = this.points[n];
|
|
@@ -3317,7 +3327,7 @@ var Fi = class {
|
|
|
3317
3327
|
minimumIndexes: new Uint32Array(e),
|
|
3318
3328
|
maximumIndexes: new Uint32Array(e)
|
|
3319
3329
|
};
|
|
3320
|
-
if (!this.reserve(
|
|
3330
|
+
if (!this.reserve(Ii(n))) return !1;
|
|
3321
3331
|
let r = this.extremaLayers[t - 1];
|
|
3322
3332
|
for (let t = 0; t < e; t += 1) {
|
|
3323
3333
|
let e = t * 2, i = e + 1, a = r ? r.minimumIndexes[e] : e, o = r ? r.maximumIndexes[e] : e, s = r ? i < r.minimumIndexes.length : i < this.points.length, c = r && s ? r.minimumIndexes[i] : i, l = r && s ? r.maximumIndexes[i] : i;
|
|
@@ -3335,7 +3345,7 @@ var Fi = class {
|
|
|
3335
3345
|
y: new Float64Array(e),
|
|
3336
3346
|
count: new Uint32Array(e)
|
|
3337
3347
|
};
|
|
3338
|
-
if (!this.reserve(
|
|
3348
|
+
if (!this.reserve(Ii(n))) return !1;
|
|
3339
3349
|
let r = this.sumLayers[t - 1];
|
|
3340
3350
|
for (let t = 0; t < e; t += 1) {
|
|
3341
3351
|
let e = t * 2, i = e + 1;
|
|
@@ -3360,8 +3370,8 @@ var Fi = class {
|
|
|
3360
3370
|
let n = this.points[e], r = this.points[t];
|
|
3361
3371
|
return n.y > r.y || n.y === r.y && e < t;
|
|
3362
3372
|
}
|
|
3363
|
-
},
|
|
3364
|
-
function
|
|
3373
|
+
}, zi = 1e3, Bi = I((e) => e.x);
|
|
3374
|
+
function Vi(e) {
|
|
3365
3375
|
let t = [], n = !0, r = -Infinity;
|
|
3366
3376
|
for (let i of e) !Number.isFinite(i.x) || !Number.isFinite(i.y) || (i.x < r && (n = !1), r = i.x, t.push({
|
|
3367
3377
|
x: i.x,
|
|
@@ -3372,7 +3382,7 @@ function Ri(e) {
|
|
|
3372
3382
|
}));
|
|
3373
3383
|
return n || t.sort((e, t) => e.x - t.x), t;
|
|
3374
3384
|
}
|
|
3375
|
-
function
|
|
3385
|
+
function Hi(e, t) {
|
|
3376
3386
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity;
|
|
3377
3387
|
for (let t of e) n = Math.min(n, t.x), r = Math.max(r, t.x), i = Math.min(i, t.y), a = Math.max(a, t.y);
|
|
3378
3388
|
return {
|
|
@@ -3382,7 +3392,7 @@ function zi(e, t) {
|
|
|
3382
3392
|
yDomain: e.length ? [i, a] : null
|
|
3383
3393
|
};
|
|
3384
3394
|
}
|
|
3385
|
-
function
|
|
3395
|
+
function Ui(e, t, n = e.length) {
|
|
3386
3396
|
let r = Infinity, i = -Infinity, a = Infinity, o = -Infinity;
|
|
3387
3397
|
for (let n = 0; n < e.length; n += 1) r = Math.min(r, e[n]), i = Math.max(i, e[n]), a = Math.min(a, t[n]), o = Math.max(o, t[n]);
|
|
3388
3398
|
return {
|
|
@@ -3392,39 +3402,39 @@ function Bi(e, t, n = e.length) {
|
|
|
3392
3402
|
yDomain: e.length ? [a, o] : null
|
|
3393
3403
|
};
|
|
3394
3404
|
}
|
|
3395
|
-
function
|
|
3405
|
+
function Wi(e, t) {
|
|
3396
3406
|
return e ? e.revision === t ? "ok" : "stale-revision" : "not-found";
|
|
3397
3407
|
}
|
|
3398
|
-
function
|
|
3408
|
+
function Gi(e) {
|
|
3399
3409
|
return e === "auto" ? "peak" : e;
|
|
3400
3410
|
}
|
|
3401
|
-
function
|
|
3411
|
+
function Ki(e) {
|
|
3402
3412
|
if (Number.isFinite(e.maxPointCount) && (e.maxPointCount ?? 0) >= 1) return Math.floor(e.maxPointCount);
|
|
3403
3413
|
let t = Number.isFinite(e.plotWidth) ? Math.max(0, e.plotWidth) : 0, n = Number.isFinite(e.maxPointsPerPixel) ? Math.max(0, e.maxPointsPerPixel ?? 0) : 4;
|
|
3404
3414
|
return Math.max(1, Math.floor(t * n));
|
|
3405
3415
|
}
|
|
3406
|
-
function
|
|
3416
|
+
function qi(e, t) {
|
|
3407
3417
|
if (e.mode === "raw") return !0;
|
|
3408
3418
|
if (e.mode !== "auto") return !1;
|
|
3409
|
-
let n = Number.isFinite(e.autoThreshold) ? Math.max(1, Math.floor(e.autoThreshold ?? 0)) :
|
|
3419
|
+
let n = Number.isFinite(e.autoThreshold) ? Math.max(1, Math.floor(e.autoThreshold ?? 0)) : zi;
|
|
3410
3420
|
if (!e.previousSelectedMode) return t <= n;
|
|
3411
3421
|
let r = Number.isFinite(e.autoHysteresis) ? Math.max(0, Math.floor(e.autoHysteresis ?? 0)) : 0;
|
|
3412
3422
|
return e.previousSelectedMode === "raw" ? t <= n + r : t <= Math.max(0, n - r);
|
|
3413
3423
|
}
|
|
3414
|
-
function
|
|
3424
|
+
function Ji(e, t) {
|
|
3415
3425
|
let n = e[0], r = e.at(-1);
|
|
3416
|
-
return Number.isFinite(t) && n && r && t >= n.x && t <= r.x ? e[
|
|
3426
|
+
return Number.isFinite(t) && n && r && t >= n.x && t <= r.x ? e[Bi.center(e, t)] : void 0;
|
|
3417
3427
|
}
|
|
3418
|
-
function
|
|
3428
|
+
function Yi(e) {
|
|
3419
3429
|
return e ? e.kind === "source-indexes" ? e.sourceIndexes.length : e.x.length : 0;
|
|
3420
3430
|
}
|
|
3421
|
-
function
|
|
3431
|
+
function Xi(e, t) {
|
|
3422
3432
|
return e.kind === "aggregates" ? e : {
|
|
3423
3433
|
kind: "source-indexes",
|
|
3424
3434
|
sourceIndexes: Uint32Array.from(e.sourceIndexes, (e) => e + t)
|
|
3425
3435
|
};
|
|
3426
3436
|
}
|
|
3427
|
-
function
|
|
3437
|
+
function Zi(e, t, n, r, i) {
|
|
3428
3438
|
return [
|
|
3429
3439
|
e.datasetId,
|
|
3430
3440
|
e.revision,
|
|
@@ -3444,14 +3454,14 @@ function Ji(e, t, n, r, i) {
|
|
|
3444
3454
|
e.errorBarMinSpacing ?? 0
|
|
3445
3455
|
].join("\0");
|
|
3446
3456
|
}
|
|
3447
|
-
function
|
|
3457
|
+
function Qi(e, t, n, r, i, a, o, s) {
|
|
3448
3458
|
return {
|
|
3449
3459
|
seriesId: e.seriesId,
|
|
3450
3460
|
datasetId: e.datasetId,
|
|
3451
3461
|
mode: e.mode,
|
|
3452
3462
|
selectedMode: i,
|
|
3453
3463
|
backend: r,
|
|
3454
|
-
strategy:
|
|
3464
|
+
strategy: Gi(e.strategy),
|
|
3455
3465
|
sourcePointCount: t,
|
|
3456
3466
|
visiblePointCount: n,
|
|
3457
3467
|
renderedPointCount: o,
|
|
@@ -3467,18 +3477,18 @@ function Yi(e, t, n, r, i, a, o, s) {
|
|
|
3467
3477
|
}
|
|
3468
3478
|
//#endregion
|
|
3469
3479
|
//#region src/core/workerSampling/repositoryDataset.ts
|
|
3470
|
-
function
|
|
3480
|
+
function $i(e) {
|
|
3471
3481
|
return e?.y.length ?? 0;
|
|
3472
3482
|
}
|
|
3473
|
-
function
|
|
3483
|
+
function ea(e, t) {
|
|
3474
3484
|
return e.x ? e.x[t] : e.sampleStartTime + (e.sampleSourceIndexes?.[t] ?? t) / e.sampleRate;
|
|
3475
3485
|
}
|
|
3476
|
-
function
|
|
3486
|
+
function ta(e, t) {
|
|
3477
3487
|
let n = (t, n) => {
|
|
3478
|
-
let r = 0, i =
|
|
3488
|
+
let r = 0, i = $i(e);
|
|
3479
3489
|
for (; r < i;) {
|
|
3480
3490
|
let a = r + Math.floor((i - r) / 2);
|
|
3481
|
-
(n ?
|
|
3491
|
+
(n ? ea(e, a) <= t : ea(e, a) < t) ? r = a + 1 : i = a;
|
|
3482
3492
|
}
|
|
3483
3493
|
return r;
|
|
3484
3494
|
}, r = Math.min(t[0], t[1]), i = Math.max(t[0], t[1]);
|
|
@@ -3487,13 +3497,13 @@ function Qi(e, t) {
|
|
|
3487
3497
|
end: n(i, !0)
|
|
3488
3498
|
};
|
|
3489
3499
|
}
|
|
3490
|
-
function
|
|
3491
|
-
return e.x ? e.x.subarray(t, n) : Float64Array.from({ length: n - t }, (n, r) =>
|
|
3500
|
+
function na(e, t, n) {
|
|
3501
|
+
return e.x ? e.x.subarray(t, n) : Float64Array.from({ length: n - t }, (n, r) => ea(e, t + r));
|
|
3492
3502
|
}
|
|
3493
|
-
function
|
|
3503
|
+
function ra(e) {
|
|
3494
3504
|
return e?.kind === "wasm" && "registerDataset" in e && "disposeDataset" in e && "disposeAllDatasets" in e && "datasetIndexBytes" in e && "registerSamples" in e && "sampleDataset" in e;
|
|
3495
3505
|
}
|
|
3496
|
-
function
|
|
3506
|
+
function ia(e, t) {
|
|
3497
3507
|
let n = [], r = Math.min(e.length, t.length);
|
|
3498
3508
|
for (let i = 0; i < r; i += 1) Number.isFinite(e[i]) && Number.isFinite(t[i]) && n.push(i);
|
|
3499
3509
|
return n.sort((t, n) => e[t] - e[n] || t - n), {
|
|
@@ -3501,14 +3511,14 @@ function ta(e, t) {
|
|
|
3501
3511
|
y: Float64Array.from(n, (e) => t[e])
|
|
3502
3512
|
};
|
|
3503
3513
|
}
|
|
3504
|
-
function
|
|
3514
|
+
function aa(e, t, n, r) {
|
|
3505
3515
|
if (t?.kind === "typed") {
|
|
3506
|
-
let e =
|
|
3516
|
+
let e = ia(t.x, t.y);
|
|
3507
3517
|
return {
|
|
3508
3518
|
x: e.x,
|
|
3509
3519
|
y: e.y,
|
|
3510
3520
|
revision: n,
|
|
3511
|
-
metrics:
|
|
3521
|
+
metrics: Ui(e.x, e.y, Math.max(t.x.length, t.y.length))
|
|
3512
3522
|
};
|
|
3513
3523
|
}
|
|
3514
3524
|
if (t?.kind === "samples") {
|
|
@@ -3542,35 +3552,35 @@ function na(e, t, n, r) {
|
|
|
3542
3552
|
}
|
|
3543
3553
|
};
|
|
3544
3554
|
}
|
|
3545
|
-
let i =
|
|
3555
|
+
let i = Vi(e ?? t?.points ?? []);
|
|
3546
3556
|
return {
|
|
3547
3557
|
x: Float64Array.from(i, (e) => e.x),
|
|
3548
3558
|
y: Float64Array.from(i, (e) => e.y),
|
|
3549
3559
|
points: i,
|
|
3550
3560
|
revision: n,
|
|
3551
|
-
metrics:
|
|
3552
|
-
index: new
|
|
3561
|
+
metrics: Hi(i, e?.length ?? t?.points.length ?? 0),
|
|
3562
|
+
index: new Ri(i, { maxBytes: r })
|
|
3553
3563
|
};
|
|
3554
3564
|
}
|
|
3555
|
-
function
|
|
3556
|
-
!
|
|
3565
|
+
function oa(e, t, n) {
|
|
3566
|
+
!ra(e) || t.wasmDatasetHandle !== void 0 || (t.wasmDatasetHandle = t.x ? e.registerDataset(t.x, t.y, n) : e.registerSamples(t.y, t.sampleSourceIndexes, t.sampleStartTime, t.sampleRate, n), t.wasmIndexBytes = e.datasetIndexBytes(t.wasmDatasetHandle));
|
|
3557
3567
|
}
|
|
3558
|
-
function
|
|
3559
|
-
t.index?.dispose(), t.wasmDatasetHandle !== void 0 &&
|
|
3568
|
+
function sa(e, t) {
|
|
3569
|
+
t.index?.dispose(), t.wasmDatasetHandle !== void 0 && ra(e) && e.disposeDataset(t.wasmDatasetHandle);
|
|
3560
3570
|
}
|
|
3561
3571
|
//#endregion
|
|
3562
3572
|
//#region src/core/workerSampling/samplingCache.ts
|
|
3563
|
-
var
|
|
3564
|
-
function
|
|
3573
|
+
var ca = 96, la = 16 * 1024 * 1024;
|
|
3574
|
+
function ua(e) {
|
|
3565
3575
|
return e.kind === "source-indexes" ? e.sourceIndexes.byteLength : e.x.byteLength + e.y.byteLength;
|
|
3566
3576
|
}
|
|
3567
|
-
var
|
|
3577
|
+
var da = class {
|
|
3568
3578
|
entries = /* @__PURE__ */ new Map();
|
|
3569
3579
|
bytes = 0;
|
|
3570
3580
|
maxEntries;
|
|
3571
3581
|
maxBytes;
|
|
3572
3582
|
constructor(e = {}) {
|
|
3573
|
-
this.maxEntries = Number.isFinite(e.maxEntries) ? Math.max(0, Math.floor(e.maxEntries ?? 0)) :
|
|
3583
|
+
this.maxEntries = Number.isFinite(e.maxEntries) ? Math.max(0, Math.floor(e.maxEntries ?? 0)) : ca, this.maxBytes = Number.isFinite(e.maxBytes) ? Math.max(0, Math.floor(e.maxBytes ?? 0)) : la;
|
|
3574
3584
|
}
|
|
3575
3585
|
get metrics() {
|
|
3576
3586
|
return {
|
|
@@ -3585,7 +3595,7 @@ var ca = class {
|
|
|
3585
3595
|
if (t) return this.entries.delete(e), this.entries.set(e, t), t.output;
|
|
3586
3596
|
}
|
|
3587
3597
|
set(e, t) {
|
|
3588
|
-
let n =
|
|
3598
|
+
let n = ua(t);
|
|
3589
3599
|
if (n > this.maxBytes || this.maxEntries === 0) return;
|
|
3590
3600
|
let r = this.entries.get(e);
|
|
3591
3601
|
for (r && (this.bytes -= r.bytes, this.entries.delete(e)), this.entries.set(e, {
|
|
@@ -3605,14 +3615,14 @@ var ca = class {
|
|
|
3605
3615
|
clear() {
|
|
3606
3616
|
this.entries.clear(), this.bytes = 0;
|
|
3607
3617
|
}
|
|
3608
|
-
},
|
|
3618
|
+
}, fa = class {
|
|
3609
3619
|
datasets = /* @__PURE__ */ new Map();
|
|
3610
3620
|
javascriptBackend;
|
|
3611
3621
|
cache;
|
|
3612
3622
|
indexMaxBytes;
|
|
3613
3623
|
wasmBackend;
|
|
3614
3624
|
constructor(e = {}) {
|
|
3615
|
-
this.javascriptBackend = e.javascriptBackend ??
|
|
3625
|
+
this.javascriptBackend = e.javascriptBackend ?? ji, this.wasmBackend = e.wasmBackend, this.indexMaxBytes = e.indexMaxBytes, this.cache = new da({
|
|
3616
3626
|
maxEntries: e.cacheMaxEntries,
|
|
3617
3627
|
maxBytes: e.cacheMaxBytes
|
|
3618
3628
|
});
|
|
@@ -3625,9 +3635,9 @@ var ca = class {
|
|
|
3625
3635
|
};
|
|
3626
3636
|
}
|
|
3627
3637
|
setWasmBackend(e) {
|
|
3628
|
-
this.wasmBackend && this.wasmBackend !== e &&
|
|
3638
|
+
this.wasmBackend && this.wasmBackend !== e && ra(this.wasmBackend) && (this.wasmBackend.disposeAllDatasets(), this.datasets.forEach((e) => {
|
|
3629
3639
|
e.wasmDatasetHandle = void 0, e.wasmIndexBytes = void 0;
|
|
3630
|
-
})), this.wasmBackend = e,
|
|
3640
|
+
})), this.wasmBackend = e, ra(e) && this.datasets.forEach((t) => oa(e, t, this.indexMaxBytes));
|
|
3631
3641
|
}
|
|
3632
3642
|
handle(e) {
|
|
3633
3643
|
switch (e.type) {
|
|
@@ -3643,15 +3653,15 @@ var ca = class {
|
|
|
3643
3653
|
register(e, t, n, r) {
|
|
3644
3654
|
let i = this.datasets.get(e);
|
|
3645
3655
|
if (i) return this.datasetResponse(t, e, i, "stale-revision");
|
|
3646
|
-
let a =
|
|
3647
|
-
return
|
|
3656
|
+
let a = aa(n, r, 1, this.indexMaxBytes);
|
|
3657
|
+
return oa(this.wasmBackend, a, this.indexMaxBytes), this.datasets.set(e, a), this.datasetResponse(t, e, a, "ok");
|
|
3648
3658
|
}
|
|
3649
3659
|
replace(e, t, n, r, i) {
|
|
3650
|
-
let a = this.datasets.get(e), o =
|
|
3660
|
+
let a = this.datasets.get(e), o = Wi(a, n);
|
|
3651
3661
|
if (o !== "ok" || !a) return this.datasetResponse(t, e, a, o);
|
|
3652
|
-
|
|
3653
|
-
let s =
|
|
3654
|
-
return
|
|
3662
|
+
sa(this.wasmBackend, a), this.cache.deleteDataset(e);
|
|
3663
|
+
let s = aa(r, i, a.revision + 1, this.indexMaxBytes);
|
|
3664
|
+
return oa(this.wasmBackend, s, this.indexMaxBytes), this.datasets.set(e, s), this.datasetResponse(t, e, s, "ok");
|
|
3655
3665
|
}
|
|
3656
3666
|
sample(e) {
|
|
3657
3667
|
return {
|
|
@@ -3661,28 +3671,28 @@ var ca = class {
|
|
|
3661
3671
|
};
|
|
3662
3672
|
}
|
|
3663
3673
|
sampleSeries(e, t) {
|
|
3664
|
-
let n = performance.now(), r = this.datasets.get(t.datasetId), i =
|
|
3674
|
+
let n = performance.now(), r = this.datasets.get(t.datasetId), i = Wi(r, t.revision);
|
|
3665
3675
|
if (i !== "ok" || !r) return this.sampleResponse(e, t, i, void 0, "unavailable", "sampled", 0, n, !1);
|
|
3666
|
-
let a =
|
|
3667
|
-
if (
|
|
3676
|
+
let a = ta(r, t.xDomain), o = a.end - a.start;
|
|
3677
|
+
if (qi(t, o)) return this.sampleResponse(e, t, "ok", {
|
|
3668
3678
|
kind: "source-indexes",
|
|
3669
3679
|
sourceIndexes: Uint32Array.from({ length: o }, (e, t) => a.start + t)
|
|
3670
3680
|
}, "raw", "raw", o, n, !1);
|
|
3671
3681
|
let s = t.mode === "wasm" || t.mode === "auto" && this.wasmBackend ? this.wasmBackend : this.javascriptBackend, c = !s && t.wasmFailureFallback === "javascript", l = s ?? (c ? this.javascriptBackend : void 0);
|
|
3672
3682
|
if (!l) return this.sampleResponse(e, t, "wasm-unavailable", void 0, "unavailable", "sampled", o, n, !1);
|
|
3673
|
-
let u =
|
|
3683
|
+
let u = Gi(t.strategy), d = Ki(t), f = Zi(t, a, u, d, l.kind), p = this.cache.get(f);
|
|
3674
3684
|
if (p) return this.sampleResponse(e, t, c ? "wasm-unavailable" : "ok", p, l.kind, "sampled", o, n, !0);
|
|
3675
|
-
let m = (l.kind === "wasm" ? r.wasmDatasetHandle !== void 0 &&
|
|
3676
|
-
x:
|
|
3685
|
+
let m = (l.kind === "wasm" ? r.wasmDatasetHandle !== void 0 && ra(l) ? l.sampleDataset(r.wasmDatasetHandle, a.start, a.end, u, d) : void 0 : r.index?.sample(a.start, a.end, u, d)) ?? Xi(l.sample({
|
|
3686
|
+
x: na(r, a.start, a.end),
|
|
3677
3687
|
y: r.y.subarray(a.start, a.end),
|
|
3678
3688
|
points: r.points?.slice(a.start, a.end) ?? [],
|
|
3679
3689
|
strategy: u,
|
|
3680
3690
|
targetPointCount: d
|
|
3681
3691
|
}), a.start);
|
|
3682
|
-
return this.cache.set(f, m), r.wasmDatasetHandle !== void 0 &&
|
|
3692
|
+
return this.cache.set(f, m), r.wasmDatasetHandle !== void 0 && ra(l) && (r.wasmIndexBytes = l.datasetIndexBytes(r.wasmDatasetHandle)), this.sampleResponse(e, t, c ? "wasm-unavailable" : "ok", m, l.kind, "sampled", o, n, !1);
|
|
3683
3693
|
}
|
|
3684
3694
|
sampleResponse(e, t, n, r, i, a, o, s, c) {
|
|
3685
|
-
let l =
|
|
3695
|
+
let l = Qi(t, $i(this.datasets.get(t.datasetId)), o, i, a, performance.now() - s, Yi(r), c);
|
|
3686
3696
|
return l.requestId = e, {
|
|
3687
3697
|
seriesId: t.seriesId,
|
|
3688
3698
|
datasetId: t.datasetId,
|
|
@@ -3693,7 +3703,7 @@ var ca = class {
|
|
|
3693
3703
|
};
|
|
3694
3704
|
}
|
|
3695
3705
|
findNearest(e, t, n, r) {
|
|
3696
|
-
let i = this.datasets.get(e), a =
|
|
3706
|
+
let i = this.datasets.get(e), a = Wi(i, n);
|
|
3697
3707
|
return a !== "ok" || !i ? {
|
|
3698
3708
|
type: "find-nearest-point-response",
|
|
3699
3709
|
requestId: t,
|
|
@@ -3706,12 +3716,12 @@ var ca = class {
|
|
|
3706
3716
|
datasetId: e,
|
|
3707
3717
|
revision: n,
|
|
3708
3718
|
status: a,
|
|
3709
|
-
point: i.points ?
|
|
3710
|
-
let e =
|
|
3711
|
-
if (
|
|
3712
|
-
let t = Math.min(
|
|
3713
|
-
return Number.isFinite(r) &&
|
|
3714
|
-
x:
|
|
3719
|
+
point: i.points ? Ji(i.points, r) : (() => {
|
|
3720
|
+
let e = ta(i, [r, r]);
|
|
3721
|
+
if (!$i(i) || r < ea(i, 0) || r > ea(i, $i(i) - 1)) return;
|
|
3722
|
+
let t = Math.min($i(i) - 1, e.start), n = Math.max(0, t - 1), a = Math.abs(r - ea(i, n)) < Math.abs(ea(i, t) - r) ? n : t;
|
|
3723
|
+
return Number.isFinite(r) && $i(i) ? {
|
|
3724
|
+
x: ea(i, a),
|
|
3715
3725
|
y: i.y[a]
|
|
3716
3726
|
} : void 0;
|
|
3717
3727
|
})()
|
|
@@ -3719,15 +3729,15 @@ var ca = class {
|
|
|
3719
3729
|
}
|
|
3720
3730
|
metrics(e, t, n) {
|
|
3721
3731
|
let r = this.datasets.get(e);
|
|
3722
|
-
return this.datasetResponse(t, e, r,
|
|
3732
|
+
return this.datasetResponse(t, e, r, Wi(r, n));
|
|
3723
3733
|
}
|
|
3724
3734
|
dispose(e, t, n) {
|
|
3725
|
-
let r = this.datasets.get(e), i =
|
|
3726
|
-
return i === "ok" && r && (
|
|
3735
|
+
let r = this.datasets.get(e), i = Wi(r, n);
|
|
3736
|
+
return i === "ok" && r && (sa(this.wasmBackend, r), this.cache.deleteDataset(e), this.datasets.delete(e)), this.datasetResponse(t, e, r, i);
|
|
3727
3737
|
}
|
|
3728
3738
|
disposeAll(e) {
|
|
3729
3739
|
let t = [...this.datasets.keys()];
|
|
3730
|
-
return this.datasets.forEach((e) =>
|
|
3740
|
+
return this.datasets.forEach((e) => sa(this.wasmBackend, e)), ra(this.wasmBackend) && this.wasmBackend.disposeAllDatasets(), this.datasets.clear(), this.cache.clear(), {
|
|
3731
3741
|
type: "dispose-all-response",
|
|
3732
3742
|
requestId: e,
|
|
3733
3743
|
disposedDatasetIds: t
|
|
@@ -3749,10 +3759,10 @@ var ca = class {
|
|
|
3749
3759
|
};
|
|
3750
3760
|
//#endregion
|
|
3751
3761
|
//#region src/components/core/latestTaskScheduler.ts
|
|
3752
|
-
function
|
|
3762
|
+
function pa(e, t, n, r) {
|
|
3753
3763
|
return r ? r === "raw" ? e <= t + n ? "raw" : "sampled" : e <= Math.max(0, t - n) ? "raw" : "sampled" : e <= t ? "raw" : "sampled";
|
|
3754
3764
|
}
|
|
3755
|
-
function
|
|
3765
|
+
function ma() {
|
|
3756
3766
|
let e = 0, t = !1, n, r = !1, i = {
|
|
3757
3767
|
scheduled: 0,
|
|
3758
3768
|
coalesced: 0,
|
|
@@ -3791,12 +3801,12 @@ function da() {
|
|
|
3791
3801
|
}
|
|
3792
3802
|
//#endregion
|
|
3793
3803
|
//#region src/components/core/workerSamplingClient.ts
|
|
3794
|
-
function
|
|
3804
|
+
function ha(e) {
|
|
3795
3805
|
return e?.message || "Web Worker is unavailable; JavaScript sampling is being used.";
|
|
3796
3806
|
}
|
|
3797
|
-
function
|
|
3807
|
+
function ga() {
|
|
3798
3808
|
let e, t, n, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = () => {
|
|
3799
|
-
t ??= new
|
|
3809
|
+
t ??= new fa();
|
|
3800
3810
|
for (let [e, n] of i) {
|
|
3801
3811
|
t.handle({
|
|
3802
3812
|
type: "register-dataset",
|
|
@@ -3832,7 +3842,7 @@ function pa() {
|
|
|
3832
3842
|
let t = a();
|
|
3833
3843
|
e.forEach(({ request: e, resolve: n }) => n(t.handle(e)));
|
|
3834
3844
|
}, c = (r) => {
|
|
3835
|
-
t || (n =
|
|
3845
|
+
t || (n = ha(r), e?.terminate(), e = void 0, s());
|
|
3836
3846
|
};
|
|
3837
3847
|
try {
|
|
3838
3848
|
typeof Worker > "u" ? c() : (e = new Worker(new URL(
|
|
@@ -3869,20 +3879,20 @@ function pa() {
|
|
|
3869
3879
|
}
|
|
3870
3880
|
};
|
|
3871
3881
|
}
|
|
3872
|
-
function
|
|
3882
|
+
function _a(e) {
|
|
3873
3883
|
return e.type === "dataset-response";
|
|
3874
3884
|
}
|
|
3875
3885
|
//#endregion
|
|
3876
3886
|
//#region src/components/core/useWaveformRenderSampling.ts
|
|
3877
|
-
var
|
|
3878
|
-
function
|
|
3887
|
+
var va = 120;
|
|
3888
|
+
function ya(e, t) {
|
|
3879
3889
|
let n = e.output;
|
|
3880
3890
|
if (n) return n.kind === "aggregates" ? Array.from(n.x, (e, t) => ({
|
|
3881
3891
|
x: e,
|
|
3882
3892
|
y: n.y[t]
|
|
3883
3893
|
})) : Array.from(n.sourceIndexes, (e) => t.pointAt(e)).filter((e) => e !== void 0);
|
|
3884
3894
|
}
|
|
3885
|
-
function
|
|
3895
|
+
function ba(e, t) {
|
|
3886
3896
|
let n = e.request, r = e.visibleRange.end - e.visibleRange.start;
|
|
3887
3897
|
return {
|
|
3888
3898
|
seriesId: n.seriesId,
|
|
@@ -3904,7 +3914,7 @@ function _a(e, t) {
|
|
|
3904
3914
|
maxPendingRequestCount: 0
|
|
3905
3915
|
};
|
|
3906
3916
|
}
|
|
3907
|
-
function
|
|
3917
|
+
function xa(e) {
|
|
3908
3918
|
let { source: t } = e, { start: n, end: r } = e.visibleRange, i = r - n, a = Number.isFinite(e.request.maxPointCount) && (e.request.maxPointCount ?? 0) >= 1 ? Math.floor(e.request.maxPointCount) : Math.max(1, Math.floor(e.request.plotWidth * e.request.maxPointsPerPixel));
|
|
3909
3919
|
if (i <= a) return t.pointsInRange(n, r);
|
|
3910
3920
|
if (a === 1) return t.pointAt(n) ? [t.pointAt(n)] : [];
|
|
@@ -3915,7 +3925,7 @@ function va(e) {
|
|
|
3915
3925
|
}
|
|
3916
3926
|
return o;
|
|
3917
3927
|
}
|
|
3918
|
-
function
|
|
3928
|
+
function Sa(e, t, n, r) {
|
|
3919
3929
|
return {
|
|
3920
3930
|
message: e,
|
|
3921
3931
|
mode: t,
|
|
@@ -3923,8 +3933,8 @@ function ya(e, t, n, r) {
|
|
|
3923
3933
|
seriesIds: r
|
|
3924
3934
|
};
|
|
3925
3935
|
}
|
|
3926
|
-
function
|
|
3927
|
-
let n = C(0), r, i = 0, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u =
|
|
3936
|
+
function Ca(e) {
|
|
3937
|
+
let n = C(0), r, i = 0, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u = ma(), d, f, p = !1, m = t(() => {
|
|
3928
3938
|
let t = e.renderingOptions.value.sampling;
|
|
3929
3939
|
return e.sourceTrackLayouts.value.flatMap((n) => {
|
|
3930
3940
|
let r = n.xScale.domain();
|
|
@@ -3989,13 +3999,13 @@ function ba(e) {
|
|
|
3989
3999
|
revision: 0,
|
|
3990
4000
|
dataset: t.source.toWorkerDataset()
|
|
3991
4001
|
});
|
|
3992
|
-
!u.isCurrent(n) || !
|
|
4002
|
+
!u.isCurrent(n) || !_a(r) || r.status !== "ok" && r.status !== "stale-revision" || a.set(t.request.datasetId, r.revision);
|
|
3993
4003
|
}));
|
|
3994
4004
|
}, x = async (t, n = !1) => {
|
|
3995
4005
|
let o = m.value, c = { ...e.linePointOverrides.value }, l = [], d = [];
|
|
3996
4006
|
if (o.forEach((e) => {
|
|
3997
|
-
let r = e.visibleRange.end - e.visibleRange.start, i = n ? s.get(e.series.id) : void 0, a = e.request.mode === "auto" &&
|
|
3998
|
-
e.request.mode === "raw" || a ? (c[e.series.id] = e.source.pointsInRange(e.visibleRange.start, e.visibleRange.end), s.set(e.series.id, "raw"), d.push(
|
|
4007
|
+
let r = e.visibleRange.end - e.visibleRange.start, i = n ? s.get(e.series.id) : void 0, a = e.request.mode === "auto" && pa(r, e.request.autoThreshold, e.request.autoHysteresis ?? 0, i) === "raw";
|
|
4008
|
+
e.request.mode === "raw" || a ? (c[e.series.id] = e.source.pointsInRange(e.visibleRange.start, e.visibleRange.end), s.set(e.series.id, "raw"), d.push(ba(e, t))) : (c[e.series.id]?.length || (c[e.series.id] = xa(e)), l.push({
|
|
3999
4009
|
...e,
|
|
4000
4010
|
request: {
|
|
4001
4011
|
...e.request,
|
|
@@ -4007,7 +4017,7 @@ function ba(e) {
|
|
|
4007
4017
|
e.linePointOverrides.value = c, v(d);
|
|
4008
4018
|
return;
|
|
4009
4019
|
}
|
|
4010
|
-
if (e.linePointOverrides.value = c, r ??=
|
|
4020
|
+
if (e.linePointOverrides.value = c, r ??= ga(), await b(r, l, t), !u.isCurrent(t)) return;
|
|
4011
4021
|
let f = l.map((e) => ({
|
|
4012
4022
|
...e.request,
|
|
4013
4023
|
revision: a.get(e.request.datasetId) ?? 1
|
|
@@ -4022,22 +4032,22 @@ function ba(e) {
|
|
|
4022
4032
|
p = e;
|
|
4023
4033
|
} catch (n) {
|
|
4024
4034
|
if (!u.isCurrent(t)) return;
|
|
4025
|
-
y(
|
|
4035
|
+
y(Sa(n instanceof Error ? n.message : String(n), e.renderingOptions.value.sampling.mode, "javascript", l.map((e) => e.series.id)));
|
|
4026
4036
|
return;
|
|
4027
4037
|
}
|
|
4028
4038
|
if (!u.isCurrent(t)) return;
|
|
4029
4039
|
let h = new Map(l.map((e) => [e.series.id, e.source]));
|
|
4030
4040
|
p.results.forEach((e) => {
|
|
4031
|
-
let t = h.get(e.seriesId), n = t ?
|
|
4032
|
-
n && (e.status === "ok" || e.status === "wasm-unavailable") && (c[e.seriesId] = n), d.push(e.diagnostics), s.set(e.seriesId, e.diagnostics.selectedMode), e.status === "wasm-unavailable" && y(
|
|
4033
|
-
}), p.workerError && y(
|
|
4041
|
+
let t = h.get(e.seriesId), n = t ? ya(e, t) : void 0;
|
|
4042
|
+
n && (e.status === "ok" || e.status === "wasm-unavailable") && (c[e.seriesId] = n), d.push(e.diagnostics), s.set(e.seriesId, e.diagnostics.selectedMode), e.status === "wasm-unavailable" && y(Sa(p.workerError ?? "WASM sampling is unavailable.", e.diagnostics.mode, e.diagnostics.backend === "javascript" ? "javascript" : "none", [e.seriesId]));
|
|
4043
|
+
}), p.workerError && y(Sa(p.workerError, e.renderingOptions.value.sampling.mode, "javascript", l.map((e) => e.series.id))), r.workerFailureReason && p.results.every((e) => e.status !== "wasm-unavailable") && y(Sa(r.workerFailureReason, e.renderingOptions.value.sampling.mode, "javascript", l.map((e) => e.series.id))), e.linePointOverrides.value = { ...c }, v(d);
|
|
4034
4044
|
};
|
|
4035
4045
|
return O(h, () => {
|
|
4036
4046
|
f && clearTimeout(f);
|
|
4037
4047
|
let t = p;
|
|
4038
4048
|
p = !0, u.schedule((e) => x(e, t)), t && e.renderingOptions.value.sampling.mode === "auto" && e.renderingOptions.value.sampling.autoHysteresis > 0 && (f = setTimeout(() => {
|
|
4039
4049
|
f = void 0, u.schedule((e) => x(e, !1));
|
|
4040
|
-
},
|
|
4050
|
+
}, va));
|
|
4041
4051
|
}, { immediate: !0 }), O(e.preparedSeries, () => {
|
|
4042
4052
|
u.cancelPending(), n.value += 1, e.linePointOverrides.value = {}, a.clear(), o.clear(), s.clear(), c.clear(), r?.dispose(), r = void 0;
|
|
4043
4053
|
}, { flush: "sync" }), _(() => {
|
|
@@ -4046,10 +4056,10 @@ function ba(e) {
|
|
|
4046
4056
|
}
|
|
4047
4057
|
//#endregion
|
|
4048
4058
|
//#region src/components/core/useWaveformChartController.ts
|
|
4049
|
-
function
|
|
4059
|
+
function wa(e, t) {
|
|
4050
4060
|
e.value = t instanceof Element ? t : void 0;
|
|
4051
4061
|
}
|
|
4052
|
-
function
|
|
4062
|
+
function Ta(e, t) {
|
|
4053
4063
|
let n = b(), r = b(), i = b(), a = b(), o = b(0), s = b(0), c = b(0), l = b(0), u = b(0), f = C(K), p = C([]), m = b({}), h = b({}), g = S({
|
|
4054
4064
|
points: [],
|
|
4055
4065
|
trackIndex: null,
|
|
@@ -4063,7 +4073,7 @@ function Sa(e, t) {
|
|
|
4063
4073
|
O([() => e.yDomain, () => e.yDomains], () => {
|
|
4064
4074
|
m.value = {}, h.value = {};
|
|
4065
4075
|
}, { deep: !0 });
|
|
4066
|
-
let N = C(null), P = b(!1), F = b(!1), I = () => void 0, L = () => void 0, R = Fr(() => e.data, () => I(), () => L()), z =
|
|
4076
|
+
let N = C(null), P = b(!1), F = b(!1), I = () => void 0, L = () => void 0, R = Fr(() => e.data, () => I(), () => L()), z = xi({
|
|
4067
4077
|
props: e,
|
|
4068
4078
|
observedWidth: o,
|
|
4069
4079
|
observedHeight: s,
|
|
@@ -4071,7 +4081,7 @@ function Sa(e, t) {
|
|
|
4071
4081
|
measuredTitleHeight: l,
|
|
4072
4082
|
internalHiddenSeriesIds: E,
|
|
4073
4083
|
paginationBandHeight: u
|
|
4074
|
-
}), { chartWidth: B, chartHeight: V, isCleanView: H, isPresentationMode: U, hiddenSeriesIdSet: W, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: G } = z, q =
|
|
4084
|
+
}), { chartWidth: B, chartHeight: V, isCleanView: H, isPresentationMode: U, hiddenSeriesIdSet: W, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: G } = z, q = _i({
|
|
4075
4085
|
props: e,
|
|
4076
4086
|
preparedSeries: R,
|
|
4077
4087
|
currentPage: v,
|
|
@@ -4086,7 +4096,7 @@ function Sa(e, t) {
|
|
|
4086
4096
|
annotationInteraction: d(D),
|
|
4087
4097
|
linePointOverrides: A
|
|
4088
4098
|
}), { chartSeries: ae, chartTracks: oe, renderingOptions: se, trackLayouts: ce, gridOptions: ue, pageCount: de, pagedTracks: J, resolvedChartLeftMargin: fe, innerWidth: Y, hasChartArea: pe, activeInteractionMode: me, isZoomMode: he, initialXDomain: ge, sharedZoomDomain: _e, resolveInitialTrackDomain: ve, annotationLayoutsForTrack: ye, resolveSeriesYScale: be } = q;
|
|
4089
|
-
|
|
4099
|
+
Ca({
|
|
4090
4100
|
props: e,
|
|
4091
4101
|
emit: t,
|
|
4092
4102
|
instanceId: w,
|
|
@@ -4237,34 +4247,34 @@ function Sa(e, t) {
|
|
|
4237
4247
|
editorSeriesOptions: j,
|
|
4238
4248
|
clipPathId: w,
|
|
4239
4249
|
goToPage: we.goToPage,
|
|
4240
|
-
setContainer: (e) =>
|
|
4241
|
-
setSvgElement: (e) =>
|
|
4242
|
-
setTitleMeasureElement: (e) =>
|
|
4243
|
-
setSharedOverlayElement: (e) =>
|
|
4250
|
+
setContainer: (e) => wa(n, e),
|
|
4251
|
+
setSvgElement: (e) => wa(r, e),
|
|
4252
|
+
setTitleMeasureElement: (e) => wa(i, e),
|
|
4253
|
+
setSharedOverlayElement: (e) => wa(a, e)
|
|
4244
4254
|
});
|
|
4245
4255
|
}
|
|
4246
4256
|
//#endregion
|
|
4247
4257
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
4248
|
-
var
|
|
4258
|
+
var Ea = ["id"], Da = { class: "waveform-annotation-editor__content" }, Oa = {
|
|
4249
4259
|
class: "waveform-annotation-editor__coordinates",
|
|
4250
4260
|
"aria-label": "标注坐标"
|
|
4251
|
-
},
|
|
4261
|
+
}, ka = ["aria-invalid"], Aa = {
|
|
4252
4262
|
class: "waveform-annotation-editor__coordinate-value",
|
|
4253
4263
|
"aria-hidden": "true"
|
|
4254
|
-
},
|
|
4264
|
+
}, ja = ["id"], Ma = {
|
|
4255
4265
|
key: 0,
|
|
4256
4266
|
class: "waveform-annotation-editor__series",
|
|
4257
4267
|
"aria-label": "标注所属波形"
|
|
4258
|
-
},
|
|
4268
|
+
}, Na = { class: "waveform-annotation-editor__series-label" }, Pa = ["value"], Fa = ["value"], Ia = { key: 1 }, La = { class: "waveform-annotation-editor__field" }, Ra = { class: "waveform-annotation-editor__label-row" }, za = ["maxlength"], Ba = { class: "waveform-annotation-editor__colors" }, Va = {
|
|
4259
4269
|
class: "waveform-annotation-editor__color-field",
|
|
4260
4270
|
title: "调整标注边框色和透明度"
|
|
4261
|
-
},
|
|
4271
|
+
}, Ha = {
|
|
4262
4272
|
class: "waveform-annotation-editor__color-field",
|
|
4263
4273
|
title: "调整标注文字色和透明度"
|
|
4264
|
-
},
|
|
4274
|
+
}, Ua = {
|
|
4265
4275
|
class: "waveform-annotation-editor__color-field",
|
|
4266
4276
|
title: "调整标注背景色和透明度"
|
|
4267
|
-
},
|
|
4277
|
+
}, Wa = /*#__PURE__*/ et(/* @__PURE__ */ l({
|
|
4268
4278
|
__name: "WaveformAnnotationEditor",
|
|
4269
4279
|
props: {
|
|
4270
4280
|
annotation: {},
|
|
@@ -4335,9 +4345,9 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4335
4345
|
onCancel: o[4] ||= (e) => p("cancel"),
|
|
4336
4346
|
onOk: B
|
|
4337
4347
|
}, {
|
|
4338
|
-
title: A(() => [a("span", { id: E(g) }, w(d.mode === "add" ? "添加标注" : "编辑标注"), 9,
|
|
4339
|
-
default: A(() => [a("div",
|
|
4340
|
-
a("div",
|
|
4348
|
+
title: A(() => [a("span", { id: E(g) }, w(d.mode === "add" ? "添加标注" : "编辑标注"), 9, Ea)]),
|
|
4349
|
+
default: A(() => [a("div", Da, [
|
|
4350
|
+
a("div", Oa, [
|
|
4341
4351
|
a("label", {
|
|
4342
4352
|
class: "waveform-annotation-editor__coordinate-input",
|
|
4343
4353
|
"aria-invalid": !!N.value
|
|
@@ -4360,26 +4370,26 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4360
4370
|
"aria-invalid",
|
|
4361
4371
|
"aria-describedby"
|
|
4362
4372
|
]),
|
|
4363
|
-
a("code",
|
|
4364
|
-
], 8,
|
|
4373
|
+
a("code", Aa, w(y.value), 1)
|
|
4374
|
+
], 8, ka),
|
|
4365
4375
|
N.value ? (v(), i("p", {
|
|
4366
4376
|
key: 0,
|
|
4367
4377
|
id: `${E(g)}-time-error`,
|
|
4368
4378
|
class: "waveform-annotation-editor__coordinate-error",
|
|
4369
4379
|
role: "alert"
|
|
4370
|
-
}, w(N.value), 9,
|
|
4380
|
+
}, w(N.value), 9, ja)) : r("", !0),
|
|
4371
4381
|
a("span", null, [o[6] ||= a("b", null, "Y", -1), a("code", null, w(E(Ot)(d.annotation.y)), 1)])
|
|
4372
4382
|
]),
|
|
4373
4383
|
o[13] ||= a("p", {
|
|
4374
4384
|
class: "waveform-annotation-editor__coordinate-hint",
|
|
4375
4385
|
role: "note"
|
|
4376
4386
|
}, " 修改 X 轴后失焦时会自动吸附最近的采样点 ", -1),
|
|
4377
|
-
I.value ? (v(), i("label",
|
|
4387
|
+
I.value ? (v(), i("label", Ma, [
|
|
4378
4388
|
a("i", {
|
|
4379
4389
|
style: m({ backgroundColor: I.value.color }),
|
|
4380
4390
|
"aria-hidden": "true"
|
|
4381
4391
|
}, null, 4),
|
|
4382
|
-
a("span",
|
|
4392
|
+
a("span", Na, [o[7] ||= a("small", null, "标注波形", -1), a("b", null, w(I.value.name), 1)]),
|
|
4383
4393
|
d.seriesOptions?.length ? (v(), i("select", {
|
|
4384
4394
|
key: 0,
|
|
4385
4395
|
value: d.annotation.seriesId,
|
|
@@ -4388,9 +4398,9 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4388
4398
|
}, [(v(!0), i(e, null, x(d.seriesOptions, (e) => (v(), i("option", {
|
|
4389
4399
|
key: e.seriesId,
|
|
4390
4400
|
value: e.seriesId
|
|
4391
|
-
}, w(e.name) + w(e.unit ? ` (${e.unit})` : ""), 9,
|
|
4401
|
+
}, w(e.name) + w(e.unit ? ` (${e.unit})` : ""), 9, Fa))), 128))], 40, Pa)) : I.value.unit ? (v(), i("code", Ia, w(I.value.unit), 1)) : r("", !0)
|
|
4392
4402
|
])) : r("", !0),
|
|
4393
|
-
a("label",
|
|
4403
|
+
a("label", La, [a("span", Ra, [o[8] ||= a("b", null, "标注文本", -1), a("small", null, w(F.value) + "/" + w(E(40)), 1)]), j(a("textarea", {
|
|
4394
4404
|
ref_key: "textarea",
|
|
4395
4405
|
ref: h,
|
|
4396
4406
|
"onUpdate:modelValue": o[0] ||= (e) => _.value = e,
|
|
@@ -4399,10 +4409,10 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4399
4409
|
"aria-label": "标注文本",
|
|
4400
4410
|
placeholder: "输入这处波形的说明",
|
|
4401
4411
|
onKeydown: V
|
|
4402
|
-
}, null, 40,
|
|
4403
|
-
a("fieldset",
|
|
4412
|
+
}, null, 40, za), [[D, _.value]])]),
|
|
4413
|
+
a("fieldset", Ba, [
|
|
4404
4414
|
o[12] ||= a("legend", null, "颜色与透明度", -1),
|
|
4405
|
-
a("label",
|
|
4415
|
+
a("label", Va, [o[9] ||= a("span", null, "边框色", -1), s(E(u), {
|
|
4406
4416
|
"pure-color": C.value,
|
|
4407
4417
|
"onUpdate:pureColor": o[1] ||= (e) => C.value = e,
|
|
4408
4418
|
"aria-label": "标注边框色",
|
|
@@ -4412,7 +4422,7 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4412
4422
|
"disable-alpha": !1,
|
|
4413
4423
|
"blur-close": !0
|
|
4414
4424
|
}, null, 8, ["pure-color"])]),
|
|
4415
|
-
a("label",
|
|
4425
|
+
a("label", Ha, [o[10] ||= a("span", null, "文字色", -1), s(E(u), {
|
|
4416
4426
|
"pure-color": T.value,
|
|
4417
4427
|
"onUpdate:pureColor": o[2] ||= (e) => T.value = e,
|
|
4418
4428
|
"aria-label": "标注文字色",
|
|
@@ -4422,7 +4432,7 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4422
4432
|
"disable-alpha": !1,
|
|
4423
4433
|
"blur-close": !0
|
|
4424
4434
|
}, null, 8, ["pure-color"])]),
|
|
4425
|
-
a("label",
|
|
4435
|
+
a("label", Ua, [o[11] ||= a("span", null, "背景色", -1), s(E(u), {
|
|
4426
4436
|
"pure-color": k.value,
|
|
4427
4437
|
"onUpdate:pureColor": o[3] ||= (e) => k.value = e,
|
|
4428
4438
|
"aria-label": "标注背景色",
|
|
@@ -4437,13 +4447,13 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4437
4447
|
_: 1
|
|
4438
4448
|
}, 8, ["ok-button-props"]));
|
|
4439
4449
|
}
|
|
4440
|
-
}), [["__scopeId", "data-v-01ecd3a4"]]),
|
|
4450
|
+
}), [["__scopeId", "data-v-01ecd3a4"]]), Ga = { class: "waveform-tooltip__series-content" }, Ka = { class: "waveform-tooltip__series-label" }, qa = {
|
|
4441
4451
|
key: 0,
|
|
4442
4452
|
class: "waveform-tooltip__value"
|
|
4443
|
-
},
|
|
4453
|
+
}, Ja = {
|
|
4444
4454
|
key: 1,
|
|
4445
4455
|
class: "waveform-tooltip__value waveform-tooltip__value--missing"
|
|
4446
|
-
},
|
|
4456
|
+
}, Ya = 12, Xa = 8, Za = 238, Qa = 560, $a = 20, eo = 20, to = /*#__PURE__*/ et(/* @__PURE__ */ l({
|
|
4447
4457
|
__name: "WaveformTooltip",
|
|
4448
4458
|
props: {
|
|
4449
4459
|
visible: { type: Boolean },
|
|
@@ -4457,7 +4467,7 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4457
4467
|
setup(n) {
|
|
4458
4468
|
let s = n;
|
|
4459
4469
|
function c(e, t) {
|
|
4460
|
-
let n = Math.max(1, t -
|
|
4470
|
+
let n = Math.max(1, t - $a - 14), r = Math.max(1, Math.floor(n / 7.2));
|
|
4461
4471
|
return Math.max(1, Math.ceil([...e].length / r));
|
|
4462
4472
|
}
|
|
4463
4473
|
function l(e) {
|
|
@@ -4465,18 +4475,18 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4465
4475
|
return `${e.shotNo?.trim() || "未配置炮号"}: ${e.name}${e.unit ? `(${e.unit})` : ""} ${t}`;
|
|
4466
4476
|
}
|
|
4467
4477
|
function u(e) {
|
|
4468
|
-
return 16 +
|
|
4478
|
+
return 16 + eo * s.seriesPoints.reduce((t, n) => t + c(l(n), e), 0) + 5;
|
|
4469
4479
|
}
|
|
4470
4480
|
let d = t(() => {
|
|
4471
4481
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
4472
|
-
let e = s.position.x +
|
|
4482
|
+
let e = s.position.x + Ya, t = s.position.x - Ya - Za, n = s.containerWidth - Xa - e, r = s.position.x - Ya - Xa, i = Math.max(1, Math.min(Qa, s.containerWidth - Xa * 2)), a = e + Za <= s.containerWidth - Xa ? {
|
|
4473
4483
|
left: `${e}px`,
|
|
4474
|
-
maxWidth: `${Math.min(
|
|
4475
|
-
} : t >=
|
|
4476
|
-
right: `${s.containerWidth - s.position.x +
|
|
4477
|
-
maxWidth: `${Math.min(
|
|
4484
|
+
maxWidth: `${Math.min(Qa, n)}px`
|
|
4485
|
+
} : t >= Xa ? {
|
|
4486
|
+
right: `${s.containerWidth - s.position.x + Ya}px`,
|
|
4487
|
+
maxWidth: `${Math.min(Qa, r)}px`
|
|
4478
4488
|
} : {
|
|
4479
|
-
left: `${
|
|
4489
|
+
left: `${Xa}px`,
|
|
4480
4490
|
maxWidth: `${i}px`
|
|
4481
4491
|
}, o = Number.parseFloat(a.maxWidth);
|
|
4482
4492
|
return {
|
|
@@ -4491,9 +4501,9 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4491
4501
|
}, [(v(!0), i(e, null, x(n.seriesPoints, (t) => (v(), i("span", {
|
|
4492
4502
|
key: `${t.trackIndex}-${t.name}`,
|
|
4493
4503
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
4494
|
-
}, [a("i", { style: m({ backgroundColor: t.color }) }, null, 4), a("span",
|
|
4504
|
+
}, [a("i", { style: m({ backgroundColor: t.color }) }, null, 4), a("span", Ga, [a("span", Ka, [o(w(t.shotNo?.trim() || "未配置炮号") + ": " + w(t.name), 1), t.unit ? (v(), i(e, { key: 0 }, [o("(" + w(t.unit) + ")", 1)], 64)) : r("", !0)]), t.point ? (v(), i("span", qa, "(x:" + w(E(Nt)(t.point.x, n.timeUnit)) + " y:" + w(E(Dt)(t.point.y)) + ")", 1)) : (v(), i("span", Ja, "无数据"))])]))), 128))], 4)) : r("", !0);
|
|
4495
4505
|
}
|
|
4496
|
-
}), [["__scopeId", "data-v-1ae3316b"]]),
|
|
4506
|
+
}), [["__scopeId", "data-v-1ae3316b"]]), no = /* @__PURE__ */ l({
|
|
4497
4507
|
__name: "WaveformHoverHost",
|
|
4498
4508
|
props: {
|
|
4499
4509
|
state: {},
|
|
@@ -4504,7 +4514,7 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4504
4514
|
},
|
|
4505
4515
|
setup(e) {
|
|
4506
4516
|
let r = e, i = t(() => r.state.points.find((e) => e.point)?.point ?? null);
|
|
4507
|
-
return (t, r) => (v(), n(
|
|
4517
|
+
return (t, r) => (v(), n(to, {
|
|
4508
4518
|
visible: e.visible && i.value !== null,
|
|
4509
4519
|
position: e.state.position,
|
|
4510
4520
|
"time-unit": e.timeUnit,
|
|
@@ -4522,16 +4532,16 @@ var Ca = ["id"], wa = { class: "waveform-annotation-editor__content" }, Ta = {
|
|
|
4522
4532
|
"container-height"
|
|
4523
4533
|
]));
|
|
4524
4534
|
}
|
|
4525
|
-
}),
|
|
4535
|
+
}), ro = 13, io = 2, ao = 14, oo = 8, so = 24, co = {
|
|
4526
4536
|
circle: te,
|
|
4527
4537
|
square: re,
|
|
4528
4538
|
triangle: ie,
|
|
4529
4539
|
diamond: ne
|
|
4530
4540
|
};
|
|
4531
|
-
function
|
|
4532
|
-
return e === "none" ? null : ee().type(
|
|
4541
|
+
function lo(e, t = 48) {
|
|
4542
|
+
return e === "none" ? null : ee().type(co[e]).size(t)() ?? null;
|
|
4533
4543
|
}
|
|
4534
|
-
function
|
|
4544
|
+
function uo(e, t, n = 48) {
|
|
4535
4545
|
if (e === "none" || t.length === 0) return null;
|
|
4536
4546
|
if (e === "circle") {
|
|
4537
4547
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -4548,24 +4558,24 @@ function so(e, t, n = 48) {
|
|
|
4548
4558
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
4549
4559
|
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("");
|
|
4550
4560
|
}
|
|
4551
|
-
function
|
|
4561
|
+
function fo(e) {
|
|
4552
4562
|
return e === "none" ? null : "M1 8H25";
|
|
4553
4563
|
}
|
|
4554
|
-
function
|
|
4564
|
+
function po(e) {
|
|
4555
4565
|
if (e === "dashed") return "8 5";
|
|
4556
4566
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
4557
4567
|
}
|
|
4558
|
-
function
|
|
4559
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
4568
|
+
function mo(e) {
|
|
4569
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, so) : oo) / 2, n = ro - t, r = ro + t;
|
|
4560
4570
|
return [
|
|
4561
|
-
`M${n} ${
|
|
4562
|
-
`M${
|
|
4563
|
-
`M${n} ${
|
|
4571
|
+
`M${n} ${io}H${r}`,
|
|
4572
|
+
`M${ro} ${io}V${ao}`,
|
|
4573
|
+
`M${n} ${ao}H${r}`
|
|
4564
4574
|
].join("");
|
|
4565
4575
|
}
|
|
4566
4576
|
//#endregion
|
|
4567
4577
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
4568
|
-
var
|
|
4578
|
+
var ho = ["clip-path"], go = ["data-series-id", "data-series-name"], _o = [
|
|
4569
4579
|
"data-series-id",
|
|
4570
4580
|
"data-series-name",
|
|
4571
4581
|
"data-y-axis-index",
|
|
@@ -4574,11 +4584,11 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4574
4584
|
"d",
|
|
4575
4585
|
"stroke",
|
|
4576
4586
|
"stroke-dasharray"
|
|
4577
|
-
],
|
|
4587
|
+
], vo = ["data-series-id"], yo = [
|
|
4578
4588
|
"d",
|
|
4579
4589
|
"stroke",
|
|
4580
4590
|
"stroke-width"
|
|
4581
|
-
],
|
|
4591
|
+
], bo = ["data-series-id", "data-point-type"], xo = ["d", "fill"], So = /*#__PURE__*/ et(/* @__PURE__ */ l({
|
|
4582
4592
|
__name: "WaveformSeriesLayer",
|
|
4583
4593
|
props: {
|
|
4584
4594
|
track: {},
|
|
@@ -4586,7 +4596,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4586
4596
|
},
|
|
4587
4597
|
setup(n) {
|
|
4588
4598
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
4589
|
-
let t =
|
|
4599
|
+
let t = uo(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
4590
4600
|
x: a.track.xScale(t.x),
|
|
4591
4601
|
y: e.yScale(t.y)
|
|
4592
4602
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
@@ -4623,8 +4633,8 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4623
4633
|
"data-line-style": e.series.lineStyle,
|
|
4624
4634
|
d: e.path,
|
|
4625
4635
|
stroke: e.series.color,
|
|
4626
|
-
"stroke-dasharray": E(
|
|
4627
|
-
}, null, 8,
|
|
4636
|
+
"stroke-dasharray": E(po)(e.series.lineStyle)
|
|
4637
|
+
}, null, 8, _o)) : r("", !0),
|
|
4628
4638
|
e.series.errorBar.visible ? (v(), i("g", {
|
|
4629
4639
|
key: 1,
|
|
4630
4640
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -4635,7 +4645,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4635
4645
|
d: e.errorBarPath,
|
|
4636
4646
|
stroke: e.series.errorBar.color || e.series.color,
|
|
4637
4647
|
"stroke-width": e.series.errorBar.width
|
|
4638
|
-
}, null, 8,
|
|
4648
|
+
}, null, 8, yo)) : r("", !0)], 8, vo)) : r("", !0),
|
|
4639
4649
|
e.series.pointType === "none" ? r("", !0) : (v(), i("g", {
|
|
4640
4650
|
key: 2,
|
|
4641
4651
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -4646,28 +4656,28 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4646
4656
|
class: "waveform-track__point waveform-chart__point",
|
|
4647
4657
|
d: e.pointPath,
|
|
4648
4658
|
fill: e.series.color
|
|
4649
|
-
}, null, 8,
|
|
4650
|
-
], 8,
|
|
4659
|
+
}, null, 8, xo)) : r("", !0)], 8, bo))
|
|
4660
|
+
], 8, go))), 128))], 8, ho)) : r("", !0);
|
|
4651
4661
|
}
|
|
4652
|
-
}), [["__scopeId", "data-v-42a3fd47"]]),
|
|
4662
|
+
}), [["__scopeId", "data-v-42a3fd47"]]), Co = ["transform"], wo = ["transform"], To = {
|
|
4653
4663
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
4654
4664
|
x: "0",
|
|
4655
4665
|
y: "7",
|
|
4656
4666
|
dy: "0.71em",
|
|
4657
4667
|
"text-anchor": "start"
|
|
4658
|
-
},
|
|
4668
|
+
}, Eo = ["x"], Do = [
|
|
4659
4669
|
"data-y-axis-index",
|
|
4660
4670
|
"data-y-axis-side",
|
|
4661
4671
|
"transform"
|
|
4662
|
-
],
|
|
4672
|
+
], Oo = { key: 2 }, ko = [
|
|
4663
4673
|
"x",
|
|
4664
4674
|
"y",
|
|
4665
4675
|
"width"
|
|
4666
|
-
],
|
|
4676
|
+
], Ao = ["fill", "transform"], jo = ["data-y-axis-title-index"], Mo = [
|
|
4667
4677
|
"x",
|
|
4668
4678
|
"y",
|
|
4669
4679
|
"width"
|
|
4670
|
-
],
|
|
4680
|
+
], No = ["fill", "transform"], Po = /* @__PURE__ */ l({
|
|
4671
4681
|
__name: "WaveformTrackAxes",
|
|
4672
4682
|
props: {
|
|
4673
4683
|
track: {},
|
|
@@ -4727,7 +4737,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4727
4737
|
ref: o,
|
|
4728
4738
|
class: p(["waveform-track__axis waveform-track__axis--x waveform-chart__axis waveform-chart__axis--x", { "waveform-track__axis--line-hidden": t.axes?.x?.lineVisible === !1 }]),
|
|
4729
4739
|
transform: `translate(0, ${t.track.height})`
|
|
4730
|
-
}, null, 10,
|
|
4740
|
+
}, null, 10, Co)) : r("", !0),
|
|
4731
4741
|
t.track.showXAxis ? (v(), i("g", {
|
|
4732
4742
|
key: 1,
|
|
4733
4743
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -4735,13 +4745,13 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4735
4745
|
"font-family": "sans-serif",
|
|
4736
4746
|
"font-size": "10",
|
|
4737
4747
|
"aria-hidden": "true"
|
|
4738
|
-
}, [a("text",
|
|
4748
|
+
}, [a("text", To, w(t.track.endpointLabels.start), 1), a("text", {
|
|
4739
4749
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
4740
4750
|
x: t.track.width ?? t.innerWidth,
|
|
4741
4751
|
y: "7",
|
|
4742
4752
|
dy: "0.71em",
|
|
4743
4753
|
"text-anchor": "end"
|
|
4744
|
-
}, w(t.track.endpointLabels.end), 9,
|
|
4754
|
+
}, w(t.track.endpointLabels.end), 9, Eo)], 8, wo)) : r("", !0),
|
|
4745
4755
|
(v(!0), i(e, null, x(t.track.isEmpty ? [] : t.track.yAxes, (e) => (v(), i("g", {
|
|
4746
4756
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
4747
4757
|
ref_for: !0,
|
|
@@ -4750,21 +4760,21 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4750
4760
|
"data-y-axis-index": e.index,
|
|
4751
4761
|
"data-y-axis-side": e.side,
|
|
4752
4762
|
transform: `translate(${e.x}, 0)`
|
|
4753
|
-
}, null, 10,
|
|
4754
|
-
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && t.track.series && c(t.track.series) && d(t.track.height, t.track.index) ? (v(), i("g",
|
|
4763
|
+
}, null, 10, Do))), 128)),
|
|
4764
|
+
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && t.track.series && c(t.track.series) && d(t.track.height, t.track.index) ? (v(), i("g", Oo, [a("rect", {
|
|
4755
4765
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
4756
4766
|
x: t.track.yAxisLabelX - E(12) / 2,
|
|
4757
4767
|
y: t.track.height / 2 - 40,
|
|
4758
4768
|
width: E(12),
|
|
4759
4769
|
height: "80",
|
|
4760
4770
|
rx: "2"
|
|
4761
|
-
}, null, 8,
|
|
4771
|
+
}, null, 8, ko), a("text", {
|
|
4762
4772
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
4763
4773
|
fill: t.track.series?.color,
|
|
4764
4774
|
transform: `translate(${t.track.yAxisLabelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
4765
4775
|
"text-anchor": "middle",
|
|
4766
4776
|
"dominant-baseline": "central"
|
|
4767
|
-
}, w(t.track.series ? c(t.track.series) : ""), 9,
|
|
4777
|
+
}, w(t.track.series ? c(t.track.series) : ""), 9, Ao)])) : r("", !0),
|
|
4768
4778
|
(v(!0), i(e, null, x(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (v(), i("g", {
|
|
4769
4779
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
4770
4780
|
class: "waveform-track__multi-axis-title",
|
|
@@ -4776,40 +4786,40 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4776
4786
|
width: E(12),
|
|
4777
4787
|
height: "80",
|
|
4778
4788
|
rx: "2"
|
|
4779
|
-
}, null, 8,
|
|
4789
|
+
}, null, 8, Mo), a("text", {
|
|
4780
4790
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
4781
4791
|
fill: e.seriesList[0].color,
|
|
4782
4792
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
4783
4793
|
"text-anchor": "middle",
|
|
4784
4794
|
"dominant-baseline": "central"
|
|
4785
|
-
}, w(c(e.seriesList[0])), 9,
|
|
4795
|
+
}, w(c(e.seriesList[0])), 9, No)], 8, jo))), 128))
|
|
4786
4796
|
], 64));
|
|
4787
4797
|
}
|
|
4788
|
-
}),
|
|
4798
|
+
}), Fo = [
|
|
4789
4799
|
"width",
|
|
4790
4800
|
"height",
|
|
4791
4801
|
"fill"
|
|
4792
|
-
],
|
|
4802
|
+
], Io = ["clip-path"], Lo = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, Ro = [
|
|
4793
4803
|
"stroke",
|
|
4794
4804
|
"x1",
|
|
4795
4805
|
"x2",
|
|
4796
4806
|
"y2"
|
|
4797
|
-
],
|
|
4807
|
+
], zo = [
|
|
4798
4808
|
"stroke",
|
|
4799
4809
|
"x2",
|
|
4800
4810
|
"y1",
|
|
4801
4811
|
"y2"
|
|
4802
|
-
],
|
|
4812
|
+
], Bo = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, Vo = [
|
|
4803
4813
|
"stroke",
|
|
4804
4814
|
"x1",
|
|
4805
4815
|
"x2",
|
|
4806
4816
|
"y2"
|
|
4807
|
-
],
|
|
4817
|
+
], Ho = [
|
|
4808
4818
|
"stroke",
|
|
4809
4819
|
"x2",
|
|
4810
4820
|
"y1",
|
|
4811
4821
|
"y2"
|
|
4812
|
-
],
|
|
4822
|
+
], Uo = ["clip-path"], Wo = [
|
|
4813
4823
|
"data-y-axis-index",
|
|
4814
4824
|
"x2",
|
|
4815
4825
|
"y1",
|
|
@@ -4817,7 +4827,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4817
4827
|
"stroke",
|
|
4818
4828
|
"stroke-width",
|
|
4819
4829
|
"stroke-dasharray"
|
|
4820
|
-
],
|
|
4830
|
+
], Go = ["x", "y"], Ko = /* @__PURE__ */ l({
|
|
4821
4831
|
__name: "WaveformTrackBackdrop",
|
|
4822
4832
|
props: {
|
|
4823
4833
|
track: {},
|
|
@@ -4842,12 +4852,12 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4842
4852
|
height: t.track.height,
|
|
4843
4853
|
fill: t.frameStyle.backgroundColor,
|
|
4844
4854
|
"aria-hidden": "true"
|
|
4845
|
-
}, null, 8,
|
|
4855
|
+
}, null, 8, Fo)) : r("", !0),
|
|
4846
4856
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (v(), i("g", {
|
|
4847
4857
|
key: 1,
|
|
4848
4858
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
4849
4859
|
"aria-hidden": "true"
|
|
4850
|
-
}, [a("g",
|
|
4860
|
+
}, [a("g", Lo, [t.track.gridLines.vertical ? (v(!0), i(e, { key: 0 }, x(t.track.xMinorTicks, (e) => (v(), i("line", {
|
|
4851
4861
|
key: `x-minor-${t.track.index}-${e}`,
|
|
4852
4862
|
"data-grid-direction": "vertical",
|
|
4853
4863
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -4855,7 +4865,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4855
4865
|
x2: t.track.xScale(e),
|
|
4856
4866
|
y1: "0",
|
|
4857
4867
|
y2: t.track.height
|
|
4858
|
-
}, null, 8,
|
|
4868
|
+
}, null, 8, Ro))), 128)) : r("", !0), t.track.gridLines.horizontal ? (v(!0), i(e, { key: 1 }, x(t.track.yMinorTicks, (e) => (v(), i("line", {
|
|
4859
4869
|
key: `y-minor-${t.track.index}-${e}`,
|
|
4860
4870
|
"data-grid-direction": "horizontal",
|
|
4861
4871
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -4863,7 +4873,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4863
4873
|
x2: t.track.width ?? t.innerWidth,
|
|
4864
4874
|
y1: t.track.yScale(e),
|
|
4865
4875
|
y2: t.track.yScale(e)
|
|
4866
|
-
}, null, 8,
|
|
4876
|
+
}, null, 8, zo))), 128)) : r("", !0)]), a("g", Bo, [t.track.gridLines.vertical ? (v(!0), i(e, { key: 0 }, x(t.track.xMajorTicks, (e) => (v(), i("line", {
|
|
4867
4877
|
key: `x-major-${t.track.index}-${e}`,
|
|
4868
4878
|
"data-grid-direction": "vertical",
|
|
4869
4879
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -4871,7 +4881,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4871
4881
|
x2: t.track.xScale(e),
|
|
4872
4882
|
y1: "0",
|
|
4873
4883
|
y2: t.track.height
|
|
4874
|
-
}, null, 8,
|
|
4884
|
+
}, null, 8, Vo))), 128)) : r("", !0), t.track.gridLines.horizontal ? (v(!0), i(e, { key: 1 }, x(t.track.yMajorTicks, (e) => (v(), i("line", {
|
|
4875
4885
|
key: `y-major-${t.track.index}-${e}`,
|
|
4876
4886
|
"data-grid-direction": "horizontal",
|
|
4877
4887
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -4879,7 +4889,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4879
4889
|
x2: t.track.width ?? t.innerWidth,
|
|
4880
4890
|
y1: t.track.yScale(e),
|
|
4881
4891
|
y2: t.track.yScale(e)
|
|
4882
|
-
}, null, 8,
|
|
4892
|
+
}, null, 8, Ho))), 128)) : r("", !0)])], 8, Io)) : r("", !0),
|
|
4883
4893
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.zeroLine.visible && !t.cleanView ? (v(), i("g", {
|
|
4884
4894
|
key: 2,
|
|
4885
4895
|
class: "waveform-track__zero-lines waveform-chart__zero-lines",
|
|
@@ -4896,7 +4906,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4896
4906
|
stroke: t.zeroLine.color,
|
|
4897
4907
|
"stroke-width": t.zeroLine.width,
|
|
4898
4908
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
4899
|
-
}, null, 8,
|
|
4909
|
+
}, null, 8, Wo))], 64))), 128))], 8, Uo)) : r("", !0),
|
|
4900
4910
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (v(), i("text", {
|
|
4901
4911
|
key: 3,
|
|
4902
4912
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -4906,10 +4916,10 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4906
4916
|
"text-anchor": "middle",
|
|
4907
4917
|
"dominant-baseline": "central",
|
|
4908
4918
|
"aria-hidden": "true"
|
|
4909
|
-
}, w(t.frameNumber), 13,
|
|
4919
|
+
}, w(t.frameNumber), 13, Go)) : r("", !0)
|
|
4910
4920
|
], 64));
|
|
4911
4921
|
}
|
|
4912
|
-
}),
|
|
4922
|
+
}), qo = [
|
|
4913
4923
|
"data-track-index",
|
|
4914
4924
|
"data-track-id",
|
|
4915
4925
|
"data-track-empty",
|
|
@@ -4919,19 +4929,19 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4919
4929
|
"data-track-top",
|
|
4920
4930
|
"data-track-height",
|
|
4921
4931
|
"transform"
|
|
4922
|
-
],
|
|
4932
|
+
], Jo = [
|
|
4923
4933
|
"width",
|
|
4924
4934
|
"height",
|
|
4925
4935
|
"stroke",
|
|
4926
4936
|
"stroke-width",
|
|
4927
4937
|
"stroke-dasharray",
|
|
4928
4938
|
"stroke-linecap"
|
|
4929
|
-
],
|
|
4939
|
+
], Yo = [
|
|
4930
4940
|
"data-interactive",
|
|
4931
4941
|
"data-independent-overlay-index",
|
|
4932
4942
|
"width",
|
|
4933
4943
|
"height"
|
|
4934
|
-
],
|
|
4944
|
+
], Xo = ["x", "y"], Zo = /* @__PURE__ */ l({
|
|
4935
4945
|
__name: "WaveformTrack",
|
|
4936
4946
|
props: {
|
|
4937
4947
|
track: {},
|
|
@@ -4991,7 +5001,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
4991
5001
|
"data-track-height": e.track.height,
|
|
4992
5002
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
4993
5003
|
}, [
|
|
4994
|
-
s(
|
|
5004
|
+
s(Ko, {
|
|
4995
5005
|
track: e.track,
|
|
4996
5006
|
"clip-path-id": e.clipPathId,
|
|
4997
5007
|
"inner-width": e.innerWidth,
|
|
@@ -5008,7 +5018,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5008
5018
|
"frame-style",
|
|
5009
5019
|
"zero-line"
|
|
5010
5020
|
]),
|
|
5011
|
-
s(
|
|
5021
|
+
s(Po, {
|
|
5012
5022
|
track: e.track,
|
|
5013
5023
|
"inner-width": e.innerWidth,
|
|
5014
5024
|
"clean-view": e.cleanView,
|
|
@@ -5034,8 +5044,8 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5034
5044
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
5035
5045
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
5036
5046
|
"aria-hidden": "true"
|
|
5037
|
-
}, null, 8,
|
|
5038
|
-
s(
|
|
5047
|
+
}, null, 8, Jo)),
|
|
5048
|
+
s(So, {
|
|
5039
5049
|
track: e.track,
|
|
5040
5050
|
"clip-path-id": e.clipPathId
|
|
5041
5051
|
}, null, 8, ["track", "clip-path-id"]),
|
|
@@ -5057,7 +5067,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5057
5067
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
5058
5068
|
onClick: n[5] ||= (e) => o("click", e),
|
|
5059
5069
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
5060
|
-
}, null, 42,
|
|
5070
|
+
}, null, 42, Yo)) : r("", !0),
|
|
5061
5071
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (v(), i("text", {
|
|
5062
5072
|
key: 2,
|
|
5063
5073
|
class: "waveform-track__no-visible-series",
|
|
@@ -5065,33 +5075,33 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5065
5075
|
y: e.track.height / 2,
|
|
5066
5076
|
"text-anchor": "middle",
|
|
5067
5077
|
"dominant-baseline": "central"
|
|
5068
|
-
}, " 暂无可见曲线 ", 8,
|
|
5069
|
-
], 10,
|
|
5078
|
+
}, " 暂无可见曲线 ", 8, Xo)) : r("", !0)
|
|
5079
|
+
], 10, qo));
|
|
5070
5080
|
}
|
|
5071
|
-
}),
|
|
5081
|
+
}), Qo = [
|
|
5072
5082
|
"width",
|
|
5073
5083
|
"height",
|
|
5074
5084
|
"data-position",
|
|
5075
5085
|
"data-orientation"
|
|
5076
|
-
],
|
|
5086
|
+
], $o = [
|
|
5077
5087
|
"disabled",
|
|
5078
5088
|
"aria-pressed",
|
|
5079
5089
|
"aria-label",
|
|
5080
5090
|
"onClick"
|
|
5081
|
-
],
|
|
5091
|
+
], es = [
|
|
5082
5092
|
"data-line-type",
|
|
5083
5093
|
"data-line-style",
|
|
5084
5094
|
"data-point-type",
|
|
5085
5095
|
"data-error-bar-visible"
|
|
5086
|
-
],
|
|
5096
|
+
], ts = [
|
|
5087
5097
|
"d",
|
|
5088
5098
|
"stroke",
|
|
5089
5099
|
"stroke-dasharray"
|
|
5090
|
-
],
|
|
5100
|
+
], ns = [
|
|
5091
5101
|
"d",
|
|
5092
5102
|
"stroke",
|
|
5093
5103
|
"stroke-width"
|
|
5094
|
-
],
|
|
5104
|
+
], rs = ["d", "fill"], is = ["title"], as = /*#__PURE__*/ et(/* @__PURE__ */ l({
|
|
5095
5105
|
__name: "WaveformLegend",
|
|
5096
5106
|
props: {
|
|
5097
5107
|
series: {},
|
|
@@ -5149,45 +5159,45 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5149
5159
|
"data-point-type": e.pointType,
|
|
5150
5160
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
5151
5161
|
}, [
|
|
5152
|
-
E(
|
|
5162
|
+
E(fo)(e.lineType) ? (v(), i("path", {
|
|
5153
5163
|
key: 0,
|
|
5154
5164
|
class: "waveform-legend__line",
|
|
5155
|
-
d: E(
|
|
5165
|
+
d: E(fo)(e.lineType) ?? void 0,
|
|
5156
5166
|
stroke: e.color,
|
|
5157
|
-
"stroke-dasharray": E(
|
|
5167
|
+
"stroke-dasharray": E(po)(e.lineStyle),
|
|
5158
5168
|
"stroke-width": "1.5",
|
|
5159
5169
|
fill: "none"
|
|
5160
|
-
}, null, 8,
|
|
5170
|
+
}, null, 8, ts)) : r("", !0),
|
|
5161
5171
|
e.errorBar.visible ? (v(), i("path", {
|
|
5162
5172
|
key: 1,
|
|
5163
5173
|
class: "waveform-legend__error-bar",
|
|
5164
|
-
d: E(
|
|
5174
|
+
d: E(mo)(e.errorBar.capWidth),
|
|
5165
5175
|
stroke: e.errorBar.color || e.color,
|
|
5166
5176
|
"stroke-width": e.errorBar.width,
|
|
5167
5177
|
"stroke-linecap": "butt",
|
|
5168
5178
|
fill: "none"
|
|
5169
|
-
}, null, 8,
|
|
5179
|
+
}, null, 8, ns)) : r("", !0),
|
|
5170
5180
|
e.pointType === "none" ? r("", !0) : (v(), i("path", {
|
|
5171
5181
|
key: 2,
|
|
5172
5182
|
class: "waveform-legend__point",
|
|
5173
|
-
d: E(
|
|
5183
|
+
d: E(lo)(e.pointType, 30) ?? void 0,
|
|
5174
5184
|
fill: e.color,
|
|
5175
5185
|
transform: "translate(13 8)"
|
|
5176
|
-
}, null, 8,
|
|
5177
|
-
], 8,
|
|
5186
|
+
}, null, 8, rs))
|
|
5187
|
+
], 8, es)), a("span", {
|
|
5178
5188
|
class: "waveform-legend__label",
|
|
5179
5189
|
title: e.name
|
|
5180
|
-
}, w(e.name), 9,
|
|
5190
|
+
}, w(e.name), 9, is)], 10, $o))), 128))], 6)], 2)], 8, Qo));
|
|
5181
5191
|
}
|
|
5182
|
-
}), [["__scopeId", "data-v-2ae12e71"]]),
|
|
5192
|
+
}), [["__scopeId", "data-v-2ae12e71"]]), os = {
|
|
5183
5193
|
class: "waveform-chart__hover-layer",
|
|
5184
5194
|
"pointer-events": "none",
|
|
5185
5195
|
"aria-hidden": "true"
|
|
5186
|
-
},
|
|
5196
|
+
}, ss = ["clip-path", "transform"], cs = [
|
|
5187
5197
|
"x1",
|
|
5188
5198
|
"x2",
|
|
5189
5199
|
"y2"
|
|
5190
|
-
],
|
|
5200
|
+
], ls = /*#__PURE__*/ et(/* @__PURE__ */ l({
|
|
5191
5201
|
__name: "WaveformHoverLayer",
|
|
5192
5202
|
props: {
|
|
5193
5203
|
state: {},
|
|
@@ -5203,7 +5213,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5203
5213
|
x: e.xScale(n)
|
|
5204
5214
|
}] : [];
|
|
5205
5215
|
}));
|
|
5206
|
-
return (t, r) => (v(), i("g",
|
|
5216
|
+
return (t, r) => (v(), i("g", os, [(v(!0), i(e, null, x(o.value, (e) => (v(), i("g", {
|
|
5207
5217
|
key: e.track.index,
|
|
5208
5218
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
5209
5219
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -5213,9 +5223,9 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5213
5223
|
x2: e.x,
|
|
5214
5224
|
y1: "0",
|
|
5215
5225
|
y2: e.track.height
|
|
5216
|
-
}, null, 8,
|
|
5226
|
+
}, null, 8, cs)], 8, ss))), 128))]));
|
|
5217
5227
|
}
|
|
5218
|
-
}), [["__scopeId", "data-v-54a5a37d"]]),
|
|
5228
|
+
}), [["__scopeId", "data-v-54a5a37d"]]), us = [
|
|
5219
5229
|
"data-display-mode",
|
|
5220
5230
|
"data-interaction-mode",
|
|
5221
5231
|
"data-presentation-mode",
|
|
@@ -5224,35 +5234,35 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5224
5234
|
"data-plot-margin-top",
|
|
5225
5235
|
"data-plot-margin-bottom",
|
|
5226
5236
|
"data-title-area-height"
|
|
5227
|
-
],
|
|
5237
|
+
], ds = [
|
|
5228
5238
|
"role",
|
|
5229
5239
|
"aria-level",
|
|
5230
5240
|
"aria-hidden"
|
|
5231
|
-
],
|
|
5241
|
+
], fs = ["data-title-scale", "data-title-wrapped"], ps = [
|
|
5232
5242
|
"width",
|
|
5233
5243
|
"height",
|
|
5234
5244
|
"aria-label"
|
|
5235
|
-
],
|
|
5245
|
+
], ms = ["id"], hs = ["width", "height"], gs = ["transform"], _s = {
|
|
5236
5246
|
key: 0,
|
|
5237
5247
|
class: "waveform-chart__grid-slots",
|
|
5238
5248
|
"aria-hidden": "true"
|
|
5239
|
-
},
|
|
5249
|
+
}, vs = ["transform"], ys = ["width", "height"], bs = ["width", "height"], xs = [
|
|
5240
5250
|
"x",
|
|
5241
5251
|
"y",
|
|
5242
5252
|
"width",
|
|
5243
5253
|
"height"
|
|
5244
|
-
],
|
|
5254
|
+
], Ss = {
|
|
5245
5255
|
key: 4,
|
|
5246
5256
|
class: "waveform-chart__legend-layer"
|
|
5247
|
-
},
|
|
5257
|
+
}, Cs = [
|
|
5248
5258
|
"data-legend-track-index",
|
|
5249
5259
|
"data-legend-track-id",
|
|
5250
5260
|
"transform"
|
|
5251
|
-
],
|
|
5261
|
+
], ws = ["x", "y"], Ts = ["x", "y"], Es = /* @__PURE__ */ l({
|
|
5252
5262
|
__name: "WaveformChartView",
|
|
5253
5263
|
props: { controller: {} },
|
|
5254
5264
|
setup(t) {
|
|
5255
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: f, overlayMode: h, resolvedChartLeftMargin: g, titleAreaHeight: _, resolvedPlotMargin: y, pointerInsideChart: b, handleNativeContextMenu: S, titleAreaReserved: C, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: W, innerWidth: ee, innerHeight: te, handleSharedPointerMove: ne, beginSharedViewportDrag: re, finishViewportDrag: ie, cancelViewportDrag: G, handlePointerLeave: K, handleAnnotationClick: q, handleAnnotationContextMenu: ae, resolveFrameNumber: oe, frameStyle: ce, axes: le, resolvedZeroLine: ue, timeUnit: de, yLabel: J, handleIndependentPointerMove: fe, beginViewportDrag: Y, hoverState: pe, showTooltip: me, selectionBox: he, renderedAnnotations: ge, annotationsVisible: _e, handleExistingAnnotationContextMenu: ve, beginAnnotationDrag: ye, handleAnnotationMove: be, endAnnotationDrag: xe, resolveLegendPosition: X, resolveLegendOrientation: Se, legendBackgroundColor: Ce, legendInteractive: we, resolvedHiddenSeriesIds: Te, toggleSeriesVisibility: Ee, resolvedXLabel: De, xAxisTitleY: Oe, hasChartArea: ke, gridOptions: Ae, pageCount: je, currentPage: Me, getPageSize: Ne,
|
|
5265
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: f, overlayMode: h, resolvedChartLeftMargin: g, titleAreaHeight: _, resolvedPlotMargin: y, pointerInsideChart: b, handleNativeContextMenu: S, titleAreaReserved: C, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: W, innerWidth: ee, innerHeight: te, handleSharedPointerMove: ne, beginSharedViewportDrag: re, finishViewportDrag: ie, cancelViewportDrag: G, handlePointerLeave: K, handleAnnotationClick: q, handleAnnotationContextMenu: ae, resolveFrameNumber: oe, frameStyle: ce, axes: le, resolvedZeroLine: ue, timeUnit: de, yLabel: J, handleIndependentPointerMove: fe, beginViewportDrag: Y, hoverState: pe, showTooltip: me, selectionBox: he, renderedAnnotations: ge, annotationsVisible: _e, handleExistingAnnotationContextMenu: ve, beginAnnotationDrag: ye, handleAnnotationMove: be, endAnnotationDrag: xe, resolveLegendPosition: X, resolveLegendOrientation: Se, legendBackgroundColor: Ce, legendInteractive: we, resolvedHiddenSeriesIds: Te, toggleSeriesVisibility: Ee, resolvedXLabel: De, xAxisTitleY: Oe, hasChartArea: ke, gridOptions: Ae, pageCount: je, currentPage: Me, getPageSize: Ne, pageableTracks: Pe, goToPage: Fe, annotationInteraction: Ie, editorDraft: Le, contextMenu: Re, editorSeries: ze, editorSeriesOptions: Be, timeError: Ve, confirmAnnotation: He, cancelAnnotation: Ue, changeDraftSeries: We, changeDraftTime: Ge, editContextAnnotation: Ke, deleteContextAnnotation: qe, chartHeight: Je, setContainer: Ye, setSvgElement: Xe, setTitleMeasureElement: Ze, setSharedOverlayElement: Qe } = T(t.controller);
|
|
5256
5266
|
function $e() {
|
|
5257
5267
|
b.value = !1, K.value();
|
|
5258
5268
|
}
|
|
@@ -5301,7 +5311,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5301
5311
|
style: m(E(M)),
|
|
5302
5312
|
"data-title-scale": E(N).scale,
|
|
5303
5313
|
"data-title-wrapped": E(N).wrapped || void 0
|
|
5304
|
-
}, w(E(A)), 13,
|
|
5314
|
+
}, w(E(A)), 13, fs)], 4)) : r("", !0)], 12, ds)) : r("", !0),
|
|
5305
5315
|
(v(), i("svg", {
|
|
5306
5316
|
ref: E(Xe),
|
|
5307
5317
|
class: "waveform-chart__svg",
|
|
@@ -5318,9 +5328,9 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5318
5328
|
}, [a("rect", {
|
|
5319
5329
|
width: e.width,
|
|
5320
5330
|
height: e.height
|
|
5321
|
-
}, null, 8,
|
|
5331
|
+
}, null, 8, hs)], 8, ms))), 128))]),
|
|
5322
5332
|
a("g", { transform: `translate(${E(g)}, ${E(B)})` }, [
|
|
5323
|
-
E(o) !== "compact" && !E(l) ? (v(), i("g",
|
|
5333
|
+
E(o) !== "compact" && !E(l) ? (v(), i("g", _s, [(v(!0), i(e, null, x(E(V), (e) => (v(), i("g", {
|
|
5324
5334
|
key: `grid-slot-${e.slotIndex}`,
|
|
5325
5335
|
transform: `translate(${e.left}, ${e.top})`
|
|
5326
5336
|
}, [e.series ? r("", !0) : (v(), i("rect", {
|
|
@@ -5328,7 +5338,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5328
5338
|
class: "waveform-chart__grid-slot-placeholder",
|
|
5329
5339
|
width: e.width,
|
|
5330
5340
|
height: e.cellHeight
|
|
5331
|
-
}, null, 8,
|
|
5341
|
+
}, null, 8, ys))], 8, vs))), 128))])) : r("", !0),
|
|
5332
5342
|
E(o) !== "independent" && E(R).length && E(H) ? (v(), i("rect", {
|
|
5333
5343
|
key: 1,
|
|
5334
5344
|
ref: E(Qe),
|
|
@@ -5345,8 +5355,8 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5345
5355
|
onPointerleave: T[4] ||= (...e) => E(K) && E(K)(...e),
|
|
5346
5356
|
onClick: T[5] ||= (...e) => E(q) && E(q)(...e),
|
|
5347
5357
|
onContextmenu: T[6] ||= (...e) => E(ae) && E(ae)(...e)
|
|
5348
|
-
}, null, 42,
|
|
5349
|
-
(v(!0), i(e, null, x(E(R), (e) => (v(), n(E(
|
|
5358
|
+
}, null, 42, bs)) : r("", !0),
|
|
5359
|
+
(v(!0), i(e, null, x(E(R), (e) => (v(), n(E(Zo), {
|
|
5350
5360
|
key: `${e.index}-${e.id}`,
|
|
5351
5361
|
track: e,
|
|
5352
5362
|
"clip-path-id": E(z),
|
|
@@ -5355,7 +5365,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5355
5365
|
interactive: !E(u),
|
|
5356
5366
|
"display-mode": E(o),
|
|
5357
5367
|
"interaction-mode": E(c),
|
|
5358
|
-
"frame-number": E(oe)(e.
|
|
5368
|
+
"frame-number": E(oe)(e.id),
|
|
5359
5369
|
"frame-style": E(ce),
|
|
5360
5370
|
axes: E(le),
|
|
5361
5371
|
"clean-view": E(l),
|
|
@@ -5392,7 +5402,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5392
5402
|
"onClick",
|
|
5393
5403
|
"onContextmenu"
|
|
5394
5404
|
]))), 128)),
|
|
5395
|
-
s(E(
|
|
5405
|
+
s(E(ls), {
|
|
5396
5406
|
state: E(pe),
|
|
5397
5407
|
tracks: E(R),
|
|
5398
5408
|
"clip-path-id": E(z),
|
|
@@ -5411,7 +5421,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5411
5421
|
width: E(he).width,
|
|
5412
5422
|
height: E(he).height,
|
|
5413
5423
|
"aria-hidden": "true"
|
|
5414
|
-
}, null, 8,
|
|
5424
|
+
}, null, 8, xs)) : r("", !0),
|
|
5415
5425
|
E(l) ? r("", !0) : (v(), n(E(tt), {
|
|
5416
5426
|
key: 3,
|
|
5417
5427
|
annotations: E(ge),
|
|
@@ -5430,13 +5440,13 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5430
5440
|
"onMove",
|
|
5431
5441
|
"onDragEnd"
|
|
5432
5442
|
])),
|
|
5433
|
-
E(l) ? r("", !0) : (v(), i("g",
|
|
5443
|
+
E(l) ? r("", !0) : (v(), i("g", Ss, [(v(!0), i(e, null, x(E(R), (e) => (v(), i("g", {
|
|
5434
5444
|
key: `legend-${e.index}-${e.id}`,
|
|
5435
5445
|
class: "waveform-chart__legend-track",
|
|
5436
5446
|
"data-legend-track-index": e.index,
|
|
5437
5447
|
"data-legend-track-id": e.id,
|
|
5438
5448
|
transform: `translate(${e.left}, ${e.top})`
|
|
5439
|
-
}, [!e.isEmpty && e.legendSeries.length > 1 ? (v(), n(E(
|
|
5449
|
+
}, [!e.isEmpty && e.legendSeries.length > 1 ? (v(), n(E(as), {
|
|
5440
5450
|
key: 0,
|
|
5441
5451
|
series: e.legendSeries,
|
|
5442
5452
|
position: E(X)(e.id),
|
|
@@ -5457,23 +5467,23 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5457
5467
|
"width",
|
|
5458
5468
|
"height",
|
|
5459
5469
|
"onToggle"
|
|
5460
|
-
])) : r("", !0)], 8,
|
|
5461
|
-
], 8,
|
|
5470
|
+
])) : r("", !0)], 8, Cs))), 128))]))
|
|
5471
|
+
], 8, gs),
|
|
5462
5472
|
E(De) && !E(l) ? (v(), i("text", {
|
|
5463
5473
|
key: 0,
|
|
5464
5474
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
5465
5475
|
x: E(g) + E(ee) / 2,
|
|
5466
5476
|
y: E(Oe),
|
|
5467
5477
|
"text-anchor": "middle"
|
|
5468
|
-
}, w(E(De)), 9,
|
|
5478
|
+
}, w(E(De)), 9, ws)) : r("", !0),
|
|
5469
5479
|
E(ke) && !E(I) ? (v(), i("text", {
|
|
5470
5480
|
key: 1,
|
|
5471
5481
|
class: "waveform-chart__empty",
|
|
5472
5482
|
x: E(P) / 2,
|
|
5473
5483
|
y: E(F) / 2,
|
|
5474
5484
|
"text-anchor": "middle"
|
|
5475
|
-
}, " 暂无有效波形数据 ", 8,
|
|
5476
|
-
], 40,
|
|
5485
|
+
}, " 暂无有效波形数据 ", 8, Ts)) : r("", !0)
|
|
5486
|
+
], 40, ps)),
|
|
5477
5487
|
E(Ae).showPagination && E(je) > 1 && !E(l) ? (v(), n(E(se), {
|
|
5478
5488
|
key: 1,
|
|
5479
5489
|
class: "waveform-chart__pagination",
|
|
@@ -5490,7 +5500,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5490
5500
|
"total",
|
|
5491
5501
|
"onChange"
|
|
5492
5502
|
])) : r("", !0),
|
|
5493
|
-
E(Le) && !E(l) && !E(u) ? (v(), n(
|
|
5503
|
+
E(Le) && !E(l) && !E(u) ? (v(), n(Wa, {
|
|
5494
5504
|
key: 2,
|
|
5495
5505
|
annotation: E(Le).annotation,
|
|
5496
5506
|
mode: E(Le).mode,
|
|
@@ -5532,7 +5542,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5532
5542
|
"onDelete",
|
|
5533
5543
|
"onClose"
|
|
5534
5544
|
])) : r("", !0),
|
|
5535
|
-
s(E(
|
|
5545
|
+
s(E(no), {
|
|
5536
5546
|
state: E(pe),
|
|
5537
5547
|
visible: E(me) && !E(u),
|
|
5538
5548
|
"time-unit": E(de),
|
|
@@ -5545,9 +5555,9 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5545
5555
|
"container-width",
|
|
5546
5556
|
"container-height"
|
|
5547
5557
|
])
|
|
5548
|
-
], 46,
|
|
5558
|
+
], 46, us));
|
|
5549
5559
|
}
|
|
5550
|
-
}),
|
|
5560
|
+
}), Ds = /* @__PURE__ */ l({
|
|
5551
5561
|
__name: "WaveformChart",
|
|
5552
5562
|
props: {
|
|
5553
5563
|
data: {},
|
|
@@ -5580,6 +5590,7 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5580
5590
|
yDomains: {},
|
|
5581
5591
|
timeUnit: { default: "ms" },
|
|
5582
5592
|
frameNumber: { default: void 0 },
|
|
5593
|
+
frameNumbers: {},
|
|
5583
5594
|
frameStyle: {},
|
|
5584
5595
|
axes: {},
|
|
5585
5596
|
annotations: { default: () => [] },
|
|
@@ -5629,12 +5640,12 @@ var fo = ["clip-path"], po = ["data-series-id", "data-series-name"], mo = [
|
|
|
5629
5640
|
"sampling-error"
|
|
5630
5641
|
],
|
|
5631
5642
|
setup(e, { expose: t, emit: r }) {
|
|
5632
|
-
let i =
|
|
5643
|
+
let i = Ta(e, r);
|
|
5633
5644
|
return t({
|
|
5634
5645
|
resetViewport: i.resetViewport,
|
|
5635
5646
|
setViewportDomain: i.setViewportDomain
|
|
5636
|
-
}), (e, t) => (v(), n(
|
|
5647
|
+
}), (e, t) => (v(), n(Es, { controller: E(i) }, null, 8, ["controller"]));
|
|
5637
5648
|
}
|
|
5638
5649
|
});
|
|
5639
5650
|
//#endregion
|
|
5640
|
-
export { Q as DEFAULT_WAVEFORM_RENDERING_OPTIONS,
|
|
5651
|
+
export { Q as DEFAULT_WAVEFORM_RENDERING_OPTIONS, Ds as WaveformChart, gt as buildMinorTicks, fi as calculateWasmRange, It as clamp, kt as displayTime, pi as findWasmVisibleRange, Mt as formatAxisTime, jt as formatEndpointTime, Nt as formatTooltipTime, ui as initializeWasmSampling, sn as normalizeWaveformData, un as normalizeWaveformSeries, ht as paddedDomain, pt as parseWaveformAnnotations, Ft as resolveTrackGeometry, Tn as resolveWaveformRenderingOptions, di as sampleWaveformWasm, Nn as selectRenderablePoints, ft as serializeWaveformAnnotations };
|