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