@tomorrowevening/hermes 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/hermes.cjs.js +15 -15
  2. package/dist/hermes.esm.js +981 -971
  3. package/package.json +1 -5
  4. package/types/core/Application.d.ts +5 -4
  5. package/types/core/remote/BaseRemote.d.ts +4 -0
  6. package/types/core/remote/RemoteComponents.d.ts +1 -2
  7. package/types/core/remote/RemoteTheatre.d.ts +3 -4
  8. package/types/core/remote/RemoteThree.d.ts +2 -3
  9. package/types/core/remote/RemoteTweakpane.d.ts +1 -1
  10. package/dist/hermes.umd.js +0 -144
  11. package/src/core/Application.ts +0 -111
  12. package/src/core/RemoteController.ts +0 -60
  13. package/src/core/remote/BaseRemote.ts +0 -16
  14. package/src/core/remote/RemoteComponents.ts +0 -45
  15. package/src/core/remote/RemoteTheatre.ts +0 -300
  16. package/src/core/remote/RemoteThree.ts +0 -143
  17. package/src/core/remote/RemoteTweakpane.ts +0 -194
  18. package/src/core/types.ts +0 -56
  19. package/src/editor/Editor.tsx +0 -20
  20. package/src/editor/components/Draggable.tsx +0 -40
  21. package/src/editor/components/DraggableItem.tsx +0 -22
  22. package/src/editor/components/Dropdown.tsx +0 -38
  23. package/src/editor/components/DropdownItem.tsx +0 -64
  24. package/src/editor/components/NavButton.tsx +0 -11
  25. package/src/editor/components/content.ts +0 -2
  26. package/src/editor/components/icons/CloseIcon.tsx +0 -7
  27. package/src/editor/components/icons/DragIcon.tsx +0 -9
  28. package/src/editor/components/types.ts +0 -41
  29. package/src/editor/global.ts +0 -20
  30. package/src/editor/multiView/CameraWindow.tsx +0 -74
  31. package/src/editor/multiView/InfiniteGridHelper.ts +0 -24
  32. package/src/editor/multiView/InfiniteGridMaterial.ts +0 -127
  33. package/src/editor/multiView/MultiView.scss +0 -101
  34. package/src/editor/multiView/MultiView.tsx +0 -636
  35. package/src/editor/multiView/MultiViewData.ts +0 -59
  36. package/src/editor/multiView/UVMaterial.ts +0 -55
  37. package/src/editor/scss/_debug.scss +0 -58
  38. package/src/editor/scss/_draggable.scss +0 -43
  39. package/src/editor/scss/_dropdown.scss +0 -84
  40. package/src/editor/scss/_sidePanel.scss +0 -278
  41. package/src/editor/scss/_theme.scss +0 -9
  42. package/src/editor/scss/index.scss +0 -67
  43. package/src/editor/sidePanel/Accordion.tsx +0 -41
  44. package/src/editor/sidePanel/ChildObject.tsx +0 -57
  45. package/src/editor/sidePanel/ContainerObject.tsx +0 -11
  46. package/src/editor/sidePanel/SidePanel.tsx +0 -64
  47. package/src/editor/sidePanel/ToggleBtn.tsx +0 -27
  48. package/src/editor/sidePanel/inspector/Inspector.tsx +0 -119
  49. package/src/editor/sidePanel/inspector/InspectorField.tsx +0 -198
  50. package/src/editor/sidePanel/inspector/InspectorGroup.tsx +0 -50
  51. package/src/editor/sidePanel/inspector/SceneInspector.tsx +0 -84
  52. package/src/editor/sidePanel/inspector/inspector.scss +0 -161
  53. package/src/editor/sidePanel/inspector/utils/InspectAnimation.tsx +0 -102
  54. package/src/editor/sidePanel/inspector/utils/InspectCamera.tsx +0 -75
  55. package/src/editor/sidePanel/inspector/utils/InspectLight.tsx +0 -62
  56. package/src/editor/sidePanel/inspector/utils/InspectMaterial.tsx +0 -710
  57. package/src/editor/sidePanel/inspector/utils/InspectTransform.tsx +0 -113
  58. package/src/editor/sidePanel/types.ts +0 -130
  59. package/src/editor/sidePanel/utils.ts +0 -278
  60. package/src/editor/utils.ts +0 -117
  61. package/src/example/CustomEditor.tsx +0 -78
  62. package/src/example/components/App.css +0 -6
  63. package/src/example/components/App.tsx +0 -246
  64. package/src/example/constants.ts +0 -52
  65. package/src/example/index.scss +0 -45
  66. package/src/example/main.tsx +0 -37
  67. package/src/example/three/BaseScene.ts +0 -42
  68. package/src/example/three/CustomMaterial.ts +0 -72
  69. package/src/example/three/FBXAnimation.ts +0 -26
  70. package/src/example/three/Scene1.ts +0 -225
  71. package/src/example/three/Scene2.ts +0 -138
  72. package/src/example/three/loader.ts +0 -110
  73. package/src/index.ts +0 -27
  74. package/src/vite-env.d.ts +0 -1
@@ -1,38 +1,38 @@
1
- import { PositionalAudio as Hn, EventDispatcher as un, Texture as dn, CubeTexture as Wn, RepeatWrapping as Kt, ShaderMaterial as fn, GLSL3 as qn, DoubleSide as hn, Color as Tt, Mesh as Kn, PlaneGeometry as Xn, FrontSide as Zn, BackSide as Jn, NoBlending as Qn, NormalBlending as ea, AdditiveBlending as ta, SubtractiveBlending as na, MultiplyBlending as aa, CustomBlending as ia, AddEquation as ra, SubtractEquation as oa, ReverseSubtractEquation as sa, MinEquation as ca, MaxEquation as la, ZeroFactor as pn, OneFactor as mn, SrcColorFactor as vn, OneMinusSrcColorFactor as gn, SrcAlphaFactor as bn, OneMinusSrcAlphaFactor as yn, DstAlphaFactor as En, OneMinusDstAlphaFactor as Cn, DstColorFactor as xn, OneMinusDstColorFactor as Sn, SrcAlphaSaturateFactor as ua, ConstantColorFactor as wn, OneMinusConstantColorFactor as On, ConstantAlphaFactor as Mn, OneMinusConstantAlphaFactor as Tn, Matrix4 as da, Vector3 as X, Euler as fa, Ray as ha, Plane as pa, MathUtils as ma, MOUSE as He, TOUCH as We, Quaternion as Xt, Spherical as Zt, Vector2 as ue, PerspectiveCamera as zt, MeshDepthMaterial as va, MeshNormalMaterial as ga, MeshBasicMaterial as ba, OrthographicCamera as Rn, Scene as Pn, Group as ya, AxesHelper as An, WebGLRenderer as Ea, Raycaster as Ca, CameraHelper as xa } from "three";
2
- import { getProject as Sa, createRafDriver as wa } from "@theatre/core";
3
- import ct from "@theatre/studio";
4
- import { Pane as Oa } from "tweakpane";
5
- import * as Ma from "@tweakpane/plugin-essentials";
6
- import kn, { useState as oe, useRef as ye, useEffect as Be, Component as Ta, forwardRef as Ra } from "react";
7
- import { Reorder as _n } from "framer-motion";
1
+ import { PositionalAudio as Vn, EventDispatcher as un, Texture as dn, CubeTexture as Wn, RepeatWrapping as Kt, ShaderMaterial as hn, GLSL3 as Hn, DoubleSide as fn, Color as Tt, Mesh as qn, PlaneGeometry as Kn, FrontSide as Xn, BackSide as Zn, NoBlending as Jn, NormalBlending as Qn, AdditiveBlending as ea, SubtractiveBlending as ta, MultiplyBlending as na, CustomBlending as aa, AddEquation as ia, SubtractEquation as ra, ReverseSubtractEquation as sa, MinEquation as oa, MaxEquation as ca, ZeroFactor as pn, OneFactor as mn, SrcColorFactor as vn, OneMinusSrcColorFactor as gn, SrcAlphaFactor as bn, OneMinusSrcAlphaFactor as yn, DstAlphaFactor as En, OneMinusDstAlphaFactor as Cn, DstColorFactor as xn, OneMinusDstColorFactor as Sn, SrcAlphaSaturateFactor as la, ConstantColorFactor as wn, OneMinusConstantColorFactor as On, ConstantAlphaFactor as Mn, OneMinusConstantAlphaFactor as Tn, Matrix4 as ua, Vector3 as X, Euler as da, Ray as ha, Plane as fa, MathUtils as pa, MOUSE as Ve, TOUCH as We, Quaternion as Xt, Spherical as Zt, Vector2 as ue, PerspectiveCamera as zt, MeshDepthMaterial as ma, MeshNormalMaterial as va, MeshBasicMaterial as ga, OrthographicCamera as Rn, Scene as _n, Group as ba, AxesHelper as An, WebGLRenderer as ya, Raycaster as Ea, CameraHelper as Ca } from "three";
2
+ import { getProject as xa, createRafDriver as Sa } from "@theatre/core";
3
+ import at from "@theatre/studio";
4
+ import { Pane as wa } from "tweakpane";
5
+ import * as Oa from "@tweakpane/plugin-essentials";
6
+ import Pn, { useState as se, useRef as Ee, useEffect as Fe, Component as Ma, forwardRef as Ta } from "react";
7
+ import { Reorder as kn } from "framer-motion";
8
8
  function lt(t) {
9
9
  return t.substring(0, 1).toUpperCase() + t.substring(1);
10
10
  }
