@tomorrowevening/hermes 0.0.26 → 0.0.27

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.js CHANGED
@@ -1,12 +1,12 @@
1
1
  var jn = Object.defineProperty;
2
2
  var kn = (t, n, a) => n in t ? jn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
- var L = (t, n, a) => (kn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
- import { PositionalAudio as An, EventDispatcher as cn, Texture as ln, CubeTexture as Dn, RepeatWrapping as Wt, ShaderMaterial as un, GLSL3 as In, DoubleSide as Ln, Color as $t, Mesh as Nn, PlaneGeometry as Fn, Matrix4 as Un, Vector3 as Y, Euler as Bn, Ray as $n, Plane as Gn, MathUtils as Vn, MOUSE as We, TOUCH as Ke, Quaternion as Kt, Spherical as Xt, Vector2 as de, PerspectiveCamera as Nt, MeshDepthMaterial as zn, MeshNormalMaterial as Hn, MeshBasicMaterial as Yn, OrthographicCamera as dn, Scene as fn, Group as Wn, AxesHelper as hn, WebGLRenderer as Kn, Raycaster as Xn, CameraHelper as qn } from "three";
3
+ var F = (t, n, a) => (kn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
+ import { PositionalAudio as An, EventDispatcher as cn, Texture as ln, CubeTexture as Dn, RepeatWrapping as Wt, ShaderMaterial as un, GLSL3 as In, DoubleSide as Ln, Color as Tt, Mesh as Nn, PlaneGeometry as Fn, Matrix4 as Un, Vector3 as X, Euler as Bn, Ray as $n, Plane as zn, MathUtils as Gn, MOUSE as We, TOUCH as Ke, Quaternion as Kt, Spherical as Xt, Vector2 as fe, PerspectiveCamera as Ft, MeshDepthMaterial as Hn, MeshNormalMaterial as Vn, MeshBasicMaterial as Yn, OrthographicCamera as dn, Scene as fn, Group as Wn, AxesHelper as hn, WebGLRenderer as Kn, Raycaster as Xn, CameraHelper as qn } from "three";
5
5
  import { getProject as Zn, createRafDriver as Jn } from "@theatre/core";
6
6
  import ct from "@theatre/studio";
7
7
  import { Pane as Qn } from "tweakpane";
8
8
  import * as ea from "@tweakpane/plugin-essentials";
9
- import pn, { useState as oe, useRef as Ce, useEffect as Fe, Component as ta, forwardRef as na } from "react";
9
+ import pn, { useState as ce, useRef as Ce, useEffect as Fe, Component as ta, forwardRef as na } from "react";
10
10
  import { Reorder as mn } from "framer-motion";
11
11
  function ui(t, n, a) {
12
12
  return Math.min(n, Math.max(t, a));
@@ -25,32 +25,32 @@ function ra(t) {
25
25
  const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), r = (u) => {
26
26
  const p = u.toString(16);
27
27
  return p.length === 1 ? "0" + p : p;
28
- }, s = r(n), d = r(a), l = r(e);
29
- return "#" + s + d + l;
28
+ }, s = r(n), d = r(a), c = r(e);
29
+ return "#" + s + d + c;
30
30
  }
31
- function At(t, n = 1) {
31
+ function Dt(t, n = 1) {
32
32
  return Number(t.toFixed(n));
33
33
  }
34
- let Ft = 0;
34
+ let Ut = 0;
35
35
  const oa = () => {
36
- Ft = 0;
37
- }, gn = (t) => {
36
+ Ut = 0;
37
+ }, vn = (t) => {
38
38
  if (!t)
39
39
  return;
40
40
  let n = t.name.replace(" ", "");
41
- n.length === 0 && (n = `obj_${Ft}`, Ft++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
- gn(a);
41
+ n.length === 0 && (n = `obj_${Ut}`, Ut++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
+ vn(a);
43
43
  });
44
44
  }, fi = (t) => {
45
45
  t == null || t.dispose();
46
46
  }, sa = (t) => {
47
47
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
48
- }, vn = (t) => {
48
+ }, gn = (t) => {
49
49
  var n;
50
50
  if (t) {
51
51
  for (; t.children.length > 0; ) {
52
52
  const a = t.children[0];
53
- a instanceof An ? (a.pause(), a.parent && a.parent.remove(a)) : vn(a);
53
+ a instanceof An ? (a.pause(), a.parent && a.parent.remove(a)) : gn(a);
54
54
  }
55
55
  if (t.parent && t.parent.remove(t), t.isMesh) {
56
56
  const a = t;
@@ -61,22 +61,22 @@ const oa = () => {
61
61
  };
62
62
  class hi {
63
63
  constructor(n, a, e = !0, r = "editor") {
64
- L(this, "components", /* @__PURE__ */ new Map());
65
- L(this, "listen");
64
+ F(this, "components", /* @__PURE__ */ new Map());
65
+ F(this, "listen");
66
66
  // Protected
67
- L(this, "_debugEnabled");
68
- L(this, "broadcastChannel");
69
- L(this, "webSocket");
70
- L(this, "_mode", "app");
71
- L(this, "_connected", !1);
72
- L(this, "useBC", !1);
73
- L(this, "messageHandler", (n) => {
67
+ F(this, "_debugEnabled");
68
+ F(this, "broadcastChannel");
69
+ F(this, "webSocket");
70
+ F(this, "_mode", "app");
71
+ F(this, "_connected", !1);
72
+ F(this, "useBC", !1);
73
+ F(this, "messageHandler", (n) => {
74
74
  this.listen !== void 0 && (this.useBC ? this.listen(n.data) : this.listen(JSON.parse(n.data)));
75
75
  });
76
- L(this, "openHandler", () => {
76
+ F(this, "openHandler", () => {
77
77
  this._connected = !0;
78
78
  });
79
- L(this, "closeHandler", () => {
79
+ F(this, "closeHandler", () => {
80
80
  this._connected = !1;
81
81
  });
82
82
  this.editor = a && document.location.hash.search(r) > -1, this._debugEnabled = a, a && (this.useBC = e, e ? (this.broadcastChannel = new BroadcastChannel(n), this.broadcastChannel.addEventListener("message", this.messageHandler)) : (this.webSocket = new WebSocket(n), this.webSocket.addEventListener("open", this.openHandler), this.webSocket.addEventListener("close", this.closeHandler), this.webSocket.addEventListener("message", this.messageHandler)));
@@ -114,7 +114,7 @@ class hi {
114
114
  n && (this._mode = "editor", document.title += " - Editor");
115
115
  }
116
116
  }
117
- const _ = new cn(), j = {
117
+ const j = new cn(), k = {
118
118
  CUSTOM: "ToolEvents::custom",
119
119
  // Components
120
120
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -130,15 +130,15 @@ const _ = new cn(), j = {
130
130
  ADD_CAMERA: "ToolEvents::addCamera",
131
131
  REMOVE_CAMERA: "ToolEvents::removeCamera"
132
132
  };
133
- class Tt {
133
+ class Mt {
134
134
  constructor(n) {
135
- L(this, "app");
135
+ F(this, "app");
136
136
  this.app = n;
137
137
  }
138
138
  dispose() {
139
139
  }
140
140
  }
141
- class ca extends Tt {
141
+ class ca extends Mt {
142
142
  selectDropdown(n, a) {
143
143
  this.app.send({
144
144
  event: "selectComponent",
@@ -163,22 +163,22 @@ class ca extends Tt {
163
163
  function la(t, n) {
164
164
  switch (n.event) {
165
165
  case "selectComponent":
166
- _.dispatchEvent({ type: j.SELECT_DROPDOWN, value: n.data });
166
+ j.dispatchEvent({ type: k.SELECT_DROPDOWN, value: n.data });
167
167
  break;
168
168
  case "draggableListUpdate":
169
- _.dispatchEvent({ type: j.DRAG_UPDATE, value: n.data });
169
+ j.dispatchEvent({ type: k.DRAG_UPDATE, value: n.data });
170
170
  break;
171
171
  }
172
172
  }
173
173
  const bn = () => {
174
- }, Ze = class Ze extends Tt {
174
+ }, Ze = class Ze extends Mt {
175
175
  constructor() {
176
176
  super(...arguments);
177
- L(this, "project");
178
- L(this, "sheets", /* @__PURE__ */ new Map());
179
- L(this, "sheetObjects", /* @__PURE__ */ new Map());
180
- L(this, "sheetObjectCBs", /* @__PURE__ */ new Map());
181
- L(this, "sheetObjectUnsubscribe", /* @__PURE__ */ new Map());
177
+ F(this, "project");
178
+ F(this, "sheets", /* @__PURE__ */ new Map());
179
+ F(this, "sheetObjects", /* @__PURE__ */ new Map());
180
+ F(this, "sheetObjectCBs", /* @__PURE__ */ new Map());
181
+ F(this, "sheetObjectUnsubscribe", /* @__PURE__ */ new Map());
182
182
  }
183
183
  init(a, e) {
184
184
  return this.project = Zn(a, e), this.project.ready;
@@ -229,18 +229,18 @@ const bn = () => {
229
229
  const d = this.sheet(a);
230
230
  if (d === void 0)
231
231
  return;
232
- const l = `${a}_${e}`;
233
- let u = this.sheetObjects.get(l);
234
- u !== void 0 ? u = d.object(e, { ...r, ...u.value }, { reconfigure: !0 }) : u = d.object(e, r), this.sheetObjects.set(l, u), this.sheetObjectCBs.set(l, s !== void 0 ? s : bn);
235
- const p = u.onValuesChange((v) => {
232
+ const c = `${a}_${e}`;
233
+ let u = this.sheetObjects.get(c);
234
+ u !== void 0 ? u = d.object(e, { ...r, ...u.value }, { reconfigure: !0 }) : u = d.object(e, r), this.sheetObjects.set(c, u), this.sheetObjectCBs.set(c, s !== void 0 ? s : bn);
235
+ const p = u.onValuesChange((b) => {
236
236
  if (this.app.editor) {
237
- for (const x in v) {
238
- const C = v[x];
239
- typeof C == "object" && ia(C) && (v[x] = {
240
- r: C.r,
241
- g: C.g,
242
- b: C.b,
243
- a: C.a
237
+ for (const w in b) {
238
+ const x = b[w];
239
+ typeof x == "object" && ia(x) && (b[w] = {
240
+ r: x.r,
241
+ g: x.g,
242
+ b: x.b,
243
+ a: x.a
244
244
  });
245
245
  }
246
246
  this.app.send({
@@ -248,15 +248,15 @@ const bn = () => {
248
248
  target: "app",
249
249
  data: {
250
250
  sheet: a,
251
- sheetObject: l,
252
- values: v
251
+ sheetObject: c,
252
+ values: b
253
253
  }
254
254
  });
255
255
  }
256
- const E = this.sheetObjectCBs.get(l);
257
- E !== void 0 && E(v);
256
+ const v = this.sheetObjectCBs.get(c);
257
+ v !== void 0 && v(b);
258
258
  });
259
- return this.sheetObjectUnsubscribe.set(l, p), u;
259
+ return this.sheetObjectUnsubscribe.set(c, p), u;
260
260
  }
261
261
  unsubscribe(a) {
262
262
  if (this.project === void 0) {
@@ -265,14 +265,14 @@ const bn = () => {
265
265
  }
266
266
  const e = a.address.sheetId, r = a.address.objectKey, s = this.sheets.get(e);
267
267
  s == null || s.detachObject(r);
268
- const d = `${e}_${r}`, l = this.sheetObjectUnsubscribe.get(d);
269
- l !== void 0 && (this.sheetObjects.delete(d), this.sheetObjectCBs.delete(d), this.sheetObjectUnsubscribe.delete(d), l());
268
+ const d = `${e}_${r}`, c = this.sheetObjectUnsubscribe.get(d);
269
+ c !== void 0 && (this.sheetObjects.delete(d), this.sheetObjectCBs.delete(d), this.sheetObjectUnsubscribe.delete(d), c());
270
270
  }
271
271
  static getRafDriver() {
272
272
  return Ze.rafDriver || (Ze.rafDriver = Jn()), Ze.rafDriver;
273
273
  }
274
274
  };
275
- L(Ze, "rafDriver", null);
275
+ F(Ze, "rafDriver", null);
276
276
  let Ue = Ze, Me;
277
277
  function ua(t, n) {
278
278
  t.components.forEach((a) => {
@@ -303,7 +303,7 @@ function da(t) {
303
303
  s instanceof Ue && (n = s);
304
304
  }), ct.ui.restore(), ct.onSelectionChange((s) => {
305
305
  s.length < 1 || s.forEach((d) => {
306
- let l = d.address.sheetId, u = "setSheet", p = {};
306
+ let c = d.address.sheetId, u = "setSheet", p = {};
307
307
  switch (d.type) {
308
308
  case "Theatre_Sheet_PublicAPI":
309
309
  u = "setSheet", p = {
@@ -311,8 +311,8 @@ function da(t) {
311
311
  }, Me = n.sheets.get(d.address.sheetId);
312
312
  break;
313
313
  case "Theatre_SheetObject_PublicAPI":
314
- u = "setSheetObject", l += `_${d.address.objectKey}`, p = {
315
- id: l,
314
+ u = "setSheetObject", c += `_${d.address.objectKey}`, p = {
315
+ id: c,
316
316
  sheet: d.address.sheetId,
317
317
  key: d.address.objectKey
318
318
  };
@@ -433,7 +433,7 @@ function Xe(t) {
433
433
  }
434
434
  return n;
435
435
  }
436
- function Dt(t) {
436
+ function It(t) {
437
437
  t.updateMatrix();
438
438
  const n = {
439
439
  name: t.name,
@@ -511,7 +511,7 @@ function Dt(t) {
511
511
  });
512
512
  return n;
513
513
  }
514
- function Q(t, n, a) {
514
+ function Z(t, n, a) {
515
515
  const e = n.split(".");
516
516
  switch (e.length) {
517
517
  case 1:
@@ -531,7 +531,7 @@ function Q(t, n, a) {
531
531
  break;
532
532
  }
533
533
  }
534
- function Ut(t) {
534
+ function Bt(t) {
535
535
  return new Promise((n, a) => {
536
536
  const e = new Image();
537
537
  e.onload = () => {
@@ -540,21 +540,20 @@ function Ut(t) {
540
540
  }, e.onerror = a, e.src = t;
541
541
  });
542
542
  }
543
- class ga extends Tt {
543
+ class va extends Mt {
544
544
  constructor() {
545
545
  super(...arguments);
546
- L(this, "scene");
546
+ F(this, "scene");
547
547
  }
548
548
  getObject(a) {
549
- this.app.debugEnabled && (console.log("get:", a), this.app.send({
549
+ this.app.debugEnabled && this.app.send({
550
550
  event: "getObject",
551
551
  target: "app",
552
552
  data: a
553
- }));
553
+ });
554
554
  }
555
555
  setObject(a) {
556
- console.log("set:", a);
557
- const e = Dt(a);
556
+ const e = It(a);
558
557
  this.app.send({
559
558
  event: "setObject",
560
559
  target: "editor",
@@ -597,7 +596,7 @@ class ga extends Tt {
597
596
  setScene(a) {
598
597
  if (a === void 0 || (this.scene = a, !this.app.debugEnabled))
599
598
  return;
600
- oa(), gn(this.scene);
599
+ oa(), vn(this.scene);
601
600
  const e = yn(this.scene);
602
601
  this.app.send({
603
602
  event: "setScene",
@@ -608,7 +607,7 @@ class ga extends Tt {
608
607
  addCamera(a) {
609
608
  if (!this.app.debugEnabled)
610
609
  return;
611
- const e = Dt(a);
610
+ const e = It(a);
612
611
  this.app.send({
613
612
  event: "addCamera",
614
613
  target: "editor",
@@ -618,7 +617,7 @@ class ga extends Tt {
618
617
  removeCamera(a) {
619
618
  if (!this.app.debugEnabled)
620
619
  return;
621
- const e = Dt(a);
620
+ const e = It(a);
622
621
  this.app.send({
623
622
  event: "removeCamera",
624
623
  target: "editor",
@@ -626,47 +625,47 @@ class ga extends Tt {
626
625
  });
627
626
  }
628
627
  }
629
- function va(t, n) {
628
+ function ga(t, n) {
630
629
  switch (n.event) {
631
630
  case "getObject":
632
- _.dispatchEvent({ type: j.GET_OBJECT, value: n.data });
631
+ j.dispatchEvent({ type: k.GET_OBJECT, value: n.data });
633
632
  break;
634
633
  case "updateObject":
635
- _.dispatchEvent({ type: j.UPDATE_OBJECT, value: n.data });
634
+ j.dispatchEvent({ type: k.UPDATE_OBJECT, value: n.data });
636
635
  break;
637
636
  case "createTexture":
638
- _.dispatchEvent({ type: j.CREATE_TEXTURE, value: n.data });
637
+ j.dispatchEvent({ type: k.CREATE_TEXTURE, value: n.data });
639
638
  break;
640
639
  case "requestMethod":
641
- _.dispatchEvent({ type: j.REQUEST_METHOD, value: n.data });
640
+ j.dispatchEvent({ type: k.REQUEST_METHOD, value: n.data });
642
641
  break;
643
642
  }
644
643
  }
645
644
  function ba(t, n) {
646
645
  switch (n.event) {
647
646
  case "setObject":
648
- _.dispatchEvent({ type: j.SET_OBJECT, value: n.data });
647
+ j.dispatchEvent({ type: k.SET_OBJECT, value: n.data });
649
648
  break;
650
649
  case "setScene":
651
- _.dispatchEvent({ type: j.SET_SCENE, value: n.data });
650
+ j.dispatchEvent({ type: k.SET_SCENE, value: n.data });
652
651
  break;
653
652
  case "addCamera":
654
- _.dispatchEvent({ type: j.ADD_CAMERA, value: n.data });
653
+ j.dispatchEvent({ type: k.ADD_CAMERA, value: n.data });
655
654
  break;
656
655
  case "removeCamera":
657
- _.dispatchEvent({ type: j.REMOVE_CAMERA, value: n.data });
656
+ j.dispatchEvent({ type: k.REMOVE_CAMERA, value: n.data });
658
657
  break;
659
658
  }
660
659
  }
661
- class En extends Tt {
660
+ class En extends Mt {
662
661
  constructor(a) {
663
662
  super(a);
664
- L(this, "bindCBs");
665
- L(this, "buttonCBs");
666
- L(this, "pane");
667
- L(this, "appCallbacks", 0);
668
- L(this, "editorCallbacks", 0);
669
- L(this, "inspectorFolder");
663
+ F(this, "bindCBs");
664
+ F(this, "buttonCBs");
665
+ F(this, "pane");
666
+ F(this, "appCallbacks", 0);
667
+ F(this, "editorCallbacks", 0);
668
+ F(this, "inspectorFolder");
670
669
  this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
671
670
  }
672
671
  createGUI() {
@@ -697,8 +696,8 @@ class En extends Tt {
697
696
  }
698
697
  // Binding
699
698
  bind(a, e, r, s = void 0) {
700
- const d = this.bindID, l = r.onChange !== void 0 ? r.onChange : bn;
701
- this.bindCBs.set(d, l), this.app.editor ? (this.pane === void 0 && this.createGUI(), (s !== void 0 ? s : this.pane).addBinding(a, e, r).on("change", (p) => {
699
+ const d = this.bindID, c = r.onChange !== void 0 ? r.onChange : bn;
700
+ this.bindCBs.set(d, c), this.app.editor ? (this.pane === void 0 && this.createGUI(), (s !== void 0 ? s : this.pane).addBinding(a, e, r).on("change", (p) => {
702
701
  this.app.send({
703
702
  event: "updateBind",
704
703
  target: "app",
@@ -783,7 +782,7 @@ function ya(t, n) {
783
782
  }
784
783
  });
785
784
  }
786
- var Bt = { exports: {} }, rt = {};
785
+ var $t = { exports: {} }, rt = {};
787
786
  /**
788
787
  * @license React
789
788
  * react-jsx-runtime.production.min.js
@@ -799,15 +798,15 @@ function Ea() {
799
798
  return rt;
800
799
  qt = 1;
801
800
  var t = pn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
802
- function d(l, u, p) {
803
- var v, E = {}, x = null, C = null;
804
- p !== void 0 && (x = "" + p), u.key !== void 0 && (x = "" + u.key), u.ref !== void 0 && (C = u.ref);
805
- for (v in u)
806
- e.call(u, v) && !s.hasOwnProperty(v) && (E[v] = u[v]);
807
- if (l && l.defaultProps)
808
- for (v in u = l.defaultProps, u)
809
- E[v] === void 0 && (E[v] = u[v]);
810
- return { $$typeof: n, type: l, key: x, ref: C, props: E, _owner: r.current };
801
+ function d(c, u, p) {
802
+ var b, v = {}, w = null, x = null;
803
+ p !== void 0 && (w = "" + p), u.key !== void 0 && (w = "" + u.key), u.ref !== void 0 && (x = u.ref);
804
+ for (b in u)
805
+ e.call(u, b) && !s.hasOwnProperty(b) && (v[b] = u[b]);
806
+ if (c && c.defaultProps)
807
+ for (b in u = c.defaultProps, u)
808
+ v[b] === void 0 && (v[b] = u[b]);
809
+ return { $$typeof: n, type: c, key: w, ref: x, props: v, _owner: r.current };
811
810
  }
812
811
  return rt.Fragment = a, rt.jsx = d, rt.jsxs = d, rt;
813
812
  }
@@ -824,54 +823,54 @@ var ot = {};
824
823
  var Zt;
825
824
  function wa() {
826
825
  return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
827
- var t = pn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), M = Symbol.iterator, V = "@@iterator";
828
- function se(i) {
826
+ var t = pn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), O = Symbol.iterator, M = "@@iterator";
827
+ function K(i) {
829
828
  if (i === null || typeof i != "object")
830
829
  return null;
831
- var h = M && i[M] || i[V];
830
+ var h = O && i[O] || i[M];
832
831
  return typeof h == "function" ? h : null;
833
832
  }
834
- var K = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
835
- function S(i) {
833
+ var I = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
834
+ function C(i) {
836
835
  {
837
- for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
838
- g[w - 1] = arguments[w];
839
- X("error", i, g);
836
+ for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), S = 1; S < h; S++)
837
+ g[S - 1] = arguments[S];
838
+ V("error", i, g);
840
839
  }
841
840
  }
842
- function X(i, h, g) {
841
+ function V(i, h, g) {
843
842
  {
844
- var w = K.ReactDebugCurrentFrame, k = w.getStackAddendum();
845
- k !== "" && (h += "%s", g = g.concat([k]));
846
- var F = g.map(function(P) {
847
- return String(P);
843
+ var S = I.ReactDebugCurrentFrame, A = S.getStackAddendum();
844
+ A !== "" && (h += "%s", g = g.concat([A]));
845
+ var B = g.map(function(_) {
846
+ return String(_);
848
847
  });
849
- F.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, F);
848
+ B.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, B);
850
849
  }
851
850
  }
852
- var fe = !1, le = !1, ee = !1, f = !1, m = !1, b;
853
- b = Symbol.for("react.module.reference");
854
- function O(i) {
855
- return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || m || i === r || i === p || i === v || f || i === C || fe || le || ee || typeof i == "object" && i !== null && (i.$$typeof === x || i.$$typeof === E || i.$$typeof === d || i.$$typeof === l || i.$$typeof === u || // This needs to include all possible module reference object
851
+ var ie = !1, ue = !1, te = !1, f = !1, m = !1, y;
852
+ y = Symbol.for("react.module.reference");
853
+ function T(i) {
854
+ return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || m || i === r || i === p || i === b || f || i === x || ie || ue || te || typeof i == "object" && i !== null && (i.$$typeof === w || i.$$typeof === v || i.$$typeof === d || i.$$typeof === c || i.$$typeof === u || // This needs to include all possible module reference object
856
855
  // types supported by any Flight configuration anywhere since
857
856
  // we don't know which Flight build this will end up being used
858
857
  // with.
859
- i.$$typeof === b || i.getModuleId !== void 0));
858
+ i.$$typeof === y || i.getModuleId !== void 0));
860
859
  }
861
- function $(i, h, g) {
862
- var w = i.displayName;
863
- if (w)
864
- return w;
865
- var k = h.displayName || h.name || "";
866
- return k !== "" ? g + "(" + k + ")" : g;
860
+ function G(i, h, g) {
861
+ var S = i.displayName;
862
+ if (S)
863
+ return S;
864
+ var A = h.displayName || h.name || "";
865
+ return A !== "" ? g + "(" + A + ")" : g;
867
866
  }
868
- function G(i) {
867
+ function H(i) {
869
868
  return i.displayName || "Context";
870
869
  }
871
- function U(i) {
870
+ function $(i) {
872
871
  if (i == null)
873
872
  return null;
874
- if (typeof i.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
873
+ if (typeof i.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
875
874
  return i.displayName || i.name || null;
876
875
  if (typeof i == "string")
877
876
  return i;
@@ -886,26 +885,26 @@ function wa() {
886
885
  return "StrictMode";
887
886
  case p:
888
887
  return "Suspense";
889
- case v:
888
+ case b:
890
889
  return "SuspenseList";
891
890
  }
892
891
  if (typeof i == "object")
893
892
  switch (i.$$typeof) {
894
- case l:
893
+ case c:
895
894
  var h = i;
896
- return G(h) + ".Consumer";
895
+ return H(h) + ".Consumer";
897
896
  case d:
898
897
  var g = i;
899
- return G(g._context) + ".Provider";
898
+ return H(g._context) + ".Provider";
900
899
  case u:
901
- return $(i, i.render, "ForwardRef");
902
- case E:
903
- var w = i.displayName || null;
904
- return w !== null ? w : U(i.type) || "Memo";
905
- case x: {
906
- var k = i, F = k._payload, P = k._init;
900
+ return G(i, i.render, "ForwardRef");
901
+ case v:
902
+ var S = i.displayName || null;
903
+ return S !== null ? S : $(i.type) || "Memo";
904
+ case w: {
905
+ var A = i, B = A._payload, _ = A._init;
907
906
  try {
908
- return U(P(F));
907
+ return $(_(B));
909
908
  } catch {
910
909
  return null;
911
910
  }
@@ -913,14 +912,14 @@ function wa() {
913
912
  }
914
913
  return null;
915
914
  }
916
- var D = Object.assign, B = 0, J, R, I, q, me, Re, Je;
915
+ var L = Object.assign, z = 0, ee, P, N, J, me, Re, Je;
917
916
  function dt() {
918
917
  }
919
918
  dt.__reactDisabledLog = !0;
920
- function Rt() {
919
+ function Pt() {
921
920
  {
922
- if (B === 0) {
923
- J = console.log, R = console.info, I = console.warn, q = console.error, me = console.group, Re = console.groupCollapsed, Je = console.groupEnd;
921
+ if (z === 0) {
922
+ ee = console.log, P = console.info, N = console.warn, J = console.error, me = console.group, Re = console.groupCollapsed, Je = console.groupEnd;
924
923
  var i = {
925
924
  configurable: !0,
926
925
  enumerable: !0,
@@ -937,130 +936,130 @@ function wa() {
937
936
  groupEnd: i
938
937
  });
939
938
  }
940
- B++;
939
+ z++;
941
940
  }
942
941
  }
943
- function Pt() {
942
+ function _t() {
944
943
  {
945
- if (B--, B === 0) {
944
+ if (z--, z === 0) {
946
945
  var i = {
947
946
  configurable: !0,
948
947
  enumerable: !0,
949
948
  writable: !0
950
949
  };
951
950
  Object.defineProperties(console, {
952
- log: D({}, i, {
953
- value: J
951
+ log: L({}, i, {
952
+ value: ee
954
953
  }),
955
- info: D({}, i, {
956
- value: R
954
+ info: L({}, i, {
955
+ value: P
957
956
  }),
958
- warn: D({}, i, {
959
- value: I
957
+ warn: L({}, i, {
958
+ value: N
960
959
  }),
961
- error: D({}, i, {
962
- value: q
960
+ error: L({}, i, {
961
+ value: J
963
962
  }),
964
- group: D({}, i, {
963
+ group: L({}, i, {
965
964
  value: me
966
965
  }),
967
- groupCollapsed: D({}, i, {
966
+ groupCollapsed: L({}, i, {
968
967
  value: Re
969
968
  }),
970
- groupEnd: D({}, i, {
969
+ groupEnd: L({}, i, {
971
970
  value: Je
972
971
  })
973
972
  });
974
973
  }
975
- B < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
974
+ z < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
976
975
  }
977
976
  }
978
- var Qe = K.ReactCurrentDispatcher, et;
977
+ var Qe = I.ReactCurrentDispatcher, et;
979
978
  function Pe(i, h, g) {
980
979
  {
981
980
  if (et === void 0)
982
981
  try {
983
982
  throw Error();
984
- } catch (k) {
985
- var w = k.stack.trim().match(/\n( *(at )?)/);
986
- et = w && w[1] || "";
983
+ } catch (A) {
984
+ var S = A.stack.trim().match(/\n( *(at )?)/);
985
+ et = S && S[1] || "";
987
986
  }
988
987
  return `
989
988
  ` + et + i;
990
989
  }
991
990
  }
992
- var Ge = !1, _e;
991
+ var ze = !1, _e;
993
992
  {
994
- var _t = typeof WeakMap == "function" ? WeakMap : Map;
995
- _e = new _t();
993
+ var jt = typeof WeakMap == "function" ? WeakMap : Map;
994
+ _e = new jt();
996
995
  }
997
996
  function ft(i, h) {
998
- if (!i || Ge)
997
+ if (!i || ze)
999
998
  return "";
1000
999
  {
1001
1000
  var g = _e.get(i);
1002
1001
  if (g !== void 0)
1003
1002
  return g;
1004
1003
  }
1005
- var w;
1006
- Ge = !0;
1007
- var k = Error.prepareStackTrace;
1004
+ var S;
1005
+ ze = !0;
1006
+ var A = Error.prepareStackTrace;
1008
1007
  Error.prepareStackTrace = void 0;
1009
- var F;
1010
- F = Qe.current, Qe.current = null, Rt();
1008
+ var B;
1009
+ B = Qe.current, Qe.current = null, Pt();
1011
1010
  try {
1012
1011
  if (h) {
1013
- var P = function() {
1012
+ var _ = function() {
1014
1013
  throw Error();
1015
1014
  };
1016
- if (Object.defineProperty(P.prototype, "props", {
1015
+ if (Object.defineProperty(_.prototype, "props", {
1017
1016
  set: function() {
1018
1017
  throw Error();
1019
1018
  }
1020
1019
  }), typeof Reflect == "object" && Reflect.construct) {
1021
1020
  try {
1022
- Reflect.construct(P, []);
1021
+ Reflect.construct(_, []);
1023
1022
  } catch (Ee) {
1024
- w = Ee;
1023
+ S = Ee;
1025
1024
  }
1026
- Reflect.construct(i, [], P);
1025
+ Reflect.construct(i, [], _);
1027
1026
  } else {
1028
1027
  try {
1029
- P.call();
1028
+ _.call();
1030
1029
  } catch (Ee) {
1031
- w = Ee;
1030
+ S = Ee;
1032
1031
  }
1033
- i.call(P.prototype);
1032
+ i.call(_.prototype);
1034
1033
  }
1035
1034
  } else {
1036
1035
  try {
1037
1036
  throw Error();
1038
1037
  } catch (Ee) {
1039
- w = Ee;
1038
+ S = Ee;
1040
1039
  }
1041
1040
  i();
1042
1041
  }
1043
1042
  } catch (Ee) {
1044
- if (Ee && w && typeof Ee.stack == "string") {
1045
- for (var T = Ee.stack.split(`
1046
- `), ce = w.stack.split(`
1047
- `), W = T.length - 1, Z = ce.length - 1; W >= 1 && Z >= 0 && T[W] !== ce[Z]; )
1048
- Z--;
1049
- for (; W >= 1 && Z >= 0; W--, Z--)
1050
- if (T[W] !== ce[Z]) {
1051
- if (W !== 1 || Z !== 1)
1043
+ if (Ee && S && typeof Ee.stack == "string") {
1044
+ for (var R = Ee.stack.split(`
1045
+ `), le = S.stack.split(`
1046
+ `), q = R.length - 1, Q = le.length - 1; q >= 1 && Q >= 0 && R[q] !== le[Q]; )
1047
+ Q--;
1048
+ for (; q >= 1 && Q >= 0; q--, Q--)
1049
+ if (R[q] !== le[Q]) {
1050
+ if (q !== 1 || Q !== 1)
1052
1051
  do
1053
- if (W--, Z--, Z < 0 || T[W] !== ce[Z]) {
1054
- var ge = `
1055
- ` + T[W].replace(" at new ", " at ");
1056
- return i.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", i.displayName)), typeof i == "function" && _e.set(i, ge), ge;
1052
+ if (q--, Q--, Q < 0 || R[q] !== le[Q]) {
1053
+ var ve = `
1054
+ ` + R[q].replace(" at new ", " at ");
1055
+ return i.displayName && ve.includes("<anonymous>") && (ve = ve.replace("<anonymous>", i.displayName)), typeof i == "function" && _e.set(i, ve), ve;
1057
1056
  }
1058
- while (W >= 1 && Z >= 0);
1057
+ while (q >= 1 && Q >= 0);
1059
1058
  break;
1060
1059
  }
1061
1060
  }
1062
1061
  } finally {
1063
- Ge = !1, Qe.current = F, Pt(), Error.prepareStackTrace = k;
1062
+ ze = !1, Qe.current = B, _t(), Error.prepareStackTrace = A;
1064
1063
  }
1065
1064
  var Ye = i ? i.displayName || i.name : "", Yt = Ye ? Pe(Ye) : "";
1066
1065
  return typeof i == "function" && _e.set(i, Yt), Yt;
@@ -1082,26 +1081,26 @@ function wa() {
1082
1081
  switch (i) {
1083
1082
  case p:
1084
1083
  return Pe("Suspense");
1085
- case v:
1084
+ case b:
1086
1085
  return Pe("SuspenseList");
1087
1086
  }
1088
1087
  if (typeof i == "object")
1089
1088
  switch (i.$$typeof) {
1090
1089
  case u:
1091
1090
  return ht(i.render);
1092
- case E:
1091
+ case v:
1093
1092
  return je(i.type, h, g);
1094
- case x: {
1095
- var w = i, k = w._payload, F = w._init;
1093
+ case w: {
1094
+ var S = i, A = S._payload, B = S._init;
1096
1095
  try {
1097
- return je(F(k), h, g);
1096
+ return je(B(A), h, g);
1098
1097
  } catch {
1099
1098
  }
1100
1099
  }
1101
1100
  }
1102
1101
  return "";
1103
1102
  }
1104
- var Ve = Object.prototype.hasOwnProperty, mt = {}, tt = K.ReactDebugCurrentFrame;
1103
+ var Ge = Object.prototype.hasOwnProperty, mt = {}, tt = I.ReactDebugCurrentFrame;
1105
1104
  function Se(i) {
1106
1105
  if (i) {
1107
1106
  var h = i._owner, g = je(i.type, i._source, h ? h.type : null);
@@ -1109,30 +1108,30 @@ function wa() {
1109
1108
  } else
1110
1109
  tt.setExtraStackFrame(null);
1111
1110
  }
1112
- function ke(i, h, g, w, k) {
1111
+ function ke(i, h, g, S, A) {
1113
1112
  {
1114
- var F = Function.call.bind(Ve);
1115
- for (var P in i)
1116
- if (F(i, P)) {
1117
- var T = void 0;
1113
+ var B = Function.call.bind(Ge);
1114
+ for (var _ in i)
1115
+ if (B(i, _)) {
1116
+ var R = void 0;
1118
1117
  try {
1119
- if (typeof i[P] != "function") {
1120
- var ce = Error((w || "React class") + ": " + g + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1121
- throw ce.name = "Invariant Violation", ce;
1118
+ if (typeof i[_] != "function") {
1119
+ var le = Error((S || "React class") + ": " + g + " type `" + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[_] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1120
+ throw le.name = "Invariant Violation", le;
1122
1121
  }
1123
- T = i[P](h, P, w, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1124
- } catch (W) {
1125
- T = W;
1122
+ R = i[_](h, _, S, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1123
+ } catch (q) {
1124
+ R = q;
1126
1125
  }
1127
- T && !(T instanceof Error) && (Se(k), S("%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", g, P, typeof T), Se(null)), T instanceof Error && !(T.message in mt) && (mt[T.message] = !0, Se(k), S("Failed %s type: %s", g, T.message), Se(null));
1126
+ R && !(R instanceof Error) && (Se(A), C("%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).", S || "React class", g, _, typeof R), Se(null)), R instanceof Error && !(R.message in mt) && (mt[R.message] = !0, Se(A), C("Failed %s type: %s", g, R.message), Se(null));
1128
1127
  }
1129
1128
  }
1130
1129
  }
1131
- var jt = Array.isArray;
1130
+ var kt = Array.isArray;
1132
1131
  function nt(i) {
1133
- return jt(i);
1132
+ return kt(i);
1134
1133
  }
1135
- function gt(i) {
1134
+ function vt(i) {
1136
1135
  {
1137
1136
  var h = typeof Symbol == "function" && Symbol.toStringTag, g = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
1138
1137
  return g;
@@ -1140,51 +1139,51 @@ function wa() {
1140
1139
  }
1141
1140
  function at(i) {
1142
1141
  try {
1143
- return vt(i), !1;
1142
+ return gt(i), !1;
1144
1143
  } catch {
1145
1144
  return !0;
1146
1145
  }
1147
1146
  }
1148
- function vt(i) {
1147
+ function gt(i) {
1149
1148
  return "" + i;
1150
1149
  }
1151
1150
  function bt(i) {
1152
1151
  if (at(i))
1153
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", gt(i)), vt(i);
1152
+ return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(i)), gt(i);
1154
1153
  }
1155
- var Oe = K.ReactCurrentOwner, kt = {
1154
+ var Oe = I.ReactCurrentOwner, At = {
1156
1155
  key: !0,
1157
1156
  ref: !0,
1158
1157
  __self: !0,
1159
1158
  __source: !0
1160
- }, yt, it, ve;
1161
- ve = {};
1159
+ }, yt, it, ge;
1160
+ ge = {};
1162
1161
  function o(i) {
1163
- if (Ve.call(i, "ref")) {
1162
+ if (Ge.call(i, "ref")) {
1164
1163
  var h = Object.getOwnPropertyDescriptor(i, "ref").get;
1165
1164
  if (h && h.isReactWarning)
1166
1165
  return !1;
1167
1166
  }
1168
1167
  return i.ref !== void 0;
1169
1168
  }
1170
- function y(i) {
1171
- if (Ve.call(i, "key")) {
1169
+ function E(i) {
1170
+ if (Ge.call(i, "key")) {
1172
1171
  var h = Object.getOwnPropertyDescriptor(i, "key").get;
1173
1172
  if (h && h.isReactWarning)
1174
1173
  return !1;
1175
1174
  }
1176
1175
  return i.key !== void 0;
1177
1176
  }
1178
- function A(i, h) {
1177
+ function D(i, h) {
1179
1178
  if (typeof i.ref == "string" && Oe.current && h && Oe.current.stateNode !== h) {
1180
- var g = U(Oe.current.type);
1181
- ve[g] || (S('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(Oe.current.type), i.ref), ve[g] = !0);
1179
+ var g = $(Oe.current.type);
1180
+ ge[g] || (C('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', $(Oe.current.type), i.ref), ge[g] = !0);
1182
1181
  }
1183
1182
  }
1184
- function N(i, h) {
1183
+ function U(i, h) {
1185
1184
  {
1186
1185
  var g = function() {
1187
- yt || (yt = !0, S("%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)", h));
1186
+ yt || (yt = !0, C("%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)", h));
1188
1187
  };
1189
1188
  g.isReactWarning = !0, Object.defineProperty(i, "key", {
1190
1189
  get: g,
@@ -1192,10 +1191,10 @@ function wa() {
1192
1191
  });
1193
1192
  }
1194
1193
  }
1195
- function te(i, h) {
1194
+ function ne(i, h) {
1196
1195
  {
1197
1196
  var g = function() {
1198
- it || (it = !0, S("%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)", h));
1197
+ it || (it = !0, C("%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)", h));
1199
1198
  };
1200
1199
  g.isReactWarning = !0, Object.defineProperty(i, "ref", {
1201
1200
  get: g,
@@ -1203,54 +1202,54 @@ function wa() {
1203
1202
  });
1204
1203
  }
1205
1204
  }
1206
- var be = function(i, h, g, w, k, F, P) {
1207
- var T = {
1205
+ var be = function(i, h, g, S, A, B, _) {
1206
+ var R = {
1208
1207
  // This tag allows us to uniquely identify this as a React Element
1209
1208
  $$typeof: n,
1210
1209
  // Built-in properties that belong on the element
1211
1210
  type: i,
1212
1211
  key: h,
1213
1212
  ref: g,
1214
- props: P,
1213
+ props: _,
1215
1214
  // Record the component responsible for creating this element.
1216
- _owner: F
1215
+ _owner: B
1217
1216
  };
1218
- return T._store = {}, Object.defineProperty(T._store, "validated", {
1217
+ return R._store = {}, Object.defineProperty(R._store, "validated", {
1219
1218
  configurable: !1,
1220
1219
  enumerable: !1,
1221
1220
  writable: !0,
1222
1221
  value: !1
1223
- }), Object.defineProperty(T, "_self", {
1222
+ }), Object.defineProperty(R, "_self", {
1224
1223
  configurable: !1,
1225
1224
  enumerable: !1,
1226
1225
  writable: !1,
1227
- value: w
1228
- }), Object.defineProperty(T, "_source", {
1226
+ value: S
1227
+ }), Object.defineProperty(R, "_source", {
1229
1228
  configurable: !1,
1230
1229
  enumerable: !1,
1231
1230
  writable: !1,
1232
- value: k
1233
- }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
1231
+ value: A
1232
+ }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
1234
1233
  };
1235
- function ue(i, h, g, w, k) {
1234
+ function de(i, h, g, S, A) {
1236
1235
  {
1237
- var F, P = {}, T = null, ce = null;
1238
- g !== void 0 && (bt(g), T = "" + g), y(h) && (bt(h.key), T = "" + h.key), o(h) && (ce = h.ref, A(h, k));
1239
- for (F in h)
1240
- Ve.call(h, F) && !kt.hasOwnProperty(F) && (P[F] = h[F]);
1236
+ var B, _ = {}, R = null, le = null;
1237
+ g !== void 0 && (bt(g), R = "" + g), E(h) && (bt(h.key), R = "" + h.key), o(h) && (le = h.ref, D(h, A));
1238
+ for (B in h)
1239
+ Ge.call(h, B) && !At.hasOwnProperty(B) && (_[B] = h[B]);
1241
1240
  if (i && i.defaultProps) {
1242
- var W = i.defaultProps;
1243
- for (F in W)
1244
- P[F] === void 0 && (P[F] = W[F]);
1241
+ var q = i.defaultProps;
1242
+ for (B in q)
1243
+ _[B] === void 0 && (_[B] = q[B]);
1245
1244
  }
1246
- if (T || ce) {
1247
- var Z = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1248
- T && N(P, Z), ce && te(P, Z);
1245
+ if (R || le) {
1246
+ var Q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1247
+ R && U(_, Q), le && ne(_, Q);
1249
1248
  }
1250
- return be(i, T, ce, k, w, Oe.current, P);
1249
+ return be(i, R, le, A, S, Oe.current, _);
1251
1250
  }
1252
1251
  }
1253
- var Et = K.ReactCurrentOwner, wt = K.ReactDebugCurrentFrame;
1252
+ var Et = I.ReactCurrentOwner, wt = I.ReactDebugCurrentFrame;
1254
1253
  function ye(i) {
1255
1254
  if (i) {
1256
1255
  var h = i._owner, g = je(i.type, i._source, h ? h.type : null);
@@ -1263,10 +1262,10 @@ function wa() {
1263
1262
  function pe(i) {
1264
1263
  return typeof i == "object" && i !== null && i.$$typeof === n;
1265
1264
  }
1266
- function ze() {
1265
+ function He() {
1267
1266
  {
1268
1267
  if (Et.current) {
1269
- var i = U(Et.current.type);
1268
+ var i = $(Et.current.type);
1270
1269
  if (i)
1271
1270
  return `
1272
1271
 
@@ -1287,9 +1286,9 @@ Check your code at ` + h + ":" + g + ".";
1287
1286
  }
1288
1287
  }
1289
1288
  var Te = {};
1290
- function He(i) {
1289
+ function Ve(i) {
1291
1290
  {
1292
- var h = ze();
1291
+ var h = He();
1293
1292
  if (!h) {
1294
1293
  var g = typeof i == "string" ? i : i.displayName || i.name;
1295
1294
  g && (h = `
@@ -1299,35 +1298,35 @@ Check the top-level render call using <` + g + ">.");
1299
1298
  return h;
1300
1299
  }
1301
1300
  }
1302
- function Vt(i, h) {
1301
+ function Gt(i, h) {
1303
1302
  {
1304
1303
  if (!i._store || i._store.validated || i.key != null)
1305
1304
  return;
1306
1305
  i._store.validated = !0;
1307
- var g = He(h);
1306
+ var g = Ve(h);
1308
1307
  if (Te[g])
1309
1308
  return;
1310
1309
  Te[g] = !0;
1311
- var w = "";
1312
- i && i._owner && i._owner !== Et.current && (w = " It was passed a child from " + U(i._owner.type) + "."), ye(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), ye(null);
1310
+ var S = "";
1311
+ i && i._owner && i._owner !== Et.current && (S = " It was passed a child from " + $(i._owner.type) + "."), ye(i), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, S), ye(null);
1313
1312
  }
1314
1313
  }
1315
- function zt(i, h) {
1314
+ function Ht(i, h) {
1316
1315
  {
1317
1316
  if (typeof i != "object")
1318
1317
  return;
1319
1318
  if (nt(i))
1320
1319
  for (var g = 0; g < i.length; g++) {
1321
- var w = i[g];
1322
- pe(w) && Vt(w, h);
1320
+ var S = i[g];
1321
+ pe(S) && Gt(S, h);
1323
1322
  }
1324
1323
  else if (pe(i))
1325
1324
  i._store && (i._store.validated = !0);
1326
1325
  else if (i) {
1327
- var k = se(i);
1328
- if (typeof k == "function" && k !== i.entries)
1329
- for (var F = k.call(i), P; !(P = F.next()).done; )
1330
- pe(P.value) && Vt(P.value, h);
1326
+ var A = K(i);
1327
+ if (typeof A == "function" && A !== i.entries)
1328
+ for (var B = A.call(i), _; !(_ = B.next()).done; )
1329
+ pe(_.value) && Gt(_.value, h);
1331
1330
  }
1332
1331
  }
1333
1332
  }
@@ -1341,83 +1340,83 @@ Check the top-level render call using <` + g + ">.");
1341
1340
  g = h.propTypes;
1342
1341
  else if (typeof h == "object" && (h.$$typeof === u || // Note: Memo only checks outer props here.
1343
1342
  // Inner props are checked in the reconciler.
1344
- h.$$typeof === E))
1343
+ h.$$typeof === v))
1345
1344
  g = h.propTypes;
1346
1345
  else
1347
1346
  return;
1348
1347
  if (g) {
1349
- var w = U(h);
1350
- ke(g, i.props, "prop", w, i);
1348
+ var S = $(h);
1349
+ ke(g, i.props, "prop", S, i);
1351
1350
  } else if (h.PropTypes !== void 0 && !he) {
1352
1351
  he = !0;
1353
- var k = U(h);
1354
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
1352
+ var A = $(h);
1353
+ C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", A || "Unknown");
1355
1354
  }
1356
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1355
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1357
1356
  }
1358
1357
  }
1359
1358
  function Tn(i) {
1360
1359
  {
1361
1360
  for (var h = Object.keys(i.props), g = 0; g < h.length; g++) {
1362
- var w = h[g];
1363
- if (w !== "children" && w !== "key") {
1364
- ye(i), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), ye(null);
1361
+ var S = h[g];
1362
+ if (S !== "children" && S !== "key") {
1363
+ ye(i), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), ye(null);
1365
1364
  break;
1366
1365
  }
1367
1366
  }
1368
- i.ref !== null && (ye(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
1367
+ i.ref !== null && (ye(i), C("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
1369
1368
  }
1370
1369
  }
1371
- function Ht(i, h, g, w, k, F) {
1370
+ function Vt(i, h, g, S, A, B) {
1372
1371
  {
1373
- var P = O(i);
1374
- if (!P) {
1375
- var T = "";
1376
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1377
- var ce = Ae(k);
1378
- ce ? T += ce : T += ze();
1379
- var W;
1380
- i === null ? W = "null" : nt(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (U(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : W = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, T);
1372
+ var _ = T(i);
1373
+ if (!_) {
1374
+ var R = "";
1375
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1376
+ var le = Ae(A);
1377
+ le ? R += le : R += He();
1378
+ var q;
1379
+ i === null ? q = "null" : nt(i) ? q = "array" : i !== void 0 && i.$$typeof === n ? (q = "<" + ($(i.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : q = typeof i, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, R);
1381
1380
  }
1382
- var Z = ue(i, h, g, k, F);
1383
- if (Z == null)
1384
- return Z;
1385
- if (P) {
1386
- var ge = h.children;
1387
- if (ge !== void 0)
1388
- if (w)
1389
- if (nt(ge)) {
1390
- for (var Ye = 0; Ye < ge.length; Ye++)
1391
- zt(ge[Ye], i);
1392
- Object.freeze && Object.freeze(ge);
1381
+ var Q = de(i, h, g, A, B);
1382
+ if (Q == null)
1383
+ return Q;
1384
+ if (_) {
1385
+ var ve = h.children;
1386
+ if (ve !== void 0)
1387
+ if (S)
1388
+ if (nt(ve)) {
1389
+ for (var Ye = 0; Ye < ve.length; Ye++)
1390
+ Ht(ve[Ye], i);
1391
+ Object.freeze && Object.freeze(ve);
1393
1392
  } else
1394
- S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1393
+ C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1395
1394
  else
1396
- zt(ge, i);
1395
+ Ht(ve, i);
1397
1396
  }
1398
- return i === e ? Tn(Z) : On(Z), Z;
1397
+ return i === e ? Tn(Q) : On(Q), Q;
1399
1398
  }
1400
1399
  }
1401
1400
  function Mn(i, h, g) {
1402
- return Ht(i, h, g, !0);
1401
+ return Vt(i, h, g, !0);
1403
1402
  }
1404
1403
  function Rn(i, h, g) {
1405
- return Ht(i, h, g, !1);
1404
+ return Vt(i, h, g, !1);
1406
1405
  }
1407
1406
  var Pn = Rn, _n = Mn;
1408
1407
  ot.Fragment = e, ot.jsx = Pn, ot.jsxs = _n;
1409
1408
  }()), ot;
1410
1409
  }
1411
- process.env.NODE_ENV === "production" ? Bt.exports = Ea() : Bt.exports = wa();
1412
- var c = Bt.exports;
1410
+ process.env.NODE_ENV === "production" ? $t.exports = Ea() : $t.exports = wa();
1411
+ var l = $t.exports;
1413
1412
  function wn(t) {
1414
- return t.title.search("<") > -1 ? /* @__PURE__ */ c.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ c.jsx("button", { children: t.title });
1413
+ return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1415
1414
  }
1416
- const xa = /* @__PURE__ */ c.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1417
- /* @__PURE__ */ c.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1418
- /* @__PURE__ */ c.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1419
- /* @__PURE__ */ c.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1420
- ] }), Ca = /* @__PURE__ */ c.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ c.jsx(
1415
+ const xa = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1416
+ /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1417
+ /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1418
+ /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1419
+ ] }), Ca = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1421
1420
  "path",
1422
1421
  {
1423
1422
  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
@@ -1426,45 +1425,45 @@ C11,8.22,10.74,8,10.43,8z`
1426
1425
  }
1427
1426
  ) });
1428
1427
  function Sa(t) {
1429
- return /* @__PURE__ */ c.jsx(mn.Item, { value: t.title, children: /* @__PURE__ */ c.jsxs("div", { children: [
1428
+ return /* @__PURE__ */ l.jsx(mn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1430
1429
  Ca,
1431
- /* @__PURE__ */ c.jsx("span", { children: t.title }),
1432
- /* @__PURE__ */ c.jsx("button", { className: "closeIcon", onClick: () => {
1430
+ /* @__PURE__ */ l.jsx("span", { children: t.title }),
1431
+ /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1433
1432
  t.onDelete(t.index);
1434
1433
  }, children: xa })
1435
1434
  ] }) }, t.title);
1436
1435
  }
1437
1436
  function Oa(t) {
1438
- const [n, a] = oe(!1), [e, r] = oe(t.options), s = (p) => {
1437
+ const [n, a] = ce(!1), [e, r] = ce(t.options), s = (p) => {
1439
1438
  t.onDragComplete(p), r(p);
1440
1439
  }, d = (p) => {
1441
- const v = [...e];
1442
- v.splice(p, 1), s(v);
1443
- }, l = [];
1444
- e.forEach((p, v) => {
1445
- l.push(/* @__PURE__ */ c.jsx(Sa, { index: v, title: p, onDelete: d }, p));
1440
+ const b = [...e];
1441
+ b.splice(p, 1), s(b);
1442
+ }, c = [];
1443
+ e.forEach((p, b) => {
1444
+ c.push(/* @__PURE__ */ l.jsx(Sa, { index: b, title: p, onDelete: d }, p));
1446
1445
  });
1447
1446
  let u = "dropdown draggable";
1448
- return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ c.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1449
- /* @__PURE__ */ c.jsx(wn, { title: t.title }),
1450
- /* @__PURE__ */ c.jsx(mn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: l })
1447
+ return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1448
+ /* @__PURE__ */ l.jsx(wn, { title: t.title }),
1449
+ /* @__PURE__ */ l.jsx(mn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: c })
1451
1450
  ] });
1452
1451
  }
1453
1452
  function Ta(t) {
1454
- const [n, a] = oe(!1), e = [];
1453
+ const [n, a] = ce(!1), e = [];
1455
1454
  t.options.map((s, d) => {
1456
- t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ c.jsx(Ma, { option: s }, d));
1455
+ t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ma, { option: s }, d));
1457
1456
  });
1458
1457
  let r = "dropdown";
1459
- return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ c.jsxs(
1458
+ return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ l.jsxs(
1460
1459
  "div",
1461
1460
  {
1462
1461
  className: r,
1463
1462
  onMouseEnter: () => a(!0),
1464
1463
  onMouseLeave: () => a(!1),
1465
1464
  children: [
1466
- /* @__PURE__ */ c.jsx(wn, { title: t.title }),
1467
- /* @__PURE__ */ c.jsx(
1465
+ /* @__PURE__ */ l.jsx(wn, { title: t.title }),
1466
+ /* @__PURE__ */ l.jsx(
1468
1467
  "ul",
1469
1468
  {
1470
1469
  style: { visibility: n ? "visible" : "hidden" },
@@ -1476,11 +1475,11 @@ function Ta(t) {
1476
1475
  );
1477
1476
  }
1478
1477
  function Ma(t) {
1479
- const { option: n } = t, [a, e] = oe("");
1478
+ const { option: n } = t, [a, e] = ce("");
1480
1479
  let r;
1481
1480
  switch (n.type) {
1482
1481
  case "draggable":
1483
- r = /* @__PURE__ */ c.jsx(
1482
+ r = /* @__PURE__ */ l.jsx(
1484
1483
  Oa,
1485
1484
  {
1486
1485
  title: n.title,
@@ -1493,7 +1492,7 @@ function Ma(t) {
1493
1492
  );
1494
1493
  break;
1495
1494
  case "dropdown":
1496
- r = /* @__PURE__ */ c.jsx(
1495
+ r = /* @__PURE__ */ l.jsx(
1497
1496
  Ta,
1498
1497
  {
1499
1498
  title: n.title,
@@ -1504,7 +1503,7 @@ function Ma(t) {
1504
1503
  );
1505
1504
  break;
1506
1505
  case "option":
1507
- r = /* @__PURE__ */ c.jsx(
1506
+ r = /* @__PURE__ */ l.jsx(
1508
1507
  "button",
1509
1508
  {
1510
1509
  onClick: () => {
@@ -1515,24 +1514,24 @@ function Ma(t) {
1515
1514
  );
1516
1515
  break;
1517
1516
  }
1518
- return /* @__PURE__ */ c.jsx("li", { className: a === n.title ? "selected" : "", children: r }, aa());
1517
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: r }, aa());
1519
1518
  }
1520
1519
  function pi(t) {
1521
1520
  const n = [], a = [];
1522
1521
  t.components.forEach((s) => {
1523
- s instanceof ca ? n.push(la) : s instanceof Ue ? (n.push(ua), a.push(fa), da(t)) : s instanceof ga ? (n.push(va), a.push(ba)) : s instanceof En && n.push(ya);
1522
+ s instanceof ca ? n.push(la) : s instanceof Ue ? (n.push(ua), a.push(fa), da(t)) : s instanceof va ? (n.push(ga), a.push(ba)) : s instanceof En && n.push(ya);
1524
1523
  });
1525
1524
  function e(s) {
1526
1525
  switch (n.forEach((d) => d(t, s)), s.event) {
1527
1526
  case "custom":
1528
- _.dispatchEvent({ type: j.CUSTOM, value: s.data });
1527
+ j.dispatchEvent({ type: k.CUSTOM, value: s.data });
1529
1528
  break;
1530
1529
  }
1531
1530
  }
1532
1531
  function r(s) {
1533
1532
  switch (a.forEach((d) => d(t, s)), s.event) {
1534
1533
  case "custom":
1535
- _.dispatchEvent({ type: j.CUSTOM, value: s.data });
1534
+ j.dispatchEvent({ type: k.CUSTOM, value: s.data });
1536
1535
  break;
1537
1536
  }
1538
1537
  }
@@ -1634,7 +1633,7 @@ class _a extends un {
1634
1633
  value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
1635
1634
  },
1636
1635
  uColor: {
1637
- value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new $t(16777215)
1636
+ value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Tt(16777215)
1638
1637
  },
1639
1638
  uDistance: {
1640
1639
  value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
@@ -1657,7 +1656,7 @@ class ja extends Nn {
1657
1656
  constructor() {
1658
1657
  const a = new _a();
1659
1658
  super(new Fn(2, 2), a);
1660
- L(this, "gridMaterial");
1659
+ F(this, "gridMaterial");
1661
1660
  this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1662
1661
  }
1663
1662
  update() {
@@ -1714,10 +1713,10 @@ class Da extends un {
1714
1713
  });
1715
1714
  }
1716
1715
  }
1717
- function Gt(t) {
1718
- const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1719
- return /* @__PURE__ */ c.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1720
- /* @__PURE__ */ c.jsxs(
1716
+ function zt(t) {
1717
+ const [n, a] = ce(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1718
+ return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1719
+ /* @__PURE__ */ l.jsxs(
1721
1720
  "button",
1722
1721
  {
1723
1722
  className: "toggle",
@@ -1726,28 +1725,28 @@ function Gt(t) {
1726
1725
  t.onToggle !== void 0 && t.onToggle(r), a(r);
1727
1726
  },
1728
1727
  children: [
1729
- /* @__PURE__ */ c.jsx(
1728
+ /* @__PURE__ */ l.jsx(
1730
1729
  "p",
1731
1730
  {
1732
1731
  className: `status ${n ? "open" : ""}`,
1733
1732
  children: "Toggle"
1734
1733
  }
1735
1734
  ),
1736
- /* @__PURE__ */ c.jsx("p", { className: "label", children: t.label })
1735
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: t.label })
1737
1736
  ]
1738
1737
  }
1739
1738
  ),
1740
1739
  t.button,
1741
- /* @__PURE__ */ c.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ c.jsx("div", { children: t.children }) })
1740
+ /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1742
1741
  ] });
1743
1742
  }
1744
1743
  function xn(t) {
1745
- const [n, a] = oe(!1), e = t.child.children.length > 0, r = [];
1744
+ const [n, a] = ce(!1), e = t.child.children.length > 0, r = [];
1746
1745
  return t.child.children.length > 0 && t.child.children.map((s) => {
1747
- r.push(/* @__PURE__ */ c.jsx(xn, { child: s, three: t.three }, Math.random()));
1748
- }), /* @__PURE__ */ c.jsxs("div", { className: "childObject", children: [
1749
- /* @__PURE__ */ c.jsxs("div", { className: "child", children: [
1750
- e ? /* @__PURE__ */ c.jsx(
1746
+ r.push(/* @__PURE__ */ l.jsx(xn, { child: s, three: t.three }, Math.random()));
1747
+ }), /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1748
+ /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1749
+ e ? /* @__PURE__ */ l.jsx(
1751
1750
  "button",
1752
1751
  {
1753
1752
  className: "status",
@@ -1759,7 +1758,7 @@ function xn(t) {
1759
1758
  }
1760
1759
  }
1761
1760
  ) : null,
1762
- /* @__PURE__ */ c.jsx(
1761
+ /* @__PURE__ */ l.jsx(
1763
1762
  "button",
1764
1763
  {
1765
1764
  className: "name",
@@ -1772,16 +1771,16 @@ function xn(t) {
1772
1771
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1773
1772
  }
1774
1773
  ),
1775
- /* @__PURE__ */ c.jsx("div", { className: `icon ${ha(t.child)}` })
1774
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${ha(t.child)}` })
1776
1775
  ] }),
1777
- /* @__PURE__ */ c.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ c.jsx("div", { className: "container", children: r }) })
1776
+ /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: r }) })
1778
1777
  ] }, Math.random());
1779
1778
  }
1780
1779
  function Ia(t) {
1781
1780
  const n = [];
1782
1781
  return t.child.children.map((a) => {
1783
- n.push(/* @__PURE__ */ c.jsx(xn, { child: a, three: t.three }, Math.random()));
1784
- }), /* @__PURE__ */ c.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1782
+ n.push(/* @__PURE__ */ l.jsx(xn, { child: a, three: t.three }, Math.random()));
1783
+ }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1785
1784
  }
1786
1785
  const La = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1787
1786
  function Na(t) {
@@ -1791,9 +1790,9 @@ function Be(t) {
1791
1790
  const n = [];
1792
1791
  return t.items.forEach((a) => {
1793
1792
  Na(a) ? n.push(
1794
- /* @__PURE__ */ c.jsx(Be, { title: a.title, items: a.items }, Math.random())
1793
+ /* @__PURE__ */ l.jsx(Be, { title: a.title, items: a.items }, Math.random())
1795
1794
  ) : n.push(
1796
- /* @__PURE__ */ c.jsx(
1795
+ /* @__PURE__ */ l.jsx(
1797
1796
  st,
1798
1797
  {
1799
1798
  title: a.title,
@@ -1811,7 +1810,7 @@ function Be(t) {
1811
1810
  Math.random()
1812
1811
  )
1813
1812
  );
1814
- }), /* @__PURE__ */ c.jsx(Gt, { label: t.title, open: t.expanded === !0, children: n });
1813
+ }), /* @__PURE__ */ l.jsx(zt, { label: t.title, open: t.expanded === !0, children: n });
1815
1814
  }
1816
1815
  function Fa(t) {
1817
1816
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
@@ -1994,7 +1993,7 @@ function Jt(t, n, a) {
1994
1993
  continue;
1995
1994
  const s = typeof t[r], d = t[r];
1996
1995
  if (s === "boolean" || s === "number" || s === "string") {
1997
- const l = {
1996
+ const c = {
1998
1997
  title: De(r),
1999
1998
  prop: r,
2000
1999
  type: s,
@@ -2002,13 +2001,13 @@ function Jt(t, n, a) {
2002
2001
  min: void 0,
2003
2002
  max: void 0,
2004
2003
  onChange: (u, p) => {
2005
- var E;
2004
+ var v;
2006
2005
  a.updateObject(n.uuid, `material.${u}`, p), s === "boolean" && a.updateObject(n.uuid, "material.needsUpdate", !0);
2007
- const v = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
2008
- v !== void 0 && Q(v, `material.${u}`, p);
2006
+ const b = (v = a.scene) == null ? void 0 : v.getObjectByProperty("uuid", n.uuid);
2007
+ b !== void 0 && Z(b, `material.${u}`, p);
2009
2008
  }
2010
2009
  };
2011
- Ua(r) && (l.value = Number(d), l.type = "range", l.min = 0, l.max = 1, l.step = 0.01), e.push(l);
2010
+ Ua(r) && (c.value = Number(d), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01), e.push(c);
2012
2011
  } else if (s === "object")
2013
2012
  if (d.isColor)
2014
2013
  e.push({
@@ -2016,34 +2015,34 @@ function Jt(t, n, a) {
2016
2015
  prop: r,
2017
2016
  type: "color",
2018
2017
  value: d,
2019
- onChange: (l, u) => {
2020
- var E;
2021
- const p = new $t(u);
2022
- a.updateObject(n.uuid, `material.${l}`, p);
2023
- const v = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
2024
- v !== void 0 && Q(v, `material.${l}`, p);
2018
+ onChange: (c, u) => {
2019
+ var v;
2020
+ const p = new Tt(u);
2021
+ a.updateObject(n.uuid, `material.${c}`, p);
2022
+ const b = (v = a.scene) == null ? void 0 : v.getObjectByProperty("uuid", n.uuid);
2023
+ b !== void 0 && Z(b, `material.${c}`, p);
2025
2024
  }
2026
2025
  });
2027
2026
  else if (Array.isArray(d)) {
2028
- const l = [];
2027
+ const c = [];
2029
2028
  for (const u in d)
2030
- l.push({
2029
+ c.push({
2031
2030
  title: `${u}`,
2032
2031
  type: `${typeof d[u]}`,
2033
2032
  value: d[u],
2034
- onChange: (p, v) => {
2035
- var x;
2036
- a.updateObject(n.uuid, `material.${r}`, v);
2037
- const E = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
2038
- E !== void 0 && Q(E, `material.${r}`, v);
2033
+ onChange: (p, b) => {
2034
+ var w;
2035
+ a.updateObject(n.uuid, `material.${r}`, b);
2036
+ const v = (w = a.scene) == null ? void 0 : w.getObjectByProperty("uuid", n.uuid);
2037
+ v !== void 0 && Z(v, `material.${r}`, b);
2039
2038
  }
2040
2039
  });
2041
2040
  e.push({
2042
2041
  title: De(r),
2043
- items: l
2042
+ items: c
2044
2043
  });
2045
2044
  } else {
2046
- const l = [];
2045
+ const c = [];
2047
2046
  for (const u in d) {
2048
2047
  const p = d[u];
2049
2048
  switch (typeof p) {
@@ -2054,57 +2053,144 @@ function Jt(t, n, a) {
2054
2053
  title: De(r),
2055
2054
  type: "image",
2056
2055
  value: p,
2057
- onChange: (E, x) => {
2058
- var M;
2059
- a.createTexture(n.uuid, `material.${r}`, x);
2060
- const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
2061
- C !== void 0 && Ut(x).then((V) => {
2062
- Q(C, `material.${r}`, V), Q(C, "material.needsUpdate", !0);
2056
+ onChange: (v, w) => {
2057
+ var O;
2058
+ a.createTexture(n.uuid, `material.${r}`, w);
2059
+ const x = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
2060
+ x !== void 0 && Bt(w).then((M) => {
2061
+ Z(x, `material.${r}`, M), Z(x, "material.needsUpdate", !0);
2063
2062
  });
2064
2063
  }
2065
- }) : l.push({
2064
+ }) : c.push({
2066
2065
  title: `${De(u)}`,
2067
2066
  prop: `material.${r}.${u}`,
2068
2067
  type: `${typeof t[r][u]}`,
2069
2068
  value: d[u],
2070
- onChange: (E, x) => {
2071
- var M;
2072
- a.updateObject(n.uuid, `material.${r}.${u}`, x);
2073
- const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
2074
- C !== void 0 && Q(C, `material.${r}.${u}`, x);
2069
+ onChange: (v, w) => {
2070
+ var O;
2071
+ a.updateObject(n.uuid, `material.${r}.${u}`, w);
2072
+ const x = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
2073
+ x !== void 0 && Z(x, `material.${r}.${u}`, w);
2075
2074
  }
2076
2075
  });
2077
2076
  break;
2078
2077
  case "object":
2079
- p.value !== void 0 && p.value.src !== void 0 ? l.push({
2080
- title: De(u),
2081
- type: "image",
2082
- value: p.value.src,
2083
- onChange: (E, x) => {
2084
- var M;
2085
- a.createTexture(n.uuid, `material.${r}.${u}.value`, x);
2086
- const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
2087
- C !== void 0 && Ut(x).then((V) => {
2088
- Q(C, `material.${r}.${u}.value`, V);
2078
+ if (p.value !== void 0 && p.value.src !== void 0)
2079
+ c.push({
2080
+ title: De(u),
2081
+ type: "image",
2082
+ value: p.value.src,
2083
+ onChange: (v, w) => {
2084
+ var O;
2085
+ a.createTexture(n.uuid, `material.${r}.${u}.value`, d);
2086
+ const x = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
2087
+ x !== void 0 && Bt(w).then((M) => {
2088
+ Z(x, `material.${r}.${u}.value`, M);
2089
+ });
2090
+ }
2091
+ });
2092
+ else if (r === "uniforms") {
2093
+ const v = p.value, w = (x, O, M) => ({
2094
+ title: x,
2095
+ type: "number",
2096
+ value: M,
2097
+ onChange: (K, I) => {
2098
+ var ie;
2099
+ const C = `material.uniforms.${u}.value.${O}`;
2100
+ a.updateObject(n.uuid, C, I);
2101
+ const V = (ie = a.scene) == null ? void 0 : ie.getObjectByProperty("uuid", n.uuid);
2102
+ V !== void 0 && Z(V, C, I);
2103
+ }
2104
+ });
2105
+ if (typeof p.value == "number")
2106
+ c.push({
2107
+ title: u,
2108
+ type: "number",
2109
+ value: p.value,
2110
+ onChange: (x, O) => {
2111
+ var I;
2112
+ const M = `material.${r}.${x}.value`;
2113
+ a.updateObject(n.uuid, M, O);
2114
+ const K = (I = a.scene) == null ? void 0 : I.getObjectByProperty("uuid", n.uuid);
2115
+ K !== void 0 && Z(K, M, O);
2116
+ }
2089
2117
  });
2090
- }
2091
- }) : l.push({
2092
- title: u,
2093
- type: `${typeof p.value}`,
2094
- value: p.value,
2095
- onChange: (E, x) => {
2096
- var M;
2097
- a.updateObject(n.uuid, `material.${r}.${u}.value`, x);
2098
- const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
2099
- C !== void 0 && Q(C, `material.${r}.${u}.value`, x);
2100
- }
2101
- });
2118
+ else if (v.r !== void 0 && v.g !== void 0 && v.b !== void 0)
2119
+ c.push({
2120
+ title: u,
2121
+ type: "color",
2122
+ value: p.value,
2123
+ onChange: (x, O) => {
2124
+ var C;
2125
+ const M = new Tt(O), K = `material.${r}.${x}.value`;
2126
+ a.updateObject(n.uuid, K, M);
2127
+ const I = (C = a.scene) == null ? void 0 : C.getObjectByProperty("uuid", n.uuid);
2128
+ I !== void 0 && Z(I, K, M);
2129
+ }
2130
+ });
2131
+ else if (v.x !== void 0 && v.y !== void 0 && v.z === void 0 && v.w === void 0)
2132
+ c.push(
2133
+ {
2134
+ title: u,
2135
+ items: [
2136
+ w("X", "x", p.value.x),
2137
+ w("Y", "y", p.value.y)
2138
+ ]
2139
+ }
2140
+ );
2141
+ else if (v.x !== void 0 && v.y !== void 0 && v.z !== void 0 && v.w === void 0)
2142
+ c.push(
2143
+ {
2144
+ title: u,
2145
+ items: [
2146
+ w("X", "x", p.value.x),
2147
+ w("Y", "y", p.value.y),
2148
+ w("Z", "z", p.value.z)
2149
+ ]
2150
+ }
2151
+ );
2152
+ else if (v.x !== void 0 && v.y !== void 0 && v.z !== void 0 && v.w !== void 0)
2153
+ c.push(
2154
+ {
2155
+ title: u,
2156
+ items: [
2157
+ w("X", "x", p.value.x),
2158
+ w("Y", "y", p.value.y),
2159
+ w("Z", "z", p.value.z),
2160
+ w("W", "w", p.value.w)
2161
+ ]
2162
+ }
2163
+ );
2164
+ else if (v.elements !== void 0) {
2165
+ const x = v.elements, O = [];
2166
+ for (let M = 0; M < x.length; M++)
2167
+ O.push(w(M.toString(), M.toString(), x[M]));
2168
+ c.push(
2169
+ {
2170
+ title: u,
2171
+ items: O
2172
+ }
2173
+ );
2174
+ } else
2175
+ console.log(">>> need to add this format:", u, v);
2176
+ } else
2177
+ c.push({
2178
+ title: u,
2179
+ type: `${typeof p.value}`,
2180
+ value: p.value,
2181
+ onChange: (v, w) => {
2182
+ var O;
2183
+ a.updateObject(n.uuid, `material.${r}.${u}.value`, w);
2184
+ const x = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
2185
+ x !== void 0 && Z(x, `material.${r}.${u}.value`, w);
2186
+ }
2187
+ });
2102
2188
  break;
2103
2189
  }
2104
2190
  }
2105
- l.length > 0 && e.push({
2191
+ c.length > 0 && e.push({
2106
2192
  title: De(r),
2107
- items: l
2193
+ items: c
2108
2194
  });
2109
2195
  }
2110
2196
  else
@@ -2124,7 +2210,7 @@ function $a(t, n) {
2124
2210
  const e = [], r = a.length;
2125
2211
  for (let s = 0; s < r; s++)
2126
2212
  e.push(
2127
- /* @__PURE__ */ c.jsx(
2213
+ /* @__PURE__ */ l.jsx(
2128
2214
  Be,
2129
2215
  {
2130
2216
  title: `Material ${s}`,
@@ -2133,9 +2219,9 @@ function $a(t, n) {
2133
2219
  `Material ${s}`
2134
2220
  )
2135
2221
  );
2136
- return /* @__PURE__ */ c.jsx(c.Fragment, { children: e });
2222
+ return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2137
2223
  } else
2138
- return /* @__PURE__ */ c.jsx(
2224
+ return /* @__PURE__ */ l.jsx(
2139
2225
  Be,
2140
2226
  {
2141
2227
  title: "Material",
@@ -2146,35 +2232,35 @@ function $a(t, n) {
2146
2232
  function st(t) {
2147
2233
  let n = t.value;
2148
2234
  n !== void 0 && n.isColor !== void 0 && (n = ra(t.value));
2149
- const [a, e] = oe(n), r = Ce(null), s = Ce(null), d = Ce(null);
2235
+ const [a, e] = ce(n), r = Ce(null), s = Ce(null), d = Ce(null);
2150
2236
  Fe(() => {
2151
- var X;
2152
- let v = !1, E = -1, x = 0, C = Number(a);
2153
- const M = (fe) => {
2154
- v = !0, x = C, E = fe.clientX;
2155
- }, V = (fe) => {
2156
- if (!v)
2237
+ var V;
2238
+ let b = !1, v = -1, w = 0, x = Number(a);
2239
+ const O = (ie) => {
2240
+ b = !0, w = x, v = ie.clientX;
2241
+ }, M = (ie) => {
2242
+ if (!b)
2157
2243
  return;
2158
- const le = t.step !== void 0 ? t.step : 1, ee = (fe.clientX - E) * le;
2159
- C = Number((x + ee).toFixed(4)), s.current !== null && (s.current.value = C.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, C);
2160
- }, se = () => {
2161
- v = !1;
2244
+ const ue = t.step !== void 0 ? t.step : 1, te = (ie.clientX - v) * ue;
2245
+ x = Number((w + te).toFixed(4)), s.current !== null && (s.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
2162
2246
  }, K = () => {
2163
- v = !1;
2164
- }, S = t.type === "number";
2165
- return S && ((X = r.current) == null || X.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", se, !1), document.addEventListener("mousemove", V, !1), document.addEventListener("contextmenu", K, !1)), () => {
2166
- var fe;
2167
- S && ((fe = r.current) == null || fe.removeEventListener("mousedown", M), document.removeEventListener("mouseup", se), document.removeEventListener("mousemove", V), document.removeEventListener("contextmenu", K));
2247
+ b = !1;
2248
+ }, I = () => {
2249
+ b = !1;
2250
+ }, C = t.type === "number";
2251
+ return C && ((V = r.current) == null || V.addEventListener("mousedown", O, !1), document.addEventListener("mouseup", K, !1), document.addEventListener("mousemove", M, !1), document.addEventListener("contextmenu", I, !1)), () => {
2252
+ var ie;
2253
+ C && ((ie = r.current) == null || ie.removeEventListener("mousedown", O), document.removeEventListener("mouseup", K), document.removeEventListener("mousemove", M), document.removeEventListener("contextmenu", I));
2168
2254
  };
2169
2255
  }, [a]);
2170
- const l = t.type === "string" && (a.length > 100 || a.search(`
2171
- `) > -1), u = l || t.type === "image", p = (v) => {
2172
- let E = v.target.value;
2173
- t.type === "boolean" && (E = v.target.checked), e(E), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, E);
2256
+ const c = t.type === "string" && (a.length > 100 || a.search(`
2257
+ `) > -1), u = c || t.type === "image", p = (b) => {
2258
+ let v = b.target.value;
2259
+ t.type === "boolean" && (v = b.target.checked), e(v), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2174
2260
  };
2175
- return /* @__PURE__ */ c.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2176
- t.type !== "button" && /* @__PURE__ */ c.jsx("label", { ref: r, children: t.title }, "fieldLabel"),
2177
- t.type === "string" && !l && /* @__PURE__ */ c.jsx(
2261
+ return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2262
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: r, children: t.title }, "fieldLabel"),
2263
+ t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2178
2264
  "input",
2179
2265
  {
2180
2266
  type: "text",
@@ -2183,7 +2269,7 @@ function st(t) {
2183
2269
  value: a
2184
2270
  }
2185
2271
  ),
2186
- t.type === "string" && l && /* @__PURE__ */ c.jsx(
2272
+ t.type === "string" && c && /* @__PURE__ */ l.jsx(
2187
2273
  "textarea",
2188
2274
  {
2189
2275
  cols: 50,
@@ -2193,7 +2279,7 @@ function st(t) {
2193
2279
  value: a
2194
2280
  }
2195
2281
  ),
2196
- t.type === "boolean" && /* @__PURE__ */ c.jsx(
2282
+ t.type === "boolean" && /* @__PURE__ */ l.jsx(
2197
2283
  "input",
2198
2284
  {
2199
2285
  type: "checkbox",
@@ -2202,7 +2288,7 @@ function st(t) {
2202
2288
  checked: a
2203
2289
  }
2204
2290
  ),
2205
- t.type === "number" && /* @__PURE__ */ c.jsx(
2291
+ t.type === "number" && /* @__PURE__ */ l.jsx(
2206
2292
  "input",
2207
2293
  {
2208
2294
  ref: s,
@@ -2214,9 +2300,9 @@ function st(t) {
2214
2300
  onChange: p
2215
2301
  }
2216
2302
  ),
2217
- t.type === "range" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2218
- /* @__PURE__ */ c.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "min" }),
2219
- /* @__PURE__ */ c.jsx(
2303
+ t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2304
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "min" }),
2305
+ /* @__PURE__ */ l.jsx(
2220
2306
  "input",
2221
2307
  {
2222
2308
  disabled: t.disabled,
@@ -2229,11 +2315,11 @@ function st(t) {
2229
2315
  }
2230
2316
  )
2231
2317
  ] }),
2232
- t.type === "color" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2233
- /* @__PURE__ */ c.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "color" }),
2234
- /* @__PURE__ */ c.jsx("input", { type: "color", value: a, onChange: p })
2318
+ t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2319
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "color" }),
2320
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: p })
2235
2321
  ] }),
2236
- t.type === "button" && /* @__PURE__ */ c.jsx(
2322
+ t.type === "button" && /* @__PURE__ */ l.jsx(
2237
2323
  "button",
2238
2324
  {
2239
2325
  onClick: () => {
@@ -2242,9 +2328,9 @@ function st(t) {
2242
2328
  children: t.title
2243
2329
  }
2244
2330
  ),
2245
- t.type === "image" && /* @__PURE__ */ c.jsx("img", { ref: d, onClick: () => {
2246
- Ba().then((v) => {
2247
- d.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2331
+ t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: d, onClick: () => {
2332
+ Ba().then((b) => {
2333
+ d.current.src = b, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2248
2334
  });
2249
2335
  }, src: a.length > 0 ? a : La })
2250
2336
  ] });
@@ -2278,7 +2364,7 @@ function Qt(t) {
2278
2364
  }
2279
2365
  return t;
2280
2366
  }
2281
- function Ga(t, n) {
2367
+ function za(t, n) {
2282
2368
  const a = [];
2283
2369
  if (t.perspectiveCameraInfo !== void 0)
2284
2370
  for (const e in t.perspectiveCameraInfo)
@@ -2289,10 +2375,10 @@ function Ga(t, n) {
2289
2375
  step: 0.01,
2290
2376
  value: t.perspectiveCameraInfo[e],
2291
2377
  onChange: (r, s) => {
2292
- var l;
2378
+ var c;
2293
2379
  n.updateObject(t.uuid, r, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2294
- const d = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2295
- d !== void 0 && (Q(d, r, s), d.updateProjectionMatrix());
2380
+ const d = (c = n.scene) == null ? void 0 : c.getObjectByProperty("uuid", t.uuid);
2381
+ d !== void 0 && (Z(d, r, s), d.updateProjectionMatrix());
2296
2382
  }
2297
2383
  });
2298
2384
  else if (t.orthographicCameraInfo !== void 0)
@@ -2304,13 +2390,13 @@ function Ga(t, n) {
2304
2390
  step: 0.01,
2305
2391
  value: t.perspectiveCameraInfo[e],
2306
2392
  onChange: (r, s) => {
2307
- var l;
2393
+ var c;
2308
2394
  n.updateObject(t.uuid, r, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2309
- const d = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2310
- d !== void 0 && (Q(d, r, s), d.updateProjectionMatrix());
2395
+ const d = (c = n.scene) == null ? void 0 : c.getObjectByProperty("uuid", t.uuid);
2396
+ d !== void 0 && (Z(d, r, s), d.updateProjectionMatrix());
2311
2397
  }
2312
2398
  });
2313
- return /* @__PURE__ */ c.jsx(
2399
+ return /* @__PURE__ */ l.jsx(
2314
2400
  Be,
2315
2401
  {
2316
2402
  title: "Camera",
@@ -2318,30 +2404,30 @@ function Ga(t, n) {
2318
2404
  }
2319
2405
  );
2320
2406
  }
2321
- const Va = Math.PI / 180, za = 180 / Math.PI;
2407
+ const Ga = Math.PI / 180, Ha = 180 / Math.PI;
2322
2408
  function qe(t, n, a, e, r) {
2323
2409
  return e + (t - n) * (r - e) / (a - n);
2324
2410
  }
2325
- function Ha(t) {
2326
- return t * Va;
2411
+ function Va(t) {
2412
+ return t * Ga;
2327
2413
  }
2328
- function It(t) {
2329
- return t * za;
2414
+ function Lt(t) {
2415
+ return t * Ha;
2330
2416
  }
2331
2417
  function Ya(t, n) {
2332
2418
  const a = new Un();
2333
2419
  a.elements = t.matrix;
2334
- const e = new Y(), r = new Bn(), s = new Y();
2420
+ const e = new X(), r = new Bn(), s = new X();
2335
2421
  t.uuid.length > 0 && (e.setFromMatrixPosition(a), r.setFromRotationMatrix(a), s.setFromMatrixScale(a));
2336
2422
  const d = (u, p) => {
2337
- var E;
2423
+ var v;
2338
2424
  n.updateObject(t.uuid, u, p);
2339
- const v = (E = n.scene) == null ? void 0 : E.getObjectByProperty("uuid", t.uuid);
2340
- v !== void 0 && Q(v, u, p);
2341
- }, l = (u, p) => {
2342
- d(u, Ha(p));
2425
+ const b = (v = n.scene) == null ? void 0 : v.getObjectByProperty("uuid", t.uuid);
2426
+ b !== void 0 && Z(b, u, p);
2427
+ }, c = (u, p) => {
2428
+ d(u, Va(p));
2343
2429
  };
2344
- return /* @__PURE__ */ c.jsx(
2430
+ return /* @__PURE__ */ l.jsx(
2345
2431
  Be,
2346
2432
  {
2347
2433
  title: "Transform",
@@ -2371,31 +2457,31 @@ function Ya(t, n) {
2371
2457
  title: "Rotation X",
2372
2458
  prop: "rotation.x",
2373
2459
  type: "number",
2374
- value: At(It(r.x)),
2460
+ value: Dt(Lt(r.x)),
2375
2461
  min: -360,
2376
2462
  max: 360,
2377
2463
  step: 0.1,
2378
- onChange: l
2464
+ onChange: c
2379
2465
  },
2380
2466
  {
2381
2467
  title: "Rotation Y",
2382
2468
  prop: "rotation.y",
2383
2469
  type: "number",
2384
- value: At(It(r.y)),
2470
+ value: Dt(Lt(r.y)),
2385
2471
  min: -360,
2386
2472
  max: 360,
2387
2473
  step: 0.1,
2388
- onChange: l
2474
+ onChange: c
2389
2475
  },
2390
2476
  {
2391
2477
  title: "Rotation Z",
2392
2478
  prop: "rotation.z",
2393
2479
  type: "number",
2394
- value: At(It(r.z)),
2480
+ value: Dt(Lt(r.z)),
2395
2481
  min: -360,
2396
2482
  max: 360,
2397
2483
  step: 0.1,
2398
- onChange: l
2484
+ onChange: c
2399
2485
  },
2400
2486
  {
2401
2487
  title: "Scale X",
@@ -2456,10 +2542,10 @@ function Wa(t, n) {
2456
2542
  value: r,
2457
2543
  onChange: (s, d) => {
2458
2544
  var p;
2459
- const l = new $t(d);
2460
- n.updateObject(t.uuid, s, l);
2545
+ const c = new Tt(d);
2546
+ n.updateObject(t.uuid, s, c);
2461
2547
  const u = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
2462
- u !== void 0 && Q(u, s, l);
2548
+ u !== void 0 && Z(u, s, c);
2463
2549
  }
2464
2550
  }) : a.push({
2465
2551
  title: en(e),
@@ -2470,12 +2556,12 @@ function Wa(t, n) {
2470
2556
  onChange: (s, d) => {
2471
2557
  var u;
2472
2558
  n.updateObject(t.uuid, s, d);
2473
- const l = (u = n.scene) == null ? void 0 : u.getObjectByProperty("uuid", t.uuid);
2474
- l !== void 0 && Q(l, s, d);
2559
+ const c = (u = n.scene) == null ? void 0 : u.getObjectByProperty("uuid", t.uuid);
2560
+ c !== void 0 && Z(c, s, d);
2475
2561
  }
2476
2562
  }));
2477
2563
  }
2478
- return /* @__PURE__ */ c.jsx(
2564
+ return /* @__PURE__ */ l.jsx(
2479
2565
  Be,
2480
2566
  {
2481
2567
  title: "Light",
@@ -2493,10 +2579,10 @@ function Ka(t, n) {
2493
2579
  value: e.name,
2494
2580
  disabled: !0,
2495
2581
  onChange: (r, s) => {
2496
- var l;
2582
+ var c;
2497
2583
  n.updateObject(t.uuid, r, s);
2498
- const d = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2499
- d !== void 0 && Q(d, r, s);
2584
+ const d = (c = n.scene) == null ? void 0 : c.getObjectByProperty("uuid", t.uuid);
2585
+ d !== void 0 && Z(d, r, s);
2500
2586
  }
2501
2587
  }), a.push({
2502
2588
  title: "Duration",
@@ -2505,10 +2591,10 @@ function Ka(t, n) {
2505
2591
  value: e.duration,
2506
2592
  disabled: !0,
2507
2593
  onChange: (r, s) => {
2508
- var l;
2594
+ var c;
2509
2595
  n.updateObject(t.uuid, r, s);
2510
- const d = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2511
- d !== void 0 && Q(d, r, s);
2596
+ const d = (c = n.scene) == null ? void 0 : c.getObjectByProperty("uuid", t.uuid);
2597
+ d !== void 0 && Z(d, r, s);
2512
2598
  }
2513
2599
  }), a.push({
2514
2600
  title: "Blend Mode",
@@ -2517,13 +2603,13 @@ function Ka(t, n) {
2517
2603
  value: e.blendMode,
2518
2604
  disabled: !0,
2519
2605
  onChange: (r, s) => {
2520
- var l;
2606
+ var c;
2521
2607
  n.updateObject(t.uuid, r, s);
2522
- const d = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2523
- d !== void 0 && Q(d, r, s);
2608
+ const d = (c = n.scene) == null ? void 0 : c.getObjectByProperty("uuid", t.uuid);
2609
+ d !== void 0 && Z(d, r, s);
2524
2610
  }
2525
2611
  });
2526
- }), /* @__PURE__ */ c.jsx(Be, { title: "Animations", items: a });
2612
+ }), /* @__PURE__ */ l.jsx(Be, { title: "Animations", items: a });
2527
2613
  }
2528
2614
  const Cn = {
2529
2615
  name: "",
@@ -2537,101 +2623,101 @@ const Cn = {
2537
2623
  orthographicCameraInfo: void 0,
2538
2624
  lightInfo: void 0
2539
2625
  };
2540
- let ae = { ...Cn };
2626
+ let re = { ...Cn };
2541
2627
  function Xa(t) {
2542
- const [n, a] = oe(-1);
2628
+ const [n, a] = ce(-1);
2543
2629
  Fe(() => {
2544
- function s(l) {
2545
- ae = { ...l.value }, a(Date.now());
2630
+ function s(c) {
2631
+ re = { ...c.value }, a(Date.now());
2546
2632
  }
2547
2633
  function d() {
2548
- ae = { ...Cn }, a(Date.now());
2634
+ re = { ...Cn }, a(Date.now());
2549
2635
  }
2550
- return _.addEventListener(j.SET_SCENE, d), _.addEventListener(j.SET_OBJECT, s), () => {
2551
- _.removeEventListener(j.SET_SCENE, d), _.removeEventListener(j.SET_OBJECT, s);
2636
+ return j.addEventListener(k.SET_SCENE, d), j.addEventListener(k.SET_OBJECT, s), () => {
2637
+ j.removeEventListener(k.SET_SCENE, d), j.removeEventListener(k.SET_OBJECT, s);
2552
2638
  };
2553
2639
  }, []);
2554
- const e = ae.type.toLowerCase(), r = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2555
- return /* @__PURE__ */ c.jsx(Gt, { label: "Inspector", children: /* @__PURE__ */ c.jsx("div", { id: "Inspector", className: t.class, children: ae.uuid.length > 0 && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2556
- /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2557
- /* @__PURE__ */ c.jsx(
2640
+ const e = re.type.toLowerCase(), r = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2641
+ return /* @__PURE__ */ l.jsx(zt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: re.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2642
+ /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2643
+ /* @__PURE__ */ l.jsx(
2558
2644
  st,
2559
2645
  {
2560
2646
  type: "string",
2561
2647
  title: "Name",
2562
2648
  prop: "name",
2563
- value: ae.name,
2649
+ value: re.name,
2564
2650
  disabled: !0
2565
2651
  }
2566
2652
  ),
2567
- /* @__PURE__ */ c.jsx(
2653
+ /* @__PURE__ */ l.jsx(
2568
2654
  st,
2569
2655
  {
2570
2656
  type: "string",
2571
2657
  title: "Type",
2572
2658
  prop: "type",
2573
- value: ae.type,
2659
+ value: re.type,
2574
2660
  disabled: !0
2575
2661
  }
2576
2662
  ),
2577
- /* @__PURE__ */ c.jsx(
2663
+ /* @__PURE__ */ l.jsx(
2578
2664
  st,
2579
2665
  {
2580
2666
  type: "string",
2581
2667
  title: "UUID",
2582
2668
  prop: "uuid",
2583
- value: ae.uuid,
2669
+ value: re.uuid,
2584
2670
  disabled: !0
2585
2671
  }
2586
2672
  ),
2587
- /* @__PURE__ */ c.jsx(
2673
+ /* @__PURE__ */ l.jsx(
2588
2674
  st,
2589
2675
  {
2590
2676
  type: "boolean",
2591
2677
  title: "Visible",
2592
2678
  prop: "visible",
2593
- value: ae.visible,
2679
+ value: re.visible,
2594
2680
  onChange: (s, d) => {
2595
2681
  var u;
2596
- t.three.updateObject(ae.uuid, s, d);
2597
- const l = (u = t.three.scene) == null ? void 0 : u.getObjectByProperty("uuid", ae.uuid);
2598
- l !== void 0 && Q(l, s, d);
2682
+ t.three.updateObject(re.uuid, s, d);
2683
+ const c = (u = t.three.scene) == null ? void 0 : u.getObjectByProperty("uuid", re.uuid);
2684
+ c !== void 0 && Z(c, s, d);
2599
2685
  }
2600
2686
  }
2601
2687
  )
2602
2688
  ] }),
2603
- /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2604
- Ya(ae, t.three),
2605
- ae.animations.length > 0 ? Ka(ae, t.three) : null,
2606
- e.search("camera") > -1 ? Ga(ae, t.three) : null,
2607
- e.search("light") > -1 ? Wa(ae, t.three) : null,
2608
- r ? $a(ae, t.three) : null
2689
+ /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2690
+ Ya(re, t.three),
2691
+ re.animations.length > 0 ? Ka(re, t.three) : null,
2692
+ e.search("camera") > -1 ? za(re, t.three) : null,
2693
+ e.search("light") > -1 ? Wa(re, t.three) : null,
2694
+ r ? $a(re, t.three) : null
2609
2695
  ] })
2610
2696
  ] }) }, n) }, "Inspector");
2611
2697
  }
2612
2698
  class mi extends ta {
2613
2699
  constructor(a) {
2614
2700
  super(a);
2615
- L(this, "three");
2701
+ F(this, "three");
2616
2702
  // Private
2617
- L(this, "setScene", (a) => {
2703
+ F(this, "setScene", (a) => {
2618
2704
  this.setState(() => ({
2619
2705
  scene: a.value
2620
2706
  }));
2621
2707
  });
2622
2708
  this.state = {
2623
2709
  scene: a.scene !== void 0 ? a.scene : null
2624
- }, this.three = a.three, _.addEventListener(j.SET_SCENE, this.setScene);
2710
+ }, this.three = a.three, j.addEventListener(k.SET_SCENE, this.setScene);
2625
2711
  }
2626
2712
  componentWillUnmount() {
2627
- _.removeEventListener(j.SET_SCENE, this.setScene);
2713
+ j.removeEventListener(k.SET_SCENE, this.setScene);
2628
2714
  }
2629
2715
  render() {
2630
2716
  var r;
2631
2717
  const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
2632
- return /* @__PURE__ */ c.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2633
- /* @__PURE__ */ c.jsx(Gt, { label: e, open: !0, children: /* @__PURE__ */ c.jsx(c.Fragment, { children: a && /* @__PURE__ */ c.jsx(Ia, { child: this.componentState.scene, three: this.three }) }) }),
2634
- /* @__PURE__ */ c.jsx(Xa, { three: this.three })
2718
+ return /* @__PURE__ */ l.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2719
+ /* @__PURE__ */ l.jsx(zt, { label: e, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: a && /* @__PURE__ */ l.jsx(Ia, { child: this.componentState.scene, three: this.three }) }) }),
2720
+ /* @__PURE__ */ l.jsx(Xa, { three: this.three })
2635
2721
  ] }) }, "SidePanel");
2636
2722
  }
2637
2723
  // Getters / Setters
@@ -2639,57 +2725,57 @@ class mi extends ta {
2639
2725
  return this.state;
2640
2726
  }
2641
2727
  }
2642
- function gi(t) {
2728
+ function vi(t) {
2643
2729
  function n() {
2644
2730
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2645
2731
  }
2646
- const a = (l) => {
2732
+ const a = (c) => {
2647
2733
  var p;
2648
2734
  if (!n())
2649
2735
  return;
2650
- const u = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", l.value);
2736
+ const u = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", c.value);
2651
2737
  u !== void 0 && t.three.setObject(u);
2652
- }, e = (l, u, p) => {
2653
- var E;
2738
+ }, e = (c, u, p) => {
2739
+ var v;
2654
2740
  if (!n())
2655
2741
  return;
2656
- const v = (E = t.three.scene) == null ? void 0 : E.getObjectByProperty("uuid", l);
2657
- v !== void 0 && Q(v, u, p);
2658
- }, r = (l) => {
2742
+ const b = (v = t.three.scene) == null ? void 0 : v.getObjectByProperty("uuid", c);
2743
+ b !== void 0 && Z(b, u, p);
2744
+ }, r = (c) => {
2659
2745
  if (!n())
2660
2746
  return;
2661
- const u = l.value, { key: p, value: v, uuid: E } = u;
2662
- e(E, p, v);
2663
- }, s = (l) => {
2747
+ const u = c.value, { key: p, value: b, uuid: v } = u;
2748
+ e(v, p, b);
2749
+ }, s = (c) => {
2664
2750
  if (!n())
2665
2751
  return;
2666
- const u = l.value;
2667
- Ut(u.value).then((p) => {
2752
+ const u = c.value;
2753
+ Bt(u.value).then((p) => {
2668
2754
  e(u.uuid, u.key, p), e(u.uuid, "material.needsUpdate", !0);
2669
2755
  });
2670
- }, d = (l) => {
2671
- var x;
2756
+ }, d = (c) => {
2757
+ var w;
2672
2758
  if (!n())
2673
2759
  return;
2674
- const { key: u, uuid: p, value: v } = l.value, E = (x = t.three.scene) == null ? void 0 : x.getObjectByProperty("uuid", p);
2675
- if (E !== void 0)
2760
+ const { key: u, uuid: p, value: b } = c.value, v = (w = t.three.scene) == null ? void 0 : w.getObjectByProperty("uuid", p);
2761
+ if (v !== void 0)
2676
2762
  try {
2677
- E[u](v);
2678
- } catch (C) {
2679
- console.log("Error requesting method:"), console.log(C), console.log(u), console.log(v);
2763
+ v[u](b);
2764
+ } catch (x) {
2765
+ console.log("Error requesting method:"), console.log(x), console.log(u), console.log(b);
2680
2766
  }
2681
2767
  };
2682
- return Fe(() => (_.addEventListener(j.GET_OBJECT, a), _.addEventListener(j.UPDATE_OBJECT, r), _.addEventListener(j.CREATE_TEXTURE, s), _.addEventListener(j.REQUEST_METHOD, d), () => {
2683
- _.removeEventListener(j.GET_OBJECT, a), _.removeEventListener(j.UPDATE_OBJECT, r), _.removeEventListener(j.CREATE_TEXTURE, s), _.removeEventListener(j.REQUEST_METHOD, d);
2768
+ return Fe(() => (j.addEventListener(k.GET_OBJECT, a), j.addEventListener(k.UPDATE_OBJECT, r), j.addEventListener(k.CREATE_TEXTURE, s), j.addEventListener(k.REQUEST_METHOD, d), () => {
2769
+ j.removeEventListener(k.GET_OBJECT, a), j.removeEventListener(k.UPDATE_OBJECT, r), j.removeEventListener(k.CREATE_TEXTURE, s), j.removeEventListener(k.REQUEST_METHOD, d);
2684
2770
  }), []), null;
2685
2771
  }
2686
- const tn = { type: "change" }, Lt = { type: "start" }, nn = { type: "end" }, xt = new $n(), an = new Gn(), qa = Math.cos(70 * Vn.DEG2RAD);
2772
+ const tn = { type: "change" }, Nt = { type: "start" }, nn = { type: "end" }, xt = new $n(), an = new zn(), qa = Math.cos(70 * Gn.DEG2RAD);
2687
2773
  class Za extends cn {
2688
2774
  constructor(n, a) {
2689
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Y(), this.cursor = new Y(), 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: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: Ke.ROTATE, TWO: Ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2690
- return l.phi;
2775
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new X(), this.cursor = new X(), 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: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: Ke.ROTATE, TWO: Ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2776
+ return c.phi;
2691
2777
  }, this.getAzimuthalAngle = function() {
2692
- return l.theta;
2778
+ return c.theta;
2693
2779
  }, this.getDistance = function() {
2694
2780
  return this.object.position.distanceTo(this.target);
2695
2781
  }, this.listenToKeyEvents = function(o) {
@@ -2701,34 +2787,34 @@ class Za extends cn {
2701
2787
  }, this.reset = function() {
2702
2788
  e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(), s = r.NONE;
2703
2789
  }, this.update = function() {
2704
- const o = new Y(), y = new Kt().setFromUnitVectors(n.up, new Y(0, 1, 0)), A = y.clone().invert(), N = new Y(), te = new Kt(), be = new Y(), ue = 2 * Math.PI;
2790
+ const o = new X(), E = new Kt().setFromUnitVectors(n.up, new X(0, 1, 0)), D = E.clone().invert(), U = new X(), ne = new Kt(), be = new X(), de = 2 * Math.PI;
2705
2791
  return function(wt = null) {
2706
2792
  const ye = e.object.position;
2707
- o.copy(ye).sub(e.target), o.applyQuaternion(y), l.setFromVector3(o), e.autoRotate && s === r.NONE && $(b(wt)), e.enableDamping ? (l.theta += u.theta * e.dampingFactor, l.phi += u.phi * e.dampingFactor) : (l.theta += u.theta, l.phi += u.phi);
2793
+ o.copy(ye).sub(e.target), o.applyQuaternion(E), c.setFromVector3(o), e.autoRotate && s === r.NONE && G(y(wt)), e.enableDamping ? (c.theta += u.theta * e.dampingFactor, c.phi += u.phi * e.dampingFactor) : (c.theta += u.theta, c.phi += u.phi);
2708
2794
  let he = e.minAzimuthAngle, pe = e.maxAzimuthAngle;
2709
- isFinite(he) && isFinite(pe) && (he < -Math.PI ? he += ue : he > Math.PI && (he -= ue), pe < -Math.PI ? pe += ue : pe > Math.PI && (pe -= ue), he <= pe ? l.theta = Math.max(he, Math.min(pe, l.theta)) : l.theta = l.theta > (he + pe) / 2 ? Math.max(he, l.theta) : Math.min(pe, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ee || e.object.isOrthographicCamera ? l.radius = q(l.radius) : l.radius = q(l.radius * p), o.setFromSpherical(l), o.applyQuaternion(A), ye.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), v.set(0, 0, 0));
2710
- let ze = !1;
2711
- if (e.zoomToCursor && ee) {
2795
+ isFinite(he) && isFinite(pe) && (he < -Math.PI ? he += de : he > Math.PI && (he -= de), pe < -Math.PI ? pe += de : pe > Math.PI && (pe -= de), he <= pe ? c.theta = Math.max(he, Math.min(pe, c.theta)) : c.theta = c.theta > (he + pe) / 2 ? Math.max(he, c.theta) : Math.min(pe, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(b, e.dampingFactor) : e.target.add(b), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && te || e.object.isOrthographicCamera ? c.radius = J(c.radius) : c.radius = J(c.radius * p), o.setFromSpherical(c), o.applyQuaternion(D), ye.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, b.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), b.set(0, 0, 0));
2796
+ let He = !1;
2797
+ if (e.zoomToCursor && te) {
2712
2798
  let Ae = null;
2713
2799
  if (e.object.isPerspectiveCamera) {
2714
2800
  const Te = o.length();
2715
- Ae = q(Te * p);
2716
- const He = Te - Ae;
2717
- e.object.position.addScaledVector(fe, He), e.object.updateMatrixWorld();
2801
+ Ae = J(Te * p);
2802
+ const Ve = Te - Ae;
2803
+ e.object.position.addScaledVector(ie, Ve), e.object.updateMatrixWorld();
2718
2804
  } else if (e.object.isOrthographicCamera) {
2719
- const Te = new Y(le.x, le.y, 0);
2720
- Te.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), ze = !0;
2721
- const He = new Y(le.x, le.y, 0);
2722
- He.unproject(e.object), e.object.position.sub(He).add(Te), e.object.updateMatrixWorld(), Ae = o.length();
2805
+ const Te = new X(ue.x, ue.y, 0);
2806
+ Te.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), He = !0;
2807
+ const Ve = new X(ue.x, ue.y, 0);
2808
+ Ve.unproject(e.object), e.object.position.sub(Ve).add(Te), e.object.updateMatrixWorld(), Ae = o.length();
2723
2809
  } else
2724
2810
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2725
2811
  Ae !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Ae).add(e.object.position) : (xt.origin.copy(e.object.position), xt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(xt.direction)) < qa ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), xt.intersectPlane(an, e.target))));
2726
2812
  } else
2727
- e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), ze = !0);
2728
- return p = 1, ee = !1, ze || N.distanceToSquared(e.object.position) > d || 8 * (1 - te.dot(e.object.quaternion)) > d || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), N.copy(e.object.position), te.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
2813
+ e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), He = !0);
2814
+ return p = 1, te = !1, He || U.distanceToSquared(e.object.position) > d || 8 * (1 - ne.dot(e.object.quaternion)) > d || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), U.copy(e.object.position), ne.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
2729
2815
  };
2730
2816
  }(), this.dispose = function() {
2731
- e.domElement.removeEventListener("contextmenu", Oe), e.domElement.removeEventListener("pointerdown", tt), e.domElement.removeEventListener("pointercancel", ke), e.domElement.removeEventListener("wheel", gt), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", at), e._domElementKeyEvents = null);
2817
+ e.domElement.removeEventListener("contextmenu", Oe), e.domElement.removeEventListener("pointerdown", tt), e.domElement.removeEventListener("pointercancel", ke), e.domElement.removeEventListener("wheel", vt), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", at), e._domElementKeyEvents = null);
2732
2818
  };
2733
2819
  const e = this, r = {
2734
2820
  NONE: -1,
@@ -2741,164 +2827,164 @@ class Za extends cn {
2741
2827
  TOUCH_DOLLY_ROTATE: 6
2742
2828
  };
2743
2829
  let s = r.NONE;
2744
- const d = 1e-6, l = new Xt(), u = new Xt();
2830
+ const d = 1e-6, c = new Xt(), u = new Xt();
2745
2831
  let p = 1;
2746
- const v = new Y(), E = new de(), x = new de(), C = new de(), M = new de(), V = new de(), se = new de(), K = new de(), S = new de(), X = new de(), fe = new Y(), le = new de();
2747
- let ee = !1;
2832
+ const b = new X(), v = new fe(), w = new fe(), x = new fe(), O = new fe(), M = new fe(), K = new fe(), I = new fe(), C = new fe(), V = new fe(), ie = new X(), ue = new fe();
2833
+ let te = !1;
2748
2834
  const f = [], m = {};
2749
- function b(o) {
2835
+ function y(o) {
2750
2836
  return o !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * o : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2751
2837
  }
2752
- function O(o) {
2753
- const y = Math.abs(o) / (100 * (window.devicePixelRatio | 0));
2754
- return Math.pow(0.95, e.zoomSpeed * y);
2838
+ function T(o) {
2839
+ const E = Math.abs(o) / (100 * (window.devicePixelRatio | 0));
2840
+ return Math.pow(0.95, e.zoomSpeed * E);
2755
2841
  }
2756
- function $(o) {
2842
+ function G(o) {
2757
2843
  u.theta -= o;
2758
2844
  }
2759
- function G(o) {
2845
+ function H(o) {
2760
2846
  u.phi -= o;
2761
2847
  }
2762
- const U = function() {
2763
- const o = new Y();
2764
- return function(A, N) {
2765
- o.setFromMatrixColumn(N, 0), o.multiplyScalar(-A), v.add(o);
2848
+ const $ = function() {
2849
+ const o = new X();
2850
+ return function(D, U) {
2851
+ o.setFromMatrixColumn(U, 0), o.multiplyScalar(-D), b.add(o);
2766
2852
  };
2767
- }(), D = function() {
2768
- const o = new Y();
2769
- return function(A, N) {
2770
- e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(A), v.add(o);
2853
+ }(), L = function() {
2854
+ const o = new X();
2855
+ return function(D, U) {
2856
+ e.screenSpacePanning === !0 ? o.setFromMatrixColumn(U, 1) : (o.setFromMatrixColumn(U, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(D), b.add(o);
2771
2857
  };
2772
- }(), B = function() {
2773
- const o = new Y();
2774
- return function(A, N) {
2775
- const te = e.domElement;
2858
+ }(), z = function() {
2859
+ const o = new X();
2860
+ return function(D, U) {
2861
+ const ne = e.domElement;
2776
2862
  if (e.object.isPerspectiveCamera) {
2777
2863
  const be = e.object.position;
2778
2864
  o.copy(be).sub(e.target);
2779
- let ue = o.length();
2780
- ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), U(2 * A * ue / te.clientHeight, e.object.matrix), D(2 * N * ue / te.clientHeight, e.object.matrix);
2865
+ let de = o.length();
2866
+ de *= Math.tan(e.object.fov / 2 * Math.PI / 180), $(2 * D * de / ne.clientHeight, e.object.matrix), L(2 * U * de / ne.clientHeight, e.object.matrix);
2781
2867
  } else
2782
- e.object.isOrthographicCamera ? (U(A * (e.object.right - e.object.left) / e.object.zoom / te.clientWidth, e.object.matrix), D(N * (e.object.top - e.object.bottom) / e.object.zoom / te.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2868
+ e.object.isOrthographicCamera ? ($(D * (e.object.right - e.object.left) / e.object.zoom / ne.clientWidth, e.object.matrix), L(U * (e.object.top - e.object.bottom) / e.object.zoom / ne.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2783
2869
  };
2784
2870
  }();
2785
- function J(o) {
2871
+ function ee(o) {
2786
2872
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2787
2873
  }
2788
- function R(o) {
2874
+ function P(o) {
2789
2875
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2790
2876
  }
2791
- function I(o, y) {
2877
+ function N(o, E) {
2792
2878
  if (!e.zoomToCursor)
2793
2879
  return;
2794
- ee = !0;
2795
- const A = e.domElement.getBoundingClientRect(), N = o - A.left, te = y - A.top, be = A.width, ue = A.height;
2796
- le.x = N / be * 2 - 1, le.y = -(te / ue) * 2 + 1, fe.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
2880
+ te = !0;
2881
+ const D = e.domElement.getBoundingClientRect(), U = o - D.left, ne = E - D.top, be = D.width, de = D.height;
2882
+ ue.x = U / be * 2 - 1, ue.y = -(ne / de) * 2 + 1, ie.set(ue.x, ue.y, 1).unproject(e.object).sub(e.object.position).normalize();
2797
2883
  }
2798
- function q(o) {
2884
+ function J(o) {
2799
2885
  return Math.max(e.minDistance, Math.min(e.maxDistance, o));
2800
2886
  }
2801
2887
  function me(o) {
2802
- E.set(o.clientX, o.clientY);
2888
+ v.set(o.clientX, o.clientY);
2803
2889
  }
2804
2890
  function Re(o) {
2805
- I(o.clientX, o.clientX), K.set(o.clientX, o.clientY);
2891
+ N(o.clientX, o.clientX), I.set(o.clientX, o.clientY);
2806
2892
  }
2807
2893
  function Je(o) {
2808
- M.set(o.clientX, o.clientY);
2894
+ O.set(o.clientX, o.clientY);
2809
2895
  }
2810
2896
  function dt(o) {
2811
- x.set(o.clientX, o.clientY), C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
2812
- const y = e.domElement;
2813
- $(2 * Math.PI * C.x / y.clientHeight), G(2 * Math.PI * C.y / y.clientHeight), E.copy(x), e.update();
2814
- }
2815
- function Rt(o) {
2816
- S.set(o.clientX, o.clientY), X.subVectors(S, K), X.y > 0 ? J(O(X.y)) : X.y < 0 && R(O(X.y)), K.copy(S), e.update();
2897
+ w.set(o.clientX, o.clientY), x.subVectors(w, v).multiplyScalar(e.rotateSpeed);
2898
+ const E = e.domElement;
2899
+ G(2 * Math.PI * x.x / E.clientHeight), H(2 * Math.PI * x.y / E.clientHeight), v.copy(w), e.update();
2817
2900
  }
2818
2901
  function Pt(o) {
2819
- V.set(o.clientX, o.clientY), se.subVectors(V, M).multiplyScalar(e.panSpeed), B(se.x, se.y), M.copy(V), e.update();
2902
+ C.set(o.clientX, o.clientY), V.subVectors(C, I), V.y > 0 ? ee(T(V.y)) : V.y < 0 && P(T(V.y)), I.copy(C), e.update();
2903
+ }
2904
+ function _t(o) {
2905
+ M.set(o.clientX, o.clientY), K.subVectors(M, O).multiplyScalar(e.panSpeed), z(K.x, K.y), O.copy(M), e.update();
2820
2906
  }
2821
2907
  function Qe(o) {
2822
- I(o.clientX, o.clientY), o.deltaY < 0 ? R(O(o.deltaY)) : o.deltaY > 0 && J(O(o.deltaY)), e.update();
2908
+ N(o.clientX, o.clientY), o.deltaY < 0 ? P(T(o.deltaY)) : o.deltaY > 0 && ee(T(o.deltaY)), e.update();
2823
2909
  }
2824
2910
  function et(o) {
2825
- let y = !1;
2911
+ let E = !1;
2826
2912
  switch (o.code) {
2827
2913
  case e.keys.UP:
2828
- o.ctrlKey || o.metaKey || o.shiftKey ? G(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, e.keyPanSpeed), y = !0;
2914
+ o.ctrlKey || o.metaKey || o.shiftKey ? H(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : z(0, e.keyPanSpeed), E = !0;
2829
2915
  break;
2830
2916
  case e.keys.BOTTOM:
2831
- o.ctrlKey || o.metaKey || o.shiftKey ? G(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, -e.keyPanSpeed), y = !0;
2917
+ o.ctrlKey || o.metaKey || o.shiftKey ? H(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : z(0, -e.keyPanSpeed), E = !0;
2832
2918
  break;
2833
2919
  case e.keys.LEFT:
2834
- o.ctrlKey || o.metaKey || o.shiftKey ? $(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(e.keyPanSpeed, 0), y = !0;
2920
+ o.ctrlKey || o.metaKey || o.shiftKey ? G(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : z(e.keyPanSpeed, 0), E = !0;
2835
2921
  break;
2836
2922
  case e.keys.RIGHT:
2837
- o.ctrlKey || o.metaKey || o.shiftKey ? $(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(-e.keyPanSpeed, 0), y = !0;
2923
+ o.ctrlKey || o.metaKey || o.shiftKey ? G(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : z(-e.keyPanSpeed, 0), E = !0;
2838
2924
  break;
2839
2925
  }
2840
- y && (o.preventDefault(), e.update());
2926
+ E && (o.preventDefault(), e.update());
2841
2927
  }
2842
2928
  function Pe(o) {
2843
2929
  if (f.length === 1)
2844
- E.set(o.pageX, o.pageY);
2930
+ v.set(o.pageX, o.pageY);
2845
2931
  else {
2846
- const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2847
- E.set(A, N);
2932
+ const E = ge(o), D = 0.5 * (o.pageX + E.x), U = 0.5 * (o.pageY + E.y);
2933
+ v.set(D, U);
2848
2934
  }
2849
2935
  }
2850
- function Ge(o) {
2936
+ function ze(o) {
2851
2937
  if (f.length === 1)
2852
- M.set(o.pageX, o.pageY);
2938
+ O.set(o.pageX, o.pageY);
2853
2939
  else {
2854
- const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2855
- M.set(A, N);
2940
+ const E = ge(o), D = 0.5 * (o.pageX + E.x), U = 0.5 * (o.pageY + E.y);
2941
+ O.set(D, U);
2856
2942
  }
2857
2943
  }
2858
2944
  function _e(o) {
2859
- const y = ve(o), A = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(A * A + N * N);
2860
- K.set(0, te);
2945
+ const E = ge(o), D = o.pageX - E.x, U = o.pageY - E.y, ne = Math.sqrt(D * D + U * U);
2946
+ I.set(0, ne);
2861
2947
  }
2862
- function _t(o) {
2863
- e.enableZoom && _e(o), e.enablePan && Ge(o);
2948
+ function jt(o) {
2949
+ e.enableZoom && _e(o), e.enablePan && ze(o);
2864
2950
  }
2865
2951
  function ft(o) {
2866
2952
  e.enableZoom && _e(o), e.enableRotate && Pe(o);
2867
2953
  }
2868
2954
  function ht(o) {
2869
2955
  if (f.length == 1)
2870
- x.set(o.pageX, o.pageY);
2956
+ w.set(o.pageX, o.pageY);
2871
2957
  else {
2872
- const A = ve(o), N = 0.5 * (o.pageX + A.x), te = 0.5 * (o.pageY + A.y);
2873
- x.set(N, te);
2958
+ const D = ge(o), U = 0.5 * (o.pageX + D.x), ne = 0.5 * (o.pageY + D.y);
2959
+ w.set(U, ne);
2874
2960
  }
2875
- C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
2876
- const y = e.domElement;
2877
- $(2 * Math.PI * C.x / y.clientHeight), G(2 * Math.PI * C.y / y.clientHeight), E.copy(x);
2961
+ x.subVectors(w, v).multiplyScalar(e.rotateSpeed);
2962
+ const E = e.domElement;
2963
+ G(2 * Math.PI * x.x / E.clientHeight), H(2 * Math.PI * x.y / E.clientHeight), v.copy(w);
2878
2964
  }
2879
2965
  function pt(o) {
2880
2966
  if (f.length === 1)
2881
- V.set(o.pageX, o.pageY);
2967
+ M.set(o.pageX, o.pageY);
2882
2968
  else {
2883
- const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2884
- V.set(A, N);
2969
+ const E = ge(o), D = 0.5 * (o.pageX + E.x), U = 0.5 * (o.pageY + E.y);
2970
+ M.set(D, U);
2885
2971
  }
2886
- se.subVectors(V, M).multiplyScalar(e.panSpeed), B(se.x, se.y), M.copy(V);
2972
+ K.subVectors(M, O).multiplyScalar(e.panSpeed), z(K.x, K.y), O.copy(M);
2887
2973
  }
2888
2974
  function je(o) {
2889
- const y = ve(o), A = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(A * A + N * N);
2890
- S.set(0, te), X.set(0, Math.pow(S.y / K.y, e.zoomSpeed)), J(X.y), K.copy(S);
2891
- const be = (o.pageX + y.x) * 0.5, ue = (o.pageY + y.y) * 0.5;
2892
- I(be, ue);
2975
+ const E = ge(o), D = o.pageX - E.x, U = o.pageY - E.y, ne = Math.sqrt(D * D + U * U);
2976
+ C.set(0, ne), V.set(0, Math.pow(C.y / I.y, e.zoomSpeed)), ee(V.y), I.copy(C);
2977
+ const be = (o.pageX + E.x) * 0.5, de = (o.pageY + E.y) * 0.5;
2978
+ N(be, de);
2893
2979
  }
2894
- function Ve(o) {
2980
+ function Ge(o) {
2895
2981
  e.enableZoom && je(o), e.enablePan && pt(o);
2896
2982
  }
2897
2983
  function mt(o) {
2898
2984
  e.enableZoom && je(o), e.enableRotate && ht(o);
2899
2985
  }
2900
2986
  function tt(o) {
2901
- e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", Se), e.domElement.addEventListener("pointerup", ke)), kt(o), o.pointerType === "touch" ? vt(o) : jt(o));
2987
+ e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", Se), e.domElement.addEventListener("pointerup", ke)), At(o), o.pointerType === "touch" ? gt(o) : kt(o));
2902
2988
  }
2903
2989
  function Se(o) {
2904
2990
  e.enabled !== !1 && (o.pointerType === "touch" ? bt(o) : nt(o));
@@ -2906,22 +2992,22 @@ class Za extends cn {
2906
2992
  function ke(o) {
2907
2993
  yt(o), f.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke)), e.dispatchEvent(nn), s = r.NONE;
2908
2994
  }
2909
- function jt(o) {
2910
- let y;
2995
+ function kt(o) {
2996
+ let E;
2911
2997
  switch (o.button) {
2912
2998
  case 0:
2913
- y = e.mouseButtons.LEFT;
2999
+ E = e.mouseButtons.LEFT;
2914
3000
  break;
2915
3001
  case 1:
2916
- y = e.mouseButtons.MIDDLE;
3002
+ E = e.mouseButtons.MIDDLE;
2917
3003
  break;
2918
3004
  case 2:
2919
- y = e.mouseButtons.RIGHT;
3005
+ E = e.mouseButtons.RIGHT;
2920
3006
  break;
2921
3007
  default:
2922
- y = -1;
3008
+ E = -1;
2923
3009
  }
2924
- switch (y) {
3010
+ switch (E) {
2925
3011
  case We.DOLLY:
2926
3012
  if (e.enableZoom === !1)
2927
3013
  return;
@@ -2952,7 +3038,7 @@ class Za extends cn {
2952
3038
  default:
2953
3039
  s = r.NONE;
2954
3040
  }
2955
- s !== r.NONE && e.dispatchEvent(Lt);
3041
+ s !== r.NONE && e.dispatchEvent(Nt);
2956
3042
  }
2957
3043
  function nt(o) {
2958
3044
  switch (s) {
@@ -2964,22 +3050,22 @@ class Za extends cn {
2964
3050
  case r.DOLLY:
2965
3051
  if (e.enableZoom === !1)
2966
3052
  return;
2967
- Rt(o);
3053
+ Pt(o);
2968
3054
  break;
2969
3055
  case r.PAN:
2970
3056
  if (e.enablePan === !1)
2971
3057
  return;
2972
- Pt(o);
3058
+ _t(o);
2973
3059
  break;
2974
3060
  }
2975
3061
  }
2976
- function gt(o) {
2977
- e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(Lt), Qe(o), e.dispatchEvent(nn));
3062
+ function vt(o) {
3063
+ e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(Nt), Qe(o), e.dispatchEvent(nn));
2978
3064
  }
2979
3065
  function at(o) {
2980
3066
  e.enabled === !1 || e.enablePan === !1 || et(o);
2981
3067
  }
2982
- function vt(o) {
3068
+ function gt(o) {
2983
3069
  switch (it(o), f.length) {
2984
3070
  case 1:
2985
3071
  switch (e.touches.ONE) {
@@ -2991,7 +3077,7 @@ class Za extends cn {
2991
3077
  case Ke.PAN:
2992
3078
  if (e.enablePan === !1)
2993
3079
  return;
2994
- Ge(o), s = r.TOUCH_PAN;
3080
+ ze(o), s = r.TOUCH_PAN;
2995
3081
  break;
2996
3082
  default:
2997
3083
  s = r.NONE;
@@ -3002,7 +3088,7 @@ class Za extends cn {
3002
3088
  case Ke.DOLLY_PAN:
3003
3089
  if (e.enableZoom === !1 && e.enablePan === !1)
3004
3090
  return;
3005
- _t(o), s = r.TOUCH_DOLLY_PAN;
3091
+ jt(o), s = r.TOUCH_DOLLY_PAN;
3006
3092
  break;
3007
3093
  case Ke.DOLLY_ROTATE:
3008
3094
  if (e.enableZoom === !1 && e.enableRotate === !1)
@@ -3016,7 +3102,7 @@ class Za extends cn {
3016
3102
  default:
3017
3103
  s = r.NONE;
3018
3104
  }
3019
- s !== r.NONE && e.dispatchEvent(Lt);
3105
+ s !== r.NONE && e.dispatchEvent(Nt);
3020
3106
  }
3021
3107
  function bt(o) {
3022
3108
  switch (it(o), s) {
@@ -3033,7 +3119,7 @@ class Za extends cn {
3033
3119
  case r.TOUCH_DOLLY_PAN:
3034
3120
  if (e.enableZoom === !1 && e.enablePan === !1)
3035
3121
  return;
3036
- Ve(o), e.update();
3122
+ Ge(o), e.update();
3037
3123
  break;
3038
3124
  case r.TOUCH_DOLLY_ROTATE:
3039
3125
  if (e.enableZoom === !1 && e.enableRotate === !1)
@@ -3047,45 +3133,45 @@ class Za extends cn {
3047
3133
  function Oe(o) {
3048
3134
  e.enabled !== !1 && o.preventDefault();
3049
3135
  }
3050
- function kt(o) {
3136
+ function At(o) {
3051
3137
  f.push(o.pointerId);
3052
3138
  }
3053
3139
  function yt(o) {
3054
3140
  delete m[o.pointerId];
3055
- for (let y = 0; y < f.length; y++)
3056
- if (f[y] == o.pointerId) {
3057
- f.splice(y, 1);
3141
+ for (let E = 0; E < f.length; E++)
3142
+ if (f[E] == o.pointerId) {
3143
+ f.splice(E, 1);
3058
3144
  return;
3059
3145
  }
3060
3146
  }
3061
3147
  function it(o) {
3062
- let y = m[o.pointerId];
3063
- y === void 0 && (y = new de(), m[o.pointerId] = y), y.set(o.pageX, o.pageY);
3148
+ let E = m[o.pointerId];
3149
+ E === void 0 && (E = new fe(), m[o.pointerId] = E), E.set(o.pageX, o.pageY);
3064
3150
  }
3065
- function ve(o) {
3066
- const y = o.pointerId === f[0] ? f[1] : f[0];
3067
- return m[y];
3151
+ function ge(o) {
3152
+ const E = o.pointerId === f[0] ? f[1] : f[0];
3153
+ return m[E];
3068
3154
  }
3069
- e.domElement.addEventListener("contextmenu", Oe), e.domElement.addEventListener("pointerdown", tt), e.domElement.addEventListener("pointercancel", ke), e.domElement.addEventListener("wheel", gt, { passive: !1 }), this.update();
3155
+ e.domElement.addEventListener("contextmenu", Oe), e.domElement.addEventListener("pointerdown", tt), e.domElement.addEventListener("pointercancel", ke), e.domElement.addEventListener("wheel", vt, { passive: !1 }), this.update();
3070
3156
  }
3071
3157
  }
3072
3158
  const Ot = (t) => {
3073
- const [n, a] = oe(t.options[t.index]), e = () => {
3159
+ const [n, a] = ce(t.options[t.index]), e = () => {
3074
3160
  t.onToggle(!t.open);
3075
3161
  }, r = (s) => {
3076
3162
  s !== n && (t.onSelect(s), a(s)), t.onToggle(!1);
3077
3163
  };
3078
- return /* @__PURE__ */ c.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
3079
- /* @__PURE__ */ c.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3080
- t.open && /* @__PURE__ */ c.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ c.jsx("li", { onClick: () => r(s), children: s }, s)) })
3164
+ return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
3165
+ /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3166
+ t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ l.jsx("li", { onClick: () => r(s), children: s }, s)) })
3081
3167
  ] });
3082
3168
  }, Ie = na(function(n, a) {
3083
- const [e, r] = oe(!1), s = n.options.indexOf(n.camera.name);
3084
- return /* @__PURE__ */ c.jsxs("div", { className: "CameraWindow", children: [
3085
- /* @__PURE__ */ c.jsx("div", { ref: a, className: "clickable", onClick: () => {
3169
+ const [e, r] = ce(!1), s = n.options.indexOf(n.camera.name);
3170
+ return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3171
+ /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3086
3172
  e && r(!1);
3087
3173
  } }),
3088
- /* @__PURE__ */ c.jsx(
3174
+ /* @__PURE__ */ l.jsx(
3089
3175
  Ot,
3090
3176
  {
3091
3177
  index: s,
@@ -3104,42 +3190,42 @@ const Ot = (t) => {
3104
3190
  "Side by Side",
3105
3191
  "Stacked",
3106
3192
  "Quad"
3107
- ], ne = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Map();
3193
+ ], ae = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Map();
3108
3194
  function $e(t, n) {
3109
3195
  const a = new dn(-100, 100, 100, -100, 50, 3e3);
3110
- return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
3111
- }
3112
- $e("Top", new Y(0, 1e3, 0));
3113
- $e("Bottom", new Y(0, -1e3, 0));
3114
- $e("Left", new Y(-1e3, 0, 0));
3115
- $e("Right", new Y(1e3, 0, 0));
3116
- $e("Front", new Y(0, 0, 1e3));
3117
- $e("Back", new Y(0, 0, -1e3));
3118
- $e("Orthographic", new Y(1e3, 1e3, 1e3));
3119
- const Mt = new Nt(60, 1, 50, 3e3);
3120
- Mt.name = "Debug";
3121
- Mt.position.set(500, 500, 500);
3122
- Mt.lookAt(0, 0, 0);
3123
- ne.set("Debug", Mt);
3196
+ return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ae.set(t, a), a;
3197
+ }
3198
+ $e("Top", new X(0, 1e3, 0));
3199
+ $e("Bottom", new X(0, -1e3, 0));
3200
+ $e("Left", new X(-1e3, 0, 0));
3201
+ $e("Right", new X(1e3, 0, 0));
3202
+ $e("Front", new X(0, 0, 1e3));
3203
+ $e("Back", new X(0, 0, -1e3));
3204
+ $e("Orthographic", new X(1e3, 1e3, 1e3));
3205
+ const Rt = new Ft(60, 1, 50, 3e3);
3206
+ Rt.name = "Debug";
3207
+ Rt.position.set(500, 500, 500);
3208
+ Rt.lookAt(0, 0, 0);
3209
+ ae.set("Debug", Rt);
3124
3210
  const on = [
3125
3211
  "Renderer",
3126
3212
  "Depth",
3127
3213
  "Normals",
3128
3214
  "UVs",
3129
3215
  "Wireframe"
3130
- ], Ja = new zn(), Qa = new Hn(), ei = new Da(), ti = new Yn({
3216
+ ], Ja = new Hn(), Qa = new Vn(), ei = new Da(), ti = new Yn({
3131
3217
  opacity: 0.33,
3132
3218
  transparent: !0,
3133
3219
  wireframe: !0
3134
3220
  });
3135
3221
  let Ct = "Renderer";
3136
- const H = new fn();
3137
- H.name = "Debug Scene";
3222
+ const W = new fn();
3223
+ W.name = "Debug Scene";
3138
3224
  let xe = new fn();
3139
- H.add(xe);
3225
+ W.add(xe);
3140
3226
  const ut = new Wn();
3141
3227
  ut.name = "helpers";
3142
- H.add(ut);
3228
+ W.add(ut);
3143
3229
  const ni = new ja();
3144
3230
  ut.add(ni);
3145
3231
  const Sn = new hn(500);
@@ -3149,258 +3235,258 @@ const lt = new hn(100);
3149
3235
  lt.name = "interactionHelper";
3150
3236
  ut.add(lt);
3151
3237
  lt.visible = !1;
3152
- let St = !1, z = ne.get("Debug"), re = ne.get("Orthographic"), Le = ne.get("Front"), Ne = ne.get("Top"), sn = !1;
3153
- function vi(t) {
3154
- const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, r] = oe(null), [s, d] = oe(!1), [l, u] = oe(!1), [p, v] = oe(!1), [, E] = oe(Date.now()), x = Ce(null), C = Ce(null), M = Ce(null), V = Ce(null), se = Ce(null), K = Ce(null), S = (f, m) => {
3155
- const b = ie.get(f.name);
3156
- b !== void 0 && b.dispose(), ie.delete(f.name);
3157
- const O = we.get(f.name);
3158
- O !== void 0 && (H.remove(O), O.dispose()), we.delete(f.name);
3159
- const $ = new Za(f, m);
3160
- switch ($.enableDamping = !0, $.dampingFactor = 0.05, f.name) {
3238
+ let St = !1, Y = ae.get("Debug"), se = ae.get("Orthographic"), Le = ae.get("Front"), Ne = ae.get("Top"), sn = !1;
3239
+ function gi(t) {
3240
+ const [n, a] = ce(t.mode !== void 0 ? t.mode : "Single"), [e, r] = ce(null), [s, d] = ce(!1), [c, u] = ce(!1), [p, b] = ce(!1), [, v] = ce(Date.now()), w = Ce(null), x = Ce(null), O = Ce(null), M = Ce(null), K = Ce(null), I = Ce(null), C = (f, m) => {
3241
+ const y = oe.get(f.name);
3242
+ y !== void 0 && y.dispose(), oe.delete(f.name);
3243
+ const T = we.get(f.name);
3244
+ T !== void 0 && (W.remove(T), T.dispose()), we.delete(f.name);
3245
+ const G = new Za(f, m);
3246
+ switch (G.enableDamping = !0, G.dampingFactor = 0.05, f.name) {
3161
3247
  case "Top":
3162
3248
  case "Bottom":
3163
3249
  case "Left":
3164
3250
  case "Right":
3165
3251
  case "Front":
3166
3252
  case "Back":
3167
- $.enableRotate = !1;
3253
+ G.enableRotate = !1;
3168
3254
  break;
3169
3255
  }
3170
- if (ie.set(f.name, $), f instanceof Nt) {
3171
- const G = new qn(f);
3172
- we.set(f.name, G), H.add(G);
3256
+ if (oe.set(f.name, G), f instanceof Ft) {
3257
+ const H = new qn(f);
3258
+ we.set(f.name, H), W.add(H);
3173
3259
  }
3174
- }, X = (f) => {
3260
+ }, V = (f) => {
3175
3261
  const m = we.get(f.name);
3176
- m !== void 0 && (H.remove(m), m.dispose(), we.delete(f.name));
3177
- const b = ie.get(f.name);
3178
- b !== void 0 && (b.dispose(), ie.delete(f.name));
3179
- }, fe = () => {
3180
- ie.forEach((f, m) => {
3262
+ m !== void 0 && (W.remove(m), m.dispose(), we.delete(f.name));
3263
+ const y = oe.get(f.name);
3264
+ y !== void 0 && (y.dispose(), oe.delete(f.name));
3265
+ }, ie = () => {
3266
+ oe.forEach((f, m) => {
3181
3267
  f.dispose();
3182
- const b = we.get(m);
3183
- b !== void 0 && (H.remove(b), b.dispose()), we.delete(m), ie.delete(m);
3184
- }), ie.clear(), we.clear();
3185
- }, le = () => {
3268
+ const y = we.get(m);
3269
+ y !== void 0 && (W.remove(y), y.dispose()), we.delete(m), oe.delete(m);
3270
+ }), oe.clear(), we.clear();
3271
+ }, ue = () => {
3186
3272
  switch (n) {
3187
3273
  case "Single":
3188
- S(z, M.current);
3274
+ C(Y, O.current);
3189
3275
  break;
3190
3276
  case "Side by Side":
3191
3277
  case "Stacked":
3192
- S(z, M.current), S(re, V.current);
3278
+ C(Y, O.current), C(se, M.current);
3193
3279
  break;
3194
3280
  case "Quad":
3195
- S(z, M.current), S(re, V.current), S(Le, se.current), S(Ne, K.current);
3281
+ C(Y, O.current), C(se, M.current), C(Le, K.current), C(Ne, I.current);
3196
3282
  break;
3197
3283
  }
3198
3284
  };
3199
3285
  Fe(() => {
3200
3286
  const f = new Kn({
3201
- canvas: x.current,
3287
+ canvas: w.current,
3202
3288
  stencil: !1
3203
3289
  });
3204
3290
  f.autoClear = !1, f.shadowMap.enabled = !0, f.setPixelRatio(devicePixelRatio), f.setClearColor(0), r(f);
3205
3291
  }, []), Fe(() => {
3206
- const f = (O) => {
3207
- vn(xe), H.remove(xe);
3208
- const $ = t.scenes.get(O.value.name);
3209
- if ($ !== void 0) {
3210
- const G = new $();
3211
- t.onSceneSet !== void 0 && t.onSceneSet(G), xe = G, t.three.scene = xe, H.add(xe), sn = !0;
3212
- }
3213
- }, m = (O) => {
3214
- var U;
3215
- const $ = O.value, G = (U = t.three.scene) == null ? void 0 : U.getObjectByProperty("uuid", $.uuid);
3216
- G !== void 0 && ne.set($.name, G), E(Date.now());
3217
- }, b = (O) => {
3218
- ne.delete(O.value.name), E(Date.now());
3292
+ const f = (T) => {
3293
+ gn(xe), W.remove(xe);
3294
+ const G = t.scenes.get(T.value.name);
3295
+ if (G !== void 0) {
3296
+ const H = new G();
3297
+ t.onSceneSet !== void 0 && t.onSceneSet(H), xe = H, t.three.scene = xe, W.add(xe), sn = !0;
3298
+ }
3299
+ }, m = (T) => {
3300
+ var $;
3301
+ const G = T.value, H = ($ = t.three.scene) == null ? void 0 : $.getObjectByProperty("uuid", G.uuid);
3302
+ H !== void 0 && ae.set(G.name, H), v(Date.now());
3303
+ }, y = (T) => {
3304
+ ae.delete(T.value.name), v(Date.now());
3219
3305
  };
3220
- return _.addEventListener(j.SET_SCENE, f), _.addEventListener(j.ADD_CAMERA, m), _.addEventListener(j.REMOVE_CAMERA, b), () => {
3221
- _.removeEventListener(j.SET_SCENE, f), _.removeEventListener(j.ADD_CAMERA, m), _.removeEventListener(j.REMOVE_CAMERA, b);
3306
+ return j.addEventListener(k.SET_SCENE, f), j.addEventListener(k.ADD_CAMERA, m), j.addEventListener(k.REMOVE_CAMERA, y), () => {
3307
+ j.removeEventListener(k.SET_SCENE, f), j.removeEventListener(k.ADD_CAMERA, m), j.removeEventListener(k.REMOVE_CAMERA, y);
3222
3308
  };
3223
3309
  }, []), Fe(() => {
3224
3310
  if (e === null)
3225
3311
  return;
3226
- let f = window.innerWidth, m = window.innerHeight, b = Math.floor(f / 2), O = Math.floor(m / 2), $ = -1;
3227
- const G = () => {
3228
- f = window.innerWidth - 300, m = window.innerHeight, b = Math.floor(f / 2), O = Math.floor(m / 2), e.setSize(f, m);
3229
- let R = f, I = m;
3312
+ let f = window.innerWidth, m = window.innerHeight, y = Math.floor(f / 2), T = Math.floor(m / 2), G = -1;
3313
+ const H = () => {
3314
+ f = window.innerWidth - 300, m = window.innerHeight, y = Math.floor(f / 2), T = Math.floor(m / 2), e.setSize(f, m);
3315
+ let P = f, N = m;
3230
3316
  switch (n) {
3231
3317
  case "Side by Side":
3232
- R = b, I = m;
3318
+ P = y, N = m;
3233
3319
  break;
3234
3320
  case "Stacked":
3235
- R = f, I = O;
3321
+ P = f, N = T;
3236
3322
  break;
3237
3323
  case "Quad":
3238
- R = b, I = O;
3324
+ P = y, N = T;
3239
3325
  break;
3240
3326
  }
3241
- ne.forEach((q) => {
3327
+ ae.forEach((J) => {
3242
3328
  var me;
3243
- q instanceof dn ? (q.left = R / -2, q.right = R / 2, q.top = I / 2, q.bottom = I / -2, q.updateProjectionMatrix()) : q instanceof Nt && (q.aspect = R / I, q.updateProjectionMatrix(), (me = we.get(q.name)) == null || me.update());
3329
+ J instanceof dn ? (J.left = P / -2, J.right = P / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof Ft && (J.aspect = P / N, J.updateProjectionMatrix(), (me = we.get(J.name)) == null || me.update());
3244
3330
  });
3245
- }, U = () => {
3246
- e.setViewport(0, 0, f, m), e.setScissor(0, 0, f, m), e.render(H, z);
3247
- }, D = () => {
3331
+ }, $ = () => {
3332
+ e.setViewport(0, 0, f, m), e.setScissor(0, 0, f, m), e.render(W, Y);
3333
+ }, L = () => {
3248
3334
  if (n === "Side by Side")
3249
- e.setViewport(0, 0, b, m), e.setScissor(0, 0, b, m), e.render(H, z), e.setViewport(b, 0, b, m), e.setScissor(b, 0, b, m), e.render(H, re);
3335
+ e.setViewport(0, 0, y, m), e.setScissor(0, 0, y, m), e.render(W, Y), e.setViewport(y, 0, y, m), e.setScissor(y, 0, y, m), e.render(W, se);
3250
3336
  else {
3251
- const R = m - O;
3252
- e.setViewport(0, R, f, O), e.setScissor(0, R, f, O), e.render(H, z), e.setViewport(0, 0, f, O), e.setScissor(0, 0, f, O), e.render(H, re);
3253
- }
3254
- }, B = () => {
3255
- let R = 0, I = 0;
3256
- I = m - O, R = 0, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(H, z), R = b, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(H, re), I = 0, R = 0, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(H, Le), R = b, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(H, Ne);
3257
- }, J = () => {
3258
- switch (ie.forEach((R) => {
3259
- R.update();
3337
+ const P = m - T;
3338
+ e.setViewport(0, P, f, T), e.setScissor(0, P, f, T), e.render(W, Y), e.setViewport(0, 0, f, T), e.setScissor(0, 0, f, T), e.render(W, se);
3339
+ }
3340
+ }, z = () => {
3341
+ let P = 0, N = 0;
3342
+ N = m - T, P = 0, e.setViewport(P, N, y, T), e.setScissor(P, N, y, T), e.render(W, Y), P = y, e.setViewport(P, N, y, T), e.setScissor(P, N, y, T), e.render(W, se), N = 0, P = 0, e.setViewport(P, N, y, T), e.setScissor(P, N, y, T), e.render(W, Le), P = y, e.setViewport(P, N, y, T), e.setScissor(P, N, y, T), e.render(W, Ne);
3343
+ }, ee = () => {
3344
+ switch (oe.forEach((P) => {
3345
+ P.update();
3260
3346
  }), t.onSceneUpdate !== void 0 && sn && t.onSceneUpdate(xe), e.clear(), n) {
3261
3347
  case "Single":
3262
- U();
3348
+ $();
3263
3349
  break;
3264
3350
  case "Side by Side":
3265
3351
  case "Stacked":
3266
- D();
3352
+ L();
3267
3353
  break;
3268
3354
  case "Quad":
3269
- B();
3355
+ z();
3270
3356
  break;
3271
3357
  }
3272
- $ = requestAnimationFrame(J);
3358
+ G = requestAnimationFrame(ee);
3273
3359
  };
3274
- return le(), window.addEventListener("resize", G), G(), J(), () => {
3275
- window.removeEventListener("resize", G), cancelAnimationFrame($), $ = -1;
3360
+ return ue(), window.addEventListener("resize", H), H(), ee(), () => {
3361
+ window.removeEventListener("resize", H), cancelAnimationFrame(G), G = -1;
3276
3362
  };
3277
3363
  }, [n, e]), Fe(() => {
3278
3364
  if (e !== null) {
3279
- const f = new Xn(), m = new de(), b = (U, D, B, J) => {
3365
+ const f = new Xn(), m = new fe(), y = ($, L, z, ee) => {
3280
3366
  switch (n) {
3281
3367
  case "Quad":
3282
- U < B ? D < J ? f.setFromCamera(m, z) : f.setFromCamera(m, Le) : D < J ? f.setFromCamera(m, re) : f.setFromCamera(m, Ne);
3368
+ $ < z ? L < ee ? f.setFromCamera(m, Y) : f.setFromCamera(m, Le) : L < ee ? f.setFromCamera(m, se) : f.setFromCamera(m, Ne);
3283
3369
  break;
3284
3370
  case "Side by Side":
3285
- U < B ? f.setFromCamera(m, z) : f.setFromCamera(m, re);
3371
+ $ < z ? f.setFromCamera(m, Y) : f.setFromCamera(m, se);
3286
3372
  break;
3287
3373
  case "Single":
3288
- f.setFromCamera(m, z);
3374
+ f.setFromCamera(m, Y);
3289
3375
  break;
3290
3376
  case "Stacked":
3291
- D < J ? f.setFromCamera(m, z) : f.setFromCamera(m, re);
3377
+ L < ee ? f.setFromCamera(m, Y) : f.setFromCamera(m, se);
3292
3378
  break;
3293
3379
  }
3294
- }, O = (U) => {
3380
+ }, T = ($) => {
3295
3381
  if (!St)
3296
3382
  return;
3297
- const D = new de();
3298
- e.getSize(D);
3299
- const B = Math.min(U.clientX, D.x), J = Math.min(U.clientY, D.y);
3300
- m.x = qe(B, 0, D.x, -1, 1), m.y = qe(J, 0, D.y, 1, -1);
3301
- const R = D.x / 2, I = D.y / 2, q = () => {
3302
- B < R ? m.x = qe(B, 0, R, -1, 1) : m.x = qe(B, R, D.x, -1, 1);
3383
+ const L = new fe();
3384
+ e.getSize(L);
3385
+ const z = Math.min($.clientX, L.x), ee = Math.min($.clientY, L.y);
3386
+ m.x = qe(z, 0, L.x, -1, 1), m.y = qe(ee, 0, L.y, 1, -1);
3387
+ const P = L.x / 2, N = L.y / 2, J = () => {
3388
+ z < P ? m.x = qe(z, 0, P, -1, 1) : m.x = qe(z, P, L.x, -1, 1);
3303
3389
  }, me = () => {
3304
- J < I ? m.y = qe(J, 0, I, 1, -1) : m.y = qe(J, I, D.y, 1, -1);
3390
+ ee < N ? m.y = qe(ee, 0, N, 1, -1) : m.y = qe(ee, N, L.y, 1, -1);
3305
3391
  };
3306
3392
  switch (n) {
3307
3393
  case "Quad":
3308
- q(), me();
3394
+ J(), me();
3309
3395
  break;
3310
3396
  case "Side by Side":
3311
- q();
3397
+ J();
3312
3398
  break;
3313
3399
  case "Stacked":
3314
3400
  me(), me();
3315
3401
  break;
3316
3402
  }
3317
- b(B, J, R, I);
3403
+ y(z, ee, P, N);
3318
3404
  const Re = f.intersectObjects(xe.children);
3319
3405
  Re.length > 0 && lt.position.copy(Re[0].point);
3320
- }, $ = (U) => {
3406
+ }, G = ($) => {
3321
3407
  if (!St)
3322
3408
  return;
3323
- const D = new de();
3324
- if (e.getSize(D), U.clientX >= D.x)
3409
+ const L = new fe();
3410
+ if (e.getSize(L), $.clientX >= L.x)
3325
3411
  return;
3326
- O(U);
3327
- const B = f.intersectObjects(xe.children);
3328
- B.length > 0 && t.three.getObject(B[0].object.uuid);
3329
- }, G = C.current;
3330
- return G.addEventListener("mousemove", O, !1), G.addEventListener("click", $, !1), () => {
3331
- G.removeEventListener("mousemove", O), G.removeEventListener("click", $);
3412
+ T($);
3413
+ const z = f.intersectObjects(xe.children);
3414
+ z.length > 0 && t.three.getObject(z[0].object.uuid);
3415
+ }, H = x.current;
3416
+ return H.addEventListener("mousemove", T, !1), H.addEventListener("click", G, !1), () => {
3417
+ H.removeEventListener("mousemove", T), H.removeEventListener("click", G);
3332
3418
  };
3333
3419
  }
3334
3420
  }, [n, e]);
3335
- const ee = [];
3336
- return ne.forEach((f, m) => {
3337
- ee.push(m);
3338
- }), /* @__PURE__ */ c.jsxs("div", { className: "multiview", children: [
3339
- /* @__PURE__ */ c.jsx("canvas", { ref: x }),
3340
- /* @__PURE__ */ c.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: C, children: [
3341
- n === "Single" && /* @__PURE__ */ c.jsx(c.Fragment, { children: /* @__PURE__ */ c.jsx(Ie, { camera: z, options: ee, ref: M, onSelect: (f) => {
3342
- var b;
3343
- (b = ie.get(z.name)) == null || b.dispose();
3344
- const m = ne.get(f);
3345
- m !== void 0 && (X(z), z = m, S(m, M.current));
3421
+ const te = [];
3422
+ return ae.forEach((f, m) => {
3423
+ te.push(m);
3424
+ }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3425
+ /* @__PURE__ */ l.jsx("canvas", { ref: w }),
3426
+ /* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: x, children: [
3427
+ n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ie, { camera: Y, options: te, ref: O, onSelect: (f) => {
3428
+ var y;
3429
+ (y = oe.get(Y.name)) == null || y.dispose();
3430
+ const m = ae.get(f);
3431
+ m !== void 0 && (V(Y), Y = m, C(m, O.current));
3346
3432
  } }) }),
3347
- (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3348
- /* @__PURE__ */ c.jsx(Ie, { camera: z, options: ee, ref: M, onSelect: (f) => {
3349
- var b;
3350
- (b = ie.get(z.name)) == null || b.dispose();
3351
- const m = ne.get(f);
3352
- m !== void 0 && (X(z), z = m, S(m, M.current));
3433
+ (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3434
+ /* @__PURE__ */ l.jsx(Ie, { camera: Y, options: te, ref: O, onSelect: (f) => {
3435
+ var y;
3436
+ (y = oe.get(Y.name)) == null || y.dispose();
3437
+ const m = ae.get(f);
3438
+ m !== void 0 && (V(Y), Y = m, C(m, O.current));
3353
3439
  } }),
3354
- /* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: V, onSelect: (f) => {
3355
- var b;
3356
- (b = ie.get(re.name)) == null || b.dispose();
3357
- const m = ne.get(f);
3358
- m !== void 0 && (X(re), re = m, S(m, V.current));
3440
+ /* @__PURE__ */ l.jsx(Ie, { camera: se, options: te, ref: M, onSelect: (f) => {
3441
+ var y;
3442
+ (y = oe.get(se.name)) == null || y.dispose();
3443
+ const m = ae.get(f);
3444
+ m !== void 0 && (V(se), se = m, C(m, M.current));
3359
3445
  } })
3360
3446
  ] }),
3361
- n === "Quad" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3362
- /* @__PURE__ */ c.jsx(Ie, { camera: z, options: ee, ref: M, onSelect: (f) => {
3363
- var b;
3364
- (b = ie.get(z.name)) == null || b.dispose();
3365
- const m = ne.get(f);
3366
- m !== void 0 && (X(z), z = m, S(m, M.current));
3447
+ n === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3448
+ /* @__PURE__ */ l.jsx(Ie, { camera: Y, options: te, ref: O, onSelect: (f) => {
3449
+ var y;
3450
+ (y = oe.get(Y.name)) == null || y.dispose();
3451
+ const m = ae.get(f);
3452
+ m !== void 0 && (V(Y), Y = m, C(m, O.current));
3367
3453
  } }),
3368
- /* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: V, onSelect: (f) => {
3369
- var b;
3370
- (b = ie.get(re.name)) == null || b.dispose();
3371
- const m = ne.get(f);
3372
- m !== void 0 && (X(re), re = m, S(m, V.current));
3454
+ /* @__PURE__ */ l.jsx(Ie, { camera: se, options: te, ref: M, onSelect: (f) => {
3455
+ var y;
3456
+ (y = oe.get(se.name)) == null || y.dispose();
3457
+ const m = ae.get(f);
3458
+ m !== void 0 && (V(se), se = m, C(m, M.current));
3373
3459
  } }),
3374
- /* @__PURE__ */ c.jsx(Ie, { camera: Le, options: ee, ref: se, onSelect: (f) => {
3375
- var b;
3376
- (b = ie.get(Le.name)) == null || b.dispose();
3377
- const m = ne.get(f);
3378
- m !== void 0 && (X(Le), Le = m, S(m, se.current));
3460
+ /* @__PURE__ */ l.jsx(Ie, { camera: Le, options: te, ref: K, onSelect: (f) => {
3461
+ var y;
3462
+ (y = oe.get(Le.name)) == null || y.dispose();
3463
+ const m = ae.get(f);
3464
+ m !== void 0 && (V(Le), Le = m, C(m, K.current));
3379
3465
  } }),
3380
- /* @__PURE__ */ c.jsx(Ie, { camera: Ne, options: ee, ref: K, onSelect: (f) => {
3381
- var b;
3382
- (b = ie.get(Ne.name)) == null || b.dispose();
3383
- const m = ne.get(f);
3384
- m !== void 0 && (X(Ne), Ne = m, S(m, K.current));
3466
+ /* @__PURE__ */ l.jsx(Ie, { camera: Ne, options: te, ref: I, onSelect: (f) => {
3467
+ var y;
3468
+ (y = oe.get(Ne.name)) == null || y.dispose();
3469
+ const m = ae.get(f);
3470
+ m !== void 0 && (V(Ne), Ne = m, C(m, I.current));
3385
3471
  } })
3386
3472
  ] })
3387
3473
  ] }),
3388
- /* @__PURE__ */ c.jsxs("div", { className: "settings", children: [
3389
- /* @__PURE__ */ c.jsx(
3474
+ /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3475
+ /* @__PURE__ */ l.jsx(
3390
3476
  Ot,
3391
3477
  {
3392
3478
  index: rn.indexOf(n),
3393
3479
  options: rn,
3394
3480
  onSelect: (f) => {
3395
- f !== n && (fe(), a(f));
3481
+ f !== n && (ie(), a(f));
3396
3482
  },
3397
3483
  open: s,
3398
3484
  onToggle: (f) => {
3399
- d(f), l && u(!1), p && v(!1);
3485
+ d(f), c && u(!1), p && b(!1);
3400
3486
  }
3401
3487
  }
3402
3488
  ),
3403
- /* @__PURE__ */ c.jsx(
3489
+ /* @__PURE__ */ l.jsx(
3404
3490
  Ot,
3405
3491
  {
3406
3492
  index: on.indexOf(Ct),
@@ -3409,30 +3495,30 @@ function vi(t) {
3409
3495
  if (f !== Ct)
3410
3496
  switch (Ct = f, Ct) {
3411
3497
  case "Depth":
3412
- H.overrideMaterial = Ja;
3498
+ W.overrideMaterial = Ja;
3413
3499
  break;
3414
3500
  case "Normals":
3415
- H.overrideMaterial = Qa;
3501
+ W.overrideMaterial = Qa;
3416
3502
  break;
3417
3503
  default:
3418
3504
  case "Renderer":
3419
- H.overrideMaterial = null;
3505
+ W.overrideMaterial = null;
3420
3506
  break;
3421
3507
  case "Wireframe":
3422
- H.overrideMaterial = ti;
3508
+ W.overrideMaterial = ti;
3423
3509
  break;
3424
3510
  case "UVs":
3425
- H.overrideMaterial = ei;
3511
+ W.overrideMaterial = ei;
3426
3512
  break;
3427
3513
  }
3428
3514
  },
3429
- open: l,
3515
+ open: c,
3430
3516
  onToggle: (f) => {
3431
- s && d(!1), u(f), p && v(!1);
3517
+ s && d(!1), u(f), p && b(!1);
3432
3518
  }
3433
3519
  }
3434
3520
  ),
3435
- /* @__PURE__ */ c.jsx(
3521
+ /* @__PURE__ */ l.jsx(
3436
3522
  Ot,
3437
3523
  {
3438
3524
  index: 0,
@@ -3445,7 +3531,7 @@ function vi(t) {
3445
3531
  },
3446
3532
  open: p,
3447
3533
  onToggle: (f) => {
3448
- s && d(!1), l && u(!1), v(f);
3534
+ s && d(!1), c && u(!1), b(f);
3449
3535
  }
3450
3536
  }
3451
3537
  )
@@ -3453,16 +3539,16 @@ function vi(t) {
3453
3539
  ] });
3454
3540
  }
3455
3541
  function bi(t) {
3456
- return /* @__PURE__ */ c.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3457
- /* @__PURE__ */ c.jsx("header", { children: t.header }),
3542
+ return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3543
+ /* @__PURE__ */ l.jsx("header", { children: t.header }),
3458
3544
  t.children,
3459
- /* @__PURE__ */ c.jsx("footer", { children: t.footer })
3545
+ /* @__PURE__ */ l.jsx("footer", { children: t.footer })
3460
3546
  ] });
3461
3547
  }
3462
3548
  export {
3463
- Gt as Accordion,
3549
+ zt as Accordion,
3464
3550
  hi as Application,
3465
- Tt as BaseRemote,
3551
+ Mt as BaseRemote,
3466
3552
  xn as ChildObject,
3467
3553
  Ia as ContainerObject,
3468
3554
  Oa as Draggable,
@@ -3472,28 +3558,28 @@ export {
3472
3558
  bi as Editor,
3473
3559
  ja as InfiniteGridHelper,
3474
3560
  Xa as Inspector,
3475
- vi as MultiView,
3561
+ gi as MultiView,
3476
3562
  wn as NavButton,
3477
3563
  ca as RemoteComponents,
3478
3564
  pi as RemoteController,
3479
3565
  Ue as RemoteTheatre,
3480
- ga as RemoteThree,
3566
+ va as RemoteThree,
3481
3567
  En as RemoteTweakpane,
3482
- gi as SceneInspector,
3568
+ vi as SceneInspector,
3483
3569
  mi as SidePanel,
3484
- j as ToolEvents,
3570
+ k as ToolEvents,
3485
3571
  Da as UVMaterial,
3486
3572
  ui as clamp,
3487
3573
  ra as colorToHex,
3488
- _ as debugDispatcher,
3489
- vn as dispose,
3574
+ j as debugDispatcher,
3575
+ gn as dispose,
3490
3576
  sa as disposeMaterial,
3491
3577
  fi as disposeTexture,
3492
3578
  di as distance,
3493
- gn as hierarchyUUID,
3579
+ vn as hierarchyUUID,
3494
3580
  ia as isColor,
3495
3581
  aa as randomID,
3496
3582
  oa as resetThreeObjects,
3497
- At as round,
3498
- Ft as totalThreeObjects
3583
+ Dt as round,
3584
+ Ut as totalThreeObjects
3499
3585
  };