@tomorrowevening/hermes 0.0.9 → 0.0.11

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 (34) hide show
  1. package/dist/hermes.js +1068 -1038
  2. package/dist/hermes.umd.cjs +16 -16
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/src/core/RemoteController.ts +0 -3
  6. package/src/core/remote/RemoteThree.ts +5 -10
  7. package/src/core/types.ts +0 -1
  8. package/src/editor/global.ts +0 -1
  9. package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiView.scss +6 -0
  10. package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiView.tsx +103 -55
  11. package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiViewData.ts +7 -15
  12. package/src/editor/sceneHierarchy/SceneHierarchy.tsx +7 -21
  13. package/src/editor/sceneHierarchy/inspector/SceneInspector.tsx +16 -11
  14. package/src/editor/sceneHierarchy/inspector/utils/InspectMaterial.tsx +1 -0
  15. package/src/editor/sceneHierarchy/inspector/utils/InspectTransform.tsx +35 -46
  16. package/src/editor/utils.ts +60 -4
  17. package/src/index.ts +3 -3
  18. package/types/core/remote/RemoteThree.d.ts +0 -1
  19. package/types/core/types.d.ts +1 -1
  20. package/types/editor/global.d.ts +0 -1
  21. package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiView.d.ts +2 -4
  22. package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiViewData.d.ts +4 -4
  23. package/types/editor/sceneHierarchy/SceneHierarchy.d.ts +0 -2
  24. package/types/editor/sceneHierarchy/inspector/SceneInspector.d.ts +0 -2
  25. package/types/editor/utils.d.ts +7 -1
  26. package/types/index.d.ts +3 -3
  27. /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/CameraWindow.tsx +0 -0
  28. /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridHelper.ts +0 -0
  29. /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridMaterial.ts +0 -0
  30. /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/UVMaterial.ts +0 -0
  31. /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/CameraWindow.d.ts +0 -0
  32. /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridHelper.d.ts +0 -0
  33. /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridMaterial.d.ts +0 -0
  34. /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/UVMaterial.d.ts +0 -0
