@navaramap/font 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,96 +1,17 @@
1
+ import e, { parseCssUnicodeRange as t, parseFontFamilyFromCss as n } from "@navaramap/engine-api";
1
2
  //#region src/cssFontFamily.ts
2
- function e(e) {
3
- let t = [];
4
- for (let n of e.split(",")) {
5
- let e = n.trim();
6
- if (!e) continue;
7
- let r = /^u\+([0-9a-f?]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);
8
- if (!r) throw Error(`Invalid unicode-range token: "${e}"`);
9
- let [, i, a] = r, o;
10
- if (i.includes("?")) {
11
- if (a !== void 0) throw Error(`Invalid unicode-range token: "${e}"`);
12
- o = {
13
- from: parseInt(i.replace(/\?/g, "0"), 16),
14
- to: parseInt(i.replace(/\?/g, "f"), 16)
15
- };
16
- } else {
17
- let e = parseInt(i, 16);
18
- o = {
19
- from: e,
20
- to: a === void 0 ? e : parseInt(a, 16)
21
- };
22
- }
23
- if (o.from > o.to || o.to > 1114111) throw Error(`Invalid unicode-range token: "${e}"`);
24
- t.push(o);
25
- }
26
- return t;
27
- }
28
- var t = [{
29
- from: 0,
30
- to: 1114111
31
- }];
32
- function n(e) {
33
- let t = e[0];
34
- return (t === "\"" || t === "'") && e.endsWith(t) ? e.slice(1, -1) : e;
35
- }
36
- function r(e) {
37
- let t = [...e.matchAll(/url\(\s*("[^"]*"|'[^']*'|[^)]*?)\s*\)(\s*format\(\s*("[^"]*"|'[^']*'|[^)]*?)\s*\))?/gi)];
38
- if (t.length !== 0) return n((t.find((e) => e[3] && n(e[3]).toLowerCase() === "woff2") ?? t[0])[1].trim());
39
- }
40
- function i(e) {
41
- let t = e.replace(/\/\*[\s\S]*?\*\//g, ""), r = [];
42
- for (let [, e] of t.matchAll(/@font-face\s*\{([^}]*)\}/gi)) {
43
- let t = {};
44
- for (let r of e.split(";")) {
45
- let e = r.indexOf(":");
46
- if (e < 0) continue;
47
- let i = r.slice(0, e).trim().toLowerCase(), a = r.slice(e + 1).trim();
48
- i === "font-family" ? t.fontFamily = n(a) : i === "font-style" ? t.fontStyle = a : i === "font-weight" ? t.fontWeight = a : i === "src" ? t.src = a : i === "unicode-range" && (t.unicodeRange = a);
49
- }
50
- r.push(t);
51
- }
52
- return r;
53
- }
54
- function a(e) {
55
- return e.trim().replace(/\s+/g, " ").toLowerCase();
3
+ var r;
4
+ function i() {
5
+ return r ??= e();
56
6
  }
57
- function o(e, t) {
58
- if (t.fontFamily !== void 0) {
59
- let n = Array.isArray(t.fontFamily) ? t.fontFamily : [t.fontFamily], r = e.fontFamily?.toLowerCase();
60
- if (!n.some((e) => e.toLowerCase() === r)) return !1;
61
- }
62
- return !(t.fontWeight !== void 0 && a(e.fontWeight ?? "") !== a(String(t.fontWeight)) || t.fontStyle !== void 0 && a(e.fontStyle ?? "") !== a(t.fontStyle));
7
+ async function a(e) {
8
+ return await i(), t(e);
63
9
  }
64
- function s(n, a, s = {}) {
65
- let c = [];
66
- for (let n of i(a)) {
67
- if (!o(n, s) || n.src === void 0) continue;
68
- let i = r(n.src);
69
- if (i === void 0) continue;
70
- let a = s.baseUrl ? new URL(i, s.baseUrl).toString() : i, l = n.unicodeRange ? e(n.unicodeRange) : t;
71
- c.push({
72
- face: {
73
- url: a,
74
- unicodeRanges: l
75
- },
76
- cssFamily: n.fontFamily?.toLowerCase() ?? ""
77
- });
78
- }
79
- if (c.length === 0) throw Error(`parseFontFamilyFromCss: no @font-face rules matched for family "${n}"`);
80
- if (c.reverse(), Array.isArray(s.fontFamily)) {
81
- let e = s.fontFamily.map((e) => e.toLowerCase()), t = (t) => {
82
- let n = e.indexOf(t);
83
- return n === -1 ? e.length : n;
84
- };
85
- c.sort((e, n) => t(e.cssFamily) - t(n.cssFamily));
86
- }
87
- return {
88
- family: n,
89
- faces: c.map(({ face: e }) => e)
90
- };
10
+ async function o(e, t, r = {}) {
11
+ return await i(), n(e, t, r);
91
12
  }
92
- async function c(e, t, n = {}) {
93
- let r = Array.isArray(t) ? t : [t], { requestInit: i, ...a } = n, o = [], c = await Promise.all(r.map(async (e) => {
13
+ async function s(e, t, n = {}) {
14
+ let r = Array.isArray(t) ? t : [t], { requestInit: i, ...a } = n, s = [], c = await Promise.all(r.map(async (e) => {
94
15
  let t = await fetch(e, i);
95
16
  if (!t.ok) throw Error(`fetchFontFamilyFromCss: failed to fetch "${e}" (${t.status})`);
96
17
  return {
@@ -98,24 +19,27 @@ async function c(e, t, n = {}) {
98
19
  baseUrl: t.url || e
99
20
  };
100
21
  }));
101
- for (let { text: t, baseUrl: n } of c) o.push(...s(e, t, {
102
- ...a,
103
- baseUrl: n
104
- }).faces);
22
+ for (let { text: t, baseUrl: n } of c) {
23
+ let r = await o(e, t, {
24
+ ...a,
25
+ baseUrl: n
26
+ });
27
+ s.push(...r.faces);
28
+ }
105
29
  return {
106
30
  family: e,
107
- faces: o
31
+ faces: s
108
32
  };
109
33
  }
110
- var l = 1e3, u = 1001, d = 1002, f = 1003, p = 1006, m = 1008, h = 1009, g = 1023, _ = 1028, v = 2300, y = 2301, b = 2302, x = 2303, S = 2400, C = 2401, w = 2402, T = "srgb", E = "srgb-linear", D = "linear", O = "srgb", k = 2e3;
111
- function A(e) {
34
+ var c = 1e3, l = 1001, u = 1002, d = 1003, f = 1006, p = 1008, m = 1009, h = 1023, g = 1028, _ = 2300, v = 2301, y = 2302, b = 2303, x = 2400, S = 2401, C = 2402, w = "srgb", T = "srgb-linear", E = "linear", D = "srgb", O = 2e3;
35
+ function k(e) {
112
36
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
113
37
  }
114
- function j(e) {
38
+ function A(e) {
115
39
  return document.createElementNS("http://www.w3.org/1999/xhtml", e);
116
40
  }
117
- var M = {};
118
- function N(e) {
41
+ var ee = {};
42
+ function te(e) {
119
43
  let t = e[0];
120
44
  if (typeof t == "string" && t.startsWith("TSL:")) {
121
45
  let t = e[1];
@@ -123,27 +47,27 @@ function N(e) {
123
47
  }
124
48
  return e;
125
49
  }
126
- function P(...e) {
127
- e = N(e);
50
+ function j(...e) {
51
+ e = te(e);
128
52
  let t = "THREE." + e.shift();
129
53
  {
130
54
  let n = e[0];
131
55
  n && n.isStackTrace ? console.warn(n.getError(t)) : console.warn(t, ...e);
132
56
  }
133
57
  }
134
- function F(...e) {
135
- e = N(e);
58
+ function M(...e) {
59
+ e = te(e);
136
60
  let t = "THREE." + e.shift();
137
61
  {
138
62
  let n = e[0];
139
63
  n && n.isStackTrace ? console.error(n.getError(t)) : console.error(t, ...e);
140
64
  }
141
65
  }
142
- function I(...e) {
66
+ function N(...e) {
143
67
  let t = e.join(" ");
144
- t in M || (M[t] = !0, P(...e));
68
+ t in ee || (ee[t] = !0, j(...e));
145
69
  }
146
- var ee = class {
70
+ var P = class {
147
71
  addEventListener(e, t) {
148
72
  this._listeners === void 0 && (this._listeners = {});
149
73
  let n = this._listeners;
@@ -173,22 +97,22 @@ var ee = class {
173
97
  e.target = null;
174
98
  }
175
99
  }
176
- }, L = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split(".");
100
+ }, F = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split(".");
177
101
  Math.PI / 180, 180 / Math.PI;
178
- function te() {
102
+ function ne() {
179
103
  let e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0, r = Math.random() * 4294967295 | 0;
180
- return (L[e & 255] + L[e >> 8 & 255] + L[e >> 16 & 255] + L[e >> 24 & 255] + "-" + L[t & 255] + L[t >> 8 & 255] + "-" + L[t >> 16 & 15 | 64] + L[t >> 24 & 255] + "-" + L[n & 63 | 128] + L[n >> 8 & 255] + "-" + L[n >> 16 & 255] + L[n >> 24 & 255] + L[r & 255] + L[r >> 8 & 255] + L[r >> 16 & 255] + L[r >> 24 & 255]).toLowerCase();
104
+ return (F[e & 255] + F[e >> 8 & 255] + F[e >> 16 & 255] + F[e >> 24 & 255] + "-" + F[t & 255] + F[t >> 8 & 255] + "-" + F[t >> 16 & 15 | 64] + F[t >> 24 & 255] + "-" + F[n & 63 | 128] + F[n >> 8 & 255] + "-" + F[n >> 16 & 255] + F[n >> 24 & 255] + F[r & 255] + F[r >> 8 & 255] + F[r >> 16 & 255] + F[r >> 24 & 255]).toLowerCase();
181
105
  }
182
- function R(e, t, n) {
106
+ function I(e, t, n) {
183
107
  return Math.max(t, Math.min(n, e));
184
108
  }
185
- function ne(e, t) {
109
+ function re(e, t) {
186
110
  return (e % t + t) % t;
187
111
  }
188
- function re(e, t, n) {
112
+ function ie(e, t, n) {
189
113
  return (1 - n) * e + n * t;
190
114
  }
191
- var ie = class e {
115
+ var ae = class e {
192
116
  static {
193
117
  e.prototype.isVector2 = !0;
194
118
  }
@@ -288,14 +212,14 @@ var ie = class e {
288
212
  return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this;
289
213
  }
290
214
  clamp(e, t) {
291
- return this.x = R(this.x, e.x, t.x), this.y = R(this.y, e.y, t.y), this;
215
+ return this.x = I(this.x, e.x, t.x), this.y = I(this.y, e.y, t.y), this;
292
216
  }
293
217
  clampScalar(e, t) {
294
- return this.x = R(this.x, e, t), this.y = R(this.y, e, t), this;
218
+ return this.x = I(this.x, e, t), this.y = I(this.y, e, t), this;
295
219
  }
296
220
  clampLength(e, t) {
297
221
  let n = this.length();
298
- return this.divideScalar(n || 1).multiplyScalar(R(n, e, t));
222
+ return this.divideScalar(n || 1).multiplyScalar(I(n, e, t));
299
223
  }
300
224
  floor() {
301
225
  return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
@@ -337,7 +261,7 @@ var ie = class e {
337
261
  let t = Math.sqrt(this.lengthSq() * e.lengthSq());
338
262
  if (t === 0) return Math.PI / 2;
339
263
  let n = this.dot(e) / t;
340
- return Math.acos(R(n, -1, 1));
264
+ return Math.acos(I(n, -1, 1));
341
265
  }
342
266
  distanceTo(e) {
343
267
  return Math.sqrt(this.distanceToSquared(e));
@@ -380,7 +304,7 @@ var ie = class e {
380
304
  *[Symbol.iterator]() {
381
305
  yield this.x, yield this.y;
382
306
  }
383
- }, z = class {
307
+ }, L = class {
384
308
  constructor(e = 0, t = 0, n = 0, r = 1) {
385
309
  this.isQuaternion = !0, this._x = e, this._y = t, this._z = n, this._w = r;
386
310
  }
@@ -459,7 +383,7 @@ var ie = class e {
459
383
  case "XZY":
460
384
  this._x = d * l * u - c * f * p, this._y = c * f * u - d * l * p, this._z = c * l * p + d * f * u, this._w = c * l * u + d * f * p;
461
385
  break;
462
- default: P("Quaternion: .setFromEuler() encountered an unknown order: " + a);
386
+ default: j("Quaternion: .setFromEuler() encountered an unknown order: " + a);
463
387
  }
464
388
  return t === !0 && this._onChangeCallback(), this;
465
389
  }
@@ -489,7 +413,7 @@ var ie = class e {
489
413
  return n < 1e-8 ? (n = 0, Math.abs(e.x) > Math.abs(e.z) ? (this._x = -e.y, this._y = e.x, this._z = 0, this._w = n) : (this._x = 0, this._y = -e.z, this._z = e.y, this._w = n)) : (this._x = e.y * t.z - e.z * t.y, this._y = e.z * t.x - e.x * t.z, this._z = e.x * t.y - e.y * t.x, this._w = n), this.normalize();
490
414
  }
491
415
  angleTo(e) {
492
- return 2 * Math.acos(Math.abs(R(this.dot(e), -1, 1)));
416
+ return 2 * Math.acos(Math.abs(I(this.dot(e), -1, 1)));
493
417
  }
494
418
  rotateTowards(e, t) {
495
419
  let n = this.angleTo(e);
@@ -568,7 +492,7 @@ var ie = class e {
568
492
  *[Symbol.iterator]() {
569
493
  yield this._x, yield this._y, yield this._z, yield this._w;
570
494
  }
571
- }, B = class e {
495
+ }, R = class e {
572
496
  static {
573
497
  e.prototype.isVector3 = !0;
574
498
  }
@@ -650,10 +574,10 @@ var ie = class e {
650
574
  return this.x = e.x * t.x, this.y = e.y * t.y, this.z = e.z * t.z, this;
651
575
  }
652
576
  applyEuler(e) {
653
- return this.applyQuaternion(oe.setFromEuler(e));
577
+ return this.applyQuaternion(se.setFromEuler(e));
654
578
  }
655
579
  applyAxisAngle(e, t) {
656
- return this.applyQuaternion(oe.setFromAxisAngle(e, t));
580
+ return this.applyQuaternion(se.setFromAxisAngle(e, t));
657
581
  }
658
582
  applyMatrix3(e) {
659
583
  let t = this.x, n = this.y, r = this.z, i = e.elements;
@@ -693,14 +617,14 @@ var ie = class e {
693
617
  return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this;
694
618
  }
695
619
  clamp(e, t) {
696
- return this.x = R(this.x, e.x, t.x), this.y = R(this.y, e.y, t.y), this.z = R(this.z, e.z, t.z), this;
620
+ return this.x = I(this.x, e.x, t.x), this.y = I(this.y, e.y, t.y), this.z = I(this.z, e.z, t.z), this;
697
621
  }
698
622
  clampScalar(e, t) {
699
- return this.x = R(this.x, e, t), this.y = R(this.y, e, t), this.z = R(this.z, e, t), this;
623
+ return this.x = I(this.x, e, t), this.y = I(this.y, e, t), this.z = I(this.z, e, t), this;
700
624
  }
701
625
  clampLength(e, t) {
702
626
  let n = this.length();
703
- return this.divideScalar(n || 1).multiplyScalar(R(n, e, t));
627
+ return this.divideScalar(n || 1).multiplyScalar(I(n, e, t));
704
628
  }
705
629
  floor() {
706
630
  return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this;
@@ -755,16 +679,16 @@ var ie = class e {
755
679
  return this.copy(e).multiplyScalar(n);
756
680
  }
757
681
  projectOnPlane(e) {
758
- return ae.copy(this).projectOnVector(e), this.sub(ae);
682
+ return oe.copy(this).projectOnVector(e), this.sub(oe);
759
683
  }
760
684
  reflect(e) {
761
- return this.sub(ae.copy(e).multiplyScalar(2 * this.dot(e)));
685
+ return this.sub(oe.copy(e).multiplyScalar(2 * this.dot(e)));
762
686
  }
763
687
  angleTo(e) {
764
688
  let t = Math.sqrt(this.lengthSq() * e.lengthSq());
765
689
  if (t === 0) return Math.PI / 2;
766
690
  let n = this.dot(e) / t;
767
- return Math.acos(R(n, -1, 1));
691
+ return Math.acos(I(n, -1, 1));
768
692
  }
769
693
  distanceTo(e) {
770
694
  return Math.sqrt(this.distanceToSquared(e));
@@ -831,7 +755,7 @@ var ie = class e {
831
755
  *[Symbol.iterator]() {
832
756
  yield this.x, yield this.y, yield this.z;
833
757
  }
834
- }, ae = /*@__PURE__*/ new B(), oe = /*@__PURE__*/ new z(), se = class e {
758
+ }, oe = /*@__PURE__*/ new R(), se = /*@__PURE__*/ new L(), ce = class e {
835
759
  static {
836
760
  e.prototype.isMatrix3 = !0;
837
761
  }
@@ -906,13 +830,13 @@ var ie = class e {
906
830
  return this.set(n * s, n * c, -n * (s * a + c * o) + a + e, -r * c, r * s, -r * (-c * a + s * o) + o + t, 0, 0, 1), this;
907
831
  }
908
832
  scale(e, t) {
909
- return I("Matrix3: .scale() is deprecated. Use .makeScale() instead."), this.premultiply(ce.makeScale(e, t)), this;
833
+ return N("Matrix3: .scale() is deprecated. Use .makeScale() instead."), this.premultiply(le.makeScale(e, t)), this;
910
834
  }
911
835
  rotate(e) {
912
- return I("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."), this.premultiply(ce.makeRotation(-e)), this;
836
+ return N("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."), this.premultiply(le.makeRotation(-e)), this;
913
837
  }
914
838
  translate(e, t) {
915
- return I("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."), this.premultiply(ce.makeTranslation(e, t)), this;
839
+ return N("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."), this.premultiply(le.makeTranslation(e, t)), this;
916
840
  }
917
841
  makeTranslation(e, t) {
918
842
  return e.isVector2 ? this.set(1, 0, e.x, 0, 1, e.y, 0, 0, 1) : this.set(1, 0, e, 0, 1, t, 0, 0, 1), this;
@@ -940,14 +864,14 @@ var ie = class e {
940
864
  clone() {
941
865
  return new this.constructor().fromArray(this.elements);
942
866
  }
943
- }, ce = /*@__PURE__*/ new se(), le = /*@__PURE__*/ new se().set(.4123908, .3575843, .1804808, .212639, .7151687, .0721923, .0193308, .1191948, .9505322), ue = /*@__PURE__*/ new se().set(3.2409699, -1.5373832, -.4986108, -.9692436, 1.8759675, .0415551, .0556301, -.203977, 1.0569715);
944
- function de() {
867
+ }, le = /*@__PURE__*/ new ce(), ue = /*@__PURE__*/ new ce().set(.4123908, .3575843, .1804808, .212639, .7151687, .0721923, .0193308, .1191948, .9505322), de = /*@__PURE__*/ new ce().set(3.2409699, -1.5373832, -.4986108, -.9692436, 1.8759675, .0415551, .0556301, -.203977, 1.0569715);
868
+ function fe() {
945
869
  let e = {
946
870
  enabled: !0,
947
- workingColorSpace: E,
871
+ workingColorSpace: T,
948
872
  spaces: {},
949
873
  convert: function(e, t, n) {
950
- return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r = H(e.r), e.g = H(e.g), e.b = H(e.b)), this.spaces[t].primaries !== this.spaces[n].primaries && (e.applyMatrix3(this.spaces[t].toXYZ), e.applyMatrix3(this.spaces[n].fromXYZ)), this.spaces[n].transfer === "srgb" && (e.r = U(e.r), e.g = U(e.g), e.b = U(e.b)), e);
874
+ return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r = B(e.r), e.g = B(e.g), e.b = B(e.b)), this.spaces[t].primaries !== this.spaces[n].primaries && (e.applyMatrix3(this.spaces[t].toXYZ), e.applyMatrix3(this.spaces[n].fromXYZ)), this.spaces[n].transfer === "srgb" && (e.r = V(e.r), e.g = V(e.g), e.b = V(e.b)), e);
951
875
  },
952
876
  workingToColorSpace: function(e, t) {
953
877
  return this.convert(e, this.workingColorSpace, t);
@@ -959,7 +883,7 @@ function de() {
959
883
  return this.spaces[e].primaries;
960
884
  },
961
885
  getTransfer: function(e) {
962
- return e === "" ? D : this.spaces[e].transfer;
886
+ return e === "" ? E : this.spaces[e].transfer;
963
887
  },
964
888
  getToneMappingMode: function(e) {
965
889
  return this.spaces[e].outputColorSpaceConfig.toneMappingMode || "standard";
@@ -980,10 +904,10 @@ function de() {
980
904
  return this.spaces[e].workingColorSpaceConfig.unpackColorSpace;
981
905
  },
982
906
  fromWorkingColorSpace: function(t, n) {
983
- return I("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(t, n);
907
+ return N("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(t, n);
984
908
  },
985
909
  toWorkingColorSpace: function(t, n) {
986
- return I("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(t, n);
910
+ return N("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(t, n);
987
911
  }
988
912
  }, t = [
989
913
  .64,
@@ -998,68 +922,68 @@ function de() {
998
922
  .0722
999
923
  ], r = [.3127, .329];
1000
924
  return e.define({
1001
- [E]: {
925
+ [T]: {
1002
926
  primaries: t,
1003
927
  whitePoint: r,
1004
- transfer: D,
1005
- toXYZ: le,
1006
- fromXYZ: ue,
928
+ transfer: E,
929
+ toXYZ: ue,
930
+ fromXYZ: de,
1007
931
  luminanceCoefficients: n,
1008
- workingColorSpaceConfig: { unpackColorSpace: T },
1009
- outputColorSpaceConfig: { drawingBufferColorSpace: T }
932
+ workingColorSpaceConfig: { unpackColorSpace: w },
933
+ outputColorSpaceConfig: { drawingBufferColorSpace: w }
1010
934
  },
1011
- [T]: {
935
+ [w]: {
1012
936
  primaries: t,
1013
937
  whitePoint: r,
1014
- transfer: O,
1015
- toXYZ: le,
1016
- fromXYZ: ue,
938
+ transfer: D,
939
+ toXYZ: ue,
940
+ fromXYZ: de,
1017
941
  luminanceCoefficients: n,
1018
- outputColorSpaceConfig: { drawingBufferColorSpace: T }
942
+ outputColorSpaceConfig: { drawingBufferColorSpace: w }
1019
943
  }
1020
944
  }), e;
1021
945
  }
1022
- var V = /*@__PURE__*/ de();
1023
- function H(e) {
946
+ var z = /*@__PURE__*/ fe();
947
+ function B(e) {
1024
948
  return e < .04045 ? e * .0773993808 : (e * .9478672986 + .0521327014) ** 2.4;
1025
949
  }
1026
- function U(e) {
950
+ function V(e) {
1027
951
  return e < .0031308 ? e * 12.92 : 1.055 * e ** .41666 - .055;
1028
952
  }
1029
- var W, fe = class {
953
+ var H, pe = class {
1030
954
  static getDataURL(e, t = "image/png") {
1031
955
  if (/^data:/i.test(e.src) || typeof HTMLCanvasElement > "u") return e.src;
1032
956
  let n;
1033
957
  if (e instanceof HTMLCanvasElement) n = e;
1034
958
  else {
1035
- W === void 0 && (W = j("canvas")), W.width = e.width, W.height = e.height;
1036
- let t = W.getContext("2d");
1037
- e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n = W;
959
+ H === void 0 && (H = A("canvas")), H.width = e.width, H.height = e.height;
960
+ let t = H.getContext("2d");
961
+ e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n = H;
1038
962
  }
1039
963
  return n.toDataURL(t);
1040
964
  }
1041
965
  static sRGBToLinear(e) {
1042
966
  if (typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap) {
1043
- let t = j("canvas");
967
+ let t = A("canvas");
1044
968
  t.width = e.width, t.height = e.height;
1045
969
  let n = t.getContext("2d");
1046
970
  n.drawImage(e, 0, 0, e.width, e.height);
1047
971
  let r = n.getImageData(0, 0, e.width, e.height), i = r.data;
1048
- for (let e = 0; e < i.length; e++) i[e] = H(i[e] / 255) * 255;
972
+ for (let e = 0; e < i.length; e++) i[e] = B(i[e] / 255) * 255;
1049
973
  return n.putImageData(r, 0, 0), t;
1050
974
  } else if (e.data) {
1051
975
  let t = e.data.slice(0);
1052
- for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(H(t[e] / 255) * 255) : t[e] = H(t[e]);
976
+ for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(B(t[e] / 255) * 255) : t[e] = B(t[e]);
1053
977
  return {
1054
978
  data: t,
1055
979
  width: e.width,
1056
980
  height: e.height
1057
981
  };
1058
- } else return P("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."), e;
982
+ } else return j("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."), e;
1059
983
  }
1060
- }, pe = 0, me = class {
984
+ }, me = 0, he = class {
1061
985
  constructor(e = null) {
1062
- this.isSource = !0, Object.defineProperty(this, "id", { value: pe++ }), this.uuid = te(), this.data = e, this.dataReady = !0, this.version = 0;
986
+ this.isSource = !0, Object.defineProperty(this, "id", { value: me++ }), this.uuid = ne(), this.data = e, this.dataReady = !0, this.version = 0;
1063
987
  }
1064
988
  getSize(e) {
1065
989
  let t = this.data;
@@ -1079,33 +1003,33 @@ var W, fe = class {
1079
1003
  let e;
1080
1004
  if (Array.isArray(r)) {
1081
1005
  e = [];
1082
- for (let t = 0, n = r.length; t < n; t++) r[t].isDataTexture ? e.push(he(r[t].image)) : e.push(he(r[t]));
1083
- } else e = he(r);
1006
+ for (let t = 0, n = r.length; t < n; t++) r[t].isDataTexture ? e.push(ge(r[t].image)) : e.push(ge(r[t]));
1007
+ } else e = ge(r);
1084
1008
  n.url = e;
1085
1009
  }
1086
1010
  return t || (e.images[this.uuid] = n), n;
1087
1011
  }
1088
1012
  };
1089
- function he(e) {
1090
- return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap ? fe.getDataURL(e) : e.data ? {
1013
+ function ge(e) {
1014
+ return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap ? pe.getDataURL(e) : e.data ? {
1091
1015
  data: Array.from(e.data),
1092
1016
  width: e.width,
1093
1017
  height: e.height,
1094
1018
  type: e.data.constructor.name
1095
- } : (P("Texture: Unable to serialize Texture."), {});
1019
+ } : (j("Texture: Unable to serialize Texture."), {});
1096
1020
  }
1097
- var ge = 0, _e = /*@__PURE__*/ new B(), ve = class e extends ee {
1098
- constructor(t = e.DEFAULT_IMAGE, n = e.DEFAULT_MAPPING, r = u, i = u, a = p, o = m, s = g, c = h, l = e.DEFAULT_ANISOTROPY, d = "") {
1099
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: ge++ }), this.uuid = te(), this.name = "", this.source = new me(t), this.mipmaps = [], this.mapping = n, this.channel = 0, this.wrapS = r, this.wrapT = i, this.magFilter = a, this.minFilter = o, this.anisotropy = l, this.format = s, this.internalFormat = null, this.type = c, this.offset = new ie(0, 0), this.repeat = new ie(1, 1), this.center = new ie(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new se(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = d, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0, this.normalized = !1;
1021
+ var _e = 0, ve = /*@__PURE__*/ new R(), ye = class e extends P {
1022
+ constructor(t = e.DEFAULT_IMAGE, n = e.DEFAULT_MAPPING, r = l, i = l, a = f, o = p, s = h, c = m, u = e.DEFAULT_ANISOTROPY, d = "") {
1023
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: _e++ }), this.uuid = ne(), this.name = "", this.source = new he(t), this.mipmaps = [], this.mapping = n, this.channel = 0, this.wrapS = r, this.wrapT = i, this.magFilter = a, this.minFilter = o, this.anisotropy = u, this.format = s, this.internalFormat = null, this.type = c, this.offset = new ae(0, 0), this.repeat = new ae(1, 1), this.center = new ae(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ce(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = d, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0, this.normalized = !1;
1100
1024
  }
1101
1025
  get width() {
1102
- return this.source.getSize(_e).x;
1026
+ return this.source.getSize(ve).x;
1103
1027
  }
1104
1028
  get height() {
1105
- return this.source.getSize(_e).y;
1029
+ return this.source.getSize(ve).y;
1106
1030
  }
1107
1031
  get depth() {
1108
- return this.source.getSize(_e).z;
1032
+ return this.source.getSize(ve).z;
1109
1033
  }
1110
1034
  get image() {
1111
1035
  return this.source.data;
@@ -1135,12 +1059,12 @@ var ge = 0, _e = /*@__PURE__*/ new B(), ve = class e extends ee {
1135
1059
  for (let t in e) {
1136
1060
  let n = e[t];
1137
1061
  if (n === void 0) {
1138
- P(`Texture.setValues(): parameter '${t}' has value of undefined.`);
1062
+ j(`Texture.setValues(): parameter '${t}' has value of undefined.`);
1139
1063
  continue;
1140
1064
  }
1141
1065
  let r = this[t];
1142
1066
  if (r === void 0) {
1143
- P(`Texture.setValues(): property '${t}' does not exist.`);
1067
+ j(`Texture.setValues(): property '${t}' does not exist.`);
1144
1068
  continue;
1145
1069
  }
1146
1070
  r && n && r.isVector2 && n.isVector2 || r && n && r.isVector3 && n.isVector3 || r && n && r.isMatrix3 && n.isMatrix3 ? r.copy(n) : this[t] = n;
@@ -1186,24 +1110,24 @@ var ge = 0, _e = /*@__PURE__*/ new B(), ve = class e extends ee {
1186
1110
  transformUv(e) {
1187
1111
  if (this.mapping !== 300) return e;
1188
1112
  if (e.applyMatrix3(this.matrix), e.x < 0 || e.x > 1) switch (this.wrapS) {
1189
- case l:
1113
+ case c:
1190
1114
  e.x -= Math.floor(e.x);
1191
1115
  break;
1192
- case u:
1116
+ case l:
1193
1117
  e.x = e.x < 0 ? 0 : 1;
1194
1118
  break;
1195
- case d:
1119
+ case u:
1196
1120
  Math.abs(Math.floor(e.x) % 2) === 1 ? e.x = Math.ceil(e.x) - e.x : e.x -= Math.floor(e.x);
1197
1121
  break;
1198
1122
  }
1199
1123
  if (e.y < 0 || e.y > 1) switch (this.wrapT) {
1200
- case l:
1124
+ case c:
1201
1125
  e.y -= Math.floor(e.y);
1202
1126
  break;
1203
- case u:
1127
+ case l:
1204
1128
  e.y = e.y < 0 ? 0 : 1;
1205
1129
  break;
1206
- case d:
1130
+ case u:
1207
1131
  Math.abs(Math.floor(e.y) % 2) === 1 ? e.y = Math.ceil(e.y) - e.y : e.y -= Math.floor(e.y);
1208
1132
  break;
1209
1133
  }
@@ -1216,7 +1140,7 @@ var ge = 0, _e = /*@__PURE__*/ new B(), ve = class e extends ee {
1216
1140
  e === !0 && this.pmremVersion++;
1217
1141
  }
1218
1142
  };
1219
- ve.DEFAULT_IMAGE = null, ve.DEFAULT_MAPPING = 300, ve.DEFAULT_ANISOTROPY = 1, class e {
1143
+ ye.DEFAULT_IMAGE = null, ye.DEFAULT_MAPPING = 300, ye.DEFAULT_ANISOTROPY = 1, class e {
1220
1144
  static {
1221
1145
  e.prototype.isVector4 = !0;
1222
1146
  }
@@ -1350,14 +1274,14 @@ ve.DEFAULT_IMAGE = null, ve.DEFAULT_MAPPING = 300, ve.DEFAULT_ANISOTROPY = 1, cl
1350
1274
  return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this.w = Math.max(this.w, e.w), this;
1351
1275
  }
1352
1276
  clamp(e, t) {
1353
- return this.x = R(this.x, e.x, t.x), this.y = R(this.y, e.y, t.y), this.z = R(this.z, e.z, t.z), this.w = R(this.w, e.w, t.w), this;
1277
+ return this.x = I(this.x, e.x, t.x), this.y = I(this.y, e.y, t.y), this.z = I(this.z, e.z, t.z), this.w = I(this.w, e.w, t.w), this;
1354
1278
  }
1355
1279
  clampScalar(e, t) {
1356
- return this.x = R(this.x, e, t), this.y = R(this.y, e, t), this.z = R(this.z, e, t), this.w = R(this.w, e, t), this;
1280
+ return this.x = I(this.x, e, t), this.y = I(this.y, e, t), this.z = I(this.z, e, t), this.w = I(this.w, e, t), this;
1357
1281
  }
1358
1282
  clampLength(e, t) {
1359
1283
  let n = this.length();
1360
- return this.divideScalar(n || 1).multiplyScalar(R(n, e, t));
1284
+ return this.divideScalar(n || 1).multiplyScalar(I(n, e, t));
1361
1285
  }
1362
1286
  floor() {
1363
1287
  return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this.w = Math.floor(this.w), this;
@@ -1417,7 +1341,7 @@ ve.DEFAULT_IMAGE = null, ve.DEFAULT_MAPPING = 300, ve.DEFAULT_ANISOTROPY = 1, cl
1417
1341
  yield this.x, yield this.y, yield this.z, yield this.w;
1418
1342
  }
1419
1343
  };
1420
- var ye = class e {
1344
+ var U = class e {
1421
1345
  static {
1422
1346
  e.prototype.isMatrix4 = !0;
1423
1347
  }
@@ -1471,7 +1395,7 @@ var ye = class e {
1471
1395
  }
1472
1396
  extractRotation(e) {
1473
1397
  if (e.determinantAffine() === 0) return this.identity();
1474
- let t = this.elements, n = e.elements, r = 1 / be.setFromMatrixColumn(e, 0).length(), i = 1 / be.setFromMatrixColumn(e, 1).length(), a = 1 / be.setFromMatrixColumn(e, 2).length();
1398
+ let t = this.elements, n = e.elements, r = 1 / W.setFromMatrixColumn(e, 0).length(), i = 1 / W.setFromMatrixColumn(e, 1).length(), a = 1 / W.setFromMatrixColumn(e, 2).length();
1475
1399
  return t[0] = n[0] * r, t[1] = n[1] * r, t[2] = n[2] * r, t[3] = 0, t[4] = n[4] * i, t[5] = n[5] * i, t[6] = n[6] * i, t[7] = 0, t[8] = n[8] * a, t[9] = n[9] * a, t[10] = n[10] * a, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
1476
1400
  }
1477
1401
  makeRotationFromEuler(e) {
@@ -1498,11 +1422,11 @@ var ye = class e {
1498
1422
  return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
1499
1423
  }
1500
1424
  makeRotationFromQuaternion(e) {
1501
- return this.compose(xe, e, Se);
1425
+ return this.compose(be, e, xe);
1502
1426
  }
1503
1427
  lookAt(e, t, n) {
1504
1428
  let r = this.elements;
1505
- return q.subVectors(e, t), q.lengthSq() === 0 && (q.z = 1), q.normalize(), K.crossVectors(n, q), K.lengthSq() === 0 && (Math.abs(n.z) === 1 ? q.x += 1e-4 : q.z += 1e-4, q.normalize(), K.crossVectors(n, q)), K.normalize(), Ce.crossVectors(q, K), r[0] = K.x, r[4] = Ce.x, r[8] = q.x, r[1] = K.y, r[5] = Ce.y, r[9] = q.y, r[2] = K.z, r[6] = Ce.z, r[10] = q.z, this;
1429
+ return q.subVectors(e, t), q.lengthSq() === 0 && (q.z = 1), q.normalize(), K.crossVectors(n, q), K.lengthSq() === 0 && (Math.abs(n.z) === 1 ? q.x += 1e-4 : q.z += 1e-4, q.normalize(), K.crossVectors(n, q)), K.normalize(), Se.crossVectors(q, K), r[0] = K.x, r[4] = Se.x, r[8] = q.x, r[1] = K.y, r[5] = Se.y, r[9] = q.y, r[2] = K.z, r[6] = Se.z, r[10] = q.z, this;
1506
1430
  }
1507
1431
  multiply(e) {
1508
1432
  return this.multiplyMatrices(this, e);
@@ -1511,8 +1435,8 @@ var ye = class e {
1511
1435
  return this.multiplyMatrices(e, this);
1512
1436
  }
1513
1437
  multiplyMatrices(e, t) {
1514
- let n = e.elements, r = t.elements, i = this.elements, a = n[0], o = n[4], s = n[8], c = n[12], l = n[1], u = n[5], d = n[9], f = n[13], p = n[2], m = n[6], h = n[10], g = n[14], _ = n[3], v = n[7], y = n[11], b = n[15], x = r[0], S = r[4], C = r[8], w = r[12], T = r[1], E = r[5], D = r[9], O = r[13], k = r[2], A = r[6], j = r[10], M = r[14], N = r[3], P = r[7], F = r[11], I = r[15];
1515
- return i[0] = a * x + o * T + s * k + c * N, i[4] = a * S + o * E + s * A + c * P, i[8] = a * C + o * D + s * j + c * F, i[12] = a * w + o * O + s * M + c * I, i[1] = l * x + u * T + d * k + f * N, i[5] = l * S + u * E + d * A + f * P, i[9] = l * C + u * D + d * j + f * F, i[13] = l * w + u * O + d * M + f * I, i[2] = p * x + m * T + h * k + g * N, i[6] = p * S + m * E + h * A + g * P, i[10] = p * C + m * D + h * j + g * F, i[14] = p * w + m * O + h * M + g * I, i[3] = _ * x + v * T + y * k + b * N, i[7] = _ * S + v * E + y * A + b * P, i[11] = _ * C + v * D + y * j + b * F, i[15] = _ * w + v * O + y * M + b * I, this;
1438
+ let n = e.elements, r = t.elements, i = this.elements, a = n[0], o = n[4], s = n[8], c = n[12], l = n[1], u = n[5], d = n[9], f = n[13], p = n[2], m = n[6], h = n[10], g = n[14], _ = n[3], v = n[7], y = n[11], b = n[15], x = r[0], S = r[4], C = r[8], w = r[12], T = r[1], E = r[5], D = r[9], O = r[13], k = r[2], A = r[6], ee = r[10], te = r[14], j = r[3], M = r[7], N = r[11], P = r[15];
1439
+ return i[0] = a * x + o * T + s * k + c * j, i[4] = a * S + o * E + s * A + c * M, i[8] = a * C + o * D + s * ee + c * N, i[12] = a * w + o * O + s * te + c * P, i[1] = l * x + u * T + d * k + f * j, i[5] = l * S + u * E + d * A + f * M, i[9] = l * C + u * D + d * ee + f * N, i[13] = l * w + u * O + d * te + f * P, i[2] = p * x + m * T + h * k + g * j, i[6] = p * S + m * E + h * A + g * M, i[10] = p * C + m * D + h * ee + g * N, i[14] = p * w + m * O + h * te + g * P, i[3] = _ * x + v * T + y * k + b * j, i[7] = _ * S + v * E + y * A + b * M, i[11] = _ * C + v * D + y * ee + b * N, i[15] = _ * w + v * O + y * te + b * P, this;
1516
1440
  }
1517
1441
  multiplyScalar(e) {
1518
1442
  let t = this.elements;
@@ -1582,12 +1506,12 @@ var ye = class e {
1582
1506
  e.x = r[12], e.y = r[13], e.z = r[14];
1583
1507
  let i = this.determinantAffine();
1584
1508
  if (i === 0) return n.set(1, 1, 1), t.identity(), this;
1585
- let a = be.set(r[0], r[1], r[2]).length(), o = be.set(r[4], r[5], r[6]).length(), s = be.set(r[8], r[9], r[10]).length();
1509
+ let a = W.set(r[0], r[1], r[2]).length(), o = W.set(r[4], r[5], r[6]).length(), s = W.set(r[8], r[9], r[10]).length();
1586
1510
  i < 0 && (a = -a), G.copy(this);
1587
1511
  let c = 1 / a, l = 1 / o, u = 1 / s;
1588
1512
  return G.elements[0] *= c, G.elements[1] *= c, G.elements[2] *= c, G.elements[4] *= l, G.elements[5] *= l, G.elements[6] *= l, G.elements[8] *= u, G.elements[9] *= u, G.elements[10] *= u, t.setFromRotationMatrix(G), n.x = a, n.y = o, n.z = s, this;
1589
1513
  }
1590
- makePerspective(e, t, n, r, i, a, o = k, s = !1) {
1514
+ makePerspective(e, t, n, r, i, a, o = O, s = !1) {
1591
1515
  let c = this.elements, l = 2 * i / (t - e), u = 2 * i / (n - r), d = (t + e) / (t - e), f = (n + r) / (n - r), p, m;
1592
1516
  if (s) p = i / (a - i), m = a * i / (a - i);
1593
1517
  else if (o === 2e3) p = -(a + i) / (a - i), m = -2 * a * i / (a - i);
@@ -1595,7 +1519,7 @@ var ye = class e {
1595
1519
  else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
1596
1520
  return c[0] = l, c[4] = 0, c[8] = d, c[12] = 0, c[1] = 0, c[5] = u, c[9] = f, c[13] = 0, c[2] = 0, c[6] = 0, c[10] = p, c[14] = m, c[3] = 0, c[7] = 0, c[11] = -1, c[15] = 0, this;
1597
1521
  }
1598
- makeOrthographic(e, t, n, r, i, a, o = k, s = !1) {
1522
+ makeOrthographic(e, t, n, r, i, a, o = O, s = !1) {
1599
1523
  let c = this.elements, l = 2 / (t - e), u = 2 / (n - r), d = -(t + e) / (t - e), f = -(n + r) / (n - r), p, m;
1600
1524
  if (s) p = 1 / (a - i), m = a / (a - i);
1601
1525
  else if (o === 2e3) p = -2 / (a - i), m = -(a + i) / (a - i);
@@ -1616,7 +1540,7 @@ var ye = class e {
1616
1540
  let n = this.elements;
1617
1541
  return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e[t + 9] = n[9], e[t + 10] = n[10], e[t + 11] = n[11], e[t + 12] = n[12], e[t + 13] = n[13], e[t + 14] = n[14], e[t + 15] = n[15], e;
1618
1542
  }
1619
- }, be = /*@__PURE__*/ new B(), G = /*@__PURE__*/ new ye(), xe = /*@__PURE__*/ new B(0, 0, 0), Se = /*@__PURE__*/ new B(1, 1, 1), K = /*@__PURE__*/ new B(), Ce = /*@__PURE__*/ new B(), q = /*@__PURE__*/ new B(), we = /*@__PURE__*/ new ye(), Te = /*@__PURE__*/ new z(), Ee = class e {
1543
+ }, W = /*@__PURE__*/ new R(), G = /*@__PURE__*/ new U(), be = /*@__PURE__*/ new R(0, 0, 0), xe = /*@__PURE__*/ new R(1, 1, 1), K = /*@__PURE__*/ new R(), Se = /*@__PURE__*/ new R(), q = /*@__PURE__*/ new R(), Ce = /*@__PURE__*/ new U(), we = /*@__PURE__*/ new L(), Te = class e {
1620
1544
  constructor(t = 0, n = 0, r = 0, i = e.DEFAULT_ORDER) {
1621
1545
  this.isEuler = !0, this._x = t, this._y = n, this._z = r, this._order = i;
1622
1546
  }
@@ -1657,35 +1581,35 @@ var ye = class e {
1657
1581
  let r = e.elements, i = r[0], a = r[4], o = r[8], s = r[1], c = r[5], l = r[9], u = r[2], d = r[6], f = r[10];
1658
1582
  switch (t) {
1659
1583
  case "XYZ":
1660
- this._y = Math.asin(R(o, -1, 1)), Math.abs(o) < .9999999 ? (this._x = Math.atan2(-l, f), this._z = Math.atan2(-a, i)) : (this._x = Math.atan2(d, c), this._z = 0);
1584
+ this._y = Math.asin(I(o, -1, 1)), Math.abs(o) < .9999999 ? (this._x = Math.atan2(-l, f), this._z = Math.atan2(-a, i)) : (this._x = Math.atan2(d, c), this._z = 0);
1661
1585
  break;
1662
1586
  case "YXZ":
1663
- this._x = Math.asin(-R(l, -1, 1)), Math.abs(l) < .9999999 ? (this._y = Math.atan2(o, f), this._z = Math.atan2(s, c)) : (this._y = Math.atan2(-u, i), this._z = 0);
1587
+ this._x = Math.asin(-I(l, -1, 1)), Math.abs(l) < .9999999 ? (this._y = Math.atan2(o, f), this._z = Math.atan2(s, c)) : (this._y = Math.atan2(-u, i), this._z = 0);
1664
1588
  break;
1665
1589
  case "ZXY":
1666
- this._x = Math.asin(R(d, -1, 1)), Math.abs(d) < .9999999 ? (this._y = Math.atan2(-u, f), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(s, i));
1590
+ this._x = Math.asin(I(d, -1, 1)), Math.abs(d) < .9999999 ? (this._y = Math.atan2(-u, f), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(s, i));
1667
1591
  break;
1668
1592
  case "ZYX":
1669
- this._y = Math.asin(-R(u, -1, 1)), Math.abs(u) < .9999999 ? (this._x = Math.atan2(d, f), this._z = Math.atan2(s, i)) : (this._x = 0, this._z = Math.atan2(-a, c));
1593
+ this._y = Math.asin(-I(u, -1, 1)), Math.abs(u) < .9999999 ? (this._x = Math.atan2(d, f), this._z = Math.atan2(s, i)) : (this._x = 0, this._z = Math.atan2(-a, c));
1670
1594
  break;
1671
1595
  case "YZX":
1672
- this._z = Math.asin(R(s, -1, 1)), Math.abs(s) < .9999999 ? (this._x = Math.atan2(-l, c), this._y = Math.atan2(-u, i)) : (this._x = 0, this._y = Math.atan2(o, f));
1596
+ this._z = Math.asin(I(s, -1, 1)), Math.abs(s) < .9999999 ? (this._x = Math.atan2(-l, c), this._y = Math.atan2(-u, i)) : (this._x = 0, this._y = Math.atan2(o, f));
1673
1597
  break;
1674
1598
  case "XZY":
1675
- this._z = Math.asin(-R(a, -1, 1)), Math.abs(a) < .9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(o, i)) : (this._x = Math.atan2(-l, f), this._y = 0);
1599
+ this._z = Math.asin(-I(a, -1, 1)), Math.abs(a) < .9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(o, i)) : (this._x = Math.atan2(-l, f), this._y = 0);
1676
1600
  break;
1677
- default: P("Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
1601
+ default: j("Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
1678
1602
  }
1679
1603
  return this._order = t, n === !0 && this._onChangeCallback(), this;
1680
1604
  }
1681
1605
  setFromQuaternion(e, t, n) {
1682
- return we.makeRotationFromQuaternion(e), this.setFromRotationMatrix(we, t, n);
1606
+ return Ce.makeRotationFromQuaternion(e), this.setFromRotationMatrix(Ce, t, n);
1683
1607
  }
1684
1608
  setFromVector3(e, t = this._order) {
1685
1609
  return this.set(e.x, e.y, e.z, t);
1686
1610
  }
1687
1611
  reorder(e) {
1688
- return Te.setFromEuler(this), this.setFromQuaternion(Te, e);
1612
+ return we.setFromEuler(this), this.setFromQuaternion(we, e);
1689
1613
  }
1690
1614
  equals(e) {
1691
1615
  return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order;
@@ -1704,8 +1628,8 @@ var ye = class e {
1704
1628
  yield this._x, yield this._y, yield this._z, yield this._order;
1705
1629
  }
1706
1630
  };
1707
- Ee.DEFAULT_ORDER = "XYZ";
1708
- var De = class {
1631
+ Te.DEFAULT_ORDER = "XYZ";
1632
+ var Ee = class {
1709
1633
  constructor() {
1710
1634
  this.mask = 1;
1711
1635
  }
@@ -1733,16 +1657,16 @@ var De = class {
1733
1657
  isEnabled(e) {
1734
1658
  return (this.mask & (1 << e | 0)) != 0;
1735
1659
  }
1736
- }, Oe = 0, ke = /*@__PURE__*/ new B(), Ae = /*@__PURE__*/ new z(), J = /*@__PURE__*/ new ye(), je = /*@__PURE__*/ new B(), Me = /*@__PURE__*/ new B(), Ne = /*@__PURE__*/ new B(), Pe = /*@__PURE__*/ new z(), Fe = /*@__PURE__*/ new B(1, 0, 0), Ie = /*@__PURE__*/ new B(0, 1, 0), Le = /*@__PURE__*/ new B(0, 0, 1), Re = { type: "added" }, ze = { type: "removed" }, Be = {
1660
+ }, De = 0, Oe = /*@__PURE__*/ new R(), ke = /*@__PURE__*/ new L(), J = /*@__PURE__*/ new U(), Ae = /*@__PURE__*/ new R(), je = /*@__PURE__*/ new R(), Me = /*@__PURE__*/ new R(), Ne = /*@__PURE__*/ new L(), Pe = /*@__PURE__*/ new R(1, 0, 0), Fe = /*@__PURE__*/ new R(0, 1, 0), Ie = /*@__PURE__*/ new R(0, 0, 1), Le = { type: "added" }, Re = { type: "removed" }, ze = {
1737
1661
  type: "childadded",
1738
1662
  child: null
1739
- }, Ve = {
1663
+ }, Be = {
1740
1664
  type: "childremoved",
1741
1665
  child: null
1742
- }, He = class e extends ee {
1666
+ }, Ve = class e extends P {
1743
1667
  constructor() {
1744
- super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: Oe++ }), this.uuid = te(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
1745
- let t = new B(), n = new Ee(), r = new z(), i = new B(1, 1, 1);
1668
+ super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: De++ }), this.uuid = ne(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
1669
+ let t = new R(), n = new Te(), r = new L(), i = new R(1, 1, 1);
1746
1670
  function a() {
1747
1671
  r.setFromEuler(n, !1);
1748
1672
  }
@@ -1770,9 +1694,9 @@ var De = class {
1770
1694
  enumerable: !0,
1771
1695
  value: i
1772
1696
  },
1773
- modelViewMatrix: { value: new ye() },
1774
- normalMatrix: { value: new se() }
1775
- }), this.matrix = new ye(), this.matrixWorld = new ye(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new De(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
1697
+ modelViewMatrix: { value: new U() },
1698
+ normalMatrix: { value: new ce() }
1699
+ }), this.matrix = new U(), this.matrixWorld = new U(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new Ee(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
1776
1700
  }
1777
1701
  onBeforeShadow() {}
1778
1702
  onAfterShadow() {}
@@ -1797,31 +1721,31 @@ var De = class {
1797
1721
  this.quaternion.copy(e);
1798
1722
  }
1799
1723
  rotateOnAxis(e, t) {
1800
- return Ae.setFromAxisAngle(e, t), this.quaternion.multiply(Ae), this;
1724
+ return ke.setFromAxisAngle(e, t), this.quaternion.multiply(ke), this;
1801
1725
  }
1802
1726
  rotateOnWorldAxis(e, t) {
1803
- return Ae.setFromAxisAngle(e, t), this.quaternion.premultiply(Ae), this;
1727
+ return ke.setFromAxisAngle(e, t), this.quaternion.premultiply(ke), this;
1804
1728
  }
1805
1729
  rotateX(e) {
1806
- return this.rotateOnAxis(Fe, e);
1730
+ return this.rotateOnAxis(Pe, e);
1807
1731
  }
1808
1732
  rotateY(e) {
1809
- return this.rotateOnAxis(Ie, e);
1733
+ return this.rotateOnAxis(Fe, e);
1810
1734
  }
1811
1735
  rotateZ(e) {
1812
- return this.rotateOnAxis(Le, e);
1736
+ return this.rotateOnAxis(Ie, e);
1813
1737
  }
1814
1738
  translateOnAxis(e, t) {
1815
- return ke.copy(e).applyQuaternion(this.quaternion), this.position.add(ke.multiplyScalar(t)), this;
1739
+ return Oe.copy(e).applyQuaternion(this.quaternion), this.position.add(Oe.multiplyScalar(t)), this;
1816
1740
  }
1817
1741
  translateX(e) {
1818
- return this.translateOnAxis(Fe, e);
1742
+ return this.translateOnAxis(Pe, e);
1819
1743
  }
1820
1744
  translateY(e) {
1821
- return this.translateOnAxis(Ie, e);
1745
+ return this.translateOnAxis(Fe, e);
1822
1746
  }
1823
1747
  translateZ(e) {
1824
- return this.translateOnAxis(Le, e);
1748
+ return this.translateOnAxis(Ie, e);
1825
1749
  }
1826
1750
  localToWorld(e) {
1827
1751
  return this.updateWorldMatrix(!0, !1), e.applyMatrix4(this.matrixWorld);
@@ -1830,16 +1754,16 @@ var De = class {
1830
1754
  return this.updateWorldMatrix(!0, !1), e.applyMatrix4(J.copy(this.matrixWorld).invert());
1831
1755
  }
1832
1756
  lookAt(e, t, n) {
1833
- e.isVector3 ? je.copy(e) : je.set(e, t, n);
1757
+ e.isVector3 ? Ae.copy(e) : Ae.set(e, t, n);
1834
1758
  let r = this.parent;
1835
- this.updateWorldMatrix(!0, !1), Me.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? J.lookAt(Me, je, this.up) : J.lookAt(je, Me, this.up), this.quaternion.setFromRotationMatrix(J), r && (J.extractRotation(r.matrixWorld), Ae.setFromRotationMatrix(J), this.quaternion.premultiply(Ae.invert()));
1759
+ this.updateWorldMatrix(!0, !1), je.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? J.lookAt(je, Ae, this.up) : J.lookAt(Ae, je, this.up), this.quaternion.setFromRotationMatrix(J), r && (J.extractRotation(r.matrixWorld), ke.setFromRotationMatrix(J), this.quaternion.premultiply(ke.invert()));
1836
1760
  }
1837
1761
  add(e) {
1838
1762
  if (arguments.length > 1) {
1839
1763
  for (let e = 0; e < arguments.length; e++) this.add(arguments[e]);
1840
1764
  return this;
1841
1765
  }
1842
- return e === this ? (F("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Re), Be.child = e, this.dispatchEvent(Be), Be.child = null) : F("Object3D.add: object not an instance of THREE.Object3D.", e), this);
1766
+ return e === this ? (M("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Le), ze.child = e, this.dispatchEvent(ze), ze.child = null) : M("Object3D.add: object not an instance of THREE.Object3D.", e), this);
1843
1767
  }
1844
1768
  remove(e) {
1845
1769
  if (arguments.length > 1) {
@@ -1847,7 +1771,7 @@ var De = class {
1847
1771
  return this;
1848
1772
  }
1849
1773
  let t = this.children.indexOf(e);
1850
- return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(ze), Ve.child = e, this.dispatchEvent(Ve), Ve.child = null), this;
1774
+ return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(Re), Be.child = e, this.dispatchEvent(Be), Be.child = null), this;
1851
1775
  }
1852
1776
  removeFromParent() {
1853
1777
  let e = this.parent;
@@ -1857,7 +1781,7 @@ var De = class {
1857
1781
  return this.remove(...this.children);
1858
1782
  }
1859
1783
  attach(e) {
1860
- return this.updateWorldMatrix(!0, !1), J.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), J.multiply(e.parent.matrixWorld)), e.applyMatrix4(J), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Re), Be.child = e, this.dispatchEvent(Be), Be.child = null, this;
1784
+ return this.updateWorldMatrix(!0, !1), J.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), J.multiply(e.parent.matrixWorld)), e.applyMatrix4(J), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Le), ze.child = e, this.dispatchEvent(ze), ze.child = null, this;
1861
1785
  }
1862
1786
  getObjectById(e) {
1863
1787
  return this.getObjectByProperty("id", e);
@@ -1882,10 +1806,10 @@ var De = class {
1882
1806
  return this.updateWorldMatrix(!0, !1), e.setFromMatrixPosition(this.matrixWorld);
1883
1807
  }
1884
1808
  getWorldQuaternion(e) {
1885
- return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Me, e, Ne), e;
1809
+ return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(je, e, Me), e;
1886
1810
  }
1887
1811
  getWorldScale(e) {
1888
- return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Me, Pe, e), e;
1812
+ return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(je, Ne, e), e;
1889
1813
  }
1890
1814
  getWorldDirection(e) {
1891
1815
  this.updateWorldMatrix(!0, !1);
@@ -2008,8 +1932,8 @@ var De = class {
2008
1932
  return this;
2009
1933
  }
2010
1934
  };
2011
- He.DEFAULT_UP = /*@__PURE__*/ new B(0, 1, 0), He.DEFAULT_MATRIX_AUTO_UPDATE = !0, He.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
2012
- var Ue = {
1935
+ Ve.DEFAULT_UP = /*@__PURE__*/ new R(0, 1, 0), Ve.DEFAULT_MATRIX_AUTO_UPDATE = !0, Ve.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
1936
+ var He = {
2013
1937
  aliceblue: 15792383,
2014
1938
  antiquewhite: 16444375,
2015
1939
  aqua: 65535,
@@ -2162,15 +2086,15 @@ var Ue = {
2162
2086
  h: 0,
2163
2087
  s: 0,
2164
2088
  l: 0
2165
- }, We = {
2089
+ }, Ue = {
2166
2090
  h: 0,
2167
2091
  s: 0,
2168
2092
  l: 0
2169
2093
  };
2170
- function Ge(e, t, n) {
2094
+ function We(e, t, n) {
2171
2095
  return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * 6 * (2 / 3 - n) : e;
2172
2096
  }
2173
- var Ke = class {
2097
+ var Ge = class {
2174
2098
  constructor(e, t, n) {
2175
2099
  return this.isColor = !0, this.r = 1, this.g = 1, this.b = 1, this.set(e, t, n);
2176
2100
  }
@@ -2184,23 +2108,23 @@ var Ke = class {
2184
2108
  setScalar(e) {
2185
2109
  return this.r = e, this.g = e, this.b = e, this;
2186
2110
  }
2187
- setHex(e, t = T) {
2188
- return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, V.colorSpaceToWorking(this, t), this;
2111
+ setHex(e, t = w) {
2112
+ return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, z.colorSpaceToWorking(this, t), this;
2189
2113
  }
2190
- setRGB(e, t, n, r = V.workingColorSpace) {
2191
- return this.r = e, this.g = t, this.b = n, V.colorSpaceToWorking(this, r), this;
2114
+ setRGB(e, t, n, r = z.workingColorSpace) {
2115
+ return this.r = e, this.g = t, this.b = n, z.colorSpaceToWorking(this, r), this;
2192
2116
  }
2193
- setHSL(e, t, n, r = V.workingColorSpace) {
2194
- if (e = ne(e, 1), t = R(t, 0, 1), n = R(n, 0, 1), t === 0) this.r = this.g = this.b = n;
2117
+ setHSL(e, t, n, r = z.workingColorSpace) {
2118
+ if (e = re(e, 1), t = I(t, 0, 1), n = I(n, 0, 1), t === 0) this.r = this.g = this.b = n;
2195
2119
  else {
2196
2120
  let r = n <= .5 ? n * (1 + t) : n + t - n * t, i = 2 * n - r;
2197
- this.r = Ge(i, r, e + 1 / 3), this.g = Ge(i, r, e), this.b = Ge(i, r, e - 1 / 3);
2121
+ this.r = We(i, r, e + 1 / 3), this.g = We(i, r, e), this.b = We(i, r, e - 1 / 3);
2198
2122
  }
2199
- return V.colorSpaceToWorking(this, r), this;
2123
+ return z.colorSpaceToWorking(this, r), this;
2200
2124
  }
2201
- setStyle(e, t = T) {
2125
+ setStyle(e, t = w) {
2202
2126
  function n(t) {
2203
- t !== void 0 && parseFloat(t) < 1 && P("Color: Alpha component of " + e + " will be ignored.");
2127
+ t !== void 0 && parseFloat(t) < 1 && j("Color: Alpha component of " + e + " will be ignored.");
2204
2128
  }
2205
2129
  let r;
2206
2130
  if (r = /^(\w+)\(([^\)]*)\)/.exec(e)) {
@@ -2215,19 +2139,19 @@ var Ke = class {
2215
2139
  case "hsla":
2216
2140
  if (i = /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)) return n(i[4]), this.setHSL(parseFloat(i[1]) / 360, parseFloat(i[2]) / 100, parseFloat(i[3]) / 100, t);
2217
2141
  break;
2218
- default: P("Color: Unknown color model " + e);
2142
+ default: j("Color: Unknown color model " + e);
2219
2143
  }
2220
2144
  } else if (r = /^\#([A-Fa-f\d]+)$/.exec(e)) {
2221
2145
  let n = r[1], i = n.length;
2222
2146
  if (i === 3) return this.setRGB(parseInt(n.charAt(0), 16) / 15, parseInt(n.charAt(1), 16) / 15, parseInt(n.charAt(2), 16) / 15, t);
2223
2147
  if (i === 6) return this.setHex(parseInt(n, 16), t);
2224
- P("Color: Invalid hex color " + e);
2148
+ j("Color: Invalid hex color " + e);
2225
2149
  } else if (e && e.length > 0) return this.setColorName(e, t);
2226
2150
  return this;
2227
2151
  }
2228
- setColorName(e, t = T) {
2229
- let n = Ue[e.toLowerCase()];
2230
- return n === void 0 ? P("Color: Unknown color " + e) : this.setHex(n, t), this;
2152
+ setColorName(e, t = w) {
2153
+ let n = He[e.toLowerCase()];
2154
+ return n === void 0 ? j("Color: Unknown color " + e) : this.setHex(n, t), this;
2231
2155
  }
2232
2156
  clone() {
2233
2157
  return new this.constructor(this.r, this.g, this.b);
@@ -2236,10 +2160,10 @@ var Ke = class {
2236
2160
  return this.r = e.r, this.g = e.g, this.b = e.b, this;
2237
2161
  }
2238
2162
  copySRGBToLinear(e) {
2239
- return this.r = H(e.r), this.g = H(e.g), this.b = H(e.b), this;
2163
+ return this.r = B(e.r), this.g = B(e.g), this.b = B(e.b), this;
2240
2164
  }
2241
2165
  copyLinearToSRGB(e) {
2242
- return this.r = U(e.r), this.g = U(e.g), this.b = U(e.b), this;
2166
+ return this.r = V(e.r), this.g = V(e.g), this.b = V(e.b), this;
2243
2167
  }
2244
2168
  convertSRGBToLinear() {
2245
2169
  return this.copySRGBToLinear(this), this;
@@ -2247,14 +2171,14 @@ var Ke = class {
2247
2171
  convertLinearToSRGB() {
2248
2172
  return this.copyLinearToSRGB(this), this;
2249
2173
  }
2250
- getHex(e = T) {
2251
- return V.workingToColorSpace(X.copy(this), e), Math.round(R(X.r * 255, 0, 255)) * 65536 + Math.round(R(X.g * 255, 0, 255)) * 256 + Math.round(R(X.b * 255, 0, 255));
2174
+ getHex(e = w) {
2175
+ return z.workingToColorSpace(X.copy(this), e), Math.round(I(X.r * 255, 0, 255)) * 65536 + Math.round(I(X.g * 255, 0, 255)) * 256 + Math.round(I(X.b * 255, 0, 255));
2252
2176
  }
2253
- getHexString(e = T) {
2177
+ getHexString(e = w) {
2254
2178
  return ("000000" + this.getHex(e).toString(16)).slice(-6);
2255
2179
  }
2256
- getHSL(e, t = V.workingColorSpace) {
2257
- V.workingToColorSpace(X.copy(this), t);
2180
+ getHSL(e, t = z.workingColorSpace) {
2181
+ z.workingToColorSpace(X.copy(this), t);
2258
2182
  let n = X.r, r = X.g, i = X.b, a = Math.max(n, r, i), o = Math.min(n, r, i), s, c, l = (o + a) / 2;
2259
2183
  if (o === a) s = 0, c = 0;
2260
2184
  else {
@@ -2274,11 +2198,11 @@ var Ke = class {
2274
2198
  }
2275
2199
  return e.h = s, e.s = c, e.l = l, e;
2276
2200
  }
2277
- getRGB(e, t = V.workingColorSpace) {
2278
- return V.workingToColorSpace(X.copy(this), t), e.r = X.r, e.g = X.g, e.b = X.b, e;
2201
+ getRGB(e, t = z.workingColorSpace) {
2202
+ return z.workingToColorSpace(X.copy(this), t), e.r = X.r, e.g = X.g, e.b = X.b, e;
2279
2203
  }
2280
- getStyle(e = T) {
2281
- V.workingToColorSpace(X.copy(this), e);
2204
+ getStyle(e = w) {
2205
+ z.workingToColorSpace(X.copy(this), e);
2282
2206
  let t = X.r, n = X.g, r = X.b;
2283
2207
  return e === "srgb" ? `rgb(${Math.round(t * 255)},${Math.round(n * 255)},${Math.round(r * 255)})` : `color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`;
2284
2208
  }
@@ -2310,8 +2234,8 @@ var Ke = class {
2310
2234
  return this.r = e.r + (t.r - e.r) * n, this.g = e.g + (t.g - e.g) * n, this.b = e.b + (t.b - e.b) * n, this;
2311
2235
  }
2312
2236
  lerpHSL(e, t) {
2313
- this.getHSL(Y), e.getHSL(We);
2314
- let n = re(Y.h, We.h, t), r = re(Y.s, We.s, t), i = re(Y.l, We.l, t);
2237
+ this.getHSL(Y), e.getHSL(Ue);
2238
+ let n = ie(Y.h, Ue.h, t), r = ie(Y.s, Ue.s, t), i = ie(Y.l, Ue.l, t);
2315
2239
  return this.setHSL(n, r, i), this;
2316
2240
  }
2317
2241
  setFromVector3(e) {
@@ -2339,21 +2263,21 @@ var Ke = class {
2339
2263
  *[Symbol.iterator]() {
2340
2264
  yield this.r, yield this.g, yield this.b;
2341
2265
  }
2342
- }, X = /*@__PURE__*/ new Ke();
2343
- Ke.NAMES = Ue;
2344
- var qe = class extends ve {
2345
- constructor(e = null, t = 1, n = 1, r, i, a, o, s, c = f, l = f, u, d) {
2346
- super(null, a, o, s, c, l, r, i, u, d), this.isDataTexture = !0, this.image = {
2266
+ }, X = /*@__PURE__*/ new Ge();
2267
+ Ge.NAMES = He;
2268
+ var Ke = class extends ye {
2269
+ constructor(e = null, t = 1, n = 1, r, i, a, o, s, c = d, l = d, u, f) {
2270
+ super(null, a, o, s, c, l, r, i, u, f), this.isDataTexture = !0, this.image = {
2347
2271
  data: e,
2348
2272
  width: t,
2349
2273
  height: n
2350
2274
  }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
2351
2275
  }
2352
2276
  };
2353
- function Je(e, t) {
2277
+ function qe(e, t) {
2354
2278
  return !e || e.constructor === t ? e : typeof t.BYTES_PER_ELEMENT == "number" ? new t(e) : Array.prototype.slice.call(e);
2355
2279
  }
2356
- var Ye = class {
2280
+ var Je = class {
2357
2281
  constructor(e, t, n, r) {
2358
2282
  this.parameterPositions = e, this._cachedIndex = 0, this.resultBuffer = r === void 0 ? new t.constructor(n) : r, this.sampleValues = t, this.valueSize = n, this.settings = null, this.DefaultSettings_ = {};
2359
2283
  }
@@ -2411,29 +2335,29 @@ var Ye = class {
2411
2335
  throw Error("THREE.Interpolant: Call to abstract method.");
2412
2336
  }
2413
2337
  intervalChanged_() {}
2414
- }, Xe = class extends Ye {
2338
+ }, Ye = class extends Je {
2415
2339
  constructor(e, t, n, r) {
2416
2340
  super(e, t, n, r), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0, this.DefaultSettings_ = {
2417
- endingStart: S,
2418
- endingEnd: S
2341
+ endingStart: x,
2342
+ endingEnd: x
2419
2343
  };
2420
2344
  }
2421
2345
  intervalChanged_(e, t, n) {
2422
2346
  let r = this.parameterPositions, i = e - 2, a = e + 1, o = r[i], s = r[a];
2423
2347
  if (o === void 0) switch (this.getSettings_().endingStart) {
2424
- case C:
2348
+ case S:
2425
2349
  i = e, o = 2 * t - n;
2426
2350
  break;
2427
- case w:
2351
+ case C:
2428
2352
  i = r.length - 2, o = t + r[i] - r[i + 1];
2429
2353
  break;
2430
2354
  default: i = e, o = n;
2431
2355
  }
2432
2356
  if (s === void 0) switch (this.getSettings_().endingEnd) {
2433
- case C:
2357
+ case S:
2434
2358
  a = e, s = 2 * n - t;
2435
2359
  break;
2436
- case w:
2360
+ case C:
2437
2361
  a = 1, s = n + r[1] - r[0];
2438
2362
  break;
2439
2363
  default: a = e - 1, s = t;
@@ -2446,7 +2370,7 @@ var Ye = class {
2446
2370
  for (let e = 0; e !== o; ++e) i[e] = g * a[l + e] + _ * a[c + e] + v * a[s + e] + y * a[u + e];
2447
2371
  return i;
2448
2372
  }
2449
- }, Ze = class extends Ye {
2373
+ }, Xe = class extends Je {
2450
2374
  constructor(e, t, n, r) {
2451
2375
  super(e, t, n, r);
2452
2376
  }
@@ -2455,14 +2379,14 @@ var Ye = class {
2455
2379
  for (let e = 0; e !== o; ++e) i[e] = a[c + e] * u + a[s + e] * l;
2456
2380
  return i;
2457
2381
  }
2458
- }, Qe = class extends Ye {
2382
+ }, Ze = class extends Je {
2459
2383
  constructor(e, t, n, r) {
2460
2384
  super(e, t, n, r);
2461
2385
  }
2462
2386
  interpolate_(e) {
2463
2387
  return this.copySampleValue_(e - 1);
2464
2388
  }
2465
- }, $e = class extends Ye {
2389
+ }, Qe = class extends Je {
2466
2390
  interpolate_(e, t, n, r) {
2467
2391
  let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = e * o, c = s - o, l = this.inTangents, u = this.outTangents;
2468
2392
  if (!l || !u) {
@@ -2489,7 +2413,7 @@ var Ye = class {
2489
2413
  constructor(e, t, n, r) {
2490
2414
  if (e === void 0) throw Error("THREE.KeyframeTrack: track name is undefined");
2491
2415
  if (t === void 0 || t.length === 0) throw Error("THREE.KeyframeTrack: no keyframes in track named " + e);
2492
- this.name = e, this.times = Je(t, this.TimeBufferType), this.values = Je(n, this.ValueBufferType), this.setInterpolation(r || this.DefaultInterpolation);
2416
+ this.name = e, this.times = qe(t, this.TimeBufferType), this.values = qe(n, this.ValueBufferType), this.setInterpolation(r || this.DefaultInterpolation);
2493
2417
  }
2494
2418
  static toJSON(e) {
2495
2419
  let t = e.constructor, n;
@@ -2497,8 +2421,8 @@ var Ye = class {
2497
2421
  else {
2498
2422
  n = {
2499
2423
  name: e.name,
2500
- times: Je(e.times, Array),
2501
- values: Je(e.values, Array)
2424
+ times: qe(e.times, Array),
2425
+ values: qe(e.values, Array)
2502
2426
  };
2503
2427
  let t = e.getInterpolation();
2504
2428
  t !== e.DefaultInterpolation && (n.interpolation = t);
@@ -2506,31 +2430,31 @@ var Ye = class {
2506
2430
  return n.type = e.ValueTypeName, n;
2507
2431
  }
2508
2432
  InterpolantFactoryMethodDiscrete(e) {
2509
- return new Qe(this.times, this.values, this.getValueSize(), e);
2433
+ return new Ze(this.times, this.values, this.getValueSize(), e);
2510
2434
  }
2511
2435
  InterpolantFactoryMethodLinear(e) {
2512
- return new Ze(this.times, this.values, this.getValueSize(), e);
2436
+ return new Xe(this.times, this.values, this.getValueSize(), e);
2513
2437
  }
2514
2438
  InterpolantFactoryMethodSmooth(e) {
2515
- return new Xe(this.times, this.values, this.getValueSize(), e);
2439
+ return new Ye(this.times, this.values, this.getValueSize(), e);
2516
2440
  }
2517
2441
  InterpolantFactoryMethodBezier(e) {
2518
- let t = new $e(this.times, this.values, this.getValueSize(), e);
2442
+ let t = new Qe(this.times, this.values, this.getValueSize(), e);
2519
2443
  return this.settings && (t.inTangents = this.settings.inTangents, t.outTangents = this.settings.outTangents), t;
2520
2444
  }
2521
2445
  setInterpolation(e) {
2522
2446
  let t;
2523
2447
  switch (e) {
2524
- case v:
2448
+ case _:
2525
2449
  t = this.InterpolantFactoryMethodDiscrete;
2526
2450
  break;
2527
- case y:
2451
+ case v:
2528
2452
  t = this.InterpolantFactoryMethodLinear;
2529
2453
  break;
2530
- case b:
2454
+ case y:
2531
2455
  t = this.InterpolantFactoryMethodSmooth;
2532
2456
  break;
2533
- case x:
2457
+ case b:
2534
2458
  t = this.InterpolantFactoryMethodBezier;
2535
2459
  break;
2536
2460
  }
@@ -2538,16 +2462,16 @@ var Ye = class {
2538
2462
  let t = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name;
2539
2463
  if (this.createInterpolant === void 0) if (e !== this.DefaultInterpolation) this.setInterpolation(this.DefaultInterpolation);
2540
2464
  else throw Error(t);
2541
- return P("KeyframeTrack:", t), this;
2465
+ return j("KeyframeTrack:", t), this;
2542
2466
  }
2543
2467
  return this.createInterpolant = t, this;
2544
2468
  }
2545
2469
  getInterpolation() {
2546
2470
  switch (this.createInterpolant) {
2547
- case this.InterpolantFactoryMethodDiscrete: return v;
2548
- case this.InterpolantFactoryMethodLinear: return y;
2549
- case this.InterpolantFactoryMethodSmooth: return b;
2550
- case this.InterpolantFactoryMethodBezier: return x;
2471
+ case this.InterpolantFactoryMethodDiscrete: return _;
2472
+ case this.InterpolantFactoryMethodLinear: return v;
2473
+ case this.InterpolantFactoryMethodSmooth: return y;
2474
+ case this.InterpolantFactoryMethodBezier: return b;
2551
2475
  }
2552
2476
  }
2553
2477
  getValueSize() {
@@ -2580,33 +2504,33 @@ var Ye = class {
2580
2504
  }
2581
2505
  validate() {
2582
2506
  let e = !0, t = this.getValueSize();
2583
- t - Math.floor(t) !== 0 && (F("KeyframeTrack: Invalid value size in track.", this), e = !1);
2507
+ t - Math.floor(t) !== 0 && (M("KeyframeTrack: Invalid value size in track.", this), e = !1);
2584
2508
  let n = this.times, r = this.values, i = n.length;
2585
- i === 0 && (F("KeyframeTrack: Track is empty.", this), e = !1);
2509
+ i === 0 && (M("KeyframeTrack: Track is empty.", this), e = !1);
2586
2510
  let a = null;
2587
2511
  for (let t = 0; t !== i; t++) {
2588
2512
  let r = n[t];
2589
2513
  if (typeof r == "number" && isNaN(r)) {
2590
- F("KeyframeTrack: Time is not a valid number.", this, t, r), e = !1;
2514
+ M("KeyframeTrack: Time is not a valid number.", this, t, r), e = !1;
2591
2515
  break;
2592
2516
  }
2593
2517
  if (a !== null && a > r) {
2594
- F("KeyframeTrack: Out of order keys.", this, t, r, a), e = !1;
2518
+ M("KeyframeTrack: Out of order keys.", this, t, r, a), e = !1;
2595
2519
  break;
2596
2520
  }
2597
2521
  a = r;
2598
2522
  }
2599
- if (r !== void 0 && A(r)) for (let t = 0, n = r.length; t !== n; ++t) {
2523
+ if (r !== void 0 && k(r)) for (let t = 0, n = r.length; t !== n; ++t) {
2600
2524
  let n = r[t];
2601
2525
  if (isNaN(n)) {
2602
- F("KeyframeTrack: Value is not a valid number.", this, t, n), e = !1;
2526
+ M("KeyframeTrack: Value is not a valid number.", this, t, n), e = !1;
2603
2527
  break;
2604
2528
  }
2605
2529
  }
2606
2530
  return e;
2607
2531
  }
2608
2532
  optimize() {
2609
- let e = this.times.slice(), t = this.values.slice(), n = this.getValueSize(), r = this.getInterpolation() === b, i = e.length - 1, a = 1;
2533
+ let e = this.times.slice(), t = this.values.slice(), n = this.getValueSize(), r = this.getInterpolation() === y, i = e.length - 1, a = 1;
2610
2534
  for (let o = 1; o < i; ++o) {
2611
2535
  let i = !1, s = e[o];
2612
2536
  if (s !== e[o + 1] && (o !== 1 || s !== e[0])) if (r) i = !0;
@@ -2641,56 +2565,56 @@ var Ye = class {
2641
2565
  return r.createInterpolant = this.createInterpolant, r;
2642
2566
  }
2643
2567
  };
2644
- Z.prototype.ValueTypeName = "", Z.prototype.TimeBufferType = Float32Array, Z.prototype.ValueBufferType = Float32Array, Z.prototype.DefaultInterpolation = y;
2645
- var et = class extends Z {
2568
+ Z.prototype.ValueTypeName = "", Z.prototype.TimeBufferType = Float32Array, Z.prototype.ValueBufferType = Float32Array, Z.prototype.DefaultInterpolation = v;
2569
+ var $e = class extends Z {
2646
2570
  constructor(e, t, n) {
2647
2571
  super(e, t, n);
2648
2572
  }
2649
2573
  };
2650
- et.prototype.ValueTypeName = "bool", et.prototype.ValueBufferType = Array, et.prototype.DefaultInterpolation = v, et.prototype.InterpolantFactoryMethodLinear = void 0, et.prototype.InterpolantFactoryMethodSmooth = void 0;
2651
- var tt = class extends Z {
2574
+ $e.prototype.ValueTypeName = "bool", $e.prototype.ValueBufferType = Array, $e.prototype.DefaultInterpolation = _, $e.prototype.InterpolantFactoryMethodLinear = void 0, $e.prototype.InterpolantFactoryMethodSmooth = void 0;
2575
+ var et = class extends Z {
2652
2576
  constructor(e, t, n, r) {
2653
2577
  super(e, t, n, r);
2654
2578
  }
2655
2579
  };
2656
- tt.prototype.ValueTypeName = "color";
2657
- var nt = class extends Z {
2580
+ et.prototype.ValueTypeName = "color";
2581
+ var tt = class extends Z {
2658
2582
  constructor(e, t, n, r) {
2659
2583
  super(e, t, n, r);
2660
2584
  }
2661
2585
  };
2662
- nt.prototype.ValueTypeName = "number";
2663
- var rt = class extends Ye {
2586
+ tt.prototype.ValueTypeName = "number";
2587
+ var nt = class extends Je {
2664
2588
  constructor(e, t, n, r) {
2665
2589
  super(e, t, n, r);
2666
2590
  }
2667
2591
  interpolate_(e, t, n, r) {
2668
2592
  let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = (n - t) / (r - t), c = e * o;
2669
- for (let e = c + o; c !== e; c += 4) z.slerpFlat(i, 0, a, c - o, a, c, s);
2593
+ for (let e = c + o; c !== e; c += 4) L.slerpFlat(i, 0, a, c - o, a, c, s);
2670
2594
  return i;
2671
2595
  }
2672
- }, it = class extends Z {
2596
+ }, rt = class extends Z {
2673
2597
  constructor(e, t, n, r) {
2674
2598
  super(e, t, n, r);
2675
2599
  }
2676
2600
  InterpolantFactoryMethodLinear(e) {
2677
- return new rt(this.times, this.values, this.getValueSize(), e);
2601
+ return new nt(this.times, this.values, this.getValueSize(), e);
2678
2602
  }
2679
2603
  };
2680
- it.prototype.ValueTypeName = "quaternion", it.prototype.InterpolantFactoryMethodSmooth = void 0;
2681
- var at = class extends Z {
2604
+ rt.prototype.ValueTypeName = "quaternion", rt.prototype.InterpolantFactoryMethodSmooth = void 0;
2605
+ var it = class extends Z {
2682
2606
  constructor(e, t, n) {
2683
2607
  super(e, t, n);
2684
2608
  }
2685
2609
  };
2686
- at.prototype.ValueTypeName = "string", at.prototype.ValueBufferType = Array, at.prototype.DefaultInterpolation = v, at.prototype.InterpolantFactoryMethodLinear = void 0, at.prototype.InterpolantFactoryMethodSmooth = void 0;
2687
- var ot = class extends Z {
2610
+ it.prototype.ValueTypeName = "string", it.prototype.ValueBufferType = Array, it.prototype.DefaultInterpolation = _, it.prototype.InterpolantFactoryMethodLinear = void 0, it.prototype.InterpolantFactoryMethodSmooth = void 0;
2611
+ var at = class extends Z {
2688
2612
  constructor(e, t, n, r) {
2689
2613
  super(e, t, n, r);
2690
2614
  }
2691
2615
  };
2692
- ot.prototype.ValueTypeName = "vector";
2693
- var st = /*@__PURE__*/ new class {
2616
+ at.prototype.ValueTypeName = "vector";
2617
+ var ot = /*@__PURE__*/ new class {
2694
2618
  constructor(e, t, n) {
2695
2619
  let r = this, i = !1, a = 0, o = 0, s, c = [];
2696
2620
  this.onStart = void 0, this.onLoad = e, this.onProgress = t, this.onError = n, this._abortController = null, this.itemStart = function(e) {
@@ -2721,9 +2645,9 @@ var st = /*@__PURE__*/ new class {
2721
2645
  get abortController() {
2722
2646
  return this._abortController ||= new AbortController(), this._abortController;
2723
2647
  }
2724
- }(), ct = class {
2648
+ }(), st = class {
2725
2649
  constructor(e) {
2726
- this.manager = e === void 0 ? st : e, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
2650
+ this.manager = e === void 0 ? ot : e, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
2727
2651
  }
2728
2652
  load() {}
2729
2653
  loadAsync(e, t) {
@@ -2752,13 +2676,13 @@ var st = /*@__PURE__*/ new class {
2752
2676
  return this;
2753
2677
  }
2754
2678
  };
2755
- ct.DEFAULT_MATERIAL_NAME = "__DEFAULT";
2756
- var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), dt = "[^\\[\\]\\.:\\/]", ft = "[^" + lt.replace("\\.", "") + "]", pt = /*@__PURE__*/ "((?:WC+[\\/:])*)".replace("WC", dt), mt = /*@__PURE__*/ "(WCOD+)?".replace("WCOD", ft), ht = /*@__PURE__*/ "(?:\\.(WC+)(?:\\[(.+)\\])?)?".replace("WC", dt), gt = /*@__PURE__*/ "\\.(WC+)(?:\\[(.+)\\])?".replace("WC", dt), _t = RegExp("^" + pt + mt + ht + gt + "$"), vt = [
2679
+ st.DEFAULT_MATERIAL_NAME = "__DEFAULT";
2680
+ var ct = "\\[\\]\\.:\\/", lt = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), ut = "[^\\[\\]\\.:\\/]", dt = "[^" + ct.replace("\\.", "") + "]", ft = /*@__PURE__*/ "((?:WC+[\\/:])*)".replace("WC", ut), pt = /*@__PURE__*/ "(WCOD+)?".replace("WCOD", dt), mt = /*@__PURE__*/ "(?:\\.(WC+)(?:\\[(.+)\\])?)?".replace("WC", ut), ht = /*@__PURE__*/ "\\.(WC+)(?:\\[(.+)\\])?".replace("WC", ut), gt = RegExp("^" + ft + pt + mt + ht + "$"), _t = [
2757
2681
  "material",
2758
2682
  "materials",
2759
2683
  "bones",
2760
2684
  "map"
2761
- ], yt = class {
2685
+ ], vt = class {
2762
2686
  constructor(e, t, n) {
2763
2687
  let r = n || Q.parseTrackName(t);
2764
2688
  this._targetGroup = e, this._bindings = e.subscribe_(t, r);
@@ -2788,10 +2712,10 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2788
2712
  return t && t.isAnimationObjectGroup ? new e.Composite(t, n, r) : new e(t, n, r);
2789
2713
  }
2790
2714
  static sanitizeNodeName(e) {
2791
- return e.replace(/\s/g, "_").replace(ut, "");
2715
+ return e.replace(/\s/g, "_").replace(lt, "");
2792
2716
  }
2793
2717
  static parseTrackName(e) {
2794
- let t = _t.exec(e);
2718
+ let t = gt.exec(e);
2795
2719
  if (t === null) throw Error("THREE.PropertyBinding: Cannot parse trackName: " + e);
2796
2720
  let n = {
2797
2721
  nodeName: t[2],
@@ -2802,7 +2726,7 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2802
2726
  }, r = n.nodeName && n.nodeName.lastIndexOf(".");
2803
2727
  if (r !== void 0 && r !== -1) {
2804
2728
  let e = n.nodeName.substring(r + 1);
2805
- vt.indexOf(e) !== -1 && (n.nodeName = n.nodeName.substring(0, r), n.objectName = e);
2729
+ _t.indexOf(e) !== -1 && (n.nodeName = n.nodeName.substring(0, r), n.objectName = e);
2806
2730
  }
2807
2731
  if (n.propertyName === null || n.propertyName.length === 0) throw Error("THREE.PropertyBinding: can not parse propertyName from trackName: " + e);
2808
2732
  return n;
@@ -2892,7 +2816,7 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2892
2816
  bind() {
2893
2817
  let t = this.node, n = this.parsedPath, r = n.objectName, i = n.propertyName, a = n.propertyIndex;
2894
2818
  if (t || (t = e.findNode(this.rootNode, n.nodeName), this.node = t), this.getValue = this._getValue_unavailable, this.setValue = this._setValue_unavailable, !t) {
2895
- P("PropertyBinding: No target node found for track: " + this.path + ".");
2819
+ j("PropertyBinding: No target node found for track: " + this.path + ".");
2896
2820
  return;
2897
2821
  }
2898
2822
  if (r) {
@@ -2900,18 +2824,18 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2900
2824
  switch (r) {
2901
2825
  case "materials":
2902
2826
  if (!t.material) {
2903
- F("PropertyBinding: Can not bind to material as node does not have a material.", this);
2827
+ M("PropertyBinding: Can not bind to material as node does not have a material.", this);
2904
2828
  return;
2905
2829
  }
2906
2830
  if (!t.material.materials) {
2907
- F("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", this);
2831
+ M("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", this);
2908
2832
  return;
2909
2833
  }
2910
2834
  t = t.material.materials;
2911
2835
  break;
2912
2836
  case "bones":
2913
2837
  if (!t.skeleton) {
2914
- F("PropertyBinding: Can not bind to bones as node does not have a skeleton.", this);
2838
+ M("PropertyBinding: Can not bind to bones as node does not have a skeleton.", this);
2915
2839
  return;
2916
2840
  }
2917
2841
  t = t.skeleton.bones;
@@ -2926,25 +2850,25 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2926
2850
  break;
2927
2851
  }
2928
2852
  if (!t.material) {
2929
- F("PropertyBinding: Can not bind to material as node does not have a material.", this);
2853
+ M("PropertyBinding: Can not bind to material as node does not have a material.", this);
2930
2854
  return;
2931
2855
  }
2932
2856
  if (!t.material.map) {
2933
- F("PropertyBinding: Can not bind to material.map as node.material does not have a map.", this);
2857
+ M("PropertyBinding: Can not bind to material.map as node.material does not have a map.", this);
2934
2858
  return;
2935
2859
  }
2936
2860
  t = t.material.map;
2937
2861
  break;
2938
2862
  default:
2939
2863
  if (t[r] === void 0) {
2940
- F("PropertyBinding: Can not bind to objectName of node undefined.", this);
2864
+ M("PropertyBinding: Can not bind to objectName of node undefined.", this);
2941
2865
  return;
2942
2866
  }
2943
2867
  t = t[r];
2944
2868
  }
2945
2869
  if (e !== void 0) {
2946
2870
  if (t[e] === void 0) {
2947
- F("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", this, t);
2871
+ M("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", this, t);
2948
2872
  return;
2949
2873
  }
2950
2874
  t = t[e];
@@ -2953,7 +2877,7 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2953
2877
  let o = t[i];
2954
2878
  if (o === void 0) {
2955
2879
  let e = n.nodeName;
2956
- F("PropertyBinding: Trying to update property for track: " + e + "." + i + " but it wasn't found.", t);
2880
+ M("PropertyBinding: Trying to update property for track: " + e + "." + i + " but it wasn't found.", t);
2957
2881
  return;
2958
2882
  }
2959
2883
  let s = this.Versioning.None;
@@ -2962,11 +2886,11 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2962
2886
  if (a !== void 0) {
2963
2887
  if (i === "morphTargetInfluences") {
2964
2888
  if (!t.geometry) {
2965
- F("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", this);
2889
+ M("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", this);
2966
2890
  return;
2967
2891
  }
2968
2892
  if (!t.geometry.morphAttributes) {
2969
- F("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", this);
2893
+ M("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", this);
2970
2894
  return;
2971
2895
  }
2972
2896
  t.morphTargetDictionary[a] !== void 0 && (a = t.morphTargetDictionary[a]);
@@ -2979,7 +2903,7 @@ var lt = "\\[\\]\\.:\\/", ut = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), d
2979
2903
  this.node = null, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound;
2980
2904
  }
2981
2905
  };
2982
- Q.Composite = yt, Q.prototype.BindingType = {
2906
+ Q.Composite = vt, Q.prototype.BindingType = {
2983
2907
  Direct: 0,
2984
2908
  EntireArray: 1,
2985
2909
  ArrayElement: 2,
@@ -3037,10 +2961,10 @@ Q.Composite = yt, Q.prototype.BindingType = {
3037
2961
  let i = this.elements;
3038
2962
  return i[0] = e, i[2] = t, i[1] = n, i[3] = r, this;
3039
2963
  }
3040
- }, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "185" } })), typeof window < "u" && (window.__THREE__ ? P("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = "185");
2964
+ }, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "185" } })), typeof window < "u" && (window.__THREE__ ? j("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = "185");
3041
2965
  //#endregion
3042
2966
  //#region src/FontWorkerClient.ts
3043
- var bt = class {
2967
+ var yt = class {
3044
2968
  _worker;
3045
2969
  _concurrencyManager;
3046
2970
  _nextId = 0;
@@ -3119,7 +3043,7 @@ var bt = class {
3119
3043
  }, n ?? []);
3120
3044
  });
3121
3045
  }
3122
- }, xt = class {
3046
+ }, bt = class {
3123
3047
  _map = /* @__PURE__ */ new Map();
3124
3048
  _maxSize;
3125
3049
  constructor(e) {
@@ -3148,24 +3072,24 @@ var bt = class {
3148
3072
  this._map.clear();
3149
3073
  }
3150
3074
  }, $ = (e, t) => `${e}#q=${t}`;
3151
- function St(e, t, n, r) {
3152
- return wt(e, t, n, r === 4 ? g : _, "");
3075
+ function xt(e, t, n, r) {
3076
+ return Ct(e, t, n, r === 4 ? h : g, "");
3153
3077
  }
3154
- function Ct(e, t, n) {
3155
- return wt(e, t, n, g, T);
3078
+ function St(e, t, n) {
3079
+ return Ct(e, t, n, h, w);
3156
3080
  }
3157
- function wt(e, t, n, r, i) {
3158
- let a = new qe(e, t, n, r, h);
3159
- return a.minFilter = p, a.magFilter = p, a.generateMipmaps = !1, a.colorSpace = i, a.needsUpdate = !0, a;
3081
+ function Ct(e, t, n, r, i) {
3082
+ let a = new Ke(e, t, n, r, m);
3083
+ return a.minFilter = f, a.magFilter = f, a.generateMipmaps = !1, a.colorSpace = i, a.needsUpdate = !0, a;
3160
3084
  }
3161
- var Tt = 1e4, Et = (e) => {
3085
+ var wt = 1e4, Tt = (e) => {
3162
3086
  let t = [];
3163
3087
  for (let n = 0; n + 1 < e.length; n += 2) t.push({
3164
3088
  from: e[n],
3165
3089
  to: e[n + 1]
3166
3090
  });
3167
3091
  return t;
3168
- }, Dt = class {
3092
+ }, Et = class {
3169
3093
  _workerUrl;
3170
3094
  _client;
3171
3095
  _clientPromise;
@@ -3248,7 +3172,7 @@ var Tt = 1e4, Et = (e) => {
3248
3172
  if (!this._concurrencyManager) return Promise.reject(/* @__PURE__ */ Error("FontManager: concurrencyManager not set"));
3249
3173
  let e = this._concurrencyManager;
3250
3174
  return this._clientPromise = (async () => {
3251
- let t = new bt(this._workerUrl, e, { fontBudgetBytes: this._fontBudgetBytes });
3175
+ let t = new yt(this._workerUrl, e, { fontBudgetBytes: this._fontBudgetBytes });
3252
3176
  return await t.ready(), this._client = t, t;
3253
3177
  })(), this._clientPromise.catch(() => {
3254
3178
  this._clientPromise = void 0;
@@ -3268,7 +3192,7 @@ var Tt = 1e4, Et = (e) => {
3268
3192
  }
3269
3193
  if (this._pending.has(r)) return this._refCount.set(r, (this._refCount.get(r) ?? 0) + 1), this._pending.get(r);
3270
3194
  let i = n ? $(n, t) : void 0, a = this._fetchAndLoad(e, r, i, t);
3271
- this._refCount.set(r, 1), this._pending.set(r, a), this._shapeCache.set(r, new xt(Tt));
3195
+ this._refCount.set(r, 1), this._pending.set(r, a), this._shapeCache.set(r, new bt(wt));
3272
3196
  try {
3273
3197
  await a, this._loaded.add(r), this._atlasKeys.set(r, i ?? r);
3274
3198
  } catch (e) {
@@ -3338,7 +3262,7 @@ var Tt = 1e4, Et = (e) => {
3338
3262
  let e = this._segmentTextByFace(t.faces, n);
3339
3263
  await Promise.all(e.map((e) => this._prepareSingleFontText(e.url, e.text, r)));
3340
3264
  let a = this._stitchSegments(e, r), o = this._shapeCache.get(i);
3341
- o || (o = new xt(Tt), this._shapeCache.set(i, o)), a._generation = this._currentGen(i), o.set(n, a);
3265
+ o || (o = new bt(wt), this._shapeCache.set(i, o)), a._generation = this._currentGen(i), o.set(n, a);
3342
3266
  })();
3343
3267
  this._preparePending.set(a, o);
3344
3268
  try {
@@ -3387,14 +3311,14 @@ var Tt = 1e4, Et = (e) => {
3387
3311
  return this._atlasCache.get(n);
3388
3312
  }
3389
3313
  getAtlasTexture(e, t) {
3390
- return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._atlasCache, this._atlasDirty, this._textureCache, (e) => St(e.data, e.width, e.height, e.channels));
3314
+ return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._atlasCache, this._atlasDirty, this._textureCache, (e) => xt(e.data, e.width, e.height, e.channels));
3391
3315
  }
3392
3316
  getColorAtlas(e, t) {
3393
3317
  let n = this._resolveAtlasKey(e, t);
3394
3318
  return this._colorAtlasCache.get(n);
3395
3319
  }
3396
3320
  getColorAtlasTexture(e, t) {
3397
- return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._colorAtlasCache, this._colorAtlasDirty, this._colorTextureCache, (e) => Ct(e.data, e.width, e.height));
3321
+ return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._colorAtlasCache, this._colorAtlasDirty, this._colorTextureCache, (e) => St(e.data, e.width, e.height));
3398
3322
  }
3399
3323
  _getOrUpdateTexture(e, t, n, r, i) {
3400
3324
  if (!n.has(e)) {
@@ -3481,7 +3405,7 @@ var Tt = 1e4, Et = (e) => {
3481
3405
  if (!a.ok) throw Error(`FontManager: failed to fetch font from ${e}: ${a.status}`);
3482
3406
  let o = await a.arrayBuffer(), s = await i.loadFont(t, o, n, r);
3483
3407
  if (!s.ok) throw Error(`FontManager: WASM failed to load font from ${e}`);
3484
- s.cmapRanges?.length && !this._cmapRanges.has(e) && (this._cmapRanges.set(e, Et(s.cmapRanges)), this._applyCmapRanges(e));
3408
+ s.cmapRanges?.length && !this._cmapRanges.has(e) && (this._cmapRanges.set(e, Tt(s.cmapRanges)), this._applyCmapRanges(e));
3485
3409
  }
3486
3410
  async _flushBatch() {
3487
3411
  this._batchScheduled = !1;
@@ -3509,11 +3433,11 @@ var Tt = 1e4, Et = (e) => {
3509
3433
  };
3510
3434
  await Promise.all([...e].map(([e, t]) => n(e, t)));
3511
3435
  }
3512
- }, Ot = 64, kt = (e) => e ? 8 : 35, At = {
3436
+ }, Dt = 64, Ot = (e) => e ? 8 : 35, kt = {
3513
3437
  Normal: 0,
3514
3438
  Whitespace: 1,
3515
3439
  Newline: 2,
3516
3440
  Ideographic: 3
3517
3441
  };
3518
3442
  //#endregion
3519
- export { Ot as COLOR_GLYPH_PX_SIZE, Dt as FontManager, bt as FontWorkerClient, At as GlyphCharClass, xt as LRUMap, kt as atlasRangePx, Ct as createColorAtlasTexture, St as createSdfAtlasTexture, c as fetchFontFamilyFromCss, e as parseCssUnicodeRange, s as parseFontFamilyFromCss };
3443
+ export { Dt as COLOR_GLYPH_PX_SIZE, Et as FontManager, yt as FontWorkerClient, kt as GlyphCharClass, bt as LRUMap, Ot as atlasRangePx, St as createColorAtlasTexture, xt as createSdfAtlasTexture, s as fetchFontFamilyFromCss, a as parseCssUnicodeRange, o as parseFontFamilyFromCss };