11
- function $i(t, n, a) {
11
+ function Pi(t, n, a) {
12
12
  return Math.min(n, Math.max(t, a));
13
13
  }
14
- function zi(t, n) {
14
+ function ki(t, n) {
15
15
  const a = t - n;
16
16
  return Math.sqrt(a * a);
17
17
  }
18
- function Pa() {
18
+ function Ra() {
19
19
  return Math.round(Math.random() * 1e6).toString();
20
20
  }
21
- function Aa(t) {
21
+ function _a(t) {
22
22
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
23
23
  }
24
- function ka(t) {
25
- const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), o = (u) => {
26
- const d = u.toString(16);
27
- return d.length === 1 ? "0" + d : d;
28
- }, s = o(n), p = o(a), c = o(e);
29
- return "#" + s + p + c;
24
+ function Aa(t) {
25
+ const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), s = (u) => {
26
+ const f = u.toString(16);
27
+ return f.length === 1 ? "0" + f : f;
28
+ }, o = s(n), p = s(a), c = s(e);
29
+ return "#" + o + p + c;
30
30
  }
31
31
  function Ft(t, n = 1) {
32
32
  return Number(t.toFixed(n));
33
33
  }
34
34
  let Yt = 0;
35
- const _a = () => {
35
+ const Pa = () => {
36
36
  Yt = 0;
37
37
  }, jn = (t) => {
38
38
  if (!t)
@@ -41,50 +41,58 @@ const _a = () => {
41
41
  n.length === 0 && (n = `obj_${Yt}`, Yt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
42
  jn(a);
43
43
  });
44
- }, Yi = (t) => {
44
+ }, ji = (t) => {
45
45
  t?.dispose();
46
- }, ja = (t) => {
46
+ }, ka = (t) => {
47
47
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
48
48
  }, Dn = (t) => {
49
49
  if (t) {
50
50
  for (; t.children.length > 0; ) {
51
51
  const n = t.children[0];
52
- n instanceof Hn ? (n.pause(), n.parent && n.parent.remove(n)) : Dn(n);
52
+ n instanceof Vn ? (n.pause(), n.parent && n.parent.remove(n)) : Dn(n);
53
53
  }
54
54
  if (t.parent && t.parent.remove(t), t.isMesh) {
55
55
  const n = t;
56
- n.geometry?.dispose(), ja(n.material);
56
+ n.geometry?.dispose(), ka(n.material);
57
57
  }
58
58
  t.dispose !== void 0 && t.dispose();
59
59
  }
60
60
  };
61
- class Gi {
61
+ class Di {
62
62
  components = /* @__PURE__ */ new Map();
63
63
  listen;
64
64
  // Protected
65
65
  _debugEnabled;
66
- broadcastChannel = void 0;
67
- webSocket = void 0;
66
+ _broadcastChannel = void 0;
67
+ _webSocket = void 0;
68
68
  _mode = "app";
69
69
  _connected = !1;
70
- useBC = !1;
71
- constructor(n, a, e = !0, o = "editor") {
72
- this.editor = a && document.location.hash.search(o) > -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)));
70
+ _useBC = !1;
71
+ constructor(n, a, e = !0) {
72
+ 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)));
73
+ }
74
+ // Set editor and add components here
75
+ init() {
76
+ return new Promise((n) => {
77
+ this.components.forEach((a) => {
78
+ a.handleEditorApp();
79
+ }), n();
80
+ });
73
81
  }
74
82
  addComponent(n, a) {
75
83
  this.components.set(n, a);
76
84
  }
77
85
  dispose() {
78
- this.broadcastChannel !== void 0 && this.broadcastChannel.removeEventListener("message", this.messageHandler), this.webSocket !== void 0 && (this.webSocket.removeEventListener("open", this.openHandler), this.webSocket.removeEventListener("close", this.closeHandler), this.webSocket.removeEventListener("message", this.messageHandler)), this.components.forEach((n) => {
86
+ this._broadcastChannel !== void 0 && this._broadcastChannel.removeEventListener("message", this.messageHandler), this._webSocket !== void 0 && (this._webSocket.removeEventListener("open", this.openHandler), this._webSocket.removeEventListener("close", this.closeHandler), this._webSocket.removeEventListener("message", this.messageHandler)), this.components.forEach((n) => {
79
87
  n.dispose();
80
88
  }), this.components.clear();
81
89
  }
82
90
  // Remote
83
91
  send(n) {
84
- this._mode !== n.target && (this.useBC ? this.broadcastChannel?.postMessage(n) : this._connected && this.webSocket?.send(JSON.stringify(n)));
92
+ this._mode !== n.target && (this._useBC ? this._broadcastChannel?.postMessage(n) : this._connected && this._webSocket?.send(JSON.stringify(n)));
85
93
  }
86
94
  messageHandler = (n) => {
87
- this.listen !== void 0 && (this.useBC ? this.listen(n.data) : this.listen(JSON.parse(n.data)));
95
+ this.listen !== void 0 && (this._useBC ? this.listen(n.data) : this.listen(JSON.parse(n.data)));
88
96
  };
89
97
  openHandler = () => {
90
98
  this._connected = !0;
@@ -109,10 +117,10 @@ class Gi {
109
117
  return this._mode === "editor";
110
118
  }
111
119
  set editor(n) {
112
- n && (this._mode = "editor", document.title += " - Editor");
120
+ n && (this._mode = "editor");
113
121
  }
114
122
  }
115
- const _ = new un(), j = {
123
+ const k = new un(), j = {
116
124
  CUSTOM: "ToolEvents::custom",
117
125
  // Components
118
126
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -135,8 +143,18 @@ class Rt {
135
143
  }
136
144
  dispose() {
137
145
  }
146
+ // Remote Controller
147
+ // Receives App events
148
+ handleApp(n) {
149
+ }
150
+ // Receives Editor events
151
+ handleEditor(n) {
152
+ }
153
+ // Runs only in-editor
154
+ handleEditorApp() {
155
+ }
138
156
  }
139
- class Da extends Rt {
157
+ class Ii extends Rt {
140
158
  selectDropdown(n, a) {
141
159
  this.app.send({
142
160
  event: "selectComponent",
@@ -157,20 +175,23 @@ class Da extends Rt {
157
175
  }
158
176
  });
159
177
  }
160
- }
161
- function Ia(t, n) {
162
- switch (n.event) {
163
- case "selectComponent":
164
- _.dispatchEvent({ type: j.SELECT_DROPDOWN, value: n.data });
165
- break;
166
- case "draggableListUpdate":
167
- _.dispatchEvent({ type: j.DRAG_UPDATE, value: n.data });
168
- break;
178
+ // Remote Controller
179
+ // Receives App events
180
+ handleApp(n) {
181
+ switch (n.event) {
182
+ case "selectComponent":
183
+ k.dispatchEvent({ type: j.SELECT_DROPDOWN, value: n.data });
184
+ break;
185
+ case "draggableListUpdate":
186
+ k.dispatchEvent({ type: j.DRAG_UPDATE, value: n.data });
187
+ break;
188
+ }
169
189
  }
170
190
  }
171
191
  const In = () => {
172
192
  };
173
- class Oe extends Rt {
193
+ let ge;
194
+ class ot extends Rt {
174
195
  project;
175
196
  sheets = /* @__PURE__ */ new Map();
176
197
  sheetObjects = /* @__PURE__ */ new Map();
@@ -178,7 +199,7 @@ class Oe extends Rt {
178
199
  sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
179
200
  static rafDriver = null;
180
201
  init(n, a) {
181
- return this.project = Sa(n, a), this.project.ready;
202
+ return this.project = xa(n, a), this.project.ready;
182
203
  }
183
204
  dispose() {
184
205
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -215,22 +236,22 @@ class Oe extends Rt {
215
236
  e.search(`${n}_`) > -1 && this.unsubscribe(a);
216
237
  });
217
238
  }
218
- sheetObject(n, a, e, o) {
239
+ sheetObject(n, a, e, s) {
219
240
  if (this.project === void 0) {
220
241
  console.error("Theatre Project hasn't been created yet.");
221
242
  return;
222
243
  }
223
- const s = this.sheet(n);
224
- if (s === void 0)
244
+ const o = this.sheet(n);
245
+ if (o === void 0)
225
246
  return;
226
247
  const p = `${n}_${a}`;
227
248
  let c = this.sheetObjects.get(p);
228
- c !== void 0 ? c = s.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = s.object(a, e), this.sheetObjects.set(p, c), this.sheetObjectCBs.set(p, o !== void 0 ? o : In);
229
- const u = c.onValuesChange((d) => {
249
+ c !== void 0 ? c = o.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = o.object(a, e), this.sheetObjects.set(p, c), this.sheetObjectCBs.set(p, s !== void 0 ? s : In);
250
+ const u = c.onValuesChange((f) => {
230
251
  if (this.app.editor) {
231
- for (const b in d) {
232
- const E = d[b];
233
- typeof E == "object" && Aa(E) && (d[b] = {
252
+ for (const b in f) {
253
+ const E = f[b];
254
+ typeof E == "object" && _a(E) && (f[b] = {
234
255
  r: E.r,
235
256
  g: E.g,
236
257
  b: E.b,
@@ -243,12 +264,12 @@ class Oe extends Rt {
243
264
  data: {
244
265
  sheet: n,
245
266
  sheetObject: p,
246
- values: d
267
+ values: f
247
268
  }
248
269
  });
249
270
  }
250
271
  const v = this.sheetObjectCBs.get(p);
251
- v !== void 0 && v(d);
272
+ v !== void 0 && v(f);
252
273
  });
253
274
  return this.sheetObjectUnsubscribe.set(p, u), c;
254
275
  }
@@ -259,99 +280,89 @@ class Oe extends Rt {
259
280
  }
260
281
  const a = n.address.sheetId, e = n.address.objectKey;
261
282
  this.sheets.get(a)?.detachObject(e);
262
- const s = `${a}_${e}`, p = this.sheetObjectUnsubscribe.get(s);
263
- p !== void 0 && (this.sheetObjects.delete(s), this.sheetObjectCBs.delete(s), this.sheetObjectUnsubscribe.delete(s), p());
264
- }
265
- static getRafDriver() {
266
- return Oe.rafDriver || (Oe.rafDriver = wa()), Oe.rafDriver;
267
- }
268
- }
269
- let we;
270
- function La(t, n) {
271
- t.components.forEach((a) => {
272
- if (a instanceof Oe) {
273
- let e;
274
- const o = a;
275
- switch (n.event) {
276
- case "setSheet":
277
- e = o.sheets.get(n.data.sheet), e !== void 0 && (we = e, ct.setSelection([e]));
278
- break;
279
- case "setSheetObject":
280
- e = o.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), e !== void 0 && ct.setSelection([e]);
281
- break;
282
- case "updateSheetObject":
283
- e = o.sheets.get(n.data.sheet), e !== void 0 && e.sequence.pause(), e = o.sheetObjectCBs.get(n.data.sheetObject), e !== void 0 && e(n.data.values);
284
- break;
285
- case "updateTimeline":
286
- e = o.sheets.get(n.data.sheet), we !== void 0 && (we.sequence.position = n.data.position);
287
- break;
288
- }
283
+ const o = `${a}_${e}`, p = this.sheetObjectUnsubscribe.get(o);
284
+ p !== void 0 && (this.sheetObjects.delete(o), this.sheetObjectCBs.delete(o), this.sheetObjectUnsubscribe.delete(o), p());
285
+ }
286
+ // Remote Controller
287
+ // Receives App events
288
+ handleApp(n) {
289
+ let a;
290
+ switch (n.event) {
291
+ case "setSheet":
292
+ a = this.sheets.get(n.data.sheet), a !== void 0 && (ge = a, at.setSelection([a]));
293
+ break;
294
+ case "setSheetObject":
295
+ a = this.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), a !== void 0 && at.setSelection([a]);
296
+ break;
297
+ case "updateSheetObject":
298
+ a = this.sheets.get(n.data.sheet), a !== void 0 && a.sequence.pause(), a = this.sheetObjectCBs.get(n.data.sheetObject), a !== void 0 && a(n.data.values);
299
+ break;
300
+ case "updateTimeline":
301
+ a = this.sheets.get(n.data.sheet), ge !== void 0 && (ge.sequence.position = n.data.position);
302
+ break;
289
303
  }
290
- });
291
- }
292
- function Na(t) {
293
- if (t.editor) {
294
- let n;
295
- t.components.forEach((s) => {
296
- s instanceof Oe && (n = s);
297
- }), ct.ui.restore(), ct.onSelectionChange((s) => {
298
- s.length < 1 || s.forEach((p) => {
299
- let c = p.address.sheetId, u = "setSheet", d = {};
300
- switch (p.type) {
301
- case "Theatre_Sheet_PublicAPI":
302
- u = "setSheet", d = {
303
- sheet: p.address.sheetId
304
- }, we = n.sheets.get(p.address.sheetId);
305
- break;
306
- case "Theatre_SheetObject_PublicAPI":
307
- u = "setSheetObject", c += `_${p.address.objectKey}`, d = {
308
- id: c,
309
- sheet: p.address.sheetId,
310
- key: p.address.objectKey
311
- };
312
- break;
313
- }
314
- t.send({ event: u, target: "app", data: d });
315
- });
316
- });
317
- let a = 0;
318
- const e = () => {
319
- if (we !== void 0 && a !== we.sequence.position) {
320
- a = we.sequence.position;
321
- const s = we;
322
- t.send({
323
- event: "updateTimeline",
324
- target: "app",
325
- data: {
326
- position: a,
327
- sheet: s.address.sheetId
328
- }
329
- });
330
- }
331
- }, o = () => {
332
- e(), requestAnimationFrame(o);
333
- };
334
- e(), o();
335
- } else
336
- ct.ui.hide();
337
- }
338
- function Fa(t, n) {
339
- t.editor && t.components.forEach((a) => {
340
- if (a instanceof Oe) {
341
- const e = a;
304
+ }
305
+ // Receives Editor events
306
+ handleEditor(n) {
307
+ if (this.app.editor)
342
308
  switch (n.event) {
343
309
  case "playSheet":
344
- e.sheet(n.data.sheet)?.sequence.play(n.data.value);
310
+ this.sheet(n.data.sheet)?.sequence.play(n.data.value);
345
311
  break;
346
312
  case "pauseSheet":
347
- e.sheet(n.data.sheet)?.sequence.pause();
313
+ this.sheet(n.data.sheet)?.sequence.pause();
348
314
  break;
349
315
  }
350
- return;
351
- }
352
- });
316
+ }
317
+ // Runs only in-editor
318
+ handleEditorApp() {
319
+ if (this.app.editor) {
320
+ at.ui.restore(), at.onSelectionChange((s) => {
321
+ s.length < 1 || s.forEach((o) => {
322
+ let p = o.address.sheetId, c = "setSheet", u = {};
323
+ switch (o.type) {
324
+ case "Theatre_Sheet_PublicAPI":
325
+ c = "setSheet", u = {
326
+ sheet: o.address.sheetId
327
+ }, ge = this.sheets.get(o.address.sheetId);
328
+ break;
329
+ case "Theatre_SheetObject_PublicAPI":
330
+ c = "setSheetObject", p += `_${o.address.objectKey}`, u = {
331
+ id: p,
332
+ sheet: o.address.sheetId,
333
+ key: o.address.objectKey
334
+ }, ge = this.sheets.get(o.address.sheetId);
335
+ break;
336
+ }
337
+ this.app.send({ event: c, target: "app", data: u });
338
+ });
339
+ });
340
+ let n = -1;
341
+ const a = () => {
342
+ if (ot.getRafDriver().tick(performance.now()), ge !== void 0 && n !== ge.sequence.position) {
343
+ n = ge.sequence.position;
344
+ const s = ge;
345
+ this.app.send({
346
+ event: "updateTimeline",
347
+ target: "app",
348
+ data: {
349
+ position: n,
350
+ sheet: s.address.sheetId
351
+ }
352
+ });
353
+ }
354
+ }, e = () => {
355
+ a(), requestAnimationFrame(e);
356
+ };
357
+ a(), e();
358
+ } else
359
+ at.ui.hide();
360
+ }
361
+ static getRafDriver() {
362
+ return ot.rafDriver || (ot.rafDriver = Sa()), ot.rafDriver;
363
+ }
353
364
  }
354
- function Ba(t) {
365
+ function ja(t) {
355
366
  if (t.name === "cameras")
356
367
  return "camera";
357
368
  if (t.name === "interactive")
@@ -376,7 +387,7 @@ function Ln(t) {
376
387
  n.children.push(Ln(a));
377
388
  }), n;
378
389
  }
379
- function Ua(t) {
390
+ function Da(t) {
380
391
  const n = {};
381
392
  for (const a in t) {
382
393
  const e = t[a].value;
@@ -384,7 +395,7 @@ function Ua(t) {
384
395
  }
385
396
  return n;
386
397
  }
387
- function $a(t) {
398
+ function Ia(t) {
388
399
  switch (t) {
389
400
  case "blendSrcAlpha":
390
401
  case "blendDstAlpha":
@@ -396,28 +407,28 @@ function $a(t) {
396
407
  }
397
408
  return !1;
398
409
  }
399
- function qe(t) {
410
+ function He(t) {
400
411
  const n = {};
401
412
  for (const a in t) {
402
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || $a(a))
413
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ia(a))
403
414
  continue;
404
- const e = typeof t[a], o = t[a];
415
+ const e = typeof t[a], s = t[a];
405
416
  switch (e) {
406
417
  case "boolean":
407
418
  case "number":
408
419
  case "string":
409
- n[a] = o;
420
+ n[a] = s;
410
421
  break;
411
422
  case "object":
412
- if (o !== null)
413
- if (n[a] = o, o.isTexture)
414
- if (o instanceof dn) {
415
- const s = o.source.toJSON();
416
- n[a] = { src: s.url };
423
+ if (s !== null)
424
+ if (n[a] = s, s.isTexture)
425
+ if (s instanceof dn) {
426
+ const o = s.source.toJSON();
427
+ n[a] = { src: o.url };
417
428
  } else
418
- o instanceof Wn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
429
+ s instanceof Wn && (console.log("env map"), console.log(s.source.data), console.log(s.source.toJSON()), n[a] = { src: "" });
419
430
  else
420
- a === "uniforms" && (n[a] = Ua(n[a]));
431
+ a === "uniforms" && (n[a] = Da(n[a]));
421
432
  else
422
433
  n[a] = { src: "" };
423
434
  break;
@@ -450,30 +461,30 @@ function Bt(t) {
450
461
  if (a.search("mesh") > -1) {
451
462
  const e = t;
452
463
  if (Array.isArray(e.material)) {
453
- const o = [];
454
- e.material.forEach((s) => {
455
- o.push(qe(s));
456
- }), n.material = o;
464
+ const s = [];
465
+ e.material.forEach((o) => {
466
+ s.push(He(o));
467
+ }), n.material = s;
457
468
  } else
458
- n.material = qe(e.material);
469
+ n.material = He(e.material);
459
470
  } else if (a.search("points") > -1) {
460
471
  const e = t;
461
472
  if (Array.isArray(e.material)) {
462
- const o = [];
463
- e.material.forEach((s) => {
464
- o.push(qe(s));
465
- }), n.material = o;
473
+ const s = [];
474
+ e.material.forEach((o) => {
475
+ s.push(He(o));
476
+ }), n.material = s;
466
477
  } else
467
- n.material = qe(e.material);
478
+ n.material = He(e.material);
468
479
  } else if (a.search("line") > -1) {
469
480
  const e = t;
470
481
  if (Array.isArray(e.material)) {
471
- const o = [];
472
- e.material.forEach((s) => {
473
- o.push(qe(s));
474
- }), n.material = o;
482
+ const s = [];
483
+ e.material.forEach((o) => {
484
+ s.push(He(o));
485
+ }), n.material = s;
475
486
  } else
476
- n.material = qe(e.material);
487
+ n.material = He(e.material);
477
488
  } else
478
489
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
479
490
  fov: t.fov,
@@ -503,7 +514,7 @@ function Bt(t) {
503
514
  });
504
515
  return n;
505
516
  }
506
- function za(t, n) {
517
+ function La(t, n) {
507
518
  const a = n.split(".");
508
519
  switch (a.length) {
509
520
  case 1:
@@ -544,12 +555,12 @@ function Gt(t) {
544
555
  return new Promise((n, a) => {
545
556
  const e = new Image();
546
557
  e.onload = () => {
547
- const o = new dn(e);
548
- o.wrapS = Kt, o.wrapT = Kt, o.needsUpdate = !0, n(o);
558
+ const s = new dn(e);
559
+ s.wrapS = Kt, s.wrapT = Kt, s.needsUpdate = !0, n(s);
549
560
  }, e.onerror = a, e.src = t;
550
561
  });
551
562
  }
552
- class Ya extends Rt {
563
+ class Li extends Rt {
553
564
  scene = void 0;
554
565
  getObject(n) {
555
566
  this.app.debugEnabled && this.app.send({
@@ -566,7 +577,7 @@ class Ya extends Rt {
566
577
  data: a
567
578
  });
568
579
  }
569
- requestMethod(n, a, e, o) {
580
+ requestMethod(n, a, e, s) {
570
581
  this.app.send({
571
582
  event: "requestMethod",
572
583
  target: "app",
@@ -574,7 +585,7 @@ class Ya extends Rt {
574
585
  uuid: n,
575
586
  key: a,
576
587
  value: e,
577
- subitem: o
588
+ subitem: s
578
589
  }
579
590
  });
580
591
  }
@@ -603,7 +614,7 @@ class Ya extends Rt {
603
614
  setScene(n) {
604
615
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
605
616
  return;
606
- _a(), jn(this.scene);
617
+ Pa(), jn(this.scene);
607
618
  const a = Ln(this.scene);
608
619
  this.app.send({
609
620
  event: "setScene",
@@ -631,40 +642,43 @@ class Ya extends Rt {
631
642
  data: a
632
643
  });
633
644
  }
634
- }
635
- function Ga(t, n) {
636
- switch (n.event) {
637
- case "getObject":
638
- _.dispatchEvent({ type: j.GET_OBJECT, value: n.data });
639
- break;
640
- case "updateObject":
641
- _.dispatchEvent({ type: j.UPDATE_OBJECT, value: n.data });
642
- break;
643
- case "createTexture":
644
- _.dispatchEvent({ type: j.CREATE_TEXTURE, value: n.data });
645
- break;
646
- case "requestMethod":
647
- _.dispatchEvent({ type: j.REQUEST_METHOD, value: n.data });
648
- break;
645
+ // Remote Controller
646
+ // Receives App events
647
+ handleApp(n) {
648
+ switch (n.event) {
649
+ case "getObject":
650
+ k.dispatchEvent({ type: j.GET_OBJECT, value: n.data });
651
+ break;
652
+ case "updateObject":
653
+ k.dispatchEvent({ type: j.UPDATE_OBJECT, value: n.data });
654
+ break;
655
+ case "createTexture":
656
+ k.dispatchEvent({ type: j.CREATE_TEXTURE, value: n.data });
657
+ break;
658
+ case "requestMethod":
659
+ k.dispatchEvent({ type: j.REQUEST_METHOD, value: n.data });
660
+ break;
661
+ }
649
662
  }
650
- }
651
- function Va(t, n) {
652
- switch (n.event) {
653
- case "setObject":
654
- _.dispatchEvent({ type: j.SET_OBJECT, value: n.data });
655
- break;
656
- case "setScene":
657
- _.dispatchEvent({ type: j.SET_SCENE, value: n.data });
658
- break;
659
- case "addCamera":
660
- _.dispatchEvent({ type: j.ADD_CAMERA, value: n.data });
661
- break;
662
- case "removeCamera":
663
- _.dispatchEvent({ type: j.REMOVE_CAMERA, value: n.data });
664
- break;
663
+ // Receives Editor events
664
+ handleEditor(n) {
665
+ switch (n.event) {
666
+ case "setObject":
667
+ k.dispatchEvent({ type: j.SET_OBJECT, value: n.data });
668
+ break;
669
+ case "setScene":
670
+ k.dispatchEvent({ type: j.SET_SCENE, value: n.data });
671
+ break;
672
+ case "addCamera":
673
+ k.dispatchEvent({ type: j.ADD_CAMERA, value: n.data });
674
+ break;
675
+ case "removeCamera":
676
+ k.dispatchEvent({ type: j.REMOVE_CAMERA, value: n.data });
677
+ break;
678
+ }
665
679
  }
666
680
  }
667
- class Nn extends Rt {
681
+ class Ni extends Rt {
668
682
  bindCBs;
669
683
  buttonCBs;
670
684
  pane = void 0;
@@ -675,7 +689,7 @@ class Nn extends Rt {
675
689
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
676
690
  }
677
691
  createGUI() {
678
- this.pane = new Oa({ title: "GUI" }), this.pane.registerPlugin(Ma);
692
+ this.pane = new wa({ title: "GUI" }), this.pane.registerPlugin(Oa);
679
693
  }
680
694
  dispose() {
681
695
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
@@ -700,14 +714,14 @@ class Nn extends Rt {
700
714
  return `debug_${Math.max(this.appCallbacks, this.editorCallbacks)}`;
701
715
  }
702
716
  // Binding
703
- bind(n, a, e, o = void 0) {
704
- const s = this.bindID, p = e.onChange !== void 0 ? e.onChange : In;
705
- this.bindCBs.set(s, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (o !== void 0 ? o : this.pane).addBinding(n, a, e).on("change", (u) => {
717
+ bind(n, a, e, s = void 0) {
718
+ const o = this.bindID, p = e.onChange !== void 0 ? e.onChange : In;
719
+ this.bindCBs.set(o, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (s !== void 0 ? s : this.pane).addBinding(n, a, e).on("change", (u) => {
706
720
  this.app.send({
707
721
  event: "updateBind",
708
722
  target: "app",
709
723
  data: {
710
- id: s,
724
+ id: o,
711
725
  value: u.value
712
726
  }
713
727
  });
@@ -715,10 +729,10 @@ class Nn extends Rt {
715
729
  event: "bindObject",
716
730
  target: "app",
717
731
  data: {
718
- id: s,
732
+ id: o,
719
733
  name: a,
720
734
  params: e,
721
- parent: o
735
+ parent: s
722
736
  }
723
737
  }), this.appCallbacks++);
724
738
  }
@@ -728,20 +742,20 @@ class Nn extends Rt {
728
742
  }
729
743
  // Buttons
730
744
  button(n, a, e = void 0) {
731
- const o = this.bindID;
732
- this.buttonCBs.set(o, a), this.app.editor ? (this.pane === void 0 && this.createGUI(), (e !== void 0 ? e : this.pane).addButton({ title: n }).on("click", () => {
745
+ const s = this.bindID;
746
+ this.buttonCBs.set(s, a), this.app.editor ? (this.pane === void 0 && this.createGUI(), (e !== void 0 ? e : this.pane).addButton({ title: n }).on("click", () => {
733
747
  this.app.send({
734
748
  event: "clickButton",
735
749
  target: "app",
736
750
  data: {
737
- id: o
751
+ id: s
738
752
  }
739
753
  });
740
754
  }), this.editorCallbacks++) : (this.app.send({
741
755
  event: "addButton",
742
756
  target: "app",
743
757
  data: {
744
- id: o,
758
+ id: s,
745
759
  name: n,
746
760
  callback: a,
747
761
  parent: e
@@ -761,31 +775,27 @@ class Nn extends Rt {
761
775
  for (let a = n; a > -1; --a)
762
776
  this.inspectorFolder.remove(this.inspectorFolder.children[a]);
763
777
  }
764
- }
765
- function Ha(t, n) {
766
- t.components.forEach((a) => {
767
- if (a instanceof Nn) {
768
- const e = a;
769
- switch (n.event) {
770
- case "addFolder":
771
- e.addFolder(n.data.name, n.data.params, n.data.parent);
772
- break;
773
- case "bindObject":
774
- e.bind(n.data.name, n.data.params, n.data.parent);
775
- break;
776
- case "updateBind":
777
- e.triggerBind(n.data.id, n.data.value);
778
- break;
779
- case "addButton":
780
- e.button(n.data.name, n.data.callback, n.data.parent);
781
- break;
782
- case "clickButton":
783
- e.triggerButton(n.data.id);
784
- break;
785
- }
786
- return;
778
+ // Remote Controller
779
+ // Receives App events
780
+ handleApp(n) {
781
+ switch (n.event) {
782
+ case "addFolder":
783
+ this.addFolder(n.data.name, n.data.params, n.data.parent);
784
+ break;
785
+ case "bindObject":
786
+ this.bind(n.data.name, n.data.params, n.data.parent);
787
+ break;
788
+ case "updateBind":
789
+ this.triggerBind(n.data.id, n.data.value);
790
+ break;
791
+ case "addButton":
792
+ this.button(n.data.name, n.data.callback, n.data.parent);
793
+ break;
794
+ case "clickButton":
795
+ this.triggerButton(n.data.id);
796
+ break;
787
797
  }
788
- });
798
+ }
789
799
  }
790
800
  var Vt = { exports: {} }, it = {};
791
801
  /**
@@ -798,20 +808,20 @@ var Vt = { exports: {} }, it = {};
798
808
  * LICENSE file in the root directory of this source tree.
799
809
  */
800
810
  var Jt;
801
- function Wa() {
811
+ function Na() {
802
812
  if (Jt)
803
813
  return it;
804
814
  Jt = 1;
805
- var t = kn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
806
- function p(c, u, d) {
815
+ var t = Pn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
816
+ function p(c, u, f) {
807
817
  var v, b = {}, E = null, x = null;
808
- d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (x = u.ref);
818
+ f !== void 0 && (E = "" + f), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (x = u.ref);
809
819
  for (v in u)
810
- e.call(u, v) && !s.hasOwnProperty(v) && (b[v] = u[v]);
820
+ e.call(u, v) && !o.hasOwnProperty(v) && (b[v] = u[v]);
811
821
  if (c && c.defaultProps)
812
822
  for (v in u = c.defaultProps, u)
813
823
  b[v] === void 0 && (b[v] = u[v]);
814
- return { $$typeof: n, type: c, key: E, ref: x, props: b, _owner: o.current };
824
+ return { $$typeof: n, type: c, key: E, ref: x, props: b, _owner: s.current };
815
825
  }
816
826
  return it.Fragment = a, it.jsx = p, it.jsxs = p, it;
817
827
  }
@@ -826,13 +836,13 @@ var rt = {};
826
836
  * LICENSE file in the root directory of this source tree.
827
837
  */
828
838
  var Qt;
829
- function qa() {
839
+ function Fa() {
830
840
  return Qt || (Qt = 1, process.env.NODE_ENV !== "production" && function() {
831
- var t = kn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, k = "@@iterator";
832
- function H(i) {
841
+ var t = Pn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
842
+ function W(i) {
833
843
  if (i === null || typeof i != "object")
834
844
  return null;
835
- var h = M && i[M] || i[k];
845
+ var h = M && i[M] || i[P];
836
846
  return typeof h == "function" ? h : null;
837
847
  }
838
848
  var B = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -853,10 +863,10 @@ function qa() {
853
863
  F.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, F);
854
864
  }
855
865
  }
856
- var Ee = !1, le = !1, se = !1, f = !1, m = !1, w;
866
+ var Ce = !1, le = !1, oe = !1, d = !1, m = !1, w;
857
867
  w = Symbol.for("react.module.reference");
858
- function P(i) {
859
- return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || m || i === o || i === d || i === v || f || i === x || Ee || le || se || typeof i == "object" && i !== null && (i.$$typeof === E || i.$$typeof === b || i.$$typeof === p || i.$$typeof === c || i.$$typeof === u || // This needs to include all possible module reference object
868
+ function _(i) {
869
+ return !!(typeof i == "string" || typeof i == "function" || i === e || i === o || m || i === s || i === f || i === v || d || i === x || Ce || le || oe || typeof i == "object" && i !== null && (i.$$typeof === E || i.$$typeof === b || i.$$typeof === p || i.$$typeof === c || i.$$typeof === u || // This needs to include all possible module reference object
860
870
  // types supported by any Flight configuration anywhere since
861
871
  // we don't know which Flight build this will end up being used
862
872
  // with.
@@ -884,11 +894,11 @@ function qa() {
884
894
  return "Fragment";
885
895
  case a:
886
896
  return "Portal";
887
- case s:
888
- return "Profiler";
889
897
  case o:
898
+ return "Profiler";
899
+ case s:
890
900
  return "StrictMode";
891
- case d:
901
+ case f:
892
902
  return "Suspense";
893
903
  case v:
894
904
  return "SuspenseList";
@@ -917,18 +927,18 @@ function qa() {
917
927
  }
918
928
  return null;
919
929
  }
920
- var I = Object.assign, W = 0, q, T, N, J, me, Ce, ft;
921
- function Xe() {
930
+ var I = Object.assign, H = 0, q, T, N, J, me, xe, ht;
931
+ function Ke() {
922
932
  }
923
- Xe.__reactDisabledLog = !0;
933
+ Ke.__reactDisabledLog = !0;
924
934
  function At() {
925
935
  {
926
- if (W === 0) {
927
- q = console.log, T = console.info, N = console.warn, J = console.error, me = console.group, Ce = console.groupCollapsed, ft = console.groupEnd;
936
+ if (H === 0) {
937
+ q = console.log, T = console.info, N = console.warn, J = console.error, me = console.group, xe = console.groupCollapsed, ht = console.groupEnd;
928
938
  var i = {
929
939
  configurable: !0,
930
940
  enumerable: !0,
931
- value: Xe,
941
+ value: Ke,
932
942
  writable: !0
933
943
  };
934
944
  Object.defineProperties(console, {
@@ -941,12 +951,12 @@ function qa() {
941
951
  groupEnd: i
942
952
  });
943
953
  }
944
- W++;
954
+ H++;
945
955
  }
946
956
  }
947
- function kt() {
957
+ function Pt() {
948
958
  {
949
- if (W--, W === 0) {
959
+ if (H--, H === 0) {
950
960
  var i = {
951
961
  configurable: !0,
952
962
  enumerable: !0,
@@ -969,49 +979,49 @@ function qa() {
969
979
  value: me
970
980
  }),
971
981
  groupCollapsed: I({}, i, {
972
- value: Ce
982
+ value: xe
973
983
  }),
974
984
  groupEnd: I({}, i, {
975
- value: ft
985
+ value: ht
976
986
  })
977
987
  });
978
988
  }
979
- W < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
989
+ H < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
980
990
  }
981
991
  }
982
- var Ze = B.ReactCurrentDispatcher, Je;
983
- function ze(i, h, g) {
992
+ var Xe = B.ReactCurrentDispatcher, Ze;
993
+ function $e(i, h, g) {
984
994
  {
985
- if (Je === void 0)
995
+ if (Ze === void 0)
986
996
  try {
987
997
  throw Error();
988
998
  } catch (D) {
989
999
  var C = D.stack.trim().match(/\n( *(at )?)/);
990
- Je = C && C[1] || "";
1000
+ Ze = C && C[1] || "";
991
1001
  }
992
1002
  return `
993
- ` + Je + i;
1003
+ ` + Ze + i;
994
1004
  }
995
1005
  }
996
- var Ye = !1, Me;
1006
+ var ze = !1, Oe;
997
1007
  {
998
- var ht = typeof WeakMap == "function" ? WeakMap : Map;
999
- Me = new ht();
1008
+ var ft = typeof WeakMap == "function" ? WeakMap : Map;
1009
+ Oe = new ft();
1000
1010
  }
1001
1011
  function pt(i, h) {
1002
- if (!i || Ye)
1012
+ if (!i || ze)
1003
1013
  return "";
1004
1014
  {
1005
- var g = Me.get(i);
1015
+ var g = Oe.get(i);
1006
1016
  if (g !== void 0)
1007
1017
  return g;
1008
1018
  }
1009
1019
  var C;
1010
- Ye = !0;
1020
+ ze = !0;
1011
1021
  var D = Error.prepareStackTrace;
1012
1022
  Error.prepareStackTrace = void 0;
1013
1023
  var F;
1014
- F = Ze.current, Ze.current = null, At();
1024
+ F = Xe.current, Xe.current = null, At();
1015
1025
  try {
1016
1026
  if (h) {
1017
1027
  var A = function() {
@@ -1055,67 +1065,67 @@ function qa() {
1055
1065
  if (Z !== 1 || Q !== 1)
1056
1066
  do
1057
1067
  if (Z--, Q--, Q < 0 || R[Z] !== ce[Q]) {
1058
- var he = `
1068
+ var fe = `
1059
1069
  ` + R[Z].replace(" at new ", " at ");
1060
- return i.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", i.displayName)), typeof i == "function" && Me.set(i, he), he;
1070
+ return i.displayName && fe.includes("<anonymous>") && (fe = fe.replace("<anonymous>", i.displayName)), typeof i == "function" && Oe.set(i, fe), fe;
1061
1071
  }
1062
1072
  while (Z >= 1 && Q >= 0);
1063
1073
  break;
1064
1074
  }
1065
1075
  }
1066
1076
  } finally {
1067
- Ye = !1, Ze.current = F, kt(), Error.prepareStackTrace = D;
1077
+ ze = !1, Xe.current = F, Pt(), Error.prepareStackTrace = D;
1068
1078
  }
1069
- var Ve = i ? i.displayName || i.name : "", qt = Ve ? ze(Ve) : "";
1070
- return typeof i == "function" && Me.set(i, qt), qt;
1079
+ var Ge = i ? i.displayName || i.name : "", qt = Ge ? $e(Ge) : "";
1080
+ return typeof i == "function" && Oe.set(i, qt), qt;
1071
1081
  }
1072
- function _t(i, h, g) {
1082
+ function kt(i, h, g) {
1073
1083
  return pt(i, !1);
1074
1084
  }
1075
1085
  function mt(i) {
1076
1086
  var h = i.prototype;
1077
1087
  return !!(h && h.isReactComponent);
1078
1088
  }
1079
- function Te(i, h, g) {
1089
+ function Me(i, h, g) {
1080
1090
  if (i == null)
1081
1091
  return "";
1082
1092
  if (typeof i == "function")
1083
1093
  return pt(i, mt(i));
1084
1094
  if (typeof i == "string")
1085
- return ze(i);
1095
+ return $e(i);
1086
1096
  switch (i) {
1087
- case d:
1088
- return ze("Suspense");
1097
+ case f:
1098
+ return $e("Suspense");
1089
1099
  case v:
1090
- return ze("SuspenseList");
1100
+ return $e("SuspenseList");
1091
1101
  }
1092
1102
  if (typeof i == "object")
1093
1103
  switch (i.$$typeof) {
1094
1104
  case u:
1095
- return _t(i.render);
1105
+ return kt(i.render);
1096
1106
  case b:
1097
- return Te(i.type, h, g);
1107
+ return Me(i.type, h, g);
1098
1108
  case E: {
1099
1109
  var C = i, D = C._payload, F = C._init;
1100
1110
  try {
1101
- return Te(F(D), h, g);
1111
+ return Me(F(D), h, g);
1102
1112
  } catch {
1103
1113
  }
1104
1114
  }
1105
1115
  }
1106
1116
  return "";
1107
1117
  }
1108
- var Re = Object.prototype.hasOwnProperty, vt = {}, gt = B.ReactDebugCurrentFrame;
1109
- function Pe(i) {
1118
+ var Te = Object.prototype.hasOwnProperty, vt = {}, gt = B.ReactDebugCurrentFrame;
1119
+ function Re(i) {
1110
1120
  if (i) {
1111
- var h = i._owner, g = Te(i.type, i._source, h ? h.type : null);
1121
+ var h = i._owner, g = Me(i.type, i._source, h ? h.type : null);
1112
1122
  gt.setExtraStackFrame(g);
1113
1123
  } else
1114
1124
  gt.setExtraStackFrame(null);
1115
1125
  }
1116
- function Qe(i, h, g, C, D) {
1126
+ function Je(i, h, g, C, D) {
1117
1127
  {
1118
- var F = Function.call.bind(Re);
1128
+ var F = Function.call.bind(Te);
1119
1129
  for (var A in i)
1120
1130
  if (F(i, A)) {
1121
1131
  var R = void 0;
@@ -1128,13 +1138,13 @@ function qa() {
1128
1138
  } catch (Z) {
1129
1139
  R = Z;
1130
1140
  }
1131
- R && !(R instanceof Error) && (Pe(D), 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).", C || "React class", g, A, typeof R), Pe(null)), R instanceof Error && !(R.message in vt) && (vt[R.message] = !0, Pe(D), S("Failed %s type: %s", g, R.message), Pe(null));
1141
+ R && !(R instanceof Error) && (Re(D), 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).", C || "React class", g, A, typeof R), Re(null)), R instanceof Error && !(R.message in vt) && (vt[R.message] = !0, Re(D), S("Failed %s type: %s", g, R.message), Re(null));
1132
1142
  }
1133
1143
  }
1134
1144
  }
1135
- var Ae = Array.isArray;
1136
- function et(i) {
1137
- return Ae(i);
1145
+ var _e = Array.isArray;
1146
+ function Qe(i) {
1147
+ return _e(i);
1138
1148
  }
1139
1149
  function jt(i) {
1140
1150
  {
@@ -1156,15 +1166,15 @@ function qa() {
1156
1166
  if (bt(i))
1157
1167
  return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", jt(i)), yt(i);
1158
1168
  }
1159
- var xe = B.ReactCurrentOwner, tt = {
1169
+ var Se = B.ReactCurrentOwner, et = {
1160
1170
  key: !0,
1161
1171
  ref: !0,
1162
1172
  __self: !0,
1163
1173
  __source: !0
1164
- }, nt, Ct, Ge;
1165
- Ge = {};
1174
+ }, tt, Ct, Ye;
1175
+ Ye = {};
1166
1176
  function Dt(i) {
1167
- if (Re.call(i, "ref")) {
1177
+ if (Te.call(i, "ref")) {
1168
1178
  var h = Object.getOwnPropertyDescriptor(i, "ref").get;
1169
1179
  if (h && h.isReactWarning)
1170
1180
  return !1;
@@ -1172,7 +1182,7 @@ function qa() {
1172
1182
  return i.ref !== void 0;
1173
1183
  }
1174
1184
  function It(i) {
1175
- if (Re.call(i, "key")) {
1185
+ if (Te.call(i, "key")) {
1176
1186
  var h = Object.getOwnPropertyDescriptor(i, "key").get;
1177
1187
  if (h && h.isReactWarning)
1178
1188
  return !1;
@@ -1180,15 +1190,15 @@ function qa() {
1180
1190
  return i.key !== void 0;
1181
1191
  }
1182
1192
  function xt(i, h) {
1183
- if (typeof i.ref == "string" && xe.current && h && xe.current.stateNode !== h) {
1184
- var g = $(xe.current.type);
1185
- Ge[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', $(xe.current.type), i.ref), Ge[g] = !0);
1193
+ if (typeof i.ref == "string" && Se.current && h && Se.current.stateNode !== h) {
1194
+ var g = $(Se.current.type);
1195
+ Ye[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', $(Se.current.type), i.ref), Ye[g] = !0);
1186
1196
  }
1187
1197
  }
1188
- function Se(i, h) {
1198
+ function we(i, h) {
1189
1199
  {
1190
1200
  var g = function() {
1191
- nt || (nt = !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));
1201
+ tt || (tt = !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));
1192
1202
  };
1193
1203
  g.isReactWarning = !0, Object.defineProperty(i, "key", {
1194
1204
  get: g,
@@ -1196,7 +1206,7 @@ function qa() {
1196
1206
  });
1197
1207
  }
1198
1208
  }
1199
- function Wt(i, h) {
1209
+ function Ht(i, h) {
1200
1210
  {
1201
1211
  var g = function() {
1202
1212
  Ct || (Ct = !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));
@@ -1241,7 +1251,7 @@ function qa() {
1241
1251
  var F, A = {}, R = null, ce = null;
1242
1252
  g !== void 0 && (Et(g), R = "" + g), It(h) && (Et(h.key), R = "" + h.key), Dt(h) && (ce = h.ref, xt(h, D));
1243
1253
  for (F in h)
1244
- Re.call(h, F) && !tt.hasOwnProperty(F) && (A[F] = h[F]);
1254
+ Te.call(h, F) && !et.hasOwnProperty(F) && (A[F] = h[F]);
1245
1255
  if (i && i.defaultProps) {
1246
1256
  var Z = i.defaultProps;
1247
1257
  for (F in Z)
@@ -1249,15 +1259,15 @@ function qa() {
1249
1259
  }
1250
1260
  if (R || ce) {
1251
1261
  var Q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1252
- R && Se(A, Q), ce && Wt(A, Q);
1262
+ R && we(A, Q), ce && Ht(A, Q);
1253
1263
  }
1254
- return r(i, R, ce, D, C, xe.current, A);
1264
+ return r(i, R, ce, D, C, Se.current, A);
1255
1265
  }
1256
1266
  }
1257
1267
  var O = B.ReactCurrentOwner, L = B.ReactDebugCurrentFrame;
1258
1268
  function K(i) {
1259
1269
  if (i) {
1260
- var h = i._owner, g = Te(i.type, i._source, h ? h.type : null);
1270
+ var h = i._owner, g = Me(i.type, i._source, h ? h.type : null);
1261
1271
  L.setExtraStackFrame(g);
1262
1272
  } else
1263
1273
  L.setExtraStackFrame(null);
@@ -1290,7 +1300,7 @@ Check your code at ` + h + ":" + g + ".";
1290
1300
  return "";
1291
1301
  }
1292
1302
  }
1293
- var at = {};
1303
+ var nt = {};
1294
1304
  function pe(i) {
1295
1305
  {
1296
1306
  var h = Lt();
@@ -1303,39 +1313,39 @@ Check the top-level render call using <` + g + ">.");
1303
1313
  return h;
1304
1314
  }
1305
1315
  }
1306
- function fe(i, h) {
1316
+ function he(i, h) {
1307
1317
  {
1308
1318
  if (!i._store || i._store.validated || i.key != null)
1309
1319
  return;
1310
1320
  i._store.validated = !0;
1311
1321
  var g = pe(h);
1312
- if (at[g])
1322
+ if (nt[g])
1313
1323
  return;
1314
- at[g] = !0;
1324
+ nt[g] = !0;
1315
1325
  var C = "";
1316
1326
  i && i._owner && i._owner !== O.current && (C = " It was passed a child from " + $(i._owner.type) + "."), K(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, C), K(null);
1317
1327
  }
1318
1328
  }
1319
- function ke(i, h) {
1329
+ function Ae(i, h) {
1320
1330
  {
1321
1331
  if (typeof i != "object")
1322
1332
  return;
1323
- if (et(i))
1333
+ if (Qe(i))
1324
1334
  for (var g = 0; g < i.length; g++) {
1325
1335
  var C = i[g];
1326
- ae(C) && fe(C, h);
1336
+ ae(C) && he(C, h);
1327
1337
  }
1328
1338
  else if (ae(i))
1329
1339
  i._store && (i._store.validated = !0);
1330
1340
  else if (i) {
1331
- var D = H(i);
1341
+ var D = W(i);
1332
1342
  if (typeof D == "function" && D !== i.entries)
1333
1343
  for (var F = D.call(i), A; !(A = F.next()).done; )
1334
- ae(A.value) && fe(A.value, h);
1344
+ ae(A.value) && he(A.value, h);
1335
1345
  }
1336
1346
  }
1337
1347
  }
1338
- function _e(i) {
1348
+ function Pe(i) {
1339
1349
  {
1340
1350
  var h = i.type;
1341
1351
  if (h == null || typeof h == "string")
@@ -1351,7 +1361,7 @@ Check the top-level render call using <` + g + ">.");
1351
1361
  return;
1352
1362
  if (g) {
1353
1363
  var C = $(h);
1354
- Qe(g, i.props, "prop", C, i);
1364
+ Je(g, i.props, "prop", C, i);
1355
1365
  } else if (h.PropTypes !== void 0 && !de) {
1356
1366
  de = !0;
1357
1367
  var D = $(h);
@@ -1360,7 +1370,7 @@ Check the top-level render call using <` + g + ">.");
1360
1370
  typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1361
1371
  }
1362
1372
  }
1363
- function je(i) {
1373
+ function ke(i) {
1364
1374
  {
1365
1375
  for (var h = Object.keys(i.props), g = 0; g < h.length; g++) {
1366
1376
  var C = h[g];
@@ -1372,56 +1382,56 @@ Check the top-level render call using <` + g + ">.");
1372
1382
  i.ref !== null && (K(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
1373
1383
  }
1374
1384
  }
1375
- function De(i, h, g, C, D, F) {
1385
+ function je(i, h, g, C, D, F) {
1376
1386
  {
1377
- var A = P(i);
1387
+ var A = _(i);
1378
1388
  if (!A) {
1379
1389
  var R = "";
1380
1390
  (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.");
1381
1391
  var ce = Nt(D);
1382
1392
  ce ? R += ce : R += Lt();
1383
1393
  var Z;
1384
- i === null ? Z = "null" : et(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + ($(i.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : Z = 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", Z, R);
1394
+ i === null ? Z = "null" : Qe(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + ($(i.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : Z = 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", Z, R);
1385
1395
  }
1386
1396
  var Q = y(i, h, g, D, F);
1387
1397
  if (Q == null)
1388
1398
  return Q;
1389
1399
  if (A) {
1390
- var he = h.children;
1391
- if (he !== void 0)
1400
+ var fe = h.children;
1401
+ if (fe !== void 0)
1392
1402
  if (C)
1393
- if (et(he)) {
1394
- for (var Ve = 0; Ve < he.length; Ve++)
1395
- ke(he[Ve], i);
1396
- Object.freeze && Object.freeze(he);
1403
+ if (Qe(fe)) {
1404
+ for (var Ge = 0; Ge < fe.length; Ge++)
1405
+ Ae(fe[Ge], i);
1406
+ Object.freeze && Object.freeze(fe);
1397
1407
  } else
1398
1408
  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.");
1399
1409
  else
1400
- ke(he, i);
1410
+ Ae(fe, i);
1401
1411
  }
1402
- return i === e ? je(Q) : _e(Q), Q;
1412
+ return i === e ? ke(Q) : Pe(Q), Q;
1403
1413
  }
1404
1414
  }
1405
- function zn(i, h, g) {
1406
- return De(i, h, g, !0);
1415
+ function $n(i, h, g) {
1416
+ return je(i, h, g, !0);
1407
1417
  }
1408
- function Yn(i, h, g) {
1409
- return De(i, h, g, !1);
1418
+ function zn(i, h, g) {
1419
+ return je(i, h, g, !1);
1410
1420
  }
1411
- var Gn = Yn, Vn = zn;
1412
- rt.Fragment = e, rt.jsx = Gn, rt.jsxs = Vn;
1421
+ var Yn = zn, Gn = $n;
1422
+ rt.Fragment = e, rt.jsx = Yn, rt.jsxs = Gn;
1413
1423
  }()), rt;
1414
1424
  }
1415
- process.env.NODE_ENV === "production" ? Vt.exports = Wa() : Vt.exports = qa();
1425
+ process.env.NODE_ENV === "production" ? Vt.exports = Na() : Vt.exports = Fa();
1416
1426
  var l = Vt.exports;
1417
- function Fn(t) {
1427
+ function Nn(t) {
1418
1428
  return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1419
1429
  }
1420
- const Ka = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1430
+ const Ba = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1421
1431
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1422
1432
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1423
1433
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1424
- ] }), Xa = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1434
+ ] }), Ua = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1425
1435
  "path",
1426
1436
  {
1427
1437
  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
@@ -1429,45 +1439,45 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1429
1439
  C11,8.22,10.74,8,10.43,8z`
1430
1440
  }
1431
1441
  ) });
1432
- function Za(t) {
1433
- return /* @__PURE__ */ l.jsx(_n.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1434
- Xa,
1442
+ function $a(t) {
1443
+ return /* @__PURE__ */ l.jsx(kn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1444
+ Ua,
1435
1445
  /* @__PURE__ */ l.jsx("span", { children: t.title }),
1436
1446
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1437
1447
  t.onDelete(t.index);
1438
- }, children: Ka })
1448
+ }, children: Ba })
1439
1449
  ] }) }, t.title);
1440
1450
  }
1441
- function Ja(t) {
1442
- const [n, a] = oe(!1), [e, o] = oe(t.options), s = (d) => {
1443
- t.onDragComplete(d), o(d);
1444
- }, p = (d) => {
1451
+ function za(t) {
1452
+ const [n, a] = se(!1), [e, s] = se(t.options), o = (f) => {
1453
+ t.onDragComplete(f), s(f);
1454
+ }, p = (f) => {
1445
1455
  const v = [...e];
1446
- v.splice(d, 1), s(v);
1456
+ v.splice(f, 1), o(v);
1447
1457
  }, c = [];
1448
- e.forEach((d, v) => {
1449
- c.push(/* @__PURE__ */ l.jsx(Za, { index: v, title: d, onDelete: p }, d));
1458
+ e.forEach((f, v) => {
1459
+ c.push(/* @__PURE__ */ l.jsx($a, { index: v, title: f, onDelete: p }, f));
1450
1460
  });
1451
1461
  let u = "dropdown draggable";
1452
1462
  return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1453
- /* @__PURE__ */ l.jsx(Fn, { title: t.title }),
1454
- /* @__PURE__ */ l.jsx(_n.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: c })
1463
+ /* @__PURE__ */ l.jsx(Nn, { title: t.title }),
1464
+ /* @__PURE__ */ l.jsx(kn.Group, { axis: "y", values: e, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: c })
1455
1465
  ] });
1456
1466
  }
1457
- function Qa(t) {
1458
- const [n, a] = oe(!1), e = [];
1459
- t.options.map((s, p) => {
1460
- t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(ei, { option: s }, p));
1467
+ function Ya(t) {
1468
+ const [n, a] = se(!1), e = [];
1469
+ t.options.map((o, p) => {
1470
+ t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ga, { option: o }, p));
1461
1471
  });
1462
- let o = "dropdown";
1463
- return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */ l.jsxs(
1472
+ let s = "dropdown";
1473
+ return t.subdropdown && (s += " subdropdown"), /* @__PURE__ */ l.jsxs(
1464
1474
  "div",
1465
1475
  {
1466
- className: o,
1476
+ className: s,
1467
1477
  onMouseEnter: () => a(!0),
1468
1478
  onMouseLeave: () => a(!1),
1469
1479
  children: [
1470
- /* @__PURE__ */ l.jsx(Fn, { title: t.title }),
1480
+ /* @__PURE__ */ l.jsx(Nn, { title: t.title }),
1471
1481
  /* @__PURE__ */ l.jsx(
1472
1482
  "ul",
1473
1483
  {
@@ -1479,26 +1489,26 @@ function Qa(t) {
1479
1489
  }
1480
1490
  );
1481
1491
  }
1482
- function ei(t) {
1483
- const { option: n } = t, [a, e] = oe("");
1484
- let o;
1492
+ function Ga(t) {
1493
+ const { option: n } = t, [a, e] = se("");
1494
+ let s;
1485
1495
  switch (n.type) {
1486
1496
  case "draggable":
1487
- o = /* @__PURE__ */ l.jsx(
1488
- Ja,
1497
+ s = /* @__PURE__ */ l.jsx(
1498
+ za,
1489
1499
  {
1490
1500
  title: n.title,
1491
1501
  options: n.value,
1492
- onDragComplete: (s) => {
1493
- n.onDragComplete !== void 0 && n.onDragComplete(s);
1502
+ onDragComplete: (o) => {
1503
+ n.onDragComplete !== void 0 && n.onDragComplete(o);
1494
1504
  },
1495
1505
  subdropdown: !0
1496
1506
  }
1497
1507
  );
1498
1508
  break;
1499
1509
  case "dropdown":
1500
- o = /* @__PURE__ */ l.jsx(
1501
- Qa,
1510
+ s = /* @__PURE__ */ l.jsx(
1511
+ Ya,
1502
1512
  {
1503
1513
  title: n.title,
1504
1514
  options: n.value,
@@ -1508,7 +1518,7 @@ function ei(t) {
1508
1518
  );
1509
1519
  break;
1510
1520
  case "option":
1511
- o = /* @__PURE__ */ l.jsx(
1521
+ s = /* @__PURE__ */ l.jsx(
1512
1522
  "button",
1513
1523
  {
1514
1524
  onClick: () => {
@@ -1519,32 +1529,32 @@ function ei(t) {
1519
1529
  );
1520
1530
  break;
1521
1531
  }
1522
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, Pa());
1532
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: s }, Ra());
1523
1533
  }
1524
- function Vi(t) {
1525
- const n = [], a = [];
1526
- t.components.forEach((s) => {
1527
- s instanceof Da ? n.push(Ia) : s instanceof Oe ? (n.push(La), a.push(Fa), Na(t)) : s instanceof Ya ? (n.push(Ga), a.push(Va)) : s instanceof Nn && n.push(Ha);
1528
- });
1529
- function e(s) {
1530
- switch (n.forEach((p) => p(t, s)), s.event) {
1534
+ function Fi(t) {
1535
+ function n(e) {
1536
+ switch (t.components.forEach((s) => {
1537
+ s.handleApp(e);
1538
+ }), e.event) {
1531
1539
  case "custom":
1532
- _.dispatchEvent({ type: j.CUSTOM, value: s.data });
1540
+ k.dispatchEvent({ type: j.CUSTOM, value: e.data });
1533
1541
  break;
1534
1542
  }
1535
1543
  }
1536
- function o(s) {
1537
- switch (a.forEach((p) => p(t, s)), s.event) {
1544
+ function a(e) {
1545
+ switch (t.components.forEach((s) => {
1546
+ s.handleEditor(e);
1547
+ }), e.event) {
1538
1548
  case "custom":
1539
- _.dispatchEvent({ type: j.CUSTOM, value: s.data });
1549
+ k.dispatchEvent({ type: j.CUSTOM, value: e.data });
1540
1550
  break;
1541
1551
  }
1542
1552
  }
1543
- t.listen = (s) => {
1544
- s.target === "editor" ? o(s) : e(s);
1553
+ t.listen = (e) => {
1554
+ e.target === "editor" ? a(e) : n(e);
1545
1555
  };
1546
1556
  }
1547
- const ti = `out vec3 worldPosition;
1557
+ const Va = `out vec3 worldPosition;
1548
1558
  uniform float uDistance;
1549
1559
 
1550
1560
  void main() {
@@ -1553,7 +1563,7 @@ void main() {
1553
1563
  worldPosition.xz += cameraPosition.xz;
1554
1564
 
1555
1565
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
1556
- }`, ni = `out vec4 fragColor;
1566
+ }`, Wa = `out vec4 fragColor;
1557
1567
  in vec3 worldPosition;
1558
1568
 
1559
1569
  uniform float uDivisions;
@@ -1621,14 +1631,14 @@ void main() {
1621
1631
 
1622
1632
  if (fragColor.a <= 0.0) discard;
1623
1633
  }`;
1624
- class ai extends fn {
1634
+ class Ha extends hn {
1625
1635
  constructor(n) {
1626
1636
  super({
1627
1637
  extensions: {
1628
1638
  derivatives: !0
1629
1639
  },
1630
- glslVersion: qn,
1631
- side: hn,
1640
+ glslVersion: Hn,
1641
+ side: fn,
1632
1642
  transparent: !0,
1633
1643
  uniforms: {
1634
1644
  uScale: {
@@ -1650,24 +1660,24 @@ class ai extends fn {
1650
1660
  value: n?.gridOpacity !== void 0 ? n?.gridOpacity : 0.25
1651
1661
  }
1652
1662
  },
1653
- vertexShader: ti,
1654
- fragmentShader: ni,
1663
+ vertexShader: Va,
1664
+ fragmentShader: Wa,
1655
1665
  name: "InfiniteGrid",
1656
1666
  depthWrite: !1
1657
1667
  });
1658
1668
  }
1659
1669
  }
1660
- class ii extends Kn {
1670
+ class qa extends qn {
1661
1671
  gridMaterial;
1662
1672
  constructor() {
1663
- const n = new ai();
1664
- super(new Xn(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1673
+ const n = new Ha();
1674
+ super(new Kn(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1665
1675
  }
1666
1676
  update() {
1667
1677
  this.gridMaterial.needsUpdate = !0;
1668
1678
  }
1669
1679
  }
1670
- const ri = `#include <common>
1680
+ const Ka = `#include <common>
1671
1681
  #include <batching_pars_vertex>
1672
1682
  #include <uv_pars_vertex>
1673
1683
  #include <color_pars_vertex>
@@ -1697,7 +1707,7 @@ void main() {
1697
1707
  #include <logdepthbuf_vertex>
1698
1708
  #include <clipping_planes_vertex>
1699
1709
  #include <worldpos_vertex>
1700
- }`, oi = `
1710
+ }`, Xa = `
1701
1711
  #include <common>
1702
1712
  #include <uv_pars_fragment>
1703
1713
  #include <clipping_planes_pars_fragment>
@@ -1706,27 +1716,27 @@ void main() {
1706
1716
  #include <clipping_planes_fragment>
1707
1717
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
1708
1718
  }`;
1709
- class si extends fn {
1719
+ class Za extends hn {
1710
1720
  constructor() {
1711
1721
  super({
1712
1722
  defines: {
1713
1723
  USE_UV: ""
1714
1724
  },
1715
- vertexShader: ri,
1716
- fragmentShader: oi
1725
+ vertexShader: Ka,
1726
+ fragmentShader: Xa
1717
1727
  });
1718
1728
  }
1719
1729
  }
1720
- function Ht(t) {
1721
- const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1730
+ function Wt(t) {
1731
+ const [n, a] = se(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1722
1732
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1723
1733
  /* @__PURE__ */ l.jsxs(
1724
1734
  "button",
1725
1735
  {
1726
1736
  className: "toggle",
1727
1737
  onClick: () => {
1728
- const o = !n;
1729
- t.onToggle !== void 0 && t.onToggle(o), a(o);
1738
+ const s = !n;
1739
+ t.onToggle !== void 0 && t.onToggle(s), a(s);
1730
1740
  },
1731
1741
  children: [
1732
1742
  /* @__PURE__ */ l.jsx(
@@ -1744,10 +1754,10 @@ function Ht(t) {
1744
1754
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1745
1755
  ] });
1746
1756
  }
1747
- function Bn(t) {
1748
- const [n, a] = oe(!1), e = t.child.children.length > 0, o = [];
1749
- return t.child.children.length > 0 && t.child.children.map((s) => {
1750
- o.push(/* @__PURE__ */ l.jsx(Bn, { child: s, three: t.three }, Math.random()));
1757
+ function Fn(t) {
1758
+ const [n, a] = se(!1), e = t.child.children.length > 0, s = [];
1759
+ return t.child.children.length > 0 && t.child.children.map((o) => {
1760
+ s.push(/* @__PURE__ */ l.jsx(Fn, { child: o, three: t.three }, Math.random()));
1751
1761
  }), /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1752
1762
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1753
1763
  e ? /* @__PURE__ */ l.jsx(
@@ -1775,29 +1785,29 @@ function Bn(t) {
1775
1785
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1776
1786
  }
1777
1787
  ),
1778
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Ba(t.child)}` })
1788
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${ja(t.child)}` })
1779
1789
  ] }),
1780
- /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
1790
+ /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: s }) })
1781
1791
  ] }, Math.random());
1782
1792
  }
1783
- function ci(t) {
1793
+ function Ja(t) {
1784
1794
  const n = [];
1785
1795
  return t.child.children.map((a) => {
1786
- n.push(/* @__PURE__ */ l.jsx(Bn, { child: a, three: t.three }, Math.random()));
1796
+ n.push(/* @__PURE__ */ l.jsx(Fn, { child: a, three: t.three }, Math.random()));
1787
1797
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1788
1798
  }
1789
- const li = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1790
- function ui(t) {
1799
+ const Qa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1800
+ function ei(t) {
1791
1801
  return "items" in t;
1792
1802
  }
1793
- function Ue(t) {
1803
+ function Be(t) {
1794
1804
  const n = [];
1795
1805
  return t.items.forEach((a) => {
1796
- ui(a) ? n.push(
1797
- /* @__PURE__ */ l.jsx(Ue, { title: lt(a.title), items: a.items }, Math.random())
1806
+ ei(a) ? n.push(
1807
+ /* @__PURE__ */ l.jsx(Be, { title: lt(a.title), items: a.items }, Math.random())
1798
1808
  ) : n.push(
1799
1809
  /* @__PURE__ */ l.jsx(
1800
- st,
1810
+ ct,
1801
1811
  {
1802
1812
  title: a.title,
1803
1813
  prop: a.prop,
@@ -1808,19 +1818,19 @@ function Ue(t) {
1808
1818
  step: a.step,
1809
1819
  disabled: a.disabled,
1810
1820
  options: a.options,
1811
- onChange: (e, o) => {
1812
- a.onChange !== void 0 && a.onChange(e, o);
1821
+ onChange: (e, s) => {
1822
+ a.onChange !== void 0 && a.onChange(e, s);
1813
1823
  }
1814
1824
  },
1815
1825
  Math.random()
1816
1826
  )
1817
1827
  );
1818
- }), /* @__PURE__ */ l.jsx(Ht, { label: t.title, open: t.expanded === !0, children: n });
1828
+ }), /* @__PURE__ */ l.jsx(Wt, { label: t.title, open: t.expanded === !0, children: n });
1819
1829
  }
1820
- function di(t) {
1830
+ function ti(t) {
1821
1831
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || 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 === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1822
1832
  }
1823
- function Ie(t) {
1833
+ function De(t) {
1824
1834
  switch (t) {
1825
1835
  case "alphaMap":
1826
1836
  return "Alpha Map";
@@ -1993,70 +2003,70 @@ function Ie(t) {
1993
2003
  }
1994
2004
  return t;
1995
2005
  }
1996
- function fi(t) {
2006
+ function ni(t) {
1997
2007
  return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1998
2008
  }
1999
- function hi() {
2009
+ function ai() {
2000
2010
  const t = document.createElement("input");
2001
2011
  return t.type = "file", new Promise((n, a) => {
2002
2012
  t.addEventListener("change", function() {
2003
2013
  if (t.files === null)
2004
2014
  a();
2005
2015
  else {
2006
- const e = t.files[0], o = new FileReader();
2007
- o.onload = function(s) {
2008
- n(s.target.result);
2009
- }, o.readAsDataURL(e);
2016
+ const e = t.files[0], s = new FileReader();
2017
+ s.onload = function(o) {
2018
+ n(o.target.result);
2019
+ }, s.readAsDataURL(e);
2010
2020
  }
2011
2021
  }), t.click();
2012
2022
  });
2013
2023
  }
2014
- const pi = [
2024
+ const ii = [
2015
2025
  {
2016
2026
  title: "Front",
2017
- value: Zn
2027
+ value: Xn
2018
2028
  },
2019
2029
  {
2020
2030
  title: "Back",
2021
- value: Jn
2031
+ value: Zn
2022
2032
  },
2023
2033
  {
2024
2034
  title: "Double",
2025
- value: hn
2035
+ value: fn
2026
2036
  }
2027
- ], mi = [
2037
+ ], ri = [
2028
2038
  {
2029
2039
  title: "No Blending",
2030
- value: Qn
2040
+ value: Jn
2031
2041
  },
2032
2042
  {
2033
2043
  title: "Normal",
2034
- value: ea
2044
+ value: Qn
2035
2045
  },
2036
2046
  {
2037
2047
  title: "Additive",
2038
- value: ta
2048
+ value: ea
2039
2049
  },
2040
2050
  {
2041
2051
  title: "Subtractive",
2042
- value: na
2052
+ value: ta
2043
2053
  },
2044
2054
  {
2045
2055
  title: "Multiply",
2046
- value: aa
2056
+ value: na
2047
2057
  },
2048
2058
  {
2049
2059
  title: "Custom",
2050
- value: ia
2060
+ value: aa
2051
2061
  }
2052
- ], vi = [
2062
+ ], si = [
2053
2063
  {
2054
2064
  title: "Add",
2055
- value: ra
2065
+ value: ia
2056
2066
  },
2057
2067
  {
2058
2068
  title: "Subtract",
2059
- value: oa
2069
+ value: ra
2060
2070
  },
2061
2071
  {
2062
2072
  title: "Reverse Subtract",
@@ -2064,13 +2074,13 @@ const pi = [
2064
2074
  },
2065
2075
  {
2066
2076
  title: "Min",
2067
- value: ca
2077
+ value: oa
2068
2078
  },
2069
2079
  {
2070
2080
  title: "Max",
2071
- value: la
2081
+ value: ca
2072
2082
  }
2073
- ], gi = [
2083
+ ], oi = [
2074
2084
  {
2075
2085
  title: "Zero",
2076
2086
  valye: pn
@@ -2113,7 +2123,7 @@ const pi = [
2113
2123
  },
2114
2124
  {
2115
2125
  title: "Src Alpha Saturate",
2116
- valye: ua
2126
+ valye: la
2117
2127
  },
2118
2128
  {
2119
2129
  title: "Constant Color",
@@ -2131,7 +2141,7 @@ const pi = [
2131
2141
  title: "One Minus Constant Alpha",
2132
2142
  valye: Tn
2133
2143
  }
2134
- ], bi = [
2144
+ ], ci = [
2135
2145
  {
2136
2146
  title: "Zero",
2137
2147
  valye: pn
@@ -2189,72 +2199,72 @@ const pi = [
2189
2199
  valye: Tn
2190
2200
  }
2191
2201
  ];
2192
- function ot(t, n) {
2202
+ function st(t, n) {
2193
2203
  t.needsUpdate = !0, t.type = "option", t.options = n;
2194
2204
  }
2195
2205
  function en(t, n, a) {
2196
2206
  const e = [];
2197
- for (const o in t) {
2198
- if (!di(o))
2207
+ for (const s in t) {
2208
+ if (!ti(s))
2199
2209
  continue;
2200
- const s = typeof t[o], p = t[o];
2201
- if (s === "boolean" || s === "number" || s === "string") {
2210
+ const o = typeof t[s], p = t[s];
2211
+ if (o === "boolean" || o === "number" || o === "string") {
2202
2212
  const c = {
2203
- title: Ie(o),
2204
- prop: o,
2205
- type: s,
2213
+ title: De(s),
2214
+ prop: s,
2215
+ type: o,
2206
2216
  value: p,
2207
2217
  min: void 0,
2208
2218
  max: void 0,
2209
- needsUpdate: s === "boolean",
2210
- onChange: (d, v) => {
2211
- a.updateObject(n.uuid, `material.${d}`, v), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2219
+ needsUpdate: o === "boolean",
2220
+ onChange: (f, v) => {
2221
+ a.updateObject(n.uuid, `material.${f}`, v), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2212
2222
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2213
- b !== void 0 && ee(b, `material.${d}`, v);
2223
+ b !== void 0 && ee(b, `material.${f}`, v);
2214
2224
  }
2215
2225
  };
2216
- switch (o) {
2226
+ switch (s) {
2217
2227
  case "blending":
2218
- ot(c, mi);
2228
+ st(c, ri);
2219
2229
  break;
2220
2230
  case "blendDst":
2221
- ot(c, bi);
2231
+ st(c, ci);
2222
2232
  break;
2223
2233
  case "blendEquation":
2224
- ot(c, vi);
2234
+ st(c, si);
2225
2235
  break;
2226
2236
  case "blendSrc":
2227
- ot(c, gi);
2237
+ st(c, oi);
2228
2238
  break;
2229
2239
  case "side":
2230
- ot(c, pi);
2240
+ st(c, ii);
2231
2241
  break;
2232
2242
  }
2233
- fi(o) && (c.value = Number(p), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2234
- const u = s === "string" && (o === "vertexShader" || o === "fragmentShader");
2235
- u && (c.disabled = !1, c.latest = c.value, c.onChange = (d, v) => {
2243
+ ni(s) && (c.value = Number(p), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2244
+ const u = o === "string" && (s === "vertexShader" || s === "fragmentShader");
2245
+ u && (c.disabled = !1, c.latest = c.value, c.onChange = (f, v) => {
2236
2246
  c.latest = v;
2237
2247
  }), e.push(c), u && e.push({
2238
- title: `${lt(o)} - Update`,
2248
+ title: `${lt(s)} - Update`,
2239
2249
  type: "button",
2240
2250
  onChange: () => {
2241
- a.updateObject(n.uuid, `material.${o}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2242
- const d = a.scene?.getObjectByProperty("uuid", n.uuid);
2243
- d !== void 0 && (ee(d, `material.${o}`, c.latest), d.material.needsUpdate = !0);
2251
+ a.updateObject(n.uuid, `material.${s}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2252
+ const f = a.scene?.getObjectByProperty("uuid", n.uuid);
2253
+ f !== void 0 && (ee(f, `material.${s}`, c.latest), f.material.needsUpdate = !0);
2244
2254
  }
2245
2255
  });
2246
- } else if (s === "object")
2256
+ } else if (o === "object")
2247
2257
  if (p.isColor)
2248
2258
  e.push({
2249
- title: Ie(o),
2250
- prop: o,
2259
+ title: De(s),
2260
+ prop: s,
2251
2261
  type: "color",
2252
2262
  value: p,
2253
2263
  onChange: (c, u) => {
2254
- const d = new Tt(u);
2255
- a.updateObject(n.uuid, `material.${c}`, d);
2264
+ const f = new Tt(u);
2265
+ a.updateObject(n.uuid, `material.${c}`, f);
2256
2266
  const v = a.scene?.getObjectByProperty("uuid", n.uuid);
2257
- v !== void 0 && ee(v, `material.${c}`, d);
2267
+ v !== void 0 && ee(v, `material.${c}`, f);
2258
2268
  }
2259
2269
  });
2260
2270
  else if (Array.isArray(p)) {
@@ -2264,96 +2274,96 @@ function en(t, n, a) {
2264
2274
  title: `${u}`,
2265
2275
  type: `${typeof p[u]}`,
2266
2276
  value: p[u],
2267
- onChange: (d, v) => {
2268
- a.updateObject(n.uuid, `material.${o}`, v);
2277
+ onChange: (f, v) => {
2278
+ a.updateObject(n.uuid, `material.${s}`, v);
2269
2279
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2270
- b !== void 0 && ee(b, `material.${o}`, v);
2280
+ b !== void 0 && ee(b, `material.${s}`, v);
2271
2281
  }
2272
2282
  });
2273
2283
  e.push({
2274
- title: Ie(o),
2284
+ title: De(s),
2275
2285
  items: c
2276
2286
  });
2277
2287
  } else {
2278
2288
  const c = [];
2279
2289
  for (const u in p) {
2280
- const d = p[u];
2281
- switch (typeof d) {
2290
+ const f = p[u];
2291
+ switch (typeof f) {
2282
2292
  case "boolean":
2283
2293
  case "number":
2284
2294
  case "string":
2285
2295
  u === "src" ? e.push({
2286
- title: Ie(o),
2296
+ title: De(s),
2287
2297
  type: "image",
2288
- value: d,
2298
+ value: f,
2289
2299
  onChange: (b, E) => {
2290
- a.createTexture(n.uuid, `material.${o}`, E);
2300
+ a.createTexture(n.uuid, `material.${s}`, E);
2291
2301
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2292
2302
  x !== void 0 && Gt(E).then((M) => {
2293
- ee(x, `material.${o}`, M), ee(x, "material.needsUpdate", !0);
2303
+ ee(x, `material.${s}`, M), ee(x, "material.needsUpdate", !0);
2294
2304
  });
2295
2305
  }
2296
2306
  }) : c.push({
2297
- title: `${Ie(u)}`,
2298
- prop: `material.${o}.${u}`,
2299
- type: `${typeof t[o][u]}`,
2307
+ title: `${De(u)}`,
2308
+ prop: `material.${s}.${u}`,
2309
+ type: `${typeof t[s][u]}`,
2300
2310
  value: p[u],
2301
2311
  onChange: (b, E) => {
2302
- a.updateObject(n.uuid, `material.${o}.${u}`, E);
2312
+ a.updateObject(n.uuid, `material.${s}.${u}`, E);
2303
2313
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2304
- x !== void 0 && ee(x, `material.${o}.${u}`, E);
2314
+ x !== void 0 && ee(x, `material.${s}.${u}`, E);
2305
2315
  }
2306
2316
  });
2307
2317
  break;
2308
2318
  case "object":
2309
- if (d.value !== void 0 && d.value.src !== void 0)
2319
+ if (f.value !== void 0 && f.value.src !== void 0)
2310
2320
  c.push({
2311
- title: Ie(u),
2321
+ title: De(u),
2312
2322
  type: "image",
2313
- value: d.value.src,
2323
+ value: f.value.src,
2314
2324
  onChange: (b, E) => {
2315
- a.createTexture(n.uuid, `material.${o}.${u}.value`, p);
2325
+ a.createTexture(n.uuid, `material.${s}.${u}.value`, p);
2316
2326
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2317
2327
  x !== void 0 && Gt(E).then((M) => {
2318
- ee(x, `material.${o}.${u}.value`, M);
2328
+ ee(x, `material.${s}.${u}.value`, M);
2319
2329
  });
2320
2330
  }
2321
2331
  });
2322
- else if (o === "uniforms") {
2323
- const b = d.value, E = (x, M, k) => ({
2332
+ else if (s === "uniforms") {
2333
+ const b = f.value, E = (x, M, P) => ({
2324
2334
  title: x,
2325
2335
  type: "number",
2326
- value: k,
2336
+ value: P,
2327
2337
  step: 0.01,
2328
- onChange: (H, B) => {
2338
+ onChange: (W, B) => {
2329
2339
  const S = `material.uniforms.${u}.value.${M}`;
2330
2340
  a.updateObject(n.uuid, S, B);
2331
2341
  const z = a.scene?.getObjectByProperty("uuid", n.uuid);
2332
2342
  z !== void 0 && ee(z, S, B);
2333
2343
  }
2334
2344
  });
2335
- if (typeof d.value == "number")
2345
+ if (typeof f.value == "number")
2336
2346
  c.push({
2337
2347
  title: u,
2338
2348
  type: "number",
2339
- value: d.value,
2349
+ value: f.value,
2340
2350
  onChange: (x, M) => {
2341
- const k = `material.${o}.${x}.value`;
2342
- a.updateObject(n.uuid, k, M);
2343
- const H = a.scene?.getObjectByProperty("uuid", n.uuid);
2344
- H !== void 0 && ee(H, k, M);
2351
+ const P = `material.${s}.${x}.value`;
2352
+ a.updateObject(n.uuid, P, M);
2353
+ const W = a.scene?.getObjectByProperty("uuid", n.uuid);
2354
+ W !== void 0 && ee(W, P, M);
2345
2355
  }
2346
2356
  });
2347
2357
  else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
2348
2358
  c.push({
2349
2359
  title: u,
2350
2360
  type: "color",
2351
- value: d.value,
2361
+ value: f.value,
2352
2362
  onChange: (x, M) => {
2353
- const k = new Tt(M), H = `material.${o}.${x}.value`;
2354
- a.updateObject(n.uuid, H, k);
2363
+ const P = new Tt(M), W = `material.${s}.${x}.value`;
2364
+ a.updateObject(n.uuid, W, P);
2355
2365
  const B = a.scene?.getObjectByProperty("uuid", n.uuid);
2356
- B !== void 0 && ee(B, H, k);
2366
+ B !== void 0 && ee(B, W, P);
2357
2367
  }
2358
2368
  });
2359
2369
  else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
@@ -2361,8 +2371,8 @@ function en(t, n, a) {
2361
2371
  {
2362
2372
  title: u,
2363
2373
  items: [
2364
- E("X", "x", d.value.x),
2365
- E("Y", "y", d.value.y)
2374
+ E("X", "x", f.value.x),
2375
+ E("Y", "y", f.value.y)
2366
2376
  ]
2367
2377
  }
2368
2378
  );
@@ -2371,9 +2381,9 @@ function en(t, n, a) {
2371
2381
  {
2372
2382
  title: u,
2373
2383
  items: [
2374
- E("X", "x", d.value.x),
2375
- E("Y", "y", d.value.y),
2376
- E("Z", "z", d.value.z)
2384
+ E("X", "x", f.value.x),
2385
+ E("Y", "y", f.value.y),
2386
+ E("Z", "z", f.value.z)
2377
2387
  ]
2378
2388
  }
2379
2389
  );
@@ -2382,17 +2392,17 @@ function en(t, n, a) {
2382
2392
  {
2383
2393
  title: u,
2384
2394
  items: [
2385
- E("X", "x", d.value.x),
2386
- E("Y", "y", d.value.y),
2387
- E("Z", "z", d.value.z),
2388
- E("W", "w", d.value.w)
2395
+ E("X", "x", f.value.x),
2396
+ E("Y", "y", f.value.y),
2397
+ E("Z", "z", f.value.z),
2398
+ E("W", "w", f.value.w)
2389
2399
  ]
2390
2400
  }
2391
2401
  );
2392
2402
  else if (b.elements !== void 0) {
2393
2403
  const x = b.elements, M = [];
2394
- for (let k = 0; k < x.length; k++)
2395
- M.push(E(k.toString(), k.toString(), x[k]));
2404
+ for (let P = 0; P < x.length; P++)
2405
+ M.push(E(P.toString(), P.toString(), x[P]));
2396
2406
  c.push(
2397
2407
  {
2398
2408
  title: u,
@@ -2404,26 +2414,26 @@ function en(t, n, a) {
2404
2414
  } else
2405
2415
  c.push({
2406
2416
  title: u,
2407
- type: `${typeof d.value}`,
2408
- value: d.value,
2417
+ type: `${typeof f.value}`,
2418
+ value: f.value,
2409
2419
  onChange: (b, E) => {
2410
- a.updateObject(n.uuid, `material.${o}.${u}.value`, E);
2420
+ a.updateObject(n.uuid, `material.${s}.${u}.value`, E);
2411
2421
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2412
- x !== void 0 && ee(x, `material.${o}.${u}.value`, E);
2422
+ x !== void 0 && ee(x, `material.${s}.${u}.value`, E);
2413
2423
  }
2414
2424
  });
2415
2425
  break;
2416
2426
  }
2417
2427
  }
2418
2428
  c.length > 0 && e.push({
2419
- title: Ie(o),
2429
+ title: De(s),
2420
2430
  items: c
2421
2431
  });
2422
2432
  }
2423
2433
  else
2424
- p !== void 0 && console.log("other:", o, s, p);
2434
+ p !== void 0 && console.log("other:", s, o, p);
2425
2435
  }
2426
- return e.sort((o, s) => o.title < s.title ? -1 : o.title > s.title ? 1 : 0), e.push({
2436
+ return e.sort((s, o) => s.title < o.title ? -1 : s.title > o.title ? 1 : 0), e.push({
2427
2437
  title: "Update Material",
2428
2438
  type: "button",
2429
2439
  onChange: () => {
@@ -2431,66 +2441,66 @@ function en(t, n, a) {
2431
2441
  }
2432
2442
  }), e;
2433
2443
  }
2434
- function yi(t, n) {
2444
+ function li(t, n) {
2435
2445
  const a = t.material;
2436
2446
  if (Array.isArray(a)) {
2437
- const e = [], o = a.length;
2438
- for (let s = 0; s < o; s++)
2447
+ const e = [], s = a.length;
2448
+ for (let o = 0; o < s; o++)
2439
2449
  e.push(
2440
2450
  /* @__PURE__ */ l.jsx(
2441
- Ue,
2451
+ Be,
2442
2452
  {
2443
- title: `Material ${s}`,
2444
- items: en(a[s], t, n)
2453
+ title: `Material ${o}`,
2454
+ items: en(a[o], t, n)
2445
2455
  },
2446
- `Material ${s}`
2456
+ `Material ${o}`
2447
2457
  )
2448
2458
  );
2449
2459
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2450
2460
  } else
2451
2461
  return /* @__PURE__ */ l.jsx(
2452
- Ue,
2462
+ Be,
2453
2463
  {
2454
2464
  title: "Material",
2455
2465
  items: en(a, t, n)
2456
2466
  }
2457
2467
  );
2458
2468
  }
2459
- function st(t) {
2469
+ function ct(t) {
2460
2470
  let n = t.value;
2461
- n !== void 0 && n.isColor !== void 0 && (n = ka(t.value));
2462
- const [a, e] = oe(n), o = ye(null), s = ye(null), p = ye(null);
2463
- Be(() => {
2471
+ n !== void 0 && n.isColor !== void 0 && (n = Aa(t.value));
2472
+ const [a, e] = se(n), s = Ee(null), o = Ee(null), p = Ee(null);
2473
+ Fe(() => {
2464
2474
  let v = !1, b = -1, E = 0, x = Number(a);
2465
2475
  const M = (z) => {
2466
2476
  v = !0, E = x, b = z.clientX;
2467
- }, k = (z) => {
2477
+ }, P = (z) => {
2468
2478
  if (!v)
2469
2479
  return;
2470
- const Ee = t.step !== void 0 ? t.step : 1, le = (z.clientX - b) * Ee;
2471
- x = Number((E + le).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);
2472
- }, H = () => {
2480
+ const Ce = t.step !== void 0 ? t.step : 1, le = (z.clientX - b) * Ce;
2481
+ x = Number((E + le).toFixed(4)), o.current !== null && (o.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
2482
+ }, W = () => {
2473
2483
  v = !1;
2474
2484
  }, B = () => {
2475
2485
  v = !1;
2476
2486
  }, S = t.type === "number";
2477
- return S && (o.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", H, !1), document.addEventListener("mousemove", k, !1), document.addEventListener("contextmenu", B, !1)), () => {
2478
- S && (o.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", H), document.removeEventListener("mousemove", k), document.removeEventListener("contextmenu", B));
2487
+ return S && (s.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", W, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", B, !1)), () => {
2488
+ S && (s.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", W), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", B));
2479
2489
  };
2480
2490
  }, [a]);
2481
2491
  const c = t.type === "string" && (a.length > 100 || a.search(`
2482
- `) > -1), u = c || t.type === "image", d = (v) => {
2492
+ `) > -1), u = c || t.type === "image", f = (v) => {
2483
2493
  let b = v.target.value;
2484
2494
  t.type === "boolean" ? b = v.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2485
2495
  };
2486
2496
  return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2487
- t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: lt(t.title) }, "fieldLabel"),
2497
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: s, children: lt(t.title) }, "fieldLabel"),
2488
2498
  t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2489
2499
  "input",
2490
2500
  {
2491
2501
  type: "text",
2492
2502
  disabled: t.disabled,
2493
- onChange: d,
2503
+ onChange: f,
2494
2504
  value: a
2495
2505
  }
2496
2506
  ),
@@ -2500,7 +2510,7 @@ function st(t) {
2500
2510
  cols: 50,
2501
2511
  rows: 10,
2502
2512
  disabled: t.disabled !== void 0 ? t.disabled : !0,
2503
- onChange: d,
2513
+ onChange: f,
2504
2514
  value: a
2505
2515
  }
2506
2516
  ),
@@ -2509,25 +2519,25 @@ function st(t) {
2509
2519
  {
2510
2520
  type: "checkbox",
2511
2521
  disabled: t.disabled,
2512
- onChange: d,
2522
+ onChange: f,
2513
2523
  checked: a
2514
2524
  }
2515
2525
  ),
2516
2526
  t.type === "number" && /* @__PURE__ */ l.jsx(
2517
2527
  "input",
2518
2528
  {
2519
- ref: s,
2529
+ ref: o,
2520
2530
  type: "number",
2521
2531
  value: a,
2522
2532
  min: t.min,
2523
2533
  max: t.max,
2524
2534
  step: t.step,
2525
2535
  disabled: t.disabled,
2526
- onChange: d
2536
+ onChange: f
2527
2537
  }
2528
2538
  ),
2529
2539
  t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2530
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "min" }),
2540
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: f, disabled: t.disabled, className: "min" }),
2531
2541
  /* @__PURE__ */ l.jsx(
2532
2542
  "input",
2533
2543
  {
@@ -2537,13 +2547,13 @@ function st(t) {
2537
2547
  min: t.min,
2538
2548
  max: t.max,
2539
2549
  step: t.step,
2540
- onChange: d
2550
+ onChange: f
2541
2551
  }
2542
2552
  )
2543
2553
  ] }),
2544
2554
  t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2545
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "color" }),
2546
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: t.disabled })
2555
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: f, disabled: t.disabled, className: "color" }),
2556
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: f, disabled: t.disabled })
2547
2557
  ] }),
2548
2558
  t.type === "button" && /* @__PURE__ */ l.jsx(
2549
2559
  "button",
@@ -2556,11 +2566,11 @@ function st(t) {
2556
2566
  }
2557
2567
  ),
2558
2568
  t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: p, onClick: () => {
2559
- hi().then((v) => {
2569
+ ai().then((v) => {
2560
2570
  p.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2561
2571
  });
2562
- }, src: a.length > 0 ? a : li }),
2563
- t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: lt(v.title) }, b)) }) })
2572
+ }, src: a.length > 0 ? a : Qa }),
2573
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: f, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: lt(v.title) }, b)) }) })
2564
2574
  ] });
2565
2575
  }
2566
2576
  function tn(t) {
@@ -2592,7 +2602,7 @@ function tn(t) {
2592
2602
  }
2593
2603
  return t;
2594
2604
  }
2595
- function Ei(t, n) {
2605
+ function ui(t, n) {
2596
2606
  const a = [];
2597
2607
  if (t.perspectiveCameraInfo !== void 0)
2598
2608
  for (const e in t.perspectiveCameraInfo)
@@ -2602,10 +2612,10 @@ function Ei(t, n) {
2602
2612
  type: "number",
2603
2613
  step: 0.01,
2604
2614
  value: t.perspectiveCameraInfo[e],
2605
- onChange: (o, s) => {
2606
- n.updateObject(t.uuid, o, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2615
+ onChange: (s, o) => {
2616
+ n.updateObject(t.uuid, s, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2607
2617
  const p = n.scene?.getObjectByProperty("uuid", t.uuid);
2608
- p !== void 0 && (ee(p, o, s), p.updateProjectionMatrix());
2618
+ p !== void 0 && (ee(p, s, o), p.updateProjectionMatrix());
2609
2619
  }
2610
2620
  });
2611
2621
  else if (t.orthographicCameraInfo !== void 0)
@@ -2616,44 +2626,44 @@ function Ei(t, n) {
2616
2626
  type: "number",
2617
2627
  step: 0.01,
2618
2628
  value: t.perspectiveCameraInfo[e],
2619
- onChange: (o, s) => {
2620
- n.updateObject(t.uuid, o, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2629
+ onChange: (s, o) => {
2630
+ n.updateObject(t.uuid, s, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2621
2631
  const p = n.scene?.getObjectByProperty("uuid", t.uuid);
2622
- p !== void 0 && (ee(p, o, s), p.updateProjectionMatrix());
2632
+ p !== void 0 && (ee(p, s, o), p.updateProjectionMatrix());
2623
2633
  }
2624
2634
  });
2625
2635
  return /* @__PURE__ */ l.jsx(
2626
- Ue,
2636
+ Be,
2627
2637
  {
2628
2638
  title: "Camera",
2629
2639
  items: a
2630
2640
  }
2631
2641
  );
2632
2642
  }
2633
- const Ci = Math.PI / 180, xi = 180 / Math.PI;
2634
- function Ke(t, n, a, e, o) {
2635
- return e + (t - n) * (o - e) / (a - n);
2643
+ const di = Math.PI / 180, hi = 180 / Math.PI;
2644
+ function qe(t, n, a, e, s) {
2645
+ return e + (t - n) * (s - e) / (a - n);
2636
2646
  }
2637
- function Si(t) {
2638
- return t * Ci;
2647
+ function fi(t) {
2648
+ return t * di;
2639
2649
  }
2640
2650
  function Ut(t) {
2641
- return t * xi;
2651
+ return t * hi;
2642
2652
  }
2643
- function wi(t, n) {
2644
- const a = new da();
2653
+ function pi(t, n) {
2654
+ const a = new ua();
2645
2655
  a.elements = t.matrix;
2646
- const e = new X(), o = new fa(), s = new X();
2647
- t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a), s.setFromMatrixScale(a));
2648
- const p = (u, d) => {
2649
- n.updateObject(t.uuid, u, d);
2656
+ const e = new X(), s = new da(), o = new X();
2657
+ t.uuid.length > 0 && (e.setFromMatrixPosition(a), s.setFromRotationMatrix(a), o.setFromMatrixScale(a));
2658
+ const p = (u, f) => {
2659
+ n.updateObject(t.uuid, u, f);
2650
2660
  const v = n.scene?.getObjectByProperty("uuid", t.uuid);
2651
- v !== void 0 && ee(v, u, d);
2652
- }, c = (u, d) => {
2653
- p(u, Si(d));
2661
+ v !== void 0 && ee(v, u, f);
2662
+ }, c = (u, f) => {
2663
+ p(u, fi(f));
2654
2664
  };
2655
2665
  return /* @__PURE__ */ l.jsx(
2656
- Ue,
2666
+ Be,
2657
2667
  {
2658
2668
  title: "Transform",
2659
2669
  items: [
@@ -2682,7 +2692,7 @@ function wi(t, n) {
2682
2692
  title: "Rotation X",
2683
2693
  prop: "rotation.x",
2684
2694
  type: "number",
2685
- value: Ft(Ut(o.x)),
2695
+ value: Ft(Ut(s.x)),
2686
2696
  min: -360,
2687
2697
  max: 360,
2688
2698
  step: 0.1,
@@ -2692,7 +2702,7 @@ function wi(t, n) {
2692
2702
  title: "Rotation Y",
2693
2703
  prop: "rotation.y",
2694
2704
  type: "number",
2695
- value: Ft(Ut(o.y)),
2705
+ value: Ft(Ut(s.y)),
2696
2706
  min: -360,
2697
2707
  max: 360,
2698
2708
  step: 0.1,
@@ -2702,7 +2712,7 @@ function wi(t, n) {
2702
2712
  title: "Rotation Z",
2703
2713
  prop: "rotation.z",
2704
2714
  type: "number",
2705
- value: Ft(Ut(o.z)),
2715
+ value: Ft(Ut(s.z)),
2706
2716
  min: -360,
2707
2717
  max: 360,
2708
2718
  step: 0.1,
@@ -2712,7 +2722,7 @@ function wi(t, n) {
2712
2722
  title: "Scale X",
2713
2723
  prop: "scale.x",
2714
2724
  type: "number",
2715
- value: s.x,
2725
+ value: o.x,
2716
2726
  step: 0.01,
2717
2727
  onChange: p
2718
2728
  },
@@ -2720,7 +2730,7 @@ function wi(t, n) {
2720
2730
  title: "Scale Y",
2721
2731
  prop: "scale.y",
2722
2732
  type: "number",
2723
- value: s.y,
2733
+ value: o.y,
2724
2734
  step: 0.01,
2725
2735
  onChange: p
2726
2736
  },
@@ -2728,7 +2738,7 @@ function wi(t, n) {
2728
2738
  title: "Scale Z",
2729
2739
  prop: "scale.z",
2730
2740
  type: "number",
2731
- value: s.z,
2741
+ value: o.z,
2732
2742
  step: 0.01,
2733
2743
  onChange: p
2734
2744
  }
@@ -2755,48 +2765,48 @@ function nn(t) {
2755
2765
  }
2756
2766
  return t;
2757
2767
  }
2758
- function Oi(t, n) {
2768
+ function mi(t, n) {
2759
2769
  const a = [];
2760
2770
  if (t.lightInfo !== void 0)
2761
2771
  for (const e in t.lightInfo) {
2762
- const o = t.lightInfo[e];
2763
- o !== void 0 && (o.isColor !== void 0 ? a.push({
2772
+ const s = t.lightInfo[e];
2773
+ s !== void 0 && (s.isColor !== void 0 ? a.push({
2764
2774
  title: nn(e),
2765
2775
  prop: e,
2766
2776
  type: "color",
2767
- value: o,
2768
- onChange: (s, p) => {
2777
+ value: s,
2778
+ onChange: (o, p) => {
2769
2779
  const c = new Tt(p);
2770
- n.updateObject(t.uuid, s, c);
2780
+ n.updateObject(t.uuid, o, c);
2771
2781
  const u = n.scene?.getObjectByProperty("uuid", t.uuid);
2772
- u !== void 0 && ee(u, s, c);
2782
+ u !== void 0 && ee(u, o, c);
2773
2783
  }
2774
2784
  }) : a.push({
2775
2785
  title: nn(e),
2776
2786
  prop: e,
2777
- type: typeof o,
2778
- value: o,
2779
- step: typeof o == "number" ? 0.01 : void 0,
2780
- onChange: (s, p) => {
2781
- n.updateObject(t.uuid, s, p);
2787
+ type: typeof s,
2788
+ value: s,
2789
+ step: typeof s == "number" ? 0.01 : void 0,
2790
+ onChange: (o, p) => {
2791
+ n.updateObject(t.uuid, o, p);
2782
2792
  const c = n.scene?.getObjectByProperty("uuid", t.uuid);
2783
- c !== void 0 && ee(c, s, p);
2793
+ c !== void 0 && ee(c, o, p);
2784
2794
  }
2785
2795
  }));
2786
2796
  }
2787
2797
  return /* @__PURE__ */ l.jsx(
2788
- Ue,
2798
+ Be,
2789
2799
  {
2790
2800
  title: "Light",
2791
2801
  items: a
2792
2802
  }
2793
2803
  );
2794
2804
  }
2795
- function Mi(t, n) {
2805
+ function vi(t, n) {
2796
2806
  const a = [], e = [];
2797
- let o = 0;
2807
+ let s = 0;
2798
2808
  t.animations.forEach((c) => {
2799
- o = Math.max(o, c.duration), c.duration > 0 && e.push({
2809
+ s = Math.max(s, c.duration), c.duration > 0 && e.push({
2800
2810
  title: c.name,
2801
2811
  items: [
2802
2812
  {
@@ -2826,10 +2836,10 @@ function Mi(t, n) {
2826
2836
  title: "Animations",
2827
2837
  items: e
2828
2838
  });
2829
- const s = n.scene?.getObjectByProperty("uuid", t.uuid);
2839
+ const o = n.scene?.getObjectByProperty("uuid", t.uuid);
2830
2840
  let p = !1;
2831
- if (s !== void 0) {
2832
- const c = s.mixer;
2841
+ if (o !== void 0) {
2842
+ const c = o.mixer;
2833
2843
  if (p = c !== void 0, p) {
2834
2844
  const u = [
2835
2845
  {
@@ -2839,7 +2849,7 @@ function Mi(t, n) {
2839
2849
  step: 0.01,
2840
2850
  min: -1,
2841
2851
  max: 2,
2842
- onChange: (d, v) => {
2852
+ onChange: (f, v) => {
2843
2853
  c.timeScale = v, n.updateObject(t.uuid, "mixer.timeScale", v);
2844
2854
  }
2845
2855
  }
@@ -2856,9 +2866,9 @@ function Mi(t, n) {
2856
2866
  });
2857
2867
  }
2858
2868
  }
2859
- return /* @__PURE__ */ l.jsx(Ue, { title: "Animation", items: a });
2869
+ return /* @__PURE__ */ l.jsx(Be, { title: "Animation", items: a });
2860
2870
  }
2861
- const Un = {
2871
+ const Bn = {
2862
2872
  name: "",
2863
2873
  uuid: "",
2864
2874
  type: "",
@@ -2870,25 +2880,25 @@ const Un = {
2870
2880
  orthographicCameraInfo: void 0,
2871
2881
  lightInfo: void 0
2872
2882
  };
2873
- let te = { ...Un };
2874
- function Ti(t) {
2875
- const [n, a] = oe(-1);
2876
- Be(() => {
2883
+ let te = { ...Bn };
2884
+ function gi(t) {
2885
+ const [n, a] = se(-1);
2886
+ Fe(() => {
2877
2887
  function p(u) {
2878
2888
  te = { ...u.value }, a(Date.now());
2879
2889
  }
2880
2890
  function c() {
2881
- te = { ...Un }, a(Date.now());
2891
+ te = { ...Bn }, a(Date.now());
2882
2892
  }
2883
- return _.addEventListener(j.SET_SCENE, c), _.addEventListener(j.SET_OBJECT, p), () => {
2884
- _.removeEventListener(j.SET_SCENE, c), _.removeEventListener(j.SET_OBJECT, p);
2893
+ return k.addEventListener(j.SET_SCENE, c), k.addEventListener(j.SET_OBJECT, p), () => {
2894
+ k.removeEventListener(j.SET_SCENE, c), k.removeEventListener(j.SET_OBJECT, p);
2885
2895
  };
2886
2896
  }, []);
2887
- const e = te.type.toLowerCase(), o = te.animations.length > 0 || te.mixer !== void 0, s = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2888
- return /* @__PURE__ */ l.jsx(Ht, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: te.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2897
+ const e = te.type.toLowerCase(), s = te.animations.length > 0 || te.mixer !== void 0, o = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2898
+ return /* @__PURE__ */ l.jsx(Wt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: te.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2889
2899
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2890
2900
  /* @__PURE__ */ l.jsx(
2891
- st,
2901
+ ct,
2892
2902
  {
2893
2903
  type: "string",
2894
2904
  title: "Name",
@@ -2898,7 +2908,7 @@ function Ti(t) {
2898
2908
  }
2899
2909
  ),
2900
2910
  /* @__PURE__ */ l.jsx(
2901
- st,
2911
+ ct,
2902
2912
  {
2903
2913
  type: "string",
2904
2914
  title: "Type",
@@ -2908,7 +2918,7 @@ function Ti(t) {
2908
2918
  }
2909
2919
  ),
2910
2920
  /* @__PURE__ */ l.jsx(
2911
- st,
2921
+ ct,
2912
2922
  {
2913
2923
  type: "string",
2914
2924
  title: "UUID",
@@ -2918,7 +2928,7 @@ function Ti(t) {
2918
2928
  }
2919
2929
  ),
2920
2930
  /* @__PURE__ */ l.jsx(
2921
- st,
2931
+ ct,
2922
2932
  {
2923
2933
  type: "boolean",
2924
2934
  title: "Visible",
@@ -2933,29 +2943,29 @@ function Ti(t) {
2933
2943
  )
2934
2944
  ] }),
2935
2945
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2936
- wi(te, t.three),
2937
- o ? Mi(te, t.three) : null,
2938
- e.search("camera") > -1 ? Ei(te, t.three) : null,
2939
- e.search("light") > -1 ? Oi(te, t.three) : null,
2940
- s ? yi(te, t.three) : null
2946
+ pi(te, t.three),
2947
+ s ? vi(te, t.three) : null,
2948
+ e.search("camera") > -1 ? ui(te, t.three) : null,
2949
+ e.search("light") > -1 ? mi(te, t.three) : null,
2950
+ o ? li(te, t.three) : null
2941
2951
  ] })
2942
2952
  ] }) }, n) }, "Inspector");
2943
2953
  }
2944
- class Hi extends Ta {
2954
+ class Bi extends Ma {
2945
2955
  three;
2946
2956
  constructor(n) {
2947
2957
  super(n), this.state = {
2948
2958
  scene: n.scene !== void 0 ? n.scene : null
2949
- }, this.three = n.three, _.addEventListener(j.SET_SCENE, this.setScene);
2959
+ }, this.three = n.three, k.addEventListener(j.SET_SCENE, this.setScene);
2950
2960
  }
2951
2961
  componentWillUnmount() {
2952
- _.removeEventListener(j.SET_SCENE, this.setScene);
2962
+ k.removeEventListener(j.SET_SCENE, this.setScene);
2953
2963
  }
2954
2964
  render() {
2955
2965
  const n = this.componentState.scene !== null, a = "Hierarchy - " + (n ? `${this.componentState.scene?.name}` : "No Scene");
2956
2966
  return /* @__PURE__ */ l.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2957
- /* @__PURE__ */ l.jsx(Ht, { label: a, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: n && /* @__PURE__ */ l.jsx(ci, { child: this.componentState.scene, three: this.three }) }) }),
2958
- /* @__PURE__ */ l.jsx(Ti, { three: this.three })
2967
+ /* @__PURE__ */ l.jsx(Wt, { label: a, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: n && /* @__PURE__ */ l.jsx(Ja, { child: this.componentState.scene, three: this.three }) }) }),
2968
+ /* @__PURE__ */ l.jsx(gi, { three: this.three })
2959
2969
  ] }) }, "SidePanel");
2960
2970
  }
2961
2971
  // Private
@@ -2969,7 +2979,7 @@ class Hi extends Ta {
2969
2979
  return this.state;
2970
2980
  }
2971
2981
  }
2972
- function Wi(t) {
2982
+ function Ui(t) {
2973
2983
  function n() {
2974
2984
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2975
2985
  }
@@ -2978,86 +2988,86 @@ function Wi(t) {
2978
2988
  return;
2979
2989
  const u = t.three.scene?.getObjectByProperty("uuid", c.value);
2980
2990
  u !== void 0 && t.three.setObject(u);
2981
- }, e = (c, u, d) => {
2991
+ }, e = (c, u, f) => {
2982
2992
  if (!n())
2983
2993
  return;
2984
2994
  const v = t.three.scene?.getObjectByProperty("uuid", c);
2985
- v !== void 0 && ee(v, u, d);
2986
- }, o = (c) => {
2995
+ v !== void 0 && ee(v, u, f);
2996
+ }, s = (c) => {
2987
2997
  if (!n())
2988
2998
  return;
2989
- const u = c.value, { key: d, value: v, uuid: b } = u;
2990
- e(b, d, v);
2991
- }, s = (c) => {
2999
+ const u = c.value, { key: f, value: v, uuid: b } = u;
3000
+ e(b, f, v);
3001
+ }, o = (c) => {
2992
3002
  if (!n())
2993
3003
  return;
2994
3004
  const u = c.value;
2995
- Gt(u.value).then((d) => {
2996
- e(u.uuid, u.key, d), e(u.uuid, "material.needsUpdate", !0);
3005
+ Gt(u.value).then((f) => {
3006
+ e(u.uuid, u.key, f), e(u.uuid, "material.needsUpdate", !0);
2997
3007
  });
2998
3008
  }, p = (c) => {
2999
3009
  if (!n())
3000
3010
  return;
3001
- const { key: u, uuid: d, value: v, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", d);
3011
+ const { key: u, uuid: f, value: v, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", f);
3002
3012
  if (E !== void 0)
3003
3013
  try {
3004
- b !== void 0 ? za(E, b)[u](v) : E[u](v);
3014
+ b !== void 0 ? La(E, b)[u](v) : E[u](v);
3005
3015
  } catch (x) {
3006
3016
  console.log("Error requesting method:"), console.log(x), console.log(u), console.log(v);
3007
3017
  }
3008
3018
  };
3009
- return Be(() => (_.addEventListener(j.GET_OBJECT, a), _.addEventListener(j.UPDATE_OBJECT, o), _.addEventListener(j.CREATE_TEXTURE, s), _.addEventListener(j.REQUEST_METHOD, p), () => {
3010
- _.removeEventListener(j.GET_OBJECT, a), _.removeEventListener(j.UPDATE_OBJECT, o), _.removeEventListener(j.CREATE_TEXTURE, s), _.removeEventListener(j.REQUEST_METHOD, p);
3019
+ return Fe(() => (k.addEventListener(j.GET_OBJECT, a), k.addEventListener(j.UPDATE_OBJECT, s), k.addEventListener(j.CREATE_TEXTURE, o), k.addEventListener(j.REQUEST_METHOD, p), () => {
3020
+ k.removeEventListener(j.GET_OBJECT, a), k.removeEventListener(j.UPDATE_OBJECT, s), k.removeEventListener(j.CREATE_TEXTURE, o), k.removeEventListener(j.REQUEST_METHOD, p);
3011
3021
  }), []), null;
3012
3022
  }
3013
- const an = { type: "change" }, $t = { type: "start" }, rn = { type: "end" }, St = new ha(), on = new pa(), Ri = Math.cos(70 * ma.DEG2RAD);
3014
- class Pi extends un {
3023
+ const an = { type: "change" }, $t = { type: "start" }, rn = { type: "end" }, St = new ha(), sn = new fa(), bi = Math.cos(70 * pa.DEG2RAD);
3024
+ class yi extends un {
3015
3025
  constructor(n, a) {
3016
- 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: He.ROTATE, MIDDLE: He.DOLLY, RIGHT: He.PAN }, this.touches = { ONE: We.ROTATE, TWO: We.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3026
+ 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: Ve.ROTATE, MIDDLE: Ve.DOLLY, RIGHT: Ve.PAN }, this.touches = { ONE: We.ROTATE, TWO: We.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3017
3027
  return c.phi;
3018
3028
  }, this.getAzimuthalAngle = function() {
3019
3029
  return c.theta;
3020
3030
  }, this.getDistance = function() {
3021
3031
  return this.object.position.distanceTo(this.target);
3022
3032
  }, this.listenToKeyEvents = function(r) {
3023
- r.addEventListener("keydown", tt), this._domElementKeyEvents = r;
3033
+ r.addEventListener("keydown", et), this._domElementKeyEvents = r;
3024
3034
  }, this.stopListenToKeyEvents = function() {
3025
- this._domElementKeyEvents.removeEventListener("keydown", tt), this._domElementKeyEvents = null;
3035
+ this._domElementKeyEvents.removeEventListener("keydown", et), this._domElementKeyEvents = null;
3026
3036
  }, this.saveState = function() {
3027
3037
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
3028
3038
  }, this.reset = function() {
3029
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(an), e.update(), s = o.NONE;
3039
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(an), e.update(), o = s.NONE;
3030
3040
  }, this.update = function() {
3031
3041
  const r = new X(), y = new Xt().setFromUnitVectors(n.up, new X(0, 1, 0)), O = y.clone().invert(), L = new X(), K = new Xt(), de = new X(), ae = 2 * Math.PI;
3032
3042
  return function(Nt = null) {
3033
- const at = e.object.position;
3034
- r.copy(at).sub(e.target), r.applyQuaternion(y), c.setFromVector3(r), e.autoRotate && s === o.NONE && U(P(Nt)), e.enableDamping ? (c.theta += u.theta * e.dampingFactor, c.phi += u.phi * e.dampingFactor) : (c.theta += u.theta, c.phi += u.phi);
3035
- let pe = e.minAzimuthAngle, fe = e.maxAzimuthAngle;
3036
- isFinite(pe) && isFinite(fe) && (pe < -Math.PI ? pe += ae : pe > Math.PI && (pe -= ae), fe < -Math.PI ? fe += ae : fe > Math.PI && (fe -= ae), pe <= fe ? c.theta = Math.max(pe, Math.min(fe, c.theta)) : c.theta = c.theta > (pe + fe) / 2 ? Math.max(pe, c.theta) : Math.min(fe, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.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 && se || e.object.isOrthographicCamera ? c.radius = me(c.radius) : c.radius = me(c.radius * d), r.setFromSpherical(c), r.applyQuaternion(O), at.copy(e.target).add(r), 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));
3037
- let ke = !1;
3038
- if (e.zoomToCursor && se) {
3039
- let _e = null;
3043
+ const nt = e.object.position;
3044
+ r.copy(nt).sub(e.target), r.applyQuaternion(y), c.setFromVector3(r), e.autoRotate && o === s.NONE && U(_(Nt)), e.enableDamping ? (c.theta += u.theta * e.dampingFactor, c.phi += u.phi * e.dampingFactor) : (c.theta += u.theta, c.phi += u.phi);
3045
+ let pe = e.minAzimuthAngle, he = e.maxAzimuthAngle;
3046
+ isFinite(pe) && isFinite(he) && (pe < -Math.PI ? pe += ae : pe > Math.PI && (pe -= ae), he < -Math.PI ? he += ae : he > Math.PI && (he -= ae), pe <= he ? c.theta = Math.max(pe, Math.min(he, c.theta)) : c.theta = c.theta > (pe + he) / 2 ? Math.max(pe, c.theta) : Math.min(he, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.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 && oe || e.object.isOrthographicCamera ? c.radius = me(c.radius) : c.radius = me(c.radius * f), r.setFromSpherical(c), r.applyQuaternion(O), nt.copy(e.target).add(r), 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));
3047
+ let Ae = !1;
3048
+ if (e.zoomToCursor && oe) {
3049
+ let Pe = null;
3040
3050
  if (e.object.isPerspectiveCamera) {
3041
- const je = r.length();
3042
- _e = me(je * d);
3043
- const De = je - _e;
3044
- e.object.position.addScaledVector(Ee, De), e.object.updateMatrixWorld();
3051
+ const ke = r.length();
3052
+ Pe = me(ke * f);
3053
+ const je = ke - Pe;
3054
+ e.object.position.addScaledVector(Ce, je), e.object.updateMatrixWorld();
3045
3055
  } else if (e.object.isOrthographicCamera) {
3056
+ const ke = new X(le.x, le.y, 0);
3057
+ ke.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix(), Ae = !0;
3046
3058
  const je = new X(le.x, le.y, 0);
3047
- je.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), ke = !0;
3048
- const De = new X(le.x, le.y, 0);
3049
- De.unproject(e.object), e.object.position.sub(De).add(je), e.object.updateMatrixWorld(), _e = r.length();
3059
+ je.unproject(e.object), e.object.position.sub(je).add(ke), e.object.updateMatrixWorld(), Pe = r.length();
3050
3060
  } else
3051
3061
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
3052
- _e !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(_e).add(e.object.position) : (St.origin.copy(e.object.position), St.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(St.direction)) < Ri ? n.lookAt(e.target) : (on.setFromNormalAndCoplanarPoint(e.object.up, e.target), St.intersectPlane(on, e.target))));
3062
+ Pe !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Pe).add(e.object.position) : (St.origin.copy(e.object.position), St.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(St.direction)) < bi ? n.lookAt(e.target) : (sn.setFromNormalAndCoplanarPoint(e.object.up, e.target), St.intersectPlane(sn, e.target))));
3053
3063
  } else
3054
- e.object.isOrthographicCamera && (ke = d !== 1, ke && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
3055
- return d = 1, se = !1, ke || L.distanceToSquared(e.object.position) > p || 8 * (1 - K.dot(e.object.quaternion)) > p || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(an), L.copy(e.object.position), K.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
3064
+ e.object.isOrthographicCamera && (Ae = f !== 1, Ae && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix()));
3065
+ return f = 1, oe = !1, Ae || L.distanceToSquared(e.object.position) > p || 8 * (1 - K.dot(e.object.quaternion)) > p || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(an), L.copy(e.object.position), K.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
3056
3066
  };
3057
3067
  }(), this.dispose = function() {
3058
- e.domElement.removeEventListener("contextmenu", Ge), e.domElement.removeEventListener("pointerdown", Pe), e.domElement.removeEventListener("pointercancel", Ae), e.domElement.removeEventListener("wheel", bt), e.domElement.removeEventListener("pointermove", Qe), e.domElement.removeEventListener("pointerup", Ae), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", tt), e._domElementKeyEvents = null);
3068
+ e.domElement.removeEventListener("contextmenu", Ye), e.domElement.removeEventListener("pointerdown", Re), e.domElement.removeEventListener("pointercancel", _e), e.domElement.removeEventListener("wheel", bt), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", _e), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", et), e._domElementKeyEvents = null);
3059
3069
  };
3060
- const e = this, o = {
3070
+ const e = this, s = {
3061
3071
  NONE: -1,
3062
3072
  ROTATE: 0,
3063
3073
  DOLLY: 1,
@@ -3067,14 +3077,14 @@ class Pi extends un {
3067
3077
  TOUCH_DOLLY_PAN: 5,
3068
3078
  TOUCH_DOLLY_ROTATE: 6
3069
3079
  };
3070
- let s = o.NONE;
3080
+ let o = s.NONE;
3071
3081
  const p = 1e-6, c = new Zt(), u = new Zt();
3072
- let d = 1;
3073
- const v = new X(), b = new ue(), E = new ue(), x = new ue(), M = new ue(), k = new ue(), H = new ue(), B = new ue(), S = new ue(), z = new ue(), Ee = new X(), le = new ue();
3074
- let se = !1;
3075
- const f = [], m = {};
3082
+ let f = 1;
3083
+ const v = new X(), b = new ue(), E = new ue(), x = new ue(), M = new ue(), P = new ue(), W = new ue(), B = new ue(), S = new ue(), z = new ue(), Ce = new X(), le = new ue();
3084
+ let oe = !1;
3085
+ const d = [], m = {};
3076
3086
  let w = !1;
3077
- function P(r) {
3087
+ function _(r) {
3078
3088
  return r !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * r : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
3079
3089
  }
3080
3090
  function Y(r) {
@@ -3092,7 +3102,7 @@ class Pi extends un {
3092
3102
  return function(O, L) {
3093
3103
  r.setFromMatrixColumn(L, 0), r.multiplyScalar(-O), v.add(r);
3094
3104
  };
3095
- }(), W = function() {
3105
+ }(), H = function() {
3096
3106
  const r = new X();
3097
3107
  return function(O, L) {
3098
3108
  e.screenSpacePanning === !0 ? r.setFromMatrixColumn(L, 1) : (r.setFromMatrixColumn(L, 0), r.crossVectors(e.object.up, r)), r.multiplyScalar(O), v.add(r);
@@ -3105,34 +3115,34 @@ class Pi extends un {
3105
3115
  const de = e.object.position;
3106
3116
  r.copy(de).sub(e.target);
3107
3117
  let ae = r.length();
3108
- ae *= Math.tan(e.object.fov / 2 * Math.PI / 180), I(2 * O * ae / K.clientHeight, e.object.matrix), W(2 * L * ae / K.clientHeight, e.object.matrix);
3118
+ ae *= Math.tan(e.object.fov / 2 * Math.PI / 180), I(2 * O * ae / K.clientHeight, e.object.matrix), H(2 * L * ae / K.clientHeight, e.object.matrix);
3109
3119
  } else
3110
- e.object.isOrthographicCamera ? (I(O * (e.object.right - e.object.left) / e.object.zoom / K.clientWidth, e.object.matrix), W(L * (e.object.top - e.object.bottom) / e.object.zoom / K.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
3120
+ e.object.isOrthographicCamera ? (I(O * (e.object.right - e.object.left) / e.object.zoom / K.clientWidth, e.object.matrix), H(L * (e.object.top - e.object.bottom) / e.object.zoom / K.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
3111
3121
  };
3112
3122
  }();
3113
3123
  function T(r) {
3114
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d /= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3124
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f /= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3115
3125
  }
3116
3126
  function N(r) {
3117
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d *= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3127
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f *= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3118
3128
  }
3119
3129
  function J(r, y) {
3120
3130
  if (!e.zoomToCursor)
3121
3131
  return;
3122
- se = !0;
3132
+ oe = !0;
3123
3133
  const O = e.domElement.getBoundingClientRect(), L = r - O.left, K = y - O.top, de = O.width, ae = O.height;
3124
- le.x = L / de * 2 - 1, le.y = -(K / ae) * 2 + 1, Ee.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
3134
+ le.x = L / de * 2 - 1, le.y = -(K / ae) * 2 + 1, Ce.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
3125
3135
  }
3126
3136
  function me(r) {
3127
3137
  return Math.max(e.minDistance, Math.min(e.maxDistance, r));
3128
3138
  }
3129
- function Ce(r) {
3139
+ function xe(r) {
3130
3140
  b.set(r.clientX, r.clientY);
3131
3141
  }
3132
- function ft(r) {
3142
+ function ht(r) {
3133
3143
  J(r.clientX, r.clientX), B.set(r.clientX, r.clientY);
3134
3144
  }
3135
- function Xe(r) {
3145
+ function Ke(r) {
3136
3146
  M.set(r.clientX, r.clientY);
3137
3147
  }
3138
3148
  function At(r) {
@@ -3140,16 +3150,16 @@ class Pi extends un {
3140
3150
  const y = e.domElement;
3141
3151
  U(2 * Math.PI * x.x / y.clientHeight), $(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
3142
3152
  }
3143
- function kt(r) {
3153
+ function Pt(r) {
3144
3154
  S.set(r.clientX, r.clientY), z.subVectors(S, B), z.y > 0 ? T(Y(z.y)) : z.y < 0 && N(Y(z.y)), B.copy(S), e.update();
3145
3155
  }
3146
- function Ze(r) {
3147
- k.set(r.clientX, r.clientY), H.subVectors(k, M).multiplyScalar(e.panSpeed), q(H.x, H.y), M.copy(k), e.update();
3156
+ function Xe(r) {
3157
+ P.set(r.clientX, r.clientY), W.subVectors(P, M).multiplyScalar(e.panSpeed), q(W.x, W.y), M.copy(P), e.update();
3148
3158
  }
3149
- function Je(r) {
3159
+ function Ze(r) {
3150
3160
  J(r.clientX, r.clientY), r.deltaY < 0 ? N(Y(r.deltaY)) : r.deltaY > 0 && T(Y(r.deltaY)), e.update();
3151
3161
  }
3152
- function ze(r) {
3162
+ function $e(r) {
3153
3163
  let y = !1;
3154
3164
  switch (r.code) {
3155
3165
  case e.keys.UP:
@@ -3167,82 +3177,82 @@ class Pi extends un {
3167
3177
  }
3168
3178
  y && (r.preventDefault(), e.update());
3169
3179
  }
3170
- function Ye(r) {
3171
- if (f.length === 1)
3180
+ function ze(r) {
3181
+ if (d.length === 1)
3172
3182
  b.set(r.pageX, r.pageY);
3173
3183
  else {
3174
- const y = Se(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3184
+ const y = we(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3175
3185
  b.set(O, L);
3176
3186
  }
3177
3187
  }
3178
- function Me(r) {
3179
- if (f.length === 1)
3188
+ function Oe(r) {
3189
+ if (d.length === 1)
3180
3190
  M.set(r.pageX, r.pageY);
3181
3191
  else {
3182
- const y = Se(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3192
+ const y = we(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3183
3193
  M.set(O, L);
3184
3194
  }
3185
3195
  }
3186
- function ht(r) {
3187
- const y = Se(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3196
+ function ft(r) {
3197
+ const y = we(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3188
3198
  B.set(0, K);
3189
3199
  }
3190
3200
  function pt(r) {
3191
- e.enableZoom && ht(r), e.enablePan && Me(r);
3201
+ e.enableZoom && ft(r), e.enablePan && Oe(r);
3192
3202
  }
3193
- function _t(r) {
3194
- e.enableZoom && ht(r), e.enableRotate && Ye(r);
3203
+ function kt(r) {
3204
+ e.enableZoom && ft(r), e.enableRotate && ze(r);
3195
3205
  }
3196
3206
  function mt(r) {
3197
- if (f.length == 1)
3207
+ if (d.length == 1)
3198
3208
  E.set(r.pageX, r.pageY);
3199
3209
  else {
3200
- const O = Se(r), L = 0.5 * (r.pageX + O.x), K = 0.5 * (r.pageY + O.y);
3210
+ const O = we(r), L = 0.5 * (r.pageX + O.x), K = 0.5 * (r.pageY + O.y);
3201
3211
  E.set(L, K);
3202
3212
  }
3203
3213
  x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3204
3214
  const y = e.domElement;
3205
3215
  U(2 * Math.PI * x.x / y.clientHeight), $(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
3206
3216
  }
3207
- function Te(r) {
3208
- if (f.length === 1)
3209
- k.set(r.pageX, r.pageY);
3217
+ function Me(r) {
3218
+ if (d.length === 1)
3219
+ P.set(r.pageX, r.pageY);
3210
3220
  else {
3211
- const y = Se(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3212
- k.set(O, L);
3221
+ const y = we(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3222
+ P.set(O, L);
3213
3223
  }
3214
- H.subVectors(k, M).multiplyScalar(e.panSpeed), q(H.x, H.y), M.copy(k);
3224
+ W.subVectors(P, M).multiplyScalar(e.panSpeed), q(W.x, W.y), M.copy(P);
3215
3225
  }
3216
- function Re(r) {
3217
- const y = Se(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3226
+ function Te(r) {
3227
+ const y = we(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3218
3228
  S.set(0, K), z.set(0, Math.pow(S.y / B.y, e.zoomSpeed)), T(z.y), B.copy(S);
3219
3229
  const de = (r.pageX + y.x) * 0.5, ae = (r.pageY + y.y) * 0.5;
3220
3230
  J(de, ae);
3221
3231
  }
3222
3232
  function vt(r) {
3223
- e.enableZoom && Re(r), e.enablePan && Te(r);
3233
+ e.enableZoom && Te(r), e.enablePan && Me(r);
3224
3234
  }
3225
3235
  function gt(r) {
3226
- e.enableZoom && Re(r), e.enableRotate && mt(r);
3236
+ e.enableZoom && Te(r), e.enableRotate && mt(r);
3227
3237
  }
3228
- function Pe(r) {
3229
- e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(r.pointerId), e.domElement.addEventListener("pointermove", Qe), e.domElement.addEventListener("pointerup", Ae)), Dt(r), r.pointerType === "touch" ? nt(r) : et(r));
3238
+ function Re(r) {
3239
+ e.enabled !== !1 && (d.length === 0 && (e.domElement.setPointerCapture(r.pointerId), e.domElement.addEventListener("pointermove", Je), e.domElement.addEventListener("pointerup", _e)), Dt(r), r.pointerType === "touch" ? tt(r) : Qe(r));
3230
3240
  }
3231
- function Qe(r) {
3241
+ function Je(r) {
3232
3242
  e.enabled !== !1 && (r.pointerType === "touch" ? Ct(r) : jt(r));
3233
3243
  }
3234
- function Ae(r) {
3235
- switch (It(r), f.length) {
3244
+ function _e(r) {
3245
+ switch (It(r), d.length) {
3236
3246
  case 0:
3237
- e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove", Qe), e.domElement.removeEventListener("pointerup", Ae), e.dispatchEvent(rn), s = o.NONE;
3247
+ e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", _e), e.dispatchEvent(rn), o = s.NONE;
3238
3248
  break;
3239
3249
  case 1:
3240
- const y = f[0], O = m[y];
3241
- nt({ pointerId: y, pageX: O.x, pageY: O.y });
3250
+ const y = d[0], O = m[y];
3251
+ tt({ pointerId: y, pageX: O.x, pageY: O.y });
3242
3252
  break;
3243
3253
  }
3244
3254
  }
3245
- function et(r) {
3255
+ function Qe(r) {
3246
3256
  let y;
3247
3257
  switch (r.button) {
3248
3258
  case 0:
@@ -3258,59 +3268,59 @@ class Pi extends un {
3258
3268
  y = -1;
3259
3269
  }
3260
3270
  switch (y) {
3261
- case He.DOLLY:
3271
+ case Ve.DOLLY:
3262
3272
  if (e.enableZoom === !1)
3263
3273
  return;
3264
- ft(r), s = o.DOLLY;
3274
+ ht(r), o = s.DOLLY;
3265
3275
  break;
3266
- case He.ROTATE:
3276
+ case Ve.ROTATE:
3267
3277
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
3268
3278
  if (e.enablePan === !1)
3269
3279
  return;
3270
- Xe(r), s = o.PAN;
3280
+ Ke(r), o = s.PAN;
3271
3281
  } else {
3272
3282
  if (e.enableRotate === !1)
3273
3283
  return;
3274
- Ce(r), s = o.ROTATE;
3284
+ xe(r), o = s.ROTATE;
3275
3285
  }
3276
3286
  break;
3277
- case He.PAN:
3287
+ case Ve.PAN:
3278
3288
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
3279
3289
  if (e.enableRotate === !1)
3280
3290
  return;
3281
- Ce(r), s = o.ROTATE;
3291
+ xe(r), o = s.ROTATE;
3282
3292
  } else {
3283
3293
  if (e.enablePan === !1)
3284
3294
  return;
3285
- Xe(r), s = o.PAN;
3295
+ Ke(r), o = s.PAN;
3286
3296
  }
3287
3297
  break;
3288
3298
  default:
3289
- s = o.NONE;
3299
+ o = s.NONE;
3290
3300
  }
3291
- s !== o.NONE && e.dispatchEvent($t);
3301
+ o !== s.NONE && e.dispatchEvent($t);
3292
3302
  }
3293
3303
  function jt(r) {
3294
- switch (s) {
3295
- case o.ROTATE:
3304
+ switch (o) {
3305
+ case s.ROTATE:
3296
3306
  if (e.enableRotate === !1)
3297
3307
  return;
3298
3308
  At(r);
3299
3309
  break;
3300
- case o.DOLLY:
3310
+ case s.DOLLY:
3301
3311
  if (e.enableZoom === !1)
3302
3312
  return;
3303
- kt(r);
3313
+ Pt(r);
3304
3314
  break;
3305
- case o.PAN:
3315
+ case s.PAN:
3306
3316
  if (e.enablePan === !1)
3307
3317
  return;
3308
- Ze(r);
3318
+ Xe(r);
3309
3319
  break;
3310
3320
  }
3311
3321
  }
3312
3322
  function bt(r) {
3313
- e.enabled === !1 || e.enableZoom === !1 || s !== o.NONE || (r.preventDefault(), e.dispatchEvent($t), Je(yt(r)), e.dispatchEvent(rn));
3323
+ e.enabled === !1 || e.enableZoom === !1 || o !== s.NONE || (r.preventDefault(), e.dispatchEvent($t), Ze(yt(r)), e.dispatchEvent(rn));
3314
3324
  }
3315
3325
  function yt(r) {
3316
3326
  const y = r.deltaMode, O = {
@@ -3329,30 +3339,30 @@ class Pi extends un {
3329
3339
  return r.ctrlKey && !w && (O.deltaY *= 10), O;
3330
3340
  }
3331
3341
  function Et(r) {
3332
- r.key === "Control" && (w = !0, e.domElement.getRootNode().addEventListener("keyup", xe, { passive: !0, capture: !0 }));
3342
+ r.key === "Control" && (w = !0, e.domElement.getRootNode().addEventListener("keyup", Se, { passive: !0, capture: !0 }));
3333
3343
  }
3334
- function xe(r) {
3335
- r.key === "Control" && (w = !1, e.domElement.getRootNode().removeEventListener("keyup", xe, { passive: !0, capture: !0 }));
3344
+ function Se(r) {
3345
+ r.key === "Control" && (w = !1, e.domElement.getRootNode().removeEventListener("keyup", Se, { passive: !0, capture: !0 }));
3336
3346
  }
3337
- function tt(r) {
3338
- e.enabled === !1 || e.enablePan === !1 || ze(r);
3347
+ function et(r) {
3348
+ e.enabled === !1 || e.enablePan === !1 || $e(r);
3339
3349
  }
3340
- function nt(r) {
3341
- switch (xt(r), f.length) {
3350
+ function tt(r) {
3351
+ switch (xt(r), d.length) {
3342
3352
  case 1:
3343
3353
  switch (e.touches.ONE) {
3344
3354
  case We.ROTATE:
3345
3355
  if (e.enableRotate === !1)
3346
3356
  return;
3347
- Ye(r), s = o.TOUCH_ROTATE;
3357
+ ze(r), o = s.TOUCH_ROTATE;
3348
3358
  break;
3349
3359
  case We.PAN:
3350
3360
  if (e.enablePan === !1)
3351
3361
  return;
3352
- Me(r), s = o.TOUCH_PAN;
3362
+ Oe(r), o = s.TOUCH_PAN;
3353
3363
  break;
3354
3364
  default:
3355
- s = o.NONE;
3365
+ o = s.NONE;
3356
3366
  }
3357
3367
  break;
3358
3368
  case 2:
@@ -3360,59 +3370,59 @@ class Pi extends un {
3360
3370
  case We.DOLLY_PAN:
3361
3371
  if (e.enableZoom === !1 && e.enablePan === !1)
3362
3372
  return;
3363
- pt(r), s = o.TOUCH_DOLLY_PAN;
3373
+ pt(r), o = s.TOUCH_DOLLY_PAN;
3364
3374
  break;
3365
3375
  case We.DOLLY_ROTATE:
3366
3376
  if (e.enableZoom === !1 && e.enableRotate === !1)
3367
3377
  return;
3368
- _t(r), s = o.TOUCH_DOLLY_ROTATE;
3378
+ kt(r), o = s.TOUCH_DOLLY_ROTATE;
3369
3379
  break;
3370
3380
  default:
3371
- s = o.NONE;
3381
+ o = s.NONE;
3372
3382
  }
3373
3383
  break;
3374
3384
  default:
3375
- s = o.NONE;
3385
+ o = s.NONE;
3376
3386
  }
3377
- s !== o.NONE && e.dispatchEvent($t);
3387
+ o !== s.NONE && e.dispatchEvent($t);
3378
3388
  }
3379
3389
  function Ct(r) {
3380
- switch (xt(r), s) {
3381
- case o.TOUCH_ROTATE:
3390
+ switch (xt(r), o) {
3391
+ case s.TOUCH_ROTATE:
3382
3392
  if (e.enableRotate === !1)
3383
3393
  return;
3384
3394
  mt(r), e.update();
3385
3395
  break;
3386
- case o.TOUCH_PAN:
3396
+ case s.TOUCH_PAN:
3387
3397
  if (e.enablePan === !1)
3388
3398
  return;
3389
- Te(r), e.update();
3399
+ Me(r), e.update();
3390
3400
  break;
3391
- case o.TOUCH_DOLLY_PAN:
3401
+ case s.TOUCH_DOLLY_PAN:
3392
3402
  if (e.enableZoom === !1 && e.enablePan === !1)
3393
3403
  return;
3394
3404
  vt(r), e.update();
3395
3405
  break;
3396
- case o.TOUCH_DOLLY_ROTATE:
3406
+ case s.TOUCH_DOLLY_ROTATE:
3397
3407
  if (e.enableZoom === !1 && e.enableRotate === !1)
3398
3408
  return;
3399
3409
  gt(r), e.update();
3400
3410
  break;
3401
3411
  default:
3402
- s = o.NONE;
3412
+ o = s.NONE;
3403
3413
  }
3404
3414
  }
3405
- function Ge(r) {
3415
+ function Ye(r) {
3406
3416
  e.enabled !== !1 && r.preventDefault();
3407
3417
  }
3408
3418
  function Dt(r) {
3409
- f.push(r.pointerId);
3419
+ d.push(r.pointerId);
3410
3420
  }
3411
3421
  function It(r) {
3412
3422
  delete m[r.pointerId];
3413
- for (let y = 0; y < f.length; y++)
3414
- if (f[y] == r.pointerId) {
3415
- f.splice(y, 1);
3423
+ for (let y = 0; y < d.length; y++)
3424
+ if (d[y] == r.pointerId) {
3425
+ d.splice(y, 1);
3416
3426
  return;
3417
3427
  }
3418
3428
  }
@@ -3420,102 +3430,102 @@ class Pi extends un {
3420
3430
  let y = m[r.pointerId];
3421
3431
  y === void 0 && (y = new ue(), m[r.pointerId] = y), y.set(r.pageX, r.pageY);
3422
3432
  }
3423
- function Se(r) {
3424
- const y = r.pointerId === f[0] ? f[1] : f[0];
3433
+ function we(r) {
3434
+ const y = r.pointerId === d[0] ? d[1] : d[0];
3425
3435
  return m[y];
3426
3436
  }
3427
- e.domElement.addEventListener("contextmenu", Ge), e.domElement.addEventListener("pointerdown", Pe), e.domElement.addEventListener("pointercancel", Ae), e.domElement.addEventListener("wheel", bt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", Et, { passive: !0, capture: !0 }), this.update();
3437
+ e.domElement.addEventListener("contextmenu", Ye), e.domElement.addEventListener("pointerdown", Re), e.domElement.addEventListener("pointercancel", _e), e.domElement.addEventListener("wheel", bt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", Et, { passive: !0, capture: !0 }), this.update();
3428
3438
  }
3429
3439
  }
3430
3440
  const Mt = (t) => {
3431
- const [n, a] = oe(t.options[t.index]), e = () => {
3441
+ const [n, a] = se(t.options[t.index]), e = () => {
3432
3442
  t.onToggle(!t.open);
3433
- }, o = (s) => {
3434
- s !== n && (t.onSelect(s), a(s)), t.onToggle(!1);
3443
+ }, s = (o) => {
3444
+ o !== n && (t.onSelect(o), a(o)), t.onToggle(!1);
3435
3445
  };
3436
3446
  return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
3437
3447
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3438
- t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ l.jsx("li", { onClick: () => o(s), children: s }, s)) })
3448
+ t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((o) => /* @__PURE__ */ l.jsx("li", { onClick: () => s(o), children: o }, o)) })
3439
3449
  ] });
3440
- }, Le = Ra(function(n, a) {
3441
- const [e, o] = oe(!1), s = n.options.indexOf(n.camera.name);
3450
+ }, Ie = Ta(function(n, a) {
3451
+ const [e, s] = se(!1), o = n.options.indexOf(n.camera.name);
3442
3452
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3443
3453
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3444
- e && o(!1);
3454
+ e && s(!1);
3445
3455
  } }),
3446
3456
  /* @__PURE__ */ l.jsx(
3447
3457
  Mt,
3448
3458
  {
3449
- index: s,
3459
+ index: o,
3450
3460
  open: e,
3451
3461
  options: n.options,
3452
3462
  onSelect: n.onSelect,
3453
3463
  onToggle: (p) => {
3454
- o(p);
3464
+ s(p);
3455
3465
  },
3456
3466
  up: !0
3457
3467
  }
3458
3468
  )
3459
3469
  ] });
3460
- }), sn = [
3470
+ }), on = [
3461
3471
  "Single",
3462
3472
  "Side by Side",
3463
3473
  "Stacked",
3464
3474
  "Quad"
3465
- ], ne = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map();
3466
- function $e(t, n) {
3475
+ ], ne = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), be = /* @__PURE__ */ new Map();
3476
+ function Ue(t, n) {
3467
3477
  const a = new Rn(-100, 100, 100, -100, 50, 3e3);
3468
3478
  return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
3469
3479
  }
3470
- $e("Top", new X(0, 1e3, 0));
3471
- $e("Bottom", new X(0, -1e3, 0));
3472
- $e("Left", new X(-1e3, 0, 0));
3473
- $e("Right", new X(1e3, 0, 0));
3474
- $e("Front", new X(0, 0, 1e3));
3475
- $e("Back", new X(0, 0, -1e3));
3476
- $e("Orthographic", new X(1e3, 1e3, 1e3));
3477
- const Pt = new zt(60, 1, 50, 3e3);
3478
- Pt.name = "Debug";
3479
- Pt.position.set(500, 500, 500);
3480
- Pt.lookAt(0, 0, 0);
3481
- ne.set("Debug", Pt);
3480
+ Ue("Top", new X(0, 1e3, 0));
3481
+ Ue("Bottom", new X(0, -1e3, 0));
3482
+ Ue("Left", new X(-1e3, 0, 0));
3483
+ Ue("Right", new X(1e3, 0, 0));
3484
+ Ue("Front", new X(0, 0, 1e3));
3485
+ Ue("Back", new X(0, 0, -1e3));
3486
+ Ue("Orthographic", new X(1e3, 1e3, 1e3));
3487
+ const _t = new zt(60, 1, 50, 3e3);
3488
+ _t.name = "Debug";
3489
+ _t.position.set(500, 500, 500);
3490
+ _t.lookAt(0, 0, 0);
3491
+ ne.set("Debug", _t);
3482
3492
  const cn = [
3483
3493
  "Renderer",
3484
3494
  "Depth",
3485
3495
  "Normals",
3486
3496
  "UVs",
3487
3497
  "Wireframe"
3488
- ], Ai = new va(), ki = new ga(), _i = new si(), ji = new ba({
3498
+ ], Ei = new ma(), Ci = new va(), xi = new Za(), Si = new ga({
3489
3499
  opacity: 0.33,
3490
3500
  transparent: !0,
3491
3501
  wireframe: !0
3492
3502
  });
3493
3503
  let wt = "Renderer";
3494
- const V = new Pn();
3504
+ const V = new _n();
3495
3505
  V.name = "Debug Scene";
3496
- let be = new Pn();
3497
- V.add(be);
3498
- const dt = new ya();
3506
+ let ye = new _n();
3507
+ V.add(ye);
3508
+ const dt = new ba();
3499
3509
  dt.name = "helpers";
3500
3510
  V.add(dt);
3501
- const Di = new ii();
3502
- dt.add(Di);
3503
- const $n = new An(500);
3504
- $n.name = "axisHelper";
3505
- dt.add($n);
3511
+ const wi = new qa();
3512
+ dt.add(wi);
3513
+ const Un = new An(500);
3514
+ Un.name = "axisHelper";
3515
+ dt.add(Un);
3506
3516
  const ut = new An(100);
3507
3517
  ut.name = "interactionHelper";
3508
3518
  dt.add(ut);
3509
3519
  ut.visible = !1;
3510
- let Ot = !1, G = ne.get("Debug"), re = ne.get("Orthographic"), Ne = ne.get("Front"), Fe = ne.get("Top"), ln = !1;
3511
- function qi(t) {
3512
- const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, o] = oe(null), [s, p] = oe(!1), [c, u] = oe(!1), [d, v] = oe(!1), [, b] = oe(Date.now()), E = ye(null), x = ye(null), M = ye(null), k = ye(null), H = ye(null), B = ye(null), S = (f, m) => {
3513
- const w = ie.get(f.name);
3514
- w !== void 0 && w.dispose(), ie.delete(f.name);
3515
- const P = ge.get(f.name);
3516
- P !== void 0 && (V.remove(P), P.dispose()), ge.delete(f.name);
3517
- const Y = new Pi(f, m);
3518
- switch (Y.enableDamping = !0, Y.dampingFactor = 0.05, f.name) {
3520
+ let Ot = !1, G = ne.get("Debug"), re = ne.get("Orthographic"), Le = ne.get("Front"), Ne = ne.get("Top"), ln = !1;
3521
+ function $i(t) {
3522
+ const [n, a] = se(t.mode !== void 0 ? t.mode : "Single"), [e, s] = se(null), [o, p] = se(!1), [c, u] = se(!1), [f, v] = se(!1), [, b] = se(Date.now()), E = Ee(null), x = Ee(null), M = Ee(null), P = Ee(null), W = Ee(null), B = Ee(null), S = (d, m) => {
3523
+ const w = ie.get(d.name);
3524
+ w !== void 0 && w.dispose(), ie.delete(d.name);
3525
+ const _ = be.get(d.name);
3526
+ _ !== void 0 && (V.remove(_), _.dispose()), be.delete(d.name);
3527
+ const Y = new yi(d, m);
3528
+ switch (Y.enableDamping = !0, Y.dampingFactor = 0.05, d.name) {
3519
3529
  case "Top":
3520
3530
  case "Bottom":
3521
3531
  case "Left":
@@ -3525,21 +3535,21 @@ function qi(t) {
3525
3535
  Y.enableRotate = !1;
3526
3536
  break;
3527
3537
  }
3528
- if (ie.set(f.name, Y), f instanceof zt) {
3529
- const U = new xa(f);
3530
- ge.set(f.name, U), V.add(U);
3531
- }
3532
- }, z = (f) => {
3533
- const m = ge.get(f.name);
3534
- m !== void 0 && (V.remove(m), m.dispose(), ge.delete(f.name));
3535
- const w = ie.get(f.name);
3536
- w !== void 0 && (w.dispose(), ie.delete(f.name));
3537
- }, Ee = () => {
3538
- ie.forEach((f, m) => {
3539
- f.dispose();
3540
- const w = ge.get(m);
3541
- w !== void 0 && (V.remove(w), w.dispose()), ge.delete(m), ie.delete(m);
3542
- }), ie.clear(), ge.clear();
3538
+ if (ie.set(d.name, Y), d instanceof zt) {
3539
+ const U = new Ca(d);
3540
+ be.set(d.name, U), V.add(U);
3541
+ }
3542
+ }, z = (d) => {
3543
+ const m = be.get(d.name);
3544
+ m !== void 0 && (V.remove(m), m.dispose(), be.delete(d.name));
3545
+ const w = ie.get(d.name);
3546
+ w !== void 0 && (w.dispose(), ie.delete(d.name));
3547
+ }, Ce = () => {
3548
+ ie.forEach((d, m) => {
3549
+ d.dispose();
3550
+ const w = be.get(m);
3551
+ w !== void 0 && (V.remove(w), w.dispose()), be.delete(m), ie.delete(m);
3552
+ }), ie.clear(), be.clear();
3543
3553
  }, le = () => {
3544
3554
  switch (n) {
3545
3555
  case "Single":
@@ -3547,73 +3557,73 @@ function qi(t) {
3547
3557
  break;
3548
3558
  case "Side by Side":
3549
3559
  case "Stacked":
3550
- S(G, M.current), S(re, k.current);
3560
+ S(G, M.current), S(re, P.current);
3551
3561
  break;
3552
3562
  case "Quad":
3553
- S(G, M.current), S(re, k.current), S(Ne, H.current), S(Fe, B.current);
3563
+ S(G, M.current), S(re, P.current), S(Le, W.current), S(Ne, B.current);
3554
3564
  break;
3555
3565
  }
3556
3566
  };
3557
- Be(() => {
3558
- const f = new Ea({
3567
+ Fe(() => {
3568
+ const d = new ya({
3559
3569
  canvas: E.current,
3560
3570
  stencil: !1
3561
3571
  });
3562
- f.autoClear = !1, f.shadowMap.enabled = !0, f.setPixelRatio(devicePixelRatio), f.setClearColor(0), o(f);
3563
- }, []), Be(() => {
3564
- const f = (P) => {
3565
- Dn(be), V.remove(be);
3566
- const Y = t.scenes.get(P.value.name);
3572
+ d.autoClear = !1, d.shadowMap.enabled = !0, d.setPixelRatio(devicePixelRatio), d.setClearColor(0), s(d);
3573
+ }, []), Fe(() => {
3574
+ const d = (_) => {
3575
+ Dn(ye), V.remove(ye);
3576
+ const Y = t.scenes.get(_.value.name);
3567
3577
  if (Y !== void 0) {
3568
3578
  const U = new Y();
3569
- t.onSceneSet !== void 0 && t.onSceneSet(U), be = U, t.three.scene = be, V.add(be), ln = !0;
3579
+ t.onSceneSet !== void 0 && t.onSceneSet(U), ye = U, t.three.scene = ye, V.add(ye), ln = !0;
3570
3580
  }
3571
- }, m = (P) => {
3572
- const Y = P.value, U = t.three.scene?.getObjectByProperty("uuid", Y.uuid);
3581
+ }, m = (_) => {
3582
+ const Y = _.value, U = t.three.scene?.getObjectByProperty("uuid", Y.uuid);
3573
3583
  U !== void 0 && ne.set(Y.name, U), b(Date.now());
3574
- }, w = (P) => {
3575
- ne.delete(P.value.name), b(Date.now());
3584
+ }, w = (_) => {
3585
+ ne.delete(_.value.name), b(Date.now());
3576
3586
  };
3577
- return _.addEventListener(j.SET_SCENE, f), _.addEventListener(j.ADD_CAMERA, m), _.addEventListener(j.REMOVE_CAMERA, w), () => {
3578
- _.removeEventListener(j.SET_SCENE, f), _.removeEventListener(j.ADD_CAMERA, m), _.removeEventListener(j.REMOVE_CAMERA, w);
3587
+ return k.addEventListener(j.SET_SCENE, d), k.addEventListener(j.ADD_CAMERA, m), k.addEventListener(j.REMOVE_CAMERA, w), () => {
3588
+ k.removeEventListener(j.SET_SCENE, d), k.removeEventListener(j.ADD_CAMERA, m), k.removeEventListener(j.REMOVE_CAMERA, w);
3579
3589
  };
3580
- }, []), Be(() => {
3590
+ }, []), Fe(() => {
3581
3591
  if (e === null)
3582
3592
  return;
3583
- let f = window.innerWidth, m = window.innerHeight, w = Math.floor(f / 2), P = Math.floor(m / 2), Y = -1;
3593
+ let d = window.innerWidth, m = window.innerHeight, w = Math.floor(d / 2), _ = Math.floor(m / 2), Y = -1;
3584
3594
  const U = () => {
3585
- f = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(f / 2), P = Math.floor(m / 2), e.setSize(f, m);
3586
- let T = f, N = m;
3595
+ d = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(d / 2), _ = Math.floor(m / 2), e.setSize(d, m);
3596
+ let T = d, N = m;
3587
3597
  switch (n) {
3588
3598
  case "Side by Side":
3589
3599
  T = w, N = m;
3590
3600
  break;
3591
3601
  case "Stacked":
3592
- T = f, N = P;
3602
+ T = d, N = _;
3593
3603
  break;
3594
3604
  case "Quad":
3595
- T = w, N = P;
3605
+ T = w, N = _;
3596
3606
  break;
3597
3607
  }
3598
3608
  ne.forEach((J) => {
3599
- J instanceof Rn ? (J.left = T / -2, J.right = T / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof zt && (J.aspect = T / N, J.updateProjectionMatrix(), ge.get(J.name)?.update());
3609
+ J instanceof Rn ? (J.left = T / -2, J.right = T / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof zt && (J.aspect = T / N, J.updateProjectionMatrix(), be.get(J.name)?.update());
3600
3610
  });
3601
3611
  }, $ = () => {
3602
- e.setViewport(0, 0, f, m), e.setScissor(0, 0, f, m), e.render(V, G);
3612
+ e.setViewport(0, 0, d, m), e.setScissor(0, 0, d, m), e.render(V, G);
3603
3613
  }, I = () => {
3604
3614
  if (n === "Side by Side")
3605
3615
  e.setViewport(0, 0, w, m), e.setScissor(0, 0, w, m), e.render(V, G), e.setViewport(w, 0, w, m), e.setScissor(w, 0, w, m), e.render(V, re);
3606
3616
  else {
3607
- const T = m - P;
3608
- e.setViewport(0, T, f, P), e.setScissor(0, T, f, P), e.render(V, G), e.setViewport(0, 0, f, P), e.setScissor(0, 0, f, P), e.render(V, re);
3617
+ const T = m - _;
3618
+ e.setViewport(0, T, d, _), e.setScissor(0, T, d, _), e.render(V, G), e.setViewport(0, 0, d, _), e.setScissor(0, 0, d, _), e.render(V, re);
3609
3619
  }
3610
- }, W = () => {
3620
+ }, H = () => {
3611
3621
  let T = 0, N = 0;
3612
- N = m - P, T = 0, e.setViewport(T, N, w, P), e.setScissor(T, N, w, P), e.render(V, G), T = w, e.setViewport(T, N, w, P), e.setScissor(T, N, w, P), e.render(V, re), N = 0, T = 0, e.setViewport(T, N, w, P), e.setScissor(T, N, w, P), e.render(V, Ne), T = w, e.setViewport(T, N, w, P), e.setScissor(T, N, w, P), e.render(V, Fe);
3622
+ N = m - _, T = 0, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, G), T = w, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, re), N = 0, T = 0, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, Le), T = w, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, Ne);
3613
3623
  }, q = () => {
3614
3624
  switch (ie.forEach((T) => {
3615
3625
  T.update();
3616
- }), t.onSceneUpdate !== void 0 && ln && t.onSceneUpdate(be), e.clear(), n) {
3626
+ }), t.onSceneUpdate !== void 0 && ln && t.onSceneUpdate(ye), e.clear(), n) {
3617
3627
  case "Single":
3618
3628
  $();
3619
3629
  break;
@@ -3622,7 +3632,7 @@ function qi(t) {
3622
3632
  I();
3623
3633
  break;
3624
3634
  case "Quad":
3625
- W();
3635
+ H();
3626
3636
  break;
3627
3637
  }
3628
3638
  Y = requestAnimationFrame(q);
@@ -3630,34 +3640,34 @@ function qi(t) {
3630
3640
  return le(), window.addEventListener("resize", U), U(), q(), () => {
3631
3641
  window.removeEventListener("resize", U), cancelAnimationFrame(Y), Y = -1;
3632
3642
  };
3633
- }, [n, e]), Be(() => {
3643
+ }, [n, e]), Fe(() => {
3634
3644
  if (e !== null) {
3635
- const f = new Ca(), m = new ue(), w = ($, I, W, q) => {
3645
+ const d = new Ea(), m = new ue(), w = ($, I, H, q) => {
3636
3646
  switch (n) {
3637
3647
  case "Quad":
3638
- $ < W ? I < q ? f.setFromCamera(m, G) : f.setFromCamera(m, Ne) : I < q ? f.setFromCamera(m, re) : f.setFromCamera(m, Fe);
3648
+ $ < H ? I < q ? d.setFromCamera(m, G) : d.setFromCamera(m, Le) : I < q ? d.setFromCamera(m, re) : d.setFromCamera(m, Ne);
3639
3649
  break;
3640
3650
  case "Side by Side":
3641
- $ < W ? f.setFromCamera(m, G) : f.setFromCamera(m, re);
3651
+ $ < H ? d.setFromCamera(m, G) : d.setFromCamera(m, re);
3642
3652
  break;
3643
3653
  case "Single":
3644
- f.setFromCamera(m, G);
3654
+ d.setFromCamera(m, G);
3645
3655
  break;
3646
3656
  case "Stacked":
3647
- I < q ? f.setFromCamera(m, G) : f.setFromCamera(m, re);
3657
+ I < q ? d.setFromCamera(m, G) : d.setFromCamera(m, re);
3648
3658
  break;
3649
3659
  }
3650
- }, P = ($) => {
3660
+ }, _ = ($) => {
3651
3661
  if (!Ot)
3652
3662
  return;
3653
3663
  const I = new ue();
3654
3664
  e.getSize(I);
3655
- const W = Math.min($.clientX, I.x), q = Math.min($.clientY, I.y);
3656
- m.x = Ke(W, 0, I.x, -1, 1), m.y = Ke(q, 0, I.y, 1, -1);
3665
+ const H = Math.min($.clientX, I.x), q = Math.min($.clientY, I.y);
3666
+ m.x = qe(H, 0, I.x, -1, 1), m.y = qe(q, 0, I.y, 1, -1);
3657
3667
  const T = I.x / 2, N = I.y / 2, J = () => {
3658
- W < T ? m.x = Ke(W, 0, T, -1, 1) : m.x = Ke(W, T, I.x, -1, 1);
3668
+ H < T ? m.x = qe(H, 0, T, -1, 1) : m.x = qe(H, T, I.x, -1, 1);
3659
3669
  }, me = () => {
3660
- q < N ? m.y = Ke(q, 0, N, 1, -1) : m.y = Ke(q, N, I.y, 1, -1);
3670
+ q < N ? m.y = qe(q, 0, N, 1, -1) : m.y = qe(q, N, I.y, 1, -1);
3661
3671
  };
3662
3672
  switch (n) {
3663
3673
  case "Quad":
@@ -3670,67 +3680,67 @@ function qi(t) {
3670
3680
  me(), me();
3671
3681
  break;
3672
3682
  }
3673
- w(W, q, T, N);
3674
- const Ce = f.intersectObjects(be.children);
3675
- Ce.length > 0 && ut.position.copy(Ce[0].point);
3683
+ w(H, q, T, N);
3684
+ const xe = d.intersectObjects(ye.children);
3685
+ xe.length > 0 && ut.position.copy(xe[0].point);
3676
3686
  }, Y = ($) => {
3677
3687
  if (!Ot)
3678
3688
  return;
3679
3689
  const I = new ue();
3680
3690
  if (e.getSize(I), $.clientX >= I.x)
3681
3691
  return;
3682
- P($);
3683
- const W = f.intersectObjects(be.children);
3684
- W.length > 0 && t.three.getObject(W[0].object.uuid);
3692
+ _($);
3693
+ const H = d.intersectObjects(ye.children);
3694
+ H.length > 0 && t.three.getObject(H[0].object.uuid);
3685
3695
  }, U = x.current;
3686
- return U.addEventListener("mousemove", P, !1), U.addEventListener("click", Y, !1), () => {
3687
- U.removeEventListener("mousemove", P), U.removeEventListener("click", Y);
3696
+ return U.addEventListener("mousemove", _, !1), U.addEventListener("click", Y, !1), () => {
3697
+ U.removeEventListener("mousemove", _), U.removeEventListener("click", Y);
3688
3698
  };
3689
3699
  }
3690
3700
  }, [n, e]);
3691
- const se = [];
3692
- return ne.forEach((f, m) => {
3693
- se.push(m);
3701
+ const oe = [];
3702
+ return ne.forEach((d, m) => {
3703
+ oe.push(m);
3694
3704
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3695
3705
  /* @__PURE__ */ l.jsx("canvas", { ref: E }),
3696
3706
  /* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: x, children: [
3697
- n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Le, { camera: G, options: se, ref: M, onSelect: (f) => {
3707
+ n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ie, { camera: G, options: oe, ref: M, onSelect: (d) => {
3698
3708
  ie.get(G.name)?.dispose();
3699
- const m = ne.get(f);
3709
+ const m = ne.get(d);
3700
3710
  m !== void 0 && (z(G), G = m, S(m, M.current));
3701
3711
  } }) }),
3702
3712
  (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3703
- /* @__PURE__ */ l.jsx(Le, { camera: G, options: se, ref: M, onSelect: (f) => {
3713
+ /* @__PURE__ */ l.jsx(Ie, { camera: G, options: oe, ref: M, onSelect: (d) => {
3704
3714
  ie.get(G.name)?.dispose();
3705
- const m = ne.get(f);
3715
+ const m = ne.get(d);
3706
3716
  m !== void 0 && (z(G), G = m, S(m, M.current));
3707
3717
  } }),
3708
- /* @__PURE__ */ l.jsx(Le, { camera: re, options: se, ref: k, onSelect: (f) => {
3718
+ /* @__PURE__ */ l.jsx(Ie, { camera: re, options: oe, ref: P, onSelect: (d) => {
3709
3719
  ie.get(re.name)?.dispose();
3710
- const m = ne.get(f);
3711
- m !== void 0 && (z(re), re = m, S(m, k.current));
3720
+ const m = ne.get(d);
3721
+ m !== void 0 && (z(re), re = m, S(m, P.current));
3712
3722
  } })
3713
3723
  ] }),
3714
3724
  n === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3715
- /* @__PURE__ */ l.jsx(Le, { camera: G, options: se, ref: M, onSelect: (f) => {
3725
+ /* @__PURE__ */ l.jsx(Ie, { camera: G, options: oe, ref: M, onSelect: (d) => {
3716
3726
  ie.get(G.name)?.dispose();
3717
- const m = ne.get(f);
3727
+ const m = ne.get(d);
3718
3728
  m !== void 0 && (z(G), G = m, S(m, M.current));
3719
3729
  } }),
3720
- /* @__PURE__ */ l.jsx(Le, { camera: re, options: se, ref: k, onSelect: (f) => {
3730
+ /* @__PURE__ */ l.jsx(Ie, { camera: re, options: oe, ref: P, onSelect: (d) => {
3721
3731
  ie.get(re.name)?.dispose();
3722
- const m = ne.get(f);
3723
- m !== void 0 && (z(re), re = m, S(m, k.current));
3732
+ const m = ne.get(d);
3733
+ m !== void 0 && (z(re), re = m, S(m, P.current));
3724
3734
  } }),
3725
- /* @__PURE__ */ l.jsx(Le, { camera: Ne, options: se, ref: H, onSelect: (f) => {
3726
- ie.get(Ne.name)?.dispose();
3727
- const m = ne.get(f);
3728
- m !== void 0 && (z(Ne), Ne = m, S(m, H.current));
3735
+ /* @__PURE__ */ l.jsx(Ie, { camera: Le, options: oe, ref: W, onSelect: (d) => {
3736
+ ie.get(Le.name)?.dispose();
3737
+ const m = ne.get(d);
3738
+ m !== void 0 && (z(Le), Le = m, S(m, W.current));
3729
3739
  } }),
3730
- /* @__PURE__ */ l.jsx(Le, { camera: Fe, options: se, ref: B, onSelect: (f) => {
3731
- ie.get(Fe.name)?.dispose();
3732
- const m = ne.get(f);
3733
- m !== void 0 && (z(Fe), Fe = m, S(m, B.current));
3740
+ /* @__PURE__ */ l.jsx(Ie, { camera: Ne, options: oe, ref: B, onSelect: (d) => {
3741
+ ie.get(Ne.name)?.dispose();
3742
+ const m = ne.get(d);
3743
+ m !== void 0 && (z(Ne), Ne = m, S(m, B.current));
3734
3744
  } })
3735
3745
  ] })
3736
3746
  ] }),
@@ -3738,14 +3748,14 @@ function qi(t) {
3738
3748
  /* @__PURE__ */ l.jsx(
3739
3749
  Mt,
3740
3750
  {
3741
- index: sn.indexOf(n),
3742
- options: sn,
3743
- onSelect: (f) => {
3744
- f !== n && (Ee(), a(f));
3751
+ index: on.indexOf(n),
3752
+ options: on,
3753
+ onSelect: (d) => {
3754
+ d !== n && (Ce(), a(d));
3745
3755
  },
3746
- open: s,
3747
- onToggle: (f) => {
3748
- p(f), c && u(!1), d && v(!1);
3756
+ open: o,
3757
+ onToggle: (d) => {
3758
+ p(d), c && u(!1), f && v(!1);
3749
3759
  }
3750
3760
  }
3751
3761
  ),
@@ -3754,30 +3764,30 @@ function qi(t) {
3754
3764
  {
3755
3765
  index: cn.indexOf(wt),
3756
3766
  options: cn,
3757
- onSelect: (f) => {
3758
- if (f !== wt)
3759
- switch (wt = f, wt) {
3767
+ onSelect: (d) => {
3768
+ if (d !== wt)
3769
+ switch (wt = d, wt) {
3760
3770
  case "Depth":
3761
- V.overrideMaterial = Ai;
3771
+ V.overrideMaterial = Ei;
3762
3772
  break;
3763
3773
  case "Normals":
3764
- V.overrideMaterial = ki;
3774
+ V.overrideMaterial = Ci;
3765
3775
  break;
3766
3776
  default:
3767
3777
  case "Renderer":
3768
3778
  V.overrideMaterial = null;
3769
3779
  break;
3770
3780
  case "Wireframe":
3771
- V.overrideMaterial = ji;
3781
+ V.overrideMaterial = Si;
3772
3782
  break;
3773
3783
  case "UVs":
3774
- V.overrideMaterial = _i;
3784
+ V.overrideMaterial = xi;
3775
3785
  break;
3776
3786
  }
3777
3787
  },
3778
3788
  open: c,
3779
- onToggle: (f) => {
3780
- s && p(!1), u(f), d && v(!1);
3789
+ onToggle: (d) => {
3790
+ o && p(!1), u(d), f && v(!1);
3781
3791
  }
3782
3792
  }
3783
3793
  ),
@@ -3789,19 +3799,19 @@ function qi(t) {
3789
3799
  "Orbit Mode",
3790
3800
  "Selection Mode"
3791
3801
  ],
3792
- onSelect: (f) => {
3793
- Ot = f === "Selection Mode", ut.visible = Ot;
3802
+ onSelect: (d) => {
3803
+ Ot = d === "Selection Mode", ut.visible = Ot;
3794
3804
  },
3795
- open: d,
3796
- onToggle: (f) => {
3797
- s && p(!1), c && u(!1), v(f);
3805
+ open: f,
3806
+ onToggle: (d) => {
3807
+ o && p(!1), c && u(!1), v(d);
3798
3808
  }
3799
3809
  }
3800
3810
  )
3801
3811
  ] })
3802
3812
  ] });
3803
3813
  }
3804
- function Ki(t) {
3814
+ function zi(t) {
3805
3815
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3806
3816
  /* @__PURE__ */ l.jsx("header", { children: t.header }),
3807
3817
  t.children,
@@ -3809,41 +3819,41 @@ function Ki(t) {
3809
3819
  ] });
3810
3820
  }
3811
3821
  export {
3812
- Ht as Accordion,
3813
- Gi as Application,
3822
+ Wt as Accordion,
3823
+ Di as Application,
3814
3824
  Rt as BaseRemote,
3815
- Bn as ChildObject,
3816
- ci as ContainerObject,
3817
- Ja as Draggable,
3818
- Za as DraggableItem,
3819
- Qa as Dropdown,
3820
- ei as DropdownItem,
3821
- Ki as Editor,
3822
- ii as InfiniteGridHelper,
3823
- Ti as Inspector,
3824
- qi as MultiView,
3825
- Fn as NavButton,
3826
- Da as RemoteComponents,
3827
- Vi as RemoteController,
3828
- Oe as RemoteTheatre,
3829
- Ya as RemoteThree,
3830
- Nn as RemoteTweakpane,
3831
- Wi as SceneInspector,
3832
- Hi as SidePanel,
3825
+ Fn as ChildObject,
3826
+ Ja as ContainerObject,
3827
+ za as Draggable,
3828
+ $a as DraggableItem,
3829
+ Ya as Dropdown,
3830
+ Ga as DropdownItem,
3831
+ zi as Editor,
3832
+ qa as InfiniteGridHelper,
3833
+ gi as Inspector,
3834
+ $i as MultiView,
3835
+ Nn as NavButton,
3836
+ Ii as RemoteComponents,
3837
+ Fi as RemoteController,
3838
+ ot as RemoteTheatre,
3839
+ Li as RemoteThree,
3840
+ Ni as RemoteTweakpane,
3841
+ Ui as SceneInspector,
3842
+ Bi as SidePanel,
3833
3843
  j as ToolEvents,
3834
- si as UVMaterial,
3844
+ Za as UVMaterial,
3835
3845
  lt as capitalize,
3836
- $i as clamp,
3837
- ka as colorToHex,
3838
- _ as debugDispatcher,
3846
+ Pi as clamp,
3847
+ Aa as colorToHex,
3848
+ k as debugDispatcher,
3839
3849
  Dn as dispose,
3840
- ja as disposeMaterial,
3841
- Yi as disposeTexture,
3842
- zi as distance,
3850
+ ka as disposeMaterial,
3851
+ ji as disposeTexture,
3852
+ ki as distance,
3843
3853
  jn as hierarchyUUID,
3844
- Aa as isColor,
3845
- Pa as randomID,
3846
- _a as resetThreeObjects,
3854
+ _a as isColor,
3855
+ Ra as randomID,
3856
+ Pa as resetThreeObjects,
3847
3857
  Ft as round,
3848
3858
  Yt as totalThreeObjects
3849
3859
  };