dpot-ui 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -36,7 +36,7 @@ var zt = (n, e, t) => new Promise((i, r) => {
36
36
  a((t = t.apply(n, e)).next());
37
37
  });
38
38
  import bf from "vue";
39
- function Pr(n) {
39
+ function Lr(n) {
40
40
  return n.split("-")[1];
41
41
  }
42
42
  function Ea(n) {
@@ -45,12 +45,12 @@ function Ea(n) {
45
45
  function si(n) {
46
46
  return n.split("-")[0];
47
47
  }
48
- function Lr(n) {
48
+ function Pr(n) {
49
49
  return ["top", "bottom"].includes(si(n)) ? "x" : "y";
50
50
  }
51
51
  function al(n, e, t) {
52
52
  let { reference: i, floating: r } = n;
53
- const s = i.x + i.width / 2 - r.width / 2, o = i.y + i.height / 2 - r.height / 2, a = Lr(e), l = Ea(a), c = i[l] / 2 - r[l] / 2, u = a === "x";
53
+ const s = i.x + i.width / 2 - r.width / 2, o = i.y + i.height / 2 - r.height / 2, a = Pr(e), l = Ea(a), c = i[l] / 2 - r[l] / 2, u = a === "x";
54
54
  let h;
55
55
  switch (si(e)) {
56
56
  case "top":
@@ -68,7 +68,7 @@ function al(n, e, t) {
68
68
  default:
69
69
  h = { x: i.x, y: i.y };
70
70
  }
71
- switch (Pr(e)) {
71
+ switch (Lr(e)) {
72
72
  case "start":
73
73
  h[a] -= c * (t && u ? -1 : 1);
74
74
  break;
@@ -81,8 +81,8 @@ const Tf = (n, e, t) => zt(void 0, null, function* () {
81
81
  const { placement: i = "bottom", strategy: r = "absolute", middleware: s = [], platform: o } = t, a = s.filter(Boolean), l = yield o.isRTL == null ? void 0 : o.isRTL(e);
82
82
  let c = yield o.getElementRects({ reference: n, floating: e, strategy: r }), { x: u, y: h } = al(c, i, l), f = i, d = {}, g = 0;
83
83
  for (let _ = 0; _ < a.length; _++) {
84
- const { name: m, fn: p } = a[_], { x: S, y: v, data: M, reset: b } = yield p({ x: u, y: h, initialPlacement: i, placement: f, strategy: r, middlewareData: d, rects: c, platform: o, elements: { reference: n, floating: e } });
85
- u = S != null ? S : u, h = v != null ? v : h, d = rt(De({}, d), { [m]: De(De({}, d[m]), M) }), b && g <= 50 && (g++, typeof b == "object" && (b.placement && (f = b.placement), b.rects && (c = b.rects === !0 ? yield o.getElementRects({ reference: n, floating: e, strategy: r }) : b.rects), { x: u, y: h } = al(c, f, l)), _ = -1);
84
+ const { name: m, fn: p } = a[_], { x: y, y: v, data: M, reset: b } = yield p({ x: u, y: h, initialPlacement: i, placement: f, strategy: r, middlewareData: d, rects: c, platform: o, elements: { reference: n, floating: e } });
85
+ u = y != null ? y : u, h = v != null ? v : h, d = rt(De({}, d), { [m]: De(De({}, d[m]), M) }), b && g <= 50 && (g++, typeof b == "object" && (b.placement && (f = b.placement), b.rects && (c = b.rects === !0 ? yield o.getElementRects({ reference: n, floating: e, strategy: r }) : b.rects), { x: u, y: h } = al(c, f, l)), _ = -1);
86
86
  }
87
87
  return { x: u, y: h, placement: f, strategy: r, middlewareData: d };
88
88
  });
@@ -101,7 +101,7 @@ function Cs(n, e) {
101
101
  return zt(this, null, function* () {
102
102
  var t;
103
103
  e === void 0 && (e = {});
104
- const { x: i, y: r, platform: s, rects: o, elements: a, strategy: l } = n, { boundary: c = "clippingAncestors", rootBoundary: u = "viewport", elementContext: h = "floating", altBoundary: f = !1, padding: d = 0 } = Ki(e, n), g = Xu(d), _ = a[f ? h === "floating" ? "reference" : "floating" : h], m = As(yield s.getClippingRect({ element: (t = yield s.isElement == null ? void 0 : s.isElement(_)) == null || t ? _ : _.contextElement || (yield s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)), boundary: c, rootBoundary: u, strategy: l })), p = h === "floating" ? rt(De({}, o.floating), { x: i, y: r }) : o.reference, S = yield s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating), v = (yield s.isElement == null ? void 0 : s.isElement(S)) && (yield s.getScale == null ? void 0 : s.getScale(S)) || { x: 1, y: 1 }, M = As(s.convertOffsetParentRelativeRectToViewportRelativeRect ? yield s.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: p, offsetParent: S, strategy: l }) : p);
104
+ const { x: i, y: r, platform: s, rects: o, elements: a, strategy: l } = n, { boundary: c = "clippingAncestors", rootBoundary: u = "viewport", elementContext: h = "floating", altBoundary: f = !1, padding: d = 0 } = Ki(e, n), g = Xu(d), _ = a[f ? h === "floating" ? "reference" : "floating" : h], m = As(yield s.getClippingRect({ element: (t = yield s.isElement == null ? void 0 : s.isElement(_)) == null || t ? _ : _.contextElement || (yield s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)), boundary: c, rootBoundary: u, strategy: l })), p = h === "floating" ? rt(De({}, o.floating), { x: i, y: r }) : o.reference, y = yield s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating), v = (yield s.isElement == null ? void 0 : s.isElement(y)) && (yield s.getScale == null ? void 0 : s.getScale(y)) || { x: 1, y: 1 }, M = As(s.convertOffsetParentRelativeRectToViewportRelativeRect ? yield s.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: p, offsetParent: y, strategy: l }) : p);
105
105
  return { top: (m.top - M.top + g.top) / v.y, bottom: (M.bottom - m.bottom + g.bottom) / v.y, left: (m.left - M.left + g.left) / v.x, right: (M.right - m.right + g.right) / v.x };
106
106
  });
107
107
  }
@@ -114,10 +114,10 @@ const Af = (n) => ({ name: "arrow", options: n, fn(t) {
114
114
  const { x: i, y: r, placement: s, rects: o, platform: a, elements: l } = t, { element: c, padding: u = 0 } = Ki(n, t) || {};
115
115
  if (c == null)
116
116
  return {};
117
- const h = Xu(u), f = { x: i, y: r }, d = Lr(s), g = Ea(d), _ = yield a.getDimensions(c), m = d === "y", p = m ? "top" : "left", S = m ? "bottom" : "right", v = m ? "clientHeight" : "clientWidth", M = o.reference[g] + o.reference[d] - f[d] - o.floating[g], b = f[d] - o.reference[d], R = yield a.getOffsetParent == null ? void 0 : a.getOffsetParent(c);
117
+ const h = Xu(u), f = { x: i, y: r }, d = Pr(s), g = Ea(d), _ = yield a.getDimensions(c), m = d === "y", p = m ? "top" : "left", y = m ? "bottom" : "right", v = m ? "clientHeight" : "clientWidth", M = o.reference[g] + o.reference[d] - f[d] - o.floating[g], b = f[d] - o.reference[d], R = yield a.getOffsetParent == null ? void 0 : a.getOffsetParent(c);
118
118
  let w = R ? R[v] : 0;
119
119
  w && (yield a.isElement == null ? void 0 : a.isElement(R)) || (w = l.floating[v] || o.floating[g]);
120
- const N = M / 2 - b / 2, x = w / 2 - _[g] / 2 - 1, E = Yo(h[p], x), F = Yo(h[S], x), ee = E, O = w - _[g] - F, U = w / 2 - _[g] / 2 + N, C = Ko(ee, U, O), z = Pr(s) != null && U != C && o.reference[g] / 2 - (U < ee ? E : F) - _[g] / 2 < 0 ? U < ee ? ee - U : O - U : 0;
120
+ const N = M / 2 - b / 2, x = w / 2 - _[g] / 2 - 1, E = Yo(h[p], x), F = Yo(h[y], x), ee = E, O = w - _[g] - F, U = w / 2 - _[g] / 2 + N, C = Ko(ee, U, O), z = Lr(s) != null && U != C && o.reference[g] / 2 - (U < ee ? E : F) - _[g] / 2 < 0 ? U < ee ? ee - U : O - U : 0;
121
121
  return { [d]: f[d] - z, data: { [d]: C, centerOffset: U - C + z } };
122
122
  });
123
123
  } }), $u = ["top", "right", "bottom", "left"];
@@ -128,24 +128,24 @@ function Rs(n) {
128
128
  }
129
129
  function Rf(n, e, t) {
130
130
  t === void 0 && (t = !1);
131
- const i = Pr(n), r = Lr(n), s = Ea(r);
131
+ const i = Lr(n), r = Pr(n), s = Ea(r);
132
132
  let o = r === "x" ? i === (t ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
133
133
  return e.reference[s] > e.floating[s] && (o = Rs(o)), { main: o, cross: Rs(o) };
134
134
  }
135
- const Pf = { start: "end", end: "start" };
135
+ const Lf = { start: "end", end: "start" };
136
136
  function ro(n) {
137
- return n.replace(/start|end/g, (e) => Pf[e]);
137
+ return n.replace(/start|end/g, (e) => Lf[e]);
138
138
  }
139
- const Lf = function(n) {
139
+ const Pf = function(n) {
140
140
  return n === void 0 && (n = {}), { name: "flip", options: n, fn(t) {
141
141
  return zt(this, null, function* () {
142
142
  var i;
143
- const { placement: r, middlewareData: s, rects: o, initialPlacement: a, platform: l, elements: c } = t, ee = Ki(n, t), { mainAxis: u = !0, crossAxis: h = !0, fallbackPlacements: f, fallbackStrategy: d = "bestFit", fallbackAxisSideDirection: g = "none", flipAlignment: _ = !0 } = ee, m = zr(ee, ["mainAxis", "crossAxis", "fallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment"]), p = si(r), S = si(a) === a, v = yield l.isRTL == null ? void 0 : l.isRTL(c.floating), M = f || (S || !_ ? [Rs(a)] : function(O) {
143
+ const { placement: r, middlewareData: s, rects: o, initialPlacement: a, platform: l, elements: c } = t, ee = Ki(n, t), { mainAxis: u = !0, crossAxis: h = !0, fallbackPlacements: f, fallbackStrategy: d = "bestFit", fallbackAxisSideDirection: g = "none", flipAlignment: _ = !0 } = ee, m = zr(ee, ["mainAxis", "crossAxis", "fallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment"]), p = si(r), y = si(a) === a, v = yield l.isRTL == null ? void 0 : l.isRTL(c.floating), M = f || (y || !_ ? [Rs(a)] : function(O) {
144
144
  const U = Rs(O);
145
145
  return [ro(O), U, ro(U)];
146
146
  }(a));
147
147
  f || g === "none" || M.push(...function(O, U, C, z) {
148
- const H = Pr(O);
148
+ const H = Lr(O);
149
149
  let V = function(K, Q, B) {
150
150
  const q = ["left", "right"], oe = ["right", "left"], me = ["top", "bottom"], ge = ["bottom", "top"];
151
151
  switch (K) {
@@ -220,9 +220,9 @@ const Df = function(n) {
220
220
  return zt(this, null, function* () {
221
221
  const { x: i, y: r } = t, s = yield function(o, a) {
222
222
  return zt(this, null, function* () {
223
- const { placement: l, platform: c, elements: u } = o, h = yield c.isRTL == null ? void 0 : c.isRTL(u.floating), f = si(l), d = Pr(l), g = Lr(l) === "x", _ = ["left", "top"].includes(f) ? -1 : 1, m = h && g ? -1 : 1, p = Ki(a, o);
224
- let { mainAxis: S, crossAxis: v, alignmentAxis: M } = typeof p == "number" ? { mainAxis: p, crossAxis: 0, alignmentAxis: null } : De({ mainAxis: 0, crossAxis: 0, alignmentAxis: null }, p);
225
- return d && typeof M == "number" && (v = d === "end" ? -1 * M : M), g ? { x: v * m, y: S * _ } : { x: S * _, y: v * m };
223
+ const { placement: l, platform: c, elements: u } = o, h = yield c.isRTL == null ? void 0 : c.isRTL(u.floating), f = si(l), d = Lr(l), g = Pr(l) === "x", _ = ["left", "top"].includes(f) ? -1 : 1, m = h && g ? -1 : 1, p = Ki(a, o);
224
+ let { mainAxis: y, crossAxis: v, alignmentAxis: M } = typeof p == "number" ? { mainAxis: p, crossAxis: 0, alignmentAxis: null } : De({ mainAxis: 0, crossAxis: 0, alignmentAxis: null }, p);
225
+ return d && typeof M == "number" && (v = d === "end" ? -1 * M : M), g ? { x: v * m, y: y * _ } : { x: y * _, y: v * m };
226
226
  });
227
227
  }(t, n);
228
228
  return { x: i + s.x, y: r + s.y, data: s };
@@ -235,18 +235,18 @@ function Uf(n) {
235
235
  const Nf = function(n) {
236
236
  return n === void 0 && (n = {}), { name: "shift", options: n, fn(t) {
237
237
  return zt(this, null, function* () {
238
- const { x: i, y: r, placement: s } = t, p = Ki(n, t), { mainAxis: o = !0, crossAxis: a = !1, limiter: l = { fn: (S) => {
239
- let { x: v, y: M } = S;
238
+ const { x: i, y: r, placement: s } = t, p = Ki(n, t), { mainAxis: o = !0, crossAxis: a = !1, limiter: l = { fn: (y) => {
239
+ let { x: v, y: M } = y;
240
240
  return { x: v, y: M };
241
- } } } = p, c = zr(p, ["mainAxis", "crossAxis", "limiter"]), u = { x: i, y: r }, h = yield Cs(t, c), f = Lr(si(s)), d = Uf(f);
241
+ } } } = p, c = zr(p, ["mainAxis", "crossAxis", "limiter"]), u = { x: i, y: r }, h = yield Cs(t, c), f = Pr(si(s)), d = Uf(f);
242
242
  let g = u[f], _ = u[d];
243
243
  if (o) {
244
- const S = f === "y" ? "bottom" : "right";
245
- g = Ko(g + h[f === "y" ? "top" : "left"], g, g - h[S]);
244
+ const y = f === "y" ? "bottom" : "right";
245
+ g = Ko(g + h[f === "y" ? "top" : "left"], g, g - h[y]);
246
246
  }
247
247
  if (a) {
248
- const S = d === "y" ? "bottom" : "right";
249
- _ = Ko(_ + h[d === "y" ? "top" : "left"], _, _ - h[S]);
248
+ const y = d === "y" ? "bottom" : "right";
249
+ _ = Ko(_ + h[d === "y" ? "top" : "left"], _, _ - h[y]);
250
250
  }
251
251
  const m = l.fn(rt(De({}, t), { [f]: g, [d]: _ }));
252
252
  return rt(De({}, m), { data: { x: m.x - i, y: m.y - r } });
@@ -269,7 +269,7 @@ function qn(n) {
269
269
  function ln(n) {
270
270
  return n instanceof qt(n).HTMLElement;
271
271
  }
272
- function Pn(n) {
272
+ function Ln(n) {
273
273
  return n instanceof qt(n).Element;
274
274
  }
275
275
  function ul(n) {
@@ -292,22 +292,22 @@ function ba() {
292
292
  function Hs(n) {
293
293
  return ["html", "body", "#document"].includes(qn(n));
294
294
  }
295
- const Jo = Math.min, Bi = Math.max, Ps = Math.round, Hr = Math.floor, hi = (n) => ({ x: n, y: n });
295
+ const Jo = Math.min, Bi = Math.max, Ls = Math.round, Hr = Math.floor, hi = (n) => ({ x: n, y: n });
296
296
  function ju(n) {
297
297
  const e = on(n);
298
298
  let t = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
299
- const r = ln(n), s = r ? n.offsetWidth : t, o = r ? n.offsetHeight : i, a = Ps(t) !== s || Ps(i) !== o;
299
+ const r = ln(n), s = r ? n.offsetWidth : t, o = r ? n.offsetHeight : i, a = Ls(t) !== s || Ls(i) !== o;
300
300
  return a && (t = s, i = o), { width: t, height: i, $: a };
301
301
  }
302
302
  function Ta(n) {
303
- return Pn(n) ? n : n.contextElement;
303
+ return Ln(n) ? n : n.contextElement;
304
304
  }
305
305
  function zi(n) {
306
306
  const e = Ta(n);
307
307
  if (!ln(e))
308
308
  return hi(1);
309
309
  const t = e.getBoundingClientRect(), { width: i, height: r, $: s } = ju(e);
310
- let o = (s ? Ps(t.width) : t.width) / i, a = (s ? Ps(t.height) : t.height) / r;
310
+ let o = (s ? Ls(t.width) : t.width) / i, a = (s ? Ls(t.height) : t.height) / r;
311
311
  return o && Number.isFinite(o) || (o = 1), a && Number.isFinite(a) || (a = 1), { x: o, y: a };
312
312
  }
313
313
  const hl = hi(0);
@@ -322,49 +322,49 @@ function fi(n, e, t, i) {
322
322
  e === void 0 && (e = !1), t === void 0 && (t = !1);
323
323
  const r = n.getBoundingClientRect(), s = Ta(n);
324
324
  let o = hi(1);
325
- e && (i ? Pn(i) && (o = zi(i)) : o = zi(n));
325
+ e && (i ? Ln(i) && (o = zi(i)) : o = zi(n));
326
326
  const a = Yu(s, t, i);
327
327
  let l = (r.left + a.x) / o.x, c = (r.top + a.y) / o.y, u = r.width / o.x, h = r.height / o.y;
328
328
  if (s) {
329
- const f = qt(s), d = i && Pn(i) ? qt(i) : i;
329
+ const f = qt(s), d = i && Ln(i) ? qt(i) : i;
330
330
  let g = f.frameElement;
331
331
  for (; g && i && d !== f; ) {
332
- const _ = zi(g), m = g.getBoundingClientRect(), p = getComputedStyle(g), S = m.left + (g.clientLeft + parseFloat(p.paddingLeft)) * _.x, v = m.top + (g.clientTop + parseFloat(p.paddingTop)) * _.y;
333
- l *= _.x, c *= _.y, u *= _.x, h *= _.y, l += S, c += v, g = qt(g).frameElement;
332
+ const _ = zi(g), m = g.getBoundingClientRect(), p = getComputedStyle(g), y = m.left + (g.clientLeft + parseFloat(p.paddingLeft)) * _.x, v = m.top + (g.clientTop + parseFloat(p.paddingTop)) * _.y;
333
+ l *= _.x, c *= _.y, u *= _.x, h *= _.y, l += y, c += v, g = qt(g).frameElement;
334
334
  }
335
335
  }
336
336
  return As({ width: u, height: h, x: l, y: c });
337
337
  }
338
- function Ln(n) {
338
+ function Pn(n) {
339
339
  return ((qu(n) ? n.ownerDocument : n.document) || window.document).documentElement;
340
340
  }
341
341
  function ks(n) {
342
- return Pn(n) ? { scrollLeft: n.scrollLeft, scrollTop: n.scrollTop } : { scrollLeft: n.pageXOffset, scrollTop: n.pageYOffset };
342
+ return Ln(n) ? { scrollLeft: n.scrollLeft, scrollTop: n.scrollTop } : { scrollLeft: n.pageXOffset, scrollTop: n.pageYOffset };
343
343
  }
344
344
  function Ku(n) {
345
- return fi(Ln(n)).left + ks(n).scrollLeft;
345
+ return fi(Pn(n)).left + ks(n).scrollLeft;
346
346
  }
347
347
  function Gi(n) {
348
348
  if (qn(n) === "html")
349
349
  return n;
350
- const e = n.assignedSlot || n.parentNode || ul(n) && n.host || Ln(n);
350
+ const e = n.assignedSlot || n.parentNode || ul(n) && n.host || Pn(n);
351
351
  return ul(e) ? e.host : e;
352
352
  }
353
353
  function Zu(n) {
354
354
  const e = Gi(n);
355
355
  return Hs(e) ? n.ownerDocument ? n.ownerDocument.body : n.body : ln(e) && xr(e) ? e : Zu(e);
356
356
  }
357
- function Ls(n, e) {
357
+ function Ps(n, e) {
358
358
  var t;
359
359
  e === void 0 && (e = []);
360
360
  const i = Zu(n), r = i === ((t = n.ownerDocument) == null ? void 0 : t.body), s = qt(i);
361
- return r ? e.concat(s, s.visualViewport || [], xr(i) ? i : []) : e.concat(i, Ls(i));
361
+ return r ? e.concat(s, s.visualViewport || [], xr(i) ? i : []) : e.concat(i, Ps(i));
362
362
  }
363
363
  function fl(n, e, t) {
364
364
  let i;
365
365
  if (e === "viewport")
366
366
  i = function(r, s) {
367
- const o = qt(r), a = Ln(r), l = o.visualViewport;
367
+ const o = qt(r), a = Pn(r), l = o.visualViewport;
368
368
  let c = a.clientWidth, u = a.clientHeight, h = 0, f = 0;
369
369
  if (l) {
370
370
  c = l.width, u = l.height;
@@ -375,12 +375,12 @@ function fl(n, e, t) {
375
375
  }(n, t);
376
376
  else if (e === "document")
377
377
  i = function(r) {
378
- const s = Ln(r), o = ks(r), a = r.ownerDocument.body, l = Bi(s.scrollWidth, s.clientWidth, a.scrollWidth, a.clientWidth), c = Bi(s.scrollHeight, s.clientHeight, a.scrollHeight, a.clientHeight);
378
+ const s = Pn(r), o = ks(r), a = r.ownerDocument.body, l = Bi(s.scrollWidth, s.clientWidth, a.scrollWidth, a.clientWidth), c = Bi(s.scrollHeight, s.clientHeight, a.scrollHeight, a.clientHeight);
379
379
  let u = -o.scrollLeft + Ku(r);
380
380
  const h = -o.scrollTop;
381
381
  return on(a).direction === "rtl" && (u += Bi(s.clientWidth, a.clientWidth) - l), { width: l, height: c, x: u, y: h };
382
- }(Ln(n));
383
- else if (Pn(e))
382
+ }(Pn(n));
383
+ else if (Ln(e))
384
384
  i = function(r, s) {
385
385
  const o = fi(r, !0, s === "fixed"), a = o.top + r.clientTop, l = o.left + r.clientLeft, c = ln(r) ? zi(r) : hi(1);
386
386
  return { width: r.clientWidth * c.x, height: r.clientHeight * c.y, x: l * c.x, y: a * c.y };
@@ -393,7 +393,7 @@ function fl(n, e, t) {
393
393
  }
394
394
  function Ju(n, e) {
395
395
  const t = Gi(n);
396
- return !(t === e || !Pn(t) || Hs(t)) && (on(t).position === "fixed" || Ju(t, e));
396
+ return !(t === e || !Ln(t) || Hs(t)) && (on(t).position === "fixed" || Ju(t, e));
397
397
  }
398
398
  function dl(n, e) {
399
399
  return ln(n) && on(n).position !== "fixed" ? e ? e(n) : n.offsetParent : null;
@@ -416,7 +416,7 @@ function pl(n, e) {
416
416
  }(n) || t;
417
417
  }
418
418
  function Ff(n, e, t) {
419
- const i = ln(e), r = Ln(e), s = t === "fixed", o = fi(n, !0, s, e);
419
+ const i = ln(e), r = Pn(e), s = t === "fixed", o = fi(n, !0, s, e);
420
420
  let a = { scrollLeft: 0, scrollTop: 0 };
421
421
  const l = hi(0);
422
422
  if (i || !i && !s)
@@ -433,12 +433,12 @@ const Bf = { getClippingRect: function(n) {
433
433
  const h = u.get(c);
434
434
  if (h)
435
435
  return h;
436
- let f = Ls(c).filter((m) => Pn(m) && qn(m) !== "body"), d = null;
436
+ let f = Ps(c).filter((m) => Ln(m) && qn(m) !== "body"), d = null;
437
437
  const g = on(c).position === "fixed";
438
438
  let _ = g ? Gi(c) : c;
439
- for (; Pn(_) && !Hs(_); ) {
439
+ for (; Ln(_) && !Hs(_); ) {
440
440
  const m = on(_), p = Zo(_);
441
- p || m.position !== "fixed" || (d = null), (g ? !p && !d : !p && m.position === "static" && d && ["absolute", "fixed"].includes(d.position) || xr(_) && !p && Ju(c, _)) ? f = f.filter((S) => S !== _) : d = m, _ = Gi(_);
441
+ p || m.position !== "fixed" || (d = null), (g ? !p && !d : !p && m.position === "static" && d && ["absolute", "fixed"].includes(d.position) || xr(_) && !p && Ju(c, _)) ? f = f.filter((y) => y !== _) : d = m, _ = Gi(_);
442
442
  }
443
443
  return u.set(c, f), f;
444
444
  }(e, this._c) : [].concat(t), o = [...s, i], a = o[0], l = o.reduce((c, u) => {
@@ -448,7 +448,7 @@ const Bf = { getClippingRect: function(n) {
448
448
  return { width: l.right - l.left, height: l.bottom - l.top, x: l.left, y: l.top };
449
449
  }, convertOffsetParentRelativeRectToViewportRelativeRect: function(n) {
450
450
  let { rect: e, offsetParent: t, strategy: i } = n;
451
- const r = ln(t), s = Ln(t);
451
+ const r = ln(t), s = Pn(t);
452
452
  if (t === s)
453
453
  return e;
454
454
  let o = { scrollLeft: 0, scrollTop: 0 }, a = hi(1);
@@ -458,9 +458,9 @@ const Bf = { getClippingRect: function(n) {
458
458
  a = zi(t), l.x = c.x + t.clientLeft, l.y = c.y + t.clientTop;
459
459
  }
460
460
  return { width: e.width * a.x, height: e.height * a.y, x: e.x * a.x - o.scrollLeft * a.x + l.x, y: e.y * a.y - o.scrollTop * a.y + l.y };
461
- }, isElement: Pn, getDimensions: function(n) {
461
+ }, isElement: Ln, getDimensions: function(n) {
462
462
  return ju(n);
463
- }, getOffsetParent: pl, getDocumentElement: Ln, getScale: zi, getElementRects(n) {
463
+ }, getOffsetParent: pl, getDocumentElement: Pn, getScale: zi, getElementRects(n) {
464
464
  return zt(this, null, function* () {
465
465
  let { reference: e, floating: t, strategy: i } = n;
466
466
  const r = this.getOffsetParent || pl, s = this.getDimensions;
@@ -469,15 +469,15 @@ const Bf = { getClippingRect: function(n) {
469
469
  }, getClientRects: (n) => Array.from(n.getClientRects()), isRTL: (n) => on(n).direction === "rtl" };
470
470
  function zf(n, e, t, i) {
471
471
  i === void 0 && (i = {});
472
- const { ancestorScroll: r = !0, ancestorResize: s = !0, elementResize: o = !0, layoutShift: a = typeof IntersectionObserver == "function", animationFrame: l = !1 } = i, c = Ta(n), u = r || s ? [...c ? Ls(c) : [], ...Ls(e)] : [];
472
+ const { ancestorScroll: r = !0, ancestorResize: s = !0, elementResize: o = !0, layoutShift: a = typeof IntersectionObserver == "function", animationFrame: l = !1 } = i, c = Ta(n), u = r || s ? [...c ? Ps(c) : [], ...Ps(e)] : [];
473
473
  u.forEach((_) => {
474
474
  r && _.addEventListener("scroll", t, { passive: !0 }), s && _.addEventListener("resize", t);
475
475
  });
476
476
  const h = c && a ? function(_, m) {
477
- let p, S = null;
478
- const v = Ln(_);
477
+ let p, y = null;
478
+ const v = Pn(_);
479
479
  function M() {
480
- clearTimeout(p), S && S.disconnect(), S = null;
480
+ clearTimeout(p), y && y.disconnect(), y = null;
481
481
  }
482
482
  return function b(R, w) {
483
483
  R === void 0 && (R = !1), w === void 0 && (w = 1), M();
@@ -486,7 +486,7 @@ function zf(n, e, t, i) {
486
486
  return;
487
487
  const ee = Hr(x), O = Hr(v.clientWidth - (N + E)), U = Hr(v.clientHeight - (x + F)), C = Hr(N);
488
488
  let z = !0;
489
- S = new IntersectionObserver((H) => {
489
+ y = new IntersectionObserver((H) => {
490
490
  const V = H[0].intersectionRatio;
491
491
  if (V !== w) {
492
492
  if (!z)
@@ -496,7 +496,7 @@ function zf(n, e, t, i) {
496
496
  }, 100);
497
497
  }
498
498
  z = !1;
499
- }, { rootMargin: -ee + "px " + -O + "px " + -U + "px " + -C + "px", threshold: Bi(0, Jo(1, w)) || 1 }), S.observe(_);
499
+ }, { rootMargin: -ee + "px " + -O + "px " + -U + "px " + -C + "px", threshold: Bi(0, Jo(1, w)) || 1 }), y.observe(_);
500
500
  }(!0), M;
501
501
  }(c, t) : null;
502
502
  let f, d = null;
@@ -614,7 +614,7 @@ const Vf = {
614
614
  document.body.appendChild(this.$refs.popover), zf(this.$refs.trigger, this.$refs.popover, () => {
615
615
  !this.$refs || !this.$refs.trigger || Hf(this.$refs.trigger, this.$refs.popover, {
616
616
  placement: this.placement,
617
- middleware: [If(8), Lf(), Af({ element: this.$refs.arrow }), Nf(), Df()]
617
+ middleware: [If(8), Pf(), Af({ element: this.$refs.arrow }), Nf(), Df()]
618
618
  }).then(({ x: t, y: i, placement: r, middlewareData: s }) => {
619
619
  Object.assign(this.$refs.popover.style, {
620
620
  left: `${t}px`,
@@ -1327,22 +1327,22 @@ const Rd = {
1327
1327
  }
1328
1328
  }
1329
1329
  }, Ml = {};
1330
- var Pd = /* @__PURE__ */ Tt(
1330
+ var Ld = /* @__PURE__ */ Tt(
1331
1331
  Rd,
1332
1332
  Ad,
1333
1333
  Cd,
1334
1334
  !1,
1335
- Ld,
1335
+ Pd,
1336
1336
  "34a73120",
1337
1337
  null,
1338
1338
  null
1339
1339
  );
1340
- function Ld(n) {
1340
+ function Pd(n) {
1341
1341
  for (let e in Ml)
1342
1342
  this[e] = Ml[e];
1343
1343
  }
1344
1344
  const eh = /* @__PURE__ */ function() {
1345
- return Pd.exports;
1345
+ return Ld.exports;
1346
1346
  }();
1347
1347
  var Dd = function() {
1348
1348
  var n = this, e = n.$createElement, t = n._self._c || e;
@@ -2480,7 +2480,7 @@ const bp = {
2480
2480
  }), this.$emit("change", this.isShow);
2481
2481
  }
2482
2482
  }
2483
- }, Pl = {};
2483
+ }, Ll = {};
2484
2484
  var Tp = /* @__PURE__ */ Tt(
2485
2485
  bp,
2486
2486
  Mp,
@@ -2492,8 +2492,8 @@ var Tp = /* @__PURE__ */ Tt(
2492
2492
  null
2493
2493
  );
2494
2494
  function wp(n) {
2495
- for (let e in Pl)
2496
- this[e] = Pl[e];
2495
+ for (let e in Ll)
2496
+ this[e] = Ll[e];
2497
2497
  }
2498
2498
  const Ap = /* @__PURE__ */ function() {
2499
2499
  return Tp.exports;
@@ -2503,7 +2503,7 @@ const Ap = /* @__PURE__ */ function() {
2503
2503
  * Copyright 2010-2023 Three.js Authors
2504
2504
  * SPDX-License-Identifier: MIT
2505
2505
  */
2506
- const Aa = "156", zn = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, _i = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, Cp = 0, Ll = 1, Rp = 2, nh = 1, Pp = 2, An = 3, jn = 0, Ot = 1, Cn = 2, Wn = 0, Hi = 1, Dl = 2, Il = 3, Ul = 4, Lp = 5, Ni = 100, Dp = 101, Ip = 102, Nl = 103, Ol = 104, Up = 200, Np = 201, Op = 202, Fp = 203, ih = 204, rh = 205, Bp = 206, zp = 207, Hp = 208, kp = 209, Gp = 210, Vp = 0, Wp = 1, Xp = 2, ea = 3, $p = 4, qp = 5, jp = 6, Yp = 7, Ca = 0, Kp = 1, Zp = 2, Xn = 0, Jp = 1, Qp = 2, em = 3, tm = 4, nm = 5, sh = 300, Vi = 301, Wi = 302, ta = 303, na = 304, Gs = 306, ia = 1e3, nn = 1001, ra = 1002, Dt = 1003, Fl = 1004, so = 1005, $t = 1006, im = 1007, yr = 1008, $n = 1009, rm = 1010, sm = 1011, Ra = 1012, oh = 1013, kn = 1014, Gn = 1015, Sr = 1016, ah = 1017, lh = 1018, oi = 1020, om = 1021, rn = 1023, am = 1024, lm = 1025, ai = 1026, Xi = 1027, cm = 1028, ch = 1029, um = 1030, uh = 1031, hh = 1033, oo = 33776, ao = 33777, lo = 33778, co = 33779, Bl = 35840, zl = 35841, Hl = 35842, kl = 35843, hm = 36196, Gl = 37492, Vl = 37496, Wl = 37808, Xl = 37809, $l = 37810, ql = 37811, jl = 37812, Yl = 37813, Kl = 37814, Zl = 37815, Jl = 37816, Ql = 37817, ec = 37818, tc = 37819, nc = 37820, ic = 37821, uo = 36492, rc = 36494, sc = 36495, fm = 36283, oc = 36284, ac = 36285, lc = 36286, fh = 3e3, li = 3001, dm = 3200, pm = 3201, dh = 0, mm = 1, ci = "", nt = "srgb", gn = "srgb-linear", Vs = "display-p3", ho = 7680, gm = 519, _m = 512, vm = 513, xm = 514, ym = 515, Sm = 516, Mm = 517, Em = 518, bm = 519, sa = 35044, cc = "300 es", oa = 1035, Rn = 2e3, Ds = 2001;
2506
+ const Aa = "156", zn = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, _i = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, Cp = 0, Pl = 1, Rp = 2, nh = 1, Lp = 2, An = 3, jn = 0, Ot = 1, Cn = 2, Wn = 0, Hi = 1, Dl = 2, Il = 3, Ul = 4, Pp = 5, Ni = 100, Dp = 101, Ip = 102, Nl = 103, Ol = 104, Up = 200, Np = 201, Op = 202, Fp = 203, ih = 204, rh = 205, Bp = 206, zp = 207, Hp = 208, kp = 209, Gp = 210, Vp = 0, Wp = 1, Xp = 2, ea = 3, $p = 4, qp = 5, jp = 6, Yp = 7, Ca = 0, Kp = 1, Zp = 2, Xn = 0, Jp = 1, Qp = 2, em = 3, tm = 4, nm = 5, sh = 300, Vi = 301, Wi = 302, ta = 303, na = 304, Gs = 306, ia = 1e3, nn = 1001, ra = 1002, Dt = 1003, Fl = 1004, so = 1005, $t = 1006, im = 1007, yr = 1008, $n = 1009, rm = 1010, sm = 1011, Ra = 1012, oh = 1013, kn = 1014, Gn = 1015, Sr = 1016, ah = 1017, lh = 1018, oi = 1020, om = 1021, rn = 1023, am = 1024, lm = 1025, ai = 1026, Xi = 1027, cm = 1028, ch = 1029, um = 1030, uh = 1031, hh = 1033, oo = 33776, ao = 33777, lo = 33778, co = 33779, Bl = 35840, zl = 35841, Hl = 35842, kl = 35843, hm = 36196, Gl = 37492, Vl = 37496, Wl = 37808, Xl = 37809, $l = 37810, ql = 37811, jl = 37812, Yl = 37813, Kl = 37814, Zl = 37815, Jl = 37816, Ql = 37817, ec = 37818, tc = 37819, nc = 37820, ic = 37821, uo = 36492, rc = 36494, sc = 36495, fm = 36283, oc = 36284, ac = 36285, lc = 36286, fh = 3e3, li = 3001, dm = 3200, pm = 3201, dh = 0, mm = 1, ci = "", nt = "srgb", gn = "srgb-linear", Vs = "display-p3", ho = 7680, gm = 519, _m = 512, vm = 513, xm = 514, ym = 515, Sm = 516, Mm = 517, Em = 518, bm = 519, sa = 35044, cc = "300 es", oa = 1035, Rn = 2e3, Ds = 2001;
2507
2507
  class gi {
2508
2508
  addEventListener(e, t) {
2509
2509
  this._listeners === void 0 && (this._listeners = {});
@@ -2548,7 +2548,7 @@ function mn() {
2548
2548
  function vt(n, e, t) {
2549
2549
  return Math.max(e, Math.min(t, n));
2550
2550
  }
2551
- function Pa(n, e) {
2551
+ function La(n, e) {
2552
2552
  return (n % e + e) % e;
2553
2553
  }
2554
2554
  function Tm(n, e, t, i, r) {
@@ -2564,15 +2564,15 @@ function Am(n, e, t, i) {
2564
2564
  return dr(n, e, 1 - Math.exp(-t * i));
2565
2565
  }
2566
2566
  function Cm(n, e = 1) {
2567
- return e - Math.abs(Pa(n, e * 2) - e);
2567
+ return e - Math.abs(La(n, e * 2) - e);
2568
2568
  }
2569
2569
  function Rm(n, e, t) {
2570
2570
  return n <= e ? 0 : n >= t ? 1 : (n = (n - e) / (t - e), n * n * (3 - 2 * n));
2571
2571
  }
2572
- function Pm(n, e, t) {
2572
+ function Lm(n, e, t) {
2573
2573
  return n <= e ? 0 : n >= t ? 1 : (n = (n - e) / (t - e), n * n * n * (n * (n * 6 - 15) + 10));
2574
2574
  }
2575
- function Lm(n, e) {
2575
+ function Pm(n, e) {
2576
2576
  return n + Math.floor(Math.random() * (e - n + 1));
2577
2577
  }
2578
2578
  function Dm(n, e) {
@@ -2671,15 +2671,15 @@ const ph = {
2671
2671
  RAD2DEG: Mr,
2672
2672
  generateUUID: mn,
2673
2673
  clamp: vt,
2674
- euclideanModulo: Pa,
2674
+ euclideanModulo: La,
2675
2675
  mapLinear: Tm,
2676
2676
  inverseLerp: wm,
2677
2677
  lerp: dr,
2678
2678
  damp: Am,
2679
2679
  pingpong: Cm,
2680
2680
  smoothstep: Rm,
2681
- smootherstep: Pm,
2682
- randInt: Lm,
2681
+ smootherstep: Lm,
2682
+ randInt: Pm,
2683
2683
  randFloat: Dm,
2684
2684
  randFloatSpread: Im,
2685
2685
  seededRandom: Um,
@@ -2946,8 +2946,8 @@ class Be {
2946
2946
  return this.multiplyMatrices(e, this);
2947
2947
  }
2948
2948
  multiplyMatrices(e, t) {
2949
- const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[3], l = i[6], c = i[1], u = i[4], h = i[7], f = i[2], d = i[5], g = i[8], _ = r[0], m = r[3], p = r[6], S = r[1], v = r[4], M = r[7], b = r[2], R = r[5], w = r[8];
2950
- return s[0] = o * _ + a * S + l * b, s[3] = o * m + a * v + l * R, s[6] = o * p + a * M + l * w, s[1] = c * _ + u * S + h * b, s[4] = c * m + u * v + h * R, s[7] = c * p + u * M + h * w, s[2] = f * _ + d * S + g * b, s[5] = f * m + d * v + g * R, s[8] = f * p + d * M + g * w, this;
2949
+ const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[3], l = i[6], c = i[1], u = i[4], h = i[7], f = i[2], d = i[5], g = i[8], _ = r[0], m = r[3], p = r[6], y = r[1], v = r[4], M = r[7], b = r[2], R = r[5], w = r[8];
2950
+ return s[0] = o * _ + a * y + l * b, s[3] = o * m + a * v + l * R, s[6] = o * p + a * M + l * w, s[1] = c * _ + u * y + h * b, s[4] = c * m + u * v + h * R, s[7] = c * p + u * M + h * w, s[2] = f * _ + d * y + g * b, s[5] = f * m + d * v + g * R, s[8] = f * p + d * M + g * w, this;
2951
2951
  }
2952
2952
  multiplyScalar(e) {
2953
2953
  const t = this.elements;
@@ -3456,8 +3456,8 @@ class Ke {
3456
3456
  const v = (c + 1) / 2, M = (d + 1) / 2, b = (p + 1) / 2, R = (u + f) / 4, w = (h + _) / 4, N = (g + m) / 4;
3457
3457
  return v > M && v > b ? v < 0.01 ? (i = 0, r = 0.707106781, s = 0.707106781) : (i = Math.sqrt(v), r = R / i, s = w / i) : M > b ? M < 0.01 ? (i = 0.707106781, r = 0, s = 0.707106781) : (r = Math.sqrt(M), i = R / r, s = N / r) : b < 0.01 ? (i = 0.707106781, r = 0.707106781, s = 0) : (s = Math.sqrt(b), i = w / s, r = N / s), this.set(i, r, s, t), this;
3458
3458
  }
3459
- let S = Math.sqrt((m - g) * (m - g) + (h - _) * (h - _) + (f - u) * (f - u));
3460
- return Math.abs(S) < 1e-3 && (S = 1), this.x = (m - g) / S, this.y = (h - _) / S, this.z = (f - u) / S, this.w = Math.acos((c + d + p - 1) / 2), this;
3459
+ let y = Math.sqrt((m - g) * (m - g) + (h - _) * (h - _) + (f - u) * (f - u));
3460
+ return Math.abs(y) < 1e-3 && (y = 1), this.x = (m - g) / y, this.y = (h - _) / y, this.z = (f - u) / y, this.w = Math.acos((c + d + p - 1) / 2), this;
3461
3461
  }
3462
3462
  min(e) {
3463
3463
  return this.x = Math.min(this.x, e.x), this.y = Math.min(this.y, e.y), this.z = Math.min(this.z, e.z), this.w = Math.min(this.w, e.w), this;
@@ -3586,12 +3586,12 @@ class pi {
3586
3586
  }
3587
3587
  if (h !== _ || l !== f || c !== d || u !== g) {
3588
3588
  let m = 1 - a;
3589
- const p = l * f + c * d + u * g + h * _, S = p >= 0 ? 1 : -1, v = 1 - p * p;
3589
+ const p = l * f + c * d + u * g + h * _, y = p >= 0 ? 1 : -1, v = 1 - p * p;
3590
3590
  if (v > Number.EPSILON) {
3591
- const b = Math.sqrt(v), R = Math.atan2(b, p * S);
3591
+ const b = Math.sqrt(v), R = Math.atan2(b, p * y);
3592
3592
  m = Math.sin(m * R) / b, a = Math.sin(a * R) / b;
3593
3593
  }
3594
- const M = a * S;
3594
+ const M = a * y;
3595
3595
  if (l = l * m + f * M, c = c * m + d * M, u = u * m + g * M, h = h * m + _ * M, m === 1 - a) {
3596
3596
  const b = 1 / Math.sqrt(l * l + c * c + u * u + h * h);
3597
3597
  l *= b, c *= b, u *= b, h *= b;
@@ -4307,7 +4307,7 @@ class Dr {
4307
4307
  }
4308
4308
  }
4309
4309
  const En = /* @__PURE__ */ new D(), xo = /* @__PURE__ */ new D(), Vr = /* @__PURE__ */ new D(), Nn = /* @__PURE__ */ new D(), yo = /* @__PURE__ */ new D(), Wr = /* @__PURE__ */ new D(), So = /* @__PURE__ */ new D();
4310
- class La {
4310
+ class Pa {
4311
4311
  constructor(e = new D(), t = new D(0, 0, -1)) {
4312
4312
  this.origin = e, this.direction = t;
4313
4313
  }
@@ -4564,8 +4564,8 @@ class it {
4564
4564
  return this.multiplyMatrices(e, this);
4565
4565
  }
4566
4566
  multiplyMatrices(e, t) {
4567
- const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[4], l = i[8], c = i[12], u = i[1], h = i[5], f = i[9], d = i[13], g = i[2], _ = i[6], m = i[10], p = i[14], S = i[3], v = i[7], M = i[11], b = i[15], R = r[0], w = r[4], N = r[8], x = r[12], E = r[1], F = r[5], ee = r[9], O = r[13], U = r[2], C = r[6], z = r[10], H = r[14], V = r[3], K = r[7], Q = r[11], B = r[15];
4568
- return s[0] = o * R + a * E + l * U + c * V, s[4] = o * w + a * F + l * C + c * K, s[8] = o * N + a * ee + l * z + c * Q, s[12] = o * x + a * O + l * H + c * B, s[1] = u * R + h * E + f * U + d * V, s[5] = u * w + h * F + f * C + d * K, s[9] = u * N + h * ee + f * z + d * Q, s[13] = u * x + h * O + f * H + d * B, s[2] = g * R + _ * E + m * U + p * V, s[6] = g * w + _ * F + m * C + p * K, s[10] = g * N + _ * ee + m * z + p * Q, s[14] = g * x + _ * O + m * H + p * B, s[3] = S * R + v * E + M * U + b * V, s[7] = S * w + v * F + M * C + b * K, s[11] = S * N + v * ee + M * z + b * Q, s[15] = S * x + v * O + M * H + b * B, this;
4567
+ const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[4], l = i[8], c = i[12], u = i[1], h = i[5], f = i[9], d = i[13], g = i[2], _ = i[6], m = i[10], p = i[14], y = i[3], v = i[7], M = i[11], b = i[15], R = r[0], w = r[4], N = r[8], x = r[12], E = r[1], F = r[5], ee = r[9], O = r[13], U = r[2], C = r[6], z = r[10], H = r[14], V = r[3], K = r[7], Q = r[11], B = r[15];
4568
+ return s[0] = o * R + a * E + l * U + c * V, s[4] = o * w + a * F + l * C + c * K, s[8] = o * N + a * ee + l * z + c * Q, s[12] = o * x + a * O + l * H + c * B, s[1] = u * R + h * E + f * U + d * V, s[5] = u * w + h * F + f * C + d * K, s[9] = u * N + h * ee + f * z + d * Q, s[13] = u * x + h * O + f * H + d * B, s[2] = g * R + _ * E + m * U + p * V, s[6] = g * w + _ * F + m * C + p * K, s[10] = g * N + _ * ee + m * z + p * Q, s[14] = g * x + _ * O + m * H + p * B, s[3] = y * R + v * E + M * U + b * V, s[7] = y * w + v * F + M * C + b * K, s[11] = y * N + v * ee + M * z + b * Q, s[15] = y * x + v * O + M * H + b * B, this;
4569
4569
  }
4570
4570
  multiplyScalar(e) {
4571
4571
  const t = this.elements;
@@ -4585,11 +4585,11 @@ class it {
4585
4585
  return e.isVector3 ? (r[12] = e.x, r[13] = e.y, r[14] = e.z) : (r[12] = e, r[13] = t, r[14] = i), this;
4586
4586
  }
4587
4587
  invert() {
4588
- const e = this.elements, t = e[0], i = e[1], r = e[2], s = e[3], o = e[4], a = e[5], l = e[6], c = e[7], u = e[8], h = e[9], f = e[10], d = e[11], g = e[12], _ = e[13], m = e[14], p = e[15], S = h * m * c - _ * f * c + _ * l * d - a * m * d - h * l * p + a * f * p, v = g * f * c - u * m * c - g * l * d + o * m * d + u * l * p - o * f * p, M = u * _ * c - g * h * c + g * a * d - o * _ * d - u * a * p + o * h * p, b = g * h * l - u * _ * l - g * a * f + o * _ * f + u * a * m - o * h * m, R = t * S + i * v + r * M + s * b;
4588
+ const e = this.elements, t = e[0], i = e[1], r = e[2], s = e[3], o = e[4], a = e[5], l = e[6], c = e[7], u = e[8], h = e[9], f = e[10], d = e[11], g = e[12], _ = e[13], m = e[14], p = e[15], y = h * m * c - _ * f * c + _ * l * d - a * m * d - h * l * p + a * f * p, v = g * f * c - u * m * c - g * l * d + o * m * d + u * l * p - o * f * p, M = u * _ * c - g * h * c + g * a * d - o * _ * d - u * a * p + o * h * p, b = g * h * l - u * _ * l - g * a * f + o * _ * f + u * a * m - o * h * m, R = t * y + i * v + r * M + s * b;
4589
4589
  if (R === 0)
4590
4590
  return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
4591
4591
  const w = 1 / R;
4592
- return e[0] = S * w, e[1] = (_ * f * s - h * m * s - _ * r * d + i * m * d + h * r * p - i * f * p) * w, e[2] = (a * m * s - _ * l * s + _ * r * c - i * m * c - a * r * p + i * l * p) * w, e[3] = (h * l * s - a * f * s - h * r * c + i * f * c + a * r * d - i * l * d) * w, e[4] = v * w, e[5] = (u * m * s - g * f * s + g * r * d - t * m * d - u * r * p + t * f * p) * w, e[6] = (g * l * s - o * m * s - g * r * c + t * m * c + o * r * p - t * l * p) * w, e[7] = (o * f * s - u * l * s + u * r * c - t * f * c - o * r * d + t * l * d) * w, e[8] = M * w, e[9] = (g * h * s - u * _ * s - g * i * d + t * _ * d + u * i * p - t * h * p) * w, e[10] = (o * _ * s - g * a * s + g * i * c - t * _ * c - o * i * p + t * a * p) * w, e[11] = (u * a * s - o * h * s - u * i * c + t * h * c + o * i * d - t * a * d) * w, e[12] = b * w, e[13] = (u * _ * r - g * h * r + g * i * f - t * _ * f - u * i * m + t * h * m) * w, e[14] = (g * a * r - o * _ * r - g * i * l + t * _ * l + o * i * m - t * a * m) * w, e[15] = (o * h * r - u * a * r + u * i * l - t * h * l - o * i * f + t * a * f) * w, this;
4592
+ return e[0] = y * w, e[1] = (_ * f * s - h * m * s - _ * r * d + i * m * d + h * r * p - i * f * p) * w, e[2] = (a * m * s - _ * l * s + _ * r * c - i * m * c - a * r * p + i * l * p) * w, e[3] = (h * l * s - a * f * s - h * r * c + i * f * c + a * r * d - i * l * d) * w, e[4] = v * w, e[5] = (u * m * s - g * f * s + g * r * d - t * m * d - u * r * p + t * f * p) * w, e[6] = (g * l * s - o * m * s - g * r * c + t * m * c + o * r * p - t * l * p) * w, e[7] = (o * f * s - u * l * s + u * r * c - t * f * c - o * r * d + t * l * d) * w, e[8] = M * w, e[9] = (g * h * s - u * _ * s - g * i * d + t * _ * d + u * i * p - t * h * p) * w, e[10] = (o * _ * s - g * a * s + g * i * c - t * _ * c - o * i * p + t * a * p) * w, e[11] = (u * a * s - o * h * s - u * i * c + t * h * c + o * i * d - t * a * d) * w, e[12] = b * w, e[13] = (u * _ * r - g * h * r + g * i * f - t * _ * f - u * i * m + t * h * m) * w, e[14] = (g * a * r - o * _ * r - g * i * l + t * _ * l + o * i * m - t * a * m) * w, e[15] = (o * h * r - u * a * r + u * i * l - t * h * l - o * i * f + t * a * f) * w, this;
4593
4593
  }
4594
4594
  scale(e) {
4595
4595
  const t = this.elements, i = e.x, r = e.y, s = e.z;
@@ -4761,8 +4761,8 @@ class it {
4761
4761
  ), this;
4762
4762
  }
4763
4763
  compose(e, t, i) {
4764
- const r = this.elements, s = t._x, o = t._y, a = t._z, l = t._w, c = s + s, u = o + o, h = a + a, f = s * c, d = s * u, g = s * h, _ = o * u, m = o * h, p = a * h, S = l * c, v = l * u, M = l * h, b = i.x, R = i.y, w = i.z;
4765
- return r[0] = (1 - (_ + p)) * b, r[1] = (d + M) * b, r[2] = (g - v) * b, r[3] = 0, r[4] = (d - M) * R, r[5] = (1 - (f + p)) * R, r[6] = (m + S) * R, r[7] = 0, r[8] = (g + v) * w, r[9] = (m - S) * w, r[10] = (1 - (f + _)) * w, r[11] = 0, r[12] = e.x, r[13] = e.y, r[14] = e.z, r[15] = 1, this;
4764
+ const r = this.elements, s = t._x, o = t._y, a = t._z, l = t._w, c = s + s, u = o + o, h = a + a, f = s * c, d = s * u, g = s * h, _ = o * u, m = o * h, p = a * h, y = l * c, v = l * u, M = l * h, b = i.x, R = i.y, w = i.z;
4765
+ return r[0] = (1 - (_ + p)) * b, r[1] = (d + M) * b, r[2] = (g - v) * b, r[3] = 0, r[4] = (d - M) * R, r[5] = (1 - (f + p)) * R, r[6] = (m + y) * R, r[7] = 0, r[8] = (g + v) * w, r[9] = (m - y) * w, r[10] = (1 - (f + _)) * w, r[11] = 0, r[12] = e.x, r[13] = e.y, r[14] = e.z, r[15] = 1, this;
4766
4766
  }
4767
4767
  decompose(e, t, i) {
4768
4768
  const r = this.elements;
@@ -5595,7 +5595,7 @@ class je {
5595
5595
  return this.r = e, this.g = t, this.b = i, Zt.toWorkingColorSpace(this, r), this;
5596
5596
  }
5597
5597
  setHSL(e, t, i, r = Zt.workingColorSpace) {
5598
- if (e = Pa(e, 1), t = vt(t, 0, 1), i = vt(i, 0, 1), t === 0)
5598
+ if (e = La(e, 1), t = vt(t, 0, 1), i = vt(i, 0, 1), t === 0)
5599
5599
  this.r = this.g = this.b = i;
5600
5600
  else {
5601
5601
  const s = i <= 0.5 ? i * (1 + t) : i + t - i * t, o = 2 * i - s;
@@ -6053,11 +6053,11 @@ class _n extends gi {
6053
6053
  const l = this.getAttribute("tangent").array, c = [], u = [];
6054
6054
  for (let E = 0; E < a; E++)
6055
6055
  c[E] = new D(), u[E] = new D();
6056
- const h = new D(), f = new D(), d = new D(), g = new ue(), _ = new ue(), m = new ue(), p = new D(), S = new D();
6056
+ const h = new D(), f = new D(), d = new D(), g = new ue(), _ = new ue(), m = new ue(), p = new D(), y = new D();
6057
6057
  function v(E, F, ee) {
6058
6058
  h.fromArray(r, E * 3), f.fromArray(r, F * 3), d.fromArray(r, ee * 3), g.fromArray(o, E * 2), _.fromArray(o, F * 2), m.fromArray(o, ee * 2), f.sub(h), d.sub(h), _.sub(g), m.sub(g);
6059
6059
  const O = 1 / (_.x * m.y - m.x * _.y);
6060
- isFinite(O) && (p.copy(f).multiplyScalar(m.y).addScaledVector(d, -_.y).multiplyScalar(O), S.copy(d).multiplyScalar(_.x).addScaledVector(f, -m.x).multiplyScalar(O), c[E].add(p), c[F].add(p), c[ee].add(p), u[E].add(S), u[F].add(S), u[ee].add(S));
6060
+ isFinite(O) && (p.copy(f).multiplyScalar(m.y).addScaledVector(d, -_.y).multiplyScalar(O), y.copy(d).multiplyScalar(_.x).addScaledVector(f, -m.x).multiplyScalar(O), c[E].add(p), c[F].add(p), c[ee].add(p), u[E].add(y), u[F].add(y), u[ee].add(y));
6061
6061
  }
6062
6062
  let M = this.groups;
6063
6063
  M.length === 0 && (M = [{
@@ -6228,7 +6228,7 @@ class _n extends gi {
6228
6228
  this.dispatchEvent({ type: "dispose" });
6229
6229
  }
6230
6230
  }
6231
- const yc = /* @__PURE__ */ new it(), ti = /* @__PURE__ */ new La(), Kr = /* @__PURE__ */ new Dr(), Sc = /* @__PURE__ */ new D(), Ci = /* @__PURE__ */ new D(), Ri = /* @__PURE__ */ new D(), Pi = /* @__PURE__ */ new D(), Co = /* @__PURE__ */ new D(), Zr = /* @__PURE__ */ new D(), Jr = /* @__PURE__ */ new ue(), Qr = /* @__PURE__ */ new ue(), es = /* @__PURE__ */ new ue(), Mc = /* @__PURE__ */ new D(), Ec = /* @__PURE__ */ new D(), bc = /* @__PURE__ */ new D(), ts = /* @__PURE__ */ new D(), ns = /* @__PURE__ */ new D();
6231
+ const yc = /* @__PURE__ */ new it(), ti = /* @__PURE__ */ new Pa(), Kr = /* @__PURE__ */ new Dr(), Sc = /* @__PURE__ */ new D(), Ci = /* @__PURE__ */ new D(), Ri = /* @__PURE__ */ new D(), Li = /* @__PURE__ */ new D(), Co = /* @__PURE__ */ new D(), Zr = /* @__PURE__ */ new D(), Jr = /* @__PURE__ */ new ue(), Qr = /* @__PURE__ */ new ue(), es = /* @__PURE__ */ new ue(), Mc = /* @__PURE__ */ new D(), Ec = /* @__PURE__ */ new D(), bc = /* @__PURE__ */ new D(), ts = /* @__PURE__ */ new D(), ns = /* @__PURE__ */ new D();
6232
6232
  class pn extends at {
6233
6233
  constructor(e = new _n(), t = new Ia()) {
6234
6234
  super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.updateMorphTargets();
@@ -6273,8 +6273,8 @@ class pn extends at {
6273
6273
  if (a !== null)
6274
6274
  if (Array.isArray(o))
6275
6275
  for (let g = 0, _ = f.length; g < _; g++) {
6276
- const m = f[g], p = o[m.materialIndex], S = Math.max(m.start, d.start), v = Math.min(a.count, Math.min(m.start + m.count, d.start + d.count));
6277
- for (let M = S, b = v; M < b; M += 3) {
6276
+ const m = f[g], p = o[m.materialIndex], y = Math.max(m.start, d.start), v = Math.min(a.count, Math.min(m.start + m.count, d.start + d.count));
6277
+ for (let M = y, b = v; M < b; M += 3) {
6278
6278
  const R = a.getX(M), w = a.getX(M + 1), N = a.getX(M + 2);
6279
6279
  r = is(this, p, e, i, c, u, h, R, w, N), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6280
6280
  }
@@ -6282,15 +6282,15 @@ class pn extends at {
6282
6282
  else {
6283
6283
  const g = Math.max(0, d.start), _ = Math.min(a.count, d.start + d.count);
6284
6284
  for (let m = g, p = _; m < p; m += 3) {
6285
- const S = a.getX(m), v = a.getX(m + 1), M = a.getX(m + 2);
6286
- r = is(this, o, e, i, c, u, h, S, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6285
+ const y = a.getX(m), v = a.getX(m + 1), M = a.getX(m + 2);
6286
+ r = is(this, o, e, i, c, u, h, y, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6287
6287
  }
6288
6288
  }
6289
6289
  else if (l !== void 0)
6290
6290
  if (Array.isArray(o))
6291
6291
  for (let g = 0, _ = f.length; g < _; g++) {
6292
- const m = f[g], p = o[m.materialIndex], S = Math.max(m.start, d.start), v = Math.min(l.count, Math.min(m.start + m.count, d.start + d.count));
6293
- for (let M = S, b = v; M < b; M += 3) {
6292
+ const m = f[g], p = o[m.materialIndex], y = Math.max(m.start, d.start), v = Math.min(l.count, Math.min(m.start + m.count, d.start + d.count));
6293
+ for (let M = y, b = v; M < b; M += 3) {
6294
6294
  const R = M, w = M + 1, N = M + 2;
6295
6295
  r = is(this, p, e, i, c, u, h, R, w, N), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6296
6296
  }
@@ -6298,8 +6298,8 @@ class pn extends at {
6298
6298
  else {
6299
6299
  const g = Math.max(0, d.start), _ = Math.min(l.count, d.start + d.count);
6300
6300
  for (let m = g, p = _; m < p; m += 3) {
6301
- const S = m, v = m + 1, M = m + 2;
6302
- r = is(this, o, e, i, c, u, h, S, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6301
+ const y = m, v = m + 1, M = m + 2;
6302
+ r = is(this, o, e, i, c, u, h, y, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6303
6303
  }
6304
6304
  }
6305
6305
  }
@@ -6317,10 +6317,10 @@ function og(n, e, t, i, r, s, o, a) {
6317
6317
  };
6318
6318
  }
6319
6319
  function is(n, e, t, i, r, s, o, a, l, c) {
6320
- n.getVertexPosition(a, Ci), n.getVertexPosition(l, Ri), n.getVertexPosition(c, Pi);
6321
- const u = og(n, e, t, i, Ci, Ri, Pi, ts);
6320
+ n.getVertexPosition(a, Ci), n.getVertexPosition(l, Ri), n.getVertexPosition(c, Li);
6321
+ const u = og(n, e, t, i, Ci, Ri, Li, ts);
6322
6322
  if (u) {
6323
- r && (Jr.fromBufferAttribute(r, a), Qr.fromBufferAttribute(r, l), es.fromBufferAttribute(r, c), u.uv = tn.getInterpolation(ts, Ci, Ri, Pi, Jr, Qr, es, new ue())), s && (Jr.fromBufferAttribute(s, a), Qr.fromBufferAttribute(s, l), es.fromBufferAttribute(s, c), u.uv1 = tn.getInterpolation(ts, Ci, Ri, Pi, Jr, Qr, es, new ue()), u.uv2 = u.uv1), o && (Mc.fromBufferAttribute(o, a), Ec.fromBufferAttribute(o, l), bc.fromBufferAttribute(o, c), u.normal = tn.getInterpolation(ts, Ci, Ri, Pi, Mc, Ec, bc, new D()), u.normal.dot(i.direction) > 0 && u.normal.multiplyScalar(-1));
6323
+ r && (Jr.fromBufferAttribute(r, a), Qr.fromBufferAttribute(r, l), es.fromBufferAttribute(r, c), u.uv = tn.getInterpolation(ts, Ci, Ri, Li, Jr, Qr, es, new ue())), s && (Jr.fromBufferAttribute(s, a), Qr.fromBufferAttribute(s, l), es.fromBufferAttribute(s, c), u.uv1 = tn.getInterpolation(ts, Ci, Ri, Li, Jr, Qr, es, new ue()), u.uv2 = u.uv1), o && (Mc.fromBufferAttribute(o, a), Ec.fromBufferAttribute(o, l), bc.fromBufferAttribute(o, c), u.normal = tn.getInterpolation(ts, Ci, Ri, Li, Mc, Ec, bc, new D()), u.normal.dot(i.direction) > 0 && u.normal.multiplyScalar(-1));
6324
6324
  const h = {
6325
6325
  a,
6326
6326
  b: l,
@@ -6328,7 +6328,7 @@ function is(n, e, t, i, r, s, o, a, l, c) {
6328
6328
  normal: new D(),
6329
6329
  materialIndex: 0
6330
6330
  };
6331
- tn.getNormal(Ci, Ri, Pi, h.normal), u.face = h;
6331
+ tn.getNormal(Ci, Ri, Li, h.normal), u.face = h;
6332
6332
  }
6333
6333
  return u;
6334
6334
  }
@@ -6347,7 +6347,7 @@ class Ir extends _n {
6347
6347
  const l = [], c = [], u = [], h = [];
6348
6348
  let f = 0, d = 0;
6349
6349
  g("z", "y", "x", -1, -1, i, t, e, o, s, 0), g("z", "y", "x", 1, -1, i, t, -e, o, s, 1), g("x", "z", "y", 1, 1, e, i, t, r, o, 2), g("x", "z", "y", 1, -1, e, i, -t, r, o, 3), g("x", "y", "z", 1, -1, e, t, i, r, s, 4), g("x", "y", "z", -1, -1, e, t, -i, r, s, 5), this.setIndex(l), this.setAttribute("position", new jt(c, 3)), this.setAttribute("normal", new jt(u, 3)), this.setAttribute("uv", new jt(h, 2));
6350
- function g(_, m, p, S, v, M, b, R, w, N, x) {
6350
+ function g(_, m, p, y, v, M, b, R, w, N, x) {
6351
6351
  const E = M / w, F = b / N, ee = M / 2, O = b / 2, U = R / 2, C = w + 1, z = N + 1;
6352
6352
  let H = 0, V = 0;
6353
6353
  const K = new D();
@@ -6355,7 +6355,7 @@ class Ir extends _n {
6355
6355
  const B = Q * F - O;
6356
6356
  for (let q = 0; q < C; q++) {
6357
6357
  const oe = q * E - ee;
6358
- K[_] = oe * S, K[m] = B * v, K[p] = U, c.push(K.x, K.y, K.z), K[_] = 0, K[m] = 0, K[p] = R > 0 ? 1 : -1, u.push(K.x, K.y, K.z), h.push(q / w), h.push(1 - Q / N), H += 1;
6358
+ K[_] = oe * y, K[m] = B * v, K[p] = U, c.push(K.x, K.y, K.z), K[_] = 0, K[m] = 0, K[p] = R > 0 ? 1 : -1, u.push(K.x, K.y, K.z), h.push(q / w), h.push(1 - Q / N), H += 1;
6359
6359
  }
6360
6360
  }
6361
6361
  for (let Q = 0; Q < N; Q++)
@@ -6384,7 +6384,7 @@ function $i(n) {
6384
6384
  }
6385
6385
  return e;
6386
6386
  }
6387
- function Lt(n) {
6387
+ function Pt(n) {
6388
6388
  const e = {};
6389
6389
  for (let t = 0; t < n.length; t++) {
6390
6390
  const i = $i(n[t]);
@@ -6402,7 +6402,7 @@ function ag(n) {
6402
6402
  function Mh(n) {
6403
6403
  return n.getRenderTarget() === null ? n.outputColorSpace : gn;
6404
6404
  }
6405
- const Ua = { clone: $i, merge: Lt };
6405
+ const Ua = { clone: $i, merge: Pt };
6406
6406
  var lg = `void main() {
6407
6407
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
6408
6408
  }`, cg = `void main() {
@@ -6589,21 +6589,21 @@ class Vt extends Eh {
6589
6589
  return t.object.fov = this.fov, t.object.zoom = this.zoom, t.object.near = this.near, t.object.far = this.far, t.object.focus = this.focus, t.object.aspect = this.aspect, this.view !== null && (t.object.view = Object.assign({}, this.view)), t.object.filmGauge = this.filmGauge, t.object.filmOffset = this.filmOffset, t;
6590
6590
  }
6591
6591
  }
6592
- const Li = -90, Di = 1;
6592
+ const Pi = -90, Di = 1;
6593
6593
  class ug extends at {
6594
6594
  constructor(e, t, i) {
6595
6595
  super(), this.type = "CubeCamera", this.renderTarget = i, this.coordinateSystem = null;
6596
- const r = new Vt(Li, Di, e, t);
6596
+ const r = new Vt(Pi, Di, e, t);
6597
6597
  r.layers = this.layers, this.add(r);
6598
- const s = new Vt(Li, Di, e, t);
6598
+ const s = new Vt(Pi, Di, e, t);
6599
6599
  s.layers = this.layers, this.add(s);
6600
- const o = new Vt(Li, Di, e, t);
6600
+ const o = new Vt(Pi, Di, e, t);
6601
6601
  o.layers = this.layers, this.add(o);
6602
- const a = new Vt(Li, Di, e, t);
6602
+ const a = new Vt(Pi, Di, e, t);
6603
6603
  a.layers = this.layers, this.add(a);
6604
- const l = new Vt(Li, Di, e, t);
6604
+ const l = new Vt(Pi, Di, e, t);
6605
6605
  l.layers = this.layers, this.add(l);
6606
- const c = new Vt(Li, Di, e, t);
6606
+ const c = new Vt(Pi, Di, e, t);
6607
6607
  c.layers = this.layers, this.add(c);
6608
6608
  }
6609
6609
  updateCoordinateSystem() {
@@ -6801,8 +6801,8 @@ class Na {
6801
6801
  return this;
6802
6802
  }
6803
6803
  setFromProjectionMatrix(e, t = Rn) {
6804
- const i = this.planes, r = e.elements, s = r[0], o = r[1], a = r[2], l = r[3], c = r[4], u = r[5], h = r[6], f = r[7], d = r[8], g = r[9], _ = r[10], m = r[11], p = r[12], S = r[13], v = r[14], M = r[15];
6805
- if (i[0].setComponents(l - s, f - c, m - d, M - p).normalize(), i[1].setComponents(l + s, f + c, m + d, M + p).normalize(), i[2].setComponents(l + o, f + u, m + g, M + S).normalize(), i[3].setComponents(l - o, f - u, m - g, M - S).normalize(), i[4].setComponents(l - a, f - h, m - _, M - v).normalize(), t === Rn)
6804
+ const i = this.planes, r = e.elements, s = r[0], o = r[1], a = r[2], l = r[3], c = r[4], u = r[5], h = r[6], f = r[7], d = r[8], g = r[9], _ = r[10], m = r[11], p = r[12], y = r[13], v = r[14], M = r[15];
6805
+ if (i[0].setComponents(l - s, f - c, m - d, M - p).normalize(), i[1].setComponents(l + s, f + c, m + d, M + p).normalize(), i[2].setComponents(l + o, f + u, m + g, M + y).normalize(), i[3].setComponents(l - o, f - u, m - g, M - y).normalize(), i[4].setComponents(l - a, f - h, m - _, M - v).normalize(), t === Rn)
6806
6806
  i[5].setComponents(l + a, f + h, m + _, M + v).normalize();
6807
6807
  else if (t === Ds)
6808
6808
  i[5].setComponents(a, h, _, v).normalize();
@@ -6959,15 +6959,15 @@ class Oa extends _n {
6959
6959
  };
6960
6960
  const s = e / 2, o = t / 2, a = Math.floor(i), l = Math.floor(r), c = a + 1, u = l + 1, h = e / a, f = t / l, d = [], g = [], _ = [], m = [];
6961
6961
  for (let p = 0; p < u; p++) {
6962
- const S = p * f - o;
6962
+ const y = p * f - o;
6963
6963
  for (let v = 0; v < c; v++) {
6964
6964
  const M = v * h - s;
6965
- g.push(M, -S, 0), _.push(0, 0, 1), m.push(v / a), m.push(1 - p / l);
6965
+ g.push(M, -y, 0), _.push(0, 0, 1), m.push(v / a), m.push(1 - p / l);
6966
6966
  }
6967
6967
  }
6968
6968
  for (let p = 0; p < l; p++)
6969
- for (let S = 0; S < a; S++) {
6970
- const v = S + c * p, M = S + c * (p + 1), b = S + 1 + c * (p + 1), R = S + 1 + c * p;
6969
+ for (let y = 0; y < a; y++) {
6970
+ const v = y + c * p, M = y + c * (p + 1), b = y + 1 + c * (p + 1), R = y + 1 + c * p;
6971
6971
  d.push(v, M, R), d.push(M, b, R);
6972
6972
  }
6973
6973
  this.setIndex(d), this.setAttribute("position", new jt(g, 3)), this.setAttribute("normal", new jt(_, 3)), this.setAttribute("uv", new jt(m, 2));
@@ -7159,9 +7159,9 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
7159
7159
  #endif`, Rg = `#if NUM_CLIPPING_PLANES > 0
7160
7160
  varying vec3 vClipPosition;
7161
7161
  uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
7162
- #endif`, Pg = `#if NUM_CLIPPING_PLANES > 0
7163
- varying vec3 vClipPosition;
7164
7162
  #endif`, Lg = `#if NUM_CLIPPING_PLANES > 0
7163
+ varying vec3 vClipPosition;
7164
+ #endif`, Pg = `#if NUM_CLIPPING_PLANES > 0
7165
7165
  vClipPosition = - mvPosition.xyz;
7166
7166
  #endif`, Dg = `#if defined( USE_COLOR_ALPHA )
7167
7167
  diffuseColor *= vColor;
@@ -8355,7 +8355,7 @@ IncidentLight directLight;
8355
8355
  transformed += morphTarget7 * morphTargetInfluences[ 7 ];
8356
8356
  #endif
8357
8357
  #endif
8358
- #endif`, P_ = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
8358
+ #endif`, L_ = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
8359
8359
  #ifdef FLAT_SHADED
8360
8360
  vec3 fdx = dFdx( vViewPosition );
8361
8361
  vec3 fdy = dFdy( vViewPosition );
@@ -8396,7 +8396,7 @@ IncidentLight directLight;
8396
8396
  tbn2[1] *= faceDirection;
8397
8397
  #endif
8398
8398
  #endif
8399
- vec3 geometryNormal = normal;`, L_ = `#ifdef USE_NORMALMAP_OBJECTSPACE
8399
+ vec3 geometryNormal = normal;`, P_ = `#ifdef USE_NORMALMAP_OBJECTSPACE
8400
8400
  normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
8401
8401
  #ifdef FLIP_SIDED
8402
8402
  normal = - normal;
@@ -9676,7 +9676,7 @@ void main() {
9676
9676
  #include <fog_fragment>
9677
9677
  #include <premultiplied_alpha_fragment>
9678
9678
  #include <dithering_fragment>
9679
- }`, Pv = `#define MATCAP
9679
+ }`, Lv = `#define MATCAP
9680
9680
  varying vec3 vViewPosition;
9681
9681
  #include <common>
9682
9682
  #include <uv_pars_vertex>
@@ -9707,7 +9707,7 @@ void main() {
9707
9707
  #include <clipping_planes_vertex>
9708
9708
  #include <fog_vertex>
9709
9709
  vViewPosition = - mvPosition.xyz;
9710
- }`, Lv = `#define MATCAP
9710
+ }`, Pv = `#define MATCAP
9711
9711
  uniform vec3 diffuse;
9712
9712
  uniform float opacity;
9713
9713
  uniform sampler2D matcap;
@@ -10306,8 +10306,8 @@ void main() {
10306
10306
  bumpmap_pars_fragment: Ag,
10307
10307
  clipping_planes_fragment: Cg,
10308
10308
  clipping_planes_pars_fragment: Rg,
10309
- clipping_planes_pars_vertex: Pg,
10310
- clipping_planes_vertex: Lg,
10309
+ clipping_planes_pars_vertex: Lg,
10310
+ clipping_planes_vertex: Pg,
10311
10311
  color_fragment: Dg,
10312
10312
  color_pars_fragment: Ig,
10313
10313
  color_pars_vertex: Ug,
@@ -10360,8 +10360,8 @@ void main() {
10360
10360
  morphnormal_vertex: A_,
10361
10361
  morphtarget_pars_vertex: C_,
10362
10362
  morphtarget_vertex: R_,
10363
- normal_fragment_begin: P_,
10364
- normal_fragment_maps: L_,
10363
+ normal_fragment_begin: L_,
10364
+ normal_fragment_maps: P_,
10365
10365
  normal_pars_fragment: D_,
10366
10366
  normal_pars_vertex: I_,
10367
10367
  normal_vertex: U_,
@@ -10414,8 +10414,8 @@ void main() {
10414
10414
  meshbasic_frag: Av,
10415
10415
  meshlambert_vert: Cv,
10416
10416
  meshlambert_frag: Rv,
10417
- meshmatcap_vert: Pv,
10418
- meshmatcap_frag: Lv,
10417
+ meshmatcap_vert: Lv,
10418
+ meshmatcap_frag: Pv,
10419
10419
  meshnormal_vert: Dv,
10420
10420
  meshnormal_frag: Iv,
10421
10421
  meshphong_vert: Uv,
@@ -10589,7 +10589,7 @@ void main() {
10589
10589
  }
10590
10590
  }, Ut = {
10591
10591
  basic: {
10592
- uniforms: /* @__PURE__ */ Lt([
10592
+ uniforms: /* @__PURE__ */ Pt([
10593
10593
  de.common,
10594
10594
  de.specularmap,
10595
10595
  de.envmap,
@@ -10601,7 +10601,7 @@ void main() {
10601
10601
  fragmentShader: Fe.meshbasic_frag
10602
10602
  },
10603
10603
  lambert: {
10604
- uniforms: /* @__PURE__ */ Lt([
10604
+ uniforms: /* @__PURE__ */ Pt([
10605
10605
  de.common,
10606
10606
  de.specularmap,
10607
10607
  de.envmap,
@@ -10621,7 +10621,7 @@ void main() {
10621
10621
  fragmentShader: Fe.meshlambert_frag
10622
10622
  },
10623
10623
  phong: {
10624
- uniforms: /* @__PURE__ */ Lt([
10624
+ uniforms: /* @__PURE__ */ Pt([
10625
10625
  de.common,
10626
10626
  de.specularmap,
10627
10627
  de.envmap,
@@ -10643,7 +10643,7 @@ void main() {
10643
10643
  fragmentShader: Fe.meshphong_frag
10644
10644
  },
10645
10645
  standard: {
10646
- uniforms: /* @__PURE__ */ Lt([
10646
+ uniforms: /* @__PURE__ */ Pt([
10647
10647
  de.common,
10648
10648
  de.envmap,
10649
10649
  de.aomap,
@@ -10668,7 +10668,7 @@ void main() {
10668
10668
  fragmentShader: Fe.meshphysical_frag
10669
10669
  },
10670
10670
  toon: {
10671
- uniforms: /* @__PURE__ */ Lt([
10671
+ uniforms: /* @__PURE__ */ Pt([
10672
10672
  de.common,
10673
10673
  de.aomap,
10674
10674
  de.lightmap,
@@ -10687,7 +10687,7 @@ void main() {
10687
10687
  fragmentShader: Fe.meshtoon_frag
10688
10688
  },
10689
10689
  matcap: {
10690
- uniforms: /* @__PURE__ */ Lt([
10690
+ uniforms: /* @__PURE__ */ Pt([
10691
10691
  de.common,
10692
10692
  de.bumpmap,
10693
10693
  de.normalmap,
@@ -10701,7 +10701,7 @@ void main() {
10701
10701
  fragmentShader: Fe.meshmatcap_frag
10702
10702
  },
10703
10703
  points: {
10704
- uniforms: /* @__PURE__ */ Lt([
10704
+ uniforms: /* @__PURE__ */ Pt([
10705
10705
  de.points,
10706
10706
  de.fog
10707
10707
  ]),
@@ -10709,7 +10709,7 @@ void main() {
10709
10709
  fragmentShader: Fe.points_frag
10710
10710
  },
10711
10711
  dashed: {
10712
- uniforms: /* @__PURE__ */ Lt([
10712
+ uniforms: /* @__PURE__ */ Pt([
10713
10713
  de.common,
10714
10714
  de.fog,
10715
10715
  {
@@ -10722,7 +10722,7 @@ void main() {
10722
10722
  fragmentShader: Fe.linedashed_frag
10723
10723
  },
10724
10724
  depth: {
10725
- uniforms: /* @__PURE__ */ Lt([
10725
+ uniforms: /* @__PURE__ */ Pt([
10726
10726
  de.common,
10727
10727
  de.displacementmap
10728
10728
  ]),
@@ -10730,7 +10730,7 @@ void main() {
10730
10730
  fragmentShader: Fe.depth_frag
10731
10731
  },
10732
10732
  normal: {
10733
- uniforms: /* @__PURE__ */ Lt([
10733
+ uniforms: /* @__PURE__ */ Pt([
10734
10734
  de.common,
10735
10735
  de.bumpmap,
10736
10736
  de.normalmap,
@@ -10743,7 +10743,7 @@ void main() {
10743
10743
  fragmentShader: Fe.meshnormal_frag
10744
10744
  },
10745
10745
  sprite: {
10746
- uniforms: /* @__PURE__ */ Lt([
10746
+ uniforms: /* @__PURE__ */ Pt([
10747
10747
  de.sprite,
10748
10748
  de.fog
10749
10749
  ]),
@@ -10786,7 +10786,7 @@ void main() {
10786
10786
  fragmentShader: Fe.equirect_frag
10787
10787
  },
10788
10788
  distanceRGBA: {
10789
- uniforms: /* @__PURE__ */ Lt([
10789
+ uniforms: /* @__PURE__ */ Pt([
10790
10790
  de.common,
10791
10791
  de.displacementmap,
10792
10792
  {
@@ -10799,7 +10799,7 @@ void main() {
10799
10799
  fragmentShader: Fe.distanceRGBA_frag
10800
10800
  },
10801
10801
  shadow: {
10802
- uniforms: /* @__PURE__ */ Lt([
10802
+ uniforms: /* @__PURE__ */ Pt([
10803
10803
  de.lights,
10804
10804
  de.fog,
10805
10805
  {
@@ -10812,7 +10812,7 @@ void main() {
10812
10812
  }
10813
10813
  };
10814
10814
  Ut.physical = {
10815
- uniforms: /* @__PURE__ */ Lt([
10815
+ uniforms: /* @__PURE__ */ Pt([
10816
10816
  Ut.standard.uniforms,
10817
10817
  {
10818
10818
  clearcoat: { value: 0 },
@@ -10868,10 +10868,10 @@ function $v(n, e, t, i, r, s, o) {
10868
10868
  const a = new je(0);
10869
10869
  let l = s === !0 ? 0 : 1, c, u, h = null, f = 0, d = null;
10870
10870
  function g(m, p) {
10871
- let S = !1, v = p.isScene === !0 ? p.background : null;
10872
- v && v.isTexture && (v = (p.backgroundBlurriness > 0 ? t : e).get(v)), v === null ? _(a, l) : v && v.isColor && (_(v, 1), S = !0);
10871
+ let y = !1, v = p.isScene === !0 ? p.background : null;
10872
+ v && v.isTexture && (v = (p.backgroundBlurriness > 0 ? t : e).get(v)), v === null ? _(a, l) : v && v.isColor && (_(v, 1), y = !0);
10873
10873
  const M = n.xr.getEnvironmentBlendMode();
10874
- M === "additive" ? i.buffers.color.setClear(0, 0, 0, 1, o) : M === "alpha-blend" && i.buffers.color.setClear(0, 0, 0, 0, o), (n.autoClear || S) && n.clear(n.autoClearColor, n.autoClearDepth, n.autoClearStencil), v && (v.isCubeTexture || v.mapping === Gs) ? (u === void 0 && (u = new pn(
10874
+ M === "additive" ? i.buffers.color.setClear(0, 0, 0, 1, o) : M === "alpha-blend" && i.buffers.color.setClear(0, 0, 0, 0, o), (n.autoClear || y) && n.clear(n.autoClearColor, n.autoClearDepth, n.autoClearStencil), v && (v.isCubeTexture || v.mapping === Gs) ? (u === void 0 && (u = new pn(
10875
10875
  new Ir(1, 1, 1),
10876
10876
  new Yn({
10877
10877
  name: "BackgroundCubeMaterial",
@@ -10933,7 +10933,7 @@ function qv(n, e, t, i) {
10933
10933
  let K = !1;
10934
10934
  if (o) {
10935
10935
  const Q = _(H, z, C);
10936
- c !== Q && (c = Q, d(c.object)), K = p(U, H, z, V), K && S(U, H, z, V);
10936
+ c !== Q && (c = Q, d(c.object)), K = p(U, H, z, V), K && y(U, H, z, V);
10937
10937
  } else {
10938
10938
  const Q = C.wireframe === !0;
10939
10939
  (c.geometry !== H.id || c.program !== z.id || c.wireframe !== Q) && (c.geometry = H.id, c.program = z.id, c.wireframe = Q, K = !0);
@@ -10989,7 +10989,7 @@ function qv(n, e, t, i) {
10989
10989
  }
10990
10990
  return c.attributesNum !== Q || c.index !== H;
10991
10991
  }
10992
- function S(U, C, z, H) {
10992
+ function y(U, C, z, H) {
10993
10993
  const V = {}, K = C.attributes;
10994
10994
  let Q = 0;
10995
10995
  const B = z.getAttributes();
@@ -11037,7 +11037,7 @@ function qv(n, e, t, i) {
11037
11037
  continue;
11038
11038
  const we = Ae.buffer, Te = Ae.type, Ve = Ae.bytesPerElement, Ze = i.isWebGL2 === !0 && (Te === n.INT || Te === n.UNSIGNED_INT || oe.gpuType === oh);
11039
11039
  if (oe.isInterleavedBufferAttribute) {
11040
- const Ce = oe.data, P = Ce.stride, he = oe.offset;
11040
+ const Ce = oe.data, L = Ce.stride, he = oe.offset;
11041
11041
  if (Ce.isInstancedInterleavedBuffer) {
11042
11042
  for (let J = 0; J < q.locationSize; J++)
11043
11043
  b(q.location + J, Ce.meshPerAttribute);
@@ -11052,7 +11052,7 @@ function qv(n, e, t, i) {
11052
11052
  ge / q.locationSize,
11053
11053
  Te,
11054
11054
  me,
11055
- P * Ve,
11055
+ L * Ve,
11056
11056
  (he + ge / q.locationSize * J) * Ve,
11057
11057
  Ze
11058
11058
  );
@@ -11198,7 +11198,7 @@ function Yv(n, e, t) {
11198
11198
  let a = t.precision !== void 0 ? t.precision : "highp";
11199
11199
  const l = s(a);
11200
11200
  l !== a && (console.warn("THREE.WebGLRenderer:", a, "not supported, using", l, "instead."), a = l);
11201
- const c = o || e.has("WEBGL_draw_buffers"), u = t.logarithmicDepthBuffer === !0, h = n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS), f = n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS), d = n.getParameter(n.MAX_TEXTURE_SIZE), g = n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE), _ = n.getParameter(n.MAX_VERTEX_ATTRIBS), m = n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS), p = n.getParameter(n.MAX_VARYING_VECTORS), S = n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS), v = f > 0, M = o || e.has("OES_texture_float"), b = v && M, R = o ? n.getParameter(n.MAX_SAMPLES) : 0;
11201
+ const c = o || e.has("WEBGL_draw_buffers"), u = t.logarithmicDepthBuffer === !0, h = n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS), f = n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS), d = n.getParameter(n.MAX_TEXTURE_SIZE), g = n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE), _ = n.getParameter(n.MAX_VERTEX_ATTRIBS), m = n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS), p = n.getParameter(n.MAX_VARYING_VECTORS), y = n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS), v = f > 0, M = o || e.has("OES_texture_float"), b = v && M, R = o ? n.getParameter(n.MAX_SAMPLES) : 0;
11202
11202
  return {
11203
11203
  isWebGL2: o,
11204
11204
  drawBuffers: c,
@@ -11213,7 +11213,7 @@ function Yv(n, e, t) {
11213
11213
  maxAttributes: _,
11214
11214
  maxVertexUniforms: m,
11215
11215
  maxVaryings: p,
11216
- maxFragmentUniforms: S,
11216
+ maxFragmentUniforms: y,
11217
11217
  vertexTextures: v,
11218
11218
  floatFragmentTextures: M,
11219
11219
  floatVertexTextures: b,
@@ -11240,12 +11240,12 @@ function Kv(n) {
11240
11240
  if (!r || g === null || g.length === 0 || s && !m)
11241
11241
  s ? u(null) : c();
11242
11242
  else {
11243
- const S = s ? 0 : i, v = S * 4;
11243
+ const y = s ? 0 : i, v = y * 4;
11244
11244
  let M = p.clippingState || null;
11245
11245
  l.value = M, M = u(g, f, v, d);
11246
11246
  for (let b = 0; b !== v; ++b)
11247
11247
  M[b] = t[b];
11248
- p.clippingState = M, this.numIntersection = _ ? this.numPlanes : 0, this.numPlanes += S;
11248
+ p.clippingState = M, this.numIntersection = _ ? this.numPlanes : 0, this.numPlanes += y;
11249
11249
  }
11250
11250
  };
11251
11251
  function c() {
@@ -11256,10 +11256,10 @@ function Kv(n) {
11256
11256
  let m = null;
11257
11257
  if (_ !== 0) {
11258
11258
  if (m = l.value, g !== !0 || m === null) {
11259
- const p = d + _ * 4, S = f.matrixWorldInverse;
11260
- a.getNormalMatrix(S), (m === null || m.length < p) && (m = new Float32Array(p));
11259
+ const p = d + _ * 4, y = f.matrixWorldInverse;
11260
+ a.getNormalMatrix(y), (m === null || m.length < p) && (m = new Float32Array(p));
11261
11261
  for (let v = 0, M = d; v !== _; ++v, M += 4)
11262
- o.copy(h[v]).applyMatrix4(S, a), o.normal.toArray(m, M), m[M + 3] = o.constant;
11262
+ o.copy(h[v]).applyMatrix4(y, a), o.normal.toArray(m, M), m[M + 3] = o.constant;
11263
11263
  }
11264
11264
  l.value = m, l.needsUpdate = !0;
11265
11265
  }
@@ -11338,8 +11338,8 @@ class Jv extends Eh {
11338
11338
  return t.object.zoom = this.zoom, t.object.left = this.left, t.object.right = this.right, t.object.top = this.top, t.object.bottom = this.bottom, t.object.near = this.near, t.object.far = this.far, this.view !== null && (t.object.view = Object.assign({}, this.view)), t;
11339
11339
  }
11340
11340
  }
11341
- const Oi = 4, Tc = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], ri = 20, Po = /* @__PURE__ */ new Jv(), wc = /* @__PURE__ */ new je();
11342
- let Lo = null;
11341
+ const Oi = 4, Tc = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], ri = 20, Lo = /* @__PURE__ */ new Jv(), wc = /* @__PURE__ */ new je();
11342
+ let Po = null;
11343
11343
  const ii = (1 + Math.sqrt(5)) / 2, Ii = 1 / ii, Ac = [
11344
11344
  /* @__PURE__ */ new D(1, 1, 1),
11345
11345
  /* @__PURE__ */ new D(-1, 1, 1),
@@ -11364,7 +11364,7 @@ class Cc {
11364
11364
  * is placed at the origin).
11365
11365
  */
11366
11366
  fromScene(e, t = 0, i = 0.1, r = 100) {
11367
- Lo = this._renderer.getRenderTarget(), this._setSize(256);
11367
+ Po = this._renderer.getRenderTarget(), this._setSize(256);
11368
11368
  const s = this._allocateTargets();
11369
11369
  return s.depthBuffer = !0, this._sceneToCubeUV(e, i, r, s), t > 0 && this._blur(s, 0, 0, t), this._applyPMREM(s), this._cleanup(s), s;
11370
11370
  }
@@ -11389,14 +11389,14 @@ class Cc {
11389
11389
  * your texture's network fetch for increased concurrency.
11390
11390
  */
11391
11391
  compileCubemapShader() {
11392
- this._cubemapMaterial === null && (this._cubemapMaterial = Lc(), this._compileMaterial(this._cubemapMaterial));
11392
+ this._cubemapMaterial === null && (this._cubemapMaterial = Pc(), this._compileMaterial(this._cubemapMaterial));
11393
11393
  }
11394
11394
  /**
11395
11395
  * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during
11396
11396
  * your texture's network fetch for increased concurrency.
11397
11397
  */
11398
11398
  compileEquirectangularShader() {
11399
- this._equirectMaterial === null && (this._equirectMaterial = Pc(), this._compileMaterial(this._equirectMaterial));
11399
+ this._equirectMaterial === null && (this._equirectMaterial = Lc(), this._compileMaterial(this._equirectMaterial));
11400
11400
  }
11401
11401
  /**
11402
11402
  * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,
@@ -11416,10 +11416,10 @@ class Cc {
11416
11416
  this._lodPlanes[e].dispose();
11417
11417
  }
11418
11418
  _cleanup(e) {
11419
- this._renderer.setRenderTarget(Lo), e.scissorTest = !1, os(e, 0, 0, e.width, e.height);
11419
+ this._renderer.setRenderTarget(Po), e.scissorTest = !1, os(e, 0, 0, e.width, e.height);
11420
11420
  }
11421
11421
  _fromTexture(e, t) {
11422
- e.mapping === Vi || e.mapping === Wi ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), Lo = this._renderer.getRenderTarget();
11422
+ e.mapping === Vi || e.mapping === Wi ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), Po = this._renderer.getRenderTarget();
11423
11423
  const i = t || this._allocateTargets();
11424
11424
  return this._textureToCubeUV(e, i), this._applyPMREM(i), this._cleanup(i), i;
11425
11425
  }
@@ -11442,7 +11442,7 @@ class Cc {
11442
11442
  }
11443
11443
  _compileMaterial(e) {
11444
11444
  const t = new pn(this._lodPlanes[0], e);
11445
- this._renderer.compile(t, Po);
11445
+ this._renderer.compile(t, Lo);
11446
11446
  }
11447
11447
  _sceneToCubeUV(e, t, i, r) {
11448
11448
  const a = new Vt(90, 1, t, i), l = [1, -1, 1, 1, 1, 1], c = [1, 1, 1, -1, -1, -1], u = this._renderer, h = u.autoClear, f = u.toneMapping;
@@ -11457,20 +11457,20 @@ class Cc {
11457
11457
  const m = e.background;
11458
11458
  m ? m.isColor && (d.color.copy(m), e.background = null, _ = !0) : (d.color.copy(wc), _ = !0);
11459
11459
  for (let p = 0; p < 6; p++) {
11460
- const S = p % 3;
11461
- S === 0 ? (a.up.set(0, l[p], 0), a.lookAt(c[p], 0, 0)) : S === 1 ? (a.up.set(0, 0, l[p]), a.lookAt(0, c[p], 0)) : (a.up.set(0, l[p], 0), a.lookAt(0, 0, c[p]));
11460
+ const y = p % 3;
11461
+ y === 0 ? (a.up.set(0, l[p], 0), a.lookAt(c[p], 0, 0)) : y === 1 ? (a.up.set(0, 0, l[p]), a.lookAt(0, c[p], 0)) : (a.up.set(0, l[p], 0), a.lookAt(0, 0, c[p]));
11462
11462
  const v = this._cubeSize;
11463
- os(r, S * v, p > 2 ? v : 0, v, v), u.setRenderTarget(r), _ && u.render(g, a), u.render(e, a);
11463
+ os(r, y * v, p > 2 ? v : 0, v, v), u.setRenderTarget(r), _ && u.render(g, a), u.render(e, a);
11464
11464
  }
11465
11465
  g.geometry.dispose(), g.material.dispose(), u.toneMapping = f, u.autoClear = h, e.background = m;
11466
11466
  }
11467
11467
  _textureToCubeUV(e, t) {
11468
11468
  const i = this._renderer, r = e.mapping === Vi || e.mapping === Wi;
11469
- r ? (this._cubemapMaterial === null && (this._cubemapMaterial = Lc()), this._cubemapMaterial.uniforms.flipEnvMap.value = e.isRenderTargetTexture === !1 ? -1 : 1) : this._equirectMaterial === null && (this._equirectMaterial = Pc());
11469
+ r ? (this._cubemapMaterial === null && (this._cubemapMaterial = Pc()), this._cubemapMaterial.uniforms.flipEnvMap.value = e.isRenderTargetTexture === !1 ? -1 : 1) : this._equirectMaterial === null && (this._equirectMaterial = Lc());
11470
11470
  const s = r ? this._cubemapMaterial : this._equirectMaterial, o = new pn(this._lodPlanes[0], s), a = s.uniforms;
11471
11471
  a.envMap.value = e;
11472
11472
  const l = this._cubeSize;
11473
- os(t, 0, 0, 3 * l, 2 * l), i.setRenderTarget(t), i.render(o, Po);
11473
+ os(t, 0, 0, 3 * l, 2 * l), i.setRenderTarget(t), i.render(o, Lo);
11474
11474
  }
11475
11475
  _applyPMREM(e) {
11476
11476
  const t = this._renderer, i = t.autoClear;
@@ -11516,18 +11516,18 @@ class Cc {
11516
11516
  const u = 3, h = new pn(this._lodPlanes[r], c), f = c.uniforms, d = this._sizeLods[i] - 1, g = isFinite(s) ? Math.PI / (2 * d) : 2 * Math.PI / (2 * ri - 1), _ = s / g, m = isFinite(s) ? 1 + Math.floor(u * _) : ri;
11517
11517
  m > ri && console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${ri}`);
11518
11518
  const p = [];
11519
- let S = 0;
11519
+ let y = 0;
11520
11520
  for (let w = 0; w < ri; ++w) {
11521
11521
  const N = w / _, x = Math.exp(-N * N / 2);
11522
- p.push(x), w === 0 ? S += x : w < m && (S += 2 * x);
11522
+ p.push(x), w === 0 ? y += x : w < m && (y += 2 * x);
11523
11523
  }
11524
11524
  for (let w = 0; w < p.length; w++)
11525
- p[w] = p[w] / S;
11525
+ p[w] = p[w] / y;
11526
11526
  f.envMap.value = e.texture, f.samples.value = m, f.weights.value = p, f.latitudinal.value = o === "latitudinal", a && (f.poleAxis.value = a);
11527
11527
  const { _lodMax: v } = this;
11528
11528
  f.dTheta.value = g, f.mipInt.value = v - i;
11529
11529
  const M = this._sizeLods[r], b = 3 * M * (r > v - Oi ? r - v + Oi : 0), R = 4 * (this._cubeSize - M);
11530
- os(t, b, R, 3 * M, 2 * M), l.setRenderTarget(t), l.render(h, Po);
11530
+ os(t, b, R, 3 * M, 2 * M), l.setRenderTarget(t), l.render(h, Lo);
11531
11531
  }
11532
11532
  }
11533
11533
  function Qv(n) {
@@ -11539,7 +11539,7 @@ function Qv(n) {
11539
11539
  t.push(a);
11540
11540
  let l = 1 / a;
11541
11541
  o > n - Oi ? l = Tc[o - n + Oi - 1] : o === 0 && (l = 0), i.push(l);
11542
- const c = 1 / (a - 2), u = -c, h = 1 + c, f = [u, u, h, u, h, h, u, u, h, h, u, h], d = 6, g = 6, _ = 3, m = 2, p = 1, S = new Float32Array(_ * g * d), v = new Float32Array(m * g * d), M = new Float32Array(p * g * d);
11542
+ const c = 1 / (a - 2), u = -c, h = 1 + c, f = [u, u, h, u, h, h, u, u, h, h, u, h], d = 6, g = 6, _ = 3, m = 2, p = 1, y = new Float32Array(_ * g * d), v = new Float32Array(m * g * d), M = new Float32Array(p * g * d);
11543
11543
  for (let R = 0; R < d; R++) {
11544
11544
  const w = R % 3 * 2 / 3 - 1, N = R > 2 ? 0 : -1, x = [
11545
11545
  w,
@@ -11561,12 +11561,12 @@ function Qv(n) {
11561
11561
  N + 1,
11562
11562
  0
11563
11563
  ];
11564
- S.set(x, _ * g * R), v.set(f, m * g * R);
11564
+ y.set(x, _ * g * R), v.set(f, m * g * R);
11565
11565
  const E = [R, R, R, R, R, R];
11566
11566
  M.set(E, p * g * R);
11567
11567
  }
11568
11568
  const b = new _n();
11569
- b.setAttribute("position", new an(S, _)), b.setAttribute("uv", new an(v, m)), b.setAttribute("faceIndex", new an(M, p)), e.push(b), r > Oi && r--;
11569
+ b.setAttribute("position", new an(y, _)), b.setAttribute("uv", new an(v, m)), b.setAttribute("faceIndex", new an(M, p)), e.push(b), r > Oi && r--;
11570
11570
  }
11571
11571
  return { lodPlanes: e, sizeLods: t, sigmas: i };
11572
11572
  }
@@ -11666,7 +11666,7 @@ function e0(n, e, t) {
11666
11666
  depthWrite: !1
11667
11667
  });
11668
11668
  }
11669
- function Pc() {
11669
+ function Lc() {
11670
11670
  return new Yn({
11671
11671
  name: "EquirectangularToCubeUV",
11672
11672
  uniforms: {
@@ -11701,7 +11701,7 @@ function Pc() {
11701
11701
  depthWrite: !1
11702
11702
  });
11703
11703
  }
11704
- function Lc() {
11704
+ function Pc() {
11705
11705
  return new Yn({
11706
11706
  name: "CubemapToCubeUV",
11707
11707
  uniforms: {
@@ -11913,16 +11913,16 @@ function i0(n, e, t, i) {
11913
11913
  const f = [], d = h.index, g = h.attributes.position;
11914
11914
  let _ = 0;
11915
11915
  if (d !== null) {
11916
- const S = d.array;
11916
+ const y = d.array;
11917
11917
  _ = d.version;
11918
- for (let v = 0, M = S.length; v < M; v += 3) {
11919
- const b = S[v + 0], R = S[v + 1], w = S[v + 2];
11918
+ for (let v = 0, M = y.length; v < M; v += 3) {
11919
+ const b = y[v + 0], R = y[v + 1], w = y[v + 2];
11920
11920
  f.push(b, R, R, w, w, b);
11921
11921
  }
11922
11922
  } else if (g !== void 0) {
11923
- const S = g.array;
11923
+ const y = g.array;
11924
11924
  _ = g.version;
11925
- for (let v = 0, M = S.length / 3 - 1; v < M; v += 3) {
11925
+ for (let v = 0, M = y.length / 3 - 1; v < M; v += 3) {
11926
11926
  const b = v + 0, R = v + 1, w = v + 2;
11927
11927
  f.push(b, R, R, w, w, b);
11928
11928
  }
@@ -12040,9 +12040,9 @@ function l0(n, e, t) {
12040
12040
  ee.dispose(), s.delete(u), u.removeEventListener("dispose", U);
12041
12041
  };
12042
12042
  _ !== void 0 && _.texture.dispose();
12043
- const S = u.morphAttributes.position !== void 0, v = u.morphAttributes.normal !== void 0, M = u.morphAttributes.color !== void 0, b = u.morphAttributes.position || [], R = u.morphAttributes.normal || [], w = u.morphAttributes.color || [];
12043
+ const y = u.morphAttributes.position !== void 0, v = u.morphAttributes.normal !== void 0, M = u.morphAttributes.color !== void 0, b = u.morphAttributes.position || [], R = u.morphAttributes.normal || [], w = u.morphAttributes.color || [];
12044
12044
  let N = 0;
12045
- S === !0 && (N = 1), v === !0 && (N = 2), M === !0 && (N = 3);
12045
+ y === !0 && (N = 1), v === !0 && (N = 2), M === !0 && (N = 3);
12046
12046
  let x = u.attributes.position.count * N, E = 1;
12047
12047
  x > e.maxTextureSize && (E = Math.ceil(x / e.maxTextureSize), x = e.maxTextureSize);
12048
12048
  const F = new Float32Array(x * E * 4 * g), ee = new vh(F, x, E, g);
@@ -12052,7 +12052,7 @@ function l0(n, e, t) {
12052
12052
  const z = b[C], H = R[C], V = w[C], K = x * E * 4 * C;
12053
12053
  for (let Q = 0; Q < z.count; Q++) {
12054
12054
  const B = Q * O;
12055
- S === !0 && (o.fromBufferAttribute(z, Q), F[K + B + 0] = o.x, F[K + B + 1] = o.y, F[K + B + 2] = o.z, F[K + B + 3] = 0), v === !0 && (o.fromBufferAttribute(H, Q), F[K + B + 4] = o.x, F[K + B + 5] = o.y, F[K + B + 6] = o.z, F[K + B + 7] = 0), M === !0 && (o.fromBufferAttribute(V, Q), F[K + B + 8] = o.x, F[K + B + 9] = o.y, F[K + B + 10] = o.z, F[K + B + 11] = V.itemSize === 4 ? o.w : 1);
12055
+ y === !0 && (o.fromBufferAttribute(z, Q), F[K + B + 0] = o.x, F[K + B + 1] = o.y, F[K + B + 2] = o.z, F[K + B + 3] = 0), v === !0 && (o.fromBufferAttribute(H, Q), F[K + B + 4] = o.x, F[K + B + 5] = o.y, F[K + B + 6] = o.z, F[K + B + 7] = 0), M === !0 && (o.fromBufferAttribute(V, Q), F[K + B + 8] = o.x, F[K + B + 9] = o.y, F[K + B + 10] = o.z, F[K + B + 11] = V.itemSize === 4 ? o.w : 1);
12056
12056
  }
12057
12057
  }
12058
12058
  _ = {
@@ -12062,8 +12062,8 @@ function l0(n, e, t) {
12062
12062
  }, s.set(u, _), u.addEventListener("dispose", U);
12063
12063
  }
12064
12064
  let m = 0;
12065
- for (let S = 0; S < f.length; S++)
12066
- m += f[S];
12065
+ for (let y = 0; y < f.length; y++)
12066
+ m += f[y];
12067
12067
  const p = u.morphTargetsRelative ? 1 : 1 - m;
12068
12068
  h.getUniforms().setValue(n, "morphTargetBaseInfluence", p), h.getUniforms().setValue(n, "morphTargetInfluences", f), h.getUniforms().setValue(n, "morphTargetsTexture", _.texture, t), h.getUniforms().setValue(n, "morphTargetsTextureSize", _.size);
12069
12069
  } else {
@@ -12089,8 +12089,8 @@ function l0(n, e, t) {
12089
12089
  const M = a[v], b = M[0], R = M[1];
12090
12090
  b !== Number.MAX_SAFE_INTEGER && R ? (_ && u.getAttribute("morphTarget" + v) !== _[b] && u.setAttribute("morphTarget" + v, _[b]), m && u.getAttribute("morphNormal" + v) !== m[b] && u.setAttribute("morphNormal" + v, m[b]), r[v] = R, p += R) : (_ && u.hasAttribute("morphTarget" + v) === !0 && u.deleteAttribute("morphTarget" + v), m && u.hasAttribute("morphNormal" + v) === !0 && u.deleteAttribute("morphNormal" + v), r[v] = 0);
12091
12091
  }
12092
- const S = u.morphTargetsRelative ? 1 : 1 - p;
12093
- h.getUniforms().setValue(n, "morphTargetBaseInfluence", S), h.getUniforms().setValue(n, "morphTargetInfluences", r);
12092
+ const y = u.morphTargetsRelative ? 1 : 1 - p;
12093
+ h.getUniforms().setValue(n, "morphTargetBaseInfluence", y), h.getUniforms().setValue(n, "morphTargetInfluences", r);
12094
12094
  }
12095
12095
  }
12096
12096
  return {
@@ -12366,10 +12366,10 @@ function R0(n) {
12366
12366
  return C0;
12367
12367
  }
12368
12368
  }
12369
- function P0(n, e) {
12369
+ function L0(n, e) {
12370
12370
  n.uniform1fv(this.addr, e);
12371
12371
  }
12372
- function L0(n, e) {
12372
+ function P0(n, e) {
12373
12373
  const t = Ji(e, this.size, 2);
12374
12374
  n.uniform2fv(this.addr, t);
12375
12375
  }
@@ -12444,9 +12444,9 @@ function j0(n, e, t) {
12444
12444
  function Y0(n) {
12445
12445
  switch (n) {
12446
12446
  case 5126:
12447
- return P0;
12448
- case 35664:
12449
12447
  return L0;
12448
+ case 35664:
12449
+ return P0;
12450
12450
  case 35665:
12451
12451
  return D0;
12452
12452
  case 35666:
@@ -12723,7 +12723,7 @@ precision ` + n.precision + " int;";
12723
12723
  }
12724
12724
  function dx(n) {
12725
12725
  let e = "SHADOWMAP_TYPE_BASIC";
12726
- return n.shadowMapType === nh ? e = "SHADOWMAP_TYPE_PCF" : n.shadowMapType === Pp ? e = "SHADOWMAP_TYPE_PCF_SOFT" : n.shadowMapType === An && (e = "SHADOWMAP_TYPE_VSM"), e;
12726
+ return n.shadowMapType === nh ? e = "SHADOWMAP_TYPE_PCF" : n.shadowMapType === Lp ? e = "SHADOWMAP_TYPE_PCF_SOFT" : n.shadowMapType === An && (e = "SHADOWMAP_TYPE_VSM"), e;
12727
12727
  }
12728
12728
  function px(n) {
12729
12729
  let e = "ENVMAP_TYPE_CUBE";
@@ -12776,7 +12776,7 @@ function vx(n, e, t, i) {
12776
12776
  const r = n.getContext(), s = t.defines;
12777
12777
  let o = t.vertexShader, a = t.fragmentShader;
12778
12778
  const l = dx(t), c = px(t), u = mx(t), h = gx(t), f = _x(t), d = t.isWebGL2 ? "" : sx(t), g = ox(s), _ = r.createProgram();
12779
- let m, p, S = t.glslVersion ? "#version " + t.glslVersion + `
12779
+ let m, p, y = t.glslVersion ? "#version " + t.glslVersion + `
12780
12780
  ` : "";
12781
12781
  t.isRawShaderMaterial ? (m = [
12782
12782
  "#define SHADER_TYPE " + t.shaderType,
@@ -13015,7 +13015,7 @@ function vx(n, e, t, i) {
13015
13015
  `
13016
13016
  `
13017
13017
  ].filter(lr).join(`
13018
- `)), o = la(o), o = Hc(o, t), o = kc(o, t), a = la(a), a = Hc(a, t), a = kc(a, t), o = Gc(o), a = Gc(a), t.isWebGL2 && t.isRawShaderMaterial !== !0 && (S = `#version 300 es
13018
+ `)), o = la(o), o = Hc(o, t), o = kc(o, t), a = la(a), a = Hc(a, t), a = kc(a, t), o = Gc(o), a = Gc(a), t.isWebGL2 && t.isRawShaderMaterial !== !0 && (y = `#version 300 es
13019
13019
  `, m = [
13020
13020
  "precision mediump sampler2DArray;",
13021
13021
  "#define attribute in",
@@ -13040,7 +13040,7 @@ function vx(n, e, t, i) {
13040
13040
  ].join(`
13041
13041
  `) + `
13042
13042
  ` + p);
13043
- const v = S + m + o, M = S + p + a, b = Bc(r, r.VERTEX_SHADER, v), R = Bc(r, r.FRAGMENT_SHADER, M);
13043
+ const v = y + m + o, M = y + p + a, b = Bc(r, r.VERTEX_SHADER, v), R = Bc(r, r.FRAGMENT_SHADER, M);
13044
13044
  if (r.attachShader(_, b), r.attachShader(_, R), t.index0AttributeName !== void 0 ? r.bindAttribLocation(_, 0, t.index0AttributeName) : t.morphTargets === !0 && r.bindAttribLocation(_, 0, "position"), r.linkProgram(_), n.debug.checkShaderErrors) {
13045
13045
  const x = r.getProgramInfoLog(_).trim(), E = r.getShaderInfoLog(b).trim(), F = r.getShaderInfoLog(R).trim();
13046
13046
  let ee = !0, O = !0;
@@ -13159,7 +13159,7 @@ function Mx(n, e, t, i, r, s, o) {
13159
13159
  oe = et.vertexShader, me = et.fragmentShader;
13160
13160
  } else
13161
13161
  oe = x.vertexShader, me = x.fragmentShader, l.update(x), ge = l.getVertexShaderID(x), Ae = l.getFragmentShaderID(x);
13162
- const we = n.getRenderTarget(), Te = O.isInstancedMesh === !0, Ve = !!x.map, Ze = !!x.matcap, Ce = !!H, P = !!x.aoMap, he = !!x.lightMap, J = !!x.bumpMap, ae = !!x.normalMap, ne = !!x.displacementMap, be = !!x.emissiveMap, ye = !!x.metalnessMap, Se = !!x.roughnessMap, Pe = x.anisotropy > 0, ze = x.clearcoat > 0, tt = x.iridescence > 0, A = x.sheen > 0, y = x.transmission > 0, W = Pe && !!x.anisotropyMap, se = ze && !!x.clearcoatMap, ie = ze && !!x.clearcoatNormalMap, le = ze && !!x.clearcoatRoughnessMap, Ee = tt && !!x.iridescenceMap, ce = tt && !!x.iridescenceThicknessMap, X = A && !!x.sheenColorMap, L = A && !!x.sheenRoughnessMap, te = !!x.specularMap, xe = !!x.specularColorMap, pe = !!x.specularIntensityMap, ve = y && !!x.transmissionMap, Ne = y && !!x.thicknessMap, We = !!x.gradientMap, I = !!x.alphaMap, _e = x.alphaTest > 0, $ = !!x.alphaHash, re = !!x.extensions, fe = !!C.attributes.uv1, He = !!C.attributes.uv2, qe = !!C.attributes.uv3;
13162
+ const we = n.getRenderTarget(), Te = O.isInstancedMesh === !0, Ve = !!x.map, Ze = !!x.matcap, Ce = !!H, L = !!x.aoMap, he = !!x.lightMap, J = !!x.bumpMap, ae = !!x.normalMap, ne = !!x.displacementMap, be = !!x.emissiveMap, ye = !!x.metalnessMap, Se = !!x.roughnessMap, Le = x.anisotropy > 0, ze = x.clearcoat > 0, tt = x.iridescence > 0, A = x.sheen > 0, S = x.transmission > 0, W = Le && !!x.anisotropyMap, se = ze && !!x.clearcoatMap, ie = ze && !!x.clearcoatNormalMap, le = ze && !!x.clearcoatRoughnessMap, Ee = tt && !!x.iridescenceMap, ce = tt && !!x.iridescenceThicknessMap, X = A && !!x.sheenColorMap, P = A && !!x.sheenRoughnessMap, te = !!x.specularMap, xe = !!x.specularColorMap, pe = !!x.specularIntensityMap, ve = S && !!x.transmissionMap, Ne = S && !!x.thicknessMap, We = !!x.gradientMap, I = !!x.alphaMap, _e = x.alphaTest > 0, $ = !!x.alphaHash, re = !!x.extensions, fe = !!C.attributes.uv1, He = !!C.attributes.uv2, qe = !!C.attributes.uv3;
13163
13163
  let Je = Xn;
13164
13164
  return x.toneMapped && (we === null || we.isXRRenderTarget === !0) && (Je = n.toneMapping), {
13165
13165
  isWebGL2: u,
@@ -13183,7 +13183,7 @@ function Mx(n, e, t, i, r, s, o) {
13183
13183
  envMap: Ce,
13184
13184
  envMapMode: Ce && H.mapping,
13185
13185
  envMapCubeUVHeight: V,
13186
- aoMap: P,
13186
+ aoMap: L,
13187
13187
  lightMap: he,
13188
13188
  bumpMap: J,
13189
13189
  normalMap: ae,
@@ -13193,7 +13193,7 @@ function Mx(n, e, t, i, r, s, o) {
13193
13193
  normalMapTangentSpace: ae && x.normalMapType === dh,
13194
13194
  metalnessMap: ye,
13195
13195
  roughnessMap: Se,
13196
- anisotropy: Pe,
13196
+ anisotropy: Le,
13197
13197
  anisotropyMap: W,
13198
13198
  clearcoat: ze,
13199
13199
  clearcoatMap: se,
@@ -13204,11 +13204,11 @@ function Mx(n, e, t, i, r, s, o) {
13204
13204
  iridescenceThicknessMap: ce,
13205
13205
  sheen: A,
13206
13206
  sheenColorMap: X,
13207
- sheenRoughnessMap: L,
13207
+ sheenRoughnessMap: P,
13208
13208
  specularMap: te,
13209
13209
  specularColorMap: xe,
13210
13210
  specularIntensityMap: pe,
13211
- transmission: y,
13211
+ transmission: S,
13212
13212
  transmissionMap: ve,
13213
13213
  thicknessMap: Ne,
13214
13214
  gradientMap: We,
@@ -13219,7 +13219,7 @@ function Mx(n, e, t, i, r, s, o) {
13219
13219
  combine: x.combine,
13220
13220
  //
13221
13221
  mapUv: Ve && _(x.map.channel),
13222
- aoMapUv: P && _(x.aoMap.channel),
13222
+ aoMapUv: L && _(x.aoMap.channel),
13223
13223
  lightMapUv: he && _(x.lightMap.channel),
13224
13224
  bumpMapUv: J && _(x.bumpMap.channel),
13225
13225
  normalMapUv: ae && _(x.normalMap.channel),
@@ -13234,7 +13234,7 @@ function Mx(n, e, t, i, r, s, o) {
13234
13234
  iridescenceMapUv: Ee && _(x.iridescenceMap.channel),
13235
13235
  iridescenceThicknessMapUv: ce && _(x.iridescenceThicknessMap.channel),
13236
13236
  sheenColorMapUv: X && _(x.sheenColorMap.channel),
13237
- sheenRoughnessMapUv: L && _(x.sheenRoughnessMap.channel),
13237
+ sheenRoughnessMapUv: P && _(x.sheenRoughnessMap.channel),
13238
13238
  specularMapUv: te && _(x.specularMap.channel),
13239
13239
  specularColorMapUv: xe && _(x.specularColorMap.channel),
13240
13240
  specularIntensityMapUv: pe && _(x.specularIntensityMap.channel),
@@ -13242,7 +13242,7 @@ function Mx(n, e, t, i, r, s, o) {
13242
13242
  thicknessMapUv: Ne && _(x.thicknessMap.channel),
13243
13243
  alphaMapUv: I && _(x.alphaMap.channel),
13244
13244
  //
13245
- vertexTangents: !!C.attributes.tangent && (ae || Pe),
13245
+ vertexTangents: !!C.attributes.tangent && (ae || Le),
13246
13246
  vertexColors: x.vertexColors,
13247
13247
  vertexAlphas: x.vertexColors === !0 && !!C.attributes.color && C.attributes.color.itemSize === 4,
13248
13248
  vertexUv1s: fe,
@@ -13300,9 +13300,9 @@ function Mx(n, e, t, i, r, s, o) {
13300
13300
  if (x.shaderID ? E.push(x.shaderID) : (E.push(x.customVertexShaderID), E.push(x.customFragmentShaderID)), x.defines !== void 0)
13301
13301
  for (const F in x.defines)
13302
13302
  E.push(F), E.push(x.defines[F]);
13303
- return x.isRawShaderMaterial === !1 && (S(E, x), v(E, x), E.push(n.outputColorSpace)), E.push(x.customProgramCacheKey), E.join();
13303
+ return x.isRawShaderMaterial === !1 && (y(E, x), v(E, x), E.push(n.outputColorSpace)), E.push(x.customProgramCacheKey), E.join();
13304
13304
  }
13305
- function S(x, E) {
13305
+ function y(x, E) {
13306
13306
  x.push(E.precision), x.push(E.outputColorSpace), x.push(E.envMapMode), x.push(E.envMapCubeUVHeight), x.push(E.mapUv), x.push(E.alphaMapUv), x.push(E.lightMapUv), x.push(E.aoMapUv), x.push(E.bumpMapUv), x.push(E.normalMapUv), x.push(E.displacementMapUv), x.push(E.emissiveMapUv), x.push(E.metalnessMapUv), x.push(E.roughnessMapUv), x.push(E.anisotropyMapUv), x.push(E.clearcoatMapUv), x.push(E.clearcoatNormalMapUv), x.push(E.clearcoatRoughnessMapUv), x.push(E.iridescenceMapUv), x.push(E.iridescenceThicknessMapUv), x.push(E.sheenColorMapUv), x.push(E.sheenRoughnessMapUv), x.push(E.specularMapUv), x.push(E.specularColorMapUv), x.push(E.specularIntensityMapUv), x.push(E.transmissionMapUv), x.push(E.thicknessMapUv), x.push(E.combine), x.push(E.fogExp2), x.push(E.sizeAttenuation), x.push(E.morphTargetsCount), x.push(E.morphAttributeCount), x.push(E.numDirLights), x.push(E.numPointLights), x.push(E.numSpotLights), x.push(E.numSpotLightMaps), x.push(E.numHemiLights), x.push(E.numRectAreaLights), x.push(E.numDirLightShadows), x.push(E.numPointLightShadows), x.push(E.numSpotLightShadows), x.push(E.numSpotLightShadowsWithMaps), x.push(E.shadowMapType), x.push(E.toneMapping), x.push(E.numClippingPlanes), x.push(E.numClipIntersection), x.push(E.depthPacking);
13307
13307
  }
13308
13308
  function v(x, E) {
@@ -13542,7 +13542,7 @@ let Cx = 0;
13542
13542
  function Rx(n, e) {
13543
13543
  return (e.castShadow ? 2 : 0) - (n.castShadow ? 2 : 0) + (e.map ? 1 : 0) - (n.map ? 1 : 0);
13544
13544
  }
13545
- function Px(n, e) {
13545
+ function Lx(n, e) {
13546
13546
  const t = new wx(), i = Ax(), r = {
13547
13547
  version: 0,
13548
13548
  hash: {
@@ -13584,7 +13584,7 @@ function Px(n, e) {
13584
13584
  let f = 0, d = 0, g = 0;
13585
13585
  for (let F = 0; F < 9; F++)
13586
13586
  r.probe[F].set(0, 0, 0);
13587
- let _ = 0, m = 0, p = 0, S = 0, v = 0, M = 0, b = 0, R = 0, w = 0, N = 0;
13587
+ let _ = 0, m = 0, p = 0, y = 0, v = 0, M = 0, b = 0, R = 0, w = 0, N = 0;
13588
13588
  u.sort(Rx);
13589
13589
  const x = h === !0 ? Math.PI : 1;
13590
13590
  for (let F = 0, ee = u.length; F < ee; F++) {
@@ -13612,7 +13612,7 @@ function Px(n, e) {
13612
13612
  p++;
13613
13613
  } else if (O.isRectAreaLight) {
13614
13614
  const V = t.get(O);
13615
- V.color.copy(U).multiplyScalar(C), V.halfWidth.set(O.width * 0.5, 0, 0), V.halfHeight.set(0, O.height * 0.5, 0), r.rectArea[S] = V, S++;
13615
+ V.color.copy(U).multiplyScalar(C), V.halfWidth.set(O.width * 0.5, 0, 0), V.halfHeight.set(0, O.height * 0.5, 0), r.rectArea[y] = V, y++;
13616
13616
  } else if (O.isPointLight) {
13617
13617
  const V = t.get(O);
13618
13618
  if (V.color.copy(O.color).multiplyScalar(O.intensity * x), V.distance = O.distance, V.decay = O.decay, O.castShadow) {
@@ -13625,15 +13625,15 @@ function Px(n, e) {
13625
13625
  V.skyColor.copy(O.color).multiplyScalar(C * x), V.groundColor.copy(O.groundColor).multiplyScalar(C * x), r.hemi[v] = V, v++;
13626
13626
  }
13627
13627
  }
13628
- S > 0 && (e.isWebGL2 || n.has("OES_texture_float_linear") === !0 ? (r.rectAreaLTC1 = de.LTC_FLOAT_1, r.rectAreaLTC2 = de.LTC_FLOAT_2) : n.has("OES_texture_half_float_linear") === !0 ? (r.rectAreaLTC1 = de.LTC_HALF_1, r.rectAreaLTC2 = de.LTC_HALF_2) : console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")), r.ambient[0] = f, r.ambient[1] = d, r.ambient[2] = g;
13628
+ y > 0 && (e.isWebGL2 || n.has("OES_texture_float_linear") === !0 ? (r.rectAreaLTC1 = de.LTC_FLOAT_1, r.rectAreaLTC2 = de.LTC_FLOAT_2) : n.has("OES_texture_half_float_linear") === !0 ? (r.rectAreaLTC1 = de.LTC_HALF_1, r.rectAreaLTC2 = de.LTC_HALF_2) : console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")), r.ambient[0] = f, r.ambient[1] = d, r.ambient[2] = g;
13629
13629
  const E = r.hash;
13630
- (E.directionalLength !== _ || E.pointLength !== m || E.spotLength !== p || E.rectAreaLength !== S || E.hemiLength !== v || E.numDirectionalShadows !== M || E.numPointShadows !== b || E.numSpotShadows !== R || E.numSpotMaps !== w) && (r.directional.length = _, r.spot.length = p, r.rectArea.length = S, r.point.length = m, r.hemi.length = v, r.directionalShadow.length = M, r.directionalShadowMap.length = M, r.pointShadow.length = b, r.pointShadowMap.length = b, r.spotShadow.length = R, r.spotShadowMap.length = R, r.directionalShadowMatrix.length = M, r.pointShadowMatrix.length = b, r.spotLightMatrix.length = R + w - N, r.spotLightMap.length = w, r.numSpotLightShadowsWithMaps = N, E.directionalLength = _, E.pointLength = m, E.spotLength = p, E.rectAreaLength = S, E.hemiLength = v, E.numDirectionalShadows = M, E.numPointShadows = b, E.numSpotShadows = R, E.numSpotMaps = w, r.version = Cx++);
13630
+ (E.directionalLength !== _ || E.pointLength !== m || E.spotLength !== p || E.rectAreaLength !== y || E.hemiLength !== v || E.numDirectionalShadows !== M || E.numPointShadows !== b || E.numSpotShadows !== R || E.numSpotMaps !== w) && (r.directional.length = _, r.spot.length = p, r.rectArea.length = y, r.point.length = m, r.hemi.length = v, r.directionalShadow.length = M, r.directionalShadowMap.length = M, r.pointShadow.length = b, r.pointShadowMap.length = b, r.spotShadow.length = R, r.spotShadowMap.length = R, r.directionalShadowMatrix.length = M, r.pointShadowMatrix.length = b, r.spotLightMatrix.length = R + w - N, r.spotLightMap.length = w, r.numSpotLightShadowsWithMaps = N, E.directionalLength = _, E.pointLength = m, E.spotLength = p, E.rectAreaLength = y, E.hemiLength = v, E.numDirectionalShadows = M, E.numPointShadows = b, E.numSpotShadows = R, E.numSpotMaps = w, r.version = Cx++);
13631
13631
  }
13632
13632
  function c(u, h) {
13633
13633
  let f = 0, d = 0, g = 0, _ = 0, m = 0;
13634
13634
  const p = h.matrixWorldInverse;
13635
- for (let S = 0, v = u.length; S < v; S++) {
13636
- const M = u[S];
13635
+ for (let y = 0, v = u.length; y < v; y++) {
13636
+ const M = u[y];
13637
13637
  if (M.isDirectionalLight) {
13638
13638
  const b = r.directional[f];
13639
13639
  b.direction.setFromMatrixPosition(M.matrixWorld), s.setFromMatrixPosition(M.target.matrixWorld), b.direction.sub(s), b.direction.transformDirection(p), f++;
@@ -13659,7 +13659,7 @@ function Px(n, e) {
13659
13659
  };
13660
13660
  }
13661
13661
  function $c(n, e) {
13662
- const t = new Px(n, e), i = [], r = [];
13662
+ const t = new Lx(n, e), i = [], r = [];
13663
13663
  function s() {
13664
13664
  i.length = 0, r.length = 0;
13665
13665
  }
@@ -13688,7 +13688,7 @@ function $c(n, e) {
13688
13688
  pushShadow: a
13689
13689
  };
13690
13690
  }
13691
- function Lx(n, e) {
13691
+ function Px(n, e) {
13692
13692
  let t = /* @__PURE__ */ new WeakMap();
13693
13693
  function i(s, o = 0) {
13694
13694
  const a = t.get(s);
@@ -13805,11 +13805,11 @@ function Ox(n, e, t) {
13805
13805
  s.y * B.w
13806
13806
  ), F.viewport(o), H.updateMatrices(z, Q), i = H.getFrustum(), M(R, w, H.camera, z, this.type);
13807
13807
  }
13808
- H.isPointLightShadow !== !0 && this.type === An && S(H, w), H.needsUpdate = !1;
13808
+ H.isPointLightShadow !== !0 && this.type === An && y(H, w), H.needsUpdate = !1;
13809
13809
  }
13810
13810
  p = this.type, m.needsUpdate = !1, n.setRenderTarget(N, x, E);
13811
13811
  };
13812
- function S(b, R) {
13812
+ function y(b, R) {
13813
13813
  const w = e.update(_);
13814
13814
  f.defines.VSM_SAMPLES !== b.blurSamples && (f.defines.VSM_SAMPLES = b.blurSamples, d.defines.VSM_SAMPLES = b.blurSamples, f.needsUpdate = !0, d.needsUpdate = !0), b.mapPass === null && (b.mapPass = new di(r.x, r.y)), f.uniforms.shadow_pass.value = b.map.texture, f.uniforms.resolution.value = b.mapSize, f.uniforms.radius.value = b.radius, n.setRenderTarget(b.mapPass), n.clear(), n.renderBufferDirect(R, null, w, f, _, null), d.uniforms.shadow_pass.value = b.mapPass.texture, d.uniforms.resolution.value = b.mapSize, d.uniforms.radius.value = b.radius, n.setRenderTarget(b.map), n.clear(), n.renderBufferDirect(R, null, w, d, _, null);
13815
13815
  }
@@ -13958,7 +13958,7 @@ function Fx(n, e, t) {
13958
13958
  };
13959
13959
  }
13960
13960
  const a = new r(), l = new s(), c = new o(), u = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
13961
- let f = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, S = null, v = null, M = null, b = null, R = null, w = null, N = null, x = !1, E = null, F = null, ee = null, O = null, U = null;
13961
+ let f = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, y = null, v = null, M = null, b = null, R = null, w = null, N = null, x = !1, E = null, F = null, ee = null, O = null, U = null;
13962
13962
  const C = n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
13963
13963
  let z = !1, H = 0;
13964
13964
  const V = n.getParameter(n.VERSION);
@@ -13973,7 +13973,7 @@ function Fx(n, e, t) {
13973
13973
  return He;
13974
13974
  }
13975
13975
  const Ae = {};
13976
- Ae[n.TEXTURE_2D] = ge(n.TEXTURE_2D, n.TEXTURE_2D, 1), Ae[n.TEXTURE_CUBE_MAP] = ge(n.TEXTURE_CUBE_MAP, n.TEXTURE_CUBE_MAP_POSITIVE_X, 6), i && (Ae[n.TEXTURE_2D_ARRAY] = ge(n.TEXTURE_2D_ARRAY, n.TEXTURE_2D_ARRAY, 1, 1), Ae[n.TEXTURE_3D] = ge(n.TEXTURE_3D, n.TEXTURE_3D, 1, 1)), a.setClear(0, 0, 0, 1), l.setClear(1), c.setClear(0), we(n.DEPTH_TEST), l.setFunc(ea), ne(!1), be(Ll), we(n.CULL_FACE), J(Wn);
13976
+ Ae[n.TEXTURE_2D] = ge(n.TEXTURE_2D, n.TEXTURE_2D, 1), Ae[n.TEXTURE_CUBE_MAP] = ge(n.TEXTURE_CUBE_MAP, n.TEXTURE_CUBE_MAP_POSITIVE_X, 6), i && (Ae[n.TEXTURE_2D_ARRAY] = ge(n.TEXTURE_2D_ARRAY, n.TEXTURE_2D_ARRAY, 1, 1), Ae[n.TEXTURE_3D] = ge(n.TEXTURE_3D, n.TEXTURE_3D, 1, 1)), a.setClear(0, 0, 0, 1), l.setClear(1), c.setClear(0), we(n.DEPTH_TEST), l.setFunc(ea), ne(!1), be(Pl), we(n.CULL_FACE), J(Wn);
13977
13977
  function we(I) {
13978
13978
  f[I] !== !0 && (n.enable(I), f[I] = !0);
13979
13979
  }
@@ -14002,16 +14002,16 @@ function Fx(n, e, t) {
14002
14002
  function Ce(I) {
14003
14003
  return m !== I ? (n.useProgram(I), m = I, !0) : !1;
14004
14004
  }
14005
- const P = {
14005
+ const L = {
14006
14006
  [Ni]: n.FUNC_ADD,
14007
14007
  [Dp]: n.FUNC_SUBTRACT,
14008
14008
  [Ip]: n.FUNC_REVERSE_SUBTRACT
14009
14009
  };
14010
14010
  if (i)
14011
- P[Nl] = n.MIN, P[Ol] = n.MAX;
14011
+ L[Nl] = n.MIN, L[Ol] = n.MAX;
14012
14012
  else {
14013
14013
  const I = e.get("EXT_blend_minmax");
14014
- I !== null && (P[Nl] = I.MIN_EXT, P[Ol] = I.MAX_EXT);
14014
+ I !== null && (L[Nl] = I.MIN_EXT, L[Ol] = I.MAX_EXT);
14015
14015
  }
14016
14016
  const he = {
14017
14017
  [Up]: n.ZERO,
@@ -14031,8 +14031,8 @@ function Fx(n, e, t) {
14031
14031
  p === !0 && (Te(n.BLEND), p = !1);
14032
14032
  return;
14033
14033
  }
14034
- if (p === !1 && (we(n.BLEND), p = !0), I !== Lp) {
14035
- if (I !== S || Je !== x) {
14034
+ if (p === !1 && (we(n.BLEND), p = !0), I !== Pp) {
14035
+ if (I !== y || Je !== x) {
14036
14036
  if ((v !== Ni || R !== Ni) && (n.blendEquation(n.FUNC_ADD), v = Ni, R = Ni), Je)
14037
14037
  switch (I) {
14038
14038
  case Hi:
@@ -14069,11 +14069,11 @@ function Fx(n, e, t) {
14069
14069
  console.error("THREE.WebGLState: Invalid blending: ", I);
14070
14070
  break;
14071
14071
  }
14072
- M = null, b = null, w = null, N = null, S = I, x = Je;
14072
+ M = null, b = null, w = null, N = null, y = I, x = Je;
14073
14073
  }
14074
14074
  return;
14075
14075
  }
14076
- fe = fe || _e, He = He || $, qe = qe || re, (_e !== v || fe !== R) && (n.blendEquationSeparate(P[_e], P[fe]), v = _e, R = fe), ($ !== M || re !== b || He !== w || qe !== N) && (n.blendFuncSeparate(he[$], he[re], he[He], he[qe]), M = $, b = re, w = He, N = qe), S = I, x = !1;
14076
+ fe = fe || _e, He = He || $, qe = qe || re, (_e !== v || fe !== R) && (n.blendEquationSeparate(L[_e], L[fe]), v = _e, R = fe), ($ !== M || re !== b || He !== w || qe !== N) && (n.blendFuncSeparate(he[$], he[re], he[He], he[qe]), M = $, b = re, w = He, N = qe), y = I, x = !1;
14077
14077
  }
14078
14078
  function ae(I, _e) {
14079
14079
  I.side === Cn ? Te(n.CULL_FACE) : we(n.CULL_FACE);
@@ -14086,7 +14086,7 @@ function Fx(n, e, t) {
14086
14086
  E !== I && (I ? n.frontFace(n.CW) : n.frontFace(n.CCW), E = I);
14087
14087
  }
14088
14088
  function be(I) {
14089
- I !== Cp ? (we(n.CULL_FACE), I !== F && (I === Ll ? n.cullFace(n.BACK) : I === Rp ? n.cullFace(n.FRONT) : n.cullFace(n.FRONT_AND_BACK))) : Te(n.CULL_FACE), F = I;
14089
+ I !== Cp ? (we(n.CULL_FACE), I !== F && (I === Pl ? n.cullFace(n.BACK) : I === Rp ? n.cullFace(n.FRONT) : n.cullFace(n.FRONT_AND_BACK))) : Te(n.CULL_FACE), F = I;
14090
14090
  }
14091
14091
  function ye(I) {
14092
14092
  I !== ee && (z && n.lineWidth(I), ee = I);
@@ -14094,7 +14094,7 @@ function Fx(n, e, t) {
14094
14094
  function Se(I, _e, $) {
14095
14095
  I ? (we(n.POLYGON_OFFSET_FILL), (O !== _e || U !== $) && (n.polygonOffset(_e, $), O = _e, U = $)) : Te(n.POLYGON_OFFSET_FILL);
14096
14096
  }
14097
- function Pe(I) {
14097
+ function Le(I) {
14098
14098
  I ? we(n.SCISSOR_TEST) : Te(n.SCISSOR_TEST);
14099
14099
  }
14100
14100
  function ze(I) {
@@ -14109,7 +14109,7 @@ function Fx(n, e, t) {
14109
14109
  const I = Q[K];
14110
14110
  I !== void 0 && I.type !== void 0 && (n.bindTexture(I.type, null), I.type = void 0, I.texture = void 0);
14111
14111
  }
14112
- function y() {
14112
+ function S() {
14113
14113
  try {
14114
14114
  n.compressedTexImage2D.apply(n, arguments);
14115
14115
  } catch (I) {
@@ -14165,7 +14165,7 @@ function Fx(n, e, t) {
14165
14165
  console.error("THREE.WebGLState:", I);
14166
14166
  }
14167
14167
  }
14168
- function L() {
14168
+ function P() {
14169
14169
  try {
14170
14170
  n.texImage2D.apply(n, arguments);
14171
14171
  } catch (I) {
@@ -14196,7 +14196,7 @@ function Fx(n, e, t) {
14196
14196
  u.get(_e) !== re && (n.uniformBlockBinding(_e, re, I.__bindingPointIndex), u.set(_e, re));
14197
14197
  }
14198
14198
  function We() {
14199
- n.disable(n.BLEND), n.disable(n.CULL_FACE), n.disable(n.DEPTH_TEST), n.disable(n.POLYGON_OFFSET_FILL), n.disable(n.SCISSOR_TEST), n.disable(n.STENCIL_TEST), n.disable(n.SAMPLE_ALPHA_TO_COVERAGE), n.blendEquation(n.FUNC_ADD), n.blendFunc(n.ONE, n.ZERO), n.blendFuncSeparate(n.ONE, n.ZERO, n.ONE, n.ZERO), n.colorMask(!0, !0, !0, !0), n.clearColor(0, 0, 0, 0), n.depthMask(!0), n.depthFunc(n.LESS), n.clearDepth(1), n.stencilMask(4294967295), n.stencilFunc(n.ALWAYS, 0, 4294967295), n.stencilOp(n.KEEP, n.KEEP, n.KEEP), n.clearStencil(0), n.cullFace(n.BACK), n.frontFace(n.CCW), n.polygonOffset(0, 0), n.activeTexture(n.TEXTURE0), n.bindFramebuffer(n.FRAMEBUFFER, null), i === !0 && (n.bindFramebuffer(n.DRAW_FRAMEBUFFER, null), n.bindFramebuffer(n.READ_FRAMEBUFFER, null)), n.useProgram(null), n.lineWidth(1), n.scissor(0, 0, n.canvas.width, n.canvas.height), n.viewport(0, 0, n.canvas.width, n.canvas.height), f = {}, K = null, Q = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, S = null, v = null, M = null, b = null, R = null, w = null, N = null, x = !1, E = null, F = null, ee = null, O = null, U = null, oe.set(0, 0, n.canvas.width, n.canvas.height), me.set(0, 0, n.canvas.width, n.canvas.height), a.reset(), l.reset(), c.reset();
14199
+ n.disable(n.BLEND), n.disable(n.CULL_FACE), n.disable(n.DEPTH_TEST), n.disable(n.POLYGON_OFFSET_FILL), n.disable(n.SCISSOR_TEST), n.disable(n.STENCIL_TEST), n.disable(n.SAMPLE_ALPHA_TO_COVERAGE), n.blendEquation(n.FUNC_ADD), n.blendFunc(n.ONE, n.ZERO), n.blendFuncSeparate(n.ONE, n.ZERO, n.ONE, n.ZERO), n.colorMask(!0, !0, !0, !0), n.clearColor(0, 0, 0, 0), n.depthMask(!0), n.depthFunc(n.LESS), n.clearDepth(1), n.stencilMask(4294967295), n.stencilFunc(n.ALWAYS, 0, 4294967295), n.stencilOp(n.KEEP, n.KEEP, n.KEEP), n.clearStencil(0), n.cullFace(n.BACK), n.frontFace(n.CCW), n.polygonOffset(0, 0), n.activeTexture(n.TEXTURE0), n.bindFramebuffer(n.FRAMEBUFFER, null), i === !0 && (n.bindFramebuffer(n.DRAW_FRAMEBUFFER, null), n.bindFramebuffer(n.READ_FRAMEBUFFER, null)), n.useProgram(null), n.lineWidth(1), n.scissor(0, 0, n.canvas.width, n.canvas.height), n.viewport(0, 0, n.canvas.width, n.canvas.height), f = {}, K = null, Q = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, y = null, v = null, M = null, b = null, R = null, w = null, N = null, x = !1, E = null, F = null, ee = null, O = null, U = null, oe.set(0, 0, n.canvas.width, n.canvas.height), me.set(0, 0, n.canvas.width, n.canvas.height), a.reset(), l.reset(), c.reset();
14200
14200
  }
14201
14201
  return {
14202
14202
  buffers: {
@@ -14215,13 +14215,13 @@ function Fx(n, e, t) {
14215
14215
  setCullFace: be,
14216
14216
  setLineWidth: ye,
14217
14217
  setPolygonOffset: Se,
14218
- setScissorTest: Pe,
14218
+ setScissorTest: Le,
14219
14219
  activeTexture: ze,
14220
14220
  bindTexture: tt,
14221
14221
  unbindTexture: A,
14222
- compressedTexImage2D: y,
14222
+ compressedTexImage2D: S,
14223
14223
  compressedTexImage3D: W,
14224
- texImage2D: L,
14224
+ texImage2D: P,
14225
14225
  texImage3D: te,
14226
14226
  updateUBOMapping: ve,
14227
14227
  uniformBlockBinding: Ne,
@@ -14245,19 +14245,19 @@ function Bx(n, e, t, i, r, s, o) {
14245
14245
  p = typeof OffscreenCanvas != "undefined" && new OffscreenCanvas(1, 1).getContext("2d") !== null;
14246
14246
  } catch (A) {
14247
14247
  }
14248
- function S(A, y) {
14248
+ function y(A, S) {
14249
14249
  return p ? (
14250
14250
  // eslint-disable-next-line compat/compat
14251
- new OffscreenCanvas(A, y)
14251
+ new OffscreenCanvas(A, S)
14252
14252
  ) : Us("canvas");
14253
14253
  }
14254
- function v(A, y, W, se) {
14254
+ function v(A, S, W, se) {
14255
14255
  let ie = 1;
14256
- if ((A.width > se || A.height > se) && (ie = se / Math.max(A.width, A.height)), ie < 1 || y === !0)
14256
+ if ((A.width > se || A.height > se) && (ie = se / Math.max(A.width, A.height)), ie < 1 || S === !0)
14257
14257
  if (typeof HTMLImageElement != "undefined" && A instanceof HTMLImageElement || typeof HTMLCanvasElement != "undefined" && A instanceof HTMLCanvasElement || typeof ImageBitmap != "undefined" && A instanceof ImageBitmap) {
14258
- const le = y ? Is : Math.floor, Ee = le(ie * A.width), ce = le(ie * A.height);
14259
- _ === void 0 && (_ = S(Ee, ce));
14260
- const X = W ? S(Ee, ce) : _;
14258
+ const le = S ? Is : Math.floor, Ee = le(ie * A.width), ce = le(ie * A.height);
14259
+ _ === void 0 && (_ = y(Ee, ce));
14260
+ const X = W ? y(Ee, ce) : _;
14261
14261
  return X.width = Ee, X.height = ce, X.getContext("2d").drawImage(A, 0, 0, Ee, ce), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + A.width + "x" + A.height + ") to (" + Ee + "x" + ce + ")."), X;
14262
14262
  } else
14263
14263
  return "data" in A && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + A.width + "x" + A.height + ")."), A;
@@ -14269,56 +14269,56 @@ function Bx(n, e, t, i, r, s, o) {
14269
14269
  function b(A) {
14270
14270
  return a ? !1 : A.wrapS !== nn || A.wrapT !== nn || A.minFilter !== Dt && A.minFilter !== $t;
14271
14271
  }
14272
- function R(A, y) {
14273
- return A.generateMipmaps && y && A.minFilter !== Dt && A.minFilter !== $t;
14272
+ function R(A, S) {
14273
+ return A.generateMipmaps && S && A.minFilter !== Dt && A.minFilter !== $t;
14274
14274
  }
14275
14275
  function w(A) {
14276
14276
  n.generateMipmap(A);
14277
14277
  }
14278
- function N(A, y, W, se, ie = !1) {
14278
+ function N(A, S, W, se, ie = !1) {
14279
14279
  if (a === !1)
14280
- return y;
14280
+ return S;
14281
14281
  if (A !== null) {
14282
14282
  if (n[A] !== void 0)
14283
14283
  return n[A];
14284
14284
  console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + A + "'");
14285
14285
  }
14286
- let le = y;
14287
- return y === n.RED && (W === n.FLOAT && (le = n.R32F), W === n.HALF_FLOAT && (le = n.R16F), W === n.UNSIGNED_BYTE && (le = n.R8)), y === n.RED_INTEGER && (W === n.UNSIGNED_BYTE && (le = n.R8UI), W === n.UNSIGNED_SHORT && (le = n.R16UI), W === n.UNSIGNED_INT && (le = n.R32UI), W === n.BYTE && (le = n.R8I), W === n.SHORT && (le = n.R16I), W === n.INT && (le = n.R32I)), y === n.RG && (W === n.FLOAT && (le = n.RG32F), W === n.HALF_FLOAT && (le = n.RG16F), W === n.UNSIGNED_BYTE && (le = n.RG8)), y === n.RGBA && (W === n.FLOAT && (le = n.RGBA32F), W === n.HALF_FLOAT && (le = n.RGBA16F), W === n.UNSIGNED_BYTE && (le = se === nt && ie === !1 ? n.SRGB8_ALPHA8 : n.RGBA8), W === n.UNSIGNED_SHORT_4_4_4_4 && (le = n.RGBA4), W === n.UNSIGNED_SHORT_5_5_5_1 && (le = n.RGB5_A1)), (le === n.R16F || le === n.R32F || le === n.RG16F || le === n.RG32F || le === n.RGBA16F || le === n.RGBA32F) && e.get("EXT_color_buffer_float"), le;
14286
+ let le = S;
14287
+ return S === n.RED && (W === n.FLOAT && (le = n.R32F), W === n.HALF_FLOAT && (le = n.R16F), W === n.UNSIGNED_BYTE && (le = n.R8)), S === n.RED_INTEGER && (W === n.UNSIGNED_BYTE && (le = n.R8UI), W === n.UNSIGNED_SHORT && (le = n.R16UI), W === n.UNSIGNED_INT && (le = n.R32UI), W === n.BYTE && (le = n.R8I), W === n.SHORT && (le = n.R16I), W === n.INT && (le = n.R32I)), S === n.RG && (W === n.FLOAT && (le = n.RG32F), W === n.HALF_FLOAT && (le = n.RG16F), W === n.UNSIGNED_BYTE && (le = n.RG8)), S === n.RGBA && (W === n.FLOAT && (le = n.RGBA32F), W === n.HALF_FLOAT && (le = n.RGBA16F), W === n.UNSIGNED_BYTE && (le = se === nt && ie === !1 ? n.SRGB8_ALPHA8 : n.RGBA8), W === n.UNSIGNED_SHORT_4_4_4_4 && (le = n.RGBA4), W === n.UNSIGNED_SHORT_5_5_5_1 && (le = n.RGB5_A1)), (le === n.R16F || le === n.R32F || le === n.RG16F || le === n.RG32F || le === n.RGBA16F || le === n.RGBA32F) && e.get("EXT_color_buffer_float"), le;
14288
14288
  }
14289
- function x(A, y, W) {
14290
- return R(A, W) === !0 || A.isFramebufferTexture && A.minFilter !== Dt && A.minFilter !== $t ? Math.log2(Math.max(y.width, y.height)) + 1 : A.mipmaps !== void 0 && A.mipmaps.length > 0 ? A.mipmaps.length : A.isCompressedTexture && Array.isArray(A.image) ? y.mipmaps.length : 1;
14289
+ function x(A, S, W) {
14290
+ return R(A, W) === !0 || A.isFramebufferTexture && A.minFilter !== Dt && A.minFilter !== $t ? Math.log2(Math.max(S.width, S.height)) + 1 : A.mipmaps !== void 0 && A.mipmaps.length > 0 ? A.mipmaps.length : A.isCompressedTexture && Array.isArray(A.image) ? S.mipmaps.length : 1;
14291
14291
  }
14292
14292
  function E(A) {
14293
14293
  return A === Dt || A === Fl || A === so ? n.NEAREST : n.LINEAR;
14294
14294
  }
14295
14295
  function F(A) {
14296
- const y = A.target;
14297
- y.removeEventListener("dispose", F), O(y), y.isVideoTexture && g.delete(y);
14296
+ const S = A.target;
14297
+ S.removeEventListener("dispose", F), O(S), S.isVideoTexture && g.delete(S);
14298
14298
  }
14299
14299
  function ee(A) {
14300
- const y = A.target;
14301
- y.removeEventListener("dispose", ee), C(y);
14300
+ const S = A.target;
14301
+ S.removeEventListener("dispose", ee), C(S);
14302
14302
  }
14303
14303
  function O(A) {
14304
- const y = i.get(A);
14305
- if (y.__webglInit === void 0)
14304
+ const S = i.get(A);
14305
+ if (S.__webglInit === void 0)
14306
14306
  return;
14307
14307
  const W = A.source, se = m.get(W);
14308
14308
  if (se) {
14309
- const ie = se[y.__cacheKey];
14309
+ const ie = se[S.__cacheKey];
14310
14310
  ie.usedTimes--, ie.usedTimes === 0 && U(A), Object.keys(se).length === 0 && m.delete(W);
14311
14311
  }
14312
14312
  i.remove(A);
14313
14313
  }
14314
14314
  function U(A) {
14315
- const y = i.get(A);
14316
- n.deleteTexture(y.__webglTexture);
14315
+ const S = i.get(A);
14316
+ n.deleteTexture(S.__webglTexture);
14317
14317
  const W = A.source, se = m.get(W);
14318
- delete se[y.__cacheKey], o.memory.textures--;
14318
+ delete se[S.__cacheKey], o.memory.textures--;
14319
14319
  }
14320
14320
  function C(A) {
14321
- const y = A.texture, W = i.get(A), se = i.get(y);
14321
+ const S = A.texture, W = i.get(A), se = i.get(S);
14322
14322
  if (se.__webglTexture !== void 0 && (n.deleteTexture(se.__webglTexture), o.memory.textures--), A.depthTexture && A.depthTexture.dispose(), A.isWebGLCubeRenderTarget)
14323
14323
  for (let ie = 0; ie < 6; ie++) {
14324
14324
  if (Array.isArray(W.__webglFramebuffer[ie]))
@@ -14340,11 +14340,11 @@ function Bx(n, e, t, i, r, s, o) {
14340
14340
  W.__webglDepthRenderbuffer && n.deleteRenderbuffer(W.__webglDepthRenderbuffer);
14341
14341
  }
14342
14342
  if (A.isWebGLMultipleRenderTargets)
14343
- for (let ie = 0, le = y.length; ie < le; ie++) {
14344
- const Ee = i.get(y[ie]);
14345
- Ee.__webglTexture && (n.deleteTexture(Ee.__webglTexture), o.memory.textures--), i.remove(y[ie]);
14343
+ for (let ie = 0, le = S.length; ie < le; ie++) {
14344
+ const Ee = i.get(S[ie]);
14345
+ Ee.__webglTexture && (n.deleteTexture(Ee.__webglTexture), o.memory.textures--), i.remove(S[ie]);
14346
14346
  }
14347
- i.remove(y), i.remove(A);
14347
+ i.remove(S), i.remove(A);
14348
14348
  }
14349
14349
  let z = 0;
14350
14350
  function H() {
@@ -14355,10 +14355,10 @@ function Bx(n, e, t, i, r, s, o) {
14355
14355
  return A >= l && console.warn("THREE.WebGLTextures: Trying to use " + A + " texture units while this GPU supports only " + l), z += 1, A;
14356
14356
  }
14357
14357
  function K(A) {
14358
- const y = [];
14359
- return y.push(A.wrapS), y.push(A.wrapT), y.push(A.wrapR || 0), y.push(A.magFilter), y.push(A.minFilter), y.push(A.anisotropy), y.push(A.internalFormat), y.push(A.format), y.push(A.type), y.push(A.generateMipmaps), y.push(A.premultiplyAlpha), y.push(A.flipY), y.push(A.unpackAlignment), y.push(A.colorSpace), y.join();
14358
+ const S = [];
14359
+ return S.push(A.wrapS), S.push(A.wrapT), S.push(A.wrapR || 0), S.push(A.magFilter), S.push(A.minFilter), S.push(A.anisotropy), S.push(A.internalFormat), S.push(A.format), S.push(A.type), S.push(A.generateMipmaps), S.push(A.premultiplyAlpha), S.push(A.flipY), S.push(A.unpackAlignment), S.push(A.colorSpace), S.join();
14360
14360
  }
14361
- function Q(A, y) {
14361
+ function Q(A, S) {
14362
14362
  const W = i.get(A);
14363
14363
  if (A.isVideoTexture && ze(A), A.isRenderTargetTexture === !1 && A.version > 0 && W.__version !== A.version) {
14364
14364
  const se = A.image;
@@ -14367,35 +14367,35 @@ function Bx(n, e, t, i, r, s, o) {
14367
14367
  else if (se.complete === !1)
14368
14368
  console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");
14369
14369
  else {
14370
- Ve(W, A, y);
14370
+ Ve(W, A, S);
14371
14371
  return;
14372
14372
  }
14373
14373
  }
14374
- t.bindTexture(n.TEXTURE_2D, W.__webglTexture, n.TEXTURE0 + y);
14374
+ t.bindTexture(n.TEXTURE_2D, W.__webglTexture, n.TEXTURE0 + S);
14375
14375
  }
14376
- function B(A, y) {
14376
+ function B(A, S) {
14377
14377
  const W = i.get(A);
14378
14378
  if (A.version > 0 && W.__version !== A.version) {
14379
- Ve(W, A, y);
14379
+ Ve(W, A, S);
14380
14380
  return;
14381
14381
  }
14382
- t.bindTexture(n.TEXTURE_2D_ARRAY, W.__webglTexture, n.TEXTURE0 + y);
14382
+ t.bindTexture(n.TEXTURE_2D_ARRAY, W.__webglTexture, n.TEXTURE0 + S);
14383
14383
  }
14384
- function q(A, y) {
14384
+ function q(A, S) {
14385
14385
  const W = i.get(A);
14386
14386
  if (A.version > 0 && W.__version !== A.version) {
14387
- Ve(W, A, y);
14387
+ Ve(W, A, S);
14388
14388
  return;
14389
14389
  }
14390
- t.bindTexture(n.TEXTURE_3D, W.__webglTexture, n.TEXTURE0 + y);
14390
+ t.bindTexture(n.TEXTURE_3D, W.__webglTexture, n.TEXTURE0 + S);
14391
14391
  }
14392
- function oe(A, y) {
14392
+ function oe(A, S) {
14393
14393
  const W = i.get(A);
14394
14394
  if (A.version > 0 && W.__version !== A.version) {
14395
- Ze(W, A, y);
14395
+ Ze(W, A, S);
14396
14396
  return;
14397
14397
  }
14398
- t.bindTexture(n.TEXTURE_CUBE_MAP, W.__webglTexture, n.TEXTURE0 + y);
14398
+ t.bindTexture(n.TEXTURE_CUBE_MAP, W.__webglTexture, n.TEXTURE0 + S);
14399
14399
  }
14400
14400
  const me = {
14401
14401
  [ia]: n.REPEAT,
@@ -14418,72 +14418,72 @@ function Bx(n, e, t, i, r, s, o) {
14418
14418
  [Sm]: n.GREATER,
14419
14419
  [Mm]: n.NOTEQUAL
14420
14420
  };
14421
- function we(A, y, W) {
14422
- if (W ? (n.texParameteri(A, n.TEXTURE_WRAP_S, me[y.wrapS]), n.texParameteri(A, n.TEXTURE_WRAP_T, me[y.wrapT]), (A === n.TEXTURE_3D || A === n.TEXTURE_2D_ARRAY) && n.texParameteri(A, n.TEXTURE_WRAP_R, me[y.wrapR]), n.texParameteri(A, n.TEXTURE_MAG_FILTER, ge[y.magFilter]), n.texParameteri(A, n.TEXTURE_MIN_FILTER, ge[y.minFilter])) : (n.texParameteri(A, n.TEXTURE_WRAP_S, n.CLAMP_TO_EDGE), n.texParameteri(A, n.TEXTURE_WRAP_T, n.CLAMP_TO_EDGE), (A === n.TEXTURE_3D || A === n.TEXTURE_2D_ARRAY) && n.texParameteri(A, n.TEXTURE_WRAP_R, n.CLAMP_TO_EDGE), (y.wrapS !== nn || y.wrapT !== nn) && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."), n.texParameteri(A, n.TEXTURE_MAG_FILTER, E(y.magFilter)), n.texParameteri(A, n.TEXTURE_MIN_FILTER, E(y.minFilter)), y.minFilter !== Dt && y.minFilter !== $t && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")), y.compareFunction && (n.texParameteri(A, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE), n.texParameteri(A, n.TEXTURE_COMPARE_FUNC, Ae[y.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
14421
+ function we(A, S, W) {
14422
+ if (W ? (n.texParameteri(A, n.TEXTURE_WRAP_S, me[S.wrapS]), n.texParameteri(A, n.TEXTURE_WRAP_T, me[S.wrapT]), (A === n.TEXTURE_3D || A === n.TEXTURE_2D_ARRAY) && n.texParameteri(A, n.TEXTURE_WRAP_R, me[S.wrapR]), n.texParameteri(A, n.TEXTURE_MAG_FILTER, ge[S.magFilter]), n.texParameteri(A, n.TEXTURE_MIN_FILTER, ge[S.minFilter])) : (n.texParameteri(A, n.TEXTURE_WRAP_S, n.CLAMP_TO_EDGE), n.texParameteri(A, n.TEXTURE_WRAP_T, n.CLAMP_TO_EDGE), (A === n.TEXTURE_3D || A === n.TEXTURE_2D_ARRAY) && n.texParameteri(A, n.TEXTURE_WRAP_R, n.CLAMP_TO_EDGE), (S.wrapS !== nn || S.wrapT !== nn) && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."), n.texParameteri(A, n.TEXTURE_MAG_FILTER, E(S.magFilter)), n.texParameteri(A, n.TEXTURE_MIN_FILTER, E(S.minFilter)), S.minFilter !== Dt && S.minFilter !== $t && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")), S.compareFunction && (n.texParameteri(A, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE), n.texParameteri(A, n.TEXTURE_COMPARE_FUNC, Ae[S.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
14423
14423
  const se = e.get("EXT_texture_filter_anisotropic");
14424
- if (y.magFilter === Dt || y.minFilter !== so && y.minFilter !== yr || y.type === Gn && e.has("OES_texture_float_linear") === !1 || a === !1 && y.type === Sr && e.has("OES_texture_half_float_linear") === !1)
14424
+ if (S.magFilter === Dt || S.minFilter !== so && S.minFilter !== yr || S.type === Gn && e.has("OES_texture_float_linear") === !1 || a === !1 && S.type === Sr && e.has("OES_texture_half_float_linear") === !1)
14425
14425
  return;
14426
- (y.anisotropy > 1 || i.get(y).__currentAnisotropy) && (n.texParameterf(A, se.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(y.anisotropy, r.getMaxAnisotropy())), i.get(y).__currentAnisotropy = y.anisotropy);
14426
+ (S.anisotropy > 1 || i.get(S).__currentAnisotropy) && (n.texParameterf(A, se.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(S.anisotropy, r.getMaxAnisotropy())), i.get(S).__currentAnisotropy = S.anisotropy);
14427
14427
  }
14428
14428
  }
14429
- function Te(A, y) {
14429
+ function Te(A, S) {
14430
14430
  let W = !1;
14431
- A.__webglInit === void 0 && (A.__webglInit = !0, y.addEventListener("dispose", F));
14432
- const se = y.source;
14431
+ A.__webglInit === void 0 && (A.__webglInit = !0, S.addEventListener("dispose", F));
14432
+ const se = S.source;
14433
14433
  let ie = m.get(se);
14434
14434
  ie === void 0 && (ie = {}, m.set(se, ie));
14435
- const le = K(y);
14435
+ const le = K(S);
14436
14436
  if (le !== A.__cacheKey) {
14437
14437
  ie[le] === void 0 && (ie[le] = {
14438
14438
  texture: n.createTexture(),
14439
14439
  usedTimes: 0
14440
14440
  }, o.memory.textures++, W = !0), ie[le].usedTimes++;
14441
14441
  const Ee = ie[A.__cacheKey];
14442
- Ee !== void 0 && (ie[A.__cacheKey].usedTimes--, Ee.usedTimes === 0 && U(y)), A.__cacheKey = le, A.__webglTexture = ie[le].texture;
14442
+ Ee !== void 0 && (ie[A.__cacheKey].usedTimes--, Ee.usedTimes === 0 && U(S)), A.__cacheKey = le, A.__webglTexture = ie[le].texture;
14443
14443
  }
14444
14444
  return W;
14445
14445
  }
14446
- function Ve(A, y, W) {
14446
+ function Ve(A, S, W) {
14447
14447
  let se = n.TEXTURE_2D;
14448
- (y.isDataArrayTexture || y.isCompressedArrayTexture) && (se = n.TEXTURE_2D_ARRAY), y.isData3DTexture && (se = n.TEXTURE_3D);
14449
- const ie = Te(A, y), le = y.source;
14448
+ (S.isDataArrayTexture || S.isCompressedArrayTexture) && (se = n.TEXTURE_2D_ARRAY), S.isData3DTexture && (se = n.TEXTURE_3D);
14449
+ const ie = Te(A, S), le = S.source;
14450
14450
  t.bindTexture(se, A.__webglTexture, n.TEXTURE0 + W);
14451
14451
  const Ee = i.get(le);
14452
14452
  if (le.version !== Ee.__version || ie === !0) {
14453
- t.activeTexture(n.TEXTURE0 + W), n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, y.flipY), n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, y.premultiplyAlpha), n.pixelStorei(n.UNPACK_ALIGNMENT, y.unpackAlignment), n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL, n.NONE);
14454
- const ce = b(y) && M(y.image) === !1;
14455
- let X = v(y.image, ce, !1, u);
14456
- X = tt(y, X);
14457
- const L = M(X) || a, te = s.convert(y.format, y.colorSpace);
14458
- let xe = s.convert(y.type), pe = N(y.internalFormat, te, xe, y.colorSpace, y.isVideoTexture);
14459
- we(se, y, L);
14453
+ t.activeTexture(n.TEXTURE0 + W), n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, S.flipY), n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, S.premultiplyAlpha), n.pixelStorei(n.UNPACK_ALIGNMENT, S.unpackAlignment), n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL, n.NONE);
14454
+ const ce = b(S) && M(S.image) === !1;
14455
+ let X = v(S.image, ce, !1, u);
14456
+ X = tt(S, X);
14457
+ const P = M(X) || a, te = s.convert(S.format, S.colorSpace);
14458
+ let xe = s.convert(S.type), pe = N(S.internalFormat, te, xe, S.colorSpace, S.isVideoTexture);
14459
+ we(se, S, P);
14460
14460
  let ve;
14461
- const Ne = y.mipmaps, We = a && y.isVideoTexture !== !0, I = Ee.__version === void 0 || ie === !0, _e = x(y, X, L);
14462
- if (y.isDepthTexture)
14463
- pe = n.DEPTH_COMPONENT, a ? y.type === Gn ? pe = n.DEPTH_COMPONENT32F : y.type === kn ? pe = n.DEPTH_COMPONENT24 : y.type === oi ? pe = n.DEPTH24_STENCIL8 : pe = n.DEPTH_COMPONENT16 : y.type === Gn && console.error("WebGLRenderer: Floating point depth texture requires WebGL2."), y.format === ai && pe === n.DEPTH_COMPONENT && y.type !== Ra && y.type !== kn && (console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."), y.type = kn, xe = s.convert(y.type)), y.format === Xi && pe === n.DEPTH_COMPONENT && (pe = n.DEPTH_STENCIL, y.type !== oi && (console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."), y.type = oi, xe = s.convert(y.type))), I && (We ? t.texStorage2D(n.TEXTURE_2D, 1, pe, X.width, X.height) : t.texImage2D(n.TEXTURE_2D, 0, pe, X.width, X.height, 0, te, xe, null));
14464
- else if (y.isDataTexture)
14465
- if (Ne.length > 0 && L) {
14461
+ const Ne = S.mipmaps, We = a && S.isVideoTexture !== !0, I = Ee.__version === void 0 || ie === !0, _e = x(S, X, P);
14462
+ if (S.isDepthTexture)
14463
+ pe = n.DEPTH_COMPONENT, a ? S.type === Gn ? pe = n.DEPTH_COMPONENT32F : S.type === kn ? pe = n.DEPTH_COMPONENT24 : S.type === oi ? pe = n.DEPTH24_STENCIL8 : pe = n.DEPTH_COMPONENT16 : S.type === Gn && console.error("WebGLRenderer: Floating point depth texture requires WebGL2."), S.format === ai && pe === n.DEPTH_COMPONENT && S.type !== Ra && S.type !== kn && (console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."), S.type = kn, xe = s.convert(S.type)), S.format === Xi && pe === n.DEPTH_COMPONENT && (pe = n.DEPTH_STENCIL, S.type !== oi && (console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."), S.type = oi, xe = s.convert(S.type))), I && (We ? t.texStorage2D(n.TEXTURE_2D, 1, pe, X.width, X.height) : t.texImage2D(n.TEXTURE_2D, 0, pe, X.width, X.height, 0, te, xe, null));
14464
+ else if (S.isDataTexture)
14465
+ if (Ne.length > 0 && P) {
14466
14466
  We && I && t.texStorage2D(n.TEXTURE_2D, _e, pe, Ne[0].width, Ne[0].height);
14467
14467
  for (let $ = 0, re = Ne.length; $ < re; $++)
14468
14468
  ve = Ne[$], We ? t.texSubImage2D(n.TEXTURE_2D, $, 0, 0, ve.width, ve.height, te, xe, ve.data) : t.texImage2D(n.TEXTURE_2D, $, pe, ve.width, ve.height, 0, te, xe, ve.data);
14469
- y.generateMipmaps = !1;
14469
+ S.generateMipmaps = !1;
14470
14470
  } else
14471
14471
  We ? (I && t.texStorage2D(n.TEXTURE_2D, _e, pe, X.width, X.height), t.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, X.width, X.height, te, xe, X.data)) : t.texImage2D(n.TEXTURE_2D, 0, pe, X.width, X.height, 0, te, xe, X.data);
14472
- else if (y.isCompressedTexture)
14473
- if (y.isCompressedArrayTexture) {
14472
+ else if (S.isCompressedTexture)
14473
+ if (S.isCompressedArrayTexture) {
14474
14474
  We && I && t.texStorage3D(n.TEXTURE_2D_ARRAY, _e, pe, Ne[0].width, Ne[0].height, X.depth);
14475
14475
  for (let $ = 0, re = Ne.length; $ < re; $++)
14476
- ve = Ne[$], y.format !== rn ? te !== null ? We ? t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY, $, 0, 0, 0, ve.width, ve.height, X.depth, te, ve.data, 0, 0) : t.compressedTexImage3D(n.TEXTURE_2D_ARRAY, $, pe, ve.width, ve.height, X.depth, 0, ve.data, 0, 0) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : We ? t.texSubImage3D(n.TEXTURE_2D_ARRAY, $, 0, 0, 0, ve.width, ve.height, X.depth, te, xe, ve.data) : t.texImage3D(n.TEXTURE_2D_ARRAY, $, pe, ve.width, ve.height, X.depth, 0, te, xe, ve.data);
14476
+ ve = Ne[$], S.format !== rn ? te !== null ? We ? t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY, $, 0, 0, 0, ve.width, ve.height, X.depth, te, ve.data, 0, 0) : t.compressedTexImage3D(n.TEXTURE_2D_ARRAY, $, pe, ve.width, ve.height, X.depth, 0, ve.data, 0, 0) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : We ? t.texSubImage3D(n.TEXTURE_2D_ARRAY, $, 0, 0, 0, ve.width, ve.height, X.depth, te, xe, ve.data) : t.texImage3D(n.TEXTURE_2D_ARRAY, $, pe, ve.width, ve.height, X.depth, 0, te, xe, ve.data);
14477
14477
  } else {
14478
14478
  We && I && t.texStorage2D(n.TEXTURE_2D, _e, pe, Ne[0].width, Ne[0].height);
14479
14479
  for (let $ = 0, re = Ne.length; $ < re; $++)
14480
- ve = Ne[$], y.format !== rn ? te !== null ? We ? t.compressedTexSubImage2D(n.TEXTURE_2D, $, 0, 0, ve.width, ve.height, te, ve.data) : t.compressedTexImage2D(n.TEXTURE_2D, $, pe, ve.width, ve.height, 0, ve.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : We ? t.texSubImage2D(n.TEXTURE_2D, $, 0, 0, ve.width, ve.height, te, xe, ve.data) : t.texImage2D(n.TEXTURE_2D, $, pe, ve.width, ve.height, 0, te, xe, ve.data);
14480
+ ve = Ne[$], S.format !== rn ? te !== null ? We ? t.compressedTexSubImage2D(n.TEXTURE_2D, $, 0, 0, ve.width, ve.height, te, ve.data) : t.compressedTexImage2D(n.TEXTURE_2D, $, pe, ve.width, ve.height, 0, ve.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : We ? t.texSubImage2D(n.TEXTURE_2D, $, 0, 0, ve.width, ve.height, te, xe, ve.data) : t.texImage2D(n.TEXTURE_2D, $, pe, ve.width, ve.height, 0, te, xe, ve.data);
14481
14481
  }
14482
- else if (y.isDataArrayTexture)
14482
+ else if (S.isDataArrayTexture)
14483
14483
  We ? (I && t.texStorage3D(n.TEXTURE_2D_ARRAY, _e, pe, X.width, X.height, X.depth), t.texSubImage3D(n.TEXTURE_2D_ARRAY, 0, 0, 0, 0, X.width, X.height, X.depth, te, xe, X.data)) : t.texImage3D(n.TEXTURE_2D_ARRAY, 0, pe, X.width, X.height, X.depth, 0, te, xe, X.data);
14484
- else if (y.isData3DTexture)
14484
+ else if (S.isData3DTexture)
14485
14485
  We ? (I && t.texStorage3D(n.TEXTURE_3D, _e, pe, X.width, X.height, X.depth), t.texSubImage3D(n.TEXTURE_3D, 0, 0, 0, 0, X.width, X.height, X.depth, te, xe, X.data)) : t.texImage3D(n.TEXTURE_3D, 0, pe, X.width, X.height, X.depth, 0, te, xe, X.data);
14486
- else if (y.isFramebufferTexture) {
14486
+ else if (S.isFramebufferTexture) {
14487
14487
  if (I)
14488
14488
  if (We)
14489
14489
  t.texStorage2D(n.TEXTURE_2D, _e, pe, X.width, X.height);
@@ -14492,43 +14492,43 @@ function Bx(n, e, t, i, r, s, o) {
14492
14492
  for (let fe = 0; fe < _e; fe++)
14493
14493
  t.texImage2D(n.TEXTURE_2D, fe, pe, $, re, 0, te, xe, null), $ >>= 1, re >>= 1;
14494
14494
  }
14495
- } else if (Ne.length > 0 && L) {
14495
+ } else if (Ne.length > 0 && P) {
14496
14496
  We && I && t.texStorage2D(n.TEXTURE_2D, _e, pe, Ne[0].width, Ne[0].height);
14497
14497
  for (let $ = 0, re = Ne.length; $ < re; $++)
14498
14498
  ve = Ne[$], We ? t.texSubImage2D(n.TEXTURE_2D, $, 0, 0, te, xe, ve) : t.texImage2D(n.TEXTURE_2D, $, pe, te, xe, ve);
14499
- y.generateMipmaps = !1;
14499
+ S.generateMipmaps = !1;
14500
14500
  } else
14501
14501
  We ? (I && t.texStorage2D(n.TEXTURE_2D, _e, pe, X.width, X.height), t.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, te, xe, X)) : t.texImage2D(n.TEXTURE_2D, 0, pe, te, xe, X);
14502
- R(y, L) && w(se), Ee.__version = le.version, y.onUpdate && y.onUpdate(y);
14502
+ R(S, P) && w(se), Ee.__version = le.version, S.onUpdate && S.onUpdate(S);
14503
14503
  }
14504
- A.__version = y.version;
14504
+ A.__version = S.version;
14505
14505
  }
14506
- function Ze(A, y, W) {
14507
- if (y.image.length !== 6)
14506
+ function Ze(A, S, W) {
14507
+ if (S.image.length !== 6)
14508
14508
  return;
14509
- const se = Te(A, y), ie = y.source;
14509
+ const se = Te(A, S), ie = S.source;
14510
14510
  t.bindTexture(n.TEXTURE_CUBE_MAP, A.__webglTexture, n.TEXTURE0 + W);
14511
14511
  const le = i.get(ie);
14512
14512
  if (ie.version !== le.__version || se === !0) {
14513
- t.activeTexture(n.TEXTURE0 + W), n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, y.flipY), n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, y.premultiplyAlpha), n.pixelStorei(n.UNPACK_ALIGNMENT, y.unpackAlignment), n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL, n.NONE);
14514
- const Ee = y.isCompressedTexture || y.image[0].isCompressedTexture, ce = y.image[0] && y.image[0].isDataTexture, X = [];
14513
+ t.activeTexture(n.TEXTURE0 + W), n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, S.flipY), n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, S.premultiplyAlpha), n.pixelStorei(n.UNPACK_ALIGNMENT, S.unpackAlignment), n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL, n.NONE);
14514
+ const Ee = S.isCompressedTexture || S.image[0].isCompressedTexture, ce = S.image[0] && S.image[0].isDataTexture, X = [];
14515
14515
  for (let $ = 0; $ < 6; $++)
14516
- !Ee && !ce ? X[$] = v(y.image[$], !1, !0, c) : X[$] = ce ? y.image[$].image : y.image[$], X[$] = tt(y, X[$]);
14517
- const L = X[0], te = M(L) || a, xe = s.convert(y.format, y.colorSpace), pe = s.convert(y.type), ve = N(y.internalFormat, xe, pe, y.colorSpace), Ne = a && y.isVideoTexture !== !0, We = le.__version === void 0 || se === !0;
14518
- let I = x(y, L, te);
14519
- we(n.TEXTURE_CUBE_MAP, y, te);
14516
+ !Ee && !ce ? X[$] = v(S.image[$], !1, !0, c) : X[$] = ce ? S.image[$].image : S.image[$], X[$] = tt(S, X[$]);
14517
+ const P = X[0], te = M(P) || a, xe = s.convert(S.format, S.colorSpace), pe = s.convert(S.type), ve = N(S.internalFormat, xe, pe, S.colorSpace), Ne = a && S.isVideoTexture !== !0, We = le.__version === void 0 || se === !0;
14518
+ let I = x(S, P, te);
14519
+ we(n.TEXTURE_CUBE_MAP, S, te);
14520
14520
  let _e;
14521
14521
  if (Ee) {
14522
- Ne && We && t.texStorage2D(n.TEXTURE_CUBE_MAP, I, ve, L.width, L.height);
14522
+ Ne && We && t.texStorage2D(n.TEXTURE_CUBE_MAP, I, ve, P.width, P.height);
14523
14523
  for (let $ = 0; $ < 6; $++) {
14524
14524
  _e = X[$].mipmaps;
14525
14525
  for (let re = 0; re < _e.length; re++) {
14526
14526
  const fe = _e[re];
14527
- y.format !== rn ? xe !== null ? Ne ? t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, 0, 0, fe.width, fe.height, xe, fe.data) : t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, ve, fe.width, fe.height, 0, fe.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : Ne ? t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, 0, 0, fe.width, fe.height, xe, pe, fe.data) : t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, ve, fe.width, fe.height, 0, xe, pe, fe.data);
14527
+ S.format !== rn ? xe !== null ? Ne ? t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, 0, 0, fe.width, fe.height, xe, fe.data) : t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, ve, fe.width, fe.height, 0, fe.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : Ne ? t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, 0, 0, fe.width, fe.height, xe, pe, fe.data) : t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, re, ve, fe.width, fe.height, 0, xe, pe, fe.data);
14528
14528
  }
14529
14529
  }
14530
14530
  } else {
14531
- _e = y.mipmaps, Ne && We && (_e.length > 0 && I++, t.texStorage2D(n.TEXTURE_CUBE_MAP, I, ve, X[0].width, X[0].height));
14531
+ _e = S.mipmaps, Ne && We && (_e.length > 0 && I++, t.texStorage2D(n.TEXTURE_CUBE_MAP, I, ve, X[0].width, X[0].height));
14532
14532
  for (let $ = 0; $ < 6; $++)
14533
14533
  if (ce) {
14534
14534
  Ne ? t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, 0, 0, 0, X[$].width, X[$].height, xe, pe, X[$].data) : t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + $, 0, ve, X[$].width, X[$].height, 0, xe, pe, X[$].data);
@@ -14544,174 +14544,174 @@ function Bx(n, e, t, i, r, s, o) {
14544
14544
  }
14545
14545
  }
14546
14546
  }
14547
- R(y, te) && w(n.TEXTURE_CUBE_MAP), le.__version = ie.version, y.onUpdate && y.onUpdate(y);
14547
+ R(S, te) && w(n.TEXTURE_CUBE_MAP), le.__version = ie.version, S.onUpdate && S.onUpdate(S);
14548
14548
  }
14549
- A.__version = y.version;
14549
+ A.__version = S.version;
14550
14550
  }
14551
- function Ce(A, y, W, se, ie, le) {
14551
+ function Ce(A, S, W, se, ie, le) {
14552
14552
  const Ee = s.convert(W.format, W.colorSpace), ce = s.convert(W.type), X = N(W.internalFormat, Ee, ce, W.colorSpace);
14553
- if (!i.get(y).__hasExternalTextures) {
14554
- const te = Math.max(1, y.width >> le), xe = Math.max(1, y.height >> le);
14555
- ie === n.TEXTURE_3D || ie === n.TEXTURE_2D_ARRAY ? t.texImage3D(ie, le, X, te, xe, y.depth, 0, Ee, ce, null) : t.texImage2D(ie, le, X, te, xe, 0, Ee, ce, null);
14553
+ if (!i.get(S).__hasExternalTextures) {
14554
+ const te = Math.max(1, S.width >> le), xe = Math.max(1, S.height >> le);
14555
+ ie === n.TEXTURE_3D || ie === n.TEXTURE_2D_ARRAY ? t.texImage3D(ie, le, X, te, xe, S.depth, 0, Ee, ce, null) : t.texImage2D(ie, le, X, te, xe, 0, Ee, ce, null);
14556
14556
  }
14557
- t.bindFramebuffer(n.FRAMEBUFFER, A), Pe(y) ? f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, se, ie, i.get(W).__webglTexture, 0, Se(y)) : (ie === n.TEXTURE_2D || ie >= n.TEXTURE_CUBE_MAP_POSITIVE_X && ie <= n.TEXTURE_CUBE_MAP_NEGATIVE_Z) && n.framebufferTexture2D(n.FRAMEBUFFER, se, ie, i.get(W).__webglTexture, le), t.bindFramebuffer(n.FRAMEBUFFER, null);
14557
+ t.bindFramebuffer(n.FRAMEBUFFER, A), Le(S) ? f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, se, ie, i.get(W).__webglTexture, 0, Se(S)) : (ie === n.TEXTURE_2D || ie >= n.TEXTURE_CUBE_MAP_POSITIVE_X && ie <= n.TEXTURE_CUBE_MAP_NEGATIVE_Z) && n.framebufferTexture2D(n.FRAMEBUFFER, se, ie, i.get(W).__webglTexture, le), t.bindFramebuffer(n.FRAMEBUFFER, null);
14558
14558
  }
14559
- function P(A, y, W) {
14560
- if (n.bindRenderbuffer(n.RENDERBUFFER, A), y.depthBuffer && !y.stencilBuffer) {
14559
+ function L(A, S, W) {
14560
+ if (n.bindRenderbuffer(n.RENDERBUFFER, A), S.depthBuffer && !S.stencilBuffer) {
14561
14561
  let se = n.DEPTH_COMPONENT16;
14562
- if (W || Pe(y)) {
14563
- const ie = y.depthTexture;
14562
+ if (W || Le(S)) {
14563
+ const ie = S.depthTexture;
14564
14564
  ie && ie.isDepthTexture && (ie.type === Gn ? se = n.DEPTH_COMPONENT32F : ie.type === kn && (se = n.DEPTH_COMPONENT24));
14565
- const le = Se(y);
14566
- Pe(y) ? f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER, le, se, y.width, y.height) : n.renderbufferStorageMultisample(n.RENDERBUFFER, le, se, y.width, y.height);
14565
+ const le = Se(S);
14566
+ Le(S) ? f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER, le, se, S.width, S.height) : n.renderbufferStorageMultisample(n.RENDERBUFFER, le, se, S.width, S.height);
14567
14567
  } else
14568
- n.renderbufferStorage(n.RENDERBUFFER, se, y.width, y.height);
14568
+ n.renderbufferStorage(n.RENDERBUFFER, se, S.width, S.height);
14569
14569
  n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.RENDERBUFFER, A);
14570
- } else if (y.depthBuffer && y.stencilBuffer) {
14571
- const se = Se(y);
14572
- W && Pe(y) === !1 ? n.renderbufferStorageMultisample(n.RENDERBUFFER, se, n.DEPTH24_STENCIL8, y.width, y.height) : Pe(y) ? f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER, se, n.DEPTH24_STENCIL8, y.width, y.height) : n.renderbufferStorage(n.RENDERBUFFER, n.DEPTH_STENCIL, y.width, y.height), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.RENDERBUFFER, A);
14570
+ } else if (S.depthBuffer && S.stencilBuffer) {
14571
+ const se = Se(S);
14572
+ W && Le(S) === !1 ? n.renderbufferStorageMultisample(n.RENDERBUFFER, se, n.DEPTH24_STENCIL8, S.width, S.height) : Le(S) ? f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER, se, n.DEPTH24_STENCIL8, S.width, S.height) : n.renderbufferStorage(n.RENDERBUFFER, n.DEPTH_STENCIL, S.width, S.height), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.RENDERBUFFER, A);
14573
14573
  } else {
14574
- const se = y.isWebGLMultipleRenderTargets === !0 ? y.texture : [y.texture];
14574
+ const se = S.isWebGLMultipleRenderTargets === !0 ? S.texture : [S.texture];
14575
14575
  for (let ie = 0; ie < se.length; ie++) {
14576
- const le = se[ie], Ee = s.convert(le.format, le.colorSpace), ce = s.convert(le.type), X = N(le.internalFormat, Ee, ce, le.colorSpace), L = Se(y);
14577
- W && Pe(y) === !1 ? n.renderbufferStorageMultisample(n.RENDERBUFFER, L, X, y.width, y.height) : Pe(y) ? f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER, L, X, y.width, y.height) : n.renderbufferStorage(n.RENDERBUFFER, X, y.width, y.height);
14576
+ const le = se[ie], Ee = s.convert(le.format, le.colorSpace), ce = s.convert(le.type), X = N(le.internalFormat, Ee, ce, le.colorSpace), P = Se(S);
14577
+ W && Le(S) === !1 ? n.renderbufferStorageMultisample(n.RENDERBUFFER, P, X, S.width, S.height) : Le(S) ? f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER, P, X, S.width, S.height) : n.renderbufferStorage(n.RENDERBUFFER, X, S.width, S.height);
14578
14578
  }
14579
14579
  }
14580
14580
  n.bindRenderbuffer(n.RENDERBUFFER, null);
14581
14581
  }
14582
- function he(A, y) {
14583
- if (y && y.isWebGLCubeRenderTarget)
14582
+ function he(A, S) {
14583
+ if (S && S.isWebGLCubeRenderTarget)
14584
14584
  throw new Error("Depth Texture with cube render targets is not supported");
14585
- if (t.bindFramebuffer(n.FRAMEBUFFER, A), !(y.depthTexture && y.depthTexture.isDepthTexture))
14585
+ if (t.bindFramebuffer(n.FRAMEBUFFER, A), !(S.depthTexture && S.depthTexture.isDepthTexture))
14586
14586
  throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
14587
- (!i.get(y.depthTexture).__webglTexture || y.depthTexture.image.width !== y.width || y.depthTexture.image.height !== y.height) && (y.depthTexture.image.width = y.width, y.depthTexture.image.height = y.height, y.depthTexture.needsUpdate = !0), Q(y.depthTexture, 0);
14588
- const se = i.get(y.depthTexture).__webglTexture, ie = Se(y);
14589
- if (y.depthTexture.format === ai)
14590
- Pe(y) ? f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.TEXTURE_2D, se, 0, ie) : n.framebufferTexture2D(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.TEXTURE_2D, se, 0);
14591
- else if (y.depthTexture.format === Xi)
14592
- Pe(y) ? f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.TEXTURE_2D, se, 0, ie) : n.framebufferTexture2D(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.TEXTURE_2D, se, 0);
14587
+ (!i.get(S.depthTexture).__webglTexture || S.depthTexture.image.width !== S.width || S.depthTexture.image.height !== S.height) && (S.depthTexture.image.width = S.width, S.depthTexture.image.height = S.height, S.depthTexture.needsUpdate = !0), Q(S.depthTexture, 0);
14588
+ const se = i.get(S.depthTexture).__webglTexture, ie = Se(S);
14589
+ if (S.depthTexture.format === ai)
14590
+ Le(S) ? f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.TEXTURE_2D, se, 0, ie) : n.framebufferTexture2D(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.TEXTURE_2D, se, 0);
14591
+ else if (S.depthTexture.format === Xi)
14592
+ Le(S) ? f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.TEXTURE_2D, se, 0, ie) : n.framebufferTexture2D(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.TEXTURE_2D, se, 0);
14593
14593
  else
14594
14594
  throw new Error("Unknown depthTexture format");
14595
14595
  }
14596
14596
  function J(A) {
14597
- const y = i.get(A), W = A.isWebGLCubeRenderTarget === !0;
14598
- if (A.depthTexture && !y.__autoAllocateDepthBuffer) {
14597
+ const S = i.get(A), W = A.isWebGLCubeRenderTarget === !0;
14598
+ if (A.depthTexture && !S.__autoAllocateDepthBuffer) {
14599
14599
  if (W)
14600
14600
  throw new Error("target.depthTexture not supported in Cube render targets");
14601
- he(y.__webglFramebuffer, A);
14601
+ he(S.__webglFramebuffer, A);
14602
14602
  } else if (W) {
14603
- y.__webglDepthbuffer = [];
14603
+ S.__webglDepthbuffer = [];
14604
14604
  for (let se = 0; se < 6; se++)
14605
- t.bindFramebuffer(n.FRAMEBUFFER, y.__webglFramebuffer[se]), y.__webglDepthbuffer[se] = n.createRenderbuffer(), P(y.__webglDepthbuffer[se], A, !1);
14605
+ t.bindFramebuffer(n.FRAMEBUFFER, S.__webglFramebuffer[se]), S.__webglDepthbuffer[se] = n.createRenderbuffer(), L(S.__webglDepthbuffer[se], A, !1);
14606
14606
  } else
14607
- t.bindFramebuffer(n.FRAMEBUFFER, y.__webglFramebuffer), y.__webglDepthbuffer = n.createRenderbuffer(), P(y.__webglDepthbuffer, A, !1);
14607
+ t.bindFramebuffer(n.FRAMEBUFFER, S.__webglFramebuffer), S.__webglDepthbuffer = n.createRenderbuffer(), L(S.__webglDepthbuffer, A, !1);
14608
14608
  t.bindFramebuffer(n.FRAMEBUFFER, null);
14609
14609
  }
14610
- function ae(A, y, W) {
14610
+ function ae(A, S, W) {
14611
14611
  const se = i.get(A);
14612
- y !== void 0 && Ce(se.__webglFramebuffer, A, A.texture, n.COLOR_ATTACHMENT0, n.TEXTURE_2D, 0), W !== void 0 && J(A);
14612
+ S !== void 0 && Ce(se.__webglFramebuffer, A, A.texture, n.COLOR_ATTACHMENT0, n.TEXTURE_2D, 0), W !== void 0 && J(A);
14613
14613
  }
14614
14614
  function ne(A) {
14615
- const y = A.texture, W = i.get(A), se = i.get(y);
14616
- A.addEventListener("dispose", ee), A.isWebGLMultipleRenderTargets !== !0 && (se.__webglTexture === void 0 && (se.__webglTexture = n.createTexture()), se.__version = y.version, o.memory.textures++);
14615
+ const S = A.texture, W = i.get(A), se = i.get(S);
14616
+ A.addEventListener("dispose", ee), A.isWebGLMultipleRenderTargets !== !0 && (se.__webglTexture === void 0 && (se.__webglTexture = n.createTexture()), se.__version = S.version, o.memory.textures++);
14617
14617
  const ie = A.isWebGLCubeRenderTarget === !0, le = A.isWebGLMultipleRenderTargets === !0, Ee = M(A) || a;
14618
14618
  if (ie) {
14619
14619
  W.__webglFramebuffer = [];
14620
14620
  for (let ce = 0; ce < 6; ce++)
14621
- if (a && y.mipmaps && y.mipmaps.length > 0) {
14621
+ if (a && S.mipmaps && S.mipmaps.length > 0) {
14622
14622
  W.__webglFramebuffer[ce] = [];
14623
- for (let X = 0; X < y.mipmaps.length; X++)
14623
+ for (let X = 0; X < S.mipmaps.length; X++)
14624
14624
  W.__webglFramebuffer[ce][X] = n.createFramebuffer();
14625
14625
  } else
14626
14626
  W.__webglFramebuffer[ce] = n.createFramebuffer();
14627
14627
  } else {
14628
- if (a && y.mipmaps && y.mipmaps.length > 0) {
14628
+ if (a && S.mipmaps && S.mipmaps.length > 0) {
14629
14629
  W.__webglFramebuffer = [];
14630
- for (let ce = 0; ce < y.mipmaps.length; ce++)
14630
+ for (let ce = 0; ce < S.mipmaps.length; ce++)
14631
14631
  W.__webglFramebuffer[ce] = n.createFramebuffer();
14632
14632
  } else
14633
14633
  W.__webglFramebuffer = n.createFramebuffer();
14634
14634
  if (le)
14635
14635
  if (r.drawBuffers) {
14636
14636
  const ce = A.texture;
14637
- for (let X = 0, L = ce.length; X < L; X++) {
14637
+ for (let X = 0, P = ce.length; X < P; X++) {
14638
14638
  const te = i.get(ce[X]);
14639
14639
  te.__webglTexture === void 0 && (te.__webglTexture = n.createTexture(), o.memory.textures++);
14640
14640
  }
14641
14641
  } else
14642
14642
  console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");
14643
- if (a && A.samples > 0 && Pe(A) === !1) {
14644
- const ce = le ? y : [y];
14643
+ if (a && A.samples > 0 && Le(A) === !1) {
14644
+ const ce = le ? S : [S];
14645
14645
  W.__webglMultisampledFramebuffer = n.createFramebuffer(), W.__webglColorRenderbuffer = [], t.bindFramebuffer(n.FRAMEBUFFER, W.__webglMultisampledFramebuffer);
14646
14646
  for (let X = 0; X < ce.length; X++) {
14647
- const L = ce[X];
14647
+ const P = ce[X];
14648
14648
  W.__webglColorRenderbuffer[X] = n.createRenderbuffer(), n.bindRenderbuffer(n.RENDERBUFFER, W.__webglColorRenderbuffer[X]);
14649
- const te = s.convert(L.format, L.colorSpace), xe = s.convert(L.type), pe = N(L.internalFormat, te, xe, L.colorSpace, A.isXRRenderTarget === !0), ve = Se(A);
14649
+ const te = s.convert(P.format, P.colorSpace), xe = s.convert(P.type), pe = N(P.internalFormat, te, xe, P.colorSpace, A.isXRRenderTarget === !0), ve = Se(A);
14650
14650
  n.renderbufferStorageMultisample(n.RENDERBUFFER, ve, pe, A.width, A.height), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0 + X, n.RENDERBUFFER, W.__webglColorRenderbuffer[X]);
14651
14651
  }
14652
- n.bindRenderbuffer(n.RENDERBUFFER, null), A.depthBuffer && (W.__webglDepthRenderbuffer = n.createRenderbuffer(), P(W.__webglDepthRenderbuffer, A, !0)), t.bindFramebuffer(n.FRAMEBUFFER, null);
14652
+ n.bindRenderbuffer(n.RENDERBUFFER, null), A.depthBuffer && (W.__webglDepthRenderbuffer = n.createRenderbuffer(), L(W.__webglDepthRenderbuffer, A, !0)), t.bindFramebuffer(n.FRAMEBUFFER, null);
14653
14653
  }
14654
14654
  }
14655
14655
  if (ie) {
14656
- t.bindTexture(n.TEXTURE_CUBE_MAP, se.__webglTexture), we(n.TEXTURE_CUBE_MAP, y, Ee);
14656
+ t.bindTexture(n.TEXTURE_CUBE_MAP, se.__webglTexture), we(n.TEXTURE_CUBE_MAP, S, Ee);
14657
14657
  for (let ce = 0; ce < 6; ce++)
14658
- if (a && y.mipmaps && y.mipmaps.length > 0)
14659
- for (let X = 0; X < y.mipmaps.length; X++)
14660
- Ce(W.__webglFramebuffer[ce][X], A, y, n.COLOR_ATTACHMENT0, n.TEXTURE_CUBE_MAP_POSITIVE_X + ce, X);
14658
+ if (a && S.mipmaps && S.mipmaps.length > 0)
14659
+ for (let X = 0; X < S.mipmaps.length; X++)
14660
+ Ce(W.__webglFramebuffer[ce][X], A, S, n.COLOR_ATTACHMENT0, n.TEXTURE_CUBE_MAP_POSITIVE_X + ce, X);
14661
14661
  else
14662
- Ce(W.__webglFramebuffer[ce], A, y, n.COLOR_ATTACHMENT0, n.TEXTURE_CUBE_MAP_POSITIVE_X + ce, 0);
14663
- R(y, Ee) && w(n.TEXTURE_CUBE_MAP), t.unbindTexture();
14662
+ Ce(W.__webglFramebuffer[ce], A, S, n.COLOR_ATTACHMENT0, n.TEXTURE_CUBE_MAP_POSITIVE_X + ce, 0);
14663
+ R(S, Ee) && w(n.TEXTURE_CUBE_MAP), t.unbindTexture();
14664
14664
  } else if (le) {
14665
14665
  const ce = A.texture;
14666
- for (let X = 0, L = ce.length; X < L; X++) {
14666
+ for (let X = 0, P = ce.length; X < P; X++) {
14667
14667
  const te = ce[X], xe = i.get(te);
14668
14668
  t.bindTexture(n.TEXTURE_2D, xe.__webglTexture), we(n.TEXTURE_2D, te, Ee), Ce(W.__webglFramebuffer, A, te, n.COLOR_ATTACHMENT0 + X, n.TEXTURE_2D, 0), R(te, Ee) && w(n.TEXTURE_2D);
14669
14669
  }
14670
14670
  t.unbindTexture();
14671
14671
  } else {
14672
14672
  let ce = n.TEXTURE_2D;
14673
- if ((A.isWebGL3DRenderTarget || A.isWebGLArrayRenderTarget) && (a ? ce = A.isWebGL3DRenderTarget ? n.TEXTURE_3D : n.TEXTURE_2D_ARRAY : console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")), t.bindTexture(ce, se.__webglTexture), we(ce, y, Ee), a && y.mipmaps && y.mipmaps.length > 0)
14674
- for (let X = 0; X < y.mipmaps.length; X++)
14675
- Ce(W.__webglFramebuffer[X], A, y, n.COLOR_ATTACHMENT0, ce, X);
14673
+ if ((A.isWebGL3DRenderTarget || A.isWebGLArrayRenderTarget) && (a ? ce = A.isWebGL3DRenderTarget ? n.TEXTURE_3D : n.TEXTURE_2D_ARRAY : console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")), t.bindTexture(ce, se.__webglTexture), we(ce, S, Ee), a && S.mipmaps && S.mipmaps.length > 0)
14674
+ for (let X = 0; X < S.mipmaps.length; X++)
14675
+ Ce(W.__webglFramebuffer[X], A, S, n.COLOR_ATTACHMENT0, ce, X);
14676
14676
  else
14677
- Ce(W.__webglFramebuffer, A, y, n.COLOR_ATTACHMENT0, ce, 0);
14678
- R(y, Ee) && w(ce), t.unbindTexture();
14677
+ Ce(W.__webglFramebuffer, A, S, n.COLOR_ATTACHMENT0, ce, 0);
14678
+ R(S, Ee) && w(ce), t.unbindTexture();
14679
14679
  }
14680
14680
  A.depthBuffer && J(A);
14681
14681
  }
14682
14682
  function be(A) {
14683
- const y = M(A) || a, W = A.isWebGLMultipleRenderTargets === !0 ? A.texture : [A.texture];
14683
+ const S = M(A) || a, W = A.isWebGLMultipleRenderTargets === !0 ? A.texture : [A.texture];
14684
14684
  for (let se = 0, ie = W.length; se < ie; se++) {
14685
14685
  const le = W[se];
14686
- if (R(le, y)) {
14686
+ if (R(le, S)) {
14687
14687
  const Ee = A.isWebGLCubeRenderTarget ? n.TEXTURE_CUBE_MAP : n.TEXTURE_2D, ce = i.get(le).__webglTexture;
14688
14688
  t.bindTexture(Ee, ce), w(Ee), t.unbindTexture();
14689
14689
  }
14690
14690
  }
14691
14691
  }
14692
14692
  function ye(A) {
14693
- if (a && A.samples > 0 && Pe(A) === !1) {
14694
- const y = A.isWebGLMultipleRenderTargets ? A.texture : [A.texture], W = A.width, se = A.height;
14693
+ if (a && A.samples > 0 && Le(A) === !1) {
14694
+ const S = A.isWebGLMultipleRenderTargets ? A.texture : [A.texture], W = A.width, se = A.height;
14695
14695
  let ie = n.COLOR_BUFFER_BIT;
14696
14696
  const le = [], Ee = A.stencilBuffer ? n.DEPTH_STENCIL_ATTACHMENT : n.DEPTH_ATTACHMENT, ce = i.get(A), X = A.isWebGLMultipleRenderTargets === !0;
14697
14697
  if (X)
14698
- for (let L = 0; L < y.length; L++)
14699
- t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglMultisampledFramebuffer), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0 + L, n.RENDERBUFFER, null), t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglFramebuffer), n.framebufferTexture2D(n.DRAW_FRAMEBUFFER, n.COLOR_ATTACHMENT0 + L, n.TEXTURE_2D, null, 0);
14698
+ for (let P = 0; P < S.length; P++)
14699
+ t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglMultisampledFramebuffer), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0 + P, n.RENDERBUFFER, null), t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglFramebuffer), n.framebufferTexture2D(n.DRAW_FRAMEBUFFER, n.COLOR_ATTACHMENT0 + P, n.TEXTURE_2D, null, 0);
14700
14700
  t.bindFramebuffer(n.READ_FRAMEBUFFER, ce.__webglMultisampledFramebuffer), t.bindFramebuffer(n.DRAW_FRAMEBUFFER, ce.__webglFramebuffer);
14701
- for (let L = 0; L < y.length; L++) {
14702
- le.push(n.COLOR_ATTACHMENT0 + L), A.depthBuffer && le.push(Ee);
14701
+ for (let P = 0; P < S.length; P++) {
14702
+ le.push(n.COLOR_ATTACHMENT0 + P), A.depthBuffer && le.push(Ee);
14703
14703
  const te = ce.__ignoreDepthValues !== void 0 ? ce.__ignoreDepthValues : !1;
14704
- if (te === !1 && (A.depthBuffer && (ie |= n.DEPTH_BUFFER_BIT), A.stencilBuffer && (ie |= n.STENCIL_BUFFER_BIT)), X && n.framebufferRenderbuffer(n.READ_FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.RENDERBUFFER, ce.__webglColorRenderbuffer[L]), te === !0 && (n.invalidateFramebuffer(n.READ_FRAMEBUFFER, [Ee]), n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER, [Ee])), X) {
14705
- const xe = i.get(y[L]).__webglTexture;
14704
+ if (te === !1 && (A.depthBuffer && (ie |= n.DEPTH_BUFFER_BIT), A.stencilBuffer && (ie |= n.STENCIL_BUFFER_BIT)), X && n.framebufferRenderbuffer(n.READ_FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.RENDERBUFFER, ce.__webglColorRenderbuffer[P]), te === !0 && (n.invalidateFramebuffer(n.READ_FRAMEBUFFER, [Ee]), n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER, [Ee])), X) {
14705
+ const xe = i.get(S[P]).__webglTexture;
14706
14706
  n.framebufferTexture2D(n.DRAW_FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.TEXTURE_2D, xe, 0);
14707
14707
  }
14708
14708
  n.blitFramebuffer(0, 0, W, se, 0, 0, W, se, ie, n.NEAREST), d && n.invalidateFramebuffer(n.READ_FRAMEBUFFER, le);
14709
14709
  }
14710
14710
  if (t.bindFramebuffer(n.READ_FRAMEBUFFER, null), t.bindFramebuffer(n.DRAW_FRAMEBUFFER, null), X)
14711
- for (let L = 0; L < y.length; L++) {
14712
- t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglMultisampledFramebuffer), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0 + L, n.RENDERBUFFER, ce.__webglColorRenderbuffer[L]);
14713
- const te = i.get(y[L]).__webglTexture;
14714
- t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglFramebuffer), n.framebufferTexture2D(n.DRAW_FRAMEBUFFER, n.COLOR_ATTACHMENT0 + L, n.TEXTURE_2D, te, 0);
14711
+ for (let P = 0; P < S.length; P++) {
14712
+ t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglMultisampledFramebuffer), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0 + P, n.RENDERBUFFER, ce.__webglColorRenderbuffer[P]);
14713
+ const te = i.get(S[P]).__webglTexture;
14714
+ t.bindFramebuffer(n.FRAMEBUFFER, ce.__webglFramebuffer), n.framebufferTexture2D(n.DRAW_FRAMEBUFFER, n.COLOR_ATTACHMENT0 + P, n.TEXTURE_2D, te, 0);
14715
14715
  }
14716
14716
  t.bindFramebuffer(n.DRAW_FRAMEBUFFER, ce.__webglMultisampledFramebuffer);
14717
14717
  }
@@ -14719,19 +14719,19 @@ function Bx(n, e, t, i, r, s, o) {
14719
14719
  function Se(A) {
14720
14720
  return Math.min(h, A.samples);
14721
14721
  }
14722
- function Pe(A) {
14723
- const y = i.get(A);
14724
- return a && A.samples > 0 && e.has("WEBGL_multisampled_render_to_texture") === !0 && y.__useRenderToTexture !== !1;
14722
+ function Le(A) {
14723
+ const S = i.get(A);
14724
+ return a && A.samples > 0 && e.has("WEBGL_multisampled_render_to_texture") === !0 && S.__useRenderToTexture !== !1;
14725
14725
  }
14726
14726
  function ze(A) {
14727
- const y = o.render.frame;
14728
- g.get(A) !== y && (g.set(A, y), A.update());
14727
+ const S = o.render.frame;
14728
+ g.get(A) !== S && (g.set(A, S), A.update());
14729
14729
  }
14730
- function tt(A, y) {
14730
+ function tt(A, S) {
14731
14731
  const W = A.colorSpace, se = A.format, ie = A.type;
14732
- return A.isCompressedTexture === !0 || A.isVideoTexture === !0 || A.format === oa || W !== gn && W !== ci && (W === nt || W === Vs ? a === !1 ? e.has("EXT_sRGB") === !0 && se === rn ? (A.format = oa, A.minFilter = $t, A.generateMipmaps = !1) : y = gh.sRGBToLinear(y) : (se !== rn || ie !== $n) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", W)), y;
14732
+ return A.isCompressedTexture === !0 || A.isVideoTexture === !0 || A.format === oa || W !== gn && W !== ci && (W === nt || W === Vs ? a === !1 ? e.has("EXT_sRGB") === !0 && se === rn ? (A.format = oa, A.minFilter = $t, A.generateMipmaps = !1) : S = gh.sRGBToLinear(S) : (se !== rn || ie !== $n) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", W)), S;
14733
14733
  }
14734
- this.allocateTextureUnit = V, this.resetTextureUnits = H, this.setTexture2D = Q, this.setTexture2DArray = B, this.setTexture3D = q, this.setTextureCube = oe, this.rebindTextures = ae, this.setupRenderTarget = ne, this.updateRenderTargetMipmap = be, this.updateMultisampleRenderTarget = ye, this.setupDepthRenderbuffer = J, this.setupFrameBufferTexture = Ce, this.useMultisampledRTT = Pe;
14734
+ this.allocateTextureUnit = V, this.resetTextureUnits = H, this.setTexture2D = Q, this.setTexture2DArray = B, this.setTexture3D = q, this.setTextureCube = oe, this.rebindTextures = ae, this.setupRenderTarget = ne, this.updateRenderTargetMipmap = be, this.updateMultisampleRenderTarget = ye, this.setupDepthRenderbuffer = J, this.setupFrameBufferTexture = Ce, this.useMultisampledRTT = Le;
14735
14735
  }
14736
14736
  const zx = 0, _t = 1;
14737
14737
  function Hx(n, e, t) {
@@ -14982,7 +14982,7 @@ class Wx extends gi {
14982
14982
  let r = null, s = 1, o = null, a = "local-floor", l = 1, c = null, u = null, h = null, f = null, d = null, g = null;
14983
14983
  const _ = t.getContextAttributes();
14984
14984
  let m = null, p = null;
14985
- const S = [], v = [], M = new Vt();
14985
+ const y = [], v = [], M = new Vt();
14986
14986
  M.layers.enable(1), M.viewport = new Ke();
14987
14987
  const b = new Vt();
14988
14988
  b.layers.enable(2), b.viewport = new Ke();
@@ -14990,27 +14990,27 @@ class Wx extends gi {
14990
14990
  w.layers.enable(1), w.layers.enable(2);
14991
14991
  let N = null, x = null;
14992
14992
  this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(B) {
14993
- let q = S[B];
14994
- return q === void 0 && (q = new Io(), S[B] = q), q.getTargetRaySpace();
14993
+ let q = y[B];
14994
+ return q === void 0 && (q = new Io(), y[B] = q), q.getTargetRaySpace();
14995
14995
  }, this.getControllerGrip = function(B) {
14996
- let q = S[B];
14997
- return q === void 0 && (q = new Io(), S[B] = q), q.getGripSpace();
14996
+ let q = y[B];
14997
+ return q === void 0 && (q = new Io(), y[B] = q), q.getGripSpace();
14998
14998
  }, this.getHand = function(B) {
14999
- let q = S[B];
15000
- return q === void 0 && (q = new Io(), S[B] = q), q.getHandSpace();
14999
+ let q = y[B];
15000
+ return q === void 0 && (q = new Io(), y[B] = q), q.getHandSpace();
15001
15001
  };
15002
15002
  function E(B) {
15003
15003
  const q = v.indexOf(B.inputSource);
15004
15004
  if (q === -1)
15005
15005
  return;
15006
- const oe = S[q];
15006
+ const oe = y[q];
15007
15007
  oe !== void 0 && (oe.update(B.inputSource, B.frame, c || o), oe.dispatchEvent({ type: B.type, data: B.inputSource }));
15008
15008
  }
15009
15009
  function F() {
15010
15010
  r.removeEventListener("select", E), r.removeEventListener("selectstart", E), r.removeEventListener("selectend", E), r.removeEventListener("squeeze", E), r.removeEventListener("squeezestart", E), r.removeEventListener("squeezeend", E), r.removeEventListener("end", F), r.removeEventListener("inputsourceschange", ee);
15011
- for (let B = 0; B < S.length; B++) {
15011
+ for (let B = 0; B < y.length; B++) {
15012
15012
  const q = v[B];
15013
- q !== null && (v[B] = null, S[B].disconnect(q));
15013
+ q !== null && (v[B] = null, y[B].disconnect(q));
15014
15014
  }
15015
15015
  N = null, x = null, e.setRenderTarget(m), d = null, f = null, h = null, r = null, p = null, Q.stop(), i.isPresenting = !1, i.dispatchEvent({ type: "sessionend" });
15016
15016
  }
@@ -15084,13 +15084,13 @@ class Wx extends gi {
15084
15084
  function ee(B) {
15085
15085
  for (let q = 0; q < B.removed.length; q++) {
15086
15086
  const oe = B.removed[q], me = v.indexOf(oe);
15087
- me >= 0 && (v[me] = null, S[me].disconnect(oe));
15087
+ me >= 0 && (v[me] = null, y[me].disconnect(oe));
15088
15088
  }
15089
15089
  for (let q = 0; q < B.added.length; q++) {
15090
15090
  const oe = B.added[q];
15091
15091
  let me = v.indexOf(oe);
15092
15092
  if (me === -1) {
15093
- for (let Ae = 0; Ae < S.length; Ae++)
15093
+ for (let Ae = 0; Ae < y.length; Ae++)
15094
15094
  if (Ae >= v.length) {
15095
15095
  v.push(oe), me = Ae;
15096
15096
  break;
@@ -15101,17 +15101,17 @@ class Wx extends gi {
15101
15101
  if (me === -1)
15102
15102
  break;
15103
15103
  }
15104
- const ge = S[me];
15104
+ const ge = y[me];
15105
15105
  ge && ge.connect(oe);
15106
15106
  }
15107
15107
  }
15108
15108
  const O = new D(), U = new D();
15109
15109
  function C(B, q, oe) {
15110
15110
  O.setFromMatrixPosition(q.matrixWorld), U.setFromMatrixPosition(oe.matrixWorld);
15111
- const me = O.distanceTo(U), ge = q.projectionMatrix.elements, Ae = oe.projectionMatrix.elements, we = ge[14] / (ge[10] - 1), Te = ge[14] / (ge[10] + 1), Ve = (ge[9] + 1) / ge[5], Ze = (ge[9] - 1) / ge[5], Ce = (ge[8] - 1) / ge[0], P = (Ae[8] + 1) / Ae[0], he = we * Ce, J = we * P, ae = me / (-Ce + P), ne = ae * -Ce;
15111
+ const me = O.distanceTo(U), ge = q.projectionMatrix.elements, Ae = oe.projectionMatrix.elements, we = ge[14] / (ge[10] - 1), Te = ge[14] / (ge[10] + 1), Ve = (ge[9] + 1) / ge[5], Ze = (ge[9] - 1) / ge[5], Ce = (ge[8] - 1) / ge[0], L = (Ae[8] + 1) / Ae[0], he = we * Ce, J = we * L, ae = me / (-Ce + L), ne = ae * -Ce;
15112
15112
  q.matrixWorld.decompose(B.position, B.quaternion, B.scale), B.translateX(ne), B.translateZ(ae), B.matrixWorld.compose(B.position, B.quaternion, B.scale), B.matrixWorldInverse.copy(B.matrixWorld).invert();
15113
- const be = we + ae, ye = Te + ae, Se = he - ne, Pe = J + (me - ne), ze = Ve * Te / ye * be, tt = Ze * Te / ye * be;
15114
- B.projectionMatrix.makePerspective(Se, Pe, ze, tt, be, ye), B.projectionMatrixInverse.copy(B.projectionMatrix).invert();
15113
+ const be = we + ae, ye = Te + ae, Se = he - ne, Le = J + (me - ne), ze = Ve * Te / ye * be, tt = Ze * Te / ye * be;
15114
+ B.projectionMatrix.makePerspective(Se, Le, ze, tt, be, ye), B.projectionMatrixInverse.copy(B.projectionMatrix).invert();
15115
15115
  }
15116
15116
  function z(B, q) {
15117
15117
  q === null ? B.matrixWorld.copy(B.matrix) : B.matrixWorld.multiplyMatrices(q.matrixWorld, B.matrix), B.matrixWorldInverse.copy(B.matrixWorld).invert();
@@ -15164,8 +15164,8 @@ class Wx extends gi {
15164
15164
  Te === void 0 && (Te = new Vt(), Te.layers.enable(ge), Te.viewport = new Ke(), R[ge] = Te), Te.matrix.fromArray(Ae.transform.matrix), Te.matrix.decompose(Te.position, Te.quaternion, Te.scale), Te.projectionMatrix.fromArray(Ae.projectionMatrix), Te.projectionMatrixInverse.copy(Te.projectionMatrix).invert(), Te.viewport.set(we.x, we.y, we.width, we.height), ge === 0 && (w.matrix.copy(Te.matrix), w.matrix.decompose(w.position, w.quaternion, w.scale)), me === !0 && w.cameras.push(Te);
15165
15165
  }
15166
15166
  }
15167
- for (let oe = 0; oe < S.length; oe++) {
15168
- const me = v[oe], ge = S[oe];
15167
+ for (let oe = 0; oe < y.length; oe++) {
15168
+ const me = v[oe], ge = y[oe];
15169
15169
  me !== null && ge !== void 0 && ge.update(me, q, c || o);
15170
15170
  }
15171
15171
  V && V(B, q), q.detectedPlanes && i.dispatchEvent({ type: "planesdetected", data: q }), g = null;
@@ -15184,13 +15184,13 @@ function Xx(n, e) {
15184
15184
  function i(m, p) {
15185
15185
  p.color.getRGB(m.fogColor.value, Mh(n)), p.isFog ? (m.fogNear.value = p.near, m.fogFar.value = p.far) : p.isFogExp2 && (m.fogDensity.value = p.density);
15186
15186
  }
15187
- function r(m, p, S, v, M) {
15188
- p.isMeshBasicMaterial || p.isMeshLambertMaterial ? s(m, p) : p.isMeshToonMaterial ? (s(m, p), h(m, p)) : p.isMeshPhongMaterial ? (s(m, p), u(m, p)) : p.isMeshStandardMaterial ? (s(m, p), f(m, p), p.isMeshPhysicalMaterial && d(m, p, M)) : p.isMeshMatcapMaterial ? (s(m, p), g(m, p)) : p.isMeshDepthMaterial ? s(m, p) : p.isMeshDistanceMaterial ? (s(m, p), _(m, p)) : p.isMeshNormalMaterial ? s(m, p) : p.isLineBasicMaterial ? (o(m, p), p.isLineDashedMaterial && a(m, p)) : p.isPointsMaterial ? l(m, p, S, v) : p.isSpriteMaterial ? c(m, p) : p.isShadowMaterial ? (m.color.value.copy(p.color), m.opacity.value = p.opacity) : p.isShaderMaterial && (p.uniformsNeedUpdate = !1);
15187
+ function r(m, p, y, v, M) {
15188
+ p.isMeshBasicMaterial || p.isMeshLambertMaterial ? s(m, p) : p.isMeshToonMaterial ? (s(m, p), h(m, p)) : p.isMeshPhongMaterial ? (s(m, p), u(m, p)) : p.isMeshStandardMaterial ? (s(m, p), f(m, p), p.isMeshPhysicalMaterial && d(m, p, M)) : p.isMeshMatcapMaterial ? (s(m, p), g(m, p)) : p.isMeshDepthMaterial ? s(m, p) : p.isMeshDistanceMaterial ? (s(m, p), _(m, p)) : p.isMeshNormalMaterial ? s(m, p) : p.isLineBasicMaterial ? (o(m, p), p.isLineDashedMaterial && a(m, p)) : p.isPointsMaterial ? l(m, p, y, v) : p.isSpriteMaterial ? c(m, p) : p.isShadowMaterial ? (m.color.value.copy(p.color), m.opacity.value = p.opacity) : p.isShaderMaterial && (p.uniformsNeedUpdate = !1);
15189
15189
  }
15190
15190
  function s(m, p) {
15191
15191
  m.opacity.value = p.opacity, p.color && m.diffuse.value.copy(p.color), p.emissive && m.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity), p.map && (m.map.value = p.map, t(p.map, m.mapTransform)), p.alphaMap && (m.alphaMap.value = p.alphaMap, t(p.alphaMap, m.alphaMapTransform)), p.bumpMap && (m.bumpMap.value = p.bumpMap, t(p.bumpMap, m.bumpMapTransform), m.bumpScale.value = p.bumpScale, p.side === Ot && (m.bumpScale.value *= -1)), p.normalMap && (m.normalMap.value = p.normalMap, t(p.normalMap, m.normalMapTransform), m.normalScale.value.copy(p.normalScale), p.side === Ot && m.normalScale.value.negate()), p.displacementMap && (m.displacementMap.value = p.displacementMap, t(p.displacementMap, m.displacementMapTransform), m.displacementScale.value = p.displacementScale, m.displacementBias.value = p.displacementBias), p.emissiveMap && (m.emissiveMap.value = p.emissiveMap, t(p.emissiveMap, m.emissiveMapTransform)), p.specularMap && (m.specularMap.value = p.specularMap, t(p.specularMap, m.specularMapTransform)), p.alphaTest > 0 && (m.alphaTest.value = p.alphaTest);
15192
- const S = e.get(p).envMap;
15193
- if (S && (m.envMap.value = S, m.flipEnvMap.value = S.isCubeTexture && S.isRenderTargetTexture === !1 ? -1 : 1, m.reflectivity.value = p.reflectivity, m.ior.value = p.ior, m.refractionRatio.value = p.refractionRatio), p.lightMap) {
15192
+ const y = e.get(p).envMap;
15193
+ if (y && (m.envMap.value = y, m.flipEnvMap.value = y.isCubeTexture && y.isRenderTargetTexture === !1 ? -1 : 1, m.reflectivity.value = p.reflectivity, m.ior.value = p.ior, m.refractionRatio.value = p.refractionRatio), p.lightMap) {
15194
15194
  m.lightMap.value = p.lightMap;
15195
15195
  const v = n._useLegacyLights === !0 ? Math.PI : 1;
15196
15196
  m.lightMapIntensity.value = p.lightMapIntensity * v, t(p.lightMap, m.lightMapTransform);
@@ -15203,8 +15203,8 @@ function Xx(n, e) {
15203
15203
  function a(m, p) {
15204
15204
  m.dashSize.value = p.dashSize, m.totalSize.value = p.dashSize + p.gapSize, m.scale.value = p.scale;
15205
15205
  }
15206
- function l(m, p, S, v) {
15207
- m.diffuse.value.copy(p.color), m.opacity.value = p.opacity, m.size.value = p.size * S, m.scale.value = v * 0.5, p.map && (m.map.value = p.map, t(p.map, m.uvTransform)), p.alphaMap && (m.alphaMap.value = p.alphaMap, t(p.alphaMap, m.alphaMapTransform)), p.alphaTest > 0 && (m.alphaTest.value = p.alphaTest);
15206
+ function l(m, p, y, v) {
15207
+ m.diffuse.value.copy(p.color), m.opacity.value = p.opacity, m.size.value = p.size * y, m.scale.value = v * 0.5, p.map && (m.map.value = p.map, t(p.map, m.uvTransform)), p.alphaMap && (m.alphaMap.value = p.alphaMap, t(p.alphaMap, m.alphaMapTransform)), p.alphaTest > 0 && (m.alphaTest.value = p.alphaTest);
15208
15208
  }
15209
15209
  function c(m, p) {
15210
15210
  m.diffuse.value.copy(p.color), m.opacity.value = p.opacity, m.rotation.value = p.rotation, p.map && (m.map.value = p.map, t(p.map, m.mapTransform)), p.alphaMap && (m.alphaMap.value = p.alphaMap, t(p.alphaMap, m.alphaMapTransform)), p.alphaTest > 0 && (m.alphaTest.value = p.alphaTest);
@@ -15218,15 +15218,15 @@ function Xx(n, e) {
15218
15218
  function f(m, p) {
15219
15219
  m.metalness.value = p.metalness, p.metalnessMap && (m.metalnessMap.value = p.metalnessMap, t(p.metalnessMap, m.metalnessMapTransform)), m.roughness.value = p.roughness, p.roughnessMap && (m.roughnessMap.value = p.roughnessMap, t(p.roughnessMap, m.roughnessMapTransform)), e.get(p).envMap && (m.envMapIntensity.value = p.envMapIntensity);
15220
15220
  }
15221
- function d(m, p, S) {
15222
- m.ior.value = p.ior, p.sheen > 0 && (m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen), m.sheenRoughness.value = p.sheenRoughness, p.sheenColorMap && (m.sheenColorMap.value = p.sheenColorMap, t(p.sheenColorMap, m.sheenColorMapTransform)), p.sheenRoughnessMap && (m.sheenRoughnessMap.value = p.sheenRoughnessMap, t(p.sheenRoughnessMap, m.sheenRoughnessMapTransform))), p.clearcoat > 0 && (m.clearcoat.value = p.clearcoat, m.clearcoatRoughness.value = p.clearcoatRoughness, p.clearcoatMap && (m.clearcoatMap.value = p.clearcoatMap, t(p.clearcoatMap, m.clearcoatMapTransform)), p.clearcoatRoughnessMap && (m.clearcoatRoughnessMap.value = p.clearcoatRoughnessMap, t(p.clearcoatRoughnessMap, m.clearcoatRoughnessMapTransform)), p.clearcoatNormalMap && (m.clearcoatNormalMap.value = p.clearcoatNormalMap, t(p.clearcoatNormalMap, m.clearcoatNormalMapTransform), m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale), p.side === Ot && m.clearcoatNormalScale.value.negate())), p.iridescence > 0 && (m.iridescence.value = p.iridescence, m.iridescenceIOR.value = p.iridescenceIOR, m.iridescenceThicknessMinimum.value = p.iridescenceThicknessRange[0], m.iridescenceThicknessMaximum.value = p.iridescenceThicknessRange[1], p.iridescenceMap && (m.iridescenceMap.value = p.iridescenceMap, t(p.iridescenceMap, m.iridescenceMapTransform)), p.iridescenceThicknessMap && (m.iridescenceThicknessMap.value = p.iridescenceThicknessMap, t(p.iridescenceThicknessMap, m.iridescenceThicknessMapTransform))), p.transmission > 0 && (m.transmission.value = p.transmission, m.transmissionSamplerMap.value = S.texture, m.transmissionSamplerSize.value.set(S.width, S.height), p.transmissionMap && (m.transmissionMap.value = p.transmissionMap, t(p.transmissionMap, m.transmissionMapTransform)), m.thickness.value = p.thickness, p.thicknessMap && (m.thicknessMap.value = p.thicknessMap, t(p.thicknessMap, m.thicknessMapTransform)), m.attenuationDistance.value = p.attenuationDistance, m.attenuationColor.value.copy(p.attenuationColor)), p.anisotropy > 0 && (m.anisotropyVector.value.set(p.anisotropy * Math.cos(p.anisotropyRotation), p.anisotropy * Math.sin(p.anisotropyRotation)), p.anisotropyMap && (m.anisotropyMap.value = p.anisotropyMap, t(p.anisotropyMap, m.anisotropyMapTransform))), m.specularIntensity.value = p.specularIntensity, m.specularColor.value.copy(p.specularColor), p.specularColorMap && (m.specularColorMap.value = p.specularColorMap, t(p.specularColorMap, m.specularColorMapTransform)), p.specularIntensityMap && (m.specularIntensityMap.value = p.specularIntensityMap, t(p.specularIntensityMap, m.specularIntensityMapTransform));
15221
+ function d(m, p, y) {
15222
+ m.ior.value = p.ior, p.sheen > 0 && (m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen), m.sheenRoughness.value = p.sheenRoughness, p.sheenColorMap && (m.sheenColorMap.value = p.sheenColorMap, t(p.sheenColorMap, m.sheenColorMapTransform)), p.sheenRoughnessMap && (m.sheenRoughnessMap.value = p.sheenRoughnessMap, t(p.sheenRoughnessMap, m.sheenRoughnessMapTransform))), p.clearcoat > 0 && (m.clearcoat.value = p.clearcoat, m.clearcoatRoughness.value = p.clearcoatRoughness, p.clearcoatMap && (m.clearcoatMap.value = p.clearcoatMap, t(p.clearcoatMap, m.clearcoatMapTransform)), p.clearcoatRoughnessMap && (m.clearcoatRoughnessMap.value = p.clearcoatRoughnessMap, t(p.clearcoatRoughnessMap, m.clearcoatRoughnessMapTransform)), p.clearcoatNormalMap && (m.clearcoatNormalMap.value = p.clearcoatNormalMap, t(p.clearcoatNormalMap, m.clearcoatNormalMapTransform), m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale), p.side === Ot && m.clearcoatNormalScale.value.negate())), p.iridescence > 0 && (m.iridescence.value = p.iridescence, m.iridescenceIOR.value = p.iridescenceIOR, m.iridescenceThicknessMinimum.value = p.iridescenceThicknessRange[0], m.iridescenceThicknessMaximum.value = p.iridescenceThicknessRange[1], p.iridescenceMap && (m.iridescenceMap.value = p.iridescenceMap, t(p.iridescenceMap, m.iridescenceMapTransform)), p.iridescenceThicknessMap && (m.iridescenceThicknessMap.value = p.iridescenceThicknessMap, t(p.iridescenceThicknessMap, m.iridescenceThicknessMapTransform))), p.transmission > 0 && (m.transmission.value = p.transmission, m.transmissionSamplerMap.value = y.texture, m.transmissionSamplerSize.value.set(y.width, y.height), p.transmissionMap && (m.transmissionMap.value = p.transmissionMap, t(p.transmissionMap, m.transmissionMapTransform)), m.thickness.value = p.thickness, p.thicknessMap && (m.thicknessMap.value = p.thicknessMap, t(p.thicknessMap, m.thicknessMapTransform)), m.attenuationDistance.value = p.attenuationDistance, m.attenuationColor.value.copy(p.attenuationColor)), p.anisotropy > 0 && (m.anisotropyVector.value.set(p.anisotropy * Math.cos(p.anisotropyRotation), p.anisotropy * Math.sin(p.anisotropyRotation)), p.anisotropyMap && (m.anisotropyMap.value = p.anisotropyMap, t(p.anisotropyMap, m.anisotropyMapTransform))), m.specularIntensity.value = p.specularIntensity, m.specularColor.value.copy(p.specularColor), p.specularColorMap && (m.specularColorMap.value = p.specularColorMap, t(p.specularColorMap, m.specularColorMapTransform)), p.specularIntensityMap && (m.specularIntensityMap.value = p.specularIntensityMap, t(p.specularIntensityMap, m.specularIntensityMapTransform));
15223
15223
  }
15224
15224
  function g(m, p) {
15225
15225
  p.matcap && (m.matcap.value = p.matcap);
15226
15226
  }
15227
15227
  function _(m, p) {
15228
- const S = e.get(p).light;
15229
- m.referencePosition.value.setFromMatrixPosition(S.matrixWorld), m.nearDistance.value = S.shadow.camera.near, m.farDistance.value = S.shadow.camera.far;
15228
+ const y = e.get(p).light;
15229
+ m.referencePosition.value.setFromMatrixPosition(y.matrixWorld), m.nearDistance.value = y.shadow.camera.near, m.farDistance.value = y.shadow.camera.far;
15230
15230
  }
15231
15231
  return {
15232
15232
  refreshFogUniforms: i,
@@ -15236,32 +15236,32 @@ function Xx(n, e) {
15236
15236
  function $x(n, e, t, i) {
15237
15237
  let r = {}, s = {}, o = [];
15238
15238
  const a = t.isWebGL2 ? n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS) : 0;
15239
- function l(S, v) {
15239
+ function l(y, v) {
15240
15240
  const M = v.program;
15241
- i.uniformBlockBinding(S, M);
15241
+ i.uniformBlockBinding(y, M);
15242
15242
  }
15243
- function c(S, v) {
15244
- let M = r[S.id];
15245
- M === void 0 && (g(S), M = u(S), r[S.id] = M, S.addEventListener("dispose", m));
15243
+ function c(y, v) {
15244
+ let M = r[y.id];
15245
+ M === void 0 && (g(y), M = u(y), r[y.id] = M, y.addEventListener("dispose", m));
15246
15246
  const b = v.program;
15247
- i.updateUBOMapping(S, b);
15247
+ i.updateUBOMapping(y, b);
15248
15248
  const R = e.render.frame;
15249
- s[S.id] !== R && (f(S), s[S.id] = R);
15249
+ s[y.id] !== R && (f(y), s[y.id] = R);
15250
15250
  }
15251
- function u(S) {
15251
+ function u(y) {
15252
15252
  const v = h();
15253
- S.__bindingPointIndex = v;
15254
- const M = n.createBuffer(), b = S.__size, R = S.usage;
15253
+ y.__bindingPointIndex = v;
15254
+ const M = n.createBuffer(), b = y.__size, R = y.usage;
15255
15255
  return n.bindBuffer(n.UNIFORM_BUFFER, M), n.bufferData(n.UNIFORM_BUFFER, b, R), n.bindBuffer(n.UNIFORM_BUFFER, null), n.bindBufferBase(n.UNIFORM_BUFFER, v, M), M;
15256
15256
  }
15257
15257
  function h() {
15258
- for (let S = 0; S < a; S++)
15259
- if (o.indexOf(S) === -1)
15260
- return o.push(S), S;
15258
+ for (let y = 0; y < a; y++)
15259
+ if (o.indexOf(y) === -1)
15260
+ return o.push(y), y;
15261
15261
  return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."), 0;
15262
15262
  }
15263
- function f(S) {
15264
- const v = r[S.id], M = S.uniforms, b = S.__cache;
15263
+ function f(y) {
15264
+ const v = r[y.id], M = y.uniforms, b = y.__cache;
15265
15265
  n.bindBuffer(n.UNIFORM_BUFFER, v);
15266
15266
  for (let R = 0, w = M.length; R < w; R++) {
15267
15267
  const N = M[R];
@@ -15277,8 +15277,8 @@ function $x(n, e, t, i) {
15277
15277
  }
15278
15278
  n.bindBuffer(n.UNIFORM_BUFFER, null);
15279
15279
  }
15280
- function d(S, v, M) {
15281
- const b = S.value;
15280
+ function d(y, v, M) {
15281
+ const b = y.value;
15282
15282
  if (M[v] === void 0) {
15283
15283
  if (typeof b == "number")
15284
15284
  M[v] = b;
@@ -15302,8 +15302,8 @@ function $x(n, e, t, i) {
15302
15302
  }
15303
15303
  return !1;
15304
15304
  }
15305
- function g(S) {
15306
- const v = S.uniforms;
15305
+ function g(y) {
15306
+ const v = y.uniforms;
15307
15307
  let M = 0;
15308
15308
  const b = 16;
15309
15309
  let R = 0;
@@ -15325,26 +15325,26 @@ function $x(n, e, t, i) {
15325
15325
  }
15326
15326
  M += E.storage;
15327
15327
  }
15328
- return R = M % b, R > 0 && (M += b - R), S.__size = M, S.__cache = {}, this;
15328
+ return R = M % b, R > 0 && (M += b - R), y.__size = M, y.__cache = {}, this;
15329
15329
  }
15330
- function _(S) {
15330
+ function _(y) {
15331
15331
  const v = {
15332
15332
  boundary: 0,
15333
15333
  // bytes
15334
15334
  storage: 0
15335
15335
  // bytes
15336
15336
  };
15337
- return typeof S == "number" ? (v.boundary = 4, v.storage = 4) : S.isVector2 ? (v.boundary = 8, v.storage = 8) : S.isVector3 || S.isColor ? (v.boundary = 16, v.storage = 12) : S.isVector4 ? (v.boundary = 16, v.storage = 16) : S.isMatrix3 ? (v.boundary = 48, v.storage = 48) : S.isMatrix4 ? (v.boundary = 64, v.storage = 64) : S.isTexture ? console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.") : console.warn("THREE.WebGLRenderer: Unsupported uniform value type.", S), v;
15337
+ return typeof y == "number" ? (v.boundary = 4, v.storage = 4) : y.isVector2 ? (v.boundary = 8, v.storage = 8) : y.isVector3 || y.isColor ? (v.boundary = 16, v.storage = 12) : y.isVector4 ? (v.boundary = 16, v.storage = 16) : y.isMatrix3 ? (v.boundary = 48, v.storage = 48) : y.isMatrix4 ? (v.boundary = 64, v.storage = 64) : y.isTexture ? console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.") : console.warn("THREE.WebGLRenderer: Unsupported uniform value type.", y), v;
15338
15338
  }
15339
- function m(S) {
15340
- const v = S.target;
15339
+ function m(y) {
15340
+ const v = y.target;
15341
15341
  v.removeEventListener("dispose", m);
15342
15342
  const M = o.indexOf(v.__bindingPointIndex);
15343
15343
  o.splice(M, 1), n.deleteBuffer(r[v.id]), delete r[v.id], delete s[v.id];
15344
15344
  }
15345
15345
  function p() {
15346
- for (const S in r)
15347
- n.deleteBuffer(r[S]);
15346
+ for (const y in r)
15347
+ n.deleteBuffer(r[y]);
15348
15348
  o = [], r = {}, s = {};
15349
15349
  }
15350
15350
  return {
@@ -15353,7 +15353,7 @@ function $x(n, e, t, i) {
15353
15353
  dispose: p
15354
15354
  };
15355
15355
  }
15356
- class Ph {
15356
+ class Lh {
15357
15357
  constructor(e = {}) {
15358
15358
  const {
15359
15359
  canvas: t = zm(),
@@ -15372,7 +15372,7 @@ class Ph {
15372
15372
  i !== null ? f = i.getContextAttributes().alpha : f = o;
15373
15373
  const d = new Uint32Array(4), g = new Int32Array(4);
15374
15374
  let _ = null, m = null;
15375
- const p = [], S = [];
15375
+ const p = [], y = [];
15376
15376
  this.domElement = t, this.debug = {
15377
15377
  /**
15378
15378
  * Enables error checking and reporting when shader programs are being compiled
@@ -15399,7 +15399,7 @@ class Ph {
15399
15399
  function Ce() {
15400
15400
  return w === null ? H : 1;
15401
15401
  }
15402
- let P = i;
15402
+ let L = i;
15403
15403
  function he(T, k) {
15404
15404
  for (let j = 0; j < T.length; j++) {
15405
15405
  const G = T[j], Y = t.getContext(G, k);
@@ -15419,27 +15419,27 @@ class Ph {
15419
15419
  powerPreference: u,
15420
15420
  failIfMajorPerformanceCaveat: h
15421
15421
  };
15422
- if ("setAttribute" in t && t.setAttribute("data-engine", `three.js r${Aa}`), t.addEventListener("webglcontextlost", _e, !1), t.addEventListener("webglcontextrestored", $, !1), t.addEventListener("webglcontextcreationerror", re, !1), P === null) {
15422
+ if ("setAttribute" in t && t.setAttribute("data-engine", `three.js r${Aa}`), t.addEventListener("webglcontextlost", _e, !1), t.addEventListener("webglcontextrestored", $, !1), t.addEventListener("webglcontextcreationerror", re, !1), L === null) {
15423
15423
  const k = ["webgl2", "webgl", "experimental-webgl"];
15424
- if (v.isWebGL1Renderer === !0 && k.shift(), P = he(k, T), P === null)
15424
+ if (v.isWebGL1Renderer === !0 && k.shift(), L = he(k, T), L === null)
15425
15425
  throw he(k) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
15426
15426
  }
15427
- typeof WebGLRenderingContext != "undefined" && P instanceof WebGLRenderingContext && console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."), P.getShaderPrecisionFormat === void 0 && (P.getShaderPrecisionFormat = function() {
15427
+ typeof WebGLRenderingContext != "undefined" && L instanceof WebGLRenderingContext && console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."), L.getShaderPrecisionFormat === void 0 && (L.getShaderPrecisionFormat = function() {
15428
15428
  return { rangeMin: 1, rangeMax: 1, precision: 1 };
15429
15429
  });
15430
15430
  } catch (T) {
15431
15431
  throw console.error("THREE.WebGLRenderer: " + T.message), T;
15432
15432
  }
15433
- let J, ae, ne, be, ye, Se, Pe, ze, tt, A, y, W, se, ie, le, Ee, ce, X, L, te, xe, pe, ve, Ne;
15433
+ let J, ae, ne, be, ye, Se, Le, ze, tt, A, S, W, se, ie, le, Ee, ce, X, P, te, xe, pe, ve, Ne;
15434
15434
  function We() {
15435
- J = new n0(P), ae = new Yv(P, J, e), J.init(ae), pe = new Hx(P, J, ae), ne = new Fx(P, J, ae), be = new s0(P), ye = new Ex(), Se = new Bx(P, J, ne, ye, ae, pe, be), Pe = new Zv(v), ze = new t0(v), tt = new pg(P, ae), ve = new qv(P, J, tt, ae), A = new i0(P, tt, be, ve), y = new c0(P, A, tt, be), L = new l0(P, ae, Se), Ee = new Kv(ye), W = new Mx(v, Pe, ze, J, ae, ve, Ee), se = new Xx(v, ye), ie = new Tx(), le = new Lx(J, ae), X = new $v(v, Pe, ze, ne, y, f, l), ce = new Ox(v, y, ae), Ne = new $x(P, be, ae, ne), te = new jv(P, J, be, ae), xe = new r0(P, J, be, ae), be.programs = W.programs, v.capabilities = ae, v.extensions = J, v.properties = ye, v.renderLists = ie, v.shadowMap = ce, v.state = ne, v.info = be;
15435
+ J = new n0(L), ae = new Yv(L, J, e), J.init(ae), pe = new Hx(L, J, ae), ne = new Fx(L, J, ae), be = new s0(L), ye = new Ex(), Se = new Bx(L, J, ne, ye, ae, pe, be), Le = new Zv(v), ze = new t0(v), tt = new pg(L, ae), ve = new qv(L, J, tt, ae), A = new i0(L, tt, be, ve), S = new c0(L, A, tt, be), P = new l0(L, ae, Se), Ee = new Kv(ye), W = new Mx(v, Le, ze, J, ae, ve, Ee), se = new Xx(v, ye), ie = new Tx(), le = new Px(J, ae), X = new $v(v, Le, ze, ne, S, f, l), ce = new Ox(v, S, ae), Ne = new $x(L, be, ae, ne), te = new jv(L, J, be, ae), xe = new r0(L, J, be, ae), be.programs = W.programs, v.capabilities = ae, v.extensions = J, v.properties = ye, v.renderLists = ie, v.shadowMap = ce, v.state = ne, v.info = be;
15436
15436
  }
15437
15437
  We();
15438
- const I = new Wx(v, P);
15438
+ const I = new Wx(v, L);
15439
15439
  this.xr = I, this.getContext = function() {
15440
- return P;
15440
+ return L;
15441
15441
  }, this.getContextAttributes = function() {
15442
- return P.getContextAttributes();
15442
+ return L.getContextAttributes();
15443
15443
  }, this.forceContextLoss = function() {
15444
15444
  const T = J.get("WEBGL_lose_context");
15445
15445
  T && T.loseContext();
@@ -15497,12 +15497,12 @@ class Ph {
15497
15497
  Y = Me === hh || Me === uh || Me === ch;
15498
15498
  }
15499
15499
  if (Y) {
15500
- const Me = w.texture.type, Re = Me === $n || Me === kn || Me === Ra || Me === oi || Me === ah || Me === lh, Ie = X.getClearColor(), Ue = X.getClearAlpha(), ke = Ie.r, Le = Ie.g, Oe = Ie.b;
15501
- Re ? (d[0] = ke, d[1] = Le, d[2] = Oe, d[3] = Ue, P.clearBufferuiv(P.COLOR, 0, d)) : (g[0] = ke, g[1] = Le, g[2] = Oe, g[3] = Ue, P.clearBufferiv(P.COLOR, 0, g));
15500
+ const Me = w.texture.type, Re = Me === $n || Me === kn || Me === Ra || Me === oi || Me === ah || Me === lh, Ie = X.getClearColor(), Ue = X.getClearAlpha(), ke = Ie.r, Pe = Ie.g, Oe = Ie.b;
15501
+ Re ? (d[0] = ke, d[1] = Pe, d[2] = Oe, d[3] = Ue, L.clearBufferuiv(L.COLOR, 0, d)) : (g[0] = ke, g[1] = Pe, g[2] = Oe, g[3] = Ue, L.clearBufferiv(L.COLOR, 0, g));
15502
15502
  } else
15503
- G |= P.COLOR_BUFFER_BIT;
15503
+ G |= L.COLOR_BUFFER_BIT;
15504
15504
  }
15505
- k && (G |= P.DEPTH_BUFFER_BIT), j && (G |= P.STENCIL_BUFFER_BIT), P.clear(G);
15505
+ k && (G |= L.DEPTH_BUFFER_BIT), j && (G |= L.STENCIL_BUFFER_BIT), L.clear(G);
15506
15506
  }, this.clearColor = function() {
15507
15507
  this.clear(!0, !1, !1);
15508
15508
  }, this.clearDepth = function() {
@@ -15510,7 +15510,7 @@ class Ph {
15510
15510
  }, this.clearStencil = function() {
15511
15511
  this.clear(!1, !1, !0);
15512
15512
  }, this.dispose = function() {
15513
- t.removeEventListener("webglcontextlost", _e, !1), t.removeEventListener("webglcontextrestored", $, !1), t.removeEventListener("webglcontextcreationerror", re, !1), ie.dispose(), le.dispose(), ye.dispose(), Pe.dispose(), ze.dispose(), y.dispose(), ve.dispose(), Ne.dispose(), W.dispose(), I.dispose(), I.removeEventListener("sessionstart", et), I.removeEventListener("sessionend", cn), Ae && (Ae.dispose(), Ae = null), Ct.stop();
15513
+ t.removeEventListener("webglcontextlost", _e, !1), t.removeEventListener("webglcontextrestored", $, !1), t.removeEventListener("webglcontextcreationerror", re, !1), ie.dispose(), le.dispose(), ye.dispose(), Le.dispose(), ze.dispose(), S.dispose(), ve.dispose(), Ne.dispose(), W.dispose(), I.dispose(), I.removeEventListener("sessionstart", et), I.removeEventListener("sessionend", cn), Ae && (Ae.dispose(), Ae = null), Ct.stop();
15514
15514
  };
15515
15515
  function _e(T) {
15516
15516
  T.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), M = !0;
@@ -15546,8 +15546,8 @@ class Ph {
15546
15546
  return;
15547
15547
  ke = 2;
15548
15548
  }
15549
- const Le = j.drawRange, Oe = j.attributes.position;
15550
- let ot = Le.start * ke, ct = (Le.start + Le.count) * ke;
15549
+ const Pe = j.drawRange, Oe = j.attributes.position;
15550
+ let ot = Pe.start * ke, ct = (Pe.start + Pe.count) * ke;
15551
15551
  Me !== null && (ot = Math.max(ot, Me.start * ke), ct = Math.min(ct, (Me.start + Me.count) * ke)), Ue !== null ? (ot = Math.max(ot, 0), ct = Math.min(ct, Ue.count)) : Oe != null && (ot = Math.max(ot, 0), ct = Math.min(ct, Oe.count));
15552
15552
  const Wt = ct - ot;
15553
15553
  if (Wt < 0 || Wt === 1 / 0)
@@ -15555,12 +15555,12 @@ class Ph {
15555
15555
  ve.setup(Y, G, Ie, j, Ue);
15556
15556
  let yn, ft = te;
15557
15557
  if (Ue !== null && (yn = tt.get(Ue), ft = xe, ft.setIndex(yn)), Y.isMesh)
15558
- G.wireframe === !0 ? (ne.setLineWidth(G.wireframeLinewidth * Ce()), ft.setMode(P.LINES)) : ft.setMode(P.TRIANGLES);
15558
+ G.wireframe === !0 ? (ne.setLineWidth(G.wireframeLinewidth * Ce()), ft.setMode(L.LINES)) : ft.setMode(L.TRIANGLES);
15559
15559
  else if (Y.isLine) {
15560
15560
  let Ge = G.linewidth;
15561
- Ge === void 0 && (Ge = 1), ne.setLineWidth(Ge * Ce()), Y.isLineSegments ? ft.setMode(P.LINES) : Y.isLineLoop ? ft.setMode(P.LINE_LOOP) : ft.setMode(P.LINE_STRIP);
15561
+ Ge === void 0 && (Ge = 1), ne.setLineWidth(Ge * Ce()), Y.isLineSegments ? ft.setMode(L.LINES) : Y.isLineLoop ? ft.setMode(L.LINE_LOOP) : ft.setMode(L.LINE_STRIP);
15562
15562
  } else
15563
- Y.isPoints ? ft.setMode(P.POINTS) : Y.isSprite && ft.setMode(P.TRIANGLES);
15563
+ Y.isPoints ? ft.setMode(L.POINTS) : Y.isSprite && ft.setMode(L.TRIANGLES);
15564
15564
  if (Y.isInstancedMesh)
15565
15565
  ft.renderInstances(ot, Wt, Y.count);
15566
15566
  else if (j.isInstancedBufferGeometry) {
@@ -15572,7 +15572,7 @@ class Ph {
15572
15572
  function j(G, Y, Me) {
15573
15573
  G.transparent === !0 && G.side === Cn && G.forceSinglePass === !1 ? (G.side = Ot, G.needsUpdate = !0, Fr(G, Y, Me), G.side = jn, G.needsUpdate = !0, Fr(G, Y, Me), G.side = Cn) : Fr(G, Y, Me);
15574
15574
  }
15575
- m = le.get(T), m.init(), S.push(m), T.traverseVisible(function(G) {
15575
+ m = le.get(T), m.init(), y.push(m), T.traverseVisible(function(G) {
15576
15576
  G.isLight && G.layers.test(k.layers) && (m.pushLight(G), G.castShadow && m.pushShadow(G));
15577
15577
  }), m.setupLights(v._useLegacyLights), T.traverse(function(G) {
15578
15578
  const Y = G.material;
@@ -15584,7 +15584,7 @@ class Ph {
15584
15584
  }
15585
15585
  else
15586
15586
  j(Y, T, G);
15587
- }), S.pop(), m = null;
15587
+ }), y.pop(), m = null;
15588
15588
  };
15589
15589
  let Je = null;
15590
15590
  function Ft(T) {
@@ -15606,7 +15606,7 @@ class Ph {
15606
15606
  }
15607
15607
  if (M === !0)
15608
15608
  return;
15609
- T.matrixWorldAutoUpdate === !0 && T.updateMatrixWorld(), k.parent === null && k.matrixWorldAutoUpdate === !0 && k.updateMatrixWorld(), I.enabled === !0 && I.isPresenting === !0 && (I.cameraAutoUpdate === !0 && I.updateCamera(k), k = I.getCamera()), T.isScene === !0 && T.onBeforeRender(v, T, k, w), m = le.get(T, S.length), m.init(), S.push(m), we.multiplyMatrices(k.projectionMatrix, k.matrixWorldInverse), oe.setFromProjectionMatrix(we), ge = this.localClippingEnabled, me = Ee.init(this.clippingPlanes, ge), _ = ie.get(T, p.length), _.init(), p.push(_), Ja(T, k, 0, v.sortObjects), _.finish(), v.sortObjects === !0 && _.sort(V, K), this.info.render.frame++, me === !0 && Ee.beginShadows();
15609
+ T.matrixWorldAutoUpdate === !0 && T.updateMatrixWorld(), k.parent === null && k.matrixWorldAutoUpdate === !0 && k.updateMatrixWorld(), I.enabled === !0 && I.isPresenting === !0 && (I.cameraAutoUpdate === !0 && I.updateCamera(k), k = I.getCamera()), T.isScene === !0 && T.onBeforeRender(v, T, k, w), m = le.get(T, y.length), m.init(), y.push(m), we.multiplyMatrices(k.projectionMatrix, k.matrixWorldInverse), oe.setFromProjectionMatrix(we), ge = this.localClippingEnabled, me = Ee.init(this.clippingPlanes, ge), _ = ie.get(T, p.length), _.init(), p.push(_), Ja(T, k, 0, v.sortObjects), _.finish(), v.sortObjects === !0 && _.sort(V, K), this.info.render.frame++, me === !0 && Ee.beginShadows();
15610
15610
  const j = m.state.shadowsArray;
15611
15611
  if (ce.render(j, T, k), me === !0 && Ee.endShadows(), this.info.autoReset === !0 && this.info.reset(), X.render(_, T), m.setupLights(v._useLegacyLights), k.isArrayCamera) {
15612
15612
  const G = k.cameras;
@@ -15616,7 +15616,7 @@ class Ph {
15616
15616
  }
15617
15617
  } else
15618
15618
  Qa(_, T, k);
15619
- w !== null && (Se.updateMultisampleRenderTarget(w), Se.updateRenderTargetMipmap(w)), T.isScene === !0 && T.onAfterRender(v, T, k), ve.resetDefaultState(), N = -1, x = null, S.pop(), S.length > 0 ? m = S[S.length - 1] : m = null, p.pop(), p.length > 0 ? _ = p[p.length - 1] : _ = null;
15619
+ w !== null && (Se.updateMultisampleRenderTarget(w), Se.updateRenderTargetMipmap(w)), T.isScene === !0 && T.onAfterRender(v, T, k), ve.resetDefaultState(), N = -1, x = null, y.pop(), y.length > 0 ? m = y[y.length - 1] : m = null, p.pop(), p.length > 0 ? _ = p[p.length - 1] : _ = null;
15620
15620
  };
15621
15621
  function Ja(T, k, j, G) {
15622
15622
  if (T.visible === !1)
@@ -15631,14 +15631,14 @@ class Ph {
15631
15631
  else if (T.isSprite) {
15632
15632
  if (!T.frustumCulled || oe.intersectsSprite(T)) {
15633
15633
  G && Ve.setFromMatrixPosition(T.matrixWorld).applyMatrix4(we);
15634
- const Re = y.update(T), Ie = T.material;
15634
+ const Re = S.update(T), Ie = T.material;
15635
15635
  Ie.visible && _.push(T, Re, Ie, j, Ve.z, null);
15636
15636
  }
15637
15637
  } else if ((T.isMesh || T.isLine || T.isPoints) && (!T.frustumCulled || oe.intersectsObject(T))) {
15638
- const Re = y.update(T), Ie = T.material;
15638
+ const Re = S.update(T), Ie = T.material;
15639
15639
  if (G && (T.boundingSphere !== void 0 ? (T.boundingSphere === null && T.computeBoundingSphere(), Ve.copy(T.boundingSphere.center)) : (Re.boundingSphere === null && Re.computeBoundingSphere(), Ve.copy(Re.boundingSphere.center)), Ve.applyMatrix4(T.matrixWorld).applyMatrix4(we)), Array.isArray(Ie)) {
15640
15640
  const Ue = Re.groups;
15641
- for (let ke = 0, Le = Ue.length; ke < Le; ke++) {
15641
+ for (let ke = 0, Pe = Ue.length; ke < Pe; ke++) {
15642
15642
  const Oe = Ue[ke], ot = Ie[Oe.materialIndex];
15643
15643
  ot && ot.visible && _.push(T, Re, ot, j, Ve.z, Oe);
15644
15644
  }
@@ -15668,7 +15668,7 @@ class Ph {
15668
15668
  v.toneMapping = Xn, Or(T, j, G), Se.updateMultisampleRenderTarget(Ae), Se.updateRenderTargetMipmap(Ae);
15669
15669
  let Ie = !1;
15670
15670
  for (let Ue = 0, ke = k.length; Ue < ke; Ue++) {
15671
- const Le = k[Ue], Oe = Le.object, ot = Le.geometry, ct = Le.material, Wt = Le.group;
15671
+ const Pe = k[Ue], Oe = Pe.object, ot = Pe.geometry, ct = Pe.material, Wt = Pe.group;
15672
15672
  if (ct.side === Cn && Oe.layers.test(G.layers)) {
15673
15673
  const yn = ct.side;
15674
15674
  ct.side = Ot, ct.needsUpdate = !0, el(Oe, j, G, ot, ct, Wt), ct.side = yn, ct.needsUpdate = !0, Ie = !0;
@@ -15679,8 +15679,8 @@ class Ph {
15679
15679
  function Or(T, k, j) {
15680
15680
  const G = k.isScene === !0 ? k.overrideMaterial : null;
15681
15681
  for (let Y = 0, Me = T.length; Y < Me; Y++) {
15682
- const Re = T[Y], Ie = Re.object, Ue = Re.geometry, ke = G === null ? Re.material : G, Le = Re.group;
15683
- Ie.layers.test(j.layers) && el(Ie, k, j, Ue, ke, Le);
15682
+ const Re = T[Y], Ie = Re.object, Ue = Re.geometry, ke = G === null ? Re.material : G, Pe = Re.group;
15683
+ Ie.layers.test(j.layers) && el(Ie, k, j, Ue, ke, Pe);
15684
15684
  }
15685
15685
  }
15686
15686
  function el(T, k, j, G, Y, Me) {
@@ -15690,17 +15690,17 @@ class Ph {
15690
15690
  k.isScene !== !0 && (k = Ze);
15691
15691
  const G = ye.get(T), Y = m.state.lights, Me = m.state.shadowsArray, Re = Y.state.version, Ie = W.getParameters(T, Y.state, Me, k, j), Ue = W.getProgramCacheKey(Ie);
15692
15692
  let ke = G.programs;
15693
- G.environment = T.isMeshStandardMaterial ? k.environment : null, G.fog = k.fog, G.envMap = (T.isMeshStandardMaterial ? ze : Pe).get(T.envMap || G.environment), ke === void 0 && (T.addEventListener("dispose", fe), ke = /* @__PURE__ */ new Map(), G.programs = ke);
15694
- let Le = ke.get(Ue);
15695
- if (Le !== void 0) {
15696
- if (G.currentProgram === Le && G.lightsStateVersion === Re)
15697
- return tl(T, Ie), Le;
15693
+ G.environment = T.isMeshStandardMaterial ? k.environment : null, G.fog = k.fog, G.envMap = (T.isMeshStandardMaterial ? ze : Le).get(T.envMap || G.environment), ke === void 0 && (T.addEventListener("dispose", fe), ke = /* @__PURE__ */ new Map(), G.programs = ke);
15694
+ let Pe = ke.get(Ue);
15695
+ if (Pe !== void 0) {
15696
+ if (G.currentProgram === Pe && G.lightsStateVersion === Re)
15697
+ return tl(T, Ie), Pe;
15698
15698
  } else
15699
- Ie.uniforms = W.getUniforms(T), T.onBuild(j, Ie, v), T.onBeforeCompile(Ie, v), Le = W.acquireProgram(Ie, Ue), ke.set(Ue, Le), G.uniforms = Ie.uniforms;
15699
+ Ie.uniforms = W.getUniforms(T), T.onBuild(j, Ie, v), T.onBeforeCompile(Ie, v), Pe = W.acquireProgram(Ie, Ue), ke.set(Ue, Pe), G.uniforms = Ie.uniforms;
15700
15700
  const Oe = G.uniforms;
15701
15701
  (!T.isShaderMaterial && !T.isRawShaderMaterial || T.clipping === !0) && (Oe.clippingPlanes = Ee.uniform), tl(T, Ie), G.needsLights = xf(T), G.lightsStateVersion = Re, G.needsLights && (Oe.ambientLightColor.value = Y.state.ambient, Oe.lightProbe.value = Y.state.probe, Oe.directionalLights.value = Y.state.directional, Oe.directionalLightShadows.value = Y.state.directionalShadow, Oe.spotLights.value = Y.state.spot, Oe.spotLightShadows.value = Y.state.spotShadow, Oe.rectAreaLights.value = Y.state.rectArea, Oe.ltc_1.value = Y.state.rectAreaLTC1, Oe.ltc_2.value = Y.state.rectAreaLTC2, Oe.pointLights.value = Y.state.point, Oe.pointLightShadows.value = Y.state.pointShadow, Oe.hemisphereLights.value = Y.state.hemi, Oe.directionalShadowMap.value = Y.state.directionalShadowMap, Oe.directionalShadowMatrix.value = Y.state.directionalShadowMatrix, Oe.spotShadowMap.value = Y.state.spotShadowMap, Oe.spotLightMatrix.value = Y.state.spotLightMatrix, Oe.spotLightMap.value = Y.state.spotLightMap, Oe.pointShadowMap.value = Y.state.pointShadowMap, Oe.pointShadowMatrix.value = Y.state.pointShadowMatrix);
15702
- const ot = Le.getUniforms(), ct = Ss.seqWithValue(ot.seq, Oe);
15703
- return G.currentProgram = Le, G.uniformsList = ct, Le;
15702
+ const ot = Pe.getUniforms(), ct = Ss.seqWithValue(ot.seq, Oe);
15703
+ return G.currentProgram = Pe, G.uniformsList = ct, Pe;
15704
15704
  }
15705
15705
  function tl(T, k) {
15706
15706
  const j = ye.get(T);
@@ -15708,7 +15708,7 @@ class Ph {
15708
15708
  }
15709
15709
  function _f(T, k, j, G, Y) {
15710
15710
  k.isScene !== !0 && (k = Ze), Se.resetTextureUnits();
15711
- const Me = k.fog, Re = G.isMeshStandardMaterial ? k.environment : null, Ie = w === null ? v.outputColorSpace : w.isXRRenderTarget === !0 ? w.texture.colorSpace : gn, Ue = (G.isMeshStandardMaterial ? ze : Pe).get(G.envMap || Re), ke = G.vertexColors === !0 && !!j.attributes.color && j.attributes.color.itemSize === 4, Le = !!j.attributes.tangent && (!!G.normalMap || G.anisotropy > 0), Oe = !!j.morphAttributes.position, ot = !!j.morphAttributes.normal, ct = !!j.morphAttributes.color;
15711
+ const Me = k.fog, Re = G.isMeshStandardMaterial ? k.environment : null, Ie = w === null ? v.outputColorSpace : w.isXRRenderTarget === !0 ? w.texture.colorSpace : gn, Ue = (G.isMeshStandardMaterial ? ze : Le).get(G.envMap || Re), ke = G.vertexColors === !0 && !!j.attributes.color && j.attributes.color.itemSize === 4, Pe = !!j.attributes.tangent && (!!G.normalMap || G.anisotropy > 0), Oe = !!j.morphAttributes.position, ot = !!j.morphAttributes.normal, ct = !!j.morphAttributes.color;
15712
15712
  let Wt = Xn;
15713
15713
  G.toneMapped && (w === null || w.isXRRenderTarget === !0) && (Wt = v.toneMapping);
15714
15714
  const yn = j.morphAttributes.position || j.morphAttributes.normal || j.morphAttributes.color, ft = yn !== void 0 ? yn.length : 0, Ge = ye.get(G), Qs = m.state.lights;
@@ -15717,27 +15717,27 @@ class Ph {
15717
15717
  Ee.setState(G, T, Bt);
15718
15718
  }
15719
15719
  let dt = !1;
15720
- G.version === Ge.__version ? (Ge.needsLights && Ge.lightsStateVersion !== Qs.state.version || Ge.outputColorSpace !== Ie || Y.isInstancedMesh && Ge.instancing === !1 || !Y.isInstancedMesh && Ge.instancing === !0 || Y.isSkinnedMesh && Ge.skinning === !1 || !Y.isSkinnedMesh && Ge.skinning === !0 || Y.isInstancedMesh && Ge.instancingColor === !0 && Y.instanceColor === null || Y.isInstancedMesh && Ge.instancingColor === !1 && Y.instanceColor !== null || Ge.envMap !== Ue || G.fog === !0 && Ge.fog !== Me || Ge.numClippingPlanes !== void 0 && (Ge.numClippingPlanes !== Ee.numPlanes || Ge.numIntersection !== Ee.numIntersection) || Ge.vertexAlphas !== ke || Ge.vertexTangents !== Le || Ge.morphTargets !== Oe || Ge.morphNormals !== ot || Ge.morphColors !== ct || Ge.toneMapping !== Wt || ae.isWebGL2 === !0 && Ge.morphTargetsCount !== ft) && (dt = !0) : (dt = !0, Ge.__version = G.version);
15720
+ G.version === Ge.__version ? (Ge.needsLights && Ge.lightsStateVersion !== Qs.state.version || Ge.outputColorSpace !== Ie || Y.isInstancedMesh && Ge.instancing === !1 || !Y.isInstancedMesh && Ge.instancing === !0 || Y.isSkinnedMesh && Ge.skinning === !1 || !Y.isSkinnedMesh && Ge.skinning === !0 || Y.isInstancedMesh && Ge.instancingColor === !0 && Y.instanceColor === null || Y.isInstancedMesh && Ge.instancingColor === !1 && Y.instanceColor !== null || Ge.envMap !== Ue || G.fog === !0 && Ge.fog !== Me || Ge.numClippingPlanes !== void 0 && (Ge.numClippingPlanes !== Ee.numPlanes || Ge.numIntersection !== Ee.numIntersection) || Ge.vertexAlphas !== ke || Ge.vertexTangents !== Pe || Ge.morphTargets !== Oe || Ge.morphNormals !== ot || Ge.morphColors !== ct || Ge.toneMapping !== Wt || ae.isWebGL2 === !0 && Ge.morphTargetsCount !== ft) && (dt = !0) : (dt = !0, Ge.__version = G.version);
15721
15721
  let Zn = Ge.currentProgram;
15722
15722
  dt === !0 && (Zn = Fr(G, k, Y));
15723
15723
  let nl = !1, er = !1, eo = !1;
15724
15724
  const Rt = Zn.getUniforms(), Jn = Ge.uniforms;
15725
15725
  if (ne.useProgram(Zn.program) && (nl = !0, er = !0, eo = !0), G.id !== N && (N = G.id, er = !0), nl || x !== T) {
15726
- Rt.setValue(P, "projectionMatrix", T.projectionMatrix), Rt.setValue(P, "viewMatrix", T.matrixWorldInverse);
15726
+ Rt.setValue(L, "projectionMatrix", T.projectionMatrix), Rt.setValue(L, "viewMatrix", T.matrixWorldInverse);
15727
15727
  const Bt = Rt.map.cameraPosition;
15728
- Bt !== void 0 && Bt.setValue(P, Ve.setFromMatrixPosition(T.matrixWorld)), ae.logarithmicDepthBuffer && Rt.setValue(
15729
- P,
15728
+ Bt !== void 0 && Bt.setValue(L, Ve.setFromMatrixPosition(T.matrixWorld)), ae.logarithmicDepthBuffer && Rt.setValue(
15729
+ L,
15730
15730
  "logDepthBufFC",
15731
15731
  2 / (Math.log(T.far + 1) / Math.LN2)
15732
- ), (G.isMeshPhongMaterial || G.isMeshToonMaterial || G.isMeshLambertMaterial || G.isMeshBasicMaterial || G.isMeshStandardMaterial || G.isShaderMaterial) && Rt.setValue(P, "isOrthographic", T.isOrthographicCamera === !0), x !== T && (x = T, er = !0, eo = !0);
15732
+ ), (G.isMeshPhongMaterial || G.isMeshToonMaterial || G.isMeshLambertMaterial || G.isMeshBasicMaterial || G.isMeshStandardMaterial || G.isShaderMaterial) && Rt.setValue(L, "isOrthographic", T.isOrthographicCamera === !0), x !== T && (x = T, er = !0, eo = !0);
15733
15733
  }
15734
15734
  if (Y.isSkinnedMesh) {
15735
- Rt.setOptional(P, Y, "bindMatrix"), Rt.setOptional(P, Y, "bindMatrixInverse");
15735
+ Rt.setOptional(L, Y, "bindMatrix"), Rt.setOptional(L, Y, "bindMatrixInverse");
15736
15736
  const Bt = Y.skeleton;
15737
- Bt && (ae.floatVertexTextures ? (Bt.boneTexture === null && Bt.computeBoneTexture(), Rt.setValue(P, "boneTexture", Bt.boneTexture, Se), Rt.setValue(P, "boneTextureSize", Bt.boneTextureSize)) : console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."));
15737
+ Bt && (ae.floatVertexTextures ? (Bt.boneTexture === null && Bt.computeBoneTexture(), Rt.setValue(L, "boneTexture", Bt.boneTexture, Se), Rt.setValue(L, "boneTextureSize", Bt.boneTextureSize)) : console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."));
15738
15738
  }
15739
15739
  const to = j.morphAttributes;
15740
- if ((to.position !== void 0 || to.normal !== void 0 || to.color !== void 0 && ae.isWebGL2 === !0) && L.update(Y, j, Zn), (er || Ge.receiveShadow !== Y.receiveShadow) && (Ge.receiveShadow = Y.receiveShadow, Rt.setValue(P, "receiveShadow", Y.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (Jn.envMap.value = Ue, Jn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), er && (Rt.setValue(P, "toneMappingExposure", v.toneMappingExposure), Ge.needsLights && vf(Jn, eo), Me && G.fog === !0 && se.refreshFogUniforms(Jn, Me), se.refreshMaterialUniforms(Jn, G, H, z, Ae), Ss.upload(P, Ge.uniformsList, Jn, Se)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Ss.upload(P, Ge.uniformsList, Jn, Se), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && Rt.setValue(P, "center", Y.center), Rt.setValue(P, "modelViewMatrix", Y.modelViewMatrix), Rt.setValue(P, "normalMatrix", Y.normalMatrix), Rt.setValue(P, "modelMatrix", Y.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
15740
+ if ((to.position !== void 0 || to.normal !== void 0 || to.color !== void 0 && ae.isWebGL2 === !0) && P.update(Y, j, Zn), (er || Ge.receiveShadow !== Y.receiveShadow) && (Ge.receiveShadow = Y.receiveShadow, Rt.setValue(L, "receiveShadow", Y.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (Jn.envMap.value = Ue, Jn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), er && (Rt.setValue(L, "toneMappingExposure", v.toneMappingExposure), Ge.needsLights && vf(Jn, eo), Me && G.fog === !0 && se.refreshFogUniforms(Jn, Me), se.refreshMaterialUniforms(Jn, G, H, z, Ae), Ss.upload(L, Ge.uniformsList, Jn, Se)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Ss.upload(L, Ge.uniformsList, Jn, Se), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && Rt.setValue(L, "center", Y.center), Rt.setValue(L, "modelViewMatrix", Y.modelViewMatrix), Rt.setValue(L, "normalMatrix", Y.normalMatrix), Rt.setValue(L, "modelMatrix", Y.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
15741
15741
  const Bt = G.uniformsGroups;
15742
15742
  for (let no = 0, yf = Bt.length; no < yf; no++)
15743
15743
  if (ae.isWebGL2) {
@@ -15772,19 +15772,19 @@ class Ph {
15772
15772
  let G = !0, Y = null, Me = !1, Re = !1;
15773
15773
  if (T) {
15774
15774
  const Ue = ye.get(T);
15775
- Ue.__useDefaultFramebuffer !== void 0 ? (ne.bindFramebuffer(P.FRAMEBUFFER, null), G = !1) : Ue.__webglFramebuffer === void 0 ? Se.setupRenderTarget(T) : Ue.__hasExternalTextures && Se.rebindTextures(T, ye.get(T.texture).__webglTexture, ye.get(T.depthTexture).__webglTexture);
15775
+ Ue.__useDefaultFramebuffer !== void 0 ? (ne.bindFramebuffer(L.FRAMEBUFFER, null), G = !1) : Ue.__webglFramebuffer === void 0 ? Se.setupRenderTarget(T) : Ue.__hasExternalTextures && Se.rebindTextures(T, ye.get(T.texture).__webglTexture, ye.get(T.depthTexture).__webglTexture);
15776
15776
  const ke = T.texture;
15777
15777
  (ke.isData3DTexture || ke.isDataArrayTexture || ke.isCompressedArrayTexture) && (Re = !0);
15778
- const Le = ye.get(T).__webglFramebuffer;
15779
- T.isWebGLCubeRenderTarget ? (Array.isArray(Le[k]) ? Y = Le[k][j] : Y = Le[k], Me = !0) : ae.isWebGL2 && T.samples > 0 && Se.useMultisampledRTT(T) === !1 ? Y = ye.get(T).__webglMultisampledFramebuffer : Array.isArray(Le) ? Y = Le[j] : Y = Le, E.copy(T.viewport), F.copy(T.scissor), ee = T.scissorTest;
15778
+ const Pe = ye.get(T).__webglFramebuffer;
15779
+ T.isWebGLCubeRenderTarget ? (Array.isArray(Pe[k]) ? Y = Pe[k][j] : Y = Pe[k], Me = !0) : ae.isWebGL2 && T.samples > 0 && Se.useMultisampledRTT(T) === !1 ? Y = ye.get(T).__webglMultisampledFramebuffer : Array.isArray(Pe) ? Y = Pe[j] : Y = Pe, E.copy(T.viewport), F.copy(T.scissor), ee = T.scissorTest;
15780
15780
  } else
15781
15781
  E.copy(Q).multiplyScalar(H).floor(), F.copy(B).multiplyScalar(H).floor(), ee = q;
15782
- if (ne.bindFramebuffer(P.FRAMEBUFFER, Y) && ae.drawBuffers && G && ne.drawBuffers(T, Y), ne.viewport(E), ne.scissor(F), ne.setScissorTest(ee), Me) {
15782
+ if (ne.bindFramebuffer(L.FRAMEBUFFER, Y) && ae.drawBuffers && G && ne.drawBuffers(T, Y), ne.viewport(E), ne.scissor(F), ne.setScissorTest(ee), Me) {
15783
15783
  const Ue = ye.get(T.texture);
15784
- P.framebufferTexture2D(P.FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_CUBE_MAP_POSITIVE_X + k, Ue.__webglTexture, j);
15784
+ L.framebufferTexture2D(L.FRAMEBUFFER, L.COLOR_ATTACHMENT0, L.TEXTURE_CUBE_MAP_POSITIVE_X + k, Ue.__webglTexture, j);
15785
15785
  } else if (Re) {
15786
15786
  const Ue = ye.get(T.texture), ke = k || 0;
15787
- P.framebufferTextureLayer(P.FRAMEBUFFER, P.COLOR_ATTACHMENT0, Ue.__webglTexture, j || 0, ke);
15787
+ L.framebufferTextureLayer(L.FRAMEBUFFER, L.COLOR_ATTACHMENT0, Ue.__webglTexture, j || 0, ke);
15788
15788
  }
15789
15789
  N = -1;
15790
15790
  }, this.readRenderTargetPixels = function(T, k, j, G, Y, Me, Re) {
@@ -15794,50 +15794,50 @@ class Ph {
15794
15794
  }
15795
15795
  let Ie = ye.get(T).__webglFramebuffer;
15796
15796
  if (T.isWebGLCubeRenderTarget && Re !== void 0 && (Ie = Ie[Re]), Ie) {
15797
- ne.bindFramebuffer(P.FRAMEBUFFER, Ie);
15797
+ ne.bindFramebuffer(L.FRAMEBUFFER, Ie);
15798
15798
  try {
15799
- const Ue = T.texture, ke = Ue.format, Le = Ue.type;
15800
- if (ke !== rn && pe.convert(ke) !== P.getParameter(P.IMPLEMENTATION_COLOR_READ_FORMAT)) {
15799
+ const Ue = T.texture, ke = Ue.format, Pe = Ue.type;
15800
+ if (ke !== rn && pe.convert(ke) !== L.getParameter(L.IMPLEMENTATION_COLOR_READ_FORMAT)) {
15801
15801
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
15802
15802
  return;
15803
15803
  }
15804
- const Oe = Le === Sr && (J.has("EXT_color_buffer_half_float") || ae.isWebGL2 && J.has("EXT_color_buffer_float"));
15805
- if (Le !== $n && pe.convert(Le) !== P.getParameter(P.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
15806
- !(Le === Gn && (ae.isWebGL2 || J.has("OES_texture_float") || J.has("WEBGL_color_buffer_float"))) && // Chrome Mac >= 52 and Firefox
15804
+ const Oe = Pe === Sr && (J.has("EXT_color_buffer_half_float") || ae.isWebGL2 && J.has("EXT_color_buffer_float"));
15805
+ if (Pe !== $n && pe.convert(Pe) !== L.getParameter(L.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
15806
+ !(Pe === Gn && (ae.isWebGL2 || J.has("OES_texture_float") || J.has("WEBGL_color_buffer_float"))) && // Chrome Mac >= 52 and Firefox
15807
15807
  !Oe) {
15808
15808
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
15809
15809
  return;
15810
15810
  }
15811
- k >= 0 && k <= T.width - G && j >= 0 && j <= T.height - Y && P.readPixels(k, j, G, Y, pe.convert(ke), pe.convert(Le), Me);
15811
+ k >= 0 && k <= T.width - G && j >= 0 && j <= T.height - Y && L.readPixels(k, j, G, Y, pe.convert(ke), pe.convert(Pe), Me);
15812
15812
  } finally {
15813
15813
  const Ue = w !== null ? ye.get(w).__webglFramebuffer : null;
15814
- ne.bindFramebuffer(P.FRAMEBUFFER, Ue);
15814
+ ne.bindFramebuffer(L.FRAMEBUFFER, Ue);
15815
15815
  }
15816
15816
  }
15817
15817
  }, this.copyFramebufferToTexture = function(T, k, j = 0) {
15818
15818
  const G = Math.pow(2, -j), Y = Math.floor(k.image.width * G), Me = Math.floor(k.image.height * G);
15819
- Se.setTexture2D(k, 0), P.copyTexSubImage2D(P.TEXTURE_2D, j, 0, 0, T.x, T.y, Y, Me), ne.unbindTexture();
15819
+ Se.setTexture2D(k, 0), L.copyTexSubImage2D(L.TEXTURE_2D, j, 0, 0, T.x, T.y, Y, Me), ne.unbindTexture();
15820
15820
  }, this.copyTextureToTexture = function(T, k, j, G = 0) {
15821
15821
  const Y = k.image.width, Me = k.image.height, Re = pe.convert(j.format), Ie = pe.convert(j.type);
15822
- Se.setTexture2D(j, 0), P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL, j.flipY), P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL, j.premultiplyAlpha), P.pixelStorei(P.UNPACK_ALIGNMENT, j.unpackAlignment), k.isDataTexture ? P.texSubImage2D(P.TEXTURE_2D, G, T.x, T.y, Y, Me, Re, Ie, k.image.data) : k.isCompressedTexture ? P.compressedTexSubImage2D(P.TEXTURE_2D, G, T.x, T.y, k.mipmaps[0].width, k.mipmaps[0].height, Re, k.mipmaps[0].data) : P.texSubImage2D(P.TEXTURE_2D, G, T.x, T.y, Re, Ie, k.image), G === 0 && j.generateMipmaps && P.generateMipmap(P.TEXTURE_2D), ne.unbindTexture();
15822
+ Se.setTexture2D(j, 0), L.pixelStorei(L.UNPACK_FLIP_Y_WEBGL, j.flipY), L.pixelStorei(L.UNPACK_PREMULTIPLY_ALPHA_WEBGL, j.premultiplyAlpha), L.pixelStorei(L.UNPACK_ALIGNMENT, j.unpackAlignment), k.isDataTexture ? L.texSubImage2D(L.TEXTURE_2D, G, T.x, T.y, Y, Me, Re, Ie, k.image.data) : k.isCompressedTexture ? L.compressedTexSubImage2D(L.TEXTURE_2D, G, T.x, T.y, k.mipmaps[0].width, k.mipmaps[0].height, Re, k.mipmaps[0].data) : L.texSubImage2D(L.TEXTURE_2D, G, T.x, T.y, Re, Ie, k.image), G === 0 && j.generateMipmaps && L.generateMipmap(L.TEXTURE_2D), ne.unbindTexture();
15823
15823
  }, this.copyTextureToTexture3D = function(T, k, j, G, Y = 0) {
15824
15824
  if (v.isWebGL1Renderer) {
15825
15825
  console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");
15826
15826
  return;
15827
15827
  }
15828
15828
  const Me = T.max.x - T.min.x + 1, Re = T.max.y - T.min.y + 1, Ie = T.max.z - T.min.z + 1, Ue = pe.convert(G.format), ke = pe.convert(G.type);
15829
- let Le;
15829
+ let Pe;
15830
15830
  if (G.isData3DTexture)
15831
- Se.setTexture3D(G, 0), Le = P.TEXTURE_3D;
15831
+ Se.setTexture3D(G, 0), Pe = L.TEXTURE_3D;
15832
15832
  else if (G.isDataArrayTexture)
15833
- Se.setTexture2DArray(G, 0), Le = P.TEXTURE_2D_ARRAY;
15833
+ Se.setTexture2DArray(G, 0), Pe = L.TEXTURE_2D_ARRAY;
15834
15834
  else {
15835
15835
  console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");
15836
15836
  return;
15837
15837
  }
15838
- P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL, G.flipY), P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL, G.premultiplyAlpha), P.pixelStorei(P.UNPACK_ALIGNMENT, G.unpackAlignment);
15839
- const Oe = P.getParameter(P.UNPACK_ROW_LENGTH), ot = P.getParameter(P.UNPACK_IMAGE_HEIGHT), ct = P.getParameter(P.UNPACK_SKIP_PIXELS), Wt = P.getParameter(P.UNPACK_SKIP_ROWS), yn = P.getParameter(P.UNPACK_SKIP_IMAGES), ft = j.isCompressedTexture ? j.mipmaps[0] : j.image;
15840
- P.pixelStorei(P.UNPACK_ROW_LENGTH, ft.width), P.pixelStorei(P.UNPACK_IMAGE_HEIGHT, ft.height), P.pixelStorei(P.UNPACK_SKIP_PIXELS, T.min.x), P.pixelStorei(P.UNPACK_SKIP_ROWS, T.min.y), P.pixelStorei(P.UNPACK_SKIP_IMAGES, T.min.z), j.isDataTexture || j.isData3DTexture ? P.texSubImage3D(Le, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft.data) : j.isCompressedArrayTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), P.compressedTexSubImage3D(Le, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ft.data)) : P.texSubImage3D(Le, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft), P.pixelStorei(P.UNPACK_ROW_LENGTH, Oe), P.pixelStorei(P.UNPACK_IMAGE_HEIGHT, ot), P.pixelStorei(P.UNPACK_SKIP_PIXELS, ct), P.pixelStorei(P.UNPACK_SKIP_ROWS, Wt), P.pixelStorei(P.UNPACK_SKIP_IMAGES, yn), Y === 0 && G.generateMipmaps && P.generateMipmap(Le), ne.unbindTexture();
15838
+ L.pixelStorei(L.UNPACK_FLIP_Y_WEBGL, G.flipY), L.pixelStorei(L.UNPACK_PREMULTIPLY_ALPHA_WEBGL, G.premultiplyAlpha), L.pixelStorei(L.UNPACK_ALIGNMENT, G.unpackAlignment);
15839
+ const Oe = L.getParameter(L.UNPACK_ROW_LENGTH), ot = L.getParameter(L.UNPACK_IMAGE_HEIGHT), ct = L.getParameter(L.UNPACK_SKIP_PIXELS), Wt = L.getParameter(L.UNPACK_SKIP_ROWS), yn = L.getParameter(L.UNPACK_SKIP_IMAGES), ft = j.isCompressedTexture ? j.mipmaps[0] : j.image;
15840
+ L.pixelStorei(L.UNPACK_ROW_LENGTH, ft.width), L.pixelStorei(L.UNPACK_IMAGE_HEIGHT, ft.height), L.pixelStorei(L.UNPACK_SKIP_PIXELS, T.min.x), L.pixelStorei(L.UNPACK_SKIP_ROWS, T.min.y), L.pixelStorei(L.UNPACK_SKIP_IMAGES, T.min.z), j.isDataTexture || j.isData3DTexture ? L.texSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft.data) : j.isCompressedArrayTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), L.compressedTexSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ft.data)) : L.texSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft), L.pixelStorei(L.UNPACK_ROW_LENGTH, Oe), L.pixelStorei(L.UNPACK_IMAGE_HEIGHT, ot), L.pixelStorei(L.UNPACK_SKIP_PIXELS, ct), L.pixelStorei(L.UNPACK_SKIP_ROWS, Wt), L.pixelStorei(L.UNPACK_SKIP_IMAGES, yn), Y === 0 && G.generateMipmaps && L.generateMipmap(Pe), ne.unbindTexture();
15841
15841
  }, this.initTexture = function(T) {
15842
15842
  T.isCubeTexture ? Se.setTextureCube(T, 0) : T.isData3DTexture ? Se.setTexture3D(T, 0) : T.isDataArrayTexture || T.isCompressedArrayTexture ? Se.setTexture2DArray(T, 0) : Se.setTexture2D(T, 0), ne.unbindTexture();
15843
15843
  }, this.resetState = function() {
@@ -15866,7 +15866,7 @@ class Ph {
15866
15866
  console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."), this._useLegacyLights = e;
15867
15867
  }
15868
15868
  }
15869
- class qx extends Ph {
15869
+ class qx extends Lh {
15870
15870
  }
15871
15871
  qx.prototype.isWebGL1Renderer = !0;
15872
15872
  class jx extends at {
@@ -15922,7 +15922,7 @@ class Yx {
15922
15922
  };
15923
15923
  }
15924
15924
  }
15925
- const Pt = /* @__PURE__ */ new D();
15925
+ const Lt = /* @__PURE__ */ new D();
15926
15926
  class Vn {
15927
15927
  constructor(e, t, i, r = !1) {
15928
15928
  this.isInterleavedBufferAttribute = !0, this.name = "", this.data = e, this.itemSize = t, this.offset = i, this.normalized = r;
@@ -15938,17 +15938,17 @@ class Vn {
15938
15938
  }
15939
15939
  applyMatrix4(e) {
15940
15940
  for (let t = 0, i = this.data.count; t < i; t++)
15941
- Pt.fromBufferAttribute(this, t), Pt.applyMatrix4(e), this.setXYZ(t, Pt.x, Pt.y, Pt.z);
15941
+ Lt.fromBufferAttribute(this, t), Lt.applyMatrix4(e), this.setXYZ(t, Lt.x, Lt.y, Lt.z);
15942
15942
  return this;
15943
15943
  }
15944
15944
  applyNormalMatrix(e) {
15945
15945
  for (let t = 0, i = this.count; t < i; t++)
15946
- Pt.fromBufferAttribute(this, t), Pt.applyNormalMatrix(e), this.setXYZ(t, Pt.x, Pt.y, Pt.z);
15946
+ Lt.fromBufferAttribute(this, t), Lt.applyNormalMatrix(e), this.setXYZ(t, Lt.x, Lt.y, Lt.z);
15947
15947
  return this;
15948
15948
  }
15949
15949
  transformDirection(e) {
15950
15950
  for (let t = 0, i = this.count; t < i; t++)
15951
- Pt.fromBufferAttribute(this, t), Pt.transformDirection(e), this.setXYZ(t, Pt.x, Pt.y, Pt.z);
15951
+ Lt.fromBufferAttribute(this, t), Lt.transformDirection(e), this.setXYZ(t, Lt.x, Lt.y, Lt.z);
15952
15952
  return this;
15953
15953
  }
15954
15954
  setX(e, t) {
@@ -16301,7 +16301,7 @@ function ry(n, e) {
16301
16301
  function gr(n, e, t, i, r) {
16302
16302
  return ty(n, e) + ny(n, t) + iy(n, i) + ry(n, r);
16303
16303
  }
16304
- class Lh extends vn {
16304
+ class Ph extends vn {
16305
16305
  constructor(e = new ue(), t = new ue(), i = new ue(), r = new ue()) {
16306
16306
  super(), this.isCubicBezierCurve = !0, this.type = "CubicBezierCurve", this.v0 = e, this.v1 = t, this.v2 = i, this.v3 = r;
16307
16307
  }
@@ -16490,7 +16490,7 @@ var Uh = /* @__PURE__ */ Object.freeze({
16490
16490
  __proto__: null,
16491
16491
  ArcCurve: Kx,
16492
16492
  CatmullRomCurve3: Zx,
16493
- CubicBezierCurve: Lh,
16493
+ CubicBezierCurve: Ph,
16494
16494
  CubicBezierCurve3: sy,
16495
16495
  EllipseCurve: Ba,
16496
16496
  LineCurve: Ha,
@@ -16621,7 +16621,7 @@ class jc extends ly {
16621
16621
  return this.curves.push(s), this.currentPoint.set(i, r), this;
16622
16622
  }
16623
16623
  bezierCurveTo(e, t, i, r, s, o) {
16624
- const a = new Lh(
16624
+ const a = new Ph(
16625
16625
  this.currentPoint.clone(),
16626
16626
  new ue(e, t),
16627
16627
  new ue(i, r),
@@ -16790,9 +16790,9 @@ function hy(n, e, t, i) {
16790
16790
  const r = n.prev, s = n, o = n.next;
16791
16791
  if (st(r, s, o) >= 0)
16792
16792
  return !1;
16793
- const a = r.x, l = s.x, c = o.x, u = r.y, h = s.y, f = o.y, d = a < l ? a < c ? a : c : l < c ? l : c, g = u < h ? u < f ? u : f : h < f ? h : f, _ = a > l ? a > c ? a : c : l > c ? l : c, m = u > h ? u > f ? u : f : h > f ? h : f, p = ca(d, g, e, t, i), S = ca(_, m, e, t, i);
16793
+ const a = r.x, l = s.x, c = o.x, u = r.y, h = s.y, f = o.y, d = a < l ? a < c ? a : c : l < c ? l : c, g = u < h ? u < f ? u : f : h < f ? h : f, _ = a > l ? a > c ? a : c : l > c ? l : c, m = u > h ? u > f ? u : f : h > f ? h : f, p = ca(d, g, e, t, i), y = ca(_, m, e, t, i);
16794
16794
  let v = n.prevZ, M = n.nextZ;
16795
- for (; v && v.z >= p && M && M.z <= S; ) {
16795
+ for (; v && v.z >= p && M && M.z <= y; ) {
16796
16796
  if (v.x >= d && v.x <= _ && v.y >= g && v.y <= m && v !== r && v !== o && Fi(a, u, l, h, c, f, v.x, v.y) && st(v.prev, v, v.next) >= 0 || (v = v.prevZ, M.x >= d && M.x <= _ && M.y >= g && M.y <= m && M !== r && M !== o && Fi(a, u, l, h, c, f, M.x, M.y) && st(M.prev, M, M.next) >= 0))
16797
16797
  return !1;
16798
16798
  M = M.nextZ;
@@ -16802,7 +16802,7 @@ function hy(n, e, t, i) {
16802
16802
  return !1;
16803
16803
  v = v.prevZ;
16804
16804
  }
16805
- for (; M && M.z <= S; ) {
16805
+ for (; M && M.z <= y; ) {
16806
16806
  if (M.x >= d && M.x <= _ && M.y >= g && M.y <= m && M !== r && M !== o && Fi(a, u, l, h, c, f, M.x, M.y) && st(M.prev, M, M.next) >= 0)
16807
16807
  return !1;
16808
16808
  M = M.nextZ;
@@ -17019,7 +17019,7 @@ class ka extends _n {
17019
17019
  function o(a) {
17020
17020
  const l = [], c = t.curveSegments !== void 0 ? t.curveSegments : 12, u = t.steps !== void 0 ? t.steps : 1, h = t.depth !== void 0 ? t.depth : 1;
17021
17021
  let f = t.bevelEnabled !== void 0 ? t.bevelEnabled : !0, d = t.bevelThickness !== void 0 ? t.bevelThickness : 0.2, g = t.bevelSize !== void 0 ? t.bevelSize : d - 0.1, _ = t.bevelOffset !== void 0 ? t.bevelOffset : 0, m = t.bevelSegments !== void 0 ? t.bevelSegments : 3;
17022
- const p = t.extrudePath, S = t.UVGenerator !== void 0 ? t.UVGenerator : wy;
17022
+ const p = t.extrudePath, y = t.UVGenerator !== void 0 ? t.UVGenerator : wy;
17023
17023
  let v, M = !1, b, R, w, N;
17024
17024
  p && (v = p.getSpacedPoints(u), M = !0, f = !1, b = p.computeFrenetFrames(u, !1), R = new D(), w = new D(), N = new D()), f || (m = 0, d = 0, g = 0, _ = 0);
17025
17025
  const x = a.extractPoints(c);
@@ -17027,50 +17027,50 @@ class ka extends _n {
17027
17027
  const F = x.holes;
17028
17028
  if (!_r.isClockWise(E)) {
17029
17029
  E = E.reverse();
17030
- for (let P = 0, he = F.length; P < he; P++) {
17031
- const J = F[P];
17032
- _r.isClockWise(J) && (F[P] = J.reverse());
17030
+ for (let L = 0, he = F.length; L < he; L++) {
17031
+ const J = F[L];
17032
+ _r.isClockWise(J) && (F[L] = J.reverse());
17033
17033
  }
17034
17034
  }
17035
17035
  const O = _r.triangulateShape(E, F), U = E;
17036
- for (let P = 0, he = F.length; P < he; P++) {
17037
- const J = F[P];
17036
+ for (let L = 0, he = F.length; L < he; L++) {
17037
+ const J = F[L];
17038
17038
  E = E.concat(J);
17039
17039
  }
17040
- function C(P, he, J) {
17041
- return he || console.error("THREE.ExtrudeGeometry: vec does not exist"), P.clone().addScaledVector(he, J);
17040
+ function C(L, he, J) {
17041
+ return he || console.error("THREE.ExtrudeGeometry: vec does not exist"), L.clone().addScaledVector(he, J);
17042
17042
  }
17043
17043
  const z = E.length, H = O.length;
17044
- function V(P, he, J) {
17044
+ function V(L, he, J) {
17045
17045
  let ae, ne, be;
17046
- const ye = P.x - he.x, Se = P.y - he.y, Pe = J.x - P.x, ze = J.y - P.y, tt = ye * ye + Se * Se, A = ye * ze - Se * Pe;
17046
+ const ye = L.x - he.x, Se = L.y - he.y, Le = J.x - L.x, ze = J.y - L.y, tt = ye * ye + Se * Se, A = ye * ze - Se * Le;
17047
17047
  if (Math.abs(A) > Number.EPSILON) {
17048
- const y = Math.sqrt(tt), W = Math.sqrt(Pe * Pe + ze * ze), se = he.x - Se / y, ie = he.y + ye / y, le = J.x - ze / W, Ee = J.y + Pe / W, ce = ((le - se) * ze - (Ee - ie) * Pe) / (ye * ze - Se * Pe);
17049
- ae = se + ye * ce - P.x, ne = ie + Se * ce - P.y;
17048
+ const S = Math.sqrt(tt), W = Math.sqrt(Le * Le + ze * ze), se = he.x - Se / S, ie = he.y + ye / S, le = J.x - ze / W, Ee = J.y + Le / W, ce = ((le - se) * ze - (Ee - ie) * Le) / (ye * ze - Se * Le);
17049
+ ae = se + ye * ce - L.x, ne = ie + Se * ce - L.y;
17050
17050
  const X = ae * ae + ne * ne;
17051
17051
  if (X <= 2)
17052
17052
  return new ue(ae, ne);
17053
17053
  be = Math.sqrt(X / 2);
17054
17054
  } else {
17055
- let y = !1;
17056
- ye > Number.EPSILON ? Pe > Number.EPSILON && (y = !0) : ye < -Number.EPSILON ? Pe < -Number.EPSILON && (y = !0) : Math.sign(Se) === Math.sign(ze) && (y = !0), y ? (ae = -Se, ne = ye, be = Math.sqrt(tt)) : (ae = ye, ne = Se, be = Math.sqrt(tt / 2));
17055
+ let S = !1;
17056
+ ye > Number.EPSILON ? Le > Number.EPSILON && (S = !0) : ye < -Number.EPSILON ? Le < -Number.EPSILON && (S = !0) : Math.sign(Se) === Math.sign(ze) && (S = !0), S ? (ae = -Se, ne = ye, be = Math.sqrt(tt)) : (ae = ye, ne = Se, be = Math.sqrt(tt / 2));
17057
17057
  }
17058
17058
  return new ue(ae / be, ne / be);
17059
17059
  }
17060
17060
  const K = [];
17061
- for (let P = 0, he = U.length, J = he - 1, ae = P + 1; P < he; P++, J++, ae++)
17062
- J === he && (J = 0), ae === he && (ae = 0), K[P] = V(U[P], U[J], U[ae]);
17061
+ for (let L = 0, he = U.length, J = he - 1, ae = L + 1; L < he; L++, J++, ae++)
17062
+ J === he && (J = 0), ae === he && (ae = 0), K[L] = V(U[L], U[J], U[ae]);
17063
17063
  const Q = [];
17064
17064
  let B, q = K.concat();
17065
- for (let P = 0, he = F.length; P < he; P++) {
17066
- const J = F[P];
17065
+ for (let L = 0, he = F.length; L < he; L++) {
17066
+ const J = F[L];
17067
17067
  B = [];
17068
17068
  for (let ae = 0, ne = J.length, be = ne - 1, ye = ae + 1; ae < ne; ae++, be++, ye++)
17069
17069
  be === ne && (be = 0), ye === ne && (ye = 0), B[ae] = V(J[ae], J[be], J[ye]);
17070
17070
  Q.push(B), q = q.concat(B);
17071
17071
  }
17072
- for (let P = 0; P < m; P++) {
17073
- const he = P / m, J = d * Math.cos(he * Math.PI / 2), ae = g * Math.sin(he * Math.PI / 2) + _;
17072
+ for (let L = 0; L < m; L++) {
17073
+ const he = L / m, J = d * Math.cos(he * Math.PI / 2), ae = g * Math.sin(he * Math.PI / 2) + _;
17074
17074
  for (let ne = 0, be = U.length; ne < be; ne++) {
17075
17075
  const ye = C(U[ne], K[ne], ae);
17076
17076
  we(ye.x, ye.y, -J);
@@ -17078,24 +17078,24 @@ class ka extends _n {
17078
17078
  for (let ne = 0, be = F.length; ne < be; ne++) {
17079
17079
  const ye = F[ne];
17080
17080
  B = Q[ne];
17081
- for (let Se = 0, Pe = ye.length; Se < Pe; Se++) {
17081
+ for (let Se = 0, Le = ye.length; Se < Le; Se++) {
17082
17082
  const ze = C(ye[Se], B[Se], ae);
17083
17083
  we(ze.x, ze.y, -J);
17084
17084
  }
17085
17085
  }
17086
17086
  }
17087
17087
  const oe = g + _;
17088
- for (let P = 0; P < z; P++) {
17089
- const he = f ? C(E[P], q[P], oe) : E[P];
17088
+ for (let L = 0; L < z; L++) {
17089
+ const he = f ? C(E[L], q[L], oe) : E[L];
17090
17090
  M ? (w.copy(b.normals[0]).multiplyScalar(he.x), R.copy(b.binormals[0]).multiplyScalar(he.y), N.copy(v[0]).add(w).add(R), we(N.x, N.y, N.z)) : we(he.x, he.y, 0);
17091
17091
  }
17092
- for (let P = 1; P <= u; P++)
17092
+ for (let L = 1; L <= u; L++)
17093
17093
  for (let he = 0; he < z; he++) {
17094
17094
  const J = f ? C(E[he], q[he], oe) : E[he];
17095
- M ? (w.copy(b.normals[P]).multiplyScalar(J.x), R.copy(b.binormals[P]).multiplyScalar(J.y), N.copy(v[P]).add(w).add(R), we(N.x, N.y, N.z)) : we(J.x, J.y, h / u * P);
17095
+ M ? (w.copy(b.normals[L]).multiplyScalar(J.x), R.copy(b.binormals[L]).multiplyScalar(J.y), N.copy(v[L]).add(w).add(R), we(N.x, N.y, N.z)) : we(J.x, J.y, h / u * L);
17096
17096
  }
17097
- for (let P = m - 1; P >= 0; P--) {
17098
- const he = P / m, J = d * Math.cos(he * Math.PI / 2), ae = g * Math.sin(he * Math.PI / 2) + _;
17097
+ for (let L = m - 1; L >= 0; L--) {
17098
+ const he = L / m, J = d * Math.cos(he * Math.PI / 2), ae = g * Math.sin(he * Math.PI / 2) + _;
17099
17099
  for (let ne = 0, be = U.length; ne < be; ne++) {
17100
17100
  const ye = C(U[ne], K[ne], ae);
17101
17101
  we(ye.x, ye.y, h + J);
@@ -17103,7 +17103,7 @@ class ka extends _n {
17103
17103
  for (let ne = 0, be = F.length; ne < be; ne++) {
17104
17104
  const ye = F[ne];
17105
17105
  B = Q[ne];
17106
- for (let Se = 0, Pe = ye.length; Se < Pe; Se++) {
17106
+ for (let Se = 0, Le = ye.length; Se < Le; Se++) {
17107
17107
  const ze = C(ye[Se], B[Se], ae);
17108
17108
  M ? we(ze.x, ze.y + v[u - 1].y, v[u - 1].x + J) : we(ze.x, ze.y, h + J);
17109
17109
  }
@@ -17111,7 +17111,7 @@ class ka extends _n {
17111
17111
  }
17112
17112
  me(), ge();
17113
17113
  function me() {
17114
- const P = r.length / 3;
17114
+ const L = r.length / 3;
17115
17115
  if (f) {
17116
17116
  let he = 0, J = z * he;
17117
17117
  for (let ae = 0; ae < H; ae++) {
@@ -17133,48 +17133,48 @@ class ka extends _n {
17133
17133
  Te(J[0] + z * u, J[1] + z * u, J[2] + z * u);
17134
17134
  }
17135
17135
  }
17136
- i.addGroup(P, r.length / 3 - P, 0);
17136
+ i.addGroup(L, r.length / 3 - L, 0);
17137
17137
  }
17138
17138
  function ge() {
17139
- const P = r.length / 3;
17139
+ const L = r.length / 3;
17140
17140
  let he = 0;
17141
17141
  Ae(U, he), he += U.length;
17142
17142
  for (let J = 0, ae = F.length; J < ae; J++) {
17143
17143
  const ne = F[J];
17144
17144
  Ae(ne, he), he += ne.length;
17145
17145
  }
17146
- i.addGroup(P, r.length / 3 - P, 1);
17146
+ i.addGroup(L, r.length / 3 - L, 1);
17147
17147
  }
17148
- function Ae(P, he) {
17149
- let J = P.length;
17148
+ function Ae(L, he) {
17149
+ let J = L.length;
17150
17150
  for (; --J >= 0; ) {
17151
17151
  const ae = J;
17152
17152
  let ne = J - 1;
17153
- ne < 0 && (ne = P.length - 1);
17153
+ ne < 0 && (ne = L.length - 1);
17154
17154
  for (let be = 0, ye = u + m * 2; be < ye; be++) {
17155
- const Se = z * be, Pe = z * (be + 1), ze = he + ae + Se, tt = he + ne + Se, A = he + ne + Pe, y = he + ae + Pe;
17156
- Ve(ze, tt, A, y);
17155
+ const Se = z * be, Le = z * (be + 1), ze = he + ae + Se, tt = he + ne + Se, A = he + ne + Le, S = he + ae + Le;
17156
+ Ve(ze, tt, A, S);
17157
17157
  }
17158
17158
  }
17159
17159
  }
17160
- function we(P, he, J) {
17161
- l.push(P), l.push(he), l.push(J);
17160
+ function we(L, he, J) {
17161
+ l.push(L), l.push(he), l.push(J);
17162
17162
  }
17163
- function Te(P, he, J) {
17164
- Ze(P), Ze(he), Ze(J);
17165
- const ae = r.length / 3, ne = S.generateTopUV(i, r, ae - 3, ae - 2, ae - 1);
17163
+ function Te(L, he, J) {
17164
+ Ze(L), Ze(he), Ze(J);
17165
+ const ae = r.length / 3, ne = y.generateTopUV(i, r, ae - 3, ae - 2, ae - 1);
17166
17166
  Ce(ne[0]), Ce(ne[1]), Ce(ne[2]);
17167
17167
  }
17168
- function Ve(P, he, J, ae) {
17169
- Ze(P), Ze(he), Ze(ae), Ze(he), Ze(J), Ze(ae);
17170
- const ne = r.length / 3, be = S.generateSideWallUV(i, r, ne - 6, ne - 3, ne - 2, ne - 1);
17168
+ function Ve(L, he, J, ae) {
17169
+ Ze(L), Ze(he), Ze(ae), Ze(he), Ze(J), Ze(ae);
17170
+ const ne = r.length / 3, be = y.generateSideWallUV(i, r, ne - 6, ne - 3, ne - 2, ne - 1);
17171
17171
  Ce(be[0]), Ce(be[1]), Ce(be[3]), Ce(be[1]), Ce(be[2]), Ce(be[3]);
17172
17172
  }
17173
- function Ze(P) {
17174
- r.push(l[P * 3 + 0]), r.push(l[P * 3 + 1]), r.push(l[P * 3 + 2]);
17173
+ function Ze(L) {
17174
+ r.push(l[L * 3 + 0]), r.push(l[L * 3 + 1]), r.push(l[L * 3 + 2]);
17175
17175
  }
17176
- function Ce(P) {
17177
- s.push(P.x), s.push(P.y);
17176
+ function Ce(L) {
17177
+ s.push(L.x), s.push(L.y);
17178
17178
  }
17179
17179
  }
17180
17180
  }
@@ -17243,8 +17243,8 @@ class Cy extends _n {
17243
17243
  const h = l[c], f = h.start, d = h.count;
17244
17244
  for (let g = f, _ = f + d; g < _; g += 3)
17245
17245
  for (let m = 0; m < 3; m++) {
17246
- const p = a.getX(g + m), S = a.getX(g + (m + 1) % 3);
17247
- r.fromBufferAttribute(o, p), s.fromBufferAttribute(o, S), Jc(r, s, i) === !0 && (t.push(r.x, r.y, r.z), t.push(s.x, s.y, s.z));
17246
+ const p = a.getX(g + m), y = a.getX(g + (m + 1) % 3);
17247
+ r.fromBufferAttribute(o, p), s.fromBufferAttribute(o, y), Jc(r, s, i) === !0 && (t.push(r.x, r.y, r.z), t.push(s.x, s.y, s.z));
17248
17248
  }
17249
17249
  }
17250
17250
  } else {
@@ -17274,7 +17274,7 @@ class Ry extends Zi {
17274
17274
  return super.copy(e), this.color.copy(e.color), this.specular.copy(e.specular), this.shininess = e.shininess, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
17275
17275
  }
17276
17276
  }
17277
- class Py extends at {
17277
+ class Ly extends at {
17278
17278
  constructor(e, t = 1) {
17279
17279
  super(), this.isLight = !0, this.type = "Light", this.color = new je(e), this.intensity = t;
17280
17280
  }
@@ -17289,7 +17289,7 @@ class Py extends at {
17289
17289
  }
17290
17290
  }
17291
17291
  const Fo = /* @__PURE__ */ new it(), Qc = /* @__PURE__ */ new D(), eu = /* @__PURE__ */ new D();
17292
- class Ly {
17292
+ class Py {
17293
17293
  constructor(e) {
17294
17294
  this.camera = e, this.bias = 0, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new ue(512, 512), this.map = null, this.mapPass = null, this.matrix = new it(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new Na(), this._frameExtents = new ue(1, 1), this._viewportCount = 1, this._viewports = [
17295
17295
  new Ke(0, 0, 1, 1)
@@ -17343,7 +17343,7 @@ class Ly {
17343
17343
  }
17344
17344
  }
17345
17345
  const tu = /* @__PURE__ */ new it(), sr = /* @__PURE__ */ new D(), Bo = /* @__PURE__ */ new D();
17346
- class Dy extends Ly {
17346
+ class Dy extends Py {
17347
17347
  constructor() {
17348
17348
  super(new Vt(90, 1, 0.5, 500)), this.isPointLightShadow = !0, this._frameExtents = new ue(4, 2), this._viewportCount = 6, this._viewports = [
17349
17349
  // These viewports map a cube-map onto a 2D texture with the
@@ -17391,7 +17391,7 @@ class Dy extends Ly {
17391
17391
  s !== i.far && (i.far = s, i.updateProjectionMatrix()), sr.setFromMatrixPosition(e.matrixWorld), i.position.copy(sr), Bo.copy(i.position), Bo.add(this._cubeDirections[t]), i.up.copy(this._cubeUps[t]), i.lookAt(Bo), i.updateMatrixWorld(), r.makeTranslation(-sr.x, -sr.y, -sr.z), tu.multiplyMatrices(i.projectionMatrix, i.matrixWorldInverse), this._frustum.setFromProjectionMatrix(tu);
17392
17392
  }
17393
17393
  }
17394
- class Iy extends Py {
17394
+ class Iy extends Ly {
17395
17395
  constructor(e, t, i = 0, r = 2) {
17396
17396
  super(e, t), this.isPointLight = !0, this.type = "PointLight", this.distance = i, this.decay = r, this.shadow = new Dy();
17397
17397
  }
@@ -17438,7 +17438,7 @@ class ha extends Yx {
17438
17438
  }
17439
17439
  class Ny {
17440
17440
  constructor(e, t, i = 0, r = 1 / 0) {
17441
- this.ray = new La(e, t), this.near = i, this.far = r, this.camera = null, this.layers = new Da(), this.params = {
17441
+ this.ray = new Pa(e, t), this.near = i, this.far = r, this.camera = null, this.layers = new Da(), this.params = {
17442
17442
  Mesh: {},
17443
17443
  Line: { threshold: 1 },
17444
17444
  LOD: {},
@@ -17545,7 +17545,7 @@ typeof __THREE_DEVTOOLS__ != "undefined" && __THREE_DEVTOOLS__.dispatchEvent(new
17545
17545
  revision: Aa
17546
17546
  } }));
17547
17547
  typeof window != "undefined" && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = Aa);
17548
- const su = { type: "change" }, zo = { type: "start" }, ou = { type: "end" }, fs = new La(), au = new Hn(), Fy = Math.cos(70 * ph.DEG2RAD);
17548
+ const su = { type: "change" }, zo = { type: "start" }, ou = { type: "end" }, fs = new Pa(), au = new Hn(), Fy = Math.cos(70 * ph.DEG2RAD);
17549
17549
  class By extends gi {
17550
17550
  constructor(e, t) {
17551
17551
  super(), this.object = e, this.domElement = t, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new D(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: zn.ROTATE, MIDDLE: zn.DOLLY, RIGHT: zn.PAN }, this.touches = { ONE: _i.ROTATE, TWO: _i.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
@@ -17554,26 +17554,26 @@ class By extends gi {
17554
17554
  return a.theta;
17555
17555
  }, this.getDistance = function() {
17556
17556
  return this.object.position.distanceTo(this.target);
17557
- }, this.listenToKeyEvents = function(L) {
17558
- L.addEventListener("keydown", y), this._domElementKeyEvents = L;
17557
+ }, this.listenToKeyEvents = function(P) {
17558
+ P.addEventListener("keydown", S), this._domElementKeyEvents = P;
17559
17559
  }, this.stopListenToKeyEvents = function() {
17560
- this._domElementKeyEvents.removeEventListener("keydown", y), this._domElementKeyEvents = null;
17560
+ this._domElementKeyEvents.removeEventListener("keydown", S), this._domElementKeyEvents = null;
17561
17561
  }, this.saveState = function() {
17562
17562
  i.target0.copy(i.target), i.position0.copy(i.object.position), i.zoom0 = i.object.zoom;
17563
17563
  }, this.reset = function() {
17564
17564
  i.target.copy(i.target0), i.object.position.copy(i.position0), i.object.zoom = i.zoom0, i.object.updateProjectionMatrix(), i.dispatchEvent(su), i.update(), s = r.NONE;
17565
17565
  }, this.update = function() {
17566
- const L = new D(), te = new pi().setFromUnitVectors(e.up, new D(0, 1, 0)), xe = te.clone().invert(), pe = new D(), ve = new pi(), Ne = new D(), We = 2 * Math.PI;
17566
+ const P = new D(), te = new pi().setFromUnitVectors(e.up, new D(0, 1, 0)), xe = te.clone().invert(), pe = new D(), ve = new pi(), Ne = new D(), We = 2 * Math.PI;
17567
17567
  return function(_e = null) {
17568
17568
  const $ = i.object.position;
17569
- L.copy($).sub(i.target), L.applyQuaternion(te), a.setFromVector3(L), i.autoRotate && s === r.NONE && F(x(_e)), i.enableDamping ? (a.theta += l.theta * i.dampingFactor, a.phi += l.phi * i.dampingFactor) : (a.theta += l.theta, a.phi += l.phi);
17569
+ P.copy($).sub(i.target), P.applyQuaternion(te), a.setFromVector3(P), i.autoRotate && s === r.NONE && F(x(_e)), i.enableDamping ? (a.theta += l.theta * i.dampingFactor, a.phi += l.phi * i.dampingFactor) : (a.theta += l.theta, a.phi += l.phi);
17570
17570
  let re = i.minAzimuthAngle, fe = i.maxAzimuthAngle;
17571
- isFinite(re) && isFinite(fe) && (re < -Math.PI ? re += We : re > Math.PI && (re -= We), fe < -Math.PI ? fe += We : fe > Math.PI && (fe -= We), re <= fe ? a.theta = Math.max(re, Math.min(fe, a.theta)) : a.theta = a.theta > (re + fe) / 2 ? Math.max(re, a.theta) : Math.min(fe, a.theta)), a.phi = Math.max(i.minPolarAngle, Math.min(i.maxPolarAngle, a.phi)), a.makeSafe(), i.enableDamping === !0 ? i.target.addScaledVector(u, i.dampingFactor) : i.target.add(u), i.zoomToCursor && R || i.object.isOrthographicCamera ? a.radius = K(a.radius) : a.radius = K(a.radius * c), L.setFromSpherical(a), L.applyQuaternion(xe), $.copy(i.target).add(L), i.object.lookAt(i.target), i.enableDamping === !0 ? (l.theta *= 1 - i.dampingFactor, l.phi *= 1 - i.dampingFactor, u.multiplyScalar(1 - i.dampingFactor)) : (l.set(0, 0, 0), u.set(0, 0, 0));
17571
+ isFinite(re) && isFinite(fe) && (re < -Math.PI ? re += We : re > Math.PI && (re -= We), fe < -Math.PI ? fe += We : fe > Math.PI && (fe -= We), re <= fe ? a.theta = Math.max(re, Math.min(fe, a.theta)) : a.theta = a.theta > (re + fe) / 2 ? Math.max(re, a.theta) : Math.min(fe, a.theta)), a.phi = Math.max(i.minPolarAngle, Math.min(i.maxPolarAngle, a.phi)), a.makeSafe(), i.enableDamping === !0 ? i.target.addScaledVector(u, i.dampingFactor) : i.target.add(u), i.zoomToCursor && R || i.object.isOrthographicCamera ? a.radius = K(a.radius) : a.radius = K(a.radius * c), P.setFromSpherical(a), P.applyQuaternion(xe), $.copy(i.target).add(P), i.object.lookAt(i.target), i.enableDamping === !0 ? (l.theta *= 1 - i.dampingFactor, l.phi *= 1 - i.dampingFactor, u.multiplyScalar(1 - i.dampingFactor)) : (l.set(0, 0, 0), u.set(0, 0, 0));
17572
17572
  let He = !1;
17573
17573
  if (i.zoomToCursor && R) {
17574
17574
  let qe = null;
17575
17575
  if (i.object.isPerspectiveCamera) {
17576
- const Je = L.length();
17576
+ const Je = P.length();
17577
17577
  qe = K(Je * c);
17578
17578
  const Ft = Je - qe;
17579
17579
  i.object.position.addScaledVector(M, Ft), i.object.updateMatrixWorld();
@@ -17581,7 +17581,7 @@ class By extends gi {
17581
17581
  const Je = new D(b.x, b.y, 0);
17582
17582
  Je.unproject(i.object), i.object.zoom = Math.max(i.minZoom, Math.min(i.maxZoom, i.object.zoom / c)), i.object.updateProjectionMatrix(), He = !0;
17583
17583
  const Ft = new D(b.x, b.y, 0);
17584
- Ft.unproject(i.object), i.object.position.sub(Ft).add(Je), i.object.updateMatrixWorld(), qe = L.length();
17584
+ Ft.unproject(i.object), i.object.position.sub(Ft).add(Je), i.object.updateMatrixWorld(), qe = P.length();
17585
17585
  } else
17586
17586
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), i.zoomToCursor = !1;
17587
17587
  qe !== null && (this.screenSpacePanning ? i.target.set(0, 0, -1).transformDirection(i.object.matrix).multiplyScalar(qe).add(i.object.position) : (fs.origin.copy(i.object.position), fs.direction.set(0, 0, -1).transformDirection(i.object.matrix), Math.abs(i.object.up.dot(fs.direction)) < Fy ? e.lookAt(i.target) : (au.setFromNormalAndCoplanarPoint(i.object.up, i.target), fs.intersectPlane(au, i.target))));
@@ -17590,7 +17590,7 @@ class By extends gi {
17590
17590
  return c = 1, R = !1, He || pe.distanceToSquared(i.object.position) > o || 8 * (1 - ve.dot(i.object.quaternion)) > o || Ne.distanceToSquared(i.target) > 0 ? (i.dispatchEvent(su), pe.copy(i.object.position), ve.copy(i.object.quaternion), Ne.copy(i.target), He = !1, !0) : !1;
17591
17591
  };
17592
17592
  }(), this.dispose = function() {
17593
- i.domElement.removeEventListener("contextmenu", ie), i.domElement.removeEventListener("pointerdown", ye), i.domElement.removeEventListener("pointercancel", Pe), i.domElement.removeEventListener("wheel", A), i.domElement.removeEventListener("pointermove", Se), i.domElement.removeEventListener("pointerup", Pe), i._domElementKeyEvents !== null && (i._domElementKeyEvents.removeEventListener("keydown", y), i._domElementKeyEvents = null);
17593
+ i.domElement.removeEventListener("contextmenu", ie), i.domElement.removeEventListener("pointerdown", ye), i.domElement.removeEventListener("pointercancel", Le), i.domElement.removeEventListener("wheel", A), i.domElement.removeEventListener("pointermove", Se), i.domElement.removeEventListener("pointerup", Le), i._domElementKeyEvents !== null && (i._domElementKeyEvents.removeEventListener("keydown", S), i._domElementKeyEvents = null);
17594
17594
  };
17595
17595
  const i = this, r = {
17596
17596
  NONE: -1,
@@ -17605,169 +17605,169 @@ class By extends gi {
17605
17605
  let s = r.NONE;
17606
17606
  const o = 1e-6, a = new iu(), l = new iu();
17607
17607
  let c = 1;
17608
- const u = new D(), h = new ue(), f = new ue(), d = new ue(), g = new ue(), _ = new ue(), m = new ue(), p = new ue(), S = new ue(), v = new ue(), M = new D(), b = new ue();
17608
+ const u = new D(), h = new ue(), f = new ue(), d = new ue(), g = new ue(), _ = new ue(), m = new ue(), p = new ue(), y = new ue(), v = new ue(), M = new D(), b = new ue();
17609
17609
  let R = !1;
17610
17610
  const w = [], N = {};
17611
- function x(L) {
17612
- return L !== null ? 2 * Math.PI / 60 * i.autoRotateSpeed * L : 2 * Math.PI / 60 / 60 * i.autoRotateSpeed;
17611
+ function x(P) {
17612
+ return P !== null ? 2 * Math.PI / 60 * i.autoRotateSpeed * P : 2 * Math.PI / 60 / 60 * i.autoRotateSpeed;
17613
17613
  }
17614
17614
  function E() {
17615
17615
  return Math.pow(0.95, i.zoomSpeed);
17616
17616
  }
17617
- function F(L) {
17618
- l.theta -= L;
17617
+ function F(P) {
17618
+ l.theta -= P;
17619
17619
  }
17620
- function ee(L) {
17621
- l.phi -= L;
17620
+ function ee(P) {
17621
+ l.phi -= P;
17622
17622
  }
17623
17623
  const O = function() {
17624
- const L = new D();
17624
+ const P = new D();
17625
17625
  return function(xe, pe) {
17626
- L.setFromMatrixColumn(pe, 0), L.multiplyScalar(-xe), u.add(L);
17626
+ P.setFromMatrixColumn(pe, 0), P.multiplyScalar(-xe), u.add(P);
17627
17627
  };
17628
17628
  }(), U = function() {
17629
- const L = new D();
17629
+ const P = new D();
17630
17630
  return function(xe, pe) {
17631
- i.screenSpacePanning === !0 ? L.setFromMatrixColumn(pe, 1) : (L.setFromMatrixColumn(pe, 0), L.crossVectors(i.object.up, L)), L.multiplyScalar(xe), u.add(L);
17631
+ i.screenSpacePanning === !0 ? P.setFromMatrixColumn(pe, 1) : (P.setFromMatrixColumn(pe, 0), P.crossVectors(i.object.up, P)), P.multiplyScalar(xe), u.add(P);
17632
17632
  };
17633
17633
  }(), C = function() {
17634
- const L = new D();
17634
+ const P = new D();
17635
17635
  return function(xe, pe) {
17636
17636
  const ve = i.domElement;
17637
17637
  if (i.object.isPerspectiveCamera) {
17638
17638
  const Ne = i.object.position;
17639
- L.copy(Ne).sub(i.target);
17640
- let We = L.length();
17639
+ P.copy(Ne).sub(i.target);
17640
+ let We = P.length();
17641
17641
  We *= Math.tan(i.object.fov / 2 * Math.PI / 180), O(2 * xe * We / ve.clientHeight, i.object.matrix), U(2 * pe * We / ve.clientHeight, i.object.matrix);
17642
17642
  } else
17643
17643
  i.object.isOrthographicCamera ? (O(xe * (i.object.right - i.object.left) / i.object.zoom / ve.clientWidth, i.object.matrix), U(pe * (i.object.top - i.object.bottom) / i.object.zoom / ve.clientHeight, i.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), i.enablePan = !1);
17644
17644
  };
17645
17645
  }();
17646
- function z(L) {
17647
- i.object.isPerspectiveCamera || i.object.isOrthographicCamera ? c /= L : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), i.enableZoom = !1);
17646
+ function z(P) {
17647
+ i.object.isPerspectiveCamera || i.object.isOrthographicCamera ? c /= P : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), i.enableZoom = !1);
17648
17648
  }
17649
- function H(L) {
17650
- i.object.isPerspectiveCamera || i.object.isOrthographicCamera ? c *= L : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), i.enableZoom = !1);
17649
+ function H(P) {
17650
+ i.object.isPerspectiveCamera || i.object.isOrthographicCamera ? c *= P : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), i.enableZoom = !1);
17651
17651
  }
17652
- function V(L) {
17652
+ function V(P) {
17653
17653
  if (!i.zoomToCursor)
17654
17654
  return;
17655
17655
  R = !0;
17656
- const te = i.domElement.getBoundingClientRect(), xe = L.clientX - te.left, pe = L.clientY - te.top, ve = te.width, Ne = te.height;
17656
+ const te = i.domElement.getBoundingClientRect(), xe = P.clientX - te.left, pe = P.clientY - te.top, ve = te.width, Ne = te.height;
17657
17657
  b.x = xe / ve * 2 - 1, b.y = -(pe / Ne) * 2 + 1, M.set(b.x, b.y, 1).unproject(i.object).sub(i.object.position).normalize();
17658
17658
  }
17659
- function K(L) {
17660
- return Math.max(i.minDistance, Math.min(i.maxDistance, L));
17659
+ function K(P) {
17660
+ return Math.max(i.minDistance, Math.min(i.maxDistance, P));
17661
17661
  }
17662
- function Q(L) {
17663
- h.set(L.clientX, L.clientY);
17662
+ function Q(P) {
17663
+ h.set(P.clientX, P.clientY);
17664
17664
  }
17665
- function B(L) {
17666
- V(L), p.set(L.clientX, L.clientY);
17665
+ function B(P) {
17666
+ V(P), p.set(P.clientX, P.clientY);
17667
17667
  }
17668
- function q(L) {
17669
- g.set(L.clientX, L.clientY);
17668
+ function q(P) {
17669
+ g.set(P.clientX, P.clientY);
17670
17670
  }
17671
- function oe(L) {
17672
- f.set(L.clientX, L.clientY), d.subVectors(f, h).multiplyScalar(i.rotateSpeed);
17671
+ function oe(P) {
17672
+ f.set(P.clientX, P.clientY), d.subVectors(f, h).multiplyScalar(i.rotateSpeed);
17673
17673
  const te = i.domElement;
17674
17674
  F(2 * Math.PI * d.x / te.clientHeight), ee(2 * Math.PI * d.y / te.clientHeight), h.copy(f), i.update();
17675
17675
  }
17676
- function me(L) {
17677
- S.set(L.clientX, L.clientY), v.subVectors(S, p), v.y > 0 ? z(E()) : v.y < 0 && H(E()), p.copy(S), i.update();
17676
+ function me(P) {
17677
+ y.set(P.clientX, P.clientY), v.subVectors(y, p), v.y > 0 ? z(E()) : v.y < 0 && H(E()), p.copy(y), i.update();
17678
17678
  }
17679
- function ge(L) {
17680
- _.set(L.clientX, L.clientY), m.subVectors(_, g).multiplyScalar(i.panSpeed), C(m.x, m.y), g.copy(_), i.update();
17679
+ function ge(P) {
17680
+ _.set(P.clientX, P.clientY), m.subVectors(_, g).multiplyScalar(i.panSpeed), C(m.x, m.y), g.copy(_), i.update();
17681
17681
  }
17682
- function Ae(L) {
17683
- V(L), L.deltaY < 0 ? H(E()) : L.deltaY > 0 && z(E()), i.update();
17682
+ function Ae(P) {
17683
+ V(P), P.deltaY < 0 ? H(E()) : P.deltaY > 0 && z(E()), i.update();
17684
17684
  }
17685
- function we(L) {
17685
+ function we(P) {
17686
17686
  let te = !1;
17687
- switch (L.code) {
17687
+ switch (P.code) {
17688
17688
  case i.keys.UP:
17689
- L.ctrlKey || L.metaKey || L.shiftKey ? ee(2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(0, i.keyPanSpeed), te = !0;
17689
+ P.ctrlKey || P.metaKey || P.shiftKey ? ee(2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(0, i.keyPanSpeed), te = !0;
17690
17690
  break;
17691
17691
  case i.keys.BOTTOM:
17692
- L.ctrlKey || L.metaKey || L.shiftKey ? ee(-2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(0, -i.keyPanSpeed), te = !0;
17692
+ P.ctrlKey || P.metaKey || P.shiftKey ? ee(-2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(0, -i.keyPanSpeed), te = !0;
17693
17693
  break;
17694
17694
  case i.keys.LEFT:
17695
- L.ctrlKey || L.metaKey || L.shiftKey ? F(2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(i.keyPanSpeed, 0), te = !0;
17695
+ P.ctrlKey || P.metaKey || P.shiftKey ? F(2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(i.keyPanSpeed, 0), te = !0;
17696
17696
  break;
17697
17697
  case i.keys.RIGHT:
17698
- L.ctrlKey || L.metaKey || L.shiftKey ? F(-2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(-i.keyPanSpeed, 0), te = !0;
17698
+ P.ctrlKey || P.metaKey || P.shiftKey ? F(-2 * Math.PI * i.rotateSpeed / i.domElement.clientHeight) : C(-i.keyPanSpeed, 0), te = !0;
17699
17699
  break;
17700
17700
  }
17701
- te && (L.preventDefault(), i.update());
17701
+ te && (P.preventDefault(), i.update());
17702
17702
  }
17703
17703
  function Te() {
17704
17704
  if (w.length === 1)
17705
17705
  h.set(w[0].pageX, w[0].pageY);
17706
17706
  else {
17707
- const L = 0.5 * (w[0].pageX + w[1].pageX), te = 0.5 * (w[0].pageY + w[1].pageY);
17708
- h.set(L, te);
17707
+ const P = 0.5 * (w[0].pageX + w[1].pageX), te = 0.5 * (w[0].pageY + w[1].pageY);
17708
+ h.set(P, te);
17709
17709
  }
17710
17710
  }
17711
17711
  function Ve() {
17712
17712
  if (w.length === 1)
17713
17713
  g.set(w[0].pageX, w[0].pageY);
17714
17714
  else {
17715
- const L = 0.5 * (w[0].pageX + w[1].pageX), te = 0.5 * (w[0].pageY + w[1].pageY);
17716
- g.set(L, te);
17715
+ const P = 0.5 * (w[0].pageX + w[1].pageX), te = 0.5 * (w[0].pageY + w[1].pageY);
17716
+ g.set(P, te);
17717
17717
  }
17718
17718
  }
17719
17719
  function Ze() {
17720
- const L = w[0].pageX - w[1].pageX, te = w[0].pageY - w[1].pageY, xe = Math.sqrt(L * L + te * te);
17720
+ const P = w[0].pageX - w[1].pageX, te = w[0].pageY - w[1].pageY, xe = Math.sqrt(P * P + te * te);
17721
17721
  p.set(0, xe);
17722
17722
  }
17723
17723
  function Ce() {
17724
17724
  i.enableZoom && Ze(), i.enablePan && Ve();
17725
17725
  }
17726
- function P() {
17726
+ function L() {
17727
17727
  i.enableZoom && Ze(), i.enableRotate && Te();
17728
17728
  }
17729
- function he(L) {
17729
+ function he(P) {
17730
17730
  if (w.length == 1)
17731
- f.set(L.pageX, L.pageY);
17731
+ f.set(P.pageX, P.pageY);
17732
17732
  else {
17733
- const xe = X(L), pe = 0.5 * (L.pageX + xe.x), ve = 0.5 * (L.pageY + xe.y);
17733
+ const xe = X(P), pe = 0.5 * (P.pageX + xe.x), ve = 0.5 * (P.pageY + xe.y);
17734
17734
  f.set(pe, ve);
17735
17735
  }
17736
17736
  d.subVectors(f, h).multiplyScalar(i.rotateSpeed);
17737
17737
  const te = i.domElement;
17738
17738
  F(2 * Math.PI * d.x / te.clientHeight), ee(2 * Math.PI * d.y / te.clientHeight), h.copy(f);
17739
17739
  }
17740
- function J(L) {
17740
+ function J(P) {
17741
17741
  if (w.length === 1)
17742
- _.set(L.pageX, L.pageY);
17742
+ _.set(P.pageX, P.pageY);
17743
17743
  else {
17744
- const te = X(L), xe = 0.5 * (L.pageX + te.x), pe = 0.5 * (L.pageY + te.y);
17744
+ const te = X(P), xe = 0.5 * (P.pageX + te.x), pe = 0.5 * (P.pageY + te.y);
17745
17745
  _.set(xe, pe);
17746
17746
  }
17747
17747
  m.subVectors(_, g).multiplyScalar(i.panSpeed), C(m.x, m.y), g.copy(_);
17748
17748
  }
17749
- function ae(L) {
17750
- const te = X(L), xe = L.pageX - te.x, pe = L.pageY - te.y, ve = Math.sqrt(xe * xe + pe * pe);
17751
- S.set(0, ve), v.set(0, Math.pow(S.y / p.y, i.zoomSpeed)), z(v.y), p.copy(S);
17749
+ function ae(P) {
17750
+ const te = X(P), xe = P.pageX - te.x, pe = P.pageY - te.y, ve = Math.sqrt(xe * xe + pe * pe);
17751
+ y.set(0, ve), v.set(0, Math.pow(y.y / p.y, i.zoomSpeed)), z(v.y), p.copy(y);
17752
17752
  }
17753
- function ne(L) {
17754
- i.enableZoom && ae(L), i.enablePan && J(L);
17753
+ function ne(P) {
17754
+ i.enableZoom && ae(P), i.enablePan && J(P);
17755
17755
  }
17756
- function be(L) {
17757
- i.enableZoom && ae(L), i.enableRotate && he(L);
17756
+ function be(P) {
17757
+ i.enableZoom && ae(P), i.enableRotate && he(P);
17758
17758
  }
17759
- function ye(L) {
17760
- i.enabled !== !1 && (w.length === 0 && (i.domElement.setPointerCapture(L.pointerId), i.domElement.addEventListener("pointermove", Se), i.domElement.addEventListener("pointerup", Pe)), le(L), L.pointerType === "touch" ? W(L) : ze(L));
17759
+ function ye(P) {
17760
+ i.enabled !== !1 && (w.length === 0 && (i.domElement.setPointerCapture(P.pointerId), i.domElement.addEventListener("pointermove", Se), i.domElement.addEventListener("pointerup", Le)), le(P), P.pointerType === "touch" ? W(P) : ze(P));
17761
17761
  }
17762
- function Se(L) {
17763
- i.enabled !== !1 && (L.pointerType === "touch" ? se(L) : tt(L));
17762
+ function Se(P) {
17763
+ i.enabled !== !1 && (P.pointerType === "touch" ? se(P) : tt(P));
17764
17764
  }
17765
- function Pe(L) {
17766
- Ee(L), w.length === 0 && (i.domElement.releasePointerCapture(L.pointerId), i.domElement.removeEventListener("pointermove", Se), i.domElement.removeEventListener("pointerup", Pe)), i.dispatchEvent(ou), s = r.NONE;
17765
+ function Le(P) {
17766
+ Ee(P), w.length === 0 && (i.domElement.releasePointerCapture(P.pointerId), i.domElement.removeEventListener("pointermove", Se), i.domElement.removeEventListener("pointerup", Le)), i.dispatchEvent(ou), s = r.NONE;
17767
17767
  }
17768
- function ze(L) {
17768
+ function ze(P) {
17769
17769
  let te;
17770
- switch (L.button) {
17770
+ switch (P.button) {
17771
17771
  case 0:
17772
17772
  te = i.mouseButtons.LEFT;
17773
17773
  break;
@@ -17784,28 +17784,28 @@ class By extends gi {
17784
17784
  case zn.DOLLY:
17785
17785
  if (i.enableZoom === !1)
17786
17786
  return;
17787
- B(L), s = r.DOLLY;
17787
+ B(P), s = r.DOLLY;
17788
17788
  break;
17789
17789
  case zn.ROTATE:
17790
- if (L.ctrlKey || L.metaKey || L.shiftKey) {
17790
+ if (P.ctrlKey || P.metaKey || P.shiftKey) {
17791
17791
  if (i.enablePan === !1)
17792
17792
  return;
17793
- q(L), s = r.PAN;
17793
+ q(P), s = r.PAN;
17794
17794
  } else {
17795
17795
  if (i.enableRotate === !1)
17796
17796
  return;
17797
- Q(L), s = r.ROTATE;
17797
+ Q(P), s = r.ROTATE;
17798
17798
  }
17799
17799
  break;
17800
17800
  case zn.PAN:
17801
- if (L.ctrlKey || L.metaKey || L.shiftKey) {
17801
+ if (P.ctrlKey || P.metaKey || P.shiftKey) {
17802
17802
  if (i.enableRotate === !1)
17803
17803
  return;
17804
- Q(L), s = r.ROTATE;
17804
+ Q(P), s = r.ROTATE;
17805
17805
  } else {
17806
17806
  if (i.enablePan === !1)
17807
17807
  return;
17808
- q(L), s = r.PAN;
17808
+ q(P), s = r.PAN;
17809
17809
  }
17810
17810
  break;
17811
17811
  default:
@@ -17813,33 +17813,33 @@ class By extends gi {
17813
17813
  }
17814
17814
  s !== r.NONE && i.dispatchEvent(zo);
17815
17815
  }
17816
- function tt(L) {
17816
+ function tt(P) {
17817
17817
  switch (s) {
17818
17818
  case r.ROTATE:
17819
17819
  if (i.enableRotate === !1)
17820
17820
  return;
17821
- oe(L);
17821
+ oe(P);
17822
17822
  break;
17823
17823
  case r.DOLLY:
17824
17824
  if (i.enableZoom === !1)
17825
17825
  return;
17826
- me(L);
17826
+ me(P);
17827
17827
  break;
17828
17828
  case r.PAN:
17829
17829
  if (i.enablePan === !1)
17830
17830
  return;
17831
- ge(L);
17831
+ ge(P);
17832
17832
  break;
17833
17833
  }
17834
17834
  }
17835
- function A(L) {
17836
- i.enabled === !1 || i.enableZoom === !1 || s !== r.NONE || (L.preventDefault(), i.dispatchEvent(zo), Ae(L), i.dispatchEvent(ou));
17835
+ function A(P) {
17836
+ i.enabled === !1 || i.enableZoom === !1 || s !== r.NONE || (P.preventDefault(), i.dispatchEvent(zo), Ae(P), i.dispatchEvent(ou));
17837
17837
  }
17838
- function y(L) {
17839
- i.enabled === !1 || i.enablePan === !1 || we(L);
17838
+ function S(P) {
17839
+ i.enabled === !1 || i.enablePan === !1 || we(P);
17840
17840
  }
17841
- function W(L) {
17842
- switch (ce(L), w.length) {
17841
+ function W(P) {
17842
+ switch (ce(P), w.length) {
17843
17843
  case 1:
17844
17844
  switch (i.touches.ONE) {
17845
17845
  case _i.ROTATE:
@@ -17866,7 +17866,7 @@ class By extends gi {
17866
17866
  case _i.DOLLY_ROTATE:
17867
17867
  if (i.enableZoom === !1 && i.enableRotate === !1)
17868
17868
  return;
17869
- P(), s = r.TOUCH_DOLLY_ROTATE;
17869
+ L(), s = r.TOUCH_DOLLY_ROTATE;
17870
17870
  break;
17871
17871
  default:
17872
17872
  s = r.NONE;
@@ -17877,55 +17877,55 @@ class By extends gi {
17877
17877
  }
17878
17878
  s !== r.NONE && i.dispatchEvent(zo);
17879
17879
  }
17880
- function se(L) {
17881
- switch (ce(L), s) {
17880
+ function se(P) {
17881
+ switch (ce(P), s) {
17882
17882
  case r.TOUCH_ROTATE:
17883
17883
  if (i.enableRotate === !1)
17884
17884
  return;
17885
- he(L), i.update();
17885
+ he(P), i.update();
17886
17886
  break;
17887
17887
  case r.TOUCH_PAN:
17888
17888
  if (i.enablePan === !1)
17889
17889
  return;
17890
- J(L), i.update();
17890
+ J(P), i.update();
17891
17891
  break;
17892
17892
  case r.TOUCH_DOLLY_PAN:
17893
17893
  if (i.enableZoom === !1 && i.enablePan === !1)
17894
17894
  return;
17895
- ne(L), i.update();
17895
+ ne(P), i.update();
17896
17896
  break;
17897
17897
  case r.TOUCH_DOLLY_ROTATE:
17898
17898
  if (i.enableZoom === !1 && i.enableRotate === !1)
17899
17899
  return;
17900
- be(L), i.update();
17900
+ be(P), i.update();
17901
17901
  break;
17902
17902
  default:
17903
17903
  s = r.NONE;
17904
17904
  }
17905
17905
  }
17906
- function ie(L) {
17907
- i.enabled !== !1 && L.preventDefault();
17906
+ function ie(P) {
17907
+ i.enabled !== !1 && P.preventDefault();
17908
17908
  }
17909
- function le(L) {
17910
- w.push(L);
17909
+ function le(P) {
17910
+ w.push(P);
17911
17911
  }
17912
- function Ee(L) {
17913
- delete N[L.pointerId];
17912
+ function Ee(P) {
17913
+ delete N[P.pointerId];
17914
17914
  for (let te = 0; te < w.length; te++)
17915
- if (w[te].pointerId == L.pointerId) {
17915
+ if (w[te].pointerId == P.pointerId) {
17916
17916
  w.splice(te, 1);
17917
17917
  return;
17918
17918
  }
17919
17919
  }
17920
- function ce(L) {
17921
- let te = N[L.pointerId];
17922
- te === void 0 && (te = new ue(), N[L.pointerId] = te), te.set(L.pageX, L.pageY);
17920
+ function ce(P) {
17921
+ let te = N[P.pointerId];
17922
+ te === void 0 && (te = new ue(), N[P.pointerId] = te), te.set(P.pageX, P.pageY);
17923
17923
  }
17924
- function X(L) {
17925
- const te = L.pointerId === w[0].pointerId ? w[1] : w[0];
17924
+ function X(P) {
17925
+ const te = P.pointerId === w[0].pointerId ? w[1] : w[0];
17926
17926
  return N[te.pointerId];
17927
17927
  }
17928
- i.domElement.addEventListener("contextmenu", ie), i.domElement.addEventListener("pointerdown", ye), i.domElement.addEventListener("pointercancel", Pe), i.domElement.addEventListener("wheel", A, { passive: !1 }), this.update();
17928
+ i.domElement.addEventListener("contextmenu", ie), i.domElement.addEventListener("pointerdown", ye), i.domElement.addEventListener("pointercancel", Le), i.domElement.addEventListener("wheel", A, { passive: !1 }), this.update();
17929
17929
  }
17930
17930
  }
17931
17931
  class Ho extends at {
@@ -17964,8 +17964,8 @@ class zy {
17964
17964
  const m = d.visible === !0 && Ui.z >= -1 && Ui.z <= 1 && d.layers.test(_.layers) === !0;
17965
17965
  if (d.element.style.display = m === !0 ? "" : "none", m === !0) {
17966
17966
  d.onBeforeRender(t, g, _);
17967
- const S = d.element;
17968
- S.style.transform = "translate(" + -100 * d.center.x + "%," + -100 * d.center.y + "%)translate(" + (Ui.x * s + s) + "px," + (-Ui.y * o + o) + "px)", S.parentNode !== l && l.appendChild(S), d.onAfterRender(t, g, _);
17967
+ const y = d.element;
17968
+ y.style.transform = "translate(" + -100 * d.center.x + "%," + -100 * d.center.y + "%)translate(" + (Ui.x * s + s) + "px," + (-Ui.y * o + o) + "px)", y.parentNode !== l && l.appendChild(y), d.onAfterRender(t, g, _);
17969
17969
  }
17970
17970
  const p = {
17971
17971
  distanceToCameraSquared: u(_, d)
@@ -17988,8 +17988,8 @@ class zy {
17988
17988
  const g = h(d).sort(function(m, p) {
17989
17989
  if (m.renderOrder !== p.renderOrder)
17990
17990
  return p.renderOrder - m.renderOrder;
17991
- const S = a.objects.get(m).distanceToCameraSquared, v = a.objects.get(p).distanceToCameraSquared;
17992
- return S - v;
17991
+ const y = a.objects.get(m).distanceToCameraSquared, v = a.objects.get(p).distanceToCameraSquared;
17992
+ return y - v;
17993
17993
  }), _ = g.length;
17994
17994
  for (let m = 0, p = g.length; m < p; m++)
17995
17995
  g[m].element.style.zIndex = _ - m;
@@ -18617,8 +18617,8 @@ function ky(n, e, t) {
18617
18617
  Mt.applyMatrix4(i), Et.applyMatrix4(i), Mt.multiplyScalar(1 / Mt.w), Et.multiplyScalar(1 / Et.w), Mt.x *= s.x / 2, Mt.y *= s.y / 2, Et.x *= s.x / 2, Et.y *= s.y / 2, bt.start.copy(Mt), bt.start.z = 0, bt.end.copy(Et), bt.end.z = 0;
18618
18618
  const _ = bt.closestPointToPointParameter(ko, !0);
18619
18619
  bt.at(_, mu);
18620
- const m = ph.lerp(Mt.z, Et.z, _), p = m >= -1 && m <= 1, S = ko.distanceTo(mu) < ui * 0.5;
18621
- if (p && S) {
18620
+ const m = ph.lerp(Mt.z, Et.z, _), p = m >= -1 && m <= 1, y = ko.distanceTo(mu) < ui * 0.5;
18621
+ if (p && y) {
18622
18622
  bt.start.fromBufferAttribute(l, f), bt.end.fromBufferAttribute(c, f), bt.start.applyMatrix4(o), bt.end.applyMatrix4(o);
18623
18623
  const v = new D(), M = new D();
18624
18624
  dn.distanceSqToSegment(bt.start, bt.end, M, v), t.push({
@@ -18912,7 +18912,7 @@ function Xh(n, e, t, i, r) {
18912
18912
  var s = [], o = [], a, l;
18913
18913
  if (n.forEach(function(g) {
18914
18914
  if (!((_ = g.length - 1) <= 0)) {
18915
- var _, m = g[0], p = g[_], S;
18915
+ var _, m = g[0], p = g[_], y;
18916
18916
  if (Ms(m, p)) {
18917
18917
  if (!m[2] && !p[2]) {
18918
18918
  for (r.lineStart(), a = 0; a < _; ++a)
@@ -18922,7 +18922,7 @@ function Xh(n, e, t, i, r) {
18922
18922
  }
18923
18923
  p[0] += 2 * Qe;
18924
18924
  }
18925
- s.push(S = new vs(m, g, null, !0)), o.push(S.o = new vs(m, null, S, !1)), s.push(S = new vs(p, g, null, !1)), o.push(S.o = new vs(p, null, S, !0));
18925
+ s.push(y = new vs(m, g, null, !0)), o.push(y.o = new vs(m, null, y, !1)), s.push(y = new vs(p, g, null, !1)), o.push(y.o = new vs(p, null, y, !0));
18926
18926
  }
18927
18927
  }), !!s.length) {
18928
18928
  for (o.sort(e), Tu(s), Tu(o), a = 0, l = o.length; a < l; ++a)
@@ -18969,8 +18969,8 @@ function tS(n, e) {
18969
18969
  r === 1 ? i = Nt + Qe : r === -1 && (i = -Nt - Qe);
18970
18970
  for (var c = 0, u = n.length; c < u; ++c)
18971
18971
  if (f = (h = n[c]).length)
18972
- for (var h, f, d = h[f - 1], g = Wo(d), _ = d[1] / 2 + _u, m = ht(_), p = ut(_), S = 0; S < f; ++S, g = M, m = R, p = w, d = v) {
18973
- var v = h[S], M = Wo(v), b = v[1] / 2 + _u, R = ht(b), w = ut(b), N = M - g, x = N >= 0 ? 1 : -1, E = x * N, F = E > Xe, ee = m * R;
18972
+ for (var h, f, d = h[f - 1], g = Wo(d), _ = d[1] / 2 + _u, m = ht(_), p = ut(_), y = 0; y < f; ++y, g = M, m = R, p = w, d = v) {
18973
+ var v = h[y], M = Wo(v), b = v[1] / 2 + _u, R = ht(b), w = ut(b), N = M - g, x = N >= 0 ? 1 : -1, E = x * N, F = E > Xe, ee = m * R;
18974
18974
  if (l.add(wr(ee * x * ht(E), p * w + ee * ut(E))), o += F ? N + x * Kt : N, F ^ g >= t ^ M >= t) {
18975
18975
  var O = Os(qi(d), qi(v));
18976
18976
  ma(O);
@@ -18989,7 +18989,7 @@ function $h(n, e, t, i) {
18989
18989
  lineStart: _,
18990
18990
  lineEnd: m,
18991
18991
  polygonStart: function() {
18992
- f.point = p, f.lineStart = S, f.lineEnd = v, u = [], c = [];
18992
+ f.point = p, f.lineStart = y, f.lineEnd = v, u = [], c = [];
18993
18993
  },
18994
18994
  polygonEnd: function() {
18995
18995
  f.point = d, f.lineStart = _, f.lineEnd = m, u = kh(u);
@@ -19015,7 +19015,7 @@ function $h(n, e, t, i) {
19015
19015
  function p(M, b) {
19016
19016
  h.push([M, b]), a.point(M, b);
19017
19017
  }
19018
- function S() {
19018
+ function y() {
19019
19019
  a.lineStart(), h = [];
19020
19020
  }
19021
19021
  function v() {
@@ -19097,14 +19097,14 @@ function aS(n) {
19097
19097
  g = d = !1, _ = 1;
19098
19098
  },
19099
19099
  point: function(m, p) {
19100
- var S = [m, p], v, M = o(m, p), b = i ? M ? 0 : c(m, p) : M ? c(m + (m < 0 ? Xe : -Xe), p) : 0;
19101
- if (!h && (g = d = M) && u.lineStart(), M !== d && (v = l(h, S), (!v || Ms(h, v) || Ms(S, v)) && (S[2] = 1)), M !== d)
19102
- _ = 0, M ? (u.lineStart(), v = l(S, h), u.point(v[0], v[1])) : (v = l(h, S), u.point(v[0], v[1], 2), u.lineEnd()), h = v;
19100
+ var y = [m, p], v, M = o(m, p), b = i ? M ? 0 : c(m, p) : M ? c(m + (m < 0 ? Xe : -Xe), p) : 0;
19101
+ if (!h && (g = d = M) && u.lineStart(), M !== d && (v = l(h, y), (!v || Ms(h, v) || Ms(y, v)) && (y[2] = 1)), M !== d)
19102
+ _ = 0, M ? (u.lineStart(), v = l(y, h), u.point(v[0], v[1])) : (v = l(h, y), u.point(v[0], v[1], 2), u.lineEnd()), h = v;
19103
19103
  else if (r && h && i ^ M) {
19104
19104
  var R;
19105
- !(b & f) && (R = l(S, h, !0)) && (_ = 0, i ? (u.lineStart(), u.point(R[0][0], R[0][1]), u.point(R[1][0], R[1][1]), u.lineEnd()) : (u.point(R[1][0], R[1][1]), u.lineEnd(), u.lineStart(), u.point(R[0][0], R[0][1], 3)));
19105
+ !(b & f) && (R = l(y, h, !0)) && (_ = 0, i ? (u.lineStart(), u.point(R[0][0], R[0][1]), u.point(R[1][0], R[1][1]), u.lineEnd()) : (u.point(R[1][0], R[1][1]), u.lineEnd(), u.lineStart(), u.point(R[0][0], R[0][1], 3)));
19106
19106
  }
19107
- M && (!h || !Ms(h, S)) && u.point(S[0], S[1]), h = S, d = M, f = b;
19107
+ M && (!h || !Ms(h, y)) && u.point(y[0], y[1]), h = y, d = M, f = b;
19108
19108
  },
19109
19109
  lineEnd: function() {
19110
19110
  d && u.lineEnd(), h = null;
@@ -19117,10 +19117,10 @@ function aS(n) {
19117
19117
  };
19118
19118
  }
19119
19119
  function l(u, h, f) {
19120
- var d = qi(u), g = qi(h), _ = [1, 0, 0], m = Os(d, g), p = gs(m, m), S = m[0], v = p - S * S;
19120
+ var d = qi(u), g = qi(h), _ = [1, 0, 0], m = Os(d, g), p = gs(m, m), y = m[0], v = p - y * y;
19121
19121
  if (!v)
19122
19122
  return !f && u;
19123
- var M = e * p / v, b = -e * S / v, R = Os(_, m), w = _s(_, M), N = _s(m, b);
19123
+ var M = e * p / v, b = -e * y / v, R = Os(_, m), w = _s(_, M), N = _s(m, b);
19124
19124
  Vo(w, N);
19125
19125
  var x = R, E = gs(w, x), F = gs(x, x), ee = E * E - F * (gs(w, w) - 1);
19126
19126
  if (!(ee < 0)) {
@@ -19215,7 +19215,7 @@ function cS(n, e, t, i) {
19215
19215
  return h !== f ? h - f : h === 0 ? u[1] - c[1] : h === 1 ? c[0] - u[0] : h === 2 ? c[1] - u[1] : u[0] - c[0];
19216
19216
  }
19217
19217
  return function(c) {
19218
- var u = c, h = Wh(), f, d, g, _, m, p, S, v, M, b, R, w = {
19218
+ var u = c, h = Wh(), f, d, g, _, m, p, y, v, M, b, R, w = {
19219
19219
  point: N,
19220
19220
  lineStart: ee,
19221
19221
  lineEnd: O,
@@ -19239,7 +19239,7 @@ function cS(n, e, t, i) {
19239
19239
  (z || H) && (c.polygonStart(), z && (c.lineStart(), s(null, null, 1, c), c.lineEnd()), H && Xh(f, a, C, s, c), c.polygonEnd()), u = c, f = d = g = null;
19240
19240
  }
19241
19241
  function ee() {
19242
- w.point = U, d && d.push(g = []), b = !0, M = !1, S = v = NaN;
19242
+ w.point = U, d && d.push(g = []), b = !0, M = !1, y = v = NaN;
19243
19243
  }
19244
19244
  function O() {
19245
19245
  f && (U(_, m), p && M && h.rejoin(), f.push(h.result())), w.point = N, M && u.lineEnd();
@@ -19251,10 +19251,10 @@ function cS(n, e, t, i) {
19251
19251
  else if (H && M)
19252
19252
  u.point(C, z);
19253
19253
  else {
19254
- var V = [S = Math.max(xs, Math.min(ur, S)), v = Math.max(xs, Math.min(ur, v))], K = [C = Math.max(xs, Math.min(ur, C)), z = Math.max(xs, Math.min(ur, z))];
19254
+ var V = [y = Math.max(xs, Math.min(ur, y)), v = Math.max(xs, Math.min(ur, v))], K = [C = Math.max(xs, Math.min(ur, C)), z = Math.max(xs, Math.min(ur, z))];
19255
19255
  lS(V, K, n, e, t, i) ? (M || (u.lineStart(), u.point(V[0], V[1])), u.point(K[0], K[1]), H || u.lineEnd(), R = !1) : H && (u.lineStart(), u.point(C, z), R = !1);
19256
19256
  }
19257
- S = C, v = z, M = H;
19257
+ y = C, v = z, M = H;
19258
19258
  }
19259
19259
  return w;
19260
19260
  };
@@ -19332,7 +19332,7 @@ function pS(n, e, t) {
19332
19332
  }, t);
19333
19333
  }
19334
19334
  var Ru = 16, mS = ut(30 * mt);
19335
- function Pu(n, e) {
19335
+ function Lu(n, e) {
19336
19336
  return +e ? _S(n, e) : gS(n);
19337
19337
  }
19338
19338
  function gS(n) {
@@ -19344,28 +19344,28 @@ function gS(n) {
19344
19344
  }
19345
19345
  function _S(n, e) {
19346
19346
  function t(i, r, s, o, a, l, c, u, h, f, d, g, _, m) {
19347
- var p = c - i, S = u - r, v = p * p + S * S;
19347
+ var p = c - i, y = u - r, v = p * p + y * y;
19348
19348
  if (v > 4 * e && _--) {
19349
- var M = o + f, b = a + d, R = l + g, w = qs(M * M + b * b + R * R), N = Ar(R /= w), x = lt(lt(R) - 1) < Qe || lt(s - h) < Qe ? (s + h) / 2 : wr(b, M), E = n(x, N), F = E[0], ee = E[1], O = F - i, U = ee - r, C = S * O - p * U;
19350
- (C * C / v > e || lt((p * O + S * U) / v - 0.5) > 0.3 || o * f + a * d + l * g < mS) && (t(i, r, s, o, a, l, F, ee, x, M /= w, b /= w, R, _, m), m.point(F, ee), t(F, ee, x, M, b, R, c, u, h, f, d, g, _, m));
19349
+ var M = o + f, b = a + d, R = l + g, w = qs(M * M + b * b + R * R), N = Ar(R /= w), x = lt(lt(R) - 1) < Qe || lt(s - h) < Qe ? (s + h) / 2 : wr(b, M), E = n(x, N), F = E[0], ee = E[1], O = F - i, U = ee - r, C = y * O - p * U;
19350
+ (C * C / v > e || lt((p * O + y * U) / v - 0.5) > 0.3 || o * f + a * d + l * g < mS) && (t(i, r, s, o, a, l, F, ee, x, M /= w, b /= w, R, _, m), m.point(F, ee), t(F, ee, x, M, b, R, c, u, h, f, d, g, _, m));
19351
19351
  }
19352
19352
  }
19353
19353
  return function(i) {
19354
19354
  var r, s, o, a, l, c, u, h, f, d, g, _, m = {
19355
19355
  point: p,
19356
- lineStart: S,
19356
+ lineStart: y,
19357
19357
  lineEnd: M,
19358
19358
  polygonStart: function() {
19359
19359
  i.polygonStart(), m.lineStart = b;
19360
19360
  },
19361
19361
  polygonEnd: function() {
19362
- i.polygonEnd(), m.lineStart = S;
19362
+ i.polygonEnd(), m.lineStart = y;
19363
19363
  }
19364
19364
  };
19365
19365
  function p(N, x) {
19366
19366
  N = n(N, x), i.point(N[0], N[1]);
19367
19367
  }
19368
- function S() {
19368
+ function y() {
19369
19369
  h = NaN, m.point = v, i.lineStart();
19370
19370
  }
19371
19371
  function v(N, x) {
@@ -19376,7 +19376,7 @@ function _S(n, e) {
19376
19376
  m.point = p, i.lineEnd();
19377
19377
  }
19378
19378
  function b() {
19379
- S(), m.point = R, m.lineEnd = w;
19379
+ y(), m.point = R, m.lineEnd = w;
19380
19380
  }
19381
19381
  function R(N, x) {
19382
19382
  v(r = N, x), s = h, o = f, a = d, l = g, c = _, m.point = v;
@@ -19408,7 +19408,7 @@ function yS(n, e, t, i, r) {
19408
19408
  return [(o - e) / n * i, (t - a) / n * r];
19409
19409
  }, s;
19410
19410
  }
19411
- function Lu(n, e, t, i, r, s) {
19411
+ function Pu(n, e, t, i, r, s) {
19412
19412
  if (!s)
19413
19413
  return yS(n, e, t, i, r);
19414
19414
  var o = ut(s), a = ht(s), l = o * n, c = a * n, u = o / n, h = a / n, f = (a * t - o * e) / n, d = (a * e + o * t) / n;
@@ -19425,7 +19425,7 @@ function SS(n) {
19425
19425
  })();
19426
19426
  }
19427
19427
  function MS(n) {
19428
- var e, t = 150, i = 480, r = 250, s = 0, o = 0, a = 0, l = 0, c = 0, u, h = 0, f = 1, d = 1, g = null, _ = wu, m = null, p, S, v, M = Au, b = 0.5, R, w, N, x, E;
19428
+ var e, t = 150, i = 480, r = 250, s = 0, o = 0, a = 0, l = 0, c = 0, u, h = 0, f = 1, d = 1, g = null, _ = wu, m = null, p, y, v, M = Au, b = 0.5, R, w, N, x, E;
19429
19429
  function F(C) {
19430
19430
  return N(C[0] * mt, C[1] * mt);
19431
19431
  }
@@ -19437,11 +19437,11 @@ function MS(n) {
19437
19437
  }, F.preclip = function(C) {
19438
19438
  return arguments.length ? (_ = C, g = void 0, U()) : _;
19439
19439
  }, F.postclip = function(C) {
19440
- return arguments.length ? (M = C, m = p = S = v = null, U()) : M;
19440
+ return arguments.length ? (M = C, m = p = y = v = null, U()) : M;
19441
19441
  }, F.clipAngle = function(C) {
19442
19442
  return arguments.length ? (_ = +C ? aS(g = C * mt) : (g = null, wu), U()) : g * Gt;
19443
19443
  }, F.clipExtent = function(C) {
19444
- return arguments.length ? (M = C == null ? (m = p = S = v = null, Au) : cS(m = +C[0][0], p = +C[0][1], S = +C[1][0], v = +C[1][1]), U()) : m == null ? null : [[m, p], [S, v]];
19444
+ return arguments.length ? (M = C == null ? (m = p = y = v = null, Au) : cS(m = +C[0][0], p = +C[0][1], y = +C[1][0], v = +C[1][1]), U()) : m == null ? null : [[m, p], [y, v]];
19445
19445
  }, F.scale = function(C) {
19446
19446
  return arguments.length ? (t = +C, O()) : t;
19447
19447
  }, F.translate = function(C) {
@@ -19457,7 +19457,7 @@ function MS(n) {
19457
19457
  }, F.reflectY = function(C) {
19458
19458
  return arguments.length ? (d = C ? -1 : 1, O()) : d < 0;
19459
19459
  }, F.precision = function(C) {
19460
- return arguments.length ? (R = Pu(w, b = C * C), U()) : qs(b);
19460
+ return arguments.length ? (R = Lu(w, b = C * C), U()) : qs(b);
19461
19461
  }, F.fitExtent = function(C, z) {
19462
19462
  return qh(F, C, z);
19463
19463
  }, F.fitSize = function(C, z) {
@@ -19468,8 +19468,8 @@ function MS(n) {
19468
19468
  return pS(F, C, z);
19469
19469
  };
19470
19470
  function O() {
19471
- var C = Lu(t, 0, 0, f, d, h).apply(null, e(s, o)), z = Lu(t, i - C[0], r - C[1], f, d, h);
19472
- return u = Vh(a, l, c), w = ga(e, z), N = ga(u, w), R = Pu(w, b), U();
19471
+ var C = Pu(t, 0, 0, f, d, h).apply(null, e(s, o)), z = Pu(t, i - C[0], r - C[1], f, d, h);
19472
+ return u = Vh(a, l, c), w = ga(e, z), N = ga(u, w), R = Lu(w, b), U();
19473
19473
  }
19474
19474
  function U() {
19475
19475
  return x = E = null, F;
@@ -19566,7 +19566,7 @@ const AS = Ys("string"), Yt = Ys("function"), Kh = Ys("number"), Ks = (n) => n !
19566
19566
  return !1;
19567
19567
  const e = $a(n);
19568
19568
  return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in n) && !(Symbol.iterator in n);
19569
- }, RS = xn("Date"), PS = xn("File"), LS = xn("Blob"), DS = xn("FileList"), IS = (n) => Ks(n) && Yt(n.pipe), US = (n) => {
19569
+ }, RS = xn("Date"), LS = xn("File"), PS = xn("Blob"), DS = xn("FileList"), IS = (n) => Ks(n) && Yt(n.pipe), US = (n) => {
19570
19570
  let e;
19571
19571
  return n && (typeof FormData == "function" && n instanceof FormData || Yt(n.append) && ((e = js(n)) === "formdata" || // detect form-data instance
19572
19572
  e === "object" && Yt(n.toString) && n.toString() === "[object FormData]"));
@@ -19728,8 +19728,8 @@ const tM = (n) => {
19728
19728
  isPlainObject: Es,
19729
19729
  isUndefined: Rr,
19730
19730
  isDate: RS,
19731
- isFile: PS,
19732
- isBlob: LS,
19731
+ isFile: LS,
19732
+ isBlob: PS,
19733
19733
  isRegExp: jS,
19734
19734
  isFunction: Yt,
19735
19735
  isStream: IS,
@@ -19884,14 +19884,14 @@ function Zs(n, e, t) {
19884
19884
  if (!Z.isUndefined(g)) {
19885
19885
  if (h.indexOf(g) !== -1)
19886
19886
  throw Error("Circular reference detected in " + _.join("."));
19887
- h.push(g), Z.forEach(g, function(p, S) {
19887
+ h.push(g), Z.forEach(g, function(p, y) {
19888
19888
  (!(Z.isUndefined(p) || p === null) && r.call(
19889
19889
  e,
19890
19890
  p,
19891
- Z.isString(S) ? S.trim() : S,
19891
+ Z.isString(y) ? y.trim() : y,
19892
19892
  _,
19893
19893
  f
19894
- )) === !0 && d(p, _ ? _.concat(S) : [S]);
19894
+ )) === !0 && d(p, _ ? _.concat(y) : [y]);
19895
19895
  }), h.pop();
19896
19896
  }
19897
19897
  }
@@ -20412,7 +20412,7 @@ function RM(n) {
20412
20412
  const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(n);
20413
20413
  return e && e[1] || "";
20414
20414
  }
20415
- function PM(n, e) {
20415
+ function LM(n, e) {
20416
20416
  n = n || 10;
20417
20417
  const t = new Array(n), i = new Array(n);
20418
20418
  let r = 0, s = 0, o;
@@ -20430,7 +20430,7 @@ function PM(n, e) {
20430
20430
  }
20431
20431
  function zu(n, e) {
20432
20432
  let t = 0;
20433
- const i = PM(50, 250);
20433
+ const i = LM(50, 250);
20434
20434
  return (r) => {
20435
20435
  const s = r.loaded, o = r.lengthComputable ? r.total : void 0, a = s - t, l = i(a), c = s <= o;
20436
20436
  t = s;
@@ -20446,7 +20446,7 @@ function zu(n, e) {
20446
20446
  u[e ? "download" : "upload"] = !0, n(u);
20447
20447
  };
20448
20448
  }
20449
- const LM = typeof XMLHttpRequest != "undefined", DM = LM && function(n) {
20449
+ const PM = typeof XMLHttpRequest != "undefined", DM = PM && function(n) {
20450
20450
  return new Promise(function(t, i) {
20451
20451
  let r = n.data;
20452
20452
  const s = Dn.from(n.headers).normalize(), o = n.responseType;
@@ -21158,7 +21158,7 @@ const ys = vr.track.bind(vr), kM = bf.extend({
21158
21158
  },
21159
21159
  // 创建地图
21160
21160
  create() {
21161
- this.scene = new jx(), this.camera = new Vt(30, this.size.width / this.size.height, 0.1, 1e3), this.camera.setFocalLength(120), this.camera.position.set(0, -80, 130), this.camera.lookAt(0, 0, 0), this.renderer = new Ph({ antialias: !0 }), this.renderer.setClearColor(16777215, 0), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.setSize(this.size.width, this.size.height), this.canvasDom.appendChild(this.renderer.domElement), this.render2DInfo(), this.handleRaycaster(), this.renderer.render(this.scene, this.camera), this.controller = new By(this.camera, this.infoRender.domElement), this.controller.enableRotate = !1, this.controller.minDistance = 20, this.controller.maxDistance = 300, this.baseScale = this.controller.getDistance(), this.wheelScale = this.baseScale, this.controller.mouseButtons = {
21161
+ this.scene = new jx(), this.camera = new Vt(30, this.size.width / this.size.height, 0.1, 1e3), this.camera.setFocalLength(120), this.camera.position.set(0, -80, 130), this.camera.lookAt(0, 0, 0), this.renderer = new Lh({ antialias: !0 }), this.renderer.setClearColor(16777215, 0), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.setSize(this.size.width, this.size.height), this.canvasDom.appendChild(this.renderer.domElement), this.render2DInfo(), this.handleRaycaster(), this.renderer.render(this.scene, this.camera), this.controller = new By(this.camera, this.infoRender.domElement), this.controller.enableRotate = !1, this.controller.minDistance = 20, this.controller.maxDistance = 300, this.baseScale = this.controller.getDistance(), this.wheelScale = this.baseScale, this.controller.mouseButtons = {
21162
21162
  LEFT: zn.PAN,
21163
21163
  RIGHT: zn.ROTATE
21164
21164
  }, this.animate();
@@ -21187,8 +21187,8 @@ const ys = vr.track.bind(vr), kM = bf.extend({
21187
21187
  const c = new Nh();
21188
21188
  let u = [];
21189
21189
  for (let p = 0; p < o.length; p++) {
21190
- const [S, v] = l(o[p]);
21191
- (!isNaN(S) || !isNaN(v)) && (p === 0 && c.moveTo(S, -v), c.lineTo(S, -v), u.push(new D(S, -v, 0.85)));
21190
+ const [y, v] = l(o[p]);
21191
+ (!isNaN(y) || !isNaN(v)) && (p === 0 && c.moveTo(y, -v), c.lineTo(y, -v), u.push(new D(y, -v, 0.85)));
21192
21192
  }
21193
21193
  let h = a._hasData_ ? Bn.meshHasData : Bn.meshNoData;
21194
21194
  const f = new ka(c, { depth: 0.8, bevelEnabled: !1 }), d = new Ry({ color: h }), g = new Ia({ color: h }), _ = new pn(f, [d, g]);
@@ -21294,14 +21294,20 @@ const ys = vr.track.bind(vr), kM = bf.extend({
21294
21294
  u.textContent = o.name, u.style.cssText = `color:#fff;border:1px solid #78f0fe;padding:${this.baseRem * 3}px ${this.baseRem * 5}px;border-radius: 0 ${this.baseRem * 10}px;background:linear-gradient(180deg,#78f0fe,#005276);opacity:0.8;min-width:${this.baseRem * 50}px;text-align:center;`;
21295
21295
  const h = new Ho(u);
21296
21296
  h.position.set(a[0], -a[1] + this.mouseScale * 1, 1);
21297
- const f = document.createElement("div"), d = document.createElement("div"), g = document.createElement("span"), _ = document.createElement("p"), m = document.createElement("span"), p = document.createElement("p");
21298
- f.style.cssText = `background:#00023d;text-align:center;border:1px solid ${Vu[s.userData.activedType]};line-height:2;`, d.style.cssText = `color:#00023d;background:${Vu[s.userData.activedType]};overflow:hidden;position:relative;padding:0 ${this.baseRem * 16}px`, _.style.cssText = `min-width:${this.baseRem * 100}px;`, g.style.cssText = `position:absolute;left:0;top:0;display:inline-block;width:${this.baseRem * 16}px;height:${this.baseRem * 16}px;border-top:${this.baseRem * 5}px solid #00023d;transform:rotate(-45deg);`, m.style.cssText = `position:absolute;right:0;top:50%;display:inline-block;width:${this.baseRem * 12}px;height:${this.baseRem * 12}px;border-top:1px solid #00023d;border-right:1px solid #00023d;transform:rotate(45deg) scale(0.7) translate(-50%,-50%);margin-right:${this.baseRem * 5}px;cursor:pointer;`, p.style.cssText = `color:#fff;padding:${this.baseRem * 5}px ${this.baseRem * 10}px;`, _.textContent = s.userData.name, p.textContent = s.userData.text, d.append(g, _), this.areaObj.handle && d.append(m), f.append(d, p), m.dataset.adcode = o.adcode;
21299
- const S = new Ho(f);
21300
- S.name = "tips", S.position.set(a[0] + c[0], -a[1] + c[1], 1.5), S.element.addEventListener("pointerdown", this.handleTipsItemClick);
21297
+ const f = document.createElement("div");
21298
+ let d, g, _, m, p;
21299
+ if (f.style.cssText = `background:#00023d;text-align:center;border:1px solid ${Vu[s.userData.activedType]};line-height:2;`, s.userData.name) {
21300
+ g = document.createElement("p"), g.style.cssText = `min-width:${this.baseRem * 100}px;`, g.textContent = s.userData.name, _ = document.createElement("span"), _.style.cssText = `position:absolute;left:0;top:0;display:inline-block;width:${this.baseRem * 16}px;height:${this.baseRem * 16}px;border-top:${this.baseRem * 5}px solid #00023d;transform:rotate(-45deg);`, m = document.createElement("span");
21301
+ const N = document.createElement("span");
21302
+ N.style.cssText = `display:inline-block;width:${this.baseRem * 12}px;height:${this.baseRem * 12}px;border-top:1px solid #00023d;border-right:1px solid #00023d;transform:rotate(45deg) scale(0.7);`, m.style.cssText = `position:absolute;right:0;top:50%;display:inline-block;padding:${this.baseRem * 4}px;cursor:pointer;transform:translateY(-50%);line-height:1;`, m.append(N), m.dataset.adcode = o.adcode;
21303
+ }
21304
+ s.userData.text && (p = document.createElement("p"), p.style.cssText = `color:#fff;padding:${this.baseRem * 5}px ${this.baseRem * 10}px;`, p.textContent = s.userData.text), g && (d = document.createElement("div"), d.style.cssText = `color:#00023d;background:${Vu[s.userData.activedType]};overflow:hidden;position:relative;padding:0 ${this.baseRem * 16}px`, d.append(_, g), this.areaObj.handle && d.append(m)), d && f.append(d), p && f.append(p);
21305
+ const y = new Ho(f);
21306
+ y.name = "tips", y.userData = s.userData, y.position.set(a[0] + c[0], -a[1] + c[1], 1.5), y.element.addEventListener("pointerdown", this.handleTipsItemClick);
21301
21307
  let v = [];
21302
21308
  v.push(new D(a[0], -a[1], 1)), v.push(new D(a[0] + l[0], -a[1] + l[1], 1)), v.push(new D(a[0] + c[0], -a[1] + c[1], 1));
21303
21309
  const M = this.drawLine(v, "#ffda57");
21304
- this.tipsMesh.add(h), this.tipsMesh.add(S), this.tipsMesh.add(M);
21310
+ this.tipsMesh.add(h), this.tipsMesh.add(y), this.tipsMesh.add(M);
21305
21311
  const b = (w = (R = this.scene.children.find((N) => N.name === "map")) == null ? void 0 : R.children.find((N) => N.name === o.adcode)) == null ? void 0 : w.children;
21306
21312
  b == null || b.forEach((N) => {
21307
21313
  N.name === o.adcode && this.activeMesh.push(N);
@@ -21320,10 +21326,13 @@ const ys = vr.track.bind(vr), kM = bf.extend({
21320
21326
  // 小弹窗点击事件
21321
21327
  handleTipsItemClick(n) {
21322
21328
  const e = parseInt(n.target.dataset.adcode);
21323
- if (!e)
21324
- return;
21325
- const t = this.tipsData.find((i) => i.code === e);
21326
- this.$emit("clickTips", t);
21329
+ if (e) {
21330
+ const t = this.tipsData.find((i) => i.code === e);
21331
+ this.$emit("clickTipsArrow", t);
21332
+ } else {
21333
+ const i = this.tipsMesh.children.filter((r) => r.name === "tips").find((r) => r.element.contains(n.target));
21334
+ i && this.$emit("clickTips", i.userData);
21335
+ }
21327
21336
  },
21328
21337
  // 交互相关
21329
21338
  handleRaycaster() {
@@ -21369,7 +21378,7 @@ var WM = /* @__PURE__ */ Tt(
21369
21378
  VM,
21370
21379
  !1,
21371
21380
  XM,
21372
- "18652e1a",
21381
+ "20fe4c42",
21373
21382
  null,
21374
21383
  null
21375
21384
  );