@tomorrowevening/hermes 0.0.71 → 0.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hermes.es.js CHANGED
@@ -1,71 +1,80 @@
1
- import { EventDispatcher as pn, Texture as gn, CubeTexture as Hn, RepeatWrapping as qt, WebGLRenderTarget as Yn, Color as $t, FrontSide as Vn, BackSide as vn, DoubleSide as bn, NoBlending as qn, NormalBlending as Kn, AdditiveBlending as Xn, SubtractiveBlending as Zn, MultiplyBlending as Jn, CustomBlending as Qn, AddEquation as ea, SubtractEquation as ta, ReverseSubtractEquation as na, MinEquation as aa, MaxEquation as ia, ZeroFactor as yn, OneFactor as En, SrcColorFactor as xn, OneMinusSrcColorFactor as Sn, SrcAlphaFactor as Cn, OneMinusSrcAlphaFactor as wn, DstAlphaFactor as Mn, OneMinusDstAlphaFactor as On, DstColorFactor as Tn, OneMinusDstColorFactor as Rn, SrcAlphaSaturateFactor as ra, ConstantColorFactor as _n, OneMinusConstantColorFactor as kn, ConstantAlphaFactor as Dn, OneMinusConstantAlphaFactor as Pn, Matrix4 as sa, Vector3 as J, Euler as oa, Line as ca, BufferGeometry as Kt, Float32BufferAttribute as Xt, LineBasicMaterial as la, Mesh as An, MeshBasicMaterial as jn, Ray as ua, Plane as da, MathUtils as ha, MOUSE as nt, TOUCH as at, Quaternion as Zt, Spherical as Jt, Vector2 as me, ShaderMaterial as In, GLSL3 as fa, PlaneGeometry as ma, Scene as pa, Group as ga, AxesHelper as Qt, MeshDepthMaterial as va, MeshNormalMaterial as ba, WebGLRenderer as ya, PerspectiveCamera as At, Raycaster as Ea, OrthographicCamera as en, CameraHelper as xa, SpotLightHelper as Sa, PointLightHelper as Ca, HemisphereLightHelper as wa, DirectionalLightHelper as Ma } from "three";
2
- import { Pane as Oa } from "tweakpane";
3
- import * as Ta from "@tweakpane/plugin-essentials";
4
- import Nn, { useState as H, useRef as Y, useEffect as Re, useMemo as se, forwardRef as Ra } from "react";
5
- import { Reorder as Ln } from "framer-motion";
6
- const zt = () => {
7
- }, Di = () => {
1
+ import { EventDispatcher as mn, Texture as pn, CubeTexture as Wn, RepeatWrapping as Vt, WebGLRenderTarget as Hn, Color as Ut, FrontSide as Yn, BackSide as gn, DoubleSide as vn, NoBlending as Vn, NormalBlending as qn, AdditiveBlending as Kn, SubtractiveBlending as Xn, MultiplyBlending as Zn, CustomBlending as Jn, AddEquation as Qn, SubtractEquation as ea, ReverseSubtractEquation as ta, MinEquation as na, MaxEquation as aa, ZeroFactor as bn, OneFactor as yn, SrcColorFactor as En, OneMinusSrcColorFactor as xn, SrcAlphaFactor as Sn, OneMinusSrcAlphaFactor as Cn, DstAlphaFactor as wn, OneMinusDstAlphaFactor as Mn, DstColorFactor as On, OneMinusDstColorFactor as Tn, SrcAlphaSaturateFactor as ia, ConstantColorFactor as Rn, OneMinusConstantColorFactor as _n, ConstantAlphaFactor as kn, OneMinusConstantAlphaFactor as Dn, Matrix4 as ra, Vector3 as J, Euler as sa, Line as oa, BufferGeometry as qt, Float32BufferAttribute as Kt, LineBasicMaterial as ca, Mesh as Pn, MeshBasicMaterial as An, Ray as la, Plane as ua, MathUtils as da, MOUSE as it, TOUCH as rt, Quaternion as Xt, Spherical as Zt, Vector2 as pe, ShaderMaterial as jn, GLSL3 as ha, PlaneGeometry as fa, Scene as ma, Group as pa, AxesHelper as Jt, MeshDepthMaterial as ga, MeshNormalMaterial as va, WebGLRenderer as ba, PerspectiveCamera as Pt, Raycaster as ya, OrthographicCamera as Qt, CameraHelper as Ea, SpotLightHelper as xa, PointLightHelper as Sa, HemisphereLightHelper as Ca, DirectionalLightHelper as wa } from "three";
2
+ import { Pane as Ma } from "tweakpane";
3
+ import * as Oa from "@tweakpane/plugin-essentials";
4
+ import In, { useState as G, useRef as Y, useEffect as Re, useMemo as se, forwardRef as Ta } from "react";
5
+ import { Reorder as Nn } from "framer-motion";
6
+ const $t = () => {
7
+ }, ki = () => {
8
8
  };
9
- function Ot(e) {
9
+ function Mt(e) {
10
10
  return e.substring(0, 1).toUpperCase() + e.substring(1);
11
11
  }
12
- function Ke(e, n, a) {
12
+ function Je(e, n, a) {
13
13
  return Math.min(n, Math.max(e, a));
14
14
  }
15
- function tn(e, n, a) {
15
+ function en(e, n, a) {
16
16
  return (a - e) / (n - e);
17
17
  }
18
- function nn(e, n, a) {
18
+ function tn(e, n, a) {
19
19
  return e * (1 - a) + n * a;
20
20
  }
21
- function Pi(e, n) {
21
+ function Di(e, n) {
22
22
  const a = e - n;
23
23
  return Math.sqrt(a * a);
24
24
  }
25
- function _a() {
25
+ function Ra() {
26
26
  return Math.round(Math.random() * 1e6).toString();
27
27
  }
28
- function ka(e) {
28
+ function _a(e) {
29
29
  return e.r !== void 0 && e.g !== void 0 && e.b !== void 0;
30
30
  }
31
- function Da(e) {
31
+ function ka(e) {
32
32
  const n = Math.round(e.r * 255), a = Math.round(e.g * 255), t = Math.round(e.b * 255), i = (h) => {
33
33
  const u = h.toString(16);
34
34
  return u.length === 1 ? "0" + u : u;
35
35
  }, o = i(n), d = i(a), r = i(t);
36
36
  return "#" + o + d + r;
37
37
  }
38
- function an(e, n = 1) {
38
+ function nn(e, n = 1) {
39
39
  return Number(e.toFixed(n));
40
40
  }
41
- let Lt = 0;
42
- const rn = () => {
43
- Lt = 0;
44
- }, Bt = (e) => {
41
+ let Nt = 0;
42
+ const an = () => {
43
+ Nt = 0;
44
+ }, Lt = (e) => {
45
45
  if (!e)
46
46
  return;
47
47
  let n = e.name.replaceAll(" ", "").replaceAll("/", ".");
48
- n.length === 0 && (n = `obj_${Lt}`, Lt++), e.parent !== null && e.parent.uuid.length > 0 && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.children.forEach((a) => {
49
- Bt(a);
50
- });
51
- }, Ai = (e) => {
48
+ if (n.length === 0 && (n = `obj_${Nt}`, Nt++), e.parent !== null && e.parent.uuid.length > 0 && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.isMesh !== void 0) {
49
+ const a = e;
50
+ if (Array.isArray(a.material))
51
+ a.material.forEach((t, i) => {
52
+ t.uuid = `${n}.material.${i}`;
53
+ });
54
+ else {
55
+ const t = a.material;
56
+ t.uuid = `${n}.material`;
57
+ }
58
+ }
59
+ e.children.forEach((a) => Lt(a));
60
+ }, Pi = (e) => {
52
61
  e?.dispose();
53
- }, Pa = (e) => {
62
+ }, Da = (e) => {
54
63
  e && (Array.isArray(e) ? e.forEach((n) => n.dispose()) : e.dispose());
55
- }, Tt = (e) => {
64
+ }, Ot = (e) => {
56
65
  if (e) {
57
66
  for (; e.children.length > 0; ) {
58
67
  const n = e.children[0];
59
- n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : Tt(n);
68
+ n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : Ot(n);
60
69
  }
61
70
  if (e.parent && e.parent.remove(e), e.isMesh) {
62
71
  const n = e;
63
- n.geometry?.dispose(), Pa(n.material);
72
+ n.geometry?.dispose(), Da(n.material);
64
73
  }
65
74
  e.dispose !== void 0 && e.dispose();
66
75
  }
67
76
  };
68
- class ji {
77
+ class Ai {
69
78
  components = /* @__PURE__ */ new Map();
70
79
  listen;
71
80
  // Protected
@@ -123,7 +132,7 @@ class ji {
123
132
  n && (this._mode = "editor");
124
133
  }
125
134
  }
126
- const D = new pn(), P = {
135
+ const D = new mn(), P = {
127
136
  CUSTOM: "ToolEvents::custom",
128
137
  // Components
129
138
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -141,7 +150,7 @@ const D = new pn(), P = {
141
150
  ADD_CAMERA: "ToolEvents::addCamera",
142
151
  REMOVE_CAMERA: "ToolEvents::removeCamera"
143
152
  };
144
- class Rt {
153
+ class Tt {
145
154
  app;
146
155
  constructor(n) {
147
156
  this.app = n;
@@ -153,7 +162,7 @@ class Rt {
153
162
  handleEditor(n, a, t) {
154
163
  }
155
164
  }
156
- class Ii extends Rt {
165
+ class ji extends Tt {
157
166
  selectDropdown(n, a) {
158
167
  this.app.send({
159
168
  event: "selectComponent",
@@ -185,7 +194,7 @@ class Ii extends Rt {
185
194
  }
186
195
  }
187
196
  }
188
- class Gt extends Rt {
197
+ class zt extends Tt {
189
198
  project;
190
199
  sheets = /* @__PURE__ */ new Map();
191
200
  sheetObjects = /* @__PURE__ */ new Map();
@@ -245,12 +254,12 @@ class Gt extends Rt {
245
254
  return;
246
255
  const h = `${this.getSheetInstance(n, o)}_${a}`;
247
256
  let u = this.sheetObjects.get(h);
248
- u !== void 0 ? u = d.object(a, { ...t, ...u.value }, { reconfigure: !0 }) : u = d.object(a, t), this.sheetObjects.set(h, u), this.sheetObjectCBs.set(h, i !== void 0 ? i : zt);
257
+ u !== void 0 ? u = d.object(a, { ...t, ...u.value }, { reconfigure: !0 }) : u = d.object(a, t), this.sheetObjects.set(h, u), this.sheetObjectCBs.set(h, i !== void 0 ? i : $t);
249
258
  const f = u.onValuesChange((m) => {
250
259
  if (this.app.editor) {
251
260
  for (const S in m) {
252
261
  const A = m[S];
253
- typeof A == "object" && ka(A) && (m[S] = {
262
+ typeof A == "object" && _a(A) && (m[S] = {
254
263
  r: A.r,
255
264
  g: A.g,
256
265
  b: A.b,
@@ -267,8 +276,8 @@ class Gt extends Rt {
267
276
  }
268
277
  });
269
278
  }
270
- const v = this.sheetObjectCBs.get(h);
271
- v !== void 0 && v(m);
279
+ const g = this.sheetObjectCBs.get(h);
280
+ g !== void 0 && g(m);
272
281
  });
273
282
  return this.sheetObjectUnsubscribe.set(h, f), u;
274
283
  }
@@ -337,7 +346,7 @@ class Gt extends Rt {
337
346
  });
338
347
  let t = -1;
339
348
  const i = () => {
340
- if (Gt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && t !== a.activeSheet.sequence.position) {
349
+ if (zt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && t !== a.activeSheet.sequence.position) {
341
350
  t = a.activeSheet.sequence.position;
342
351
  const d = a.activeSheet;
343
352
  n.send({
@@ -357,7 +366,7 @@ class Gt extends Rt {
357
366
  this.studio?.ui.hide();
358
367
  }
359
368
  }
360
- function Ni(e, n, a) {
369
+ function Ii(e, n, a) {
361
370
  if (e.editor) {
362
371
  a.ui.restore(), a.onSelectionChange((d) => {
363
372
  d.length < 1 || d.forEach((r) => {
@@ -381,7 +390,7 @@ function Ni(e, n, a) {
381
390
  });
382
391
  let t = -1;
383
392
  const i = () => {
384
- if (Gt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
393
+ if (zt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
385
394
  t = n.activeSheet.sequence.position;
386
395
  const d = n.activeSheet;
387
396
  e.send({
@@ -400,7 +409,7 @@ function Ni(e, n, a) {
400
409
  } else
401
410
  a.ui.hide();
402
411
  }
403
- function Aa(e) {
412
+ function Pa(e) {
404
413
  if (e.name === "cameras")
405
414
  return "camera";
406
415
  if (e.name === "interactive")
@@ -414,7 +423,7 @@ function Aa(e) {
414
423
  const n = e.type;
415
424
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
416
425
  }
417
- function Ct(e) {
426
+ function St(e) {
418
427
  const n = {
419
428
  name: e.name,
420
429
  type: e.type,
@@ -422,10 +431,10 @@ function Ct(e) {
422
431
  children: []
423
432
  };
424
433
  return e.children.forEach((a) => {
425
- n.children.push(Ct(a));
434
+ n.children.push(St(a));
426
435
  }), n;
427
436
  }
428
- function ja(e) {
437
+ function Aa(e) {
429
438
  const n = {};
430
439
  for (const a in e) {
431
440
  const t = e[a].value;
@@ -441,7 +450,7 @@ function ja(e) {
441
450
  }
442
451
  return n;
443
452
  }
444
- function Ia(e) {
453
+ function ja(e) {
445
454
  switch (e) {
446
455
  case "blendSrcAlpha":
447
456
  case "blendDstAlpha":
@@ -453,10 +462,10 @@ function Ia(e) {
453
462
  }
454
463
  return !1;
455
464
  }
456
- function it(e) {
465
+ function st(e) {
457
466
  const n = {};
458
467
  for (const a in e) {
459
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ia(a))
468
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ja(a))
460
469
  continue;
461
470
  const t = typeof e[a], i = e[a];
462
471
  switch (t) {
@@ -468,7 +477,7 @@ function it(e) {
468
477
  case "object":
469
478
  if (i !== null)
470
479
  if (n[a] = i, i.isTexture)
471
- if (i instanceof gn) {
480
+ if (i instanceof pn) {
472
481
  const d = i.source.toJSON().url;
473
482
  n[a] = {
474
483
  src: d,
@@ -476,13 +485,13 @@ function it(e) {
476
485
  repeat: [i.repeat.x, i.repeat.y]
477
486
  };
478
487
  } else
479
- i instanceof Hn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = {
488
+ i instanceof Wn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = {
480
489
  src: "",
481
490
  offset: [i.offset.x, i.offset.y],
482
491
  repeat: [i.repeat.x, i.repeat.y]
483
492
  });
484
493
  else
485
- a === "uniforms" && (n[a] = ja(n[a]));
494
+ a === "uniforms" && (n[a] = Aa(n[a]));
486
495
  else
487
496
  n[a] = {
488
497
  src: "",
@@ -494,7 +503,7 @@ function it(e) {
494
503
  }
495
504
  return n;
496
505
  }
497
- function jt(e) {
506
+ function At(e) {
498
507
  e.updateMatrix();
499
508
  const n = {
500
509
  name: e.name,
@@ -522,28 +531,28 @@ function jt(e) {
522
531
  if (Array.isArray(t.material)) {
523
532
  const i = [];
524
533
  t.material.forEach((o) => {
525
- i.push(it(o));
534
+ i.push(st(o));
526
535
  }), n.material = i;
527
536
  } else
528
- n.material = it(t.material);
537
+ n.material = st(t.material);
529
538
  } else if (a.search("points") > -1) {
530
539
  const t = e;
531
540
  if (Array.isArray(t.material)) {
532
541
  const i = [];
533
542
  t.material.forEach((o) => {
534
- i.push(it(o));
543
+ i.push(st(o));
535
544
  }), n.material = i;
536
545
  } else
537
- n.material = it(t.material);
546
+ n.material = st(t.material);
538
547
  } else if (a.search("line") > -1) {
539
548
  const t = e;
540
549
  if (Array.isArray(t.material)) {
541
550
  const i = [];
542
551
  t.material.forEach((o) => {
543
- i.push(it(o));
552
+ i.push(st(o));
544
553
  }), n.material = i;
545
554
  } else
546
- n.material = it(t.material);
555
+ n.material = st(t.material);
547
556
  } else
548
557
  a.search("camera") > -1 ? e.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
549
558
  fov: e.fov,
@@ -575,7 +584,7 @@ function jt(e) {
575
584
  });
576
585
  return n;
577
586
  }
578
- function Na(e, n) {
587
+ function Ia(e, n) {
579
588
  const a = n.split(".");
580
589
  switch (a.length) {
581
590
  case 1:
@@ -592,11 +601,11 @@ function Na(e, n) {
592
601
  return e[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
593
602
  }
594
603
  }
595
- function La(e, n) {
604
+ function Na(e, n) {
596
605
  for (const a in n)
597
606
  e[a] = n[a];
598
607
  }
599
- function ee(e, n, a) {
608
+ function te(e, n, a) {
600
609
  if (e === void 0) {
601
610
  console.log(`Hermes - Can't set props: ${n}`, a);
602
611
  return;
@@ -639,27 +648,27 @@ function ee(e, n, a) {
639
648
  d = e[t[0]][t[1]][t[2]][t[3]][t[4]];
640
649
  break;
641
650
  }
642
- d != null && La(d, a);
651
+ d != null && Na(d, a);
643
652
  }
644
653
  }
645
- function Bn(e) {
654
+ function Ln(e) {
646
655
  return new Promise((n, a) => {
647
656
  const t = new Image();
648
657
  t.onload = () => {
649
- const i = new gn(t);
650
- i.wrapS = qt, i.wrapT = qt, i.needsUpdate = !0, n(i);
658
+ const i = new pn(t);
659
+ i.wrapS = Vt, i.wrapT = Vt, i.needsUpdate = !0, n(i);
651
660
  }, t.onerror = a, t.src = e;
652
661
  });
653
662
  }
654
- class Li extends Rt {
663
+ class Ni extends Tt {
655
664
  scene = void 0;
656
665
  scenes = /* @__PURE__ */ new Map();
657
666
  renderer = void 0;
658
667
  renderTargets = /* @__PURE__ */ new Map();
659
668
  dispose() {
660
669
  this.scenes.forEach((n) => {
661
- Tt(n);
662
- }), this.scenes.clear(), this.scene && Tt(this.scene), this.renderTargets.forEach((n) => {
670
+ Ot(n);
671
+ }), this.scenes.clear(), this.scene && Ot(this.scene), this.renderTargets.forEach((n) => {
663
672
  n.dispose();
664
673
  }), this.renderTargets.clear(), this.renderer?.dispose();
665
674
  }
@@ -671,7 +680,7 @@ class Li extends Rt {
671
680
  });
672
681
  }
673
682
  setObject(n) {
674
- const a = jt(n);
683
+ const a = At(n);
675
684
  this.app.send({
676
685
  event: "setObject",
677
686
  target: "editor",
@@ -715,8 +724,8 @@ class Li extends Rt {
715
724
  addScene(n) {
716
725
  if (n === void 0 || (this.scenes.set(n.name, n), !this.app.debugEnabled))
717
726
  return;
718
- rn(), Bt(n);
719
- const a = Ct(n);
727
+ an(), Lt(n);
728
+ const a = St(n);
720
729
  this.app.send({
721
730
  event: "addScene",
722
731
  target: "editor",
@@ -726,7 +735,7 @@ class Li extends Rt {
726
735
  removeScene(n) {
727
736
  if (n === void 0 || (this.scenes.delete(n.name), !this.app.debugEnabled))
728
737
  return;
729
- const a = Ct(n);
738
+ const a = St(n);
730
739
  this.app.send({
731
740
  event: "removeScene",
732
741
  target: "editor",
@@ -745,8 +754,8 @@ class Li extends Rt {
745
754
  setScene(n) {
746
755
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
747
756
  return;
748
- rn(), Bt(n);
749
- const a = Ct(n);
757
+ an(), Lt(n);
758
+ const a = St(n);
750
759
  this.app.send({
751
760
  event: "setScene",
752
761
  target: "editor",
@@ -756,7 +765,7 @@ class Li extends Rt {
756
765
  addCamera(n) {
757
766
  if (!this.app.debugEnabled)
758
767
  return;
759
- const a = jt(n);
768
+ const a = At(n);
760
769
  this.app.send({
761
770
  event: "addCamera",
762
771
  target: "editor",
@@ -766,7 +775,7 @@ class Li extends Rt {
766
775
  removeCamera(n) {
767
776
  if (!this.app.debugEnabled)
768
777
  return;
769
- const a = jt(n);
778
+ const a = At(n);
770
779
  this.app.send({
771
780
  event: "removeCamera",
772
781
  target: "editor",
@@ -815,7 +824,7 @@ class Li extends Rt {
815
824
  rendererWidth = 300;
816
825
  rendererHeight = 150;
817
826
  addRT(n, a) {
818
- const t = new Yn(32, 32, a);
827
+ const t = new Hn(32, 32, a);
819
828
  t.texture.name = n, this.renderTargets.set(n, t);
820
829
  }
821
830
  resize(n, a) {
@@ -825,7 +834,7 @@ class Li extends Rt {
825
834
  }), this.renderer?.setSize(n, a);
826
835
  }
827
836
  set dpr(n) {
828
- this.renderer?.setPixelRatio(Ke(1, 2, n));
837
+ this.renderer?.setPixelRatio(Je(1, 2, n));
829
838
  }
830
839
  get dpr() {
831
840
  return this.renderer !== void 0 ? this.renderer?.getPixelRatio() : 1;
@@ -840,7 +849,7 @@ class Li extends Rt {
840
849
  return this.renderer !== void 0 ? this.renderer?.domElement : null;
841
850
  }
842
851
  }
843
- class Bi extends Rt {
852
+ class Li extends Tt {
844
853
  bindCBs;
845
854
  buttonCBs;
846
855
  pane = void 0;
@@ -851,7 +860,7 @@ class Bi extends Rt {
851
860
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
852
861
  }
853
862
  createGUI() {
854
- this.pane = new Oa({ title: "GUI" }), this.pane.registerPlugin(Ta);
863
+ this.pane = new Ma({ title: "GUI" }), this.pane.registerPlugin(Oa);
855
864
  }
856
865
  dispose() {
857
866
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
@@ -877,7 +886,7 @@ class Bi extends Rt {
877
886
  }
878
887
  // Binding
879
888
  bind(n, a, t, i = void 0) {
880
- const o = this.bindID, d = t.onChange !== void 0 ? t.onChange : zt;
889
+ const o = this.bindID, d = t.onChange !== void 0 ? t.onChange : $t;
881
890
  this.bindCBs.set(o, d), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, t).on("change", (h) => {
882
891
  this.app.send({
883
892
  event: "updateBind",
@@ -958,7 +967,7 @@ class Bi extends Rt {
958
967
  }
959
968
  }
960
969
  }
961
- var Ft = { exports: {} }, lt = {};
970
+ var Bt = { exports: {} }, dt = {};
962
971
  /**
963
972
  * @license React
964
973
  * react-jsx-runtime.production.min.js
@@ -968,25 +977,25 @@ var Ft = { exports: {} }, lt = {};
968
977
  * This source code is licensed under the MIT license found in the
969
978
  * LICENSE file in the root directory of this source tree.
970
979
  */
971
- var sn;
972
- function Ba() {
973
- if (sn)
974
- return lt;
975
- sn = 1;
976
- var e = Nn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
980
+ var rn;
981
+ function La() {
982
+ if (rn)
983
+ return dt;
984
+ rn = 1;
985
+ var e = In, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
977
986
  function d(r, h, u) {
978
- var f, m = {}, v = null, S = null;
979
- u !== void 0 && (v = "" + u), h.key !== void 0 && (v = "" + h.key), h.ref !== void 0 && (S = h.ref);
987
+ var f, m = {}, g = null, S = null;
988
+ u !== void 0 && (g = "" + u), h.key !== void 0 && (g = "" + h.key), h.ref !== void 0 && (S = h.ref);
980
989
  for (f in h)
981
990
  t.call(h, f) && !o.hasOwnProperty(f) && (m[f] = h[f]);
982
991
  if (r && r.defaultProps)
983
992
  for (f in h = r.defaultProps, h)
984
993
  m[f] === void 0 && (m[f] = h[f]);
985
- return { $$typeof: n, type: r, key: v, ref: S, props: m, _owner: i.current };
994
+ return { $$typeof: n, type: r, key: g, ref: S, props: m, _owner: i.current };
986
995
  }
987
- return lt.Fragment = a, lt.jsx = d, lt.jsxs = d, lt;
996
+ return dt.Fragment = a, dt.jsx = d, dt.jsxs = d, dt;
988
997
  }
989
- var ut = {};
998
+ var ht = {};
990
999
  /**
991
1000
  * @license React
992
1001
  * react-jsx-runtime.development.js
@@ -996,57 +1005,57 @@ var ut = {};
996
1005
  * This source code is licensed under the MIT license found in the
997
1006
  * LICENSE file in the root directory of this source tree.
998
1007
  */
999
- var on;
1000
- function Fa() {
1001
- return on || (on = 1, process.env.NODE_ENV !== "production" && function() {
1002
- var e = Nn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), r = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), A = Symbol.iterator, F = "@@iterator";
1008
+ var sn;
1009
+ function Ba() {
1010
+ return sn || (sn = 1, process.env.NODE_ENV !== "production" && function() {
1011
+ var e = In, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), r = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), A = Symbol.iterator, N = "@@iterator";
1003
1012
  function V(s) {
1004
1013
  if (s === null || typeof s != "object")
1005
1014
  return null;
1006
- var p = A && s[A] || s[F];
1015
+ var p = A && s[A] || s[N];
1007
1016
  return typeof p == "function" ? p : null;
1008
1017
  }
1009
1018
  var R = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1010
- function I(s) {
1019
+ function L(s) {
1011
1020
  {
1012
- for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), w = 1; w < p; w++)
1013
- y[w - 1] = arguments[w];
1021
+ for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), C = 1; C < p; C++)
1022
+ y[C - 1] = arguments[C];
1014
1023
  T("error", s, y);
1015
1024
  }
1016
1025
  }
1017
1026
  function T(s, p, y) {
1018
1027
  {
1019
- var w = R.ReactDebugCurrentFrame, $ = w.getStackAddendum();
1028
+ var C = R.ReactDebugCurrentFrame, $ = C.getStackAddendum();
1020
1029
  $ !== "" && (p += "%s", y = y.concat([$]));
1021
- var W = y.map(function(L) {
1022
- return String(L);
1030
+ var W = y.map(function(B) {
1031
+ return String(B);
1023
1032
  });
1024
1033
  W.unshift("Warning: " + p), Function.prototype.apply.call(console[s], console, W);
1025
1034
  }
1026
1035
  }
1027
- var Z = !1, te = !1, pe = !1, q = !1, ge = !1, ce;
1028
- ce = Symbol.for("react.module.reference");
1036
+ var X = !1, ne = !1, ge = !1, q = !1, ve = !1, le;
1037
+ le = Symbol.for("react.module.reference");
1029
1038
  function _e(s) {
1030
- return !!(typeof s == "string" || typeof s == "function" || s === t || s === o || ge || s === i || s === u || s === f || q || s === S || Z || te || pe || typeof s == "object" && s !== null && (s.$$typeof === v || s.$$typeof === m || s.$$typeof === d || s.$$typeof === r || s.$$typeof === h || // This needs to include all possible module reference object
1039
+ return !!(typeof s == "string" || typeof s == "function" || s === t || s === o || ve || s === i || s === u || s === f || q || s === S || X || ne || ge || typeof s == "object" && s !== null && (s.$$typeof === g || s.$$typeof === m || s.$$typeof === d || s.$$typeof === r || s.$$typeof === h || // This needs to include all possible module reference object
1031
1040
  // types supported by any Flight configuration anywhere since
1032
1041
  // we don't know which Flight build this will end up being used
1033
1042
  // with.
1034
- s.$$typeof === ce || s.getModuleId !== void 0));
1043
+ s.$$typeof === le || s.getModuleId !== void 0));
1035
1044
  }
1036
1045
  function ke(s, p, y) {
1037
- var w = s.displayName;
1038
- if (w)
1039
- return w;
1046
+ var C = s.displayName;
1047
+ if (C)
1048
+ return C;
1040
1049
  var $ = p.displayName || p.name || "";
1041
1050
  return $ !== "" ? y + "(" + $ + ")" : y;
1042
1051
  }
1043
- function be(s) {
1052
+ function ye(s) {
1044
1053
  return s.displayName || "Context";
1045
1054
  }
1046
1055
  function U(s) {
1047
1056
  if (s == null)
1048
1057
  return null;
1049
- if (typeof s.tag == "number" && I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
1058
+ if (typeof s.tag == "number" && L("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
1050
1059
  return s.displayName || s.name || null;
1051
1060
  if (typeof s == "string")
1052
1061
  return s;
@@ -1068,19 +1077,19 @@ function Fa() {
1068
1077
  switch (s.$$typeof) {
1069
1078
  case r:
1070
1079
  var p = s;
1071
- return be(p) + ".Consumer";
1080
+ return ye(p) + ".Consumer";
1072
1081
  case d:
1073
1082
  var y = s;
1074
- return be(y._context) + ".Provider";
1083
+ return ye(y._context) + ".Provider";
1075
1084
  case h:
1076
1085
  return ke(s, s.render, "ForwardRef");
1077
1086
  case m:
1078
- var w = s.displayName || null;
1079
- return w !== null ? w : U(s.type) || "Memo";
1080
- case v: {
1081
- var $ = s, W = $._payload, L = $._init;
1087
+ var C = s.displayName || null;
1088
+ return C !== null ? C : U(s.type) || "Memo";
1089
+ case g: {
1090
+ var $ = s, W = $._payload, B = $._init;
1082
1091
  try {
1083
- return U(L(W));
1092
+ return U(B(W));
1084
1093
  } catch {
1085
1094
  return null;
1086
1095
  }
@@ -1088,18 +1097,18 @@ function Fa() {
1088
1097
  }
1089
1098
  return null;
1090
1099
  }
1091
- var ye = Object.assign, O = 0, we, De, je, Pe, Ae, Ie, Be;
1092
- function Fe() {
1100
+ var Ee = Object.assign, O = 0, Me, De, Ie, Pe, Ae, je, qe;
1101
+ function Ne() {
1093
1102
  }
1094
- Fe.__reactDisabledLog = !0;
1095
- function re() {
1103
+ Ne.__reactDisabledLog = !0;
1104
+ function Ke() {
1096
1105
  {
1097
1106
  if (O === 0) {
1098
- we = console.log, De = console.info, je = console.warn, Pe = console.error, Ae = console.group, Ie = console.groupCollapsed, Be = console.groupEnd;
1107
+ Me = console.log, De = console.info, Ie = console.warn, Pe = console.error, Ae = console.group, je = console.groupCollapsed, qe = console.groupEnd;
1099
1108
  var s = {
1100
1109
  configurable: !0,
1101
1110
  enumerable: !0,
1102
- value: Fe,
1111
+ value: Ne,
1103
1112
  writable: !0
1104
1113
  };
1105
1114
  Object.defineProperties(console, {
@@ -1115,7 +1124,7 @@ function Fa() {
1115
1124
  O++;
1116
1125
  }
1117
1126
  }
1118
- function Me() {
1127
+ function ct() {
1119
1128
  {
1120
1129
  if (O--, O === 0) {
1121
1130
  var s = {
@@ -1124,242 +1133,242 @@ function Fa() {
1124
1133
  writable: !0
1125
1134
  };
1126
1135
  Object.defineProperties(console, {
1127
- log: ye({}, s, {
1128
- value: we
1136
+ log: Ee({}, s, {
1137
+ value: Me
1129
1138
  }),
1130
- info: ye({}, s, {
1139
+ info: Ee({}, s, {
1131
1140
  value: De
1132
1141
  }),
1133
- warn: ye({}, s, {
1134
- value: je
1142
+ warn: Ee({}, s, {
1143
+ value: Ie
1135
1144
  }),
1136
- error: ye({}, s, {
1145
+ error: Ee({}, s, {
1137
1146
  value: Pe
1138
1147
  }),
1139
- group: ye({}, s, {
1148
+ group: Ee({}, s, {
1140
1149
  value: Ae
1141
1150
  }),
1142
- groupCollapsed: ye({}, s, {
1143
- value: Ie
1151
+ groupCollapsed: Ee({}, s, {
1152
+ value: je
1144
1153
  }),
1145
- groupEnd: ye({}, s, {
1146
- value: Be
1154
+ groupEnd: Ee({}, s, {
1155
+ value: qe
1147
1156
  })
1148
1157
  });
1149
1158
  }
1150
- O < 0 && I("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1159
+ O < 0 && L("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1151
1160
  }
1152
1161
  }
1153
- var He = R.ReactCurrentDispatcher, Ye;
1154
- function ue(s, p, y) {
1162
+ var Le = R.ReactCurrentDispatcher, ae;
1163
+ function fe(s, p, y) {
1155
1164
  {
1156
- if (Ye === void 0)
1165
+ if (ae === void 0)
1157
1166
  try {
1158
1167
  throw Error();
1159
1168
  } catch ($) {
1160
- var w = $.stack.trim().match(/\n( *(at )?)/);
1161
- Ye = w && w[1] || "";
1169
+ var C = $.stack.trim().match(/\n( *(at )?)/);
1170
+ ae = C && C[1] || "";
1162
1171
  }
1163
1172
  return `
1164
- ` + Ye + s;
1173
+ ` + ae + s;
1165
1174
  }
1166
1175
  }
1167
- var g = !1, b;
1176
+ var Ue = !1, Be;
1168
1177
  {
1169
- var M = typeof WeakMap == "function" ? WeakMap : Map;
1170
- b = new M();
1178
+ var be = typeof WeakMap == "function" ? WeakMap : Map;
1179
+ Be = new be();
1171
1180
  }
1172
- function N(s, p) {
1173
- if (!s || g)
1181
+ function v(s, p) {
1182
+ if (!s || Ue)
1174
1183
  return "";
1175
1184
  {
1176
- var y = b.get(s);
1185
+ var y = Be.get(s);
1177
1186
  if (y !== void 0)
1178
1187
  return y;
1179
1188
  }
1180
- var w;
1181
- g = !0;
1189
+ var C;
1190
+ Ue = !0;
1182
1191
  var $ = Error.prepareStackTrace;
1183
1192
  Error.prepareStackTrace = void 0;
1184
1193
  var W;
1185
- W = He.current, He.current = null, re();
1194
+ W = Le.current, Le.current = null, Ke();
1186
1195
  try {
1187
1196
  if (p) {
1188
- var L = function() {
1197
+ var B = function() {
1189
1198
  throw Error();
1190
1199
  };
1191
- if (Object.defineProperty(L.prototype, "props", {
1200
+ if (Object.defineProperty(B.prototype, "props", {
1192
1201
  set: function() {
1193
1202
  throw Error();
1194
1203
  }
1195
1204
  }), typeof Reflect == "object" && Reflect.construct) {
1196
1205
  try {
1197
- Reflect.construct(L, []);
1198
- } catch (Le) {
1199
- w = Le;
1206
+ Reflect.construct(B, []);
1207
+ } catch (Fe) {
1208
+ C = Fe;
1200
1209
  }
1201
- Reflect.construct(s, [], L);
1210
+ Reflect.construct(s, [], B);
1202
1211
  } else {
1203
1212
  try {
1204
- L.call();
1205
- } catch (Le) {
1206
- w = Le;
1213
+ B.call();
1214
+ } catch (Fe) {
1215
+ C = Fe;
1207
1216
  }
1208
- s.call(L.prototype);
1217
+ s.call(B.prototype);
1209
1218
  }
1210
1219
  } else {
1211
1220
  try {
1212
1221
  throw Error();
1213
- } catch (Le) {
1214
- w = Le;
1222
+ } catch (Fe) {
1223
+ C = Fe;
1215
1224
  }
1216
1225
  s();
1217
1226
  }
1218
- } catch (Le) {
1219
- if (Le && w && typeof Le.stack == "string") {
1220
- for (var j = Le.stack.split(`
1221
- `), he = w.stack.split(`
1222
- `), Q = j.length - 1, ae = he.length - 1; Q >= 1 && ae >= 0 && j[Q] !== he[ae]; )
1223
- ae--;
1224
- for (; Q >= 1 && ae >= 0; Q--, ae--)
1225
- if (j[Q] !== he[ae]) {
1226
- if (Q !== 1 || ae !== 1)
1227
+ } catch (Fe) {
1228
+ if (Fe && C && typeof Fe.stack == "string") {
1229
+ for (var I = Fe.stack.split(`
1230
+ `), he = C.stack.split(`
1231
+ `), ee = I.length - 1, ie = he.length - 1; ee >= 1 && ie >= 0 && I[ee] !== he[ie]; )
1232
+ ie--;
1233
+ for (; ee >= 1 && ie >= 0; ee--, ie--)
1234
+ if (I[ee] !== he[ie]) {
1235
+ if (ee !== 1 || ie !== 1)
1227
1236
  do
1228
- if (Q--, ae--, ae < 0 || j[Q] !== he[ae]) {
1229
- var Ce = `
1230
- ` + j[Q].replace(" at new ", " at ");
1231
- return s.displayName && Ce.includes("<anonymous>") && (Ce = Ce.replace("<anonymous>", s.displayName)), typeof s == "function" && b.set(s, Ce), Ce;
1237
+ if (ee--, ie--, ie < 0 || I[ee] !== he[ie]) {
1238
+ var we = `
1239
+ ` + I[ee].replace(" at new ", " at ");
1240
+ return s.displayName && we.includes("<anonymous>") && (we = we.replace("<anonymous>", s.displayName)), typeof s == "function" && Be.set(s, we), we;
1232
1241
  }
1233
- while (Q >= 1 && ae >= 0);
1242
+ while (ee >= 1 && ie >= 0);
1234
1243
  break;
1235
1244
  }
1236
1245
  }
1237
1246
  } finally {
1238
- g = !1, He.current = W, Me(), Error.prepareStackTrace = $;
1247
+ Ue = !1, Le.current = W, ct(), Error.prepareStackTrace = $;
1239
1248
  }
1240
- var tt = s ? s.displayName || s.name : "", Vt = tt ? ue(tt) : "";
1241
- return typeof s == "function" && b.set(s, Vt), Vt;
1249
+ var at = s ? s.displayName || s.name : "", Yt = at ? fe(at) : "";
1250
+ return typeof s == "function" && Be.set(s, Yt), Yt;
1242
1251
  }
1243
- function ve(s, p, y) {
1244
- return N(s, !1);
1252
+ function b(s, p, y) {
1253
+ return v(s, !1);
1245
1254
  }
1246
- function le(s) {
1255
+ function w(s) {
1247
1256
  var p = s.prototype;
1248
1257
  return !!(p && p.isReactComponent);
1249
1258
  }
1250
- function C(s, p, y) {
1259
+ function j(s, p, y) {
1251
1260
  if (s == null)
1252
1261
  return "";
1253
1262
  if (typeof s == "function")
1254
- return N(s, le(s));
1263
+ return v(s, w(s));
1255
1264
  if (typeof s == "string")
1256
- return ue(s);
1265
+ return fe(s);
1257
1266
  switch (s) {
1258
1267
  case u:
1259
- return ue("Suspense");
1268
+ return fe("Suspense");
1260
1269
  case f:
1261
- return ue("SuspenseList");
1270
+ return fe("SuspenseList");
1262
1271
  }
1263
1272
  if (typeof s == "object")
1264
1273
  switch (s.$$typeof) {
1265
1274
  case h:
1266
- return ve(s.render);
1275
+ return b(s.render);
1267
1276
  case m:
1268
- return C(s.type, p, y);
1269
- case v: {
1270
- var w = s, $ = w._payload, W = w._init;
1277
+ return j(s.type, p, y);
1278
+ case g: {
1279
+ var C = s, $ = C._payload, W = C._init;
1271
1280
  try {
1272
- return C(W($), p, y);
1281
+ return j(W($), p, y);
1273
1282
  } catch {
1274
1283
  }
1275
1284
  }
1276
1285
  }
1277
1286
  return "";
1278
1287
  }
1279
- var x = Object.prototype.hasOwnProperty, G = {}, ne = R.ReactDebugCurrentFrame;
1280
- function _(s) {
1288
+ var oe = Object.prototype.hasOwnProperty, ue = {}, M = R.ReactDebugCurrentFrame;
1289
+ function x(s) {
1281
1290
  if (s) {
1282
- var p = s._owner, y = C(s.type, s._source, p ? p.type : null);
1283
- ne.setExtraStackFrame(y);
1291
+ var p = s._owner, y = j(s.type, s._source, p ? p.type : null);
1292
+ M.setExtraStackFrame(y);
1284
1293
  } else
1285
- ne.setExtraStackFrame(null);
1294
+ M.setExtraStackFrame(null);
1286
1295
  }
1287
- function z(s, p, y, w, $) {
1296
+ function z(s, p, y, C, $) {
1288
1297
  {
1289
- var W = Function.call.bind(x);
1290
- for (var L in s)
1291
- if (W(s, L)) {
1292
- var j = void 0;
1298
+ var W = Function.call.bind(oe);
1299
+ for (var B in s)
1300
+ if (W(s, B)) {
1301
+ var I = void 0;
1293
1302
  try {
1294
- if (typeof s[L] != "function") {
1295
- var he = Error((w || "React class") + ": " + y + " type `" + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[L] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1303
+ if (typeof s[B] != "function") {
1304
+ var he = Error((C || "React class") + ": " + y + " type `" + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[B] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1296
1305
  throw he.name = "Invariant Violation", he;
1297
1306
  }
1298
- j = s[L](p, L, w, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1299
- } catch (Q) {
1300
- j = Q;
1307
+ I = s[B](p, B, C, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1308
+ } catch (ee) {
1309
+ I = ee;
1301
1310
  }
1302
- j && !(j instanceof Error) && (_($), I("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", y, L, typeof j), _(null)), j instanceof Error && !(j.message in G) && (G[j.message] = !0, _($), I("Failed %s type: %s", y, j.message), _(null));
1311
+ I && !(I instanceof Error) && (x($), L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", y, B, typeof I), x(null)), I instanceof Error && !(I.message in ue) && (ue[I.message] = !0, x($), L("Failed %s type: %s", y, I.message), x(null));
1303
1312
  }
1304
1313
  }
1305
1314
  }
1306
- var K = Array.isArray;
1307
- function Ne(s) {
1308
- return K(s);
1315
+ var Z = Array.isArray;
1316
+ function _(s) {
1317
+ return Z(s);
1309
1318
  }
1310
- function Je(s) {
1319
+ function H(s) {
1311
1320
  {
1312
1321
  var p = typeof Symbol == "function" && Symbol.toStringTag, y = p && s[Symbol.toStringTag] || s.constructor.name || "Object";
1313
1322
  return y;
1314
1323
  }
1315
1324
  }
1316
- function ft(s) {
1325
+ function Q(s) {
1317
1326
  try {
1318
- return mt(s), !1;
1327
+ return $e(s), !1;
1319
1328
  } catch {
1320
1329
  return !0;
1321
1330
  }
1322
1331
  }
1323
- function mt(s) {
1332
+ function $e(s) {
1324
1333
  return "" + s;
1325
1334
  }
1326
- function st(s) {
1327
- if (ft(s))
1328
- return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(s)), mt(s);
1335
+ function ze(s) {
1336
+ if (Q(s))
1337
+ return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", H(s)), $e(s);
1329
1338
  }
1330
- var Ue = R.ReactCurrentOwner, ot = {
1339
+ var Ge = R.ReactCurrentOwner, lt = {
1331
1340
  key: !0,
1332
1341
  ref: !0,
1333
1342
  __self: !0,
1334
1343
  __source: !0
1335
- }, ct, pt, Qe;
1336
- Qe = {};
1337
- function kt(s) {
1338
- if (x.call(s, "ref")) {
1344
+ }, ut, pt, tt;
1345
+ tt = {};
1346
+ function _t(s) {
1347
+ if (oe.call(s, "ref")) {
1339
1348
  var p = Object.getOwnPropertyDescriptor(s, "ref").get;
1340
1349
  if (p && p.isReactWarning)
1341
1350
  return !1;
1342
1351
  }
1343
1352
  return s.ref !== void 0;
1344
1353
  }
1345
- function Dt(s) {
1346
- if (x.call(s, "key")) {
1354
+ function kt(s) {
1355
+ if (oe.call(s, "key")) {
1347
1356
  var p = Object.getOwnPropertyDescriptor(s, "key").get;
1348
1357
  if (p && p.isReactWarning)
1349
1358
  return !1;
1350
1359
  }
1351
1360
  return s.key !== void 0;
1352
1361
  }
1353
- function Pt(s, p) {
1354
- if (typeof s.ref == "string" && Ue.current && p && Ue.current.stateNode !== p) {
1355
- var y = U(Ue.current.type);
1356
- Qe[y] || (I('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', U(Ue.current.type), s.ref), Qe[y] = !0);
1362
+ function Dt(s, p) {
1363
+ if (typeof s.ref == "string" && Ge.current && p && Ge.current.stateNode !== p) {
1364
+ var y = U(Ge.current.type);
1365
+ tt[y] || (L('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', U(Ge.current.type), s.ref), tt[y] = !0);
1357
1366
  }
1358
1367
  }
1359
1368
  function gt(s, p) {
1360
1369
  {
1361
1370
  var y = function() {
1362
- ct || (ct = !0, I("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1371
+ ut || (ut = !0, L("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1363
1372
  };
1364
1373
  y.isReactWarning = !0, Object.defineProperty(s, "key", {
1365
1374
  get: y,
@@ -1367,10 +1376,10 @@ function Fa() {
1367
1376
  });
1368
1377
  }
1369
1378
  }
1370
- function $e(s, p) {
1379
+ function We(s, p) {
1371
1380
  {
1372
1381
  var y = function() {
1373
- pt || (pt = !0, I("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1382
+ pt || (pt = !0, L("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1374
1383
  };
1375
1384
  y.isReactWarning = !0, Object.defineProperty(s, "ref", {
1376
1385
  get: y,
@@ -1378,64 +1387,64 @@ function Fa() {
1378
1387
  });
1379
1388
  }
1380
1389
  }
1381
- var Ht = function(s, p, y, w, $, W, L) {
1382
- var j = {
1390
+ var Wt = function(s, p, y, C, $, W, B) {
1391
+ var I = {
1383
1392
  // This tag allows us to uniquely identify this as a React Element
1384
1393
  $$typeof: n,
1385
1394
  // Built-in properties that belong on the element
1386
1395
  type: s,
1387
1396
  key: p,
1388
1397
  ref: y,
1389
- props: L,
1398
+ props: B,
1390
1399
  // Record the component responsible for creating this element.
1391
1400
  _owner: W
1392
1401
  };
1393
- return j._store = {}, Object.defineProperty(j._store, "validated", {
1402
+ return I._store = {}, Object.defineProperty(I._store, "validated", {
1394
1403
  configurable: !1,
1395
1404
  enumerable: !1,
1396
1405
  writable: !0,
1397
1406
  value: !1
1398
- }), Object.defineProperty(j, "_self", {
1407
+ }), Object.defineProperty(I, "_self", {
1399
1408
  configurable: !1,
1400
1409
  enumerable: !1,
1401
1410
  writable: !1,
1402
- value: w
1403
- }), Object.defineProperty(j, "_source", {
1411
+ value: C
1412
+ }), Object.defineProperty(I, "_source", {
1404
1413
  configurable: !1,
1405
1414
  enumerable: !1,
1406
1415
  writable: !1,
1407
1416
  value: $
1408
- }), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
1417
+ }), Object.freeze && (Object.freeze(I.props), Object.freeze(I)), I;
1409
1418
  };
1410
- function c(s, p, y, w, $) {
1419
+ function c(s, p, y, C, $) {
1411
1420
  {
1412
- var W, L = {}, j = null, he = null;
1413
- y !== void 0 && (st(y), j = "" + y), Dt(p) && (st(p.key), j = "" + p.key), kt(p) && (he = p.ref, Pt(p, $));
1421
+ var W, B = {}, I = null, he = null;
1422
+ y !== void 0 && (ze(y), I = "" + y), kt(p) && (ze(p.key), I = "" + p.key), _t(p) && (he = p.ref, Dt(p, $));
1414
1423
  for (W in p)
1415
- x.call(p, W) && !ot.hasOwnProperty(W) && (L[W] = p[W]);
1424
+ oe.call(p, W) && !lt.hasOwnProperty(W) && (B[W] = p[W]);
1416
1425
  if (s && s.defaultProps) {
1417
- var Q = s.defaultProps;
1418
- for (W in Q)
1419
- L[W] === void 0 && (L[W] = Q[W]);
1426
+ var ee = s.defaultProps;
1427
+ for (W in ee)
1428
+ B[W] === void 0 && (B[W] = ee[W]);
1420
1429
  }
1421
- if (j || he) {
1422
- var ae = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
1423
- j && gt(L, ae), he && $e(L, ae);
1430
+ if (I || he) {
1431
+ var ie = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
1432
+ I && gt(B, ie), he && We(B, ie);
1424
1433
  }
1425
- return Ht(s, j, he, $, w, Ue.current, L);
1434
+ return Wt(s, I, he, $, C, Ge.current, B);
1426
1435
  }
1427
1436
  }
1428
1437
  var E = R.ReactCurrentOwner, k = R.ReactDebugCurrentFrame;
1429
- function B(s) {
1438
+ function F(s) {
1430
1439
  if (s) {
1431
- var p = s._owner, y = C(s.type, s._source, p ? p.type : null);
1440
+ var p = s._owner, y = j(s.type, s._source, p ? p.type : null);
1432
1441
  k.setExtraStackFrame(y);
1433
1442
  } else
1434
1443
  k.setExtraStackFrame(null);
1435
1444
  }
1436
- var ie;
1437
- ie = !1;
1438
- function Ee(s) {
1445
+ var re;
1446
+ re = !1;
1447
+ function xe(s) {
1439
1448
  return typeof s == "object" && s !== null && s.$$typeof === n;
1440
1449
  }
1441
1450
  function de() {
@@ -1450,7 +1459,7 @@ Check the render method of \`` + s + "`.";
1450
1459
  return "";
1451
1460
  }
1452
1461
  }
1453
- function Yt(s) {
1462
+ function Ht(s) {
1454
1463
  {
1455
1464
  if (s !== void 0) {
1456
1465
  var p = s.fileName.replace(/^.*[\\\/]/, ""), y = s.lineNumber;
@@ -1474,7 +1483,7 @@ Check the top-level render call using <` + y + ">.");
1474
1483
  return p;
1475
1484
  }
1476
1485
  }
1477
- function xe(s, p) {
1486
+ function Se(s, p) {
1478
1487
  {
1479
1488
  if (!s._store || s._store.validated || s.key != null)
1480
1489
  return;
@@ -1483,30 +1492,30 @@ Check the top-level render call using <` + y + ">.");
1483
1492
  if (vt[y])
1484
1493
  return;
1485
1494
  vt[y] = !0;
1486
- var w = "";
1487
- s && s._owner && s._owner !== E.current && (w = " It was passed a child from " + U(s._owner.type) + "."), B(s), I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, w), B(null);
1495
+ var C = "";
1496
+ s && s._owner && s._owner !== E.current && (C = " It was passed a child from " + U(s._owner.type) + "."), F(s), L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, C), F(null);
1488
1497
  }
1489
1498
  }
1490
- function Se(s, p) {
1499
+ function Ce(s, p) {
1491
1500
  {
1492
1501
  if (typeof s != "object")
1493
1502
  return;
1494
- if (Ne(s))
1503
+ if (_(s))
1495
1504
  for (var y = 0; y < s.length; y++) {
1496
- var w = s[y];
1497
- Ee(w) && xe(w, p);
1505
+ var C = s[y];
1506
+ xe(C) && Se(C, p);
1498
1507
  }
1499
- else if (Ee(s))
1508
+ else if (xe(s))
1500
1509
  s._store && (s._store.validated = !0);
1501
1510
  else if (s) {
1502
1511
  var $ = V(s);
1503
1512
  if (typeof $ == "function" && $ !== s.entries)
1504
- for (var W = $.call(s), L; !(L = W.next()).done; )
1505
- Ee(L.value) && xe(L.value, p);
1513
+ for (var W = $.call(s), B; !(B = W.next()).done; )
1514
+ xe(B.value) && Se(B.value, p);
1506
1515
  }
1507
1516
  }
1508
1517
  }
1509
- function Ve(s) {
1518
+ function Xe(s) {
1510
1519
  {
1511
1520
  var p = s.type;
1512
1521
  if (p == null || typeof p == "string")
@@ -1521,78 +1530,78 @@ Check the top-level render call using <` + y + ">.");
1521
1530
  else
1522
1531
  return;
1523
1532
  if (y) {
1524
- var w = U(p);
1525
- z(y, s.props, "prop", w, s);
1526
- } else if (p.PropTypes !== void 0 && !ie) {
1527
- ie = !0;
1533
+ var C = U(p);
1534
+ z(y, s.props, "prop", C, s);
1535
+ } else if (p.PropTypes !== void 0 && !re) {
1536
+ re = !0;
1528
1537
  var $ = U(p);
1529
- I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", $ || "Unknown");
1538
+ L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", $ || "Unknown");
1530
1539
  }
1531
- typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1540
+ typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1532
1541
  }
1533
1542
  }
1534
1543
  function Oe(s) {
1535
1544
  {
1536
1545
  for (var p = Object.keys(s.props), y = 0; y < p.length; y++) {
1537
- var w = p[y];
1538
- if (w !== "children" && w !== "key") {
1539
- B(s), I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), B(null);
1546
+ var C = p[y];
1547
+ if (C !== "children" && C !== "key") {
1548
+ F(s), L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), F(null);
1540
1549
  break;
1541
1550
  }
1542
1551
  }
1543
- s.ref !== null && (B(s), I("Invalid attribute `ref` supplied to `React.Fragment`."), B(null));
1552
+ s.ref !== null && (F(s), L("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
1544
1553
  }
1545
1554
  }
1546
- function ze(s, p, y, w, $, W) {
1555
+ function He(s, p, y, C, $, W) {
1547
1556
  {
1548
- var L = _e(s);
1549
- if (!L) {
1550
- var j = "";
1551
- (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (j += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1552
- var he = Yt($);
1553
- he ? j += he : j += de();
1554
- var Q;
1555
- s === null ? Q = "null" : Ne(s) ? Q = "array" : s !== void 0 && s.$$typeof === n ? (Q = "<" + (U(s.type) || "Unknown") + " />", j = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof s, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, j);
1557
+ var B = _e(s);
1558
+ if (!B) {
1559
+ var I = "";
1560
+ (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (I += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1561
+ var he = Ht($);
1562
+ he ? I += he : I += de();
1563
+ var ee;
1564
+ s === null ? ee = "null" : _(s) ? ee = "array" : s !== void 0 && s.$$typeof === n ? (ee = "<" + (U(s.type) || "Unknown") + " />", I = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof s, L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, I);
1556
1565
  }
1557
- var ae = c(s, p, y, $, W);
1558
- if (ae == null)
1559
- return ae;
1560
- if (L) {
1561
- var Ce = p.children;
1562
- if (Ce !== void 0)
1563
- if (w)
1564
- if (Ne(Ce)) {
1565
- for (var tt = 0; tt < Ce.length; tt++)
1566
- Se(Ce[tt], s);
1567
- Object.freeze && Object.freeze(Ce);
1566
+ var ie = c(s, p, y, $, W);
1567
+ if (ie == null)
1568
+ return ie;
1569
+ if (B) {
1570
+ var we = p.children;
1571
+ if (we !== void 0)
1572
+ if (C)
1573
+ if (_(we)) {
1574
+ for (var at = 0; at < we.length; at++)
1575
+ Ce(we[at], s);
1576
+ Object.freeze && Object.freeze(we);
1568
1577
  } else
1569
- I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1578
+ L("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1570
1579
  else
1571
- Se(Ce, s);
1580
+ Ce(we, s);
1572
1581
  }
1573
- return s === t ? Oe(ae) : Ve(ae), ae;
1582
+ return s === t ? Oe(ie) : Xe(ie), ie;
1574
1583
  }
1575
1584
  }
1576
- function et(s, p, y) {
1577
- return ze(s, p, y, !0);
1585
+ function nt(s, p, y) {
1586
+ return He(s, p, y, !0);
1578
1587
  }
1579
1588
  function yt(s, p, y) {
1580
- return ze(s, p, y, !1);
1589
+ return He(s, p, y, !1);
1581
1590
  }
1582
- var Gn = yt, Wn = et;
1583
- ut.Fragment = t, ut.jsx = Gn, ut.jsxs = Wn;
1584
- }()), ut;
1591
+ var zn = yt, Gn = nt;
1592
+ ht.Fragment = t, ht.jsx = zn, ht.jsxs = Gn;
1593
+ }()), ht;
1585
1594
  }
1586
- process.env.NODE_ENV === "production" ? Ft.exports = Ba() : Ft.exports = Fa();
1587
- var l = Ft.exports;
1588
- function Fn(e) {
1595
+ process.env.NODE_ENV === "production" ? Bt.exports = La() : Bt.exports = Ba();
1596
+ var l = Bt.exports;
1597
+ function Bn(e) {
1589
1598
  return e.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: e.title } }) : /* @__PURE__ */ l.jsx("button", { children: e.title });
1590
1599
  }
1591
- const Ua = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1600
+ const Fa = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1592
1601
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1593
1602
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1594
1603
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1595
- ] }), $a = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1604
+ ] }), Ua = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1596
1605
  "path",
1597
1606
  {
1598
1607
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
@@ -1600,35 +1609,35 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1600
1609
  C11,8.22,10.74,8,10.43,8z`
1601
1610
  }
1602
1611
  ) });
1603
- function za(e) {
1604
- return /* @__PURE__ */ l.jsx(Ln.Item, { value: e.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1605
- $a,
1612
+ function $a(e) {
1613
+ return /* @__PURE__ */ l.jsx(Nn.Item, { value: e.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1614
+ Ua,
1606
1615
  /* @__PURE__ */ l.jsx("span", { children: e.title }),
1607
1616
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1608
1617
  e.onDelete(e.index);
1609
- }, children: Ua })
1618
+ }, children: Fa })
1610
1619
  ] }) }, e.title);
1611
1620
  }
1612
- function Ga(e) {
1613
- const [n, a] = H(!1), [t, i] = H(e.options), o = (u) => {
1621
+ function za(e) {
1622
+ const [n, a] = G(!1), [t, i] = G(e.options), o = (u) => {
1614
1623
  e.onDragComplete(u), i(u);
1615
1624
  }, d = (u) => {
1616
1625
  const f = [...t];
1617
1626
  f.splice(u, 1), o(f);
1618
1627
  }, r = [];
1619
1628
  t.forEach((u, f) => {
1620
- r.push(/* @__PURE__ */ l.jsx(za, { index: f, title: u, onDelete: d }, u));
1629
+ r.push(/* @__PURE__ */ l.jsx($a, { index: f, title: u, onDelete: d }, u));
1621
1630
  });
1622
1631
  let h = "dropdown draggable";
1623
1632
  return e.subdropdown && (h += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: h, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1624
- /* @__PURE__ */ l.jsx(Fn, { title: e.title }),
1625
- /* @__PURE__ */ l.jsx(Ln.Group, { axis: "y", values: t, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: r })
1633
+ /* @__PURE__ */ l.jsx(Bn, { title: e.title }),
1634
+ /* @__PURE__ */ l.jsx(Nn.Group, { axis: "y", values: t, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: r })
1626
1635
  ] });
1627
1636
  }
1628
- function Wa(e) {
1629
- const [n, a] = H(!1), t = [];
1637
+ function Ga(e) {
1638
+ const [n, a] = G(!1), t = [];
1630
1639
  e.options.map((o, d) => {
1631
- e.onSelect !== void 0 && (o.onSelect = e.onSelect), t.push(/* @__PURE__ */ l.jsx(Ha, { option: o }, d));
1640
+ e.onSelect !== void 0 && (o.onSelect = e.onSelect), t.push(/* @__PURE__ */ l.jsx(Wa, { option: o }, d));
1632
1641
  });
1633
1642
  let i = "dropdown";
1634
1643
  return e.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
@@ -1638,7 +1647,7 @@ function Wa(e) {
1638
1647
  onMouseEnter: () => a(!0),
1639
1648
  onMouseLeave: () => a(!1),
1640
1649
  children: [
1641
- /* @__PURE__ */ l.jsx(Fn, { title: e.title }),
1650
+ /* @__PURE__ */ l.jsx(Bn, { title: e.title }),
1642
1651
  /* @__PURE__ */ l.jsx(
1643
1652
  "ul",
1644
1653
  {
@@ -1650,13 +1659,13 @@ function Wa(e) {
1650
1659
  }
1651
1660
  );
1652
1661
  }
1653
- function Ha(e) {
1654
- const { option: n } = e, [a, t] = H("");
1662
+ function Wa(e) {
1663
+ const { option: n } = e, [a, t] = G("");
1655
1664
  let i;
1656
1665
  switch (n.type) {
1657
1666
  case "draggable":
1658
1667
  i = /* @__PURE__ */ l.jsx(
1659
- Ga,
1668
+ za,
1660
1669
  {
1661
1670
  title: n.title,
1662
1671
  options: n.value,
@@ -1669,7 +1678,7 @@ function Ha(e) {
1669
1678
  break;
1670
1679
  case "dropdown":
1671
1680
  i = /* @__PURE__ */ l.jsx(
1672
- Wa,
1681
+ Ga,
1673
1682
  {
1674
1683
  title: n.title,
1675
1684
  options: n.value,
@@ -1690,9 +1699,9 @@ function Ha(e) {
1690
1699
  );
1691
1700
  break;
1692
1701
  }
1693
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, _a());
1702
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, Ra());
1694
1703
  }
1695
- function Fi(e, n, a) {
1704
+ function Bi(e, n, a) {
1696
1705
  function t(o) {
1697
1706
  switch (n.forEach((d) => {
1698
1707
  d.callback(e, d.remote, o);
@@ -1715,8 +1724,8 @@ function Fi(e, n, a) {
1715
1724
  o.target === "editor" ? i(o) : t(o);
1716
1725
  };
1717
1726
  }
1718
- function Wt(e) {
1719
- const [n, a] = H(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1727
+ function Gt(e) {
1728
+ const [n, a] = G(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1720
1729
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${t ? "hide" : ""}`, children: [
1721
1730
  /* @__PURE__ */ l.jsxs(
1722
1731
  "button",
@@ -1734,7 +1743,7 @@ function Wt(e) {
1734
1743
  children: "Toggle"
1735
1744
  }
1736
1745
  ),
1737
- /* @__PURE__ */ l.jsx("p", { className: "label", children: Ot(e.label) })
1746
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: Mt(e.label) })
1738
1747
  ]
1739
1748
  }
1740
1749
  ),
@@ -1742,10 +1751,10 @@ function Wt(e) {
1742
1751
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: e.children }) })
1743
1752
  ] });
1744
1753
  }
1745
- function Un(e) {
1746
- const n = Y(null), [a, t] = H(!1), i = e.child !== void 0 && e.child.children.length > 0, o = [];
1754
+ function Fn(e) {
1755
+ const n = Y(null), [a, t] = G(!1), i = e.child !== void 0 && e.child.children.length > 0, o = [];
1747
1756
  return e.child !== void 0 && e.child.children.length > 0 && e.child.children.map((d, r) => {
1748
- o.push(/* @__PURE__ */ l.jsx(Un, { child: d, three: e.three }, r));
1757
+ o.push(/* @__PURE__ */ l.jsx(Fn, { child: d, three: e.three }, r));
1749
1758
  }), Re(() => {
1750
1759
  const d = e.child.uuid, r = e.three.getScene(d);
1751
1760
  if (r !== null) {
@@ -1791,7 +1800,7 @@ function Un(e) {
1791
1800
  const r = d.getObjectByProperty("uuid", e.child.uuid);
1792
1801
  if (r !== void 0) {
1793
1802
  const h = "visible", u = !r.visible;
1794
- n.current.style.opacity = u ? "1" : "0.25", e.three.updateObject(e.child.uuid, h, u), ee(r, h, u);
1803
+ n.current.style.opacity = u ? "1" : "0.25", e.three.updateObject(e.child.uuid, h, u), te(r, h, u);
1795
1804
  } else
1796
1805
  console.log(`Hermes - Couldn't find object: ${e.child.uuid}`, d);
1797
1806
  } else
@@ -1800,35 +1809,35 @@ function Un(e) {
1800
1809
  }
1801
1810
  }
1802
1811
  ),
1803
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Aa(e.child)}` })
1812
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${Pa(e.child)}` })
1804
1813
  ] }),
1805
1814
  /* @__PURE__ */ l.jsx("div", { className: a ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
1806
1815
  ] }, Math.random()) });
1807
1816
  }
1808
- function Ya(e) {
1817
+ function Ha(e) {
1809
1818
  const n = [];
1810
1819
  return e.child?.children.map((a, t) => {
1811
- n.push(/* @__PURE__ */ l.jsx(Un, { child: a, scene: e.scene, three: e.three }, t));
1820
+ n.push(/* @__PURE__ */ l.jsx(Fn, { child: a, scene: e.scene, three: e.three }, t));
1812
1821
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${e.class !== void 0 ? e.class : ""}`, children: n });
1813
1822
  }
1814
- function Va(e) {
1815
- const [n, a] = H(e.defaultValue);
1823
+ function Ya(e) {
1824
+ const [n, a] = G(e.defaultValue);
1816
1825
  return Re(() => {
1817
1826
  let t = !1, i = -1, o = 0, d = e.defaultValue;
1818
- const r = (v) => {
1819
- t = !0, o = Number(e.input.current?.value), i = v.clientX, document.addEventListener("mouseup", u, !1), document.addEventListener("mousemove", h, !1), document.addEventListener("contextmenu", u, !1);
1820
- }, h = (v) => {
1827
+ const r = (g) => {
1828
+ t = !0, o = Number(e.input.current?.value), i = g.clientX, document.addEventListener("mouseup", u, !1), document.addEventListener("mousemove", h, !1), document.addEventListener("contextmenu", u, !1);
1829
+ }, h = (g) => {
1821
1830
  if (!t)
1822
1831
  return;
1823
- const S = e.step !== void 0 ? e.step : 1, A = (v.clientX - i) * S;
1832
+ const S = e.step !== void 0 ? e.step : 1, A = (g.clientX - i) * S;
1824
1833
  d = Number((o + A).toFixed(4)), e.min !== void 0 && (d = Math.max(d, e.min)), e.max !== void 0 && (d = Math.min(d, e.max)), e.onChange !== void 0 && e.onChange(d), a(d);
1825
1834
  }, u = () => {
1826
1835
  t = !1, document.removeEventListener("mouseup", u), document.removeEventListener("mousemove", h), document.removeEventListener("contextmenu", u);
1827
- }, f = (v) => {
1828
- const S = Number(v.target.value);
1836
+ }, f = (g) => {
1837
+ const S = Number(g.target.value);
1829
1838
  a(S);
1830
- }, m = (v) => {
1831
- const S = Number(v.target.value);
1839
+ }, m = (g) => {
1840
+ const S = Number(g.target.value);
1832
1841
  e.onChange !== void 0 && e.onChange(S), a(S);
1833
1842
  };
1834
1843
  return e.input.current?.addEventListener("input", f), e.label.current?.addEventListener("mousedown", r, !1), e.sliderRef !== void 0 && e.sliderRef.current?.addEventListener("input", m), () => {
@@ -1836,8 +1845,8 @@ function Va(e) {
1836
1845
  };
1837
1846
  }, []), n;
1838
1847
  }
1839
- function Xe(e) {
1840
- const n = Y(null), a = Y(null), t = Va({
1848
+ function Qe(e) {
1849
+ const n = Y(null), a = Y(null), t = Ya({
1841
1850
  label: e.labelRef,
1842
1851
  input: n,
1843
1852
  sliderRef: a,
@@ -1893,42 +1902,42 @@ function Xe(e) {
1893
1902
  max: e.max,
1894
1903
  step: e.step,
1895
1904
  ref: a,
1896
- onChange: zt
1905
+ onChange: $t
1897
1906
  }
1898
1907
  )
1899
1908
  ] })
1900
1909
  ] });
1901
1910
  }
1902
- function qa(e) {
1903
- const n = Y(null), a = Y(null), t = Y(null), i = Y(null), o = Y(null), d = Y(null), [r, h] = H(e.value), [u, f] = H({
1911
+ function Va(e) {
1912
+ const n = Y(null), a = Y(null), t = Y(null), i = Y(null), o = Y(null), d = Y(null), [r, h] = G(e.value), [u, f] = G({
1904
1913
  min: Math.min(e.min, Math.min(e.value.x, e.value.y)),
1905
1914
  max: Math.max(e.max, Math.max(e.value.x, e.value.y))
1906
- }), [m, v] = H(!1);
1915
+ }), [m, g] = G(!1);
1907
1916
  function S() {
1908
- m || (window.addEventListener("mousemove", F), window.addEventListener("mouseup", A), window.addEventListener("mouseup", A), v(!0));
1917
+ m || (window.addEventListener("mousemove", N), window.addEventListener("mouseup", A), window.addEventListener("mouseup", A), g(!0));
1909
1918
  }
1910
1919
  function A() {
1911
- window.removeEventListener("mousemove", F), window.removeEventListener("mouseup", A), v(!1);
1920
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", A), g(!1);
1912
1921
  }
1913
- function F(T) {
1914
- const Z = o.current.getBoundingClientRect(), te = Ke(0, 99, T.clientX - Z.left) / 99, pe = Ke(0, 99, T.clientY - Z.top) / 99, q = an(nn(u.min, u.max, te), 3), ge = an(nn(u.min, u.max, pe), 3);
1915
- e.onChange({ target: { value: { x: q, y: ge } } }), h({ x: q, y: ge });
1922
+ function N(T) {
1923
+ const X = o.current.getBoundingClientRect(), ne = Je(0, 99, T.clientX - X.left) / 99, ge = Je(0, 99, T.clientY - X.top) / 99, q = nn(tn(u.min, u.max, ne), 3), ve = nn(tn(u.min, u.max, ge), 3);
1924
+ e.onChange({ target: { value: { x: q, y: ve } } }), h({ x: q, y: ve });
1916
1925
  }
1917
1926
  function V(T) {
1918
- let Z = r.x, te = r.y;
1919
- T.target === n.current ? Z = Number(T.target.value) : te = Number(T.target.value), h({ x: Z, y: te });
1927
+ let X = r.x, ne = r.y;
1928
+ T.target === n.current ? X = Number(T.target.value) : ne = Number(T.target.value), h({ x: X, y: ne });
1920
1929
  }
1921
1930
  function R() {
1922
1931
  const T = Number(t.current.value);
1923
- f({ min: T, max: u.max }), (r.x < T || r.y < T) && h({ x: Ke(T, u.max, r.x), y: Ke(T, u.max, r.y) });
1932
+ f({ min: T, max: u.max }), (r.x < T || r.y < T) && h({ x: Je(T, u.max, r.x), y: Je(T, u.max, r.y) });
1924
1933
  }
1925
- function I() {
1934
+ function L() {
1926
1935
  const T = Number(i.current.value);
1927
- f({ min: u.min, max: T }), (r.x > T || r.y > T) && h({ x: Ke(u.min, T, r.x), y: Ke(u.min, T, r.y) });
1936
+ f({ min: u.min, max: T }), (r.x > T || r.y > T) && h({ x: Je(u.min, T, r.x), y: Je(u.min, T, r.y) });
1928
1937
  }
1929
1938
  return Re(() => {
1930
- const T = tn(u.min, u.max, r.x), Z = tn(u.min, u.max, r.y);
1931
- d.current.style.left = `${T * 100}%`, d.current.style.top = `${Z * 100}%`;
1939
+ const T = en(u.min, u.max, r.x), X = en(u.min, u.max, r.y);
1940
+ d.current.style.left = `${T * 100}%`, d.current.style.top = `${X * 100}%`;
1932
1941
  }, [u, r]), /* @__PURE__ */ l.jsxs("div", { className: "vector2", children: [
1933
1942
  /* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
1934
1943
  /* @__PURE__ */ l.jsxs("div", { children: [
@@ -1983,7 +1992,7 @@ function qa(e) {
1983
1992
  type: "number",
1984
1993
  value: u.max,
1985
1994
  step: 0.01,
1986
- onChange: I
1995
+ onChange: L
1987
1996
  }
1988
1997
  )
1989
1998
  ] })
@@ -1995,7 +2004,7 @@ function qa(e) {
1995
2004
  ] })
1996
2005
  ] });
1997
2006
  }
1998
- function cn(e) {
2007
+ function on(e) {
1999
2008
  const n = e.value.isVector3 !== void 0, a = e.value.isEuler !== void 0, t = e.value.elements !== void 0, i = [];
2000
2009
  if (n) {
2001
2010
  const o = se(() => e.value, []), d = (h, u) => {
@@ -2007,7 +2016,7 @@ function cn(e) {
2007
2016
  /* @__PURE__ */ l.jsxs("div", { children: [
2008
2017
  /* @__PURE__ */ l.jsx("label", { ref: u, children: h.toUpperCase() }),
2009
2018
  /* @__PURE__ */ l.jsx(
2010
- Xe,
2019
+ Qe,
2011
2020
  {
2012
2021
  value: o[h],
2013
2022
  type: "number",
@@ -2030,7 +2039,7 @@ function cn(e) {
2030
2039
  /* @__PURE__ */ l.jsxs("div", { children: [
2031
2040
  /* @__PURE__ */ l.jsx("label", { ref: u, children: h.substring(1).toUpperCase() }),
2032
2041
  /* @__PURE__ */ l.jsx(
2033
- Xe,
2042
+ Qe,
2034
2043
  {
2035
2044
  value: o[h],
2036
2045
  type: "number",
@@ -2054,7 +2063,7 @@ function cn(e) {
2054
2063
  /* @__PURE__ */ l.jsxs("div", { children: [
2055
2064
  /* @__PURE__ */ l.jsx("label", { ref: h, children: r + 1 }),
2056
2065
  /* @__PURE__ */ l.jsx(
2057
- Xe,
2066
+ Qe,
2058
2067
  {
2059
2068
  value: o.elements[r],
2060
2069
  type: "number",
@@ -2070,7 +2079,7 @@ function cn(e) {
2070
2079
  }
2071
2080
  return /* @__PURE__ */ l.jsx("div", { className: "grid3", children: i }, Math.random().toString());
2072
2081
  }
2073
- function Ka(e) {
2082
+ function qa(e) {
2074
2083
  const n = e.value.x !== void 0, a = [];
2075
2084
  if (n) {
2076
2085
  const t = se(() => e.value, []), i = (d, r) => {
@@ -2082,7 +2091,7 @@ function Ka(e) {
2082
2091
  /* @__PURE__ */ l.jsxs("div", { children: [
2083
2092
  /* @__PURE__ */ l.jsx("label", { ref: r, children: d.toUpperCase() }),
2084
2093
  /* @__PURE__ */ l.jsx(
2085
- Xe,
2094
+ Qe,
2086
2095
  {
2087
2096
  value: t.x,
2088
2097
  type: "number",
@@ -2106,7 +2115,7 @@ function Ka(e) {
2106
2115
  /* @__PURE__ */ l.jsxs("div", { children: [
2107
2116
  /* @__PURE__ */ l.jsx("label", { ref: d, children: o + 1 }),
2108
2117
  /* @__PURE__ */ l.jsx(
2109
- Xe,
2118
+ Qe,
2110
2119
  {
2111
2120
  value: t.elements[o],
2112
2121
  type: "number",
@@ -2122,17 +2131,17 @@ function Ka(e) {
2122
2131
  }
2123
2132
  return /* @__PURE__ */ l.jsx("div", { className: "grid4", children: a });
2124
2133
  }
2125
- function Xa(e) {
2134
+ function Ka(e) {
2126
2135
  return "items" in e;
2127
2136
  }
2128
- function Ze(e) {
2137
+ function et(e) {
2129
2138
  const n = [];
2130
2139
  return e.items.forEach((a) => {
2131
- Xa(a) ? n.push(
2132
- /* @__PURE__ */ l.jsx(Ze, { title: Ot(a.title), items: a.items }, Math.random())
2140
+ Ka(a) ? n.push(
2141
+ /* @__PURE__ */ l.jsx(et, { title: Mt(a.title), items: a.items }, Math.random())
2133
2142
  ) : n.push(
2134
2143
  /* @__PURE__ */ l.jsx(
2135
- wt,
2144
+ Ct,
2136
2145
  {
2137
2146
  title: a.title,
2138
2147
  prop: a.prop,
@@ -2153,12 +2162,12 @@ function Ze(e) {
2153
2162
  Math.random()
2154
2163
  )
2155
2164
  );
2156
- }), /* @__PURE__ */ l.jsx(Wt, { label: e.title, open: e.expanded === !0, children: n });
2165
+ }), /* @__PURE__ */ l.jsx(Gt, { label: e.title, open: e.expanded === !0, children: n });
2157
2166
  }
2158
- function Za(e) {
2167
+ function Xa(e) {
2159
2168
  return !(e === "alphaHash" || e === "alphaToCoverage" || e === "attenuationDistance" || e === "blendAlpha" || e === "blendColor" || e === "blendDstAlpha" || e === "colorWrite" || e === "combine" || e === "defaultAttributeValues" || e === "depthFunc" || e === "forceSinglePass" || e === "glslVersion" || e === "linecap" || e === "linejoin" || e === "linewidth" || e === "normalMapType" || e === "precision" || e === "premultipliedAlpha" || e === "shadowSide" || e === "toneMapped" || e === "uniformsGroups" || e === "uniformsNeedUpdate" || e === "userData" || e === "vertexColors" || e === "version" || e === "wireframeLinecap" || e === "wireframeLinejoin" || e === "wireframeLinewidth" || e.slice(0, 4) === "clip" || e.slice(0, 7) === "polygon" || e.slice(0, 7) === "stencil" || e.slice(0, 2) === "is");
2160
2169
  }
2161
- function Ja(e) {
2170
+ function Za(e) {
2162
2171
  switch (e) {
2163
2172
  case "Alpha Map":
2164
2173
  return "alphaMap";
@@ -2205,7 +2214,7 @@ function Ja(e) {
2205
2214
  }
2206
2215
  return e;
2207
2216
  }
2208
- function _t(e) {
2217
+ function Rt(e) {
2209
2218
  switch (e) {
2210
2219
  case "alphaMap":
2211
2220
  return "Alpha Map";
@@ -2378,11 +2387,11 @@ function _t(e) {
2378
2387
  }
2379
2388
  return e;
2380
2389
  }
2381
- function $n(e) {
2390
+ function Un(e) {
2382
2391
  const n = e.toLowerCase();
2383
2392
  return n.search("intensity") > -1 || n === "anisotropyrotation" || n === "blendalpha" || n === "bumpscale" || n === "clearcoatroughness" || n === "displacementbias" || n === "displacementscale" || n === "metalness" || n === "opacity" || n === "reflectivity" || n === "refractionratio" || n === "roughness" || n === "sheenroughness" || n === "thickness";
2384
2393
  }
2385
- function Qa() {
2394
+ function Ja() {
2386
2395
  const e = document.createElement("input");
2387
2396
  return e.type = "file", new Promise((n, a) => {
2388
2397
  e.addEventListener("change", function() {
@@ -2397,191 +2406,191 @@ function Qa() {
2397
2406
  }), e.click();
2398
2407
  });
2399
2408
  }
2400
- const ei = [
2409
+ const Qa = [
2401
2410
  {
2402
2411
  title: "Front",
2403
- value: Vn
2412
+ value: Yn
2404
2413
  },
2405
2414
  {
2406
2415
  title: "Back",
2407
- value: vn
2416
+ value: gn
2408
2417
  },
2409
2418
  {
2410
2419
  title: "Double",
2411
- value: bn
2420
+ value: vn
2412
2421
  }
2413
- ], ti = [
2422
+ ], ei = [
2414
2423
  {
2415
2424
  title: "No Blending",
2416
- value: qn
2425
+ value: Vn
2417
2426
  },
2418
2427
  {
2419
2428
  title: "Normal",
2420
- value: Kn
2429
+ value: qn
2421
2430
  },
2422
2431
  {
2423
2432
  title: "Additive",
2424
- value: Xn
2433
+ value: Kn
2425
2434
  },
2426
2435
  {
2427
2436
  title: "Subtractive",
2428
- value: Zn
2437
+ value: Xn
2429
2438
  },
2430
2439
  {
2431
2440
  title: "Multiply",
2432
- value: Jn
2441
+ value: Zn
2433
2442
  },
2434
2443
  {
2435
2444
  title: "Custom",
2436
- value: Qn
2445
+ value: Jn
2437
2446
  }
2438
- ], ni = [
2447
+ ], ti = [
2439
2448
  {
2440
2449
  title: "Add",
2441
- value: ea
2450
+ value: Qn
2442
2451
  },
2443
2452
  {
2444
2453
  title: "Subtract",
2445
- value: ta
2454
+ value: ea
2446
2455
  },
2447
2456
  {
2448
2457
  title: "Reverse Subtract",
2449
- value: na
2458
+ value: ta
2450
2459
  },
2451
2460
  {
2452
2461
  title: "Min",
2453
- value: aa
2462
+ value: na
2454
2463
  },
2455
2464
  {
2456
2465
  title: "Max",
2457
- value: ia
2466
+ value: aa
2458
2467
  }
2459
- ], ai = [
2468
+ ], ni = [
2460
2469
  {
2461
2470
  title: "Zero",
2462
- valye: yn
2471
+ valye: bn
2463
2472
  },
2464
2473
  {
2465
2474
  title: "One",
2466
- valye: En
2475
+ valye: yn
2467
2476
  },
2468
2477
  {
2469
2478
  title: "Src Color",
2470
- valye: xn
2479
+ valye: En
2471
2480
  },
2472
2481
  {
2473
2482
  title: "One Minus Src Color",
2474
- valye: Sn
2483
+ valye: xn
2475
2484
  },
2476
2485
  {
2477
2486
  title: "Src Alpha",
2478
- valye: Cn
2487
+ valye: Sn
2479
2488
  },
2480
2489
  {
2481
2490
  title: "One Minus Src Alpha",
2482
- valye: wn
2491
+ valye: Cn
2483
2492
  },
2484
2493
  {
2485
2494
  title: "Dst Alpha",
2486
- valye: Mn
2495
+ valye: wn
2487
2496
  },
2488
2497
  {
2489
2498
  title: "One Minus Dst Alpha",
2490
- valye: On
2499
+ valye: Mn
2491
2500
  },
2492
2501
  {
2493
2502
  title: "Dst Color",
2494
- valye: Tn
2503
+ valye: On
2495
2504
  },
2496
2505
  {
2497
2506
  title: "One Minus Dst Color",
2498
- valye: Rn
2507
+ valye: Tn
2499
2508
  },
2500
2509
  {
2501
2510
  title: "Src Alpha Saturate",
2502
- valye: ra
2511
+ valye: ia
2503
2512
  },
2504
2513
  {
2505
2514
  title: "Constant Color",
2506
- valye: _n
2515
+ valye: Rn
2507
2516
  },
2508
2517
  {
2509
2518
  title: "One Minus Constant Color",
2510
- valye: kn
2519
+ valye: _n
2511
2520
  },
2512
2521
  {
2513
2522
  title: "Constant Alpha",
2514
- valye: Dn
2523
+ valye: kn
2515
2524
  },
2516
2525
  {
2517
2526
  title: "One Minus Constant Alpha",
2518
- valye: Pn
2527
+ valye: Dn
2519
2528
  }
2520
- ], ii = [
2529
+ ], ai = [
2521
2530
  {
2522
2531
  title: "Zero",
2523
- valye: yn
2532
+ valye: bn
2524
2533
  },
2525
2534
  {
2526
2535
  title: "One",
2527
- valye: En
2536
+ valye: yn
2528
2537
  },
2529
2538
  {
2530
2539
  title: "Src Color",
2531
- valye: xn
2540
+ valye: En
2532
2541
  },
2533
2542
  {
2534
2543
  title: "One Minus Src Color",
2535
- valye: Sn
2544
+ valye: xn
2536
2545
  },
2537
2546
  {
2538
2547
  title: "Src Alpha",
2539
- valye: Cn
2548
+ valye: Sn
2540
2549
  },
2541
2550
  {
2542
2551
  title: "One Minus Src Alpha",
2543
- valye: wn
2552
+ valye: Cn
2544
2553
  },
2545
2554
  {
2546
2555
  title: "Dst Alpha",
2547
- valye: Mn
2556
+ valye: wn
2548
2557
  },
2549
2558
  {
2550
2559
  title: "One Minus Dst Alpha",
2551
- valye: On
2560
+ valye: Mn
2552
2561
  },
2553
2562
  {
2554
2563
  title: "Dst Color",
2555
- valye: Tn
2564
+ valye: On
2556
2565
  },
2557
2566
  {
2558
2567
  title: "One Minus Dst Color",
2559
- valye: Rn
2568
+ valye: Tn
2560
2569
  },
2561
2570
  {
2562
2571
  title: "Constant Color",
2563
- valye: _n
2572
+ valye: Rn
2564
2573
  },
2565
2574
  {
2566
2575
  title: "One Minus Constant Color",
2567
- valye: kn
2576
+ valye: _n
2568
2577
  },
2569
2578
  {
2570
2579
  title: "Constant Alpha",
2571
- valye: Dn
2580
+ valye: kn
2572
2581
  },
2573
2582
  {
2574
2583
  title: "One Minus Constant Alpha",
2575
- valye: Pn
2584
+ valye: Dn
2576
2585
  }
2577
2586
  ];
2578
- function dt(e, n) {
2587
+ function ft(e, n) {
2579
2588
  e.needsUpdate = !0, e.type = "option", e.options = n;
2580
2589
  }
2581
- function ri(e, n, a, t) {
2590
+ function ii(e, n, a, t) {
2582
2591
  return {
2583
2592
  type: "boolean",
2584
- title: _t(e),
2593
+ title: Rt(e),
2585
2594
  prop: e,
2586
2595
  value: n,
2587
2596
  needsUpdate: !0,
@@ -2590,15 +2599,15 @@ function ri(e, n, a, t) {
2590
2599
  const d = t.getScene(a.uuid);
2591
2600
  if (d !== null) {
2592
2601
  const r = d.getObjectByProperty("uuid", a.uuid);
2593
- ee(r, `material.${e}`, o);
2602
+ te(r, `material.${e}`, o);
2594
2603
  }
2595
2604
  }
2596
2605
  };
2597
2606
  }
2598
- function si(e, n, a, t) {
2607
+ function ri(e, n, a, t) {
2599
2608
  const i = {
2600
2609
  type: "number",
2601
- title: _t(e),
2610
+ title: Rt(e),
2602
2611
  prop: e,
2603
2612
  value: n,
2604
2613
  min: void 0,
@@ -2610,33 +2619,33 @@ function si(e, n, a, t) {
2610
2619
  const r = t.getScene(a.uuid);
2611
2620
  if (r !== null) {
2612
2621
  const h = r.getObjectByProperty("uuid", a.uuid);
2613
- ee(h, `material.${e}`, d);
2622
+ te(h, `material.${e}`, d);
2614
2623
  }
2615
2624
  }
2616
2625
  };
2617
2626
  switch (e) {
2618
2627
  case "blending":
2619
- dt(i, ti);
2628
+ ft(i, ei);
2620
2629
  break;
2621
2630
  case "blendDst":
2622
- dt(i, ii);
2631
+ ft(i, ai);
2623
2632
  break;
2624
2633
  case "blendEquation":
2625
- dt(i, ni);
2634
+ ft(i, ti);
2626
2635
  break;
2627
2636
  case "blendSrc":
2628
- dt(i, ai);
2637
+ ft(i, ni);
2629
2638
  break;
2630
2639
  case "side":
2631
- dt(i, ei);
2640
+ ft(i, Qa);
2632
2641
  break;
2633
2642
  }
2634
- return $n(e) && (i.value = Number(n), i.type = "range", i.min = Math.min(0, i.value), i.max = Math.max(1, i.value), i.step = 0.01), i;
2643
+ return Un(e) && (i.value = Number(n), i.type = "range", i.min = Math.min(0, i.value), i.max = Math.max(1, i.value), i.step = 0.01), i;
2635
2644
  }
2636
- function oi(e, n, a, t) {
2645
+ function si(e, n, a, t) {
2637
2646
  const i = {
2638
2647
  type: "string",
2639
- title: _t(e),
2648
+ title: Rt(e),
2640
2649
  prop: e,
2641
2650
  value: n,
2642
2651
  needsUpdate: !0,
@@ -2645,7 +2654,7 @@ function oi(e, n, a, t) {
2645
2654
  const h = t.getScene(a.uuid);
2646
2655
  if (h !== null) {
2647
2656
  const u = h.getObjectByProperty("uuid", a.uuid);
2648
- ee(u, `material.${e}`, r);
2657
+ te(u, `material.${e}`, r);
2649
2658
  }
2650
2659
  },
2651
2660
  onKeyDown: (d) => {
@@ -2656,7 +2665,7 @@ function oi(e, n, a, t) {
2656
2665
  const h = t.getScene(a.uuid);
2657
2666
  if (h !== null) {
2658
2667
  const u = h.getObjectByProperty("uuid", a.uuid);
2659
- ee(u, `material.${e}`, r);
2668
+ te(u, `material.${e}`, r);
2660
2669
  }
2661
2670
  }, i.onKeyDown = (d) => {
2662
2671
  if (d.key === "Enter" && (d.altKey || d.metaKey)) {
@@ -2664,25 +2673,25 @@ function oi(e, n, a, t) {
2664
2673
  const r = t.getScene(a.uuid);
2665
2674
  if (r !== null) {
2666
2675
  const h = r.getObjectByProperty("uuid", a.uuid);
2667
- ee(h, "material.needsUpdate", !0);
2676
+ te(h, "material.needsUpdate", !0);
2668
2677
  }
2669
2678
  }
2670
2679
  }), i;
2671
2680
  }
2672
- function ci(e) {
2681
+ function oi(e) {
2673
2682
  return e.x !== void 0 && e.y !== void 0 && e.z === void 0;
2674
2683
  }
2675
- function li(e) {
2684
+ function ci(e) {
2676
2685
  return e.x !== void 0 && e.y !== void 0 && e.z !== void 0 && e.w === void 0;
2677
2686
  }
2678
- function ui(e) {
2687
+ function li(e) {
2679
2688
  return e.x !== void 0 && e.y !== void 0 && e.z !== void 0 && e.w !== void 0;
2680
2689
  }
2681
- function Ut(e) {
2690
+ function Ft(e) {
2682
2691
  e.sort((n, a) => n.title < a.title ? -1 : n.title > a.title ? 1 : 0);
2683
2692
  }
2684
- function ht(e, n, a, t, i = "", o = !1) {
2685
- const d = _t(e).split(".")[0].replaceAll("[", "").replaceAll("]", ""), r = i.length > 0 ? `${i}.${e}` : e, h = typeof n;
2693
+ function mt(e, n, a, t, i = "", o = !1) {
2694
+ const d = Rt(e).split(".")[0].replaceAll("[", "").replaceAll("]", ""), r = i.length > 0 ? `${i}.${e}` : e, h = typeof n;
2686
2695
  if (h === "boolean" || h === "string")
2687
2696
  return {
2688
2697
  title: d,
@@ -2694,8 +2703,8 @@ function ht(e, n, a, t, i = "", o = !1) {
2694
2703
  t.updateObject(a.uuid, `material.${r}`, f);
2695
2704
  const m = t.getScene(a.uuid);
2696
2705
  if (m !== null) {
2697
- const v = m.getObjectByProperty("uuid", a.uuid);
2698
- ee(v, `material.${r}`, f);
2706
+ const g = m.getObjectByProperty("uuid", a.uuid);
2707
+ te(g, `material.${r}`, f);
2699
2708
  }
2700
2709
  }
2701
2710
  };
@@ -2709,14 +2718,14 @@ function ht(e, n, a, t, i = "", o = !1) {
2709
2718
  disabled: o,
2710
2719
  onChange: (f, m) => {
2711
2720
  t.updateObject(a.uuid, `material.${r}`, m);
2712
- const v = t.getScene(a.uuid);
2713
- if (v !== null) {
2714
- const S = v.getObjectByProperty("uuid", a.uuid);
2715
- ee(S, `material.${r}`, m);
2721
+ const g = t.getScene(a.uuid);
2722
+ if (g !== null) {
2723
+ const S = g.getObjectByProperty("uuid", a.uuid);
2724
+ te(S, `material.${r}`, m);
2716
2725
  }
2717
2726
  }
2718
2727
  };
2719
- return $n(d) && (u.type = "range", u.min = 0, u.max = 1), u;
2728
+ return Un(d) && (u.type = "range", u.min = 0, u.max = 1), u;
2720
2729
  } else {
2721
2730
  if (n.isColor)
2722
2731
  return {
@@ -2726,34 +2735,34 @@ function ht(e, n, a, t, i = "", o = !1) {
2726
2735
  value: n,
2727
2736
  disabled: o,
2728
2737
  onChange: (u, f) => {
2729
- const m = new $t(f);
2738
+ const m = new Ut(f);
2730
2739
  t.updateObject(a.uuid, `material.${r}`, m);
2731
- const v = t.getScene(a.uuid);
2732
- if (v !== null) {
2733
- const S = v.getObjectByProperty("uuid", a.uuid);
2734
- ee(S, `material.${r}`, m);
2740
+ const g = t.getScene(a.uuid);
2741
+ if (g !== null) {
2742
+ const S = g.getObjectByProperty("uuid", a.uuid);
2743
+ te(S, `material.${r}`, m);
2735
2744
  }
2736
2745
  }
2737
2746
  };
2738
2747
  if (Array.isArray(n)) {
2739
2748
  const u = [];
2740
2749
  for (const f in n) {
2741
- const m = n[f], v = `[${f.toString()}]`;
2750
+ const m = n[f], g = `[${f.toString()}]`;
2742
2751
  if (m.value !== void 0) {
2743
- const S = ht(`${v}.value`, m.value, a, t, r, o);
2752
+ const S = mt(`${g}.value`, m.value, a, t, r, o);
2744
2753
  S !== void 0 && u.push(S);
2745
2754
  } else {
2746
- const S = ht(v, m, a, t, r, o);
2755
+ const S = mt(g, m, a, t, r, o);
2747
2756
  S !== void 0 && u.push(S);
2748
2757
  }
2749
2758
  }
2750
2759
  if (u.length > 0)
2751
- return Ut(u), {
2760
+ return Ft(u), {
2752
2761
  title: d,
2753
2762
  items: u
2754
2763
  };
2755
2764
  } else {
2756
- if (ci(n))
2765
+ if (oi(n))
2757
2766
  return {
2758
2767
  title: d,
2759
2768
  prop: r,
@@ -2764,12 +2773,12 @@ function ht(e, n, a, t, i = "", o = !1) {
2764
2773
  t.updateObject(a.uuid, `material.${r}`, f);
2765
2774
  const m = t.getScene(a.uuid);
2766
2775
  if (m !== null) {
2767
- const v = m.getObjectByProperty("uuid", a.uuid);
2768
- ee(v, `material.${r}`, f);
2776
+ const g = m.getObjectByProperty("uuid", a.uuid);
2777
+ te(g, `material.${r}`, f);
2769
2778
  }
2770
2779
  }
2771
2780
  };
2772
- if (li(n))
2781
+ if (ci(n))
2773
2782
  return {
2774
2783
  title: d,
2775
2784
  prop: r,
@@ -2780,12 +2789,12 @@ function ht(e, n, a, t, i = "", o = !1) {
2780
2789
  t.updateObject(a.uuid, `material.${r}`, f);
2781
2790
  const m = t.getScene(a.uuid);
2782
2791
  if (m !== null) {
2783
- const v = m.getObjectByProperty("uuid", a.uuid);
2784
- ee(v, `material.${r}`, f);
2792
+ const g = m.getObjectByProperty("uuid", a.uuid);
2793
+ te(g, `material.${r}`, f);
2785
2794
  }
2786
2795
  }
2787
2796
  };
2788
- if (ui(n))
2797
+ if (li(n))
2789
2798
  return {
2790
2799
  title: d,
2791
2800
  prop: r,
@@ -2796,8 +2805,8 @@ function ht(e, n, a, t, i = "", o = !1) {
2796
2805
  t.updateObject(a.uuid, `material.${r}`, f);
2797
2806
  const m = t.getScene(a.uuid);
2798
2807
  if (m !== null) {
2799
- const v = m.getObjectByProperty("uuid", a.uuid);
2800
- ee(v, `material.${r}`, f);
2808
+ const g = m.getObjectByProperty("uuid", a.uuid);
2809
+ te(g, `material.${r}`, f);
2801
2810
  }
2802
2811
  }
2803
2812
  };
@@ -2812,8 +2821,8 @@ function ht(e, n, a, t, i = "", o = !1) {
2812
2821
  t.updateObject(a.uuid, `material.${r}`, f);
2813
2822
  const m = t.getScene(a.uuid);
2814
2823
  if (m !== null) {
2815
- const v = m.getObjectByProperty("uuid", a.uuid);
2816
- ee(v, `material.${r}`, f);
2824
+ const g = m.getObjectByProperty("uuid", a.uuid);
2825
+ te(g, `material.${r}`, f);
2817
2826
  }
2818
2827
  }
2819
2828
  };
@@ -2824,29 +2833,29 @@ function ht(e, n, a, t, i = "", o = !1) {
2824
2833
  value: n,
2825
2834
  disabled: o,
2826
2835
  onChange: (u, f) => {
2827
- const m = Ja(e), v = i.length > 0 ? `${i}.${m}` : m;
2828
- t.createTexture(a.uuid, `material.${v}`, f);
2836
+ const m = Za(e), g = i.length > 0 ? `${i}.${m}` : m;
2837
+ t.createTexture(a.uuid, `material.${g}`, f);
2829
2838
  const S = t.getScene(a.uuid);
2830
2839
  if (S !== null) {
2831
2840
  const A = S.getObjectByProperty("uuid", a.uuid);
2832
- A !== void 0 && Bn(f.src).then((F) => {
2833
- F.offset.set(f.offset[0], f.offset[1]), F.repeat.set(f.repeat[0], f.repeat[1]);
2834
- const V = A.material, R = v.split(".");
2841
+ A !== void 0 && Ln(f.src).then((N) => {
2842
+ N.offset.set(f.offset[0], f.offset[1]), N.repeat.set(f.repeat[0], f.repeat[1]);
2843
+ const V = A.material, R = g.split(".");
2835
2844
  switch (R.length) {
2836
2845
  case 1:
2837
- V[R[0]] = F;
2846
+ V[R[0]] = N;
2838
2847
  break;
2839
2848
  case 2:
2840
- V[R[0]][R[1]] = F;
2849
+ V[R[0]][R[1]] = N;
2841
2850
  break;
2842
2851
  case 3:
2843
- V[R[0]][R[1]][R[2]] = F;
2852
+ V[R[0]][R[1]][R[2]] = N;
2844
2853
  break;
2845
2854
  case 4:
2846
- V[R[0]][R[1]][R[2]][R[3]] = F;
2855
+ V[R[0]][R[1]][R[2]][R[3]] = N;
2847
2856
  break;
2848
2857
  case 5:
2849
- V[R[0]][R[1]][R[2]][R[3]][R[4]] = F;
2858
+ V[R[0]][R[1]][R[2]][R[3]][R[4]] = N;
2850
2859
  break;
2851
2860
  }
2852
2861
  V.needsUpdate = !0;
@@ -2865,8 +2874,8 @@ function ht(e, n, a, t, i = "", o = !1) {
2865
2874
  t.updateObject(a.uuid, `material.${r}`, f);
2866
2875
  const m = t.getScene(a.uuid);
2867
2876
  if (m !== null) {
2868
- const v = m.getObjectByProperty("uuid", a.uuid);
2869
- ee(v, `material.${r}`, f);
2877
+ const g = m.getObjectByProperty("uuid", a.uuid);
2878
+ te(g, `material.${r}`, f);
2870
2879
  }
2871
2880
  }
2872
2881
  };
@@ -2874,13 +2883,13 @@ function ht(e, n, a, t, i = "", o = !1) {
2874
2883
  const u = [], f = e === "defines" || e === "extensions";
2875
2884
  try {
2876
2885
  for (const m in n) {
2877
- const v = n[m];
2878
- if (v !== void 0)
2879
- if (v.value !== void 0) {
2880
- const S = ht(`${m}.value`, v.value, a, t, r, f);
2886
+ const g = n[m];
2887
+ if (g !== void 0)
2888
+ if (g.value !== void 0) {
2889
+ const S = mt(`${m}.value`, g.value, a, t, r, f);
2881
2890
  S !== void 0 && u.push(S);
2882
2891
  } else {
2883
- const S = ht(m, v, a, t, r, f);
2892
+ const S = mt(m, g, a, t, r, f);
2884
2893
  S !== void 0 && u.push(S);
2885
2894
  }
2886
2895
  }
@@ -2888,7 +2897,7 @@ function ht(e, n, a, t, i = "", o = !1) {
2888
2897
  console.log("Issue cycling through material object:", e, n);
2889
2898
  }
2890
2899
  if (u.length > 0)
2891
- return Ut(u), {
2900
+ return Ft(u), {
2892
2901
  title: d,
2893
2902
  items: u
2894
2903
  };
@@ -2896,25 +2905,25 @@ function ht(e, n, a, t, i = "", o = !1) {
2896
2905
  }
2897
2906
  }
2898
2907
  }
2899
- function ln(e, n, a) {
2908
+ function cn(e, n, a) {
2900
2909
  const t = [];
2901
2910
  for (const i in e) {
2902
- if (!Za(i))
2911
+ if (!Xa(i))
2903
2912
  continue;
2904
2913
  const o = typeof e[i], d = e[i];
2905
2914
  if (o === "boolean")
2906
- t.push(ri(i, d, n, a));
2915
+ t.push(ii(i, d, n, a));
2907
2916
  else if (o === "number")
2908
- t.push(si(i, d, n, a));
2917
+ t.push(ri(i, d, n, a));
2909
2918
  else if (o === "string")
2910
- t.push(oi(i, d, n, a));
2919
+ t.push(si(i, d, n, a));
2911
2920
  else if (o === "object") {
2912
- const r = ht(i, d, n, a);
2921
+ const r = mt(i, d, n, a);
2913
2922
  r !== void 0 && t.push(r);
2914
2923
  } else
2915
2924
  d !== void 0 && console.log("other:", i, o, d);
2916
2925
  }
2917
- return Ut(t), t.push({
2926
+ return Ft(t), t.push({
2918
2927
  title: "Update Material",
2919
2928
  type: "button",
2920
2929
  onChange: () => {
@@ -2922,22 +2931,22 @@ function ln(e, n, a) {
2922
2931
  const i = a.getScene(n.uuid);
2923
2932
  if (i !== null) {
2924
2933
  const o = i.getObjectByProperty("uuid", n.uuid);
2925
- ee(o, "material.needsUpdate", !0);
2934
+ te(o, "material.needsUpdate", !0);
2926
2935
  }
2927
2936
  }
2928
2937
  }), t;
2929
2938
  }
2930
- function di(e, n) {
2939
+ function ui(e, n) {
2931
2940
  const a = e.material;
2932
2941
  if (Array.isArray(a)) {
2933
2942
  const t = [], i = a.length;
2934
2943
  for (let o = 0; o < i; o++)
2935
2944
  t.push(
2936
2945
  /* @__PURE__ */ l.jsx(
2937
- Ze,
2946
+ et,
2938
2947
  {
2939
2948
  title: `Material ${o}`,
2940
- items: ln(a[o], e, n)
2949
+ items: cn(a[o], e, n)
2941
2950
  },
2942
2951
  `Material ${o}`
2943
2952
  )
@@ -2945,49 +2954,49 @@ function di(e, n) {
2945
2954
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: t });
2946
2955
  } else
2947
2956
  return /* @__PURE__ */ l.jsx(
2948
- Ze,
2957
+ et,
2949
2958
  {
2950
2959
  title: "Material",
2951
- items: ln(a, e, n)
2960
+ items: cn(a, e, n)
2952
2961
  }
2953
2962
  );
2954
2963
  }
2955
- const hi = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
2956
- function fi(e) {
2957
- const n = Y(null), a = Y(null), t = Y(null), i = Y(null), o = Y(null), [d] = H(e.value), [r, h] = H(e.value.offset[0]), [u, f] = H(e.value.offset[1]), [m, v] = H(e.value.repeat[0]), [S, A] = H(e.value.repeat[1]);
2958
- function F(R, I, T, Z, te) {
2964
+ const di = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
2965
+ function hi(e) {
2966
+ const n = Y(null), a = Y(null), t = Y(null), i = Y(null), o = Y(null), [d] = G(e.value), [r, h] = G(e.value.offset[0]), [u, f] = G(e.value.offset[1]), [m, g] = G(e.value.repeat[0]), [S, A] = G(e.value.repeat[1]);
2967
+ function N(R, L, T, X, ne) {
2959
2968
  if (e.onChange !== void 0) {
2960
- const pe = e.prop !== void 0 ? e.prop : e.title;
2961
- e.onChange(pe, {
2969
+ const ge = e.prop !== void 0 ? e.prop : e.title;
2970
+ e.onChange(ge, {
2962
2971
  src: R,
2963
- offset: [I, T],
2964
- repeat: [Z, te]
2972
+ offset: [L, T],
2973
+ repeat: [X, ne]
2965
2974
  });
2966
2975
  }
2967
2976
  }
2968
2977
  function V(R) {
2969
- const I = n.current.src, T = R.target.value;
2978
+ const L = n.current.src, T = R.target.value;
2970
2979
  switch (R.target) {
2971
2980
  case a.current:
2972
- h(T), F(I, T, u, m, S);
2981
+ h(T), N(L, T, u, m, S);
2973
2982
  break;
2974
2983
  case t.current:
2975
- f(T), F(I, r, T, m, S);
2984
+ f(T), N(L, r, T, m, S);
2976
2985
  break;
2977
2986
  case i.current:
2978
- v(T), F(I, r, u, T, S);
2987
+ g(T), N(L, r, u, T, S);
2979
2988
  break;
2980
2989
  case o.current:
2981
- A(T), F(I, r, u, m, T);
2990
+ A(T), N(L, r, u, m, T);
2982
2991
  break;
2983
2992
  }
2984
2993
  }
2985
2994
  return /* @__PURE__ */ l.jsxs("div", { className: "imageField", children: [
2986
2995
  /* @__PURE__ */ l.jsx("img", { alt: e.title, ref: n, onClick: () => {
2987
- Qa().then((R) => {
2988
- n.current.src = R, F(R, r, u, m, S);
2996
+ Ja().then((R) => {
2997
+ n.current.src = R, N(R, r, u, m, S);
2989
2998
  });
2990
- }, src: d.src.length > 0 ? d.src : hi }),
2999
+ }, src: d.src.length > 0 ? d.src : di }),
2991
3000
  /* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
2992
3001
  /* @__PURE__ */ l.jsxs("div", { children: [
2993
3002
  /* @__PURE__ */ l.jsx("label", { children: "Offset:" }),
@@ -3038,10 +3047,10 @@ function fi(e) {
3038
3047
  ] })
3039
3048
  ] });
3040
3049
  }
3041
- function wt(e) {
3050
+ function Ct(e) {
3042
3051
  let n = e.value;
3043
- n !== void 0 && n.isColor !== void 0 && (n = Da(e.value));
3044
- const [a, t] = H(n), i = Y(null), o = (u) => {
3052
+ n !== void 0 && n.isColor !== void 0 && (n = ka(e.value));
3053
+ const [a, t] = G(n), i = Y(null), o = (u) => {
3045
3054
  let f = u.target.value;
3046
3055
  e.type === "boolean" ? f = u.target.checked : e.type === "option" && (f = e.options[f].value), t(f), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, f);
3047
3056
  }, d = {};
@@ -3049,7 +3058,7 @@ function wt(e) {
3049
3058
  const r = e.type === "string" && (a.length > 100 || a.search(`
3050
3059
  `) > -1), h = r || e.type === "image" || e.type === "vector2";
3051
3060
  return /* @__PURE__ */ l.jsxs("div", { className: `field ${h ? "block" : ""}`, style: d, children: [
3052
- e.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: Ot(e.title) }, "fieldLabel"),
3061
+ e.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: Mt(e.title) }, "fieldLabel"),
3053
3062
  e.type === "string" && !r && /* @__PURE__ */ l.jsx(
3054
3063
  "input",
3055
3064
  {
@@ -3082,7 +3091,7 @@ function wt(e) {
3082
3091
  }
3083
3092
  ),
3084
3093
  e.type === "number" && /* @__PURE__ */ l.jsx(
3085
- Xe,
3094
+ Qe,
3086
3095
  {
3087
3096
  value: a,
3088
3097
  type: e.type,
@@ -3096,7 +3105,7 @@ function wt(e) {
3096
3105
  }
3097
3106
  ),
3098
3107
  e.type === "range" && /* @__PURE__ */ l.jsx(
3099
- Xe,
3108
+ Qe,
3100
3109
  {
3101
3110
  value: a,
3102
3111
  type: e.type,
@@ -3123,15 +3132,15 @@ function wt(e) {
3123
3132
  children: e.title
3124
3133
  }
3125
3134
  ),
3126
- e.type === "image" && /* @__PURE__ */ l.jsx(fi, { title: e.title, prop: e.prop, value: e.value, onChange: e.onChange }),
3127
- e.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: o, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((u, f) => /* @__PURE__ */ l.jsx("option", { value: u.value, children: Ot(u.title) }, f)) }) }),
3128
- e.type === "vector2" && /* @__PURE__ */ l.jsx(qa, { value: a, min: 0, max: 1, onChange: o }),
3129
- e.type === "grid3" && /* @__PURE__ */ l.jsx(cn, { value: a, onChange: o }),
3130
- e.type === "grid4" && /* @__PURE__ */ l.jsx(Ka, { value: a, onChange: o }),
3131
- e.type === "euler" && /* @__PURE__ */ l.jsx(cn, { value: a, onChange: o })
3135
+ e.type === "image" && /* @__PURE__ */ l.jsx(hi, { title: e.title, prop: e.prop, value: e.value, onChange: e.onChange }),
3136
+ e.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: o, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((u, f) => /* @__PURE__ */ l.jsx("option", { value: u.value, children: Mt(u.title) }, f)) }) }),
3137
+ e.type === "vector2" && /* @__PURE__ */ l.jsx(Va, { value: a, min: 0, max: 1, onChange: o }),
3138
+ e.type === "grid3" && /* @__PURE__ */ l.jsx(on, { value: a, onChange: o }),
3139
+ e.type === "grid4" && /* @__PURE__ */ l.jsx(qa, { value: a, onChange: o }),
3140
+ e.type === "euler" && /* @__PURE__ */ l.jsx(on, { value: a, onChange: o })
3132
3141
  ] });
3133
3142
  }
3134
- function un(e) {
3143
+ function ln(e) {
3135
3144
  switch (e) {
3136
3145
  case "fov":
3137
3146
  return "FOV";
@@ -3160,12 +3169,12 @@ function un(e) {
3160
3169
  }
3161
3170
  return e;
3162
3171
  }
3163
- function mi(e, n) {
3172
+ function fi(e, n) {
3164
3173
  const a = [];
3165
3174
  if (e.perspectiveCameraInfo !== void 0)
3166
3175
  for (const t in e.perspectiveCameraInfo)
3167
3176
  a.push({
3168
- title: un(t),
3177
+ title: ln(t),
3169
3178
  prop: t,
3170
3179
  type: "number",
3171
3180
  step: 0.01,
@@ -3175,14 +3184,14 @@ function mi(e, n) {
3175
3184
  const d = n.getScene(e.uuid);
3176
3185
  if (d !== null) {
3177
3186
  const r = d.getObjectByProperty("uuid", e.uuid);
3178
- r !== void 0 && (ee(r, i, o), r.updateProjectionMatrix());
3187
+ r !== void 0 && (te(r, i, o), r.updateProjectionMatrix());
3179
3188
  }
3180
3189
  }
3181
3190
  });
3182
3191
  else if (e.orthographicCameraInfo !== void 0)
3183
3192
  for (const t in e.orthographicCameraInfo)
3184
3193
  a.push({
3185
- title: un(t),
3194
+ title: ln(t),
3186
3195
  prop: t,
3187
3196
  type: "number",
3188
3197
  step: 0.01,
@@ -3192,22 +3201,22 @@ function mi(e, n) {
3192
3201
  const d = n.getScene(e.uuid);
3193
3202
  if (d !== null) {
3194
3203
  const r = d.getObjectByProperty("uuid", e.uuid);
3195
- r !== void 0 && (ee(r, i, o), r.updateProjectionMatrix());
3204
+ r !== void 0 && (te(r, i, o), r.updateProjectionMatrix());
3196
3205
  }
3197
3206
  }
3198
3207
  });
3199
3208
  return /* @__PURE__ */ l.jsx(
3200
- Ze,
3209
+ et,
3201
3210
  {
3202
3211
  title: "Camera",
3203
3212
  items: a
3204
3213
  }
3205
3214
  );
3206
3215
  }
3207
- function pi(e, n) {
3208
- const a = new sa();
3216
+ function mi(e, n) {
3217
+ const a = new ra();
3209
3218
  a.elements = e.matrix;
3210
- const t = new J(), i = new oa(), o = new J();
3219
+ const t = new J(), i = new sa(), o = new J();
3211
3220
  e.uuid.length > 0 && (t.setFromMatrixPosition(a), i.setFromRotationMatrix(a), o.setFromMatrixScale(a));
3212
3221
  const d = (r, h) => {
3213
3222
  const u = r === "rotation" ? { x: h._x, y: h._y, z: h._z } : h;
@@ -3215,11 +3224,11 @@ function pi(e, n) {
3215
3224
  const f = n.getScene(e.uuid);
3216
3225
  if (f !== null) {
3217
3226
  const m = f.getObjectByProperty("uuid", e.uuid);
3218
- ee(m, r, u);
3227
+ te(m, r, u);
3219
3228
  }
3220
3229
  };
3221
3230
  return /* @__PURE__ */ l.jsx(
3222
- Ze,
3231
+ et,
3223
3232
  {
3224
3233
  title: "Transform",
3225
3234
  items: [
@@ -3248,7 +3257,7 @@ function pi(e, n) {
3248
3257
  }
3249
3258
  );
3250
3259
  }
3251
- function dn(e) {
3260
+ function un(e) {
3252
3261
  switch (e) {
3253
3262
  case "color":
3254
3263
  return "Color";
@@ -3271,27 +3280,27 @@ function dn(e) {
3271
3280
  }
3272
3281
  return e;
3273
3282
  }
3274
- function gi(e, n) {
3283
+ function pi(e, n) {
3275
3284
  const a = [];
3276
3285
  if (e.lightInfo !== void 0)
3277
3286
  for (const t in e.lightInfo) {
3278
3287
  const i = e.lightInfo[t];
3279
3288
  i !== void 0 && (i.isColor !== void 0 ? a.push({
3280
- title: dn(t),
3289
+ title: un(t),
3281
3290
  prop: t,
3282
3291
  type: "color",
3283
3292
  value: i,
3284
3293
  onChange: (o, d) => {
3285
- const r = new $t(d);
3294
+ const r = new Ut(d);
3286
3295
  n.updateObject(e.uuid, o, r);
3287
3296
  const h = n.getScene(e.uuid);
3288
3297
  if (h !== null) {
3289
3298
  const u = h.getObjectByProperty("uuid", e.uuid);
3290
- ee(u, o, r);
3299
+ te(u, o, r);
3291
3300
  }
3292
3301
  }
3293
3302
  }) : a.push({
3294
- title: dn(t),
3303
+ title: un(t),
3295
3304
  prop: t,
3296
3305
  type: typeof i,
3297
3306
  value: i,
@@ -3301,20 +3310,20 @@ function gi(e, n) {
3301
3310
  const r = n.getScene(e.uuid);
3302
3311
  if (r !== null) {
3303
3312
  const h = r.getObjectByProperty("uuid", e.uuid);
3304
- ee(h, o, d);
3313
+ te(h, o, d);
3305
3314
  }
3306
3315
  }
3307
3316
  }));
3308
3317
  }
3309
3318
  return /* @__PURE__ */ l.jsx(
3310
- Ze,
3319
+ et,
3311
3320
  {
3312
3321
  title: "Light",
3313
3322
  items: a
3314
3323
  }
3315
3324
  );
3316
3325
  }
3317
- function vi(e, n) {
3326
+ function gi(e, n) {
3318
3327
  const a = [], t = [];
3319
3328
  let i = 0;
3320
3329
  e.animations.forEach((d) => {
@@ -3381,9 +3390,9 @@ function vi(e, n) {
3381
3390
  }
3382
3391
  }
3383
3392
  }
3384
- return /* @__PURE__ */ l.jsx(Ze, { title: "Animation", items: a });
3393
+ return /* @__PURE__ */ l.jsx(et, { title: "Animation", items: a });
3385
3394
  }
3386
- const zn = {
3395
+ const $n = {
3387
3396
  name: "",
3388
3397
  uuid: "",
3389
3398
  type: "",
@@ -3396,65 +3405,65 @@ const zn = {
3396
3405
  lightInfo: void 0,
3397
3406
  children: []
3398
3407
  };
3399
- let fe = { ...zn };
3400
- function bi(e) {
3401
- const [n, a] = H(-1);
3408
+ let me = { ...$n };
3409
+ function vi(e) {
3410
+ const [n, a] = G(-1);
3402
3411
  Re(() => {
3403
3412
  function d(h) {
3404
- fe = { ...h.value }, a(Date.now());
3413
+ me = { ...h.value }, a(Date.now());
3405
3414
  }
3406
3415
  function r() {
3407
- fe = { ...zn }, a(Date.now());
3416
+ me = { ...$n }, a(Date.now());
3408
3417
  }
3409
3418
  return D.addEventListener(P.SET_SCENE, r), D.addEventListener(P.SET_OBJECT, d), () => {
3410
3419
  D.removeEventListener(P.SET_SCENE, r), D.removeEventListener(P.SET_OBJECT, d);
3411
3420
  };
3412
3421
  }, []);
3413
- const t = fe.type.toLowerCase(), i = fe.animations.length > 0 || fe.mixer !== void 0, o = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
3414
- return /* @__PURE__ */ l.jsx(Wt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: e.class, children: fe.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3422
+ const t = me.type.toLowerCase(), i = me.animations.length > 0 || me.mixer !== void 0, o = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
3423
+ return /* @__PURE__ */ l.jsx(Gt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: e.class, children: me.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3415
3424
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3416
3425
  /* @__PURE__ */ l.jsx(
3417
- wt,
3426
+ Ct,
3418
3427
  {
3419
3428
  type: "string",
3420
3429
  title: "Name",
3421
3430
  prop: "name",
3422
- value: fe.name,
3431
+ value: me.name,
3423
3432
  disabled: !0
3424
3433
  }
3425
3434
  ),
3426
3435
  /* @__PURE__ */ l.jsx(
3427
- wt,
3436
+ Ct,
3428
3437
  {
3429
3438
  type: "string",
3430
3439
  title: "Type",
3431
3440
  prop: "type",
3432
- value: fe.type,
3441
+ value: me.type,
3433
3442
  disabled: !0
3434
3443
  }
3435
3444
  ),
3436
3445
  /* @__PURE__ */ l.jsx(
3437
- wt,
3446
+ Ct,
3438
3447
  {
3439
3448
  type: "string",
3440
3449
  title: "UUID",
3441
3450
  prop: "uuid",
3442
- value: fe.uuid,
3451
+ value: me.uuid,
3443
3452
  disabled: !0
3444
3453
  }
3445
3454
  )
3446
3455
  ] }),
3447
3456
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3448
- pi(fe, e.three),
3449
- i ? vi(fe, e.three) : null,
3450
- t.search("camera") > -1 ? mi(fe, e.three) : null,
3451
- t.search("light") > -1 ? gi(fe, e.three) : null,
3452
- o ? di(fe, e.three) : null
3457
+ mi(me, e.three),
3458
+ i ? gi(me, e.three) : null,
3459
+ t.search("camera") > -1 ? fi(me, e.three) : null,
3460
+ t.search("light") > -1 ? pi(me, e.three) : null,
3461
+ o ? ui(me, e.three) : null
3453
3462
  ] })
3454
3463
  ] }) }, n) }, "Inspector");
3455
3464
  }
3456
- function Ui(e) {
3457
- const [n] = H([]), [a, t] = H(0), i = (r) => {
3465
+ function Fi(e) {
3466
+ const [n] = G([]), [a, t] = G(0), i = (r) => {
3458
3467
  n.push(r.value), t(Date.now());
3459
3468
  }, o = (r) => {
3460
3469
  const h = r.value;
@@ -3470,14 +3479,14 @@ function Ui(e) {
3470
3479
  const d = [];
3471
3480
  return n.forEach((r, h) => {
3472
3481
  d.push(
3473
- /* @__PURE__ */ l.jsx(Wt, { label: `Scene: ${r.name}`, open: !0, children: /* @__PURE__ */ l.jsx(Ya, { child: r, scene: r, three: e.three }) }, `scene_${h}`)
3482
+ /* @__PURE__ */ l.jsx(Gt, { label: `Scene: ${r.name}`, open: !0, children: /* @__PURE__ */ l.jsx(Ha, { child: r, scene: r, three: e.three }) }, `scene_${h}`)
3474
3483
  );
3475
3484
  }), /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
3476
3485
  d,
3477
- /* @__PURE__ */ l.jsx(bi, { three: e.three })
3486
+ /* @__PURE__ */ l.jsx(vi, { three: e.three })
3478
3487
  ] }, `SidePanel ${a}`);
3479
3488
  }
3480
- function $i(e) {
3489
+ function Ui(e) {
3481
3490
  return Re(() => {
3482
3491
  function n(r) {
3483
3492
  let h = null;
@@ -3490,30 +3499,30 @@ function $i(e) {
3490
3499
  f !== void 0 ? e.three.setObject(f) : console.log(`Hermes - can't find object: ${h}`, u);
3491
3500
  }, t = (r, h, u) => {
3492
3501
  const f = n(r), m = f?.getObjectByProperty("uuid", r);
3493
- m !== void 0 ? ee(m, h, u) : console.log(`Hermes - can't set object: ${r}`, f);
3502
+ m !== void 0 ? te(m, h, u) : console.log(`Hermes - can't set object: ${r}`, f);
3494
3503
  }, i = (r) => {
3495
3504
  const h = r.value, { key: u, value: f, uuid: m } = h;
3496
3505
  t(m, u, f);
3497
3506
  }, o = (r) => {
3498
3507
  const h = r.value, f = n(h.uuid)?.getObjectByProperty("uuid", h.uuid);
3499
- f !== void 0 && Bn(h.value.src).then((m) => {
3508
+ f !== void 0 && Ln(h.value.src).then((m) => {
3500
3509
  m.offset.set(h.value.offset[0], h.value.offset[1]), m.repeat.set(h.value.repeat[0], h.value.repeat[1]);
3501
- const v = h.key.split(".");
3502
- switch (v.length) {
3510
+ const g = h.key.split(".");
3511
+ switch (g.length) {
3503
3512
  case 1:
3504
- f[v[0]] = m;
3513
+ f[g[0]] = m;
3505
3514
  break;
3506
3515
  case 2:
3507
- f[v[0]][v[1]] = m;
3516
+ f[g[0]][g[1]] = m;
3508
3517
  break;
3509
3518
  case 3:
3510
- f[v[0]][v[1]][v[2]] = m;
3519
+ f[g[0]][g[1]][g[2]] = m;
3511
3520
  break;
3512
3521
  case 4:
3513
- f[v[0]][v[1]][v[2]][v[3]] = m;
3522
+ f[g[0]][g[1]][g[2]][g[3]] = m;
3514
3523
  break;
3515
3524
  case 5:
3516
- f[v[0]][v[1]][v[2]][v[3]][v[4]] = m;
3525
+ f[g[0]][g[1]][g[2]][g[3]][g[4]] = m;
3517
3526
  break;
3518
3527
  }
3519
3528
  f.material.needsUpdate = !0;
@@ -3522,7 +3531,7 @@ function $i(e) {
3522
3531
  const { key: h, uuid: u, value: f, subitem: m } = r.value, S = n(u)?.getObjectByProperty("uuid", u);
3523
3532
  if (S !== void 0)
3524
3533
  try {
3525
- m !== void 0 ? Na(S, m)[h](f) : S[h](f);
3534
+ m !== void 0 ? Ia(S, m)[h](f) : S[h](f);
3526
3535
  } catch (A) {
3527
3536
  console.log("Error requesting method:"), console.log(A), console.log(h), console.log(f);
3528
3537
  }
@@ -3532,14 +3541,14 @@ function $i(e) {
3532
3541
  };
3533
3542
  }, []), null;
3534
3543
  }
3535
- class yi extends ca {
3544
+ class bi extends oa {
3536
3545
  constructor(n, a) {
3537
- const t = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new Kt();
3538
- i.setAttribute("position", new Xt(t, 3)), i.computeBoundingSphere();
3539
- const o = new la({ fog: !1 });
3546
+ const t = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new qt();
3547
+ i.setAttribute("position", new Kt(t, 3)), i.computeBoundingSphere();
3548
+ const o = new ca({ fog: !1 });
3540
3549
  super(i, o), this.light = n, this.color = a, this.type = "RectAreaLightHelper";
3541
- const d = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], r = new Kt();
3542
- r.setAttribute("position", new Xt(d, 3)), r.computeBoundingSphere(), this.add(new An(r, new jn({ side: vn, fog: !1 })));
3550
+ const d = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], r = new qt();
3551
+ r.setAttribute("position", new Kt(d, 3)), r.computeBoundingSphere(), this.add(new Pn(r, new An({ side: gn, fog: !1 })));
3543
3552
  }
3544
3553
  updateMatrixWorld() {
3545
3554
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -3555,62 +3564,62 @@ class yi extends ca {
3555
3564
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3556
3565
  }
3557
3566
  }
3558
- const hn = { type: "change" }, It = { type: "start" }, fn = { type: "end" }, Et = new ua(), mn = new da(), Ei = Math.cos(70 * ha.DEG2RAD);
3559
- class xi extends pn {
3567
+ const dn = { type: "change" }, jt = { type: "start" }, hn = { type: "end" }, Et = new la(), fn = new ua(), yi = Math.cos(70 * da.DEG2RAD);
3568
+ class Ei extends mn {
3560
3569
  constructor(n, a) {
3561
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new J(), this.cursor = new J(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: nt.ROTATE, MIDDLE: nt.DOLLY, RIGHT: nt.PAN }, this.touches = { ONE: at.ROTATE, TWO: at.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3570
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new J(), this.cursor = new J(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: it.ROTATE, MIDDLE: it.DOLLY, RIGHT: it.PAN }, this.touches = { ONE: rt.ROTATE, TWO: rt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3562
3571
  return r.phi;
3563
3572
  }, this.getAzimuthalAngle = function() {
3564
3573
  return r.theta;
3565
3574
  }, this.getDistance = function() {
3566
3575
  return this.object.position.distanceTo(this.target);
3567
3576
  }, this.listenToKeyEvents = function(c) {
3568
- c.addEventListener("keydown", ot), this._domElementKeyEvents = c;
3577
+ c.addEventListener("keydown", lt), this._domElementKeyEvents = c;
3569
3578
  }, this.stopListenToKeyEvents = function() {
3570
- this._domElementKeyEvents.removeEventListener("keydown", ot), this._domElementKeyEvents = null;
3579
+ this._domElementKeyEvents.removeEventListener("keydown", lt), this._domElementKeyEvents = null;
3571
3580
  }, this.saveState = function() {
3572
3581
  t.target0.copy(t.target), t.position0.copy(t.object.position), t.zoom0 = t.object.zoom;
3573
3582
  }, this.reset = function() {
3574
- t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(hn), t.update(), o = i.NONE;
3583
+ t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(dn), t.update(), o = i.NONE;
3575
3584
  }, this.update = function() {
3576
- const c = new J(), E = new Zt().setFromUnitVectors(n.up, new J(0, 1, 0)), k = E.clone().invert(), B = new J(), ie = new Zt(), Ee = new J(), de = 2 * Math.PI;
3585
+ const c = new J(), E = new Xt().setFromUnitVectors(n.up, new J(0, 1, 0)), k = E.clone().invert(), F = new J(), re = new Xt(), xe = new J(), de = 2 * Math.PI;
3577
3586
  return function(vt = null) {
3578
3587
  const bt = t.object.position;
3579
- c.copy(bt).sub(t.target), c.applyQuaternion(E), r.setFromVector3(c), t.autoRotate && o === i.NONE && be(_e(vt)), t.enableDamping ? (r.theta += h.theta * t.dampingFactor, r.phi += h.phi * t.dampingFactor) : (r.theta += h.theta, r.phi += h.phi);
3580
- let xe = t.minAzimuthAngle, Se = t.maxAzimuthAngle;
3581
- isFinite(xe) && isFinite(Se) && (xe < -Math.PI ? xe += de : xe > Math.PI && (xe -= de), Se < -Math.PI ? Se += de : Se > Math.PI && (Se -= de), xe <= Se ? r.theta = Math.max(xe, Math.min(Se, r.theta)) : r.theta = r.theta > (xe + Se) / 2 ? Math.max(xe, r.theta) : Math.min(Se, r.theta)), r.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, r.phi)), r.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(f, t.dampingFactor) : t.target.add(f), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor);
3582
- let Ve = !1;
3583
- if (t.zoomToCursor && pe || t.object.isOrthographicCamera)
3588
+ c.copy(bt).sub(t.target), c.applyQuaternion(E), r.setFromVector3(c), t.autoRotate && o === i.NONE && ye(_e(vt)), t.enableDamping ? (r.theta += h.theta * t.dampingFactor, r.phi += h.phi * t.dampingFactor) : (r.theta += h.theta, r.phi += h.phi);
3589
+ let Se = t.minAzimuthAngle, Ce = t.maxAzimuthAngle;
3590
+ isFinite(Se) && isFinite(Ce) && (Se < -Math.PI ? Se += de : Se > Math.PI && (Se -= de), Ce < -Math.PI ? Ce += de : Ce > Math.PI && (Ce -= de), Se <= Ce ? r.theta = Math.max(Se, Math.min(Ce, r.theta)) : r.theta = r.theta > (Se + Ce) / 2 ? Math.max(Se, r.theta) : Math.min(Ce, r.theta)), r.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, r.phi)), r.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(f, t.dampingFactor) : t.target.add(f), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor);
3591
+ let Xe = !1;
3592
+ if (t.zoomToCursor && ge || t.object.isOrthographicCamera)
3584
3593
  r.radius = Ae(r.radius);
3585
3594
  else {
3586
3595
  const Oe = r.radius;
3587
- r.radius = Ae(r.radius * u), Ve = Oe != r.radius;
3596
+ r.radius = Ae(r.radius * u), Xe = Oe != r.radius;
3588
3597
  }
3589
- if (c.setFromSpherical(r), c.applyQuaternion(k), bt.copy(t.target).add(c), t.object.lookAt(t.target), t.enableDamping === !0 ? (h.theta *= 1 - t.dampingFactor, h.phi *= 1 - t.dampingFactor, f.multiplyScalar(1 - t.dampingFactor)) : (h.set(0, 0, 0), f.set(0, 0, 0)), t.zoomToCursor && pe) {
3598
+ if (c.setFromSpherical(r), c.applyQuaternion(k), bt.copy(t.target).add(c), t.object.lookAt(t.target), t.enableDamping === !0 ? (h.theta *= 1 - t.dampingFactor, h.phi *= 1 - t.dampingFactor, f.multiplyScalar(1 - t.dampingFactor)) : (h.set(0, 0, 0), f.set(0, 0, 0)), t.zoomToCursor && ge) {
3590
3599
  let Oe = null;
3591
3600
  if (t.object.isPerspectiveCamera) {
3592
- const ze = c.length();
3593
- Oe = Ae(ze * u);
3594
- const et = ze - Oe;
3595
- t.object.position.addScaledVector(Z, et), t.object.updateMatrixWorld(), Ve = !!et;
3601
+ const He = c.length();
3602
+ Oe = Ae(He * u);
3603
+ const nt = He - Oe;
3604
+ t.object.position.addScaledVector(X, nt), t.object.updateMatrixWorld(), Xe = !!nt;
3596
3605
  } else if (t.object.isOrthographicCamera) {
3597
- const ze = new J(te.x, te.y, 0);
3598
- ze.unproject(t.object);
3599
- const et = t.object.zoom;
3600
- t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / u)), t.object.updateProjectionMatrix(), Ve = et !== t.object.zoom;
3601
- const yt = new J(te.x, te.y, 0);
3602
- yt.unproject(t.object), t.object.position.sub(yt).add(ze), t.object.updateMatrixWorld(), Oe = c.length();
3606
+ const He = new J(ne.x, ne.y, 0);
3607
+ He.unproject(t.object);
3608
+ const nt = t.object.zoom;
3609
+ t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / u)), t.object.updateProjectionMatrix(), Xe = nt !== t.object.zoom;
3610
+ const yt = new J(ne.x, ne.y, 0);
3611
+ yt.unproject(t.object), t.object.position.sub(yt).add(He), t.object.updateMatrixWorld(), Oe = c.length();
3603
3612
  } else
3604
3613
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
3605
- Oe !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(Oe).add(t.object.position) : (Et.origin.copy(t.object.position), Et.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Et.direction)) < Ei ? n.lookAt(t.target) : (mn.setFromNormalAndCoplanarPoint(t.object.up, t.target), Et.intersectPlane(mn, t.target))));
3614
+ Oe !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(Oe).add(t.object.position) : (Et.origin.copy(t.object.position), Et.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Et.direction)) < yi ? n.lookAt(t.target) : (fn.setFromNormalAndCoplanarPoint(t.object.up, t.target), Et.intersectPlane(fn, t.target))));
3606
3615
  } else if (t.object.isOrthographicCamera) {
3607
3616
  const Oe = t.object.zoom;
3608
- t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / u)), Oe !== t.object.zoom && (t.object.updateProjectionMatrix(), Ve = !0);
3617
+ t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / u)), Oe !== t.object.zoom && (t.object.updateProjectionMatrix(), Xe = !0);
3609
3618
  }
3610
- return u = 1, pe = !1, Ve || B.distanceToSquared(t.object.position) > d || 8 * (1 - ie.dot(t.object.quaternion)) > d || Ee.distanceToSquared(t.target) > d ? (t.dispatchEvent(hn), B.copy(t.object.position), ie.copy(t.object.quaternion), Ee.copy(t.target), !0) : !1;
3619
+ return u = 1, ge = !1, Xe || F.distanceToSquared(t.object.position) > d || 8 * (1 - re.dot(t.object.quaternion)) > d || xe.distanceToSquared(t.target) > d ? (t.dispatchEvent(dn), F.copy(t.object.position), re.copy(t.object.quaternion), xe.copy(t.target), !0) : !1;
3611
3620
  };
3612
3621
  }(), this.dispose = function() {
3613
- t.domElement.removeEventListener("contextmenu", Qe), t.domElement.removeEventListener("pointerdown", _), t.domElement.removeEventListener("pointercancel", K), t.domElement.removeEventListener("wheel", ft), t.domElement.removeEventListener("pointermove", z), t.domElement.removeEventListener("pointerup", K), t.domElement.getRootNode().removeEventListener("keydown", st, { capture: !0 }), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", ot), t._domElementKeyEvents = null);
3622
+ t.domElement.removeEventListener("contextmenu", tt), t.domElement.removeEventListener("pointerdown", x), t.domElement.removeEventListener("pointercancel", Z), t.domElement.removeEventListener("wheel", Q), t.domElement.removeEventListener("pointermove", z), t.domElement.removeEventListener("pointerup", Z), t.domElement.getRootNode().removeEventListener("keydown", ze, { capture: !0 }), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", lt), t._domElementKeyEvents = null);
3614
3623
  };
3615
3624
  const t = this, i = {
3616
3625
  NONE: -1,
@@ -3623,12 +3632,12 @@ class xi extends pn {
3623
3632
  TOUCH_DOLLY_ROTATE: 6
3624
3633
  };
3625
3634
  let o = i.NONE;
3626
- const d = 1e-6, r = new Jt(), h = new Jt();
3635
+ const d = 1e-6, r = new Zt(), h = new Zt();
3627
3636
  let u = 1;
3628
- const f = new J(), m = new me(), v = new me(), S = new me(), A = new me(), F = new me(), V = new me(), R = new me(), I = new me(), T = new me(), Z = new J(), te = new me();
3629
- let pe = !1;
3630
- const q = [], ge = {};
3631
- let ce = !1;
3637
+ const f = new J(), m = new pe(), g = new pe(), S = new pe(), A = new pe(), N = new pe(), V = new pe(), R = new pe(), L = new pe(), T = new pe(), X = new J(), ne = new pe();
3638
+ let ge = !1;
3639
+ const q = [], ve = {};
3640
+ let le = !1;
3632
3641
  function _e(c) {
3633
3642
  return c !== null ? 2 * Math.PI / 60 * t.autoRotateSpeed * c : 2 * Math.PI / 60 / 60 * t.autoRotateSpeed;
3634
3643
  }
@@ -3636,168 +3645,168 @@ class xi extends pn {
3636
3645
  const E = Math.abs(c * 0.01);
3637
3646
  return Math.pow(0.95, t.zoomSpeed * E);
3638
3647
  }
3639
- function be(c) {
3648
+ function ye(c) {
3640
3649
  h.theta -= c;
3641
3650
  }
3642
3651
  function U(c) {
3643
3652
  h.phi -= c;
3644
3653
  }
3645
- const ye = function() {
3654
+ const Ee = function() {
3646
3655
  const c = new J();
3647
- return function(k, B) {
3648
- c.setFromMatrixColumn(B, 0), c.multiplyScalar(-k), f.add(c);
3656
+ return function(k, F) {
3657
+ c.setFromMatrixColumn(F, 0), c.multiplyScalar(-k), f.add(c);
3649
3658
  };
3650
3659
  }(), O = function() {
3651
3660
  const c = new J();
3652
- return function(k, B) {
3653
- t.screenSpacePanning === !0 ? c.setFromMatrixColumn(B, 1) : (c.setFromMatrixColumn(B, 0), c.crossVectors(t.object.up, c)), c.multiplyScalar(k), f.add(c);
3661
+ return function(k, F) {
3662
+ t.screenSpacePanning === !0 ? c.setFromMatrixColumn(F, 1) : (c.setFromMatrixColumn(F, 0), c.crossVectors(t.object.up, c)), c.multiplyScalar(k), f.add(c);
3654
3663
  };
3655
- }(), we = function() {
3664
+ }(), Me = function() {
3656
3665
  const c = new J();
3657
- return function(k, B) {
3658
- const ie = t.domElement;
3666
+ return function(k, F) {
3667
+ const re = t.domElement;
3659
3668
  if (t.object.isPerspectiveCamera) {
3660
- const Ee = t.object.position;
3661
- c.copy(Ee).sub(t.target);
3669
+ const xe = t.object.position;
3670
+ c.copy(xe).sub(t.target);
3662
3671
  let de = c.length();
3663
- de *= Math.tan(t.object.fov / 2 * Math.PI / 180), ye(2 * k * de / ie.clientHeight, t.object.matrix), O(2 * B * de / ie.clientHeight, t.object.matrix);
3672
+ de *= Math.tan(t.object.fov / 2 * Math.PI / 180), Ee(2 * k * de / re.clientHeight, t.object.matrix), O(2 * F * de / re.clientHeight, t.object.matrix);
3664
3673
  } else
3665
- t.object.isOrthographicCamera ? (ye(k * (t.object.right - t.object.left) / t.object.zoom / ie.clientWidth, t.object.matrix), O(B * (t.object.top - t.object.bottom) / t.object.zoom / ie.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
3674
+ t.object.isOrthographicCamera ? (Ee(k * (t.object.right - t.object.left) / t.object.zoom / re.clientWidth, t.object.matrix), O(F * (t.object.top - t.object.bottom) / t.object.zoom / re.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
3666
3675
  };
3667
3676
  }();
3668
3677
  function De(c) {
3669
3678
  t.object.isPerspectiveCamera || t.object.isOrthographicCamera ? u /= c : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), t.enableZoom = !1);
3670
3679
  }
3671
- function je(c) {
3680
+ function Ie(c) {
3672
3681
  t.object.isPerspectiveCamera || t.object.isOrthographicCamera ? u *= c : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), t.enableZoom = !1);
3673
3682
  }
3674
3683
  function Pe(c, E) {
3675
3684
  if (!t.zoomToCursor)
3676
3685
  return;
3677
- pe = !0;
3678
- const k = t.domElement.getBoundingClientRect(), B = c - k.left, ie = E - k.top, Ee = k.width, de = k.height;
3679
- te.x = B / Ee * 2 - 1, te.y = -(ie / de) * 2 + 1, Z.set(te.x, te.y, 1).unproject(t.object).sub(t.object.position).normalize();
3686
+ ge = !0;
3687
+ const k = t.domElement.getBoundingClientRect(), F = c - k.left, re = E - k.top, xe = k.width, de = k.height;
3688
+ ne.x = F / xe * 2 - 1, ne.y = -(re / de) * 2 + 1, X.set(ne.x, ne.y, 1).unproject(t.object).sub(t.object.position).normalize();
3680
3689
  }
3681
3690
  function Ae(c) {
3682
3691
  return Math.max(t.minDistance, Math.min(t.maxDistance, c));
3683
3692
  }
3684
- function Ie(c) {
3693
+ function je(c) {
3685
3694
  m.set(c.clientX, c.clientY);
3686
3695
  }
3687
- function Be(c) {
3696
+ function qe(c) {
3688
3697
  Pe(c.clientX, c.clientX), R.set(c.clientX, c.clientY);
3689
3698
  }
3690
- function Fe(c) {
3699
+ function Ne(c) {
3691
3700
  A.set(c.clientX, c.clientY);
3692
3701
  }
3693
- function re(c) {
3694
- v.set(c.clientX, c.clientY), S.subVectors(v, m).multiplyScalar(t.rotateSpeed);
3702
+ function Ke(c) {
3703
+ g.set(c.clientX, c.clientY), S.subVectors(g, m).multiplyScalar(t.rotateSpeed);
3695
3704
  const E = t.domElement;
3696
- be(2 * Math.PI * S.x / E.clientHeight), U(2 * Math.PI * S.y / E.clientHeight), m.copy(v), t.update();
3705
+ ye(2 * Math.PI * S.x / E.clientHeight), U(2 * Math.PI * S.y / E.clientHeight), m.copy(g), t.update();
3697
3706
  }
3698
- function Me(c) {
3699
- I.set(c.clientX, c.clientY), T.subVectors(I, R), T.y > 0 ? De(ke(T.y)) : T.y < 0 && je(ke(T.y)), R.copy(I), t.update();
3707
+ function ct(c) {
3708
+ L.set(c.clientX, c.clientY), T.subVectors(L, R), T.y > 0 ? De(ke(T.y)) : T.y < 0 && Ie(ke(T.y)), R.copy(L), t.update();
3700
3709
  }
3701
- function He(c) {
3702
- F.set(c.clientX, c.clientY), V.subVectors(F, A).multiplyScalar(t.panSpeed), we(V.x, V.y), A.copy(F), t.update();
3710
+ function Le(c) {
3711
+ N.set(c.clientX, c.clientY), V.subVectors(N, A).multiplyScalar(t.panSpeed), Me(V.x, V.y), A.copy(N), t.update();
3703
3712
  }
3704
- function Ye(c) {
3705
- Pe(c.clientX, c.clientY), c.deltaY < 0 ? je(ke(c.deltaY)) : c.deltaY > 0 && De(ke(c.deltaY)), t.update();
3713
+ function ae(c) {
3714
+ Pe(c.clientX, c.clientY), c.deltaY < 0 ? Ie(ke(c.deltaY)) : c.deltaY > 0 && De(ke(c.deltaY)), t.update();
3706
3715
  }
3707
- function ue(c) {
3716
+ function fe(c) {
3708
3717
  let E = !1;
3709
3718
  switch (c.code) {
3710
3719
  case t.keys.UP:
3711
- c.ctrlKey || c.metaKey || c.shiftKey ? U(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, t.keyPanSpeed), E = !0;
3720
+ c.ctrlKey || c.metaKey || c.shiftKey ? U(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : Me(0, t.keyPanSpeed), E = !0;
3712
3721
  break;
3713
3722
  case t.keys.BOTTOM:
3714
- c.ctrlKey || c.metaKey || c.shiftKey ? U(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, -t.keyPanSpeed), E = !0;
3723
+ c.ctrlKey || c.metaKey || c.shiftKey ? U(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : Me(0, -t.keyPanSpeed), E = !0;
3715
3724
  break;
3716
3725
  case t.keys.LEFT:
3717
- c.ctrlKey || c.metaKey || c.shiftKey ? be(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(t.keyPanSpeed, 0), E = !0;
3726
+ c.ctrlKey || c.metaKey || c.shiftKey ? ye(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : Me(t.keyPanSpeed, 0), E = !0;
3718
3727
  break;
3719
3728
  case t.keys.RIGHT:
3720
- c.ctrlKey || c.metaKey || c.shiftKey ? be(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(-t.keyPanSpeed, 0), E = !0;
3729
+ c.ctrlKey || c.metaKey || c.shiftKey ? ye(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : Me(-t.keyPanSpeed, 0), E = !0;
3721
3730
  break;
3722
3731
  }
3723
3732
  E && (c.preventDefault(), t.update());
3724
3733
  }
3725
- function g(c) {
3734
+ function Ue(c) {
3726
3735
  if (q.length === 1)
3727
3736
  m.set(c.pageX, c.pageY);
3728
3737
  else {
3729
- const E = $e(c), k = 0.5 * (c.pageX + E.x), B = 0.5 * (c.pageY + E.y);
3730
- m.set(k, B);
3738
+ const E = We(c), k = 0.5 * (c.pageX + E.x), F = 0.5 * (c.pageY + E.y);
3739
+ m.set(k, F);
3731
3740
  }
3732
3741
  }
3733
- function b(c) {
3742
+ function Be(c) {
3734
3743
  if (q.length === 1)
3735
3744
  A.set(c.pageX, c.pageY);
3736
3745
  else {
3737
- const E = $e(c), k = 0.5 * (c.pageX + E.x), B = 0.5 * (c.pageY + E.y);
3738
- A.set(k, B);
3746
+ const E = We(c), k = 0.5 * (c.pageX + E.x), F = 0.5 * (c.pageY + E.y);
3747
+ A.set(k, F);
3739
3748
  }
3740
3749
  }
3741
- function M(c) {
3742
- const E = $e(c), k = c.pageX - E.x, B = c.pageY - E.y, ie = Math.sqrt(k * k + B * B);
3743
- R.set(0, ie);
3750
+ function be(c) {
3751
+ const E = We(c), k = c.pageX - E.x, F = c.pageY - E.y, re = Math.sqrt(k * k + F * F);
3752
+ R.set(0, re);
3744
3753
  }
3745
- function N(c) {
3746
- t.enableZoom && M(c), t.enablePan && b(c);
3754
+ function v(c) {
3755
+ t.enableZoom && be(c), t.enablePan && Be(c);
3747
3756
  }
3748
- function ve(c) {
3749
- t.enableZoom && M(c), t.enableRotate && g(c);
3757
+ function b(c) {
3758
+ t.enableZoom && be(c), t.enableRotate && Ue(c);
3750
3759
  }
3751
- function le(c) {
3760
+ function w(c) {
3752
3761
  if (q.length == 1)
3753
- v.set(c.pageX, c.pageY);
3762
+ g.set(c.pageX, c.pageY);
3754
3763
  else {
3755
- const k = $e(c), B = 0.5 * (c.pageX + k.x), ie = 0.5 * (c.pageY + k.y);
3756
- v.set(B, ie);
3764
+ const k = We(c), F = 0.5 * (c.pageX + k.x), re = 0.5 * (c.pageY + k.y);
3765
+ g.set(F, re);
3757
3766
  }
3758
- S.subVectors(v, m).multiplyScalar(t.rotateSpeed);
3767
+ S.subVectors(g, m).multiplyScalar(t.rotateSpeed);
3759
3768
  const E = t.domElement;
3760
- be(2 * Math.PI * S.x / E.clientHeight), U(2 * Math.PI * S.y / E.clientHeight), m.copy(v);
3769
+ ye(2 * Math.PI * S.x / E.clientHeight), U(2 * Math.PI * S.y / E.clientHeight), m.copy(g);
3761
3770
  }
3762
- function C(c) {
3771
+ function j(c) {
3763
3772
  if (q.length === 1)
3764
- F.set(c.pageX, c.pageY);
3773
+ N.set(c.pageX, c.pageY);
3765
3774
  else {
3766
- const E = $e(c), k = 0.5 * (c.pageX + E.x), B = 0.5 * (c.pageY + E.y);
3767
- F.set(k, B);
3775
+ const E = We(c), k = 0.5 * (c.pageX + E.x), F = 0.5 * (c.pageY + E.y);
3776
+ N.set(k, F);
3768
3777
  }
3769
- V.subVectors(F, A).multiplyScalar(t.panSpeed), we(V.x, V.y), A.copy(F);
3778
+ V.subVectors(N, A).multiplyScalar(t.panSpeed), Me(V.x, V.y), A.copy(N);
3770
3779
  }
3771
- function x(c) {
3772
- const E = $e(c), k = c.pageX - E.x, B = c.pageY - E.y, ie = Math.sqrt(k * k + B * B);
3773
- I.set(0, ie), T.set(0, Math.pow(I.y / R.y, t.zoomSpeed)), De(T.y), R.copy(I);
3774
- const Ee = (c.pageX + E.x) * 0.5, de = (c.pageY + E.y) * 0.5;
3775
- Pe(Ee, de);
3780
+ function oe(c) {
3781
+ const E = We(c), k = c.pageX - E.x, F = c.pageY - E.y, re = Math.sqrt(k * k + F * F);
3782
+ L.set(0, re), T.set(0, Math.pow(L.y / R.y, t.zoomSpeed)), De(T.y), R.copy(L);
3783
+ const xe = (c.pageX + E.x) * 0.5, de = (c.pageY + E.y) * 0.5;
3784
+ Pe(xe, de);
3776
3785
  }
3777
- function G(c) {
3778
- t.enableZoom && x(c), t.enablePan && C(c);
3786
+ function ue(c) {
3787
+ t.enableZoom && oe(c), t.enablePan && j(c);
3779
3788
  }
3780
- function ne(c) {
3781
- t.enableZoom && x(c), t.enableRotate && le(c);
3789
+ function M(c) {
3790
+ t.enableZoom && oe(c), t.enableRotate && w(c);
3782
3791
  }
3783
- function _(c) {
3784
- t.enabled !== !1 && (q.length === 0 && (t.domElement.setPointerCapture(c.pointerId), t.domElement.addEventListener("pointermove", z), t.domElement.addEventListener("pointerup", K)), !Pt(c) && (kt(c), c.pointerType === "touch" ? ct(c) : Ne(c)));
3792
+ function x(c) {
3793
+ t.enabled !== !1 && (q.length === 0 && (t.domElement.setPointerCapture(c.pointerId), t.domElement.addEventListener("pointermove", z), t.domElement.addEventListener("pointerup", Z)), !Dt(c) && (_t(c), c.pointerType === "touch" ? ut(c) : _(c)));
3785
3794
  }
3786
3795
  function z(c) {
3787
- t.enabled !== !1 && (c.pointerType === "touch" ? pt(c) : Je(c));
3796
+ t.enabled !== !1 && (c.pointerType === "touch" ? pt(c) : H(c));
3788
3797
  }
3789
- function K(c) {
3790
- switch (Dt(c), q.length) {
3798
+ function Z(c) {
3799
+ switch (kt(c), q.length) {
3791
3800
  case 0:
3792
- t.domElement.releasePointerCapture(c.pointerId), t.domElement.removeEventListener("pointermove", z), t.domElement.removeEventListener("pointerup", K), t.dispatchEvent(fn), o = i.NONE;
3801
+ t.domElement.releasePointerCapture(c.pointerId), t.domElement.removeEventListener("pointermove", z), t.domElement.removeEventListener("pointerup", Z), t.dispatchEvent(hn), o = i.NONE;
3793
3802
  break;
3794
3803
  case 1:
3795
- const E = q[0], k = ge[E];
3796
- ct({ pointerId: E, pageX: k.x, pageY: k.y });
3804
+ const E = q[0], k = ve[E];
3805
+ ut({ pointerId: E, pageX: k.x, pageY: k.y });
3797
3806
  break;
3798
3807
  }
3799
3808
  }
3800
- function Ne(c) {
3809
+ function _(c) {
3801
3810
  let E;
3802
3811
  switch (c.button) {
3803
3812
  case 0:
@@ -3813,61 +3822,61 @@ class xi extends pn {
3813
3822
  E = -1;
3814
3823
  }
3815
3824
  switch (E) {
3816
- case nt.DOLLY:
3825
+ case it.DOLLY:
3817
3826
  if (t.enableZoom === !1)
3818
3827
  return;
3819
- Be(c), o = i.DOLLY;
3828
+ qe(c), o = i.DOLLY;
3820
3829
  break;
3821
- case nt.ROTATE:
3830
+ case it.ROTATE:
3822
3831
  if (c.ctrlKey || c.metaKey || c.shiftKey) {
3823
3832
  if (t.enablePan === !1)
3824
3833
  return;
3825
- Fe(c), o = i.PAN;
3834
+ Ne(c), o = i.PAN;
3826
3835
  } else {
3827
3836
  if (t.enableRotate === !1)
3828
3837
  return;
3829
- Ie(c), o = i.ROTATE;
3838
+ je(c), o = i.ROTATE;
3830
3839
  }
3831
3840
  break;
3832
- case nt.PAN:
3841
+ case it.PAN:
3833
3842
  if (c.ctrlKey || c.metaKey || c.shiftKey) {
3834
3843
  if (t.enableRotate === !1)
3835
3844
  return;
3836
- Ie(c), o = i.ROTATE;
3845
+ je(c), o = i.ROTATE;
3837
3846
  } else {
3838
3847
  if (t.enablePan === !1)
3839
3848
  return;
3840
- Fe(c), o = i.PAN;
3849
+ Ne(c), o = i.PAN;
3841
3850
  }
3842
3851
  break;
3843
3852
  default:
3844
3853
  o = i.NONE;
3845
3854
  }
3846
- o !== i.NONE && t.dispatchEvent(It);
3855
+ o !== i.NONE && t.dispatchEvent(jt);
3847
3856
  }
3848
- function Je(c) {
3857
+ function H(c) {
3849
3858
  switch (o) {
3850
3859
  case i.ROTATE:
3851
3860
  if (t.enableRotate === !1)
3852
3861
  return;
3853
- re(c);
3862
+ Ke(c);
3854
3863
  break;
3855
3864
  case i.DOLLY:
3856
3865
  if (t.enableZoom === !1)
3857
3866
  return;
3858
- Me(c);
3867
+ ct(c);
3859
3868
  break;
3860
3869
  case i.PAN:
3861
3870
  if (t.enablePan === !1)
3862
3871
  return;
3863
- He(c);
3872
+ Le(c);
3864
3873
  break;
3865
3874
  }
3866
3875
  }
3867
- function ft(c) {
3868
- t.enabled === !1 || t.enableZoom === !1 || o !== i.NONE || (c.preventDefault(), t.dispatchEvent(It), Ye(mt(c)), t.dispatchEvent(fn));
3876
+ function Q(c) {
3877
+ t.enabled === !1 || t.enableZoom === !1 || o !== i.NONE || (c.preventDefault(), t.dispatchEvent(jt), ae($e(c)), t.dispatchEvent(hn));
3869
3878
  }
3870
- function mt(c) {
3879
+ function $e(c) {
3871
3880
  const E = c.deltaMode, k = {
3872
3881
  clientX: c.clientX,
3873
3882
  clientY: c.clientY,
@@ -3881,30 +3890,30 @@ class xi extends pn {
3881
3890
  k.deltaY *= 100;
3882
3891
  break;
3883
3892
  }
3884
- return c.ctrlKey && !ce && (k.deltaY *= 10), k;
3893
+ return c.ctrlKey && !le && (k.deltaY *= 10), k;
3885
3894
  }
3886
- function st(c) {
3887
- c.key === "Control" && (ce = !0, t.domElement.getRootNode().addEventListener("keyup", Ue, { passive: !0, capture: !0 }));
3895
+ function ze(c) {
3896
+ c.key === "Control" && (le = !0, t.domElement.getRootNode().addEventListener("keyup", Ge, { passive: !0, capture: !0 }));
3888
3897
  }
3889
- function Ue(c) {
3890
- c.key === "Control" && (ce = !1, t.domElement.getRootNode().removeEventListener("keyup", Ue, { passive: !0, capture: !0 }));
3898
+ function Ge(c) {
3899
+ c.key === "Control" && (le = !1, t.domElement.getRootNode().removeEventListener("keyup", Ge, { passive: !0, capture: !0 }));
3891
3900
  }
3892
- function ot(c) {
3893
- t.enabled === !1 || t.enablePan === !1 || ue(c);
3901
+ function lt(c) {
3902
+ t.enabled === !1 || t.enablePan === !1 || fe(c);
3894
3903
  }
3895
- function ct(c) {
3904
+ function ut(c) {
3896
3905
  switch (gt(c), q.length) {
3897
3906
  case 1:
3898
3907
  switch (t.touches.ONE) {
3899
- case at.ROTATE:
3908
+ case rt.ROTATE:
3900
3909
  if (t.enableRotate === !1)
3901
3910
  return;
3902
- g(c), o = i.TOUCH_ROTATE;
3911
+ Ue(c), o = i.TOUCH_ROTATE;
3903
3912
  break;
3904
- case at.PAN:
3913
+ case rt.PAN:
3905
3914
  if (t.enablePan === !1)
3906
3915
  return;
3907
- b(c), o = i.TOUCH_PAN;
3916
+ Be(c), o = i.TOUCH_PAN;
3908
3917
  break;
3909
3918
  default:
3910
3919
  o = i.NONE;
@@ -3912,15 +3921,15 @@ class xi extends pn {
3912
3921
  break;
3913
3922
  case 2:
3914
3923
  switch (t.touches.TWO) {
3915
- case at.DOLLY_PAN:
3924
+ case rt.DOLLY_PAN:
3916
3925
  if (t.enableZoom === !1 && t.enablePan === !1)
3917
3926
  return;
3918
- N(c), o = i.TOUCH_DOLLY_PAN;
3927
+ v(c), o = i.TOUCH_DOLLY_PAN;
3919
3928
  break;
3920
- case at.DOLLY_ROTATE:
3929
+ case rt.DOLLY_ROTATE:
3921
3930
  if (t.enableZoom === !1 && t.enableRotate === !1)
3922
3931
  return;
3923
- ve(c), o = i.TOUCH_DOLLY_ROTATE;
3932
+ b(c), o = i.TOUCH_DOLLY_ROTATE;
3924
3933
  break;
3925
3934
  default:
3926
3935
  o = i.NONE;
@@ -3929,70 +3938,70 @@ class xi extends pn {
3929
3938
  default:
3930
3939
  o = i.NONE;
3931
3940
  }
3932
- o !== i.NONE && t.dispatchEvent(It);
3941
+ o !== i.NONE && t.dispatchEvent(jt);
3933
3942
  }
3934
3943
  function pt(c) {
3935
3944
  switch (gt(c), o) {
3936
3945
  case i.TOUCH_ROTATE:
3937
3946
  if (t.enableRotate === !1)
3938
3947
  return;
3939
- le(c), t.update();
3948
+ w(c), t.update();
3940
3949
  break;
3941
3950
  case i.TOUCH_PAN:
3942
3951
  if (t.enablePan === !1)
3943
3952
  return;
3944
- C(c), t.update();
3953
+ j(c), t.update();
3945
3954
  break;
3946
3955
  case i.TOUCH_DOLLY_PAN:
3947
3956
  if (t.enableZoom === !1 && t.enablePan === !1)
3948
3957
  return;
3949
- G(c), t.update();
3958
+ ue(c), t.update();
3950
3959
  break;
3951
3960
  case i.TOUCH_DOLLY_ROTATE:
3952
3961
  if (t.enableZoom === !1 && t.enableRotate === !1)
3953
3962
  return;
3954
- ne(c), t.update();
3963
+ M(c), t.update();
3955
3964
  break;
3956
3965
  default:
3957
3966
  o = i.NONE;
3958
3967
  }
3959
3968
  }
3960
- function Qe(c) {
3969
+ function tt(c) {
3961
3970
  t.enabled !== !1 && c.preventDefault();
3962
3971
  }
3963
- function kt(c) {
3972
+ function _t(c) {
3964
3973
  q.push(c.pointerId);
3965
3974
  }
3966
- function Dt(c) {
3967
- delete ge[c.pointerId];
3975
+ function kt(c) {
3976
+ delete ve[c.pointerId];
3968
3977
  for (let E = 0; E < q.length; E++)
3969
3978
  if (q[E] == c.pointerId) {
3970
3979
  q.splice(E, 1);
3971
3980
  return;
3972
3981
  }
3973
3982
  }
3974
- function Pt(c) {
3983
+ function Dt(c) {
3975
3984
  for (let E = 0; E < q.length; E++)
3976
3985
  if (q[E] == c.pointerId)
3977
3986
  return !0;
3978
3987
  return !1;
3979
3988
  }
3980
3989
  function gt(c) {
3981
- let E = ge[c.pointerId];
3982
- E === void 0 && (E = new me(), ge[c.pointerId] = E), E.set(c.pageX, c.pageY);
3990
+ let E = ve[c.pointerId];
3991
+ E === void 0 && (E = new pe(), ve[c.pointerId] = E), E.set(c.pageX, c.pageY);
3983
3992
  }
3984
- function $e(c) {
3993
+ function We(c) {
3985
3994
  const E = c.pointerId === q[0] ? q[1] : q[0];
3986
- return ge[E];
3995
+ return ve[E];
3987
3996
  }
3988
- t.domElement.addEventListener("contextmenu", Qe), t.domElement.addEventListener("pointerdown", _), t.domElement.addEventListener("pointercancel", K), t.domElement.addEventListener("wheel", ft, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", st, { passive: !0, capture: !0 }), this.update();
3997
+ t.domElement.addEventListener("contextmenu", tt), t.domElement.addEventListener("pointerdown", x), t.domElement.addEventListener("pointercancel", Z), t.domElement.addEventListener("wheel", Q, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", ze, { passive: !0, capture: !0 }), this.update();
3989
3998
  }
3990
3999
  }
3991
- function rt(e, n, a, t, i) {
4000
+ function ot(e, n, a, t, i) {
3992
4001
  return t + (e - n) * (i - t) / (a - n);
3993
4002
  }
3994
- const Mt = (e) => {
3995
- const [n, a] = H(e.options[e.index]), t = () => {
4003
+ const wt = (e) => {
4004
+ const [n, a] = G(e.options[e.index]), t = () => {
3996
4005
  e.onToggle(!e.open);
3997
4006
  }, i = (o) => {
3998
4007
  o !== n && (e.onSelect(o), a(o)), e.onToggle(!1);
@@ -4001,14 +4010,14 @@ const Mt = (e) => {
4001
4010
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: t, children: n }),
4002
4011
  e.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: e.options.map((o) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(o), children: o }, o)) })
4003
4012
  ] });
4004
- }, qe = Ra(function(n, a) {
4005
- const [t, i] = H(!1), o = n.options.indexOf(n.camera.name);
4013
+ }, Ze = Ta(function(n, a) {
4014
+ const [t, i] = G(!1), o = n.options.indexOf(n.camera.name);
4006
4015
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
4007
4016
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
4008
4017
  t && i(!1);
4009
4018
  } }),
4010
4019
  /* @__PURE__ */ l.jsx(
4011
- Mt,
4020
+ wt,
4012
4021
  {
4013
4022
  index: o,
4014
4023
  open: t,
@@ -4022,15 +4031,15 @@ const Mt = (e) => {
4022
4031
  )
4023
4032
  ] });
4024
4033
  });
4025
- class Si extends In {
4034
+ class xi extends jn {
4026
4035
  constructor(n) {
4027
4036
  super({
4028
4037
  extensions: {
4029
4038
  // @ts-ignore
4030
4039
  derivatives: !0
4031
4040
  },
4032
- glslVersion: fa,
4033
- side: bn,
4041
+ glslVersion: ha,
4042
+ side: vn,
4034
4043
  transparent: !0,
4035
4044
  uniforms: {
4036
4045
  uScale: {
@@ -4040,7 +4049,7 @@ class Si extends In {
4040
4049
  value: n?.divisions !== void 0 ? n?.divisions : 10
4041
4050
  },
4042
4051
  uColor: {
4043
- value: n?.color !== void 0 ? n?.color : new $t(16777215)
4052
+ value: n?.color !== void 0 ? n?.color : new Ut(16777215)
4044
4053
  },
4045
4054
  uDistance: {
4046
4055
  value: n?.distance !== void 0 ? n?.distance : 1e4
@@ -4135,17 +4144,17 @@ class Si extends In {
4135
4144
  });
4136
4145
  }
4137
4146
  }
4138
- class Ci extends An {
4147
+ class Si extends Pn {
4139
4148
  gridMaterial;
4140
4149
  constructor() {
4141
- const n = new Si();
4142
- super(new ma(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
4150
+ const n = new xi();
4151
+ super(new fa(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
4143
4152
  }
4144
4153
  update() {
4145
4154
  this.gridMaterial.needsUpdate = !0;
4146
4155
  }
4147
4156
  }
4148
- const wi = `#include <common>
4157
+ const Ci = `#include <common>
4149
4158
  #include <batching_pars_vertex>
4150
4159
  #include <uv_pars_vertex>
4151
4160
  #include <color_pars_vertex>
@@ -4175,7 +4184,7 @@ void main() {
4175
4184
  #include <logdepthbuf_vertex>
4176
4185
  #include <clipping_planes_vertex>
4177
4186
  #include <worldpos_vertex>
4178
- }`, Mi = `
4187
+ }`, wi = `
4179
4188
  #include <common>
4180
4189
  #include <uv_pars_fragment>
4181
4190
  #include <clipping_planes_pars_fragment>
@@ -4184,329 +4193,329 @@ void main() {
4184
4193
  #include <clipping_planes_fragment>
4185
4194
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
4186
4195
  }`;
4187
- class Oi extends In {
4196
+ class Mi extends jn {
4188
4197
  constructor() {
4189
4198
  super({
4190
4199
  defines: {
4191
4200
  USE_UV: ""
4192
4201
  },
4193
- vertexShader: wi,
4194
- fragmentShader: Mi
4202
+ vertexShader: Ci,
4203
+ fragmentShader: wi
4195
4204
  });
4196
4205
  }
4197
4206
  }
4198
- let xt = "Renderer", Te, St = !1, Nt = !1, X = null, oe = null, Ge = null, We = null;
4199
- function zi(e) {
4200
- const n = e.three.app.appID, a = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", o = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", d = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", r = se(() => /* @__PURE__ */ new Map(), []), h = se(() => /* @__PURE__ */ new Map(), []), u = se(() => /* @__PURE__ */ new Map(), []), f = se(() => /* @__PURE__ */ new Map(), []), m = se(() => new pa(), []), v = se(() => new ga(), []), S = se(() => new Ci(), []), A = se(() => new Qt(500), []), F = se(() => new Qt(100), []), V = se(() => new va(), []), R = se(() => new ba(), []), I = se(() => new Oi(), []), T = se(() => new jn({
4207
+ let xt = "Renderer", Te, It = !1, K = null, ce = null, Ye = null, Ve = null;
4208
+ function $i(e) {
4209
+ const n = e.three.app.appID, a = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", o = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", d = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", r = se(() => /* @__PURE__ */ new Map(), []), h = se(() => /* @__PURE__ */ new Map(), []), u = se(() => /* @__PURE__ */ new Map(), []), f = se(() => /* @__PURE__ */ new Map(), []), m = se(() => new ma(), []), g = se(() => new pa(), []), S = se(() => new Si(), []), A = se(() => new Jt(500), []), N = se(() => new Jt(100), []), V = se(() => new ga(), []), R = se(() => new va(), []), L = se(() => new Mi(), []), T = se(() => new An({
4201
4210
  opacity: 0.33,
4202
4211
  transparent: !0,
4203
4212
  wireframe: !0
4204
4213
  }), []);
4205
- function Z(g, b) {
4206
- const M = new en(-100, 100, 100, -100, 50, 5e3);
4207
- return M.name = g, M.position.copy(b), M.lookAt(0, 0, 0), r.set(g, M), M;
4214
+ function X(v, b) {
4215
+ const w = new Qt(-100, 100, 100, -100, 50, 5e3);
4216
+ return w.name = v, w.position.copy(b), w.lookAt(0, 0, 0), r.set(v, w), w;
4208
4217
  }
4209
- const te = [
4218
+ const ne = [
4210
4219
  "Renderer",
4211
4220
  "Depth",
4212
4221
  "Normals",
4213
4222
  "UVs",
4214
4223
  "Wireframe"
4215
- ], pe = [
4224
+ ], ge = [
4216
4225
  "Single",
4217
4226
  "Side by Side",
4218
4227
  "Stacked",
4219
4228
  "Quad"
4220
- ], q = Y(null), ge = Y(null), ce = Y(null), _e = Y(null), ke = Y(null), be = Y(null), [U, ye] = H(a !== null ? a : "Single"), [O, we] = H(null), [De, je] = H(!1), [Pe, Ae] = H(!1), [Ie, Be] = H(!1), [, Fe] = H(Date.now());
4229
+ ], q = Y(null), ve = Y(null), le = Y(null), _e = Y(null), ke = Y(null), ye = Y(null), [U, Ee] = G(a !== null ? a : "Single"), [O, Me] = G(null), [De, Ie] = G(!1), [Pe, Ae] = G(!1), [je, qe] = G("Orbit"), [Ne, Ke] = G(!1), [ct, Le] = G(Date.now());
4221
4230
  localStorage.setItem(`${n}_mode`, U), localStorage.setItem(`${n}_tlCam`, t), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, o), localStorage.setItem(`${n}_brCam`, d);
4222
- const re = (g, b) => {
4223
- const M = h.get(g.name);
4224
- if (M !== void 0 && M.dispose(), h.delete(g.name), g.name === "UI")
4231
+ const ae = (v, b) => {
4232
+ const w = h.get(v.name);
4233
+ if (w !== void 0 && w.dispose(), h.delete(v.name), v.name === "UI")
4225
4234
  return;
4226
- const N = new xi(g, b);
4227
- switch (N.enableDamping = !0, N.dampingFactor = 0.05, g.name) {
4235
+ const j = new Ei(v, b);
4236
+ switch (j.enableDamping = !0, j.dampingFactor = 0.05, v.name) {
4228
4237
  case "Top":
4229
4238
  case "Bottom":
4230
4239
  case "Left":
4231
4240
  case "Right":
4232
4241
  case "Front":
4233
4242
  case "Back":
4234
- N.enableRotate = !1;
4243
+ j.enableRotate = !1;
4235
4244
  break;
4236
4245
  }
4237
- h.set(g.name, N);
4238
- }, Me = (g) => {
4239
- const b = u.get(g.name);
4240
- b !== void 0 && (m.remove(b), b.dispose(), u.delete(g.name));
4241
- const M = h.get(g.name);
4242
- M !== void 0 && (M.dispose(), h.delete(g.name));
4243
- }, He = () => {
4244
- h.forEach((g, b) => {
4245
- g.dispose();
4246
- const M = u.get(b);
4247
- M !== void 0 && (m.remove(M), M.dispose()), u.delete(b), h.delete(b);
4246
+ h.set(v.name, j);
4247
+ }, fe = (v) => {
4248
+ const b = u.get(v.name);
4249
+ b !== void 0 && (m.remove(b), b.dispose(), u.delete(v.name));
4250
+ const w = h.get(v.name);
4251
+ w !== void 0 && (w.dispose(), h.delete(v.name));
4252
+ }, Ue = () => {
4253
+ h.forEach((v, b) => {
4254
+ v.dispose();
4255
+ const w = u.get(b);
4256
+ w !== void 0 && (m.remove(w), w.dispose()), u.delete(b), h.delete(b);
4248
4257
  }), h.clear(), u.clear();
4249
- }, Ye = () => {
4258
+ }, Be = () => {
4250
4259
  switch (U) {
4251
4260
  case "Single":
4252
- re(X, ce.current);
4261
+ ae(K, le.current);
4253
4262
  break;
4254
4263
  case "Side by Side":
4255
4264
  case "Stacked":
4256
- re(X, ce.current), re(oe, _e.current);
4265
+ ae(K, le.current), ae(ce, _e.current);
4257
4266
  break;
4258
4267
  case "Quad":
4259
- re(X, ce.current), re(oe, _e.current), re(Ge, ke.current), re(We, be.current);
4268
+ ae(K, le.current), ae(ce, _e.current), ae(Ye, ke.current), ae(Ve, ye.current);
4260
4269
  break;
4261
4270
  }
4262
4271
  };
4263
4272
  Re(() => {
4264
- const g = new ya({
4273
+ const v = new ba({
4265
4274
  canvas: q.current,
4266
4275
  stencil: !1
4267
4276
  });
4268
- g.autoClear = !1, g.shadowMap.enabled = !0, g.setPixelRatio(devicePixelRatio), g.setClearColor(0), e.three.renderer = g, we(g);
4277
+ v.autoClear = !1, v.shadowMap.enabled = !0, v.setPixelRatio(devicePixelRatio), v.setClearColor(0), e.three.renderer = v, Me(v);
4269
4278
  }, []), Re(() => {
4270
- m.name = "Debug Scene", m.uuid = "", v.name = "helpers", m.add(v), v.add(S), A.name = "axisHelper", v.add(A), F.name = "interactionHelper", v.add(F), F.visible = !1, Z("Top", new J(0, 1e3, 0)), Z("Bottom", new J(0, -1e3, 0)), Z("Left", new J(-1e3, 0, 0)), Z("Right", new J(1e3, 0, 0)), Z("Front", new J(0, 0, 1e3)), Z("Back", new J(0, 0, -1e3)), Z("Orthographic", new J(1e3, 1e3, 1e3)), Z("UI", new J());
4271
- const g = new At(60, 1, 50, 5e3);
4272
- g.name = "Debug", g.position.set(500, 500, 500), g.lookAt(0, 0, 0), r.set("Debug", g), X = r.get(localStorage.getItem(`${n}_tlCam`)), oe = r.get(localStorage.getItem(`${n}_trCam`)), Ge = r.get(localStorage.getItem(`${n}_blCam`)), We = r.get(localStorage.getItem(`${n}_brCam`));
4279
+ m.name = "Debug Scene", m.uuid = "", g.name = "helpers", m.add(g), g.add(S), A.name = "axisHelper", g.add(A), N.name = "interactionHelper", g.add(N), N.visible = !1, X("Top", new J(0, 1e3, 0)), X("Bottom", new J(0, -1e3, 0)), X("Left", new J(-1e3, 0, 0)), X("Right", new J(1e3, 0, 0)), X("Front", new J(0, 0, 1e3)), X("Back", new J(0, 0, -1e3)), X("Orthographic", new J(1e3, 1e3, 1e3)), X("UI", new J());
4280
+ const v = new Pt(60, 1, 50, 5e3);
4281
+ v.name = "Debug", v.position.set(500, 500, 500), v.lookAt(0, 0, 0), r.set("Debug", v), K = r.get(localStorage.getItem(`${n}_tlCam`)), ce = r.get(localStorage.getItem(`${n}_trCam`)), Ye = r.get(localStorage.getItem(`${n}_blCam`)), Ve = r.get(localStorage.getItem(`${n}_brCam`));
4273
4282
  }, []), Re(() => {
4274
- const g = () => {
4275
- f.forEach((C) => {
4276
- v.remove(C), C.dispose();
4283
+ const v = () => {
4284
+ f.forEach((M) => {
4285
+ g.remove(M), M.dispose();
4277
4286
  }), f.clear();
4278
4287
  }, b = () => {
4279
- Te.traverse((C) => {
4280
- if (C.type.search("Light") > -1) {
4288
+ Te.traverse((M) => {
4289
+ if (M.type.search("Light") > -1) {
4281
4290
  let x;
4282
- switch (C.type) {
4291
+ switch (M.type) {
4283
4292
  case "DirectionalLight":
4284
- x = new Ma(C, 100), x.name = `${C.name}Helper`, f.set(C.name, x), v.add(x);
4293
+ x = new wa(M, 100), x.name = `${M.name}Helper`, f.set(M.name, x), g.add(x);
4285
4294
  break;
4286
4295
  case "HemisphereLight":
4287
- x = new wa(C, 250), x.name = `${C.name}Helper`, f.set(C.name, x), v.add(x);
4296
+ x = new Ca(M, 250), x.name = `${M.name}Helper`, f.set(M.name, x), g.add(x);
4288
4297
  break;
4289
4298
  case "RectAreaLight":
4290
- x = new yi(C), x.name = `${C.name}Helper`, f.set(C.name, x), v.add(x);
4299
+ x = new bi(M), x.name = `${M.name}Helper`, f.set(M.name, x), g.add(x);
4291
4300
  break;
4292
4301
  case "PointLight":
4293
- x = new Ca(C, 100), x.name = `${C.name}Helper`, f.set(C.name, x), v.add(x);
4302
+ x = new Sa(M, 100), x.name = `${M.name}Helper`, f.set(M.name, x), g.add(x);
4294
4303
  break;
4295
4304
  case "SpotLight":
4296
- x = new Sa(C), x.name = `${C.name}Helper`, f.set(C.name, x), v.add(x);
4305
+ x = new xa(M), x.name = `${M.name}Helper`, f.set(M.name, x), g.add(x);
4297
4306
  break;
4298
4307
  }
4299
4308
  }
4300
4309
  });
4301
- }, M = (C) => {
4302
- v.add(A), g(), Tt(Te), m.remove(Te);
4303
- const x = e.scenes.get(C.value.name);
4310
+ }, w = (M) => {
4311
+ g.add(A), v(), Ot(Te), m.remove(Te);
4312
+ const x = e.scenes.get(M.value.name);
4304
4313
  if (x !== void 0) {
4305
- const G = new x();
4306
- e.onSceneSet !== void 0 && e.onSceneSet(G), Te = G, e.three.scene = Te, m.add(Te), Nt = !0, b();
4314
+ const z = new x();
4315
+ e.onSceneSet !== void 0 && e.onSceneSet(z), Te = z, e.three.scene = Te, m.add(Te), It = !0, b();
4307
4316
  }
4308
- }, N = (C) => {
4309
- const x = C.value, G = e.three.scene?.getObjectByProperty("uuid", x.uuid);
4310
- if (G !== void 0 && r.set(x.name, G), G instanceof At) {
4311
- const ne = new xa(G);
4312
- u.set(G.name, ne), m.add(ne);
4317
+ }, j = (M) => {
4318
+ const x = M.value, z = e.three.scene?.getObjectByProperty("uuid", x.uuid);
4319
+ if (z !== void 0 && r.set(x.name, z), z instanceof Pt) {
4320
+ const Z = new Ea(z);
4321
+ u.set(z.name, Z), m.add(Z);
4313
4322
  }
4314
- Fe(Date.now());
4315
- }, ve = (C) => {
4316
- const x = u.get(C.value.name);
4317
- x !== void 0 && (m.remove(x), x.dispose()), r.delete(C.value.name), Fe(Date.now());
4318
- }, le = (C) => {
4319
- const x = Te.getObjectByProperty("uuid", C.value.uuid);
4323
+ Le(Date.now());
4324
+ }, oe = (M) => {
4325
+ const x = u.get(M.value.name);
4326
+ x !== void 0 && (m.remove(x), x.dispose()), r.delete(M.value.name), Le(Date.now());
4327
+ }, ue = (M) => {
4328
+ const x = Te.getObjectByProperty("uuid", M.value.uuid);
4320
4329
  x && x.add(A);
4321
4330
  };
4322
- return D.addEventListener(P.SET_SCENE, M), D.addEventListener(P.ADD_CAMERA, N), D.addEventListener(P.REMOVE_CAMERA, ve), D.addEventListener(P.SET_OBJECT, le), () => {
4323
- D.removeEventListener(P.SET_SCENE, M), D.removeEventListener(P.ADD_CAMERA, N), D.removeEventListener(P.REMOVE_CAMERA, ve), D.removeEventListener(P.SET_OBJECT, le);
4331
+ return D.addEventListener(P.SET_SCENE, w), D.addEventListener(P.ADD_CAMERA, j), D.addEventListener(P.REMOVE_CAMERA, oe), D.addEventListener(P.SET_OBJECT, ue), () => {
4332
+ D.removeEventListener(P.SET_SCENE, w), D.removeEventListener(P.ADD_CAMERA, j), D.removeEventListener(P.REMOVE_CAMERA, oe), D.removeEventListener(P.SET_OBJECT, ue);
4324
4333
  };
4325
4334
  }, []), Re(() => {
4326
4335
  if (O === null)
4327
4336
  return;
4328
- let g = window.innerWidth, b = window.innerHeight, M = Math.floor(g / 2), N = Math.floor(b / 2), ve = -1;
4329
- const le = () => {
4330
- g = window.innerWidth - 300, b = window.innerHeight, M = Math.floor(g / 2), N = Math.floor(b / 2), e.three.resize(g, b), e.onSceneResize !== void 0 && Nt && e.onSceneResize(Te, g, b);
4331
- let _ = g, z = b;
4337
+ let v = window.innerWidth, b = window.innerHeight, w = Math.floor(v / 2), j = Math.floor(b / 2), oe = -1;
4338
+ const ue = () => {
4339
+ v = window.innerWidth - 300, b = window.innerHeight, w = Math.floor(v / 2), j = Math.floor(b / 2), e.three.resize(v, b), e.onSceneResize !== void 0 && It && e.onSceneResize(Te, v, b);
4340
+ let _ = v, H = b;
4332
4341
  switch (U) {
4333
4342
  case "Side by Side":
4334
- _ = M, z = b;
4343
+ _ = w, H = b;
4335
4344
  break;
4336
4345
  case "Stacked":
4337
- _ = g, z = N;
4346
+ _ = v, H = j;
4338
4347
  break;
4339
4348
  case "Quad":
4340
- _ = M, z = N;
4349
+ _ = w, H = j;
4341
4350
  break;
4342
4351
  }
4343
- r.forEach((K) => {
4344
- K instanceof en ? (K.left = _ / -2, K.right = _ / 2, K.top = z / 2, K.bottom = z / -2, K.name === "UI" && (K.position.x = g / 2, K.position.y = b / -2, K.position.z = 100), K.updateProjectionMatrix()) : K instanceof At && (K.aspect = _ / z, K.updateProjectionMatrix(), u.get(K.name)?.update());
4352
+ r.forEach((Q) => {
4353
+ Q instanceof Qt ? (Q.left = _ / -2, Q.right = _ / 2, Q.top = H / 2, Q.bottom = H / -2, Q.name === "UI" && (Q.position.x = v / 2, Q.position.y = b / -2, Q.position.z = 100), Q.updateProjectionMatrix()) : Q instanceof Pt && (Q.aspect = _ / H, Q.updateProjectionMatrix(), u.get(Q.name)?.update());
4345
4354
  });
4346
- }, C = () => {
4347
- O.setViewport(0, 0, g, b), O.setScissor(0, 0, g, b), O.render(m, X);
4355
+ }, M = () => {
4356
+ O.setViewport(0, 0, v, b), O.setScissor(0, 0, v, b), O.render(m, K);
4348
4357
  }, x = () => {
4349
4358
  if (U === "Side by Side")
4350
- O.setViewport(0, 0, M, b), O.setScissor(0, 0, M, b), O.render(m, X), O.setViewport(M, 0, M, b), O.setScissor(M, 0, M, b), O.render(m, oe);
4359
+ O.setViewport(0, 0, w, b), O.setScissor(0, 0, w, b), O.render(m, K), O.setViewport(w, 0, w, b), O.setScissor(w, 0, w, b), O.render(m, ce);
4351
4360
  else {
4352
- const _ = b - N;
4353
- O.setViewport(0, _, g, N), O.setScissor(0, _, g, N), O.render(m, X), O.setViewport(0, 0, g, N), O.setScissor(0, 0, g, N), O.render(m, oe);
4361
+ const _ = b - j;
4362
+ O.setViewport(0, _, v, j), O.setScissor(0, _, v, j), O.render(m, K), O.setViewport(0, 0, v, j), O.setScissor(0, 0, v, j), O.render(m, ce);
4354
4363
  }
4355
- }, G = () => {
4356
- let _ = 0, z = 0;
4357
- z = b - N, _ = 0, O.setViewport(_, z, M, N), O.setScissor(_, z, M, N), O.render(m, X), _ = M, O.setViewport(_, z, M, N), O.setScissor(_, z, M, N), O.render(m, oe), z = 0, _ = 0, O.setViewport(_, z, M, N), O.setScissor(_, z, M, N), O.render(m, Ge), _ = M, O.setViewport(_, z, M, N), O.setScissor(_, z, M, N), O.render(m, We);
4358
- }, ne = () => {
4364
+ }, z = () => {
4365
+ let _ = 0, H = 0;
4366
+ H = b - j, _ = 0, O.setViewport(_, H, w, j), O.setScissor(_, H, w, j), O.render(m, K), _ = w, O.setViewport(_, H, w, j), O.setScissor(_, H, w, j), O.render(m, ce), H = 0, _ = 0, O.setViewport(_, H, w, j), O.setScissor(_, H, w, j), O.render(m, Ye), _ = w, O.setViewport(_, H, w, j), O.setScissor(_, H, w, j), O.render(m, Ve);
4367
+ }, Z = () => {
4359
4368
  switch (h.forEach((_) => {
4360
4369
  _.update();
4361
4370
  }), u.forEach((_) => {
4362
4371
  _.update();
4363
4372
  }), f.forEach((_) => {
4364
4373
  _.update !== void 0 && _.update();
4365
- }), e.onSceneUpdate !== void 0 && Nt && e.onSceneUpdate(Te), O.clear(), U) {
4374
+ }), e.onSceneUpdate !== void 0 && It && e.onSceneUpdate(Te), O.clear(), U) {
4366
4375
  case "Single":
4367
- C();
4376
+ M();
4368
4377
  break;
4369
4378
  case "Side by Side":
4370
4379
  case "Stacked":
4371
4380
  x();
4372
4381
  break;
4373
4382
  case "Quad":
4374
- G();
4383
+ z();
4375
4384
  break;
4376
4385
  }
4377
- ve = requestAnimationFrame(ne);
4386
+ oe = requestAnimationFrame(Z);
4378
4387
  };
4379
- return Ye(), window.addEventListener("resize", le), le(), ne(), () => {
4380
- window.removeEventListener("resize", le), cancelAnimationFrame(ve), ve = -1;
4388
+ return Be(), window.addEventListener("resize", ue), ue(), Z(), () => {
4389
+ window.removeEventListener("resize", ue), cancelAnimationFrame(oe), oe = -1;
4381
4390
  };
4382
4391
  }, [U, O]), Re(() => {
4383
4392
  if (O !== null) {
4384
- const g = new Ea(), b = new me(), M = (C, x, G, ne) => {
4393
+ const v = new ya(), b = new pe(), w = (M, x, z, Z) => {
4385
4394
  switch (U) {
4386
4395
  case "Quad":
4387
- C < G ? x < ne ? g.setFromCamera(b, X) : g.setFromCamera(b, Ge) : x < ne ? g.setFromCamera(b, oe) : g.setFromCamera(b, We);
4396
+ M < z ? x < Z ? v.setFromCamera(b, K) : v.setFromCamera(b, Ye) : x < Z ? v.setFromCamera(b, ce) : v.setFromCamera(b, Ve);
4388
4397
  break;
4389
4398
  case "Side by Side":
4390
- C < G ? g.setFromCamera(b, X) : g.setFromCamera(b, oe);
4399
+ M < z ? v.setFromCamera(b, K) : v.setFromCamera(b, ce);
4391
4400
  break;
4392
4401
  case "Single":
4393
- g.setFromCamera(b, X);
4402
+ v.setFromCamera(b, K);
4394
4403
  break;
4395
4404
  case "Stacked":
4396
- x < ne ? g.setFromCamera(b, X) : g.setFromCamera(b, oe);
4405
+ x < Z ? v.setFromCamera(b, K) : v.setFromCamera(b, ce);
4397
4406
  break;
4398
4407
  }
4399
- }, N = (C) => {
4400
- if (!St)
4408
+ }, j = (M) => {
4409
+ if (je === "Orbit")
4401
4410
  return;
4402
- const x = new me();
4411
+ const x = new pe();
4403
4412
  O.getSize(x);
4404
- const G = Math.min(C.clientX, x.x), ne = Math.min(C.clientY, x.y);
4405
- b.x = rt(G, 0, x.x, -1, 1), b.y = rt(ne, 0, x.y, 1, -1);
4406
- const _ = x.x / 2, z = x.y / 2, K = () => {
4407
- G < _ ? b.x = rt(G, 0, _, -1, 1) : b.x = rt(G, _, x.x, -1, 1);
4408
- }, Ne = () => {
4409
- ne < z ? b.y = rt(ne, 0, z, 1, -1) : b.y = rt(ne, z, x.y, 1, -1);
4413
+ const z = Math.min(M.clientX, x.x), Z = Math.min(M.clientY, x.y);
4414
+ b.x = ot(z, 0, x.x, -1, 1), b.y = ot(Z, 0, x.y, 1, -1);
4415
+ const _ = x.x / 2, H = x.y / 2, Q = () => {
4416
+ z < _ ? b.x = ot(z, 0, _, -1, 1) : b.x = ot(z, _, x.x, -1, 1);
4417
+ }, $e = () => {
4418
+ Z < H ? b.y = ot(Z, 0, H, 1, -1) : b.y = ot(Z, H, x.y, 1, -1);
4410
4419
  };
4411
4420
  switch (U) {
4412
4421
  case "Quad":
4413
- K(), Ne();
4422
+ Q(), $e();
4414
4423
  break;
4415
4424
  case "Side by Side":
4416
- K();
4425
+ Q();
4417
4426
  break;
4418
4427
  case "Stacked":
4419
- Ne(), Ne();
4428
+ $e(), $e();
4420
4429
  break;
4421
4430
  }
4422
- M(G, ne, _, z);
4423
- const Je = g.intersectObjects(Te.children);
4424
- Je.length > 0 && F.position.copy(Je[0].point);
4425
- }, ve = (C) => {
4426
- if (!St)
4431
+ w(z, Z, _, H);
4432
+ const ze = v.intersectObjects(Te.children);
4433
+ ze.length > 0 && N.position.copy(ze[0].point);
4434
+ }, oe = (M) => {
4435
+ if (je === "Orbit")
4427
4436
  return;
4428
- const x = new me();
4429
- if (O.getSize(x), C.clientX >= x.x)
4437
+ const x = new pe();
4438
+ if (O.getSize(x), M.clientX >= x.x)
4430
4439
  return;
4431
- N(C);
4432
- const G = g.intersectObjects(Te.children);
4433
- G.length > 0 && e.three.getObject(G[0].object.uuid);
4434
- }, le = ge.current;
4435
- return le.addEventListener("mousemove", N, !1), le.addEventListener("click", ve, !1), () => {
4436
- le.removeEventListener("mousemove", N), le.removeEventListener("click", ve);
4440
+ j(M);
4441
+ const z = v.intersectObjects(Te.children);
4442
+ z.length > 0 && (e.three.getObject(z[0].object.uuid), N.visible = !1, qe("Orbit"), Le(Date.now()));
4443
+ }, ue = ve.current;
4444
+ return ue.addEventListener("mousemove", j, !1), ue.addEventListener("click", oe, !1), () => {
4445
+ ue.removeEventListener("mousemove", j), ue.removeEventListener("click", oe);
4437
4446
  };
4438
4447
  }
4439
- }, [U, O]);
4440
- const ue = [];
4441
- return r.forEach((g, b) => {
4442
- ue.push(b);
4448
+ }, [U, O, je]);
4449
+ const be = [];
4450
+ return r.forEach((v, b) => {
4451
+ be.push(b);
4443
4452
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
4444
4453
  /* @__PURE__ */ l.jsx("canvas", { ref: q }),
4445
4454
  O !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4446
- /* @__PURE__ */ l.jsxs("div", { className: `cameras ${U === "Single" || U === "Stacked" ? "single" : ""}`, ref: ge, children: [
4447
- U === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(qe, { camera: X, options: ue, ref: ce, onSelect: (g) => {
4448
- h.get(X.name)?.dispose();
4449
- const b = r.get(g);
4450
- b !== void 0 && (Me(X), X = b, localStorage.setItem(`${n}_tlCam`, b.name), re(b, ce.current));
4455
+ /* @__PURE__ */ l.jsxs("div", { className: `cameras ${U === "Single" || U === "Stacked" ? "single" : ""}`, ref: ve, children: [
4456
+ U === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ze, { camera: K, options: be, ref: le, onSelect: (v) => {
4457
+ h.get(K.name)?.dispose();
4458
+ const b = r.get(v);
4459
+ b !== void 0 && (fe(K), K = b, localStorage.setItem(`${n}_tlCam`, b.name), ae(b, le.current));
4451
4460
  } }) }),
4452
4461
  (U === "Side by Side" || U === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4453
- /* @__PURE__ */ l.jsx(qe, { camera: X, options: ue, ref: ce, onSelect: (g) => {
4454
- h.get(X.name)?.dispose();
4455
- const b = r.get(g);
4456
- b !== void 0 && (Me(X), X = b, localStorage.setItem(`${n}_tlCam`, b.name), re(b, ce.current));
4462
+ /* @__PURE__ */ l.jsx(Ze, { camera: K, options: be, ref: le, onSelect: (v) => {
4463
+ h.get(K.name)?.dispose();
4464
+ const b = r.get(v);
4465
+ b !== void 0 && (fe(K), K = b, localStorage.setItem(`${n}_tlCam`, b.name), ae(b, le.current));
4457
4466
  } }),
4458
- /* @__PURE__ */ l.jsx(qe, { camera: oe, options: ue, ref: _e, onSelect: (g) => {
4459
- h.get(oe.name)?.dispose();
4460
- const b = r.get(g);
4461
- b !== void 0 && (Me(oe), oe = b, localStorage.setItem(`${n}_trCam`, b.name), re(b, _e.current));
4467
+ /* @__PURE__ */ l.jsx(Ze, { camera: ce, options: be, ref: _e, onSelect: (v) => {
4468
+ h.get(ce.name)?.dispose();
4469
+ const b = r.get(v);
4470
+ b !== void 0 && (fe(ce), ce = b, localStorage.setItem(`${n}_trCam`, b.name), ae(b, _e.current));
4462
4471
  } })
4463
4472
  ] }),
4464
4473
  U === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4465
- /* @__PURE__ */ l.jsx(qe, { camera: X, options: ue, ref: ce, onSelect: (g) => {
4466
- h.get(X.name)?.dispose();
4467
- const b = r.get(g);
4468
- b !== void 0 && (Me(X), X = b, localStorage.setItem(`${n}_tlCam`, b.name), re(b, ce.current));
4474
+ /* @__PURE__ */ l.jsx(Ze, { camera: K, options: be, ref: le, onSelect: (v) => {
4475
+ h.get(K.name)?.dispose();
4476
+ const b = r.get(v);
4477
+ b !== void 0 && (fe(K), K = b, localStorage.setItem(`${n}_tlCam`, b.name), ae(b, le.current));
4469
4478
  } }),
4470
- /* @__PURE__ */ l.jsx(qe, { camera: oe, options: ue, ref: _e, onSelect: (g) => {
4471
- h.get(oe.name)?.dispose();
4472
- const b = r.get(g);
4473
- b !== void 0 && (Me(oe), oe = b, localStorage.setItem(`${n}_trCam`, b.name), re(b, _e.current));
4479
+ /* @__PURE__ */ l.jsx(Ze, { camera: ce, options: be, ref: _e, onSelect: (v) => {
4480
+ h.get(ce.name)?.dispose();
4481
+ const b = r.get(v);
4482
+ b !== void 0 && (fe(ce), ce = b, localStorage.setItem(`${n}_trCam`, b.name), ae(b, _e.current));
4474
4483
  } }),
4475
- /* @__PURE__ */ l.jsx(qe, { camera: Ge, options: ue, ref: ke, onSelect: (g) => {
4476
- h.get(Ge.name)?.dispose();
4477
- const b = r.get(g);
4478
- b !== void 0 && (Me(Ge), Ge = b, localStorage.setItem(`${n}_blCam`, b.name), re(b, ke.current));
4484
+ /* @__PURE__ */ l.jsx(Ze, { camera: Ye, options: be, ref: ke, onSelect: (v) => {
4485
+ h.get(Ye.name)?.dispose();
4486
+ const b = r.get(v);
4487
+ b !== void 0 && (fe(Ye), Ye = b, localStorage.setItem(`${n}_blCam`, b.name), ae(b, ke.current));
4479
4488
  } }),
4480
- /* @__PURE__ */ l.jsx(qe, { camera: We, options: ue, ref: be, onSelect: (g) => {
4481
- h.get(We.name)?.dispose();
4482
- const b = r.get(g);
4483
- b !== void 0 && (Me(We), We = b, localStorage.setItem(`${n}_brCam`, b.name), re(b, be.current));
4489
+ /* @__PURE__ */ l.jsx(Ze, { camera: Ve, options: be, ref: ye, onSelect: (v) => {
4490
+ h.get(Ve.name)?.dispose();
4491
+ const b = r.get(v);
4492
+ b !== void 0 && (fe(Ve), Ve = b, localStorage.setItem(`${n}_brCam`, b.name), ae(b, ye.current));
4484
4493
  } })
4485
4494
  ] })
4486
4495
  ] }),
4487
4496
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
4488
4497
  /* @__PURE__ */ l.jsx(
4489
- Mt,
4498
+ wt,
4490
4499
  {
4491
- index: pe.indexOf(U),
4492
- options: pe,
4493
- onSelect: (g) => {
4494
- g !== U && (He(), ye(g));
4500
+ index: ge.indexOf(U),
4501
+ options: ge,
4502
+ onSelect: (v) => {
4503
+ v !== U && (Ue(), Ee(v));
4495
4504
  },
4496
4505
  open: De,
4497
- onToggle: (g) => {
4498
- je(g), Pe && Ae(!1), Ie && Be(!1);
4506
+ onToggle: (v) => {
4507
+ Ie(v), Pe && Ae(!1), Ne && Ke(!1);
4499
4508
  }
4500
4509
  }
4501
4510
  ),
4502
4511
  /* @__PURE__ */ l.jsx(
4503
- Mt,
4512
+ wt,
4504
4513
  {
4505
- index: te.indexOf(xt),
4506
- options: te,
4507
- onSelect: (g) => {
4508
- if (g !== xt)
4509
- switch (xt = g, xt) {
4514
+ index: ne.indexOf(xt),
4515
+ options: ne,
4516
+ onSelect: (v) => {
4517
+ if (v !== xt)
4518
+ switch (xt = v, xt) {
4510
4519
  case "Depth":
4511
4520
  m.overrideMaterial = V;
4512
4521
  break;
@@ -4521,38 +4530,38 @@ function zi(e) {
4521
4530
  m.overrideMaterial = T;
4522
4531
  break;
4523
4532
  case "UVs":
4524
- m.overrideMaterial = I;
4533
+ m.overrideMaterial = L;
4525
4534
  break;
4526
4535
  }
4527
4536
  },
4528
4537
  open: Pe,
4529
- onToggle: (g) => {
4530
- De && je(!1), Ae(g), Ie && Be(!1);
4538
+ onToggle: (v) => {
4539
+ De && Ie(!1), Ae(v), Ne && Ke(!1);
4531
4540
  }
4532
4541
  }
4533
4542
  ),
4534
4543
  /* @__PURE__ */ l.jsx(
4535
- Mt,
4544
+ wt,
4536
4545
  {
4537
- index: 0,
4546
+ index: je === "Orbit" ? 0 : 1,
4538
4547
  options: [
4539
4548
  "Orbit Mode",
4540
4549
  "Selection Mode"
4541
4550
  ],
4542
- onSelect: (g) => {
4543
- St = g === "Selection Mode", F.visible = St;
4551
+ onSelect: (v) => {
4552
+ N.visible = v === "Selection Mode", qe(N.visible ? "Selection" : "Orbit");
4544
4553
  },
4545
- open: Ie,
4546
- onToggle: (g) => {
4547
- De && je(!1), Pe && Ae(!1), Be(g);
4554
+ open: Ne,
4555
+ onToggle: (v) => {
4556
+ De && Ie(!1), Pe && Ae(!1), Ke(v);
4548
4557
  }
4549
4558
  }
4550
4559
  )
4551
- ] })
4560
+ ] }, ct)
4552
4561
  ] })
4553
4562
  ] });
4554
4563
  }
4555
- function Gi(e) {
4564
+ function zi(e) {
4556
4565
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: e.ref, style: e.style, children: [
4557
4566
  /* @__PURE__ */ l.jsx("div", { className: "header", children: e.header }),
4558
4567
  e.children,
@@ -4560,44 +4569,44 @@ function Gi(e) {
4560
4569
  ] });
4561
4570
  }
4562
4571
  export {
4563
- Wt as Accordion,
4564
- ji as Application,
4565
- Rt as BaseRemote,
4566
- Un as ChildObject,
4567
- Ya as ContainerObject,
4568
- Ga as Draggable,
4569
- za as DraggableItem,
4570
- Wa as Dropdown,
4571
- Ha as DropdownItem,
4572
- Gi as Editor,
4573
- bi as Inspector,
4574
- zi as MultiView,
4575
- Fn as NavButton,
4576
- Ii as RemoteComponents,
4577
- Fi as RemoteController,
4578
- Gt as RemoteTheatre,
4579
- Li as RemoteThree,
4580
- Bi as RemoteTweakpane,
4581
- $i as SceneInspector,
4582
- Ui as SidePanel,
4572
+ Gt as Accordion,
4573
+ Ai as Application,
4574
+ Tt as BaseRemote,
4575
+ Fn as ChildObject,
4576
+ Ha as ContainerObject,
4577
+ za as Draggable,
4578
+ $a as DraggableItem,
4579
+ Ga as Dropdown,
4580
+ Wa as DropdownItem,
4581
+ zi as Editor,
4582
+ vi as Inspector,
4583
+ $i as MultiView,
4584
+ Bn as NavButton,
4585
+ ji as RemoteComponents,
4586
+ Bi as RemoteController,
4587
+ zt as RemoteTheatre,
4588
+ Ni as RemoteThree,
4589
+ Li as RemoteTweakpane,
4590
+ Ui as SceneInspector,
4591
+ Fi as SidePanel,
4583
4592
  P as ToolEvents,
4584
- Ot as capitalize,
4585
- Ke as clamp,
4586
- Da as colorToHex,
4593
+ Mt as capitalize,
4594
+ Je as clamp,
4595
+ ka as colorToHex,
4587
4596
  D as debugDispatcher,
4588
- Di as defaultTheatreCallback,
4589
- Tt as dispose,
4590
- Pa as disposeMaterial,
4591
- Ai as disposeTexture,
4592
- Pi as distance,
4593
- Bt as hierarchyUUID,
4594
- ka as isColor,
4595
- nn as mix,
4596
- zt as noop,
4597
- tn as normalize,
4598
- _a as randomID,
4599
- rn as resetThreeObjects,
4600
- an as round,
4601
- Ni as theatreEditorApp,
4602
- Lt as totalThreeObjects
4597
+ ki as defaultTheatreCallback,
4598
+ Ot as dispose,
4599
+ Da as disposeMaterial,
4600
+ Pi as disposeTexture,
4601
+ Di as distance,
4602
+ Lt as hierarchyUUID,
4603
+ _a as isColor,
4604
+ tn as mix,
4605
+ $t as noop,
4606
+ en as normalize,
4607
+ Ra as randomID,
4608
+ an as resetThreeObjects,
4609
+ nn as round,
4610
+ Ii as theatreEditorApp,
4611
+ Nt as totalThreeObjects
4603
4612
  };