@tomorrowevening/hermes 0.0.55 → 0.0.56

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,56 +1,56 @@
1
- import { EventDispatcher as un, Texture as dn, CubeTexture as Gn, RepeatWrapping as Yt, Color as pt, FrontSide as Vn, BackSide as hn, DoubleSide as fn, NoBlending as Wn, NormalBlending as qn, AdditiveBlending as Kn, SubtractiveBlending as Xn, MultiplyBlending as Zn, CustomBlending as Jn, AddEquation as Qn, SubtractEquation as ei, ReverseSubtractEquation as ti, MinEquation as ni, MaxEquation as ii, ZeroFactor as pn, OneFactor as mn, SrcColorFactor as gn, OneMinusSrcColorFactor as vn, SrcAlphaFactor as bn, OneMinusSrcAlphaFactor as yn, DstAlphaFactor as xn, OneMinusDstAlphaFactor as Cn, DstColorFactor as En, OneMinusDstColorFactor as Sn, SrcAlphaSaturateFactor as ai, ConstantColorFactor as wn, OneMinusConstantColorFactor as On, ConstantAlphaFactor as Mn, OneMinusConstantAlphaFactor as _n, Matrix4 as ri, Vector3 as J, Euler as si, Line as oi, BufferGeometry as Gt, Float32BufferAttribute as Vt, LineBasicMaterial as li, Mesh as Tn, MeshBasicMaterial as Rn, Ray as ci, Plane as ui, MathUtils as di, MOUSE as it, TOUCH as at, Quaternion as Wt, Spherical as qt, Vector2 as me, ShaderMaterial as Pn, GLSL3 as hi, PlaneGeometry as fi, Scene as pi, Group as mi, AxesHelper as Kt, MeshDepthMaterial as gi, MeshNormalMaterial as vi, WebGLRenderer as bi, PerspectiveCamera as At, Raycaster as yi, OrthographicCamera as Xt, CameraHelper as xi, SpotLightHelper as Ci, PointLightHelper as Ei, HemisphereLightHelper as Si, DirectionalLightHelper as wi } from "three";
2
- import { Pane as Oi } from "tweakpane";
3
- import * as Mi from "@tweakpane/plugin-essentials";
4
- import An, { useState as X, useRef as he, useEffect as ke, forwardRef as _i, useMemo as ve } from "react";
5
- import { Reorder as kn } from "framer-motion";
6
- const jn = () => {
7
- }, Ra = () => {
1
+ import { EventDispatcher as dn, Texture as hn, CubeTexture as Gn, RepeatWrapping as Vt, Color as mt, FrontSide as Vn, BackSide as fn, DoubleSide as pn, NoBlending as Wn, NormalBlending as qn, AdditiveBlending as Kn, SubtractiveBlending as Xn, MultiplyBlending as Zn, CustomBlending as Jn, AddEquation as Qn, SubtractEquation as ea, ReverseSubtractEquation as ta, MinEquation as na, MaxEquation as aa, ZeroFactor as mn, OneFactor as gn, SrcColorFactor as vn, OneMinusSrcColorFactor as bn, SrcAlphaFactor as yn, OneMinusSrcAlphaFactor as xn, DstAlphaFactor as Cn, OneMinusDstAlphaFactor as En, DstColorFactor as Sn, OneMinusDstColorFactor as wn, SrcAlphaSaturateFactor as ia, ConstantColorFactor as On, OneMinusConstantColorFactor as Mn, ConstantAlphaFactor as _n, OneMinusConstantAlphaFactor as Tn, Matrix4 as ra, Vector3 as Z, Euler as sa, Line as oa, BufferGeometry as Wt, Float32BufferAttribute as qt, LineBasicMaterial as ca, Mesh as Rn, MeshBasicMaterial as Pn, Ray as la, Plane as ua, MathUtils as da, MOUSE as at, TOUCH as it, Quaternion as Kt, Spherical as Xt, Vector2 as ge, ShaderMaterial as An, GLSL3 as ha, PlaneGeometry as fa, Scene as pa, Group as ma, AxesHelper as Zt, MeshDepthMaterial as ga, MeshNormalMaterial as va, WebGLRenderer as ba, PerspectiveCamera as kt, Raycaster as ya, OrthographicCamera as Jt, CameraHelper as xa, SpotLightHelper as Ca, PointLightHelper as Ea, HemisphereLightHelper as Sa, DirectionalLightHelper as wa } from "three";
2
+ import { Pane as Oa } from "tweakpane";
3
+ import * as Ma from "@tweakpane/plugin-essentials";
4
+ import kn, { useState as ee, useEffect as ke, useRef as ae, useMemo as de, forwardRef as _a } from "react";
5
+ import { Reorder as jn } from "framer-motion";
6
+ const Ut = () => {
7
+ }, Ai = () => {
8
8
  };
9
9
  function Je(e) {
10
10
  return e.substring(0, 1).toUpperCase() + e.substring(1);
11
11
  }
12
- function Ze(e, n, i) {
13
- return Math.min(n, Math.max(e, i));
12
+ function Ze(e, n, a) {
13
+ return Math.min(n, Math.max(e, a));
14
14
  }
15
- function Zt(e, n, i) {
16
- return (i - e) / (n - e);
15
+ function Qt(e, n, a) {
16
+ return (a - e) / (n - e);
17
17
  }
18
- function Jt(e, n, i) {
19
- return e * (1 - i) + n * i;
18
+ function en(e, n, a) {
19
+ return e * (1 - a) + n * a;
20
20
  }
21
- function Pa(e, n) {
22
- const i = e - n;
23
- return Math.sqrt(i * i);
21
+ function ki(e, n) {
22
+ const a = e - n;
23
+ return Math.sqrt(a * a);
24
24
  }
25
- function Ti() {
25
+ function Ta() {
26
26
  return Math.round(Math.random() * 1e6).toString();
27
27
  }
28
- function Ri(e) {
28
+ function Ra(e) {
29
29
  return e.r !== void 0 && e.g !== void 0 && e.b !== void 0;
30
30
  }
31
- function Pi(e) {
32
- const n = Math.round(e.r * 255), i = Math.round(e.g * 255), t = Math.round(e.b * 255), a = (u) => {
33
- const h = u.toString(16);
31
+ function Pa(e) {
32
+ const n = Math.round(e.r * 255), a = Math.round(e.g * 255), t = Math.round(e.b * 255), r = (d) => {
33
+ const h = d.toString(16);
34
34
  return h.length === 1 ? "0" + h : h;
35
- }, r = a(n), c = a(i), l = a(t);
36
- return "#" + r + c + l;
35
+ }, i = r(n), l = r(a), c = r(t);
36
+ return "#" + i + l + c;
37
37
  }
38
- function mt(e, n = 1) {
38
+ function gt(e, n = 1) {
39
39
  return Number(e.toFixed(n));
40
40
  }
41
- let Bt = 0;
42
- const Ai = () => {
43
- Bt = 0;
41
+ let Ft = 0;
42
+ const Aa = () => {
43
+ Ft = 0;
44
44
  }, Dn = (e) => {
45
45
  if (!e)
46
46
  return;
47
47
  let n = e.name.replace(" ", "");
48
- n.length === 0 && (n = `obj_${Bt}`, Bt++), e.parent !== null && e.parent.uuid.length > 0 && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.children.forEach((i) => {
49
- Dn(i);
48
+ n.length === 0 && (n = `obj_${Ft}`, Ft++), e.parent !== null && e.parent.uuid.length > 0 && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.children.forEach((a) => {
49
+ Dn(a);
50
50
  });
51
- }, Aa = (e) => {
51
+ }, ji = (e) => {
52
52
  e?.dispose();
53
- }, ki = (e) => {
53
+ }, ka = (e) => {
54
54
  e && (Array.isArray(e) ? e.forEach((n) => n.dispose()) : e.dispose());
55
55
  }, In = (e) => {
56
56
  if (e) {
@@ -60,12 +60,12 @@ const Ai = () => {
60
60
  }
61
61
  if (e.parent && e.parent.remove(e), e.isMesh) {
62
62
  const n = e;
63
- n.geometry?.dispose(), ki(n.material);
63
+ n.geometry?.dispose(), ka(n.material);
64
64
  }
65
65
  e.dispose !== void 0 && e.dispose();
66
66
  }
67
67
  };
68
- class ka {
68
+ class Di {
69
69
  components = /* @__PURE__ */ new Map();
70
70
  listen;
71
71
  // Protected
@@ -76,11 +76,11 @@ class ka {
76
76
  _mode = "app";
77
77
  _connected = !1;
78
78
  _useBC = !1;
79
- constructor(n, i, t = !0) {
80
- this._appID = n, this._debugEnabled = i, i && (this._useBC = t, t ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
79
+ constructor(n, a, t = !0) {
80
+ this._appID = n, this._debugEnabled = a, a && (this._useBC = t, t ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
81
81
  }
82
- addComponent(n, i) {
83
- this.components.set(n, i);
82
+ addComponent(n, a) {
83
+ this.components.set(n, a);
84
84
  }
85
85
  dispose() {
86
86
  this._broadcastChannel !== void 0 && this._broadcastChannel.removeEventListener("message", this.messageHandler), this._webSocket !== void 0 && (this._webSocket.removeEventListener("open", this.openHandler), this._webSocket.removeEventListener("close", this.closeHandler), this._webSocket.removeEventListener("message", this.messageHandler)), this.components.forEach((n) => {
@@ -123,7 +123,7 @@ class ka {
123
123
  n && (this._mode = "editor");
124
124
  }
125
125
  }
126
- const B = new un(), F = {
126
+ const B = new dn(), F = {
127
127
  CUSTOM: "ToolEvents::custom",
128
128
  // Components
129
129
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -139,40 +139,40 @@ const B = new un(), F = {
139
139
  ADD_CAMERA: "ToolEvents::addCamera",
140
140
  REMOVE_CAMERA: "ToolEvents::removeCamera"
141
141
  };
142
- class Mt {
142
+ class _t {
143
143
  app;
144
144
  constructor(n) {
145
145
  this.app = n;
146
146
  }
147
147
  dispose() {
148
148
  }
149
- handleApp(n, i, t) {
149
+ handleApp(n, a, t) {
150
150
  }
151
- handleEditor(n, i, t) {
151
+ handleEditor(n, a, t) {
152
152
  }
153
153
  }
154
- class ja extends Mt {
155
- selectDropdown(n, i) {
154
+ class Ii extends _t {
155
+ selectDropdown(n, a) {
156
156
  this.app.send({
157
157
  event: "selectComponent",
158
158
  target: "app",
159
159
  data: {
160
160
  dropdown: n,
161
- value: i
161
+ value: a
162
162
  }
163
163
  });
164
164
  }
165
- updateDropdown(n, i) {
165
+ updateDropdown(n, a) {
166
166
  this.app.send({
167
167
  event: "draggableListUpdate",
168
168
  target: "app",
169
169
  data: {
170
170
  dropdown: n,
171
- value: i
171
+ value: a
172
172
  }
173
173
  });
174
174
  }
175
- handleApp(n, i, t) {
175
+ handleApp(n, a, t) {
176
176
  switch (t.event) {
177
177
  case "selectComponent":
178
178
  B.dispatchEvent({ type: F.SELECT_DROPDOWN, value: t.data });
@@ -183,7 +183,7 @@ class ja extends Mt {
183
183
  }
184
184
  }
185
185
  }
186
- class $t extends Mt {
186
+ class Ht extends _t {
187
187
  project;
188
188
  sheets = /* @__PURE__ */ new Map();
189
189
  sheetObjects = /* @__PURE__ */ new Map();
@@ -200,16 +200,16 @@ class $t extends Mt {
200
200
  console.error("Theatre Project hasn't been created yet.");
201
201
  return;
202
202
  }
203
- let i = this.sheets.get(n);
204
- return i !== void 0 || (i = this.project?.sheet(n), this.sheets.set(n, i)), i;
203
+ let a = this.sheets.get(n);
204
+ return a !== void 0 || (a = this.project?.sheet(n), this.sheets.set(n, a)), a;
205
205
  }
206
- playSheet(n, i) {
207
- this.sheet(n)?.sequence.play(i), this.app.send({
206
+ playSheet(n, a) {
207
+ this.sheet(n)?.sequence.play(a), this.app.send({
208
208
  event: "playSheet",
209
209
  target: "editor",
210
210
  data: {
211
211
  sheet: n,
212
- value: i
212
+ value: a
213
213
  }
214
214
  });
215
215
  }
@@ -223,26 +223,26 @@ class $t extends Mt {
223
223
  });
224
224
  }
225
225
  clearSheetObjects(n) {
226
- this.sheetObjects.forEach((i, t) => {
227
- t.search(`${n}_`) > -1 && this.unsubscribe(i);
226
+ this.sheetObjects.forEach((a, t) => {
227
+ t.search(`${n}_`) > -1 && this.unsubscribe(a);
228
228
  });
229
229
  }
230
- sheetObject(n, i, t, a) {
230
+ sheetObject(n, a, t, r) {
231
231
  if (this.project === void 0) {
232
232
  console.error("Theatre Project hasn't been created yet.");
233
233
  return;
234
234
  }
235
- const r = this.sheet(n);
236
- if (r === void 0)
235
+ const i = this.sheet(n);
236
+ if (i === void 0)
237
237
  return;
238
- const c = `${n}_${i}`;
239
- let l = this.sheetObjects.get(c);
240
- l !== void 0 ? l = r.object(i, { ...t, ...l.value }, { reconfigure: !0 }) : l = r.object(i, t), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, a !== void 0 ? a : jn);
241
- const u = l.onValuesChange((h) => {
238
+ const l = `${n}_${a}`;
239
+ let c = this.sheetObjects.get(l);
240
+ c !== void 0 ? c = i.object(a, { ...t, ...c.value }, { reconfigure: !0 }) : c = i.object(a, t), this.sheetObjects.set(l, c), this.sheetObjectCBs.set(l, r !== void 0 ? r : Ut);
241
+ const d = c.onValuesChange((h) => {
242
242
  if (this.app.editor) {
243
243
  for (const m in h) {
244
244
  const y = h[m];
245
- typeof y == "object" && Ri(y) && (h[m] = {
245
+ typeof y == "object" && Ra(y) && (h[m] = {
246
246
  r: y.r,
247
247
  g: y.g,
248
248
  b: y.b,
@@ -254,145 +254,145 @@ class $t extends Mt {
254
254
  target: "app",
255
255
  data: {
256
256
  sheet: n,
257
- sheetObject: c,
257
+ sheetObject: l,
258
258
  values: h
259
259
  }
260
260
  });
261
261
  }
262
- const f = this.sheetObjectCBs.get(c);
262
+ const f = this.sheetObjectCBs.get(l);
263
263
  f !== void 0 && f(h);
264
264
  });
265
- return this.sheetObjectUnsubscribe.set(c, u), l;
265
+ return this.sheetObjectUnsubscribe.set(l, d), c;
266
266
  }
267
267
  unsubscribe(n) {
268
268
  if (this.project === void 0) {
269
269
  console.error("Theatre Project hasn't been created yet.");
270
270
  return;
271
271
  }
272
- const i = n.address.sheetId, t = n.address.objectKey;
273
- this.sheets.get(i)?.detachObject(t);
274
- const r = `${i}_${t}`, c = this.sheetObjectUnsubscribe.get(r);
275
- c !== void 0 && (this.sheetObjects.delete(r), this.sheetObjectCBs.delete(r), this.sheetObjectUnsubscribe.delete(r), c());
272
+ const a = n.address.sheetId, t = n.address.objectKey;
273
+ this.sheets.get(a)?.detachObject(t);
274
+ const i = `${a}_${t}`, l = this.sheetObjectUnsubscribe.get(i);
275
+ l !== void 0 && (this.sheetObjects.delete(i), this.sheetObjectCBs.delete(i), this.sheetObjectUnsubscribe.delete(i), l());
276
276
  }
277
- handleApp(n, i, t) {
278
- const a = i;
279
- let r;
277
+ handleApp(n, a, t) {
278
+ const r = a;
279
+ let i;
280
280
  switch (t.event) {
281
281
  case "setSheet":
282
- r = a.sheets.get(t.data.sheet), r !== void 0 && (a.activeSheet = r, this.studio?.setSelection([r]));
282
+ i = r.sheets.get(t.data.sheet), i !== void 0 && (r.activeSheet = i, this.studio?.setSelection([i]));
283
283
  break;
284
284
  case "setSheetObject":
285
- r = a.sheetObjects.get(`${t.data.sheet}_${t.data.key}`), r !== void 0 && this.studio?.setSelection([r]);
285
+ i = r.sheetObjects.get(`${t.data.sheet}_${t.data.key}`), i !== void 0 && this.studio?.setSelection([i]);
286
286
  break;
287
287
  case "updateSheetObject":
288
- r = a.sheets.get(t.data.sheet), r !== void 0 && r.sequence.pause(), r = a.sheetObjectCBs.get(t.data.sheetObject), r !== void 0 && r(t.data.values);
288
+ i = r.sheets.get(t.data.sheet), i !== void 0 && i.sequence.pause(), i = r.sheetObjectCBs.get(t.data.sheetObject), i !== void 0 && i(t.data.values);
289
289
  break;
290
290
  case "updateTimeline":
291
- r = a.sheets.get(t.data.sheet), a.activeSheet !== void 0 && (a.activeSheet.sequence.position = t.data.position);
291
+ i = r.sheets.get(t.data.sheet), r.activeSheet !== void 0 && (r.activeSheet.sequence.position = t.data.position);
292
292
  break;
293
293
  }
294
294
  }
295
- handleEditor(n, i, t) {
295
+ handleEditor(n, a, t) {
296
296
  if (n.editor) {
297
- const a = i;
297
+ const r = a;
298
298
  switch (t.event) {
299
299
  case "playSheet":
300
- a.sheet(t.data.sheet)?.sequence.play(t.data.value);
300
+ r.sheet(t.data.sheet)?.sequence.play(t.data.value);
301
301
  break;
302
302
  case "pauseSheet":
303
- a.sheet(t.data.sheet)?.sequence.pause();
303
+ r.sheet(t.data.sheet)?.sequence.pause();
304
304
  break;
305
305
  }
306
306
  }
307
307
  }
308
- handleEditorApp(n, i) {
308
+ handleEditorApp(n, a) {
309
309
  if (n.editor) {
310
- this.studio?.ui.restore(), this.studio?.onSelectionChange((c) => {
311
- c.length < 1 || c.forEach((l) => {
312
- let u = l.address.sheetId, h = "setSheet", f = {};
313
- switch (l.type) {
310
+ this.studio?.ui.restore(), this.studio?.onSelectionChange((l) => {
311
+ l.length < 1 || l.forEach((c) => {
312
+ let d = c.address.sheetId, h = "setSheet", f = {};
313
+ switch (c.type) {
314
314
  case "Theatre_Sheet_PublicAPI":
315
315
  h = "setSheet", f = {
316
- sheet: l.address.sheetId
317
- }, i.activeSheet = i.sheets.get(l.address.sheetId);
316
+ sheet: c.address.sheetId
317
+ }, a.activeSheet = a.sheets.get(c.address.sheetId);
318
318
  break;
319
319
  case "Theatre_SheetObject_PublicAPI":
320
- h = "setSheetObject", u += `_${l.address.objectKey}`, f = {
321
- id: u,
322
- sheet: l.address.sheetId,
323
- key: l.address.objectKey
324
- }, i.activeSheet = i.sheets.get(l.address.sheetId);
320
+ h = "setSheetObject", d += `_${c.address.objectKey}`, f = {
321
+ id: d,
322
+ sheet: c.address.sheetId,
323
+ key: c.address.objectKey
324
+ }, a.activeSheet = a.sheets.get(c.address.sheetId);
325
325
  break;
326
326
  }
327
327
  n.send({ event: h, target: "app", data: f });
328
328
  });
329
329
  });
330
330
  let t = -1;
331
- const a = () => {
332
- if ($t.rafDriver?.tick(performance.now()), i.activeSheet !== void 0 && t !== i.activeSheet.sequence.position) {
333
- t = i.activeSheet.sequence.position;
334
- const c = i.activeSheet;
331
+ const r = () => {
332
+ if (Ht.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && t !== a.activeSheet.sequence.position) {
333
+ t = a.activeSheet.sequence.position;
334
+ const l = a.activeSheet;
335
335
  n.send({
336
336
  event: "updateTimeline",
337
337
  target: "app",
338
338
  data: {
339
339
  position: t,
340
- sheet: c.address.sheetId
340
+ sheet: l.address.sheetId
341
341
  }
342
342
  });
343
343
  }
344
- }, r = () => {
345
- a(), requestAnimationFrame(r);
344
+ }, i = () => {
345
+ r(), requestAnimationFrame(i);
346
346
  };
347
- a(), r();
347
+ r(), i();
348
348
  } else
349
349
  this.studio?.ui.hide();
350
350
  }
351
351
  }
352
- function Da(e, n, i) {
352
+ function Ni(e, n, a) {
353
353
  if (e.editor) {
354
- i.ui.restore(), i.onSelectionChange((c) => {
355
- c.length < 1 || c.forEach((l) => {
356
- let u = l.address.sheetId, h = "setSheet", f = {};
357
- switch (l.type) {
354
+ a.ui.restore(), a.onSelectionChange((l) => {
355
+ l.length < 1 || l.forEach((c) => {
356
+ let d = c.address.sheetId, h = "setSheet", f = {};
357
+ switch (c.type) {
358
358
  case "Theatre_Sheet_PublicAPI":
359
359
  h = "setSheet", f = {
360
- sheet: l.address.sheetId
361
- }, n.activeSheet = n.sheets.get(l.address.sheetId);
360
+ sheet: c.address.sheetId
361
+ }, n.activeSheet = n.sheets.get(c.address.sheetId);
362
362
  break;
363
363
  case "Theatre_SheetObject_PublicAPI":
364
- h = "setSheetObject", u += `_${l.address.objectKey}`, f = {
365
- id: u,
366
- sheet: l.address.sheetId,
367
- key: l.address.objectKey
368
- }, n.activeSheet = n.sheets.get(l.address.sheetId);
364
+ h = "setSheetObject", d += `_${c.address.objectKey}`, f = {
365
+ id: d,
366
+ sheet: c.address.sheetId,
367
+ key: c.address.objectKey
368
+ }, n.activeSheet = n.sheets.get(c.address.sheetId);
369
369
  break;
370
370
  }
371
371
  e.send({ event: h, target: "app", data: f });
372
372
  });
373
373
  });
374
374
  let t = -1;
375
- const a = () => {
376
- if ($t.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
375
+ const r = () => {
376
+ if (Ht.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
377
377
  t = n.activeSheet.sequence.position;
378
- const c = n.activeSheet;
378
+ const l = n.activeSheet;
379
379
  e.send({
380
380
  event: "updateTimeline",
381
381
  target: "app",
382
382
  data: {
383
383
  position: t,
384
- sheet: c.address.sheetId
384
+ sheet: l.address.sheetId
385
385
  }
386
386
  });
387
387
  }
388
- }, r = () => {
389
- a(), requestAnimationFrame(r);
388
+ }, i = () => {
389
+ r(), requestAnimationFrame(i);
390
390
  };
391
- a(), r();
391
+ r(), i();
392
392
  } else
393
- i.ui.hide();
393
+ a.ui.hide();
394
394
  }
395
- function ji(e) {
395
+ function ja(e) {
396
396
  if (e.name === "cameras")
397
397
  return "camera";
398
398
  if (e.name === "interactive")
@@ -413,19 +413,19 @@ function Nn(e) {
413
413
  uuid: e.uuid,
414
414
  children: []
415
415
  };
416
- return e.children.forEach((i) => {
417
- n.children.push(Nn(i));
416
+ return e.children.forEach((a) => {
417
+ n.children.push(Nn(a));
418
418
  }), n;
419
419
  }
420
- function Di(e) {
420
+ function Da(e) {
421
421
  const n = {};
422
- for (const i in e) {
423
- const t = e[i].value;
424
- n[i] = { value: t }, t === null ? n[i].value = { src: "" } : t.isTexture && (n[i].value = { src: t.image.src });
422
+ for (const a in e) {
423
+ const t = e[a].value;
424
+ n[a] = { value: t }, t === null ? n[a].value = { src: "" } : t.isTexture && (n[a].value = { src: t.image.src });
425
425
  }
426
426
  return n;
427
427
  }
428
- function Ii(e) {
428
+ function Ia(e) {
429
429
  switch (e) {
430
430
  case "blendSrcAlpha":
431
431
  case "blendDstAlpha":
@@ -439,34 +439,34 @@ function Ii(e) {
439
439
  }
440
440
  function rt(e) {
441
441
  const n = {};
442
- for (const i in e) {
443
- if (i.substring(0, 1) === "_" || i.substring(0, 2) === "is" || Ii(i))
442
+ for (const a in e) {
443
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ia(a))
444
444
  continue;
445
- const t = typeof e[i], a = e[i];
445
+ const t = typeof e[a], r = e[a];
446
446
  switch (t) {
447
447
  case "boolean":
448
448
  case "number":
449
449
  case "string":
450
- n[i] = a;
450
+ n[a] = r;
451
451
  break;
452
452
  case "object":
453
- if (a !== null)
454
- if (n[i] = a, a.isTexture)
455
- if (a instanceof dn) {
456
- const r = a.source.toJSON();
457
- n[i] = { src: r.url };
453
+ if (r !== null)
454
+ if (n[a] = r, r.isTexture)
455
+ if (r instanceof hn) {
456
+ const i = r.source.toJSON();
457
+ n[a] = { src: i.url };
458
458
  } else
459
- a instanceof Gn && (console.log("env map"), console.log(a.source.data), console.log(a.source.toJSON()), n[i] = { src: "" });
459
+ r instanceof Gn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
460
460
  else
461
- i === "uniforms" && (n[i] = Di(n[i]));
461
+ a === "uniforms" && (n[a] = Da(n[a]));
462
462
  else
463
- n[i] = { src: "" };
463
+ n[a] = { src: "" };
464
464
  break;
465
465
  }
466
466
  }
467
467
  return n;
468
468
  }
469
- function kt(e) {
469
+ function jt(e) {
470
470
  e.updateMatrix();
471
471
  const n = {
472
472
  name: e.name,
@@ -487,36 +487,36 @@ function kt(e) {
487
487
  blendMode: t.blendMode
488
488
  });
489
489
  });
490
- const i = e.type.toLowerCase();
491
- if (i.search("mesh") > -1) {
490
+ const a = e.type.toLowerCase();
491
+ if (a.search("mesh") > -1) {
492
492
  const t = e;
493
493
  if (Array.isArray(t.material)) {
494
- const a = [];
495
- t.material.forEach((r) => {
496
- a.push(rt(r));
497
- }), n.material = a;
494
+ const r = [];
495
+ t.material.forEach((i) => {
496
+ r.push(rt(i));
497
+ }), n.material = r;
498
498
  } else
499
499
  n.material = rt(t.material);
500
- } else if (i.search("points") > -1) {
500
+ } else if (a.search("points") > -1) {
501
501
  const t = e;
502
502
  if (Array.isArray(t.material)) {
503
- const a = [];
504
- t.material.forEach((r) => {
505
- a.push(rt(r));
506
- }), n.material = a;
503
+ const r = [];
504
+ t.material.forEach((i) => {
505
+ r.push(rt(i));
506
+ }), n.material = r;
507
507
  } else
508
508
  n.material = rt(t.material);
509
- } else if (i.search("line") > -1) {
509
+ } else if (a.search("line") > -1) {
510
510
  const t = e;
511
511
  if (Array.isArray(t.material)) {
512
- const a = [];
513
- t.material.forEach((r) => {
514
- a.push(rt(r));
515
- }), n.material = a;
512
+ const r = [];
513
+ t.material.forEach((i) => {
514
+ r.push(rt(i));
515
+ }), n.material = r;
516
516
  } else
517
517
  n.material = rt(t.material);
518
518
  } else
519
- i.search("camera") > -1 ? e.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
519
+ a.search("camera") > -1 ? e.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
520
520
  fov: e.fov,
521
521
  zoom: e.zoom,
522
522
  near: e.near,
@@ -533,7 +533,7 @@ function kt(e) {
533
533
  right: e.right,
534
534
  top: e.top,
535
535
  bottom: e.bottom
536
- }) : i.search("light") > -1 && (n.lightInfo = {
536
+ }) : a.search("light") > -1 && (n.lightInfo = {
537
537
  color: e.color,
538
538
  intensity: e.intensity,
539
539
  decay: e.decay,
@@ -546,53 +546,53 @@ function kt(e) {
546
546
  });
547
547
  return n;
548
548
  }
549
- function Ni(e, n) {
550
- const i = n.split(".");
551
- switch (i.length) {
549
+ function Na(e, n) {
550
+ const a = n.split(".");
551
+ switch (a.length) {
552
552
  case 1:
553
- return e[i[0]];
553
+ return e[a[0]];
554
554
  case 2:
555
- return e[i[0]][i[1]];
555
+ return e[a[0]][a[1]];
556
556
  case 3:
557
- return e[i[0]][i[1]][i[2]];
557
+ return e[a[0]][a[1]][a[2]];
558
558
  case 4:
559
- return e[i[0]][i[1]][i[2]][i[3]];
559
+ return e[a[0]][a[1]][a[2]][a[3]];
560
560
  case 5:
561
- return e[i[0]][i[1]][i[2]][i[3]][i[4]];
561
+ return e[a[0]][a[1]][a[2]][a[3]][a[4]];
562
562
  case 6:
563
- return e[i[0]][i[1]][i[2]][i[3]][i[4]][i[5]];
563
+ return e[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
564
564
  }
565
565
  }
566
- function k(e, n, i) {
566
+ function k(e, n, a) {
567
567
  const t = n.split(".");
568
568
  switch (t.length) {
569
569
  case 1:
570
- e[t[0]] = i;
570
+ e[t[0]] = a;
571
571
  break;
572
572
  case 2:
573
- e[t[0]][t[1]] = i;
573
+ e[t[0]][t[1]] = a;
574
574
  break;
575
575
  case 3:
576
- e[t[0]][t[1]][t[2]] = i;
576
+ e[t[0]][t[1]][t[2]] = a;
577
577
  break;
578
578
  case 4:
579
- e[t[0]][t[1]][t[2]][t[3]] = i;
579
+ e[t[0]][t[1]][t[2]][t[3]] = a;
580
580
  break;
581
581
  case 5:
582
- e[t[0]][t[1]][t[2]][t[3]][t[4]] = i;
582
+ e[t[0]][t[1]][t[2]][t[3]][t[4]] = a;
583
583
  break;
584
584
  }
585
585
  }
586
- function wt(e) {
587
- return new Promise((n, i) => {
586
+ function Ot(e) {
587
+ return new Promise((n, a) => {
588
588
  const t = new Image();
589
589
  t.onload = () => {
590
- const a = new dn(t);
591
- a.wrapS = Yt, a.wrapT = Yt, a.needsUpdate = !0, n(a);
592
- }, t.onerror = i, t.src = e;
590
+ const r = new hn(t);
591
+ r.wrapS = Vt, r.wrapT = Vt, r.needsUpdate = !0, n(r);
592
+ }, t.onerror = a, t.src = e;
593
593
  });
594
594
  }
595
- class Ia extends Mt {
595
+ class Li extends _t {
596
596
  scene = void 0;
597
597
  renderer = void 0;
598
598
  getObject(n) {
@@ -603,43 +603,43 @@ class Ia extends Mt {
603
603
  });
604
604
  }
605
605
  setObject(n) {
606
- const i = kt(n);
606
+ const a = jt(n);
607
607
  this.app.send({
608
608
  event: "setObject",
609
609
  target: "editor",
610
- data: i
610
+ data: a
611
611
  });
612
612
  }
613
- requestMethod(n, i, t, a) {
613
+ requestMethod(n, a, t, r) {
614
614
  this.app.send({
615
615
  event: "requestMethod",
616
616
  target: "app",
617
617
  data: {
618
618
  uuid: n,
619
- key: i,
619
+ key: a,
620
620
  value: t,
621
- subitem: a
621
+ subitem: r
622
622
  }
623
623
  });
624
624
  }
625
- updateObject(n, i, t) {
625
+ updateObject(n, a, t) {
626
626
  this.app.send({
627
627
  event: "updateObject",
628
628
  target: "app",
629
629
  data: {
630
630
  uuid: n,
631
- key: i,
631
+ key: a,
632
632
  value: t
633
633
  }
634
634
  });
635
635
  }
636
- createTexture(n, i, t) {
636
+ createTexture(n, a, t) {
637
637
  this.app.send({
638
638
  event: "createTexture",
639
639
  target: "app",
640
640
  data: {
641
641
  uuid: n,
642
- key: i,
642
+ key: a,
643
643
  value: t
644
644
  }
645
645
  });
@@ -647,35 +647,35 @@ class Ia extends Mt {
647
647
  setScene(n) {
648
648
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
649
649
  return;
650
- Ai(), Dn(this.scene);
651
- const i = Nn(this.scene);
650
+ Aa(), Dn(this.scene);
651
+ const a = Nn(this.scene);
652
652
  this.app.send({
653
653
  event: "setScene",
654
654
  target: "editor",
655
- data: i
655
+ data: a
656
656
  });
657
657
  }
658
658
  addCamera(n) {
659
659
  if (!this.app.debugEnabled)
660
660
  return;
661
- const i = kt(n);
661
+ const a = jt(n);
662
662
  this.app.send({
663
663
  event: "addCamera",
664
664
  target: "editor",
665
- data: i
665
+ data: a
666
666
  });
667
667
  }
668
668
  removeCamera(n) {
669
669
  if (!this.app.debugEnabled)
670
670
  return;
671
- const i = kt(n);
671
+ const a = jt(n);
672
672
  this.app.send({
673
673
  event: "removeCamera",
674
674
  target: "editor",
675
- data: i
675
+ data: a
676
676
  });
677
677
  }
678
- handleApp(n, i, t) {
678
+ handleApp(n, a, t) {
679
679
  switch (t.event) {
680
680
  case "getObject":
681
681
  B.dispatchEvent({ type: F.GET_OBJECT, value: t.data });
@@ -691,7 +691,7 @@ class Ia extends Mt {
691
691
  break;
692
692
  }
693
693
  }
694
- handleEditor(n, i, t) {
694
+ handleEditor(n, a, t) {
695
695
  switch (t.event) {
696
696
  case "setObject":
697
697
  B.dispatchEvent({ type: F.SET_OBJECT, value: t.data });
@@ -708,8 +708,8 @@ class Ia extends Mt {
708
708
  }
709
709
  }
710
710
  // Renderer
711
- resize(n, i) {
712
- this.renderer?.setSize(n, i);
711
+ resize(n, a) {
712
+ this.renderer?.setSize(n, a);
713
713
  }
714
714
  set dpr(n) {
715
715
  this.renderer?.setPixelRatio(Ze(1, 2, n));
@@ -727,7 +727,7 @@ class Ia extends Mt {
727
727
  return this.renderer !== void 0 ? this.renderer?.domElement : null;
728
728
  }
729
729
  }
730
- class Na extends Mt {
730
+ class Bi extends _t {
731
731
  bindCBs;
732
732
  buttonCBs;
733
733
  pane = void 0;
@@ -738,23 +738,23 @@ class Na extends Mt {
738
738
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
739
739
  }
740
740
  createGUI() {
741
- this.pane = new Oi({ title: "GUI" }), this.pane.registerPlugin(Mi);
741
+ this.pane = new Oa({ title: "GUI" }), this.pane.registerPlugin(Ma);
742
742
  }
743
743
  dispose() {
744
744
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
745
745
  }
746
- addFolder(n, i = void 0, t = void 0) {
746
+ addFolder(n, a = void 0, t = void 0) {
747
747
  if (this.app.editor)
748
748
  return this.pane === void 0 && this.createGUI(), (t !== void 0 ? t : this.pane).addFolder({
749
749
  title: n,
750
- ...i
750
+ ...a
751
751
  });
752
752
  this.app.send({
753
753
  event: "addFolder",
754
754
  target: "app",
755
755
  data: {
756
756
  name: n,
757
- params: i,
757
+ params: a,
758
758
  parent: t
759
759
  }
760
760
  });
@@ -763,57 +763,57 @@ class Na extends Mt {
763
763
  return `debug_${Math.max(this.appCallbacks, this.editorCallbacks)}`;
764
764
  }
765
765
  // Binding
766
- bind(n, i, t, a = void 0) {
767
- const r = this.bindID, c = t.onChange !== void 0 ? t.onChange : jn;
768
- this.bindCBs.set(r, c), this.app.editor ? (this.pane === void 0 && this.createGUI(), (a !== void 0 ? a : this.pane).addBinding(n, i, t).on("change", (u) => {
766
+ bind(n, a, t, r = void 0) {
767
+ const i = this.bindID, l = t.onChange !== void 0 ? t.onChange : Ut;
768
+ this.bindCBs.set(i, l), this.app.editor ? (this.pane === void 0 && this.createGUI(), (r !== void 0 ? r : this.pane).addBinding(n, a, t).on("change", (d) => {
769
769
  this.app.send({
770
770
  event: "updateBind",
771
771
  target: "app",
772
772
  data: {
773
- id: r,
774
- value: u.value
773
+ id: i,
774
+ value: d.value
775
775
  }
776
776
  });
777
777
  }), this.editorCallbacks++) : (this.app.send({
778
778
  event: "bindObject",
779
779
  target: "app",
780
780
  data: {
781
- id: r,
782
- name: i,
781
+ id: i,
782
+ name: a,
783
783
  params: t,
784
- parent: a
784
+ parent: r
785
785
  }
786
786
  }), this.appCallbacks++);
787
787
  }
788
- triggerBind(n, i) {
788
+ triggerBind(n, a) {
789
789
  const t = this.bindCBs.get(n);
790
- t !== void 0 ? t(i) : console.warn(`No callback for: ${n}`, i);
790
+ t !== void 0 ? t(a) : console.warn(`No callback for: ${n}`, a);
791
791
  }
792
792
  // Buttons
793
- button(n, i, t = void 0) {
794
- const a = this.bindID;
795
- this.buttonCBs.set(a, i), this.app.editor ? (this.pane === void 0 && this.createGUI(), (t !== void 0 ? t : this.pane).addButton({ title: n }).on("click", () => {
793
+ button(n, a, t = void 0) {
794
+ const r = this.bindID;
795
+ this.buttonCBs.set(r, a), this.app.editor ? (this.pane === void 0 && this.createGUI(), (t !== void 0 ? t : this.pane).addButton({ title: n }).on("click", () => {
796
796
  this.app.send({
797
797
  event: "clickButton",
798
798
  target: "app",
799
799
  data: {
800
- id: a
800
+ id: r
801
801
  }
802
802
  });
803
803
  }), this.editorCallbacks++) : (this.app.send({
804
804
  event: "addButton",
805
805
  target: "app",
806
806
  data: {
807
- id: a,
807
+ id: r,
808
808
  name: n,
809
- callback: i,
809
+ callback: a,
810
810
  parent: t
811
811
  }
812
812
  }), this.appCallbacks++);
813
813
  }
814
814
  triggerButton(n) {
815
- const i = this.buttonCBs.get(n);
816
- i !== void 0 && i();
815
+ const a = this.buttonCBs.get(n);
816
+ a !== void 0 && a();
817
817
  }
818
818
  // Inspector
819
819
  createInspector() {
@@ -821,31 +821,31 @@ class Na extends Mt {
821
821
  }
822
822
  clearInspector() {
823
823
  const n = this.inspectorFolder.children.length - 1;
824
- for (let i = n; i > -1; --i)
825
- this.inspectorFolder.remove(this.inspectorFolder.children[i]);
824
+ for (let a = n; a > -1; --a)
825
+ this.inspectorFolder.remove(this.inspectorFolder.children[a]);
826
826
  }
827
- handleApp(n, i, t) {
828
- const a = i;
827
+ handleApp(n, a, t) {
828
+ const r = a;
829
829
  switch (t.event) {
830
830
  case "addFolder":
831
- a.addFolder(t.data.name, t.data.params, t.data.parent);
831
+ r.addFolder(t.data.name, t.data.params, t.data.parent);
832
832
  break;
833
833
  case "bindObject":
834
- a.bind(t.data.name, t.data.params, t.data.parent);
834
+ r.bind(t.data.name, t.data.params, t.data.parent);
835
835
  break;
836
836
  case "updateBind":
837
- a.triggerBind(t.data.id, t.data.value);
837
+ r.triggerBind(t.data.id, t.data.value);
838
838
  break;
839
839
  case "addButton":
840
- a.button(t.data.name, t.data.callback, t.data.parent);
840
+ r.button(t.data.name, t.data.callback, t.data.parent);
841
841
  break;
842
842
  case "clickButton":
843
- a.triggerButton(t.data.id);
843
+ r.triggerButton(t.data.id);
844
844
  break;
845
845
  }
846
846
  }
847
847
  }
848
- var Ft = { exports: {} }, ut = {};
848
+ var $t = { exports: {} }, dt = {};
849
849
  /**
850
850
  * @license React
851
851
  * react-jsx-runtime.production.min.js
@@ -855,25 +855,25 @@ var Ft = { exports: {} }, ut = {};
855
855
  * This source code is licensed under the MIT license found in the
856
856
  * LICENSE file in the root directory of this source tree.
857
857
  */
858
- var Qt;
859
- function Li() {
860
- if (Qt)
861
- return ut;
862
- Qt = 1;
863
- var e = An, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
864
- function c(l, u, h) {
865
- var f, m = {}, y = null, W = null;
866
- h !== void 0 && (y = "" + h), u.key !== void 0 && (y = "" + u.key), u.ref !== void 0 && (W = u.ref);
867
- for (f in u)
868
- t.call(u, f) && !r.hasOwnProperty(f) && (m[f] = u[f]);
869
- if (l && l.defaultProps)
870
- for (f in u = l.defaultProps, u)
871
- m[f] === void 0 && (m[f] = u[f]);
872
- return { $$typeof: n, type: l, key: y, ref: W, props: m, _owner: a.current };
858
+ var tn;
859
+ function La() {
860
+ if (tn)
861
+ return dt;
862
+ tn = 1;
863
+ var e = kn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
864
+ function l(c, d, h) {
865
+ var f, m = {}, y = null, Y = null;
866
+ h !== void 0 && (y = "" + h), d.key !== void 0 && (y = "" + d.key), d.ref !== void 0 && (Y = d.ref);
867
+ for (f in d)
868
+ t.call(d, f) && !i.hasOwnProperty(f) && (m[f] = d[f]);
869
+ if (c && c.defaultProps)
870
+ for (f in d = c.defaultProps, d)
871
+ m[f] === void 0 && (m[f] = d[f]);
872
+ return { $$typeof: n, type: c, key: y, ref: Y, props: m, _owner: r.current };
873
873
  }
874
- return ut.Fragment = i, ut.jsx = c, ut.jsxs = c, ut;
874
+ return dt.Fragment = a, dt.jsx = l, dt.jsxs = l, dt;
875
875
  }
876
- var dt = {};
876
+ var ht = {};
877
877
  /**
878
878
  * @license React
879
879
  * react-jsx-runtime.development.js
@@ -883,14 +883,14 @@ var dt = {};
883
883
  * This source code is licensed under the MIT license found in the
884
884
  * LICENSE file in the root directory of this source tree.
885
885
  */
886
- var en;
887
- function Bi() {
888
- return en || (en = 1, process.env.NODE_ENV !== "production" && function() {
889
- var e = An, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), T = Symbol.iterator, Y = "@@iterator";
890
- function R(s) {
886
+ var nn;
887
+ function Ba() {
888
+ return nn || (nn = 1, process.env.NODE_ENV !== "production" && function() {
889
+ var e = kn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), T = Symbol.iterator, W = "@@iterator";
890
+ function P(s) {
891
891
  if (s === null || typeof s != "object")
892
892
  return null;
893
- var p = T && s[T] || s[Y];
893
+ var p = T && s[T] || s[W];
894
894
  return typeof p == "function" ? p : null;
895
895
  }
896
896
  var M = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -911,14 +911,14 @@ function Bi() {
911
911
  V.unshift("Warning: " + p), Function.prototype.apply.call(console[s], console, V);
912
912
  }
913
913
  }
914
- var te = !1, ie = !1, Se = !1, K = !1, ge = !1, ue;
915
- ue = Symbol.for("react.module.reference");
914
+ var te = !1, ie = !1, Se = !1, K = !1, ve = !1, he;
915
+ he = Symbol.for("react.module.reference");
916
916
  function _e(s) {
917
- return !!(typeof s == "string" || typeof s == "function" || s === t || s === r || ge || s === a || s === h || s === f || K || s === W || te || ie || Se || typeof s == "object" && s !== null && (s.$$typeof === y || s.$$typeof === m || s.$$typeof === c || s.$$typeof === l || s.$$typeof === u || // This needs to include all possible module reference object
917
+ return !!(typeof s == "string" || typeof s == "function" || s === t || s === i || ve || s === r || s === h || s === f || K || s === Y || te || ie || Se || typeof s == "object" && s !== null && (s.$$typeof === y || s.$$typeof === m || s.$$typeof === l || s.$$typeof === c || s.$$typeof === d || // This needs to include all possible module reference object
918
918
  // types supported by any Flight configuration anywhere since
919
919
  // we don't know which Flight build this will end up being used
920
920
  // with.
921
- s.$$typeof === ue || s.getModuleId !== void 0));
921
+ s.$$typeof === he || s.getModuleId !== void 0));
922
922
  }
923
923
  function Te(s, p, b) {
924
924
  var C = s.displayName;
@@ -940,11 +940,11 @@ function Bi() {
940
940
  switch (s) {
941
941
  case t:
942
942
  return "Fragment";
943
- case i:
943
+ case a:
944
944
  return "Portal";
945
- case r:
945
+ case i:
946
946
  return "Profiler";
947
- case a:
947
+ case r:
948
948
  return "StrictMode";
949
949
  case h:
950
950
  return "Suspense";
@@ -953,13 +953,13 @@ function Bi() {
953
953
  }
954
954
  if (typeof s == "object")
955
955
  switch (s.$$typeof) {
956
- case l:
956
+ case c:
957
957
  var p = s;
958
958
  return be(p) + ".Consumer";
959
- case c:
959
+ case l:
960
960
  var b = s;
961
961
  return be(b._context) + ".Provider";
962
- case u:
962
+ case d:
963
963
  return Te(s, s.render, "ForwardRef");
964
964
  case m:
965
965
  var C = s.displayName || null;
@@ -979,7 +979,7 @@ function Bi() {
979
979
  function Fe() {
980
980
  }
981
981
  Fe.__reactDisabledLog = !0;
982
- function ae() {
982
+ function re() {
983
983
  {
984
984
  if (E === 0) {
985
985
  we = console.log, Re = console.info, je = console.warn, Pe = console.error, Ae = console.group, De = console.groupCollapsed, Be = console.groupEnd;
@@ -1038,7 +1038,7 @@ function Bi() {
1038
1038
  }
1039
1039
  }
1040
1040
  var Ye = M.ReactCurrentDispatcher, Ge;
1041
- function fe(s, p, b) {
1041
+ function pe(s, p, b) {
1042
1042
  {
1043
1043
  if (Ge === void 0)
1044
1044
  try {
@@ -1069,7 +1069,7 @@ function Bi() {
1069
1069
  var U = Error.prepareStackTrace;
1070
1070
  Error.prepareStackTrace = void 0;
1071
1071
  var V;
1072
- V = Ye.current, Ye.current = null, ae();
1072
+ V = Ye.current, Ye.current = null, re();
1073
1073
  try {
1074
1074
  if (p) {
1075
1075
  var j = function() {
@@ -1105,29 +1105,29 @@ function Bi() {
1105
1105
  } catch (Ne) {
1106
1106
  if (Ne && C && typeof Ne.stack == "string") {
1107
1107
  for (var A = Ne.stack.split(`
1108
- `), pe = C.stack.split(`
1109
- `), ee = A.length - 1, ne = pe.length - 1; ee >= 1 && ne >= 0 && A[ee] !== pe[ne]; )
1108
+ `), me = C.stack.split(`
1109
+ `), Q = A.length - 1, ne = me.length - 1; Q >= 1 && ne >= 0 && A[Q] !== me[ne]; )
1110
1110
  ne--;
1111
- for (; ee >= 1 && ne >= 0; ee--, ne--)
1112
- if (A[ee] !== pe[ne]) {
1113
- if (ee !== 1 || ne !== 1)
1111
+ for (; Q >= 1 && ne >= 0; Q--, ne--)
1112
+ if (A[Q] !== me[ne]) {
1113
+ if (Q !== 1 || ne !== 1)
1114
1114
  do
1115
- if (ee--, ne--, ne < 0 || A[ee] !== pe[ne]) {
1115
+ if (Q--, ne--, ne < 0 || A[Q] !== me[ne]) {
1116
1116
  var Ee = `
1117
- ` + A[ee].replace(" at new ", " at ");
1117
+ ` + A[Q].replace(" at new ", " at ");
1118
1118
  return s.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", s.displayName)), typeof s == "function" && v.set(s, Ee), Ee;
1119
1119
  }
1120
- while (ee >= 1 && ne >= 0);
1120
+ while (Q >= 1 && ne >= 0);
1121
1121
  break;
1122
1122
  }
1123
1123
  }
1124
1124
  } finally {
1125
1125
  g = !1, Ye.current = V, Oe(), Error.prepareStackTrace = U;
1126
1126
  }
1127
- var nt = s ? s.displayName || s.name : "", zt = nt ? fe(nt) : "";
1128
- return typeof s == "function" && v.set(s, zt), zt;
1127
+ var nt = s ? s.displayName || s.name : "", Gt = nt ? pe(nt) : "";
1128
+ return typeof s == "function" && v.set(s, Gt), Gt;
1129
1129
  }
1130
- function re(s, p, b) {
1130
+ function se(s, p, b) {
1131
1131
  return D(s, !1);
1132
1132
  }
1133
1133
  function O(s) {
@@ -1140,17 +1140,17 @@ function Bi() {
1140
1140
  if (typeof s == "function")
1141
1141
  return D(s, O(s));
1142
1142
  if (typeof s == "string")
1143
- return fe(s);
1143
+ return pe(s);
1144
1144
  switch (s) {
1145
1145
  case h:
1146
- return fe("Suspense");
1146
+ return pe("Suspense");
1147
1147
  case f:
1148
- return fe("SuspenseList");
1148
+ return pe("SuspenseList");
1149
1149
  }
1150
1150
  if (typeof s == "object")
1151
1151
  switch (s.$$typeof) {
1152
- case u:
1153
- return re(s.render);
1152
+ case d:
1153
+ return se(s.render);
1154
1154
  case m:
1155
1155
  return w(s.type, p, b);
1156
1156
  case y: {
@@ -1163,13 +1163,13 @@ function Bi() {
1163
1163
  }
1164
1164
  return "";
1165
1165
  }
1166
- var L = Object.prototype.hasOwnProperty, se = {}, oe = M.ReactDebugCurrentFrame;
1167
- function P(s) {
1166
+ var L = Object.prototype.hasOwnProperty, oe = {}, ce = M.ReactDebugCurrentFrame;
1167
+ function R(s) {
1168
1168
  if (s) {
1169
1169
  var p = s._owner, b = w(s.type, s._source, p ? p.type : null);
1170
- oe.setExtraStackFrame(b);
1170
+ ce.setExtraStackFrame(b);
1171
1171
  } else
1172
- oe.setExtraStackFrame(null);
1172
+ ce.setExtraStackFrame(null);
1173
1173
  }
1174
1174
  function G(s, p, b, C, U) {
1175
1175
  {
@@ -1179,20 +1179,20 @@ function Bi() {
1179
1179
  var A = void 0;
1180
1180
  try {
1181
1181
  if (typeof s[j] != "function") {
1182
- var pe = Error((C || "React class") + ": " + b + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1183
- throw pe.name = "Invariant Violation", pe;
1182
+ var me = Error((C || "React class") + ": " + b + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1183
+ throw me.name = "Invariant Violation", me;
1184
1184
  }
1185
1185
  A = s[j](p, j, C, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1186
- } catch (ee) {
1187
- A = ee;
1186
+ } catch (Q) {
1187
+ A = Q;
1188
1188
  }
1189
- A && !(A instanceof Error) && (P(U), $("%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", b, j, typeof A), P(null)), A instanceof Error && !(A.message in se) && (se[A.message] = !0, P(U), $("Failed %s type: %s", b, A.message), P(null));
1189
+ A && !(A instanceof Error) && (R(U), $("%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", b, j, typeof A), R(null)), A instanceof Error && !(A.message in oe) && (oe[A.message] = !0, R(U), $("Failed %s type: %s", b, A.message), R(null));
1190
1190
  }
1191
1191
  }
1192
1192
  }
1193
- var Q = Array.isArray;
1193
+ var J = Array.isArray;
1194
1194
  function Ie(s) {
1195
- return Q(s);
1195
+ return J(s);
1196
1196
  }
1197
1197
  function et(s) {
1198
1198
  {
@@ -1200,28 +1200,28 @@ function Bi() {
1200
1200
  return b;
1201
1201
  }
1202
1202
  }
1203
- function gt(s) {
1203
+ function vt(s) {
1204
1204
  try {
1205
- return vt(s), !1;
1205
+ return bt(s), !1;
1206
1206
  } catch {
1207
1207
  return !0;
1208
1208
  }
1209
1209
  }
1210
- function vt(s) {
1210
+ function bt(s) {
1211
1211
  return "" + s;
1212
1212
  }
1213
- function bt(s) {
1214
- if (gt(s))
1215
- return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", et(s)), vt(s);
1213
+ function yt(s) {
1214
+ if (vt(s))
1215
+ return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", et(s)), bt(s);
1216
1216
  }
1217
- var $e = M.ReactCurrentOwner, ot = {
1217
+ var $e = M.ReactCurrentOwner, ct = {
1218
1218
  key: !0,
1219
1219
  ref: !0,
1220
1220
  __self: !0,
1221
1221
  __source: !0
1222
- }, lt, yt, tt;
1222
+ }, lt, xt, tt;
1223
1223
  tt = {};
1224
- function _t(s) {
1224
+ function Tt(s) {
1225
1225
  if (L.call(s, "ref")) {
1226
1226
  var p = Object.getOwnPropertyDescriptor(s, "ref").get;
1227
1227
  if (p && p.isReactWarning)
@@ -1229,7 +1229,7 @@ function Bi() {
1229
1229
  }
1230
1230
  return s.ref !== void 0;
1231
1231
  }
1232
- function Tt(s) {
1232
+ function Rt(s) {
1233
1233
  if (L.call(s, "key")) {
1234
1234
  var p = Object.getOwnPropertyDescriptor(s, "key").get;
1235
1235
  if (p && p.isReactWarning)
@@ -1237,7 +1237,7 @@ function Bi() {
1237
1237
  }
1238
1238
  return s.key !== void 0;
1239
1239
  }
1240
- function xt(s, p) {
1240
+ function Ct(s, p) {
1241
1241
  if (typeof s.ref == "string" && $e.current && p && $e.current.stateNode !== p) {
1242
1242
  var b = N($e.current.type);
1243
1243
  tt[b] || ($('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', N($e.current.type), s.ref), tt[b] = !0);
@@ -1254,10 +1254,10 @@ function Bi() {
1254
1254
  });
1255
1255
  }
1256
1256
  }
1257
- function Ht(s, p) {
1257
+ function Yt(s, p) {
1258
1258
  {
1259
1259
  var b = function() {
1260
- yt || (yt = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1260
+ xt || (xt = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1261
1261
  };
1262
1262
  b.isReactWarning = !0, Object.defineProperty(s, "ref", {
1263
1263
  get: b,
@@ -1296,24 +1296,24 @@ function Bi() {
1296
1296
  };
1297
1297
  function x(s, p, b, C, U) {
1298
1298
  {
1299
- var V, j = {}, A = null, pe = null;
1300
- b !== void 0 && (bt(b), A = "" + b), Tt(p) && (bt(p.key), A = "" + p.key), _t(p) && (pe = p.ref, xt(p, U));
1299
+ var V, j = {}, A = null, me = null;
1300
+ b !== void 0 && (yt(b), A = "" + b), Rt(p) && (yt(p.key), A = "" + p.key), Tt(p) && (me = p.ref, Ct(p, U));
1301
1301
  for (V in p)
1302
- L.call(p, V) && !ot.hasOwnProperty(V) && (j[V] = p[V]);
1302
+ L.call(p, V) && !ct.hasOwnProperty(V) && (j[V] = p[V]);
1303
1303
  if (s && s.defaultProps) {
1304
- var ee = s.defaultProps;
1305
- for (V in ee)
1306
- j[V] === void 0 && (j[V] = ee[V]);
1304
+ var Q = s.defaultProps;
1305
+ for (V in Q)
1306
+ j[V] === void 0 && (j[V] = Q[V]);
1307
1307
  }
1308
- if (A || pe) {
1308
+ if (A || me) {
1309
1309
  var ne = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
1310
- A && Ue(j, ne), pe && Ht(j, ne);
1310
+ A && Ue(j, ne), me && Yt(j, ne);
1311
1311
  }
1312
- return o(s, A, pe, U, C, $e.current, j);
1312
+ return o(s, A, me, U, C, $e.current, j);
1313
1313
  }
1314
1314
  }
1315
1315
  var _ = M.ReactCurrentOwner, H = M.ReactDebugCurrentFrame;
1316
- function Z(s) {
1316
+ function X(s) {
1317
1317
  if (s) {
1318
1318
  var p = s._owner, b = w(s.type, s._source, p ? p.type : null);
1319
1319
  H.setExtraStackFrame(b);
@@ -1322,10 +1322,10 @@ function Bi() {
1322
1322
  }
1323
1323
  var xe;
1324
1324
  xe = !1;
1325
- function de(s) {
1325
+ function fe(s) {
1326
1326
  return typeof s == "object" && s !== null && s.$$typeof === n;
1327
1327
  }
1328
- function Rt() {
1328
+ function Pt() {
1329
1329
  {
1330
1330
  if (_.current) {
1331
1331
  var s = N(_.current.type);
@@ -1337,7 +1337,7 @@ Check the render method of \`` + s + "`.";
1337
1337
  return "";
1338
1338
  }
1339
1339
  }
1340
- function Pt(s) {
1340
+ function At(s) {
1341
1341
  {
1342
1342
  if (s !== void 0) {
1343
1343
  var p = s.fileName.replace(/^.*[\\\/]/, ""), b = s.lineNumber;
@@ -1348,10 +1348,10 @@ Check your code at ` + p + ":" + b + ".";
1348
1348
  return "";
1349
1349
  }
1350
1350
  }
1351
- var ct = {};
1351
+ var ut = {};
1352
1352
  function Me(s) {
1353
1353
  {
1354
- var p = Rt();
1354
+ var p = Pt();
1355
1355
  if (!p) {
1356
1356
  var b = typeof s == "string" ? s : s.displayName || s.name;
1357
1357
  b && (p = `
@@ -1367,11 +1367,11 @@ Check the top-level render call using <` + b + ">.");
1367
1367
  return;
1368
1368
  s._store.validated = !0;
1369
1369
  var b = Me(p);
1370
- if (ct[b])
1370
+ if (ut[b])
1371
1371
  return;
1372
- ct[b] = !0;
1372
+ ut[b] = !0;
1373
1373
  var C = "";
1374
- s && s._owner && s._owner !== _.current && (C = " It was passed a child from " + N(s._owner.type) + "."), Z(s), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, C), Z(null);
1374
+ s && s._owner && s._owner !== _.current && (C = " It was passed a child from " + N(s._owner.type) + "."), X(s), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, C), X(null);
1375
1375
  }
1376
1376
  }
1377
1377
  function Ve(s, p) {
@@ -1381,15 +1381,15 @@ Check the top-level render call using <` + b + ">.");
1381
1381
  if (Ie(s))
1382
1382
  for (var b = 0; b < s.length; b++) {
1383
1383
  var C = s[b];
1384
- de(C) && Ce(C, p);
1384
+ fe(C) && Ce(C, p);
1385
1385
  }
1386
- else if (de(s))
1386
+ else if (fe(s))
1387
1387
  s._store && (s._store.validated = !0);
1388
1388
  else if (s) {
1389
- var U = R(s);
1389
+ var U = P(s);
1390
1390
  if (typeof U == "function" && U !== s.entries)
1391
1391
  for (var V = U.call(s), j; !(j = V.next()).done; )
1392
- de(j.value) && Ce(j.value, p);
1392
+ fe(j.value) && Ce(j.value, p);
1393
1393
  }
1394
1394
  }
1395
1395
  }
@@ -1401,7 +1401,7 @@ Check the top-level render call using <` + b + ">.");
1401
1401
  var b;
1402
1402
  if (typeof p == "function")
1403
1403
  b = p.propTypes;
1404
- else if (typeof p == "object" && (p.$$typeof === u || // Note: Memo only checks outer props here.
1404
+ else if (typeof p == "object" && (p.$$typeof === d || // Note: Memo only checks outer props here.
1405
1405
  // Inner props are checked in the reconciler.
1406
1406
  p.$$typeof === m))
1407
1407
  b = p.propTypes;
@@ -1423,11 +1423,11 @@ Check the top-level render call using <` + b + ">.");
1423
1423
  for (var p = Object.keys(s.props), b = 0; b < p.length; b++) {
1424
1424
  var C = p[b];
1425
1425
  if (C !== "children" && C !== "key") {
1426
- Z(s), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Z(null);
1426
+ X(s), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), X(null);
1427
1427
  break;
1428
1428
  }
1429
1429
  }
1430
- s.ref !== null && (Z(s), $("Invalid attribute `ref` supplied to `React.Fragment`."), Z(null));
1430
+ s.ref !== null && (X(s), $("Invalid attribute `ref` supplied to `React.Fragment`."), X(null));
1431
1431
  }
1432
1432
  }
1433
1433
  function Ke(s, p, b, C, U, V) {
@@ -1436,10 +1436,10 @@ Check the top-level render call using <` + b + ">.");
1436
1436
  if (!j) {
1437
1437
  var A = "";
1438
1438
  (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (A += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1439
- var pe = Pt(U);
1440
- pe ? A += pe : A += Rt();
1441
- var ee;
1442
- s === null ? ee = "null" : Ie(s) ? ee = "array" : s !== void 0 && s.$$typeof === n ? (ee = "<" + (N(s.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof s, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, A);
1439
+ var me = At(U);
1440
+ me ? A += me : A += Pt();
1441
+ var Q;
1442
+ s === null ? Q = "null" : Ie(s) ? Q = "array" : s !== void 0 && s.$$typeof === n ? (Q = "<" + (N(s.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof s, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, A);
1443
1443
  }
1444
1444
  var ne = x(s, p, b, U, V);
1445
1445
  if (ne == null)
@@ -1467,19 +1467,19 @@ Check the top-level render call using <` + b + ">.");
1467
1467
  return Ke(s, p, b, !1);
1468
1468
  }
1469
1469
  var zn = Hn, Yn = Un;
1470
- dt.Fragment = t, dt.jsx = zn, dt.jsxs = Yn;
1471
- }()), dt;
1470
+ ht.Fragment = t, ht.jsx = zn, ht.jsxs = Yn;
1471
+ }()), ht;
1472
1472
  }
1473
- process.env.NODE_ENV === "production" ? Ft.exports = Li() : Ft.exports = Bi();
1474
- var d = Ft.exports;
1473
+ process.env.NODE_ENV === "production" ? $t.exports = La() : $t.exports = Ba();
1474
+ var u = $t.exports;
1475
1475
  function Ln(e) {
1476
- return e.title.search("<") > -1 ? /* @__PURE__ */ d.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: e.title } }) : /* @__PURE__ */ d.jsx("button", { children: e.title });
1476
+ return e.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: e.title } }) : /* @__PURE__ */ u.jsx("button", { children: e.title });
1477
1477
  }
1478
- const Fi = /* @__PURE__ */ d.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1479
- /* @__PURE__ */ d.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1480
- /* @__PURE__ */ d.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1481
- /* @__PURE__ */ d.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1482
- ] }), $i = /* @__PURE__ */ d.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ d.jsx(
1478
+ const Fa = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1479
+ /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1480
+ /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1481
+ /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1482
+ ] }), $a = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1483
1483
  "path",
1484
1484
  {
1485
1485
  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
@@ -1487,46 +1487,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
1487
1487
  C11,8.22,10.74,8,10.43,8z`
1488
1488
  }
1489
1489
  ) });
1490
- function Ui(e) {
1491
- return /* @__PURE__ */ d.jsx(kn.Item, { value: e.title, children: /* @__PURE__ */ d.jsxs("div", { children: [
1492
- $i,
1493
- /* @__PURE__ */ d.jsx("span", { children: e.title }),
1494
- /* @__PURE__ */ d.jsx("button", { className: "closeIcon", onClick: () => {
1490
+ function Ua(e) {
1491
+ return /* @__PURE__ */ u.jsx(jn.Item, { value: e.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1492
+ $a,
1493
+ /* @__PURE__ */ u.jsx("span", { children: e.title }),
1494
+ /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
1495
1495
  e.onDelete(e.index);
1496
- }, children: Fi })
1496
+ }, children: Fa })
1497
1497
  ] }) }, e.title);
1498
1498
  }
1499
- function Hi(e) {
1500
- const [n, i] = X(!1), [t, a] = X(e.options), r = (h) => {
1501
- e.onDragComplete(h), a(h);
1502
- }, c = (h) => {
1499
+ function Ha(e) {
1500
+ const [n, a] = ee(!1), [t, r] = ee(e.options), i = (h) => {
1501
+ e.onDragComplete(h), r(h);
1502
+ }, l = (h) => {
1503
1503
  const f = [...t];
1504
- f.splice(h, 1), r(f);
1505
- }, l = [];
1504
+ f.splice(h, 1), i(f);
1505
+ }, c = [];
1506
1506
  t.forEach((h, f) => {
1507
- l.push(/* @__PURE__ */ d.jsx(Ui, { index: f, title: h, onDelete: c }, h));
1507
+ c.push(/* @__PURE__ */ u.jsx(Ua, { index: f, title: h, onDelete: l }, h));
1508
1508
  });
1509
- let u = "dropdown draggable";
1510
- return e.subdropdown && (u += " subdropdown"), /* @__PURE__ */ d.jsxs("div", { className: u, onMouseEnter: () => i(!0), onMouseLeave: () => i(!1), children: [
1511
- /* @__PURE__ */ d.jsx(Ln, { title: e.title }),
1512
- /* @__PURE__ */ d.jsx(kn.Group, { axis: "y", values: t, onReorder: r, style: { visibility: n ? "visible" : "hidden" }, children: l })
1509
+ let d = "dropdown draggable";
1510
+ return e.subdropdown && (d += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1511
+ /* @__PURE__ */ u.jsx(Ln, { title: e.title }),
1512
+ /* @__PURE__ */ u.jsx(jn.Group, { axis: "y", values: t, onReorder: i, style: { visibility: n ? "visible" : "hidden" }, children: c })
1513
1513
  ] });
1514
1514
  }
1515
- function zi(e) {
1516
- const [n, i] = X(!1), t = [];
1517
- e.options.map((r, c) => {
1518
- e.onSelect !== void 0 && (r.onSelect = e.onSelect), t.push(/* @__PURE__ */ d.jsx(Yi, { option: r }, c));
1515
+ function za(e) {
1516
+ const [n, a] = ee(!1), t = [];
1517
+ e.options.map((i, l) => {
1518
+ e.onSelect !== void 0 && (i.onSelect = e.onSelect), t.push(/* @__PURE__ */ u.jsx(Ya, { option: i }, l));
1519
1519
  });
1520
- let a = "dropdown";
1521
- return e.subdropdown && (a += " subdropdown"), /* @__PURE__ */ d.jsxs(
1520
+ let r = "dropdown";
1521
+ return e.subdropdown && (r += " subdropdown"), /* @__PURE__ */ u.jsxs(
1522
1522
  "div",
1523
1523
  {
1524
- className: a,
1525
- onMouseEnter: () => i(!0),
1526
- onMouseLeave: () => i(!1),
1524
+ className: r,
1525
+ onMouseEnter: () => a(!0),
1526
+ onMouseLeave: () => a(!1),
1527
1527
  children: [
1528
- /* @__PURE__ */ d.jsx(Ln, { title: e.title }),
1529
- /* @__PURE__ */ d.jsx(
1528
+ /* @__PURE__ */ u.jsx(Ln, { title: e.title }),
1529
+ /* @__PURE__ */ u.jsx(
1530
1530
  "ul",
1531
1531
  {
1532
1532
  style: { visibility: n ? "visible" : "hidden" },
@@ -1537,26 +1537,26 @@ function zi(e) {
1537
1537
  }
1538
1538
  );
1539
1539
  }
1540
- function Yi(e) {
1541
- const { option: n } = e, [i, t] = X("");
1542
- let a;
1540
+ function Ya(e) {
1541
+ const { option: n } = e, [a, t] = ee("");
1542
+ let r;
1543
1543
  switch (n.type) {
1544
1544
  case "draggable":
1545
- a = /* @__PURE__ */ d.jsx(
1546
- Hi,
1545
+ r = /* @__PURE__ */ u.jsx(
1546
+ Ha,
1547
1547
  {
1548
1548
  title: n.title,
1549
1549
  options: n.value,
1550
- onDragComplete: (r) => {
1551
- n.onDragComplete !== void 0 && n.onDragComplete(r);
1550
+ onDragComplete: (i) => {
1551
+ n.onDragComplete !== void 0 && n.onDragComplete(i);
1552
1552
  },
1553
1553
  subdropdown: !0
1554
1554
  }
1555
1555
  );
1556
1556
  break;
1557
1557
  case "dropdown":
1558
- a = /* @__PURE__ */ d.jsx(
1559
- zi,
1558
+ r = /* @__PURE__ */ u.jsx(
1559
+ za,
1560
1560
  {
1561
1561
  title: n.title,
1562
1562
  options: n.value,
@@ -1566,76 +1566,76 @@ function Yi(e) {
1566
1566
  );
1567
1567
  break;
1568
1568
  case "option":
1569
- a = /* @__PURE__ */ d.jsx(
1569
+ r = /* @__PURE__ */ u.jsx(
1570
1570
  "button",
1571
1571
  {
1572
1572
  onClick: () => {
1573
- n.onSelect !== void 0 && n.onSelect(n.value), n.selectable && (i !== n.title ? t(n.title) : t(""));
1573
+ n.onSelect !== void 0 && n.onSelect(n.value), n.selectable && (a !== n.title ? t(n.title) : t(""));
1574
1574
  },
1575
1575
  children: n.title
1576
1576
  }
1577
1577
  );
1578
1578
  break;
1579
1579
  }
1580
- return /* @__PURE__ */ d.jsx("li", { className: i === n.title ? "selected" : "", children: a }, Ti());
1580
+ return /* @__PURE__ */ u.jsx("li", { className: a === n.title ? "selected" : "", children: r }, Ta());
1581
1581
  }
1582
- function La(e, n, i) {
1583
- function t(r) {
1584
- switch (n.forEach((c) => {
1585
- c.callback(e, c.remote, r);
1586
- }), r.event) {
1582
+ function Fi(e, n, a) {
1583
+ function t(i) {
1584
+ switch (n.forEach((l) => {
1585
+ l.callback(e, l.remote, i);
1586
+ }), i.event) {
1587
1587
  case "custom":
1588
- B.dispatchEvent({ type: F.CUSTOM, value: r.data });
1588
+ B.dispatchEvent({ type: F.CUSTOM, value: i.data });
1589
1589
  break;
1590
1590
  }
1591
1591
  }
1592
- function a(r) {
1593
- switch (i.forEach((c) => {
1594
- c.callback(e, c.remote, r);
1595
- }), r.event) {
1592
+ function r(i) {
1593
+ switch (a.forEach((l) => {
1594
+ l.callback(e, l.remote, i);
1595
+ }), i.event) {
1596
1596
  case "custom":
1597
- B.dispatchEvent({ type: F.CUSTOM, value: r.data });
1597
+ B.dispatchEvent({ type: F.CUSTOM, value: i.data });
1598
1598
  break;
1599
1599
  }
1600
1600
  }
1601
- e.listen = (r) => {
1602
- r.target === "editor" ? a(r) : t(r);
1601
+ e.listen = (i) => {
1602
+ i.target === "editor" ? r(i) : t(i);
1603
1603
  };
1604
1604
  }
1605
- function Ut(e) {
1606
- const [n, i] = X(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1607
- return /* @__PURE__ */ d.jsxs("div", { className: `accordion ${t ? "hide" : ""}`, children: [
1608
- /* @__PURE__ */ d.jsxs(
1605
+ function zt(e) {
1606
+ const [n, a] = ee(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1607
+ return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${t ? "hide" : ""}`, children: [
1608
+ /* @__PURE__ */ u.jsxs(
1609
1609
  "button",
1610
1610
  {
1611
1611
  className: "toggle",
1612
1612
  onClick: () => {
1613
- const a = !n;
1614
- e.onToggle !== void 0 && e.onToggle(a), i(a);
1613
+ const r = !n;
1614
+ e.onToggle !== void 0 && e.onToggle(r), a(r);
1615
1615
  },
1616
1616
  children: [
1617
- /* @__PURE__ */ d.jsx(
1617
+ /* @__PURE__ */ u.jsx(
1618
1618
  "p",
1619
1619
  {
1620
1620
  className: `status ${n ? "open" : ""}`,
1621
1621
  children: "Toggle"
1622
1622
  }
1623
1623
  ),
1624
- /* @__PURE__ */ d.jsx("p", { className: "label", children: Je(e.label) })
1624
+ /* @__PURE__ */ u.jsx("p", { className: "label", children: Je(e.label) })
1625
1625
  ]
1626
1626
  }
1627
1627
  ),
1628
1628
  e.button,
1629
- /* @__PURE__ */ d.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { children: e.children }) })
1629
+ /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: e.children }) })
1630
1630
  ] });
1631
1631
  }
1632
1632
  function Bn(e) {
1633
- const [n, i] = X(!1), t = e.child !== void 0 && e.child.children.length > 0, a = [];
1634
- return e.child !== void 0 && e.child.children.length > 0 && e.child.children.map((r) => {
1635
- a.push(/* @__PURE__ */ d.jsx(Bn, { child: r, three: e.three }, Math.random()));
1636
- }), /* @__PURE__ */ d.jsx(d.Fragment, { children: e.child !== void 0 && /* @__PURE__ */ d.jsxs("div", { className: "childObject", children: [
1637
- /* @__PURE__ */ d.jsxs("div", { className: "child", children: [
1638
- t ? /* @__PURE__ */ d.jsx(
1633
+ const [n, a] = ee(!1), t = e.child !== void 0 && e.child.children.length > 0, r = [];
1634
+ return e.child !== void 0 && e.child.children.length > 0 && e.child.children.map((i) => {
1635
+ r.push(/* @__PURE__ */ u.jsx(Bn, { child: i, three: e.three }, Math.random()));
1636
+ }), /* @__PURE__ */ u.jsx(u.Fragment, { children: e.child !== void 0 && /* @__PURE__ */ u.jsxs("div", { className: "childObject", children: [
1637
+ /* @__PURE__ */ u.jsxs("div", { className: "child", children: [
1638
+ t ? /* @__PURE__ */ u.jsx(
1639
1639
  "button",
1640
1640
  {
1641
1641
  className: "status",
@@ -1643,11 +1643,11 @@ function Bn(e) {
1643
1643
  backgroundPositionX: n ? "-14px" : "2px"
1644
1644
  },
1645
1645
  onClick: () => {
1646
- i(!n);
1646
+ a(!n);
1647
1647
  }
1648
1648
  }
1649
1649
  ) : null,
1650
- /* @__PURE__ */ d.jsx(
1650
+ /* @__PURE__ */ u.jsx(
1651
1651
  "button",
1652
1652
  {
1653
1653
  className: "name",
@@ -1655,56 +1655,103 @@ function Bn(e) {
1655
1655
  left: t ? "20px" : "5px"
1656
1656
  },
1657
1657
  onClick: () => {
1658
- e.child !== void 0 && (e.three.getObject(e.child.uuid), n || i(!0));
1658
+ e.child !== void 0 && (e.three.getObject(e.child.uuid), n || a(!0));
1659
1659
  },
1660
1660
  children: e.child.name.length > 0 ? `${e.child.name} (${e.child.type})` : `${e.child.type}::${e.child.uuid}`
1661
1661
  }
1662
1662
  ),
1663
- /* @__PURE__ */ d.jsx("div", { className: `icon ${ji(e.child)}` })
1663
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${ja(e.child)}` })
1664
1664
  ] }),
1665
- /* @__PURE__ */ d.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { className: "container", children: a }) })
1665
+ /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
1666
1666
  ] }, Math.random()) });
1667
1667
  }
1668
- function Gi(e) {
1668
+ function Ga(e) {
1669
1669
  const n = [];
1670
- return e.child?.children.map((i) => {
1671
- n.push(/* @__PURE__ */ d.jsx(Bn, { child: i, three: e.three }, Math.random()));
1672
- }), /* @__PURE__ */ d.jsx("div", { className: `scene ${e.class !== void 0 ? e.class : ""}`, children: n });
1670
+ return e.child?.children.map((a) => {
1671
+ n.push(/* @__PURE__ */ u.jsx(Bn, { child: a, three: e.three }, Math.random()));
1672
+ }), /* @__PURE__ */ u.jsx("div", { className: `scene ${e.class !== void 0 ? e.class : ""}`, children: n });
1673
1673
  }
1674
- const Vi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1675
- function Wi(e) {
1674
+ const Va = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1675
+ function Wa(e) {
1676
1676
  return "items" in e;
1677
1677
  }
1678
1678
  function Qe(e) {
1679
1679
  const n = [];
1680
- return e.items.forEach((i) => {
1681
- Wi(i) ? n.push(
1682
- /* @__PURE__ */ d.jsx(Qe, { title: Je(i.title), items: i.items }, Math.random())
1680
+ return e.items.forEach((a) => {
1681
+ Wa(a) ? n.push(
1682
+ /* @__PURE__ */ u.jsx(Qe, { title: Je(a.title), items: a.items }, Math.random())
1683
1683
  ) : n.push(
1684
- /* @__PURE__ */ d.jsx(
1685
- ft,
1684
+ /* @__PURE__ */ u.jsx(
1685
+ pt,
1686
1686
  {
1687
- title: i.title,
1688
- prop: i.prop,
1689
- value: i.value,
1690
- type: i.type,
1691
- min: i.min,
1692
- max: i.max,
1693
- step: i.step,
1694
- disabled: i.disabled,
1695
- options: i.options,
1696
- onChange: (t, a) => {
1697
- i.onChange !== void 0 && i.onChange(t, a);
1687
+ title: a.title,
1688
+ prop: a.prop,
1689
+ value: a.value,
1690
+ type: a.type,
1691
+ min: a.min,
1692
+ max: a.max,
1693
+ step: a.step,
1694
+ disabled: a.disabled,
1695
+ options: a.options,
1696
+ onChange: (t, r) => {
1697
+ a.onChange !== void 0 && a.onChange(t, r);
1698
1698
  }
1699
1699
  },
1700
1700
  Math.random()
1701
1701
  )
1702
1702
  );
1703
- }), /* @__PURE__ */ d.jsx(Ut, { label: e.title, open: e.expanded === !0, children: n });
1703
+ }), /* @__PURE__ */ u.jsx(zt, { label: e.title, open: e.expanded === !0, children: n });
1704
1704
  }
1705
- function qi(e) {
1705
+ function qa(e) {
1706
1706
  return !(e === "alphaHash" || e === "alphaToCoverage" || e === "attenuationDistance" || e === "blendAlpha" || e === "blendColor" || e === "blendDstAlpha" || e === "colorWrite" || e === "combine" || e === "defaultAttributeValues" || e === "depthFunc" || e === "forceSinglePass" || e === "glslVersion" || e === "linecap" || e === "linejoin" || e === "linewidth" || e === "normalMapType" || e === "precision" || e === "premultipliedAlpha" || e === "shadowSide" || e === "toneMapped" || e === "uniformsGroups" || e === "uniformsNeedUpdate" || e === "userData" || e === "vertexColors" || e === "version" || e === "wireframeLinecap" || e === "wireframeLinejoin" || e === "wireframeLinewidth" || e.slice(0, 4) === "clip" || e.slice(0, 7) === "polygon" || e.slice(0, 7) === "stencil" || e.slice(0, 2) === "is");
1707
1707
  }
1708
+ function Ka(e) {
1709
+ switch (e) {
1710
+ case "Alpha Map":
1711
+ return "alphaMap";
1712
+ case "Anisotropy Map":
1713
+ return "anisotropyMap";
1714
+ case "AO Map":
1715
+ return "aoMap";
1716
+ case "Bump Map":
1717
+ return "bumpMap";
1718
+ case "Clearcoat Map":
1719
+ return "clearcoatMap";
1720
+ case "Clearcoat Normal Map":
1721
+ return "clearcoatNormalMap";
1722
+ case "Clearcoat Roughness Map":
1723
+ return "clearcoatRoughnessMap";
1724
+ case "Displacement Map":
1725
+ return "displacementMap";
1726
+ case "Emissive Map":
1727
+ return "emissiveMap";
1728
+ case "Iridescence Map":
1729
+ return "iridescenceMap";
1730
+ case "Iridescence Thickness Map":
1731
+ return "iridescenceThicknessMap";
1732
+ case "Map":
1733
+ return "map";
1734
+ case "Matcap":
1735
+ return "matcap";
1736
+ case "Normal Map":
1737
+ return "normalMap";
1738
+ case "Roughness Map":
1739
+ return "roughnessMap";
1740
+ case "Sheen Color Map":
1741
+ return "sheenColorMap";
1742
+ case "Sheen Roughness Map":
1743
+ return "sheenRoughnessMap";
1744
+ case "Specular Color Map":
1745
+ return "specularColorMap";
1746
+ case "Specular Map Intensity":
1747
+ return "specularIntensityMap";
1748
+ case "Thickness Map":
1749
+ return "thicknessMap";
1750
+ case "Transmission Map":
1751
+ return "transmissionMap";
1752
+ }
1753
+ return e;
1754
+ }
1708
1755
  function z(e) {
1709
1756
  switch (e) {
1710
1757
  case "alphaMap":
@@ -1881,35 +1928,35 @@ function z(e) {
1881
1928
  function Fn(e) {
1882
1929
  return e.toLowerCase().search("intensity") > -1 || e === "anisotropyRotation" || e === "blendAlpha" || e === "bumpScale" || e === "clearcoatRoughness" || e === "displacementBias" || e === "displacementScale" || e === "metalness" || e === "opacity" || e === "reflectivity" || e === "refractionRatio" || e === "roughness" || e === "sheenRoughness" || e === "thickness";
1883
1930
  }
1884
- function Ki() {
1931
+ function Xa() {
1885
1932
  const e = document.createElement("input");
1886
- return e.type = "file", new Promise((n, i) => {
1933
+ return e.type = "file", new Promise((n, a) => {
1887
1934
  e.addEventListener("change", function() {
1888
1935
  if (e.files === null)
1889
- i();
1936
+ a();
1890
1937
  else {
1891
- const t = e.files[0], a = new FileReader();
1892
- a.onload = function(r) {
1893
- n(r.target.result);
1894
- }, a.readAsDataURL(t);
1938
+ const t = e.files[0], r = new FileReader();
1939
+ r.onload = function(i) {
1940
+ n(i.target.result);
1941
+ }, r.readAsDataURL(t);
1895
1942
  }
1896
1943
  }), e.click();
1897
1944
  });
1898
1945
  }
1899
- const Xi = [
1946
+ const Za = [
1900
1947
  {
1901
1948
  title: "Front",
1902
1949
  value: Vn
1903
1950
  },
1904
1951
  {
1905
1952
  title: "Back",
1906
- value: hn
1953
+ value: fn
1907
1954
  },
1908
1955
  {
1909
1956
  title: "Double",
1910
- value: fn
1957
+ value: pn
1911
1958
  }
1912
- ], Zi = [
1959
+ ], Ja = [
1913
1960
  {
1914
1961
  title: "No Blending",
1915
1962
  value: Wn
@@ -1934,165 +1981,165 @@ const Xi = [
1934
1981
  title: "Custom",
1935
1982
  value: Jn
1936
1983
  }
1937
- ], Ji = [
1984
+ ], Qa = [
1938
1985
  {
1939
1986
  title: "Add",
1940
1987
  value: Qn
1941
1988
  },
1942
1989
  {
1943
1990
  title: "Subtract",
1944
- value: ei
1991
+ value: ea
1945
1992
  },
1946
1993
  {
1947
1994
  title: "Reverse Subtract",
1948
- value: ti
1995
+ value: ta
1949
1996
  },
1950
1997
  {
1951
1998
  title: "Min",
1952
- value: ni
1999
+ value: na
1953
2000
  },
1954
2001
  {
1955
2002
  title: "Max",
1956
- value: ii
2003
+ value: aa
1957
2004
  }
1958
- ], Qi = [
2005
+ ], ei = [
1959
2006
  {
1960
2007
  title: "Zero",
1961
- valye: pn
2008
+ valye: mn
1962
2009
  },
1963
2010
  {
1964
2011
  title: "One",
1965
- valye: mn
2012
+ valye: gn
1966
2013
  },
1967
2014
  {
1968
2015
  title: "Src Color",
1969
- valye: gn
2016
+ valye: vn
1970
2017
  },
1971
2018
  {
1972
2019
  title: "One Minus Src Color",
1973
- valye: vn
2020
+ valye: bn
1974
2021
  },
1975
2022
  {
1976
2023
  title: "Src Alpha",
1977
- valye: bn
2024
+ valye: yn
1978
2025
  },
1979
2026
  {
1980
2027
  title: "One Minus Src Alpha",
1981
- valye: yn
2028
+ valye: xn
1982
2029
  },
1983
2030
  {
1984
2031
  title: "Dst Alpha",
1985
- valye: xn
2032
+ valye: Cn
1986
2033
  },
1987
2034
  {
1988
2035
  title: "One Minus Dst Alpha",
1989
- valye: Cn
2036
+ valye: En
1990
2037
  },
1991
2038
  {
1992
2039
  title: "Dst Color",
1993
- valye: En
2040
+ valye: Sn
1994
2041
  },
1995
2042
  {
1996
2043
  title: "One Minus Dst Color",
1997
- valye: Sn
2044
+ valye: wn
1998
2045
  },
1999
2046
  {
2000
2047
  title: "Src Alpha Saturate",
2001
- valye: ai
2048
+ valye: ia
2002
2049
  },
2003
2050
  {
2004
2051
  title: "Constant Color",
2005
- valye: wn
2052
+ valye: On
2006
2053
  },
2007
2054
  {
2008
2055
  title: "One Minus Constant Color",
2009
- valye: On
2056
+ valye: Mn
2010
2057
  },
2011
2058
  {
2012
2059
  title: "Constant Alpha",
2013
- valye: Mn
2060
+ valye: _n
2014
2061
  },
2015
2062
  {
2016
2063
  title: "One Minus Constant Alpha",
2017
- valye: _n
2064
+ valye: Tn
2018
2065
  }
2019
- ], ea = [
2066
+ ], ti = [
2020
2067
  {
2021
2068
  title: "Zero",
2022
- valye: pn
2069
+ valye: mn
2023
2070
  },
2024
2071
  {
2025
2072
  title: "One",
2026
- valye: mn
2073
+ valye: gn
2027
2074
  },
2028
2075
  {
2029
2076
  title: "Src Color",
2030
- valye: gn
2077
+ valye: vn
2031
2078
  },
2032
2079
  {
2033
2080
  title: "One Minus Src Color",
2034
- valye: vn
2081
+ valye: bn
2035
2082
  },
2036
2083
  {
2037
2084
  title: "Src Alpha",
2038
- valye: bn
2085
+ valye: yn
2039
2086
  },
2040
2087
  {
2041
2088
  title: "One Minus Src Alpha",
2042
- valye: yn
2089
+ valye: xn
2043
2090
  },
2044
2091
  {
2045
2092
  title: "Dst Alpha",
2046
- valye: xn
2093
+ valye: Cn
2047
2094
  },
2048
2095
  {
2049
2096
  title: "One Minus Dst Alpha",
2050
- valye: Cn
2097
+ valye: En
2051
2098
  },
2052
2099
  {
2053
2100
  title: "Dst Color",
2054
- valye: En
2101
+ valye: Sn
2055
2102
  },
2056
2103
  {
2057
2104
  title: "One Minus Dst Color",
2058
- valye: Sn
2105
+ valye: wn
2059
2106
  },
2060
2107
  {
2061
2108
  title: "Constant Color",
2062
- valye: wn
2109
+ valye: On
2063
2110
  },
2064
2111
  {
2065
2112
  title: "One Minus Constant Color",
2066
- valye: On
2113
+ valye: Mn
2067
2114
  },
2068
2115
  {
2069
2116
  title: "Constant Alpha",
2070
- valye: Mn
2117
+ valye: _n
2071
2118
  },
2072
2119
  {
2073
2120
  title: "One Minus Constant Alpha",
2074
- valye: _n
2121
+ valye: Tn
2075
2122
  }
2076
2123
  ];
2077
- function ht(e, n) {
2124
+ function ft(e, n) {
2078
2125
  e.needsUpdate = !0, e.type = "option", e.options = n;
2079
2126
  }
2080
- function ta(e, n, i, t) {
2127
+ function ni(e, n, a, t) {
2081
2128
  return {
2082
2129
  type: "boolean",
2083
2130
  title: z(e),
2084
2131
  prop: e,
2085
2132
  value: n,
2086
2133
  needsUpdate: !0,
2087
- onChange: (a, r) => {
2088
- t.updateObject(i.uuid, `material.${e}`, r), t.updateObject(i.uuid, "material.needsUpdate", !0);
2089
- const c = t.scene?.getObjectByProperty("uuid", i.uuid);
2090
- c !== void 0 && k(c, `material.${e}`, r);
2134
+ onChange: (r, i) => {
2135
+ t.updateObject(a.uuid, `material.${e}`, i), t.updateObject(a.uuid, "material.needsUpdate", !0);
2136
+ const l = t.scene?.getObjectByProperty("uuid", a.uuid);
2137
+ l !== void 0 && k(l, `material.${e}`, i);
2091
2138
  }
2092
2139
  };
2093
2140
  }
2094
- function na(e, n, i, t) {
2095
- const a = {
2141
+ function ai(e, n, a, t) {
2142
+ const r = {
2096
2143
  type: "number",
2097
2144
  title: z(e),
2098
2145
  prop: e,
@@ -2101,123 +2148,123 @@ function na(e, n, i, t) {
2101
2148
  max: void 0,
2102
2149
  step: 0.01,
2103
2150
  needsUpdate: !0,
2104
- onChange: (r, c) => {
2105
- t.updateObject(i.uuid, `material.${e}`, c), t.updateObject(i.uuid, "material.needsUpdate", !0);
2106
- const l = t.scene?.getObjectByProperty("uuid", i.uuid);
2107
- l !== void 0 && k(l, `material.${e}`, c);
2151
+ onChange: (i, l) => {
2152
+ t.updateObject(a.uuid, `material.${e}`, l), t.updateObject(a.uuid, "material.needsUpdate", !0);
2153
+ const c = t.scene?.getObjectByProperty("uuid", a.uuid);
2154
+ c !== void 0 && k(c, `material.${e}`, l);
2108
2155
  }
2109
2156
  };
2110
2157
  switch (e) {
2111
2158
  case "blending":
2112
- ht(a, Zi);
2159
+ ft(r, Ja);
2113
2160
  break;
2114
2161
  case "blendDst":
2115
- ht(a, ea);
2162
+ ft(r, ti);
2116
2163
  break;
2117
2164
  case "blendEquation":
2118
- ht(a, Ji);
2165
+ ft(r, Qa);
2119
2166
  break;
2120
2167
  case "blendSrc":
2121
- ht(a, Qi);
2168
+ ft(r, ei);
2122
2169
  break;
2123
2170
  case "side":
2124
- ht(a, Xi);
2171
+ ft(r, Za);
2125
2172
  break;
2126
2173
  }
2127
- return Fn(e) && (a.value = Number(n), a.type = "range", a.min = 0, a.max = 1, a.step = 0.01), a;
2174
+ return Fn(e) && (r.value = Number(n), r.type = "range", r.min = 0, r.max = 1, r.step = 0.01), r;
2128
2175
  }
2129
- function ia(e, n, i, t) {
2130
- const a = {
2176
+ function ii(e, n, a, t) {
2177
+ const r = {
2131
2178
  type: "string",
2132
2179
  title: z(e),
2133
2180
  prop: e,
2134
2181
  value: n,
2135
2182
  needsUpdate: !0,
2136
- onChange: (c, l) => {
2137
- t.updateObject(i.uuid, `material.${e}`, l), t.updateObject(i.uuid, "material.needsUpdate", !0);
2138
- const u = t.scene?.getObjectByProperty("uuid", i.uuid);
2139
- u !== void 0 && k(u, `material.${e}`, l);
2183
+ onChange: (l, c) => {
2184
+ t.updateObject(a.uuid, `material.${e}`, c), t.updateObject(a.uuid, "material.needsUpdate", !0);
2185
+ const d = t.scene?.getObjectByProperty("uuid", a.uuid);
2186
+ d !== void 0 && k(d, `material.${e}`, c);
2140
2187
  }
2141
2188
  };
2142
- return (e === "vertexShader" || e === "fragmentShader") && (a.disabled = !1, a.latest = a.value, a.onChange = (c, l) => {
2143
- a.latest = l;
2144
- }), a;
2189
+ return (e === "vertexShader" || e === "fragmentShader") && (r.disabled = !1, r.latest = r.value, r.onChange = (l, c) => {
2190
+ r.latest = c;
2191
+ }), r;
2145
2192
  }
2146
- function jt(e) {
2193
+ function Dt(e) {
2147
2194
  return e.x !== void 0 && e.y !== void 0 && e.z === void 0;
2148
2195
  }
2149
- function Dt(e) {
2196
+ function It(e) {
2150
2197
  return e.x !== void 0 && e.y !== void 0 && e.z !== void 0 && e.w === void 0;
2151
2198
  }
2152
- function It(e) {
2199
+ function Nt(e) {
2153
2200
  return e.x !== void 0 && e.y !== void 0 && e.z !== void 0 && e.w !== void 0;
2154
2201
  }
2155
- function aa(e, n, i, t) {
2156
- const a = [];
2202
+ function ri(e, n, a, t) {
2203
+ const r = [];
2157
2204
  if (n.isColor)
2158
2205
  return {
2159
2206
  title: z(e),
2160
2207
  prop: e,
2161
2208
  type: "color",
2162
2209
  value: n,
2163
- onChange: (r, c) => {
2164
- const l = new pt(c);
2165
- t.updateObject(i.uuid, `material.${e}`, l);
2166
- const u = t.scene?.getObjectByProperty("uuid", i.uuid);
2167
- u !== void 0 && k(u, `material.${e}`, l);
2210
+ onChange: (i, l) => {
2211
+ const c = new mt(l);
2212
+ t.updateObject(a.uuid, `material.${e}`, c);
2213
+ const d = t.scene?.getObjectByProperty("uuid", a.uuid);
2214
+ d !== void 0 && k(d, `material.${e}`, c);
2168
2215
  }
2169
2216
  };
2170
2217
  if (Array.isArray(n)) {
2171
- for (const r in n)
2172
- a.push({
2173
- title: `${r}`,
2174
- type: `${typeof n[r]}`,
2175
- value: n[r],
2176
- onChange: (c, l) => {
2177
- t.updateObject(i.uuid, `material.${e}`, l);
2178
- const u = t.scene?.getObjectByProperty("uuid", i.uuid);
2179
- u !== void 0 && k(u, `material.${e}`, l);
2218
+ for (const i in n)
2219
+ r.push({
2220
+ title: `${i}`,
2221
+ type: `${typeof n[i]}`,
2222
+ value: n[i],
2223
+ onChange: (l, c) => {
2224
+ t.updateObject(a.uuid, `material.${e}`, c);
2225
+ const d = t.scene?.getObjectByProperty("uuid", a.uuid);
2226
+ d !== void 0 && k(d, `material.${e}`, c);
2180
2227
  }
2181
2228
  });
2182
2229
  return {
2183
2230
  title: z(e),
2184
- items: a
2231
+ items: r
2185
2232
  };
2186
2233
  } else {
2187
- if (jt(n))
2234
+ if (Dt(n))
2188
2235
  return {
2189
2236
  title: z(e),
2190
2237
  prop: e,
2191
2238
  type: "vector2",
2192
2239
  value: n,
2193
- onChange: (r, c) => {
2194
- t.updateObject(i.uuid, `material.${e}`, c);
2195
- const l = t.scene?.getObjectByProperty("uuid", i.uuid);
2196
- l !== void 0 && k(l, `material.${e}`, c);
2240
+ onChange: (i, l) => {
2241
+ t.updateObject(a.uuid, `material.${e}`, l);
2242
+ const c = t.scene?.getObjectByProperty("uuid", a.uuid);
2243
+ c !== void 0 && k(c, `material.${e}`, l);
2197
2244
  }
2198
2245
  };
2199
- if (Dt(n))
2246
+ if (It(n))
2200
2247
  return {
2201
2248
  title: z(e),
2202
2249
  prop: e,
2203
2250
  type: "grid3",
2204
2251
  value: n,
2205
- onChange: (r, c) => {
2206
- t.updateObject(i.uuid, `material.${e}`, c);
2207
- const l = t.scene?.getObjectByProperty("uuid", i.uuid);
2208
- l !== void 0 && k(l, `material.${e}`, c);
2252
+ onChange: (i, l) => {
2253
+ t.updateObject(a.uuid, `material.${e}`, l);
2254
+ const c = t.scene?.getObjectByProperty("uuid", a.uuid);
2255
+ c !== void 0 && k(c, `material.${e}`, l);
2209
2256
  }
2210
2257
  };
2211
- if (It(n))
2258
+ if (Nt(n))
2212
2259
  return {
2213
2260
  title: z(e),
2214
2261
  prop: e,
2215
2262
  type: "grid4",
2216
2263
  value: n,
2217
- onChange: (r, c) => {
2218
- t.updateObject(i.uuid, `material.${e}`, c);
2219
- const l = t.scene?.getObjectByProperty("uuid", i.uuid);
2220
- l !== void 0 && k(l, `material.${e}`, c);
2264
+ onChange: (i, l) => {
2265
+ t.updateObject(a.uuid, `material.${e}`, l);
2266
+ const c = t.scene?.getObjectByProperty("uuid", a.uuid);
2267
+ c !== void 0 && k(c, `material.${e}`, l);
2221
2268
  }
2222
2269
  };
2223
2270
  if (n.src !== void 0)
@@ -2225,264 +2272,265 @@ function aa(e, n, i, t) {
2225
2272
  title: z(e),
2226
2273
  type: "image",
2227
2274
  value: n,
2228
- onChange: (r, c) => {
2229
- t.createTexture(i.uuid, `material.${r}`, c);
2230
- const l = t.scene?.getObjectByProperty("uuid", i.uuid);
2231
- l !== void 0 && wt(c).then((u) => {
2232
- k(l, `material.${r}`, u), k(l, "material.needsUpdate", !0);
2275
+ onChange: (i, l) => {
2276
+ const c = Ka(e);
2277
+ t.createTexture(a.uuid, `material.${c}`, l);
2278
+ const d = t.scene?.getObjectByProperty("uuid", a.uuid);
2279
+ d !== void 0 && Ot(l).then((h) => {
2280
+ k(d, `material.${c}`, h), k(d, "material.needsUpdate", !0);
2233
2281
  });
2234
2282
  }
2235
2283
  };
2236
2284
  switch (e) {
2237
2285
  case "defines":
2238
- for (const r in n)
2239
- a.push({
2240
- title: Je(`${r}`),
2286
+ for (const i in n)
2287
+ r.push({
2288
+ title: Je(`${i}`),
2241
2289
  type: "string",
2242
- value: n[r].toString(),
2290
+ value: n[i].toString(),
2243
2291
  disabled: !0
2244
2292
  });
2245
- if (a.length > 0)
2293
+ if (r.length > 0)
2246
2294
  return {
2247
2295
  title: z(e),
2248
- items: a
2296
+ items: r
2249
2297
  };
2250
2298
  break;
2251
2299
  case "extensions":
2252
- for (const r in n)
2253
- a.push({
2254
- title: Je(`${r}`),
2300
+ for (const i in n)
2301
+ r.push({
2302
+ title: Je(`${i}`),
2255
2303
  type: "boolean",
2256
- value: n[r],
2304
+ value: n[i],
2257
2305
  disabled: !0
2258
2306
  });
2259
- if (a.length > 0)
2307
+ if (r.length > 0)
2260
2308
  return {
2261
2309
  title: z(e),
2262
- items: a
2310
+ items: r
2263
2311
  };
2264
2312
  break;
2265
2313
  case "uniforms":
2266
- for (const r in n) {
2267
- const c = n[r].value, l = typeof c;
2268
- if (c.isColor)
2269
- a.push({
2270
- title: z(r),
2271
- prop: r,
2314
+ for (const i in n) {
2315
+ const l = n[i].value, c = typeof l;
2316
+ if (l.isColor)
2317
+ r.push({
2318
+ title: z(i),
2319
+ prop: i,
2272
2320
  type: "color",
2273
- value: c,
2274
- onChange: (u, h) => {
2275
- const f = new pt(h);
2276
- t.updateObject(i.uuid, `material.uniforms.${r}.value`, f);
2277
- const m = t.scene?.getObjectByProperty("uuid", i.uuid);
2278
- m !== void 0 && k(m, `material.uniforms.${r}.value`, f);
2321
+ value: l,
2322
+ onChange: (d, h) => {
2323
+ const f = new mt(h);
2324
+ t.updateObject(a.uuid, `material.uniforms.${i}.value`, f);
2325
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2326
+ m !== void 0 && k(m, `material.uniforms.${i}.value`, f);
2279
2327
  }
2280
2328
  });
2281
- else if (Array.isArray(c)) {
2282
- const u = [];
2283
- for (const h in c)
2284
- u.push({
2329
+ else if (Array.isArray(l)) {
2330
+ const d = [];
2331
+ for (const h in l)
2332
+ d.push({
2285
2333
  title: `${h}`,
2286
- type: `${typeof c[h]}`,
2287
- value: c[h],
2334
+ type: `${typeof l[h]}`,
2335
+ value: l[h],
2288
2336
  onChange: (f, m) => {
2289
- t.updateObject(i.uuid, `material.uniforms.${r}.value.${h}`, m);
2290
- const y = t.scene?.getObjectByProperty("uuid", i.uuid);
2291
- y !== void 0 && k(y, `material.uniforms.${r}.value.${h}`, m);
2337
+ t.updateObject(a.uuid, `material.uniforms.${i}.value.${h}`, m);
2338
+ const y = t.scene?.getObjectByProperty("uuid", a.uuid);
2339
+ y !== void 0 && k(y, `material.uniforms.${i}.value.${h}`, m);
2292
2340
  }
2293
2341
  });
2294
- a.push({
2295
- title: z(r),
2296
- items: u
2342
+ r.push({
2343
+ title: z(i),
2344
+ items: d
2297
2345
  });
2298
- } else if (jt(c))
2299
- a.push({
2300
- title: `${z(r)}`,
2301
- prop: r,
2346
+ } else if (Dt(l))
2347
+ r.push({
2348
+ title: `${z(i)}`,
2349
+ prop: i,
2302
2350
  type: "vector2",
2303
- value: c,
2304
- onChange: (u, h) => {
2305
- t.updateObject(i.uuid, `material.uniforms.${r}.value`, h);
2306
- const f = t.scene?.getObjectByProperty("uuid", i.uuid);
2307
- f !== void 0 && k(f, `material.uniforms.${r}.value`, h);
2351
+ value: l,
2352
+ onChange: (d, h) => {
2353
+ t.updateObject(a.uuid, `material.uniforms.${i}.value`, h);
2354
+ const f = t.scene?.getObjectByProperty("uuid", a.uuid);
2355
+ f !== void 0 && k(f, `material.uniforms.${i}.value`, h);
2308
2356
  }
2309
2357
  });
2310
- else if (Dt(c))
2311
- a.push({
2312
- title: `${z(r)}`,
2313
- prop: r,
2358
+ else if (It(l))
2359
+ r.push({
2360
+ title: `${z(i)}`,
2361
+ prop: i,
2314
2362
  type: "grid3",
2315
- value: c,
2316
- onChange: (u, h) => {
2317
- t.updateObject(i.uuid, `material.uniforms.${r}.value`, h);
2318
- const f = t.scene?.getObjectByProperty("uuid", i.uuid);
2319
- f !== void 0 && k(f, `material.uniforms.${r}.value`, h);
2363
+ value: l,
2364
+ onChange: (d, h) => {
2365
+ t.updateObject(a.uuid, `material.uniforms.${i}.value`, h);
2366
+ const f = t.scene?.getObjectByProperty("uuid", a.uuid);
2367
+ f !== void 0 && k(f, `material.uniforms.${i}.value`, h);
2320
2368
  }
2321
2369
  });
2322
- else if (It(c))
2323
- a.push({
2324
- title: `${z(r)}`,
2325
- prop: r,
2370
+ else if (Nt(l))
2371
+ r.push({
2372
+ title: `${z(i)}`,
2373
+ prop: i,
2326
2374
  type: "grid4",
2327
- value: c,
2328
- onChange: (u, h) => {
2329
- t.updateObject(i.uuid, `material.uniforms.${r}.value`, h);
2330
- const f = t.scene?.getObjectByProperty("uuid", i.uuid);
2331
- f !== void 0 && k(f, `material.uniforms.${r}.value`, h);
2375
+ value: l,
2376
+ onChange: (d, h) => {
2377
+ t.updateObject(a.uuid, `material.uniforms.${i}.value`, h);
2378
+ const f = t.scene?.getObjectByProperty("uuid", a.uuid);
2379
+ f !== void 0 && k(f, `material.uniforms.${i}.value`, h);
2332
2380
  }
2333
2381
  });
2334
- else if (l === "number") {
2335
- const u = {
2336
- title: z(r),
2337
- prop: r,
2382
+ else if (c === "number") {
2383
+ const d = {
2384
+ title: z(i),
2385
+ prop: i,
2338
2386
  type: "number",
2339
- value: c,
2387
+ value: l,
2340
2388
  step: 0.01,
2341
2389
  onChange: (h, f) => {
2342
- t.updateObject(i.uuid, `material.uniforms.${r}.value`, f);
2343
- const m = t.scene?.getObjectByProperty("uuid", i.uuid);
2344
- m !== void 0 && k(m, `material.uniforms.${r}.value`, f);
2390
+ t.updateObject(a.uuid, `material.uniforms.${i}.value`, f);
2391
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2392
+ m !== void 0 && k(m, `material.uniforms.${i}.value`, f);
2345
2393
  }
2346
2394
  };
2347
- Fn(r) && (u.type = "range", u.min = 0, u.max = 1), a.push(u);
2348
- } else if (l === "string")
2349
- a.push({
2350
- title: z(r),
2351
- prop: r,
2352
- type: l,
2353
- value: c,
2354
- onChange: (u, h) => {
2355
- t.updateObject(i.uuid, `material.uniforms.${r}.value`, h);
2356
- const f = t.scene?.getObjectByProperty("uuid", i.uuid);
2357
- f !== void 0 && k(f, `material.uniforms.${r}.value`, h);
2395
+ Fn(i) && (d.type = "range", d.min = 0, d.max = 1), r.push(d);
2396
+ } else if (c === "string")
2397
+ r.push({
2398
+ title: z(i),
2399
+ prop: i,
2400
+ type: c,
2401
+ value: l,
2402
+ onChange: (d, h) => {
2403
+ t.updateObject(a.uuid, `material.uniforms.${i}.value`, h);
2404
+ const f = t.scene?.getObjectByProperty("uuid", a.uuid);
2405
+ f !== void 0 && k(f, `material.uniforms.${i}.value`, h);
2358
2406
  }
2359
2407
  });
2360
- else if (c.src !== void 0)
2361
- a.push({
2362
- title: z(r),
2408
+ else if (l.src !== void 0)
2409
+ r.push({
2410
+ title: z(i),
2363
2411
  type: "image",
2364
- value: c.src,
2365
- onChange: (u, h) => {
2366
- const f = `material.uniforms.${r}.value`;
2367
- t.createTexture(i.uuid, f, h);
2368
- const m = t.scene?.getObjectByProperty("uuid", i.uuid);
2369
- m !== void 0 && wt(h).then((y) => {
2412
+ value: l.src,
2413
+ onChange: (d, h) => {
2414
+ const f = `material.uniforms.${i}.value`;
2415
+ t.createTexture(a.uuid, f, h);
2416
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2417
+ m !== void 0 && Ot(h).then((y) => {
2370
2418
  k(m, f, y), k(m, "material.needsUpdate", !0);
2371
2419
  });
2372
2420
  }
2373
2421
  });
2374
- else if (c.elements !== void 0)
2375
- a.push({
2376
- title: `${z(r)}`,
2377
- prop: r,
2378
- type: c.elements.length > 9 ? "grid4" : "grid3",
2379
- value: c,
2380
- onChange: (u, h) => {
2381
- t.updateObject(i.uuid, `material.uniforms.${r}.value`, h);
2382
- const f = t.scene?.getObjectByProperty("uuid", i.uuid);
2383
- f !== void 0 && k(f, `material.uniforms.${r}.value`, h);
2422
+ else if (l.elements !== void 0)
2423
+ r.push({
2424
+ title: `${z(i)}`,
2425
+ prop: i,
2426
+ type: l.elements.length > 9 ? "grid4" : "grid3",
2427
+ value: l,
2428
+ onChange: (d, h) => {
2429
+ t.updateObject(a.uuid, `material.uniforms.${i}.value`, h);
2430
+ const f = t.scene?.getObjectByProperty("uuid", a.uuid);
2431
+ f !== void 0 && k(f, `material.uniforms.${i}.value`, h);
2384
2432
  }
2385
2433
  });
2386
2434
  else {
2387
- const u = [], h = c;
2435
+ const d = [], h = l;
2388
2436
  for (const f in h) {
2389
- const m = f, y = h[f], W = typeof y, T = `material.uniforms.${r}.value.${m}`;
2390
- y.isColor ? u.push({
2437
+ const m = f, y = h[f], Y = typeof y, T = `material.uniforms.${i}.value.${m}`;
2438
+ y.isColor ? d.push({
2391
2439
  title: z(m),
2392
2440
  prop: m,
2393
2441
  type: "color",
2394
2442
  value: y,
2395
- onChange: (Y, R) => {
2396
- const M = new pt(R);
2397
- t.updateObject(i.uuid, T, M);
2398
- const $ = t.scene?.getObjectByProperty("uuid", i.uuid);
2443
+ onChange: (W, P) => {
2444
+ const M = new mt(P);
2445
+ t.updateObject(a.uuid, T, M);
2446
+ const $ = t.scene?.getObjectByProperty("uuid", a.uuid);
2399
2447
  $ !== void 0 && k($, T, M);
2400
2448
  }
2401
- }) : jt(y) ? u.push({
2449
+ }) : Dt(y) ? d.push({
2402
2450
  title: `${z(m)}`,
2403
2451
  prop: m,
2404
2452
  type: "vector2",
2405
2453
  value: y,
2406
- onChange: (Y, R) => {
2407
- t.updateObject(i.uuid, T, R);
2408
- const M = t.scene?.getObjectByProperty("uuid", i.uuid);
2409
- M !== void 0 && k(M, T, R);
2454
+ onChange: (W, P) => {
2455
+ t.updateObject(a.uuid, T, P);
2456
+ const M = t.scene?.getObjectByProperty("uuid", a.uuid);
2457
+ M !== void 0 && k(M, T, P);
2410
2458
  }
2411
- }) : Dt(y) ? u.push({
2459
+ }) : It(y) ? d.push({
2412
2460
  title: `${z(m)}`,
2413
2461
  prop: m,
2414
2462
  type: "vector3",
2415
2463
  value: y,
2416
- onChange: (Y, R) => {
2417
- t.updateObject(i.uuid, T, R);
2418
- const M = t.scene?.getObjectByProperty("uuid", i.uuid);
2419
- M !== void 0 && k(M, T, R);
2464
+ onChange: (W, P) => {
2465
+ t.updateObject(a.uuid, T, P);
2466
+ const M = t.scene?.getObjectByProperty("uuid", a.uuid);
2467
+ M !== void 0 && k(M, T, P);
2420
2468
  }
2421
- }) : It(y) ? u.push({
2469
+ }) : Nt(y) ? d.push({
2422
2470
  title: `${z(m)}`,
2423
2471
  prop: m,
2424
2472
  type: "vector4",
2425
2473
  value: y,
2426
- onChange: (Y, R) => {
2427
- t.updateObject(i.uuid, T, R);
2428
- const M = t.scene?.getObjectByProperty("uuid", i.uuid);
2429
- M !== void 0 && k(M, T, R);
2474
+ onChange: (W, P) => {
2475
+ t.updateObject(a.uuid, T, P);
2476
+ const M = t.scene?.getObjectByProperty("uuid", a.uuid);
2477
+ M !== void 0 && k(M, T, P);
2430
2478
  }
2431
- }) : W === "number" ? u.push({
2479
+ }) : Y === "number" ? d.push({
2432
2480
  title: z(m),
2433
2481
  prop: m,
2434
2482
  type: "number",
2435
2483
  value: y,
2436
2484
  step: 0.01,
2437
- onChange: (Y, R) => {
2438
- t.updateObject(i.uuid, T, R);
2439
- const M = t.scene?.getObjectByProperty("uuid", i.uuid);
2440
- M !== void 0 && k(M, T, R);
2485
+ onChange: (W, P) => {
2486
+ t.updateObject(a.uuid, T, P);
2487
+ const M = t.scene?.getObjectByProperty("uuid", a.uuid);
2488
+ M !== void 0 && k(M, T, P);
2441
2489
  }
2442
- }) : W === "string" ? u.push({
2490
+ }) : Y === "string" ? d.push({
2443
2491
  title: z(m),
2444
2492
  prop: m,
2445
2493
  type: "string",
2446
2494
  value: y,
2447
- onChange: (Y, R) => {
2448
- t.updateObject(i.uuid, T, R);
2449
- const M = t.scene?.getObjectByProperty("uuid", i.uuid);
2450
- M !== void 0 && k(M, T, R);
2495
+ onChange: (W, P) => {
2496
+ t.updateObject(a.uuid, T, P);
2497
+ const M = t.scene?.getObjectByProperty("uuid", a.uuid);
2498
+ M !== void 0 && k(M, T, P);
2451
2499
  }
2452
- }) : y.src !== void 0 ? u.push({
2500
+ }) : y.src !== void 0 ? d.push({
2453
2501
  title: z(m),
2454
2502
  type: "image",
2455
2503
  value: y.src,
2456
- onChange: (Y, R) => {
2457
- t.createTexture(i.uuid, T, R);
2458
- const M = t.scene?.getObjectByProperty("uuid", i.uuid);
2459
- M !== void 0 && wt(R).then(($) => {
2504
+ onChange: (W, P) => {
2505
+ t.createTexture(a.uuid, T, P);
2506
+ const M = t.scene?.getObjectByProperty("uuid", a.uuid);
2507
+ M !== void 0 && Ot(P).then(($) => {
2460
2508
  k(M, T, $), k(M, "material.needsUpdate", !0);
2461
2509
  });
2462
2510
  }
2463
- }) : y.elements !== void 0 && u.push({
2511
+ }) : y.elements !== void 0 && d.push({
2464
2512
  title: z(m),
2465
2513
  prop: m,
2466
2514
  type: y.elements.length > 9 ? "grid4" : "grid3",
2467
2515
  value: y,
2468
2516
  step: 0.01,
2469
- onChange: (Y, R) => {
2470
- t.updateObject(i.uuid, T, R);
2471
- const M = t.scene?.getObjectByProperty("uuid", i.uuid);
2472
- M !== void 0 && k(M, T, R);
2517
+ onChange: (W, P) => {
2518
+ t.updateObject(a.uuid, T, P);
2519
+ const M = t.scene?.getObjectByProperty("uuid", a.uuid);
2520
+ M !== void 0 && k(M, T, P);
2473
2521
  }
2474
2522
  });
2475
2523
  }
2476
- u.length > 0 && (u.sort((f, m) => f.title < m.title ? -1 : f.title > m.title ? 1 : 0), a.push({
2477
- title: Je(r),
2478
- items: u
2524
+ d.length > 0 && (d.sort((f, m) => f.title < m.title ? -1 : f.title > m.title ? 1 : 0), r.push({
2525
+ title: Je(i),
2526
+ items: d
2479
2527
  }));
2480
2528
  }
2481
2529
  }
2482
- if (a.sort((r, c) => r.title < c.title ? -1 : r.title > c.title ? 1 : 0), a.length > 0)
2530
+ if (r.sort((i, l) => i.title < l.title ? -1 : i.title > l.title ? 1 : 0), r.length > 0)
2483
2531
  return {
2484
2532
  title: z(e),
2485
- items: a
2533
+ items: r
2486
2534
  };
2487
2535
  break;
2488
2536
  default:
@@ -2491,81 +2539,97 @@ function aa(e, n, i, t) {
2491
2539
  }
2492
2540
  }
2493
2541
  }
2494
- function tn(e, n, i) {
2542
+ function an(e, n, a) {
2495
2543
  const t = [];
2496
- for (const a in e) {
2497
- if (!qi(a))
2544
+ for (const r in e) {
2545
+ if (!qa(r))
2498
2546
  continue;
2499
- const r = typeof e[a], c = e[a];
2500
- if (r === "boolean")
2501
- t.push(ta(a, c, n, i));
2502
- else if (r === "number")
2503
- t.push(na(a, c, n, i));
2504
- else if (r === "string")
2505
- t.push(ia(a, c, n, i));
2506
- else if (r === "object") {
2507
- const l = aa(a, c, n, i);
2508
- l !== void 0 && t.push(l);
2547
+ const i = typeof e[r], l = e[r];
2548
+ if (i === "boolean")
2549
+ t.push(ni(r, l, n, a));
2550
+ else if (i === "number")
2551
+ t.push(ai(r, l, n, a));
2552
+ else if (i === "string")
2553
+ t.push(ii(r, l, n, a));
2554
+ else if (i === "object") {
2555
+ const c = ri(r, l, n, a);
2556
+ c !== void 0 && t.push(c);
2509
2557
  } else
2510
- c !== void 0 && console.log("other:", a, r, c);
2558
+ l !== void 0 && console.log("other:", r, i, l);
2511
2559
  }
2512
- return t.sort((a, r) => a.title < r.title ? -1 : a.title > r.title ? 1 : 0), t.push({
2560
+ return t.sort((r, i) => r.title < i.title ? -1 : r.title > i.title ? 1 : 0), t.push({
2513
2561
  title: "Update Material",
2514
2562
  type: "button",
2515
2563
  onChange: () => {
2516
- i.updateObject(n.uuid, "material.needsUpdate", !0);
2564
+ a.updateObject(n.uuid, "material.needsUpdate", !0);
2517
2565
  }
2518
2566
  }), t;
2519
2567
  }
2520
- function ra(e, n) {
2521
- const i = e.material;
2522
- if (Array.isArray(i)) {
2523
- const t = [], a = i.length;
2524
- for (let r = 0; r < a; r++)
2568
+ function si(e, n) {
2569
+ const a = e.material;
2570
+ if (Array.isArray(a)) {
2571
+ const t = [], r = a.length;
2572
+ for (let i = 0; i < r; i++)
2525
2573
  t.push(
2526
- /* @__PURE__ */ d.jsx(
2574
+ /* @__PURE__ */ u.jsx(
2527
2575
  Qe,
2528
2576
  {
2529
- title: `Material ${r}`,
2530
- items: tn(i[r], e, n)
2577
+ title: `Material ${i}`,
2578
+ items: an(a[i], e, n)
2531
2579
  },
2532
- `Material ${r}`
2580
+ `Material ${i}`
2533
2581
  )
2534
2582
  );
2535
- return /* @__PURE__ */ d.jsx(d.Fragment, { children: t });
2583
+ return /* @__PURE__ */ u.jsx(u.Fragment, { children: t });
2536
2584
  } else
2537
- return /* @__PURE__ */ d.jsx(
2585
+ return /* @__PURE__ */ u.jsx(
2538
2586
  Qe,
2539
2587
  {
2540
2588
  title: "Material",
2541
- items: tn(i, e, n)
2589
+ items: an(a, e, n)
2542
2590
  }
2543
2591
  );
2544
2592
  }
2545
- function nn(e) {
2546
- const n = he(null), i = he(null), [t, a] = X(e.value), r = (c) => {
2547
- const l = c.target.value;
2548
- a(l), e.onChange !== void 0 && e.onChange(e.prop, l);
2549
- };
2593
+ function oi(e) {
2594
+ const [n, a] = ee(e.defaultValue);
2550
2595
  return ke(() => {
2551
- let c = !1, l = -1, u = 0, h = t;
2552
- const f = (T) => {
2553
- c = !0, u = h, l = T.clientX;
2554
- }, m = (T) => {
2555
- if (!c)
2596
+ let t = !1, r = -1, i = 0, l = e.defaultValue;
2597
+ const c = (y) => {
2598
+ t = !0, i = Number(e.input.current?.value), r = y.clientX, document.addEventListener("mouseup", h, !1), document.addEventListener("mousemove", d, !1), document.addEventListener("contextmenu", h, !1);
2599
+ }, d = (y) => {
2600
+ if (!t)
2556
2601
  return;
2557
- const Y = e.step !== void 0 ? e.step : 1, R = (T.clientX - l) * Y;
2558
- h = Number((u + R).toFixed(4)), e.min !== void 0 && (h = Math.max(h, e.min)), e.max !== void 0 && (h = Math.min(h, e.max)), n.current !== null && (n.current.value = h.toString()), e.type === "range" && i.current !== null && (i.current.value = h.toString()), e.onChange !== void 0 && e.onChange(e.prop, h);
2559
- }, y = () => {
2560
- c = !1;
2561
- }, W = () => {
2562
- c = !1;
2602
+ const Y = e.step !== void 0 ? e.step : 1, T = (y.clientX - r) * Y;
2603
+ l = Number((i + T).toFixed(4)), e.min !== void 0 && (l = Math.max(l, e.min)), e.max !== void 0 && (l = Math.min(l, e.max)), e.onChange !== void 0 && e.onChange(l), a(l);
2604
+ }, h = () => {
2605
+ t = !1, document.removeEventListener("mouseup", h), document.removeEventListener("mousemove", d), document.removeEventListener("contextmenu", h);
2606
+ }, f = (y) => {
2607
+ const Y = Number(y.target.value);
2608
+ a(Y);
2609
+ }, m = (y) => {
2610
+ const Y = Number(y.target.value);
2611
+ e.onChange !== void 0 && e.onChange(Y), a(Y);
2563
2612
  };
2564
- return e.labelRef.current?.addEventListener("mousedown", f, !1), document.addEventListener("mouseup", y, !1), document.addEventListener("mousemove", m, !1), document.addEventListener("contextmenu", W, !1), () => {
2565
- e.labelRef.current?.removeEventListener("mousedown", f), document.removeEventListener("mouseup", y), document.removeEventListener("mousemove", m), document.removeEventListener("contextmenu", W);
2613
+ return e.input.current?.addEventListener("input", f), e.label.current?.addEventListener("mousedown", c, !1), e.sliderRef !== void 0 && e.sliderRef.current?.addEventListener("input", m), () => {
2614
+ e.input.current?.removeEventListener("input", f), e.label.current?.removeEventListener("mousedown", c), e.sliderRef !== void 0 && e.sliderRef.current?.removeEventListener("input", m), document.removeEventListener("mouseup", h), document.removeEventListener("mousemove", d), document.removeEventListener("contextmenu", h);
2566
2615
  };
2567
- }, [t]), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2568
- e.type === "number" && /* @__PURE__ */ d.jsx(
2616
+ }, []), n;
2617
+ }
2618
+ function ot(e) {
2619
+ const n = ae(null), a = ae(null), t = oi({
2620
+ label: e.labelRef,
2621
+ input: n,
2622
+ sliderRef: a,
2623
+ defaultValue: e.value,
2624
+ min: e.min,
2625
+ max: e.max,
2626
+ step: e.step,
2627
+ onChange: (r) => {
2628
+ e.onChange !== void 0 && e.onChange(e.prop, r);
2629
+ }
2630
+ });
2631
+ return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2632
+ e.type === "number" && /* @__PURE__ */ u.jsx(
2569
2633
  "input",
2570
2634
  {
2571
2635
  alt: e.alt,
@@ -2577,12 +2641,28 @@ function nn(e) {
2577
2641
  max: e.max,
2578
2642
  step: e.step,
2579
2643
  disabled: e.disabled,
2580
- onChange: r
2644
+ onChange: (r) => {
2645
+ const i = Number(r.target.value);
2646
+ e.onChange !== void 0 && e.onChange(e.prop, i);
2647
+ }
2581
2648
  }
2582
2649
  ),
2583
- e.type === "range" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2584
- /* @__PURE__ */ d.jsx("input", { type: "text", value: t.toString(), onChange: r, disabled: e.disabled, ref: n, className: "min" }),
2585
- /* @__PURE__ */ d.jsx(
2650
+ e.type === "range" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2651
+ /* @__PURE__ */ u.jsx(
2652
+ "input",
2653
+ {
2654
+ type: "text",
2655
+ value: t.toString(),
2656
+ disabled: e.disabled,
2657
+ ref: n,
2658
+ className: "min",
2659
+ onChange: (r) => {
2660
+ const i = Number(r.target.value);
2661
+ e.onChange !== void 0 && e.onChange(e.prop, i);
2662
+ }
2663
+ }
2664
+ ),
2665
+ /* @__PURE__ */ u.jsx(
2586
2666
  "input",
2587
2667
  {
2588
2668
  disabled: e.disabled,
@@ -2591,75 +2671,75 @@ function nn(e) {
2591
2671
  min: e.min,
2592
2672
  max: e.max,
2593
2673
  step: e.step,
2594
- onChange: r,
2595
- ref: i
2674
+ ref: a,
2675
+ onChange: Ut
2596
2676
  }
2597
2677
  )
2598
2678
  ] })
2599
2679
  ] });
2600
2680
  }
2601
- function sa(e) {
2602
- const n = he(null), i = he(null), t = he(null), a = he(null), r = he(null), c = he(null), [l, u] = X(e.value), [h, f] = X({ min: e.min, max: e.max }), [m, y] = X(!1);
2603
- function W() {
2604
- m || (window.addEventListener("mousemove", Y), window.addEventListener("mouseup", T), window.addEventListener("mouseup", T), y(!0));
2681
+ function ci(e) {
2682
+ const n = ae(null), a = ae(null), t = ae(null), r = ae(null), i = ae(null), l = ae(null), [c, d] = ee(e.value), [h, f] = ee({ min: e.min, max: e.max }), [m, y] = ee(!1);
2683
+ function Y() {
2684
+ m || (window.addEventListener("mousemove", W), window.addEventListener("mouseup", T), window.addEventListener("mouseup", T), y(!0));
2605
2685
  }
2606
2686
  function T() {
2607
- window.removeEventListener("mousemove", Y), window.removeEventListener("mouseup", T), y(!1);
2687
+ window.removeEventListener("mousemove", W), window.removeEventListener("mouseup", T), y(!1);
2608
2688
  }
2609
- function Y(I) {
2610
- const te = r.current.getBoundingClientRect(), ie = Ze(0, 99, I.clientX - te.left) / 99, Se = Ze(0, 99, I.clientY - te.top) / 99, K = mt(Jt(h.min, h.max, ie), 3), ge = mt(Jt(h.min, h.max, Se), 3);
2611
- e.onChange({ target: { value: { x: K, y: ge } } }), u({ x: K, y: ge });
2689
+ function W(I) {
2690
+ const te = i.current.getBoundingClientRect(), ie = Ze(0, 99, I.clientX - te.left) / 99, Se = Ze(0, 99, I.clientY - te.top) / 99, K = gt(en(h.min, h.max, ie), 3), ve = gt(en(h.min, h.max, Se), 3);
2691
+ e.onChange({ target: { value: { x: K, y: ve } } }), d({ x: K, y: ve });
2612
2692
  }
2613
- function R(I) {
2614
- let te = l.x, ie = l.y;
2615
- I.target === n.current ? te = Number(I.target.value) : ie = Number(I.target.value), u({ x: te, y: ie });
2693
+ function P(I) {
2694
+ let te = c.x, ie = c.y;
2695
+ I.target === n.current ? te = Number(I.target.value) : ie = Number(I.target.value), d({ x: te, y: ie });
2616
2696
  }
2617
2697
  function M() {
2618
2698
  const I = Number(t.current.value);
2619
- f({ min: I, max: h.max }), (l.x < I || l.y < I) && u({ x: Ze(I, h.max, l.x), y: Ze(I, h.max, l.y) });
2699
+ f({ min: I, max: h.max }), (c.x < I || c.y < I) && d({ x: Ze(I, h.max, c.x), y: Ze(I, h.max, c.y) });
2620
2700
  }
2621
2701
  function $() {
2622
- const I = Number(a.current.value);
2623
- f({ min: h.min, max: I }), (l.x > I || l.y > I) && u({ x: Ze(h.min, I, l.x), y: Ze(h.min, I, l.y) });
2702
+ const I = Number(r.current.value);
2703
+ f({ min: h.min, max: I }), (c.x > I || c.y > I) && d({ x: Ze(h.min, I, c.x), y: Ze(h.min, I, c.y) });
2624
2704
  }
2625
2705
  return ke(() => {
2626
- const I = Zt(h.min, h.max, l.x), te = Zt(h.min, h.max, l.y);
2627
- c.current.style.left = `${I * 100}%`, c.current.style.top = `${te * 100}%`;
2628
- }, [h, l]), /* @__PURE__ */ d.jsxs("div", { className: "vector2", children: [
2629
- /* @__PURE__ */ d.jsxs("div", { className: "fields", children: [
2630
- /* @__PURE__ */ d.jsxs("div", { children: [
2631
- /* @__PURE__ */ d.jsx("label", { children: "X:" }),
2632
- /* @__PURE__ */ d.jsx(
2706
+ const I = Qt(h.min, h.max, c.x), te = Qt(h.min, h.max, c.y);
2707
+ l.current.style.left = `${I * 100}%`, l.current.style.top = `${te * 100}%`;
2708
+ }, [h, c]), /* @__PURE__ */ u.jsxs("div", { className: "vector2", children: [
2709
+ /* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
2710
+ /* @__PURE__ */ u.jsxs("div", { children: [
2711
+ /* @__PURE__ */ u.jsx("label", { children: "X:" }),
2712
+ /* @__PURE__ */ u.jsx(
2633
2713
  "input",
2634
2714
  {
2635
2715
  ref: n,
2636
2716
  type: "number",
2637
- value: l.x,
2717
+ value: c.x,
2638
2718
  min: h.min,
2639
2719
  max: h.max,
2640
2720
  step: 0.01,
2641
- onChange: R
2721
+ onChange: P
2642
2722
  }
2643
2723
  )
2644
2724
  ] }),
2645
- /* @__PURE__ */ d.jsxs("div", { children: [
2646
- /* @__PURE__ */ d.jsx("label", { children: "Y:" }),
2647
- /* @__PURE__ */ d.jsx(
2725
+ /* @__PURE__ */ u.jsxs("div", { children: [
2726
+ /* @__PURE__ */ u.jsx("label", { children: "Y:" }),
2727
+ /* @__PURE__ */ u.jsx(
2648
2728
  "input",
2649
2729
  {
2650
- ref: i,
2730
+ ref: a,
2651
2731
  type: "number",
2652
- value: l.y,
2732
+ value: c.y,
2653
2733
  min: h.min,
2654
2734
  max: h.max,
2655
2735
  step: 0.01,
2656
- onChange: R
2736
+ onChange: P
2657
2737
  }
2658
2738
  )
2659
2739
  ] }),
2660
- /* @__PURE__ */ d.jsxs("div", { children: [
2661
- /* @__PURE__ */ d.jsx("label", { children: "Min:" }),
2662
- /* @__PURE__ */ d.jsx(
2740
+ /* @__PURE__ */ u.jsxs("div", { children: [
2741
+ /* @__PURE__ */ u.jsx("label", { children: "Min:" }),
2742
+ /* @__PURE__ */ u.jsx(
2663
2743
  "input",
2664
2744
  {
2665
2745
  ref: t,
@@ -2670,12 +2750,12 @@ function sa(e) {
2670
2750
  }
2671
2751
  )
2672
2752
  ] }),
2673
- /* @__PURE__ */ d.jsxs("div", { children: [
2674
- /* @__PURE__ */ d.jsx("label", { children: "Max:" }),
2675
- /* @__PURE__ */ d.jsx(
2753
+ /* @__PURE__ */ u.jsxs("div", { children: [
2754
+ /* @__PURE__ */ u.jsx("label", { children: "Max:" }),
2755
+ /* @__PURE__ */ u.jsx(
2676
2756
  "input",
2677
2757
  {
2678
- ref: a,
2758
+ ref: r,
2679
2759
  type: "number",
2680
2760
  value: h.max,
2681
2761
  step: 0.01,
@@ -2684,186 +2764,190 @@ function sa(e) {
2684
2764
  )
2685
2765
  ] })
2686
2766
  ] }),
2687
- /* @__PURE__ */ d.jsxs("div", { className: "input", ref: r, onMouseDown: W, onMouseUp: T, children: [
2688
- /* @__PURE__ */ d.jsx("div", { className: "x" }),
2689
- /* @__PURE__ */ d.jsx("div", { className: "y" }),
2690
- /* @__PURE__ */ d.jsx("div", { className: "pt", ref: c })
2767
+ /* @__PURE__ */ u.jsxs("div", { className: "input", ref: i, onMouseDown: Y, onMouseUp: T, children: [
2768
+ /* @__PURE__ */ u.jsx("div", { className: "x" }),
2769
+ /* @__PURE__ */ u.jsx("div", { className: "y" }),
2770
+ /* @__PURE__ */ u.jsx("div", { className: "pt", ref: l })
2691
2771
  ] })
2692
2772
  ] });
2693
2773
  }
2694
- function oa(e) {
2695
- const [n, i] = X(e.value), t = (c) => {
2696
- const { alt: l, value: u } = c.target, h = { ...n };
2697
- h[l] = Number(u), console.log(l, h), i(h), e.onChange({ target: { value: h } });
2698
- }, a = (c) => {
2699
- const { alt: l, value: u } = c.target, h = Number(l), f = { ...n };
2700
- f.elements[h] = Number(u), i(f);
2701
- }, r = [];
2702
- if (e.value.elements === void 0) {
2703
- const c = n;
2704
- ["x", "y", "z"].forEach((u) => {
2705
- r.push(
2706
- /* @__PURE__ */ d.jsxs("div", { children: [
2707
- /* @__PURE__ */ d.jsx("label", { children: u.toUpperCase() }),
2708
- /* @__PURE__ */ d.jsx(
2709
- "input",
2774
+ function li(e) {
2775
+ const n = e.value.x !== void 0, a = [];
2776
+ if (n) {
2777
+ const t = de(() => e.value, []), r = (l, c) => {
2778
+ t[l] = c, e.onChange({ target: { value: t } });
2779
+ };
2780
+ ["x", "y", "z"].forEach((l) => {
2781
+ const c = ae(null);
2782
+ a.push(
2783
+ /* @__PURE__ */ u.jsxs("div", { children: [
2784
+ /* @__PURE__ */ u.jsx("label", { ref: c, children: l.toUpperCase() }),
2785
+ /* @__PURE__ */ u.jsx(
2786
+ ot,
2710
2787
  {
2711
- alt: u,
2788
+ value: t.x,
2712
2789
  type: "number",
2713
- value: c[u],
2790
+ prop: l,
2714
2791
  step: 0.01,
2715
- onChange: t
2792
+ labelRef: c,
2793
+ onChange: r
2716
2794
  }
2717
2795
  )
2718
- ] }, u)
2796
+ ] }, l)
2719
2797
  );
2720
2798
  });
2721
2799
  } else {
2722
- const c = n;
2723
- for (let l = 0; l < 9; l++) {
2724
- const u = (l + 1).toString();
2725
- r.push(
2726
- /* @__PURE__ */ d.jsxs("div", { children: [
2727
- /* @__PURE__ */ d.jsx("label", { children: u }),
2728
- /* @__PURE__ */ d.jsx(
2729
- "input",
2800
+ const t = de(() => e.value, []), r = (i, l) => {
2801
+ const c = Number(i);
2802
+ t.elements[c] = l, e.onChange({ target: { value: t } });
2803
+ };
2804
+ for (let i = 0; i < 9; i++) {
2805
+ const l = ae(null);
2806
+ a.push(
2807
+ /* @__PURE__ */ u.jsxs("div", { children: [
2808
+ /* @__PURE__ */ u.jsx("label", { ref: l, children: i + 1 }),
2809
+ /* @__PURE__ */ u.jsx(
2810
+ ot,
2730
2811
  {
2731
- alt: l.toString(),
2812
+ value: t.elements[i],
2732
2813
  type: "number",
2733
- value: c.elements[l],
2814
+ prop: i.toString(),
2734
2815
  step: 0.01,
2735
- onChange: a
2816
+ labelRef: l,
2817
+ onChange: r
2736
2818
  }
2737
2819
  )
2738
- ] }, u)
2820
+ ] }, i.toString())
2739
2821
  );
2740
2822
  }
2741
2823
  }
2742
- return /* @__PURE__ */ d.jsx("div", { className: "grid3", children: r });
2824
+ return /* @__PURE__ */ u.jsx("div", { className: "grid3", children: a });
2743
2825
  }
2744
- function la(e) {
2745
- const [n, i] = X(e.value), t = (c) => {
2746
- const { alt: l, value: u } = c.target, h = { ...n };
2747
- h[l] = Number(u), console.log(l, h), i(h), e.onChange({ target: { value: h } });
2748
- }, a = (c) => {
2749
- const { alt: l, value: u } = c.target, h = Number(l), f = { ...n };
2750
- f.elements[h] = Number(u), i(f);
2751
- }, r = [];
2752
- if (e.value.elements === void 0) {
2753
- const c = n;
2754
- ["x", "y", "z", "w"].forEach((u) => {
2755
- r.push(
2756
- /* @__PURE__ */ d.jsxs("div", { children: [
2757
- /* @__PURE__ */ d.jsx("label", { children: u.toUpperCase() }),
2758
- /* @__PURE__ */ d.jsx(
2759
- "input",
2826
+ function ui(e) {
2827
+ const n = e.value.x !== void 0, a = [];
2828
+ if (n) {
2829
+ const t = de(() => e.value, []), r = (l, c) => {
2830
+ t[l] = c, e.onChange({ target: { value: t } });
2831
+ };
2832
+ ["x", "y", "z", "w"].forEach((l) => {
2833
+ const c = ae(null);
2834
+ a.push(
2835
+ /* @__PURE__ */ u.jsxs("div", { children: [
2836
+ /* @__PURE__ */ u.jsx("label", { ref: c, children: l.toUpperCase() }),
2837
+ /* @__PURE__ */ u.jsx(
2838
+ ot,
2760
2839
  {
2761
- alt: u,
2840
+ value: t.x,
2762
2841
  type: "number",
2763
- value: c[u],
2842
+ prop: l,
2764
2843
  step: 0.01,
2765
- onChange: t
2844
+ labelRef: c,
2845
+ onChange: r
2766
2846
  }
2767
2847
  )
2768
- ] }, u)
2848
+ ] }, l)
2769
2849
  );
2770
2850
  });
2771
2851
  } else {
2772
- const c = n;
2773
- for (let l = 0; l < 16; l++) {
2774
- const u = (l + 1).toString();
2775
- r.push(
2776
- /* @__PURE__ */ d.jsxs("div", { children: [
2777
- /* @__PURE__ */ d.jsx("label", { children: u }),
2778
- /* @__PURE__ */ d.jsx(
2779
- "input",
2852
+ const t = de(() => e.value, []), r = (i, l) => {
2853
+ const c = Number(i);
2854
+ t.elements[c] = l, e.onChange({ target: { value: t } });
2855
+ };
2856
+ for (let i = 0; i < 16; i++) {
2857
+ const l = ae(null);
2858
+ a.push(
2859
+ /* @__PURE__ */ u.jsxs("div", { children: [
2860
+ /* @__PURE__ */ u.jsx("label", { ref: l, children: i + 1 }),
2861
+ /* @__PURE__ */ u.jsx(
2862
+ ot,
2780
2863
  {
2781
- alt: l.toString(),
2864
+ value: t.elements[i],
2782
2865
  type: "number",
2783
- value: c.elements[l],
2866
+ prop: i.toString(),
2784
2867
  step: 0.01,
2785
- onChange: a
2868
+ labelRef: l,
2869
+ onChange: r
2786
2870
  }
2787
2871
  )
2788
- ] }, u)
2872
+ ] }, i.toString())
2789
2873
  );
2790
2874
  }
2791
2875
  }
2792
- return /* @__PURE__ */ d.jsx("div", { className: "grid4", children: r });
2876
+ return /* @__PURE__ */ u.jsx("div", { className: "grid4", children: a });
2793
2877
  }
2794
- function ft(e) {
2878
+ function pt(e) {
2795
2879
  let n = e.value;
2796
- n !== void 0 && n.isColor !== void 0 && (n = Pi(e.value));
2797
- const [i, t] = X(n), a = he(null), r = he(null), c = (f) => {
2880
+ n !== void 0 && n.isColor !== void 0 && (n = Pa(e.value));
2881
+ const [a, t] = ee(n), r = ae(null), i = ae(null), l = (f) => {
2798
2882
  let m = f.target.value;
2799
2883
  e.type === "boolean" ? m = f.target.checked : e.type === "option" && (m = e.options[m].value), t(m), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, m);
2800
- }, l = {};
2801
- e.disabled && (l.opacity = 0.8);
2802
- const u = e.type === "string" && (i.length > 100 || i.search(`
2803
- `) > -1), h = u || e.type === "image" || e.type === "vector2";
2804
- return /* @__PURE__ */ d.jsxs("div", { className: `field ${h ? "block" : ""}`, style: l, children: [
2805
- e.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: a, children: Je(e.title) }, "fieldLabel"),
2806
- e.type === "string" && !u && /* @__PURE__ */ d.jsx(
2884
+ }, c = {};
2885
+ e.disabled && (c.opacity = 0.8);
2886
+ const d = e.type === "string" && (a.length > 100 || a.search(`
2887
+ `) > -1), h = d || e.type === "image" || e.type === "vector2";
2888
+ return /* @__PURE__ */ u.jsxs("div", { className: `field ${h ? "block" : ""}`, style: c, children: [
2889
+ e.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: r, children: Je(e.title) }, "fieldLabel"),
2890
+ e.type === "string" && !d && /* @__PURE__ */ u.jsx(
2807
2891
  "input",
2808
2892
  {
2809
2893
  type: "text",
2810
2894
  disabled: e.disabled,
2811
- onChange: c,
2812
- value: i
2895
+ onChange: l,
2896
+ value: a
2813
2897
  }
2814
2898
  ),
2815
- e.type === "string" && u && /* @__PURE__ */ d.jsx(
2899
+ e.type === "string" && d && /* @__PURE__ */ u.jsx(
2816
2900
  "textarea",
2817
2901
  {
2818
2902
  cols: 50,
2819
2903
  rows: 10,
2820
2904
  disabled: e.disabled !== void 0 ? e.disabled : !0,
2821
- onChange: c,
2822
- value: i
2905
+ onChange: l,
2906
+ value: a
2823
2907
  }
2824
2908
  ),
2825
- e.type === "boolean" && /* @__PURE__ */ d.jsx(
2909
+ e.type === "boolean" && /* @__PURE__ */ u.jsx(
2826
2910
  "input",
2827
2911
  {
2828
2912
  type: "checkbox",
2829
2913
  disabled: e.disabled,
2830
- onChange: c,
2831
- checked: i
2914
+ onChange: l,
2915
+ checked: a
2832
2916
  }
2833
2917
  ),
2834
- e.type === "number" && /* @__PURE__ */ d.jsx(
2835
- nn,
2918
+ e.type === "number" && /* @__PURE__ */ u.jsx(
2919
+ ot,
2836
2920
  {
2837
- value: i,
2921
+ value: a,
2838
2922
  type: e.type,
2839
2923
  prop: e.prop !== void 0 ? e.prop : e.title,
2840
2924
  min: e.min,
2841
2925
  max: e.max,
2842
2926
  step: e.step,
2843
2927
  disabled: e.disabled,
2844
- labelRef: a,
2928
+ labelRef: r,
2845
2929
  onChange: e.onChange
2846
2930
  }
2847
2931
  ),
2848
- e.type === "range" && /* @__PURE__ */ d.jsx(
2849
- nn,
2932
+ e.type === "range" && /* @__PURE__ */ u.jsx(
2933
+ ot,
2850
2934
  {
2851
- value: i,
2935
+ value: a,
2852
2936
  type: e.type,
2853
2937
  prop: e.prop !== void 0 ? e.prop : e.title,
2854
2938
  min: e.min,
2855
2939
  max: e.max,
2856
2940
  step: e.step,
2857
2941
  disabled: e.disabled,
2858
- labelRef: a,
2942
+ labelRef: r,
2859
2943
  onChange: e.onChange
2860
2944
  }
2861
2945
  ),
2862
- e.type === "color" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2863
- /* @__PURE__ */ d.jsx("input", { type: "text", value: i.toString(), onChange: c, disabled: e.disabled, className: "color" }),
2864
- /* @__PURE__ */ d.jsx("input", { type: "color", value: i, onChange: c, disabled: e.disabled })
2946
+ e.type === "color" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2947
+ /* @__PURE__ */ u.jsx("input", { type: "text", value: a.toString(), onChange: l, disabled: e.disabled, className: "color" }),
2948
+ /* @__PURE__ */ u.jsx("input", { type: "color", value: a, onChange: l, disabled: e.disabled })
2865
2949
  ] }),
2866
- e.type === "button" && /* @__PURE__ */ d.jsx(
2950
+ e.type === "button" && /* @__PURE__ */ u.jsx(
2867
2951
  "button",
2868
2952
  {
2869
2953
  disabled: e.disabled,
@@ -2873,18 +2957,18 @@ function ft(e) {
2873
2957
  children: e.title
2874
2958
  }
2875
2959
  ),
2876
- e.type === "image" && /* @__PURE__ */ d.jsx("img", { ref: r, onClick: () => {
2877
- Ki().then((f) => {
2878
- r.current.src = f, e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, f);
2960
+ e.type === "image" && /* @__PURE__ */ u.jsx("img", { ref: i, onClick: () => {
2961
+ Xa().then((f) => {
2962
+ i.current.src = f, e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, f);
2879
2963
  });
2880
- }, src: i.length > 0 ? i : Vi }),
2881
- e.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: c, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((f, m) => /* @__PURE__ */ d.jsx("option", { value: f.value, children: Je(f.title) }, m)) }) }),
2882
- e.type === "vector2" && /* @__PURE__ */ d.jsx(sa, { value: i, min: 0, max: 1, onChange: c }),
2883
- e.type === "grid3" && /* @__PURE__ */ d.jsx(oa, { value: i, onChange: c }),
2884
- e.type === "grid4" && /* @__PURE__ */ d.jsx(la, { value: i, onChange: c })
2964
+ }, src: a.length > 0 ? a : Va }),
2965
+ e.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: l, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((f, m) => /* @__PURE__ */ u.jsx("option", { value: f.value, children: Je(f.title) }, m)) }) }),
2966
+ e.type === "vector2" && /* @__PURE__ */ u.jsx(ci, { value: a, min: 0, max: 1, onChange: l }),
2967
+ e.type === "grid3" && /* @__PURE__ */ u.jsx(li, { value: a, onChange: l }),
2968
+ e.type === "grid4" && /* @__PURE__ */ u.jsx(ui, { value: a, onChange: l })
2885
2969
  ] });
2886
2970
  }
2887
- function an(e) {
2971
+ function rn(e) {
2888
2972
  switch (e) {
2889
2973
  case "fov":
2890
2974
  return "FOV";
@@ -2913,67 +2997,67 @@ function an(e) {
2913
2997
  }
2914
2998
  return e;
2915
2999
  }
2916
- function ca(e, n) {
2917
- const i = [];
3000
+ function di(e, n) {
3001
+ const a = [];
2918
3002
  if (e.perspectiveCameraInfo !== void 0)
2919
3003
  for (const t in e.perspectiveCameraInfo)
2920
- i.push({
2921
- title: an(t),
3004
+ a.push({
3005
+ title: rn(t),
2922
3006
  prop: t,
2923
3007
  type: "number",
2924
3008
  step: 0.01,
2925
3009
  value: e.perspectiveCameraInfo[t],
2926
- onChange: (a, r) => {
2927
- n.updateObject(e.uuid, a, r), n.requestMethod(e.uuid, "updateProjectionMatrix");
2928
- const c = n.scene?.getObjectByProperty("uuid", e.uuid);
2929
- c !== void 0 && (k(c, a, r), c.updateProjectionMatrix());
3010
+ onChange: (r, i) => {
3011
+ n.updateObject(e.uuid, r, i), n.requestMethod(e.uuid, "updateProjectionMatrix");
3012
+ const l = n.scene?.getObjectByProperty("uuid", e.uuid);
3013
+ l !== void 0 && (k(l, r, i), l.updateProjectionMatrix());
2930
3014
  }
2931
3015
  });
2932
3016
  else if (e.orthographicCameraInfo !== void 0)
2933
3017
  for (const t in e.orthographicCameraInfo)
2934
- i.push({
2935
- title: an(t),
3018
+ a.push({
3019
+ title: rn(t),
2936
3020
  prop: t,
2937
3021
  type: "number",
2938
3022
  step: 0.01,
2939
3023
  value: e.perspectiveCameraInfo[t],
2940
- onChange: (a, r) => {
2941
- n.updateObject(e.uuid, a, r), n.requestMethod(e.uuid, "updateProjectionMatrix");
2942
- const c = n.scene?.getObjectByProperty("uuid", e.uuid);
2943
- c !== void 0 && (k(c, a, r), c.updateProjectionMatrix());
3024
+ onChange: (r, i) => {
3025
+ n.updateObject(e.uuid, r, i), n.requestMethod(e.uuid, "updateProjectionMatrix");
3026
+ const l = n.scene?.getObjectByProperty("uuid", e.uuid);
3027
+ l !== void 0 && (k(l, r, i), l.updateProjectionMatrix());
2944
3028
  }
2945
3029
  });
2946
- return /* @__PURE__ */ d.jsx(
3030
+ return /* @__PURE__ */ u.jsx(
2947
3031
  Qe,
2948
3032
  {
2949
3033
  title: "Camera",
2950
- items: i
3034
+ items: a
2951
3035
  }
2952
3036
  );
2953
3037
  }
2954
- const ua = Math.PI / 180, da = 180 / Math.PI;
2955
- function st(e, n, i, t, a) {
2956
- return t + (e - n) * (a - t) / (i - n);
3038
+ const hi = Math.PI / 180, fi = 180 / Math.PI;
3039
+ function st(e, n, a, t, r) {
3040
+ return t + (e - n) * (r - t) / (a - n);
2957
3041
  }
2958
- function ha(e) {
2959
- return e * ua;
3042
+ function pi(e) {
3043
+ return e * hi;
2960
3044
  }
2961
- function Nt(e) {
2962
- return e * da;
3045
+ function Lt(e) {
3046
+ return e * fi;
2963
3047
  }
2964
- function fa(e, n) {
2965
- const i = new ri();
2966
- i.elements = e.matrix;
2967
- const t = new J(), a = new si(), r = new J();
2968
- e.uuid.length > 0 && (t.setFromMatrixPosition(i), a.setFromRotationMatrix(i), r.setFromMatrixScale(i));
2969
- const c = (u, h) => {
2970
- n.updateObject(e.uuid, u, h);
3048
+ function mi(e, n) {
3049
+ const a = new ra();
3050
+ a.elements = e.matrix;
3051
+ const t = new Z(), r = new sa(), i = new Z();
3052
+ e.uuid.length > 0 && (t.setFromMatrixPosition(a), r.setFromRotationMatrix(a), i.setFromMatrixScale(a));
3053
+ const l = (d, h) => {
3054
+ n.updateObject(e.uuid, d, h);
2971
3055
  const f = n.scene?.getObjectByProperty("uuid", e.uuid);
2972
- f !== void 0 && k(f, u, h);
2973
- }, l = (u, h) => {
2974
- c(u, ha(h));
3056
+ f !== void 0 && k(f, d, h);
3057
+ }, c = (d, h) => {
3058
+ l(d, pi(h));
2975
3059
  };
2976
- return /* @__PURE__ */ d.jsx(
3060
+ return /* @__PURE__ */ u.jsx(
2977
3061
  Qe,
2978
3062
  {
2979
3063
  title: "Transform",
@@ -2983,81 +3067,81 @@ function fa(e, n) {
2983
3067
  prop: "position.x",
2984
3068
  type: "number",
2985
3069
  value: t.x,
2986
- onChange: c
3070
+ onChange: l
2987
3071
  },
2988
3072
  {
2989
3073
  title: "Position Y",
2990
3074
  prop: "position.y",
2991
3075
  type: "number",
2992
3076
  value: t.y,
2993
- onChange: c
3077
+ onChange: l
2994
3078
  },
2995
3079
  {
2996
3080
  title: "Position Z",
2997
3081
  prop: "position.z",
2998
3082
  type: "number",
2999
3083
  value: t.z,
3000
- onChange: c
3084
+ onChange: l
3001
3085
  },
3002
3086
  {
3003
3087
  title: "Rotation X",
3004
3088
  prop: "rotation.x",
3005
3089
  type: "number",
3006
- value: mt(Nt(a.x)),
3090
+ value: gt(Lt(r.x)),
3007
3091
  min: -360,
3008
3092
  max: 360,
3009
3093
  step: 0.1,
3010
- onChange: l
3094
+ onChange: c
3011
3095
  },
3012
3096
  {
3013
3097
  title: "Rotation Y",
3014
3098
  prop: "rotation.y",
3015
3099
  type: "number",
3016
- value: mt(Nt(a.y)),
3100
+ value: gt(Lt(r.y)),
3017
3101
  min: -360,
3018
3102
  max: 360,
3019
3103
  step: 0.1,
3020
- onChange: l
3104
+ onChange: c
3021
3105
  },
3022
3106
  {
3023
3107
  title: "Rotation Z",
3024
3108
  prop: "rotation.z",
3025
3109
  type: "number",
3026
- value: mt(Nt(a.z)),
3110
+ value: gt(Lt(r.z)),
3027
3111
  min: -360,
3028
3112
  max: 360,
3029
3113
  step: 0.1,
3030
- onChange: l
3114
+ onChange: c
3031
3115
  },
3032
3116
  {
3033
3117
  title: "Scale X",
3034
3118
  prop: "scale.x",
3035
3119
  type: "number",
3036
- value: r.x,
3120
+ value: i.x,
3037
3121
  step: 0.01,
3038
- onChange: c
3122
+ onChange: l
3039
3123
  },
3040
3124
  {
3041
3125
  title: "Scale Y",
3042
3126
  prop: "scale.y",
3043
3127
  type: "number",
3044
- value: r.y,
3128
+ value: i.y,
3045
3129
  step: 0.01,
3046
- onChange: c
3130
+ onChange: l
3047
3131
  },
3048
3132
  {
3049
3133
  title: "Scale Z",
3050
3134
  prop: "scale.z",
3051
3135
  type: "number",
3052
- value: r.z,
3136
+ value: i.z,
3053
3137
  step: 0.01,
3054
- onChange: c
3138
+ onChange: l
3055
3139
  }
3056
3140
  ]
3057
3141
  }
3058
3142
  );
3059
3143
  }
3060
- function rn(e) {
3144
+ function sn(e) {
3061
3145
  switch (e) {
3062
3146
  case "color":
3063
3147
  return "Color";
@@ -3080,54 +3164,54 @@ function rn(e) {
3080
3164
  }
3081
3165
  return e;
3082
3166
  }
3083
- function pa(e, n) {
3084
- const i = [];
3167
+ function gi(e, n) {
3168
+ const a = [];
3085
3169
  if (e.lightInfo !== void 0)
3086
3170
  for (const t in e.lightInfo) {
3087
- const a = e.lightInfo[t];
3088
- a !== void 0 && (a.isColor !== void 0 ? i.push({
3089
- title: rn(t),
3171
+ const r = e.lightInfo[t];
3172
+ r !== void 0 && (r.isColor !== void 0 ? a.push({
3173
+ title: sn(t),
3090
3174
  prop: t,
3091
3175
  type: "color",
3092
- value: a,
3093
- onChange: (r, c) => {
3094
- const l = new pt(c);
3095
- n.updateObject(e.uuid, r, l);
3096
- const u = n.scene?.getObjectByProperty("uuid", e.uuid);
3097
- u !== void 0 && k(u, r, l);
3176
+ value: r,
3177
+ onChange: (i, l) => {
3178
+ const c = new mt(l);
3179
+ n.updateObject(e.uuid, i, c);
3180
+ const d = n.scene?.getObjectByProperty("uuid", e.uuid);
3181
+ d !== void 0 && k(d, i, c);
3098
3182
  }
3099
- }) : i.push({
3100
- title: rn(t),
3183
+ }) : a.push({
3184
+ title: sn(t),
3101
3185
  prop: t,
3102
- type: typeof a,
3103
- value: a,
3104
- step: typeof a == "number" ? 0.01 : void 0,
3105
- onChange: (r, c) => {
3106
- n.updateObject(e.uuid, r, c);
3107
- const l = n.scene?.getObjectByProperty("uuid", e.uuid);
3108
- l !== void 0 && k(l, r, c);
3186
+ type: typeof r,
3187
+ value: r,
3188
+ step: typeof r == "number" ? 0.01 : void 0,
3189
+ onChange: (i, l) => {
3190
+ n.updateObject(e.uuid, i, l);
3191
+ const c = n.scene?.getObjectByProperty("uuid", e.uuid);
3192
+ c !== void 0 && k(c, i, l);
3109
3193
  }
3110
3194
  }));
3111
3195
  }
3112
- return /* @__PURE__ */ d.jsx(
3196
+ return /* @__PURE__ */ u.jsx(
3113
3197
  Qe,
3114
3198
  {
3115
3199
  title: "Light",
3116
- items: i
3200
+ items: a
3117
3201
  }
3118
3202
  );
3119
3203
  }
3120
- function ma(e, n) {
3121
- const i = [], t = [];
3122
- let a = 0;
3123
- e.animations.forEach((l) => {
3124
- a = Math.max(a, l.duration), l.duration > 0 && t.push({
3125
- title: l.name,
3204
+ function vi(e, n) {
3205
+ const a = [], t = [];
3206
+ let r = 0;
3207
+ e.animations.forEach((c) => {
3208
+ r = Math.max(r, c.duration), c.duration > 0 && t.push({
3209
+ title: c.name,
3126
3210
  items: [
3127
3211
  {
3128
3212
  title: "Duration",
3129
3213
  type: "number",
3130
- value: l.duration,
3214
+ value: c.duration,
3131
3215
  disabled: !0
3132
3216
  },
3133
3217
  {
@@ -3147,41 +3231,41 @@ function ma(e, n) {
3147
3231
  }
3148
3232
  ]
3149
3233
  });
3150
- }), i.push({
3234
+ }), a.push({
3151
3235
  title: "Animations",
3152
3236
  items: t
3153
3237
  });
3154
- const r = n.scene?.getObjectByProperty("uuid", e.uuid);
3155
- let c = !1;
3156
- if (r !== void 0) {
3157
- const l = r.mixer;
3158
- if (c = l !== void 0, c) {
3159
- const u = [
3238
+ const i = n.scene?.getObjectByProperty("uuid", e.uuid);
3239
+ let l = !1;
3240
+ if (i !== void 0) {
3241
+ const c = i.mixer;
3242
+ if (l = c !== void 0, l) {
3243
+ const d = [
3160
3244
  {
3161
3245
  title: "Time Scale",
3162
3246
  type: "range",
3163
- value: l.timeScale,
3247
+ value: c.timeScale,
3164
3248
  step: 0.01,
3165
3249
  min: -1,
3166
3250
  max: 2,
3167
3251
  onChange: (h, f) => {
3168
- l.timeScale = f, n.updateObject(e.uuid, "mixer.timeScale", f);
3252
+ c.timeScale = f, n.updateObject(e.uuid, "mixer.timeScale", f);
3169
3253
  }
3170
3254
  }
3171
3255
  ];
3172
- u.push({
3256
+ d.push({
3173
3257
  title: "Stop All",
3174
3258
  type: "button",
3175
3259
  onChange: () => {
3176
- l.stopAllAction(), n.requestMethod(e.uuid, "stopAllAction", void 0, "mixer");
3260
+ c.stopAllAction(), n.requestMethod(e.uuid, "stopAllAction", void 0, "mixer");
3177
3261
  }
3178
- }), i.push({
3262
+ }), a.push({
3179
3263
  title: "Mixer",
3180
- items: u
3264
+ items: d
3181
3265
  });
3182
3266
  }
3183
3267
  }
3184
- return /* @__PURE__ */ d.jsx(Qe, { title: "Animation", items: i });
3268
+ return /* @__PURE__ */ u.jsx(Qe, { title: "Animation", items: a });
3185
3269
  }
3186
3270
  const $n = {
3187
3271
  name: "",
@@ -3196,24 +3280,24 @@ const $n = {
3196
3280
  lightInfo: void 0
3197
3281
  };
3198
3282
  let le = { ...$n };
3199
- function ga(e) {
3200
- const [n, i] = X(-1);
3283
+ function bi(e) {
3284
+ const [n, a] = ee(-1);
3201
3285
  ke(() => {
3202
- function c(u) {
3203
- le = { ...u.value }, i(Date.now());
3286
+ function l(d) {
3287
+ le = { ...d.value }, a(Date.now());
3204
3288
  }
3205
- function l() {
3206
- le = { ...$n }, i(Date.now());
3289
+ function c() {
3290
+ le = { ...$n }, a(Date.now());
3207
3291
  }
3208
- return B.addEventListener(F.SET_SCENE, l), B.addEventListener(F.SET_OBJECT, c), () => {
3209
- B.removeEventListener(F.SET_SCENE, l), B.removeEventListener(F.SET_OBJECT, c);
3292
+ return B.addEventListener(F.SET_SCENE, c), B.addEventListener(F.SET_OBJECT, l), () => {
3293
+ B.removeEventListener(F.SET_SCENE, c), B.removeEventListener(F.SET_OBJECT, l);
3210
3294
  };
3211
3295
  }, []);
3212
- const t = le.type.toLowerCase(), a = le.animations.length > 0 || le.mixer !== void 0, r = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
3213
- return /* @__PURE__ */ d.jsx(Ut, { label: "Inspector", children: /* @__PURE__ */ d.jsx("div", { id: "Inspector", className: e.class, children: le.uuid.length > 0 && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
3214
- /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
3215
- /* @__PURE__ */ d.jsx(
3216
- ft,
3296
+ const t = le.type.toLowerCase(), r = le.animations.length > 0 || le.mixer !== void 0, i = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
3297
+ return /* @__PURE__ */ u.jsx(zt, { label: "Inspector", children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: e.class, children: le.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
3298
+ /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
3299
+ /* @__PURE__ */ u.jsx(
3300
+ pt,
3217
3301
  {
3218
3302
  type: "string",
3219
3303
  title: "Name",
@@ -3222,8 +3306,8 @@ function ga(e) {
3222
3306
  disabled: !0
3223
3307
  }
3224
3308
  ),
3225
- /* @__PURE__ */ d.jsx(
3226
- ft,
3309
+ /* @__PURE__ */ u.jsx(
3310
+ pt,
3227
3311
  {
3228
3312
  type: "string",
3229
3313
  title: "Type",
@@ -3232,8 +3316,8 @@ function ga(e) {
3232
3316
  disabled: !0
3233
3317
  }
3234
3318
  ),
3235
- /* @__PURE__ */ d.jsx(
3236
- ft,
3319
+ /* @__PURE__ */ u.jsx(
3320
+ pt,
3237
3321
  {
3238
3322
  type: "string",
3239
3323
  title: "UUID",
@@ -3242,103 +3326,103 @@ function ga(e) {
3242
3326
  disabled: !0
3243
3327
  }
3244
3328
  ),
3245
- /* @__PURE__ */ d.jsx(
3246
- ft,
3329
+ /* @__PURE__ */ u.jsx(
3330
+ pt,
3247
3331
  {
3248
3332
  type: "boolean",
3249
3333
  title: "Visible",
3250
3334
  prop: "visible",
3251
3335
  value: le.visible,
3252
- onChange: (c, l) => {
3253
- e.three.updateObject(le.uuid, c, l);
3254
- const u = e.three.scene?.getObjectByProperty("uuid", le.uuid);
3255
- u !== void 0 && k(u, c, l);
3336
+ onChange: (l, c) => {
3337
+ e.three.updateObject(le.uuid, l, c);
3338
+ const d = e.three.scene?.getObjectByProperty("uuid", le.uuid);
3339
+ d !== void 0 && k(d, l, c);
3256
3340
  }
3257
3341
  }
3258
3342
  )
3259
3343
  ] }),
3260
- /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
3261
- fa(le, e.three),
3262
- a ? ma(le, e.three) : null,
3263
- t.search("camera") > -1 ? ca(le, e.three) : null,
3264
- t.search("light") > -1 ? pa(le, e.three) : null,
3265
- r ? ra(le, e.three) : null
3344
+ /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
3345
+ mi(le, e.three),
3346
+ r ? vi(le, e.three) : null,
3347
+ t.search("camera") > -1 ? di(le, e.three) : null,
3348
+ t.search("light") > -1 ? gi(le, e.three) : null,
3349
+ i ? si(le, e.three) : null
3266
3350
  ] })
3267
3351
  ] }) }, n) }, "Inspector");
3268
3352
  }
3269
- function Ba(e) {
3270
- const [n, i] = X(e.scene);
3353
+ function $i(e) {
3354
+ const [n, a] = ee(e.scene);
3271
3355
  ke(() => {
3272
- const r = (c) => {
3273
- i(c.value);
3356
+ const i = (l) => {
3357
+ a(l.value);
3274
3358
  };
3275
- return B.addEventListener(F.SET_SCENE, r), () => {
3276
- B.removeEventListener(F.SET_SCENE, r);
3359
+ return B.addEventListener(F.SET_SCENE, i), () => {
3360
+ B.removeEventListener(F.SET_SCENE, i);
3277
3361
  };
3278
3362
  }, []);
3279
- const t = n !== null, a = "Hierarchy - " + (t ? `${n?.name}` : "No Scene");
3280
- return /* @__PURE__ */ d.jsxs("div", { id: "SidePanel", children: [
3281
- /* @__PURE__ */ d.jsx(Ut, { label: a, open: !0, children: /* @__PURE__ */ d.jsx(d.Fragment, { children: t && /* @__PURE__ */ d.jsx(Gi, { child: n, three: e.three }) }) }),
3282
- /* @__PURE__ */ d.jsx(ga, { three: e.three })
3363
+ const t = n !== null, r = "Hierarchy - " + (t ? `${n?.name}` : "No Scene");
3364
+ return /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
3365
+ /* @__PURE__ */ u.jsx(zt, { label: r, open: !0, children: /* @__PURE__ */ u.jsx(u.Fragment, { children: t && /* @__PURE__ */ u.jsx(Ga, { child: n, three: e.three }) }) }),
3366
+ /* @__PURE__ */ u.jsx(bi, { three: e.three })
3283
3367
  ] }, "SidePanel");
3284
3368
  }
3285
- function Fa(e) {
3369
+ function Ui(e) {
3286
3370
  function n() {
3287
3371
  return e.three.scene === void 0 ? (console.log("No scene:", e.three), !1) : !0;
3288
3372
  }
3289
- const i = (l) => {
3373
+ const a = (c) => {
3290
3374
  if (!n())
3291
3375
  return;
3292
- const u = e.three.scene?.getObjectByProperty("uuid", l.value);
3293
- u !== void 0 && e.three.setObject(u);
3294
- }, t = (l, u, h) => {
3376
+ const d = e.three.scene?.getObjectByProperty("uuid", c.value);
3377
+ d !== void 0 && e.three.setObject(d);
3378
+ }, t = (c, d, h) => {
3295
3379
  if (!n())
3296
3380
  return;
3297
- const f = e.three.scene?.getObjectByProperty("uuid", l);
3298
- f !== void 0 && k(f, u, h);
3299
- }, a = (l) => {
3381
+ const f = e.three.scene?.getObjectByProperty("uuid", c);
3382
+ f !== void 0 && k(f, d, h);
3383
+ }, r = (c) => {
3300
3384
  if (!n())
3301
3385
  return;
3302
- const u = l.value, { key: h, value: f, uuid: m } = u;
3386
+ const d = c.value, { key: h, value: f, uuid: m } = d;
3303
3387
  t(m, h, f);
3304
- }, r = (l) => {
3388
+ }, i = (c) => {
3305
3389
  if (!n())
3306
3390
  return;
3307
- const u = l.value;
3308
- wt(u.value).then((h) => {
3309
- t(u.uuid, u.key, h), t(u.uuid, "material.needsUpdate", !0);
3391
+ const d = c.value;
3392
+ Ot(d.value).then((h) => {
3393
+ t(d.uuid, d.key, h), t(d.uuid, "material.needsUpdate", !0);
3310
3394
  });
3311
- }, c = (l) => {
3395
+ }, l = (c) => {
3312
3396
  if (!n())
3313
3397
  return;
3314
- const { key: u, uuid: h, value: f, subitem: m } = l.value, y = e.three.scene?.getObjectByProperty("uuid", h);
3398
+ const { key: d, uuid: h, value: f, subitem: m } = c.value, y = e.three.scene?.getObjectByProperty("uuid", h);
3315
3399
  if (y !== void 0)
3316
3400
  try {
3317
- m !== void 0 ? Ni(y, m)[u](f) : y[u](f);
3318
- } catch (W) {
3319
- console.log("Error requesting method:"), console.log(W), console.log(u), console.log(f);
3401
+ m !== void 0 ? Na(y, m)[d](f) : y[d](f);
3402
+ } catch (Y) {
3403
+ console.log("Error requesting method:"), console.log(Y), console.log(d), console.log(f);
3320
3404
  }
3321
3405
  };
3322
- return ke(() => (B.addEventListener(F.GET_OBJECT, i), B.addEventListener(F.UPDATE_OBJECT, a), B.addEventListener(F.CREATE_TEXTURE, r), B.addEventListener(F.REQUEST_METHOD, c), () => {
3323
- B.removeEventListener(F.GET_OBJECT, i), B.removeEventListener(F.UPDATE_OBJECT, a), B.removeEventListener(F.CREATE_TEXTURE, r), B.removeEventListener(F.REQUEST_METHOD, c);
3406
+ return ke(() => (B.addEventListener(F.GET_OBJECT, a), B.addEventListener(F.UPDATE_OBJECT, r), B.addEventListener(F.CREATE_TEXTURE, i), B.addEventListener(F.REQUEST_METHOD, l), () => {
3407
+ B.removeEventListener(F.GET_OBJECT, a), B.removeEventListener(F.UPDATE_OBJECT, r), B.removeEventListener(F.CREATE_TEXTURE, i), B.removeEventListener(F.REQUEST_METHOD, l);
3324
3408
  }), []), null;
3325
3409
  }
3326
- class va extends oi {
3327
- constructor(n, i) {
3328
- const t = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], a = new Gt();
3329
- a.setAttribute("position", new Vt(t, 3)), a.computeBoundingSphere();
3330
- const r = new li({ fog: !1 });
3331
- super(a, r), this.light = n, this.color = i, this.type = "RectAreaLightHelper";
3332
- const c = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], l = new Gt();
3333
- l.setAttribute("position", new Vt(c, 3)), l.computeBoundingSphere(), this.add(new Tn(l, new Rn({ side: hn, fog: !1 })));
3410
+ class yi extends oa {
3411
+ constructor(n, a) {
3412
+ const t = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], r = new Wt();
3413
+ r.setAttribute("position", new qt(t, 3)), r.computeBoundingSphere();
3414
+ const i = new ca({ fog: !1 });
3415
+ super(r, i), this.light = n, this.color = a, this.type = "RectAreaLightHelper";
3416
+ const l = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], c = new Wt();
3417
+ c.setAttribute("position", new qt(l, 3)), c.computeBoundingSphere(), this.add(new Rn(c, new Pn({ side: fn, fog: !1 })));
3334
3418
  }
3335
3419
  updateMatrixWorld() {
3336
3420
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
3337
3421
  this.material.color.set(this.color), this.children[0].material.color.set(this.color);
3338
3422
  else {
3339
3423
  this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);
3340
- const n = this.material.color, i = Math.max(n.r, n.g, n.b);
3341
- i > 1 && n.multiplyScalar(1 / i), this.children[0].material.color.copy(this.material.color);
3424
+ const n = this.material.color, a = Math.max(n.r, n.g, n.b);
3425
+ a > 1 && n.multiplyScalar(1 / a), this.children[0].material.color.copy(this.material.color);
3342
3426
  }
3343
3427
  this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld), this.children[0].matrixWorld.copy(this.matrixWorld);
3344
3428
  }
@@ -3346,30 +3430,30 @@ class va extends oi {
3346
3430
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3347
3431
  }
3348
3432
  }
3349
- const sn = { type: "change" }, Lt = { type: "start" }, on = { type: "end" }, Ct = new ci(), ln = new ui(), ba = Math.cos(70 * di.DEG2RAD);
3350
- class ya extends un {
3351
- constructor(n, i) {
3352
- super(), this.object = n, this.domElement = i, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new J(), this.cursor = new J(), 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: it.ROTATE, MIDDLE: it.DOLLY, RIGHT: it.PAN }, this.touches = { ONE: at.ROTATE, TWO: at.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3353
- return l.phi;
3433
+ const on = { type: "change" }, Bt = { type: "start" }, cn = { type: "end" }, Et = new la(), ln = new ua(), xi = Math.cos(70 * da.DEG2RAD);
3434
+ class Ci extends dn {
3435
+ constructor(n, a) {
3436
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Z(), this.cursor = new Z(), 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: at.ROTATE, MIDDLE: at.DOLLY, RIGHT: at.PAN }, this.touches = { ONE: it.ROTATE, TWO: it.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3437
+ return c.phi;
3354
3438
  }, this.getAzimuthalAngle = function() {
3355
- return l.theta;
3439
+ return c.theta;
3356
3440
  }, this.getDistance = function() {
3357
3441
  return this.object.position.distanceTo(this.target);
3358
3442
  }, this.listenToKeyEvents = function(o) {
3359
- o.addEventListener("keydown", ot), this._domElementKeyEvents = o;
3443
+ o.addEventListener("keydown", ct), this._domElementKeyEvents = o;
3360
3444
  }, this.stopListenToKeyEvents = function() {
3361
- this._domElementKeyEvents.removeEventListener("keydown", ot), this._domElementKeyEvents = null;
3445
+ this._domElementKeyEvents.removeEventListener("keydown", ct), this._domElementKeyEvents = null;
3362
3446
  }, this.saveState = function() {
3363
3447
  t.target0.copy(t.target), t.position0.copy(t.object.position), t.zoom0 = t.object.zoom;
3364
3448
  }, this.reset = function() {
3365
- t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(sn), t.update(), r = a.NONE;
3449
+ t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(on), t.update(), i = r.NONE;
3366
3450
  }, this.update = function() {
3367
- const o = new J(), x = new Wt().setFromUnitVectors(n.up, new J(0, 1, 0)), _ = x.clone().invert(), H = new J(), Z = new Wt(), xe = new J(), de = 2 * Math.PI;
3368
- return function(Pt = null) {
3369
- const ct = t.object.position;
3370
- o.copy(ct).sub(t.target), o.applyQuaternion(x), l.setFromVector3(o), t.autoRotate && r === a.NONE && be(_e(Pt)), t.enableDamping ? (l.theta += u.theta * t.dampingFactor, l.phi += u.phi * t.dampingFactor) : (l.theta += u.theta, l.phi += u.phi);
3451
+ const o = new Z(), x = new Kt().setFromUnitVectors(n.up, new Z(0, 1, 0)), _ = x.clone().invert(), H = new Z(), X = new Kt(), xe = new Z(), fe = 2 * Math.PI;
3452
+ return function(At = null) {
3453
+ const ut = t.object.position;
3454
+ o.copy(ut).sub(t.target), o.applyQuaternion(x), c.setFromVector3(o), t.autoRotate && i === r.NONE && be(_e(At)), t.enableDamping ? (c.theta += d.theta * t.dampingFactor, c.phi += d.phi * t.dampingFactor) : (c.theta += d.theta, c.phi += d.phi);
3371
3455
  let Me = t.minAzimuthAngle, Ce = t.maxAzimuthAngle;
3372
- isFinite(Me) && isFinite(Ce) && (Me < -Math.PI ? Me += de : Me > Math.PI && (Me -= de), Ce < -Math.PI ? Ce += de : Ce > Math.PI && (Ce -= de), Me <= Ce ? l.theta = Math.max(Me, Math.min(Ce, l.theta)) : l.theta = l.theta > (Me + Ce) / 2 ? Math.max(Me, l.theta) : Math.min(Ce, l.theta)), l.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, l.phi)), l.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(f, t.dampingFactor) : t.target.add(f), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor), t.zoomToCursor && Se || t.object.isOrthographicCamera ? l.radius = Ae(l.radius) : l.radius = Ae(l.radius * h), o.setFromSpherical(l), o.applyQuaternion(_), ct.copy(t.target).add(o), t.object.lookAt(t.target), t.enableDamping === !0 ? (u.theta *= 1 - t.dampingFactor, u.phi *= 1 - t.dampingFactor, f.multiplyScalar(1 - t.dampingFactor)) : (u.set(0, 0, 0), f.set(0, 0, 0));
3456
+ isFinite(Me) && isFinite(Ce) && (Me < -Math.PI ? Me += fe : Me > Math.PI && (Me -= fe), Ce < -Math.PI ? Ce += fe : Ce > Math.PI && (Ce -= fe), Me <= Ce ? c.theta = Math.max(Me, Math.min(Ce, c.theta)) : c.theta = c.theta > (Me + Ce) / 2 ? Math.max(Me, c.theta) : Math.min(Ce, c.theta)), c.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, c.phi)), c.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(f, t.dampingFactor) : t.target.add(f), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor), t.zoomToCursor && Se || t.object.isOrthographicCamera ? c.radius = Ae(c.radius) : c.radius = Ae(c.radius * h), o.setFromSpherical(c), o.applyQuaternion(_), ut.copy(t.target).add(o), t.object.lookAt(t.target), t.enableDamping === !0 ? (d.theta *= 1 - t.dampingFactor, d.phi *= 1 - t.dampingFactor, f.multiplyScalar(1 - t.dampingFactor)) : (d.set(0, 0, 0), f.set(0, 0, 0));
3373
3457
  let Ve = !1;
3374
3458
  if (t.zoomToCursor && Se) {
3375
3459
  let We = null;
@@ -3379,21 +3463,21 @@ class ya extends un {
3379
3463
  const Ke = qe - We;
3380
3464
  t.object.position.addScaledVector(te, Ke), t.object.updateMatrixWorld();
3381
3465
  } else if (t.object.isOrthographicCamera) {
3382
- const qe = new J(ie.x, ie.y, 0);
3466
+ const qe = new Z(ie.x, ie.y, 0);
3383
3467
  qe.unproject(t.object), t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / h)), t.object.updateProjectionMatrix(), Ve = !0;
3384
- const Ke = new J(ie.x, ie.y, 0);
3468
+ const Ke = new Z(ie.x, ie.y, 0);
3385
3469
  Ke.unproject(t.object), t.object.position.sub(Ke).add(qe), t.object.updateMatrixWorld(), We = o.length();
3386
3470
  } else
3387
3471
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
3388
- We !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(We).add(t.object.position) : (Ct.origin.copy(t.object.position), Ct.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Ct.direction)) < ba ? n.lookAt(t.target) : (ln.setFromNormalAndCoplanarPoint(t.object.up, t.target), Ct.intersectPlane(ln, t.target))));
3472
+ We !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(We).add(t.object.position) : (Et.origin.copy(t.object.position), Et.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Et.direction)) < xi ? n.lookAt(t.target) : (ln.setFromNormalAndCoplanarPoint(t.object.up, t.target), Et.intersectPlane(ln, t.target))));
3389
3473
  } else
3390
3474
  t.object.isOrthographicCamera && (Ve = h !== 1, Ve && (t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / h)), t.object.updateProjectionMatrix()));
3391
- return h = 1, Se = !1, Ve || H.distanceToSquared(t.object.position) > c || 8 * (1 - Z.dot(t.object.quaternion)) > c || xe.distanceToSquared(t.target) > 0 ? (t.dispatchEvent(sn), H.copy(t.object.position), Z.copy(t.object.quaternion), xe.copy(t.target), !0) : !1;
3475
+ return h = 1, Se = !1, Ve || H.distanceToSquared(t.object.position) > l || 8 * (1 - X.dot(t.object.quaternion)) > l || xe.distanceToSquared(t.target) > 0 ? (t.dispatchEvent(on), H.copy(t.object.position), X.copy(t.object.quaternion), xe.copy(t.target), !0) : !1;
3392
3476
  };
3393
3477
  }(), this.dispose = function() {
3394
- t.domElement.removeEventListener("contextmenu", tt), t.domElement.removeEventListener("pointerdown", P), t.domElement.removeEventListener("pointercancel", Q), t.domElement.removeEventListener("wheel", gt), t.domElement.removeEventListener("pointermove", G), t.domElement.removeEventListener("pointerup", Q), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", ot), t._domElementKeyEvents = null);
3478
+ t.domElement.removeEventListener("contextmenu", tt), t.domElement.removeEventListener("pointerdown", R), t.domElement.removeEventListener("pointercancel", J), t.domElement.removeEventListener("wheel", vt), t.domElement.removeEventListener("pointermove", G), t.domElement.removeEventListener("pointerup", J), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", ct), t._domElementKeyEvents = null);
3395
3479
  };
3396
- const t = this, a = {
3480
+ const t = this, r = {
3397
3481
  NONE: -1,
3398
3482
  ROTATE: 0,
3399
3483
  DOLLY: 1,
@@ -3403,13 +3487,13 @@ class ya extends un {
3403
3487
  TOUCH_DOLLY_PAN: 5,
3404
3488
  TOUCH_DOLLY_ROTATE: 6
3405
3489
  };
3406
- let r = a.NONE;
3407
- const c = 1e-6, l = new qt(), u = new qt();
3490
+ let i = r.NONE;
3491
+ const l = 1e-6, c = new Xt(), d = new Xt();
3408
3492
  let h = 1;
3409
- const f = new J(), m = new me(), y = new me(), W = new me(), T = new me(), Y = new me(), R = new me(), M = new me(), $ = new me(), I = new me(), te = new J(), ie = new me();
3493
+ const f = new Z(), m = new ge(), y = new ge(), Y = new ge(), T = new ge(), W = new ge(), P = new ge(), M = new ge(), $ = new ge(), I = new ge(), te = new Z(), ie = new ge();
3410
3494
  let Se = !1;
3411
- const K = [], ge = {};
3412
- let ue = !1;
3495
+ const K = [], ve = {};
3496
+ let he = !1;
3413
3497
  function _e(o) {
3414
3498
  return o !== null ? 2 * Math.PI / 60 * t.autoRotateSpeed * o : 2 * Math.PI / 60 / 60 * t.autoRotateSpeed;
3415
3499
  }
@@ -3418,32 +3502,32 @@ class ya extends un {
3418
3502
  return Math.pow(0.95, t.zoomSpeed * x);
3419
3503
  }
3420
3504
  function be(o) {
3421
- u.theta -= o;
3505
+ d.theta -= o;
3422
3506
  }
3423
3507
  function N(o) {
3424
- u.phi -= o;
3508
+ d.phi -= o;
3425
3509
  }
3426
3510
  const ye = function() {
3427
- const o = new J();
3511
+ const o = new Z();
3428
3512
  return function(_, H) {
3429
3513
  o.setFromMatrixColumn(H, 0), o.multiplyScalar(-_), f.add(o);
3430
3514
  };
3431
3515
  }(), E = function() {
3432
- const o = new J();
3516
+ const o = new Z();
3433
3517
  return function(_, H) {
3434
3518
  t.screenSpacePanning === !0 ? o.setFromMatrixColumn(H, 1) : (o.setFromMatrixColumn(H, 0), o.crossVectors(t.object.up, o)), o.multiplyScalar(_), f.add(o);
3435
3519
  };
3436
3520
  }(), we = function() {
3437
- const o = new J();
3521
+ const o = new Z();
3438
3522
  return function(_, H) {
3439
- const Z = t.domElement;
3523
+ const X = t.domElement;
3440
3524
  if (t.object.isPerspectiveCamera) {
3441
3525
  const xe = t.object.position;
3442
3526
  o.copy(xe).sub(t.target);
3443
- let de = o.length();
3444
- de *= Math.tan(t.object.fov / 2 * Math.PI / 180), ye(2 * _ * de / Z.clientHeight, t.object.matrix), E(2 * H * de / Z.clientHeight, t.object.matrix);
3527
+ let fe = o.length();
3528
+ fe *= Math.tan(t.object.fov / 2 * Math.PI / 180), ye(2 * _ * fe / X.clientHeight, t.object.matrix), E(2 * H * fe / X.clientHeight, t.object.matrix);
3445
3529
  } else
3446
- t.object.isOrthographicCamera ? (ye(_ * (t.object.right - t.object.left) / t.object.zoom / Z.clientWidth, t.object.matrix), E(H * (t.object.top - t.object.bottom) / t.object.zoom / Z.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
3530
+ t.object.isOrthographicCamera ? (ye(_ * (t.object.right - t.object.left) / t.object.zoom / X.clientWidth, t.object.matrix), E(H * (t.object.top - t.object.bottom) / t.object.zoom / X.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
3447
3531
  };
3448
3532
  }();
3449
3533
  function Re(o) {
@@ -3456,8 +3540,8 @@ class ya extends un {
3456
3540
  if (!t.zoomToCursor)
3457
3541
  return;
3458
3542
  Se = !0;
3459
- const _ = t.domElement.getBoundingClientRect(), H = o - _.left, Z = x - _.top, xe = _.width, de = _.height;
3460
- ie.x = H / xe * 2 - 1, ie.y = -(Z / de) * 2 + 1, te.set(ie.x, ie.y, 1).unproject(t.object).sub(t.object.position).normalize();
3543
+ const _ = t.domElement.getBoundingClientRect(), H = o - _.left, X = x - _.top, xe = _.width, fe = _.height;
3544
+ ie.x = H / xe * 2 - 1, ie.y = -(X / fe) * 2 + 1, te.set(ie.x, ie.y, 1).unproject(t.object).sub(t.object.position).normalize();
3461
3545
  }
3462
3546
  function Ae(o) {
3463
3547
  return Math.max(t.minDistance, Math.min(t.maxDistance, o));
@@ -3471,21 +3555,21 @@ class ya extends un {
3471
3555
  function Fe(o) {
3472
3556
  T.set(o.clientX, o.clientY);
3473
3557
  }
3474
- function ae(o) {
3475
- y.set(o.clientX, o.clientY), W.subVectors(y, m).multiplyScalar(t.rotateSpeed);
3558
+ function re(o) {
3559
+ y.set(o.clientX, o.clientY), Y.subVectors(y, m).multiplyScalar(t.rotateSpeed);
3476
3560
  const x = t.domElement;
3477
- be(2 * Math.PI * W.x / x.clientHeight), N(2 * Math.PI * W.y / x.clientHeight), m.copy(y), t.update();
3561
+ be(2 * Math.PI * Y.x / x.clientHeight), N(2 * Math.PI * Y.y / x.clientHeight), m.copy(y), t.update();
3478
3562
  }
3479
3563
  function Oe(o) {
3480
3564
  $.set(o.clientX, o.clientY), I.subVectors($, M), I.y > 0 ? Re(Te(I.y)) : I.y < 0 && je(Te(I.y)), M.copy($), t.update();
3481
3565
  }
3482
3566
  function Ye(o) {
3483
- Y.set(o.clientX, o.clientY), R.subVectors(Y, T).multiplyScalar(t.panSpeed), we(R.x, R.y), T.copy(Y), t.update();
3567
+ W.set(o.clientX, o.clientY), P.subVectors(W, T).multiplyScalar(t.panSpeed), we(P.x, P.y), T.copy(W), t.update();
3484
3568
  }
3485
3569
  function Ge(o) {
3486
3570
  Pe(o.clientX, o.clientY), o.deltaY < 0 ? je(Te(o.deltaY)) : o.deltaY > 0 && Re(Te(o.deltaY)), t.update();
3487
3571
  }
3488
- function fe(o) {
3572
+ function pe(o) {
3489
3573
  let x = !1;
3490
3574
  switch (o.code) {
3491
3575
  case t.keys.UP:
@@ -3520,60 +3604,60 @@ class ya extends un {
3520
3604
  }
3521
3605
  }
3522
3606
  function S(o) {
3523
- const x = Ue(o), _ = o.pageX - x.x, H = o.pageY - x.y, Z = Math.sqrt(_ * _ + H * H);
3524
- M.set(0, Z);
3607
+ const x = Ue(o), _ = o.pageX - x.x, H = o.pageY - x.y, X = Math.sqrt(_ * _ + H * H);
3608
+ M.set(0, X);
3525
3609
  }
3526
3610
  function D(o) {
3527
3611
  t.enableZoom && S(o), t.enablePan && v(o);
3528
3612
  }
3529
- function re(o) {
3613
+ function se(o) {
3530
3614
  t.enableZoom && S(o), t.enableRotate && g(o);
3531
3615
  }
3532
3616
  function O(o) {
3533
3617
  if (K.length == 1)
3534
3618
  y.set(o.pageX, o.pageY);
3535
3619
  else {
3536
- const _ = Ue(o), H = 0.5 * (o.pageX + _.x), Z = 0.5 * (o.pageY + _.y);
3537
- y.set(H, Z);
3620
+ const _ = Ue(o), H = 0.5 * (o.pageX + _.x), X = 0.5 * (o.pageY + _.y);
3621
+ y.set(H, X);
3538
3622
  }
3539
- W.subVectors(y, m).multiplyScalar(t.rotateSpeed);
3623
+ Y.subVectors(y, m).multiplyScalar(t.rotateSpeed);
3540
3624
  const x = t.domElement;
3541
- be(2 * Math.PI * W.x / x.clientHeight), N(2 * Math.PI * W.y / x.clientHeight), m.copy(y);
3625
+ be(2 * Math.PI * Y.x / x.clientHeight), N(2 * Math.PI * Y.y / x.clientHeight), m.copy(y);
3542
3626
  }
3543
3627
  function w(o) {
3544
3628
  if (K.length === 1)
3545
- Y.set(o.pageX, o.pageY);
3629
+ W.set(o.pageX, o.pageY);
3546
3630
  else {
3547
3631
  const x = Ue(o), _ = 0.5 * (o.pageX + x.x), H = 0.5 * (o.pageY + x.y);
3548
- Y.set(_, H);
3632
+ W.set(_, H);
3549
3633
  }
3550
- R.subVectors(Y, T).multiplyScalar(t.panSpeed), we(R.x, R.y), T.copy(Y);
3634
+ P.subVectors(W, T).multiplyScalar(t.panSpeed), we(P.x, P.y), T.copy(W);
3551
3635
  }
3552
3636
  function L(o) {
3553
- const x = Ue(o), _ = o.pageX - x.x, H = o.pageY - x.y, Z = Math.sqrt(_ * _ + H * H);
3554
- $.set(0, Z), I.set(0, Math.pow($.y / M.y, t.zoomSpeed)), Re(I.y), M.copy($);
3555
- const xe = (o.pageX + x.x) * 0.5, de = (o.pageY + x.y) * 0.5;
3556
- Pe(xe, de);
3637
+ const x = Ue(o), _ = o.pageX - x.x, H = o.pageY - x.y, X = Math.sqrt(_ * _ + H * H);
3638
+ $.set(0, X), I.set(0, Math.pow($.y / M.y, t.zoomSpeed)), Re(I.y), M.copy($);
3639
+ const xe = (o.pageX + x.x) * 0.5, fe = (o.pageY + x.y) * 0.5;
3640
+ Pe(xe, fe);
3557
3641
  }
3558
- function se(o) {
3642
+ function oe(o) {
3559
3643
  t.enableZoom && L(o), t.enablePan && w(o);
3560
3644
  }
3561
- function oe(o) {
3645
+ function ce(o) {
3562
3646
  t.enableZoom && L(o), t.enableRotate && O(o);
3563
3647
  }
3564
- function P(o) {
3565
- t.enabled !== !1 && (K.length === 0 && (t.domElement.setPointerCapture(o.pointerId), t.domElement.addEventListener("pointermove", G), t.domElement.addEventListener("pointerup", Q)), _t(o), o.pointerType === "touch" ? lt(o) : Ie(o));
3648
+ function R(o) {
3649
+ t.enabled !== !1 && (K.length === 0 && (t.domElement.setPointerCapture(o.pointerId), t.domElement.addEventListener("pointermove", G), t.domElement.addEventListener("pointerup", J)), Tt(o), o.pointerType === "touch" ? lt(o) : Ie(o));
3566
3650
  }
3567
3651
  function G(o) {
3568
- t.enabled !== !1 && (o.pointerType === "touch" ? yt(o) : et(o));
3652
+ t.enabled !== !1 && (o.pointerType === "touch" ? xt(o) : et(o));
3569
3653
  }
3570
- function Q(o) {
3571
- switch (Tt(o), K.length) {
3654
+ function J(o) {
3655
+ switch (Rt(o), K.length) {
3572
3656
  case 0:
3573
- t.domElement.releasePointerCapture(o.pointerId), t.domElement.removeEventListener("pointermove", G), t.domElement.removeEventListener("pointerup", Q), t.dispatchEvent(on), r = a.NONE;
3657
+ t.domElement.releasePointerCapture(o.pointerId), t.domElement.removeEventListener("pointermove", G), t.domElement.removeEventListener("pointerup", J), t.dispatchEvent(cn), i = r.NONE;
3574
3658
  break;
3575
3659
  case 1:
3576
- const x = K[0], _ = ge[x];
3660
+ const x = K[0], _ = ve[x];
3577
3661
  lt({ pointerId: x, pageX: _.x, pageY: _.y });
3578
3662
  break;
3579
3663
  }
@@ -3594,61 +3678,61 @@ class ya extends un {
3594
3678
  x = -1;
3595
3679
  }
3596
3680
  switch (x) {
3597
- case it.DOLLY:
3681
+ case at.DOLLY:
3598
3682
  if (t.enableZoom === !1)
3599
3683
  return;
3600
- Be(o), r = a.DOLLY;
3684
+ Be(o), i = r.DOLLY;
3601
3685
  break;
3602
- case it.ROTATE:
3686
+ case at.ROTATE:
3603
3687
  if (o.ctrlKey || o.metaKey || o.shiftKey) {
3604
3688
  if (t.enablePan === !1)
3605
3689
  return;
3606
- Fe(o), r = a.PAN;
3690
+ Fe(o), i = r.PAN;
3607
3691
  } else {
3608
3692
  if (t.enableRotate === !1)
3609
3693
  return;
3610
- De(o), r = a.ROTATE;
3694
+ De(o), i = r.ROTATE;
3611
3695
  }
3612
3696
  break;
3613
- case it.PAN:
3697
+ case at.PAN:
3614
3698
  if (o.ctrlKey || o.metaKey || o.shiftKey) {
3615
3699
  if (t.enableRotate === !1)
3616
3700
  return;
3617
- De(o), r = a.ROTATE;
3701
+ De(o), i = r.ROTATE;
3618
3702
  } else {
3619
3703
  if (t.enablePan === !1)
3620
3704
  return;
3621
- Fe(o), r = a.PAN;
3705
+ Fe(o), i = r.PAN;
3622
3706
  }
3623
3707
  break;
3624
3708
  default:
3625
- r = a.NONE;
3709
+ i = r.NONE;
3626
3710
  }
3627
- r !== a.NONE && t.dispatchEvent(Lt);
3711
+ i !== r.NONE && t.dispatchEvent(Bt);
3628
3712
  }
3629
3713
  function et(o) {
3630
- switch (r) {
3631
- case a.ROTATE:
3714
+ switch (i) {
3715
+ case r.ROTATE:
3632
3716
  if (t.enableRotate === !1)
3633
3717
  return;
3634
- ae(o);
3718
+ re(o);
3635
3719
  break;
3636
- case a.DOLLY:
3720
+ case r.DOLLY:
3637
3721
  if (t.enableZoom === !1)
3638
3722
  return;
3639
3723
  Oe(o);
3640
3724
  break;
3641
- case a.PAN:
3725
+ case r.PAN:
3642
3726
  if (t.enablePan === !1)
3643
3727
  return;
3644
3728
  Ye(o);
3645
3729
  break;
3646
3730
  }
3647
3731
  }
3648
- function gt(o) {
3649
- t.enabled === !1 || t.enableZoom === !1 || r !== a.NONE || (o.preventDefault(), t.dispatchEvent(Lt), Ge(vt(o)), t.dispatchEvent(on));
3650
- }
3651
3732
  function vt(o) {
3733
+ t.enabled === !1 || t.enableZoom === !1 || i !== r.NONE || (o.preventDefault(), t.dispatchEvent(Bt), Ge(bt(o)), t.dispatchEvent(cn));
3734
+ }
3735
+ function bt(o) {
3652
3736
  const x = o.deltaMode, _ = {
3653
3737
  clientX: o.clientX,
3654
3738
  clientY: o.clientY,
@@ -3662,146 +3746,146 @@ class ya extends un {
3662
3746
  _.deltaY *= 100;
3663
3747
  break;
3664
3748
  }
3665
- return o.ctrlKey && !ue && (_.deltaY *= 10), _;
3749
+ return o.ctrlKey && !he && (_.deltaY *= 10), _;
3666
3750
  }
3667
- function bt(o) {
3668
- o.key === "Control" && (ue = !0, t.domElement.getRootNode().addEventListener("keyup", $e, { passive: !0, capture: !0 }));
3751
+ function yt(o) {
3752
+ o.key === "Control" && (he = !0, t.domElement.getRootNode().addEventListener("keyup", $e, { passive: !0, capture: !0 }));
3669
3753
  }
3670
3754
  function $e(o) {
3671
- o.key === "Control" && (ue = !1, t.domElement.getRootNode().removeEventListener("keyup", $e, { passive: !0, capture: !0 }));
3755
+ o.key === "Control" && (he = !1, t.domElement.getRootNode().removeEventListener("keyup", $e, { passive: !0, capture: !0 }));
3672
3756
  }
3673
- function ot(o) {
3674
- t.enabled === !1 || t.enablePan === !1 || fe(o);
3757
+ function ct(o) {
3758
+ t.enabled === !1 || t.enablePan === !1 || pe(o);
3675
3759
  }
3676
3760
  function lt(o) {
3677
- switch (xt(o), K.length) {
3761
+ switch (Ct(o), K.length) {
3678
3762
  case 1:
3679
3763
  switch (t.touches.ONE) {
3680
- case at.ROTATE:
3764
+ case it.ROTATE:
3681
3765
  if (t.enableRotate === !1)
3682
3766
  return;
3683
- g(o), r = a.TOUCH_ROTATE;
3767
+ g(o), i = r.TOUCH_ROTATE;
3684
3768
  break;
3685
- case at.PAN:
3769
+ case it.PAN:
3686
3770
  if (t.enablePan === !1)
3687
3771
  return;
3688
- v(o), r = a.TOUCH_PAN;
3772
+ v(o), i = r.TOUCH_PAN;
3689
3773
  break;
3690
3774
  default:
3691
- r = a.NONE;
3775
+ i = r.NONE;
3692
3776
  }
3693
3777
  break;
3694
3778
  case 2:
3695
3779
  switch (t.touches.TWO) {
3696
- case at.DOLLY_PAN:
3780
+ case it.DOLLY_PAN:
3697
3781
  if (t.enableZoom === !1 && t.enablePan === !1)
3698
3782
  return;
3699
- D(o), r = a.TOUCH_DOLLY_PAN;
3783
+ D(o), i = r.TOUCH_DOLLY_PAN;
3700
3784
  break;
3701
- case at.DOLLY_ROTATE:
3785
+ case it.DOLLY_ROTATE:
3702
3786
  if (t.enableZoom === !1 && t.enableRotate === !1)
3703
3787
  return;
3704
- re(o), r = a.TOUCH_DOLLY_ROTATE;
3788
+ se(o), i = r.TOUCH_DOLLY_ROTATE;
3705
3789
  break;
3706
3790
  default:
3707
- r = a.NONE;
3791
+ i = r.NONE;
3708
3792
  }
3709
3793
  break;
3710
3794
  default:
3711
- r = a.NONE;
3795
+ i = r.NONE;
3712
3796
  }
3713
- r !== a.NONE && t.dispatchEvent(Lt);
3797
+ i !== r.NONE && t.dispatchEvent(Bt);
3714
3798
  }
3715
- function yt(o) {
3716
- switch (xt(o), r) {
3717
- case a.TOUCH_ROTATE:
3799
+ function xt(o) {
3800
+ switch (Ct(o), i) {
3801
+ case r.TOUCH_ROTATE:
3718
3802
  if (t.enableRotate === !1)
3719
3803
  return;
3720
3804
  O(o), t.update();
3721
3805
  break;
3722
- case a.TOUCH_PAN:
3806
+ case r.TOUCH_PAN:
3723
3807
  if (t.enablePan === !1)
3724
3808
  return;
3725
3809
  w(o), t.update();
3726
3810
  break;
3727
- case a.TOUCH_DOLLY_PAN:
3811
+ case r.TOUCH_DOLLY_PAN:
3728
3812
  if (t.enableZoom === !1 && t.enablePan === !1)
3729
3813
  return;
3730
- se(o), t.update();
3814
+ oe(o), t.update();
3731
3815
  break;
3732
- case a.TOUCH_DOLLY_ROTATE:
3816
+ case r.TOUCH_DOLLY_ROTATE:
3733
3817
  if (t.enableZoom === !1 && t.enableRotate === !1)
3734
3818
  return;
3735
- oe(o), t.update();
3819
+ ce(o), t.update();
3736
3820
  break;
3737
3821
  default:
3738
- r = a.NONE;
3822
+ i = r.NONE;
3739
3823
  }
3740
3824
  }
3741
3825
  function tt(o) {
3742
3826
  t.enabled !== !1 && o.preventDefault();
3743
3827
  }
3744
- function _t(o) {
3828
+ function Tt(o) {
3745
3829
  K.push(o.pointerId);
3746
3830
  }
3747
- function Tt(o) {
3748
- delete ge[o.pointerId];
3831
+ function Rt(o) {
3832
+ delete ve[o.pointerId];
3749
3833
  for (let x = 0; x < K.length; x++)
3750
3834
  if (K[x] == o.pointerId) {
3751
3835
  K.splice(x, 1);
3752
3836
  return;
3753
3837
  }
3754
3838
  }
3755
- function xt(o) {
3756
- let x = ge[o.pointerId];
3757
- x === void 0 && (x = new me(), ge[o.pointerId] = x), x.set(o.pageX, o.pageY);
3839
+ function Ct(o) {
3840
+ let x = ve[o.pointerId];
3841
+ x === void 0 && (x = new ge(), ve[o.pointerId] = x), x.set(o.pageX, o.pageY);
3758
3842
  }
3759
3843
  function Ue(o) {
3760
3844
  const x = o.pointerId === K[0] ? K[1] : K[0];
3761
- return ge[x];
3845
+ return ve[x];
3762
3846
  }
3763
- t.domElement.addEventListener("contextmenu", tt), t.domElement.addEventListener("pointerdown", P), t.domElement.addEventListener("pointercancel", Q), t.domElement.addEventListener("wheel", gt, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", bt, { passive: !0, capture: !0 }), this.update();
3847
+ t.domElement.addEventListener("contextmenu", tt), t.domElement.addEventListener("pointerdown", R), t.domElement.addEventListener("pointercancel", J), t.domElement.addEventListener("wheel", vt, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", yt, { passive: !0, capture: !0 }), this.update();
3764
3848
  }
3765
3849
  }
3766
- const Ot = (e) => {
3767
- const [n, i] = X(e.options[e.index]), t = () => {
3850
+ const Mt = (e) => {
3851
+ const [n, a] = ee(e.options[e.index]), t = () => {
3768
3852
  e.onToggle(!e.open);
3769
- }, a = (r) => {
3770
- r !== n && (e.onSelect(r), i(r)), e.onToggle(!1);
3853
+ }, r = (i) => {
3854
+ i !== n && (e.onSelect(i), a(i)), e.onToggle(!1);
3771
3855
  };
3772
- return /* @__PURE__ */ d.jsxs("div", { className: `dropdown ${e.up === !0 ? "up" : ""}`, children: [
3773
- /* @__PURE__ */ d.jsx("div", { className: "dropdown-toggle", onClick: t, children: n }),
3774
- e.open && /* @__PURE__ */ d.jsx("ul", { className: "dropdown-menu", children: e.options.map((r) => /* @__PURE__ */ d.jsx("li", { onClick: () => a(r), children: r }, r)) })
3856
+ return /* @__PURE__ */ u.jsxs("div", { className: `dropdown ${e.up === !0 ? "up" : ""}`, children: [
3857
+ /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: t, children: n }),
3858
+ e.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: e.options.map((i) => /* @__PURE__ */ u.jsx("li", { onClick: () => r(i), children: i }, i)) })
3775
3859
  ] });
3776
- }, Xe = _i(function(n, i) {
3777
- const [t, a] = X(!1), r = n.options.indexOf(n.camera.name);
3778
- return /* @__PURE__ */ d.jsxs("div", { className: "CameraWindow", children: [
3779
- /* @__PURE__ */ d.jsx("div", { ref: i, className: "clickable", onClick: () => {
3780
- t && a(!1);
3860
+ }, Xe = _a(function(n, a) {
3861
+ const [t, r] = ee(!1), i = n.options.indexOf(n.camera.name);
3862
+ return /* @__PURE__ */ u.jsxs("div", { className: "CameraWindow", children: [
3863
+ /* @__PURE__ */ u.jsx("div", { ref: a, className: "clickable", onClick: () => {
3864
+ t && r(!1);
3781
3865
  } }),
3782
- /* @__PURE__ */ d.jsx(
3783
- Ot,
3866
+ /* @__PURE__ */ u.jsx(
3867
+ Mt,
3784
3868
  {
3785
- index: r,
3869
+ index: i,
3786
3870
  open: t,
3787
3871
  options: n.options,
3788
3872
  onSelect: n.onSelect,
3789
- onToggle: (c) => {
3790
- a(c);
3873
+ onToggle: (l) => {
3874
+ r(l);
3791
3875
  },
3792
3876
  up: !0
3793
3877
  }
3794
3878
  )
3795
3879
  ] });
3796
3880
  });
3797
- class xa extends Pn {
3881
+ class Ei extends An {
3798
3882
  constructor(n) {
3799
3883
  super({
3800
3884
  extensions: {
3801
3885
  derivatives: !0
3802
3886
  },
3803
- glslVersion: hi,
3804
- side: fn,
3887
+ glslVersion: ha,
3888
+ side: pn,
3805
3889
  transparent: !0,
3806
3890
  uniforms: {
3807
3891
  uScale: {
@@ -3811,7 +3895,7 @@ class xa extends Pn {
3811
3895
  value: n?.divisions !== void 0 ? n?.divisions : 10
3812
3896
  },
3813
3897
  uColor: {
3814
- value: n?.color !== void 0 ? n?.color : new pt(16777215)
3898
+ value: n?.color !== void 0 ? n?.color : new mt(16777215)
3815
3899
  },
3816
3900
  uDistance: {
3817
3901
  value: n?.distance !== void 0 ? n?.distance : 1e4
@@ -3906,17 +3990,17 @@ class xa extends Pn {
3906
3990
  });
3907
3991
  }
3908
3992
  }
3909
- class Ca extends Tn {
3993
+ class Si extends Rn {
3910
3994
  gridMaterial;
3911
3995
  constructor() {
3912
- const n = new xa();
3913
- super(new fi(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3996
+ const n = new Ei();
3997
+ super(new fa(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3914
3998
  }
3915
3999
  update() {
3916
4000
  this.gridMaterial.needsUpdate = !0;
3917
4001
  }
3918
4002
  }
3919
- const Ea = `#include <common>
4003
+ const wi = `#include <common>
3920
4004
  #include <batching_pars_vertex>
3921
4005
  #include <uv_pars_vertex>
3922
4006
  #include <color_pars_vertex>
@@ -3946,7 +4030,7 @@ void main() {
3946
4030
  #include <logdepthbuf_vertex>
3947
4031
  #include <clipping_planes_vertex>
3948
4032
  #include <worldpos_vertex>
3949
- }`, Sa = `
4033
+ }`, Oi = `
3950
4034
  #include <common>
3951
4035
  #include <uv_pars_fragment>
3952
4036
  #include <clipping_planes_pars_fragment>
@@ -3955,27 +4039,27 @@ void main() {
3955
4039
  #include <clipping_planes_fragment>
3956
4040
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
3957
4041
  }`;
3958
- class wa extends Pn {
4042
+ class Mi extends An {
3959
4043
  constructor() {
3960
4044
  super({
3961
4045
  defines: {
3962
4046
  USE_UV: ""
3963
4047
  },
3964
- vertexShader: Ea,
3965
- fragmentShader: Sa
4048
+ vertexShader: wi,
4049
+ fragmentShader: Oi
3966
4050
  });
3967
4051
  }
3968
4052
  }
3969
- let Et = "Renderer", Le, St = !1, cn = !1, q = null, ce = null, He = null, ze = null;
3970
- function $a(e) {
3971
- const n = e.three.app.appID, i = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", a = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", r = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", c = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", l = ve(() => /* @__PURE__ */ new Map(), []), u = ve(() => /* @__PURE__ */ new Map(), []), h = ve(() => /* @__PURE__ */ new Map(), []), f = ve(() => /* @__PURE__ */ new Map(), []), m = ve(() => new pi(), []), y = ve(() => new mi(), []), W = ve(() => new Ca(), []), T = ve(() => new Kt(500), []), Y = ve(() => new Kt(100), []), R = ve(() => new gi(), []), M = ve(() => new vi(), []), $ = ve(() => new wa(), []), I = ve(() => new Rn({
4053
+ let St = "Renderer", Le, wt = !1, un = !1, q = null, ue = null, He = null, ze = null;
4054
+ function Hi(e) {
4055
+ const n = e.three.app.appID, a = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", r = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", i = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", l = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", c = de(() => /* @__PURE__ */ new Map(), []), d = de(() => /* @__PURE__ */ new Map(), []), h = de(() => /* @__PURE__ */ new Map(), []), f = de(() => /* @__PURE__ */ new Map(), []), m = de(() => new pa(), []), y = de(() => new ma(), []), Y = de(() => new Si(), []), T = de(() => new Zt(500), []), W = de(() => new Zt(100), []), P = de(() => new ga(), []), M = de(() => new va(), []), $ = de(() => new Mi(), []), I = de(() => new Pn({
3972
4056
  opacity: 0.33,
3973
4057
  transparent: !0,
3974
4058
  wireframe: !0
3975
4059
  }), []);
3976
4060
  function te(g, v) {
3977
- const S = new Xt(-100, 100, 100, -100, 50, 3e3);
3978
- return S.name = g, S.position.copy(v), S.lookAt(0, 0, 0), l.set(g, S), S;
4061
+ const S = new Jt(-100, 100, 100, -100, 50, 3e3);
4062
+ return S.name = g, S.position.copy(v), S.lookAt(0, 0, 0), c.set(g, S), S;
3979
4063
  }
3980
4064
  const ie = [
3981
4065
  "Renderer",
@@ -3988,63 +4072,63 @@ function $a(e) {
3988
4072
  "Side by Side",
3989
4073
  "Stacked",
3990
4074
  "Quad"
3991
- ], K = he(null), ge = he(null), ue = he(null), _e = he(null), Te = he(null), be = he(null), [N, ye] = X(i !== null ? i : "Single"), [E, we] = X(null), [Re, je] = X(!1), [Pe, Ae] = X(!1), [De, Be] = X(!1), [, Fe] = X(Date.now());
3992
- localStorage.setItem(`${n}_mode`, N), localStorage.setItem(`${n}_tlCam`, t), localStorage.setItem(`${n}_trCam`, a), localStorage.setItem(`${n}_blCam`, r), localStorage.setItem(`${n}_brCam`, c);
3993
- const ae = (g, v) => {
3994
- const S = u.get(g.name);
3995
- S !== void 0 && S.dispose(), u.delete(g.name);
4075
+ ], K = ae(null), ve = ae(null), he = ae(null), _e = ae(null), Te = ae(null), be = ae(null), [N, ye] = ee(a !== null ? a : "Single"), [E, we] = ee(null), [Re, je] = ee(!1), [Pe, Ae] = ee(!1), [De, Be] = ee(!1), [, Fe] = ee(Date.now());
4076
+ localStorage.setItem(`${n}_mode`, N), localStorage.setItem(`${n}_tlCam`, t), localStorage.setItem(`${n}_trCam`, r), localStorage.setItem(`${n}_blCam`, i), localStorage.setItem(`${n}_brCam`, l);
4077
+ const re = (g, v) => {
4078
+ const S = d.get(g.name);
4079
+ S !== void 0 && S.dispose(), d.delete(g.name);
3996
4080
  const D = h.get(g.name);
3997
4081
  D !== void 0 && (m.remove(D), D.dispose()), h.delete(g.name);
3998
- const re = new ya(g, v);
3999
- switch (re.enableDamping = !0, re.dampingFactor = 0.05, g.name) {
4082
+ const se = new Ci(g, v);
4083
+ switch (se.enableDamping = !0, se.dampingFactor = 0.05, g.name) {
4000
4084
  case "Top":
4001
4085
  case "Bottom":
4002
4086
  case "Left":
4003
4087
  case "Right":
4004
4088
  case "Front":
4005
4089
  case "Back":
4006
- re.enableRotate = !1;
4090
+ se.enableRotate = !1;
4007
4091
  break;
4008
4092
  }
4009
- if (u.set(g.name, re), g instanceof At) {
4010
- const O = new xi(g);
4093
+ if (d.set(g.name, se), g instanceof kt) {
4094
+ const O = new xa(g);
4011
4095
  h.set(g.name, O), m.add(O);
4012
4096
  }
4013
4097
  }, Oe = (g) => {
4014
4098
  const v = h.get(g.name);
4015
4099
  v !== void 0 && (m.remove(v), v.dispose(), h.delete(g.name));
4016
- const S = u.get(g.name);
4017
- S !== void 0 && (S.dispose(), u.delete(g.name));
4100
+ const S = d.get(g.name);
4101
+ S !== void 0 && (S.dispose(), d.delete(g.name));
4018
4102
  }, Ye = () => {
4019
- u.forEach((g, v) => {
4103
+ d.forEach((g, v) => {
4020
4104
  g.dispose();
4021
4105
  const S = h.get(v);
4022
- S !== void 0 && (m.remove(S), S.dispose()), h.delete(v), u.delete(v);
4023
- }), u.clear(), h.clear();
4106
+ S !== void 0 && (m.remove(S), S.dispose()), h.delete(v), d.delete(v);
4107
+ }), d.clear(), h.clear();
4024
4108
  }, Ge = () => {
4025
4109
  switch (N) {
4026
4110
  case "Single":
4027
- ae(q, ue.current);
4111
+ re(q, he.current);
4028
4112
  break;
4029
4113
  case "Side by Side":
4030
4114
  case "Stacked":
4031
- ae(q, ue.current), ae(ce, _e.current);
4115
+ re(q, he.current), re(ue, _e.current);
4032
4116
  break;
4033
4117
  case "Quad":
4034
- ae(q, ue.current), ae(ce, _e.current), ae(He, Te.current), ae(ze, be.current);
4118
+ re(q, he.current), re(ue, _e.current), re(He, Te.current), re(ze, be.current);
4035
4119
  break;
4036
4120
  }
4037
4121
  };
4038
4122
  ke(() => {
4039
- const g = new bi({
4123
+ const g = new ba({
4040
4124
  canvas: K.current,
4041
4125
  stencil: !1
4042
4126
  });
4043
4127
  g.autoClear = !1, g.shadowMap.enabled = !0, g.setPixelRatio(devicePixelRatio), g.setClearColor(0), e.three.renderer = g, we(g);
4044
4128
  }, []), ke(() => {
4045
- m.name = "Debug Scene", m.uuid = "", y.name = "helpers", m.add(y), y.add(W), T.name = "axisHelper", y.add(T), Y.name = "interactionHelper", y.add(Y), Y.visible = !1, te("Top", new J(0, 1e3, 0)), te("Bottom", new J(0, -1e3, 0)), te("Left", new J(-1e3, 0, 0)), te("Right", new J(1e3, 0, 0)), te("Front", new J(0, 0, 1e3)), te("Back", new J(0, 0, -1e3)), te("Orthographic", new J(1e3, 1e3, 1e3));
4046
- const g = new At(60, 1, 50, 3e3);
4047
- g.name = "Debug", g.position.set(500, 500, 500), g.lookAt(0, 0, 0), l.set("Debug", g), q = l.get(localStorage.getItem(`${n}_tlCam`)), ce = l.get(localStorage.getItem(`${n}_trCam`)), He = l.get(localStorage.getItem(`${n}_blCam`)), ze = l.get(localStorage.getItem(`${n}_brCam`));
4129
+ m.name = "Debug Scene", m.uuid = "", y.name = "helpers", m.add(y), y.add(Y), T.name = "axisHelper", y.add(T), W.name = "interactionHelper", y.add(W), W.visible = !1, te("Top", new Z(0, 1e3, 0)), te("Bottom", new Z(0, -1e3, 0)), te("Left", new Z(-1e3, 0, 0)), te("Right", new Z(1e3, 0, 0)), te("Front", new Z(0, 0, 1e3)), te("Back", new Z(0, 0, -1e3)), te("Orthographic", new Z(1e3, 1e3, 1e3));
4130
+ const g = new kt(60, 1, 50, 3e3);
4131
+ g.name = "Debug", g.position.set(500, 500, 500), g.lookAt(0, 0, 0), c.set("Debug", g), q = c.get(localStorage.getItem(`${n}_tlCam`)), ue = c.get(localStorage.getItem(`${n}_trCam`)), He = c.get(localStorage.getItem(`${n}_blCam`)), ze = c.get(localStorage.getItem(`${n}_brCam`));
4048
4132
  }, []), ke(() => {
4049
4133
  const g = () => {
4050
4134
  f.forEach((O) => {
@@ -4056,19 +4140,19 @@ function $a(e) {
4056
4140
  let w;
4057
4141
  switch (O.type) {
4058
4142
  case "DirectionalLight":
4059
- w = new wi(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4143
+ w = new wa(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4060
4144
  break;
4061
4145
  case "HemisphereLight":
4062
- w = new Si(O, 250), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4146
+ w = new Sa(O, 250), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4063
4147
  break;
4064
4148
  case "RectAreaLight":
4065
- w = new va(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4149
+ w = new yi(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4066
4150
  break;
4067
4151
  case "PointLight":
4068
- w = new Ei(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4152
+ w = new Ea(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4069
4153
  break;
4070
4154
  case "SpotLight":
4071
- w = new Ci(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4155
+ w = new Ca(O), w.name = `${O.name}Helper`, f.set(O.name, w), y.add(w);
4072
4156
  break;
4073
4157
  }
4074
4158
  }
@@ -4078,54 +4162,54 @@ function $a(e) {
4078
4162
  const w = e.scenes.get(O.value.name);
4079
4163
  if (w !== void 0) {
4080
4164
  const L = new w();
4081
- e.onSceneSet !== void 0 && e.onSceneSet(L), Le = L, e.three.scene = Le, m.add(Le), cn = !0, v();
4165
+ e.onSceneSet !== void 0 && e.onSceneSet(L), Le = L, e.three.scene = Le, m.add(Le), un = !0, v();
4082
4166
  }
4083
4167
  }, D = (O) => {
4084
4168
  const w = O.value, L = e.three.scene?.getObjectByProperty("uuid", w.uuid);
4085
- L !== void 0 && l.set(w.name, L), Fe(Date.now());
4086
- }, re = (O) => {
4087
- l.delete(O.value.name), Fe(Date.now());
4169
+ L !== void 0 && c.set(w.name, L), Fe(Date.now());
4170
+ }, se = (O) => {
4171
+ c.delete(O.value.name), Fe(Date.now());
4088
4172
  };
4089
- return B.addEventListener(F.SET_SCENE, S), B.addEventListener(F.ADD_CAMERA, D), B.addEventListener(F.REMOVE_CAMERA, re), () => {
4090
- B.removeEventListener(F.SET_SCENE, S), B.removeEventListener(F.ADD_CAMERA, D), B.removeEventListener(F.REMOVE_CAMERA, re);
4173
+ return B.addEventListener(F.SET_SCENE, S), B.addEventListener(F.ADD_CAMERA, D), B.addEventListener(F.REMOVE_CAMERA, se), () => {
4174
+ B.removeEventListener(F.SET_SCENE, S), B.removeEventListener(F.ADD_CAMERA, D), B.removeEventListener(F.REMOVE_CAMERA, se);
4091
4175
  };
4092
4176
  }, []), ke(() => {
4093
4177
  if (E === null)
4094
4178
  return;
4095
- let g = window.innerWidth, v = window.innerHeight, S = Math.floor(g / 2), D = Math.floor(v / 2), re = -1;
4179
+ let g = window.innerWidth, v = window.innerHeight, S = Math.floor(g / 2), D = Math.floor(v / 2), se = -1;
4096
4180
  const O = () => {
4097
4181
  g = window.innerWidth - 300, v = window.innerHeight, S = Math.floor(g / 2), D = Math.floor(v / 2), E.setSize(g, v);
4098
- let P = g, G = v;
4182
+ let R = g, G = v;
4099
4183
  switch (N) {
4100
4184
  case "Side by Side":
4101
- P = S, G = v;
4185
+ R = S, G = v;
4102
4186
  break;
4103
4187
  case "Stacked":
4104
- P = g, G = D;
4188
+ R = g, G = D;
4105
4189
  break;
4106
4190
  case "Quad":
4107
- P = S, G = D;
4191
+ R = S, G = D;
4108
4192
  break;
4109
4193
  }
4110
- l.forEach((Q) => {
4111
- Q instanceof Xt ? (Q.left = P / -2, Q.right = P / 2, Q.top = G / 2, Q.bottom = G / -2, Q.updateProjectionMatrix()) : Q instanceof At && (Q.aspect = P / G, Q.updateProjectionMatrix(), h.get(Q.name)?.update());
4194
+ c.forEach((J) => {
4195
+ J instanceof Jt ? (J.left = R / -2, J.right = R / 2, J.top = G / 2, J.bottom = G / -2, J.updateProjectionMatrix()) : J instanceof kt && (J.aspect = R / G, J.updateProjectionMatrix(), h.get(J.name)?.update());
4112
4196
  });
4113
4197
  }, w = () => {
4114
4198
  E.setViewport(0, 0, g, v), E.setScissor(0, 0, g, v), E.render(m, q);
4115
4199
  }, L = () => {
4116
4200
  if (N === "Side by Side")
4117
- E.setViewport(0, 0, S, v), E.setScissor(0, 0, S, v), E.render(m, q), E.setViewport(S, 0, S, v), E.setScissor(S, 0, S, v), E.render(m, ce);
4201
+ E.setViewport(0, 0, S, v), E.setScissor(0, 0, S, v), E.render(m, q), E.setViewport(S, 0, S, v), E.setScissor(S, 0, S, v), E.render(m, ue);
4118
4202
  else {
4119
- const P = v - D;
4120
- E.setViewport(0, P, g, D), E.setScissor(0, P, g, D), E.render(m, q), E.setViewport(0, 0, g, D), E.setScissor(0, 0, g, D), E.render(m, ce);
4203
+ const R = v - D;
4204
+ E.setViewport(0, R, g, D), E.setScissor(0, R, g, D), E.render(m, q), E.setViewport(0, 0, g, D), E.setScissor(0, 0, g, D), E.render(m, ue);
4121
4205
  }
4122
- }, se = () => {
4123
- let P = 0, G = 0;
4124
- G = v - D, P = 0, E.setViewport(P, G, S, D), E.setScissor(P, G, S, D), E.render(m, q), P = S, E.setViewport(P, G, S, D), E.setScissor(P, G, S, D), E.render(m, ce), G = 0, P = 0, E.setViewport(P, G, S, D), E.setScissor(P, G, S, D), E.render(m, He), P = S, E.setViewport(P, G, S, D), E.setScissor(P, G, S, D), E.render(m, ze);
4125
4206
  }, oe = () => {
4126
- switch (u.forEach((P) => {
4127
- P.update();
4128
- }), e.onSceneUpdate !== void 0 && cn && e.onSceneUpdate(Le), E.clear(), N) {
4207
+ let R = 0, G = 0;
4208
+ G = v - D, R = 0, E.setViewport(R, G, S, D), E.setScissor(R, G, S, D), E.render(m, q), R = S, E.setViewport(R, G, S, D), E.setScissor(R, G, S, D), E.render(m, ue), G = 0, R = 0, E.setViewport(R, G, S, D), E.setScissor(R, G, S, D), E.render(m, He), R = S, E.setViewport(R, G, S, D), E.setScissor(R, G, S, D), E.render(m, ze);
4209
+ }, ce = () => {
4210
+ switch (d.forEach((R) => {
4211
+ R.update();
4212
+ }), e.onSceneUpdate !== void 0 && un && e.onSceneUpdate(Le), E.clear(), N) {
4129
4213
  case "Single":
4130
4214
  w();
4131
4215
  break;
@@ -4134,122 +4218,122 @@ function $a(e) {
4134
4218
  L();
4135
4219
  break;
4136
4220
  case "Quad":
4137
- se();
4221
+ oe();
4138
4222
  break;
4139
4223
  }
4140
- re = requestAnimationFrame(oe);
4224
+ se = requestAnimationFrame(ce);
4141
4225
  };
4142
- return Ge(), window.addEventListener("resize", O), O(), oe(), () => {
4143
- window.removeEventListener("resize", O), cancelAnimationFrame(re), re = -1;
4226
+ return Ge(), window.addEventListener("resize", O), O(), ce(), () => {
4227
+ window.removeEventListener("resize", O), cancelAnimationFrame(se), se = -1;
4144
4228
  };
4145
4229
  }, [N, E]), ke(() => {
4146
4230
  if (E !== null) {
4147
- const g = new yi(), v = new me(), S = (w, L, se, oe) => {
4231
+ const g = new ya(), v = new ge(), S = (w, L, oe, ce) => {
4148
4232
  switch (N) {
4149
4233
  case "Quad":
4150
- w < se ? L < oe ? g.setFromCamera(v, q) : g.setFromCamera(v, He) : L < oe ? g.setFromCamera(v, ce) : g.setFromCamera(v, ze);
4234
+ w < oe ? L < ce ? g.setFromCamera(v, q) : g.setFromCamera(v, He) : L < ce ? g.setFromCamera(v, ue) : g.setFromCamera(v, ze);
4151
4235
  break;
4152
4236
  case "Side by Side":
4153
- w < se ? g.setFromCamera(v, q) : g.setFromCamera(v, ce);
4237
+ w < oe ? g.setFromCamera(v, q) : g.setFromCamera(v, ue);
4154
4238
  break;
4155
4239
  case "Single":
4156
4240
  g.setFromCamera(v, q);
4157
4241
  break;
4158
4242
  case "Stacked":
4159
- L < oe ? g.setFromCamera(v, q) : g.setFromCamera(v, ce);
4243
+ L < ce ? g.setFromCamera(v, q) : g.setFromCamera(v, ue);
4160
4244
  break;
4161
4245
  }
4162
4246
  }, D = (w) => {
4163
- if (!St)
4247
+ if (!wt)
4164
4248
  return;
4165
- const L = new me();
4249
+ const L = new ge();
4166
4250
  E.getSize(L);
4167
- const se = Math.min(w.clientX, L.x), oe = Math.min(w.clientY, L.y);
4168
- v.x = st(se, 0, L.x, -1, 1), v.y = st(oe, 0, L.y, 1, -1);
4169
- const P = L.x / 2, G = L.y / 2, Q = () => {
4170
- se < P ? v.x = st(se, 0, P, -1, 1) : v.x = st(se, P, L.x, -1, 1);
4251
+ const oe = Math.min(w.clientX, L.x), ce = Math.min(w.clientY, L.y);
4252
+ v.x = st(oe, 0, L.x, -1, 1), v.y = st(ce, 0, L.y, 1, -1);
4253
+ const R = L.x / 2, G = L.y / 2, J = () => {
4254
+ oe < R ? v.x = st(oe, 0, R, -1, 1) : v.x = st(oe, R, L.x, -1, 1);
4171
4255
  }, Ie = () => {
4172
- oe < G ? v.y = st(oe, 0, G, 1, -1) : v.y = st(oe, G, L.y, 1, -1);
4256
+ ce < G ? v.y = st(ce, 0, G, 1, -1) : v.y = st(ce, G, L.y, 1, -1);
4173
4257
  };
4174
4258
  switch (N) {
4175
4259
  case "Quad":
4176
- Q(), Ie();
4260
+ J(), Ie();
4177
4261
  break;
4178
4262
  case "Side by Side":
4179
- Q();
4263
+ J();
4180
4264
  break;
4181
4265
  case "Stacked":
4182
4266
  Ie(), Ie();
4183
4267
  break;
4184
4268
  }
4185
- S(se, oe, P, G);
4269
+ S(oe, ce, R, G);
4186
4270
  const et = g.intersectObjects(Le.children);
4187
- et.length > 0 && Y.position.copy(et[0].point);
4188
- }, re = (w) => {
4189
- if (!St)
4271
+ et.length > 0 && W.position.copy(et[0].point);
4272
+ }, se = (w) => {
4273
+ if (!wt)
4190
4274
  return;
4191
- const L = new me();
4275
+ const L = new ge();
4192
4276
  if (E.getSize(L), w.clientX >= L.x)
4193
4277
  return;
4194
4278
  D(w);
4195
- const se = g.intersectObjects(Le.children);
4196
- se.length > 0 && e.three.getObject(se[0].object.uuid);
4197
- }, O = ge.current;
4198
- return O.addEventListener("mousemove", D, !1), O.addEventListener("click", re, !1), () => {
4199
- O.removeEventListener("mousemove", D), O.removeEventListener("click", re);
4279
+ const oe = g.intersectObjects(Le.children);
4280
+ oe.length > 0 && e.three.getObject(oe[0].object.uuid);
4281
+ }, O = ve.current;
4282
+ return O.addEventListener("mousemove", D, !1), O.addEventListener("click", se, !1), () => {
4283
+ O.removeEventListener("mousemove", D), O.removeEventListener("click", se);
4200
4284
  };
4201
4285
  }
4202
4286
  }, [N, E]);
4203
- const fe = [];
4204
- return l.forEach((g, v) => {
4205
- fe.push(v);
4206
- }), /* @__PURE__ */ d.jsxs("div", { className: "multiview", children: [
4207
- /* @__PURE__ */ d.jsx("canvas", { ref: K }),
4208
- E !== null && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
4209
- /* @__PURE__ */ d.jsxs("div", { className: `cameras ${N === "Single" || N === "Stacked" ? "single" : ""}`, ref: ge, children: [
4210
- N === "Single" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx(Xe, { camera: q, options: fe, ref: ue, onSelect: (g) => {
4211
- u.get(q.name)?.dispose();
4212
- const v = l.get(g);
4213
- v !== void 0 && (Oe(q), q = v, localStorage.setItem(`${n}_tlCam`, v.name), ae(v, ue.current));
4287
+ const pe = [];
4288
+ return c.forEach((g, v) => {
4289
+ pe.push(v);
4290
+ }), /* @__PURE__ */ u.jsxs("div", { className: "multiview", children: [
4291
+ /* @__PURE__ */ u.jsx("canvas", { ref: K }),
4292
+ E !== null && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
4293
+ /* @__PURE__ */ u.jsxs("div", { className: `cameras ${N === "Single" || N === "Stacked" ? "single" : ""}`, ref: ve, children: [
4294
+ N === "Single" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx(Xe, { camera: q, options: pe, ref: he, onSelect: (g) => {
4295
+ d.get(q.name)?.dispose();
4296
+ const v = c.get(g);
4297
+ v !== void 0 && (Oe(q), q = v, localStorage.setItem(`${n}_tlCam`, v.name), re(v, he.current));
4214
4298
  } }) }),
4215
- (N === "Side by Side" || N === "Stacked") && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
4216
- /* @__PURE__ */ d.jsx(Xe, { camera: q, options: fe, ref: ue, onSelect: (g) => {
4217
- u.get(q.name)?.dispose();
4218
- const v = l.get(g);
4219
- v !== void 0 && (Oe(q), q = v, localStorage.setItem(`${n}_tlCam`, v.name), ae(v, ue.current));
4299
+ (N === "Side by Side" || N === "Stacked") && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
4300
+ /* @__PURE__ */ u.jsx(Xe, { camera: q, options: pe, ref: he, onSelect: (g) => {
4301
+ d.get(q.name)?.dispose();
4302
+ const v = c.get(g);
4303
+ v !== void 0 && (Oe(q), q = v, localStorage.setItem(`${n}_tlCam`, v.name), re(v, he.current));
4220
4304
  } }),
4221
- /* @__PURE__ */ d.jsx(Xe, { camera: ce, options: fe, ref: _e, onSelect: (g) => {
4222
- u.get(ce.name)?.dispose();
4223
- const v = l.get(g);
4224
- v !== void 0 && (Oe(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), ae(v, _e.current));
4305
+ /* @__PURE__ */ u.jsx(Xe, { camera: ue, options: pe, ref: _e, onSelect: (g) => {
4306
+ d.get(ue.name)?.dispose();
4307
+ const v = c.get(g);
4308
+ v !== void 0 && (Oe(ue), ue = v, localStorage.setItem(`${n}_trCam`, v.name), re(v, _e.current));
4225
4309
  } })
4226
4310
  ] }),
4227
- N === "Quad" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
4228
- /* @__PURE__ */ d.jsx(Xe, { camera: q, options: fe, ref: ue, onSelect: (g) => {
4229
- u.get(q.name)?.dispose();
4230
- const v = l.get(g);
4231
- v !== void 0 && (Oe(q), q = v, localStorage.setItem(`${n}_tlCam`, v.name), ae(v, ue.current));
4311
+ N === "Quad" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
4312
+ /* @__PURE__ */ u.jsx(Xe, { camera: q, options: pe, ref: he, onSelect: (g) => {
4313
+ d.get(q.name)?.dispose();
4314
+ const v = c.get(g);
4315
+ v !== void 0 && (Oe(q), q = v, localStorage.setItem(`${n}_tlCam`, v.name), re(v, he.current));
4232
4316
  } }),
4233
- /* @__PURE__ */ d.jsx(Xe, { camera: ce, options: fe, ref: _e, onSelect: (g) => {
4234
- u.get(ce.name)?.dispose();
4235
- const v = l.get(g);
4236
- v !== void 0 && (Oe(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), ae(v, _e.current));
4317
+ /* @__PURE__ */ u.jsx(Xe, { camera: ue, options: pe, ref: _e, onSelect: (g) => {
4318
+ d.get(ue.name)?.dispose();
4319
+ const v = c.get(g);
4320
+ v !== void 0 && (Oe(ue), ue = v, localStorage.setItem(`${n}_trCam`, v.name), re(v, _e.current));
4237
4321
  } }),
4238
- /* @__PURE__ */ d.jsx(Xe, { camera: He, options: fe, ref: Te, onSelect: (g) => {
4239
- u.get(He.name)?.dispose();
4240
- const v = l.get(g);
4241
- v !== void 0 && (Oe(He), He = v, localStorage.setItem(`${n}_blCam`, v.name), ae(v, Te.current));
4322
+ /* @__PURE__ */ u.jsx(Xe, { camera: He, options: pe, ref: Te, onSelect: (g) => {
4323
+ d.get(He.name)?.dispose();
4324
+ const v = c.get(g);
4325
+ v !== void 0 && (Oe(He), He = v, localStorage.setItem(`${n}_blCam`, v.name), re(v, Te.current));
4242
4326
  } }),
4243
- /* @__PURE__ */ d.jsx(Xe, { camera: ze, options: fe, ref: be, onSelect: (g) => {
4244
- u.get(ze.name)?.dispose();
4245
- const v = l.get(g);
4246
- v !== void 0 && (Oe(ze), ze = v, localStorage.setItem(`${n}_brCam`, v.name), ae(v, be.current));
4327
+ /* @__PURE__ */ u.jsx(Xe, { camera: ze, options: pe, ref: be, onSelect: (g) => {
4328
+ d.get(ze.name)?.dispose();
4329
+ const v = c.get(g);
4330
+ v !== void 0 && (Oe(ze), ze = v, localStorage.setItem(`${n}_brCam`, v.name), re(v, be.current));
4247
4331
  } })
4248
4332
  ] })
4249
4333
  ] }),
4250
- /* @__PURE__ */ d.jsxs("div", { className: "settings", children: [
4251
- /* @__PURE__ */ d.jsx(
4252
- Ot,
4334
+ /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
4335
+ /* @__PURE__ */ u.jsx(
4336
+ Mt,
4253
4337
  {
4254
4338
  index: Se.indexOf(N),
4255
4339
  options: Se,
@@ -4262,16 +4346,16 @@ function $a(e) {
4262
4346
  }
4263
4347
  }
4264
4348
  ),
4265
- /* @__PURE__ */ d.jsx(
4266
- Ot,
4349
+ /* @__PURE__ */ u.jsx(
4350
+ Mt,
4267
4351
  {
4268
- index: ie.indexOf(Et),
4352
+ index: ie.indexOf(St),
4269
4353
  options: ie,
4270
4354
  onSelect: (g) => {
4271
- if (g !== Et)
4272
- switch (Et = g, Et) {
4355
+ if (g !== St)
4356
+ switch (St = g, St) {
4273
4357
  case "Depth":
4274
- m.overrideMaterial = R;
4358
+ m.overrideMaterial = P;
4275
4359
  break;
4276
4360
  case "Normals":
4277
4361
  m.overrideMaterial = M;
@@ -4294,8 +4378,8 @@ function $a(e) {
4294
4378
  }
4295
4379
  }
4296
4380
  ),
4297
- /* @__PURE__ */ d.jsx(
4298
- Ot,
4381
+ /* @__PURE__ */ u.jsx(
4382
+ Mt,
4299
4383
  {
4300
4384
  index: 0,
4301
4385
  options: [
@@ -4303,7 +4387,7 @@ function $a(e) {
4303
4387
  "Selection Mode"
4304
4388
  ],
4305
4389
  onSelect: (g) => {
4306
- St = g === "Selection Mode", Y.visible = St;
4390
+ wt = g === "Selection Mode", W.visible = wt;
4307
4391
  },
4308
4392
  open: De,
4309
4393
  onToggle: (g) => {
@@ -4315,52 +4399,52 @@ function $a(e) {
4315
4399
  ] })
4316
4400
  ] });
4317
4401
  }
4318
- function Ua(e) {
4319
- return /* @__PURE__ */ d.jsxs("div", { className: "editor", ref: e.ref, style: e.style, children: [
4320
- /* @__PURE__ */ d.jsx("div", { className: "header", children: e.header }),
4402
+ function zi(e) {
4403
+ return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: e.ref, style: e.style, children: [
4404
+ /* @__PURE__ */ u.jsx("div", { className: "header", children: e.header }),
4321
4405
  e.children,
4322
- /* @__PURE__ */ d.jsx("div", { className: "footer", children: e.footer })
4406
+ /* @__PURE__ */ u.jsx("div", { className: "footer", children: e.footer })
4323
4407
  ] });
4324
4408
  }
4325
4409
  export {
4326
- Ut as Accordion,
4327
- ka as Application,
4328
- Mt as BaseRemote,
4410
+ zt as Accordion,
4411
+ Di as Application,
4412
+ _t as BaseRemote,
4329
4413
  Bn as ChildObject,
4330
- Gi as ContainerObject,
4331
- Hi as Draggable,
4332
- Ui as DraggableItem,
4333
- zi as Dropdown,
4334
- Yi as DropdownItem,
4335
- Ua as Editor,
4336
- ga as Inspector,
4337
- $a as MultiView,
4414
+ Ga as ContainerObject,
4415
+ Ha as Draggable,
4416
+ Ua as DraggableItem,
4417
+ za as Dropdown,
4418
+ Ya as DropdownItem,
4419
+ zi as Editor,
4420
+ bi as Inspector,
4421
+ Hi as MultiView,
4338
4422
  Ln as NavButton,
4339
- ja as RemoteComponents,
4340
- La as RemoteController,
4341
- $t as RemoteTheatre,
4342
- Ia as RemoteThree,
4343
- Na as RemoteTweakpane,
4344
- Fa as SceneInspector,
4345
- Ba as SidePanel,
4423
+ Ii as RemoteComponents,
4424
+ Fi as RemoteController,
4425
+ Ht as RemoteTheatre,
4426
+ Li as RemoteThree,
4427
+ Bi as RemoteTweakpane,
4428
+ Ui as SceneInspector,
4429
+ $i as SidePanel,
4346
4430
  F as ToolEvents,
4347
4431
  Je as capitalize,
4348
4432
  Ze as clamp,
4349
- Pi as colorToHex,
4433
+ Pa as colorToHex,
4350
4434
  B as debugDispatcher,
4351
- Ra as defaultTheatreCallback,
4435
+ Ai as defaultTheatreCallback,
4352
4436
  In as dispose,
4353
- ki as disposeMaterial,
4354
- Aa as disposeTexture,
4355
- Pa as distance,
4437
+ ka as disposeMaterial,
4438
+ ji as disposeTexture,
4439
+ ki as distance,
4356
4440
  Dn as hierarchyUUID,
4357
- Ri as isColor,
4358
- Jt as mix,
4359
- jn as noop,
4360
- Zt as normalize,
4361
- Ti as randomID,
4362
- Ai as resetThreeObjects,
4363
- mt as round,
4364
- Da as theatreEditorApp,
4365
- Bt as totalThreeObjects
4441
+ Ra as isColor,
4442
+ en as mix,
4443
+ Ut as noop,
4444
+ Qt as normalize,
4445
+ Ta as randomID,
4446
+ Aa as resetThreeObjects,
4447
+ gt as round,
4448
+ Ni as theatreEditorApp,
4449
+ Ft as totalThreeObjects
4366
4450
  };