hanc-webrtc-widgets 2.6.20 → 2.7.2

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.
@@ -75,7 +75,7 @@ const { is: vc, defineProperty: Jc, getOwnPropertyDescriptor: Yc, getOwnProperty
75
75
  return e;
76
76
  } }, Pn = (g, A) => !vc(g, A), vs = { attribute: !0, type: String, converter: lo, reflect: !1, hasChanged: Pn };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), ai.litPropertyMetadata ?? (ai.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- let oI = class extends HTMLElement {
78
+ let aI = class extends HTMLElement {
79
79
  static addInitializer(A) {
80
80
  this._$Ei(), (this.l ?? (this.l = [])).push(A);
81
81
  }
@@ -273,7 +273,7 @@ let oI = class extends HTMLElement {
273
273
  firstUpdated(A) {
274
274
  }
275
275
  };
276
- oI.elementStyles = [], oI.shadowRootOptions = { mode: "open" }, oI[$I("elementProperties")] = /* @__PURE__ */ new Map(), oI[$I("finalized")] = /* @__PURE__ */ new Map(), Qa == null || Qa({ ReactiveElement: oI }), (ai.reactiveElementVersions ?? (ai.reactiveElementVersions = [])).push("2.0.4");
276
+ aI.elementStyles = [], aI.shadowRootOptions = { mode: "open" }, aI[$I("elementProperties")] = /* @__PURE__ */ new Map(), aI[$I("finalized")] = /* @__PURE__ */ new Map(), Qa == null || Qa({ ReactiveElement: aI }), (ai.reactiveElementVersions ?? (ai.reactiveElementVersions = [])).push("2.0.4");
277
277
  /**
278
278
  * @license
279
279
  * Copyright 2017 Google LLC
@@ -281,7 +281,7 @@ oI.elementStyles = [], oI.shadowRootOptions = { mode: "open" }, oI[$I("elementPr
281
281
  */
282
282
  const AC = globalThis, fo = AC.trustedTypes, Js = fo ? fo.createPolicy("lit-html", { createHTML: (g) => g }) : void 0, XE = "$lit$", ti = `lit$${Math.random().toFixed(9).slice(2)}$`, ZE = "?" + ti, Oc = `<${ZE}>`, Fi = document, CC = () => Fi.createComment(""), oC = (g) => g === null || typeof g != "object" && typeof g != "function", On = Array.isArray, Vc = (g) => On(g) || typeof (g == null ? void 0 : g[Symbol.iterator]) == "function", na = `[
283
283
  \f\r]`, MI = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ys = /-->/g, Ts = />/g, xi = RegExp(`>|${na}(?:([^\\s"'>=/]+)(${na}*=${na}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), qs = /'/g, Hs = /"/g, zE = /^(?:script|style|textarea|title)$/i, jc = (g) => (A, ...e) => ({ _$litType$: g, strings: A, values: e }), ee = jc(1), lI = Symbol.for("lit-noChange"), Me = Symbol.for("lit-nothing"), Ps = /* @__PURE__ */ new WeakMap(), ki = Fi.createTreeWalker(Fi, 129);
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), qs = /'/g, Hs = /"/g, zE = /^(?:script|style|textarea|title)$/i, jc = (g) => (A, ...e) => ({ _$litType$: g, strings: A, values: e }), ee = jc(1), fI = Symbol.for("lit-noChange"), Me = Symbol.for("lit-nothing"), Ps = /* @__PURE__ */ new WeakMap(), ki = Fi.createTreeWalker(Fi, 129);
285
285
  function $E(g, A) {
286
286
  if (!On(g) || !g.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
287
  return Js !== void 0 ? Js.createHTML(A) : A;
@@ -335,12 +335,12 @@ class aC {
335
335
  return t.innerHTML = A, t;
336
336
  }
337
337
  }
338
- function fI(g, A, e = g, t) {
338
+ function uI(g, A, e = g, t) {
339
339
  var C, o;
340
- if (A === lI) return A;
340
+ if (A === fI) return A;
341
341
  let i = t !== void 0 ? (C = e._$Co) == null ? void 0 : C[t] : e._$Cl;
342
342
  const I = oC(A) ? void 0 : A._$litDirective$;
343
- return (i == null ? void 0 : i.constructor) !== I && ((o = i == null ? void 0 : i._$AO) == null || o.call(i, !1), I === void 0 ? i = void 0 : (i = new I(g), i._$AT(g, e, t)), t !== void 0 ? (e._$Co ?? (e._$Co = []))[t] = i : e._$Cl = i), i !== void 0 && (A = fI(g, i._$AS(g, A.values), i, t)), A;
343
+ return (i == null ? void 0 : i.constructor) !== I && ((o = i == null ? void 0 : i._$AO) == null || o.call(i, !1), I === void 0 ? i = void 0 : (i = new I(g), i._$AT(g, e, t)), t !== void 0 ? (e._$Co ?? (e._$Co = []))[t] = i : e._$Cl = i), i !== void 0 && (A = uI(g, i._$AS(g, A.values), i, t)), A;
344
344
  }
345
345
  let Xc = class {
346
346
  constructor(A, e) {
@@ -390,7 +390,7 @@ class xC {
390
390
  return this._$AB;
391
391
  }
392
392
  _$AI(A, e = this) {
393
- A = fI(this, A, e), oC(A) ? A === Me || A == null || A === "" ? (this._$AH !== Me && this._$AR(), this._$AH = Me) : A !== this._$AH && A !== lI && this._(A) : A._$litType$ !== void 0 ? this.$(A) : A.nodeType !== void 0 ? this.T(A) : Vc(A) ? this.k(A) : this._(A);
393
+ A = uI(this, A, e), oC(A) ? A === Me || A == null || A === "" ? (this._$AH !== Me && this._$AR(), this._$AH = Me) : A !== this._$AH && A !== fI && this._(A) : A._$litType$ !== void 0 ? this.$(A) : A.nodeType !== void 0 ? this.T(A) : Vc(A) ? this.k(A) : this._(A);
394
394
  }
395
395
  O(A) {
396
396
  return this._$AA.parentNode.insertBefore(A, this._$AB);
@@ -446,11 +446,11 @@ let Lo = class {
446
446
  _$AI(A, e = this, t, i) {
447
447
  const I = this.strings;
448
448
  let C = !1;
449
- if (I === void 0) A = fI(this, A, e, 0), C = !oC(A) || A !== this._$AH && A !== lI, C && (this._$AH = A);
449
+ if (I === void 0) A = uI(this, A, e, 0), C = !oC(A) || A !== this._$AH && A !== fI, C && (this._$AH = A);
450
450
  else {
451
451
  const o = A;
452
452
  let a, Q;
453
- for (A = I[0], a = 0; a < I.length - 1; a++) Q = fI(this, o[t + a], e, a), Q === lI && (Q = this._$AH[a]), C || (C = !oC(Q) || Q !== this._$AH[a]), Q === Me ? A = Me : A !== Me && (A += (Q ?? "") + I[a + 1]), this._$AH[a] = Q;
453
+ for (A = I[0], a = 0; a < I.length - 1; a++) Q = uI(this, o[t + a], e, a), Q === fI && (Q = this._$AH[a]), C || (C = !oC(Q) || Q !== this._$AH[a]), Q === Me ? A = Me : A !== Me && (A += (Q ?? "") + I[a + 1]), this._$AH[a] = Q;
454
454
  }
455
455
  C && !i && this.j(A);
456
456
  }
@@ -478,7 +478,7 @@ class $c extends Lo {
478
478
  super(A, e, t, i, I), this.type = 5;
479
479
  }
480
480
  _$AI(A, e = this) {
481
- if ((A = fI(this, A, e, 0) ?? Me) === lI) return;
481
+ if ((A = uI(this, A, e, 0) ?? Me) === fI) return;
482
482
  const t = this._$AH, i = A === Me && t !== Me || A.capture !== t.capture || A.once !== t.once || A.passive !== t.passive, I = A !== Me && (t === Me || i);
483
483
  i && this.element.removeEventListener(this.name, this, t), I && this.element.addEventListener(this.name, this, A), this._$AH = A;
484
484
  }
@@ -495,7 +495,7 @@ class Ah {
495
495
  return this._$AM._$AU;
496
496
  }
497
497
  _$AI(A) {
498
- fI(this, A);
498
+ uI(this, A);
499
499
  }
500
500
  }
501
501
  const sa = AC.litHtmlPolyfillSupport;
@@ -514,7 +514,7 @@ const eh = (g, A, e) => {
514
514
  * Copyright 2017 Google LLC
515
515
  * SPDX-License-Identifier: BSD-3-Clause
516
516
  */
517
- let ng = class extends oI {
517
+ let ng = class extends aI {
518
518
  constructor() {
519
519
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
520
520
  }
@@ -536,7 +536,7 @@ let ng = class extends oI {
536
536
  super.disconnectedCallback(), (A = this._$Do) == null || A.setConnected(!1);
537
537
  }
538
538
  render() {
539
- return lI;
539
+ return fI;
540
540
  }
541
541
  };
542
542
  var jE;
@@ -591,7 +591,7 @@ function j(g) {
591
591
  * Copyright 2017 Google LLC
592
592
  * SPDX-License-Identifier: BSD-3-Clause
593
593
  */
594
- function Ce(g) {
594
+ function ge(g) {
595
595
  return j({ ...g, state: !0, attribute: !1 });
596
596
  }
597
597
  /**
@@ -1140,7 +1140,7 @@ function Pg(g, A, e) {
1140
1140
  }
1141
1141
  return !1;
1142
1142
  }
1143
- function uI(g, A) {
1143
+ function DI(g, A) {
1144
1144
  switch (g) {
1145
1145
  case AA.BOOL:
1146
1146
  return !1;
@@ -1514,7 +1514,7 @@ function Rh(g) {
1514
1514
  case "enum":
1515
1515
  return A.T.values[0].no;
1516
1516
  case "scalar":
1517
- return uI(A.T, A.L);
1517
+ return DI(A.T, A.L);
1518
1518
  case "message":
1519
1519
  const e = A.T, t = new e();
1520
1520
  return e.fieldWrapper ? e.fieldWrapper.unwrapField(t) : t;
@@ -1674,7 +1674,7 @@ function Xs(g, A) {
1674
1674
  A[e] = t ? g.T.values[0].no : void 0;
1675
1675
  break;
1676
1676
  case "scalar":
1677
- A[e] = t ? uI(g.T, g.L) : void 0;
1677
+ A[e] = t ? DI(g.T, g.L) : void 0;
1678
1678
  break;
1679
1679
  case "message":
1680
1680
  A[e] = void 0;
@@ -1913,7 +1913,7 @@ function vh(g, A) {
1913
1913
  }
1914
1914
  function tC(g, A, e, t) {
1915
1915
  if (A === null)
1916
- return t ? uI(g, e) : Do;
1916
+ return t ? DI(g, e) : Do;
1917
1917
  switch (g) {
1918
1918
  // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
1919
1919
  // Either numbers or strings are accepted. Exponent notation is also accepted.
@@ -2085,7 +2085,7 @@ function eo(g, A) {
2085
2085
  return Ke(A instanceof Uint8Array), nr.enc(A);
2086
2086
  }
2087
2087
  }
2088
- const Hi = Symbol("@bufbuild/protobuf/unknown-fields"), eB = {
2088
+ const Pi = Symbol("@bufbuild/protobuf/unknown-fields"), eB = {
2089
2089
  readUnknownFields: !0,
2090
2090
  readerFactory: (g) => new Sh(g)
2091
2091
  }, tB = {
@@ -2104,20 +2104,20 @@ function qh() {
2104
2104
  makeWriteOptions: Th,
2105
2105
  listUnknownFields(g) {
2106
2106
  var A;
2107
- return (A = g[Hi]) !== null && A !== void 0 ? A : [];
2107
+ return (A = g[Pi]) !== null && A !== void 0 ? A : [];
2108
2108
  },
2109
2109
  discardUnknownFields(g) {
2110
- delete g[Hi];
2110
+ delete g[Pi];
2111
2111
  },
2112
2112
  writeUnknownFields(g, A) {
2113
- const t = g[Hi];
2113
+ const t = g[Pi];
2114
2114
  if (t)
2115
2115
  for (const i of t)
2116
2116
  A.tag(i.no, i.wireType).raw(i.data);
2117
2117
  },
2118
2118
  onUnknownField(g, A, e, t) {
2119
2119
  const i = g;
2120
- Array.isArray(i[Hi]) || (i[Hi] = []), i[Hi].push({
2120
+ Array.isArray(i[Pi]) || (i[Pi] = []), i[Pi].push({
2121
2121
  no: A,
2122
2122
  wireType: e,
2123
2123
  data: t
@@ -2224,10 +2224,10 @@ function Hh(g, A, e) {
2224
2224
  break;
2225
2225
  }
2226
2226
  }
2227
- if (I === void 0 && (I = uI(g.K, si.BIGINT)), typeof I != "string" && typeof I != "number" && (I = I.toString()), C === void 0)
2227
+ if (I === void 0 && (I = DI(g.K, si.BIGINT)), typeof I != "string" && typeof I != "number" && (I = I.toString()), C === void 0)
2228
2228
  switch (g.V.kind) {
2229
2229
  case "scalar":
2230
- C = uI(g.V.T, si.BIGINT);
2230
+ C = DI(g.V.T, si.BIGINT);
2231
2231
  break;
2232
2232
  case "enum":
2233
2233
  C = g.V.T.values[0].no;
@@ -2699,7 +2699,7 @@ const Y = Wh(
2699
2699
  t[e] = {};
2700
2700
  break;
2701
2701
  case "scalar":
2702
- t[e] = uI(A.T, A.L);
2702
+ t[e] = DI(A.T, A.L);
2703
2703
  break;
2704
2704
  }
2705
2705
  }
@@ -3019,7 +3019,7 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
3019
3019
  }, {
3020
3020
  no: 15,
3021
3021
  name: "MEDIA_FAILURE"
3022
- }]), Pi = /* @__PURE__ */ Y.makeEnum("livekit.ReconnectReason", [{
3022
+ }]), Oi = /* @__PURE__ */ Y.makeEnum("livekit.ReconnectReason", [{
3023
3023
  no: 0,
3024
3024
  name: "RR_UNKNOWN"
3025
3025
  }, {
@@ -3229,12 +3229,12 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
3229
3229
  no: 3,
3230
3230
  name: "state",
3231
3231
  kind: "enum",
3232
- T: Y.getEnumType(sI)
3232
+ T: Y.getEnumType(BI)
3233
3233
  }, {
3234
3234
  no: 4,
3235
3235
  name: "tracks",
3236
3236
  kind: "message",
3237
- T: aI,
3237
+ T: QI,
3238
3238
  repeated: !0
3239
3239
  }, {
3240
3240
  no: 5,
@@ -3309,7 +3309,7 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
3309
3309
  kind: "enum",
3310
3310
  T: Y.getEnumType(sd),
3311
3311
  repeated: !0
3312
- }]), sI = /* @__PURE__ */ Y.makeEnum("livekit.ParticipantInfo.State", [{
3312
+ }]), BI = /* @__PURE__ */ Y.makeEnum("livekit.ParticipantInfo.State", [{
3313
3313
  no: 0,
3314
3314
  name: "JOINING"
3315
3315
  }, {
@@ -3375,7 +3375,7 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
3375
3375
  kind: "message",
3376
3376
  T: Mi,
3377
3377
  repeated: !0
3378
- }]), aI = /* @__PURE__ */ Y.makeMessageType("livekit.TrackInfo", () => [{
3378
+ }]), QI = /* @__PURE__ */ Y.makeMessageType("livekit.TrackInfo", () => [{
3379
3379
  no: 1,
3380
3380
  name: "sid",
3381
3381
  kind: "scalar",
@@ -3535,7 +3535,7 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
3535
3535
  no: 1,
3536
3536
  name: "kind",
3537
3537
  kind: "enum",
3538
- T: Y.getEnumType(OA)
3538
+ T: Y.getEnumType(VA)
3539
3539
  }, {
3540
3540
  no: 4,
3541
3541
  name: "participant_identity",
@@ -3632,7 +3632,7 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
3632
3632
  kind: "scalar",
3633
3633
  T: 9
3634
3634
  /* ScalarType.STRING */
3635
- }]), OA = /* @__PURE__ */ Y.makeEnum("livekit.DataPacket.Kind", [{
3635
+ }]), VA = /* @__PURE__ */ Y.makeEnum("livekit.DataPacket.Kind", [{
3636
3636
  no: 0,
3637
3637
  name: "RELIABLE"
3638
3638
  }, {
@@ -4803,7 +4803,7 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
4803
4803
  no: 2,
4804
4804
  name: "track",
4805
4805
  kind: "message",
4806
- T: aI
4806
+ T: QI
4807
4807
  }]), Dd = /* @__PURE__ */ Y.makeMessageType("livekit.TrackUnpublishedResponse", () => [{
4808
4808
  no: 1,
4809
4809
  name: "track_sid",
@@ -4938,13 +4938,13 @@ const Id = /* @__PURE__ */ Y.makeMessageType("livekit.MetricsBatch", () => [{
4938
4938
  no: 3,
4939
4939
  name: "action",
4940
4940
  kind: "enum",
4941
- T: Y.getEnumType(BI)
4941
+ T: Y.getEnumType(EI)
4942
4942
  }, {
4943
4943
  no: 4,
4944
4944
  name: "regions",
4945
4945
  kind: "message",
4946
4946
  T: Ud
4947
- }]), BI = /* @__PURE__ */ Y.makeEnum("livekit.LeaveRequest.Action", [{
4947
+ }]), EI = /* @__PURE__ */ Y.makeEnum("livekit.LeaveRequest.Action", [{
4948
4948
  no: 0,
4949
4949
  name: "DISCONNECT"
4950
4950
  }, {
@@ -5843,7 +5843,7 @@ function WI(g, A, e) {
5843
5843
  const t = g.match(A);
5844
5844
  return t && t.length >= e && parseFloat(t[e], 10);
5845
5845
  }
5846
- function Ti(g, A, e) {
5846
+ function qi(g, A, e) {
5847
5847
  if (!g.RTCPeerConnection)
5848
5848
  return;
5849
5849
  const t = g.RTCPeerConnection.prototype, i = t.addEventListener;
@@ -6091,7 +6091,7 @@ function zr(g) {
6091
6091
  }, this.addEventListener("addstream", this._ontrackpoly)), A.apply(this, arguments);
6092
6092
  };
6093
6093
  } else
6094
- Ti(g, "track", (A) => (A.transceiver || Object.defineProperty(A, "transceiver", {
6094
+ qi(g, "track", (A) => (A.transceiver || Object.defineProperty(A, "transceiver", {
6095
6095
  value: {
6096
6096
  receiver: A.receiver
6097
6097
  }
@@ -6178,7 +6178,7 @@ function A0(g) {
6178
6178
  e && (g.RTCPeerConnection.prototype.getReceivers = function() {
6179
6179
  const i = e.apply(this, []);
6180
6180
  return i.forEach((I) => I._pc = this), i;
6181
- }), Ti(g, "track", (t) => (t.receiver._pc = t.srcElement, t)), g.RTCRtpReceiver.prototype.getStats = function() {
6181
+ }), qi(g, "track", (t) => (t.receiver._pc = t.srcElement, t)), g.RTCRtpReceiver.prototype.getStats = function() {
6182
6182
  const i = this;
6183
6183
  return this._pc.getStats().then((I) => BB(I, i.track, !1));
6184
6184
  };
@@ -6345,7 +6345,7 @@ function DQ(g, A) {
6345
6345
  });
6346
6346
  }
6347
6347
  function g0(g, A) {
6348
- Ti(g, "negotiationneeded", (e) => {
6348
+ qi(g, "negotiationneeded", (e) => {
6349
6349
  const t = e.target;
6350
6350
  if (!((A.version < 72 || t.getConfiguration && t.getConfiguration().sdpSemantics === "plan-b") && t.signalingState !== "stable"))
6351
6351
  return e;
@@ -6470,7 +6470,7 @@ function o0(g) {
6470
6470
  A && (g.RTCPeerConnection.prototype.getReceivers = function() {
6471
6471
  const t = A.apply(this, []);
6472
6472
  return t.forEach((i) => i._pc = this), t;
6473
- }), Ti(g, "track", (e) => (e.receiver._pc = e.srcElement, e)), g.RTCRtpReceiver.prototype.getStats = function() {
6473
+ }), qi(g, "track", (e) => (e.receiver._pc = e.srcElement, e)), g.RTCRtpReceiver.prototype.getStats = function() {
6474
6474
  return this._pc.getStats(this.track);
6475
6475
  };
6476
6476
  }
@@ -7094,9 +7094,9 @@ t=0 0\r
7094
7094
  }, g.exports = A;
7095
7095
  }(da)), da.exports;
7096
7096
  }
7097
- var _0 = $d(), EI = /* @__PURE__ */ Yd(_0), Ax = /* @__PURE__ */ Eh({
7097
+ var _0 = $d(), rI = /* @__PURE__ */ Yd(_0), Ax = /* @__PURE__ */ Eh({
7098
7098
  __proto__: null,
7099
- default: EI
7099
+ default: rI
7100
7100
  }, [_0]);
7101
7101
  function io(g) {
7102
7102
  if (!g.RTCIceCandidate || g.RTCIceCandidate && "foundation" in g.RTCIceCandidate.prototype)
@@ -7104,7 +7104,7 @@ function io(g) {
7104
7104
  const A = g.RTCIceCandidate;
7105
7105
  g.RTCIceCandidate = function(t) {
7106
7106
  if (typeof t == "object" && t.candidate && t.candidate.indexOf("a=") === 0 && (t = JSON.parse(JSON.stringify(t)), t.candidate = t.candidate.substring(2)), t.candidate && t.candidate.length) {
7107
- const i = new A(t), I = EI.parseCandidate(t.candidate);
7107
+ const i = new A(t), I = rI.parseCandidate(t.candidate);
7108
7108
  for (const C in I)
7109
7109
  C in i || Object.defineProperty(i, C, {
7110
7110
  value: I[C]
@@ -7119,15 +7119,15 @@ function io(g) {
7119
7119
  }, i;
7120
7120
  }
7121
7121
  return new A(t);
7122
- }, g.RTCIceCandidate.prototype = A.prototype, Ti(g, "icecandidate", (e) => (e.candidate && Object.defineProperty(e, "candidate", {
7122
+ }, g.RTCIceCandidate.prototype = A.prototype, qi(g, "icecandidate", (e) => (e.candidate && Object.defineProperty(e, "candidate", {
7123
7123
  value: new g.RTCIceCandidate(e.candidate),
7124
7124
  writable: "false"
7125
7125
  }), e));
7126
7126
  }
7127
7127
  function pQ(g) {
7128
- !g.RTCIceCandidate || g.RTCIceCandidate && "relayProtocol" in g.RTCIceCandidate.prototype || Ti(g, "icecandidate", (A) => {
7128
+ !g.RTCIceCandidate || g.RTCIceCandidate && "relayProtocol" in g.RTCIceCandidate.prototype || qi(g, "icecandidate", (A) => {
7129
7129
  if (A.candidate) {
7130
- const e = EI.parseCandidate(A.candidate.candidate);
7130
+ const e = rI.parseCandidate(A.candidate.candidate);
7131
7131
  e.type === "relay" && (A.candidate.relayProtocol = {
7132
7132
  0: "tls",
7133
7133
  1: "tcp",
@@ -7148,9 +7148,9 @@ function Io(g, A) {
7148
7148
  const e = function(o) {
7149
7149
  if (!o || !o.sdp)
7150
7150
  return !1;
7151
- const a = EI.splitSections(o.sdp);
7151
+ const a = rI.splitSections(o.sdp);
7152
7152
  return a.shift(), a.some((Q) => {
7153
- const n = EI.parseMLine(Q);
7153
+ const n = rI.parseMLine(Q);
7154
7154
  return n && n.kind === "application" && n.protocol.indexOf("SCTP") !== -1;
7155
7155
  });
7156
7156
  }, t = function(o) {
@@ -7165,7 +7165,7 @@ function Io(g, A) {
7165
7165
  }, I = function(o, a) {
7166
7166
  let Q = 65536;
7167
7167
  A.browser === "firefox" && A.version === 57 && (Q = 65535);
7168
- const n = EI.matchPrefix(o.sdp, "a=max-message-size:");
7168
+ const n = rI.matchPrefix(o.sdp, "a=max-message-size:");
7169
7169
  return n.length > 0 ? Q = parseInt(n[0].substring(19), 10) : A.browser === "firefox" && a !== -1 && (Q = 2147483637), Q;
7170
7170
  }, C = g.RTCPeerConnection.prototype.setRemoteDescription;
7171
7171
  g.RTCPeerConnection.prototype.setRemoteDescription = function() {
@@ -7211,7 +7211,7 @@ function Co(g) {
7211
7211
  g.RTCPeerConnection.prototype.createDataChannel = function() {
7212
7212
  const i = e.apply(this, arguments);
7213
7213
  return A(i, this), i;
7214
- }, Ti(g, "datachannel", (t) => (A(t.channel, t.target), t));
7214
+ }, qi(g, "datachannel", (t) => (A(t.channel, t.target), t));
7215
7215
  }
7216
7216
  function wQ(g) {
7217
7217
  if (!g.RTCPeerConnection || "connectionState" in g.RTCPeerConnection.prototype)
@@ -7644,7 +7644,7 @@ class $ extends lg.EventEmitter {
7644
7644
  let e = "audio";
7645
7645
  this.kind === $.Kind.Video && (e = "video"), this.attachedElements.length === 0 && this.kind === $.Kind.Video && this.addAppVisibilityListener(), A || (e === "audio" && (KI.forEach((I) => {
7646
7646
  I.parentElement === null && !A && (A = I);
7647
- }), A && KI.splice(KI.indexOf(A), 1)), A || (A = document.createElement(e))), this.attachedElements.includes(A) || this.attachedElements.push(A), QI(this.mediaStreamTrack, A);
7647
+ }), A && KI.splice(KI.indexOf(A), 1)), A || (A = document.createElement(e))), this.attachedElements.includes(A) || this.attachedElements.push(A), nI(this.mediaStreamTrack, A);
7648
7648
  const t = A.srcObject.getTracks(), i = t.some((I) => I.kind === "audio");
7649
7649
  return A.play().then(() => {
7650
7650
  this.emit(i ? CA.AudioPlaybackStarted : CA.VideoPlaybackStarted);
@@ -7656,13 +7656,13 @@ class $ extends lg.EventEmitter {
7656
7656
  detach(A) {
7657
7657
  try {
7658
7658
  if (A) {
7659
- rI(this.mediaStreamTrack, A);
7659
+ cI(this.mediaStreamTrack, A);
7660
7660
  const t = this.attachedElements.indexOf(A);
7661
7661
  return t >= 0 && (this.attachedElements.splice(t, 1), this.recycleElement(A), this.emit(CA.ElementDetached, A)), A;
7662
7662
  }
7663
7663
  const e = [];
7664
7664
  return this.attachedElements.forEach((t) => {
7665
- rI(this.mediaStreamTrack, t), e.push(t), this.recycleElement(t), this.emit(CA.ElementDetached, t);
7665
+ cI(this.mediaStreamTrack, t), e.push(t), this.recycleElement(t), this.emit(CA.ElementDetached, t);
7666
7666
  }), this.attachedElements = [], e;
7667
7667
  } finally {
7668
7668
  this.attachedElements.length === 0 && this.removeAppVisibilityListener();
@@ -7706,7 +7706,7 @@ class $ extends lg.EventEmitter {
7706
7706
  lt() && document.removeEventListener("visibilitychange", this.appVisibilityChangedListener);
7707
7707
  }
7708
7708
  }
7709
- function QI(g, A) {
7709
+ function nI(g, A) {
7710
7710
  let e;
7711
7711
  A.srcObject instanceof MediaStream ? e = A.srcObject : e = new MediaStream();
7712
7712
  let t;
@@ -7717,7 +7717,7 @@ function QI(g, A) {
7717
7717
  });
7718
7718
  }, 0));
7719
7719
  }
7720
- function rI(g, A) {
7720
+ function cI(g, A) {
7721
7721
  if (A.srcObject instanceof MediaStream) {
7722
7722
  const e = A.srcObject;
7723
7723
  e.removeTrack(g), e.getTracks().length > 0 ? A.srcObject = e : A.srcObject = null;
@@ -8147,7 +8147,7 @@ function no(g) {
8147
8147
  function wi(g) {
8148
8148
  return g !== void 0 ? BigInt(g) : void 0;
8149
8149
  }
8150
- function cI(g) {
8150
+ function hI(g) {
8151
8151
  return !!g && !(g instanceof MediaStreamTrack) && g.isLocal;
8152
8152
  }
8153
8153
  function sg(g) {
@@ -8157,10 +8157,10 @@ function Ei(g) {
8157
8157
  return !!g && g.kind == $.Kind.Video;
8158
8158
  }
8159
8159
  function Og(g) {
8160
- return cI(g) && Ei(g);
8160
+ return hI(g) && Ei(g);
8161
8161
  }
8162
8162
  function mg(g) {
8163
- return cI(g) && sg(g);
8163
+ return hI(g) && sg(g);
8164
8164
  }
8165
8165
  function UQ(g) {
8166
8166
  return !!g && !g.isLocal;
@@ -8593,7 +8593,7 @@ class Hx extends lg.EventEmitter {
8593
8593
  }
8594
8594
  }
8595
8595
  setupE2EESender(A, e) {
8596
- if (!cI(A) || !e) {
8596
+ if (!hI(A) || !e) {
8597
8597
  e || te.warn("early return because sender is not ready");
8598
8598
  return;
8599
8599
  }
@@ -9085,7 +9085,7 @@ class Is {
9085
9085
  value: new qo({
9086
9086
  reason: Wt.CLIENT_INITIATED,
9087
9087
  // server doesn't process this field, keeping it here to indicate the intent of a full disconnect
9088
- action: BI.DISCONNECT
9088
+ action: EI.DISCONNECT
9089
9089
  })
9090
9090
  });
9091
9091
  }
@@ -9945,7 +9945,7 @@ function os(g, A, e) {
9945
9945
  }), n = [];
9946
9946
  }, B;
9947
9947
  }
9948
- const tl = 0.7, gl = 20, hI = {
9948
+ const tl = 0.7, gl = 20, dI = {
9949
9949
  NegotiationStarted: "negotiationStarted",
9950
9950
  NegotiationComplete: "negotiationComplete",
9951
9951
  RTPVideoPayloadTypes: "rtpVideoPayloadTypes"
@@ -9958,7 +9958,7 @@ class LB extends lg.EventEmitter {
9958
9958
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
9959
9959
  var t;
9960
9960
  super(), this.log = te, this.ddExtID = 0, this.latestOfferId = 0, this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate = !1, this.trackBitrates = [], this.remoteStereoMids = [], this.remoteNackMids = [], this.negotiate = os((i) => S(this, void 0, void 0, function* () {
9961
- this.emit(hI.NegotiationStarted);
9961
+ this.emit(dI.NegotiationStarted);
9962
9962
  try {
9963
9963
  yield this.createAndSendOffer();
9964
9964
  } catch (I) {
@@ -10049,8 +10049,8 @@ class LB extends lg.EventEmitter {
10049
10049
  }
10050
10050
  return yield this.setMungedSDP(A, i, !0), this.pendingCandidates.forEach((I) => {
10051
10051
  this.pc.addIceCandidate(I);
10052
- }), this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate ? (this.renegotiate = !1, yield this.createAndSendOffer()) : A.type === "answer" && (this.emit(hI.NegotiationComplete), A.sdp && $g.parse(A.sdp).media.forEach((C) => {
10053
- C.type === "video" && this.emit(hI.RTPVideoPayloadTypes, C.rtp);
10052
+ }), this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate ? (this.renegotiate = !1, yield this.createAndSendOffer()) : A.type === "answer" && (this.emit(dI.NegotiationComplete), A.sdp && $g.parse(A.sdp).media.forEach((C) => {
10053
+ C.type === "video" && this.emit(dI.RTPVideoPayloadTypes, C.rtp);
10054
10054
  })), !0;
10055
10055
  });
10056
10056
  }
@@ -10437,8 +10437,8 @@ class ol {
10437
10437
  }, this.peerConnectionTimeout), I = () => {
10438
10438
  clearTimeout(i), t("negotiation aborted");
10439
10439
  };
10440
- A.signal.addEventListener("abort", I), this.publisher.once(hI.NegotiationStarted, () => {
10441
- A.signal.aborted || this.publisher.once(hI.NegotiationComplete, () => {
10440
+ A.signal.addEventListener("abort", I), this.publisher.once(dI.NegotiationStarted, () => {
10441
+ A.signal.aborted || this.publisher.once(dI.NegotiationComplete, () => {
10442
10442
  clearTimeout(i), e();
10443
10443
  });
10444
10444
  }), yield this.publisher.negotiate((C) => {
@@ -10699,20 +10699,20 @@ class F0 extends $ {
10699
10699
  if (A === this._mediaStreamTrack && !e)
10700
10700
  return;
10701
10701
  this._mediaStreamTrack && (this.attachedElements.forEach((I) => {
10702
- rI(this._mediaStreamTrack, I);
10702
+ cI(this._mediaStreamTrack, I);
10703
10703
  }), this.debouncedTrackMuteHandler.cancel("new-track"), this._mediaStreamTrack.removeEventListener("ended", this.handleEnded), this._mediaStreamTrack.removeEventListener("mute", this.handleTrackMuteEvent), this._mediaStreamTrack.removeEventListener("unmute", this.handleTrackUnmuteEvent)), this.mediaStream = new MediaStream([A]), A && (A.addEventListener("ended", this.handleEnded), A.addEventListener("mute", this.handleTrackMuteEvent), A.addEventListener("unmute", this.handleTrackUnmuteEvent), this._constraints = A.getConstraints());
10704
10704
  let i;
10705
10705
  if (this.processor && A) {
10706
10706
  if (this.log.debug("restarting processor", this.logContext), this.kind === "unknown")
10707
10707
  throw TypeError("cannot set processor on track of unknown kind");
10708
- this.processorElement && (QI(A, this.processorElement), this.processorElement.muted = !0), yield this.processor.restart({
10708
+ this.processorElement && (nI(A, this.processorElement), this.processorElement.muted = !0), yield this.processor.restart({
10709
10709
  track: A,
10710
10710
  kind: this.kind,
10711
10711
  element: this.processorElement
10712
10712
  }), i = this.processor.processedTrack;
10713
10713
  }
10714
10714
  this.sender && ((t = this.sender.transport) === null || t === void 0 ? void 0 : t.state) !== "closed" && (yield this.sender.replaceTrack(i ?? A)), !this.providedByUser && this._mediaStreamTrack !== A && this._mediaStreamTrack.stop(), this._mediaStreamTrack = A, A && (this._mediaStreamTrack.enabled = !this.isMuted, yield this.resumeUpstream(), this.attachedElements.forEach((I) => {
10715
- QI(i ?? A, I);
10715
+ nI(i ?? A, I);
10716
10716
  }));
10717
10717
  });
10718
10718
  }
@@ -10805,7 +10805,7 @@ class F0 extends $ {
10805
10805
  } : !0 : C.audio = t ? Object.assign({
10806
10806
  deviceId: t
10807
10807
  }, I) : !0, this.attachedElements.forEach((Q) => {
10808
- rI(this.mediaStreamTrack, Q);
10808
+ cI(this.mediaStreamTrack, Q);
10809
10809
  }), this._mediaStreamTrack.removeEventListener("ended", this.handleEnded), this._mediaStreamTrack.stop();
10810
10810
  const a = (yield navigator.mediaDevices.getUserMedia(C)).getTracks()[0];
10811
10811
  return this.kind === $.Kind.Video && (yield a.applyConstraints(I)), a.addEventListener("ended", this.handleEnded), this.log.debug("re-acquired MediaStreamTrack", this.logContext), yield this.setMediaStreamTrack(a), this._constraints = A, this.emit(CA.Restarted, this), this.manuallyStopped && (this.log.warn("track was stopped during a restart, stopping restarted track", this.logContext), this.stop()), this;
@@ -10917,7 +10917,7 @@ class F0 extends $ {
10917
10917
  };
10918
10918
  if (yield e.init(a), t.log.debug("processor initialized", t.logContext), t.processor && (yield t.internalStopProcessor()), t.kind === "unknown")
10919
10919
  throw TypeError("cannot set processor on track of unknown kind");
10920
- if (QI(t._mediaStreamTrack, o), o.muted = !0, o.play().catch((Q) => {
10920
+ if (nI(t._mediaStreamTrack, o), o.muted = !0, o.play().catch((Q) => {
10921
10921
  Q instanceof DOMException && Q.name === "AbortError" ? (t.log.warn("failed to play processor element, retrying", Object.assign(Object.assign({}, t.logContext), {
10922
10922
  error: Q
10923
10923
  })), setTimeout(() => {
@@ -10931,7 +10931,7 @@ class F0 extends $ {
10931
10931
  }));
10932
10932
  }), t.processor = e, t.processorElement = o, t.processor.processedTrack) {
10933
10933
  for (const Q of t.attachedElements)
10934
- Q !== t.processorElement && i && (rI(t._mediaStreamTrack, Q), QI(t.processor.processedTrack, Q));
10934
+ Q !== t.processorElement && i && (cI(t._mediaStreamTrack, Q), nI(t.processor.processedTrack, Q));
10935
10935
  yield (I = t.sender) === null || I === void 0 ? void 0 : I.replaceTrack(t.processor.processedTrack);
10936
10936
  }
10937
10937
  t.emit(CA.TrackProcessorUpdate, t.processor);
@@ -11892,7 +11892,7 @@ class bl extends lg.EventEmitter {
11892
11892
  event: t
11893
11893
  }));
11894
11894
  }, this.handleBufferedAmountLow = (t) => {
11895
- const I = t.currentTarget.maxRetransmits === 0 ? OA.LOSSY : OA.RELIABLE;
11895
+ const I = t.currentTarget.maxRetransmits === 0 ? VA.LOSSY : VA.RELIABLE;
11896
11896
  this.updateAndEmitDCBufferStatus(I);
11897
11897
  }, this.handleDisconnect = (t, i) => {
11898
11898
  if (this._isClosed)
@@ -11924,13 +11924,13 @@ class bl extends lg.EventEmitter {
11924
11924
  }, this.isBufferStatusLow = (t) => {
11925
11925
  const i = this.dataChannelForKind(t);
11926
11926
  if (i)
11927
- return t === OA.RELIABLE && this.reliableMessageBuffer.alignBufferedAmount(i.bufferedAmount), i.bufferedAmount <= i.bufferedAmountLowThreshold;
11927
+ return t === VA.RELIABLE && this.reliableMessageBuffer.alignBufferedAmount(i.bufferedAmount), i.bufferedAmount <= i.bufferedAmountLowThreshold;
11928
11928
  }, this.handleBrowserOnLine = () => {
11929
- this.client.currentState === ke.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(Pi.RR_SIGNAL_DISCONNECTED));
11929
+ this.client.currentState === ke.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(Oi.RR_SIGNAL_DISCONNECTED));
11930
11930
  }, this.log = vg((e = A.loggerName) !== null && e !== void 0 ? e : Zt.Engine), this.loggerOptions = {
11931
11931
  loggerName: A.loggerName,
11932
11932
  loggerContextCb: () => this.logContext
11933
- }, this.client = new Is(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new ft(), this.dataProcessLock = new ft(), this.dcBufferStatus = /* @__PURE__ */ new Map([[OA.LOSSY, !0], [OA.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(QA.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(QA.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(QA.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(QA.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(QA.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(QA.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(QA.StreamStateChanged, t), this.client.onRequestResponse = (t) => this.emit(QA.SignalRequestResponse, t);
11933
+ }, this.client = new Is(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new ft(), this.dataProcessLock = new ft(), this.dcBufferStatus = /* @__PURE__ */ new Map([[VA.LOSSY, !0], [VA.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(QA.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(QA.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(QA.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(QA.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(QA.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(QA.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(QA.StreamStateChanged, t), this.client.onRequestResponse = (t) => this.emit(QA.SignalRequestResponse, t);
11934
11934
  }
11935
11935
  /** @internal */
11936
11936
  get logContext() {
@@ -12056,7 +12056,7 @@ class bl extends lg.EventEmitter {
12056
12056
  if (this.log.debug("primary PC state changed ".concat(I), this.logContext), ["closed", "disconnected", "failed"].includes(C) && (this.publisherConnectionPromise = void 0), I === Le.CONNECTED) {
12057
12057
  const n = this.pcState === qt.New;
12058
12058
  this.pcState = qt.Connected, n && this.emit(QA.Connected, A);
12059
- } else I === Le.FAILED && this.pcState === qt.Connected && (this.pcState = qt.Disconnected, this.handleDisconnect("peerconnection failed", o === "failed" ? Pi.RR_SUBSCRIBER_FAILED : Pi.RR_PUBLISHER_FAILED));
12059
+ } else I === Le.FAILED && this.pcState === qt.Connected && (this.pcState = qt.Disconnected, this.handleDisconnect("peerconnection failed", o === "failed" ? Oi.RR_SUBSCRIBER_FAILED : Oi.RR_PUBLISHER_FAILED));
12060
12060
  const a = this.client.isDisconnected || this.client.currentState === ke.RECONNECTING, Q = [Le.FAILED, Le.CLOSING, Le.CLOSED].includes(I);
12061
12061
  a && Q && !this._isClosed && this.emit(QA.Offline);
12062
12062
  }), this.pcManager.onTrack = (I) => {
@@ -12108,18 +12108,18 @@ class bl extends lg.EventEmitter {
12108
12108
  var e;
12109
12109
  this.participantSid = (e = A.participant) === null || e === void 0 ? void 0 : e.sid, this.latestJoinResponse && (this.latestJoinResponse.room = A.room), this.emit(QA.RoomMoved, A);
12110
12110
  }, this.client.onClose = () => {
12111
- this.handleDisconnect("signal", Pi.RR_SIGNAL_DISCONNECTED);
12111
+ this.handleDisconnect("signal", Oi.RR_SIGNAL_DISCONNECTED);
12112
12112
  }, this.client.onLeave = (A) => {
12113
12113
  switch (this.log.debug("client leave request", Object.assign(Object.assign({}, this.logContext), {
12114
12114
  reason: A == null ? void 0 : A.reason
12115
12115
  })), A.regions && this.regionUrlProvider && (this.log.debug("updating regions", this.logContext), this.regionUrlProvider.setServerReportedRegions(A.regions)), A.action) {
12116
- case BI.DISCONNECT:
12116
+ case EI.DISCONNECT:
12117
12117
  this.emit(QA.Disconnected, A == null ? void 0 : A.reason), this.close();
12118
12118
  break;
12119
- case BI.RECONNECT:
12119
+ case EI.RECONNECT:
12120
12120
  this.fullReconnectOnNext = !0, this.handleDisconnect(Na);
12121
12121
  break;
12122
- case BI.RESUME:
12122
+ case EI.RESUME:
12123
12123
  this.handleDisconnect(Na);
12124
12124
  }
12125
12125
  };
@@ -12215,7 +12215,7 @@ class bl extends lg.EventEmitter {
12215
12215
  let C = !0;
12216
12216
  I instanceof je ? (this.log.debug("received unrecoverable error", Object.assign(Object.assign({}, this.logContext), {
12217
12217
  error: I
12218
- })), C = !1) : I instanceof Oi || (this.fullReconnectOnNext = !0), C ? this.handleDisconnect("reconnect", Pi.RR_UNKNOWN) : (this.log.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up"), this.logContext), this.emit(QA.Disconnected), yield this.close());
12218
+ })), C = !1) : I instanceof Vi || (this.fullReconnectOnNext = !0), C ? this.handleDisconnect("reconnect", Oi.RR_UNKNOWN) : (this.log.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up"), this.logContext), this.emit(QA.Disconnected), yield this.close());
12219
12219
  } finally {
12220
12220
  this.attemptingReconnect = !1;
12221
12221
  }
@@ -12242,15 +12242,15 @@ class bl extends lg.EventEmitter {
12242
12242
  let I;
12243
12243
  try {
12244
12244
  if (!this.signalOpts)
12245
- throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new Oi();
12245
+ throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new Vi();
12246
12246
  I = yield this.join(A ?? this.url, this.token, this.signalOpts);
12247
12247
  } catch (C) {
12248
- throw C instanceof me && C.reason === oe.NotAllowed ? new je("could not reconnect, token might be expired") : new Oi();
12248
+ throw C instanceof me && C.reason === oe.NotAllowed ? new je("could not reconnect, token might be expired") : new Vi();
12249
12249
  }
12250
12250
  if (this.shouldFailNext)
12251
12251
  throw this.shouldFailNext = !1, new Error("simulated failure");
12252
12252
  if (this.client.setReconnected(), this.emit(QA.SignalRestarted, I), yield this.waitForPCReconnected(), this.client.currentState !== ke.CONNECTED)
12253
- throw new Oi("Signal connection got severed during reconnect");
12253
+ throw new Vi("Signal connection got severed during reconnect");
12254
12254
  (e = this.regionUrlProvider) === null || e === void 0 || e.resetAttempts(), this.emit(QA.Restarted);
12255
12255
  } catch (I) {
12256
12256
  const C = yield (t = this.regionUrlProvider) === null || t === void 0 ? void 0 : t.getNextBestRegionUrl();
@@ -12277,7 +12277,7 @@ class bl extends lg.EventEmitter {
12277
12277
  let I = "";
12278
12278
  throw i instanceof Error && (I = i.message, this.log.error(i.message, Object.assign(Object.assign({}, this.logContext), {
12279
12279
  error: i
12280
- }))), i instanceof me && i.reason === oe.NotAllowed ? new je("could not reconnect, token might be expired") : i instanceof me && i.reason === oe.LeaveRequest ? i : new Oi(I);
12280
+ }))), i instanceof me && i.reason === oe.NotAllowed ? new je("could not reconnect, token might be expired") : i instanceof me && i.reason === oe.LeaveRequest ? i : new Vi(I);
12281
12281
  }
12282
12282
  if (this.emit(QA.SignalResumed), t) {
12283
12283
  const i = this.makeRTCConfiguration(t);
@@ -12287,7 +12287,7 @@ class bl extends lg.EventEmitter {
12287
12287
  if (this.shouldFailNext)
12288
12288
  throw this.shouldFailNext = !1, new Error("simulated failure");
12289
12289
  if (yield this.pcManager.triggerIceRestart(), yield this.waitForPCReconnected(), this.client.currentState !== ke.CONNECTED)
12290
- throw new Oi("Signal connection got severed during reconnect");
12290
+ throw new Vi("Signal connection got severed during reconnect");
12291
12291
  this.client.setReconnected(), ((e = this.reliableDC) === null || e === void 0 ? void 0 : e.readyState) === "open" && this.reliableDC.id === null && this.createDataChannels(), t != null && t.lastMessageSeq && this.resendReliableMessagesForResume(t.lastMessageSeq), this.emit(QA.Resumed);
12292
12292
  });
12293
12293
  }
@@ -12315,7 +12315,7 @@ class bl extends lg.EventEmitter {
12315
12315
  return S(this, void 0, void 0, function* () {
12316
12316
  const I = new xt({
12317
12317
  destinationIdentities: [A],
12318
- kind: OA.RELIABLE,
12318
+ kind: VA.RELIABLE,
12319
12319
  value: {
12320
12320
  case: "rpcResponse",
12321
12321
  value: new wr({
@@ -12330,7 +12330,7 @@ class bl extends lg.EventEmitter {
12330
12330
  })
12331
12331
  }
12332
12332
  });
12333
- yield this.sendDataPacket(I, OA.RELIABLE);
12333
+ yield this.sendDataPacket(I, VA.RELIABLE);
12334
12334
  });
12335
12335
  }
12336
12336
  /** @internal */
@@ -12338,7 +12338,7 @@ class bl extends lg.EventEmitter {
12338
12338
  return S(this, void 0, void 0, function* () {
12339
12339
  const t = new xt({
12340
12340
  destinationIdentities: [A],
12341
- kind: OA.RELIABLE,
12341
+ kind: VA.RELIABLE,
12342
12342
  value: {
12343
12343
  case: "rpcAck",
12344
12344
  value: new pr({
@@ -12346,16 +12346,16 @@ class bl extends lg.EventEmitter {
12346
12346
  })
12347
12347
  }
12348
12348
  });
12349
- yield this.sendDataPacket(t, OA.RELIABLE);
12349
+ yield this.sendDataPacket(t, VA.RELIABLE);
12350
12350
  });
12351
12351
  }
12352
12352
  /* @internal */
12353
12353
  sendDataPacket(A, e) {
12354
12354
  return S(this, void 0, void 0, function* () {
12355
- yield this.ensurePublisherConnected(e), e === OA.RELIABLE && (A.sequence = this.reliableDataSequence, this.reliableDataSequence += 1);
12355
+ yield this.ensurePublisherConnected(e), e === VA.RELIABLE && (A.sequence = this.reliableDataSequence, this.reliableDataSequence += 1);
12356
12356
  const t = A.toBinary(), i = this.dataChannelForKind(e);
12357
12357
  if (i) {
12358
- if (e === OA.RELIABLE && this.reliableMessageBuffer.push({
12358
+ if (e === VA.RELIABLE && this.reliableMessageBuffer.push({
12359
12359
  data: t,
12360
12360
  sequence: A.sequence
12361
12361
  }), this.attemptingReconnect)
@@ -12367,11 +12367,11 @@ class bl extends lg.EventEmitter {
12367
12367
  }
12368
12368
  resendReliableMessagesForResume(A) {
12369
12369
  return S(this, void 0, void 0, function* () {
12370
- yield this.ensurePublisherConnected(OA.RELIABLE);
12371
- const e = this.dataChannelForKind(OA.RELIABLE);
12370
+ yield this.ensurePublisherConnected(VA.RELIABLE);
12371
+ const e = this.dataChannelForKind(VA.RELIABLE);
12372
12372
  e && (this.reliableMessageBuffer.popToSequence(A), this.reliableMessageBuffer.getAll().forEach((t) => {
12373
12373
  e.send(t.data);
12374
- })), this.updateAndEmitDCBufferStatus(OA.RELIABLE);
12374
+ })), this.updateAndEmitDCBufferStatus(VA.RELIABLE);
12375
12375
  });
12376
12376
  }
12377
12377
  waitForBufferStatusLow(A) {
@@ -12436,7 +12436,7 @@ class bl extends lg.EventEmitter {
12436
12436
  const t = new AbortController(), i = () => {
12437
12437
  t.abort(), this.log.debug("engine disconnected while negotiation was ongoing", this.logContext), A();
12438
12438
  };
12439
- this.isClosed && e("cannot negotiate on closed engine"), this.on(QA.Closing, i), this.pcManager.publisher.once(hI.RTPVideoPayloadTypes, (I) => {
12439
+ this.isClosed && e("cannot negotiate on closed engine"), this.on(QA.Closing, i), this.pcManager.publisher.once(dI.RTPVideoPayloadTypes, (I) => {
12440
12440
  const C = /* @__PURE__ */ new Map();
12441
12441
  I.forEach((o) => {
12442
12442
  const a = o.codec.toLowerCase();
@@ -12446,7 +12446,7 @@ class bl extends lg.EventEmitter {
12446
12446
  try {
12447
12447
  yield this.pcManager.negotiate(t), A();
12448
12448
  } catch (I) {
12449
- I instanceof bQ && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", Pi.RR_UNKNOWN), e(I);
12449
+ I instanceof bQ && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", Oi.RR_UNKNOWN), e(I);
12450
12450
  } finally {
12451
12451
  this.off(QA.Closing, i);
12452
12452
  }
@@ -12455,14 +12455,14 @@ class bl extends lg.EventEmitter {
12455
12455
  }
12456
12456
  dataChannelForKind(A, e) {
12457
12457
  if (e) {
12458
- if (A === OA.LOSSY)
12458
+ if (A === VA.LOSSY)
12459
12459
  return this.lossyDCSub;
12460
- if (A === OA.RELIABLE)
12460
+ if (A === VA.RELIABLE)
12461
12461
  return this.reliableDCSub;
12462
12462
  } else {
12463
- if (A === OA.LOSSY)
12463
+ if (A === VA.LOSSY)
12464
12464
  return this.lossyDC;
12465
- if (A === OA.RELIABLE)
12465
+ if (A === VA.RELIABLE)
12466
12466
  return this.reliableDC;
12467
12467
  }
12468
12468
  }
@@ -12511,7 +12511,7 @@ class bl extends lg.EventEmitter {
12511
12511
  target: i
12512
12512
  }));
12513
12513
  };
12514
- return e(this.dataChannelForKind(OA.LOSSY), Ot.PUBLISHER), e(this.dataChannelForKind(OA.RELIABLE), Ot.PUBLISHER), e(this.dataChannelForKind(OA.LOSSY, !0), Ot.SUBSCRIBER), e(this.dataChannelForKind(OA.RELIABLE, !0), Ot.SUBSCRIBER), A;
12514
+ return e(this.dataChannelForKind(VA.LOSSY), Ot.PUBLISHER), e(this.dataChannelForKind(VA.RELIABLE), Ot.PUBLISHER), e(this.dataChannelForKind(VA.LOSSY, !0), Ot.SUBSCRIBER), e(this.dataChannelForKind(VA.RELIABLE, !0), Ot.SUBSCRIBER), A;
12515
12515
  }
12516
12516
  clearReconnectTimeout() {
12517
12517
  this.reconnectTimeout && et.clearTimeout(this.reconnectTimeout);
@@ -12526,7 +12526,7 @@ class bl extends lg.EventEmitter {
12526
12526
  lt() && window.removeEventListener("online", this.handleBrowserOnLine);
12527
12527
  }
12528
12528
  }
12529
- class Oi extends Error {
12529
+ class Vi extends Error {
12530
12530
  }
12531
12531
  function Nl(g) {
12532
12532
  return g !== void 0 && g > 13;
@@ -13047,14 +13047,14 @@ class Ll {
13047
13047
  value: C
13048
13048
  }
13049
13049
  });
13050
- yield this.engine.sendDataPacket(a, OA.RELIABLE);
13050
+ yield this.engine.sendDataPacket(a, VA.RELIABLE);
13051
13051
  let Q = 0;
13052
13052
  const n = this.engine, s = new WritableStream({
13053
13053
  // Implement the sink
13054
13054
  write(d) {
13055
13055
  return S(this, void 0, void 0, function* () {
13056
13056
  for (const c of Ux(d, VB)) {
13057
- yield n.waitForBufferStatusLow(OA.RELIABLE);
13057
+ yield n.waitForBufferStatusLow(VA.RELIABLE);
13058
13058
  const h = new cQ({
13059
13059
  content: c,
13060
13060
  streamId: i,
@@ -13066,7 +13066,7 @@ class Ll {
13066
13066
  value: h
13067
13067
  }
13068
13068
  });
13069
- yield n.sendDataPacket(r, OA.RELIABLE), Q += 1;
13069
+ yield n.sendDataPacket(r, VA.RELIABLE), Q += 1;
13070
13070
  }
13071
13071
  });
13072
13072
  },
@@ -13081,7 +13081,7 @@ class Ll {
13081
13081
  value: d
13082
13082
  }
13083
13083
  });
13084
- yield n.sendDataPacket(c, OA.RELIABLE);
13084
+ yield n.sendDataPacket(c, VA.RELIABLE);
13085
13085
  });
13086
13086
  },
13087
13087
  abort(d) {
@@ -13158,7 +13158,7 @@ class Ll {
13158
13158
  value: n
13159
13159
  }
13160
13160
  });
13161
- yield this.engine.sendDataPacket(s, OA.RELIABLE);
13161
+ yield this.engine.sendDataPacket(s, VA.RELIABLE);
13162
13162
  let B = 0;
13163
13163
  const E = new ft(), d = this.engine, c = this.log, h = new WritableStream({
13164
13164
  write(f) {
@@ -13168,7 +13168,7 @@ class Ll {
13168
13168
  try {
13169
13169
  for (; l < f.byteLength; ) {
13170
13170
  const D = f.slice(l, l + VB);
13171
- yield d.waitForBufferStatusLow(OA.RELIABLE);
13171
+ yield d.waitForBufferStatusLow(VA.RELIABLE);
13172
13172
  const w = new xt({
13173
13173
  destinationIdentities: a,
13174
13174
  value: {
@@ -13180,7 +13180,7 @@ class Ll {
13180
13180
  })
13181
13181
  }
13182
13182
  });
13183
- yield d.sendDataPacket(w, OA.RELIABLE), B += 1, l += D.byteLength;
13183
+ yield d.sendDataPacket(w, VA.RELIABLE), B += 1, l += D.byteLength;
13184
13184
  }
13185
13185
  } finally {
13186
13186
  _();
@@ -13198,7 +13198,7 @@ class Ll {
13198
13198
  value: f
13199
13199
  }
13200
13200
  });
13201
- yield d.sendDataPacket(_, OA.RELIABLE);
13201
+ yield d.sendDataPacket(_, VA.RELIABLE);
13202
13202
  });
13203
13203
  },
13204
13204
  abort(f) {
@@ -13427,7 +13427,7 @@ class vl extends J0 {
13427
13427
  /** @internal */
13428
13428
  setMuted(A) {
13429
13429
  super.setMuted(A), this.attachedElements.forEach((e) => {
13430
- A ? rI(this._mediaStreamTrack, e) : QI(this._mediaStreamTrack, e);
13430
+ A ? cI(this._mediaStreamTrack, e) : nI(this._mediaStreamTrack, e);
13431
13431
  });
13432
13432
  }
13433
13433
  attach(A) {
@@ -13855,7 +13855,7 @@ class Y0 extends lg.EventEmitter {
13855
13855
  }
13856
13856
  get isActive() {
13857
13857
  var A;
13858
- return ((A = this.participantInfo) === null || A === void 0 ? void 0 : A.state) === sI.ACTIVE;
13858
+ return ((A = this.participantInfo) === null || A === void 0 ? void 0 : A.state) === BI.ACTIVE;
13859
13859
  }
13860
13860
  get kind() {
13861
13861
  return this._kind;
@@ -13926,7 +13926,7 @@ class Y0 extends lg.EventEmitter {
13926
13926
  /** @internal */
13927
13927
  updateInfo(A) {
13928
13928
  var e;
13929
- return this.participantInfo && this.participantInfo.sid === A.sid && this.participantInfo.version > A.version ? !1 : (this.identity = A.identity, this.sid = A.sid, this._setName(A.name), this._setMetadata(A.metadata), this._setAttributes(A.attributes), A.state === sI.ACTIVE && ((e = this.participantInfo) === null || e === void 0 ? void 0 : e.state) !== sI.ACTIVE && this.emit(aA.Active), A.permission && this.setPermissions(A.permission), this.participantInfo = A, !0);
13929
+ return this.participantInfo && this.participantInfo.sid === A.sid && this.participantInfo.version > A.version ? !1 : (this.identity = A.identity, this.sid = A.sid, this._setName(A.name), this._setMetadata(A.metadata), this._setAttributes(A.attributes), A.state === BI.ACTIVE && ((e = this.participantInfo) === null || e === void 0 ? void 0 : e.state) !== BI.ACTIVE && this.emit(aA.Active), A.permission && this.setPermissions(A.permission), this.participantInfo = A, !0);
13930
13930
  }
13931
13931
  /**
13932
13932
  * Updates metadata from server
@@ -14438,7 +14438,7 @@ class Pl extends Y0 {
14438
14438
  let C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
14439
14439
  return function* () {
14440
14440
  var o, a, Q, n;
14441
- mg(t) && t.setAudioContext(I.audioContext), yield (o = I.reconnectFuture) === null || o === void 0 ? void 0 : o.promise, I.republishPromise && !C && (yield I.republishPromise), cI(t) && I.pendingPublishPromises.has(t) && (yield I.pendingPublishPromises.get(t));
14441
+ mg(t) && t.setAudioContext(I.audioContext), yield (o = I.reconnectFuture) === null || o === void 0 ? void 0 : o.promise, I.republishPromise && !C && (yield I.republishPromise), hI(t) && I.pendingPublishPromises.has(t) && (yield I.pendingPublishPromises.get(t));
14442
14442
  let s;
14443
14443
  if (t instanceof MediaStreamTrack)
14444
14444
  s = t.getConstraints();
@@ -14539,7 +14539,7 @@ class Pl extends Y0 {
14539
14539
  var i, I, C, o, a, Q, n, s, B, E;
14540
14540
  if (!this.hasPermissionsToPublish(A))
14541
14541
  throw new fB("failed to publish track, insufficient permissions", 403);
14542
- Array.from(this.trackPublications.values()).find((x) => cI(A) && x.source === A.source) && A.source !== $.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(A.source), Object.assign(Object.assign({}, this.logContext), zA(A))), e.stopMicTrackOnMute && sg(A) && (A.stopOnMute = !0), A.source === $.Source.ScreenShare && Ki() && (e.simulcast = !1), e.videoCodec === "av1" && !ux() && (e.videoCodec = void 0), e.videoCodec === "vp9" && !Dx() && (e.videoCodec = void 0), e.videoCodec === void 0 && (e.videoCodec = vQ), this.enabledPublishVideoCodecs.length > 0 && (this.enabledPublishVideoCodecs.some((x) => e.videoCodec === iC(x.mime)) || (e.videoCodec = iC(this.enabledPublishVideoCodecs[0].mime)));
14542
+ Array.from(this.trackPublications.values()).find((x) => hI(A) && x.source === A.source) && A.source !== $.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(A.source), Object.assign(Object.assign({}, this.logContext), zA(A))), e.stopMicTrackOnMute && sg(A) && (A.stopOnMute = !0), A.source === $.Source.ScreenShare && Ki() && (e.simulcast = !1), e.videoCodec === "av1" && !ux() && (e.videoCodec = void 0), e.videoCodec === "vp9" && !Dx() && (e.videoCodec = void 0), e.videoCodec === void 0 && (e.videoCodec = vQ), this.enabledPublishVideoCodecs.length > 0 && (this.enabledPublishVideoCodecs.some((x) => e.videoCodec === iC(x.mime)) || (e.videoCodec = iC(this.enabledPublishVideoCodecs[0].mime)));
14543
14543
  const c = e.videoCodec;
14544
14544
  A.on(CA.Muted, this.onTrackMuted), A.on(CA.Unmuted, this.onTrackUnmuted), A.on(CA.Ended, this.handleTrackEnded), A.on(CA.UpstreamPaused, this.onTrackUpstreamPaused), A.on(CA.UpstreamResumed, this.onTrackUpstreamResumed), A.on(CA.AudioTrackFeatureUpdate, this.onTrackFeatureUpdate);
14545
14545
  const h = [], r = !(!((i = e.dtx) !== null && i !== void 0) || i), f = A.getSourceTrackSettings();
@@ -14764,7 +14764,7 @@ class Pl extends Y0 {
14764
14764
  unpublishTrack(A, e) {
14765
14765
  return S(this, void 0, void 0, function* () {
14766
14766
  var t, i;
14767
- if (cI(A)) {
14767
+ if (hI(A)) {
14768
14768
  const Q = this.pendingPublishPromises.get(A);
14769
14769
  Q && (this.log.info("awaiting publish promise before attempting to unpublish", Object.assign(Object.assign({}, this.logContext), zA(A))), yield Q);
14770
14770
  }
@@ -14843,7 +14843,7 @@ class Pl extends Y0 {
14843
14843
  var t = this;
14844
14844
  let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
14845
14845
  return function* () {
14846
- const I = i.reliable ? OA.RELIABLE : OA.LOSSY, C = i.destinationIdentities, o = i.topic, a = new xt({
14846
+ const I = i.reliable ? VA.RELIABLE : VA.LOSSY, C = i.destinationIdentities, o = i.topic, a = new xt({
14847
14847
  kind: I,
14848
14848
  value: {
14849
14849
  case: "user",
@@ -14868,7 +14868,7 @@ class Pl extends Y0 {
14868
14868
  publishDtmf(A, e) {
14869
14869
  return S(this, void 0, void 0, function* () {
14870
14870
  const t = new xt({
14871
- kind: OA.RELIABLE,
14871
+ kind: VA.RELIABLE,
14872
14872
  value: {
14873
14873
  case: "sipDtmf",
14874
14874
  value: new Dr({
@@ -14877,7 +14877,7 @@ class Pl extends Y0 {
14877
14877
  })
14878
14878
  }
14879
14879
  });
14880
- yield this.engine.sendDataPacket(t, OA.RELIABLE);
14880
+ yield this.engine.sendDataPacket(t, VA.RELIABLE);
14881
14881
  });
14882
14882
  }
14883
14883
  /** @deprecated Consider migrating to {@link sendText} */
@@ -14896,7 +14896,7 @@ class Pl extends Y0 {
14896
14896
  }))
14897
14897
  }
14898
14898
  });
14899
- return yield this.engine.sendDataPacket(i, OA.RELIABLE), this.emit(aA.ChatMessage, t), t;
14899
+ return yield this.engine.sendDataPacket(i, VA.RELIABLE), this.emit(aA.ChatMessage, t), t;
14900
14900
  });
14901
14901
  }
14902
14902
  /** @deprecated Consider migrating to {@link sendText} */
@@ -14914,7 +14914,7 @@ class Pl extends Y0 {
14914
14914
  }))
14915
14915
  }
14916
14916
  });
14917
- return yield this.engine.sendDataPacket(i, OA.RELIABLE), this.emit(aA.ChatMessage, t), t;
14917
+ return yield this.engine.sendDataPacket(i, VA.RELIABLE), this.emit(aA.ChatMessage, t), t;
14918
14918
  });
14919
14919
  }
14920
14920
  /**
@@ -15060,7 +15060,7 @@ class Pl extends Y0 {
15060
15060
  return S(this, void 0, void 0, function* () {
15061
15061
  const C = new xt({
15062
15062
  destinationIdentities: [A],
15063
- kind: OA.RELIABLE,
15063
+ kind: VA.RELIABLE,
15064
15064
  value: {
15065
15065
  case: "rpcRequest",
15066
15066
  value: new _r({
@@ -15072,7 +15072,7 @@ class Pl extends Y0 {
15072
15072
  })
15073
15073
  }
15074
15074
  });
15075
- yield this.engine.sendDataPacket(C, OA.RELIABLE);
15075
+ yield this.engine.sendDataPacket(C, VA.RELIABLE);
15076
15076
  });
15077
15077
  }
15078
15078
  /** @internal */
@@ -15460,7 +15460,7 @@ var re;
15460
15460
  g.Disconnected = "disconnected", g.Connecting = "connecting", g.Connected = "connected", g.Reconnecting = "reconnecting", g.SignalReconnecting = "signalReconnecting";
15461
15461
  })(re || (re = {}));
15462
15462
  const Vl = 4 * 1e3;
15463
- class DI extends lg.EventEmitter {
15463
+ class _I extends lg.EventEmitter {
15464
15464
  /**
15465
15465
  * Creates a new Room, the primary construct for a LiveKit session.
15466
15466
  * @param options
@@ -15668,7 +15668,7 @@ class DI extends lg.EventEmitter {
15668
15668
  }
15669
15669
  o.identity === "" && (o.identity = (a = this.sidToIdentity.get(o.sid)) !== null && a !== void 0 ? a : "");
15670
15670
  let Q = this.remoteParticipants.get(o.identity);
15671
- o.state === sI.DISCONNECTED ? this.handleParticipantDisconnected(o.identity, Q) : Q = this.getOrCreateParticipant(o.identity, o);
15671
+ o.state === BI.DISCONNECTED ? this.handleParticipantDisconnected(o.identity, Q) : Q = this.getOrCreateParticipant(o.identity, o);
15672
15672
  });
15673
15673
  }, this.handleActiveSpeakersUpdate = (C) => {
15674
15674
  const o = [], a = {};
@@ -15809,7 +15809,7 @@ class DI extends lg.EventEmitter {
15809
15809
  const C = new AbortController();
15810
15810
  (I = navigator.mediaDevices) === null || I === void 0 || I.addEventListener("devicechange", this.handleDeviceChange, {
15811
15811
  signal: C.signal
15812
- }), DI.cleanupRegistry && DI.cleanupRegistry.register(this, () => {
15812
+ }), _I.cleanupRegistry && _I.cleanupRegistry.register(this, () => {
15813
15813
  C.abort();
15814
15814
  });
15815
15815
  }
@@ -16099,7 +16099,7 @@ class DI extends lg.EventEmitter {
16099
16099
  const I = this.engine.client.onLeave;
16100
16100
  I && I(new qo({
16101
16101
  reason: Wt.CLIENT_INITIATED,
16102
- action: BI.RECONNECT
16102
+ action: EI.RECONNECT
16103
16103
  }));
16104
16104
  });
16105
16105
  break;
@@ -16485,7 +16485,7 @@ class DI extends lg.EventEmitter {
16485
16485
  identity: "simulated-local",
16486
16486
  name: "local-name"
16487
16487
  })), this.setupLocalParticipantEvents(), this.emit(tA.SignalConnected), this.emit(tA.Connected), this.setAndEmitConnectionState(re.Connected), i.video) {
16488
- const C = new HQ($.Kind.Video, new aI({
16488
+ const C = new HQ($.Kind.Video, new QI({
16489
16489
  source: Oe.CAMERA,
16490
16490
  sid: Math.floor(Math.random() * 1e4).toString(),
16491
16491
  type: Pt.AUDIO,
@@ -16502,7 +16502,7 @@ class DI extends lg.EventEmitter {
16502
16502
  this.localParticipant.addTrackPublication(C), this.localParticipant.emit(aA.LocalTrackPublished, C);
16503
16503
  }
16504
16504
  if (i.audio) {
16505
- const C = new HQ($.Kind.Audio, new aI({
16505
+ const C = new HQ($.Kind.Audio, new QI({
16506
16506
  source: Oe.MICROPHONE,
16507
16507
  sid: Math.floor(Math.random() * 1e4).toString(),
16508
16508
  type: Pt.AUDIO
@@ -16521,13 +16521,13 @@ class DI extends lg.EventEmitter {
16521
16521
  let o = new Ui({
16522
16522
  sid: Math.floor(Math.random() * 1e4).toString(),
16523
16523
  identity: "simulated-".concat(C),
16524
- state: sI.ACTIVE,
16524
+ state: BI.ACTIVE,
16525
16525
  tracks: [],
16526
16526
  joinedAt: Ge.parse(Date.now())
16527
16527
  });
16528
16528
  const a = this.getOrCreateParticipant(o.identity, o);
16529
16529
  if (I.video) {
16530
- const Q = bB(160 * ((t = I.aspectRatios[C % I.aspectRatios.length]) !== null && t !== void 0 ? t : 1), 160, !1, !0), n = new aI({
16530
+ const Q = bB(160 * ((t = I.aspectRatios[C % I.aspectRatios.length]) !== null && t !== void 0 ? t : 1), 160, !1, !0), n = new QI({
16531
16531
  source: Oe.CAMERA,
16532
16532
  sid: Math.floor(Math.random() * 1e4).toString(),
16533
16533
  type: Pt.AUDIO
@@ -16535,7 +16535,7 @@ class DI extends lg.EventEmitter {
16535
16535
  a.addSubscribedMediaTrack(Q, n.sid, new MediaStream([Q]), new RTCRtpReceiver()), o.tracks = [...o.tracks, n];
16536
16536
  }
16537
16537
  if (I.audio) {
16538
- const Q = Da(), n = new aI({
16538
+ const Q = Da(), n = new QI({
16539
16539
  source: Oe.MICROPHONE,
16540
16540
  sid: Math.floor(Math.random() * 1e4).toString(),
16541
16541
  type: Pt.AUDIO
@@ -16560,7 +16560,7 @@ class DI extends lg.EventEmitter {
16560
16560
  return super.emit(A, ...t);
16561
16561
  }
16562
16562
  }
16563
- DI.cleanupRegistry = typeof FinalizationRegistry < "u" && new FinalizationRegistry((g) => {
16563
+ _I.cleanupRegistry = typeof FinalizationRegistry < "u" && new FinalizationRegistry((g) => {
16564
16564
  g();
16565
16565
  });
16566
16566
  function T0(g) {
@@ -16576,7 +16576,7 @@ var Ht;
16576
16576
  class ri extends lg.EventEmitter {
16577
16577
  constructor(A, e) {
16578
16578
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
16579
- super(), this.status = Ht.IDLE, this.logs = [], this.options = {}, this.url = A, this.token = e, this.name = this.constructor.name, this.room = new DI(t.roomOptions), this.connectOptions = t.connectOptions, this.options = t;
16579
+ super(), this.status = Ht.IDLE, this.logs = [], this.options = {}, this.url = A, this.token = e, this.name = this.constructor.name, this.room = new _I(t.roomOptions), this.connectOptions = t.connectOptions, this.options = t;
16580
16580
  }
16581
16581
  run(A) {
16582
16582
  return S(this, void 0, void 0, function* () {
@@ -17917,12 +17917,12 @@ class O0 {
17917
17917
  }
17918
17918
  yt = /* @__PURE__ */ new WeakMap();
17919
17919
  const of = O0.isSupported, af = () => new O0();
17920
- class nI {
17920
+ class sI {
17921
17921
  constructor() {
17922
17922
  this.audioContext = null, this.refCount = 0, this.resumePromise = null;
17923
17923
  }
17924
17924
  static getInstance() {
17925
- return nI.instance || (nI.instance = new nI()), nI.instance;
17925
+ return sI.instance || (sI.instance = new sI()), sI.instance;
17926
17926
  }
17927
17927
  /**
17928
17928
  * Acquire a reference to the shared AudioContext
@@ -18020,7 +18020,7 @@ class nI {
18020
18020
  return ((A = this.audioContext) == null ? void 0 : A.destination) ?? null;
18021
18021
  }
18022
18022
  }
18023
- const og = nI.getInstance();
18023
+ const og = sI.getInstance();
18024
18024
  typeof window < "u" && window.addEventListener("pagehide", () => {
18025
18025
  og.forceClose();
18026
18026
  });
@@ -18076,7 +18076,7 @@ const Qf = of(), $B = Qf ? af() : null, at = class at extends EventTarget {
18076
18076
  if (!(this.room && this.room.state === "connected")) {
18077
18077
  this.updateStatus("connecting"), this.error = null, this.isReady = !1, this.room && (await this.room.disconnect(), this.room = null);
18078
18078
  try {
18079
- const i = new DI({
18079
+ const i = new _I({
18080
18080
  webAudioMix: !1,
18081
18081
  // Disabled: we manage our own Web Audio chain (GainNode fadeout).
18082
18082
  // LiveKit's built-in web audio mixing would conflict with
@@ -18100,10 +18100,10 @@ const Qf = of(), $B = Qf ? af() : null, at = class at extends EventTarget {
18100
18100
  })
18101
18101
  });
18102
18102
  if (!I.ok) {
18103
- const s = await I.text();
18104
- throw new Error(
18103
+ const s = await I.text(), B = new Error(
18105
18104
  `Failed to get room token: ${I.status} ${s}`
18106
18105
  );
18106
+ throw B.status = I.status, B;
18107
18107
  }
18108
18108
  const { token: C, url: o, room_name: a, user_identity: Q } = await I.json();
18109
18109
  this.roomName = a, this.userIdentity = Q;
@@ -18142,9 +18142,11 @@ const Qf = of(), $B = Qf ? af() : null, at = class at extends EventTarget {
18142
18142
  })
18143
18143
  );
18144
18144
  } catch (i) {
18145
- this.error = `Connection failed: ${i instanceof Error ? i.message : String(i)}`, this.updateStatus("error"), this.isReady = !1, this.room = null, this.dispatchEvent(
18145
+ this.error = `Connection failed: ${i instanceof Error ? i.message : String(i)}`, this.updateStatus("error"), this.isReady = !1, this.room = null;
18146
+ const I = typeof (i == null ? void 0 : i.status) == "number" ? i.status : null;
18147
+ this.dispatchEvent(
18146
18148
  new CustomEvent("error", {
18147
- detail: { error: this.error }
18149
+ detail: { error: this.error, status: I }
18148
18150
  })
18149
18151
  );
18150
18152
  }
@@ -18391,7 +18393,7 @@ const Qf = of(), $B = Qf ? af() : null, at = class at extends EventTarget {
18391
18393
  }
18392
18394
  this.updateStatus("disconnecting");
18393
18395
  const A = this.room;
18394
- this.room = null, this.connectedParticipants = [], this.microphoneEnabled = !1, this.audioPlaybackPrompt = !1, this.isReady = !1, this.cleanupFadeContext(), this.unmuteTimer && (clearTimeout(this.unmuteTimer), this.unmuteTimer = null), this.speakingHandler && (A.localParticipant.off("isSpeakingChanged", this.speakingHandler), this.speakingHandler = null), this.updateStatus("disconnected"), this.dispatchEvent(new CustomEvent("call-ended")), requestAnimationFrame(() => {
18396
+ this.room = null, this.connectedParticipants = [], this.microphoneEnabled = !1, this.audioPlaybackPrompt = !1, this.isReady = !1, this.cleanupFadeContext(), this.unmuteTimer && (clearTimeout(this.unmuteTimer), this.unmuteTimer = null), this.speakingHandler && (A.localParticipant.off("isSpeakingChanged", this.speakingHandler), this.speakingHandler = null), this.updateStatus("disconnected"), this.dispatchEvent(new CustomEvent("call-ended")), A.removeAllListeners(), this.noiseFilterAttached = !1, requestAnimationFrame(() => {
18395
18397
  setTimeout(async () => {
18396
18398
  try {
18397
18399
  await A.disconnect();
@@ -18403,13 +18405,13 @@ const Qf = of(), $B = Qf ? af() : null, at = class at extends EventTarget {
18403
18405
  }
18404
18406
  };
18405
18407
  at.UNMUTE_HOLDOVER_MS = 350, at.FADEOUT_TC = 0.045, at.FADEIN_TC = 0.03;
18406
- let _I = at;
18408
+ let Ji = at;
18407
18409
  /**
18408
18410
  * @license
18409
18411
  * Copyright 2010-2025 Three.js Authors
18410
18412
  * SPDX-License-Identifier: MIT
18411
18413
  */
18412
- const rs = "182", nf = 0, AE = 1, sf = 2, so = 1, Bf = 2, ZI = 3, Jg = 0, Qt = 1, Fg = 2, Lg = 0, dI = 1, VQ = 2, eE = 3, tE = 4, Ef = 5, Ni = 100, rf = 101, cf = 102, hf = 103, df = 104, xf = 200, lf = 201, ff = 202, uf = 203, jQ = 204, WQ = 205, Df = 206, _f = 207, pf = 208, wf = 209, mf = 210, yf = 211, bf = 212, Nf = 213, Sf = 214, XQ = 0, ZQ = 1, zQ = 2, pI = 3, $Q = 4, An = 5, en = 6, tn = 7, V0 = 0, kf = 1, Rf = 2, Bg = 0, j0 = 1, W0 = 2, X0 = 3, Z0 = 4, z0 = 5, $0 = 6, Ac = 7, ec = 300, Ji = 301, wI = 302, gn = 303, In = 304, Vo = 306, Cn = 1e3, Ug = 1001, on = 1002, tt = 1003, Gf = 1004, SC = 1005, It = 1006, Ga = 1007, Ri = 1008, Lt = 1009, tc = 1010, gc = 1011, EC = 1012, cs = 1013, dg = 1014, ag = 1015, Yg = 1016, hs = 1017, ds = 1018, rC = 1020, ic = 35902, Ic = 35899, Cc = 1021, oc = 1022, Xt = 1023, Tg = 1026, Gi = 1027, ac = 1028, xs = 1029, mI = 1030, ls = 1031, fs = 1033, Bo = 33776, Eo = 33777, ro = 33778, co = 33779, an = 35840, Qn = 35841, nn = 35842, sn = 35843, Bn = 36196, En = 37492, rn = 37496, cn = 37488, hn = 37489, dn = 37490, xn = 37491, ln = 37808, fn = 37809, un = 37810, Dn = 37811, _n = 37812, pn = 37813, wn = 37814, mn = 37815, yn = 37816, bn = 37817, Nn = 37818, Sn = 37819, kn = 37820, Rn = 37821, Gn = 36492, Mn = 36494, Fn = 36495, Un = 36283, Ln = 36284, Kn = 36285, vn = 36286, Mf = 3200, Ff = 0, Uf = 1, Ii = "", Ft = "srgb", yI = "srgb-linear", Go = "linear", fe = "srgb", Vi = 7680, gE = 519, Lf = 512, Kf = 513, vf = 514, us = 515, Jf = 516, Yf = 517, Ds = 518, Tf = 519, iE = 35044, IE = "300 es", Qg = 2e3, Mo = 2001;
18414
+ const rs = "182", nf = 0, AE = 1, sf = 2, so = 1, Bf = 2, ZI = 3, Jg = 0, Qt = 1, Fg = 2, Lg = 0, xI = 1, VQ = 2, eE = 3, tE = 4, Ef = 5, Ni = 100, rf = 101, cf = 102, hf = 103, df = 104, xf = 200, lf = 201, ff = 202, uf = 203, jQ = 204, WQ = 205, Df = 206, _f = 207, pf = 208, wf = 209, mf = 210, yf = 211, bf = 212, Nf = 213, Sf = 214, XQ = 0, ZQ = 1, zQ = 2, pI = 3, $Q = 4, An = 5, en = 6, tn = 7, V0 = 0, kf = 1, Rf = 2, Bg = 0, j0 = 1, W0 = 2, X0 = 3, Z0 = 4, z0 = 5, $0 = 6, Ac = 7, ec = 300, Yi = 301, wI = 302, gn = 303, In = 304, Vo = 306, Cn = 1e3, Ug = 1001, on = 1002, tt = 1003, Gf = 1004, SC = 1005, It = 1006, Ga = 1007, Ri = 1008, Lt = 1009, tc = 1010, gc = 1011, EC = 1012, cs = 1013, dg = 1014, ag = 1015, Yg = 1016, hs = 1017, ds = 1018, rC = 1020, ic = 35902, Ic = 35899, Cc = 1021, oc = 1022, Xt = 1023, Tg = 1026, Gi = 1027, ac = 1028, xs = 1029, mI = 1030, ls = 1031, fs = 1033, Bo = 33776, Eo = 33777, ro = 33778, co = 33779, an = 35840, Qn = 35841, nn = 35842, sn = 35843, Bn = 36196, En = 37492, rn = 37496, cn = 37488, hn = 37489, dn = 37490, xn = 37491, ln = 37808, fn = 37809, un = 37810, Dn = 37811, _n = 37812, pn = 37813, wn = 37814, mn = 37815, yn = 37816, bn = 37817, Nn = 37818, Sn = 37819, kn = 37820, Rn = 37821, Gn = 36492, Mn = 36494, Fn = 36495, Un = 36283, Ln = 36284, Kn = 36285, vn = 36286, Mf = 3200, Ff = 0, Uf = 1, Ii = "", Ft = "srgb", yI = "srgb-linear", Go = "linear", fe = "srgb", ji = 7680, gE = 519, Lf = 512, Kf = 513, vf = 514, us = 515, Jf = 516, Yf = 517, Ds = 518, Tf = 519, iE = 35044, IE = "300 es", Qg = 2e3, Mo = 2001;
18413
18415
  function Qc(g) {
18414
18416
  for (let A = g.length - 1; A >= 0; --A)
18415
18417
  if (g[A] >= 65535) return !0;
@@ -18517,7 +18519,7 @@ function lC() {
18517
18519
  const g = Math.random() * 4294967295 | 0, A = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0;
18518
18520
  return (gt[g & 255] + gt[g >> 8 & 255] + gt[g >> 16 & 255] + gt[g >> 24 & 255] + "-" + gt[A & 255] + gt[A >> 8 & 255] + "-" + gt[A >> 16 & 15 | 64] + gt[A >> 24 & 255] + "-" + gt[e & 63 | 128] + gt[e >> 8 & 255] + "-" + gt[e >> 16 & 255] + gt[e >> 24 & 255] + gt[t & 255] + gt[t >> 8 & 255] + gt[t >> 16 & 255] + gt[t >> 24 & 255]).toLowerCase();
18519
18521
  }
18520
- function Ie(g, A, e) {
18522
+ function Ce(g, A, e) {
18521
18523
  return Math.max(A, Math.min(e, g));
18522
18524
  }
18523
18525
  function Pf(g, A) {
@@ -18832,7 +18834,7 @@ class ce {
18832
18834
  * @return {Vector2} A reference to this vector.
18833
18835
  */
18834
18836
  clamp(A, e) {
18835
- return this.x = Ie(this.x, A.x, e.x), this.y = Ie(this.y, A.y, e.y), this;
18837
+ return this.x = Ce(this.x, A.x, e.x), this.y = Ce(this.y, A.y, e.y), this;
18836
18838
  }
18837
18839
  /**
18838
18840
  * If this vector's x or y values are greater than the max value, they are
@@ -18845,7 +18847,7 @@ class ce {
18845
18847
  * @return {Vector2} A reference to this vector.
18846
18848
  */
18847
18849
  clampScalar(A, e) {
18848
- return this.x = Ie(this.x, A, e), this.y = Ie(this.y, A, e), this;
18850
+ return this.x = Ce(this.x, A, e), this.y = Ce(this.y, A, e), this;
18849
18851
  }
18850
18852
  /**
18851
18853
  * If this vector's length is greater than the max value, it is replaced by
@@ -18859,7 +18861,7 @@ class ce {
18859
18861
  */
18860
18862
  clampLength(A, e) {
18861
18863
  const t = this.length();
18862
- return this.divideScalar(t || 1).multiplyScalar(Ie(t, A, e));
18864
+ return this.divideScalar(t || 1).multiplyScalar(Ce(t, A, e));
18863
18865
  }
18864
18866
  /**
18865
18867
  * The components of this vector are rounded down to the nearest integer value.
@@ -18973,7 +18975,7 @@ class ce {
18973
18975
  const e = Math.sqrt(this.lengthSq() * A.lengthSq());
18974
18976
  if (e === 0) return Math.PI / 2;
18975
18977
  const t = this.dot(A) / e;
18976
- return Math.acos(Ie(t, -1, 1));
18978
+ return Math.acos(Ce(t, -1, 1));
18977
18979
  }
18978
18980
  /**
18979
18981
  * Computes the distance from the given vector to this instance.
@@ -19336,7 +19338,7 @@ class fC {
19336
19338
  * @return {number} The angle in radians.
19337
19339
  */
19338
19340
  angleTo(A) {
19339
- return 2 * Math.acos(Math.abs(Ie(this.dot(A), -1, 1)));
19341
+ return 2 * Math.acos(Math.abs(Ce(this.dot(A), -1, 1)));
19340
19342
  }
19341
19343
  /**
19342
19344
  * Rotates this quaternion by a given angular step to the given quaternion.
@@ -19902,7 +19904,7 @@ class v {
19902
19904
  * @return {Vector3} A reference to this vector.
19903
19905
  */
19904
19906
  clamp(A, e) {
19905
- return this.x = Ie(this.x, A.x, e.x), this.y = Ie(this.y, A.y, e.y), this.z = Ie(this.z, A.z, e.z), this;
19907
+ return this.x = Ce(this.x, A.x, e.x), this.y = Ce(this.y, A.y, e.y), this.z = Ce(this.z, A.z, e.z), this;
19906
19908
  }
19907
19909
  /**
19908
19910
  * If this vector's x, y or z values are greater than the max value, they are
@@ -19915,7 +19917,7 @@ class v {
19915
19917
  * @return {Vector3} A reference to this vector.
19916
19918
  */
19917
19919
  clampScalar(A, e) {
19918
- return this.x = Ie(this.x, A, e), this.y = Ie(this.y, A, e), this.z = Ie(this.z, A, e), this;
19920
+ return this.x = Ce(this.x, A, e), this.y = Ce(this.y, A, e), this.z = Ce(this.z, A, e), this;
19919
19921
  }
19920
19922
  /**
19921
19923
  * If this vector's length is greater than the max value, it is replaced by
@@ -19929,7 +19931,7 @@ class v {
19929
19931
  */
19930
19932
  clampLength(A, e) {
19931
19933
  const t = this.length();
19932
- return this.divideScalar(t || 1).multiplyScalar(Ie(t, A, e));
19934
+ return this.divideScalar(t || 1).multiplyScalar(Ce(t, A, e));
19933
19935
  }
19934
19936
  /**
19935
19937
  * The components of this vector are rounded down to the nearest integer value.
@@ -20113,7 +20115,7 @@ class v {
20113
20115
  const e = Math.sqrt(this.lengthSq() * A.lengthSq());
20114
20116
  if (e === 0) return Math.PI / 2;
20115
20117
  const t = this.dot(A) / e;
20116
- return Math.acos(Ie(t, -1, 1));
20118
+ return Math.acos(Ce(t, -1, 1));
20117
20119
  }
20118
20120
  /**
20119
20121
  * Computes the distance from the given vector to this instance.
@@ -20311,7 +20313,7 @@ class v {
20311
20313
  }
20312
20314
  }
20313
20315
  const Ua = /* @__PURE__ */ new v(), aE = /* @__PURE__ */ new fC();
20314
- class YA {
20316
+ class TA {
20315
20317
  /**
20316
20318
  * Constructs a new 3x3 matrix. The arguments are supposed to be
20317
20319
  * in row-major order. If no arguments are provided, the constructor
@@ -20328,7 +20330,7 @@ class YA {
20328
20330
  * @param {number} [n33] - 3-3 matrix element.
20329
20331
  */
20330
20332
  constructor(A, e, t, i, I, C, o, a, Q) {
20331
- YA.prototype.isMatrix3 = !0, this.elements = [
20333
+ TA.prototype.isMatrix3 = !0, this.elements = [
20332
20334
  1,
20333
20335
  0,
20334
20336
  0,
@@ -20681,7 +20683,7 @@ class YA {
20681
20683
  return new this.constructor().fromArray(this.elements);
20682
20684
  }
20683
20685
  }
20684
- const La = /* @__PURE__ */ new YA(), QE = /* @__PURE__ */ new YA().set(
20686
+ const La = /* @__PURE__ */ new TA(), QE = /* @__PURE__ */ new TA().set(
20685
20687
  0.4123908,
20686
20688
  0.3575843,
20687
20689
  0.1804808,
@@ -20691,7 +20693,7 @@ const La = /* @__PURE__ */ new YA(), QE = /* @__PURE__ */ new YA().set(
20691
20693
  0.0193308,
20692
20694
  0.1191948,
20693
20695
  0.9505322
20694
- ), nE = /* @__PURE__ */ new YA().set(
20696
+ ), nE = /* @__PURE__ */ new TA().set(
20695
20697
  3.2409699,
20696
20698
  -1.5373832,
20697
20699
  -0.4986108,
@@ -20726,7 +20728,7 @@ function Of() {
20726
20728
  */
20727
20729
  spaces: {},
20728
20730
  convert: function(i, I, C) {
20729
- return this.enabled === !1 || I === C || !I || !C || (this.spaces[I].transfer === fe && (i.r = Kg(i.r), i.g = Kg(i.g), i.b = Kg(i.b)), this.spaces[I].primaries !== this.spaces[C].primaries && (i.applyMatrix3(this.spaces[I].toXYZ), i.applyMatrix3(this.spaces[C].fromXYZ)), this.spaces[C].transfer === fe && (i.r = xI(i.r), i.g = xI(i.g), i.b = xI(i.b))), i;
20731
+ return this.enabled === !1 || I === C || !I || !C || (this.spaces[I].transfer === fe && (i.r = Kg(i.r), i.g = Kg(i.g), i.b = Kg(i.b)), this.spaces[I].primaries !== this.spaces[C].primaries && (i.applyMatrix3(this.spaces[I].toXYZ), i.applyMatrix3(this.spaces[C].fromXYZ)), this.spaces[C].transfer === fe && (i.r = lI(i.r), i.g = lI(i.g), i.b = lI(i.b))), i;
20730
20732
  },
20731
20733
  workingToColorSpace: function(i, I) {
20732
20734
  return this.convert(i, this.workingColorSpace, I);
@@ -20793,10 +20795,10 @@ const ne = /* @__PURE__ */ Of();
20793
20795
  function Kg(g) {
20794
20796
  return g < 0.04045 ? g * 0.0773993808 : Math.pow(g * 0.9478672986 + 0.0521327014, 2.4);
20795
20797
  }
20796
- function xI(g) {
20798
+ function lI(g) {
20797
20799
  return g < 31308e-7 ? g * 12.92 : 1.055 * Math.pow(g, 0.41666) - 0.055;
20798
20800
  }
20799
- let ji;
20801
+ let Wi;
20800
20802
  class Vf {
20801
20803
  /**
20802
20804
  * Returns a data URI containing a representation of the given image.
@@ -20812,9 +20814,9 @@ class Vf {
20812
20814
  if (A instanceof HTMLCanvasElement)
20813
20815
  t = A;
20814
20816
  else {
20815
- ji === void 0 && (ji = Fo("canvas")), ji.width = A.width, ji.height = A.height;
20816
- const i = ji.getContext("2d");
20817
- A instanceof ImageData ? i.putImageData(A, 0, 0) : i.drawImage(A, 0, 0, A.width, A.height), t = ji;
20817
+ Wi === void 0 && (Wi = Fo("canvas")), Wi.width = A.width, Wi.height = A.height;
20818
+ const i = Wi.getContext("2d");
20819
+ A instanceof ImageData ? i.putImageData(A, 0, 0) : i.drawImage(A, 0, 0, A.width, A.height), t = Wi;
20818
20820
  }
20819
20821
  return t.toDataURL(e);
20820
20822
  }
@@ -20933,7 +20935,7 @@ class nt extends kI {
20933
20935
  * @param {string} [colorSpace=NoColorSpace] - The color space.
20934
20936
  */
20935
20937
  constructor(A = nt.DEFAULT_IMAGE, e = nt.DEFAULT_MAPPING, t = Ug, i = Ug, I = It, C = Ri, o = Xt, a = Lt, Q = nt.DEFAULT_ANISOTROPY, n = Ii) {
20936
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: Wf++ }), this.uuid = lC(), this.name = "", this.source = new _s(A), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = t, this.wrapT = i, this.magFilter = I, this.minFilter = C, this.anisotropy = Q, this.format = o, this.internalFormat = null, this.type = a, this.offset = new ce(0, 0), this.repeat = new ce(1, 1), this.center = new ce(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new YA(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = n, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(A && A.depth && A.depth > 1), this.pmremVersion = 0;
20938
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: Wf++ }), this.uuid = lC(), this.name = "", this.source = new _s(A), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = t, this.wrapT = i, this.magFilter = I, this.minFilter = C, this.anisotropy = Q, this.format = o, this.internalFormat = null, this.type = a, this.offset = new ce(0, 0), this.repeat = new ce(1, 1), this.center = new ce(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new TA(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = n, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(A && A.depth && A.depth > 1), this.pmremVersion = 0;
20937
20939
  }
20938
20940
  /**
20939
20941
  * The width of the texture in pixels.
@@ -21475,7 +21477,7 @@ class Ye {
21475
21477
  * @return {Vector4} A reference to this vector.
21476
21478
  */
21477
21479
  clamp(A, e) {
21478
- return this.x = Ie(this.x, A.x, e.x), this.y = Ie(this.y, A.y, e.y), this.z = Ie(this.z, A.z, e.z), this.w = Ie(this.w, A.w, e.w), this;
21480
+ return this.x = Ce(this.x, A.x, e.x), this.y = Ce(this.y, A.y, e.y), this.z = Ce(this.z, A.z, e.z), this.w = Ce(this.w, A.w, e.w), this;
21479
21481
  }
21480
21482
  /**
21481
21483
  * If this vector's x, y, z or w values are greater than the max value, they are
@@ -21488,7 +21490,7 @@ class Ye {
21488
21490
  * @return {Vector4} A reference to this vector.
21489
21491
  */
21490
21492
  clampScalar(A, e) {
21491
- return this.x = Ie(this.x, A, e), this.y = Ie(this.y, A, e), this.z = Ie(this.z, A, e), this.w = Ie(this.w, A, e), this;
21493
+ return this.x = Ce(this.x, A, e), this.y = Ce(this.y, A, e), this.z = Ce(this.z, A, e), this.w = Ce(this.w, A, e), this;
21492
21494
  }
21493
21495
  /**
21494
21496
  * If this vector's length is greater than the max value, it is replaced by
@@ -21502,7 +21504,7 @@ class Ye {
21502
21504
  */
21503
21505
  clampLength(A, e) {
21504
21506
  const t = this.length();
21505
- return this.divideScalar(t || 1).multiplyScalar(Ie(t, A, e));
21507
+ return this.divideScalar(t || 1).multiplyScalar(Ce(t, A, e));
21506
21508
  }
21507
21509
  /**
21508
21510
  * The components of this vector are rounded down to the nearest integer value.
@@ -22142,7 +22144,7 @@ class uC {
22142
22144
  intersectsTriangle(A) {
22143
22145
  if (this.isEmpty())
22144
22146
  return !1;
22145
- this.getCenter(TI), RC.subVectors(this.max, TI), Wi.subVectors(A.a, TI), Xi.subVectors(A.b, TI), Zi.subVectors(A.c, TI), Vg.subVectors(Xi, Wi), jg.subVectors(Zi, Xi), li.subVectors(Wi, Zi);
22147
+ this.getCenter(TI), RC.subVectors(this.max, TI), Xi.subVectors(A.a, TI), Zi.subVectors(A.b, TI), zi.subVectors(A.c, TI), Vg.subVectors(Zi, Xi), jg.subVectors(zi, Zi), li.subVectors(Xi, zi);
22146
22148
  let e = [
22147
22149
  0,
22148
22150
  -Vg.z,
@@ -22172,7 +22174,7 @@ class uC {
22172
22174
  li.x,
22173
22175
  0
22174
22176
  ];
22175
- return !Ja(e, Wi, Xi, Zi, RC) || (e = [1, 0, 0, 0, 1, 0, 0, 0, 1], !Ja(e, Wi, Xi, Zi, RC)) ? !1 : (GC.crossVectors(Vg, jg), e = [GC.x, GC.y, GC.z], Ja(e, Wi, Xi, Zi, RC));
22177
+ return !Ja(e, Xi, Zi, zi, RC) || (e = [1, 0, 0, 0, 1, 0, 0, 0, 1], !Ja(e, Xi, Zi, zi, RC)) ? !1 : (GC.crossVectors(Vg, jg), e = [GC.x, GC.y, GC.z], Ja(e, Xi, Zi, zi, RC));
22176
22178
  }
22177
22179
  /**
22178
22180
  * Clamps the given point within the bounds of this box.
@@ -22284,7 +22286,7 @@ const ug = [
22284
22286
  /* @__PURE__ */ new v(),
22285
22287
  /* @__PURE__ */ new v(),
22286
22288
  /* @__PURE__ */ new v()
22287
- ], Jt = /* @__PURE__ */ new v(), kC = /* @__PURE__ */ new uC(), Wi = /* @__PURE__ */ new v(), Xi = /* @__PURE__ */ new v(), Zi = /* @__PURE__ */ new v(), Vg = /* @__PURE__ */ new v(), jg = /* @__PURE__ */ new v(), li = /* @__PURE__ */ new v(), TI = /* @__PURE__ */ new v(), RC = /* @__PURE__ */ new v(), GC = /* @__PURE__ */ new v(), fi = /* @__PURE__ */ new v();
22289
+ ], Jt = /* @__PURE__ */ new v(), kC = /* @__PURE__ */ new uC(), Xi = /* @__PURE__ */ new v(), Zi = /* @__PURE__ */ new v(), zi = /* @__PURE__ */ new v(), Vg = /* @__PURE__ */ new v(), jg = /* @__PURE__ */ new v(), li = /* @__PURE__ */ new v(), TI = /* @__PURE__ */ new v(), RC = /* @__PURE__ */ new v(), GC = /* @__PURE__ */ new v(), fi = /* @__PURE__ */ new v();
22288
22290
  function Ja(g, A, e, t, i) {
22289
22291
  for (let I = 0, C = g.length - 3; I <= C; I += 3) {
22290
22292
  fi.fromArray(g, I);
@@ -22973,7 +22975,7 @@ class Ve {
22973
22975
  extractRotation(A) {
22974
22976
  if (A.determinant() === 0)
22975
22977
  return this.identity();
22976
- const e = this.elements, t = A.elements, i = 1 / zi.setFromMatrixColumn(A, 0).length(), I = 1 / zi.setFromMatrixColumn(A, 1).length(), C = 1 / zi.setFromMatrixColumn(A, 2).length();
22978
+ const e = this.elements, t = A.elements, i = 1 / $i.setFromMatrixColumn(A, 0).length(), I = 1 / $i.setFromMatrixColumn(A, 1).length(), C = 1 / $i.setFromMatrixColumn(A, 2).length();
22977
22979
  return e[0] = t[0] * i, e[1] = t[1] * i, e[2] = t[2] * i, e[3] = 0, e[4] = t[4] * I, e[5] = t[5] * I, e[6] = t[6] * I, e[7] = 0, e[8] = t[8] * C, e[9] = t[9] * C, e[10] = t[10] * C, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this;
22978
22980
  }
22979
22981
  /**
@@ -23389,8 +23391,8 @@ class Ve {
23389
23391
  const i = this.elements;
23390
23392
  if (A.x = i[12], A.y = i[13], A.z = i[14], this.determinant() === 0)
23391
23393
  return t.set(1, 1, 1), e.identity(), this;
23392
- let I = zi.set(i[0], i[1], i[2]).length();
23393
- const C = zi.set(i[4], i[5], i[6]).length(), o = zi.set(i[8], i[9], i[10]).length();
23394
+ let I = $i.set(i[0], i[1], i[2]).length();
23395
+ const C = $i.set(i[4], i[5], i[6]).length(), o = $i.set(i[8], i[9], i[10]).length();
23394
23396
  this.determinant() < 0 && (I = -I), Yt.copy(this);
23395
23397
  const Q = 1 / I, n = 1 / C, s = 1 / o;
23396
23398
  return Yt.elements[0] *= Q, Yt.elements[1] *= Q, Yt.elements[2] *= Q, Yt.elements[4] *= n, Yt.elements[5] *= n, Yt.elements[6] *= n, Yt.elements[8] *= s, Yt.elements[9] *= s, Yt.elements[10] *= s, e.setFromRotationMatrix(Yt), t.x = I, t.y = C, t.z = o, this;
@@ -23486,7 +23488,7 @@ class Ve {
23486
23488
  return A[e] = t[0], A[e + 1] = t[1], A[e + 2] = t[2], A[e + 3] = t[3], A[e + 4] = t[4], A[e + 5] = t[5], A[e + 6] = t[6], A[e + 7] = t[7], A[e + 8] = t[8], A[e + 9] = t[9], A[e + 10] = t[10], A[e + 11] = t[11], A[e + 12] = t[12], A[e + 13] = t[13], A[e + 14] = t[14], A[e + 15] = t[15], A;
23487
23489
  }
23488
23490
  }
23489
- const zi = /* @__PURE__ */ new v(), Yt = /* @__PURE__ */ new Ve(), Au = /* @__PURE__ */ new v(0, 0, 0), eu = /* @__PURE__ */ new v(1, 1, 1), Xg = /* @__PURE__ */ new v(), UC = /* @__PURE__ */ new v(), pt = /* @__PURE__ */ new v(), sE = /* @__PURE__ */ new Ve(), BE = /* @__PURE__ */ new fC();
23491
+ const $i = /* @__PURE__ */ new v(), Yt = /* @__PURE__ */ new Ve(), Au = /* @__PURE__ */ new v(0, 0, 0), eu = /* @__PURE__ */ new v(1, 1, 1), Xg = /* @__PURE__ */ new v(), UC = /* @__PURE__ */ new v(), pt = /* @__PURE__ */ new v(), sE = /* @__PURE__ */ new Ve(), BE = /* @__PURE__ */ new fC();
23490
23492
  class qg {
23491
23493
  /**
23492
23494
  * Constructs a new euler instance.
@@ -23588,22 +23590,22 @@ class qg {
23588
23590
  const i = A.elements, I = i[0], C = i[4], o = i[8], a = i[1], Q = i[5], n = i[9], s = i[2], B = i[6], E = i[10];
23589
23591
  switch (e) {
23590
23592
  case "XYZ":
23591
- this._y = Math.asin(Ie(o, -1, 1)), Math.abs(o) < 0.9999999 ? (this._x = Math.atan2(-n, E), this._z = Math.atan2(-C, I)) : (this._x = Math.atan2(B, Q), this._z = 0);
23593
+ this._y = Math.asin(Ce(o, -1, 1)), Math.abs(o) < 0.9999999 ? (this._x = Math.atan2(-n, E), this._z = Math.atan2(-C, I)) : (this._x = Math.atan2(B, Q), this._z = 0);
23592
23594
  break;
23593
23595
  case "YXZ":
23594
- this._x = Math.asin(-Ie(n, -1, 1)), Math.abs(n) < 0.9999999 ? (this._y = Math.atan2(o, E), this._z = Math.atan2(a, Q)) : (this._y = Math.atan2(-s, I), this._z = 0);
23596
+ this._x = Math.asin(-Ce(n, -1, 1)), Math.abs(n) < 0.9999999 ? (this._y = Math.atan2(o, E), this._z = Math.atan2(a, Q)) : (this._y = Math.atan2(-s, I), this._z = 0);
23595
23597
  break;
23596
23598
  case "ZXY":
23597
- this._x = Math.asin(Ie(B, -1, 1)), Math.abs(B) < 0.9999999 ? (this._y = Math.atan2(-s, E), this._z = Math.atan2(-C, Q)) : (this._y = 0, this._z = Math.atan2(a, I));
23599
+ this._x = Math.asin(Ce(B, -1, 1)), Math.abs(B) < 0.9999999 ? (this._y = Math.atan2(-s, E), this._z = Math.atan2(-C, Q)) : (this._y = 0, this._z = Math.atan2(a, I));
23598
23600
  break;
23599
23601
  case "ZYX":
23600
- this._y = Math.asin(-Ie(s, -1, 1)), Math.abs(s) < 0.9999999 ? (this._x = Math.atan2(B, E), this._z = Math.atan2(a, I)) : (this._x = 0, this._z = Math.atan2(-C, Q));
23602
+ this._y = Math.asin(-Ce(s, -1, 1)), Math.abs(s) < 0.9999999 ? (this._x = Math.atan2(B, E), this._z = Math.atan2(a, I)) : (this._x = 0, this._z = Math.atan2(-C, Q));
23601
23603
  break;
23602
23604
  case "YZX":
23603
- this._z = Math.asin(Ie(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(-n, Q), this._y = Math.atan2(-s, I)) : (this._x = 0, this._y = Math.atan2(o, E));
23605
+ this._z = Math.asin(Ce(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(-n, Q), this._y = Math.atan2(-s, I)) : (this._x = 0, this._y = Math.atan2(o, E));
23604
23606
  break;
23605
23607
  case "XZY":
23606
- this._z = Math.asin(-Ie(C, -1, 1)), Math.abs(C) < 0.9999999 ? (this._x = Math.atan2(B, Q), this._y = Math.atan2(o, I)) : (this._x = Math.atan2(-n, E), this._y = 0);
23608
+ this._z = Math.asin(-Ce(C, -1, 1)), Math.abs(C) < 0.9999999 ? (this._x = Math.atan2(B, Q), this._y = Math.atan2(o, I)) : (this._x = Math.atan2(-n, E), this._y = 0);
23607
23609
  break;
23608
23610
  default:
23609
23611
  LA("Euler: .setFromRotationMatrix() encountered an unknown order: " + e);
@@ -23758,7 +23760,7 @@ class sc {
23758
23760
  }
23759
23761
  }
23760
23762
  let tu = 0;
23761
- const EE = /* @__PURE__ */ new v(), $i = /* @__PURE__ */ new fC(), _g = /* @__PURE__ */ new Ve(), LC = /* @__PURE__ */ new v(), HI = /* @__PURE__ */ new v(), gu = /* @__PURE__ */ new v(), iu = /* @__PURE__ */ new fC(), rE = /* @__PURE__ */ new v(1, 0, 0), cE = /* @__PURE__ */ new v(0, 1, 0), hE = /* @__PURE__ */ new v(0, 0, 1), dE = { type: "added" }, Iu = { type: "removed" }, AI = { type: "childadded", child: null }, Pa = { type: "childremoved", child: null };
23763
+ const EE = /* @__PURE__ */ new v(), AI = /* @__PURE__ */ new fC(), _g = /* @__PURE__ */ new Ve(), LC = /* @__PURE__ */ new v(), HI = /* @__PURE__ */ new v(), gu = /* @__PURE__ */ new v(), iu = /* @__PURE__ */ new fC(), rE = /* @__PURE__ */ new v(1, 0, 0), cE = /* @__PURE__ */ new v(0, 1, 0), hE = /* @__PURE__ */ new v(0, 0, 1), dE = { type: "added" }, Iu = { type: "removed" }, eI = { type: "childadded", child: null }, Pa = { type: "childremoved", child: null };
23762
23764
  class kt extends kI {
23763
23765
  /**
23764
23766
  * Constructs a new 3D object.
@@ -23836,7 +23838,7 @@ class kt extends kI {
23836
23838
  * @type {Matrix3}
23837
23839
  */
23838
23840
  normalMatrix: {
23839
- value: new YA()
23841
+ value: new TA()
23840
23842
  }
23841
23843
  }), this.matrix = new Ve(), this.matrixWorld = new Ve(), this.matrixAutoUpdate = kt.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new sc(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.userData = {};
23842
23844
  }
@@ -23950,7 +23952,7 @@ class kt extends kI {
23950
23952
  * @return {Object3D} A reference to this instance.
23951
23953
  */
23952
23954
  rotateOnAxis(A, e) {
23953
- return $i.setFromAxisAngle(A, e), this.quaternion.multiply($i), this;
23955
+ return AI.setFromAxisAngle(A, e), this.quaternion.multiply(AI), this;
23954
23956
  }
23955
23957
  /**
23956
23958
  * Rotates the 3D object along an axis in world space.
@@ -23960,7 +23962,7 @@ class kt extends kI {
23960
23962
  * @return {Object3D} A reference to this instance.
23961
23963
  */
23962
23964
  rotateOnWorldAxis(A, e) {
23963
- return $i.setFromAxisAngle(A, e), this.quaternion.premultiply($i), this;
23965
+ return AI.setFromAxisAngle(A, e), this.quaternion.premultiply(AI), this;
23964
23966
  }
23965
23967
  /**
23966
23968
  * Rotates the 3D object around its X axis in local space.
@@ -24056,7 +24058,7 @@ class kt extends kI {
24056
24058
  lookAt(A, e, t) {
24057
24059
  A.isVector3 ? LC.copy(A) : LC.set(A, e, t);
24058
24060
  const i = this.parent;
24059
- this.updateWorldMatrix(!0, !1), HI.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? _g.lookAt(HI, LC, this.up) : _g.lookAt(LC, HI, this.up), this.quaternion.setFromRotationMatrix(_g), i && (_g.extractRotation(i.matrixWorld), $i.setFromRotationMatrix(_g), this.quaternion.premultiply($i.invert()));
24061
+ this.updateWorldMatrix(!0, !1), HI.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? _g.lookAt(HI, LC, this.up) : _g.lookAt(LC, HI, this.up), this.quaternion.setFromRotationMatrix(_g), i && (_g.extractRotation(i.matrixWorld), AI.setFromRotationMatrix(_g), this.quaternion.premultiply(AI.invert()));
24060
24062
  }
24061
24063
  /**
24062
24064
  * Adds the given 3D object as a child to this 3D object. An arbitrary number of
@@ -24074,7 +24076,7 @@ class kt extends kI {
24074
24076
  this.add(arguments[e]);
24075
24077
  return this;
24076
24078
  }
24077
- return A === this ? (Ee("Object3D.add: object can't be added as a child of itself.", A), this) : (A && A.isObject3D ? (A.removeFromParent(), A.parent = this, this.children.push(A), A.dispatchEvent(dE), AI.child = A, this.dispatchEvent(AI), AI.child = null) : Ee("Object3D.add: object not an instance of THREE.Object3D.", A), this);
24079
+ return A === this ? (Ee("Object3D.add: object can't be added as a child of itself.", A), this) : (A && A.isObject3D ? (A.removeFromParent(), A.parent = this, this.children.push(A), A.dispatchEvent(dE), eI.child = A, this.dispatchEvent(eI), eI.child = null) : Ee("Object3D.add: object not an instance of THREE.Object3D.", A), this);
24078
24080
  }
24079
24081
  /**
24080
24082
  * Removes the given 3D object as child from this 3D object.
@@ -24125,7 +24127,7 @@ class kt extends kI {
24125
24127
  * @return {Object3D} A reference to this instance.
24126
24128
  */
24127
24129
  attach(A) {
24128
- return this.updateWorldMatrix(!0, !1), _g.copy(this.matrixWorld).invert(), A.parent !== null && (A.parent.updateWorldMatrix(!0, !1), _g.multiply(A.parent.matrixWorld)), A.applyMatrix4(_g), A.removeFromParent(), A.parent = this, this.children.push(A), A.updateWorldMatrix(!1, !0), A.dispatchEvent(dE), AI.child = A, this.dispatchEvent(AI), AI.child = null, this;
24130
+ return this.updateWorldMatrix(!0, !1), _g.copy(this.matrixWorld).invert(), A.parent !== null && (A.parent.updateWorldMatrix(!0, !1), _g.multiply(A.parent.matrixWorld)), A.applyMatrix4(_g), A.removeFromParent(), A.parent = this, this.children.push(A), A.updateWorldMatrix(!1, !0), A.dispatchEvent(dE), eI.child = A, this.dispatchEvent(eI), eI.child = null, this;
24129
24131
  }
24130
24132
  /**
24131
24133
  * Searches through the 3D object and its children, starting with the 3D object
@@ -24416,7 +24418,7 @@ class kt extends kI {
24416
24418
  kt.DEFAULT_UP = /* @__PURE__ */ new v(0, 1, 0);
24417
24419
  kt.DEFAULT_MATRIX_AUTO_UPDATE = !0;
24418
24420
  kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
24419
- const Tt = /* @__PURE__ */ new v(), pg = /* @__PURE__ */ new v(), Oa = /* @__PURE__ */ new v(), wg = /* @__PURE__ */ new v(), eI = /* @__PURE__ */ new v(), tI = /* @__PURE__ */ new v(), xE = /* @__PURE__ */ new v(), Va = /* @__PURE__ */ new v(), ja = /* @__PURE__ */ new v(), Wa = /* @__PURE__ */ new v(), Xa = /* @__PURE__ */ new Ye(), Za = /* @__PURE__ */ new Ye(), za = /* @__PURE__ */ new Ye();
24421
+ const Tt = /* @__PURE__ */ new v(), pg = /* @__PURE__ */ new v(), Oa = /* @__PURE__ */ new v(), wg = /* @__PURE__ */ new v(), tI = /* @__PURE__ */ new v(), gI = /* @__PURE__ */ new v(), xE = /* @__PURE__ */ new v(), Va = /* @__PURE__ */ new v(), ja = /* @__PURE__ */ new v(), Wa = /* @__PURE__ */ new v(), Xa = /* @__PURE__ */ new Ye(), Za = /* @__PURE__ */ new Ye(), za = /* @__PURE__ */ new Ye();
24420
24422
  class jt {
24421
24423
  /**
24422
24424
  * Constructs a new triangle.
@@ -24669,29 +24671,29 @@ class jt {
24669
24671
  closestPointToPoint(A, e) {
24670
24672
  const t = this.a, i = this.b, I = this.c;
24671
24673
  let C, o;
24672
- eI.subVectors(i, t), tI.subVectors(I, t), Va.subVectors(A, t);
24673
- const a = eI.dot(Va), Q = tI.dot(Va);
24674
+ tI.subVectors(i, t), gI.subVectors(I, t), Va.subVectors(A, t);
24675
+ const a = tI.dot(Va), Q = gI.dot(Va);
24674
24676
  if (a <= 0 && Q <= 0)
24675
24677
  return e.copy(t);
24676
24678
  ja.subVectors(A, i);
24677
- const n = eI.dot(ja), s = tI.dot(ja);
24679
+ const n = tI.dot(ja), s = gI.dot(ja);
24678
24680
  if (n >= 0 && s <= n)
24679
24681
  return e.copy(i);
24680
24682
  const B = a * s - n * Q;
24681
24683
  if (B <= 0 && a >= 0 && n <= 0)
24682
- return C = a / (a - n), e.copy(t).addScaledVector(eI, C);
24684
+ return C = a / (a - n), e.copy(t).addScaledVector(tI, C);
24683
24685
  Wa.subVectors(A, I);
24684
- const E = eI.dot(Wa), d = tI.dot(Wa);
24686
+ const E = tI.dot(Wa), d = gI.dot(Wa);
24685
24687
  if (d >= 0 && E <= d)
24686
24688
  return e.copy(I);
24687
24689
  const c = E * Q - a * d;
24688
24690
  if (c <= 0 && Q >= 0 && d <= 0)
24689
- return o = Q / (Q - d), e.copy(t).addScaledVector(tI, o);
24691
+ return o = Q / (Q - d), e.copy(t).addScaledVector(gI, o);
24690
24692
  const h = n * d - E * s;
24691
24693
  if (h <= 0 && s - n >= 0 && E - d >= 0)
24692
24694
  return xE.subVectors(I, i), o = (s - n) / (s - n + (E - d)), e.copy(i).addScaledVector(xE, o);
24693
24695
  const r = 1 / (h + c + B);
24694
- return C = c * r, o = B * r, e.copy(t).addScaledVector(eI, C).addScaledVector(tI, o);
24696
+ return C = c * r, o = B * r, e.copy(t).addScaledVector(tI, C).addScaledVector(gI, o);
24695
24697
  }
24696
24698
  /**
24697
24699
  * Returns `true` if this triangle is equal with the given one.
@@ -24929,7 +24931,7 @@ class ae {
24929
24931
  * @return {Color} A reference to this color.
24930
24932
  */
24931
24933
  setHSL(A, e, t, i = ne.workingColorSpace) {
24932
- if (A = Pf(A, 1), e = Ie(e, 0, 1), t = Ie(t, 0, 1), e === 0)
24934
+ if (A = Pf(A, 1), e = Ce(e, 0, 1), t = Ce(t, 0, 1), e === 0)
24933
24935
  this.r = this.g = this.b = t;
24934
24936
  else {
24935
24937
  const I = t <= 0.5 ? t * (1 + e) : t + e - t * e, C = 2 * t - I;
@@ -25054,7 +25056,7 @@ class ae {
25054
25056
  * @return {Color} A reference to this color.
25055
25057
  */
25056
25058
  copyLinearToSRGB(A) {
25057
- return this.r = xI(A.r), this.g = xI(A.g), this.b = xI(A.b), this;
25059
+ return this.r = lI(A.r), this.g = lI(A.g), this.b = lI(A.b), this;
25058
25060
  }
25059
25061
  /**
25060
25062
  * Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.
@@ -25079,7 +25081,7 @@ class ae {
25079
25081
  * @return {number} The hexadecimal value.
25080
25082
  */
25081
25083
  getHex(A = Ft) {
25082
- return ne.workingToColorSpace(it.copy(this), A), Math.round(Ie(it.r * 255, 0, 255)) * 65536 + Math.round(Ie(it.g * 255, 0, 255)) * 256 + Math.round(Ie(it.b * 255, 0, 255));
25084
+ return ne.workingToColorSpace(it.copy(this), A), Math.round(Ce(it.r * 255, 0, 255)) * 65536 + Math.round(Ce(it.g * 255, 0, 255)) * 256 + Math.round(Ce(it.b * 255, 0, 255));
25083
25085
  }
25084
25086
  /**
25085
25087
  * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').
@@ -25332,7 +25334,7 @@ class jo extends kI {
25332
25334
  * Constructs a new material.
25333
25335
  */
25334
25336
  constructor() {
25335
- super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Cu++ }), this.uuid = lC(), this.name = "", this.type = "Material", this.blending = dI, this.side = Jg, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = jQ, this.blendDst = WQ, this.blendEquation = Ni, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new ae(0, 0, 0), this.blendAlpha = 0, this.depthFunc = pI, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = gE, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Vi, this.stencilZFail = Vi, this.stencilZPass = Vi, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
25337
+ super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Cu++ }), this.uuid = lC(), this.name = "", this.type = "Material", this.blending = xI, this.side = Jg, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = jQ, this.blendDst = WQ, this.blendEquation = Ni, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new ae(0, 0, 0), this.blendAlpha = 0, this.depthFunc = pI, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = gE, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = ji, this.stencilZFail = ji, this.stencilZPass = ji, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
25336
25338
  }
25337
25339
  /**
25338
25340
  * Sets the alpha value to be used when running an alpha test. The material
@@ -25431,7 +25433,7 @@ class jo extends kI {
25431
25433
  generator: "Material.toJSON"
25432
25434
  }
25433
25435
  };
25434
- t.uuid = this.uuid, t.type = this.type, this.name !== "" && (t.name = this.name), this.color && this.color.isColor && (t.color = this.color.getHex()), this.roughness !== void 0 && (t.roughness = this.roughness), this.metalness !== void 0 && (t.metalness = this.metalness), this.sheen !== void 0 && (t.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (t.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (t.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (t.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (t.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (t.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (t.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (t.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (t.shininess = this.shininess), this.clearcoat !== void 0 && (t.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (t.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (t.clearcoatMap = this.clearcoatMap.toJSON(A).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (t.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(A).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (t.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(A).uuid, t.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (t.sheenColorMap = this.sheenColorMap.toJSON(A).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (t.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(A).uuid), this.dispersion !== void 0 && (t.dispersion = this.dispersion), this.iridescence !== void 0 && (t.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (t.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (t.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (t.iridescenceMap = this.iridescenceMap.toJSON(A).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (t.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(A).uuid), this.anisotropy !== void 0 && (t.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (t.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (t.anisotropyMap = this.anisotropyMap.toJSON(A).uuid), this.map && this.map.isTexture && (t.map = this.map.toJSON(A).uuid), this.matcap && this.matcap.isTexture && (t.matcap = this.matcap.toJSON(A).uuid), this.alphaMap && this.alphaMap.isTexture && (t.alphaMap = this.alphaMap.toJSON(A).uuid), this.lightMap && this.lightMap.isTexture && (t.lightMap = this.lightMap.toJSON(A).uuid, t.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (t.aoMap = this.aoMap.toJSON(A).uuid, t.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (t.bumpMap = this.bumpMap.toJSON(A).uuid, t.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (t.normalMap = this.normalMap.toJSON(A).uuid, t.normalMapType = this.normalMapType, t.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (t.displacementMap = this.displacementMap.toJSON(A).uuid, t.displacementScale = this.displacementScale, t.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (t.roughnessMap = this.roughnessMap.toJSON(A).uuid), this.metalnessMap && this.metalnessMap.isTexture && (t.metalnessMap = this.metalnessMap.toJSON(A).uuid), this.emissiveMap && this.emissiveMap.isTexture && (t.emissiveMap = this.emissiveMap.toJSON(A).uuid), this.specularMap && this.specularMap.isTexture && (t.specularMap = this.specularMap.toJSON(A).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (t.specularIntensityMap = this.specularIntensityMap.toJSON(A).uuid), this.specularColorMap && this.specularColorMap.isTexture && (t.specularColorMap = this.specularColorMap.toJSON(A).uuid), this.envMap && this.envMap.isTexture && (t.envMap = this.envMap.toJSON(A).uuid, this.combine !== void 0 && (t.combine = this.combine)), this.envMapRotation !== void 0 && (t.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (t.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (t.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (t.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (t.gradientMap = this.gradientMap.toJSON(A).uuid), this.transmission !== void 0 && (t.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (t.transmissionMap = this.transmissionMap.toJSON(A).uuid), this.thickness !== void 0 && (t.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (t.thicknessMap = this.thicknessMap.toJSON(A).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (t.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (t.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (t.size = this.size), this.shadowSide !== null && (t.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (t.sizeAttenuation = this.sizeAttenuation), this.blending !== dI && (t.blending = this.blending), this.side !== Jg && (t.side = this.side), this.vertexColors === !0 && (t.vertexColors = !0), this.opacity < 1 && (t.opacity = this.opacity), this.transparent === !0 && (t.transparent = !0), this.blendSrc !== jQ && (t.blendSrc = this.blendSrc), this.blendDst !== WQ && (t.blendDst = this.blendDst), this.blendEquation !== Ni && (t.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (t.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (t.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (t.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (t.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (t.blendAlpha = this.blendAlpha), this.depthFunc !== pI && (t.depthFunc = this.depthFunc), this.depthTest === !1 && (t.depthTest = this.depthTest), this.depthWrite === !1 && (t.depthWrite = this.depthWrite), this.colorWrite === !1 && (t.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (t.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== gE && (t.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (t.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (t.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Vi && (t.stencilFail = this.stencilFail), this.stencilZFail !== Vi && (t.stencilZFail = this.stencilZFail), this.stencilZPass !== Vi && (t.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (t.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (t.rotation = this.rotation), this.polygonOffset === !0 && (t.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (t.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (t.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (t.linewidth = this.linewidth), this.dashSize !== void 0 && (t.dashSize = this.dashSize), this.gapSize !== void 0 && (t.gapSize = this.gapSize), this.scale !== void 0 && (t.scale = this.scale), this.dithering === !0 && (t.dithering = !0), this.alphaTest > 0 && (t.alphaTest = this.alphaTest), this.alphaHash === !0 && (t.alphaHash = !0), this.alphaToCoverage === !0 && (t.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (t.premultipliedAlpha = !0), this.forceSinglePass === !0 && (t.forceSinglePass = !0), this.allowOverride === !1 && (t.allowOverride = !1), this.wireframe === !0 && (t.wireframe = !0), this.wireframeLinewidth > 1 && (t.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (t.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (t.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (t.flatShading = !0), this.visible === !1 && (t.visible = !1), this.toneMapped === !1 && (t.toneMapped = !1), this.fog === !1 && (t.fog = !1), Object.keys(this.userData).length > 0 && (t.userData = this.userData);
25436
+ t.uuid = this.uuid, t.type = this.type, this.name !== "" && (t.name = this.name), this.color && this.color.isColor && (t.color = this.color.getHex()), this.roughness !== void 0 && (t.roughness = this.roughness), this.metalness !== void 0 && (t.metalness = this.metalness), this.sheen !== void 0 && (t.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (t.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (t.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (t.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (t.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (t.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (t.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (t.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (t.shininess = this.shininess), this.clearcoat !== void 0 && (t.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (t.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (t.clearcoatMap = this.clearcoatMap.toJSON(A).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (t.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(A).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (t.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(A).uuid, t.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (t.sheenColorMap = this.sheenColorMap.toJSON(A).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (t.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(A).uuid), this.dispersion !== void 0 && (t.dispersion = this.dispersion), this.iridescence !== void 0 && (t.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (t.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (t.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (t.iridescenceMap = this.iridescenceMap.toJSON(A).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (t.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(A).uuid), this.anisotropy !== void 0 && (t.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (t.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (t.anisotropyMap = this.anisotropyMap.toJSON(A).uuid), this.map && this.map.isTexture && (t.map = this.map.toJSON(A).uuid), this.matcap && this.matcap.isTexture && (t.matcap = this.matcap.toJSON(A).uuid), this.alphaMap && this.alphaMap.isTexture && (t.alphaMap = this.alphaMap.toJSON(A).uuid), this.lightMap && this.lightMap.isTexture && (t.lightMap = this.lightMap.toJSON(A).uuid, t.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (t.aoMap = this.aoMap.toJSON(A).uuid, t.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (t.bumpMap = this.bumpMap.toJSON(A).uuid, t.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (t.normalMap = this.normalMap.toJSON(A).uuid, t.normalMapType = this.normalMapType, t.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (t.displacementMap = this.displacementMap.toJSON(A).uuid, t.displacementScale = this.displacementScale, t.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (t.roughnessMap = this.roughnessMap.toJSON(A).uuid), this.metalnessMap && this.metalnessMap.isTexture && (t.metalnessMap = this.metalnessMap.toJSON(A).uuid), this.emissiveMap && this.emissiveMap.isTexture && (t.emissiveMap = this.emissiveMap.toJSON(A).uuid), this.specularMap && this.specularMap.isTexture && (t.specularMap = this.specularMap.toJSON(A).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (t.specularIntensityMap = this.specularIntensityMap.toJSON(A).uuid), this.specularColorMap && this.specularColorMap.isTexture && (t.specularColorMap = this.specularColorMap.toJSON(A).uuid), this.envMap && this.envMap.isTexture && (t.envMap = this.envMap.toJSON(A).uuid, this.combine !== void 0 && (t.combine = this.combine)), this.envMapRotation !== void 0 && (t.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (t.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (t.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (t.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (t.gradientMap = this.gradientMap.toJSON(A).uuid), this.transmission !== void 0 && (t.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (t.transmissionMap = this.transmissionMap.toJSON(A).uuid), this.thickness !== void 0 && (t.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (t.thicknessMap = this.thicknessMap.toJSON(A).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (t.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (t.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (t.size = this.size), this.shadowSide !== null && (t.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (t.sizeAttenuation = this.sizeAttenuation), this.blending !== xI && (t.blending = this.blending), this.side !== Jg && (t.side = this.side), this.vertexColors === !0 && (t.vertexColors = !0), this.opacity < 1 && (t.opacity = this.opacity), this.transparent === !0 && (t.transparent = !0), this.blendSrc !== jQ && (t.blendSrc = this.blendSrc), this.blendDst !== WQ && (t.blendDst = this.blendDst), this.blendEquation !== Ni && (t.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (t.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (t.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (t.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (t.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (t.blendAlpha = this.blendAlpha), this.depthFunc !== pI && (t.depthFunc = this.depthFunc), this.depthTest === !1 && (t.depthTest = this.depthTest), this.depthWrite === !1 && (t.depthWrite = this.depthWrite), this.colorWrite === !1 && (t.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (t.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== gE && (t.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (t.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (t.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== ji && (t.stencilFail = this.stencilFail), this.stencilZFail !== ji && (t.stencilZFail = this.stencilZFail), this.stencilZPass !== ji && (t.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (t.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (t.rotation = this.rotation), this.polygonOffset === !0 && (t.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (t.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (t.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (t.linewidth = this.linewidth), this.dashSize !== void 0 && (t.dashSize = this.dashSize), this.gapSize !== void 0 && (t.gapSize = this.gapSize), this.scale !== void 0 && (t.scale = this.scale), this.dithering === !0 && (t.dithering = !0), this.alphaTest > 0 && (t.alphaTest = this.alphaTest), this.alphaHash === !0 && (t.alphaHash = !0), this.alphaToCoverage === !0 && (t.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (t.premultipliedAlpha = !0), this.forceSinglePass === !0 && (t.forceSinglePass = !0), this.allowOverride === !1 && (t.allowOverride = !1), this.wireframe === !0 && (t.wireframe = !0), this.wireframeLinewidth > 1 && (t.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (t.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (t.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (t.flatShading = !0), this.visible === !1 && (t.visible = !1), this.toneMapped === !1 && (t.toneMapped = !1), this.fog === !1 && (t.fog = !1), Object.keys(this.userData).length > 0 && (t.userData = this.userData);
25435
25437
  function i(I) {
25436
25438
  const C = [];
25437
25439
  for (const o in I) {
@@ -25871,7 +25873,7 @@ class st extends rg {
25871
25873
  }
25872
25874
  }
25873
25875
  let au = 0;
25874
- const Gt = /* @__PURE__ */ new Ve(), AQ = /* @__PURE__ */ new kt(), gI = /* @__PURE__ */ new v(), wt = /* @__PURE__ */ new uC(), PI = /* @__PURE__ */ new uC(), ze = /* @__PURE__ */ new v();
25876
+ const Gt = /* @__PURE__ */ new Ve(), AQ = /* @__PURE__ */ new kt(), iI = /* @__PURE__ */ new v(), wt = /* @__PURE__ */ new uC(), PI = /* @__PURE__ */ new uC(), ze = /* @__PURE__ */ new v();
25875
25877
  class $t extends kI {
25876
25878
  /**
25877
25879
  * Constructs a new geometry.
@@ -25994,7 +25996,7 @@ class $t extends kI {
25994
25996
  e !== void 0 && (e.applyMatrix4(A), e.needsUpdate = !0);
25995
25997
  const t = this.attributes.normal;
25996
25998
  if (t !== void 0) {
25997
- const I = new YA().getNormalMatrix(A);
25999
+ const I = new TA().getNormalMatrix(A);
25998
26000
  t.applyNormalMatrix(I), t.needsUpdate = !0;
25999
26001
  }
26000
26002
  const i = this.attributes.tangent;
@@ -26085,7 +26087,7 @@ class $t extends kI {
26085
26087
  * @return {BufferGeometry} A reference to this instance.
26086
26088
  */
26087
26089
  center() {
26088
- return this.computeBoundingBox(), this.boundingBox.getCenter(gI).negate(), this.translate(gI.x, gI.y, gI.z), this;
26090
+ return this.computeBoundingBox(), this.boundingBox.getCenter(iI).negate(), this.translate(iI.x, iI.y, iI.z), this;
26089
26091
  }
26090
26092
  /**
26091
26093
  * Defines a geometry by creating a `position` attribute based on the given array of points. The array
@@ -26169,7 +26171,7 @@ class $t extends kI {
26169
26171
  for (let I = 0, C = e.length; I < C; I++) {
26170
26172
  const o = e[I], a = this.morphTargetsRelative;
26171
26173
  for (let Q = 0, n = o.count; Q < n; Q++)
26172
- ze.fromBufferAttribute(o, Q), a && (gI.fromBufferAttribute(A, Q), ze.add(gI)), i = Math.max(i, t.distanceToSquared(ze));
26174
+ ze.fromBufferAttribute(o, Q), a && (iI.fromBufferAttribute(A, Q), ze.add(iI)), i = Math.max(i, t.distanceToSquared(ze));
26173
26175
  }
26174
26176
  this.boundingSphere.radius = Math.sqrt(i), isNaN(this.boundingSphere.radius) && Ee('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
26175
26177
  }
@@ -26894,7 +26896,7 @@ class Ut extends dc {
26894
26896
  return e.object.fov = this.fov, e.object.zoom = this.zoom, e.object.near = this.near, e.object.far = this.far, e.object.focus = this.focus, e.object.aspect = this.aspect, this.view !== null && (e.object.view = Object.assign({}, this.view)), e.object.filmGauge = this.filmGauge, e.object.filmOffset = this.filmOffset, e;
26895
26897
  }
26896
26898
  }
26897
- const iI = -90, II = 1;
26899
+ const II = -90, CI = 1;
26898
26900
  class ru extends kt {
26899
26901
  /**
26900
26902
  * Constructs a new cube camera.
@@ -26905,17 +26907,17 @@ class ru extends kt {
26905
26907
  */
26906
26908
  constructor(A, e, t) {
26907
26909
  super(), this.type = "CubeCamera", this.renderTarget = t, this.coordinateSystem = null, this.activeMipmapLevel = 0;
26908
- const i = new Ut(iI, II, A, e);
26910
+ const i = new Ut(II, CI, A, e);
26909
26911
  i.layers = this.layers, this.add(i);
26910
- const I = new Ut(iI, II, A, e);
26912
+ const I = new Ut(II, CI, A, e);
26911
26913
  I.layers = this.layers, this.add(I);
26912
- const C = new Ut(iI, II, A, e);
26914
+ const C = new Ut(II, CI, A, e);
26913
26915
  C.layers = this.layers, this.add(C);
26914
- const o = new Ut(iI, II, A, e);
26916
+ const o = new Ut(II, CI, A, e);
26915
26917
  o.layers = this.layers, this.add(o);
26916
- const a = new Ut(iI, II, A, e);
26918
+ const a = new Ut(II, CI, A, e);
26917
26919
  a.layers = this.layers, this.add(a);
26918
- const Q = new Ut(iI, II, A, e);
26920
+ const Q = new Ut(II, CI, A, e);
26919
26921
  Q.layers = this.layers, this.add(Q);
26920
26922
  }
26921
26923
  /**
@@ -26965,7 +26967,7 @@ class xc extends nt {
26965
26967
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
26966
26968
  * @param {string} [colorSpace=NoColorSpace] - The color space value.
26967
26969
  */
26968
- constructor(A = [], e = Ji, t, i, I, C, o, a, Q, n) {
26970
+ constructor(A = [], e = Yi, t, i, I, C, o, a, Q, n) {
26969
26971
  super(A, e, t, i, I, C, o, a, Q, n), this.isCubeTexture = !0, this.flipY = !1;
26970
26972
  }
26971
26973
  /**
@@ -27234,7 +27236,7 @@ class du extends nt {
27234
27236
  super(null, C, o, a, Q, n, i, I, s, B), this.isDataTexture = !0, this.image = { data: A, width: e, height: t }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
27235
27237
  }
27236
27238
  }
27237
- const gQ = /* @__PURE__ */ new v(), xu = /* @__PURE__ */ new v(), lu = /* @__PURE__ */ new YA();
27239
+ const gQ = /* @__PURE__ */ new v(), xu = /* @__PURE__ */ new v(), lu = /* @__PURE__ */ new TA();
27238
27240
  class yi {
27239
27241
  /**
27240
27242
  * Constructs a new plane.
@@ -27629,7 +27631,7 @@ class uu extends hC {
27629
27631
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
27630
27632
  * @param {number} [format=DepthFormat] - The texture format.
27631
27633
  */
27632
- constructor(A, e = dg, t = Ji, i, I, C = tt, o = tt, a, Q = Tg) {
27634
+ constructor(A, e = dg, t = Yi, i, I, C = tt, o = tt, a, Q = Tg) {
27633
27635
  const n = { width: A, height: A, depth: 1 }, s = [n, n, n, n, n, n];
27634
27636
  super(A, A, e, t, i, I, C, o, a, Q), this.image = s, this.isCubeDepthTexture = !0, this.isCubeTexture = !0;
27635
27637
  }
@@ -32098,18 +32100,18 @@ void main() {
32098
32100
  diffuse: { value: /* @__PURE__ */ new ae(16777215) },
32099
32101
  opacity: { value: 1 },
32100
32102
  map: { value: null },
32101
- mapTransform: { value: /* @__PURE__ */ new YA() },
32103
+ mapTransform: { value: /* @__PURE__ */ new TA() },
32102
32104
  alphaMap: { value: null },
32103
- alphaMapTransform: { value: /* @__PURE__ */ new YA() },
32105
+ alphaMapTransform: { value: /* @__PURE__ */ new TA() },
32104
32106
  alphaTest: { value: 0 }
32105
32107
  },
32106
32108
  specularmap: {
32107
32109
  specularMap: { value: null },
32108
- specularMapTransform: { value: /* @__PURE__ */ new YA() }
32110
+ specularMapTransform: { value: /* @__PURE__ */ new TA() }
32109
32111
  },
32110
32112
  envmap: {
32111
32113
  envMap: { value: null },
32112
- envMapRotation: { value: /* @__PURE__ */ new YA() },
32114
+ envMapRotation: { value: /* @__PURE__ */ new TA() },
32113
32115
  flipEnvMap: { value: -1 },
32114
32116
  reflectivity: { value: 1 },
32115
32117
  // basic, lambert, phong
@@ -32123,40 +32125,40 @@ void main() {
32123
32125
  aomap: {
32124
32126
  aoMap: { value: null },
32125
32127
  aoMapIntensity: { value: 1 },
32126
- aoMapTransform: { value: /* @__PURE__ */ new YA() }
32128
+ aoMapTransform: { value: /* @__PURE__ */ new TA() }
32127
32129
  },
32128
32130
  lightmap: {
32129
32131
  lightMap: { value: null },
32130
32132
  lightMapIntensity: { value: 1 },
32131
- lightMapTransform: { value: /* @__PURE__ */ new YA() }
32133
+ lightMapTransform: { value: /* @__PURE__ */ new TA() }
32132
32134
  },
32133
32135
  bumpmap: {
32134
32136
  bumpMap: { value: null },
32135
- bumpMapTransform: { value: /* @__PURE__ */ new YA() },
32137
+ bumpMapTransform: { value: /* @__PURE__ */ new TA() },
32136
32138
  bumpScale: { value: 1 }
32137
32139
  },
32138
32140
  normalmap: {
32139
32141
  normalMap: { value: null },
32140
- normalMapTransform: { value: /* @__PURE__ */ new YA() },
32142
+ normalMapTransform: { value: /* @__PURE__ */ new TA() },
32141
32143
  normalScale: { value: /* @__PURE__ */ new ce(1, 1) }
32142
32144
  },
32143
32145
  displacementmap: {
32144
32146
  displacementMap: { value: null },
32145
- displacementMapTransform: { value: /* @__PURE__ */ new YA() },
32147
+ displacementMapTransform: { value: /* @__PURE__ */ new TA() },
32146
32148
  displacementScale: { value: 1 },
32147
32149
  displacementBias: { value: 0 }
32148
32150
  },
32149
32151
  emissivemap: {
32150
32152
  emissiveMap: { value: null },
32151
- emissiveMapTransform: { value: /* @__PURE__ */ new YA() }
32153
+ emissiveMapTransform: { value: /* @__PURE__ */ new TA() }
32152
32154
  },
32153
32155
  metalnessmap: {
32154
32156
  metalnessMap: { value: null },
32155
- metalnessMapTransform: { value: /* @__PURE__ */ new YA() }
32157
+ metalnessMapTransform: { value: /* @__PURE__ */ new TA() }
32156
32158
  },
32157
32159
  roughnessmap: {
32158
32160
  roughnessMap: { value: null },
32159
- roughnessMapTransform: { value: /* @__PURE__ */ new YA() }
32161
+ roughnessMapTransform: { value: /* @__PURE__ */ new TA() }
32160
32162
  },
32161
32163
  gradientmap: {
32162
32164
  gradientMap: { value: null }
@@ -32241,9 +32243,9 @@ void main() {
32241
32243
  scale: { value: 1 },
32242
32244
  map: { value: null },
32243
32245
  alphaMap: { value: null },
32244
- alphaMapTransform: { value: /* @__PURE__ */ new YA() },
32246
+ alphaMapTransform: { value: /* @__PURE__ */ new TA() },
32245
32247
  alphaTest: { value: 0 },
32246
- uvTransform: { value: /* @__PURE__ */ new YA() }
32248
+ uvTransform: { value: /* @__PURE__ */ new TA() }
32247
32249
  },
32248
32250
  sprite: {
32249
32251
  diffuse: { value: /* @__PURE__ */ new ae(16777215) },
@@ -32251,9 +32253,9 @@ void main() {
32251
32253
  center: { value: /* @__PURE__ */ new ce(0.5, 0.5) },
32252
32254
  rotation: { value: 0 },
32253
32255
  map: { value: null },
32254
- mapTransform: { value: /* @__PURE__ */ new YA() },
32256
+ mapTransform: { value: /* @__PURE__ */ new TA() },
32255
32257
  alphaMap: { value: null },
32256
- alphaMapTransform: { value: /* @__PURE__ */ new YA() },
32258
+ alphaMapTransform: { value: /* @__PURE__ */ new TA() },
32257
32259
  alphaTest: { value: 0 }
32258
32260
  }
32259
32261
  }, ig = {
@@ -32420,7 +32422,7 @@ void main() {
32420
32422
  },
32421
32423
  background: {
32422
32424
  uniforms: {
32423
- uvTransform: { value: /* @__PURE__ */ new YA() },
32425
+ uvTransform: { value: /* @__PURE__ */ new TA() },
32424
32426
  t2D: { value: null },
32425
32427
  backgroundIntensity: { value: 1 }
32426
32428
  },
@@ -32433,7 +32435,7 @@ void main() {
32433
32435
  flipEnvMap: { value: -1 },
32434
32436
  backgroundBlurriness: { value: 0 },
32435
32437
  backgroundIntensity: { value: 1 },
32436
- backgroundRotation: { value: /* @__PURE__ */ new YA() }
32438
+ backgroundRotation: { value: /* @__PURE__ */ new TA() }
32437
32439
  },
32438
32440
  vertexShader: qA.backgroundCube_vert,
32439
32441
  fragmentShader: qA.backgroundCube_frag
@@ -32486,48 +32488,48 @@ ig.physical = {
32486
32488
  {
32487
32489
  clearcoat: { value: 0 },
32488
32490
  clearcoatMap: { value: null },
32489
- clearcoatMapTransform: { value: /* @__PURE__ */ new YA() },
32491
+ clearcoatMapTransform: { value: /* @__PURE__ */ new TA() },
32490
32492
  clearcoatNormalMap: { value: null },
32491
- clearcoatNormalMapTransform: { value: /* @__PURE__ */ new YA() },
32493
+ clearcoatNormalMapTransform: { value: /* @__PURE__ */ new TA() },
32492
32494
  clearcoatNormalScale: { value: /* @__PURE__ */ new ce(1, 1) },
32493
32495
  clearcoatRoughness: { value: 0 },
32494
32496
  clearcoatRoughnessMap: { value: null },
32495
- clearcoatRoughnessMapTransform: { value: /* @__PURE__ */ new YA() },
32497
+ clearcoatRoughnessMapTransform: { value: /* @__PURE__ */ new TA() },
32496
32498
  dispersion: { value: 0 },
32497
32499
  iridescence: { value: 0 },
32498
32500
  iridescenceMap: { value: null },
32499
- iridescenceMapTransform: { value: /* @__PURE__ */ new YA() },
32501
+ iridescenceMapTransform: { value: /* @__PURE__ */ new TA() },
32500
32502
  iridescenceIOR: { value: 1.3 },
32501
32503
  iridescenceThicknessMinimum: { value: 100 },
32502
32504
  iridescenceThicknessMaximum: { value: 400 },
32503
32505
  iridescenceThicknessMap: { value: null },
32504
- iridescenceThicknessMapTransform: { value: /* @__PURE__ */ new YA() },
32506
+ iridescenceThicknessMapTransform: { value: /* @__PURE__ */ new TA() },
32505
32507
  sheen: { value: 0 },
32506
32508
  sheenColor: { value: /* @__PURE__ */ new ae(0) },
32507
32509
  sheenColorMap: { value: null },
32508
- sheenColorMapTransform: { value: /* @__PURE__ */ new YA() },
32510
+ sheenColorMapTransform: { value: /* @__PURE__ */ new TA() },
32509
32511
  sheenRoughness: { value: 1 },
32510
32512
  sheenRoughnessMap: { value: null },
32511
- sheenRoughnessMapTransform: { value: /* @__PURE__ */ new YA() },
32513
+ sheenRoughnessMapTransform: { value: /* @__PURE__ */ new TA() },
32512
32514
  transmission: { value: 0 },
32513
32515
  transmissionMap: { value: null },
32514
- transmissionMapTransform: { value: /* @__PURE__ */ new YA() },
32516
+ transmissionMapTransform: { value: /* @__PURE__ */ new TA() },
32515
32517
  transmissionSamplerSize: { value: /* @__PURE__ */ new ce() },
32516
32518
  transmissionSamplerMap: { value: null },
32517
32519
  thickness: { value: 0 },
32518
32520
  thicknessMap: { value: null },
32519
- thicknessMapTransform: { value: /* @__PURE__ */ new YA() },
32521
+ thicknessMapTransform: { value: /* @__PURE__ */ new TA() },
32520
32522
  attenuationDistance: { value: 0 },
32521
32523
  attenuationColor: { value: /* @__PURE__ */ new ae(0) },
32522
32524
  specularColor: { value: /* @__PURE__ */ new ae(1, 1, 1) },
32523
32525
  specularColorMap: { value: null },
32524
- specularColorMapTransform: { value: /* @__PURE__ */ new YA() },
32526
+ specularColorMapTransform: { value: /* @__PURE__ */ new TA() },
32525
32527
  specularIntensity: { value: 1 },
32526
32528
  specularIntensityMap: { value: null },
32527
- specularIntensityMapTransform: { value: /* @__PURE__ */ new YA() },
32529
+ specularIntensityMapTransform: { value: /* @__PURE__ */ new TA() },
32528
32530
  anisotropyVector: { value: /* @__PURE__ */ new ce() },
32529
32531
  anisotropyMap: { value: null },
32530
- anisotropyMapTransform: { value: /* @__PURE__ */ new YA() }
32532
+ anisotropyMapTransform: { value: /* @__PURE__ */ new TA() }
32531
32533
  }
32532
32534
  ]),
32533
32535
  vertexShader: qA.meshphysical_vert,
@@ -32713,7 +32715,7 @@ function n2(g, A) {
32713
32715
  if (vA === void 0) continue;
32714
32716
  const KA = vA.buffer, Se = vA.type, ue = vA.bytesPerElement, X = Se === g.INT || Se === g.UNSIGNED_INT || dA.gpuType === cs;
32715
32717
  if (dA.isInterleavedBufferAttribute) {
32716
- const gA = dA.data, _A = gA.stride, JA = dA.offset;
32718
+ const gA = dA.data, _A = gA.stride, YA = dA.offset;
32717
32719
  if (gA.isInstancedInterleavedBuffer) {
32718
32720
  for (let mA = 0; mA < Z.locationSize; mA++)
32719
32721
  r(Z.location + mA, gA.meshPerAttribute);
@@ -32729,7 +32731,7 @@ function n2(g, A) {
32729
32731
  Se,
32730
32732
  nA,
32731
32733
  _A * ue,
32732
- (JA + lA / Z.locationSize * mA) * ue,
32734
+ (YA + lA / Z.locationSize * mA) * ue,
32733
32735
  X
32734
32736
  );
32735
32737
  } else {
@@ -32916,7 +32918,7 @@ function B2(g, A, e, t) {
32916
32918
  function E2(g) {
32917
32919
  const A = this;
32918
32920
  let e = null, t = 0, i = !1, I = !1;
32919
- const C = new yi(), o = new YA(), a = { value: null, needsUpdate: !1 };
32921
+ const C = new yi(), o = new TA(), a = { value: null, needsUpdate: !1 };
32920
32922
  this.uniform = a, this.numPlanes = 0, this.numIntersection = 0, this.init = function(s, B) {
32921
32923
  const E = s.length !== 0 || B || // enable state of previous frame - the clipping code has to
32922
32924
  // run another frame in order to reset the state:
@@ -32962,7 +32964,7 @@ function E2(g) {
32962
32964
  function r2(g) {
32963
32965
  let A = /* @__PURE__ */ new WeakMap();
32964
32966
  function e(C, o) {
32965
- return o === gn ? C.mapping = Ji : o === In && (C.mapping = wI), C;
32967
+ return o === gn ? C.mapping = Yi : o === In && (C.mapping = wI), C;
32966
32968
  }
32967
32969
  function t(C) {
32968
32970
  if (C && C.isTexture) {
@@ -33088,10 +33090,10 @@ class yE {
33088
33090
  this._lodMeshes[A].geometry.dispose();
33089
33091
  }
33090
33092
  _cleanup(A) {
33091
- this._renderer.setRenderTarget(iQ, IQ, CQ), this._renderer.xr.enabled = oQ, A.scissorTest = !1, CI(A, 0, 0, A.width, A.height);
33093
+ this._renderer.setRenderTarget(iQ, IQ, CQ), this._renderer.xr.enabled = oQ, A.scissorTest = !1, oI(A, 0, 0, A.width, A.height);
33092
33094
  }
33093
33095
  _fromTexture(A, e) {
33094
- A.mapping === Ji || A.mapping === wI ? this._setSize(A.image.length === 0 ? 16 : A.image[0].width || A.image[0].image.width) : this._setSize(A.image.width / 4), iQ = this._renderer.getRenderTarget(), IQ = this._renderer.getActiveCubeFace(), CQ = this._renderer.getActiveMipmapLevel(), oQ = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
33096
+ A.mapping === Yi || A.mapping === wI ? this._setSize(A.image.length === 0 ? 16 : A.image[0].width || A.image[0].image.width) : this._setSize(A.image.width / 4), iQ = this._renderer.getRenderTarget(), IQ = this._renderer.getActiveCubeFace(), CQ = this._renderer.getActiveMipmapLevel(), oQ = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
33095
33097
  const t = e || this._allocateTargets();
33096
33098
  return this._textureToCubeUV(A, t), this._applyPMREM(t), this._cleanup(t), t;
33097
33099
  }
@@ -33135,19 +33137,19 @@ class yE {
33135
33137
  const l = _ % 3;
33136
33138
  l === 0 ? (a.up.set(0, Q[_], 0), a.position.set(I.x, I.y, I.z), a.lookAt(I.x + n[_], I.y, I.z)) : l === 1 ? (a.up.set(0, 0, Q[_]), a.position.set(I.x, I.y, I.z), a.lookAt(I.x, I.y + n[_], I.z)) : (a.up.set(0, Q[_], 0), a.position.set(I.x, I.y, I.z), a.lookAt(I.x, I.y, I.z + n[_]));
33137
33139
  const D = this._cubeSize;
33138
- CI(i, l * D, _ > 2 ? D : 0, D, D), s.setRenderTarget(i), r && s.render(c, a), s.render(A, a);
33140
+ oI(i, l * D, _ > 2 ? D : 0, D, D), s.setRenderTarget(i), r && s.render(c, a), s.render(A, a);
33139
33141
  }
33140
33142
  s.toneMapping = E, s.autoClear = B, A.background = f;
33141
33143
  }
33142
33144
  _textureToCubeUV(A, e) {
33143
- const t = this._renderer, i = A.mapping === Ji || A.mapping === wI;
33145
+ const t = this._renderer, i = A.mapping === Yi || A.mapping === wI;
33144
33146
  i ? (this._cubemapMaterial === null && (this._cubemapMaterial = SE()), this._cubemapMaterial.uniforms.flipEnvMap.value = A.isRenderTargetTexture === !1 ? -1 : 1) : this._equirectMaterial === null && (this._equirectMaterial = NE());
33145
33147
  const I = i ? this._cubemapMaterial : this._equirectMaterial, C = this._lodMeshes[0];
33146
33148
  C.material = I;
33147
33149
  const o = I.uniforms;
33148
33150
  o.envMap.value = A;
33149
33151
  const a = this._cubeSize;
33150
- CI(e, 0, 0, 3 * a, 2 * a), t.setRenderTarget(e), t.render(C, OI);
33152
+ oI(e, 0, 0, 3 * a, 2 * a), t.setRenderTarget(e), t.render(C, OI);
33151
33153
  }
33152
33154
  _applyPMREM(A) {
33153
33155
  const e = this._renderer, t = e.autoClear;
@@ -33172,7 +33174,7 @@ class yE {
33172
33174
  const i = this._renderer, I = this._pingPongRenderTarget, C = this._ggxMaterial, o = this._lodMeshes[t];
33173
33175
  o.material = C;
33174
33176
  const a = C.uniforms, Q = t / (this._lodMeshes.length - 1), n = e / (this._lodMeshes.length - 1), s = Math.sqrt(Q * Q - n * n), B = 0 + Q * 1.25, E = s * B, { _lodMax: d } = this, c = this._sizeLods[t], h = 3 * c * (t > d - oi ? t - d + oi : 0), r = 4 * (this._cubeSize - c);
33175
- a.envMap.value = A.texture, a.roughness.value = E, a.mipInt.value = d - e, CI(I, h, r, 3 * c, 2 * c), i.setRenderTarget(I), i.render(o, OI), a.envMap.value = I.texture, a.roughness.value = 0, a.mipInt.value = d - t, CI(A, h, r, 3 * c, 2 * c), i.setRenderTarget(A), i.render(o, OI);
33177
+ a.envMap.value = A.texture, a.roughness.value = E, a.mipInt.value = d - e, oI(I, h, r, 3 * c, 2 * c), i.setRenderTarget(I), i.render(o, OI), a.envMap.value = I.texture, a.roughness.value = 0, a.mipInt.value = d - t, oI(A, h, r, 3 * c, 2 * c), i.setRenderTarget(A), i.render(o, OI);
33176
33178
  }
33177
33179
  /**
33178
33180
  * This is a two-pass Gaussian blur for a cubemap. Normally this is done
@@ -33231,7 +33233,7 @@ class yE {
33231
33233
  const { _lodMax: _ } = this;
33232
33234
  B.dTheta.value = d, B.mipInt.value = _ - t;
33233
33235
  const l = this._sizeLods[i], D = 3 * l * (i > _ - oi ? i - _ + oi : 0), w = 4 * (this._cubeSize - l);
33234
- CI(e, D, w, 3 * l, 2 * l), a.setRenderTarget(e), a.render(s, OI);
33236
+ oI(e, D, w, 3 * l, 2 * l), a.setRenderTarget(e), a.render(s, OI);
33235
33237
  }
33236
33238
  }
33237
33239
  function d2(g) {
@@ -33278,7 +33280,7 @@ function bE(g, A, e) {
33278
33280
  const t = new Eg(g, A, e);
33279
33281
  return t.texture.mapping = Vo, t.texture.name = "PMREM.cubeUv", t.scissorTest = !0, t;
33280
33282
  }
33281
- function CI(g, A, e, t, i) {
33283
+ function oI(g, A, e, t, i) {
33282
33284
  g.viewport.set(A, e, t, i), g.scissor.set(A, e, t, i);
33283
33285
  }
33284
33286
  function x2(g, A, e) {
@@ -33635,7 +33637,7 @@ function f2(g) {
33635
33637
  let A = /* @__PURE__ */ new WeakMap(), e = null;
33636
33638
  function t(o) {
33637
33639
  if (o && o.isTexture) {
33638
- const a = o.mapping, Q = a === gn || a === In, n = a === Ji || a === wI;
33640
+ const a = o.mapping, Q = a === gn || a === In, n = a === Yi || a === wI;
33639
33641
  if (Q || n) {
33640
33642
  let s = A.get(o);
33641
33643
  const B = s !== void 0 ? s.texture.pmremVersion : 0;
@@ -34542,7 +34544,7 @@ function up(g, A) {
34542
34544
  return t.join(`
34543
34545
  `);
34544
34546
  }
34545
- const KE = /* @__PURE__ */ new YA();
34547
+ const KE = /* @__PURE__ */ new TA();
34546
34548
  function Dp(g) {
34547
34549
  ne._getMatrix(KE, ne.workingColorSpace, g);
34548
34550
  const A = `mat3( ${KE.elements.map((e) => e.toFixed(4))} )`;
@@ -34700,7 +34702,7 @@ function Up(g) {
34700
34702
  return Fp[g.shadowMapType] || "SHADOWMAP_TYPE_BASIC";
34701
34703
  }
34702
34704
  const Lp = {
34703
- [Ji]: "ENVMAP_TYPE_CUBE",
34705
+ [Yi]: "ENVMAP_TYPE_CUBE",
34704
34706
  [wI]: "ENVMAP_TYPE_CUBE",
34705
34707
  [Vo]: "ENVMAP_TYPE_CUBE_UV"
34706
34708
  };
@@ -35115,7 +35117,7 @@ function jp(g, A, e, t, i, I, C) {
35115
35117
  KA = xe.vertexShader, Se = xe.fragmentShader;
35116
35118
  } else
35117
35119
  KA = x.vertexShader, Se = x.fragmentShader, a.update(x), ue = a.getVertexShaderID(x), X = a.getFragmentShaderID(x);
35118
- const gA = g.getRenderTarget(), _A = g.state.buffers.depth.getReversed(), JA = L.isInstancedMesh === !0, mA = L.isBatchedMesh === !0, se = !!x.map, Ze = !!x.matcap, Qe = !!P, de = !!x.aoMap, pe = !!x.lightMap, HA = !!x.bumpMap, Te = !!x.normalMap, R = !!x.displacementMap, qe = !!x.emissiveMap, he = !!x.metalnessMap, ye = !!x.roughnessMap, bA = x.anisotropy > 0, b = x.clearcoat > 0, u = x.dispersion > 0, M = x.iridescence > 0, W = x.sheen > 0, eA = x.transmission > 0, O = bA && !!x.anisotropyMap, SA = b && !!x.clearcoatMap, BA = b && !!x.clearcoatNormalMap, yA = b && !!x.clearcoatRoughnessMap, FA = M && !!x.iridescenceMap, IA = M && !!x.iridescenceThicknessMap, rA = W && !!x.sheenColorMap, wA = W && !!x.sheenRoughnessMap, NA = !!x.specularMap, EA = !!x.specularColorMap, PA = !!x.specularIntensityMap, G = eA && !!x.transmissionMap, fA = eA && !!x.thicknessMap, oA = !!x.gradientMap, uA = !!x.alphaMap, iA = x.alphaTest > 0, z = !!x.alphaHash, sA = !!x.extensions;
35120
+ const gA = g.getRenderTarget(), _A = g.state.buffers.depth.getReversed(), YA = L.isInstancedMesh === !0, mA = L.isBatchedMesh === !0, se = !!x.map, Ze = !!x.matcap, Qe = !!P, de = !!x.aoMap, pe = !!x.lightMap, PA = !!x.bumpMap, Te = !!x.normalMap, R = !!x.displacementMap, qe = !!x.emissiveMap, he = !!x.metalnessMap, ye = !!x.roughnessMap, bA = x.anisotropy > 0, b = x.clearcoat > 0, u = x.dispersion > 0, M = x.iridescence > 0, W = x.sheen > 0, eA = x.transmission > 0, O = bA && !!x.anisotropyMap, SA = b && !!x.clearcoatMap, BA = b && !!x.clearcoatNormalMap, yA = b && !!x.clearcoatRoughnessMap, FA = M && !!x.iridescenceMap, IA = M && !!x.iridescenceThicknessMap, rA = W && !!x.sheenColorMap, wA = W && !!x.sheenRoughnessMap, NA = !!x.specularMap, EA = !!x.specularColorMap, OA = !!x.specularIntensityMap, G = eA && !!x.transmissionMap, fA = eA && !!x.thicknessMap, oA = !!x.gradientMap, uA = !!x.alphaMap, iA = x.alphaTest > 0, z = !!x.alphaHash, sA = !!x.extensions;
35119
35121
  let UA = Bg;
35120
35122
  x.toneMapped && (gA === null || gA.isXRRenderTarget === !0) && (UA = g.toneMapping);
35121
35123
  const be = {
@@ -35132,9 +35134,9 @@ function jp(g, A, e, t, i, I, C) {
35132
35134
  precision: E,
35133
35135
  batching: mA,
35134
35136
  batchingColor: mA && L._colorsTexture !== null,
35135
- instancing: JA,
35136
- instancingColor: JA && L.instanceColor !== null,
35137
- instancingMorph: JA && L.morphTexture !== null,
35137
+ instancing: YA,
35138
+ instancingColor: YA && L.instanceColor !== null,
35139
+ instancingMorph: YA && L.morphTexture !== null,
35138
35140
  outputColorSpace: gA === null ? g.outputColorSpace : gA.isXRRenderTarget === !0 ? gA.texture.colorSpace : yI,
35139
35141
  alphaToCoverage: !!x.alphaToCoverage,
35140
35142
  map: se,
@@ -35144,7 +35146,7 @@ function jp(g, A, e, t, i, I, C) {
35144
35146
  envMapCubeUVHeight: Z,
35145
35147
  aoMap: de,
35146
35148
  lightMap: pe,
35147
- bumpMap: HA,
35149
+ bumpMap: PA,
35148
35150
  normalMap: Te,
35149
35151
  displacementMap: R,
35150
35152
  emissiveMap: qe,
@@ -35167,12 +35169,12 @@ function jp(g, A, e, t, i, I, C) {
35167
35169
  sheenRoughnessMap: wA,
35168
35170
  specularMap: NA,
35169
35171
  specularColorMap: EA,
35170
- specularIntensityMap: PA,
35172
+ specularIntensityMap: OA,
35171
35173
  transmission: eA,
35172
35174
  transmissionMap: G,
35173
35175
  thicknessMap: fA,
35174
35176
  gradientMap: oA,
35175
- opaque: x.transparent === !1 && x.blending === dI && x.alphaToCoverage === !1,
35177
+ opaque: x.transparent === !1 && x.blending === xI && x.alphaToCoverage === !1,
35176
35178
  alphaMap: uA,
35177
35179
  alphaTest: iA,
35178
35180
  alphaHash: z,
@@ -35181,7 +35183,7 @@ function jp(g, A, e, t, i, I, C) {
35181
35183
  mapUv: se && c(x.map.channel),
35182
35184
  aoMapUv: de && c(x.aoMap.channel),
35183
35185
  lightMapUv: pe && c(x.lightMap.channel),
35184
- bumpMapUv: HA && c(x.bumpMap.channel),
35186
+ bumpMapUv: PA && c(x.bumpMap.channel),
35185
35187
  normalMapUv: Te && c(x.normalMap.channel),
35186
35188
  displacementMapUv: R && c(x.displacementMap.channel),
35187
35189
  emissiveMapUv: qe && c(x.emissiveMap.channel),
@@ -35197,7 +35199,7 @@ function jp(g, A, e, t, i, I, C) {
35197
35199
  sheenRoughnessMapUv: wA && c(x.sheenRoughnessMap.channel),
35198
35200
  specularMapUv: NA && c(x.specularMap.channel),
35199
35201
  specularColorMapUv: EA && c(x.specularColorMap.channel),
35200
- specularIntensityMapUv: PA && c(x.specularIntensityMap.channel),
35202
+ specularIntensityMapUv: OA && c(x.specularIntensityMap.channel),
35201
35203
  transmissionMapUv: G && c(x.transmissionMap.channel),
35202
35204
  thicknessMapUv: fA && c(x.thicknessMap.channel),
35203
35205
  alphaMapUv: uA && c(x.alphaMap.channel),
@@ -35986,14 +35988,14 @@ function nw(g, A) {
35986
35988
  return z;
35987
35989
  }
35988
35990
  const X = {};
35989
- X[g.TEXTURE_2D] = ue(g.TEXTURE_2D, g.TEXTURE_2D, 1), X[g.TEXTURE_CUBE_MAP] = ue(g.TEXTURE_CUBE_MAP, g.TEXTURE_CUBE_MAP_POSITIVE_X, 6), X[g.TEXTURE_2D_ARRAY] = ue(g.TEXTURE_2D_ARRAY, g.TEXTURE_2D_ARRAY, 1, 1), X[g.TEXTURE_3D] = ue(g.TEXTURE_3D, g.TEXTURE_3D, 1, 1), I.setClear(0, 0, 0, 1), C.setClear(1), o.setClear(0), gA(g.DEPTH_TEST), C.setFunc(pI), HA(!1), Te(AE), gA(g.CULL_FACE), de(Lg);
35991
+ X[g.TEXTURE_2D] = ue(g.TEXTURE_2D, g.TEXTURE_2D, 1), X[g.TEXTURE_CUBE_MAP] = ue(g.TEXTURE_CUBE_MAP, g.TEXTURE_CUBE_MAP_POSITIVE_X, 6), X[g.TEXTURE_2D_ARRAY] = ue(g.TEXTURE_2D_ARRAY, g.TEXTURE_2D_ARRAY, 1, 1), X[g.TEXTURE_3D] = ue(g.TEXTURE_3D, g.TEXTURE_3D, 1, 1), I.setClear(0, 0, 0, 1), C.setClear(1), o.setClear(0), gA(g.DEPTH_TEST), C.setFunc(pI), PA(!1), Te(AE), gA(g.CULL_FACE), de(Lg);
35990
35992
  function gA(G) {
35991
35993
  n[G] !== !0 && (g.enable(G), n[G] = !0);
35992
35994
  }
35993
35995
  function _A(G) {
35994
35996
  n[G] !== !1 && (g.disable(G), n[G] = !1);
35995
35997
  }
35996
- function JA(G, fA) {
35998
+ function YA(G, fA) {
35997
35999
  return s[G] !== fA ? (g.bindFramebuffer(G, fA), s[G] = fA, G === g.DRAW_FRAMEBUFFER && (s[g.FRAMEBUFFER] = fA), G === g.FRAMEBUFFER && (s[g.DRAW_FRAMEBUFFER] = fA), !0) : !1;
35998
36000
  }
35999
36001
  function mA(G, fA) {
@@ -36045,7 +36047,7 @@ function nw(g, A) {
36045
36047
  if (G !== h || xe !== x) {
36046
36048
  if ((r !== Ni || l !== Ni) && (g.blendEquation(g.FUNC_ADD), r = Ni, l = Ni), xe)
36047
36049
  switch (G) {
36048
- case dI:
36050
+ case xI:
36049
36051
  g.blendFuncSeparate(g.ONE, g.ONE_MINUS_SRC_ALPHA, g.ONE, g.ONE_MINUS_SRC_ALPHA);
36050
36052
  break;
36051
36053
  case VQ:
@@ -36063,7 +36065,7 @@ function nw(g, A) {
36063
36065
  }
36064
36066
  else
36065
36067
  switch (G) {
36066
- case dI:
36068
+ case xI:
36067
36069
  g.blendFuncSeparate(g.SRC_ALPHA, g.ONE_MINUS_SRC_ALPHA, g.ONE, g.ONE_MINUS_SRC_ALPHA);
36068
36070
  break;
36069
36071
  case VQ:
@@ -36088,11 +36090,11 @@ function nw(g, A) {
36088
36090
  function pe(G, fA) {
36089
36091
  G.side === Fg ? _A(g.CULL_FACE) : gA(g.CULL_FACE);
36090
36092
  let oA = G.side === Qt;
36091
- fA && (oA = !oA), HA(oA), G.blending === dI && G.transparent === !1 ? de(Lg) : de(G.blending, G.blendEquation, G.blendSrc, G.blendDst, G.blendEquationAlpha, G.blendSrcAlpha, G.blendDstAlpha, G.blendColor, G.blendAlpha, G.premultipliedAlpha), C.setFunc(G.depthFunc), C.setTest(G.depthTest), C.setMask(G.depthWrite), I.setMask(G.colorWrite);
36093
+ fA && (oA = !oA), PA(oA), G.blending === xI && G.transparent === !1 ? de(Lg) : de(G.blending, G.blendEquation, G.blendSrc, G.blendDst, G.blendEquationAlpha, G.blendSrcAlpha, G.blendDstAlpha, G.blendColor, G.blendAlpha, G.premultipliedAlpha), C.setFunc(G.depthFunc), C.setTest(G.depthTest), C.setMask(G.depthWrite), I.setMask(G.colorWrite);
36092
36094
  const uA = G.stencilWrite;
36093
36095
  o.setTest(uA), uA && (o.setMask(G.stencilWriteMask), o.setFunc(G.stencilFunc, G.stencilRef, G.stencilFuncMask), o.setOp(G.stencilFail, G.stencilZFail, G.stencilZPass)), qe(G.polygonOffset, G.polygonOffsetFactor, G.polygonOffsetUnits), G.alphaToCoverage === !0 ? gA(g.SAMPLE_ALPHA_TO_COVERAGE) : _A(g.SAMPLE_ALPHA_TO_COVERAGE);
36094
36096
  }
36095
- function HA(G) {
36097
+ function PA(G) {
36096
36098
  p !== G && (G ? g.frontFace(g.CW) : g.frontFace(g.CCW), p = G);
36097
36099
  }
36098
36100
  function Te(G) {
@@ -36205,7 +36207,7 @@ function nw(g, A) {
36205
36207
  const uA = Q.get(fA).get(G);
36206
36208
  a.get(fA) !== uA && (g.uniformBlockBinding(fA, uA, G.__bindingPointIndex), a.set(fA, uA));
36207
36209
  }
36208
- function PA() {
36210
+ function OA() {
36209
36211
  g.disable(g.BLEND), g.disable(g.CULL_FACE), g.disable(g.DEPTH_TEST), g.disable(g.POLYGON_OFFSET_FILL), g.disable(g.SCISSOR_TEST), g.disable(g.STENCIL_TEST), g.disable(g.SAMPLE_ALPHA_TO_COVERAGE), g.blendEquation(g.FUNC_ADD), g.blendFunc(g.ONE, g.ZERO), g.blendFuncSeparate(g.ONE, g.ZERO, g.ONE, g.ZERO), g.blendColor(0, 0, 0, 0), g.colorMask(!0, !0, !0, !0), g.clearColor(0, 0, 0, 0), g.depthMask(!0), g.depthFunc(g.LESS), C.setReversed(!1), g.clearDepth(1), g.stencilMask(4294967295), g.stencilFunc(g.ALWAYS, 0, 4294967295), g.stencilOp(g.KEEP, g.KEEP, g.KEEP), g.clearStencil(0), g.cullFace(g.BACK), g.frontFace(g.CCW), g.polygonOffset(0, 0), g.activeTexture(g.TEXTURE0), g.bindFramebuffer(g.FRAMEBUFFER, null), g.bindFramebuffer(g.DRAW_FRAMEBUFFER, null), g.bindFramebuffer(g.READ_FRAMEBUFFER, null), g.useProgram(null), g.lineWidth(1), g.scissor(0, 0, g.canvas.width, g.canvas.height), g.viewport(0, 0, g.canvas.width, g.canvas.height), n = {}, dA = null, nA = {}, s = {}, B = /* @__PURE__ */ new WeakMap(), E = [], d = null, c = !1, h = null, r = null, f = null, _ = null, l = null, D = null, w = null, y = new ae(0, 0, 0), k = 0, x = !1, p = null, N = null, F = null, L = null, H = null, KA.set(0, 0, g.canvas.width, g.canvas.height), Se.set(0, 0, g.canvas.width, g.canvas.height), I.reset(), C.reset(), o.reset();
36210
36212
  }
36211
36213
  return {
@@ -36216,12 +36218,12 @@ function nw(g, A) {
36216
36218
  },
36217
36219
  enable: gA,
36218
36220
  disable: _A,
36219
- bindFramebuffer: JA,
36221
+ bindFramebuffer: YA,
36220
36222
  drawBuffers: mA,
36221
36223
  useProgram: se,
36222
36224
  setBlending: de,
36223
36225
  setMaterial: pe,
36224
- setFlipSided: HA,
36226
+ setFlipSided: PA,
36225
36227
  setCullFace: Te,
36226
36228
  setLineWidth: R,
36227
36229
  setPolygonOffset: qe,
@@ -36243,7 +36245,7 @@ function nw(g, A) {
36243
36245
  compressedTexSubImage3D: SA,
36244
36246
  scissor: rA,
36245
36247
  viewport: wA,
36246
- reset: PA
36248
+ reset: OA
36247
36249
  };
36248
36250
  }
36249
36251
  function sw(g, A, e, t, i, I, C) {
@@ -36459,8 +36461,8 @@ function sw(g, A, e, t, i, I, C) {
36459
36461
  O.sort((IA, rA) => IA.start - rA.start);
36460
36462
  let SA = 0;
36461
36463
  for (let IA = 1; IA < O.length; IA++) {
36462
- const rA = O[SA], wA = O[IA], NA = rA.start + rA.count, EA = Se(wA.start, u.width, 4), PA = Se(rA.start, u.width, 4);
36463
- wA.start <= NA + 1 && EA === PA && Se(wA.start + wA.count - 1, u.width, 4) === EA ? rA.count = Math.max(
36464
+ const rA = O[SA], wA = O[IA], NA = rA.start + rA.count, EA = Se(wA.start, u.width, 4), OA = Se(rA.start, u.width, 4);
36465
+ wA.start <= NA + 1 && EA === OA && Se(wA.start + wA.count - 1, u.width, 4) === EA ? rA.count = Math.max(
36464
36466
  rA.count,
36465
36467
  wA.start + wA.count - rA.start
36466
36468
  ) : (++SA, O[SA] = wA);
@@ -36469,8 +36471,8 @@ function sw(g, A, e, t, i, I, C) {
36469
36471
  const BA = g.getParameter(g.UNPACK_ROW_LENGTH), yA = g.getParameter(g.UNPACK_SKIP_PIXELS), FA = g.getParameter(g.UNPACK_SKIP_ROWS);
36470
36472
  g.pixelStorei(g.UNPACK_ROW_LENGTH, u.width);
36471
36473
  for (let IA = 0, rA = O.length; IA < rA; IA++) {
36472
- const wA = O[IA], NA = Math.floor(wA.start / 4), EA = Math.ceil(wA.count / 4), PA = NA % u.width, G = Math.floor(NA / u.width), fA = EA, oA = 1;
36473
- g.pixelStorei(g.UNPACK_SKIP_PIXELS, PA), g.pixelStorei(g.UNPACK_SKIP_ROWS, G), e.texSubImage2D(g.TEXTURE_2D, 0, PA, G, fA, oA, M, W, u.data);
36474
+ const wA = O[IA], NA = Math.floor(wA.start / 4), EA = Math.ceil(wA.count / 4), OA = NA % u.width, G = Math.floor(NA / u.width), fA = EA, oA = 1;
36475
+ g.pixelStorei(g.UNPACK_SKIP_PIXELS, OA), g.pixelStorei(g.UNPACK_SKIP_ROWS, G), e.texSubImage2D(g.TEXTURE_2D, 0, OA, G, fA, oA, M, W, u.data);
36474
36476
  }
36475
36477
  b.clearUpdateRanges(), g.pixelStorei(g.UNPACK_ROW_LENGTH, BA), g.pixelStorei(g.UNPACK_SKIP_PIXELS, yA), g.pixelStorei(g.UNPACK_SKIP_ROWS, FA);
36476
36478
  }
@@ -36491,22 +36493,22 @@ function sw(g, A, e, t, i, I, C) {
36491
36493
  let NA = _(u.internalFormat, rA, wA, u.colorSpace, u.isVideoTexture);
36492
36494
  vA(W, u);
36493
36495
  let EA;
36494
- const PA = u.mipmaps, G = u.isVideoTexture !== !0, fA = SA.__version === void 0 || eA === !0, oA = O.dataReady, uA = D(u, IA);
36496
+ const OA = u.mipmaps, G = u.isVideoTexture !== !0, fA = SA.__version === void 0 || eA === !0, oA = O.dataReady, uA = D(u, IA);
36495
36497
  if (u.isDepthTexture)
36496
36498
  NA = l(u.format === Gi, u.type), fA && (G ? e.texStorage2D(g.TEXTURE_2D, 1, NA, IA.width, IA.height) : e.texImage2D(g.TEXTURE_2D, 0, NA, IA.width, IA.height, 0, rA, wA, null));
36497
36499
  else if (u.isDataTexture)
36498
- if (PA.length > 0) {
36499
- G && fA && e.texStorage2D(g.TEXTURE_2D, uA, NA, PA[0].width, PA[0].height);
36500
- for (let iA = 0, z = PA.length; iA < z; iA++)
36501
- EA = PA[iA], G ? oA && e.texSubImage2D(g.TEXTURE_2D, iA, 0, 0, EA.width, EA.height, rA, wA, EA.data) : e.texImage2D(g.TEXTURE_2D, iA, NA, EA.width, EA.height, 0, rA, wA, EA.data);
36500
+ if (OA.length > 0) {
36501
+ G && fA && e.texStorage2D(g.TEXTURE_2D, uA, NA, OA[0].width, OA[0].height);
36502
+ for (let iA = 0, z = OA.length; iA < z; iA++)
36503
+ EA = OA[iA], G ? oA && e.texSubImage2D(g.TEXTURE_2D, iA, 0, 0, EA.width, EA.height, rA, wA, EA.data) : e.texImage2D(g.TEXTURE_2D, iA, NA, EA.width, EA.height, 0, rA, wA, EA.data);
36502
36504
  u.generateMipmaps = !1;
36503
36505
  } else
36504
36506
  G ? (fA && e.texStorage2D(g.TEXTURE_2D, uA, NA, IA.width, IA.height), oA && ue(u, IA, rA, wA)) : e.texImage2D(g.TEXTURE_2D, 0, NA, IA.width, IA.height, 0, rA, wA, IA.data);
36505
36507
  else if (u.isCompressedTexture)
36506
36508
  if (u.isCompressedArrayTexture) {
36507
- G && fA && e.texStorage3D(g.TEXTURE_2D_ARRAY, uA, NA, PA[0].width, PA[0].height, IA.depth);
36508
- for (let iA = 0, z = PA.length; iA < z; iA++)
36509
- if (EA = PA[iA], u.format !== Xt)
36509
+ G && fA && e.texStorage3D(g.TEXTURE_2D_ARRAY, uA, NA, OA[0].width, OA[0].height, IA.depth);
36510
+ for (let iA = 0, z = OA.length; iA < z; iA++)
36511
+ if (EA = OA[iA], u.format !== Xt)
36510
36512
  if (rA !== null)
36511
36513
  if (G) {
36512
36514
  if (oA)
@@ -36529,9 +36531,9 @@ function sw(g, A, e, t, i, I, C) {
36529
36531
  else
36530
36532
  G ? oA && e.texSubImage3D(g.TEXTURE_2D_ARRAY, iA, 0, 0, 0, EA.width, EA.height, IA.depth, rA, wA, EA.data) : e.texImage3D(g.TEXTURE_2D_ARRAY, iA, NA, EA.width, EA.height, IA.depth, 0, rA, wA, EA.data);
36531
36533
  } else {
36532
- G && fA && e.texStorage2D(g.TEXTURE_2D, uA, NA, PA[0].width, PA[0].height);
36533
- for (let iA = 0, z = PA.length; iA < z; iA++)
36534
- EA = PA[iA], u.format !== Xt ? rA !== null ? G ? oA && e.compressedTexSubImage2D(g.TEXTURE_2D, iA, 0, 0, EA.width, EA.height, rA, EA.data) : e.compressedTexImage2D(g.TEXTURE_2D, iA, NA, EA.width, EA.height, 0, EA.data) : LA("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : G ? oA && e.texSubImage2D(g.TEXTURE_2D, iA, 0, 0, EA.width, EA.height, rA, wA, EA.data) : e.texImage2D(g.TEXTURE_2D, iA, NA, EA.width, EA.height, 0, rA, wA, EA.data);
36534
+ G && fA && e.texStorage2D(g.TEXTURE_2D, uA, NA, OA[0].width, OA[0].height);
36535
+ for (let iA = 0, z = OA.length; iA < z; iA++)
36536
+ EA = OA[iA], u.format !== Xt ? rA !== null ? G ? oA && e.compressedTexSubImage2D(g.TEXTURE_2D, iA, 0, 0, EA.width, EA.height, rA, EA.data) : e.compressedTexImage2D(g.TEXTURE_2D, iA, NA, EA.width, EA.height, 0, EA.data) : LA("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : G ? oA && e.texSubImage2D(g.TEXTURE_2D, iA, 0, 0, EA.width, EA.height, rA, wA, EA.data) : e.texImage2D(g.TEXTURE_2D, iA, NA, EA.width, EA.height, 0, rA, wA, EA.data);
36535
36537
  }
36536
36538
  else if (u.isDataArrayTexture)
36537
36539
  if (G) {
@@ -36561,13 +36563,13 @@ function sw(g, A, e, t, i, I, C) {
36561
36563
  for (let sA = 0; sA < uA; sA++)
36562
36564
  e.texImage2D(g.TEXTURE_2D, sA, NA, iA, z, 0, rA, wA, null), iA >>= 1, z >>= 1;
36563
36565
  }
36564
- } else if (PA.length > 0) {
36566
+ } else if (OA.length > 0) {
36565
36567
  if (G && fA) {
36566
- const iA = bA(PA[0]);
36568
+ const iA = bA(OA[0]);
36567
36569
  e.texStorage2D(g.TEXTURE_2D, uA, NA, iA.width, iA.height);
36568
36570
  }
36569
- for (let iA = 0, z = PA.length; iA < z; iA++)
36570
- EA = PA[iA], G ? oA && e.texSubImage2D(g.TEXTURE_2D, iA, 0, 0, rA, wA, EA) : e.texImage2D(g.TEXTURE_2D, iA, NA, rA, wA, EA);
36571
+ for (let iA = 0, z = OA.length; iA < z; iA++)
36572
+ EA = OA[iA], G ? oA && e.texSubImage2D(g.TEXTURE_2D, iA, 0, 0, rA, wA, EA) : e.texImage2D(g.TEXTURE_2D, iA, NA, rA, wA, EA);
36571
36573
  u.generateMipmaps = !1;
36572
36574
  } else if (G) {
36573
36575
  if (fA) {
@@ -36593,37 +36595,37 @@ function sw(g, A, e, t, i, I, C) {
36593
36595
  const FA = u.isCompressedTexture || u.image[0].isCompressedTexture, IA = u.image[0] && u.image[0].isDataTexture, rA = [];
36594
36596
  for (let z = 0; z < 6; z++)
36595
36597
  !FA && !IA ? rA[z] = c(u.image[z], !0, i.maxCubemapSize) : rA[z] = IA ? u.image[z].image : u.image[z], rA[z] = ye(u, rA[z]);
36596
- const wA = rA[0], NA = I.convert(u.format, u.colorSpace), EA = I.convert(u.type), PA = _(u.internalFormat, NA, EA, u.colorSpace), G = u.isVideoTexture !== !0, fA = O.__version === void 0 || W === !0, oA = eA.dataReady;
36598
+ const wA = rA[0], NA = I.convert(u.format, u.colorSpace), EA = I.convert(u.type), OA = _(u.internalFormat, NA, EA, u.colorSpace), G = u.isVideoTexture !== !0, fA = O.__version === void 0 || W === !0, oA = eA.dataReady;
36597
36599
  let uA = D(u, wA);
36598
36600
  vA(g.TEXTURE_CUBE_MAP, u);
36599
36601
  let iA;
36600
36602
  if (FA) {
36601
- G && fA && e.texStorage2D(g.TEXTURE_CUBE_MAP, uA, PA, wA.width, wA.height);
36603
+ G && fA && e.texStorage2D(g.TEXTURE_CUBE_MAP, uA, OA, wA.width, wA.height);
36602
36604
  for (let z = 0; z < 6; z++) {
36603
36605
  iA = rA[z].mipmaps;
36604
36606
  for (let sA = 0; sA < iA.length; sA++) {
36605
36607
  const UA = iA[sA];
36606
- u.format !== Xt ? NA !== null ? G ? oA && e.compressedTexSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, 0, 0, UA.width, UA.height, NA, UA.data) : e.compressedTexImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, PA, UA.width, UA.height, 0, UA.data) : LA("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, 0, 0, UA.width, UA.height, NA, EA, UA.data) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, PA, UA.width, UA.height, 0, NA, EA, UA.data);
36608
+ u.format !== Xt ? NA !== null ? G ? oA && e.compressedTexSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, 0, 0, UA.width, UA.height, NA, UA.data) : e.compressedTexImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, OA, UA.width, UA.height, 0, UA.data) : LA("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, 0, 0, UA.width, UA.height, NA, EA, UA.data) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA, OA, UA.width, UA.height, 0, NA, EA, UA.data);
36607
36609
  }
36608
36610
  }
36609
36611
  } else {
36610
36612
  if (iA = u.mipmaps, G && fA) {
36611
36613
  iA.length > 0 && uA++;
36612
36614
  const z = bA(rA[0]);
36613
- e.texStorage2D(g.TEXTURE_CUBE_MAP, uA, PA, z.width, z.height);
36615
+ e.texStorage2D(g.TEXTURE_CUBE_MAP, uA, OA, z.width, z.height);
36614
36616
  }
36615
36617
  for (let z = 0; z < 6; z++)
36616
36618
  if (IA) {
36617
- G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, 0, 0, rA[z].width, rA[z].height, NA, EA, rA[z].data) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, PA, rA[z].width, rA[z].height, 0, NA, EA, rA[z].data);
36619
+ G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, 0, 0, rA[z].width, rA[z].height, NA, EA, rA[z].data) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, OA, rA[z].width, rA[z].height, 0, NA, EA, rA[z].data);
36618
36620
  for (let sA = 0; sA < iA.length; sA++) {
36619
36621
  const be = iA[sA].image[z].image;
36620
- G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, 0, 0, be.width, be.height, NA, EA, be.data) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, PA, be.width, be.height, 0, NA, EA, be.data);
36622
+ G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, 0, 0, be.width, be.height, NA, EA, be.data) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, OA, be.width, be.height, 0, NA, EA, be.data);
36621
36623
  }
36622
36624
  } else {
36623
- G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, 0, 0, NA, EA, rA[z]) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, PA, NA, EA, rA[z]);
36625
+ G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, 0, 0, NA, EA, rA[z]) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, 0, OA, NA, EA, rA[z]);
36624
36626
  for (let sA = 0; sA < iA.length; sA++) {
36625
36627
  const UA = iA[sA];
36626
- G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, 0, 0, NA, EA, UA.image[z]) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, PA, NA, EA, UA.image[z]);
36628
+ G ? oA && e.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, 0, 0, NA, EA, UA.image[z]) : e.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + z, sA + 1, OA, NA, EA, UA.image[z]);
36627
36629
  }
36628
36630
  }
36629
36631
  }
@@ -36639,7 +36641,7 @@ function sw(g, A, e, t, i, I, C) {
36639
36641
  }
36640
36642
  e.bindFramebuffer(g.FRAMEBUFFER, b), qe(u) ? o.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER, W, eA, IA.__webglTexture, 0, R(u)) : (eA === g.TEXTURE_2D || eA >= g.TEXTURE_CUBE_MAP_POSITIVE_X && eA <= g.TEXTURE_CUBE_MAP_NEGATIVE_Z) && g.framebufferTexture2D(g.FRAMEBUFFER, W, eA, IA.__webglTexture, O), e.bindFramebuffer(g.FRAMEBUFFER, null);
36641
36643
  }
36642
- function JA(b, u, M) {
36644
+ function YA(b, u, M) {
36643
36645
  if (g.bindRenderbuffer(g.RENDERBUFFER, b), u.depthBuffer) {
36644
36646
  const W = u.depthTexture, eA = W && W.isDepthTexture ? W.type : null, O = l(u.stencilBuffer, eA), SA = u.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT;
36645
36647
  qe(u) ? o.renderbufferStorageMultisampleEXT(g.RENDERBUFFER, R(u), O, u.width, u.height) : M ? g.renderbufferStorageMultisample(g.RENDERBUFFER, R(u), O, u.width, u.height) : g.renderbufferStorage(g.RENDERBUFFER, O, u.width, u.height), g.framebufferRenderbuffer(g.FRAMEBUFFER, SA, g.RENDERBUFFER, b);
@@ -36700,7 +36702,7 @@ function sw(g, A, e, t, i, I, C) {
36700
36702
  u.__webglDepthbuffer = [];
36701
36703
  for (let W = 0; W < 6; W++)
36702
36704
  if (e.bindFramebuffer(g.FRAMEBUFFER, u.__webglFramebuffer[W]), u.__webglDepthbuffer[W] === void 0)
36703
- u.__webglDepthbuffer[W] = g.createRenderbuffer(), JA(u.__webglDepthbuffer[W], b, !1);
36705
+ u.__webglDepthbuffer[W] = g.createRenderbuffer(), YA(u.__webglDepthbuffer[W], b, !1);
36704
36706
  else {
36705
36707
  const eA = b.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, O = u.__webglDepthbuffer[W];
36706
36708
  g.bindRenderbuffer(g.RENDERBUFFER, O), g.framebufferRenderbuffer(g.FRAMEBUFFER, eA, g.RENDERBUFFER, O);
@@ -36708,7 +36710,7 @@ function sw(g, A, e, t, i, I, C) {
36708
36710
  } else {
36709
36711
  const W = b.texture.mipmaps;
36710
36712
  if (W && W.length > 0 ? e.bindFramebuffer(g.FRAMEBUFFER, u.__webglFramebuffer[0]) : e.bindFramebuffer(g.FRAMEBUFFER, u.__webglFramebuffer), u.__webglDepthbuffer === void 0)
36711
- u.__webglDepthbuffer = g.createRenderbuffer(), JA(u.__webglDepthbuffer, b, !1);
36713
+ u.__webglDepthbuffer = g.createRenderbuffer(), YA(u.__webglDepthbuffer, b, !1);
36712
36714
  else {
36713
36715
  const eA = b.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, O = u.__webglDepthbuffer;
36714
36716
  g.bindRenderbuffer(g.RENDERBUFFER, O), g.framebufferRenderbuffer(g.FRAMEBUFFER, eA, g.RENDERBUFFER, O);
@@ -36753,7 +36755,7 @@ function sw(g, A, e, t, i, I, C) {
36753
36755
  const FA = I.convert(yA.format, yA.colorSpace), IA = I.convert(yA.type), rA = _(yA.internalFormat, FA, IA, yA.colorSpace, b.isXRRenderTarget === !0), wA = R(b);
36754
36756
  g.renderbufferStorageMultisample(g.RENDERBUFFER, wA, rA, b.width, b.height), g.framebufferRenderbuffer(g.FRAMEBUFFER, g.COLOR_ATTACHMENT0 + BA, g.RENDERBUFFER, M.__webglColorRenderbuffer[BA]);
36755
36757
  }
36756
- g.bindRenderbuffer(g.RENDERBUFFER, null), b.depthBuffer && (M.__webglDepthRenderbuffer = g.createRenderbuffer(), JA(M.__webglDepthRenderbuffer, b, !0)), e.bindFramebuffer(g.FRAMEBUFFER, null);
36758
+ g.bindRenderbuffer(g.RENDERBUFFER, null), b.depthBuffer && (M.__webglDepthRenderbuffer = g.createRenderbuffer(), YA(M.__webglDepthRenderbuffer, b, !0)), e.bindFramebuffer(g.FRAMEBUFFER, null);
36757
36759
  }
36758
36760
  }
36759
36761
  if (O) {
@@ -36793,7 +36795,7 @@ function sw(g, A, e, t, i, I, C) {
36793
36795
  }
36794
36796
  }
36795
36797
  }
36796
- const pe = [], HA = [];
36798
+ const pe = [], PA = [];
36797
36799
  function Te(b) {
36798
36800
  if (b.samples > 0) {
36799
36801
  if (qe(b) === !1) {
@@ -36812,7 +36814,7 @@ function sw(g, A, e, t, i, I, C) {
36812
36814
  const IA = t.get(u[FA]).__webglTexture;
36813
36815
  g.framebufferTexture2D(g.DRAW_FRAMEBUFFER, g.COLOR_ATTACHMENT0, g.TEXTURE_2D, IA, 0);
36814
36816
  }
36815
- g.blitFramebuffer(0, 0, M, W, 0, 0, M, W, eA, g.NEAREST), a === !0 && (pe.length = 0, HA.length = 0, pe.push(g.COLOR_ATTACHMENT0 + FA), b.depthBuffer && b.resolveDepthBuffer === !1 && (pe.push(O), HA.push(O), g.invalidateFramebuffer(g.DRAW_FRAMEBUFFER, HA)), g.invalidateFramebuffer(g.READ_FRAMEBUFFER, pe));
36817
+ g.blitFramebuffer(0, 0, M, W, 0, 0, M, W, eA, g.NEAREST), a === !0 && (pe.length = 0, PA.length = 0, pe.push(g.COLOR_ATTACHMENT0 + FA), b.depthBuffer && b.resolveDepthBuffer === !1 && (pe.push(O), PA.push(O), g.invalidateFramebuffer(g.DRAW_FRAMEBUFFER, PA)), g.invalidateFramebuffer(g.READ_FRAMEBUFFER, pe));
36816
36818
  }
36817
36819
  if (e.bindFramebuffer(g.READ_FRAMEBUFFER, null), e.bindFramebuffer(g.DRAW_FRAMEBUFFER, null), BA)
36818
36820
  for (let FA = 0; FA < u.length; FA++) {
@@ -37094,8 +37096,8 @@ class hw extends kI {
37094
37096
  }, this.setSession = async function(X) {
37095
37097
  if (i = X, i !== null) {
37096
37098
  if (_ = A.getRenderTarget(), i.addEventListener("select", V), i.addEventListener("selectstart", V), i.addEventListener("selectend", V), i.addEventListener("squeeze", V), i.addEventListener("squeezestart", V), i.addEventListener("squeezeend", V), i.addEventListener("end", q), i.addEventListener("inputsourceschange", P), f.xrCompatible !== !0 && await e.makeXRCompatible(), k = A.getPixelRatio(), A.getSize(y), c && "createProjectionLayer" in XRWebGLBinding.prototype) {
37097
- let _A = null, JA = null, mA = null;
37098
- f.depth && (mA = f.stencil ? e.DEPTH24_STENCIL8 : e.DEPTH_COMPONENT24, _A = f.stencil ? Gi : Tg, JA = f.stencil ? rC : dg);
37099
+ let _A = null, YA = null, mA = null;
37100
+ f.depth && (mA = f.stencil ? e.DEPTH24_STENCIL8 : e.DEPTH_COMPONENT24, _A = f.stencil ? Gi : Tg, YA = f.stencil ? rC : dg);
37099
37101
  const se = {
37100
37102
  colorFormat: e.RGBA8,
37101
37103
  depthFormat: mA,
@@ -37107,7 +37109,7 @@ class hw extends kI {
37107
37109
  {
37108
37110
  format: Xt,
37109
37111
  type: Lt,
37110
- depthTexture: new hC(B.textureWidth, B.textureHeight, JA, void 0, void 0, void 0, void 0, void 0, void 0, _A),
37112
+ depthTexture: new hC(B.textureWidth, B.textureHeight, YA, void 0, void 0, void 0, void 0, void 0, void 0, _A),
37111
37113
  stencilBuffer: f.stencil,
37112
37114
  colorSpace: A.outputColorSpace,
37113
37115
  samples: f.antialias ? 4 : 0,
@@ -37146,35 +37148,35 @@ class hw extends kI {
37146
37148
  };
37147
37149
  function P(X) {
37148
37150
  for (let gA = 0; gA < X.removed.length; gA++) {
37149
- const _A = X.removed[gA], JA = w.indexOf(_A);
37150
- JA >= 0 && (w[JA] = null, D[JA].disconnect(_A));
37151
+ const _A = X.removed[gA], YA = w.indexOf(_A);
37152
+ YA >= 0 && (w[YA] = null, D[YA].disconnect(_A));
37151
37153
  }
37152
37154
  for (let gA = 0; gA < X.added.length; gA++) {
37153
37155
  const _A = X.added[gA];
37154
- let JA = w.indexOf(_A);
37155
- if (JA === -1) {
37156
+ let YA = w.indexOf(_A);
37157
+ if (YA === -1) {
37156
37158
  for (let se = 0; se < D.length; se++)
37157
37159
  if (se >= w.length) {
37158
- w.push(_A), JA = se;
37160
+ w.push(_A), YA = se;
37159
37161
  break;
37160
37162
  } else if (w[se] === null) {
37161
- w[se] = _A, JA = se;
37163
+ w[se] = _A, YA = se;
37162
37164
  break;
37163
37165
  }
37164
- if (JA === -1) break;
37166
+ if (YA === -1) break;
37165
37167
  }
37166
- const mA = D[JA];
37168
+ const mA = D[YA];
37167
37169
  mA && mA.connect(_A);
37168
37170
  }
37169
37171
  }
37170
37172
  const Z = new v(), dA = new v();
37171
37173
  function nA(X, gA, _A) {
37172
37174
  Z.setFromMatrixPosition(gA.matrixWorld), dA.setFromMatrixPosition(_A.matrixWorld);
37173
- const JA = Z.distanceTo(dA), mA = gA.projectionMatrix.elements, se = _A.projectionMatrix.elements, Ze = mA[14] / (mA[10] - 1), Qe = mA[14] / (mA[10] + 1), de = (mA[9] + 1) / mA[5], pe = (mA[9] - 1) / mA[5], HA = (mA[8] - 1) / mA[0], Te = (se[8] + 1) / se[0], R = Ze * HA, qe = Ze * Te, he = JA / (-HA + Te), ye = he * -HA;
37175
+ const YA = Z.distanceTo(dA), mA = gA.projectionMatrix.elements, se = _A.projectionMatrix.elements, Ze = mA[14] / (mA[10] - 1), Qe = mA[14] / (mA[10] + 1), de = (mA[9] + 1) / mA[5], pe = (mA[9] - 1) / mA[5], PA = (mA[8] - 1) / mA[0], Te = (se[8] + 1) / se[0], R = Ze * PA, qe = Ze * Te, he = YA / (-PA + Te), ye = he * -PA;
37174
37176
  if (gA.matrixWorld.decompose(X.position, X.quaternion, X.scale), X.translateX(ye), X.translateZ(he), X.matrixWorld.compose(X.position, X.quaternion, X.scale), X.matrixWorldInverse.copy(X.matrixWorld).invert(), mA[10] === -1)
37175
37177
  X.projectionMatrix.copy(gA.projectionMatrix), X.projectionMatrixInverse.copy(gA.projectionMatrixInverse);
37176
37178
  else {
37177
- const bA = Ze + he, b = Qe + he, u = R - ye, M = qe + (JA - ye), W = de * Qe / b * bA, eA = pe * Qe / b * bA;
37179
+ const bA = Ze + he, b = Qe + he, u = R - ye, M = qe + (YA - ye), W = de * Qe / b * bA, eA = pe * Qe / b * bA;
37178
37180
  X.projectionMatrix.makePerspective(u, M, W, eA, bA, b), X.projectionMatrixInverse.copy(X.projectionMatrix).invert();
37179
37181
  }
37180
37182
  }
@@ -37188,11 +37190,11 @@ class hw extends kI {
37188
37190
  depthNear: F.near,
37189
37191
  depthFar: F.far
37190
37192
  }), L = F.near, H = F.far), F.layers.mask = X.layers.mask | 6, x.layers.mask = F.layers.mask & 3, p.layers.mask = F.layers.mask & 5;
37191
- const JA = X.parent, mA = F.cameras;
37192
- lA(F, JA);
37193
+ const YA = X.parent, mA = F.cameras;
37194
+ lA(F, YA);
37193
37195
  for (let se = 0; se < mA.length; se++)
37194
- lA(mA[se], JA);
37195
- mA.length === 2 ? nA(F, x, p) : F.projectionMatrix.copy(x.projectionMatrix), vA(X, F, JA);
37196
+ lA(mA[se], YA);
37197
+ mA.length === 2 ? nA(F, x, p) : F.projectionMatrix.copy(x.projectionMatrix), vA(X, F, YA);
37196
37198
  };
37197
37199
  function vA(X, gA, _A) {
37198
37200
  _A === null ? X.matrix.copy(gA.matrixWorld) : (X.matrix.copy(_A.matrixWorld), X.matrix.invert(), X.matrix.multiply(gA.matrixWorld)), X.matrix.decompose(X.position, X.quaternion, X.scale), X.updateMatrixWorld(!0), X.projectionMatrix.copy(gA.projectionMatrix), X.projectionMatrixInverse.copy(gA.projectionMatrixInverse), X.isPerspectiveCamera && (X.fov = Jn * 2 * Math.atan(1 / X.projectionMatrix.elements[5]), X.zoom = 1);
@@ -37216,8 +37218,8 @@ class hw extends kI {
37216
37218
  if (n = gA.getViewerPose(Q || C), d = gA, n !== null) {
37217
37219
  const _A = n.views;
37218
37220
  E !== null && (A.setRenderTargetFramebuffer(l, E.framebuffer), A.setRenderTarget(l));
37219
- let JA = !1;
37220
- _A.length !== F.cameras.length && (F.cameras.length = 0, JA = !0);
37221
+ let YA = !1;
37222
+ _A.length !== F.cameras.length && (F.cameras.length = 0, YA = !0);
37221
37223
  for (let Qe = 0; Qe < _A.length; Qe++) {
37222
37224
  const de = _A[Qe];
37223
37225
  let pe = null;
@@ -37231,8 +37233,8 @@ class hw extends kI {
37231
37233
  Te.depthStencilTexture
37232
37234
  ), A.setRenderTarget(l));
37233
37235
  }
37234
- let HA = N[Qe];
37235
- HA === void 0 && (HA = new Ut(), HA.layers.enable(Qe), HA.viewport = new Ye(), N[Qe] = HA), HA.matrix.fromArray(de.transform.matrix), HA.matrix.decompose(HA.position, HA.quaternion, HA.scale), HA.projectionMatrix.fromArray(de.projectionMatrix), HA.projectionMatrixInverse.copy(HA.projectionMatrix).invert(), HA.viewport.set(pe.x, pe.y, pe.width, pe.height), Qe === 0 && (F.matrix.copy(HA.matrix), F.matrix.decompose(F.position, F.quaternion, F.scale)), JA === !0 && F.cameras.push(HA);
37236
+ let PA = N[Qe];
37237
+ PA === void 0 && (PA = new Ut(), PA.layers.enable(Qe), PA.viewport = new Ye(), N[Qe] = PA), PA.matrix.fromArray(de.transform.matrix), PA.matrix.decompose(PA.position, PA.quaternion, PA.scale), PA.projectionMatrix.fromArray(de.projectionMatrix), PA.projectionMatrixInverse.copy(PA.projectionMatrix).invert(), PA.viewport.set(pe.x, pe.y, pe.width, pe.height), Qe === 0 && (F.matrix.copy(PA.matrix), F.matrix.decompose(F.position, F.quaternion, F.scale)), YA === !0 && F.cameras.push(PA);
37236
37238
  }
37237
37239
  const mA = i.enabledFeatures;
37238
37240
  if (mA && mA.includes("depth-sensing") && i.depthUsage == "gpu-optimized" && c) {
@@ -37247,15 +37249,15 @@ class hw extends kI {
37247
37249
  if (de) {
37248
37250
  let pe = r[de];
37249
37251
  pe || (pe = new uc(), r[de] = pe);
37250
- const HA = s.getCameraImage(de);
37251
- pe.sourceTexture = HA;
37252
+ const PA = s.getCameraImage(de);
37253
+ pe.sourceTexture = PA;
37252
37254
  }
37253
37255
  }
37254
37256
  }
37255
37257
  }
37256
37258
  for (let _A = 0; _A < D.length; _A++) {
37257
- const JA = w[_A], mA = D[_A];
37258
- JA !== null && mA !== void 0 && mA.update(JA, gA, Q || C);
37259
+ const YA = w[_A], mA = D[_A];
37260
+ YA !== null && mA !== void 0 && mA.update(YA, gA, Q || C);
37259
37261
  }
37260
37262
  KA && KA(X, gA), gA.detectedPlanes && t.dispatchEvent({ type: "planesdetected", data: gA }), d = null;
37261
37263
  }
@@ -38006,10 +38008,10 @@ class Dw {
38006
38008
  let nA = 0, lA = e.width, vA = e.height, KA = 1, Se = null, ue = null;
38007
38009
  const X = new Ye(0, 0, lA, vA), gA = new Ye(0, 0, lA, vA);
38008
38010
  let _A = !1;
38009
- const JA = new fc();
38011
+ const YA = new fc();
38010
38012
  let mA = !1, se = !1;
38011
38013
  const Ze = new Ve(), Qe = new v(), de = new Ye(), pe = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
38012
- let HA = !1;
38014
+ let PA = !1;
38013
38015
  function Te() {
38014
38016
  return L === null ? KA : 1;
38015
38017
  }
@@ -38036,9 +38038,9 @@ class Dw {
38036
38038
  } catch (m) {
38037
38039
  throw Ee("WebGLRenderer: " + m.message), m;
38038
38040
  }
38039
- let he, ye, bA, b, u, M, W, eA, O, SA, BA, yA, FA, IA, rA, wA, NA, EA, PA, G, fA, oA, uA, iA;
38041
+ let he, ye, bA, b, u, M, W, eA, O, SA, BA, yA, FA, IA, rA, wA, NA, EA, OA, G, fA, oA, uA, iA;
38040
38042
  function z() {
38041
- he = new u2(R), he.init(), oA = new Bw(R, he), ye = new B2(R, he, A, oA), bA = new nw(R, he), ye.reversedDepthBuffer && B && bA.buffers.depth.setReversed(!0), b = new p2(R), u = new Wp(), M = new sw(R, he, bA, u, ye, oA, b), W = new r2(x), eA = new f2(x), O = new bu(R), uA = new n2(R, O), SA = new D2(R, O, b, uA), BA = new m2(R, SA, O, b), PA = new w2(R, ye, M), wA = new E2(u), yA = new jp(x, W, eA, he, ye, uA, wA), FA = new xw(x, u), IA = new Zp(), rA = new gw(he), EA = new Q2(x, W, eA, bA, BA, d, a), NA = new aw(x, BA, ye), iA = new lw(R, b, ye, bA), G = new s2(R, he, b), fA = new _2(R, he, b), b.programs = yA.programs, x.capabilities = ye, x.extensions = he, x.properties = u, x.renderLists = IA, x.shadowMap = NA, x.state = bA, x.info = b;
38043
+ he = new u2(R), he.init(), oA = new Bw(R, he), ye = new B2(R, he, A, oA), bA = new nw(R, he), ye.reversedDepthBuffer && B && bA.buffers.depth.setReversed(!0), b = new p2(R), u = new Wp(), M = new sw(R, he, bA, u, ye, oA, b), W = new r2(x), eA = new f2(x), O = new bu(R), uA = new n2(R, O), SA = new D2(R, O, b, uA), BA = new m2(R, SA, O, b), OA = new w2(R, ye, M), wA = new E2(u), yA = new jp(x, W, eA, he, ye, uA, wA), FA = new xw(x, u), IA = new Zp(), rA = new gw(he), EA = new Q2(x, W, eA, bA, BA, d, a), NA = new aw(x, BA, ye), iA = new lw(R, b, ye, bA), G = new s2(R, he, b), fA = new _2(R, he, b), b.programs = yA.programs, x.capabilities = ye, x.extensions = he, x.properties = u, x.renderLists = IA, x.shadowMap = NA, x.state = bA, x.info = b;
38042
38044
  }
38043
38045
  z(), c !== Lt && (k = new b2(c, e.width, e.height, i, I));
38044
38046
  const sA = new hw(x, R);
@@ -38183,9 +38185,9 @@ class Dw {
38183
38185
  else if (he.get("WEBGL_multi_draw"))
38184
38186
  we.renderMultiDraw(K._multiDrawStarts, K._multiDrawCounts, K._multiDrawCount);
38185
38187
  else {
38186
- const GA = K._multiDrawStarts, le = K._multiDrawCounts, Be = K._multiDrawCount, Dt = pA ? O.get(pA).bytesPerElement : 1, qi = u.get(J).currentProgram.getUniforms();
38188
+ const GA = K._multiDrawStarts, le = K._multiDrawCounts, Be = K._multiDrawCount, Dt = pA ? O.get(pA).bytesPerElement : 1, Hi = u.get(J).currentProgram.getUniforms();
38187
38189
  for (let _t = 0; _t < Be; _t++)
38188
- qi.setValue(R, "_gl_DrawID", _t), we.render(GA[_t] / Dt, le[_t]);
38190
+ Hi.setValue(R, "_gl_DrawID", _t), we.render(GA[_t] / Dt, le[_t]);
38189
38191
  }
38190
38192
  else if (K.isInstancedMesh)
38191
38193
  we.renderInstances(WA, Fe, K.count);
@@ -38253,11 +38255,11 @@ class Dw {
38253
38255
  }
38254
38256
  if (p === !0) return;
38255
38257
  const T = sA.enabled === !0 && sA.isPresenting === !0, J = k !== null && (L === null || T) && k.begin(x, L);
38256
- if (m.matrixWorldAutoUpdate === !0 && m.updateMatrixWorld(), U.parent === null && U.matrixWorldAutoUpdate === !0 && U.updateMatrixWorld(), sA.enabled === !0 && sA.isPresenting === !0 && (k === null || k.isCompositing() === !1) && (sA.cameraAutoUpdate === !0 && sA.updateCamera(U), U = sA.getCamera()), m.isScene === !0 && m.onBeforeRender(x, m, U, L), D = rA.get(m, y.length), D.init(U), y.push(D), Ze.multiplyMatrices(U.projectionMatrix, U.matrixWorldInverse), JA.setFromProjectionMatrix(Ze, Qg, U.reversedDepth), se = this.localClippingEnabled, mA = wA.init(this.clippingPlanes, se), l = IA.get(m, w.length), l.init(), w.push(l), sA.enabled === !0 && sA.isPresenting === !0) {
38258
+ if (m.matrixWorldAutoUpdate === !0 && m.updateMatrixWorld(), U.parent === null && U.matrixWorldAutoUpdate === !0 && U.updateMatrixWorld(), sA.enabled === !0 && sA.isPresenting === !0 && (k === null || k.isCompositing() === !1) && (sA.cameraAutoUpdate === !0 && sA.updateCamera(U), U = sA.getCamera()), m.isScene === !0 && m.onBeforeRender(x, m, U, L), D = rA.get(m, y.length), D.init(U), y.push(D), Ze.multiplyMatrices(U.projectionMatrix, U.matrixWorldInverse), YA.setFromProjectionMatrix(Ze, Qg, U.reversedDepth), se = this.localClippingEnabled, mA = wA.init(this.clippingPlanes, se), l = IA.get(m, w.length), l.init(), w.push(l), sA.enabled === !0 && sA.isPresenting === !0) {
38257
38259
  const DA = x.xr.getDepthSensingMesh();
38258
38260
  DA !== null && oa(DA, U, -1 / 0, x.sortObjects);
38259
38261
  }
38260
- oa(m, U, 0, x.sortObjects), l.finish(), x.sortObjects === !0 && l.sort(Se, ue), HA = sA.enabled === !1 || sA.isPresenting === !1 || sA.hasDepthSensing() === !1, HA && EA.addToRenderList(l, m), this.info.render.frame++, mA === !0 && wA.beginShadows();
38262
+ oa(m, U, 0, x.sortObjects), l.finish(), x.sortObjects === !0 && l.sort(Se, ue), PA = sA.enabled === !1 || sA.isPresenting === !1 || sA.hasDepthSensing() === !1, PA && EA.addToRenderList(l, m), this.info.render.frame++, mA === !0 && wA.beginShadows();
38261
38263
  const K = D.state.shadowsArray;
38262
38264
  if (NA.render(K, m, U), mA === !0 && wA.endShadows(), this.info.autoReset === !0 && this.info.reset(), (J && k.hasRenderPass()) === !1) {
38263
38265
  const DA = l.opaque, xA = l.transmissive;
@@ -38268,13 +38270,13 @@ class Dw {
38268
38270
  const RA = pA[kA];
38269
38271
  Rs(DA, xA, m, RA);
38270
38272
  }
38271
- HA && EA.render(m);
38273
+ PA && EA.render(m);
38272
38274
  for (let kA = 0, MA = pA.length; kA < MA; kA++) {
38273
38275
  const RA = pA[kA];
38274
38276
  ks(l, m, RA, RA.viewport);
38275
38277
  }
38276
38278
  } else
38277
- xA.length > 0 && Rs(DA, xA, m, U), HA && EA.render(m), ks(l, m, U);
38279
+ xA.length > 0 && Rs(DA, xA, m, U), PA && EA.render(m), ks(l, m, U);
38278
38280
  }
38279
38281
  L !== null && F === 0 && (M.updateMultisampleRenderTarget(L), M.updateRenderTargetMipmap(L)), J && k.end(x), m.isScene === !0 && m.onAfterRender(x, m, U), uA.resetDefaultState(), H = -1, V = null, y.pop(), y.length > 0 ? (D = y[y.length - 1], mA === !0 && wA.setGlobalState(x.clippingPlanes, D.state.camera)) : D = null, w.pop(), w.length > 0 ? l = w[w.length - 1] : l = null;
38280
38282
  };
@@ -38288,12 +38290,12 @@ class Dw {
38288
38290
  else if (m.isLight)
38289
38291
  D.pushLight(m), m.castShadow && D.pushShadow(m);
38290
38292
  else if (m.isSprite) {
38291
- if (!m.frustumCulled || JA.intersectsSprite(m)) {
38293
+ if (!m.frustumCulled || YA.intersectsSprite(m)) {
38292
38294
  J && de.setFromMatrixPosition(m.matrixWorld).applyMatrix4(Ze);
38293
38295
  const DA = BA.update(m), xA = m.material;
38294
38296
  xA.visible && l.push(m, DA, xA, T, de.z, null);
38295
38297
  }
38296
- } else if ((m.isMesh || m.isLine || m.isPoints) && (!m.frustumCulled || JA.intersectsObject(m))) {
38298
+ } else if ((m.isMesh || m.isLine || m.isPoints) && (!m.frustumCulled || YA.intersectsObject(m))) {
38297
38299
  const DA = BA.update(m), xA = m.material;
38298
38300
  if (J && (m.boundingSphere !== void 0 ? (m.boundingSphere === null && m.computeBoundingSphere(), de.copy(m.boundingSphere.center)) : (DA.boundingSphere === null && DA.computeBoundingSphere(), de.copy(DA.boundingSphere.center)), de.applyMatrix4(m.matrixWorld).applyMatrix4(Ze)), Array.isArray(xA)) {
38299
38301
  const pA = DA.groups;
@@ -38331,7 +38333,7 @@ class Dw {
38331
38333
  const cA = D.state.transmissionRenderTarget[J.id], DA = J.viewport || q;
38332
38334
  cA.setSize(DA.z * x.transmissionResolutionScale, DA.w * x.transmissionResolutionScale);
38333
38335
  const xA = x.getRenderTarget(), pA = x.getActiveCubeFace(), kA = x.getActiveMipmapLevel();
38334
- x.setRenderTarget(cA), x.getClearColor(dA), nA = x.getClearAlpha(), nA < 1 && x.setClearColor(16777215, 0.5), x.clear(), HA && EA.render(T);
38336
+ x.setRenderTarget(cA), x.getClearColor(dA), nA = x.getClearAlpha(), nA < 1 && x.setClearColor(16777215, 0.5), x.clear(), PA && EA.render(T);
38335
38337
  const MA = x.toneMapping;
38336
38338
  x.toneMapping = Bg;
38337
38339
  const RA = J.viewport;
@@ -38398,9 +38400,9 @@ class Dw {
38398
38400
  J.version === GA.__version ? (GA.needsLights && GA.lightsStateVersion !== le.state.version || GA.outputColorSpace !== xA || K.isBatchedMesh && GA.batching === !1 || !K.isBatchedMesh && GA.batching === !0 || K.isBatchedMesh && GA.batchingColor === !0 && K.colorTexture === null || K.isBatchedMesh && GA.batchingColor === !1 && K.colorTexture !== null || K.isInstancedMesh && GA.instancing === !1 || !K.isInstancedMesh && GA.instancing === !0 || K.isSkinnedMesh && GA.skinning === !1 || !K.isSkinnedMesh && GA.skinning === !0 || K.isInstancedMesh && GA.instancingColor === !0 && K.instanceColor === null || K.isInstancedMesh && GA.instancingColor === !1 && K.instanceColor !== null || K.isInstancedMesh && GA.instancingMorph === !0 && K.morphTexture === null || K.isInstancedMesh && GA.instancingMorph === !1 && K.morphTexture !== null || GA.envMap !== pA || J.fog === !0 && GA.fog !== cA || GA.numClippingPlanes !== void 0 && (GA.numClippingPlanes !== wA.numPlanes || GA.numIntersection !== wA.numIntersection) || GA.vertexAlphas !== kA || GA.vertexTangents !== MA || GA.morphTargets !== RA || GA.morphNormals !== WA || GA.morphColors !== De || GA.toneMapping !== Fe || GA.morphTargetsCount !== we) && (Be = !0) : (Be = !0, GA.__version = J.version);
38399
38401
  let Dt = GA.currentProgram;
38400
38402
  Be === !0 && (Dt = yC(J, U, K));
38401
- let qi = !1, _t = !1, GI = !1;
38403
+ let Hi = !1, _t = !1, GI = !1;
38402
38404
  const Ne = Dt.getUniforms(), Bt = GA.uniforms;
38403
- if (bA.useProgram(Dt.program) && (qi = !0, _t = !0, GI = !0), J.id !== H && (H = J.id, _t = !0), qi || V !== m) {
38405
+ if (bA.useProgram(Dt.program) && (Hi = !0, _t = !0, GI = !0), J.id !== H && (H = J.id, _t = !0), Hi || V !== m) {
38404
38406
  bA.buffers.depth.getReversed() && m.reversedDepth !== !0 && (m._reversedDepth = !0, m.updateProjectionMatrix()), Ne.setValue(R, "projectionMatrix", m.projectionMatrix), Ne.setValue(R, "viewMatrix", m.matrixWorldInverse);
38405
38407
  const Et = Ne.map.cameraPosition;
38406
38408
  Et !== void 0 && Et.setValue(R, Qe.setFromMatrixPosition(m.matrixWorld)), ye.logarithmicDepthBuffer && Ne.setValue(
@@ -38416,7 +38418,7 @@ class Dw {
38416
38418
  }
38417
38419
  K.isBatchedMesh && (Ne.setOptional(R, K, "batchingTexture"), Ne.setValue(R, "batchingTexture", K._matricesTexture, M), Ne.setOptional(R, K, "batchingIdTexture"), Ne.setValue(R, "batchingIdTexture", K._indirectTexture, M), Ne.setOptional(R, K, "batchingColorTexture"), K._colorsTexture !== null && Ne.setValue(R, "batchingColorTexture", K._colorsTexture, M));
38418
38420
  const Rt = T.morphAttributes;
38419
- if ((Rt.position !== void 0 || Rt.normal !== void 0 || Rt.color !== void 0) && PA.update(K, T, Dt), (_t || GA.receiveShadow !== K.receiveShadow) && (GA.receiveShadow = K.receiveShadow, Ne.setValue(R, "receiveShadow", K.receiveShadow)), J.isMeshGouraudMaterial && J.envMap !== null && (Bt.envMap.value = pA, Bt.flipEnvMap.value = pA.isCubeTexture && pA.isRenderTargetTexture === !1 ? -1 : 1), J.isMeshStandardMaterial && J.envMap === null && U.environment !== null && (Bt.envMapIntensity.value = U.environmentIntensity), Bt.dfgLUT !== void 0 && (Bt.dfgLUT.value = uw()), _t && (Ne.setValue(R, "toneMappingExposure", x.toneMappingExposure), GA.needsLights && Rc(Bt, GI), cA && J.fog === !0 && FA.refreshFogUniforms(Bt, cA), FA.refreshMaterialUniforms(Bt, J, KA, vA, D.state.transmissionRenderTarget[m.id]), ho.upload(R, Ms(GA), Bt, M)), J.isShaderMaterial && J.uniformsNeedUpdate === !0 && (ho.upload(R, Ms(GA), Bt, M), J.uniformsNeedUpdate = !1), J.isSpriteMaterial && Ne.setValue(R, "center", K.center), Ne.setValue(R, "modelViewMatrix", K.modelViewMatrix), Ne.setValue(R, "normalMatrix", K.normalMatrix), Ne.setValue(R, "modelMatrix", K.matrixWorld), J.isShaderMaterial || J.isRawShaderMaterial) {
38421
+ if ((Rt.position !== void 0 || Rt.normal !== void 0 || Rt.color !== void 0) && OA.update(K, T, Dt), (_t || GA.receiveShadow !== K.receiveShadow) && (GA.receiveShadow = K.receiveShadow, Ne.setValue(R, "receiveShadow", K.receiveShadow)), J.isMeshGouraudMaterial && J.envMap !== null && (Bt.envMap.value = pA, Bt.flipEnvMap.value = pA.isCubeTexture && pA.isRenderTargetTexture === !1 ? -1 : 1), J.isMeshStandardMaterial && J.envMap === null && U.environment !== null && (Bt.envMapIntensity.value = U.environmentIntensity), Bt.dfgLUT !== void 0 && (Bt.dfgLUT.value = uw()), _t && (Ne.setValue(R, "toneMappingExposure", x.toneMappingExposure), GA.needsLights && Rc(Bt, GI), cA && J.fog === !0 && FA.refreshFogUniforms(Bt, cA), FA.refreshMaterialUniforms(Bt, J, KA, vA, D.state.transmissionRenderTarget[m.id]), ho.upload(R, Ms(GA), Bt, M)), J.isShaderMaterial && J.uniformsNeedUpdate === !0 && (ho.upload(R, Ms(GA), Bt, M), J.uniformsNeedUpdate = !1), J.isSpriteMaterial && Ne.setValue(R, "center", K.center), Ne.setValue(R, "modelViewMatrix", K.modelViewMatrix), Ne.setValue(R, "normalMatrix", K.normalMatrix), Ne.setValue(R, "modelMatrix", K.matrixWorld), J.isShaderMaterial || J.isRawShaderMaterial) {
38420
38422
  const Ct = J.uniformsGroups;
38421
38423
  for (let Et = 0, aa = Ct.length; Et < aa; Et++) {
38422
38424
  const di = Ct[Et];
@@ -38548,7 +38550,7 @@ class Dw {
38548
38550
  const we = oA.convert(U.format), GA = oA.convert(U.type);
38549
38551
  let le;
38550
38552
  U.isData3DTexture ? (M.setTexture3D(U, 0), le = R.TEXTURE_3D) : U.isDataArrayTexture || U.isCompressedArrayTexture ? (M.setTexture2DArray(U, 0), le = R.TEXTURE_2D_ARRAY) : (M.setTexture2D(U, 0), le = R.TEXTURE_2D), R.pixelStorei(R.UNPACK_FLIP_Y_WEBGL, U.flipY), R.pixelStorei(R.UNPACK_PREMULTIPLY_ALPHA_WEBGL, U.premultiplyAlpha), R.pixelStorei(R.UNPACK_ALIGNMENT, U.unpackAlignment);
38551
- const Be = R.getParameter(R.UNPACK_ROW_LENGTH), Dt = R.getParameter(R.UNPACK_IMAGE_HEIGHT), qi = R.getParameter(R.UNPACK_SKIP_PIXELS), _t = R.getParameter(R.UNPACK_SKIP_ROWS), GI = R.getParameter(R.UNPACK_SKIP_IMAGES);
38553
+ const Be = R.getParameter(R.UNPACK_ROW_LENGTH), Dt = R.getParameter(R.UNPACK_IMAGE_HEIGHT), Hi = R.getParameter(R.UNPACK_SKIP_PIXELS), _t = R.getParameter(R.UNPACK_SKIP_ROWS), GI = R.getParameter(R.UNPACK_SKIP_IMAGES);
38552
38554
  R.pixelStorei(R.UNPACK_ROW_LENGTH, Ue.width), R.pixelStorei(R.UNPACK_IMAGE_HEIGHT, Ue.height), R.pixelStorei(R.UNPACK_SKIP_PIXELS, kA), R.pixelStorei(R.UNPACK_SKIP_ROWS, MA), R.pixelStorei(R.UNPACK_SKIP_IMAGES, RA);
38553
38555
  const Ne = m.isDataArrayTexture || m.isData3DTexture, Bt = U.isDataArrayTexture || U.isData3DTexture;
38554
38556
  if (m.isDepthTexture) {
@@ -38565,7 +38567,7 @@ class Dw {
38565
38567
  bA.bindFramebuffer(R.READ_FRAMEBUFFER, null), bA.bindFramebuffer(R.DRAW_FRAMEBUFFER, null);
38566
38568
  } else
38567
38569
  Bt ? m.isDataTexture || m.isData3DTexture ? R.texSubImage3D(le, cA, WA, De, Fe, DA, xA, pA, we, GA, Ue.data) : U.isCompressedArrayTexture ? R.compressedTexSubImage3D(le, cA, WA, De, Fe, DA, xA, pA, we, Ue.data) : R.texSubImage3D(le, cA, WA, De, Fe, DA, xA, pA, we, GA, Ue) : m.isDataTexture ? R.texSubImage2D(R.TEXTURE_2D, cA, WA, De, DA, xA, we, GA, Ue.data) : m.isCompressedTexture ? R.compressedTexSubImage2D(R.TEXTURE_2D, cA, WA, De, Ue.width, Ue.height, we, Ue.data) : R.texSubImage2D(R.TEXTURE_2D, cA, WA, De, DA, xA, we, GA, Ue);
38568
- R.pixelStorei(R.UNPACK_ROW_LENGTH, Be), R.pixelStorei(R.UNPACK_IMAGE_HEIGHT, Dt), R.pixelStorei(R.UNPACK_SKIP_PIXELS, qi), R.pixelStorei(R.UNPACK_SKIP_ROWS, _t), R.pixelStorei(R.UNPACK_SKIP_IMAGES, GI), cA === 0 && U.generateMipmaps && R.generateMipmap(le), bA.unbindTexture();
38570
+ R.pixelStorei(R.UNPACK_ROW_LENGTH, Be), R.pixelStorei(R.UNPACK_IMAGE_HEIGHT, Dt), R.pixelStorei(R.UNPACK_SKIP_PIXELS, Hi), R.pixelStorei(R.UNPACK_SKIP_ROWS, _t), R.pixelStorei(R.UNPACK_SKIP_IMAGES, GI), cA === 0 && U.generateMipmaps && R.generateMipmap(le), bA.unbindTexture();
38569
38571
  }, this.initRenderTarget = function(m) {
38570
38572
  u.get(m).__webglFramebuffer === void 0 && M.setupRenderTarget(m);
38571
38573
  }, this.initTexture = function(m) {
@@ -40038,7 +40040,7 @@ var kw = Object.defineProperty, Rw = Object.getOwnPropertyDescriptor, wC = (g, A
40038
40040
  (C = g[I]) && (i = (t ? C(A, e, i) : C(i)) || i);
40039
40041
  return t && i && kw(A, e, i), i;
40040
40042
  };
40041
- let Yi = class extends ng {
40043
+ let Ti = class extends ng {
40042
40044
  constructor() {
40043
40045
  super(...arguments), this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsContent = "", this.modalTitle = "Before we start", this.modalContainer = null;
40044
40046
  }
@@ -40296,26 +40298,26 @@ let Yi = class extends ng {
40296
40298
  return ee``;
40297
40299
  }
40298
40300
  };
40299
- Yi.styles = NI`
40301
+ Ti.styles = NI`
40300
40302
  :host {
40301
40303
  display: contents;
40302
40304
  }
40303
40305
  `;
40304
40306
  wC([
40305
40307
  j({ type: String, attribute: "privacy-url" })
40306
- ], Yi.prototype, "privacyUrl", 2);
40308
+ ], Ti.prototype, "privacyUrl", 2);
40307
40309
  wC([
40308
40310
  j({ type: String, attribute: "terms-url" })
40309
- ], Yi.prototype, "termsUrl", 2);
40311
+ ], Ti.prototype, "termsUrl", 2);
40310
40312
  wC([
40311
40313
  j({ type: String, attribute: "terms-content" })
40312
- ], Yi.prototype, "termsContent", 2);
40314
+ ], Ti.prototype, "termsContent", 2);
40313
40315
  wC([
40314
40316
  j({ type: String, attribute: "modal-title" })
40315
- ], Yi.prototype, "modalTitle", 2);
40316
- Yi = wC([
40317
+ ], Ti.prototype, "modalTitle", 2);
40318
+ Ti = wC([
40317
40319
  SI("hanc-privacy-modal")
40318
- ], Yi);
40320
+ ], Ti);
40319
40321
  const Gw = NI`
40320
40322
  :host {
40321
40323
  display: block;
@@ -40625,28 +40627,28 @@ ci([
40625
40627
  j({ type: Boolean })
40626
40628
  ], xg.prototype, "visible", 2);
40627
40629
  ci([
40628
- Ce()
40630
+ ge()
40629
40631
  ], xg.prototype, "_values", 2);
40630
40632
  ci([
40631
- Ce()
40633
+ ge()
40632
40634
  ], xg.prototype, "_errors", 2);
40633
40635
  ci([
40634
- Ce()
40636
+ ge()
40635
40637
  ], xg.prototype, "_submitted", 2);
40636
40638
  ci([
40637
- Ce()
40639
+ ge()
40638
40640
  ], xg.prototype, "_animateIn", 2);
40639
40641
  xg = ci([
40640
40642
  SI("form-overlay")
40641
40643
  ], xg);
40642
- var Uw = Object.defineProperty, Lw = Object.getOwnPropertyDescriptor, jA = (g, A, e, t) => {
40644
+ var Uw = Object.defineProperty, Lw = Object.getOwnPropertyDescriptor, HA = (g, A, e, t) => {
40643
40645
  for (var i = t > 1 ? void 0 : t ? Lw(A, e) : A, I = g.length - 1, C; I >= 0; I--)
40644
40646
  (C = g[I]) && (i = (t ? C(A, e, i) : C(i)) || i);
40645
40647
  return t && i && Uw(A, e, i), i;
40646
40648
  };
40647
- let TA = class extends ng {
40649
+ let JA = class extends ng {
40648
40650
  constructor() {
40649
- super(...arguments), this.callManager = new _I(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.formVisible = !1, this.formRequestId = "", this.formFields = [], this.domainBlocked = !1, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Try to call", this.buttonConnectingText = "Connecting...", this.size = 370, this.containerPadding = 45, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
40651
+ super(...arguments), this.callManager = new Ji(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.formVisible = !1, this.formRequestId = "", this.formFields = [], this.domainBlocked = !1, this.errorKind = null, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Try to call", this.buttonConnectingText = "Connecting...", this.size = 370, this.containerPadding = 45, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
40650
40652
  const e = g.detail;
40651
40653
  if (!(!e || !this.audioAnalyzer))
40652
40654
  try {
@@ -40668,6 +40670,9 @@ let TA = class extends ng {
40668
40670
  this.microphoneEnabled = !0, this.microphoneInitialized = !0;
40669
40671
  }, this.handleMicrophoneDisabled = () => {
40670
40672
  this.microphoneEnabled = !1, this.microphoneInitialized = !0;
40673
+ }, this.handleError = (g) => {
40674
+ const A = g.detail;
40675
+ this.errorKind = (A == null ? void 0 : A.status) === 429 ? "rate-limit" : "generic";
40671
40676
  }, this.handleStatusChange = (g) => {
40672
40677
  var e, t, i, I, C;
40673
40678
  switch (g.detail) {
@@ -40692,7 +40697,7 @@ let TA = class extends ng {
40692
40697
  break;
40693
40698
  case "error":
40694
40699
  this.callStatus = "error", (I = this.orbRenderer) == null || I.setActive(!1), (C = this.audioAnalyzer) == null || C.disconnect(), setTimeout(() => {
40695
- this.callStatus === "error" && (this.callStatus = "idle", this.startIdleAnimation());
40700
+ this.callStatus === "error" && (this.callStatus = "idle", this.errorKind = null, this.startIdleAnimation());
40696
40701
  }, 3e3);
40697
40702
  break;
40698
40703
  }
@@ -40708,7 +40713,7 @@ let TA = class extends ng {
40708
40713
  this.showPrivacyModal = !0;
40709
40714
  return;
40710
40715
  }
40711
- this.user_identity = Bi(), this.callStatus = "connecting", await this.callManager.makeCall({
40716
+ this.user_identity = Bi(), this.callStatus = "connecting", this.resetCallManager(), await this.callManager.makeCall({
40712
40717
  agentId: this.agentId,
40713
40718
  user_identity: this.user_identity
40714
40719
  });
@@ -40731,7 +40736,7 @@ let TA = class extends ng {
40731
40736
  }, this.handleFormDone = () => {
40732
40737
  this.formVisible = !1;
40733
40738
  }, this.handlePrivacyAccept = async () => {
40734
- ta(), this.user_identity = Bi(), this.showPrivacyModal = !1, this.callStatus = "connecting", await this.callManager.makeCall({
40739
+ ta(), this.user_identity = Bi(), this.showPrivacyModal = !1, this.callStatus = "connecting", this.resetCallManager(), await this.callManager.makeCall({
40735
40740
  agentId: this.agentId,
40736
40741
  user_identity: this.user_identity
40737
40742
  });
@@ -40744,10 +40749,7 @@ let TA = class extends ng {
40744
40749
  enabled: this.soundEnabled,
40745
40750
  volume: this.soundVolume,
40746
40751
  preset: this.soundPreset
40747
- }), this.callManager.addEventListener(
40748
- "status-changed",
40749
- this.handleStatusChange
40750
- ), this.callManager.addEventListener("audio-track", this.handleAudioTrack), this.callManager.addEventListener("local-audio-track", this.handleLocalAudioTrack), this.callManager.addEventListener("microphone-enabled", this.handleMicrophoneEnabled), this.callManager.addEventListener("microphone-disabled", this.handleMicrophoneDisabled), this.callManager.addEventListener("agent-command", this.handleAgentCommand), this.loadWidgetConfig();
40752
+ }), this.attachCallManagerListeners(this.callManager), this.loadWidgetConfig();
40751
40753
  }
40752
40754
  async loadWidgetConfig() {
40753
40755
  if (this.skipFetch) {
@@ -40776,10 +40778,7 @@ let TA = class extends ng {
40776
40778
  }
40777
40779
  disconnectedCallback() {
40778
40780
  var g;
40779
- super.disconnectedCallback(), this.callManager.removeEventListener(
40780
- "status-changed",
40781
- this.handleStatusChange
40782
- ), this.callManager.removeEventListener("audio-track", this.handleAudioTrack), this.callManager.removeEventListener("local-audio-track", this.handleLocalAudioTrack), this.callManager.removeEventListener("microphone-enabled", this.handleMicrophoneEnabled), this.callManager.removeEventListener("microphone-disabled", this.handleMicrophoneDisabled), this.callManager.removeEventListener("agent-command", this.handleAgentCommand), this.callManager.hangUp(), this.cleanupOrb(), (g = this.soundManager) == null || g.destroy(), this.soundManager = null;
40781
+ super.disconnectedCallback(), this.detachCallManagerListeners(this.callManager), this.callManager.hangUp(), this.cleanupOrb(), (g = this.soundManager) == null || g.destroy(), this.soundManager = null;
40783
40782
  }
40784
40783
  firstUpdated() {
40785
40784
  this.applyTheme(), this.initializeOrb();
@@ -40837,6 +40836,16 @@ let TA = class extends ng {
40837
40836
  };
40838
40837
  this.animationId = requestAnimationFrame(g);
40839
40838
  }
40839
+ attachCallManagerListeners(g) {
40840
+ g.addEventListener("status-changed", this.handleStatusChange), g.addEventListener("audio-track", this.handleAudioTrack), g.addEventListener("local-audio-track", this.handleLocalAudioTrack), g.addEventListener("microphone-enabled", this.handleMicrophoneEnabled), g.addEventListener("microphone-disabled", this.handleMicrophoneDisabled), g.addEventListener("agent-command", this.handleAgentCommand), g.addEventListener("error", this.handleError);
40841
+ }
40842
+ detachCallManagerListeners(g) {
40843
+ g.removeEventListener("status-changed", this.handleStatusChange), g.removeEventListener("audio-track", this.handleAudioTrack), g.removeEventListener("local-audio-track", this.handleLocalAudioTrack), g.removeEventListener("microphone-enabled", this.handleMicrophoneEnabled), g.removeEventListener("microphone-disabled", this.handleMicrophoneDisabled), g.removeEventListener("agent-command", this.handleAgentCommand), g.removeEventListener("error", this.handleError);
40844
+ }
40845
+ // Fresh manager per call: prevents stale async events from mutating new call state.
40846
+ resetCallManager() {
40847
+ this.detachCallManagerListeners(this.callManager), this.callManager.hangUp(), this.callManager = new Ji(), this.voiceServiceUrl && (this.callManager.serviceUrl = this.voiceServiceUrl), this.attachCallManagerListeners(this.callManager);
40848
+ }
40840
40849
  getButtonIcon() {
40841
40850
  return this.callStatus === "connecting" ? ee`
