@tomorrowevening/hermes 0.0.12 → 0.0.13

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