@quick-threejs/reactive 0.1.46 → 0.1.47

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/main.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var hn = Object.defineProperty;
2
- var pn = (s, e, t) => e in s ? hn(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var x = (s, e, t) => pn(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { g as mn, r as Nt, a as gn, b as st, c as Ft, d as _n, e as bn, f as yn, s as re, L as se, i as O, E as fe, K as Tn, P as wn, h as Dt, j as jt, S as Ht, k as vn, m as ye, l as Ut, F as En, n as Pe, o as at, U as Ke, R as Cn, p as Rn, C as Bt, z as ge, N as _e, D as ct, q as Sn } from "./FontLoader-ejhD_xZ1.mjs";
5
- import { A as fi, u as hi, t as pi } from "./FontLoader-ejhD_xZ1.mjs";
6
- import { TrianglesDrawMode as xn, TriangleFanDrawMode as qe, TriangleStripDrawMode as Gt, Loader as Wt, FileLoader as we, SRGBColorSpace as W, LinearSRGBColorSpace as F, BufferGeometry as zt, BufferAttribute as he, InterleavedBuffer as $t, InterleavedBufferAttribute as Kt, Color as z, ColorManagement as Ve, LoaderUtils as pe, SpotLight as kn, PointLight as Mn, DirectionalLight as An, MeshBasicMaterial as de, MeshPhysicalMaterial as D, Vector2 as qt, Matrix4 as ve, Vector3 as J, Quaternion as Vt, InstancedMesh as Ln, InstancedBufferAttribute as Pn, Object3D as Xt, TextureLoader as On, ImageBitmapLoader as Qt, LinearFilter as Xe, LinearMipmapLinearFilter as Yt, RepeatWrapping as Qe, NearestFilter as Jt, PointsMaterial as In, Material as Oe, LineBasicMaterial as Nn, MeshStandardMaterial as Zt, DoubleSide as Fn, PropertyBinding as Dn, SkinnedMesh as jn, Mesh as Hn, LineSegments as Un, Line as Bn, LineLoop as Gn, Points as Wn, Group as Ie, PerspectiveCamera as zn, MathUtils as $n, OrthographicCamera as Kn, Skeleton as qn, AnimationClip as Vn, Bone as Xn, InterpolateLinear as en, NearestMipmapNearestFilter as Qn, LinearMipmapNearestFilter as Yn, NearestMipmapLinearFilter as Jn, ClampToEdgeWrapping as Zn, MirroredRepeatWrapping as er, InterpolateDiscrete as tr, FrontSide as nr, Texture as ut, VectorKeyframeTrack as lt, NumberKeyframeTrack as dt, QuaternionKeyframeTrack as ft, Box3 as rr, Sphere as sr, Interpolant as ir, LoadingManager as or, AudioLoader as ar } from "three";
1
+ var fn = Object.defineProperty;
2
+ var pn = (s, e, t) => e in s ? fn(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var M = (s, e, t) => pn(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { g as mn, r as It, a as gn, b as rt, c as Nt, d as _n, e as bn, f as yn, s as ie, L as oe, i as O, U as pe, K as Tn, P as wn, h as Ft, j as Dt, S as Ht, k as vn, m as ye, l as jt, F as En, n as Pe, o as ot, J as Ut, R as Rn, p as Cn, C as Bt, N as V, D as te, q as at, E as Sn, t as xn } from "./FontLoader-YhZm0TOQ.mjs";
5
+ import { A as fi, v as pi, u as mi } from "./FontLoader-YhZm0TOQ.mjs";
6
+ import { TrianglesDrawMode as Mn, TriangleFanDrawMode as Ke, TriangleStripDrawMode as Wt, Loader as Gt, FileLoader as we, SRGBColorSpace as G, LinearSRGBColorSpace as F, BufferGeometry as zt, BufferAttribute as me, InterleavedBuffer as $t, InterleavedBufferAttribute as Kt, Color as z, ColorManagement as qe, LoaderUtils as ge, SpotLight as kn, PointLight as Ln, DirectionalLight as An, MeshBasicMaterial as fe, MeshPhysicalMaterial as D, Vector2 as qt, Matrix4 as ve, Vector3 as Z, Quaternion as Vt, InstancedMesh as Pn, InstancedBufferAttribute as On, Object3D as Xt, TextureLoader as In, ImageBitmapLoader as Qt, LinearFilter as Ve, LinearMipmapLinearFilter as Yt, RepeatWrapping as Xe, NearestFilter as Jt, PointsMaterial as Nn, Material as Oe, LineBasicMaterial as Fn, MeshStandardMaterial as Zt, DoubleSide as Dn, PropertyBinding as Hn, SkinnedMesh as jn, Mesh as Un, LineSegments as Bn, Line as Wn, LineLoop as Gn, Points as zn, Group as Ie, PerspectiveCamera as $n, MathUtils as Kn, OrthographicCamera as qn, Skeleton as Vn, AnimationClip as Xn, Bone as Qn, InterpolateLinear as en, NearestMipmapNearestFilter as Yn, LinearMipmapNearestFilter as Jn, NearestMipmapLinearFilter as Zn, ClampToEdgeWrapping as er, MirroredRepeatWrapping as tr, InterpolateDiscrete as nr, FrontSide as rr, Texture as ct, VectorKeyframeTrack as ut, NumberKeyframeTrack as lt, QuaternionKeyframeTrack as dt, Box3 as sr, Sphere as ir, Interpolant as or, LoadingManager as ar, AudioLoader as cr } from "three";
7
7
  class xe {
8
8
  constructor() {
9
9
  /**
@@ -11,31 +11,49 @@ class xe {
11
11
  *
12
12
  * @required
13
13
  */
14
- x(this, "location");
14
+ M(this, "location");
15
15
  /**
16
16
  * @description Initialize the app on construct.
17
17
  *
18
18
  * @default true
19
19
  */
20
- x(this, "initOnConstruct");
20
+ M(this, "initOnConstruct");
21
21
  /**
22
22
  * @description Initialize the app on main thread.
23
23
  *
24
24
  * @default false
25
25
  */
26
- x(this, "mainThread");
26
+ M(this, "mainThread");
27
27
  /**
28
28
  * @description App `canvas` element reference.
29
29
  *
30
+ * @note If not provided, the canvas will be created automatically.
31
+ *
32
+ * @default undefined
33
+ */
34
+ M(this, "canvas");
35
+ /**
36
+ * @description Wrapper element for the canvas used to set the canvas size.
37
+ *
38
+ * @note If the `fullScreen` property is `true`, the element won't be used to set the canvas size.
39
+ *
30
40
  * @default undefined
31
41
  */
32
- x(this, "canvas");
42
+ M(this, "canvasWrapper");
33
43
  /**
34
- * @description Set the `canvas` view in fullscreen and auto-resize it.
44
+ * @description Use the window size to render the canvas in fullscreen and auto-resize it.
35
45
  *
36
46
  * @default true
37
47
  */
38
- x(this, "fullScreen");
48
+ M(this, "fullScreen");
49
+ /**
50
+ * @description Auto-resize the renderer when the canvas size changes.
51
+ *
52
+ * @note Will have no effect if either {@link LaunchAppProps.fullScreen} or {@link RegisterPropsBlueprint.canvasWrapper} are not provided.
53
+ *
54
+ * @default true
55
+ */
56
+ M(this, "autoRenderResize");
39
57
  /**
40
58
  * Default used camera.
41
59
  *
@@ -43,25 +61,25 @@ class xe {
43
61
  *
44
62
  * @default DefaultCameraType.PERSPECTIVE
45
63
  */
46
- x(this, "defaultCamera");
64
+ M(this, "defaultCamera");
47
65
  /**
48
- * @description Start timer update on launch.
66
+ * @description Stepping the timer animation loop on launch.
49
67
  *
50
68
  * @default true
51
69
  */
52
- x(this, "startTimer");
70
+ M(this, "startTimer");
53
71
  /**
54
72
  * @description Resources to load.
55
73
  *
56
74
  * @default []
57
75
  */
58
- x(this, "loaderDataSources", []);
76
+ M(this, "loaderDataSources", []);
59
77
  /**
60
78
  * @description GLTF Draco decoder path.
61
79
  *
62
80
  * @default undefined
63
81
  */
64
- x(this, "loaderDracoDecoderPath");
82
+ M(this, "loaderDracoDecoderPath");
65
83
  /**
66
84
  * @description Will directly load the resources on initialization.
67
85
  *
@@ -69,76 +87,42 @@ class xe {
69
87
  *
70
88
  * @default true
71
89
  */
72
- x(this, "loadResourcesOnInit");
90
+ M(this, "loadResourcesOnInit");
73
91
  /**
74
- * @description Enable the debug mode
75
- *
76
- * @remark __Deactivated if the value is `false` or `undefined`__
92
+ * @description Debug properties.
77
93
  *
78
94
  * @default undefined
79
95
  */
80
- x(this, "enableDebug");
81
- /**
82
- * Will enable orbit controls for the cameras.
83
- *
84
- * @remark __Deactivated if the value is `false` or `undefined`__
85
- * @remark __This property depends on {@link RegisterPropsBlueprint.enableDebug enableDebug}__
86
- *
87
- * @default undefined
88
- */
89
- x(this, "enableControls");
90
- /**
91
- * Define the {@link THREE.AxesHelper} sizes.
92
- *
93
- * @remark __Deactivated if the value is `0` or `undefined`__
94
- * @remark __This property depends on {@link RegisterPropsBlueprint.enableDebug enableDebug}__
95
- *
96
- * @default undefined
97
- */
98
- x(this, "axesSizes");
99
- /**
100
- * Define the {@link THREE.GridHelper} sizes.
101
- *
102
- * @remark __Deactivated if the value is `0` or `undefined`__
103
- * @remark __This property depends on {@link RegisterPropsBlueprint.enableDebug enableDebug}__
104
- *
105
- * @default undefined
106
- */
107
- x(this, "gridSizes");
108
- /**
109
- * Display a mini perfective camera at the top right corner of the screen.
110
- *
111
- * @remark __Deactivated if the value is `false` or `undefined`__
112
- * @remark __This property depends on {@link RegisterPropsBlueprint.enableDebug enableDebug}__
113
- *
114
- * @default undefined
115
- */
116
- x(this, "withMiniCamera");
96
+ M(this, "debug");
117
97
  /**
118
98
  * @description Handler called when the app is ready.
119
99
  *
120
100
  * @default undefined
121
101
  */
122
- x(this, "onReady");
102
+ M(this, "onReady");
123
103
  }
124
104
  }
125
- class ai {
105
+ class ci {
126
106
  constructor() {
127
- /** @description App `canvas` element reference. */
128
- x(this, "canvas");
107
+ /**
108
+ * @description App `canvas` element reference.
109
+ *
110
+ * @note Will be used on main-thread strategy only.
111
+ */
112
+ M(this, "canvas");
129
113
  /** @description Handler triggered when the app is ready. */
130
- x(this, "onReady");
114
+ M(this, "onReady");
131
115
  }
132
116
  }
133
- var V = {}, Ne = {}, j = {}, X = {}, ht;
134
- function cr() {
135
- if (ht) return X;
136
- ht = 1, Object.defineProperty(X, "__esModule", { value: !0 }), X.getBundleURL = X.getBaseURL = void 0;
117
+ var X = {}, Ne = {}, H = {}, Q = {}, ht;
118
+ function ur() {
119
+ if (ht) return Q;
120
+ ht = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.getBundleURL = Q.getBaseURL = void 0;
137
121
  let s;
138
122
  function e() {
139
123
  return s || (s = t()), s;
140
124
  }
141
- X.getBundleURL = e;
125
+ Q.getBundleURL = e;
142
126
  function t() {
143
127
  try {
144
128
  throw new Error();
@@ -152,14 +136,14 @@ function cr() {
152
136
  function n(r) {
153
137
  return ("" + r).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/, "$1") + "/";
154
138
  }
155
- return X.getBaseURL = n, X;
139
+ return Q.getBaseURL = n, Q;
156
140
  }
157
- var pt;
141
+ var ft;
158
142
  function tn() {
159
- if (pt) return j;
160
- pt = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.isWorkerRuntime = j.getWorkerImplementation = j.defaultPoolSize = void 0;
161
- const s = /* @__PURE__ */ cr();
162
- j.defaultPoolSize = typeof navigator < "u" && navigator.hardwareConcurrency ? navigator.hardwareConcurrency : 4;
143
+ if (ft) return H;
144
+ ft = 1, Object.defineProperty(H, "__esModule", { value: !0 }), H.isWorkerRuntime = H.getWorkerImplementation = H.defaultPoolSize = void 0;
145
+ const s = /* @__PURE__ */ ur();
146
+ H.defaultPoolSize = typeof navigator < "u" && navigator.hardwareConcurrency ? navigator.hardwareConcurrency : 4;
163
147
  const e = (c) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(c);
164
148
  function t(c) {
165
149
  const a = new Blob([c], { type: "application/javascript" });
@@ -174,18 +158,18 @@ function tn() {
174
158
  };
175
159
  class c extends Worker {
176
160
  constructor(u, l) {
177
- var f, h;
178
- typeof u == "string" && l && l._baseURL ? u = new URL(u, l._baseURL) : typeof u == "string" && !e(u) && s.getBundleURL().match(/^file:\/\//i) && (u = new URL(u, s.getBundleURL().replace(/\/[^\/]+$/, "/")), (!((f = l == null ? void 0 : l.CORSWorkaround) !== null && f !== void 0) || f) && (u = t(`importScripts(${JSON.stringify(u)});`))), typeof u == "string" && e(u) && (!((h = l == null ? void 0 : l.CORSWorkaround) !== null && h !== void 0) || h) && (u = t(`importScripts(${JSON.stringify(u)});`)), super(u, l);
161
+ var h, f;
162
+ typeof u == "string" && l && l._baseURL ? u = new URL(u, l._baseURL) : typeof u == "string" && !e(u) && s.getBundleURL().match(/^file:\/\//i) && (u = new URL(u, s.getBundleURL().replace(/\/[^\/]+$/, "/")), (!((h = l == null ? void 0 : l.CORSWorkaround) !== null && h !== void 0) || h) && (u = t(`importScripts(${JSON.stringify(u)});`))), typeof u == "string" && e(u) && (!((f = l == null ? void 0 : l.CORSWorkaround) !== null && f !== void 0) || f) && (u = t(`importScripts(${JSON.stringify(u)});`)), super(u, l);
179
163
  }
180
164
  }
181
165
  class a extends c {
182
166
  constructor(u, l) {
183
- const f = window.URL.createObjectURL(u);
184
- super(f, l);
167
+ const h = window.URL.createObjectURL(u);
168
+ super(h, l);
185
169
  }
186
170
  static fromText(u, l) {
187
- const f = new window.Blob([u], { type: "text/javascript" });
188
- return new a(f, l);
171
+ const h = new window.Blob([u], { type: "text/javascript" });
172
+ return new a(h, l);
189
173
  }
190
174
  }
191
175
  return {
@@ -197,24 +181,24 @@ function tn() {
197
181
  function i() {
198
182
  return r || (r = n()), r;
199
183
  }
200
- j.getWorkerImplementation = i;
184
+ H.getWorkerImplementation = i;
201
185
  function o() {
202
186
  const c = typeof self < "u" && typeof Window < "u" && self instanceof Window;
203
187
  return !!(typeof self < "u" && self.postMessage && !c);
204
188
  }
205
- return j.isWorkerRuntime = o, j;
189
+ return H.isWorkerRuntime = o, H;
206
190
  }
207
- var Q = {}, be = { exports: {} }, Fe, mt;
208
- function ur() {
209
- if (mt) return Fe;
210
- mt = 1;
191
+ var Y = {}, be = { exports: {} }, Fe, pt;
192
+ function lr() {
193
+ if (pt) return Fe;
194
+ pt = 1;
211
195
  var s = 1e3, e = s * 60, t = e * 60, n = t * 24, r = n * 7, i = n * 365.25;
212
196
  Fe = function(u, l) {
213
197
  l = l || {};
214
- var f = typeof u;
215
- if (f === "string" && u.length > 0)
198
+ var h = typeof u;
199
+ if (h === "string" && u.length > 0)
216
200
  return o(u);
217
- if (f === "number" && isFinite(u))
201
+ if (h === "number" && isFinite(u))
218
202
  return l.long ? a(u) : c(u);
219
203
  throw new Error(
220
204
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(u)
@@ -226,46 +210,46 @@ function ur() {
226
210
  u
227
211
  );
228
212
  if (l) {
229
- var f = parseFloat(l[1]), h = (l[2] || "ms").toLowerCase();
230
- switch (h) {
213
+ var h = parseFloat(l[1]), f = (l[2] || "ms").toLowerCase();
214
+ switch (f) {
231
215
  case "years":
232
216
  case "year":
233
217
  case "yrs":
234
218
  case "yr":
235
219
  case "y":
236
- return f * i;
220
+ return h * i;
237
221
  case "weeks":
238
222
  case "week":
239
223
  case "w":
240
- return f * r;
224
+ return h * r;
241
225
  case "days":
242
226
  case "day":
243
227
  case "d":
244
- return f * n;
228
+ return h * n;
245
229
  case "hours":
246
230
  case "hour":
247
231
  case "hrs":
248
232
  case "hr":
249
233
  case "h":
250
- return f * t;
234
+ return h * t;
251
235
  case "minutes":
252
236
  case "minute":
253
237
  case "mins":
254
238
  case "min":
255
239
  case "m":
256
- return f * e;
240
+ return h * e;
257
241
  case "seconds":
258
242
  case "second":
259
243
  case "secs":
260
244
  case "sec":
261
245
  case "s":
262
- return f * s;
246
+ return h * s;
263
247
  case "milliseconds":
264
248
  case "millisecond":
265
249
  case "msecs":
266
250
  case "msec":
267
251
  case "ms":
268
- return f;
252
+ return h;
269
253
  default:
270
254
  return;
271
255
  }
@@ -280,43 +264,43 @@ function ur() {
280
264
  var l = Math.abs(u);
281
265
  return l >= n ? d(u, l, n, "day") : l >= t ? d(u, l, t, "hour") : l >= e ? d(u, l, e, "minute") : l >= s ? d(u, l, s, "second") : u + " ms";
282
266
  }
283
- function d(u, l, f, h) {
284
- var w = l >= f * 1.5;
285
- return Math.round(u / f) + " " + h + (w ? "s" : "");
267
+ function d(u, l, h, f) {
268
+ var w = l >= h * 1.5;
269
+ return Math.round(u / h) + " " + f + (w ? "s" : "");
286
270
  }
287
271
  return Fe;
288
272
  }
289
- var De, gt;
290
- function lr() {
291
- if (gt) return De;
292
- gt = 1;
273
+ var De, mt;
274
+ function dr() {
275
+ if (mt) return De;
276
+ mt = 1;
293
277
  function s(e) {
294
- n.debug = n, n.default = n, n.coerce = d, n.disable = o, n.enable = i, n.enabled = c, n.humanize = ur(), n.destroy = u, Object.keys(e).forEach((l) => {
278
+ n.debug = n, n.default = n, n.coerce = d, n.disable = o, n.enable = i, n.enabled = c, n.humanize = lr(), n.destroy = u, Object.keys(e).forEach((l) => {
295
279
  n[l] = e[l];
296
280
  }), n.names = [], n.skips = [], n.formatters = {};
297
281
  function t(l) {
298
- let f = 0;
299
- for (let h = 0; h < l.length; h++)
300
- f = (f << 5) - f + l.charCodeAt(h), f |= 0;
301
- return n.colors[Math.abs(f) % n.colors.length];
282
+ let h = 0;
283
+ for (let f = 0; f < l.length; f++)
284
+ h = (h << 5) - h + l.charCodeAt(f), h |= 0;
285
+ return n.colors[Math.abs(h) % n.colors.length];
302
286
  }
303
287
  n.selectColor = t;
304
288
  function n(l) {
305
- let f, h = null, w, E;
289
+ let h, f = null, w, E;
306
290
  function T(...p) {
307
291
  if (!T.enabled)
308
292
  return;
309
- const g = T, m = Number(/* @__PURE__ */ new Date()), b = m - (f || m);
310
- g.diff = b, g.prev = f, g.curr = m, f = m, p[0] = n.coerce(p[0]), typeof p[0] != "string" && p.unshift("%O");
293
+ const g = T, m = Number(/* @__PURE__ */ new Date()), b = m - (h || m);
294
+ g.diff = b, g.prev = h, g.curr = m, h = m, p[0] = n.coerce(p[0]), typeof p[0] != "string" && p.unshift("%O");
311
295
  let _ = 0;
312
- p[0] = p[0].replace(/%([a-zA-Z%])/g, (v, C) => {
296
+ p[0] = p[0].replace(/%([a-zA-Z%])/g, (v, R) => {
313
297
  if (v === "%%")
314
298
  return "%";
315
299
  _++;
316
- const R = n.formatters[C];
317
- if (typeof R == "function") {
318
- const k = p[_];
319
- v = R.call(g, k), p.splice(_, 1), _--;
300
+ const C = n.formatters[R];
301
+ if (typeof C == "function") {
302
+ const x = p[_];
303
+ v = C.call(g, x), p.splice(_, 1), _--;
320
304
  }
321
305
  return v;
322
306
  }), n.formatArgs.call(g, p), (g.log || n.log).apply(g, p);
@@ -324,39 +308,39 @@ function lr() {
324
308
  return T.namespace = l, T.useColors = n.useColors(), T.color = n.selectColor(l), T.extend = r, T.destroy = n.destroy, Object.defineProperty(T, "enabled", {
325
309
  enumerable: !0,
326
310
  configurable: !1,
327
- get: () => h !== null ? h : (w !== n.namespaces && (w = n.namespaces, E = n.enabled(l)), E),
311
+ get: () => f !== null ? f : (w !== n.namespaces && (w = n.namespaces, E = n.enabled(l)), E),
328
312
  set: (p) => {
329
- h = p;
313
+ f = p;
330
314
  }
331
315
  }), typeof n.init == "function" && n.init(T), T;
332
316
  }
333
- function r(l, f) {
334
- const h = n(this.namespace + (typeof f > "u" ? ":" : f) + l);
335
- return h.log = this.log, h;
317
+ function r(l, h) {
318
+ const f = n(this.namespace + (typeof h > "u" ? ":" : h) + l);
319
+ return f.log = this.log, f;
336
320
  }
337
321
  function i(l) {
338
322
  n.save(l), n.namespaces = l, n.names = [], n.skips = [];
339
- let f;
340
- const h = (typeof l == "string" ? l : "").split(/[\s,]+/), w = h.length;
341
- for (f = 0; f < w; f++)
342
- h[f] && (l = h[f].replace(/\*/g, ".*?"), l[0] === "-" ? n.skips.push(new RegExp("^" + l.slice(1) + "$")) : n.names.push(new RegExp("^" + l + "$")));
323
+ let h;
324
+ const f = (typeof l == "string" ? l : "").split(/[\s,]+/), w = f.length;
325
+ for (h = 0; h < w; h++)
326
+ f[h] && (l = f[h].replace(/\*/g, ".*?"), l[0] === "-" ? n.skips.push(new RegExp("^" + l.slice(1) + "$")) : n.names.push(new RegExp("^" + l + "$")));
343
327
  }
344
328
  function o() {
345
329
  const l = [
346
330
  ...n.names.map(a),
347
- ...n.skips.map(a).map((f) => "-" + f)
331
+ ...n.skips.map(a).map((h) => "-" + h)
348
332
  ].join(",");
349
333
  return n.enable(""), l;
350
334
  }
351
335
  function c(l) {
352
336
  if (l[l.length - 1] === "*")
353
337
  return !0;
354
- let f, h;
355
- for (f = 0, h = n.skips.length; f < h; f++)
356
- if (n.skips[f].test(l))
338
+ let h, f;
339
+ for (h = 0, f = n.skips.length; h < f; h++)
340
+ if (n.skips[h].test(l))
357
341
  return !1;
358
- for (f = 0, h = n.names.length; f < h; f++)
359
- if (n.names[f].test(l))
342
+ for (h = 0, f = n.names.length; h < f; h++)
343
+ if (n.names[h].test(l))
360
344
  return !0;
361
345
  return !1;
362
346
  }
@@ -373,9 +357,9 @@ function lr() {
373
357
  }
374
358
  return De = s, De;
375
359
  }
376
- var _t;
377
- function it() {
378
- return _t || (_t = 1, function(s, e) {
360
+ var gt;
361
+ function st() {
362
+ return gt || (gt = 1, function(s, e) {
379
363
  e.formatArgs = n, e.save = r, e.load = i, e.useColors = t, e.storage = o(), e.destroy = /* @__PURE__ */ (() => {
380
364
  let a = !1;
381
365
  return () => {
@@ -477,8 +461,8 @@ function it() {
477
461
  const d = "color: " + this.color;
478
462
  a.splice(1, 0, d, "color: inherit");
479
463
  let u = 0, l = 0;
480
- a[0].replace(/%[a-zA-Z%]/g, (f) => {
481
- f !== "%%" && (u++, f === "%c" && (l = u));
464
+ a[0].replace(/%[a-zA-Z%]/g, (h) => {
465
+ h !== "%%" && (u++, h === "%c" && (l = u));
482
466
  }), a.splice(l, 0, d);
483
467
  }
484
468
  e.log = console.debug || console.log || (() => {
@@ -503,7 +487,7 @@ function it() {
503
487
  } catch {
504
488
  }
505
489
  }
506
- s.exports = lr()(e);
490
+ s.exports = dr()(e);
507
491
  const { formatters: c } = s.exports;
508
492
  c.j = function(a) {
509
493
  try {
@@ -514,7 +498,7 @@ function it() {
514
498
  };
515
499
  }(be, be.exports)), be.exports;
516
500
  }
517
- var dr = function(s, e, t, n) {
501
+ var hr = function(s, e, t, n) {
518
502
  function r(i) {
519
503
  return i instanceof t ? i : new t(function(o) {
520
504
  o(i);
@@ -541,7 +525,7 @@ var dr = function(s, e, t, n) {
541
525
  d((n = n.apply(s, e || [])).next());
542
526
  });
543
527
  };
544
- class ke {
528
+ class Me {
545
529
  constructor(e) {
546
530
  this._baseObserver = e, this._pendingPromises = /* @__PURE__ */ new Set();
547
531
  }
@@ -552,7 +536,7 @@ class ke {
552
536
  this._baseObserver.error(e);
553
537
  }
554
538
  schedule(e) {
555
- const t = Promise.all(this._pendingPromises), n = [], r = (o) => n.push(o), i = Promise.resolve().then(() => dr(this, void 0, void 0, function* () {
539
+ const t = Promise.all(this._pendingPromises), n = [], r = (o) => n.push(o), i = Promise.resolve().then(() => hr(this, void 0, void 0, function* () {
556
540
  yield t, yield e(r), this._pendingPromises.delete(i);
557
541
  for (const o of n)
558
542
  this._baseObserver.next(o);
@@ -562,9 +546,9 @@ class ke {
562
546
  this._pendingPromises.add(i);
563
547
  }
564
548
  }
565
- const nn = () => typeof Symbol == "function", me = (s) => nn() && !!Symbol[s], ot = (s) => me(s) ? Symbol[s] : "@@" + s;
566
- me("asyncIterator") || (Symbol.asyncIterator = Symbol.asyncIterator || Symbol.for("Symbol.asyncIterator"));
567
- const fr = ot("iterator"), Ye = ot("observable"), rn = ot("species");
549
+ const nn = () => typeof Symbol == "function", _e = (s) => nn() && !!Symbol[s], it = (s) => _e(s) ? Symbol[s] : "@@" + s;
550
+ _e("asyncIterator") || (Symbol.asyncIterator = Symbol.asyncIterator || Symbol.for("Symbol.asyncIterator"));
551
+ const fr = it("iterator"), Qe = it("observable"), rn = it("species");
568
552
  function Ee(s, e) {
569
553
  const t = s[e];
570
554
  if (t != null) {
@@ -573,15 +557,15 @@ function Ee(s, e) {
573
557
  return t;
574
558
  }
575
559
  }
576
- function ie(s) {
560
+ function ae(s) {
577
561
  let e = s.constructor;
578
- return e !== void 0 && (e = e[rn], e === null && (e = void 0)), e !== void 0 ? e : L;
562
+ return e !== void 0 && (e = e[rn], e === null && (e = void 0)), e !== void 0 ? e : A;
579
563
  }
580
- function hr(s) {
581
- return s instanceof L;
564
+ function pr(s) {
565
+ return s instanceof A;
582
566
  }
583
- function ne(s) {
584
- ne.log ? ne.log(s) : setTimeout(() => {
567
+ function se(s) {
568
+ se.log ? se.log(s) : setTimeout(() => {
585
569
  throw s;
586
570
  }, 0);
587
571
  }
@@ -590,7 +574,7 @@ function Te(s) {
590
574
  try {
591
575
  s();
592
576
  } catch (e) {
593
- ne(e);
577
+ se(e);
594
578
  }
595
579
  });
596
580
  }
@@ -605,13 +589,13 @@ function sn(s) {
605
589
  t && t.call(e);
606
590
  }
607
591
  } catch (t) {
608
- ne(t);
592
+ se(t);
609
593
  }
610
594
  }
611
- function Je(s) {
595
+ function Ye(s) {
612
596
  s._observer = void 0, s._queue = void 0, s._state = "closed";
613
597
  }
614
- function pr(s) {
598
+ function mr(s) {
615
599
  const e = s._queue;
616
600
  if (e) {
617
601
  s._queue = void 0, s._state = "ready";
@@ -630,37 +614,37 @@ function on(s, e, t) {
630
614
  r && r.call(n, t);
631
615
  break;
632
616
  case "error":
633
- if (Je(s), r)
617
+ if (Ye(s), r)
634
618
  r.call(n, t);
635
619
  else
636
620
  throw t;
637
621
  break;
638
622
  case "complete":
639
- Je(s), r && r.call(n);
623
+ Ye(s), r && r.call(n);
640
624
  break;
641
625
  }
642
626
  } catch (r) {
643
- ne(r);
627
+ se(r);
644
628
  }
645
629
  s._state === "closed" ? sn(s) : s._state === "running" && (s._state = "ready");
646
630
  }
647
- function je(s, e, t) {
631
+ function He(s, e, t) {
648
632
  if (s._state !== "closed") {
649
633
  if (s._state === "buffering") {
650
634
  s._queue = s._queue || [], s._queue.push({ type: e, value: t });
651
635
  return;
652
636
  }
653
637
  if (s._state !== "ready") {
654
- s._state = "buffering", s._queue = [{ type: e, value: t }], Te(() => pr(s));
638
+ s._state = "buffering", s._queue = [{ type: e, value: t }], Te(() => mr(s));
655
639
  return;
656
640
  }
657
641
  on(s, e, t);
658
642
  }
659
643
  }
660
- class mr {
644
+ class gr {
661
645
  constructor(e, t) {
662
646
  this._cleanup = void 0, this._observer = e, this._queue = void 0, this._state = "initializing";
663
- const n = new gr(this);
647
+ const n = new _r(this);
664
648
  try {
665
649
  this._cleanup = t.call(void 0, n);
666
650
  } catch (r) {
@@ -672,10 +656,10 @@ class mr {
672
656
  return this._state === "closed";
673
657
  }
674
658
  unsubscribe() {
675
- this._state !== "closed" && (Je(this), sn(this));
659
+ this._state !== "closed" && (Ye(this), sn(this));
676
660
  }
677
661
  }
678
- class gr {
662
+ class _r {
679
663
  constructor(e) {
680
664
  this._subscription = e;
681
665
  }
@@ -683,18 +667,18 @@ class gr {
683
667
  return this._subscription._state === "closed";
684
668
  }
685
669
  next(e) {
686
- je(this._subscription, "next", e);
670
+ He(this._subscription, "next", e);
687
671
  }
688
672
  error(e) {
689
- je(this._subscription, "error", e);
673
+ He(this._subscription, "error", e);
690
674
  }
691
675
  complete() {
692
- je(this._subscription, "complete");
676
+ He(this._subscription, "complete");
693
677
  }
694
678
  }
695
- class L {
679
+ class A {
696
680
  constructor(e) {
697
- if (!(this instanceof L))
681
+ if (!(this instanceof A))
698
682
  throw new TypeError("Observable cannot be called as a function");
699
683
  if (typeof e != "function")
700
684
  throw new TypeError("Observable initializer must be a function");
@@ -705,7 +689,7 @@ class L {
705
689
  next: e,
706
690
  error: t,
707
691
  complete: n
708
- }), new mr(e, this._subscriber);
692
+ }), new gr(e, this._subscriber);
709
693
  }
710
694
  pipe(e, ...t) {
711
695
  let n = this;
@@ -719,7 +703,7 @@ class L {
719
703
  error: t,
720
704
  complete: n
721
705
  } : e;
722
- return new L((i) => this.subscribe({
706
+ return new A((i) => this.subscribe({
723
707
  next(o) {
724
708
  r.next && r.next(o), i.next(o);
725
709
  },
@@ -763,7 +747,7 @@ class L {
763
747
  map(e) {
764
748
  if (typeof e != "function")
765
749
  throw new TypeError(e + " is not a function");
766
- const t = ie(this);
750
+ const t = ae(this);
767
751
  return new t((n) => this.subscribe({
768
752
  next(r) {
769
753
  let i = r;
@@ -785,7 +769,7 @@ class L {
785
769
  filter(e) {
786
770
  if (typeof e != "function")
787
771
  throw new TypeError(e + " is not a function");
788
- const t = ie(this);
772
+ const t = ae(this);
789
773
  return new t((n) => this.subscribe({
790
774
  next(r) {
791
775
  try {
@@ -807,7 +791,7 @@ class L {
807
791
  reduce(e, t) {
808
792
  if (typeof e != "function")
809
793
  throw new TypeError(e + " is not a function");
810
- const n = ie(this), r = arguments.length > 1;
794
+ const n = ae(this), r = arguments.length > 1;
811
795
  let i = !1, o = t;
812
796
  return new n((c) => this.subscribe({
813
797
  next(a) {
@@ -832,7 +816,7 @@ class L {
832
816
  }));
833
817
  }
834
818
  concat(...e) {
835
- const t = ie(this);
819
+ const t = ae(this);
836
820
  return new t((n) => {
837
821
  let r, i = 0;
838
822
  function o(c) {
@@ -856,7 +840,7 @@ class L {
856
840
  flatMap(e) {
857
841
  if (typeof e != "function")
858
842
  throw new TypeError(e + " is not a function");
859
- const t = ie(this);
843
+ const t = ae(this);
860
844
  return new t((n) => {
861
845
  const r = [], i = this.subscribe({
862
846
  next(c) {
@@ -898,21 +882,21 @@ class L {
898
882
  };
899
883
  });
900
884
  }
901
- [Ye]() {
885
+ [Qe]() {
902
886
  return this;
903
887
  }
904
888
  static from(e) {
905
- const t = typeof this == "function" ? this : L;
889
+ const t = typeof this == "function" ? this : A;
906
890
  if (e == null)
907
891
  throw new TypeError(e + " is not an object");
908
- const n = Ee(e, Ye);
892
+ const n = Ee(e, Qe);
909
893
  if (n) {
910
894
  const r = n.call(e);
911
895
  if (Object(r) !== r)
912
896
  throw new TypeError(r + " is not an object");
913
- return hr(r) && r.constructor === t ? r : new t((i) => r.subscribe(i));
897
+ return pr(r) && r.constructor === t ? r : new t((i) => r.subscribe(i));
914
898
  }
915
- if (me("iterator")) {
899
+ if (_e("iterator")) {
916
900
  const r = Ee(e, fr);
917
901
  if (r)
918
902
  return new t((i) => {
@@ -940,7 +924,7 @@ class L {
940
924
  throw new TypeError(e + " is not observable");
941
925
  }
942
926
  static of(...e) {
943
- const t = typeof this == "function" ? this : L;
927
+ const t = typeof this == "function" ? this : A;
944
928
  return new t((n) => {
945
929
  Te(() => {
946
930
  if (!n.closed) {
@@ -956,17 +940,17 @@ class L {
956
940
  return this;
957
941
  }
958
942
  }
959
- nn() && Object.defineProperty(L, Symbol("extensions"), {
943
+ nn() && Object.defineProperty(A, Symbol("extensions"), {
960
944
  value: {
961
- symbol: Ye,
962
- hostReportError: ne
945
+ symbol: Qe,
946
+ hostReportError: se
963
947
  },
964
948
  configurable: !0
965
949
  });
966
- function Z(s) {
950
+ function ee(s) {
967
951
  typeof s == "function" ? s() : s && typeof s.unsubscribe == "function" && s.unsubscribe();
968
952
  }
969
- var _r = function(s, e, t, n) {
953
+ var br = function(s, e, t, n) {
970
954
  function r(i) {
971
955
  return i instanceof t ? i : new t(function(o) {
972
956
  o(i);
@@ -993,9 +977,9 @@ var _r = function(s, e, t, n) {
993
977
  d((n = n.apply(s, e || [])).next());
994
978
  });
995
979
  };
996
- function br(s) {
997
- return (e) => new L((t) => {
998
- const n = new ke(t), r = e.subscribe({
980
+ function yr(s) {
981
+ return (e) => new A((t) => {
982
+ const n = new Me(t), r = e.subscribe({
999
983
  complete() {
1000
984
  n.complete();
1001
985
  },
@@ -1003,21 +987,21 @@ function br(s) {
1003
987
  n.error(i);
1004
988
  },
1005
989
  next(i) {
1006
- n.schedule((o) => _r(this, void 0, void 0, function* () {
990
+ n.schedule((o) => br(this, void 0, void 0, function* () {
1007
991
  (yield s(i)) && o(i);
1008
992
  }));
1009
993
  }
1010
994
  });
1011
- return () => Z(r);
995
+ return () => ee(r);
1012
996
  });
1013
997
  }
1014
- function yr(s) {
1015
- return s && me("asyncIterator") && s[Symbol.asyncIterator];
1016
- }
1017
998
  function Tr(s) {
1018
- return s && me("iterator") && s[Symbol.iterator];
999
+ return s && _e("asyncIterator") && s[Symbol.asyncIterator];
1000
+ }
1001
+ function wr(s) {
1002
+ return s && _e("iterator") && s[Symbol.iterator];
1019
1003
  }
1020
- var wr = function(s, e, t, n) {
1004
+ var vr = function(s, e, t, n) {
1021
1005
  function r(i) {
1022
1006
  return i instanceof t ? i : new t(function(o) {
1023
1007
  o(i);
@@ -1043,7 +1027,7 @@ var wr = function(s, e, t, n) {
1043
1027
  }
1044
1028
  d((n = n.apply(s, e || [])).next());
1045
1029
  });
1046
- }, vr = function(s) {
1030
+ }, Er = function(s) {
1047
1031
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1048
1032
  var e = s[Symbol.asyncIterator], t;
1049
1033
  return e ? e.call(s) : (s = typeof __values == "function" ? __values(s) : s[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
@@ -1062,9 +1046,9 @@ var wr = function(s, e, t, n) {
1062
1046
  }, o);
1063
1047
  }
1064
1048
  };
1065
- function Er(s) {
1066
- return (e) => new L((t) => {
1067
- const n = new ke(t), r = e.subscribe({
1049
+ function Rr(s) {
1050
+ return (e) => new A((t) => {
1051
+ const n = new Me(t), r = e.subscribe({
1068
1052
  complete() {
1069
1053
  n.complete();
1070
1054
  },
@@ -1072,17 +1056,17 @@ function Er(s) {
1072
1056
  n.error(i);
1073
1057
  },
1074
1058
  next(i) {
1075
- n.schedule((o) => wr(this, void 0, void 0, function* () {
1059
+ n.schedule((o) => vr(this, void 0, void 0, function* () {
1076
1060
  var c, a;
1077
1061
  const d = yield s(i);
1078
- if (Tr(d) || yr(d))
1062
+ if (wr(d) || Tr(d))
1079
1063
  try {
1080
- for (var u = vr(d), l; l = yield u.next(), !l.done; ) {
1081
- const f = l.value;
1082
- o(f);
1064
+ for (var u = Er(d), l; l = yield u.next(), !l.done; ) {
1065
+ const h = l.value;
1066
+ o(h);
1083
1067
  }
1084
- } catch (f) {
1085
- c = { error: f };
1068
+ } catch (h) {
1069
+ c = { error: h };
1086
1070
  } finally {
1087
1071
  try {
1088
1072
  l && !l.done && (a = u.return) && (yield a.call(u));
@@ -1091,15 +1075,15 @@ function Er(s) {
1091
1075
  }
1092
1076
  }
1093
1077
  else
1094
- d.map((f) => o(f));
1078
+ d.map((h) => o(h));
1095
1079
  }));
1096
1080
  }
1097
1081
  });
1098
- return () => Z(r);
1082
+ return () => ee(r);
1099
1083
  });
1100
1084
  }
1101
1085
  function Cr(s) {
1102
- return new L((e) => {
1086
+ return new A((e) => {
1103
1087
  let t = 0;
1104
1088
  const n = setInterval(() => {
1105
1089
  e.next(t++);
@@ -1107,7 +1091,7 @@ function Cr(s) {
1107
1091
  return () => clearInterval(n);
1108
1092
  });
1109
1093
  }
1110
- var Rr = function(s, e, t, n) {
1094
+ var Sr = function(s, e, t, n) {
1111
1095
  function r(i) {
1112
1096
  return i instanceof t ? i : new t(function(o) {
1113
1097
  o(i);
@@ -1134,9 +1118,9 @@ var Rr = function(s, e, t, n) {
1134
1118
  d((n = n.apply(s, e || [])).next());
1135
1119
  });
1136
1120
  };
1137
- function Sr(s) {
1138
- return (e) => new L((t) => {
1139
- const n = new ke(t), r = e.subscribe({
1121
+ function xr(s) {
1122
+ return (e) => new A((t) => {
1123
+ const n = new Me(t), r = e.subscribe({
1140
1124
  complete() {
1141
1125
  n.complete();
1142
1126
  },
@@ -1144,17 +1128,17 @@ function Sr(s) {
1144
1128
  n.error(i);
1145
1129
  },
1146
1130
  next(i) {
1147
- n.schedule((o) => Rr(this, void 0, void 0, function* () {
1131
+ n.schedule((o) => Sr(this, void 0, void 0, function* () {
1148
1132
  const c = yield s(i);
1149
1133
  o(c);
1150
1134
  }));
1151
1135
  }
1152
1136
  });
1153
- return () => Z(r);
1137
+ return () => ee(r);
1154
1138
  });
1155
1139
  }
1156
- function xr(...s) {
1157
- return s.length === 0 ? L.from([]) : new L((e) => {
1140
+ function Mr(...s) {
1141
+ return s.length === 0 ? A.from([]) : new A((e) => {
1158
1142
  let t = 0;
1159
1143
  const n = s.map((i) => i.subscribe({
1160
1144
  error(o) {
@@ -1167,12 +1151,12 @@ function xr(...s) {
1167
1151
  ++t === s.length && (e.complete(), r());
1168
1152
  }
1169
1153
  })), r = () => {
1170
- n.forEach((i) => Z(i));
1154
+ n.forEach((i) => ee(i));
1171
1155
  };
1172
1156
  return r;
1173
1157
  });
1174
1158
  }
1175
- class an extends L {
1159
+ class an extends A {
1176
1160
  constructor() {
1177
1161
  super((e) => (this._observers.add(e), () => this._observers.delete(e))), this._observers = /* @__PURE__ */ new Set();
1178
1162
  }
@@ -1192,15 +1176,15 @@ class an extends L {
1192
1176
  function kr(s) {
1193
1177
  const e = new an();
1194
1178
  let t, n = 0;
1195
- return new L((r) => {
1179
+ return new A((r) => {
1196
1180
  t || (t = s.subscribe(e));
1197
1181
  const i = e.subscribe(r);
1198
1182
  return n++, () => {
1199
- n--, i.unsubscribe(), n === 0 && (Z(t), t = void 0);
1183
+ n--, i.unsubscribe(), n === 0 && (ee(t), t = void 0);
1200
1184
  };
1201
1185
  });
1202
1186
  }
1203
- var Mr = function(s, e, t, n) {
1187
+ var Lr = function(s, e, t, n) {
1204
1188
  function r(i) {
1205
1189
  return i instanceof t ? i : new t(function(o) {
1206
1190
  o(i);
@@ -1228,9 +1212,9 @@ var Mr = function(s, e, t, n) {
1228
1212
  });
1229
1213
  };
1230
1214
  function Ar(s, e) {
1231
- return (t) => new L((n) => {
1215
+ return (t) => new A((n) => {
1232
1216
  let r, i = 0;
1233
- const o = new ke(n), c = t.subscribe({
1217
+ const o = new Me(n), c = t.subscribe({
1234
1218
  complete() {
1235
1219
  o.complete();
1236
1220
  },
@@ -1238,31 +1222,31 @@ function Ar(s, e) {
1238
1222
  o.error(a);
1239
1223
  },
1240
1224
  next(a) {
1241
- o.schedule((d) => Mr(this, void 0, void 0, function* () {
1225
+ o.schedule((d) => Lr(this, void 0, void 0, function* () {
1242
1226
  r = yield s(i === 0 ? typeof e > "u" ? a : e : r, a, i++), d(r);
1243
1227
  }));
1244
1228
  }
1245
1229
  });
1246
- return () => Z(c);
1230
+ return () => ee(c);
1247
1231
  });
1248
1232
  }
1249
- const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1233
+ const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1250
1234
  __proto__: null,
1251
- Observable: L,
1235
+ Observable: A,
1252
1236
  Subject: an,
1253
- filter: br,
1254
- flatMap: Er,
1237
+ filter: yr,
1238
+ flatMap: Rr,
1255
1239
  interval: Cr,
1256
- map: Sr,
1257
- merge: xr,
1240
+ map: xr,
1241
+ merge: Mr,
1258
1242
  multicast: kr,
1259
1243
  scan: Ar,
1260
- unsubscribe: Z
1261
- }, Symbol.toStringTag, { value: "Module" })), Me = /* @__PURE__ */ mn(Lr);
1262
- var oe = {}, bt;
1263
- function Pr() {
1264
- if (bt) return oe;
1265
- bt = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.allSettled = void 0;
1244
+ unsubscribe: ee
1245
+ }, Symbol.toStringTag, { value: "Module" })), ke = /* @__PURE__ */ mn(Pr);
1246
+ var ce = {}, _t;
1247
+ function Or() {
1248
+ if (_t) return ce;
1249
+ _t = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.allSettled = void 0;
1266
1250
  function s(e) {
1267
1251
  return Promise.all(e.map((t) => {
1268
1252
  const n = (o) => ({ status: "fulfilled", value: o }), r = (o) => ({ status: "rejected", reason: o }), i = Promise.resolve(t);
@@ -1273,25 +1257,25 @@ function Pr() {
1273
1257
  }
1274
1258
  }));
1275
1259
  }
1276
- return oe.allSettled = s, oe;
1260
+ return ce.allSettled = s, ce;
1277
1261
  }
1278
- var He = {}, yt;
1279
- function Or() {
1280
- return yt || (yt = 1, function(s) {
1262
+ var je = {}, bt;
1263
+ function Ir() {
1264
+ return bt || (bt = 1, function(s) {
1281
1265
  Object.defineProperty(s, "__esModule", { value: !0 }), s.PoolEventType = void 0, function(e) {
1282
1266
  e.initialized = "initialized", e.taskCanceled = "taskCanceled", e.taskCompleted = "taskCompleted", e.taskFailed = "taskFailed", e.taskQueued = "taskQueued", e.taskQueueDrained = "taskQueueDrained", e.taskStart = "taskStart", e.terminated = "terminated";
1283
1267
  }(s.PoolEventType || (s.PoolEventType = {}));
1284
- }(He)), He;
1268
+ }(je)), je;
1285
1269
  }
1286
- var ae = {}, Tt;
1270
+ var ue = {}, yt;
1287
1271
  function cn() {
1288
- if (Tt) return ae;
1289
- Tt = 1, Object.defineProperty(ae, "__esModule", { value: !0 }), ae.Thread = void 0;
1290
- const s = /* @__PURE__ */ Nt();
1272
+ if (yt) return ue;
1273
+ yt = 1, Object.defineProperty(ue, "__esModule", { value: !0 }), ue.Thread = void 0;
1274
+ const s = /* @__PURE__ */ It();
1291
1275
  function e(t) {
1292
1276
  throw Error(t);
1293
1277
  }
1294
- return ae.Thread = {
1278
+ return ue.Thread = {
1295
1279
  /** Return an observable that can be used to subscribe to all errors happening in the thread. */
1296
1280
  errors(t) {
1297
1281
  return t[s.$errors] || e("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.");
@@ -1304,42 +1288,42 @@ function cn() {
1304
1288
  terminate(t) {
1305
1289
  return t[s.$terminate]();
1306
1290
  }
1307
- }, ae;
1291
+ }, ue;
1308
1292
  }
1309
- var wt;
1310
- function Ir() {
1311
- return wt || (wt = 1, function(s) {
1312
- var e = Q && Q.__awaiter || function(p, g, m, b) {
1293
+ var Tt;
1294
+ function Nr() {
1295
+ return Tt || (Tt = 1, function(s) {
1296
+ var e = Y && Y.__awaiter || function(p, g, m, b) {
1313
1297
  function _(y) {
1314
1298
  return y instanceof m ? y : new m(function(v) {
1315
1299
  v(y);
1316
1300
  });
1317
1301
  }
1318
1302
  return new (m || (m = Promise))(function(y, v) {
1319
- function C(M) {
1303
+ function R(k) {
1320
1304
  try {
1321
- k(b.next(M));
1305
+ x(b.next(k));
1322
1306
  } catch (I) {
1323
1307
  v(I);
1324
1308
  }
1325
1309
  }
1326
- function R(M) {
1310
+ function C(k) {
1327
1311
  try {
1328
- k(b.throw(M));
1312
+ x(b.throw(k));
1329
1313
  } catch (I) {
1330
1314
  v(I);
1331
1315
  }
1332
1316
  }
1333
- function k(M) {
1334
- M.done ? y(M.value) : _(M.value).then(C, R);
1317
+ function x(k) {
1318
+ k.done ? y(k.value) : _(k.value).then(R, C);
1335
1319
  }
1336
- k((b = b.apply(p, g || [])).next());
1320
+ x((b = b.apply(p, g || [])).next());
1337
1321
  });
1338
- }, t = Q && Q.__importDefault || function(p) {
1322
+ }, t = Y && Y.__importDefault || function(p) {
1339
1323
  return p && p.__esModule ? p : { default: p };
1340
1324
  };
1341
1325
  Object.defineProperty(s, "__esModule", { value: !0 }), s.Pool = s.Thread = s.PoolEventType = void 0;
1342
- const n = t(it()), r = Me, i = /* @__PURE__ */ Pr(), o = /* @__PURE__ */ tn(), c = /* @__PURE__ */ Or();
1326
+ const n = t(st()), r = ke, i = /* @__PURE__ */ Or(), o = /* @__PURE__ */ tn(), c = /* @__PURE__ */ Ir();
1343
1327
  Object.defineProperty(s, "PoolEventType", { enumerable: !0, get: function() {
1344
1328
  return c.PoolEventType;
1345
1329
  } });
@@ -1357,10 +1341,10 @@ function Ir() {
1357
1341
  function l(p) {
1358
1342
  return new Promise((g) => setTimeout(g, p));
1359
1343
  }
1360
- function f(p, g) {
1344
+ function h(p, g) {
1361
1345
  return p.reduce((m, b) => [...m, ...g(b)], []);
1362
1346
  }
1363
- function h(p) {
1347
+ function f(p) {
1364
1348
  return p.replace(/\W/g, " ").trim().replace(/\s+/g, "-");
1365
1349
  }
1366
1350
  function w(p, g) {
@@ -1373,7 +1357,7 @@ function Ir() {
1373
1357
  constructor(g, m) {
1374
1358
  this.eventSubject = new r.Subject(), this.initErrors = [], this.isClosing = !1, this.nextTaskID = 1, this.taskQueue = [];
1375
1359
  const b = typeof m == "number" ? { size: m } : m || {}, { size: _ = o.defaultPoolSize } = b;
1376
- this.debug = n.default(`threads:pool:${h(b.name || String(d++))}`), this.options = b, this.workers = w(g, _), this.eventObservable = r.multicast(r.Observable.from(this.eventSubject)), Promise.all(this.workers.map((y) => y.init)).then(() => this.eventSubject.next({
1360
+ this.debug = n.default(`threads:pool:${f(b.name || String(d++))}`), this.options = b, this.workers = w(g, _), this.eventObservable = r.multicast(r.Observable.from(this.eventSubject)), Promise.all(this.workers.map((y) => y.init)).then(() => this.eventSubject.next({
1377
1361
  type: c.PoolEventType.initialized,
1378
1362
  size: this.workers.length
1379
1363
  }), (y) => {
@@ -1447,13 +1431,13 @@ function Ir() {
1447
1431
  }
1448
1432
  settled(g = !1) {
1449
1433
  return e(this, void 0, void 0, function* () {
1450
- const m = () => f(this.workers, (y) => y.runningTasks), b = [], _ = this.eventObservable.subscribe((y) => {
1434
+ const m = () => h(this.workers, (y) => y.runningTasks), b = [], _ = this.eventObservable.subscribe((y) => {
1451
1435
  y.type === c.PoolEventType.taskFailed && b.push(y.error);
1452
1436
  });
1453
1437
  return this.initErrors.length > 0 ? Promise.reject(this.initErrors[0]) : g && this.taskQueue.length === 0 ? (yield i.allSettled(m()), b) : (yield new Promise((y, v) => {
1454
- const C = this.eventObservable.subscribe({
1455
- next(R) {
1456
- R.type === c.PoolEventType.taskQueueDrained && (C.unsubscribe(), y(void 0));
1438
+ const R = this.eventObservable.subscribe({
1439
+ next(C) {
1440
+ C.type === c.PoolEventType.taskQueueDrained && (R.unsubscribe(), y(void 0));
1457
1441
  },
1458
1442
  error: v
1459
1443
  // make a pool-wide error reject the completed() result promise
@@ -1464,9 +1448,9 @@ function Ir() {
1464
1448
  completed(g = !1) {
1465
1449
  return e(this, void 0, void 0, function* () {
1466
1450
  const m = this.settled(g), b = new Promise((y, v) => {
1467
- const C = this.eventObservable.subscribe({
1468
- next(R) {
1469
- R.type === c.PoolEventType.taskQueueDrained ? (C.unsubscribe(), y(m)) : R.type === c.PoolEventType.taskFailed && (C.unsubscribe(), v(R.error));
1451
+ const R = this.eventObservable.subscribe({
1452
+ next(C) {
1453
+ C.type === c.PoolEventType.taskQueueDrained ? (R.unsubscribe(), y(m)) : C.type === c.PoolEventType.taskFailed && (R.unsubscribe(), v(C.error));
1470
1454
  },
1471
1455
  error: v
1472
1456
  // make a pool-wide error reject the completed() result promise
@@ -1527,12 +1511,12 @@ This usually happens for one of two reasons: We are either at peak workload righ
1527
1511
  return new E(p, g);
1528
1512
  }
1529
1513
  T.EventType = c.PoolEventType, s.Pool = T;
1530
- }(Q)), Q;
1514
+ }(Y)), Y;
1531
1515
  }
1532
- var H = {}, ce = {}, vt;
1533
- function Nr() {
1534
- if (vt) return ce;
1535
- vt = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.createPromiseWithResolver = void 0;
1516
+ var j = {}, le = {}, wt;
1517
+ function Fr() {
1518
+ if (wt) return le;
1519
+ wt = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.createPromiseWithResolver = void 0;
1536
1520
  const s = () => {
1537
1521
  };
1538
1522
  function e() {
@@ -1543,21 +1527,21 @@ function Nr() {
1543
1527
  t = !0, n = c, r(n);
1544
1528
  }];
1545
1529
  }
1546
- return ce.createPromiseWithResolver = e, ce;
1530
+ return le.createPromiseWithResolver = e, le;
1547
1531
  }
1548
- var Ue = {}, Et;
1549
- function Fr() {
1550
- return Et || (Et = 1, function(s) {
1532
+ var Ue = {}, vt;
1533
+ function Dr() {
1534
+ return vt || (vt = 1, function(s) {
1551
1535
  Object.defineProperty(s, "__esModule", { value: !0 }), s.WorkerEventType = void 0, function(e) {
1552
1536
  e.internalError = "internalError", e.message = "message", e.termination = "termination";
1553
1537
  }(s.WorkerEventType || (s.WorkerEventType = {}));
1554
1538
  }(Ue)), Ue;
1555
1539
  }
1556
- var U = {}, ue = {}, Ct;
1557
- function Dr() {
1558
- if (Ct) return ue;
1559
- Ct = 1, Object.defineProperty(ue, "__esModule", { value: !0 }), ue.ObservablePromise = void 0;
1560
- const s = Me, e = () => {
1540
+ var U = {}, de = {}, Et;
1541
+ function Hr() {
1542
+ if (Et) return de;
1543
+ Et = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.ObservablePromise = void 0;
1544
+ const s = ke, e = () => {
1561
1545
  }, t = (c) => c, n = (c) => Promise.resolve().then(c);
1562
1546
  function r(c) {
1563
1547
  throw c;
@@ -1572,17 +1556,17 @@ function Dr() {
1572
1556
  complete() {
1573
1557
  d.complete(), u.onCompletion();
1574
1558
  },
1575
- error(f) {
1576
- d.error(f), u.onError(f);
1559
+ error(h) {
1560
+ d.error(h), u.onError(h);
1577
1561
  },
1578
- next(f) {
1579
- d.next(f), u.onNext(f);
1562
+ next(h) {
1563
+ d.next(h), u.onNext(h);
1580
1564
  }
1581
1565
  });
1582
1566
  try {
1583
1567
  return this.initHasRun = !0, a(l);
1584
- } catch (f) {
1585
- l.error(f);
1568
+ } catch (h) {
1569
+ l.error(h);
1586
1570
  }
1587
1571
  }), this.initHasRun = !1, this.fulfillmentCallbacks = [], this.rejectionCallbacks = [], this.firstValueSet = !1, this.state = "pending";
1588
1572
  }
@@ -1601,28 +1585,28 @@ function Dr() {
1601
1585
  }
1602
1586
  then(a, d) {
1603
1587
  const u = a || t, l = d || r;
1604
- let f = !1;
1605
- return new Promise((h, w) => {
1588
+ let h = !1;
1589
+ return new Promise((f, w) => {
1606
1590
  const E = (p) => {
1607
- if (!f) {
1608
- f = !0;
1591
+ if (!h) {
1592
+ h = !0;
1609
1593
  try {
1610
- h(l(p));
1594
+ f(l(p));
1611
1595
  } catch (g) {
1612
1596
  w(g);
1613
1597
  }
1614
1598
  }
1615
1599
  }, T = (p) => {
1616
1600
  try {
1617
- h(u(p));
1601
+ f(u(p));
1618
1602
  } catch (g) {
1619
1603
  E(g);
1620
1604
  }
1621
1605
  };
1622
1606
  if (this.initHasRun || this.subscribe({ error: E }), this.state === "fulfilled")
1623
- return h(u(this.firstValue));
1607
+ return f(u(this.firstValue));
1624
1608
  if (this.state === "rejected")
1625
- return f = !0, h(l(this.rejection));
1609
+ return h = !0, f(l(this.rejection));
1626
1610
  this.fulfillmentCallbacks.push(T), this.rejectionCallbacks.push(E);
1627
1611
  });
1628
1612
  }
@@ -1635,16 +1619,16 @@ function Dr() {
1635
1619
  }
1636
1620
  static from(a) {
1637
1621
  return i(a) ? new o((d) => {
1638
- const u = (f) => {
1639
- d.next(f), d.complete();
1640
- }, l = (f) => {
1641
- d.error(f);
1622
+ const u = (h) => {
1623
+ d.next(h), d.complete();
1624
+ }, l = (h) => {
1625
+ d.error(h);
1642
1626
  };
1643
1627
  a.then(u, l);
1644
1628
  }) : super.from(a);
1645
1629
  }
1646
1630
  }
1647
- return ue.ObservablePromise = o, ue;
1631
+ return de.ObservablePromise = o, de;
1648
1632
  }
1649
1633
  var Rt;
1650
1634
  function jr() {
@@ -1654,15 +1638,15 @@ function jr() {
1654
1638
  return p && p.__esModule ? p : { default: p };
1655
1639
  };
1656
1640
  Object.defineProperty(U, "__esModule", { value: !0 }), U.createProxyModule = U.createProxyFunction = void 0;
1657
- const e = s(it()), t = Me, n = /* @__PURE__ */ st(), r = /* @__PURE__ */ Dr(), i = /* @__PURE__ */ Ft(), o = /* @__PURE__ */ gn(), c = e.default("threads:master:messages");
1641
+ const e = s(st()), t = ke, n = /* @__PURE__ */ rt(), r = /* @__PURE__ */ Hr(), i = /* @__PURE__ */ Nt(), o = /* @__PURE__ */ gn(), c = e.default("threads:master:messages");
1658
1642
  let a = 1;
1659
- const d = (p) => Array.from(new Set(p)), u = (p) => p && p.type === o.WorkerMessageType.error, l = (p) => p && p.type === o.WorkerMessageType.result, f = (p) => p && p.type === o.WorkerMessageType.running;
1660
- function h(p, g) {
1643
+ const d = (p) => Array.from(new Set(p)), u = (p) => p && p.type === o.WorkerMessageType.error, l = (p) => p && p.type === o.WorkerMessageType.result, h = (p) => p && p.type === o.WorkerMessageType.running;
1644
+ function f(p, g) {
1661
1645
  return new t.Observable((m) => {
1662
1646
  let b;
1663
1647
  const _ = (y) => {
1664
1648
  if (c("Message from worker:", y.data), !(!y.data || y.data.uid !== g)) {
1665
- if (f(y.data))
1649
+ if (h(y.data))
1666
1650
  b = y.data.resultType;
1667
1651
  else if (l(y.data))
1668
1652
  b === "promise" ? (typeof y.data.payload < "u" && m.next(n.deserialize(y.data.payload)), m.complete(), p.removeEventListener("message", _)) : (y.data.payload && m.next(n.deserialize(y.data.payload)), y.data.complete && (m.complete(), p.removeEventListener("message", _)));
@@ -1709,10 +1693,10 @@ function jr() {
1709
1693
  c("Sending command to run function to worker:", v);
1710
1694
  try {
1711
1695
  p.postMessage(v, y);
1712
- } catch (C) {
1713
- return r.ObservablePromise.from(Promise.reject(C));
1696
+ } catch (R) {
1697
+ return r.ObservablePromise.from(Promise.reject(R));
1714
1698
  }
1715
- return r.ObservablePromise.from(t.multicast(h(p, b)));
1699
+ return r.ObservablePromise.from(t.multicast(f(p, b)));
1716
1700
  };
1717
1701
  }
1718
1702
  U.createProxyFunction = E;
@@ -1724,82 +1708,82 @@ function jr() {
1724
1708
  }
1725
1709
  return U.createProxyModule = T, U;
1726
1710
  }
1727
- var St;
1728
- function Hr() {
1729
- if (St) return H;
1730
- St = 1;
1731
- var s = H && H.__awaiter || function(_, y, v, C) {
1732
- function R(k) {
1733
- return k instanceof v ? k : new v(function(M) {
1734
- M(k);
1711
+ var Ct;
1712
+ function Ur() {
1713
+ if (Ct) return j;
1714
+ Ct = 1;
1715
+ var s = j && j.__awaiter || function(_, y, v, R) {
1716
+ function C(x) {
1717
+ return x instanceof v ? x : new v(function(k) {
1718
+ k(x);
1735
1719
  });
1736
1720
  }
1737
- return new (v || (v = Promise))(function(k, M) {
1721
+ return new (v || (v = Promise))(function(x, k) {
1738
1722
  function I(q) {
1739
1723
  try {
1740
- Ae(C.next(q));
1741
- } catch (Le) {
1742
- M(Le);
1724
+ Le(R.next(q));
1725
+ } catch (Ae) {
1726
+ k(Ae);
1743
1727
  }
1744
1728
  }
1745
1729
  function K(q) {
1746
1730
  try {
1747
- Ae(C.throw(q));
1748
- } catch (Le) {
1749
- M(Le);
1731
+ Le(R.throw(q));
1732
+ } catch (Ae) {
1733
+ k(Ae);
1750
1734
  }
1751
1735
  }
1752
- function Ae(q) {
1753
- q.done ? k(q.value) : R(q.value).then(I, K);
1736
+ function Le(q) {
1737
+ q.done ? x(q.value) : C(q.value).then(I, K);
1754
1738
  }
1755
- Ae((C = C.apply(_, y || [])).next());
1739
+ Le((R = R.apply(_, y || [])).next());
1756
1740
  });
1757
- }, e = H && H.__importDefault || function(_) {
1741
+ }, e = j && j.__importDefault || function(_) {
1758
1742
  return _ && _.__esModule ? _ : { default: _ };
1759
1743
  };
1760
- Object.defineProperty(H, "__esModule", { value: !0 }), H.spawn = void 0;
1761
- const t = e(it()), n = Me, r = /* @__PURE__ */ st(), i = /* @__PURE__ */ Nr(), o = /* @__PURE__ */ Nt(), c = /* @__PURE__ */ Fr(), a = /* @__PURE__ */ jr(), d = t.default("threads:master:messages"), u = t.default("threads:master:spawn"), l = t.default("threads:master:thread-utils"), f = (_) => _ && _.type === "init", h = (_) => _ && _.type === "uncaughtError", w = typeof process < "u" && process.env.THREADS_WORKER_INIT_TIMEOUT ? Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT, 10) : 1e4;
1744
+ Object.defineProperty(j, "__esModule", { value: !0 }), j.spawn = void 0;
1745
+ const t = e(st()), n = ke, r = /* @__PURE__ */ rt(), i = /* @__PURE__ */ Fr(), o = /* @__PURE__ */ It(), c = /* @__PURE__ */ Dr(), a = /* @__PURE__ */ jr(), d = t.default("threads:master:messages"), u = t.default("threads:master:spawn"), l = t.default("threads:master:thread-utils"), h = (_) => _ && _.type === "init", f = (_) => _ && _.type === "uncaughtError", w = typeof process < "u" && process.env.THREADS_WORKER_INIT_TIMEOUT ? Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT, 10) : 1e4;
1762
1746
  function E(_, y, v) {
1763
1747
  return s(this, void 0, void 0, function* () {
1764
- let C;
1765
- const R = new Promise((M, I) => {
1766
- C = setTimeout(() => I(Error(v)), y);
1767
- }), k = yield Promise.race([
1748
+ let R;
1749
+ const C = new Promise((k, I) => {
1750
+ R = setTimeout(() => I(Error(v)), y);
1751
+ }), x = yield Promise.race([
1768
1752
  _,
1769
- R
1753
+ C
1770
1754
  ]);
1771
- return clearTimeout(C), k;
1755
+ return clearTimeout(R), x;
1772
1756
  });
1773
1757
  }
1774
1758
  function T(_) {
1775
1759
  return new Promise((y, v) => {
1776
- const C = (R) => {
1777
- d("Message from worker before finishing initialization:", R.data), f(R.data) ? (_.removeEventListener("message", C), y(R.data)) : h(R.data) && (_.removeEventListener("message", C), v(r.deserialize(R.data.error)));
1760
+ const R = (C) => {
1761
+ d("Message from worker before finishing initialization:", C.data), h(C.data) ? (_.removeEventListener("message", R), y(C.data)) : f(C.data) && (_.removeEventListener("message", R), v(r.deserialize(C.data.error)));
1778
1762
  };
1779
- _.addEventListener("message", C);
1763
+ _.addEventListener("message", R);
1780
1764
  });
1781
1765
  }
1782
1766
  function p(_, y) {
1783
1767
  return new n.Observable((v) => {
1784
- const C = (k) => {
1785
- const M = {
1768
+ const R = (x) => {
1769
+ const k = {
1786
1770
  type: c.WorkerEventType.message,
1787
- data: k.data
1771
+ data: x.data
1788
1772
  };
1789
- v.next(M);
1790
- }, R = (k) => {
1791
- l("Unhandled promise rejection event in thread:", k);
1792
- const M = {
1773
+ v.next(k);
1774
+ }, C = (x) => {
1775
+ l("Unhandled promise rejection event in thread:", x);
1776
+ const k = {
1793
1777
  type: c.WorkerEventType.internalError,
1794
- error: Error(k.reason)
1778
+ error: Error(x.reason)
1795
1779
  };
1796
- v.next(M);
1780
+ v.next(k);
1797
1781
  };
1798
- _.addEventListener("message", C), _.addEventListener("unhandledrejection", R), y.then(() => {
1799
- const k = {
1782
+ _.addEventListener("message", R), _.addEventListener("unhandledrejection", C), y.then(() => {
1783
+ const x = {
1800
1784
  type: c.WorkerEventType.termination
1801
1785
  };
1802
- _.removeEventListener("message", C), _.removeEventListener("unhandledrejection", R), v.next(k), v.complete();
1786
+ _.removeEventListener("message", R), _.removeEventListener("unhandledrejection", C), v.next(x), v.complete();
1803
1787
  });
1804
1788
  });
1805
1789
  }
@@ -1809,46 +1793,46 @@ function Hr() {
1809
1793
  l("Terminating worker"), yield _.terminate(), v();
1810
1794
  }), termination: y };
1811
1795
  }
1812
- function m(_, y, v, C) {
1813
- const R = v.filter((k) => k.type === c.WorkerEventType.internalError).map((k) => k.error);
1796
+ function m(_, y, v, R) {
1797
+ const C = v.filter((x) => x.type === c.WorkerEventType.internalError).map((x) => x.error);
1814
1798
  return Object.assign(_, {
1815
- [o.$errors]: R,
1799
+ [o.$errors]: C,
1816
1800
  [o.$events]: v,
1817
- [o.$terminate]: C,
1801
+ [o.$terminate]: R,
1818
1802
  [o.$worker]: y
1819
1803
  });
1820
1804
  }
1821
1805
  function b(_, y) {
1822
1806
  return s(this, void 0, void 0, function* () {
1823
1807
  u("Initializing new thread");
1824
- const v = y && y.timeout ? y.timeout : w, R = (yield E(T(_), v, `Timeout: Did not receive an init message from worker after ${v}ms. Make sure the worker calls expose().`)).exposed, { termination: k, terminate: M } = g(_), I = p(_, k);
1825
- if (R.type === "function") {
1808
+ const v = y && y.timeout ? y.timeout : w, C = (yield E(T(_), v, `Timeout: Did not receive an init message from worker after ${v}ms. Make sure the worker calls expose().`)).exposed, { termination: x, terminate: k } = g(_), I = p(_, x);
1809
+ if (C.type === "function") {
1826
1810
  const K = a.createProxyFunction(_);
1827
- return m(K, _, I, M);
1828
- } else if (R.type === "module") {
1829
- const K = a.createProxyModule(_, R.methods);
1830
- return m(K, _, I, M);
1811
+ return m(K, _, I, k);
1812
+ } else if (C.type === "module") {
1813
+ const K = a.createProxyModule(_, C.methods);
1814
+ return m(K, _, I, k);
1831
1815
  } else {
1832
- const K = R.type;
1816
+ const K = C.type;
1833
1817
  throw Error(`Worker init message states unexpected type of expose(): ${K}`);
1834
1818
  }
1835
1819
  });
1836
1820
  }
1837
- return H.spawn = b, H;
1821
+ return j.spawn = b, j;
1838
1822
  }
1839
- var xt;
1840
- function Ur() {
1841
- return xt || (xt = 1, function(s) {
1823
+ var St;
1824
+ function Br() {
1825
+ return St || (St = 1, function(s) {
1842
1826
  Object.defineProperty(s, "__esModule", { value: !0 }), s.Worker = s.BlobWorker = s.isWorkerRuntime = s.Thread = s.spawn = s.Pool = void 0;
1843
1827
  const e = /* @__PURE__ */ tn();
1844
1828
  Object.defineProperty(s, "isWorkerRuntime", { enumerable: !0, get: function() {
1845
1829
  return e.isWorkerRuntime;
1846
1830
  } });
1847
- var t = /* @__PURE__ */ Ir();
1831
+ var t = /* @__PURE__ */ Nr();
1848
1832
  Object.defineProperty(s, "Pool", { enumerable: !0, get: function() {
1849
1833
  return t.Pool;
1850
1834
  } });
1851
- var n = /* @__PURE__ */ Hr();
1835
+ var n = /* @__PURE__ */ Ur();
1852
1836
  Object.defineProperty(s, "spawn", { enumerable: !0, get: function() {
1853
1837
  return n.spawn;
1854
1838
  } });
@@ -1858,23 +1842,23 @@ function Ur() {
1858
1842
  } }), s.BlobWorker = e.getWorkerImplementation().blob, s.Worker = e.getWorkerImplementation().default;
1859
1843
  }(Ne)), Ne;
1860
1844
  }
1861
- var kt;
1862
- function Br() {
1863
- return kt || (kt = 1, function(s) {
1864
- var e = V && V.__createBinding || (Object.create ? function(c, a, d, u) {
1845
+ var xt;
1846
+ function Wr() {
1847
+ return xt || (xt = 1, function(s) {
1848
+ var e = X && X.__createBinding || (Object.create ? function(c, a, d, u) {
1865
1849
  u === void 0 && (u = d), Object.defineProperty(c, u, { enumerable: !0, get: function() {
1866
1850
  return a[d];
1867
1851
  } });
1868
1852
  } : function(c, a, d, u) {
1869
1853
  u === void 0 && (u = d), c[u] = a[d];
1870
- }), t = V && V.__exportStar || function(c, a) {
1854
+ }), t = X && X.__exportStar || function(c, a) {
1871
1855
  for (var d in c) d !== "default" && !Object.prototype.hasOwnProperty.call(a, d) && e(a, c, d);
1872
1856
  };
1873
1857
  Object.defineProperty(s, "__esModule", { value: !0 }), s.Transfer = s.DefaultSerializer = s.expose = s.registerSerializer = void 0;
1874
- var n = /* @__PURE__ */ st();
1858
+ var n = /* @__PURE__ */ rt();
1875
1859
  Object.defineProperty(s, "registerSerializer", { enumerable: !0, get: function() {
1876
1860
  return n.registerSerializer;
1877
- } }), t(/* @__PURE__ */ Ur(), s);
1861
+ } }), t(/* @__PURE__ */ Br(), s);
1878
1862
  var r = _n();
1879
1863
  Object.defineProperty(s, "expose", { enumerable: !0, get: function() {
1880
1864
  return r.expose;
@@ -1883,24 +1867,24 @@ function Br() {
1883
1867
  Object.defineProperty(s, "DefaultSerializer", { enumerable: !0, get: function() {
1884
1868
  return i.DefaultSerializer;
1885
1869
  } });
1886
- var o = /* @__PURE__ */ Ft();
1870
+ var o = /* @__PURE__ */ Nt();
1887
1871
  Object.defineProperty(s, "Transfer", { enumerable: !0, get: function() {
1888
1872
  return o.Transfer;
1889
1873
  } });
1890
- }(V)), V;
1874
+ }(X)), X;
1891
1875
  }
1892
- var Gr = /* @__PURE__ */ Br();
1876
+ var Gr = /* @__PURE__ */ Wr();
1893
1877
  const $ = /* @__PURE__ */ yn(Gr);
1894
1878
  $.registerSerializer;
1895
- const Wr = $.spawn;
1879
+ const zr = $.spawn;
1896
1880
  $.BlobWorker;
1897
1881
  $.DefaultSerializer;
1898
1882
  $.Pool;
1899
- const zr = $.Thread;
1883
+ const $r = $.Thread;
1900
1884
  $.Transfer;
1901
- const $r = $.Worker;
1902
- var Kr = Object.defineProperty, qr = (s, e, t) => e in s ? Kr(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, B = (s, e, t) => qr(s, typeof e != "symbol" ? e + "" : e, t);
1903
- const Vr = () => {
1885
+ const Kr = $.Worker;
1886
+ var qr = Object.defineProperty, Vr = (s, e, t) => e in s ? qr(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, B = (s, e, t) => Vr(s, typeof e != "symbol" ? e + "" : e, t);
1887
+ const Xr = () => {
1904
1888
  try {
1905
1889
  if (window) {
1906
1890
  if (navigator != null && navigator.hardwareConcurrency)
@@ -1910,24 +1894,24 @@ const Vr = () => {
1910
1894
  } catch (s) {
1911
1895
  return console.error("🛑 Unable to detect available cores", s), 2;
1912
1896
  }
1913
- }, Xr = () => Vr() - 1, Qr = "TERMINATE_THREAD_FROM_WORKER";
1914
- let Yr = -1;
1915
- class Jr {
1897
+ }, Qr = () => Xr() - 1, Yr = "TERMINATE_THREAD_FROM_WORKER";
1898
+ let Jr = -1;
1899
+ class Zr {
1916
1900
  constructor(e) {
1917
- B(this, "_handleTerminate"), B(this, "_handleError"), B(this, "_task"), B(this, "id", Yr += 1), B(this, "idle", !0), B(this, "worker"), B(this, "thread"), this._handleTerminate = e == null ? void 0 : e.onTerminate, this._handleError = e == null ? void 0 : e.onError;
1901
+ B(this, "_handleTerminate"), B(this, "_handleError"), B(this, "_task"), B(this, "id", Jr += 1), B(this, "idle", !0), B(this, "worker"), B(this, "thread"), this._handleTerminate = e == null ? void 0 : e.onTerminate, this._handleError = e == null ? void 0 : e.onError;
1918
1902
  }
1919
1903
  _handleMessages(e) {
1920
1904
  var t;
1921
- e instanceof MessageEvent && ((t = e.data) == null ? void 0 : t.token) === Qr && this.terminate();
1905
+ e instanceof MessageEvent && ((t = e.data) == null ? void 0 : t.token) === Yr && this.terminate();
1922
1906
  }
1923
1907
  async run(e) {
1924
1908
  var t;
1925
1909
  try {
1926
1910
  const { payload: n, options: r } = e;
1927
- return this.idle = !1, this.worker = new $r(n.path, {
1911
+ return this.idle = !1, this.worker = new Kr(n.path, {
1928
1912
  type: "module",
1929
1913
  ...r == null ? void 0 : r.worker
1930
- }), this.thread = await Wr(this.worker, {
1914
+ }), this.thread = await zr(this.worker, {
1931
1915
  timeout: 1e4,
1932
1916
  ...r == null ? void 0 : r.spawn
1933
1917
  }), this._task = e, this.worker.postMessage(n.subject, n.transferSubject), this.worker.addEventListener("message", this._handleMessages.bind(this)), this;
@@ -1944,10 +1928,10 @@ class Jr {
1944
1928
  (e = this.worker) == null || e.removeEventListener(
1945
1929
  "message",
1946
1930
  this._handleMessages.bind(this)
1947
- ), this.thread && await zr.terminate(this.thread), await ((t = this.worker) == null ? void 0 : t.terminate()), this.worker = void 0, this.thread = void 0, this._task = void 0, this.idle = !0, (n = this._handleTerminate) == null || n.call(this);
1931
+ ), this.thread && await $r.terminate(this.thread), await ((t = this.worker) == null ? void 0 : t.terminate()), this.worker = void 0, this.thread = void 0, this._task = void 0, this.idle = !0, (n = this._handleTerminate) == null || n.call(this);
1948
1932
  }
1949
1933
  }
1950
- class Zr {
1934
+ class es {
1951
1935
  constructor(e, t, n) {
1952
1936
  B(this, "_workerThreads", []), B(this, "_tasksQueue", []), this.maxWorkersCount = e, this.debugMode = t, this.onWorkerThreadRun = n;
1953
1937
  for (let r = 0; r < this.maxWorkersCount; r++)
@@ -1960,7 +1944,7 @@ class Zr {
1960
1944
  console.error(`Error from worker #${t.id}:`, e), this.runNext();
1961
1945
  }
1962
1946
  _createWorkerThread() {
1963
- const e = new Jr({
1947
+ const e = new Zr({
1964
1948
  onTerminate: () => this._handleWorkerThreadTerminate(e),
1965
1949
  onError: (t) => this._handleWorkerThreadError(t, e)
1966
1950
  });
@@ -2024,23 +2008,21 @@ class Zr {
2024
2008
  this._tasksQueue = [], await Promise.all(this._workerThreads.map((e) => e.terminate()));
2025
2009
  }
2026
2010
  }
2027
- const es = (s, e) => new Zr(Xr(), !!e);
2028
- var ts = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, rs = (s, e, t, n) => {
2029
- for (var r = n > 1 ? void 0 : n ? ns(e, t) : e, i = s.length - 1, o; i >= 0; i--)
2011
+ const ts = (s, e) => new es(Qr(), !!e);
2012
+ var ns = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, ss = (s, e, t, n) => {
2013
+ for (var r = n > 1 ? void 0 : n ? rs(e, t) : e, i = s.length - 1, o; i >= 0; i--)
2030
2014
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
2031
- return n && r && ts(e, t, r), r;
2032
- }, ss = (s, e) => (t, n) => e(t, n, s);
2033
- let Ce = class {
2015
+ return n && r && ns(e, t, r), r;
2016
+ }, is = (s, e) => (t, n) => e(t, n, s);
2017
+ let Re = class {
2034
2018
  constructor(s) {
2035
- x(this, "workerPool");
2036
- x(this, "canvas");
2037
- x(this, "offscreenCanvas");
2038
- x(this, "worker");
2039
- x(this, "thread");
2040
- this._props = s, this.workerPool = es(void 0, this._props.enableDebug);
2041
- }
2042
- init(s) {
2043
- this.worker = s.worker, this.thread = s.thread;
2019
+ M(this, "workerPool");
2020
+ M(this, "canvas");
2021
+ M(this, "canvasWrapper");
2022
+ M(this, "offscreenCanvas");
2023
+ M(this, "workerThread");
2024
+ var e;
2025
+ this._props = s, this.workerPool = ts(void 0, !!((e = this._props.debug) != null && e.enabled));
2044
2026
  }
2045
2027
  preventDefaultHandler(s) {
2046
2028
  return s.preventDefault(), {
@@ -2048,10 +2030,12 @@ let Ce = class {
2048
2030
  };
2049
2031
  }
2050
2032
  getScreenSizes() {
2051
- var s, e;
2033
+ var s, e, t, n;
2052
2034
  return {
2053
2035
  width: (s = this.canvas) == null ? void 0 : s.width,
2054
2036
  height: (e = this.canvas) == null ? void 0 : e.height,
2037
+ wrapperWidth: ((t = this.canvasWrapper) == null ? void 0 : t.clientWidth) ?? 0,
2038
+ wrapperHeight: ((n = this.canvasWrapper) == null ? void 0 : n.clientHeight) ?? 0,
2055
2039
  windowWidth: (window == null ? void 0 : window.innerWidth) ?? 0,
2056
2040
  windowHeight: (window == null ? void 0 : window.innerHeight) ?? 0
2057
2041
  };
@@ -2069,7 +2053,7 @@ let Ce = class {
2069
2053
  mouseEventHandler(s) {
2070
2054
  return {
2071
2055
  ...this.getScreenSizes(),
2072
- ...fe(s, [
2056
+ ...pe(s, [
2073
2057
  "ctrlKey",
2074
2058
  "metaKey",
2075
2059
  "shiftKey",
@@ -2096,65 +2080,64 @@ let Ce = class {
2096
2080
  wheelEventHandler(s) {
2097
2081
  return s.preventDefault(), {
2098
2082
  ...this.getScreenSizes(),
2099
- ...fe(s, ["deltaX", "deltaY"])
2083
+ ...pe(s, ["deltaX", "deltaY"])
2100
2084
  };
2101
2085
  }
2102
2086
  keyEventHandler(s) {
2103
2087
  if (Tn.includes(s.code))
2104
2088
  return s.preventDefault(), {
2105
2089
  ...this.getScreenSizes(),
2106
- ...fe(s, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
2090
+ ...pe(s, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
2107
2091
  };
2108
2092
  }
2109
2093
  };
2110
- Ce = rs([
2111
- re(se.ContainerScoped),
2112
- ss(0, O(xe))
2113
- ], Ce);
2114
- var is = Object.defineProperty, os = Object.getOwnPropertyDescriptor, as = (s, e, t, n) => {
2115
- for (var r = n > 1 ? void 0 : n ? os(e, t) : e, i = s.length - 1, o; i >= 0; i--)
2094
+ Re = ss([
2095
+ ie(oe.ContainerScoped),
2096
+ is(0, O(xe))
2097
+ ], Re);
2098
+ var os = Object.defineProperty, as = Object.getOwnPropertyDescriptor, cs = (s, e, t, n) => {
2099
+ for (var r = n > 1 ? void 0 : n ? as(e, t) : e, i = s.length - 1, o; i >= 0; i--)
2116
2100
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
2117
- return n && r && is(e, t, r), r;
2118
- }, cs = (s, e) => (t, n) => e(t, n, s);
2119
- let Ze = class extends wn {
2101
+ return n && r && os(e, t, r), r;
2102
+ }, us = (s, e) => (t, n) => e(t, n, s);
2103
+ let Je = class extends wn {
2120
2104
  constructor(s) {
2121
2105
  super(), this._service = s;
2122
2106
  }
2123
2107
  init() {
2124
2108
  let s;
2125
2109
  try {
2126
- s = Dt.resolve("MAIN_THREAD_APP");
2110
+ s = Ft.resolve("MAIN_THREAD_APP");
2127
2111
  } catch {
2128
2112
  s = void 0;
2129
2113
  }
2130
- for (const e of jt) {
2114
+ for (const e of Dt) {
2131
2115
  const t = e.startsWith("mouse") || e.startsWith("pointer") || e.startsWith("touch") ? this._service.mouseEventHandler.bind(this._service) : e.startsWith("key") ? this._service.keyEventHandler.bind(this._service) : e === "resize" ? this._service.uiEventHandler.bind(this._service) : e === "wheel" ? this._service.wheelEventHandler.bind(this._service) : this._service.preventDefaultHandler.bind(this._service);
2132
2116
  this[`${e}$$`] = new Ht(), vn(
2133
2117
  e === "resize" ? window : this._service.canvas,
2134
2118
  e
2135
2119
  ).pipe(
2136
- // @ts-ignore
2137
- ye(t.bind(this)),
2138
- Ut((n) => !(e === "keydown" && !n))
2120
+ ye((n) => t.bind(this)(n)),
2121
+ jt((n) => !(e === "keydown" && !n))
2139
2122
  ).subscribe((n) => {
2140
2123
  this[`${e}$$`].next(
2141
2124
  n
2142
2125
  );
2143
2126
  }), this[`${e}$`] = this[`${e}$$`].asObservable(), this[`${e}$`].subscribe((n) => {
2144
- var r, i, o;
2145
- (i = (r = this._service.thread) == null ? void 0 : r[e]) == null || i.call(r, n), (o = s == null ? void 0 : s[e]) == null || o.call(s, n);
2127
+ var r, i, o, c;
2128
+ (o = (i = (r = this._service.workerThread) == null ? void 0 : r.thread) == null ? void 0 : i[e]) == null || o.call(i, n), (c = s == null ? void 0 : s[e]) == null || c.call(s, n);
2146
2129
  });
2147
2130
  }
2148
2131
  }
2149
2132
  };
2150
- Ze = as([
2151
- re(se.ContainerScoped),
2152
- cs(0, O(Ce))
2153
- ], Ze);
2133
+ Je = cs([
2134
+ ie(oe.ContainerScoped),
2135
+ us(0, O(Re))
2136
+ ], Je);
2154
2137
  function Mt(s, e) {
2155
- if (e === xn)
2138
+ if (e === Mn)
2156
2139
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), s;
2157
- if (e === qe || e === Gt) {
2140
+ if (e === Ke || e === Wt) {
2158
2141
  let t = s.getIndex();
2159
2142
  if (t === null) {
2160
2143
  const o = [], c = s.getAttribute("position");
@@ -2166,7 +2149,7 @@ function Mt(s, e) {
2166
2149
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), s;
2167
2150
  }
2168
2151
  const n = t.count - 2, r = [];
2169
- if (e === qe)
2152
+ if (e === Ke)
2170
2153
  for (let o = 1; o <= n; o++)
2171
2154
  r.push(t.getX(0)), r.push(t.getX(o)), r.push(t.getX(o + 1));
2172
2155
  else
@@ -2179,7 +2162,7 @@ function Mt(s, e) {
2179
2162
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), s;
2180
2163
  }
2181
2164
  const Be = /* @__PURE__ */ new WeakMap();
2182
- class un extends Wt {
2165
+ class un extends Gt {
2183
2166
  /**
2184
2167
  * Constructs a new Draco loader.
2185
2168
  *
@@ -2250,7 +2233,7 @@ class un extends Wt {
2250
2233
  */
2251
2234
  parse(e, t, n = () => {
2252
2235
  }) {
2253
- this.decodeDracoFile(e, t, null, null, W, n).catch(n);
2236
+ this.decodeDracoFile(e, t, null, null, G, n).catch(n);
2254
2237
  }
2255
2238
  //
2256
2239
  decodeDracoFile(e, t, n, r, i = F, o = () => {
@@ -2287,12 +2270,12 @@ class un extends Wt {
2287
2270
  }
2288
2271
  _createGeometry(e) {
2289
2272
  const t = new zt();
2290
- e.index && t.setIndex(new he(e.index.array, 1));
2273
+ e.index && t.setIndex(new me(e.index.array, 1));
2291
2274
  for (let n = 0; n < e.attributes.length; n++) {
2292
2275
  const { name: r, array: i, itemSize: o, stride: c, vertexColorSpace: a } = e.attributes[n];
2293
2276
  let d;
2294
2277
  if (o === c)
2295
- d = new he(i, o);
2278
+ d = new me(i, o);
2296
2279
  else {
2297
2280
  const u = new $t(i, c);
2298
2281
  d = new Kt(u, o, 0);
@@ -2302,10 +2285,10 @@ class un extends Wt {
2302
2285
  return t;
2303
2286
  }
2304
2287
  _assignVertexColorSpace(e, t) {
2305
- if (t !== W) return;
2288
+ if (t !== G) return;
2306
2289
  const n = new z();
2307
2290
  for (let r = 0, i = e.count; r < i; r++)
2308
- n.fromBufferAttribute(e, r), Ve.colorSpaceToWorking(n, W), e.setXYZ(r, n.r, n.g, n.b);
2291
+ n.fromBufferAttribute(e, r), qe.colorSpaceToWorking(n, G), e.setXYZ(r, n.r, n.g, n.b);
2309
2292
  }
2310
2293
  _loadLibrary(e, t) {
2311
2294
  const n = new we(this.manager);
@@ -2322,7 +2305,7 @@ class un extends Wt {
2322
2305
  return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(t).then((n) => {
2323
2306
  const r = n[0];
2324
2307
  e || (this.decoderConfig.wasmBinary = n[1]);
2325
- const i = us.toString(), o = [
2308
+ const i = ls.toString(), o = [
2326
2309
  "/* draco decoder */",
2327
2310
  r,
2328
2311
  "",
@@ -2370,7 +2353,7 @@ class un extends Wt {
2370
2353
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
2371
2354
  }
2372
2355
  }
2373
- function us() {
2356
+ function ls() {
2374
2357
  let s, e;
2375
2358
  onmessage = function(o) {
2376
2359
  const c = o.data;
@@ -2385,14 +2368,14 @@ function us() {
2385
2368
  case "decode":
2386
2369
  const a = c.buffer, d = c.taskConfig;
2387
2370
  e.then((u) => {
2388
- const l = u.draco, f = new l.Decoder();
2371
+ const l = u.draco, h = new l.Decoder();
2389
2372
  try {
2390
- const h = t(l, f, new Int8Array(a), d), w = h.attributes.map((E) => E.array.buffer);
2391
- h.index && w.push(h.index.array.buffer), self.postMessage({ type: "decode", id: c.id, geometry: h }, w);
2392
- } catch (h) {
2393
- console.error(h), self.postMessage({ type: "error", id: c.id, error: h.message });
2373
+ const f = t(l, h, new Int8Array(a), d), w = f.attributes.map((E) => E.array.buffer);
2374
+ f.index && w.push(f.index.array.buffer), self.postMessage({ type: "decode", id: c.id, geometry: f }, w);
2375
+ } catch (f) {
2376
+ console.error(f), self.postMessage({ type: "error", id: c.id, error: f.message });
2394
2377
  } finally {
2395
- l.destroy(f);
2378
+ l.destroy(h);
2396
2379
  }
2397
2380
  });
2398
2381
  break;
@@ -2400,39 +2383,39 @@ function us() {
2400
2383
  };
2401
2384
  function t(o, c, a, d) {
2402
2385
  const u = d.attributeIDs, l = d.attributeTypes;
2403
- let f, h;
2386
+ let h, f;
2404
2387
  const w = c.GetEncodedGeometryType(a);
2405
2388
  if (w === o.TRIANGULAR_MESH)
2406
- f = new o.Mesh(), h = c.DecodeArrayToMesh(a, a.byteLength, f);
2389
+ h = new o.Mesh(), f = c.DecodeArrayToMesh(a, a.byteLength, h);
2407
2390
  else if (w === o.POINT_CLOUD)
2408
- f = new o.PointCloud(), h = c.DecodeArrayToPointCloud(a, a.byteLength, f);
2391
+ h = new o.PointCloud(), f = c.DecodeArrayToPointCloud(a, a.byteLength, h);
2409
2392
  else
2410
2393
  throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
2411
- if (!h.ok() || f.ptr === 0)
2412
- throw new Error("THREE.DRACOLoader: Decoding failed: " + h.error_msg());
2394
+ if (!f.ok() || h.ptr === 0)
2395
+ throw new Error("THREE.DRACOLoader: Decoding failed: " + f.error_msg());
2413
2396
  const E = { index: null, attributes: [] };
2414
2397
  for (const T in u) {
2415
2398
  const p = self[l[T]];
2416
2399
  let g, m;
2417
2400
  if (d.useUniqueIDs)
2418
- m = u[T], g = c.GetAttributeByUniqueId(f, m);
2401
+ m = u[T], g = c.GetAttributeByUniqueId(h, m);
2419
2402
  else {
2420
- if (m = c.GetAttributeId(f, o[u[T]]), m === -1) continue;
2421
- g = c.GetAttribute(f, m);
2403
+ if (m = c.GetAttributeId(h, o[u[T]]), m === -1) continue;
2404
+ g = c.GetAttribute(h, m);
2422
2405
  }
2423
- const b = r(o, c, f, T, p, g);
2406
+ const b = r(o, c, h, T, p, g);
2424
2407
  T === "color" && (b.vertexColorSpace = d.vertexColorSpace), E.attributes.push(b);
2425
2408
  }
2426
- return w === o.TRIANGULAR_MESH && (E.index = n(o, c, f)), o.destroy(f), E;
2409
+ return w === o.TRIANGULAR_MESH && (E.index = n(o, c, h)), o.destroy(h), E;
2427
2410
  }
2428
2411
  function n(o, c, a) {
2429
- const u = a.num_faces() * 3, l = u * 4, f = o._malloc(l);
2430
- c.GetTrianglesUInt32Array(a, l, f);
2431
- const h = new Uint32Array(o.HEAPF32.buffer, f, u).slice();
2432
- return o._free(f), { array: h, itemSize: 1 };
2412
+ const u = a.num_faces() * 3, l = u * 4, h = o._malloc(l);
2413
+ c.GetTrianglesUInt32Array(a, l, h);
2414
+ const f = new Uint32Array(o.HEAPF32.buffer, h, u).slice();
2415
+ return o._free(h), { array: f, itemSize: 1 };
2433
2416
  }
2434
2417
  function r(o, c, a, d, u, l) {
2435
- const f = a.num_points(), h = l.num_components(), w = i(o, u), E = h * u.BYTES_PER_ELEMENT, T = Math.ceil(E / 4) * 4, p = T / u.BYTES_PER_ELEMENT, g = f * E, m = f * T, b = o._malloc(g);
2418
+ const h = a.num_points(), f = l.num_components(), w = i(o, u), E = f * u.BYTES_PER_ELEMENT, T = Math.ceil(E / 4) * 4, p = T / u.BYTES_PER_ELEMENT, g = h * E, m = h * T, b = o._malloc(g);
2436
2419
  c.GetAttributeDataArrayForAllPoints(a, l, w, g, b);
2437
2420
  const _ = new u(o.HEAPF32.buffer, b, g / u.BYTES_PER_ELEMENT);
2438
2421
  let y;
@@ -2441,16 +2424,16 @@ function us() {
2441
2424
  else {
2442
2425
  y = new u(m / u.BYTES_PER_ELEMENT);
2443
2426
  let v = 0;
2444
- for (let C = 0, R = _.length; C < R; C++) {
2445
- for (let k = 0; k < h; k++)
2446
- y[v + k] = _[C * h + k];
2427
+ for (let R = 0, C = _.length; R < C; R++) {
2428
+ for (let x = 0; x < f; x++)
2429
+ y[v + x] = _[R * f + x];
2447
2430
  v += p;
2448
2431
  }
2449
2432
  }
2450
2433
  return o._free(b), {
2451
2434
  name: d,
2452
- count: f,
2453
- itemSize: h,
2435
+ count: h,
2436
+ itemSize: f,
2454
2437
  array: y,
2455
2438
  stride: p
2456
2439
  };
@@ -2474,7 +2457,7 @@ function us() {
2474
2457
  }
2475
2458
  }
2476
2459
  }
2477
- function ls(s) {
2460
+ function ds(s) {
2478
2461
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = s.clone();
2479
2462
  return ln(s, n, function(r, i) {
2480
2463
  e.set(i, r), t.set(r, i);
@@ -2491,7 +2474,7 @@ function ln(s, e, t) {
2491
2474
  for (let n = 0; n < s.children.length; n++)
2492
2475
  ln(s.children[n], e.children[n], t);
2493
2476
  }
2494
- class ds extends Wt {
2477
+ class hs extends Gt {
2495
2478
  /**
2496
2479
  * Constructs a new glTF loader.
2497
2480
  *
@@ -2499,41 +2482,41 @@ class ds extends Wt {
2499
2482
  */
2500
2483
  constructor(e) {
2501
2484
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
2502
- return new gs(t);
2503
- }), this.register(function(t) {
2504
2485
  return new _s(t);
2505
2486
  }), this.register(function(t) {
2506
- return new Ss(t);
2487
+ return new bs(t);
2507
2488
  }), this.register(function(t) {
2508
2489
  return new xs(t);
2509
2490
  }), this.register(function(t) {
2510
- return new ks(t);
2491
+ return new Ms(t);
2511
2492
  }), this.register(function(t) {
2512
- return new ys(t);
2493
+ return new ks(t);
2513
2494
  }), this.register(function(t) {
2514
2495
  return new Ts(t);
2515
2496
  }), this.register(function(t) {
2516
2497
  return new ws(t);
2517
2498
  }), this.register(function(t) {
2518
2499
  return new vs(t);
2519
- }), this.register(function(t) {
2520
- return new ms(t);
2521
2500
  }), this.register(function(t) {
2522
2501
  return new Es(t);
2523
2502
  }), this.register(function(t) {
2524
- return new bs(t);
2503
+ return new gs(t);
2525
2504
  }), this.register(function(t) {
2526
2505
  return new Rs(t);
2506
+ }), this.register(function(t) {
2507
+ return new ys(t);
2508
+ }), this.register(function(t) {
2509
+ return new Ss(t);
2527
2510
  }), this.register(function(t) {
2528
2511
  return new Cs(t);
2529
2512
  }), this.register(function(t) {
2530
- return new hs(t);
2513
+ return new ps(t);
2531
2514
  }), this.register(function(t) {
2532
- return new At(t, S.EXT_MESHOPT_COMPRESSION);
2515
+ return new kt(t, S.EXT_MESHOPT_COMPRESSION);
2533
2516
  }), this.register(function(t) {
2534
- return new At(t, S.KHR_MESHOPT_COMPRESSION);
2517
+ return new kt(t, S.KHR_MESHOPT_COMPRESSION);
2535
2518
  }), this.register(function(t) {
2536
- return new Ms(t);
2519
+ return new Ls(t);
2537
2520
  });
2538
2521
  }
2539
2522
  /**
@@ -2551,10 +2534,10 @@ class ds extends Wt {
2551
2534
  if (this.resourcePath !== "")
2552
2535
  o = this.resourcePath;
2553
2536
  else if (this.path !== "") {
2554
- const d = pe.extractUrlBase(e);
2555
- o = pe.resolveURL(d, this.path);
2537
+ const d = ge.extractUrlBase(e);
2538
+ o = ge.resolveURL(d, this.path);
2556
2539
  } else
2557
- o = pe.extractUrlBase(e);
2540
+ o = ge.extractUrlBase(e);
2558
2541
  this.manager.itemStart(e);
2559
2542
  const c = function(d) {
2560
2543
  r ? r(d) : console.error(d), i.manager.itemError(e), i.manager.itemEnd(e);
@@ -2649,7 +2632,7 @@ class ds extends Wt {
2649
2632
  r && r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
2650
2633
  return;
2651
2634
  }
2652
- const d = new Ws(i, {
2635
+ const d = new zs(i, {
2653
2636
  path: t || this.resourcePath || "",
2654
2637
  crossOrigin: this.crossOrigin,
2655
2638
  requestHeader: this.requestHeader,
@@ -2664,22 +2647,22 @@ class ds extends Wt {
2664
2647
  }
2665
2648
  if (i.extensionsUsed)
2666
2649
  for (let u = 0; u < i.extensionsUsed.length; ++u) {
2667
- const l = i.extensionsUsed[u], f = i.extensionsRequired || [];
2650
+ const l = i.extensionsUsed[u], h = i.extensionsRequired || [];
2668
2651
  switch (l) {
2669
2652
  case S.KHR_MATERIALS_UNLIT:
2670
- o[l] = new ps();
2653
+ o[l] = new ms();
2671
2654
  break;
2672
2655
  case S.KHR_DRACO_MESH_COMPRESSION:
2673
- o[l] = new Ls(i, this.dracoLoader);
2656
+ o[l] = new Ps(i, this.dracoLoader);
2674
2657
  break;
2675
2658
  case S.KHR_TEXTURE_TRANSFORM:
2676
- o[l] = new Ps();
2659
+ o[l] = new Os();
2677
2660
  break;
2678
2661
  case S.KHR_MESH_QUANTIZATION:
2679
- o[l] = new Os();
2662
+ o[l] = new Is();
2680
2663
  break;
2681
2664
  default:
2682
- f.indexOf(l) >= 0 && c[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
2665
+ h.indexOf(l) >= 0 && c[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
2683
2666
  }
2684
2667
  }
2685
2668
  d.setExtensions(o), d.setPlugins(c), d.parse(n, r);
@@ -2716,7 +2699,7 @@ function fs() {
2716
2699
  }
2717
2700
  };
2718
2701
  }
2719
- function A(s, e, t) {
2702
+ function L(s, e, t) {
2720
2703
  const n = s.json.materials[e];
2721
2704
  return n.extensions && n.extensions[t] ? n.extensions[t] : null;
2722
2705
  }
@@ -2745,7 +2728,7 @@ const S = {
2745
2728
  KHR_MESHOPT_COMPRESSION: "KHR_meshopt_compression",
2746
2729
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
2747
2730
  };
2748
- class hs {
2731
+ class ps {
2749
2732
  constructor(e) {
2750
2733
  this.parser = e, this.name = S.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
2751
2734
  }
@@ -2770,7 +2753,7 @@ class hs {
2770
2753
  d = new An(u), d.target.position.set(0, 0, -1), d.add(d.target);
2771
2754
  break;
2772
2755
  case "point":
2773
- d = new Mn(u), d.distance = l;
2756
+ d = new Ln(u), d.distance = l;
2774
2757
  break;
2775
2758
  case "spot":
2776
2759
  d = new kn(u), d.distance = l, a.spot = a.spot || {}, a.spot.innerConeAngle = a.spot.innerConeAngle !== void 0 ? a.spot.innerConeAngle : 0, a.spot.outerConeAngle = a.spot.outerConeAngle !== void 0 ? a.spot.outerConeAngle : Math.PI / 4, d.angle = a.spot.outerConeAngle, d.penumbra = 1 - a.spot.innerConeAngle / a.spot.outerConeAngle, d.target.position.set(0, 0, -1), d.add(d.target);
@@ -2791,12 +2774,12 @@ class hs {
2791
2774
  });
2792
2775
  }
2793
2776
  }
2794
- class ps {
2777
+ class ms {
2795
2778
  constructor() {
2796
2779
  this.name = S.KHR_MATERIALS_UNLIT;
2797
2780
  }
2798
2781
  getMaterialType() {
2799
- return de;
2782
+ return fe;
2800
2783
  }
2801
2784
  extendParams(e, t, n) {
2802
2785
  const r = [];
@@ -2807,29 +2790,29 @@ class ps {
2807
2790
  const o = i.baseColorFactor;
2808
2791
  e.color.setRGB(o[0], o[1], o[2], F), e.opacity = o[3];
2809
2792
  }
2810
- i.baseColorTexture !== void 0 && r.push(n.assignTexture(e, "map", i.baseColorTexture, W));
2793
+ i.baseColorTexture !== void 0 && r.push(n.assignTexture(e, "map", i.baseColorTexture, G));
2811
2794
  }
2812
2795
  return Promise.all(r);
2813
2796
  }
2814
2797
  }
2815
- class ms {
2798
+ class gs {
2816
2799
  constructor(e) {
2817
2800
  this.parser = e, this.name = S.KHR_MATERIALS_EMISSIVE_STRENGTH;
2818
2801
  }
2819
2802
  extendMaterialParams(e, t) {
2820
- const n = A(this.parser, e, this.name);
2803
+ const n = L(this.parser, e, this.name);
2821
2804
  return n === null || n.emissiveStrength !== void 0 && (t.emissiveIntensity = n.emissiveStrength), Promise.resolve();
2822
2805
  }
2823
2806
  }
2824
- class gs {
2807
+ class _s {
2825
2808
  constructor(e) {
2826
2809
  this.parser = e, this.name = S.KHR_MATERIALS_CLEARCOAT;
2827
2810
  }
2828
2811
  getMaterialType(e) {
2829
- return A(this.parser, e, this.name) !== null ? D : null;
2812
+ return L(this.parser, e, this.name) !== null ? D : null;
2830
2813
  }
2831
2814
  extendMaterialParams(e, t) {
2832
- const n = A(this.parser, e, this.name);
2815
+ const n = L(this.parser, e, this.name);
2833
2816
  if (n === null) return Promise.resolve();
2834
2817
  const r = [];
2835
2818
  if (n.clearcoatFactor !== void 0 && (t.clearcoat = n.clearcoatFactor), n.clearcoatTexture !== void 0 && r.push(this.parser.assignTexture(t, "clearcoatMap", n.clearcoatTexture)), n.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = n.clearcoatRoughnessFactor), n.clearcoatRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "clearcoatRoughnessMap", n.clearcoatRoughnessTexture)), n.clearcoatNormalTexture !== void 0 && (r.push(this.parser.assignTexture(t, "clearcoatNormalMap", n.clearcoatNormalTexture)), n.clearcoatNormalTexture.scale !== void 0)) {
@@ -2839,73 +2822,73 @@ class gs {
2839
2822
  return Promise.all(r);
2840
2823
  }
2841
2824
  }
2842
- class _s {
2825
+ class bs {
2843
2826
  constructor(e) {
2844
2827
  this.parser = e, this.name = S.KHR_MATERIALS_DISPERSION;
2845
2828
  }
2846
2829
  getMaterialType(e) {
2847
- return A(this.parser, e, this.name) !== null ? D : null;
2830
+ return L(this.parser, e, this.name) !== null ? D : null;
2848
2831
  }
2849
2832
  extendMaterialParams(e, t) {
2850
- const n = A(this.parser, e, this.name);
2833
+ const n = L(this.parser, e, this.name);
2851
2834
  return n === null || (t.dispersion = n.dispersion !== void 0 ? n.dispersion : 0), Promise.resolve();
2852
2835
  }
2853
2836
  }
2854
- class bs {
2837
+ class ys {
2855
2838
  constructor(e) {
2856
2839
  this.parser = e, this.name = S.KHR_MATERIALS_IRIDESCENCE;
2857
2840
  }
2858
2841
  getMaterialType(e) {
2859
- return A(this.parser, e, this.name) !== null ? D : null;
2842
+ return L(this.parser, e, this.name) !== null ? D : null;
2860
2843
  }
2861
2844
  extendMaterialParams(e, t) {
2862
- const n = A(this.parser, e, this.name);
2845
+ const n = L(this.parser, e, this.name);
2863
2846
  if (n === null) return Promise.resolve();
2864
2847
  const r = [];
2865
2848
  return n.iridescenceFactor !== void 0 && (t.iridescence = n.iridescenceFactor), n.iridescenceTexture !== void 0 && r.push(this.parser.assignTexture(t, "iridescenceMap", n.iridescenceTexture)), n.iridescenceIor !== void 0 && (t.iridescenceIOR = n.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), n.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = n.iridescenceThicknessMinimum), n.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = n.iridescenceThicknessMaximum), n.iridescenceThicknessTexture !== void 0 && r.push(this.parser.assignTexture(t, "iridescenceThicknessMap", n.iridescenceThicknessTexture)), Promise.all(r);
2866
2849
  }
2867
2850
  }
2868
- class ys {
2851
+ class Ts {
2869
2852
  constructor(e) {
2870
2853
  this.parser = e, this.name = S.KHR_MATERIALS_SHEEN;
2871
2854
  }
2872
2855
  getMaterialType(e) {
2873
- return A(this.parser, e, this.name) !== null ? D : null;
2856
+ return L(this.parser, e, this.name) !== null ? D : null;
2874
2857
  }
2875
2858
  extendMaterialParams(e, t) {
2876
- const n = A(this.parser, e, this.name);
2859
+ const n = L(this.parser, e, this.name);
2877
2860
  if (n === null) return Promise.resolve();
2878
2861
  const r = [];
2879
2862
  if (t.sheenColor = new z(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, n.sheenColorFactor !== void 0) {
2880
2863
  const i = n.sheenColorFactor;
2881
2864
  t.sheenColor.setRGB(i[0], i[1], i[2], F);
2882
2865
  }
2883
- return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, W)), n.sheenRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(r);
2866
+ return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, G)), n.sheenRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(r);
2884
2867
  }
2885
2868
  }
2886
- class Ts {
2869
+ class ws {
2887
2870
  constructor(e) {
2888
2871
  this.parser = e, this.name = S.KHR_MATERIALS_TRANSMISSION;
2889
2872
  }
2890
2873
  getMaterialType(e) {
2891
- return A(this.parser, e, this.name) !== null ? D : null;
2874
+ return L(this.parser, e, this.name) !== null ? D : null;
2892
2875
  }
2893
2876
  extendMaterialParams(e, t) {
2894
- const n = A(this.parser, e, this.name);
2877
+ const n = L(this.parser, e, this.name);
2895
2878
  if (n === null) return Promise.resolve();
2896
2879
  const r = [];
2897
2880
  return n.transmissionFactor !== void 0 && (t.transmission = n.transmissionFactor), n.transmissionTexture !== void 0 && r.push(this.parser.assignTexture(t, "transmissionMap", n.transmissionTexture)), Promise.all(r);
2898
2881
  }
2899
2882
  }
2900
- class ws {
2883
+ class vs {
2901
2884
  constructor(e) {
2902
2885
  this.parser = e, this.name = S.KHR_MATERIALS_VOLUME;
2903
2886
  }
2904
2887
  getMaterialType(e) {
2905
- return A(this.parser, e, this.name) !== null ? D : null;
2888
+ return L(this.parser, e, this.name) !== null ? D : null;
2906
2889
  }
2907
2890
  extendMaterialParams(e, t) {
2908
- const n = A(this.parser, e, this.name);
2891
+ const n = L(this.parser, e, this.name);
2909
2892
  if (n === null) return Promise.resolve();
2910
2893
  const r = [];
2911
2894
  t.thickness = n.thicknessFactor !== void 0 ? n.thicknessFactor : 0, n.thicknessTexture !== void 0 && r.push(this.parser.assignTexture(t, "thicknessMap", n.thicknessTexture)), t.attenuationDistance = n.attenuationDistance || 1 / 0;
@@ -2913,32 +2896,32 @@ class ws {
2913
2896
  return t.attenuationColor = new z().setRGB(i[0], i[1], i[2], F), Promise.all(r);
2914
2897
  }
2915
2898
  }
2916
- class vs {
2899
+ class Es {
2917
2900
  constructor(e) {
2918
2901
  this.parser = e, this.name = S.KHR_MATERIALS_IOR;
2919
2902
  }
2920
2903
  getMaterialType(e) {
2921
- return A(this.parser, e, this.name) !== null ? D : null;
2904
+ return L(this.parser, e, this.name) !== null ? D : null;
2922
2905
  }
2923
2906
  extendMaterialParams(e, t) {
2924
- const n = A(this.parser, e, this.name);
2907
+ const n = L(this.parser, e, this.name);
2925
2908
  return n === null || (t.ior = n.ior !== void 0 ? n.ior : 1.5), Promise.resolve();
2926
2909
  }
2927
2910
  }
2928
- class Es {
2911
+ class Rs {
2929
2912
  constructor(e) {
2930
2913
  this.parser = e, this.name = S.KHR_MATERIALS_SPECULAR;
2931
2914
  }
2932
2915
  getMaterialType(e) {
2933
- return A(this.parser, e, this.name) !== null ? D : null;
2916
+ return L(this.parser, e, this.name) !== null ? D : null;
2934
2917
  }
2935
2918
  extendMaterialParams(e, t) {
2936
- const n = A(this.parser, e, this.name);
2919
+ const n = L(this.parser, e, this.name);
2937
2920
  if (n === null) return Promise.resolve();
2938
2921
  const r = [];
2939
2922
  t.specularIntensity = n.specularFactor !== void 0 ? n.specularFactor : 1, n.specularTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularIntensityMap", n.specularTexture));
2940
2923
  const i = n.specularColorFactor || [1, 1, 1];
2941
- return t.specularColor = new z().setRGB(i[0], i[1], i[2], F), n.specularColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, W)), Promise.all(r);
2924
+ return t.specularColor = new z().setRGB(i[0], i[1], i[2], F), n.specularColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, G)), Promise.all(r);
2942
2925
  }
2943
2926
  }
2944
2927
  class Cs {
@@ -2946,30 +2929,30 @@ class Cs {
2946
2929
  this.parser = e, this.name = S.EXT_MATERIALS_BUMP;
2947
2930
  }
2948
2931
  getMaterialType(e) {
2949
- return A(this.parser, e, this.name) !== null ? D : null;
2932
+ return L(this.parser, e, this.name) !== null ? D : null;
2950
2933
  }
2951
2934
  extendMaterialParams(e, t) {
2952
- const n = A(this.parser, e, this.name);
2935
+ const n = L(this.parser, e, this.name);
2953
2936
  if (n === null) return Promise.resolve();
2954
2937
  const r = [];
2955
2938
  return t.bumpScale = n.bumpFactor !== void 0 ? n.bumpFactor : 1, n.bumpTexture !== void 0 && r.push(this.parser.assignTexture(t, "bumpMap", n.bumpTexture)), Promise.all(r);
2956
2939
  }
2957
2940
  }
2958
- class Rs {
2941
+ class Ss {
2959
2942
  constructor(e) {
2960
2943
  this.parser = e, this.name = S.KHR_MATERIALS_ANISOTROPY;
2961
2944
  }
2962
2945
  getMaterialType(e) {
2963
- return A(this.parser, e, this.name) !== null ? D : null;
2946
+ return L(this.parser, e, this.name) !== null ? D : null;
2964
2947
  }
2965
2948
  extendMaterialParams(e, t) {
2966
- const n = A(this.parser, e, this.name);
2949
+ const n = L(this.parser, e, this.name);
2967
2950
  if (n === null) return Promise.resolve();
2968
2951
  const r = [];
2969
2952
  return n.anisotropyStrength !== void 0 && (t.anisotropy = n.anisotropyStrength), n.anisotropyRotation !== void 0 && (t.anisotropyRotation = n.anisotropyRotation), n.anisotropyTexture !== void 0 && r.push(this.parser.assignTexture(t, "anisotropyMap", n.anisotropyTexture)), Promise.all(r);
2970
2953
  }
2971
2954
  }
2972
- class Ss {
2955
+ class xs {
2973
2956
  constructor(e) {
2974
2957
  this.parser = e, this.name = S.KHR_TEXTURE_BASISU;
2975
2958
  }
@@ -2986,7 +2969,7 @@ class Ss {
2986
2969
  return t.loadTextureImage(e, i.source, o);
2987
2970
  }
2988
2971
  }
2989
- class xs {
2972
+ class Ms {
2990
2973
  constructor(e) {
2991
2974
  this.parser = e, this.name = S.EXT_TEXTURE_WEBP;
2992
2975
  }
@@ -3020,7 +3003,7 @@ class ks {
3020
3003
  return n.loadTextureImage(e, o.source, a);
3021
3004
  }
3022
3005
  }
3023
- class At {
3006
+ class kt {
3024
3007
  constructor(e, t) {
3025
3008
  this.name = t, this.parser = e;
3026
3009
  }
@@ -3034,19 +3017,19 @@ class At {
3034
3017
  return null;
3035
3018
  }
3036
3019
  return i.then(function(c) {
3037
- const a = r.byteOffset || 0, d = r.byteLength || 0, u = r.count, l = r.byteStride, f = new Uint8Array(c, a, d);
3038
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(u, l, f, r.mode, r.filter).then(function(h) {
3039
- return h.buffer;
3020
+ const a = r.byteOffset || 0, d = r.byteLength || 0, u = r.count, l = r.byteStride, h = new Uint8Array(c, a, d);
3021
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(u, l, h, r.mode, r.filter).then(function(f) {
3022
+ return f.buffer;
3040
3023
  }) : o.ready.then(function() {
3041
- const h = new ArrayBuffer(u * l);
3042
- return o.decodeGltfBuffer(new Uint8Array(h), u, l, f, r.mode, r.filter), h;
3024
+ const f = new ArrayBuffer(u * l);
3025
+ return o.decodeGltfBuffer(new Uint8Array(f), u, l, h, r.mode, r.filter), f;
3043
3026
  });
3044
3027
  });
3045
3028
  } else
3046
3029
  return null;
3047
3030
  }
3048
3031
  }
3049
- class Ms {
3032
+ class Ls {
3050
3033
  constructor(e) {
3051
3034
  this.name = S.EXT_MESH_GPU_INSTANCING, this.parser = e;
3052
3035
  }
@@ -3062,27 +3045,27 @@ class Ms {
3062
3045
  for (const d in o)
3063
3046
  c.push(this.parser.getDependency("accessor", o[d]).then((u) => (a[d] = u, a[d])));
3064
3047
  return c.length < 1 ? null : (c.push(this.parser.createNodeMesh(e)), Promise.all(c).then((d) => {
3065
- const u = d.pop(), l = u.isGroup ? u.children : [u], f = d[0].count, h = [];
3048
+ const u = d.pop(), l = u.isGroup ? u.children : [u], h = d[0].count, f = [];
3066
3049
  for (const w of l) {
3067
- const E = new ve(), T = new J(), p = new Vt(), g = new J(1, 1, 1), m = new Ln(w.geometry, w.material, f);
3068
- for (let b = 0; b < f; b++)
3050
+ const E = new ve(), T = new Z(), p = new Vt(), g = new Z(1, 1, 1), m = new Pn(w.geometry, w.material, h);
3051
+ for (let b = 0; b < h; b++)
3069
3052
  a.TRANSLATION && T.fromBufferAttribute(a.TRANSLATION, b), a.ROTATION && p.fromBufferAttribute(a.ROTATION, b), a.SCALE && g.fromBufferAttribute(a.SCALE, b), m.setMatrixAt(b, E.compose(T, p, g));
3070
3053
  for (const b in a)
3071
3054
  if (b === "_COLOR_0") {
3072
3055
  const _ = a[b];
3073
- m.instanceColor = new Pn(_.array, _.itemSize, _.normalized);
3056
+ m.instanceColor = new On(_.array, _.itemSize, _.normalized);
3074
3057
  } else b !== "TRANSLATION" && b !== "ROTATION" && b !== "SCALE" && w.geometry.setAttribute(b, a[b]);
3075
- Xt.prototype.copy.call(m, w), this.parser.assignFinalMaterial(m), h.push(m);
3058
+ Xt.prototype.copy.call(m, w), this.parser.assignFinalMaterial(m), f.push(m);
3076
3059
  }
3077
- return u.isGroup ? (u.clear(), u.add(...h), u) : h[0];
3060
+ return u.isGroup ? (u.clear(), u.add(...f), u) : f[0];
3078
3061
  }));
3079
3062
  }
3080
3063
  }
3081
- const dn = "glTF", le = 12, Lt = { JSON: 1313821514, BIN: 5130562 };
3064
+ const dn = "glTF", he = 12, Lt = { JSON: 1313821514, BIN: 5130562 };
3082
3065
  class As {
3083
3066
  constructor(e) {
3084
3067
  this.name = S.KHR_BINARY_GLTF, this.content = null, this.body = null;
3085
- const t = new DataView(e, 0, le), n = new TextDecoder();
3068
+ const t = new DataView(e, 0, he), n = new TextDecoder();
3086
3069
  if (this.header = {
3087
3070
  magic: n.decode(new Uint8Array(e.slice(0, 4))),
3088
3071
  version: t.getUint32(4, !0),
@@ -3091,17 +3074,17 @@ class As {
3091
3074
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
3092
3075
  if (this.header.version < 2)
3093
3076
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
3094
- const r = this.header.length - le, i = new DataView(e, le);
3077
+ const r = this.header.length - he, i = new DataView(e, he);
3095
3078
  let o = 0;
3096
3079
  for (; o < r; ) {
3097
3080
  const c = i.getUint32(o, !0);
3098
3081
  o += 4;
3099
3082
  const a = i.getUint32(o, !0);
3100
3083
  if (o += 4, a === Lt.JSON) {
3101
- const d = new Uint8Array(e, le + o, c);
3084
+ const d = new Uint8Array(e, he + o, c);
3102
3085
  this.content = n.decode(d);
3103
3086
  } else if (a === Lt.BIN) {
3104
- const d = le + o;
3087
+ const d = he + o;
3105
3088
  this.body = e.slice(d, d + c);
3106
3089
  }
3107
3090
  o += c;
@@ -3110,7 +3093,7 @@ class As {
3110
3093
  throw new Error("THREE.GLTFLoader: JSON content not found.");
3111
3094
  }
3112
3095
  }
3113
- class Ls {
3096
+ class Ps {
3114
3097
  constructor(e, t) {
3115
3098
  if (!t)
3116
3099
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
@@ -3119,30 +3102,30 @@ class Ls {
3119
3102
  decodePrimitive(e, t) {
3120
3103
  const n = this.json, r = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, c = {}, a = {}, d = {};
3121
3104
  for (const u in o) {
3122
- const l = et[u] || u.toLowerCase();
3105
+ const l = Ze[u] || u.toLowerCase();
3123
3106
  c[l] = o[u];
3124
3107
  }
3125
3108
  for (const u in e.attributes) {
3126
- const l = et[u] || u.toLowerCase();
3109
+ const l = Ze[u] || u.toLowerCase();
3127
3110
  if (o[u] !== void 0) {
3128
- const f = n.accessors[e.attributes[u]], h = te[f.componentType];
3129
- d[l] = h.name, a[l] = f.normalized === !0;
3111
+ const h = n.accessors[e.attributes[u]], f = re[h.componentType];
3112
+ d[l] = f.name, a[l] = h.normalized === !0;
3130
3113
  }
3131
3114
  }
3132
3115
  return t.getDependency("bufferView", i).then(function(u) {
3133
- return new Promise(function(l, f) {
3134
- r.decodeDracoFile(u, function(h) {
3135
- for (const w in h.attributes) {
3136
- const E = h.attributes[w], T = a[w];
3116
+ return new Promise(function(l, h) {
3117
+ r.decodeDracoFile(u, function(f) {
3118
+ for (const w in f.attributes) {
3119
+ const E = f.attributes[w], T = a[w];
3137
3120
  T !== void 0 && (E.normalized = T);
3138
3121
  }
3139
- l(h);
3140
- }, c, d, F, f);
3122
+ l(f);
3123
+ }, c, d, F, h);
3141
3124
  });
3142
3125
  });
3143
3126
  }
3144
3127
  }
3145
- class Ps {
3128
+ class Os {
3146
3129
  constructor() {
3147
3130
  this.name = S.KHR_TEXTURE_TRANSFORM;
3148
3131
  }
@@ -3150,12 +3133,12 @@ class Ps {
3150
3133
  return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 || (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0), e;
3151
3134
  }
3152
3135
  }
3153
- class Os {
3136
+ class Is {
3154
3137
  constructor() {
3155
3138
  this.name = S.KHR_MESH_QUANTIZATION;
3156
3139
  }
3157
3140
  }
3158
- class fn extends ir {
3141
+ class hn extends or {
3159
3142
  constructor(e, t, n, r) {
3160
3143
  super(e, t, n, r);
3161
3144
  }
@@ -3166,19 +3149,19 @@ class fn extends ir {
3166
3149
  return t;
3167
3150
  }
3168
3151
  interpolate_(e, t, n, r) {
3169
- const i = this.resultBuffer, o = this.sampleValues, c = this.valueSize, a = c * 2, d = c * 3, u = r - t, l = (n - t) / u, f = l * l, h = f * l, w = e * d, E = w - d, T = -2 * h + 3 * f, p = h - f, g = 1 - T, m = p - f + l;
3152
+ const i = this.resultBuffer, o = this.sampleValues, c = this.valueSize, a = c * 2, d = c * 3, u = r - t, l = (n - t) / u, h = l * l, f = h * l, w = e * d, E = w - d, T = -2 * f + 3 * h, p = f - h, g = 1 - T, m = p - h + l;
3170
3153
  for (let b = 0; b !== c; b++) {
3171
- const _ = o[E + b + c], y = o[E + b + a] * u, v = o[w + b + c], C = o[w + b] * u;
3172
- i[b] = g * _ + m * y + T * v + p * C;
3154
+ const _ = o[E + b + c], y = o[E + b + a] * u, v = o[w + b + c], R = o[w + b] * u;
3155
+ i[b] = g * _ + m * y + T * v + p * R;
3173
3156
  }
3174
3157
  return i;
3175
3158
  }
3176
3159
  }
3177
- const Is = new Vt();
3178
- class Ns extends fn {
3160
+ const Ns = new Vt();
3161
+ class Fs extends hn {
3179
3162
  interpolate_(e, t, n, r) {
3180
3163
  const i = super.interpolate_(e, t, n, r);
3181
- return Is.fromArray(i).normalize().toArray(i), i;
3164
+ return Ns.fromArray(i).normalize().toArray(i), i;
3182
3165
  }
3183
3166
  }
3184
3167
  const P = {
@@ -3201,25 +3184,25 @@ const P = {
3201
3184
  TRIANGLE_FAN: 6,
3202
3185
  UNSIGNED_BYTE: 5121,
3203
3186
  UNSIGNED_SHORT: 5123
3204
- }, te = {
3187
+ }, re = {
3205
3188
  5120: Int8Array,
3206
3189
  5121: Uint8Array,
3207
3190
  5122: Int16Array,
3208
3191
  5123: Uint16Array,
3209
3192
  5125: Uint32Array,
3210
3193
  5126: Float32Array
3211
- }, Pt = {
3194
+ }, At = {
3212
3195
  9728: Jt,
3213
- 9729: Xe,
3214
- 9984: Qn,
3215
- 9985: Yn,
3216
- 9986: Jn,
3196
+ 9729: Ve,
3197
+ 9984: Yn,
3198
+ 9985: Jn,
3199
+ 9986: Zn,
3217
3200
  9987: Yt
3218
- }, Ot = {
3219
- 33071: Zn,
3220
- 33648: er,
3221
- 10497: Qe
3222
- }, Ge = {
3201
+ }, Pt = {
3202
+ 33071: er,
3203
+ 33648: tr,
3204
+ 10497: Xe
3205
+ }, We = {
3223
3206
  SCALAR: 1,
3224
3207
  VEC2: 2,
3225
3208
  VEC3: 3,
@@ -3227,7 +3210,7 @@ const P = {
3227
3210
  MAT2: 4,
3228
3211
  MAT3: 9,
3229
3212
  MAT4: 16
3230
- }, et = {
3213
+ }, Ze = {
3231
3214
  POSITION: "position",
3232
3215
  NORMAL: "normal",
3233
3216
  TANGENT: "tangent",
@@ -3238,23 +3221,23 @@ const P = {
3238
3221
  COLOR_0: "color",
3239
3222
  WEIGHTS_0: "skinWeight",
3240
3223
  JOINTS_0: "skinIndex"
3241
- }, G = {
3224
+ }, W = {
3242
3225
  scale: "scale",
3243
3226
  translation: "position",
3244
3227
  rotation: "quaternion",
3245
3228
  weights: "morphTargetInfluences"
3246
- }, Fs = {
3229
+ }, Ds = {
3247
3230
  CUBICSPLINE: void 0,
3248
3231
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
3249
3232
  // keyframe track will be initialized with a default interpolation type, then modified.
3250
3233
  LINEAR: en,
3251
- STEP: tr
3252
- }, We = {
3234
+ STEP: nr
3235
+ }, Ge = {
3253
3236
  OPAQUE: "OPAQUE",
3254
3237
  MASK: "MASK",
3255
3238
  BLEND: "BLEND"
3256
3239
  };
3257
- function Ds(s) {
3240
+ function Hs(s) {
3258
3241
  return s.DefaultMaterial === void 0 && (s.DefaultMaterial = new Zt({
3259
3242
  color: 16777215,
3260
3243
  emissive: 0,
@@ -3262,10 +3245,10 @@ function Ds(s) {
3262
3245
  roughness: 1,
3263
3246
  transparent: !1,
3264
3247
  depthTest: !0,
3265
- side: nr
3248
+ side: rr
3266
3249
  })), s.DefaultMaterial;
3267
3250
  }
3268
- function Y(s, e, t) {
3251
+ function J(s, e, t) {
3269
3252
  for (const n in t.extensions)
3270
3253
  s[n] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[n] = t.extensions[n]);
3271
3254
  }
@@ -3283,16 +3266,16 @@ function js(s, e, t) {
3283
3266
  for (let d = 0, u = e.length; d < u; d++) {
3284
3267
  const l = e[d];
3285
3268
  if (n) {
3286
- const f = l.POSITION !== void 0 ? t.getDependency("accessor", l.POSITION) : s.attributes.position;
3287
- o.push(f);
3269
+ const h = l.POSITION !== void 0 ? t.getDependency("accessor", l.POSITION) : s.attributes.position;
3270
+ o.push(h);
3288
3271
  }
3289
3272
  if (r) {
3290
- const f = l.NORMAL !== void 0 ? t.getDependency("accessor", l.NORMAL) : s.attributes.normal;
3291
- c.push(f);
3273
+ const h = l.NORMAL !== void 0 ? t.getDependency("accessor", l.NORMAL) : s.attributes.normal;
3274
+ c.push(h);
3292
3275
  }
3293
3276
  if (i) {
3294
- const f = l.COLOR_0 !== void 0 ? t.getDependency("accessor", l.COLOR_0) : s.attributes.color;
3295
- a.push(f);
3277
+ const h = l.COLOR_0 !== void 0 ? t.getDependency("accessor", l.COLOR_0) : s.attributes.color;
3278
+ a.push(h);
3296
3279
  }
3297
3280
  }
3298
3281
  return Promise.all([
@@ -3300,11 +3283,11 @@ function js(s, e, t) {
3300
3283
  Promise.all(c),
3301
3284
  Promise.all(a)
3302
3285
  ]).then(function(d) {
3303
- const u = d[0], l = d[1], f = d[2];
3304
- return n && (s.morphAttributes.position = u), r && (s.morphAttributes.normal = l), i && (s.morphAttributes.color = f), s.morphTargetsRelative = !0, s;
3286
+ const u = d[0], l = d[1], h = d[2];
3287
+ return n && (s.morphAttributes.position = u), r && (s.morphAttributes.normal = l), i && (s.morphAttributes.color = h), s.morphTargetsRelative = !0, s;
3305
3288
  });
3306
3289
  }
3307
- function Hs(s, e) {
3290
+ function Us(s, e) {
3308
3291
  if (s.updateMorphTargets(), e.weights !== void 0)
3309
3292
  for (let t = 0, n = e.weights.length; t < n; t++)
3310
3293
  s.morphTargetInfluences[t] = e.weights[t];
@@ -3318,7 +3301,7 @@ function Hs(s, e) {
3318
3301
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
3319
3302
  }
3320
3303
  }
3321
- function Us(s) {
3304
+ function Bs(s) {
3322
3305
  let e;
3323
3306
  const t = s.extensions && s.extensions[S.KHR_DRACO_MESH_COMPRESSION];
3324
3307
  if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ze(t.attributes) : e = s.indices + ":" + ze(s.attributes) + ":" + s.mode, s.targets !== void 0)
@@ -3333,7 +3316,7 @@ function ze(s) {
3333
3316
  e += t[n] + ":" + s[t[n]] + ";";
3334
3317
  return e;
3335
3318
  }
3336
- function tt(s) {
3319
+ function et(s) {
3337
3320
  switch (s) {
3338
3321
  case Int8Array:
3339
3322
  return 1 / 127;
@@ -3347,11 +3330,11 @@ function tt(s) {
3347
3330
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
3348
3331
  }
3349
3332
  }
3350
- function Bs(s) {
3333
+ function Ws(s) {
3351
3334
  return s.search(/\.jpe?g($|\?)/i) > 0 || s.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : s.search(/\.webp($|\?)/i) > 0 || s.search(/^data\:image\/webp/) === 0 ? "image/webp" : s.search(/\.ktx2($|\?)/i) > 0 || s.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
3352
3335
  }
3353
3336
  const Gs = new ve();
3354
- class Ws {
3337
+ class zs {
3355
3338
  constructor(e = {}, t = {}) {
3356
3339
  this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new fs(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
3357
3340
  let n = !1, r = -1, i = !1, o = -1;
@@ -3361,7 +3344,7 @@ class Ws {
3361
3344
  const a = c.match(/Version\/(\d+)/);
3362
3345
  r = n && a ? parseInt(a[1], 10) : -1, i = c.indexOf("Firefox") > -1, o = i ? c.match(/Firefox\/([0-9]+)\./)[1] : -1;
3363
3346
  }
3364
- typeof createImageBitmap > "u" || n && r < 17 || i && o < 98 ? this.textureLoader = new On(this.options.manager) : this.textureLoader = new Qt(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new we(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
3347
+ typeof createImageBitmap > "u" || n && r < 17 || i && o < 98 ? this.textureLoader = new In(this.options.manager) : this.textureLoader = new Qt(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new we(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
3365
3348
  }
3366
3349
  setExtensions(e) {
3367
3350
  this.extensions = e;
@@ -3391,7 +3374,7 @@ class Ws {
3391
3374
  parser: n,
3392
3375
  userData: {}
3393
3376
  };
3394
- return Y(i, c, r), N(c, r), Promise.all(n._invokeAll(function(a) {
3377
+ return J(i, c, r), N(c, r), Promise.all(n._invokeAll(function(a) {
3395
3378
  return a.afterRoot && a.afterRoot(c);
3396
3379
  })).then(function() {
3397
3380
  for (const a of c.scenes)
@@ -3572,7 +3555,7 @@ class Ws {
3572
3555
  return Promise.resolve(this.extensions[S.KHR_BINARY_GLTF].body);
3573
3556
  const r = this.options;
3574
3557
  return new Promise(function(i, o) {
3575
- n.load(pe.resolveURL(t.uri, r.path), i, void 0, function() {
3558
+ n.load(ge.resolveURL(t.uri, r.path), i, void 0, function() {
3576
3559
  o(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
3577
3560
  });
3578
3561
  });
@@ -3601,25 +3584,25 @@ class Ws {
3601
3584
  loadAccessor(e) {
3602
3585
  const t = this, n = this.json, r = this.json.accessors[e];
3603
3586
  if (r.bufferView === void 0 && r.sparse === void 0) {
3604
- const o = Ge[r.type], c = te[r.componentType], a = r.normalized === !0, d = new c(r.count * o);
3605
- return Promise.resolve(new he(d, o, a));
3587
+ const o = We[r.type], c = re[r.componentType], a = r.normalized === !0, d = new c(r.count * o);
3588
+ return Promise.resolve(new me(d, o, a));
3606
3589
  }
3607
3590
  const i = [];
3608
3591
  return r.bufferView !== void 0 ? i.push(this.getDependency("bufferView", r.bufferView)) : i.push(null), r.sparse !== void 0 && (i.push(this.getDependency("bufferView", r.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", r.sparse.values.bufferView))), Promise.all(i).then(function(o) {
3609
- const c = o[0], a = Ge[r.type], d = te[r.componentType], u = d.BYTES_PER_ELEMENT, l = u * a, f = r.byteOffset || 0, h = r.bufferView !== void 0 ? n.bufferViews[r.bufferView].byteStride : void 0, w = r.normalized === !0;
3592
+ const c = o[0], a = We[r.type], d = re[r.componentType], u = d.BYTES_PER_ELEMENT, l = u * a, h = r.byteOffset || 0, f = r.bufferView !== void 0 ? n.bufferViews[r.bufferView].byteStride : void 0, w = r.normalized === !0;
3610
3593
  let E, T;
3611
- if (h && h !== l) {
3612
- const p = Math.floor(f / h), g = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + p + ":" + r.count;
3594
+ if (f && f !== l) {
3595
+ const p = Math.floor(h / f), g = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + p + ":" + r.count;
3613
3596
  let m = t.cache.get(g);
3614
- m || (E = new d(c, p * h, r.count * h / u), m = new $t(E, h / u), t.cache.add(g, m)), T = new Kt(m, a, f % h / u, w);
3597
+ m || (E = new d(c, p * f, r.count * f / u), m = new $t(E, f / u), t.cache.add(g, m)), T = new Kt(m, a, h % f / u, w);
3615
3598
  } else
3616
- c === null ? E = new d(r.count * a) : E = new d(c, f, r.count * a), T = new he(E, a, w);
3599
+ c === null ? E = new d(r.count * a) : E = new d(c, h, r.count * a), T = new me(E, a, w);
3617
3600
  if (r.sparse !== void 0) {
3618
- const p = Ge.SCALAR, g = te[r.sparse.indices.componentType], m = r.sparse.indices.byteOffset || 0, b = r.sparse.values.byteOffset || 0, _ = new g(o[1], m, r.sparse.count * p), y = new d(o[2], b, r.sparse.count * a);
3619
- c !== null && (T = new he(T.array.slice(), T.itemSize, T.normalized)), T.normalized = !1;
3620
- for (let v = 0, C = _.length; v < C; v++) {
3621
- const R = _[v];
3622
- if (T.setX(R, y[v * a]), a >= 2 && T.setY(R, y[v * a + 1]), a >= 3 && T.setZ(R, y[v * a + 2]), a >= 4 && T.setW(R, y[v * a + 3]), a >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
3601
+ const p = We.SCALAR, g = re[r.sparse.indices.componentType], m = r.sparse.indices.byteOffset || 0, b = r.sparse.values.byteOffset || 0, _ = new g(o[1], m, r.sparse.count * p), y = new d(o[2], b, r.sparse.count * a);
3602
+ c !== null && (T = new me(T.array.slice(), T.itemSize, T.normalized)), T.normalized = !1;
3603
+ for (let v = 0, R = _.length; v < R; v++) {
3604
+ const C = _[v];
3605
+ if (T.setX(C, y[v * a]), a >= 2 && T.setY(C, y[v * a + 1]), a >= 3 && T.setZ(C, y[v * a + 2]), a >= 4 && T.setW(C, y[v * a + 3]), a >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
3623
3606
  }
3624
3607
  T.normalized = w;
3625
3608
  }
@@ -3648,8 +3631,8 @@ class Ws {
3648
3631
  return this.textureCache[a];
3649
3632
  const d = this.loadImageSource(t, n).then(function(u) {
3650
3633
  u.flipY = !1, u.name = o.name || c.name || "", u.name === "" && typeof c.uri == "string" && c.uri.startsWith("data:image/") === !1 && (u.name = c.uri);
3651
- const f = (i.samplers || {})[o.sampler] || {};
3652
- return u.magFilter = Pt[f.magFilter] || Xe, u.minFilter = Pt[f.minFilter] || Yt, u.wrapS = Ot[f.wrapS] || Qe, u.wrapT = Ot[f.wrapT] || Qe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== Jt && u.minFilter !== Xe, r.associations.set(u, { textures: e }), u;
3634
+ const h = (i.samplers || {})[o.sampler] || {};
3635
+ return u.magFilter = At[h.magFilter] || Ve, u.minFilter = At[h.minFilter] || Yt, u.wrapS = Pt[h.wrapS] || Xe, u.wrapT = Pt[h.wrapT] || Xe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== Jt && u.minFilter !== Ve, r.associations.set(u, { textures: e }), u;
3653
3636
  }).catch(function() {
3654
3637
  return null;
3655
3638
  });
@@ -3664,21 +3647,21 @@ class Ws {
3664
3647
  if (o.bufferView !== void 0)
3665
3648
  a = n.getDependency("bufferView", o.bufferView).then(function(l) {
3666
3649
  d = !0;
3667
- const f = new Blob([l], { type: o.mimeType });
3668
- return a = c.createObjectURL(f), a;
3650
+ const h = new Blob([l], { type: o.mimeType });
3651
+ return a = c.createObjectURL(h), a;
3669
3652
  });
3670
3653
  else if (o.uri === void 0)
3671
3654
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
3672
3655
  const u = Promise.resolve(a).then(function(l) {
3673
- return new Promise(function(f, h) {
3674
- let w = f;
3656
+ return new Promise(function(h, f) {
3657
+ let w = h;
3675
3658
  t.isImageBitmapLoader === !0 && (w = function(E) {
3676
- const T = new ut(E);
3677
- T.needsUpdate = !0, f(T);
3678
- }), t.load(pe.resolveURL(l, i.path), w, void 0, h);
3659
+ const T = new ct(E);
3660
+ T.needsUpdate = !0, h(T);
3661
+ }), t.load(ge.resolveURL(l, i.path), w, void 0, f);
3679
3662
  });
3680
3663
  }).then(function(l) {
3681
- return d === !0 && c.revokeObjectURL(a), N(l, o), l.userData.mimeType = o.mimeType || Bs(o.uri), l;
3664
+ return d === !0 && c.revokeObjectURL(a), N(l, o), l.userData.mimeType = o.mimeType || Ws(o.uri), l;
3682
3665
  }).catch(function(l) {
3683
3666
  throw console.error("THREE.GLTFLoader: Couldn't load texture", a), l;
3684
3667
  });
@@ -3725,11 +3708,11 @@ class Ws {
3725
3708
  if (e.isPoints) {
3726
3709
  const c = "PointsMaterial:" + n.uuid;
3727
3710
  let a = this.cache.get(c);
3728
- a || (a = new In(), Oe.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, a.sizeAttenuation = !1, this.cache.add(c, a)), n = a;
3711
+ a || (a = new Nn(), Oe.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, a.sizeAttenuation = !1, this.cache.add(c, a)), n = a;
3729
3712
  } else if (e.isLine) {
3730
3713
  const c = "LineBasicMaterial:" + n.uuid;
3731
3714
  let a = this.cache.get(c);
3732
- a || (a = new Nn(), Oe.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, this.cache.add(c, a)), n = a;
3715
+ a || (a = new Fn(), Oe.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, this.cache.add(c, a)), n = a;
3733
3716
  }
3734
3717
  if (r || i || o) {
3735
3718
  let c = "ClonedMaterial:" + n.uuid + ":";
@@ -3759,28 +3742,28 @@ class Ws {
3759
3742
  } else {
3760
3743
  const l = i.pbrMetallicRoughness || {};
3761
3744
  if (c.color = new z(1, 1, 1), c.opacity = 1, Array.isArray(l.baseColorFactor)) {
3762
- const f = l.baseColorFactor;
3763
- c.color.setRGB(f[0], f[1], f[2], F), c.opacity = f[3];
3745
+ const h = l.baseColorFactor;
3746
+ c.color.setRGB(h[0], h[1], h[2], F), c.opacity = h[3];
3764
3747
  }
3765
- l.baseColorTexture !== void 0 && d.push(t.assignTexture(c, "map", l.baseColorTexture, W)), c.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, c.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (d.push(t.assignTexture(c, "metalnessMap", l.metallicRoughnessTexture)), d.push(t.assignTexture(c, "roughnessMap", l.metallicRoughnessTexture))), o = this._invokeOne(function(f) {
3766
- return f.getMaterialType && f.getMaterialType(e);
3767
- }), d.push(Promise.all(this._invokeAll(function(f) {
3768
- return f.extendMaterialParams && f.extendMaterialParams(e, c);
3748
+ l.baseColorTexture !== void 0 && d.push(t.assignTexture(c, "map", l.baseColorTexture, G)), c.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, c.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (d.push(t.assignTexture(c, "metalnessMap", l.metallicRoughnessTexture)), d.push(t.assignTexture(c, "roughnessMap", l.metallicRoughnessTexture))), o = this._invokeOne(function(h) {
3749
+ return h.getMaterialType && h.getMaterialType(e);
3750
+ }), d.push(Promise.all(this._invokeAll(function(h) {
3751
+ return h.extendMaterialParams && h.extendMaterialParams(e, c);
3769
3752
  })));
3770
3753
  }
3771
- i.doubleSided === !0 && (c.side = Fn);
3772
- const u = i.alphaMode || We.OPAQUE;
3773
- if (u === We.BLEND ? (c.transparent = !0, c.depthWrite = !1) : (c.transparent = !1, u === We.MASK && (c.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== de && (d.push(t.assignTexture(c, "normalMap", i.normalTexture)), c.normalScale = new qt(1, 1), i.normalTexture.scale !== void 0)) {
3754
+ i.doubleSided === !0 && (c.side = Dn);
3755
+ const u = i.alphaMode || Ge.OPAQUE;
3756
+ if (u === Ge.BLEND ? (c.transparent = !0, c.depthWrite = !1) : (c.transparent = !1, u === Ge.MASK && (c.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== fe && (d.push(t.assignTexture(c, "normalMap", i.normalTexture)), c.normalScale = new qt(1, 1), i.normalTexture.scale !== void 0)) {
3774
3757
  const l = i.normalTexture.scale;
3775
3758
  c.normalScale.set(l, l);
3776
3759
  }
3777
- if (i.occlusionTexture !== void 0 && o !== de && (d.push(t.assignTexture(c, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (c.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== de) {
3760
+ if (i.occlusionTexture !== void 0 && o !== fe && (d.push(t.assignTexture(c, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (c.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== fe) {
3778
3761
  const l = i.emissiveFactor;
3779
3762
  c.emissive = new z().setRGB(l[0], l[1], l[2], F);
3780
3763
  }
3781
- return i.emissiveTexture !== void 0 && o !== de && d.push(t.assignTexture(c, "emissiveMap", i.emissiveTexture, W)), Promise.all(d).then(function() {
3764
+ return i.emissiveTexture !== void 0 && o !== fe && d.push(t.assignTexture(c, "emissiveMap", i.emissiveTexture, G)), Promise.all(d).then(function() {
3782
3765
  const l = new o(c);
3783
- return i.name && (l.name = i.name), N(l, i), t.associations.set(l, { materials: e }), i.extensions && Y(r, l, i), l;
3766
+ return i.name && (l.name = i.name), N(l, i), t.associations.set(l, { materials: e }), i.extensions && J(r, l, i), l;
3784
3767
  });
3785
3768
  }
3786
3769
  /**
@@ -3791,7 +3774,7 @@ class Ws {
3791
3774
  * @return {string}
3792
3775
  */
3793
3776
  createUniqueName(e) {
3794
- const t = Dn.sanitizeNodeName(e || "");
3777
+ const t = Hn.sanitizeNodeName(e || "");
3795
3778
  return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
3796
3779
  }
3797
3780
  /**
@@ -3807,17 +3790,17 @@ class Ws {
3807
3790
  const t = this, n = this.extensions, r = this.primitiveCache;
3808
3791
  function i(c) {
3809
3792
  return n[S.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c, t).then(function(a) {
3810
- return It(a, c, t);
3793
+ return Ot(a, c, t);
3811
3794
  });
3812
3795
  }
3813
3796
  const o = [];
3814
3797
  for (let c = 0, a = e.length; c < a; c++) {
3815
- const d = e[c], u = Us(d), l = r[u];
3798
+ const d = e[c], u = Bs(d), l = r[u];
3816
3799
  if (l)
3817
3800
  o.push(l.promise);
3818
3801
  else {
3819
- let f;
3820
- d.extensions && d.extensions[S.KHR_DRACO_MESH_COMPRESSION] ? f = i(d) : f = It(new zt(), d, t), r[u] = { primitive: d, promise: f }, o.push(f);
3802
+ let h;
3803
+ d.extensions && d.extensions[S.KHR_DRACO_MESH_COMPRESSION] ? h = i(d) : h = Ot(new zt(), d, t), r[u] = { primitive: d, promise: h }, o.push(h);
3821
3804
  }
3822
3805
  }
3823
3806
  return Promise.all(o);
@@ -3832,41 +3815,41 @@ class Ws {
3832
3815
  loadMesh(e) {
3833
3816
  const t = this, n = this.json, r = this.extensions, i = n.meshes[e], o = i.primitives, c = [];
3834
3817
  for (let a = 0, d = o.length; a < d; a++) {
3835
- const u = o[a].material === void 0 ? Ds(this.cache) : this.getDependency("material", o[a].material);
3818
+ const u = o[a].material === void 0 ? Hs(this.cache) : this.getDependency("material", o[a].material);
3836
3819
  c.push(u);
3837
3820
  }
3838
3821
  return c.push(t.loadGeometries(o)), Promise.all(c).then(function(a) {
3839
3822
  const d = a.slice(0, a.length - 1), u = a[a.length - 1], l = [];
3840
- for (let h = 0, w = u.length; h < w; h++) {
3841
- const E = u[h], T = o[h];
3823
+ for (let f = 0, w = u.length; f < w; f++) {
3824
+ const E = u[f], T = o[f];
3842
3825
  let p;
3843
- const g = d[h];
3826
+ const g = d[f];
3844
3827
  if (T.mode === P.TRIANGLES || T.mode === P.TRIANGLE_STRIP || T.mode === P.TRIANGLE_FAN || T.mode === void 0)
3845
- p = i.isSkinnedMesh === !0 ? new jn(E, g) : new Hn(E, g), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), T.mode === P.TRIANGLE_STRIP ? p.geometry = Mt(p.geometry, Gt) : T.mode === P.TRIANGLE_FAN && (p.geometry = Mt(p.geometry, qe));
3828
+ p = i.isSkinnedMesh === !0 ? new jn(E, g) : new Un(E, g), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), T.mode === P.TRIANGLE_STRIP ? p.geometry = Mt(p.geometry, Wt) : T.mode === P.TRIANGLE_FAN && (p.geometry = Mt(p.geometry, Ke));
3846
3829
  else if (T.mode === P.LINES)
3847
- p = new Un(E, g);
3848
- else if (T.mode === P.LINE_STRIP)
3849
3830
  p = new Bn(E, g);
3831
+ else if (T.mode === P.LINE_STRIP)
3832
+ p = new Wn(E, g);
3850
3833
  else if (T.mode === P.LINE_LOOP)
3851
3834
  p = new Gn(E, g);
3852
3835
  else if (T.mode === P.POINTS)
3853
- p = new Wn(E, g);
3836
+ p = new zn(E, g);
3854
3837
  else
3855
3838
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + T.mode);
3856
- Object.keys(p.geometry.morphAttributes).length > 0 && Hs(p, i), p.name = t.createUniqueName(i.name || "mesh_" + e), N(p, i), T.extensions && Y(r, p, T), t.assignFinalMaterial(p), l.push(p);
3839
+ Object.keys(p.geometry.morphAttributes).length > 0 && Us(p, i), p.name = t.createUniqueName(i.name || "mesh_" + e), N(p, i), T.extensions && J(r, p, T), t.assignFinalMaterial(p), l.push(p);
3857
3840
  }
3858
- for (let h = 0, w = l.length; h < w; h++)
3859
- t.associations.set(l[h], {
3841
+ for (let f = 0, w = l.length; f < w; f++)
3842
+ t.associations.set(l[f], {
3860
3843
  meshes: e,
3861
- primitives: h
3844
+ primitives: f
3862
3845
  });
3863
3846
  if (l.length === 1)
3864
- return i.extensions && Y(r, l[0], i), l[0];
3865
- const f = new Ie();
3866
- i.extensions && Y(r, f, i), t.associations.set(f, { meshes: e });
3867
- for (let h = 0, w = l.length; h < w; h++)
3868
- f.add(l[h]);
3869
- return f;
3847
+ return i.extensions && J(r, l[0], i), l[0];
3848
+ const h = new Ie();
3849
+ i.extensions && J(r, h, i), t.associations.set(h, { meshes: e });
3850
+ for (let f = 0, w = l.length; f < w; f++)
3851
+ h.add(l[f]);
3852
+ return h;
3870
3853
  });
3871
3854
  }
3872
3855
  /**
@@ -3883,7 +3866,7 @@ class Ws {
3883
3866
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
3884
3867
  return;
3885
3868
  }
3886
- return n.type === "perspective" ? t = new zn($n.radToDeg(r.yfov), r.aspectRatio || 1, r.znear || 1, r.zfar || 2e6) : n.type === "orthographic" && (t = new Kn(-r.xmag, r.xmag, r.ymag, -r.ymag, r.znear, r.zfar)), n.name && (t.name = this.createUniqueName(n.name)), N(t, n), Promise.resolve(t);
3869
+ return n.type === "perspective" ? t = new $n(Kn.radToDeg(r.yfov), r.aspectRatio || 1, r.znear || 1, r.zfar || 2e6) : n.type === "orthographic" && (t = new qn(-r.xmag, r.xmag, r.ymag, -r.ymag, r.znear, r.zfar)), n.name && (t.name = this.createUniqueName(n.name)), N(t, n), Promise.resolve(t);
3887
3870
  }
3888
3871
  /**
3889
3872
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -3902,12 +3885,12 @@ class Ws {
3902
3885
  const l = o[d];
3903
3886
  if (l) {
3904
3887
  c.push(l);
3905
- const f = new ve();
3906
- i !== null && f.fromArray(i.array, d * 16), a.push(f);
3888
+ const h = new ve();
3889
+ i !== null && h.fromArray(i.array, d * 16), a.push(h);
3907
3890
  } else
3908
3891
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[d]);
3909
3892
  }
3910
- return new qn(c, a);
3893
+ return new Vn(c, a);
3911
3894
  });
3912
3895
  }
3913
3896
  /**
@@ -3919,8 +3902,8 @@ class Ws {
3919
3902
  */
3920
3903
  loadAnimation(e) {
3921
3904
  const t = this.json, n = this, r = t.animations[e], i = r.name ? r.name : "animation_" + e, o = [], c = [], a = [], d = [], u = [];
3922
- for (let l = 0, f = r.channels.length; l < f; l++) {
3923
- const h = r.channels[l], w = r.samplers[h.sampler], E = h.target, T = E.node, p = r.parameters !== void 0 ? r.parameters[w.input] : w.input, g = r.parameters !== void 0 ? r.parameters[w.output] : w.output;
3905
+ for (let l = 0, h = r.channels.length; l < h; l++) {
3906
+ const f = r.channels[l], w = r.samplers[f.sampler], E = f.target, T = E.node, p = r.parameters !== void 0 ? r.parameters[w.input] : w.input, g = r.parameters !== void 0 ? r.parameters[w.output] : w.output;
3924
3907
  E.node !== void 0 && (o.push(this.getDependency("node", T)), c.push(this.getDependency("accessor", p)), a.push(this.getDependency("accessor", g)), d.push(w), u.push(E));
3925
3908
  }
3926
3909
  return Promise.all([
@@ -3930,17 +3913,17 @@ class Ws {
3930
3913
  Promise.all(d),
3931
3914
  Promise.all(u)
3932
3915
  ]).then(function(l) {
3933
- const f = l[0], h = l[1], w = l[2], E = l[3], T = l[4], p = [];
3934
- for (let m = 0, b = f.length; m < b; m++) {
3935
- const _ = f[m], y = h[m], v = w[m], C = E[m], R = T[m];
3916
+ const h = l[0], f = l[1], w = l[2], E = l[3], T = l[4], p = [];
3917
+ for (let m = 0, b = h.length; m < b; m++) {
3918
+ const _ = h[m], y = f[m], v = w[m], R = E[m], C = T[m];
3936
3919
  if (_ === void 0) continue;
3937
3920
  _.updateMatrix && _.updateMatrix();
3938
- const k = n._createAnimationTracks(_, y, v, C, R);
3939
- if (k)
3940
- for (let M = 0; M < k.length; M++)
3941
- p.push(k[M]);
3921
+ const x = n._createAnimationTracks(_, y, v, R, C);
3922
+ if (x)
3923
+ for (let k = 0; k < x.length; k++)
3924
+ p.push(x[k]);
3942
3925
  }
3943
- const g = new Vn(i, void 0, p);
3926
+ const g = new Xn(i, void 0, p);
3944
3927
  return N(g, r), g;
3945
3928
  });
3946
3929
  }
@@ -3972,15 +3955,15 @@ class Ws {
3972
3955
  Promise.all(o),
3973
3956
  a
3974
3957
  ]).then(function(d) {
3975
- const u = d[0], l = d[1], f = d[2];
3976
- f !== null && u.traverse(function(h) {
3977
- h.isSkinnedMesh && h.bind(f, Gs);
3958
+ const u = d[0], l = d[1], h = d[2];
3959
+ h !== null && u.traverse(function(f) {
3960
+ f.isSkinnedMesh && f.bind(h, Gs);
3978
3961
  });
3979
- for (let h = 0, w = l.length; h < w; h++)
3980
- u.add(l[h]);
3962
+ for (let f = 0, w = l.length; f < w; f++)
3963
+ u.add(l[f]);
3981
3964
  if (u.userData.pivot !== void 0 && l.length > 0) {
3982
- const h = u.userData.pivot, w = l[0];
3983
- u.pivot = new J().fromArray(h), u.position.x -= h[0], u.position.y -= h[1], u.position.z -= h[2], w.position.set(0, 0, 0), delete u.userData.pivot;
3965
+ const f = u.userData.pivot, w = l[0];
3966
+ u.pivot = new Z().fromArray(f), u.position.x -= f[0], u.position.y -= f[1], u.position.z -= f[2], w.position.set(0, 0, 0), delete u.userData.pivot;
3984
3967
  }
3985
3968
  return u;
3986
3969
  });
@@ -4002,10 +3985,10 @@ class Ws {
4002
3985
  c.push(d);
4003
3986
  }), this.nodeCache[e] = Promise.all(c).then(function(d) {
4004
3987
  let u;
4005
- if (i.isBone === !0 ? u = new Xn() : d.length > 1 ? u = new Ie() : d.length === 1 ? u = d[0] : u = new Xt(), u !== d[0])
4006
- for (let l = 0, f = d.length; l < f; l++)
3988
+ if (i.isBone === !0 ? u = new Qn() : d.length > 1 ? u = new Ie() : d.length === 1 ? u = d[0] : u = new Xt(), u !== d[0])
3989
+ for (let l = 0, h = d.length; l < h; l++)
4007
3990
  u.add(d[l]);
4008
- if (i.name && (u.userData.name = i.name, u.name = o), N(u, i), i.extensions && Y(n, u, i), i.matrix !== void 0) {
3991
+ if (i.name && (u.userData.name = i.name, u.name = o), N(u, i), i.extensions && J(n, u, i), i.matrix !== void 0) {
4009
3992
  const l = new ve();
4010
3993
  l.fromArray(i.matrix), u.applyMatrix4(l);
4011
3994
  } else
@@ -4028,22 +4011,22 @@ class Ws {
4028
4011
  */
4029
4012
  loadScene(e) {
4030
4013
  const t = this.extensions, n = this.json.scenes[e], r = this, i = new Ie();
4031
- n.name && (i.name = r.createUniqueName(n.name)), N(i, n), n.extensions && Y(t, i, n);
4014
+ n.name && (i.name = r.createUniqueName(n.name)), N(i, n), n.extensions && J(t, i, n);
4032
4015
  const o = n.nodes || [], c = [];
4033
4016
  for (let a = 0, d = o.length; a < d; a++)
4034
4017
  c.push(r.getDependency("node", o[a]));
4035
4018
  return Promise.all(c).then(function(a) {
4036
4019
  for (let u = 0, l = a.length; u < l; u++) {
4037
- const f = a[u];
4038
- f.parent !== null ? i.add(ls(f)) : i.add(f);
4020
+ const h = a[u];
4021
+ h.parent !== null ? i.add(ds(h)) : i.add(h);
4039
4022
  }
4040
4023
  const d = (u) => {
4041
4024
  const l = /* @__PURE__ */ new Map();
4042
- for (const [f, h] of r.associations)
4043
- (f instanceof Oe || f instanceof ut) && l.set(f, h);
4044
- return u.traverse((f) => {
4045
- const h = r.associations.get(f);
4046
- h != null && l.set(f, h);
4025
+ for (const [h, f] of r.associations)
4026
+ (h instanceof Oe || h instanceof ct) && l.set(h, f);
4027
+ return u.traverse((h) => {
4028
+ const f = r.associations.get(h);
4029
+ f != null && l.set(h, f);
4047
4030
  }), l;
4048
4031
  };
4049
4032
  return r.associations = d(i), i;
@@ -4051,38 +4034,38 @@ class Ws {
4051
4034
  }
4052
4035
  _createAnimationTracks(e, t, n, r, i) {
4053
4036
  const o = [], c = e.name ? e.name : e.uuid, a = [];
4054
- G[i.path] === G.weights ? e.traverse(function(f) {
4055
- f.morphTargetInfluences && a.push(f.name ? f.name : f.uuid);
4037
+ W[i.path] === W.weights ? e.traverse(function(h) {
4038
+ h.morphTargetInfluences && a.push(h.name ? h.name : h.uuid);
4056
4039
  }) : a.push(c);
4057
4040
  let d;
4058
- switch (G[i.path]) {
4059
- case G.weights:
4060
- d = dt;
4041
+ switch (W[i.path]) {
4042
+ case W.weights:
4043
+ d = lt;
4061
4044
  break;
4062
- case G.rotation:
4063
- d = ft;
4045
+ case W.rotation:
4046
+ d = dt;
4064
4047
  break;
4065
- case G.translation:
4066
- case G.scale:
4067
- d = lt;
4048
+ case W.translation:
4049
+ case W.scale:
4050
+ d = ut;
4068
4051
  break;
4069
4052
  default:
4070
4053
  switch (n.itemSize) {
4071
4054
  case 1:
4072
- d = dt;
4055
+ d = lt;
4073
4056
  break;
4074
4057
  case 2:
4075
4058
  case 3:
4076
4059
  default:
4077
- d = lt;
4060
+ d = ut;
4078
4061
  break;
4079
4062
  }
4080
4063
  break;
4081
4064
  }
4082
- const u = r.interpolation !== void 0 ? Fs[r.interpolation] : en, l = this._getArrayFromAccessor(n);
4083
- for (let f = 0, h = a.length; f < h; f++) {
4065
+ const u = r.interpolation !== void 0 ? Ds[r.interpolation] : en, l = this._getArrayFromAccessor(n);
4066
+ for (let h = 0, f = a.length; h < f; h++) {
4084
4067
  const w = new d(
4085
- a[f] + "." + G[i.path],
4068
+ a[h] + "." + W[i.path],
4086
4069
  t.array,
4087
4070
  l,
4088
4071
  u
@@ -4094,7 +4077,7 @@ class Ws {
4094
4077
  _getArrayFromAccessor(e) {
4095
4078
  let t = e.array;
4096
4079
  if (e.normalized) {
4097
- const n = tt(t.constructor), r = new Float32Array(t.length);
4080
+ const n = et(t.constructor), r = new Float32Array(t.length);
4098
4081
  for (let i = 0, o = t.length; i < o; i++)
4099
4082
  r[i] = t[i] * n;
4100
4083
  t = r;
@@ -4103,21 +4086,21 @@ class Ws {
4103
4086
  }
4104
4087
  _createCubicSplineTrackInterpolant(e) {
4105
4088
  e.createInterpolant = function(n) {
4106
- const r = this instanceof ft ? Ns : fn;
4089
+ const r = this instanceof dt ? Fs : hn;
4107
4090
  return new r(this.times, this.values, this.getValueSize() / 3, n);
4108
4091
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
4109
4092
  }
4110
4093
  }
4111
- function zs(s, e, t) {
4112
- const n = e.attributes, r = new rr();
4094
+ function $s(s, e, t) {
4095
+ const n = e.attributes, r = new sr();
4113
4096
  if (n.POSITION !== void 0) {
4114
4097
  const c = t.json.accessors[n.POSITION], a = c.min, d = c.max;
4115
4098
  if (a !== void 0 && d !== void 0) {
4116
4099
  if (r.set(
4117
- new J(a[0], a[1], a[2]),
4118
- new J(d[0], d[1], d[2])
4100
+ new Z(a[0], a[1], a[2]),
4101
+ new Z(d[0], d[1], d[2])
4119
4102
  ), c.normalized) {
4120
- const u = tt(te[c.componentType]);
4103
+ const u = et(re[c.componentType]);
4121
4104
  r.min.multiplyScalar(u), r.max.multiplyScalar(u);
4122
4105
  }
4123
4106
  } else {
@@ -4128,14 +4111,14 @@ function zs(s, e, t) {
4128
4111
  return;
4129
4112
  const i = e.targets;
4130
4113
  if (i !== void 0) {
4131
- const c = new J(), a = new J();
4114
+ const c = new Z(), a = new Z();
4132
4115
  for (let d = 0, u = i.length; d < u; d++) {
4133
4116
  const l = i[d];
4134
4117
  if (l.POSITION !== void 0) {
4135
- const f = t.json.accessors[l.POSITION], h = f.min, w = f.max;
4136
- if (h !== void 0 && w !== void 0) {
4137
- if (a.setX(Math.max(Math.abs(h[0]), Math.abs(w[0]))), a.setY(Math.max(Math.abs(h[1]), Math.abs(w[1]))), a.setZ(Math.max(Math.abs(h[2]), Math.abs(w[2]))), f.normalized) {
4138
- const E = tt(te[f.componentType]);
4118
+ const h = t.json.accessors[l.POSITION], f = h.min, w = h.max;
4119
+ if (f !== void 0 && w !== void 0) {
4120
+ if (a.setX(Math.max(Math.abs(f[0]), Math.abs(w[0]))), a.setY(Math.max(Math.abs(f[1]), Math.abs(w[1]))), a.setZ(Math.max(Math.abs(f[2]), Math.abs(w[2]))), h.normalized) {
4121
+ const E = et(re[h.componentType]);
4139
4122
  a.multiplyScalar(E);
4140
4123
  }
4141
4124
  c.max(a);
@@ -4146,10 +4129,10 @@ function zs(s, e, t) {
4146
4129
  r.expandByVector(c);
4147
4130
  }
4148
4131
  s.boundingBox = r;
4149
- const o = new sr();
4132
+ const o = new ir();
4150
4133
  r.getCenter(o.center), o.radius = r.min.distanceTo(r.max) / 2, s.boundingSphere = o;
4151
4134
  }
4152
- function It(s, e, t) {
4135
+ function Ot(s, e, t) {
4153
4136
  const n = e.attributes, r = [];
4154
4137
  function i(o, c) {
4155
4138
  return t.getDependency("accessor", o).then(function(a) {
@@ -4157,7 +4140,7 @@ function It(s, e, t) {
4157
4140
  });
4158
4141
  }
4159
4142
  for (const o in n) {
4160
- const c = et[o] || o.toLowerCase();
4143
+ const c = Ze[o] || o.toLowerCase();
4161
4144
  c in s.attributes || r.push(i(n[o], c));
4162
4145
  }
4163
4146
  if (e.indices !== void 0 && !s.index) {
@@ -4166,23 +4149,23 @@ function It(s, e, t) {
4166
4149
  });
4167
4150
  r.push(o);
4168
4151
  }
4169
- return Ve.workingColorSpace !== F && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Ve.workingColorSpace}" not supported.`), N(s, e), zs(s, e, t), Promise.all(r).then(function() {
4152
+ return qe.workingColorSpace !== F && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${qe.workingColorSpace}" not supported.`), N(s, e), $s(s, e, t), Promise.all(r).then(function() {
4170
4153
  return e.targets !== void 0 ? js(s, e.targets, t) : s;
4171
4154
  });
4172
4155
  }
4173
- var $s = Object.defineProperty, Ks = Object.getOwnPropertyDescriptor, qs = (s, e, t, n) => {
4174
- for (var r = n > 1 ? void 0 : n ? Ks(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4156
+ var Ks = Object.defineProperty, qs = Object.getOwnPropertyDescriptor, Vs = (s, e, t, n) => {
4157
+ for (var r = n > 1 ? void 0 : n ? qs(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4175
4158
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
4176
- return n && r && $s(e, t, r), r;
4159
+ return n && r && Ks(e, t, r), r;
4177
4160
  };
4178
- let Re = class {
4161
+ let Ce = class {
4179
4162
  constructor() {
4180
- x(this, "loadingManager", new or());
4181
- x(this, "loaders", {});
4182
- x(this, "sources", []);
4183
- x(this, "loadedResources", {});
4184
- x(this, "toLoadCount", 0);
4185
- x(this, "loadedCount", 0);
4163
+ M(this, "loadingManager", new ar());
4164
+ M(this, "loaders", {});
4165
+ M(this, "sources", []);
4166
+ M(this, "loadedResources", {});
4167
+ M(this, "toLoadCount", 0);
4168
+ M(this, "loadedCount", 0);
4186
4169
  }
4187
4170
  /** @description The video loader. based on {@link HTMLVideoElement}. */
4188
4171
  get videoLoader() {
@@ -4198,7 +4181,7 @@ let Re = class {
4198
4181
  };
4199
4182
  }
4200
4183
  _initLoaders() {
4201
- this.loaders.dracoLoader = new un(this.loadingManager), this.loaders.audioLoader = new ar(this.loadingManager), this.loaders.fontLoader = new En(this.loadingManager), this.loaders.gltfLoader = new ds(this.loadingManager), this.loaders.imageLoader = new Qt(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
4184
+ this.loaders.dracoLoader = new un(this.loadingManager), this.loaders.audioLoader = new cr(this.loadingManager), this.loaders.fontLoader = new En(this.loadingManager), this.loaders.gltfLoader = new hs(this.loadingManager), this.loaders.imageLoader = new Qt(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
4202
4185
  }
4203
4186
  _initSources(s) {
4204
4187
  this.sources = s, this.toLoadCount = this.sources.length, this.loadedCount = 0;
@@ -4248,18 +4231,18 @@ let Re = class {
4248
4231
  }
4249
4232
  }
4250
4233
  };
4251
- Re = qs([
4252
- re(se.ContainerScoped)
4253
- ], Re);
4254
- var Vs = Object.defineProperty, Xs = Object.getOwnPropertyDescriptor, Qs = (s, e, t, n) => {
4255
- for (var r = n > 1 ? void 0 : n ? Xs(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4234
+ Ce = Vs([
4235
+ ie(oe.ContainerScoped)
4236
+ ], Ce);
4237
+ var Xs = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, Ys = (s, e, t, n) => {
4238
+ for (var r = n > 1 ? void 0 : n ? Qs(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4256
4239
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
4257
- return n && r && Vs(e, t, r), r;
4258
- }, Ys = (s, e) => (t, n) => e(t, n, s);
4240
+ return n && r && Xs(e, t, r), r;
4241
+ }, Js = (s, e) => (t, n) => e(t, n, s);
4259
4242
  let Se = class {
4260
4243
  constructor(s) {
4261
- x(this, "load$$", new Ht());
4262
- x(this, "load$", this.load$$.pipe(
4244
+ M(this, "load$$", new Ht());
4245
+ M(this, "load$", this.load$$.pipe(
4263
4246
  ye((s) => ({
4264
4247
  ...s,
4265
4248
  loadedCount: s.resource ? this._service.loadedCount + 1 : this._service.loadedCount,
@@ -4267,13 +4250,13 @@ let Se = class {
4267
4250
  })),
4268
4251
  Pe()
4269
4252
  ));
4270
- x(this, "serializedLoad$", this.load$.pipe(
4253
+ M(this, "serializedLoad$", this.load$.pipe(
4271
4254
  ye((s) => {
4272
4255
  var t, n, r;
4273
4256
  let e = s.resource;
4274
4257
  if ((t = s == null ? void 0 : s.resource) != null && t.parser) {
4275
4258
  const i = s.resource, o = i.scenes.map(
4276
- (c) => at(c)
4259
+ (c) => ot(c)
4277
4260
  );
4278
4261
  e = {
4279
4262
  animations: (s == null ? void 0 : s.resource).animations.map(
@@ -4281,7 +4264,7 @@ let Se = class {
4281
4264
  (c) => c.toJSON()
4282
4265
  ),
4283
4266
  cameras: i.cameras.map(
4284
- (c) => at(c)
4267
+ (c) => ot(c)
4285
4268
  ),
4286
4269
  parser: { json: i.parser.json },
4287
4270
  scene: o == null ? void 0 : o[0],
@@ -4295,7 +4278,7 @@ let Se = class {
4295
4278
  sampleRate: s.resource.sampleRate,
4296
4279
  duration: s.resource.duration
4297
4280
  }), ((r = s == null ? void 0 : s.source) == null ? void 0 : r.type) === "video" && s.resource instanceof HTMLVideoElement && (e = {
4298
- ...fe(s.resource, [
4281
+ ...pe(s.resource, [
4299
4282
  "autoplay",
4300
4283
  "baseURI",
4301
4284
  "controls",
@@ -4329,7 +4312,7 @@ let Se = class {
4329
4312
  "width"
4330
4313
  ]),
4331
4314
  buffered: s.resource.buffered.length,
4332
- error: s.resource.error ? Ke(s.resource.error, []) : {},
4315
+ error: s.resource.error ? Ut(s.resource.error, []) : {},
4333
4316
  played: s.resource.played.length,
4334
4317
  seekable: s.resource.seekable.length,
4335
4318
  textTracks: s.resource.textTracks.length
@@ -4340,10 +4323,10 @@ let Se = class {
4340
4323
  }),
4341
4324
  Pe()
4342
4325
  ));
4343
- x(this, "loadCompleted$", this.load$.pipe(
4344
- Ut((s) => s.toLoadCount === s.loadedCount),
4326
+ M(this, "loadCompleted$", this.load$.pipe(
4327
+ jt((s) => s.toLoadCount === s.loadedCount),
4345
4328
  ye(
4346
- () => fe(this._service, [
4329
+ () => pe(this._service, [
4347
4330
  "loadedCount",
4348
4331
  "loadedResources",
4349
4332
  "toLoadCount"
@@ -4354,18 +4337,18 @@ let Se = class {
4354
4337
  this._service = s;
4355
4338
  }
4356
4339
  };
4357
- Se = Qs([
4358
- re(se.ContainerScoped),
4359
- Ys(0, O(Re))
4340
+ Se = Ys([
4341
+ ie(oe.ContainerScoped),
4342
+ Js(0, O(Ce))
4360
4343
  ], Se);
4361
- var Js = Object.defineProperty, Zs = Object.getOwnPropertyDescriptor, ei = (s, e, t, n) => {
4362
- for (var r = n > 1 ? void 0 : n ? Zs(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4344
+ var Zs = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (s, e, t, n) => {
4345
+ for (var r = n > 1 ? void 0 : n ? ei(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4363
4346
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
4364
- return n && r && Js(e, t, r), r;
4347
+ return n && r && Zs(e, t, r), r;
4365
4348
  }, $e = (s, e) => (t, n) => e(t, n, s);
4366
- let nt = class {
4349
+ let tt = class {
4367
4350
  constructor(s, e, t) {
4368
- x(this, "_subscriptions", []);
4351
+ M(this, "_subscriptions", []);
4369
4352
  this._controller = s, this._service = e, this._props = t, this._subscriptions.push(
4370
4353
  this._controller.load$.subscribe(
4371
4354
  this._service.handleLoad.bind(this._service)
@@ -4414,30 +4397,31 @@ let nt = class {
4414
4397
  }), this._controller.load$$.complete();
4415
4398
  }
4416
4399
  };
4417
- nt = ei([
4418
- re(se.ContainerScoped),
4400
+ tt = ti([
4401
+ ie(oe.ContainerScoped),
4419
4402
  $e(0, O(Se)),
4420
- $e(1, O(Re)),
4403
+ $e(1, O(Ce)),
4421
4404
  $e(2, O(xe))
4422
- ], nt);
4423
- var ti = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ri = (s, e, t, n) => {
4424
- for (var r = n > 1 ? void 0 : n ? ni(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4405
+ ], tt);
4406
+ var ni = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, si = (s, e, t, n) => {
4407
+ for (var r = n > 1 ? void 0 : n ? ri(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4425
4408
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
4426
- return n && r && ti(e, t, r), r;
4427
- }, ee = (s, e) => (t, n) => e(t, n, s);
4428
- let rt = class extends Cn {
4409
+ return n && r && ni(e, t, r), r;
4410
+ }, ne = (s, e) => (t, n) => e(t, n, s);
4411
+ let nt = class extends Rn {
4429
4412
  constructor(e, t, n, r, i, o) {
4430
4413
  super();
4431
- x(this, "_subscriptions", []);
4432
- x(this, "_initialized", !1);
4414
+ M(this, "_subscriptions", []);
4415
+ M(this, "_initialized", !1);
4433
4416
  this._service = e, this._controller = t, this._loaderController = n, this.container = r, this.props = i, this.loader = o, this.props.initOnConstruct && this.init();
4434
4417
  }
4435
4418
  get currentWorker() {
4436
- return this.props.mainThread ? self : this._service.worker;
4419
+ var e;
4420
+ return this.props.mainThread ? self : (e = this._service.workerThread) == null ? void 0 : e.worker;
4437
4421
  }
4438
4422
  async _initCanvas() {
4439
4423
  try {
4440
- if (this.props.canvas instanceof HTMLCanvasElement && (this._service.canvas = this.props.canvas), typeof this.props.canvas == "string") {
4424
+ if (this.props.canvasWrapper instanceof HTMLElement && (this._service.canvasWrapper = this.props.canvasWrapper), this.props.canvas instanceof HTMLCanvasElement && (this._service.canvas = this.props.canvas), typeof this.props.canvas == "string") {
4441
4425
  const e = document.querySelector(this.props.canvas);
4442
4426
  e instanceof HTMLCanvasElement && (this._service.canvas = e);
4443
4427
  }
@@ -4449,59 +4433,64 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
4449
4433
  );
4450
4434
  }
4451
4435
  }
4452
- async _initServiceWorker() {
4453
- this._service.init({
4454
- worker: this._service.worker,
4455
- thread: this._service.thread
4456
- });
4457
- }
4458
4436
  async _initEvents() {
4437
+ var n, r;
4459
4438
  if (!this._service.canvas)
4460
4439
  throw new Error("Canvas element is not initialized.");
4461
- this._controller.init(), setTimeout(() => {
4462
- const e = new UIEvent("resize");
4463
- e.width = window.innerWidth, e.height = window.innerHeight, e.windowWidth = window.innerWidth, e.windowHeight = window.innerHeight, this._controller.resize$$.next(
4464
- this._service.uiEventHandler(e)
4465
- );
4466
- }, 0);
4440
+ this._controller.init();
4441
+ const e = this._service.canvas, t = new UIEvent("resize");
4442
+ t.width = (e == null ? void 0 : e.width) ?? window.innerWidth, t.height = (e == null ? void 0 : e.height) ?? window.innerHeight, t.wrapperWidth = ((n = this.props.canvasWrapper) == null ? void 0 : n.clientWidth) ?? 0, t.wrapperHeight = ((r = this.props.canvasWrapper) == null ? void 0 : r.clientHeight) ?? 0, t.windowWidth = window.innerWidth, t.windowHeight = window.innerHeight, this.props.mainThread || this._subscriptions.push(
4443
+ this._controller.resize$.subscribe((i) => {
4444
+ var d, u;
4445
+ if (!this.props.autoRenderResize) return;
4446
+ const o = this._service.canvas;
4447
+ if (!o) return;
4448
+ const c = this.props.fullScreen ? i.windowWidth : ((d = this.props.canvasWrapper) == null ? void 0 : d.clientWidth) ?? 0, a = this.props.fullScreen ? i.windowHeight : ((u = this.props.canvasWrapper) == null ? void 0 : u.clientHeight) ?? 0;
4449
+ o.style.width = c + "px", o.style.height = a + "px";
4450
+ })
4451
+ ), this._controller.resize$$.next(this._service.uiEventHandler(t));
4467
4452
  }
4468
- async _initOnMainThread() {
4469
- await import(`${this.props.location}`), self.postMessage({
4470
- mainThread: !0,
4471
- ...Ke(this.props, [
4472
- "mainThread",
4453
+ async _initCore() {
4454
+ const e = {
4455
+ ...Ut(this.props, [
4473
4456
  "canvas",
4457
+ "canvasWrapper",
4474
4458
  "location",
4475
4459
  "onReady",
4476
4460
  "loaderDataSources"
4477
- ])
4478
- });
4479
- }
4480
- async _initOnWorkerThread() {
4461
+ ]),
4462
+ pixelRatio: Math.min(window.devicePixelRatio, 2),
4463
+ initApp: !0,
4464
+ hasCanvasWrapper: !!this.props.canvasWrapper
4465
+ };
4466
+ if (this.props.mainThread) {
4467
+ await import(`${this.props.location}`), await new Promise((i) => {
4468
+ const o = (c) => {
4469
+ c.data.mainThread && (i(), self.removeEventListener("message", o));
4470
+ };
4471
+ self.addEventListener("message", o), self.postMessage(e);
4472
+ });
4473
+ return;
4474
+ }
4481
4475
  if (!this._service.canvas)
4482
4476
  throw new Error("Canvas element is not initialized.");
4483
4477
  this._service.offscreenCanvas = this._service.canvas.transferControlToOffscreen(), this._service.offscreenCanvas.width = this._service.canvas.clientWidth, this._service.offscreenCanvas.height = this._service.canvas.clientHeight;
4484
- const [e, t] = await this._service.workerPool.run({
4478
+ const t = {
4479
+ ...e,
4480
+ canvas: this._service.offscreenCanvas
4481
+ }, [n, r] = await this._service.workerPool.run({
4485
4482
  payload: {
4486
4483
  path: this.props.location,
4487
- subject: {
4488
- ...Ke(this.props, [
4489
- "canvas",
4490
- "location",
4491
- "onReady",
4492
- "loaderDataSources"
4493
- ]),
4494
- canvas: this._service.offscreenCanvas
4495
- },
4484
+ subject: t,
4496
4485
  transferSubject: [this._service.offscreenCanvas]
4497
4486
  }
4498
4487
  }) || [];
4499
- if (!e || t)
4488
+ if (!n || r)
4500
4489
  throw new Error("Unable to retrieve the worker-thread info.");
4501
- this._service.worker = e.worker, this._service.thread = e.thread;
4490
+ this._service.workerThread = n;
4502
4491
  }
4503
4492
  async _initObservables() {
4504
- jt.forEach(
4493
+ Dt.forEach(
4505
4494
  (e) => this[`${e}$`] = () => {
4506
4495
  var t;
4507
4496
  return (t = this._controller) == null ? void 0 : t[`${e}$`];
@@ -4520,7 +4509,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
4520
4509
  e.resource
4521
4510
  ]);
4522
4511
  (n = this.currentWorker) == null || n.postMessage({
4523
- token: Rn,
4512
+ token: Cn,
4524
4513
  payload: e
4525
4514
  });
4526
4515
  })
@@ -4528,7 +4517,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
4528
4517
  }
4529
4518
  async init() {
4530
4519
  var e, t;
4531
- this._initialized || (this._initialized = !0, await this._initCanvas(), this.props.mainThread ? await this._initOnMainThread() : await this._initOnWorkerThread(), await this._initServiceWorker(), await this._initObservables(), await this._initLoader(), await this._initEvents(), (t = (e = this.props).onReady) == null || t.call(e, { module: this, container: this.container }));
4520
+ this._initialized || (this._initialized = !0, await this._initCanvas(), await this._initCore(), await this._initObservables(), await this._initLoader(), await this._initEvents(), (t = (e = this.props).onReady) == null || t.call(e, { module: this, container: this.container }));
4532
4521
  }
4533
4522
  getCanvas() {
4534
4523
  return this._service.canvas;
@@ -4536,15 +4525,15 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
4536
4525
  getOffscreenCanvas() {
4537
4526
  return this._service.offscreenCanvas;
4538
4527
  }
4539
- getThread() {
4540
- return this._service.thread;
4541
- }
4542
- getWorker() {
4543
- return this._service.worker;
4528
+ getWorkerThread() {
4529
+ return this._service.workerThread;
4544
4530
  }
4545
4531
  getWorkerPool() {
4546
4532
  return this._service.workerPool;
4547
4533
  }
4534
+ getProps() {
4535
+ return this.props;
4536
+ }
4548
4537
  isInitialized() {
4549
4538
  return this._initialized;
4550
4539
  }
@@ -4553,23 +4542,24 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
4553
4542
  this._subscriptions.map((t) => t.unsubscribe()), await this._service.workerPool.terminateAll(), ((e = this._service.canvas) == null ? void 0 : e.dataset.reactive) === "true" && (document.body.removeChild(this._service.canvas), this._service.canvas.remove(), this._service.canvas = void 0), this._initialized = !1;
4554
4543
  }
4555
4544
  };
4556
- rt = ri([
4557
- re(se.ContainerScoped),
4558
- ee(0, O(Ce)),
4559
- ee(1, O(Ze)),
4560
- ee(2, O(Se)),
4561
- ee(3, O(Bt)),
4562
- ee(4, O(xe)),
4563
- ee(5, O(nt))
4564
- ], rt);
4565
- const ui = (s) => {
4545
+ nt = si([
4546
+ ie(oe.ContainerScoped),
4547
+ ne(0, O(Re)),
4548
+ ne(1, O(Je)),
4549
+ ne(2, O(Se)),
4550
+ ne(3, O(Bt)),
4551
+ ne(4, O(xe)),
4552
+ ne(5, O(tt))
4553
+ ], nt);
4554
+ const li = (s) => {
4555
+ var n;
4566
4556
  if (!(s != null && s.location) || !URL.canParse(s.location))
4567
4557
  throw new Error(
4568
4558
  "Invalid register props detected. location path is required"
4569
4559
  );
4570
- const e = Dt.createChildContainer();
4571
- s.initOnConstruct = ge(s.initOnConstruct) || !_e(s.initOnConstruct) ? !0 : s.initOnConstruct, s.defaultCamera = s != null && s.defaultCamera && s.defaultCamera in ct ? s.defaultCamera : ct.PERSPECTIVE, s.withMiniCamera = ge(s.withMiniCamera) || !_e(s.withMiniCamera) ? !1 : s.withMiniCamera, s.startTimer = ge(s.startTimer) || !_e(s.startTimer) ? !0 : s.startTimer, s.fullScreen = ge(s.fullScreen) || !_e(s.fullScreen) ? !0 : s.fullScreen, s.onReady = Sn(s.onReady) ? s.onReady : void 0, e.register(Bt, { useValue: e }), e.register(xe, { useValue: s });
4572
- const t = e.resolve(rt);
4560
+ const e = Ft.createChildContainer();
4561
+ s.initOnConstruct = V(s.initOnConstruct) || !te(s.initOnConstruct) ? !0 : s.initOnConstruct, s.defaultCamera = s != null && s.defaultCamera && s.defaultCamera in at ? s.defaultCamera : at.PERSPECTIVE, s.fullScreen = V(s.fullScreen) || !te(s.fullScreen) ? !0 : s.fullScreen, s.autoRenderResize = V(s.autoRenderResize) || !te(s.autoRenderResize) ? !0 : s.autoRenderResize, s.startTimer = V(s.startTimer) || !te(s.startTimer) ? !0 : s.startTimer, s.onReady = Sn(s.onReady) ? s.onReady : void 0, s.debug && (s.debug.withMiniCamera = V((n = s.debug) == null ? void 0 : n.withMiniCamera) || !te(s.debug.withMiniCamera) ? !1 : s.debug.withMiniCamera, s.debug.enableControls = V(s.debug.enableControls) || !te(s.debug.enableControls) ? !1 : s.debug.enableControls, s.debug.axesSizes = V(s.debug.axesSizes) || !xn(s.debug.axesSizes) ? void 0 : s.debug.axesSizes), e.register(Bt, { useValue: e }), e.register(xe, { useValue: s });
4562
+ const t = e.resolve(nt);
4573
4563
  return {
4574
4564
  container: e,
4575
4565
  module: t
@@ -4578,16 +4568,16 @@ const ui = (s) => {
4578
4568
  export {
4579
4569
  fi as AppProxyEventHandlersBlueprint,
4580
4570
  Bt as CONTAINER_TOKEN,
4581
- ct as DefaultCameraType,
4571
+ at as DefaultCameraType,
4582
4572
  Tn as KEYBOARD_EVENT_CODES,
4583
- Rn as LOADER_SERIALIZED_LOAD_TOKEN,
4584
- ai as LaunchAppProps,
4585
- jt as PROXY_EVENT_LISTENERS,
4573
+ Cn as LOADER_SERIALIZED_LOAD_TOKEN,
4574
+ ci as LaunchAppProps,
4575
+ Dt as PROXY_EVENT_LISTENERS,
4586
4576
  wn as ProxyEventHandlersBlueprint,
4587
- hi as ProxyEventObservablesBlueprint,
4588
- pi as ProxyEventSubjectsBlueprint,
4589
- rt as RegisterModule,
4577
+ pi as ProxyEventObservablesBlueprint,
4578
+ mi as ProxyEventSubjectsBlueprint,
4579
+ nt as RegisterModule,
4590
4580
  xe as RegisterPropsBlueprint,
4591
- Cn as RegisterProxyEventHandlersBlueprint,
4592
- ui as register
4581
+ Rn as RegisterProxyEventHandlersBlueprint,
4582
+ li as register
4593
4583
  };