@tomorrowevening/hermes 0.0.110 → 0.0.111

Sign up to get free protection for your applications and to get access to all the features.
package/dist/hermes.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import { OrthographicCamera as wi, Scene as Ds, MeshBasicMaterial as We, BufferGeometry as ot, Float32BufferAttribute as Ze, Mesh as w, LinearSRGBColorSpace as $i, EventDispatcher as Rs, Texture as In, RepeatWrapping as qi, WebGLRenderTarget as Ln, Color as Tt, FrontSide as kn, BackSide as Is, DoubleSide as Ri, NoBlending as Un, NormalBlending as jn, AdditiveBlending as Nn, SubtractiveBlending as Fn, MultiplyBlending as zn, CustomBlending as Hn, AddEquation as Yn, SubtractEquation as Bn, ReverseSubtractEquation as Vn, MinEquation as Zn, MaxEquation as Gn, ZeroFactor as Ls, OneFactor as ks, SrcColorFactor as Us, OneMinusSrcColorFactor as js, SrcAlphaFactor as Ns, OneMinusSrcAlphaFactor as Fs, DstAlphaFactor as zs, OneMinusDstAlphaFactor as Hs, DstColorFactor as Ys, OneMinusDstColorFactor as Bs, SrcAlphaSaturateFactor as Wn, ConstantColorFactor as Vs, OneMinusConstantColorFactor as Zs, ConstantAlphaFactor as Gs, OneMinusConstantAlphaFactor as Ws, Line as xe, LineBasicMaterial as Ii, Ray as Xn, Plane as Qn, MathUtils as $n, Vector3 as O, Controls as Xs, MOUSE as rt, TOUCH as at, Quaternion as fe, Spherical as Si, Vector2 as oe, ShaderMaterial as Qs, GLSL3 as qn, PlaneGeometry as $s, Raycaster as Xt, Euler as qs, Matrix4 as Kt, Object3D as lt, CylinderGeometry as de, BoxGeometry as ae, OctahedronGeometry as kt, SphereGeometry as Ks, TorusGeometry as ut, CatmullRomCurve3 as Ki, Group as Kn, AxesHelper as Ji, MeshDepthMaterial as Jn, MeshNormalMaterial as ea, WebGLRenderer as ta, PerspectiveCamera as hi, CameraHelper as ia, SkinnedMesh as sa, SpotLightHelper as na, PointLightHelper as aa, HemisphereLightHelper as ra, DirectionalLightHelper as oa, Clock as la, Vector4 as ca, Box3 as ha, Sphere as da } from "three";
2
- import Js, { useState as Z, useRef as ee, useEffect as ct, useMemo as Ot, Component as Jt, createRef as Ie, forwardRef as ua } from "react";
1
+ import { OrthographicCamera as wi, Scene as Ds, MeshBasicMaterial as Ge, BufferGeometry as ot, Float32BufferAttribute as Ze, Mesh as w, LinearSRGBColorSpace as $i, EventDispatcher as Rs, Texture as In, RepeatWrapping as qi, WebGLRenderTarget as Ln, Color as Mt, FrontSide as kn, BackSide as Is, DoubleSide as Ri, NoBlending as Un, NormalBlending as jn, AdditiveBlending as Nn, SubtractiveBlending as Fn, MultiplyBlending as zn, CustomBlending as Hn, AddEquation as Yn, SubtractEquation as Bn, ReverseSubtractEquation as Vn, MinEquation as Zn, MaxEquation as Wn, ZeroFactor as Ls, OneFactor as ks, SrcColorFactor as Us, OneMinusSrcColorFactor as js, SrcAlphaFactor as Ns, OneMinusSrcAlphaFactor as Fs, DstAlphaFactor as zs, OneMinusDstAlphaFactor as Hs, DstColorFactor as Ys, OneMinusDstColorFactor as Bs, SrcAlphaSaturateFactor as Gn, ConstantColorFactor as Vs, OneMinusConstantColorFactor as Zs, ConstantAlphaFactor as Ws, OneMinusConstantAlphaFactor as Gs, Line as xe, LineBasicMaterial as Ii, Ray as Xn, Plane as Qn, MathUtils as $n, Vector3 as O, Controls as Xs, MOUSE as rt, TOUCH as at, Quaternion as fe, Spherical as Si, Vector2 as oe, ShaderMaterial as Qs, GLSL3 as qn, PlaneGeometry as $s, Raycaster as Qt, Euler as qs, Matrix4 as Jt, Object3D as lt, CylinderGeometry as de, BoxGeometry as ae, OctahedronGeometry as Ut, SphereGeometry as Ks, TorusGeometry as ut, CatmullRomCurve3 as Ki, Group as Kn, AxesHelper as Ji, MeshDepthMaterial as Jn, MeshNormalMaterial as ea, PerspectiveCamera as pt, WebGLRenderer as ta, CameraHelper as ia, SkinnedMesh as sa, SpotLightHelper as na, PointLightHelper as aa, HemisphereLightHelper as ra, DirectionalLightHelper as oa, Clock as la, Vector4 as ca, Box3 as ha, Sphere as da } from "three";
2
+ import Js, { useState as Z, useRef as ee, useEffect as ct, useMemo as Tt, Component as ei, createRef as Ie, forwardRef as ua } from "react";
3
3
  import { Reorder as en } from "framer-motion";
4
4
  const tn = () => {
5
5
  }, Vr = () => {
6
6
  };
7
- function Qt(i) {
7
+ function $t(i) {
8
8
  return i.substring(0, 1).toUpperCase() + i.substring(1);
9
9
  }
10
10
  function pa(i) {
@@ -59,7 +59,7 @@ const is = () => {
59
59
  }
60
60
  }
61
61
  i.children.forEach((t) => Ti(t));
62
- }, Gr = (i) => {
62
+ }, Wr = (i) => {
63
63
  i?.dispose();
64
64
  }, ga = (i) => {
65
65
  i && (Array.isArray(i) ? i.forEach((e) => e.dispose()) : i.dispose());
@@ -76,7 +76,7 @@ const is = () => {
76
76
  i.dispose !== void 0 && i.dispose();
77
77
  }
78
78
  };