40842
40851
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" class="hanc-spinner">
@@ -40909,7 +40918,7 @@ let TA = class extends ng {
40909
40918
  case "connecting":
40910
40919
  return this.buttonConnectingText;
40911
40920
  case "error":
40912
- return "Error";
40921
+ return this.errorKind === "rate-limit" ? "Too many attempts, try again soon" : "Error";
40913
40922
  default:
40914
40923
  return this.buttonStartText;
40915
40924
  }
@@ -41168,137 +41177,140 @@ let TA = class extends ng {
41168
41177
  `;
41169
41178
  }
41170
41179
  };
41171
- TA.styles = NI`
41180
+ JA.styles = NI`
41172
41181
  :host {
41173
41182
  display: inline-block;
41174
41183
  contain: layout style;
41175
41184
  }
41176
41185
  `;
41177
- jA([
41186
+ HA([
41178
41187
  j({ type: String, attribute: "agent-id" })
41179
- ], TA.prototype, "agentId", 2);
41180
- jA([
41188
+ ], JA.prototype, "agentId", 2);
41189
+ HA([
41181
41190
  j({ type: String, attribute: "voice-service-url" })
41182
- ], TA.prototype, "voiceServiceUrl", 2);
41183
- jA([
41184
- Ce()
41185
- ], TA.prototype, "callStatus", 2);
41186
- jA([
41187
- Ce()
41188
- ], TA.prototype, "microphoneEnabled", 2);
41189
- jA([
41190
- Ce()
41191
- ], TA.prototype, "microphoneInitialized", 2);
41192
- jA([
41193
- Ce()
41194
- ], TA.prototype, "showPrivacyModal", 2);
41195
- jA([
41196
- Ce()
41197
- ], TA.prototype, "widgetConfig", 2);
41198
- jA([
41199
- Ce()
41200
- ], TA.prototype, "configLoading", 2);
41201
- jA([
41202
- Ce()
41203
- ], TA.prototype, "formVisible", 2);
41204
- jA([
41205
- Ce()
41206
- ], TA.prototype, "formRequestId", 2);
41207
- jA([
41208
- Ce()
41209
- ], TA.prototype, "formFields", 2);
41210
- jA([
41211
- Ce()
41212
- ], TA.prototype, "domainBlocked", 2);
41213
- jA([
41191
+ ], JA.prototype, "voiceServiceUrl", 2);
41192
+ HA([
41193
+ ge()
41194
+ ], JA.prototype, "callStatus", 2);
41195
+ HA([
41196
+ ge()
41197
+ ], JA.prototype, "microphoneEnabled", 2);
41198
+ HA([
41199
+ ge()
41200
+ ], JA.prototype, "microphoneInitialized", 2);
41201
+ HA([
41202
+ ge()
41203
+ ], JA.prototype, "showPrivacyModal", 2);
41204
+ HA([
41205
+ ge()
41206
+ ], JA.prototype, "widgetConfig", 2);
41207
+ HA([
41208
+ ge()
41209
+ ], JA.prototype, "configLoading", 2);
41210
+ HA([
41211
+ ge()
41212
+ ], JA.prototype, "formVisible", 2);
41213
+ HA([
41214
+ ge()
41215
+ ], JA.prototype, "formRequestId", 2);
41216
+ HA([
41217
+ ge()
41218
+ ], JA.prototype, "formFields", 2);
41219
+ HA([
41220
+ ge()
41221
+ ], JA.prototype, "domainBlocked", 2);
41222
+ HA([
41223
+ ge()
41224
+ ], JA.prototype, "errorKind", 2);
41225
+ HA([
41214
41226
  j({ type: String, attribute: "privacy-url" })
41215
- ], TA.prototype, "privacyUrl", 2);
41216
- jA([
41227
+ ], JA.prototype, "privacyUrl", 2);
41228
+ HA([
41217
41229
  j({ type: String, attribute: "terms-url" })
41218
- ], TA.prototype, "termsUrl", 2);
41219
- jA([
41230
+ ], JA.prototype, "termsUrl", 2);
41231
+ HA([
41220
41232
  j({ type: Boolean, attribute: "terms-enabled" })
41221
- ], TA.prototype, "termsEnabled", 2);
41222
- jA([
41233
+ ], JA.prototype, "termsEnabled", 2);
41234
+ HA([
41223
41235
  j({ type: String, attribute: "terms-content" })
41224
- ], TA.prototype, "termsContent", 2);
41225
- jA([
41236
+ ], JA.prototype, "termsContent", 2);
41237
+ HA([
41226
41238
  j({ type: Boolean, attribute: "skip-fetch" })
41227
- ], TA.prototype, "skipFetch", 2);
41228
- jA([
41239
+ ], JA.prototype, "skipFetch", 2);
41240
+ HA([
41229
41241
  j({ type: String, attribute: "api-base-url" })
41230
- ], TA.prototype, "apiBaseUrl", 2);
41231
- jA([
41242
+ ], JA.prototype, "apiBaseUrl", 2);
41243
+ HA([
41232
41244
  j({ type: String, attribute: "button-start-text" })
41233
- ], TA.prototype, "buttonStartText", 2);
41234
- jA([
41245
+ ], JA.prototype, "buttonStartText", 2);
41246
+ HA([
41235
41247
  j({ type: String, attribute: "button-connecting-text" })
41236
- ], TA.prototype, "buttonConnectingText", 2);
41237
- jA([
41248
+ ], JA.prototype, "buttonConnectingText", 2);
41249
+ HA([
41238
41250
  j({ type: Number, attribute: "size" })
41239
- ], TA.prototype, "size", 2);
41240
- jA([
41251
+ ], JA.prototype, "size", 2);
41252
+ HA([
41241
41253
  j({ type: Number, attribute: "container-padding" })
41242
- ], TA.prototype, "containerPadding", 2);
41243
- jA([
41254
+ ], JA.prototype, "containerPadding", 2);
41255
+ HA([
41244
41256
  j({ type: String, attribute: "theme", reflect: !0 })
41245
- ], TA.prototype, "theme", 2);
41246
- jA([
41257
+ ], JA.prototype, "theme", 2);
41258
+ HA([
41247
41259
  j({ type: Object, attribute: "orb-colors" })
41248
- ], TA.prototype, "orbColors", 2);
41249
- jA([
41260
+ ], JA.prototype, "orbColors", 2);
41261
+ HA([
41250
41262
  j({ type: Number, attribute: "glow-intensity" })
41251
- ], TA.prototype, "glowIntensity", 2);
41252
- jA([
41263
+ ], JA.prototype, "glowIntensity", 2);
41264
+ HA([
41253
41265
  j({ type: Number, attribute: "idle-glow-multiplier" })
41254
- ], TA.prototype, "idleGlowMultiplier", 2);
41255
- jA([
41266
+ ], JA.prototype, "idleGlowMultiplier", 2);
41267
+ HA([
41256
41268
  j({ type: Number, attribute: "morph-strength" })
41257
- ], TA.prototype, "morphStrength", 2);
41258
- jA([
41269
+ ], JA.prototype, "morphStrength", 2);
41270
+ HA([
41259
41271
  j({ type: Number, attribute: "noise-scale" })
41260
- ], TA.prototype, "noiseScale", 2);
41261
- jA([
41272
+ ], JA.prototype, "noiseScale", 2);
41273
+ HA([
41262
41274
  j({ type: Number, attribute: "noise-speed" })
41263
- ], TA.prototype, "noiseSpeed", 2);
41264
- jA([
41275
+ ], JA.prototype, "noiseSpeed", 2);
41276
+ HA([
41265
41277
  j({ type: Number, attribute: "fresnel-power" })
41266
- ], TA.prototype, "fresnelPower", 2);
41267
- jA([
41278
+ ], JA.prototype, "fresnelPower", 2);
41279
+ HA([
41268
41280
  j({ type: Number, attribute: "rotation-speed" })
41269
- ], TA.prototype, "rotationSpeed", 2);
41270
- jA([
41281
+ ], JA.prototype, "rotationSpeed", 2);
41282
+ HA([
41271
41283
  j({ type: Number, attribute: "audio-reactivity" })
41272
- ], TA.prototype, "audioReactivity", 2);
41273
- jA([
41284
+ ], JA.prototype, "audioReactivity", 2);
41285
+ HA([
41274
41286
  j({ type: Number, attribute: "audio-smoothing" })
41275
- ], TA.prototype, "audioSmoothing", 2);
41276
- jA([
41287
+ ], JA.prototype, "audioSmoothing", 2);
41288
+ HA([
41277
41289
  j({ type: Number, attribute: "idle-morph-multiplier" })
41278
- ], TA.prototype, "idleMorphMultiplier", 2);
41279
- jA([
41290
+ ], JA.prototype, "idleMorphMultiplier", 2);
41291
+ HA([
41280
41292
  j({ type: Number, attribute: "color-contrast" })
41281
- ], TA.prototype, "colorContrast", 2);
41282
- jA([
41293
+ ], JA.prototype, "colorContrast", 2);
41294
+ HA([
41283
41295
  j({ type: Boolean, attribute: "sound-enabled" })
41284
- ], TA.prototype, "soundEnabled", 2);
41285
- jA([
41296
+ ], JA.prototype, "soundEnabled", 2);
41297
+ HA([
41286
41298
  j({ type: Number, attribute: "sound-volume" })
41287
- ], TA.prototype, "soundVolume", 2);
41288
- jA([
41299
+ ], JA.prototype, "soundVolume", 2);
41300
+ HA([
41289
41301
  j({ type: String, attribute: "sound-preset" })
41290
- ], TA.prototype, "soundPreset", 2);
41291
- TA = jA([
41302
+ ], JA.prototype, "soundPreset", 2);
41303
+ JA = HA([
41292
41304
  SI("hanc-ai-inline-call")
41293
- ], TA);
41294
- var Kw = Object.defineProperty, vw = Object.getOwnPropertyDescriptor, ge = (g, A, e, t) => {
41305
+ ], JA);
41306
+ var Kw = Object.defineProperty, vw = Object.getOwnPropertyDescriptor, ie = (g, A, e, t) => {
41295
41307
  for (var i = t > 1 ? void 0 : t ? vw(A, e) : A, I = g.length - 1, C; I >= 0; I--)
41296
41308
  (C = g[I]) && (i = (t ? C(A, e, i) : C(i)) || i);
41297
41309
  return t && i && Kw(A, e, i), i;
41298
41310
  };
41299
41311
  let XA = class extends ng {
41300
41312
  constructor() {
41301
- super(...arguments), this.callManager = new _I(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this._disconnectTimer = null, this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.domainBlocked = !1, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Call", this.buttonConnectingText = "Connecting...", this.position = "bottom-right", this.size = 120, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
41313
+ super(...arguments), this.callManager = new Ji(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this._disconnectTimer = null, this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.domainBlocked = !1, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Call", this.buttonConnectingText = "Connecting...", this.position = "bottom-right", this.size = 120, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
41302
41314
  const e = g.detail;
41303
41315
  if (!(!e || !this.audioAnalyzer))
41304
41316
  try {
@@ -41799,122 +41811,122 @@ XA.styles = NI`
41799
41811
  display: block;
41800
41812
  }
41801
41813
  `;
41802
- ge([
41814
+ ie([
41803
41815
  j({ type: String, attribute: "agent-id" })
41804
41816
  ], XA.prototype, "agentId", 2);
41805
- ge([
41817
+ ie([
41806
41818
  j({ type: String, attribute: "voice-service-url" })
41807
41819
  ], XA.prototype, "voiceServiceUrl", 2);
41808
- ge([
41809
- Ce()
41820
+ ie([
41821
+ ge()
41810
41822
  ], XA.prototype, "callStatus", 2);
41811
- ge([
41812
- Ce()
41823
+ ie([
41824
+ ge()
41813
41825
  ], XA.prototype, "microphoneEnabled", 2);
41814
- ge([
41815
- Ce()
41826
+ ie([
41827
+ ge()
41816
41828
  ], XA.prototype, "microphoneInitialized", 2);
41817
- ge([
41818
- Ce()
41829
+ ie([
41830
+ ge()
41819
41831
  ], XA.prototype, "showPrivacyModal", 2);
41820
- ge([
41821
- Ce()
41832
+ ie([
41833
+ ge()
41822
41834
  ], XA.prototype, "widgetConfig", 2);
41823
- ge([
41824
- Ce()
41835
+ ie([
41836
+ ge()
41825
41837
  ], XA.prototype, "configLoading", 2);
41826
- ge([
41827
- Ce()
41838
+ ie([
41839
+ ge()
41828
41840
  ], XA.prototype, "domainBlocked", 2);
41829
- ge([
41841
+ ie([
41830
41842
  j({ type: String, attribute: "privacy-url" })
41831
41843
  ], XA.prototype, "privacyUrl", 2);
41832
- ge([
41844
+ ie([
41833
41845
  j({ type: String, attribute: "terms-url" })
41834
41846
  ], XA.prototype, "termsUrl", 2);
41835
- ge([
41847
+ ie([
41836
41848
  j({ type: Boolean, attribute: "terms-enabled" })
41837
41849
  ], XA.prototype, "termsEnabled", 2);
41838
- ge([
41850
+ ie([
41839
41851
  j({ type: String, attribute: "terms-content" })
41840
41852
  ], XA.prototype, "termsContent", 2);
41841
- ge([
41853
+ ie([
41842
41854
  j({ type: Boolean, attribute: "skip-fetch" })
41843
41855
  ], XA.prototype, "skipFetch", 2);
41844
- ge([
41856
+ ie([
41845
41857
  j({ type: String, attribute: "api-base-url" })
41846
41858
  ], XA.prototype, "apiBaseUrl", 2);
41847
- ge([
41859
+ ie([
41848
41860
  j({ type: String, attribute: "button-start-text" })
41849
41861
  ], XA.prototype, "buttonStartText", 2);
41850
- ge([
41862
+ ie([
41851
41863
  j({ type: String, attribute: "button-connecting-text" })
41852
41864
  ], XA.prototype, "buttonConnectingText", 2);
41853
- ge([
41865
+ ie([
41854
41866
  j({ type: String, attribute: "position" })
41855
41867
  ], XA.prototype, "position", 2);
41856
- ge([
41868
+ ie([
41857
41869
  j({ type: Number, attribute: "size" })
41858
41870
  ], XA.prototype, "size", 2);
41859
- ge([
41871
+ ie([
41860
41872
  j({ type: String, attribute: "theme" })
41861
41873
  ], XA.prototype, "theme", 2);
41862
- ge([
41874
+ ie([
41863
41875
  j({ type: Object, attribute: "orb-colors" })
41864
41876
  ], XA.prototype, "orbColors", 2);
41865
- ge([
41877
+ ie([
41866
41878
  j({ type: Number, attribute: "glow-intensity" })
41867
41879
  ], XA.prototype, "glowIntensity", 2);
41868
- ge([
41880
+ ie([
41869
41881
  j({ type: Number, attribute: "idle-glow-multiplier" })
41870
41882
  ], XA.prototype, "idleGlowMultiplier", 2);
41871
- ge([
41883
+ ie([
41872
41884
  j({ type: Number, attribute: "morph-strength" })
41873
41885
  ], XA.prototype, "morphStrength", 2);
41874
- ge([
41886
+ ie([
41875
41887
  j({ type: Number, attribute: "noise-scale" })
41876
41888
  ], XA.prototype, "noiseScale", 2);
41877
- ge([
41889
+ ie([
41878
41890
  j({ type: Number, attribute: "noise-speed" })
41879
41891
  ], XA.prototype, "noiseSpeed", 2);
41880
- ge([
41892
+ ie([
41881
41893
  j({ type: Number, attribute: "fresnel-power" })
41882
41894
  ], XA.prototype, "fresnelPower", 2);
41883
- ge([
41895
+ ie([
41884
41896
  j({ type: Number, attribute: "rotation-speed" })
41885
41897
  ], XA.prototype, "rotationSpeed", 2);
41886
- ge([
41898
+ ie([
41887
41899
  j({ type: Number, attribute: "audio-reactivity" })
41888
41900
  ], XA.prototype, "audioReactivity", 2);
41889
- ge([
41901
+ ie([
41890
41902
  j({ type: Number, attribute: "audio-smoothing" })
41891
41903
  ], XA.prototype, "audioSmoothing", 2);
41892
- ge([
41904
+ ie([
41893
41905
  j({ type: Number, attribute: "idle-morph-multiplier" })
41894
41906
  ], XA.prototype, "idleMorphMultiplier", 2);
41895
- ge([
41907
+ ie([
41896
41908
  j({ type: Number, attribute: "color-contrast" })
41897
41909
  ], XA.prototype, "colorContrast", 2);
41898
- ge([
41910
+ ie([
41899
41911
  j({ type: Boolean, attribute: "sound-enabled" })
41900
41912
  ], XA.prototype, "soundEnabled", 2);
41901
- ge([
41913
+ ie([
41902
41914
  j({ type: Number, attribute: "sound-volume" })
41903
41915
  ], XA.prototype, "soundVolume", 2);
41904
- ge([
41916
+ ie([
41905
41917
  j({ type: String, attribute: "sound-preset" })
41906
41918
  ], XA.prototype, "soundPreset", 2);
41907
- XA = ge([
41919
+ XA = ie([
41908
41920
  SI("hanc-ai-floating-call")
41909
41921
  ], XA);
41910
- var Jw = Object.defineProperty, Yw = Object.getOwnPropertyDescriptor, ie = (g, A, e, t) => {
41922
+ var Jw = Object.defineProperty, Yw = Object.getOwnPropertyDescriptor, Ie = (g, A, e, t) => {
41911
41923
  for (var i = t > 1 ? void 0 : t ? Yw(A, e) : A, I = g.length - 1, C; I >= 0; I--)
41912
41924
  (C = g[I]) && (i = (t ? C(A, e, i) : C(i)) || i);
41913
41925
  return t && i && Jw(A, e, i), i;
41914
41926
  };
41915
41927
  let ZA = class extends ng {
41916
41928
  constructor() {
41917
- super(...arguments), this.callManager = new _I(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.domainBlocked = !1, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Talk to AI Agent", this.buttonConnectingText = "Connecting...", this.buttonEndText = "End call", this.orbSize = 48, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
41929
+ super(...arguments), this.callManager = new Ji(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.domainBlocked = !1, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Talk to AI Agent", this.buttonConnectingText = "Connecting...", this.buttonEndText = "End call", this.orbSize = 48, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
41918
41930
  const e = g.detail;
41919
41931
  if (!(!e || !this.audioAnalyzer))
41920
41932
  try {
@@ -42349,112 +42361,112 @@ ZA.styles = NI`
42349
42361
  contain: layout style;
42350
42362
  }
42351
42363
  `;
42352
- ie([
42364
+ Ie([
42353
42365
  j({ type: String, attribute: "agent-id" })
42354
42366
  ], ZA.prototype, "agentId", 2);
42355
- ie([
42367
+ Ie([
42356
42368
  j({ type: String, attribute: "voice-service-url" })
42357
42369
  ], ZA.prototype, "voiceServiceUrl", 2);
42358
- ie([
42359
- Ce()
42370
+ Ie([
42371
+ ge()
42360
42372
  ], ZA.prototype, "callStatus", 2);
42361
- ie([
42362
- Ce()
42373
+ Ie([
42374
+ ge()
42363
42375
  ], ZA.prototype, "microphoneEnabled", 2);
42364
- ie([
42365
- Ce()
42376
+ Ie([
42377
+ ge()
42366
42378
  ], ZA.prototype, "microphoneInitialized", 2);
42367
- ie([
42368
- Ce()
42379
+ Ie([
42380
+ ge()
42369
42381
  ], ZA.prototype, "showPrivacyModal", 2);
42370
- ie([
42371
- Ce()
42382
+ Ie([
42383
+ ge()
42372
42384
  ], ZA.prototype, "widgetConfig", 2);
42373
- ie([
42374
- Ce()
42385
+ Ie([
42386
+ ge()
42375
42387
  ], ZA.prototype, "configLoading", 2);
42376
- ie([
42377
- Ce()
42388
+ Ie([
42389
+ ge()
42378
42390
  ], ZA.prototype, "domainBlocked", 2);
42379
- ie([
42391
+ Ie([
42380
42392
  j({ type: String, attribute: "privacy-url" })
42381
42393
  ], ZA.prototype, "privacyUrl", 2);
42382
- ie([
42394
+ Ie([
42383
42395
  j({ type: String, attribute: "terms-url" })
42384
42396
  ], ZA.prototype, "termsUrl", 2);
42385
- ie([
42397
+ Ie([
42386
42398
  j({ type: Boolean, attribute: "terms-enabled" })
42387
42399
  ], ZA.prototype, "termsEnabled", 2);
42388
- ie([
42400
+ Ie([
42389
42401
  j({ type: String, attribute: "terms-content" })
42390
42402
  ], ZA.prototype, "termsContent", 2);
42391
- ie([
42403
+ Ie([
42392
42404
  j({ type: Boolean, attribute: "skip-fetch" })
42393
42405
  ], ZA.prototype, "skipFetch", 2);
42394
- ie([
42406
+ Ie([
42395
42407
  j({ type: String, attribute: "api-base-url" })
42396
42408
  ], ZA.prototype, "apiBaseUrl", 2);
42397
- ie([
42409
+ Ie([
42398
42410
  j({ type: String, attribute: "button-start-text" })
42399
42411
  ], ZA.prototype, "buttonStartText", 2);
42400
- ie([
42412
+ Ie([
42401
42413
  j({ type: String, attribute: "button-connecting-text" })
42402
42414
  ], ZA.prototype, "buttonConnectingText", 2);
42403
- ie([
42415
+ Ie([
42404
42416
  j({ type: String, attribute: "button-end-text" })
42405
42417
  ], ZA.prototype, "buttonEndText", 2);
42406
- ie([
42418
+ Ie([
42407
42419
  j({ type: Number, attribute: "orb-size" })
42408
42420
  ], ZA.prototype, "orbSize", 2);
42409
- ie([
42421
+ Ie([
42410
42422
  j({ type: String, attribute: "theme" })
42411
42423
  ], ZA.prototype, "theme", 2);
42412
- ie([
42424
+ Ie([
42413
42425
  j({ type: Object, attribute: "orb-colors" })
42414
42426
  ], ZA.prototype, "orbColors", 2);
42415
- ie([
42427
+ Ie([
42416
42428
  j({ type: Number, attribute: "glow-intensity" })
42417
42429
  ], ZA.prototype, "glowIntensity", 2);
42418
- ie([
42430
+ Ie([
42419
42431
  j({ type: Number, attribute: "idle-glow-multiplier" })
42420
42432
  ], ZA.prototype, "idleGlowMultiplier", 2);
42421
- ie([
42433
+ Ie([
42422
42434
  j({ type: Number, attribute: "morph-strength" })
42423
42435
  ], ZA.prototype, "morphStrength", 2);
42424
- ie([
42436
+ Ie([
42425
42437
  j({ type: Number, attribute: "noise-scale" })
42426
42438
  ], ZA.prototype, "noiseScale", 2);
42427
- ie([
42439
+ Ie([
42428
42440
  j({ type: Number, attribute: "noise-speed" })
42429
42441
  ], ZA.prototype, "noiseSpeed", 2);
42430
- ie([
42442
+ Ie([
42431
42443
  j({ type: Number, attribute: "fresnel-power" })
42432
42444
  ], ZA.prototype, "fresnelPower", 2);
42433
- ie([
42445
+ Ie([
42434
42446
  j({ type: Number, attribute: "rotation-speed" })
42435
42447
  ], ZA.prototype, "rotationSpeed", 2);
42436
- ie([
42448
+ Ie([
42437
42449
  j({ type: Number, attribute: "audio-reactivity" })
42438
42450
  ], ZA.prototype, "audioReactivity", 2);
42439
- ie([
42451
+ Ie([
42440
42452
  j({ type: Number, attribute: "audio-smoothing" })
42441
42453
  ], ZA.prototype, "audioSmoothing", 2);
42442
- ie([
42454
+ Ie([
42443
42455
  j({ type: Number, attribute: "idle-morph-multiplier" })
42444
42456
  ], ZA.prototype, "idleMorphMultiplier", 2);
42445
- ie([
42457
+ Ie([
42446
42458
  j({ type: Number, attribute: "color-contrast" })
42447
42459
  ], ZA.prototype, "colorContrast", 2);
42448
- ie([
42460
+ Ie([
42449
42461
  j({ type: Boolean, attribute: "sound-enabled" })
42450
42462
  ], ZA.prototype, "soundEnabled", 2);
42451
- ie([
42463
+ Ie([
42452
42464
  j({ type: Number, attribute: "sound-volume" })
42453
42465
  ], ZA.prototype, "soundVolume", 2);
42454
- ie([
42466
+ Ie([
42455
42467
  j({ type: String, attribute: "sound-preset" })
42456
42468
  ], ZA.prototype, "soundPreset", 2);
42457
- ZA = ie([
42469
+ ZA = Ie([
42458
42470
  SI("hanc-ai-pill-call")
42459
42471
  ], ZA);
42460
42472
  var Tw = Object.defineProperty, qw = Object.getOwnPropertyDescriptor, Ae = (g, A, e, t) => {
@@ -42462,9 +42474,9 @@ var Tw = Object.defineProperty, qw = Object.getOwnPropertyDescriptor, Ae = (g, A
42462
42474
  (C = g[I]) && (i = (t ? C(A, e, i) : C(i)) || i);
42463
42475
  return t && i && Tw(A, e, i), i;
42464
42476
  };
42465
- let VA = class extends ng {
42477
+ let jA = class extends ng {
42466
42478
  constructor() {
42467
- super(...arguments), this.callManager = new _I(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.domainBlocked = !1, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Talk to AI Agent", this.buttonConnectingText = "Connecting...", this.buttonEndText = "End call", this.position = "bottom-right", this.orbSize = 48, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
42479
+ super(...arguments), this.callManager = new Ji(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = Ko(), this.animationId = null, this.user_identity = ga(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.domainBlocked = !1, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = pC, this.buttonStartText = "Talk to AI Agent", this.buttonConnectingText = "Connecting...", this.buttonEndText = "End call", this.position = "bottom-right", this.orbSize = 48, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (g) => {
42468
42480
  const e = g.detail;
42469
42481
  if (!(!e || !this.audioAnalyzer))
42470
42482
  try {
@@ -42888,127 +42900,127 @@ let VA = class extends ng {
42888
42900
  `;
42889
42901
  }
42890
42902
  };
42891
- VA.styles = NI`
42903
+ jA.styles = NI`
42892
42904
  :host {
42893
42905
  display: block;
42894
42906
  }
42895
42907
  `;
42896
42908
  Ae([
42897
42909
  j({ type: String, attribute: "agent-id" })
42898
- ], VA.prototype, "agentId", 2);
42910
+ ], jA.prototype, "agentId", 2);
42899
42911
  Ae([
42900
42912
  j({ type: String, attribute: "voice-service-url" })
42901
- ], VA.prototype, "voiceServiceUrl", 2);
42913
+ ], jA.prototype, "voiceServiceUrl", 2);
42902
42914
  Ae([
42903
- Ce()
42904
- ], VA.prototype, "callStatus", 2);
42915
+ ge()
42916
+ ], jA.prototype, "callStatus", 2);
42905
42917
  Ae([
42906
- Ce()
42907
- ], VA.prototype, "microphoneEnabled", 2);
42918
+ ge()
42919
+ ], jA.prototype, "microphoneEnabled", 2);
42908
42920
  Ae([
42909
- Ce()
42910
- ], VA.prototype, "microphoneInitialized", 2);
42921
+ ge()
42922
+ ], jA.prototype, "microphoneInitialized", 2);
42911
42923
  Ae([
42912
- Ce()
42913
- ], VA.prototype, "showPrivacyModal", 2);
42924
+ ge()
42925
+ ], jA.prototype, "showPrivacyModal", 2);
42914
42926
  Ae([
42915
- Ce()
42916
- ], VA.prototype, "widgetConfig", 2);
42927
+ ge()
42928
+ ], jA.prototype, "widgetConfig", 2);
42917
42929
  Ae([
42918
- Ce()
42919
- ], VA.prototype, "configLoading", 2);
42930
+ ge()
42931
+ ], jA.prototype, "configLoading", 2);
42920
42932
  Ae([
42921
- Ce()
42922
- ], VA.prototype, "domainBlocked", 2);
42933
+ ge()
42934
+ ], jA.prototype, "domainBlocked", 2);
42923
42935
  Ae([
42924
42936
  j({ type: String, attribute: "privacy-url" })
42925
- ], VA.prototype, "privacyUrl", 2);
42937
+ ], jA.prototype, "privacyUrl", 2);
42926
42938
  Ae([
42927
42939
  j({ type: String, attribute: "terms-url" })
42928
- ], VA.prototype, "termsUrl", 2);
42940
+ ], jA.prototype, "termsUrl", 2);
42929
42941
  Ae([
42930
42942
  j({ type: Boolean, attribute: "terms-enabled" })
42931
- ], VA.prototype, "termsEnabled", 2);
42943
+ ], jA.prototype, "termsEnabled", 2);
42932
42944
  Ae([
42933
42945
  j({ type: String, attribute: "terms-content" })
42934
- ], VA.prototype, "termsContent", 2);
42946
+ ], jA.prototype, "termsContent", 2);
42935
42947
  Ae([
42936
42948
  j({ type: Boolean, attribute: "skip-fetch" })
42937
- ], VA.prototype, "skipFetch", 2);
42949
+ ], jA.prototype, "skipFetch", 2);
42938
42950
  Ae([
42939
42951
  j({ type: String, attribute: "api-base-url" })
42940
- ], VA.prototype, "apiBaseUrl", 2);
42952
+ ], jA.prototype, "apiBaseUrl", 2);
42941
42953
  Ae([
42942
42954
  j({ type: String, attribute: "button-start-text" })
42943
- ], VA.prototype, "buttonStartText", 2);
42955
+ ], jA.prototype, "buttonStartText", 2);
42944
42956
  Ae([
42945
42957
  j({ type: String, attribute: "button-connecting-text" })
42946
- ], VA.prototype, "buttonConnectingText", 2);
42958
+ ], jA.prototype, "buttonConnectingText", 2);
42947
42959
  Ae([
42948
42960
  j({ type: String, attribute: "button-end-text" })
42949
- ], VA.prototype, "buttonEndText", 2);
42961
+ ], jA.prototype, "buttonEndText", 2);
42950
42962
  Ae([
42951
42963
  j({ type: String, attribute: "position" })
42952
- ], VA.prototype, "position", 2);
42964
+ ], jA.prototype, "position", 2);
42953
42965
  Ae([
42954
42966
  j({ type: Number, attribute: "orb-size" })
42955
- ], VA.prototype, "orbSize", 2);
42967
+ ], jA.prototype, "orbSize", 2);
42956
42968
  Ae([
42957
42969
  j({ type: String, attribute: "theme" })
42958
- ], VA.prototype, "theme", 2);
42970
+ ], jA.prototype, "theme", 2);
42959
42971
  Ae([
42960
42972
  j({ type: Object, attribute: "orb-colors" })
42961
- ], VA.prototype, "orbColors", 2);
42973
+ ], jA.prototype, "orbColors", 2);
42962
42974
  Ae([
42963
42975
  j({ type: Number, attribute: "glow-intensity" })
42964
- ], VA.prototype, "glowIntensity", 2);
42976
+ ], jA.prototype, "glowIntensity", 2);
42965
42977
  Ae([
42966
42978
  j({ type: Number, attribute: "idle-glow-multiplier" })
42967
- ], VA.prototype, "idleGlowMultiplier", 2);
42979
+ ], jA.prototype, "idleGlowMultiplier", 2);
42968
42980
  Ae([
42969
42981
  j({ type: Number, attribute: "morph-strength" })
42970
- ], VA.prototype, "morphStrength", 2);
42982
+ ], jA.prototype, "morphStrength", 2);
42971
42983
  Ae([
42972
42984
  j({ type: Number, attribute: "noise-scale" })
42973
- ], VA.prototype, "noiseScale", 2);
42985
+ ], jA.prototype, "noiseScale", 2);
42974
42986
  Ae([
42975
42987
  j({ type: Number, attribute: "noise-speed" })
42976
- ], VA.prototype, "noiseSpeed", 2);
42988
+ ], jA.prototype, "noiseSpeed", 2);
42977
42989
  Ae([
42978
42990
  j({ type: Number, attribute: "fresnel-power" })
42979
- ], VA.prototype, "fresnelPower", 2);
42991
+ ], jA.prototype, "fresnelPower", 2);
42980
42992
  Ae([
42981
42993
  j({ type: Number, attribute: "rotation-speed" })
42982
- ], VA.prototype, "rotationSpeed", 2);
42994
+ ], jA.prototype, "rotationSpeed", 2);
42983
42995
  Ae([
42984
42996
  j({ type: Number, attribute: "audio-reactivity" })
42985
- ], VA.prototype, "audioReactivity", 2);
42997
+ ], jA.prototype, "audioReactivity", 2);
42986
42998
  Ae([
42987
42999
  j({ type: Number, attribute: "audio-smoothing" })
42988
- ], VA.prototype, "audioSmoothing", 2);
43000
+ ], jA.prototype, "audioSmoothing", 2);
42989
43001
  Ae([
42990
43002
  j({ type: Number, attribute: "idle-morph-multiplier" })
42991
- ], VA.prototype, "idleMorphMultiplier", 2);
43003
+ ], jA.prototype, "idleMorphMultiplier", 2);
42992
43004
  Ae([
42993
43005
  j({ type: Number, attribute: "color-contrast" })
42994
- ], VA.prototype, "colorContrast", 2);
43006
+ ], jA.prototype, "colorContrast", 2);
42995
43007
  Ae([
42996
43008
  j({ type: Boolean, attribute: "sound-enabled" })
42997
- ], VA.prototype, "soundEnabled", 2);
43009
+ ], jA.prototype, "soundEnabled", 2);
42998
43010
  Ae([
42999
43011
  j({ type: Number, attribute: "sound-volume" })
43000
- ], VA.prototype, "soundVolume", 2);
43012
+ ], jA.prototype, "soundVolume", 2);
43001
43013
  Ae([
43002
43014
  j({ type: String, attribute: "sound-preset" })
43003
- ], VA.prototype, "soundPreset", 2);
43004
- VA = Ae([
43015
+ ], jA.prototype, "soundPreset", 2);
43016
+ jA = Ae([
43005
43017
  SI("hanc-ai-pill-floating-call")
43006
- ], VA);
43018
+ ], jA);
43007
43019
  export {
43008
43020
  XA as FloatingCall,
43009
- TA as InlineCall,
43021
+ JA as InlineCall,
43010
43022
  ZA as PillCall,
43011
- VA as PillFloatingCall,
43023
+ jA as PillFloatingCall,
43012
43024
  Aa as SoundManager,
43013
43025
  Cm as applyTheme,
43014
43026
  om as clearConfigCache,