@tomorrowevening/hermes 0.0.39 → 0.0.41

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