viral-viewer-2 7.0.7 → 7.0.9

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.
@@ -26,7 +26,7 @@ class fs {
26
26
  this.X = 0, this.Y = 0, this.Z = 0;
27
27
  }
28
28
  }
29
- var _i = /* @__PURE__ */ ((s) => (s[s.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", s[s.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", s[s.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", s[s.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", s[s.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", s[s.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", s))(_i || {}), Ls = /* @__PURE__ */ ((s) => (s[s.ON_WAKE = 0] = "ON_WAKE", s[s.ON_SLEEP = 1] = "ON_SLEEP", s[s.ON_UPDATE = 2] = "ON_UPDATE", s))(Ls || {}), lo = /* @__PURE__ */ ((s) => (s[s.KEYDOWN = 0] = "KEYDOWN", s[s.KEYUP = 1] = "KEYUP", s))(lo || {}), At = /* @__PURE__ */ ((s) => (s[s.LOADED_SCENE = 0] = "LOADED_SCENE", s[s.LOADED_MATERIAL_MANAGER = 1] = "LOADED_MATERIAL_MANAGER", s[s.LOADED_RENDERER = 2] = "LOADED_RENDERER", s[s.LOADED_CAMERA = 3] = "LOADED_CAMERA", s[s.LOADED_CUBE = 4] = "LOADED_CUBE", s[s.LOADED_TOOLS = 5] = "LOADED_TOOLS", s[s.LOADED_SEPERATE_MODEL = 6] = "LOADED_SEPERATE_MODEL", s[s.GENERATED_MERGE_MODEL = 7] = "GENERATED_MERGE_MODEL", s[s.LOADED_DATA = 8] = "LOADED_DATA", s[s.SELECT_ELEMENTS = 9] = "SELECT_ELEMENTS", s))(At || {});
29
+ var _i = /* @__PURE__ */ ((s) => (s[s.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", s[s.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", s[s.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", s[s.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", s[s.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", s[s.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", s))(_i || {}), Ls = /* @__PURE__ */ ((s) => (s[s.ON_WAKE = 0] = "ON_WAKE", s[s.ON_SLEEP = 1] = "ON_SLEEP", s[s.ON_UPDATE = 2] = "ON_UPDATE", s))(Ls || {}), lo = /* @__PURE__ */ ((s) => (s[s.KEYDOWN = 0] = "KEYDOWN", s[s.KEYUP = 1] = "KEYUP", s))(lo || {}), Mt = /* @__PURE__ */ ((s) => (s[s.LOADED_SCENE = 0] = "LOADED_SCENE", s[s.LOADED_MATERIAL_MANAGER = 1] = "LOADED_MATERIAL_MANAGER", s[s.LOADED_RENDERER = 2] = "LOADED_RENDERER", s[s.LOADED_CAMERA = 3] = "LOADED_CAMERA", s[s.LOADED_CUBE = 4] = "LOADED_CUBE", s[s.LOADED_TOOLS = 5] = "LOADED_TOOLS", s[s.LOADED_SEPERATE_MODEL = 6] = "LOADED_SEPERATE_MODEL", s[s.GENERATED_MERGE_MODEL = 7] = "GENERATED_MERGE_MODEL", s[s.LOADED_DATA = 8] = "LOADED_DATA", s[s.SELECT_ELEMENTS = 9] = "SELECT_ELEMENTS", s[s.UNSELECT_ELEMENTS = 10] = "UNSELECT_ELEMENTS", s))(Mt || {});
30
30
  class jr {
31
31
  constructor() {
32
32
  this.items = {};
@@ -598,7 +598,7 @@ const { _tr_init: xy, _tr_stored_block: lf, _tr_flush_block: by, _tr_tally: vr,
598
598
  Z_NO_FLUSH: xr,
599
599
  Z_PARTIAL_FLUSH: _y,
600
600
  Z_FULL_FLUSH: wy,
601
- Z_FINISH: Cn,
601
+ Z_FINISH: Pn,
602
602
  Z_BLOCK: Rm,
603
603
  Z_OK: Ui,
604
604
  Z_STREAM_END: Dm,
@@ -674,11 +674,11 @@ const gn = (s) => {
674
674
  }, Zv = (s, e) => {
675
675
  let t = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5, i, n, r, a = 0, o = s.strm.avail_in;
676
676
  do {
677
- if (i = 65535, r = s.bi_valid + 42 >> 3, s.strm.avail_out < r || (r = s.strm.avail_out - r, n = s.strstart - s.block_start, i > n + s.strm.avail_in && (i = n + s.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !== Cn || e === xr || i !== n + s.strm.avail_in)))
677
+ if (i = 65535, r = s.bi_valid + 42 >> 3, s.strm.avail_out < r || (r = s.strm.avail_out - r, n = s.strstart - s.block_start, i > n + s.strm.avail_in && (i = n + s.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !== Pn || e === xr || i !== n + s.strm.avail_in)))
678
678
  break;
679
- a = e === Cn && i === n + s.strm.avail_in ? 1 : 0, lf(s, 0, 0, a), s.pending_buf[s.pending - 4] = i, s.pending_buf[s.pending - 3] = i >> 8, s.pending_buf[s.pending - 2] = ~i, s.pending_buf[s.pending - 1] = ~i >> 8, gn(s.strm), n && (n > i && (n = i), s.strm.output.set(s.window.subarray(s.block_start, s.block_start + n), s.strm.next_out), s.strm.next_out += n, s.strm.avail_out -= n, s.strm.total_out += n, s.block_start += n, i -= n), i && (pf(s.strm, s.strm.output, s.strm.next_out, i), s.strm.next_out += i, s.strm.avail_out -= i, s.strm.total_out += i);
679
+ a = e === Pn && i === n + s.strm.avail_in ? 1 : 0, lf(s, 0, 0, a), s.pending_buf[s.pending - 4] = i, s.pending_buf[s.pending - 3] = i >> 8, s.pending_buf[s.pending - 2] = ~i, s.pending_buf[s.pending - 1] = ~i >> 8, gn(s.strm), n && (n > i && (n = i), s.strm.output.set(s.window.subarray(s.block_start, s.block_start + n), s.strm.next_out), s.strm.next_out += n, s.strm.avail_out -= n, s.strm.total_out += n, s.block_start += n, i -= n), i && (pf(s.strm, s.strm.output, s.strm.next_out, i), s.strm.next_out += i, s.strm.avail_out -= i, s.strm.total_out += i);
680
680
  } while (a === 0);
681
- return o -= s.strm.avail_in, o && (o >= s.w_size ? (s.matches = 2, s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0), s.strstart = s.w_size, s.insert = s.strstart) : (s.window_size - s.strstart <= o && (s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, s.insert > s.strstart && (s.insert = s.strstart)), s.window.set(s.strm.input.subarray(s.strm.next_in - o, s.strm.next_in), s.strstart), s.strstart += o, s.insert += o > s.w_size - s.insert ? s.w_size - s.insert : o), s.block_start = s.strstart), s.high_water < s.strstart && (s.high_water = s.strstart), a ? Ro : e !== xr && e !== Cn && s.strm.avail_in === 0 && s.strstart === s.block_start ? Io : (r = s.window_size - s.strstart, s.strm.avail_in > r && s.block_start >= s.w_size && (s.block_start -= s.w_size, s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, r += s.w_size, s.insert > s.strstart && (s.insert = s.strstart)), r > s.strm.avail_in && (r = s.strm.avail_in), r && (pf(s.strm, s.window, s.strstart, r), s.strstart += r, s.insert += r > s.w_size - s.insert ? s.w_size - s.insert : r), s.high_water < s.strstart && (s.high_water = s.strstart), r = s.bi_valid + 42 >> 3, r = s.pending_buf_size - r > 65535 ? 65535 : s.pending_buf_size - r, t = r > s.w_size ? s.w_size : r, n = s.strstart - s.block_start, (n >= t || (n || e === Cn) && e !== xr && s.strm.avail_in === 0 && n <= r) && (i = n > r ? r : n, a = e === Cn && s.strm.avail_in === 0 && i === n ? 1 : 0, lf(s, s.block_start, i, a), s.block_start += i, gn(s.strm)), a ? aa : Zi);
681
+ return o -= s.strm.avail_in, o && (o >= s.w_size ? (s.matches = 2, s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0), s.strstart = s.w_size, s.insert = s.strstart) : (s.window_size - s.strstart <= o && (s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, s.insert > s.strstart && (s.insert = s.strstart)), s.window.set(s.strm.input.subarray(s.strm.next_in - o, s.strm.next_in), s.strstart), s.strstart += o, s.insert += o > s.w_size - s.insert ? s.w_size - s.insert : o), s.block_start = s.strstart), s.high_water < s.strstart && (s.high_water = s.strstart), a ? Ro : e !== xr && e !== Pn && s.strm.avail_in === 0 && s.strstart === s.block_start ? Io : (r = s.window_size - s.strstart, s.strm.avail_in > r && s.block_start >= s.w_size && (s.block_start -= s.w_size, s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, r += s.w_size, s.insert > s.strstart && (s.insert = s.strstart)), r > s.strm.avail_in && (r = s.strm.avail_in), r && (pf(s.strm, s.window, s.strstart, r), s.strstart += r, s.insert += r > s.w_size - s.insert ? s.w_size - s.insert : r), s.high_water < s.strstart && (s.high_water = s.strstart), r = s.bi_valid + 42 >> 3, r = s.pending_buf_size - r > 65535 ? 65535 : s.pending_buf_size - r, t = r > s.w_size ? s.w_size : r, n = s.strstart - s.block_start, (n >= t || (n || e === Pn) && e !== xr && s.strm.avail_in === 0 && n <= r) && (i = n > r ? r : n, a = e === Pn && s.strm.avail_in === 0 && i === n ? 1 : 0, lf(s, s.block_start, i, a), s.block_start += i, gn(s.strm)), a ? aa : Zi);
682
682
  }, Nd = (s, e) => {
683
683
  let t, i;
684
684
  for (; ; ) {
@@ -702,7 +702,7 @@ const gn = (s) => {
702
702
  if (i && (xn(s, !1), s.strm.avail_out === 0))
703
703
  return Zi;
704
704
  }
705
- return s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
705
+ return s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
706
706
  }, ba = (s, e) => {
707
707
  let t, i, n;
708
708
  for (; ; ) {
@@ -725,7 +725,7 @@ const gn = (s) => {
725
725
  } else
726
726
  s.match_available = 1, s.strstart++, s.lookahead--;
727
727
  }
728
- return s.match_available && (i = vr(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
728
+ return s.match_available && (i = vr(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
729
729
  }, Hy = (s, e) => {
730
730
  let t, i, n, r;
731
731
  const a = s.window;
@@ -746,7 +746,7 @@ const gn = (s) => {
746
746
  if (s.match_length >= Rt ? (t = vr(s, 1, s.match_length - Rt), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0) : (t = vr(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++), t && (xn(s, !1), s.strm.avail_out === 0))
747
747
  return Zi;
748
748
  }
749
- return s.insert = 0, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
749
+ return s.insert = 0, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
750
750
  }, Yy = (s, e) => {
751
751
  let t;
752
752
  for (; ; ) {
@@ -758,7 +758,7 @@ const gn = (s) => {
758
758
  if (s.match_length = 0, t = vr(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, t && (xn(s, !1), s.strm.avail_out === 0))
759
759
  return Zi;
760
760
  }
761
- return s.insert = 0, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
761
+ return s.insert = 0, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
762
762
  };
763
763
  function ns(s, e, t, i, n) {
764
764
  this.good_length = s, this.max_lazy = e, this.nice_length = t, this.max_chain = i, this.func = n;
@@ -824,13 +824,13 @@ const sc = (s) => {
824
824
  if (sc(s) || e > Rm || e < 0)
825
825
  return s ? $r(s, vs) : vs;
826
826
  const t = s.state;
827
- if (!s.output || s.avail_in !== 0 && !s.input || t.status === vl && e !== Cn)
827
+ if (!s.output || s.avail_in !== 0 && !s.input || t.status === vl && e !== Pn)
828
828
  return $r(s, s.avail_out === 0 ? Od : vs);
829
829
  const i = t.last_flush;
830
830
  if (t.last_flush = e, t.pending !== 0) {
831
831
  if (gn(s), s.avail_out === 0)
832
832
  return t.last_flush = -1, Ui;
833
- } else if (s.avail_in === 0 && Lm(e) <= Lm(i) && e !== Cn)
833
+ } else if (s.avail_in === 0 && Lm(e) <= Lm(i) && e !== Pn)
834
834
  return $r(s, Od);
835
835
  if (t.status === vl && s.avail_in !== 0)
836
836
  return $r(s, Od);
@@ -908,7 +908,7 @@ const sc = (s) => {
908
908
  if (n === Io && (e === _y ? yy(t) : e !== Rm && (lf(t, 0, 0, !1), e === wy && (hr(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), gn(s), s.avail_out === 0))
909
909
  return t.last_flush = -1, Ui;
910
910
  }
911
- return e !== Cn ? Ui : t.wrap <= 0 ? Dm : (t.wrap === 2 ? (kt(t, s.adler & 255), kt(t, s.adler >> 8 & 255), kt(t, s.adler >> 16 & 255), kt(t, s.adler >> 24 & 255), kt(t, s.total_in & 255), kt(t, s.total_in >> 8 & 255), kt(t, s.total_in >> 16 & 255), kt(t, s.total_in >> 24 & 255)) : (zo(t, s.adler >>> 16), zo(t, s.adler & 65535)), gn(s), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? Ui : Dm);
911
+ return e !== Pn ? Ui : t.wrap <= 0 ? Dm : (t.wrap === 2 ? (kt(t, s.adler & 255), kt(t, s.adler >> 8 & 255), kt(t, s.adler >> 16 & 255), kt(t, s.adler >> 24 & 255), kt(t, s.total_in & 255), kt(t, s.total_in >> 8 & 255), kt(t, s.total_in >> 16 & 255), kt(t, s.total_in >> 24 & 255)) : (zo(t, s.adler >>> 16), zo(t, s.adler & 65535)), gn(s), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? Ui : Dm);
912
912
  }, Zy = (s) => {
913
913
  if (sc(s))
914
914
  return vs;
@@ -1394,7 +1394,7 @@ const I_ = 0, nx = 1, sx = 2, {
1394
1394
  Z_OK: oa,
1395
1395
  Z_STREAM_END: D_,
1396
1396
  Z_NEED_DICT: L_,
1397
- Z_STREAM_ERROR: Un,
1397
+ Z_STREAM_ERROR: Bn,
1398
1398
  Z_DATA_ERROR: rx,
1399
1399
  Z_MEM_ERROR: ax,
1400
1400
  Z_BUF_ERROR: O_,
@@ -1410,23 +1410,23 @@ const pa = (s) => {
1410
1410
  return !e || e.strm !== s || e.mode < dd || e.mode > lx ? 1 : 0;
1411
1411
  }, cx = (s) => {
1412
1412
  if (pa(s))
1413
- return Un;
1413
+ return Bn;
1414
1414
  const e = s.state;
1415
1415
  return s.total_in = s.total_out = e.total = 0, s.msg = "", e.wrap && (s.adler = e.wrap & 1), e.mode = dd, e.last = 0, e.havedict = 0, e.flags = -1, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new Int32Array(N_), e.distcode = e.distdyn = new Int32Array(B_), e.sane = 1, e.back = -1, oa;
1416
1416
  }, hx = (s) => {
1417
1417
  if (pa(s))
1418
- return Un;
1418
+ return Bn;
1419
1419
  const e = s.state;
1420
1420
  return e.wsize = 0, e.whave = 0, e.wnext = 0, cx(s);
1421
1421
  }, dx = (s, e) => {
1422
1422
  let t;
1423
1423
  if (pa(s))
1424
- return Un;
1424
+ return Bn;
1425
1425
  const i = s.state;
1426
- return e < 0 ? (t = 0, e = -e) : (t = (e >> 4) + 5, e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? Un : (i.window !== null && i.wbits !== e && (i.window = null), i.wrap = t, i.wbits = e, hx(s));
1426
+ return e < 0 ? (t = 0, e = -e) : (t = (e >> 4) + 5, e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? Bn : (i.window !== null && i.wbits !== e && (i.window = null), i.wrap = t, i.wbits = e, hx(s));
1427
1427
  }, ux = (s, e) => {
1428
1428
  if (!s)
1429
- return Un;
1429
+ return Bn;
1430
1430
  const t = new z_();
1431
1431
  s.state = t, t.strm = s, t.window = null, t.mode = dd;
1432
1432
  const i = dx(s, e);
@@ -1463,7 +1463,7 @@ const V_ = (s) => {
1463
1463
  new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
1464
1464
  );
1465
1465
  if (pa(s) || !s.output || !s.input && s.avail_in !== 0)
1466
- return Un;
1466
+ return Bn;
1467
1467
  t = s.state, t.mode === Ms && (t.mode = Ud), a = s.next_out, n = s.output, l = s.avail_out, r = s.next_in, i = s.input, o = s.avail_in, c = t.hold, h = t.bits, d = o, u = l, E = oa;
1468
1468
  e:
1469
1469
  for (; ; )
@@ -1880,24 +1880,24 @@ const V_ = (s) => {
1880
1880
  return ax;
1881
1881
  case lx:
1882
1882
  default:
1883
- return Un;
1883
+ return Bn;
1884
1884
  }
1885
1885
  return s.next_out = a, s.avail_out = l, s.next_in = r, s.avail_in = o, t.hold = c, t.bits = h, (t.wsize || u !== s.avail_out && t.mode < ei && (t.mode < zd || e !== Fm)) && fx(s, s.output, s.next_out, u - s.avail_out), d -= s.avail_in, u -= s.avail_out, s.total_in += d, s.total_out += u, t.total += u, t.wrap & 4 && u && (s.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
1886
1886
  t.flags ? Ei(t.check, n, u, s.next_out - u) : zl(t.check, n, u, s.next_out - u)), s.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === Ms ? 128 : 0) + (t.mode === mc || t.mode === Fd ? 256 : 0), (d === 0 && u === 0 || e === Fm) && E === oa && (E = O_), E;
1887
1887
  }, H_ = (s) => {
1888
1888
  if (pa(s))
1889
- return Un;
1889
+ return Bn;
1890
1890
  let e = s.state;
1891
1891
  return e.window && (e.window = null), s.state = null, oa;
1892
1892
  }, Y_ = (s, e) => {
1893
1893
  if (pa(s))
1894
- return Un;
1894
+ return Bn;
1895
1895
  const t = s.state;
1896
- return t.wrap & 2 ? (t.head = e, e.done = !1, oa) : Un;
1896
+ return t.wrap & 2 ? (t.head = e, e.done = !1, oa) : Bn;
1897
1897
  }, G_ = (s, e) => {
1898
1898
  const t = e.length;
1899
1899
  let i, n, r;
1900
- return pa(s) || (i = s.state, i.wrap !== 0 && i.mode !== qh) ? Un : i.mode === qh && (n = 1, n = zl(n, e, t, 0), n !== i.check) ? rx : (r = fx(s, e, t, t), r ? (i.mode = ox, ax) : (i.havedict = 1, oa));
1900
+ return pa(s) || (i = s.state, i.wrap !== 0 && i.mode !== qh) ? Bn : i.mode === qh && (n = 1, n = zl(n, e, t, 0), n !== i.check) ? rx : (r = fx(s, e, t, t), r ? (i.mode = ox, ax) : (i.havedict = 1, oa));
1901
1901
  };
1902
1902
  var W_ = hx, Q_ = dx, j_ = cx, q_ = k_, Z_ = ux, $_ = X_, K_ = H_, J_ = Y_, ew = G_, tw = "pako inflate (from Nodeca project)", Ns = {
1903
1903
  inflateReset: W_,
@@ -2164,7 +2164,7 @@ let yw = class {
2164
2164
  };
2165
2165
  var Wd;
2166
2166
  const _w = "2.9.0", xc = 1 / 8, ww = /Mac/.test((Wd = globalThis == null ? void 0 : globalThis.navigator) === null || Wd === void 0 ? void 0 : Wd.platform);
2167
- let pt, fg, bc, Qd, sn, _t, Ut, Sa, Ho, ss, rs, Rr, pg, mg, Mn, Yo, Ma, gg, jd, vg, qd, Zd, yc;
2167
+ let pt, fg, bc, Qd, sn, _t, Ut, Sa, Ho, ss, rs, Rr, pg, mg, Sn, Yo, Ma, gg, jd, vg, qd, Zd, yc;
2168
2168
  class Vs extends yw {
2169
2169
  /**
2170
2170
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
@@ -2207,7 +2207,7 @@ class Vs extends yw {
2207
2207
  * @category Statics
2208
2208
  */
2209
2209
  static install(e) {
2210
- pt = e.THREE, fg = Object.freeze(new pt.Vector3(0, 0, 0)), bc = Object.freeze(new pt.Vector3(0, 1, 0)), Qd = Object.freeze(new pt.Vector3(0, 0, 1)), sn = new pt.Vector2(), _t = new pt.Vector3(), Ut = new pt.Vector3(), Sa = new pt.Vector3(), Ho = new pt.Vector3(), ss = new pt.Vector3(), rs = new pt.Vector3(), Rr = new pt.Vector3(), pg = new pt.Vector3(), mg = new pt.Vector3(), Mn = new pt.Spherical(), Yo = new pt.Spherical(), Ma = new pt.Box3(), gg = new pt.Box3(), jd = new pt.Sphere(), vg = new pt.Quaternion(), qd = new pt.Quaternion(), Zd = new pt.Matrix4(), yc = new pt.Raycaster();
2210
+ pt = e.THREE, fg = Object.freeze(new pt.Vector3(0, 0, 0)), bc = Object.freeze(new pt.Vector3(0, 1, 0)), Qd = Object.freeze(new pt.Vector3(0, 0, 1)), sn = new pt.Vector2(), _t = new pt.Vector3(), Ut = new pt.Vector3(), Sa = new pt.Vector3(), Ho = new pt.Vector3(), ss = new pt.Vector3(), rs = new pt.Vector3(), Rr = new pt.Vector3(), pg = new pt.Vector3(), mg = new pt.Vector3(), Sn = new pt.Spherical(), Yo = new pt.Spherical(), Ma = new pt.Box3(), gg = new pt.Box3(), jd = new pt.Sphere(), vg = new pt.Quaternion(), qd = new pt.Quaternion(), Zd = new pt.Matrix4(), yc = new pt.Raycaster();
2211
2211
  }
2212
2212
  /**
2213
2213
  * list all ACTIONs
@@ -2888,11 +2888,11 @@ class Vs extends yw {
2888
2888
  lerpLookAt(e, t, i, n, r, a, o, l, c, h, d, u, f, p = !1) {
2889
2889
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = _a.NONE, this._changedDolly = 0;
2890
2890
  const v = _t.set(n, r, a), g = Ut.set(e, t, i);
2891
- Mn.setFromVector3(g.sub(v).applyQuaternion(this._yAxisUpSpace));
2891
+ Sn.setFromVector3(g.sub(v).applyQuaternion(this._yAxisUpSpace));
2892
2892
  const m = Sa.set(h, d, u), b = Ut.set(o, l, c);
2893
2893
  Yo.setFromVector3(b.sub(m).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(v.lerp(m, f));
2894
- const x = Yo.theta - Mn.theta, y = Yo.phi - Mn.phi, _ = Yo.radius - Mn.radius;
2895
- this._sphericalEnd.set(Mn.radius + _ * f, Mn.phi + y * f, Mn.theta + x * f), this.normalizeRotations(), this._needsUpdate = !0, p || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
2894
+ const x = Yo.theta - Sn.theta, y = Yo.phi - Sn.phi, _ = Yo.radius - Sn.radius;
2895
+ this._sphericalEnd.set(Sn.radius + _ * f, Sn.phi + y * f, Sn.theta + x * f), this.normalizeRotations(), this._needsUpdate = !0, p || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
2896
2896
  const w = !p || Vt(this._target.x, this._targetEnd.x, this.restThreshold) && Vt(this._target.y, this._targetEnd.y, this.restThreshold) && Vt(this._target.z, this._targetEnd.z, this.restThreshold) && Vt(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Vt(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Vt(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
2897
2897
  return this._createOnRestPromise(w);
2898
2898
  }
@@ -3204,7 +3204,7 @@ class Vs extends yw {
3204
3204
  */
3205
3205
  fromJSON(e, t = !1) {
3206
3206
  const i = JSON.parse(e);
3207
- this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = Xo(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = Xo(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = Xo(i.maxPolarAngle), this.minAzimuthAngle = Xo(i.minAzimuthAngle), this.maxAzimuthAngle = Xo(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t), Mn.setFromVector3(_t.fromArray(i.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(Mn.theta, Mn.phi, t), this.dollyTo(Mn.radius, t), this.zoomTo(i.zoom, t), this.setFocalOffset(i.focalOffset[0], i.focalOffset[1], i.focalOffset[2], t), this._needsUpdate = !0;
3207
+ this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = Xo(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = Xo(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = Xo(i.maxPolarAngle), this.minAzimuthAngle = Xo(i.minAzimuthAngle), this.maxAzimuthAngle = Xo(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t), Sn.setFromVector3(_t.fromArray(i.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(Sn.theta, Sn.phi, t), this.dollyTo(Sn.radius, t), this.zoomTo(i.zoom, t), this.setFocalOffset(i.focalOffset[0], i.focalOffset[1], i.focalOffset[2], t), this._needsUpdate = !0;
3208
3208
  }
3209
3209
  /**
3210
3210
  * Attach all internal event handlers to enable drag control.
@@ -3365,7 +3365,7 @@ class Vs extends yw {
3365
3365
  * Copyright 2010-2025 Three.js Authors
3366
3366
  * SPDX-License-Identifier: MIT
3367
3367
  */
3368
- const Do = "181", Sw = 0, xg = 1, Mw = 2, gx = 1, Aw = 2, ds = 3, wn = 0, Ki = 1, pi = 2, $t = 0, ho = 1, Hl = 2, bg = 3, yg = 4, Zh = 5, Qn = 100, Tw = 101, Ew = 102, Pw = 103, Cw = 104, Yl = 200, Iw = 201, Rw = 202, Dw = 203, mf = 204, gf = 205, Rp = 206, Lw = 207, Dp = 208, Ow = 209, Nw = 210, Bw = 211, Uw = 212, Fw = 213, zw = 214, vf = 0, xf = 1, bf = 2, la = 3, yf = 4, _f = 5, wf = 6, Sf = 7, ud = 0, kw = 1, Vw = 2, yr = 0, vx = 1, xx = 2, bx = 3, yx = 4, _x = 5, wx = 6, Sx = 7, _g = "attached", Xw = "detached", Lp = 300, ca = 301, ha = 302, $h = 303, Kh = 304, ac = 306, Jn = 1e3, Zn = 1001, Gl = 1002, Dt = 1003, Op = 1004, io = 1005, jt = 1006, El = 1007, gs = 1008, ys = 1009, Mx = 1010, Ax = 1011, _r = 1012, Np = 1013, $n = 1014, $i = 1015, Ht = 1016, Bp = 1017, Up = 1018, wr = 1020, Tx = 35902, Ex = 35899, Px = 1021, Cx = 1022, Kt = 1023, da = 1026, Sr = 1027, oc = 1028, fd = 1029, Fp = 1030, zp = 1031, kp = 1033, zh = 33776, kh = 33777, Vh = 33778, Xh = 33779, Mf = 35840, Af = 35841, Tf = 35842, Ef = 35843, Pf = 36196, Cf = 37492, If = 37496, Rf = 37808, Df = 37809, Lf = 37810, Of = 37811, Nf = 37812, Bf = 37813, Uf = 37814, Ff = 37815, zf = 37816, kf = 37817, Vf = 37818, Xf = 37819, Hf = 37820, Yf = 37821, Gf = 36492, Wf = 36494, Qf = 36495, jf = 36283, qf = 36284, Zf = 36285, $f = 36286, Hw = 2200, Yw = 2201, Gw = 2202, Wl = 2300, Ql = 2301, $d = 2302, no = 2400, so = 2401, Jh = 2402, Vp = 2500, Ww = 2501, Qw = 0, Ix = 1, Kf = 2, jw = 3200, Rx = 3201, ma = 0, qw = 1, Us = "", Pi = "srgb", Ji = "srgb-linear", ed = "linear", Gt = "srgb", Aa = 7680, wg = 519, Zw = 512, $w = 513, Kw = 514, Dx = 515, Jw = 516, e1 = 517, t1 = 518, i1 = 519, Jf = 35044, ep = "300 es", In = 2e3, jl = 2001;
3368
+ const Do = "181", Sw = 0, xg = 1, Mw = 2, gx = 1, Aw = 2, ds = 3, Un = 0, Ki = 1, fi = 2, $t = 0, ho = 1, Hl = 2, bg = 3, yg = 4, Zh = 5, Qn = 100, Tw = 101, Ew = 102, Pw = 103, Cw = 104, Yl = 200, Iw = 201, Rw = 202, Dw = 203, mf = 204, gf = 205, Rp = 206, Lw = 207, Dp = 208, Ow = 209, Nw = 210, Bw = 211, Uw = 212, Fw = 213, zw = 214, vf = 0, xf = 1, bf = 2, la = 3, yf = 4, _f = 5, wf = 6, Sf = 7, ud = 0, kw = 1, Vw = 2, yr = 0, vx = 1, xx = 2, bx = 3, yx = 4, _x = 5, wx = 6, Sx = 7, _g = "attached", Xw = "detached", Lp = 300, ca = 301, ha = 302, $h = 303, Kh = 304, ac = 306, Jn = 1e3, Zn = 1001, Gl = 1002, Dt = 1003, Op = 1004, io = 1005, jt = 1006, El = 1007, gs = 1008, ys = 1009, Mx = 1010, Ax = 1011, _r = 1012, Np = 1013, $n = 1014, $i = 1015, Ht = 1016, Bp = 1017, Up = 1018, wr = 1020, Tx = 35902, Ex = 35899, Px = 1021, Cx = 1022, Kt = 1023, da = 1026, Sr = 1027, oc = 1028, fd = 1029, Fp = 1030, zp = 1031, kp = 1033, zh = 33776, kh = 33777, Vh = 33778, Xh = 33779, Mf = 35840, Af = 35841, Tf = 35842, Ef = 35843, Pf = 36196, Cf = 37492, If = 37496, Rf = 37808, Df = 37809, Lf = 37810, Of = 37811, Nf = 37812, Bf = 37813, Uf = 37814, Ff = 37815, zf = 37816, kf = 37817, Vf = 37818, Xf = 37819, Hf = 37820, Yf = 37821, Gf = 36492, Wf = 36494, Qf = 36495, jf = 36283, qf = 36284, Zf = 36285, $f = 36286, Hw = 2200, Yw = 2201, Gw = 2202, Wl = 2300, Ql = 2301, $d = 2302, no = 2400, so = 2401, Jh = 2402, Vp = 2500, Ww = 2501, Qw = 0, Ix = 1, Kf = 2, jw = 3200, Rx = 3201, ma = 0, qw = 1, Us = "", Pi = "srgb", Ji = "srgb-linear", ed = "linear", Gt = "srgb", Aa = 7680, wg = 519, Zw = 512, $w = 513, Kw = 514, Dx = 515, Jw = 516, e1 = 517, t1 = 518, i1 = 519, Jf = 35044, ep = "300 es", Cn = 2e3, jl = 2001;
3369
3369
  function Lx(s) {
3370
3370
  for (let e = s.length - 1; e >= 0; --e)
3371
3371
  if (s[e] >= 65535)
@@ -3488,11 +3488,11 @@ let Ws = class {
3488
3488
  const zi = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
3489
3489
  let Mg = 1234567;
3490
3490
  const uo = Math.PI / 180, bo = 180 / Math.PI;
3491
- function Nn() {
3491
+ function On() {
3492
3492
  const s = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0;
3493
3493
  return (zi[s & 255] + zi[s >> 8 & 255] + zi[s >> 16 & 255] + zi[s >> 24 & 255] + "-" + zi[e & 255] + zi[e >> 8 & 255] + "-" + zi[e >> 16 & 15 | 64] + zi[e >> 24 & 255] + "-" + zi[t & 63 | 128] + zi[t >> 8 & 255] + "-" + zi[t >> 16 & 255] + zi[t >> 24 & 255] + zi[i & 255] + zi[i >> 8 & 255] + zi[i >> 16 & 255] + zi[i >> 24 & 255]).toLowerCase();
3494
3494
  }
3495
- function ut(s, e, t) {
3495
+ function ft(s, e, t) {
3496
3496
  return Math.max(e, Math.min(t, s));
3497
3497
  }
3498
3498
  function Xp(s, e) {
@@ -3624,7 +3624,7 @@ const pd = {
3624
3624
  * @method
3625
3625
  * @return {string} The UUID.
3626
3626
  */
3627
- generateUUID: Nn,
3627
+ generateUUID: On,
3628
3628
  /**
3629
3629
  * Clamps the given value between min and max.
3630
3630
  *
@@ -3635,7 +3635,7 @@ const pd = {
3635
3635
  * @param {number} max - The max value.
3636
3636
  * @return {number} The clamped value.
3637
3637
  */
3638
- clamp: ut,
3638
+ clamp: ft,
3639
3639
  /**
3640
3640
  * Computes the Euclidean modulo of the given parameters that
3641
3641
  * is `( ( n % m ) + m ) % m`.
@@ -4123,7 +4123,7 @@ class K {
4123
4123
  * @return {Vector2} A reference to this vector.
4124
4124
  */
4125
4125
  clamp(e, t) {
4126
- return this.x = ut(this.x, e.x, t.x), this.y = ut(this.y, e.y, t.y), this;
4126
+ return this.x = ft(this.x, e.x, t.x), this.y = ft(this.y, e.y, t.y), this;
4127
4127
  }
4128
4128
  /**
4129
4129
  * If this vector's x or y values are greater than the max value, they are
@@ -4136,7 +4136,7 @@ class K {
4136
4136
  * @return {Vector2} A reference to this vector.
4137
4137
  */
4138
4138
  clampScalar(e, t) {
4139
- return this.x = ut(this.x, e, t), this.y = ut(this.y, e, t), this;
4139
+ return this.x = ft(this.x, e, t), this.y = ft(this.y, e, t), this;
4140
4140
  }
4141
4141
  /**
4142
4142
  * If this vector's length is greater than the max value, it is replaced by
@@ -4150,7 +4150,7 @@ class K {
4150
4150
  */
4151
4151
  clampLength(e, t) {
4152
4152
  const i = this.length();
4153
- return this.divideScalar(i || 1).multiplyScalar(ut(i, e, t));
4153
+ return this.divideScalar(i || 1).multiplyScalar(ft(i, e, t));
4154
4154
  }
4155
4155
  /**
4156
4156
  * The components of this vector are rounded down to the nearest integer value.
@@ -4265,7 +4265,7 @@ class K {
4265
4265
  if (t === 0)
4266
4266
  return Math.PI / 2;
4267
4267
  const i = this.dot(e) / t;
4268
- return Math.acos(ut(i, -1, 1));
4268
+ return Math.acos(ft(i, -1, 1));
4269
4269
  }
4270
4270
  /**
4271
4271
  * Computes the distance from the given vector to this instance.
@@ -4628,7 +4628,7 @@ class ui {
4628
4628
  * @return {number} The angle in radians.
4629
4629
  */
4630
4630
  angleTo(e) {
4631
- return 2 * Math.acos(Math.abs(ut(this.dot(e), -1, 1)));
4631
+ return 2 * Math.acos(Math.abs(ft(this.dot(e), -1, 1)));
4632
4632
  }
4633
4633
  /**
4634
4634
  * Rotates this quaternion by a given angular step to the given quaternion.
@@ -5197,7 +5197,7 @@ class P {
5197
5197
  * @return {Vector3} A reference to this vector.
5198
5198
  */
5199
5199
  clamp(e, t) {
5200
- return this.x = ut(this.x, e.x, t.x), this.y = ut(this.y, e.y, t.y), this.z = ut(this.z, e.z, t.z), this;
5200
+ return this.x = ft(this.x, e.x, t.x), this.y = ft(this.y, e.y, t.y), this.z = ft(this.z, e.z, t.z), this;
5201
5201
  }
5202
5202
  /**
5203
5203
  * If this vector's x, y or z values are greater than the max value, they are
@@ -5210,7 +5210,7 @@ class P {
5210
5210
  * @return {Vector3} A reference to this vector.
5211
5211
  */
5212
5212
  clampScalar(e, t) {
5213
- return this.x = ut(this.x, e, t), this.y = ut(this.y, e, t), this.z = ut(this.z, e, t), this;
5213
+ return this.x = ft(this.x, e, t), this.y = ft(this.y, e, t), this.z = ft(this.z, e, t), this;
5214
5214
  }
5215
5215
  /**
5216
5216
  * If this vector's length is greater than the max value, it is replaced by
@@ -5224,7 +5224,7 @@ class P {
5224
5224
  */
5225
5225
  clampLength(e, t) {
5226
5226
  const i = this.length();
5227
- return this.divideScalar(i || 1).multiplyScalar(ut(i, e, t));
5227
+ return this.divideScalar(i || 1).multiplyScalar(ft(i, e, t));
5228
5228
  }
5229
5229
  /**
5230
5230
  * The components of this vector are rounded down to the nearest integer value.
@@ -5411,7 +5411,7 @@ class P {
5411
5411
  if (t === 0)
5412
5412
  return Math.PI / 2;
5413
5413
  const i = this.dot(e) / t;
5414
- return Math.acos(ut(i, -1, 1));
5414
+ return Math.acos(ft(i, -1, 1));
5415
5415
  }
5416
5416
  /**
5417
5417
  * Computes the distance from the given vector to this instance.
@@ -6155,7 +6155,7 @@ class Kr {
6155
6155
  * @param {any} [data=null] - The data definition of a texture.
6156
6156
  */
6157
6157
  constructor(e = null) {
6158
- this.isSource = !0, Object.defineProperty(this, "id", { value: M1++ }), this.uuid = Nn(), this.data = e, this.dataReady = !0, this.version = 0;
6158
+ this.isSource = !0, Object.defineProperty(this, "id", { value: M1++ }), this.uuid = On(), this.data = e, this.dataReady = !0, this.version = 0;
6159
6159
  }
6160
6160
  /**
6161
6161
  * Returns the dimensions of the source into the given target vector.
@@ -6233,7 +6233,7 @@ class ci extends Ws {
6233
6233
  * @param {string} [colorSpace=NoColorSpace] - The color space.
6234
6234
  */
6235
6235
  constructor(e = ci.DEFAULT_IMAGE, t = ci.DEFAULT_MAPPING, i = Zn, n = Zn, r = jt, a = gs, o = Kt, l = ys, c = ci.DEFAULT_ANISOTROPY, h = Us) {
6236
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: A1++ }), this.uuid = Nn(), this.name = "", this.source = new Kr(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new K(0, 0), this.repeat = new K(1, 1), this.center = new K(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new yt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
6236
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: A1++ }), this.uuid = On(), this.name = "", this.source = new Kr(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new K(0, 0), this.repeat = new K(1, 1), this.center = new K(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new yt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
6237
6237
  }
6238
6238
  /**
6239
6239
  * The width of the texture in pixels.
@@ -6434,7 +6434,7 @@ class ci extends Ws {
6434
6434
  ci.DEFAULT_IMAGE = null;
6435
6435
  ci.DEFAULT_MAPPING = Lp;
6436
6436
  ci.DEFAULT_ANISOTROPY = 1;
6437
- class Mt {
6437
+ class At {
6438
6438
  /**
6439
6439
  * Constructs a new 4D vector.
6440
6440
  *
@@ -6444,7 +6444,7 @@ class Mt {
6444
6444
  * @param {number} [w=1] - The w value of this vector.
6445
6445
  */
6446
6446
  constructor(e = 0, t = 0, i = 0, n = 1) {
6447
- Mt.prototype.isVector4 = !0, this.x = e, this.y = t, this.z = i, this.w = n;
6447
+ At.prototype.isVector4 = !0, this.x = e, this.y = t, this.z = i, this.w = n;
6448
6448
  }
6449
6449
  /**
6450
6450
  * Alias for {@link Vector4#z}.
@@ -6776,7 +6776,7 @@ class Mt {
6776
6776
  * @return {Vector4} A reference to this vector.
6777
6777
  */
6778
6778
  clamp(e, t) {
6779
- return this.x = ut(this.x, e.x, t.x), this.y = ut(this.y, e.y, t.y), this.z = ut(this.z, e.z, t.z), this.w = ut(this.w, e.w, t.w), this;
6779
+ return this.x = ft(this.x, e.x, t.x), this.y = ft(this.y, e.y, t.y), this.z = ft(this.z, e.z, t.z), this.w = ft(this.w, e.w, t.w), this;
6780
6780
  }
6781
6781
  /**
6782
6782
  * If this vector's x, y, z or w values are greater than the max value, they are
@@ -6789,7 +6789,7 @@ class Mt {
6789
6789
  * @return {Vector4} A reference to this vector.
6790
6790
  */
6791
6791
  clampScalar(e, t) {
6792
- return this.x = ut(this.x, e, t), this.y = ut(this.y, e, t), this.z = ut(this.z, e, t), this.w = ut(this.w, e, t), this;
6792
+ return this.x = ft(this.x, e, t), this.y = ft(this.y, e, t), this.z = ft(this.z, e, t), this.w = ft(this.w, e, t), this;
6793
6793
  }
6794
6794
  /**
6795
6795
  * If this vector's length is greater than the max value, it is replaced by
@@ -6803,7 +6803,7 @@ class Mt {
6803
6803
  */
6804
6804
  clampLength(e, t) {
6805
6805
  const i = this.length();
6806
- return this.divideScalar(i || 1).multiplyScalar(ut(i, e, t));
6806
+ return this.divideScalar(i || 1).multiplyScalar(ft(i, e, t));
6807
6807
  }
6808
6808
  /**
6809
6809
  * The components of this vector are rounded down to the nearest integer value.
@@ -7025,7 +7025,7 @@ class T1 extends Ws {
7025
7025
  count: 1,
7026
7026
  depth: 1,
7027
7027
  multiview: !1
7028
- }, i), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = i.depth, this.scissor = new Mt(0, 0, e, t), this.scissorTest = !1, this.viewport = new Mt(0, 0, e, t);
7028
+ }, i), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = i.depth, this.scissor = new At(0, 0, e, t), this.scissorTest = !1, this.viewport = new At(0, 0, e, t);
7029
7029
  const n = { width: e, height: t, depth: i.depth }, r = new ci(n);
7030
7030
  this.textures = [];
7031
7031
  const a = i.count;
@@ -7176,7 +7176,7 @@ class E1 extends ci {
7176
7176
  super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: i, depth: n }, this.magFilter = Dt, this.minFilter = Dt, this.wrapR = Zn, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
7177
7177
  }
7178
7178
  }
7179
- class ft {
7179
+ class ut {
7180
7180
  /**
7181
7181
  * Constructs a new bounding box.
7182
7182
  *
@@ -7585,7 +7585,7 @@ const As = [
7585
7585
  /* @__PURE__ */ new P(),
7586
7586
  /* @__PURE__ */ new P(),
7587
7587
  /* @__PURE__ */ new P()
7588
- ], Vn = /* @__PURE__ */ new P(), _c = /* @__PURE__ */ new ft(), Ea = /* @__PURE__ */ new P(), Pa = /* @__PURE__ */ new P(), Ca = /* @__PURE__ */ new P(), qs = /* @__PURE__ */ new P(), Zs = /* @__PURE__ */ new P(), Dr = /* @__PURE__ */ new P(), Go = /* @__PURE__ */ new P(), wc = /* @__PURE__ */ new P(), Sc = /* @__PURE__ */ new P(), Lr = /* @__PURE__ */ new P();
7588
+ ], Vn = /* @__PURE__ */ new P(), _c = /* @__PURE__ */ new ut(), Ea = /* @__PURE__ */ new P(), Pa = /* @__PURE__ */ new P(), Ca = /* @__PURE__ */ new P(), qs = /* @__PURE__ */ new P(), Zs = /* @__PURE__ */ new P(), Dr = /* @__PURE__ */ new P(), Go = /* @__PURE__ */ new P(), wc = /* @__PURE__ */ new P(), Sc = /* @__PURE__ */ new P(), Lr = /* @__PURE__ */ new P();
7589
7589
  function iu(s, e, t, i, n) {
7590
7590
  for (let r = 0, a = s.length - 3; r <= a; r += 3) {
7591
7591
  Lr.fromArray(s, r);
@@ -7595,7 +7595,7 @@ function iu(s, e, t, i, n) {
7595
7595
  }
7596
7596
  return !0;
7597
7597
  }
7598
- const P1 = /* @__PURE__ */ new ft(), Wo = /* @__PURE__ */ new P(), nu = /* @__PURE__ */ new P();
7598
+ const P1 = /* @__PURE__ */ new ut(), Wo = /* @__PURE__ */ new P(), nu = /* @__PURE__ */ new P();
7599
7599
  class ni {
7600
7600
  /**
7601
7601
  * Constructs a new sphere.
@@ -8709,12 +8709,12 @@ class Ce {
8709
8709
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
8710
8710
  * @return {Matrix4} A reference to this matrix.
8711
8711
  */
8712
- makePerspective(e, t, i, n, r, a, o = In, l = !1) {
8712
+ makePerspective(e, t, i, n, r, a, o = Cn, l = !1) {
8713
8713
  const c = this.elements, h = 2 * r / (t - e), d = 2 * r / (i - n), u = (t + e) / (t - e), f = (i + n) / (i - n);
8714
8714
  let p, v;
8715
8715
  if (l)
8716
8716
  p = r / (a - r), v = a * r / (a - r);
8717
- else if (o === In)
8717
+ else if (o === Cn)
8718
8718
  p = -(a + r) / (a - r), v = -2 * a * r / (a - r);
8719
8719
  else if (o === jl)
8720
8720
  p = -a / (a - r), v = -a * r / (a - r);
@@ -8736,12 +8736,12 @@ class Ce {
8736
8736
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
8737
8737
  * @return {Matrix4} A reference to this matrix.
8738
8738
  */
8739
- makeOrthographic(e, t, i, n, r, a, o = In, l = !1) {
8739
+ makeOrthographic(e, t, i, n, r, a, o = Cn, l = !1) {
8740
8740
  const c = this.elements, h = 2 / (t - e), d = 2 / (i - n), u = -(t + e) / (t - e), f = -(i + n) / (i - n);
8741
8741
  let p, v;
8742
8742
  if (l)
8743
8743
  p = 1 / (a - r), v = a / (a - r);
8744
- else if (o === In)
8744
+ else if (o === Cn)
8745
8745
  p = -2 / (a - r), v = -(a + r) / (a - r);
8746
8746
  else if (o === jl)
8747
8747
  p = -1 / (a - r), v = -r / (a - r);
@@ -8889,22 +8889,22 @@ class hn {
8889
8889
  const n = e.elements, r = n[0], a = n[4], o = n[8], l = n[1], c = n[5], h = n[9], d = n[2], u = n[6], f = n[10];
8890
8890
  switch (t) {
8891
8891
  case "XYZ":
8892
- this._y = Math.asin(ut(o, -1, 1)), Math.abs(o) < 0.9999999 ? (this._x = Math.atan2(-h, f), this._z = Math.atan2(-a, r)) : (this._x = Math.atan2(u, c), this._z = 0);
8892
+ this._y = Math.asin(ft(o, -1, 1)), Math.abs(o) < 0.9999999 ? (this._x = Math.atan2(-h, f), this._z = Math.atan2(-a, r)) : (this._x = Math.atan2(u, c), this._z = 0);
8893
8893
  break;
8894
8894
  case "YXZ":
8895
- this._x = Math.asin(-ut(h, -1, 1)), Math.abs(h) < 0.9999999 ? (this._y = Math.atan2(o, f), this._z = Math.atan2(l, c)) : (this._y = Math.atan2(-d, r), this._z = 0);
8895
+ this._x = Math.asin(-ft(h, -1, 1)), Math.abs(h) < 0.9999999 ? (this._y = Math.atan2(o, f), this._z = Math.atan2(l, c)) : (this._y = Math.atan2(-d, r), this._z = 0);
8896
8896
  break;
8897
8897
  case "ZXY":
8898
- this._x = Math.asin(ut(u, -1, 1)), Math.abs(u) < 0.9999999 ? (this._y = Math.atan2(-d, f), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(l, r));
8898
+ this._x = Math.asin(ft(u, -1, 1)), Math.abs(u) < 0.9999999 ? (this._y = Math.atan2(-d, f), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(l, r));
8899
8899
  break;
8900
8900
  case "ZYX":
8901
- this._y = Math.asin(-ut(d, -1, 1)), Math.abs(d) < 0.9999999 ? (this._x = Math.atan2(u, f), this._z = Math.atan2(l, r)) : (this._x = 0, this._z = Math.atan2(-a, c));
8901
+ this._y = Math.asin(-ft(d, -1, 1)), Math.abs(d) < 0.9999999 ? (this._x = Math.atan2(u, f), this._z = Math.atan2(l, r)) : (this._x = 0, this._z = Math.atan2(-a, c));
8902
8902
  break;
8903
8903
  case "YZX":
8904
- this._z = Math.asin(ut(l, -1, 1)), Math.abs(l) < 0.9999999 ? (this._x = Math.atan2(-h, c), this._y = Math.atan2(-d, r)) : (this._x = 0, this._y = Math.atan2(o, f));
8904
+ this._z = Math.asin(ft(l, -1, 1)), Math.abs(l) < 0.9999999 ? (this._x = Math.atan2(-h, c), this._y = Math.atan2(-d, r)) : (this._x = 0, this._y = Math.atan2(o, f));
8905
8905
  break;
8906
8906
  case "XZY":
8907
- this._z = Math.asin(-ut(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(u, c), this._y = Math.atan2(o, r)) : (this._x = Math.atan2(-h, f), this._y = 0);
8907
+ this._z = Math.asin(-ft(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(u, c), this._y = Math.atan2(o, r)) : (this._x = Math.atan2(-h, f), this._y = 0);
8908
8908
  break;
8909
8909
  default:
8910
8910
  Je("Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
@@ -9065,7 +9065,7 @@ class Lt extends Ws {
9065
9065
  * Constructs a new 3D object.
9066
9066
  */
9067
9067
  constructor() {
9068
- super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid = Nn(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Lt.DEFAULT_UP.clone();
9068
+ super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid = On(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Lt.DEFAULT_UP.clone();
9069
9069
  const e = new P(), t = new hn(), i = new ui(), n = new P(1, 1, 1);
9070
9070
  function r() {
9071
9071
  i.setFromEuler(t, !1);
@@ -9719,7 +9719,7 @@ class Lt extends Ws {
9719
9719
  Lt.DEFAULT_UP = /* @__PURE__ */ new P(0, 1, 0);
9720
9720
  Lt.DEFAULT_MATRIX_AUTO_UPDATE = !0;
9721
9721
  Lt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
9722
- const Hn = /* @__PURE__ */ new P(), Ps = /* @__PURE__ */ new P(), lu = /* @__PURE__ */ new P(), Cs = /* @__PURE__ */ new P(), La = /* @__PURE__ */ new P(), Oa = /* @__PURE__ */ new P(), Ng = /* @__PURE__ */ new P(), cu = /* @__PURE__ */ new P(), hu = /* @__PURE__ */ new P(), du = /* @__PURE__ */ new P(), uu = /* @__PURE__ */ new Mt(), fu = /* @__PURE__ */ new Mt(), pu = /* @__PURE__ */ new Mt();
9722
+ const Hn = /* @__PURE__ */ new P(), Ps = /* @__PURE__ */ new P(), lu = /* @__PURE__ */ new P(), Cs = /* @__PURE__ */ new P(), La = /* @__PURE__ */ new P(), Oa = /* @__PURE__ */ new P(), Ng = /* @__PURE__ */ new P(), cu = /* @__PURE__ */ new P(), hu = /* @__PURE__ */ new P(), du = /* @__PURE__ */ new P(), uu = /* @__PURE__ */ new At(), fu = /* @__PURE__ */ new At(), pu = /* @__PURE__ */ new At();
9723
9723
  let vn = class to {
9724
9724
  /**
9725
9725
  * Constructs a new triangle.
@@ -10232,7 +10232,7 @@ class Ie {
10232
10232
  * @return {Color} A reference to this color.
10233
10233
  */
10234
10234
  setHSL(e, t, i, n = It.workingColorSpace) {
10235
- if (e = Xp(e, 1), t = ut(t, 0, 1), i = ut(i, 0, 1), t === 0)
10235
+ if (e = Xp(e, 1), t = ft(t, 0, 1), i = ft(i, 0, 1), t === 0)
10236
10236
  this.r = this.g = this.b = i;
10237
10237
  else {
10238
10238
  const r = i <= 0.5 ? i * (1 + t) : i + t - i * t, a = 2 * i - r;
@@ -10382,7 +10382,7 @@ class Ie {
10382
10382
  * @return {number} The hexadecimal value.
10383
10383
  */
10384
10384
  getHex(e = Pi) {
10385
- return It.workingToColorSpace(ki.copy(this), e), Math.round(ut(ki.r * 255, 0, 255)) * 65536 + Math.round(ut(ki.g * 255, 0, 255)) * 256 + Math.round(ut(ki.b * 255, 0, 255));
10385
+ return It.workingToColorSpace(ki.copy(this), e), Math.round(ft(ki.r * 255, 0, 255)) * 65536 + Math.round(ft(ki.g * 255, 0, 255)) * 256 + Math.round(ft(ki.b * 255, 0, 255));
10386
10386
  }
10387
10387
  /**
10388
10388
  * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').
@@ -10635,7 +10635,7 @@ class Li extends Ws {
10635
10635
  * Constructs a new material.
10636
10636
  */
10637
10637
  constructor() {
10638
- super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: N1++ }), this.uuid = Nn(), this.name = "", this.type = "Material", this.blending = ho, this.side = wn, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = mf, this.blendDst = gf, this.blendEquation = Qn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ie(0, 0, 0), this.blendAlpha = 0, this.depthFunc = la, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = wg, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Aa, this.stencilZFail = Aa, this.stencilZPass = Aa, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
10638
+ super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: N1++ }), this.uuid = On(), this.name = "", this.type = "Material", this.blending = ho, this.side = Un, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = mf, this.blendDst = gf, this.blendEquation = Qn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ie(0, 0, 0), this.blendAlpha = 0, this.depthFunc = la, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = wg, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Aa, this.stencilZFail = Aa, this.stencilZPass = Aa, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
10639
10639
  }
10640
10640
  /**
10641
10641
  * Sets the alpha value to be used when running an alpha test. The material
@@ -10734,7 +10734,7 @@ class Li extends Ws {
10734
10734
  generator: "Material.toJSON"
10735
10735
  }
10736
10736
  };
10737
- i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== ho && (i.blending = this.blending), this.side !== wn && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== mf && (i.blendSrc = this.blendSrc), this.blendDst !== gf && (i.blendDst = this.blendDst), this.blendEquation !== Qn && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== la && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== wg && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Aa && (i.stencilFail = this.stencilFail), this.stencilZFail !== Aa && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== Aa && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
10737
+ i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== ho && (i.blending = this.blending), this.side !== Un && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== mf && (i.blendSrc = this.blendSrc), this.blendDst !== gf && (i.blendDst = this.blendDst), this.blendEquation !== Qn && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== la && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== wg && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Aa && (i.stencilFail = this.stencilFail), this.stencilZFail !== Aa && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== Aa && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
10738
10738
  function n(r) {
10739
10739
  const a = [];
10740
10740
  for (const o in r) {
@@ -11186,13 +11186,13 @@ class et extends ot {
11186
11186
  }
11187
11187
  }
11188
11188
  let F1 = 0;
11189
- const An = /* @__PURE__ */ new Ce(), gu = /* @__PURE__ */ new Lt(), Na = /* @__PURE__ */ new P(), mn = /* @__PURE__ */ new ft(), jo = /* @__PURE__ */ new ft(), Ai = /* @__PURE__ */ new P();
11189
+ const Mn = /* @__PURE__ */ new Ce(), gu = /* @__PURE__ */ new Lt(), Na = /* @__PURE__ */ new P(), mn = /* @__PURE__ */ new ut(), jo = /* @__PURE__ */ new ut(), Ai = /* @__PURE__ */ new P();
11190
11190
  class dt extends Ws {
11191
11191
  /**
11192
11192
  * Constructs a new geometry.
11193
11193
  */
11194
11194
  constructor() {
11195
- super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: F1++ }), this.uuid = Nn(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
11195
+ super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: F1++ }), this.uuid = On(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
11196
11196
  }
11197
11197
  /**
11198
11198
  * Returns the index of this geometry.
@@ -11321,7 +11321,7 @@ class dt extends Ws {
11321
11321
  * @return {BufferGeometry} A reference to this instance.
11322
11322
  */
11323
11323
  applyQuaternion(e) {
11324
- return An.makeRotationFromQuaternion(e), this.applyMatrix4(An), this;
11324
+ return Mn.makeRotationFromQuaternion(e), this.applyMatrix4(Mn), this;
11325
11325
  }
11326
11326
  /**
11327
11327
  * Rotates the geometry about the X axis. This is typically done as a one time
@@ -11332,7 +11332,7 @@ class dt extends Ws {
11332
11332
  * @return {BufferGeometry} A reference to this instance.
11333
11333
  */
11334
11334
  rotateX(e) {
11335
- return An.makeRotationX(e), this.applyMatrix4(An), this;
11335
+ return Mn.makeRotationX(e), this.applyMatrix4(Mn), this;
11336
11336
  }
11337
11337
  /**
11338
11338
  * Rotates the geometry about the Y axis. This is typically done as a one time
@@ -11343,7 +11343,7 @@ class dt extends Ws {
11343
11343
  * @return {BufferGeometry} A reference to this instance.
11344
11344
  */
11345
11345
  rotateY(e) {
11346
- return An.makeRotationY(e), this.applyMatrix4(An), this;
11346
+ return Mn.makeRotationY(e), this.applyMatrix4(Mn), this;
11347
11347
  }
11348
11348
  /**
11349
11349
  * Rotates the geometry about the Z axis. This is typically done as a one time
@@ -11354,7 +11354,7 @@ class dt extends Ws {
11354
11354
  * @return {BufferGeometry} A reference to this instance.
11355
11355
  */
11356
11356
  rotateZ(e) {
11357
- return An.makeRotationZ(e), this.applyMatrix4(An), this;
11357
+ return Mn.makeRotationZ(e), this.applyMatrix4(Mn), this;
11358
11358
  }
11359
11359
  /**
11360
11360
  * Translates the geometry. This is typically done as a one time
@@ -11367,7 +11367,7 @@ class dt extends Ws {
11367
11367
  * @return {BufferGeometry} A reference to this instance.
11368
11368
  */
11369
11369
  translate(e, t, i) {
11370
- return An.makeTranslation(e, t, i), this.applyMatrix4(An), this;
11370
+ return Mn.makeTranslation(e, t, i), this.applyMatrix4(Mn), this;
11371
11371
  }
11372
11372
  /**
11373
11373
  * Scales the geometry. This is typically done as a one time
@@ -11380,7 +11380,7 @@ class dt extends Ws {
11380
11380
  * @return {BufferGeometry} A reference to this instance.
11381
11381
  */
11382
11382
  scale(e, t, i) {
11383
- return An.makeScale(e, t, i), this.applyMatrix4(An), this;
11383
+ return Mn.makeScale(e, t, i), this.applyMatrix4(Mn), this;
11384
11384
  }
11385
11385
  /**
11386
11386
  * Rotates the geometry to face a point in 3D space. This is typically done as a one time
@@ -11437,7 +11437,7 @@ class dt extends Ws {
11437
11437
  * You may need to recompute the bounding box if the geometry vertices are modified.
11438
11438
  */
11439
11439
  computeBoundingBox() {
11440
- this.boundingBox === null && (this.boundingBox = new ft());
11440
+ this.boundingBox === null && (this.boundingBox = new ut());
11441
11441
  const e = this.attributes.position, t = this.morphAttributes.position;
11442
11442
  if (e && e.isGLBufferAttribute) {
11443
11443
  vt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(
@@ -11818,7 +11818,7 @@ class Q extends Lt {
11818
11818
  }
11819
11819
  function z1(s, e, t, i, n, r, a, o) {
11820
11820
  let l;
11821
- if (e.side === Ki ? l = i.intersectTriangle(a, r, n, !0, o) : l = i.intersectTriangle(n, r, a, e.side === wn, o), l === null)
11821
+ if (e.side === Ki ? l = i.intersectTriangle(a, r, n, !0, o) : l = i.intersectTriangle(n, r, a, e.side === Un, o), l === null)
11822
11822
  return null;
11823
11823
  Nc.copy(o), Nc.applyMatrix4(s.matrixWorld);
11824
11824
  const c = t.ray.origin.distanceTo(Nc);
@@ -12006,7 +12006,7 @@ class Yp extends Lt {
12006
12006
  * Constructs a new camera.
12007
12007
  */
12008
12008
  constructor() {
12009
- super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Ce(), this.projectionMatrix = new Ce(), this.projectionMatrixInverse = new Ce(), this.coordinateSystem = In, this._reversedDepth = !1;
12009
+ super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Ce(), this.projectionMatrix = new Ce(), this.projectionMatrixInverse = new Ce(), this.coordinateSystem = Cn, this._reversedDepth = !1;
12010
12010
  }
12011
12011
  /**
12012
12012
  * The flag that indicates whether the camera uses a reversed depth buffer.
@@ -12240,7 +12240,7 @@ let H1 = class extends Lt {
12240
12240
  const e = this.coordinateSystem, t = this.children.concat(), [i, n, r, a, o, l] = t;
12241
12241
  for (const c of t)
12242
12242
  this.remove(c);
12243
- if (e === In)
12243
+ if (e === Cn)
12244
12244
  i.up.set(0, 1, 0), i.lookAt(1, 0, 0), n.up.set(0, 1, 0), n.lookAt(-1, 0, 0), r.up.set(0, 0, -1), r.lookAt(0, 1, 0), a.up.set(0, 0, 1), a.lookAt(0, -1, 0), o.up.set(0, 1, 0), o.lookAt(0, 0, 1), l.up.set(0, 1, 0), l.lookAt(0, 0, -1);
12245
12245
  else if (e === jl)
12246
12246
  i.up.set(0, -1, 0), i.lookAt(-1, 0, 0), n.up.set(0, -1, 0), n.lookAt(1, 0, 0), r.up.set(0, 0, 1), r.lookAt(0, 1, 0), a.up.set(0, 0, -1), a.lookAt(0, -1, 0), o.up.set(0, -1, 0), o.lookAt(0, 0, 1), l.up.set(0, -1, 0), l.lookAt(0, 0, -1);
@@ -12605,7 +12605,7 @@ class gd {
12605
12605
  * @param {number} stride - The number of typed-array elements per vertex.
12606
12606
  */
12607
12607
  constructor(e, t) {
12608
- this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e !== void 0 ? e.length / t : 0, this.usage = Jf, this.updateRanges = [], this.version = 0, this.uuid = Nn();
12608
+ this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e !== void 0 ? e.length / t : 0, this.usage = Jf, this.updateRanges = [], this.version = 0, this.uuid = On();
12609
12609
  }
12610
12610
  /**
12611
12611
  * A callback function that is executed after the renderer has transferred the attribute array
@@ -12690,7 +12690,7 @@ class gd {
12690
12690
  * @return {InterleavedBuffer} A clone of this instance.
12691
12691
  */
12692
12692
  clone(e) {
12693
- e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = Nn()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
12693
+ e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = On()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
12694
12694
  const t = new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]), i = new this.constructor(t, this.stride);
12695
12695
  return i.setUsage(this.usage), i;
12696
12696
  }
@@ -12712,7 +12712,7 @@ class gd {
12712
12712
  * @return {Object} A JSON object representing the serialized interleaved buffer.
12713
12713
  */
12714
12714
  toJSON(e) {
12715
- return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = Nn()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
12715
+ return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = On()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
12716
12716
  uuid: this.uuid,
12717
12717
  buffer: this.array.buffer._uuid,
12718
12718
  type: this.array.constructor.name,
@@ -13216,7 +13216,7 @@ class kx extends Lt {
13216
13216
  return t;
13217
13217
  }
13218
13218
  }
13219
- const Yg = /* @__PURE__ */ new P(), Gg = /* @__PURE__ */ new Mt(), Wg = /* @__PURE__ */ new Mt(), W1 = /* @__PURE__ */ new P(), Qg = /* @__PURE__ */ new Ce(), Vc = /* @__PURE__ */ new P(), yu = /* @__PURE__ */ new ni(), jg = /* @__PURE__ */ new Ce(), _u = /* @__PURE__ */ new Lo();
13219
+ const Yg = /* @__PURE__ */ new P(), Gg = /* @__PURE__ */ new At(), Wg = /* @__PURE__ */ new At(), W1 = /* @__PURE__ */ new P(), Qg = /* @__PURE__ */ new Ce(), Vc = /* @__PURE__ */ new P(), yu = /* @__PURE__ */ new ni(), jg = /* @__PURE__ */ new Ce(), _u = /* @__PURE__ */ new Lo();
13220
13220
  class Vx extends Q {
13221
13221
  /**
13222
13222
  * Constructs a new skinned mesh.
@@ -13235,7 +13235,7 @@ class Vx extends Q {
13235
13235
  */
13236
13236
  computeBoundingBox() {
13237
13237
  const e = this.geometry;
13238
- this.boundingBox === null && (this.boundingBox = new ft()), this.boundingBox.makeEmpty();
13238
+ this.boundingBox === null && (this.boundingBox = new ut()), this.boundingBox.makeEmpty();
13239
13239
  const t = e.getAttribute("position");
13240
13240
  for (let i = 0; i < t.count; i++)
13241
13241
  this.getVertexPosition(i, Vc), this.boundingBox.expandByPoint(Vc);
@@ -13284,7 +13284,7 @@ class Vx extends Q {
13284
13284
  * in the skinned mesh's geometry.
13285
13285
  */
13286
13286
  normalizeSkinWeights() {
13287
- const e = new Mt(), t = this.geometry.attributes.skinWeight;
13287
+ const e = new At(), t = this.geometry.attributes.skinWeight;
13288
13288
  for (let i = 0, n = t.count; i < n; i++) {
13289
13289
  e.fromBufferAttribute(t, i);
13290
13290
  const r = 1 / e.manhattanLength();
@@ -13324,7 +13324,7 @@ class Qp extends Lt {
13324
13324
  super(), this.isBone = !0, this.type = "Bone";
13325
13325
  }
13326
13326
  }
13327
- class Bn extends ci {
13327
+ class Nn extends ci {
13328
13328
  /**
13329
13329
  * Constructs a new data texture.
13330
13330
  *
@@ -13355,7 +13355,7 @@ class vd {
13355
13355
  * If not provided, these matrices will be computed automatically via {@link Skeleton#calculateInverses}.
13356
13356
  */
13357
13357
  constructor(e = [], t = []) {
13358
- this.uuid = Nn(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.boneTexture = null, this.init();
13358
+ this.uuid = On(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.boneTexture = null, this.init();
13359
13359
  }
13360
13360
  /**
13361
13361
  * Initializes the skeleton. This method gets automatically called by the constructor
@@ -13425,7 +13425,7 @@ class vd {
13425
13425
  e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
13426
13426
  const t = new Float32Array(e * e * 4);
13427
13427
  t.set(this.boneMatrices);
13428
- const i = new Bn(t, e, e, Kt, $i);
13428
+ const i = new Nn(t, e, e, Kt, $i);
13429
13429
  return i.needsUpdate = !0, this.boneMatrices = t, this.boneTexture = i, this;
13430
13430
  }
13431
13431
  /**
@@ -13512,7 +13512,7 @@ class yn extends ot {
13512
13512
  return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
13513
13513
  }
13514
13514
  }
13515
- const Xa = /* @__PURE__ */ new Ce(), Zg = /* @__PURE__ */ new Ce(), Xc = [], $g = /* @__PURE__ */ new ft(), j1 = /* @__PURE__ */ new Ce(), Ko = /* @__PURE__ */ new Q(), Jo = /* @__PURE__ */ new ni();
13515
+ const Xa = /* @__PURE__ */ new Ce(), Zg = /* @__PURE__ */ new Ce(), Xc = [], $g = /* @__PURE__ */ new ut(), j1 = /* @__PURE__ */ new Ce(), Ko = /* @__PURE__ */ new Q(), Jo = /* @__PURE__ */ new ni();
13516
13516
  class Hs extends Q {
13517
13517
  /**
13518
13518
  * Constructs a new instanced mesh.
@@ -13533,7 +13533,7 @@ class Hs extends Q {
13533
13533
  */
13534
13534
  computeBoundingBox() {
13535
13535
  const e = this.geometry, t = this.count;
13536
- this.boundingBox === null && (this.boundingBox = new ft()), e.boundingBox === null && e.computeBoundingBox(), this.boundingBox.makeEmpty();
13536
+ this.boundingBox === null && (this.boundingBox = new ut()), e.boundingBox === null && e.computeBoundingBox(), this.boundingBox.makeEmpty();
13537
13537
  for (let i = 0; i < t; i++)
13538
13538
  this.getMatrixAt(i, Xa), $g.copy(e.boundingBox).applyMatrix4(Xa), this.boundingBox.union($g);
13539
13539
  }
@@ -13622,7 +13622,7 @@ class Hs extends Q {
13622
13622
  */
13623
13623
  setMorphAt(e, t) {
13624
13624
  const i = t.morphTargetInfluences, n = i.length + 1;
13625
- this.morphTexture === null && (this.morphTexture = new Bn(new Float32Array(n * this.count), n, this.count, oc, $i));
13625
+ this.morphTexture === null && (this.morphTexture = new Nn(new Float32Array(n * this.count), n, this.count, oc, $i));
13626
13626
  const r = this.morphTexture.source.data.data;
13627
13627
  let a = 0;
13628
13628
  for (let c = 0; c < i.length; c++)
@@ -13901,11 +13901,11 @@ class Oo {
13901
13901
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
13902
13902
  * @return {Frustum} A reference to this frustum.
13903
13903
  */
13904
- setFromProjectionMatrix(e, t = In, i = !1) {
13904
+ setFromProjectionMatrix(e, t = Cn, i = !1) {
13905
13905
  const n = this.planes, r = e.elements, a = r[0], o = r[1], l = r[2], c = r[3], h = r[4], d = r[5], u = r[6], f = r[7], p = r[8], v = r[9], g = r[10], m = r[11], b = r[12], x = r[13], y = r[14], _ = r[15];
13906
13906
  if (n[0].setComponents(c - a, f - h, m - p, _ - b).normalize(), n[1].setComponents(c + a, f + h, m + p, _ + b).normalize(), n[2].setComponents(c + o, f + d, m + v, _ + x).normalize(), n[3].setComponents(c - o, f - d, m - v, _ - x).normalize(), i)
13907
13907
  n[4].setComponents(l, u, g, y).normalize(), n[5].setComponents(c - l, f - u, m - g, _ - y).normalize();
13908
- else if (n[4].setComponents(c - l, f - u, m - g, _ - y).normalize(), t === In)
13908
+ else if (n[4].setComponents(c - l, f - u, m - g, _ - y).normalize(), t === Cn)
13909
13909
  n[5].setComponents(c + l, f + u, m + g, _ + y).normalize();
13910
13910
  else if (t === jl)
13911
13911
  n[5].setComponents(l, u, g, y).normalize();
@@ -13998,7 +13998,7 @@ class jp {
13998
13998
  *
13999
13999
  */
14000
14000
  constructor() {
14001
- this.coordinateSystem = In;
14001
+ this.coordinateSystem = Cn;
14002
14002
  }
14003
14003
  /**
14004
14004
  * Returns `true` if the 3D object's bounding sphere is intersecting any frustum
@@ -14162,7 +14162,7 @@ class eS {
14162
14162
  this.list.length = 0, this.index = 0;
14163
14163
  }
14164
14164
  }
14165
- const rn = /* @__PURE__ */ new Ce(), tS = /* @__PURE__ */ new Ie(1, 1, 1), Kg = /* @__PURE__ */ new Oo(), iS = /* @__PURE__ */ new jp(), Yc = /* @__PURE__ */ new ft(), Br = /* @__PURE__ */ new ni(), el = /* @__PURE__ */ new P(), Jg = /* @__PURE__ */ new P(), nS = /* @__PURE__ */ new P(), Mu = /* @__PURE__ */ new eS(), Vi = /* @__PURE__ */ new Q(), Gc = [];
14165
+ const rn = /* @__PURE__ */ new Ce(), tS = /* @__PURE__ */ new Ie(1, 1, 1), Kg = /* @__PURE__ */ new Oo(), iS = /* @__PURE__ */ new jp(), Yc = /* @__PURE__ */ new ut(), Br = /* @__PURE__ */ new ni(), el = /* @__PURE__ */ new P(), Jg = /* @__PURE__ */ new P(), nS = /* @__PURE__ */ new P(), Mu = /* @__PURE__ */ new eS(), Vi = /* @__PURE__ */ new Q(), Gc = [];
14166
14166
  function sS(s, e, t = 0) {
14167
14167
  const i = e.itemSize;
14168
14168
  if (s.isInterleavedBufferAttribute || s.array.constructor !== e.array.constructor) {
@@ -14235,19 +14235,19 @@ class Xx extends Q {
14235
14235
  _initMatricesTexture() {
14236
14236
  let e = Math.sqrt(this._maxInstanceCount * 4);
14237
14237
  e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
14238
- const t = new Float32Array(e * e * 4), i = new Bn(t, e, e, Kt, $i);
14238
+ const t = new Float32Array(e * e * 4), i = new Nn(t, e, e, Kt, $i);
14239
14239
  this._matricesTexture = i;
14240
14240
  }
14241
14241
  _initIndirectTexture() {
14242
14242
  let e = Math.sqrt(this._maxInstanceCount);
14243
14243
  e = Math.ceil(e);
14244
- const t = new Uint32Array(e * e), i = new Bn(t, e, e, fd, $n);
14244
+ const t = new Uint32Array(e * e), i = new Nn(t, e, e, fd, $n);
14245
14245
  this._indirectTexture = i;
14246
14246
  }
14247
14247
  _initColorsTexture() {
14248
14248
  let e = Math.sqrt(this._maxInstanceCount);
14249
14249
  e = Math.ceil(e);
14250
- const t = new Float32Array(e * e * 4).fill(1), i = new Bn(t, e, e, Kt, $i);
14250
+ const t = new Float32Array(e * e * 4).fill(1), i = new Nn(t, e, e, Kt, $i);
14251
14251
  i.colorSpace = It.workingColorSpace, this._colorsTexture = i;
14252
14252
  }
14253
14253
  _initializeGeometry(e) {
@@ -14313,7 +14313,7 @@ class Xx extends Q {
14313
14313
  * otherwise they are `null`.
14314
14314
  */
14315
14315
  computeBoundingBox() {
14316
- this.boundingBox === null && (this.boundingBox = new ft());
14316
+ this.boundingBox === null && (this.boundingBox = new ut());
14317
14317
  const e = this.boundingBox, t = this._instanceInfo;
14318
14318
  e.makeEmpty();
14319
14319
  for (let i = 0, n = t.length; i < n; i++) {
@@ -14513,7 +14513,7 @@ class Xx extends Q {
14513
14513
  return null;
14514
14514
  const i = this.geometry, n = this._geometryInfo[e];
14515
14515
  if (n.boundingBox === null) {
14516
- const r = new ft(), a = i.index, o = i.attributes.position;
14516
+ const r = new ut(), a = i.index, o = i.attributes.position;
14517
14517
  for (let l = n.start, c = n.start + n.count; l < c; l++) {
14518
14518
  let h = l;
14519
14519
  a && (h = a.getX(h)), r.expandByPoint(el.fromBufferAttribute(o, h));
@@ -14685,7 +14685,7 @@ class Xx extends Q {
14685
14685
  }
14686
14686
  raycast(e, t) {
14687
14687
  const i = this._instanceInfo, n = this._geometryInfo, r = this.matrixWorld, a = this.geometry;
14688
- Vi.material = this.material, Vi.geometry.index = a.index, Vi.geometry.attributes = a.attributes, Vi.geometry.boundingBox === null && (Vi.geometry.boundingBox = new ft()), Vi.geometry.boundingSphere === null && (Vi.geometry.boundingSphere = new ni());
14688
+ Vi.material = this.material, Vi.geometry.index = a.index, Vi.geometry.attributes = a.attributes, Vi.geometry.boundingBox === null && (Vi.geometry.boundingBox = new ut()), Vi.geometry.boundingSphere === null && (Vi.geometry.boundingSphere = new ni());
14689
14689
  for (let o = 0, l = i.length; o < l; o++) {
14690
14690
  if (!i[o].visible || !i[o].active)
14691
14691
  continue;
@@ -15800,13 +15800,13 @@ class ws {
15800
15800
  for (let f = 1; f <= e; f++) {
15801
15801
  if (r[f] = r[f - 1].clone(), a[f] = a[f - 1].clone(), o.crossVectors(n[f - 1], n[f]), o.length() > Number.EPSILON) {
15802
15802
  o.normalize();
15803
- const p = Math.acos(ut(n[f - 1].dot(n[f]), -1, 1));
15803
+ const p = Math.acos(ft(n[f - 1].dot(n[f]), -1, 1));
15804
15804
  r[f].applyMatrix4(l.makeRotationAxis(o, p));
15805
15805
  }
15806
15806
  a[f].crossVectors(n[f], r[f]);
15807
15807
  }
15808
15808
  if (t === !0) {
15809
- let f = Math.acos(ut(r[0].dot(r[e]), -1, 1));
15809
+ let f = Math.acos(ft(r[0].dot(r[e]), -1, 1));
15810
15810
  f /= e, n[0].dot(o.crossVectors(r[0], r[e])) > 0 && (f = -f);
15811
15811
  for (let p = 1; p <= e; p++)
15812
15812
  r[p].applyMatrix4(l.makeRotationAxis(n[p], f * p)), a[p].crossVectors(n[p], r[p]);
@@ -16641,7 +16641,7 @@ class tm extends o0 {
16641
16641
  * @param {Array<Vector2>} [points] - An array of 2D points defining the shape.
16642
16642
  */
16643
16643
  constructor(e) {
16644
- super(e), this.uuid = Nn(), this.type = "Shape", this.holes = [];
16644
+ super(e), this.uuid = On(), this.type = "Shape", this.holes = [];
16645
16645
  }
16646
16646
  /**
16647
16647
  * Returns an array representing each contour of the holes
@@ -17466,7 +17466,7 @@ class sm extends dt {
17466
17466
  segments: t,
17467
17467
  phiStart: i,
17468
17468
  phiLength: n
17469
- }, t = Math.floor(t), n = ut(n, 0, Math.PI * 2);
17469
+ }, t = Math.floor(t), n = ft(n, 0, Math.PI * 2);
17470
17470
  const r = [], a = [], o = [], l = [], c = [], h = 1 / t, d = new P(), u = new K(), f = new P(), p = new P(), v = new P();
17471
17471
  let g = 0, m = 0;
17472
17472
  for (let b = 0; b <= e.length - 1; b++)
@@ -18164,7 +18164,7 @@ class ts extends on {
18164
18164
  PHYSICAL: ""
18165
18165
  }, this.type = "MeshPhysicalMaterial", this.anisotropyRotation = 0, this.anisotropyMap = null, this.clearcoatMap = null, this.clearcoatRoughness = 0, this.clearcoatRoughnessMap = null, this.clearcoatNormalScale = new K(1, 1), this.clearcoatNormalMap = null, this.ior = 1.5, Object.defineProperty(this, "reflectivity", {
18166
18166
  get: function() {
18167
- return ut(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);
18167
+ return ft(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);
18168
18168
  },
18169
18169
  set: function(t) {
18170
18170
  this.ior = (1 + 0.4 * t) / (1 - 0.4 * t);
@@ -19049,7 +19049,7 @@ class ad {
19049
19049
  * is blended/combined when two or more animations are simultaneously played.
19050
19050
  */
19051
19051
  constructor(e = "", t = -1, i = [], n = Vp) {
19052
- this.name = e, this.tracks = i, this.duration = t, this.blendMode = n, this.uuid = Nn(), this.userData = {}, this.duration < 0 && this.resetDuration();
19052
+ this.name = e, this.tracks = i, this.duration = t, this.blendMode = n, this.uuid = On(), this.userData = {}, this.duration < 0 && this.resetDuration();
19053
19053
  }
19054
19054
  /**
19055
19055
  * Factory method for creating an animation clip from the given JSON.
@@ -19829,7 +19829,7 @@ class um {
19829
19829
  */
19830
19830
  constructor(e) {
19831
19831
  this.camera = e, this.intensity = 1, this.bias = 0, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new K(512, 512), this.mapType = ys, this.map = null, this.mapPass = null, this.matrix = new Ce(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new Oo(), this._frameExtents = new K(1, 1), this._viewportCount = 1, this._viewports = [
19832
- new Mt(0, 0, 1, 1)
19832
+ new At(0, 0, 1, 1)
19833
19833
  ];
19834
19834
  }
19835
19835
  /**
@@ -20012,17 +20012,17 @@ class eM extends um {
20012
20012
  // Z - Positive z direction
20013
20013
  // z - Negative z direction
20014
20014
  // positive X
20015
- new Mt(2, 1, 1, 1),
20015
+ new At(2, 1, 1, 1),
20016
20016
  // negative X
20017
- new Mt(0, 1, 1, 1),
20017
+ new At(0, 1, 1, 1),
20018
20018
  // positive Z
20019
- new Mt(3, 1, 1, 1),
20019
+ new At(3, 1, 1, 1),
20020
20020
  // negative Z
20021
- new Mt(1, 1, 1, 1),
20021
+ new At(1, 1, 1, 1),
20022
20022
  // positive Y
20023
- new Mt(3, 0, 1, 1),
20023
+ new At(3, 0, 1, 1),
20024
20024
  // negative Y
20025
- new Mt(1, 0, 1, 1)
20025
+ new At(1, 0, 1, 1)
20026
20026
  ], this._cubeDirections = [
20027
20027
  new P(1, 0, 0),
20028
20028
  new P(-1, 0, 0),
@@ -20465,7 +20465,7 @@ class fm extends Qs {
20465
20465
  n.uniforms[r].value = new P().fromArray(a.value);
20466
20466
  break;
20467
20467
  case "v4":
20468
- n.uniforms[r].value = new Mt().fromArray(a.value);
20468
+ n.uniforms[r].value = new At().fromArray(a.value);
20469
20469
  break;
20470
20470
  case "m3":
20471
20471
  n.uniforms[r].value = new yt().fromArray(a.value);
@@ -20849,7 +20849,7 @@ class aM extends Qs {
20849
20849
  const f = [];
20850
20850
  for (let p = 0, v = u.length; p < v; p++) {
20851
20851
  const g = u[p], m = o(g);
20852
- m !== null && (m instanceof HTMLImageElement ? f.push(m) : f.push(new Bn(m.data, m.width, m.height)));
20852
+ m !== null && (m instanceof HTMLImageElement ? f.push(m) : f.push(new Nn(m.data, m.width, m.height)));
20853
20853
  }
20854
20854
  n[d.uuid] = new Kr(f);
20855
20855
  } else {
@@ -20882,7 +20882,7 @@ class aM extends Qs {
20882
20882
  const h = [];
20883
20883
  for (let d = 0, u = c.length; d < u; d++) {
20884
20884
  const f = c[d], p = await r(f);
20885
- p !== null && (p instanceof HTMLImageElement ? h.push(p) : h.push(new Bn(p.data, p.width, p.height)));
20885
+ p !== null && (p instanceof HTMLImageElement ? h.push(p) : h.push(new Nn(p.data, p.width, p.height)));
20886
20886
  }
20887
20887
  i[l.uuid] = new Kr(h);
20888
20888
  } else {
@@ -20904,7 +20904,7 @@ class aM extends Qs {
20904
20904
  o.image === void 0 && Je('ObjectLoader: No "image" specified for', o.uuid), t[o.image] === void 0 && Je("ObjectLoader: Undefined image", o.image);
20905
20905
  const l = t[o.image], c = l.data;
20906
20906
  let h;
20907
- Array.isArray(c) ? (h = new Gp(), c.length === 6 && (h.needsUpdate = !0)) : (c && c.data ? h = new Bn() : h = new ci(), c && (h.needsUpdate = !0)), h.source = l, h.uuid = o.uuid, o.name !== void 0 && (h.name = o.name), o.mapping !== void 0 && (h.mapping = i(o.mapping, oM)), o.channel !== void 0 && (h.channel = o.channel), o.offset !== void 0 && h.offset.fromArray(o.offset), o.repeat !== void 0 && h.repeat.fromArray(o.repeat), o.center !== void 0 && h.center.fromArray(o.center), o.rotation !== void 0 && (h.rotation = o.rotation), o.wrap !== void 0 && (h.wrapS = i(o.wrap[0], v0), h.wrapT = i(o.wrap[1], v0)), o.format !== void 0 && (h.format = o.format), o.internalFormat !== void 0 && (h.internalFormat = o.internalFormat), o.type !== void 0 && (h.type = o.type), o.colorSpace !== void 0 && (h.colorSpace = o.colorSpace), o.minFilter !== void 0 && (h.minFilter = i(o.minFilter, x0)), o.magFilter !== void 0 && (h.magFilter = i(o.magFilter, x0)), o.anisotropy !== void 0 && (h.anisotropy = o.anisotropy), o.flipY !== void 0 && (h.flipY = o.flipY), o.generateMipmaps !== void 0 && (h.generateMipmaps = o.generateMipmaps), o.premultiplyAlpha !== void 0 && (h.premultiplyAlpha = o.premultiplyAlpha), o.unpackAlignment !== void 0 && (h.unpackAlignment = o.unpackAlignment), o.compareFunction !== void 0 && (h.compareFunction = o.compareFunction), o.userData !== void 0 && (h.userData = o.userData), n[o.uuid] = h;
20907
+ Array.isArray(c) ? (h = new Gp(), c.length === 6 && (h.needsUpdate = !0)) : (c && c.data ? h = new Nn() : h = new ci(), c && (h.needsUpdate = !0)), h.source = l, h.uuid = o.uuid, o.name !== void 0 && (h.name = o.name), o.mapping !== void 0 && (h.mapping = i(o.mapping, oM)), o.channel !== void 0 && (h.channel = o.channel), o.offset !== void 0 && h.offset.fromArray(o.offset), o.repeat !== void 0 && h.repeat.fromArray(o.repeat), o.center !== void 0 && h.center.fromArray(o.center), o.rotation !== void 0 && (h.rotation = o.rotation), o.wrap !== void 0 && (h.wrapS = i(o.wrap[0], v0), h.wrapT = i(o.wrap[1], v0)), o.format !== void 0 && (h.format = o.format), o.internalFormat !== void 0 && (h.internalFormat = o.internalFormat), o.type !== void 0 && (h.type = o.type), o.colorSpace !== void 0 && (h.colorSpace = o.colorSpace), o.minFilter !== void 0 && (h.minFilter = i(o.minFilter, x0)), o.magFilter !== void 0 && (h.magFilter = i(o.magFilter, x0)), o.anisotropy !== void 0 && (h.anisotropy = o.anisotropy), o.flipY !== void 0 && (h.flipY = o.flipY), o.generateMipmaps !== void 0 && (h.generateMipmaps = o.generateMipmaps), o.premultiplyAlpha !== void 0 && (h.premultiplyAlpha = o.premultiplyAlpha), o.unpackAlignment !== void 0 && (h.unpackAlignment = o.unpackAlignment), o.compareFunction !== void 0 && (h.compareFunction = o.compareFunction), o.userData !== void 0 && (h.userData = o.userData), n[o.uuid] = h;
20908
20908
  }
20909
20909
  return n;
20910
20910
  }
@@ -20975,12 +20975,12 @@ class aM extends Qs {
20975
20975
  case "BatchedMesh":
20976
20976
  h = o(e.geometry), d = l(e.material), a = new Xx(e.maxInstanceCount, e.maxVertexCount, e.maxIndexCount, d), a.geometry = h, a.perObjectFrustumCulled = e.perObjectFrustumCulled, a.sortObjects = e.sortObjects, a._drawRanges = e.drawRanges, a._reservedRanges = e.reservedRanges, a._geometryInfo = e.geometryInfo.map((v) => {
20977
20977
  let g = null, m = null;
20978
- return v.boundingBox !== void 0 && (g = new ft().fromJSON(v.boundingBox)), v.boundingSphere !== void 0 && (m = new ni().fromJSON(v.boundingSphere)), {
20978
+ return v.boundingBox !== void 0 && (g = new ut().fromJSON(v.boundingBox)), v.boundingSphere !== void 0 && (m = new ni().fromJSON(v.boundingSphere)), {
20979
20979
  ...v,
20980
20980
  boundingBox: g,
20981
20981
  boundingSphere: m
20982
20982
  };
20983
- }), a._instanceInfo = e.instanceInfo, a._availableInstanceIds = e._availableInstanceIds, a._availableGeometryIds = e._availableGeometryIds, a._nextIndexStart = e.nextIndexStart, a._nextVertexStart = e.nextVertexStart, a._geometryCount = e.geometryCount, a._maxInstanceCount = e.maxInstanceCount, a._maxVertexCount = e.maxVertexCount, a._maxIndexCount = e.maxIndexCount, a._geometryInitialized = e.geometryInitialized, a._matricesTexture = c(e.matricesTexture.uuid), a._indirectTexture = c(e.indirectTexture.uuid), e.colorsTexture !== void 0 && (a._colorsTexture = c(e.colorsTexture.uuid)), e.boundingSphere !== void 0 && (a.boundingSphere = new ni().fromJSON(e.boundingSphere)), e.boundingBox !== void 0 && (a.boundingBox = new ft().fromJSON(e.boundingBox));
20983
+ }), a._instanceInfo = e.instanceInfo, a._availableInstanceIds = e._availableInstanceIds, a._availableGeometryIds = e._availableGeometryIds, a._nextIndexStart = e.nextIndexStart, a._nextVertexStart = e.nextVertexStart, a._geometryCount = e.geometryCount, a._maxInstanceCount = e.maxInstanceCount, a._maxVertexCount = e.maxVertexCount, a._maxIndexCount = e.maxIndexCount, a._geometryInitialized = e.geometryInitialized, a._matricesTexture = c(e.matricesTexture.uuid), a._indirectTexture = c(e.indirectTexture.uuid), e.colorsTexture !== void 0 && (a._colorsTexture = c(e.colorsTexture.uuid)), e.boundingSphere !== void 0 && (a.boundingSphere = new ni().fromJSON(e.boundingSphere)), e.boundingBox !== void 0 && (a.boundingBox = new ut().fromJSON(e.boundingBox));
20984
20984
  break;
20985
20985
  case "LOD":
20986
20986
  a = new kx();
@@ -22535,7 +22535,7 @@ class db {
22535
22535
  * @return {Spherical} A reference to this spherical.
22536
22536
  */
22537
22537
  makeSafe() {
22538
- return this.phi = ut(this.phi, 1e-6, Math.PI - 1e-6), this;
22538
+ return this.phi = ft(this.phi, 1e-6, Math.PI - 1e-6), this;
22539
22539
  }
22540
22540
  /**
22541
22541
  * Sets the spherical components from the given vector which is assumed to hold
@@ -22556,7 +22556,7 @@ class db {
22556
22556
  * @return {Spherical} A reference to this spherical.
22557
22557
  */
22558
22558
  setFromCartesianCoords(e, t, i) {
22559
- return this.radius = Math.sqrt(e * e + t * t + i * i), this.radius === 0 ? (this.theta = 0, this.phi = 0) : (this.theta = Math.atan2(e, i), this.phi = Math.acos(ut(t / this.radius, -1, 1))), this;
22559
+ return this.radius = Math.sqrt(e * e + t * t + i * i), this.radius === 0 ? (this.theta = 0, this.phi = 0) : (this.theta = Math.atan2(e, i), this.phi = Math.acos(ft(t / this.radius, -1, 1))), this;
22560
22560
  }
22561
22561
  /**
22562
22562
  * Returns a new spherical with copied values from this instance.
@@ -22652,7 +22652,7 @@ class _s {
22652
22652
  _0.subVectors(e, this.start), nh.subVectors(this.end, this.start);
22653
22653
  const i = nh.dot(nh);
22654
22654
  let r = nh.dot(_0) / i;
22655
- return t && (r = ut(r, 0, 1)), r;
22655
+ return t && (r = ft(r, 0, 1)), r;
22656
22656
  }
22657
22657
  /**
22658
22658
  * Returns the closest point on the line for a given point.
@@ -22683,14 +22683,14 @@ class _s {
22683
22683
  if (d <= n && u <= n)
22684
22684
  return t.copy(o), i.copy(l), t.sub(i), t.dot(t);
22685
22685
  if (d <= n)
22686
- r = 0, a = f / u, a = ut(a, 0, 1);
22686
+ r = 0, a = f / u, a = ft(a, 0, 1);
22687
22687
  else {
22688
22688
  const p = Ya.dot(Lu);
22689
22689
  if (u <= n)
22690
- a = 0, r = ut(-p / d, 0, 1);
22690
+ a = 0, r = ft(-p / d, 0, 1);
22691
22691
  else {
22692
22692
  const v = Ya.dot(Ga), g = d * u - v * v;
22693
- g !== 0 ? r = ut((v * f - p * u) / g, 0, 1) : r = 0, a = (v * r + f) / u, a < 0 ? (a = 0, r = ut(-p / d, 0, 1)) : a > 1 && (a = 1, r = ut((v - p) / d, 0, 1));
22693
+ g !== 0 ? r = ft((v * f - p * u) / g, 0, 1) : r = 0, a = (v * r + f) / u, a < 0 ? (a = 0, r = ft(-p / d, 0, 1)) : a > 1 && (a = 1, r = ft((v - p) / d, 0, 1));
22694
22694
  }
22695
22695
  }
22696
22696
  return t.copy(o).add(Ya.multiplyScalar(r)), i.copy(l).add(Ga.multiplyScalar(a)), t.sub(i), t.dot(t);
@@ -22764,13 +22764,13 @@ class AM extends Ii {
22764
22764
  let r, a;
22765
22765
  if (hi.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.camera.reversedDepth === !0)
22766
22766
  r = 1, a = 0;
22767
- else if (this.camera.coordinateSystem === In)
22767
+ else if (this.camera.coordinateSystem === Cn)
22768
22768
  r = -1, a = 1;
22769
22769
  else if (this.camera.coordinateSystem === jl)
22770
22770
  r = 0, a = 1;
22771
22771
  else
22772
22772
  throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: " + this.camera.coordinateSystem);
22773
- fi("c", t, e, hi, 0, 0, r), fi("t", t, e, hi, 0, 0, a), fi("n1", t, e, hi, -i, -n, r), fi("n2", t, e, hi, i, -n, r), fi("n3", t, e, hi, -i, n, r), fi("n4", t, e, hi, i, n, r), fi("f1", t, e, hi, -i, -n, a), fi("f2", t, e, hi, i, -n, a), fi("f3", t, e, hi, -i, n, a), fi("f4", t, e, hi, i, n, a), fi("u1", t, e, hi, i * 0.7, n * 1.1, r), fi("u2", t, e, hi, -i * 0.7, n * 1.1, r), fi("u3", t, e, hi, 0, n * 2, r), fi("cf1", t, e, hi, -i, 0, a), fi("cf2", t, e, hi, i, 0, a), fi("cf3", t, e, hi, 0, -n, a), fi("cf4", t, e, hi, 0, n, a), fi("cn1", t, e, hi, -i, 0, r), fi("cn2", t, e, hi, i, 0, r), fi("cn3", t, e, hi, 0, -n, r), fi("cn4", t, e, hi, 0, n, r), e.getAttribute("position").needsUpdate = !0;
22773
+ pi("c", t, e, hi, 0, 0, r), pi("t", t, e, hi, 0, 0, a), pi("n1", t, e, hi, -i, -n, r), pi("n2", t, e, hi, i, -n, r), pi("n3", t, e, hi, -i, n, r), pi("n4", t, e, hi, i, n, r), pi("f1", t, e, hi, -i, -n, a), pi("f2", t, e, hi, i, -n, a), pi("f3", t, e, hi, -i, n, a), pi("f4", t, e, hi, i, n, a), pi("u1", t, e, hi, i * 0.7, n * 1.1, r), pi("u2", t, e, hi, -i * 0.7, n * 1.1, r), pi("u3", t, e, hi, 0, n * 2, r), pi("cf1", t, e, hi, -i, 0, a), pi("cf2", t, e, hi, i, 0, a), pi("cf3", t, e, hi, 0, -n, a), pi("cf4", t, e, hi, 0, n, a), pi("cn1", t, e, hi, -i, 0, r), pi("cn2", t, e, hi, i, 0, r), pi("cn3", t, e, hi, 0, -n, r), pi("cn4", t, e, hi, 0, n, r), e.getAttribute("position").needsUpdate = !0;
22774
22774
  }
22775
22775
  /**
22776
22776
  * Frees the GPU-related resources allocated by this instance. Call this
@@ -22780,7 +22780,7 @@ class AM extends Ii {
22780
22780
  this.geometry.dispose(), this.material.dispose();
22781
22781
  }
22782
22782
  }
22783
- function fi(s, e, t, i, n, r, a) {
22783
+ function pi(s, e, t, i, n, r, a) {
22784
22784
  sh.set(n, r, a).unproject(i);
22785
22785
  const o = e[s];
22786
22786
  if (o !== void 0) {
@@ -22789,7 +22789,7 @@ function fi(s, e, t, i, n, r, a) {
22789
22789
  l.setXYZ(o[c], sh.x, sh.y, sh.z);
22790
22790
  }
22791
22791
  }
22792
- const rh = /* @__PURE__ */ new ft();
22792
+ const rh = /* @__PURE__ */ new ut();
22793
22793
  class TM extends Ii {
22794
22794
  /**
22795
22795
  * Constructs a new box helper.
@@ -27366,7 +27366,7 @@ function uE(s, e, t, i, n, r, a) {
27366
27366
  uniforms: yo(an.background.uniforms),
27367
27367
  vertexShader: an.background.vertexShader,
27368
27368
  fragmentShader: an.background.fragmentShader,
27369
- side: wn,
27369
+ side: Un,
27370
27370
  depthTest: !1,
27371
27371
  depthWrite: !1,
27372
27372
  fog: !1,
@@ -28635,7 +28635,7 @@ function EE(s) {
28635
28635
  };
28636
28636
  }
28637
28637
  function PE(s, e, t) {
28638
- const i = /* @__PURE__ */ new WeakMap(), n = new Mt();
28638
+ const i = /* @__PURE__ */ new WeakMap(), n = new At();
28639
28639
  function r(a, o, l) {
28640
28640
  const c = a.morphTargetInfluences, h = o.morphAttributes.position || o.morphAttributes.normal || o.morphAttributes.color, d = h !== void 0 ? h.length : 0;
28641
28641
  let u = i.get(o);
@@ -29905,7 +29905,7 @@ function Y2(s, e, t, i, n, r, a) {
29905
29905
  decodeVideoTexture: ht && S.map.isVideoTexture === !0 && It.getTransfer(S.map.colorSpace) === Gt,
29906
29906
  decodeVideoTextureEmissive: ve && S.emissiveMap.isVideoTexture === !0 && It.getTransfer(S.emissiveMap.colorSpace) === Gt,
29907
29907
  premultipliedAlpha: S.premultipliedAlpha,
29908
- doubleSided: S.side === pi,
29908
+ doubleSided: S.side === fi,
29909
29909
  flipSided: S.side === Ki,
29910
29910
  useDepthPacking: S.depthPacking >= 0,
29911
29911
  depthPacking: S.depthPacking || 0,
@@ -30368,7 +30368,7 @@ void main() {
30368
30368
  }`;
30369
30369
  function iP(s, e, t) {
30370
30370
  let i = new Oo();
30371
- const n = new K(), r = new K(), a = new Mt(), o = new dm({ depthPacking: Rx }), l = new tb(), c = {}, h = t.maxTextureSize, d = { [wn]: Ki, [Ki]: wn, [pi]: pi }, u = new mt({
30371
+ const n = new K(), r = new K(), a = new At(), o = new dm({ depthPacking: Rx }), l = new tb(), c = {}, h = t.maxTextureSize, d = { [Un]: Ki, [Ki]: Un, [fi]: fi }, u = new mt({
30372
30372
  defines: {
30373
30373
  VSM_SAMPLES: 8
30374
30374
  },
@@ -30494,9 +30494,9 @@ const nP = {
30494
30494
  function sP(s, e) {
30495
30495
  function t() {
30496
30496
  let V = !1;
30497
- const be = new Mt();
30497
+ const be = new At();
30498
30498
  let Re = null;
30499
- const Le = new Mt(0, 0, 0, 0);
30499
+ const Le = new At(0, 0, 0, 0);
30500
30500
  return {
30501
30501
  setMask: function(_e) {
30502
30502
  Re !== _e && !V && (s.colorMask(_e, _e, _e, _e), Re = _e);
@@ -30609,7 +30609,7 @@ function sP(s, e) {
30609
30609
  const Z = s.getParameter(s.VERSION);
30610
30610
  Z.indexOf("WebGL") !== -1 ? (re = parseFloat(/^WebGL (\d)/.exec(Z)[1]), j = re >= 1) : Z.indexOf("OpenGL ES") !== -1 && (re = parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]), j = re >= 2);
30611
30611
  let ie = null, ue = {};
30612
- const Oe = s.getParameter(s.SCISSOR_BOX), ce = s.getParameter(s.VIEWPORT), Se = new Mt().fromArray(Oe), ct = new Mt().fromArray(ce);
30612
+ const Oe = s.getParameter(s.SCISSOR_BOX), ce = s.getParameter(s.VIEWPORT), Se = new At().fromArray(Oe), ct = new At().fromArray(ce);
30613
30613
  function Fe(V, be, Re, Le) {
30614
30614
  const _e = new Uint8Array(4), le = s.createTexture();
30615
30615
  s.bindTexture(V, le), s.texParameteri(V, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(V, s.TEXTURE_MAG_FILTER, s.NEAREST);
@@ -30718,7 +30718,7 @@ function sP(s, e) {
30718
30718
  _e = _e || be, le = le || Re, Ze = Ze || Le, (be !== m || _e !== y) && (s.blendEquationSeparate(gt[be], gt[_e]), m = be, y = _e), (Re !== b || Le !== x || le !== _ || Ze !== w) && (s.blendFuncSeparate(it[Re], it[Le], it[le], it[Ze]), b = Re, x = Le, _ = le, w = Ze), (lt.equals(T) === !1 || Ot !== E) && (s.blendColor(lt.r, lt.g, lt.b, Ot), T.copy(lt), E = Ot), g = V, S = !1;
30719
30719
  }
30720
30720
  function B(V, be) {
30721
- V.side === pi ? Te(s.CULL_FACE) : ee(s.CULL_FACE);
30721
+ V.side === fi ? Te(s.CULL_FACE) : ee(s.CULL_FACE);
30722
30722
  let Re = V.side === Ki;
30723
30723
  be && (Re = !Re), he(Re), V.blending === ho && V.transparent === !1 ? de($t) : de(V.blending, V.blendEquation, V.blendSrc, V.blendDst, V.blendEquationAlpha, V.blendSrcAlpha, V.blendDstAlpha, V.blendColor, V.blendAlpha, V.premultipliedAlpha), a.setFunc(V.depthFunc), a.setTest(V.depthTest), a.setMask(V.depthWrite), r.setMask(V.colorWrite);
30724
30724
  const Le = V.stencilWrite;
@@ -31724,9 +31724,9 @@ class hP extends Ws {
31724
31724
  const _ = [], w = [], T = new K();
31725
31725
  let E = null;
31726
31726
  const S = new xi();
31727
- S.viewport = new Mt();
31727
+ S.viewport = new At();
31728
31728
  const M = new xi();
31729
- M.viewport = new Mt();
31729
+ M.viewport = new At();
31730
31730
  const C = [S, M], L = new cM();
31731
31731
  let U = null, z = null;
31732
31732
  this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(ne) {
@@ -31916,7 +31916,7 @@ class hP extends Ws {
31916
31916
  ), e.setRenderTarget(y));
31917
31917
  }
31918
31918
  let he = C[it];
31919
- he === void 0 && (he = new xi(), he.layers.enable(it), he.viewport = new Mt(), C[it] = he), he.matrix.fromArray(de.transform.matrix), he.matrix.decompose(he.position, he.quaternion, he.scale), he.projectionMatrix.fromArray(de.projectionMatrix), he.projectionMatrixInverse.copy(he.projectionMatrix).invert(), he.viewport.set(B.x, B.y, B.width, B.height), it === 0 && (L.matrix.copy(he.matrix), L.matrix.decompose(L.position, L.quaternion, L.scale)), Xe === !0 && L.cameras.push(he);
31919
+ he === void 0 && (he = new xi(), he.layers.enable(it), he.viewport = new At(), C[it] = he), he.matrix.fromArray(de.transform.matrix), he.matrix.decompose(he.position, he.quaternion, he.scale), he.projectionMatrix.fromArray(de.projectionMatrix), he.projectionMatrixInverse.copy(he.projectionMatrix).invert(), he.viewport.set(B.x, B.y, B.width, B.height), it === 0 && (L.matrix.copy(he.matrix), L.matrix.decompose(L.position, L.quaternion, L.scale)), Xe === !0 && L.cameras.push(he);
31920
31920
  }
31921
31921
  const Ge = n.enabledFeatures;
31922
31922
  if (Ge && Ge.includes("depth-sensing") && n.depthUsage == "gpu-optimized" && v) {
@@ -34158,7 +34158,7 @@ const pP = new Uint16Array([
34158
34158
  ]);
34159
34159
  let Rs = null;
34160
34160
  function mP() {
34161
- return Rs === null && (Rs = new Bn(pP, 32, 32, Fp, Ht), Rs.minFilter = jt, Rs.magFilter = jt, Rs.wrapS = Zn, Rs.wrapT = Zn, Rs.generateMipmaps = !1, Rs.needsUpdate = !0), Rs;
34161
+ return Rs === null && (Rs = new Nn(pP, 32, 32, Fp, Ht), Rs.minFilter = jt, Rs.magFilter = jt, Rs.wrapS = Zn, Rs.wrapT = Zn, Rs.generateMipmaps = !1, Rs.needsUpdate = !0), Rs;
34162
34162
  }
34163
34163
  class vb {
34164
34164
  /**
@@ -34218,15 +34218,15 @@ class vb {
34218
34218
  let T = !1;
34219
34219
  this._outputColorSpace = Pi;
34220
34220
  let E = 0, S = 0, M = null, C = -1, L = null;
34221
- const U = new Mt(), z = new Mt();
34221
+ const U = new At(), z = new At();
34222
34222
  let X = null;
34223
34223
  const j = new Ie(0);
34224
34224
  let re = 0, Z = t.width, ie = t.height, ue = 1, Oe = null, ce = null;
34225
- const Se = new Mt(0, 0, Z, ie), ct = new Mt(0, 0, Z, ie);
34225
+ const Se = new At(0, 0, Z, ie), ct = new At(0, 0, Z, ie);
34226
34226
  let Fe = !1;
34227
34227
  const ne = new Oo();
34228
34228
  let ee = !1, Te = !1;
34229
- const Xe = new Ce(), Ge = new P(), ht = new Mt(), gt = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
34229
+ const Xe = new Ce(), Ge = new P(), ht = new At(), gt = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
34230
34230
  let it = !1;
34231
34231
  function de() {
34232
34232
  return M === null ? ue : 1;
@@ -34404,7 +34404,7 @@ class vb {
34404
34404
  zt.render(at, Nt);
34405
34405
  };
34406
34406
  function mi(D, Y, $) {
34407
- D.transparent === !0 && D.side === pi && D.forceSinglePass === !1 ? (D.side = Ki, D.needsUpdate = !0, F(D, Y, $), D.side = wn, D.needsUpdate = !0, F(D, Y, $), D.side = pi) : F(D, Y, $);
34407
+ D.transparent === !0 && D.side === fi && D.forceSinglePass === !1 ? (D.side = Ki, D.needsUpdate = !0, F(D, Y, $), D.side = Un, D.needsUpdate = !0, F(D, Y, $), D.side = fi) : F(D, Y, $);
34408
34408
  }
34409
34409
  this.compile = function(D, Y, $ = null) {
34410
34410
  $ === null && ($ = D), x = Ke.get($), x.init(Y), _.push(x), $.traverseVisible(function(W) {
@@ -34461,7 +34461,7 @@ class vb {
34461
34461
  }
34462
34462
  if (T === !0)
34463
34463
  return;
34464
- if (D.matrixWorldAutoUpdate === !0 && D.updateMatrixWorld(), Y.parent === null && Y.matrixWorldAutoUpdate === !0 && Y.updateMatrixWorld(), Le.enabled === !0 && Le.isPresenting === !0 && (Le.cameraAutoUpdate === !0 && Le.updateCamera(Y), Y = Le.getCamera()), D.isScene === !0 && D.onBeforeRender(w, D, Y, M), x = Ke.get(D, _.length), x.init(Y), _.push(x), Xe.multiplyMatrices(Y.projectionMatrix, Y.matrixWorldInverse), ne.setFromProjectionMatrix(Xe, In, Y.reversedDepth), Te = this.localClippingEnabled, ee = We.init(this.clippingPlanes, Te), b = Ne.get(D, y.length), b.init(), y.push(b), Le.enabled === !0 && Le.isPresenting === !0) {
34464
+ if (D.matrixWorldAutoUpdate === !0 && D.updateMatrixWorld(), Y.parent === null && Y.matrixWorldAutoUpdate === !0 && Y.updateMatrixWorld(), Le.enabled === !0 && Le.isPresenting === !0 && (Le.cameraAutoUpdate === !0 && Le.updateCamera(Y), Y = Le.getCamera()), D.isScene === !0 && D.onBeforeRender(w, D, Y, M), x = Ke.get(D, _.length), x.init(Y), _.push(x), Xe.multiplyMatrices(Y.projectionMatrix, Y.matrixWorldInverse), ne.setFromProjectionMatrix(Xe, Cn, Y.reversedDepth), Te = this.localClippingEnabled, ee = We.init(this.clippingPlanes, Te), b = Ne.get(D, y.length), b.init(), y.push(b), Le.enabled === !0 && Le.isPresenting === !0) {
34465
34465
  const xe = w.xr.getDepthSensingMesh();
34466
34466
  xe !== null && Ss(xe, Y, -1 / 0, w.sortObjects);
34467
34467
  }
@@ -34545,7 +34545,7 @@ class vb {
34545
34545
  let at = !1;
34546
34546
  for (let wt = 0, Nt = Y.length; wt < Nt; wt++) {
34547
34547
  const Yt = Y[wt], { object: zt, geometry: tt, material: si, group: Bt } = Yt;
34548
- if (si.side === pi && zt.layers.test(G.layers)) {
34548
+ if (si.side === fi && zt.layers.test(G.layers)) {
34549
34549
  const un = si.side;
34550
34550
  si.side = Ki, si.needsUpdate = !0, O(zt, $, G, tt, si, Bt), si.side = un, si.needsUpdate = !0, at = !0;
34551
34551
  }
@@ -34563,7 +34563,7 @@ class vb {
34563
34563
  }
34564
34564
  }
34565
34565
  function O(D, Y, $, G, W, xe) {
34566
- D.onBeforeRender(w, Y, $, G, W, xe), D.modelViewMatrix.multiplyMatrices($.matrixWorldInverse, D.matrixWorld), D.normalMatrix.getNormalMatrix(D.modelViewMatrix), W.onBeforeRender(w, Y, $, G, D, xe), W.transparent === !0 && W.side === pi && W.forceSinglePass === !1 ? (W.side = Ki, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = wn, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = pi) : w.renderBufferDirect($, Y, G, W, D, xe), D.onAfterRender(w, Y, $, G, W, xe);
34566
+ D.onBeforeRender(w, Y, $, G, W, xe), D.modelViewMatrix.multiplyMatrices($.matrixWorldInverse, D.matrixWorld), D.normalMatrix.getNormalMatrix(D.modelViewMatrix), W.onBeforeRender(w, Y, $, G, D, xe), W.transparent === !0 && W.side === fi && W.forceSinglePass === !1 ? (W.side = Ki, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = Un, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = fi) : w.renderBufferDirect($, Y, G, W, D, xe), D.onAfterRender(w, Y, $, G, W, xe);
34567
34567
  }
34568
34568
  function F(D, Y, $) {
34569
34569
  Y.isScene !== !0 && (Y = gt);
@@ -34621,8 +34621,8 @@ class vb {
34621
34621
  Yi && (Yi.boneTexture === null && Yi.computeBoneTexture(), ri.setValue(B, "boneTexture", Yi.boneTexture, ke));
34622
34622
  }
34623
34623
  W.isBatchedMesh && (ri.setOptional(B, W, "batchingTexture"), ri.setValue(B, "batchingTexture", W._matricesTexture, ke), ri.setOptional(B, W, "batchingIdTexture"), ri.setValue(B, "batchingIdTexture", W._indirectTexture, ke), ri.setOptional(B, W, "batchingColorTexture"), W._colorsTexture !== null && ri.setValue(B, "batchingColorTexture", W._colorsTexture, ke));
34624
- const Sn = $.morphAttributes;
34625
- if ((Sn.position !== void 0 || Sn.normal !== void 0 || Sn.color !== void 0) && rt.update(W, $, un), (fn || tt.receiveShadow !== W.receiveShadow) && (tt.receiveShadow = W.receiveShadow, ri.setValue(B, "receiveShadow", W.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (tn.envMap.value = Ue, tn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && Y.environment !== null && (tn.envMapIntensity.value = Y.environmentIntensity), tn.dfgLUT !== void 0 && (tn.dfgLUT.value = mP()), fn && (ri.setValue(B, "toneMappingExposure", w.toneMappingExposure), tt.needsLights && we(tn, Fo), xe && G.fog === !0 && $e.refreshFogUniforms(tn, xe), $e.refreshMaterialUniforms(tn, G, ue, ie, x.state.transmissionRenderTarget[D.id]), Hh.upload(B, q(tt), tn, ke)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Hh.upload(B, q(tt), tn, ke), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && ri.setValue(B, "center", W.center), ri.setValue(B, "modelViewMatrix", W.modelViewMatrix), ri.setValue(B, "normalMatrix", W.normalMatrix), ri.setValue(B, "modelMatrix", W.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
34624
+ const wn = $.morphAttributes;
34625
+ if ((wn.position !== void 0 || wn.normal !== void 0 || wn.color !== void 0) && rt.update(W, $, un), (fn || tt.receiveShadow !== W.receiveShadow) && (tt.receiveShadow = W.receiveShadow, ri.setValue(B, "receiveShadow", W.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (tn.envMap.value = Ue, tn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && Y.environment !== null && (tn.envMapIntensity.value = Y.environmentIntensity), tn.dfgLUT !== void 0 && (tn.dfgLUT.value = mP()), fn && (ri.setValue(B, "toneMappingExposure", w.toneMappingExposure), tt.needsLights && we(tn, Fo), xe && G.fog === !0 && $e.refreshFogUniforms(tn, xe), $e.refreshMaterialUniforms(tn, G, ue, ie, x.state.transmissionRenderTarget[D.id]), Hh.upload(B, q(tt), tn, ke)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Hh.upload(B, q(tt), tn, ke), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && ri.setValue(B, "center", W.center), ri.setValue(B, "modelViewMatrix", W.modelViewMatrix), ri.setValue(B, "normalMatrix", W.normalMatrix), ri.setValue(B, "modelMatrix", W.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
34626
34626
  const Yi = G.uniformsGroups;
34627
34627
  for (let nn = 0, Cd = Yi.length; nn < Cd; nn++) {
34628
34628
  const Cr = Yi[nn];
@@ -34746,8 +34746,8 @@ class vb {
34746
34746
  if ($ !== null)
34747
34747
  ye = $.max.x - $.min.x, He = $.max.y - $.min.y, Ue = $.isBox3 ? $.max.z - $.min.z : 1, qe = $.min.x, ze = $.min.y, je = $.isBox3 ? $.min.z : 0;
34748
34748
  else {
34749
- const Sn = Math.pow(2, -W);
34750
- ye = Math.floor(Yt.width * Sn), He = Math.floor(Yt.height * Sn), D.isDataArrayTexture ? Ue = Yt.depth : D.isData3DTexture ? Ue = Math.floor(Yt.depth * Sn) : Ue = 1, qe = 0, ze = 0, je = 0;
34749
+ const wn = Math.pow(2, -W);
34750
+ ye = Math.floor(Yt.width * wn), He = Math.floor(Yt.height * wn), D.isDataArrayTexture ? Ue = Yt.depth : D.isData3DTexture ? Ue = Math.floor(Yt.depth * wn) : Ue = 1, qe = 0, ze = 0, je = 0;
34751
34751
  }
34752
34752
  G !== null ? (at = G.x, wt = G.y, Nt = G.z) : (at = 0, wt = 0, Nt = 0);
34753
34753
  const zt = st.convert(Y.format), tt = st.convert(Y.type);
@@ -34757,16 +34757,16 @@ class vb {
34757
34757
  B.pixelStorei(B.UNPACK_ROW_LENGTH, Yt.width), B.pixelStorei(B.UNPACK_IMAGE_HEIGHT, Yt.height), B.pixelStorei(B.UNPACK_SKIP_PIXELS, qe), B.pixelStorei(B.UNPACK_SKIP_ROWS, ze), B.pixelStorei(B.UNPACK_SKIP_IMAGES, je);
34758
34758
  const ri = D.isDataArrayTexture || D.isData3DTexture, tn = Y.isDataArrayTexture || Y.isData3DTexture;
34759
34759
  if (D.isDepthTexture) {
34760
- const Sn = fe.get(D), Yi = fe.get(Y), nn = fe.get(Sn.__renderTarget), Cd = fe.get(Yi.__renderTarget);
34760
+ const wn = fe.get(D), Yi = fe.get(Y), nn = fe.get(wn.__renderTarget), Cd = fe.get(Yi.__renderTarget);
34761
34761
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, nn.__webglFramebuffer), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, Cd.__webglFramebuffer);
34762
34762
  for (let Cr = 0; Cr < Ue; Cr++)
34763
34763
  ri && (B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, fe.get(D).__webglTexture, W, je + Cr), B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, fe.get(Y).__webglTexture, xe, Nt + Cr)), B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.DEPTH_BUFFER_BIT, B.NEAREST);
34764
34764
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, null), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, null);
34765
34765
  } else if (W !== 0 || D.isRenderTargetTexture || fe.has(D)) {
34766
- const Sn = fe.get(D), Yi = fe.get(Y);
34766
+ const wn = fe.get(D), Yi = fe.get(Y);
34767
34767
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, Be), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, xt);
34768
34768
  for (let nn = 0; nn < Ue; nn++)
34769
- ri ? B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, Sn.__webglTexture, W, je + nn) : B.framebufferTexture2D(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, Sn.__webglTexture, W), tn ? B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, Yi.__webglTexture, xe, Nt + nn) : B.framebufferTexture2D(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, Yi.__webglTexture, xe), W !== 0 ? B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.COLOR_BUFFER_BIT, B.NEAREST) : tn ? B.copyTexSubImage3D(si, xe, at, wt, Nt + nn, qe, ze, ye, He) : B.copyTexSubImage2D(si, xe, at, wt, qe, ze, ye, He);
34769
+ ri ? B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, wn.__webglTexture, W, je + nn) : B.framebufferTexture2D(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, wn.__webglTexture, W), tn ? B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, Yi.__webglTexture, xe, Nt + nn) : B.framebufferTexture2D(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, Yi.__webglTexture, xe), W !== 0 ? B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.COLOR_BUFFER_BIT, B.NEAREST) : tn ? B.copyTexSubImage3D(si, xe, at, wt, Nt + nn, qe, ze, ye, He) : B.copyTexSubImage2D(si, xe, at, wt, qe, ze, ye, He);
34770
34770
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, null), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, null);
34771
34771
  } else
34772
34772
  tn ? D.isDataTexture || D.isData3DTexture ? B.texSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, tt, Yt.data) : Y.isCompressedArrayTexture ? B.compressedTexSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, Yt.data) : B.texSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, tt, Yt) : D.isDataTexture ? B.texSubImage2D(B.TEXTURE_2D, xe, at, wt, ye, He, zt, tt, Yt.data) : D.isCompressedTexture ? B.compressedTexSubImage2D(B.TEXTURE_2D, xe, at, wt, Yt.width, Yt.height, zt, Yt.data) : B.texSubImage2D(B.TEXTURE_2D, xe, at, wt, ye, He, zt, tt, Yt);
@@ -34789,7 +34789,7 @@ class vb {
34789
34789
  * @readonly
34790
34790
  */
34791
34791
  get coordinateSystem() {
34792
- return In;
34792
+ return Cn;
34793
34793
  }
34794
34794
  /**
34795
34795
  * Defines the output color space of the renderer.
@@ -34809,11 +34809,11 @@ class vb {
34809
34809
  const gP = {
34810
34810
  Vector2: K,
34811
34811
  Vector3: P,
34812
- Vector4: Mt,
34812
+ Vector4: At,
34813
34813
  Quaternion: ui,
34814
34814
  Matrix4: Ce,
34815
34815
  Spherical: db,
34816
- Box3: ft,
34816
+ Box3: ut,
34817
34817
  Sphere: ni,
34818
34818
  Raycaster: _d,
34819
34819
  MathUtils: pd
@@ -34821,7 +34821,7 @@ const gP = {
34821
34821
  Vs.install({ THREE: gP });
34822
34822
  class vP {
34823
34823
  constructor(e) {
34824
- this.viralViewerApi = e, this.raycaster = new _d(), this.camera = null, this._orthoCamera = null, this._perspectiveCamera = null, this._frustumSize = 200, this.cameraControls = null, this.onUsing = !1, this.modelId = "0", this.elementId = "243274", this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.cameraUpdateQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.emit(At.LOADED_CAMERA);
34824
+ this.viralViewerApi = e, this.raycaster = new _d(), this.camera = null, this._orthoCamera = null, this._perspectiveCamera = null, this._frustumSize = 200, this.cameraControls = null, this.onUsing = !1, this.modelId = "0", this.elementId = "243274", this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.cameraUpdateQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.emit(Mt.LOADED_CAMERA);
34825
34825
  }
34826
34826
  setupCamera() {
34827
34827
  this._perspectiveCamera = new xi(
@@ -34896,7 +34896,7 @@ class vP {
34896
34896
  focusModelByName(e = "Viral Model") {
34897
34897
  var t = this.viralViewerApi.viralScene.scene.getObjectByName(e);
34898
34898
  if (t && this.cameraControls) {
34899
- var i = new ft().setFromObject(t);
34899
+ var i = new ut().setFromObject(t);
34900
34900
  console.log(i), this.cameraControls.fitToBox(i, !0);
34901
34901
  }
34902
34902
  }
@@ -35014,7 +35014,7 @@ class vP {
35014
35014
  const t = this.viralViewerApi.viralScene.scene;
35015
35015
  if (!t || !this.camera)
35016
35016
  return;
35017
- const n = new ft().setFromObject(t).getSize(new P()), r = Math.max(n.x, n.y, n.z);
35017
+ const n = new ut().setFromObject(t).getSize(new P()), r = Math.max(n.x, n.y, n.z);
35018
35018
  this.camera.far = r + e, this.camera.updateProjectionMatrix(), this.cameraControls && (this.cameraControls.maxDistance = this.camera.far * 0.95);
35019
35019
  }
35020
35020
  /**
@@ -35304,7 +35304,7 @@ class yP {
35304
35304
  let d = null, u = null, f = null, p = null;
35305
35305
  for (let E = 0; E < a.count; E++) {
35306
35306
  const S = new P().fromBufferAttribute(a, E);
35307
- o && (u = new K().fromBufferAttribute(o, E)), l && (f = new P().fromBufferAttribute(l, E)), c && (d = new Mt().fromBufferAttribute(c, E)), h && (p = new Ie().fromBufferAttribute(h, E));
35307
+ o && (u = new K().fromBufferAttribute(o, E)), l && (f = new P().fromBufferAttribute(l, E)), c && (d = new At().fromBufferAttribute(c, E)), h && (p = new Ie().fromBufferAttribute(h, E));
35308
35308
  const M = new TP(S, u, f, d, p);
35309
35309
  n.push(M);
35310
35310
  }
@@ -35505,7 +35505,7 @@ class Et {
35505
35505
  return t.length == 1 ? "0" + t : t;
35506
35506
  }
35507
35507
  static mergeBoundingBoxes(e) {
35508
- const t = new ft();
35508
+ const t = new ut();
35509
35509
  return e.forEach((i) => {
35510
35510
  t.union(i);
35511
35511
  }), t;
@@ -36235,7 +36235,7 @@ class NP extends Q {
36235
36235
  constructor() {
36236
36236
  super(
36237
36237
  new ii(1e5, 1e5, 2, 2),
36238
- new Ri({ visible: !1, wireframe: !0, side: pi, transparent: !0, opacity: 0.1, toneMapped: !1 })
36238
+ new Ri({ visible: !1, wireframe: !0, side: fi, transparent: !0, opacity: 0.1, toneMapped: !1 })
36239
36239
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
36240
36240
  }
36241
36241
  updateMatrixWorld(e) {
@@ -36358,7 +36358,7 @@ class Er {
36358
36358
  this._mesh.material = e;
36359
36359
  }
36360
36360
  }
36361
- const nv = new ft(), dh = new P();
36361
+ const nv = new ut(), dh = new P();
36362
36362
  class Ad extends cb {
36363
36363
  /**
36364
36364
  * Constructs a new line segments geometry.
@@ -36443,7 +36443,7 @@ class Ad extends cb {
36443
36443
  return this.setPositions(t.attributes.position.array), this;
36444
36444
  }
36445
36445
  computeBoundingBox() {
36446
- this.boundingBox === null && (this.boundingBox = new ft());
36446
+ this.boundingBox === null && (this.boundingBox = new ut());
36447
36447
  const e = this.attributes.instanceStart, t = this.attributes.instanceEnd;
36448
36448
  e !== void 0 && t !== void 0 && (this.boundingBox.setFromBufferAttribute(e), nv.setFromBufferAttribute(t), this.boundingBox.union(nv));
36449
36449
  }
@@ -37011,7 +37011,7 @@ class bb extends mt {
37011
37011
  this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
37012
37012
  }
37013
37013
  }
37014
- const Xu = new Mt(), sv = new P(), rv = new P(), Oi = new Mt(), Ni = new Mt(), cs = new Mt(), Hu = new P(), Yu = new Ce(), Fi = new _s(), av = new P(), uh = new ft(), fh = new ni(), hs = new Mt();
37014
+ const Xu = new At(), sv = new P(), rv = new P(), Oi = new At(), Ni = new At(), cs = new At(), Hu = new P(), Yu = new Ce(), Fi = new _s(), av = new P(), uh = new ut(), fh = new ni(), hs = new At();
37015
37015
  let ms, sa;
37016
37016
  function ov(s, e, t) {
37017
37017
  return hs.set(0, 0, -e, 1).applyMatrix4(s.projectionMatrix), hs.multiplyScalar(1 / hs.w), hs.x = sa / t.width, hs.y = sa / t.height, hs.applyMatrix4(s.projectionMatrixInverse), hs.multiplyScalar(1 / hs.w), Math.abs(Math.max(hs.x, hs.y));
@@ -37715,7 +37715,7 @@ class aC {
37715
37715
  return null;
37716
37716
  const n = t.meshes[i.mesh];
37717
37717
  for (const c of n.primitives)
37718
- if (c.mode !== En.TRIANGLES && c.mode !== En.TRIANGLE_STRIP && c.mode !== En.TRIANGLE_FAN && c.mode !== void 0)
37718
+ if (c.mode !== Tn.TRIANGLES && c.mode !== Tn.TRIANGLE_STRIP && c.mode !== Tn.TRIANGLE_FAN && c.mode !== void 0)
37719
37719
  return null;
37720
37720
  const a = i.extensions[this.name].attributes, o = [], l = {};
37721
37721
  for (const c in a)
@@ -37841,7 +37841,7 @@ class uC extends _b {
37841
37841
  return dC.fromArray(r).normalize().toArray(r), r;
37842
37842
  }
37843
37843
  }
37844
- const En = {
37844
+ const Tn = {
37845
37845
  FLOAT: 5126,
37846
37846
  //FLOAT_MAT2: 35674,
37847
37847
  FLOAT_MAT3: 35675,
@@ -37922,7 +37922,7 @@ function pC(s) {
37922
37922
  roughness: 1,
37923
37923
  transparent: !1,
37924
37924
  depthTest: !0,
37925
- side: wn
37925
+ side: Un
37926
37926
  })), s.DefaultMaterial;
37927
37927
  }
37928
37928
  function Vr(s, e, t) {
@@ -38434,7 +38434,7 @@ class yC {
38434
38434
  return u.extendMaterialParams && u.extendMaterialParams(e, o);
38435
38435
  })));
38436
38436
  }
38437
- r.doubleSided === !0 && (o.side = pi);
38437
+ r.doubleSided === !0 && (o.side = fi);
38438
38438
  const h = r.alphaMode || Wu.OPAQUE;
38439
38439
  if (h === Wu.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, h === Wu.MASK && (o.alphaTest = r.alphaCutoff !== void 0 ? r.alphaCutoff : 0.5)), r.normalTexture !== void 0 && a !== Ri && (c.push(t.assignTexture(o, "normalMap", r.normalTexture)), o.normalScale = new K(1, 1), r.normalTexture.scale !== void 0)) {
38440
38440
  const d = r.normalTexture.scale;
@@ -38507,15 +38507,15 @@ class yC {
38507
38507
  const v = h[f], g = a[f];
38508
38508
  let m;
38509
38509
  const b = c[f];
38510
- if (g.mode === En.TRIANGLES || g.mode === En.TRIANGLE_STRIP || g.mode === En.TRIANGLE_FAN || g.mode === void 0)
38511
- m = r.isSkinnedMesh === !0 ? new Vx(v, b) : new Q(v, b), m.isSkinnedMesh === !0 && m.normalizeSkinWeights(), g.mode === En.TRIANGLE_STRIP ? m.geometry = W0(m.geometry, Ix) : g.mode === En.TRIANGLE_FAN && (m.geometry = W0(m.geometry, Kf));
38512
- else if (g.mode === En.LINES)
38510
+ if (g.mode === Tn.TRIANGLES || g.mode === Tn.TRIANGLE_STRIP || g.mode === Tn.TRIANGLE_FAN || g.mode === void 0)
38511
+ m = r.isSkinnedMesh === !0 ? new Vx(v, b) : new Q(v, b), m.isSkinnedMesh === !0 && m.normalizeSkinWeights(), g.mode === Tn.TRIANGLE_STRIP ? m.geometry = W0(m.geometry, Ix) : g.mode === Tn.TRIANGLE_FAN && (m.geometry = W0(m.geometry, Kf));
38512
+ else if (g.mode === Tn.LINES)
38513
38513
  m = new Ii(v, b);
38514
- else if (g.mode === En.LINE_STRIP)
38514
+ else if (g.mode === Tn.LINE_STRIP)
38515
38515
  m = new Hi(v, b);
38516
- else if (g.mode === En.LINE_LOOP)
38516
+ else if (g.mode === Tn.LINE_LOOP)
38517
38517
  m = new Hx(v, b);
38518
- else if (g.mode === En.POINTS)
38518
+ else if (g.mode === Tn.POINTS)
38519
38519
  m = new _o(v, b);
38520
38520
  else
38521
38521
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + g.mode);
@@ -38770,7 +38770,7 @@ class yC {
38770
38770
  }
38771
38771
  }
38772
38772
  function _C(s, e, t) {
38773
- const i = e.attributes, n = new ft();
38773
+ const i = e.attributes, n = new ut();
38774
38774
  if (i.POSITION !== void 0) {
38775
38775
  const o = t.json.accessors[i.POSITION], l = o.min, c = o.max;
38776
38776
  if (l !== void 0 && c !== void 0) {
@@ -39308,7 +39308,7 @@ class mr extends zn {
39308
39308
  constructor(e, t, i, n) {
39309
39309
  super(), this.renderScene = t, this.renderCamera = i, this.selectedObjects = n !== void 0 ? n : [], this.visibleEdgeColor = new Ie(1, 1, 1), this.hiddenEdgeColor = new Ie(0.1, 0.04, 0.02), this.edgeGlow = 0, this.usePatternTexture = !1, this.patternTexture = null, this.edgeThickness = 1, this.edgeStrength = 3, this.downSampleRatio = 2, this.pulsePeriod = 0, this._visibilityCache = /* @__PURE__ */ new Map(), this._selectionCache = /* @__PURE__ */ new Set(), this.resolution = e !== void 0 ? new K(e.x, e.y) : new K(256, 256);
39310
39310
  const r = Math.round(this.resolution.x / this.downSampleRatio), a = Math.round(this.resolution.y / this.downSampleRatio);
39311
- this.renderTargetMaskBuffer = new Tt(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new dm(), this.depthMaterial.side = pi, this.depthMaterial.depthPacking = Rx, this.depthMaterial.blending = $t, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = pi, this.prepareMaskMaterial.fragmentShader = h(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new Tt(this.resolution.x, this.resolution.y, { type: Ht }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new Tt(r, a, { type: Ht }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1;
39311
+ this.renderTargetMaskBuffer = new Tt(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new dm(), this.depthMaterial.side = fi, this.depthMaterial.depthPacking = Rx, this.depthMaterial.blending = $t, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = fi, this.prepareMaskMaterial.fragmentShader = h(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new Tt(this.resolution.x, this.resolution.y, { type: Ht }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new Tt(r, a, { type: Ht }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1;
39312
39312
  const o = 4, l = 4;
39313
39313
  this.separableBlurMaterial1 = this._getSeparableBlurMaterial(o), this.separableBlurMaterial1.uniforms.texSize.value.set(r, a), this.separableBlurMaterial1.uniforms.kernelRadius.value = 1, this.separableBlurMaterial2 = this._getSeparableBlurMaterial(l), this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(r / 2), Math.round(a / 2)), this.separableBlurMaterial2.uniforms.kernelRadius.value = l, this.overlayMaterial = this._getOverlayMaterial();
39314
39314
  const c = Kn;
@@ -41217,7 +41217,7 @@ class qn extends zn {
41217
41217
  const o = Math.random() * 2 - 1, l = Math.random() * 2 - 1, c = 0;
41218
41218
  r[a] = i.noise3d(o, l, c);
41219
41219
  }
41220
- this.noiseTexture = new Bn(r, 4, 4, oc, $i), this.noiseTexture.wrapS = Jn, this.noiseTexture.wrapT = Jn, this.noiseTexture.needsUpdate = !0;
41220
+ this.noiseTexture = new Nn(r, 4, 4, oc, $i), this.noiseTexture.wrapS = Jn, this.noiseTexture.wrapT = Jn, this.noiseTexture.needsUpdate = !0;
41221
41221
  }
41222
41222
  _overrideVisibility() {
41223
41223
  const e = this.scene, t = this._visibilityCache;
@@ -42021,44 +42021,13 @@ class Fn extends Q {
42021
42021
  * Select elements (highlights them with accent color)
42022
42022
  */
42023
42023
  select(e, t = []) {
42024
- this.unselect();
42025
- const i = [];
42026
- e.forEach((n) => {
42027
- if (this._isolatingElements.length === 0) {
42028
- this._selectedElements.push(n), i.push(n);
42029
- return;
42030
- }
42031
- this._isolatingElements.length > 0 && this._isolatingElements.find(
42032
- (r) => r.elementId == n.elementId && r.modelId == n.modelId
42033
- ) && (this._selectedElements.push(n), i.push(n));
42034
- }), this.changeColor(i, OC);
42024
+ this._selectedElements = e, this.resetColor(null), this.changeColor(this._selectedElements, OC);
42035
42025
  }
42036
42026
  get selectedElements() {
42037
42027
  return this._selectedElements;
42038
42028
  }
42039
42029
  unselect() {
42040
- var e;
42041
- if (this._selectedElements.length !== 0) {
42042
- if (this._colors && this._originalColor) {
42043
- const { r: t, g: i, b: n } = this._originalColor, r = new Set(
42044
- this._hidingElements.map((o) => `${o.modelId}:${o.elementId}`)
42045
- );
42046
- for (const { modelId: o, elementId: l } of this._selectedElements) {
42047
- if (r.has(`${o}:${l}`))
42048
- continue;
42049
- const c = (e = this._elementMap.get(o)) == null ? void 0 : e.get(l);
42050
- if (c)
42051
- for (const h of c) {
42052
- const d = h.start * 4, u = d + h.count * 4;
42053
- for (let f = d; f < u; f += 4)
42054
- this._colors[f] = t, this._colors[f + 1] = i, this._colors[f + 2] = n, this._colors[f + 3] = 1;
42055
- }
42056
- }
42057
- const a = this.geometry.getAttribute("color");
42058
- a.needsUpdate = !0;
42059
- }
42060
- this._selectedElements = [];
42061
- }
42030
+ this._selectedElements.length !== 0 && (this.resetColor(null), this._selectedElements = []);
42062
42031
  }
42063
42032
  //#endregion
42064
42033
  //#region Hide/Isolate/Show
@@ -42540,22 +42509,23 @@ class Fn extends Q {
42540
42509
  //#endregion
42541
42510
  //#region geometry helper
42542
42511
  getElementBoxs(e) {
42543
- let t = this._bufferElements.find(
42544
- (i) => e.some(
42545
- (n) => i.modelId === Number.parseInt(n.modelId) && i.elementId === n.elementId
42512
+ const t = this._bufferElements.filter(
42513
+ (r) => e.some(
42514
+ (a) => r.modelId === Number.parseInt(a.modelId) && r.elementId === a.elementId
42546
42515
  )
42547
42516
  );
42548
- if (t) {
42549
- const i = new ft(), n = new P();
42550
- for (let r = 0; r < t.buffer.length; r += 3)
42551
- n.set(
42552
- t.buffer[r],
42553
- t.buffer[r + 1],
42554
- t.buffer[r + 2]
42555
- ), i.expandByPoint(n);
42556
- return i;
42557
- }
42558
- return null;
42517
+ if (t.length === 0)
42518
+ return null;
42519
+ const i = new ut(), n = new P();
42520
+ for (const r of t)
42521
+ if (r.buffer)
42522
+ for (let a = 0; a < r.buffer.length; a += 3)
42523
+ n.set(
42524
+ r.buffer[a],
42525
+ r.buffer[a + 1],
42526
+ r.buffer[a + 2]
42527
+ ), i.expandByPoint(n);
42528
+ return i;
42559
42529
  }
42560
42530
  getTotalVertexCount() {
42561
42531
  const e = this.geometry.getAttribute("position");
@@ -42586,7 +42556,7 @@ class Fn extends Q {
42586
42556
  */
42587
42557
  async createSimplifiedLODs(e) {
42588
42558
  var n, r;
42589
- const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-Bx_m6DnI.mjs"), i = [this];
42559
+ const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-Dg6taIi9.mjs"), i = [this];
42590
42560
  console.log(
42591
42561
  `🔨 Creating ${e.length} LOD levels for batched mesh...`
42592
42562
  );
@@ -42630,7 +42600,7 @@ class Fn extends Q {
42630
42600
  * ```
42631
42601
  */
42632
42602
  async createSimplifiedLODFast(e) {
42633
- const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-Bx_m6DnI.mjs");
42603
+ const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-Dg6taIi9.mjs");
42634
42604
  return t(this, e);
42635
42605
  }
42636
42606
  /**
@@ -42766,13 +42736,10 @@ const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
42766
42736
  }
42767
42737
  //#region Selection and Color Control
42768
42738
  select(e, t = []) {
42769
- this.unselect(), e.forEach((i) => {
42770
- var r;
42771
- ((r = this._elementMap.get(i.modelId)) == null ? void 0 : r.get(i.elementId)) && this._selectedElements.push(i);
42772
- }), this.changeColor(e, NC);
42739
+ this._selectedElements = e, this.resetColor(null), this.changeColor(this._selectedElements, NC);
42773
42740
  }
42774
42741
  unselect() {
42775
- this._selectedElements.length > 0 && (this.resetElementOpacity(), this._selectedElements = []);
42742
+ this._selectedElements.length > 0 && (this.resetColor(null), this._selectedElements = []);
42776
42743
  }
42777
42744
  changeColor(e, t) {
42778
42745
  e.forEach(({ modelId: i, elementId: n }) => {
@@ -42849,7 +42816,7 @@ const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
42849
42816
  Ol.ZERO_MATRIX
42850
42817
  ), o.instanceMatrix.needsUpdate = !0;
42851
42818
  });
42852
- }), this.hideEdge(t));
42819
+ }));
42853
42820
  }
42854
42821
  /**
42855
42822
  * Isolate elements - show ONLY these elements, hide everything else
@@ -43264,16 +43231,22 @@ if (gl_FragColor.a < 0.01) discard;`
43264
43231
  return this._bufferElements.filter((t) => t.modelId === e);
43265
43232
  }
43266
43233
  getElementBoxs(e) {
43267
- var l;
43268
- const t = e[0], i = (l = this._elementMap.get(t.modelId)) == null ? void 0 : l.get(t.elementId);
43269
- if (!i || i.length === 0)
43270
- return null;
43271
- const { instancedMesh: n, instanceIndex: r } = i[0], a = new Ce();
43272
- n.getMatrixAt(r, a);
43273
- const o = new ft().setFromBufferAttribute(
43274
- n.geometry.getAttribute("position")
43275
- );
43276
- return o.applyMatrix4(a), o;
43234
+ var n;
43235
+ const t = new ut();
43236
+ let i = !1;
43237
+ for (const r of e) {
43238
+ const a = (n = this._elementMap.get(r.modelId)) == null ? void 0 : n.get(r.elementId);
43239
+ if (!(!a || a.length === 0))
43240
+ for (const { instancedMesh: o, instanceIndex: l } of a) {
43241
+ const c = new Ce();
43242
+ o.getMatrixAt(l, c);
43243
+ const h = new ut().setFromBufferAttribute(
43244
+ o.geometry.getAttribute("position")
43245
+ );
43246
+ h.applyMatrix4(c), t.union(h), i = !0;
43247
+ }
43248
+ }
43249
+ return i ? t : null;
43277
43250
  }
43278
43251
  getTotalVertexCount() {
43279
43252
  let e = 0;
@@ -43845,9 +43818,9 @@ class FC extends Q {
43845
43818
  }
43846
43819
  get bounds() {
43847
43820
  try {
43848
- return new ft().setFromObject(this);
43821
+ return new ut().setFromObject(this);
43849
43822
  } catch {
43850
- return new ft();
43823
+ return new ut();
43851
43824
  }
43852
43825
  }
43853
43826
  setReady(e) {
@@ -44052,9 +44025,9 @@ class FC extends Q {
44052
44025
  */
44053
44026
  setElementGhost(e, t = 0.1) {
44054
44027
  this._batchedMeshes.forEach((i) => {
44055
- i.setElementGhost(e, t);
44028
+ i.setElementGhost(e, t, !0);
44056
44029
  }), this._instancedMeshes.forEach((i) => {
44057
- i.setElementGhost(e, t);
44030
+ i.setElementGhost(e, t / 10, !0);
44058
44031
  });
44059
44032
  }
44060
44033
  /**
@@ -44066,7 +44039,7 @@ class FC extends Q {
44066
44039
  this._batchedMeshes.forEach((i) => {
44067
44040
  i.ghostExcept(e, t);
44068
44041
  }), this._instancedMeshes.forEach((i) => {
44069
- i.ghostExcept(e, t);
44042
+ i.ghostExcept(e, t / 10);
44070
44043
  });
44071
44044
  }
44072
44045
  /**
@@ -44324,8 +44297,8 @@ class kC {
44324
44297
  this.viralViewerApi = e, this.scene = new lc(), this.objects = [], this.models = [], this.mainModels = [], this.isolateModel = new Q(), this.mergedModel = new FC(), this.outlineModel = new Q(), this.hideables = [], this.selectables = [], this.edges = [], this.sunLight = null, this.lights = [], this.transformControls = null, this.lightHelpers = [], this.fullScreenQuadMaterial = new Ri({
44325
44298
  map: null,
44326
44299
  // Use the render target's texture
44327
- side: pi
44328
- }), this.fullScreenQuad = null, this.viralViewerApi.emit(At.LOADED_SCENE), this.isolateModel.name = Qr.isolateModel, this.addModel(this.isolateModel), this.mergedModel.name = Qr.mergedModel, this.addModel(this.mergedModel), this.outlineModel.name = Qr.outlineModel, this.outlineModel.renderOrder = 0, this.addModel(this.outlineModel);
44300
+ side: fi
44301
+ }), this.fullScreenQuad = null, this.viralViewerApi.emit(Mt.LOADED_SCENE), this.isolateModel.name = Qr.isolateModel, this.addModel(this.isolateModel), this.mergedModel.name = Qr.mergedModel, this.addModel(this.mergedModel), this.outlineModel.name = Qr.outlineModel, this.outlineModel.renderOrder = 0, this.addModel(this.outlineModel);
44329
44302
  const t = new So(5, 32, 32), i = new on({
44330
44303
  color: 16768256,
44331
44304
  emissive: 16755200,
@@ -45661,7 +45634,7 @@ class JC extends zn {
45661
45634
  stencilBuffer: !1,
45662
45635
  depthBuffer: !1,
45663
45636
  alpha: !0
45664
- }), this.bluenoise = new Bn(ZC, 128, 128), this.accumulationQuad = new Qa(new mt({
45637
+ }), this.bluenoise = new Nn(ZC, 128, 128), this.accumulationQuad = new Qa(new mt({
45665
45638
  uniforms: {
45666
45639
  frame: {
45667
45640
  value: 0
@@ -46052,7 +46025,7 @@ class t3 {
46052
46025
  }
46053
46026
  function i3() {
46054
46027
  const s = new bd({
46055
- side: pi
46028
+ side: fi
46056
46029
  });
46057
46030
  return s.onBeforeCompile = (e) => {
46058
46031
  e.vertexShader = `attribute vec4 color;
@@ -46075,7 +46048,7 @@ function i3() {
46075
46048
  function n3() {
46076
46049
  const s = new Ri({
46077
46050
  colorWrite: !1,
46078
- side: pi
46051
+ side: fi
46079
46052
  });
46080
46053
  return s.onBeforeCompile = (e) => {
46081
46054
  e.vertexShader = `attribute vec4 color;
@@ -46348,7 +46321,7 @@ class c3 extends zn {
46348
46321
  ), this.normalMaterial = i3(), this.depthMaterial = n3(), this.objectIdMaterial = new mt({
46349
46322
  vertexShader: o3,
46350
46323
  fragmentShader: l3,
46351
- side: pi
46324
+ side: fi
46352
46325
  }), this.edgeMaterial = new mt({
46353
46326
  uniforms: {
46354
46327
  tDiffuse: { value: null },
@@ -46731,7 +46704,7 @@ class d3 {
46731
46704
  ), this.renderer.outputColorSpace = Pi, this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = ds, this.renderer.shadowMap.autoUpdate = !1, this.renderer.shadowMap.needsUpdate = !0, this.renderer.info.autoReset = !1, this.viralViewerApi.targetElement.appendChild(this.renderer.domElement), this.viralViewerApi.options.enablePostProcessing !== !1 && (this.postProcessingRenderer = new h3(
46732
46705
  this.renderer,
46733
46706
  this.viralViewerApi
46734
- )), this.jitterOffsets = this.generateJitterOffsets(), this.viralViewerApi.emit(At.LOADED_RENDERER);
46707
+ )), this.jitterOffsets = this.generateJitterOffsets(), this.viralViewerApi.emit(Mt.LOADED_RENDERER);
46735
46708
  }
46736
46709
  updateSize(e, t) {
46737
46710
  this.renderer.setSize(e, t), this.postProcessingRenderer && this.postProcessingRenderer.composer.setSize(e, t);
@@ -47394,7 +47367,7 @@ class b3 extends Q {
47394
47367
  super(), this._viralMeshes = [], this._viralInstancedMeshes = [];
47395
47368
  }
47396
47369
  get bounds() {
47397
- return new ft().setFromObject(this);
47370
+ return new ut().setFromObject(this);
47398
47371
  }
47399
47372
  addViralMesh(e) {
47400
47373
  this.add(e), this._viralMeshes.push(e);
@@ -47761,7 +47734,7 @@ class Ab {
47761
47734
  // polygonOffset: true,
47762
47735
  // polygonOffsetFactor: 1,
47763
47736
  // polygonOffsetUnits: 0.1,
47764
- side: wn
47737
+ side: Un
47765
47738
  // 🔧 FIX: Changed from DoubleSide to halve draw calls
47766
47739
  });
47767
47740
  l.userData.red = r.Red, l.userData.green = r.Green, l.userData.blue = r.Blue, l.userData.opacity = r.Opacity, this.viralViewerApi.viralMaterialManager.materials.push(l);
@@ -47909,7 +47882,7 @@ class Ab {
47909
47882
  return l.multiplyScalar(o), l;
47910
47883
  }, n = e.transparent || e.opacity < 1, r = t ? new on({
47911
47884
  vertexColors: !0,
47912
- side: wn,
47885
+ side: fi,
47913
47886
  // 🔧 FIX: Changed from DoubleSide to halve draw calls
47914
47887
  opacity: e.opacity,
47915
47888
  transparent: !0,
@@ -48116,7 +48089,7 @@ class A3 {
48116
48089
  2 * w / 2,
48117
48090
  -(2 * w) / 2
48118
48091
  ));
48119
- const T = new ft(g, m);
48092
+ const T = new ut(g, m);
48120
48093
  await ((u = this.viralViewerApi.viralCamera.cameraControls) == null ? void 0 : u.fitToBox(
48121
48094
  T,
48122
48095
  !1
@@ -48141,7 +48114,7 @@ class A3 {
48141
48114
  z,
48142
48115
  () => {
48143
48116
  L += 1, L == C && (this.viralViewerApi.emit(
48144
- At.LOADED_SEPERATE_MODEL,
48117
+ Mt.LOADED_SEPERATE_MODEL,
48145
48118
  { modelId: M }
48146
48119
  ), console.log(
48147
48120
  this._loadElementPatchWorker.getSpatialMeshManager()
@@ -48150,7 +48123,7 @@ class A3 {
48150
48123
  ), r());
48151
48124
  }
48152
48125
  ) : (L += 1, L == C && (this.viralViewerApi.emit(
48153
- At.LOADED_SEPERATE_MODEL,
48126
+ Mt.LOADED_SEPERATE_MODEL,
48154
48127
  { modelId: M }
48155
48128
  ), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralScene.mergedModel.enableEdge(
48156
48129
  this.viralViewerApi.viralMaterialManager.edgeMaterial
@@ -48162,7 +48135,7 @@ class A3 {
48162
48135
  }
48163
48136
  };
48164
48137
  (o = this.viralViewerApi.viralGeometryHandler) != null && o.isGeneratingMergeModel ? this.viralViewerApi.on(
48165
- At.GENERATED_MERGE_MODEL,
48138
+ Mt.GENERATED_MERGE_MODEL,
48166
48139
  async () => {
48167
48140
  await a();
48168
48141
  }
@@ -49107,21 +49080,21 @@ void main() {
49107
49080
  return i('var t;!function(t){t[t.POSITION_CARTESIAN=0]="POSITION_CARTESIAN",t[t.COLOR_PACKED=1]="COLOR_PACKED",t[t.COLOR_FLOATS_1=2]="COLOR_FLOATS_1",t[t.COLOR_FLOATS_255=3]="COLOR_FLOATS_255",t[t.NORMAL_FLOATS=4]="NORMAL_FLOATS",t[t.FILLER=5]="FILLER",t[t.INTENSITY=6]="INTENSITY",t[t.CLASSIFICATION=7]="CLASSIFICATION",t[t.NORMAL_SPHEREMAPPED=8]="NORMAL_SPHEREMAPPED",t[t.NORMAL_OCT16=9]="NORMAL_OCT16",t[t.NORMAL=10]="NORMAL"}(t||(t={}));const e={ordinal:1,size:4},n={ordinal:2,size:1},r={ordinal:3,size:1};function i(t,e,n){return{name:t,type:e,numElements:n,byteSize:n*e.size}}const s=i(t.COLOR_PACKED,n,4),a={POSITION_CARTESIAN:i(t.POSITION_CARTESIAN,e,3),RGBA_PACKED:s,COLOR_PACKED:s,RGB_PACKED:i(t.COLOR_PACKED,n,3),NORMAL_FLOATS:i(t.NORMAL_FLOATS,e,3),FILLER_1B:i(t.FILLER,r,1),INTENSITY:i(t.INTENSITY,{ordinal:5,size:2},1),CLASSIFICATION:i(t.CLASSIFICATION,r,1),NORMAL_SPHEREMAPPED:i(t.NORMAL_SPHEREMAPPED,r,2),NORMAL_OCT16:i(t.NORMAL_OCT16,r,2),NORMAL:i(t.NORMAL,e,3)};class o{constructor(t){this.versionMinor=0,this.version=t;const e=-1===t.indexOf(".")?t.length:t.indexOf(".");this.versionMajor=parseInt(t.substr(0,e),10),this.versionMinor=parseInt(t.substr(e+1),10),isNaN(this.versionMinor)&&(this.versionMinor=0)}newerThan(t){const e=new o(t);return this.versionMajor>e.versionMajor||this.versionMajor===e.versionMajor&&this.versionMinor>e.versionMinor}equalOrHigher(t){const e=new o(t);return this.versionMajor>e.versionMajor||this.versionMajor===e.versionMajor&&this.versionMinor>=e.versionMinor}upTo(t){return!this.newerThan(t)}}class u{constructor(t){this.tmp=new ArrayBuffer(4),this.tmpf=new Float32Array(this.tmp),this.tmpu8=new Uint8Array(this.tmp),this.u8=new Uint8Array(t)}getUint32(t){return this.u8[t+3]<<24|this.u8[t+2]<<16|this.u8[t+1]<<8|this.u8[t]}getUint16(t){return this.u8[t+1]<<8|this.u8[t]}getFloat32(t){const e=this.tmpu8,n=this.u8,r=this.tmpf;return e[0]=n[t+0],e[1]=n[t+1],e[2]=n[t+2],e[3]=n[t+3],r[0]}getUint8(t){return this.u8[t]}}const f=Math.sign||function(t){return 0==(t=Number(t))||t!=t?t:t<0?-1:1};function A(e,n){const r=function(e,n){switch(e.name){case t.POSITION_CARTESIAN:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){let n,i,s;e.version.newerThan("1.3")?(n=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+0)*e.scale,i=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+4)*e.scale,s=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+8)*e.scale):(n=e.data.getFloat32(t*e.pointAttributes.byteSize+0)+e.nodeOffset[0],i=e.data.getFloat32(t*e.pointAttributes.byteSize+4)+e.nodeOffset[1],s=e.data.getFloat32(t*e.pointAttributes.byteSize+8)+e.nodeOffset[2]),r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s,e.mean[0]+=n/e.numPoints,e.mean[1]+=i/e.numPoints,e.mean[2]+=s/e.numPoints,e.tightBoxMin[0]=Math.min(e.tightBoxMin[0],n),e.tightBoxMin[1]=Math.min(e.tightBoxMin[1],i),e.tightBoxMin[2]=Math.min(e.tightBoxMin[2],s),e.tightBoxMax[0]=Math.max(e.tightBoxMax[0],n),e.tightBoxMax[1]=Math.max(e.tightBoxMax[1],i),e.tightBoxMax[2]=Math.max(e.tightBoxMax[2],s)}return{buffer:n,attribute:t}}(e,n);case t.COLOR_PACKED:return function(t,e){const n=new ArrayBuffer(3*e.numPoints),r=new Uint8Array(n);for(let t=0;t<e.numPoints;t++)r[3*t+0]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0),r[3*t+1]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1),r[3*t+2]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+2);return{buffer:n,attribute:t}}(e,n);case t.INTENSITY:return function(t,e){const n=new ArrayBuffer(4*e.numPoints),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++)r[t]=e.data.getUint16(e.currentOffset+t*e.pointAttributes.byteSize);return{buffer:n,attribute:t}}(e,n);case t.CLASSIFICATION:return function(t,e){const n=new ArrayBuffer(e.numPoints),r=new Uint8Array(n);for(let t=0;t<e.numPoints;t++)r[t]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize);return{buffer:n,attribute:t}}(e,n);case t.NORMAL_SPHEREMAPPED:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){let n=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0)/255*2-1,i=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1)/255*2-1,s=1;const a=n*-n+i*-i+1*s;s=a,n*=Math.sqrt(a),i*=Math.sqrt(a),n*=2,i*=2,s=2*s-1,r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);case t.NORMAL_OCT16:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){const n=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0)/255*2-1,i=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1)/255*2-1;let s=1-Math.abs(n)-Math.abs(i),a=0,o=0;s>=0?(a=n,o=i):(a=-(i/f(i)-1)/f(n),o=-(n/f(n)-1)/f(i));const u=Math.sqrt(a*a+o*o+s*s);a/=u,o/=u,s/=u,r[3*t+0]=a,r[3*t+1]=o,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);case t.NORMAL:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){const n=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+0),i=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+4),s=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+8);r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);default:return}}(e,n);void 0!==r&&(n.attributeBuffers[r.attribute.name]=r,n.transferables.push(r.buffer))}onmessage=function(e){const n=e.data.buffer,r=e.data.pointAttributes,i={attributeBuffers:{},currentOffset:0,data:new u(n),mean:[0,0,0],nodeOffset:e.data.offset,numPoints:e.data.buffer.byteLength/r.byteSize,pointAttributes:r,scale:e.data.scale,tightBoxMax:[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],tightBoxMin:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transferables:[],version:new o(e.data.version)};for(const t of i.pointAttributes.attributes)A(t,i),i.currentOffset+=t.byteSize;const s=new ArrayBuffer(4*i.numPoints),f=new Uint32Array(s);for(let t=0;t<i.numPoints;t++)f[t]=t;i.attributeBuffers[t.CLASSIFICATION]||function(e){const n=new ArrayBuffer(4*e.numPoints),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++)r[t]=0;e.attributeBuffers[t.CLASSIFICATION]={buffer:n,attribute:a.CLASSIFICATION}}(i);const O={buffer:n,mean:i.mean,attributeBuffers:i.attributeBuffers,tightBoundingBox:{min:i.tightBoxMin,max:i.tightBoxMax},indices:s};postMessage(O,i.transferables)};', "Worker", void 0, void 0);
49108
49081
  }
49109
49082
  } }, pv = {};
49110
- function Pn(s) {
49083
+ function En(s) {
49111
49084
  var e = pv[s];
49112
49085
  if (e !== void 0)
49113
49086
  return e.exports;
49114
49087
  var t = pv[s] = { exports: {} };
49115
- return T3[s](t, t.exports, Pn), t.exports;
49088
+ return T3[s](t, t.exports, En), t.exports;
49116
49089
  }
49117
- Pn.d = (s, e) => {
49090
+ En.d = (s, e) => {
49118
49091
  for (var t in e)
49119
- Pn.o(e, t) && !Pn.o(s, t) && Object.defineProperty(s, t, { enumerable: !0, get: e[t] });
49120
- }, Pn.o = (s, e) => Object.prototype.hasOwnProperty.call(s, e);
49092
+ En.o(e, t) && !En.o(s, t) && Object.defineProperty(s, t, { enumerable: !0, get: e[t] });
49093
+ }, En.o = (s, e) => Object.prototype.hasOwnProperty.call(s, e);
49121
49094
  var Ft = {};
49122
49095
  (() => {
49123
- Pn.d(Ft, { HY: () => c, K8: () => i, vF: () => g, jM: () => m, st: () => b, J7: () => ht, KV: () => Te, Tl: () => ee, gv: () => gt, LR: () => ce, C9: () => I, zF: () => Ee, XL: () => ge, uv: () => ve, vs: () => fe, YJ: () => N, i9: () => l, uD: () => o, lV: () => r, Sp: () => n, RJ: () => Ss, SB: () => kn, TL: () => x, oe: () => y, AB: () => a, dZ: () => _, Gf: () => le, gK: () => w, BT: () => S, bt: () => T, sX: () => E });
49124
- const s = (e = { AdditiveBlending: () => Hl, Box3: () => ft, BufferAttribute: () => ot, BufferGeometry: () => dt, CanvasTexture: () => np, Color: () => Ie, DataTexture: () => Bn, EventDispatcher: () => Ws, Frustum: () => Oo, GLSL3: () => ep, LessEqualDepth: () => la, LineBasicMaterial: () => dn, LineSegments: () => Ii, LinearFilter: () => jt, Matrix4: () => Ce, NearestFilter: () => Dt, NoBlending: () => $t, Object3D: () => Lt, Points: () => _o, RGBAFormat: () => Kt, RawShaderMaterial: () => hm, Scene: () => lc, ShaderMaterial: () => mt, Sphere: () => ni, Texture: () => ci, Uint8BufferAttribute: () => U1, Vector2: () => K, Vector3: () => P, Vector4: () => Mt, WebGLRenderTarget: () => Tt }, t = {}, Pn.d(t, e), t);
49096
+ En.d(Ft, { HY: () => c, K8: () => i, vF: () => g, jM: () => m, st: () => b, J7: () => ht, KV: () => Te, Tl: () => ee, gv: () => gt, LR: () => ce, C9: () => I, zF: () => Ee, XL: () => ge, uv: () => ve, vs: () => fe, YJ: () => N, i9: () => l, uD: () => o, lV: () => r, Sp: () => n, RJ: () => Ss, SB: () => kn, TL: () => x, oe: () => y, AB: () => a, dZ: () => _, Gf: () => le, gK: () => w, BT: () => S, bt: () => T, sX: () => E });
49097
+ const s = (e = { AdditiveBlending: () => Hl, Box3: () => ut, BufferAttribute: () => ot, BufferGeometry: () => dt, CanvasTexture: () => np, Color: () => Ie, DataTexture: () => Nn, EventDispatcher: () => Ws, Frustum: () => Oo, GLSL3: () => ep, LessEqualDepth: () => la, LineBasicMaterial: () => dn, LineSegments: () => Ii, LinearFilter: () => jt, Matrix4: () => Ce, NearestFilter: () => Dt, NoBlending: () => $t, Object3D: () => Lt, Points: () => _o, RGBAFormat: () => Kt, RawShaderMaterial: () => hm, Scene: () => lc, ShaderMaterial: () => mt, Sphere: () => ni, Texture: () => ci, Uint8BufferAttribute: () => U1, Vector2: () => K, Vector3: () => P, Vector4: () => At, WebGLRenderTarget: () => Tt }, t = {}, En.d(t, e), t);
49125
49098
  var e, t, i, n, r, a, o, l;
49126
49099
  class c extends s.ShaderMaterial {
49127
49100
  constructor() {
@@ -49195,7 +49168,7 @@ var Ft = {};
49195
49168
  (F = k[pe]) && (J = (q < 3 ? F(J) : q > 3 ? F(A, R, J) : F(A, R)) || J);
49196
49169
  return q > 3 && J && Object.defineProperty(A, R, J), J;
49197
49170
  };
49198
- const L = Pn(776).Z, U = Pn(746).Z, z = { [a.OCTREE]: "tree_type_octree", [a.KDTREE]: "tree_type_kdtree" }, X = { [n.FIXED]: "fixed_point_size", [n.ATTENUATED]: "attenuated_point_size", [n.ADAPTIVE]: "adaptive_point_size" }, j = { [o.ATTENUATED]: "attenuated_opacity", [o.FIXED]: "fixed_opacity" }, re = { [r.SQUARE]: "square_point_shape", [r.CIRCLE]: "circle_point_shape", [r.PARABOLOID]: "paraboloid_point_shape" }, Z = { [l.RGB]: "color_type_rgb", [l.COLOR]: "color_type_color", [l.DEPTH]: "color_type_depth", [l.HEIGHT]: "color_type_height", [l.INTENSITY]: "color_type_intensity", [l.INTENSITY_GRADIENT]: "color_type_intensity_gradient", [l.LOD]: "color_type_lod", [l.POINT_INDEX]: "color_type_point_index", [l.CLASSIFICATION]: "color_type_classification", [l.RETURN_NUMBER]: "color_type_return_number", [l.SOURCE]: "color_type_source", [l.NORMAL]: "color_type_normal", [l.PHONG]: "color_type_phong", [l.RGB_HEIGHT]: "color_type_rgb_height", [l.COMPOSITE]: "color_type_composite" }, ie = { [i.DISABLED]: "clip_disabled", [i.CLIP_OUTSIDE]: "clip_outside", [i.HIGHLIGHT_INSIDE]: "clip_highlight_inside" }, ue = { [M.LINEAR]: "input_color_encoding_linear", [M.SRGB]: "input_color_encoding_sRGB" }, Oe = { [M.LINEAR]: "output_color_encoding_linear", [M.SRGB]: "output_color_encoding_sRGB" };
49171
+ const L = En(776).Z, U = En(746).Z, z = { [a.OCTREE]: "tree_type_octree", [a.KDTREE]: "tree_type_kdtree" }, X = { [n.FIXED]: "fixed_point_size", [n.ATTENUATED]: "attenuated_point_size", [n.ADAPTIVE]: "adaptive_point_size" }, j = { [o.ATTENUATED]: "attenuated_opacity", [o.FIXED]: "fixed_opacity" }, re = { [r.SQUARE]: "square_point_shape", [r.CIRCLE]: "circle_point_shape", [r.PARABOLOID]: "paraboloid_point_shape" }, Z = { [l.RGB]: "color_type_rgb", [l.COLOR]: "color_type_color", [l.DEPTH]: "color_type_depth", [l.HEIGHT]: "color_type_height", [l.INTENSITY]: "color_type_intensity", [l.INTENSITY_GRADIENT]: "color_type_intensity_gradient", [l.LOD]: "color_type_lod", [l.POINT_INDEX]: "color_type_point_index", [l.CLASSIFICATION]: "color_type_classification", [l.RETURN_NUMBER]: "color_type_return_number", [l.SOURCE]: "color_type_source", [l.NORMAL]: "color_type_normal", [l.PHONG]: "color_type_phong", [l.RGB_HEIGHT]: "color_type_rgb_height", [l.COMPOSITE]: "color_type_composite" }, ie = { [i.DISABLED]: "clip_disabled", [i.CLIP_OUTSIDE]: "clip_outside", [i.HIGHLIGHT_INSIDE]: "clip_highlight_inside" }, ue = { [M.LINEAR]: "input_color_encoding_linear", [M.SRGB]: "input_color_encoding_sRGB" }, Oe = { [M.LINEAR]: "output_color_encoding_linear", [M.SRGB]: "output_color_encoding_sRGB" };
49199
49172
  class ce extends s.RawShaderMaterial {
49200
49173
  constructor(A = {}) {
49201
49174
  super(), this.lights = !1, this.fog = !1, this.numClipBoxes = 0, this.clipBoxes = [], this.visibleNodeTextureOffsets = /* @__PURE__ */ new Map(), this._gradient = y, this.gradientTexture = E(this._gradient), this._classification = v, this.classificationTexture = S(this._classification), this.uniforms = { bbSize: Se("fv", [0, 0, 0]), blendDepthSupplement: Se("f", 0), blendHardness: Se("f", 2), classificationLUT: Se("t", this.classificationTexture || new s.Texture()), clipBoxCount: Se("f", 0), clipBoxes: Se("Matrix4fv", []), depthMap: Se("t", null), diffuse: Se("fv", [1, 1, 1]), fov: Se("f", 1), gradient: Se("t", this.gradientTexture || new s.Texture()), heightMax: Se("f", 1), heightMin: Se("f", 0), intensityBrightness: Se("f", 0), intensityContrast: Se("f", 0), intensityGamma: Se("f", 1), intensityRange: Se("fv", [0, 65e3]), isLeafNode: Se("b", 0), level: Se("f", 0), maxSize: Se("f", 50), minSize: Se("f", 2), octreeSize: Se("f", 0), opacity: Se("f", 1), pcIndex: Se("f", 0), rgbBrightness: Se("f", 0), rgbContrast: Se("f", 0), rgbGamma: Se("f", 1), screenHeight: Se("f", 1), screenWidth: Se("f", 1), size: Se("f", 1), spacing: Se("f", 1), toModel: Se("Matrix4f", []), transition: Se("f", 0.5), uColor: Se("c", new s.Color(16777215)), visibleNodes: Se("t", this.visibleNodesTexture || new s.Texture()), vnStart: Se("f", 0), wClassification: Se("f", 0), wElevation: Se("f", 0), wIntensity: Se("f", 0), wReturnNumber: Se("f", 0), wRGB: Se("f", 1), wSourceID: Se("f", 0), opacityAttenuation: Se("f", 1), filterByNormalThreshold: Se("f", 0), highlightedPointCoordinate: Se("fv", new s.Vector3()), highlightedPointColor: Se("fv", u.clone()), enablePointHighlighting: Se("b", !0), highlightedPointScale: Se("f", 2) }, this.useClipBox = !1, this.weighted = !1, this.pointColorType = l.RGB, this.pointSizeType = n.ADAPTIVE, this.clipMode = i.DISABLED, this.useEDL = !1, this.shape = r.SQUARE, this.treeType = a.OCTREE, this.pointOpacityType = o.FIXED, this.useFilterByNormal = !1, this.highlightPoint = !1, this.inputColorEncoding = M.SRGB, this.outputColorEncoding = M.LINEAR, this.attributes = { position: { type: "fv", value: [] }, color: { type: "fv", value: [] }, normal: { type: "fv", value: [] }, intensity: { type: "f", value: [] }, classification: { type: "f", value: [] }, returnNumber: { type: "f", value: [] }, numberOfReturns: { type: "f", value: [] }, pointSourceID: { type: "f", value: [] }, indices: { type: "fv", value: [] } };
@@ -49756,7 +49729,7 @@ var Ft = {};
49756
49729
  return !1;
49757
49730
  }
49758
49731
  }
49759
- const Ne = Pn(955).Z, Ke = Pn(325).Z;
49732
+ const Ne = En(955).Z, Ke = En(325).Z;
49760
49733
  var We;
49761
49734
  (function(k) {
49762
49735
  k.DECODER_WORKER_BROTLI = "DECODER_WORKER_BROTLI", k.DECODER_WORKER = "DECODER_WORKER";
@@ -50032,7 +50005,7 @@ var Ft = {};
50032
50005
  return !this.newerThan(A);
50033
50006
  }
50034
50007
  }
50035
- const Ze = Pn(417).Z;
50008
+ const Ze = En(417).Z;
50036
50009
  class lt {
50037
50010
  constructor({ getUrl: A = (J) => Promise.resolve(J), version: R, boundingBox: O, scale: F, xhrRequest: q }) {
50038
50011
  this.disposed = !1, this.workers = [], console.log([A, R, O, F, q]), this.version = typeof R == "string" ? new le(R) : R, this.xhrRequest = q, this.getUrl = A, this.boundingBox = O, this.scale = F, this.callbacks = [];
@@ -50662,7 +50635,7 @@ class D3 {
50662
50635
  v,
50663
50636
  () => {
50664
50637
  p += 1, p == f && (this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(
50665
- At.LOADED_SEPERATE_MODEL,
50638
+ Mt.LOADED_SEPERATE_MODEL,
50666
50639
  { modelId: d }
50667
50640
  ), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralVisibilityManager.enableScreenSpaceEdge(
50668
50641
  "shaded"
@@ -50670,7 +50643,7 @@ class D3 {
50670
50643
  },
50671
50644
  u
50672
50645
  ) : (p += 1, p == f && (this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(
50673
- At.LOADED_SEPERATE_MODEL,
50646
+ Mt.LOADED_SEPERATE_MODEL,
50674
50647
  { modelId: d }
50675
50648
  ), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralVisibilityManager.enableScreenSpaceEdge(
50676
50649
  "shaded"
@@ -50685,7 +50658,7 @@ class D3 {
50685
50658
  }
50686
50659
  };
50687
50660
  (a = this.viralViewerApi.viralGeometryHandler) != null && a.isGeneratingMergeModel ? this.viralViewerApi.on(
50688
- At.GENERATED_MERGE_MODEL,
50661
+ Mt.GENERATED_MERGE_MODEL,
50689
50662
  async () => {
50690
50663
  await r();
50691
50664
  }
@@ -50722,7 +50695,7 @@ class D3 {
50722
50695
  2 * x / 2,
50723
50696
  -(2 * x) / 2
50724
50697
  ));
50725
- const y = new ft(f, p);
50698
+ const y = new ut(f, p);
50726
50699
  await ((h = this.viralViewerApi.viralCamera.cameraControls) == null ? void 0 : h.fitToBox(
50727
50700
  y,
50728
50701
  !1
@@ -50744,7 +50717,7 @@ class D3 {
50744
50717
  T,
50745
50718
  a.Elements,
50746
50719
  () => {
50747
- this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(At.LOADED_SEPERATE_MODEL, {
50720
+ this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(Mt.LOADED_SEPERATE_MODEL, {
50748
50721
  modelId: T
50749
50722
  }), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), i();
50750
50723
  }
@@ -50755,7 +50728,7 @@ class D3 {
50755
50728
  }
50756
50729
  };
50757
50730
  (r = this.viralViewerApi.viralGeometryHandler) != null && r.isGeneratingMergeModel ? this.viralViewerApi.on(
50758
- At.GENERATED_MERGE_MODEL,
50731
+ Mt.GENERATED_MERGE_MODEL,
50759
50732
  async () => {
50760
50733
  await n();
50761
50734
  }
@@ -50813,7 +50786,7 @@ class D3 {
50813
50786
  2 * l / 2,
50814
50787
  -(2 * l) / 2
50815
50788
  ));
50816
- const c = new ft(t, i);
50789
+ const c = new ut(t, i);
50817
50790
  await ((p = this.viralViewerApi.viralCamera.cameraControls) == null ? void 0 : p.fitToBox(
50818
50791
  c,
50819
50792
  !1
@@ -51273,13 +51246,13 @@ function ln(s, e) {
51273
51246
  function _n(s, e) {
51274
51247
  return e[s + 6];
51275
51248
  }
51276
- function Rn(s, e) {
51249
+ function In(s, e) {
51277
51250
  return e[s + 14];
51278
51251
  }
51279
- function Dn(s) {
51252
+ function Rn(s) {
51280
51253
  return s + 8;
51281
51254
  }
51282
- function Ln(s, e) {
51255
+ function Dn(s, e) {
51283
51256
  return e[s + 6];
51284
51257
  }
51285
51258
  function Cb(s, e) {
@@ -51461,7 +51434,7 @@ const eI = function() {
51461
51434
  return !1;
51462
51435
  };
51463
51436
  }(), iI = ["x", "y", "z"], Bs = 1e-15, yv = Bs * Bs;
51464
- function Tn(s) {
51437
+ function An(s) {
51465
51438
  return Math.abs(s) < Bs;
51466
51439
  }
51467
51440
  class es extends vn {
@@ -51536,11 +51509,11 @@ es.prototype.intersectsTriangle = function() {
51536
51509
  }
51537
51510
  function v(x, y, _, w) {
51538
51511
  const T = y.degenerateSegment, E = x.plane.distanceToPoint(T.start), S = x.plane.distanceToPoint(T.end);
51539
- return Tn(E) ? Tn(S) ? u(x, y, _, w) : (_ && (_.start.copy(T.start), _.end.copy(T.start)), x.containsPoint(T.start)) : Tn(S) ? (_ && (_.start.copy(T.end), _.end.copy(T.end)), x.containsPoint(T.end)) : x.plane.intersectLine(T, i) != null ? (_ && (_.start.copy(i), _.end.copy(i)), x.containsPoint(i)) : !1;
51512
+ return An(E) ? An(S) ? u(x, y, _, w) : (_ && (_.start.copy(T.start), _.end.copy(T.start)), x.containsPoint(T.start)) : An(S) ? (_ && (_.start.copy(T.end), _.end.copy(T.end)), x.containsPoint(T.end)) : x.plane.intersectLine(T, i) != null ? (_ && (_.start.copy(i), _.end.copy(i)), x.containsPoint(i)) : !1;
51540
51513
  }
51541
51514
  function g(x, y, _) {
51542
51515
  const w = y.a;
51543
- return Tn(x.plane.distanceToPoint(w)) && x.containsPoint(w) ? (_ && (_.start.copy(w), _.end.copy(w)), !0) : !1;
51516
+ return An(x.plane.distanceToPoint(w)) && x.containsPoint(w) ? (_ && (_.start.copy(w), _.end.copy(w)), !0) : !1;
51544
51517
  }
51545
51518
  function m(x, y, _) {
51546
51519
  const w = x.degenerateSegment, T = y.a;
@@ -51552,13 +51525,13 @@ es.prototype.intersectsTriangle = function() {
51552
51525
  const T = x.degenerateSegment, E = y.degenerateSegment, S = n, M = r;
51553
51526
  T.delta(S), E.delta(M);
51554
51527
  const C = i.subVectors(E.start, T.start), L = S.x * M.y - S.y * M.x;
51555
- if (Tn(L))
51528
+ if (An(L))
51556
51529
  return !1;
51557
51530
  const U = (C.x * M.y - C.y * M.x) / L, z = -(S.x * C.y - S.y * C.x) / L;
51558
51531
  if (U < 0 || U > 1 || z < 0 || z > 1)
51559
51532
  return !1;
51560
51533
  const X = T.start.z + S.z * U, j = E.start.z + M.z * z;
51561
- return Tn(X - j) ? (_ && (_.start.copy(T.start).addScaledVector(S, U), _.end.copy(T.start).addScaledVector(S, U)), !0) : !1;
51534
+ return An(X - j) ? (_ && (_.start.copy(T.start).addScaledVector(S, U), _.end.copy(T.start).addScaledVector(S, U)), !0) : !1;
51562
51535
  } else
51563
51536
  return y.isDegenerateIntoPoint ? m(x, y, _) : v(y, x, _, w);
51564
51537
  else {
@@ -51577,12 +51550,12 @@ es.prototype.intersectsTriangle = function() {
51577
51550
  return T;
51578
51551
  const E = this.plane, S = y.plane;
51579
51552
  let M = S.distanceToPoint(this.a), C = S.distanceToPoint(this.b), L = S.distanceToPoint(this.c);
51580
- Tn(M) && (M = 0), Tn(C) && (C = 0), Tn(L) && (L = 0);
51553
+ An(M) && (M = 0), An(C) && (C = 0), An(L) && (L = 0);
51581
51554
  const U = M * C, z = M * L;
51582
51555
  if (U > 0 && z > 0)
51583
51556
  return !1;
51584
51557
  let X = E.distanceToPoint(y.a), j = E.distanceToPoint(y.b), re = E.distanceToPoint(y.c);
51585
- Tn(X) && (X = 0), Tn(j) && (j = 0), Tn(re) && (re = 0);
51558
+ An(X) && (X = 0), An(j) && (j = 0), An(re) && (re = 0);
51586
51559
  const Z = X * j, ie = X * re;
51587
51560
  if (Z > 0 && ie > 0)
51588
51561
  return !1;
@@ -51784,7 +51757,7 @@ class nI extends xm {
51784
51757
  super(() => new es());
51785
51758
  }
51786
51759
  }
51787
- const On = /* @__PURE__ */ new nI();
51760
+ const Ln = /* @__PURE__ */ new nI();
51788
51761
  class sI {
51789
51762
  constructor() {
51790
51763
  this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
@@ -51799,7 +51772,7 @@ class sI {
51799
51772
  }
51800
51773
  const Jt = new sI();
51801
51774
  let gr, oo;
51802
- const ja = [], Sh = /* @__PURE__ */ new xm(() => new ft());
51775
+ const ja = [], Sh = /* @__PURE__ */ new xm(() => new ut());
51803
51776
  function rI(s, e, t, i, n, r) {
51804
51777
  gr = Sh.getPrimitive(), oo = Sh.getPrimitive(), ja.push(gr, oo), Jt.setBuffer(s._roots[e]);
51805
51778
  const a = pp(0, s.geometry, t, i, n, r);
@@ -51811,23 +51784,23 @@ function pp(s, e, t, i, n = null, r = 0, a = 0) {
51811
51784
  const { float32Array: o, uint16Array: l, uint32Array: c } = Jt;
51812
51785
  let h = s * 2;
51813
51786
  if (ln(h, l)) {
51814
- const u = _n(s, c), f = Rn(h, l);
51787
+ const u = _n(s, c), f = In(h, l);
51815
51788
  return di(s, o, gr), i(u, f, !1, a, r + s, gr);
51816
51789
  } else {
51817
51790
  let M = function(L) {
51818
51791
  const { uint16Array: U, uint32Array: z } = Jt;
51819
51792
  let X = L * 2;
51820
51793
  for (; !ln(X, U); )
51821
- L = Dn(L), X = L * 2;
51794
+ L = Rn(L), X = L * 2;
51822
51795
  return _n(L, z);
51823
51796
  }, C = function(L) {
51824
51797
  const { uint16Array: U, uint32Array: z } = Jt;
51825
51798
  let X = L * 2;
51826
51799
  for (; !ln(X, U); )
51827
- L = Ln(L, z), X = L * 2;
51828
- return _n(L, z) + Rn(X, U);
51800
+ L = Dn(L, z), X = L * 2;
51801
+ return _n(L, z) + In(X, U);
51829
51802
  };
51830
- const u = Dn(s), f = Ln(s, c);
51803
+ const u = Rn(s), f = Dn(s, c);
51831
51804
  let p = u, v = f, g, m, b, x;
51832
51805
  if (n && (b = gr, x = oo, di(p, o, b), di(v, o, x), g = n(b), m = n(x), m < g)) {
51833
51806
  p = f, v = u;
@@ -51893,7 +51866,7 @@ function aI(s, e, t = {}, i = 0, n = 1 / 0) {
51893
51866
  const Mh = parseInt(Do) >= 169, oI = parseInt(Do) <= 161, Xr = /* @__PURE__ */ new P(), Hr = /* @__PURE__ */ new P(), Yr = /* @__PURE__ */ new P(), Ah = /* @__PURE__ */ new K(), Th = /* @__PURE__ */ new K(), Eh = /* @__PURE__ */ new K(), _v = /* @__PURE__ */ new P(), wv = /* @__PURE__ */ new P(), Sv = /* @__PURE__ */ new P(), hl = /* @__PURE__ */ new P();
51894
51867
  function lI(s, e, t, i, n, r, a, o) {
51895
51868
  let l;
51896
- if (r === Ki ? l = s.intersectTriangle(i, t, e, !0, n) : l = s.intersectTriangle(e, t, i, r !== pi, n), l === null)
51869
+ if (r === Ki ? l = s.intersectTriangle(i, t, e, !0, n) : l = s.intersectTriangle(e, t, i, r !== fi, n), l === null)
51897
51870
  return null;
51898
51871
  const c = s.origin.distanceTo(n);
51899
51872
  return c < a || c > o ? null : {
@@ -52044,12 +52017,12 @@ function vI(s, e, t, i, n, r, a) {
52044
52017
  function mp(s, e, t, i, n, r, a) {
52045
52018
  const { float32Array: o, uint16Array: l, uint32Array: c } = Jt, h = s * 2;
52046
52019
  if (ln(h, l)) {
52047
- const u = _n(s, c), f = Rn(h, l);
52020
+ const u = _n(s, c), f = In(h, l);
52048
52021
  hI(e, t, i, u, f, n, r, a);
52049
52022
  } else {
52050
- const u = Dn(s);
52023
+ const u = Rn(s);
52051
52024
  Tr(u, o, i, r, a) && mp(u, e, t, i, n, r, a);
52052
- const f = Ln(s, c);
52025
+ const f = Dn(s, c);
52053
52026
  Tr(f, o, i, r, a) && mp(f, e, t, i, n, r, a);
52054
52027
  }
52055
52028
  }
@@ -52063,12 +52036,12 @@ function gp(s, e, t, i, n, r) {
52063
52036
  const { float32Array: a, uint16Array: o, uint32Array: l } = Jt;
52064
52037
  let c = s * 2;
52065
52038
  if (ln(c, o)) {
52066
- const d = _n(s, l), u = Rn(c, o);
52039
+ const d = _n(s, l), u = In(c, o);
52067
52040
  return dI(e, t, i, d, u, n, r);
52068
52041
  } else {
52069
52042
  const d = Cb(s, l), u = xI[d], p = i.direction[u] >= 0;
52070
52043
  let v, g;
52071
- p ? (v = Dn(s), g = Ln(s, l)) : (v = Ln(s, l), g = Dn(s));
52044
+ p ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
52072
52045
  const b = Tr(v, a, i, n, r) ? gp(v, e, t, i, n, r) : null;
52073
52046
  if (b) {
52074
52047
  const _ = b.point[u];
@@ -52082,7 +52055,7 @@ function gp(s, e, t, i, n, r) {
52082
52055
  return b && y ? b.distance <= y.distance ? b : y : b || y || null;
52083
52056
  }
52084
52057
  }
52085
- const Ph = /* @__PURE__ */ new ft(), qa = /* @__PURE__ */ new es(), Za = /* @__PURE__ */ new es(), dl = /* @__PURE__ */ new Ce(), Mv = /* @__PURE__ */ new en(), Ch = /* @__PURE__ */ new en();
52058
+ const Ph = /* @__PURE__ */ new ut(), qa = /* @__PURE__ */ new es(), Za = /* @__PURE__ */ new es(), dl = /* @__PURE__ */ new Ce(), Mv = /* @__PURE__ */ new en(), Ch = /* @__PURE__ */ new en();
52086
52059
  function yI(s, e, t, i) {
52087
52060
  Jt.setBuffer(s._roots[e]);
52088
52061
  const n = vp(0, s, t, i);
@@ -52092,7 +52065,7 @@ function vp(s, e, t, i, n = null) {
52092
52065
  const { float32Array: r, uint16Array: a, uint32Array: o } = Jt;
52093
52066
  let l = s * 2;
52094
52067
  if (n === null && (t.boundingBox || t.computeBoundingBox(), Mv.set(t.boundingBox.min, t.boundingBox.max, i), n = Mv), ln(l, a)) {
52095
- const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = Rn(l, a);
52068
+ const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = In(l, a);
52096
52069
  if (dl.copy(i).invert(), t.boundsTree)
52097
52070
  return di(s, r, Ch), Ch.matrix.copy(dl), Ch.needsUpdate = !0, t.boundsTree.shapecast({
52098
52071
  intersectsBounds: (b) => Ch.intersectsBox(b),
@@ -52121,7 +52094,7 @@ function vp(s, e, t, i, n = null) {
52121
52094
  const Ih = /* @__PURE__ */ new Ce(), ef = /* @__PURE__ */ new en(), ul = /* @__PURE__ */ new en(), _I = /* @__PURE__ */ new P(), wI = /* @__PURE__ */ new P(), SI = /* @__PURE__ */ new P(), MI = /* @__PURE__ */ new P();
52122
52095
  function AI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52123
52096
  e.boundingBox || e.computeBoundingBox(), ef.set(e.boundingBox.min, e.boundingBox.max, t), ef.needsUpdate = !0;
52124
- const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = On.getPrimitive(), f = On.getPrimitive();
52097
+ const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
52125
52098
  let p = _I, v = wI, g = null, m = null;
52126
52099
  n && (g = SI, m = MI);
52127
52100
  let b = 1 / 0, x = null, y = null;
@@ -52160,7 +52133,7 @@ function AI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52160
52133
  }
52161
52134
  }
52162
52135
  }
52163
- ), On.releasePrimitive(u), On.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Ih), v.applyMatrix4(Ih), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52136
+ ), Ln.releasePrimitive(u), Ln.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Ih), v.applyMatrix4(Ih), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52164
52137
  }
52165
52138
  function TI(s, e = null) {
52166
52139
  e && Array.isArray(e) && (e = new Set(e));
@@ -52209,12 +52182,12 @@ function EI(s, e, t, i, n, r, a) {
52209
52182
  function xp(s, e, t, i, n, r, a) {
52210
52183
  const { float32Array: o, uint16Array: l, uint32Array: c } = Jt, h = s * 2;
52211
52184
  if (ln(h, l)) {
52212
- const u = _n(s, c), f = Rn(h, l);
52185
+ const u = _n(s, c), f = In(h, l);
52213
52186
  pI(e, t, i, u, f, n, r, a);
52214
52187
  } else {
52215
- const u = Dn(s);
52188
+ const u = Rn(s);
52216
52189
  Tr(u, o, i, r, a) && xp(u, e, t, i, n, r, a);
52217
- const f = Ln(s, c);
52190
+ const f = Dn(s, c);
52218
52191
  Tr(f, o, i, r, a) && xp(f, e, t, i, n, r, a);
52219
52192
  }
52220
52193
  }
@@ -52228,12 +52201,12 @@ function bp(s, e, t, i, n, r) {
52228
52201
  const { float32Array: a, uint16Array: o, uint32Array: l } = Jt;
52229
52202
  let c = s * 2;
52230
52203
  if (ln(c, o)) {
52231
- const d = _n(s, l), u = Rn(c, o);
52204
+ const d = _n(s, l), u = In(c, o);
52232
52205
  return mI(e, t, i, d, u, n, r);
52233
52206
  } else {
52234
52207
  const d = Cb(s, l), u = PI[d], p = i.direction[u] >= 0;
52235
52208
  let v, g;
52236
- p ? (v = Dn(s), g = Ln(s, l)) : (v = Ln(s, l), g = Dn(s));
52209
+ p ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
52237
52210
  const b = Tr(v, a, i, n, r) ? bp(v, e, t, i, n, r) : null;
52238
52211
  if (b) {
52239
52212
  const _ = b.point[u];
@@ -52247,7 +52220,7 @@ function bp(s, e, t, i, n, r) {
52247
52220
  return b && y ? b.distance <= y.distance ? b : y : b || y || null;
52248
52221
  }
52249
52222
  }
52250
- const Rh = /* @__PURE__ */ new ft(), $a = /* @__PURE__ */ new es(), Ka = /* @__PURE__ */ new es(), fl = /* @__PURE__ */ new Ce(), Av = /* @__PURE__ */ new en(), Dh = /* @__PURE__ */ new en();
52223
+ const Rh = /* @__PURE__ */ new ut(), $a = /* @__PURE__ */ new es(), Ka = /* @__PURE__ */ new es(), fl = /* @__PURE__ */ new Ce(), Av = /* @__PURE__ */ new en(), Dh = /* @__PURE__ */ new en();
52251
52224
  function II(s, e, t, i) {
52252
52225
  Jt.setBuffer(s._roots[e]);
52253
52226
  const n = yp(0, s, t, i);
@@ -52257,7 +52230,7 @@ function yp(s, e, t, i, n = null) {
52257
52230
  const { float32Array: r, uint16Array: a, uint32Array: o } = Jt;
52258
52231
  let l = s * 2;
52259
52232
  if (n === null && (t.boundingBox || t.computeBoundingBox(), Av.set(t.boundingBox.min, t.boundingBox.max, i), n = Av), ln(l, a)) {
52260
- const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = Rn(l, a);
52233
+ const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = In(l, a);
52261
52234
  if (fl.copy(i).invert(), t.boundsTree)
52262
52235
  return di(s, r, Dh), Dh.matrix.copy(fl), Dh.needsUpdate = !0, t.boundsTree.shapecast({
52263
52236
  intersectsBounds: (b) => Dh.intersectsBox(b),
@@ -52287,7 +52260,7 @@ function yp(s, e, t, i, n = null) {
52287
52260
  const Lh = /* @__PURE__ */ new Ce(), tf = /* @__PURE__ */ new en(), pl = /* @__PURE__ */ new en(), RI = /* @__PURE__ */ new P(), DI = /* @__PURE__ */ new P(), LI = /* @__PURE__ */ new P(), OI = /* @__PURE__ */ new P();
52288
52261
  function NI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52289
52262
  e.boundingBox || e.computeBoundingBox(), tf.set(e.boundingBox.min, e.boundingBox.max, t), tf.needsUpdate = !0;
52290
- const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = On.getPrimitive(), f = On.getPrimitive();
52263
+ const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
52291
52264
  let p = RI, v = DI, g = null, m = null;
52292
52265
  n && (g = LI, m = OI);
52293
52266
  let b = 1 / 0, x = null, y = null;
@@ -52330,12 +52303,12 @@ function NI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52330
52303
  }
52331
52304
  }
52332
52305
  }
52333
- ), On.releasePrimitive(u), On.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Lh), v.applyMatrix4(Lh), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52306
+ ), Ln.releasePrimitive(u), Ln.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Lh), v.applyMatrix4(Lh), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52334
52307
  }
52335
52308
  function BI() {
52336
52309
  return typeof SharedArrayBuffer < "u";
52337
52310
  }
52338
- const Ll = new Jt.constructor(), ld = new Jt.constructor(), or = new xm(() => new ft()), Ja = new ft(), eo = new ft(), nf = new ft(), sf = new ft();
52311
+ const Ll = new Jt.constructor(), ld = new Jt.constructor(), or = new xm(() => new ut()), Ja = new ut(), eo = new ut(), nf = new ut(), sf = new ut();
52339
52312
  let rf = !1;
52340
52313
  function UI(s, e, t, i) {
52341
52314
  if (rf)
@@ -52374,18 +52347,18 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52374
52347
  if (w && _)
52375
52348
  h ? T = n(
52376
52349
  _n(e, m),
52377
- Rn(e * 2, b),
52350
+ In(e * 2, b),
52378
52351
  _n(s, p),
52379
- Rn(s * 2, v),
52352
+ In(s * 2, v),
52380
52353
  l,
52381
52354
  a + e,
52382
52355
  o,
52383
52356
  r + s
52384
52357
  ) : T = n(
52385
52358
  _n(s, p),
52386
- Rn(s * 2, v),
52359
+ In(s * 2, v),
52387
52360
  _n(e, m),
52388
- Rn(e * 2, b),
52361
+ In(e * 2, b),
52389
52362
  o,
52390
52363
  r + s,
52391
52364
  l,
@@ -52394,7 +52367,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52394
52367
  else if (w) {
52395
52368
  const E = or.getPrimitive();
52396
52369
  di(e, g, E), E.applyMatrix4(t);
52397
- const S = Dn(s), M = Ln(s, p);
52370
+ const S = Rn(s), M = Dn(s, p);
52398
52371
  di(S, f, Ja), di(M, f, eo);
52399
52372
  const C = E.intersectsBox(Ja), L = E.intersectsBox(eo);
52400
52373
  T = C && Gn(
@@ -52423,7 +52396,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52423
52396
  !h
52424
52397
  ), or.releasePrimitive(E);
52425
52398
  } else {
52426
- const E = Dn(e), S = Ln(e, m);
52399
+ const E = Rn(e), S = Dn(e, m);
52427
52400
  di(E, g, nf), di(S, g, sf);
52428
52401
  const M = c.intersectsBox(nf), C = c.intersectsBox(sf);
52429
52402
  if (M && C)
@@ -52470,7 +52443,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52470
52443
  else {
52471
52444
  const L = or.getPrimitive();
52472
52445
  L.copy(nf).applyMatrix4(t);
52473
- const U = Dn(s), z = Ln(s, p);
52446
+ const U = Rn(s), z = Dn(s, p);
52474
52447
  di(U, f, Ja), di(z, f, eo);
52475
52448
  const X = L.intersectsBox(Ja), j = L.intersectsBox(eo);
52476
52449
  T = X && Gn(
@@ -52517,7 +52490,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52517
52490
  else {
52518
52491
  const L = or.getPrimitive();
52519
52492
  L.copy(sf).applyMatrix4(t);
52520
- const U = Dn(s), z = Ln(s, p);
52493
+ const U = Rn(s), z = Dn(s, p);
52521
52494
  di(U, f, Ja), di(z, f, eo);
52522
52495
  const X = L.intersectsBox(Ja), j = L.intersectsBox(eo);
52523
52496
  T = X && Gn(
@@ -52549,7 +52522,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52549
52522
  }
52550
52523
  return T;
52551
52524
  }
52552
- const Oh = /* @__PURE__ */ new en(), Tv = /* @__PURE__ */ new ft(), FI = {
52525
+ const Oh = /* @__PURE__ */ new en(), Tv = /* @__PURE__ */ new ut(), FI = {
52553
52526
  strategy: Tb,
52554
52527
  maxDepth: 40,
52555
52528
  maxLeafTris: 10,
@@ -52611,7 +52584,7 @@ class bm {
52611
52584
  [Zu]: !1
52612
52585
  }, t), t.useSharedArrayBuffer && !BI())
52613
52586
  throw new Error("MeshBVH: SharedArrayBuffer is not available.");
52614
- this.geometry = e, this._roots = null, this._indirectBuffer = null, t[Zu] || (J3(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new ft()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
52587
+ this.geometry = e, this._roots = null, this._indirectBuffer = null, t[Zu] || (J3(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new ut()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
52615
52588
  }
52616
52589
  refit(e = null) {
52617
52590
  return (this.indirect ? TI : fI)(this, e);
@@ -52631,7 +52604,7 @@ class bm {
52631
52604
  }
52632
52605
  }
52633
52606
  /* Core Cast Functions */
52634
- raycast(e, t = wn, i = 0, n = 1 / 0) {
52607
+ raycast(e, t = Un, i = 0, n = 1 / 0) {
52635
52608
  const r = this._roots, a = this.geometry, o = [], l = t.isMaterial, c = Array.isArray(t), h = a.groups, d = l ? t.side : t, u = this.indirect ? EI : vI;
52636
52609
  for (let f = 0, p = r.length; f < p; f++) {
52637
52610
  const v = c ? t[h[f].materialIndex].side : d, g = o.length;
@@ -52643,7 +52616,7 @@ class bm {
52643
52616
  }
52644
52617
  return o;
52645
52618
  }
52646
- raycastFirst(e, t = wn, i = 0, n = 1 / 0) {
52619
+ raycastFirst(e, t = Un, i = 0, n = 1 / 0) {
52647
52620
  const r = this._roots, a = this.geometry, o = t.isMaterial, l = Array.isArray(t);
52648
52621
  let c = null;
52649
52622
  const h = a.groups, d = o ? t.side : t, u = this.indirect ? CI : bI;
@@ -52661,7 +52634,7 @@ class bm {
52661
52634
  return i;
52662
52635
  }
52663
52636
  shapecast(e) {
52664
- const t = On.getPrimitive(), i = this.indirect ? gI : uI;
52637
+ const t = Ln.getPrimitive(), i = this.indirect ? gI : uI;
52665
52638
  let {
52666
52639
  boundsTraverseOrder: n,
52667
52640
  intersectsBounds: r,
@@ -52681,19 +52654,19 @@ class bm {
52681
52654
  break;
52682
52655
  c += f.byteLength;
52683
52656
  }
52684
- return On.releasePrimitive(t), l;
52657
+ return Ln.releasePrimitive(t), l;
52685
52658
  }
52686
52659
  bvhcast(e, t, i) {
52687
52660
  let {
52688
52661
  intersectsRanges: n,
52689
52662
  intersectsTriangles: r
52690
52663
  } = i;
52691
- const a = On.getPrimitive(), o = this.geometry.index, l = this.geometry.attributes.position, c = this.indirect ? (p) => {
52664
+ const a = Ln.getPrimitive(), o = this.geometry.index, l = this.geometry.attributes.position, c = this.indirect ? (p) => {
52692
52665
  const v = this.resolveTriangleIndex(p);
52693
52666
  bi(a, v * 3, o, l);
52694
52667
  } : (p) => {
52695
52668
  bi(a, p * 3, o, l);
52696
- }, h = On.getPrimitive(), d = e.geometry.index, u = e.geometry.attributes.position, f = e.indirect ? (p) => {
52669
+ }, h = Ln.getPrimitive(), d = e.geometry.index, u = e.geometry.attributes.position, f = e.indirect ? (p) => {
52697
52670
  const v = e.resolveTriangleIndex(p);
52698
52671
  bi(h, v * 3, d, u);
52699
52672
  } : (p) => {
@@ -52853,7 +52826,7 @@ class QI {
52853
52826
  }), this.outlineMaterial = new on({
52854
52827
  transparent: !0,
52855
52828
  opacity: 0
52856
- }), this.materials = [], this.mergeMaterials = [], this.originalColors = [], this.viralViewerApi.emit(At.LOADED_MATERIAL_MANAGER);
52829
+ }), this.materials = [], this.mergeMaterials = [], this.originalColors = [], this.viralViewerApi.emit(Mt.LOADED_MATERIAL_MANAGER);
52857
52830
  }
52858
52831
  /**
52859
52832
  * Checks if a material has a color property.
@@ -52882,15 +52855,15 @@ class QI {
52882
52855
  class jI {
52883
52856
  constructor() {
52884
52857
  this.events = {
52885
- [At.LOADED_SCENE]: [],
52886
- [At.LOADED_MATERIAL_MANAGER]: [],
52887
- [At.LOADED_RENDERER]: [],
52888
- [At.LOADED_CAMERA]: [],
52889
- [At.LOADED_CUBE]: [],
52890
- [At.LOADED_TOOLS]: [],
52891
- [At.LOADED_SEPERATE_MODEL]: [],
52892
- [At.GENERATED_MERGE_MODEL]: [],
52893
- [At.LOADED_DATA]: []
52858
+ [Mt.LOADED_SCENE]: [],
52859
+ [Mt.LOADED_MATERIAL_MANAGER]: [],
52860
+ [Mt.LOADED_RENDERER]: [],
52861
+ [Mt.LOADED_CAMERA]: [],
52862
+ [Mt.LOADED_CUBE]: [],
52863
+ [Mt.LOADED_TOOLS]: [],
52864
+ [Mt.LOADED_SEPERATE_MODEL]: [],
52865
+ [Mt.GENERATED_MERGE_MODEL]: [],
52866
+ [Mt.LOADED_DATA]: []
52894
52867
  };
52895
52868
  }
52896
52869
  /**
@@ -52922,43 +52895,43 @@ class jI {
52922
52895
  class qI {
52923
52896
  constructor(e, t) {
52924
52897
  this.viralViewerApi = e, this.options = t, this.viralViewerApi.on(
52925
- At.LOADED_SCENE,
52898
+ Mt.LOADED_SCENE,
52926
52899
  () => this.loadedScene()
52927
52900
  ), this.viralViewerApi.on(
52928
- At.LOADED_MATERIAL_MANAGER,
52901
+ Mt.LOADED_MATERIAL_MANAGER,
52929
52902
  () => this.loadedMaterialManager()
52930
52903
  ), this.viralViewerApi.on(
52931
- At.LOADED_RENDERER,
52904
+ Mt.LOADED_RENDERER,
52932
52905
  () => this.loadedRenderer()
52933
52906
  ), this.viralViewerApi.on(
52934
- At.LOADED_CAMERA,
52907
+ Mt.LOADED_CAMERA,
52935
52908
  () => this.loadedCamera()
52936
52909
  ), this.viralViewerApi.on(
52937
- At.LOADED_CUBE,
52910
+ Mt.LOADED_CUBE,
52938
52911
  () => this.loadedCube()
52939
52912
  ), this.viralViewerApi.on(
52940
- At.LOADED_TOOLS,
52913
+ Mt.LOADED_TOOLS,
52941
52914
  () => this.loadedTools()
52942
52915
  ), this.viralViewerApi.on(
52943
- At.LOADED_SEPERATE_MODEL,
52916
+ Mt.LOADED_SEPERATE_MODEL,
52944
52917
  (i) => this.loadedModels(i)
52945
52918
  );
52946
52919
  }
52947
52920
  loadedScene() {
52948
52921
  this.options.isDev && Ci.information("scene loaded!"), this.viralViewerApi.off(
52949
- At.LOADED_SCENE,
52922
+ Mt.LOADED_SCENE,
52950
52923
  () => this.loadedScene()
52951
52924
  );
52952
52925
  }
52953
52926
  loadedMaterialManager() {
52954
52927
  this.options.isDev && Ci.information("material manager loaded!"), this.viralViewerApi.off(
52955
- At.LOADED_MATERIAL_MANAGER,
52928
+ Mt.LOADED_MATERIAL_MANAGER,
52956
52929
  () => this.loadedMaterialManager()
52957
52930
  );
52958
52931
  }
52959
52932
  loadedRenderer() {
52960
52933
  this.options.isDev && Ci.information("renderer loaded!"), this.viralViewerApi.off(
52961
- At.LOADED_RENDERER,
52934
+ Mt.LOADED_RENDERER,
52962
52935
  () => this.loadedRenderer()
52963
52936
  );
52964
52937
  }
@@ -52967,13 +52940,13 @@ class qI {
52967
52940
  }
52968
52941
  loadedCube() {
52969
52942
  this.options.isDev && Ci.information("cube loaded!"), this.viralViewerApi.off(
52970
- At.LOADED_CUBE,
52943
+ Mt.LOADED_CUBE,
52971
52944
  () => this.loadedCube()
52972
52945
  );
52973
52946
  }
52974
52947
  loadedTools() {
52975
52948
  this.options.isDev && Ci.information("tools loaded!"), this.viralViewerApi.off(
52976
- At.LOADED_TOOLS,
52949
+ Mt.LOADED_TOOLS,
52977
52950
  () => this.loadedTools()
52978
52951
  );
52979
52952
  }
@@ -53003,7 +52976,7 @@ const Db = {
53003
52976
  };
53004
52977
  class KI {
53005
52978
  constructor(e) {
53006
- this.viralViewerApi = e, this.hoverMeshes = [], this.hoverInstancedMesh = null, this.selectedMeshes = [], this.selectedInstancedMeshes = [], this.isolateMeshes = [], this.isolateInstancedMeshes = [], this.hiddenMeshes = [], this.hiddenInstancedMeshes = [], this.exceptElements = [], this.isolateModelId = "0", this.sunConfiguration = Fb, this._ground = null, this.opacity = 1, this._fog = new md(13421772, 1, 1e3), this.rainGeometry = new dt(), this.rain = null, this._isGeneratedRain = !1, this._batchColors = /* @__PURE__ */ new Map(), this._originalBatchMaterials = /* @__PURE__ */ new Map(), this._batchVisualizationEnabled = !1, this.showHidePercentage = 100, this.randomColor = 100;
52979
+ this.viralViewerApi = e, this.hoverMeshes = [], this.hoverInstancedMesh = null, this.selectedMeshes = [], this.selectedInstancedMeshes = [], this.isolateMeshes = [], this.isolateInstancedMeshes = [], this.hiddenMeshes = [], this.hiddenInstancedMeshes = [], this.exceptElements = [], this.isolateModelId = "0", this.sunConfiguration = Fb, this._ground = null, this.opacity = 1, this._fog = new md(13421772, 1, 1e3), this.rainGeometry = new dt(), this.rain = null, this._isGeneratedRain = !1, this.ghostMode = !0, this._batchColors = /* @__PURE__ */ new Map(), this._originalBatchMaterials = /* @__PURE__ */ new Map(), this._batchVisualizationEnabled = !1, this.showHidePercentage = 100, this.randomColor = 100;
53007
52980
  }
53008
52981
  reverseColor() {
53009
52982
  var e, t;
@@ -53059,8 +53032,12 @@ class KI {
53059
53032
  }), e.hideObjects(), this.hiddenInstancedMeshes.push(e);
53060
53033
  }), (this.hiddenMeshes.length > 0 || this.hiddenInstancedMeshes.length > 0) && this.viralViewerApi.viralRenderer.render();
53061
53034
  }
53062
- hide2() {
53063
- this.viralViewerApi.viralMaterialManager.edgeMaterial.opacity = 0.05, this.viralViewerApi.viralScene.mergedModel.hide(), this.viralViewerApi.viralRenderer.render();
53035
+ /**
53036
+ *
53037
+ * @param elements default will get selected elements or we can input specific elements
53038
+ */
53039
+ hide2(e) {
53040
+ this.viralViewerApi.viralScene.mergedModel.hide(), this.viralViewerApi.viralRenderer.render();
53064
53041
  }
53065
53042
  /**
53066
53043
  * @deprecated using isolate2 instead
@@ -53083,12 +53060,27 @@ class KI {
53083
53060
  ), this.viralViewerApi.viralRenderer.render());
53084
53061
  }
53085
53062
  }
53063
+ /**
53064
+ *
53065
+ * @param elements default will get selected elements or we can input specific elements
53066
+ */
53086
53067
  isolate2(e) {
53087
- this.viralViewerApi.viralMaterialManager.edgeMaterial.opacity = 0.05, this.viralViewerApi.viralScene.mergedModel.isolate(e), this.viralViewerApi.viralRenderer.render();
53068
+ if (this.ghostMode) {
53069
+ this.ghostExcept(
53070
+ e || this.viralViewerApi.viralScene.mergedModel.getSelectedElements(),
53071
+ 0.101
53072
+ );
53073
+ return;
53074
+ }
53075
+ this.viralViewerApi.viralScene.mergedModel.isolate(e), this.viralViewerApi.viralRenderer.render();
53088
53076
  }
53089
- zoomTo() {
53077
+ /**
53078
+ *
53079
+ * @param elements default will get selected elements
53080
+ */
53081
+ zoomTo(e) {
53090
53082
  this.viralViewerApi.viralCamera.zoomTo(
53091
- this.viralViewerApi.viralScene.mergedModel.getSelectedElements()
53083
+ e || this.viralViewerApi.viralScene.mergedModel.getSelectedElements()
53092
53084
  );
53093
53085
  }
53094
53086
  //#region change color
@@ -53099,7 +53091,7 @@ class KI {
53099
53091
  * Select elements (replaces current selection)
53100
53092
  */
53101
53093
  selectElements(e) {
53102
- e.length > 0 && (this.viralViewerApi.emit(At.SELECT_ELEMENTS, e), this.viralViewerApi.viralScene.mergedModel.select(
53094
+ e.length > 0 && (this.viralViewerApi.emit(Mt.SELECT_ELEMENTS, e), this.viralViewerApi.viralScene.mergedModel.select(
53103
53095
  e,
53104
53096
  this.exceptElements
53105
53097
  ), this.viralViewerApi.viralRenderer.render());
@@ -53130,7 +53122,7 @@ class KI {
53130
53122
  * Unselect all elements
53131
53123
  */
53132
53124
  unselectElements() {
53133
- this.viralViewerApi.viralScene.mergedModel.unselect();
53125
+ this.viralViewerApi.viralScene.mergedModel.unselect(), this.viralViewerApi.emit(Mt.UNSELECT_ELEMENTS);
53134
53126
  }
53135
53127
  selectAllElements() {
53136
53128
  console.time("⏱️ selectAllElements - gathering elements");
@@ -53170,7 +53162,7 @@ class KI {
53170
53162
  this.viralViewerApi.viralScene.sunLight && (this.viralViewerApi.viralScene.sunLight.castShadow = !1), this.viralViewerApi.viralRenderer.render();
53171
53163
  }
53172
53164
  _adjustLightForMesh(e, t) {
53173
- const i = new ft().setFromObject(e), n = i.min, r = i.max, a = n.distanceTo(r), o = i.getCenter(new P()), l = t.shadow.camera;
53165
+ const i = new ut().setFromObject(e), n = i.min, r = i.max, a = n.distanceTo(r), o = i.getCenter(new P()), l = t.shadow.camera;
53174
53166
  l.left = -a / 2, l.right = a / 2, l.top = a / 2, l.bottom = -a / 2, l.near = 0.1, l.far = a + t.position.distanceTo(o), t.position.set(
53175
53167
  o.x + a / 2,
53176
53168
  o.y + a / 2,
@@ -53204,7 +53196,7 @@ class KI {
53204
53196
  r.forEach(
53205
53197
  (o) => o.applyMatrix4(e.shadow.camera.matrixWorldInverse)
53206
53198
  );
53207
- const a = new ft().setFromPoints(r);
53199
+ const a = new ut().setFromPoints(r);
53208
53200
  e.shadow.camera.left = a.min.x, e.shadow.camera.right = a.max.x, e.shadow.camera.top = a.min.y, e.shadow.camera.bottom = a.max.y, e.shadow.camera.near = Math.abs(a.max.z), e.shadow.camera.far = Math.abs(a.min.z), e.shadow.camera.updateProjectionMatrix(), this.viralViewerApi.viralRenderer.renderer.shadowMap.needsUpdate = !0;
53209
53201
  }
53210
53202
  //#endregion
@@ -53301,9 +53293,9 @@ class KI {
53301
53293
  if (this._ground)
53302
53294
  this._ground.visible = !0, this.viralViewerApi.viralRenderer.render();
53303
53295
  else {
53304
- let t = new ft();
53296
+ let t = new ut();
53305
53297
  if (e)
53306
- t = new ft().setFromObject(e);
53298
+ t = new ut().setFromObject(e);
53307
53299
  else {
53308
53300
  let l = [this.viralViewerApi.viralScene.mergedModel.bounds];
53309
53301
  t = Et.mergeBoundingBoxes(l);
@@ -53497,8 +53489,9 @@ class KI {
53497
53489
  window.innerHeight
53498
53490
  );
53499
53491
  }
53500
- //#endregion
53501
- //#region Element Opacity Control
53492
+ setGhostMode(e) {
53493
+ this.ghostMode = e;
53494
+ }
53502
53495
  /**
53503
53496
  * Set opacity for specific elements
53504
53497
  * @param elements - Elements to set opacity for
@@ -53527,10 +53520,10 @@ class KI {
53527
53520
  * @param ghostOpacity - Opacity for all other elements (default 0.1)
53528
53521
  */
53529
53522
  ghostExcept(e, t = 0.1) {
53530
- this.viralViewerApi.viralScene.mergedModel.ghostExcept(
53523
+ e.length > 0 && (this.viralViewerApi.viralScene.mergedModel.ghostExcept(
53531
53524
  e,
53532
53525
  t
53533
- ), this.viralViewerApi.viralRenderer.render();
53526
+ ), this.viralViewerApi.viralRenderer.render());
53534
53527
  }
53535
53528
  /**
53536
53529
  * Reset all elements to full opacity
@@ -54147,7 +54140,7 @@ class mR {
54147
54140
  `[DataManager] Adding ${i} elements to data tree...`
54148
54141
  );
54149
54142
  const n = new zb();
54150
- n.addElements(e), this.dataTree.push(n), this.viralViewerApi.emit(At.LOADED_DATA, { modelId: this.dataTree.length - 1 }), console.log(
54143
+ n.addElements(e), this.dataTree.push(n), this.viralViewerApi.emit(Mt.LOADED_DATA, { modelId: this.dataTree.length - 1 }), console.log(
54151
54144
  `[DataManager] Data tree created in ${(performance.now() - t).toFixed(2)}ms`
54152
54145
  ), console.log(`[DataManager] Total models loaded: ${this.dataTree.length}`);
54153
54146
  }
@@ -54852,7 +54845,7 @@ class SR {
54852
54845
  if (e.activate) {
54853
54846
  if (t) {
54854
54847
  if (t.visible = !0, this.viralTools.viralViewerApi.viralScene.models.length > 0) {
54855
- let i = new ft().setFromObject(
54848
+ let i = new ut().setFromObject(
54856
54849
  this.viralTools.viralViewerApi.viralScene.models[0]
54857
54850
  );
54858
54851
  const n = new P();
@@ -54980,7 +54973,7 @@ class MR {
54980
54973
  }
54981
54974
  ]
54982
54975
  }
54983
- ], this.items = [], this.viralToolAvatar = new bR(this), this.viralToolDarkMode = new yR(this), this.viralToolSunlight = new SR(this), this.viralToolElevation = new _R(this), this.viralToolMeasure = new wR(this), this.viralToolAmbientOcclusion = new xR(this), this.dehydratedCachedData(), this.executeToolsByDefault(), this.injectTools(), this.viralViewerApi.emit(At.LOADED_TOOLS);
54976
+ ], this.items = [], this.viralToolAvatar = new bR(this), this.viralToolDarkMode = new yR(this), this.viralToolSunlight = new SR(this), this.viralToolElevation = new _R(this), this.viralToolMeasure = new wR(this), this.viralToolAmbientOcclusion = new xR(this), this.dehydratedCachedData(), this.executeToolsByDefault(), this.injectTools(), this.viralViewerApi.emit(Mt.LOADED_TOOLS);
54984
54977
  }
54985
54978
  //#region Init
54986
54979
  injectTools() {
@@ -55150,7 +55143,7 @@ class ER {
55150
55143
  addPlanes() {
55151
55144
  const e = this.cubeScale;
55152
55145
  let t = new Ri({
55153
- side: pi,
55146
+ side: fi,
55154
55147
  color: 6659921,
55155
55148
  transparent: !0,
55156
55149
  opacity: 0,
@@ -55482,7 +55475,7 @@ class PR {
55482
55475
  class CR {
55483
55476
  //* view cube from third party (new approach)
55484
55477
  constructor(e, t = 1) {
55485
- this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.cubeScale = 1, this.cubeScale = Math.round(Math.max(0.1, Math.min(1, t)) * 10) / 10, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new ER(this, this.cubeScale), this.cubeRenderer = new TR(this), this.cubeCamera = new AR(this), this.cubeMouse = new PR(this)), this.viralViewerApi.emit(At.LOADED_CUBE);
55478
+ this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.cubeScale = 1, this.cubeScale = Math.round(Math.max(0.1, Math.min(1, t)) * 10) / 10, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new ER(this, this.cubeScale), this.cubeRenderer = new TR(this), this.cubeCamera = new AR(this), this.cubeMouse = new PR(this)), this.viralViewerApi.emit(Mt.LOADED_CUBE);
55486
55479
  }
55487
55480
  injectCubeWrapperElement() {
55488
55481
  if (this.viralViewerApi.targetElement) {
@@ -55732,7 +55725,7 @@ class OR {
55732
55725
  const a = new on({
55733
55726
  vertexColors: !0,
55734
55727
  // Enable vertex coloring
55735
- side: pi,
55728
+ side: fi,
55736
55729
  // Ensure both sides render colors
55737
55730
  opacity: r.opacity,
55738
55731
  transparent: r.transparent,
@@ -55751,14 +55744,14 @@ class OR {
55751
55744
  const o = new Fn(void 0, a);
55752
55745
  o.addBufferElements(i, r.color), o.castShadow = !0, o.receiveShadow = !0, this.viralViewerApi.viralScene.mergedModel.addMergedMesh(o), this.viralViewerApi.options.isDev && Ci.memory("after generate merge mesh");
55753
55746
  }
55754
- }), this.viralViewerApi.options.isDev && Ci.memory("merge model successfully!"), this.viralViewerApi.viralScene.mergedModel.setReady(!0), this.isGeneratingMergeModel = !1, console.log(this.viralViewerApi.viralScene.mergedModel.children), console.log("Time to generate model: ", performance.now() - e), this.viralViewerApi.emit(At.GENERATED_MERGE_MODEL);
55747
+ }), this.viralViewerApi.options.isDev && Ci.memory("merge model successfully!"), this.viralViewerApi.viralScene.mergedModel.setReady(!0), this.isGeneratingMergeModel = !1, console.log(this.viralViewerApi.viralScene.mergedModel.children), console.log("Time to generate model: ", performance.now() - e), this.viralViewerApi.emit(Mt.GENERATED_MERGE_MODEL);
55755
55748
  }
55756
55749
  }
55757
55750
  class NR {
55758
55751
  constructor(e) {
55759
55752
  this.viralViewerApi = e, this.planeEdges = null, this._isGenerated = !1, this.planeMaterial = new Ri({
55760
55753
  color: 16777215,
55761
- side: pi,
55754
+ side: fi,
55762
55755
  transparent: !0,
55763
55756
  opacity: 0.1
55764
55757
  // wireframe: true,
@@ -55769,7 +55762,7 @@ class NR {
55769
55762
  }
55770
55763
  createPlaneEdges() {
55771
55764
  this.planeEdges && this.viralViewerApi.viralScene.scene.remove(this.planeEdges);
55772
- const e = new ft().setFromObject(
55765
+ const e = new ut().setFromObject(
55773
55766
  this.viralViewerApi.viralScene.mergedModel
55774
55767
  ), t = e.min, i = e.max, n = [
55775
55768
  new qi(new P(1, 0, 0), Math.abs(t.x)),
@@ -58540,7 +58533,7 @@ export {
58540
58533
  _i as h,
58541
58534
  Ls as i,
58542
58535
  lo as j,
58543
- At as k,
58536
+ Mt as k,
58544
58537
  _m as l,
58545
58538
  Bb as m,
58546
58539
  wm as n,