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