@pennsieve-viz/tsviewer 1.1.11 → 1.1.13
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/{BFLibraryButton-xRreF1qz.cjs → BFLibraryButton-B_TaDdTw.cjs} +1 -1
- package/dist/{BFLibraryButton-Dyws9SHi.js → BFLibraryButton-DTcYY6VD.js} +14 -14
- package/dist/{IconSelection-Cu7rNGza.cjs → IconSelection-BPTLv8Go.cjs} +1 -1
- package/dist/{IconSelection-BXkQ-HI2.js → IconSelection-BocyglLO.js} +3 -3
- package/dist/{TSAnnotationCanvas-vq4ZhQlM.js → TSAnnotationCanvas-DErBDH0Y.js} +4 -4
- package/dist/{TSAnnotationCanvas-DT1-oLwQ.cjs → TSAnnotationCanvas-DaDdtIB4.cjs} +1 -1
- package/dist/{TSAnnotationModal-BIihkWMN.js → TSAnnotationModal-B3OSl05U.js} +13 -13
- package/dist/{TSAnnotationModal-yiS6Inu7.cjs → TSAnnotationModal-DevUUWys.cjs} +1 -1
- package/dist/{TSFilterModal-Bg3Vl8ld.js → TSFilterModal-DHBpbDNp.js} +8 -8
- package/dist/{TSFilterModal-B9DK2z2R.cjs → TSFilterModal-DoqvKSUT.cjs} +1 -1
- package/dist/{TSScrubber-CRfsVW3j.cjs → TSScrubber-E03DDcMn.cjs} +1 -1
- package/dist/{TSScrubber-Dz4oujge.js → TSScrubber-hN5JY-DA.js} +3 -3
- package/dist/{TSViewerCanvas-B-uFOBba.js → TSViewerCanvas-2Jz9ZgqW.js} +1482 -1481
- package/dist/{TSViewerCanvas-5xGT95ay.cjs → TSViewerCanvas-Dc5cwQzK.cjs} +9 -9
- package/dist/{TSViewerLayerWindow-Ch0_2TBh.js → TSViewerLayerWindow-CalBmhT6.js} +6 -6
- package/dist/{TSViewerLayerWindow-yUINAqI2.cjs → TSViewerLayerWindow-PAfR31ZO.cjs} +1 -1
- package/dist/{TSViewerToolbar-WhD8V4Ex.cjs → TSViewerToolbar-C1wTQDPC.cjs} +1 -1
- package/dist/{TSViewerToolbar-BzM9uh9P.js → TSViewerToolbar-DL9XKYbV.js} +9 -9
- package/dist/{TsAnnotationDeleteDialog-CLRHSeYL.cjs → TsAnnotationDeleteDialog-Cv3z3dFh.cjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-2EHUvGW1.js → TsAnnotationDeleteDialog-DXgN07Wj.js} +5 -5
- package/dist/{base-CEBDkSsZ.cjs → base-BQSnEcNP.cjs} +1 -1
- package/dist/{base-B8HYDRlA.js → base-VCnLhxie.js} +9 -9
- package/dist/{el-input-DFAVTpkr.cjs → el-input-BDEG_6zp.cjs} +1 -1
- package/dist/{el-input-v5gK8U8C.js → el-input-Ct4WOqYx.js} +10 -10
- package/dist/{el-input-number-F_eDnZFO.cjs → el-input-number-B_bFGgma.cjs} +1 -1
- package/dist/{el-input-number-DSVzNAfT.js → el-input-number-DXBs74eH.js} +6 -6
- package/dist/{el-overlay-4ljdPakB.js → el-overlay-BMUWCEw_.js} +14 -14
- package/dist/{el-overlay-DFtIA0N9.cjs → el-overlay-D192MFpl.cjs} +1 -1
- package/dist/{index-BJOVbX31.js → index-BAtTJnp_.js} +1 -1
- package/dist/{index-qrig8S0H.js → index-BsH36ax4.js} +504 -503
- package/dist/{index-2QS1iKBu.cjs → index-TDc5sP-n.cjs} +1 -1
- package/dist/index-yiwCKzNX.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index-CQTgJYdx.cjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { reactive as Ht, ref as
|
|
2
|
-
import { defineStore as Kt, storeToRefs as
|
|
1
|
+
import { reactive as Ht, ref as m, computed as H, inject as Zt, onMounted as yt, onBeforeUnmount as gt, defineAsyncComponent as re, provide as Je, watch as Pe, nextTick as fe, createElementBlock as Re, openBlock as he, normalizeClass as Ne, createVNode as ye, createElementVNode as ge, createBlock as Ye, createCommentVNode as Ke, unref as ae, Fragment as Jt, renderList as Yt, toDisplayString as Qe, readonly as oe } from "vue";
|
|
2
|
+
import { defineStore as Kt, storeToRefs as Fe } from "pinia";
|
|
3
3
|
import { fetchAuthSession as Qt } from "aws-amplify/auth";
|
|
4
4
|
import { ElMessage as en } from "element-plus";
|
|
5
5
|
function E(t) {
|
|
6
6
|
return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function R(t) {
|
|
9
9
|
return function e(n) {
|
|
10
10
|
return arguments.length === 0 || E(n) ? e : t.apply(this, arguments);
|
|
11
11
|
};
|
|
@@ -16,13 +16,13 @@ function D(t) {
|
|
|
16
16
|
case 0:
|
|
17
17
|
return e;
|
|
18
18
|
case 1:
|
|
19
|
-
return E(n) ? e :
|
|
19
|
+
return E(n) ? e : R(function(a) {
|
|
20
20
|
return t(n, a);
|
|
21
21
|
});
|
|
22
22
|
default:
|
|
23
|
-
return E(n) && E(r) ? e : E(n) ?
|
|
23
|
+
return E(n) && E(r) ? e : E(n) ? R(function(a) {
|
|
24
24
|
return t(a, r);
|
|
25
|
-
}) : E(r) ?
|
|
25
|
+
}) : E(r) ? R(function(a) {
|
|
26
26
|
return t(n, a);
|
|
27
27
|
}) : t(n, r);
|
|
28
28
|
}
|
|
@@ -30,14 +30,14 @@ function D(t) {
|
|
|
30
30
|
}
|
|
31
31
|
function tn(t, e) {
|
|
32
32
|
t = t || [], e = e || [];
|
|
33
|
-
var n, r = t.length, a = e.length,
|
|
33
|
+
var n, r = t.length, a = e.length, s = [];
|
|
34
34
|
for (n = 0; n < r; )
|
|
35
|
-
|
|
35
|
+
s[s.length] = t[n], n += 1;
|
|
36
36
|
for (n = 0; n < a; )
|
|
37
|
-
|
|
38
|
-
return
|
|
37
|
+
s[s.length] = e[n], n += 1;
|
|
38
|
+
return s;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function We(t, e) {
|
|
41
41
|
switch (t) {
|
|
42
42
|
case 0:
|
|
43
43
|
return function() {
|
|
@@ -56,31 +56,31 @@ function xe(t, e) {
|
|
|
56
56
|
return e.apply(this, arguments);
|
|
57
57
|
};
|
|
58
58
|
case 4:
|
|
59
|
-
return function(n, r, a,
|
|
59
|
+
return function(n, r, a, s) {
|
|
60
60
|
return e.apply(this, arguments);
|
|
61
61
|
};
|
|
62
62
|
case 5:
|
|
63
|
-
return function(n, r, a,
|
|
63
|
+
return function(n, r, a, s, c) {
|
|
64
64
|
return e.apply(this, arguments);
|
|
65
65
|
};
|
|
66
66
|
case 6:
|
|
67
|
-
return function(n, r, a,
|
|
67
|
+
return function(n, r, a, s, c, A) {
|
|
68
68
|
return e.apply(this, arguments);
|
|
69
69
|
};
|
|
70
70
|
case 7:
|
|
71
|
-
return function(n, r, a,
|
|
71
|
+
return function(n, r, a, s, c, A, I) {
|
|
72
72
|
return e.apply(this, arguments);
|
|
73
73
|
};
|
|
74
74
|
case 8:
|
|
75
|
-
return function(n, r, a,
|
|
75
|
+
return function(n, r, a, s, c, A, I, h) {
|
|
76
76
|
return e.apply(this, arguments);
|
|
77
77
|
};
|
|
78
78
|
case 9:
|
|
79
|
-
return function(n, r, a,
|
|
79
|
+
return function(n, r, a, s, c, A, I, h, l) {
|
|
80
80
|
return e.apply(this, arguments);
|
|
81
81
|
};
|
|
82
82
|
case 10:
|
|
83
|
-
return function(n, r, a,
|
|
83
|
+
return function(n, r, a, s, c, A, I, h, l, g) {
|
|
84
84
|
return e.apply(this, arguments);
|
|
85
85
|
};
|
|
86
86
|
default:
|
|
@@ -93,35 +93,35 @@ function Ae(t) {
|
|
|
93
93
|
case 0:
|
|
94
94
|
return e;
|
|
95
95
|
case 1:
|
|
96
|
-
return E(n) ? e : D(function(
|
|
97
|
-
return t(n,
|
|
96
|
+
return E(n) ? e : D(function(s, c) {
|
|
97
|
+
return t(n, s, c);
|
|
98
98
|
});
|
|
99
99
|
case 2:
|
|
100
|
-
return E(n) && E(r) ? e : E(n) ? D(function(
|
|
101
|
-
return t(
|
|
102
|
-
}) : E(r) ? D(function(
|
|
103
|
-
return t(n,
|
|
104
|
-
}) :
|
|
105
|
-
return t(n, r,
|
|
100
|
+
return E(n) && E(r) ? e : E(n) ? D(function(s, c) {
|
|
101
|
+
return t(s, r, c);
|
|
102
|
+
}) : E(r) ? D(function(s, c) {
|
|
103
|
+
return t(n, s, c);
|
|
104
|
+
}) : R(function(s) {
|
|
105
|
+
return t(n, r, s);
|
|
106
106
|
});
|
|
107
107
|
default:
|
|
108
|
-
return E(n) && E(r) && E(a) ? e : E(n) && E(r) ? D(function(
|
|
109
|
-
return t(
|
|
110
|
-
}) : E(n) && E(a) ? D(function(
|
|
111
|
-
return t(
|
|
112
|
-
}) : E(r) && E(a) ? D(function(
|
|
113
|
-
return t(n,
|
|
114
|
-
}) : E(n) ?
|
|
115
|
-
return t(
|
|
116
|
-
}) : E(r) ?
|
|
117
|
-
return t(n,
|
|
118
|
-
}) : E(a) ?
|
|
119
|
-
return t(n, r,
|
|
108
|
+
return E(n) && E(r) && E(a) ? e : E(n) && E(r) ? D(function(s, c) {
|
|
109
|
+
return t(s, c, a);
|
|
110
|
+
}) : E(n) && E(a) ? D(function(s, c) {
|
|
111
|
+
return t(s, r, c);
|
|
112
|
+
}) : E(r) && E(a) ? D(function(s, c) {
|
|
113
|
+
return t(n, s, c);
|
|
114
|
+
}) : E(n) ? R(function(s) {
|
|
115
|
+
return t(s, r, a);
|
|
116
|
+
}) : E(r) ? R(function(s) {
|
|
117
|
+
return t(n, s, a);
|
|
118
|
+
}) : E(a) ? R(function(s) {
|
|
119
|
+
return t(n, r, s);
|
|
120
120
|
}) : t(n, r, a);
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
const
|
|
124
|
+
const Oe = Array.isArray || function(e) {
|
|
125
125
|
return e != null && e.length >= 0 && Object.prototype.toString.call(e) === "[object Array]";
|
|
126
126
|
};
|
|
127
127
|
function nn(t) {
|
|
@@ -132,15 +132,15 @@ function rn(t, e, n) {
|
|
|
132
132
|
if (arguments.length === 0)
|
|
133
133
|
return n();
|
|
134
134
|
var r = arguments[arguments.length - 1];
|
|
135
|
-
if (!
|
|
135
|
+
if (!Oe(r)) {
|
|
136
136
|
for (var a = 0; a < t.length; ) {
|
|
137
137
|
if (typeof r[t[a]] == "function")
|
|
138
138
|
return r[t[a]].apply(r, Array.prototype.slice.call(arguments, 0, -1));
|
|
139
139
|
a += 1;
|
|
140
140
|
}
|
|
141
141
|
if (nn(r)) {
|
|
142
|
-
var
|
|
143
|
-
return
|
|
142
|
+
var s = e.apply(null, Array.prototype.slice.call(arguments, 0, -1));
|
|
143
|
+
return s(r);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
return n.apply(this, arguments);
|
|
@@ -160,11 +160,11 @@ const on = {
|
|
|
160
160
|
return this.xf["@@transducer/result"](t);
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
-
function
|
|
163
|
+
function Le(t) {
|
|
164
164
|
return Object.prototype.toString.call(t) === "[object String]";
|
|
165
165
|
}
|
|
166
|
-
var sn = /* @__PURE__ */
|
|
167
|
-
return
|
|
166
|
+
var sn = /* @__PURE__ */ R(function(e) {
|
|
167
|
+
return Oe(e) ? !0 : !e || typeof e != "object" || Le(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
|
|
168
168
|
}), ln = /* @__PURE__ */ (function() {
|
|
169
169
|
function t(e) {
|
|
170
170
|
this.f = e;
|
|
@@ -181,7 +181,7 @@ function un(t) {
|
|
|
181
181
|
return new ln(t);
|
|
182
182
|
}
|
|
183
183
|
var cn = /* @__PURE__ */ D(function(e, n) {
|
|
184
|
-
return
|
|
184
|
+
return We(e.length, function() {
|
|
185
185
|
return e.apply(n, arguments);
|
|
186
186
|
});
|
|
187
187
|
});
|
|
@@ -195,7 +195,7 @@ function dn(t, e, n) {
|
|
|
195
195
|
}
|
|
196
196
|
return t["@@transducer/result"](e);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function et(t, e, n) {
|
|
199
199
|
for (var r = n.next(); !r.done; ) {
|
|
200
200
|
if (e = t["@@transducer/step"](e, r.value), e && e["@@transducer/reduced"]) {
|
|
201
201
|
e = e["@@transducer/value"];
|
|
@@ -205,35 +205,35 @@ function Ye(t, e, n) {
|
|
|
205
205
|
}
|
|
206
206
|
return t["@@transducer/result"](e);
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function tt(t, e, n, r) {
|
|
209
209
|
return t["@@transducer/result"](n[r](cn(t["@@transducer/step"], t), e));
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var nt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
|
|
212
212
|
function fn(t, e, n) {
|
|
213
213
|
if (typeof t == "function" && (t = un(t)), sn(n))
|
|
214
214
|
return dn(t, e, n);
|
|
215
215
|
if (typeof n["fantasy-land/reduce"] == "function")
|
|
216
|
-
return
|
|
217
|
-
if (n[
|
|
218
|
-
return
|
|
216
|
+
return tt(t, e, n, "fantasy-land/reduce");
|
|
217
|
+
if (n[nt] != null)
|
|
218
|
+
return et(t, e, n[nt]());
|
|
219
219
|
if (typeof n.next == "function")
|
|
220
|
-
return
|
|
220
|
+
return et(t, e, n);
|
|
221
221
|
if (typeof n.reduce == "function")
|
|
222
|
-
return
|
|
222
|
+
return tt(t, e, n, "reduce");
|
|
223
223
|
throw new TypeError("reduce: list must be array or iterable");
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function _e(t, e) {
|
|
226
226
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
227
227
|
}
|
|
228
|
-
var
|
|
229
|
-
return
|
|
230
|
-
return
|
|
228
|
+
var rt = Object.prototype.toString, wt = /* @__PURE__ */ (function() {
|
|
229
|
+
return rt.call(arguments) === "[object Arguments]" ? function(e) {
|
|
230
|
+
return rt.call(e) === "[object Arguments]";
|
|
231
231
|
} : function(e) {
|
|
232
|
-
return
|
|
232
|
+
return _e("callee", e);
|
|
233
233
|
};
|
|
234
234
|
})(), vn = !/* @__PURE__ */ {
|
|
235
235
|
toString: null
|
|
236
|
-
}.propertyIsEnumerable("toString"),
|
|
236
|
+
}.propertyIsEnumerable("toString"), at = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"], ot = /* @__PURE__ */ (function() {
|
|
237
237
|
return arguments.propertyIsEnumerable("length");
|
|
238
238
|
})(), pn = function(e, n) {
|
|
239
239
|
for (var r = 0; r < e.length; ) {
|
|
@@ -242,29 +242,29 @@ var et = Object.prototype.toString, ht = /* @__PURE__ */ (function() {
|
|
|
242
242
|
r += 1;
|
|
243
243
|
}
|
|
244
244
|
return !1;
|
|
245
|
-
},
|
|
245
|
+
}, it = /* @__PURE__ */ R(typeof Object.keys == "function" && !ot ? function(e) {
|
|
246
246
|
return Object(e) !== e ? [] : Object.keys(e);
|
|
247
247
|
} : function(e) {
|
|
248
248
|
if (Object(e) !== e)
|
|
249
249
|
return [];
|
|
250
|
-
var n, r, a = [],
|
|
250
|
+
var n, r, a = [], s = ot && wt(e);
|
|
251
251
|
for (n in e)
|
|
252
|
-
|
|
252
|
+
_e(n, e) && (!s || n !== "length") && (a[a.length] = n);
|
|
253
253
|
if (vn)
|
|
254
|
-
for (r =
|
|
255
|
-
n =
|
|
254
|
+
for (r = at.length - 1; r >= 0; )
|
|
255
|
+
n = at[r], _e(n, e) && !pn(a, n) && (a[a.length] = n), r -= 1;
|
|
256
256
|
return a;
|
|
257
257
|
});
|
|
258
|
-
const
|
|
258
|
+
const mt = Number.isInteger || function(e) {
|
|
259
259
|
return e << 0 === e;
|
|
260
260
|
};
|
|
261
|
-
var
|
|
261
|
+
var At = /* @__PURE__ */ D(function(e, n) {
|
|
262
262
|
var r = e < 0 ? n.length + e : e;
|
|
263
|
-
return
|
|
263
|
+
return Le(n) ? n.charAt(r) : n[r];
|
|
264
264
|
}), se = /* @__PURE__ */ D(function(e, n) {
|
|
265
265
|
if (n != null)
|
|
266
|
-
return
|
|
267
|
-
}), hn = /* @__PURE__ */ Ae(fn),
|
|
266
|
+
return mt(e) ? At(e, n) : n[e];
|
|
267
|
+
}), hn = /* @__PURE__ */ Ae(fn), st = /* @__PURE__ */ R(function(e) {
|
|
268
268
|
return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
|
|
269
269
|
});
|
|
270
270
|
function yn(t, e) {
|
|
@@ -272,21 +272,21 @@ function yn(t, e) {
|
|
|
272
272
|
return e.call(this, t.apply(this, arguments));
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function Ct(t, e) {
|
|
276
276
|
return function() {
|
|
277
277
|
var n = arguments.length;
|
|
278
278
|
if (n === 0)
|
|
279
279
|
return e();
|
|
280
280
|
var r = arguments[n - 1];
|
|
281
|
-
return
|
|
281
|
+
return Oe(r) || typeof r[t] != "function" ? e.apply(this, arguments) : r[t].apply(r, Array.prototype.slice.call(arguments, 0, n - 1));
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
284
|
var gn = /* @__PURE__ */ Ae(
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ Ct("slice", function(e, n, r) {
|
|
286
286
|
return Array.prototype.slice.call(r, e, n);
|
|
287
287
|
})
|
|
288
|
-
), wn = /* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
288
|
+
), wn = /* @__PURE__ */ R(
|
|
289
|
+
/* @__PURE__ */ Ct(
|
|
290
290
|
"tail",
|
|
291
291
|
/* @__PURE__ */ gn(1, 1 / 0)
|
|
292
292
|
)
|
|
@@ -294,22 +294,22 @@ var gn = /* @__PURE__ */ Ae(
|
|
|
294
294
|
function mn() {
|
|
295
295
|
if (arguments.length === 0)
|
|
296
296
|
throw new Error("pipe requires at least one argument");
|
|
297
|
-
return
|
|
297
|
+
return We(arguments[0].length, hn(yn, arguments[0], wn(arguments)));
|
|
298
298
|
}
|
|
299
|
-
var An = /* @__PURE__ */
|
|
300
|
-
return
|
|
299
|
+
var An = /* @__PURE__ */ R(function(e) {
|
|
300
|
+
return Le(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
|
|
301
301
|
});
|
|
302
|
-
function
|
|
302
|
+
function lt() {
|
|
303
303
|
if (arguments.length === 0)
|
|
304
304
|
throw new Error("compose requires at least one argument");
|
|
305
305
|
return mn.apply(this, An(arguments));
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function ut(t) {
|
|
308
308
|
for (var e = [], n; !(n = t.next()).done; )
|
|
309
309
|
e.push(n.value);
|
|
310
310
|
return e;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function ct(t, e, n) {
|
|
313
313
|
for (var r = 0, a = n.length; r < a; ) {
|
|
314
314
|
if (t(e, n[r]))
|
|
315
315
|
return !0;
|
|
@@ -324,21 +324,21 @@ function Cn(t) {
|
|
|
324
324
|
function Sn(t, e) {
|
|
325
325
|
return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
|
|
326
326
|
}
|
|
327
|
-
const
|
|
328
|
-
function
|
|
329
|
-
var a =
|
|
330
|
-
function c(
|
|
331
|
-
return
|
|
327
|
+
const Ue = typeof Object.is == "function" ? Object.is : Sn;
|
|
328
|
+
function dt(t, e, n, r) {
|
|
329
|
+
var a = ut(t), s = ut(e);
|
|
330
|
+
function c(A, I) {
|
|
331
|
+
return qe(A, I, n.slice(), r.slice());
|
|
332
332
|
}
|
|
333
|
-
return !
|
|
334
|
-
return !
|
|
335
|
-
},
|
|
333
|
+
return !ct(function(A, I) {
|
|
334
|
+
return !ct(c, I, A);
|
|
335
|
+
}, s, a);
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
if (
|
|
337
|
+
function qe(t, e, n, r) {
|
|
338
|
+
if (Ue(t, e))
|
|
339
339
|
return !0;
|
|
340
|
-
var a =
|
|
341
|
-
if (a !==
|
|
340
|
+
var a = st(t);
|
|
341
|
+
if (a !== st(e))
|
|
342
342
|
return !1;
|
|
343
343
|
if (typeof t["fantasy-land/equals"] == "function" || typeof e["fantasy-land/equals"] == "function")
|
|
344
344
|
return typeof t["fantasy-land/equals"] == "function" && t["fantasy-land/equals"](e) && typeof e["fantasy-land/equals"] == "function" && e["fantasy-land/equals"](t);
|
|
@@ -354,11 +354,11 @@ function $e(t, e, n, r) {
|
|
|
354
354
|
case "Boolean":
|
|
355
355
|
case "Number":
|
|
356
356
|
case "String":
|
|
357
|
-
if (!(typeof t == typeof e &&
|
|
357
|
+
if (!(typeof t == typeof e && Ue(t.valueOf(), e.valueOf())))
|
|
358
358
|
return !1;
|
|
359
359
|
break;
|
|
360
360
|
case "Date":
|
|
361
|
-
if (!
|
|
361
|
+
if (!Ue(t.valueOf(), e.valueOf()))
|
|
362
362
|
return !1;
|
|
363
363
|
break;
|
|
364
364
|
case "Error":
|
|
@@ -368,16 +368,16 @@ function $e(t, e, n, r) {
|
|
|
368
368
|
return !1;
|
|
369
369
|
break;
|
|
370
370
|
}
|
|
371
|
-
for (var
|
|
372
|
-
if (n[
|
|
373
|
-
return r[
|
|
374
|
-
|
|
371
|
+
for (var s = n.length - 1; s >= 0; ) {
|
|
372
|
+
if (n[s] === t)
|
|
373
|
+
return r[s] === e;
|
|
374
|
+
s -= 1;
|
|
375
375
|
}
|
|
376
376
|
switch (a) {
|
|
377
377
|
case "Map":
|
|
378
|
-
return t.size !== e.size ? !1 :
|
|
378
|
+
return t.size !== e.size ? !1 : dt(t.entries(), e.entries(), n.concat([t]), r.concat([e]));
|
|
379
379
|
case "Set":
|
|
380
|
-
return t.size !== e.size ? !1 :
|
|
380
|
+
return t.size !== e.size ? !1 : dt(t.values(), e.values(), n.concat([t]), r.concat([e]));
|
|
381
381
|
case "Arguments":
|
|
382
382
|
case "Array":
|
|
383
383
|
case "Object":
|
|
@@ -401,20 +401,20 @@ function $e(t, e, n, r) {
|
|
|
401
401
|
default:
|
|
402
402
|
return !1;
|
|
403
403
|
}
|
|
404
|
-
var c =
|
|
405
|
-
if (c.length !==
|
|
404
|
+
var c = it(t);
|
|
405
|
+
if (c.length !== it(e).length)
|
|
406
406
|
return !1;
|
|
407
|
-
var
|
|
408
|
-
for (
|
|
409
|
-
var
|
|
410
|
-
if (!(
|
|
407
|
+
var A = n.concat([t]), I = r.concat([e]);
|
|
408
|
+
for (s = c.length - 1; s >= 0; ) {
|
|
409
|
+
var h = c[s];
|
|
410
|
+
if (!(_e(h, e) && qe(e[h], t[h], A, I)))
|
|
411
411
|
return !1;
|
|
412
|
-
|
|
412
|
+
s -= 1;
|
|
413
413
|
}
|
|
414
414
|
return !0;
|
|
415
415
|
}
|
|
416
|
-
var
|
|
417
|
-
return
|
|
416
|
+
var St = /* @__PURE__ */ D(function(e, n) {
|
|
417
|
+
return qe(e, n, [], []);
|
|
418
418
|
});
|
|
419
419
|
function bn(t) {
|
|
420
420
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
@@ -426,11 +426,11 @@ function Tn(t) {
|
|
|
426
426
|
var e = Object.prototype.toString.call(t);
|
|
427
427
|
return e === "[object Uint8ClampedArray]" || e === "[object Int8Array]" || e === "[object Uint8Array]" || e === "[object Int16Array]" || e === "[object Uint16Array]" || e === "[object Int32Array]" || e === "[object Uint32Array]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object BigInt64Array]" || e === "[object BigUint64Array]";
|
|
428
428
|
}
|
|
429
|
-
var
|
|
430
|
-
return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() :
|
|
429
|
+
var In = /* @__PURE__ */ R(function(e) {
|
|
430
|
+
return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : Oe(e) ? [] : Le(e) ? "" : bn(e) ? {} : wt(e) ? /* @__PURE__ */ (function() {
|
|
431
431
|
return arguments;
|
|
432
432
|
})() : Tn(e) ? e.constructor.from("") : void 0;
|
|
433
|
-
}),
|
|
433
|
+
}), En = /* @__PURE__ */ (function() {
|
|
434
434
|
function t(e, n) {
|
|
435
435
|
this.xf = n, this.f = e, this.idx = -1, this.found = !1;
|
|
436
436
|
}
|
|
@@ -440,7 +440,7 @@ var En = /* @__PURE__ */ P(function(e) {
|
|
|
440
440
|
return this.idx += 1, this.f(n) && (this.found = !0, e = an(this.xf["@@transducer/step"](e, this.idx))), e;
|
|
441
441
|
}, t;
|
|
442
442
|
})(), _n = /* @__PURE__ */ D(function(e, n) {
|
|
443
|
-
return new
|
|
443
|
+
return new En(e, n);
|
|
444
444
|
}), G = /* @__PURE__ */ D(
|
|
445
445
|
/* @__PURE__ */ rn([], _n, function(e, n) {
|
|
446
446
|
for (var r = 0, a = n.length; r < a; ) {
|
|
@@ -450,27 +450,27 @@ var En = /* @__PURE__ */ P(function(e) {
|
|
|
450
450
|
}
|
|
451
451
|
return -1;
|
|
452
452
|
})
|
|
453
|
-
), On = /* @__PURE__ */
|
|
454
|
-
return e != null &&
|
|
453
|
+
), On = /* @__PURE__ */ R(function(e) {
|
|
454
|
+
return e != null && St(e, In(e));
|
|
455
455
|
}), Ln = /* @__PURE__ */ D(function(e, n) {
|
|
456
456
|
return e.map(function(r) {
|
|
457
|
-
for (var a = n,
|
|
457
|
+
for (var a = n, s = 0, c; s < r.length; ) {
|
|
458
458
|
if (a == null)
|
|
459
459
|
return;
|
|
460
|
-
c = r[
|
|
460
|
+
c = r[s], a = mt(c) ? At(c, a) : a[c], s += 1;
|
|
461
461
|
}
|
|
462
462
|
return a;
|
|
463
463
|
});
|
|
464
464
|
}), Vn = /* @__PURE__ */ D(function(e, n) {
|
|
465
465
|
return Ln([e], n)[0];
|
|
466
|
-
}),
|
|
466
|
+
}), be = /* @__PURE__ */ Ae(function(e, n, r) {
|
|
467
467
|
return we(e, Vn(n, r));
|
|
468
468
|
}), z = /* @__PURE__ */ Ae(function(e, n, r) {
|
|
469
|
-
return
|
|
469
|
+
return St(n, se(e, r));
|
|
470
470
|
}), me = /* @__PURE__ */ Ae(function(e, n, r) {
|
|
471
471
|
return we(e, se(n, r));
|
|
472
|
-
}),
|
|
473
|
-
return
|
|
472
|
+
}), kn = /* @__PURE__ */ D(function(e, n) {
|
|
473
|
+
return We(e.length, function() {
|
|
474
474
|
try {
|
|
475
475
|
return e.apply(this, arguments);
|
|
476
476
|
} catch (r) {
|
|
@@ -490,88 +490,89 @@ async function Ee() {
|
|
|
490
490
|
console.error(t);
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
const
|
|
494
|
-
openConnection: async (e, n, r) => await new Promise((
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
493
|
+
const jn = () => ({
|
|
494
|
+
openConnection: async (e, n, r, a = "viewerAsset", s = null) => await new Promise((I, h) => {
|
|
495
|
+
let l = e + "?session=" + r + "&" + a + "=" + n;
|
|
496
|
+
s && a !== "package" && (l += "&package=" + s);
|
|
497
|
+
let g = null;
|
|
498
|
+
const w = new WebSocket(l);
|
|
499
|
+
w.onopen = () => {
|
|
500
|
+
const b = { montage: "NOT_MONTAGED", packageId: n };
|
|
501
|
+
w.send(JSON.stringify(b));
|
|
502
|
+
}, w.onclose = () => {
|
|
503
|
+
g && g.channelDetails ? I({ res: g.channelDetails, status: "websocket closed" }) : I({ res: null, status: "websocket closed without data" });
|
|
504
|
+
}, w.onmessage = (b) => {
|
|
505
|
+
g = JSON.parse(b.data), w.close();
|
|
506
|
+
}, w.onerror = (b) => {
|
|
507
|
+
console.error("WebSocket error:", b), h(b);
|
|
507
508
|
};
|
|
508
509
|
})
|
|
509
510
|
}), K = /* @__PURE__ */ new Map();
|
|
510
|
-
let
|
|
511
|
-
function
|
|
512
|
-
if (t === "default" && !
|
|
511
|
+
let ft = !1, vt = !1;
|
|
512
|
+
function Ve(t = "default") {
|
|
513
|
+
if (t === "default" && !ft && (ft = !0, console.warn(
|
|
513
514
|
'[TSViewer] Using default store instance. For multi-instance support, pass a unique instanceId prop to TSViewer. Example: <TSViewer instance-id="viewer-1" />'
|
|
514
515
|
)), K.has(t))
|
|
515
516
|
return K.get(t)();
|
|
516
517
|
const e = Kt(`tsviewer-${t}`, () => {
|
|
517
|
-
const n = Ht({}), r =
|
|
518
|
-
const o =
|
|
519
|
-
return o || (console.warn("No active layer found, available layers:",
|
|
518
|
+
const n = Ht({}), r = m([]), a = m("NOT_MONTAGED"), s = m({}), c = m([]), A = m(null), I = m(null), h = m({}), l = m([]), g = m({}), w = m({}), b = m("pointer"), { openConnection: U } = jn(), x = H(() => (o) => c.value.find((u) => u.name === o)), O = H(() => r.value.filter((o) => o.selected)), k = H(() => () => {
|
|
519
|
+
const o = l.value.find((u) => u.selected);
|
|
520
|
+
return o || (console.warn("No active layer found, available layers:", l.value), l.value.length > 0 ? l.value[0] : null);
|
|
520
521
|
}), L = () => {
|
|
521
522
|
let o = !1;
|
|
522
|
-
return
|
|
523
|
-
!u.id && u.id !== 0 && (console.error(`Layer at index ${
|
|
524
|
-
}), o && console.error("Annotation layer validation failed. Layers:",
|
|
525
|
-
}, q = H(() => (o) =>
|
|
526
|
-
|
|
523
|
+
return l.value.forEach((u, p) => {
|
|
524
|
+
!u.id && u.id !== 0 && (console.error(`Layer at index ${p} missing ID:`, u), o = !0), u.annotations || (console.warn(`Layer at index ${p} missing annotations array:`, u), u.annotations = []);
|
|
525
|
+
}), o && console.error("Annotation layer validation failed. Layers:", l.value), !o;
|
|
526
|
+
}, q = H(() => (o) => l.value.flatMap((p) => p.annotations || []).find((p) => p.id === o)), f = (o) => {
|
|
527
|
+
h.value = o;
|
|
527
528
|
}, V = (o) => {
|
|
528
529
|
r.value = o;
|
|
529
|
-
},
|
|
530
|
+
}, _ = (o) => {
|
|
530
531
|
a.value = o;
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
},
|
|
532
|
+
}, j = (o) => {
|
|
533
|
+
s.value = o;
|
|
534
|
+
}, N = (o) => {
|
|
534
535
|
c.value = o;
|
|
535
536
|
}, M = (o) => {
|
|
536
|
-
|
|
537
|
+
A.value = o;
|
|
537
538
|
}, J = (o) => {
|
|
538
|
-
|
|
539
|
+
I.value = o;
|
|
539
540
|
}, F = (o) => {
|
|
540
541
|
Object.assign(n, o);
|
|
541
542
|
}, W = async (o) => {
|
|
542
|
-
const u = o.packageId,
|
|
543
|
-
let
|
|
544
|
-
|
|
543
|
+
const u = o.viewerAssetId || null, p = o.packageId || null, P = u || p, ce = u ? "viewerAsset" : "package", De = await Ee();
|
|
544
|
+
let Me = n.timeseriesDiscoverApi, Ce = null;
|
|
545
|
+
Ce = await U(Me, P, De, ce, u ? p : null), f({ channels: Ce.res, content: { id: P, idType: ce } });
|
|
545
546
|
}, Y = () => (o) => {
|
|
546
|
-
var
|
|
547
|
-
return ((
|
|
547
|
+
var p;
|
|
548
|
+
return ((p = o == null ? void 0 : o.content) == null ? void 0 : p.state) === "READY";
|
|
548
549
|
}, Q = (o) => {
|
|
549
|
-
const u = o.map((
|
|
550
|
-
|
|
550
|
+
const u = o.map((p) => (!p.id && p.id !== 0 && (console.warn("Annotation layer missing ID:", p), p.id = Math.random().toString(36).substr(2, 9)), p.annotations || (p.annotations = []), p.name || (p.name = `Layer ${p.id}`), p));
|
|
551
|
+
l.value = u;
|
|
551
552
|
}, le = (o) => {
|
|
552
553
|
if (!o && o !== 0) {
|
|
553
554
|
console.error("setActiveAnnotationLayer called with invalid layerId:", o);
|
|
554
555
|
return;
|
|
555
556
|
}
|
|
556
|
-
|
|
557
|
-
const u = G(z("id", o),
|
|
558
|
-
u >= 0 ?
|
|
557
|
+
g.value = o, l.value.forEach((p) => p.selected = !1);
|
|
558
|
+
const u = G(z("id", o), l.value);
|
|
559
|
+
u >= 0 ? l.value[u].selected = !0 : console.error("Layer with ID not found:", o, "Available layers:", l.value);
|
|
559
560
|
}, $ = (o) => {
|
|
560
|
-
if (
|
|
561
|
+
if (l.value.forEach(
|
|
561
562
|
(u) => {
|
|
562
|
-
var
|
|
563
|
-
return (
|
|
563
|
+
var p;
|
|
564
|
+
return (p = u.annotations) == null ? void 0 : p.forEach((P) => P.selected = !1);
|
|
564
565
|
}
|
|
565
566
|
), o.id) {
|
|
566
|
-
const u = G(z("id", o.layer_id),
|
|
567
|
+
const u = G(z("id", o.layer_id), l.value);
|
|
567
568
|
if (u >= 0) {
|
|
568
|
-
const
|
|
569
|
-
|
|
569
|
+
const p = G(z("id", o.id), l.value[u].annotations);
|
|
570
|
+
p >= 0 && (l.value[u].annotations[p].selected = !0);
|
|
570
571
|
}
|
|
571
572
|
}
|
|
572
|
-
|
|
573
|
+
w.value = o;
|
|
573
574
|
}, ee = (o) => {
|
|
574
|
-
|
|
575
|
+
b.value = o;
|
|
575
576
|
}, B = (o) => {
|
|
576
577
|
if (!o.id && o.id !== 0) {
|
|
577
578
|
console.error("Cannot create layer without ID:", o);
|
|
@@ -592,59 +593,59 @@ function Le(t = "default") {
|
|
|
592
593
|
...o
|
|
593
594
|
// Spread any additional properties
|
|
594
595
|
};
|
|
595
|
-
|
|
596
|
+
l.value.push(u);
|
|
596
597
|
}, ue = (o) => {
|
|
597
|
-
const u = G(z("id", o.id),
|
|
598
|
+
const u = G(z("id", o.id), l.value);
|
|
598
599
|
if (u >= 0) {
|
|
599
|
-
const
|
|
600
|
-
|
|
600
|
+
const p = Object.assign(l.value[u], o);
|
|
601
|
+
l.value[u] = p;
|
|
601
602
|
}
|
|
602
603
|
}, ve = (o) => {
|
|
603
|
-
const u = G(z("id", o.id),
|
|
604
|
-
u >= 0 &&
|
|
604
|
+
const u = G(z("id", o.id), l.value);
|
|
605
|
+
u >= 0 && l.value.splice(u, 1);
|
|
605
606
|
}, te = (o) => {
|
|
606
|
-
const u = G(z("id", o.layer_id),
|
|
607
|
-
u >= 0 && (
|
|
607
|
+
const u = G(z("id", o.layer_id), l.value);
|
|
608
|
+
u >= 0 && (l.value[u].annotations || (l.value[u].annotations = []), l.value[u].annotations.push(o), $(o));
|
|
608
609
|
}, ne = (o) => {
|
|
609
|
-
const u = G(z("id", o.layer_id),
|
|
610
|
+
const u = G(z("id", o.layer_id), l.value);
|
|
610
611
|
if (u >= 0) {
|
|
611
|
-
const
|
|
612
|
-
|
|
612
|
+
const p = l.value[u].annotations, P = G(z("id", o.id), p);
|
|
613
|
+
P >= 0 && (p[P] = o);
|
|
613
614
|
}
|
|
614
|
-
},
|
|
615
|
-
const u = G(z("id", o.layer_id),
|
|
615
|
+
}, y = (o) => {
|
|
616
|
+
const u = G(z("id", o.layer_id), l.value);
|
|
616
617
|
if (u >= 0) {
|
|
617
|
-
const
|
|
618
|
-
|
|
618
|
+
const p = l.value[u].annotations, P = G(z("id", o.id), p);
|
|
619
|
+
P >= 0 && p.splice(P, 1);
|
|
619
620
|
}
|
|
620
|
-
},
|
|
621
|
-
const
|
|
622
|
-
|
|
621
|
+
}, T = (o, u, p) => {
|
|
622
|
+
const P = r.value.find((ce) => ce.id === o);
|
|
623
|
+
P && (P[u] = p);
|
|
623
624
|
};
|
|
624
625
|
return {
|
|
625
626
|
// State
|
|
626
627
|
viewerChannels: r,
|
|
627
628
|
viewerMontageScheme: a,
|
|
628
|
-
customMontageMap:
|
|
629
|
+
customMontageMap: s,
|
|
629
630
|
workspaceMontages: c,
|
|
630
|
-
viewerErrors:
|
|
631
|
-
needsRerender:
|
|
632
|
-
viewerAnnotations:
|
|
633
|
-
activeAnnotationLayer:
|
|
634
|
-
activeAnnotation:
|
|
635
|
-
activeViewer:
|
|
636
|
-
viewerActiveTool:
|
|
631
|
+
viewerErrors: A,
|
|
632
|
+
needsRerender: I,
|
|
633
|
+
viewerAnnotations: l,
|
|
634
|
+
activeAnnotationLayer: g,
|
|
635
|
+
activeAnnotation: w,
|
|
636
|
+
activeViewer: h,
|
|
637
|
+
viewerActiveTool: b,
|
|
637
638
|
config: n,
|
|
638
639
|
// Getters
|
|
639
640
|
getMontageMessageByName: x,
|
|
640
641
|
viewerSelectedChannels: O,
|
|
641
|
-
getViewerActiveLayer:
|
|
642
|
+
getViewerActiveLayer: k,
|
|
642
643
|
getAnnotationById: q,
|
|
643
644
|
// Actions
|
|
644
645
|
setChannels: V,
|
|
645
|
-
setViewerMontageScheme:
|
|
646
|
-
setCustomMontageMap:
|
|
647
|
-
setWorkspaceMontages:
|
|
646
|
+
setViewerMontageScheme: _,
|
|
647
|
+
setCustomMontageMap: j,
|
|
648
|
+
setWorkspaceMontages: N,
|
|
648
649
|
setViewerErrors: M,
|
|
649
650
|
setAnnotations: Q,
|
|
650
651
|
setActiveAnnotationLayer: le,
|
|
@@ -655,20 +656,20 @@ function Le(t = "default") {
|
|
|
655
656
|
deleteLayer: ve,
|
|
656
657
|
createAnnotation: te,
|
|
657
658
|
updateAnnotation: ne,
|
|
658
|
-
deleteAnnotation:
|
|
659
|
-
updateChannelProperty:
|
|
659
|
+
deleteAnnotation: y,
|
|
660
|
+
updateChannelProperty: T,
|
|
660
661
|
updateChannelVisibility: (o, u) => {
|
|
661
|
-
|
|
662
|
+
T(o, "visible", u);
|
|
662
663
|
},
|
|
663
664
|
updateChannelSelection: (o, u) => {
|
|
664
|
-
|
|
665
|
+
T(o, "selected", u);
|
|
665
666
|
},
|
|
666
667
|
updateChannelFilter: (o, u) => {
|
|
667
|
-
|
|
668
|
+
T(o, "filter", u);
|
|
668
669
|
},
|
|
669
670
|
validateAnnotationLayers: L,
|
|
670
671
|
resetViewer: () => {
|
|
671
|
-
r.value = [], a.value = "NOT_MONTAGED",
|
|
672
|
+
r.value = [], a.value = "NOT_MONTAGED", s.value = {}, c.value = [], A.value = null, l.value = [], g.value = {}, w.value = {}, b.value = "pointer", h.value = {}, Object.keys(n).forEach((o) => {
|
|
672
673
|
delete n[o];
|
|
673
674
|
});
|
|
674
675
|
},
|
|
@@ -679,7 +680,7 @@ function Le(t = "default") {
|
|
|
679
680
|
});
|
|
680
681
|
},
|
|
681
682
|
resetRerenderTrigger: () => {
|
|
682
|
-
|
|
683
|
+
I.value = null;
|
|
683
684
|
},
|
|
684
685
|
isTSFileProcessed: Y,
|
|
685
686
|
fetchAndSetActiveViewer: W,
|
|
@@ -698,9 +699,9 @@ function er() {
|
|
|
698
699
|
}), K.clear();
|
|
699
700
|
}
|
|
700
701
|
function tr() {
|
|
701
|
-
return
|
|
702
|
+
return vt || (vt = !0, console.warn(
|
|
702
703
|
"[TSViewer] useViewerStore() is deprecated. Use createViewerStore(instanceId) for multi-instance support."
|
|
703
|
-
)),
|
|
704
|
+
)), Ve("default");
|
|
704
705
|
}
|
|
705
706
|
function Mn(t) {
|
|
706
707
|
if (useRoute().name === "docs-login")
|
|
@@ -713,10 +714,10 @@ var nr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
713
714
|
function Pn(t) {
|
|
714
715
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
715
716
|
}
|
|
716
|
-
var
|
|
717
|
+
var Te = { exports: {} }, pt;
|
|
717
718
|
function Rn() {
|
|
718
|
-
if (
|
|
719
|
-
|
|
719
|
+
if (pt) return Te.exports;
|
|
720
|
+
pt = 1;
|
|
720
721
|
function t() {
|
|
721
722
|
}
|
|
722
723
|
return t.prototype = {
|
|
@@ -729,39 +730,39 @@ function Rn() {
|
|
|
729
730
|
},
|
|
730
731
|
once: function(e, n, r) {
|
|
731
732
|
var a = this;
|
|
732
|
-
function
|
|
733
|
-
a.off(e,
|
|
733
|
+
function s() {
|
|
734
|
+
a.off(e, s), n.apply(r, arguments);
|
|
734
735
|
}
|
|
735
|
-
return
|
|
736
|
+
return s._ = n, this.on(e, s, r);
|
|
736
737
|
},
|
|
737
738
|
emit: function(e) {
|
|
738
|
-
var n = [].slice.call(arguments, 1), r = ((this.e || (this.e = {}))[e] || []).slice(), a = 0,
|
|
739
|
-
for (a; a <
|
|
739
|
+
var n = [].slice.call(arguments, 1), r = ((this.e || (this.e = {}))[e] || []).slice(), a = 0, s = r.length;
|
|
740
|
+
for (a; a < s; a++)
|
|
740
741
|
r[a].fn.apply(r[a].ctx, n);
|
|
741
742
|
return this;
|
|
742
743
|
},
|
|
743
744
|
off: function(e, n) {
|
|
744
|
-
var r = this.e || (this.e = {}), a = r[e],
|
|
745
|
+
var r = this.e || (this.e = {}), a = r[e], s = [];
|
|
745
746
|
if (a && n)
|
|
746
|
-
for (var c = 0,
|
|
747
|
-
a[c].fn !== n && a[c].fn._ !== n &&
|
|
748
|
-
return
|
|
747
|
+
for (var c = 0, A = a.length; c < A; c++)
|
|
748
|
+
a[c].fn !== n && a[c].fn._ !== n && s.push(a[c]);
|
|
749
|
+
return s.length ? r[e] = s : delete r[e], this;
|
|
749
750
|
}
|
|
750
|
-
},
|
|
751
|
+
}, Te.exports = t, Te.exports.TinyEmitter = t, Te.exports;
|
|
751
752
|
}
|
|
752
|
-
var
|
|
753
|
+
var xe, ht;
|
|
753
754
|
function Nn() {
|
|
754
|
-
if (
|
|
755
|
-
|
|
755
|
+
if (ht) return xe;
|
|
756
|
+
ht = 1;
|
|
756
757
|
var t = Rn();
|
|
757
|
-
return
|
|
758
|
+
return xe = new t(), xe;
|
|
758
759
|
}
|
|
759
760
|
var Un = Nn();
|
|
760
|
-
const
|
|
761
|
-
$emit: (...t) =>
|
|
762
|
-
$on: (...t) =>
|
|
763
|
-
$off: (...t) =>
|
|
764
|
-
$once: (...t) =>
|
|
761
|
+
const Ie = /* @__PURE__ */ Pn(Un), ie = {
|
|
762
|
+
$emit: (...t) => Ie.emit(...t),
|
|
763
|
+
$on: (...t) => Ie.on(...t),
|
|
764
|
+
$off: (...t) => Ie.off(...t),
|
|
765
|
+
$once: (...t) => Ie.once(...t)
|
|
765
766
|
}, xn = (t) => Object.prototype.toString.call(t) === "[object String]", $n = (t) => {
|
|
766
767
|
Object.keys(t).forEach((e) => {
|
|
767
768
|
xn(t[e]) && (t[e] = t[e].trim());
|
|
@@ -770,16 +771,16 @@ const Te = /* @__PURE__ */ Pn(Un), ie = {
|
|
|
770
771
|
function rr(t, e) {
|
|
771
772
|
if (!t)
|
|
772
773
|
return Promise.reject({ status: 400, message: "Url is missing!" });
|
|
773
|
-
const n = me("GET", "method", e), r = me({}, "header", e), a = Object.assign({}, { "Content-type": "application/json" }, r),
|
|
774
|
+
const n = me("GET", "method", e), r = me({}, "header", e), a = Object.assign({}, { "Content-type": "application/json" }, r), s = se("body", e);
|
|
774
775
|
let c = { headers: a, method: n };
|
|
775
|
-
if (
|
|
776
|
-
typeof
|
|
777
|
-
const
|
|
778
|
-
c = Object.assign({}, c, { body:
|
|
776
|
+
if (s) {
|
|
777
|
+
typeof s == "object" && $n(s);
|
|
778
|
+
const A = JSON.stringify(s);
|
|
779
|
+
c = Object.assign({}, c, { body: A });
|
|
779
780
|
}
|
|
780
|
-
return fetch(t, c).then((
|
|
781
|
+
return fetch(t, c).then((A) => A.status >= 400 ? Promise.reject(A) : A.json().catch(() => A));
|
|
781
782
|
}
|
|
782
|
-
function
|
|
783
|
+
function $e(t) {
|
|
783
784
|
const e = se("status", t);
|
|
784
785
|
let n;
|
|
785
786
|
if (e === void 0) {
|
|
@@ -789,7 +790,7 @@ function Ne(t) {
|
|
|
789
790
|
n = t.status;
|
|
790
791
|
if (n === 400 && t.body)
|
|
791
792
|
t.body.getReader().read().then(({ done: r, value: a }) => {
|
|
792
|
-
const
|
|
793
|
+
const s = a instanceof Uint8Array ? String.fromCharCode.apply(null, a) : a, c = lt(we(s), kn(lt(se("message"), JSON.parse), (A, I) => I))(s);
|
|
793
794
|
ie.$emit("ajaxError", {
|
|
794
795
|
detail: {
|
|
795
796
|
type: "error",
|
|
@@ -820,9 +821,9 @@ function Ne(t) {
|
|
|
820
821
|
}
|
|
821
822
|
}
|
|
822
823
|
function Fn(t = null) {
|
|
823
|
-
const e = t || Zt("viewerStore", null) ||
|
|
824
|
-
|
|
825
|
-
return
|
|
824
|
+
const e = t || Zt("viewerStore", null) || Ve("default"), { viewerChannels: n, viewerAnnotations: r } = Fe(e), a = (h) => h.id || "", s = (h) => {
|
|
825
|
+
h.sort(function(g, w) {
|
|
826
|
+
return g.start < w.start ? -1 : g.start > w.start ? 1 : 0;
|
|
826
827
|
});
|
|
827
828
|
};
|
|
828
829
|
return {
|
|
@@ -832,42 +833,42 @@ function Fn(t = null) {
|
|
|
832
833
|
viewerAnnotations: r,
|
|
833
834
|
// Now from Pinia
|
|
834
835
|
// Methods
|
|
835
|
-
addAnnotation: async (
|
|
836
|
-
const
|
|
837
|
-
if (!
|
|
838
|
-
throw new TypeError("Missing annotation data or layer_id",
|
|
839
|
-
if (
|
|
840
|
-
throw new TypeError("Trying to create an annotation that already exists",
|
|
841
|
-
let
|
|
842
|
-
const
|
|
843
|
-
if (!
|
|
836
|
+
addAnnotation: async (h = null) => {
|
|
837
|
+
const l = h || activeAnnotation.value;
|
|
838
|
+
if (!l || !l.layer_id)
|
|
839
|
+
throw new TypeError("Missing annotation data or layer_id", l);
|
|
840
|
+
if (l.id)
|
|
841
|
+
throw new TypeError("Trying to create an annotation that already exists", l.id);
|
|
842
|
+
let g = l.start, w = l.duration || l.end - l.start;
|
|
843
|
+
const b = l.label, U = l.description, x = l.layer_id;
|
|
844
|
+
if (!b)
|
|
844
845
|
throw new Error("Annotation label is required");
|
|
845
|
-
if (
|
|
846
|
+
if (g == null)
|
|
846
847
|
throw new Error("Annotation start time is required");
|
|
847
|
-
|
|
848
|
+
w < 0 && (w = -w, g = g - w);
|
|
848
849
|
let O = [];
|
|
849
|
-
if (
|
|
850
|
+
if (l.allChannels) {
|
|
850
851
|
const f = e.activeViewer.channels;
|
|
851
852
|
for (let V = 0; V < f.length; V++) {
|
|
852
|
-
const
|
|
853
|
-
O.push(
|
|
853
|
+
const _ = f[V], j = a(_);
|
|
854
|
+
O.push(j);
|
|
854
855
|
}
|
|
855
|
-
} else if (
|
|
856
|
-
O =
|
|
856
|
+
} else if (l.channelIds && Array.isArray(l.channelIds) && l.channelIds.length > 0)
|
|
857
|
+
O = l.channelIds;
|
|
857
858
|
else
|
|
858
859
|
for (let f = 0; f < n.value.length; f++) {
|
|
859
860
|
const V = n.value[f];
|
|
860
861
|
if (V.selected && V.visible) {
|
|
861
|
-
const
|
|
862
|
-
O.push(
|
|
862
|
+
const _ = a(V);
|
|
863
|
+
O.push(_);
|
|
863
864
|
}
|
|
864
865
|
}
|
|
865
|
-
const
|
|
866
|
-
label:
|
|
867
|
-
name:
|
|
866
|
+
const k = {
|
|
867
|
+
label: b,
|
|
868
|
+
name: b,
|
|
868
869
|
description: U || "",
|
|
869
|
-
start: Math.floor(
|
|
870
|
-
end: Math.floor(
|
|
870
|
+
start: Math.floor(g),
|
|
871
|
+
end: Math.floor(g + w),
|
|
871
872
|
channelIds: O
|
|
872
873
|
}, L = e.activeViewer.content.id, q = `${e.config.apiUrl}/timeseries/${L}/layers/${x}/annotations`;
|
|
873
874
|
try {
|
|
@@ -877,89 +878,89 @@ function Fn(t = null) {
|
|
|
877
878
|
"Content-Type": "application/json",
|
|
878
879
|
Accept: "application/json"
|
|
879
880
|
},
|
|
880
|
-
body: JSON.stringify(
|
|
881
|
+
body: JSON.stringify(k)
|
|
881
882
|
});
|
|
882
883
|
if (!V.ok) {
|
|
883
884
|
const M = await V.text();
|
|
884
885
|
throw new Error(`HTTP ${V.status}: ${M}`);
|
|
885
886
|
}
|
|
886
|
-
const
|
|
887
|
+
const _ = await V.json(), j = {
|
|
887
888
|
name: "",
|
|
888
|
-
id:
|
|
889
|
-
label:
|
|
890
|
-
description:
|
|
891
|
-
start:
|
|
892
|
-
duration:
|
|
893
|
-
end:
|
|
889
|
+
id: _.id,
|
|
890
|
+
label: _.label,
|
|
891
|
+
description: _.description,
|
|
892
|
+
start: _.start,
|
|
893
|
+
duration: _.end - _.start,
|
|
894
|
+
end: _.end,
|
|
894
895
|
cStart: null,
|
|
895
896
|
cEnd: null,
|
|
896
897
|
selected: !0,
|
|
897
|
-
channelIds:
|
|
898
|
+
channelIds: _.channelIds || O,
|
|
898
899
|
allChannels: O.length === 0 || O.length >= n.value.length,
|
|
899
900
|
// Use Pinia
|
|
900
901
|
layer_id: x,
|
|
901
|
-
userId:
|
|
902
|
+
userId: _.userId
|
|
902
903
|
};
|
|
903
|
-
|
|
904
|
-
let
|
|
904
|
+
_.linkedPackage && (j.linkedPackage = _.linkedPackage);
|
|
905
|
+
let N = 0;
|
|
905
906
|
for (let M = 0; M < r.value.length; M++)
|
|
906
907
|
if (r.value[M].id === x) {
|
|
907
|
-
|
|
908
|
+
N = M;
|
|
908
909
|
break;
|
|
909
910
|
}
|
|
910
|
-
return e.createAnnotation(
|
|
911
|
+
return e.createAnnotation(j), r.value[N] && r.value[N].annotations && s(r.value[N].annotations), j;
|
|
911
912
|
} catch (f) {
|
|
912
|
-
throw console.error("🔧 useTsAnnotation: Error creating annotation:", f),
|
|
913
|
+
throw console.error("🔧 useTsAnnotation: Error creating annotation:", f), $e(f), f;
|
|
913
914
|
}
|
|
914
915
|
},
|
|
915
|
-
updateAnnotation: async (
|
|
916
|
-
const
|
|
917
|
-
if (!
|
|
918
|
-
throw new TypeError("Trying to update an annotation that doesn't exist on server",
|
|
919
|
-
if (!
|
|
920
|
-
throw new TypeError("Missing layer_id for annotation update",
|
|
921
|
-
let
|
|
922
|
-
|
|
923
|
-
const
|
|
924
|
-
name:
|
|
925
|
-
label:
|
|
926
|
-
description:
|
|
927
|
-
start: Math.floor(
|
|
928
|
-
end: Math.floor(
|
|
929
|
-
channelIds:
|
|
930
|
-
}, U = e.activeViewer.content.id, x = `${e.config.apiUrl}/timeseries/${U}/layers/${
|
|
916
|
+
updateAnnotation: async (h = null) => {
|
|
917
|
+
const l = h || activeAnnotation.value;
|
|
918
|
+
if (!l.id)
|
|
919
|
+
throw new TypeError("Trying to update an annotation that doesn't exist on server", l.id);
|
|
920
|
+
if (!l.layer_id)
|
|
921
|
+
throw new TypeError("Missing layer_id for annotation update", l);
|
|
922
|
+
let g = l.start, w = l.duration || l.end - l.start;
|
|
923
|
+
w < 0 && (w = -w, g = g - w);
|
|
924
|
+
const b = {
|
|
925
|
+
name: l.label,
|
|
926
|
+
label: l.label,
|
|
927
|
+
description: l.description || "",
|
|
928
|
+
start: Math.floor(g),
|
|
929
|
+
end: Math.floor(g + w),
|
|
930
|
+
channelIds: l.channelIds || []
|
|
931
|
+
}, U = e.activeViewer.content.id, x = `${e.config.apiUrl}/timeseries/${U}/layers/${l.layer_id}/annotations/${l.id}`;
|
|
931
932
|
try {
|
|
932
|
-
const O = await Ee(),
|
|
933
|
+
const O = await Ee(), k = await fetch(`${x}?api_key=${O}`, {
|
|
933
934
|
method: "PUT",
|
|
934
935
|
headers: {
|
|
935
936
|
"Content-Type": "application/json",
|
|
936
937
|
Accept: "application/json"
|
|
937
938
|
},
|
|
938
|
-
body: JSON.stringify(
|
|
939
|
+
body: JSON.stringify(b)
|
|
939
940
|
});
|
|
940
|
-
if (!
|
|
941
|
-
const f = await
|
|
942
|
-
throw new Error(`HTTP ${
|
|
941
|
+
if (!k.ok) {
|
|
942
|
+
const f = await k.text();
|
|
943
|
+
throw new Error(`HTTP ${k.status}: ${f}`);
|
|
943
944
|
}
|
|
944
|
-
const L = await
|
|
945
|
-
...
|
|
945
|
+
const L = await k.json(), q = {
|
|
946
|
+
...l,
|
|
946
947
|
...L,
|
|
947
948
|
duration: L.end - L.start
|
|
948
949
|
};
|
|
949
950
|
return e.updateAnnotation(q), L;
|
|
950
951
|
} catch (O) {
|
|
951
|
-
throw console.error("🔧 useTsAnnotation: Error updating annotation:", O),
|
|
952
|
+
throw console.error("🔧 useTsAnnotation: Error updating annotation:", O), $e(O), O;
|
|
952
953
|
}
|
|
953
954
|
},
|
|
954
|
-
removeAnnotation: async (
|
|
955
|
-
if (!
|
|
956
|
-
throw new TypeError("Invalid annotation for deletion",
|
|
957
|
-
let
|
|
958
|
-
if (
|
|
959
|
-
throw new TypeError("Missing layer_id for annotation deletion",
|
|
960
|
-
const
|
|
955
|
+
removeAnnotation: async (h) => {
|
|
956
|
+
if (!h || !h.id)
|
|
957
|
+
throw new TypeError("Invalid annotation for deletion", h);
|
|
958
|
+
let l = "";
|
|
959
|
+
if (h.layer ? l = h.layer.id : l = h.layer_id, !l)
|
|
960
|
+
throw new TypeError("Missing layer_id for annotation deletion", h);
|
|
961
|
+
const g = e.activeViewer.content.id, w = `${e.config.apiUrl}/timeseries/${g}/layers/${l}/annotations/${h.id}`;
|
|
961
962
|
try {
|
|
962
|
-
const
|
|
963
|
+
const b = await Ee(), U = await fetch(`${w}?api_key=${b}`, {
|
|
963
964
|
method: "DELETE",
|
|
964
965
|
headers: {
|
|
965
966
|
Accept: "application/json"
|
|
@@ -969,30 +970,30 @@ function Fn(t = null) {
|
|
|
969
970
|
const x = await U.text();
|
|
970
971
|
throw new Error(`HTTP ${U.status}: ${x}`);
|
|
971
972
|
}
|
|
972
|
-
return e.deleteAnnotation(
|
|
973
|
-
} catch (
|
|
974
|
-
throw console.error("🔧 useTsAnnotation: Error deleting annotation:",
|
|
973
|
+
return e.deleteAnnotation(h), !0;
|
|
974
|
+
} catch (b) {
|
|
975
|
+
throw console.error("🔧 useTsAnnotation: Error deleting annotation:", b), $e(b), b;
|
|
975
976
|
}
|
|
976
977
|
},
|
|
977
|
-
sortAnns:
|
|
978
|
+
sortAnns: s,
|
|
978
979
|
getChannelId: a
|
|
979
980
|
};
|
|
980
981
|
}
|
|
981
982
|
function Wn() {
|
|
982
983
|
const t = (e) => {
|
|
983
|
-
const n =
|
|
984
|
+
const n = be("", ["detail", "msg"], e), r = me(n, "msg", e), a = be("info", ["detail", "type"], e).toLowerCase(), s = be(!1, ["detail", "showClose"], e), c = be(3e3, ["detail", "duration"], e);
|
|
984
985
|
r && en({
|
|
985
986
|
message: r,
|
|
986
987
|
type: a,
|
|
987
988
|
center: !0,
|
|
988
989
|
duration: c,
|
|
989
|
-
showClose:
|
|
990
|
+
showClose: s,
|
|
990
991
|
dangerouslyUseHTMLString: !0
|
|
991
992
|
});
|
|
992
993
|
};
|
|
993
|
-
|
|
994
|
+
yt(() => {
|
|
994
995
|
ie.$on("toast", t), ie.$on("ajaxError", t);
|
|
995
|
-
}),
|
|
996
|
+
}), gt(() => {
|
|
996
997
|
ie.$off("toast", t), ie.$off("ajaxError", t);
|
|
997
998
|
});
|
|
998
999
|
}
|
|
@@ -1028,7 +1029,7 @@ const qn = (t, e) => {
|
|
|
1028
1029
|
}
|
|
1029
1030
|
},
|
|
1030
1031
|
setup(t, { expose: e }) {
|
|
1031
|
-
const n = re(() => import("./TSScrubber-
|
|
1032
|
+
const n = re(() => import("./TSScrubber-hN5JY-DA.js")), r = re(() => import("./TSViewerCanvas-2Jz9ZgqW.js").then((i) => i.T)), a = re(() => import("./TSViewerToolbar-DL9XKYbV.js")), s = re(() => import("./TSFilterModal-DHBpbDNp.js")), c = re(() => import("./TSAnnotationModal-B3OSl05U.js")), A = re(() => import("./TsAnnotationDeleteDialog-DXgN07Wj.js")), I = re(() => import("./TSViewerLayerWindow-CalBmhT6.js")), h = {
|
|
1032
1033
|
TIMEUNIT: "microSeconds",
|
|
1033
1034
|
// Basis for time
|
|
1034
1035
|
XOFFSET: 0,
|
|
@@ -1065,51 +1066,51 @@ const qn = (t, e) => {
|
|
|
1065
1066
|
// Maximum duration window (5min)
|
|
1066
1067
|
INITDURATION: 15e6
|
|
1067
1068
|
// Initial duration window (15sec)
|
|
1068
|
-
},
|
|
1069
|
-
|
|
1069
|
+
}, l = t, g = Ve(l.instanceId), { viewerChannels: w, needsRerender: b } = Fe(g);
|
|
1070
|
+
Je("viewerStore", g), Je("viewerInstanceId", l.instanceId), Wn();
|
|
1070
1071
|
const {
|
|
1071
1072
|
addAnnotation: U,
|
|
1072
1073
|
updateAnnotation: x,
|
|
1073
1074
|
removeAnnotation: O
|
|
1074
|
-
} = Fn(
|
|
1075
|
+
} = Fn(g), k = m(null), L = m(null), q = m(null), f = m(null), V = m(null), _ = m(null), j = m(null), N = m(null), M = m(0), J = m(0), F = m(0), W = m(0), Y = m(0), Q = m(0), le = m(0), $ = m(1), ee = m(1 / 10), B = m(!1), ue = m(!1), ve = m(null), te = m(!1), ne = m(!1), y = H(() => g.activeViewer), T = H(() => w.value.map((i) => ({
|
|
1075
1076
|
...i,
|
|
1076
1077
|
selected: !!i.selected
|
|
1077
|
-
}))), X = H(() =>
|
|
1078
|
+
}))), X = H(() => T.value.filter((i) => i.visible)), Z = H(() => {
|
|
1078
1079
|
let i = !1;
|
|
1079
|
-
return Q.value /
|
|
1080
|
-
}),
|
|
1081
|
-
if (!
|
|
1080
|
+
return Q.value / ke.value < 30 && (i = !0), i;
|
|
1081
|
+
}), ke = H(() => X.value.length), pe = async () => {
|
|
1082
|
+
if (!k.value)
|
|
1082
1083
|
return;
|
|
1083
1084
|
const i = document.getElementById("ts_viewer");
|
|
1084
1085
|
if (!i)
|
|
1085
1086
|
return;
|
|
1086
|
-
const d = window.getComputedStyle(i, null),
|
|
1087
|
-
M.value =
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1087
|
+
const d = window.getComputedStyle(i, null), v = parseInt(d.getPropertyValue("height")), C = l.isPreview ? 0 : 100;
|
|
1088
|
+
M.value = v - C, await fe(), J.value = k.value.offsetWidth;
|
|
1089
|
+
const S = q.value;
|
|
1090
|
+
S && (le.value = S.clientWidth, Y.value = J.value - S.clientWidth - 16, Q.value = M.value - 40);
|
|
1090
1091
|
};
|
|
1091
|
-
|
|
1092
|
-
var
|
|
1093
|
-
(
|
|
1094
|
-
}, { immediate: !1, deep: !0 }), ke
|
|
1092
|
+
Pe(() => y.value, async (i, d) => {
|
|
1093
|
+
var v, C, S;
|
|
1094
|
+
(v = L.value) != null && v.resetComponentState && L.value.resetComponentState(), i && i.channels && i.channels.length > 0 && He(), Ze(), await fe(), (C = L.value) != null && C.initSegmentSpans && L.value.initSegmentSpans(), (S = L.value) != null && S.getAnnotations && L.value.getAnnotations();
|
|
1095
|
+
}, { immediate: !1, deep: !0 }), Pe(ke, (i, d) => {
|
|
1095
1096
|
d !== void 0 && i !== d && setTimeout(() => {
|
|
1096
|
-
var
|
|
1097
|
-
pe(), (
|
|
1097
|
+
var v;
|
|
1098
|
+
pe(), (v = f.value) != null && v.renderAll && f.value.renderAll();
|
|
1098
1099
|
}, 20);
|
|
1099
1100
|
});
|
|
1100
1101
|
const je = (i) => {
|
|
1101
|
-
|
|
1102
|
+
g.setActiveAnnotation(i), f.value.renderAnnotationCanvas(), B.value = !0;
|
|
1102
1103
|
};
|
|
1103
|
-
|
|
1104
|
+
Pe(b, (i) => {
|
|
1104
1105
|
i && (fe(() => {
|
|
1105
1106
|
var d;
|
|
1106
1107
|
i.cause === "channel-visibility" ? setTimeout(() => {
|
|
1107
|
-
var
|
|
1108
|
-
pe(), (
|
|
1108
|
+
var v;
|
|
1109
|
+
pe(), (v = f.value) != null && v.renderAll && f.value.renderAll();
|
|
1109
1110
|
}, 10) : (d = f.value) != null && d.renderAll && f.value.renderAll();
|
|
1110
|
-
}),
|
|
1111
|
+
}), g.resetRerenderTrigger(null));
|
|
1111
1112
|
}, { deep: !0 });
|
|
1112
|
-
const
|
|
1113
|
+
const Be = (i) => {
|
|
1113
1114
|
je(i);
|
|
1114
1115
|
}, o = async (i) => {
|
|
1115
1116
|
if (!i || Object.keys(i).length === 0) {
|
|
@@ -1122,15 +1123,15 @@ const qn = (t, e) => {
|
|
|
1122
1123
|
}
|
|
1123
1124
|
B.value = !1;
|
|
1124
1125
|
try {
|
|
1125
|
-
i.id ? (await x(i), u()) : (await U(i),
|
|
1126
|
+
i.id ? (await x(i), u()) : (await U(i), Me());
|
|
1126
1127
|
} catch (d) {
|
|
1127
1128
|
console.error("TSViewer: Error creating/updating annotation:", d), B.value = !0;
|
|
1128
1129
|
}
|
|
1129
1130
|
}, u = () => {
|
|
1130
1131
|
f.value.renderAnnotationCanvas();
|
|
1131
|
-
},
|
|
1132
|
+
}, p = (i) => {
|
|
1132
1133
|
ve.value = i, te.value = !0;
|
|
1133
|
-
},
|
|
1134
|
+
}, P = async (i) => {
|
|
1134
1135
|
te.value = !1;
|
|
1135
1136
|
try {
|
|
1136
1137
|
await O(i), ce();
|
|
@@ -1139,56 +1140,56 @@ const qn = (t, e) => {
|
|
|
1139
1140
|
}
|
|
1140
1141
|
}, ce = () => {
|
|
1141
1142
|
f.value.renderAnnotationCanvas();
|
|
1142
|
-
},
|
|
1143
|
-
if (!
|
|
1144
|
-
console.error("Invalid layer provided to onAddAnnotation:",
|
|
1143
|
+
}, De = (i, d, v, C, S, Se) => {
|
|
1144
|
+
if (!Se || !Se.id) {
|
|
1145
|
+
console.error("Invalid layer provided to onAddAnnotation:", Se);
|
|
1145
1146
|
return;
|
|
1146
1147
|
}
|
|
1147
|
-
const Bt =
|
|
1148
|
+
const Bt = g.viewerSelectedChannels || [], Xt = v ? [] : Bt.map((zt) => zt.id), Gt = {
|
|
1148
1149
|
id: null,
|
|
1149
|
-
label:
|
|
1150
|
-
description:
|
|
1150
|
+
label: C || "Event",
|
|
1151
|
+
description: S || "",
|
|
1151
1152
|
start: Math.floor(i),
|
|
1152
1153
|
end: Math.floor(i + d),
|
|
1153
1154
|
duration: Math.floor(d),
|
|
1154
1155
|
channelIds: Xt,
|
|
1155
|
-
allChannels:
|
|
1156
|
-
layer_id:
|
|
1156
|
+
allChannels: v,
|
|
1157
|
+
layer_id: Se.id,
|
|
1157
1158
|
selected: !0,
|
|
1158
1159
|
userId: null
|
|
1159
1160
|
};
|
|
1160
|
-
|
|
1161
|
-
},
|
|
1161
|
+
g.setActiveAnnotation(Gt), B.value = !0;
|
|
1162
|
+
}, Me = () => {
|
|
1162
1163
|
f.value.renderAnnotationCanvas();
|
|
1163
|
-
},
|
|
1164
|
+
}, Ce = (i) => {
|
|
1164
1165
|
f.value.createAnnotationLayer(i);
|
|
1165
|
-
},
|
|
1166
|
+
}, Xe = () => {
|
|
1166
1167
|
ue.value = !1;
|
|
1167
1168
|
}, bt = () => {
|
|
1168
1169
|
f.value.resetFocusedAnnotation(), f.value.renderAnnotationCanvas(), B.value = !1;
|
|
1169
1170
|
}, Tt = () => {
|
|
1170
1171
|
ne.value = !1;
|
|
1171
|
-
},
|
|
1172
|
+
}, It = (i) => {
|
|
1172
1173
|
i.stopPropagation(), i.preventDefault();
|
|
1173
1174
|
const d = i.detail.sourceEvent.metaKey;
|
|
1174
|
-
|
|
1175
|
-
},
|
|
1175
|
+
Ge({ channelId: i.currentTarget.dataset.id, append: d }), f.value.renderAll();
|
|
1176
|
+
}, Et = () => {
|
|
1176
1177
|
F.value = f.value.getNextAnnotation();
|
|
1177
1178
|
}, _t = () => {
|
|
1178
1179
|
F.value = f.value.getPreviousAnnotation();
|
|
1179
1180
|
}, Ot = (i) => {
|
|
1180
|
-
|
|
1181
|
+
ze(i * 1e6);
|
|
1181
1182
|
}, Lt = () => {
|
|
1182
1183
|
$.value = $.value * 1.25;
|
|
1183
1184
|
}, Vt = () => {
|
|
1184
1185
|
$.value = $.value * 0.8;
|
|
1185
|
-
}, jt = () => {
|
|
1186
|
-
L.value.getAnnotations();
|
|
1187
1186
|
}, kt = () => {
|
|
1187
|
+
L.value.getAnnotations();
|
|
1188
|
+
}, jt = () => {
|
|
1188
1189
|
}, Dt = () => {
|
|
1189
1190
|
const i = Math.max(
|
|
1190
1191
|
F.value - 0.75 * W.value,
|
|
1191
|
-
|
|
1192
|
+
j.value
|
|
1192
1193
|
);
|
|
1193
1194
|
de(i), fe(() => {
|
|
1194
1195
|
var d;
|
|
@@ -1197,58 +1198,58 @@ const qn = (t, e) => {
|
|
|
1197
1198
|
}, Mt = () => {
|
|
1198
1199
|
const i = Math.min(
|
|
1199
1200
|
F.value + 0.75 * W.value,
|
|
1200
|
-
|
|
1201
|
+
N.value - W.value
|
|
1201
1202
|
);
|
|
1202
1203
|
de(i), fe(() => {
|
|
1203
|
-
var d,
|
|
1204
|
-
(d = f.value) != null && d.invalidate && f.value.invalidate(), (
|
|
1204
|
+
var d, v;
|
|
1205
|
+
(d = f.value) != null && d.invalidate && f.value.invalidate(), (v = f.value) != null && v.renderAll && f.value.renderAll();
|
|
1205
1206
|
});
|
|
1206
1207
|
}, Pt = (i) => {
|
|
1207
1208
|
let d = f.value.rsPeriod;
|
|
1208
|
-
de(i.annotation.start - (ee.value * Y.value -
|
|
1209
|
-
var
|
|
1210
|
-
(
|
|
1209
|
+
de(i.annotation.start - (ee.value * Y.value - h.CURSOROFFSET) * d), fe(() => {
|
|
1210
|
+
var v;
|
|
1211
|
+
(v = f.value) == null || v.renderAll();
|
|
1211
1212
|
});
|
|
1212
|
-
},
|
|
1213
|
-
const d =
|
|
1214
|
-
const
|
|
1215
|
-
return i.append === !1 && (
|
|
1213
|
+
}, Ge = (i) => {
|
|
1214
|
+
const d = w.value.map((v) => {
|
|
1215
|
+
const C = v.selected;
|
|
1216
|
+
return i.append === !1 && (v.selected = !1), i.channelId === v.id && (v.selected = !C), v;
|
|
1216
1217
|
});
|
|
1217
|
-
|
|
1218
|
+
g.setChannels(d);
|
|
1218
1219
|
}, Rt = (i, d) => {
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1220
|
+
const v = w.value.map((C) => (d === !1 && (C.selected = !1), C.id in i && (C.selected = !0), C));
|
|
1221
|
+
g.setChannels(v);
|
|
1221
1222
|
}, de = (i) => {
|
|
1222
1223
|
F.value = i;
|
|
1223
1224
|
}, Nt = (i) => {
|
|
1224
1225
|
ee.value = i;
|
|
1225
1226
|
}, Ut = (i) => {
|
|
1226
1227
|
$.value = i;
|
|
1227
|
-
},
|
|
1228
|
-
i >
|
|
1229
|
-
}, xt = (i, d,
|
|
1228
|
+
}, ze = (i) => {
|
|
1229
|
+
i > h.MAXDURATION ? W.value = h.MAXDURATION : W.value = i;
|
|
1230
|
+
}, xt = (i, d, v) => (h.DEFAULTDPI * window.devicePixelRatio / (d * v) / 25.4).toFixed(1) + " " + i.unit + "/mm", He = () => {
|
|
1230
1231
|
var d;
|
|
1231
|
-
const i = (d =
|
|
1232
|
+
const i = (d = y.value) == null ? void 0 : d.channels;
|
|
1232
1233
|
if (i && i.length > 0) {
|
|
1233
|
-
|
|
1234
|
-
for (let
|
|
1235
|
-
i[
|
|
1236
|
-
F.value =
|
|
1234
|
+
j.value = i[0].start, N.value = i[0].end;
|
|
1235
|
+
for (let v = 1; v < i.length; v++)
|
|
1236
|
+
i[v].start < j.value && (j.value = i[v].start), i[v].end > N.value && (N.value = i[v].end);
|
|
1237
|
+
F.value = j.value;
|
|
1237
1238
|
}
|
|
1238
1239
|
}, $t = () => {
|
|
1239
|
-
|
|
1240
|
+
He();
|
|
1240
1241
|
}, Ft = (i) => {
|
|
1241
1242
|
ue.value = !0;
|
|
1242
1243
|
}, Wt = (i) => {
|
|
1243
|
-
const d = me([], "channels", i),
|
|
1244
|
-
|
|
1244
|
+
const d = me([], "channels", i), v = me("", "filter", i), C = V.value;
|
|
1245
|
+
C && (C.onChannels = d, On(v) ? (C.input0 = NaN, C.input1 = NaN, C.selectedFilter = null, C.selectedNotch = null) : (C.input0 = v.input0, C.input1 = v.input1), ne.value = !0);
|
|
1245
1246
|
}, qt = (i) => {
|
|
1246
1247
|
f.value.setFilters(i);
|
|
1247
|
-
},
|
|
1248
|
+
}, Ze = () => {
|
|
1248
1249
|
var i, d;
|
|
1249
1250
|
(i = f.value) == null || i.initViewerCanvas(), (d = f.value) == null || d.renderAll();
|
|
1250
1251
|
};
|
|
1251
|
-
return
|
|
1252
|
+
return yt(() => {
|
|
1252
1253
|
$t();
|
|
1253
1254
|
const i = document.getElementById("ts_viewer");
|
|
1254
1255
|
if (!i) {
|
|
@@ -1256,41 +1257,41 @@ const qn = (t, e) => {
|
|
|
1256
1257
|
return;
|
|
1257
1258
|
}
|
|
1258
1259
|
var d = window.getComputedStyle(i, null);
|
|
1259
|
-
const
|
|
1260
|
-
M.value =
|
|
1261
|
-
const
|
|
1262
|
-
|
|
1263
|
-
}),
|
|
1264
|
-
window.removeEventListener("resize", pe), Dn(
|
|
1260
|
+
const v = parseInt(d.getPropertyValue("height")), C = l.isPreview ? 0 : 100;
|
|
1261
|
+
M.value = v - C, k.value && (J.value = k.value.offsetWidth), window.addEventListener("resize", pe);
|
|
1262
|
+
const S = q.value;
|
|
1263
|
+
S && (le.value = S.clientWidth, Y.value = J.value - S.clientWidth - 5 - 10, Q.value = M.value - 88), W.value = h.INITDURATION, Ze();
|
|
1264
|
+
}), gt(() => {
|
|
1265
|
+
window.removeEventListener("resize", pe), Dn(l.instanceId);
|
|
1265
1266
|
}), e({
|
|
1266
1267
|
openEditAnnotationDialog: je,
|
|
1267
|
-
confirmDeleteAnnotation:
|
|
1268
|
+
confirmDeleteAnnotation: p,
|
|
1268
1269
|
selectAnnotation: Pt,
|
|
1269
|
-
selectChannel:
|
|
1270
|
+
selectChannel: Ge,
|
|
1270
1271
|
selectChannels: Rt,
|
|
1271
1272
|
openLayerWindow: Ft,
|
|
1272
1273
|
openFilterWindow: Wt,
|
|
1273
1274
|
setTimeseriesFilters: qt
|
|
1274
1275
|
}), (i, d) => {
|
|
1275
|
-
var
|
|
1276
|
-
return he(),
|
|
1276
|
+
var v, C;
|
|
1277
|
+
return he(), Re("div", {
|
|
1277
1278
|
id: "ts_viewer",
|
|
1278
1279
|
ref_key: "ts_viewer",
|
|
1279
|
-
ref:
|
|
1280
|
-
class:
|
|
1280
|
+
ref: k,
|
|
1281
|
+
class: Ne([t.isPreview ? "timeseries-viewer preview" : "timeseries-viewer"])
|
|
1281
1282
|
}, [
|
|
1282
1283
|
ye(ae(n), {
|
|
1283
1284
|
ref_key: "scrubber",
|
|
1284
1285
|
ref: L,
|
|
1285
|
-
ts_start:
|
|
1286
|
-
ts_end:
|
|
1286
|
+
ts_start: j.value,
|
|
1287
|
+
ts_end: N.value,
|
|
1287
1288
|
"c-width": Y.value,
|
|
1288
1289
|
"label-width": le.value,
|
|
1289
1290
|
"cursor-loc": ee.value,
|
|
1290
1291
|
start: F.value,
|
|
1291
1292
|
duration: W.value,
|
|
1292
|
-
constants:
|
|
1293
|
-
"active-viewer":
|
|
1293
|
+
constants: h,
|
|
1294
|
+
"active-viewer": y.value,
|
|
1294
1295
|
onSetStart: de
|
|
1295
1296
|
}, null, 8, ["ts_start", "ts_end", "c-width", "label-width", "cursor-loc", "start", "duration", "active-viewer"]),
|
|
1296
1297
|
ge("div", Bn, [
|
|
@@ -1299,27 +1300,27 @@ const qn = (t, e) => {
|
|
|
1299
1300
|
ref_key: "channelLabels",
|
|
1300
1301
|
ref: q
|
|
1301
1302
|
}, [
|
|
1302
|
-
(he(!0),
|
|
1303
|
-
key:
|
|
1303
|
+
(he(!0), Re(Jt, null, Yt(X.value, (S) => (he(), Re("div", {
|
|
1304
|
+
key: S.displayName,
|
|
1304
1305
|
class: "chLabelWrap",
|
|
1305
|
-
"data-id":
|
|
1306
|
-
onTap:
|
|
1306
|
+
"data-id": S.id,
|
|
1307
|
+
onTap: It
|
|
1307
1308
|
}, [
|
|
1308
1309
|
ge("div", {
|
|
1309
|
-
class:
|
|
1310
|
-
},
|
|
1310
|
+
class: Ne([S.selected ? "labelDiv selected" : "labelDiv"])
|
|
1311
|
+
}, Qe(S.displayName), 3),
|
|
1311
1312
|
ge("div", {
|
|
1312
|
-
class:
|
|
1313
|
+
class: Ne(["chLabelIndWrap", [S.selected ? "selected" : ""]]),
|
|
1313
1314
|
hidden: Z.value
|
|
1314
1315
|
}, [
|
|
1315
1316
|
ge("div", {
|
|
1316
1317
|
class: "chLabelInd",
|
|
1317
1318
|
hidden: Z.value
|
|
1318
|
-
},
|
|
1319
|
+
}, Qe(xt(S, $.value, S.rowScale)), 9, zn)
|
|
1319
1320
|
], 10, Gn)
|
|
1320
1321
|
], 40, Xn))), 128))
|
|
1321
1322
|
], 512),
|
|
1322
|
-
(
|
|
1323
|
+
(C = (v = y.value) == null ? void 0 : v.content) != null && C.id ? (he(), Ye(ae(r), {
|
|
1323
1324
|
key: 0,
|
|
1324
1325
|
ref_key: "viewerCanvas",
|
|
1325
1326
|
ref: f,
|
|
@@ -1329,165 +1330,165 @@ const qn = (t, e) => {
|
|
|
1329
1330
|
start: F.value,
|
|
1330
1331
|
"c-width": Y.value,
|
|
1331
1332
|
"c-height": Q.value,
|
|
1332
|
-
constants:
|
|
1333
|
-
"ts-start":
|
|
1334
|
-
"ts-end":
|
|
1333
|
+
constants: h,
|
|
1334
|
+
"ts-start": j.value,
|
|
1335
|
+
"ts-end": N.value,
|
|
1335
1336
|
"cursor-loc": ee.value,
|
|
1336
1337
|
"global-zoom-mult": $.value,
|
|
1337
|
-
"active-viewer":
|
|
1338
|
+
"active-viewer": y.value,
|
|
1338
1339
|
onSetStart: de,
|
|
1339
1340
|
onSetCursor: Nt,
|
|
1340
1341
|
onSetGlobalZoom: Ut,
|
|
1341
|
-
onSetDuration:
|
|
1342
|
-
onChannelsInitialized:
|
|
1343
|
-
onAnnLayersInitialized:
|
|
1344
|
-
onCloseAnnotationLayerWindow:
|
|
1345
|
-
onAddAnnotation:
|
|
1346
|
-
onUpdateAnnotation:
|
|
1347
|
-
}, null, 8, ["window_height", "window_width", "duration", "start", "c-width", "c-height", "ts-start", "ts-end", "cursor-loc", "global-zoom-mult", "active-viewer"])) :
|
|
1342
|
+
onSetDuration: ze,
|
|
1343
|
+
onChannelsInitialized: jt,
|
|
1344
|
+
onAnnLayersInitialized: kt,
|
|
1345
|
+
onCloseAnnotationLayerWindow: Xe,
|
|
1346
|
+
onAddAnnotation: De,
|
|
1347
|
+
onUpdateAnnotation: Be
|
|
1348
|
+
}, null, 8, ["window_height", "window_width", "duration", "start", "c-width", "c-height", "ts-start", "ts-end", "cursor-loc", "global-zoom-mult", "active-viewer"])) : Ke("", !0)
|
|
1348
1349
|
]),
|
|
1349
|
-
t.isPreview ?
|
|
1350
|
+
t.isPreview ? Ke("", !0) : (he(), Ye(ae(a), {
|
|
1350
1351
|
key: 0,
|
|
1351
|
-
constants:
|
|
1352
|
+
constants: h,
|
|
1352
1353
|
duration: W.value,
|
|
1353
1354
|
start: F.value,
|
|
1354
1355
|
globalZoomMult: $.value,
|
|
1355
|
-
"onUpdate:globalZoomMult": d[0] || (d[0] = (
|
|
1356
|
+
"onUpdate:globalZoomMult": d[0] || (d[0] = (S) => $.value = S),
|
|
1356
1357
|
onPageBack: Dt,
|
|
1357
1358
|
onPageForward: Mt,
|
|
1358
1359
|
onIncrementZoom: Lt,
|
|
1359
1360
|
onDecrementZoom: Vt,
|
|
1360
1361
|
onUpdateDuration: Ot,
|
|
1361
|
-
onNextAnnotation:
|
|
1362
|
+
onNextAnnotation: Et,
|
|
1362
1363
|
onPreviousAnnotation: _t,
|
|
1363
1364
|
onSetStart: de
|
|
1364
1365
|
}, null, 8, ["duration", "start", "globalZoomMult"])),
|
|
1365
|
-
ye(ae(
|
|
1366
|
+
ye(ae(s), {
|
|
1366
1367
|
ref_key: "filterWindow",
|
|
1367
1368
|
ref: V,
|
|
1368
1369
|
visible: ne.value,
|
|
1369
|
-
"onUpdate:visible": d[1] || (d[1] = (
|
|
1370
|
+
"onUpdate:visible": d[1] || (d[1] = (S) => ne.value = S),
|
|
1370
1371
|
onCloseWindow: Tt
|
|
1371
1372
|
}, null, 8, ["visible"]),
|
|
1372
1373
|
ye(ae(c), {
|
|
1373
1374
|
ref_key: "annotationModal",
|
|
1374
|
-
ref:
|
|
1375
|
+
ref: _,
|
|
1375
1376
|
visible: B.value,
|
|
1376
|
-
"onUpdate:visible": d[2] || (d[2] = (
|
|
1377
|
+
"onUpdate:visible": d[2] || (d[2] = (S) => B.value = S),
|
|
1377
1378
|
onCloseWindow: bt,
|
|
1378
1379
|
onCreateUpdateAnnotation: o
|
|
1379
1380
|
}, null, 8, ["visible"]),
|
|
1380
|
-
ye(ae(
|
|
1381
|
+
ye(ae(A), {
|
|
1381
1382
|
visible: te.value,
|
|
1382
1383
|
"delete-annotation": ve.value,
|
|
1383
|
-
"onUpdate:visible": d[3] || (d[3] = (
|
|
1384
|
-
onDelete:
|
|
1384
|
+
"onUpdate:visible": d[3] || (d[3] = (S) => te.value = S),
|
|
1385
|
+
onDelete: P
|
|
1385
1386
|
}, null, 8, ["visible", "delete-annotation"]),
|
|
1386
|
-
ye(ae(
|
|
1387
|
+
ye(ae(I), {
|
|
1387
1388
|
visible: ue.value,
|
|
1388
|
-
onCloseWindow:
|
|
1389
|
-
onCreateLayer:
|
|
1389
|
+
onCloseWindow: Xe,
|
|
1390
|
+
onCreateLayer: Ce
|
|
1390
1391
|
}, null, 8, ["visible"])
|
|
1391
1392
|
], 2);
|
|
1392
1393
|
};
|
|
1393
1394
|
}
|
|
1394
1395
|
}, Zn = /* @__PURE__ */ qn(Hn, [["__scopeId", "data-v-4fa75a6c"]]);
|
|
1395
1396
|
function ar(t = "default") {
|
|
1396
|
-
const e =
|
|
1397
|
+
const e = Ve(t), {
|
|
1397
1398
|
viewerChannels: n,
|
|
1398
1399
|
viewerAnnotations: r,
|
|
1399
1400
|
viewerActiveTool: a,
|
|
1400
|
-
viewerSelectedChannels:
|
|
1401
|
+
viewerSelectedChannels: s,
|
|
1401
1402
|
activeAnnotation: c,
|
|
1402
|
-
activeAnnotationLayer:
|
|
1403
|
-
viewerMontageScheme:
|
|
1404
|
-
viewerErrors:
|
|
1405
|
-
config:
|
|
1406
|
-
activeViewer:
|
|
1407
|
-
} =
|
|
1403
|
+
activeAnnotationLayer: A,
|
|
1404
|
+
viewerMontageScheme: I,
|
|
1405
|
+
viewerErrors: h,
|
|
1406
|
+
config: l,
|
|
1407
|
+
activeViewer: g
|
|
1408
|
+
} = Fe(e), w = oe(n), b = H(() => s.value), U = oe(r), x = oe(a), O = oe(I), k = oe(h), L = oe(l), q = oe(g);
|
|
1408
1409
|
return {
|
|
1409
1410
|
// Readonly state
|
|
1410
|
-
channels:
|
|
1411
|
-
selectedChannels:
|
|
1411
|
+
channels: w,
|
|
1412
|
+
selectedChannels: b,
|
|
1412
1413
|
annotations: U,
|
|
1413
1414
|
activeTool: x,
|
|
1414
1415
|
montageScheme: O,
|
|
1415
|
-
errors:
|
|
1416
|
+
errors: k,
|
|
1416
1417
|
viewerConfig: L,
|
|
1417
1418
|
viewer: q,
|
|
1418
1419
|
// State queries
|
|
1419
|
-
getChannel: (
|
|
1420
|
-
getAnnotation: (
|
|
1420
|
+
getChannel: (y) => n.value.find((T) => T.id === y),
|
|
1421
|
+
getAnnotation: (y) => e.getAnnotationById(y),
|
|
1421
1422
|
getActiveLayer: () => e.getViewerActiveLayer(),
|
|
1422
|
-
getVisibleChannels: () => n.value.filter((
|
|
1423
|
+
getVisibleChannels: () => n.value.filter((y) => y.visible),
|
|
1423
1424
|
getState: () => ({
|
|
1424
1425
|
channels: n.value,
|
|
1425
|
-
selectedChannels:
|
|
1426
|
+
selectedChannels: s.value,
|
|
1426
1427
|
annotations: r.value,
|
|
1427
1428
|
activeLayer: e.getViewerActiveLayer(),
|
|
1428
1429
|
activeTool: a.value,
|
|
1429
|
-
montageScheme:
|
|
1430
|
-
errors:
|
|
1430
|
+
montageScheme: I.value,
|
|
1431
|
+
errors: h.value
|
|
1431
1432
|
}),
|
|
1432
1433
|
// Channel controls
|
|
1433
|
-
selectChannels: (
|
|
1434
|
+
selectChannels: (y, T = !1) => {
|
|
1434
1435
|
const X = n.value.map((Z) => ({
|
|
1435
1436
|
...Z,
|
|
1436
|
-
selected:
|
|
1437
|
+
selected: T ? Z.selected : !1
|
|
1437
1438
|
}));
|
|
1438
1439
|
X.forEach((Z) => {
|
|
1439
|
-
|
|
1440
|
+
y.includes(Z.id) && (Z.selected = !0);
|
|
1440
1441
|
}), e.setChannels(X);
|
|
1441
1442
|
},
|
|
1442
1443
|
clearChannelSelection: () => {
|
|
1443
|
-
const
|
|
1444
|
-
...
|
|
1444
|
+
const y = n.value.map((T) => ({
|
|
1445
|
+
...T,
|
|
1445
1446
|
selected: !1
|
|
1446
1447
|
}));
|
|
1447
|
-
e.setChannels(
|
|
1448
|
+
e.setChannels(y);
|
|
1448
1449
|
},
|
|
1449
|
-
toggleChannelVisibility: (
|
|
1450
|
-
const
|
|
1451
|
-
|
|
1450
|
+
toggleChannelVisibility: (y) => {
|
|
1451
|
+
const T = n.value.find((X) => X.id === y);
|
|
1452
|
+
T && (e.updateChannelVisibility(y, !T.visible), e.triggerRerender("channel-visibility"));
|
|
1452
1453
|
},
|
|
1453
|
-
setChannelVisibility: (
|
|
1454
|
-
e.updateChannelVisibility(
|
|
1454
|
+
setChannelVisibility: (y, T) => {
|
|
1455
|
+
e.updateChannelVisibility(y, T), e.triggerRerender("channel-visibility");
|
|
1455
1456
|
},
|
|
1456
1457
|
showAllChannels: () => {
|
|
1457
|
-
n.value.forEach((
|
|
1458
|
-
e.updateChannelVisibility(
|
|
1458
|
+
n.value.forEach((y) => {
|
|
1459
|
+
e.updateChannelVisibility(y.id, !0);
|
|
1459
1460
|
}), e.triggerRerender("channel-visibility");
|
|
1460
1461
|
},
|
|
1461
1462
|
hideAllChannels: () => {
|
|
1462
|
-
n.value.forEach((
|
|
1463
|
-
e.updateChannelVisibility(
|
|
1463
|
+
n.value.forEach((y) => {
|
|
1464
|
+
e.updateChannelVisibility(y.id, !1);
|
|
1464
1465
|
}), e.triggerRerender("channel-visibility");
|
|
1465
1466
|
},
|
|
1466
1467
|
// Annotation controls
|
|
1467
|
-
selectAnnotation: (
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1468
|
+
selectAnnotation: (y) => {
|
|
1469
|
+
const T = e.getAnnotationById(y);
|
|
1470
|
+
T && e.setActiveAnnotation(T);
|
|
1470
1471
|
},
|
|
1471
|
-
setActiveLayer: (
|
|
1472
|
-
e.setActiveAnnotationLayer(
|
|
1472
|
+
setActiveLayer: (y) => {
|
|
1473
|
+
e.setActiveAnnotationLayer(y);
|
|
1473
1474
|
},
|
|
1474
|
-
toggleLayerVisibility: (
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1475
|
+
toggleLayerVisibility: (y) => {
|
|
1476
|
+
const T = r.value.find((X) => X.id === y);
|
|
1477
|
+
T && (T.visible = !T.visible, e.updateLayer(T), e.triggerRerender("layer-visibility"));
|
|
1477
1478
|
},
|
|
1478
1479
|
// Tool controls
|
|
1479
|
-
setActiveTool: (
|
|
1480
|
-
e.setActiveTool(
|
|
1480
|
+
setActiveTool: (y) => {
|
|
1481
|
+
e.setActiveTool(y);
|
|
1481
1482
|
},
|
|
1482
1483
|
// Viewer controls
|
|
1483
|
-
setConfig: (
|
|
1484
|
-
e.setViewerConfig(
|
|
1484
|
+
setConfig: (y) => {
|
|
1485
|
+
e.setViewerConfig(y);
|
|
1485
1486
|
},
|
|
1486
|
-
setActiveViewer: (
|
|
1487
|
-
e.setActiveViewer(
|
|
1487
|
+
setActiveViewer: (y) => {
|
|
1488
|
+
e.setActiveViewer(y);
|
|
1488
1489
|
},
|
|
1489
|
-
triggerRerender: (
|
|
1490
|
-
e.triggerRerender(
|
|
1490
|
+
triggerRerender: (y = "external") => {
|
|
1491
|
+
e.triggerRerender(y);
|
|
1491
1492
|
},
|
|
1492
1493
|
reset: () => {
|
|
1493
1494
|
e.resetViewer();
|
|
@@ -1505,29 +1506,29 @@ export {
|
|
|
1505
1506
|
ie as E,
|
|
1506
1507
|
Zn as T,
|
|
1507
1508
|
E as _,
|
|
1508
|
-
|
|
1509
|
+
We as a,
|
|
1509
1510
|
D as b,
|
|
1510
|
-
|
|
1511
|
+
R as c,
|
|
1511
1512
|
on as d,
|
|
1512
1513
|
rn as e,
|
|
1513
1514
|
fn as f,
|
|
1514
1515
|
qn as g,
|
|
1515
|
-
|
|
1516
|
+
Ve as h,
|
|
1516
1517
|
rr as i,
|
|
1517
|
-
|
|
1518
|
-
|
|
1518
|
+
$e as j,
|
|
1519
|
+
it as k,
|
|
1519
1520
|
an as l,
|
|
1520
1521
|
nr as m,
|
|
1521
|
-
|
|
1522
|
+
At as n,
|
|
1522
1523
|
Pn as o,
|
|
1523
1524
|
me as p,
|
|
1524
1525
|
z as q,
|
|
1525
1526
|
we as r,
|
|
1526
|
-
|
|
1527
|
-
|
|
1527
|
+
be as s,
|
|
1528
|
+
Dn as t,
|
|
1528
1529
|
Ee as u,
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1530
|
+
er as v,
|
|
1531
|
+
ar as w,
|
|
1532
|
+
tr as x,
|
|
1533
|
+
or as y
|
|
1533
1534
|
};
|