tsviewer 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -11
- package/dist/{BFButton-CI70UW6L.mjs → BFLibraryButton-BNlclUro.mjs} +12 -12
- package/dist/{IconSelection-CFPXCYRf.mjs → IconSelection-CzE3ngGY.mjs} +1 -1
- package/dist/{TSAnnotationCanvas-CvgQNy_8.mjs → TSAnnotationCanvas-CoRxWjXn.mjs} +3 -3
- package/dist/{TSAnnotationModal-EjnPa9Zo.mjs → TSAnnotationModal-B-OHQVza.mjs} +4 -4
- package/dist/{TSFilterModal-CJH8zXyp.mjs → TSFilterModal-ZewnIuXD.mjs} +5 -5
- package/dist/{TSScrubber-BHyiFEEN.mjs → TSScrubber-CfI0H_CE.mjs} +89 -89
- package/dist/{TSViewerCanvas-bkWRtQiL.mjs → TSViewerCanvas-BZitVLGc.mjs} +773 -779
- package/dist/{TSViewerLayerWindow-BQ94kN9H.mjs → TSViewerLayerWindow-U3NyH3nc.mjs} +20 -20
- package/dist/{TSViewerToolbar-Difc8d0T.mjs → TSViewerToolbar-BwtRehDx.mjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-DxKI_m1a.mjs → TsAnnotationDeleteDialog-Ce9pB5DQ.mjs} +19 -19
- package/dist/{index-knEI45_O.mjs → index-BPrTaCv-.mjs} +545 -520
- package/dist/{pathOr-DBQF4FRd.mjs → pathOr-B0o1s29P.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,12 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import { fetchAuthSession as
|
|
4
|
-
function
|
|
1
|
+
import { ref as y, computed as z, defineAsyncComponent as Z, watch as Te, nextTick as ne, onMounted as Vt, onBeforeUnmount as Wt, createElementBlock as Ie, openBlock as de, normalizeClass as _e, createVNode as re, createElementVNode as ue, createBlock as $t, createCommentVNode as Ft, unref as J, Fragment as xt, renderList as qt, toDisplayString as je } from "vue";
|
|
2
|
+
import { defineStore as Bt, storeToRefs as Ze } from "pinia";
|
|
3
|
+
import { fetchAuthSession as zt } from "aws-amplify/auth";
|
|
4
|
+
function S(t) {
|
|
5
5
|
return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function D(t) {
|
|
8
8
|
return function e(n) {
|
|
9
|
-
return arguments.length === 0 ||
|
|
9
|
+
return arguments.length === 0 || S(n) ? e : t.apply(this, arguments);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
function N(t) {
|
|
@@ -15,19 +15,19 @@ function N(t) {
|
|
|
15
15
|
case 0:
|
|
16
16
|
return e;
|
|
17
17
|
case 1:
|
|
18
|
-
return
|
|
18
|
+
return S(n) ? e : D(function(i) {
|
|
19
19
|
return t(n, i);
|
|
20
20
|
});
|
|
21
21
|
default:
|
|
22
|
-
return
|
|
22
|
+
return S(n) && S(o) ? e : S(n) ? D(function(i) {
|
|
23
23
|
return t(i, o);
|
|
24
|
-
}) :
|
|
24
|
+
}) : S(o) ? D(function(i) {
|
|
25
25
|
return t(n, i);
|
|
26
26
|
}) : t(n, o);
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Xt(t, e) {
|
|
31
31
|
t = t || [], e = e || [];
|
|
32
32
|
var n, o = t.length, i = e.length, u = [];
|
|
33
33
|
for (n = 0; n < o; )
|
|
@@ -36,7 +36,7 @@ function Wt(t, e) {
|
|
|
36
36
|
u[u.length] = e[n], n += 1;
|
|
37
37
|
return u;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Ee(t, e) {
|
|
40
40
|
switch (t) {
|
|
41
41
|
case 0:
|
|
42
42
|
return function() {
|
|
@@ -59,27 +59,27 @@ function Ce(t, e) {
|
|
|
59
59
|
return e.apply(this, arguments);
|
|
60
60
|
};
|
|
61
61
|
case 5:
|
|
62
|
-
return function(n, o, i, u,
|
|
62
|
+
return function(n, o, i, u, g) {
|
|
63
63
|
return e.apply(this, arguments);
|
|
64
64
|
};
|
|
65
65
|
case 6:
|
|
66
|
-
return function(n, o, i, u,
|
|
66
|
+
return function(n, o, i, u, g, A) {
|
|
67
67
|
return e.apply(this, arguments);
|
|
68
68
|
};
|
|
69
69
|
case 7:
|
|
70
|
-
return function(n, o, i, u,
|
|
70
|
+
return function(n, o, i, u, g, A, l) {
|
|
71
71
|
return e.apply(this, arguments);
|
|
72
72
|
};
|
|
73
73
|
case 8:
|
|
74
|
-
return function(n, o, i, u,
|
|
74
|
+
return function(n, o, i, u, g, A, l, s) {
|
|
75
75
|
return e.apply(this, arguments);
|
|
76
76
|
};
|
|
77
77
|
case 9:
|
|
78
|
-
return function(n, o, i, u,
|
|
78
|
+
return function(n, o, i, u, g, A, l, s, m) {
|
|
79
79
|
return e.apply(this, arguments);
|
|
80
80
|
};
|
|
81
81
|
case 10:
|
|
82
|
-
return function(n, o, i, u,
|
|
82
|
+
return function(n, o, i, u, g, A, l, s, m, h) {
|
|
83
83
|
return e.apply(this, arguments);
|
|
84
84
|
};
|
|
85
85
|
default:
|
|
@@ -92,29 +92,29 @@ function ge(t) {
|
|
|
92
92
|
case 0:
|
|
93
93
|
return e;
|
|
94
94
|
case 1:
|
|
95
|
-
return
|
|
96
|
-
return t(n, u,
|
|
95
|
+
return S(n) ? e : N(function(u, g) {
|
|
96
|
+
return t(n, u, g);
|
|
97
97
|
});
|
|
98
98
|
case 2:
|
|
99
|
-
return
|
|
100
|
-
return t(u, o,
|
|
101
|
-
}) :
|
|
102
|
-
return t(n, u,
|
|
103
|
-
}) :
|
|
99
|
+
return S(n) && S(o) ? e : S(n) ? N(function(u, g) {
|
|
100
|
+
return t(u, o, g);
|
|
101
|
+
}) : S(o) ? N(function(u, g) {
|
|
102
|
+
return t(n, u, g);
|
|
103
|
+
}) : D(function(u) {
|
|
104
104
|
return t(n, o, u);
|
|
105
105
|
});
|
|
106
106
|
default:
|
|
107
|
-
return
|
|
108
|
-
return t(u,
|
|
109
|
-
}) :
|
|
110
|
-
return t(u, o,
|
|
111
|
-
}) :
|
|
112
|
-
return t(n, u,
|
|
113
|
-
}) :
|
|
107
|
+
return S(n) && S(o) && S(i) ? e : S(n) && S(o) ? N(function(u, g) {
|
|
108
|
+
return t(u, g, i);
|
|
109
|
+
}) : S(n) && S(i) ? N(function(u, g) {
|
|
110
|
+
return t(u, o, g);
|
|
111
|
+
}) : S(o) && S(i) ? N(function(u, g) {
|
|
112
|
+
return t(n, u, g);
|
|
113
|
+
}) : S(n) ? D(function(u) {
|
|
114
114
|
return t(u, o, i);
|
|
115
|
-
}) :
|
|
115
|
+
}) : S(o) ? D(function(u) {
|
|
116
116
|
return t(n, u, i);
|
|
117
|
-
}) :
|
|
117
|
+
}) : S(i) ? D(function(u) {
|
|
118
118
|
return t(n, o, u);
|
|
119
119
|
}) : t(n, o, i);
|
|
120
120
|
}
|
|
@@ -123,10 +123,10 @@ function ge(t) {
|
|
|
123
123
|
const ye = Array.isArray || function(e) {
|
|
124
124
|
return e != null && e.length >= 0 && Object.prototype.toString.call(e) === "[object Array]";
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function Gt(t) {
|
|
127
127
|
return t != null && typeof t["@@transducer/step"] == "function";
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Ht(t, e, n) {
|
|
130
130
|
return function() {
|
|
131
131
|
if (arguments.length === 0)
|
|
132
132
|
return n();
|
|
@@ -137,7 +137,7 @@ function Bt(t, e, n) {
|
|
|
137
137
|
return o[t[i]].apply(o, Array.prototype.slice.call(arguments, 0, -1));
|
|
138
138
|
i += 1;
|
|
139
139
|
}
|
|
140
|
-
if (
|
|
140
|
+
if (Gt(o)) {
|
|
141
141
|
var u = e.apply(null, Array.prototype.slice.call(arguments, 0, -1));
|
|
142
142
|
return u(o);
|
|
143
143
|
}
|
|
@@ -145,13 +145,13 @@ function Bt(t, e, n) {
|
|
|
145
145
|
return n.apply(this, arguments);
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Zt(t) {
|
|
149
149
|
return t && t["@@transducer/reduced"] ? t : {
|
|
150
150
|
"@@transducer/value": t,
|
|
151
151
|
"@@transducer/reduced": !0
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const Jt = {
|
|
155
155
|
init: function() {
|
|
156
156
|
return this.xf["@@transducer/init"]();
|
|
157
157
|
},
|
|
@@ -162,9 +162,9 @@ const Xt = {
|
|
|
162
162
|
function me(t) {
|
|
163
163
|
return Object.prototype.toString.call(t) === "[object String]";
|
|
164
164
|
}
|
|
165
|
-
var
|
|
165
|
+
var Yt = /* @__PURE__ */ D(function(e) {
|
|
166
166
|
return ye(e) ? !0 : !e || typeof e != "object" || me(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
|
|
167
|
-
}),
|
|
167
|
+
}), Kt = /* @__PURE__ */ function() {
|
|
168
168
|
function t(e) {
|
|
169
169
|
this.f = e;
|
|
170
170
|
}
|
|
@@ -176,15 +176,15 @@ var Gt = /* @__PURE__ */ L(function(e) {
|
|
|
176
176
|
return this.f(e, n);
|
|
177
177
|
}, t;
|
|
178
178
|
}();
|
|
179
|
-
function
|
|
180
|
-
return new
|
|
179
|
+
function Qt(t) {
|
|
180
|
+
return new Kt(t);
|
|
181
181
|
}
|
|
182
|
-
var
|
|
183
|
-
return
|
|
182
|
+
var en = /* @__PURE__ */ N(function(e, n) {
|
|
183
|
+
return Ee(e.length, function() {
|
|
184
184
|
return e.apply(n, arguments);
|
|
185
185
|
});
|
|
186
186
|
});
|
|
187
|
-
function
|
|
187
|
+
function tn(t, e, n) {
|
|
188
188
|
for (var o = 0, i = n.length; o < i; ) {
|
|
189
189
|
if (e = t["@@transducer/step"](e, n[o]), e && e["@@transducer/reduced"]) {
|
|
190
190
|
e = e["@@transducer/value"];
|
|
@@ -194,7 +194,7 @@ function Yt(t, e, n) {
|
|
|
194
194
|
}
|
|
195
195
|
return t["@@transducer/result"](e);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Me(t, e, n) {
|
|
198
198
|
for (var o = n.next(); !o.done; ) {
|
|
199
199
|
if (e = t["@@transducer/step"](e, o.value), e && e["@@transducer/reduced"]) {
|
|
200
200
|
e = e["@@transducer/value"];
|
|
@@ -204,74 +204,74 @@ function Re(t, e, n) {
|
|
|
204
204
|
}
|
|
205
205
|
return t["@@transducer/result"](e);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return t["@@transducer/result"](n[o](
|
|
207
|
+
function Ve(t, e, n, o) {
|
|
208
|
+
return t["@@transducer/result"](n[o](en(t["@@transducer/step"], t), e));
|
|
209
209
|
}
|
|
210
|
-
var
|
|
211
|
-
function
|
|
212
|
-
if (typeof t == "function" && (t =
|
|
213
|
-
return
|
|
210
|
+
var We = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
|
|
211
|
+
function nn(t, e, n) {
|
|
212
|
+
if (typeof t == "function" && (t = Qt(t)), Yt(n))
|
|
213
|
+
return tn(t, e, n);
|
|
214
214
|
if (typeof n["fantasy-land/reduce"] == "function")
|
|
215
|
-
return
|
|
216
|
-
if (n[
|
|
217
|
-
return
|
|
215
|
+
return Ve(t, e, n, "fantasy-land/reduce");
|
|
216
|
+
if (n[We] != null)
|
|
217
|
+
return Me(t, e, n[We]());
|
|
218
218
|
if (typeof n.next == "function")
|
|
219
|
-
return
|
|
219
|
+
return Me(t, e, n);
|
|
220
220
|
if (typeof n.reduce == "function")
|
|
221
|
-
return
|
|
221
|
+
return Ve(t, e, n, "reduce");
|
|
222
222
|
throw new TypeError("reduce: list must be array or iterable");
|
|
223
223
|
}
|
|
224
224
|
function ve(t, e) {
|
|
225
225
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
226
226
|
}
|
|
227
|
-
var $e = Object.prototype.toString,
|
|
227
|
+
var $e = Object.prototype.toString, Je = /* @__PURE__ */ function() {
|
|
228
228
|
return $e.call(arguments) === "[object Arguments]" ? function(e) {
|
|
229
229
|
return $e.call(e) === "[object Arguments]";
|
|
230
230
|
} : function(e) {
|
|
231
231
|
return ve("callee", e);
|
|
232
232
|
};
|
|
233
|
-
}(),
|
|
233
|
+
}(), rn = !/* @__PURE__ */ {
|
|
234
234
|
toString: null
|
|
235
235
|
}.propertyIsEnumerable("toString"), Fe = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"], xe = /* @__PURE__ */ function() {
|
|
236
236
|
return arguments.propertyIsEnumerable("length");
|
|
237
|
-
}(),
|
|
237
|
+
}(), on = function(e, n) {
|
|
238
238
|
for (var o = 0; o < e.length; ) {
|
|
239
239
|
if (e[o] === n)
|
|
240
240
|
return !0;
|
|
241
241
|
o += 1;
|
|
242
242
|
}
|
|
243
243
|
return !1;
|
|
244
|
-
},
|
|
244
|
+
}, qe = /* @__PURE__ */ D(typeof Object.keys == "function" && !xe ? function(e) {
|
|
245
245
|
return Object(e) !== e ? [] : Object.keys(e);
|
|
246
246
|
} : function(e) {
|
|
247
247
|
if (Object(e) !== e)
|
|
248
248
|
return [];
|
|
249
|
-
var n, o, i = [], u = xe &&
|
|
249
|
+
var n, o, i = [], u = xe && Je(e);
|
|
250
250
|
for (n in e)
|
|
251
251
|
ve(n, e) && (!u || n !== "length") && (i[i.length] = n);
|
|
252
|
-
if (
|
|
252
|
+
if (rn)
|
|
253
253
|
for (o = Fe.length - 1; o >= 0; )
|
|
254
|
-
n = Fe[o], ve(n, e) && !
|
|
254
|
+
n = Fe[o], ve(n, e) && !on(i, n) && (i[i.length] = n), o -= 1;
|
|
255
255
|
return i;
|
|
256
256
|
});
|
|
257
|
-
const
|
|
257
|
+
const an = Number.isInteger || function(e) {
|
|
258
258
|
return e << 0 === e;
|
|
259
259
|
};
|
|
260
|
-
var
|
|
260
|
+
var sn = /* @__PURE__ */ N(function(e, n) {
|
|
261
261
|
var o = e < 0 ? n.length + e : e;
|
|
262
262
|
return me(n) ? n.charAt(o) : n[o];
|
|
263
263
|
}), Y = /* @__PURE__ */ N(function(e, n) {
|
|
264
264
|
if (n != null)
|
|
265
|
-
return
|
|
266
|
-
}),
|
|
265
|
+
return an(e) ? sn(e, n) : n[e];
|
|
266
|
+
}), ln = /* @__PURE__ */ ge(nn), Be = /* @__PURE__ */ D(function(e) {
|
|
267
267
|
return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
|
|
268
268
|
});
|
|
269
|
-
function
|
|
269
|
+
function un(t, e) {
|
|
270
270
|
return function() {
|
|
271
271
|
return e.call(this, t.apply(this, arguments));
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Ye(t, e) {
|
|
275
275
|
return function() {
|
|
276
276
|
var n = arguments.length;
|
|
277
277
|
if (n === 0)
|
|
@@ -280,35 +280,35 @@ function Je(t, e) {
|
|
|
280
280
|
return ye(o) || typeof o[t] != "function" ? e.apply(this, arguments) : o[t].apply(o, Array.prototype.slice.call(arguments, 0, n - 1));
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
/* @__PURE__ */
|
|
283
|
+
var cn = /* @__PURE__ */ ge(
|
|
284
|
+
/* @__PURE__ */ Ye("slice", function(e, n, o) {
|
|
285
285
|
return Array.prototype.slice.call(o, e, n);
|
|
286
286
|
})
|
|
287
|
-
),
|
|
288
|
-
/* @__PURE__ */
|
|
287
|
+
), dn = /* @__PURE__ */ D(
|
|
288
|
+
/* @__PURE__ */ Ye(
|
|
289
289
|
"tail",
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ cn(1, 1 / 0)
|
|
291
291
|
)
|
|
292
292
|
);
|
|
293
|
-
function
|
|
293
|
+
function fn() {
|
|
294
294
|
if (arguments.length === 0)
|
|
295
295
|
throw new Error("pipe requires at least one argument");
|
|
296
|
-
return
|
|
296
|
+
return Ee(arguments[0].length, ln(un, arguments[0], dn(arguments)));
|
|
297
297
|
}
|
|
298
|
-
var
|
|
298
|
+
var vn = /* @__PURE__ */ D(function(e) {
|
|
299
299
|
return me(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
|
|
300
300
|
});
|
|
301
|
-
function
|
|
301
|
+
function ze() {
|
|
302
302
|
if (arguments.length === 0)
|
|
303
303
|
throw new Error("compose requires at least one argument");
|
|
304
|
-
return
|
|
304
|
+
return fn.apply(this, vn(arguments));
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Xe(t) {
|
|
307
307
|
for (var e = [], n; !(n = t.next()).done; )
|
|
308
308
|
e.push(n.value);
|
|
309
309
|
return e;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Ge(t, e, n) {
|
|
312
312
|
for (var o = 0, i = n.length; o < i; ) {
|
|
313
313
|
if (t(e, n[o]))
|
|
314
314
|
return !0;
|
|
@@ -316,28 +316,28 @@ function Xe(t, e, n) {
|
|
|
316
316
|
}
|
|
317
317
|
return !1;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function pn(t) {
|
|
320
320
|
var e = String(t).match(/^function (\w*)/);
|
|
321
321
|
return e == null ? "" : e[1];
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function hn(t, e) {
|
|
324
324
|
return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
|
|
325
325
|
}
|
|
326
|
-
const
|
|
327
|
-
function
|
|
328
|
-
var i =
|
|
329
|
-
function
|
|
330
|
-
return
|
|
326
|
+
const be = typeof Object.is == "function" ? Object.is : hn;
|
|
327
|
+
function He(t, e, n, o) {
|
|
328
|
+
var i = Xe(t), u = Xe(e);
|
|
329
|
+
function g(A, l) {
|
|
330
|
+
return Oe(A, l, n.slice(), o.slice());
|
|
331
331
|
}
|
|
332
|
-
return !
|
|
333
|
-
return !
|
|
332
|
+
return !Ge(function(A, l) {
|
|
333
|
+
return !Ge(g, l, A);
|
|
334
334
|
}, u, i);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
if (
|
|
336
|
+
function Oe(t, e, n, o) {
|
|
337
|
+
if (be(t, e))
|
|
338
338
|
return !0;
|
|
339
|
-
var i =
|
|
340
|
-
if (i !==
|
|
339
|
+
var i = Be(t);
|
|
340
|
+
if (i !== Be(e))
|
|
341
341
|
return !1;
|
|
342
342
|
if (typeof t["fantasy-land/equals"] == "function" || typeof e["fantasy-land/equals"] == "function")
|
|
343
343
|
return typeof t["fantasy-land/equals"] == "function" && t["fantasy-land/equals"](e) && typeof e["fantasy-land/equals"] == "function" && e["fantasy-land/equals"](t);
|
|
@@ -347,17 +347,17 @@ function Ee(t, e, n, o) {
|
|
|
347
347
|
case "Arguments":
|
|
348
348
|
case "Array":
|
|
349
349
|
case "Object":
|
|
350
|
-
if (typeof t.constructor == "function" &&
|
|
350
|
+
if (typeof t.constructor == "function" && pn(t.constructor) === "Promise")
|
|
351
351
|
return t === e;
|
|
352
352
|
break;
|
|
353
353
|
case "Boolean":
|
|
354
354
|
case "Number":
|
|
355
355
|
case "String":
|
|
356
|
-
if (!(typeof t == typeof e &&
|
|
356
|
+
if (!(typeof t == typeof e && be(t.valueOf(), e.valueOf())))
|
|
357
357
|
return !1;
|
|
358
358
|
break;
|
|
359
359
|
case "Date":
|
|
360
|
-
if (!
|
|
360
|
+
if (!be(t.valueOf(), e.valueOf()))
|
|
361
361
|
return !1;
|
|
362
362
|
break;
|
|
363
363
|
case "Error":
|
|
@@ -374,9 +374,9 @@ function Ee(t, e, n, o) {
|
|
|
374
374
|
}
|
|
375
375
|
switch (i) {
|
|
376
376
|
case "Map":
|
|
377
|
-
return t.size !== e.size ? !1 :
|
|
377
|
+
return t.size !== e.size ? !1 : He(t.entries(), e.entries(), n.concat([t]), o.concat([e]));
|
|
378
378
|
case "Set":
|
|
379
|
-
return t.size !== e.size ? !1 :
|
|
379
|
+
return t.size !== e.size ? !1 : He(t.values(), e.values(), n.concat([t]), o.concat([e]));
|
|
380
380
|
case "Arguments":
|
|
381
381
|
case "Array":
|
|
382
382
|
case "Object":
|
|
@@ -400,48 +400,48 @@ function Ee(t, e, n, o) {
|
|
|
400
400
|
default:
|
|
401
401
|
return !1;
|
|
402
402
|
}
|
|
403
|
-
var
|
|
404
|
-
if (
|
|
403
|
+
var g = qe(t);
|
|
404
|
+
if (g.length !== qe(e).length)
|
|
405
405
|
return !1;
|
|
406
|
-
var
|
|
407
|
-
for (u =
|
|
408
|
-
var s =
|
|
409
|
-
if (!(ve(s, e) &&
|
|
406
|
+
var A = n.concat([t]), l = o.concat([e]);
|
|
407
|
+
for (u = g.length - 1; u >= 0; ) {
|
|
408
|
+
var s = g[u];
|
|
409
|
+
if (!(ve(s, e) && Oe(e[s], t[s], A, l)))
|
|
410
410
|
return !1;
|
|
411
411
|
u -= 1;
|
|
412
412
|
}
|
|
413
413
|
return !0;
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
return
|
|
415
|
+
var Ke = /* @__PURE__ */ N(function(e, n) {
|
|
416
|
+
return Oe(e, n, [], []);
|
|
417
417
|
});
|
|
418
|
-
function
|
|
418
|
+
function gn(t) {
|
|
419
419
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
420
420
|
}
|
|
421
421
|
var pe = /* @__PURE__ */ N(function(e, n) {
|
|
422
422
|
return n == null || n !== n ? e : n;
|
|
423
423
|
});
|
|
424
|
-
function
|
|
424
|
+
function yn(t) {
|
|
425
425
|
var e = Object.prototype.toString.call(t);
|
|
426
426
|
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]";
|
|
427
427
|
}
|
|
428
|
-
var
|
|
429
|
-
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() : ye(e) ? [] : me(e) ? "" :
|
|
428
|
+
var mn = /* @__PURE__ */ D(function(e) {
|
|
429
|
+
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() : ye(e) ? [] : me(e) ? "" : gn(e) ? {} : Je(e) ? /* @__PURE__ */ function() {
|
|
430
430
|
return arguments;
|
|
431
|
-
}() :
|
|
432
|
-
}),
|
|
431
|
+
}() : yn(e) ? e.constructor.from("") : void 0;
|
|
432
|
+
}), wn = /* @__PURE__ */ function() {
|
|
433
433
|
function t(e, n) {
|
|
434
434
|
this.xf = n, this.f = e, this.idx = -1, this.found = !1;
|
|
435
435
|
}
|
|
436
|
-
return t.prototype["@@transducer/init"] =
|
|
436
|
+
return t.prototype["@@transducer/init"] = Jt.init, t.prototype["@@transducer/result"] = function(e) {
|
|
437
437
|
return this.found || (e = this.xf["@@transducer/step"](e, -1)), this.xf["@@transducer/result"](e);
|
|
438
438
|
}, t.prototype["@@transducer/step"] = function(e, n) {
|
|
439
|
-
return this.idx += 1, this.f(n) && (this.found = !0, e =
|
|
439
|
+
return this.idx += 1, this.f(n) && (this.found = !0, e = Zt(this.xf["@@transducer/step"](e, this.idx))), e;
|
|
440
440
|
}, t;
|
|
441
|
-
}(),
|
|
442
|
-
return new
|
|
443
|
-
}),
|
|
444
|
-
/* @__PURE__ */
|
|
441
|
+
}(), An = /* @__PURE__ */ N(function(e, n) {
|
|
442
|
+
return new wn(e, n);
|
|
443
|
+
}), $ = /* @__PURE__ */ N(
|
|
444
|
+
/* @__PURE__ */ Ht([], An, function(e, n) {
|
|
445
445
|
for (var o = 0, i = n.length; o < i; ) {
|
|
446
446
|
if (e(n[o]))
|
|
447
447
|
return o;
|
|
@@ -449,37 +449,45 @@ var pn = /* @__PURE__ */ L(function(e) {
|
|
|
449
449
|
}
|
|
450
450
|
return -1;
|
|
451
451
|
})
|
|
452
|
-
),
|
|
453
|
-
return e != null &&
|
|
454
|
-
}),
|
|
455
|
-
return
|
|
452
|
+
), Sn = /* @__PURE__ */ D(function(e) {
|
|
453
|
+
return e != null && Ke(e, mn(e));
|
|
454
|
+
}), F = /* @__PURE__ */ ge(function(e, n, o) {
|
|
455
|
+
return Ke(n, Y(e, o));
|
|
456
456
|
}), he = /* @__PURE__ */ ge(function(e, n, o) {
|
|
457
457
|
return pe(e, Y(n, o));
|
|
458
|
-
}),
|
|
459
|
-
return
|
|
458
|
+
}), Tn = /* @__PURE__ */ N(function(e, n) {
|
|
459
|
+
return Ee(e.length, function() {
|
|
460
460
|
try {
|
|
461
461
|
return e.apply(this, arguments);
|
|
462
462
|
} catch (o) {
|
|
463
|
-
return n.apply(this,
|
|
463
|
+
return n.apply(this, Xt([o], arguments));
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
466
|
});
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
467
|
+
const Qe = "https://api.pennsieve.io", et = "https://api.pennsieve.net", tt = "https://api2.pennsieve.io", nt = "https://api2.pennsieve.net", rt = "wss://api.pennsieve.io/streaming/discover/ts/query", ot = "wss://api.pennsieve.net/streaming/discover/ts/query", at = "https://api.pennsieve.io/streaming", st = "https://api.pennsieve.net/streaming", In = {
|
|
468
|
+
pennsieveApiUrl: Qe,
|
|
469
|
+
pennsieveApiUrlDev: et,
|
|
470
|
+
pennsieveApi2Url: tt,
|
|
471
|
+
pennsieveApi2UrlDev: nt,
|
|
472
|
+
timeSeriesPublicUrl: rt,
|
|
473
|
+
timeSeriesPublicUrlDev: ot,
|
|
474
|
+
timeSeriesApi: at,
|
|
475
|
+
timeSeriesApiDev: st
|
|
476
|
+
}, _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
473
477
|
__proto__: null,
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
478
|
+
default: In,
|
|
479
|
+
pennsieveApi2Url: tt,
|
|
480
|
+
pennsieveApi2UrlDev: nt,
|
|
481
|
+
pennsieveApiUrl: Qe,
|
|
482
|
+
pennsieveApiUrlDev: et,
|
|
483
|
+
timeSeriesApi: at,
|
|
484
|
+
timeSeriesApiDev: st,
|
|
485
|
+
timeSeriesPublicUrl: rt,
|
|
486
|
+
timeSeriesPublicUrlDev: ot
|
|
479
487
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
480
488
|
async function fe() {
|
|
481
489
|
try {
|
|
482
|
-
return
|
|
490
|
+
return zt().then(
|
|
483
491
|
(t) => {
|
|
484
492
|
var e;
|
|
485
493
|
return (e = t == null ? void 0 : t.tokens) == null ? void 0 : e.accessToken.toString();
|
|
@@ -489,105 +497,82 @@ async function fe() {
|
|
|
489
497
|
console.error(t);
|
|
490
498
|
}
|
|
491
499
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
h = Object.assign({}, h, { body: w });
|
|
513
|
-
}
|
|
514
|
-
return fetch(t, h).then((w) => w.status >= 400 ? Promise.reject(w) : w.json().catch(() => w));
|
|
515
|
-
}
|
|
516
|
-
function be(t) {
|
|
517
|
-
const e = Y("status", t);
|
|
518
|
-
let n;
|
|
519
|
-
if (e === void 0) {
|
|
520
|
-
console.log(t);
|
|
521
|
-
return;
|
|
522
|
-
} else
|
|
523
|
-
n = t.status;
|
|
524
|
-
if (n === 400 && t.body)
|
|
525
|
-
t.body.getReader().read().then(({ done: o, value: i }) => {
|
|
526
|
-
const u = i instanceof Uint8Array ? String.fromCharCode.apply(null, i) : i;
|
|
527
|
-
Be(pe(u), mn(Be(Y("message"), JSON.parse), (h, w) => w))(u);
|
|
528
|
-
});
|
|
529
|
-
else if (n === 401)
|
|
530
|
-
return Tn();
|
|
531
|
-
}
|
|
532
|
-
const nt = Ft("tsviewer", () => {
|
|
533
|
-
const t = An, e = g([]), n = g("NOT_MONTAGED"), o = g({}), i = g([]), u = g(null), h = g(null), w = g({}), l = g([]), s = g({}), A = g({}), m = g("POINTER"), b = B(() => (a) => i.value.find((c) => c.name === a)), M = B(() => e.value.filter((a) => a.selected)), R = B(() => () => {
|
|
500
|
+
const bn = () => ({
|
|
501
|
+
openConnection: async (e, n, o) => await new Promise((g, A) => {
|
|
502
|
+
const l = e + "?session=" + o + "&package=" + n;
|
|
503
|
+
console.log("Opening WebSocket connection to:", l);
|
|
504
|
+
let s = null;
|
|
505
|
+
const m = new WebSocket(l);
|
|
506
|
+
m.onopen = () => {
|
|
507
|
+
console.log("🔗 WebSocket opened for package:", n);
|
|
508
|
+
const h = { montage: "NOT_MONTAGED", packageId: n };
|
|
509
|
+
console.log("🎛️ Sending message payload"), m.send(JSON.stringify(h));
|
|
510
|
+
}, m.onclose = () => {
|
|
511
|
+
console.log("🔌 WebSocket closed for package:", n), s && s.channelDetails ? g({ res: s.channelDetails, status: "websocket closed" }) : (console.warn("No channel details received"), g({ res: null, status: "websocket closed without data" }));
|
|
512
|
+
}, m.onmessage = (h) => {
|
|
513
|
+
console.log("WebSocket message received:", h.data), s = JSON.parse(h.data), m.close();
|
|
514
|
+
}, m.onerror = (h) => {
|
|
515
|
+
console.error("WebSocket error:", h), A(h);
|
|
516
|
+
};
|
|
517
|
+
})
|
|
518
|
+
}), it = Bt("tsviewer", () => {
|
|
519
|
+
const t = _n, e = y([]), n = y("NOT_MONTAGED"), o = y({}), i = y([]), u = y(null), g = y(null), A = y({}), l = y([]), s = y({}), m = y({}), h = y("POINTER"), { openConnection: b } = bn(), M = z(() => (a) => i.value.find((c) => c.name === a)), R = z(() => e.value.filter((a) => a.selected)), _ = z(() => () => {
|
|
534
520
|
const a = l.value.find((c) => c.selected);
|
|
535
521
|
return a || (console.warn("No active layer found, available layers:", l.value), l.value.length > 0 ? l.value[0] : null);
|
|
536
|
-
}),
|
|
522
|
+
}), V = () => {
|
|
537
523
|
let a = !1;
|
|
538
|
-
return l.value.forEach((c,
|
|
539
|
-
!c.id && c.id !== 0 && (console.error(`Layer at index ${
|
|
524
|
+
return l.value.forEach((c, p) => {
|
|
525
|
+
!c.id && c.id !== 0 && (console.error(`Layer at index ${p} missing ID:`, c), a = !0), c.annotations || (console.warn(`Layer at index ${p} missing annotations array:`, c), c.annotations = []);
|
|
540
526
|
}), a && console.error("Annotation layer validation failed. Layers:", l.value), !a;
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
},
|
|
527
|
+
}, P = z(() => (a) => l.value.flatMap((p) => p.annotations || []).find((p) => p.id === a)), E = (a) => {
|
|
528
|
+
A.value = a;
|
|
529
|
+
}, I = (a) => {
|
|
544
530
|
e.value = a;
|
|
545
|
-
},
|
|
531
|
+
}, v = (a) => {
|
|
546
532
|
n.value = a;
|
|
547
|
-
},
|
|
533
|
+
}, T = (a) => {
|
|
548
534
|
o.value = a;
|
|
549
|
-
},
|
|
535
|
+
}, W = (a) => {
|
|
550
536
|
i.value = a;
|
|
551
|
-
}, $ = (a) => {
|
|
552
|
-
u.value = a;
|
|
553
537
|
}, O = (a) => {
|
|
554
|
-
|
|
555
|
-
}, C =
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
const c = a.map((v) => (!v.id && v.id !== 0 && (console.warn("Annotation layer missing ID:", v), v.id = Math.random().toString(36).substr(2, 9)), v.annotations || (v.annotations = []), v.name || (v.name = `Layer ${v.id}`), v));
|
|
565
|
-
l.value = c, console.log("Set annotations with validated structure:", c);
|
|
538
|
+
u.value = a;
|
|
539
|
+
}, C = (a) => {
|
|
540
|
+
g.value = a;
|
|
541
|
+
}, G = async (a) => {
|
|
542
|
+
const c = a.packageId, p = await fe();
|
|
543
|
+
let L = t.timeSeriesPublicUrl, ee = null;
|
|
544
|
+
ee = await b(L, c, p), E({ channels: ee.res, content: { id: c } });
|
|
545
|
+
}, H = () => (a) => {
|
|
546
|
+
var p;
|
|
547
|
+
return ((p = a == null ? void 0 : a.content) == null ? void 0 : p.state) === "READY";
|
|
566
548
|
}, k = (a) => {
|
|
549
|
+
const c = a.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));
|
|
550
|
+
l.value = c, console.log("Set annotations with validated structure:", c);
|
|
551
|
+
}, j = (a) => {
|
|
567
552
|
if (!a && a !== 0) {
|
|
568
553
|
console.error("setActiveAnnotationLayer called with invalid layerId:", a);
|
|
569
554
|
return;
|
|
570
555
|
}
|
|
571
|
-
s.value = a, l.value.forEach((
|
|
572
|
-
const c = F(
|
|
556
|
+
s.value = a, l.value.forEach((p) => p.selected = !1);
|
|
557
|
+
const c = $(F("id", a), l.value);
|
|
573
558
|
c >= 0 ? (l.value[c].selected = !0, console.log("Successfully set active layer:", l.value[c])) : console.error("Layer with ID not found:", a, "Available layers:", l.value);
|
|
574
|
-
},
|
|
559
|
+
}, X = (a) => {
|
|
575
560
|
if (l.value.forEach(
|
|
576
561
|
(c) => {
|
|
577
|
-
var
|
|
578
|
-
return (
|
|
562
|
+
var p;
|
|
563
|
+
return (p = c.annotations) == null ? void 0 : p.forEach((L) => L.selected = !1);
|
|
579
564
|
}
|
|
580
565
|
), a.id) {
|
|
581
|
-
const c = F(
|
|
566
|
+
const c = $(F("id", a.layer_id), l.value);
|
|
582
567
|
if (c >= 0) {
|
|
583
|
-
const
|
|
584
|
-
|
|
568
|
+
const p = $(F("id", a.id), l.value[c].annotations);
|
|
569
|
+
p >= 0 && (l.value[c].annotations[p].selected = !0);
|
|
585
570
|
}
|
|
586
571
|
}
|
|
587
|
-
A.value = a;
|
|
588
|
-
}, G = (a) => {
|
|
589
572
|
m.value = a;
|
|
590
573
|
}, K = (a) => {
|
|
574
|
+
h.value = a;
|
|
575
|
+
}, oe = (a) => {
|
|
591
576
|
if (!a.id && a.id !== 0) {
|
|
592
577
|
console.error("Cannot create layer without ID:", a);
|
|
593
578
|
return;
|
|
@@ -608,33 +593,33 @@ const nt = Ft("tsviewer", () => {
|
|
|
608
593
|
// Spread any additional properties
|
|
609
594
|
};
|
|
610
595
|
l.value.push(c), console.log("Created layer with validated structure:", c);
|
|
611
|
-
},
|
|
612
|
-
const c = F(
|
|
596
|
+
}, x = (a) => {
|
|
597
|
+
const c = $(F("id", a.id), l.value);
|
|
613
598
|
if (c >= 0) {
|
|
614
|
-
const
|
|
615
|
-
l.value[c] =
|
|
599
|
+
const p = Object.assign(l.value[c], a);
|
|
600
|
+
l.value[c] = p;
|
|
616
601
|
}
|
|
617
|
-
}, W = (a) => {
|
|
618
|
-
const c = F(x("id", a.id), l.value);
|
|
619
|
-
c >= 0 && l.value.splice(c, 1);
|
|
620
602
|
}, Q = (a) => {
|
|
621
|
-
const c = F(
|
|
622
|
-
c >= 0 &&
|
|
603
|
+
const c = $(F("id", a.id), l.value);
|
|
604
|
+
c >= 0 && l.value.splice(c, 1);
|
|
623
605
|
}, q = (a) => {
|
|
624
|
-
const c = F(
|
|
606
|
+
const c = $(F("id", a.layer_id), l.value);
|
|
607
|
+
c >= 0 && (l.value[c].annotations || (l.value[c].annotations = []), l.value[c].annotations.push(a), X(a));
|
|
608
|
+
}, ae = (a) => {
|
|
609
|
+
const c = $(F("id", a.layer_id), l.value);
|
|
625
610
|
if (c >= 0) {
|
|
626
|
-
const
|
|
627
|
-
|
|
611
|
+
const p = l.value[c].annotations, L = $(F("id", a.id), p);
|
|
612
|
+
L >= 0 && (p[L] = a);
|
|
628
613
|
}
|
|
629
|
-
},
|
|
630
|
-
const c = F(
|
|
614
|
+
}, ce = (a) => {
|
|
615
|
+
const c = $(F("id", a.layer_id), l.value);
|
|
631
616
|
if (c >= 0) {
|
|
632
|
-
const
|
|
633
|
-
|
|
617
|
+
const p = l.value[c].annotations, L = $(F("id", a.id), p);
|
|
618
|
+
L >= 0 && p.splice(L, 1);
|
|
634
619
|
}
|
|
635
|
-
},
|
|
636
|
-
const
|
|
637
|
-
|
|
620
|
+
}, B = (a, c, p) => {
|
|
621
|
+
const L = e.value.find((ee) => ee.id === a);
|
|
622
|
+
L && (L[c] = p);
|
|
638
623
|
};
|
|
639
624
|
return {
|
|
640
625
|
// State
|
|
@@ -643,66 +628,106 @@ const nt = Ft("tsviewer", () => {
|
|
|
643
628
|
customMontageMap: o,
|
|
644
629
|
workspaceMontages: i,
|
|
645
630
|
viewerErrors: u,
|
|
646
|
-
needsRerender:
|
|
631
|
+
needsRerender: g,
|
|
647
632
|
viewerAnnotations: l,
|
|
648
633
|
activeAnnotationLayer: s,
|
|
649
|
-
activeAnnotation:
|
|
650
|
-
activeViewer:
|
|
651
|
-
viewerActiveTool:
|
|
634
|
+
activeAnnotation: m,
|
|
635
|
+
activeViewer: A,
|
|
636
|
+
viewerActiveTool: h,
|
|
652
637
|
config: t,
|
|
653
638
|
// Getters
|
|
654
|
-
getMontageMessageByName:
|
|
655
|
-
viewerSelectedChannels:
|
|
656
|
-
getViewerActiveLayer:
|
|
657
|
-
getAnnotationById:
|
|
639
|
+
getMontageMessageByName: M,
|
|
640
|
+
viewerSelectedChannels: R,
|
|
641
|
+
getViewerActiveLayer: _,
|
|
642
|
+
getAnnotationById: P,
|
|
658
643
|
// Actions
|
|
659
|
-
setChannels:
|
|
660
|
-
setViewerMontageScheme:
|
|
661
|
-
setCustomMontageMap:
|
|
662
|
-
setWorkspaceMontages:
|
|
663
|
-
setViewerErrors:
|
|
664
|
-
setAnnotations:
|
|
665
|
-
setActiveAnnotationLayer:
|
|
666
|
-
setActiveAnnotation:
|
|
667
|
-
setActiveTool:
|
|
668
|
-
createLayer:
|
|
669
|
-
updateLayer:
|
|
670
|
-
deleteLayer:
|
|
671
|
-
createAnnotation:
|
|
672
|
-
updateAnnotation:
|
|
673
|
-
deleteAnnotation:
|
|
674
|
-
updateChannelProperty:
|
|
644
|
+
setChannels: I,
|
|
645
|
+
setViewerMontageScheme: v,
|
|
646
|
+
setCustomMontageMap: T,
|
|
647
|
+
setWorkspaceMontages: W,
|
|
648
|
+
setViewerErrors: O,
|
|
649
|
+
setAnnotations: k,
|
|
650
|
+
setActiveAnnotationLayer: j,
|
|
651
|
+
setActiveAnnotation: X,
|
|
652
|
+
setActiveTool: K,
|
|
653
|
+
createLayer: oe,
|
|
654
|
+
updateLayer: x,
|
|
655
|
+
deleteLayer: Q,
|
|
656
|
+
createAnnotation: q,
|
|
657
|
+
updateAnnotation: ae,
|
|
658
|
+
deleteAnnotation: ce,
|
|
659
|
+
updateChannelProperty: B,
|
|
675
660
|
updateChannelVisibility: (a, c) => {
|
|
676
|
-
|
|
661
|
+
B(a, "visible", c);
|
|
677
662
|
},
|
|
678
663
|
updateChannelSelection: (a, c) => {
|
|
679
|
-
|
|
664
|
+
B(a, "selected", c);
|
|
680
665
|
},
|
|
681
666
|
updateChannelFilter: (a, c) => {
|
|
682
|
-
|
|
667
|
+
B(a, "filter", c);
|
|
683
668
|
},
|
|
684
|
-
validateAnnotationLayers:
|
|
669
|
+
validateAnnotationLayers: V,
|
|
685
670
|
resetViewer: () => {
|
|
686
|
-
e.value = [], n.value = "NOT_MONTAGED", o.value = {}, i.value = [], u.value = null, l.value = [], s.value = {},
|
|
671
|
+
e.value = [], n.value = "NOT_MONTAGED", o.value = {}, i.value = [], u.value = null, l.value = [], s.value = {}, m.value = {}, h.value = "POINTER", A.value = {};
|
|
687
672
|
},
|
|
688
673
|
triggerRerender: (a) => {
|
|
689
|
-
|
|
674
|
+
C({
|
|
690
675
|
timestamp: Date.now(),
|
|
691
676
|
cause: a
|
|
692
677
|
});
|
|
693
678
|
},
|
|
694
679
|
resetRerenderTrigger: () => {
|
|
695
|
-
|
|
680
|
+
g.value = null;
|
|
696
681
|
},
|
|
697
|
-
isTSFileProcessed:
|
|
698
|
-
fetchAndSetActiveViewer:
|
|
682
|
+
isTSFileProcessed: H,
|
|
683
|
+
fetchAndSetActiveViewer: G,
|
|
699
684
|
setActiveViewer: E
|
|
700
685
|
};
|
|
701
686
|
});
|
|
702
|
-
function
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
687
|
+
function Cn(t) {
|
|
688
|
+
if (useRoute().name === "docs-login")
|
|
689
|
+
return;
|
|
690
|
+
pe(!1, Y("shouldShowToast", t));
|
|
691
|
+
const n = pe(!1, Y("shouldRedirect", t));
|
|
692
|
+
this.clearState(), n && this.$route.fullPath;
|
|
693
|
+
}
|
|
694
|
+
const En = (t) => Object.prototype.toString.call(t) === "[object String]", On = (t) => {
|
|
695
|
+
Object.keys(t).forEach((e) => {
|
|
696
|
+
En(t[e]) && (t[e] = t[e].trim());
|
|
697
|
+
});
|
|
698
|
+
};
|
|
699
|
+
function $n(t, e) {
|
|
700
|
+
if (!t)
|
|
701
|
+
return Promise.reject({ status: 400, message: "Url is missing!" });
|
|
702
|
+
const n = he("GET", "method", e), o = he({}, "header", e), i = Object.assign({}, { "Content-type": "application/json" }, o), u = Y("body", e);
|
|
703
|
+
let g = { headers: i, method: n };
|
|
704
|
+
if (u) {
|
|
705
|
+
typeof u == "object" && On(u);
|
|
706
|
+
const A = JSON.stringify(u);
|
|
707
|
+
g = Object.assign({}, g, { body: A });
|
|
708
|
+
}
|
|
709
|
+
return fetch(t, g).then((A) => A.status >= 400 ? Promise.reject(A) : A.json().catch(() => A));
|
|
710
|
+
}
|
|
711
|
+
function Ce(t) {
|
|
712
|
+
const e = Y("status", t);
|
|
713
|
+
let n;
|
|
714
|
+
if (e === void 0) {
|
|
715
|
+
console.log(t);
|
|
716
|
+
return;
|
|
717
|
+
} else
|
|
718
|
+
n = t.status;
|
|
719
|
+
if (n === 400 && t.body)
|
|
720
|
+
t.body.getReader().read().then(({ done: o, value: i }) => {
|
|
721
|
+
const u = i instanceof Uint8Array ? String.fromCharCode.apply(null, i) : i;
|
|
722
|
+
ze(pe(u), Tn(ze(Y("message"), JSON.parse), (g, A) => A))(u);
|
|
723
|
+
});
|
|
724
|
+
else if (n === 401)
|
|
725
|
+
return Cn();
|
|
726
|
+
}
|
|
727
|
+
function Pn() {
|
|
728
|
+
const t = it(), { viewerChannels: e, viewerAnnotations: n } = Ze(t), o = (l) => l.id || "", i = (l) => {
|
|
729
|
+
l.sort(function(m, h) {
|
|
730
|
+
return m.start < h.start ? -1 : m.start > h.start ? 1 : 0;
|
|
706
731
|
});
|
|
707
732
|
};
|
|
708
733
|
return {
|
|
@@ -718,13 +743,13 @@ function bn() {
|
|
|
718
743
|
throw new TypeError("Missing annotation data or layer_id", s);
|
|
719
744
|
if (s.id)
|
|
720
745
|
throw new TypeError("Trying to create an annotation that already exists", s.id);
|
|
721
|
-
let
|
|
746
|
+
let m = s.start, h = s.duration || s.end - s.start;
|
|
722
747
|
const b = s.label, M = s.description, R = s.layer_id;
|
|
723
748
|
if (!b)
|
|
724
749
|
throw new Error("Annotation label is required");
|
|
725
|
-
if (
|
|
750
|
+
if (m == null)
|
|
726
751
|
throw new Error("Annotation start time is required");
|
|
727
|
-
|
|
752
|
+
h < 0 && (h = -h, m = m - h);
|
|
728
753
|
let _ = [];
|
|
729
754
|
if (console.log("🔧 useTsAnnotation: Processing channelIds...", {
|
|
730
755
|
hasChannelIds: s.channelIds && Array.isArray(s.channelIds),
|
|
@@ -734,20 +759,20 @@ function bn() {
|
|
|
734
759
|
// Now from Pinia
|
|
735
760
|
}), s.allChannels) {
|
|
736
761
|
console.log("🔧 useTsAnnotation: allChannels=true, adding all visible channels");
|
|
737
|
-
const
|
|
738
|
-
for (let
|
|
739
|
-
const
|
|
740
|
-
_.push(
|
|
762
|
+
const I = t.activeViewer.value.channels;
|
|
763
|
+
for (let v = 0; v < I.length; v++) {
|
|
764
|
+
const W = I[v].content.id;
|
|
765
|
+
_.push(W), console.log("🔧 useTsAnnotation: Added channel ID:", W);
|
|
741
766
|
}
|
|
742
767
|
} else if (s.channelIds && Array.isArray(s.channelIds) && s.channelIds.length > 0)
|
|
743
768
|
_ = s.channelIds, console.log("🔧 useTsAnnotation: Using provided channelIds:", _);
|
|
744
769
|
else {
|
|
745
770
|
console.log("🔧 useTsAnnotation: Computing from selected channels");
|
|
746
|
-
for (let
|
|
747
|
-
const
|
|
748
|
-
if (
|
|
749
|
-
const
|
|
750
|
-
_.push(
|
|
771
|
+
for (let I = 0; I < e.value.length; I++) {
|
|
772
|
+
const v = e.value[I];
|
|
773
|
+
if (v.selected && v.visible) {
|
|
774
|
+
const T = o(v);
|
|
775
|
+
_.push(T), console.log("🔧 useTsAnnotation: Added selected channel ID:", T);
|
|
751
776
|
}
|
|
752
777
|
}
|
|
753
778
|
}
|
|
@@ -756,15 +781,15 @@ function bn() {
|
|
|
756
781
|
label: b,
|
|
757
782
|
name: b,
|
|
758
783
|
description: M || "",
|
|
759
|
-
start: Math.floor(
|
|
760
|
-
end: Math.floor(
|
|
784
|
+
start: Math.floor(m),
|
|
785
|
+
end: Math.floor(m + h),
|
|
761
786
|
channelIds: _
|
|
762
787
|
};
|
|
763
788
|
console.log("🔧 useTsAnnotation: API payload:", V);
|
|
764
|
-
const
|
|
765
|
-
console.log("🔧 useTsAnnotation: API URL:",
|
|
789
|
+
const P = t.activeViewer.value.content.id, E = `${t.config.apiUrl}/timeseries/${P}/layers/${R}/annotations`;
|
|
790
|
+
console.log("🔧 useTsAnnotation: API URL:", E);
|
|
766
791
|
try {
|
|
767
|
-
const
|
|
792
|
+
const I = await fe(), v = await fetch(`${E}?api_key=${I}`, {
|
|
768
793
|
method: "POST",
|
|
769
794
|
headers: {
|
|
770
795
|
"Content-Type": "application/json",
|
|
@@ -772,39 +797,39 @@ function bn() {
|
|
|
772
797
|
},
|
|
773
798
|
body: JSON.stringify(V)
|
|
774
799
|
});
|
|
775
|
-
if (!
|
|
776
|
-
const C = await
|
|
777
|
-
throw new Error(`HTTP ${
|
|
800
|
+
if (!v.ok) {
|
|
801
|
+
const C = await v.text();
|
|
802
|
+
throw new Error(`HTTP ${v.status}: ${C}`);
|
|
778
803
|
}
|
|
779
|
-
const
|
|
780
|
-
console.log("🔧 useTsAnnotation: API success:",
|
|
781
|
-
const
|
|
804
|
+
const T = await v.json();
|
|
805
|
+
console.log("🔧 useTsAnnotation: API success:", T);
|
|
806
|
+
const W = {
|
|
782
807
|
name: "",
|
|
783
|
-
id:
|
|
784
|
-
label:
|
|
785
|
-
description:
|
|
786
|
-
start:
|
|
787
|
-
duration:
|
|
788
|
-
end:
|
|
808
|
+
id: T.id,
|
|
809
|
+
label: T.label,
|
|
810
|
+
description: T.description,
|
|
811
|
+
start: T.start,
|
|
812
|
+
duration: T.end - T.start,
|
|
813
|
+
end: T.end,
|
|
789
814
|
cStart: null,
|
|
790
815
|
cEnd: null,
|
|
791
816
|
selected: !0,
|
|
792
|
-
channelIds:
|
|
817
|
+
channelIds: T.channelIds || _,
|
|
793
818
|
allChannels: _.length === 0 || _.length >= e.value.length,
|
|
794
819
|
// Use Pinia
|
|
795
820
|
layer_id: R,
|
|
796
|
-
userId:
|
|
821
|
+
userId: T.userId
|
|
797
822
|
};
|
|
798
|
-
|
|
823
|
+
T.linkedPackage && (W.linkedPackage = T.linkedPackage);
|
|
799
824
|
let O = 0;
|
|
800
825
|
for (let C = 0; C < n.value.length; C++)
|
|
801
826
|
if (n.value[C].id === R) {
|
|
802
827
|
O = C;
|
|
803
828
|
break;
|
|
804
829
|
}
|
|
805
|
-
return t.createAnnotation(
|
|
806
|
-
} catch (
|
|
807
|
-
throw console.error("🔧 useTsAnnotation: Error creating annotation:",
|
|
830
|
+
return t.createAnnotation(W), n.value[O] && n.value[O].annotations && i(n.value[O].annotations), W;
|
|
831
|
+
} catch (I) {
|
|
832
|
+
throw console.error("🔧 useTsAnnotation: Error creating annotation:", I), Ce(I), I;
|
|
808
833
|
}
|
|
809
834
|
},
|
|
810
835
|
updateAnnotation: async (l = null) => {
|
|
@@ -813,13 +838,13 @@ function bn() {
|
|
|
813
838
|
throw new TypeError("Trying to update an annotation that doesn't exist on server", s.id);
|
|
814
839
|
if (!s.layer_id)
|
|
815
840
|
throw new TypeError("Missing layer_id for annotation update", s);
|
|
816
|
-
let
|
|
817
|
-
|
|
841
|
+
let m = s.start, h = s.duration || s.end - s.start;
|
|
842
|
+
h < 0 && (h = -h, m = m - h);
|
|
818
843
|
const b = {
|
|
819
844
|
label: s.label,
|
|
820
845
|
description: s.description || "",
|
|
821
|
-
start: Math.floor(
|
|
822
|
-
end: Math.floor(
|
|
846
|
+
start: Math.floor(m),
|
|
847
|
+
end: Math.floor(m + h),
|
|
823
848
|
channelIds: s.channelIds || []
|
|
824
849
|
};
|
|
825
850
|
console.log("🔧 useTsAnnotation: Update API payload:", b);
|
|
@@ -835,19 +860,19 @@ function bn() {
|
|
|
835
860
|
body: JSON.stringify(b)
|
|
836
861
|
});
|
|
837
862
|
if (!V.ok) {
|
|
838
|
-
const
|
|
839
|
-
throw new Error(`HTTP ${V.status}: ${
|
|
863
|
+
const I = await V.text();
|
|
864
|
+
throw new Error(`HTTP ${V.status}: ${I}`);
|
|
840
865
|
}
|
|
841
|
-
const
|
|
842
|
-
console.log("🔧 useTsAnnotation: Update API success:",
|
|
843
|
-
const
|
|
866
|
+
const P = await V.json();
|
|
867
|
+
console.log("🔧 useTsAnnotation: Update API success:", P);
|
|
868
|
+
const E = {
|
|
844
869
|
...s,
|
|
845
|
-
...
|
|
846
|
-
duration:
|
|
870
|
+
...P,
|
|
871
|
+
duration: P.end - P.start
|
|
847
872
|
};
|
|
848
|
-
return t.updateAnnotation(
|
|
873
|
+
return t.updateAnnotation(E), P;
|
|
849
874
|
} catch (_) {
|
|
850
|
-
throw console.error("🔧 useTsAnnotation: Error updating annotation:", _),
|
|
875
|
+
throw console.error("🔧 useTsAnnotation: Error updating annotation:", _), Ce(_), _;
|
|
851
876
|
}
|
|
852
877
|
},
|
|
853
878
|
removeAnnotation: async (l) => {
|
|
@@ -856,10 +881,10 @@ function bn() {
|
|
|
856
881
|
let s = "";
|
|
857
882
|
if (l.layer ? s = l.layer.id : s = l.layer_id, !s)
|
|
858
883
|
throw new TypeError("Missing layer_id for annotation deletion", l);
|
|
859
|
-
const
|
|
860
|
-
console.log("🔧 useTsAnnotation: Delete API URL:",
|
|
884
|
+
const m = t.activeViewer.value.content.id, h = `${t.config.apiUrl}/timeseries/${m}/layers/${s}/annotations/${l.id}`;
|
|
885
|
+
console.log("🔧 useTsAnnotation: Delete API URL:", h);
|
|
861
886
|
try {
|
|
862
|
-
const b = await fe(), M = await fetch(`${
|
|
887
|
+
const b = await fe(), M = await fetch(`${h}?api_key=${b}`, {
|
|
863
888
|
method: "DELETE",
|
|
864
889
|
headers: {
|
|
865
890
|
Accept: "application/json"
|
|
@@ -871,19 +896,19 @@ function bn() {
|
|
|
871
896
|
}
|
|
872
897
|
return console.log("🔧 useTsAnnotation: Delete API success"), t.deleteAnnotation(l), !0;
|
|
873
898
|
} catch (b) {
|
|
874
|
-
throw console.error("🔧 useTsAnnotation: Error deleting annotation:", b),
|
|
899
|
+
throw console.error("🔧 useTsAnnotation: Error deleting annotation:", b), Ce(b), b;
|
|
875
900
|
}
|
|
876
901
|
},
|
|
877
902
|
sortAnns: i,
|
|
878
903
|
getChannelId: o
|
|
879
904
|
};
|
|
880
905
|
}
|
|
881
|
-
const
|
|
906
|
+
const Dn = (t, e) => {
|
|
882
907
|
const n = t.__vccOpts || t;
|
|
883
908
|
for (const [o, i] of e)
|
|
884
909
|
n[o] = i;
|
|
885
910
|
return n;
|
|
886
|
-
},
|
|
911
|
+
}, kn = { id: "channelCanvas" }, Ln = ["data-id"], Nn = ["hidden"], Un = ["hidden"], Rn = {
|
|
887
912
|
__name: "TSViewer",
|
|
888
913
|
props: {
|
|
889
914
|
pkg: {
|
|
@@ -901,7 +926,7 @@ const Cn = (t, e) => {
|
|
|
901
926
|
}
|
|
902
927
|
},
|
|
903
928
|
setup(t, { expose: e }) {
|
|
904
|
-
const n = Z(() => import("./TSScrubber-
|
|
929
|
+
const n = Z(() => import("./TSScrubber-CfI0H_CE.mjs")), o = Z(() => import("./TSViewerCanvas-BZitVLGc.mjs").then((r) => r.T)), i = Z(() => import("./TSViewerToolbar-BwtRehDx.mjs")), u = Z(() => import("./TSFilterModal-ZewnIuXD.mjs")), g = Z(() => import("./TSAnnotationModal-B-OHQVza.mjs")), A = Z(() => import("./TsAnnotationDeleteDialog-Ce9pB5DQ.mjs")), l = Z(() => import("./TSViewerLayerWindow-U3NyH3nc.mjs")), s = {
|
|
905
930
|
TIMEUNIT: "microSeconds",
|
|
906
931
|
// Basis for time
|
|
907
932
|
XOFFSET: 0,
|
|
@@ -938,39 +963,39 @@ const Cn = (t, e) => {
|
|
|
938
963
|
// Maximum duration window (5min)
|
|
939
964
|
INITDURATION: 15e6
|
|
940
965
|
// Initial duration window (15sec)
|
|
941
|
-
},
|
|
966
|
+
}, m = t, h = it(), { viewerChannels: b, needsRerender: M } = Ze(h), {
|
|
942
967
|
addAnnotation: R,
|
|
943
968
|
updateAnnotation: _,
|
|
944
969
|
removeAnnotation: V
|
|
945
|
-
} =
|
|
970
|
+
} = Pn(), P = y(null), E = y(null), I = y(null), v = y(null), T = y(null), W = y(null), O = y(null), C = y(null), G = y(0), H = y(0), k = y(0), j = y(0), X = y(0), K = y(0), oe = y(0), x = y(1), Q = y(1 / 10), q = y(!1), ae = y(!1), ce = y(null), B = y(!1), se = y(!1), ie = z(() => h.activeViewer), Pe = z(() => b.value.map((r) => ({
|
|
946
971
|
...r,
|
|
947
972
|
selected: !!r.selected
|
|
948
|
-
}))), we =
|
|
973
|
+
}))), we = z(() => Pe.value.filter((r) => r.visible)), Ae = z(() => {
|
|
949
974
|
let r = !1;
|
|
950
|
-
return K.value /
|
|
951
|
-
}),
|
|
952
|
-
if (console.log("onresize..."), !
|
|
975
|
+
return K.value / Se.value < 30 && (r = !0), r;
|
|
976
|
+
}), Se = z(() => we.value.length), a = async () => {
|
|
977
|
+
if (console.log("onresize..."), !P.value)
|
|
953
978
|
return;
|
|
954
979
|
const r = document.getElementById("ts_viewer");
|
|
955
980
|
if (!r)
|
|
956
981
|
return;
|
|
957
|
-
const f = window.getComputedStyle(r, null), d = parseInt(f.getPropertyValue("height")),
|
|
958
|
-
|
|
959
|
-
const
|
|
960
|
-
|
|
982
|
+
const f = window.getComputedStyle(r, null), d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
|
|
983
|
+
G.value = d - w, await ne(), H.value = P.value.offsetWidth;
|
|
984
|
+
const U = I.value;
|
|
985
|
+
U && (oe.value = U.clientWidth, X.value = H.value - U.clientWidth - 16, K.value = G.value - 40);
|
|
961
986
|
};
|
|
962
|
-
Te(() =>
|
|
963
|
-
var d,
|
|
964
|
-
(d =
|
|
965
|
-
}, { immediate: !1, deep: !0 }), Te(
|
|
987
|
+
Te(() => ie.value, async (r, f) => {
|
|
988
|
+
var d, w, U;
|
|
989
|
+
(d = E.value) != null && d.resetComponentState && E.value.resetComponentState(), r && r.channels && r.channels.length > 0 && Ne(), Ue(), await ne(), (w = E.value) != null && w.initSegmentSpans && E.value.initSegmentSpans(), (U = E.value) != null && U.getAnnotations && E.value.getAnnotations();
|
|
990
|
+
}, { immediate: !1, deep: !0 }), Te(Se, (r, f) => {
|
|
966
991
|
f !== void 0 && r !== f && (console.log(`Number of visible channels changed from ${f} to ${r}`), setTimeout(() => {
|
|
967
992
|
var d;
|
|
968
|
-
|
|
993
|
+
a(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
969
994
|
}, 20));
|
|
970
995
|
});
|
|
971
|
-
const
|
|
996
|
+
const c = (r) => {
|
|
972
997
|
store.dispatch("viewerModule/setActiveAnnotation", r).then(() => {
|
|
973
|
-
|
|
998
|
+
v.value.renderAnnotationCanvas(), q.value = !0;
|
|
974
999
|
});
|
|
975
1000
|
};
|
|
976
1001
|
Te(M, (r) => {
|
|
@@ -978,13 +1003,13 @@ const Cn = (t, e) => {
|
|
|
978
1003
|
var f;
|
|
979
1004
|
r.cause === "channel-visibility" ? setTimeout(() => {
|
|
980
1005
|
var d;
|
|
981
|
-
|
|
982
|
-
}, 10) : (f =
|
|
983
|
-
}),
|
|
1006
|
+
a(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
1007
|
+
}, 10) : (f = v.value) != null && f.renderAll && v.value.renderAll();
|
|
1008
|
+
}), h.resetRerenderTrigger(null));
|
|
984
1009
|
}, { deep: !0 });
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
},
|
|
1010
|
+
const p = (r) => {
|
|
1011
|
+
c(r);
|
|
1012
|
+
}, L = async (r) => {
|
|
988
1013
|
if (console.log("📍 TSViewer: onCreateUpdateAnnotation received:", r), !r || Object.keys(r).length === 0) {
|
|
989
1014
|
console.error("🚨 TSViewer: Received empty annotation!");
|
|
990
1015
|
return;
|
|
@@ -995,314 +1020,314 @@ const Cn = (t, e) => {
|
|
|
995
1020
|
}
|
|
996
1021
|
q.value = !1;
|
|
997
1022
|
try {
|
|
998
|
-
r.id ? (console.log("📍 TSViewer: Updating annotation via composable"), await _(r),
|
|
1023
|
+
r.id ? (console.log("📍 TSViewer: Updating annotation via composable"), await _(r), ee()) : (console.log("📍 TSViewer: Creating annotation via composable"), await R(r), ft()), console.log("📍 TSViewer: Annotation operation completed successfully");
|
|
999
1024
|
} catch (f) {
|
|
1000
1025
|
console.error("📍 TSViewer: Error creating/updating annotation:", f), q.value = !0;
|
|
1001
1026
|
}
|
|
1002
|
-
},
|
|
1003
|
-
|
|
1004
|
-
},
|
|
1005
|
-
|
|
1006
|
-
},
|
|
1007
|
-
|
|
1027
|
+
}, ee = () => {
|
|
1028
|
+
v.value.renderAnnotationCanvas();
|
|
1029
|
+
}, lt = (r) => {
|
|
1030
|
+
ce.value = r, B.value = !0;
|
|
1031
|
+
}, ut = async (r) => {
|
|
1032
|
+
B.value = !1;
|
|
1008
1033
|
try {
|
|
1009
|
-
await V(r),
|
|
1034
|
+
await V(r), ct(), console.log("📍 TSViewer: Annotation deleted successfully");
|
|
1010
1035
|
} catch (f) {
|
|
1011
1036
|
console.error("📍 TSViewer: Error deleting annotation:", f);
|
|
1012
1037
|
}
|
|
1013
|
-
},
|
|
1014
|
-
|
|
1015
|
-
},
|
|
1038
|
+
}, ct = () => {
|
|
1039
|
+
v.value.renderAnnotationCanvas();
|
|
1040
|
+
}, dt = (r, f, d, w, U, le) => {
|
|
1016
1041
|
if (console.log("📍 TSViewer: onAddAnnotation called with:", {
|
|
1017
1042
|
startTime: r,
|
|
1018
1043
|
duration: f,
|
|
1019
1044
|
allChannels: d,
|
|
1020
|
-
label:
|
|
1021
|
-
description:
|
|
1022
|
-
layer:
|
|
1023
|
-
}), !
|
|
1024
|
-
console.error("Invalid layer provided to onAddAnnotation:",
|
|
1045
|
+
label: w,
|
|
1046
|
+
description: U,
|
|
1047
|
+
layer: le
|
|
1048
|
+
}), !le || !le.id) {
|
|
1049
|
+
console.error("Invalid layer provided to onAddAnnotation:", le);
|
|
1025
1050
|
return;
|
|
1026
1051
|
}
|
|
1027
|
-
const
|
|
1052
|
+
const Rt = h.viewerSelectedChannels || [], jt = d ? [] : Rt.map((Mt) => Mt.id), Re = {
|
|
1028
1053
|
id: null,
|
|
1029
|
-
label:
|
|
1030
|
-
description:
|
|
1054
|
+
label: w || "Event",
|
|
1055
|
+
description: U || "",
|
|
1031
1056
|
start: Math.floor(r),
|
|
1032
1057
|
end: Math.floor(r + f),
|
|
1033
1058
|
duration: Math.floor(f),
|
|
1034
|
-
channelIds:
|
|
1059
|
+
channelIds: jt,
|
|
1035
1060
|
allChannels: d,
|
|
1036
|
-
layer_id:
|
|
1061
|
+
layer_id: le.id,
|
|
1037
1062
|
selected: !0,
|
|
1038
1063
|
userId: null
|
|
1039
1064
|
};
|
|
1040
|
-
console.log("📍 TSViewer: Created annotation object:",
|
|
1041
|
-
},
|
|
1042
|
-
|
|
1043
|
-
},
|
|
1044
|
-
|
|
1045
|
-
},
|
|
1065
|
+
console.log("📍 TSViewer: Created annotation object:", Re), h.setActiveAnnotation(Re), console.log("📍 TSViewer: Store now contains:", h.activeAnnotation), q.value = !0, console.log("📍 TSViewer: Modal opened with annotation data");
|
|
1066
|
+
}, ft = () => {
|
|
1067
|
+
v.value.renderAnnotationCanvas();
|
|
1068
|
+
}, vt = (r) => {
|
|
1069
|
+
v.value.createAnnotationLayer(r);
|
|
1070
|
+
}, De = () => {
|
|
1046
1071
|
ae.value = !1;
|
|
1047
|
-
},
|
|
1048
|
-
|
|
1049
|
-
},
|
|
1072
|
+
}, pt = () => {
|
|
1073
|
+
v.value.resetFocusedAnnotation(), v.value.renderAnnotationCanvas(), q.value = !1;
|
|
1074
|
+
}, ht = () => {
|
|
1050
1075
|
se.value = !1;
|
|
1051
|
-
},
|
|
1076
|
+
}, gt = (r) => {
|
|
1052
1077
|
r.stopPropagation(), r.preventDefault();
|
|
1053
1078
|
const f = r.detail.sourceEvent.metaKey;
|
|
1054
|
-
|
|
1055
|
-
}, vt = () => {
|
|
1056
|
-
k.value = p.value.getNextAnnotation();
|
|
1057
|
-
}, pt = () => {
|
|
1058
|
-
k.value = p.value.getPreviousAnnotation();
|
|
1059
|
-
}, ht = (r) => {
|
|
1060
|
-
ke(r * 1e6);
|
|
1061
|
-
}, gt = () => {
|
|
1062
|
-
W.value = W.value * 1.25;
|
|
1079
|
+
ke({ channelId: r.currentTarget.dataset.id, append: f }), v.value.renderAll();
|
|
1063
1080
|
}, yt = () => {
|
|
1064
|
-
|
|
1081
|
+
k.value = v.value.getNextAnnotation();
|
|
1065
1082
|
}, mt = () => {
|
|
1066
|
-
|
|
1067
|
-
}, wt = () => {
|
|
1083
|
+
k.value = v.value.getPreviousAnnotation();
|
|
1084
|
+
}, wt = (r) => {
|
|
1085
|
+
Le(r * 1e6);
|
|
1068
1086
|
}, At = () => {
|
|
1087
|
+
x.value = x.value * 1.25;
|
|
1088
|
+
}, St = () => {
|
|
1089
|
+
x.value = x.value * 0.8;
|
|
1090
|
+
}, Tt = () => {
|
|
1091
|
+
E.value.getAnnotations();
|
|
1092
|
+
}, It = () => {
|
|
1093
|
+
}, _t = () => {
|
|
1069
1094
|
console.log("Page forward triggered from toolbar");
|
|
1070
1095
|
const r = Math.max(
|
|
1071
|
-
k.value - 3 / 4 *
|
|
1096
|
+
k.value - 3 / 4 * j.value,
|
|
1072
1097
|
O.value
|
|
1073
1098
|
);
|
|
1074
1099
|
te(r), ne(() => {
|
|
1075
1100
|
var f;
|
|
1076
|
-
(f =
|
|
1101
|
+
(f = v.value) == null || f.renderAll();
|
|
1077
1102
|
});
|
|
1078
|
-
},
|
|
1103
|
+
}, bt = () => {
|
|
1079
1104
|
console.log("Page forward triggered from toolbar");
|
|
1080
1105
|
const r = Math.min(
|
|
1081
|
-
k.value + 3 / 4 *
|
|
1082
|
-
C.value -
|
|
1106
|
+
k.value + 3 / 4 * j.value,
|
|
1107
|
+
C.value - j.value
|
|
1083
1108
|
);
|
|
1084
1109
|
console.log(`Moving from ${k.value} to ${r}`), te(r), ne(() => {
|
|
1085
1110
|
var f, d;
|
|
1086
|
-
(f =
|
|
1111
|
+
(f = v.value) != null && f.invalidate && v.value.invalidate(), (d = v.value) != null && d.renderAll && v.value.renderAll();
|
|
1087
1112
|
});
|
|
1088
|
-
},
|
|
1089
|
-
let f =
|
|
1090
|
-
te(r.annotation.start - (Q.value *
|
|
1113
|
+
}, Ct = (r) => {
|
|
1114
|
+
let f = v.value.rsPeriod;
|
|
1115
|
+
te(r.annotation.start - (Q.value * X.value - s.CURSOROFFSET) * f), ne(() => {
|
|
1091
1116
|
var d;
|
|
1092
|
-
(d =
|
|
1117
|
+
(d = v.value) == null || d.renderAll();
|
|
1093
1118
|
});
|
|
1094
|
-
},
|
|
1119
|
+
}, ke = (r) => {
|
|
1095
1120
|
const f = b.value.map((d) => {
|
|
1096
|
-
const
|
|
1097
|
-
return r.append === !1 && (d.selected = !1), r.channelId === d.id && (d.selected = !
|
|
1121
|
+
const w = d.selected;
|
|
1122
|
+
return r.append === !1 && (d.selected = !1), r.channelId === d.id && (d.selected = !w), d;
|
|
1098
1123
|
});
|
|
1099
|
-
|
|
1100
|
-
},
|
|
1101
|
-
const d = b.value.map((
|
|
1102
|
-
|
|
1124
|
+
h.setChannels(f);
|
|
1125
|
+
}, Et = (r, f) => {
|
|
1126
|
+
const d = b.value.map((w) => (f === !1 && (w.selected = !1), w.id in r && (w.selected = !0), w));
|
|
1127
|
+
h.setChannels(d);
|
|
1103
1128
|
}, te = (r) => {
|
|
1104
1129
|
k.value = r;
|
|
1105
|
-
},
|
|
1130
|
+
}, Ot = (r) => {
|
|
1106
1131
|
Q.value = r;
|
|
1107
|
-
},
|
|
1108
|
-
|
|
1109
|
-
},
|
|
1110
|
-
r > s.MAXDURATION ?
|
|
1111
|
-
},
|
|
1132
|
+
}, Pt = (r) => {
|
|
1133
|
+
x.value = r;
|
|
1134
|
+
}, Le = (r) => {
|
|
1135
|
+
r > s.MAXDURATION ? j.value = s.MAXDURATION : j.value = r;
|
|
1136
|
+
}, Dt = (r, f, d) => (s.DEFAULTDPI * window.devicePixelRatio / (f * d) / 25.4).toFixed(1) + " " + r.unit + "/mm", Ne = () => {
|
|
1112
1137
|
var f;
|
|
1113
|
-
const r = (f =
|
|
1138
|
+
const r = (f = ie.value) == null ? void 0 : f.channels;
|
|
1114
1139
|
if (console.log("🔄 initTimeRange called with channels:", (r == null ? void 0 : r.length) || 0), r && r.length > 0) {
|
|
1115
|
-
O.value = r[0].
|
|
1116
|
-
for (let
|
|
1117
|
-
r[
|
|
1140
|
+
O.value = r[0].start, C.value = r[0].end;
|
|
1141
|
+
for (let w = 1; w < r.length; w++)
|
|
1142
|
+
r[w].start < O.value && (O.value = r[w].start), r[w].end > C.value && (C.value = r[w].end);
|
|
1118
1143
|
const d = k.value;
|
|
1119
1144
|
k.value = O.value, console.log("📅 Time range initialized:", {
|
|
1120
1145
|
ts_start: O.value,
|
|
1121
1146
|
ts_end: C.value,
|
|
1122
1147
|
oldStart: d,
|
|
1123
1148
|
newStart: k.value,
|
|
1124
|
-
duration:
|
|
1149
|
+
duration: j.value,
|
|
1125
1150
|
startDate: new Date(O.value / 1e3).toISOString(),
|
|
1126
1151
|
endDate: new Date(C.value / 1e3).toISOString()
|
|
1127
1152
|
});
|
|
1128
1153
|
} else
|
|
1129
1154
|
console.warn("⚠️ initTimeRange: No channels found in activeViewer");
|
|
1130
|
-
},
|
|
1131
|
-
|
|
1132
|
-
}, Ot = (r) => {
|
|
1133
|
-
ae.value = !0;
|
|
1134
|
-
}, Pt = (r) => {
|
|
1135
|
-
const f = he([], "channels", r), d = he("", "filter", r), y = I.value;
|
|
1136
|
-
y.onChannels = f, yn(d) ? (y.input0 = NaN, y.input1 = NaN, y.selectedFilter = null, y.selectedNotch = null) : (y.input0 = d.input0, y.input1 = d.input1), se.value = !0;
|
|
1155
|
+
}, kt = () => {
|
|
1156
|
+
Ne();
|
|
1137
1157
|
}, Lt = (r) => {
|
|
1138
|
-
|
|
1139
|
-
},
|
|
1158
|
+
ae.value = !0;
|
|
1159
|
+
}, Nt = (r) => {
|
|
1160
|
+
const f = he([], "channels", r), d = he("", "filter", r), w = T.value;
|
|
1161
|
+
w.onChannels = f, Sn(d) ? (w.input0 = NaN, w.input1 = NaN, w.selectedFilter = null, w.selectedNotch = null) : (w.input0 = d.input0, w.input1 = d.input1), se.value = !0;
|
|
1162
|
+
}, Ut = (r) => {
|
|
1163
|
+
v.value.setFilters(r);
|
|
1164
|
+
}, Ue = () => {
|
|
1140
1165
|
var r, f;
|
|
1141
|
-
(r =
|
|
1166
|
+
(r = v.value) == null || r.initViewerCanvas(), (f = v.value) == null || f.renderAll();
|
|
1142
1167
|
};
|
|
1143
|
-
return
|
|
1144
|
-
|
|
1168
|
+
return Vt(() => {
|
|
1169
|
+
kt();
|
|
1145
1170
|
const r = document.getElementById("ts_viewer");
|
|
1146
1171
|
if (!r) {
|
|
1147
1172
|
console.warn("ts_viewer element not found");
|
|
1148
1173
|
return;
|
|
1149
1174
|
}
|
|
1150
1175
|
var f = window.getComputedStyle(r, null);
|
|
1151
|
-
const d = parseInt(f.getPropertyValue("height")),
|
|
1152
|
-
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
}),
|
|
1156
|
-
window.removeEventListener("resize",
|
|
1176
|
+
const d = parseInt(f.getPropertyValue("height")), w = m.isPreview ? 0 : 100;
|
|
1177
|
+
G.value = d - w, P.value && (H.value = P.value.offsetWidth), window.addEventListener("resize", a);
|
|
1178
|
+
const U = I.value;
|
|
1179
|
+
U && (oe.value = U.clientWidth, X.value = H.value - U.clientWidth - 5 - 10, K.value = G.value - 88), j.value = s.INITDURATION, Ue();
|
|
1180
|
+
}), Wt(() => {
|
|
1181
|
+
window.removeEventListener("resize", a);
|
|
1157
1182
|
}), e({
|
|
1158
|
-
openEditAnnotationDialog:
|
|
1159
|
-
confirmDeleteAnnotation:
|
|
1160
|
-
selectAnnotation:
|
|
1161
|
-
selectChannel:
|
|
1162
|
-
selectChannels:
|
|
1163
|
-
openLayerWindow:
|
|
1164
|
-
openFilterWindow:
|
|
1165
|
-
setTimeseriesFilters:
|
|
1183
|
+
openEditAnnotationDialog: c,
|
|
1184
|
+
confirmDeleteAnnotation: lt,
|
|
1185
|
+
selectAnnotation: Ct,
|
|
1186
|
+
selectChannel: ke,
|
|
1187
|
+
selectChannels: Et,
|
|
1188
|
+
openLayerWindow: Lt,
|
|
1189
|
+
openFilterWindow: Nt,
|
|
1190
|
+
setTimeseriesFilters: Ut
|
|
1166
1191
|
}), (r, f) => (de(), Ie("div", {
|
|
1167
1192
|
id: "ts_viewer",
|
|
1168
1193
|
ref_key: "ts_viewer",
|
|
1169
|
-
ref:
|
|
1170
|
-
class:
|
|
1194
|
+
ref: P,
|
|
1195
|
+
class: _e([t.isPreview ? "timeseries-viewer preview" : "timeseries-viewer"])
|
|
1171
1196
|
}, [
|
|
1172
1197
|
re(J(n), {
|
|
1173
1198
|
ref_key: "scrubber",
|
|
1174
|
-
ref:
|
|
1199
|
+
ref: E,
|
|
1175
1200
|
ts_start: O.value,
|
|
1176
1201
|
ts_end: C.value,
|
|
1177
|
-
"c-width":
|
|
1202
|
+
"c-width": X.value,
|
|
1178
1203
|
"label-width": oe.value,
|
|
1179
1204
|
"cursor-loc": Q.value,
|
|
1180
1205
|
start: k.value,
|
|
1181
|
-
duration:
|
|
1206
|
+
duration: j.value,
|
|
1182
1207
|
constants: s,
|
|
1183
|
-
"active-viewer":
|
|
1208
|
+
"active-viewer": ie.value,
|
|
1184
1209
|
onSetStart: te
|
|
1185
1210
|
}, null, 8, ["ts_start", "ts_end", "c-width", "label-width", "cursor-loc", "start", "duration", "active-viewer"]),
|
|
1186
|
-
|
|
1187
|
-
|
|
1211
|
+
ue("div", kn, [
|
|
1212
|
+
ue("div", {
|
|
1188
1213
|
id: "channelLabels",
|
|
1189
1214
|
ref_key: "channelLabels",
|
|
1190
|
-
ref:
|
|
1215
|
+
ref: I
|
|
1191
1216
|
}, [
|
|
1192
|
-
(de(!0), Ie(
|
|
1217
|
+
(de(!0), Ie(xt, null, qt(we.value, (d) => (de(), Ie("div", {
|
|
1193
1218
|
key: d.displayName,
|
|
1194
1219
|
class: "chLabelWrap",
|
|
1195
1220
|
"data-id": d.id,
|
|
1196
|
-
onTap:
|
|
1221
|
+
onTap: gt
|
|
1197
1222
|
}, [
|
|
1198
|
-
|
|
1199
|
-
class:
|
|
1223
|
+
ue("div", {
|
|
1224
|
+
class: _e([d.selected ? "labelDiv selected" : "labelDiv"])
|
|
1200
1225
|
}, je(d.displayName), 3),
|
|
1201
|
-
|
|
1202
|
-
class:
|
|
1226
|
+
ue("div", {
|
|
1227
|
+
class: _e(["chLabelIndWrap", [d.selected ? "selected" : ""]]),
|
|
1203
1228
|
hidden: Ae.value
|
|
1204
1229
|
}, [
|
|
1205
|
-
|
|
1230
|
+
ue("div", {
|
|
1206
1231
|
class: "chLabelInd",
|
|
1207
1232
|
hidden: Ae.value
|
|
1208
|
-
}, je(
|
|
1209
|
-
], 10,
|
|
1210
|
-
], 40,
|
|
1233
|
+
}, je(Dt(d, x.value, d.rowScale)), 9, Un)
|
|
1234
|
+
], 10, Nn)
|
|
1235
|
+
], 40, Ln))), 128))
|
|
1211
1236
|
], 512),
|
|
1212
1237
|
re(J(o), {
|
|
1213
1238
|
ref_key: "viewerCanvas",
|
|
1214
|
-
ref:
|
|
1215
|
-
window_height:
|
|
1216
|
-
window_width:
|
|
1217
|
-
duration:
|
|
1239
|
+
ref: v,
|
|
1240
|
+
window_height: G.value,
|
|
1241
|
+
window_width: H.value,
|
|
1242
|
+
duration: j.value,
|
|
1218
1243
|
start: k.value,
|
|
1219
|
-
"c-width":
|
|
1244
|
+
"c-width": X.value,
|
|
1220
1245
|
"c-height": K.value,
|
|
1221
1246
|
constants: s,
|
|
1222
1247
|
"ts-start": O.value,
|
|
1223
1248
|
"ts-end": C.value,
|
|
1224
1249
|
"cursor-loc": Q.value,
|
|
1225
|
-
"global-zoom-mult":
|
|
1226
|
-
"active-viewer":
|
|
1250
|
+
"global-zoom-mult": x.value,
|
|
1251
|
+
"active-viewer": ie.value,
|
|
1227
1252
|
onSetStart: te,
|
|
1228
|
-
onSetCursor:
|
|
1229
|
-
onSetGlobalZoom:
|
|
1230
|
-
onSetDuration:
|
|
1231
|
-
onChannelsInitialized:
|
|
1232
|
-
onAnnLayersInitialized:
|
|
1233
|
-
onCloseAnnotationLayerWindow:
|
|
1234
|
-
onAddAnnotation:
|
|
1235
|
-
onUpdateAnnotation:
|
|
1253
|
+
onSetCursor: Ot,
|
|
1254
|
+
onSetGlobalZoom: Pt,
|
|
1255
|
+
onSetDuration: Le,
|
|
1256
|
+
onChannelsInitialized: It,
|
|
1257
|
+
onAnnLayersInitialized: Tt,
|
|
1258
|
+
onCloseAnnotationLayerWindow: De,
|
|
1259
|
+
onAddAnnotation: dt,
|
|
1260
|
+
onUpdateAnnotation: p
|
|
1236
1261
|
}, null, 8, ["window_height", "window_width", "duration", "start", "c-width", "c-height", "ts-start", "ts-end", "cursor-loc", "global-zoom-mult", "active-viewer"])
|
|
1237
1262
|
]),
|
|
1238
|
-
t.isPreview ?
|
|
1263
|
+
t.isPreview ? Ft("", !0) : (de(), $t(J(i), {
|
|
1239
1264
|
key: 0,
|
|
1240
1265
|
constants: s,
|
|
1241
|
-
duration:
|
|
1266
|
+
duration: j.value,
|
|
1242
1267
|
start: k.value,
|
|
1243
|
-
onPageBack:
|
|
1244
|
-
onPageForward:
|
|
1245
|
-
onIncrementZoom:
|
|
1246
|
-
onDecrementZoom:
|
|
1247
|
-
onUpdateDuration:
|
|
1248
|
-
onNextAnnotation:
|
|
1249
|
-
onPreviousAnnotation:
|
|
1268
|
+
onPageBack: _t,
|
|
1269
|
+
onPageForward: bt,
|
|
1270
|
+
onIncrementZoom: At,
|
|
1271
|
+
onDecrementZoom: St,
|
|
1272
|
+
onUpdateDuration: wt,
|
|
1273
|
+
onNextAnnotation: yt,
|
|
1274
|
+
onPreviousAnnotation: mt,
|
|
1250
1275
|
onSetStart: te
|
|
1251
1276
|
}, null, 8, ["duration", "start"])),
|
|
1252
1277
|
re(J(u), {
|
|
1253
1278
|
ref_key: "filterWindow",
|
|
1254
|
-
ref:
|
|
1279
|
+
ref: T,
|
|
1255
1280
|
visible: se.value,
|
|
1256
1281
|
"onUpdate:visible": f[0] || (f[0] = (d) => se.value = d),
|
|
1257
|
-
onCloseWindow:
|
|
1282
|
+
onCloseWindow: ht
|
|
1258
1283
|
}, null, 8, ["visible"]),
|
|
1259
|
-
re(J(
|
|
1284
|
+
re(J(g), {
|
|
1260
1285
|
ref_key: "annotationModal",
|
|
1261
|
-
ref:
|
|
1286
|
+
ref: W,
|
|
1262
1287
|
visible: q.value,
|
|
1263
1288
|
"onUpdate:visible": f[1] || (f[1] = (d) => q.value = d),
|
|
1264
|
-
onCloseWindow:
|
|
1265
|
-
onCreateUpdateAnnotation:
|
|
1289
|
+
onCloseWindow: pt,
|
|
1290
|
+
onCreateUpdateAnnotation: L
|
|
1266
1291
|
}, null, 8, ["visible"]),
|
|
1267
|
-
re(J(
|
|
1268
|
-
visible:
|
|
1269
|
-
"delete-annotation":
|
|
1270
|
-
"onUpdate:visible": f[2] || (f[2] = (d) =>
|
|
1271
|
-
onDelete:
|
|
1292
|
+
re(J(A), {
|
|
1293
|
+
visible: B.value,
|
|
1294
|
+
"delete-annotation": ce.value,
|
|
1295
|
+
"onUpdate:visible": f[2] || (f[2] = (d) => B.value = d),
|
|
1296
|
+
onDelete: ut
|
|
1272
1297
|
}, null, 8, ["visible", "delete-annotation"]),
|
|
1273
1298
|
re(J(l), {
|
|
1274
1299
|
visible: ae.value,
|
|
1275
|
-
onCloseWindow:
|
|
1276
|
-
onCreateLayer:
|
|
1300
|
+
onCloseWindow: De,
|
|
1301
|
+
onCreateLayer: vt
|
|
1277
1302
|
}, null, 8, ["visible"])
|
|
1278
1303
|
], 2));
|
|
1279
1304
|
}
|
|
1280
|
-
},
|
|
1305
|
+
}, jn = /* @__PURE__ */ Dn(Rn, [["__scopeId", "data-v-d5eda6cd"]]), Fn = {
|
|
1281
1306
|
install(t) {
|
|
1282
|
-
t.component("TSViewer",
|
|
1307
|
+
t.component("TSViewer", jn);
|
|
1283
1308
|
}
|
|
1284
1309
|
};
|
|
1285
1310
|
export {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1311
|
+
jn as T,
|
|
1312
|
+
S as _,
|
|
1313
|
+
Ee as a,
|
|
1289
1314
|
N as b,
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1315
|
+
D as c,
|
|
1316
|
+
Jt as d,
|
|
1317
|
+
Ht as e,
|
|
1318
|
+
nn as f,
|
|
1319
|
+
Dn as g,
|
|
1295
1320
|
fe as h,
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1321
|
+
$n as i,
|
|
1322
|
+
Ce as j,
|
|
1323
|
+
qe as k,
|
|
1324
|
+
Zt as l,
|
|
1325
|
+
F as m,
|
|
1326
|
+
sn as n,
|
|
1302
1327
|
pe as o,
|
|
1303
1328
|
he as p,
|
|
1304
|
-
|
|
1329
|
+
an as q,
|
|
1305
1330
|
ge as r,
|
|
1306
|
-
|
|
1307
|
-
|
|
1331
|
+
Fn as s,
|
|
1332
|
+
it as u
|
|
1308
1333
|
};
|