79
- class Zt {
79
+ class Wt {
80
80
  static renderer;
81
81
  static canvas;
82
82
  static context = null;
@@ -105,7 +105,7 @@ class Zt {
105
105
  }
106
106
  static renderToCanvas(e) {
107
107
  if (this.material === null) {
108
- this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ds(), this.material = new We();
108
+ this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ds(), this.material = new Ge();
109
109
  const t = new ot();
110
110
  t.setAttribute("position", new Ze([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Ze([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Ze([0, 0, 2, 0, 0, 2], 2));
111
111
  const s = new w(t, this.material);
@@ -120,7 +120,7 @@ class Zt {
120
120
  return this.renderer.domElement;
121
121
  }
122
122
  }
123
- class Wr {
123
+ class Gr {
124
124
  components = /* @__PURE__ */ new Map();
125
125
  listen;
126
126
  // Protected
@@ -534,7 +534,7 @@ function qe(i) {
534
534
  break;
535
535
  case "object":
536
536
  n !== null ? (e[t] = n, n.isTexture ? e[t] = {
537
- src: Zt.renderToBlob(n),
537
+ src: Wt.renderToBlob(n),
538
538
  offset: [n.offset.x, n.offset.y],
539
539
  repeat: [n.repeat.x, n.repeat.y]
540
540
  } : t === "uniforms" && (e[t] = va(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
@@ -649,7 +649,7 @@ function Ea(i, e) {
649
649
  for (const t in e)
650
650
  i[t] = e[t];
651
651
  }
652
- function K(i, e, t) {
652
+ function q(i, e, t) {
653
653
  if (i === void 0)
654
654
  return;
655
655
  const s = e.split("."), n = s.length;
@@ -716,14 +716,14 @@ class Kr extends Li {
716
716
  }), this.renderTargets.clear(), this.renderer?.dispose();
717
717
  }
718
718
  getObject(e) {
719
- this.app.debugEnabled && (this.renderer !== void 0 && (Zt.renderer = this.renderer), this.app.send({
719
+ this.app.debugEnabled && (this.renderer !== void 0 && (Wt.renderer = this.renderer), this.app.send({
720
720
  event: "getObject",
721
721
  target: "app",
722
722
  data: e
723
723
  }));
724
724
  }
725
725
  setObject(e) {
726
- this.renderer !== void 0 && (Zt.renderer = this.renderer);
726
+ this.renderer !== void 0 && (Wt.renderer = this.renderer);
727
727
  const t = di(e);
728
728
  this.app.send({
729
729
  event: "setObject",
@@ -856,7 +856,7 @@ class Kr extends Li {
856
856
  setScene(e) {
857
857
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
858
858
  return;
859
- this.renderer !== void 0 && (Zt.renderer = this.renderer), is(), Ti(e);
859
+ this.renderer !== void 0 && (Wt.renderer = this.renderer), is(), Ti(e);
860
860
  const t = nt(e);
861
861
  this.app.send({
862
862
  event: "setScene",
@@ -974,7 +974,7 @@ class Kr extends Li {
974
974
  return this.renderer !== void 0 ? this.renderer?.domElement : null;
975
975
  }
976
976
  }
977
- var Mi = { exports: {} }, pt = {};
977
+ var Mi = { exports: {} }, mt = {};
978
978
  /**
979
979
  * @license React
980
980
  * react-jsx-runtime.production.min.js
@@ -987,7 +987,7 @@ var Mi = { exports: {} }, pt = {};
987
987
  var ss;
988
988
  function Ca() {
989
989
  if (ss)
990
- return pt;
990
+ return mt;
991
991
  ss = 1;
992
992
  var i = Js, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
993
993
  function a(o, c, l) {
@@ -1000,9 +1000,9 @@ function Ca() {
1000
1000
  p[u] === void 0 && (p[u] = c[u]);
1001
1001
  return { $$typeof: e, type: o, key: m, ref: _, props: p, _owner: n.current };
1002
1002
  }
1003
- return pt.Fragment = t, pt.jsx = a, pt.jsxs = a, pt;
1003
+ return mt.Fragment = t, mt.jsx = a, mt.jsxs = a, mt;
1004
1004
  }
1005
- var mt = {};
1005
+ var ft = {};
1006
1006
  /**
1007
1007
  * @license React
1008
1008
  * react-jsx-runtime.development.js
@@ -1105,17 +1105,17 @@ function wa() {
1105
1105
  return null;
1106
1106
  }
1107
1107
  var te = Object.assign, Q = 0, ke, he, Te, se, Ue, je, Ne;
1108
- function Mt() {
1109
- }
1110
- Mt.__reactDisabledLog = !0;
1111
1108
  function Pt() {
1109
+ }
1110
+ Pt.__reactDisabledLog = !0;
1111
+ function At() {
1112
1112
  {
1113
1113
  if (Q === 0) {
1114
1114
  ke = console.log, he = console.info, Te = console.warn, se = console.error, Ue = console.group, je = console.groupCollapsed, Ne = console.groupEnd;
1115
1115
  var h = {
1116
1116
  configurable: !0,
1117
1117
  enumerable: !0,
1118
- value: Mt,
1118
+ value: Pt,
1119
1119
  writable: !0
1120
1120
  };
1121
1121
  Object.defineProperties(console, {
@@ -1166,39 +1166,39 @@ function wa() {
1166
1166
  Q < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1167
1167
  }
1168
1168
  }
1169
- var ii = g.ReactCurrentDispatcher, si;
1170
- function At(h, y, C) {
1169
+ var si = g.ReactCurrentDispatcher, ni;
1170
+ function Dt(h, y, C) {
1171
1171
  {
1172
- if (si === void 0)
1172
+ if (ni === void 0)
1173
1173
  try {
1174
1174
  throw Error();
1175
1175
  } catch (F) {
1176
1176
  var I = F.stack.trim().match(/\n( *(at )?)/);
1177
- si = I && I[1] || "";
1177
+ ni = I && I[1] || "";
1178
1178
  }
1179
1179
  return `
1180
- ` + si + h;
1180
+ ` + ni + h;
1181
1181
  }
1182
1182
  }
1183
- var ni = !1, Dt;
1183
+ var ai = !1, Rt;
1184
1184
  {
1185
1185
  var hn = typeof WeakMap == "function" ? WeakMap : Map;
1186
- Dt = new hn();
1186
+ Rt = new hn();
1187
1187
  }
1188
1188
  function Ui(h, y) {
1189
- if (!h || ni)
1189
+ if (!h || ai)
1190
1190
  return "";
1191
1191
  {
1192
- var C = Dt.get(h);
1192
+ var C = Rt.get(h);
1193
1193
  if (C !== void 0)
1194
1194
  return C;
1195
1195
  }
1196
1196
  var I;
1197
- ni = !0;
1197
+ ai = !0;
1198
1198
  var F = Error.prepareStackTrace;
1199
1199
  Error.prepareStackTrace = void 0;
1200
1200
  var Y;
1201
- Y = ii.current, ii.current = null, Pt();
1201
+ Y = si.current, si.current = null, At();
1202
1202
  try {
1203
1203
  if (y) {
1204
1204
  var U = function() {
@@ -1235,26 +1235,26 @@ function wa() {
1235
1235
  if (Me && I && typeof Me.stack == "string") {
1236
1236
  for (var k = Me.stack.split(`
1237
1237
  `), le = I.stack.split(`
1238
- `), $ = k.length - 1, J = le.length - 1; $ >= 1 && J >= 0 && k[$] !== le[J]; )
1239
- J--;
1240
- for (; $ >= 1 && J >= 0; $--, J--)
1241
- if (k[$] !== le[J]) {
1242
- if ($ !== 1 || J !== 1)
1238
+ `), $ = k.length - 1, K = le.length - 1; $ >= 1 && K >= 0 && k[$] !== le[K]; )
1239
+ K--;
1240
+ for (; $ >= 1 && K >= 0; $--, K--)
1241
+ if (k[$] !== le[K]) {
1242
+ if ($ !== 1 || K !== 1)
1243
1243
  do
1244
- if ($--, J--, J < 0 || k[$] !== le[J]) {
1244
+ if ($--, K--, K < 0 || k[$] !== le[K]) {
1245
1245
  var _e = `
1246
1246
  ` + k[$].replace(" at new ", " at ");
1247
- return h.displayName && _e.includes("<anonymous>") && (_e = _e.replace("<anonymous>", h.displayName)), typeof h == "function" && Dt.set(h, _e), _e;
1247
+ return h.displayName && _e.includes("<anonymous>") && (_e = _e.replace("<anonymous>", h.displayName)), typeof h == "function" && Rt.set(h, _e), _e;
1248
1248
  }
1249
- while ($ >= 1 && J >= 0);
1249
+ while ($ >= 1 && K >= 0);
1250
1250
  break;
1251
1251
  }
1252
1252
  }
1253
1253
  } finally {
1254
- ni = !1, ii.current = Y, cn(), Error.prepareStackTrace = F;
1254
+ ai = !1, si.current = Y, cn(), Error.prepareStackTrace = F;
1255
1255
  }
1256
- var $e = h ? h.displayName || h.name : "", Qi = $e ? At($e) : "";
1257
- return typeof h == "function" && Dt.set(h, Qi), Qi;
1256
+ var $e = h ? h.displayName || h.name : "", Qi = $e ? Dt($e) : "";
1257
+ return typeof h == "function" && Rt.set(h, Qi), Qi;
1258
1258
  }
1259
1259
  function dn(h, y, C) {
1260
1260
  return Ui(h, !1);
@@ -1263,46 +1263,46 @@ function wa() {
1263
1263
  var y = h.prototype;
1264
1264
  return !!(y && y.isReactComponent);
1265
1265
  }
1266
- function Rt(h, y, C) {
1266
+ function It(h, y, C) {
1267
1267
  if (h == null)
1268
1268
  return "";
1269
1269
  if (typeof h == "function")
1270
1270
  return Ui(h, un(h));
1271
1271
  if (typeof h == "string")
1272
- return At(h);
1272
+ return Dt(h);
1273
1273
  switch (h) {
1274
1274
  case l:
1275
- return At("Suspense");
1275
+ return Dt("Suspense");
1276
1276
  case u:
1277
- return At("SuspenseList");
1277
+ return Dt("SuspenseList");
1278
1278
  }
1279
1279
  if (typeof h == "object")
1280
1280
  switch (h.$$typeof) {
1281
1281
  case c:
1282
1282
  return dn(h.render);
1283
1283
  case p:
1284
- return Rt(h.type, y, C);
1284
+ return It(h.type, y, C);
1285
1285
  case m: {
1286
1286
  var I = h, F = I._payload, Y = I._init;
1287
1287
  try {
1288
- return Rt(Y(F), y, C);
1288
+ return It(Y(F), y, C);
1289
1289
  } catch {
1290
1290
  }
1291
1291
  }
1292
1292
  }
1293
1293
  return "";
1294
1294
  }
1295
- var It = Object.prototype.hasOwnProperty, ji = {}, Ni = g.ReactDebugCurrentFrame;
1296
- function Lt(h) {
1295
+ var Lt = Object.prototype.hasOwnProperty, ji = {}, Ni = g.ReactDebugCurrentFrame;
1296
+ function kt(h) {
1297
1297
  if (h) {
1298
- var y = h._owner, C = Rt(h.type, h._source, y ? y.type : null);
1298
+ var y = h._owner, C = It(h.type, h._source, y ? y.type : null);
1299
1299
  Ni.setExtraStackFrame(C);
1300
1300
  } else
1301
1301
  Ni.setExtraStackFrame(null);
1302
1302
  }
1303
1303
  function pn(h, y, C, I, F) {
1304
1304
  {
1305
- var Y = Function.call.bind(It);
1305
+ var Y = Function.call.bind(Lt);
1306
1306
  for (var U in h)
1307
1307
  if (Y(h, U)) {
1308
1308
  var k = void 0;
@@ -1315,12 +1315,12 @@ function wa() {
1315
1315
  } catch ($) {
1316
1316
  k = $;
1317
1317
  }
1318
- k && !(k instanceof Error) && (Lt(F), 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).", I || "React class", C, U, typeof k), Lt(null)), k instanceof Error && !(k.message in ji) && (ji[k.message] = !0, Lt(F), v("Failed %s type: %s", C, k.message), Lt(null));
1318
+ k && !(k instanceof Error) && (kt(F), 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).", I || "React class", C, U, typeof k), kt(null)), k instanceof Error && !(k.message in ji) && (ji[k.message] = !0, kt(F), v("Failed %s type: %s", C, k.message), kt(null));
1319
1319
  }
1320
1320
  }
1321
1321
  }
1322
1322
  var mn = Array.isArray;
1323
- function ai(h) {
1323
+ function ri(h) {
1324
1324
  return mn(h);
1325
1325
  }
1326
1326
  function fn(h) {
@@ -1348,10 +1348,10 @@ function wa() {
1348
1348
  ref: !0,
1349
1349
  __self: !0,
1350
1350
  __source: !0
1351
- }, Hi, Yi, ri;
1352
- ri = {};
1351
+ }, Hi, Yi, oi;
1352
+ oi = {};
1353
1353
  function vn(h) {
1354
- if (It.call(h, "ref")) {
1354
+ if (Lt.call(h, "ref")) {
1355
1355
  var y = Object.getOwnPropertyDescriptor(h, "ref").get;
1356
1356
  if (y && y.isReactWarning)
1357
1357
  return !1;
@@ -1359,7 +1359,7 @@ function wa() {
1359
1359
  return h.ref !== void 0;
1360
1360
  }
1361
1361
  function yn(h) {
1362
- if (It.call(h, "key")) {
1362
+ if (Lt.call(h, "key")) {
1363
1363
  var y = Object.getOwnPropertyDescriptor(h, "key").get;
1364
1364
  if (y && y.isReactWarning)
1365
1365
  return !1;
@@ -1369,7 +1369,7 @@ function wa() {
1369
1369
  function bn(h, y) {
1370
1370
  if (typeof h.ref == "string" && dt.current && y && dt.current.stateNode !== y) {
1371
1371
  var C = me(dt.current.type);
1372
- ri[C] || (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', me(dt.current.type), h.ref), ri[C] = !0);
1372
+ oi[C] || (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', me(dt.current.type), h.ref), oi[C] = !0);
1373
1373
  }
1374
1374
  }
1375
1375
  function En(h, y) {
@@ -1428,36 +1428,36 @@ function wa() {
1428
1428
  var Y, U = {}, k = null, le = null;
1429
1429
  C !== void 0 && (zi(C), k = "" + C), yn(y) && (zi(y.key), k = "" + y.key), vn(y) && (le = y.ref, bn(y, F));
1430
1430
  for (Y in y)
1431
- It.call(y, Y) && !_n.hasOwnProperty(Y) && (U[Y] = y[Y]);
1431
+ Lt.call(y, Y) && !_n.hasOwnProperty(Y) && (U[Y] = y[Y]);
1432
1432
  if (h && h.defaultProps) {
1433
1433
  var $ = h.defaultProps;
1434
1434
  for (Y in $)
1435
1435
  U[Y] === void 0 && (U[Y] = $[Y]);
1436
1436
  }
1437
1437
  if (k || le) {
1438
- var J = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
1439
- k && En(U, J), le && Cn(U, J);
1438
+ var K = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
1439
+ k && En(U, K), le && Cn(U, K);
1440
1440
  }
1441
1441
  return wn(h, k, le, F, I, dt.current, U);
1442
1442
  }
1443
1443
  }
1444
- var oi = g.ReactCurrentOwner, Bi = g.ReactDebugCurrentFrame;
1444
+ var li = g.ReactCurrentOwner, Bi = g.ReactDebugCurrentFrame;
1445
1445
  function Qe(h) {
1446
1446
  if (h) {
1447
- var y = h._owner, C = Rt(h.type, h._source, y ? y.type : null);
1447
+ var y = h._owner, C = It(h.type, h._source, y ? y.type : null);
1448
1448
  Bi.setExtraStackFrame(C);
1449
1449
  } else
1450
1450
  Bi.setExtraStackFrame(null);
1451
1451
  }
1452
- var li;
1453
- li = !1;
1454
- function ci(h) {
1452
+ var ci;
1453
+ ci = !1;
1454
+ function hi(h) {
1455
1455
  return typeof h == "object" && h !== null && h.$$typeof === e;
1456
1456
  }
1457
1457
  function Vi() {
1458
1458
  {
1459
- if (oi.current) {
1460
- var h = me(oi.current.type);
1459
+ if (li.current) {
1460
+ var h = me(li.current.type);
1461
1461
  if (h)
1462
1462
  return `
1463
1463
 
@@ -1490,7 +1490,7 @@ Check the top-level render call using <` + C + ">.");
1490
1490
  return y;
1491
1491
  }
1492
1492
  }
1493
- function Gi(h, y) {
1493
+ function Wi(h, y) {
1494
1494
  {
1495
1495
  if (!h._store || h._store.validated || h.key != null)
1496
1496
  return;
@@ -1500,25 +1500,25 @@ Check the top-level render call using <` + C + ">.");
1500
1500
  return;
1501
1501
  Zi[C] = !0;
1502
1502
  var I = "";
1503
- h && h._owner && h._owner !== oi.current && (I = " It was passed a child from " + me(h._owner.type) + "."), Qe(h), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, I), Qe(null);
1503
+ h && h._owner && h._owner !== li.current && (I = " It was passed a child from " + me(h._owner.type) + "."), Qe(h), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, I), Qe(null);
1504
1504
  }
1505
1505
  }
1506
- function Wi(h, y) {
1506
+ function Gi(h, y) {
1507
1507
  {
1508
1508
  if (typeof h != "object")
1509
1509
  return;
1510
- if (ai(h))
1510
+ if (ri(h))
1511
1511
  for (var C = 0; C < h.length; C++) {
1512
1512
  var I = h[C];
1513
- ci(I) && Gi(I, y);
1513
+ hi(I) && Wi(I, y);
1514
1514
  }
1515
- else if (ci(h))
1515
+ else if (hi(h))
1516
1516
  h._store && (h._store.validated = !0);
1517
1517
  else if (h) {
1518
1518
  var F = M(h);
1519
1519
  if (typeof F == "function" && F !== h.entries)
1520
1520
  for (var Y = F.call(h), U; !(U = Y.next()).done; )
1521
- ci(U.value) && Gi(U.value, y);
1521
+ hi(U.value) && Wi(U.value, y);
1522
1522
  }
1523
1523
  }
1524
1524
  }
@@ -1539,8 +1539,8 @@ Check the top-level render call using <` + C + ">.");
1539
1539
  if (C) {
1540
1540
  var I = me(y);
1541
1541
  pn(C, h.props, "prop", I, h);
1542
- } else if (y.PropTypes !== void 0 && !li) {
1543
- li = !0;
1542
+ } else if (y.PropTypes !== void 0 && !ci) {
1543
+ ci = !0;
1544
1544
  var F = me(y);
1545
1545
  v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
1546
1546
  }
@@ -1568,25 +1568,25 @@ Check the top-level render call using <` + C + ">.");
1568
1568
  var le = xn(F);
1569
1569
  le ? k += le : k += Vi();
1570
1570
  var $;
1571
- h === null ? $ = "null" : ai(h) ? $ = "array" : h !== void 0 && h.$$typeof === e ? ($ = "<" + (me(h.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof h, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, k);
1571
+ h === null ? $ = "null" : ri(h) ? $ = "array" : h !== void 0 && h.$$typeof === e ? ($ = "<" + (me(h.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof h, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, k);
1572
1572
  }
1573
- var J = Sn(h, y, C, F, Y);
1574
- if (J == null)
1575
- return J;
1573
+ var K = Sn(h, y, C, F, Y);
1574
+ if (K == null)
1575
+ return K;
1576
1576
  if (U) {
1577
1577
  var _e = y.children;
1578
1578
  if (_e !== void 0)
1579
1579
  if (I)
1580
- if (ai(_e)) {
1580
+ if (ri(_e)) {
1581
1581
  for (var $e = 0; $e < _e.length; $e++)
1582
- Wi(_e[$e], h);
1582
+ Gi(_e[$e], h);
1583
1583
  Object.freeze && Object.freeze(_e);
1584
1584
  } else
1585
1585
  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.");
1586
1586
  else
1587
- Wi(_e, h);
1587
+ Gi(_e, h);
1588
1588
  }
1589
- return h === s ? Mn(J) : Tn(J), J;
1589
+ return h === s ? Mn(K) : Tn(K), K;
1590
1590
  }
1591
1591
  }
1592
1592
  function Pn(h, y, C) {
@@ -1596,8 +1596,8 @@ Check the top-level render call using <` + C + ">.");
1596
1596
  return Xi(h, y, C, !1);
1597
1597
  }
1598
1598
  var Dn = An, Rn = Pn;
1599
- mt.Fragment = s, mt.jsx = Dn, mt.jsxs = Rn;
1600
- }()), mt;
1599
+ ft.Fragment = s, ft.jsx = Dn, ft.jsxs = Rn;
1600
+ }()), ft;
1601
1601
  }
1602
1602
  process.env.NODE_ENV === "production" ? Mi.exports = Ca() : Mi.exports = wa();
1603
1603
  var d = Mi.exports;
@@ -1731,7 +1731,7 @@ function Jr(i, e, t) {
1731
1731
  r.target === "editor" ? n(r) : s(r);
1732
1732
  };
1733
1733
  }
1734
- function $t(i) {
1734
+ function qt(i) {
1735
1735
  const [e, t] = Z(i.open !== void 0 ? i.open : !0), s = !e || i.children === void 0, n = () => {
1736
1736
  D.dispatchEvent({ type: A.REMOVE_SCENE, value: i.scene });
1737
1737
  };
@@ -1752,7 +1752,7 @@ function $t(i) {
1752
1752
  children: "Toggle"
1753
1753
  }
1754
1754
  ),
1755
- /* @__PURE__ */ d.jsx("p", { className: "label", children: Qt(i.label) })
1755
+ /* @__PURE__ */ d.jsx("p", { className: "label", children: $t(i.label) })
1756
1756
  ]
1757
1757
  }
1758
1758
  ),
@@ -1815,7 +1815,7 @@ function an(i) {
1815
1815
  const o = a.getObjectByProperty("uuid", i.child.uuid);
1816
1816
  if (o !== void 0) {
1817
1817
  const c = "visible", l = !o.visible;
1818
- e.current.style.opacity = l ? "1" : "0.25", i.three.updateObject(i.child.uuid, c, l), K(o, c, l);
1818
+ e.current.style.opacity = l ? "1" : "0.25", i.three.updateObject(i.child.uuid, c, l), q(o, c, l);
1819
1819
  }
1820
1820
  }
1821
1821
  }
@@ -1858,7 +1858,7 @@ function Aa(i) {
1858
1858
  };
1859
1859
  }, []), e;
1860
1860
  }
1861
- function Ge(i) {
1861
+ function We(i) {
1862
1862
  const e = ee(null), t = ee(null), s = Aa({
1863
1863
  label: i.labelRef,
1864
1864
  input: e,
@@ -2035,14 +2035,14 @@ function La(i) {
2035
2035
  function rs(i) {
2036
2036
  const e = i.value.x !== void 0 && i.value.y !== void 0 && i.value.z !== void 0, t = i.value.isEuler !== void 0, s = i.value.elements !== void 0, n = i.step !== void 0 ? i.step : 0.01, r = [];
2037
2037
  if (t) {
2038
- const a = Ot(() => i.value, []);
2038
+ const a = Tt(() => i.value, []);
2039
2039
  ["_x", "_y", "_z"].forEach((c) => {
2040
2040
  const l = ee(null);
2041
2041
  r.push(
2042
2042
  /* @__PURE__ */ d.jsxs("div", { children: [
2043
2043
  /* @__PURE__ */ d.jsx("label", { ref: l, children: c.substring(1).toUpperCase() }),
2044
2044
  /* @__PURE__ */ d.jsx(
2045
- Ge,
2045
+ We,
2046
2046
  {
2047
2047
  value: La(a[c]),
2048
2048
  type: "number",
@@ -2058,7 +2058,7 @@ function rs(i) {
2058
2058
  );
2059
2059
  });
2060
2060
  } else if (e) {
2061
- const a = Ot(() => i.value, []), o = (l, u) => {
2061
+ const a = Tt(() => i.value, []), o = (l, u) => {
2062
2062
  a[l] = u, i.onChange({ target: { value: a } });
2063
2063
  };
2064
2064
  ["x", "y", "z"].forEach((l) => {
@@ -2067,7 +2067,7 @@ function rs(i) {
2067
2067
  /* @__PURE__ */ d.jsxs("div", { children: [
2068
2068
  /* @__PURE__ */ d.jsx("label", { ref: u, children: l.toUpperCase() }),
2069
2069
  /* @__PURE__ */ d.jsx(
2070
- Ge,
2070
+ We,
2071
2071
  {
2072
2072
  value: a[l],
2073
2073
  type: "number",
@@ -2081,7 +2081,7 @@ function rs(i) {
2081
2081
  );
2082
2082
  });
2083
2083
  } else if (s) {
2084
- const a = Ot(() => i.value, []), o = (c, l) => {
2084
+ const a = Tt(() => i.value, []), o = (c, l) => {
2085
2085
  const u = Number(c);
2086
2086
  a.elements[u] = l, i.onChange({ target: { value: a } });
2087
2087
  };
@@ -2091,7 +2091,7 @@ function rs(i) {
2091
2091
  /* @__PURE__ */ d.jsxs("div", { children: [
2092
2092
  /* @__PURE__ */ d.jsx("label", { ref: l, children: c + 1 }),
2093
2093
  /* @__PURE__ */ d.jsx(
2094
- Ge,
2094
+ We,
2095
2095
  {
2096
2096
  value: a.elements[c],
2097
2097
  type: "number",
@@ -2110,7 +2110,7 @@ function rs(i) {
2110
2110
  function ka(i) {
2111
2111
  const e = i.value.x !== void 0, t = i.step !== void 0 ? i.step : 0.01, s = [];
2112
2112
  if (e) {
2113
- const n = Ot(() => i.value, []), r = (o, c) => {
2113
+ const n = Tt(() => i.value, []), r = (o, c) => {
2114
2114
  n[o] = c, i.onChange({ target: { value: n } });
2115
2115
  };
2116
2116
  ["x", "y", "z", "w"].forEach((o) => {
@@ -2119,7 +2119,7 @@ function ka(i) {
2119
2119
  /* @__PURE__ */ d.jsxs("div", { children: [
2120
2120
  /* @__PURE__ */ d.jsx("label", { ref: c, children: o.toUpperCase() }),
2121
2121
  /* @__PURE__ */ d.jsx(
2122
- Ge,
2122
+ We,
2123
2123
  {
2124
2124
  value: n.x,
2125
2125
  type: "number",
@@ -2133,7 +2133,7 @@ function ka(i) {
2133
2133
  );
2134
2134
  });
2135
2135
  } else {
2136
- const n = Ot(() => i.value, []), r = (a, o) => {
2136
+ const n = Tt(() => i.value, []), r = (a, o) => {
2137
2137
  const c = Number(a);
2138
2138
  n.elements[c] = o, i.onChange({ target: { value: n } });
2139
2139
  };
@@ -2143,7 +2143,7 @@ function ka(i) {
2143
2143
  /* @__PURE__ */ d.jsxs("div", { children: [
2144
2144
  /* @__PURE__ */ d.jsx("label", { ref: o, children: a + 1 }),
2145
2145
  /* @__PURE__ */ d.jsx(
2146
- Ge,
2146
+ We,
2147
2147
  {
2148
2148
  value: n.elements[a],
2149
2149
  type: "number",
@@ -2211,7 +2211,7 @@ function ja(i) {
2211
2211
  }
2212
2212
  return i;
2213
2213
  }
2214
- function ei(i) {
2214
+ function ti(i) {
2215
2215
  switch (i) {
2216
2216
  case "alphaHash":
2217
2217
  return "Alpha Hash";
@@ -2490,7 +2490,7 @@ const Fa = [
2490
2490
  },
2491
2491
  {
2492
2492
  title: "Max",
2493
- value: Gn
2493
+ value: Wn
2494
2494
  }
2495
2495
  ], Ya = [
2496
2496
  {
@@ -2535,7 +2535,7 @@ const Fa = [
2535
2535
  },
2536
2536
  {
2537
2537
  title: "Src Alpha Saturate",
2538
- value: Wn
2538
+ value: Gn
2539
2539
  },
2540
2540
  {
2541
2541
  title: "Constant Color",
@@ -2547,11 +2547,11 @@ const Fa = [
2547
2547
  },
2548
2548
  {
2549
2549
  title: "Constant Alpha",
2550
- value: Gs
2550
+ value: Ws
2551
2551
  },
2552
2552
  {
2553
2553
  title: "One Minus Constant Alpha",
2554
- value: Ws
2554
+ value: Gs
2555
2555
  }
2556
2556
  ], Ba = [
2557
2557
  {
@@ -2604,20 +2604,20 @@ const Fa = [
2604
2604
  },
2605
2605
  {
2606
2606
  title: "Constant Alpha",
2607
- value: Gs
2607
+ value: Ws
2608
2608
  },
2609
2609
  {
2610
2610
  title: "One Minus Constant Alpha",
2611
- value: Ws
2611
+ value: Gs
2612
2612
  }
2613
2613
  ];
2614
- function ft(i, e) {
2614
+ function gt(i, e) {
2615
2615
  i.needsUpdate = !0, i.type = "option", i.options = e;
2616
2616
  }
2617
2617
  function Va(i, e, t, s) {
2618
2618
  return {
2619
2619
  type: "boolean",
2620
- title: ei(i),
2620
+ title: ti(i),
2621
2621
  prop: i,
2622
2622
  value: e,
2623
2623
  needsUpdate: !0,
@@ -2626,7 +2626,7 @@ function Va(i, e, t, s) {
2626
2626
  const a = s.getScene(t.uuid);
2627
2627
  if (a !== null) {
2628
2628
  const o = a.getObjectByProperty("uuid", t.uuid);
2629
- K(o, `material.${i}`, r);
2629
+ q(o, `material.${i}`, r);
2630
2630
  }
2631
2631
  }
2632
2632
  };
@@ -2634,7 +2634,7 @@ function Va(i, e, t, s) {
2634
2634
  function Za(i, e, t, s) {
2635
2635
  const n = {
2636
2636
  type: "number",
2637
- title: ei(i),
2637
+ title: ti(i),
2638
2638
  prop: i,
2639
2639
  value: e,
2640
2640
  min: void 0,
@@ -2646,33 +2646,33 @@ function Za(i, e, t, s) {
2646
2646
  const o = s.getScene(t.uuid);
2647
2647
  if (o !== null) {
2648
2648
  const c = o.getObjectByProperty("uuid", t.uuid);
2649
- K(c, `material.${i}`, a);
2649
+ q(c, `material.${i}`, a);
2650
2650
  }
2651
2651
  }
2652
2652
  };
2653
2653
  switch (i) {
2654
2654
  case "blending":
2655
- ft(n, za);
2655
+ gt(n, za);
2656
2656
  break;
2657
2657
  case "blendDst":
2658
- ft(n, Ba);
2658
+ gt(n, Ba);
2659
2659
  break;
2660
2660
  case "blendEquation":
2661
- ft(n, Ha);
2661
+ gt(n, Ha);
2662
2662
  break;
2663
2663
  case "blendSrc":
2664
- ft(n, Ya);
2664
+ gt(n, Ya);
2665
2665
  break;
2666
2666
  case "side":
2667
- ft(n, Fa);
2667
+ gt(n, Fa);
2668
2668
  break;
2669
2669
  }
2670
2670
  return rn(i) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
2671
2671
  }
2672
- function Ga(i, e, t, s) {
2672
+ function Wa(i, e, t, s) {
2673
2673
  const n = {
2674
2674
  type: "string",
2675
- title: ei(i),
2675
+ title: ti(i),
2676
2676
  prop: i,
2677
2677
  value: e,
2678
2678
  needsUpdate: !0,
@@ -2681,7 +2681,7 @@ function Ga(i, e, t, s) {
2681
2681
  const c = s.getScene(t.uuid);
2682
2682
  if (c !== null) {
2683
2683
  const l = c.getObjectByProperty("uuid", t.uuid);
2684
- K(l, `material.${i}`, o);
2684
+ q(l, `material.${i}`, o);
2685
2685
  }
2686
2686
  },
2687
2687
  onKeyDown: (a) => {
@@ -2692,7 +2692,7 @@ function Ga(i, e, t, s) {
2692
2692
  const c = s.getScene(t.uuid);
2693
2693
  if (c !== null) {
2694
2694
  const l = c.getObjectByProperty("uuid", t.uuid);
2695
- K(l, `material.${i}`, o);
2695
+ q(l, `material.${i}`, o);
2696
2696
  }
2697
2697
  }, n.onKeyDown = (a) => {
2698
2698
  if (a.key === "Enter" && (a.altKey || a.metaKey)) {
@@ -2700,12 +2700,12 @@ function Ga(i, e, t, s) {
2700
2700
  const o = s.getScene(t.uuid);
2701
2701
  if (o !== null) {
2702
2702
  const c = o.getObjectByProperty("uuid", t.uuid);
2703
- K(c, "material.needsUpdate", !0);
2703
+ q(c, "material.needsUpdate", !0);
2704
2704
  }
2705
2705
  }
2706
2706
  }), n;
2707
2707
  }
2708
- function Wa(i) {
2708
+ function Ga(i) {
2709
2709
  return i.x !== void 0 && i.y !== void 0 && i.z === void 0;
2710
2710
  }
2711
2711
  function Xa(i) {
@@ -2717,8 +2717,8 @@ function Qa(i) {
2717
2717
  function Ai(i) {
2718
2718
  i.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
2719
2719
  }
2720
- function wt(i, e, t, s, n = "", r = !1) {
2721
- const a = ei(i).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${i}` : i, c = typeof e;
2720
+ function St(i, e, t, s, n = "", r = !1) {
2721
+ const a = ti(i).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${i}` : i, c = typeof e;
2722
2722
  if (c === "boolean" || c === "string")
2723
2723
  return {
2724
2724
  title: a,
@@ -2731,7 +2731,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2731
2731
  const p = s.getScene(t.uuid);
2732
2732
  if (p !== null) {
2733
2733
  const m = p.getObjectByProperty("uuid", t.uuid);
2734
- K(m, `material.${o}`, u);
2734
+ q(m, `material.${o}`, u);
2735
2735
  }
2736
2736
  }
2737
2737
  };
@@ -2748,7 +2748,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2748
2748
  const m = s.getScene(t.uuid);
2749
2749
  if (m !== null) {
2750
2750
  const _ = m.getObjectByProperty("uuid", t.uuid);
2751
- K(_, `material.${o}`, p);
2751
+ q(_, `material.${o}`, p);
2752
2752
  }
2753
2753
  }
2754
2754
  };
@@ -2762,12 +2762,12 @@ function wt(i, e, t, s, n = "", r = !1) {
2762
2762
  value: e,
2763
2763
  disabled: r,
2764
2764
  onChange: (l, u) => {
2765
- const p = new Tt(u);
2765
+ const p = new Mt(u);
2766
2766
  s.updateObject(t.uuid, `material.${o}`, p);
2767
2767
  const m = s.getScene(t.uuid);
2768
2768
  if (m !== null) {
2769
2769
  const _ = m.getObjectByProperty("uuid", t.uuid);
2770
- K(_, `material.${o}`, p);
2770
+ q(_, `material.${o}`, p);
2771
2771
  }
2772
2772
  }
2773
2773
  };
@@ -2776,10 +2776,10 @@ function wt(i, e, t, s, n = "", r = !1) {
2776
2776
  for (const u in e) {
2777
2777
  const p = e[u], m = `[${u.toString()}]`;
2778
2778
  if (p.value !== void 0) {
2779
- const _ = wt(`${m}.value`, p.value, t, s, o, r);
2779
+ const _ = St(`${m}.value`, p.value, t, s, o, r);
2780
2780
  _ !== void 0 && l.push(_);
2781
2781
  } else {
2782
- const _ = wt(m, p, t, s, o, r);
2782
+ const _ = St(m, p, t, s, o, r);
2783
2783
  _ !== void 0 && l.push(_);
2784
2784
  }
2785
2785
  }
@@ -2789,7 +2789,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2789
2789
  items: l
2790
2790
  };
2791
2791
  } else {
2792
- if (Wa(e))
2792
+ if (Ga(e))
2793
2793
  return {
2794
2794
  title: a,
2795
2795
  prop: o,
@@ -2801,7 +2801,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2801
2801
  const p = s.getScene(t.uuid);
2802
2802
  if (p !== null) {
2803
2803
  const m = p.getObjectByProperty("uuid", t.uuid);
2804
- K(m, `material.${o}`, u);
2804
+ q(m, `material.${o}`, u);
2805
2805
  }
2806
2806
  }
2807
2807
  };
@@ -2817,7 +2817,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2817
2817
  const p = s.getScene(t.uuid);
2818
2818
  if (p !== null) {
2819
2819
  const m = p.getObjectByProperty("uuid", t.uuid);
2820
- K(m, `material.${o}`, u);
2820
+ q(m, `material.${o}`, u);
2821
2821
  }
2822
2822
  }
2823
2823
  };
@@ -2833,7 +2833,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2833
2833
  const p = s.getScene(t.uuid);
2834
2834
  if (p !== null) {
2835
2835
  const m = p.getObjectByProperty("uuid", t.uuid);
2836
- K(m, `material.${o}`, u);
2836
+ q(m, `material.${o}`, u);
2837
2837
  }
2838
2838
  }
2839
2839
  };
@@ -2849,7 +2849,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2849
2849
  const p = s.getScene(t.uuid);
2850
2850
  if (p !== null) {
2851
2851
  const m = p.getObjectByProperty("uuid", t.uuid);
2852
- K(m, `material.${o}`, u);
2852
+ q(m, `material.${o}`, u);
2853
2853
  }
2854
2854
  }
2855
2855
  };
@@ -2906,7 +2906,7 @@ function wt(i, e, t, s, n = "", r = !1) {
2906
2906
  const p = s.getScene(t.uuid);
2907
2907
  if (p !== null) {
2908
2908
  const m = p.getObjectByProperty("uuid", t.uuid);
2909
- K(m, `material.${o}`, u);
2909
+ q(m, `material.${o}`, u);
2910
2910
  }
2911
2911
  }
2912
2912
  };
@@ -2917,10 +2917,10 @@ function wt(i, e, t, s, n = "", r = !1) {
2917
2917
  const m = e[p];
2918
2918
  if (m !== void 0)
2919
2919
  if (m.value !== void 0) {
2920
- const _ = wt(`${p}.value`, m.value, t, s, o, u);
2920
+ const _ = St(`${p}.value`, m.value, t, s, o, u);
2921
2921
  _ !== void 0 && l.push(_);
2922
2922
  } else {
2923
- const _ = wt(p, m, t, s, o, u);
2923
+ const _ = St(p, m, t, s, o, u);
2924
2924
  _ !== void 0 && l.push(_);
2925
2925
  }
2926
2926
  }
@@ -2947,9 +2947,9 @@ function os(i, e, t) {
2947
2947
  else if (r === "number")
2948
2948
  s.push(Za(n, a, e, t));
2949
2949
  else if (r === "string")
2950
- s.push(Ga(n, a, e, t));
2950
+ s.push(Wa(n, a, e, t));
2951
2951
  else if (r === "object") {
2952
- const o = wt(n, a, e, t);
2952
+ const o = St(n, a, e, t);
2953
2953
  o !== void 0 && s.push(o);
2954
2954
  } else
2955
2955
  a !== void 0 && console.log("other:", n, r, a);
@@ -2962,7 +2962,7 @@ function os(i, e, t) {
2962
2962
  const n = t.getScene(e.uuid);
2963
2963
  if (n !== null) {
2964
2964
  const r = n.getObjectByProperty("uuid", e.uuid);
2965
- K(r, "material.needsUpdate", !0);
2965
+ q(r, "material.needsUpdate", !0);
2966
2966
  }
2967
2967
  }
2968
2968
  }), s;
@@ -3094,7 +3094,7 @@ function qa(i) {
3094
3094
  }
3095
3095
  function Gt(i) {
3096
3096
  let e = i.value;
3097
- e !== void 0 && (e.isColor !== void 0 ? e = ts(i.value) : i.type === "color" && (e = ts(new Tt(i.value))));
3097
+ e !== void 0 && (e.isColor !== void 0 ? e = ts(i.value) : i.type === "color" && (e = ts(new Mt(i.value))));
3098
3098
  const [t, s] = Z(e), n = ee(null), r = (l) => {
3099
3099
  let u = l.target.value;
3100
3100
  if (i.type === "boolean")
@@ -3110,7 +3110,7 @@ function Gt(i) {
3110
3110
  const o = i.type === "string" && (t.length > 100 || t.search(`
3111
3111
  `) > -1), c = o || i.type === "image" || i.type === "vector2";
3112
3112
  return /* @__PURE__ */ d.jsxs("div", { className: `field ${c ? "block" : ""}`, style: a, children: [
3113
- i.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: n, children: Qt(i.title) }, "fieldLabel"),
3113
+ i.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: n, children: $t(i.title) }, "fieldLabel"),
3114
3114
  i.type === "string" && !o && /* @__PURE__ */ d.jsx(
3115
3115
  "input",
3116
3116
  {
@@ -3143,7 +3143,7 @@ function Gt(i) {
3143
3143
  }
3144
3144
  ),
3145
3145
  i.type === "number" && /* @__PURE__ */ d.jsx(
3146
- Ge,
3146
+ We,
3147
3147
  {
3148
3148
  value: t,
3149
3149
  type: i.type,
@@ -3157,7 +3157,7 @@ function Gt(i) {
3157
3157
  }
3158
3158
  ),
3159
3159
  i.type === "range" && /* @__PURE__ */ d.jsx(
3160
- Ge,
3160
+ We,
3161
3161
  {
3162
3162
  value: t,
3163
3163
  type: i.type,
@@ -3185,7 +3185,7 @@ function Gt(i) {
3185
3185
  }
3186
3186
  ),
3187
3187
  i.type === "image" && /* @__PURE__ */ d.jsx(qa, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
3188
- i.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: r, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, u) => /* @__PURE__ */ d.jsx("option", { value: l.value, children: Qt(l.title) }, u)) }) }),
3188
+ i.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: r, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, u) => /* @__PURE__ */ d.jsx("option", { value: l.value, children: $t(l.title) }, u)) }) }),
3189
3189
  i.type === "vector2" && /* @__PURE__ */ d.jsx(Da, { step: i.step, value: t, min: 0, max: 1, onChange: r }),
3190
3190
  i.type === "grid3" && /* @__PURE__ */ d.jsx(rs, { step: i.step, value: t, onChange: r }),
3191
3191
  i.type === "grid4" && /* @__PURE__ */ d.jsx(ka, { step: i.step, value: t, onChange: r }),
@@ -3195,7 +3195,7 @@ function Gt(i) {
3195
3195
  function Ka(i) {
3196
3196
  return "items" in i;
3197
3197
  }
3198
- class Ee extends Jt {
3198
+ class Ee extends ei {
3199
3199
  subgroupNames = [];
3200
3200
  subgroupElements = [];
3201
3201
  valueOverrides = /* @__PURE__ */ new Map();
@@ -3249,7 +3249,7 @@ class Ee extends Jt {
3249
3249
  return this.props.items.forEach((t) => {
3250
3250
  if (Ka(t))
3251
3251
  e.push(
3252
- /* @__PURE__ */ d.jsx(Ee, { title: Qt(t.title), items: t.items }, Math.random())
3252
+ /* @__PURE__ */ d.jsx(Ee, { title: $t(t.title), items: t.items }, Math.random())
3253
3253
  );
3254
3254
  else {
3255
3255
  const s = this.valueOverrides.get(t.title), n = s !== void 0 ? s : t.value;
@@ -3278,7 +3278,7 @@ class Ee extends Jt {
3278
3278
  );
3279
3279
  }
3280
3280
  }), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ d.jsx(
3281
- $t,
3281
+ qt,
3282
3282
  {
3283
3283
  label: this.props.title,
3284
3284
  open: this.props.expanded === !0,
@@ -3290,19 +3290,19 @@ class Ee extends Jt {
3290
3290
  );
3291
3291
  }
3292
3292
  }
3293
- class q extends Jt {
3293
+ class J extends ei {
3294
3294
  static instance;
3295
3295
  static groups = [];
3296
3296
  static groupsRefs = [];
3297
3297
  static groupTitles = [];
3298
3298
  constructor(e) {
3299
- super(e), this.state = { lastUpdate: Date.now() }, q.instance = this, D.addEventListener(A.ADD_GROUP, this.addGroup), D.addEventListener(A.REMOVE_GROUP, this.removeGroup);
3299
+ super(e), this.state = { lastUpdate: Date.now() }, J.instance = this, D.addEventListener(A.ADD_GROUP, this.addGroup), D.addEventListener(A.REMOVE_GROUP, this.removeGroup);
3300
3300
  }
3301
3301
  componentWillUnmount() {
3302
3302
  D.removeEventListener(A.ADD_GROUP, this.addGroup), D.removeEventListener(A.REMOVE_GROUP, this.removeGroup);
3303
3303
  }
3304
3304
  render() {
3305
- return /* @__PURE__ */ d.jsx("div", { className: "customGroups", children: q.groups }, this.state.lastUpdate);
3305
+ return /* @__PURE__ */ d.jsx("div", { className: "customGroups", children: J.groups }, this.state.lastUpdate);
3306
3306
  }
3307
3307
  // Events
3308
3308
  addGroup = (e) => {
@@ -3322,7 +3322,7 @@ class q extends Jt {
3322
3322
  this.props.three.updateGroup(t.title, r, a);
3323
3323
  }
3324
3324
  });
3325
- }), q.groups.push(
3325
+ }), J.groups.push(
3326
3326
  /* @__PURE__ */ d.jsx(
3327
3327
  Ee,
3328
3328
  {
@@ -3331,13 +3331,13 @@ class q extends Jt {
3331
3331
  },
3332
3332
  Math.random()
3333
3333
  )
3334
- ), q.groupTitles.push(t.title), this.setState({ lastUpdate: Date.now() });
3334
+ ), J.groupTitles.push(t.title), this.setState({ lastUpdate: Date.now() });
3335
3335
  };
3336
3336
  removeGroup = (e) => {
3337
- const t = e.value, s = q.groupTitles.length;
3337
+ const t = e.value, s = J.groupTitles.length;
3338
3338
  for (let n = 0; n < s; n++)
3339
- if (t === q.groupTitles[n]) {
3340
- q.groups.splice(n, 1), q.groupTitles.splice(n, 1), this.setState({ lastUpdate: Date.now() });
3339
+ if (t === J.groupTitles[n]) {
3340
+ J.groups.splice(n, 1), J.groupTitles.splice(n, 1), this.setState({ lastUpdate: Date.now() });
3341
3341
  return;
3342
3342
  }
3343
3343
  };
@@ -3369,14 +3369,13 @@ class q extends Jt {
3369
3369
  },
3370
3370
  Math.random()
3371
3371
  );
3372
- return q.groups.push(n), q.groupsRefs.push(s), q.groupTitles.push(e.title), s;
3372
+ return J.groups.push(n), J.groupsRefs.push(s), J.groupTitles.push(e.title), s;
3373
3373
  }
3374
3374
  static removeEditorGroup(e) {
3375
- const t = q.groupTitles.length;
3376
- console.log("removeEditorGroup:", e, q.groupTitles);
3375
+ const t = J.groupTitles.length;
3377
3376
  for (let s = 0; s < t; s++)
3378
- if (e === q.groupTitles[s]) {
3379
- console.log("remove group:", e), q.groups.splice(s, 1), q.groupTitles.splice(s, 1), q.instance.setState({ lastUpdate: Date.now() });
3377
+ if (e === J.groupTitles[s]) {
3378
+ J.groups.splice(s, 1), J.groupTitles.splice(s, 1), J.instance.setState({ lastUpdate: Date.now() });
3380
3379
  return;
3381
3380
  }
3382
3381
  }
@@ -3432,7 +3431,7 @@ function Ja(i, e) {
3432
3431
  const u = e.getScene(i.uuid);
3433
3432
  if (u !== null) {
3434
3433
  const p = u.getObjectByProperty("uuid", i.uuid);
3435
- p !== void 0 && (K(p, c, l), p.updateProjectionMatrix());
3434
+ p !== void 0 && (q(p, c, l), p.updateProjectionMatrix());
3436
3435
  }
3437
3436
  }
3438
3437
  });
@@ -3449,7 +3448,7 @@ function Ja(i, e) {
3449
3448
  const u = e.getScene(i.uuid);
3450
3449
  if (u !== null) {
3451
3450
  const p = u.getObjectByProperty("uuid", i.uuid);
3452
- p !== void 0 && (K(p, c, l), p.updateProjectionMatrix());
3451
+ p !== void 0 && (q(p, c, l), p.updateProjectionMatrix());
3453
3452
  }
3454
3453
  }
3455
3454
  });
@@ -3472,7 +3471,7 @@ class er extends xe {
3472
3471
  const r = new Ii({ fog: !1 });
3473
3472
  super(n, r), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
3474
3473
  const a = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new ot();
3475
- o.setAttribute("position", new Ze(a, 3)), o.computeBoundingSphere(), this.add(new w(o, new We({ side: Is, fog: !1 })));
3474
+ o.setAttribute("position", new Ze(a, 3)), o.computeBoundingSphere(), this.add(new w(o, new Ge({ side: Is, fog: !1 })));
3476
3475
  }
3477
3476
  updateMatrixWorld() {
3478
3477
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -3488,7 +3487,7 @@ class er extends xe {
3488
3487
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3489
3488
  }
3490
3489
  }
3491
- const hs = { type: "change" }, ki = { type: "start" }, on = { type: "end" }, Ut = new Xn(), ds = new Qn(), tr = Math.cos(70 * $n.DEG2RAD), ie = new O(), ue = 2 * Math.PI, H = {
3490
+ const hs = { type: "change" }, ki = { type: "start" }, on = { type: "end" }, jt = new Xn(), ds = new Qn(), tr = Math.cos(70 * $n.DEG2RAD), ie = new O(), ue = 2 * Math.PI, H = {
3492
3491
  NONE: -1,
3493
3492
  ROTATE: 0,
3494
3493
  DOLLY: 1,
@@ -3560,7 +3559,7 @@ class ir extends Xs {
3560
3559
  l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = ie.length();
3561
3560
  } else
3562
3561
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
3563
- a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (Ut.origin.copy(this.object.position), Ut.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ut.direction)) < tr ? this.object.lookAt(this.target) : (ds.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ut.intersectPlane(ds, this.target))));
3562
+ a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (jt.origin.copy(this.object.position), jt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(jt.direction)) < tr ? this.object.lookAt(this.target) : (ds.setFromNormalAndCoplanarPoint(this.object.up, this.target), jt.intersectPlane(ds, this.target))));
3564
3563
  } else if (this.object.isOrthographicCamera) {
3565
3564
  const a = this.object.zoom;
3566
3565
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), a !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
@@ -3929,7 +3928,7 @@ function mr(i) {
3929
3928
  * (c) 2017 @yomotsu
3930
3929
  * Released under the MIT License.
3931
3930
  */
3932
- const W = {
3931
+ const G = {
3933
3932
  LEFT: 1,
3934
3933
  RIGHT: 2,
3935
3934
  MIDDLE: 4
@@ -3962,7 +3961,7 @@ function Fe(i) {
3962
3961
  function Re(i) {
3963
3962
  return i.isOrthographicCamera;
3964
3963
  }
3965
- const tt = Math.PI * 2, us = Math.PI / 2, ln = 1e-5, gt = Math.PI / 180;
3964
+ const tt = Math.PI * 2, us = Math.PI / 2, ln = 1e-5, _t = Math.PI / 180;
3966
3965
  function ye(i, e, t) {
3967
3966
  return Math.max(e, Math.min(t, i));
3968
3967
  }
@@ -3975,13 +3974,13 @@ function z(i, e, t = ln) {
3975
3974
  function ps(i, e) {
3976
3975
  return Math.round(i / e) * e;
3977
3976
  }
3978
- function _t(i) {
3977
+ function vt(i) {
3979
3978
  return isFinite(i) ? i : i < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
3980
3979
  }
3981
- function vt(i) {
3980
+ function yt(i) {
3982
3981
  return Math.abs(i) < Number.MAX_VALUE ? i : i * (1 / 0);
3983
3982
  }
3984
- function jt(i, e, t, s, n = 1 / 0, r) {
3983
+ function Nt(i, e, t, s, n = 1 / 0, r) {
3985
3984
  s = Math.max(1e-4, s);
3986
3985
  const a = 2 / s, o = a * r, c = 1 / (1 + o + 0.48 * o * o + 0.235 * o * o * o);
3987
3986
  let l = i - e;
@@ -4080,8 +4079,8 @@ class fr {
4080
4079
  }
4081
4080
  }
4082
4081
  var fi;
4083
- const gr = "2.9.0", Nt = 1 / 8, _r = /Mac/.test((fi = globalThis?.navigator) === null || fi === void 0 ? void 0 : fi.platform);
4084
- let R, fs, Ft, gi, pe, L, N, it, yt, Ce, we, ze, gs, _s, ve, bt, st, vs, _i, ys, vi, yi, zt;
4082
+ const gr = "2.9.0", Ft = 1 / 8, _r = /Mac/.test((fi = globalThis?.navigator) === null || fi === void 0 ? void 0 : fi.platform);
4083
+ let R, fs, zt, gi, pe, L, N, it, bt, Ce, we, ze, gs, _s, ve, Et, st, vs, _i, ys, vi, yi, Ht;
4085
4084
  class Oe extends fr {
4086
4085
  /**
4087
4086
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
@@ -4124,7 +4123,7 @@ class Oe extends fr {
4124
4123
  * @category Statics
4125
4124
  */
4126
4125
  static install(e) {
4127
- R = e.THREE, fs = Object.freeze(new R.Vector3(0, 0, 0)), Ft = Object.freeze(new R.Vector3(0, 1, 0)), gi = Object.freeze(new R.Vector3(0, 0, 1)), pe = new R.Vector2(), L = new R.Vector3(), N = new R.Vector3(), it = new R.Vector3(), yt = new R.Vector3(), Ce = new R.Vector3(), we = new R.Vector3(), ze = new R.Vector3(), gs = new R.Vector3(), _s = new R.Vector3(), ve = new R.Spherical(), bt = new R.Spherical(), st = new R.Box3(), vs = new R.Box3(), _i = new R.Sphere(), ys = new R.Quaternion(), vi = new R.Quaternion(), yi = new R.Matrix4(), zt = new R.Raycaster();
4126
+ R = e.THREE, fs = Object.freeze(new R.Vector3(0, 0, 0)), zt = Object.freeze(new R.Vector3(0, 1, 0)), gi = Object.freeze(new R.Vector3(0, 0, 1)), pe = new R.Vector2(), L = new R.Vector3(), N = new R.Vector3(), it = new R.Vector3(), bt = new R.Vector3(), Ce = new R.Vector3(), we = new R.Vector3(), ze = new R.Vector3(), gs = new R.Vector3(), _s = new R.Vector3(), ve = new R.Spherical(), Et = new R.Spherical(), st = new R.Box3(), vs = new R.Box3(), _i = new R.Sphere(), ys = new R.Quaternion(), vi = new R.Quaternion(), yi = new R.Matrix4(), Ht = new R.Raycaster();
4128
4127
  }
4129
4128
  /**
4130
4129
  * list all ACTIONs
@@ -4155,7 +4154,7 @@ class Oe extends fr {
4155
4154
  }, this._enabled = !0, this._state = f.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = et.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new R.Vector3(), this._focalOffsetVelocity = new R.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, v, E) => {
4156
4155
  let b, P;
4157
4156
  if (Fe(this._camera)) {
4158
- const x = L.copy(this._camera.position).sub(this._target), j = this._camera.getEffectiveFOV() * gt, X = x.length() * Math.tan(j * 0.5);
4157
+ const x = L.copy(this._camera.position).sub(this._target), j = this._camera.getEffectiveFOV() * _t, X = x.length() * Math.tan(j * 0.5);
4159
4158
  b = this.truckSpeed * g * X / this._elementRect.height, P = this.truckSpeed * v * X / this._elementRect.height;
4160
4159
  } else if (Re(this._camera)) {
4161
4160
  const x = this._camera;
@@ -4172,7 +4171,7 @@ class Oe extends fr {
4172
4171
  }, this._zoomInternal = (g, v, E) => {
4173
4172
  const b = Math.pow(0.95, g * this.dollySpeed), P = this._zoom, x = this._zoom * b;
4174
4173
  this.zoomTo(x, !0), this.dollyToCursor && (this._changedZoom += x - P, this._dollyControlCoord.set(v, E));
4175
- }, typeof R > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new R.Quaternion().setFromUnitVectors(this._camera.up, Ft), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = f.NONE, this._target = new R.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new R.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new R.Spherical().setFromVector3(L.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
4174
+ }, typeof R > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new R.Quaternion().setFromUnitVectors(this._camera.up, zt), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = f.NONE, this._target = new R.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new R.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new R.Spherical().setFromVector3(L.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
4176
4175
  new R.Vector3(),
4177
4176
  new R.Vector3(),
4178
4177
  new R.Vector3(),
@@ -4195,12 +4194,12 @@ class Oe extends fr {
4195
4194
  if (P < this._interactiveArea.left || P > this._interactiveArea.right || x < this._interactiveArea.top || x > this._interactiveArea.bottom)
4196
4195
  return;
4197
4196
  }
4198
- const v = g.pointerType !== "mouse" ? null : (g.buttons & W.LEFT) === W.LEFT ? W.LEFT : (g.buttons & W.MIDDLE) === W.MIDDLE ? W.MIDDLE : (g.buttons & W.RIGHT) === W.RIGHT ? W.RIGHT : null;
4197
+ const v = g.pointerType !== "mouse" ? null : (g.buttons & G.LEFT) === G.LEFT ? G.LEFT : (g.buttons & G.MIDDLE) === G.MIDDLE ? G.MIDDLE : (g.buttons & G.RIGHT) === G.RIGHT ? G.RIGHT : null;
4199
4198
  if (v !== null) {
4200
4199
  const b = this._findPointerByMouseButton(v);
4201
4200
  b && this._disposePointer(b);
4202
4201
  }
4203
- if ((g.buttons & W.LEFT) === W.LEFT && this._lockedPointer)
4202
+ if ((g.buttons & G.LEFT) === G.LEFT && this._lockedPointer)
4204
4203
  return;
4205
4204
  const E = {
4206
4205
  pointerId: g.pointerId,
@@ -4228,7 +4227,7 @@ class Oe extends fr {
4228
4227
  break;
4229
4228
  }
4230
4229
  else
4231
- (!this._isDragging && this._lockedPointer || this._isDragging && (g.buttons & W.LEFT) === W.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (g.buttons & W.MIDDLE) === W.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (g.buttons & W.RIGHT) === W.RIGHT && (this._state = this._state | this.mouseButtons.right);
4230
+ (!this._isDragging && this._lockedPointer || this._isDragging && (g.buttons & G.LEFT) === G.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (g.buttons & G.MIDDLE) === G.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (g.buttons & G.RIGHT) === G.RIGHT && (this._state = this._state | this.mouseButtons.right);
4232
4231
  _();
4233
4232
  }
4234
4233
  }, c = (g) => {
@@ -4324,7 +4323,7 @@ class Oe extends fr {
4324
4323
  break;
4325
4324
  }
4326
4325
  else
4327
- !this._lockedPointer && (g.buttons & W.LEFT) === W.LEFT && (this._state = this._state | this.mouseButtons.left), (g.buttons & W.MIDDLE) === W.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (g.buttons & W.RIGHT) === W.RIGHT && (this._state = this._state | this.mouseButtons.right);
4326
+ !this._lockedPointer && (g.buttons & G.LEFT) === G.LEFT && (this._state = this._state | this.mouseButtons.left), (g.buttons & G.MIDDLE) === G.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (g.buttons & G.RIGHT) === G.RIGHT && (this._state = this._state | this.mouseButtons.right);
4328
4327
  ((this._state & f.ROTATE) === f.ROTATE || (this._state & f.TOUCH_ROTATE) === f.TOUCH_ROTATE || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) && (this._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & f.TRUCK) === f.TRUCK || (this._state & f.TOUCH_TRUCK) === f.TOUCH_TRUCK || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & f.DOLLY) === f.DOLLY || (this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & f.ZOOM) === f.ZOOM || (this._state & f.TOUCH_ZOOM) === f.TOUCH_ZOOM || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 0), ((this._state & f.OFFSET) === f.OFFSET || (this._state & f.TOUCH_OFFSET) === f.TOUCH_OFFSET || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET) && (this._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
4329
4328
  }, _ = () => {
4330
4329
  if (!this._enabled || !this._dragNeedsUpdate)
@@ -4333,13 +4332,13 @@ class Oe extends fr {
4333
4332
  const v = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = v ? -v.deltaX : n.x - pe.x, b = v ? -v.deltaY : n.y - pe.y;
4334
4333
  if (n.copy(pe), ((this._state & f.ROTATE) === f.ROTATE || (this._state & f.TOUCH_ROTATE) === f.TOUCH_ROTATE || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(E, b), this._isUserControllingRotate = !0), (this._state & f.DOLLY) === f.DOLLY || (this._state & f.ZOOM) === f.ZOOM) {
4335
4334
  const P = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, x = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, j = this.dollyDragInverted ? -1 : 1;
4336
- (this._state & f.DOLLY) === f.DOLLY ? (this._dollyInternal(j * b * Nt, P, x), this._isUserControllingDolly = !0) : (this._zoomInternal(j * b * Nt, P, x), this._isUserControllingZoom = !0);
4335
+ (this._state & f.DOLLY) === f.DOLLY ? (this._dollyInternal(j * b * Ft, P, x), this._isUserControllingDolly = !0) : (this._zoomInternal(j * b * Ft, P, x), this._isUserControllingZoom = !0);
4337
4336
  }
4338
4337
  if ((this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_ZOOM) === f.TOUCH_ZOOM || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) {
4339
4338
  const P = pe.x - this._activePointers[1].clientX, x = pe.y - this._activePointers[1].clientY, j = Math.sqrt(P * P + x * x), X = r.y - j;
4340
4339
  r.set(0, j);
4341
4340
  const ge = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, Ae = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4342
- (this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(X * Nt, ge, Ae), this._isUserControllingDolly = !0) : (this._zoomInternal(X * Nt, ge, Ae), this._isUserControllingZoom = !0);
4341
+ (this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(X * Ft, ge, Ae), this._isUserControllingDolly = !0) : (this._zoomInternal(X * Ft, ge, Ae), this._isUserControllingZoom = !0);
4343
4342
  }
4344
4343
  ((this._state & f.TRUCK) === f.TRUCK || (this._state & f.TOUCH_TRUCK) === f.TOUCH_TRUCK || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK) && (this._truckInternal(E, b, !1), this._isUserControllingTruck = !0), ((this._state & f.OFFSET) === f.OFFSET || (this._state & f.TOUCH_OFFSET) === f.TOUCH_OFFSET || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET) && (this._truckInternal(E, b, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
4345
4344
  }, S = () => {
@@ -4624,7 +4623,7 @@ class Oe extends fr {
4624
4623
  * @category Methods
4625
4624
  */
4626
4625
  dollyInFixed(e, t = !1) {
4627
- this._targetEnd.add(this._getCameraDirection(yt).multiplyScalar(e)), t || this._target.copy(this._targetEnd);
4626
+ this._targetEnd.add(this._getCameraDirection(bt).multiplyScalar(e)), t || this._target.copy(this._targetEnd);
4628
4627
  const s = !t || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold);
4629
4628
  return this._createOnRestPromise(s);
4630
4629
  }
@@ -4736,7 +4735,7 @@ class Oe extends fr {
4736
4735
  const u = ps(this._sphericalEnd.theta, us), p = ps(this._sphericalEnd.phi, us);
4737
4736
  c.push(this.rotateTo(u, p, t));
4738
4737
  const m = L.setFromSpherical(this._sphericalEnd).normalize(), _ = ys.setFromUnitVectors(m, gi), S = z(Math.abs(m.y), 1);
4739
- S && _.multiply(vi.setFromAxisAngle(Ft, u)), _.multiply(this._yAxisUpSpaceInverse);
4738
+ S && _.multiply(vi.setFromAxisAngle(zt, u)), _.multiply(this._yAxisUpSpaceInverse);
4740
4739
  const T = vs.makeEmpty();
4741
4740
  N.copy(l.min).applyQuaternion(_), T.expandByPoint(N), N.copy(l.min).setX(l.max.x).applyQuaternion(_), T.expandByPoint(N), N.copy(l.min).setY(l.max.y).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).setZ(l.min.z).applyQuaternion(_), T.expandByPoint(N), N.copy(l.min).setZ(l.max.z).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).setY(l.min.y).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).setX(l.min.x).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).applyQuaternion(_), T.expandByPoint(N), T.min.x -= n, T.min.y -= a, T.max.x += r, T.max.y += o, _.setFromUnitVectors(gi, m), S && _.premultiply(vi.invert()), _.premultiply(this._yAxisUpSpace);
4742
4741
  const M = T.getSize(L), g = T.getCenter(N).applyQuaternion(_);
@@ -4807,8 +4806,8 @@ class Oe extends fr {
4807
4806
  const T = L.set(n, r, a), M = N.set(e, t, s);
4808
4807
  ve.setFromVector3(M.sub(T).applyQuaternion(this._yAxisUpSpace));
4809
4808
  const g = it.set(u, p, m), v = N.set(o, c, l);
4810
- bt.setFromVector3(v.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(T.lerp(g, _));
4811
- const E = bt.theta - ve.theta, b = bt.phi - ve.phi, P = bt.radius - ve.radius;
4809
+ Et.setFromVector3(v.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(T.lerp(g, _));
4810
+ const E = Et.theta - ve.theta, b = Et.phi - ve.phi, P = Et.radius - ve.radius;
4812
4811
  this._sphericalEnd.set(ve.radius + P * _, ve.phi + b * _, ve.theta + E * _), this.normalizeRotations(), this._needsUpdate = !0, S || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
4813
4812
  const x = !S || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold) && z(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && z(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && z(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
4814
4813
  return this._createOnRestPromise(x);
@@ -4903,7 +4902,7 @@ class Oe extends fr {
4903
4902
  getDistanceToFitBox(e, t, s, n = !1) {
4904
4903
  if (mi(this._camera, "getDistanceToFitBox"))
4905
4904
  return this._spherical.radius;
4906
- const r = e / t, a = this._camera.getEffectiveFOV() * gt, o = this._camera.aspect;
4905
+ const r = e / t, a = this._camera.getEffectiveFOV() * _t, o = this._camera.aspect;
4907
4906
  return ((n ? r > o : r < o) ? t : e / o) * 0.5 / Math.tan(a * 0.5) + s * 0.5;
4908
4907
  }
4909
4908
  /**
@@ -4915,7 +4914,7 @@ class Oe extends fr {
4915
4914
  getDistanceToFitSphere(e) {
4916
4915
  if (mi(this._camera, "getDistanceToFitSphere"))
4917
4916
  return this._spherical.radius;
4918
- const t = this._camera.getEffectiveFOV() * gt, s = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : s;
4917
+ const t = this._camera.getEffectiveFOV() * _t, s = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : s;
4919
4918
  return e / Math.sin(n * 0.5);
4920
4919
  }
4921
4920
  /**
@@ -4998,7 +4997,7 @@ class Oe extends fr {
4998
4997
  * @category Methods
4999
4998
  */
5000
4999
  updateCameraUp() {
5001
- this._yAxisUpSpace.setFromUnitVectors(this._camera.up, Ft), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
5000
+ this._yAxisUpSpace.setFromUnitVectors(this._camera.up, zt), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
5002
5001
  }
5003
5002
  /**
5004
5003
  * Apply current camera-up direction to the camera.
@@ -5024,19 +5023,19 @@ class Oe extends fr {
5024
5023
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
5025
5024
  else {
5026
5025
  const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
5027
- this._spherical.theta = jt(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, p, 1 / 0, e), this._needsUpdate = !0;
5026
+ this._spherical.theta = Nt(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, p, 1 / 0, e), this._needsUpdate = !0;
5028
5027
  }
5029
5028
  if (V(s))
5030
5029
  this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
5031
5030
  else {
5032
5031
  const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
5033
- this._spherical.phi = jt(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, p, 1 / 0, e), this._needsUpdate = !0;
5032
+ this._spherical.phi = Nt(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, p, 1 / 0, e), this._needsUpdate = !0;
5034
5033
  }
5035
5034
  if (V(n))
5036
5035
  this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
5037
5036
  else {
5038
5037
  const p = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
5039
- this._spherical.radius = jt(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, p, this.maxSpeed, e), this._needsUpdate = !0;
5038
+ this._spherical.radius = Nt(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, p, this.maxSpeed, e), this._needsUpdate = !0;
5040
5039
  }
5041
5040
  if (V(r.x) && V(r.y) && V(r.z))
5042
5041
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
@@ -5054,13 +5053,13 @@ class Oe extends fr {
5054
5053
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
5055
5054
  else {
5056
5055
  const p = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
5057
- this._zoom = jt(this._zoom, this._zoomEnd, this._zoomVelocity, p, 1 / 0, e);
5056
+ this._zoom = Nt(this._zoom, this._zoomEnd, this._zoomVelocity, p, 1 / 0, e);
5058
5057
  }
5059
5058
  if (this.dollyToCursor) {
5060
5059
  if (Fe(this._camera) && this._changedDolly !== 0) {
5061
- const p = this._spherical.radius - this._lastDistance, m = this._camera, _ = this._getCameraDirection(yt), S = L.copy(_).cross(m.up).normalize();
5060
+ const p = this._spherical.radius - this._lastDistance, m = this._camera, _ = this._getCameraDirection(bt), S = L.copy(_).cross(m.up).normalize();
5062
5061
  S.lengthSq() === 0 && (S.x = 1);
5063
- const T = N.crossVectors(S, _), M = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() * gt * 0.5), v = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = it.copy(this._targetEnd).add(S.multiplyScalar(this._dollyControlCoord.x * M * m.aspect)).add(T.multiplyScalar(this._dollyControlCoord.y * M)), b = L.copy(this._targetEnd).lerp(E, v), P = this._lastDollyDirection === et.IN && this._spherical.radius <= this.minDistance, x = this._lastDollyDirection === et.OUT && this.maxDistance <= this._spherical.radius;
5062
+ const T = N.crossVectors(S, _), M = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() * _t * 0.5), v = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = it.copy(this._targetEnd).add(S.multiplyScalar(this._dollyControlCoord.x * M * m.aspect)).add(T.multiplyScalar(this._dollyControlCoord.y * M)), b = L.copy(this._targetEnd).lerp(E, v), P = this._lastDollyDirection === et.IN && this._spherical.radius <= this.minDistance, x = this._lastDollyDirection === et.OUT && this.maxDistance <= this._spherical.radius;
5064
5063
  if (this.infinityDolly && (P || x)) {
5065
5064
  this._sphericalEnd.radius -= p, this._spherical.radius -= p;
5066
5065
  const X = N.copy(_).multiplyScalar(-p);
@@ -5070,7 +5069,7 @@ class Oe extends fr {
5070
5069
  const j = N.subVectors(b, this._targetEnd);
5071
5070
  this._targetEnd.copy(b), this._target.add(j), this._changedDolly -= p, V(this._changedDolly) && (this._changedDolly = 0);
5072
5071
  } else if (Re(this._camera) && this._changedZoom !== 0) {
5073
- const p = this._zoom - this._lastZoom, m = this._camera, _ = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), S = N.set(0, 0, -1).applyQuaternion(m.quaternion), T = it.copy(_).add(S.multiplyScalar(-_.dot(m.up))), g = -(this._zoom - p - this._zoom) / this._zoom, v = this._getCameraDirection(yt), E = this._targetEnd.dot(v), b = L.copy(this._targetEnd).lerp(T, g), P = b.dot(v), x = v.multiplyScalar(P - E);
5072
+ const p = this._zoom - this._lastZoom, m = this._camera, _ = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), S = N.set(0, 0, -1).applyQuaternion(m.quaternion), T = it.copy(_).add(S.multiplyScalar(-_.dot(m.up))), g = -(this._zoom - p - this._zoom) / this._zoom, v = this._getCameraDirection(bt), E = this._targetEnd.dot(v), b = L.copy(this._targetEnd).lerp(T, g), P = b.dot(v), x = v.multiplyScalar(P - E);
5074
5073
  b.sub(x), this._boundary.clampPoint(b, b);
5075
5074
  const j = N.subVectors(b, this._targetEnd);
5076
5075
  this._targetEnd.copy(b), this._target.add(j), this._changedZoom -= p, V(this._changedZoom) && (this._changedZoom = 0);
@@ -5090,13 +5089,13 @@ class Oe extends fr {
5090
5089
  return JSON.stringify({
5091
5090
  enabled: this._enabled,
5092
5091
  minDistance: this.minDistance,
5093
- maxDistance: _t(this.maxDistance),
5092
+ maxDistance: vt(this.maxDistance),
5094
5093
  minZoom: this.minZoom,
5095
- maxZoom: _t(this.maxZoom),
5094
+ maxZoom: vt(this.maxZoom),
5096
5095
  minPolarAngle: this.minPolarAngle,
5097
- maxPolarAngle: _t(this.maxPolarAngle),
5098
- minAzimuthAngle: _t(this.minAzimuthAngle),
5099
- maxAzimuthAngle: _t(this.maxAzimuthAngle),
5096
+ maxPolarAngle: vt(this.maxPolarAngle),
5097
+ minAzimuthAngle: vt(this.minAzimuthAngle),
5098
+ maxAzimuthAngle: vt(this.maxAzimuthAngle),
5100
5099
  smoothTime: this.smoothTime,
5101
5100
  draggingSmoothTime: this.draggingSmoothTime,
5102
5101
  dollySpeed: this.dollySpeed,
@@ -5121,7 +5120,7 @@ class Oe extends fr {
5121
5120
  */
5122
5121
  fromJSON(e, t = !1) {
5123
5122
  const s = JSON.parse(e);
5124
- this.enabled = s.enabled, this.minDistance = s.minDistance, this.maxDistance = vt(s.maxDistance), this.minZoom = s.minZoom, this.maxZoom = vt(s.maxZoom), this.minPolarAngle = s.minPolarAngle, this.maxPolarAngle = vt(s.maxPolarAngle), this.minAzimuthAngle = vt(s.minAzimuthAngle), this.maxAzimuthAngle = vt(s.maxAzimuthAngle), this.smoothTime = s.smoothTime, this.draggingSmoothTime = s.draggingSmoothTime, this.dollySpeed = s.dollySpeed, this.truckSpeed = s.truckSpeed, this.dollyToCursor = s.dollyToCursor, this.verticalDragToForward = s.verticalDragToForward, this._target0.fromArray(s.target0), this._position0.fromArray(s.position0), this._zoom0 = s.zoom0, this._focalOffset0.fromArray(s.focalOffset0), this.moveTo(s.target[0], s.target[1], s.target[2], t), ve.setFromVector3(L.fromArray(s.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(ve.theta, ve.phi, t), this.dollyTo(ve.radius, t), this.zoomTo(s.zoom, t), this.setFocalOffset(s.focalOffset[0], s.focalOffset[1], s.focalOffset[2], t), this._needsUpdate = !0;
5123
+ this.enabled = s.enabled, this.minDistance = s.minDistance, this.maxDistance = yt(s.maxDistance), this.minZoom = s.minZoom, this.maxZoom = yt(s.maxZoom), this.minPolarAngle = s.minPolarAngle, this.maxPolarAngle = yt(s.maxPolarAngle), this.minAzimuthAngle = yt(s.minAzimuthAngle), this.maxAzimuthAngle = yt(s.maxAzimuthAngle), this.smoothTime = s.smoothTime, this.draggingSmoothTime = s.draggingSmoothTime, this.dollySpeed = s.dollySpeed, this.truckSpeed = s.truckSpeed, this.dollyToCursor = s.dollyToCursor, this.verticalDragToForward = s.verticalDragToForward, this._target0.fromArray(s.target0), this._position0.fromArray(s.position0), this._zoom0 = s.zoom0, this._focalOffset0.fromArray(s.focalOffset0), this.moveTo(s.target[0], s.target[1], s.target[2], t), ve.setFromVector3(L.fromArray(s.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(ve.theta, ve.phi, t), this.dollyTo(ve.radius, t), this.zoomTo(s.zoom, t), this.setFocalOffset(s.focalOffset[0], s.focalOffset[1], s.focalOffset[2], t), this._needsUpdate = !0;
5125
5124
  }
5126
5125
  /**
5127
5126
  * Attach all internal event handlers to enable drag control.
@@ -5182,7 +5181,7 @@ class Oe extends fr {
5182
5181
  }
5183
5182
  _updateNearPlaneCorners() {
5184
5183
  if (Fe(this._camera)) {
5185
- const e = this._camera, t = e.near, s = e.getEffectiveFOV() * gt, n = Math.tan(s * 0.5) * t, r = n * e.aspect;
5184
+ const e = this._camera, t = e.near, s = e.getEffectiveFOV() * _t, n = Math.tan(s * 0.5) * t, r = n * e.aspect;
5186
5185
  this._nearPlaneCorners[0].set(-r, -n, 0), this._nearPlaneCorners[1].set(r, -n, 0), this._nearPlaneCorners[2].set(r, n, 0), this._nearPlaneCorners[3].set(-r, n, 0);
5187
5186
  } else if (Re(this._camera)) {
5188
5187
  const e = this._camera, t = 1 / e.zoom, s = e.left * t, n = e.right * t, r = e.top * t, a = e.bottom * t;
@@ -5194,14 +5193,14 @@ class Oe extends fr {
5194
5193
  let e = 1 / 0;
5195
5194
  if (!(this.colliderMeshes.length >= 1) || mi(this._camera, "_collisionTest"))
5196
5195
  return e;
5197
- const s = this._getTargetDirection(yt);
5196
+ const s = this._getTargetDirection(bt);
5198
5197
  yi.lookAt(fs, s, this._camera.up);
5199
5198
  for (let n = 0; n < 4; n++) {
5200
5199
  const r = N.copy(this._nearPlaneCorners[n]);
5201
5200
  r.applyMatrix4(yi);
5202
5201
  const a = it.addVectors(this._target, r);
5203
- zt.set(a, s), zt.far = this._spherical.radius + 1;
5204
- const o = zt.intersectObjects(this.colliderMeshes);
5202
+ Ht.set(a, s), Ht.far = this._spherical.radius + 1;
5203
+ const o = Ht.intersectObjects(this.colliderMeshes);
5205
5204
  o.length !== 0 && o[0].distance < e && (e = o[0].distance);
5206
5205
  }
5207
5206
  return e;
@@ -5277,7 +5276,7 @@ class Oe extends fr {
5277
5276
  }), s.radius = Math.sqrt(r), s;
5278
5277
  }
5279
5278
  }
5280
- const qt = (i) => {
5279
+ const Kt = (i) => {
5281
5280
  const [e, t] = Z(i.options[i.index]), s = () => {
5282
5281
  i.onToggle(!i.open);
5283
5282
  }, n = (r) => {
@@ -5301,7 +5300,7 @@ const qt = (i) => {
5301
5300
  } }),
5302
5301
  /* @__PURE__ */ d.jsxs("div", { className: "options", children: [
5303
5302
  e.camera !== null && /* @__PURE__ */ d.jsx(
5304
- qt,
5303
+ Kt,
5305
5304
  {
5306
5305
  title: "Camera",
5307
5306
  index: e.options.indexOf(e.camera.name),
@@ -5315,7 +5314,7 @@ const qt = (i) => {
5315
5314
  }
5316
5315
  ),
5317
5316
  /* @__PURE__ */ d.jsx(
5318
- qt,
5317
+ Kt,
5319
5318
  {
5320
5319
  title: "Mode",
5321
5320
  index: s.indexOf(n),
@@ -5354,7 +5353,7 @@ class vr extends Qs {
5354
5353
  value: e?.divisions !== void 0 ? e?.divisions : 10
5355
5354
  },
5356
5355
  uColor: {
5357
- value: e?.color !== void 0 ? e?.color : new Tt(16777215)
5356
+ value: e?.color !== void 0 ? e?.color : new Mt(16777215)
5358
5357
  },
5359
5358
  uDistance: {
5360
5359
  value: e?.distance !== void 0 ? e?.distance : 1e4
@@ -5528,7 +5527,7 @@ class Cr extends Qs {
5528
5527
  });
5529
5528
  }
5530
5529
  }
5531
- const Ye = new Xt(), re = new O(), De = new O(), G = new fe(), Es = {
5530
+ const Ye = new Qt(), re = new O(), De = new O(), W = new fe(), Es = {
5532
5531
  X: new O(1, 0, 0),
5533
5532
  Y: new O(0, 1, 0),
5534
5533
  Z: new O(0, 0, 1)
@@ -5590,7 +5589,7 @@ class wr extends Xs {
5590
5589
  const a = Ei(this._plane, Ye, !0);
5591
5590
  if (a) {
5592
5591
  if (this.pointEnd.copy(a.point).sub(this.worldPositionStart), s === "translate")
5593
- this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (n.position.applyQuaternion(G.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), r === "world" && (n.parent && n.position.add(re.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(re.setFromMatrixPosition(n.parent.matrixWorld))));
5592
+ this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (n.position.applyQuaternion(W.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), r === "world" && (n.parent && n.position.add(re.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(re.setFromMatrixPosition(n.parent.matrixWorld))));
5594
5593
  else if (s === "scale") {
5595
5594
  if (t.search("XYZ") !== -1) {
5596
5595
  let o = this.pointEnd.length() / this.pointStart.length();
@@ -5602,7 +5601,7 @@ class wr extends Xs {
5602
5601
  this._offset.copy(this.pointEnd).sub(this.pointStart);
5603
5602
  const o = 20 / this.worldPosition.distanceTo(re.setFromMatrixPosition(this.camera.matrixWorld));
5604
5603
  let c = !1;
5605
- t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Es[t]), re.copy(Es[t]), r === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || c) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(G.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(G.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
5604
+ t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Es[t]), re.copy(Es[t]), r === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || c) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
5606
5605
  }
5607
5606
  this.dispatchEvent(bi), this.dispatchEvent(Ss);
5608
5607
  }
@@ -5693,7 +5692,7 @@ function Ei(i, e, t) {
5693
5692
  return s[n];
5694
5693
  return !1;
5695
5694
  }
5696
- const Ht = new qs(), B = new O(0, 1, 0), xs = new O(0, 0, 0), Os = new Kt(), Yt = new fe(), Wt = new fe(), Se = new O(), Ts = new Kt(), St = new O(1, 0, 0), Ve = new O(0, 1, 0), xt = new O(0, 0, 1), Bt = new O(), Et = new O(), Ct = new O();
5695
+ const Yt = new qs(), B = new O(0, 1, 0), xs = new O(0, 0, 0), Os = new Jt(), Bt = new fe(), Xt = new fe(), Se = new O(), Ts = new Jt(), xt = new O(1, 0, 0), Ve = new O(0, 1, 0), Ot = new O(0, 0, 1), Vt = new O(), Ct = new O(), wt = new O();
5697
5696
  class Pr extends lt {
5698
5697
  constructor(e) {
5699
5698
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
@@ -5707,7 +5706,7 @@ class Pr extends lt {
5707
5706
  class Ar extends lt {
5708
5707
  constructor() {
5709
5708
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
5710
- const e = new We({
5709
+ const e = new Ge({
5711
5710
  depthTest: !1,
5712
5711
  depthWrite: !1,
5713
5712
  fog: !1,
@@ -5774,7 +5773,7 @@ class Ar extends lt {
5774
5773
  [new w(v, o), null, [Math.PI / 2, 0, 0]]
5775
5774
  ],
5776
5775
  XYZ: [
5777
- [new w(new kt(0.1, 0), p.clone()), [0, 0, 0]]
5776
+ [new w(new Ut(0.1, 0), p.clone()), [0, 0, 0]]
5778
5777
  ],
5779
5778
  XY: [
5780
5779
  [new w(new ae(0.15, 0.15, 0.01), u.clone()), [0.15, 0.15, 0]]
@@ -5799,7 +5798,7 @@ class Ar extends lt {
5799
5798
  [new w(new de(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
5800
5799
  ],
5801
5800
  XYZ: [
5802
- [new w(new kt(0.2, 0), s)]
5801
+ [new w(new Ut(0.2, 0), s)]
5803
5802
  ],
5804
5803
  XY: [
5805
5804
  [new w(new ae(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
@@ -5812,10 +5811,10 @@ class Ar extends lt {
5812
5811
  ]
5813
5812
  }, j = {
5814
5813
  START: [
5815
- [new w(new kt(0.01, 2), n), null, null, null, "helper"]
5814
+ [new w(new Ut(0.01, 2), n), null, null, null, "helper"]
5816
5815
  ],
5817
5816
  END: [
5818
- [new w(new kt(0.01, 2), n), null, null, null, "helper"]
5817
+ [new w(new Ut(0.01, 2), n), null, null, null, "helper"]
5819
5818
  ],
5820
5819
  DELTA: [
5821
5820
  [new xe(b(), n), null, null, null, "helper"]
@@ -5933,10 +5932,10 @@ class Ar extends lt {
5933
5932
  const ke = new lt();
5934
5933
  for (const he in Q)
5935
5934
  for (let Te = Q[he].length; Te--; ) {
5936
- const se = Q[he][Te][0].clone(), Ue = Q[he][Te][1], je = Q[he][Te][2], Ne = Q[he][Te][3], Mt = Q[he][Te][4];
5937
- se.name = he, se.tag = Mt, Ue && se.position.set(Ue[0], Ue[1], Ue[2]), je && se.rotation.set(je[0], je[1], je[2]), Ne && se.scale.set(Ne[0], Ne[1], Ne[2]), se.updateMatrix();
5938
- const Pt = se.geometry.clone();
5939
- Pt.applyMatrix4(se.matrix), se.geometry = Pt, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), ke.add(se);
5935
+ const se = Q[he][Te][0].clone(), Ue = Q[he][Te][1], je = Q[he][Te][2], Ne = Q[he][Te][3], Pt = Q[he][Te][4];
5936
+ se.name = he, se.tag = Pt, Ue && se.position.set(Ue[0], Ue[1], Ue[2]), je && se.rotation.set(je[0], je[1], je[2]), Ne && se.scale.set(Ne[0], Ne[1], Ne[2]), se.updateMatrix();
5937
+ const At = se.geometry.clone();
5938
+ At.applyMatrix4(se.matrix), se.geometry = At, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), ke.add(se);
5940
5939
  }
5941
5940
  return ke;
5942
5941
  }
@@ -5944,7 +5943,7 @@ class Ar extends lt {
5944
5943
  }
5945
5944
  // updateMatrixWorld will update transformations and appearance of individual handles
5946
5945
  updateMatrixWorld(e) {
5947
- const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Wt;
5946
+ const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Xt;
5948
5947
  this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
5949
5948
  let n = [];
5950
5949
  n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
@@ -5953,10 +5952,10 @@ class Ar extends lt {
5953
5952
  a.visible = !0, a.rotation.set(0, 0, 0), a.position.copy(this.worldPosition);
5954
5953
  let o;
5955
5954
  if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), a.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), a.tag === "helper") {
5956
- a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (G.setFromEuler(Ht.set(0, 0, 0)), a.quaternion.copy(s).multiply(G), Math.abs(B.copy(St).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (G.setFromEuler(Ht.set(0, 0, Math.PI / 2)), a.quaternion.copy(s).multiply(G), Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Z" && (G.setFromEuler(Ht.set(0, Math.PI / 2, 0)), a.quaternion.copy(s).multiply(G), Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "XYZE" && (G.setFromEuler(Ht.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), a.quaternion.setFromRotationMatrix(Os.lookAt(xs, B, Ve)), a.quaternion.multiply(G), a.visible = this.dragging), this.axis === "E" && (a.visible = !1)) : a.name === "START" ? (a.position.copy(this.worldPositionStart), a.visible = this.dragging) : a.name === "END" ? (a.position.copy(this.worldPosition), a.visible = this.dragging) : a.name === "DELTA" ? (a.position.copy(this.worldPositionStart), a.quaternion.copy(this.worldQuaternionStart), re.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), re.applyQuaternion(this.worldQuaternionStart.clone().invert()), a.scale.copy(re), a.visible = this.dragging) : (a.quaternion.copy(s), this.dragging ? a.position.copy(this.worldPositionStart) : a.position.copy(this.worldPosition), this.axis && (a.visible = this.axis.search(a.name) !== -1));
5955
+ a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (W.setFromEuler(Yt.set(0, 0, 0)), a.quaternion.copy(s).multiply(W), Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (W.setFromEuler(Yt.set(0, 0, Math.PI / 2)), a.quaternion.copy(s).multiply(W), Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Z" && (W.setFromEuler(Yt.set(0, Math.PI / 2, 0)), a.quaternion.copy(s).multiply(W), Math.abs(B.copy(Ot).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "XYZE" && (W.setFromEuler(Yt.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), a.quaternion.setFromRotationMatrix(Os.lookAt(xs, B, Ve)), a.quaternion.multiply(W), a.visible = this.dragging), this.axis === "E" && (a.visible = !1)) : a.name === "START" ? (a.position.copy(this.worldPositionStart), a.visible = this.dragging) : a.name === "END" ? (a.position.copy(this.worldPosition), a.visible = this.dragging) : a.name === "DELTA" ? (a.position.copy(this.worldPositionStart), a.quaternion.copy(this.worldQuaternionStart), re.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), re.applyQuaternion(this.worldQuaternionStart.clone().invert()), a.scale.copy(re), a.visible = this.dragging) : (a.quaternion.copy(s), this.dragging ? a.position.copy(this.worldPositionStart) : a.position.copy(this.worldPosition), this.axis && (a.visible = this.axis.search(a.name) !== -1));
5957
5956
  continue;
5958
5957
  }
5959
- a.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(B.copy(St).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(B.copy(St).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (Yt.copy(s), B.copy(this.eye).applyQuaternion(G.copy(s).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(Os.lookAt(this.eye, xs, Ve)), a.name === "X" && (G.setFromAxisAngle(St, Math.atan2(-B.y, B.z)), G.multiplyQuaternions(Yt, G), a.quaternion.copy(G)), a.name === "Y" && (G.setFromAxisAngle(Ve, Math.atan2(B.x, B.z)), G.multiplyQuaternions(Yt, G), a.quaternion.copy(G)), a.name === "Z" && (G.setFromAxisAngle(xt, Math.atan2(B.y, B.x)), G.multiplyQuaternions(Yt, G), a.quaternion.copy(G))), a.visible = a.visible && (a.name.indexOf("X") === -1 || this.showX), a.visible = a.visible && (a.name.indexOf("Y") === -1 || this.showY), a.visible = a.visible && (a.name.indexOf("Z") === -1 || this.showZ), a.visible = a.visible && (a.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), a.material._color = a.material._color || a.material.color.clone(), a.material._opacity = a.material._opacity || a.material.opacity, a.material.color.copy(a.material._color), a.material.opacity = a.material._opacity, this.enabled && this.axis && (a.name === this.axis || this.axis.split("").some(function(c) {
5958
+ a.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(B.copy(Ot).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(B.copy(Ot).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (Bt.copy(s), B.copy(this.eye).applyQuaternion(W.copy(s).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(Os.lookAt(this.eye, xs, Ve)), a.name === "X" && (W.setFromAxisAngle(xt, Math.atan2(-B.y, B.z)), W.multiplyQuaternions(Bt, W), a.quaternion.copy(W)), a.name === "Y" && (W.setFromAxisAngle(Ve, Math.atan2(B.x, B.z)), W.multiplyQuaternions(Bt, W), a.quaternion.copy(W)), a.name === "Z" && (W.setFromAxisAngle(Ot, Math.atan2(B.y, B.x)), W.multiplyQuaternions(Bt, W), a.quaternion.copy(W))), a.visible = a.visible && (a.name.indexOf("X") === -1 || this.showX), a.visible = a.visible && (a.name.indexOf("Y") === -1 || this.showY), a.visible = a.visible && (a.name.indexOf("Z") === -1 || this.showZ), a.visible = a.visible && (a.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), a.material._color = a.material._color || a.material.color.clone(), a.material._opacity = a.material._opacity || a.material.opacity, a.material.color.copy(a.material._color), a.material.opacity = a.material._opacity, this.enabled && this.axis && (a.name === this.axis || this.axis.split("").some(function(c) {
5960
5959
  return a.name === c;
5961
5960
  })) && (a.material.color.setHex(16776960), a.material.opacity = 1);
5962
5961
  }
@@ -5967,32 +5966,32 @@ class Dr extends w {
5967
5966
  constructor() {
5968
5967
  super(
5969
5968
  new $s(1e5, 1e5, 2, 2),
5970
- new We({ visible: !1, wireframe: !0, side: Ri, transparent: !0, opacity: 0.1, toneMapped: !1 })
5969
+ new Ge({ visible: !1, wireframe: !0, side: Ri, transparent: !0, opacity: 0.1, toneMapped: !1 })
5971
5970
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
5972
5971
  }
5973
5972
  updateMatrixWorld(e) {
5974
5973
  let t = this.space;
5975
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(St).applyQuaternion(t === "local" ? this.worldQuaternion : Wt), Et.copy(Ve).applyQuaternion(t === "local" ? this.worldQuaternion : Wt), Ct.copy(xt).applyQuaternion(t === "local" ? this.worldQuaternion : Wt), B.copy(Et), this.mode) {
5974
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Vt.copy(xt).applyQuaternion(t === "local" ? this.worldQuaternion : Xt), Ct.copy(Ve).applyQuaternion(t === "local" ? this.worldQuaternion : Xt), wt.copy(Ot).applyQuaternion(t === "local" ? this.worldQuaternion : Xt), B.copy(Ct), this.mode) {
5976
5975
  case "translate":
5977
5976
  case "scale":
5978
5977
  switch (this.axis) {
5979
5978
  case "X":
5980
- B.copy(this.eye).cross(Bt), Se.copy(Bt).cross(B);
5979
+ B.copy(this.eye).cross(Vt), Se.copy(Vt).cross(B);
5981
5980
  break;
5982
5981
  case "Y":
5983
- B.copy(this.eye).cross(Et), Se.copy(Et).cross(B);
5982
+ B.copy(this.eye).cross(Ct), Se.copy(Ct).cross(B);
5984
5983
  break;
5985
5984
  case "Z":
5986
- B.copy(this.eye).cross(Ct), Se.copy(Ct).cross(B);
5985
+ B.copy(this.eye).cross(wt), Se.copy(wt).cross(B);
5987
5986
  break;
5988
5987
  case "XY":
5989
- Se.copy(Ct);
5988
+ Se.copy(wt);
5990
5989
  break;
5991
5990
  case "YZ":
5992
- Se.copy(Bt);
5991
+ Se.copy(Vt);
5993
5992
  break;
5994
5993
  case "XZ":
5995
- B.copy(Ct), Se.copy(Et);
5994
+ B.copy(wt), Se.copy(Ct);
5996
5995
  break;
5997
5996
  case "XYZ":
5998
5997
  case "E":
@@ -6094,12 +6093,12 @@ class Ms extends lt {
6094
6093
  _draggableScale = 10;
6095
6094
  _transform;
6096
6095
  raycaster;
6097
- draggedMat = new We();
6096
+ draggedMat = new Ge();
6098
6097
  parentGroup;
6099
6098
  group;
6100
6099
  constructor(e, t) {
6101
- const s = new Tt(Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()));
6102
- super(), this.name = e, this.lineMaterial = new Ii({ color: s }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Ks(1.5), new We({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Xt(), this.raycaster.params.Line.threshold = 3, this.enable();
6100
+ const s = new Mt(Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()));
6101
+ super(), this.name = e, this.lineMaterial = new Ii({ color: s }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Ks(1.5), new Ge({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Qt(), this.raycaster.params.Line.threshold = 3, this.enable();
6103
6102
  }
6104
6103
  enable() {
6105
6104
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -6409,7 +6408,7 @@ class Ms extends lt {
6409
6408
  e.name, e.visible = this.draggable.visible;
6410
6409
  };
6411
6410
  }
6412
- let Vt = 0;
6411
+ let Zt = 0;
6413
6412
  class Ir extends lt {
6414
6413
  defaultScale = 10;
6415
6414
  _camera;
@@ -6418,7 +6417,7 @@ class Ir extends lt {
6418
6417
  super(), this.name = "Spline Editor", this._camera = e, D.addEventListener(A.ADD_SPLINE, this.onAddSpline);
6419
6418
  }
6420
6419
  initDebug() {
6421
- this.group = q.addEditorGroup({
6420
+ this.group = J.addEditorGroup({
6422
6421
  title: this.name,
6423
6422
  items: [
6424
6423
  {
@@ -6463,14 +6462,14 @@ class Ir extends lt {
6463
6462
  });
6464
6463
  }
6465
6464
  dispose() {
6466
- D.removeEventListener(A.ADD_SPLINE, this.onAddSpline), q.removeEditorGroup(this.name);
6465
+ D.removeEventListener(A.ADD_SPLINE, this.onAddSpline), J.removeEditorGroup(this.name);
6467
6466
  }
6468
6467
  addSpline(e) {
6469
6468
  e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
6470
6469
  }
6471
6470
  createSpline = (e = []) => {
6472
- const t = `Spline ${Vt + 1}`, s = new Ms(t, this._camera);
6473
- return s.addPoints(e), this.addSpline(s), Vt++, s;
6471
+ const t = `Spline ${Zt + 1}`, s = new Ms(t, this._camera);
6472
+ return s.addPoints(e), this.addSpline(s), Zt++, s;
6474
6473
  };
6475
6474
  createSplineFromArray = (e) => {
6476
6475
  const t = [];
@@ -6489,12 +6488,12 @@ class Ir extends lt {
6489
6488
  });
6490
6489
  };
6491
6490
  onAddSpline = (e) => {
6492
- const t = JSON.parse(e.value), s = `Spline ${Vt + 1}`, n = [];
6491
+ const t = JSON.parse(e.value), s = `Spline ${Zt + 1}`, n = [];
6493
6492
  t.points.forEach((a) => {
6494
6493
  n.push(new O(a[0], a[1], a[2]));
6495
6494
  });
6496
6495
  const r = new Ms(s, this.camera);
6497
- r.addPoints(n), this.addSpline(r), Vt++;
6496
+ r.addPoints(n), this.addSpline(r), Zt++;
6498
6497
  };
6499
6498
  get camera() {
6500
6499
  return this._camera;
@@ -6512,7 +6511,7 @@ const Ps = [
6512
6511
  "Stacked",
6513
6512
  "Quad"
6514
6513
  ], Lr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", kr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
6515
- class Pe extends Jt {
6514
+ class Pe extends ei {
6516
6515
  static instance = null;
6517
6516
  scene = new Ds();
6518
6517
  renderer;
@@ -6535,7 +6534,7 @@ class Pe extends Jt {
6535
6534
  depthMaterial = new Jn();
6536
6535
  normalsMaterial = new ea();
6537
6536
  uvMaterial = new Cr();
6538
- wireframeMaterial = new We({
6537
+ wireframeMaterial = new Ge({
6539
6538
  opacity: 0.33,
6540
6539
  transparent: !0,
6541
6540
  wireframe: !0
@@ -6560,7 +6559,7 @@ class Pe extends Jt {
6560
6559
  // Interactions
6561
6560
  selectedItem = void 0;
6562
6561
  debugCamera;
6563
- raycaster = new Xt();
6562
+ raycaster = new Qt();
6564
6563
  pointer = new oe();
6565
6564
  cameraControls = void 0;
6566
6565
  // References
@@ -6586,11 +6585,11 @@ class Pe extends Jt {
6586
6585
  Vector3: O,
6587
6586
  Vector4: ca,
6588
6587
  Quaternion: fe,
6589
- Matrix4: Kt,
6588
+ Matrix4: Jt,
6590
6589
  Spherical: Si,
6591
6590
  Box3: ha,
6592
6591
  Sphere: da,
6593
- Raycaster: Xt
6592
+ Raycaster: Qt
6594
6593
  };
6595
6594
  Oe.install({ THREE: r }), this.setupScene(), this.setupTools();
6596
6595
  const a = localStorage.getItem(this.expandedCameraVisibility);
@@ -6740,7 +6739,7 @@ class Pe extends Jt {
6740
6739
  ] }),
6741
6740
  /* @__PURE__ */ d.jsxs("div", { className: "settings", children: [
6742
6741
  /* @__PURE__ */ d.jsx(
6743
- qt,
6742
+ Kt,
6744
6743
  {
6745
6744
  title: "View",
6746
6745
  index: Ps.indexOf(this.state.mode),
@@ -6759,7 +6758,7 @@ class Pe extends Jt {
6759
6758
  }
6760
6759
  ),
6761
6760
  /* @__PURE__ */ d.jsx(
6762
- qt,
6761
+ Kt,
6763
6762
  {
6764
6763
  title: "Interact",
6765
6764
  index: this.state.interactionMode === "Orbit" ? 0 : 1,
@@ -6789,9 +6788,12 @@ class Pe extends Jt {
6789
6788
  height: 24,
6790
6789
  top: 2,
6791
6790
  onClick: (t) => {
6792
- this.cameraVisibility = t, this.saveExpandedCameraVisibility(), this.cameraHelpers.forEach((s) => {
6791
+ if (this.cameraVisibility = t, this.saveExpandedCameraVisibility(), this.cameraHelpers.forEach((s) => {
6793
6792
  s.visible = t;
6794
- });
6793
+ }), this.selectedItem !== void 0 && !t && this.selectedItem instanceof pt) {
6794
+ const s = this.cameraHelpers.get(this.selectedItem.name);
6795
+ s !== void 0 && (s.visible = !0);
6796
+ }
6795
6797
  }
6796
6798
  }
6797
6799
  ),
@@ -6804,9 +6806,12 @@ class Pe extends Jt {
6804
6806
  height: 24,
6805
6807
  top: 4,
6806
6808
  onClick: (t) => {
6807
- this.lightVisibility = t, this.saveExpandedLightVisibility(), this.lightHelpers.forEach((s) => {
6809
+ if (this.lightVisibility = t, this.saveExpandedLightVisibility(), this.lightHelpers.forEach((s) => {
6808
6810
  s.visible = t;
6809
- });
6811
+ }), this.selectedItem !== void 0 && !t && this.selectedItem.isLight === !0) {
6812
+ const s = this.lightHelpers.get(this.selectedItem.name);
6813
+ s !== void 0 && (s.visible = !0);
6814
+ }
6810
6815
  }
6811
6816
  }
6812
6817
  )
@@ -6826,7 +6831,7 @@ class Pe extends Jt {
6826
6831
  const a = new wi(-100, 100, 100, -100, 50, 5e3);
6827
6832
  return a.name = n, a.position.copy(r), a.lookAt(0, 0, 0), this.cameras.set(n, a), a;
6828
6833
  };
6829
- e("Top", new O(0, 1e3, 0)), e("Bottom", new O(0, -1e3, 0)), e("Left", new O(-1e3, 0, 0)), e("Right", new O(1e3, 0, 0)), e("Front", new O(0, 0, 1e3)), e("Back", new O(0, 0, -1e3)), e("Orthographic", new O(1e3, 1e3, 1e3)), e("UI", new O()), this.debugCamera = new hi(60, 1, 50, 5e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(500, 500, 500), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
6834
+ e("Top", new O(0, 1e3, 0)), e("Bottom", new O(0, -1e3, 0)), e("Left", new O(-1e3, 0, 0)), e("Right", new O(1e3, 0, 0)), e("Front", new O(0, 0, 1e3)), e("Back", new O(0, 0, -1e3)), e("Orthographic", new O(1e3, 1e3, 1e3)), e("UI", new O()), this.debugCamera = new pt(60, 1, 50, 5e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(500, 500, 500), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
6830
6835
  const t = localStorage, s = this.props.three.app.appID;
6831
6836
  this.tlCam = this.cameras.get(t.getItem(`${s}_tlCam`)), this.trCam = this.cameras.get(t.getItem(`${s}_trCam`)), this.blCam = this.cameras.get(t.getItem(`${s}_blCam`)), this.brCam = this.cameras.get(t.getItem(`${s}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
6832
6837
  }
@@ -6899,7 +6904,7 @@ class Pe extends Jt {
6899
6904
  }
6900
6905
  const r = s / n;
6901
6906
  this.cameras.forEach((a) => {
6902
- a instanceof wi ? (a.left = s / -2, a.right = s / 2, a.top = n / 2, a.bottom = n / -2, a.name === "UI" && (a.position.x = this.width / 2, a.position.y = this.height / -2, a.position.z = 100), a.updateProjectionMatrix()) : a instanceof hi && (a.aspect = r, a.updateProjectionMatrix(), this.cameraHelpers.get(a.name)?.update());
6907
+ a instanceof wi ? (a.left = s / -2, a.right = s / 2, a.top = n / 2, a.bottom = n / -2, a.name === "UI" && (a.position.x = this.width / 2, a.position.y = this.height / -2, a.position.z = 100), a.updateProjectionMatrix()) : a instanceof pt && (a.aspect = r, a.updateProjectionMatrix(), this.cameraHelpers.get(a.name)?.update());
6903
6908
  });
6904
6909
  };
6905
6910
  sceneUpdate = (e) => {
@@ -6912,7 +6917,7 @@ class Pe extends Jt {
6912
6917
  };
6913
6918
  addCamera = (e) => {
6914
6919
  const t = e.value, s = this.props.three.scene?.getObjectByProperty("uuid", t.uuid);
6915
- if (s !== void 0 && this.cameras.set(t.name, s), s instanceof hi) {
6920
+ if (s !== void 0 && this.cameras.set(t.name, s), s instanceof pt) {
6916
6921
  const n = new ia(s);
6917
6922
  n.visible = this.cameraVisibility, this.cameraHelpers.set(s.name, n), this.scene.add(n);
6918
6923
  }
@@ -6983,14 +6988,25 @@ class Pe extends Jt {
6983
6988
  }
6984
6989
  };
6985
6990
  onSetSelectedItem = (e) => {
6986
- this.selectedItem = this.currentScene.getObjectByProperty("uuid", e.value.uuid), this.selectedItem !== void 0 && (this.currentTransform !== void 0 && (this.currentTransform.removeEventListener("objectChange", this.onUpdateTransform), ce.instance.remove(this.currentTransform.getHelper().name)), this.currentTransform = ce.instance.add(e.value.name), this.currentTransform.attach(this.selectedItem), this.scene.add(this.currentTransform.getHelper()), this.currentTransform.addEventListener("objectChange", this.onUpdateTransform));
6991
+ this.selectedItem !== void 0 && this.updateSelectedItemHelper(!1), this.selectedItem = this.currentScene.getObjectByProperty("uuid", e.value.uuid), this.selectedItem !== void 0 && (this.currentTransform !== void 0 && (this.currentTransform.removeEventListener("objectChange", this.onUpdateTransform), ce.instance.remove(this.currentTransform.getHelper().name)), this.currentTransform = ce.instance.add(e.value.name), this.currentTransform.attach(this.selectedItem), this.scene.add(this.currentTransform.getHelper()), this.currentTransform.addEventListener("objectChange", this.onUpdateTransform), this.updateSelectedItemHelper(!0));
6987
6992
  };
6993
+ updateSelectedItemHelper(e) {
6994
+ if (this.selectedItem !== void 0) {
6995
+ if (this.selectedItem instanceof pt && !this.cameraVisibility) {
6996
+ const t = this.cameraHelpers.get(this.selectedItem.name);
6997
+ t !== void 0 && (t.visible = e);
6998
+ } else if (this.selectedItem.isLight === !0 && !this.lightVisibility) {
6999
+ const t = this.lightHelpers.get(this.selectedItem.name);
7000
+ t !== void 0 && (t.visible = e);
7001
+ }
7002
+ }
7003
+ }
6988
7004
  onUpdateTransform = () => {
6989
7005
  this.selectedItem !== void 0 && (this.props.three.updateObject(this.selectedItem.uuid, "position", this.selectedItem.position), this.props.three.updateObject(this.selectedItem.uuid, "rotation", {
6990
7006
  x: this.selectedItem.rotation.x,
6991
7007
  y: this.selectedItem.rotation.y,
6992
7008
  z: this.selectedItem.rotation.z
6993
- }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), ti.instance.update());
7009
+ }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), ii.instance.update());
6994
7010
  };
6995
7011
  // Utils
6996
7012
  clearLightHelpers = () => {
@@ -7155,9 +7171,9 @@ class Pe extends Jt {
7155
7171
  return `${this.appID}_multiviewLightVisibility`;
7156
7172
  }
7157
7173
  }
7158
- class ti extends Jt {
7174
+ class ii extends ei {
7159
7175
  static instance;
7160
- matrix = new Kt();
7176
+ matrix = new Jt();
7161
7177
  position = new O();
7162
7178
  rotation = new qs();
7163
7179
  scale = new O();
@@ -7168,7 +7184,7 @@ class ti extends Jt {
7168
7184
  this.open = s, this.saveExpanded(), this.state = {
7169
7185
  lastUpdated: 0,
7170
7186
  expanded: s
7171
- }, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), ti.instance = this;
7187
+ }, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), ii.instance = this;
7172
7188
  }
7173
7189
  update() {
7174
7190
  if (Pe.instance) {
@@ -7228,7 +7244,7 @@ class ti extends Jt {
7228
7244
  const n = this.props.three.getScene(this.props.object.uuid);
7229
7245
  if (n) {
7230
7246
  const r = n.getObjectByProperty("uuid", this.props.object.uuid);
7231
- K(r, e, s);
7247
+ q(r, e, s);
7232
7248
  }
7233
7249
  };
7234
7250
  saveExpanded() {
@@ -7279,12 +7295,12 @@ function Ur(i, e) {
7279
7295
  type: "color",
7280
7296
  value: c,
7281
7297
  onChange: (l, u) => {
7282
- const p = new Tt(u);
7298
+ const p = new Mt(u);
7283
7299
  e.updateObject(i.uuid, l, p);
7284
7300
  const m = e.getScene(i.uuid);
7285
7301
  if (m !== null) {
7286
7302
  const _ = m.getObjectByProperty("uuid", i.uuid);
7287
- K(_, l, p);
7303
+ q(_, l, p);
7288
7304
  }
7289
7305
  }
7290
7306
  }) : a.push({
@@ -7298,7 +7314,7 @@ function Ur(i, e) {
7298
7314
  const p = e.getScene(i.uuid);
7299
7315
  if (p !== null) {
7300
7316
  const m = p.getObjectByProperty("uuid", i.uuid);
7301
- K(m, l, u);
7317
+ q(m, l, u);
7302
7318
  }
7303
7319
  }
7304
7320
  }));
@@ -7430,7 +7446,7 @@ function Nr(i) {
7430
7446
  }, []);
7431
7447
  const s = ne.type.toLowerCase(), n = ne.animations.length > 0 || ne.mixer !== void 0, r = s.search("mesh") > -1 || s.search("line") > -1 || s.search("points") > -1;
7432
7448
  return /* @__PURE__ */ d.jsx(
7433
- $t,
7449
+ qt,
7434
7450
  {
7435
7451
  label: "Inspector",
7436
7452
  button: ne.uuid.length > 0 ? /* @__PURE__ */ d.jsx("button", { className: "remove", onClick: () => {
@@ -7470,7 +7486,7 @@ function Nr(i) {
7470
7486
  )
7471
7487
  ] }),
7472
7488
  /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
7473
- /* @__PURE__ */ d.jsx(ti, { object: ne, three: i.three }),
7489
+ /* @__PURE__ */ d.jsx(ii, { object: ne, three: i.three }),
7474
7490
  n ? jr(ne, i.three) : null,
7475
7491
  s.search("camera") > -1 ? Ja(ne, i.three) : null,
7476
7492
  s.search("light") > -1 ? Ur(ne, i.three) : null,
@@ -7486,7 +7502,7 @@ function Fr(i) {
7486
7502
  const l = c.value;
7487
7503
  e.push(l), t.push(
7488
7504
  /* @__PURE__ */ d.jsx(
7489
- $t,
7505
+ qt,
7490
7506
  {
7491
7507
  label: `Scene: ${l.name}`,
7492
7508
  scene: l,
@@ -7504,7 +7520,7 @@ function Fr(i) {
7504
7520
  for (let u = 0; u < e.length; u++)
7505
7521
  if (l.uuid === e[u].uuid) {
7506
7522
  e[u] = l, t[u] = /* @__PURE__ */ d.jsx(
7507
- $t,
7523
+ qt,
7508
7524
  {
7509
7525
  label: `Scene: ${l.name}`,
7510
7526
  scene: l,
@@ -7531,7 +7547,7 @@ function Fr(i) {
7531
7547
  }), []), /* @__PURE__ */ d.jsxs("div", { id: "SidePanel", children: [
7532
7548
  /* @__PURE__ */ d.jsx("div", { className: "scenes", children: t }, s),
7533
7549
  /* @__PURE__ */ d.jsx(Nr, { three: i.three }),
7534
- /* @__PURE__ */ d.jsx(q, { three: i.three })
7550
+ /* @__PURE__ */ d.jsx(J, { three: i.three })
7535
7551
  ] });
7536
7552
  }
7537
7553
  function eo(i) {
@@ -7547,7 +7563,7 @@ function eo(i) {
7547
7563
  u !== void 0 && i.three.setObject(u);
7548
7564
  }, s = (o, c, l) => {
7549
7565
  const p = e(o)?.getObjectByProperty("uuid", o);
7550
- p !== void 0 && K(p, c, l);
7566
+ p !== void 0 && q(p, c, l);
7551
7567
  }, n = (o) => {
7552
7568
  const c = o.value, { key: l, value: u, uuid: p } = c;
7553
7569
  s(p, l, u);
@@ -7616,8 +7632,8 @@ function to(i) {
7616
7632
  ] }) });
7617
7633
  }
7618
7634
  export {
7619
- $t as Accordion,
7620
- Wr as Application,
7635
+ qt as Accordion,
7636
+ Gr as Application,
7621
7637
  Li as BaseRemote,
7622
7638
  an as ChildObject,
7623
7639
  as as ContainerObject,
@@ -7626,7 +7642,7 @@ export {
7626
7642
  Ma as Dropdown,
7627
7643
  Pa as DropdownItem,
7628
7644
  zr as Editor,
7629
- Zt as ExportTexture,
7645
+ Wt as ExportTexture,
7630
7646
  Nr as Inspector,
7631
7647
  Pe as MultiView,
7632
7648
  nn as NavButton,
@@ -7641,7 +7657,7 @@ export {
7641
7657
  to as ThreeEditor,
7642
7658
  A as ToolEvents,
7643
7659
  ce as Transform,
7644
- Qt as capitalize,
7660
+ $t as capitalize,
7645
7661
  Be as clamp,
7646
7662
  ts as colorToHex,
7647
7663
  pa as copyToClipboard,
@@ -7650,7 +7666,7 @@ export {
7650
7666
  Vr as defaultTheatreCallback,
7651
7667
  Le as dispose,
7652
7668
  ga as disposeMaterial,
7653
- Gr as disposeTexture,
7669
+ Wr as disposeTexture,
7654
7670
  Zr as distance,
7655
7671
  Ti as hierarchyUUID,
7656
7672
  fa as isColor,