shop-components 0.4.29 → 0.4.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,26 +10,26 @@ var j = (a, e, t) => (vr(a, e, "read from private field"), t ? t.call(a) : e.get
10
10
  e instanceof WeakSet ? e.add(a) : e.set(a, t);
11
11
  }, Fe = (a, e, t, i) => (vr(a, e, "write to private field"), i ? i.call(a, t) : e.set(a, t), t);
12
12
  import * as W from "three";
13
- import { BufferAttribute as ve, BufferGeometry as re, Matrix4 as te, Matrix3 as In, Vector3 as b, Vector4 as ht, MeshBasicMaterial as ze, Mesh as q, ShaderMaterial as Gt, NoBlending as di, WebGLRenderTarget as je, FloatType as xe, RGBAFormat as le, NearestFilter as ae, Vector2 as G, PerspectiveCamera as ss, DataUtils as Ge, DataTexture as qe, HalfFloatType as Pe, LinearFilter as Ie, RepeatWrapping as ct, RedFormat as Fs, ClampToEdgeWrapping as Ze, Source as po, Quaternion as ee, DataArrayTexture as mo, DoubleSide as gi, BackSide as Pn, FrontSide as Bs, Color as X, WebGLArrayRenderTarget as go, UnsignedByteType as nr, NoToneMapping as _o, RGFormat as vo, NormalBlending as Dn, Spherical as yo, EquirectangularReflectionMapping as Xi, LinearMipMapLinearFilter as xo, Clock as rs, Scene as Os, AdditiveBlending as wo, Box3 as J, Sphere as ns, CompressedTexture as bo, Texture as rt, InterleavedBuffer as Ao, InterleavedBufferAttribute as To, TextureLoader as En, MeshStandardMaterial as ji, Group as De, LineSegments as zs, LineBasicMaterial as Ws, Object3D as Ee, LineDashedMaterial as Us, RingGeometry as yr, BoxGeometry as So, EdgesGeometry as Mo, SRGBColorSpace as pi, Raycaster as Rn, CircleGeometry as xr, TorusGeometry as wr, OctahedronGeometry as Co, Float32BufferAttribute as Io, Line as Po, EventDispatcher as Do, PlaneGeometry as mi, AxesHelper as cs, AnimationMixer as br, VideoTexture as Eo, MathUtils as Qe, LoopRepeat as Ro, LoopOnce as Lo, Plane as or, Line3 as Ye, Triangle as oi, DirectionalLight as ko, NoColorSpace as Ar, MeshLambertMaterial as Fo, DirectionalLightHelper as Bo, PlaneHelper as Oo, UniformsUtils as zo, WebGLRenderer as Wo, OrthographicCamera as Hs, MeshPhysicalMaterial as Uo, ACESFilmicToneMapping as Ho, Euler as No } from "three";
13
+ import { BufferAttribute as ve, BufferGeometry as re, Matrix4 as te, Matrix3 as In, Vector3 as b, Vector4 as ht, MeshBasicMaterial as ze, Mesh as q, ShaderMaterial as Gt, NoBlending as di, WebGLRenderTarget as je, FloatType as xe, RGBAFormat as le, NearestFilter as ae, Vector2 as G, PerspectiveCamera as ss, DataUtils as Ge, DataTexture as qe, HalfFloatType as De, LinearFilter as Ie, RepeatWrapping as ct, RedFormat as Fs, ClampToEdgeWrapping as Ze, Source as po, Quaternion as ee, DataArrayTexture as mo, DoubleSide as gi, BackSide as Dn, FrontSide as Bs, Color as X, WebGLArrayRenderTarget as go, UnsignedByteType as nr, NoToneMapping as _o, RGFormat as vo, NormalBlending as Pn, Spherical as yo, EquirectangularReflectionMapping as Xi, LinearMipMapLinearFilter as xo, Clock as rs, Scene as Os, AdditiveBlending as wo, Box3 as J, Sphere as ns, CompressedTexture as bo, Texture as rt, InterleavedBuffer as Ao, InterleavedBufferAttribute as To, TextureLoader as En, MeshStandardMaterial as ji, Group as Pe, LineSegments as zs, LineBasicMaterial as Ws, Object3D as Ee, LineDashedMaterial as Us, RingGeometry as yr, BoxGeometry as So, EdgesGeometry as Mo, SRGBColorSpace as pi, Raycaster as Rn, CircleGeometry as xr, TorusGeometry as wr, OctahedronGeometry as Co, Float32BufferAttribute as Io, Line as Do, EventDispatcher as Po, PlaneGeometry as mi, AxesHelper as cs, AnimationMixer as br, VideoTexture as Eo, LinearMipmapLinearFilter as Ro, MathUtils as Qe, LoopRepeat as Lo, LoopOnce as ko, Plane as or, Line3 as Ye, Triangle as oi, DirectionalLight as Fo, NoColorSpace as Ar, MeshLambertMaterial as Bo, DirectionalLightHelper as Oo, PlaneHelper as zo, UniformsUtils as Wo, WebGLRenderer as Uo, OrthographicCamera as Hs, MeshPhysicalMaterial as Ho, ACESFilmicToneMapping as No, Euler as Vo } from "three";
14
14
  import { HDRLoader as Tr } from "three/examples/jsm/loaders/HDRLoader.js";
15
- import { OrbitControls as Vo } from "three/examples/jsm/controls/OrbitControls";
16
- import { CSS2DObject as Ke, CSS2DRenderer as Go } from "three/examples/jsm/renderers/CSS2DRenderer";
17
- import { Font as Qo } from "three/examples/jsm/loaders/FontLoader";
15
+ import { OrbitControls as Go } from "three/examples/jsm/controls/OrbitControls";
16
+ import { CSS2DObject as Ke, CSS2DRenderer as Qo } from "three/examples/jsm/renderers/CSS2DRenderer";
17
+ import { Font as jo } from "three/examples/jsm/loaders/FontLoader";
18
18
  import { GLTFLoader as ar } from "three/examples/jsm/loaders/GLTFLoader.js";
19
19
  import "three/examples/jsm/libs/meshopt_decoder.module.js";
20
20
  import "three/examples/jsm/loaders/DRACOLoader.js";
21
- import { GLTFLoader as jo } from "three/examples/jsm/loaders/GLTFLoader";
22
- import { DRACOLoader as qo } from "three/examples/jsm/loaders/DRACOLoader";
23
- import { DRACOExporter as Yo } from "three/examples/jsm/exporters/DRACOExporter";
24
- import { GLTFExporter as Ko } from "three/examples/jsm/exporters/GLTFExporter";
21
+ import { GLTFLoader as qo } from "three/examples/jsm/loaders/GLTFLoader";
22
+ import { DRACOLoader as Yo } from "three/examples/jsm/loaders/DRACOLoader";
23
+ import { DRACOExporter as Ko } from "three/examples/jsm/exporters/DRACOExporter";
24
+ import { GLTFExporter as Zo } from "three/examples/jsm/exporters/GLTFExporter";
25
25
  import * as hs from "three/examples/jsm/utils/SkeletonUtils.js";
26
26
  import { Line2 as Ln } from "three/examples/jsm/lines/Line2.js";
27
27
  import { LineMaterial as kn } from "three/examples/jsm/lines/LineMaterial.js";
28
28
  import { LineGeometry as Ns } from "three/examples/jsm/lines/LineGeometry.js";
29
- import { CSS3DObject as Zo } from "three/examples/jsm/renderers/CSS3DRenderer";
29
+ import { CSS3DObject as Xo } from "three/examples/jsm/renderers/CSS3DRenderer";
30
30
  import "three/examples/jsm/utils/BufferGeometryUtils";
31
31
  import { FullScreenQuad as wi } from "three/examples/jsm/postprocessing/Pass";
32
- import { SAH as Xo, MeshBVH as Jo, FloatVertexAttributeTexture as $o, MeshBVHUniformStruct as ea, UIntVertexAttributeTexture as ta, BVHShaderGLSL as us } from "three-mesh-bvh";
32
+ import { SAH as Jo, MeshBVH as $o, FloatVertexAttributeTexture as ea, MeshBVHUniformStruct as ta, UIntVertexAttributeTexture as ia, BVHShaderGLSL as us } from "three-mesh-bvh";
33
33
  import { FullScreenQuad as Ht } from "three/examples/jsm/postprocessing/Pass.js";
34
34
  function Fn(a, e, t = 0) {
35
35
  if (a.isInterleavedBufferAttribute) {
@@ -55,7 +55,7 @@ function kt(a, e) {
55
55
  const t = a.count === e.count, i = a.normalized === e.normalized, s = a.array.constructor === e.array.constructor, r = a.itemSize === e.itemSize;
56
56
  return !(!t || !i || !s || !r);
57
57
  }
58
- function ia(a) {
58
+ function sa(a) {
59
59
  const e = a[0].index !== null, t = new Set(Object.keys(a[0].attributes));
60
60
  if (!a[0].getAttribute("position"))
61
61
  throw new Error("StaticGeometryGenerator: position attribute is required.");
@@ -73,34 +73,34 @@ function ia(a) {
73
73
  throw new Error("StaticGeometryGenerator: All geometries must have the same number of attributes.");
74
74
  }
75
75
  }
76
- function sa(a) {
76
+ function ra(a) {
77
77
  let e = 0;
78
78
  for (let t = 0, i = a.length; t < i; t++)
79
79
  e += a[t].getIndex().count;
80
80
  return e;
81
81
  }
82
- function ra(a) {
82
+ function na(a) {
83
83
  let e = 0;
84
84
  for (let t = 0, i = a.length; t < i; t++)
85
85
  e += a[t].getAttribute("position").count;
86
86
  return e;
87
87
  }
88
- function na(a, e, t) {
88
+ function oa(a, e, t) {
89
89
  a.index && a.index.count !== e && a.setIndex(null);
90
90
  const i = a.attributes;
91
91
  for (const s in i)
92
92
  i[s].count !== t && a.deleteAttribute(s);
93
93
  }
94
- function oa(a, e = {}, t = new re()) {
94
+ function aa(a, e = {}, t = new re()) {
95
95
  const {
96
96
  useGroups: i = !1,
97
97
  forceUpdate: s = !1,
98
98
  skipAssigningAttributes: r = [],
99
99
  overwriteIndex: o = !0
100
100
  } = e;
101
- ia(a);
102
- const c = a[0].index !== null, h = c ? sa(a) : -1, u = ra(a);
103
- if (na(t, h, u), i) {
101
+ sa(a);
102
+ const c = a[0].index !== null, h = c ? ra(a) : -1, u = na(a);
103
+ if (oa(t, h, u), i) {
104
104
  let n = 0;
105
105
  for (let l = 0, f = a.length; l < f; l++) {
106
106
  const m = a[l];
@@ -138,7 +138,7 @@ function oa(a, e = {}, t = new re()) {
138
138
  }
139
139
  }
140
140
  }
141
- function aa(a, e, t) {
141
+ function la(a, e, t) {
142
142
  const i = a.index, r = a.attributes.position.count, o = i ? i.count : r;
143
143
  let c = a.groups;
144
144
  c.length === 0 && (c = [{ count: o, start: 0, materialIndex: 0 }]);
@@ -156,7 +156,7 @@ function aa(a, e, t) {
156
156
  }
157
157
  }
158
158
  }
159
- function la(a, e) {
159
+ function ca(a, e) {
160
160
  if (!a.index) {
161
161
  const t = a.attributes.position.count, i = new Array(t);
162
162
  for (let s = 0; s < t; s++)
@@ -209,7 +209,7 @@ function Mr(a) {
209
209
  const e = a.skeleton;
210
210
  return e ? (e.boneTexture || e.computeBoneTexture(), `${lr(e.boneTexture.image.data.buffer)}_${e.boneTexture.uuid}`) : null;
211
211
  }
212
- class ca {
212
+ class ha {
213
213
  constructor(e = null) {
214
214
  this.matrixWorld = new te(), this.geometryHash = null, this.skeletonHash = null, this.primitiveCount = -1, e !== null && this.updateFrom(e);
215
215
  }
@@ -222,15 +222,15 @@ class ca {
222
222
  return !(this.matrixWorld.equals(e.matrixWorld) && this.geometryHash === Sr(t) && this.skeletonHash === Mr(e) && this.primitiveCount === i);
223
223
  }
224
224
  }
225
- const ft = /* @__PURE__ */ new b(), dt = /* @__PURE__ */ new b(), pt = /* @__PURE__ */ new b(), Cr = /* @__PURE__ */ new ht(), bi = /* @__PURE__ */ new b(), fs = /* @__PURE__ */ new b(), Ir = /* @__PURE__ */ new ht(), Pr = /* @__PURE__ */ new ht(), Ai = /* @__PURE__ */ new te(), Dr = /* @__PURE__ */ new te();
225
+ const ft = /* @__PURE__ */ new b(), dt = /* @__PURE__ */ new b(), pt = /* @__PURE__ */ new b(), Cr = /* @__PURE__ */ new ht(), bi = /* @__PURE__ */ new b(), fs = /* @__PURE__ */ new b(), Ir = /* @__PURE__ */ new ht(), Dr = /* @__PURE__ */ new ht(), Ai = /* @__PURE__ */ new te(), Pr = /* @__PURE__ */ new te();
226
226
  function Er(a, e, t) {
227
227
  const i = a.skeleton, s = a.geometry, r = i.bones, o = i.boneInverses;
228
- Ir.fromBufferAttribute(s.attributes.skinIndex, e), Pr.fromBufferAttribute(s.attributes.skinWeight, e), Ai.elements.fill(0);
228
+ Ir.fromBufferAttribute(s.attributes.skinIndex, e), Dr.fromBufferAttribute(s.attributes.skinWeight, e), Ai.elements.fill(0);
229
229
  for (let c = 0; c < 4; c++) {
230
- const h = Pr.getComponent(c);
230
+ const h = Dr.getComponent(c);
231
231
  if (h !== 0) {
232
232
  const u = Ir.getComponent(c);
233
- Dr.multiplyMatrices(r[u].matrixWorld, o[u]), ha(Ai, Dr, h);
233
+ Pr.multiplyMatrices(r[u].matrixWorld, o[u]), ua(Ai, Pr, h);
234
234
  }
235
235
  }
236
236
  return Ai.multiply(a.bindMatrix).premultiply(a.bindMatrixInverse), t.transformDirection(Ai), t;
@@ -243,12 +243,12 @@ function ds(a, e, t, i, s) {
243
243
  }
244
244
  s.add(bi);
245
245
  }
246
- function ha(a, e, t) {
246
+ function ua(a, e, t) {
247
247
  const i = a.elements, s = e.elements;
248
248
  for (let r = 0, o = s.length; r < o; r++)
249
249
  i[r] += s[r] * t;
250
250
  }
251
- function ua(a) {
251
+ function fa(a) {
252
252
  const { index: e, attributes: t } = a;
253
253
  if (e)
254
254
  for (let i = 0, s = e.count; i < s; i += 3) {
@@ -266,7 +266,7 @@ function ua(a) {
266
266
  }
267
267
  return a;
268
268
  }
269
- function fa(a, e = {}, t = new re()) {
269
+ function da(a, e = {}, t = new re()) {
270
270
  e = {
271
271
  applyWorldTransforms: !0,
272
272
  attributes: [],
@@ -284,11 +284,11 @@ function fa(a, e = {}, t = new re()) {
284
284
  const y = e.attributes[v];
285
285
  y === "position" || y === "tangent" || y === "normal" || !(y in c) || (h[y] || t.setAttribute(y, ai(c[y])), kt(c[y], h[y]), Fn(c[y], h[y]));
286
286
  }
287
- return a.matrixWorld.determinant() < 0 && ua(t), t;
287
+ return a.matrixWorld.determinant() < 0 && fa(t), t;
288
288
  }
289
- class da extends re {
289
+ class pa extends re {
290
290
  constructor() {
291
- super(), this.version = 0, this.hash = null, this._diff = new ca();
291
+ super(), this.version = 0, this.hash = null, this._diff = new ha();
292
292
  }
293
293
  // returns whether the passed mesh is compatible with this baked geometry
294
294
  // such that it can be updated without resizing attributes
@@ -303,17 +303,17 @@ class da extends re {
303
303
  }
304
304
  updateFrom(e, t) {
305
305
  const i = this._diff;
306
- return i.didChange(e) ? (fa(e, t, this), i.updateFrom(e), this.version++, this.hash = `${this.uuid}_${this.version}`, !0) : !1;
306
+ return i.didChange(e) ? (da(e, t, this), i.updateFrom(e), this.version++, this.hash = `${this.uuid}_${this.version}`, !0) : !1;
307
307
  }
308
308
  }
309
309
  const Vs = 0, Bn = 1, On = 2;
310
- function pa(a, e) {
310
+ function ma(a, e) {
311
311
  for (let t = 0, i = a.length; t < i; t++)
312
312
  a[t].traverseVisible((r) => {
313
313
  r.isMesh && e(r);
314
314
  });
315
315
  }
316
- function ma(a) {
316
+ function ga(a) {
317
317
  const e = [];
318
318
  for (let t = 0, i = a.length; t < i; t++) {
319
319
  const s = a[t];
@@ -321,7 +321,7 @@ function ma(a) {
321
321
  }
322
322
  return e;
323
323
  }
324
- function ga(a, e, t) {
324
+ function _a(a, e, t) {
325
325
  if (a.length === 0) {
326
326
  e.setIndex(null);
327
327
  const i = e.attributes;
@@ -330,11 +330,11 @@ function ga(a, e, t) {
330
330
  for (const s in t.attributes)
331
331
  e.setAttribute(t.attributes[s], new ve(new Float32Array(0), 4, !1));
332
332
  } else
333
- oa(a, t, e);
333
+ aa(a, t, e);
334
334
  for (const i in e.attributes)
335
335
  e.attributes[i].needsUpdate = !0;
336
336
  }
337
- class _a {
337
+ class va {
338
338
  constructor(e) {
339
339
  this.objects = null, this.useGroups = !0, this.applyWorldTransforms = !0, this.generateMissingAttributes = !0, this.overwriteIndex = !0, this.attributes = ["position", "normal", "color", "tangent", "uv", "uv2"], this._intermediateGeometry = /* @__PURE__ */ new Map(), this._geometryMergeSets = /* @__PURE__ */ new WeakMap(), this._mergeOrder = [], this._dummyMesh = null, this.setObjects(e || []);
340
340
  }
@@ -347,7 +347,7 @@ class _a {
347
347
  }
348
348
  _getMeshes() {
349
349
  const e = [];
350
- return pa(this.objects, (t) => {
350
+ return ma(this.objects, (t) => {
351
351
  e.push(t);
352
352
  }), e.sort((t, i) => t.uuid > i.uuid ? 1 : t.uuid < i.uuid ? -1 : 0), e.length === 0 && e.push(this._getDummyMesh()), e;
353
353
  }
@@ -360,7 +360,7 @@ class _a {
360
360
  const c = t[r], h = c.uuid;
361
361
  i.delete(h);
362
362
  let u = e.get(h);
363
- (!u || !u.isCompatible(c, this.attributes)) && (u && u.dispose(), u = new da(), e.set(h, u)), u.updateFrom(c, s) && this.generateMissingAttributes && la(u, this.attributes);
363
+ (!u || !u.isCompatible(c, this.attributes)) && (u && u.dispose(), u = new pa(), e.set(h, u)), u.updateFrom(c, s) && this.generateMissingAttributes && ca(u, this.attributes);
364
364
  }
365
365
  i.forEach((r) => {
366
366
  e.delete(r);
@@ -380,19 +380,19 @@ class _a {
380
380
  const p = u[l];
381
381
  !p || p.uuid !== _.uuid ? (c.push(!1), d = !0) : p.version !== _.version ? c.push(!1) : c.push(!0);
382
382
  }
383
- ga(h, e, { useGroups: t, forceUpdate: d, skipAssigningAttributes: c, overwriteIndex: i }), d && e.dispose(), r.set(e, h.map((l) => ({
383
+ _a(h, e, { useGroups: t, forceUpdate: d, skipAssigningAttributes: c, overwriteIndex: i }), d && e.dispose(), r.set(e, h.map((l) => ({
384
384
  version: l.version,
385
385
  uuid: l.uuid
386
386
  })));
387
387
  let n = Vs;
388
388
  return d ? n = On : c.includes(!1) && (n = Bn), {
389
389
  changeType: n,
390
- materials: ma(o),
390
+ materials: ga(o),
391
391
  geometry: e
392
392
  };
393
393
  }
394
394
  }
395
- function va(a) {
395
+ function ya(a) {
396
396
  const e = /* @__PURE__ */ new Set();
397
397
  for (let t = 0, i = a.length; t < i; t++) {
398
398
  const s = a[t];
@@ -403,7 +403,7 @@ function va(a) {
403
403
  }
404
404
  return Array.from(e);
405
405
  }
406
- function ya(a) {
406
+ function xa(a) {
407
407
  const e = [], t = /* @__PURE__ */ new Set();
408
408
  for (let s = 0, r = a.length; s < r; s++)
409
409
  a[s].traverse((o) => {
@@ -412,12 +412,12 @@ function ya(a) {
412
412
  const i = Array.from(t).sort((s, r) => s.uuid < r.uuid ? 1 : s.uuid > r.uuid ? -1 : 0);
413
413
  return { lights: e, iesTextures: i };
414
414
  }
415
- class xa {
415
+ class wa {
416
416
  get initialized() {
417
417
  return !!this.bvh;
418
418
  }
419
419
  constructor(e) {
420
- this.bvhOptions = {}, this.attributes = ["position", "normal", "tangent", "color", "uv", "uv2"], this.generateBVH = !0, this.bvh = null, this.geometry = new re(), this.staticGeometryGenerator = new _a(e), this._bvhWorker = null, this._pendingGenerate = null, this._buildAsync = !1;
420
+ this.bvhOptions = {}, this.attributes = ["position", "normal", "tangent", "color", "uv", "uv2"], this.generateBVH = !0, this.bvh = null, this.geometry = new re(), this.staticGeometryGenerator = new va(e), this._bvhWorker = null, this._pendingGenerate = null, this._buildAsync = !1;
421
421
  }
422
422
  setObjects(e) {
423
423
  this.staticGeometryGenerator.setObjects(e);
@@ -443,19 +443,19 @@ class xa {
443
443
  l.isSkinnedMesh && l.skeleton && l.skeleton.update();
444
444
  });
445
445
  });
446
- const o = t.generate(i), c = o.materials, h = va(c), { lights: u, iesTextures: d } = ya(r);
447
- if (o.changeType !== Vs && aa(i, c, c), this.generateBVH) {
446
+ const o = t.generate(i), c = o.materials, h = ya(c), { lights: u, iesTextures: d } = xa(r);
447
+ if (o.changeType !== Vs && la(i, c, c), this.generateBVH) {
448
448
  if (this.bvh instanceof Promise)
449
449
  throw new Error("PathTracingSceneGenerator: BVH is already building asynchronously.");
450
450
  if (o.changeType === On) {
451
451
  const n = {
452
- strategy: Xo,
452
+ strategy: Jo,
453
453
  maxLeafTris: 1,
454
454
  indirect: !0,
455
455
  onProgress: e,
456
456
  ...this.bvhOptions
457
457
  };
458
- this._buildAsync ? this.bvh = this._bvhWorker.generate(i, n) : this.bvh = new Jo(i, n);
458
+ this._buildAsync ? this.bvh = this._bvhWorker.generate(i, n) : this.bvh = new $o(i, n);
459
459
  } else
460
460
  o.changeType === Bn && this.bvh.refit();
461
461
  }
@@ -499,7 +499,7 @@ class cr extends Gt {
499
499
  return !1;
500
500
  }
501
501
  }
502
- class wa extends cr {
502
+ class ba extends cr {
503
503
  constructor(e) {
504
504
  super({
505
505
  blending: di,
@@ -645,7 +645,7 @@ const zn = (
645
645
  }
646
646
 
647
647
  `
648
- ), ba = (
648
+ ), Aa = (
649
649
  /* glsl */
650
650
  `
651
651
 
@@ -726,7 +726,7 @@ const zn = (
726
726
  }
727
727
 
728
728
  `
729
- ), Aa = (
729
+ ), Ta = (
730
730
  /* glsl */
731
731
  `
732
732
 
@@ -773,7 +773,7 @@ const zn = (
773
773
 
774
774
  `
775
775
  );
776
- class Ta extends cr {
776
+ class Sa extends cr {
777
777
  constructor() {
778
778
  super({
779
779
  blending: di,
@@ -798,7 +798,7 @@ class Ta extends cr {
798
798
  `
799
799
 
800
800
  ${zn}
801
- ${ba}
801
+ ${Aa}
802
802
 
803
803
  varying vec2 vUv;
804
804
  uniform vec2 resolution;
@@ -813,7 +813,7 @@ class Ta extends cr {
813
813
  });
814
814
  }
815
815
  }
816
- class Sa {
816
+ class Ma {
817
817
  generate(e, t = 256) {
818
818
  const i = new je(t, t, {
819
819
  type: xe,
@@ -823,11 +823,11 @@ class Sa {
823
823
  generateMipmaps: !1
824
824
  }), s = e.getRenderTarget();
825
825
  e.setRenderTarget(i);
826
- const r = new Ht(new Ta());
826
+ const r = new Ht(new Sa());
827
827
  return r.material.resolution.set(t, t), r.render(e), e.setRenderTarget(s), r.dispose(), i;
828
828
  }
829
829
  }
830
- class Ma extends ss {
830
+ class Ca extends ss {
831
831
  set bokehSize(e) {
832
832
  this.fStop = this.getFocalLength() / e;
833
833
  }
@@ -841,12 +841,12 @@ class Ma extends ss {
841
841
  return super.copy(e, t), this.fStop = e.fStop, this.apertureBlades = e.apertureBlades, this.apertureRotation = e.apertureRotation, this.focusDistance = e.focusDistance, this.anamorphicRatio = e.anamorphicRatio, this;
842
842
  }
843
843
  }
844
- class Ca {
844
+ class Ia {
845
845
  constructor() {
846
846
  this.bokehSize = 0, this.apertureBlades = 0, this.apertureRotation = 0, this.focusDistance = 10, this.anamorphicRatio = 1;
847
847
  }
848
848
  updateFrom(e) {
849
- e instanceof Ma ? (this.bokehSize = e.bokehSize, this.apertureBlades = e.apertureBlades, this.apertureRotation = e.apertureRotation, this.focusDistance = e.focusDistance, this.anamorphicRatio = e.anamorphicRatio) : (this.bokehSize = 0, this.apertureRotation = 0, this.apertureBlades = 0, this.focusDistance = 10, this.anamorphicRatio = 1);
849
+ e instanceof Ca ? (this.bokehSize = e.bokehSize, this.apertureBlades = e.apertureBlades, this.apertureRotation = e.apertureRotation, this.focusDistance = e.focusDistance, this.anamorphicRatio = e.anamorphicRatio) : (this.bokehSize = 0, this.apertureRotation = 0, this.apertureBlades = 0, this.focusDistance = 10, this.anamorphicRatio = 1);
850
850
  }
851
851
  }
852
852
  function ps(a) {
@@ -863,21 +863,21 @@ function Rr(a, e, t = 0, i = a.length) {
863
863
  }
864
864
  return s - t;
865
865
  }
866
- function Ia(a, e, t) {
866
+ function Da(a, e, t) {
867
867
  return 0.2126 * a + 0.7152 * e + 0.0722 * t;
868
868
  }
869
- function Pa(a, e = Pe) {
869
+ function Pa(a, e = De) {
870
870
  const t = a.clone();
871
871
  t.source = new po({ ...t.image });
872
872
  const { width: i, height: s, data: r } = t.image;
873
873
  let o = r;
874
874
  if (t.type !== e) {
875
- e === Pe ? o = new Uint16Array(r.length) : o = new Float32Array(r.length);
875
+ e === De ? o = new Uint16Array(r.length) : o = new Float32Array(r.length);
876
876
  let c;
877
877
  r instanceof Int8Array || r instanceof Int16Array || r instanceof Int32Array ? c = 2 ** (8 * r.BYTES_PER_ELEMENT - 1) - 1 : c = 2 ** (8 * r.BYTES_PER_ELEMENT) - 1;
878
878
  for (let h = 0, u = r.length; h < u; h++) {
879
879
  let d = r[h];
880
- t.type === Pe && (d = Ge.fromHalfFloat(r[h])), t.type !== xe && t.type !== Pe && (d /= c), e === Pe && (o[h] = Ge.toHalfFloat(d));
880
+ t.type === De && (d = Ge.fromHalfFloat(r[h])), t.type !== xe && t.type !== De && (d /= c), e === De && (o[h] = Ge.toHalfFloat(d));
881
881
  }
882
882
  t.image.data = o, t.type = e;
883
883
  }
@@ -893,14 +893,14 @@ function Pa(a, e = Pe) {
893
893
  }
894
894
  return t;
895
895
  }
896
- class Da {
896
+ class Ea {
897
897
  constructor() {
898
898
  const e = new qe(ps(new Float32Array([0, 0, 0, 0])), 1, 1);
899
- e.type = Pe, e.format = le, e.minFilter = Ie, e.magFilter = Ie, e.wrapS = ct, e.wrapT = ct, e.generateMipmaps = !1, e.needsUpdate = !0;
899
+ e.type = De, e.format = le, e.minFilter = Ie, e.magFilter = Ie, e.wrapS = ct, e.wrapT = ct, e.generateMipmaps = !1, e.needsUpdate = !0;
900
900
  const t = new qe(ps(new Float32Array([0, 1])), 1, 2);
901
- t.type = Pe, t.format = Fs, t.minFilter = Ie, t.magFilter = Ie, t.generateMipmaps = !1, t.needsUpdate = !0;
901
+ t.type = De, t.format = Fs, t.minFilter = Ie, t.magFilter = Ie, t.generateMipmaps = !1, t.needsUpdate = !0;
902
902
  const i = new qe(ps(new Float32Array([0, 0, 1, 1])), 2, 2);
903
- i.type = Pe, i.format = Fs, i.minFilter = Ie, i.magFilter = Ie, i.generateMipmaps = !1, i.needsUpdate = !0, this.map = e, this.marginalWeights = t, this.conditionalWeights = i, this.totalSum = 0;
903
+ i.type = De, i.format = Fs, i.minFilter = Ie, i.magFilter = Ie, i.generateMipmaps = !1, i.needsUpdate = !0, this.map = e, this.marginalWeights = t, this.conditionalWeights = i, this.totalSum = 0;
904
904
  }
905
905
  dispose() {
906
906
  this.marginalWeights.dispose(), this.conditionalWeights.dispose(), this.map.dispose();
@@ -913,7 +913,7 @@ class Da {
913
913
  for (let p = 0; p < s; p++) {
914
914
  let g = 0;
915
915
  for (let v = 0; v < i; v++) {
916
- const y = p * i + v, x = Ge.fromHalfFloat(r[4 * y + 0]), w = Ge.fromHalfFloat(r[4 * y + 1]), T = Ge.fromHalfFloat(r[4 * y + 2]), M = Ia(x, w, T);
916
+ const y = p * i + v, x = Ge.fromHalfFloat(r[4 * y + 0]), w = Ge.fromHalfFloat(r[4 * y + 1]), T = Ge.fromHalfFloat(r[4 * y + 2]), M = Da(x, w, T);
917
917
  g += M, d += M, o[y] = M, c[y] = g;
918
918
  }
919
919
  if (g !== 0)
@@ -939,8 +939,8 @@ class Da {
939
939
  m.image = { width: s, height: 1, data: l }, m.needsUpdate = !0, _.image = { width: i, height: s, data: f }, _.needsUpdate = !0, this.totalSum = d, this.map = t;
940
940
  }
941
941
  }
942
- const ms = 6, Ea = 0, Ra = 1, La = 2, ka = 3, Fa = 4, Se = new b(), de = new b(), Lr = new te(), wt = new ee(), kr = new b(), bt = new b(), Ba = new b(0, 1, 0);
943
- class Oa {
942
+ const ms = 6, Ra = 0, La = 1, ka = 2, Fa = 3, Ba = 4, Se = new b(), de = new b(), Lr = new te(), wt = new ee(), kr = new b(), bt = new b(), Oa = new b(0, 1, 0);
943
+ class za {
944
944
  constructor() {
945
945
  const e = new qe(new Float32Array(4), 1, 1);
946
946
  e.format = le, e.type = xe, e.wrapS = Ze, e.wrapT = Ze, e.generateMipmaps = !1, e.minFilter = ae, e.magFilter = ae, this.tex = e, this.count = 0;
@@ -955,12 +955,12 @@ class Oa {
955
955
  for (let m = 0; m < ms * 4; m++)
956
956
  o[n + m] = 0;
957
957
  d.getWorldPosition(de), o[n + l++] = de.x, o[n + l++] = de.y, o[n + l++] = de.z;
958
- let f = Ea;
959
- if (d.isRectAreaLight && d.isCircular ? f = Ra : d.isSpotLight ? f = La : d.isDirectionalLight ? f = ka : d.isPointLight && (f = Fa), o[n + l++] = f, o[n + l++] = d.color.r, o[n + l++] = d.color.g, o[n + l++] = d.color.b, o[n + l++] = d.intensity, d.getWorldQuaternion(wt), d.isRectAreaLight)
958
+ let f = Ra;
959
+ if (d.isRectAreaLight && d.isCircular ? f = La : d.isSpotLight ? f = ka : d.isDirectionalLight ? f = Fa : d.isPointLight && (f = Ba), o[n + l++] = f, o[n + l++] = d.color.r, o[n + l++] = d.color.g, o[n + l++] = d.color.b, o[n + l++] = d.intensity, d.getWorldQuaternion(wt), d.isRectAreaLight)
960
960
  Se.set(d.width, 0, 0).applyQuaternion(wt), o[n + l++] = Se.x, o[n + l++] = Se.y, o[n + l++] = Se.z, l++, de.set(0, d.height, 0).applyQuaternion(wt), o[n + l++] = de.x, o[n + l++] = de.y, o[n + l++] = de.z, o[n + l++] = Se.cross(de).length() * (d.isCircular ? Math.PI / 4 : 1);
961
961
  else if (d.isSpotLight) {
962
962
  const m = d.radius || 0;
963
- kr.setFromMatrixPosition(d.matrixWorld), bt.setFromMatrixPosition(d.target.matrixWorld), Lr.lookAt(kr, bt, Ba), wt.setFromRotationMatrix(Lr), Se.set(1, 0, 0).applyQuaternion(wt), o[n + l++] = Se.x, o[n + l++] = Se.y, o[n + l++] = Se.z, l++, de.set(0, 1, 0).applyQuaternion(wt), o[n + l++] = de.x, o[n + l++] = de.y, o[n + l++] = de.z, o[n + l++] = Math.PI * m * m, o[n + l++] = m, o[n + l++] = d.decay, o[n + l++] = d.distance, o[n + l++] = Math.cos(d.angle), o[n + l++] = Math.cos(d.angle * (1 - d.penumbra)), o[n + l++] = d.iesMap ? t.indexOf(d.iesMap) : -1;
963
+ kr.setFromMatrixPosition(d.matrixWorld), bt.setFromMatrixPosition(d.target.matrixWorld), Lr.lookAt(kr, bt, Oa), wt.setFromRotationMatrix(Lr), Se.set(1, 0, 0).applyQuaternion(wt), o[n + l++] = Se.x, o[n + l++] = Se.y, o[n + l++] = Se.z, l++, de.set(0, 1, 0).applyQuaternion(wt), o[n + l++] = de.x, o[n + l++] = de.y, o[n + l++] = de.z, o[n + l++] = Math.PI * m * m, o[n + l++] = m, o[n + l++] = d.decay, o[n + l++] = d.distance, o[n + l++] = Math.cos(d.angle), o[n + l++] = Math.cos(d.angle * (1 - d.penumbra)), o[n + l++] = d.iesMap ? t.indexOf(d.iesMap) : -1;
964
964
  } else if (d.isPointLight) {
965
965
  const m = Se.setFromMatrixPosition(d.matrixWorld);
966
966
  o[n + l++] = m.x, o[n + l++] = m.y, o[n + l++] = m.z, l++, l += 4, l += 1, o[n + l++] = d.decay, o[n + l++] = d.distance;
@@ -997,7 +997,7 @@ function Fr(a, e, t, i, s) {
997
997
  t[s + u + n] = e >= n + 1 ? a[d + n] / c : 0;
998
998
  }
999
999
  }
1000
- class za extends mo {
1000
+ class Wa extends mo {
1001
1001
  constructor() {
1002
1002
  super(), this._textures = [], this.type = xe, this.format = le, this.internalFormat = "RGBA32F";
1003
1003
  }
@@ -1018,7 +1018,7 @@ class za extends mo {
1018
1018
  throw new Error("FloatAttributeTextureArray: All attributes must have the same item count.");
1019
1019
  const s = this._textures;
1020
1020
  for (; s.length < i; ) {
1021
- const n = new $o();
1021
+ const n = new ea();
1022
1022
  s.push(n);
1023
1023
  }
1024
1024
  for (; s.length > i; )
@@ -1036,7 +1036,7 @@ class za extends mo {
1036
1036
  this.dispose(), this.needsUpdate = !0;
1037
1037
  }
1038
1038
  }
1039
- class Wa extends za {
1039
+ class Ua extends Wa {
1040
1040
  updateNormalAttribute(e) {
1041
1041
  this.updateAttribute(0, e);
1042
1042
  }
@@ -1059,7 +1059,7 @@ function hr(a, e) {
1059
1059
  function Gs(a) {
1060
1060
  return `${a.source.uuid}:${a.colorSpace}`;
1061
1061
  }
1062
- function Ua(a) {
1062
+ function Ha(a) {
1063
1063
  const e = /* @__PURE__ */ new Set(), t = [];
1064
1064
  for (let i = 0, s = a.length; i < s; i++) {
1065
1065
  const r = a[i], o = Gs(r);
@@ -1067,11 +1067,11 @@ function Ua(a) {
1067
1067
  }
1068
1068
  return t;
1069
1069
  }
1070
- function Ha(a) {
1070
+ function Na(a) {
1071
1071
  const e = a.map((i) => i.iesMap || null).filter((i) => i), t = new Set(e);
1072
1072
  return Array.from(t).sort(hr);
1073
1073
  }
1074
- function Na(a) {
1074
+ function Va(a) {
1075
1075
  const e = /* @__PURE__ */ new Set();
1076
1076
  for (let i = 0, s = a.length; i < s; i++) {
1077
1077
  const r = a[i];
@@ -1081,16 +1081,16 @@ function Na(a) {
1081
1081
  }
1082
1082
  }
1083
1083
  const t = Array.from(e);
1084
- return Ua(t).sort(hr);
1084
+ return Ha(t).sort(hr);
1085
1085
  }
1086
- function Va(a) {
1086
+ function Ga(a) {
1087
1087
  const e = [];
1088
1088
  return a.traverse((t) => {
1089
1089
  t.visible && (t.isRectAreaLight || t.isSpotLight || t.isPointLight || t.isDirectionalLight) && e.push(t);
1090
1090
  }), e.sort(hr);
1091
1091
  }
1092
1092
  const Wn = 45, Br = Wn * 4;
1093
- class Ga {
1093
+ class Qa {
1094
1094
  constructor() {
1095
1095
  this._features = {};
1096
1096
  }
@@ -1104,9 +1104,9 @@ class Ga {
1104
1104
  this._features = {};
1105
1105
  }
1106
1106
  }
1107
- class Qa extends qe {
1107
+ class ja extends qe {
1108
1108
  constructor() {
1109
- super(new Float32Array(4), 1, 1), this.format = le, this.type = xe, this.wrapS = Ze, this.wrapT = Ze, this.minFilter = ae, this.magFilter = ae, this.generateMipmaps = !1, this.features = new Ga();
1109
+ super(new Float32Array(4), 1, 1), this.format = le, this.type = xe, this.wrapS = Ze, this.wrapT = Ze, this.minFilter = ae, this.magFilter = ae, this.generateMipmaps = !1, this.features = new Qa();
1110
1110
  }
1111
1111
  updateFrom(e, t) {
1112
1112
  function i(m, _, p = -1) {
@@ -1156,7 +1156,7 @@ class Qa extends qe {
1156
1156
  case Bs:
1157
1157
  l[o++] = 1;
1158
1158
  break;
1159
- case Pn:
1159
+ case Dn:
1160
1160
  l[o++] = -1;
1161
1161
  break;
1162
1162
  case gi:
@@ -1170,10 +1170,10 @@ class Qa extends qe {
1170
1170
  }
1171
1171
  }
1172
1172
  const Or = new X();
1173
- function ja(a) {
1173
+ function qa(a) {
1174
1174
  return a ? `${a.uuid}:${a.version}` : null;
1175
1175
  }
1176
- function qa(a, e) {
1176
+ function Ya(a, e) {
1177
1177
  for (const t in e)
1178
1178
  t in a && (a[t] = e[t]);
1179
1179
  }
@@ -1189,10 +1189,10 @@ class zr extends go {
1189
1189
  generateMipmaps: !1,
1190
1190
  ...i
1191
1191
  };
1192
- super(e, t, 1, s), qa(this.texture, s), this.texture.setTextures = (...o) => {
1192
+ super(e, t, 1, s), Ya(this.texture, s), this.texture.setTextures = (...o) => {
1193
1193
  this.setTextures(...o);
1194
1194
  }, this.hashes = [null];
1195
- const r = new Ht(new Ya());
1195
+ const r = new Ht(new Ka());
1196
1196
  this.fsQuad = r;
1197
1197
  }
1198
1198
  setTextures(e, t, i = this.width, s = this.height) {
@@ -1203,7 +1203,7 @@ class zr extends go {
1203
1203
  const u = this.fsQuad, d = this.hashes;
1204
1204
  let n = !1;
1205
1205
  for (let l = 0, f = h; l < f; l++) {
1206
- const m = t[l], _ = ja(m);
1206
+ const m = t[l], _ = qa(m);
1207
1207
  m && (d[l] !== _ || m.isWebGLRenderTarget) && (m.matrixAutoUpdate = !1, m.matrix.identity(), u.material.map = m, e.setRenderTarget(this, l), u.render(e), m.updateMatrix(), m.matrixAutoUpdate = !0, d[l] = _, n = !0);
1208
1208
  }
1209
1209
  return u.material.map = null, e.setClearColor(Or, c), e.setRenderTarget(r), e.toneMapping = o, n;
@@ -1212,7 +1212,7 @@ class zr extends go {
1212
1212
  super.dispose(), this.fsQuad.dispose();
1213
1213
  }
1214
1214
  }
1215
- class Ya extends Gt {
1215
+ class Ka extends Gt {
1216
1216
  get map() {
1217
1217
  return this.uniforms.map.value;
1218
1218
  }
@@ -1251,14 +1251,14 @@ class Ya extends Gt {
1251
1251
  });
1252
1252
  }
1253
1253
  }
1254
- function Ka(a, e = Math.random()) {
1254
+ function Za(a, e = Math.random()) {
1255
1255
  for (let t = a.length - 1; t > 0; t--) {
1256
1256
  const i = Math.floor(e() * (t + 1)), s = a[t];
1257
1257
  a[t] = a[i], a[i] = s;
1258
1258
  }
1259
1259
  return a;
1260
1260
  }
1261
- class Za {
1261
+ class Xa {
1262
1262
  constructor(e, t, i = Math.random) {
1263
1263
  const s = e ** t, r = new Uint16Array(s);
1264
1264
  let o = s;
@@ -1272,7 +1272,7 @@ class Za {
1272
1272
  o = 0;
1273
1273
  }, this.next = function() {
1274
1274
  const { samples: c } = this;
1275
- o >= r.length && (Ka(r, i), this.reshuffle());
1275
+ o >= r.length && (Za(r, i), this.reshuffle());
1276
1276
  let h = r[o++];
1277
1277
  for (let u = 0; u < t; u++)
1278
1278
  c[u] = (h % e + i()) / e, h = Math.floor(h / e);
@@ -1280,7 +1280,7 @@ class Za {
1280
1280
  };
1281
1281
  }
1282
1282
  }
1283
- class Xa {
1283
+ class Ja {
1284
1284
  constructor(e, t, i = Math.random) {
1285
1285
  let s = 0;
1286
1286
  for (const h of t)
@@ -1288,7 +1288,7 @@ class Xa {
1288
1288
  const r = new Float32Array(s), o = [];
1289
1289
  let c = 0;
1290
1290
  for (const h of t) {
1291
- const u = new Za(e, h, i);
1291
+ const u = new Xa(e, h, i);
1292
1292
  u.samples = new Float32Array(r.buffer, c, u.samples.length), c += u.samples.length * 4, o.push(u);
1293
1293
  }
1294
1294
  this.samples = r, this.strataCount = e, this.next = function() {
@@ -1304,7 +1304,7 @@ class Xa {
1304
1304
  };
1305
1305
  }
1306
1306
  }
1307
- class Ja {
1307
+ class $a {
1308
1308
  constructor(e = 0) {
1309
1309
  this.m = 2147483648, this.a = 1103515245, this.c = 12345, this.seed = e;
1310
1310
  }
@@ -1315,15 +1315,15 @@ class Ja {
1315
1315
  return this.nextInt() / (this.m - 1);
1316
1316
  }
1317
1317
  }
1318
- class $a extends qe {
1318
+ class el extends qe {
1319
1319
  constructor(e = 1, t = 1, i = 8) {
1320
- super(new Float32Array(1), 1, 1, le, xe), this.minFilter = ae, this.magFilter = ae, this.strata = i, this.sampler = null, this.generator = new Ja(), this.stableNoise = !1, this.random = () => this.stableNoise ? this.generator.nextFloat() : Math.random(), this.init(e, t, i);
1320
+ super(new Float32Array(1), 1, 1, le, xe), this.minFilter = ae, this.magFilter = ae, this.strata = i, this.sampler = null, this.generator = new $a(), this.stableNoise = !1, this.random = () => this.stableNoise ? this.generator.nextFloat() : Math.random(), this.init(e, t, i);
1321
1321
  }
1322
1322
  init(e = this.image.height, t = this.image.width, i = this.strata) {
1323
1323
  const { image: s } = this;
1324
1324
  if (s.width === t && s.height === e && this.sampler !== null)
1325
1325
  return;
1326
- const r = new Array(e * t).fill(4), o = new Xa(i, r, this.random);
1326
+ const r = new Array(e * t).fill(4), o = new Ja(i, r, this.random);
1327
1327
  s.width = t, s.height = e, s.data = o.samples, this.sampler = o, this.dispose(), this.next();
1328
1328
  }
1329
1329
  next() {
@@ -1333,13 +1333,13 @@ class $a extends qe {
1333
1333
  this.sampler.reset(), this.generator.seed = 0;
1334
1334
  }
1335
1335
  }
1336
- function el(a, e = Math.random) {
1336
+ function tl(a, e = Math.random) {
1337
1337
  for (let t = a.length - 1; t > 0; t--) {
1338
1338
  const i = ~~((e() - 1e-6) * t), s = a[t];
1339
1339
  a[t] = a[i], a[i] = s;
1340
1340
  }
1341
1341
  }
1342
- function tl(a, e) {
1342
+ function il(a, e) {
1343
1343
  a.fill(0);
1344
1344
  for (let t = 0; t < e; t++)
1345
1345
  a[t] = 1;
@@ -1421,7 +1421,7 @@ class Wr {
1421
1421
  this.resize(e.size), this.score.set(e.score), this.binaryPattern.set(e.binaryPattern), this.setSigma(e.sigma), this.count = e.count;
1422
1422
  }
1423
1423
  }
1424
- class il {
1424
+ class sl {
1425
1425
  constructor() {
1426
1426
  this.random = Math.random, this.sigma = 1.5, this.size = 64, this.majorityPointsRatio = 0.1, this.samples = new Wr(1), this.savedSamples = new Wr(1);
1427
1427
  }
@@ -1435,7 +1435,7 @@ class il {
1435
1435
  } = this;
1436
1436
  e.resize(r), e.setSigma(i);
1437
1437
  const o = Math.floor(r * r * s), c = e.binaryPattern;
1438
- tl(c, o), el(c, this.random);
1438
+ il(c, o), tl(c, this.random);
1439
1439
  for (let n = 0, l = c.length; n < l; n++)
1440
1440
  c[n] === 1 && e.addPointIndex(n);
1441
1441
  for (; ; ) {
@@ -1467,10 +1467,10 @@ class il {
1467
1467
  return { data: h, maxValue: d };
1468
1468
  }
1469
1469
  }
1470
- function sl(a) {
1470
+ function rl(a) {
1471
1471
  return a >= 3 ? 4 : a;
1472
1472
  }
1473
- function rl(a) {
1473
+ function nl(a) {
1474
1474
  switch (a) {
1475
1475
  case 1:
1476
1476
  return Fs;
@@ -1480,14 +1480,14 @@ function rl(a) {
1480
1480
  return le;
1481
1481
  }
1482
1482
  }
1483
- class nl extends qe {
1483
+ class ol extends qe {
1484
1484
  constructor(e = 64, t = 1) {
1485
1485
  super(new Float32Array(4), 1, 1, le, xe), this.minFilter = ae, this.magFilter = ae, this.size = e, this.channels = t, this.update();
1486
1486
  }
1487
1487
  update() {
1488
- const e = this.channels, t = this.size, i = new il();
1488
+ const e = this.channels, t = this.size, i = new sl();
1489
1489
  i.channels = e, i.size = t;
1490
- const s = sl(e), r = rl(s);
1490
+ const s = rl(e), r = nl(s);
1491
1491
  (this.image.width !== t || r !== this.format) && (this.image.width = t, this.image.height = t, this.image.data = new Float32Array(t ** 2 * s), this.format = r, this.dispose());
1492
1492
  const o = this.image.data;
1493
1493
  for (let c = 0, h = e; c < h; c++) {
@@ -1500,7 +1500,7 @@ class nl extends qe {
1500
1500
  this.needsUpdate = !0;
1501
1501
  }
1502
1502
  }
1503
- const ol = (
1503
+ const al = (
1504
1504
  /* glsl */
1505
1505
  `
1506
1506
 
@@ -1515,7 +1515,7 @@ const ol = (
1515
1515
  };
1516
1516
 
1517
1517
  `
1518
- ), al = (
1518
+ ), ll = (
1519
1519
  /* glsl */
1520
1520
  `
1521
1521
 
@@ -1530,7 +1530,7 @@ const ol = (
1530
1530
  };
1531
1531
 
1532
1532
  `
1533
- ), ll = (
1533
+ ), cl = (
1534
1534
  /* glsl */
1535
1535
  `
1536
1536
 
@@ -1619,7 +1619,7 @@ const ol = (
1619
1619
  }
1620
1620
 
1621
1621
  `
1622
- ), cl = (
1622
+ ), hl = (
1623
1623
  /* glsl */
1624
1624
  `
1625
1625
 
@@ -1829,7 +1829,7 @@ const ol = (
1829
1829
  }
1830
1830
 
1831
1831
  `
1832
- ), hl = (
1832
+ ), ul = (
1833
1833
  /* glsl */
1834
1834
  `
1835
1835
 
@@ -1894,7 +1894,7 @@ const ol = (
1894
1894
  };
1895
1895
 
1896
1896
  `
1897
- ), ul = (
1897
+ ), fl = (
1898
1898
  /* glsl */
1899
1899
  `
1900
1900
 
@@ -1964,7 +1964,7 @@ const ol = (
1964
1964
 
1965
1965
  }
1966
1966
  `
1967
- ), fl = (
1967
+ ), dl = (
1968
1968
  /* glsl */
1969
1969
  `
1970
1970
 
@@ -2182,7 +2182,7 @@ const ol = (
2182
2182
  }
2183
2183
 
2184
2184
  `
2185
- ), dl = (
2185
+ ), pl = (
2186
2186
  /* glsl */
2187
2187
  `
2188
2188
 
@@ -2270,7 +2270,7 @@ const ol = (
2270
2270
 
2271
2271
 
2272
2272
  `
2273
- ), pl = (
2273
+ ), ml = (
2274
2274
  /* glsl */
2275
2275
  `
2276
2276
 
@@ -2376,7 +2376,7 @@ const ol = (
2376
2376
  }
2377
2377
 
2378
2378
  `
2379
- ), ml = (
2379
+ ), gl = (
2380
2380
  /* glsl */
2381
2381
  `
2382
2382
 
@@ -2459,7 +2459,7 @@ const ol = (
2459
2459
  }
2460
2460
 
2461
2461
  `
2462
- ), gl = (
2462
+ ), _l = (
2463
2463
  /* glsl */
2464
2464
  `
2465
2465
 
@@ -2523,7 +2523,7 @@ const ol = (
2523
2523
  }
2524
2524
 
2525
2525
  `
2526
- ), _l = (
2526
+ ), vl = (
2527
2527
  /*glsl */
2528
2528
  `
2529
2529
 
@@ -2726,7 +2726,7 @@ const ol = (
2726
2726
 
2727
2727
  }
2728
2728
  `
2729
- ), vl = (
2729
+ ), yl = (
2730
2730
  /* glsl */
2731
2731
  `
2732
2732
 
@@ -2778,7 +2778,7 @@ const ol = (
2778
2778
  }
2779
2779
 
2780
2780
  `
2781
- ), yl = (
2781
+ ), xl = (
2782
2782
  /* glsl */
2783
2783
  `
2784
2784
 
@@ -3219,7 +3219,7 @@ const ol = (
3219
3219
  }
3220
3220
 
3221
3221
  `
3222
- ), xl = (
3222
+ ), wl = (
3223
3223
  /* glsl */
3224
3224
  `
3225
3225
 
@@ -3243,7 +3243,7 @@ const ol = (
3243
3243
  }
3244
3244
 
3245
3245
  `
3246
- ), wl = (
3246
+ ), bl = (
3247
3247
  /* glsl */
3248
3248
  `
3249
3249
 
@@ -3347,7 +3347,7 @@ const ol = (
3347
3347
  }
3348
3348
 
3349
3349
  `
3350
- ), bl = (
3350
+ ), Al = (
3351
3351
  /* glsl */
3352
3352
  `
3353
3353
 
@@ -3484,7 +3484,7 @@ const ol = (
3484
3484
  }
3485
3485
 
3486
3486
  `
3487
- ), Al = (
3487
+ ), Tl = (
3488
3488
  /* glsl */
3489
3489
  `
3490
3490
 
@@ -3584,7 +3584,7 @@ const ol = (
3584
3584
  }
3585
3585
 
3586
3586
  `
3587
- ), Tl = (
3587
+ ), Sl = (
3588
3588
  /* glsl */
3589
3589
  `
3590
3590
 
@@ -3648,7 +3648,7 @@ bool bvhIntersectFogVolumeHit(
3648
3648
  }
3649
3649
 
3650
3650
  `
3651
- ), Sl = (
3651
+ ), Ml = (
3652
3652
  /* glsl */
3653
3653
  `
3654
3654
 
@@ -3828,7 +3828,7 @@ bool bvhIntersectFogVolumeHit(
3828
3828
  }
3829
3829
 
3830
3830
  `
3831
- ), Ml = (
3831
+ ), Cl = (
3832
3832
  /* glsl */
3833
3833
  `
3834
3834
 
@@ -3914,7 +3914,7 @@ bool bvhIntersectFogVolumeHit(
3914
3914
  }
3915
3915
 
3916
3916
  `
3917
- ), Cl = (
3917
+ ), Il = (
3918
3918
  /*glsl*/
3919
3919
  `
3920
3920
 
@@ -4013,7 +4013,7 @@ bool bvhIntersectFogVolumeHit(
4013
4013
  }
4014
4014
 
4015
4015
  `
4016
- ), Il = (
4016
+ ), Dl = (
4017
4017
  /* glsl */
4018
4018
  `
4019
4019
 
@@ -4390,7 +4390,7 @@ bool bvhIntersectFogVolumeHit(
4390
4390
  }
4391
4391
 
4392
4392
  `
4393
- ), Dl = (
4393
+ ), El = (
4394
4394
  /* glsl */
4395
4395
  `
4396
4396
 
@@ -4441,7 +4441,7 @@ bool bvhIntersectFogVolumeHit(
4441
4441
 
4442
4442
  `
4443
4443
  );
4444
- class El extends cr {
4444
+ class Rl extends cr {
4445
4445
  onBeforeRender() {
4446
4446
  this.setDefine("FEATURE_DOF", this.physicalCamera.bokehSize === 0 ? 0 : 1), this.setDefine("FEATURE_BACKGROUND_MAP", this.backgroundMap ? 1 : 0), this.setDefine("FEATURE_FOG", this.materials.features.isUsed("FOG") ? 1 : 0);
4447
4447
  }
@@ -4477,25 +4477,25 @@ class El extends cr {
4477
4477
  transmissiveBounces: { value: 10 },
4478
4478
  filterGlossyFactor: { value: 0 },
4479
4479
  // camera uniforms
4480
- physicalCamera: { value: new Ca() },
4480
+ physicalCamera: { value: new Ia() },
4481
4481
  cameraWorldMatrix: { value: new te() },
4482
4482
  invProjectionMatrix: { value: new te() },
4483
4483
  // scene uniforms
4484
- bvh: { value: new ea() },
4485
- attributesArray: { value: new Wa() },
4486
- materialIndexAttribute: { value: new ta() },
4487
- materials: { value: new Qa() },
4484
+ bvh: { value: new ta() },
4485
+ attributesArray: { value: new Ua() },
4486
+ materialIndexAttribute: { value: new ia() },
4487
+ materials: { value: new ja() },
4488
4488
  textures: { value: new zr().texture },
4489
4489
  // light uniforms
4490
- lights: { value: new Oa() },
4490
+ lights: { value: new za() },
4491
4491
  iesProfiles: { value: new zr(360, 180, {
4492
- type: Pe,
4492
+ type: De,
4493
4493
  wrapS: Ze,
4494
4494
  wrapT: Ze
4495
4495
  }).texture },
4496
4496
  environmentIntensity: { value: 1 },
4497
4497
  environmentRotation: { value: new te() },
4498
- envMapInfo: { value: new Da() },
4498
+ envMapInfo: { value: new Ea() },
4499
4499
  // background uniforms
4500
4500
  backgroundBlur: { value: 0 },
4501
4501
  backgroundMap: { value: null },
@@ -4505,8 +4505,8 @@ class El extends cr {
4505
4505
  // randomness uniforms
4506
4506
  seed: { value: 0 },
4507
4507
  sobolTexture: { value: null },
4508
- stratifiedTexture: { value: new $a() },
4509
- stratifiedOffsetTexture: { value: new nl(64, 1) }
4508
+ stratifiedTexture: { value: new el() },
4509
+ stratifiedOffsetTexture: { value: new ol(64, 1) }
4510
4510
  },
4511
4511
  vertexShader: (
4512
4512
  /* glsl */
@@ -4543,22 +4543,22 @@ class El extends cr {
4543
4543
  ${us.bvh_ray_functions}
4544
4544
 
4545
4545
  // uniform structs
4546
- ${ol}
4547
- ${ll}
4548
4546
  ${al}
4549
4547
  ${cl}
4548
+ ${ll}
4550
4549
  ${hl}
4550
+ ${ul}
4551
4551
 
4552
4552
  // random
4553
4553
  #if RANDOM_TYPE == 2 // Stratified List
4554
4554
 
4555
- ${vl}
4555
+ ${yl}
4556
4556
 
4557
4557
  #elif RANDOM_TYPE == 1 // Sobol
4558
4558
 
4559
4559
  ${Ur}
4560
4560
  ${zn}
4561
- ${Aa}
4561
+ ${Ta}
4562
4562
 
4563
4563
  #define rand(v) sobol(v)
4564
4564
  #define rand2(v) sobol2(v)
@@ -4583,11 +4583,11 @@ class El extends cr {
4583
4583
  #endif
4584
4584
 
4585
4585
  // common
4586
- ${_l}
4587
- ${pl}
4588
- ${Un}
4586
+ ${vl}
4589
4587
  ${ml}
4588
+ ${Un}
4590
4589
  ${gl}
4590
+ ${_l}
4591
4591
 
4592
4592
  // environment
4593
4593
  uniform EquirectHdrInfo envMapInfo;
@@ -4643,16 +4643,16 @@ class El extends cr {
4643
4643
  float lightsDenom;
4644
4644
 
4645
4645
  // sampling
4646
- ${dl}
4647
- ${ul}
4646
+ ${pl}
4648
4647
  ${fl}
4648
+ ${dl}
4649
4649
 
4650
+ ${Sl}
4651
+ ${bl}
4650
4652
  ${Tl}
4651
- ${wl}
4652
4653
  ${Al}
4653
- ${bl}
4654
+ ${wl}
4654
4655
  ${xl}
4655
- ${yl}
4656
4656
 
4657
4657
  float applyFilteredGlossy( float roughness, float accumulatedRoughness ) {
4658
4658
 
@@ -4685,11 +4685,11 @@ class El extends cr {
4685
4685
  }
4686
4686
 
4687
4687
  ${Pl}
4688
- ${Ml}
4689
- ${Dl}
4690
- ${Sl}
4691
4688
  ${Cl}
4689
+ ${El}
4690
+ ${Ml}
4692
4691
  ${Il}
4692
+ ${Dl}
4693
4693
 
4694
4694
  void main() {
4695
4695
 
@@ -4986,7 +4986,7 @@ class El extends cr {
4986
4986
  }), this.setValues(e);
4987
4987
  }
4988
4988
  }
4989
- function* Rl() {
4989
+ function* Ll() {
4990
4990
  const {
4991
4991
  _renderer: a,
4992
4992
  _fsQuad: e,
@@ -5000,15 +5000,15 @@ function* Rl() {
5000
5000
  } = this, u = new ht(), d = new ht(), n = t.material;
5001
5001
  let [l, f] = s;
5002
5002
  for (; ; ) {
5003
- c ? (n.opacity = this._opacityFactor / (this.samples + 1), h.blending = di, h.opacity = 1) : (h.opacity = this._opacityFactor / (this.samples + 1), h.blending = Dn);
5003
+ c ? (n.opacity = this._opacityFactor / (this.samples + 1), h.blending = di, h.opacity = 1) : (h.opacity = this._opacityFactor / (this.samples + 1), h.blending = Pn);
5004
5004
  const [m, _, p, g] = o, v = i.width, y = i.height;
5005
5005
  h.resolution.set(v * p, y * g), h.sobolTexture = r.texture, h.stratifiedTexture.init(20, h.bounces + h.transmissiveBounces + 5), h.stratifiedTexture.next(), h.seed++;
5006
- const x = this.tiles.x || 1, w = this.tiles.y || 1, T = x * w, M = Math.ceil(v * p), P = Math.ceil(y * g), C = Math.floor(m * v), E = Math.floor(_ * y), I = Math.ceil(M / x), A = Math.ceil(P / w);
5006
+ const x = this.tiles.x || 1, w = this.tiles.y || 1, T = x * w, M = Math.ceil(v * p), D = Math.ceil(y * g), C = Math.floor(m * v), E = Math.floor(_ * y), I = Math.ceil(M / x), A = Math.ceil(D / w);
5007
5007
  for (let S = 0; S < w; S++)
5008
- for (let D = 0; D < x; D++) {
5008
+ for (let P = 0; P < x; P++) {
5009
5009
  const R = a.getRenderTarget(), k = a.autoClear, F = a.getScissorTest();
5010
5010
  a.getScissor(u), a.getViewport(d);
5011
- let z = D, B = S;
5011
+ let z = P, B = S;
5012
5012
  if (!this.stableTiles) {
5013
5013
  const U = this._currentTile % (x * w);
5014
5014
  z = U % x, B = ~~(U / x), this._currentTile = U + 1;
@@ -5018,13 +5018,13 @@ function* Rl() {
5018
5018
  C + z * I,
5019
5019
  E + Q * A,
5020
5020
  Math.min(I, M - z * I),
5021
- Math.min(A, P - Q * A)
5021
+ Math.min(A, D - Q * A)
5022
5022
  ), i.viewport.set(
5023
5023
  C,
5024
5024
  E,
5025
5025
  M,
5026
- P
5027
- ), a.setRenderTarget(i), a.setScissorTest(!0), a.autoClear = !1, e.render(a), a.setViewport(d), a.setScissor(u), a.setScissorTest(F), a.setRenderTarget(R), a.autoClear = k, c && (n.target1 = l.texture, n.target2 = i.texture, a.setRenderTarget(f), t.render(a), a.setRenderTarget(R)), this.samples += 1 / T, D === x - 1 && S === w - 1 && (this.samples = Math.round(this.samples)), yield;
5026
+ D
5027
+ ), a.setRenderTarget(i), a.setScissorTest(!0), a.autoClear = !1, e.render(a), a.setViewport(d), a.setScissor(u), a.setScissorTest(F), a.setRenderTarget(R), a.autoClear = k, c && (n.target1 = l.texture, n.target2 = i.texture, a.setRenderTarget(f), t.render(a), a.setRenderTarget(R)), this.samples += 1 / T, P === x - 1 && S === w - 1 && (this.samples = Math.round(this.samples)), yield;
5028
5028
  }
5029
5029
  [l, f] = [f, l];
5030
5030
  }
@@ -5050,7 +5050,7 @@ class Nr {
5050
5050
  return !!this._compilePromise;
5051
5051
  }
5052
5052
  constructor(e) {
5053
- this.camera = null, this.tiles = new G(3, 3), this.stableNoise = !1, this.stableTiles = !0, this.samples = 0, this._subframe = new ht(0, 0, 1, 1), this._opacityFactor = 1, this._renderer = e, this._alpha = !1, this._fsQuad = new Ht(new El()), this._blendQuad = new Ht(new wa()), this._task = null, this._currentTile = 0, this._compilePromise = null, this._sobolTarget = new Sa().generate(e), this._primaryTarget = new je(1, 1, {
5053
+ this.camera = null, this.tiles = new G(3, 3), this.stableNoise = !1, this.stableTiles = !0, this.samples = 0, this._subframe = new ht(0, 0, 1, 1), this._opacityFactor = 1, this._renderer = e, this._alpha = !1, this._fsQuad = new Ht(new Rl()), this._blendQuad = new Ht(new ba()), this._task = null, this._currentTile = 0, this._compilePromise = null, this._sobolTarget = new Ma().generate(e), this._primaryTarget = new je(1, 1, {
5054
5054
  format: le,
5055
5055
  type: xe,
5056
5056
  magFilter: ae,
@@ -5098,11 +5098,11 @@ class Nr {
5098
5098
  e.getClearColor(Hr), e.setRenderTarget(t), e.setClearColor(0, 0), e.clearColor(), e.setRenderTarget(i[0]), e.setClearColor(0, 0), e.clearColor(), e.setRenderTarget(i[1]), e.setClearColor(0, 0), e.clearColor(), e.setClearColor(Hr, r), e.setRenderTarget(s), this.samples = 0, this._task = null, this.material.stratifiedTexture.stableNoise = this.stableNoise, this.stableNoise && (this.material.seed = 0, this.material.stratifiedTexture.reset());
5099
5099
  }
5100
5100
  update() {
5101
- this.material.onBeforeRender(), !this.isCompiling && (this._task || (this._task = Rl.call(this)), this._task.next());
5101
+ this.material.onBeforeRender(), !this.isCompiling && (this._task || (this._task = Ll.call(this)), this._task.next());
5102
5102
  }
5103
5103
  }
5104
5104
  const mt = new G(), Vr = new G(), Mi = new yo(), Ci = new X();
5105
- class Ll extends qe {
5105
+ class kl extends qe {
5106
5106
  constructor(e = 512, t = 512) {
5107
5107
  super(
5108
5108
  new Float32Array(e * t * 4),
@@ -5132,7 +5132,7 @@ class Ll extends qe {
5132
5132
  }
5133
5133
  }
5134
5134
  const Gr = new b();
5135
- class kl extends Ll {
5135
+ class Fl extends kl {
5136
5136
  constructor(e = 512) {
5137
5137
  super(e, e), this.topColor = new X().set(16777215), this.bottomColor = new X().set(0), this.exponent = 2, this.generationCallback = (t, i, s, r) => {
5138
5138
  Gr.setFromSpherical(t);
@@ -5144,7 +5144,7 @@ class kl extends Ll {
5144
5144
  return super.copy(e), this.topColor.copy(e.topColor), this.bottomColor.copy(e.bottomColor), this;
5145
5145
  }
5146
5146
  }
5147
- class Fl extends Gt {
5147
+ class Bl extends Gt {
5148
5148
  get map() {
5149
5149
  return this.uniforms.map.value;
5150
5150
  }
@@ -5231,7 +5231,7 @@ class Fl extends Gt {
5231
5231
  }), this.setValues(e);
5232
5232
  }
5233
5233
  }
5234
- class Bl extends Gt {
5234
+ class Ol extends Gt {
5235
5235
  constructor() {
5236
5236
  super({
5237
5237
  uniforms: {
@@ -5276,7 +5276,7 @@ class Bl extends Gt {
5276
5276
  }
5277
5277
  class Qr {
5278
5278
  constructor(e) {
5279
- this._renderer = e, this._quad = new Ht(new Bl());
5279
+ this._renderer = e, this._quad = new Ht(new Ol());
5280
5280
  }
5281
5281
  generate(e, t = null, i = null) {
5282
5282
  if (!e.isCubeTexture)
@@ -5294,18 +5294,18 @@ class Qr {
5294
5294
  r.readRenderTargetPixels(c, 0, 0, t, i, _), c.dispose();
5295
5295
  for (let g = 0, v = _.length; g < v; g++)
5296
5296
  m[g] = Ge.toHalfFloat(_[g]);
5297
- const p = new qe(m, t, i, le, Pe);
5297
+ const p = new qe(m, t, i, le, De);
5298
5298
  return p.minFilter = xo, p.magFilter = Ie, p.wrapS = ct, p.wrapT = ct, p.mapping = Xi, p.needsUpdate = !0, p;
5299
5299
  }
5300
5300
  dispose() {
5301
5301
  this._quad.dispose();
5302
5302
  }
5303
5303
  }
5304
- function Ol(a) {
5304
+ function zl(a) {
5305
5305
  return a.extensions.get("EXT_float_blend");
5306
5306
  }
5307
5307
  const At = new G();
5308
- class zl {
5308
+ class Wl {
5309
5309
  get multipleImportanceSampling() {
5310
5310
  return !!this._pathTracer.material.defines.FEATURE_MIS;
5311
5311
  }
@@ -5349,7 +5349,7 @@ class zl {
5349
5349
  return !!this._pathTracer.isCompiling;
5350
5350
  }
5351
5351
  constructor(e) {
5352
- this._renderer = e, this._generator = new xa(), this._pathTracer = new Nr(e), this._queueReset = !1, this._clock = new rs(), this._compilePromise = null, this._lowResPathTracer = new Nr(e), this._lowResPathTracer.tiles.set(1, 1), this._quad = new Ht(new Fl({
5352
+ this._renderer = e, this._generator = new wa(), this._pathTracer = new Nr(e), this._queueReset = !1, this._clock = new rs(), this._compilePromise = null, this._lowResPathTracer = new Nr(e), this._lowResPathTracer.tiles.set(1, 1), this._quad = new Ht(new Bl({
5353
5353
  map: null,
5354
5354
  transparent: !0,
5355
5355
  blending: di,
@@ -5387,11 +5387,11 @@ class zl {
5387
5387
  e.updateMatrixWorld(), this._pathTracer.setCamera(e), this._lowResPathTracer.setCamera(e), this.reset();
5388
5388
  }
5389
5389
  updateMaterials() {
5390
- const e = this._pathTracer.material, t = this._renderer, i = this._materials, s = this.textureSize, r = Na(i);
5390
+ const e = this._pathTracer.material, t = this._renderer, i = this._materials, s = this.textureSize, r = Va(i);
5391
5391
  e.textures.setTextures(t, r, s.x, s.y), e.materials.updateFrom(i, r), this.reset();
5392
5392
  }
5393
5393
  updateLights() {
5394
- const e = this.scene, t = this._renderer, i = this._pathTracer.material, s = Va(e), r = Ha(s);
5394
+ const e = this.scene, t = this._renderer, i = this._pathTracer.material, s = Ga(e), r = Na(s);
5395
5395
  i.lights.updateFrom(s, r), i.iesProfiles.setTextures(t, r), this.reset();
5396
5396
  }
5397
5397
  updateEnvironment() {
@@ -5399,7 +5399,7 @@ class zl {
5399
5399
  if (this._internalBackground && (this._internalBackground.dispose(), this._internalBackground = null), t.backgroundBlur = e.backgroundBlurriness, t.backgroundIntensity = e.backgroundIntensity ?? 1, t.backgroundRotation.makeRotationFromEuler(e.backgroundRotation).invert(), e.background === null)
5400
5400
  t.backgroundMap = null, t.backgroundAlpha = 0;
5401
5401
  else if (e.background.isColor) {
5402
- this._colorBackground = this._colorBackground || new kl(16);
5402
+ this._colorBackground = this._colorBackground || new Fl(16);
5403
5403
  const i = this._colorBackground;
5404
5404
  i.topColor.equals(e.background) || (i.topColor.set(e.background), i.bottomColor.set(e.background), i.update()), t.backgroundMap = i, t.backgroundAlpha = 1;
5405
5405
  } else if (e.background.isCubeTexture) {
@@ -5440,7 +5440,7 @@ class zl {
5440
5440
  const e = this._lowResPathTracer, t = this._pathTracer, i = this._renderer, s = this._clock, r = this._quad;
5441
5441
  this._updateScale(), this._queueReset && (t.reset(), e.reset(), this._queueReset = !1, r.material.opacity = 0, s.start());
5442
5442
  const o = s.getDelta() * 1e3, c = s.getElapsedTime() * 1e3;
5443
- if (!this.pausePathTracing && this.enablePathTracing && this.renderDelay <= c && !this.isCompiling && t.update(), t.alpha = t.material.backgroundAlpha !== 1 || !Ol(i), e.alpha = t.alpha, this.renderToCanvas) {
5443
+ if (!this.pausePathTracing && this.enablePathTracing && this.renderDelay <= c && !this.isCompiling && t.update(), t.alpha = t.material.backgroundAlpha !== 1 || !zl(i), e.alpha = t.alpha, this.renderToCanvas) {
5444
5444
  const h = this._renderer, u = this.minSamples;
5445
5445
  if (c >= this.renderDelay && this.samples >= this.minSamples && (this.fadeDuration !== 0 ? r.material.opacity = Math.min(r.material.opacity + o / this.fadeDuration, 1) : r.material.opacity = 1), !this.enablePathTracing || this.samples < u || r.material.opacity < 1) {
5446
5446
  if (this.dynamicLowRes && !this.isCompiling) {
@@ -5450,7 +5450,7 @@ class zl {
5450
5450
  }
5451
5451
  (!this.dynamicLowRes && this.rasterizeScene || this.dynamicLowRes && this.isCompiling) && this.rasterizeSceneCallback(this.scene, this.camera);
5452
5452
  }
5453
- this.enablePathTracing && r.material.opacity > 0 && (r.material.opacity < 1 && (r.material.blending = this.dynamicLowRes ? wo : Dn), r.material.map = t.target.texture, this.renderToCanvasCallback(t.target, h, r), r.material.blending = di);
5453
+ this.enablePathTracing && r.material.opacity > 0 && (r.material.opacity < 1 && (r.material.blending = this.dynamicLowRes ? wo : Pn), r.material.map = t.target.texture, this.renderToCanvasCallback(t.target, h, r), r.material.blending = di);
5454
5454
  }
5455
5455
  }
5456
5456
  reset() {
@@ -5470,15 +5470,15 @@ class zl {
5470
5470
  }
5471
5471
  }
5472
5472
  }
5473
- const Wl = "";
5474
- globalThis.GLTF_PROGRESSIVE_VERSION = Wl;
5473
+ const Ul = "";
5474
+ globalThis.GLTF_PROGRESSIVE_VERSION = Ul;
5475
5475
  console.debug("[gltf-progressive] version -");
5476
- let Hn = "https://www.gstatic.com/draco/versioned/decoders/1.5.7/", Ul = "https://cdn.needle.tools/static/three/0.179.1/basis2/";
5477
- const Hl = new URL(Hn + "draco_decoder.js");
5478
- Hl.searchParams.append("range", "true");
5479
- const Nl = () => ({
5476
+ let Hn = "https://www.gstatic.com/draco/versioned/decoders/1.5.7/", Hl = "https://cdn.needle.tools/static/three/0.179.1/basis2/";
5477
+ const Nl = new URL(Hn + "draco_decoder.js");
5478
+ Nl.searchParams.append("range", "true");
5479
+ const Vl = () => ({
5480
5480
  dracoDecoderPath: Hn,
5481
- ktx2TranscoderPath: Ul
5481
+ ktx2TranscoderPath: Hl
5482
5482
  });
5483
5483
  function Nn(a) {
5484
5484
  return { dracoLoader: Gn, meshoptDecoder: Qn };
@@ -5493,7 +5493,7 @@ function jn(a, e) {
5493
5493
  t ? t = Object.assign(t, e) : t = e, Qs.set(a, t);
5494
5494
  }
5495
5495
  const gs = ar.prototype.load;
5496
- function Vl(...a) {
5496
+ function Gl(...a) {
5497
5497
  const e = Qs.get(this);
5498
5498
  let t = a[0];
5499
5499
  const i = new URL(t, window.location.href);
@@ -5503,7 +5503,7 @@ function Vl(...a) {
5503
5503
  }
5504
5504
  return a[0] = t, gs == null ? void 0 : gs.call(this, ...a);
5505
5505
  }
5506
- ar.prototype.load = Vl;
5506
+ ar.prototype.load = Gl;
5507
5507
  vt("debugprogressive");
5508
5508
  function vt(a) {
5509
5509
  if (typeof window > "u")
@@ -5511,7 +5511,7 @@ function vt(a) {
5511
5511
  const t = new URL(window.location.href).searchParams.get(a);
5512
5512
  return t == null || t === "0" || t === "false" ? !1 : t === "" ? !0 : t;
5513
5513
  }
5514
- function Gl(a, e) {
5514
+ function Ql(a, e) {
5515
5515
  if (e === void 0 || a === void 0 || e.startsWith("./") || e.startsWith("http") || e.startsWith("data:") || e.startsWith("blob:"))
5516
5516
  return e;
5517
5517
  const t = a.lastIndexOf("/");
@@ -5533,7 +5533,7 @@ function jr() {
5533
5533
  const a = new URL(window.location.href), e = a.hostname === "localhost" || /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(a.hostname);
5534
5534
  return a.hostname === "127.0.0.1" || e;
5535
5535
  }
5536
- class Ql {
5536
+ class jl {
5537
5537
  constructor(e = 100, t = {}) {
5538
5538
  L(this, "_running", /* @__PURE__ */ new Map());
5539
5539
  L(this, "_queue", []);
@@ -5567,17 +5567,17 @@ class Ql {
5567
5567
  }
5568
5568
  }
5569
5569
  }
5570
- const jl = typeof window > "u" && typeof document > "u", js = Symbol("needle:raycast-mesh");
5570
+ const ql = typeof window > "u" && typeof document > "u", js = Symbol("needle:raycast-mesh");
5571
5571
  function _i(a) {
5572
5572
  return (a == null ? void 0 : a[js]) instanceof re ? a[js] : null;
5573
5573
  }
5574
- function ql(a, e) {
5574
+ function Yl(a, e) {
5575
5575
  if ((a.type === "Mesh" || a.type === "SkinnedMesh") && !_i(a)) {
5576
- const i = Kl(e);
5576
+ const i = Zl(e);
5577
5577
  i.userData = { isRaycastMesh: !0 }, a[js] = i;
5578
5578
  }
5579
5579
  }
5580
- function Yl(a = !0) {
5580
+ function Kl(a = !0) {
5581
5581
  if (a) {
5582
5582
  if (qt)
5583
5583
  return;
@@ -5594,7 +5594,7 @@ function Yl(a = !0) {
5594
5594
  }
5595
5595
  }
5596
5596
  let qt = null;
5597
- function Kl(a) {
5597
+ function Zl(a) {
5598
5598
  const e = new re();
5599
5599
  for (const t in a.attributes)
5600
5600
  e.setAttribute(t, a.getAttribute(t));
@@ -5621,16 +5621,16 @@ function Yn(a) {
5621
5621
  a && "wireframe" in a && (a.wireframe = ci === !0);
5622
5622
  }
5623
5623
  const Yt = new Array();
5624
- let Zl = 0;
5625
- const Xl = qn() ? 2 : 10;
5626
- function Jl(a) {
5627
- if (Yt.length < Xl) {
5624
+ let Xl = 0;
5625
+ const Jl = qn() ? 2 : 10;
5626
+ function $l(a) {
5627
+ if (Yt.length < Jl) {
5628
5628
  const i = Yt.length;
5629
5629
  V && console.warn(`[Worker] Creating new worker #${i}`);
5630
5630
  const s = ur.createWorker(a || {});
5631
5631
  return Yt.push(s), s;
5632
5632
  }
5633
- const e = Zl++ % Yt.length;
5633
+ const e = Xl++ % Yt.length;
5634
5634
  return Yt[e];
5635
5635
  }
5636
5636
  class ur {
@@ -5644,7 +5644,7 @@ class ur {
5644
5644
  case "loaded-gltf":
5645
5645
  for (const r of this._running)
5646
5646
  if (r.url === s.result.url) {
5647
- $l(s.result), r.resolve(s.result);
5647
+ ec(s.result), r.resolve(s.result);
5648
5648
  const o = r.url;
5649
5649
  o.startsWith("blob:") && URL.revokeObjectURL(o);
5650
5650
  }
@@ -5662,7 +5662,7 @@ class ur {
5662
5662
  return new ur(t, e);
5663
5663
  }
5664
5664
  async load(e, t) {
5665
- const i = Nl();
5665
+ const i = Vl();
5666
5666
  let s = t == null ? void 0 : t.renderer;
5667
5667
  s || (this._webglRenderer ?? (this._webglRenderer = (async () => {
5668
5668
  const { WebGLRenderer: u } = await import("three");
@@ -5685,7 +5685,7 @@ class ur {
5685
5685
  });
5686
5686
  }
5687
5687
  }
5688
- function $l(a) {
5688
+ function ec(a) {
5689
5689
  var e, t, i, s, r, o, c, h, u, d, n, l, f, m, _, p;
5690
5690
  for (const g of a.geometries) {
5691
5691
  const v = g.geometry, y = new re();
@@ -5771,7 +5771,7 @@ function _s(a) {
5771
5771
  "isBufferAttribute" in a && a.isBufferAttribute && (e = new ve(a.array, a.itemSize, a.normalized), e.usage = a.usage, e.gpuType = a.gpuType, e.updateRanges = a.updateRanges);
5772
5772
  return e;
5773
5773
  }
5774
- const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipmaps"), vs = Symbol("needle-progressive-texture"), He = "NEEDLE_progressive", N = class N {
5774
+ const tc = vt("gltf-progressive-worker"), ic = vt("gltf-progressive-reduce-mipmaps"), vs = Symbol("needle-progressive-texture"), He = "NEEDLE_progressive", N = class N {
5775
5775
  constructor(e) {
5776
5776
  L(this, "parser");
5777
5777
  L(this, "url");
@@ -5982,7 +5982,7 @@ const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipma
5982
5982
  if (u && (u == null ? void 0 : u.level) < t)
5983
5983
  return V === "verbose" && console.warn("Assigned texture level is already higher: ", u.level, t, i, h, r), null;
5984
5984
  }
5985
- if (tc && r.mipmaps) {
5985
+ if (ic && r.mipmaps) {
5986
5986
  const u = r.mipmaps.length;
5987
5987
  r.mipmaps.length = Math.min(r.mipmaps.length, 3), u !== r.mipmaps.length && V && console.debug(`Reduced mipmap count from ${u} to ${r.mipmaps.length} for ${r.uuid}: ${(o = r.image) == null ? void 0 : o.width}x${(c = r.image) == null ? void 0 : c.height}.`);
5988
5988
  }
@@ -6067,7 +6067,7 @@ const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipma
6067
6067
  const l = Array.isArray(o.lods) ? (h = o.lods[t]) == null ? void 0 : h.path : o.lods;
6068
6068
  if (!l)
6069
6069
  return V && !o["missing:uri"] && (o["missing:uri"] = !0, console.warn("Missing uri for progressive asset for LOD " + t, o)), null;
6070
- const f = Gl(s.url, l);
6070
+ const f = Ql(s.url, l);
6071
6071
  if (f.endsWith(".glb") || f.endsWith(".gltf")) {
6072
6072
  if (!o.guid)
6073
6073
  return console.warn("missing pointer for glb/gltf texture", o), null;
@@ -6082,18 +6082,18 @@ const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipma
6082
6082
  if (!_.use)
6083
6083
  return V && console.log(`LOD ${t} was aborted: ${f}`), null;
6084
6084
  const g = o, v = new Promise(async (x, w) => {
6085
- if (ec) {
6086
- const A = await (await Jl({})).load(f);
6085
+ if (tc) {
6086
+ const A = await (await $l({})).load(f);
6087
6087
  if (A.textures.length > 0)
6088
6088
  for (const S of A.textures) {
6089
- let D = S.texture;
6090
- return N.assignLODInformation(s.url, D, r, t, void 0), e instanceof rt && (D = this.copySettings(e, D)), D && (D.guid = g.guid), x(D);
6089
+ let P = S.texture;
6090
+ return N.assignLODInformation(s.url, P, r, t, void 0), e instanceof rt && (P = this.copySettings(e, P)), P && (P.guid = g.guid), x(P);
6091
6091
  }
6092
6092
  if (A.geometries.length > 0) {
6093
6093
  const S = new Array();
6094
- for (const D of A.geometries) {
6095
- const R = D.geometry;
6096
- N.assignLODInformation(s.url, R, r, t, D.primitiveIndex), S.push(R);
6094
+ for (const P of A.geometries) {
6095
+ const R = P.geometry;
6096
+ N.assignLODInformation(s.url, R, r, t, P.primitiveIndex), S.push(R);
6097
6097
  }
6098
6098
  return x(S);
6099
6099
  }
@@ -6106,16 +6106,16 @@ const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipma
6106
6106
  const I = g.lods[t];
6107
6107
  I.hash && (M += "?v=" + I.hash);
6108
6108
  }
6109
- const P = await T.loadAsync(M).catch((I) => (console.error(`Error loading LOD ${t} from ${f}
6109
+ const D = await T.loadAsync(M).catch((I) => (console.error(`Error loading LOD ${t} from ${f}
6110
6110
  `, I), x(null)));
6111
- if (!P)
6111
+ if (!D)
6112
6112
  return x(null);
6113
- const C = P.parser;
6113
+ const C = D.parser;
6114
6114
  i && console.log("Loading finished " + f, g.guid);
6115
6115
  let E = 0;
6116
- if (P.parser.json.textures) {
6116
+ if (D.parser.json.textures) {
6117
6117
  let I = !1;
6118
- for (const A of P.parser.json.textures) {
6118
+ for (const A of D.parser.json.textures) {
6119
6119
  if (A != null && A.extensions) {
6120
6120
  const S = A == null ? void 0 : A.extensions[He];
6121
6121
  if (S != null && S.guid && S.guid === g.guid) {
@@ -6129,11 +6129,11 @@ const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipma
6129
6129
  let A = await C.getDependency("texture", E);
6130
6130
  return A && N.assignLODInformation(s.url, A, r, t, void 0), i && console.log('change "' + e.name + '" → "' + A.name + '"', f, E, A, m), e instanceof rt && (A = this.copySettings(e, A)), A && (A.guid = g.guid), x(A);
6131
6131
  } else
6132
- V && console.warn("Could not find texture with guid", g.guid, P.parser.json);
6132
+ V && console.warn("Could not find texture with guid", g.guid, D.parser.json);
6133
6133
  }
6134
- if (E = 0, P.parser.json.meshes) {
6134
+ if (E = 0, D.parser.json.meshes) {
6135
6135
  let I = !1;
6136
- for (const A of P.parser.json.meshes) {
6136
+ for (const A of D.parser.json.meshes) {
6137
6137
  if (A != null && A.extensions) {
6138
6138
  const S = A == null ? void 0 : A.extensions[He];
6139
6139
  if (S != null && S.guid && S.guid === g.guid) {
@@ -6150,17 +6150,17 @@ const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipma
6150
6150
  return N.assignLODInformation(s.url, S, r, t, 0), x(S);
6151
6151
  } else {
6152
6152
  const S = new Array();
6153
- for (let D = 0; D < A.children.length; D++) {
6154
- const R = A.children[D];
6153
+ for (let P = 0; P < A.children.length; P++) {
6154
+ const R = A.children[P];
6155
6155
  if (R.isMesh === !0) {
6156
6156
  const k = R.geometry;
6157
- N.assignLODInformation(s.url, k, r, t, D), S.push(k);
6157
+ N.assignLODInformation(s.url, k, r, t, P), S.push(k);
6158
6158
  }
6159
6159
  }
6160
6160
  return x(S);
6161
6161
  }
6162
6162
  } else
6163
- V && console.warn("Could not find mesh with guid", g.guid, P.parser.json);
6163
+ V && console.warn("Could not find mesh with guid", g.guid, D.parser.json);
6164
6164
  }
6165
6165
  return x(null);
6166
6166
  });
@@ -6177,7 +6177,7 @@ const ec = vt("gltf-progressive-worker"), tc = vt("gltf-progressive-reduce-mipma
6177
6177
  if (!t)
6178
6178
  return;
6179
6179
  t.userData || (t.userData = {});
6180
- const o = new ic(e, i, s, r);
6180
+ const o = new sc(e, i, s, r);
6181
6181
  t.userData.LODS = o, "source" in t && typeof t.source == "object" && (t.source.LODS = o);
6182
6182
  }
6183
6183
  static getAssignedLODInformation(e) {
@@ -6219,15 +6219,15 @@ L(N, "registerMesh", (e, t, i, s, r, o) => {
6219
6219
  }
6220
6220
  c.userData || (c.userData = {}), V && console.log("> Progressive: register mesh " + i.name, { index: r, uuid: i.uuid }, o, i), N.assignLODInformation(e, c, t, s, r), N.lodInfos.set(t, o);
6221
6221
  let h = N.lowresCache.get(t);
6222
- h ? h.push(i.geometry) : h = [i.geometry], N.lowresCache.set(t, h), s > 0 && !_i(i) && ql(i, c);
6222
+ h ? h.push(i.geometry) : h = [i.geometry], N.lowresCache.set(t, h), s > 0 && !_i(i) && Yl(i, c);
6223
6223
  for (const d of nt)
6224
6224
  (u = d.onRegisteredNewMesh) == null || u.call(d, i, o);
6225
6225
  }), /** A map of key = asset uuid and value = LOD information */
6226
6226
  L(N, "lodInfos", /* @__PURE__ */ new Map()), /** cache of already loaded mesh lods */
6227
6227
  L(N, "previouslyLoaded", /* @__PURE__ */ new Map()), /** this contains the geometry/textures that were originally loaded */
6228
- L(N, "lowresCache", /* @__PURE__ */ new Map()), L(N, "workers", []), L(N, "_workersIndex", 0), L(N, "maxConcurrent", 50), L(N, "queue", new Ql(N.maxConcurrent, { debug: V != !1 }));
6228
+ L(N, "lowresCache", /* @__PURE__ */ new Map()), L(N, "workers", []), L(N, "_workersIndex", 0), L(N, "maxConcurrent", 50), L(N, "queue", new jl(N.maxConcurrent, { debug: V != !1 }));
6229
6229
  let Oe = N;
6230
- class ic {
6230
+ class sc {
6231
6231
  constructor(e, t, i, s) {
6232
6232
  L(this, "url");
6233
6233
  /** the key to lookup the LOD information */
@@ -6317,7 +6317,7 @@ L(qi, "addPromise", (e, t, i, s) => {
6317
6317
  r.add(e, t, i);
6318
6318
  });
6319
6319
  });
6320
- const Me = vt("debugprogressive"), sc = vt("noprogressive"), ys = Symbol("Needle:LODSManager"), xs = Symbol("Needle:LODState"), et = Symbol("Needle:CurrentLOD"), pe = { mesh_lod: -1, texture_lod: -1 };
6320
+ const Me = vt("debugprogressive"), rc = vt("noprogressive"), ys = Symbol("Needle:LODSManager"), xs = Symbol("Needle:LODState"), et = Symbol("Needle:CurrentLOD"), pe = { mesh_lod: -1, texture_lod: -1 };
6321
6321
  var _e, Ne, ts, at, Ut, is, Ve;
6322
6322
  const K = class K {
6323
6323
  // readonly plugins: NEEDLE_progressive_plugin[] = [];
@@ -6469,7 +6469,7 @@ const K = class K {
6469
6469
  (c.name === "EffectMaterial" || c.name === "CopyShader") && (o = !1);
6470
6470
  }
6471
6471
  if ((t.parent && t.parent.type === "CubeCamera" || i >= 1 && t.type === "OrthographicCamera") && (o = !1), o) {
6472
- if (sc || (this.updateInterval === "auto" ? j(this, Ve) < 40 && j(this, _e) < 10 ? (Fe(this, _e, j(this, _e) + 1), Me && console.warn("↓ Reducing LOD updates", j(this, _e), j(this, Ve).toFixed(0))) : j(this, Ve) >= 60 && j(this, _e) > 1 && (Fe(this, _e, j(this, _e) - 1), Me && console.warn("↑ Increasing LOD updates", j(this, _e), j(this, Ve).toFixed(0))) : Fe(this, _e, this.updateInterval), j(this, _e) > 0 && j(this, at) % j(this, _e) != 0))
6472
+ if (rc || (this.updateInterval === "auto" ? j(this, Ve) < 40 && j(this, _e) < 10 ? (Fe(this, _e, j(this, _e) + 1), Me && console.warn("↓ Reducing LOD updates", j(this, _e), j(this, Ve).toFixed(0))) : j(this, Ve) >= 60 && j(this, _e) > 1 && (Fe(this, _e, j(this, _e) - 1), Me && console.warn("↑ Increasing LOD updates", j(this, _e), j(this, Ve).toFixed(0))) : Fe(this, _e, this.updateInterval), j(this, _e) > 0 && j(this, at) % j(this, _e) != 0))
6473
6473
  return;
6474
6474
  this.internalUpdate(e, t), this._postprocessPromiseGroups();
6475
6475
  }
@@ -6520,7 +6520,7 @@ const K = class K {
6520
6520
  var c, h;
6521
6521
  i.userData || (i.userData = {});
6522
6522
  let r = i[xs];
6523
- if (r || (r = new rc(), i[xs] = r), r.frames++ < 2)
6523
+ if (r || (r = new nc(), i[xs] = r), r.frames++ < 2)
6524
6524
  return;
6525
6525
  for (const u of nt)
6526
6526
  (c = u.onBeforeUpdateLOD) == null || c.call(u, this.renderer, e, t, i);
@@ -6628,11 +6628,11 @@ const K = class K {
6628
6628
  return;
6629
6629
  }
6630
6630
  if (this._tempBox.applyMatrix4(this.projectionScreenMatrix), this.renderer.xr.enabled && x.isPerspectiveCamera && x.fov > 70) {
6631
- const S = this._tempBox.min, D = this._tempBox.max;
6632
- let R = S.x, k = S.y, F = D.x, z = D.y;
6633
- const B = 2, Q = 1.5, U = (S.x + D.x) * 0.5, O = (S.y + D.y) * 0.5;
6631
+ const S = this._tempBox.min, P = this._tempBox.max;
6632
+ let R = S.x, k = S.y, F = P.x, z = P.y;
6633
+ const B = 2, Q = 1.5, U = (S.x + P.x) * 0.5, O = (S.y + P.y) * 0.5;
6634
6634
  R = (R - U) * B + U, k = (k - O) * B + O, F = (F - U) * B + U, z = (z - O) * B + O;
6635
- const Y = R < 0 && F > 0 ? 0 : Math.min(Math.abs(S.x), Math.abs(D.x)), H = k < 0 && z > 0 ? 0 : Math.min(Math.abs(S.y), Math.abs(D.y)), fe = Math.max(Y, H);
6635
+ const Y = R < 0 && F > 0 ? 0 : Math.min(Math.abs(S.x), Math.abs(P.x)), H = k < 0 && z > 0 ? 0 : Math.min(Math.abs(S.y), Math.abs(P.y)), fe = Math.max(Y, H);
6636
6636
  i.lastCentrality = (Q - fe) * (Q - fe) * (Q - fe);
6637
6637
  } else
6638
6638
  i.lastCentrality = 1;
@@ -6640,20 +6640,20 @@ const K = class K {
6640
6640
  w.multiplyScalar(0.5), screen.availHeight > 0 && m > 0 && w.multiplyScalar(m / screen.availHeight), e.isPerspectiveCamera ? w.x *= e.aspect : e.isOrthographicCamera;
6641
6641
  const T = e.matrixWorldInverse, M = this._tempBox2;
6642
6642
  M.copy(_), M.applyMatrix4(t.matrixWorld), M.applyMatrix4(T);
6643
- const P = M.getSize(this._tempBox2Size), C = Math.max(P.x, P.y);
6644
- if (Math.max(w.x, w.y) != 0 && C != 0 && (w.z = P.z / Math.max(P.x, P.y) * Math.max(w.x, w.y)), i.lastScreenCoverage = Math.max(w.x, w.y, w.z), i.lastScreenspaceVolume.copy(w), i.lastScreenCoverage *= i.lastCentrality, Me && K.debugDrawLine) {
6643
+ const D = M.getSize(this._tempBox2Size), C = Math.max(D.x, D.y);
6644
+ if (Math.max(w.x, w.y) != 0 && C != 0 && (w.z = D.z / Math.max(D.x, D.y) * Math.max(w.x, w.y)), i.lastScreenCoverage = Math.max(w.x, w.y, w.z), i.lastScreenspaceVolume.copy(w), i.lastScreenCoverage *= i.lastCentrality, Me && K.debugDrawLine) {
6645
6645
  const S = this.tempMatrix.copy(this.projectionScreenMatrix);
6646
6646
  S.invert();
6647
- const D = K.corner0, R = K.corner1, k = K.corner2, F = K.corner3;
6648
- D.copy(this._tempBox.min), R.copy(this._tempBox.max), R.x = D.x, k.copy(this._tempBox.max), k.y = D.y, F.copy(this._tempBox.max);
6649
- const z = (D.z + F.z) * 0.5;
6650
- D.z = R.z = k.z = F.z = z, D.applyMatrix4(S), R.applyMatrix4(S), k.applyMatrix4(S), F.applyMatrix4(S), K.debugDrawLine(D, R, 255), K.debugDrawLine(D, k, 255), K.debugDrawLine(R, F, 255), K.debugDrawLine(k, F, 255);
6647
+ const P = K.corner0, R = K.corner1, k = K.corner2, F = K.corner3;
6648
+ P.copy(this._tempBox.min), R.copy(this._tempBox.max), R.x = P.x, k.copy(this._tempBox.max), k.y = P.y, F.copy(this._tempBox.max);
6649
+ const z = (P.z + F.z) * 0.5;
6650
+ P.z = R.z = k.z = F.z = z, P.applyMatrix4(S), R.applyMatrix4(S), k.applyMatrix4(S), F.applyMatrix4(S), K.debugDrawLine(P, R, 255), K.debugDrawLine(P, k, 255), K.debugDrawLine(R, F, 255), K.debugDrawLine(k, F, 255);
6651
6651
  }
6652
6652
  let I = 999;
6653
6653
  if (u && i.lastScreenCoverage > 0)
6654
6654
  for (let S = 0; S < u.length; S++) {
6655
- const D = u[S], k = (((g = D.densities) == null ? void 0 : g[d]) || D.density || 1e-5) / i.lastScreenCoverage;
6656
- if (d > 0 && jr() && !D.densities && !globalThis["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] && (window["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] = !0, console.warn("[Needle Progressive] Detected usage of mesh without primitive densities. This might cause incorrect LOD level selection: Consider re-optimizing your model by updating your Needle Integration, Needle glTF Pipeline or running optimization again on Needle Cloud.")), k < s) {
6655
+ const P = u[S], k = (((g = P.densities) == null ? void 0 : g[d]) || P.density || 1e-5) / i.lastScreenCoverage;
6656
+ if (d > 0 && jr() && !P.densities && !globalThis["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] && (window["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] = !0, console.warn("[Needle Progressive] Detected usage of mesh without primitive densities. This might cause incorrect LOD level selection: Consider re-optimizing your model by updating your Needle Integration, Needle glTF Pipeline or running optimization again on Needle Cloud.")), k < s) {
6657
6657
  I = S;
6658
6658
  break;
6659
6659
  }
@@ -6675,15 +6675,15 @@ const K = class K {
6675
6675
  const w = i.lastScreenspaceVolume.x + i.lastScreenspaceVolume.y + i.lastScreenspaceVolume.z;
6676
6676
  let T = i.lastScreenCoverage * 4;
6677
6677
  ((y = this.context) == null ? void 0 : y.engine) === "model-viewer" && (T *= 1.5);
6678
- const P = m / window.devicePixelRatio * T;
6678
+ const D = m / window.devicePixelRatio * T;
6679
6679
  let C = !1;
6680
6680
  for (let E = l.lods.length - 1; E >= 0; E--) {
6681
6681
  const I = l.lods[E];
6682
- if (!(x && I.max_height >= 2048) && !(qn() && I.max_height > 4096) && (I.max_height > P || !C && E === 0)) {
6682
+ if (!(x && I.max_height >= 2048) && !(qn() && I.max_height > 4096) && (I.max_height > D || !C && E === 0)) {
6683
6683
  if (C = !0, r.texture_lod = E, Me && r.texture_lod < i.lastLodLevel_Texture) {
6684
6684
  const A = I.max_height;
6685
6685
  console.log(`Texture LOD changed: ${i.lastLodLevel_Texture} → ${r.texture_lod} = ${A}px
6686
- Screensize: ${P.toFixed(0)}px, Coverage: ${(100 * i.lastScreenCoverage).toFixed(2)}%, Volume ${w.toFixed(1)}
6686
+ Screensize: ${D.toFixed(0)}px, Coverage: ${(100 * i.lastScreenCoverage).toFixed(2)}%, Volume ${w.toFixed(1)}
6687
6687
  ${t.name}`);
6688
6688
  }
6689
6689
  break;
@@ -6699,7 +6699,7 @@ _e = new WeakMap(), Ne = new WeakMap(), ts = new WeakMap(), at = new WeakMap(),
6699
6699
  */
6700
6700
  L(K, "debugDrawLine"), L(K, "corner0", new b()), L(K, "corner1", new b()), L(K, "corner2", new b()), L(K, "corner3", new b()), L(K, "_tempPtInside", new b()), L(K, "skinnedMeshBoundsFrameOffsetCounter", 0), L(K, "$skinnedMeshBoundsOffset", Symbol("gltf-progressive-skinnedMeshBoundsOffset"));
6701
6701
  let Nt = K;
6702
- class rc {
6702
+ class nc {
6703
6703
  constructor() {
6704
6704
  L(this, "frames", 0);
6705
6705
  L(this, "lastLodLevel_Mesh", -1);
@@ -6712,7 +6712,7 @@ class rc {
6712
6712
  const qr = Symbol("NEEDLE_mesh_lod"), Ii = Symbol("NEEDLE_texture_lod");
6713
6713
  let Kt = null;
6714
6714
  function Kn() {
6715
- const a = nc();
6715
+ const a = oc();
6716
6716
  a && (a.mapURLs(function(e) {
6717
6717
  return Yr(), e;
6718
6718
  }), Yr(), Kt == null || Kt.disconnect(), Kt = new MutationObserver((e) => {
@@ -6723,7 +6723,7 @@ function Kn() {
6723
6723
  });
6724
6724
  }), Kt.observe(document, { childList: !0, subtree: !0 }));
6725
6725
  }
6726
- function nc() {
6726
+ function oc() {
6727
6727
  if (typeof customElements > "u")
6728
6728
  return null;
6729
6729
  const a = customElements.get("model-viewer");
@@ -6739,11 +6739,11 @@ function Yr() {
6739
6739
  });
6740
6740
  }
6741
6741
  const Kr = /* @__PURE__ */ new WeakSet();
6742
- let oc = 0;
6742
+ let ac = 0;
6743
6743
  function Zn(a) {
6744
6744
  if (!a || Kr.has(a))
6745
6745
  return null;
6746
- Kr.add(a), console.debug("[gltf-progressive] found new model-viewer..." + ++oc + `
6746
+ Kr.add(a), console.debug("[gltf-progressive] found new model-viewer..." + ++ac + `
6747
6747
  `, a.getAttribute("src"));
6748
6748
  let e = null, t = null, i = null;
6749
6749
  for (let s = a; s != null; s = Object.getPrototypeOf(s)) {
@@ -6764,7 +6764,7 @@ function Zn(a) {
6764
6764
  };
6765
6765
  console.debug("[gltf-progressive] setup model-viewer");
6766
6766
  const r = Nt.get(e, { engine: "model-viewer" });
6767
- return Nt.addPlugin(new ac()), r.enable(), r.addEventListener("changed", () => {
6767
+ return Nt.addPlugin(new lc()), r.enable(), r.addEventListener("changed", () => {
6768
6768
  i == null || i.call(a);
6769
6769
  }), a.addEventListener("model-visibility", (o) => {
6770
6770
  o.detail.visible && (i == null || i.call(a));
@@ -6776,7 +6776,7 @@ function Zn(a) {
6776
6776
  }
6777
6777
  return null;
6778
6778
  }
6779
- class ac {
6779
+ class lc {
6780
6780
  constructor() {
6781
6781
  L(this, "_didWarnAboutMissingUrl", !1);
6782
6782
  }
@@ -6871,14 +6871,14 @@ function Xn(...a) {
6871
6871
  return (s == null ? void 0 : s.enableLODsManager) !== !1 && r.enable(), r;
6872
6872
  }
6873
6873
  Kn();
6874
- if (!jl) {
6874
+ if (!ql) {
6875
6875
  const a = {
6876
6876
  gltfProgressive: {
6877
6877
  useNeedleProgressive: Xn,
6878
6878
  LODsManager: Nt,
6879
6879
  configureLoader: jn,
6880
6880
  getRaycastMesh: _i,
6881
- useRaycastMeshes: Yl
6881
+ useRaycastMeshes: Kl
6882
6882
  }
6883
6883
  };
6884
6884
  if (!globalThis.Needle)
@@ -7278,22 +7278,22 @@ var zt = Object.freeze({
7278
7278
  typeof i == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(i) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
7279
7279
  }, a;
7280
7280
  }()
7281
- ), lc = "23.1.3", cc = fr.nextId, We = qs, hc = We.getAll.bind(We), uc = We.removeAll.bind(We), fc = We.add.bind(We), dc = We.remove.bind(We), pc = We.update.bind(We), me = {
7281
+ ), cc = "23.1.3", hc = fr.nextId, We = qs, uc = We.getAll.bind(We), fc = We.removeAll.bind(We), dc = We.add.bind(We), pc = We.remove.bind(We), mc = We.update.bind(We), me = {
7282
7282
  Easing: zt,
7283
7283
  Group: Jn,
7284
7284
  Interpolation: _t,
7285
7285
  now: Bt,
7286
7286
  Sequence: fr,
7287
- nextId: cc,
7287
+ nextId: hc,
7288
7288
  Tween: Ji,
7289
- VERSION: lc,
7290
- getAll: hc,
7291
- removeAll: uc,
7292
- add: fc,
7293
- remove: dc,
7294
- update: pc
7289
+ VERSION: cc,
7290
+ getAll: uc,
7291
+ removeAll: fc,
7292
+ add: dc,
7293
+ remove: pc,
7294
+ update: mc
7295
7295
  }, Zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7296
- function mc(a) {
7296
+ function gc(a) {
7297
7297
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
7298
7298
  }
7299
7299
  var $n = { exports: {} };
@@ -7407,8 +7407,8 @@ var $n = { exports: {} };
7407
7407
  return u ? (d = t ? t + u : u, this._events[d] && o(this, d)) : (this._events = new i(), this._eventsCount = 0), this;
7408
7408
  }, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = t, c.EventEmitter = c, a.exports = c;
7409
7409
  })($n);
7410
- var gc = $n.exports;
7411
- const yt = /* @__PURE__ */ mc(gc);
7410
+ var _c = $n.exports;
7411
+ const yt = /* @__PURE__ */ gc(_c);
7412
7412
  var hi = function() {
7413
7413
  var a = 0, e = document.createElement("div");
7414
7414
  e.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000", e.addEventListener("click", function(n) {
@@ -7466,18 +7466,18 @@ hi.Panel = function(a, e, t) {
7466
7466
  }
7467
7467
  };
7468
7468
  };
7469
- function tf(a, e) {
7469
+ function sf(a, e) {
7470
7470
  const t = URL.createObjectURL(a), i = document.createElement("a");
7471
7471
  i.href = t, i.download = e, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(t);
7472
7472
  }
7473
- function _c(a) {
7473
+ function vc(a) {
7474
7474
  return a.length === 0 ? 0 : a.reduce((t, i) => t + i, 0) / a.length;
7475
7475
  }
7476
7476
  function Zr(a, e) {
7477
7477
  const t = new Blob([a], { type: e });
7478
7478
  return URL.createObjectURL(t);
7479
7479
  }
7480
- function vc() {
7480
+ function yc() {
7481
7481
  return /Mac|iPod|iPhone|iPad/.test(navigator == null ? void 0 : navigator.platform) || /Mac OS|iOS/.test(navigator == null ? void 0 : navigator.userAgent);
7482
7482
  }
7483
7483
  function Xr(a) {
@@ -7485,7 +7485,7 @@ function Xr(a) {
7485
7485
  const t = e.getContext("2d");
7486
7486
  return e.width = a.width, e.height = a.height, t ? (t.drawImage(a, 0, 0), e.toDataURL("image/png", 0.75)) : void 0;
7487
7487
  }
7488
- function sf(a, e = 43) {
7488
+ function rf(a, e = 43) {
7489
7489
  const t = a * Math.PI / 180;
7490
7490
  return e / (2 * Math.tan(t / 2));
7491
7491
  }
@@ -7823,7 +7823,7 @@ var eo = {};
7823
7823
  f._webAudio && t._autoResume();
7824
7824
  var y = Math.max(0, g._seek > 0 ? g._seek : f._sprite[n][0] / 1e3), x = Math.max(0, (f._sprite[n][0] + f._sprite[n][1]) / 1e3 - y), w = x * 1e3 / Math.abs(g._rate), T = f._sprite[n][0] / 1e3, M = (f._sprite[n][0] + f._sprite[n][1]) / 1e3;
7825
7825
  g._sprite = n, g._ended = !1;
7826
- var P = function() {
7826
+ var D = function() {
7827
7827
  g._paused = !1, g._seek = y, g._start = T, g._stop = M, g._loop = !!(g._loop || f._sprite[n][2]);
7828
7828
  };
7829
7829
  if (y >= M) {
@@ -7833,9 +7833,9 @@ var eo = {};
7833
7833
  var C = g._node;
7834
7834
  if (f._webAudio) {
7835
7835
  var E = function() {
7836
- f._playLock = !1, P(), f._refreshBuffer(g);
7837
- var D = g._muted || f._muted ? 0 : g._volume;
7838
- C.gain.setValueAtTime(D, t.ctx.currentTime), g._playStart = t.ctx.currentTime, typeof C.bufferSource.start > "u" ? g._loop ? C.bufferSource.noteGrainOn(0, y, 86400) : C.bufferSource.noteGrainOn(0, y, x) : g._loop ? C.bufferSource.start(0, y, 86400) : C.bufferSource.start(0, y, x), w !== 1 / 0 && (f._endTimers[g._id] = setTimeout(f._ended.bind(f, g), w)), l || setTimeout(function() {
7836
+ f._playLock = !1, D(), f._refreshBuffer(g);
7837
+ var P = g._muted || f._muted ? 0 : g._volume;
7838
+ C.gain.setValueAtTime(P, t.ctx.currentTime), g._playStart = t.ctx.currentTime, typeof C.bufferSource.start > "u" ? g._loop ? C.bufferSource.noteGrainOn(0, y, 86400) : C.bufferSource.noteGrainOn(0, y, x) : g._loop ? C.bufferSource.start(0, y, 86400) : C.bufferSource.start(0, y, x), w !== 1 / 0 && (f._endTimers[g._id] = setTimeout(f._ended.bind(f, g), w)), l || setTimeout(function() {
7839
7839
  f._emit("play", g._id), f._loadQueue();
7840
7840
  }, 0);
7841
7841
  };
@@ -7844,12 +7844,12 @@ var eo = {};
7844
7844
  var I = function() {
7845
7845
  C.currentTime = y, C.muted = g._muted || f._muted || t._muted || C.muted, C.volume = g._volume * t.volume(), C.playbackRate = g._rate;
7846
7846
  try {
7847
- var D = C.play();
7848
- if (D && typeof Promise < "u" && (D instanceof Promise || typeof D.then == "function") ? (f._playLock = !0, P(), D.then(function() {
7847
+ var P = C.play();
7848
+ if (P && typeof Promise < "u" && (P instanceof Promise || typeof P.then == "function") ? (f._playLock = !0, D(), P.then(function() {
7849
7849
  f._playLock = !1, C._unlocked = !0, l ? f._loadQueue() : f._emit("play", g._id);
7850
7850
  }).catch(function() {
7851
7851
  f._playLock = !1, f._emit("playerror", g._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), g._ended = !0, g._paused = !0;
7852
- })) : l || (f._playLock = !1, P(), f._emit("play", g._id)), C.playbackRate = g._rate, C.paused) {
7852
+ })) : l || (f._playLock = !1, D(), f._emit("play", g._id)), C.playbackRate = g._rate, C.paused) {
7853
7853
  f._emit("playerror", g._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
7854
7854
  return;
7855
7855
  }
@@ -8694,18 +8694,18 @@ var eo = {};
8694
8694
  };
8695
8695
  })();
8696
8696
  })(eo);
8697
- const yc = "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU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nAWB4O2M6nAaelR4r1OmVPFSwoksiWRUE1zc+f1lPc0ZudtdFDr4LLpoSwwGkpVO+oD6Tlb3HsYL7d+R1//td2LQMNF//NAxEwTaP5xYqJMCFlqIwAbEoCJNDEp9/3itYVbV6Yx/v0nuLdzyy50qHQw3cafmKlb6zBo0yXeRMnQG5J4jE7j4PFAkTSpQ9pexojMMsL0PIqP/Z1Xp/TpnVZZ27eWtNWRSSSyWyz/80LEWRSo1nDhWhgAlsstlkskgADyNOHqG5rlhLnSyI0a5oClU7uw0JnJQq2kTMBUYADEskGQ9wdHohh2xMKnCubKTIdyRgT83NEIrcfJpJOL3fV7l9cyXXJwJRDGpJLTZJF1+3OPUX3/80DEYiVyorJfmlgDRVRdYm21rHJXTVH0+ajd35ouiSF1tVcmLGnFummxbrhsXfHNzcf/2qgd/7XhppiSaYkmmQGRpnCsAMAEB4tQrXVA0VOiINSMWfljtMTHsRdZ3iL/V1neW6zvLf/zQsQnDSAiMFXMGADWd4i6zvEX+W/yzud5ZUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==";
8698
+ let wc = class {
8699
8699
  constructor() {
8700
8700
  this.sound = new eo.Howl({
8701
- src: [yc]
8701
+ src: [xc]
8702
8702
  });
8703
8703
  }
8704
8704
  play() {
8705
8705
  this.sound.play();
8706
8706
  }
8707
8707
  };
8708
- function wc(a, e, t = new J()) {
8708
+ function bc(a, e, t = new J()) {
8709
8709
  if (t.makeEmpty(), !a || !e)
8710
8710
  return t;
8711
8711
  a.updateWorldMatrix(!0, !0), e.updateWorldMatrix(!0, !0);
@@ -8727,8 +8727,8 @@ function wc(a, e, t = new J()) {
8727
8727
  n ? n(_, r) : r.fromBufferAttribute(d, _), r.applyMatrix4(s), t.expandByPoint(r), o = !0;
8728
8728
  }), (!o || t.isEmpty()) && (t.min.set(0, 0, 0), t.max.set(0, 0, 0)), t;
8729
8729
  }
8730
- function bc(a, e, t = new b()) {
8731
- return wc(a, e).getSize(t);
8730
+ function Ac(a, e, t = new b()) {
8731
+ return bc(a, e).getSize(t);
8732
8732
  }
8733
8733
  const Xe = (a) => {
8734
8734
  var e, t;
@@ -8744,22 +8744,22 @@ const Xe = (a) => {
8744
8744
  } catch {
8745
8745
  }
8746
8746
  };
8747
- function Ac(a) {
8747
+ function Tc(a) {
8748
8748
  return new b(a[0], a[1], a[2]);
8749
8749
  }
8750
- function Tc() {
8750
+ function Sc() {
8751
8751
  let a = 3, e = Math.max(1 / window.devicePixelRatio, 0.5);
8752
8752
  return window.innerWidth / window.innerHeight < 0.65 && (a = 4, e = 1 / window.devicePixelRatio), { tiles: a, renderScale: e };
8753
8753
  }
8754
- function Sc(a) {
8754
+ function Mc(a) {
8755
8755
  let e = !1, t = !1, i = !1, s = 1 / 0, r = 1 / 0, o = 1 / 0, c = -1 / 0, h = -1 / 0, u = -1 / 0, d = 0, n = 0;
8756
8756
  return a.traverse((f) => {
8757
- var P, C, E;
8757
+ var D, C, E;
8758
8758
  const m = f;
8759
8759
  if (!(m != null && m.isMesh) || !m.geometry || m.userData.ignoreSize)
8760
8760
  return;
8761
8761
  const _ = m.material;
8762
- if ((P = _ == null ? void 0 : _.userData) != null && P.isLOGO)
8762
+ if ((D = _ == null ? void 0 : _.userData) != null && D.isLOGO)
8763
8763
  return;
8764
8764
  const p = m.geometry, g = (C = p == null ? void 0 : p.attributes) == null ? void 0 : C.position;
8765
8765
  if (!g || g.count <= 0)
@@ -8773,12 +8773,12 @@ function Sc(a) {
8773
8773
  const S = x[A] || 0;
8774
8774
  if (S === 0)
8775
8775
  continue;
8776
- const D = y[A];
8776
+ const P = y[A];
8777
8777
  w.push({
8778
- attr: D,
8778
+ attr: P,
8779
8779
  weight: S,
8780
- array: D.array,
8781
- itemSize: D.itemSize ?? 3
8780
+ array: P.array,
8781
+ itemSize: P.itemSize ?? 3
8782
8782
  });
8783
8783
  }
8784
8784
  }
@@ -8786,8 +8786,8 @@ function Sc(a) {
8786
8786
  if (T && M >= 3) {
8787
8787
  const I = g.count, A = w.length > 0;
8788
8788
  for (let S = 0; S < I; S++) {
8789
- const D = S * M;
8790
- let R = T[D], k = T[D + 1], F = T[D + 2];
8789
+ const P = S * M;
8790
+ let R = T[P], k = T[P + 1], F = T[P + 2];
8791
8791
  if (A)
8792
8792
  for (let B = 0; B < w.length; B++) {
8793
8793
  const Q = w[B], U = Q.weight;
@@ -8804,19 +8804,19 @@ function Sc(a) {
8804
8804
  return;
8805
8805
  }
8806
8806
  for (let I = 0; I < g.count; I++) {
8807
- let A = g.getX(I), S = g.getY(I), D = g.getZ(I);
8807
+ let A = g.getX(I), S = g.getY(I), P = g.getZ(I);
8808
8808
  if (w.length > 0)
8809
8809
  for (let k = 0; k < w.length; k++) {
8810
8810
  const F = w[k], z = F.weight;
8811
- A += F.attr.getX(I) * z, S += F.attr.getY(I) * z, D += F.attr.getZ(I) * z;
8811
+ A += F.attr.getX(I) * z, S += F.attr.getY(I) * z, P += F.attr.getZ(I) * z;
8812
8812
  }
8813
- A < s && (s = A), S < r && (r = S), D < o && (o = D), A > c && (c = A), S > h && (h = S), D > u && (u = D), S > n && (n = S);
8813
+ A < s && (s = A), S < r && (r = S), P < o && (o = P), A > c && (c = A), S > h && (h = S), P > u && (u = P), S > n && (n = S);
8814
8814
  const R = A * A + S * S;
8815
8815
  R > d && (d = R);
8816
8816
  }
8817
8817
  }), s === 1 / 0 ? { box: new J(new b(0, 0, 0), new b(0, 0, 0)), maxRadius: 0, height: 0, hasWidth: t, hasLength: e, hasHeight: i } : { box: new J(new b(s, r, o), new b(c, h, u)), maxRadius: Math.sqrt(d), height: n, hasWidth: t, hasLength: e, hasHeight: i };
8818
8818
  }
8819
- function Mc(a, e, t = null) {
8819
+ function Cc(a, e, t = null) {
8820
8820
  let i = 0;
8821
8821
  return function() {
8822
8822
  let s = t || this, r = arguments;
@@ -8825,7 +8825,7 @@ function Mc(a, e, t = null) {
8825
8825
  }, e);
8826
8826
  };
8827
8827
  }
8828
- class Cc {
8828
+ class Ic {
8829
8829
  constructor(e, t, i) {
8830
8830
  this.length = e, this.width = t, this.height = i;
8831
8831
  }
@@ -8844,12 +8844,12 @@ function dr() {
8844
8844
  var e;
8845
8845
  if (typeof navigator > "u")
8846
8846
  return !1;
8847
- if (Ic())
8847
+ if (Dc())
8848
8848
  return !0;
8849
8849
  const a = (e = navigator.userAgent) == null ? void 0 : e.toLowerCase();
8850
8850
  return /iphone|ipad|ipod|android|mobile|blackberry|iemobile|opera mini/.test(a);
8851
8851
  }
8852
- function Ic() {
8852
+ function Dc() {
8853
8853
  try {
8854
8854
  if (typeof wx < "u" && wx.getSystemInfo || typeof my < "u" && my.alert || typeof tt < "u" && tt.getSystemInfo || typeof swan < "u" && swan.getSystemInfo)
8855
8855
  return !0;
@@ -8860,7 +8860,7 @@ function Ic() {
8860
8860
  function he(a) {
8861
8861
  return typeof a == "string" ? a.trim() : "";
8862
8862
  }
8863
- const Pc = new Ko(), Vt = new jo(), os = new qo();
8863
+ const Pc = new Zo(), Vt = new qo(), os = new Yo();
8864
8864
  let Wt = "./draco/";
8865
8865
  try {
8866
8866
  Wt = new URL("./draco/", import.meta.url).href;
@@ -8872,8 +8872,8 @@ os.setDecoderConfig({ type: "wasm" });
8872
8872
  os.setDecoderPath(Wt.endsWith("/") ? Wt : `${Wt}/`);
8873
8873
  os.preload();
8874
8874
  Vt.setDRACOLoader(os);
8875
- const nf = new Yo(), $r = [115, 103, 108, 98];
8876
- function of(a, e, t) {
8875
+ const of = new Ko(), $r = [115, 103, 108, 98];
8876
+ function af(a, e, t) {
8877
8877
  const i = JSON.stringify(e), s = new TextEncoder().encode(i), r = new Uint8Array([115, 103, 108, 98]), o = new Uint8Array(2);
8878
8878
  o[0] = t >> 8, o[1] = t & 255;
8879
8879
  const c = new Uint8Array(4);
@@ -8882,7 +8882,7 @@ function of(a, e, t) {
8882
8882
  let n = 0;
8883
8883
  return d.set(r, n), n += r.length, d.set(o, n), n += o.length, d.set(c, n), n += c.length, d.set(s, n), n += s.length, d.set(h, n), d.buffer;
8884
8884
  }
8885
- function Dc(a) {
8885
+ function Ec(a) {
8886
8886
  const e = new Uint8Array(a.slice(0, 4));
8887
8887
  let t = !0;
8888
8888
  for (let n = 0; n < $r.length; n++)
@@ -8950,13 +8950,13 @@ class $i {
8950
8950
  }
8951
8951
  }
8952
8952
  parse(e) {
8953
- return Dc(e);
8953
+ return Ec(e);
8954
8954
  }
8955
8955
  clear() {
8956
8956
  [...this.cache.values()];
8957
8957
  }
8958
8958
  }
8959
- const Ec = `*{box-sizing:border-box}.slot-item-container.is-mobile .main{pointer-events:none;border-width:1px;opacity:.8}.slot-item-container.is-mobile .main.focus{width:18px!important;height:18px!important;border-width:2px;opacity:1}.slot-item-container.is-mobile .main.focus.filled{border-color:#00ff95;border-radius:50%}.slot-item-container.is-mobile .main.filled{opacity:1;border-width:1px;width:14px!important;height:14px!important;background-image:none;border-radius:50%}.slot-item-container.is-mobile .main.to-be-installed{opacity:1;pointer-events:auto;width:38px!important;height:38px!important;border-color:#000;border-width:1px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cg%3e%3cg%3e%3cpath%20d='M20,10.75L0,10.75L0,9.25L20,9.25L20,10.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%20transform='matrix(0,1,1,0,10,-10)'%3e%3cpath%20d='M30,0.75L10,0.75L10,-0.75L30,-0.75L30,0.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:20px auto;background-repeat:no-repeat;background-position:center;background-color:#fff9}.slot-item-container.is-mobile .main.to-be-installed+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container.is-mobile .main.to-be-installed.filled{opacity:1;border-width:2px;width:18px!important;height:18px!important;background-image:none;border-radius:50%;border-color:#00ff95}.slot-item-container.is-mobile .main.to-be-installed.to-be-replaced{opacity:1;border-width:1px;pointer-events:auto;width:38px!important;height:38px!important;border-radius:50%;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_014299'%3e%3crect%20x='0'%20y='0'%20width='40'%20height='40'%20rx='20'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_014299)'%3e%3cg%3e%3cg%3e%3cpath%20d='M31.695414,17L26.009501,10.74549544L24.899591,11.75450456L28.304586,15.5L8.75,15.5L8.75,17L31.695414,17Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.3045862,23L13.9904997,29.2545042L15.10041,28.2454953L11.6954139,24.5L31.25,24.5L31.25,23L8.3045862,23Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:38px auto;border-color:#000}.slot-item-container.is-mobile .info{left:100%;margin-top:0;margin-left:4px}.slot-item-container.is-mobile .info .name-wrapper{margin-top:0;border-radius:0;background:#000;color:#fff}.slot-item-container.is-mobile .info>img{display:none}.slot-item-container .main{pointer-events:auto;cursor:pointer;font-size:12px;color:#fff;width:22px;height:22px;background:#fff0;border:1.5px solid #fff;border-radius:0;transition:background .2s,width .14s,height .14s,border .14s}.slot-item-container .main.disable{cursor:not-allowed}.slot-item-container .main.drag-over{border-color:red}.slot-item-container .main.can-install{position:relative;width:44px;height:44px}.slot-item-container .main.filled{border-color:#00ff95;border-radius:50%}.slot-item-container .main.selected{border-width:4px}.slot-item-container .main.selected+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.focus{border-color:#000}.slot-item-container .main.focus+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.focus.filled{border-color:#00ff95;border-radius:50%}.slot-item-container .main.has-error{border-color:red}.slot-item-container .main.hidden{display:none}.slot-item-container .main.hidden+.info{display:none}.slot-item-container .main:after{pointer-events:none;content:attr(data-name);transition:all .2s .3s;opacity:0;position:absolute;left:50%;bottom:100%;transform:translate3d(-50%,5px,0);white-space:nowrap;font-size:12px;color:#000;padding:2px 8px;border-radius:2px;background:#fff}.slot-item-container .main:hover{background:#ffffff80}.slot-item-container .main:hover+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .name{position:relative}.slot-item-container .name-wrapper{margin-top:-10px;white-space:nowrap;font-size:12px;color:#fff;padding:2px 8px;background:#000}.slot-item-container .functions-wrapper{z-index:20000;position:absolute;left:0;top:100%}.slot-item-container .functions-wrapper>.functions{display:inline-block;min-width:100px;padding:6px 0;border-left:1px solid #00ff95;border-radius:0 2px 2px 0;background:#0003;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.slot-item-container .functions-wrapper>.functions .btn-add{cursor:pointer;padding:2px 0;margin:0 8px;display:flex;justify-content:center;align-content:center;align-items:center;border:1px dashed #eee;font-size:12px;color:#eee;border-radius:2px;-webkit-backdrop-filter:none;backdrop-filter:none;background:#00050a80}.slot-item-container .functions-wrapper>.functions .btn-add.btn-not-allowed{cursor:not-allowed}.slot-item-container .functions-wrapper>.functions .function{display:flex;justify-content:space-between;white-space:nowrap;margin-bottom:6px;padding:0 8px;font-size:12px;color:#fff}.slot-item-container .functions-wrapper>.functions .function span{margin-right:4px}.slot-item-container .functions-wrapper>.functions .function .btn-remove{pointer-events:none;opacity:0;cursor:pointer;align-self:center;margin-right:0;height:14px;width:14px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAACnSURBVEiJxZaxFcMgDETPTuUtWCWTM4pZAq5RojRpnOfEyEKxSnh3HySeBEhNjZJJTRgUG89GyZWilbKOgJCaKmWtFG2UvFnwQr56jYAcengg3dozELPGIjh96x6hu26/DIa9vD0jq/nUA3nikQEkAOW9nACUGbf7skxlX2mIj1Ob0jK76QdxbYpGFNlk3rPnNndDQltFaLMLbdehAyd8ZP5l6Ed+W17xG7oN9QkytAAAAABJRU5ErkJggg==) center no-repeat;background-size:10px 10px}.slot-item-container .functions-wrapper>.functions .function:hover .btn-remove{pointer-events:auto;opacity:1;transform:scale(1.2)}.slot-item-container .device-name{position:relative;margin:2px 0;display:flex;min-width:120px;align-items:center;align-content:center;justify-content:space-between;white-space:nowrap;height:30px;padding:0 8px;font-size:14px;font-weight:700;color:#000;background:#fff}.slot-item-container .device-name .device-logo{margin-left:-8px;margin-right:4px;width:30px;height:30px;object-fit:contain}.slot-item-container .device-name span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:250px}.slot-item-container .device-name .btn-close{margin-left:8px;cursor:pointer;height:20px;width:20px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_017509'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_017509)'%3e%3cg%3e%3cpath%20d='M4.375,16.875L4.375,4.375L15.625,4.375L15.625,16.875L4.375,16.875ZM14.375,5.625L5.625,5.625L5.625,15.625L14.375,15.625L14.375,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.125,12.1875L8.125,8.125L9.375,8.125L9.375,12.1875L8.125,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M10.625,12.1875L10.625,8.125L11.875,8.125L11.875,12.1875L10.625,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M16.875,5.625L3.125,5.625L3.125,4.375L16.875,4.375L16.875,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M6.4446528999999995,5.625L13.545177899999999,5.625L11.8665838,2.5L8.15767372,2.5L6.4446528999999995,5.625ZM11.4548223,4.3749999L8.5553472,4.3749999L8.8979512,3.75L11.1191032,3.75L11.4548223,4.3749999Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e") center no-repeat;background-size:100% auto}.slot-item-container .device-name.empty{color:#000c;font-weight:400}.slot-item-container .device-name.empty .btn-close{display:none}.slot-item-container .device-name.empty:before{height:0}.slot-item-container .all-functions{opacity:0;pointer-events:none;min-width:80px;position:absolute;left:-10px;margin-left:100%;bottom:0;padding:6px 0;background:#fff;transition:all .3s}.slot-item-container .all-functions.show{opacity:1;pointer-events:auto;left:16px}.slot-item-container .all-functions label{margin-left:8px;margin-bottom:20px;color:#444e69;font-size:14px}.slot-item-container .all-functions .btn-close{cursor:pointer;position:absolute;right:7px;top:7px;height:16px;width:16px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAB4SURBVDiNpZPLEYAgDAUXe6MuoK4UpwdBwQkQJDcyb9+QnxORCOC9jyxE4Y78DiWxAIcmISKnxaSrtZhMNSOB+ZeacAS7ngl3k1JOBSBpk1INPib0YHjH+Du2S1DhlSZOYbPJ1iLtrLKrG2a9yJopYzTD8Jx+ArgAylOzjm1WpDwAAAAASUVORK5CYII=) center no-repeat;background-size:10px 10px}.slot-item-container .all-functions .functions{display:inline-block;max-height:200px;overflow-x:hidden;overflow-y:auto}.slot-item-container .all-functions .functions::-webkit-scrollbar{width:4px}.slot-item-container .all-functions .functions::-webkit-scrollbar-track{background-color:#fff}.slot-item-container .all-functions .functions::-webkit-scrollbar-thumb{background:#787878;border-radius:25px}.slot-item-container .all-functions .function{display:flex;justify-content:space-between;white-space:nowrap;padding:5px 10px;font-size:12px;color:#787878}.slot-item-container .all-functions .function span{display:flex;align-content:center;align-items:center;margin-right:4px}.slot-item-container .all-functions .function:hover{background:#444e6933}.slot-item-container .all-functions .btn-add{cursor:pointer;width:16px;font-size:16px;text-align:center;font-style:normal}.slot-item-container .info{overflow:hidden;margin-left:-2px;margin-top:-19px;position:absolute;left:100%;top:50%;transform:translateY(-50%);width:0;display:flex;align-items:flex-start;transition:all .3s}.slot-item-container .info>img{flex:0 0 auto;width:53px;height:29px}`, Rc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAA7CAYAAAB8MXT7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGTSURBVHic7dxLbQNBEIThnigADGEhxAwcBoZgCIZgBoZgCIZgCIaQMIgZVC4daw/xXPLoqdX/3fbW0milUtfutMCdpCkiLhEx1U6CLkkvkt4k7atnQYekfR7US/Us6JB0yIOaqmfBA5JWks6SrhzUwCRN+TYdq2dBx+ygDtWzoEPSNg9qVz0LOmZBgsQ3sqUkvufqAf6SpFVEnCPiFhHr1tqteCR8hyBhYrY6OlTPgo5cHX1I2lbPgo6lBInFk3Rc+uroqXqAn8ogcc3H19bae+U8eIDEZ0LSJoMEZeHIWB2ZIPEZoCw0QVlogsRnYlYWsjoaGUHCRK6OOKiRfa2OMvWtqufBAwQJE5SFJmZl4aZ6FnSQ+Azk6mjxZeFv+/fycfbDWrTW1pSFgyLxmcjVEWXh6CgLTZD4DMzKwguro4ERJEywOjIhaUdZaIAgYYKy0ABloQkSnwlxKZUHcSmVBxKfgVwdnSgLB8d35iZIfCYoC01QFpog8Y3rftFWrotO+cilVKMiSJigLDSS30hQFhr4BEcKZN0LNhDxAAAAAElFTkSuQmCC", en = { name: "", isMobile: !1 }, Lc = {
8959
+ const Rc = `*{box-sizing:border-box}.slot-item-container.is-mobile .main{pointer-events:none;border-width:1px;opacity:.8}.slot-item-container.is-mobile .main.focus{width:18px!important;height:18px!important;border-width:2px;opacity:1}.slot-item-container.is-mobile .main.focus.filled{border-color:#00ff95;border-radius:50%}.slot-item-container.is-mobile .main.filled{opacity:1;border-width:1px;width:14px!important;height:14px!important;background-image:none;border-radius:50%}.slot-item-container.is-mobile .main.to-be-installed{opacity:1;pointer-events:auto;width:38px!important;height:38px!important;border-color:#000;border-width:1px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cg%3e%3cg%3e%3cpath%20d='M20,10.75L0,10.75L0,9.25L20,9.25L20,10.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%20transform='matrix(0,1,1,0,10,-10)'%3e%3cpath%20d='M30,0.75L10,0.75L10,-0.75L30,-0.75L30,0.75Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:20px auto;background-repeat:no-repeat;background-position:center;background-color:#fff9}.slot-item-container.is-mobile .main.to-be-installed+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container.is-mobile .main.to-be-installed.filled{opacity:1;border-width:2px;width:18px!important;height:18px!important;background-image:none;border-radius:50%;border-color:#00ff95}.slot-item-container.is-mobile .main.to-be-installed.to-be-replaced{opacity:1;border-width:1px;pointer-events:auto;width:38px!important;height:38px!important;border-radius:50%;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_014299'%3e%3crect%20x='0'%20y='0'%20width='40'%20height='40'%20rx='20'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_014299)'%3e%3cg%3e%3cg%3e%3cpath%20d='M31.695414,17L26.009501,10.74549544L24.899591,11.75450456L28.304586,15.5L8.75,15.5L8.75,17L31.695414,17Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.3045862,23L13.9904997,29.2545042L15.10041,28.2454953L11.6954139,24.5L31.25,24.5L31.25,23L8.3045862,23Z'%20fill-rule='evenodd'%20fill='%23000000'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-size:38px auto;border-color:#000}.slot-item-container.is-mobile .info{left:100%;margin-top:0;margin-left:4px}.slot-item-container.is-mobile .info .name-wrapper{margin-top:0;border-radius:0;background:#000;color:#fff}.slot-item-container.is-mobile .info>img{display:none}.slot-item-container .main{pointer-events:auto;cursor:pointer;font-size:12px;color:#fff;width:22px;height:22px;background:#fff0;border:1.5px solid #fff;border-radius:0;transition:background .2s,width .14s,height .14s,border .14s}.slot-item-container .main.disable{cursor:not-allowed}.slot-item-container .main.drag-over{border-color:red}.slot-item-container .main.can-install{position:relative;width:44px;height:44px}.slot-item-container .main.filled{border-color:#00ff95;border-radius:50%}.slot-item-container .main.selected{border-width:4px}.slot-item-container .main.selected+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.focus{border-color:#000}.slot-item-container .main.focus+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .main.focus.filled{border-color:#00ff95;border-radius:50%}.slot-item-container .main.has-error{border-color:red}.slot-item-container .main.hidden{display:none}.slot-item-container .main.hidden+.info{display:none}.slot-item-container .main:after{pointer-events:none;content:attr(data-name);transition:all .2s .3s;opacity:0;position:absolute;left:50%;bottom:100%;transform:translate3d(-50%,5px,0);white-space:nowrap;font-size:12px;color:#000;padding:2px 8px;border-radius:2px;background:#fff}.slot-item-container .main:hover{background:#ffffff80}.slot-item-container .main:hover+.info{pointer-events:auto;overflow:visible;width:auto}.slot-item-container .name{position:relative}.slot-item-container .name-wrapper{margin-top:-10px;white-space:nowrap;font-size:12px;color:#fff;padding:2px 8px;background:#000}.slot-item-container .functions-wrapper{z-index:20000;position:absolute;left:0;top:100%}.slot-item-container .functions-wrapper>.functions{display:inline-block;min-width:100px;padding:6px 0;border-left:1px solid #00ff95;border-radius:0 2px 2px 0;background:#0003;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.slot-item-container .functions-wrapper>.functions .btn-add{cursor:pointer;padding:2px 0;margin:0 8px;display:flex;justify-content:center;align-content:center;align-items:center;border:1px dashed #eee;font-size:12px;color:#eee;border-radius:2px;-webkit-backdrop-filter:none;backdrop-filter:none;background:#00050a80}.slot-item-container .functions-wrapper>.functions .btn-add.btn-not-allowed{cursor:not-allowed}.slot-item-container .functions-wrapper>.functions .function{display:flex;justify-content:space-between;white-space:nowrap;margin-bottom:6px;padding:0 8px;font-size:12px;color:#fff}.slot-item-container .functions-wrapper>.functions .function span{margin-right:4px}.slot-item-container .functions-wrapper>.functions .function .btn-remove{pointer-events:none;opacity:0;cursor:pointer;align-self:center;margin-right:0;height:14px;width:14px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAACnSURBVEiJxZaxFcMgDETPTuUtWCWTM4pZAq5RojRpnOfEyEKxSnh3HySeBEhNjZJJTRgUG89GyZWilbKOgJCaKmWtFG2UvFnwQr56jYAcengg3dozELPGIjh96x6hu26/DIa9vD0jq/nUA3nikQEkAOW9nACUGbf7skxlX2mIj1Ob0jK76QdxbYpGFNlk3rPnNndDQltFaLMLbdehAyd8ZP5l6Ed+W17xG7oN9QkytAAAAABJRU5ErkJggg==) center no-repeat;background-size:10px 10px}.slot-item-container .functions-wrapper>.functions .function:hover .btn-remove{pointer-events:auto;opacity:1;transform:scale(1.2)}.slot-item-container .device-name{position:relative;margin:2px 0;display:flex;min-width:120px;align-items:center;align-content:center;justify-content:space-between;white-space:nowrap;height:30px;padding:0 8px;font-size:14px;font-weight:700;color:#000;background:#fff}.slot-item-container .device-name .device-logo{margin-left:-8px;margin-right:4px;width:30px;height:30px;object-fit:contain}.slot-item-container .device-name span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:250px}.slot-item-container .device-name .btn-close{margin-left:8px;cursor:pointer;height:20px;width:20px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_504_017509'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_504_017509)'%3e%3cg%3e%3cpath%20d='M4.375,16.875L4.375,4.375L15.625,4.375L15.625,16.875L4.375,16.875ZM14.375,5.625L5.625,5.625L5.625,15.625L14.375,15.625L14.375,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M8.125,12.1875L8.125,8.125L9.375,8.125L9.375,12.1875L8.125,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M10.625,12.1875L10.625,8.125L11.875,8.125L11.875,12.1875L10.625,12.1875Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M16.875,5.625L3.125,5.625L3.125,4.375L16.875,4.375L16.875,5.625Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3cg%3e%3cpath%20d='M6.4446528999999995,5.625L13.545177899999999,5.625L11.8665838,2.5L8.15767372,2.5L6.4446528999999995,5.625ZM11.4548223,4.3749999L8.5553472,4.3749999L8.8979512,3.75L11.1191032,3.75L11.4548223,4.3749999Z'%20fill-rule='evenodd'%20fill='%23999999'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e") center no-repeat;background-size:100% auto}.slot-item-container .device-name.empty{color:#000c;font-weight:400}.slot-item-container .device-name.empty .btn-close{display:none}.slot-item-container .device-name.empty:before{height:0}.slot-item-container .all-functions{opacity:0;pointer-events:none;min-width:80px;position:absolute;left:-10px;margin-left:100%;bottom:0;padding:6px 0;background:#fff;transition:all .3s}.slot-item-container .all-functions.show{opacity:1;pointer-events:auto;left:16px}.slot-item-container .all-functions label{margin-left:8px;margin-bottom:20px;color:#444e69;font-size:14px}.slot-item-container .all-functions .btn-close{cursor:pointer;position:absolute;right:7px;top:7px;height:16px;width:16px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAB4SURBVDiNpZPLEYAgDAUXe6MuoK4UpwdBwQkQJDcyb9+QnxORCOC9jyxE4Y78DiWxAIcmISKnxaSrtZhMNSOB+ZeacAS7ngl3k1JOBSBpk1INPib0YHjH+Du2S1DhlSZOYbPJ1iLtrLKrG2a9yJopYzTD8Jx+ArgAylOzjm1WpDwAAAAASUVORK5CYII=) center no-repeat;background-size:10px 10px}.slot-item-container .all-functions .functions{display:inline-block;max-height:200px;overflow-x:hidden;overflow-y:auto}.slot-item-container .all-functions .functions::-webkit-scrollbar{width:4px}.slot-item-container .all-functions .functions::-webkit-scrollbar-track{background-color:#fff}.slot-item-container .all-functions .functions::-webkit-scrollbar-thumb{background:#787878;border-radius:25px}.slot-item-container .all-functions .function{display:flex;justify-content:space-between;white-space:nowrap;padding:5px 10px;font-size:12px;color:#787878}.slot-item-container .all-functions .function span{display:flex;align-content:center;align-items:center;margin-right:4px}.slot-item-container .all-functions .function:hover{background:#444e6933}.slot-item-container .all-functions .btn-add{cursor:pointer;width:16px;font-size:16px;text-align:center;font-style:normal}.slot-item-container .info{overflow:hidden;margin-left:-2px;margin-top:-19px;position:absolute;left:100%;top:50%;transform:translateY(-50%);width:0;display:flex;align-items:flex-start;transition:all .3s}.slot-item-container .info>img{flex:0 0 auto;width:53px;height:29px}`, Lc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAAA7CAYAAAB8MXT7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGTSURBVHic7dxLbQNBEIThnigADGEhxAwcBoZgCIZgBoZgCIZgCIaQMIgZVC4daw/xXPLoqdX/3fbW0milUtfutMCdpCkiLhEx1U6CLkkvkt4k7atnQYekfR7US/Us6JB0yIOaqmfBA5JWks6SrhzUwCRN+TYdq2dBx+ygDtWzoEPSNg9qVz0LOmZBgsQ3sqUkvufqAf6SpFVEnCPiFhHr1tqteCR8hyBhYrY6OlTPgo5cHX1I2lbPgo6lBInFk3Rc+uroqXqAn8ogcc3H19bae+U8eIDEZ0LSJoMEZeHIWB2ZIPEZoCw0QVlogsRnYlYWsjoaGUHCRK6OOKiRfa2OMvWtqufBAwQJE5SFJmZl4aZ6FnSQ+Azk6mjxZeFv+/fycfbDWrTW1pSFgyLxmcjVEWXh6CgLTZD4DMzKwguro4ERJEywOjIhaUdZaIAgYYKy0ABloQkSnwlxKZUHcSmVBxKfgVwdnSgLB8d35iZIfCYoC01QFpog8Y3rftFWrotO+cilVKMiSJigLDSS30hQFhr4BEcKZN0LNhDxAAAAAElFTkSuQmCC", en = { name: "", isMobile: !1 }, kc = {
8960
8960
  "&": "&amp;",
8961
8961
  "<": "&lt;",
8962
8962
  ">": "&gt;",
@@ -8964,7 +8964,7 @@ const Ec = `*{box-sizing:border-box}.slot-item-container.is-mobile .main{pointer
8964
8964
  "'": "&#39;"
8965
8965
  };
8966
8966
  function Xt(a) {
8967
- return a == null ? "" : String(a).replace(/[&<>"']/g, (e) => Lc[e]);
8967
+ return a == null ? "" : String(a).replace(/[&<>"']/g, (e) => kc[e]);
8968
8968
  }
8969
8969
  function tn(...a) {
8970
8970
  return a.filter(Boolean).join(" ");
@@ -9139,11 +9139,11 @@ class to extends HTMLElement {
9139
9139
  </div>
9140
9140
  </div>` : "", c = this._deviceLogo ? `<img class="device-logo" src="${Xt(this._deviceLogo)}" alt="device logo">` : "", h = Xt(((d = this._slot) == null ? void 0 : d.name) ?? this._props.name ?? ""), u = Xt(this._deviceName || "待安装");
9141
9141
  this.shadowRoot.innerHTML = `
9142
- <style>${Ec}</style>
9142
+ <style>${Rc}</style>
9143
9143
  <div class="${e}">
9144
9144
  <div class="${t}" style="width:${this._size}px;height:${this._size}px"></div>
9145
9145
  <div class="info">
9146
- <img alt="" src="${Rc}">
9146
+ <img alt="" src="${Lc}">
9147
9147
  <div class="name">
9148
9148
  <div class="name-wrapper">${h}</div>
9149
9149
  <div class="functions-wrapper">
@@ -9209,7 +9209,7 @@ const ne = {
9209
9209
  class sn extends Ke {
9210
9210
  constructor(e) {
9211
9211
  const t = document.createElement("div");
9212
- super(t), this.props = e, this._emitter = new yt(), this._slotContainer = new De(), this._bracketSlots = [], this._hasError = !1, this.useBracket = !1, this.addEventListener = this._emitter.addListener.bind(this._emitter), this.removeEventListener = this._emitter.removeListener.bind(this._emitter), this._canInstall = !1, this._loading = !1, this._selected = !1, this._deviceSelected = !1, this._focused = !1, this._toBeInstalled = !1, this._toBeReplaced = !1, this._allFunctions = /* @__PURE__ */ new Set(), this._functions = /* @__PURE__ */ new Set(), this._timer = 0, this._parentPos = new b(), this._wrapper = new De(), this._showSlot = !0, this._isMirror = !1, this.beforeInstall = void 0, this._preventDefaults = (i) => {
9212
+ super(t), this.props = e, this._emitter = new yt(), this._slotContainer = new Pe(), this._bracketSlots = [], this._hasError = !1, this.useBracket = !1, this.addEventListener = this._emitter.addListener.bind(this._emitter), this.removeEventListener = this._emitter.removeListener.bind(this._emitter), this._canInstall = !1, this._loading = !1, this._selected = !1, this._deviceSelected = !1, this._focused = !1, this._toBeInstalled = !1, this._toBeReplaced = !1, this._allFunctions = /* @__PURE__ */ new Set(), this._functions = /* @__PURE__ */ new Set(), this._timer = 0, this._parentPos = new b(), this._wrapper = new Pe(), this._showSlot = !0, this._isMirror = !1, this.beforeInstall = void 0, this._preventDefaults = (i) => {
9213
9213
  i.preventDefault(), i.stopPropagation();
9214
9214
  }, this.getWP = this._slotContainer.getWorldPosition.bind(this._slotContainer), t.setAttribute("data-ui-type", "slot"), this._showSlot = typeof e.show == "boolean" ? e.show : !0, this.name = e.name, this._isMirror = e.isMirror, this._slotUI = new to({
9215
9215
  name: e.name,
@@ -9423,10 +9423,10 @@ class sn extends Ke {
9423
9423
  this._slotUI.setSize(o);
9424
9424
  }
9425
9425
  clone(e) {
9426
- return new De();
9426
+ return new Pe();
9427
9427
  }
9428
9428
  }
9429
- class kc extends Ke {
9429
+ class Fc extends Ke {
9430
9430
  constructor(e) {
9431
9431
  const t = document.createElement("div");
9432
9432
  super(t), this._text = document.createElement("div");
@@ -9470,7 +9470,7 @@ class kc extends Ke {
9470
9470
  this.element && this.element.parentNode && this.element.parentNode.removeChild(this.element);
9471
9471
  }
9472
9472
  }
9473
- class Yi extends De {
9473
+ class Yi extends Pe {
9474
9474
  constructor(e, t = !0, i = !0) {
9475
9475
  super(), this._startWith = e, this._showText = t, this.useStartEnd = i, this._line2Length = 0.01, this._line = new zs(
9476
9476
  new re(),
@@ -9484,7 +9484,7 @@ class Yi extends De {
9484
9484
  color: "#666",
9485
9485
  linewidth: 2
9486
9486
  })
9487
- ), this._text = new kc(""), this._line.frustumCulled = !1, this.add(this._line, this._line2), this._showText && (this.add(this._text), this._text.onPointMove = () => {
9487
+ ), this._text = new Fc(""), this._line.frustumCulled = !1, this.add(this._line, this._line2), this._showText && (this.add(this._text), this._text.onPointMove = () => {
9488
9488
  this._line.material.color.set("#000"), this._line2.material.color.set("#000");
9489
9489
  }, this._text.onPointLeave = () => {
9490
9490
  this._line.material.color.set("#666"), this._line2.material.color.set("#666");
@@ -9524,7 +9524,7 @@ class Yi extends De {
9524
9524
  class io extends Ee {
9525
9525
  // 上一次的角度
9526
9526
  constructor(e, t) {
9527
- super(), this.radius = e, this._text = new Fc(""), this._line = new Yi(void 0, !1, !1), this._box = new q(), this._arc = new Ln(), this._previousPosition = null, this._updateTimer = null, this._updateDelay = 300, this._accumulatedAngle = 0, this._lastAngle = null, this._line.updateMaterial(new Us({
9527
+ super(), this.radius = e, this._text = new Bc(""), this._line = new Yi(void 0, !1, !1), this._box = new q(), this._arc = new Ln(), this._previousPosition = null, this._updateTimer = null, this._updateDelay = 300, this._accumulatedAngle = 0, this._lastAngle = null, this._line.updateMaterial(new Us({
9528
9528
  color: "#555",
9529
9529
  dashSize: 0.06,
9530
9530
  gapSize: 0.06
@@ -9591,7 +9591,7 @@ class io extends Ee {
9591
9591
  return h.setPositions(s), h.instanceCount = Math.max(0, s.length / 3 - 1), h;
9592
9592
  }
9593
9593
  }
9594
- class Fc extends Ke {
9594
+ class Bc extends Ke {
9595
9595
  constructor(e) {
9596
9596
  const t = document.createElement("div");
9597
9597
  super(t), this._wrapper = document.createElement("div"), this._circle = document.createElement("div");
@@ -9613,7 +9613,7 @@ class Fc extends Ke {
9613
9613
  this._circle.style.background = e;
9614
9614
  }
9615
9615
  }
9616
- const Bc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAUCAYAAADY6P5TAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEvSURBVFiFzZdbFYMwEEQroRKQgAQkVEIlICEOkFAJlRAJSIgEJNx+sPS0nGxIaOhyv3nM7mTmwOViDHAFesADD+BqrakKQAcMwMQ3AWis9e1C3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f/fs699iAOfNWU9r3LCxc17nHBrzJDhciS4fqplKY6gMYwIlW04NXFuxfV1LlHsBS+BrHWtJnSbWkVtLfknZVVW1zjQuYit4+1Ejain1oVARGBv4OKG74taSd2PiBn3oBsVb3Jmurw36yzzW2pSIwCuABciPpkwgQLNSZgIj7QZtrbOgQGAXyAGkk/aVux1mr23F2kr5J2rLzYMr8iKVah228UVc97CR9VbeNU0EUhsCYgNDCWqvbwRr/0VZdgOzEDoZChe230SEgpMP2uxUtpkkgMCbKDxds1LWxUpjsddgJW1HGY2Qn3tzUOrRYU/XAdjlRBMaMnAkR6bidtZPU8m4O7+VrDisdt06l43Boq6raZRkgBkdgzJyHSOoXx0X1Vl018l2HxUWCBEe8Yqj9tla3DaX7O3XbTmortVQO80ZgLFCYBFKQfAz39+omgr1obS2GL0KndlLaHtJjMRjSGwuqhgUiMHDkREWyCt+3OoRJqkxa8c6yeP66xttH/5pe3/S67tS9tjtJe4IBEYGBi4UwWek4TFLF0uplhbIPj+9peQ0vhMEqfP0Uvq91/Lq0IhTwGwgMDKb3Lnalw7vY9H0tDw4dqhPpUK1IIVy0wIDxduGpWy3pD70MhpWO/1/uJP2jEA5UfxgKgYFRhQmx1vGk99F/JT6WbvverfXf3aubHJM23E+/27//wqUT6htXPk1jTeoz9//Q6UCIf9/q5X/zd/WqNXGQAkZGYKB4YaLuf43300QsvZy8+9+/9fhrzoVP+8pjMdjiY0eBRiWA0v0fPGR4m68wwtkAAAAASUVORK5CYII=";
9617
9617
  class nn extends Ke {
9618
9618
  constructor(e, t) {
9619
9619
  const i = document.createElement("div");
@@ -9692,11 +9692,11 @@ class nn extends Ke {
9692
9692
  g.name === n.name && (p = g);
9693
9693
  }), p)) {
9694
9694
  const g = document.createElement("div");
9695
- g.style.background = `url(${zc}) center no-repeat`, g.style.backgroundSize = "100% auto", g.style.position = "absolute", g.style.top = "-50%", g.style.left = "-50%", g.style.width = s ? "140px" : "160px", g.style.height = s ? "70px" : "80px", g.style.transform = "translateX(-50%) translateY(-50%)", i.append(g);
9695
+ g.style.background = `url(${Wc}) center no-repeat`, g.style.backgroundSize = "100% auto", g.style.position = "absolute", g.style.top = "-50%", g.style.left = "-50%", g.style.width = s ? "140px" : "160px", g.style.height = s ? "70px" : "80px", g.style.transform = "translateX(-50%) translateY(-50%)", i.append(g);
9696
9696
  const v = document.createElement("div");
9697
- v.style.background = `url(${Oc}) center no-repeat`, v.style.backgroundSize = "100% auto", v.style.width = v.style.height = s ? "20px" : "26px", v.style.position = "absolute", v.style.top = "0", v.style.transform = "translateY(-50%)", v.style.marginBottom = "5px", v.setAttribute("data-direction", "left"), i.append(v);
9697
+ v.style.background = `url(${zc}) center no-repeat`, v.style.backgroundSize = "100% auto", v.style.width = v.style.height = s ? "20px" : "26px", v.style.position = "absolute", v.style.top = "0", v.style.transform = "translateY(-50%)", v.style.marginBottom = "5px", v.setAttribute("data-direction", "left"), i.append(v);
9698
9698
  const y = document.createElement("div");
9699
- y.style.background = `url(${Bc}) center no-repeat`, y.style.backgroundSize = "100% auto", y.style.width = y.style.height = s ? "20px" : "26px", y.style.position = "absolute", v.style.left = y.style.right = s ? "62px" : "69px", y.style.top = "0", y.style.transform = "translateY(-50%)", y.style.marginBottom = "5px", y.setAttribute("data-direction", "right"), i.append(y), Array.from([v, y]).forEach((x) => {
9699
+ y.style.background = `url(${Oc}) center no-repeat`, y.style.backgroundSize = "100% auto", y.style.width = y.style.height = s ? "20px" : "26px", y.style.position = "absolute", v.style.left = y.style.right = s ? "62px" : "69px", y.style.top = "0", y.style.transform = "translateY(-50%)", y.style.marginBottom = "5px", y.setAttribute("data-direction", "right"), i.append(y), Array.from([v, y]).forEach((x) => {
9700
9700
  s || x.addEventListener("mousemove", () => {
9701
9701
  x.style.filter = "invert(100%)";
9702
9702
  }), x.addEventListener("mouseleave", () => {
@@ -9733,7 +9733,7 @@ class nn extends Ke {
9733
9733
  this._emitter.removeAllListeners(), cancelAnimationFrame(this._looper), this.element.remove();
9734
9734
  }
9735
9735
  }
9736
- class Wc extends Zo {
9736
+ class Uc extends Xo {
9737
9737
  constructor(e) {
9738
9738
  const t = document.createElement("div");
9739
9739
  super(t), this.props = e, this._scale = 0.01, this._emitter = new yt(), this.addEventListener = this._emitter.on.bind(this._emitter), this.removeEventListener = this._emitter.on.bind(this._emitter), this._mouseStart = new G(), this._targetSize = new G(), this._caches = [], this._sizeFlag = "width", this._direction = 1, this._lines = [], this._pointerdown = (h) => {
@@ -9764,7 +9764,7 @@ class Wc extends Zo {
9764
9764
  this._lines.forEach((e) => e.dispose()), this._emitter.removeAllListeners(), this.endNode.removeEventListener("pointerdown", this._pointerdown), this.endNode.removeEventListener("pointermove", this._pointermove), this.endNode.removeEventListener("pointerup", this._pointercancel), this.element.remove(), this._caches.forEach((e) => e.clear()), this._caches = [];
9765
9765
  }
9766
9766
  }
9767
- class Uc extends Ee {
9767
+ class Hc extends Ee {
9768
9768
  constructor() {
9769
9769
  super(), this._box3 = new J(), this._line11 = new Yi("长:"), this._line12 = new Yi("宽:"), this._line13 = new Yi("高:"), this._outline = new io(0, 0), this._radius = 0, this._hasWidthConfig = !1, this._hasLengthConfig = !1, this._hasHeightConfig = !1, this.follow = "", this.followOrigin = 0, this.followScale = 1, this.originOffset = 0, this.translateCache = 0, this.head = 0, this.tail = 0, this._change = () => {
9770
9770
  if (!this._app)
@@ -9818,7 +9818,7 @@ class Uc extends Ee {
9818
9818
  update(e = 0) {
9819
9819
  if (!this._object)
9820
9820
  return;
9821
- const t = this._object, { box: i, maxRadius: s, hasLength: r, hasHeight: o, hasWidth: c } = Sc(t);
9821
+ const t = this._object, { box: i, maxRadius: s, hasLength: r, hasHeight: o, hasWidth: c } = Mc(t);
9822
9822
  this.tail = Math.abs(i.min.x), this.head = Math.abs(i.max.x), this._hasWidthConfig = c, this._hasLengthConfig = r, this._hasHeightConfig = o, this._box3.copy(i), this._radius = s, this.follow && e && (this.originOffset = (this.followOrigin - e) * this.followScale), this._outline.update(this._radius), this._change();
9823
9823
  const h = this._box3.min.x, u = this._box3.max.x, d = this._box3.min.z, n = this._box3.max.z, l = this._box3.min.y, f = this._box3.max.y;
9824
9824
  let m = 0.2;
@@ -9883,10 +9883,10 @@ class Be extends q {
9883
9883
  this.lineSegments = new zs(s, this._lineMaterial), this.add(this.lineSegments), this.lineSegments.geometry.dispose(), this.lineSegments.geometry = s, this.lineSegments.computeLineDistances();
9884
9884
  }
9885
9885
  }
9886
- const Hc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAALSURBVAiZY2AAAgAABQABYlUyiAAAAABJRU5ErkJggg==";
9886
+ const Nc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAALSURBVAiZY2AAAgAABQABYlUyiAAAAABJRU5ErkJggg==";
9887
9887
  class on {
9888
9888
  constructor(e) {
9889
- this._props = e, this.name = "", this.transparentTexture = so.load(Hc), this._offscreen = new OffscreenCanvas(0, 0), this._defaults = { ...e }, this.target = e.target, this.parent = this.target.parent, this.reset();
9889
+ this._props = e, this.name = "", this.transparentTexture = so.load(Nc), this._offscreen = new OffscreenCanvas(0, 0), this._defaults = { ...e }, this.target = e.target, this.parent = this.target.parent, this.reset();
9890
9890
  }
9891
9891
  get imageSize() {
9892
9892
  return this._props.imageSize;
@@ -10253,20 +10253,20 @@ class an {
10253
10253
  for (let A = 0; A < this._jointStates.length; A++) {
10254
10254
  const S = this._jointStates[A];
10255
10255
  if (S.prevAngle = S.currentAngle, S.prevAngles && S.currentAngles)
10256
- for (let D = 0; D < S.currentAngles.length; D++)
10257
- S.prevAngles[D] = S.currentAngles[D];
10256
+ for (let P = 0; P < S.currentAngles.length; P++)
10257
+ S.prevAngles[P] = S.currentAngles[P];
10258
10258
  }
10259
- let T = m, M = _, P = 0;
10259
+ let T = m, M = _, D = 0;
10260
10260
  for (let A = 0; A < this.iterations; A++) {
10261
10261
  i.getWorldPosition(s);
10262
- const S = s.distanceToSquared(r), D = S < l, R = d ? this._orientationErrorAngle() : 0, k = !d || R <= f;
10263
- if (D && k)
10262
+ const S = s.distanceToSquared(r), P = S < l, R = d ? this._orientationErrorAngle() : 0, k = !d || R <= f;
10263
+ if (P && k)
10264
10264
  break;
10265
10265
  if (S >= T * 0.9 && (!d || R >= M * 0.5)) {
10266
- if (P++, P >= 2)
10266
+ if (D++, D >= 2)
10267
10267
  break;
10268
10268
  } else
10269
- P = 0;
10269
+ D = 0;
10270
10270
  T = S, M = R;
10271
10271
  let F = 0, z = d ? t : e === t ? t - 1 : t;
10272
10272
  z = Math.max(0, Math.min(this.links.length - 1, z));
@@ -10317,8 +10317,8 @@ class an {
10317
10317
  }
10318
10318
  }
10319
10319
  }
10320
- const it = new Rn(), Jt = new b(), Nc = new ee(), ln = new b(), cn = new b(), bs = { type: "change" }, hn = { type: "mouseDown", mode: null }, un = { type: "mouseUp", mode: null }, Vc = { type: "objectChange" }, Pi = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap();
10321
- function Gc(a) {
10320
+ const it = new Rn(), Jt = new b(), Vc = new ee(), ln = new b(), cn = new b(), bs = { type: "change" }, hn = { type: "mouseDown", mode: null }, un = { type: "mouseUp", mode: null }, Gc = { type: "objectChange" }, Di = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap();
10321
+ function Qc(a) {
10322
10322
  if (!this.domElement)
10323
10323
  return { x: 0, y: 0, button: a.button };
10324
10324
  if (this.domElement.ownerDocument.pointerLockElement)
@@ -10340,7 +10340,7 @@ function Ei(a, e, t) {
10340
10340
  function As(a) {
10341
10341
  return a === "E" ? "rotate" : a === "XYZ" ? "translate" : null;
10342
10342
  }
10343
- class Qc extends Ee {
10343
+ class jc extends Ee {
10344
10344
  constructor(e) {
10345
10345
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
10346
10346
  }
@@ -10424,7 +10424,7 @@ const oe = class oe extends Ee {
10424
10424
  transparent: !0,
10425
10425
  opacity: 0.7
10426
10426
  });
10427
- this._startMarker = new q(r, o), this._startMarker.renderOrder = 1 / 0, this._startMarker.visible = !1, this._endMarker = new q(r, o), this._endMarker.renderOrder = 1 / 0, this._endMarker.visible = !1, this._deltaGeom = new re(), this._deltaGeom.setAttribute("position", new Io(new Float32Array(2 * 3), 3)), this._deltaLine = new Po(this._deltaGeom, this._matHelper), this._deltaLine.renderOrder = 1 / 0, this._deltaLine.visible = !1, this.helper.add(this._startMarker), this.helper.add(this._endMarker), this.helper.add(this._deltaLine), this.add(this.gizmo), this.add(this.picker), this.add(this.helper);
10427
+ this._startMarker = new q(r, o), this._startMarker.renderOrder = 1 / 0, this._startMarker.visible = !1, this._endMarker = new q(r, o), this._endMarker.renderOrder = 1 / 0, this._endMarker.visible = !1, this._deltaGeom = new re(), this._deltaGeom.setAttribute("position", new Io(new Float32Array(2 * 3), 3)), this._deltaLine = new Do(this._deltaGeom, this._matHelper), this._deltaLine.renderOrder = 1 / 0, this._deltaLine.visible = !1, this.helper.add(this._startMarker), this.helper.add(this._endMarker), this.helper.add(this._deltaLine), this.add(this.gizmo), this.add(this.picker), this.add(this.helper);
10428
10428
  }
10429
10429
  get isExpanded() {
10430
10430
  return this._isExpanded;
@@ -10502,13 +10502,13 @@ const oe = class oe extends Ee {
10502
10502
  const x = t.pointStart, w = t.pointEnd;
10503
10503
  if (x.lengthSq() > 1e-12 && w.lengthSq() > 1e-12) {
10504
10504
  ln.set(1, 0, 0).applyQuaternion(t.cameraQuaternion), cn.set(0, 1, 0).applyQuaternion(t.cameraQuaternion);
10505
- const T = x.dot(ln), M = x.dot(cn), P = Math.atan2(M, T), C = t.rotationAngle;
10505
+ const T = x.dot(ln), M = x.dot(cn), D = Math.atan2(M, T), C = t.rotationAngle;
10506
10506
  if (Math.abs(C) < 1e-4)
10507
10507
  this._arcLine.visible = !1, this._arcGeom.instanceCount = 0;
10508
10508
  else {
10509
- const E = this._arcSegments, I = Math.max(2, Math.min(E, Math.ceil(Math.abs(C) / (Math.PI * 2) * E))), A = C / I, S = oe.RING_RADIUS, D = Math.sign(C) * this._arcStartAngleOffset;
10509
+ const E = this._arcSegments, I = Math.max(2, Math.min(E, Math.ceil(Math.abs(C) / (Math.PI * 2) * E))), A = C / I, S = oe.RING_RADIUS, P = Math.sign(C) * this._arcStartAngleOffset;
10510
10510
  for (let F = 0; F <= I; F++) {
10511
- const z = P + D + A * F, B = Math.cos(z) * S, Q = Math.sin(z) * S, U = F * 3;
10511
+ const z = D + P + A * F, B = Math.cos(z) * S, Q = Math.sin(z) * S, U = F * 3;
10512
10512
  this._arcPositions[U] = B, this._arcPositions[U + 1] = Q, this._arcPositions[U + 2] = 0;
10513
10513
  }
10514
10514
  for (let F = I + 1; F <= E; F++) {
@@ -10516,7 +10516,7 @@ const oe = class oe extends Ee {
10516
10516
  this._arcPositions[z] = 0, this._arcPositions[z + 1] = 0, this._arcPositions[z + 2] = 0;
10517
10517
  }
10518
10518
  this._arcGeom.setPositions(this._arcPositions), this._arcGeom.instanceCount = I, this._arcLine.computeLineDistances(), this._arcGeom.computeBoundingSphere();
10519
- const R = Math.cos(P) * oe.RING_RADIUS * this._ringScale, k = Math.sin(P) * oe.RING_RADIUS * this._ringScale;
10519
+ const R = Math.cos(D) * oe.RING_RADIUS * this._ringScale, k = Math.sin(D) * oe.RING_RADIUS * this._ringScale;
10520
10520
  Jt.set(R, k, 0), Jt.applyQuaternion(t.cameraQuaternion), Jt.multiplyScalar(o), Jt.add(r), this._startMarker.position.copy(Jt);
10521
10521
  }
10522
10522
  } else
@@ -10528,7 +10528,7 @@ const oe = class oe extends Ee {
10528
10528
  };
10529
10529
  oe.RING_RADIUS = 0.18, oe.RING_TUBE = 3e-3, oe.PICKER_RING_TUBE = 0.025, oe.MOVE_RADIUS = 0.04, oe.PICKER_MOVE_RADIUS = 0.2;
10530
10530
  let Ys = oe;
10531
- class jc extends q {
10531
+ class qc extends q {
10532
10532
  constructor() {
10533
10533
  super(
10534
10534
  new mi(1e5, 1e5, 2, 2),
@@ -10549,14 +10549,14 @@ class jc extends q {
10549
10549
  this.position.copy(i), this.quaternion.copy(t.cameraQuaternion), super.updateMatrixWorld(e);
10550
10550
  }
10551
10551
  }
10552
- class qc extends Do {
10552
+ class Yc extends Po {
10553
10553
  constructor(e, t = null) {
10554
10554
  super(), this.domElement = null, this._offset = new b(), this._startNorm = new b(), this._endNorm = new b(), this._cameraScale = new b(), this._parentPosition = new b(), this._parentQuaternion = new ee(), this._parentQuaternionInv = new ee(), this._parentScale = new b(), this._worldScaleStart = new b(), this._worldQuaternionInv = new ee(), this._worldScale = new b(), this._positionStart = new b(), this._quaternionStart = new ee(), this._scaleStart = new b(), this._capturePointerId = null, this._captureDocument = null, this._hoverShieldActive = !1;
10555
- const i = new Qc(this);
10555
+ const i = new jc(this);
10556
10556
  this._root = i;
10557
10557
  const s = new Ys(this);
10558
10558
  this._gizmo = s, i.add(s);
10559
- const r = new jc();
10559
+ const r = new qc();
10560
10560
  this._plane = r, i.add(r);
10561
10561
  const o = this;
10562
10562
  function c(h, u) {
@@ -10570,7 +10570,7 @@ class qc extends Do {
10570
10570
  }
10571
10571
  }), o[h] = u, r[h] = u, s[h] = u;
10572
10572
  }
10573
- c("camera", e), c("object", void 0), c("enabled", !0), c("depthTest", !0), c("axis", null), c("mode", "default"), c("space", "world"), c("size", 0.25), c("dragging", !1), c("gizmoPriority", !0), c("worldPosition", new b()), c("worldPositionStart", new b()), c("worldQuaternion", new ee()), c("worldQuaternionStart", new ee()), c("cameraPosition", new b()), c("cameraQuaternion", new ee()), c("pointStart", new b()), c("pointEnd", new b()), c("rotationAxis", new b()), c("rotationAngle", 0), c("eye", new b()), this._getPointer = Gc.bind(this), this._onPointerDown = this._handlePointerDown.bind(this), this._onPointerHover = this._handlePointerHover.bind(this), this._onPointerMove = this._handlePointerMove.bind(this), this._onPointerUp = this._handlePointerUp.bind(this), this._onPointerDownCapture = this._handlePointerDownCapture.bind(this), this._onPointerMoveCapture = this._handlePointerMoveCapture.bind(this), this._onPointerUpCapture = this._handlePointerUpCapture.bind(this), this._onMouseMoveCapture = this._handleMouseMoveCapture.bind(this), t !== null && this.connect(t);
10573
+ c("camera", e), c("object", void 0), c("enabled", !0), c("depthTest", !0), c("axis", null), c("mode", "default"), c("space", "world"), c("size", 0.25), c("dragging", !1), c("gizmoPriority", !0), c("worldPosition", new b()), c("worldPositionStart", new b()), c("worldQuaternion", new ee()), c("worldQuaternionStart", new ee()), c("cameraPosition", new b()), c("cameraQuaternion", new ee()), c("pointStart", new b()), c("pointEnd", new b()), c("rotationAxis", new b()), c("rotationAngle", 0), c("eye", new b()), this._getPointer = Qc.bind(this), this._onPointerDown = this._handlePointerDown.bind(this), this._onPointerHover = this._handlePointerHover.bind(this), this._onPointerMove = this._handlePointerMove.bind(this), this._onPointerUp = this._handlePointerUp.bind(this), this._onPointerDownCapture = this._handlePointerDownCapture.bind(this), this._onPointerMoveCapture = this._handlePointerMoveCapture.bind(this), this._onPointerUpCapture = this._handlePointerUpCapture.bind(this), this._onMouseMoveCapture = this._handleMouseMoveCapture.bind(this), t !== null && this.connect(t);
10574
10574
  }
10575
10575
  connect(e) {
10576
10576
  this.domElement = e, this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
@@ -10636,8 +10636,8 @@ class qc extends Do {
10636
10636
  this._hoverShieldActive = !0;
10637
10637
  const r = $t.get(t) ?? 0;
10638
10638
  $t.set(t, r + 1);
10639
- let o = Di.get(t);
10640
- o || (o = t.createElement("div"), o.style.position = "fixed", o.style.left = "0", o.style.top = "0", o.style.right = "0", o.style.bottom = "0", o.style.cursor = "grab", o.style.pointerEvents = "auto", o.style.background = "transparent", o.style.zIndex = "2147483647", Di.set(t, o)), o.parentElement || t.body.appendChild(o);
10639
+ let o = Pi.get(t);
10640
+ o || (o = t.createElement("div"), o.style.position = "fixed", o.style.left = "0", o.style.top = "0", o.style.right = "0", o.style.bottom = "0", o.style.cursor = "grab", o.style.pointerEvents = "auto", o.style.background = "transparent", o.style.zIndex = "2147483647", Pi.set(t, o)), o.parentElement || t.body.appendChild(o);
10641
10641
  return;
10642
10642
  }
10643
10643
  if (!this._hoverShieldActive)
@@ -10646,8 +10646,8 @@ class qc extends Do {
10646
10646
  const i = $t.get(t) ?? 0, s = Math.max(0, i - 1);
10647
10647
  if (s === 0) {
10648
10648
  $t.delete(t);
10649
- const r = Di.get(t);
10650
- r != null && r.parentElement && r.parentElement.removeChild(r), Di.delete(t);
10649
+ const r = Pi.get(t);
10650
+ r != null && r.parentElement && r.parentElement.removeChild(r), Pi.delete(t);
10651
10651
  } else
10652
10652
  $t.set(t, s);
10653
10653
  }
@@ -10709,7 +10709,7 @@ class qc extends Do {
10709
10709
  return;
10710
10710
  e !== null && it.setFromCamera(e, this.camera);
10711
10711
  const r = Ei(this._plane, it, !0);
10712
- r && (this.pointEnd.copy(r.point).sub(this.worldPositionStart), s === "translate" ? (this._offset.copy(this.pointEnd).sub(this.pointStart), this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), i.position.copy(this._offset).add(this._positionStart)) : s === "rotate" && (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.rotationAxis.applyQuaternion(this._parentQuaternionInv), i.quaternion.copy(Nc.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), i.quaternion.multiply(this._quaternionStart).normalize()), this.dispatchEvent(bs), this.dispatchEvent(Vc));
10712
+ r && (this.pointEnd.copy(r.point).sub(this.worldPositionStart), s === "translate" ? (this._offset.copy(this.pointEnd).sub(this.pointStart), this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), i.position.copy(this._offset).add(this._positionStart)) : s === "rotate" && (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.rotationAxis.applyQuaternion(this._parentQuaternionInv), i.quaternion.copy(Vc.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), i.quaternion.multiply(this._quaternionStart).normalize()), this.dispatchEvent(bs), this.dispatchEvent(Gc));
10713
10713
  }
10714
10714
  pointerUp(e) {
10715
10715
  if (!(e !== null && e.button !== 0)) {
@@ -10723,22 +10723,22 @@ class qc extends Do {
10723
10723
  _updateCursor() {
10724
10724
  if (!this.domElement)
10725
10725
  return;
10726
- const e = Pi.get(this.domElement);
10726
+ const e = Di.get(this.domElement);
10727
10727
  if (this.dragging) {
10728
- this.domElement.style.cursor = "grabbing", Pi.set(this.domElement, this);
10728
+ this.domElement.style.cursor = "grabbing", Di.set(this.domElement, this);
10729
10729
  return;
10730
10730
  }
10731
10731
  if (this.axis) {
10732
- this.domElement.style.cursor = "grab", Pi.set(this.domElement, this);
10732
+ this.domElement.style.cursor = "grab", Di.set(this.domElement, this);
10733
10733
  return;
10734
10734
  }
10735
- e === this && (this.domElement.style.cursor = "", Pi.delete(this.domElement));
10735
+ e === this && (this.domElement.style.cursor = "", Di.delete(this.domElement));
10736
10736
  }
10737
10737
  _isAxisAllowed(e) {
10738
10738
  return this.mode === "default" ? e === "XYZ" || e === "E" : this.mode === "translate" ? e === "XYZ" : this.mode === "rotate" ? e === "E" : !1;
10739
10739
  }
10740
10740
  }
10741
- class Yc {
10741
+ class Kc {
10742
10742
  constructor(e, t) {
10743
10743
  var n;
10744
10744
  this.isController = !0, this._enabled = !0, this._tmpQ = new ee(), this._tmpContainerQ = new ee(), this._tmpV = new b(), this._resetHierarchy = !1, this._defaultPoseQuats = /* @__PURE__ */ new Map(), this._zeroPoseQuats = /* @__PURE__ */ new Map(), this._emitter = new yt(), this.addListener = this._emitter.addListener.bind(this._emitter), this.removeAllListeners = this._emitter.removeAllListeners.bind(this._emitter), this._initialTargetPos = new b(), this._initialTargetQuat = new ee(), this._axesHelpers = [], this._showAxes = !1;
@@ -10750,7 +10750,7 @@ class Yc {
10750
10750
  (n = i[l]) != null && n.ikTcp && (h = i[l].object);
10751
10751
  this._effector = h ?? c[c.length - 1], this._resetHierarchy && this.setupHierarchy(c), c.forEach((l) => {
10752
10752
  l && (this._defaultPoseQuats.has(l.uuid) || this._defaultPoseQuats.set(l.uuid, l.quaternion.clone()));
10753
- }), this.transformControls = new qc(t.camera, t.domElement), this.transformControls.addEventListener("dragging-changed", ({ value: l }) => {
10753
+ }), this.transformControls = new Yc(t.camera, t.domElement), this.transformControls.addEventListener("dragging-changed", ({ value: l }) => {
10754
10754
  this._emitter.emit("dragging-changed", l), l || this.syncTargetToEffector();
10755
10755
  }), this.transformControls.addEventListener("axis-changed", ({ value: l }) => {
10756
10756
  this.transformControls.dragging || (this.targetObject.visible = l === "E");
@@ -10860,12 +10860,12 @@ class Yc {
10860
10860
  this.transformControls.detach(), this.transformControls.dispose(), this.targetObject.removeFromParent(), this._axesHelpers.forEach((e) => e.removeFromParent()), this._axesHelpers = [];
10861
10861
  }
10862
10862
  }
10863
- const Kc = (a, e, t, i = {}) => {
10863
+ const Zc = (a, e, t, i = {}) => {
10864
10864
  const s = [], { resetHierarchy: r, onDraggingChanged: o } = i;
10865
10865
  return a.forEach((c) => {
10866
10866
  if (!(c != null && c.joints) || c.joints.length < 2)
10867
10867
  return;
10868
- const h = new Yc({
10868
+ const h = new Kc({
10869
10869
  joints: c.joints,
10870
10870
  container: e,
10871
10871
  context: {
@@ -10879,9 +10879,9 @@ const Kc = (a, e, t, i = {}) => {
10879
10879
  }), s;
10880
10880
  }, so = new En();
10881
10881
  so.crossOrigin = "anonymous";
10882
- class Zc extends Ee {
10882
+ class Xc extends Ee {
10883
10883
  constructor(e) {
10884
- super(), this._props = e, this._emitter = new yt(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new De(), this.lines = new De(), this._clips = [], this._actionsMap = /* @__PURE__ */ new Map(), this._animationClock = new rs(), this.sizeBox = new Uc(), this._goodsSize = new Cc(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), this._rollerLevel = /* @__PURE__ */ new Map(), this._liftBrackets = [], this._ikChains = [], this.ikControllers = [], this._ikDraggingControllers = /* @__PURE__ */ new Set(), this._shelfSyncCache = /* @__PURE__ */ new WeakMap(), this._rollerPools = /* @__PURE__ */ new WeakMap(), this._videoCache = /* @__PURE__ */ new Map(), this._rollerColumns = 1, this._bodyOpacity = 1, this._masts = /* @__PURE__ */ new Map(), this._liftMaxHeight = 0, this._jackMaxHeight = 0, this._forkMaxHeight = 0, this.controllers = [], this.goods = [], this._breathLights = [], this._shelves = /* @__PURE__ */ new Map(), this._shelfMaxLevel = 1, this._url = "", this._showController = !0, this._showSlots = !0, this._shapeKeys = /* @__PURE__ */ new Map(), this._shapeKeyTargets = /* @__PURE__ */ new Map(), this._shapeKeyTimer = 0, this._shapeKeyCache = "", this._materialsCache = /* @__PURE__ */ new Map(), this.opacityCache = void 0, this.actions = [], this._useCenterModel = !1, this._useLift = !1, this._columnCount = 1, this._columnGap = 0.03, this._rowCount = 1, this._rowGap = 0.01, this._levelCount = 1, this._currentAction = null, this._pendingFinishedCallback = null, this._url = e.url || "", this._url && this.load(this._url).then(), this.add(this._container, this.lines), this._props.showSizeBox && this.add(this.sizeBox), this.showController = typeof e.showController == "boolean" ? e.showController : !0, this._showSlots = typeof e.showSlots == "boolean" ? e.showSlots : !0;
10884
+ super(), this._props = e, this._emitter = new yt(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new Pe(), this.lines = new Pe(), this._clips = [], this._actionsMap = /* @__PURE__ */ new Map(), this._animationClock = new rs(), this.sizeBox = new Hc(), this._goodsSize = new Ic(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), this._rollerLevel = /* @__PURE__ */ new Map(), this._liftBrackets = [], this._ikChains = [], this.ikControllers = [], this._ikDraggingControllers = /* @__PURE__ */ new Set(), this._shelfSyncCache = /* @__PURE__ */ new WeakMap(), this._rollerPools = /* @__PURE__ */ new WeakMap(), this._videoCache = /* @__PURE__ */ new Map(), this._rollerColumns = 1, this._bodyOpacity = 1, this._masts = /* @__PURE__ */ new Map(), this._liftMaxHeight = 0, this._jackMaxHeight = 0, this._forkMaxHeight = 0, this.controllers = [], this.goods = [], this._breathLights = [], this._shelves = /* @__PURE__ */ new Map(), this._shelfMaxLevel = 1, this._url = "", this._showController = !0, this._showSlots = !0, this._shapeKeys = /* @__PURE__ */ new Map(), this._shapeKeyTargets = /* @__PURE__ */ new Map(), this._shapeKeyTimer = 0, this._shapeKeyCache = "", this.shapeKeyDirty = !1, this._materialsCache = /* @__PURE__ */ new Map(), this.opacityCache = void 0, this.actions = [], this._useCenterModel = !1, this._useLift = !1, this._columnCount = 1, this._columnGap = 0.03, this._rowCount = 1, this._rowGap = 0.01, this._levelCount = 1, this._currentAction = null, this._pendingFinishedCallback = null, this._url = e.url || "", this._url && this.load(this._url).then(), this.add(this._container, this.lines), this._props.showSizeBox && this.add(this.sizeBox), this.showController = typeof e.showController == "boolean" ? e.showController : !0, this._showSlots = typeof e.showSlots == "boolean" ? e.showSlots : !0;
10885
10885
  }
10886
10886
  get shapeKeys() {
10887
10887
  return this._shapeKeys;
@@ -11118,8 +11118,8 @@ class Zc extends Ee {
11118
11118
  let o = t;
11119
11119
  r.userData[`origin_${e}`] && (o -= r.userData[`origin_${e}`]);
11120
11120
  const c = (h = r.morphTargetDictionary) == null ? void 0 : h[e];
11121
- c !== void 0 && r.morphTargetInfluences && (r.morphTargetInfluences[c] = o), r instanceof q && r.geometry.translate(0, 0, 1e-9);
11122
- }), i && this._emitter.emit("shape-key-changed", e, t);
11121
+ c !== void 0 && r.morphTargetInfluences && (r.morphTargetInfluences[c] = o);
11122
+ }), i && this._emitter.emit("shape-key-changed", e, t), this.shapeKeyDirty = !0;
11123
11123
  }, 0);
11124
11124
  }
11125
11125
  _generateAmr(e, t) {
@@ -11161,7 +11161,7 @@ class Zc extends Ee {
11161
11161
  h || (h = document.createElement("video"), h.src = c, h.crossOrigin = "anonymous", h.loop = !0, h.muted = !0, h.playsInline = !0, h.autoplay = !0, h.preload = "auto", this._videoCache.set(c, h)), h.play().catch(() => {
11162
11162
  }), r.material.map && r.material.map.dispose(), r.material.emissiveMap && r.material.emissiveMap.dispose();
11163
11163
  const u = new Eo(h);
11164
- u.colorSpace = pi, r.material.map = u, r.material.emissiveMap = u, r.material.emissive || (r.material.emissive = new X(16777215)), r.material.emissiveIntensity = 1, r.material.needsUpdate = !0;
11164
+ u.colorSpace = pi, u.generateMipmaps = !0, u.minFilter = Ro, r.material.map = u, r.material.emissiveMap = u, r.material.emissive || (r.material.emissive = new X(16777215)), r.material.emissiveIntensity = 1, r.material.needsUpdate = !0;
11165
11165
  }
11166
11166
  if (r.material.userData.isBreathLight && r.material.emissiveIntensity) {
11167
11167
  r.material.emissive || (r.material.emissive = new X(16777215)), r.material.emissiveIntensity = 2, r.material.toneMapped = !1;
@@ -11241,7 +11241,7 @@ class Zc extends Ee {
11241
11241
  });
11242
11242
  }), this.slots.forEach((r) => {
11243
11243
  r.props.mirrorTarget && (r.mirrorTarget = this.slots.find((o) => o.props.slot.name === r.props.mirrorTarget));
11244
- }), e.updateMatrixWorld(!0), this._container.add(e), this._buildJointChain(e), this._disposeIkControllers(), this._ikChains.length && (this.ikControllers = Kc(
11244
+ }), e.updateMatrixWorld(!0), this._container.add(e), this._buildJointChain(e), this._disposeIkControllers(), this._ikChains.length && (this.ikControllers = Zc(
11245
11245
  this._ikChains,
11246
11246
  this,
11247
11247
  {
@@ -11435,7 +11435,9 @@ class Zc extends Ee {
11435
11435
  }
11436
11436
  setForkHeight(e) {
11437
11437
  if (this._fork) {
11438
- if (e > this._forkMaxHeight && (e = this._forkMaxHeight), this._fork.position.z = e, this._masts.size === 1) {
11438
+ if (e > this._forkMaxHeight && (e = this._forkMaxHeight), requestAnimationFrame(() => {
11439
+ this.setShapeKey("forkHeight", e, !1);
11440
+ }), this._fork.position.z = e, this._masts.size === 1) {
11439
11441
  const t = this._masts.get(2), i = (t == null ? void 0 : t.userData.startHeight) || 0.1;
11440
11442
  t && (t.position.z = (e - i) * 0.5);
11441
11443
  }
@@ -11576,7 +11578,7 @@ class Zc extends Ee {
11576
11578
  const c = s.children.find((f) => f.userData.isRollerLevelBox && !f.userData.cloned) || s.children.find((f) => f.userData.isRollerLevelBox);
11577
11579
  if (!c)
11578
11580
  return;
11579
- const h = bc(c, s, new b()), u = this._columnGap, n = h.x + u, l = (i - 1) * n / 2;
11581
+ const h = Ac(c, s, new b()), u = this._columnGap, n = h.x + u, l = (i - 1) * n / 2;
11580
11582
  c.position.x = o - l;
11581
11583
  for (let f = 1; f < i; f++) {
11582
11584
  const m = c.clone(!0);
@@ -11714,7 +11716,7 @@ class Zc extends Ee {
11714
11716
  if (!Object.keys(e.morphTargetDictionary || {}).includes(t))
11715
11717
  return;
11716
11718
  const s = e.morphTargetDictionary[t];
11717
- e.morphTargetInfluences && (e.morphTargetInfluences[s] = i), e.geometry.translate(0, 0, 1e-9);
11719
+ e.morphTargetInfluences && (e.morphTargetInfluences[s] = i), this.shapeKeyDirty = !0;
11718
11720
  }
11719
11721
  // 设置料箱料斗层数
11720
11722
  setShelfLevel(e = 3) {
@@ -11793,7 +11795,7 @@ class Zc extends Ee {
11793
11795
  min: s || 0,
11794
11796
  max: r || 1
11795
11797
  }, o);
11796
- e.add(c), this.controllers.push(c), c.addListener("change", () => {
11798
+ if (e.add(c), this.controllers.push(c), c.addListener("change", () => {
11797
11799
  this.ikControllers.forEach((h) => {
11798
11800
  h.enabled = !1;
11799
11801
  }), clearTimeout(this._ikControllersTimer), this._ikControllersTimer = setTimeout(() => {
@@ -11801,15 +11803,19 @@ class Zc extends Ee {
11801
11803
  h.enabled = !0, h.syncTargetToEffector();
11802
11804
  });
11803
11805
  }, 100);
11804
- }), (o.userData.isFork || o.userData.isLift || o.userData.isJack) && (this._forkMaxHeight = r || 1, this._liftMaxHeight = r || 1, this._jackMaxHeight = r || 1, c.addListener("change", (h) => {
11805
- this.setForkHeight(h), this.setLiftHeight(h), this.setJackHeight(h);
11806
- }));
11806
+ }), o.userData.isFork || o.userData.isLift || o.userData.isJack) {
11807
+ this._forkMaxHeight = r || 1, this._liftMaxHeight = r || 1, this._jackMaxHeight = r || 1;
11808
+ const h = o.position.z;
11809
+ this.setForkHeight(h), this.setLiftHeight(h), this.setJackHeight(h), c.addListener("change", (u) => {
11810
+ this.setForkHeight(u), this.setLiftHeight(u), this.setJackHeight(u);
11811
+ });
11812
+ }
11807
11813
  }
11808
11814
  }
11809
11815
  }
11810
11816
  generateDimension(e, t) {
11811
11817
  if (e.userData.isDimension) {
11812
- const i = e.userData.divider, s = Ac(e.userData.startOrigin), r = e.userData.axios;
11818
+ const i = e.userData.divider, s = Tc(e.userData.startOrigin), r = e.userData.axios;
11813
11819
  let o, c;
11814
11820
  if (r === "x" ? (o = new b(e.userData.start - e.position.x, 0, 0), c = o.clone().setX(e.userData.end - e.position.x)) : r === "z" ? (o = new b(0, e.userData.start - e.position.y, 0), c = o.clone().setY(e.userData.end - e.position.y)) : (o = new b(0, 0, e.userData.start - e.position.z), c = o.clone().setZ(e.userData.end - e.position.z)), !Object.keys(e.userData).flatMap((n) => {
11815
11821
  var f;
@@ -11819,7 +11825,7 @@ class Zc extends Ee {
11819
11825
  return l ? [l] : [];
11820
11826
  }).length)
11821
11827
  return;
11822
- const d = new Wc({
11828
+ const d = new Uc({
11823
11829
  start: o,
11824
11830
  end: c,
11825
11831
  startOrigin: s,
@@ -11921,7 +11927,7 @@ class Zc extends Ee {
11921
11927
  n !== s && n !== r && (n.stopFading(), n.setEffectiveWeight(0), n.stop());
11922
11928
  });
11923
11929
  const u = (t == null ? void 0 : t.loop) ?? !1;
11924
- (i || !s.isRunning()) && s.reset(), s.enabled = !0, s.setEffectiveTimeScale((t == null ? void 0 : t.timeScale) ?? 1), s.setEffectiveWeight(1), s.paused = !1, s.setLoop(u ? Ro : Lo, u ? 1 / 0 : 1), s.clampWhenFinished = (t == null ? void 0 : t.clampWhenFinished) ?? !u, s.play();
11930
+ (i || !s.isRunning()) && s.reset(), s.enabled = !0, s.setEffectiveTimeScale((t == null ? void 0 : t.timeScale) ?? 1), s.setEffectiveWeight(1), s.paused = !1, s.setLoop(u ? Lo : ko, u ? 1 / 0 : 1), s.clampWhenFinished = (t == null ? void 0 : t.clampWhenFinished) ?? !u, s.play();
11925
11931
  const d = (t == null ? void 0 : t.timeScale) ?? 1;
11926
11932
  return h ? (r.stopFading(), r.enabled = !0, r.setEffectiveWeight(1), r.crossFadeTo(s, c, !1)) : c > 0 && s.fadeIn(c), s.setEffectiveTimeScale(d), this._currentAction = s, new Promise((n) => {
11927
11933
  this._pendingFinishedCallback && this._mixer && this._mixer.removeEventListener("finished", this._pendingFinishedCallback);
@@ -11963,20 +11969,30 @@ class Zc extends Ee {
11963
11969
  }, e * 1e3);
11964
11970
  })) : (this._mixer.stopAllAction(), Promise.resolve())) : Promise.resolve();
11965
11971
  }
11972
+ /**
11973
+ * 手动触发所有视频纹理的播放。
11974
+ * 移动端浏览器通常禁止自动播放,需要在用户交互(如点击)后调用此方法。
11975
+ */
11976
+ playVideos() {
11977
+ this._videoCache.forEach((e) => {
11978
+ e.play().catch(() => {
11979
+ });
11980
+ });
11981
+ }
11966
11982
  }
11967
- const ro = 0, Xc = 1, Jc = 2, fn = 2, Ts = 1.25, dn = 1, ui = 6 * 4 + 4 + 4, as = 65535, $c = Math.pow(2, -24), Ss = Symbol("SKIP_GENERATION");
11968
- function eh(a) {
11983
+ const ro = 0, Jc = 1, $c = 2, fn = 2, Ts = 1.25, dn = 1, ui = 6 * 4 + 4 + 4, as = 65535, eh = Math.pow(2, -24), Ss = Symbol("SKIP_GENERATION");
11984
+ function th(a) {
11969
11985
  return a.index ? a.index.count : a.attributes.position.count;
11970
11986
  }
11971
11987
  function Qt(a) {
11972
- return eh(a) / 3;
11988
+ return th(a) / 3;
11973
11989
  }
11974
- function th(a, e = ArrayBuffer) {
11990
+ function ih(a, e = ArrayBuffer) {
11975
11991
  return a > 65535 ? new Uint32Array(new e(4 * a)) : new Uint16Array(new e(2 * a));
11976
11992
  }
11977
- function ih(a, e) {
11993
+ function sh(a, e) {
11978
11994
  if (!a.index) {
11979
- const t = a.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = th(t, i);
11995
+ const t = a.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = ih(t, i);
11980
11996
  a.setIndex(new ve(s, 1));
11981
11997
  for (let r = 0; r < t; r++)
11982
11998
  s[r] = r;
@@ -12007,7 +12023,7 @@ function oo(a) {
12007
12023
  }
12008
12024
  return e;
12009
12025
  }
12010
- function sh(a) {
12026
+ function rh(a) {
12011
12027
  if (a.groups.length === 0)
12012
12028
  return !1;
12013
12029
  const e = Qt(a), t = oo(a).sort((r, o) => r.offset - o.offset), i = t[t.length - 1];
@@ -12020,14 +12036,14 @@ function Ms(a, e, t, i, s) {
12020
12036
  for (let g = e * 6, v = (e + t) * 6; g < v; g += 6) {
12021
12037
  const y = a[g + 0], x = a[g + 1], w = y - x, T = y + x;
12022
12038
  w < r && (r = w), T > h && (h = T), y < n && (n = y), y > m && (m = y);
12023
- const M = a[g + 2], P = a[g + 3], C = M - P, E = M + P;
12039
+ const M = a[g + 2], D = a[g + 3], C = M - D, E = M + D;
12024
12040
  C < o && (o = C), E > u && (u = E), M < l && (l = M), M > _ && (_ = M);
12025
- const I = a[g + 4], A = a[g + 5], S = I - A, D = I + A;
12026
- S < c && (c = S), D > d && (d = D), I < f && (f = I), I > p && (p = I);
12041
+ const I = a[g + 4], A = a[g + 5], S = I - A, P = I + A;
12042
+ S < c && (c = S), P > d && (d = P), I < f && (f = I), I > p && (p = I);
12027
12043
  }
12028
12044
  i[0] = r, i[1] = o, i[2] = c, i[3] = h, i[4] = u, i[5] = d, s[0] = n, s[1] = l, s[2] = f, s[3] = m, s[4] = _, s[5] = p;
12029
12045
  }
12030
- function rh(a, e = null, t = null, i = null) {
12046
+ function nh(a, e = null, t = null, i = null) {
12031
12047
  const s = a.attributes.position, r = a.index ? a.index.array : null, o = Qt(a), c = s.normalized;
12032
12048
  let h;
12033
12049
  e === null ? (h = new Float32Array(o * 6 * 4), t = 0, i = o) : (h = e, t = t || 0, i = i || o);
@@ -12044,10 +12060,10 @@ function rh(a, e = null, t = null, i = null) {
12044
12060
  c ? (x = s[l[y]](p), w = s[l[y]](g), T = s[l[y]](v)) : (x = u[p + y], w = u[g + y], T = u[v + y]);
12045
12061
  let M = x;
12046
12062
  w < M && (M = w), T < M && (M = T);
12047
- let P = x;
12048
- w > P && (P = w), T > P && (P = T);
12049
- const C = (P - M) / 2, E = y * 2;
12050
- h[_ + E + 0] = M + C, h[_ + E + 1] = C + (Math.abs(M) + C) * $c;
12063
+ let D = x;
12064
+ w > D && (D = w), T > D && (D = T);
12065
+ const C = (D - M) / 2, E = y * 2;
12066
+ h[_ + E + 0] = M + C, h[_ + E + 1] = C + (Math.abs(M) + C) * eh;
12051
12067
  }
12052
12068
  }
12053
12069
  return h;
@@ -12083,20 +12099,20 @@ function ei(a) {
12083
12099
  const e = a[3] - a[0], t = a[4] - a[1], i = a[5] - a[2];
12084
12100
  return 2 * (e * t + t * i + i * e);
12085
12101
  }
12086
- const Ue = 32, nh = (a, e) => a.candidate - e.candidate, st = new Array(Ue).fill().map(() => ({
12102
+ const Ue = 32, oh = (a, e) => a.candidate - e.candidate, st = new Array(Ue).fill().map(() => ({
12087
12103
  count: 0,
12088
12104
  bounds: new Float32Array(6),
12089
12105
  rightCacheBounds: new Float32Array(6),
12090
12106
  leftCacheBounds: new Float32Array(6),
12091
12107
  candidate: 0
12092
12108
  })), Li = new Float32Array(6);
12093
- function oh(a, e, t, i, s, r) {
12109
+ function ah(a, e, t, i, s, r) {
12094
12110
  let o = -1, c = 0;
12095
12111
  if (r === ro)
12096
12112
  o = pn(e), o !== -1 && (c = (e[o] + e[o + 3]) / 2);
12097
- else if (r === Xc)
12098
- o = pn(a), o !== -1 && (c = ah(t, i, s, o));
12099
- else if (r === Jc) {
12113
+ else if (r === Jc)
12114
+ o = pn(a), o !== -1 && (c = lh(t, i, s, o));
12115
+ else if (r === $c) {
12100
12116
  const h = ei(a);
12101
12117
  let u = Ts * s;
12102
12118
  const d = i * 6, n = (i + s) * 6;
@@ -12112,13 +12128,13 @@ function oh(a, e, t, i, s, r) {
12112
12128
  const {
12113
12129
  bounds: T,
12114
12130
  leftCacheBounds: M,
12115
- rightCacheBounds: P
12131
+ rightCacheBounds: D
12116
12132
  } = w;
12117
12133
  for (let C = 0; C < 3; C++)
12118
- P[C] = 1 / 0, P[C + 3] = -1 / 0, M[C] = 1 / 0, M[C + 3] = -1 / 0, T[C] = 1 / 0, T[C + 3] = -1 / 0;
12134
+ D[C] = 1 / 0, D[C + 3] = -1 / 0, M[C] = 1 / 0, M[C + 3] = -1 / 0, T[C] = 1 / 0, T[C + 3] = -1 / 0;
12119
12135
  Ri(x, t, T);
12120
12136
  }
12121
- g.sort(nh);
12137
+ g.sort(oh);
12122
12138
  let y = s;
12123
12139
  for (let x = 0; x < y; x++) {
12124
12140
  const w = g[x];
@@ -12133,9 +12149,9 @@ function oh(a, e, t, i, s, r) {
12133
12149
  }
12134
12150
  }
12135
12151
  for (let x = 0; x < y; x++) {
12136
- const w = g[x], T = w.count, M = s - w.count, P = w.leftCacheBounds, C = w.rightCacheBounds;
12152
+ const w = g[x], T = w.count, M = s - w.count, D = w.leftCacheBounds, C = w.rightCacheBounds;
12137
12153
  let E = 0;
12138
- T !== 0 && (E = ei(P) / h);
12154
+ T !== 0 && (E = ei(D) / h);
12139
12155
  let I = 0;
12140
12156
  M !== 0 && (I = ei(C) / h);
12141
12157
  const A = dn + Ts * (E * T + I * M);
@@ -12163,12 +12179,12 @@ function oh(a, e, t, i, s, r) {
12163
12179
  }
12164
12180
  let v = 0;
12165
12181
  for (let y = 0; y < Ue - 1; y++) {
12166
- const x = st[y], w = x.count, T = x.bounds, P = st[y + 1].rightCacheBounds;
12182
+ const x = st[y], w = x.count, T = x.bounds, D = st[y + 1].rightCacheBounds;
12167
12183
  w !== 0 && (v === 0 ? mn(T, Li) : gn(T, Li, Li)), v += w;
12168
12184
  let C = 0, E = 0;
12169
12185
  v !== 0 && (C = ei(Li) / h);
12170
12186
  const I = s - v;
12171
- I !== 0 && (E = ei(P) / h);
12187
+ I !== 0 && (E = ei(D) / h);
12172
12188
  const A = dn + Ts * (C * v + E * I);
12173
12189
  A < u && (o = l, u = A, c = x.candidate);
12174
12190
  }
@@ -12178,7 +12194,7 @@ function oh(a, e, t, i, s, r) {
12178
12194
  console.warn(`MeshBVH: Invalid build strategy value ${r} used.`);
12179
12195
  return { axis: o, pos: c };
12180
12196
  }
12181
- function ah(a, e, t, i) {
12197
+ function lh(a, e, t, i) {
12182
12198
  let s = 0;
12183
12199
  for (let r = e, o = e + t; r < o; r++)
12184
12200
  s += a[r * 6 + i * 2];
@@ -12189,7 +12205,7 @@ class Cs {
12189
12205
  this.boundingData = new Float32Array(6);
12190
12206
  }
12191
12207
  }
12192
- function lh(a, e, t, i, s, r) {
12208
+ function ch(a, e, t, i, s, r) {
12193
12209
  let o = i, c = i + s - 1;
12194
12210
  const h = r.pos, u = r.axis * 2;
12195
12211
  for (; ; ) {
@@ -12211,7 +12227,7 @@ function lh(a, e, t, i, s, r) {
12211
12227
  return o;
12212
12228
  }
12213
12229
  }
12214
- function ch(a, e, t, i, s, r) {
12230
+ function hh(a, e, t, i, s, r) {
12215
12231
  let o = i, c = i + s - 1;
12216
12232
  const h = r.pos, u = r.axis * 2;
12217
12233
  for (; ; ) {
@@ -12250,11 +12266,11 @@ function ao(a, e) {
12250
12266
  return e[a + 7];
12251
12267
  }
12252
12268
  let lo, li, Ki, co;
12253
- const hh = Math.pow(2, 32);
12269
+ const uh = Math.pow(2, 32);
12254
12270
  function Ks(a) {
12255
12271
  return "count" in a ? 1 : 1 + Ks(a.left) + Ks(a.right);
12256
12272
  }
12257
- function uh(a, e, t) {
12273
+ function fh(a, e, t) {
12258
12274
  return lo = new Float32Array(t), li = new Uint32Array(t), Ki = new Uint16Array(t), co = new Uint8Array(t), Zs(a, e);
12259
12275
  }
12260
12276
  function Zs(a, e) {
@@ -12277,18 +12293,18 @@ function Zs(a, e) {
12277
12293
  else {
12278
12294
  const o = e.left, c = e.right, h = e.splitAxis;
12279
12295
  let u;
12280
- if (u = Zs(a + ui, o), u / 4 > hh)
12296
+ if (u = Zs(a + ui, o), u / 4 > uh)
12281
12297
  throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
12282
12298
  return li[t + 6] = u / 4, u = Zs(u, c), li[t + 7] = h, u;
12283
12299
  }
12284
12300
  }
12285
- function fh(a, e) {
12301
+ function dh(a, e) {
12286
12302
  const t = (a.index ? a.index.count : a.attributes.position.count) / 3, i = t > 2 ** 16, s = i ? 4 : 2, r = e ? new SharedArrayBuffer(t * s) : new ArrayBuffer(t * s), o = i ? new Uint32Array(r) : new Uint16Array(r);
12287
12303
  for (let c = 0, h = o.length; c < h; c++)
12288
12304
  o[c] = c;
12289
12305
  return o;
12290
12306
  }
12291
- function dh(a, e, t, i, s) {
12307
+ function ph(a, e, t, i, s) {
12292
12308
  const {
12293
12309
  maxDepth: r,
12294
12310
  verbose: o,
@@ -12296,17 +12312,17 @@ function dh(a, e, t, i, s) {
12296
12312
  strategy: h,
12297
12313
  onProgress: u,
12298
12314
  indirect: d
12299
- } = s, n = a._indirectBuffer, l = a.geometry, f = l.index ? l.index.array : null, m = d ? ch : lh, _ = Qt(l), p = new Float32Array(6);
12315
+ } = s, n = a._indirectBuffer, l = a.geometry, f = l.index ? l.index.array : null, m = d ? hh : ch, _ = Qt(l), p = new Float32Array(6);
12300
12316
  let g = !1;
12301
12317
  const v = new Cs();
12302
12318
  return Ms(e, t, i, v.boundingData, p), x(v, t, i, p), v;
12303
12319
  function y(w) {
12304
12320
  u && u(w / _);
12305
12321
  }
12306
- function x(w, T, M, P = null, C = 0) {
12322
+ function x(w, T, M, D = null, C = 0) {
12307
12323
  if (!g && C >= r && (g = !0, o && (console.warn(`MeshBVH: Max depth of ${r} reached when generating BVH. Consider increasing maxDepth.`), console.warn(l))), M <= c || C >= r)
12308
12324
  return y(T + M), w.offset = T, w.count = M, w;
12309
- const E = oh(w.boundingData, P, e, T, M, h);
12325
+ const E = ah(w.boundingData, D, e, T, M, h);
12310
12326
  if (E.axis === -1)
12311
12327
  return y(T + M), w.offset = T, w.count = M, w;
12312
12328
  const I = m(n, f, e, T, M, E);
@@ -12314,23 +12330,23 @@ function dh(a, e, t, i, s) {
12314
12330
  y(T + M), w.offset = T, w.count = M;
12315
12331
  else {
12316
12332
  w.splitAxis = E.axis;
12317
- const A = new Cs(), S = T, D = I - T;
12318
- w.left = A, Ms(e, S, D, A.boundingData, p), x(A, S, D, p, C + 1);
12319
- const R = new Cs(), k = I, F = M - D;
12333
+ const A = new Cs(), S = T, P = I - T;
12334
+ w.left = A, Ms(e, S, P, A.boundingData, p), x(A, S, P, p, C + 1);
12335
+ const R = new Cs(), k = I, F = M - P;
12320
12336
  w.right = R, Ms(e, k, F, R.boundingData, p), x(R, k, F, p, C + 1);
12321
12337
  }
12322
12338
  return w;
12323
12339
  }
12324
12340
  }
12325
- function ph(a, e) {
12341
+ function mh(a, e) {
12326
12342
  const t = a.geometry;
12327
- e.indirect && (a._indirectBuffer = fh(t, e.useSharedArrayBuffer), sh(t) && !e.verbose && console.warn(
12343
+ e.indirect && (a._indirectBuffer = dh(t, e.useSharedArrayBuffer), rh(t) && !e.verbose && console.warn(
12328
12344
  'MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.'
12329
- )), a._indirectBuffer || ih(t, e);
12330
- const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = rh(t), r = e.indirect ? no(t) : oo(t);
12345
+ )), a._indirectBuffer || sh(t, e);
12346
+ const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = nh(t), r = e.indirect ? no(t) : oo(t);
12331
12347
  a._roots = r.map((o) => {
12332
- const c = dh(a, s, o.offset, o.count, e), h = Ks(c), u = new i(ui * h);
12333
- return uh(0, c, u), u;
12348
+ const c = ph(a, s, o.offset, o.count, e), h = Ks(c), u = new i(ui * h);
12349
+ return fh(0, c, u), u;
12334
12350
  });
12335
12351
  }
12336
12352
  class Je {
@@ -12372,7 +12388,7 @@ Je.prototype.setFromBox = function() {
12372
12388
  this.min = o, this.max = c;
12373
12389
  };
12374
12390
  }();
12375
- const mh = function() {
12391
+ const gh = function() {
12376
12392
  const a = new b(), e = new b(), t = new b();
12377
12393
  return function(s, r, o) {
12378
12394
  const c = s.start, h = a, u = r.start, d = e;
@@ -12384,7 +12400,7 @@ const mh = function() {
12384
12400
  }(), pr = function() {
12385
12401
  const a = new G(), e = new b(), t = new b();
12386
12402
  return function(s, r, o, c) {
12387
- mh(s, r, a);
12403
+ gh(s, r, a);
12388
12404
  let h = a.x, u = a.y;
12389
12405
  if (h >= 0 && h <= 1 && u >= 0 && u <= 1) {
12390
12406
  s.at(h, o), r.at(u, c);
@@ -12410,7 +12426,7 @@ const mh = function() {
12410
12426
  }
12411
12427
  }
12412
12428
  };
12413
- }(), gh = function() {
12429
+ }(), _h = function() {
12414
12430
  const a = new b(), e = new b(), t = new or(), i = new Ye();
12415
12431
  return function(r, o) {
12416
12432
  const { radius: c, center: h } = r, { a: u, b: d, c: n } = o;
@@ -12424,16 +12440,16 @@ const mh = function() {
12424
12440
  }
12425
12441
  return !1;
12426
12442
  };
12427
- }(), _h = 1e-15;
12443
+ }(), vh = 1e-15;
12428
12444
  function Is(a) {
12429
- return Math.abs(a) < _h;
12445
+ return Math.abs(a) < vh;
12430
12446
  }
12431
12447
  class Re extends oi {
12432
12448
  constructor(...e) {
12433
12449
  super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new b()), this.satBounds = new Array(4).fill().map(() => new Je()), this.points = [this.a, this.b, this.c], this.sphere = new ns(), this.plane = new or(), this.needsUpdate = !0;
12434
12450
  }
12435
12451
  intersectsSphere(e) {
12436
- return gh(e, this);
12452
+ return _h(e, this);
12437
12453
  }
12438
12454
  update() {
12439
12455
  const e = this.a, t = this.b, i = this.c, s = this.points, r = this.satAxes, o = this.satBounds, c = r[0], h = o[0];
@@ -12466,15 +12482,15 @@ Re.prototype.intersectsTriangle = function() {
12466
12482
  for (let w = 0; w < 3; w++) {
12467
12483
  const { start: T, end: M } = d;
12468
12484
  T.copy(v[w]), M.copy(v[(w + 1) % 3]), d.delta(o);
12469
- const P = Is(p.distanceToPoint(T));
12470
- if (Is(p.normal.dot(o)) && P) {
12485
+ const D = Is(p.distanceToPoint(T));
12486
+ if (Is(p.normal.dot(o)) && D) {
12471
12487
  g.copy(d), y = 2;
12472
12488
  break;
12473
12489
  }
12474
12490
  const C = p.intersectLine(d, f);
12475
- if (!C && P && f.copy(T), (C || P) && !Is(f.distanceTo(M))) {
12491
+ if (!C && D && f.copy(T), (C || D) && !Is(f.distanceTo(M))) {
12476
12492
  if (y <= 1)
12477
- (y === 1 ? g.start : g.end).copy(f), P && (x = y);
12493
+ (y === 1 ? g.start : g.end).copy(f), D && (x = y);
12478
12494
  else if (y >= 2) {
12479
12495
  (x === 1 ? g.start : g.end).copy(f), y = 2;
12480
12496
  break;
@@ -12496,17 +12512,17 @@ Re.prototype.intersectsTriangle = function() {
12496
12512
  if (i.setFromPoints(I, t), E.isSeparated(i))
12497
12513
  return !1;
12498
12514
  }
12499
- const M = p.satBounds, P = p.satAxes;
12515
+ const M = p.satBounds, D = p.satAxes;
12500
12516
  e[0] = this.a, e[1] = this.b, e[2] = this.c;
12501
12517
  for (let C = 0; C < 4; C++) {
12502
- const E = M[C], I = P[C];
12518
+ const E = M[C], I = D[C];
12503
12519
  if (i.setFromPoints(I, e), E.isSeparated(i))
12504
12520
  return !1;
12505
12521
  }
12506
12522
  for (let C = 0; C < 4; C++) {
12507
12523
  const E = T[C];
12508
12524
  for (let I = 0; I < 4; I++) {
12509
- const A = P[I];
12525
+ const A = D[I];
12510
12526
  if (r.crossVectors(E, A), i.setFromPoints(r, e), s.setFromPoints(r, t), i.isSeparated(s))
12511
12527
  return !1;
12512
12528
  }
@@ -12527,8 +12543,8 @@ Re.prototype.intersectsTriangle = function() {
12527
12543
  let S = l.start;
12528
12544
  l.start = l.end, l.end = S;
12529
12545
  }
12530
- const M = n.start.dot(c), P = n.end.dot(c), C = l.start.dot(c), E = l.end.dot(c), I = P < C, A = M < E;
12531
- return M !== E && C !== P && I === A ? !1 : (g && (u.subVectors(n.start, l.start), u.dot(c) > 0 ? g.start.copy(n.start) : g.start.copy(l.start), u.subVectors(n.end, l.end), u.dot(c) < 0 ? g.end.copy(n.end) : g.end.copy(l.end)), !0);
12546
+ const M = n.start.dot(c), D = n.end.dot(c), C = l.start.dot(c), E = l.end.dot(c), I = D < C, A = M < E;
12547
+ return M !== E && C !== D && I === A ? !1 : (g && (u.subVectors(n.start, l.start), u.dot(c) > 0 ? g.start.copy(n.start) : g.start.copy(l.start), u.subVectors(n.end, l.end), u.dot(c) < 0 ? g.end.copy(n.end) : g.end.copy(l.end)), !0);
12532
12548
  }
12533
12549
  };
12534
12550
  }();
@@ -12666,10 +12682,10 @@ ue.prototype.distanceToBox = function() {
12666
12682
  for (let p = 0; p < 3; p++)
12667
12683
  for (let g = 0; g <= 1; g++)
12668
12684
  for (let v = 0; v <= 1; v++) {
12669
- const y = (p + 1) % 3, x = (p + 2) % 3, w = g << y | v << x, T = 1 << p | g << y | v << x, M = f[w], P = f[T];
12670
- e[_].set(M, P);
12671
- const E = a[p], I = a[y], A = a[x], S = t[_], D = S.start, R = S.end;
12672
- D[E] = n[E], D[I] = g ? n[I] : l[I], D[A] = v ? n[A] : l[I], R[E] = l[E], R[I] = g ? n[I] : l[I], R[A] = v ? n[A] : l[I], _++;
12685
+ const y = (p + 1) % 3, x = (p + 2) % 3, w = g << y | v << x, T = 1 << p | g << y | v << x, M = f[w], D = f[T];
12686
+ e[_].set(M, D);
12687
+ const E = a[p], I = a[y], A = a[x], S = t[_], P = S.start, R = S.end;
12688
+ P[E] = n[E], P[I] = g ? n[I] : l[I], P[A] = v ? n[A] : l[I], R[E] = l[E], R[I] = g ? n[I] : l[I], R[A] = v ? n[A] : l[I], _++;
12673
12689
  }
12674
12690
  for (let p = 0; p <= 1; p++)
12675
12691
  for (let g = 0; g <= 1; g++)
@@ -12704,13 +12720,13 @@ class mr {
12704
12720
  this._primitives.push(e);
12705
12721
  }
12706
12722
  }
12707
- class vh extends mr {
12723
+ class yh extends mr {
12708
12724
  constructor() {
12709
12725
  super(() => new Re());
12710
12726
  }
12711
12727
  }
12712
- const Te = /* @__PURE__ */ new vh();
12713
- class yh {
12728
+ const Te = /* @__PURE__ */ new yh();
12729
+ class xh {
12714
12730
  constructor() {
12715
12731
  this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
12716
12732
  const e = [];
@@ -12722,10 +12738,10 @@ class yh {
12722
12738
  };
12723
12739
  }
12724
12740
  }
12725
- const Z = new yh();
12741
+ const Z = new xh();
12726
12742
  let lt, Ot;
12727
12743
  const Tt = [], ki = /* @__PURE__ */ new mr(() => new J());
12728
- function xh(a, e, t, i, s, r) {
12744
+ function wh(a, e, t, i, s, r) {
12729
12745
  lt = ki.getPrimitive(), Ot = ki.getPrimitive(), Tt.push(lt, Ot), Z.setBuffer(a._roots[e]);
12730
12746
  const o = Xs(0, a.geometry, t, i, s, r);
12731
12747
  Z.clearBuffer(), ki.releasePrimitive(lt), ki.releasePrimitive(Ot), Tt.pop(), Tt.pop();
@@ -12740,17 +12756,17 @@ function Xs(a, e, t, i, s = null, r = 0, o = 0) {
12740
12756
  return $(a, c, lt), i(l, f, !1, o, r + a, lt);
12741
12757
  } else {
12742
12758
  let E = function(A) {
12743
- const { uint16Array: S, uint32Array: D } = Z;
12759
+ const { uint16Array: S, uint32Array: P } = Z;
12744
12760
  let R = A * 2;
12745
12761
  for (; !ge(R, S); )
12746
12762
  A = be(A), R = A * 2;
12747
- return ye(A, D);
12763
+ return ye(A, P);
12748
12764
  }, I = function(A) {
12749
- const { uint16Array: S, uint32Array: D } = Z;
12765
+ const { uint16Array: S, uint32Array: P } = Z;
12750
12766
  let R = A * 2;
12751
12767
  for (; !ge(R, S); )
12752
- A = Ae(A, D), R = A * 2;
12753
- return ye(A, D) + we(R, S);
12768
+ A = Ae(A, P), R = A * 2;
12769
+ return ye(A, P) + we(R, S);
12754
12770
  };
12755
12771
  const l = be(a), f = Ae(a, u);
12756
12772
  let m = l, _ = f, p, g, v, y;
@@ -12763,8 +12779,8 @@ function Xs(a, e, t, i, s = null, r = 0, o = 0) {
12763
12779
  const x = ge(m * 2, h), w = t(v, x, p, o + 1, r + m);
12764
12780
  let T;
12765
12781
  if (w === fn) {
12766
- const A = E(m), D = I(m) - A;
12767
- T = i(A, D, !0, o + 1, r + m, v);
12782
+ const A = E(m), P = I(m) - A;
12783
+ T = i(A, P, !0, o + 1, r + m, v);
12768
12784
  } else
12769
12785
  T = w && Xs(
12770
12786
  m,
@@ -12778,13 +12794,13 @@ function Xs(a, e, t, i, s = null, r = 0, o = 0) {
12778
12794
  if (T)
12779
12795
  return !0;
12780
12796
  y = Ot, $(_, c, y);
12781
- const M = ge(_ * 2, h), P = t(y, M, g, o + 1, r + _);
12797
+ const M = ge(_ * 2, h), D = t(y, M, g, o + 1, r + _);
12782
12798
  let C;
12783
- if (P === fn) {
12784
- const A = E(_), D = I(_) - A;
12785
- C = i(A, D, !0, o + 1, r + _, y);
12799
+ if (D === fn) {
12800
+ const A = E(_), P = I(_) - A;
12801
+ C = i(A, P, !0, o + 1, r + _, y);
12786
12802
  } else
12787
- C = P && Xs(
12803
+ C = D && Xs(
12788
12804
  _,
12789
12805
  e,
12790
12806
  t,
@@ -12796,8 +12812,8 @@ function Xs(a, e, t, i, s = null, r = 0, o = 0) {
12796
12812
  return !!C;
12797
12813
  }
12798
12814
  }
12799
- const ti = /* @__PURE__ */ new b(), Ps = /* @__PURE__ */ new b();
12800
- function wh(a, e, t = {}, i = 0, s = 1 / 0) {
12815
+ const ti = /* @__PURE__ */ new b(), Ds = /* @__PURE__ */ new b();
12816
+ function bh(a, e, t = {}, i = 0, s = 1 / 0) {
12801
12817
  const r = i * i, o = s * s;
12802
12818
  let c = 1 / 0, h = null;
12803
12819
  if (a.shapecast(
@@ -12807,18 +12823,18 @@ function wh(a, e, t = {}, i = 0, s = 1 / 0) {
12807
12823
  intersectsTriangle: (d, n) => {
12808
12824
  d.closestPointToPoint(e, ti);
12809
12825
  const l = e.distanceToSquared(ti);
12810
- return l < c && (Ps.copy(ti), c = l, h = n), l < r;
12826
+ return l < c && (Ds.copy(ti), c = l, h = n), l < r;
12811
12827
  }
12812
12828
  }
12813
12829
  ), c === 1 / 0)
12814
12830
  return null;
12815
12831
  const u = Math.sqrt(c);
12816
- return t.point ? t.point.copy(Ps) : t.point = Ps.clone(), t.distance = u, t.faceIndex = h, t;
12832
+ return t.point ? t.point.copy(Ds) : t.point = Ds.clone(), t.distance = u, t.faceIndex = h, t;
12817
12833
  }
12818
12834
  const St = /* @__PURE__ */ new b(), Mt = /* @__PURE__ */ new b(), Ct = /* @__PURE__ */ new b(), Fi = /* @__PURE__ */ new G(), Bi = /* @__PURE__ */ new G(), Oi = /* @__PURE__ */ new G(), _n = /* @__PURE__ */ new b(), vn = /* @__PURE__ */ new b(), yn = /* @__PURE__ */ new b(), zi = /* @__PURE__ */ new b();
12819
- function bh(a, e, t, i, s, r, o, c) {
12835
+ function Ah(a, e, t, i, s, r, o, c) {
12820
12836
  let h;
12821
- if (r === Pn ? h = a.intersectTriangle(i, t, e, !0, s) : h = a.intersectTriangle(e, t, i, r !== gi, s), h === null)
12837
+ if (r === Dn ? h = a.intersectTriangle(i, t, e, !0, s) : h = a.intersectTriangle(e, t, i, r !== gi, s), h === null)
12822
12838
  return null;
12823
12839
  const u = a.origin.distanceTo(s);
12824
12840
  return u < o || u > c ? null : {
@@ -12826,9 +12842,9 @@ function bh(a, e, t, i, s, r, o, c) {
12826
12842
  point: s.clone()
12827
12843
  };
12828
12844
  }
12829
- function Ah(a, e, t, i, s, r, o, c, h, u, d) {
12845
+ function Th(a, e, t, i, s, r, o, c, h, u, d) {
12830
12846
  St.fromBufferAttribute(e, r), Mt.fromBufferAttribute(e, o), Ct.fromBufferAttribute(e, c);
12831
- const n = bh(a, St, Mt, Ct, zi, h, u, d);
12847
+ const n = Ah(a, St, Mt, Ct, zi, h, u, d);
12832
12848
  if (n) {
12833
12849
  i && (Fi.fromBufferAttribute(i, r), Bi.fromBufferAttribute(i, o), Oi.fromBufferAttribute(i, c), n.uv = oi.getInterpolation(zi, St, Mt, Ct, Fi, Bi, Oi, new G())), s && (Fi.fromBufferAttribute(s, r), Bi.fromBufferAttribute(s, o), Oi.fromBufferAttribute(s, c), n.uv1 = oi.getInterpolation(zi, St, Mt, Ct, Fi, Bi, Oi, new G())), t && (_n.fromBufferAttribute(t, r), vn.fromBufferAttribute(t, o), yn.fromBufferAttribute(t, c), n.normal = oi.getInterpolation(zi, St, Mt, Ct, _n, vn, yn, new b()), n.normal.dot(a.direction) > 0 && n.normal.multiplyScalar(-1));
12834
12850
  const l = {
@@ -12847,7 +12863,7 @@ function ls(a, e, t, i, s, r, o) {
12847
12863
  let h = c + 0, u = c + 1, d = c + 2;
12848
12864
  const n = a.index;
12849
12865
  a.index && (h = n.getX(h), u = n.getX(u), d = n.getX(d));
12850
- const { position: l, normal: f, uv: m, uv1: _ } = a.attributes, p = Ah(t, l, f, m, _, h, u, d, e, r, o);
12866
+ const { position: l, normal: f, uv: m, uv1: _ } = a.attributes, p = Th(t, l, f, m, _, h, u, d, e, r, o);
12851
12867
  return p ? (p.faceIndex = i, s && s.push(p), p) : null;
12852
12868
  }
12853
12869
  function ie(a, e, t, i) {
@@ -12855,12 +12871,12 @@ function ie(a, e, t, i) {
12855
12871
  let c = e, h = e + 1, u = e + 2;
12856
12872
  t && (c = t.getX(c), h = t.getX(h), u = t.getX(u)), s.x = i.getX(c), s.y = i.getY(c), s.z = i.getZ(c), r.x = i.getX(h), r.y = i.getY(h), r.z = i.getZ(h), o.x = i.getX(u), o.y = i.getY(u), o.z = i.getZ(u);
12857
12873
  }
12858
- function Th(a, e, t, i, s, r, o, c) {
12874
+ function Sh(a, e, t, i, s, r, o, c) {
12859
12875
  const { geometry: h, _indirectBuffer: u } = a;
12860
12876
  for (let d = i, n = i + s; d < n; d++)
12861
12877
  ls(h, e, t, d, r, o, c);
12862
12878
  }
12863
- function Sh(a, e, t, i, s, r, o) {
12879
+ function Mh(a, e, t, i, s, r, o) {
12864
12880
  const { geometry: c, _indirectBuffer: h } = a;
12865
12881
  let u = 1 / 0, d = null;
12866
12882
  for (let n = i, l = i + s; n < l; n++) {
@@ -12869,7 +12885,7 @@ function Sh(a, e, t, i, s, r, o) {
12869
12885
  }
12870
12886
  return d;
12871
12887
  }
12872
- function Mh(a, e, t, i, s, r, o) {
12888
+ function Ch(a, e, t, i, s, r, o) {
12873
12889
  const { geometry: c } = t, { index: h } = c, u = c.attributes.position;
12874
12890
  for (let d = a, n = e + a; d < n; d++) {
12875
12891
  let l;
@@ -12878,7 +12894,7 @@ function Mh(a, e, t, i, s, r, o) {
12878
12894
  }
12879
12895
  return !1;
12880
12896
  }
12881
- function Ch(a, e = null) {
12897
+ function Ih(a, e = null) {
12882
12898
  e && Array.isArray(e) && (e = new Set(e));
12883
12899
  const t = a.geometry, i = t.index ? t.index.array : null, s = t.attributes.position;
12884
12900
  let r, o, c, h, u = 0;
@@ -12889,26 +12905,26 @@ function Ch(a, e = null) {
12889
12905
  const _ = l * 2;
12890
12906
  if (c[_ + 15] === as) {
12891
12907
  const g = o[l + 6], v = c[_ + 14];
12892
- let y = 1 / 0, x = 1 / 0, w = 1 / 0, T = -1 / 0, M = -1 / 0, P = -1 / 0;
12908
+ let y = 1 / 0, x = 1 / 0, w = 1 / 0, T = -1 / 0, M = -1 / 0, D = -1 / 0;
12893
12909
  for (let C = 3 * g, E = 3 * (g + v); C < E; C++) {
12894
12910
  let I = i[C];
12895
- const A = s.getX(I), S = s.getY(I), D = s.getZ(I);
12896
- A < y && (y = A), A > T && (T = A), S < x && (x = S), S > M && (M = S), D < w && (w = D), D > P && (P = D);
12911
+ const A = s.getX(I), S = s.getY(I), P = s.getZ(I);
12912
+ A < y && (y = A), A > T && (T = A), S < x && (x = S), S > M && (M = S), P < w && (w = P), P > D && (D = P);
12897
12913
  }
12898
- return h[l + 0] !== y || h[l + 1] !== x || h[l + 2] !== w || h[l + 3] !== T || h[l + 4] !== M || h[l + 5] !== P ? (h[l + 0] = y, h[l + 1] = x, h[l + 2] = w, h[l + 3] = T, h[l + 4] = M, h[l + 5] = P, !0) : !1;
12914
+ return h[l + 0] !== y || h[l + 1] !== x || h[l + 2] !== w || h[l + 3] !== T || h[l + 4] !== M || h[l + 5] !== D ? (h[l + 0] = y, h[l + 1] = x, h[l + 2] = w, h[l + 3] = T, h[l + 4] = M, h[l + 5] = D, !0) : !1;
12899
12915
  } else {
12900
12916
  const g = l + 8, v = o[l + 6], y = g + f, x = v + f;
12901
12917
  let w = m, T = !1, M = !1;
12902
12918
  e ? w || (T = e.has(y), M = e.has(x), w = !T && !M) : (T = !0, M = !0);
12903
- const P = w || T, C = w || M;
12919
+ const D = w || T, C = w || M;
12904
12920
  let E = !1;
12905
- P && (E = n(g, f, w));
12921
+ D && (E = n(g, f, w));
12906
12922
  let I = !1;
12907
12923
  C && (I = n(v, f, w));
12908
12924
  const A = E || I;
12909
12925
  if (A)
12910
12926
  for (let S = 0; S < 3; S++) {
12911
- const D = g + S, R = v + S, k = h[D], F = h[D + 3], z = h[R], B = h[R + 3];
12927
+ const P = g + S, R = v + S, k = h[P], F = h[P + 3], z = h[R], B = h[R + 3];
12912
12928
  h[l + S] = k < z ? k : z, h[l + S + 3] = F > B ? F : B;
12913
12929
  }
12914
12930
  return A;
@@ -12921,7 +12937,7 @@ function ut(a, e, t, i, s) {
12921
12937
  let g = e[a], v = e[a + 3], y = e[a + 1], x = e[a + 3 + 1], w = e[a + 2], T = e[a + 3 + 2];
12922
12938
  return n >= 0 ? (r = (g - m) * n, o = (v - m) * n) : (r = (v - m) * n, o = (g - m) * n), l >= 0 ? (c = (y - _) * l, h = (x - _) * l) : (c = (x - _) * l, h = (y - _) * l), r > h || c > o || ((c > r || isNaN(r)) && (r = c), (h < o || isNaN(o)) && (o = h), f >= 0 ? (u = (w - p) * f, d = (T - p) * f) : (u = (T - p) * f, d = (w - p) * f), r > d || u > o) ? !1 : ((u > r || r !== r) && (r = u), (d < o || o !== o) && (o = d), r <= s && o >= i);
12923
12939
  }
12924
- function Ih(a, e, t, i, s, r, o, c) {
12940
+ function Dh(a, e, t, i, s, r, o, c) {
12925
12941
  const { geometry: h, _indirectBuffer: u } = a;
12926
12942
  for (let d = i, n = i + s; d < n; d++) {
12927
12943
  let l = u ? u[d] : d;
@@ -12937,7 +12953,7 @@ function Ph(a, e, t, i, s, r, o) {
12937
12953
  }
12938
12954
  return d;
12939
12955
  }
12940
- function Dh(a, e, t, i, s, r, o) {
12956
+ function Eh(a, e, t, i, s, r, o) {
12941
12957
  const { geometry: c } = t, { index: h } = c, u = c.attributes.position;
12942
12958
  for (let d = a, n = e + a; d < n; d++) {
12943
12959
  let l;
@@ -12946,14 +12962,14 @@ function Dh(a, e, t, i, s, r, o) {
12946
12962
  }
12947
12963
  return !1;
12948
12964
  }
12949
- function Eh(a, e, t, i, s, r, o) {
12965
+ function Rh(a, e, t, i, s, r, o) {
12950
12966
  Z.setBuffer(a._roots[e]), Js(0, a, t, i, s, r, o), Z.clearBuffer();
12951
12967
  }
12952
12968
  function Js(a, e, t, i, s, r, o) {
12953
12969
  const { float32Array: c, uint16Array: h, uint32Array: u } = Z, d = a * 2;
12954
12970
  if (ge(d, h)) {
12955
12971
  const l = ye(a, u), f = we(d, h);
12956
- Th(e, t, i, l, f, s, r, o);
12972
+ Sh(e, t, i, l, f, s, r, o);
12957
12973
  } else {
12958
12974
  const l = be(a);
12959
12975
  ut(l, c, i, r, o) && Js(l, e, t, i, s, r, o);
@@ -12961,8 +12977,8 @@ function Js(a, e, t, i, s, r, o) {
12961
12977
  ut(f, c, i, r, o) && Js(f, e, t, i, s, r, o);
12962
12978
  }
12963
12979
  }
12964
- const Rh = ["x", "y", "z"];
12965
- function Lh(a, e, t, i, s, r) {
12980
+ const Lh = ["x", "y", "z"];
12981
+ function kh(a, e, t, i, s, r) {
12966
12982
  Z.setBuffer(a._roots[e]);
12967
12983
  const o = $s(0, a, t, i, s, r);
12968
12984
  return Z.clearBuffer(), o;
@@ -12972,9 +12988,9 @@ function $s(a, e, t, i, s, r) {
12972
12988
  let u = a * 2;
12973
12989
  if (ge(u, c)) {
12974
12990
  const n = ye(a, h), l = we(u, c);
12975
- return Sh(e, t, i, n, l, s, r);
12991
+ return Mh(e, t, i, n, l, s, r);
12976
12992
  } else {
12977
- const n = ao(a, h), l = Rh[n], m = i.direction[l] >= 0;
12993
+ const n = ao(a, h), l = Lh[n], m = i.direction[l] >= 0;
12978
12994
  let _, p;
12979
12995
  m ? (_ = be(a), p = Ae(a, h)) : (_ = Ae(a, h), p = be(a));
12980
12996
  const v = ut(_, o, i, s, r) ? $s(_, e, t, i, s, r) : null;
@@ -12990,8 +13006,8 @@ function $s(a, e, t, i, s, r) {
12990
13006
  return v && x ? v.distance <= x.distance ? v : x : v || x || null;
12991
13007
  }
12992
13008
  }
12993
- const Wi = /* @__PURE__ */ new J(), It = /* @__PURE__ */ new Re(), Pt = /* @__PURE__ */ new Re(), ii = /* @__PURE__ */ new te(), xn = /* @__PURE__ */ new ue(), Ui = /* @__PURE__ */ new ue();
12994
- function kh(a, e, t, i) {
13009
+ const Wi = /* @__PURE__ */ new J(), It = /* @__PURE__ */ new Re(), Dt = /* @__PURE__ */ new Re(), ii = /* @__PURE__ */ new te(), xn = /* @__PURE__ */ new ue(), Ui = /* @__PURE__ */ new ue();
13010
+ function Fh(a, e, t, i) {
12995
13011
  Z.setBuffer(a._roots[e]);
12996
13012
  const s = er(0, a, t, i);
12997
13013
  return Z.clearBuffer(), s;
@@ -13007,7 +13023,7 @@ function er(a, e, t, i, s = null) {
13007
13023
  intersectsTriangle: (v) => {
13008
13024
  v.a.applyMatrix4(i), v.b.applyMatrix4(i), v.c.applyMatrix4(i), v.needsUpdate = !0;
13009
13025
  for (let y = _ * 3, x = (p + _) * 3; y < x; y += 3)
13010
- if (ie(Pt, y, n, l), Pt.needsUpdate = !0, v.intersectsTriangle(Pt))
13026
+ if (ie(Dt, y, n, l), Dt.needsUpdate = !0, v.intersectsTriangle(Dt))
13011
13027
  return !0;
13012
13028
  return !1;
13013
13029
  }
@@ -13015,7 +13031,7 @@ function er(a, e, t, i, s = null) {
13015
13031
  for (let g = _ * 3, v = (p + _) * 3; g < v; g += 3) {
13016
13032
  ie(It, g, n, l), It.a.applyMatrix4(ii), It.b.applyMatrix4(ii), It.c.applyMatrix4(ii), It.needsUpdate = !0;
13017
13033
  for (let y = 0, x = f.count; y < x; y += 3)
13018
- if (ie(Pt, y, f, m), Pt.needsUpdate = !0, It.intersectsTriangle(Pt))
13034
+ if (ie(Dt, y, f, m), Dt.needsUpdate = !0, It.intersectsTriangle(Dt))
13019
13035
  return !0;
13020
13036
  }
13021
13037
  } else {
@@ -13023,29 +13039,29 @@ function er(a, e, t, i, s = null) {
13023
13039
  return $(d, r, Wi), !!(s.intersectsBox(Wi) && er(d, e, t, i, s) || ($(n, r, Wi), s.intersectsBox(Wi) && er(n, e, t, i, s)));
13024
13040
  }
13025
13041
  }
13026
- const Hi = /* @__PURE__ */ new te(), Ds = /* @__PURE__ */ new ue(), si = /* @__PURE__ */ new ue(), Fh = /* @__PURE__ */ new b(), Bh = /* @__PURE__ */ new b(), Oh = /* @__PURE__ */ new b(), zh = /* @__PURE__ */ new b();
13027
- function Wh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13028
- e.boundingBox || e.computeBoundingBox(), Ds.set(e.boundingBox.min, e.boundingBox.max, t), Ds.needsUpdate = !0;
13042
+ const Hi = /* @__PURE__ */ new te(), Ps = /* @__PURE__ */ new ue(), si = /* @__PURE__ */ new ue(), Bh = /* @__PURE__ */ new b(), Oh = /* @__PURE__ */ new b(), zh = /* @__PURE__ */ new b(), Wh = /* @__PURE__ */ new b();
13043
+ function Uh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13044
+ e.boundingBox || e.computeBoundingBox(), Ps.set(e.boundingBox.min, e.boundingBox.max, t), Ps.needsUpdate = !0;
13029
13045
  const c = a.geometry, h = c.attributes.position, u = c.index, d = e.attributes.position, n = e.index, l = Te.getPrimitive(), f = Te.getPrimitive();
13030
- let m = Fh, _ = Bh, p = null, g = null;
13031
- s && (p = Oh, g = zh);
13046
+ let m = Bh, _ = Oh, p = null, g = null;
13047
+ s && (p = zh, g = Wh);
13032
13048
  let v = 1 / 0, y = null, x = null;
13033
13049
  return Hi.copy(t).invert(), si.matrix.copy(Hi), a.shapecast(
13034
13050
  {
13035
- boundsTraverseOrder: (w) => Ds.distanceToBox(w),
13051
+ boundsTraverseOrder: (w) => Ps.distanceToBox(w),
13036
13052
  intersectsBounds: (w, T, M) => M < v && M < o ? (T && (si.min.copy(w.min), si.max.copy(w.max), si.needsUpdate = !0), !0) : !1,
13037
13053
  intersectsRange: (w, T) => {
13038
13054
  if (e.boundsTree)
13039
13055
  return e.boundsTree.shapecast({
13040
- boundsTraverseOrder: (P) => si.distanceToBox(P),
13041
- intersectsBounds: (P, C, E) => E < v && E < o,
13042
- intersectsRange: (P, C) => {
13043
- for (let E = P, I = P + C; E < I; E++) {
13056
+ boundsTraverseOrder: (D) => si.distanceToBox(D),
13057
+ intersectsBounds: (D, C, E) => E < v && E < o,
13058
+ intersectsRange: (D, C) => {
13059
+ for (let E = D, I = D + C; E < I; E++) {
13044
13060
  ie(f, 3 * E, n, d), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
13045
13061
  for (let A = w, S = w + T; A < S; A++) {
13046
13062
  ie(l, 3 * A, u, h), l.needsUpdate = !0;
13047
- const D = l.distanceToTriangle(f, m, p);
13048
- if (D < v && (_.copy(m), g && g.copy(p), v = D, y = A, x = E), D < r)
13063
+ const P = l.distanceToTriangle(f, m, p);
13064
+ if (P < v && (_.copy(m), g && g.copy(p), v = P, y = A, x = E), P < r)
13049
13065
  return !0;
13050
13066
  }
13051
13067
  }
@@ -13053,12 +13069,12 @@ function Wh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13053
13069
  });
13054
13070
  {
13055
13071
  const M = Qt(e);
13056
- for (let P = 0, C = M; P < C; P++) {
13057
- ie(f, 3 * P, n, d), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
13072
+ for (let D = 0, C = M; D < C; D++) {
13073
+ ie(f, 3 * D, n, d), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
13058
13074
  for (let E = w, I = w + T; E < I; E++) {
13059
13075
  ie(l, 3 * E, u, h), l.needsUpdate = !0;
13060
13076
  const A = l.distanceToTriangle(f, m, p);
13061
- if (A < v && (_.copy(m), g && g.copy(p), v = A, y = E, x = P), A < r)
13077
+ if (A < v && (_.copy(m), g && g.copy(p), v = A, y = E, x = D), A < r)
13062
13078
  return !0;
13063
13079
  }
13064
13080
  }
@@ -13067,7 +13083,7 @@ function Wh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13067
13083
  }
13068
13084
  ), Te.releasePrimitive(l), Te.releasePrimitive(f), v === 1 / 0 ? null : (i.point ? i.point.copy(_) : i.point = _.clone(), i.distance = v, i.faceIndex = y, s && (s.point ? s.point.copy(g) : s.point = g.clone(), s.point.applyMatrix4(Hi), _.applyMatrix4(Hi), s.distance = _.sub(s.point).length(), s.faceIndex = x), i);
13069
13085
  }
13070
- function Uh(a, e = null) {
13086
+ function Hh(a, e = null) {
13071
13087
  e && Array.isArray(e) && (e = new Set(e));
13072
13088
  const t = a.geometry, i = t.index ? t.index.array : null, s = t.attributes.position;
13073
13089
  let r, o, c, h, u = 0;
@@ -13078,44 +13094,44 @@ function Uh(a, e = null) {
13078
13094
  const _ = l * 2;
13079
13095
  if (c[_ + 15] === as) {
13080
13096
  const g = o[l + 6], v = c[_ + 14];
13081
- let y = 1 / 0, x = 1 / 0, w = 1 / 0, T = -1 / 0, M = -1 / 0, P = -1 / 0;
13097
+ let y = 1 / 0, x = 1 / 0, w = 1 / 0, T = -1 / 0, M = -1 / 0, D = -1 / 0;
13082
13098
  for (let C = g, E = g + v; C < E; C++) {
13083
13099
  const I = 3 * a.resolveTriangleIndex(C);
13084
13100
  for (let A = 0; A < 3; A++) {
13085
13101
  let S = I + A;
13086
13102
  S = i ? i[S] : S;
13087
- const D = s.getX(S), R = s.getY(S), k = s.getZ(S);
13088
- D < y && (y = D), D > T && (T = D), R < x && (x = R), R > M && (M = R), k < w && (w = k), k > P && (P = k);
13103
+ const P = s.getX(S), R = s.getY(S), k = s.getZ(S);
13104
+ P < y && (y = P), P > T && (T = P), R < x && (x = R), R > M && (M = R), k < w && (w = k), k > D && (D = k);
13089
13105
  }
13090
13106
  }
13091
- return h[l + 0] !== y || h[l + 1] !== x || h[l + 2] !== w || h[l + 3] !== T || h[l + 4] !== M || h[l + 5] !== P ? (h[l + 0] = y, h[l + 1] = x, h[l + 2] = w, h[l + 3] = T, h[l + 4] = M, h[l + 5] = P, !0) : !1;
13107
+ return h[l + 0] !== y || h[l + 1] !== x || h[l + 2] !== w || h[l + 3] !== T || h[l + 4] !== M || h[l + 5] !== D ? (h[l + 0] = y, h[l + 1] = x, h[l + 2] = w, h[l + 3] = T, h[l + 4] = M, h[l + 5] = D, !0) : !1;
13092
13108
  } else {
13093
13109
  const g = l + 8, v = o[l + 6], y = g + f, x = v + f;
13094
13110
  let w = m, T = !1, M = !1;
13095
13111
  e ? w || (T = e.has(y), M = e.has(x), w = !T && !M) : (T = !0, M = !0);
13096
- const P = w || T, C = w || M;
13112
+ const D = w || T, C = w || M;
13097
13113
  let E = !1;
13098
- P && (E = n(g, f, w));
13114
+ D && (E = n(g, f, w));
13099
13115
  let I = !1;
13100
13116
  C && (I = n(v, f, w));
13101
13117
  const A = E || I;
13102
13118
  if (A)
13103
13119
  for (let S = 0; S < 3; S++) {
13104
- const D = g + S, R = v + S, k = h[D], F = h[D + 3], z = h[R], B = h[R + 3];
13120
+ const P = g + S, R = v + S, k = h[P], F = h[P + 3], z = h[R], B = h[R + 3];
13105
13121
  h[l + S] = k < z ? k : z, h[l + S + 3] = F > B ? F : B;
13106
13122
  }
13107
13123
  return A;
13108
13124
  }
13109
13125
  }
13110
13126
  }
13111
- function Hh(a, e, t, i, s, r, o) {
13127
+ function Nh(a, e, t, i, s, r, o) {
13112
13128
  Z.setBuffer(a._roots[e]), tr(0, a, t, i, s, r, o), Z.clearBuffer();
13113
13129
  }
13114
13130
  function tr(a, e, t, i, s, r, o) {
13115
13131
  const { float32Array: c, uint16Array: h, uint32Array: u } = Z, d = a * 2;
13116
13132
  if (ge(d, h)) {
13117
13133
  const l = ye(a, u), f = we(d, h);
13118
- Ih(e, t, i, l, f, s, r, o);
13134
+ Dh(e, t, i, l, f, s, r, o);
13119
13135
  } else {
13120
13136
  const l = be(a);
13121
13137
  ut(l, c, i, r, o) && tr(l, e, t, i, s, r, o);
@@ -13123,8 +13139,8 @@ function tr(a, e, t, i, s, r, o) {
13123
13139
  ut(f, c, i, r, o) && tr(f, e, t, i, s, r, o);
13124
13140
  }
13125
13141
  }
13126
- const Nh = ["x", "y", "z"];
13127
- function Vh(a, e, t, i, s, r) {
13142
+ const Vh = ["x", "y", "z"];
13143
+ function Gh(a, e, t, i, s, r) {
13128
13144
  Z.setBuffer(a._roots[e]);
13129
13145
  const o = ir(0, a, t, i, s, r);
13130
13146
  return Z.clearBuffer(), o;
@@ -13136,7 +13152,7 @@ function ir(a, e, t, i, s, r) {
13136
13152
  const n = ye(a, h), l = we(u, c);
13137
13153
  return Ph(e, t, i, n, l, s, r);
13138
13154
  } else {
13139
- const n = ao(a, h), l = Nh[n], m = i.direction[l] >= 0;
13155
+ const n = ao(a, h), l = Vh[n], m = i.direction[l] >= 0;
13140
13156
  let _, p;
13141
13157
  m ? (_ = be(a), p = Ae(a, h)) : (_ = Ae(a, h), p = be(a));
13142
13158
  const v = ut(_, o, i, s, r) ? ir(_, e, t, i, s, r) : null;
@@ -13152,8 +13168,8 @@ function ir(a, e, t, i, s, r) {
13152
13168
  return v && x ? v.distance <= x.distance ? v : x : v || x || null;
13153
13169
  }
13154
13170
  }
13155
- const Ni = /* @__PURE__ */ new J(), Dt = /* @__PURE__ */ new Re(), Et = /* @__PURE__ */ new Re(), ri = /* @__PURE__ */ new te(), wn = /* @__PURE__ */ new ue(), Vi = /* @__PURE__ */ new ue();
13156
- function Gh(a, e, t, i) {
13171
+ const Ni = /* @__PURE__ */ new J(), Pt = /* @__PURE__ */ new Re(), Et = /* @__PURE__ */ new Re(), ri = /* @__PURE__ */ new te(), wn = /* @__PURE__ */ new ue(), Vi = /* @__PURE__ */ new ue();
13172
+ function Qh(a, e, t, i) {
13157
13173
  Z.setBuffer(a._roots[e]);
13158
13174
  const s = sr(0, a, t, i);
13159
13175
  return Z.clearBuffer(), s;
@@ -13176,9 +13192,9 @@ function sr(a, e, t, i, s = null) {
13176
13192
  });
13177
13193
  for (let g = _, v = p + _; g < v; g++) {
13178
13194
  const y = e.resolveTriangleIndex(g);
13179
- ie(Dt, 3 * y, n, l), Dt.a.applyMatrix4(ri), Dt.b.applyMatrix4(ri), Dt.c.applyMatrix4(ri), Dt.needsUpdate = !0;
13195
+ ie(Pt, 3 * y, n, l), Pt.a.applyMatrix4(ri), Pt.b.applyMatrix4(ri), Pt.c.applyMatrix4(ri), Pt.needsUpdate = !0;
13180
13196
  for (let x = 0, w = f.count; x < w; x += 3)
13181
- if (ie(Et, x, f, m), Et.needsUpdate = !0, Dt.intersectsTriangle(Et))
13197
+ if (ie(Et, x, f, m), Et.needsUpdate = !0, Pt.intersectsTriangle(Et))
13182
13198
  return !0;
13183
13199
  }
13184
13200
  } else {
@@ -13186,12 +13202,12 @@ function sr(a, e, t, i, s = null) {
13186
13202
  return $(d, r, Ni), !!(s.intersectsBox(Ni) && sr(d, e, t, i, s) || ($(n, r, Ni), s.intersectsBox(Ni) && sr(n, e, t, i, s)));
13187
13203
  }
13188
13204
  }
13189
- const Gi = /* @__PURE__ */ new te(), Es = /* @__PURE__ */ new ue(), ni = /* @__PURE__ */ new ue(), Qh = /* @__PURE__ */ new b(), jh = /* @__PURE__ */ new b(), qh = /* @__PURE__ */ new b(), Yh = /* @__PURE__ */ new b();
13190
- function Kh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13205
+ const Gi = /* @__PURE__ */ new te(), Es = /* @__PURE__ */ new ue(), ni = /* @__PURE__ */ new ue(), jh = /* @__PURE__ */ new b(), qh = /* @__PURE__ */ new b(), Yh = /* @__PURE__ */ new b(), Kh = /* @__PURE__ */ new b();
13206
+ function Zh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13191
13207
  e.boundingBox || e.computeBoundingBox(), Es.set(e.boundingBox.min, e.boundingBox.max, t), Es.needsUpdate = !0;
13192
13208
  const c = a.geometry, h = c.attributes.position, u = c.index, d = e.attributes.position, n = e.index, l = Te.getPrimitive(), f = Te.getPrimitive();
13193
- let m = Qh, _ = jh, p = null, g = null;
13194
- s && (p = qh, g = Yh);
13209
+ let m = jh, _ = qh, p = null, g = null;
13210
+ s && (p = Yh, g = Kh);
13195
13211
  let v = 1 / 0, y = null, x = null;
13196
13212
  return Gi.copy(t).invert(), ni.matrix.copy(Gi), a.shapecast(
13197
13213
  {
@@ -13201,13 +13217,13 @@ function Kh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13201
13217
  if (e.boundsTree) {
13202
13218
  const M = e.boundsTree;
13203
13219
  return M.shapecast({
13204
- boundsTraverseOrder: (P) => ni.distanceToBox(P),
13205
- intersectsBounds: (P, C, E) => E < v && E < o,
13206
- intersectsRange: (P, C) => {
13207
- for (let E = P, I = P + C; E < I; E++) {
13220
+ boundsTraverseOrder: (D) => ni.distanceToBox(D),
13221
+ intersectsBounds: (D, C, E) => E < v && E < o,
13222
+ intersectsRange: (D, C) => {
13223
+ for (let E = D, I = D + C; E < I; E++) {
13208
13224
  const A = M.resolveTriangleIndex(E);
13209
13225
  ie(f, 3 * A, n, d), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
13210
- for (let S = w, D = w + T; S < D; S++) {
13226
+ for (let S = w, P = w + T; S < P; S++) {
13211
13227
  const R = a.resolveTriangleIndex(S);
13212
13228
  ie(l, 3 * R, u, h), l.needsUpdate = !0;
13213
13229
  const k = l.distanceToTriangle(f, m, p);
@@ -13219,13 +13235,13 @@ function Kh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13219
13235
  });
13220
13236
  } else {
13221
13237
  const M = Qt(e);
13222
- for (let P = 0, C = M; P < C; P++) {
13223
- ie(f, 3 * P, n, d), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
13238
+ for (let D = 0, C = M; D < C; D++) {
13239
+ ie(f, 3 * D, n, d), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
13224
13240
  for (let E = w, I = w + T; E < I; E++) {
13225
13241
  const A = a.resolveTriangleIndex(E);
13226
13242
  ie(l, 3 * A, u, h), l.needsUpdate = !0;
13227
13243
  const S = l.distanceToTriangle(f, m, p);
13228
- if (S < v && (_.copy(m), g && g.copy(p), v = S, y = E, x = P), S < r)
13244
+ if (S < v && (_.copy(m), g && g.copy(p), v = S, y = E, x = D), S < r)
13229
13245
  return !0;
13230
13246
  }
13231
13247
  }
@@ -13234,12 +13250,12 @@ function Kh(a, e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13234
13250
  }
13235
13251
  ), Te.releasePrimitive(l), Te.releasePrimitive(f), v === 1 / 0 ? null : (i.point ? i.point.copy(_) : i.point = _.clone(), i.distance = v, i.faceIndex = y, s && (s.point ? s.point.copy(g) : s.point = g.clone(), s.point.applyMatrix4(Gi), _.applyMatrix4(Gi), s.distance = _.sub(s.point).length(), s.faceIndex = x), i);
13236
13252
  }
13237
- function Zh() {
13253
+ function Xh() {
13238
13254
  return typeof SharedArrayBuffer < "u";
13239
13255
  }
13240
13256
  const fi = new Z.constructor(), es = new Z.constructor(), ot = new mr(() => new J()), Rt = new J(), Lt = new J(), Rs = new J(), Ls = new J();
13241
13257
  let ks = !1;
13242
- function Xh(a, e, t, i) {
13258
+ function Jh(a, e, t, i) {
13243
13259
  if (ks)
13244
13260
  throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
13245
13261
  ks = !0;
@@ -13294,11 +13310,11 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13294
13310
  o + e
13295
13311
  );
13296
13312
  else if (T) {
13297
- const P = ot.getPrimitive();
13298
- $(e, p, P), P.applyMatrix4(t);
13313
+ const D = ot.getPrimitive();
13314
+ $(e, p, D), D.applyMatrix4(t);
13299
13315
  const C = be(a), E = Ae(a, m);
13300
13316
  $(C, f, Rt), $(E, f, Lt);
13301
- const I = P.intersectsBox(Rt), A = P.intersectsBox(Lt);
13317
+ const I = D.intersectsBox(Rt), A = D.intersectsBox(Lt);
13302
13318
  M = I && Ce(
13303
13319
  e,
13304
13320
  C,
@@ -13309,7 +13325,7 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13309
13325
  r,
13310
13326
  h,
13311
13327
  c + 1,
13312
- P,
13328
+ D,
13313
13329
  !d
13314
13330
  ) || A && Ce(
13315
13331
  e,
@@ -13321,17 +13337,17 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13321
13337
  r,
13322
13338
  h,
13323
13339
  c + 1,
13324
- P,
13340
+ D,
13325
13341
  !d
13326
- ), ot.releasePrimitive(P);
13342
+ ), ot.releasePrimitive(D);
13327
13343
  } else {
13328
- const P = be(e), C = Ae(e, g);
13329
- $(P, p, Rs), $(C, p, Ls);
13344
+ const D = be(e), C = Ae(e, g);
13345
+ $(D, p, Rs), $(C, p, Ls);
13330
13346
  const E = u.intersectsBox(Rs), I = u.intersectsBox(Ls);
13331
13347
  if (E && I)
13332
13348
  M = Ce(
13333
13349
  a,
13334
- P,
13350
+ D,
13335
13351
  t,
13336
13352
  i,
13337
13353
  s,
@@ -13358,7 +13374,7 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13358
13374
  if (w)
13359
13375
  M = Ce(
13360
13376
  a,
13361
- P,
13377
+ D,
13362
13378
  t,
13363
13379
  i,
13364
13380
  s,
@@ -13372,11 +13388,11 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13372
13388
  else {
13373
13389
  const A = ot.getPrimitive();
13374
13390
  A.copy(Rs).applyMatrix4(t);
13375
- const S = be(a), D = Ae(a, m);
13376
- $(S, f, Rt), $(D, f, Lt);
13391
+ const S = be(a), P = Ae(a, m);
13392
+ $(S, f, Rt), $(P, f, Lt);
13377
13393
  const R = A.intersectsBox(Rt), k = A.intersectsBox(Lt);
13378
13394
  M = R && Ce(
13379
- P,
13395
+ D,
13380
13396
  S,
13381
13397
  i,
13382
13398
  t,
@@ -13388,8 +13404,8 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13388
13404
  A,
13389
13405
  !d
13390
13406
  ) || k && Ce(
13391
- P,
13392
13407
  D,
13408
+ P,
13393
13409
  i,
13394
13410
  t,
13395
13411
  s,
@@ -13419,8 +13435,8 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13419
13435
  else {
13420
13436
  const A = ot.getPrimitive();
13421
13437
  A.copy(Ls).applyMatrix4(t);
13422
- const S = be(a), D = Ae(a, m);
13423
- $(S, f, Rt), $(D, f, Lt);
13438
+ const S = be(a), P = Ae(a, m);
13439
+ $(S, f, Rt), $(P, f, Lt);
13424
13440
  const R = A.intersectsBox(Rt), k = A.intersectsBox(Lt);
13425
13441
  M = R && Ce(
13426
13442
  C,
@@ -13436,7 +13452,7 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13436
13452
  !d
13437
13453
  ) || k && Ce(
13438
13454
  C,
13439
- D,
13455
+ P,
13440
13456
  i,
13441
13457
  t,
13442
13458
  s,
@@ -13451,7 +13467,7 @@ function Ce(a, e, t, i, s, r = 0, o = 0, c = 0, h = 0, u = null, d = !1) {
13451
13467
  }
13452
13468
  return M;
13453
13469
  }
13454
- const Qi = /* @__PURE__ */ new ue(), bn = /* @__PURE__ */ new J(), Jh = {
13470
+ const Qi = /* @__PURE__ */ new ue(), bn = /* @__PURE__ */ new J(), $h = {
13455
13471
  strategy: ro,
13456
13472
  maxDepth: 40,
13457
13473
  maxLeafTris: 10,
@@ -13506,16 +13522,16 @@ class gr {
13506
13522
  } else
13507
13523
  throw new Error("MeshBVH: Only BufferGeometries are supported.");
13508
13524
  if (t = Object.assign({
13509
- ...Jh,
13525
+ ...$h,
13510
13526
  // undocumented options
13511
13527
  // Whether to skip generating the tree. Used for deserialization.
13512
13528
  [Ss]: !1
13513
- }, t), t.useSharedArrayBuffer && !Zh())
13529
+ }, t), t.useSharedArrayBuffer && !Xh())
13514
13530
  throw new Error("MeshBVH: SharedArrayBuffer is not available.");
13515
- this.geometry = e, this._roots = null, this._indirectBuffer = null, t[Ss] || (ph(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new J()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
13531
+ this.geometry = e, this._roots = null, this._indirectBuffer = null, t[Ss] || (mh(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new J()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
13516
13532
  }
13517
13533
  refit(e = null) {
13518
- return (this.indirect ? Uh : Ch)(this, e);
13534
+ return (this.indirect ? Hh : Ih)(this, e);
13519
13535
  }
13520
13536
  traverse(e, t = 0) {
13521
13537
  const i = this._roots[t], s = new Uint32Array(i), r = new Uint16Array(i);
@@ -13533,7 +13549,7 @@ class gr {
13533
13549
  }
13534
13550
  /* Core Cast Functions */
13535
13551
  raycast(e, t = Bs, i = 0, s = 1 / 0) {
13536
- const r = this._roots, o = this.geometry, c = [], h = t.isMaterial, u = Array.isArray(t), d = o.groups, n = h ? t.side : t, l = this.indirect ? Hh : Eh;
13552
+ const r = this._roots, o = this.geometry, c = [], h = t.isMaterial, u = Array.isArray(t), d = o.groups, n = h ? t.side : t, l = this.indirect ? Nh : Rh;
13537
13553
  for (let f = 0, m = r.length; f < m; f++) {
13538
13554
  const _ = u ? t[d[f].materialIndex].side : n, p = c.length;
13539
13555
  if (l(this, f, _, e, c, i, s), u) {
@@ -13547,7 +13563,7 @@ class gr {
13547
13563
  raycastFirst(e, t = Bs, i = 0, s = 1 / 0) {
13548
13564
  const r = this._roots, o = this.geometry, c = t.isMaterial, h = Array.isArray(t);
13549
13565
  let u = null;
13550
- const d = o.groups, n = c ? t.side : t, l = this.indirect ? Vh : Lh;
13566
+ const d = o.groups, n = c ? t.side : t, l = this.indirect ? Gh : kh;
13551
13567
  for (let f = 0, m = r.length; f < m; f++) {
13552
13568
  const _ = h ? t[d[f].materialIndex].side : n, p = l(this, f, _, e, i, s);
13553
13569
  p != null && (u == null || p.distance < u.distance) && (u = p, h && (p.face.materialIndex = d[f].materialIndex));
@@ -13556,13 +13572,13 @@ class gr {
13556
13572
  }
13557
13573
  intersectsGeometry(e, t) {
13558
13574
  let i = !1;
13559
- const s = this._roots, r = this.indirect ? Gh : kh;
13575
+ const s = this._roots, r = this.indirect ? Qh : Fh;
13560
13576
  for (let o = 0, c = s.length; o < c && (i = r(this, o, e, t), !i); o++)
13561
13577
  ;
13562
13578
  return i;
13563
13579
  }
13564
13580
  shapecast(e) {
13565
- const t = Te.getPrimitive(), i = this.indirect ? Dh : Mh;
13581
+ const t = Te.getPrimitive(), i = this.indirect ? Eh : Ch;
13566
13582
  let {
13567
13583
  boundsTraverseOrder: s,
13568
13584
  intersectsBounds: r,
@@ -13578,7 +13594,7 @@ class gr {
13578
13594
  const d = this._roots;
13579
13595
  for (let n = 0, l = d.length; n < l; n++) {
13580
13596
  const f = d[n];
13581
- if (h = xh(this, n, r, o, s, u), h)
13597
+ if (h = wh(this, n, r, o, s, u), h)
13582
13598
  break;
13583
13599
  u += f.byteLength;
13584
13600
  }
@@ -13602,7 +13618,7 @@ class gr {
13602
13618
  };
13603
13619
  if (r) {
13604
13620
  const m = (_, p, g, v, y, x, w, T) => {
13605
- for (let M = g, P = g + v; M < P; M++) {
13621
+ for (let M = g, D = g + v; M < D; M++) {
13606
13622
  f(M), d.a.applyMatrix4(t), d.b.applyMatrix4(t), d.c.applyMatrix4(t), d.needsUpdate = !0;
13607
13623
  for (let C = _, E = _ + p; C < E; C++)
13608
13624
  if (u(C), o.needsUpdate = !0, r(o, d, C, M, y, x, w, T))
@@ -13618,7 +13634,7 @@ class gr {
13618
13634
  } else
13619
13635
  s = m;
13620
13636
  }
13621
- return Xh(this, e, t, s);
13637
+ return Jh(this, e, t, s);
13622
13638
  }
13623
13639
  /* Derived Cast Functions */
13624
13640
  intersectsBox(e, t) {
@@ -13638,7 +13654,7 @@ class gr {
13638
13654
  );
13639
13655
  }
13640
13656
  closestPointToGeometry(e, t, i = {}, s = {}, r = 0, o = 1 / 0) {
13641
- return (this.indirect ? Kh : Wh)(
13657
+ return (this.indirect ? Zh : Uh)(
13642
13658
  this,
13643
13659
  e,
13644
13660
  t,
@@ -13649,7 +13665,7 @@ class gr {
13649
13665
  );
13650
13666
  }
13651
13667
  closestPointToPoint(e, t = {}, i = 0, s = 1 / 0) {
13652
- return wh(
13668
+ return bh(
13653
13669
  this,
13654
13670
  e,
13655
13671
  t,
@@ -13663,7 +13679,7 @@ class gr {
13663
13679
  }), e;
13664
13680
  }
13665
13681
  }
13666
- class $h {
13682
+ class eu {
13667
13683
  constructor(e) {
13668
13684
  this.name = "WorkerBase", this.running = !1, this.worker = e, this.worker.onerror = (t) => {
13669
13685
  throw t.message ? new Error(`${this.name}: Could not create Web Worker with error "${t.message}"`) : new Error(`${this.name}: Could not create Web Worker.`);
@@ -13686,7 +13702,7 @@ class $h {
13686
13702
  this.worker.terminate(), this.worker = null;
13687
13703
  }
13688
13704
  }
13689
- class eu extends $h {
13705
+ class tu extends eu {
13690
13706
  constructor(e) {
13691
13707
  const t = new Worker(e || new URL("data:text/javascript;base64,aW1wb3J0IHsKCUJ1ZmZlckdlb21ldHJ5LAoJQnVmZmVyQXR0cmlidXRlLAp9IGZyb20gJ3RocmVlJzsKaW1wb3J0IHsgTWVzaEJWSCB9IGZyb20gJy4uL2NvcmUvTWVzaEJWSC5qcyc7Cgpvbm1lc3NhZ2UgPSAoIHsgZGF0YSB9ICkgPT4gewoKCWxldCBwcmV2VGltZSA9IHBlcmZvcm1hbmNlLm5vdygpOwoJZnVuY3Rpb24gb25Qcm9ncmVzc0NhbGxiYWNrKCBwcm9ncmVzcyApIHsKCgkJLy8gYWNjb3VudCBmb3IgZXJyb3IKCQlwcm9ncmVzcyA9IE1hdGgubWluKCBwcm9ncmVzcywgMSApOw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CQl9CgoJCWNvbnN0IGJ2aCA9IG5ldyBNZXNoQlZIKCBnZW9tZXRyeSwgb3B0aW9ucyApOwoJCWNvbnN0IHNlcmlhbGl6ZWQgPSBNZXNoQlZILnNlcmlhbGl6ZSggYnZoLCB7IGNvcHlJbmRleEJ1ZmZlcjogZmFsc2UgfSApOwoJCWxldCB0b1RyYW5zZmVyID0gWyBwb3NpdGlvbi5idWZmZXIsIC4uLnNlcmlhbGl6ZWQucm9vdHMgXTsKCQlpZiAoIHNlcmlhbGl6ZWQuaW5kZXggKSB7CgoJCQl0b1RyYW5zZmVyLnB1c2goIHNlcmlhbGl6ZWQuaW5kZXguYnVmZmVyICk7CgoJCX0KCgkJdG9UcmFuc2ZlciA9IHRvVHJhbnNmZXIuZmlsdGVyKCB2ID0+ICggdHlwZW9mIFNoYXJlZEFycmF5QnVmZmVyID09PSAndW5kZWZpbmVkJyApIHx8ICEgKCB2IGluc3RhbmNlb2YgU2hhcmVkQXJyYXlCdWZmZXIgKSApOwoKCQlpZiAoIGJ2aC5faW5kaXJlY3RCdWZmZXIgKSB7CgoJCQl0b1RyYW5zZmVyLnB1c2goIHNlcmlhbGl6ZWQuaW5kaXJlY3RCdWZmZXIuYnVmZmVyICk7CgoJCX0KCgkJcG9zdE1lc3NhZ2UoIHsKCgkJCWVycm9yOiBudWxsLAoJCQlzZXJpYWxpemVkLAoJCQlwb3NpdGlvbiwKCQkJcHJvZ3Jlc3M6IDEsCgoJCX0sIHRvVHJhbnNmZXIgKTsKCgl9IGNhdGNoICggZXJyb3IgKSB7CgoJCXBvc3RNZXNzYWdlKCB7CgoJCQllcnJvciwKCQkJc2VyaWFsaXplZDogbnVsbCwKCQkJcG9zaXRpb246IG51bGwsCgkJCXByb2dyZXNzOiAxLAoKCQl9ICk7CgoJfQoKfTsK", import.meta.url), { type: "module" });
13692
13708
  super(t), this.name = "GenerateMeshBVHWorker";
@@ -13730,7 +13746,7 @@ class eu extends $h {
13730
13746
  });
13731
13747
  }
13732
13748
  }
13733
- class tu {
13749
+ class iu {
13734
13750
  constructor(e, t) {
13735
13751
  this.lock = !1, this.lockX = !1, this.lockY = !1, this.invRotMat = new te(), this.mouse = new b(), this.rotateStart = new G(), this.rotateEnd = new G(), this.rotateDelta = new G(), this.selectedAxis = null, this.isDragging = !1, this.context = null, this.orbitState = !0, this._animator = 0, this._emitter = new yt(), this.addListener = this._emitter.addListener.bind(this._emitter), this.removeAllListeners = this._emitter.removeAllListeners.bind(this._emitter), this._text = document.createElement("div"), this._textTimer = 0, this._update = () => {
13736
13752
  this.lock || (this._textTimer && (window.clearTimeout(this._textTimer), this._textTimer = 0), this._textTimer = window.setTimeout(() => {
@@ -13915,7 +13931,7 @@ class tu {
13915
13931
  cancelAnimationFrame(this._animator), this.orbit.removeEventListener("change", this._update), this.orbit.enabled = this.orbitState, window.removeEventListener("pointermove", this.onDrag, !1), window.removeEventListener("pointerup", this.onPointerUp, !1), this._emitter.removeAllListeners(), this.domElement.removeEventListener("pointerdown", this.onPointerDown, !1), this.domElement.removeEventListener("pointerenter", this.onPointerEnter, !1), this.domElement.removeEventListener("pointermove", this.onPointerMove, !1), this.domElement.removeEventListener("click", this.onMouseClick, !1), this.domElement.remove(), window.clearTimeout(this._textTimer), this._text.remove();
13916
13932
  }
13917
13933
  }
13918
- class iu {
13934
+ class su {
13919
13935
  // 阴影是否已完成累计渲染
13920
13936
  get isFinished() {
13921
13937
  return this.params ? this.framesDone >= this.params.frames : !0;
@@ -13952,20 +13968,20 @@ class iu {
13952
13968
  size: c,
13953
13969
  displayDelayFrames: Math.max(0, Math.floor(l)),
13954
13970
  paused: f
13955
- }, this.scene = t, this.renderer = e, this.buffer1Active = !1, this.dirLights = [], this.dirLightsHelpers = [], this.clearColor = new X(), this.clearAlpha = 0, this.progress = 0, this.discardMaterial = new ru(), this.lights = [], this.meshes = [], this.objectsToShow = [], this.autoHiddenObjects = [], this.objectsToShowSet = /* @__PURE__ */ new Set(), this.objectsToShowAncestors = /* @__PURE__ */ new Set(), this.framesDone = 0, this.fixedCamera = null, this.isRendering = !1, this._displaySuppressed = !1, this._displayDelayRemaining = 0, this._displayRestoreOpacity = 1, this.shadowMapHistory = [], this.isZUp = Ee.DEFAULT_UP.z === 1, this.progShadowGrp = new De(), this.progShadowGrp.name = "progressive_shadow_assets", this.scene.add(this.progShadowGrp), this.lightOrigin = new De(), this.lightOrigin.name = "light_origin", this.isZUp ? this.lightOrigin.position.set(c, c, c * 1.5) : this.lightOrigin.position.set(c, c, c), this.progShadowGrp.add(this.lightOrigin), this.lightGroup = new De(), this.lightGroup.name = "all_dir_lights", this.progShadowGrp.add(this.lightGroup);
13971
+ }, this.scene = t, this.renderer = e, this.buffer1Active = !1, this.dirLights = [], this.dirLightsHelpers = [], this.clearColor = new X(), this.clearAlpha = 0, this.progress = 0, this.discardMaterial = new nu(), this.lights = [], this.meshes = [], this.objectsToShow = [], this.autoHiddenObjects = [], this.objectsToShowSet = /* @__PURE__ */ new Set(), this.objectsToShowAncestors = /* @__PURE__ */ new Set(), this.framesDone = 0, this.fixedCamera = null, this.isRendering = !1, this._displaySuppressed = !1, this._displayDelayRemaining = 0, this._displayRestoreOpacity = 1, this.shadowMapHistory = [], this.isZUp = Ee.DEFAULT_UP.z === 1, this.progShadowGrp = new Pe(), this.progShadowGrp.name = "progressive_shadow_assets", this.scene.add(this.progShadowGrp), this.lightOrigin = new Pe(), this.lightOrigin.name = "light_origin", this.isZUp ? this.lightOrigin.position.set(c, c, c * 1.5) : this.lightOrigin.position.set(c, c, c), this.progShadowGrp.add(this.lightOrigin), this.lightGroup = new Pe(), this.lightGroup.name = "all_dir_lights", this.progShadowGrp.add(this.lightGroup);
13956
13972
  const m = Math.PI;
13957
13973
  for (let g = 0; g < o; g++) {
13958
- const v = new ko(16777215, m / o);
13974
+ const v = new Fo(16777215, m / o);
13959
13975
  v.name = "dir_light_" + g, v.castShadow = !0, v.shadow.bias = r, v.shadow.camera.near = 0.1, v.shadow.camera.far = 50, v.shadow.camera.right = c / 2, v.shadow.camera.left = -c / 2, v.shadow.camera.top = c / 2, v.shadow.camera.bottom = -c / 2, v.shadow.mapSize.width = s, v.shadow.mapSize.height = s, this.dirLights.push(v), this.lightGroup.add(v);
13960
13976
  }
13961
- const _ = /(Android|iPad|iPhone|iPod)/g.test(navigator == null ? void 0 : navigator.userAgent) ? Pe : xe;
13962
- this.progressiveLightMap1 = new je(i, i, { type: _ }), this.progressiveLightMap2 = new je(i, i, { type: _ }), this.progressiveLightMap1.texture.colorSpace = Ar, this.progressiveLightMap2.texture.colorSpace = Ar, this.shadowCatcherMaterial = new su({
13977
+ const _ = /(Android|iPad|iPhone|iPod)/g.test(navigator == null ? void 0 : navigator.userAgent) ? De : xe;
13978
+ this.progressiveLightMap1 = new je(i, i, { type: _ }), this.progressiveLightMap2 = new je(i, i, { type: _ }), this.progressiveLightMap1.texture.colorSpace = Ar, this.progressiveLightMap2.texture.colorSpace = Ar, this.shadowCatcherMaterial = new ru({
13963
13979
  map: this.progressiveLightMap2.texture,
13964
13980
  transparent: !0,
13965
13981
  opacity: 1
13966
13982
  });
13967
13983
  const p = new mi(c, c);
13968
- this.isZUp || p.rotateX(-Math.PI / 2), this.shadowCatcherMesh = new q(p, this.shadowCatcherMaterial), this.isZUp ? this.shadowCatcherMesh.position.z = 1e-3 : this.shadowCatcherMesh.position.y = 1e-3, this.shadowCatcherMesh.name = "shadowCatcherMesh", this.shadowCatcherMesh.receiveShadow = !0, this.progShadowGrp.add(this.shadowCatcherMesh), this.addObjectToShow(this.progShadowGrp), this.addObjectToShow(this.lightGroup), this.addObjectToShow(this.lightOrigin), this.addObjectToShow(this.shadowCatcherMesh), this.rebuildObjectsToShowAncestors(), this.debugHelpersGroup = new De(), this.targetMat = new Fo({ fog: !1 }), this.previousShadowMap = { value: this.progressiveLightMap1.texture }, this.averagingWindow = { value: h }, this.targetMat.onBeforeCompile = (g) => {
13984
+ this.isZUp || p.rotateX(-Math.PI / 2), this.shadowCatcherMesh = new q(p, this.shadowCatcherMaterial), this.isZUp ? this.shadowCatcherMesh.position.z = 1e-3 : this.shadowCatcherMesh.position.y = 1e-3, this.shadowCatcherMesh.name = "shadowCatcherMesh", this.shadowCatcherMesh.receiveShadow = !0, this.progShadowGrp.add(this.shadowCatcherMesh), this.addObjectToShow(this.progShadowGrp), this.addObjectToShow(this.lightGroup), this.addObjectToShow(this.lightOrigin), this.addObjectToShow(this.shadowCatcherMesh), this.rebuildObjectsToShowAncestors(), this.debugHelpersGroup = new Pe(), this.targetMat = new Bo({ fog: !1 }), this.previousShadowMap = { value: this.progressiveLightMap1.texture }, this.averagingWindow = { value: h }, this.targetMat.onBeforeCompile = (g) => {
13969
13985
  g.vertexShader = `varying vec2 vUv;
13970
13986
  ` + g.vertexShader.slice(0, -1) + "vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";
13971
13987
  const v = g.fragmentShader.indexOf("void main() {");
@@ -14055,10 +14071,10 @@ vec3 texelOld = texture2D(previousShadowMap, vUv).rgb;
14055
14071
  );
14056
14072
  this.isZUp ? t.position.z = this.params.size / 2 : t.position.y = this.params.size / 2;
14057
14073
  for (const r of this.dirLights) {
14058
- const o = new Bo(r);
14074
+ const o = new Oo(r);
14059
14075
  this.dirLightsHelpers.push(o);
14060
14076
  }
14061
- const i = this.isZUp ? new b(0, 0, 1) : new b(0, 1, 0), s = new Oo(new or(i, 1e-3), this.params.size, 16776960);
14077
+ const i = this.isZUp ? new b(0, 0, 1) : new b(0, 1, 0), s = new zo(new or(i, 1e-3), this.params.size, 16776960);
14062
14078
  this.debugHelpersGroup.add(t, s, ...this.dirLightsHelpers);
14063
14079
  }
14064
14080
  e ? (this.progShadowGrp.add(this.debugHelpersGroup), this.dirLightsHelpers.forEach((t) => {
@@ -14223,7 +14239,7 @@ function ho(a = {}, e, t, i = (s) => {
14223
14239
  const o = Object.entries(a);
14224
14240
  super({
14225
14241
  uniforms: o.reduce((c, [h, u]) => {
14226
- const d = zo.clone({ [h]: { value: u } });
14242
+ const d = Wo.clone({ [h]: { value: u } });
14227
14243
  return {
14228
14244
  ...c,
14229
14245
  ...d
@@ -14241,7 +14257,7 @@ function ho(a = {}, e, t, i = (s) => {
14241
14257
  };
14242
14258
  return s.key = Qe.generateUUID(), s;
14243
14259
  }
14244
- const su = ho(
14260
+ const ru = ho(
14245
14261
  {
14246
14262
  transparent: !0,
14247
14263
  color: new X(0, 0, 0),
@@ -14280,14 +14296,14 @@ const su = ho(
14280
14296
  #include <tonemapping_fragment>
14281
14297
  #include <colorspace_fragment>
14282
14298
  }`
14283
- ), ru = ho({}, "void main() { }", "void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");
14284
- class nu extends Ke {
14299
+ ), nu = ho({}, "void main() { }", "void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");
14300
+ class ou extends Ke {
14285
14301
  constructor(e) {
14286
14302
  const t = document.createElement("div");
14287
14303
  super(t), this._controls = e;
14288
14304
  }
14289
14305
  }
14290
- class ou extends W.ShaderMaterial {
14306
+ class au extends W.ShaderMaterial {
14291
14307
  get source() {
14292
14308
  return this.uniforms.source.value;
14293
14309
  }
@@ -14367,7 +14383,7 @@ class An extends W.ShaderMaterial {
14367
14383
  }), this.morphTargets = !0;
14368
14384
  }
14369
14385
  }
14370
- class au extends W.ShaderMaterial {
14386
+ class lu extends W.ShaderMaterial {
14371
14387
  get map() {
14372
14388
  return this.uniforms.map.value;
14373
14389
  }
@@ -14450,7 +14466,7 @@ class au extends W.ShaderMaterial {
14450
14466
  });
14451
14467
  }
14452
14468
  }
14453
- class lu extends W.ShaderMaterial {
14469
+ class cu extends W.ShaderMaterial {
14454
14470
  get source() {
14455
14471
  return this.uniforms.source.value;
14456
14472
  }
@@ -14542,7 +14558,7 @@ class lu extends W.ShaderMaterial {
14542
14558
  });
14543
14559
  }
14544
14560
  }
14545
- class cu {
14561
+ class hu {
14546
14562
  constructor(e, t, i, s) {
14547
14563
  this.params = {
14548
14564
  inside: !1,
@@ -14581,7 +14597,7 @@ class cu {
14581
14597
  wrapS: W.ClampToEdgeWrapping,
14582
14598
  wrapT: W.ClampToEdgeWrapping
14583
14599
  })
14584
- ], this.effectQuad = new wi(new au()), this.jfaQuad = new wi(new lu()), this.seedQuad = new wi(this.seedMaterial), this.expandQuad = new wi(new ou()), this.setSize(window.innerWidth, window.innerHeight);
14600
+ ], this.effectQuad = new wi(new lu()), this.jfaQuad = new wi(new cu()), this.seedQuad = new wi(this.seedMaterial), this.expandQuad = new wi(new au()), this.setSize(window.innerWidth, window.innerHeight);
14585
14601
  }
14586
14602
  setSize(e, t) {
14587
14603
  const i = this.renderer.getPixelRatio(), s = Math.floor(e * i), r = Math.floor(t * i);
@@ -14596,8 +14612,8 @@ class cu {
14596
14612
  let o = !1;
14597
14613
  const c = s.layers.mask;
14598
14614
  if (e) {
14599
- const P = Array.isArray(e) ? e : [e];
14600
- P.length > 0 && (o = !0, this._box.makeEmpty(), P.forEach((C) => {
14615
+ const D = Array.isArray(e) ? e : [e];
14616
+ D.length > 0 && (o = !0, this._box.makeEmpty(), D.forEach((C) => {
14601
14617
  if (C)
14602
14618
  try {
14603
14619
  this._box.expandByObject(C), C.traverse((E) => {
@@ -14610,7 +14626,7 @@ class cu {
14610
14626
  } else
14611
14627
  this._box.setFromObject(i).getBoundingSphere(this._sphere);
14612
14628
  this.masks[0].setSize(this.targets[0].width, this.targets[0].height), this.masks[1].setSize(this.masks[0].width, this.masks[0].height), i.overrideMaterial = this.maskMaterial, t.setClearColor(0, 0), t.setRenderTarget(this.masks[0]), t.clear(), t.render(i, s), i.overrideMaterial = null, t.setRenderTarget(null);
14613
- for (let P = 0; P < 4; P++)
14629
+ for (let D = 0; D < 4; D++)
14614
14630
  this.expandQuad.material.source = this.masks[0].texture, t.setRenderTarget(this.masks[1]), this.expandQuad.render(t), t.setRenderTarget(null), this.masks.reverse();
14615
14631
  this.masks.reverse(), s.updateMatrixWorld();
14616
14632
  const h = this._sphere.center.clone();
@@ -14640,7 +14656,7 @@ class cu {
14640
14656
  }), s.layers.mask = c);
14641
14657
  }
14642
14658
  }
14643
- class hu extends q {
14659
+ class uu extends q {
14644
14660
  constructor(e = 200, t = 20, i = 0.8) {
14645
14661
  const s = new mi(e, e), r = new Gt({
14646
14662
  side: gi,
@@ -14695,7 +14711,7 @@ class hu extends q {
14695
14711
  super(s, r), this.position.z = -0.02;
14696
14712
  }
14697
14713
  }
14698
- const uu = "https://cdn2.seer-group.com/libs/hdr/aristea_wreck_512.hdr", fu = "https://cdn2.seer-group.com/libs/hdr/lightroom_14b_512.hdr", du = "https://cdn2.seer-group.com/libs/fonts.type.json", af = new Qo(du);
14714
+ const fu = "https://cdn2.seer-group.com/libs/hdr/aristea_wreck_512.hdr", du = "https://cdn2.seer-group.com/libs/hdr/lightroom_14b_512.hdr", pu = "https://cdn2.seer-group.com/libs/fonts.type.json", lf = new jo(pu);
14699
14715
  class Tn {
14700
14716
  constructor(e) {
14701
14717
  var i;
@@ -14730,22 +14746,22 @@ class Tn {
14730
14746
  e && (e.metalness = this._defaults.metalness, e.roughness = this._defaults.roughness, e.envMapIntensity = this._defaults.envMapIntensity, e.needsUpdate = !0);
14731
14747
  }
14732
14748
  }
14733
- var pu = /* @__PURE__ */ ((a) => (a[a.DEFAULT = 0] = "DEFAULT", a[a.CAN_INSTALL = 1] = "CAN_INSTALL", a))(pu || {});
14749
+ var mu = /* @__PURE__ */ ((a) => (a[a.DEFAULT = 0] = "DEFAULT", a[a.CAN_INSTALL = 1] = "CAN_INSTALL", a))(mu || {});
14734
14750
  const Sn = 0.15;
14735
14751
  Ee.DEFAULT_UP.set(0, 0, 1);
14736
14752
  let Ft, Zi = 0, rr = 0;
14737
- const mu = () => {
14753
+ const gu = () => {
14738
14754
  Ft = void 0, Zi = 0, rr = 0;
14739
- }, gu = new ze({ colorWrite: !1 });
14740
- class lf {
14755
+ }, _u = new ze({ colorWrite: !1 });
14756
+ class cf {
14741
14757
  constructor(e) {
14742
- this.props = e, this.stats = new hi(), this.scene = new Os(), this.overlayScene = new Os(), this.renderer = new Wo({
14758
+ this.props = e, this.stats = new hi(), this.scene = new Os(), this.overlayScene = new Os(), this.renderer = new Uo({
14743
14759
  antialias: !0,
14744
14760
  alpha: !0,
14745
14761
  logarithmicDepthBuffer: !0,
14746
14762
  powerPreference: "high-performance",
14747
14763
  preserveDrawingBuffer: !0
14748
- }), this.css2dRenderer = new Go(), this.mousePos = new G(), this.mouseCoord = new G(), this.offset = new G(), this.size = new G(), this.amr = new Zc({ showSizeBox: !0, showController: !0 }), this._selectedForOutline = [], this._clock = new rs(!0), this._uiHiddenTime = this._clock.getElapsedTime(), this.camera = new ss(
14764
+ }), this.css2dRenderer = new Qo(), this.mousePos = new G(), this.mouseCoord = new G(), this.offset = new G(), this.size = new G(), this.amr = new Xc({ showSizeBox: !0, showController: !0 }), this._selectedForOutline = [], this._clock = new rs(!0), this._uiHiddenTime = this._clock.getElapsedTime(), this.camera = new ss(
14749
14765
  39.6,
14750
14766
  window.innerWidth / window.innerHeight,
14751
14767
  0.1,
@@ -14757,16 +14773,16 @@ class lf {
14757
14773
  -this.d,
14758
14774
  0.1,
14759
14775
  1e3
14760
- ), this._axisMoving = !1, this._container = new De(), this._raycaster = new Rn(), this._selected = [], this._pointerDownTimeout = 0, this._dragging = !1, this.maxSample = 1024 * 2, this.sampleCount = 0, this._usePathTracing = !1, this._fpsCache = [], this._fpsCacheMax = 20, this._emitter = new yt(), this.sound = new xc(), this._rafId = null, this._destroyed = !1, this._css2dUiStyleInjected = !1, this._ground = new q(
14776
+ ), this._axisMoving = !1, this._container = new Pe(), this._raycaster = new Rn(), this._selected = [], this._pointerDownTimeout = 0, this._dragging = !1, this.maxSample = 1024 * 2, this.sampleCount = 0, this._usePathTracing = !1, this._fpsCache = [], this._fpsCacheMax = 20, this._emitter = new yt(), this.sound = new wc(), this._rafId = null, this._destroyed = !1, this._css2dUiStyleInjected = !1, this._ground = new q(
14761
14777
  new mi(100, 100),
14762
- new Uo({
14778
+ new Ho({
14763
14779
  color: new X("#eee"),
14764
14780
  metalness: 0.4,
14765
14781
  roughness: 0.1,
14766
14782
  clearcoat: 1,
14767
14783
  clearcoatRoughness: 0.1
14768
14784
  })
14769
- ), this._sciFiGrid = new hu(18, 40), this._amrRender = new je(1024, 1024, {
14785
+ ), this._sciFiGrid = new uu(18, 40), this._amrRender = new je(1024, 1024, {
14770
14786
  format: le,
14771
14787
  type: nr,
14772
14788
  colorSpace: pi,
@@ -14795,8 +14811,8 @@ class lf {
14795
14811
  };
14796
14812
  this._pointerDownTimeout = window.setTimeout(h, 200);
14797
14813
  }, this._detectTrackpad = () => {
14798
- Ft || typeof Ft < "u" || (Zi === 0 && (rr = performance.now()), Zi++, performance.now() - rr > 66 && (Zi > 5 ? Ft = !0 : Ft = !1, Ft ? this.controls.zoomSpeed = 0.2 : this.controls.zoomSpeed = 1, setTimeout(mu, 2e3)));
14799
- }, this.debounceForkHeightChange = Mc(() => {
14814
+ Ft || typeof Ft < "u" || (Zi === 0 && (rr = performance.now()), Zi++, performance.now() - rr > 66 && (Zi > 5 ? Ft = !0 : Ft = !1, Ft ? this.controls.zoomSpeed = 0.2 : this.controls.zoomSpeed = 1, setTimeout(gu, 2e3)));
14815
+ }, this.debounceForkHeightChange = Cc(() => {
14800
14816
  var c;
14801
14817
  this._progressShadow.clear(), (c = this._progressShadow) == null || c.recalculate();
14802
14818
  }, 300), this.focusObjects = (c, h) => {
@@ -14868,13 +14884,13 @@ class lf {
14868
14884
  new b(-w.x, -w.y, -w.z)
14869
14885
  ], M = new b(0, 1, 0);
14870
14886
  Math.abs(x.dot(M)) > 0.99 && M.set(0, 0, 1);
14871
- const P = new b().crossVectors(x, M).normalize(), C = new b().crossVectors(P, x).normalize();
14887
+ const D = new b().crossVectors(x, M).normalize(), C = new b().crossVectors(D, x).normalize();
14872
14888
  let E = 0;
14873
14889
  T.forEach((O) => {
14874
- const Y = O.dot(P), H = O.dot(C), fe = Math.sqrt(Y * Y + H * H);
14890
+ const Y = O.dot(D), H = O.dot(C), fe = Math.sqrt(Y * Y + H * H);
14875
14891
  E = Math.max(E, fe);
14876
14892
  }), E = E / 2 + 0.4;
14877
- const I = this.camera.fov * Math.PI / 180, A = 2 * Math.atan(Math.tan(I / 2) * this.camera.aspect), S = E / Math.tan(A / 2), D = E / Math.tan(I / 2), R = Math.max(S, D), k = g.clone().add(x.multiplyScalar(R)), F = this.camera.position.clone(), z = this.controls.target.clone();
14893
+ const I = this.camera.fov * Math.PI / 180, A = 2 * Math.atan(Math.tan(I / 2) * this.camera.aspect), S = E / Math.tan(A / 2), P = E / Math.tan(I / 2), R = Math.max(S, P), k = g.clone().add(x.multiplyScalar(R)), F = this.camera.position.clone(), z = this.controls.target.clone();
14878
14894
  let B = 500;
14879
14895
  const Q = F.distanceTo(k) + z.distanceTo(y);
14880
14896
  Q > 1e-3 && (B = Math.min(1e3, Math.max(450, Q * 45))), this._animateCamera(F, k, z, y, B);
@@ -14888,10 +14904,10 @@ class lf {
14888
14904
  }), this.shadowMode = !1, this._focusRestoreView) {
14889
14905
  const I = this._focusRestoreView;
14890
14906
  this._focusRestoreView = void 0;
14891
- const A = this.camera.position.clone(), S = this.controls.target.clone(), D = I.position.clone(), R = I.target.clone();
14907
+ const A = this.camera.position.clone(), S = this.controls.target.clone(), P = I.position.clone(), R = I.target.clone();
14892
14908
  let k = 500;
14893
- const F = A.distanceTo(D) + S.distanceTo(R);
14894
- F > 1e-3 && (k = Math.min(1e3, Math.max(450, F * 45))), this._animateCamera(A, D, S, R, k, () => {
14909
+ const F = A.distanceTo(P) + S.distanceTo(R);
14910
+ F > 1e-3 && (k = Math.min(1e3, Math.max(450, F * 45))), this._animateCamera(A, P, S, R, k, () => {
14895
14911
  this.camera.up.copy(I.up);
14896
14912
  });
14897
14913
  return;
@@ -14915,14 +14931,14 @@ class lf {
14915
14931
  const u = h.reduce((I, A) => I.add(A), new b()).multiplyScalar(1 / h.length), d = this.controls.target.clone(), n = this.camera.position.clone().sub(d).normalize();
14916
14932
  let l = 0;
14917
14933
  for (const I of h) {
14918
- const A = I.clone().sub(u), S = A.dot(n), D = Math.sqrt(Math.max(0, A.lengthSq() - S * S));
14919
- D > l && (l = D);
14934
+ const A = I.clone().sub(u), S = A.dot(n), P = Math.sqrt(Math.max(0, A.lengthSq() - S * S));
14935
+ P > l && (l = P);
14920
14936
  }
14921
14937
  l = l + 0.4;
14922
14938
  const f = this.camera.fov * Math.PI / 180, m = 2 * Math.atan(Math.tan(f / 2) * this.camera.aspect), _ = l / Math.tan(m / 2), p = l / Math.tan(f / 2), g = Math.max(_, p), v = u.clone(), y = u.clone().add(n.clone().multiplyScalar(g < 1 ? 1 : g)), x = this.camera.position.clone(), w = d.clone(), T = { t: 0 };
14923
14939
  let M = 500;
14924
- const P = x.distanceTo(y) + w.distanceTo(v);
14925
- P > 1e-3 && (M = Math.min(1e3, Math.max(450, P * 45))), this._lastTarget = v.clone(), this._fitAnimation = new Ji(T).to({ t: 1 }, M).easing(me.Easing.Quadratic.InOut).onStart(() => {
14940
+ const D = x.distanceTo(y) + w.distanceTo(v);
14941
+ D > 1e-3 && (M = Math.min(1e3, Math.max(450, D * 45))), this._lastTarget = v.clone(), this._fitAnimation = new Ji(T).to({ t: 1 }, M).easing(me.Easing.Quadratic.InOut).onStart(() => {
14926
14942
  this.controls.enabled = !1;
14927
14943
  }).onUpdate(() => {
14928
14944
  const I = T.t;
@@ -14948,8 +14964,8 @@ class lf {
14948
14964
  ];
14949
14965
  let _ = 0;
14950
14966
  for (const A of m) {
14951
- const S = A.dot(l), D = Math.sqrt(Math.max(0, A.lengthSq() - S * S));
14952
- D > _ && (_ = D);
14967
+ const S = A.dot(l), P = Math.sqrt(Math.max(0, A.lengthSq() - S * S));
14968
+ P > _ && (_ = P);
14953
14969
  }
14954
14970
  _ = _ * 1.05;
14955
14971
  const p = this.camera.fov * Math.PI / 180, g = 2 * Math.atan(Math.tan(p / 2) * this.camera.aspect), v = _ / Math.tan(g / 2), y = _ / Math.tan(p / 2), x = Math.max(v, y), w = u.clone();
@@ -14957,10 +14973,10 @@ class lf {
14957
14973
  h.z < h.x && h.z < h.y && (T = h.x * 0.8), h.z > h.x && h.z > h.y && (T = 0), w.z += T;
14958
14974
  const M = n.clone().normalize().multiplyScalar(x < 1 ? 1 : x).add(w);
14959
14975
  Math.max(h.x * 2, 5);
14960
- const P = this.camera.position.clone(), C = this.controls.target.clone();
14976
+ const D = this.camera.position.clone(), C = this.controls.target.clone();
14961
14977
  let E = 600;
14962
- const I = P.distanceTo(M) + C.distanceTo(d);
14963
- I > 1e-3 && (E = Math.min(800, Math.max(650, I * 45))), this._animateCamera(P, M, C, d, E, () => {
14978
+ const I = D.distanceTo(M) + C.distanceTo(d);
14979
+ I > 1e-3 && (E = Math.min(800, Math.max(650, I * 45))), this._animateCamera(D, M, C, d, E, () => {
14964
14980
  this.shadowMode || (this._progressShadow.visible = !0, this._progressShadow.isFinished || this._progressShadow.recalculate());
14965
14981
  }), this.controls.minDistance = Math.max(0.2, Math.min(x * 0.25, x - 0.1)), this.controls.maxDistance = x * 4;
14966
14982
  }, this.resize = () => {
@@ -14976,9 +14992,9 @@ class lf {
14976
14992
  if (this.stats.begin(), this.renderer.domElement.dispatchEvent(new CustomEvent("ticker", {
14977
14993
  detail: c
14978
14994
  })), this._rafId = requestAnimationFrame(this.ticker), this.renderer.clear(), this.usePathTracing) {
14979
- this.hideAmrUI(), this.sampleCount < this.maxSample ? this.sampleCount++ : this.pathTracer.pausePathTracing = !0, this.pathTracer.renderSample();
14995
+ this.hideAmrUI(), this.amr.shapeKeyDirty && (this.amr.shapeKeyDirty = !1, this._invalidateMorphGeometries(), this.pathTracer.setScene(this.scene, this.mainCamera), this.sampleCount = 0, this.pathTracer.pausePathTracing = !1), this.sampleCount < this.maxSample ? this.sampleCount++ : this.pathTracer.pausePathTracing = !0, this.pathTracer.renderSample();
14980
14996
  const h = this.renderer.autoClear;
14981
- this.renderer.autoClear = !1, this.scene.overrideMaterial = gu, this.renderer.clearDepth(), this.renderer.render(this.scene, this.mainCamera), this.scene.overrideMaterial = null, this.renderer.render(this.overlayScene, this.mainCamera), this.renderer.autoClear = h;
14997
+ this.renderer.autoClear = !1, this.scene.overrideMaterial = _u, this.renderer.clearDepth(), this.renderer.render(this.scene, this.mainCamera), this.scene.overrideMaterial = null, this.renderer.render(this.overlayScene, this.mainCamera), this.renderer.autoClear = h;
14982
14998
  } else {
14983
14999
  this._clock.getElapsedTime() - this._uiHiddenTime > 0.15 ? this.showControls && this.amr.controllers.forEach((d) => d.show()) : this.amr.controllers.forEach((d) => d.hide());
14984
15000
  const u = this.stats.fps();
@@ -14991,12 +15007,12 @@ class lf {
14991
15007
  }
14992
15008
  this.stats.end();
14993
15009
  }
14994
- }, this.stats.showPanel(0), this.hideState(), e.fov && (this.camera.fov = e.fov, this.camera.updateProjectionMatrix()), Xn(Vt, this.renderer), this._ground.visible = !1, this.controls = new Vo(this.camera, this.renderer.domElement), this.controls.enablePan = !0, this.controls.rotateSpeed = this.props.isMobile ? 0.6 : 0.5, this.controls.dampingFactor = Sn, this.controls.enableDamping = !0, this.controls.maxDistance = 10, this.controls.minDistance = 1, this.controls.zoomSpeed = this.props.isMobile ? 0.3 : vc() ? 0.2 : 1, this._cameraPositionUI = new nu(this.controls), this.renderer.setPixelRatio(window.devicePixelRatio || 1), this.renderer.autoClear = !0, this.renderer.toneMapping = Ho, this.renderer.toneMappingExposure = 1.4, this.renderer.outputColorSpace = pi, this.renderer.localClippingEnabled = !0, this.renderer.shadowMap.enabled = !0, this.css2dRenderer.domElement.style.pointerEvents = "none", this.css2dRenderer.domElement.style.position = "absolute", this.css2dRenderer.domElement.style.top = "0px", this.css2dRenderer.domElement.setAttribute("data-css2d-root", "1"), this._ensureCss2dUiStyle(), this.camera.position.set(10, -10, 5), this.camera.lookAt(new b());
14995
- const { tiles: t } = Tc();
14996
- this.pathTracer = new zl(this.renderer), this.pathTracer.multipleImportanceSampling = !0, this.pathTracer.filterGlossyFactor = 0.6;
15010
+ }, this.stats.showPanel(0), this.hideState(), e.fov && (this.camera.fov = e.fov, this.camera.updateProjectionMatrix()), Xn(Vt, this.renderer), this._ground.visible = !1, this.controls = new Go(this.camera, this.renderer.domElement), this.controls.enablePan = !0, this.controls.rotateSpeed = this.props.isMobile ? 0.6 : 0.5, this.controls.dampingFactor = Sn, this.controls.enableDamping = !0, this.controls.maxDistance = 10, this.controls.minDistance = 1, this.controls.zoomSpeed = this.props.isMobile ? 0.3 : yc() ? 0.2 : 1, this._cameraPositionUI = new ou(this.controls), this.renderer.setPixelRatio(window.devicePixelRatio || 1), this.renderer.autoClear = !0, this.renderer.toneMapping = No, this.renderer.toneMappingExposure = 1.4, this.renderer.outputColorSpace = pi, this.renderer.localClippingEnabled = !0, this.renderer.shadowMap.enabled = !0, this.css2dRenderer.domElement.style.pointerEvents = "none", this.css2dRenderer.domElement.style.position = "absolute", this.css2dRenderer.domElement.style.top = "0px", this.css2dRenderer.domElement.setAttribute("data-css2d-root", "1"), this._ensureCss2dUiStyle(), this.camera.position.set(10, -10, 5), this.camera.lookAt(new b());
15011
+ const { tiles: t } = Sc();
15012
+ this.pathTracer = new Wl(this.renderer), this.pathTracer.multipleImportanceSampling = !0, this.pathTracer.filterGlossyFactor = 0.6;
14997
15013
  let i = window.devicePixelRatio;
14998
15014
  i < 2 && (i = 2), this.pathTracer.renderScale = this.props.isMobile ? 1 : i, this.pathTracer.bounces = this.props.isMobile ? 8 : 10, this.pathTracer.transmissiveBounces = this.props.isMobile ? 1 : 3, this.pathTracer.tiles.set(t, t), this.pathTracer.minSamples = 10, this.pathTracer.dynamicLowRes = !0, this.pathTracer.lowResScale = 0.5, this.pathTracer.fadeDuration = 0;
14999
- const s = new eu(e.workerUrl), r = typeof navigator < "u" ? navigator.hardwareConcurrency : 4;
15015
+ const s = new tu(e.workerUrl), r = typeof navigator < "u" ? navigator.hardwareConcurrency : 4;
15000
15016
  s.maxWorkerCount = r, this.pathTracer.setBVHWorker(s), this.orthographicCamera.left = -20, this.orthographicCamera.right = 20, this.orthographicCamera.top = -20, this.orthographicCamera.bottom = 20, this._lastTarget = this.controls.target.clone();
15001
15017
  const o = () => {
15002
15018
  let c = this._lastTarget.x, h = this._lastTarget.y;
@@ -15005,16 +15021,16 @@ class lf {
15005
15021
  this.controls.addEventListener("change", () => {
15006
15022
  var c;
15007
15023
  this.sampleCount = 0, o(), this._uiHiddenTime = this._clock.getElapsedTime(), this.orthographicCamera.position.copy(this.camera.position), this.orthographicCamera.lookAt(this.controls.target), this.usePathTracing && (this.pathTracer.pausePathTracing = !1, (c = this.pathTracer) == null || c.updateCamera()), this._updateCamera(), !(Math.abs(this.camera.position.x) < 1e-3 || Math.abs(this.camera.position.y) < 1e-3) && (this._axisMoving || (this.mainCamera = this.camera, this.usePathTracing && this.generateBVH().then()));
15008
- }), this._mainCamera = this.camera, this._progressShadow = new iu(this.renderer, this.scene, {
15024
+ }), this._mainCamera = this.camera, this._progressShadow = new su(this.renderer, this.scene, {
15009
15025
  size: 8,
15010
15026
  lightCount: 6,
15011
15027
  frames: e.isMobile ? 20 : 60,
15012
15028
  lightRadius: 2,
15013
15029
  ambientWeight: 0.75
15014
- }), this._progressShadow.lightOrigin.position.set(3, 2.5, 0.6), this._progressShadow.visible = !1, this._container.add(this.amr), this.scene.add(this._container), this.ticker(0), this._loadEnv(), this._initEvents(), this.scene.add(this._cameraPositionUI), this._ground.rotateX(-Math.PI / 2), this.scene.add(this._ground), this._jumpFlood = new cu(this.renderer, this.scene, this.camera, {
15030
+ }), this._progressShadow.lightOrigin.position.set(3, 2.5, 0.6), this._progressShadow.visible = !1, this._container.add(this.amr), this.scene.add(this._container), this.ticker(0), this._loadEnv(), this._initEvents(), this.scene.add(this._cameraPositionUI), this._ground.rotateX(-Math.PI / 2), this.scene.add(this._ground), this._jumpFlood = new hu(this.renderer, this.scene, this.camera, {
15015
15031
  thickness: 4,
15016
15032
  color: "#fff"
15017
- }), (typeof e.useAxisBall != "boolean" || e.useAxisBall) && (this._controlsGizmo = new tu(this.controls, {
15033
+ }), (typeof e.useAxisBall != "boolean" || e.useAxisBall) && (this._controlsGizmo = new iu(this.controls, {
15018
15034
  size: 160,
15019
15035
  padding: 12,
15020
15036
  offset: e.axisBallOffset || new G(10, 10),
@@ -15034,6 +15050,18 @@ class lf {
15034
15050
  const e = this.renderer.getRenderTarget();
15035
15051
  this.renderer.setRenderTarget(this._amrRender), this.renderer.setClearColor(0, 0), this.renderer.clear(!0, !0, !0), this.renderer.setRenderTarget(e);
15036
15052
  }
15053
+ /**
15054
+ * 递增所有含 morphTarget 的 mesh 的 position attribute version,
15055
+ * 使 three-gpu-pathtracer 的 MeshDiff.didChange() 返回 true,触发重新 bake。
15056
+ */
15057
+ _invalidateMorphGeometries() {
15058
+ this.scene.traverse((e) => {
15059
+ if (e instanceof q && e.morphTargetInfluences && e.morphTargetDictionary) {
15060
+ const t = e.geometry.attributes.position;
15061
+ t && (t.needsUpdate = !0);
15062
+ }
15063
+ });
15064
+ }
15037
15065
  get shadowMode() {
15038
15066
  return this._shadowMode;
15039
15067
  }
@@ -15041,7 +15069,7 @@ class lf {
15041
15069
  e ? (this._progressShadow.visible = !1, this.amr.bodyOpacity = 0.2) : (this._progressShadow.visible = !0, this.amr.bodyOpacity = 1, this._progressShadow.isFinished || this._progressShadow.recalculate().then()), this._shadowMode = e;
15042
15070
  }
15043
15071
  set usePathTracing(e) {
15044
- this._clearAmrContent(), e ? (this.scene.background = new X("transparent"), this.renderer.toneMappingExposure = 1.8, this.overlayScene.add(this._progressShadow.shadowCatcherMesh), this.amr && (this.amr.bodyOpacity = 1), this.hideAmrUI(), this.pathTracer.renderToCanvas = !0, this.scene.background = null, this._ptEnvMap ? (this.scene.environment = this._ptEnvMap, this.pathTracer.updateEnvironment()) : new Tr().load(fu, (t) => {
15072
+ this._clearAmrContent(), e ? (this.scene.background = new X("transparent"), this.renderer.toneMappingExposure = 1.8, this.overlayScene.add(this._progressShadow.shadowCatcherMesh), this.amr && (this.amr.bodyOpacity = 1), this.hideAmrUI(), this.pathTracer.renderToCanvas = !0, this.scene.background = null, this._ptEnvMap ? (this.scene.environment = this._ptEnvMap, this.pathTracer.updateEnvironment()) : new Tr().load(du, (t) => {
15045
15073
  t.mapping = Xi, this._ptEnvMap = t, this.usePathTracing && (this.scene.environment = t, this.pathTracer.updateEnvironment());
15046
15074
  })) : (this.renderer.toneMappingExposure = 1.4, this.scene.add(this._progressShadow.shadowCatcherMesh), this.pathTracer.renderToCanvas = !1, this.amr.logos.forEach((t) => {
15047
15075
  var i;
@@ -15049,7 +15077,7 @@ class lf {
15049
15077
  }), this.showAmrUI(), this.amr && this.amr.opacityCache !== void 0 ? (this.amr.bodyOpacity = this.amr.opacityCache, this.amr.opacityCache = void 0) : this.amr && (this.amr.bodyOpacity = 1), this.pathTracer.reset(), this._ground.visible = !1, this._envMap && (this.scene.background = this._envMap, this.scene.environment = this._envMap)), this._usePathTracing = e, this.controls.dampingFactor = e ? 1 : Sn, this.sampleCount = 0;
15050
15078
  }
15051
15079
  get fpsAverage() {
15052
- return _c(this._fpsCache);
15080
+ return vc(this._fpsCache);
15053
15081
  }
15054
15082
  get mainCamera() {
15055
15083
  return this._mainCamera;
@@ -15092,8 +15120,8 @@ class lf {
15092
15120
  this.orthographicCamera.left = -t * i / 2, this.orthographicCamera.right = t * i / 2, this.orthographicCamera.top = t / 2, this.orthographicCamera.bottom = -t / 2, this.orthographicCamera.updateProjectionMatrix();
15093
15121
  }
15094
15122
  _loadEnv() {
15095
- new Tr().load(uu, (t) => {
15096
- t.mapping = Xi, this._envMap = t, this._usePathTracing || (this.scene.background = t, this.scene.backgroundBlurriness = 1, this.scene.backgroundIntensity = 1, this.scene.backgroundRotation = new No(Math.PI / 2, 0, Math.PI * 0.98 * 0.8), this.scene.environment = t, this.overlayScene.environment = t, this.scene.environmentRotation = this.scene.backgroundRotation, this.overlayScene.environmentRotation = this.scene.environmentRotation, this.scene.environmentIntensity = 1.4, this.overlayScene.environmentIntensity = this.scene.environmentIntensity), this.pathTracer.updateEnvironment();
15123
+ new Tr().load(fu, (t) => {
15124
+ t.mapping = Xi, this._envMap = t, this._usePathTracing || (this.scene.background = t, this.scene.backgroundBlurriness = 1, this.scene.backgroundIntensity = 1, this.scene.backgroundRotation = new Vo(Math.PI / 2, 0, Math.PI * 0.98 * 0.8), this.scene.environment = t, this.overlayScene.environment = t, this.scene.environmentRotation = this.scene.backgroundRotation, this.overlayScene.environmentRotation = this.scene.environmentRotation, this.scene.environmentIntensity = 1.4, this.overlayScene.environmentIntensity = this.scene.environmentIntensity), this.pathTracer.updateEnvironment();
15097
15125
  }, () => {
15098
15126
  }, () => {
15099
15127
  });
@@ -15151,7 +15179,7 @@ class lf {
15151
15179
  const t = (e == null ? void 0 : e.subject) ?? this._container;
15152
15180
  (o = this._progressShadow) == null || o.visible;
15153
15181
  const i = this.scene.background, s = this.showSize;
15154
- return new _u({
15182
+ return new vu({
15155
15183
  renderer: this.renderer,
15156
15184
  scene: this.scene,
15157
15185
  overlayScene: this.overlayScene,
@@ -15178,13 +15206,13 @@ class lf {
15178
15206
  }
15179
15207
  async addAMR(e, t = "") {
15180
15208
  this.amr.init(this), await this.amr.load(e, t), this.amr.addEventListener("fork-height-change", this.debounceForkHeightChange), this.amr.addEventListener("shape-key-changed", (i, s) => {
15181
- this.pathTracer.reset(), this.sampleCount = 0, this.pathTracer.setScene(this.scene, this.camera), this.overlayScene.traverse((r) => {
15209
+ this.overlayScene.traverse((r) => {
15182
15210
  if (!Object.keys(r.morphTargetDictionary || {}).includes(i))
15183
15211
  return;
15184
15212
  let o = s;
15185
15213
  r.userData[`origin_${i}`] && (o -= r.userData[`origin_${i}`]);
15186
15214
  const c = r.morphTargetDictionary[i];
15187
- r.morphTargetInfluences && (r.morphTargetInfluences[c] = o), r instanceof q && r.geometry.translate(0, 0, 1e-5);
15215
+ r.morphTargetInfluences && (r.morphTargetInfluences[c] = o);
15188
15216
  }), [
15189
15217
  "width",
15190
15218
  "length",
@@ -15273,7 +15301,7 @@ class lf {
15273
15301
  e && ((c = this._resizeObserver) == null || c.unobserve(e)), this.controls.dispose(), this.renderer.domElement.remove(), this.renderer.dispose(), Xe(this.scene), this.scene.clear();
15274
15302
  }
15275
15303
  }
15276
- class _u {
15304
+ class vu {
15277
15305
  constructor(e) {
15278
15306
  this.deps = e, this.canvas = null, this.pixelBuffer = null, this.orthoCamera = new Hs(-1, 1, 1, -1, 0.1, 1e3), this.orthoCamera.position.set(0, 0, 5), this.perspectiveCamera = new ss(45, 1, 0.1, 2e3);
15279
15307
  }
@@ -15363,23 +15391,23 @@ class _u {
15363
15391
  c.lengthSq() === 0 && c.set(0, 0, 1);
15364
15392
  const h = t.up.clone().normalize();
15365
15393
  if (Math.abs(h.dot(c)) > 0.999 && (h.set(0, 0, 1), Math.abs(h.dot(c)) > 0.999 && h.set(0, 1, 0)), (t.mode ?? "orthographic") === "perspective") {
15366
- const x = this.perspectiveCamera, w = t.fov ?? 45, T = Qe.degToRad(w), M = Math.max(Math.tan(T / 2), 1e-4), P = Math.max(M * (i || 1), 1e-4), C = this.getPerspectiveDirection(t, e.size).normalize(), E = new b().crossVectors(C, h).normalize();
15394
+ const x = this.perspectiveCamera, w = t.fov ?? 45, T = Qe.degToRad(w), M = Math.max(Math.tan(T / 2), 1e-4), D = Math.max(M * (i || 1), 1e-4), C = this.getPerspectiveDirection(t, e.size).normalize(), E = new b().crossVectors(C, h).normalize();
15367
15395
  E.lengthSq() < 1e-6 && E.set(1, 0, 0);
15368
- const I = new b().crossVectors(E, C).normalize(), A = Math.max(e.size.x * 0.5, 1e-4), S = Math.max(e.size.y * 0.5, 1e-4), D = Math.max(e.size.z * 0.5, 1e-4), R = [
15369
- new b(-A, -S, -D),
15370
- new b(-A, -S, D),
15371
- new b(-A, S, -D),
15372
- new b(-A, S, D),
15373
- new b(A, -S, -D),
15374
- new b(A, -S, D),
15375
- new b(A, S, -D),
15376
- new b(A, S, D)
15396
+ const I = new b().crossVectors(E, C).normalize(), A = Math.max(e.size.x * 0.5, 1e-4), S = Math.max(e.size.y * 0.5, 1e-4), P = Math.max(e.size.z * 0.5, 1e-4), R = [
15397
+ new b(-A, -S, -P),
15398
+ new b(-A, -S, P),
15399
+ new b(-A, S, -P),
15400
+ new b(-A, S, P),
15401
+ new b(A, -S, -P),
15402
+ new b(A, -S, P),
15403
+ new b(A, S, -P),
15404
+ new b(A, S, P)
15377
15405
  ];
15378
15406
  let k = 0, F = -1 / 0;
15379
15407
  for (const Q of R) {
15380
15408
  const U = E.dot(Q), O = I.dot(Q), Y = C.dot(Q);
15381
15409
  F = Math.max(F, Y);
15382
- const H = Y + Math.abs(U) / P, fe = Y + Math.abs(O) / M;
15410
+ const H = Y + Math.abs(U) / D, fe = Y + Math.abs(O) / M;
15383
15411
  k = Math.max(k, H, fe);
15384
15412
  }
15385
15413
  k = Math.max(k, F + 0.1);
@@ -15461,16 +15489,16 @@ class _u {
15461
15489
  return this.canvas || (this.canvas = document.createElement("canvas")), (this.canvas.width !== e || this.canvas.height !== t) && (this.canvas.width = e, this.canvas.height = t), this.canvas;
15462
15490
  }
15463
15491
  }
15464
- const vu = "shop-components", yu = "0.4.29", xu = "Shop components", wu = "dist/shop-components.umd.js", bu = "dist/shop-components.mjs", Au = "dist/main.d.ts", Tu = {
15492
+ const yu = "shop-components", xu = "0.4.30", wu = "Shop components", bu = "dist/shop-components.umd.js", Au = "dist/shop-components.mjs", Tu = "dist/main.d.ts", Su = {
15465
15493
  dts: "tsc --emitDeclarationOnly & tsc & storybook build -o dist",
15466
15494
  dev: "vite dev",
15467
15495
  build: "vite build",
15468
15496
  "build:web": "BUILD_WEB=1 vite build --outDir dist/web --emptyOutDir",
15469
15497
  v: "auto-changelog -p && git add CHANGELOG.md"
15470
- }, Su = [
15498
+ }, Mu = [
15471
15499
  "dist",
15472
15500
  "package.json"
15473
- ], Mu = [], Cu = "machengda<machengda@seer-group.com>", Iu = "ISC", Pu = {
15501
+ ], Cu = [], Iu = "machengda<machengda@seer-group.com>", Du = "ISC", Pu = {
15474
15502
  "@needle-tools/gltf-progressive": "^3.3.5",
15475
15503
  "auto-changelog": "^2.4.0",
15476
15504
  vite: "5.1.6",
@@ -15478,11 +15506,11 @@ const vu = "shop-components", yu = "0.4.29", xu = "Shop components", wu = "dist/
15478
15506
  tweakpane: "^4.0.3",
15479
15507
  "@tweakpane/core": "^2.0.3",
15480
15508
  stylus: "^0.63.0"
15481
- }, Du = {
15482
- "string-width": "4.2.3"
15483
15509
  }, Eu = {
15484
- three: "0.182.0"
15510
+ "string-width": "4.2.3"
15485
15511
  }, Ru = {
15512
+ three: "0.182.0"
15513
+ }, Lu = {
15486
15514
  "@tweenjs/tween.js": "^23.1.2",
15487
15515
  "@types/howler": "^2.2.11",
15488
15516
  "@types/three": "0.182.0",
@@ -15492,25 +15520,25 @@ const vu = "shop-components", yu = "0.4.29", xu = "Shop components", wu = "dist/
15492
15520
  "three-gpu-pathtracer": "^0.0.24",
15493
15521
  "three-mesh-bvh": "^0.9.5",
15494
15522
  "troika-three-text": "^0.49.1"
15495
- }, Lu = {
15496
- name: vu,
15497
- version: yu,
15498
- description: xu,
15499
- main: wu,
15500
- module: bu,
15501
- types: Au,
15502
- scripts: Tu,
15503
- files: Su,
15504
- keywords: Mu,
15505
- author: Cu,
15506
- license: Iu,
15523
+ }, ku = {
15524
+ name: yu,
15525
+ version: xu,
15526
+ description: wu,
15527
+ main: bu,
15528
+ module: Au,
15529
+ types: Tu,
15530
+ scripts: Su,
15531
+ files: Mu,
15532
+ keywords: Cu,
15533
+ author: Iu,
15534
+ license: Du,
15507
15535
  devDependencies: Pu,
15508
- resolutions: Du,
15509
- peerDependencies: Eu,
15510
- dependencies: Ru
15536
+ resolutions: Eu,
15537
+ peerDependencies: Ru,
15538
+ dependencies: Lu
15511
15539
  };
15512
15540
  function Mn() {
15513
- const a = "Nebula Engin", e = Lu.version, t = `%c ${a} %c v${e} `;
15541
+ const a = "Nebula Engin", e = ku.version, t = `%c ${a} %c v${e} `;
15514
15542
  console.log(t, "background:#111827;color:#ffffff;padding:4px 10px;border-radius:4px 0 0 4px;font-weight:700;", "background:#10B981;color:#ffffff;padding:4px 10px;border-radius:0 4px 4px 0;font-weight:700;");
15515
15543
  }
15516
15544
  const Cn = "__SHOP_COMPONENTS_BANNER_PRINTED__";
@@ -15521,25 +15549,25 @@ try {
15521
15549
  Mn();
15522
15550
  }
15523
15551
  export {
15524
- Zc as Amr,
15552
+ Xc as Amr,
15525
15553
  on as Logo,
15526
15554
  $i as SGLBLoader,
15527
15555
  ne as SLOT_EVENTS,
15528
- lf as Scene3D,
15556
+ cf as Scene3D,
15529
15557
  Tn as Skin,
15530
15558
  sn as Slot,
15531
- pu as SlotState,
15532
- _u as TriViewCapture,
15559
+ mu as SlotState,
15560
+ vu as TriViewCapture,
15533
15561
  Zr as arrayBufferToUrl,
15534
- _c as calculateArrayAverage,
15535
- sf as calculateFocalLength,
15536
- of as createSGLBFile,
15537
- tf as downloadBlob,
15538
- nf as dracoExporter,
15539
- af as font,
15562
+ vc as calculateArrayAverage,
15563
+ rf as calculateFocalLength,
15564
+ af as createSGLBFile,
15565
+ sf as downloadBlob,
15566
+ of as dracoExporter,
15567
+ lf as font,
15540
15568
  Pc as gltfExporter,
15541
15569
  Vt as gltfLoader,
15542
15570
  Xr as imageBitmapToUrl,
15543
- vc as isAppleDevice,
15571
+ yc as isAppleDevice,
15544
15572
  so as textureLoader
15545
15573
  };