@tomorrowevening/hermes 0.0.7 → 0.0.8

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,43 +1,43 @@
1
- var sn = Object.defineProperty;
2
- var cn = (t, n, r) => n in t ? sn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[n] = r;
3
- var $ = (t, n, r) => (cn(t, typeof n != "symbol" ? n + "" : n, r), r);
4
- import { EventDispatcher as Yt, Mesh as Vt, Camera as ln, PerspectiveCamera as lt, OrthographicCamera as Ct, Light as un, Texture as zt, CubeTexture as dn, RepeatWrapping as jt, Color as St, Matrix4 as fn, Vector3 as G, Euler as hn, Ray as mn, Plane as pn, MathUtils as gn, MOUSE as De, TOUCH as _e, Quaternion as Mt, Spherical as kt, Vector2 as ae, ShaderMaterial as vn, GLSL3 as bn, DoubleSide as yn, PlaneGeometry as En, MeshNormalMaterial as wn, MeshBasicMaterial as xn, Scene as Cn, AxesHelper as Sn, CameraHelper as On } from "three";
5
- import { getProject as Tn } from "@theatre/core";
6
- import { Pane as Pn } from "tweakpane";
7
- import * as Rn from "@tweakpane/plugin-essentials";
8
- import Wt, { useState as re, useRef as Se, useEffect as qe, Component as jn, forwardRef as Mn } from "react";
9
- import { Reorder as Ht } from "framer-motion";
1
+ var on = Object.defineProperty;
2
+ var sn = (t, n, r) => n in t ? on(t, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[n] = r;
3
+ var $ = (t, n, r) => (sn(t, typeof n != "symbol" ? n + "" : n, r), r);
4
+ import { EventDispatcher as Gt, Texture as Yt, CubeTexture as cn, RepeatWrapping as Pt, Color as Ct, Matrix4 as ln, Vector3 as G, Euler as un, Ray as dn, Plane as fn, MathUtils as hn, MOUSE as De, TOUCH as _e, Quaternion as Rt, Spherical as jt, Vector2 as ae, ShaderMaterial as pn, GLSL3 as mn, DoubleSide as gn, Mesh as vn, PlaneGeometry as bn, PerspectiveCamera as bt, MeshNormalMaterial as yn, MeshBasicMaterial as En, Scene as wn, AxesHelper as xn, OrthographicCamera as Vt, CameraHelper as Cn } from "three";
5
+ import { getProject as Sn } from "@theatre/core";
6
+ import { Pane as On } from "tweakpane";
7
+ import * as Tn from "@tweakpane/plugin-essentials";
8
+ import zt, { useState as re, useRef as Se, useEffect as qe, Component as Mn, forwardRef as Pn } from "react";
9
+ import { Reorder as Wt } from "framer-motion";
10
10
  import We from "@theatre/studio";
11
- function ya(t, n, r) {
11
+ function va(t, n, r) {
12
12
  return Math.min(n, Math.max(t, r));
13
13
  }
14
- function Ea(t, n) {
14
+ function ba(t, n) {
15
15
  const r = t - n;
16
16
  return Math.sqrt(r * r);
17
17
  }
18
- function kn() {
18
+ function Rn() {
19
19
  return Math.round(Math.random() * 1e6).toString();
20
20
  }
21
- function Dn(t) {
21
+ function jn(t) {
22
22
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
23
23
  }
24
- function _n(t) {
24
+ function kn(t) {
25
25
  const n = Math.round(t.r * 255), r = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (l) => {
26
26
  const h = l.toString(16);
27
27
  return h.length === 1 ? "0" + h : h;
28
28
  }, d = i(n), c = i(r), s = i(e);
29
29
  return "#" + d + c + s;
30
30
  }
31
- let Dt = 0;
32
- const Kt = (t) => {
31
+ let kt = 0;
32
+ const Ht = (t) => {
33
33
  if (!t)
34
34
  return;
35
35
  let n = t.name.replace(" ", "");
36
- n.length === 0 && (n = `obj_${Dt}`), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, Dt++, t.children.forEach((r) => {
37
- Kt(r);
36
+ n.length === 0 && (n = `obj_${kt}`), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, kt++, t.children.forEach((r) => {
37
+ Ht(r);
38
38
  });
39
39
  };
40
- class wa {
40
+ class ya {
41
41
  constructor(n, r, e) {
42
42
  $(this, "channel");
43
43
  $(this, "components", /* @__PURE__ */ new Map());
@@ -73,7 +73,7 @@ class wa {
73
73
  n && (this._mode = "editor", document.title += " - Editor");
74
74
  }
75
75
  }
76
- const I = new Yt(), N = {
76
+ const A = new Gt(), N = {
77
77
  CUSTOM: "ToolEvents::custom",
78
78
  // Components
79
79
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -87,7 +87,7 @@ const I = new Yt(), N = {
87
87
  CREATE_TEXTURE: "ToolEvents::createTexture",
88
88
  REQUEST_METHOD: "ToolEvents::requestMethod"
89
89
  };
90
- class ut {
90
+ class lt {
91
91
  constructor(n) {
92
92
  $(this, "app");
93
93
  this.app = n;
@@ -95,7 +95,7 @@ class ut {
95
95
  dispose() {
96
96
  }
97
97
  }
98
- class xa extends ut {
98
+ class Ea extends lt {
99
99
  selectDropdown(n, r) {
100
100
  this.app.send({
101
101
  event: "selectComponent",
@@ -117,9 +117,9 @@ class xa extends ut {
117
117
  });
118
118
  }
119
119
  }
120
- const Xt = () => {
120
+ const Kt = () => {
121
121
  };
122
- class Ca extends ut {
122
+ class wa extends lt {
123
123
  constructor(r, e, i) {
124
124
  super(r);
125
125
  $(this, "project");
@@ -127,7 +127,7 @@ class Ca extends ut {
127
127
  $(this, "sheetObjects");
128
128
  $(this, "sheetObjectCBs");
129
129
  $(this, "sheetObjectUnsubscribe");
130
- this.project = Tn(e, i), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
130
+ this.project = Sn(e, i), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
131
131
  }
132
132
  dispose() {
133
133
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -153,12 +153,12 @@ class Ca extends ut {
153
153
  let l = this.sheetObjects.get(s);
154
154
  if (l !== void 0)
155
155
  return l = c.object(e, { ...i, ...l.value }, { reconfigure: !0 }), l;
156
- l = c.object(e, i), this.sheetObjects.set(s, l), this.sheetObjectCBs.set(s, d !== void 0 ? d : Xt);
157
- const h = l.onValuesChange((m) => {
156
+ l = c.object(e, i), this.sheetObjects.set(s, l), this.sheetObjectCBs.set(s, d !== void 0 ? d : Kt);
157
+ const h = l.onValuesChange((p) => {
158
158
  if (this.app.editor) {
159
- for (const g in m) {
160
- const E = m[g];
161
- typeof E == "object" && Dn(E) && (m[g] = {
159
+ for (const g in p) {
160
+ const E = p[g];
161
+ typeof E == "object" && jn(E) && (p[g] = {
162
162
  r: E.r,
163
163
  g: E.g,
164
164
  b: E.b,
@@ -170,12 +170,12 @@ class Ca extends ut {
170
170
  target: "app",
171
171
  data: {
172
172
  sheetObject: s,
173
- values: m
173
+ values: p
174
174
  }
175
175
  });
176
176
  } else {
177
177
  const g = this.sheetObjectCBs.get(s);
178
- g !== void 0 && g(m);
178
+ g !== void 0 && g(p);
179
179
  }
180
180
  });
181
181
  return this.sheetObjectUnsubscribe.set(s, h), l;
@@ -189,7 +189,7 @@ class Ca extends ut {
189
189
  i !== void 0 && i();
190
190
  }
191
191
  }
192
- function An(t) {
192
+ function Dn(t) {
193
193
  if (t.name === "cameras")
194
194
  return "camera";
195
195
  if (t.name === "interactive")
@@ -203,7 +203,7 @@ function An(t) {
203
203
  const n = t.type;
204
204
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
205
205
  }
206
- function qt(t) {
206
+ function Xt(t) {
207
207
  const n = {
208
208
  name: t.name,
209
209
  type: t.type,
@@ -211,10 +211,10 @@ function qt(t) {
211
211
  children: []
212
212
  };
213
213
  return t.children.forEach((r) => {
214
- n.children.push(qt(r));
214
+ n.children.push(Xt(r));
215
215
  }), n;
216
216
  }
217
- function In(t) {
217
+ function _n(t) {
218
218
  const n = {};
219
219
  for (const r in t) {
220
220
  const e = t[r].value;
@@ -222,7 +222,7 @@ function In(t) {
222
222
  }
223
223
  return n;
224
224
  }
225
- function Nn(t) {
225
+ function In(t) {
226
226
  switch (t) {
227
227
  case "blendSrcAlpha":
228
228
  case "blendDstAlpha":
@@ -234,10 +234,10 @@ function Nn(t) {
234
234
  }
235
235
  return !1;
236
236
  }
237
- function _t(t) {
237
+ function Dt(t) {
238
238
  const n = {};
239
239
  for (const r in t) {
240
- if (r.substring(0, 1) === "_" || r.substring(0, 2) === "is" || Nn(r))
240
+ if (r.substring(0, 1) === "_" || r.substring(0, 2) === "is" || In(r))
241
241
  continue;
242
242
  const e = typeof t[r], i = t[r];
243
243
  switch (e) {
@@ -249,13 +249,13 @@ function _t(t) {
249
249
  case "object":
250
250
  if (i !== null)
251
251
  if (n[r] = i, i.isTexture)
252
- if (i instanceof zt) {
252
+ if (i instanceof Yt) {
253
253
  const d = i.source.toJSON();
254
254
  n[r] = { src: d.url };
255
255
  } else
256
- i instanceof dn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[r] = { src: "" });
256
+ i instanceof cn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[r] = { src: "" });
257
257
  else
258
- r === "uniforms" && (n[r] = In(n[r]));
258
+ r === "uniforms" && (n[r] = _n(n[r]));
259
259
  else
260
260
  n[r] = { src: "" };
261
261
  break;
@@ -263,26 +263,30 @@ function _t(t) {
263
263
  }
264
264
  return n;
265
265
  }
266
- function Ln(t) {
266
+ function An(t) {
267
267
  t.updateMatrix();
268
268
  const n = {
269
269
  name: t.name,
270
270
  type: t.type,
271
271
  uuid: t.uuid,
272
272
  visible: t.visible,
273
- matrix: t.matrix.elements
274
- };
275
- if (t instanceof Vt) {
276
- const r = t;
277
- if (Array.isArray(r.material)) {
278
- const e = [];
279
- r.material.forEach((i) => {
280
- e.push(_t(i));
281
- }), n.material = e;
273
+ matrix: t.matrix.elements,
274
+ material: void 0,
275
+ perspectiveCameraInfo: void 0,
276
+ orthographicCameraInfo: void 0,
277
+ lightInfo: void 0
278
+ }, r = t.type.toLowerCase();
279
+ if (r.search("mesh") > -1) {
280
+ const e = t;
281
+ if (Array.isArray(e.material)) {
282
+ const i = [];
283
+ e.material.forEach((d) => {
284
+ i.push(Dt(d));
285
+ }), n.material = i;
282
286
  } else
283
- n.material = _t(r.material);
287
+ n.material = Dt(e.material);
284
288
  } else
285
- t instanceof ln ? t instanceof lt ? n.perspectiveCameraInfo = {
289
+ r.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
286
290
  fov: t.fov,
287
291
  zoom: t.zoom,
288
292
  near: t.near,
@@ -291,7 +295,7 @@ function Ln(t) {
291
295
  aspect: t.aspect,
292
296
  filmGauge: t.filmGauge,
293
297
  filmOffset: t.filmOffset
294
- } : t instanceof Ct && (n.orthographicCameraInfo = {
298
+ } : t.type === "OrthographicCamera" && (n.orthographicCameraInfo = {
295
299
  zoom: t.zoom,
296
300
  near: t.near,
297
301
  far: t.far,
@@ -299,7 +303,7 @@ function Ln(t) {
299
303
  right: t.right,
300
304
  top: t.top,
301
305
  bottom: t.bottom
302
- }) : t instanceof un && (n.lightInfo = {
306
+ }) : r.search("light") > -1 && (n.lightInfo = {
303
307
  color: t.color,
304
308
  intensity: t.intensity,
305
309
  decay: t.decay,
@@ -334,12 +338,12 @@ function yt(t) {
334
338
  return new Promise((n, r) => {
335
339
  const e = new Image();
336
340
  e.onload = () => {
337
- const i = new zt(e);
338
- i.wrapS = jt, i.wrapT = jt, i.needsUpdate = !0, n(i);
341
+ const i = new Yt(e);
342
+ i.wrapS = Pt, i.wrapT = Pt, i.needsUpdate = !0, n(i);
339
343
  }, e.onerror = r, e.src = t;
340
344
  });
341
345
  }
342
- class Sa extends ut {
346
+ class xa extends lt {
343
347
  constructor() {
344
348
  super(...arguments);
345
349
  $(this, "scene");
@@ -352,7 +356,7 @@ class Sa extends ut {
352
356
  });
353
357
  }
354
358
  setObject(r) {
355
- const e = Ln(r);
359
+ const e = An(r);
356
360
  this.app.send({
357
361
  event: "setObject",
358
362
  target: "editor",
@@ -399,8 +403,8 @@ class Sa extends ut {
399
403
  });
400
404
  }
401
405
  setScene(r) {
402
- this.scene = r, Kt(r);
403
- const e = qt(r);
406
+ this.scene = r, Ht(r);
407
+ const e = Xt(r);
404
408
  this.app.send({
405
409
  event: "setScene",
406
410
  target: "editor",
@@ -408,7 +412,7 @@ class Sa extends ut {
408
412
  });
409
413
  }
410
414
  }
411
- class Oa extends ut {
415
+ class Ca extends lt {
412
416
  constructor(r) {
413
417
  super(r);
414
418
  $(this, "bindCBs");
@@ -420,7 +424,7 @@ class Oa extends ut {
420
424
  this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), r.editor && this.createGUI();
421
425
  }
422
426
  createGUI() {
423
- this.pane = new Pn({ title: "GUI" }), this.pane.registerPlugin(Rn);
427
+ this.pane = new On({ title: "GUI" }), this.pane.registerPlugin(Tn);
424
428
  }
425
429
  dispose() {
426
430
  var r;
@@ -447,7 +451,7 @@ class Oa extends ut {
447
451
  }
448
452
  // Binding
449
453
  bind(r, e, i, d = void 0) {
450
- const c = this.bindID, s = i.onChange !== void 0 ? i.onChange : Xt;
454
+ const c = this.bindID, s = i.onChange !== void 0 ? i.onChange : Kt;
451
455
  this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (d !== void 0 ? d : this.pane).addBinding(r, e, i).on("change", (h) => {
452
456
  this.app.send({
453
457
  event: "updateBind",
@@ -518,20 +522,20 @@ var Et = { exports: {} }, He = {};
518
522
  * This source code is licensed under the MIT license found in the
519
523
  * LICENSE file in the root directory of this source tree.
520
524
  */
521
- var At;
522
- function Fn() {
523
- if (At)
525
+ var _t;
526
+ function Nn() {
527
+ if (_t)
524
528
  return He;
525
- At = 1;
526
- var t = Wt, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
529
+ _t = 1;
530
+ var t = zt, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
527
531
  function c(s, l, h) {
528
- var m, g = {}, E = null, C = null;
532
+ var p, g = {}, E = null, C = null;
529
533
  h !== void 0 && (E = "" + h), l.key !== void 0 && (E = "" + l.key), l.ref !== void 0 && (C = l.ref);
530
- for (m in l)
531
- e.call(l, m) && !d.hasOwnProperty(m) && (g[m] = l[m]);
534
+ for (p in l)
535
+ e.call(l, p) && !d.hasOwnProperty(p) && (g[p] = l[p]);
532
536
  if (s && s.defaultProps)
533
- for (m in l = s.defaultProps, l)
534
- g[m] === void 0 && (g[m] = l[m]);
537
+ for (p in l = s.defaultProps, l)
538
+ g[p] === void 0 && (g[p] = l[p]);
535
539
  return { $$typeof: n, type: s, key: E, ref: C, props: g, _owner: i.current };
536
540
  }
537
541
  return He.Fragment = r, He.jsx = c, He.jsxs = c, He;
@@ -547,50 +551,50 @@ var Ke = {};
547
551
  * LICENSE file in the root directory of this source tree.
548
552
  */
549
553
  var It;
550
- function Un() {
554
+ function Ln() {
551
555
  return It || (It = 1, process.env.NODE_ENV !== "production" && function() {
552
- var t = Wt, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), R = Symbol.iterator, D = "@@iterator";
556
+ var t = zt, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, D = "@@iterator";
553
557
  function y(a) {
554
558
  if (a === null || typeof a != "object")
555
559
  return null;
556
- var f = R && a[R] || a[D];
560
+ var f = P && a[P] || a[D];
557
561
  return typeof f == "function" ? f : null;
558
562
  }
559
563
  var b = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
560
564
  function v(a) {
561
565
  {
562
- for (var f = arguments.length, p = new Array(f > 1 ? f - 1 : 0), x = 1; x < f; x++)
563
- p[x - 1] = arguments[x];
564
- O("error", a, p);
566
+ for (var f = arguments.length, m = new Array(f > 1 ? f - 1 : 0), x = 1; x < f; x++)
567
+ m[x - 1] = arguments[x];
568
+ O("error", a, m);
565
569
  }
566
570
  }
567
- function O(a, f, p) {
571
+ function O(a, f, m) {
568
572
  {
569
573
  var x = b.ReactDebugCurrentFrame, k = x.getStackAddendum();
570
- k !== "" && (f += "%s", p = p.concat([k]));
571
- var _ = p.map(function(P) {
572
- return String(P);
574
+ k !== "" && (f += "%s", m = m.concat([k]));
575
+ var _ = m.map(function(M) {
576
+ return String(M);
573
577
  });
574
578
  _.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, _);
575
579
  }
576
580
  }
577
- var j = !1, z = !1, ee = !1, T = !1, le = !1, Te;
581
+ var R = !1, z = !1, ee = !1, T = !1, le = !1, Te;
578
582
  Te = Symbol.for("react.module.reference");
579
583
  function oe(a) {
580
- return !!(typeof a == "string" || typeof a == "function" || a === e || a === d || le || a === i || a === h || a === m || T || a === C || j || z || ee || typeof a == "object" && a !== null && (a.$$typeof === E || a.$$typeof === g || a.$$typeof === c || a.$$typeof === s || a.$$typeof === l || // This needs to include all possible module reference object
584
+ return !!(typeof a == "string" || typeof a == "function" || a === e || a === d || le || a === i || a === h || a === p || T || a === C || R || z || ee || typeof a == "object" && a !== null && (a.$$typeof === E || a.$$typeof === g || a.$$typeof === c || a.$$typeof === s || a.$$typeof === l || // This needs to include all possible module reference object
581
585
  // types supported by any Flight configuration anywhere since
582
586
  // we don't know which Flight build this will end up being used
583
587
  // with.
584
588
  a.$$typeof === Te || a.getModuleId !== void 0));
585
589
  }
586
- function M(a, f, p) {
590
+ function j(a, f, m) {
587
591
  var x = a.displayName;
588
592
  if (x)
589
593
  return x;
590
594
  var k = f.displayName || f.name || "";
591
- return k !== "" ? p + "(" + k + ")" : p;
595
+ return k !== "" ? m + "(" + k + ")" : m;
592
596
  }
593
- function A(a) {
597
+ function I(a) {
594
598
  return a.displayName || "Context";
595
599
  }
596
600
  function L(a) {
@@ -611,26 +615,26 @@ function Un() {
611
615
  return "StrictMode";
612
616
  case h:
613
617
  return "Suspense";
614
- case m:
618
+ case p:
615
619
  return "SuspenseList";
616
620
  }
617
621
  if (typeof a == "object")
618
622
  switch (a.$$typeof) {
619
623
  case s:
620
624
  var f = a;
621
- return A(f) + ".Consumer";
625
+ return I(f) + ".Consumer";
622
626
  case c:
623
- var p = a;
624
- return A(p._context) + ".Provider";
627
+ var m = a;
628
+ return I(m._context) + ".Provider";
625
629
  case l:
626
- return M(a, a.render, "ForwardRef");
630
+ return j(a, a.render, "ForwardRef");
627
631
  case g:
628
632
  var x = a.displayName || null;
629
633
  return x !== null ? x : L(a.type) || "Memo";
630
634
  case E: {
631
- var k = a, _ = k._payload, P = k._init;
635
+ var k = a, _ = k._payload, M = k._init;
632
636
  try {
633
- return L(P(_));
637
+ return L(M(_));
634
638
  } catch {
635
639
  return null;
636
640
  }
@@ -638,14 +642,14 @@ function Un() {
638
642
  }
639
643
  return null;
640
644
  }
641
- var J = Object.assign, te = 0, Pe, Ie, Ne, Re, Le, Ze, Fe;
645
+ var J = Object.assign, te = 0, Me, Ae, Ne, Pe, Le, Ze, Fe;
642
646
  function Je() {
643
647
  }
644
648
  Je.__reactDisabledLog = !0;
645
- function ft() {
649
+ function dt() {
646
650
  {
647
651
  if (te === 0) {
648
- Pe = console.log, Ie = console.info, Ne = console.warn, Re = console.error, Le = console.group, Ze = console.groupCollapsed, Fe = console.groupEnd;
652
+ Me = console.log, Ae = console.info, Ne = console.warn, Pe = console.error, Le = console.group, Ze = console.groupCollapsed, Fe = console.groupEnd;
649
653
  var a = {
650
654
  configurable: !0,
651
655
  enumerable: !0,
@@ -665,7 +669,7 @@ function Un() {
665
669
  te++;
666
670
  }
667
671
  }
668
- function ht() {
672
+ function ft() {
669
673
  {
670
674
  if (te--, te === 0) {
671
675
  var a = {
@@ -675,16 +679,16 @@ function Un() {
675
679
  };
676
680
  Object.defineProperties(console, {
677
681
  log: J({}, a, {
678
- value: Pe
682
+ value: Me
679
683
  }),
680
684
  info: J({}, a, {
681
- value: Ie
685
+ value: Ae
682
686
  }),
683
687
  warn: J({}, a, {
684
688
  value: Ne
685
689
  }),
686
690
  error: J({}, a, {
687
- value: Re
691
+ value: Pe
688
692
  }),
689
693
  group: J({}, a, {
690
694
  value: Le
@@ -701,7 +705,7 @@ function Un() {
701
705
  }
702
706
  }
703
707
  var Ue = b.ReactCurrentDispatcher, Be;
704
- function pe(a, f, p) {
708
+ function me(a, f, m) {
705
709
  {
706
710
  if (Be === void 0)
707
711
  try {
@@ -714,48 +718,48 @@ function Un() {
714
718
  ` + Be + a;
715
719
  }
716
720
  }
717
- var je = !1, ge;
721
+ var Re = !1, ge;
718
722
  {
719
- var mt = typeof WeakMap == "function" ? WeakMap : Map;
720
- ge = new mt();
723
+ var ht = typeof WeakMap == "function" ? WeakMap : Map;
724
+ ge = new ht();
721
725
  }
722
726
  function Qe(a, f) {
723
- if (!a || je)
727
+ if (!a || Re)
724
728
  return "";
725
729
  {
726
- var p = ge.get(a);
727
- if (p !== void 0)
728
- return p;
730
+ var m = ge.get(a);
731
+ if (m !== void 0)
732
+ return m;
729
733
  }
730
734
  var x;
731
- je = !0;
735
+ Re = !0;
732
736
  var k = Error.prepareStackTrace;
733
737
  Error.prepareStackTrace = void 0;
734
738
  var _;
735
- _ = Ue.current, Ue.current = null, ft();
739
+ _ = Ue.current, Ue.current = null, dt();
736
740
  try {
737
741
  if (f) {
738
- var P = function() {
742
+ var M = function() {
739
743
  throw Error();
740
744
  };
741
- if (Object.defineProperty(P.prototype, "props", {
745
+ if (Object.defineProperty(M.prototype, "props", {
742
746
  set: function() {
743
747
  throw Error();
744
748
  }
745
749
  }), typeof Reflect == "object" && Reflect.construct) {
746
750
  try {
747
- Reflect.construct(P, []);
751
+ Reflect.construct(M, []);
748
752
  } catch (se) {
749
753
  x = se;
750
754
  }
751
- Reflect.construct(a, [], P);
755
+ Reflect.construct(a, [], M);
752
756
  } else {
753
757
  try {
754
- P.call();
758
+ M.call();
755
759
  } catch (se) {
756
760
  x = se;
757
761
  }
758
- a.call(P.prototype);
762
+ a.call(M.prototype);
759
763
  }
760
764
  } else {
761
765
  try {
@@ -785,71 +789,71 @@ function Un() {
785
789
  }
786
790
  }
787
791
  } finally {
788
- je = !1, Ue.current = _, ht(), Error.prepareStackTrace = k;
792
+ Re = !1, Ue.current = _, ft(), Error.prepareStackTrace = k;
789
793
  }
790
- var ke = a ? a.displayName || a.name : "", Rt = ke ? pe(ke) : "";
791
- return typeof a == "function" && ge.set(a, Rt), Rt;
794
+ var ke = a ? a.displayName || a.name : "", Mt = ke ? me(ke) : "";
795
+ return typeof a == "function" && ge.set(a, Mt), Mt;
792
796
  }
793
- function et(a, f, p) {
797
+ function et(a, f, m) {
794
798
  return Qe(a, !1);
795
799
  }
796
800
  function tt(a) {
797
801
  var f = a.prototype;
798
802
  return !!(f && f.isReactComponent);
799
803
  }
800
- function ve(a, f, p) {
804
+ function ve(a, f, m) {
801
805
  if (a == null)
802
806
  return "";
803
807
  if (typeof a == "function")
804
808
  return Qe(a, tt(a));
805
809
  if (typeof a == "string")
806
- return pe(a);
810
+ return me(a);
807
811
  switch (a) {
808
812
  case h:
809
- return pe("Suspense");
810
- case m:
811
- return pe("SuspenseList");
813
+ return me("Suspense");
814
+ case p:
815
+ return me("SuspenseList");
812
816
  }
813
817
  if (typeof a == "object")
814
818
  switch (a.$$typeof) {
815
819
  case l:
816
820
  return et(a.render);
817
821
  case g:
818
- return ve(a.type, f, p);
822
+ return ve(a.type, f, m);
819
823
  case E: {
820
824
  var x = a, k = x._payload, _ = x._init;
821
825
  try {
822
- return ve(_(k), f, p);
826
+ return ve(_(k), f, m);
823
827
  } catch {
824
828
  }
825
829
  }
826
830
  }
827
831
  return "";
828
832
  }
829
- var Me = Object.prototype.hasOwnProperty, nt = {}, $e = b.ReactDebugCurrentFrame;
833
+ var je = Object.prototype.hasOwnProperty, nt = {}, $e = b.ReactDebugCurrentFrame;
830
834
  function ue(a) {
831
835
  if (a) {
832
- var f = a._owner, p = ve(a.type, a._source, f ? f.type : null);
833
- $e.setExtraStackFrame(p);
836
+ var f = a._owner, m = ve(a.type, a._source, f ? f.type : null);
837
+ $e.setExtraStackFrame(m);
834
838
  } else
835
839
  $e.setExtraStackFrame(null);
836
840
  }
837
- function be(a, f, p, x, k) {
841
+ function be(a, f, m, x, k) {
838
842
  {
839
- var _ = Function.call.bind(Me);
840
- for (var P in a)
841
- if (_(a, P)) {
843
+ var _ = Function.call.bind(je);
844
+ for (var M in a)
845
+ if (_(a, M)) {
842
846
  var S = void 0;
843
847
  try {
844
- if (typeof a[P] != "function") {
845
- var X = Error((x || "React class") + ": " + p + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
848
+ if (typeof a[M] != "function") {
849
+ var X = Error((x || "React class") + ": " + m + " type `" + M + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[M] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
846
850
  throw X.name = "Invariant Violation", X;
847
851
  }
848
- S = a[P](f, P, x, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
852
+ S = a[M](f, M, x, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
849
853
  } catch (B) {
850
854
  S = B;
851
855
  }
852
- S && !(S instanceof Error) && (ue(k), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", x || "React class", p, P, typeof S), ue(null)), S instanceof Error && !(S.message in nt) && (nt[S.message] = !0, ue(k), v("Failed %s type: %s", p, S.message), ue(null));
856
+ S && !(S instanceof Error) && (ue(k), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", x || "React class", m, M, typeof S), ue(null)), S instanceof Error && !(S.message in nt) && (nt[S.message] = !0, ue(k), v("Failed %s type: %s", m, S.message), ue(null));
853
857
  }
854
858
  }
855
859
  }
@@ -859,8 +863,8 @@ function Un() {
859
863
  }
860
864
  function at(a) {
861
865
  {
862
- var f = typeof Symbol == "function" && Symbol.toStringTag, p = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
863
- return p;
866
+ var f = typeof Symbol == "function" && Symbol.toStringTag, m = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
867
+ return m;
864
868
  }
865
869
  }
866
870
  function Ye(a) {
@@ -877,7 +881,7 @@ function Un() {
877
881
  if (Ye(a))
878
882
  return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", at(a)), rt(a);
879
883
  }
880
- var de = b.ReactCurrentOwner, gt = {
884
+ var de = b.ReactCurrentOwner, mt = {
881
885
  key: !0,
882
886
  ref: !0,
883
887
  __self: !0,
@@ -885,7 +889,7 @@ function Un() {
885
889
  }, ot, Ve, ye;
886
890
  ye = {};
887
891
  function o(a) {
888
- if (Me.call(a, "ref")) {
892
+ if (je.call(a, "ref")) {
889
893
  var f = Object.getOwnPropertyDescriptor(a, "ref").get;
890
894
  if (f && f.isReactWarning)
891
895
  return !1;
@@ -893,7 +897,7 @@ function Un() {
893
897
  return a.ref !== void 0;
894
898
  }
895
899
  function w(a) {
896
- if (Me.call(a, "key")) {
900
+ if (je.call(a, "key")) {
897
901
  var f = Object.getOwnPropertyDescriptor(a, "key").get;
898
902
  if (f && f.isReactWarning)
899
903
  return !1;
@@ -902,41 +906,41 @@ function Un() {
902
906
  }
903
907
  function F(a, f) {
904
908
  if (typeof a.ref == "string" && de.current && f && de.current.stateNode !== f) {
905
- var p = L(de.current.type);
906
- ye[p] || (v('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', L(de.current.type), a.ref), ye[p] = !0);
909
+ var m = L(de.current.type);
910
+ ye[m] || (v('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', L(de.current.type), a.ref), ye[m] = !0);
907
911
  }
908
912
  }
909
913
  function U(a, f) {
910
914
  {
911
- var p = function() {
915
+ var m = function() {
912
916
  ot || (ot = !0, v("%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));
913
917
  };
914
- p.isReactWarning = !0, Object.defineProperty(a, "key", {
915
- get: p,
918
+ m.isReactWarning = !0, Object.defineProperty(a, "key", {
919
+ get: m,
916
920
  configurable: !0
917
921
  });
918
922
  }
919
923
  }
920
924
  function K(a, f) {
921
925
  {
922
- var p = function() {
926
+ var m = function() {
923
927
  Ve || (Ve = !0, v("%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));
924
928
  };
925
- p.isReactWarning = !0, Object.defineProperty(a, "ref", {
926
- get: p,
929
+ m.isReactWarning = !0, Object.defineProperty(a, "ref", {
930
+ get: m,
927
931
  configurable: !0
928
932
  });
929
933
  }
930
934
  }
931
- var fe = function(a, f, p, x, k, _, P) {
935
+ var fe = function(a, f, m, x, k, _, M) {
932
936
  var S = {
933
937
  // This tag allows us to uniquely identify this as a React Element
934
938
  $$typeof: n,
935
939
  // Built-in properties that belong on the element
936
940
  type: a,
937
941
  key: f,
938
- ref: p,
939
- props: P,
942
+ ref: m,
943
+ props: M,
940
944
  // Record the component responsible for creating this element.
941
945
  _owner: _
942
946
  };
@@ -957,29 +961,29 @@ function Un() {
957
961
  value: k
958
962
  }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
959
963
  };
960
- function ie(a, f, p, x, k) {
964
+ function ie(a, f, m, x, k) {
961
965
  {
962
- var _, P = {}, S = null, X = null;
963
- p !== void 0 && (it(p), S = "" + p), w(f) && (it(f.key), S = "" + f.key), o(f) && (X = f.ref, F(f, k));
966
+ var _, M = {}, S = null, X = null;
967
+ m !== void 0 && (it(m), S = "" + m), w(f) && (it(f.key), S = "" + f.key), o(f) && (X = f.ref, F(f, k));
964
968
  for (_ in f)
965
- Me.call(f, _) && !gt.hasOwnProperty(_) && (P[_] = f[_]);
969
+ je.call(f, _) && !mt.hasOwnProperty(_) && (M[_] = f[_]);
966
970
  if (a && a.defaultProps) {
967
971
  var B = a.defaultProps;
968
972
  for (_ in B)
969
- P[_] === void 0 && (P[_] = B[_]);
973
+ M[_] === void 0 && (M[_] = B[_]);
970
974
  }
971
975
  if (S || X) {
972
976
  var Y = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
973
- S && U(P, Y), X && K(P, Y);
977
+ S && U(M, Y), X && K(M, Y);
974
978
  }
975
- return fe(a, S, X, k, x, de.current, P);
979
+ return fe(a, S, X, k, x, de.current, M);
976
980
  }
977
981
  }
978
982
  var st = b.ReactCurrentOwner, ze = b.ReactDebugCurrentFrame;
979
983
  function W(a) {
980
984
  if (a) {
981
- var f = a._owner, p = ve(a.type, a._source, f ? f.type : null);
982
- ze.setExtraStackFrame(p);
985
+ var f = a._owner, m = ve(a.type, a._source, f ? f.type : null);
986
+ ze.setExtraStackFrame(m);
983
987
  } else
984
988
  ze.setExtraStackFrame(null);
985
989
  }
@@ -988,7 +992,7 @@ function Un() {
988
992
  function he(a) {
989
993
  return typeof a == "object" && a !== null && a.$$typeof === n;
990
994
  }
991
- function me() {
995
+ function pe() {
992
996
  {
993
997
  if (st.current) {
994
998
  var a = L(st.current.type);
@@ -1003,76 +1007,76 @@ Check the render method of \`` + a + "`.";
1003
1007
  function Ee(a) {
1004
1008
  {
1005
1009
  if (a !== void 0) {
1006
- var f = a.fileName.replace(/^.*[\\\/]/, ""), p = a.lineNumber;
1010
+ var f = a.fileName.replace(/^.*[\\\/]/, ""), m = a.lineNumber;
1007
1011
  return `
1008
1012
 
1009
- Check your code at ` + f + ":" + p + ".";
1013
+ Check your code at ` + f + ":" + m + ".";
1010
1014
  }
1011
1015
  return "";
1012
1016
  }
1013
1017
  }
1014
1018
  var we = {};
1015
- function Qt(a) {
1019
+ function Jt(a) {
1016
1020
  {
1017
- var f = me();
1021
+ var f = pe();
1018
1022
  if (!f) {
1019
- var p = typeof a == "string" ? a : a.displayName || a.name;
1020
- p && (f = `
1023
+ var m = typeof a == "string" ? a : a.displayName || a.name;
1024
+ m && (f = `
1021
1025
 
1022
- Check the top-level render call using <` + p + ">.");
1026
+ Check the top-level render call using <` + m + ">.");
1023
1027
  }
1024
1028
  return f;
1025
1029
  }
1026
1030
  }
1027
- function Ot(a, f) {
1031
+ function St(a, f) {
1028
1032
  {
1029
1033
  if (!a._store || a._store.validated || a.key != null)
1030
1034
  return;
1031
1035
  a._store.validated = !0;
1032
- var p = Qt(f);
1033
- if (we[p])
1036
+ var m = Jt(f);
1037
+ if (we[m])
1034
1038
  return;
1035
- we[p] = !0;
1039
+ we[m] = !0;
1036
1040
  var x = "";
1037
- a && a._owner && a._owner !== st.current && (x = " It was passed a child from " + L(a._owner.type) + "."), W(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, x), W(null);
1041
+ a && a._owner && a._owner !== st.current && (x = " It was passed a child from " + L(a._owner.type) + "."), W(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, x), W(null);
1038
1042
  }
1039
1043
  }
1040
- function Tt(a, f) {
1044
+ function Ot(a, f) {
1041
1045
  {
1042
1046
  if (typeof a != "object")
1043
1047
  return;
1044
1048
  if (Ge(a))
1045
- for (var p = 0; p < a.length; p++) {
1046
- var x = a[p];
1047
- he(x) && Ot(x, f);
1049
+ for (var m = 0; m < a.length; m++) {
1050
+ var x = a[m];
1051
+ he(x) && St(x, f);
1048
1052
  }
1049
1053
  else if (he(a))
1050
1054
  a._store && (a._store.validated = !0);
1051
1055
  else if (a) {
1052
1056
  var k = y(a);
1053
1057
  if (typeof k == "function" && k !== a.entries)
1054
- for (var _ = k.call(a), P; !(P = _.next()).done; )
1055
- he(P.value) && Ot(P.value, f);
1058
+ for (var _ = k.call(a), M; !(M = _.next()).done; )
1059
+ he(M.value) && St(M.value, f);
1056
1060
  }
1057
1061
  }
1058
1062
  }
1059
- function en(a) {
1063
+ function Qt(a) {
1060
1064
  {
1061
1065
  var f = a.type;
1062
1066
  if (f == null || typeof f == "string")
1063
1067
  return;
1064
- var p;
1068
+ var m;
1065
1069
  if (typeof f == "function")
1066
- p = f.propTypes;
1070
+ m = f.propTypes;
1067
1071
  else if (typeof f == "object" && (f.$$typeof === l || // Note: Memo only checks outer props here.
1068
1072
  // Inner props are checked in the reconciler.
1069
1073
  f.$$typeof === g))
1070
- p = f.propTypes;
1074
+ m = f.propTypes;
1071
1075
  else
1072
1076
  return;
1073
- if (p) {
1077
+ if (m) {
1074
1078
  var x = L(f);
1075
- be(p, a.props, "prop", x, a);
1079
+ be(m, a.props, "prop", x, a);
1076
1080
  } else if (f.PropTypes !== void 0 && !Q) {
1077
1081
  Q = !0;
1078
1082
  var k = L(f);
@@ -1081,10 +1085,10 @@ Check the top-level render call using <` + p + ">.");
1081
1085
  typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1082
1086
  }
1083
1087
  }
1084
- function tn(a) {
1088
+ function en(a) {
1085
1089
  {
1086
- for (var f = Object.keys(a.props), p = 0; p < f.length; p++) {
1087
- var x = f[p];
1090
+ for (var f = Object.keys(a.props), m = 0; m < f.length; m++) {
1091
+ var x = f[m];
1088
1092
  if (x !== "children" && x !== "key") {
1089
1093
  W(a), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), W(null);
1090
1094
  break;
@@ -1093,56 +1097,56 @@ Check the top-level render call using <` + p + ">.");
1093
1097
  a.ref !== null && (W(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
1094
1098
  }
1095
1099
  }
1096
- function Pt(a, f, p, x, k, _) {
1100
+ function Tt(a, f, m, x, k, _) {
1097
1101
  {
1098
- var P = oe(a);
1099
- if (!P) {
1102
+ var M = oe(a);
1103
+ if (!M) {
1100
1104
  var S = "";
1101
1105
  (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1102
1106
  var X = Ee(k);
1103
- X ? S += X : S += me();
1107
+ X ? S += X : S += pe();
1104
1108
  var B;
1105
1109
  a === null ? B = "null" : Ge(a) ? B = "array" : a !== void 0 && a.$$typeof === n ? (B = "<" + (L(a.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : B = typeof a, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, S);
1106
1110
  }
1107
- var Y = ie(a, f, p, k, _);
1111
+ var Y = ie(a, f, m, k, _);
1108
1112
  if (Y == null)
1109
1113
  return Y;
1110
- if (P) {
1114
+ if (M) {
1111
1115
  var ne = f.children;
1112
1116
  if (ne !== void 0)
1113
1117
  if (x)
1114
1118
  if (Ge(ne)) {
1115
1119
  for (var ke = 0; ke < ne.length; ke++)
1116
- Tt(ne[ke], a);
1120
+ Ot(ne[ke], a);
1117
1121
  Object.freeze && Object.freeze(ne);
1118
1122
  } else
1119
1123
  v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1120
1124
  else
1121
- Tt(ne, a);
1125
+ Ot(ne, a);
1122
1126
  }
1123
- return a === e ? tn(Y) : en(Y), Y;
1127
+ return a === e ? en(Y) : Qt(Y), Y;
1124
1128
  }
1125
1129
  }
1126
- function nn(a, f, p) {
1127
- return Pt(a, f, p, !0);
1130
+ function tn(a, f, m) {
1131
+ return Tt(a, f, m, !0);
1128
1132
  }
1129
- function an(a, f, p) {
1130
- return Pt(a, f, p, !1);
1133
+ function nn(a, f, m) {
1134
+ return Tt(a, f, m, !1);
1131
1135
  }
1132
- var rn = an, on = nn;
1133
- Ke.Fragment = e, Ke.jsx = rn, Ke.jsxs = on;
1136
+ var an = nn, rn = tn;
1137
+ Ke.Fragment = e, Ke.jsx = an, Ke.jsxs = rn;
1134
1138
  }()), Ke;
1135
1139
  }
1136
- process.env.NODE_ENV === "production" ? Et.exports = Fn() : Et.exports = Un();
1140
+ process.env.NODE_ENV === "production" ? Et.exports = Nn() : Et.exports = Ln();
1137
1141
  var u = Et.exports;
1138
- function Zt(t) {
1142
+ function qt(t) {
1139
1143
  return t.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ u.jsx("button", { children: t.title });
1140
1144
  }
1141
- const Bn = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1145
+ const Fn = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1142
1146
  /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1143
1147
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1144
1148
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1145
- ] }), $n = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1149
+ ] }), Un = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1146
1150
  "path",
1147
1151
  {
1148
1152
  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
@@ -1150,35 +1154,35 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1150
1154
  C11,8.22,10.74,8,10.43,8z`
1151
1155
  }
1152
1156
  ) });
1153
- function Gn(t) {
1154
- return /* @__PURE__ */ u.jsx(Ht.Item, { value: t.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1155
- $n,
1157
+ function Bn(t) {
1158
+ return /* @__PURE__ */ u.jsx(Wt.Item, { value: t.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1159
+ Un,
1156
1160
  /* @__PURE__ */ u.jsx("span", { children: t.title }),
1157
1161
  /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
1158
1162
  t.onDelete(t.index);
1159
- }, children: Bn })
1163
+ }, children: Fn })
1160
1164
  ] }) }, t.title);
1161
1165
  }
1162
- function Yn(t) {
1166
+ function $n(t) {
1163
1167
  const [n, r] = re(!1), [e, i] = re(t.options), d = (h) => {
1164
1168
  t.onDragComplete(h), i(h);
1165
1169
  }, c = (h) => {
1166
- const m = [...e];
1167
- m.splice(h, 1), d(m);
1170
+ const p = [...e];
1171
+ p.splice(h, 1), d(p);
1168
1172
  }, s = [];
1169
- e.forEach((h, m) => {
1170
- s.push(/* @__PURE__ */ u.jsx(Gn, { index: m, title: h, onDelete: c }, h));
1173
+ e.forEach((h, p) => {
1174
+ s.push(/* @__PURE__ */ u.jsx(Bn, { index: p, title: h, onDelete: c }, h));
1171
1175
  });
1172
1176
  let l = "dropdown draggable";
1173
1177
  return t.subdropdown && (l += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: l, onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), children: [
1174
- /* @__PURE__ */ u.jsx(Zt, { title: t.title }),
1175
- /* @__PURE__ */ u.jsx(Ht.Group, { axis: "y", values: e, onReorder: d, style: { visibility: n ? "visible" : "hidden" }, children: s })
1178
+ /* @__PURE__ */ u.jsx(qt, { title: t.title }),
1179
+ /* @__PURE__ */ u.jsx(Wt.Group, { axis: "y", values: e, onReorder: d, style: { visibility: n ? "visible" : "hidden" }, children: s })
1176
1180
  ] });
1177
1181
  }
1178
- function Vn(t) {
1182
+ function Gn(t) {
1179
1183
  const [n, r] = re(!1), e = [];
1180
1184
  t.options.map((d, c) => {
1181
- t.onSelect !== void 0 && (d.onSelect = t.onSelect), e.push(/* @__PURE__ */ u.jsx(zn, { option: d }, c));
1185
+ t.onSelect !== void 0 && (d.onSelect = t.onSelect), e.push(/* @__PURE__ */ u.jsx(Yn, { option: d }, c));
1182
1186
  });
1183
1187
  let i = "dropdown";
1184
1188
  return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ u.jsxs(
@@ -1188,7 +1192,7 @@ function Vn(t) {
1188
1192
  onMouseEnter: () => r(!0),
1189
1193
  onMouseLeave: () => r(!1),
1190
1194
  children: [
1191
- /* @__PURE__ */ u.jsx(Zt, { title: t.title }),
1195
+ /* @__PURE__ */ u.jsx(qt, { title: t.title }),
1192
1196
  /* @__PURE__ */ u.jsx(
1193
1197
  "ul",
1194
1198
  {
@@ -1200,13 +1204,13 @@ function Vn(t) {
1200
1204
  }
1201
1205
  );
1202
1206
  }
1203
- function zn(t) {
1207
+ function Yn(t) {
1204
1208
  const { option: n } = t, [r, e] = re("");
1205
1209
  let i;
1206
1210
  switch (n.type) {
1207
1211
  case "draggable":
1208
1212
  i = /* @__PURE__ */ u.jsx(
1209
- Yn,
1213
+ $n,
1210
1214
  {
1211
1215
  title: n.title,
1212
1216
  options: n.value,
@@ -1219,7 +1223,7 @@ function zn(t) {
1219
1223
  break;
1220
1224
  case "dropdown":
1221
1225
  i = /* @__PURE__ */ u.jsx(
1222
- Vn,
1226
+ Gn,
1223
1227
  {
1224
1228
  title: n.title,
1225
1229
  options: n.value,
@@ -1240,22 +1244,22 @@ function zn(t) {
1240
1244
  );
1241
1245
  break;
1242
1246
  }
1243
- return /* @__PURE__ */ u.jsx("li", { className: r === n.title ? "selected" : "", children: i }, kn());
1247
+ return /* @__PURE__ */ u.jsx("li", { className: r === n.title ? "selected" : "", children: i }, Rn());
1244
1248
  }
1245
- function Ta(t) {
1249
+ function Sa(t) {
1246
1250
  let n;
1247
1251
  function r(c) {
1248
- var l, h, m, g, E, C, R, D, y;
1252
+ var l, h, p, g, E, C, P, D, y;
1249
1253
  let s;
1250
1254
  switch (c.event) {
1251
1255
  case "custom":
1252
- I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1256
+ A.dispatchEvent({ type: N.CUSTOM, value: c.data });
1253
1257
  break;
1254
1258
  case "selectComponent":
1255
- I.dispatchEvent({ type: N.SELECT_DROPDOWN, value: c.data });
1259
+ A.dispatchEvent({ type: N.SELECT_DROPDOWN, value: c.data });
1256
1260
  break;
1257
1261
  case "draggableListUpdate":
1258
- I.dispatchEvent({ type: N.DRAG_UPDATE, value: c.data });
1262
+ A.dispatchEvent({ type: N.DRAG_UPDATE, value: c.data });
1259
1263
  break;
1260
1264
  case "addFolder":
1261
1265
  (l = t.components.get("debug")) == null || l.addFolder(c.data.name, c.data.params, c.data.parent);
@@ -1264,7 +1268,7 @@ function Ta(t) {
1264
1268
  (h = t.components.get("debug")) == null || h.bind(c.data.name, c.data.params, c.data.parent);
1265
1269
  break;
1266
1270
  case "updateBind":
1267
- (m = t.components.get("debug")) == null || m.triggerBind(c.data.id, c.data.value);
1271
+ (p = t.components.get("debug")) == null || p.triggerBind(c.data.id, c.data.value);
1268
1272
  break;
1269
1273
  case "addButton":
1270
1274
  (g = t.components.get("debug")) == null || g.button(c.data.name, c.data.callback, c.data.parent);
@@ -1276,7 +1280,7 @@ function Ta(t) {
1276
1280
  s = (C = t.components.get("theatre")) == null ? void 0 : C.sheets.get(c.data.sheet), s !== void 0 && (n = s, We.setSelection([s]));
1277
1281
  break;
1278
1282
  case "setSheetObject":
1279
- s = (R = t.components.get("theatre")) == null ? void 0 : R.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && We.setSelection([s]);
1283
+ s = (P = t.components.get("theatre")) == null ? void 0 : P.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && We.setSelection([s]);
1280
1284
  break;
1281
1285
  case "updateSheetObject":
1282
1286
  s = (D = t.components.get("theatre")) == null ? void 0 : D.sheetObjectCBs.get(c.data.sheetObject), s !== void 0 && s(c.data.values);
@@ -1285,32 +1289,32 @@ function Ta(t) {
1285
1289
  n = (y = t.components.get("theatre")) == null ? void 0 : y.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
1286
1290
  break;
1287
1291
  case "getScene":
1288
- I.dispatchEvent({ type: N.GET_SCENE });
1292
+ A.dispatchEvent({ type: N.GET_SCENE });
1289
1293
  break;
1290
1294
  case "getObject":
1291
- I.dispatchEvent({ type: N.GET_OBJECT, value: c.data });
1295
+ A.dispatchEvent({ type: N.GET_OBJECT, value: c.data });
1292
1296
  break;
1293
1297
  case "updateObject":
1294
- I.dispatchEvent({ type: N.UPDATE_OBJECT, value: c.data });
1298
+ A.dispatchEvent({ type: N.UPDATE_OBJECT, value: c.data });
1295
1299
  break;
1296
1300
  case "createTexture":
1297
- I.dispatchEvent({ type: N.CREATE_TEXTURE, value: c.data });
1301
+ A.dispatchEvent({ type: N.CREATE_TEXTURE, value: c.data });
1298
1302
  break;
1299
1303
  case "requestMethod":
1300
- I.dispatchEvent({ type: N.REQUEST_METHOD, value: c.data });
1304
+ A.dispatchEvent({ type: N.REQUEST_METHOD, value: c.data });
1301
1305
  break;
1302
1306
  }
1303
1307
  }
1304
1308
  function e(c) {
1305
1309
  switch (c.event) {
1306
1310
  case "custom":
1307
- I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1311
+ A.dispatchEvent({ type: N.CUSTOM, value: c.data });
1308
1312
  break;
1309
1313
  case "setObject":
1310
- I.dispatchEvent({ type: N.SET_OBJECT, value: c.data });
1314
+ A.dispatchEvent({ type: N.SET_OBJECT, value: c.data });
1311
1315
  break;
1312
1316
  case "setScene":
1313
- I.dispatchEvent({ type: N.SET_SCENE, value: c.data });
1317
+ A.dispatchEvent({ type: N.SET_SCENE, value: c.data });
1314
1318
  break;
1315
1319
  }
1316
1320
  }
@@ -1319,20 +1323,20 @@ function Ta(t) {
1319
1323
  }
1320
1324
  function d() {
1321
1325
  We.ui.restore(), We.onSelectionChange((h) => {
1322
- h.length < 1 || h.forEach((m) => {
1323
- var R;
1324
- let g = m.address.sheetId, E = "setSheet", C = {};
1325
- switch (m.type) {
1326
+ h.length < 1 || h.forEach((p) => {
1327
+ var P;
1328
+ let g = p.address.sheetId, E = "setSheet", C = {};
1329
+ switch (p.type) {
1326
1330
  case "Theatre_Sheet_PublicAPI":
1327
1331
  E = "setSheet", C = {
1328
- sheet: m.address.sheetId
1329
- }, n = (R = t.components.get("theatre")) == null ? void 0 : R.sheets.get(m.address.sheetId);
1332
+ sheet: p.address.sheetId
1333
+ }, n = (P = t.components.get("theatre")) == null ? void 0 : P.sheets.get(p.address.sheetId);
1330
1334
  break;
1331
1335
  case "Theatre_SheetObject_PublicAPI":
1332
- E = "setSheetObject", g += `_${m.address.objectKey}`, C = {
1336
+ E = "setSheetObject", g += `_${p.address.objectKey}`, C = {
1333
1337
  id: g,
1334
- sheet: m.address.sheetId,
1335
- key: m.address.objectKey
1338
+ sheet: p.address.sheetId,
1339
+ key: p.address.objectKey
1336
1340
  };
1337
1341
  break;
1338
1342
  }
@@ -1389,10 +1393,10 @@ function wt(t) {
1389
1393
  /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: t.children }) })
1390
1394
  ] });
1391
1395
  }
1392
- function Jt(t) {
1396
+ function Zt(t) {
1393
1397
  const [n, r] = re(!1), e = t.child.children.length > 0, i = [];
1394
1398
  return t.child.children.length > 0 && t.child.children.map((d) => {
1395
- i.push(/* @__PURE__ */ u.jsx(Jt, { child: d, three: t.three }, Math.random()));
1399
+ i.push(/* @__PURE__ */ u.jsx(Zt, { child: d, three: t.three }, Math.random()));
1396
1400
  }), /* @__PURE__ */ u.jsxs("div", { className: "childObject", children: [
1397
1401
  /* @__PURE__ */ u.jsxs("div", { className: "child", children: [
1398
1402
  e ? /* @__PURE__ */ u.jsx(
@@ -1420,29 +1424,29 @@ function Jt(t) {
1420
1424
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1421
1425
  }
1422
1426
  ),
1423
- /* @__PURE__ */ u.jsx("div", { className: `icon ${An(t.child)}` })
1427
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${Dn(t.child)}` })
1424
1428
  ] }),
1425
1429
  /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: i }) })
1426
1430
  ] }, Math.random());
1427
1431
  }
1428
- function Wn(t) {
1432
+ function Vn(t) {
1429
1433
  const n = [];
1430
1434
  return t.child.children.map((r) => {
1431
- n.push(/* @__PURE__ */ u.jsx(Jt, { child: r, three: t.three }, Math.random()));
1435
+ n.push(/* @__PURE__ */ u.jsx(Zt, { child: r, three: t.three }, Math.random()));
1432
1436
  }), /* @__PURE__ */ u.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1433
1437
  }
1434
- const Hn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1435
- function Kn(t) {
1438
+ const zn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1439
+ function Wn(t) {
1436
1440
  return "items" in t;
1437
1441
  }
1438
- function Ae(t) {
1442
+ function Ie(t) {
1439
1443
  function n(e, i) {
1440
1444
  console.log("onChange:", e, i);
1441
1445
  }
1442
1446
  const r = [];
1443
1447
  return t.items.forEach((e) => {
1444
- Kn(e) ? r.push(
1445
- /* @__PURE__ */ u.jsx(Ae, { title: e.title, items: e.items }, Math.random())
1448
+ Wn(e) ? r.push(
1449
+ /* @__PURE__ */ u.jsx(Ie, { title: e.title, items: e.items }, Math.random())
1446
1450
  ) : r.push(
1447
1451
  /* @__PURE__ */ u.jsx(
1448
1452
  Xe,
@@ -1464,13 +1468,15 @@ function Ae(t) {
1464
1468
  );
1465
1469
  }), /* @__PURE__ */ u.jsx(wt, { label: t.title, open: !1, children: r });
1466
1470
  }
1467
- function Xn(t) {
1471
+ function Hn(t) {
1468
1472
  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");
1469
1473
  }
1470
1474
  function xe(t) {
1471
1475
  switch (t) {
1472
1476
  case "alphaMap":
1473
1477
  return "Alpha Map";
1478
+ case "anisotropyMap":
1479
+ return "Anisotropy Map";
1474
1480
  case "anisotropyRotation":
1475
1481
  return "Anisotropy Rotation";
1476
1482
  case "aoMap":
@@ -1483,10 +1489,16 @@ function xe(t) {
1483
1489
  return "Bump Map";
1484
1490
  case "bumpScale":
1485
1491
  return "Bump Scale";
1492
+ case "clearcoatMap":
1493
+ return "Clearcoat Map";
1494
+ case "clearcoatNormalMap":
1495
+ return "Clearcoat Normal Map";
1486
1496
  case "clearcoatNormalScale":
1487
1497
  return "Clearcoat Normal Scale";
1488
1498
  case "clearcoatRoughness":
1489
1499
  return "Clearcoat Roughness";
1500
+ case "clearcoatRoughnessMap":
1501
+ return "Clearcoat Roughness Map";
1490
1502
  case "color":
1491
1503
  return "Color";
1492
1504
  case "defines":
@@ -1505,6 +1517,8 @@ function xe(t) {
1505
1517
  return "Dithering";
1506
1518
  case "emissive":
1507
1519
  return "Emissive";
1520
+ case "emissiveMap":
1521
+ return "Emissive Map";
1508
1522
  case "emissiveIntensity":
1509
1523
  return "Emissive Intensity";
1510
1524
  case "envMap":
@@ -1525,6 +1539,10 @@ function xe(t) {
1525
1539
  return "IOR";
1526
1540
  case "iridescenceIOR":
1527
1541
  return "Iridescence IOR";
1542
+ case "iridescenceMap":
1543
+ return "Iridescence Map";
1544
+ case "iridescenceThicknessMap":
1545
+ return "Iridescence Thickness Map";
1528
1546
  case "iridescenceThicknessRange":
1529
1547
  return "Iridescence Thickness Range";
1530
1548
  case "lights":
@@ -1539,6 +1557,8 @@ function xe(t) {
1539
1557
  return "Matcap";
1540
1558
  case "metalness":
1541
1559
  return "Metalness";
1560
+ case "metalnessMap":
1561
+ return "Metalness Map";
1542
1562
  case "name":
1543
1563
  return "Name";
1544
1564
  case "normalMap":
@@ -1553,20 +1573,36 @@ function xe(t) {
1553
1573
  return "Refraction Ratio";
1554
1574
  case "roughness":
1555
1575
  return "Roughness";
1576
+ case "roughnessMap":
1577
+ return "Roughness Map";
1556
1578
  case "sheenColor":
1557
1579
  return "Sheen Color";
1580
+ case "sheenColorMap":
1581
+ return "Sheen Color Map";
1558
1582
  case "sheenRoughness":
1559
1583
  return "Sheen Roughness";
1584
+ case "sheenRoughnessMap":
1585
+ return "Sheen Roughness Map";
1560
1586
  case "shininess":
1561
1587
  return "Shininess";
1562
1588
  case "specular":
1563
1589
  return "Specular";
1564
1590
  case "specularColor":
1565
1591
  return "Specular Color";
1592
+ case "specularColorMap":
1593
+ return "Specular Color Map";
1566
1594
  case "specularIntensity":
1567
1595
  return "Specular Intensity";
1596
+ case "specularIntensityMap":
1597
+ return "Specular Map Intensity";
1568
1598
  case "thickness":
1569
1599
  return "Thickness";
1600
+ case "thicknessMap":
1601
+ return "Thickness Map";
1602
+ case "transmission":
1603
+ return "Transmission";
1604
+ case "transmissionMap":
1605
+ return "Transmission Map";
1570
1606
  case "transparent":
1571
1607
  return "Transparent";
1572
1608
  case "type":
@@ -1584,10 +1620,10 @@ function xe(t) {
1584
1620
  }
1585
1621
  return t;
1586
1622
  }
1587
- function qn(t) {
1623
+ function Kn(t) {
1588
1624
  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";
1589
1625
  }
1590
- function Zn() {
1626
+ function Xn() {
1591
1627
  const t = document.createElement("input");
1592
1628
  return t.type = "file", new Promise((n, r) => {
1593
1629
  t.addEventListener("change", function() {
@@ -1602,10 +1638,10 @@ function Zn() {
1602
1638
  }), t.click();
1603
1639
  });
1604
1640
  }
1605
- function Nt(t, n, r) {
1641
+ function At(t, n, r) {
1606
1642
  const e = [];
1607
1643
  for (const i in t) {
1608
- if (!Xn(i))
1644
+ if (!Hn(i))
1609
1645
  continue;
1610
1646
  const d = typeof t[i], c = t[i];
1611
1647
  if (d === "boolean" || d === "number" || d === "string") {
@@ -1619,11 +1655,11 @@ function Nt(t, n, r) {
1619
1655
  onChange: (l, h) => {
1620
1656
  var g;
1621
1657
  r.updateObject(n.uuid, `material.${l}`, h), d === "boolean" && r.updateObject(n.uuid, "material.needsUpdate", !0);
1622
- const m = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
1623
- m !== void 0 && Z(m, `material.${l}`, h);
1658
+ const p = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
1659
+ p !== void 0 && Z(p, `material.${l}`, h);
1624
1660
  }
1625
1661
  };
1626
- qn(i) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
1662
+ Kn(i) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
1627
1663
  } else if (d === "object")
1628
1664
  if (c.isColor)
1629
1665
  e.push({
@@ -1633,10 +1669,10 @@ function Nt(t, n, r) {
1633
1669
  value: c,
1634
1670
  onChange: (s, l) => {
1635
1671
  var g;
1636
- const h = new St(l);
1672
+ const h = new Ct(l);
1637
1673
  r.updateObject(n.uuid, `material.${s}`, h);
1638
- const m = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
1639
- m !== void 0 && Z(m, `material.${s}`, h);
1674
+ const p = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
1675
+ p !== void 0 && Z(p, `material.${s}`, h);
1640
1676
  }
1641
1677
  });
1642
1678
  else if (Array.isArray(c)) {
@@ -1646,11 +1682,11 @@ function Nt(t, n, r) {
1646
1682
  title: `${l}`,
1647
1683
  type: `${typeof c[l]}`,
1648
1684
  value: c[l],
1649
- onChange: (h, m) => {
1685
+ onChange: (h, p) => {
1650
1686
  var E;
1651
- r.updateObject(n.uuid, `material.${i}`, m);
1687
+ r.updateObject(n.uuid, `material.${i}`, p);
1652
1688
  const g = (E = r.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
1653
- g !== void 0 && Z(g, `material.${i}`, m);
1689
+ g !== void 0 && Z(g, `material.${i}`, p);
1654
1690
  }
1655
1691
  });
1656
1692
  e.push({
@@ -1670,9 +1706,9 @@ function Nt(t, n, r) {
1670
1706
  type: "image",
1671
1707
  value: h,
1672
1708
  onChange: (g, E) => {
1673
- var R;
1709
+ var P;
1674
1710
  r.createTexture(n.uuid, `material.${i}`, E);
1675
- const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1711
+ const C = (P = r.scene) == null ? void 0 : P.getObjectByProperty("uuid", n.uuid);
1676
1712
  C !== void 0 && yt(E).then((D) => {
1677
1713
  Z(C, `material.${i}`, D), Z(C, "material.needsUpdate", !0);
1678
1714
  });
@@ -1683,9 +1719,9 @@ function Nt(t, n, r) {
1683
1719
  type: `${typeof t[i][l]}`,
1684
1720
  value: c[l],
1685
1721
  onChange: (g, E) => {
1686
- var R;
1722
+ var P;
1687
1723
  r.updateObject(n.uuid, `material.${i}.${l}`, E);
1688
- const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1724
+ const C = (P = r.scene) == null ? void 0 : P.getObjectByProperty("uuid", n.uuid);
1689
1725
  C !== void 0 && Z(C, `material.${i}.${l}`, E);
1690
1726
  }
1691
1727
  });
@@ -1696,9 +1732,9 @@ function Nt(t, n, r) {
1696
1732
  type: "image",
1697
1733
  value: h.value.src,
1698
1734
  onChange: (g, E) => {
1699
- var R;
1735
+ var P;
1700
1736
  r.createTexture(n.uuid, `material.${i}.${l}.value`, E);
1701
- const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1737
+ const C = (P = r.scene) == null ? void 0 : P.getObjectByProperty("uuid", n.uuid);
1702
1738
  C !== void 0 && yt(E).then((D) => {
1703
1739
  Z(C, `material.${i}.${l}.value`, D);
1704
1740
  });
@@ -1708,9 +1744,9 @@ function Nt(t, n, r) {
1708
1744
  type: `${typeof h.value}`,
1709
1745
  value: h.value,
1710
1746
  onChange: (g, E) => {
1711
- var R;
1747
+ var P;
1712
1748
  r.updateObject(n.uuid, `material.${i}.${l}.value`, E);
1713
- const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1749
+ const C = (P = r.scene) == null ? void 0 : P.getObjectByProperty("uuid", n.uuid);
1714
1750
  C !== void 0 && Z(C, `material.${i}.${l}.value`, E);
1715
1751
  }
1716
1752
  });
@@ -1733,58 +1769,58 @@ function Nt(t, n, r) {
1733
1769
  }
1734
1770
  }), e;
1735
1771
  }
1736
- function Jn(t, n) {
1772
+ function qn(t, n) {
1737
1773
  const r = t.material;
1738
1774
  if (Array.isArray(r)) {
1739
1775
  const e = [], i = r.length;
1740
1776
  for (let d = 0; d < i; d++)
1741
1777
  e.push(
1742
1778
  /* @__PURE__ */ u.jsx(
1743
- Ae,
1779
+ Ie,
1744
1780
  {
1745
1781
  title: `Material ${d}`,
1746
- items: Nt(r[d], t, n)
1782
+ items: At(r[d], t, n)
1747
1783
  }
1748
1784
  )
1749
1785
  );
1750
1786
  return /* @__PURE__ */ u.jsx(u.Fragment, { children: e });
1751
1787
  } else
1752
1788
  return /* @__PURE__ */ u.jsx(
1753
- Ae,
1789
+ Ie,
1754
1790
  {
1755
1791
  title: "Material",
1756
- items: Nt(r, t, n)
1792
+ items: At(r, t, n)
1757
1793
  }
1758
1794
  );
1759
1795
  }
1760
1796
  function Xe(t) {
1761
1797
  let n = t.value;
1762
- n !== void 0 && n.isColor !== void 0 && (n = _n(t.value));
1798
+ n !== void 0 && n.isColor !== void 0 && (n = kn(t.value));
1763
1799
  const [r, e] = re(n), i = Se(null), d = Se(null), c = Se(null);
1764
1800
  qe(() => {
1765
1801
  var O;
1766
- let m = !1, g = -1, E = 0, C = Number(r);
1767
- const R = (j) => {
1768
- m = !0, E = C, g = j.clientX;
1769
- }, D = (j) => {
1770
- if (!m)
1802
+ let p = !1, g = -1, E = 0, C = Number(r);
1803
+ const P = (R) => {
1804
+ p = !0, E = C, g = R.clientX;
1805
+ }, D = (R) => {
1806
+ if (!p)
1771
1807
  return;
1772
- const z = t.step !== void 0 ? t.step : 1, ee = (j.clientX - g) * z;
1808
+ const z = t.step !== void 0 ? t.step : 1, ee = (R.clientX - g) * z;
1773
1809
  C = Number((E + ee).toFixed(4)), d.current !== null && (d.current.value = C.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, C);
1774
1810
  }, y = () => {
1775
- m = !1;
1811
+ p = !1;
1776
1812
  }, b = () => {
1777
- m = !1;
1813
+ p = !1;
1778
1814
  }, v = t.type === "number";
1779
- return v && ((O = i.current) == null || O.addEventListener("mousedown", R, !1), document.addEventListener("mouseup", y, !1), document.addEventListener("mousemove", D, !1), document.addEventListener("contextmenu", b, !1)), () => {
1780
- var j;
1781
- v && ((j = i.current) == null || j.removeEventListener("mousedown", R), document.removeEventListener("mouseup", y), document.removeEventListener("mousemove", D), document.removeEventListener("contextmenu", b));
1815
+ return v && ((O = i.current) == null || O.addEventListener("mousedown", P, !1), document.addEventListener("mouseup", y, !1), document.addEventListener("mousemove", D, !1), document.addEventListener("contextmenu", b, !1)), () => {
1816
+ var R;
1817
+ v && ((R = i.current) == null || R.removeEventListener("mousedown", P), document.removeEventListener("mouseup", y), document.removeEventListener("mousemove", D), document.removeEventListener("contextmenu", b));
1782
1818
  };
1783
1819
  }, [r]);
1784
1820
  const s = t.type === "string" && (r.length > 100 || r.search(`
1785
- `) > -1), l = s || t.type === "image", h = (m) => {
1786
- let g = m.target.value;
1787
- t.type === "boolean" && (g = m.target.checked), e(g), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, g);
1821
+ `) > -1), l = s || t.type === "image", h = (p) => {
1822
+ let g = p.target.value;
1823
+ t.type === "boolean" && (g = p.target.checked), e(g), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, g);
1788
1824
  };
1789
1825
  return /* @__PURE__ */ u.jsxs("div", { className: `field ${l ? "block" : ""}`, children: [
1790
1826
  t.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: i, children: t.title }, "fieldLabel"),
@@ -1857,13 +1893,13 @@ function Xe(t) {
1857
1893
  }
1858
1894
  ),
1859
1895
  t.type === "image" && /* @__PURE__ */ u.jsx("img", { ref: c, onClick: () => {
1860
- Zn().then((m) => {
1861
- c.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
1896
+ Xn().then((p) => {
1897
+ c.current.src = p, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, p);
1862
1898
  });
1863
- }, src: r.length > 0 ? r : Hn })
1899
+ }, src: r.length > 0 ? r : zn })
1864
1900
  ] });
1865
1901
  }
1866
- function Lt(t) {
1902
+ function Nt(t) {
1867
1903
  switch (t) {
1868
1904
  case "fov":
1869
1905
  return "FOV";
@@ -1892,12 +1928,12 @@ function Lt(t) {
1892
1928
  }
1893
1929
  return t;
1894
1930
  }
1895
- function Qn(t, n) {
1931
+ function Zn(t, n) {
1896
1932
  const r = [];
1897
1933
  if (t.perspectiveCameraInfo !== void 0)
1898
1934
  for (const e in t.perspectiveCameraInfo)
1899
1935
  r.push({
1900
- title: Lt(e),
1936
+ title: Nt(e),
1901
1937
  prop: e,
1902
1938
  type: "number",
1903
1939
  step: 0.01,
@@ -1912,7 +1948,7 @@ function Qn(t, n) {
1912
1948
  else if (t.orthographicCameraInfo !== void 0)
1913
1949
  for (const e in t.orthographicCameraInfo)
1914
1950
  r.push({
1915
- title: Lt(e),
1951
+ title: Nt(e),
1916
1952
  prop: e,
1917
1953
  type: "number",
1918
1954
  step: 0.01,
@@ -1925,23 +1961,23 @@ function Qn(t, n) {
1925
1961
  }
1926
1962
  });
1927
1963
  return /* @__PURE__ */ u.jsx(
1928
- Ae,
1964
+ Ie,
1929
1965
  {
1930
1966
  title: "Camera",
1931
1967
  items: r
1932
1968
  }
1933
1969
  );
1934
1970
  }
1935
- function ea(t, n) {
1936
- const r = new fn();
1971
+ function Jn(t, n) {
1972
+ const r = new ln();
1937
1973
  r.elements = t.matrix;
1938
- const e = new G(), i = new hn(), d = new G();
1974
+ const e = new G(), i = new un(), d = new G();
1939
1975
  t.uuid.length > 0 && (e.setFromMatrixPosition(r), i.setFromRotationMatrix(r), d.setFromMatrixScale(r));
1940
1976
  const c = (l, h) => {
1941
1977
  var g;
1942
1978
  n.updateObject(t.uuid, l, h);
1943
- const m = (g = n.scene) == null ? void 0 : g.getObjectByProperty("uuid", t.uuid);
1944
- m !== void 0 && Z(m, l, h);
1979
+ const p = (g = n.scene) == null ? void 0 : g.getObjectByProperty("uuid", t.uuid);
1980
+ p !== void 0 && Z(p, l, h);
1945
1981
  }, s = [
1946
1982
  {
1947
1983
  title: "Position",
@@ -2035,14 +2071,14 @@ function ea(t, n) {
2035
2071
  }
2036
2072
  ];
2037
2073
  return /* @__PURE__ */ u.jsx(
2038
- Ae,
2074
+ Ie,
2039
2075
  {
2040
2076
  title: "Transform",
2041
2077
  items: s
2042
2078
  }
2043
2079
  );
2044
2080
  }
2045
- function Ft(t) {
2081
+ function Lt(t) {
2046
2082
  switch (t) {
2047
2083
  case "color":
2048
2084
  return "Color";
@@ -2061,25 +2097,25 @@ function Ft(t) {
2061
2097
  }
2062
2098
  return t;
2063
2099
  }
2064
- function ta(t, n) {
2100
+ function Qn(t, n) {
2065
2101
  const r = [];
2066
2102
  if (t.lightInfo !== void 0)
2067
2103
  for (const e in t.lightInfo) {
2068
2104
  const i = t.lightInfo[e];
2069
2105
  i !== void 0 && (i.isColor !== void 0 ? r.push({
2070
- title: Ft(e),
2106
+ title: Lt(e),
2071
2107
  prop: e,
2072
2108
  type: "color",
2073
2109
  value: i,
2074
2110
  onChange: (d, c) => {
2075
2111
  var h;
2076
- const s = new St(c);
2112
+ const s = new Ct(c);
2077
2113
  n.updateObject(t.uuid, d, s);
2078
2114
  const l = (h = n.scene) == null ? void 0 : h.getObjectByProperty("uuid", t.uuid);
2079
2115
  l !== void 0 && Z(l, d, s);
2080
2116
  }
2081
2117
  }) : r.push({
2082
- title: Ft(e),
2118
+ title: Lt(e),
2083
2119
  prop: e,
2084
2120
  type: typeof i,
2085
2121
  value: i,
@@ -2093,14 +2129,14 @@ function ta(t, n) {
2093
2129
  }));
2094
2130
  }
2095
2131
  return /* @__PURE__ */ u.jsx(
2096
- Ae,
2132
+ Ie,
2097
2133
  {
2098
2134
  title: "Light",
2099
2135
  items: r
2100
2136
  }
2101
2137
  );
2102
2138
  }
2103
- function na(t) {
2139
+ function ea(t) {
2104
2140
  const [n, r] = re(-1), [e, i] = re({
2105
2141
  name: "",
2106
2142
  uuid: "",
@@ -2112,15 +2148,17 @@ function na(t) {
2112
2148
  orthographicCameraInfo: void 0,
2113
2149
  lightInfo: void 0
2114
2150
  });
2115
- return qe(() => {
2116
- function d(c) {
2117
- const s = c.value;
2118
- i(s), r(Date.now());
2151
+ qe(() => {
2152
+ function c(s) {
2153
+ const l = s.value;
2154
+ i(l), r(Date.now());
2119
2155
  }
2120
- return I.addEventListener(N.SET_OBJECT, d), () => {
2121
- I.removeEventListener(N.SET_OBJECT, d);
2156
+ return A.addEventListener(N.SET_OBJECT, c), () => {
2157
+ A.removeEventListener(N.SET_OBJECT, c);
2122
2158
  };
2123
- }, []), /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2159
+ }, []);
2160
+ const d = e.type.toLowerCase();
2161
+ return /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2124
2162
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2125
2163
  /* @__PURE__ */ u.jsx(
2126
2164
  Xe,
@@ -2159,24 +2197,24 @@ function na(t) {
2159
2197
  title: "Visible",
2160
2198
  prop: "visible",
2161
2199
  value: e.visible,
2162
- onChange: (d, c) => {
2163
- var l;
2164
- t.three.updateObject(e.uuid, d, c);
2165
- const s = (l = t.three.scene) == null ? void 0 : l.getObjectByProperty("uuid", e.uuid);
2166
- s !== void 0 && Z(s, d, c);
2200
+ onChange: (c, s) => {
2201
+ var h;
2202
+ t.three.updateObject(e.uuid, c, s);
2203
+ const l = (h = t.three.scene) == null ? void 0 : h.getObjectByProperty("uuid", e.uuid);
2204
+ l !== void 0 && Z(l, c, s);
2167
2205
  }
2168
2206
  }
2169
2207
  )
2170
2208
  ] }),
2171
2209
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2172
- ea(e, t.three),
2173
- e.orthographicCameraInfo !== void 0 || e.perspectiveCameraInfo !== void 0 ? Qn(e, t.three) : null,
2174
- e.lightInfo !== void 0 ? ta(e, t.three) : null,
2175
- e.material !== void 0 ? Jn(e, t.three) : null
2210
+ Jn(e, t.three),
2211
+ d.search("camera") > -1 ? Zn(e, t.three) : null,
2212
+ d.search("light") > -1 ? Qn(e, t.three) : null,
2213
+ d.search("mesh") > -1 ? qn(e, t.three) : null
2176
2214
  ] })
2177
2215
  ] }) }, n);
2178
2216
  }
2179
- class Pa extends jn {
2217
+ class Oa extends Mn {
2180
2218
  constructor(r) {
2181
2219
  super(r);
2182
2220
  $(this, "three");
@@ -2191,13 +2229,13 @@ class Pa extends jn {
2191
2229
  });
2192
2230
  this.state = {
2193
2231
  scene: r.scene !== void 0 ? r.scene : null
2194
- }, this.three = r.three, I.addEventListener(N.SET_SCENE, this.setScene);
2232
+ }, this.three = r.three, A.addEventListener(N.SET_SCENE, this.setScene);
2195
2233
  }
2196
2234
  componentDidMount() {
2197
2235
  this.onRefresh();
2198
2236
  }
2199
2237
  componentWillUnmount() {
2200
- I.removeEventListener(N.SET_SCENE, this.setScene);
2238
+ A.removeEventListener(N.SET_SCENE, this.setScene);
2201
2239
  }
2202
2240
  render() {
2203
2241
  var i;
@@ -2209,10 +2247,10 @@ class Pa extends jn {
2209
2247
  label: e,
2210
2248
  button: /* @__PURE__ */ u.jsx("button", { className: "icon refresh hideText", onClick: this.onRefresh, children: "Refresh" }),
2211
2249
  open: !0,
2212
- children: /* @__PURE__ */ u.jsx(Wn, { child: this.componentState.scene, three: this.three })
2250
+ children: /* @__PURE__ */ u.jsx(Vn, { child: this.componentState.scene, three: this.three })
2213
2251
  }
2214
2252
  ),
2215
- /* @__PURE__ */ u.jsx(wt, { label: "Inspector", children: /* @__PURE__ */ u.jsx(na, { three: this.three }, "Inspector") })
2253
+ /* @__PURE__ */ u.jsx(wt, { label: "Inspector", children: /* @__PURE__ */ u.jsx(ea, { three: this.three }, "Inspector") })
2216
2254
  ] }) }, "SceneHierarchy");
2217
2255
  }
2218
2256
  // Getters / Setters
@@ -2220,16 +2258,16 @@ class Pa extends jn {
2220
2258
  return this.state;
2221
2259
  }
2222
2260
  }
2223
- function Ra(t) {
2261
+ function Ta(t) {
2224
2262
  const n = (s) => {
2225
2263
  const l = t.scene.getObjectByProperty("uuid", s.value);
2226
2264
  l !== void 0 && t.three.setObject(l);
2227
2265
  }, r = (s, l, h) => {
2228
- const m = t.scene.getObjectByProperty("uuid", s);
2229
- m !== void 0 && Z(m, l, h);
2266
+ const p = t.scene.getObjectByProperty("uuid", s);
2267
+ p !== void 0 && Z(p, l, h);
2230
2268
  }, e = (s) => {
2231
- const l = s.value, { key: h, value: m, uuid: g } = l;
2232
- r(g, h, m);
2269
+ const l = s.value, { key: h, value: p, uuid: g } = l;
2270
+ r(g, h, p);
2233
2271
  }, i = (s) => {
2234
2272
  const l = s.value;
2235
2273
  yt(l.value).then((h) => {
@@ -2238,20 +2276,20 @@ function Ra(t) {
2238
2276
  }, d = () => {
2239
2277
  t.three.setScene(t.scene);
2240
2278
  }, c = (s) => {
2241
- const { key: l, uuid: h, value: m } = s.value, g = t.scene.getObjectByProperty("uuid", h);
2279
+ const { key: l, uuid: h, value: p } = s.value, g = t.scene.getObjectByProperty("uuid", h);
2242
2280
  if (g !== void 0)
2243
2281
  try {
2244
- g[l](m);
2282
+ g[l](p);
2245
2283
  } catch (E) {
2246
- console.log("Error requesting method:"), console.log(E), console.log(l), console.log(m);
2284
+ console.log("Error requesting method:"), console.log(E), console.log(l), console.log(p);
2247
2285
  }
2248
2286
  };
2249
- return qe(() => (I.addEventListener(N.GET_OBJECT, n), I.addEventListener(N.GET_SCENE, d), I.addEventListener(N.UPDATE_OBJECT, e), I.addEventListener(N.CREATE_TEXTURE, i), I.addEventListener(N.REQUEST_METHOD, c), () => {
2250
- I.removeEventListener(N.GET_OBJECT, n), I.removeEventListener(N.GET_SCENE, d), I.removeEventListener(N.UPDATE_OBJECT, e), I.removeEventListener(N.CREATE_TEXTURE, i), I.removeEventListener(N.REQUEST_METHOD, c);
2287
+ return qe(() => (A.addEventListener(N.GET_OBJECT, n), A.addEventListener(N.GET_SCENE, d), A.addEventListener(N.UPDATE_OBJECT, e), A.addEventListener(N.CREATE_TEXTURE, i), A.addEventListener(N.REQUEST_METHOD, c), () => {
2288
+ A.removeEventListener(N.GET_OBJECT, n), A.removeEventListener(N.GET_SCENE, d), A.removeEventListener(N.UPDATE_OBJECT, e), A.removeEventListener(N.CREATE_TEXTURE, i), A.removeEventListener(N.REQUEST_METHOD, c);
2251
2289
  }), []), null;
2252
2290
  }
2253
- const Ut = { type: "change" }, vt = { type: "start" }, Bt = { type: "end" }, ct = new mn(), $t = new pn(), aa = Math.cos(70 * gn.DEG2RAD);
2254
- class ra extends Yt {
2291
+ const Ft = { type: "change" }, gt = { type: "start" }, Ut = { type: "end" }, ct = new dn(), Bt = new fn(), ta = Math.cos(70 * hn.DEG2RAD);
2292
+ class na extends Gt {
2255
2293
  constructor(n, r) {
2256
2294
  super(), this.object = n, this.domElement = r, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new G(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 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: De.ROTATE, MIDDLE: De.DOLLY, RIGHT: De.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2257
2295
  return s.phi;
@@ -2266,33 +2304,33 @@ class ra extends Yt {
2266
2304
  }, this.saveState = function() {
2267
2305
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2268
2306
  }, this.reset = function() {
2269
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Ut), e.update(), d = i.NONE;
2307
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Ft), e.update(), d = i.NONE;
2270
2308
  }, this.update = function() {
2271
- const o = new G(), w = new Mt().setFromUnitVectors(n.up, new G(0, 1, 0)), F = w.clone().invert(), U = new G(), K = new Mt(), fe = new G(), ie = 2 * Math.PI;
2309
+ const o = new G(), w = new Rt().setFromUnitVectors(n.up, new G(0, 1, 0)), F = w.clone().invert(), U = new G(), K = new Rt(), fe = new G(), ie = 2 * Math.PI;
2272
2310
  return function() {
2273
2311
  const ze = e.object.position;
2274
- o.copy(ze).sub(e.target), o.applyQuaternion(w), s.setFromVector3(o), e.autoRotate && d === i.NONE && M(Te()), e.enableDamping ? (s.theta += l.theta * e.dampingFactor, s.phi += l.phi * e.dampingFactor) : (s.theta += l.theta, s.phi += l.phi);
2312
+ o.copy(ze).sub(e.target), o.applyQuaternion(w), s.setFromVector3(o), e.autoRotate && d === i.NONE && j(Te()), e.enableDamping ? (s.theta += l.theta * e.dampingFactor, s.phi += l.phi * e.dampingFactor) : (s.theta += l.theta, s.phi += l.phi);
2275
2313
  let W = e.minAzimuthAngle, Q = e.maxAzimuthAngle;
2276
- isFinite(W) && isFinite(Q) && (W < -Math.PI ? W += ie : W > Math.PI && (W -= ie), Q < -Math.PI ? Q += ie : Q > Math.PI && (Q -= ie), W <= Q ? s.theta = Math.max(W, Math.min(Q, s.theta)) : s.theta = s.theta > (W + Q) / 2 ? Math.max(W, s.theta) : Math.min(Q, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.zoomToCursor && ee || e.object.isOrthographicCamera ? s.radius = Re(s.radius) : s.radius = Re(s.radius * h), o.setFromSpherical(s), o.applyQuaternion(F), ze.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (l.theta *= 1 - e.dampingFactor, l.phi *= 1 - e.dampingFactor, m.multiplyScalar(1 - e.dampingFactor)) : (l.set(0, 0, 0), m.set(0, 0, 0));
2314
+ isFinite(W) && isFinite(Q) && (W < -Math.PI ? W += ie : W > Math.PI && (W -= ie), Q < -Math.PI ? Q += ie : Q > Math.PI && (Q -= ie), W <= Q ? s.theta = Math.max(W, Math.min(Q, s.theta)) : s.theta = s.theta > (W + Q) / 2 ? Math.max(W, s.theta) : Math.min(Q, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(p, e.dampingFactor) : e.target.add(p), e.zoomToCursor && ee || e.object.isOrthographicCamera ? s.radius = Pe(s.radius) : s.radius = Pe(s.radius * h), o.setFromSpherical(s), o.applyQuaternion(F), ze.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (l.theta *= 1 - e.dampingFactor, l.phi *= 1 - e.dampingFactor, p.multiplyScalar(1 - e.dampingFactor)) : (l.set(0, 0, 0), p.set(0, 0, 0));
2277
2315
  let he = !1;
2278
2316
  if (e.zoomToCursor && ee) {
2279
- let me = null;
2317
+ let pe = null;
2280
2318
  if (e.object.isPerspectiveCamera) {
2281
2319
  const Ee = o.length();
2282
- me = Re(Ee * h);
2283
- const we = Ee - me;
2284
- e.object.position.addScaledVector(j, we), e.object.updateMatrixWorld();
2320
+ pe = Pe(Ee * h);
2321
+ const we = Ee - pe;
2322
+ e.object.position.addScaledVector(R, we), e.object.updateMatrixWorld();
2285
2323
  } else if (e.object.isOrthographicCamera) {
2286
2324
  const Ee = new G(z.x, z.y, 0);
2287
2325
  Ee.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), e.object.updateProjectionMatrix(), he = !0;
2288
2326
  const we = new G(z.x, z.y, 0);
2289
- we.unproject(e.object), e.object.position.sub(we).add(Ee), e.object.updateMatrixWorld(), me = o.length();
2327
+ we.unproject(e.object), e.object.position.sub(we).add(Ee), e.object.updateMatrixWorld(), pe = o.length();
2290
2328
  } else
2291
2329
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2292
- me !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(me).add(e.object.position) : (ct.origin.copy(e.object.position), ct.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(ct.direction)) < aa ? n.lookAt(e.target) : ($t.setFromNormalAndCoplanarPoint(e.object.up, e.target), ct.intersectPlane($t, e.target))));
2330
+ pe !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(pe).add(e.object.position) : (ct.origin.copy(e.object.position), ct.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(ct.direction)) < ta ? n.lookAt(e.target) : (Bt.setFromNormalAndCoplanarPoint(e.object.up, e.target), ct.intersectPlane(Bt, e.target))));
2293
2331
  } else
2294
2332
  e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), e.object.updateProjectionMatrix(), he = !0);
2295
- return h = 1, ee = !1, he || U.distanceToSquared(e.object.position) > c || 8 * (1 - K.dot(e.object.quaternion)) > c || fe.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Ut), U.copy(e.object.position), K.copy(e.object.quaternion), fe.copy(e.target), he = !1, !0) : !1;
2333
+ return h = 1, ee = !1, he || U.distanceToSquared(e.object.position) > c || 8 * (1 - K.dot(e.object.quaternion)) > c || fe.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Ft), U.copy(e.object.position), K.copy(e.object.quaternion), fe.copy(e.target), he = !1, !0) : !1;
2296
2334
  };
2297
2335
  }(), this.dispose = function() {
2298
2336
  e.domElement.removeEventListener("contextmenu", de), e.domElement.removeEventListener("pointerdown", $e), e.domElement.removeEventListener("pointercancel", be), e.domElement.removeEventListener("wheel", at), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Ye), e._domElementKeyEvents = null);
@@ -2308,9 +2346,9 @@ class ra extends Yt {
2308
2346
  TOUCH_DOLLY_ROTATE: 6
2309
2347
  };
2310
2348
  let d = i.NONE;
2311
- const c = 1e-6, s = new kt(), l = new kt();
2349
+ const c = 1e-6, s = new jt(), l = new jt();
2312
2350
  let h = 1;
2313
- const m = new G(), g = new ae(), E = new ae(), C = new ae(), R = new ae(), D = new ae(), y = new ae(), b = new ae(), v = new ae(), O = new ae(), j = new G(), z = new ae();
2351
+ const p = new G(), g = new ae(), E = new ae(), C = new ae(), P = new ae(), D = new ae(), y = new ae(), b = new ae(), v = new ae(), O = new ae(), R = new G(), z = new ae();
2314
2352
  let ee = !1;
2315
2353
  const T = [], le = {};
2316
2354
  function Te() {
@@ -2319,21 +2357,21 @@ class ra extends Yt {
2319
2357
  function oe() {
2320
2358
  return Math.pow(0.95, e.zoomSpeed);
2321
2359
  }
2322
- function M(o) {
2360
+ function j(o) {
2323
2361
  l.theta -= o;
2324
2362
  }
2325
- function A(o) {
2363
+ function I(o) {
2326
2364
  l.phi -= o;
2327
2365
  }
2328
2366
  const L = function() {
2329
2367
  const o = new G();
2330
2368
  return function(F, U) {
2331
- o.setFromMatrixColumn(U, 0), o.multiplyScalar(-F), m.add(o);
2369
+ o.setFromMatrixColumn(U, 0), o.multiplyScalar(-F), p.add(o);
2332
2370
  };
2333
2371
  }(), J = function() {
2334
2372
  const o = new G();
2335
2373
  return function(F, U) {
2336
- e.screenSpacePanning === !0 ? o.setFromMatrixColumn(U, 1) : (o.setFromMatrixColumn(U, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(F), m.add(o);
2374
+ e.screenSpacePanning === !0 ? o.setFromMatrixColumn(U, 1) : (o.setFromMatrixColumn(U, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(F), p.add(o);
2337
2375
  };
2338
2376
  }(), te = function() {
2339
2377
  const o = new G();
@@ -2348,10 +2386,10 @@ class ra extends Yt {
2348
2386
  e.object.isOrthographicCamera ? (L(F * (e.object.right - e.object.left) / e.object.zoom / K.clientWidth, e.object.matrix), J(U * (e.object.top - e.object.bottom) / e.object.zoom / K.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2349
2387
  };
2350
2388
  }();
2351
- function Pe(o) {
2389
+ function Me(o) {
2352
2390
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2353
2391
  }
2354
- function Ie(o) {
2392
+ function Ae(o) {
2355
2393
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2356
2394
  }
2357
2395
  function Ne(o) {
@@ -2359,9 +2397,9 @@ class ra extends Yt {
2359
2397
  return;
2360
2398
  ee = !0;
2361
2399
  const w = e.domElement.getBoundingClientRect(), F = o.clientX - w.left, U = o.clientY - w.top, K = w.width, fe = w.height;
2362
- z.x = F / K * 2 - 1, z.y = -(U / fe) * 2 + 1, j.set(z.x, z.y, 1).unproject(n).sub(n.position).normalize();
2400
+ z.x = F / K * 2 - 1, z.y = -(U / fe) * 2 + 1, R.set(z.x, z.y, 1).unproject(n).sub(n.position).normalize();
2363
2401
  }
2364
- function Re(o) {
2402
+ function Pe(o) {
2365
2403
  return Math.max(e.minDistance, Math.min(e.maxDistance, o));
2366
2404
  }
2367
2405
  function Le(o) {
@@ -2371,41 +2409,41 @@ class ra extends Yt {
2371
2409
  Ne(o), b.set(o.clientX, o.clientY);
2372
2410
  }
2373
2411
  function Fe(o) {
2374
- R.set(o.clientX, o.clientY);
2412
+ P.set(o.clientX, o.clientY);
2375
2413
  }
2376
2414
  function Je(o) {
2377
2415
  E.set(o.clientX, o.clientY), C.subVectors(E, g).multiplyScalar(e.rotateSpeed);
2378
2416
  const w = e.domElement;
2379
- M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), g.copy(E), e.update();
2417
+ j(2 * Math.PI * C.x / w.clientHeight), I(2 * Math.PI * C.y / w.clientHeight), g.copy(E), e.update();
2380
2418
  }
2381
- function ft(o) {
2382
- v.set(o.clientX, o.clientY), O.subVectors(v, b), O.y > 0 ? Pe(oe()) : O.y < 0 && Ie(oe()), b.copy(v), e.update();
2419
+ function dt(o) {
2420
+ v.set(o.clientX, o.clientY), O.subVectors(v, b), O.y > 0 ? Me(oe()) : O.y < 0 && Ae(oe()), b.copy(v), e.update();
2383
2421
  }
2384
- function ht(o) {
2385
- D.set(o.clientX, o.clientY), y.subVectors(D, R).multiplyScalar(e.panSpeed), te(y.x, y.y), R.copy(D), e.update();
2422
+ function ft(o) {
2423
+ D.set(o.clientX, o.clientY), y.subVectors(D, P).multiplyScalar(e.panSpeed), te(y.x, y.y), P.copy(D), e.update();
2386
2424
  }
2387
2425
  function Ue(o) {
2388
- Ne(o), o.deltaY < 0 ? Ie(oe()) : o.deltaY > 0 && Pe(oe()), e.update();
2426
+ Ne(o), o.deltaY < 0 ? Ae(oe()) : o.deltaY > 0 && Me(oe()), e.update();
2389
2427
  }
2390
2428
  function Be(o) {
2391
2429
  let w = !1;
2392
2430
  switch (o.code) {
2393
2431
  case e.keys.UP:
2394
- o.ctrlKey || o.metaKey || o.shiftKey ? A(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(0, e.keyPanSpeed), w = !0;
2432
+ o.ctrlKey || o.metaKey || o.shiftKey ? I(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(0, e.keyPanSpeed), w = !0;
2395
2433
  break;
2396
2434
  case e.keys.BOTTOM:
2397
- o.ctrlKey || o.metaKey || o.shiftKey ? A(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(0, -e.keyPanSpeed), w = !0;
2435
+ o.ctrlKey || o.metaKey || o.shiftKey ? I(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(0, -e.keyPanSpeed), w = !0;
2398
2436
  break;
2399
2437
  case e.keys.LEFT:
2400
- o.ctrlKey || o.metaKey || o.shiftKey ? M(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(e.keyPanSpeed, 0), w = !0;
2438
+ o.ctrlKey || o.metaKey || o.shiftKey ? j(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(e.keyPanSpeed, 0), w = !0;
2401
2439
  break;
2402
2440
  case e.keys.RIGHT:
2403
- o.ctrlKey || o.metaKey || o.shiftKey ? M(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(-e.keyPanSpeed, 0), w = !0;
2441
+ o.ctrlKey || o.metaKey || o.shiftKey ? j(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : te(-e.keyPanSpeed, 0), w = !0;
2404
2442
  break;
2405
2443
  }
2406
2444
  w && (o.preventDefault(), e.update());
2407
2445
  }
2408
- function pe() {
2446
+ function me() {
2409
2447
  if (T.length === 1)
2410
2448
  g.set(T[0].pageX, T[0].pageY);
2411
2449
  else {
@@ -2413,23 +2451,23 @@ class ra extends Yt {
2413
2451
  g.set(o, w);
2414
2452
  }
2415
2453
  }
2416
- function je() {
2454
+ function Re() {
2417
2455
  if (T.length === 1)
2418
- R.set(T[0].pageX, T[0].pageY);
2456
+ P.set(T[0].pageX, T[0].pageY);
2419
2457
  else {
2420
2458
  const o = 0.5 * (T[0].pageX + T[1].pageX), w = 0.5 * (T[0].pageY + T[1].pageY);
2421
- R.set(o, w);
2459
+ P.set(o, w);
2422
2460
  }
2423
2461
  }
2424
2462
  function ge() {
2425
2463
  const o = T[0].pageX - T[1].pageX, w = T[0].pageY - T[1].pageY, F = Math.sqrt(o * o + w * w);
2426
2464
  b.set(0, F);
2427
2465
  }
2428
- function mt() {
2429
- e.enableZoom && ge(), e.enablePan && je();
2466
+ function ht() {
2467
+ e.enableZoom && ge(), e.enablePan && Re();
2430
2468
  }
2431
2469
  function Qe() {
2432
- e.enableZoom && ge(), e.enableRotate && pe();
2470
+ e.enableZoom && ge(), e.enableRotate && me();
2433
2471
  }
2434
2472
  function et(o) {
2435
2473
  if (T.length == 1)
@@ -2440,7 +2478,7 @@ class ra extends Yt {
2440
2478
  }
2441
2479
  C.subVectors(E, g).multiplyScalar(e.rotateSpeed);
2442
2480
  const w = e.domElement;
2443
- M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), g.copy(E);
2481
+ j(2 * Math.PI * C.x / w.clientHeight), I(2 * Math.PI * C.y / w.clientHeight), g.copy(E);
2444
2482
  }
2445
2483
  function tt(o) {
2446
2484
  if (T.length === 1)
@@ -2449,26 +2487,26 @@ class ra extends Yt {
2449
2487
  const w = ye(o), F = 0.5 * (o.pageX + w.x), U = 0.5 * (o.pageY + w.y);
2450
2488
  D.set(F, U);
2451
2489
  }
2452
- y.subVectors(D, R).multiplyScalar(e.panSpeed), te(y.x, y.y), R.copy(D);
2490
+ y.subVectors(D, P).multiplyScalar(e.panSpeed), te(y.x, y.y), P.copy(D);
2453
2491
  }
2454
2492
  function ve(o) {
2455
2493
  const w = ye(o), F = o.pageX - w.x, U = o.pageY - w.y, K = Math.sqrt(F * F + U * U);
2456
- v.set(0, K), O.set(0, Math.pow(v.y / b.y, e.zoomSpeed)), Pe(O.y), b.copy(v);
2494
+ v.set(0, K), O.set(0, Math.pow(v.y / b.y, e.zoomSpeed)), Me(O.y), b.copy(v);
2457
2495
  }
2458
- function Me(o) {
2496
+ function je(o) {
2459
2497
  e.enableZoom && ve(o), e.enablePan && tt(o);
2460
2498
  }
2461
2499
  function nt(o) {
2462
2500
  e.enableZoom && ve(o), e.enableRotate && et(o);
2463
2501
  }
2464
2502
  function $e(o) {
2465
- e.enabled !== !1 && (T.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", ue), e.domElement.addEventListener("pointerup", be)), gt(o), o.pointerType === "touch" ? rt(o) : pt(o));
2503
+ e.enabled !== !1 && (T.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", ue), e.domElement.addEventListener("pointerup", be)), mt(o), o.pointerType === "touch" ? rt(o) : pt(o));
2466
2504
  }
2467
2505
  function ue(o) {
2468
2506
  e.enabled !== !1 && (o.pointerType === "touch" ? it(o) : Ge(o));
2469
2507
  }
2470
2508
  function be(o) {
2471
- ot(o), T.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be)), e.dispatchEvent(Bt), d = i.NONE;
2509
+ ot(o), T.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be)), e.dispatchEvent(Ut), d = i.NONE;
2472
2510
  }
2473
2511
  function pt(o) {
2474
2512
  let w;
@@ -2516,7 +2554,7 @@ class ra extends Yt {
2516
2554
  default:
2517
2555
  d = i.NONE;
2518
2556
  }
2519
- d !== i.NONE && e.dispatchEvent(vt);
2557
+ d !== i.NONE && e.dispatchEvent(gt);
2520
2558
  }
2521
2559
  function Ge(o) {
2522
2560
  switch (d) {
@@ -2528,17 +2566,17 @@ class ra extends Yt {
2528
2566
  case i.DOLLY:
2529
2567
  if (e.enableZoom === !1)
2530
2568
  return;
2531
- ft(o);
2569
+ dt(o);
2532
2570
  break;
2533
2571
  case i.PAN:
2534
2572
  if (e.enablePan === !1)
2535
2573
  return;
2536
- ht(o);
2574
+ ft(o);
2537
2575
  break;
2538
2576
  }
2539
2577
  }
2540
2578
  function at(o) {
2541
- e.enabled === !1 || e.enableZoom === !1 || d !== i.NONE || (o.preventDefault(), e.dispatchEvent(vt), Ue(o), e.dispatchEvent(Bt));
2579
+ e.enabled === !1 || e.enableZoom === !1 || d !== i.NONE || (o.preventDefault(), e.dispatchEvent(gt), Ue(o), e.dispatchEvent(Ut));
2542
2580
  }
2543
2581
  function Ye(o) {
2544
2582
  e.enabled === !1 || e.enablePan === !1 || Be(o);
@@ -2550,12 +2588,12 @@ class ra extends Yt {
2550
2588
  case _e.ROTATE:
2551
2589
  if (e.enableRotate === !1)
2552
2590
  return;
2553
- pe(), d = i.TOUCH_ROTATE;
2591
+ me(), d = i.TOUCH_ROTATE;
2554
2592
  break;
2555
2593
  case _e.PAN:
2556
2594
  if (e.enablePan === !1)
2557
2595
  return;
2558
- je(), d = i.TOUCH_PAN;
2596
+ Re(), d = i.TOUCH_PAN;
2559
2597
  break;
2560
2598
  default:
2561
2599
  d = i.NONE;
@@ -2566,7 +2604,7 @@ class ra extends Yt {
2566
2604
  case _e.DOLLY_PAN:
2567
2605
  if (e.enableZoom === !1 && e.enablePan === !1)
2568
2606
  return;
2569
- mt(), d = i.TOUCH_DOLLY_PAN;
2607
+ ht(), d = i.TOUCH_DOLLY_PAN;
2570
2608
  break;
2571
2609
  case _e.DOLLY_ROTATE:
2572
2610
  if (e.enableZoom === !1 && e.enableRotate === !1)
@@ -2580,7 +2618,7 @@ class ra extends Yt {
2580
2618
  default:
2581
2619
  d = i.NONE;
2582
2620
  }
2583
- d !== i.NONE && e.dispatchEvent(vt);
2621
+ d !== i.NONE && e.dispatchEvent(gt);
2584
2622
  }
2585
2623
  function it(o) {
2586
2624
  switch (Ve(o), d) {
@@ -2597,7 +2635,7 @@ class ra extends Yt {
2597
2635
  case i.TOUCH_DOLLY_PAN:
2598
2636
  if (e.enableZoom === !1 && e.enablePan === !1)
2599
2637
  return;
2600
- Me(o), e.update();
2638
+ je(o), e.update();
2601
2639
  break;
2602
2640
  case i.TOUCH_DOLLY_ROTATE:
2603
2641
  if (e.enableZoom === !1 && e.enableRotate === !1)
@@ -2611,7 +2649,7 @@ class ra extends Yt {
2611
2649
  function de(o) {
2612
2650
  e.enabled !== !1 && o.preventDefault();
2613
2651
  }
2614
- function gt(o) {
2652
+ function mt(o) {
2615
2653
  T.push(o);
2616
2654
  }
2617
2655
  function ot(o) {
@@ -2643,13 +2681,13 @@ const xt = (t) => {
2643
2681
  /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: d, children: e }),
2644
2682
  n && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ u.jsx("li", { onClick: () => c(s), children: s }, s)) })
2645
2683
  ] });
2646
- }, Ce = Mn(function(n, r) {
2684
+ }, Ce = Pn(function(n, r) {
2647
2685
  const e = n.options.indexOf(n.camera.name);
2648
2686
  return /* @__PURE__ */ u.jsxs("div", { className: "CameraWindow", children: [
2649
2687
  /* @__PURE__ */ u.jsx("div", { ref: r, className: "clickable" }),
2650
2688
  /* @__PURE__ */ u.jsx(xt, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
2651
2689
  ] });
2652
- }), ia = `out vec3 worldPosition;
2690
+ }), aa = `out vec3 worldPosition;
2653
2691
  uniform float uDistance;
2654
2692
 
2655
2693
  void main() {
@@ -2658,7 +2696,7 @@ void main() {
2658
2696
  worldPosition.xz += cameraPosition.xz;
2659
2697
 
2660
2698
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
2661
- }`, oa = `out vec4 fragColor;
2699
+ }`, ra = `out vec4 fragColor;
2662
2700
  in vec3 worldPosition;
2663
2701
 
2664
2702
  uniform float uDivisions;
@@ -2726,14 +2764,14 @@ void main() {
2726
2764
 
2727
2765
  if (fragColor.a <= 0.0) discard;
2728
2766
  }`;
2729
- class sa extends vn {
2767
+ class ia extends pn {
2730
2768
  constructor(n) {
2731
2769
  super({
2732
2770
  extensions: {
2733
2771
  derivatives: !0
2734
2772
  },
2735
- glslVersion: bn,
2736
- side: yn,
2773
+ glslVersion: mn,
2774
+ side: gn,
2737
2775
  transparent: !0,
2738
2776
  uniforms: {
2739
2777
  uScale: {
@@ -2743,7 +2781,7 @@ class sa extends vn {
2743
2781
  value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
2744
2782
  },
2745
2783
  uColor: {
2746
- value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new St(16777215)
2784
+ value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Ct(16777215)
2747
2785
  },
2748
2786
  uDistance: {
2749
2787
  value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
@@ -2755,17 +2793,17 @@ class sa extends vn {
2755
2793
  value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
2756
2794
  }
2757
2795
  },
2758
- vertexShader: ia,
2759
- fragmentShader: oa,
2796
+ vertexShader: aa,
2797
+ fragmentShader: ra,
2760
2798
  name: "InfiniteGrid",
2761
2799
  depthWrite: !1
2762
2800
  });
2763
2801
  }
2764
2802
  }
2765
- class ca extends Vt {
2803
+ class oa extends vn {
2766
2804
  constructor() {
2767
- const r = new sa();
2768
- super(new En(2, 2), r);
2805
+ const r = new ia();
2806
+ super(new bn(2, 2), r);
2769
2807
  $(this, "gridMaterial");
2770
2808
  this.gridMaterial = r, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
2771
2809
  }
@@ -2773,14 +2811,14 @@ class ca extends Vt {
2773
2811
  this.gridMaterial.needsUpdate = !0;
2774
2812
  }
2775
2813
  }
2776
- const Gt = [
2814
+ const $t = [
2777
2815
  "Single",
2778
2816
  "Side by Side",
2779
2817
  "Stacked",
2780
2818
  "Quad"
2781
2819
  ], q = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Map();
2782
2820
  function Oe(t, n) {
2783
- const r = new Ct(-100, 100, 100, -100, 50, 3e3);
2821
+ const r = new Vt(-100, 100, 100, -100, 50, 3e3);
2784
2822
  return r.name = t, r.position.copy(n), r.lookAt(0, 0, 0), q.set(t, r), r;
2785
2823
  }
2786
2824
  Oe("Top", new G(0, 1e3, 0));
@@ -2790,30 +2828,30 @@ Oe("Right", new G(1e3, 0, 0));
2790
2828
  Oe("Front", new G(0, 0, 1e3));
2791
2829
  Oe("Back", new G(0, 0, -1e3));
2792
2830
  Oe("Orthographic", new G(1e3, 1e3, 1e3));
2793
- const dt = new lt(60, 1, 50, 3e3);
2794
- dt.name = "Debug";
2795
- dt.position.set(500, 500, 500);
2796
- dt.lookAt(0, 0, 0);
2797
- q.set("Debug", dt);
2798
- let bt = "Default";
2799
- const la = [
2831
+ const ut = new bt(60, 1, 50, 3e3);
2832
+ ut.name = "Debug";
2833
+ ut.position.set(500, 500, 500);
2834
+ ut.lookAt(0, 0, 0);
2835
+ q.set("Debug", ut);
2836
+ let vt = "Default";
2837
+ const sa = [
2800
2838
  "Default",
2801
2839
  "Normals",
2802
2840
  "Wireframe"
2803
- ], ua = new wn(), da = new xn({
2841
+ ], ca = new yn(), la = new En({
2804
2842
  opacity: 0.33,
2805
2843
  transparent: !0,
2806
2844
  wireframe: !0
2807
- }), V = new Cn();
2808
- function ja(t) {
2845
+ }), V = new wn();
2846
+ function Ma(t) {
2809
2847
  const [n, r] = re(t.mode !== void 0 ? t.mode : "Quad"), e = Se(null), i = Se(null), d = Se(null), c = Se(null);
2810
- let s = q.get("Debug"), l = q.get("Orthographic"), h = q.get("Front"), m = q.get("Top");
2848
+ let s = q.get("Debug"), l = q.get("Orthographic"), h = q.get("Front"), p = q.get("Top");
2811
2849
  const g = (y, b) => {
2812
2850
  const v = H.get(y.name);
2813
2851
  v !== void 0 && v.dispose(), H.delete(y.name);
2814
2852
  const O = ce.get(y.name);
2815
2853
  O !== void 0 && (V.remove(O), O.dispose()), ce.delete(y.name);
2816
- const j = new ra(y, b);
2854
+ const R = new na(y, b);
2817
2855
  switch (y.name) {
2818
2856
  case "Top":
2819
2857
  case "Bottom":
@@ -2821,11 +2859,11 @@ function ja(t) {
2821
2859
  case "Right":
2822
2860
  case "Front":
2823
2861
  case "Back":
2824
- j.enableRotate = !1;
2862
+ R.enableRotate = !1;
2825
2863
  break;
2826
2864
  }
2827
- if (H.set(y.name, j), y instanceof lt) {
2828
- const z = new On(y);
2865
+ if (H.set(y.name, R), y instanceof bt) {
2866
+ const z = new Cn(y);
2829
2867
  ce.set(y.name, z), V.add(z);
2830
2868
  }
2831
2869
  }, E = (y) => {
@@ -2839,7 +2877,7 @@ function ja(t) {
2839
2877
  const v = ce.get(b);
2840
2878
  v !== void 0 && (V.remove(v), v.dispose()), ce.delete(b), H.delete(b);
2841
2879
  }), H.clear(), ce.clear();
2842
- }, R = () => {
2880
+ }, P = () => {
2843
2881
  switch (n) {
2844
2882
  case "Single":
2845
2883
  g(s, e.current);
@@ -2849,36 +2887,36 @@ function ja(t) {
2849
2887
  g(s, e.current), g(l, i.current);
2850
2888
  break;
2851
2889
  case "Quad":
2852
- g(s, e.current), g(l, i.current), g(h, d.current), g(m, c.current);
2890
+ g(s, e.current), g(l, i.current), g(h, d.current), g(p, c.current);
2853
2891
  break;
2854
2892
  }
2855
2893
  };
2856
2894
  qe(() => {
2857
2895
  V.name = "Debug Scene", V.add(t.scene);
2858
- const y = new ca();
2896
+ const y = new oa();
2859
2897
  V.add(y);
2860
- const b = new Sn(500);
2898
+ const b = new xn(500);
2861
2899
  b.name = "axisHelper", V.add(b);
2862
2900
  }, []), qe(() => {
2863
2901
  const y = t.renderer.getSize(new ae());
2864
- let b = y.x, v = y.y, O = Math.floor(b / 2), j = Math.floor(v / 2), z = -1;
2902
+ let b = y.x, v = y.y, O = Math.floor(b / 2), R = Math.floor(v / 2), z = -1;
2865
2903
  const ee = () => {
2866
- b = window.innerWidth - 300, v = window.innerHeight, O = Math.floor(b / 2), j = Math.floor(v / 2);
2867
- let M = b, A = v;
2904
+ b = window.innerWidth - 300, v = window.innerHeight, O = Math.floor(b / 2), R = Math.floor(v / 2);
2905
+ let j = b, I = v;
2868
2906
  switch (n) {
2869
2907
  case "Side by Side":
2870
- M = O, A = v;
2908
+ j = O, I = v;
2871
2909
  break;
2872
2910
  case "Stacked":
2873
- M = b, A = j;
2911
+ j = b, I = R;
2874
2912
  break;
2875
2913
  case "Quad":
2876
- M = O, A = j;
2914
+ j = O, I = R;
2877
2915
  break;
2878
2916
  }
2879
2917
  q.forEach((L) => {
2880
2918
  var J;
2881
- L instanceof Ct ? (L.left = M / -2, L.right = M / 2, L.top = A / 2, L.bottom = A / -2, L.updateProjectionMatrix()) : L instanceof lt && (L.aspect = M / A, L.updateProjectionMatrix(), (J = ce.get(L.name)) == null || J.update());
2919
+ L instanceof Vt ? (L.left = j / -2, L.right = j / 2, L.top = I / 2, L.bottom = I / -2, L.updateProjectionMatrix()) : L instanceof bt && (L.aspect = j / I, L.updateProjectionMatrix(), (J = ce.get(L.name)) == null || J.update());
2882
2920
  });
2883
2921
  }, T = () => {
2884
2922
  t.renderer.setViewport(0, 0, b, v), t.renderer.setScissor(0, 0, b, v), t.renderer.render(V, s);
@@ -2886,15 +2924,15 @@ function ja(t) {
2886
2924
  if (n === "Side by Side")
2887
2925
  t.renderer.setViewport(0, 0, O, v), t.renderer.setScissor(0, 0, O, v), t.renderer.render(V, s), t.renderer.setViewport(O, 0, O, v), t.renderer.setScissor(O, 0, O, v), t.renderer.render(V, l);
2888
2926
  else {
2889
- const M = v - j;
2890
- t.renderer.setViewport(0, M, b, j), t.renderer.setScissor(0, M, b, j), t.renderer.render(V, s), t.renderer.setViewport(0, 0, b, j), t.renderer.setScissor(0, 0, b, j), t.renderer.render(V, l);
2927
+ const j = v - R;
2928
+ t.renderer.setViewport(0, j, b, R), t.renderer.setScissor(0, j, b, R), t.renderer.render(V, s), t.renderer.setViewport(0, 0, b, R), t.renderer.setScissor(0, 0, b, R), t.renderer.render(V, l);
2891
2929
  }
2892
2930
  }, Te = () => {
2893
- let M = 0, A = 0;
2894
- A = v - j, M = 0, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, s), M = O, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, l), A = 0, M = 0, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, h), M = O, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, m);
2931
+ let j = 0, I = 0;
2932
+ I = v - R, j = 0, t.renderer.setViewport(j, I, O, R), t.renderer.setScissor(j, I, O, R), t.renderer.render(V, s), j = O, t.renderer.setViewport(j, I, O, R), t.renderer.setScissor(j, I, O, R), t.renderer.render(V, l), I = 0, j = 0, t.renderer.setViewport(j, I, O, R), t.renderer.setScissor(j, I, O, R), t.renderer.render(V, h), j = O, t.renderer.setViewport(j, I, O, R), t.renderer.setScissor(j, I, O, R), t.renderer.render(V, p);
2895
2933
  }, oe = () => {
2896
- switch (H.forEach((M) => {
2897
- M.update();
2934
+ switch (H.forEach((j) => {
2935
+ j.update();
2898
2936
  }), t.scene.update(), t.renderer.clear(), n) {
2899
2937
  case "Single":
2900
2938
  T();
@@ -2909,7 +2947,7 @@ function ja(t) {
2909
2947
  }
2910
2948
  z = requestAnimationFrame(oe);
2911
2949
  };
2912
- return R(), window.addEventListener("resize", ee), ee(), oe(), () => {
2950
+ return P(), window.addEventListener("resize", ee), ee(), oe(), () => {
2913
2951
  window.removeEventListener("resize", ee), cancelAnimationFrame(z), z = -1;
2914
2952
  };
2915
2953
  }, [n]);
@@ -2966,11 +3004,11 @@ function ja(t) {
2966
3004
  const b = q.get(y);
2967
3005
  b !== void 0 && (E(h), h = b, g(b, d.current));
2968
3006
  } }),
2969
- /* @__PURE__ */ u.jsx(Ce, { camera: m, options: D, ref: c, onSelect: (y) => {
3007
+ /* @__PURE__ */ u.jsx(Ce, { camera: p, options: D, ref: c, onSelect: (y) => {
2970
3008
  var v;
2971
- (v = H.get(m.name)) == null || v.dispose();
3009
+ (v = H.get(p.name)) == null || v.dispose();
2972
3010
  const b = q.get(y);
2973
- b !== void 0 && (E(m), m = b, g(b, c.current));
3011
+ b !== void 0 && (E(p), p = b, g(b, c.current));
2974
3012
  } })
2975
3013
  ] })
2976
3014
  ] }),
@@ -2978,8 +3016,8 @@ function ja(t) {
2978
3016
  /* @__PURE__ */ u.jsx(
2979
3017
  xt,
2980
3018
  {
2981
- index: Gt.indexOf(n),
2982
- options: Gt,
3019
+ index: $t.indexOf(n),
3020
+ options: $t,
2983
3021
  onSelect: (y) => {
2984
3022
  y !== n && (C(), r(y));
2985
3023
  }
@@ -2989,18 +3027,18 @@ function ja(t) {
2989
3027
  xt,
2990
3028
  {
2991
3029
  index: 0,
2992
- options: la,
3030
+ options: sa,
2993
3031
  onSelect: (y) => {
2994
- if (y !== bt)
2995
- switch (bt = y, bt) {
3032
+ if (y !== vt)
3033
+ switch (vt = y, vt) {
2996
3034
  case "Default":
2997
3035
  V.overrideMaterial = null;
2998
3036
  break;
2999
3037
  case "Normals":
3000
- V.overrideMaterial = ua;
3038
+ V.overrideMaterial = ca;
3001
3039
  break;
3002
3040
  case "Wireframe":
3003
- V.overrideMaterial = da;
3041
+ V.overrideMaterial = la;
3004
3042
  break;
3005
3043
  }
3006
3044
  }
@@ -3009,7 +3047,7 @@ function ja(t) {
3009
3047
  ] })
3010
3048
  ] });
3011
3049
  }
3012
- function Ma(t) {
3050
+ function Pa(t) {
3013
3051
  return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3014
3052
  /* @__PURE__ */ u.jsx("header", { children: t.header }),
3015
3053
  t.children,
@@ -3018,32 +3056,32 @@ function Ma(t) {
3018
3056
  }
3019
3057
  export {
3020
3058
  wt as Accordion,
3021
- wa as Application,
3022
- ut as BaseRemote,
3023
- Jt as ChildObject,
3024
- Wn as ContainerObject,
3025
- Yn as Draggable,
3026
- Gn as DraggableItem,
3027
- Vn as Dropdown,
3028
- zn as DropdownItem,
3029
- Ma as Editor,
3030
- ca as InfiniteGridHelper,
3031
- na as Inspector,
3032
- ja as MultiView,
3033
- Zt as NavButton,
3034
- xa as RemoteComponents,
3035
- Ta as RemoteController,
3036
- Ca as RemoteTheatre,
3037
- Sa as RemoteThree,
3038
- Oa as RemoteTweakpane,
3039
- Pa as SceneHierarchy,
3040
- Ra as SceneInspector,
3059
+ ya as Application,
3060
+ lt as BaseRemote,
3061
+ Zt as ChildObject,
3062
+ Vn as ContainerObject,
3063
+ $n as Draggable,
3064
+ Bn as DraggableItem,
3065
+ Gn as Dropdown,
3066
+ Yn as DropdownItem,
3067
+ Pa as Editor,
3068
+ oa as InfiniteGridHelper,
3069
+ ea as Inspector,
3070
+ Ma as MultiView,
3071
+ qt as NavButton,
3072
+ Ea as RemoteComponents,
3073
+ Sa as RemoteController,
3074
+ wa as RemoteTheatre,
3075
+ xa as RemoteThree,
3076
+ Ca as RemoteTweakpane,
3077
+ Oa as SceneHierarchy,
3078
+ Ta as SceneInspector,
3041
3079
  N as ToolEvents,
3042
- ya as clamp,
3043
- _n as colorToHex,
3044
- I as debugDispatcher,
3045
- Ea as distance,
3046
- Kt as hierarchyUUID,
3047
- Dn as isColor,
3048
- kn as randomID
3080
+ va as clamp,
3081
+ kn as colorToHex,
3082
+ A as debugDispatcher,
3083
+ ba as distance,
3084
+ Ht as hierarchyUUID,
3085
+ jn as isColor,
3086
+ Rn as randomID
3049
3087
  };