tsviewer 1.0.29 → 1.0.31
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/dist/{BFButton-DpIwbJXR.mjs → BFLibraryButton-Cogtl8Vh.mjs} +12 -12
- package/dist/{IconSelection-DQZLRwZa.mjs → IconSelection-Bs00CxIF.mjs} +1 -1
- package/dist/{TSAnnotationCanvas-EAjgK8cT.mjs → TSAnnotationCanvas-HQV-UW-j.mjs} +3 -3
- package/dist/{TSAnnotationModal-CTcapLT8.mjs → TSAnnotationModal-CboTV3Bd.mjs} +4 -4
- package/dist/{TSFilterModal-D_p4VsMp.mjs → TSFilterModal-BiX6ocf2.mjs} +5 -5
- package/dist/{TSScrubber-DV_zbLFM.mjs → TSScrubber-D04stxRB.mjs} +89 -89
- package/dist/{TSViewerCanvas-B-p1oLEz.mjs → TSViewerCanvas-7tyEpUbF.mjs} +773 -779
- package/dist/{TSViewerLayerWindow-MwCEfh1O.mjs → TSViewerLayerWindow-ChwzPfuz.mjs} +20 -20
- package/dist/{TSViewerToolbar-CCQsR6PP.mjs → TSViewerToolbar-BHvdhd1h.mjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-DXn1tyay.mjs → TsAnnotationDeleteDialog-D4aggIW6.mjs} +19 -19
- package/dist/{index-B7dOp-ew.mjs → index-BXlfFRwy.mjs} +507 -488
- package/dist/{pathOr-S0xL-Shs.mjs → pathOr-1B5szOyh.mjs} +1 -1
- package/dist/tsviewer.css +1 -1
- package/dist/tsviewer.es.js +1 -1
- package/dist/tsviewer.umd.js +9 -9
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onUnmounted, readonly, reactive, computed, watch, onMounted, createElementBlock, openBlock, createElementVNode, renderSlot, normalizeStyle, defineAsyncComponent, nextTick, createVNode, withCtx, unref } from "vue";
|
|
2
2
|
import { storeToRefs } from "pinia";
|
|
3
|
-
import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, h as useToken, p as propOr, g as _export_sfc, u as useViewerStore, m as propEq } from "./index-
|
|
3
|
+
import { n as nth, b as _curry2, d as _xfBase, l as _reduced, e as _dispatchable, h as useToken, p as propOr, g as _export_sfc, u as useViewerStore, m as propEq } from "./index-BXlfFRwy.mjs";
|
|
4
4
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./_commonjsHelpers-DaMA6jEr.mjs";
|
|
5
5
|
var head = /* @__PURE__ */ nth(0), XFind = /* @__PURE__ */ function() {
|
|
6
6
|
function f(c, v) {
|
|
@@ -587,8 +587,8 @@ function requireWriter() {
|
|
|
587
587
|
var m = f.Array.prototype.set ? function(g, y, O) {
|
|
588
588
|
y.set(g, O);
|
|
589
589
|
} : function(g, y, O) {
|
|
590
|
-
for (var
|
|
591
|
-
y[O +
|
|
590
|
+
for (var b = 0; b < g.length; ++b)
|
|
591
|
+
y[O + b] = g[b];
|
|
592
592
|
};
|
|
593
593
|
return t.prototype.bytes = function(g) {
|
|
594
594
|
var y = g.length >>> 0;
|
|
@@ -1727,10 +1727,10 @@ function requireType() {
|
|
|
1727
1727
|
return this._fieldsById;
|
|
1728
1728
|
this._fieldsById = {};
|
|
1729
1729
|
for (var g = Object.keys(this.fields), y = 0; y < g.length; ++y) {
|
|
1730
|
-
var O = this.fields[g[y]],
|
|
1731
|
-
if (this._fieldsById[
|
|
1732
|
-
throw Error("duplicate id " +
|
|
1733
|
-
this._fieldsById[
|
|
1730
|
+
var O = this.fields[g[y]], b = O.id;
|
|
1731
|
+
if (this._fieldsById[b])
|
|
1732
|
+
throw Error("duplicate id " + b + " in " + this);
|
|
1733
|
+
this._fieldsById[b] = O;
|
|
1734
1734
|
}
|
|
1735
1735
|
return this._fieldsById;
|
|
1736
1736
|
}
|
|
@@ -1773,45 +1773,45 @@ function requireType() {
|
|
|
1773
1773
|
for (var O = 0; O < /* initializes */
|
|
1774
1774
|
this.fieldsArray.length; ++O)
|
|
1775
1775
|
this._fieldsArray[O].resolve();
|
|
1776
|
-
var
|
|
1776
|
+
var b = {};
|
|
1777
1777
|
for (O = 0; O < /* initializes */
|
|
1778
1778
|
this.oneofsArray.length; ++O)
|
|
1779
|
-
|
|
1779
|
+
b[this._oneofsArray[O].resolve().name] = {
|
|
1780
1780
|
get: n.oneOfGetter(this._oneofsArray[O].oneof),
|
|
1781
1781
|
set: n.oneOfSetter(this._oneofsArray[O].oneof)
|
|
1782
1782
|
};
|
|
1783
|
-
O && Object.defineProperties(g.prototype,
|
|
1783
|
+
O && Object.defineProperties(g.prototype, b);
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
}), m.generateConstructor = function(y) {
|
|
1787
|
-
for (var O = n.codegen(["p"], y.name),
|
|
1788
|
-
(k = y._fieldsArray[
|
|
1787
|
+
for (var O = n.codegen(["p"], y.name), b = 0, k; b < y.fieldsArray.length; ++b)
|
|
1788
|
+
(k = y._fieldsArray[b]).map ? O("this%s={}", n.safeProp(k.name)) : k.repeated && O("this%s=[]", n.safeProp(k.name));
|
|
1789
1789
|
return O("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
|
|
1790
1790
|
};
|
|
1791
1791
|
function R(g) {
|
|
1792
1792
|
return g._fieldsById = g._fieldsArray = g._oneofsArray = null, delete g.encode, delete g.decode, delete g.verify, g;
|
|
1793
1793
|
}
|
|
1794
1794
|
return m.fromJSON = function(y, O) {
|
|
1795
|
-
var
|
|
1796
|
-
|
|
1795
|
+
var b = new m(y, O.options);
|
|
1796
|
+
b.extensions = O.extensions, b.reserved = O.reserved;
|
|
1797
1797
|
for (var k = Object.keys(O.fields), I = 0; I < k.length; ++I)
|
|
1798
|
-
|
|
1798
|
+
b.add(
|
|
1799
1799
|
(typeof O.fields[k[I]].keyType < "u" ? o.fromJSON : u.fromJSON)(k[I], O.fields[k[I]])
|
|
1800
1800
|
);
|
|
1801
1801
|
if (O.oneofs)
|
|
1802
1802
|
for (k = Object.keys(O.oneofs), I = 0; I < k.length; ++I)
|
|
1803
|
-
|
|
1803
|
+
b.add(v.fromJSON(k[I], O.oneofs[k[I]]));
|
|
1804
1804
|
if (O.nested)
|
|
1805
1805
|
for (k = Object.keys(O.nested), I = 0; I < k.length; ++I) {
|
|
1806
|
-
var
|
|
1807
|
-
|
|
1806
|
+
var M = O.nested[k[I]];
|
|
1807
|
+
b.add(
|
|
1808
1808
|
// most to least likely
|
|
1809
|
-
(
|
|
1809
|
+
(M.id !== void 0 ? u.fromJSON : M.fields !== void 0 ? m.fromJSON : M.values !== void 0 ? c.fromJSON : M.methods !== void 0 ? i.fromJSON : f.fromJSON)(k[I], M)
|
|
1810
1810
|
);
|
|
1811
1811
|
}
|
|
1812
|
-
return O.extensions && O.extensions.length && (
|
|
1812
|
+
return O.extensions && O.extensions.length && (b.extensions = O.extensions), O.reserved && O.reserved.length && (b.reserved = O.reserved), O.group && (b.group = !0), O.comment && (b.comment = O.comment), O.edition && (b._edition = O.edition), b._defaultEdition = "proto3", b;
|
|
1813
1813
|
}, m.prototype.toJSON = function(y) {
|
|
1814
|
-
var O = f.prototype.toJSON.call(this, y),
|
|
1814
|
+
var O = f.prototype.toJSON.call(this, y), b = y ? !!y.keepComments : !1;
|
|
1815
1815
|
return n.toObject([
|
|
1816
1816
|
"edition",
|
|
1817
1817
|
this._editionToJSON(),
|
|
@@ -1832,16 +1832,16 @@ function requireType() {
|
|
|
1832
1832
|
"nested",
|
|
1833
1833
|
O && O.nested || void 0,
|
|
1834
1834
|
"comment",
|
|
1835
|
-
|
|
1835
|
+
b ? this.comment : void 0
|
|
1836
1836
|
]);
|
|
1837
1837
|
}, m.prototype.resolveAll = function() {
|
|
1838
1838
|
if (!this._needsRecursiveResolve) return this;
|
|
1839
1839
|
f.prototype.resolveAll.call(this);
|
|
1840
1840
|
var y = this.oneofsArray;
|
|
1841
|
-
for (
|
|
1842
|
-
y[
|
|
1843
|
-
for (var O = this.fieldsArray,
|
|
1844
|
-
O[
|
|
1841
|
+
for (b = 0; b < y.length; )
|
|
1842
|
+
y[b++].resolve();
|
|
1843
|
+
for (var O = this.fieldsArray, b = 0; b < O.length; )
|
|
1844
|
+
O[b++].resolve();
|
|
1845
1845
|
return this;
|
|
1846
1846
|
}, m.prototype._resolveFeaturesRecursive = function(y) {
|
|
1847
1847
|
return this._needsRecursiveFeatureResolution ? (y = this._edition || y, f.prototype._resolveFeaturesRecursive.call(this, y), this.oneofsArray.forEach((O) => {
|
|
@@ -1886,9 +1886,9 @@ function requireType() {
|
|
|
1886
1886
|
}, m.prototype.create = function(y) {
|
|
1887
1887
|
return new this.ctor(y);
|
|
1888
1888
|
}, m.prototype.setup = function() {
|
|
1889
|
-
for (var y = this.fullName, O = [],
|
|
1890
|
-
this.fieldsArray.length; ++
|
|
1891
|
-
O.push(this._fieldsArray[
|
|
1889
|
+
for (var y = this.fullName, O = [], b = 0; b < /* initializes */
|
|
1890
|
+
this.fieldsArray.length; ++b)
|
|
1891
|
+
O.push(this._fieldsArray[b].resolve().resolvedType);
|
|
1892
1892
|
this.encode = d(this)({
|
|
1893
1893
|
Writer: t,
|
|
1894
1894
|
types: O,
|
|
@@ -1928,8 +1928,8 @@ function requireType() {
|
|
|
1928
1928
|
}, m.prototype.toObject = function(y, O) {
|
|
1929
1929
|
return this.setup().toObject(y, O);
|
|
1930
1930
|
}, m.d = function(y) {
|
|
1931
|
-
return function(
|
|
1932
|
-
n.decorateType(
|
|
1931
|
+
return function(b) {
|
|
1932
|
+
n.decorateType(b, y);
|
|
1933
1933
|
};
|
|
1934
1934
|
}, type;
|
|
1935
1935
|
}
|
|
@@ -1959,31 +1959,31 @@ function requireRoot() {
|
|
|
1959
1959
|
if (g)
|
|
1960
1960
|
throw W;
|
|
1961
1961
|
N && N.resolveAll();
|
|
1962
|
-
var
|
|
1963
|
-
m = null,
|
|
1962
|
+
var w = m;
|
|
1963
|
+
m = null, w(W, N);
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
1966
|
function O(W) {
|
|
1967
1967
|
var N = W.lastIndexOf("google/protobuf/");
|
|
1968
1968
|
if (N > -1) {
|
|
1969
|
-
var
|
|
1970
|
-
if (
|
|
1969
|
+
var w = W.substring(N);
|
|
1970
|
+
if (w in r) return w;
|
|
1971
1971
|
}
|
|
1972
1972
|
return null;
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function b(W, N) {
|
|
1975
1975
|
try {
|
|
1976
1976
|
if (o.isString(N) && N.charAt(0) === "{" && (N = JSON.parse(N)), !o.isString(N))
|
|
1977
1977
|
R.setOptions(N.options).addJSON(N.nested);
|
|
1978
1978
|
else {
|
|
1979
1979
|
e.filename = W;
|
|
1980
|
-
var
|
|
1981
|
-
if (
|
|
1982
|
-
for (; x <
|
|
1983
|
-
(E = O(
|
|
1984
|
-
if (
|
|
1985
|
-
for (x = 0; x <
|
|
1986
|
-
(E = O(
|
|
1980
|
+
var w = e(N, R, h), E, x = 0;
|
|
1981
|
+
if (w.imports)
|
|
1982
|
+
for (; x < w.imports.length; ++x)
|
|
1983
|
+
(E = O(w.imports[x]) || R.resolvePath(W, w.imports[x])) && k(E);
|
|
1984
|
+
if (w.weakImports)
|
|
1985
|
+
for (x = 0; x < w.weakImports.length; ++x)
|
|
1986
|
+
(E = O(w.weakImports[x]) || R.resolvePath(W, w.weakImports[x])) && k(E, !0);
|
|
1987
1987
|
}
|
|
1988
1988
|
} catch (A) {
|
|
1989
1989
|
y(A);
|
|
@@ -1993,20 +1993,20 @@ function requireRoot() {
|
|
|
1993
1993
|
function k(W, N) {
|
|
1994
1994
|
if (W = O(W) || W, !(R.files.indexOf(W) > -1)) {
|
|
1995
1995
|
if (R.files.push(W), W in r) {
|
|
1996
|
-
g ?
|
|
1997
|
-
--I,
|
|
1996
|
+
g ? b(W, r[W]) : (++I, setTimeout(function() {
|
|
1997
|
+
--I, b(W, r[W]);
|
|
1998
1998
|
}));
|
|
1999
1999
|
return;
|
|
2000
2000
|
}
|
|
2001
2001
|
if (g) {
|
|
2002
|
-
var
|
|
2002
|
+
var w;
|
|
2003
2003
|
try {
|
|
2004
|
-
|
|
2004
|
+
w = o.fs.readFileSync(W).toString("utf8");
|
|
2005
2005
|
} catch (E) {
|
|
2006
2006
|
N || y(E);
|
|
2007
2007
|
return;
|
|
2008
2008
|
}
|
|
2009
|
-
|
|
2009
|
+
b(W, w);
|
|
2010
2010
|
} else
|
|
2011
2011
|
++I, R.fetch(W, function(E, x) {
|
|
2012
2012
|
if (--I, !!m) {
|
|
@@ -2014,15 +2014,15 @@ function requireRoot() {
|
|
|
2014
2014
|
N ? I || y(null, R) : y(E);
|
|
2015
2015
|
return;
|
|
2016
2016
|
}
|
|
2017
|
-
|
|
2017
|
+
b(W, x);
|
|
2018
2018
|
}
|
|
2019
2019
|
});
|
|
2020
2020
|
}
|
|
2021
2021
|
}
|
|
2022
2022
|
var I = 0;
|
|
2023
2023
|
o.isString(a) && (a = [a]);
|
|
2024
|
-
for (var
|
|
2025
|
-
($ = R.resolvePath("", a[
|
|
2024
|
+
for (var M = 0, $; M < a.length; ++M)
|
|
2025
|
+
($ = R.resolvePath("", a[M])) && k($);
|
|
2026
2026
|
return g ? (R.resolveAll(), R) : (I || y(null, R), R);
|
|
2027
2027
|
}, t.prototype.loadSync = function(a, h) {
|
|
2028
2028
|
if (!o.isNode)
|
|
@@ -2756,134 +2756,134 @@ function requireTokenize() {
|
|
|
2756
2756
|
function d(s, l) {
|
|
2757
2757
|
s = s.toString();
|
|
2758
2758
|
var a = 0, h = s.length, m = 1, R = 0, g = {}, y = [], O = null;
|
|
2759
|
-
function
|
|
2760
|
-
return Error("illegal " +
|
|
2759
|
+
function b(_) {
|
|
2760
|
+
return Error("illegal " + _ + " (line " + m + ")");
|
|
2761
2761
|
}
|
|
2762
2762
|
function k() {
|
|
2763
|
-
var
|
|
2764
|
-
|
|
2765
|
-
var
|
|
2766
|
-
if (!
|
|
2767
|
-
throw
|
|
2768
|
-
return a =
|
|
2769
|
-
}
|
|
2770
|
-
function I(
|
|
2771
|
-
return s.charAt(
|
|
2772
|
-
}
|
|
2773
|
-
function
|
|
2774
|
-
var
|
|
2775
|
-
type: s.charAt(
|
|
2763
|
+
var _ = O === "'" ? v : c;
|
|
2764
|
+
_.lastIndex = a - 1;
|
|
2765
|
+
var F = _.exec(s);
|
|
2766
|
+
if (!F)
|
|
2767
|
+
throw b("string");
|
|
2768
|
+
return a = _.lastIndex, w(O), O = null, n(F[1]);
|
|
2769
|
+
}
|
|
2770
|
+
function I(_) {
|
|
2771
|
+
return s.charAt(_);
|
|
2772
|
+
}
|
|
2773
|
+
function M(_, F, L) {
|
|
2774
|
+
var D = {
|
|
2775
|
+
type: s.charAt(_++),
|
|
2776
2776
|
lineEmpty: !1,
|
|
2777
|
-
leading:
|
|
2778
|
-
},
|
|
2779
|
-
l ?
|
|
2780
|
-
var
|
|
2777
|
+
leading: L
|
|
2778
|
+
}, B;
|
|
2779
|
+
l ? B = 2 : B = 3;
|
|
2780
|
+
var J = _ - B, z;
|
|
2781
2781
|
do
|
|
2782
|
-
if (--
|
|
2782
|
+
if (--J < 0 || (z = s.charAt(J)) === `
|
|
2783
2783
|
`) {
|
|
2784
|
-
|
|
2784
|
+
D.lineEmpty = !0;
|
|
2785
2785
|
break;
|
|
2786
2786
|
}
|
|
2787
|
-
while (
|
|
2788
|
-
for (var V = s.substring(
|
|
2787
|
+
while (z === " " || z === " ");
|
|
2788
|
+
for (var V = s.substring(_, F).split(i), K = 0; K < V.length; ++K)
|
|
2789
2789
|
V[K] = V[K].replace(l ? o : u, "").trim();
|
|
2790
|
-
|
|
2791
|
-
`).trim(), g[m] =
|
|
2790
|
+
D.text = V.join(`
|
|
2791
|
+
`).trim(), g[m] = D, R = m;
|
|
2792
2792
|
}
|
|
2793
|
-
function $(
|
|
2794
|
-
var
|
|
2795
|
-
return
|
|
2793
|
+
function $(_) {
|
|
2794
|
+
var F = W(_), L = s.substring(_, F), D = /^\s*\/\//.test(L);
|
|
2795
|
+
return D;
|
|
2796
2796
|
}
|
|
2797
|
-
function W(
|
|
2798
|
-
for (var
|
|
2797
|
+
function W(_) {
|
|
2798
|
+
for (var F = _; F < h && I(F) !== `
|
|
2799
2799
|
`; )
|
|
2800
|
-
|
|
2801
|
-
return
|
|
2800
|
+
F++;
|
|
2801
|
+
return F;
|
|
2802
2802
|
}
|
|
2803
2803
|
function N() {
|
|
2804
2804
|
if (y.length > 0)
|
|
2805
2805
|
return y.shift();
|
|
2806
2806
|
if (O)
|
|
2807
2807
|
return k();
|
|
2808
|
-
var
|
|
2808
|
+
var _, F, L, D, B, J = a === 0;
|
|
2809
2809
|
do {
|
|
2810
2810
|
if (a === h)
|
|
2811
2811
|
return null;
|
|
2812
|
-
for (
|
|
2813
|
-
if (
|
|
2814
|
-
` && (
|
|
2812
|
+
for (_ = !1; e.test(L = I(a)); )
|
|
2813
|
+
if (L === `
|
|
2814
|
+
` && (J = !0, ++m), ++a === h)
|
|
2815
2815
|
return null;
|
|
2816
2816
|
if (I(a) === "/") {
|
|
2817
2817
|
if (++a === h)
|
|
2818
|
-
throw
|
|
2818
|
+
throw b("comment");
|
|
2819
2819
|
if (I(a) === "/")
|
|
2820
2820
|
if (l) {
|
|
2821
|
-
if (
|
|
2822
|
-
|
|
2821
|
+
if (D = a, B = !1, $(a - 1)) {
|
|
2822
|
+
B = !0;
|
|
2823
2823
|
do
|
|
2824
|
-
if (a = W(a), a === h || (a++, !
|
|
2824
|
+
if (a = W(a), a === h || (a++, !J))
|
|
2825
2825
|
break;
|
|
2826
2826
|
while ($(a));
|
|
2827
2827
|
} else
|
|
2828
2828
|
a = Math.min(h, W(a) + 1);
|
|
2829
|
-
|
|
2829
|
+
B && (M(D, a, J), J = !0), m++, _ = !0;
|
|
2830
2830
|
} else {
|
|
2831
|
-
for (
|
|
2831
|
+
for (B = I(D = a + 1) === "/"; I(++a) !== `
|
|
2832
2832
|
`; )
|
|
2833
2833
|
if (a === h)
|
|
2834
2834
|
return null;
|
|
2835
|
-
++a,
|
|
2835
|
+
++a, B && (M(D, a - 1, J), J = !0), ++m, _ = !0;
|
|
2836
2836
|
}
|
|
2837
|
-
else if ((
|
|
2838
|
-
|
|
2837
|
+
else if ((L = I(a)) === "*") {
|
|
2838
|
+
D = a + 1, B = l || I(D) === "*";
|
|
2839
2839
|
do {
|
|
2840
|
-
if (
|
|
2840
|
+
if (L === `
|
|
2841
2841
|
` && ++m, ++a === h)
|
|
2842
|
-
throw
|
|
2843
|
-
|
|
2844
|
-
} while (
|
|
2845
|
-
++a,
|
|
2842
|
+
throw b("comment");
|
|
2843
|
+
F = L, L = I(a);
|
|
2844
|
+
} while (F !== "*" || L !== "/");
|
|
2845
|
+
++a, B && (M(D, a - 2, J), J = !0), _ = !0;
|
|
2846
2846
|
} else
|
|
2847
2847
|
return "/";
|
|
2848
2848
|
}
|
|
2849
|
-
} while (
|
|
2850
|
-
var
|
|
2849
|
+
} while (_);
|
|
2850
|
+
var z = a;
|
|
2851
2851
|
f.lastIndex = 0;
|
|
2852
|
-
var V = f.test(I(
|
|
2852
|
+
var V = f.test(I(z++));
|
|
2853
2853
|
if (!V)
|
|
2854
|
-
for (;
|
|
2855
|
-
++
|
|
2856
|
-
var K = s.substring(a, a =
|
|
2854
|
+
for (; z < h && !f.test(I(z)); )
|
|
2855
|
+
++z;
|
|
2856
|
+
var K = s.substring(a, a = z);
|
|
2857
2857
|
return (K === '"' || K === "'") && (O = K), K;
|
|
2858
2858
|
}
|
|
2859
|
-
function _
|
|
2860
|
-
y.push(
|
|
2859
|
+
function w(_) {
|
|
2860
|
+
y.push(_);
|
|
2861
2861
|
}
|
|
2862
2862
|
function E() {
|
|
2863
2863
|
if (!y.length) {
|
|
2864
|
-
var
|
|
2865
|
-
if (
|
|
2864
|
+
var _ = N();
|
|
2865
|
+
if (_ === null)
|
|
2866
2866
|
return null;
|
|
2867
|
-
_
|
|
2867
|
+
w(_);
|
|
2868
2868
|
}
|
|
2869
2869
|
return y[0];
|
|
2870
2870
|
}
|
|
2871
|
-
function x(
|
|
2872
|
-
var
|
|
2873
|
-
if (
|
|
2871
|
+
function x(_, F) {
|
|
2872
|
+
var L = E(), D = L === _;
|
|
2873
|
+
if (D)
|
|
2874
2874
|
return N(), !0;
|
|
2875
|
-
if (!
|
|
2876
|
-
throw
|
|
2875
|
+
if (!F)
|
|
2876
|
+
throw b("token '" + L + "', '" + _ + "' expected");
|
|
2877
2877
|
return !1;
|
|
2878
2878
|
}
|
|
2879
|
-
function A(
|
|
2880
|
-
var
|
|
2881
|
-
return
|
|
2879
|
+
function A(_) {
|
|
2880
|
+
var F = null, L;
|
|
2881
|
+
return _ === void 0 ? (L = g[m - 1], delete g[m - 1], L && (l || L.type === "*" || L.lineEmpty) && (F = L.leading ? L.text : null)) : (R < _ && E(), L = g[_], delete g[_], L && !L.lineEmpty && (l || L.type === "/") && (F = L.leading ? null : L.text)), F;
|
|
2882
2882
|
}
|
|
2883
2883
|
return Object.defineProperty({
|
|
2884
2884
|
next: N,
|
|
2885
2885
|
peek: E,
|
|
2886
|
-
push:
|
|
2886
|
+
push: w,
|
|
2887
2887
|
skip: x,
|
|
2888
2888
|
cmnt: A
|
|
2889
2889
|
}, "line", {
|
|
@@ -2898,15 +2898,15 @@ var parse_1, hasRequiredParse;
|
|
|
2898
2898
|
function requireParse() {
|
|
2899
2899
|
if (hasRequiredParse) return parse_1;
|
|
2900
2900
|
hasRequiredParse = 1, parse_1 = k, k.filename = null, k.defaults = { keepCase: !1 };
|
|
2901
|
-
var f = requireTokenize(), c = requireRoot(), v = requireType(), u = requireField(), o = requireMapfield(), i = requireOneof(), e = require_enum(), r = requireService(), t = requireMethod(), n = requireObject(), d = requireTypes(), s = requireUtil(), l = /^[1-9][0-9]*$/, a = /^-?[1-9][0-9]*$/, h = /^0[x][0-9a-fA-F]+$/, m = /^-?0[x][0-9a-fA-F]+$/, R = /^0[0-7]+$/, g = /^-?0[0-7]+$/, y = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, O = /^[a-zA-Z_][a-zA-Z_0-9]*$/,
|
|
2902
|
-
function k(I,
|
|
2903
|
-
|
|
2904
|
-
var W = $.preferTrailingComment || !1, N = f(I, $.alternateCommentMode || !1),
|
|
2901
|
+
var f = requireTokenize(), c = requireRoot(), v = requireType(), u = requireField(), o = requireMapfield(), i = requireOneof(), e = require_enum(), r = requireService(), t = requireMethod(), n = requireObject(), d = requireTypes(), s = requireUtil(), l = /^[1-9][0-9]*$/, a = /^-?[1-9][0-9]*$/, h = /^0[x][0-9a-fA-F]+$/, m = /^-?0[x][0-9a-fA-F]+$/, R = /^0[0-7]+$/, g = /^-?0[0-7]+$/, y = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, O = /^[a-zA-Z_][a-zA-Z_0-9]*$/, b = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
|
|
2902
|
+
function k(I, M, $) {
|
|
2903
|
+
M instanceof c || ($ = M, M = new c()), $ || ($ = k.defaults);
|
|
2904
|
+
var W = $.preferTrailingComment || !1, N = f(I, $.alternateCommentMode || !1), w = N.next, E = N.push, x = N.peek, A = N.skip, _ = N.cmnt, F = !0, L, D, B, J = "proto2", z = M, V = [], K = {}, X = $.keepCase ? function(P) {
|
|
2905
2905
|
return P;
|
|
2906
2906
|
} : s.camelCase;
|
|
2907
2907
|
function ce() {
|
|
2908
2908
|
V.forEach((P) => {
|
|
2909
|
-
P._edition =
|
|
2909
|
+
P._edition = J, Object.keys(K).forEach((C) => {
|
|
2910
2910
|
P.getOption(C) === void 0 && P.setOption(C, K[C], !0);
|
|
2911
2911
|
});
|
|
2912
2912
|
});
|
|
@@ -2918,14 +2918,14 @@ function requireParse() {
|
|
|
2918
2918
|
function ne() {
|
|
2919
2919
|
var P = [], C;
|
|
2920
2920
|
do {
|
|
2921
|
-
if ((C =
|
|
2921
|
+
if ((C = w()) !== '"' && C !== "'")
|
|
2922
2922
|
throw j(C);
|
|
2923
|
-
P.push(
|
|
2923
|
+
P.push(w()), A(C), C = x();
|
|
2924
2924
|
} while (C === '"' || C === "'");
|
|
2925
2925
|
return P.join("");
|
|
2926
2926
|
}
|
|
2927
2927
|
function fe(P) {
|
|
2928
|
-
var C =
|
|
2928
|
+
var C = w();
|
|
2929
2929
|
switch (C) {
|
|
2930
2930
|
case "'":
|
|
2931
2931
|
case '"':
|
|
@@ -2944,7 +2944,7 @@ function requireParse() {
|
|
|
2944
2944
|
!0
|
|
2945
2945
|
);
|
|
2946
2946
|
} catch {
|
|
2947
|
-
if (
|
|
2947
|
+
if (b.test(C))
|
|
2948
2948
|
return C;
|
|
2949
2949
|
throw j(C, "value");
|
|
2950
2950
|
}
|
|
@@ -2954,22 +2954,22 @@ function requireParse() {
|
|
|
2954
2954
|
do
|
|
2955
2955
|
if (C && ((p = x()) === '"' || p === "'")) {
|
|
2956
2956
|
var q = ne();
|
|
2957
|
-
if (P.push(q),
|
|
2957
|
+
if (P.push(q), J >= 2023)
|
|
2958
2958
|
throw j(q, "id");
|
|
2959
2959
|
} else
|
|
2960
2960
|
try {
|
|
2961
|
-
P.push([S = me(
|
|
2962
|
-
} catch (
|
|
2963
|
-
if (C &&
|
|
2961
|
+
P.push([S = me(w()), A("to", !0) ? me(w()) : S]);
|
|
2962
|
+
} catch (U) {
|
|
2963
|
+
if (C && b.test(p) && J >= 2023)
|
|
2964
2964
|
P.push(p);
|
|
2965
2965
|
else
|
|
2966
|
-
throw
|
|
2966
|
+
throw U;
|
|
2967
2967
|
}
|
|
2968
2968
|
while (A(",", !0));
|
|
2969
2969
|
var T = { options: void 0 };
|
|
2970
|
-
T.setOption = function(
|
|
2971
|
-
this.options === void 0 && (this.options = {}), this.options[
|
|
2972
|
-
},
|
|
2970
|
+
T.setOption = function(U, Y) {
|
|
2971
|
+
this.options === void 0 && (this.options = {}), this.options[U] = Y;
|
|
2972
|
+
}, pe(
|
|
2973
2973
|
T,
|
|
2974
2974
|
function(Y) {
|
|
2975
2975
|
if (Y === "option")
|
|
@@ -3027,35 +3027,35 @@ function requireParse() {
|
|
|
3027
3027
|
throw j(P, "id");
|
|
3028
3028
|
}
|
|
3029
3029
|
function oe() {
|
|
3030
|
-
if (
|
|
3030
|
+
if (L !== void 0)
|
|
3031
3031
|
throw j("package");
|
|
3032
|
-
if (
|
|
3033
|
-
throw j(
|
|
3034
|
-
|
|
3032
|
+
if (L = w(), !b.test(L))
|
|
3033
|
+
throw j(L, "name");
|
|
3034
|
+
z = z.define(L), A(";");
|
|
3035
3035
|
}
|
|
3036
|
-
function
|
|
3036
|
+
function he() {
|
|
3037
3037
|
var P = x(), C;
|
|
3038
3038
|
switch (P) {
|
|
3039
3039
|
case "weak":
|
|
3040
|
-
C =
|
|
3040
|
+
C = B || (B = []), w();
|
|
3041
3041
|
break;
|
|
3042
3042
|
case "public":
|
|
3043
|
-
|
|
3043
|
+
w();
|
|
3044
3044
|
// eslint-disable-next-line no-fallthrough
|
|
3045
3045
|
default:
|
|
3046
|
-
C =
|
|
3046
|
+
C = D || (D = []);
|
|
3047
3047
|
break;
|
|
3048
3048
|
}
|
|
3049
3049
|
P = ne(), A(";"), C.push(P);
|
|
3050
3050
|
}
|
|
3051
3051
|
function be() {
|
|
3052
|
-
if (A("="),
|
|
3053
|
-
throw j(
|
|
3052
|
+
if (A("="), J = ne(), J < 2023)
|
|
3053
|
+
throw j(J, "syntax");
|
|
3054
3054
|
A(";");
|
|
3055
3055
|
}
|
|
3056
3056
|
function Se() {
|
|
3057
|
-
if (A("="),
|
|
3058
|
-
throw j(
|
|
3057
|
+
if (A("="), J = ne(), !["2023"].includes(J))
|
|
3058
|
+
throw j(J, "edition");
|
|
3059
3059
|
A(";");
|
|
3060
3060
|
}
|
|
3061
3061
|
function Re(P, C) {
|
|
@@ -3073,37 +3073,37 @@ function requireParse() {
|
|
|
3073
3073
|
}
|
|
3074
3074
|
return !1;
|
|
3075
3075
|
}
|
|
3076
|
-
function
|
|
3076
|
+
function pe(P, C, p) {
|
|
3077
3077
|
var S = N.line;
|
|
3078
|
-
if (P && (typeof P.comment != "string" && (P.comment =
|
|
3079
|
-
for (var q; (q =
|
|
3078
|
+
if (P && (typeof P.comment != "string" && (P.comment = _()), P.filename = k.filename), A("{", !0)) {
|
|
3079
|
+
for (var q; (q = w()) !== "}"; )
|
|
3080
3080
|
C(q);
|
|
3081
3081
|
A(";", !0);
|
|
3082
3082
|
} else
|
|
3083
|
-
p && p(), A(";"), P && (typeof P.comment != "string" || W) && (P.comment =
|
|
3083
|
+
p && p(), A(";"), P && (typeof P.comment != "string" || W) && (P.comment = _(S) || P.comment);
|
|
3084
3084
|
}
|
|
3085
3085
|
function Oe(P, C) {
|
|
3086
|
-
if (!O.test(C =
|
|
3086
|
+
if (!O.test(C = w()))
|
|
3087
3087
|
throw j(C, "type name");
|
|
3088
3088
|
var p = new v(C);
|
|
3089
|
-
|
|
3089
|
+
pe(p, function(q) {
|
|
3090
3090
|
if (!Re(p, q))
|
|
3091
3091
|
switch (q) {
|
|
3092
3092
|
case "map":
|
|
3093
3093
|
Te(p);
|
|
3094
3094
|
break;
|
|
3095
3095
|
case "required":
|
|
3096
|
-
if (
|
|
3096
|
+
if (J !== "proto2")
|
|
3097
3097
|
throw j(q);
|
|
3098
3098
|
/* eslint-disable no-fallthrough */
|
|
3099
3099
|
case "repeated":
|
|
3100
3100
|
ae(p, q);
|
|
3101
3101
|
break;
|
|
3102
3102
|
case "optional":
|
|
3103
|
-
if (
|
|
3103
|
+
if (J === "proto3")
|
|
3104
3104
|
ae(p, "proto3_optional");
|
|
3105
3105
|
else {
|
|
3106
|
-
if (
|
|
3106
|
+
if (J !== "proto2")
|
|
3107
3107
|
throw j(q);
|
|
3108
3108
|
ae(p, "optional");
|
|
3109
3109
|
}
|
|
@@ -3118,29 +3118,29 @@ function requireParse() {
|
|
|
3118
3118
|
se(p.reserved || (p.reserved = []), !0);
|
|
3119
3119
|
break;
|
|
3120
3120
|
default:
|
|
3121
|
-
if (
|
|
3121
|
+
if (J === "proto2" || !b.test(q))
|
|
3122
3122
|
throw j(q);
|
|
3123
3123
|
E(q), ae(p, "optional");
|
|
3124
3124
|
break;
|
|
3125
3125
|
}
|
|
3126
|
-
}), P.add(p), P ===
|
|
3126
|
+
}), P.add(p), P === z && V.push(p);
|
|
3127
3127
|
}
|
|
3128
3128
|
function ae(P, C, p) {
|
|
3129
|
-
var S =
|
|
3129
|
+
var S = w();
|
|
3130
3130
|
if (S === "group") {
|
|
3131
3131
|
qe(P, C);
|
|
3132
3132
|
return;
|
|
3133
3133
|
}
|
|
3134
3134
|
for (; S.endsWith(".") || x().startsWith("."); )
|
|
3135
|
-
S +=
|
|
3136
|
-
if (!
|
|
3135
|
+
S += w();
|
|
3136
|
+
if (!b.test(S))
|
|
3137
3137
|
throw j(S, "type");
|
|
3138
|
-
var q =
|
|
3138
|
+
var q = w();
|
|
3139
3139
|
if (!O.test(q))
|
|
3140
3140
|
throw j(q, "name");
|
|
3141
3141
|
q = X(q), A("=");
|
|
3142
|
-
var T = new u(q, me(
|
|
3143
|
-
if (
|
|
3142
|
+
var T = new u(q, me(w()), S, C, p);
|
|
3143
|
+
if (pe(T, function(Z) {
|
|
3144
3144
|
if (Z === "option")
|
|
3145
3145
|
de(T, Z), A(";");
|
|
3146
3146
|
else
|
|
@@ -3148,24 +3148,24 @@ function requireParse() {
|
|
|
3148
3148
|
}, function() {
|
|
3149
3149
|
_e(T);
|
|
3150
3150
|
}), C === "proto3_optional") {
|
|
3151
|
-
var
|
|
3152
|
-
T.setOption("proto3_optional", !0),
|
|
3151
|
+
var U = new i("_" + q);
|
|
3152
|
+
T.setOption("proto3_optional", !0), U.add(T), P.add(U);
|
|
3153
3153
|
} else
|
|
3154
3154
|
P.add(T);
|
|
3155
|
-
P ===
|
|
3155
|
+
P === z && V.push(T);
|
|
3156
3156
|
}
|
|
3157
3157
|
function qe(P, C) {
|
|
3158
|
-
if (
|
|
3158
|
+
if (J >= 2023)
|
|
3159
3159
|
throw j("group");
|
|
3160
|
-
var p =
|
|
3160
|
+
var p = w();
|
|
3161
3161
|
if (!O.test(p))
|
|
3162
3162
|
throw j(p, "name");
|
|
3163
3163
|
var S = s.lcFirst(p);
|
|
3164
3164
|
p === S && (p = s.ucFirst(p)), A("=");
|
|
3165
|
-
var q = me(
|
|
3165
|
+
var q = me(w()), T = new v(p);
|
|
3166
3166
|
T.group = !0;
|
|
3167
|
-
var
|
|
3168
|
-
|
|
3167
|
+
var U = new u(S, q, p, C);
|
|
3168
|
+
U.filename = k.filename, pe(T, function(Z) {
|
|
3169
3169
|
switch (Z) {
|
|
3170
3170
|
case "option":
|
|
3171
3171
|
de(T, Z), A(";");
|
|
@@ -3175,7 +3175,7 @@ function requireParse() {
|
|
|
3175
3175
|
ae(T, Z);
|
|
3176
3176
|
break;
|
|
3177
3177
|
case "optional":
|
|
3178
|
-
|
|
3178
|
+
J === "proto3" ? ae(T, "proto3_optional") : ae(T, "optional");
|
|
3179
3179
|
break;
|
|
3180
3180
|
case "message":
|
|
3181
3181
|
Oe(T, Z);
|
|
@@ -3190,45 +3190,45 @@ function requireParse() {
|
|
|
3190
3190
|
default:
|
|
3191
3191
|
throw j(Z);
|
|
3192
3192
|
}
|
|
3193
|
-
}), P.add(T).add(
|
|
3193
|
+
}), P.add(T).add(U);
|
|
3194
3194
|
}
|
|
3195
3195
|
function Te(P) {
|
|
3196
3196
|
A("<");
|
|
3197
|
-
var C =
|
|
3197
|
+
var C = w();
|
|
3198
3198
|
if (d.mapKey[C] === void 0)
|
|
3199
3199
|
throw j(C, "type");
|
|
3200
3200
|
A(",");
|
|
3201
|
-
var p =
|
|
3202
|
-
if (!
|
|
3201
|
+
var p = w();
|
|
3202
|
+
if (!b.test(p))
|
|
3203
3203
|
throw j(p, "type");
|
|
3204
3204
|
A(">");
|
|
3205
|
-
var S =
|
|
3205
|
+
var S = w();
|
|
3206
3206
|
if (!O.test(S))
|
|
3207
3207
|
throw j(S, "name");
|
|
3208
3208
|
A("=");
|
|
3209
|
-
var q = new o(X(S), me(
|
|
3210
|
-
|
|
3211
|
-
if (
|
|
3212
|
-
de(q,
|
|
3209
|
+
var q = new o(X(S), me(w()), C, p);
|
|
3210
|
+
pe(q, function(U) {
|
|
3211
|
+
if (U === "option")
|
|
3212
|
+
de(q, U), A(";");
|
|
3213
3213
|
else
|
|
3214
|
-
throw j(
|
|
3214
|
+
throw j(U);
|
|
3215
3215
|
}, function() {
|
|
3216
3216
|
_e(q);
|
|
3217
3217
|
}), P.add(q);
|
|
3218
3218
|
}
|
|
3219
3219
|
function we(P, C) {
|
|
3220
|
-
if (!O.test(C =
|
|
3220
|
+
if (!O.test(C = w()))
|
|
3221
3221
|
throw j(C, "name");
|
|
3222
3222
|
var p = new i(X(C));
|
|
3223
|
-
|
|
3223
|
+
pe(p, function(q) {
|
|
3224
3224
|
q === "option" ? (de(p, q), A(";")) : (E(q), ae(p, "optional"));
|
|
3225
3225
|
}), P.add(p);
|
|
3226
3226
|
}
|
|
3227
3227
|
function ge(P, C) {
|
|
3228
|
-
if (!O.test(C =
|
|
3228
|
+
if (!O.test(C = w()))
|
|
3229
3229
|
throw j(C, "name");
|
|
3230
3230
|
var p = new e(C);
|
|
3231
|
-
|
|
3231
|
+
pe(p, function(q) {
|
|
3232
3232
|
switch (q) {
|
|
3233
3233
|
case "option":
|
|
3234
3234
|
de(p, q), A(";");
|
|
@@ -3239,13 +3239,13 @@ function requireParse() {
|
|
|
3239
3239
|
default:
|
|
3240
3240
|
ye(p, q);
|
|
3241
3241
|
}
|
|
3242
|
-
}), P.add(p), P ===
|
|
3242
|
+
}), P.add(p), P === z && V.push(p);
|
|
3243
3243
|
}
|
|
3244
3244
|
function ye(P, C) {
|
|
3245
3245
|
if (!O.test(C))
|
|
3246
3246
|
throw j(C, "name");
|
|
3247
3247
|
A("=");
|
|
3248
|
-
var p = me(
|
|
3248
|
+
var p = me(w(), !0), S = {
|
|
3249
3249
|
options: void 0
|
|
3250
3250
|
};
|
|
3251
3251
|
S.getOption = function(q) {
|
|
@@ -3253,7 +3253,7 @@ function requireParse() {
|
|
|
3253
3253
|
}, S.setOption = function(q, T) {
|
|
3254
3254
|
n.prototype.setOption.call(S, q, T);
|
|
3255
3255
|
}, S.setParsedOption = function() {
|
|
3256
|
-
},
|
|
3256
|
+
}, pe(S, function(T) {
|
|
3257
3257
|
if (T === "option")
|
|
3258
3258
|
de(S, T), A(";");
|
|
3259
3259
|
else
|
|
@@ -3264,21 +3264,21 @@ function requireParse() {
|
|
|
3264
3264
|
}
|
|
3265
3265
|
function de(P, C) {
|
|
3266
3266
|
var p, S, q = !0;
|
|
3267
|
-
for (C === "option" && (C =
|
|
3267
|
+
for (C === "option" && (C = w()); C !== "="; ) {
|
|
3268
3268
|
if (C === "(") {
|
|
3269
|
-
var T =
|
|
3269
|
+
var T = w();
|
|
3270
3270
|
A(")"), C = "(" + T + ")";
|
|
3271
3271
|
}
|
|
3272
3272
|
if (q) {
|
|
3273
3273
|
if (q = !1, C.includes(".") && !C.includes("(")) {
|
|
3274
|
-
var
|
|
3275
|
-
p =
|
|
3274
|
+
var U = C.split(".");
|
|
3275
|
+
p = U[0] + ".", C = U[1];
|
|
3276
3276
|
continue;
|
|
3277
3277
|
}
|
|
3278
3278
|
p = C;
|
|
3279
3279
|
} else
|
|
3280
3280
|
S = S ? S += C : C;
|
|
3281
|
-
C =
|
|
3281
|
+
C = w();
|
|
3282
3282
|
}
|
|
3283
3283
|
var Y = S ? p.concat(S) : p, Z = Ae(P, Y);
|
|
3284
3284
|
S = S && S[0] === "." ? S.slice(1) : S, p = p && p[p.length - 1] === "." ? p.slice(0, -1) : p, ke(P, p, Z, S);
|
|
@@ -3286,7 +3286,7 @@ function requireParse() {
|
|
|
3286
3286
|
function Ae(P, C) {
|
|
3287
3287
|
if (A("{", !0)) {
|
|
3288
3288
|
for (var p = {}; !A("}", !0); ) {
|
|
3289
|
-
if (!O.test(ie =
|
|
3289
|
+
if (!O.test(ie = w()))
|
|
3290
3290
|
throw j(ie, "name");
|
|
3291
3291
|
if (ie === null)
|
|
3292
3292
|
throw j(ie, "end of input");
|
|
@@ -3304,8 +3304,8 @@ function requireParse() {
|
|
|
3304
3304
|
}
|
|
3305
3305
|
} else
|
|
3306
3306
|
S = fe(), ue(P, C + "." + ie, S);
|
|
3307
|
-
var
|
|
3308
|
-
|
|
3307
|
+
var U = p[q];
|
|
3308
|
+
U && (S = [].concat(U).concat(S)), p[q] = S, A(",", !0), A(";", !0);
|
|
3309
3309
|
}
|
|
3310
3310
|
return p;
|
|
3311
3311
|
}
|
|
@@ -3313,7 +3313,7 @@ function requireParse() {
|
|
|
3313
3313
|
return ue(P, C, Y), Y;
|
|
3314
3314
|
}
|
|
3315
3315
|
function ue(P, C, p) {
|
|
3316
|
-
if (
|
|
3316
|
+
if (z === P && /^features\./.test(C)) {
|
|
3317
3317
|
K[C] = p;
|
|
3318
3318
|
return;
|
|
3319
3319
|
}
|
|
@@ -3332,27 +3332,27 @@ function requireParse() {
|
|
|
3332
3332
|
return P;
|
|
3333
3333
|
}
|
|
3334
3334
|
function Ee(P, C) {
|
|
3335
|
-
if (!O.test(C =
|
|
3335
|
+
if (!O.test(C = w()))
|
|
3336
3336
|
throw j(C, "service name");
|
|
3337
3337
|
var p = new r(C);
|
|
3338
|
-
|
|
3338
|
+
pe(p, function(q) {
|
|
3339
3339
|
if (!Re(p, q))
|
|
3340
3340
|
if (q === "rpc")
|
|
3341
3341
|
xe(p, q);
|
|
3342
3342
|
else
|
|
3343
3343
|
throw j(q);
|
|
3344
|
-
}), P.add(p), P ===
|
|
3344
|
+
}), P.add(p), P === z && V.push(p);
|
|
3345
3345
|
}
|
|
3346
3346
|
function xe(P, C) {
|
|
3347
|
-
var p =
|
|
3348
|
-
if (!O.test(C =
|
|
3347
|
+
var p = _(), S = C;
|
|
3348
|
+
if (!O.test(C = w()))
|
|
3349
3349
|
throw j(C, "name");
|
|
3350
|
-
var q = C, T,
|
|
3351
|
-
if (A("("), A("stream", !0) && (
|
|
3350
|
+
var q = C, T, U, Y, Z;
|
|
3351
|
+
if (A("("), A("stream", !0) && (U = !0), !b.test(C = w()) || (T = C, A(")"), A("returns"), A("("), A("stream", !0) && (Z = !0), !b.test(C = w())))
|
|
3352
3352
|
throw j(C);
|
|
3353
3353
|
Y = C, A(")");
|
|
3354
|
-
var G = new t(q, S, T, Y,
|
|
3355
|
-
G.comment = p,
|
|
3354
|
+
var G = new t(q, S, T, Y, U, Z);
|
|
3355
|
+
G.comment = p, pe(G, function(Q) {
|
|
3356
3356
|
if (Q === "option")
|
|
3357
3357
|
de(G, Q), A(";");
|
|
3358
3358
|
else
|
|
@@ -3360,63 +3360,63 @@ function requireParse() {
|
|
|
3360
3360
|
}), P.add(G);
|
|
3361
3361
|
}
|
|
3362
3362
|
function Ce(P, C) {
|
|
3363
|
-
if (!
|
|
3363
|
+
if (!b.test(C = w()))
|
|
3364
3364
|
throw j(C, "reference");
|
|
3365
3365
|
var p = C;
|
|
3366
|
-
|
|
3366
|
+
pe(null, function(q) {
|
|
3367
3367
|
switch (q) {
|
|
3368
3368
|
case "required":
|
|
3369
3369
|
case "repeated":
|
|
3370
3370
|
ae(P, q, p);
|
|
3371
3371
|
break;
|
|
3372
3372
|
case "optional":
|
|
3373
|
-
|
|
3373
|
+
J === "proto3" ? ae(P, "proto3_optional", p) : ae(P, "optional", p);
|
|
3374
3374
|
break;
|
|
3375
3375
|
default:
|
|
3376
|
-
if (
|
|
3376
|
+
if (J === "proto2" || !b.test(q))
|
|
3377
3377
|
throw j(q);
|
|
3378
3378
|
E(q), ae(P, "optional", p);
|
|
3379
3379
|
break;
|
|
3380
3380
|
}
|
|
3381
3381
|
});
|
|
3382
3382
|
}
|
|
3383
|
-
for (var ie; (ie =
|
|
3383
|
+
for (var ie; (ie = w()) !== null; )
|
|
3384
3384
|
switch (ie) {
|
|
3385
3385
|
case "package":
|
|
3386
|
-
if (!
|
|
3386
|
+
if (!F)
|
|
3387
3387
|
throw j(ie);
|
|
3388
3388
|
oe();
|
|
3389
3389
|
break;
|
|
3390
3390
|
case "import":
|
|
3391
|
-
if (!
|
|
3391
|
+
if (!F)
|
|
3392
3392
|
throw j(ie);
|
|
3393
|
-
|
|
3393
|
+
he();
|
|
3394
3394
|
break;
|
|
3395
3395
|
case "syntax":
|
|
3396
|
-
if (!
|
|
3396
|
+
if (!F)
|
|
3397
3397
|
throw j(ie);
|
|
3398
3398
|
be();
|
|
3399
3399
|
break;
|
|
3400
3400
|
case "edition":
|
|
3401
|
-
if (!
|
|
3401
|
+
if (!F)
|
|
3402
3402
|
throw j(ie);
|
|
3403
3403
|
Se();
|
|
3404
3404
|
break;
|
|
3405
3405
|
case "option":
|
|
3406
|
-
de(
|
|
3406
|
+
de(z, ie), A(";", !0);
|
|
3407
3407
|
break;
|
|
3408
3408
|
default:
|
|
3409
|
-
if (Re(
|
|
3410
|
-
|
|
3409
|
+
if (Re(z, ie)) {
|
|
3410
|
+
F = !1;
|
|
3411
3411
|
continue;
|
|
3412
3412
|
}
|
|
3413
3413
|
throw j(ie);
|
|
3414
3414
|
}
|
|
3415
3415
|
return ce(), k.filename = null, {
|
|
3416
|
-
package:
|
|
3417
|
-
imports:
|
|
3418
|
-
weakImports:
|
|
3419
|
-
root:
|
|
3416
|
+
package: L,
|
|
3417
|
+
imports: D,
|
|
3418
|
+
weakImports: B,
|
|
3419
|
+
root: M
|
|
3420
3420
|
};
|
|
3421
3421
|
}
|
|
3422
3422
|
return parse_1;
|
|
@@ -3813,74 +3813,74 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3813
3813
|
}
|
|
3814
3814
|
}, i = protobuf.Root.fromJSON(u).TimeSeriesMessage;
|
|
3815
3815
|
let e = null, r = null, t = null, n = null, d = null, s = null, l = !1, a = null;
|
|
3816
|
-
const h = (
|
|
3817
|
-
if (!
|
|
3818
|
-
|
|
3816
|
+
const h = (_, F = 2e3) => new Promise((L) => {
|
|
3817
|
+
if (!_ || _.readyState === WebSocket.CLOSED) {
|
|
3818
|
+
L();
|
|
3819
3819
|
return;
|
|
3820
3820
|
}
|
|
3821
|
-
const
|
|
3822
|
-
|
|
3821
|
+
const D = Date.now(), B = () => {
|
|
3822
|
+
_.readyState === WebSocket.CLOSED || Date.now() - D > F ? L() : setTimeout(B, 50);
|
|
3823
3823
|
};
|
|
3824
|
-
|
|
3824
|
+
B();
|
|
3825
3825
|
}), m = async () => {
|
|
3826
3826
|
if (f.value) {
|
|
3827
|
-
const
|
|
3828
|
-
console.log("🔌 Disconnecting WebSocket (state:",
|
|
3827
|
+
const _ = f.value;
|
|
3828
|
+
console.log("🔌 Disconnecting WebSocket (state:", _.readyState, ")"), f.value = null, c.value = "disconnected", (_.readyState === WebSocket.OPEN || _.readyState === WebSocket.CONNECTING) && (_.close(), await h(_));
|
|
3829
3829
|
}
|
|
3830
3830
|
a = null;
|
|
3831
|
-
}, R = async (
|
|
3831
|
+
}, R = async (_, F, L) => {
|
|
3832
3832
|
if (a && (console.log("🔄 Waiting for previous connection to finish..."), await a), f.value) {
|
|
3833
|
-
const
|
|
3834
|
-
(
|
|
3833
|
+
const D = f.value.readyState;
|
|
3834
|
+
(D === WebSocket.CONNECTING || D === WebSocket.OPEN || D === WebSocket.CLOSING) && (console.log(`🔄 Disconnecting existing WebSocket (state: ${D})`), await m(), await new Promise((B) => setTimeout(B, 100)));
|
|
3835
3835
|
}
|
|
3836
|
-
console.log("setting packageId to: " +
|
|
3836
|
+
console.log("setting packageId to: " + F), s = F, v.value = !0, a = new Promise(async (D, B) => {
|
|
3837
3837
|
try {
|
|
3838
|
-
const
|
|
3838
|
+
const J = L || await useToken(), z = _ + "?session=" + J + "&package=" + s, V = new WebSocket(z);
|
|
3839
3839
|
f.value = V, V.onopen = () => {
|
|
3840
|
-
console.log("🔗 WebSocket opened for package:", s), g(),
|
|
3840
|
+
console.log("🔗 WebSocket opened for package:", s), g(), D(V);
|
|
3841
3841
|
}, V.onclose = () => {
|
|
3842
|
-
console.log("🔌 WebSocket closed for package:", s), y(),
|
|
3842
|
+
console.log("🔌 WebSocket closed for package:", s), y(), D(null);
|
|
3843
3843
|
}, V.onmessage = O, V.onerror = (K) => {
|
|
3844
|
-
console.error("WebSocket error:", K), c.value = "disconnected",
|
|
3844
|
+
console.error("WebSocket error:", K), c.value = "disconnected", B(K);
|
|
3845
3845
|
}, setTimeout(() => {
|
|
3846
|
-
V.readyState === WebSocket.CONNECTING && (V.close(),
|
|
3846
|
+
V.readyState === WebSocket.CONNECTING && (V.close(), B(new Error("WebSocket connection timeout")));
|
|
3847
3847
|
}, 1e4);
|
|
3848
|
-
} catch (
|
|
3849
|
-
console.error("Failed to create WebSocket:",
|
|
3848
|
+
} catch (J) {
|
|
3849
|
+
console.error("Failed to create WebSocket:", J), B(J);
|
|
3850
3850
|
}
|
|
3851
3851
|
});
|
|
3852
3852
|
try {
|
|
3853
3853
|
await a;
|
|
3854
|
-
} catch (
|
|
3855
|
-
console.error("WebSocket connection failed:",
|
|
3854
|
+
} catch (D) {
|
|
3855
|
+
console.error("WebSocket connection failed:", D), a = null;
|
|
3856
3856
|
}
|
|
3857
3857
|
}, g = () => {
|
|
3858
3858
|
if (c.value = "connected", v.value) {
|
|
3859
3859
|
if (console.log("📡 Sending initialization messages for package:", s), d && (console.log("🧹 Clearing channel filters"), d()), s) {
|
|
3860
|
-
const
|
|
3861
|
-
console.log("🎛️ Sending montage reset:",
|
|
3860
|
+
const _ = { montage: "NOT_MONTAGED", packageId: s };
|
|
3861
|
+
console.log("🎛️ Sending montage reset:", _), f.value.send(JSON.stringify(_));
|
|
3862
3862
|
}
|
|
3863
3863
|
v.value = !1;
|
|
3864
3864
|
}
|
|
3865
3865
|
}, y = () => {
|
|
3866
3866
|
console.log("📡 WebSocket connection closed"), c.value = "disconnected";
|
|
3867
|
-
}, O = (
|
|
3868
|
-
if (typeof
|
|
3869
|
-
let
|
|
3867
|
+
}, O = (_) => {
|
|
3868
|
+
if (typeof _.data == "string") {
|
|
3869
|
+
let L = {};
|
|
3870
3870
|
try {
|
|
3871
|
-
|
|
3871
|
+
L = JSON.parse(_.data);
|
|
3872
3872
|
} catch {
|
|
3873
3873
|
n == null || n({ error: "JSON Parse Error" });
|
|
3874
3874
|
return;
|
|
3875
3875
|
}
|
|
3876
|
-
|
|
3876
|
+
L.channelDetails ? t == null || t(L.channelDetails) : L.error && (n == null || n(L));
|
|
3877
3877
|
return;
|
|
3878
3878
|
}
|
|
3879
|
-
const
|
|
3880
|
-
|
|
3881
|
-
const
|
|
3882
|
-
if (
|
|
3883
|
-
const V =
|
|
3879
|
+
const F = new FileReader();
|
|
3880
|
+
F.addEventListener("loadend", function(L) {
|
|
3881
|
+
const D = L.target.result, B = new Uint8Array(D), J = i.decode(B), z = J.segment;
|
|
3882
|
+
if (J.event && J.event.length > 0 && J.event[0].pageStart) {
|
|
3883
|
+
const V = J.event[0], K = [[], []], X = V.times.length / 2;
|
|
3884
3884
|
let ce = 0;
|
|
3885
3885
|
for (let se = 0; se < X; se++)
|
|
3886
3886
|
K[0].push(V.times[ce]), K[1].push(V.times[ce + 1]), ce += 2;
|
|
@@ -3906,26 +3906,26 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3906
3906
|
pageStart: V.pageStart,
|
|
3907
3907
|
data: fe,
|
|
3908
3908
|
type: "Neural",
|
|
3909
|
-
nrResponses:
|
|
3909
|
+
nrResponses: J.totalResponses
|
|
3910
3910
|
});
|
|
3911
3911
|
}
|
|
3912
|
-
if (
|
|
3912
|
+
if (z !== null) {
|
|
3913
3913
|
let V = null;
|
|
3914
|
-
|
|
3915
|
-
const K = new Array(3), X =
|
|
3914
|
+
z.isMinMax ? V = z.data.length / 2 : V = z.data.length;
|
|
3915
|
+
const K = new Array(3), X = z.startTs;
|
|
3916
3916
|
let ce = 0, j = 0, ne = 0;
|
|
3917
3917
|
for (; ne < 3; )
|
|
3918
3918
|
K[ne] = new Float64Array(V), ne++;
|
|
3919
|
-
if (
|
|
3919
|
+
if (z.isMinMax) {
|
|
3920
3920
|
let oe = 0;
|
|
3921
|
-
for (let
|
|
3922
|
-
let be = -
|
|
3923
|
-
K[0][
|
|
3921
|
+
for (let he = 0; he < V; he++) {
|
|
3922
|
+
let be = -z.data[oe], Se = -z.data[oe + 1];
|
|
3923
|
+
K[0][he] = X + he * z.samplePeriod, K[1][he] = be, K[2][he] = Se, isNaN(be) || (j++, ce += be + (Se - be) / 2), oe += 2;
|
|
3924
3924
|
}
|
|
3925
3925
|
} else
|
|
3926
3926
|
for (let oe = 0; oe < V; oe++) {
|
|
3927
|
-
let
|
|
3928
|
-
K[0][oe] = X + oe *
|
|
3927
|
+
let he = -z.data[oe];
|
|
3928
|
+
K[0][oe] = X + oe * z.samplePeriod, K[1][oe] = he, isNaN(he) || (j++, ce += he);
|
|
3929
3929
|
}
|
|
3930
3930
|
let fe = 0;
|
|
3931
3931
|
if (l) {
|
|
@@ -3936,85 +3936,85 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
3936
3936
|
for (; le < 3; )
|
|
3937
3937
|
se[le] = new Float32Array(K[0].length), le++;
|
|
3938
3938
|
const me = {
|
|
3939
|
-
chId:
|
|
3940
|
-
lastUsed:
|
|
3941
|
-
unit:
|
|
3942
|
-
samplePeriod:
|
|
3943
|
-
pageStart:
|
|
3944
|
-
pageEnd:
|
|
3939
|
+
chId: z.source,
|
|
3940
|
+
lastUsed: z.lastUsed,
|
|
3941
|
+
unit: z.unit,
|
|
3942
|
+
samplePeriod: z.samplePeriod,
|
|
3943
|
+
pageStart: z.pageStart,
|
|
3944
|
+
pageEnd: z.pageEnd,
|
|
3945
3945
|
startTs: X,
|
|
3946
|
-
isMinMax:
|
|
3947
|
-
unitM:
|
|
3948
|
-
type:
|
|
3946
|
+
isMinMax: z.isMinMax,
|
|
3947
|
+
unitM: z.unitM,
|
|
3948
|
+
type: z.segmentType,
|
|
3949
3949
|
nrPoints: V,
|
|
3950
3950
|
cData: se,
|
|
3951
3951
|
parsedData: K,
|
|
3952
3952
|
median: fe,
|
|
3953
3953
|
sumElem: ce,
|
|
3954
3954
|
nrValidPoints: j,
|
|
3955
|
-
name:
|
|
3956
|
-
label:
|
|
3955
|
+
name: z.channelName,
|
|
3956
|
+
label: z.channelName
|
|
3957
3957
|
};
|
|
3958
3958
|
me.nrPoints > 0 ? e == null || e({
|
|
3959
|
-
pageStart:
|
|
3959
|
+
pageStart: z.pageStart,
|
|
3960
3960
|
data: me,
|
|
3961
|
-
type:
|
|
3962
|
-
nrResponses:
|
|
3961
|
+
type: z.segmentType,
|
|
3962
|
+
nrResponses: J.totalResponses
|
|
3963
3963
|
}) : e == null || e({
|
|
3964
|
-
pageStart:
|
|
3964
|
+
pageStart: z.pageStart,
|
|
3965
3965
|
data: me,
|
|
3966
|
-
nrResponses:
|
|
3966
|
+
nrResponses: J.totalResponses,
|
|
3967
3967
|
type: "gap"
|
|
3968
3968
|
});
|
|
3969
3969
|
}
|
|
3970
|
-
}),
|
|
3971
|
-
},
|
|
3972
|
-
let
|
|
3973
|
-
switch (
|
|
3970
|
+
}), F.readAsArrayBuffer(_.data);
|
|
3971
|
+
}, b = (_) => f.value && f.value.readyState === 1 ? (f.value.send(JSON.stringify(_)), !0) : !1, k = (_) => {
|
|
3972
|
+
let F;
|
|
3973
|
+
switch (_) {
|
|
3974
3974
|
case "NOT_MONTAGED":
|
|
3975
|
-
|
|
3975
|
+
F = { montage: "NOT_MONTAGED", packageId: s };
|
|
3976
3976
|
break;
|
|
3977
3977
|
default:
|
|
3978
|
-
|
|
3978
|
+
F = { montage: "CUSTOM_MONTAGE", packageId: s, montageMap: _ };
|
|
3979
3979
|
}
|
|
3980
|
-
|
|
3981
|
-
}, I = (
|
|
3982
|
-
f.value && f.value.readyState === 1 ? f.value.send(JSON.stringify(
|
|
3983
|
-
},
|
|
3980
|
+
b(F);
|
|
3981
|
+
}, I = (_) => {
|
|
3982
|
+
f.value && f.value.readyState === 1 ? f.value.send(JSON.stringify(_)) : setTimeout(() => I(_), 200);
|
|
3983
|
+
}, M = () => {
|
|
3984
3984
|
if (f.value && f.value.readyState === 1) {
|
|
3985
|
-
const
|
|
3985
|
+
const _ = {
|
|
3986
3986
|
requestType: "DumpBufferRequest"
|
|
3987
3987
|
};
|
|
3988
|
-
return f.value.send(JSON.stringify(
|
|
3988
|
+
return f.value.send(JSON.stringify(_)), !0;
|
|
3989
3989
|
}
|
|
3990
3990
|
return console.warn("⚠️ Cannot send dump buffer request - WebSocket not connected"), !1;
|
|
3991
|
-
}, $ = (
|
|
3992
|
-
e =
|
|
3993
|
-
}, W = (
|
|
3994
|
-
r =
|
|
3995
|
-
}, N = (
|
|
3996
|
-
t =
|
|
3997
|
-
},
|
|
3998
|
-
n =
|
|
3991
|
+
}, $ = (_) => {
|
|
3992
|
+
e = _;
|
|
3993
|
+
}, W = (_) => {
|
|
3994
|
+
r = _;
|
|
3995
|
+
}, N = (_) => {
|
|
3996
|
+
t = _;
|
|
3997
|
+
}, w = (_) => {
|
|
3998
|
+
n = _;
|
|
3999
3999
|
};
|
|
4000
4000
|
onUnmounted(async () => {
|
|
4001
4001
|
await m();
|
|
4002
4002
|
});
|
|
4003
|
-
const E = (
|
|
4004
|
-
d =
|
|
4005
|
-
}, x = (
|
|
4006
|
-
s =
|
|
4007
|
-
}, A = (
|
|
4008
|
-
l =
|
|
4003
|
+
const E = (_) => {
|
|
4004
|
+
d = _;
|
|
4005
|
+
}, x = (_) => {
|
|
4006
|
+
s = _;
|
|
4007
|
+
}, A = (_) => {
|
|
4008
|
+
l = _;
|
|
4009
4009
|
};
|
|
4010
4010
|
return {
|
|
4011
4011
|
websocket: readonly(f),
|
|
4012
4012
|
connectionStatus: readonly(c),
|
|
4013
4013
|
openWebsocket: R,
|
|
4014
|
-
send:
|
|
4014
|
+
send: b,
|
|
4015
4015
|
sendMontageMessage: k,
|
|
4016
4016
|
sendFilterMessage: I,
|
|
4017
|
-
sendDumpBufferRequest:
|
|
4017
|
+
sendDumpBufferRequest: M,
|
|
4018
4018
|
disconnect: m,
|
|
4019
4019
|
setClearChannelsCallback: E,
|
|
4020
4020
|
setPackageId: x,
|
|
@@ -4022,7 +4022,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4022
4022
|
onSegment: $,
|
|
4023
4023
|
onEvent: W,
|
|
4024
4024
|
onChannelDetails: N,
|
|
4025
|
-
onError:
|
|
4025
|
+
onError: w
|
|
4026
4026
|
};
|
|
4027
4027
|
}, useCanvasRenderer = () => {
|
|
4028
4028
|
const f = ref(null), c = ref(null), v = (r, t, n) => t * (r + n), u = (r = 1) => r, o = (r, t, n, d, s, l, a = !1) => {
|
|
@@ -4048,79 +4048,79 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4048
4048
|
return;
|
|
4049
4049
|
}
|
|
4050
4050
|
g.setTransform(l, 0, 0, l, 0, 0), g.clearRect(0, 0, d.cWidth, d.cHeight), m.clearRect(0, 0, d.cWidth, d.cHeight);
|
|
4051
|
-
const y = t.reduce((O,
|
|
4051
|
+
const y = t.reduce((O, b) => b.visible ? O + 1 : O, 0);
|
|
4052
4052
|
i(t, d.pHeight, y), g.save();
|
|
4053
4053
|
for (let O in r.channels)
|
|
4054
4054
|
if (r.channels.hasOwnProperty(O)) {
|
|
4055
|
-
const
|
|
4055
|
+
const b = r.channels[O];
|
|
4056
4056
|
let k = null;
|
|
4057
|
-
if (k = t.find((
|
|
4057
|
+
if (k = t.find((_) => _.id === b.id), !k || !k.visible)
|
|
4058
4058
|
continue;
|
|
4059
|
-
const I = d.start,
|
|
4060
|
-
for (let
|
|
4061
|
-
if (k.dataSegments[
|
|
4059
|
+
const I = d.start, M = d.rsPeriod, $ = n.XOFFSET, W = Math.min(Math.round(d.cHeight / r.channels.length - 2), 10);
|
|
4060
|
+
for (let _ = 0; _ < k.dataSegments.length; _ += 2) {
|
|
4061
|
+
if (k.dataSegments[_ + 1] < I) {
|
|
4062
4062
|
console.log("skipping something");
|
|
4063
4063
|
continue;
|
|
4064
4064
|
}
|
|
4065
|
-
if (k.dataSegments[
|
|
4065
|
+
if (k.dataSegments[_] > I + d.duration) {
|
|
4066
4066
|
console.log("breaking something");
|
|
4067
4067
|
break;
|
|
4068
4068
|
}
|
|
4069
|
-
let
|
|
4070
|
-
m.fillRect(
|
|
4069
|
+
let F = Math.floor($ + (k.dataSegments[_] - I) / M), L = Math.floor($ + (k.dataSegments[_ + 1] - I) / M), D = Math.floor(k.rowBaseline - W / 2);
|
|
4070
|
+
m.fillRect(F, D, L - F, W);
|
|
4071
4071
|
}
|
|
4072
|
-
e(k,
|
|
4073
|
-
const N =
|
|
4074
|
-
let
|
|
4075
|
-
N && (
|
|
4072
|
+
e(k, b, d, n, s, a);
|
|
4073
|
+
const N = b.blocks.length;
|
|
4074
|
+
let w = "Continuous";
|
|
4075
|
+
N && (w = b.blocks[0].type), k.hover ? k.selected ? (g.strokeStyle = "rgba(39,96,255,0.70)", g.fillStyle = "rgba(39,96,255,0.70)") : (g.strokeStyle = "rgba(39,96,255,0.60)", g.fillStyle = "rgba(39,96,255,0.60)") : k.selected ? (g.strokeStyle = "rgb(249,162,58)", g.fillStyle = "rgb(3249,162,58)") : w === "Neural" ? g.strokeStyle = "rgb(249,162,58)" : (g.strokeStyle = "black", g.fillStyle = "black");
|
|
4076
4076
|
let E = null, x = !0, A = 1e6 * (1 / k.sf);
|
|
4077
|
-
for (let
|
|
4078
|
-
const
|
|
4079
|
-
if (
|
|
4077
|
+
for (let _ = 0; _ < N; _++) {
|
|
4078
|
+
const F = b.blocks[_];
|
|
4079
|
+
if (F.nrPoints === 0) {
|
|
4080
4080
|
console.log("zero points");
|
|
4081
4081
|
continue;
|
|
4082
4082
|
}
|
|
4083
|
-
const
|
|
4084
|
-
let V =
|
|
4085
|
-
switch (m.clearRect(Math.floor(
|
|
4083
|
+
const L = F.cData, D = F.nrPoints, B = L[0], J = L[1], z = L[2];
|
|
4084
|
+
let V = F.renderStartIndex, K = F.renderEndIndex;
|
|
4085
|
+
switch (m.clearRect(Math.floor(B[V]), Math.floor(k.rowBaseline - W / 2), Math.ceil(B[K] - B[V] + 2), W + 1), F.type) {
|
|
4086
4086
|
case "Continuous":
|
|
4087
4087
|
case "realtime":
|
|
4088
|
-
if (
|
|
4089
|
-
if (
|
|
4090
|
-
g.beginPath(),
|
|
4088
|
+
if (F.isMinMax) {
|
|
4089
|
+
if (F.samplePeriod / A < 3 && (x = !1), x) {
|
|
4090
|
+
g.beginPath(), _ > 0 && B[V] < E.x + 3 ? g.moveTo(E.x, E.y) : g.moveTo(B[V], J[V]);
|
|
4091
4091
|
for (let X = V; X < K + 1; X++)
|
|
4092
|
-
g.lineTo(
|
|
4092
|
+
g.lineTo(B[X], J[X]);
|
|
4093
4093
|
for (let X = K - 1; X >= V; X--)
|
|
4094
|
-
g.lineTo(
|
|
4095
|
-
|
|
4094
|
+
g.lineTo(B[X], z[X]);
|
|
4095
|
+
_ > 0 && B[V] < E.x + 3 && g.lineTo(E.x, E.y2), g.closePath(), g.fill();
|
|
4096
4096
|
} else {
|
|
4097
4097
|
g.beginPath();
|
|
4098
4098
|
for (let X = V; X < K + 1; X++)
|
|
4099
|
-
g.lineTo(
|
|
4099
|
+
g.lineTo(B[X], J[X]), g.lineTo(B[X], z[X]), g.moveTo(B[X], J[X]);
|
|
4100
4100
|
g.stroke();
|
|
4101
4101
|
}
|
|
4102
|
-
g.beginPath(), g.moveTo(
|
|
4102
|
+
g.beginPath(), g.moveTo(B[V], J[V]);
|
|
4103
4103
|
for (let X = V; X < K + 1; X++)
|
|
4104
|
-
g.lineTo(
|
|
4104
|
+
g.lineTo(B[X], J[X]);
|
|
4105
4105
|
g.stroke();
|
|
4106
4106
|
} else {
|
|
4107
|
-
|
|
4107
|
+
_ === 0 ? (g.beginPath(), g.moveTo(B[V], J[V])) : B[V] > E.x + 2 && g.moveTo(B[V], J[V]);
|
|
4108
4108
|
for (let X = V; X < K + 1; X++)
|
|
4109
|
-
g.lineTo(
|
|
4110
|
-
|
|
4109
|
+
g.lineTo(B[X], J[X]);
|
|
4110
|
+
_ === N - 1 && g.stroke();
|
|
4111
4111
|
}
|
|
4112
4112
|
break;
|
|
4113
4113
|
case "Neural":
|
|
4114
4114
|
g.beginPath();
|
|
4115
|
-
for (let X = 0; X <
|
|
4116
|
-
g.moveTo(
|
|
4115
|
+
for (let X = 0; X < D; X++)
|
|
4116
|
+
g.moveTo(B[X], J[X]), g.lineTo(B[X], z[X]);
|
|
4117
4117
|
g.stroke();
|
|
4118
4118
|
break;
|
|
4119
4119
|
}
|
|
4120
4120
|
E = {
|
|
4121
|
-
x:
|
|
4122
|
-
y:
|
|
4123
|
-
y2:
|
|
4121
|
+
x: B[D - 1],
|
|
4122
|
+
y: J[D - 1],
|
|
4123
|
+
y2: z[D - 1]
|
|
4124
4124
|
};
|
|
4125
4125
|
}
|
|
4126
4126
|
}
|
|
@@ -4146,9 +4146,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4146
4146
|
case "UNIT":
|
|
4147
4147
|
if (!l)
|
|
4148
4148
|
for (let m = 0; m < a; m++) {
|
|
4149
|
-
const R = t.blocks[m], g = R.cData, y = R.parsedData, O = d.XOFFSET,
|
|
4150
|
-
for (let x = 0; x <
|
|
4151
|
-
k[x] = O + ($[x] - N) /
|
|
4149
|
+
const R = t.blocks[m], g = R.cData, y = R.parsedData, O = d.XOFFSET, b = R.parsedData[0].length, k = g[0], I = g[1], M = g[2], $ = y[0], W = r.rowBaseline | 0, N = n.start, w = n.rsPeriod, E = n.cHeight / (2 * (n.nrVisibleChannels + 1)) | 0;
|
|
4150
|
+
for (let x = 0; x < b; x++)
|
|
4151
|
+
k[x] = O + ($[x] - N) / w, I[x] = W - E, M[x] = W + E;
|
|
4152
4152
|
}
|
|
4153
4153
|
break;
|
|
4154
4154
|
case "CONTINUOUS":
|
|
@@ -4166,12 +4166,12 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4166
4166
|
R.renderStartIndex = g > 0 ? g : 0;
|
|
4167
4167
|
let y = Math.floor((n.start + n.duration - (R.startTs + R.nrPoints * R.samplePeriod)) / R.samplePeriod);
|
|
4168
4168
|
R.renderEndIndex = y >= 0 ? R.nrPoints - 1 : R.nrPoints + y;
|
|
4169
|
-
const O = R.cData,
|
|
4170
|
-
let
|
|
4171
|
-
d.USEMEDIAN ?
|
|
4172
|
-
const
|
|
4173
|
-
for (let
|
|
4174
|
-
$[
|
|
4169
|
+
const O = R.cData, b = R.parsedData, k = s * r.rowScale, I = d.XOFFSET, M = R.parsedData[0].length, $ = O[0], W = O[1], N = O[2], w = b[0], E = b[1], x = b[2], A = r.rowBaseline;
|
|
4170
|
+
let _ = 0;
|
|
4171
|
+
d.USEMEDIAN ? _ = t.median : _ = t.mean;
|
|
4172
|
+
const F = n.rsPeriod, L = n.start;
|
|
4173
|
+
for (let D = 0; D < M; D++)
|
|
4174
|
+
$[D] = I + (w[D] - L) / F, W[D] = A - (E[D] - _) * k, R.isMinMax && (E[D] === x[D] ? N[D] = W[D] + 1 : N[D] = A - (x[D] - _) * k);
|
|
4175
4175
|
}
|
|
4176
4176
|
break;
|
|
4177
4177
|
}
|
|
@@ -4190,46 +4190,46 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4190
4190
|
start: 0,
|
|
4191
4191
|
duration: 0,
|
|
4192
4192
|
channels: []
|
|
4193
|
-
}), u = ref(!1), o = ref(0), i = ref(null), e = ref(1), r = 15e6, t = 3, n = (
|
|
4194
|
-
|
|
4195
|
-
let $ = d(
|
|
4193
|
+
}), u = ref(!1), o = ref(0), i = ref(null), e = ref(1), r = 15e6, t = 3, n = (b, k, I, M) => {
|
|
4194
|
+
M || (M = 0);
|
|
4195
|
+
let $ = d(b, k, M, b.length - 1, I);
|
|
4196
4196
|
return $ === -1 ? $ = 0 : $ < 0 && ($ = -$ - 2), $;
|
|
4197
|
-
}, d = (
|
|
4198
|
-
if (
|
|
4197
|
+
}, d = (b, k, I, M, $) => {
|
|
4198
|
+
if (M < I) {
|
|
4199
4199
|
let N;
|
|
4200
|
-
if (
|
|
4200
|
+
if (M >= 0 ? N = M : N = -M - 2, N === -1)
|
|
4201
4201
|
return N;
|
|
4202
|
-
const
|
|
4203
|
-
for (; N >= 0 &&
|
|
4202
|
+
const w = b[N].pageStart;
|
|
4203
|
+
for (; N >= 0 && b[N].pageStart === w; )
|
|
4204
4204
|
N--;
|
|
4205
4205
|
return N++, -N - 2;
|
|
4206
4206
|
}
|
|
4207
|
-
const W = parseInt((I +
|
|
4208
|
-
if (
|
|
4209
|
-
return d(
|
|
4210
|
-
if (
|
|
4211
|
-
return d(
|
|
4207
|
+
const W = parseInt((I + M) / 2);
|
|
4208
|
+
if (b[W].pageStart > k)
|
|
4209
|
+
return d(b, k, I, W - 1, $);
|
|
4210
|
+
if (b[W].pageStart < k)
|
|
4211
|
+
return d(b, k, W + 1, M, $);
|
|
4212
4212
|
{
|
|
4213
4213
|
let N = W;
|
|
4214
4214
|
if ($) {
|
|
4215
|
-
for (; N >= 0 &&
|
|
4215
|
+
for (; N >= 0 && b[N].pageStart === k; )
|
|
4216
4216
|
N--;
|
|
4217
4217
|
N++;
|
|
4218
4218
|
} else {
|
|
4219
|
-
for (; N <
|
|
4219
|
+
for (; N < b.length && b[N].pageStart === k; )
|
|
4220
4220
|
N++;
|
|
4221
4221
|
N--;
|
|
4222
4222
|
}
|
|
4223
4223
|
return N;
|
|
4224
4224
|
}
|
|
4225
|
-
}, s = (
|
|
4226
|
-
if (!
|
|
4225
|
+
}, s = (b, k, I) => {
|
|
4226
|
+
if (!b)
|
|
4227
4227
|
return Promise.resolve();
|
|
4228
|
-
const
|
|
4229
|
-
if (
|
|
4228
|
+
const M = [];
|
|
4229
|
+
if (b.length > 0) {
|
|
4230
4230
|
const $ = [];
|
|
4231
|
-
for (let W = 0; W <
|
|
4232
|
-
const N =
|
|
4231
|
+
for (let W = 0; W < b.length; W++) {
|
|
4232
|
+
const N = b[W].content, E = {
|
|
4233
4233
|
id: I ? I(N) : N.id,
|
|
4234
4234
|
serverId: N.serverId,
|
|
4235
4235
|
label: N.name,
|
|
@@ -4243,8 +4243,8 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4243
4243
|
gaps: [],
|
|
4244
4244
|
dataSegments: []
|
|
4245
4245
|
}, x = E.label.split("<->", 3), A = x[0];
|
|
4246
|
-
let
|
|
4247
|
-
|
|
4246
|
+
let _ = x.length > 1 ? parseFloat(x[1]) : 0;
|
|
4247
|
+
_ = isNaN(_) ? x[1] : _, $.push({
|
|
4248
4248
|
id: E.id,
|
|
4249
4249
|
serverId: E.serverId,
|
|
4250
4250
|
type: E.type,
|
|
@@ -4252,7 +4252,7 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4252
4252
|
displayName: E.displayName,
|
|
4253
4253
|
label_split: x,
|
|
4254
4254
|
label_prefix: A,
|
|
4255
|
-
label_value:
|
|
4255
|
+
label_value: _,
|
|
4256
4256
|
dataSegments: [],
|
|
4257
4257
|
rank: W,
|
|
4258
4258
|
visible: !0,
|
|
@@ -4267,94 +4267,94 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4267
4267
|
filter: {},
|
|
4268
4268
|
hideFilter: !0,
|
|
4269
4269
|
isEditing: !1
|
|
4270
|
-
}),
|
|
4270
|
+
}), M.push(E);
|
|
4271
4271
|
}
|
|
4272
4272
|
k && k.setChannels($);
|
|
4273
4273
|
}
|
|
4274
|
-
return l(
|
|
4275
|
-
}, l = (
|
|
4274
|
+
return l(M), f.value = M, o.value = b.length, u.value = !0, Promise.resolve();
|
|
4275
|
+
}, l = (b) => {
|
|
4276
4276
|
var k, I;
|
|
4277
|
-
if (
|
|
4277
|
+
if (b.length === 0) {
|
|
4278
4278
|
i.value = null;
|
|
4279
4279
|
return;
|
|
4280
4280
|
}
|
|
4281
|
-
i.value = ((I = (k =
|
|
4282
|
-
}, a = (
|
|
4281
|
+
i.value = ((I = (k = b[0]) == null ? void 0 : k.gaps) == null ? void 0 : I[0]) || null;
|
|
4282
|
+
}, a = (b) => {
|
|
4283
4283
|
let k = null;
|
|
4284
|
-
const I =
|
|
4284
|
+
const I = b.data.chId || b.data.source, M = b.data.label || b.data.name;
|
|
4285
4285
|
if (k = f.value.find(
|
|
4286
|
-
($) => $.serverId === I && $.label ===
|
|
4286
|
+
($) => $.serverId === I && $.label === M
|
|
4287
4287
|
), !k) {
|
|
4288
4288
|
console.error("❌ NO EXACT MATCH - rejecting to prevent data corruption:", {
|
|
4289
4289
|
serverResponseId: I,
|
|
4290
|
-
serverResponseName:
|
|
4290
|
+
serverResponseName: M,
|
|
4291
4291
|
availableChannels: f.value.map(($) => ({
|
|
4292
4292
|
id: $.id,
|
|
4293
4293
|
serverId: $.serverId,
|
|
4294
4294
|
label: $.label,
|
|
4295
4295
|
matches: {
|
|
4296
4296
|
serverId: $.serverId === I,
|
|
4297
|
-
label: $.label ===
|
|
4297
|
+
label: $.label === M
|
|
4298
4298
|
}
|
|
4299
4299
|
}))
|
|
4300
4300
|
});
|
|
4301
4301
|
return;
|
|
4302
4302
|
}
|
|
4303
|
-
switch (
|
|
4303
|
+
switch (b.type) {
|
|
4304
4304
|
case "gap":
|
|
4305
4305
|
case "Neural":
|
|
4306
4306
|
case "Continuous":
|
|
4307
4307
|
let $ = !1, W = k && k.segments;
|
|
4308
|
-
if (W &&
|
|
4309
|
-
let
|
|
4310
|
-
for (; W[
|
|
4311
|
-
if (W[
|
|
4308
|
+
if (W && b.type !== "gap" && ($ = !0, W.length > 0)) {
|
|
4309
|
+
let w = n(W, b.data.startTs, !0, 0);
|
|
4310
|
+
for (; W[w] && W[w].pageStart === b.data.pageStart; ) {
|
|
4311
|
+
if (W[w].startTs === b.data.startTs) {
|
|
4312
4312
|
$ = !1;
|
|
4313
4313
|
break;
|
|
4314
4314
|
}
|
|
4315
|
-
|
|
4315
|
+
w++;
|
|
4316
4316
|
}
|
|
4317
4317
|
}
|
|
4318
|
-
let N = c.value.get(
|
|
4318
|
+
let N = c.value.get(b.data.pageStart);
|
|
4319
4319
|
if (N) {
|
|
4320
|
-
let
|
|
4321
|
-
if (isNaN(
|
|
4320
|
+
let w = N.counter.get(k.id);
|
|
4321
|
+
if (isNaN(w) && (w = b.nrResponses || 1, N.counter.set(k.id, w)), w > 0 && (w = w - 1, N.counter.set(k.id, w)), w === 0) {
|
|
4322
4322
|
let E = !0;
|
|
4323
4323
|
for (let [x, A] of N.counter.entries())
|
|
4324
4324
|
if (A > 0 || isNaN(A)) {
|
|
4325
4325
|
E = !1;
|
|
4326
4326
|
break;
|
|
4327
4327
|
}
|
|
4328
|
-
E && c.value.delete(
|
|
4328
|
+
E && c.value.delete(b.data.pageStart);
|
|
4329
4329
|
}
|
|
4330
4330
|
}
|
|
4331
|
-
$ && (W.push(
|
|
4331
|
+
$ && (W.push(b.data), W.sort((w, E) => w.startTs < E.startTs ? -1 : w.startTs > E.startTs ? 1 : 0));
|
|
4332
4332
|
break;
|
|
4333
4333
|
}
|
|
4334
4334
|
}, h = () => {
|
|
4335
4335
|
i.value = [], c.value.clear();
|
|
4336
|
-
for (let
|
|
4337
|
-
f.value[
|
|
4338
|
-
for (let
|
|
4339
|
-
v.channels[
|
|
4340
|
-
}, m = (
|
|
4341
|
-
let k = 0, I = 0,
|
|
4342
|
-
for (let W = 0; W <
|
|
4343
|
-
let N =
|
|
4344
|
-
for (let
|
|
4345
|
-
N[
|
|
4336
|
+
for (let b = 0; b < f.value.length; b++)
|
|
4337
|
+
f.value[b].segments = [];
|
|
4338
|
+
for (let b = 0; b < v.channels.length; b++)
|
|
4339
|
+
v.channels[b].blocks = [];
|
|
4340
|
+
}, m = (b) => {
|
|
4341
|
+
let k = 0, I = 0, M = v.channels;
|
|
4342
|
+
for (let W = 0; W < M.length; W++) {
|
|
4343
|
+
let N = M[W].blocks;
|
|
4344
|
+
for (let w = 0; w < N.length; w++)
|
|
4345
|
+
N[w].type === "Continuous" && (k += R(N[w].parsedData[1]), I++);
|
|
4346
4346
|
}
|
|
4347
4347
|
const $ = k / I;
|
|
4348
|
-
return !isNaN($) &&
|
|
4349
|
-
}, R = (
|
|
4350
|
-
const k = g(
|
|
4348
|
+
return !isNaN($) && b ? b / M.length / (2 * $) : 1;
|
|
4349
|
+
}, R = (b) => {
|
|
4350
|
+
const k = g(b), I = b.map(function(W) {
|
|
4351
4351
|
const N = W - k;
|
|
4352
4352
|
return N * N;
|
|
4353
|
-
}),
|
|
4354
|
-
return Math.sqrt(
|
|
4355
|
-
}, g = (
|
|
4356
|
-
return
|
|
4357
|
-
}, 0) /
|
|
4353
|
+
}), M = g(I);
|
|
4354
|
+
return Math.sqrt(M);
|
|
4355
|
+
}, g = (b) => b.reduce(function(M, $) {
|
|
4356
|
+
return M + $;
|
|
4357
|
+
}, 0) / b.length;
|
|
4358
4358
|
return {
|
|
4359
4359
|
// State
|
|
4360
4360
|
chData: f,
|
|
@@ -4374,10 +4374,10 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4374
4374
|
invalidate: h,
|
|
4375
4375
|
autoScaleViewData: m,
|
|
4376
4376
|
segmIndexOf: n,
|
|
4377
|
-
updateCurrentRequestedSamplePeriod: (
|
|
4378
|
-
e.value = Math.ceil(
|
|
4377
|
+
updateCurrentRequestedSamplePeriod: (b) => {
|
|
4378
|
+
e.value = Math.ceil(b);
|
|
4379
4379
|
},
|
|
4380
|
-
isDataCurrentForViewport: (
|
|
4380
|
+
isDataCurrentForViewport: (b) => b && b.startTs && b.startTs > 0,
|
|
4381
4381
|
// Helpers
|
|
4382
4382
|
standardDeviation: R,
|
|
4383
4383
|
average: g
|
|
@@ -4398,63 +4398,63 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4398
4398
|
} else
|
|
4399
4399
|
console.log("✅ No more prefetch requests, stopping prefetch timer"), clearInterval(v.value), u.value = !1;
|
|
4400
4400
|
};
|
|
4401
|
-
}, n = (y, O,
|
|
4402
|
-
k.start = O, k.duration =
|
|
4401
|
+
}, n = (y, O, b, k, I, M, $, W, N, w) => {
|
|
4402
|
+
k.start = O, k.duration = b;
|
|
4403
4403
|
const E = [];
|
|
4404
4404
|
for (let x = 0; x < k.channels.length; x++) {
|
|
4405
|
-
const A =
|
|
4405
|
+
const A = w ? w(k.channels[x]) : k.channels[x].id;
|
|
4406
4406
|
E.push(A);
|
|
4407
4407
|
}
|
|
4408
4408
|
for (let x = 0; x < y.length; x++) {
|
|
4409
|
-
const A = y[x],
|
|
4410
|
-
E.indexOf(
|
|
4411
|
-
id:
|
|
4409
|
+
const A = y[x], _ = w ? w(A) : A.id;
|
|
4410
|
+
E.indexOf(_) < 0 && k.channels.push({
|
|
4411
|
+
id: _,
|
|
4412
4412
|
mean: null,
|
|
4413
4413
|
firstRenderedIndex: 0,
|
|
4414
4414
|
lastRenderedIndex: 0,
|
|
4415
4415
|
blocks: []
|
|
4416
4416
|
});
|
|
4417
4417
|
}
|
|
4418
|
-
return d(y, O,
|
|
4419
|
-
}, d = (y, O,
|
|
4418
|
+
return d(y, O, b, k, I, M, $, W, N, w);
|
|
4419
|
+
}, d = (y, O, b, k, I, M, $, W, N, w) => {
|
|
4420
4420
|
f.value = [];
|
|
4421
4421
|
let x = !1;
|
|
4422
|
-
(i.value !== O || e.value !==
|
|
4422
|
+
(i.value !== O || e.value !== b) && (c.value = [], x = !0), i.value = O, e.value = b;
|
|
4423
4423
|
const A = [];
|
|
4424
|
-
for (let
|
|
4425
|
-
A.push(k.channels[
|
|
4426
|
-
for (let
|
|
4427
|
-
let
|
|
4428
|
-
const
|
|
4429
|
-
if (
|
|
4424
|
+
for (let _ = 0; _ < k.channels.length; _++)
|
|
4425
|
+
A.push(k.channels[_]);
|
|
4426
|
+
for (let _ = 0; _ < y.length; _++) {
|
|
4427
|
+
let F = !1;
|
|
4428
|
+
const L = y[_], D = L.segments, B = w ? w(L) : L.id, J = A.findIndex((ne) => (w ? w(ne) : ne.id) === B);
|
|
4429
|
+
if (J === -1)
|
|
4430
4430
|
continue;
|
|
4431
|
-
const
|
|
4432
|
-
if (!
|
|
4431
|
+
const z = k.channels[J];
|
|
4432
|
+
if (!z)
|
|
4433
4433
|
continue;
|
|
4434
|
-
|
|
4434
|
+
z.blocks = [];
|
|
4435
4435
|
let V = Math.floor(O / 15e6) * 15e6;
|
|
4436
4436
|
V < 0 && (V = 0);
|
|
4437
4437
|
let K = 0, X = 0;
|
|
4438
|
-
|
|
4439
|
-
let ce = O +
|
|
4438
|
+
D.length > 0 && (K = N(D, V, !0, 0));
|
|
4439
|
+
let ce = O + b + M.PREFETCHPAGES * 15e6;
|
|
4440
4440
|
ce > W && (ce = W);
|
|
4441
4441
|
let j;
|
|
4442
|
-
for (
|
|
4443
|
-
|
|
4442
|
+
for (D.length > 0 && (j = D[K]); V < ce || F; ) {
|
|
4443
|
+
F = !1;
|
|
4444
4444
|
let ne = !1;
|
|
4445
4445
|
if (j && (ne = V >= j.pageStart && V <= j.pageEnd), ne) {
|
|
4446
|
-
let fe = j.startTs < O +
|
|
4447
|
-
X += 1, V += 15e6, fe &&
|
|
4446
|
+
let fe = j.startTs < O + b;
|
|
4447
|
+
X += 1, V += 15e6, fe && z.blocks.push(j);
|
|
4448
4448
|
const se = j.pageStart;
|
|
4449
|
-
j =
|
|
4449
|
+
j = D[K + X], j && se === j.pageStart && (F = !0);
|
|
4450
4450
|
} else {
|
|
4451
4451
|
if (I.get(V)) {
|
|
4452
4452
|
if (V += 15e6, j && V >= j.pageEnd)
|
|
4453
|
-
for (; j && j.pageEnd < V && (X += 1, j =
|
|
4453
|
+
for (; j && j.pageEnd < V && (X += 1, j = D[K + X], !!j); )
|
|
4454
4454
|
;
|
|
4455
4455
|
continue;
|
|
4456
4456
|
}
|
|
4457
|
-
let fe = V < O +
|
|
4457
|
+
let fe = V < O + b, se = !1;
|
|
4458
4458
|
if (fe) {
|
|
4459
4459
|
for (let le in c.value)
|
|
4460
4460
|
if (c.value[le].start === V) {
|
|
@@ -4462,9 +4462,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4462
4462
|
break;
|
|
4463
4463
|
}
|
|
4464
4464
|
for (let le in f.value)
|
|
4465
|
-
f.value[le].start === V && (f.value[le].channels.push(
|
|
4465
|
+
f.value[le].start === V && (f.value[le].channels.push(L), se = !0);
|
|
4466
4466
|
se || f.value.push({
|
|
4467
|
-
channels: [
|
|
4467
|
+
channels: [L],
|
|
4468
4468
|
start: V,
|
|
4469
4469
|
duration: 15e6,
|
|
4470
4470
|
isInViewport: !0,
|
|
@@ -4472,9 +4472,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4472
4472
|
});
|
|
4473
4473
|
} else if (x) {
|
|
4474
4474
|
for (let le in c.value)
|
|
4475
|
-
c.value[le].start === V && (c.value[le].channels.push(
|
|
4475
|
+
c.value[le].start === V && (c.value[le].channels.push(L), se = !0);
|
|
4476
4476
|
se || c.value.push({
|
|
4477
|
-
channels: [
|
|
4477
|
+
channels: [L],
|
|
4478
4478
|
start: V,
|
|
4479
4479
|
duration: 15e6,
|
|
4480
4480
|
isInViewport: !1,
|
|
@@ -4482,63 +4482,63 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4482
4482
|
});
|
|
4483
4483
|
}
|
|
4484
4484
|
if (V += 15e6, j && V >= j.pageEnd)
|
|
4485
|
-
for (; j && j.pageEnd < V && (X += 1, j =
|
|
4485
|
+
for (; j && j.pageEnd < V && (X += 1, j = D[K + X], !!j); )
|
|
4486
4486
|
;
|
|
4487
4487
|
}
|
|
4488
4488
|
}
|
|
4489
|
-
|
|
4489
|
+
z.blocks.sort(s);
|
|
4490
4490
|
}
|
|
4491
4491
|
return {
|
|
4492
4492
|
asyncRequests: f.value,
|
|
4493
4493
|
asyncPreRequests: c.value
|
|
4494
4494
|
};
|
|
4495
|
-
}, s = (y, O) => y.startTs < O.startTs ? -1 : y.startTs > O.startTs ? 1 : 0, l = (y, O = 0,
|
|
4495
|
+
}, s = (y, O) => y.startTs < O.startTs ? -1 : y.startTs > O.startTs ? 1 : 0, l = (y, O = 0, b, k, I, M, $, W) => {
|
|
4496
4496
|
if (y.length === 0)
|
|
4497
4497
|
return console.log("⚠️ No requests to send"), !1;
|
|
4498
4498
|
const N = W;
|
|
4499
|
-
for (let
|
|
4499
|
+
for (let w = 0; w < y.length; w++) {
|
|
4500
4500
|
let E;
|
|
4501
|
-
|
|
4501
|
+
w === 0 ? E = y[O] : w === O ? E = y[0] : E = y[w];
|
|
4502
4502
|
let x = E.start + E.duration;
|
|
4503
4503
|
x > N && (x = N);
|
|
4504
|
-
const A =
|
|
4504
|
+
const A = b;
|
|
4505
4505
|
if (A && A.readyState === 1) {
|
|
4506
|
-
const
|
|
4507
|
-
const V =
|
|
4506
|
+
const _ = E.channels.map((z) => {
|
|
4507
|
+
const V = z.serverId || z.id, K = z.label || z.name;
|
|
4508
4508
|
return {
|
|
4509
4509
|
id: V,
|
|
4510
4510
|
// Server expects serverId
|
|
4511
4511
|
name: K
|
|
4512
4512
|
};
|
|
4513
|
-
}),
|
|
4513
|
+
}), F = {
|
|
4514
4514
|
session: k,
|
|
4515
4515
|
minMax: !0,
|
|
4516
4516
|
startTime: E.start,
|
|
4517
4517
|
endTime: x,
|
|
4518
4518
|
packageId: I.content.id,
|
|
4519
4519
|
pixelWidth: E.pixelWidth,
|
|
4520
|
-
virtualChannels:
|
|
4521
|
-
},
|
|
4522
|
-
A.send(
|
|
4523
|
-
const
|
|
4524
|
-
for (let
|
|
4525
|
-
const V = E.channels[
|
|
4526
|
-
|
|
4520
|
+
virtualChannels: _
|
|
4521
|
+
}, L = JSON.stringify(F);
|
|
4522
|
+
A.send(L);
|
|
4523
|
+
const D = E.channels.length, B = /* @__PURE__ */ new Map();
|
|
4524
|
+
for (let z = 0; z < D; z++) {
|
|
4525
|
+
const V = E.channels[z].id;
|
|
4526
|
+
B.set(V, NaN);
|
|
4527
4527
|
}
|
|
4528
|
-
const
|
|
4529
|
-
count:
|
|
4530
|
-
counter:
|
|
4528
|
+
const J = {
|
|
4529
|
+
count: D,
|
|
4530
|
+
counter: B,
|
|
4531
4531
|
subPageCount: NaN,
|
|
4532
4532
|
ts: Date.now(),
|
|
4533
4533
|
inViewport: E.isInViewport,
|
|
4534
4534
|
// Add debug info
|
|
4535
|
-
channels: E.channels.map((
|
|
4536
|
-
id:
|
|
4537
|
-
serverId:
|
|
4538
|
-
label:
|
|
4535
|
+
channels: E.channels.map((z) => ({
|
|
4536
|
+
id: z.id,
|
|
4537
|
+
serverId: z.serverId,
|
|
4538
|
+
label: z.label
|
|
4539
4539
|
}))
|
|
4540
4540
|
};
|
|
4541
|
-
$.set(E.start,
|
|
4541
|
+
$.set(E.start, J);
|
|
4542
4542
|
} else
|
|
4543
4543
|
return console.error("❌ WebSocket not ready for sending requests:", {
|
|
4544
4544
|
readyState: A == null ? void 0 : A.readyState,
|
|
@@ -4559,19 +4559,19 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4559
4559
|
}, R = () => {
|
|
4560
4560
|
const y = f.value.slice();
|
|
4561
4561
|
return f.value = [], y;
|
|
4562
|
-
}, g = (y, O,
|
|
4562
|
+
}, g = (y, O, b) => {
|
|
4563
4563
|
const k = [];
|
|
4564
|
-
return y.forEach(function(I,
|
|
4564
|
+
return y.forEach(function(I, M) {
|
|
4565
4565
|
if (!isNaN(I.subPageCount)) {
|
|
4566
4566
|
const $ = [];
|
|
4567
4567
|
I.counter.forEach(function(W, N) {
|
|
4568
4568
|
!isNaN(W) && W > 0 && $.push(N);
|
|
4569
4569
|
}), $.length > 0 && k.push({
|
|
4570
4570
|
channels: $,
|
|
4571
|
-
start:
|
|
4571
|
+
start: M,
|
|
4572
4572
|
duration: O,
|
|
4573
4573
|
isInViewport: !0,
|
|
4574
|
-
pixelWidth: Math.ceil(
|
|
4574
|
+
pixelWidth: Math.ceil(b)
|
|
4575
4575
|
});
|
|
4576
4576
|
}
|
|
4577
4577
|
}), y.clear(), k;
|
|
@@ -4604,149 +4604,143 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4604
4604
|
lastProcessingTime: 0
|
|
4605
4605
|
}), i = ref(/* @__PURE__ */ new Map()), e = ref(/* @__PURE__ */ new Map()), r = computed(
|
|
4606
4606
|
() => c.value !== "NOT_MONTAGED"
|
|
4607
|
-
), t = computed(() => !r.value || !v.value ? null : v.value.find((
|
|
4608
|
-
var
|
|
4609
|
-
return ((
|
|
4607
|
+
), t = computed(() => !r.value || !v.value ? null : v.value.find((w) => w.name === c.value)), n = computed(() => {
|
|
4608
|
+
var w;
|
|
4609
|
+
return ((w = t.value) == null ? void 0 : w.channelPairs) || {};
|
|
4610
4610
|
});
|
|
4611
4611
|
watch(c, () => {
|
|
4612
4612
|
i.value.clear(), e.value.clear();
|
|
4613
4613
|
});
|
|
4614
|
-
const d = (
|
|
4615
|
-
if (!
|
|
4616
|
-
let E = propOr("", "id",
|
|
4614
|
+
const d = (w) => w ? propOr("", "id", w) : "", s = (w) => w ? propOr("", "serverId", w) || propOr("", "id", w) : "", l = (w) => propOr("", "id", w), a = (w) => {
|
|
4615
|
+
if (!w) return "";
|
|
4616
|
+
let E = propOr("", "id", w);
|
|
4617
4617
|
if (r.value && typeof E == "string") {
|
|
4618
4618
|
const x = E.split("_");
|
|
4619
4619
|
E = x.length > 1 ? head(x) : E;
|
|
4620
4620
|
}
|
|
4621
4621
|
return E;
|
|
4622
|
-
}, h = (
|
|
4623
|
-
var
|
|
4624
|
-
const A = x || c.value,
|
|
4625
|
-
if (e.value.has(
|
|
4626
|
-
return e.value.get(
|
|
4627
|
-
let
|
|
4622
|
+
}, h = (w, E, x = null) => {
|
|
4623
|
+
var L, D;
|
|
4624
|
+
const A = x || c.value, _ = `${w}_${E}_${A}`;
|
|
4625
|
+
if (e.value.has(_))
|
|
4626
|
+
return e.value.get(_);
|
|
4627
|
+
let F = `${w}-${E}`;
|
|
4628
4628
|
if (A !== "NOT_MONTAGED") {
|
|
4629
|
-
const
|
|
4630
|
-
if (
|
|
4631
|
-
for (const
|
|
4632
|
-
const
|
|
4633
|
-
if (((
|
|
4634
|
-
|
|
4629
|
+
const B = (L = v.value) == null ? void 0 : L.find((J) => J.name === A);
|
|
4630
|
+
if (B != null && B.channelPairs)
|
|
4631
|
+
for (const J of Object.keys(B.channelPairs)) {
|
|
4632
|
+
const z = B.channelPairs[J];
|
|
4633
|
+
if (((D = z.channels) == null ? void 0 : D.length) === 2 && z.channels[0] === w && z.channels[1] === E) {
|
|
4634
|
+
F = z.name || F;
|
|
4635
4635
|
break;
|
|
4636
4636
|
}
|
|
4637
4637
|
}
|
|
4638
4638
|
}
|
|
4639
|
-
return e.value.set(
|
|
4640
|
-
}, m = (
|
|
4641
|
-
if (!Array.isArray(
|
|
4642
|
-
return console.warn("Invalid channel details provided:",
|
|
4639
|
+
return e.value.set(_, F), F;
|
|
4640
|
+
}, m = (w) => {
|
|
4641
|
+
if (!Array.isArray(w))
|
|
4642
|
+
return console.warn("Invalid channel details provided:", w), [];
|
|
4643
4643
|
const E = performance.now();
|
|
4644
|
-
o.totalChannels =
|
|
4645
|
-
const x =
|
|
4646
|
-
var
|
|
4644
|
+
o.totalChannels = w.length, o.processedChannels = 0, o.errors = 0;
|
|
4645
|
+
const x = w.map(({ id: A, name: _ }) => {
|
|
4646
|
+
var F;
|
|
4647
4647
|
try {
|
|
4648
|
-
const
|
|
4649
|
-
if (!
|
|
4648
|
+
const L = R(A);
|
|
4649
|
+
if (!L)
|
|
4650
4650
|
return console.warn(
|
|
4651
4651
|
`❌ Base channel not found for ID: ${A}, available base channels:`,
|
|
4652
|
-
((
|
|
4653
|
-
var U, L;
|
|
4654
|
-
return { id: (U = z.content) == null ? void 0 : U.id, name: (L = z.content) == null ? void 0 : L.name };
|
|
4655
|
-
})) || []
|
|
4652
|
+
((F = f.value) == null ? void 0 : F.map((B) => ({ id: B == null ? void 0 : B.id, name: B == null ? void 0 : B.name }))) || []
|
|
4656
4653
|
), o.errors++, null;
|
|
4657
|
-
const
|
|
4658
|
-
return o.processedChannels++, r.value && o.montageChannels++,
|
|
4659
|
-
} catch (
|
|
4660
|
-
return console.error(`❌ Error processing channel ${A}:`,
|
|
4654
|
+
const D = g(A, _, L);
|
|
4655
|
+
return o.processedChannels++, r.value && o.montageChannels++, D;
|
|
4656
|
+
} catch (L) {
|
|
4657
|
+
return console.error(`❌ Error processing channel ${A}:`, L), o.errors++, null;
|
|
4661
4658
|
}
|
|
4662
4659
|
}).filter(Boolean);
|
|
4663
4660
|
return o.lastProcessingTime = performance.now() - E, x;
|
|
4664
|
-
}, R = (
|
|
4661
|
+
}, R = (w) => {
|
|
4665
4662
|
var x;
|
|
4666
|
-
if (i.value.has(
|
|
4667
|
-
return i.value.get(
|
|
4668
|
-
const E = (x = f.value) == null ? void 0 : x.find((A) =>
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
});
|
|
4672
|
-
return E && i.value.set(_, E), E;
|
|
4673
|
-
}, g = (_, E, x) => {
|
|
4663
|
+
if (i.value.has(w))
|
|
4664
|
+
return i.value.get(w);
|
|
4665
|
+
const E = (x = f.value) == null ? void 0 : x.find((A) => (A == null ? void 0 : A.id) === w);
|
|
4666
|
+
return E && i.value.set(w, E), E;
|
|
4667
|
+
}, g = (w, E, x) => {
|
|
4674
4668
|
let A = E;
|
|
4675
|
-
const
|
|
4676
|
-
let
|
|
4669
|
+
const _ = w;
|
|
4670
|
+
let F = w;
|
|
4677
4671
|
if (r.value) {
|
|
4678
|
-
|
|
4679
|
-
const
|
|
4680
|
-
|
|
4672
|
+
F = `${w}_${E}`;
|
|
4673
|
+
const D = E.split("<->", 2);
|
|
4674
|
+
D.length === 2 && (A = h(D[0], D[1]), console.log("🎭 Montage display name created:", {
|
|
4681
4675
|
originalName: E,
|
|
4682
|
-
channelParts:
|
|
4676
|
+
channelParts: D,
|
|
4683
4677
|
displayName: A
|
|
4684
4678
|
}));
|
|
4685
4679
|
}
|
|
4686
4680
|
return {
|
|
4687
4681
|
content: {
|
|
4688
|
-
id:
|
|
4682
|
+
id: F,
|
|
4689
4683
|
// ✅ Unique for client-side operations
|
|
4690
|
-
serverId:
|
|
4684
|
+
serverId: _,
|
|
4691
4685
|
// ✅ What server provided/expects
|
|
4692
4686
|
name: E,
|
|
4693
|
-
channelType: x.
|
|
4687
|
+
channelType: x.channelType,
|
|
4694
4688
|
label: E,
|
|
4695
4689
|
displayName: A,
|
|
4696
|
-
unit: x.
|
|
4697
|
-
rate: x.
|
|
4698
|
-
start: x.
|
|
4699
|
-
end: x.
|
|
4690
|
+
unit: x.unit,
|
|
4691
|
+
rate: x.rate,
|
|
4692
|
+
start: x.start,
|
|
4693
|
+
end: x.end,
|
|
4700
4694
|
// Additional metadata
|
|
4701
4695
|
montageScheme: r.value ? c.value : "NOT_MONTAGED",
|
|
4702
4696
|
isMontaged: r.value,
|
|
4703
|
-
baseChannelId:
|
|
4697
|
+
baseChannelId: w
|
|
4704
4698
|
// Keep reference for debugging
|
|
4705
4699
|
},
|
|
4706
4700
|
properties: x.properties || []
|
|
4707
4701
|
};
|
|
4708
|
-
}, y = (
|
|
4709
|
-
var A,
|
|
4710
|
-
if (
|
|
4702
|
+
}, y = (w) => {
|
|
4703
|
+
var A, _;
|
|
4704
|
+
if (w === "NOT_MONTAGED")
|
|
4711
4705
|
return {
|
|
4712
4706
|
montage: "NOT_MONTAGED",
|
|
4713
|
-
packageId: (
|
|
4707
|
+
packageId: (A = u.value) == null ? void 0 : A.id,
|
|
4714
4708
|
montageMap: []
|
|
4715
4709
|
};
|
|
4716
|
-
const E = v.value.find((
|
|
4710
|
+
const E = v.value.find((F) => F.name === w);
|
|
4717
4711
|
if (!E)
|
|
4718
|
-
return console.warn("Montage not found:",
|
|
4719
|
-
const x = E.channelPairs.map((
|
|
4712
|
+
return console.warn("Montage not found:", w), null;
|
|
4713
|
+
const x = E.channelPairs.map((F) => F.channels);
|
|
4720
4714
|
return {
|
|
4721
4715
|
montage: "CUSTOM_MONTAGE",
|
|
4722
|
-
packageId: (
|
|
4716
|
+
packageId: (_ = u.value) == null ? void 0 : _.content.id,
|
|
4723
4717
|
montageMap: x
|
|
4724
4718
|
};
|
|
4725
|
-
}, O = (
|
|
4719
|
+
}, O = (w) => {
|
|
4726
4720
|
const E = [];
|
|
4727
|
-
if (!
|
|
4721
|
+
if (!w)
|
|
4728
4722
|
return E.push("Channel configuration is null or undefined"), { isValid: !1, errors: E };
|
|
4729
4723
|
const x = ["id", "label", "type", "unit", "rate"];
|
|
4730
|
-
for (const
|
|
4731
|
-
_
|
|
4732
|
-
|
|
4724
|
+
for (const _ of x)
|
|
4725
|
+
w[_] || E.push(`Missing required field: ${_}`);
|
|
4726
|
+
w.rate && (typeof w.rate != "number" || w.rate <= 0) && E.push("Sample rate must be a positive number"), w.start && w.end && w.start >= w.end && E.push("Channel start time must be less than end time");
|
|
4733
4727
|
const A = ["CONTINUOUS", "UNIT", "Neural"];
|
|
4734
|
-
return
|
|
4728
|
+
return w.type && !A.includes(w.type) && E.push(`Invalid channel type: ${w.type}. Must be one of: ${A.join(", ")}`), {
|
|
4735
4729
|
isValid: E.length === 0,
|
|
4736
4730
|
errors: E
|
|
4737
4731
|
};
|
|
4738
|
-
},
|
|
4739
|
-
const A = E.label || "",
|
|
4740
|
-
if (
|
|
4741
|
-
return A.localeCompare(
|
|
4742
|
-
const
|
|
4743
|
-
if (
|
|
4744
|
-
const
|
|
4745
|
-
return !isNaN(
|
|
4746
|
-
}
|
|
4747
|
-
return
|
|
4748
|
-
}), k = (
|
|
4749
|
-
const x =
|
|
4732
|
+
}, b = (w) => w.sort((E, x) => {
|
|
4733
|
+
const A = E.label || "", _ = x.label || "", F = A.split("<->", 3), L = _.split("<->", 3);
|
|
4734
|
+
if (F.length > 2 || L.length > 2)
|
|
4735
|
+
return A.localeCompare(_);
|
|
4736
|
+
const D = F[0] || "", B = L[0] || "";
|
|
4737
|
+
if (D === B && F.length > 1 && L.length > 1) {
|
|
4738
|
+
const J = parseFloat(F[1]), z = parseFloat(L[1]);
|
|
4739
|
+
return !isNaN(J) && !isNaN(z) ? J - z : F[1].localeCompare(L[1]);
|
|
4740
|
+
}
|
|
4741
|
+
return D.localeCompare(B);
|
|
4742
|
+
}), k = (w, E = 0) => {
|
|
4743
|
+
const x = w.content, A = x.label.split("<->", 3), _ = A[0] || "", F = A.length > 1 ? isNaN(parseFloat(A[1])) ? A[1] : parseFloat(A[1]) : 0;
|
|
4750
4744
|
return {
|
|
4751
4745
|
id: x.id,
|
|
4752
4746
|
serverId: x.serverId,
|
|
@@ -4754,8 +4748,8 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4754
4748
|
label: x.label,
|
|
4755
4749
|
displayName: x.displayName,
|
|
4756
4750
|
labelParts: A,
|
|
4757
|
-
labelPrefix:
|
|
4758
|
-
labelValue:
|
|
4751
|
+
labelPrefix: _,
|
|
4752
|
+
labelValue: F,
|
|
4759
4753
|
dataSegments: [],
|
|
4760
4754
|
rank: E,
|
|
4761
4755
|
visible: !0,
|
|
@@ -4775,49 +4769,49 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4775
4769
|
baseChannelId: x.baseChannelId
|
|
4776
4770
|
// For debugging/reference
|
|
4777
4771
|
};
|
|
4778
|
-
}, I = (
|
|
4772
|
+
}, I = (w, E = {}) => {
|
|
4779
4773
|
const {
|
|
4780
4774
|
channelType: x = null,
|
|
4781
4775
|
visible: A = null,
|
|
4782
|
-
montageScheme:
|
|
4783
|
-
labelPattern:
|
|
4784
|
-
sampleRate:
|
|
4776
|
+
montageScheme: _ = null,
|
|
4777
|
+
labelPattern: F = null,
|
|
4778
|
+
sampleRate: L = null
|
|
4785
4779
|
} = E;
|
|
4786
|
-
return
|
|
4787
|
-
},
|
|
4780
|
+
return w.filter((D) => !(x && D.type !== x || A !== null && D.visible !== A || _ && D.montageScheme !== _ || F && !new RegExp(F, "i").test(D.label) || L && D.sf !== L));
|
|
4781
|
+
}, M = (w, E = "type") => {
|
|
4788
4782
|
const x = {};
|
|
4789
|
-
return
|
|
4790
|
-
let
|
|
4783
|
+
return w.forEach((A) => {
|
|
4784
|
+
let _;
|
|
4791
4785
|
switch (E) {
|
|
4792
4786
|
case "type":
|
|
4793
|
-
|
|
4787
|
+
_ = A.type;
|
|
4794
4788
|
break;
|
|
4795
4789
|
case "montage":
|
|
4796
|
-
|
|
4790
|
+
_ = A.montageScheme || "NOT_MONTAGED";
|
|
4797
4791
|
break;
|
|
4798
4792
|
case "prefix":
|
|
4799
|
-
|
|
4793
|
+
_ = A.labelPrefix;
|
|
4800
4794
|
break;
|
|
4801
4795
|
case "sampleRate":
|
|
4802
|
-
|
|
4796
|
+
_ = A.sf;
|
|
4803
4797
|
break;
|
|
4804
4798
|
case "unit":
|
|
4805
|
-
|
|
4799
|
+
_ = A.unit;
|
|
4806
4800
|
break;
|
|
4807
4801
|
default:
|
|
4808
|
-
|
|
4802
|
+
_ = "all";
|
|
4809
4803
|
}
|
|
4810
|
-
x[
|
|
4804
|
+
x[_] || (x[_] = []), x[_].push(A);
|
|
4811
4805
|
}), x;
|
|
4812
4806
|
}, $ = () => {
|
|
4813
|
-
var
|
|
4807
|
+
var w;
|
|
4814
4808
|
return {
|
|
4815
4809
|
...o,
|
|
4816
4810
|
cacheSize: i.value.size,
|
|
4817
4811
|
montageCacheSize: e.value.size,
|
|
4818
4812
|
isViewingMontage: r.value,
|
|
4819
4813
|
currentMontageScheme: c.value,
|
|
4820
|
-
availableMontages: ((
|
|
4814
|
+
availableMontages: ((w = v.value) == null ? void 0 : w.map((E) => E.name)) || []
|
|
4821
4815
|
};
|
|
4822
4816
|
}, W = () => {
|
|
4823
4817
|
i.value.clear(), e.value.clear(), Object.assign(o, {
|
|
@@ -4827,9 +4821,9 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4827
4821
|
errors: 0,
|
|
4828
4822
|
lastProcessingTime: 0
|
|
4829
4823
|
});
|
|
4830
|
-
}, N = async (
|
|
4824
|
+
}, N = async (w) => {
|
|
4831
4825
|
const E = [];
|
|
4832
|
-
for (const x of
|
|
4826
|
+
for (const x of w)
|
|
4833
4827
|
try {
|
|
4834
4828
|
const A = await x();
|
|
4835
4829
|
E.push({ success: !0, result: A });
|
|
@@ -4855,10 +4849,10 @@ const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufjsExports), use
|
|
|
4855
4849
|
// Channel configuration
|
|
4856
4850
|
createChannelConfig: k,
|
|
4857
4851
|
validateChannelConfig: O,
|
|
4858
|
-
sortChannelConfigurations:
|
|
4852
|
+
sortChannelConfigurations: b,
|
|
4859
4853
|
// Utility methods
|
|
4860
4854
|
filterChannels: I,
|
|
4861
|
-
groupChannels:
|
|
4855
|
+
groupChannels: M,
|
|
4862
4856
|
findBaseChannel: R,
|
|
4863
4857
|
createVirtualChannel: g,
|
|
4864
4858
|
// Management
|
|
@@ -4914,24 +4908,24 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4914
4908
|
disconnect: g,
|
|
4915
4909
|
setClearChannelsCallback: y,
|
|
4916
4910
|
onSegment: O,
|
|
4917
|
-
onEvent:
|
|
4911
|
+
onEvent: b,
|
|
4918
4912
|
onChannelDetails: k,
|
|
4919
4913
|
onError: I
|
|
4920
4914
|
} = useWebSocket(), {
|
|
4921
|
-
plotCanvasRef:
|
|
4915
|
+
plotCanvasRef: M,
|
|
4922
4916
|
blurCanvasRef: $,
|
|
4923
4917
|
initializeCanvases: W,
|
|
4924
4918
|
renderData: N,
|
|
4925
|
-
cpCanvasScaler:
|
|
4919
|
+
cpCanvasScaler: w
|
|
4926
4920
|
} = useCanvasRenderer(), E = ref(1), x = ref(!1), {
|
|
4927
4921
|
chData: A,
|
|
4928
|
-
requestedPages:
|
|
4929
|
-
viewData:
|
|
4930
|
-
channelsReady:
|
|
4931
|
-
autoScale:
|
|
4932
|
-
initChannels:
|
|
4933
|
-
dataCallback:
|
|
4934
|
-
invalidate:
|
|
4922
|
+
requestedPages: _,
|
|
4923
|
+
viewData: F,
|
|
4924
|
+
channelsReady: L,
|
|
4925
|
+
autoScale: D,
|
|
4926
|
+
initChannels: B,
|
|
4927
|
+
dataCallback: J,
|
|
4928
|
+
invalidate: z,
|
|
4935
4929
|
autoScaleViewData: V,
|
|
4936
4930
|
segmIndexOf: K,
|
|
4937
4931
|
updateCurrentRequestedSamplePeriod: X,
|
|
@@ -4944,12 +4938,12 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4944
4938
|
initializePrefetch: le,
|
|
4945
4939
|
generatePoints: me,
|
|
4946
4940
|
requestDataFromServer: oe,
|
|
4947
|
-
startPrefetching:
|
|
4941
|
+
startPrefetching: he,
|
|
4948
4942
|
clearRequests: be
|
|
4949
4943
|
} = useDataRequests(), {
|
|
4950
4944
|
getChannelId: Se,
|
|
4951
4945
|
processChannelData: Re,
|
|
4952
|
-
createMontagePayload:
|
|
4946
|
+
createMontagePayload: pe
|
|
4953
4947
|
} = useChannelProcessing(e, n, d, i), Oe = ref({
|
|
4954
4948
|
totalRequests: 0,
|
|
4955
4949
|
successfulRequests: 0,
|
|
@@ -4958,7 +4952,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4958
4952
|
singleChannelRequests: 0,
|
|
4959
4953
|
lastPrefetchTime: null,
|
|
4960
4954
|
averageResponseTime: 0
|
|
4961
|
-
}), ae = ref(null), qe = ref(null), Te = ref(null), we = ref(0), ge = computed(() => E.value * u.cWidth), ye = computed(() =>
|
|
4955
|
+
}), ae = ref(null), qe = ref(null), Te = ref(null), we = ref(0), ge = computed(() => E.value * u.cWidth), ye = computed(() => w(u.cHeight, E.value, 0)), de = computed(() => u.cHeight - 20), Ae = computed(() => ({
|
|
4962
4956
|
width: u.cWidth + "px",
|
|
4963
4957
|
height: de.value + "px"
|
|
4964
4958
|
})), ue = reactive({
|
|
@@ -4976,35 +4970,35 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
4976
4970
|
const _e = () => {
|
|
4977
4971
|
var T;
|
|
4978
4972
|
try {
|
|
4979
|
-
if (!
|
|
4973
|
+
if (!L.value) {
|
|
4980
4974
|
console.log("⏳ Render skipped - channels not ready");
|
|
4981
4975
|
return;
|
|
4982
4976
|
}
|
|
4983
4977
|
ue.nrVisibleChannels = ((T = t.value) == null ? void 0 : T.reduce((Z, G) => G.visible ? Z + 1 : Z, 0)) || 0;
|
|
4984
|
-
let
|
|
4985
|
-
if (
|
|
4986
|
-
const H = Z.blocks || [], Q = H.reduce((
|
|
4987
|
-
H.length > 0 && (Y++,
|
|
4978
|
+
let U = 0, Y = 0;
|
|
4979
|
+
if (F.channels.forEach((Z, G) => {
|
|
4980
|
+
const H = Z.blocks || [], Q = H.reduce((te, ee) => te + (ee.nrPoints || 0), 0);
|
|
4981
|
+
H.length > 0 && (Y++, U += H.length);
|
|
4988
4982
|
}), Y === 0)
|
|
4989
4983
|
return;
|
|
4990
4984
|
N(
|
|
4991
|
-
|
|
4985
|
+
F,
|
|
4992
4986
|
t.value || [],
|
|
4993
4987
|
u.constants,
|
|
4994
4988
|
ue,
|
|
4995
4989
|
u.globalZoomMult,
|
|
4996
4990
|
E.value
|
|
4997
4991
|
);
|
|
4998
|
-
} catch (
|
|
4999
|
-
console.error("💥 ERROR in renderDataInternal:",
|
|
4992
|
+
} catch (U) {
|
|
4993
|
+
console.error("💥 ERROR in renderDataInternal:", U), console.error("💥 Stack trace:", U.stack);
|
|
5000
4994
|
}
|
|
5001
4995
|
}, Ee = ref(), xe = () => {
|
|
5002
4996
|
Ee.value = setInterval(() => {
|
|
5003
4997
|
var Y, Z;
|
|
5004
|
-
if (!
|
|
4998
|
+
if (!L.value) return;
|
|
5005
4999
|
const T = {
|
|
5006
5000
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5007
|
-
requestedPagesSize:
|
|
5001
|
+
requestedPagesSize: _.value.size,
|
|
5008
5002
|
isPrefetching: se.value,
|
|
5009
5003
|
pendingAsyncRequests: ne.value.length,
|
|
5010
5004
|
pendingPreRequests: fe.value.length,
|
|
@@ -5012,18 +5006,18 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5012
5006
|
channelCount: ((Y = t.value) == null ? void 0 : Y.length) || 0,
|
|
5013
5007
|
visibleChannelCount: ((Z = t.value) == null ? void 0 : Z.filter((G) => G.visible).length) || 0,
|
|
5014
5008
|
connectionStatus: l.value,
|
|
5015
|
-
requestedPages: Array.from(
|
|
5009
|
+
requestedPages: Array.from(_.value.entries()).map(([G, H]) => {
|
|
5016
5010
|
var Q;
|
|
5017
5011
|
return {
|
|
5018
5012
|
pageStart: G,
|
|
5019
5013
|
channelCount: H.count,
|
|
5020
5014
|
inViewport: H.inViewport,
|
|
5021
5015
|
age: Date.now() - H.ts,
|
|
5022
|
-
channels: ((Q = H.channels) == null ? void 0 : Q.map((
|
|
5016
|
+
channels: ((Q = H.channels) == null ? void 0 : Q.map((te) => te.id)) || Array.from(H.counter.keys())
|
|
5023
5017
|
};
|
|
5024
5018
|
})
|
|
5025
|
-
},
|
|
5026
|
-
|
|
5019
|
+
}, U = T.requestedPages.filter((G) => G.age > 1e4);
|
|
5020
|
+
U.length > 0 && console.warn("⚠️ Detected stuck requests:", U), T.pendingPreRequests > 0 && !T.isPrefetching && console.warn("⚠️ Prefetch is blocked with pending requests:", {
|
|
5027
5021
|
pendingPreRequests: T.pendingPreRequests,
|
|
5028
5022
|
requestedPagesSize: T.requestedPagesSize
|
|
5029
5023
|
});
|
|
@@ -5031,34 +5025,34 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5031
5025
|
}, Ce = async () => {
|
|
5032
5026
|
if (!t.value)
|
|
5033
5027
|
return;
|
|
5034
|
-
const T = A.value.filter((
|
|
5035
|
-
const
|
|
5036
|
-
(re) => re.id ===
|
|
5028
|
+
const T = A.value.filter((ee) => {
|
|
5029
|
+
const ve = t.value.find(
|
|
5030
|
+
(re) => re.id === ee.id
|
|
5037
5031
|
// Direct id comparison (both are unique)
|
|
5038
5032
|
);
|
|
5039
|
-
return
|
|
5040
|
-
}),
|
|
5033
|
+
return ve && ve.visible;
|
|
5034
|
+
}), U = ke.value, Y = me(
|
|
5041
5035
|
T,
|
|
5042
5036
|
u.start,
|
|
5043
5037
|
u.duration,
|
|
5044
|
-
|
|
5045
|
-
|
|
5038
|
+
F,
|
|
5039
|
+
_.value,
|
|
5046
5040
|
u.constants,
|
|
5047
|
-
|
|
5041
|
+
U,
|
|
5048
5042
|
u.ts_end,
|
|
5049
5043
|
K,
|
|
5050
5044
|
Se
|
|
5051
|
-
), Z = Math.ceil(
|
|
5045
|
+
), Z = Math.ceil(U);
|
|
5052
5046
|
let G = !1, H = "";
|
|
5053
5047
|
if (ae.value !== null && Z !== ae.value && (G = !0, H = `rsPeriod changed: ${ae.value} → ${Z} (resolution change)`), qe.value !== null) {
|
|
5054
|
-
const
|
|
5055
|
-
|
|
5048
|
+
const ee = Math.abs(u.start - qe.value), ve = Math.max(u.duration, Te.value || u.duration);
|
|
5049
|
+
ee > ve * 2 && (G = !0, H = `Large time jump: ${ee} > ${ve * 2} (${(ee / ve).toFixed(1)}x window)`);
|
|
5056
5050
|
}
|
|
5057
5051
|
const Q = 15;
|
|
5058
|
-
if (
|
|
5052
|
+
if (_.value.size > Q && (G = !0, H = `Too many pending requests: ${_.value.size} > ${Q}`), we.value >= 5 && (G = !0, H = `High stale data rate: ${we.value} consecutive stale segments`), G && !x.value) {
|
|
5059
5053
|
x.value = !0, console.log("🚨 Dumping server buffer before new requests:", H);
|
|
5060
5054
|
try {
|
|
5061
|
-
R() && (
|
|
5055
|
+
R() && (_.value.clear(), be(), we.value = 0, await new Promise((ee) => setTimeout(ee, 50)));
|
|
5062
5056
|
} finally {
|
|
5063
5057
|
x.value = !1;
|
|
5064
5058
|
}
|
|
@@ -5067,94 +5061,94 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5067
5061
|
return;
|
|
5068
5062
|
}
|
|
5069
5063
|
ae.value = Z, qe.value = u.start, Te.value = u.duration;
|
|
5070
|
-
const
|
|
5064
|
+
const te = await useToken();
|
|
5071
5065
|
Y.asyncRequests.length > 0 && oe(
|
|
5072
5066
|
Y.asyncRequests,
|
|
5073
5067
|
0,
|
|
5074
5068
|
s.value,
|
|
5075
|
-
|
|
5069
|
+
te,
|
|
5076
5070
|
i.value,
|
|
5077
|
-
|
|
5078
|
-
|
|
5071
|
+
U,
|
|
5072
|
+
_.value,
|
|
5079
5073
|
u.ts_end
|
|
5080
|
-
), Y.asyncPreRequests.length > 0 &&
|
|
5074
|
+
), Y.asyncPreRequests.length > 0 && he();
|
|
5081
5075
|
}, ie = () => {
|
|
5082
5076
|
Ce(), _e();
|
|
5083
5077
|
}, P = () => {
|
|
5084
|
-
Ce(),
|
|
5078
|
+
Ce(), D.value === 0 ? (D.value--, C()) : _e();
|
|
5085
5079
|
}, C = () => {
|
|
5086
5080
|
const T = V(u.cHeight);
|
|
5087
5081
|
T && !isNaN(T) && o("setGlobalZoom", T), _e();
|
|
5088
5082
|
}, p = createThrottle(P, 250, { leading: !1 }), S = createThrottle(() => ie(), 50);
|
|
5089
|
-
watch(() => u.rsPeriod, (T,
|
|
5090
|
-
T > 0 && X(T),
|
|
5091
|
-
}), watch(() => u.duration, (T,
|
|
5092
|
-
|
|
5083
|
+
watch(() => u.rsPeriod, (T, U) => {
|
|
5084
|
+
T > 0 && X(T), z(), _.value.clear();
|
|
5085
|
+
}), watch(() => u.duration, (T, U) => {
|
|
5086
|
+
z();
|
|
5093
5087
|
}), watch(() => n.value, (T) => {
|
|
5094
5088
|
if (s.value && s.value.readyState === 1) {
|
|
5095
|
-
console.log("🔄 Montage changing to:", T),
|
|
5096
|
-
const
|
|
5097
|
-
console.log("📡 Sending montage payload:",
|
|
5089
|
+
console.log("🔄 Montage changing to:", T), _.value.clear(), be(), z(), we.value = 0, ae.value = null, qe.value = null, Te.value = null, L.value = !1;
|
|
5090
|
+
const U = pe(T);
|
|
5091
|
+
console.log("📡 Sending montage payload:", U), U && h(U);
|
|
5098
5092
|
}
|
|
5099
5093
|
}), watch(() => [u.start, u.duration, u.cWidth, u.cHeight, u.rsPeriod], () => {
|
|
5100
5094
|
ue.start = u.start, ue.duration = u.duration, ue.cWidth = u.cWidth, ue.cHeight = u.cHeight, ue.pHeight = de.value, ue.rsPeriod = u.rsPeriod;
|
|
5101
5095
|
}), O((T) => {
|
|
5102
|
-
T.pageStart >= u.start + u.duration && (Oe.value.totalRequests++, n.value !== "NOT_MONTAGED" ? Oe.value.montageRequests++ : Oe.value.singleChannelRequests++),
|
|
5103
|
-
}),
|
|
5096
|
+
T.pageStart >= u.start + u.duration && (Oe.value.totalRequests++, n.value !== "NOT_MONTAGED" ? Oe.value.montageRequests++ : Oe.value.singleChannelRequests++), J(T), T.pageStart < u.start + u.duration && p();
|
|
5097
|
+
}), b((T) => {
|
|
5104
5098
|
if (!j(T.data)) {
|
|
5105
5099
|
we.value++;
|
|
5106
5100
|
return;
|
|
5107
5101
|
}
|
|
5108
|
-
we.value = 0,
|
|
5102
|
+
we.value = 0, J(T), T.pageStart < u.start + u.duration && p();
|
|
5109
5103
|
}), k((T) => {
|
|
5110
|
-
const
|
|
5111
|
-
|
|
5112
|
-
|
|
5104
|
+
const U = Re(T);
|
|
5105
|
+
B(U, r, Se).then(() => {
|
|
5106
|
+
z(), ie(), o("channelsInitialized");
|
|
5113
5107
|
});
|
|
5114
5108
|
}), I((T) => {
|
|
5115
5109
|
r.setViewerErrors(T);
|
|
5116
5110
|
});
|
|
5117
5111
|
const q = async () => {
|
|
5118
|
-
var Y, Z, G
|
|
5112
|
+
var Y, Z, G;
|
|
5119
5113
|
const T = ke.value;
|
|
5120
5114
|
X(T), y(() => {
|
|
5121
|
-
var
|
|
5122
|
-
if ((
|
|
5123
|
-
const
|
|
5124
|
-
m(
|
|
5115
|
+
var H;
|
|
5116
|
+
if ((H = t.value) != null && H.length) {
|
|
5117
|
+
const te = { channelFiltersToClear: t.value.map((ee) => ee.id) };
|
|
5118
|
+
m(te);
|
|
5125
5119
|
}
|
|
5126
5120
|
});
|
|
5127
|
-
const
|
|
5121
|
+
const U = await useToken();
|
|
5128
5122
|
if (le(
|
|
5129
|
-
(
|
|
5130
|
-
const
|
|
5123
|
+
(H) => {
|
|
5124
|
+
const Q = ke.value;
|
|
5131
5125
|
return oe(
|
|
5132
|
-
|
|
5126
|
+
H,
|
|
5133
5127
|
0,
|
|
5134
5128
|
s.value,
|
|
5135
|
-
|
|
5129
|
+
U,
|
|
5136
5130
|
i.value,
|
|
5137
|
-
|
|
5138
|
-
|
|
5131
|
+
Q,
|
|
5132
|
+
_.value,
|
|
5139
5133
|
u.ts_end
|
|
5140
5134
|
);
|
|
5141
5135
|
},
|
|
5142
|
-
|
|
5143
|
-
), (
|
|
5136
|
+
_
|
|
5137
|
+
), (Y = i.value) != null && Y.content.id)
|
|
5144
5138
|
try {
|
|
5145
5139
|
console.log("🔄 Opening WebSocket connection for package:", i.value.content.id), await a(
|
|
5146
|
-
r.config.
|
|
5140
|
+
r.config.timeSeriesPublicUrl,
|
|
5147
5141
|
i.value.content.id,
|
|
5148
|
-
|
|
5142
|
+
U
|
|
5149
5143
|
), console.log("✅ WebSocket connection established"), xe();
|
|
5150
|
-
} catch (
|
|
5151
|
-
console.error("❌ Failed to establish WebSocket connection:",
|
|
5144
|
+
} catch (H) {
|
|
5145
|
+
console.error("❌ Failed to establish WebSocket connection:", H);
|
|
5152
5146
|
return;
|
|
5153
5147
|
}
|
|
5154
5148
|
console.log("🚀 TSPlotCanvas mounted with config:", {
|
|
5155
|
-
activeViewerId: (
|
|
5149
|
+
activeViewerId: (Z = i.value) == null ? void 0 : Z.content.id,
|
|
5156
5150
|
initialMontage: n.value,
|
|
5157
|
-
baseChannelCount: ((
|
|
5151
|
+
baseChannelCount: ((G = e.value) == null ? void 0 : G.length) || 0,
|
|
5158
5152
|
viewport: {
|
|
5159
5153
|
start: u.start,
|
|
5160
5154
|
duration: u.duration,
|
|
@@ -5167,19 +5161,19 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5167
5161
|
return onMounted(async () => {
|
|
5168
5162
|
E.value = 1, W(E.value), q();
|
|
5169
5163
|
}), onUnmounted(() => {
|
|
5170
|
-
clearInterval(Ee.value),
|
|
5164
|
+
clearInterval(Ee.value), _.value.size > 0 && R(), r.resetViewer(), be(), g(), p.cancel && p.cancel(), S.cancel && S.cancel();
|
|
5171
5165
|
}), c({
|
|
5172
5166
|
renderAll: ie,
|
|
5173
|
-
invalidate:
|
|
5167
|
+
invalidate: z,
|
|
5174
5168
|
throttledDataRender: S,
|
|
5175
5169
|
sendFilterMessage: m,
|
|
5176
|
-
viewData:
|
|
5177
|
-
requestedPages:
|
|
5170
|
+
viewData: F,
|
|
5171
|
+
requestedPages: _,
|
|
5178
5172
|
chData: A,
|
|
5179
5173
|
viewerChannels: t,
|
|
5180
5174
|
currentRequestedSamplePeriod: ce,
|
|
5181
5175
|
initPlotCanvas: q
|
|
5182
|
-
}), (T,
|
|
5176
|
+
}), (T, U) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
5183
5177
|
createElementVNode("canvas", {
|
|
5184
5178
|
ref_key: "blurCanvasRef",
|
|
5185
5179
|
ref: $,
|
|
@@ -5192,7 +5186,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5192
5186
|
renderSlot(T.$slots, "annCanvas", {}, void 0, !0),
|
|
5193
5187
|
createElementVNode("canvas", {
|
|
5194
5188
|
ref_key: "plotCanvasRef",
|
|
5195
|
-
ref:
|
|
5189
|
+
ref: M,
|
|
5196
5190
|
class: "canvas",
|
|
5197
5191
|
width: ge.value,
|
|
5198
5192
|
height: ye.value,
|
|
@@ -5200,7 +5194,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5200
5194
|
}, null, 12, _hoisted_3$1)
|
|
5201
5195
|
]));
|
|
5202
5196
|
}
|
|
5203
|
-
}, TSPlotCanvas = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
5197
|
+
}, TSPlotCanvas = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-109a56ec"]]), _hoisted_1 = { class: "timeseries-viewer-canvas" }, _hoisted_2 = { id: "canvasWrapper" }, _hoisted_3 = ["width", "height"], _hoisted_4 = ["width", "height"], _hoisted_5 = ["width", "height"], _hoisted_6 = ["width", "height"], _sfc_main = {
|
|
5204
5198
|
__name: "TSViewerCanvas",
|
|
5205
5199
|
props: {
|
|
5206
5200
|
windowHeight: Number,
|
|
@@ -5228,12 +5222,12 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5228
5222
|
],
|
|
5229
5223
|
setup(f, { expose: c, emit: v }) {
|
|
5230
5224
|
const u = defineAsyncComponent(
|
|
5231
|
-
() => import("./TSAnnotationCanvas-
|
|
5225
|
+
() => import("./TSAnnotationCanvas-HQV-UW-j.mjs")
|
|
5232
5226
|
), o = f, i = v, e = useViewerStore(), { viewerChannels: r, viewerAnnotations: t, viewerActiveTool: n, viewerSelectedChannels: d } = storeToRefs(e), s = ref(null), l = ref(null), a = ref(null), h = ref(null), m = ref(null), R = ref(null);
|
|
5233
5227
|
reactive({});
|
|
5234
|
-
const g = ref(0), y = ref(0), O = ref(0),
|
|
5228
|
+
const g = ref(0), y = ref(0), O = ref(0), b = ref(1), k = ref(!1), I = ref(!1), M = ref("pointer");
|
|
5235
5229
|
ref(!1);
|
|
5236
|
-
const $ = reactive({ x: 0, y: 0 }), W = ref(0), N = ref(["Event", "Artifact", "Seizure", "Mark", "Stim On", "Stim Off", "Start", "Stop"]),
|
|
5230
|
+
const $ = reactive({ x: 0, y: 0 }), W = ref(0), N = ref(["Event", "Artifact", "Seizure", "Mark", "Stim On", "Stim Off", "Start", "Stop"]), w = ref(0), E = ref(null), x = ref(0), A = ref(!0), _ = () => {
|
|
5237
5231
|
if (t.value.length > 0) {
|
|
5238
5232
|
if (!t.value.some((S) => S.selected)) {
|
|
5239
5233
|
console.log("No layer selected, selecting first layer:", t.value[0]);
|
|
@@ -5242,14 +5236,14 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5242
5236
|
}
|
|
5243
5237
|
} else
|
|
5244
5238
|
console.warn("No annotation layers available - waiting for layers to load"), setTimeout(() => {
|
|
5245
|
-
t.value.length > 0 &&
|
|
5239
|
+
t.value.length > 0 && _();
|
|
5246
5240
|
}, 500);
|
|
5247
|
-
},
|
|
5241
|
+
}, F = (p) => {
|
|
5248
5242
|
if (console.log("TSViewerCanvas: setActiveTool called with:", p), p) {
|
|
5249
|
-
const S = "set" + p.charAt(0).toUpperCase() + p.slice(1), q =
|
|
5243
|
+
const S = "set" + p.charAt(0).toUpperCase() + p.slice(1), q = L[S];
|
|
5250
5244
|
typeof q == "function" && q();
|
|
5251
5245
|
}
|
|
5252
|
-
},
|
|
5246
|
+
}, L = {
|
|
5253
5247
|
setPan: () => {
|
|
5254
5248
|
console.log("Pan tool activated");
|
|
5255
5249
|
},
|
|
@@ -5257,18 +5251,18 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5257
5251
|
console.log("Pointer tool activated");
|
|
5258
5252
|
},
|
|
5259
5253
|
setAnnotate: () => {
|
|
5260
|
-
console.log("Annotate tool activated"),
|
|
5254
|
+
console.log("Annotate tool activated"), _();
|
|
5261
5255
|
}
|
|
5262
|
-
},
|
|
5256
|
+
}, D = computed(() => r.value.filter((p) => p.visible).length), B = computed(() => o.cHeight - 20), J = computed(() => o.cWidth + o.constants.CURSOROFFSET);
|
|
5263
5257
|
computed(() => l.value);
|
|
5264
|
-
const
|
|
5258
|
+
const z = computed(() => ({
|
|
5265
5259
|
width: o.cWidth + "px",
|
|
5266
5260
|
height: o.cHeight + "px"
|
|
5267
5261
|
})), V = computed(() => ({
|
|
5268
5262
|
width: o.cWidth + "px",
|
|
5269
|
-
height:
|
|
5263
|
+
height: B.value + "px"
|
|
5270
5264
|
})), K = computed(() => ({
|
|
5271
|
-
width:
|
|
5265
|
+
width: J.value + "px",
|
|
5272
5266
|
height: o.cHeight + "px"
|
|
5273
5267
|
}));
|
|
5274
5268
|
watch(() => o.cHeight, () => {
|
|
@@ -5286,14 +5280,14 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5286
5280
|
(p = s.value) == null || p.throttledDataRender();
|
|
5287
5281
|
});
|
|
5288
5282
|
}), watch(n, (p) => {
|
|
5289
|
-
p && (
|
|
5283
|
+
p && (F(p), !k.value && !["annResize-left", "annResize-right", "annSelect"].includes(M.value) && (M.value = p));
|
|
5290
5284
|
}, { immediate: !0 }), watch(t, (p) => {
|
|
5291
|
-
p.length > 0 && n.value === "annotate" &&
|
|
5292
|
-
}, { immediate: !0 }), watch(
|
|
5293
|
-
console.log(
|
|
5285
|
+
p.length > 0 && n.value === "annotate" && _();
|
|
5286
|
+
}, { immediate: !0 }), watch(M, () => {
|
|
5287
|
+
console.log(M);
|
|
5294
5288
|
const p = R.value;
|
|
5295
5289
|
if (p) {
|
|
5296
|
-
switch (p.removeAttribute("col_resize"), p.removeAttribute("active"), p.removeAttribute("point"),
|
|
5290
|
+
switch (p.removeAttribute("col_resize"), p.removeAttribute("active"), p.removeAttribute("point"), M.value) {
|
|
5297
5291
|
case "cursor_hover":
|
|
5298
5292
|
p.removeAttribute("point"), p.setAttribute("cursor_hover", !0);
|
|
5299
5293
|
break;
|
|
@@ -5341,26 +5335,26 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5341
5335
|
}, le = () => {
|
|
5342
5336
|
ye(100);
|
|
5343
5337
|
}, me = () => {
|
|
5344
|
-
console.log("Annotation layers initialized, ensuring active layer for annotate tool"), n.value === "annotate" &&
|
|
5338
|
+
console.log("Annotation layers initialized, ensuring active layer for annotate tool"), n.value === "annotate" && _(), i("annLayersInitialized");
|
|
5345
5339
|
}, oe = (p) => {
|
|
5346
5340
|
i("setGlobalZoom", p);
|
|
5347
|
-
},
|
|
5341
|
+
}, he = () => {
|
|
5348
5342
|
i("channelsInitialized");
|
|
5349
5343
|
}, be = (p) => {
|
|
5350
5344
|
p.stopPropagation(), p.preventDefault(), p.shiftKey ? Math.abs(p.deltaY) > Math.abs(p.deltaX) && (p.deltaY > 0 ? i("setDuration", o.duration * 1.1) : i("setDuration", o.duration / 1.1)) : Math.abs(p.deltaY) > Math.abs(p.deltaX) && (p.deltaY > 0 ? i("setGlobalZoom", o.globalZoomMult * 1.2) : i("setGlobalZoom", o.globalZoomMult / 1.2));
|
|
5351
5345
|
}, Se = (p) => {
|
|
5352
5346
|
var S, q;
|
|
5353
|
-
switch (console.log("TSViewerCanvas: _onMouseUp called with pointerMode:",
|
|
5347
|
+
switch (console.log("TSViewerCanvas: _onMouseUp called with pointerMode:", M.value, "viewerActiveTool:", n.value), I.value = !1, k.value = !1, M.value) {
|
|
5354
5348
|
case "pointer":
|
|
5355
5349
|
Re();
|
|
5356
|
-
const T = p.metaKey,
|
|
5350
|
+
const T = p.metaKey, U = p.clientY - R.value.getBoundingClientRect().top, Y = $.y - R.value.getBoundingClientRect().top, Z = r.value.map((re) => (T === !1 && (re.selected = !1), (re.rowBaseline > Y && re.rowBaseline < U || re.rowBaseline < Y && re.rowBaseline > U) && (re.selected = !0), re));
|
|
5357
5351
|
e.setChannels(Z), ye();
|
|
5358
5352
|
break;
|
|
5359
5353
|
case "annSelect":
|
|
5360
5354
|
Re(), (S = m.value) == null || S.selectFocusedAnn();
|
|
5361
5355
|
break;
|
|
5362
5356
|
case "annotate":
|
|
5363
|
-
|
|
5357
|
+
_();
|
|
5364
5358
|
let G = null, H = null;
|
|
5365
5359
|
for (let re = 0; re < t.value.length; re++)
|
|
5366
5360
|
if (t.value[re].selected) {
|
|
@@ -5378,35 +5372,35 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5378
5372
|
console.error("No layers available with valid IDs");
|
|
5379
5373
|
return;
|
|
5380
5374
|
}
|
|
5381
|
-
const Q = d,
|
|
5375
|
+
const Q = d, te = Q.length === r.value.length || Q.length === 0, ee = (p.clientX - $.x) * g.value, ve = W.value + ($.x - R.value.getBoundingClientRect().left) * g.value;
|
|
5382
5376
|
if (console.log("Creating annotation with:", {
|
|
5383
|
-
startTime:
|
|
5384
|
-
duration:
|
|
5385
|
-
allChannels:
|
|
5377
|
+
startTime: ve,
|
|
5378
|
+
duration: ee,
|
|
5379
|
+
allChannels: te,
|
|
5386
5380
|
selectedChannels: Q.length,
|
|
5387
5381
|
layer: H.name,
|
|
5388
5382
|
layerId: H.id,
|
|
5389
5383
|
// FIX: Log the layer ID
|
|
5390
|
-
pointerMode:
|
|
5391
|
-
}), Math.abs(
|
|
5384
|
+
pointerMode: M.value
|
|
5385
|
+
}), Math.abs(ee) > 1e3) {
|
|
5392
5386
|
const re = {
|
|
5393
5387
|
name: "",
|
|
5394
5388
|
id: null,
|
|
5395
|
-
label: N.value[
|
|
5389
|
+
label: N.value[w.value],
|
|
5396
5390
|
description: "",
|
|
5397
|
-
start:
|
|
5398
|
-
duration:
|
|
5399
|
-
end:
|
|
5391
|
+
start: ve,
|
|
5392
|
+
duration: ee,
|
|
5393
|
+
end: ve + ee,
|
|
5400
5394
|
cStart: null,
|
|
5401
5395
|
cEnd: null,
|
|
5402
5396
|
selected: !0,
|
|
5403
5397
|
channelIds: Q,
|
|
5404
|
-
allChannels:
|
|
5398
|
+
allChannels: te,
|
|
5405
5399
|
layer_id: H.id,
|
|
5406
5400
|
// FIX: Use the validated layer ID
|
|
5407
5401
|
userId: null
|
|
5408
5402
|
};
|
|
5409
|
-
console.log("📍 STEP 1 - TSViewerCanvas created:", re), e.setActiveAnnotation(re), console.log("📍 STEP 1 - Store now has:", e.activeAnnotation), i("addAnnotation",
|
|
5403
|
+
console.log("📍 STEP 1 - TSViewerCanvas created:", re), e.setActiveAnnotation(re), console.log("📍 STEP 1 - Store now has:", e.activeAnnotation), i("addAnnotation", ve, ee, te, re.label, re.description, H);
|
|
5410
5404
|
break;
|
|
5411
5405
|
} else
|
|
5412
5406
|
console.log("Annotation duration too small, not creating annotation");
|
|
@@ -5418,11 +5412,11 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5418
5412
|
}
|
|
5419
5413
|
}, Re = () => {
|
|
5420
5414
|
R.value.getContext("2d").clearRect(0, 0, o.cWidth, o.cHeight);
|
|
5421
|
-
},
|
|
5415
|
+
}, pe = (p) => {
|
|
5422
5416
|
var q;
|
|
5423
|
-
console.log("TSViewerCanvas: _onMouseDown called with pointerMode:",
|
|
5417
|
+
console.log("TSViewerCanvas: _onMouseDown called with pointerMode:", M.value, "viewerActiveTool:", n.value), k.value = !0, W.value = o.start;
|
|
5424
5418
|
const S = R.value.getBoundingClientRect();
|
|
5425
|
-
switch ($.x = p.clientX, $.y = p.clientY, n.value === "annotate" && !["annResize-left", "annResize-right", "annSelect"].includes(
|
|
5419
|
+
switch ($.x = p.clientX, $.y = p.clientY, n.value === "annotate" && !["annResize-left", "annResize-right", "annSelect"].includes(M.value) && (console.log("Setting pointerMode to annotate for annotation creation"), M.value = "annotate"), M.value) {
|
|
5426
5420
|
case "annResize-left":
|
|
5427
5421
|
case "annResize-right":
|
|
5428
5422
|
I.value = !0, (q = m.value) == null || q.onMouseDown(p.clientX - S.left, p.clientY - S.top);
|
|
@@ -5433,7 +5427,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5433
5427
|
}, ae = (p) => {
|
|
5434
5428
|
p.buttons === 1 ? k.value = !0 : k.value = !1;
|
|
5435
5429
|
}, qe = (p) => {
|
|
5436
|
-
var
|
|
5430
|
+
var U, Y, Z, G;
|
|
5437
5431
|
p.preventDefault(), p.stopPropagation();
|
|
5438
5432
|
const S = R.value.getBoundingClientRect(), q = p.clientY - S.top, T = p.clientX - S.left;
|
|
5439
5433
|
switch (n.value) {
|
|
@@ -5442,27 +5436,27 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5442
5436
|
const H = W.value - (p.clientX - $.x) * g.value;
|
|
5443
5437
|
i("setStart", H);
|
|
5444
5438
|
} else {
|
|
5445
|
-
const H = (
|
|
5446
|
-
|
|
5439
|
+
const H = (U = m.value) == null ? void 0 : U.onMouseMove(T, q, M.value, k.value);
|
|
5440
|
+
M.value = H || "pan";
|
|
5447
5441
|
}
|
|
5448
5442
|
break;
|
|
5449
5443
|
case "pointer":
|
|
5450
5444
|
if (k.value)
|
|
5451
5445
|
_e(p.clientX, p.clientY);
|
|
5452
5446
|
else {
|
|
5453
|
-
const H = (Y = m.value) == null ? void 0 : Y.onMouseMove(T, q,
|
|
5454
|
-
|
|
5447
|
+
const H = (Y = m.value) == null ? void 0 : Y.onMouseMove(T, q, M.value, k.value);
|
|
5448
|
+
M.value = H || "pointer";
|
|
5455
5449
|
}
|
|
5456
5450
|
break;
|
|
5457
5451
|
case "annotate":
|
|
5458
|
-
if (k.value &&
|
|
5452
|
+
if (k.value && M.value === "annotate")
|
|
5459
5453
|
xe(p.clientX);
|
|
5460
|
-
else if (k.value && ["annResize-left", "annResize-right"].includes(
|
|
5461
|
-
const H = (Z = m.value) == null ? void 0 : Z.onMouseMove(T, q,
|
|
5462
|
-
|
|
5454
|
+
else if (k.value && ["annResize-left", "annResize-right"].includes(M.value)) {
|
|
5455
|
+
const H = (Z = m.value) == null ? void 0 : Z.onMouseMove(T, q, M.value, k.value);
|
|
5456
|
+
M.value = H || M.value, ye();
|
|
5463
5457
|
} else {
|
|
5464
|
-
const H = (G = m.value) == null ? void 0 : G.onMouseMove(T, q,
|
|
5465
|
-
H ? (console.log("TSViewerCanvas: annCanvas.onMouseMove returned:", H),
|
|
5458
|
+
const H = (G = m.value) == null ? void 0 : G.onMouseMove(T, q, M.value, k.value);
|
|
5459
|
+
H ? (console.log("TSViewerCanvas: annCanvas.onMouseMove returned:", H), M.value = H) : M.value = "annotate";
|
|
5466
5460
|
}
|
|
5467
5461
|
break;
|
|
5468
5462
|
}
|
|
@@ -5474,15 +5468,15 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5474
5468
|
}, ge = (p, S, q) => S * (p + q), ye = (p = 0, S = !0) => {
|
|
5475
5469
|
(!E.value || p !== x.value || A.value !== S) && (E.value = de(ue, p, { leading: S }), x.value = p, A.value = S), E.value();
|
|
5476
5470
|
}, de = (p, S, q = {}) => {
|
|
5477
|
-
let T,
|
|
5471
|
+
let T, U, Y, Z = null, G = 0;
|
|
5478
5472
|
const H = function() {
|
|
5479
|
-
G = q.leading === !1 ? 0 : Date.now(), Z = null, Y = p.apply(T,
|
|
5473
|
+
G = q.leading === !1 ? 0 : Date.now(), Z = null, Y = p.apply(T, U), Z || (T = U = null);
|
|
5480
5474
|
};
|
|
5481
5475
|
return function() {
|
|
5482
5476
|
const Q = Date.now();
|
|
5483
5477
|
!G && q.leading === !1 && (G = Q);
|
|
5484
|
-
const
|
|
5485
|
-
return T = this,
|
|
5478
|
+
const te = S - (Q - G);
|
|
5479
|
+
return T = this, U = arguments, te <= 0 || te > S ? (Z && (clearTimeout(Z), Z = null), G = Q, Y = p.apply(T, U), Z || (T = U = null)) : !Z && q.trailing !== !1 && (Z = setTimeout(H, te)), Y;
|
|
5486
5480
|
};
|
|
5487
5481
|
}, Ae = () => {
|
|
5488
5482
|
var p;
|
|
@@ -5494,37 +5488,37 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5494
5488
|
});
|
|
5495
5489
|
}, ke = () => {
|
|
5496
5490
|
const S = l.value.getContext("2d");
|
|
5497
|
-
S.setTransform(
|
|
5498
|
-
let q =
|
|
5491
|
+
S.setTransform(b.value, 0, 0, b.value, 0, 0), S.clearRect(0, 0, o.cWidth, o.cHeight), S.stroke(), S.beginPath(), S.lineWidth = 1, S.moveTo(o.constants.XOFFSET + 0.5, 0.5), S.lineTo(o.constants.XOFFSET + 0.5, B.value + 0.5), S.lineTo(o.cWidth + 0.5, B.value + 0.5), S.stroke();
|
|
5492
|
+
let q = B.value / (2 * D.value) + 0.5 << 1 >> 1;
|
|
5499
5493
|
S.lineWidth = 0.5;
|
|
5500
|
-
for (let G = 0; G <
|
|
5501
|
-
S.beginPath(), S.moveTo(o.constants.XOFFSET - 2, q), S.lineTo(o.constants.XOFFSET + 2, q), S.stroke(), q +=
|
|
5502
|
-
const T = o.constants.XGRIDSPACING * Math.ceil(o.duration / 1e8),
|
|
5503
|
-
for (let G = 0; G <
|
|
5494
|
+
for (let G = 0; G < D.value; G++)
|
|
5495
|
+
S.beginPath(), S.moveTo(o.constants.XOFFSET - 2, q), S.lineTo(o.constants.XOFFSET + 2, q), S.stroke(), q += B.value / D.value;
|
|
5496
|
+
const T = o.constants.XGRIDSPACING * Math.ceil(o.duration / 1e8), U = Math.ceil(o.duration / T) + 1, Y = Math.ceil(o.constants.NRPXPERLABEL / (T / g.value)), Z = (T - o.start % T) % T;
|
|
5497
|
+
for (let G = 0; G < U; G++) {
|
|
5504
5498
|
let H = o.start + Z + G * T;
|
|
5505
5499
|
if (H > o.tsEnd)
|
|
5506
5500
|
break;
|
|
5507
|
-
const Q = H - o.start,
|
|
5508
|
-
if (
|
|
5509
|
-
S.beginPath(), S.lineWidth = 1, S.moveTo(
|
|
5501
|
+
const Q = H - o.start, te = o.constants.XOFFSET + Q / g.value, ee = Math.round(te);
|
|
5502
|
+
if (ee > 1 && (S.save(), S.beginPath(), S.lineWidth = 0.5, S.strokeStyle = "rgb(235,235,235)", S.moveTo(ee + 0.5, 0.5), S.lineTo(ee + 0.5, B.value - 0.5), S.stroke(), S.restore(), ((H / T + T / 10) % Y | 0) === 1 || Y === 1)) {
|
|
5503
|
+
S.beginPath(), S.lineWidth = 1, S.moveTo(ee + 0.5, B.value - 3), S.lineTo(ee + 0.5, B.value + 3), S.stroke();
|
|
5510
5504
|
const re = new Date(H / 1e3);
|
|
5511
|
-
S.font = "12px sans-serif", S.fillStyle = "rgb(150,150,150)", S.fillText(P(re),
|
|
5505
|
+
S.font = "12px sans-serif", S.fillStyle = "rgb(150,150,150)", S.fillText(P(re), ee - 20.5, o.cHeight - 0.2);
|
|
5512
5506
|
}
|
|
5513
5507
|
}
|
|
5514
5508
|
}, _e = (p, S) => {
|
|
5515
5509
|
const q = R.value, T = q.getContext("2d");
|
|
5516
|
-
T.setTransform(
|
|
5517
|
-
const
|
|
5518
|
-
T.rect(
|
|
5510
|
+
T.setTransform(b.value, 0, 0, b.value, 0, 0), T.clearRect(0, 0, o.cWidth, o.cHeight), T.beginPath(), T.lineWidth = 2, T.strokeStyle = "#295eff", T.setLineDash([5, 5, 15, 5]);
|
|
5511
|
+
const U = p - q.getBoundingClientRect().left, Y = S - q.getBoundingClientRect().top;
|
|
5512
|
+
T.rect(U, Y, -p + $.x, -S + $.y), T.stroke();
|
|
5519
5513
|
}, Ee = () => {
|
|
5520
5514
|
const S = h.value.getContext("2d");
|
|
5521
|
-
S.setTransform(
|
|
5515
|
+
S.setTransform(b.value, 0, 0, b.value, 0, 0), S.clearRect(0, 0, o.cWidth + o.constants.CURSOROFFSET, o.cHeight), S.save(), S.beginPath(), S.fillStyle = "red";
|
|
5522
5516
|
const q = o.cursorLoc * o.cWidth;
|
|
5523
|
-
q > o.constants.CURSOROFFSET ? (S.strokeStyle = "red", S.moveTo(q, 0), S.lineTo(q,
|
|
5517
|
+
q > o.constants.CURSOROFFSET ? (S.strokeStyle = "red", S.moveTo(q, 0), S.lineTo(q, B.value), S.stroke()) : S.moveTo(q, B.value), S.beginPath(), S.lineTo(q - 5, B.value + 8), S.lineTo(q + 5, B.value + 8), S.lineTo(q, B.value), S.fill(), S.restore();
|
|
5524
5518
|
}, xe = (p) => {
|
|
5525
5519
|
const S = R.value, q = S.getContext("2d");
|
|
5526
|
-
q.setTransform(
|
|
5527
|
-
const T = o.constants.ANNOTATIONLABELHEIGHT,
|
|
5520
|
+
q.setTransform(b.value, 0, 0, b.value, 0, 0);
|
|
5521
|
+
const T = o.constants.ANNOTATIONLABELHEIGHT, U = T / 2 | 0;
|
|
5528
5522
|
let Y = null;
|
|
5529
5523
|
for (let Q = 0; Q < t.value.length; Q++)
|
|
5530
5524
|
if (t.value[Q].selected) {
|
|
@@ -5536,28 +5530,28 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5536
5530
|
q.save(), q.clearRect(0, 0, o.cWidth, o.cHeight), q.lineWidth = 1;
|
|
5537
5531
|
const Z = selectedChannels.length === r.value.length || selectedChannels.length === 0, G = p - S.getBoundingClientRect().left, H = -p + $.x;
|
|
5538
5532
|
if (Z) {
|
|
5539
|
-
q.fillStyle = "rgba(0,0,0,0.1)", q.fillRect(G, 0, H,
|
|
5540
|
-
let Q = G - 1,
|
|
5541
|
-
H < 0 && (Q = G + 1,
|
|
5533
|
+
q.fillStyle = "rgba(0,0,0,0.1)", q.fillRect(G, 0, H, B.value), q.fillStyle = t.value[Y].color, q.strokeStyle = q.fillStyle;
|
|
5534
|
+
let Q = G - 1, te = H + 2;
|
|
5535
|
+
H < 0 && (Q = G + 1, te = H - 2), q.fillRect(Q, 0, te, T), q.setLineDash([5, 5, 5, 5]), q.beginPath(), q.moveTo(G, T), q.lineTo(G, B.value), q.stroke(), q.beginPath(), q.moveTo(G + H, T), q.lineTo(G + H, B.value), q.stroke();
|
|
5542
5536
|
} else {
|
|
5543
|
-
let Q = o.cHeight | 0,
|
|
5544
|
-
const
|
|
5537
|
+
let Q = o.cHeight | 0, te = 0;
|
|
5538
|
+
const ee = r.value;
|
|
5545
5539
|
q.fillStyle = t.value[Y].color, q.strokeStyle = q.fillStyle;
|
|
5546
|
-
let
|
|
5547
|
-
H < 0 && (
|
|
5548
|
-
for (let Ne = 0; Ne <
|
|
5549
|
-
const Ie =
|
|
5540
|
+
let ve = G - 1, re = H + 2;
|
|
5541
|
+
H < 0 && (ve = G + 1, re = H - 2);
|
|
5542
|
+
for (let Ne = 0; Ne < ee.length; Ne++) {
|
|
5543
|
+
const Ie = ee[Ne];
|
|
5550
5544
|
if (Ie.selected && Ie.visible) {
|
|
5551
5545
|
const Pe = Ie.rowBaseline | 0;
|
|
5552
|
-
Pe < Q && (Q = Pe), Pe >
|
|
5546
|
+
Pe < Q && (Q = Pe), Pe > te && (te = Pe), q.fillRect(ve, Pe - U, re, T);
|
|
5553
5547
|
}
|
|
5554
5548
|
}
|
|
5555
5549
|
q.fillStyle = "rgba(0,0,0,0.1)", q.setLineDash([5, 5, 5, 5]), q.fillRect(
|
|
5556
5550
|
G - 1,
|
|
5557
|
-
Q +
|
|
5551
|
+
Q + U,
|
|
5558
5552
|
H + 2,
|
|
5559
|
-
|
|
5560
|
-
), q.beginPath(), q.moveTo(G, Q +
|
|
5553
|
+
te - Q - T
|
|
5554
|
+
), q.beginPath(), q.moveTo(G, Q + U), q.lineTo(G, te - U), q.moveTo(G + H, Q + U), q.lineTo(G + H, te - U), q.stroke();
|
|
5561
5555
|
}
|
|
5562
5556
|
q.restore();
|
|
5563
5557
|
}, Ce = () => {
|
|
@@ -5567,7 +5561,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5567
5561
|
let p = R.value.getContext("2d"), S = window.devicePixelRatio || 1, q = p.webkitBackingStorePixelRatio || p.mozBackingStorePixelRatio || p.msBackingStorePixelRatio || p.oBackingStorePixelRatio || p.backingStorePixelRatio || 1;
|
|
5568
5562
|
return S / q;
|
|
5569
5563
|
}, P = (p) => ("0" + p.getUTCHours()).slice(-2) + ":" + ("0" + p.getUTCMinutes()).slice(-2) + ":" + ("0" + p.getUTCSeconds()).slice(-2), C = (p) => {
|
|
5570
|
-
var
|
|
5564
|
+
var U, Y;
|
|
5571
5565
|
let S = parseFloat(p.input0), q = parseFloat(p.input1), T = {};
|
|
5572
5566
|
switch (p.filterType) {
|
|
5573
5567
|
case "clear":
|
|
@@ -5607,7 +5601,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5607
5601
|
default:
|
|
5608
5602
|
return;
|
|
5609
5603
|
}
|
|
5610
|
-
(
|
|
5604
|
+
(U = s.value) == null || U.sendFilterMessage(T);
|
|
5611
5605
|
for (let Z = 0; Z < p.selChannels.length; Z++) {
|
|
5612
5606
|
let G = p.selChannels[Z], H = find(propEq("id", G), r.value);
|
|
5613
5607
|
p.filterType === "clear" ? H.filter = {} : H.filter = {
|
|
@@ -5620,7 +5614,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5620
5614
|
(Y = s.value) == null || Y.invalidate(), ye();
|
|
5621
5615
|
};
|
|
5622
5616
|
return onMounted(() => {
|
|
5623
|
-
|
|
5617
|
+
b.value = ie();
|
|
5624
5618
|
}), c({
|
|
5625
5619
|
rsPeriod: g,
|
|
5626
5620
|
resetFocusedAnnotation: X,
|
|
@@ -5628,7 +5622,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5628
5622
|
getNextAnnotation: j,
|
|
5629
5623
|
getPreviousAnnotation: ne,
|
|
5630
5624
|
setFilters: C,
|
|
5631
|
-
setActiveTool:
|
|
5625
|
+
setActiveTool: F,
|
|
5632
5626
|
renderAll: ye,
|
|
5633
5627
|
renderAnnotationCanvas: Ae,
|
|
5634
5628
|
initViewerCanvas: Ce
|
|
@@ -5647,7 +5641,7 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5647
5641
|
"rs-period": g.value,
|
|
5648
5642
|
"global-zoom-mult": f.globalZoomMult,
|
|
5649
5643
|
"active-viewer": f.activeViewer,
|
|
5650
|
-
onChannelsInitialized:
|
|
5644
|
+
onChannelsInitialized: he,
|
|
5651
5645
|
onSetGlobalZoom: oe
|
|
5652
5646
|
}, {
|
|
5653
5647
|
axisCanvas: withCtx(() => [
|
|
@@ -5656,9 +5650,9 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5656
5650
|
ref_key: "axisArea",
|
|
5657
5651
|
ref: l,
|
|
5658
5652
|
class: "canvas",
|
|
5659
|
-
width: ge(f.cWidth,
|
|
5660
|
-
height: ge(f.cHeight,
|
|
5661
|
-
style: normalizeStyle(
|
|
5653
|
+
width: ge(f.cWidth, b.value, 0),
|
|
5654
|
+
height: ge(f.cHeight, b.value, 0),
|
|
5655
|
+
style: normalizeStyle(z.value)
|
|
5662
5656
|
}, null, 12, _hoisted_3)
|
|
5663
5657
|
]),
|
|
5664
5658
|
annCanvas: withCtx(() => [
|
|
@@ -5667,8 +5661,8 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5667
5661
|
ref_key: "annArea",
|
|
5668
5662
|
ref: a,
|
|
5669
5663
|
class: "canvas",
|
|
5670
|
-
width: ge(f.cWidth,
|
|
5671
|
-
height: ge(
|
|
5664
|
+
width: ge(f.cWidth, b.value, 0),
|
|
5665
|
+
height: ge(B.value, b.value, 0),
|
|
5672
5666
|
style: normalizeStyle(V.value)
|
|
5673
5667
|
}, null, 12, _hoisted_4)
|
|
5674
5668
|
]),
|
|
@@ -5679,8 +5673,8 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5679
5673
|
ref_key: "cursorArea",
|
|
5680
5674
|
ref: h,
|
|
5681
5675
|
class: "canvas",
|
|
5682
|
-
width: ge(f.cWidth + 5,
|
|
5683
|
-
height: ge(f.cHeight,
|
|
5676
|
+
width: ge(f.cWidth + 5, b.value, 0),
|
|
5677
|
+
height: ge(f.cHeight, b.value, 0),
|
|
5684
5678
|
style: normalizeStyle(K.value)
|
|
5685
5679
|
}, null, 12, _hoisted_5),
|
|
5686
5680
|
createVNode(unref(u), {
|
|
@@ -5690,12 +5684,12 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5690
5684
|
"c-height": f.cHeight,
|
|
5691
5685
|
constants: f.constants,
|
|
5692
5686
|
"annotations-canvas": a.value,
|
|
5693
|
-
"pixel-ratio":
|
|
5687
|
+
"pixel-ratio": b.value,
|
|
5694
5688
|
"rs-period": g.value,
|
|
5695
5689
|
start: f.start,
|
|
5696
5690
|
duration: f.duration,
|
|
5697
5691
|
"ts-end": f.tsEnd,
|
|
5698
|
-
"pointer-mode":
|
|
5692
|
+
"pointer-mode": M.value,
|
|
5699
5693
|
"viewer-active-tool": unref(n),
|
|
5700
5694
|
"active-viewer": f.activeViewer,
|
|
5701
5695
|
onAnnLayersInitialized: me,
|
|
@@ -5708,13 +5702,13 @@ const _hoisted_1$1 = { class: "timeseries-plot-canvas" }, _hoisted_2$1 = ["width
|
|
|
5708
5702
|
ref_key: "iArea",
|
|
5709
5703
|
ref: R,
|
|
5710
5704
|
class: "canvas",
|
|
5711
|
-
width: ge(f.cWidth,
|
|
5712
|
-
height: ge(f.cHeight,
|
|
5713
|
-
style: normalizeStyle(
|
|
5705
|
+
width: ge(f.cWidth, b.value, 0),
|
|
5706
|
+
height: ge(f.cHeight, b.value, 0),
|
|
5707
|
+
style: normalizeStyle(z.value),
|
|
5714
5708
|
tabindex: "-1",
|
|
5715
5709
|
onWheel: be,
|
|
5716
5710
|
onMousemove: qe,
|
|
5717
|
-
onMousedown:
|
|
5711
|
+
onMousedown: pe,
|
|
5718
5712
|
onMouseup: Se,
|
|
5719
5713
|
onMouseout: Oe,
|
|
5720
5714
|
onMouseenter: ae
|