package/dist/hermes.js CHANGED
@@ -1,48 +1,70 @@
1
- var fn = Object.defineProperty;
2
- var hn = (t, n, a) => n in t ? fn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
- var L = (t, n, a) => (hn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
- import { EventDispatcher as Kt, Texture as Xt, CubeTexture as pn, RepeatWrapping as It, ShaderMaterial as qt, GLSL3 as mn, DoubleSide as gn, Color as Pt, Mesh as vn, PlaneGeometry as bn, Matrix4 as yn, Vector3 as I, Euler as En, Ray as xn, Plane as wn, MathUtils as Cn, MOUSE as Le, TOUCH as Fe, Quaternion as At, Spherical as Nt, Vector2 as ae, PerspectiveCamera as St, MeshNormalMaterial as Sn, MeshBasicMaterial as Tn, OrthographicCamera as Zt, Scene as On, AxesHelper as Mn, CameraHelper as Rn } from "three";
5
- import { getProject as Pn } from "@theatre/core";
6
- import { Pane as jn } from "tweakpane";
7
- import * as _n from "@tweakpane/plugin-essentials";
8
- import Jt, { useState as ie, useRef as Oe, useEffect as tt, Component as kn, forwardRef as Dn } from "react";
9
- import { Reorder as Qt } from "framer-motion";
1
+ var bn = Object.defineProperty;
2
+ var yn = (t, n, a) => n in t ? bn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
+ var $ = (t, n, a) => (yn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
+ import { PositionalAudio as En, EventDispatcher as Zt, Texture as Jt, CubeTexture as xn, RepeatWrapping as Lt, ShaderMaterial as Qt, GLSL3 as wn, DoubleSide as Cn, Color as kt, Mesh as Sn, PlaneGeometry as On, Matrix4 as Tn, Vector3 as L, Euler as Rn, Ray as Mn, Plane as Pn, MathUtils as jn, MOUSE as Ne, TOUCH as Le, Quaternion as Ft, Spherical as Ut, Vector2 as oe, PerspectiveCamera as Tt, MeshDepthMaterial as _n, MeshNormalMaterial as kn, MeshBasicMaterial as Dn, OrthographicCamera as en, Scene as tn, AxesHelper as An, WebGLRenderer as In, CameraHelper as Nn } from "three";
5
+ import { getProject as Ln } from "@theatre/core";
6
+ import { Pane as Fn } from "tweakpane";
7
+ import * as Un from "@tweakpane/plugin-essentials";
8
+ import nn, { useState as ne, useRef as ye, useEffect as Be, Component as Bn, forwardRef as $n } from "react";
9
+ import { Reorder as an } from "framer-motion";
10
10
  import Ze from "@theatre/studio";
11
- function Or(t, n, a) {
11
+ function Ba(t, n, a) {
12
12
  return Math.min(n, Math.max(t, a));
13
13
  }
14
- function Mr(t, n) {
14
+ function $a(t, n) {
15
15
  const a = t - n;
16
16
  return Math.sqrt(a * a);
17
17
  }
18
- function In() {
18
+ function Gn() {
19
19
  return Math.round(Math.random() * 1e6).toString();
20
20
  }
21
- function An(t) {
21
+ function Vn(t) {
22
22
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
23
23
  }
24
- function Nn(t) {
24
+ function Yn(t) {
25
25
  const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), o = (d) => {
26
- const m = d.toString(16);
27
- return m.length === 1 ? "0" + m : m;
26
+ const p = d.toString(16);
27
+ return p.length === 1 ? "0" + p : p;
28
28
  }, u = o(n), c = o(a), s = o(e);
29
29
  return "#" + u + c + s;
30
30
  }
31
- let Lt = 0;
32
- const en = (t) => {
31
+ function Ct(t, n = 1) {
32
+ return Number(t.toFixed(n));
33
+ }
34
+ let Rt = 0;
35
+ const zn = () => {
36
+ Rt = 0;
37
+ }, rn = (t) => {
33
38
  if (!t)
34
39
  return;
35
40
  let n = t.name.replace(" ", "");
36
- n.length === 0 && (n = `obj_${Lt}`), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, Lt++, t.children.forEach((a) => {
37
- en(a);
41
+ n.length === 0 && (n = `obj_${Rt}`, Rt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
+ rn(a);
38
43
  });
44
+ }, Ga = (t) => {
45
+ t == null || t.dispose();
46
+ }, Wn = (t) => {
47
+ t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
48
+ }, on = (t) => {
49
+ var n;
50
+ if (t) {
51
+ for (; t.children.length > 0; ) {
52
+ const a = t.children[0];
53
+ a instanceof En ? (a.pause(), a.parent && a.parent.remove(a)) : on(a);
54
+ }
55
+ if (t.parent && t.parent.remove(t), t.isMesh) {
56
+ const a = t;
57
+ (n = a.geometry) == null || n.dispose(), Wn(a.material);
58
+ }
59
+ t.dispose !== void 0 && t.dispose();
60
+ }
39
61
  };
40
- class Rr {
62
+ class Va {
41
63
  constructor(n, a, e) {
42
- L(this, "channel");
43
- L(this, "components", /* @__PURE__ */ new Map());
64
+ $(this, "channel");
65
+ $(this, "components", /* @__PURE__ */ new Map());
44
66
  // Protected
45
- L(this, "_mode", "app");
67
+ $(this, "_mode", "app");
46
68
  this.editor = a && document.location.hash.search(e) > -1, a && (this.channel = new BroadcastChannel(n));
47
69
  }
48
70
  addComponent(n, a) {
@@ -73,13 +95,12 @@ class Rr {
73
95
  n && (this._mode = "editor", document.title += " - Editor");
74
96
  }
75
97
  }
76
- const k = new Kt(), D = {
98
+ const I = new Zt(), N = {
77
99
  CUSTOM: "ToolEvents::custom",
78
100
  // Components
79
101
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
80
102
  DRAG_UPDATE: "ToolEvents::dragUpdate",
81
103
  // SceneHierarchy
82
- GET_SCENE: "ToolEvents::getScene",
83
104
  SET_SCENE: "ToolEvents::setScene",
84
105
  GET_OBJECT: "ToolEvents::getObject",
85
106
  SET_OBJECT: "ToolEvents::setObject",
@@ -87,15 +108,15 @@ const k = new Kt(), D = {
87
108
  CREATE_TEXTURE: "ToolEvents::createTexture",
88
109
  REQUEST_METHOD: "ToolEvents::requestMethod"
89
110
  };
90
- class mt {
111
+ class gt {
91
112
  constructor(n) {
92
- L(this, "app");
113
+ $(this, "app");
93
114
  this.app = n;
94
115
  }
95
116
  dispose() {
96
117
  }
97
118
  }
98
- class Pr extends mt {
119
+ class Ya extends gt {
99
120
  selectDropdown(n, a) {
100
121
  this.app.send({
101
122
  event: "selectComponent",
@@ -117,17 +138,17 @@ class Pr extends mt {
117
138
  });
118
139
  }
119
140
  }
120
- const tn = () => {
141
+ const sn = () => {
121
142
  };
122
- class jr extends mt {
143
+ class za extends gt {
123
144
  constructor(a, e, o) {
124
145
  super(a);
125
- L(this, "project");
126
- L(this, "sheets");
127
- L(this, "sheetObjects");
128
- L(this, "sheetObjectCBs");
129
- L(this, "sheetObjectUnsubscribe");
130
- this.project = Pn(e, o), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
146
+ $(this, "project");
147
+ $(this, "sheets");
148
+ $(this, "sheetObjects");
149
+ $(this, "sheetObjectCBs");
150
+ $(this, "sheetObjectUnsubscribe");
151
+ this.project = Ln(e, o), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
131
152
  }
132
153
  dispose() {
133
154
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -153,16 +174,16 @@ class jr extends mt {
153
174
  let d = this.sheetObjects.get(s);
154
175
  if (d !== void 0)
155
176
  return d = c.object(e, { ...o, ...d.value }, { reconfigure: !0 }), d;
156
- d = c.object(e, o), this.sheetObjects.set(s, d), this.sheetObjectCBs.set(s, u !== void 0 ? u : tn);
157
- const m = d.onValuesChange((v) => {
177
+ d = c.object(e, o), this.sheetObjects.set(s, d), this.sheetObjectCBs.set(s, u !== void 0 ? u : sn);
178
+ const p = d.onValuesChange((h) => {
158
179
  if (this.app.editor) {
159
- for (const f in v) {
160
- const h = v[f];
161
- typeof h == "object" && An(h) && (v[f] = {
162
- r: h.r,
163
- g: h.g,
164
- b: h.b,
165
- a: h.a
180
+ for (const b in h) {
181
+ const x = h[b];
182
+ typeof x == "object" && Vn(x) && (h[b] = {
183
+ r: x.r,
184
+ g: x.g,
185
+ b: x.b,
186
+ a: x.a
166
187
  });
167
188
  }
168
189
  this.app.send({
@@ -170,15 +191,15 @@ class jr extends mt {
170
191
  target: "app",
171
192
  data: {
172
193
  sheetObject: s,
173
- values: v
194
+ values: h
174
195
  }
175
196
  });
176
197
  } else {
177
- const f = this.sheetObjectCBs.get(s);
178
- f !== void 0 && f(v);
198
+ const b = this.sheetObjectCBs.get(s);
199
+ b !== void 0 && b(h);
179
200
  }
180
201
  });
181
- return this.sheetObjectUnsubscribe.set(s, m), d;
202
+ return this.sheetObjectUnsubscribe.set(s, p), d;
182
203
  }
183
204
  unsubscribe(a) {
184
205
  if (this.project === void 0) {
@@ -189,7 +210,7 @@ class jr extends mt {
189
210
  o !== void 0 && o();
190
211
  }
191
212
  }
192
- function Ln(t) {
213
+ function Hn(t) {
193
214
  if (t.name === "cameras")
194
215
  return "camera";
195
216
  if (t.name === "interactive")
@@ -203,7 +224,7 @@ function Ln(t) {
203
224
  const n = t.type;
204
225
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
205
226
  }
206
- function nn(t) {
227
+ function cn(t) {
207
228
  const n = {
208
229
  name: t.name,
209
230
  type: t.type,
@@ -211,10 +232,10 @@ function nn(t) {
211
232
  children: []
212
233
  };
213
234
  return t.children.forEach((a) => {
214
- n.children.push(nn(a));
235
+ n.children.push(cn(a));
215
236
  }), n;
216
237
  }
217
- function Fn(t) {
238
+ function Kn(t) {
218
239
  const n = {};
219
240
  for (const a in t) {
220
241
  const e = t[a].value;
@@ -222,7 +243,7 @@ function Fn(t) {
222
243
  }
223
244
  return n;
224
245
  }
225
- function Un(t) {
246
+ function Xn(t) {
226
247
  switch (t) {
227
248
  case "blendSrcAlpha":
228
249
  case "blendDstAlpha":
@@ -234,10 +255,10 @@ function Un(t) {
234
255
  }
235
256
  return !1;
236
257
  }
237
- function Ft(t) {
258
+ function Bt(t) {
238
259
  const n = {};
239
260
  for (const a in t) {
240
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Un(a))
261
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Xn(a))
241
262
  continue;
242
263
  const e = typeof t[a], o = t[a];
243
264
  switch (e) {
@@ -249,13 +270,13 @@ function Ft(t) {
249
270
  case "object":
250
271
  if (o !== null)
251
272
  if (n[a] = o, o.isTexture)
252
- if (o instanceof Xt) {
273
+ if (o instanceof Jt) {
253
274
  const u = o.source.toJSON();
254
275
  n[a] = { src: u.url };
255
276
  } else
256
- o instanceof pn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
277
+ o instanceof xn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
257
278
  else
258
- a === "uniforms" && (n[a] = Fn(n[a]));
279
+ a === "uniforms" && (n[a] = Kn(n[a]));
259
280
  else
260
281
  n[a] = { src: "" };
261
282
  break;
@@ -263,7 +284,7 @@ function Ft(t) {
263
284
  }
264
285
  return n;
265
286
  }
266
- function Bn(t) {
287
+ function qn(t) {
267
288
  t.updateMatrix();
268
289
  const n = {
269
290
  name: t.name,
@@ -281,10 +302,10 @@ function Bn(t) {
281
302
  if (Array.isArray(e.material)) {
282
303
  const o = [];
283
304
  e.material.forEach((u) => {
284
- o.push(Ft(u));
305
+ o.push(Bt(u));
285
306
  }), n.material = o;
286
307
  } else
287
- n.material = Ft(e.material);
308
+ n.material = Bt(e.material);
288
309
  } else
289
310
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
290
311
  fov: t.fov,
@@ -314,7 +335,7 @@ function Bn(t) {
314
335
  });
315
336
  return n;
316
337
  }
317
- function K(t, n, a) {
338
+ function q(t, n, a) {
318
339
  const e = n.split(".");
319
340
  switch (e.length) {
320
341
  case 1:
@@ -334,19 +355,19 @@ function K(t, n, a) {
334
355
  break;
335
356
  }
336
357
  }
337
- function Tt(t) {
358
+ function Mt(t) {
338
359
  return new Promise((n, a) => {
339
360
  const e = new Image();
340
361
  e.onload = () => {
341
- const o = new Xt(e);
342
- o.wrapS = It, o.wrapT = It, o.needsUpdate = !0, n(o);
362
+ const o = new Jt(e);
363
+ o.wrapS = Lt, o.wrapT = Lt, o.needsUpdate = !0, n(o);
343
364
  }, e.onerror = a, e.src = t;
344
365
  });
345
366
  }
346
- class _r extends mt {
367
+ class Wa extends gt {
347
368
  constructor() {
348
369
  super(...arguments);
349
- L(this, "scene");
370
+ $(this, "scene");
350
371
  }
351
372
  getObject(a) {
352
373
  this.app.send({
@@ -356,7 +377,7 @@ class _r extends mt {
356
377
  });
357
378
  }
358
379
  setObject(a) {
359
- const e = Bn(a);
380
+ const e = qn(a);
360
381
  this.app.send({
361
382
  event: "setObject",
362
383
  target: "editor",
@@ -396,15 +417,11 @@ class _r extends mt {
396
417
  }
397
418
  });
398
419
  }
399
- getScene() {
400
- this.app.send({
401
- event: "getScene",
402
- target: "app"
403
- });
404
- }
405
420
  setScene(a) {
406
- this.scene = a, en(a);
407
- const e = nn(a);
421
+ if (a === void 0)
422
+ return;
423
+ this.scene = a, zn(), rn(this.scene);
424
+ const e = cn(this.scene);
408
425
  this.app.send({
409
426
  event: "setScene",
410
427
  target: "editor",
@@ -412,19 +429,19 @@ class _r extends mt {
412
429
  });
413
430
  }
414
431
  }
415
- class kr extends mt {
432
+ class Ha extends gt {
416
433
  constructor(a) {
417
434
  super(a);
418
- L(this, "bindCBs");
419
- L(this, "buttonCBs");
420
- L(this, "pane");
421
- L(this, "appCallbacks", 0);
422
- L(this, "editorCallbacks", 0);
423
- L(this, "inspectorFolder");
435
+ $(this, "bindCBs");
436
+ $(this, "buttonCBs");
437
+ $(this, "pane");
438
+ $(this, "appCallbacks", 0);
439
+ $(this, "editorCallbacks", 0);
440
+ $(this, "inspectorFolder");
424
441
  this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
425
442
  }
426
443
  createGUI() {
427
- this.pane = new jn({ title: "GUI" }), this.pane.registerPlugin(_n);
444
+ this.pane = new Fn({ title: "GUI" }), this.pane.registerPlugin(Un);
428
445
  }
429
446
  dispose() {
430
447
  var a;
@@ -451,14 +468,14 @@ class kr extends mt {
451
468
  }
452
469
  // Binding
453
470
  bind(a, e, o, u = void 0) {
454
- const c = this.bindID, s = o.onChange !== void 0 ? o.onChange : tn;
455
- this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (u !== void 0 ? u : this.pane).addBinding(a, e, o).on("change", (m) => {
471
+ const c = this.bindID, s = o.onChange !== void 0 ? o.onChange : sn;
472
+ this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (u !== void 0 ? u : this.pane).addBinding(a, e, o).on("change", (p) => {
456
473
  this.app.send({
457
474
  event: "updateBind",
458
475
  target: "app",
459
476
  data: {
460
477
  id: c,
461
- value: m.value
478
+ value: p.value
462
479
  }
463
480
  });
464
481
  }), this.editorCallbacks++) : (this.app.send({
@@ -512,7 +529,7 @@ class kr extends mt {
512
529
  this.inspectorFolder.remove(this.inspectorFolder.children[e]);
513
530
  }
514
531
  }
515
- var Ot = { exports: {} }, Je = {};
532
+ var Pt = { exports: {} }, Je = {};
516
533
  /**
517
534
  * @license React
518
535
  * react-jsx-runtime.production.min.js
@@ -522,21 +539,21 @@ var Ot = { exports: {} }, Je = {};
522
539
  * This source code is licensed under the MIT license found in the
523
540
  * LICENSE file in the root directory of this source tree.
524
541
  */
525
- var Ut;
526
- function $n() {
527
- if (Ut)
542
+ var $t;
543
+ function Zn() {
544
+ if ($t)
528
545
  return Je;
529
- Ut = 1;
530
- var t = Jt, 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, u = { key: !0, ref: !0, __self: !0, __source: !0 };
531
- function c(s, d, m) {
532
- var v, f = {}, h = null, g = null;
533
- m !== void 0 && (h = "" + m), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (g = d.ref);
534
- for (v in d)
535
- e.call(d, v) && !u.hasOwnProperty(v) && (f[v] = d[v]);
546
+ $t = 1;
547
+ var t = nn, 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, u = { key: !0, ref: !0, __self: !0, __source: !0 };
548
+ function c(s, d, p) {
549
+ var h, b = {}, x = null, S = null;
550
+ p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (S = d.ref);
551
+ for (h in d)
552
+ e.call(d, h) && !u.hasOwnProperty(h) && (b[h] = d[h]);
536
553
  if (s && s.defaultProps)
537
- for (v in d = s.defaultProps, d)
538
- f[v] === void 0 && (f[v] = d[v]);
539
- return { $$typeof: n, type: s, key: h, ref: g, props: f, _owner: o.current };
554
+ for (h in d = s.defaultProps, d)
555
+ b[h] === void 0 && (b[h] = d[h]);
556
+ return { $$typeof: n, type: s, key: x, ref: S, props: b, _owner: o.current };
540
557
  }
541
558
  return Je.Fragment = a, Je.jsx = c, Je.jsxs = c, Je;
542
559
  }
@@ -550,57 +567,57 @@ var Qe = {};
550
567
  * This source code is licensed under the MIT license found in the
551
568
  * LICENSE file in the root directory of this source tree.
552
569
  */
553
- var Bt;
554
- function Gn() {
555
- return Bt || (Bt = 1, process.env.NODE_ENV !== "production" && function() {
556
- var t = Jt, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), E = Symbol.iterator, w = "@@iterator";
557
- function A(r) {
570
+ var Gt;
571
+ function Jn() {
572
+ return Gt || (Gt = 1, process.env.NODE_ENV !== "production" && function() {
573
+ var t = nn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), O = Symbol.iterator, m = "@@iterator";
574
+ function v(r) {
558
575
  if (r === null || typeof r != "object")
559
576
  return null;
560
- var p = E && r[E] || r[w];
561
- return typeof p == "function" ? p : null;
577
+ var f = O && r[O] || r[m];
578
+ return typeof f == "function" ? f : null;
562
579
  }
563
- var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
564
- function j(r) {
580
+ var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
581
+ function w(r) {
565
582
  {
566
- for (var p = arguments.length, b = new Array(p > 1 ? p - 1 : 0), x = 1; x < p; x++)
567
- b[x - 1] = arguments[x];
568
- X("error", r, b);
583
+ for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
584
+ g[C - 1] = arguments[C];
585
+ F("error", r, g);
569
586
  }
570
587
  }
571
- function X(r, p, b) {
588
+ function F(r, f, g) {
572
589
  {
573
- var x = U.ReactDebugCurrentFrame, M = x.getStackAddendum();
574
- M !== "" && (p += "%s", b = b.concat([M]));
575
- var _ = b.map(function(T) {
576
- return String(T);
590
+ var C = y.ReactDebugCurrentFrame, M = C.getStackAddendum();
591
+ M !== "" && (f += "%s", g = g.concat([M]));
592
+ var k = g.map(function(R) {
593
+ return String(R);
577
594
  });
578
- _.unshift("Warning: " + p), Function.prototype.apply.call(console[r], console, _);
595
+ k.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, k);
579
596
  }
580
597
  }
581
- var Z = !1, z = !1, O = !1, S = !1, G = !1, ge;
582
- ge = Symbol.for("react.module.reference");
583
- function Re(r) {
584
- return !!(typeof r == "string" || typeof r == "function" || r === e || r === u || G || r === o || r === m || r === v || S || r === g || Z || z || O || typeof r == "object" && r !== null && (r.$$typeof === h || r.$$typeof === f || r.$$typeof === c || r.$$typeof === s || r.$$typeof === d || // This needs to include all possible module reference object
598
+ var V = !1, Z = !1, se = !1, Y = !1, fe = !1, j;
599
+ j = Symbol.for("react.module.reference");
600
+ function D(r) {
601
+ return !!(typeof r == "string" || typeof r == "function" || r === e || r === u || fe || r === o || r === p || r === h || Y || r === S || V || Z || se || typeof r == "object" && r !== null && (r.$$typeof === x || r.$$typeof === b || r.$$typeof === c || r.$$typeof === s || r.$$typeof === d || // This needs to include all possible module reference object
585
602
  // types supported by any Flight configuration anywhere since
586
603
  // we don't know which Flight build this will end up being used
587
604
  // with.
588
- r.$$typeof === ge || r.getModuleId !== void 0));
605
+ r.$$typeof === j || r.getModuleId !== void 0));
589
606
  }
590
- function ve(r, p, b) {
591
- var x = r.displayName;
592
- if (x)
593
- return x;
594
- var M = p.displayName || p.name || "";
595
- return M !== "" ? b + "(" + M + ")" : b;
607
+ function z(r, f, g) {
608
+ var C = r.displayName;
609
+ if (C)
610
+ return C;
611
+ var M = f.displayName || f.name || "";
612
+ return M !== "" ? g + "(" + M + ")" : g;
596
613
  }
597
- function be(r) {
614
+ function ce(r) {
598
615
  return r.displayName || "Context";
599
616
  }
600
- function te(r) {
617
+ function ae(r) {
601
618
  if (r == null)
602
619
  return null;
603
- if (typeof r.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
620
+ if (typeof r.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
604
621
  return r.displayName || r.name || null;
605
622
  if (typeof r == "string")
606
623
  return r;
@@ -613,28 +630,28 @@ function Gn() {
613
630
  return "Profiler";
614
631
  case o:
615
632
  return "StrictMode";
616
- case m:
633
+ case p:
617
634
  return "Suspense";
618
- case v:
635
+ case h:
619
636
  return "SuspenseList";
620
637
  }
621
638
  if (typeof r == "object")
622
639
  switch (r.$$typeof) {
623
640
  case s:
624
- var p = r;
625
- return be(p) + ".Consumer";
641
+ var f = r;
642
+ return ce(f) + ".Consumer";
626
643
  case c:
627
- var b = r;
628
- return be(b._context) + ".Provider";
644
+ var g = r;
645
+ return ce(g._context) + ".Provider";
629
646
  case d:
630
- return ve(r, r.render, "ForwardRef");
631
- case f:
632
- var x = r.displayName || null;
633
- return x !== null ? x : te(r.type) || "Memo";
634
- case h: {
635
- var M = r, _ = M._payload, T = M._init;
647
+ return z(r, r.render, "ForwardRef");
648
+ case b:
649
+ var C = r.displayName || null;
650
+ return C !== null ? C : ae(r.type) || "Memo";
651
+ case x: {
652
+ var M = r, k = M._payload, R = M._init;
636
653
  try {
637
- return te(T(_));
654
+ return ae(R(k));
638
655
  } catch {
639
656
  return null;
640
657
  }
@@ -642,18 +659,18 @@ function Gn() {
642
659
  }
643
660
  return null;
644
661
  }
645
- var oe = Object.assign, ne = 0, Pe, Ge, je, _e, Ve, nt, Ye;
646
- function rt() {
662
+ var le = Object.assign, re = 0, Me, Ge, Pe, je, Ve, nt, Ye;
663
+ function at() {
647
664
  }
648
- rt.__reactDisabledLog = !0;
649
- function vt() {
665
+ at.__reactDisabledLog = !0;
666
+ function bt() {
650
667
  {
651
- if (ne === 0) {
652
- Pe = console.log, Ge = console.info, je = console.warn, _e = console.error, Ve = console.group, nt = console.groupCollapsed, Ye = console.groupEnd;
668
+ if (re === 0) {
669
+ Me = console.log, Ge = console.info, Pe = console.warn, je = console.error, Ve = console.group, nt = console.groupCollapsed, Ye = console.groupEnd;
653
670
  var r = {
654
671
  configurable: !0,
655
672
  enumerable: !0,
656
- value: rt,
673
+ value: at,
657
674
  writable: !0
658
675
  };
659
676
  Object.defineProperties(console, {
@@ -666,205 +683,205 @@ function Gn() {
666
683
  groupEnd: r
667
684
  });
668
685
  }
669
- ne++;
686
+ re++;
670
687
  }
671
688
  }
672
- function bt() {
689
+ function yt() {
673
690
  {
674
- if (ne--, ne === 0) {
691
+ if (re--, re === 0) {
675
692
  var r = {
676
693
  configurable: !0,
677
694
  enumerable: !0,
678
695
  writable: !0
679
696
  };
680
697
  Object.defineProperties(console, {
681
- log: oe({}, r, {
682
- value: Pe
698
+ log: le({}, r, {
699
+ value: Me
683
700
  }),
684
- info: oe({}, r, {
701
+ info: le({}, r, {
685
702
  value: Ge
686
703
  }),
687
- warn: oe({}, r, {
688
- value: je
704
+ warn: le({}, r, {
705
+ value: Pe
689
706
  }),
690
- error: oe({}, r, {
691
- value: _e
707
+ error: le({}, r, {
708
+ value: je
692
709
  }),
693
- group: oe({}, r, {
710
+ group: le({}, r, {
694
711
  value: Ve
695
712
  }),
696
- groupCollapsed: oe({}, r, {
713
+ groupCollapsed: le({}, r, {
697
714
  value: nt
698
715
  }),
699
- groupEnd: oe({}, r, {
716
+ groupEnd: le({}, r, {
700
717
  value: Ye
701
718
  })
702
719
  });
703
720
  }
704
- ne < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
721
+ re < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
705
722
  }
706
723
  }
707
- var ze = U.ReactCurrentDispatcher, We;
708
- function ye(r, p, b) {
724
+ var ze = y.ReactCurrentDispatcher, We;
725
+ function Ee(r, f, g) {
709
726
  {
710
727
  if (We === void 0)
711
728
  try {
712
729
  throw Error();
713
730
  } catch (M) {
714
- var x = M.stack.trim().match(/\n( *(at )?)/);
715
- We = x && x[1] || "";
731
+ var C = M.stack.trim().match(/\n( *(at )?)/);
732
+ We = C && C[1] || "";
716
733
  }
717
734
  return `
718
735
  ` + We + r;
719
736
  }
720
737
  }
721
- var ke = !1, Ee;
738
+ var _e = !1, xe;
722
739
  {
723
- var yt = typeof WeakMap == "function" ? WeakMap : Map;
724
- Ee = new yt();
740
+ var Et = typeof WeakMap == "function" ? WeakMap : Map;
741
+ xe = new Et();
725
742
  }
726
- function at(r, p) {
727
- if (!r || ke)
743
+ function rt(r, f) {
744
+ if (!r || _e)
728
745
  return "";
729
746
  {
730
- var b = Ee.get(r);
731
- if (b !== void 0)
732
- return b;
747
+ var g = xe.get(r);
748
+ if (g !== void 0)
749
+ return g;
733
750
  }
734
- var x;
735
- ke = !0;
751
+ var C;
752
+ _e = !0;
736
753
  var M = Error.prepareStackTrace;
737
754
  Error.prepareStackTrace = void 0;
738
- var _;
739
- _ = ze.current, ze.current = null, vt();
755
+ var k;
756
+ k = ze.current, ze.current = null, bt();
740
757
  try {
741
- if (p) {
742
- var T = function() {
758
+ if (f) {
759
+ var R = function() {
743
760
  throw Error();
744
761
  };
745
- if (Object.defineProperty(T.prototype, "props", {
762
+ if (Object.defineProperty(R.prototype, "props", {
746
763
  set: function() {
747
764
  throw Error();
748
765
  }
749
766
  }), typeof Reflect == "object" && Reflect.construct) {
750
767
  try {
751
- Reflect.construct(T, []);
752
- } catch (ue) {
753
- x = ue;
768
+ Reflect.construct(R, []);
769
+ } catch (pe) {
770
+ C = pe;
754
771
  }
755
- Reflect.construct(r, [], T);
772
+ Reflect.construct(r, [], R);
756
773
  } else {
757
774
  try {
758
- T.call();
759
- } catch (ue) {
760
- x = ue;
775
+ R.call();
776
+ } catch (pe) {
777
+ C = pe;
761
778
  }
762
- r.call(T.prototype);
779
+ r.call(R.prototype);
763
780
  }
764
781
  } else {
765
782
  try {
766
783
  throw Error();
767
- } catch (ue) {
768
- x = ue;
784
+ } catch (pe) {
785
+ C = pe;
769
786
  }
770
787
  r();
771
788
  }
772
- } catch (ue) {
773
- if (ue && x && typeof ue.stack == "string") {
774
- for (var C = ue.stack.split(`
775
- `), W = x.stack.split(`
776
- `), N = C.length - 1, B = W.length - 1; N >= 1 && B >= 0 && C[N] !== W[B]; )
789
+ } catch (pe) {
790
+ if (pe && C && typeof pe.stack == "string") {
791
+ for (var T = pe.stack.split(`
792
+ `), K = C.stack.split(`
793
+ `), U = T.length - 1, B = K.length - 1; U >= 1 && B >= 0 && T[U] !== K[B]; )
777
794
  B--;
778
- for (; N >= 1 && B >= 0; N--, B--)
779
- if (C[N] !== W[B]) {
780
- if (N !== 1 || B !== 1)
795
+ for (; U >= 1 && B >= 0; U--, B--)
796
+ if (T[U] !== K[B]) {
797
+ if (U !== 1 || B !== 1)
781
798
  do
782
- if (N--, B--, B < 0 || C[N] !== W[B]) {
783
- var re = `
784
- ` + C[N].replace(" at new ", " at ");
785
- return r.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", r.displayName)), typeof r == "function" && Ee.set(r, re), re;
799
+ if (U--, B--, B < 0 || T[U] !== K[B]) {
800
+ var ie = `
801
+ ` + T[U].replace(" at new ", " at ");
802
+ return r.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", r.displayName)), typeof r == "function" && xe.set(r, ie), ie;
786
803
  }
787
- while (N >= 1 && B >= 0);
804
+ while (U >= 1 && B >= 0);
788
805
  break;
789
806
  }
790
807
  }
791
808
  } finally {
792
- ke = !1, ze.current = _, bt(), Error.prepareStackTrace = M;
809
+ _e = !1, ze.current = k, yt(), Error.prepareStackTrace = M;
793
810
  }
794
- var Ne = r ? r.displayName || r.name : "", Dt = Ne ? ye(Ne) : "";
795
- return typeof r == "function" && Ee.set(r, Dt), Dt;
811
+ var Ie = r ? r.displayName || r.name : "", Nt = Ie ? Ee(Ie) : "";
812
+ return typeof r == "function" && xe.set(r, Nt), Nt;
796
813
  }
797
- function it(r, p, b) {
798
- return at(r, !1);
814
+ function it(r, f, g) {
815
+ return rt(r, !1);
799
816
  }
800
817
  function ot(r) {
801
- var p = r.prototype;
802
- return !!(p && p.isReactComponent);
818
+ var f = r.prototype;
819
+ return !!(f && f.isReactComponent);
803
820
  }
804
- function xe(r, p, b) {
821
+ function we(r, f, g) {
805
822
  if (r == null)
806
823
  return "";
807
824
  if (typeof r == "function")
808
- return at(r, ot(r));
825
+ return rt(r, ot(r));
809
826
  if (typeof r == "string")
810
- return ye(r);
827
+ return Ee(r);
811
828
  switch (r) {
812
- case m:
813
- return ye("Suspense");
814
- case v:
815
- return ye("SuspenseList");
829
+ case p:
830
+ return Ee("Suspense");
831
+ case h:
832
+ return Ee("SuspenseList");
816
833
  }
817
834
  if (typeof r == "object")
818
835
  switch (r.$$typeof) {
819
836
  case d:
820
837
  return it(r.render);
821
- case f:
822
- return xe(r.type, p, b);
823
- case h: {
824
- var x = r, M = x._payload, _ = x._init;
838
+ case b:
839
+ return we(r.type, f, g);
840
+ case x: {
841
+ var C = r, M = C._payload, k = C._init;
825
842
  try {
826
- return xe(_(M), p, b);
843
+ return we(k(M), f, g);
827
844
  } catch {
828
845
  }
829
846
  }
830
847
  }
831
848
  return "";
832
849
  }
833
- var De = Object.prototype.hasOwnProperty, st = {}, He = U.ReactDebugCurrentFrame;
834
- function fe(r) {
850
+ var ke = Object.prototype.hasOwnProperty, st = {}, He = y.ReactDebugCurrentFrame;
851
+ function ge(r) {
835
852
  if (r) {
836
- var p = r._owner, b = xe(r.type, r._source, p ? p.type : null);
837
- He.setExtraStackFrame(b);
853
+ var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
854
+ He.setExtraStackFrame(g);
838
855
  } else
839
856
  He.setExtraStackFrame(null);
840
857
  }
841
- function we(r, p, b, x, M) {
858
+ function Ce(r, f, g, C, M) {
842
859
  {
843
- var _ = Function.call.bind(De);
844
- for (var T in r)
845
- if (_(r, T)) {
846
- var C = void 0;
860
+ var k = Function.call.bind(ke);
861
+ for (var R in r)
862
+ if (k(r, R)) {
863
+ var T = void 0;
847
864
  try {
848
- if (typeof r[T] != "function") {
849
- var W = Error((x || "React class") + ": " + b + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
850
- throw W.name = "Invariant Violation", W;
865
+ if (typeof r[R] != "function") {
866
+ var K = Error((C || "React class") + ": " + g + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
867
+ throw K.name = "Invariant Violation", K;
851
868
  }
852
- C = r[T](p, T, x, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
853
- } catch (N) {
854
- C = N;
869
+ T = r[R](f, R, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
870
+ } catch (U) {
871
+ T = U;
855
872
  }
856
- C && !(C instanceof Error) && (fe(M), j("%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).", x || "React class", b, T, typeof C), fe(null)), C instanceof Error && !(C.message in st) && (st[C.message] = !0, fe(M), j("Failed %s type: %s", b, C.message), fe(null));
873
+ T && !(T instanceof Error) && (ge(M), w("%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, R, typeof T), ge(null)), T instanceof Error && !(T.message in st) && (st[T.message] = !0, ge(M), w("Failed %s type: %s", g, T.message), ge(null));
857
874
  }
858
875
  }
859
876
  }
860
- var Et = Array.isArray;
877
+ var xt = Array.isArray;
861
878
  function Ke(r) {
862
- return Et(r);
879
+ return xt(r);
863
880
  }
864
881
  function ct(r) {
865
882
  {
866
- var p = typeof Symbol == "function" && Symbol.toStringTag, b = p && r[Symbol.toStringTag] || r.constructor.name || "Object";
867
- return b;
883
+ var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
884
+ return g;
868
885
  }
869
886
  }
870
887
  function Xe(r) {
@@ -879,123 +896,123 @@ function Gn() {
879
896
  }
880
897
  function ut(r) {
881
898
  if (Xe(r))
882
- return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ct(r)), lt(r);
899
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ct(r)), lt(r);
883
900
  }
884
- var he = U.ReactCurrentOwner, xt = {
901
+ var ve = y.ReactCurrentOwner, wt = {
885
902
  key: !0,
886
903
  ref: !0,
887
904
  __self: !0,
888
905
  __source: !0
889
- }, dt, qe, se;
890
- se = {};
906
+ }, dt, qe, ue;
907
+ ue = {};
891
908
  function i(r) {
892
- if (De.call(r, "ref")) {
893
- var p = Object.getOwnPropertyDescriptor(r, "ref").get;
894
- if (p && p.isReactWarning)
909
+ if (ke.call(r, "ref")) {
910
+ var f = Object.getOwnPropertyDescriptor(r, "ref").get;
911
+ if (f && f.isReactWarning)
895
912
  return !1;
896
913
  }
897
914
  return r.ref !== void 0;
898
915
  }
899
- function y(r) {
900
- if (De.call(r, "key")) {
901
- var p = Object.getOwnPropertyDescriptor(r, "key").get;
902
- if (p && p.isReactWarning)
916
+ function E(r) {
917
+ if (ke.call(r, "key")) {
918
+ var f = Object.getOwnPropertyDescriptor(r, "key").get;
919
+ if (f && f.isReactWarning)
903
920
  return !1;
904
921
  }
905
922
  return r.key !== void 0;
906
923
  }
907
- function R(r, p) {
908
- if (typeof r.ref == "string" && he.current && p && he.current.stateNode !== p) {
909
- var b = te(he.current.type);
910
- se[b] || (j('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', te(he.current.type), r.ref), se[b] = !0);
924
+ function P(r, f) {
925
+ if (typeof r.ref == "string" && ve.current && f && ve.current.stateNode !== f) {
926
+ var g = ae(ve.current.type);
927
+ ue[g] || (w('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', ae(ve.current.type), r.ref), ue[g] = !0);
911
928
  }
912
929
  }
913
- function P(r, p) {
930
+ function _(r, f) {
914
931
  {
915
- var b = function() {
916
- dt || (dt = !0, j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
932
+ var g = function() {
933
+ dt || (dt = !0, w("%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)", f));
917
934
  };
918
- b.isReactWarning = !0, Object.defineProperty(r, "key", {
919
- get: b,
935
+ g.isReactWarning = !0, Object.defineProperty(r, "key", {
936
+ get: g,
920
937
  configurable: !0
921
938
  });
922
939
  }
923
940
  }
924
- function V(r, p) {
941
+ function W(r, f) {
925
942
  {
926
- var b = function() {
927
- qe || (qe = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
943
+ var g = function() {
944
+ qe || (qe = !0, w("%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)", f));
928
945
  };
929
- b.isReactWarning = !0, Object.defineProperty(r, "ref", {
930
- get: b,
946
+ g.isReactWarning = !0, Object.defineProperty(r, "ref", {
947
+ get: g,
931
948
  configurable: !0
932
949
  });
933
950
  }
934
951
  }
935
- var ce = function(r, p, b, x, M, _, T) {
936
- var C = {
952
+ var de = function(r, f, g, C, M, k, R) {
953
+ var T = {
937
954
  // This tag allows us to uniquely identify this as a React Element
938
955
  $$typeof: n,
939
956
  // Built-in properties that belong on the element
940
957
  type: r,
941
- key: p,
942
- ref: b,
943
- props: T,
958
+ key: f,
959
+ ref: g,
960
+ props: R,
944
961
  // Record the component responsible for creating this element.
945
- _owner: _
962
+ _owner: k
946
963
  };
947
- return C._store = {}, Object.defineProperty(C._store, "validated", {
964
+ return T._store = {}, Object.defineProperty(T._store, "validated", {
948
965
  configurable: !1,
949
966
  enumerable: !1,
950
967
  writable: !0,
951
968
  value: !1
952
- }), Object.defineProperty(C, "_self", {
969
+ }), Object.defineProperty(T, "_self", {
953
970
  configurable: !1,
954
971
  enumerable: !1,
955
972
  writable: !1,
956
- value: x
957
- }), Object.defineProperty(C, "_source", {
973
+ value: C
974
+ }), Object.defineProperty(T, "_source", {
958
975
  configurable: !1,
959
976
  enumerable: !1,
960
977
  writable: !1,
961
978
  value: M
962
- }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
979
+ }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
963
980
  };
964
- function q(r, p, b, x, M) {
981
+ function J(r, f, g, C, M) {
965
982
  {
966
- var _, T = {}, C = null, W = null;
967
- b !== void 0 && (ut(b), C = "" + b), y(p) && (ut(p.key), C = "" + p.key), i(p) && (W = p.ref, R(p, M));
968
- for (_ in p)
969
- De.call(p, _) && !xt.hasOwnProperty(_) && (T[_] = p[_]);
983
+ var k, R = {}, T = null, K = null;
984
+ g !== void 0 && (ut(g), T = "" + g), E(f) && (ut(f.key), T = "" + f.key), i(f) && (K = f.ref, P(f, M));
985
+ for (k in f)
986
+ ke.call(f, k) && !wt.hasOwnProperty(k) && (R[k] = f[k]);
970
987
  if (r && r.defaultProps) {
971
- var N = r.defaultProps;
972
- for (_ in N)
973
- T[_] === void 0 && (T[_] = N[_]);
988
+ var U = r.defaultProps;
989
+ for (k in U)
990
+ R[k] === void 0 && (R[k] = U[k]);
974
991
  }
975
- if (C || W) {
992
+ if (T || K) {
976
993
  var B = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
977
- C && P(T, B), W && V(T, B);
994
+ T && _(R, B), K && W(R, B);
978
995
  }
979
- return ce(r, C, W, M, x, he.current, T);
996
+ return de(r, T, K, M, C, ve.current, R);
980
997
  }
981
998
  }
982
- var ft = U.ReactCurrentOwner, ht = U.ReactDebugCurrentFrame;
983
- function le(r) {
999
+ var ft = y.ReactCurrentOwner, ht = y.ReactDebugCurrentFrame;
1000
+ function he(r) {
984
1001
  if (r) {
985
- var p = r._owner, b = xe(r.type, r._source, p ? p.type : null);
986
- ht.setExtraStackFrame(b);
1002
+ var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
1003
+ ht.setExtraStackFrame(g);
987
1004
  } else
988
1005
  ht.setExtraStackFrame(null);
989
1006
  }
990
- var J;
991
- J = !1;
992
- function Q(r) {
1007
+ var Q;
1008
+ Q = !1;
1009
+ function ee(r) {
993
1010
  return typeof r == "object" && r !== null && r.$$typeof === n;
994
1011
  }
995
- function Ie() {
1012
+ function De() {
996
1013
  {
997
1014
  if (ft.current) {
998
- var r = te(ft.current.type);
1015
+ var r = ae(ft.current.type);
999
1016
  if (r)
1000
1017
  return `
1001
1018
 
@@ -1004,149 +1021,149 @@ Check the render method of \`` + r + "`.";
1004
1021
  return "";
1005
1022
  }
1006
1023
  }
1007
- function Ce(r) {
1024
+ function Se(r) {
1008
1025
  {
1009
1026
  if (r !== void 0) {
1010
- var p = r.fileName.replace(/^.*[\\\/]/, ""), b = r.lineNumber;
1027
+ var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
1011
1028
  return `
1012
1029
 
1013
- Check your code at ` + p + ":" + b + ".";
1030
+ Check your code at ` + f + ":" + g + ".";
1014
1031
  }
1015
1032
  return "";
1016
1033
  }
1017
1034
  }
1018
- var pe = {};
1035
+ var be = {};
1019
1036
  function Ae(r) {
1020
1037
  {
1021
- var p = Ie();
1022
- if (!p) {
1023
- var b = typeof r == "string" ? r : r.displayName || r.name;
1024
- b && (p = `
1038
+ var f = De();
1039
+ if (!f) {
1040
+ var g = typeof r == "string" ? r : r.displayName || r.name;
1041
+ g && (f = `
1025
1042
 
1026
- Check the top-level render call using <` + b + ">.");
1043
+ Check the top-level render call using <` + g + ">.");
1027
1044
  }
1028
- return p;
1045
+ return f;
1029
1046
  }
1030
1047
  }
1031
- function jt(r, p) {
1048
+ function Dt(r, f) {
1032
1049
  {
1033
1050
  if (!r._store || r._store.validated || r.key != null)
1034
1051
  return;
1035
1052
  r._store.validated = !0;
1036
- var b = Ae(p);
1037
- if (pe[b])
1053
+ var g = Ae(f);
1054
+ if (be[g])
1038
1055
  return;
1039
- pe[b] = !0;
1040
- var x = "";
1041
- r && r._owner && r._owner !== ft.current && (x = " It was passed a child from " + te(r._owner.type) + "."), le(r), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, x), le(null);
1056
+ be[g] = !0;
1057
+ var C = "";
1058
+ r && r._owner && r._owner !== ft.current && (C = " It was passed a child from " + ae(r._owner.type) + "."), he(r), w('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), he(null);
1042
1059
  }
1043
1060
  }
1044
- function _t(r, p) {
1061
+ function At(r, f) {
1045
1062
  {
1046
1063
  if (typeof r != "object")
1047
1064
  return;
1048
1065
  if (Ke(r))
1049
- for (var b = 0; b < r.length; b++) {
1050
- var x = r[b];
1051
- Q(x) && jt(x, p);
1066
+ for (var g = 0; g < r.length; g++) {
1067
+ var C = r[g];
1068
+ ee(C) && Dt(C, f);
1052
1069
  }
1053
- else if (Q(r))
1070
+ else if (ee(r))
1054
1071
  r._store && (r._store.validated = !0);
1055
1072
  else if (r) {
1056
- var M = A(r);
1073
+ var M = v(r);
1057
1074
  if (typeof M == "function" && M !== r.entries)
1058
- for (var _ = M.call(r), T; !(T = _.next()).done; )
1059
- Q(T.value) && jt(T.value, p);
1075
+ for (var k = M.call(r), R; !(R = k.next()).done; )
1076
+ ee(R.value) && Dt(R.value, f);
1060
1077
  }
1061
1078
  }
1062
1079
  }
1063
- function on(r) {
1080
+ function fn(r) {
1064
1081
  {
1065
- var p = r.type;
1066
- if (p == null || typeof p == "string")
1082
+ var f = r.type;
1083
+ if (f == null || typeof f == "string")
1067
1084
  return;
1068
- var b;
1069
- if (typeof p == "function")
1070
- b = p.propTypes;
1071
- else if (typeof p == "object" && (p.$$typeof === d || // Note: Memo only checks outer props here.
1085
+ var g;
1086
+ if (typeof f == "function")
1087
+ g = f.propTypes;
1088
+ else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
1072
1089
  // Inner props are checked in the reconciler.
1073
- p.$$typeof === f))
1074
- b = p.propTypes;
1090
+ f.$$typeof === b))
1091
+ g = f.propTypes;
1075
1092
  else
1076
1093
  return;
1077
- if (b) {
1078
- var x = te(p);
1079
- we(b, r.props, "prop", x, r);
1080
- } else if (p.PropTypes !== void 0 && !J) {
1081
- J = !0;
1082
- var M = te(p);
1083
- j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
1094
+ if (g) {
1095
+ var C = ae(f);
1096
+ Ce(g, r.props, "prop", C, r);
1097
+ } else if (f.PropTypes !== void 0 && !Q) {
1098
+ Q = !0;
1099
+ var M = ae(f);
1100
+ w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
1084
1101
  }
1085
- typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1102
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1086
1103
  }
1087
1104
  }
1088
- function sn(r) {
1105
+ function hn(r) {
1089
1106
  {
1090
- for (var p = Object.keys(r.props), b = 0; b < p.length; b++) {
1091
- var x = p[b];
1092
- if (x !== "children" && x !== "key") {
1093
- le(r), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), le(null);
1107
+ for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
1108
+ var C = f[g];
1109
+ if (C !== "children" && C !== "key") {
1110
+ he(r), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), he(null);
1094
1111
  break;
1095
1112
  }
1096
1113
  }
1097
- r.ref !== null && (le(r), j("Invalid attribute `ref` supplied to `React.Fragment`."), le(null));
1114
+ r.ref !== null && (he(r), w("Invalid attribute `ref` supplied to `React.Fragment`."), he(null));
1098
1115
  }
1099
1116
  }
1100
- function kt(r, p, b, x, M, _) {
1117
+ function It(r, f, g, C, M, k) {
1101
1118
  {
1102
- var T = Re(r);
1103
- if (!T) {
1104
- var C = "";
1105
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1106
- var W = Ce(M);
1107
- W ? C += W : C += Ie();
1108
- var N;
1109
- r === null ? N = "null" : Ke(r) ? N = "array" : r !== void 0 && r.$$typeof === n ? (N = "<" + (te(r.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : N = typeof r, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, C);
1119
+ var R = D(r);
1120
+ if (!R) {
1121
+ var T = "";
1122
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1123
+ var K = Se(M);
1124
+ K ? T += K : T += De();
1125
+ var U;
1126
+ r === null ? U = "null" : Ke(r) ? U = "array" : r !== void 0 && r.$$typeof === n ? (U = "<" + (ae(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof r, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
1110
1127
  }
1111
- var B = q(r, p, b, M, _);
1128
+ var B = J(r, f, g, M, k);
1112
1129
  if (B == null)
1113
1130
  return B;
1114
- if (T) {
1115
- var re = p.children;
1116
- if (re !== void 0)
1117
- if (x)
1118
- if (Ke(re)) {
1119
- for (var Ne = 0; Ne < re.length; Ne++)
1120
- _t(re[Ne], r);
1121
- Object.freeze && Object.freeze(re);
1131
+ if (R) {
1132
+ var ie = f.children;
1133
+ if (ie !== void 0)
1134
+ if (C)
1135
+ if (Ke(ie)) {
1136
+ for (var Ie = 0; Ie < ie.length; Ie++)
1137
+ At(ie[Ie], r);
1138
+ Object.freeze && Object.freeze(ie);
1122
1139
  } else
1123
- j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1140
+ w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1124
1141
  else
1125
- _t(re, r);
1142
+ At(ie, r);
1126
1143
  }
1127
- return r === e ? sn(B) : on(B), B;
1144
+ return r === e ? hn(B) : fn(B), B;
1128
1145
  }
1129
1146
  }
1130
- function cn(r, p, b) {
1131
- return kt(r, p, b, !0);
1147
+ function pn(r, f, g) {
1148
+ return It(r, f, g, !0);
1132
1149
  }
1133
- function ln(r, p, b) {
1134
- return kt(r, p, b, !1);
1150
+ function mn(r, f, g) {
1151
+ return It(r, f, g, !1);
1135
1152
  }
1136
- var un = ln, dn = cn;
1137
- Qe.Fragment = e, Qe.jsx = un, Qe.jsxs = dn;
1153
+ var gn = mn, vn = pn;
1154
+ Qe.Fragment = e, Qe.jsx = gn, Qe.jsxs = vn;
1138
1155
  }()), Qe;
1139
1156
  }
1140
- process.env.NODE_ENV === "production" ? Ot.exports = $n() : Ot.exports = Gn();
1141
- var l = Ot.exports;
1142
- function rn(t) {
1157
+ process.env.NODE_ENV === "production" ? Pt.exports = Zn() : Pt.exports = Jn();
1158
+ var l = Pt.exports;
1159
+ function ln(t) {
1143
1160
  return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1144
1161
  }
1145
- const Vn = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1162
+ const Qn = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1146
1163
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1147
1164
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1148
1165
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1149
- ] }), Yn = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1166
+ ] }), ea = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1150
1167
  "path",
1151
1168
  {
1152
1169
  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
@@ -1154,35 +1171,35 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1154
1171
  C11,8.22,10.74,8,10.43,8z`
1155
1172
  }
1156
1173
  ) });
1157
- function zn(t) {
1158
- return /* @__PURE__ */ l.jsx(Qt.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1159
- Yn,
1174
+ function ta(t) {
1175
+ return /* @__PURE__ */ l.jsx(an.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1176
+ ea,
1160
1177
  /* @__PURE__ */ l.jsx("span", { children: t.title }),
1161
1178
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1162
1179
  t.onDelete(t.index);
1163
- }, children: Vn })
1180
+ }, children: Qn })
1164
1181
  ] }) }, t.title);
1165
1182
  }
1166
- function Wn(t) {
1167
- const [n, a] = ie(!1), [e, o] = ie(t.options), u = (m) => {
1168
- t.onDragComplete(m), o(m);
1169
- }, c = (m) => {
1170
- const v = [...e];
1171
- v.splice(m, 1), u(v);
1183
+ function na(t) {
1184
+ const [n, a] = ne(!1), [e, o] = ne(t.options), u = (p) => {
1185
+ t.onDragComplete(p), o(p);
1186
+ }, c = (p) => {
1187
+ const h = [...e];
1188
+ h.splice(p, 1), u(h);
1172
1189
  }, s = [];
1173
- e.forEach((m, v) => {
1174
- s.push(/* @__PURE__ */ l.jsx(zn, { index: v, title: m, onDelete: c }, m));
1190
+ e.forEach((p, h) => {
1191
+ s.push(/* @__PURE__ */ l.jsx(ta, { index: h, title: p, onDelete: c }, p));
1175
1192
  });
1176
1193
  let d = "dropdown draggable";
1177
1194
  return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1178
- /* @__PURE__ */ l.jsx(rn, { title: t.title }),
1179
- /* @__PURE__ */ l.jsx(Qt.Group, { axis: "y", values: e, onReorder: u, style: { visibility: n ? "visible" : "hidden" }, children: s })
1195
+ /* @__PURE__ */ l.jsx(ln, { title: t.title }),
1196
+ /* @__PURE__ */ l.jsx(an.Group, { axis: "y", values: e, onReorder: u, style: { visibility: n ? "visible" : "hidden" }, children: s })
1180
1197
  ] });
1181
1198
  }
1182
- function Hn(t) {
1183
- const [n, a] = ie(!1), e = [];
1199
+ function aa(t) {
1200
+ const [n, a] = ne(!1), e = [];
1184
1201
  t.options.map((u, c) => {
1185
- t.onSelect !== void 0 && (u.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Kn, { option: u }, c));
1202
+ t.onSelect !== void 0 && (u.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(ra, { option: u }, c));
1186
1203
  });
1187
1204
  let o = "dropdown";
1188
1205
  return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */ l.jsxs(
@@ -1192,7 +1209,7 @@ function Hn(t) {
1192
1209
  onMouseEnter: () => a(!0),
1193
1210
  onMouseLeave: () => a(!1),
1194
1211
  children: [
1195
- /* @__PURE__ */ l.jsx(rn, { title: t.title }),
1212
+ /* @__PURE__ */ l.jsx(ln, { title: t.title }),
1196
1213
  /* @__PURE__ */ l.jsx(
1197
1214
  "ul",
1198
1215
  {
@@ -1204,13 +1221,13 @@ function Hn(t) {
1204
1221
  }
1205
1222
  );
1206
1223
  }
1207
- function Kn(t) {
1208
- const { option: n } = t, [a, e] = ie("");
1224
+ function ra(t) {
1225
+ const { option: n } = t, [a, e] = ne("");
1209
1226
  let o;
1210
1227
  switch (n.type) {
1211
1228
  case "draggable":
1212
1229
  o = /* @__PURE__ */ l.jsx(
1213
- Wn,
1230
+ na,
1214
1231
  {
1215
1232
  title: n.title,
1216
1233
  options: n.value,
@@ -1223,7 +1240,7 @@ function Kn(t) {
1223
1240
  break;
1224
1241
  case "dropdown":
1225
1242
  o = /* @__PURE__ */ l.jsx(
1226
- Hn,
1243
+ aa,
1227
1244
  {
1228
1245
  title: n.title,
1229
1246
  options: n.value,
@@ -1244,77 +1261,74 @@ function Kn(t) {
1244
1261
  );
1245
1262
  break;
1246
1263
  }
1247
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, In());
1264
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, Gn());
1248
1265
  }
1249
- function Dr(t) {
1266
+ function Ka(t) {
1250
1267
  let n;
1251
1268
  function a(c) {
1252
- var d, m, v, f, h, g, E, w, A;
1269
+ var d, p, h, b, x, S, O, m, v;
1253
1270
  let s;
1254
1271
  switch (c.event) {
1255
1272
  case "custom":
1256
- k.dispatchEvent({ type: D.CUSTOM, value: c.data });
1273
+ I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1257
1274
  break;
1258
1275
  case "selectComponent":
1259
- k.dispatchEvent({ type: D.SELECT_DROPDOWN, value: c.data });
1276
+ I.dispatchEvent({ type: N.SELECT_DROPDOWN, value: c.data });
1260
1277
  break;
1261
1278
  case "draggableListUpdate":
1262
- k.dispatchEvent({ type: D.DRAG_UPDATE, value: c.data });
1279
+ I.dispatchEvent({ type: N.DRAG_UPDATE, value: c.data });
1263
1280
  break;
1264
1281
  case "addFolder":
1265
1282
  (d = t.components.get("debug")) == null || d.addFolder(c.data.name, c.data.params, c.data.parent);
1266
1283
  break;
1267
1284
  case "bindObject":
1268
- (m = t.components.get("debug")) == null || m.bind(c.data.name, c.data.params, c.data.parent);
1285
+ (p = t.components.get("debug")) == null || p.bind(c.data.name, c.data.params, c.data.parent);
1269
1286
  break;
1270
1287
  case "updateBind":
1271
- (v = t.components.get("debug")) == null || v.triggerBind(c.data.id, c.data.value);
1288
+ (h = t.components.get("debug")) == null || h.triggerBind(c.data.id, c.data.value);
1272
1289
  break;
1273
1290
  case "addButton":
1274
- (f = t.components.get("debug")) == null || f.button(c.data.name, c.data.callback, c.data.parent);
1291
+ (b = t.components.get("debug")) == null || b.button(c.data.name, c.data.callback, c.data.parent);
1275
1292
  break;
1276
1293
  case "clickButton":
1277
- (h = t.components.get("debug")) == null || h.triggerButton(c.data.id);
1294
+ (x = t.components.get("debug")) == null || x.triggerButton(c.data.id);
1278
1295
  break;
1279
1296
  case "setSheet":
1280
- s = (g = t.components.get("theatre")) == null ? void 0 : g.sheets.get(c.data.sheet), s !== void 0 && (n = s, Ze.setSelection([s]));
1297
+ s = (S = t.components.get("theatre")) == null ? void 0 : S.sheets.get(c.data.sheet), s !== void 0 && (n = s, Ze.setSelection([s]));
1281
1298
  break;
1282
1299
  case "setSheetObject":
1283
- s = (E = t.components.get("theatre")) == null ? void 0 : E.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && Ze.setSelection([s]);
1300
+ s = (O = t.components.get("theatre")) == null ? void 0 : O.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && Ze.setSelection([s]);
1284
1301
  break;
1285
1302
  case "updateSheetObject":
1286
- s = (w = t.components.get("theatre")) == null ? void 0 : w.sheetObjectCBs.get(c.data.sheetObject), s !== void 0 && s(c.data.values);
1303
+ s = (m = t.components.get("theatre")) == null ? void 0 : m.sheetObjectCBs.get(c.data.sheetObject), s !== void 0 && s(c.data.values);
1287
1304
  break;
1288
1305
  case "updateTimeline":
1289
- n = (A = t.components.get("theatre")) == null ? void 0 : A.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
1290
- break;
1291
- case "getScene":
1292
- k.dispatchEvent({ type: D.GET_SCENE });
1306
+ n = (v = t.components.get("theatre")) == null ? void 0 : v.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
1293
1307
  break;
1294
1308
  case "getObject":
1295
- k.dispatchEvent({ type: D.GET_OBJECT, value: c.data });
1309
+ I.dispatchEvent({ type: N.GET_OBJECT, value: c.data });
1296
1310
  break;
1297
1311
  case "updateObject":
1298
- k.dispatchEvent({ type: D.UPDATE_OBJECT, value: c.data });
1312
+ I.dispatchEvent({ type: N.UPDATE_OBJECT, value: c.data });
1299
1313
  break;
1300
1314
  case "createTexture":
1301
- k.dispatchEvent({ type: D.CREATE_TEXTURE, value: c.data });
1315
+ I.dispatchEvent({ type: N.CREATE_TEXTURE, value: c.data });
1302
1316
  break;
1303
1317
  case "requestMethod":
1304
- k.dispatchEvent({ type: D.REQUEST_METHOD, value: c.data });
1318
+ I.dispatchEvent({ type: N.REQUEST_METHOD, value: c.data });
1305
1319
  break;
1306
1320
  }
1307
1321
  }
1308
1322
  function e(c) {
1309
1323
  switch (c.event) {
1310
1324
  case "custom":
1311
- k.dispatchEvent({ type: D.CUSTOM, value: c.data });
1325
+ I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1312
1326
  break;
1313
1327
  case "setObject":
1314
- k.dispatchEvent({ type: D.SET_OBJECT, value: c.data });
1328
+ I.dispatchEvent({ type: N.SET_OBJECT, value: c.data });
1315
1329
  break;
1316
1330
  case "setScene":
1317
- k.dispatchEvent({ type: D.SET_SCENE, value: c.data });
1331
+ I.dispatchEvent({ type: N.SET_SCENE, value: c.data });
1318
1332
  break;
1319
1333
  }
1320
1334
  }
@@ -1322,38 +1336,38 @@ function Dr(t) {
1322
1336
  Ze.ui.hide();
1323
1337
  }
1324
1338
  function u() {
1325
- Ze.ui.restore(), Ze.onSelectionChange((m) => {
1326
- m.length < 1 || m.forEach((v) => {
1327
- var E;
1328
- let f = v.address.sheetId, h = "setSheet", g = {};
1329
- switch (v.type) {
1339
+ Ze.ui.restore(), Ze.onSelectionChange((p) => {
1340
+ p.length < 1 || p.forEach((h) => {
1341
+ var O;
1342
+ let b = h.address.sheetId, x = "setSheet", S = {};
1343
+ switch (h.type) {
1330
1344
  case "Theatre_Sheet_PublicAPI":
1331
- h = "setSheet", g = {
1332
- sheet: v.address.sheetId
1333
- }, n = (E = t.components.get("theatre")) == null ? void 0 : E.sheets.get(v.address.sheetId);
1345
+ x = "setSheet", S = {
1346
+ sheet: h.address.sheetId
1347
+ }, n = (O = t.components.get("theatre")) == null ? void 0 : O.sheets.get(h.address.sheetId);
1334
1348
  break;
1335
1349
  case "Theatre_SheetObject_PublicAPI":
1336
- h = "setSheetObject", f += `_${v.address.objectKey}`, g = {
1337
- id: f,
1338
- sheet: v.address.sheetId,
1339
- key: v.address.objectKey
1350
+ x = "setSheetObject", b += `_${h.address.objectKey}`, S = {
1351
+ id: b,
1352
+ sheet: h.address.sheetId,
1353
+ key: h.address.objectKey
1340
1354
  };
1341
1355
  break;
1342
1356
  }
1343
- t.send({ event: h, target: "app", data: g });
1357
+ t.send({ event: x, target: "app", data: S });
1344
1358
  });
1345
1359
  });
1346
1360
  let c = 0;
1347
1361
  const s = () => {
1348
1362
  if (n !== void 0 && c !== n.sequence.position) {
1349
1363
  c = n.sequence.position;
1350
- const m = n;
1364
+ const p = n;
1351
1365
  t.send({
1352
1366
  event: "updateTimeline",
1353
1367
  target: "app",
1354
1368
  data: {
1355
1369
  position: c,
1356
- sheet: m.address.sheetId
1370
+ sheet: p.address.sheetId
1357
1371
  }
1358
1372
  });
1359
1373
  }
@@ -1366,7 +1380,7 @@ function Dr(t) {
1366
1380
  t.editor ? e(c) : a(c);
1367
1381
  }), t.editor ? u() : o();
1368
1382
  }
1369
- const Xn = `out vec3 worldPosition;
1383
+ const ia = `out vec3 worldPosition;
1370
1384
  uniform float uDistance;
1371
1385
 
1372
1386
  void main() {
@@ -1375,7 +1389,7 @@ void main() {
1375
1389
  worldPosition.xz += cameraPosition.xz;
1376
1390
 
1377
1391
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
1378
- }`, qn = `out vec4 fragColor;
1392
+ }`, oa = `out vec4 fragColor;
1379
1393
  in vec3 worldPosition;
1380
1394
 
1381
1395
  uniform float uDivisions;
@@ -1443,14 +1457,14 @@ void main() {
1443
1457
 
1444
1458
  if (fragColor.a <= 0.0) discard;
1445
1459
  }`;
1446
- class Zn extends qt {
1460
+ class sa extends Qt {
1447
1461
  constructor(n) {
1448
1462
  super({
1449
1463
  extensions: {
1450
1464
  derivatives: !0
1451
1465
  },
1452
- glslVersion: mn,
1453
- side: gn,
1466
+ glslVersion: wn,
1467
+ side: Cn,
1454
1468
  transparent: !0,
1455
1469
  uniforms: {
1456
1470
  uScale: {
@@ -1460,7 +1474,7 @@ class Zn extends qt {
1460
1474
  value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
1461
1475
  },
1462
1476
  uColor: {
1463
- value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Pt(16777215)
1477
+ value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new kt(16777215)
1464
1478
  },
1465
1479
  uDistance: {
1466
1480
  value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
@@ -1472,25 +1486,25 @@ class Zn extends qt {
1472
1486
  value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
1473
1487
  }
1474
1488
  },
1475
- vertexShader: Xn,
1476
- fragmentShader: qn,
1489
+ vertexShader: ia,
1490
+ fragmentShader: oa,
1477
1491
  name: "InfiniteGrid",
1478
1492
  depthWrite: !1
1479
1493
  });
1480
1494
  }
1481
1495
  }
1482
- class Jn extends vn {
1496
+ class ca extends Sn {
1483
1497
  constructor() {
1484
- const a = new Zn();
1485
- super(new bn(2, 2), a);
1486
- L(this, "gridMaterial");
1498
+ const a = new sa();
1499
+ super(new On(2, 2), a);
1500
+ $(this, "gridMaterial");
1487
1501
  this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1488
1502
  }
1489
1503
  update() {
1490
1504
  this.gridMaterial.needsUpdate = !0;
1491
1505
  }
1492
1506
  }
1493
- const Qn = `#include <common>
1507
+ const la = `#include <common>
1494
1508
  #include <batching_pars_vertex>
1495
1509
  #include <uv_pars_vertex>
1496
1510
  #include <color_pars_vertex>
@@ -1520,7 +1534,7 @@ void main() {
1520
1534
  #include <logdepthbuf_vertex>
1521
1535
  #include <clipping_planes_vertex>
1522
1536
  #include <worldpos_vertex>
1523
- }`, er = `
1537
+ }`, ua = `
1524
1538
  #include <common>
1525
1539
  #include <uv_pars_fragment>
1526
1540
  #include <clipping_planes_pars_fragment>
@@ -1529,19 +1543,19 @@ void main() {
1529
1543
  #include <clipping_planes_fragment>
1530
1544
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
1531
1545
  }`;
1532
- class tr extends qt {
1546
+ class da extends Qt {
1533
1547
  constructor() {
1534
1548
  super({
1535
1549
  defines: {
1536
1550
  USE_UV: ""
1537
1551
  },
1538
- vertexShader: Qn,
1539
- fragmentShader: er
1552
+ vertexShader: la,
1553
+ fragmentShader: ua
1540
1554
  });
1541
1555
  }
1542
1556
  }
1543
- function Mt(t) {
1544
- const [n, a] = ie(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1557
+ function jt(t) {
1558
+ const [n, a] = ne(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1545
1559
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1546
1560
  /* @__PURE__ */ l.jsxs(
1547
1561
  "button",
@@ -1567,10 +1581,10 @@ function Mt(t) {
1567
1581
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1568
1582
  ] });
1569
1583
  }
1570
- function an(t) {
1571
- const [n, a] = ie(!1), e = t.child.children.length > 0, o = [];
1584
+ function un(t) {
1585
+ const [n, a] = ne(!1), e = t.child.children.length > 0, o = [];
1572
1586
  return t.child.children.length > 0 && t.child.children.map((u) => {
1573
- o.push(/* @__PURE__ */ l.jsx(an, { child: u, three: t.three }, Math.random()));
1587
+ o.push(/* @__PURE__ */ l.jsx(un, { child: u, three: t.three }, Math.random()));
1574
1588
  }), /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1575
1589
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1576
1590
  e ? /* @__PURE__ */ l.jsx(
@@ -1598,19 +1612,19 @@ function an(t) {
1598
1612
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1599
1613
  }
1600
1614
  ),
1601
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Ln(t.child)}` })
1615
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${Hn(t.child)}` })
1602
1616
  ] }),
1603
1617
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
1604
1618
  ] }, Math.random());
1605
1619
  }
1606
- function nr(t) {
1620
+ function fa(t) {
1607
1621
  const n = [];
1608
1622
  return t.child.children.map((a) => {
1609
- n.push(/* @__PURE__ */ l.jsx(an, { child: a, three: t.three }, Math.random()));
1623
+ n.push(/* @__PURE__ */ l.jsx(un, { child: a, three: t.three }, Math.random()));
1610
1624
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1611
1625
  }
1612
- const rr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1613
- function ar(t) {
1626
+ const ha = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1627
+ function pa(t) {
1614
1628
  return "items" in t;
1615
1629
  }
1616
1630
  function $e(t) {
@@ -1619,7 +1633,7 @@ function $e(t) {
1619
1633
  }
1620
1634
  const a = [];
1621
1635
  return t.items.forEach((e) => {
1622
- ar(e) ? a.push(
1636
+ pa(e) ? a.push(
1623
1637
  /* @__PURE__ */ l.jsx($e, { title: e.title, items: e.items }, Math.random())
1624
1638
  ) : a.push(
1625
1639
  /* @__PURE__ */ l.jsx(
@@ -1640,12 +1654,12 @@ function $e(t) {
1640
1654
  Math.random()
1641
1655
  )
1642
1656
  );
1643
- }), /* @__PURE__ */ l.jsx(Mt, { label: t.title, open: !1, children: a });
1657
+ }), /* @__PURE__ */ l.jsx(jt, { label: t.title, open: !1, children: a });
1644
1658
  }
1645
- function ir(t) {
1659
+ function ma(t) {
1646
1660
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1647
1661
  }
1648
- function Se(t) {
1662
+ function Oe(t) {
1649
1663
  switch (t) {
1650
1664
  case "alphaMap":
1651
1665
  return "Alpha Map";
@@ -1794,10 +1808,10 @@ function Se(t) {
1794
1808
  }
1795
1809
  return t;
1796
1810
  }
1797
- function or(t) {
1811
+ function ga(t) {
1798
1812
  return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1799
1813
  }
1800
- function sr() {
1814
+ function va() {
1801
1815
  const t = document.createElement("input");
1802
1816
  return t.type = "file", new Promise((n, a) => {
1803
1817
  t.addEventListener("change", function() {
@@ -1812,41 +1826,41 @@ function sr() {
1812
1826
  }), t.click();
1813
1827
  });
1814
1828
  }
1815
- function $t(t, n, a) {
1829
+ function Vt(t, n, a) {
1816
1830
  const e = [];
1817
1831
  for (const o in t) {
1818
- if (!ir(o))
1832
+ if (!ma(o))
1819
1833
  continue;
1820
1834
  const u = typeof t[o], c = t[o];
1821
1835
  if (u === "boolean" || u === "number" || u === "string") {
1822
1836
  const s = {
1823
- title: Se(o),
1837
+ title: Oe(o),
1824
1838
  prop: o,
1825
1839
  type: u,
1826
1840
  value: c,
1827
1841
  min: void 0,
1828
1842
  max: void 0,
1829
- onChange: (d, m) => {
1830
- var f;
1831
- a.updateObject(n.uuid, `material.${d}`, m), u === "boolean" && a.updateObject(n.uuid, "material.needsUpdate", !0);
1832
- const v = (f = a.scene) == null ? void 0 : f.getObjectByProperty("uuid", n.uuid);
1833
- v !== void 0 && K(v, `material.${d}`, m);
1843
+ onChange: (d, p) => {
1844
+ var b;
1845
+ a.updateObject(n.uuid, `material.${d}`, p), u === "boolean" && a.updateObject(n.uuid, "material.needsUpdate", !0);
1846
+ const h = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
1847
+ h !== void 0 && q(h, `material.${d}`, p);
1834
1848
  }
1835
1849
  };
1836
- or(o) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
1850
+ ga(o) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
1837
1851
  } else if (u === "object")
1838
1852
  if (c.isColor)
1839
1853
  e.push({
1840
- title: Se(o),
1854
+ title: Oe(o),
1841
1855
  prop: o,
1842
1856
  type: "color",
1843
1857
  value: c,
1844
1858
  onChange: (s, d) => {
1845
- var f;
1846
- const m = new Pt(d);
1847
- a.updateObject(n.uuid, `material.${s}`, m);
1848
- const v = (f = a.scene) == null ? void 0 : f.getObjectByProperty("uuid", n.uuid);
1849
- v !== void 0 && K(v, `material.${s}`, m);
1859
+ var b;
1860
+ const p = new kt(d);
1861
+ a.updateObject(n.uuid, `material.${s}`, p);
1862
+ const h = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
1863
+ h !== void 0 && q(h, `material.${s}`, p);
1850
1864
  }
1851
1865
  });
1852
1866
  else if (Array.isArray(c)) {
@@ -1856,79 +1870,79 @@ function $t(t, n, a) {
1856
1870
  title: `${d}`,
1857
1871
  type: `${typeof c[d]}`,
1858
1872
  value: c[d],
1859
- onChange: (m, v) => {
1860
- var h;
1861
- a.updateObject(n.uuid, `material.${o}`, v);
1862
- const f = (h = a.scene) == null ? void 0 : h.getObjectByProperty("uuid", n.uuid);
1863
- f !== void 0 && K(f, `material.${o}`, v);
1873
+ onChange: (p, h) => {
1874
+ var x;
1875
+ a.updateObject(n.uuid, `material.${o}`, h);
1876
+ const b = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
1877
+ b !== void 0 && q(b, `material.${o}`, h);
1864
1878
  }
1865
1879
  });
1866
1880
  e.push({
1867
- title: Se(o),
1881
+ title: Oe(o),
1868
1882
  items: s
1869
1883
  });
1870
1884
  } else {
1871
1885
  const s = [];
1872
1886
  for (const d in c) {
1873
- const m = c[d];
1874
- switch (typeof m) {
1887
+ const p = c[d];
1888
+ switch (typeof p) {
1875
1889
  case "boolean":
1876
1890
  case "number":
1877
1891
  case "string":
1878
1892
  d === "src" ? e.push({
1879
- title: Se(o),
1893
+ title: Oe(o),
1880
1894
  type: "image",
1881
- value: m,
1882
- onChange: (f, h) => {
1883
- var E;
1884
- a.createTexture(n.uuid, `material.${o}`, h);
1885
- const g = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
1886
- g !== void 0 && Tt(h).then((w) => {
1887
- K(g, `material.${o}`, w), K(g, "material.needsUpdate", !0);
1895
+ value: p,
1896
+ onChange: (b, x) => {
1897
+ var O;
1898
+ a.createTexture(n.uuid, `material.${o}`, x);
1899
+ const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1900
+ S !== void 0 && Mt(x).then((m) => {
1901
+ q(S, `material.${o}`, m), q(S, "material.needsUpdate", !0);
1888
1902
  });
1889
1903
  }
1890
1904
  }) : s.push({
1891
- title: `${Se(d)}`,
1905
+ title: `${Oe(d)}`,
1892
1906
  prop: `material.${o}.${d}`,
1893
1907
  type: `${typeof t[o][d]}`,
1894
1908
  value: c[d],
1895
- onChange: (f, h) => {
1896
- var E;
1897
- a.updateObject(n.uuid, `material.${o}.${d}`, h);
1898
- const g = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
1899
- g !== void 0 && K(g, `material.${o}.${d}`, h);
1909
+ onChange: (b, x) => {
1910
+ var O;
1911
+ a.updateObject(n.uuid, `material.${o}.${d}`, x);
1912
+ const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1913
+ S !== void 0 && q(S, `material.${o}.${d}`, x);
1900
1914
  }
1901
1915
  });
1902
1916
  break;
1903
1917
  case "object":
1904
- m.value !== void 0 && m.value.src !== void 0 ? s.push({
1905
- title: Se(d),
1918
+ p.value !== void 0 && p.value.src !== void 0 ? s.push({
1919
+ title: Oe(d),
1906
1920
  type: "image",
1907
- value: m.value.src,
1908
- onChange: (f, h) => {
1909
- var E;
1910
- a.createTexture(n.uuid, `material.${o}.${d}.value`, h);
1911
- const g = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
1912
- g !== void 0 && Tt(h).then((w) => {
1913
- K(g, `material.${o}.${d}.value`, w);
1921
+ value: p.value.src,
1922
+ onChange: (b, x) => {
1923
+ var O;
1924
+ a.createTexture(n.uuid, `material.${o}.${d}.value`, x);
1925
+ const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1926
+ S !== void 0 && Mt(x).then((m) => {
1927
+ q(S, `material.${o}.${d}.value`, m);
1914
1928
  });
1915
1929
  }
1916
1930
  }) : s.push({
1917
1931
  title: d,
1918
- type: `${typeof m.value}`,
1919
- value: m.value,
1920
- onChange: (f, h) => {
1921
- var E;
1922
- a.updateObject(n.uuid, `material.${o}.${d}.value`, h);
1923
- const g = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
1924
- g !== void 0 && K(g, `material.${o}.${d}.value`, h);
1932
+ type: `${typeof p.value}`,
1933
+ value: p.value,
1934
+ onChange: (b, x) => {
1935
+ var O;
1936
+ a.updateObject(n.uuid, `material.${o}.${d}.value`, x);
1937
+ const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1938
+ S !== void 0 && q(S, `material.${o}.${d}.value`, x);
1925
1939
  }
1926
1940
  });
1927
1941
  break;
1928
1942
  }
1929
1943
  }
1930
1944
  s.length > 0 && e.push({
1931
- title: Se(o),
1945
+ title: Oe(o),
1932
1946
  items: s
1933
1947
  });
1934
1948
  }
@@ -1943,7 +1957,7 @@ function $t(t, n, a) {
1943
1957
  }
1944
1958
  }), e;
1945
1959
  }
1946
- function cr(t, n) {
1960
+ function ba(t, n) {
1947
1961
  const a = t.material;
1948
1962
  if (Array.isArray(a)) {
1949
1963
  const e = [], o = a.length;
@@ -1953,8 +1967,9 @@ function cr(t, n) {
1953
1967
  $e,
1954
1968
  {
1955
1969
  title: `Material ${u}`,
1956
- items: $t(a[u], t, n)
1957
- }
1970
+ items: Vt(a[u], t, n)
1971
+ },
1972
+ `Material ${u}`
1958
1973
  )
1959
1974
  );
1960
1975
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
@@ -1963,38 +1978,38 @@ function cr(t, n) {
1963
1978
  $e,
1964
1979
  {
1965
1980
  title: "Material",
1966
- items: $t(a, t, n)
1981
+ items: Vt(a, t, n)
1967
1982
  }
1968
1983
  );
1969
1984
  }
1970
1985
  function et(t) {
1971
1986
  let n = t.value;
1972
- n !== void 0 && n.isColor !== void 0 && (n = Nn(t.value));
1973
- const [a, e] = ie(n), o = Oe(null), u = Oe(null), c = Oe(null);
1974
- tt(() => {
1975
- var X;
1976
- let v = !1, f = -1, h = 0, g = Number(a);
1977
- const E = (Z) => {
1978
- v = !0, h = g, f = Z.clientX;
1979
- }, w = (Z) => {
1980
- if (!v)
1987
+ n !== void 0 && n.isColor !== void 0 && (n = Yn(t.value));
1988
+ const [a, e] = ne(n), o = ye(null), u = ye(null), c = ye(null);
1989
+ Be(() => {
1990
+ var F;
1991
+ let h = !1, b = -1, x = 0, S = Number(a);
1992
+ const O = (V) => {
1993
+ h = !0, x = S, b = V.clientX;
1994
+ }, m = (V) => {
1995
+ if (!h)
1981
1996
  return;
1982
- const z = t.step !== void 0 ? t.step : 1, O = (Z.clientX - f) * z;
1983
- g = Number((h + O).toFixed(4)), u.current !== null && (u.current.value = g.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, g);
1984
- }, A = () => {
1985
- v = !1;
1986
- }, U = () => {
1987
- v = !1;
1988
- }, j = t.type === "number";
1989
- return j && ((X = o.current) == null || X.addEventListener("mousedown", E, !1), document.addEventListener("mouseup", A, !1), document.addEventListener("mousemove", w, !1), document.addEventListener("contextmenu", U, !1)), () => {
1990
- var Z;
1991
- j && ((Z = o.current) == null || Z.removeEventListener("mousedown", E), document.removeEventListener("mouseup", A), document.removeEventListener("mousemove", w), document.removeEventListener("contextmenu", U));
1997
+ const Z = t.step !== void 0 ? t.step : 1, se = (V.clientX - b) * Z;
1998
+ S = Number((x + se).toFixed(4)), u.current !== null && (u.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
1999
+ }, v = () => {
2000
+ h = !1;
2001
+ }, y = () => {
2002
+ h = !1;
2003
+ }, w = t.type === "number";
2004
+ return w && ((F = o.current) == null || F.addEventListener("mousedown", O, !1), document.addEventListener("mouseup", v, !1), document.addEventListener("mousemove", m, !1), document.addEventListener("contextmenu", y, !1)), () => {
2005
+ var V;
2006
+ w && ((V = o.current) == null || V.removeEventListener("mousedown", O), document.removeEventListener("mouseup", v), document.removeEventListener("mousemove", m), document.removeEventListener("contextmenu", y));
1992
2007
  };
1993
2008
  }, [a]);
1994
2009
  const s = t.type === "string" && (a.length > 100 || a.search(`
1995
- `) > -1), d = s || t.type === "image", m = (v) => {
1996
- let f = v.target.value;
1997
- t.type === "boolean" && (f = v.target.checked), e(f), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, f);
2010
+ `) > -1), d = s || t.type === "image", p = (h) => {
2011
+ let b = h.target.value;
2012
+ t.type === "boolean" && (b = h.target.checked), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
1998
2013
  };
1999
2014
  return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2000
2015
  t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: t.title }, "fieldLabel"),
@@ -2003,7 +2018,7 @@ function et(t) {
2003
2018
  {
2004
2019
  type: "text",
2005
2020
  disabled: t.disabled,
2006
- onChange: m,
2021
+ onChange: p,
2007
2022
  value: a
2008
2023
  }
2009
2024
  ),
@@ -2013,7 +2028,7 @@ function et(t) {
2013
2028
  cols: 50,
2014
2029
  rows: 10,
2015
2030
  disabled: !0,
2016
- onChange: m,
2031
+ onChange: p,
2017
2032
  value: a
2018
2033
  }
2019
2034
  ),
@@ -2022,7 +2037,7 @@ function et(t) {
2022
2037
  {
2023
2038
  type: "checkbox",
2024
2039
  disabled: t.disabled,
2025
- onChange: m,
2040
+ onChange: p,
2026
2041
  checked: a
2027
2042
  }
2028
2043
  ),
@@ -2035,11 +2050,11 @@ function et(t) {
2035
2050
  min: t.min,
2036
2051
  max: t.max,
2037
2052
  step: t.step,
2038
- onChange: m
2053
+ onChange: p
2039
2054
  }
2040
2055
  ),
2041
2056
  t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2042
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: m, className: "min" }),
2057
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "min" }),
2043
2058
  /* @__PURE__ */ l.jsx(
2044
2059
  "input",
2045
2060
  {
@@ -2049,13 +2064,13 @@ function et(t) {
2049
2064
  min: t.min,
2050
2065
  max: t.max,
2051
2066
  step: t.step,
2052
- onChange: m
2067
+ onChange: p
2053
2068
  }
2054
2069
  )
2055
2070
  ] }),
2056
2071
  t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2057
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: m, className: "color" }),
2058
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: m })
2072
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "color" }),
2073
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: p })
2059
2074
  ] }),
2060
2075
  t.type === "button" && /* @__PURE__ */ l.jsx(
2061
2076
  "button",
@@ -2067,13 +2082,13 @@ function et(t) {
2067
2082
  }
2068
2083
  ),
2069
2084
  t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: c, onClick: () => {
2070
- sr().then((v) => {
2071
- c.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2085
+ va().then((h) => {
2086
+ c.current.src = h, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, h);
2072
2087
  });
2073
- }, src: a.length > 0 ? a : rr })
2088
+ }, src: a.length > 0 ? a : ha })
2074
2089
  ] });
2075
2090
  }
2076
- function Gt(t) {
2091
+ function Yt(t) {
2077
2092
  switch (t) {
2078
2093
  case "fov":
2079
2094
  return "FOV";
@@ -2102,12 +2117,12 @@ function Gt(t) {
2102
2117
  }
2103
2118
  return t;
2104
2119
  }
2105
- function lr(t, n) {
2120
+ function ya(t, n) {
2106
2121
  const a = [];
2107
2122
  if (t.perspectiveCameraInfo !== void 0)
2108
2123
  for (const e in t.perspectiveCameraInfo)
2109
2124
  a.push({
2110
- title: Gt(e),
2125
+ title: Yt(e),
2111
2126
  prop: e,
2112
2127
  type: "number",
2113
2128
  step: 0.01,
@@ -2116,13 +2131,13 @@ function lr(t, n) {
2116
2131
  var s;
2117
2132
  n.updateObject(t.uuid, o, u), n.requestMethod(t.uuid, "updateProjectionMatrix");
2118
2133
  const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
2119
- c !== void 0 && (K(c, o, u), c.updateProjectionMatrix());
2134
+ c !== void 0 && (q(c, o, u), c.updateProjectionMatrix());
2120
2135
  }
2121
2136
  });
2122
2137
  else if (t.orthographicCameraInfo !== void 0)
2123
2138
  for (const e in t.orthographicCameraInfo)
2124
2139
  a.push({
2125
- title: Gt(e),
2140
+ title: Yt(e),
2126
2141
  prop: e,
2127
2142
  type: "number",
2128
2143
  step: 0.01,
@@ -2131,7 +2146,7 @@ function lr(t, n) {
2131
2146
  var s;
2132
2147
  n.updateObject(t.uuid, o, u), n.requestMethod(t.uuid, "updateProjectionMatrix");
2133
2148
  const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
2134
- c !== void 0 && (K(c, o, u), c.updateProjectionMatrix());
2149
+ c !== void 0 && (q(c, o, u), c.updateProjectionMatrix());
2135
2150
  }
2136
2151
  });
2137
2152
  return /* @__PURE__ */ l.jsx(
@@ -2142,83 +2157,84 @@ function lr(t, n) {
2142
2157
  }
2143
2158
  );
2144
2159
  }
2145
- function ur(t, n) {
2146
- const a = new yn();
2160
+ const Ea = Math.PI / 180, xa = 180 / Math.PI;
2161
+ function wa(t) {
2162
+ return t * Ea;
2163
+ }
2164
+ function St(t) {
2165
+ return t * xa;
2166
+ }
2167
+ function Ca(t, n) {
2168
+ const a = new Tn();
2147
2169
  a.elements = t.matrix;
2148
- const e = new I(), o = new En(), u = new I();
2170
+ const e = new L(), o = new Rn(), u = new L();
2149
2171
  t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a), u.setFromMatrixScale(a));
2150
- const c = (d, m) => {
2151
- var f;
2152
- n.updateObject(t.uuid, d, m);
2153
- const v = (f = n.scene) == null ? void 0 : f.getObjectByProperty("uuid", t.uuid);
2154
- v !== void 0 && K(v, d, m);
2155
- }, s = [
2172
+ const c = (d, p) => {
2173
+ var b;
2174
+ n.updateObject(t.uuid, d, p);
2175
+ const h = (b = n.scene) == null ? void 0 : b.getObjectByProperty("uuid", t.uuid);
2176
+ h !== void 0 && q(h, d, p);
2177
+ }, s = (d, p) => {
2178
+ c(d, wa(p));
2179
+ };
2180
+ return /* @__PURE__ */ l.jsx(
2181
+ $e,
2156
2182
  {
2157
- title: "Position",
2183
+ title: "Transform",
2158
2184
  items: [
2159
2185
  {
2160
- title: "X",
2186
+ title: "Position X",
2161
2187
  prop: "position.x",
2162
2188
  type: "number",
2163
2189
  value: e.x,
2164
2190
  onChange: c
2165
2191
  },
2166
2192
  {
2167
- title: "Y",
2193
+ title: "Position Y",
2168
2194
  prop: "position.y",
2169
2195
  type: "number",
2170
2196
  value: e.y,
2171
2197
  onChange: c
2172
2198
  },
2173
2199
  {
2174
- title: "Z",
2200
+ title: "Position Z",
2175
2201
  prop: "position.z",
2176
2202
  type: "number",
2177
2203
  value: e.z,
2178
2204
  onChange: c
2179
- }
2180
- ]
2181
- },
2182
- {
2183
- title: "Rotation",
2184
- items: [
2205
+ },
2185
2206
  {
2186
- title: "X",
2207
+ title: "Rotation X",
2187
2208
  prop: "rotation.x",
2188
2209
  type: "number",
2189
- value: o.x,
2190
- min: -Math.PI,
2191
- max: Math.PI,
2192
- step: 0.01,
2193
- onChange: c
2210
+ value: Ct(St(o.x)),
2211
+ min: -360,
2212
+ max: 360,
2213
+ step: 0.1,
2214
+ onChange: s
2194
2215
  },
2195
2216
  {
2196
- title: "Y",
2217
+ title: "Rotation Y",
2197
2218
  prop: "rotation.y",
2198
2219
  type: "number",
2199
- value: o.y,
2200
- min: -Math.PI,
2201
- max: Math.PI,
2202
- step: 0.01,
2203
- onChange: c
2220
+ value: Ct(St(o.y)),
2221
+ min: -360,
2222
+ max: 360,
2223
+ step: 0.1,
2224
+ onChange: s
2204
2225
  },
2205
2226
  {
2206
- title: "Z",
2227
+ title: "Rotation Z",
2207
2228
  prop: "rotation.z",
2208
2229
  type: "number",
2209
- value: o.z,
2210
- min: -Math.PI,
2211
- max: Math.PI,
2212
- step: 0.01,
2213
- onChange: c
2214
- }
2215
- ]
2216
- },
2217
- {
2218
- title: "Scale",
2219
- items: [
2230
+ value: Ct(St(o.z)),
2231
+ min: -360,
2232
+ max: 360,
2233
+ step: 0.1,
2234
+ onChange: s
2235
+ },
2220
2236
  {
2221
- title: "X",
2237
+ title: "Scale X",
2222
2238
  prop: "scale.x",
2223
2239
  type: "number",
2224
2240
  value: u.x,
@@ -2226,7 +2242,7 @@ function ur(t, n) {
2226
2242
  onChange: c
2227
2243
  },
2228
2244
  {
2229
- title: "Y",
2245
+ title: "Scale Y",
2230
2246
  prop: "scale.y",
2231
2247
  type: "number",
2232
2248
  value: u.y,
@@ -2234,7 +2250,7 @@ function ur(t, n) {
2234
2250
  onChange: c
2235
2251
  },
2236
2252
  {
2237
- title: "Z",
2253
+ title: "Scale Z",
2238
2254
  prop: "scale.z",
2239
2255
  type: "number",
2240
2256
  value: u.z,
@@ -2243,16 +2259,9 @@ function ur(t, n) {
2243
2259
  }
2244
2260
  ]
2245
2261
  }
2246
- ];
2247
- return /* @__PURE__ */ l.jsx(
2248
- $e,
2249
- {
2250
- title: "Transform",
2251
- items: s
2252
- }
2253
2262
  );
2254
2263
  }
2255
- function Vt(t) {
2264
+ function zt(t) {
2256
2265
  switch (t) {
2257
2266
  case "color":
2258
2267
  return "Color";
@@ -2271,25 +2280,25 @@ function Vt(t) {
2271
2280
  }
2272
2281
  return t;
2273
2282
  }
2274
- function dr(t, n) {
2283
+ function Sa(t, n) {
2275
2284
  const a = [];
2276
2285
  if (t.lightInfo !== void 0)
2277
2286
  for (const e in t.lightInfo) {
2278
2287
  const o = t.lightInfo[e];
2279
2288
  o !== void 0 && (o.isColor !== void 0 ? a.push({
2280
- title: Vt(e),
2289
+ title: zt(e),
2281
2290
  prop: e,
2282
2291
  type: "color",
2283
2292
  value: o,
2284
2293
  onChange: (u, c) => {
2285
- var m;
2286
- const s = new Pt(c);
2294
+ var p;
2295
+ const s = new kt(c);
2287
2296
  n.updateObject(t.uuid, u, s);
2288
- const d = (m = n.scene) == null ? void 0 : m.getObjectByProperty("uuid", t.uuid);
2289
- d !== void 0 && K(d, u, s);
2297
+ const d = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
2298
+ d !== void 0 && q(d, u, s);
2290
2299
  }
2291
2300
  }) : a.push({
2292
- title: Vt(e),
2301
+ title: zt(e),
2293
2302
  prop: e,
2294
2303
  type: typeof o,
2295
2304
  value: o,
@@ -2298,7 +2307,7 @@ function dr(t, n) {
2298
2307
  var d;
2299
2308
  n.updateObject(t.uuid, u, c);
2300
2309
  const s = (d = n.scene) == null ? void 0 : d.getObjectByProperty("uuid", t.uuid);
2301
- s !== void 0 && K(s, u, c);
2310
+ s !== void 0 && q(s, u, c);
2302
2311
  }
2303
2312
  }));
2304
2313
  }
@@ -2310,8 +2319,8 @@ function dr(t, n) {
2310
2319
  }
2311
2320
  );
2312
2321
  }
2313
- function fr(t) {
2314
- const [n, a] = ie(-1), [e, o] = ie({
2322
+ function Oa(t) {
2323
+ const [n, a] = ne(-1), [e, o] = ne({
2315
2324
  name: "",
2316
2325
  uuid: "",
2317
2326
  type: "",
@@ -2322,13 +2331,13 @@ function fr(t) {
2322
2331
  orthographicCameraInfo: void 0,
2323
2332
  lightInfo: void 0
2324
2333
  });
2325
- tt(() => {
2334
+ Be(() => {
2326
2335
  function c(s) {
2327
2336
  const d = s.value;
2328
2337
  o(d), a(Date.now());
2329
2338
  }
2330
- return k.addEventListener(D.SET_OBJECT, c), () => {
2331
- k.removeEventListener(D.SET_OBJECT, c);
2339
+ return I.addEventListener(N.SET_OBJECT, c), () => {
2340
+ I.removeEventListener(N.SET_OBJECT, c);
2332
2341
  };
2333
2342
  }, []);
2334
2343
  const u = e.type.toLowerCase();
@@ -2372,59 +2381,45 @@ function fr(t) {
2372
2381
  prop: "visible",
2373
2382
  value: e.visible,
2374
2383
  onChange: (c, s) => {
2375
- var m;
2384
+ var p;
2376
2385
  t.three.updateObject(e.uuid, c, s);
2377
- const d = (m = t.three.scene) == null ? void 0 : m.getObjectByProperty("uuid", e.uuid);
2378
- d !== void 0 && K(d, c, s);
2386
+ const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", e.uuid);
2387
+ d !== void 0 && q(d, c, s);
2379
2388
  }
2380
2389
  }
2381
2390
  )
2382
2391
  ] }),
2383
2392
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2384
- ur(e, t.three),
2385
- u.search("camera") > -1 ? lr(e, t.three) : null,
2386
- u.search("light") > -1 ? dr(e, t.three) : null,
2387
- u.search("mesh") > -1 ? cr(e, t.three) : null
2393
+ Ca(e, t.three),
2394
+ u.search("camera") > -1 ? ya(e, t.three) : null,
2395
+ u.search("light") > -1 ? Sa(e, t.three) : null,
2396
+ u.search("mesh") > -1 ? ba(e, t.three) : null
2388
2397
  ] })
2389
2398
  ] }) }, n);
2390
2399
  }
2391
- class Ir extends kn {
2400
+ class Xa extends Bn {
2392
2401
  constructor(a) {
2393
2402
  super(a);
2394
- L(this, "three");
2403
+ $(this, "three");
2395
2404
  // Private
2396
- L(this, "onRefresh", () => {
2397
- this.three.getScene();
2398
- });
2399
- L(this, "setScene", (a) => {
2405
+ $(this, "setScene", (a) => {
2400
2406
  this.setState(() => ({
2401
2407
  scene: a.value
2402
2408
  }));
2403
2409
  });
2404
2410
  this.state = {
2405
2411
  scene: a.scene !== void 0 ? a.scene : null
2406
- }, this.three = a.three, k.addEventListener(D.SET_SCENE, this.setScene);
2407
- }
2408
- componentDidMount() {
2409
- this.onRefresh();
2412
+ }, this.three = a.three, I.addEventListener(N.SET_SCENE, this.setScene);
2410
2413
  }
2411
2414
  componentWillUnmount() {
2412
- k.removeEventListener(D.SET_SCENE, this.setScene);
2415
+ I.removeEventListener(N.SET_SCENE, this.setScene);
2413
2416
  }
2414
2417
  render() {
2415
2418
  var o;
2416
- const a = this.componentState.scene !== null, e = "Hierarchy" + (a ? `: ${(o = this.componentState.scene) == null ? void 0 : o.name}` : "");
2419
+ const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(o = this.componentState.scene) == null ? void 0 : o.name}` : "No Scene");
2417
2420
  return /* @__PURE__ */ l.jsx("div", { id: "SceneHierarchy", children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2418
- a && /* @__PURE__ */ l.jsx(
2419
- Mt,
2420
- {
2421
- label: e,
2422
- button: /* @__PURE__ */ l.jsx("button", { className: "icon refresh hideText", onClick: this.onRefresh, children: "Refresh" }),
2423
- open: !0,
2424
- children: /* @__PURE__ */ l.jsx(nr, { child: this.componentState.scene, three: this.three })
2425
- }
2426
- ),
2427
- /* @__PURE__ */ l.jsx(Mt, { label: "Inspector", children: /* @__PURE__ */ l.jsx(fr, { three: this.three }, "Inspector") })
2421
+ /* @__PURE__ */ l.jsx(jt, { label: e, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: a && /* @__PURE__ */ l.jsx(fa, { child: this.componentState.scene, three: this.three }) }) }),
2422
+ /* @__PURE__ */ l.jsx(jt, { label: "Inspector", children: /* @__PURE__ */ l.jsx(Oa, { three: this.three }, "Inspector") })
2428
2423
  ] }) }, "SceneHierarchy");
2429
2424
  }
2430
2425
  // Getters / Setters
@@ -2432,40 +2427,54 @@ class Ir extends kn {
2432
2427
  return this.state;
2433
2428
  }
2434
2429
  }
2435
- function Ar(t) {
2436
- const n = (s) => {
2437
- const d = t.scene.getObjectByProperty("uuid", s.value);
2430
+ function qa(t) {
2431
+ function n() {
2432
+ return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2433
+ }
2434
+ const a = (s) => {
2435
+ var p;
2436
+ if (!n())
2437
+ return;
2438
+ const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", s.value);
2438
2439
  d !== void 0 && t.three.setObject(d);
2439
- }, a = (s, d, m) => {
2440
- const v = t.scene.getObjectByProperty("uuid", s);
2441
- v !== void 0 && K(v, d, m);
2442
- }, e = (s) => {
2443
- const d = s.value, { key: m, value: v, uuid: f } = d;
2444
- a(f, m, v);
2440
+ }, e = (s, d, p) => {
2441
+ var b;
2442
+ if (!n())
2443
+ return;
2444
+ const h = (b = t.three.scene) == null ? void 0 : b.getObjectByProperty("uuid", s);
2445
+ h !== void 0 && q(h, d, p);
2445
2446
  }, o = (s) => {
2447
+ if (!n())
2448
+ return;
2449
+ const d = s.value, { key: p, value: h, uuid: b } = d;
2450
+ e(b, p, h);
2451
+ }, u = (s) => {
2452
+ if (!n())
2453
+ return;
2446
2454
  const d = s.value;
2447
- Tt(d.value).then((m) => {
2448
- a(d.uuid, d.key, m), a(d.uuid, "material.needsUpdate", !0);
2455
+ Mt(d.value).then((p) => {
2456
+ e(d.uuid, d.key, p), e(d.uuid, "material.needsUpdate", !0);
2449
2457
  });
2450
- }, u = () => {
2451
- t.three.setScene(t.scene);
2452
2458
  }, c = (s) => {
2453
- const { key: d, uuid: m, value: v } = s.value, f = t.scene.getObjectByProperty("uuid", m);
2454
- if (f !== void 0)
2459
+ var x;
2460
+ if (!n())
2461
+ return;
2462
+ const { key: d, uuid: p, value: h } = s.value, b = (x = t.three.scene) == null ? void 0 : x.getObjectByProperty("uuid", p);
2463
+ if (b !== void 0)
2455
2464
  try {
2456
- f[d](v);
2457
- } catch (h) {
2458
- console.log("Error requesting method:"), console.log(h), console.log(d), console.log(v);
2465
+ b[d](h);
2466
+ } catch (S) {
2467
+ console.log("Error requesting method:"), console.log(S), console.log(d), console.log(h);
2459
2468
  }
2460
2469
  };
2461
- return tt(() => (k.addEventListener(D.GET_OBJECT, n), k.addEventListener(D.GET_SCENE, u), k.addEventListener(D.UPDATE_OBJECT, e), k.addEventListener(D.CREATE_TEXTURE, o), k.addEventListener(D.REQUEST_METHOD, c), () => {
2462
- k.removeEventListener(D.GET_OBJECT, n), k.removeEventListener(D.GET_SCENE, u), k.removeEventListener(D.UPDATE_OBJECT, e), k.removeEventListener(D.CREATE_TEXTURE, o), k.removeEventListener(D.REQUEST_METHOD, c);
2470
+ return Be(() => (I.addEventListener(N.GET_OBJECT, a), I.addEventListener(N.UPDATE_OBJECT, o), I.addEventListener(N.CREATE_TEXTURE, u), I.addEventListener(N.REQUEST_METHOD, c), () => {
2471
+ I.removeEventListener(N.GET_OBJECT, a), I.removeEventListener(N.UPDATE_OBJECT, o), I.removeEventListener(N.CREATE_TEXTURE, u), I.removeEventListener(N.REQUEST_METHOD, c);
2463
2472
  }), []), null;
2464
2473
  }
2465
- const Yt = { type: "change" }, wt = { type: "start" }, zt = { type: "end" }, pt = new xn(), Wt = new wn(), hr = Math.cos(70 * Cn.DEG2RAD);
2466
- class pr extends Kt {
2474
+ const Wt = { type: "change" }, Ot = { type: "start" }, Ht = { type: "end" }, pt = new Mn(), Kt = new Pn(), Ta = Math.cos(70 * jn.DEG2RAD);
2475
+ class Ra extends Zt {
2467
2476
  constructor(n, a) {
2468
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new I(), this.cursor = new I(), 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: Le.ROTATE, MIDDLE: Le.DOLLY, RIGHT: Le.PAN }, this.touches = { ONE: Fe.ROTATE, TWO: Fe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2477
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new L(), this.cursor = new L(), 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: Ne.ROTATE, MIDDLE: Ne.DOLLY, RIGHT: Ne.PAN }, this.touches = { ONE: Le.ROTATE, TWO: Le.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2469
2478
  return s.phi;
2470
2479
  }, this.getAzimuthalAngle = function() {
2471
2480
  return s.theta;
@@ -2478,36 +2487,36 @@ class pr extends Kt {
2478
2487
  }, this.saveState = function() {
2479
2488
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2480
2489
  }, this.reset = function() {
2481
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Yt), e.update(), u = o.NONE;
2490
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Wt), e.update(), u = o.NONE;
2482
2491
  }, this.update = function() {
2483
- const i = new I(), y = new At().setFromUnitVectors(n.up, new I(0, 1, 0)), R = y.clone().invert(), P = new I(), V = new At(), ce = new I(), q = 2 * Math.PI;
2492
+ const i = new L(), E = new Ft().setFromUnitVectors(n.up, new L(0, 1, 0)), P = E.clone().invert(), _ = new L(), W = new Ft(), de = new L(), J = 2 * Math.PI;
2484
2493
  return function(ht = null) {
2485
- const le = e.object.position;
2486
- i.copy(le).sub(e.target), i.applyQuaternion(y), s.setFromVector3(i), e.autoRotate && u === o.NONE && ve(ge(ht)), e.enableDamping ? (s.theta += d.theta * e.dampingFactor, s.phi += d.phi * e.dampingFactor) : (s.theta += d.theta, s.phi += d.phi);
2487
- let J = e.minAzimuthAngle, Q = e.maxAzimuthAngle;
2488
- isFinite(J) && isFinite(Q) && (J < -Math.PI ? J += q : J > Math.PI && (J -= q), Q < -Math.PI ? Q += q : Q > Math.PI && (Q -= q), J <= Q ? s.theta = Math.max(J, Math.min(Q, s.theta)) : s.theta = s.theta > (J + Q) / 2 ? Math.max(J, s.theta) : Math.min(Q, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.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 && O || e.object.isOrthographicCamera ? s.radius = _e(s.radius) : s.radius = _e(s.radius * m), i.setFromSpherical(s), i.applyQuaternion(R), le.copy(e.target).add(i), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
2489
- let Ie = !1;
2490
- if (e.zoomToCursor && O) {
2491
- let Ce = null;
2494
+ const he = e.object.position;
2495
+ i.copy(he).sub(e.target), i.applyQuaternion(E), s.setFromVector3(i), e.autoRotate && u === o.NONE && z(j(ht)), e.enableDamping ? (s.theta += d.theta * e.dampingFactor, s.phi += d.phi * e.dampingFactor) : (s.theta += d.theta, s.phi += d.phi);
2496
+ let Q = e.minAzimuthAngle, ee = e.maxAzimuthAngle;
2497
+ isFinite(Q) && isFinite(ee) && (Q < -Math.PI ? Q += J : Q > Math.PI && (Q -= J), ee < -Math.PI ? ee += J : ee > Math.PI && (ee -= J), Q <= ee ? s.theta = Math.max(Q, Math.min(ee, s.theta)) : s.theta = s.theta > (Q + ee) / 2 ? Math.max(Q, s.theta) : Math.min(ee, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(h, e.dampingFactor) : e.target.add(h), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && se || e.object.isOrthographicCamera ? s.radius = je(s.radius) : s.radius = je(s.radius * p), i.setFromSpherical(s), i.applyQuaternion(P), he.copy(e.target).add(i), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, h.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), h.set(0, 0, 0));
2498
+ let De = !1;
2499
+ if (e.zoomToCursor && se) {
2500
+ let Se = null;
2492
2501
  if (e.object.isPerspectiveCamera) {
2493
- const pe = i.length();
2494
- Ce = _e(pe * m);
2495
- const Ae = pe - Ce;
2496
- e.object.position.addScaledVector(Z, Ae), e.object.updateMatrixWorld();
2502
+ const be = i.length();
2503
+ Se = je(be * p);
2504
+ const Ae = be - Se;
2505
+ e.object.position.addScaledVector(V, Ae), e.object.updateMatrixWorld();
2497
2506
  } else if (e.object.isOrthographicCamera) {
2498
- const pe = new I(z.x, z.y, 0);
2499
- pe.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / m)), e.object.updateProjectionMatrix(), Ie = !0;
2500
- const Ae = new I(z.x, z.y, 0);
2501
- Ae.unproject(e.object), e.object.position.sub(Ae).add(pe), e.object.updateMatrixWorld(), Ce = i.length();
2507
+ const be = new L(Z.x, Z.y, 0);
2508
+ be.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), De = !0;
2509
+ const Ae = new L(Z.x, Z.y, 0);
2510
+ Ae.unproject(e.object), e.object.position.sub(Ae).add(be), e.object.updateMatrixWorld(), Se = i.length();
2502
2511
  } else
2503
2512
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2504
- Ce !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Ce).add(e.object.position) : (pt.origin.copy(e.object.position), pt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(pt.direction)) < hr ? n.lookAt(e.target) : (Wt.setFromNormalAndCoplanarPoint(e.object.up, e.target), pt.intersectPlane(Wt, e.target))));
2513
+ Se !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Se).add(e.object.position) : (pt.origin.copy(e.object.position), pt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(pt.direction)) < Ta ? n.lookAt(e.target) : (Kt.setFromNormalAndCoplanarPoint(e.object.up, e.target), pt.intersectPlane(Kt, e.target))));
2505
2514
  } else
2506
- e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / m)), e.object.updateProjectionMatrix(), Ie = !0);
2507
- return m = 1, O = !1, Ie || P.distanceToSquared(e.object.position) > c || 8 * (1 - V.dot(e.object.quaternion)) > c || ce.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Yt), P.copy(e.object.position), V.copy(e.object.quaternion), ce.copy(e.target), !0) : !1;
2515
+ e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), De = !0);
2516
+ return p = 1, se = !1, De || _.distanceToSquared(e.object.position) > c || 8 * (1 - W.dot(e.object.quaternion)) > c || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Wt), _.copy(e.object.position), W.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
2508
2517
  };
2509
2518
  }(), this.dispose = function() {
2510
- e.domElement.removeEventListener("contextmenu", he), e.domElement.removeEventListener("pointerdown", He), e.domElement.removeEventListener("pointercancel", we), e.domElement.removeEventListener("wheel", ct), e.domElement.removeEventListener("pointermove", fe), e.domElement.removeEventListener("pointerup", we), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Xe), e._domElementKeyEvents = null);
2519
+ e.domElement.removeEventListener("contextmenu", ve), e.domElement.removeEventListener("pointerdown", He), e.domElement.removeEventListener("pointercancel", Ce), e.domElement.removeEventListener("wheel", ct), e.domElement.removeEventListener("pointermove", ge), e.domElement.removeEventListener("pointerup", Ce), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Xe), e._domElementKeyEvents = null);
2511
2520
  };
2512
2521
  const e = this, o = {
2513
2522
  NONE: -1,
@@ -2520,193 +2529,193 @@ class pr extends Kt {
2520
2529
  TOUCH_DOLLY_ROTATE: 6
2521
2530
  };
2522
2531
  let u = o.NONE;
2523
- const c = 1e-6, s = new Nt(), d = new Nt();
2524
- let m = 1;
2525
- const v = new I(), f = new ae(), h = new ae(), g = new ae(), E = new ae(), w = new ae(), A = new ae(), U = new ae(), j = new ae(), X = new ae(), Z = new I(), z = new ae();
2526
- let O = !1;
2527
- const S = [], G = {};
2528
- function ge(i) {
2532
+ const c = 1e-6, s = new Ut(), d = new Ut();
2533
+ let p = 1;
2534
+ const h = new L(), b = new oe(), x = new oe(), S = new oe(), O = new oe(), m = new oe(), v = new oe(), y = new oe(), w = new oe(), F = new oe(), V = new L(), Z = new oe();
2535
+ let se = !1;
2536
+ const Y = [], fe = {};
2537
+ function j(i) {
2529
2538
  return i !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * i : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2530
2539
  }
2531
- function Re(i) {
2532
- const y = Math.abs(i) / (100 * (window.devicePixelRatio | 0));
2533
- return Math.pow(0.95, e.zoomSpeed * y);
2540
+ function D(i) {
2541
+ const E = Math.abs(i) / (100 * (window.devicePixelRatio | 0));
2542
+ return Math.pow(0.95, e.zoomSpeed * E);
2534
2543
  }
2535
- function ve(i) {
2544
+ function z(i) {
2536
2545
  d.theta -= i;
2537
2546
  }
2538
- function be(i) {
2547
+ function ce(i) {
2539
2548
  d.phi -= i;
2540
2549
  }
2541
- const te = function() {
2542
- const i = new I();
2543
- return function(R, P) {
2544
- i.setFromMatrixColumn(P, 0), i.multiplyScalar(-R), v.add(i);
2550
+ const ae = function() {
2551
+ const i = new L();
2552
+ return function(P, _) {
2553
+ i.setFromMatrixColumn(_, 0), i.multiplyScalar(-P), h.add(i);
2545
2554
  };
2546
- }(), oe = function() {
2547
- const i = new I();
2548
- return function(R, P) {
2549
- e.screenSpacePanning === !0 ? i.setFromMatrixColumn(P, 1) : (i.setFromMatrixColumn(P, 0), i.crossVectors(e.object.up, i)), i.multiplyScalar(R), v.add(i);
2555
+ }(), le = function() {
2556
+ const i = new L();
2557
+ return function(P, _) {
2558
+ e.screenSpacePanning === !0 ? i.setFromMatrixColumn(_, 1) : (i.setFromMatrixColumn(_, 0), i.crossVectors(e.object.up, i)), i.multiplyScalar(P), h.add(i);
2550
2559
  };
2551
- }(), ne = function() {
2552
- const i = new I();
2553
- return function(R, P) {
2554
- const V = e.domElement;
2560
+ }(), re = function() {
2561
+ const i = new L();
2562
+ return function(P, _) {
2563
+ const W = e.domElement;
2555
2564
  if (e.object.isPerspectiveCamera) {
2556
- const ce = e.object.position;
2557
- i.copy(ce).sub(e.target);
2558
- let q = i.length();
2559
- q *= Math.tan(e.object.fov / 2 * Math.PI / 180), te(2 * R * q / V.clientHeight, e.object.matrix), oe(2 * P * q / V.clientHeight, e.object.matrix);
2565
+ const de = e.object.position;
2566
+ i.copy(de).sub(e.target);
2567
+ let J = i.length();
2568
+ J *= Math.tan(e.object.fov / 2 * Math.PI / 180), ae(2 * P * J / W.clientHeight, e.object.matrix), le(2 * _ * J / W.clientHeight, e.object.matrix);
2560
2569
  } else
2561
- e.object.isOrthographicCamera ? (te(R * (e.object.right - e.object.left) / e.object.zoom / V.clientWidth, e.object.matrix), oe(P * (e.object.top - e.object.bottom) / e.object.zoom / V.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2570
+ e.object.isOrthographicCamera ? (ae(P * (e.object.right - e.object.left) / e.object.zoom / W.clientWidth, e.object.matrix), le(_ * (e.object.top - e.object.bottom) / e.object.zoom / W.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2562
2571
  };
2563
2572
  }();
2564
- function Pe(i) {
2565
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? m /= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2573
+ function Me(i) {
2574
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2566
2575
  }
2567
2576
  function Ge(i) {
2568
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? m *= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2577
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2569
2578
  }
2570
- function je(i, y) {
2579
+ function Pe(i, E) {
2571
2580
  if (!e.zoomToCursor)
2572
2581
  return;
2573
- O = !0;
2574
- const R = e.domElement.getBoundingClientRect(), P = i - R.left, V = y - R.top, ce = R.width, q = R.height;
2575
- z.x = P / ce * 2 - 1, z.y = -(V / q) * 2 + 1, Z.set(z.x, z.y, 1).unproject(e.object).sub(e.object.position).normalize();
2582
+ se = !0;
2583
+ const P = e.domElement.getBoundingClientRect(), _ = i - P.left, W = E - P.top, de = P.width, J = P.height;
2584
+ Z.x = _ / de * 2 - 1, Z.y = -(W / J) * 2 + 1, V.set(Z.x, Z.y, 1).unproject(e.object).sub(e.object.position).normalize();
2576
2585
  }
2577
- function _e(i) {
2586
+ function je(i) {
2578
2587
  return Math.max(e.minDistance, Math.min(e.maxDistance, i));
2579
2588
  }
2580
2589
  function Ve(i) {
2581
- f.set(i.clientX, i.clientY);
2590
+ b.set(i.clientX, i.clientY);
2582
2591
  }
2583
2592
  function nt(i) {
2584
- je(i.clientX, i.clientX), U.set(i.clientX, i.clientY);
2593
+ Pe(i.clientX, i.clientX), y.set(i.clientX, i.clientY);
2585
2594
  }
2586
2595
  function Ye(i) {
2587
- E.set(i.clientX, i.clientY);
2588
- }
2589
- function rt(i) {
2590
- h.set(i.clientX, i.clientY), g.subVectors(h, f).multiplyScalar(e.rotateSpeed);
2591
- const y = e.domElement;
2592
- ve(2 * Math.PI * g.x / y.clientHeight), be(2 * Math.PI * g.y / y.clientHeight), f.copy(h), e.update();
2596
+ O.set(i.clientX, i.clientY);
2593
2597
  }
2594
- function vt(i) {
2595
- j.set(i.clientX, i.clientY), X.subVectors(j, U), X.y > 0 ? Pe(Re(X.y)) : X.y < 0 && Ge(Re(X.y)), U.copy(j), e.update();
2598
+ function at(i) {
2599
+ x.set(i.clientX, i.clientY), S.subVectors(x, b).multiplyScalar(e.rotateSpeed);
2600
+ const E = e.domElement;
2601
+ z(2 * Math.PI * S.x / E.clientHeight), ce(2 * Math.PI * S.y / E.clientHeight), b.copy(x), e.update();
2596
2602
  }
2597
2603
  function bt(i) {
2598
- w.set(i.clientX, i.clientY), A.subVectors(w, E).multiplyScalar(e.panSpeed), ne(A.x, A.y), E.copy(w), e.update();
2604
+ w.set(i.clientX, i.clientY), F.subVectors(w, y), F.y > 0 ? Me(D(F.y)) : F.y < 0 && Ge(D(F.y)), y.copy(w), e.update();
2605
+ }
2606
+ function yt(i) {
2607
+ m.set(i.clientX, i.clientY), v.subVectors(m, O).multiplyScalar(e.panSpeed), re(v.x, v.y), O.copy(m), e.update();
2599
2608
  }
2600
2609
  function ze(i) {
2601
- je(i.clientX, i.clientY), i.deltaY < 0 ? Ge(Re(i.deltaY)) : i.deltaY > 0 && Pe(Re(i.deltaY)), e.update();
2610
+ Pe(i.clientX, i.clientY), i.deltaY < 0 ? Ge(D(i.deltaY)) : i.deltaY > 0 && Me(D(i.deltaY)), e.update();
2602
2611
  }
2603
2612
  function We(i) {
2604
- let y = !1;
2613
+ let E = !1;
2605
2614
  switch (i.code) {
2606
2615
  case e.keys.UP:
2607
- i.ctrlKey || i.metaKey || i.shiftKey ? be(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ne(0, e.keyPanSpeed), y = !0;
2616
+ i.ctrlKey || i.metaKey || i.shiftKey ? ce(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(0, e.keyPanSpeed), E = !0;
2608
2617
  break;
2609
2618
  case e.keys.BOTTOM:
2610
- i.ctrlKey || i.metaKey || i.shiftKey ? be(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ne(0, -e.keyPanSpeed), y = !0;
2619
+ i.ctrlKey || i.metaKey || i.shiftKey ? ce(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(0, -e.keyPanSpeed), E = !0;
2611
2620
  break;
2612
2621
  case e.keys.LEFT:
2613
- i.ctrlKey || i.metaKey || i.shiftKey ? ve(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ne(e.keyPanSpeed, 0), y = !0;
2622
+ i.ctrlKey || i.metaKey || i.shiftKey ? z(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(e.keyPanSpeed, 0), E = !0;
2614
2623
  break;
2615
2624
  case e.keys.RIGHT:
2616
- i.ctrlKey || i.metaKey || i.shiftKey ? ve(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ne(-e.keyPanSpeed, 0), y = !0;
2625
+ i.ctrlKey || i.metaKey || i.shiftKey ? z(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(-e.keyPanSpeed, 0), E = !0;
2617
2626
  break;
2618
2627
  }
2619
- y && (i.preventDefault(), e.update());
2628
+ E && (i.preventDefault(), e.update());
2620
2629
  }
2621
- function ye(i) {
2622
- if (S.length === 1)
2623
- f.set(i.pageX, i.pageY);
2630
+ function Ee(i) {
2631
+ if (Y.length === 1)
2632
+ b.set(i.pageX, i.pageY);
2624
2633
  else {
2625
- const y = se(i), R = 0.5 * (i.pageX + y.x), P = 0.5 * (i.pageY + y.y);
2626
- f.set(R, P);
2634
+ const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
2635
+ b.set(P, _);
2627
2636
  }
2628
2637
  }
2629
- function ke(i) {
2630
- if (S.length === 1)
2631
- E.set(i.pageX, i.pageY);
2638
+ function _e(i) {
2639
+ if (Y.length === 1)
2640
+ O.set(i.pageX, i.pageY);
2632
2641
  else {
2633
- const y = se(i), R = 0.5 * (i.pageX + y.x), P = 0.5 * (i.pageY + y.y);
2634
- E.set(R, P);
2642
+ const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
2643
+ O.set(P, _);
2635
2644
  }
2636
2645
  }
2637
- function Ee(i) {
2638
- const y = se(i), R = i.pageX - y.x, P = i.pageY - y.y, V = Math.sqrt(R * R + P * P);
2639
- U.set(0, V);
2646
+ function xe(i) {
2647
+ const E = ue(i), P = i.pageX - E.x, _ = i.pageY - E.y, W = Math.sqrt(P * P + _ * _);
2648
+ y.set(0, W);
2640
2649
  }
2641
- function yt(i) {
2642
- e.enableZoom && Ee(i), e.enablePan && ke(i);
2650
+ function Et(i) {
2651
+ e.enableZoom && xe(i), e.enablePan && _e(i);
2643
2652
  }
2644
- function at(i) {
2645
- e.enableZoom && Ee(i), e.enableRotate && ye(i);
2653
+ function rt(i) {
2654
+ e.enableZoom && xe(i), e.enableRotate && Ee(i);
2646
2655
  }
2647
2656
  function it(i) {
2648
- if (S.length == 1)
2649
- h.set(i.pageX, i.pageY);
2657
+ if (Y.length == 1)
2658
+ x.set(i.pageX, i.pageY);
2650
2659
  else {
2651
- const R = se(i), P = 0.5 * (i.pageX + R.x), V = 0.5 * (i.pageY + R.y);
2652
- h.set(P, V);
2660
+ const P = ue(i), _ = 0.5 * (i.pageX + P.x), W = 0.5 * (i.pageY + P.y);
2661
+ x.set(_, W);
2653
2662
  }
2654
- g.subVectors(h, f).multiplyScalar(e.rotateSpeed);
2655
- const y = e.domElement;
2656
- ve(2 * Math.PI * g.x / y.clientHeight), be(2 * Math.PI * g.y / y.clientHeight), f.copy(h);
2663
+ S.subVectors(x, b).multiplyScalar(e.rotateSpeed);
2664
+ const E = e.domElement;
2665
+ z(2 * Math.PI * S.x / E.clientHeight), ce(2 * Math.PI * S.y / E.clientHeight), b.copy(x);
2657
2666
  }
2658
2667
  function ot(i) {
2659
- if (S.length === 1)
2660
- w.set(i.pageX, i.pageY);
2668
+ if (Y.length === 1)
2669
+ m.set(i.pageX, i.pageY);
2661
2670
  else {
2662
- const y = se(i), R = 0.5 * (i.pageX + y.x), P = 0.5 * (i.pageY + y.y);
2663
- w.set(R, P);
2671
+ const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
2672
+ m.set(P, _);
2664
2673
  }
2665
- A.subVectors(w, E).multiplyScalar(e.panSpeed), ne(A.x, A.y), E.copy(w);
2674
+ v.subVectors(m, O).multiplyScalar(e.panSpeed), re(v.x, v.y), O.copy(m);
2666
2675
  }
2667
- function xe(i) {
2668
- const y = se(i), R = i.pageX - y.x, P = i.pageY - y.y, V = Math.sqrt(R * R + P * P);
2669
- j.set(0, V), X.set(0, Math.pow(j.y / U.y, e.zoomSpeed)), Pe(X.y), U.copy(j);
2670
- const ce = (i.pageX + y.x) * 0.5, q = (i.pageY + y.y) * 0.5;
2671
- je(ce, q);
2676
+ function we(i) {
2677
+ const E = ue(i), P = i.pageX - E.x, _ = i.pageY - E.y, W = Math.sqrt(P * P + _ * _);
2678
+ w.set(0, W), F.set(0, Math.pow(w.y / y.y, e.zoomSpeed)), Me(F.y), y.copy(w);
2679
+ const de = (i.pageX + E.x) * 0.5, J = (i.pageY + E.y) * 0.5;
2680
+ Pe(de, J);
2672
2681
  }
2673
- function De(i) {
2674
- e.enableZoom && xe(i), e.enablePan && ot(i);
2682
+ function ke(i) {
2683
+ e.enableZoom && we(i), e.enablePan && ot(i);
2675
2684
  }
2676
2685
  function st(i) {
2677
- e.enableZoom && xe(i), e.enableRotate && it(i);
2686
+ e.enableZoom && we(i), e.enableRotate && it(i);
2678
2687
  }
2679
2688
  function He(i) {
2680
- e.enabled !== !1 && (S.length === 0 && (e.domElement.setPointerCapture(i.pointerId), e.domElement.addEventListener("pointermove", fe), e.domElement.addEventListener("pointerup", we)), xt(i), i.pointerType === "touch" ? lt(i) : Et(i));
2689
+ e.enabled !== !1 && (Y.length === 0 && (e.domElement.setPointerCapture(i.pointerId), e.domElement.addEventListener("pointermove", ge), e.domElement.addEventListener("pointerup", Ce)), wt(i), i.pointerType === "touch" ? lt(i) : xt(i));
2681
2690
  }
2682
- function fe(i) {
2691
+ function ge(i) {
2683
2692
  e.enabled !== !1 && (i.pointerType === "touch" ? ut(i) : Ke(i));
2684
2693
  }
2685
- function we(i) {
2686
- dt(i), S.length === 0 && (e.domElement.releasePointerCapture(i.pointerId), e.domElement.removeEventListener("pointermove", fe), e.domElement.removeEventListener("pointerup", we)), e.dispatchEvent(zt), u = o.NONE;
2694
+ function Ce(i) {
2695
+ dt(i), Y.length === 0 && (e.domElement.releasePointerCapture(i.pointerId), e.domElement.removeEventListener("pointermove", ge), e.domElement.removeEventListener("pointerup", Ce)), e.dispatchEvent(Ht), u = o.NONE;
2687
2696
  }
2688
- function Et(i) {
2689
- let y;
2697
+ function xt(i) {
2698
+ let E;
2690
2699
  switch (i.button) {
2691
2700
  case 0:
2692
- y = e.mouseButtons.LEFT;
2701
+ E = e.mouseButtons.LEFT;
2693
2702
  break;
2694
2703
  case 1:
2695
- y = e.mouseButtons.MIDDLE;
2704
+ E = e.mouseButtons.MIDDLE;
2696
2705
  break;
2697
2706
  case 2:
2698
- y = e.mouseButtons.RIGHT;
2707
+ E = e.mouseButtons.RIGHT;
2699
2708
  break;
2700
2709
  default:
2701
- y = -1;
2710
+ E = -1;
2702
2711
  }
2703
- switch (y) {
2704
- case Le.DOLLY:
2712
+ switch (E) {
2713
+ case Ne.DOLLY:
2705
2714
  if (e.enableZoom === !1)
2706
2715
  return;
2707
2716
  nt(i), u = o.DOLLY;
2708
2717
  break;
2709
- case Le.ROTATE:
2718
+ case Ne.ROTATE:
2710
2719
  if (i.ctrlKey || i.metaKey || i.shiftKey) {
2711
2720
  if (e.enablePan === !1)
2712
2721
  return;
@@ -2717,7 +2726,7 @@ class pr extends Kt {
2717
2726
  Ve(i), u = o.ROTATE;
2718
2727
  }
2719
2728
  break;
2720
- case Le.PAN:
2729
+ case Ne.PAN:
2721
2730
  if (i.ctrlKey || i.metaKey || i.shiftKey) {
2722
2731
  if (e.enableRotate === !1)
2723
2732
  return;
@@ -2731,46 +2740,46 @@ class pr extends Kt {
2731
2740
  default:
2732
2741
  u = o.NONE;
2733
2742
  }
2734
- u !== o.NONE && e.dispatchEvent(wt);
2743
+ u !== o.NONE && e.dispatchEvent(Ot);
2735
2744
  }
2736
2745
  function Ke(i) {
2737
2746
  switch (u) {
2738
2747
  case o.ROTATE:
2739
2748
  if (e.enableRotate === !1)
2740
2749
  return;
2741
- rt(i);
2750
+ at(i);
2742
2751
  break;
2743
2752
  case o.DOLLY:
2744
2753
  if (e.enableZoom === !1)
2745
2754
  return;
2746
- vt(i);
2755
+ bt(i);
2747
2756
  break;
2748
2757
  case o.PAN:
2749
2758
  if (e.enablePan === !1)
2750
2759
  return;
2751
- bt(i);
2760
+ yt(i);
2752
2761
  break;
2753
2762
  }
2754
2763
  }
2755
2764
  function ct(i) {
2756
- e.enabled === !1 || e.enableZoom === !1 || u !== o.NONE || (i.preventDefault(), e.dispatchEvent(wt), ze(i), e.dispatchEvent(zt));
2765
+ e.enabled === !1 || e.enableZoom === !1 || u !== o.NONE || (i.preventDefault(), e.dispatchEvent(Ot), ze(i), e.dispatchEvent(Ht));
2757
2766
  }
2758
2767
  function Xe(i) {
2759
2768
  e.enabled === !1 || e.enablePan === !1 || We(i);
2760
2769
  }
2761
2770
  function lt(i) {
2762
- switch (qe(i), S.length) {
2771
+ switch (qe(i), Y.length) {
2763
2772
  case 1:
2764
2773
  switch (e.touches.ONE) {
2765
- case Fe.ROTATE:
2774
+ case Le.ROTATE:
2766
2775
  if (e.enableRotate === !1)
2767
2776
  return;
2768
- ye(i), u = o.TOUCH_ROTATE;
2777
+ Ee(i), u = o.TOUCH_ROTATE;
2769
2778
  break;
2770
- case Fe.PAN:
2779
+ case Le.PAN:
2771
2780
  if (e.enablePan === !1)
2772
2781
  return;
2773
- ke(i), u = o.TOUCH_PAN;
2782
+ _e(i), u = o.TOUCH_PAN;
2774
2783
  break;
2775
2784
  default:
2776
2785
  u = o.NONE;
@@ -2778,15 +2787,15 @@ class pr extends Kt {
2778
2787
  break;
2779
2788
  case 2:
2780
2789
  switch (e.touches.TWO) {
2781
- case Fe.DOLLY_PAN:
2790
+ case Le.DOLLY_PAN:
2782
2791
  if (e.enableZoom === !1 && e.enablePan === !1)
2783
2792
  return;
2784
- yt(i), u = o.TOUCH_DOLLY_PAN;
2793
+ Et(i), u = o.TOUCH_DOLLY_PAN;
2785
2794
  break;
2786
- case Fe.DOLLY_ROTATE:
2795
+ case Le.DOLLY_ROTATE:
2787
2796
  if (e.enableZoom === !1 && e.enableRotate === !1)
2788
2797
  return;
2789
- at(i), u = o.TOUCH_DOLLY_ROTATE;
2798
+ rt(i), u = o.TOUCH_DOLLY_ROTATE;
2790
2799
  break;
2791
2800
  default:
2792
2801
  u = o.NONE;
@@ -2795,7 +2804,7 @@ class pr extends Kt {
2795
2804
  default:
2796
2805
  u = o.NONE;
2797
2806
  }
2798
- u !== o.NONE && e.dispatchEvent(wt);
2807
+ u !== o.NONE && e.dispatchEvent(Ot);
2799
2808
  }
2800
2809
  function ut(i) {
2801
2810
  switch (qe(i), u) {
@@ -2812,7 +2821,7 @@ class pr extends Kt {
2812
2821
  case o.TOUCH_DOLLY_PAN:
2813
2822
  if (e.enableZoom === !1 && e.enablePan === !1)
2814
2823
  return;
2815
- De(i), e.update();
2824
+ ke(i), e.update();
2816
2825
  break;
2817
2826
  case o.TOUCH_DOLLY_ROTATE:
2818
2827
  if (e.enableZoom === !1 && e.enableRotate === !1)
@@ -2823,33 +2832,33 @@ class pr extends Kt {
2823
2832
  u = o.NONE;
2824
2833
  }
2825
2834
  }
2826
- function he(i) {
2835
+ function ve(i) {
2827
2836
  e.enabled !== !1 && i.preventDefault();
2828
2837
  }
2829
- function xt(i) {
2830
- S.push(i.pointerId);
2838
+ function wt(i) {
2839
+ Y.push(i.pointerId);
2831
2840
  }
2832
2841
  function dt(i) {
2833
- delete G[i.pointerId];
2834
- for (let y = 0; y < S.length; y++)
2835
- if (S[y] == i.pointerId) {
2836
- S.splice(y, 1);
2842
+ delete fe[i.pointerId];
2843
+ for (let E = 0; E < Y.length; E++)
2844
+ if (Y[E] == i.pointerId) {
2845
+ Y.splice(E, 1);
2837
2846
  return;
2838
2847
  }
2839
2848
  }
2840
2849
  function qe(i) {
2841
- let y = G[i.pointerId];
2842
- y === void 0 && (y = new ae(), G[i.pointerId] = y), y.set(i.pageX, i.pageY);
2850
+ let E = fe[i.pointerId];
2851
+ E === void 0 && (E = new oe(), fe[i.pointerId] = E), E.set(i.pageX, i.pageY);
2843
2852
  }
2844
- function se(i) {
2845
- const y = i.pointerId === S[0] ? S[1] : S[0];
2846
- return G[y];
2853
+ function ue(i) {
2854
+ const E = i.pointerId === Y[0] ? Y[1] : Y[0];
2855
+ return fe[E];
2847
2856
  }
2848
- e.domElement.addEventListener("contextmenu", he), e.domElement.addEventListener("pointerdown", He), e.domElement.addEventListener("pointercancel", we), e.domElement.addEventListener("wheel", ct, { passive: !1 }), this.update();
2857
+ e.domElement.addEventListener("contextmenu", ve), e.domElement.addEventListener("pointerdown", He), e.domElement.addEventListener("pointercancel", Ce), e.domElement.addEventListener("wheel", ct, { passive: !1 }), this.update();
2849
2858
  }
2850
2859
  }
2851
- const Rt = (t) => {
2852
- const [n, a] = ie(!1), [e, o] = ie(t.options[t.index]), u = () => {
2860
+ const _t = (t) => {
2861
+ const [n, a] = ne(!1), [e, o] = ne(t.options[t.index]), u = () => {
2853
2862
  a(!n);
2854
2863
  }, c = (s) => {
2855
2864
  s !== e && (t.onSelect(s), o(s)), a(!1);
@@ -2858,242 +2867,257 @@ const Rt = (t) => {
2858
2867
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: u, children: e }),
2859
2868
  n && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ l.jsx("li", { onClick: () => c(s), children: s }, s)) })
2860
2869
  ] });
2861
- }, Te = Dn(function(n, a) {
2870
+ }, Te = $n(function(n, a) {
2862
2871
  const e = n.options.indexOf(n.camera.name);
2863
2872
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
2864
2873
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable" }),
2865
- /* @__PURE__ */ l.jsx(Rt, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
2874
+ /* @__PURE__ */ l.jsx(_t, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
2866
2875
  ] });
2867
- }), Ht = [
2876
+ }), Xt = [
2868
2877
  "Single",
2869
2878
  "Side by Side",
2870
2879
  "Stacked",
2871
2880
  "Quad"
2872
- ], H = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map(), de = /* @__PURE__ */ new Map(), me = [
2873
- "Top",
2874
- "Bottom",
2875
- "Left",
2876
- "Right",
2877
- "Front",
2878
- "Back",
2879
- "Orthographic",
2880
- "Debug"
2881
- ];
2882
- function Me(t, n) {
2883
- const a = new Zt(-100, 100, 100, -100, 50, 3e3);
2884
- return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), H.set(t, a), a;
2881
+ ], X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map();
2882
+ function Re(t, n) {
2883
+ const a = new en(-100, 100, 100, -100, 50, 3e3);
2884
+ return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), X.set(t, a), a;
2885
2885
  }
2886
- Me("Top", new I(0, 1e3, 0));
2887
- Me("Bottom", new I(0, -1e3, 0));
2888
- Me("Left", new I(-1e3, 0, 0));
2889
- Me("Right", new I(1e3, 0, 0));
2890
- Me("Front", new I(0, 0, 1e3));
2891
- Me("Back", new I(0, 0, -1e3));
2892
- Me("Orthographic", new I(1e3, 1e3, 1e3));
2893
- const gt = new St(60, 1, 50, 3e3);
2894
- gt.name = "Debug";
2895
- gt.position.set(500, 500, 500);
2896
- gt.lookAt(0, 0, 0);
2897
- H.set("Debug", gt);
2898
- const mr = [
2899
- "Default",
2886
+ Re("Top", new L(0, 1e3, 0));
2887
+ Re("Bottom", new L(0, -1e3, 0));
2888
+ Re("Left", new L(-1e3, 0, 0));
2889
+ Re("Right", new L(1e3, 0, 0));
2890
+ Re("Front", new L(0, 0, 1e3));
2891
+ Re("Back", new L(0, 0, -1e3));
2892
+ Re("Orthographic", new L(1e3, 1e3, 1e3));
2893
+ const vt = new Tt(60, 1, 50, 3e3);
2894
+ vt.name = "Debug";
2895
+ vt.position.set(500, 500, 500);
2896
+ vt.lookAt(0, 0, 0);
2897
+ X.set("Debug", vt);
2898
+ const qt = [
2899
+ "Renderer",
2900
+ "Depth",
2900
2901
  "Normals",
2901
- "Wireframe",
2902
- "UVs"
2903
- ], gr = new Sn(), vr = new Tn({
2902
+ "UVs",
2903
+ "Wireframe"
2904
+ ], Ma = new _n(), Pa = new kn(), ja = new da(), _a = new Dn({
2904
2905
  opacity: 0.33,
2905
2906
  transparent: !0,
2906
2907
  wireframe: !0
2907
- }), br = new tr();
2908
- let Ct = "Default";
2909
- const F = new On();
2910
- let $ = H.get("Debug"), ee = H.get("Orthographic"), Ue = H.get("Front"), Be = H.get("Top");
2911
- function Nr(t) {
2912
- const [n, a] = ie(t.mode !== void 0 ? t.mode : "Quad"), e = Oe(null), o = Oe(null), u = Oe(null), c = Oe(null), s = (f, h) => {
2913
- const g = Y.get(f.name);
2914
- g !== void 0 && g.dispose(), Y.delete(f.name);
2915
- const E = de.get(f.name);
2916
- E !== void 0 && (F.remove(E), E.dispose()), de.delete(f.name);
2917
- const w = new pr(f, h);
2918
- switch (f.name) {
2908
+ });
2909
+ let mt = "Renderer";
2910
+ const A = new tn();
2911
+ A.name = "Debug Scene";
2912
+ let tt = new tn();
2913
+ A.add(tt);
2914
+ const ka = new ca();
2915
+ A.add(ka);
2916
+ const dn = new An(500);
2917
+ dn.name = "axisHelper";
2918
+ A.add(dn);
2919
+ let G = X.get("Debug"), te = X.get("Orthographic"), Fe = X.get("Front"), Ue = X.get("Top");
2920
+ function Za(t) {
2921
+ const [n, a] = ne(t.mode !== void 0 ? t.mode : "Quad"), [e, o] = ne(null), u = ye(null), c = ye(null), s = ye(null), d = ye(null), p = ye(null), h = (m, v) => {
2922
+ const y = H.get(m.name);
2923
+ y !== void 0 && y.dispose(), H.delete(m.name);
2924
+ const w = me.get(m.name);
2925
+ w !== void 0 && (A.remove(w), w.dispose()), me.delete(m.name);
2926
+ const F = new Ra(m, v);
2927
+ switch (F.enableDamping = !0, F.dampingFactor = 0.05, m.name) {
2919
2928
  case "Top":
2920
2929
  case "Bottom":
2921
2930
  case "Left":
2922
2931
  case "Right":
2923
2932
  case "Front":
2924
2933
  case "Back":
2925
- w.enableRotate = !1;
2934
+ F.enableRotate = !1;
2926
2935
  break;
2927
2936
  }
2928
- if (Y.set(f.name, w), f instanceof St) {
2929
- const A = new Rn(f);
2930
- de.set(f.name, A), F.add(A);
2931
- }
2932
- }, d = (f) => {
2933
- const h = de.get(f.name);
2934
- h !== void 0 && (F.remove(h), h.dispose(), de.delete(f.name));
2935
- const g = Y.get(f.name);
2936
- g !== void 0 && (g.dispose(), Y.delete(f.name));
2937
- }, m = () => {
2938
- Y.forEach((f, h) => {
2939
- f.dispose();
2940
- const g = de.get(h);
2941
- g !== void 0 && (F.remove(g), g.dispose()), de.delete(h), Y.delete(h);
2942
- }), Y.clear(), de.clear();
2943
- }, v = () => {
2937
+ if (H.set(m.name, F), m instanceof Tt) {
2938
+ const V = new Nn(m);
2939
+ me.set(m.name, V), A.add(V);
2940
+ }
2941
+ }, b = (m) => {
2942
+ const v = me.get(m.name);
2943
+ v !== void 0 && (A.remove(v), v.dispose(), me.delete(m.name));
2944
+ const y = H.get(m.name);
2945
+ y !== void 0 && (y.dispose(), H.delete(m.name));
2946
+ }, x = () => {
2947
+ H.forEach((m, v) => {
2948
+ m.dispose();
2949
+ const y = me.get(v);
2950
+ y !== void 0 && (A.remove(y), y.dispose()), me.delete(v), H.delete(v);
2951
+ }), H.clear(), me.clear();
2952
+ }, S = () => {
2944
2953
  switch (n) {
2945
2954
  case "Single":
2946
- s($, e.current);
2955
+ h(G, c.current);
2947
2956
  break;
2948
2957
  case "Side by Side":
2949
2958
  case "Stacked":
2950
- s($, e.current), s(ee, o.current);
2959
+ h(G, c.current), h(te, s.current);
2951
2960
  break;
2952
2961
  case "Quad":
2953
- s($, e.current), s(ee, o.current), s(Ue, u.current), s(Be, c.current);
2962
+ h(G, c.current), h(te, s.current), h(Fe, d.current), h(Ue, p.current);
2954
2963
  break;
2955
2964
  }
2956
2965
  };
2957
- return tt(() => {
2958
- F.name = "Debug Scene", F.add(t.scene);
2959
- const f = new Jn();
2960
- F.add(f);
2961
- const h = new Mn(500);
2962
- h.name = "axisHelper", F.add(h);
2963
- }, []), tt(() => {
2964
- const f = t.renderer.getSize(new ae());
2965
- let h = f.x, g = f.y, E = Math.floor(h / 2), w = Math.floor(g / 2), A = -1;
2966
- const U = () => {
2967
- h = window.innerWidth - 300, g = window.innerHeight, E = Math.floor(h / 2), w = Math.floor(g / 2);
2968
- let O = h, S = g;
2966
+ Be(() => {
2967
+ const m = new In({
2968
+ canvas: u.current,
2969
+ stencil: !1
2970
+ });
2971
+ m.autoClear = !1, m.shadowMap.enabled = !0, m.setPixelRatio(devicePixelRatio), m.setClearColor(0), o(m);
2972
+ }, []), Be(() => {
2973
+ const m = () => {
2974
+ on(tt), A.remove(tt), t.three.scene !== void 0 && (tt = t.three.scene, A.add(tt));
2975
+ };
2976
+ return I.addEventListener(N.SET_SCENE, m), () => {
2977
+ I.removeEventListener(N.SET_SCENE, m);
2978
+ };
2979
+ }, []), Be(() => {
2980
+ if (e === null)
2981
+ return;
2982
+ let m = window.innerWidth, v = window.innerHeight, y = Math.floor(m / 2), w = Math.floor(v / 2), F = -1;
2983
+ const V = () => {
2984
+ m = window.innerWidth - 300, v = window.innerHeight, y = Math.floor(m / 2), w = Math.floor(v / 2), e.setSize(m, v);
2985
+ let j = m, D = v;
2969
2986
  switch (n) {
2970
2987
  case "Side by Side":
2971
- O = E, S = g;
2988
+ j = y, D = v;
2972
2989
  break;
2973
2990
  case "Stacked":
2974
- O = h, S = w;
2991
+ j = m, D = w;
2975
2992
  break;
2976
2993
  case "Quad":
2977
- O = E, S = w;
2994
+ j = y, D = w;
2978
2995
  break;
2979
2996
  }
2980
- H.forEach((G) => {
2981
- var ge;
2982
- G instanceof Zt ? (G.left = O / -2, G.right = O / 2, G.top = S / 2, G.bottom = S / -2, G.updateProjectionMatrix()) : G instanceof St && (G.aspect = O / S, G.updateProjectionMatrix(), (ge = de.get(G.name)) == null || ge.update());
2997
+ X.forEach((z) => {
2998
+ var ce;
2999
+ z instanceof en ? (z.left = j / -2, z.right = j / 2, z.top = D / 2, z.bottom = D / -2, z.updateProjectionMatrix()) : z instanceof Tt && (z.aspect = j / D, z.updateProjectionMatrix(), (ce = me.get(z.name)) == null || ce.update());
2983
3000
  });
2984
- }, j = () => {
2985
- t.renderer.setViewport(0, 0, h, g), t.renderer.setScissor(0, 0, h, g), t.renderer.render(F, $);
2986
- }, X = () => {
3001
+ }, Z = () => {
3002
+ e.setViewport(0, 0, m, v), e.setScissor(0, 0, m, v), e.render(A, G);
3003
+ }, se = () => {
2987
3004
  if (n === "Side by Side")
2988
- t.renderer.setViewport(0, 0, E, g), t.renderer.setScissor(0, 0, E, g), t.renderer.render(F, $), t.renderer.setViewport(E, 0, E, g), t.renderer.setScissor(E, 0, E, g), t.renderer.render(F, ee);
3005
+ e.setViewport(0, 0, y, v), e.setScissor(0, 0, y, v), e.render(A, G), e.setViewport(y, 0, y, v), e.setScissor(y, 0, y, v), e.render(A, te);
2989
3006
  else {
2990
- const O = g - w;
2991
- t.renderer.setViewport(0, O, h, w), t.renderer.setScissor(0, O, h, w), t.renderer.render(F, $), t.renderer.setViewport(0, 0, h, w), t.renderer.setScissor(0, 0, h, w), t.renderer.render(F, ee);
3007
+ const j = v - w;
3008
+ e.setViewport(0, j, m, w), e.setScissor(0, j, m, w), e.render(A, G), e.setViewport(0, 0, m, w), e.setScissor(0, 0, m, w), e.render(A, te);
2992
3009
  }
2993
- }, Z = () => {
2994
- let O = 0, S = 0;
2995
- S = g - w, O = 0, t.renderer.setViewport(O, S, E, w), t.renderer.setScissor(O, S, E, w), t.renderer.render(F, $), O = E, t.renderer.setViewport(O, S, E, w), t.renderer.setScissor(O, S, E, w), t.renderer.render(F, ee), S = 0, O = 0, t.renderer.setViewport(O, S, E, w), t.renderer.setScissor(O, S, E, w), t.renderer.render(F, Ue), O = E, t.renderer.setViewport(O, S, E, w), t.renderer.setScissor(O, S, E, w), t.renderer.render(F, Be);
2996
- }, z = () => {
2997
- switch (Y.forEach((O) => {
2998
- O.update();
2999
- }), t.scene.update(), t.renderer.clear(), n) {
3010
+ }, Y = () => {
3011
+ let j = 0, D = 0;
3012
+ D = v - w, j = 0, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, G), j = y, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, te), D = 0, j = 0, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, Fe), j = y, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, Ue);
3013
+ }, fe = () => {
3014
+ switch (H.forEach((j) => {
3015
+ j.update();
3016
+ }), e.clear(), n) {
3000
3017
  case "Single":
3001
- j();
3018
+ Z();
3002
3019
  break;
3003
3020
  case "Side by Side":
3004
3021
  case "Stacked":
3005
- X();
3022
+ se();
3006
3023
  break;
3007
3024
  case "Quad":
3008
- Z();
3025
+ Y();
3009
3026
  break;
3010
3027
  }
3011
- A = requestAnimationFrame(z);
3028
+ F = requestAnimationFrame(fe);
3012
3029
  };
3013
- return v(), window.addEventListener("resize", U), U(), z(), () => {
3014
- window.removeEventListener("resize", U), cancelAnimationFrame(A), A = -1;
3030
+ return S(), window.addEventListener("resize", V), V(), fe(), () => {
3031
+ window.removeEventListener("resize", V), cancelAnimationFrame(F), F = -1;
3015
3032
  };
3016
- }, [n]), t.cameras.forEach((f) => {
3017
- H.set(f.name, f), me.push(f.name);
3033
+ }, [n, e]);
3034
+ const O = [];
3035
+ return X.forEach((m, v) => {
3036
+ O.push(v);
3018
3037
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3038
+ /* @__PURE__ */ l.jsx("canvas", { ref: u }),
3019
3039
  /* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, children: [
3020
- n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Te, { camera: $, options: me, ref: e, onSelect: (f) => {
3021
- var g;
3022
- (g = Y.get($.name)) == null || g.dispose();
3023
- const h = H.get(f);
3024
- h !== void 0 && (d($), $ = h, s(h, e.current));
3040
+ n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
3041
+ var y;
3042
+ (y = H.get(G.name)) == null || y.dispose();
3043
+ const v = X.get(m);
3044
+ v !== void 0 && (b(G), G = v, h(v, c.current));
3025
3045
  } }) }),
3026
3046
  (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3027
- /* @__PURE__ */ l.jsx(Te, { camera: $, options: me, ref: e, onSelect: (f) => {
3028
- var g;
3029
- (g = Y.get($.name)) == null || g.dispose();
3030
- const h = H.get(f);
3031
- h !== void 0 && (d($), $ = h, s(h, e.current));
3047
+ /* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
3048
+ var y;
3049
+ (y = H.get(G.name)) == null || y.dispose();
3050
+ const v = X.get(m);
3051
+ v !== void 0 && (b(G), G = v, h(v, c.current));
3032
3052
  } }),
3033
- /* @__PURE__ */ l.jsx(Te, { camera: ee, options: me, ref: o, onSelect: (f) => {
3034
- var g;
3035
- (g = Y.get(ee.name)) == null || g.dispose();
3036
- const h = H.get(f);
3037
- h !== void 0 && (d(ee), ee = h, s(h, o.current));
3053
+ /* @__PURE__ */ l.jsx(Te, { camera: te, options: O, ref: s, onSelect: (m) => {
3054
+ var y;
3055
+ (y = H.get(te.name)) == null || y.dispose();
3056
+ const v = X.get(m);
3057
+ v !== void 0 && (b(te), te = v, h(v, s.current));
3038
3058
  } })
3039
3059
  ] }),
3040
3060
  n === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3041
- /* @__PURE__ */ l.jsx(Te, { camera: $, options: me, ref: e, onSelect: (f) => {
3042
- var g;
3043
- (g = Y.get($.name)) == null || g.dispose();
3044
- const h = H.get(f);
3045
- h !== void 0 && (d($), $ = h, s(h, e.current));
3061
+ /* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
3062
+ var y;
3063
+ (y = H.get(G.name)) == null || y.dispose();
3064
+ const v = X.get(m);
3065
+ v !== void 0 && (b(G), G = v, h(v, c.current));
3046
3066
  } }),
3047
- /* @__PURE__ */ l.jsx(Te, { camera: ee, options: me, ref: o, onSelect: (f) => {
3048
- var g;
3049
- (g = Y.get(ee.name)) == null || g.dispose();
3050
- const h = H.get(f);
3051
- h !== void 0 && (d(ee), ee = h, s(h, o.current));
3067
+ /* @__PURE__ */ l.jsx(Te, { camera: te, options: O, ref: s, onSelect: (m) => {
3068
+ var y;
3069
+ (y = H.get(te.name)) == null || y.dispose();
3070
+ const v = X.get(m);
3071
+ v !== void 0 && (b(te), te = v, h(v, s.current));
3052
3072
  } }),
3053
- /* @__PURE__ */ l.jsx(Te, { camera: Ue, options: me, ref: u, onSelect: (f) => {
3054
- var g;
3055
- (g = Y.get(Ue.name)) == null || g.dispose();
3056
- const h = H.get(f);
3057
- h !== void 0 && (d(Ue), Ue = h, s(h, u.current));
3073
+ /* @__PURE__ */ l.jsx(Te, { camera: Fe, options: O, ref: d, onSelect: (m) => {
3074
+ var y;
3075
+ (y = H.get(Fe.name)) == null || y.dispose();
3076
+ const v = X.get(m);
3077
+ v !== void 0 && (b(Fe), Fe = v, h(v, d.current));
3058
3078
  } }),
3059
- /* @__PURE__ */ l.jsx(Te, { camera: Be, options: me, ref: c, onSelect: (f) => {
3060
- var g;
3061
- (g = Y.get(Be.name)) == null || g.dispose();
3062
- const h = H.get(f);
3063
- h !== void 0 && (d(Be), Be = h, s(h, c.current));
3079
+ /* @__PURE__ */ l.jsx(Te, { camera: Ue, options: O, ref: p, onSelect: (m) => {
3080
+ var y;
3081
+ (y = H.get(Ue.name)) == null || y.dispose();
3082
+ const v = X.get(m);
3083
+ v !== void 0 && (b(Ue), Ue = v, h(v, p.current));
3064
3084
  } })
3065
3085
  ] })
3066
3086
  ] }),
3067
3087
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3068
3088
  /* @__PURE__ */ l.jsx(
3069
- Rt,
3089
+ _t,
3070
3090
  {
3071
- index: Ht.indexOf(n),
3072
- options: Ht,
3073
- onSelect: (f) => {
3074
- f !== n && (m(), a(f));
3091
+ index: Xt.indexOf(n),
3092
+ options: Xt,
3093
+ onSelect: (m) => {
3094
+ m !== n && (x(), a(m));
3075
3095
  }
3076
3096
  }
3077
3097
  ),
3078
3098
  /* @__PURE__ */ l.jsx(
3079
- Rt,
3099
+ _t,
3080
3100
  {
3081
- index: 0,
3082
- options: mr,
3083
- onSelect: (f) => {
3084
- if (f !== Ct)
3085
- switch (Ct = f, Ct) {
3086
- case "Default":
3087
- F.overrideMaterial = null;
3101
+ index: qt.indexOf(mt),
3102
+ options: qt,
3103
+ onSelect: (m) => {
3104
+ if (m !== mt)
3105
+ switch (mt = m, mt) {
3106
+ case "Depth":
3107
+ A.overrideMaterial = Ma;
3088
3108
  break;
3089
3109
  case "Normals":
3090
- F.overrideMaterial = gr;
3110
+ A.overrideMaterial = Pa;
3111
+ break;
3112
+ default:
3113
+ case "Renderer":
3114
+ A.overrideMaterial = null;
3091
3115
  break;
3092
3116
  case "Wireframe":
3093
- F.overrideMaterial = vr;
3117
+ A.overrideMaterial = _a;
3094
3118
  break;
3095
3119
  case "UVs":
3096
- F.overrideMaterial = br;
3120
+ A.overrideMaterial = ja;
3097
3121
  break;
3098
3122
  }
3099
3123
  }
@@ -3102,7 +3126,7 @@ function Nr(t) {
3102
3126
  ] })
3103
3127
  ] });
3104
3128
  }
3105
- function Lr(t) {
3129
+ function Ja(t) {
3106
3130
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3107
3131
  /* @__PURE__ */ l.jsx("header", { children: t.header }),
3108
3132
  t.children,
@@ -3110,34 +3134,40 @@ function Lr(t) {
3110
3134
  ] });
3111
3135
  }
3112
3136
  export {
3113
- Mt as Accordion,
3114
- Rr as Application,
3115
- mt as BaseRemote,
3116
- an as ChildObject,
3117
- nr as ContainerObject,
3118
- Wn as Draggable,
3119
- zn as DraggableItem,
3120
- Hn as Dropdown,
3121
- Kn as DropdownItem,
3122
- Lr as Editor,
3123
- Jn as InfiniteGridHelper,
3124
- fr as Inspector,
3125
- Nr as MultiView,
3126
- rn as NavButton,
3127
- Pr as RemoteComponents,
3128
- Dr as RemoteController,
3129
- jr as RemoteTheatre,
3130
- _r as RemoteThree,
3131
- kr as RemoteTweakpane,
3132
- Ir as SceneHierarchy,
3133
- Ar as SceneInspector,
3134
- D as ToolEvents,
3135
- tr as UVMaterial,
3136
- Or as clamp,
3137
- Nn as colorToHex,
3138
- k as debugDispatcher,
3139
- Mr as distance,
3140
- en as hierarchyUUID,
3141
- An as isColor,
3142
- In as randomID
3137
+ jt as Accordion,
3138
+ Va as Application,
3139
+ gt as BaseRemote,
3140
+ un as ChildObject,
3141
+ fa as ContainerObject,
3142
+ na as Draggable,
3143
+ ta as DraggableItem,
3144
+ aa as Dropdown,
3145
+ ra as DropdownItem,
3146
+ Ja as Editor,
3147
+ ca as InfiniteGridHelper,
3148
+ Oa as Inspector,
3149
+ Za as MultiView,
3150
+ ln as NavButton,
3151
+ Ya as RemoteComponents,
3152
+ Ka as RemoteController,
3153
+ za as RemoteTheatre,
3154
+ Wa as RemoteThree,
3155
+ Ha as RemoteTweakpane,
3156
+ Xa as SceneHierarchy,
3157
+ qa as SceneInspector,
3158
+ N as ToolEvents,
3159
+ da as UVMaterial,
3160
+ Ba as clamp,
3161
+ Yn as colorToHex,
3162
+ I as debugDispatcher,
3163
+ on as dispose,
3164
+ Wn as disposeMaterial,
3165
+ Ga as disposeTexture,
3166
+ $a as distance,
3167
+ rn as hierarchyUUID,
3168
+ Vn as isColor,
3169
+ Gn as randomID,
3170
+ zn as resetThreeObjects,
3171
+ Ct as round,
3172
+ Rt as totalThreeObjects
3143
3173
  };