@pennsieve-viz/tsviewer 1.1.11 → 1.1.13

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