@realsee/five 6.6.18 → 6.6.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/five/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/11/2025
5
- * Version: 6.6.18
4
+ * Generated: 2025/12/22
5
+ * Version: 6.6.19
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -524,10 +524,10 @@ var KJUR = {}, CryptoJS = CryptoJS || (function(n, t) {
524
524
  if (16 > I)
525
525
  p[I] = A[g + I] | 0;
526
526
  else {
527
- var B = p[I - 15], M = p[I - 2];
528
- p[I] = ((B << 25 | B >>> 7) ^ (B << 14 | B >>> 18) ^ B >>> 3) + p[I - 7] + ((M << 15 | M >>> 17) ^ (M << 13 | M >>> 19) ^ M >>> 10) + p[I - 16];
527
+ var P = p[I - 15], M = p[I - 2];
528
+ p[I] = ((P << 25 | P >>> 7) ^ (P << 14 | P >>> 18) ^ P >>> 3) + p[I - 7] + ((M << 15 | M >>> 17) ^ (M << 13 | M >>> 19) ^ M >>> 10) + p[I - 16];
529
529
  }
530
- B = w + ((S << 26 | S >>> 6) ^ (S << 21 | S >>> 11) ^ (S << 7 | S >>> 25)) + (S & R ^ ~S & C) + s[I] + p[I], M = ((v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22)) + (v & E ^ v & T ^ E & T), w = C, C = R, R = S, S = b + B | 0, b = T, T = E, E = v, v = B + M | 0;
530
+ P = w + ((S << 26 | S >>> 6) ^ (S << 21 | S >>> 11) ^ (S << 7 | S >>> 25)) + (S & R ^ ~S & C) + s[I] + p[I], M = ((v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22)) + (v & E ^ v & T ^ E & T), w = C, C = R, R = S, S = b + P | 0, b = T, T = E, E = v, v = P + M | 0;
531
531
  }
532
532
  y[0] = y[0] + v | 0, y[1] = y[1] + E | 0, y[2] = y[2] + T | 0, y[3] = y[3] + b | 0, y[4] = y[4] + S | 0, y[5] = y[5] + R | 0, y[6] = y[6] + C | 0, y[7] = y[7] + w | 0;
533
533
  },
@@ -740,15 +740,15 @@ CryptoJS.lib.Cipher || (function(n) {
740
740
  54
741
741
  ], R = R.AES = t.extend({
742
742
  _doReset: function() {
743
- for (var I = this._key, C = I.words, w = I.sigBytes / 4, I = 4 * ((this._nRounds = w + 6) + 1), B = this._keySchedule = [], M = 0; M < I; M++)
743
+ for (var I = this._key, C = I.words, w = I.sigBytes / 4, I = 4 * ((this._nRounds = w + 6) + 1), P = this._keySchedule = [], M = 0; M < I; M++)
744
744
  if (M < w)
745
- B[M] = C[M];
745
+ P[M] = C[M];
746
746
  else {
747
- var P = B[M - 1];
748
- M % w ? 6 < w && M % w == 4 && (P = e[P >>> 24] << 24 | e[P >>> 16 & 255] << 16 | e[P >>> 8 & 255] << 8 | e[P & 255]) : (P = P << 8 | P >>> 24, P = e[P >>> 24] << 24 | e[P >>> 16 & 255] << 16 | e[P >>> 8 & 255] << 8 | e[P & 255], P ^= S[M / w | 0] << 24), B[M] = B[M - w] ^ P;
747
+ var B = P[M - 1];
748
+ M % w ? 6 < w && M % w == 4 && (B = e[B >>> 24] << 24 | e[B >>> 16 & 255] << 16 | e[B >>> 8 & 255] << 8 | e[B & 255]) : (B = B << 8 | B >>> 24, B = e[B >>> 24] << 24 | e[B >>> 16 & 255] << 16 | e[B >>> 8 & 255] << 8 | e[B & 255], B ^= S[M / w | 0] << 24), P[M] = P[M - w] ^ B;
749
749
  }
750
750
  for (C = this._invKeySchedule = [], w = 0; w < I; w++)
751
- M = I - w, P = w % 4 ? B[M] : B[M - 4], C[w] = 4 > w || 4 >= M ? P : c[e[P >>> 24]] ^ f[e[P >>> 16 & 255]] ^ d[e[P >>> 8 & 255]] ^ h[e[P & 255]];
751
+ M = I - w, B = w % 4 ? P[M] : P[M - 4], C[w] = 4 > w || 4 >= M ? B : c[e[B >>> 24]] ^ f[e[B >>> 16 & 255]] ^ d[e[B >>> 8 & 255]] ^ h[e[B & 255]];
752
752
  },
753
753
  encryptBlock: function(C, w) {
754
754
  this._doCryptBlock(C, w, this._keySchedule, o, s, u, l, e);
@@ -757,9 +757,9 @@ CryptoJS.lib.Cipher || (function(n) {
757
757
  var I = C[w + 1];
758
758
  C[w + 1] = C[w + 3], C[w + 3] = I, this._doCryptBlock(C, w, this._invKeySchedule, c, f, d, h, r), I = C[w + 1], C[w + 1] = C[w + 3], C[w + 3] = I;
759
759
  },
760
- _doCryptBlock: function(C, w, I, B, M, P, O, L) {
760
+ _doCryptBlock: function(C, w, I, P, M, B, O, L) {
761
761
  for (var F = this._nRounds, U = C[w] ^ I[0], q = C[w + 1] ^ I[1], G = C[w + 2] ^ I[2], J = C[w + 3] ^ I[3], D = 4, k = 1; k < F; k++)
762
- var j = B[U >>> 24] ^ M[q >>> 16 & 255] ^ P[G >>> 8 & 255] ^ O[J & 255] ^ I[D++], z = B[q >>> 24] ^ M[G >>> 16 & 255] ^ P[J >>> 8 & 255] ^ O[U & 255] ^ I[D++], V = B[G >>> 24] ^ M[J >>> 16 & 255] ^ P[U >>> 8 & 255] ^ O[q & 255] ^ I[D++], J = B[J >>> 24] ^ M[U >>> 16 & 255] ^ P[q >>> 8 & 255] ^ O[G & 255] ^ I[D++], U = j, q = z, G = V;
762
+ var j = P[U >>> 24] ^ M[q >>> 16 & 255] ^ B[G >>> 8 & 255] ^ O[J & 255] ^ I[D++], z = P[q >>> 24] ^ M[G >>> 16 & 255] ^ B[J >>> 8 & 255] ^ O[U & 255] ^ I[D++], V = P[G >>> 24] ^ M[J >>> 16 & 255] ^ B[U >>> 8 & 255] ^ O[q & 255] ^ I[D++], J = P[J >>> 24] ^ M[U >>> 16 & 255] ^ B[q >>> 8 & 255] ^ O[G & 255] ^ I[D++], U = j, q = z, G = V;
763
763
  j = (L[U >>> 24] << 24 | L[q >>> 16 & 255] << 16 | L[G >>> 8 & 255] << 8 | L[J & 255]) ^ I[D++], z = (L[q >>> 24] << 24 | L[G >>> 16 & 255] << 16 | L[J >>> 8 & 255] << 8 | L[U & 255]) ^ I[D++], V = (L[G >>> 24] << 24 | L[J >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[q & 255]) ^ I[D++], J = (L[J >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[q >>> 8 & 255] << 8 | L[G & 255]) ^ I[D++], C[w] = j, C[w + 1] = z, C[w + 2] = V, C[w + 3] = J;
764
764
  },
765
765
  keySize: 8
@@ -1866,7 +1866,7 @@ var KEYUTIL = /* @__PURE__ */ (function() {
1866
1866
  var I = v(A, w[1]);
1867
1867
  try {
1868
1868
  E.pbkdf2Iter = parseInt(I, 16);
1869
- } catch (B) {
1869
+ } catch (P) {
1870
1870
  throw "malformed format pbkdf2Iter: " + I;
1871
1871
  }
1872
1872
  return E;
@@ -2060,8 +2060,8 @@ KEYUTIL.getKey = function(n, t, e) {
2060
2060
  return h.getKey(R, null, "pkcs5prv");
2061
2061
  }
2062
2062
  if (n.indexOf("-END DSA PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") == -1) {
2063
- var C = d(n, "DSA PRIVATE KEY"), w = s(C, 0, [1], "02"), I = s(C, 0, [2], "02"), B = s(C, 0, [3], "02"), M = s(C, 0, [4], "02"), P = s(C, 0, [5], "02"), p = new c();
2064
- return p.setPrivate(new BigInteger(w, 16), new BigInteger(I, 16), new BigInteger(B, 16), new BigInteger(M, 16), new BigInteger(P, 16)), p;
2063
+ var C = d(n, "DSA PRIVATE KEY"), w = s(C, 0, [1], "02"), I = s(C, 0, [2], "02"), P = s(C, 0, [3], "02"), M = s(C, 0, [4], "02"), B = s(C, 0, [5], "02"), p = new c();
2064
+ return p.setPrivate(new BigInteger(w, 16), new BigInteger(I, 16), new BigInteger(P, 16), new BigInteger(M, 16), new BigInteger(B, 16)), p;
2065
2065
  }
2066
2066
  if (n.indexOf("-END EC PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") == -1) {
2067
2067
  var R = d(n, "EC PRIVATE KEY");
@@ -2085,8 +2085,8 @@ KEYUTIL.getKey = function(n, t, e) {
2085
2085
  return m.setPublicKeyHex(D), m.setPrivateKeyHex(p), m.isPublic = !1, m;
2086
2086
  }
2087
2087
  if (n.indexOf("-END DSA PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") != -1) {
2088
- var C = h.getDecryptedKeyHex(n, t), w = s(C, 0, [1], "02"), I = s(C, 0, [2], "02"), B = s(C, 0, [3], "02"), M = s(C, 0, [4], "02"), P = s(C, 0, [5], "02"), p = new c();
2089
- return p.setPrivate(new BigInteger(w, 16), new BigInteger(I, 16), new BigInteger(B, 16), new BigInteger(M, 16), new BigInteger(P, 16)), p;
2088
+ var C = h.getDecryptedKeyHex(n, t), w = s(C, 0, [1], "02"), I = s(C, 0, [2], "02"), P = s(C, 0, [3], "02"), M = s(C, 0, [4], "02"), B = s(C, 0, [5], "02"), p = new c();
2089
+ return p.setPrivate(new BigInteger(w, 16), new BigInteger(I, 16), new BigInteger(P, 16), new BigInteger(M, 16), new BigInteger(B, 16)), p;
2090
2090
  }
2091
2091
  if (n.indexOf("-END ENCRYPTED PRIVATE KEY-") != -1)
2092
2092
  return h.getKeyFromEncryptedPKCS8PEM(n, t);
@@ -2727,8 +2727,8 @@ function X509(n) {
2727
2727
  C.critical = !1;
2728
2728
  var w = e(b, T[R]), I = 0;
2729
2729
  w.length === 3 && (C.critical = !0, I = 1), C.oid = t.hextooidstr(s(b, T[R], [0], "06"));
2730
- var B = f(b, T[R], [1 + I]);
2731
- C.vidx = h(b, B), this.aExtInfo.push(C);
2730
+ var P = f(b, T[R], [1 + I]);
2731
+ C.vidx = h(b, P), this.aExtInfo.push(C);
2732
2732
  }
2733
2733
  }, this.getExtInfo = function(v) {
2734
2734
  var E = this.aExtInfo, T = v;
@@ -3090,17 +3090,17 @@ function X509(n) {
3090
3090
  for (var S = v[b], R = 0; R < S.length; R++)
3091
3091
  T.push(S[R]);
3092
3092
  for (var b = 0; b < T.length; b++) {
3093
- var C = T[b], w = C.ds, I = C.value, B = C.type;
3093
+ var C = T[b], w = C.ds, I = C.value, P = C.type;
3094
3094
  if (w != "prn" && w != "utf8" && w != "ia5")
3095
3095
  return "mixed";
3096
3096
  if (w == "ia5") {
3097
- if (B != "CN")
3097
+ if (P != "CN")
3098
3098
  return "mixed";
3099
3099
  if (KJUR.lang.String.isMail(I))
3100
3100
  continue;
3101
3101
  return "mixed";
3102
3102
  }
3103
- if (B == "C") {
3103
+ if (P == "C") {
3104
3104
  if (w == "prn")
3105
3105
  continue;
3106
3106
  return "mixed";
@@ -3241,41 +3241,41 @@ function X509(n) {
3241
3241
  S += `X509v3 Extensions:
3242
3242
  `;
3243
3243
  for (var w = 0; w < C.length; w++) {
3244
- var I = C[w], B = KJUR.asn1.x509.OID.oid2name(I.oid);
3245
- B === "" && (B = I.oid);
3244
+ var I = C[w], P = KJUR.asn1.x509.OID.oid2name(I.oid);
3245
+ P === "" && (P = I.oid);
3246
3246
  var M = "";
3247
- if (I.critical === !0 && (M = "CRITICAL"), S += " " + B + " " + M + `:
3248
- `, B === "basicConstraints") {
3249
- var P = this.getExtBasicConstraints();
3250
- P.cA === void 0 ? S += ` {}
3251
- ` : (S += " cA=true", P.pathLen !== void 0 && (S += ", pathLen=" + P.pathLen), S += `
3247
+ if (I.critical === !0 && (M = "CRITICAL"), S += " " + P + " " + M + `:
3248
+ `, P === "basicConstraints") {
3249
+ var B = this.getExtBasicConstraints();
3250
+ B.cA === void 0 ? S += ` {}
3251
+ ` : (S += " cA=true", B.pathLen !== void 0 && (S += ", pathLen=" + B.pathLen), S += `
3252
3252
  `);
3253
- } else if (B === "keyUsage")
3253
+ } else if (P === "keyUsage")
3254
3254
  S += " " + this.getExtKeyUsageString() + `
3255
3255
  `;
3256
- else if (B === "subjectKeyIdentifier")
3256
+ else if (P === "subjectKeyIdentifier")
3257
3257
  S += " " + this.getExtSubjectKeyIdentifier().kid.hex + `
3258
3258
  `;
3259
- else if (B === "authorityKeyIdentifier") {
3259
+ else if (P === "authorityKeyIdentifier") {
3260
3260
  var O = this.getExtAuthorityKeyIdentifier();
3261
3261
  O.kid !== void 0 && (S += " kid=" + O.kid.hex + `
3262
3262
  `);
3263
- } else if (B === "extKeyUsage") {
3263
+ } else if (P === "extKeyUsage") {
3264
3264
  var L = this.getExtExtKeyUsage().array;
3265
3265
  S += " " + L.join(", ") + `
3266
3266
  `;
3267
- } else if (B === "subjectAltName") {
3267
+ } else if (P === "subjectAltName") {
3268
3268
  var F = v(this.getExtSubjectAltName());
3269
3269
  S += " " + F + `
3270
3270
  `;
3271
- } else if (B === "cRLDistributionPoints") {
3271
+ } else if (P === "cRLDistributionPoints") {
3272
3272
  var D = this.getExtCRLDistributionPoints();
3273
3273
  S += T(D);
3274
- } else if (B === "authorityInfoAccess") {
3274
+ } else if (P === "authorityInfoAccess") {
3275
3275
  var k = this.getExtAuthorityInfoAccess();
3276
3276
  S += b(k);
3277
3277
  } else
3278
- B === "certificatePolicies" && (S += E(this.getExtCertificatePolicies()));
3278
+ P === "certificatePolicies" && (S += E(this.getExtCertificatePolicies()));
3279
3279
  }
3280
3280
  }
3281
3281
  return S += "signature algorithm: " + this.getSignatureAlgorithmName() + `
@@ -3900,50 +3900,50 @@ var PBMCustomShader = (
3900
3900
  var w = C[R];
3901
3901
  w in definesLib$1 || delete u[w];
3902
3902
  }
3903
- for (var I = 0, B = Object.keys(l); I < B.length; I++) {
3904
- var M = B[I];
3903
+ for (var I = 0, P = Object.keys(l); I < P.length; I++) {
3904
+ var M = P[I];
3905
3905
  M in uniformsLib$1 || delete l[M];
3906
3906
  }
3907
- for (var P = r.customShaders.filter(function(U) {
3907
+ for (var B = r.customShaders.filter(function(U) {
3908
3908
  return U.type.includes(S);
3909
- }), O = 0, L = P; O < L.length; O++) {
3909
+ }), O = 0, L = B; O < L.length; O++) {
3910
3910
  var F = L[O];
3911
3911
  for (var D in F.defines)
3912
3912
  D in u || Object.assign(u, (T = {}, T[D] = F.defines[D], T));
3913
3913
  for (var k in F.uniforms)
3914
3914
  k in l || Object.assign(l, (b = {}, b[k] = F.uniforms[k], b));
3915
3915
  }
3916
- v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, P.map(function(U) {
3916
+ v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, B.map(function(U) {
3917
3917
  return U.vertex.mainBefore;
3918
3918
  }).filter(function(U) {
3919
3919
  return !!U;
3920
3920
  }).join(`
3921
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, P.map(function(U) {
3921
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, B.map(function(U) {
3922
3922
  return U.vertex.mainStart;
3923
3923
  }).filter(function(U) {
3924
3924
  return !!U;
3925
3925
  }).join(`
3926
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, P.map(function(U) {
3926
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, B.map(function(U) {
3927
3927
  return U.vertex.mainEnd;
3928
3928
  }).filter(function(U) {
3929
3929
  return !!U;
3930
3930
  }).join(`
3931
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, P.map(function(U) {
3931
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, B.map(function(U) {
3932
3932
  return U.fragment.mainBefore;
3933
3933
  }).filter(function(U) {
3934
3934
  return !!U;
3935
3935
  }).join(`
3936
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, P.map(function(U) {
3936
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, B.map(function(U) {
3937
3937
  return U.fragment.mainStart;
3938
3938
  }).filter(function(U) {
3939
3939
  return !!U;
3940
3940
  }).join(`
3941
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, P.map(function(U) {
3941
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, B.map(function(U) {
3942
3942
  return U.fragment.mainEnd;
3943
3943
  }).filter(function(U) {
3944
3944
  return !!U;
3945
3945
  }).join(`
3946
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, P.map(function(U) {
3946
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, B.map(function(U) {
3947
3947
  return U.fragment.mainModelColor;
3948
3948
  }).filter(function(U) {
3949
3949
  return !!U;
@@ -3951,7 +3951,7 @@ var PBMCustomShader = (
3951
3951
  `));
3952
3952
  var j = String(r.clippers.length);
3953
3953
  v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, j), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, j);
3954
- for (var z = 0, V = P; z < V.length; z++) {
3954
+ for (var z = 0, V = B; z < V.length; z++) {
3955
3955
  var J = V[z];
3956
3956
  J.onBeforeCompile && J.onBeforeCompile(v, E);
3957
3957
  }
@@ -3960,10 +3960,10 @@ var PBMCustomShader = (
3960
3960
  r.onBeforeRender = function(v, E, T, b, S, R) {
3961
3961
  var C = r.shaderType;
3962
3962
  T instanceof Camera ? (l.pixelRatio.value = T.pixelRatio, l.resolution.value.copy(T.resolution)) : (l.pixelRatio.value = v.getPixelRatio(), v.getViewport(scratchViewport$2), l.resolution.value.set(scratchViewport$2.width, scratchViewport$2.height));
3963
- var w = r.customShaders.filter(function(B) {
3964
- return B.type.includes(C);
3965
- }), I = w.map(function(B) {
3966
- return "".concat(B.id, ":").concat(B.version);
3963
+ var w = r.customShaders.filter(function(P) {
3964
+ return P.type.includes(C);
3965
+ }), I = w.map(function(P) {
3966
+ return "".concat(P.id, ":").concat(P.version);
3967
3967
  }).join("|");
3968
3968
  c !== I && (c = I, r.needsUpdate = !0);
3969
3969
  }, Object.defineProperty(r, "uniform", {
@@ -4415,9 +4415,9 @@ var scratchViewport$1 = new THREE.Vector4(), pbmUniforms = {
4415
4415
  `));
4416
4416
  var I = String(r.clippers.length);
4417
4417
  c.vertexShader = c.vertexShader.replace(/NUM_CLIPPERS/g, I), c.fragmentShader = c.fragmentShader.replace(/NUM_CLIPPERS/g, I);
4418
- for (var B = 0, M = T; B < M.length; B++) {
4419
- var P = M[B];
4420
- P.onBeforeCompile && P.onBeforeCompile(c, f);
4418
+ for (var P = 0, M = T; P < M.length; P++) {
4419
+ var B = M[P];
4420
+ B.onBeforeCompile && B.onBeforeCompile(c, f);
4421
4421
  }
4422
4422
  };
4423
4423
  var u = "";
@@ -5198,7 +5198,7 @@ function ajax(n, t, e, r, o) {
5198
5198
  r(I), f(I), (w = t.networkSubscribe) === null || w === void 0 || w.emit("network", l, "XMLHttpRequest", "timeout", I.message);
5199
5199
  }
5200
5200
  }, y = function(w) {
5201
- var I, B, M = now(), P = M - s;
5201
+ var I, P, M = now(), B = M - s;
5202
5202
  if (delete h[d], A.parentNode && A.parentNode.removeChild(A), p !== null && (window.clearTimeout(p), p = null), m !== !0) {
5203
5203
  if (w.indexOf("data:") !== 0) {
5204
5204
  var O = new NetworkResponseError(l, "XMLHttpRequest", 500);
@@ -5213,9 +5213,9 @@ function ajax(n, t, e, r, o) {
5213
5213
  }
5214
5214
  var J = {}, U = {
5215
5215
  body: D,
5216
- meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: P, headers: J }
5216
+ meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: J }
5217
5217
  };
5218
- e(U), c(U), (B = t.networkSubscribe) === null || B === void 0 || B.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(U.meta)), m = !0;
5218
+ e(U), c(U), (P = t.networkSubscribe) === null || P === void 0 || P.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(U.meta)), m = !0;
5219
5219
  }
5220
5220
  };
5221
5221
  h[d] = y, A.src = l, document.body.appendChild(A), typeof t.timeout == "number" && (p = window.setTimeout(g, t.timeout));
@@ -5234,12 +5234,12 @@ function ajax(n, t, e, r, o) {
5234
5234
  }, R = function(w) {
5235
5235
  var I;
5236
5236
  if (v !== !0) {
5237
- var B = this.status;
5238
- if (B === 0 || B >= 200 && B < 400) {
5237
+ var P = this.status;
5238
+ if (P === 0 || P >= 200 && P < 400) {
5239
5239
  v = !0, T();
5240
- var M = now(), P = M - s, O = parseHeaders(this.getAllResponseHeaders()), L = w.total, F = {
5240
+ var M = now(), B = M - s, O = parseHeaders(this.getAllResponseHeaders()), L = w.total, F = {
5241
5241
  body: this.response,
5242
- meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: P, headers: O, size: L }
5242
+ meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: O, size: L }
5243
5243
  };
5244
5244
  e(F), c(F), (I = t.networkSubscribe) === null || I === void 0 || I.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(F.meta));
5245
5245
  } else
@@ -6036,19 +6036,19 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
6036
6036
  }, 0) / 6);
6037
6037
  }, I = (m = e.viaAjax) !== null && m !== void 0 ? m : !1;
6038
6038
  if (I) {
6039
- var B = "blob", M = e.fetcher.ajax(C, { timeout: e.timeout, responseType: B }, void 0, void 0, w).then(function(O) {
6039
+ var P = "blob", M = e.fetcher.ajax(C, { timeout: e.timeout, responseType: P }, void 0, void 0, w).then(function(O) {
6040
6040
  return E[S] = O.meta, createImageBitmapLike(O.body);
6041
6041
  });
6042
6042
  y.push(M);
6043
6043
  } else {
6044
- var P, M = Promise.resolve().then(function() {
6044
+ var B, M = Promise.resolve().then(function() {
6045
6045
  return createImageBitmapLikeImage();
6046
6046
  }).then(function(L) {
6047
- return P = L, e.fetcher.loadImage(C, { timeout: e.timeout }, void 0, void 0, w, L);
6047
+ return B = L, e.fetcher.loadImage(C, { timeout: e.timeout }, void 0, void 0, w, L);
6048
6048
  }).then(function(L) {
6049
6049
  return E[S] = L.meta, L.body;
6050
6050
  }).catch(function(L) {
6051
- return P && P.close(), Promise.reject(L);
6051
+ return B && B.close(), Promise.reject(L);
6052
6052
  });
6053
6053
  y.push(M);
6054
6054
  }
@@ -7363,45 +7363,45 @@ function loadPbm(n, t) {
7363
7363
  var e, r, o, s, u, l;
7364
7364
  t === void 0 && (t = {});
7365
7365
  for (var c = (e = t.upAxis) !== null && e !== void 0 ? e : "Z", f = (r = t.light) !== null && r !== void 0 ? r : !1, d = (o = t.fetcher) !== null && o !== void 0 ? o : internalFetcher, h = (s = t.textureBaseUri) !== null && s !== void 0 ? s : guessTextureBaseUriFromFileUrl(n), p = t.textureBaseUri === void 0 ? [] : ((u = t.textureArray) !== null && u !== void 0 ? u : []).slice(), m = autoRestImageOptionsByTextureLength((l = t.textureOptions) !== null && l !== void 0 ? l : {}, p.length), A = /* @__PURE__ */ new Map(), g = 0, y = p; g < y.length; g++) {
7366
- var v = y[g];
7367
- A.set(v, loadTexture$1(v, h, m, d));
7366
+ var v = y[g], E = isAbsoluteURL(v) ? v : pathJoin(h, v);
7367
+ A.set(E, loadTexture$1(E, m, d));
7368
7368
  }
7369
- var E = {
7369
+ var T = {
7370
7370
  byteLength: 0
7371
7371
  };
7372
7372
  return Promise.resolve().then(function() {
7373
7373
  return d.ajax(n, {
7374
7374
  responseType: "arraybuffer"
7375
7375
  });
7376
- }).then(function(T) {
7377
- return E.byteLength = T.body.byteLength, delay$1(function() {
7378
- var b = new Uint8Array(T.body);
7379
- return Model$2.decode(b);
7376
+ }).then(function(b) {
7377
+ return T.byteLength = b.body.byteLength, delay$1(function() {
7378
+ var S = new Uint8Array(b.body);
7379
+ return Model$2.decode(S);
7380
7380
  });
7381
- }).then(function(T) {
7381
+ }).then(function(b) {
7382
7382
  return delay$1(function() {
7383
- return parse$4(T, f, h, p, m, A, d);
7383
+ return parse$4(b, f, h, p, m, A, d);
7384
7384
  });
7385
- }).then(function(T) {
7385
+ }).then(function(b) {
7386
7386
  A.clear();
7387
- var b = new THREE.Group();
7388
- b.name = n;
7389
- for (var S = 0, R = T.objects; S < R.length; S++) {
7390
- var C = R[S];
7391
- b.add(C);
7387
+ var S = new THREE.Group();
7388
+ S.name = n;
7389
+ for (var R = 0, C = b.objects; R < C.length; R++) {
7390
+ var w = C[R];
7391
+ S.add(w);
7392
7392
  }
7393
- return c === "Y" && b.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
7393
+ return c === "Y" && S.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
7394
7394
  type: "pbm",
7395
7395
  modelUpAxis: "Z",
7396
7396
  upAxis: c,
7397
7397
  uri: n,
7398
- byteLength: E.byteLength,
7399
- memoryUsage: getMemoryUsage(b),
7400
- scene: b,
7401
- textures: T.textures,
7398
+ byteLength: T.byteLength,
7399
+ memoryUsage: getMemoryUsage(S),
7400
+ scene: S,
7401
+ textures: b.textures,
7402
7402
  animations: [],
7403
7403
  dispose: function() {
7404
- return T.dispose();
7404
+ return b.dispose();
7405
7405
  }
7406
7406
  };
7407
7407
  });
@@ -7437,8 +7437,8 @@ function parsePBMModel(n) {
7437
7437
  break;
7438
7438
  }
7439
7439
  }
7440
- for (var A = n.chunks.sort(function(fe, le) {
7441
- return chunkOrder(fe) - chunkOrder(le);
7440
+ for (var A = n.chunks.sort(function(de, ue) {
7441
+ return chunkOrder(de) - chunkOrder(ue);
7442
7442
  }), g = [], y = 0, v = A; y < v.length; y++) {
7443
7443
  var h = v[y], E = parseFloorName(h.name);
7444
7444
  g[E] || (g[E] = []), g[E].push(h);
@@ -7451,14 +7451,14 @@ function parsePBMModel(n) {
7451
7451
  var h = b[R];
7452
7452
  S += h.faces.indices.length;
7453
7453
  }
7454
- for (var C = new Float32Array(S * 3), w = new Float32Array(S * 2), I = new Float32Array(S * 3), B = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], O = 0, L = 0; L < b.length; L++) {
7454
+ for (var C = new Float32Array(S * 3), w = new Float32Array(S * 2), I = new Float32Array(S * 3), P = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], O = 0, L = 0; L < b.length; L++) {
7455
7455
  for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = b[L], D = h.vertices.xyz, k = h.vertices.uvs, j = h.faces.indices, z = h.faces.normals, V = h.vertices.marks, J = j.length, R = 0; R < J; R++) {
7456
7456
  var U = j[R], q = C[O * 3 + R * 3] = D[U * 3], G = C[O * 3 + R * 3 + 1] = D[U * 3 + 1], Z = C[O * 3 + R * 3 + 2] = D[U * 3 + 2];
7457
- B && (B[O + R] = V[U]), w[O * 2 + R * 2] = k[U * 2], w[O * 2 + R * 2 + 1] = k[U * 2 + 1];
7457
+ P && (P[O + R] = V[U]), w[O * 2 + R * 2] = k[U * 2], w[O * 2 + R * 2 + 1] = k[U * 2 + 1];
7458
7458
  var W = Math.floor(R / 3) * 3;
7459
7459
  I[O * 3 + R * 3] = z[W], I[O * 3 + R * 3 + 1] = z[W + 1], I[O * 3 + R * 3 + 2] = z[W + 2], q < F[0] && (F[0] = q), G < F[1] && (F[1] = G), Z < F[2] && (F[2] = Z), q > F[3] && (F[3] = q), G > F[4] && (F[4] = G), Z > F[5] && (F[5] = Z);
7460
7460
  }
7461
- F[0] < P[0] && (P[0] = F[0]), F[1] < P[1] && (P[1] = F[1]), F[2] < P[2] && (P[2] = F[2]), F[3] > P[3] && (P[3] = F[3]), F[4] > P[4] && (P[4] = F[4]), F[5] > P[5] && (P[5] = F[5]), M.push({
7461
+ F[0] < B[0] && (B[0] = F[0]), F[1] < B[1] && (B[1] = F[1]), F[2] < B[2] && (B[2] = F[2]), F[3] > B[3] && (B[3] = F[3]), F[4] > B[4] && (B[4] = F[4]), F[5] > B[5] && (B[5] = F[5]), M.push({
7462
7462
  materialIndex: L,
7463
7463
  name: h.name,
7464
7464
  chunkName: parseChunkName(h.name),
@@ -7473,11 +7473,11 @@ function parsePBMModel(n) {
7473
7473
  vertices: C,
7474
7474
  uvs: w,
7475
7475
  normals: I,
7476
- masks: B,
7476
+ masks: P,
7477
7477
  indices: null,
7478
7478
  floorIndex: T,
7479
7479
  groups: M,
7480
- extents: P
7480
+ extents: B
7481
7481
  };
7482
7482
  u.push(ee);
7483
7483
  } else {
@@ -7485,22 +7485,22 @@ function parsePBMModel(n) {
7485
7485
  var h = b[R];
7486
7486
  X += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7487
7487
  }
7488
- for (var C = new Float32Array(X * 3), w = new Float32Array(X * 2), I = void 0, K = new Float32Array(X), $ = new Uint32Array(S), B = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], re = 0, O = 0, L = 0; L < b.length; L++) {
7489
- for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = b[L], D = h.vertices.xyz, te = h.vertices.marks, k = h.vertices.uvs, j = h.faces.indices, ne = D.length / 3, J = j.length, R = 0; R < ne; R++) {
7488
+ for (var C = new Float32Array(X * 3), w = new Float32Array(X * 2), I = void 0, K = new Float32Array(X), $ = new Uint32Array(S), P = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, O = 0, L = 0; L < b.length; L++) {
7489
+ for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = b[L], D = h.vertices.xyz, re = h.vertices.marks, k = h.vertices.uvs, j = h.faces.indices, ne = D.length / 3, J = j.length, R = 0; R < ne; R++) {
7490
7490
  var q = C[O * 3 + R * 3] = D[R * 3], G = C[O * 3 + R * 3 + 1] = D[R * 3 + 1], Z = C[O * 3 + R * 3 + 2] = D[R * 3 + 2];
7491
- B && (B[O + R] = te[R]), w[O * 2 + R * 2] = k[R * 2], w[O * 2 + R * 2 + 1] = k[R * 2 + 1], K[O + R] = T, q < F[0] && (F[0] = q), G < F[1] && (F[1] = G), Z < F[2] && (F[2] = Z), q > F[3] && (F[3] = q), G > F[4] && (F[4] = G), Z > F[5] && (F[5] = Z);
7491
+ P && (P[O + R] = re[R]), w[O * 2 + R * 2] = k[R * 2], w[O * 2 + R * 2 + 1] = k[R * 2 + 1], K[O + R] = T, q < F[0] && (F[0] = q), G < F[1] && (F[1] = G), Z < F[2] && (F[2] = Z), q > F[3] && (F[3] = q), G > F[4] && (F[4] = G), Z > F[5] && (F[5] = Z);
7492
7492
  }
7493
- F[0] < P[0] && (P[0] = F[0]), F[1] < P[1] && (P[1] = F[1]), F[2] < P[2] && (P[2] = F[2]), F[3] > P[3] && (P[3] = F[3]), F[4] > P[4] && (P[4] = F[4]), F[5] > P[5] && (P[5] = F[5]);
7493
+ F[0] < B[0] && (B[0] = F[0]), F[1] < B[1] && (B[1] = F[1]), F[2] < B[2] && (B[2] = F[2]), F[3] > B[3] && (B[3] = F[3]), F[4] > B[4] && (B[4] = F[4]), F[5] > B[5] && (B[5] = F[5]);
7494
7494
  for (var R = 0; R < J; R++)
7495
- $[re + R] = O + j[R];
7495
+ $[te + R] = O + j[R];
7496
7496
  M.push({
7497
7497
  materialIndex: L,
7498
7498
  name: h.name,
7499
7499
  chunkName: parseChunkName(h.name),
7500
- start: re,
7500
+ start: te,
7501
7501
  count: h.faces.indices.length,
7502
7502
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7503
- }), O += ne, re += J;
7503
+ }), O += ne, te += J;
7504
7504
  }
7505
7505
  var ee = {
7506
7506
  createAt: o,
@@ -7508,46 +7508,46 @@ function parsePBMModel(n) {
7508
7508
  vertices: C,
7509
7509
  uvs: w,
7510
7510
  normals: I,
7511
- masks: B,
7511
+ masks: P,
7512
7512
  indices: $,
7513
7513
  floorIndex: T,
7514
7514
  groups: M,
7515
- extents: P
7515
+ extents: B
7516
7516
  };
7517
7517
  u.push(ee);
7518
7518
  }
7519
7519
  }
7520
7520
  return u;
7521
7521
  }
7522
- function loadTexture$1(n, t, e, r) {
7523
- var o = __assign({ key: "texture.pbm" }, pick(e, ["format", "quality", "size", "sharpen", "forceUseExifOrientation", "mappings"])), s = new TextureLoader(), u = isAbsoluteURL(n) ? n : pathJoin(t, n);
7524
- return s.loadTexture(u, {
7522
+ function loadTexture$1(n, t, e) {
7523
+ var r = __assign({ key: "texture.pbm" }, pick(t, ["format", "quality", "size", "sharpen", "forceUseExifOrientation", "mappings"])), o = new TextureLoader();
7524
+ return o.loadTexture(n, {
7525
7525
  imageURL: {
7526
- transform: e.transform,
7527
- options: o
7526
+ transform: t.transform,
7527
+ options: r
7528
7528
  },
7529
7529
  encoding: THREE.sRGBEncoding,
7530
7530
  wrapS: THREE.ClampToEdgeWrapping,
7531
7531
  wrapT: THREE.ClampToEdgeWrapping,
7532
7532
  minFilter: THREE.LinearFilter,
7533
- maxSize: typeof o.size == "number" ? new THREE.Vector2(o.size, o.size) : void 0,
7534
- fetcher: r
7535
- }).then(function(l) {
7536
- var c = l.body;
7537
- return c.needsUpdate = !0, c;
7533
+ maxSize: typeof r.size == "number" ? new THREE.Vector2(r.size, r.size) : void 0,
7534
+ fetcher: e
7535
+ }).then(function(s) {
7536
+ var u = s.body;
7537
+ return u.needsUpdate = !0, u;
7538
7538
  });
7539
7539
  }
7540
7540
  function parse$4(n, t, e, r, o, s, u) {
7541
7541
  for (var l = parsePBMModel(n), c = 0, f = "", d = [], h = {}, p = /* @__PURE__ */ new Set(), m = 0, A = 0, g = l; A < g.length; A++) {
7542
- var y = g[A], v = y.createAt, E = y.description, T = y.vertices, b = y.masks, S = y.uvs, R = y.normals, C = y.indices, w = y.floorIndex, I = y.groups, B = y.extents, M = new THREE.Box3();
7543
- M.min.x = B[0], M.min.y = B[1], M.min.z = B[2], M.max.x = B[3], M.max.y = B[4], M.max.z = B[5];
7544
- var P = new THREE.BufferGeometry();
7545
- P.setAttribute("position", new THREE.BufferAttribute(T, 3)), P.setAttribute("uv", new THREE.BufferAttribute(S, 2)), R && P.setAttribute("normal", new THREE.BufferAttribute(R, 3)), b && P.setAttribute("_feature_id_rsmask", new THREE.BufferAttribute(b, 1)), C && P.setIndex(new THREE.BufferAttribute(C, 1)), P.boundingBox = M, P.boundingSphere = M.getBoundingSphere(new THREE.Sphere());
7542
+ var y = g[A], v = y.createAt, E = y.description, T = y.vertices, b = y.masks, S = y.uvs, R = y.normals, C = y.indices, w = y.floorIndex, I = y.groups, P = y.extents, M = new THREE.Box3();
7543
+ M.min.x = P[0], M.min.y = P[1], M.min.z = P[2], M.max.x = P[3], M.max.y = P[4], M.max.z = P[5];
7544
+ var B = new THREE.BufferGeometry();
7545
+ B.setAttribute("position", new THREE.BufferAttribute(T, 3)), B.setAttribute("uv", new THREE.BufferAttribute(S, 2)), R && B.setAttribute("normal", new THREE.BufferAttribute(R, 3)), b && B.setAttribute("_feature_id_rsmask", new THREE.BufferAttribute(b, 1)), C && B.setIndex(new THREE.BufferAttribute(C, 1)), B.boundingBox = M, B.boundingSphere = M.getBoundingSphere(new THREE.Sphere());
7546
7546
  for (var O = 0, L = I; O < L.length; O++) {
7547
7547
  var F = L[O];
7548
- P.addGroup(F.start, F.count, F.materialIndex);
7548
+ B.addGroup(F.start, F.count, F.materialIndex);
7549
7549
  }
7550
- p.add(P);
7550
+ p.add(B);
7551
7551
  for (var D = [], k = 0, j = I; k < j.length; k++) {
7552
7552
  var F = j[k], z = void 0;
7553
7553
  if (F.texture) {
@@ -7564,43 +7564,43 @@ function parse$4(n, t, e, r, o, s, u) {
7564
7564
  isAbsoluteURL(z) || (z = pathJoin(e, z));
7565
7565
  }
7566
7566
  var Z = new PBMMeshMaterial(t ? "phong" : "basic");
7567
- Z.floorIndex = w, P.attributes.normal === void 0 && (Z.flatShading = !0), P.attributes._feature_id_rsmask && (Z.defines.USE_VERTEX_MARK = !0), D.push(Z), z ? (m++, h[z] ? h[z].push(Z) : h[z] = [Z]) : Z.color = new THREE.Color(16777215), p.add(Z);
7567
+ Z.floorIndex = w, B.attributes.normal === void 0 && (Z.flatShading = !0), B.attributes._feature_id_rsmask && (Z.defines.USE_VERTEX_MARK = !0), D.push(Z), z ? (m++, h[z] ? h[z].push(Z) : h[z] = [Z]) : Z.color = new THREE.Color(16777215), p.add(Z);
7568
7568
  }
7569
- var W = new PBMMesh(P, D);
7569
+ var W = new PBMMesh(B, D);
7570
7570
  W.name = "model_floor_" + w, W.userData.createAt = v, W.userData.description = E, W.matrix.compose(W.position, W.quaternion, W.scale), W.matrixAutoUpdate = !1, W.frustumCulled = !1, c = v, f = E, d.push(W);
7571
7571
  }
7572
7572
  o = autoRestImageOptionsByTextureLength(o, m);
7573
7573
  for (var ee = [], X = function(te) {
7574
- var ne = void 0;
7575
- s && (ne = s.get(te)), ne || (ne = loadTexture$1(te, e, o, u), s && s.set(te, ne)), ee.push(ne.then(function(fe) {
7576
- for (var le = 0, ue = h[te]; le < ue.length; le++) {
7577
- var pe = ue[le];
7578
- pe.map && (p.delete(pe.map), pe.map.dispose()), pe.map = fe, p.add(fe);
7574
+ var re = void 0;
7575
+ s && (re = s.get(te)), re || (re = loadTexture$1(te, o, u), s && s.set(te, re)), ee.push(re.then(function(ne) {
7576
+ for (var de = 0, ue = h[te]; de < ue.length; de++) {
7577
+ var fe = ue[de];
7578
+ fe.map && (p.delete(fe.map), fe.map.dispose()), fe.map = ne, p.add(ne);
7579
7579
  }
7580
- return fe;
7580
+ return ne;
7581
7581
  }).catch(function() {
7582
- for (var fe = 0, le = h[te]; fe < le.length; fe++) {
7583
- var ue = le[fe];
7582
+ for (var ne = 0, de = h[te]; ne < de.length; ne++) {
7583
+ var ue = de[ne];
7584
7584
  ue.map && (p.delete(ue.map), ue.map.dispose()), ue.map = null, ue.color = new THREE.Color(16777215);
7585
7585
  }
7586
7586
  return null;
7587
7587
  }));
7588
7588
  }, K = 0, $ = Object.keys(h); K < $.length; K++) {
7589
- var re = $[K];
7590
- X(re);
7589
+ var z = $[K];
7590
+ X(z);
7591
7591
  }
7592
7592
  return Promise.all(ee).then(function(te) {
7593
- var ne = te.filter(function(fe) {
7594
- return fe instanceof THREE.Texture;
7593
+ var re = te.filter(function(ne) {
7594
+ return ne instanceof THREE.Texture;
7595
7595
  });
7596
7596
  return {
7597
7597
  createAt: c,
7598
7598
  description: f,
7599
7599
  objects: d,
7600
- textures: ne,
7600
+ textures: re,
7601
7601
  dispose: function() {
7602
- p.forEach(function(fe) {
7603
- fe.dispose();
7602
+ p.forEach(function(ne) {
7603
+ ne.dispose();
7604
7604
  }), p.clear();
7605
7605
  }
7606
7606
  };
@@ -7959,54 +7959,54 @@ function loadAt3d(n, t) {
7959
7959
  var e, r, o, s, u, l;
7960
7960
  t === void 0 && (t = {});
7961
7961
  for (var c = (e = t.upAxis) !== null && e !== void 0 ? e : "Z", f = (r = t.light) !== null && r !== void 0 ? r : !1, d = (o = t.fetcher) !== null && o !== void 0 ? o : internalFetcher, h = (s = t.textureBaseUri) !== null && s !== void 0 ? s : guessTextureBaseUriFromFileUrl(n), p = t.textureBaseUri === void 0 ? [] : ((u = t.textureArray) !== null && u !== void 0 ? u : []).slice(), m = autoRestImageOptionsByTextureLength((l = t.textureOptions) !== null && l !== void 0 ? l : {}, p.length), A = /* @__PURE__ */ new Map(), g = 0, y = p; g < y.length; g++) {
7962
- var v = y[g];
7963
- A.set(v, loadTexture$1(v, h, m, d));
7962
+ var v = y[g], E = isAbsoluteURL(v) ? v : pathJoin(h, v);
7963
+ A.set(E, loadTexture$1(E, m, d));
7964
7964
  }
7965
- var E = {
7965
+ var T = {
7966
7966
  byteLength: 0
7967
7967
  };
7968
7968
  return Promise.resolve().then(function() {
7969
7969
  return d.ajax(n, {
7970
7970
  responseType: "arraybuffer"
7971
7971
  });
7972
- }).then(function(T) {
7973
- return lzma(T.body);
7974
- }).then(function(T) {
7972
+ }).then(function(b) {
7973
+ return lzma(b.body);
7974
+ }).then(function(b) {
7975
7975
  return delay$1(function() {
7976
- for (var b, S = {
7976
+ for (var S, R = {
7977
7977
  chunks: [],
7978
7978
  createAt: void 0,
7979
7979
  description: void 0
7980
- }, R = 0, C = T; R < C.length; R++) {
7981
- var w = C[R], I = Model$2.decode(w);
7982
- I.chunks.length && ((b = S.chunks).push.apply(b, I.chunks), S.createAt = I.createAt, S.description = I.description);
7980
+ }, C = 0, w = b; C < w.length; C++) {
7981
+ var I = w[C], P = Model$2.decode(I);
7982
+ P.chunks.length && ((S = R.chunks).push.apply(S, P.chunks), R.createAt = P.createAt, R.description = P.description);
7983
7983
  }
7984
- return S;
7984
+ return R;
7985
7985
  });
7986
- }).then(function(T) {
7986
+ }).then(function(b) {
7987
7987
  return delay$1(function() {
7988
- return parse$4(T, f, h, p, m, A, d);
7988
+ return parse$4(b, f, h, p, m, A, d);
7989
7989
  });
7990
- }).then(function(T) {
7990
+ }).then(function(b) {
7991
7991
  A.clear();
7992
- var b = new THREE.Group();
7993
- b.name = n;
7994
- for (var S = 0, R = T.objects; S < R.length; S++) {
7995
- var C = R[S];
7996
- b.add(C);
7992
+ var S = new THREE.Group();
7993
+ S.name = n;
7994
+ for (var R = 0, C = b.objects; R < C.length; R++) {
7995
+ var w = C[R];
7996
+ S.add(w);
7997
7997
  }
7998
- return c === "Y" && b.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
7998
+ return c === "Y" && S.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
7999
7999
  type: "at3d",
8000
8000
  modelUpAxis: "Z",
8001
8001
  upAxis: c,
8002
8002
  uri: n,
8003
- byteLength: E.byteLength,
8004
- memoryUsage: getMemoryUsage(b),
8005
- scene: b,
8006
- textures: T.textures,
8003
+ byteLength: T.byteLength,
8004
+ memoryUsage: getMemoryUsage(S),
8005
+ scene: S,
8006
+ textures: b.textures,
8007
8007
  animations: [],
8008
8008
  dispose: function() {
8009
- return T.dispose();
8009
+ return b.dispose();
8010
8010
  }
8011
8011
  };
8012
8012
  });
@@ -8561,15 +8561,15 @@ function parse$3(n, t, e, r, o) {
8561
8561
  for (var R = 0, C = S; R < C.length; R++) {
8562
8562
  var w = C[R];
8563
8563
  d.elements = w.elements;
8564
- for (var I = new THREE.Group(), B = 0; B < b.length; B++) {
8565
- var M = parseGeometry(b[B].geometry);
8564
+ for (var I = new THREE.Group(), P = 0; P < b.length; P++) {
8565
+ var M = parseGeometry(b[P].geometry);
8566
8566
  M.applyMatrix4(d), d.decompose(h, p, m), m.x * m.y * m.z < 0 && M.attributes.normal && M.attributes.position && M.attributes.uv && flipBufferGeometryNormals(M), l.add(M);
8567
- for (var P = [], O = 0, L = b[B].material; O < L.length; O++) {
8567
+ for (var B = [], O = 0, L = b[P].material; O < L.length; O++) {
8568
8568
  var F = L[O], D = parseMaterial(F, t, e || "", r, f, o, A, l, g), k = D.material, j = D.textureReady;
8569
- u.push(j), P.push(k);
8569
+ u.push(j), B.push(k);
8570
8570
  }
8571
- var z = new PBMMesh(M, P);
8572
- z.name = "chunk_" + B, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, I.add(z);
8571
+ var z = new PBMMesh(M, B);
8572
+ z.name = "chunk_" + P, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, I.add(z);
8573
8573
  }
8574
8574
  I.name = T, s.push(I);
8575
8575
  }
@@ -8994,8 +8994,8 @@ var Parser = (
8994
8994
  Promise.all(m),
8995
8995
  Promise.all(A)
8996
8996
  ]).then(function(C) {
8997
- for (var w = C[0], I = C[1], B = C[2], M = C[3], P = C[4], O = [], L = function(j, z) {
8998
- var V = w[j], J = I[j], U = B[j], q = M[j], G = P[j];
8997
+ for (var w = C[0], I = C[1], P = C[2], M = C[3], B = C[4], O = [], L = function(j, z) {
8998
+ var V = w[j], J = I[j], U = P[j], q = M[j], G = B[j];
8999
8999
  if (V === void 0)
9000
9000
  return "continue";
9001
9001
  V.updateMatrix(), V.matrixAutoUpdate = !0;
@@ -9014,18 +9014,18 @@ var Parser = (
9014
9014
  break;
9015
9015
  }
9016
9016
  var W = V.name ? V.name : V.uuid, ee = q.interpolation !== void 0 ? INTERPOLATION[q.interpolation] : THREE.InterpolateLinear, X = [];
9017
- PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? V.traverse(function(le) {
9018
- le.morphTargetInfluences && X.push(le.name ? le.name : le.uuid);
9017
+ PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? V.traverse(function(ue) {
9018
+ ue.morphTargetInfluences && X.push(ue.name ? ue.name : ue.uuid);
9019
9019
  }) : X.push(W);
9020
9020
  var K = U.array;
9021
9021
  if (U.normalized) {
9022
- for (var $ = getNormalizedComponentScale(K.constructor), re = new Float32Array(K.length), te = 0, ne = K.length; te < ne; te++)
9023
- re[te] = K[te] * $;
9024
- K = re;
9022
+ for (var $ = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), re = 0, ne = K.length; re < ne; re++)
9023
+ te[re] = K[re] * $;
9024
+ K = te;
9025
9025
  }
9026
- for (var te = 0, ne = X.length; te < ne; te++) {
9027
- var fe = new Z(X[te] + "." + PATH_PROPERTIES[G.path], J.array, K, ee);
9028
- O.push(fe);
9026
+ for (var re = 0, ne = X.length; re < ne; re++) {
9027
+ var de = new Z(X[re] + "." + PATH_PROPERTIES[G.path], J.array, K, ee);
9028
+ O.push(de);
9029
9029
  }
9030
9030
  }, F = 0, D = w.length; F < D; F++)
9031
9031
  L(F);
@@ -9091,11 +9091,11 @@ var Parser = (
9091
9091
  } else
9092
9092
  f === null ? v = new h(u.count * d) : v = new h(f, A, u.count * d), E = new THREE.BufferAttribute(v, d, y);
9093
9093
  if (u.sparse !== void 0) {
9094
- var R = WEBGL_TYPE_SIZES.SCALAR, C = WEBGL_COMPONENT_TYPES[u.sparse.indices.componentType], w = u.sparse.indices.byteOffset || 0, I = u.sparse.values.byteOffset || 0, B = new C(c[1], w, u.sparse.count * R), M = new h(c[2], I, u.sparse.count * d);
9094
+ var R = WEBGL_TYPE_SIZES.SCALAR, C = WEBGL_COMPONENT_TYPES[u.sparse.indices.componentType], w = u.sparse.indices.byteOffset || 0, I = u.sparse.values.byteOffset || 0, P = new C(c[1], w, u.sparse.count * R), M = new h(c[2], I, u.sparse.count * d);
9095
9095
  f !== null && (E = new THREE.BufferAttribute(E.array.slice(), E.itemSize, E.normalized));
9096
- for (var P = 0, O = B.length; P < O; P++) {
9097
- var L = B[P];
9098
- if (E.setX(L, M[P * d]), d >= 2 && E.setY(L, M[P * d + 1]), d >= 3 && E.setZ(L, M[P * d + 2]), d >= 4 && E.setW(L, M[P * d + 3]), d >= 5)
9096
+ for (var B = 0, O = P.length; B < O; B++) {
9097
+ var L = P[B];
9098
+ if (E.setX(L, M[B * d]), d >= 2 && E.setY(L, M[B * d + 1]), d >= 3 && E.setZ(L, M[B * d + 2]), d >= 4 && E.setW(L, M[B * d + 3]), d >= 5)
9099
9099
  throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
9100
9100
  }
9101
9101
  }
@@ -9337,11 +9337,11 @@ var Parser = (
9337
9337
  }
9338
9338
  if (g.length === 1)
9339
9339
  return g[0];
9340
- for (var B = new THREE.Group(), M = 0, P = g; M < P.length; M++) {
9341
- var S = P[M];
9342
- B.add(S);
9340
+ for (var P = new THREE.Group(), M = 0, B = g; M < B.length; M++) {
9341
+ var S = B[M];
9342
+ P.add(S);
9343
9343
  }
9344
- return B;
9344
+ return P;
9345
9345
  });
9346
9346
  }
9347
9347
  return r;
@@ -9466,18 +9466,18 @@ var Parser = (
9466
9466
  }
9467
9467
  if (!S && !R)
9468
9468
  return t;
9469
- var B = [];
9469
+ var P = [];
9470
9470
  t.morphTargetsRelative = !0;
9471
- for (var M = function(P, O) {
9472
- var L = e.targets[P];
9473
- S ? B.push(r.loadAccessor(L.POSITION).then(function(F) {
9474
- F && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[P] = F);
9475
- })) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[P] = t.attributes.position), R ? B.push(r.loadAccessor(L.NORMAL).then(function(F) {
9476
- F && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[P] = F);
9477
- })) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[P] = t.attributes.normal);
9471
+ for (var M = function(B, O) {
9472
+ var L = e.targets[B];
9473
+ S ? P.push(r.loadAccessor(L.POSITION).then(function(F) {
9474
+ F && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[B] = F);
9475
+ })) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[B] = t.attributes.position), R ? P.push(r.loadAccessor(L.NORMAL).then(function(F) {
9476
+ F && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[B] = F);
9477
+ })) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[B] = t.attributes.normal);
9478
9478
  }, C = 0, w = e.targets.length; C < w; C++)
9479
9479
  M(C, w);
9480
- return Promise.all(B).then(function() {
9480
+ return Promise.all(P).then(function() {
9481
9481
  return t;
9482
9482
  });
9483
9483
  } else
@@ -10520,11 +10520,11 @@ var BaseExtension = (
10520
10520
  return E.buffer.slice(0, S);
10521
10521
  }
10522
10522
  function c(v, E, T, b, S, R) {
10523
- var C = s.exports.sbrk, w = T + 3 & -4, I = C(w * b), B = C(S.length), M = new Uint8Array(s.exports.memory.buffer);
10524
- M.set(S, B);
10525
- var P = v(I, T, b, B, S.length);
10526
- if (P == 0 && R && R(I, w, b), E.set(M.subarray(I, I + T * b)), C(I - C(0)), P != 0)
10527
- throw new Error("Malformed buffer data: " + P);
10523
+ var C = s.exports.sbrk, w = T + 3 & -4, I = C(w * b), P = C(S.length), M = new Uint8Array(s.exports.memory.buffer);
10524
+ M.set(S, P);
10525
+ var B = v(I, T, b, P, S.length);
10526
+ if (B == 0 && R && R(I, w, b), E.set(M.subarray(I, I + T * b)), C(I - C(0)), B != 0)
10527
+ throw new Error("Malformed buffer data: " + B);
10528
10528
  }
10529
10529
  var f = {
10530
10530
  NONE: "",
@@ -10556,8 +10556,8 @@ var BaseExtension = (
10556
10556
  for (var R = h[0], C = 1; C < h.length; ++C)
10557
10557
  h[C].pending < R.pending && (R = h[C]);
10558
10558
  return new Promise(function(w, I) {
10559
- var B = new Uint8Array(T), M = p++;
10560
- R.pending += v, R.requests[M] = { resolve: w, reject: I }, R.object.postMessage({ id: M, count: v, size: E, source: B, mode: b, filter: S }, [B.buffer]);
10559
+ var P = new Uint8Array(T), M = p++;
10560
+ R.pending += v, R.requests[M] = { resolve: w, reject: I }, R.object.postMessage({ id: M, count: v, size: E, source: P, mode: b, filter: S }, [P.buffer]);
10561
10561
  });
10562
10562
  }
10563
10563
  function y(v) {
@@ -10707,8 +10707,8 @@ var BaseExtension = (
10707
10707
  }
10708
10708
  if (A.length === 1)
10709
10709
  return A[0];
10710
- for (var I = new THREE.Group(), B = 0, M = A; B < M.length; B++) {
10711
- var b = M[B];
10710
+ for (var I = new THREE.Group(), P = 0, M = A; P < M.length; P++) {
10711
+ var b = M[P];
10712
10712
  I.add(b);
10713
10713
  }
10714
10714
  return I;
@@ -11657,10 +11657,10 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11657
11657
  return e || new u8(0);
11658
11658
  var u = !e, l = u || t.i != 2, c = t.i;
11659
11659
  u && (e = new u8(o * 3));
11660
- var f = function(re) {
11661
- var te = e.length;
11662
- if (re > te) {
11663
- var ne = new u8(Math.max(te * 2, re));
11660
+ var f = function(te) {
11661
+ var re = e.length;
11662
+ if (te > re) {
11663
+ var ne = new u8(Math.max(re * 2, te));
11664
11664
  ne.set(e), e = ne;
11665
11665
  }
11666
11666
  }, d = t.f || 0, h = t.p || 0, p = t.b || 0, m = t.l, A = t.d, g = t.m, y = t.n, v = o * 8;
@@ -11674,10 +11674,10 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11674
11674
  else if (E == 2) {
11675
11675
  var R = bits(n, h, 31) + 257, C = bits(n, h + 10, 15) + 4, w = R + bits(n, h + 5, 31) + 1;
11676
11676
  h += 14;
11677
- for (var I = new u8(w), B = new u8(19), M = 0; M < C; ++M)
11678
- B[clim[M]] = bits(n, h + M * 3, 7);
11677
+ for (var I = new u8(w), P = new u8(19), M = 0; M < C; ++M)
11678
+ P[clim[M]] = bits(n, h + M * 3, 7);
11679
11679
  h += C * 3;
11680
- for (var P = max(B), O = (1 << P) - 1, L = hMap(B, P, 1), M = 0; M < w; ) {
11680
+ for (var B = max(P), O = (1 << B) - 1, L = hMap(P, B, 1), M = 0; M < w; ) {
11681
11681
  var F = L[bits(n, h, O)];
11682
11682
  h += F & 15;
11683
11683
  var T = F >> 4;
@@ -11888,7 +11888,7 @@ var FBXTreeParser = (
11888
11888
  }
11889
11889
  }
11890
11890
  return Promise.all(d).then(function(I) {
11891
- var B;
11891
+ var P;
11892
11892
  return {
11893
11893
  scene: f,
11894
11894
  textures: I,
@@ -11896,7 +11896,7 @@ var FBXTreeParser = (
11896
11896
  upAxis: ["X", "Y", "Z"][y],
11897
11897
  frontAxis: ["X", "Y", "Z"][v],
11898
11898
  unitScale: E,
11899
- animations: (B = f.animations) !== null && B !== void 0 ? B : [],
11899
+ animations: (P = f.animations) !== null && P !== void 0 ? P : [],
11900
11900
  dispose: function() {
11901
11901
  I.forEach(function(M) {
11902
11902
  return M.dispose();
@@ -12445,12 +12445,12 @@ var FBXTreeParser = (
12445
12445
  s || (console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."), s = !0);
12446
12446
  var b = [0, 0, 0, 0], S = [0, 0, 0, 0];
12447
12447
  E.forEach(function(C, w) {
12448
- var I = C, B = v[w];
12449
- S.forEach(function(M, P, O) {
12448
+ var I = C, P = v[w];
12449
+ S.forEach(function(M, B, O) {
12450
12450
  if (I > M) {
12451
- O[P] = I, I = M;
12452
- var L = b[P];
12453
- b[P] = B, B = L;
12451
+ O[B] = I, I = M;
12452
+ var L = b[B];
12453
+ b[B] = P, P = L;
12454
12454
  }
12455
12455
  });
12456
12456
  }), v = b, E = S;
@@ -12501,8 +12501,8 @@ var FBXTreeParser = (
12501
12501
  t.uvs[k] === void 0 && (t.uvs[k] = []), t.uvs[k].push(l[k][O * 2]), t.uvs[k].push(l[k][O * 2 + 1]), t.uvs[k].push(l[k][L * 2]), t.uvs[k].push(l[k][L * 2 + 1]), t.uvs[k].push(l[k][F * 2]), t.uvs[k].push(l[k][F * 2 + 1]);
12502
12502
  });
12503
12503
  }, C = 0, w = h; C < w.length; C++) {
12504
- var I = w[C], B = I[0], M = I[1], P = I[2];
12505
- R(B, M, P);
12504
+ var I = w[C], P = I[0], M = I[1], B = I[2];
12505
+ R(P, M, B);
12506
12506
  }
12507
12507
  }, n.prototype.addMorphTargets = function(t, e, r, o, s) {
12508
12508
  if (o.length !== 0) {
@@ -13204,8 +13204,8 @@ function generateTransform(n) {
13204
13204
  var C = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), w = new THREE.Matrix4().getInverse(C), I = b.clone().multiply(w);
13205
13205
  R.copy(v).multiply(y).multiply(I).multiply(S);
13206
13206
  }
13207
- var B = new THREE.Matrix4().getInverse(f), M = new THREE.Matrix4().getInverse(u), P = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(B).multiply(l).multiply(u).multiply(s).multiply(M), O = new THREE.Matrix4().copyPosition(P), L = d.clone().multiply(O);
13208
- return p.copyPosition(L), P = p.clone().multiply(R), P.premultiply(new THREE.Matrix4().getInverse(d)), P;
13207
+ var P = new THREE.Matrix4().getInverse(f), M = new THREE.Matrix4().getInverse(u), B = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(P).multiply(l).multiply(u).multiply(s).multiply(M), O = new THREE.Matrix4().copyPosition(B), L = d.clone().multiply(O);
13208
+ return p.copyPosition(L), B = p.clone().multiply(R), B.premultiply(new THREE.Matrix4().getInverse(d)), B;
13209
13209
  }
13210
13210
  function getEulerOrder(n) {
13211
13211
  n = n || 0;
@@ -13334,17 +13334,17 @@ function calcBasisFunctionDerivatives(n, t, e, r, o) {
13334
13334
  for (var S = 1; S <= r; ++S) {
13335
13335
  var R = 0, C = v - S, w = e - S;
13336
13336
  v >= S && (b[T][0] = b[E][0] / c[w + 1][C], R = b[T][0] * c[C][w]);
13337
- for (var I = C >= -1 ? 1 : -C, B = v - 1 <= w ? S - 1 : e - v, M = I; M <= B; ++M)
13337
+ for (var I = C >= -1 ? 1 : -C, P = v - 1 <= w ? S - 1 : e - v, M = I; M <= P; ++M)
13338
13338
  b[T][M] = (b[E][M] - b[E][M - 1]) / c[w + 1][C + M], R += b[T][M] * c[C + M][w];
13339
13339
  v <= w && (b[T][S] = -b[E][S - 1] / c[w + 1][v], R += b[T][S] * c[v][w]), l[S][v] = R;
13340
13340
  var h = E;
13341
13341
  E = T, T = h;
13342
13342
  }
13343
13343
  }
13344
- for (var P = e, S = 1; S <= r; ++S) {
13344
+ for (var B = e, S = 1; S <= r; ++S) {
13345
13345
  for (var h = 0; h <= e; ++h)
13346
- l[S][h] *= P;
13347
- P *= e - S;
13346
+ l[S][h] *= B;
13347
+ B *= e - S;
13348
13348
  }
13349
13349
  return l;
13350
13350
  }
@@ -13439,51 +13439,51 @@ function loadX3p(n, t) {
13439
13439
  });
13440
13440
  }
13441
13441
  function parse$1(n, t) {
13442
- for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, T, b, S, R, C, w, I, B, M, P, O, L, F, D, k, j, z, V, J, U, q, G, Z, W, ee, X, K, $, re, te, ne, fe, le, ue, pe, ve, Ae, ie = unzipSync(n), ye = "", ce = null, se = 0, he = Object.keys(ie); se < he.length; se++) {
13442
+ for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, T, b, S, R, C, w, I, P, M, B, O, L, F, D, k, j, z, V, J, U, q, G, Z, W, ee, X, K, $, te, re, ne, de, ue, fe, me, pe, Ae, ie = unzipSync(n), ye = "", le = null, se = 0, he = Object.keys(ie); se < he.length; se++) {
13443
13443
  var Te = he[se];
13444
- /(^|\/)main\.xml$/i.test(Te) && (ce = ie[Te], ye = Te.slice(0, Te.lastIndexOf("/") + 1));
13444
+ /(^|\/)main\.xml$/i.test(Te) && (le = ie[Te], ye = Te.slice(0, Te.lastIndexOf("/") + 1));
13445
13445
  }
13446
- if (!ce)
13446
+ if (!le)
13447
13447
  throw new Error("X3p: main.xml not found.");
13448
13448
  if (typeof DOMParser == "undefined")
13449
13449
  throw new Error("X3p: DOMParser not found.");
13450
- var Me = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), je = new DOMParser(), _e = decodeText(ce), Ne = je.parseFromString(_e, "text/xml"), me = Ne.querySelector("Record1 Axes"), ge = {
13450
+ var Me = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), je = new DOMParser(), _e = decodeText(le), Ne = je.parseFromString(_e, "text/xml"), ve = Ne.querySelector("Record1 Axes"), ge = {
13451
13451
  x: {
13452
- type: (s = (o = (r = me == null ? void 0 : me.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
13453
- dataType: (c = (l = (u = me == null ? void 0 : me.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
13454
- increment: Number((d = (f = me == null ? void 0 : me.querySelector("CX Increment")) === null || f === void 0 ? void 0 : f.textContent) !== null && d !== void 0 ? d : "1"),
13455
- offset: Number((p = (h = me == null ? void 0 : me.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13452
+ type: (s = (o = (r = ve == null ? void 0 : ve.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
13453
+ dataType: (c = (l = (u = ve == null ? void 0 : ve.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
13454
+ increment: Number((d = (f = ve == null ? void 0 : ve.querySelector("CX Increment")) === null || f === void 0 ? void 0 : f.textContent) !== null && d !== void 0 ? d : "1"),
13455
+ offset: Number((p = (h = ve == null ? void 0 : ve.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13456
13456
  },
13457
13457
  y: {
13458
- type: (g = (A = (m = me == null ? void 0 : me.querySelector("CY AxisType")) === null || m === void 0 ? void 0 : m.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && g !== void 0 ? g : "I",
13459
- dataType: (E = (v = (y = me == null ? void 0 : me.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && E !== void 0 ? E : "D",
13460
- increment: Number((b = (T = me == null ? void 0 : me.querySelector("CY Increment")) === null || T === void 0 ? void 0 : T.textContent) !== null && b !== void 0 ? b : "1"),
13461
- offset: Number((R = (S = me == null ? void 0 : me.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13458
+ type: (g = (A = (m = ve == null ? void 0 : ve.querySelector("CY AxisType")) === null || m === void 0 ? void 0 : m.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && g !== void 0 ? g : "I",
13459
+ dataType: (E = (v = (y = ve == null ? void 0 : ve.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && E !== void 0 ? E : "D",
13460
+ increment: Number((b = (T = ve == null ? void 0 : ve.querySelector("CY Increment")) === null || T === void 0 ? void 0 : T.textContent) !== null && b !== void 0 ? b : "1"),
13461
+ offset: Number((R = (S = ve == null ? void 0 : ve.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13462
13462
  },
13463
13463
  z: {
13464
- type: (I = (w = (C = me == null ? void 0 : me.querySelector("CZ AxisType")) === null || C === void 0 ? void 0 : C.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && I !== void 0 ? I : "A",
13465
- dataType: (P = (M = (B = me == null ? void 0 : me.querySelector("CZ DataType")) === null || B === void 0 ? void 0 : B.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && P !== void 0 ? P : "D",
13466
- increment: Number((L = (O = me == null ? void 0 : me.querySelector("CZ Increment")) === null || O === void 0 ? void 0 : O.textContent) !== null && L !== void 0 ? L : "1"),
13467
- offset: Number((D = (F = me == null ? void 0 : me.querySelector("CZ Offset")) === null || F === void 0 ? void 0 : F.textContent) !== null && D !== void 0 ? D : "0")
13464
+ type: (I = (w = (C = ve == null ? void 0 : ve.querySelector("CZ AxisType")) === null || C === void 0 ? void 0 : C.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && I !== void 0 ? I : "A",
13465
+ dataType: (B = (M = (P = ve == null ? void 0 : ve.querySelector("CZ DataType")) === null || P === void 0 ? void 0 : P.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && B !== void 0 ? B : "D",
13466
+ increment: Number((L = (O = ve == null ? void 0 : ve.querySelector("CZ Increment")) === null || O === void 0 ? void 0 : O.textContent) !== null && L !== void 0 ? L : "1"),
13467
+ offset: Number((D = (F = ve == null ? void 0 : ve.querySelector("CZ Offset")) === null || F === void 0 ? void 0 : F.textContent) !== null && D !== void 0 ? D : "0")
13468
13468
  }
13469
13469
  }, ke = null, Se = Ne.querySelector("Record1 Axes Rotation");
13470
- Se && (ke = new THREE.Matrix3(), ke.set(Number((j = (k = Se.querySelector("r11")) === null || k === void 0 ? void 0 : k.textContent) !== null && j !== void 0 ? j : 0), Number((V = (z = Se.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && V !== void 0 ? V : 0), Number((U = (J = Se.querySelector("r13")) === null || J === void 0 ? void 0 : J.textContent) !== null && U !== void 0 ? U : 0), Number((G = (q = Se.querySelector("r21")) === null || q === void 0 ? void 0 : q.textContent) !== null && G !== void 0 ? G : 0), Number((W = (Z = Se.querySelector("r22")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && W !== void 0 ? W : 0), Number((X = (ee = Se.querySelector("r23")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && X !== void 0 ? X : 0), Number(($ = (K = Se.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && $ !== void 0 ? $ : 0), Number((te = (re = Se.querySelector("r32")) === null || re === void 0 ? void 0 : re.textContent) !== null && te !== void 0 ? te : 0), Number((fe = (ne = Se.querySelector("r33")) === null || ne === void 0 ? void 0 : ne.textContent) !== null && fe !== void 0 ? fe : 0)));
13471
- var Ge = (le = Ne.querySelector("Record3 DataLink PointDataLink")) === null || le === void 0 ? void 0 : le.textContent;
13470
+ Se && (ke = new THREE.Matrix3(), ke.set(Number((j = (k = Se.querySelector("r11")) === null || k === void 0 ? void 0 : k.textContent) !== null && j !== void 0 ? j : 0), Number((V = (z = Se.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && V !== void 0 ? V : 0), Number((U = (J = Se.querySelector("r13")) === null || J === void 0 ? void 0 : J.textContent) !== null && U !== void 0 ? U : 0), Number((G = (q = Se.querySelector("r21")) === null || q === void 0 ? void 0 : q.textContent) !== null && G !== void 0 ? G : 0), Number((W = (Z = Se.querySelector("r22")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && W !== void 0 ? W : 0), Number((X = (ee = Se.querySelector("r23")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && X !== void 0 ? X : 0), Number(($ = (K = Se.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && $ !== void 0 ? $ : 0), Number((re = (te = Se.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && re !== void 0 ? re : 0), Number((de = (ne = Se.querySelector("r33")) === null || ne === void 0 ? void 0 : ne.textContent) !== null && de !== void 0 ? de : 0)));
13471
+ var Ge = (ue = Ne.querySelector("Record3 DataLink PointDataLink")) === null || ue === void 0 ? void 0 : ue.textContent;
13472
13472
  if (typeof Ge != "string")
13473
13473
  throw new Error("X3p: PointDataLink not found.");
13474
13474
  Ge = pathJoin(ye, Ge);
13475
13475
  var xe = ie[Ge];
13476
13476
  if (!xe)
13477
13477
  throw new Error("X3p: ".concat(xe, " not found."));
13478
- for (var Ve = getPointArray(xe.buffer, ge.z.dataType), Pe = Number((pe = (ue = Ne.querySelector("Record3 MatrixDimension SizeX")) === null || ue === void 0 ? void 0 : ue.textContent) !== null && pe !== void 0 ? pe : "0"), Fe = Number((Ae = (ve = Ne.querySelector("Record3 MatrixDimension SizeY")) === null || ve === void 0 ? void 0 : ve.textContent) !== null && Ae !== void 0 ? Ae : "0"), Be = Math.floor(Pe - 1), Je = Math.floor(Fe - 1), De = Be + 1, nt = Je + 1, Ze = new Float32Array(De * nt * 3), At = new Float32Array(De * nt * 2), it = new Uint32Array(Be * Je * 6), St = new THREE.Box3(), Qe = 0; Qe < nt; Qe++)
13478
+ for (var Ve = getPointArray(xe.buffer, ge.z.dataType), Pe = Number((me = (fe = Ne.querySelector("Record3 MatrixDimension SizeX")) === null || fe === void 0 ? void 0 : fe.textContent) !== null && me !== void 0 ? me : "0"), Fe = Number((Ae = (pe = Ne.querySelector("Record3 MatrixDimension SizeY")) === null || pe === void 0 ? void 0 : pe.textContent) !== null && Ae !== void 0 ? Ae : "0"), Be = Math.floor(Pe - 1), Je = Math.floor(Fe - 1), De = Be + 1, nt = Je + 1, Ze = new Float32Array(De * nt * 3), At = new Float32Array(De * nt * 2), it = new Uint32Array(Be * Je * 6), St = new THREE.Box3(), Qe = 0; Qe < nt; Qe++)
13479
13479
  for (var at = Qe * ge.y.increment + ge.y.offset, Ie = 0; Ie < De; Ie++) {
13480
13480
  var Ke = Qe * De + Ie, Pt = Ie * ge.x.increment + ge.x.offset, Rt = Ve[Ke], bt = !isNaN(Rt), yt = bt ? Rt : NaN;
13481
13481
  _vector.set(Pt, -at, yt), ke && _vector.applyMatrix3(ke), bt && St.expandByPoint(_vector), Ze[Ke * 3 + 0] = _vector.x, Ze[Ke * 3 + 1] = _vector.y, Ze[Ke * 3 + 2] = _vector.z, At[Ke * 2 + 0] = Ie / Be, At[Ke * 2 + 1] = 1 - Qe / Je;
13482
13482
  }
13483
13483
  for (var Qe = 0; Qe < Je; Qe++)
13484
13484
  for (var Ie = 0; Ie < Be; Ie++) {
13485
- var ot = Ie + De * Qe, We = Ie + De * (Qe + 1), pt = Ie + 1 + De * (Qe + 1), st = Ie + 1 + De * Qe, de = (Qe * Be + Ie) * 6;
13486
- it[de + 0] = ot, it[de + 1] = We, it[de + 2] = st, it[de + 3] = We, it[de + 4] = pt, it[de + 5] = st;
13485
+ var ot = Ie + De * Qe, We = Ie + De * (Qe + 1), pt = Ie + 1 + De * (Qe + 1), st = Ie + 1 + De * Qe, ce = (Qe * Be + Ie) * 6;
13486
+ it[ce + 0] = ot, it[ce + 1] = We, it[ce + 2] = st, it[ce + 3] = We, it[ce + 4] = pt, it[ce + 5] = st;
13487
13487
  }
13488
13488
  var Ee = new THREE.BufferGeometry();
13489
13489
  Ee.setAttribute("position", new THREE.BufferAttribute(Ze, 3)), Ee.setAttribute("uv", new THREE.BufferAttribute(At, 2)), Ee.setIndex(new THREE.BufferAttribute(it, 1)), (!Ee.groups || Ee.groups.length === 0) && Ee.addGroup(0, Ee.index ? Ee.index.count : Ee.attributes.position.count, 0), Ee.boundingBox = St;
@@ -14089,20 +14089,20 @@ var BVHVector3 = (
14089
14089
  u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, b = scratchVector3B.x, b < A && (A = b), b > v && (v = b), b = scratchVector3C.x, b < A && (A = b), b > v && (v = b), g = E = scratchVector3A.y, b = scratchVector3B.y, b < g && (g = b), b > E && (E = b), b = scratchVector3C.y, b < g && (g = b), b > E && (E = b), y = T = scratchVector3A.z, b = scratchVector3B.z, b < y && (y = b), b > T && (T = b), b = scratchVector3C.z, b < y && (y = b), b > T && (T = b), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = T;
14090
14090
  }
14091
14091
  else {
14092
- for (var S = 1 / 0, R = 1 / 0, C = 1 / 0, w = -1 / 0, I = -1 / 0, B = -1 / 0, h = 0; h < s; h += 1) {
14092
+ for (var S = 1 / 0, R = 1 / 0, C = 1 / 0, w = -1 / 0, I = -1 / 0, P = -1 / 0, h = 0; h < s; h += 1) {
14093
14093
  var p = h * 3, m = h * 6, A = void 0, g = void 0, y = void 0, v = void 0, E = void 0, T = void 0, b = void 0;
14094
- u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, b = scratchVector3B.x, b < A && (A = b), b > v && (v = b), b = scratchVector3C.x, b < A && (A = b), b > v && (v = b), g = E = scratchVector3A.y, b = scratchVector3B.y, b < g && (g = b), b > E && (E = b), b = scratchVector3C.y, b < g && (g = b), b > E && (E = b), y = T = scratchVector3A.z, b = scratchVector3B.z, b < y && (y = b), b > T && (T = b), b = scratchVector3C.z, b < y && (y = b), b > T && (T = b), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = T, A < S && (S = A), v > w && (w = v), g < R && (R = g), E > I && (I = E), y < C && (C = y), T > B && (B = T);
14094
+ u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, b = scratchVector3B.x, b < A && (A = b), b > v && (v = b), b = scratchVector3C.x, b < A && (A = b), b > v && (v = b), g = E = scratchVector3A.y, b = scratchVector3B.y, b < g && (g = b), b > E && (E = b), b = scratchVector3C.y, b < g && (g = b), b > E && (E = b), y = T = scratchVector3A.z, b = scratchVector3B.z, b < y && (y = b), b > T && (T = b), b = scratchVector3C.z, b < y && (y = b), b > T && (T = b), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = T, A < S && (S = A), v > w && (w = v), g < R && (R = g), E > I && (I = E), y < C && (C = y), T > P && (P = T);
14095
14095
  }
14096
- o = [S, R, C, w, I, B];
14096
+ o = [S, R, C, w, I, P];
14097
14097
  }
14098
14098
  var M = new BVHNode(++d, o, 0, s, 0);
14099
14099
  c[f++] = M;
14100
- var P = [], O = [0, 1, 2], L = function(D, k) {
14101
- return P[k] - P[D];
14100
+ var B = [], O = [0, 1, 2], L = function(D, k) {
14101
+ return B[k] - B[D];
14102
14102
  };
14103
14103
  function F(D) {
14104
14104
  var k = D.startIndex, j = D.endIndex, z = D.extents;
14105
- P[0] = z[3] - z[0], P[1] = z[4] - z[1], P[2] = z[5] - z[2], O.sort(L);
14105
+ B[0] = z[3] - z[0], B[1] = z[4] - z[1], B[2] = z[5] - z[2], O.sort(L);
14106
14106
  for (var V = 0; V < 3; V++) {
14107
14107
  for (var J = O[V], U = z[J] + z[J + 3], q = k, G = j - 1, Z = -1, W = void 0; q <= G; )
14108
14108
  Z === -1 ? (W = u[q], l[W * 6 + J] + l[W * 6 + J + 3] < U ? q++ : Z = W) : (W = u[G], l[W * 6 + J] + l[W * 6 + J + 3] >= U || (u[q] = W, u[G] = Z, Z = -1, q++), G--);
@@ -14142,27 +14142,27 @@ var BVHVector3 = (
14142
14142
  y.min.x = d[E], y.min.y = d[E + 1], y.min.z = d[E + 2], y.max.x = d[E + 3], y.max.y = d[E + 4], y.max.z = d[E + 5];
14143
14143
  var T = intersectNodeBox(e, m, y, o);
14144
14144
  if (T !== null && !(s && T > v)) {
14145
- for (var b = e.x, S = e.y, R = e.z, C = r.x, w = r.y, I = r.z, B = h[E + 6], M = h[E + 7], P = B; P < M; P++) {
14146
- var O = c[P], L = O * 3, F = new BVHVector3(0, 0, 0);
14145
+ for (var b = e.x, S = e.y, R = e.z, C = r.x, w = r.y, I = r.z, P = h[E + 6], M = h[E + 7], B = P; B < M; B++) {
14146
+ var O = c[B], L = O * 3, F = new BVHVector3(0, 0, 0);
14147
14147
  this.getPositionByIndex(L, F);
14148
14148
  var D = F.x, k = F.y, j = F.z, z = new BVHVector3(0, 0, 0);
14149
14149
  this.getPositionByIndex(L + 1, z);
14150
14150
  var V = z.x, J = z.y, U = z.z, q = new BVHVector3(0, 0, 0);
14151
14151
  this.getPositionByIndex(L + 2, q);
14152
- var G = q.x, Z = q.y, W = q.z, ee = V - D, X = J - k, K = U - j, $ = G - D, re = Z - k, te = W - j, ne = X * te - K * re, fe = K * $ - ee * te, le = ee * re - X * $, ue = C * ne + w * fe + I * le, pe = void 0;
14153
- if (ue > 0)
14154
- pe = 1;
14155
- else if (ue < 0)
14156
- pe = -1, ue = -ue;
14152
+ var G = q.x, Z = q.y, W = q.z, ee = V - D, X = J - k, K = U - j, $ = G - D, te = Z - k, re = W - j, ne = X * re - K * te, de = K * $ - ee * re, ue = ee * te - X * $, fe = C * ne + w * de + I * ue, me = void 0;
14153
+ if (fe > 0)
14154
+ me = 1;
14155
+ else if (fe < 0)
14156
+ me = -1, fe = -fe;
14157
14157
  else
14158
14158
  continue;
14159
- var ve = b - D, Ae = S - k, ie = R - j, ye = pe * (C * (Ae * te - ie * re) + w * (ie * $ - ve * te) + I * (ve * re - Ae * $));
14159
+ var pe = b - D, Ae = S - k, ie = R - j, ye = me * (C * (Ae * re - ie * te) + w * (ie * $ - pe * re) + I * (pe * te - Ae * $));
14160
14160
  if (!(ye < 0)) {
14161
- var ce = pe * (C * (X * ie - K * Ae) + w * (K * ve - ee * ie) + I * (ee * Ae - X * ve));
14162
- if (!(ce < 0) && !(ye + ce > ue)) {
14163
- var se = -pe * (ve * ne + Ae * fe + ie * le);
14161
+ var le = me * (C * (X * ie - K * Ae) + w * (K * pe - ee * ie) + I * (ee * Ae - X * pe));
14162
+ if (!(le < 0) && !(ye + le > fe)) {
14163
+ var se = -me * (pe * ne + Ae * de + ie * ue);
14164
14164
  if (!(se < 0)) {
14165
- var he = se / ue, Te = new BVHVector3(b + C * he, S + w * he, R + I * he), Me = new BVHIntersect(F, z, q, O, Te);
14165
+ var he = se / fe, Te = new BVHVector3(b + C * he, S + w * he, R + I * he), Me = new BVHIntersect(F, z, q, O, Te);
14166
14166
  (!u || u(Me)) && (s ? he < v && (v = he, l.length > 0 && (l.length = 0), l.push(Me)) : l.push(Me));
14167
14167
  }
14168
14168
  }
@@ -14219,27 +14219,27 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14219
14219
  }
14220
14220
  var S = new BVHNode(++d, o, 0, u, 0);
14221
14221
  c[f++] = S;
14222
- var R = [], C = [0, 1, 2], w = function(B, M) {
14223
- return R[M] - R[B];
14222
+ var R = [], C = [0, 1, 2], w = function(P, M) {
14223
+ return R[M] - R[P];
14224
14224
  };
14225
- function I(B) {
14226
- var M = B.startIndex, P = B.endIndex, O = B.extents;
14225
+ function I(P) {
14226
+ var M = P.startIndex, B = P.endIndex, O = P.extents;
14227
14227
  R[0] = O[3] - O[0], R[1] = O[4] - O[1], R[2] = O[5] - O[2];
14228
- for (var L = C.sort(w)[0], F = ORDER_AXISES[L], D = (O[L] + O[L + 3]) / 2, k = M, j = P - 1, z = -1, V; k <= j; )
14228
+ for (var L = C.sort(w)[0], F = ORDER_AXISES[L], D = (O[L] + O[L + 3]) / 2, k = M, j = B - 1, z = -1, V; k <= j; )
14229
14229
  z === -1 ? (V = l[k], s(V, scratchVector3$8), scratchVector3$8[F] < D ? k++ : z = V) : (V = l[j], s(V, scratchVector3$8), scratchVector3$8[F] >= D || (l[k] = V, l[j] = z, z = -1, k++), j--);
14230
14230
  if (k > M) {
14231
14231
  var J = O.slice();
14232
14232
  J[L + 3] = D + EPSILON;
14233
- var U = new BVHNode(++d, J, M, k, B.deepth + 1);
14234
- U.deepth < r && U.endIndex - U.startIndex > e && (c[f++] = U), B.node0 = U;
14233
+ var U = new BVHNode(++d, J, M, k, P.deepth + 1);
14234
+ U.deepth < r && U.endIndex - U.startIndex > e && (c[f++] = U), P.node0 = U;
14235
14235
  }
14236
- if (P > k) {
14236
+ if (B > k) {
14237
14237
  var q = O.slice();
14238
14238
  q[L] = D - EPSILON;
14239
- var G = new BVHNode(++d, q, k, P, B.deepth + 1);
14240
- G.deepth < r && G.endIndex - G.startIndex > e && (c[f++] = G), B.node1 = G;
14239
+ var G = new BVHNode(++d, q, k, B, P.deepth + 1);
14240
+ G.deepth < r && G.endIndex - G.startIndex > e && (c[f++] = G), P.node1 = G;
14241
14241
  }
14242
- B.startIndex = 0, B.endIndex = 0;
14242
+ P.startIndex = 0, P.endIndex = 0;
14243
14243
  }
14244
14244
  for (; f; )
14245
14245
  I(c[--f]);
@@ -14254,8 +14254,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14254
14254
  for (var S = h[T + 6], R = h[T + 7], C = S; C < R; C++) {
14255
14255
  var w = c[C], I = new BVHVector3(0, 0, 0);
14256
14256
  this.getPositionByIndex(w, I);
14257
- var B = I.x, M = I.y, P = I.z, O = e.x, L = e.y, F = e.z, D = r.x, k = r.y, j = r.z, z = D * (B - O) + k * (M - L) + j * (P - F);
14258
- if (z > 0 ? (O += D * z, L += k * z, F += j * z) : z < 0 && (z = 0), D = B - O, k = M - L, j = P - F, D * D + k * k + j * j <= m) {
14257
+ var P = I.x, M = I.y, B = I.z, O = e.x, L = e.y, F = e.z, D = r.x, k = r.y, j = r.z, z = D * (P - O) + k * (M - L) + j * (B - F);
14258
+ if (z > 0 ? (O += D * z, L += k * z, F += j * z) : z < 0 && (z = 0), D = P - O, k = M - L, j = B - F, D * D + k * k + j * j <= m) {
14259
14259
  var V = new BVHVector3(O, L, F), J = new BVHIntersect(I, I, I, w, V);
14260
14260
  (!u || u(J)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(J)) : l.push(J));
14261
14261
  }
@@ -14314,17 +14314,17 @@ function raycastMesh(n, t, e, r) {
14314
14314
  S = d;
14315
14315
  if (!S)
14316
14316
  return !1;
14317
- var I = v.intersectionPoint, B = new THREE.Vector3(I.x, I.y, I.z).applyMatrix4(u), M = e.ray.origin.distanceTo(B);
14317
+ var I = v.intersectionPoint, P = new THREE.Vector3(I.x, I.y, I.z).applyMatrix4(u), M = e.ray.origin.distanceTo(P);
14318
14318
  if (M < e.near || M > e.far)
14319
14319
  return !1;
14320
- var P = v.pointA, O = v.pointB, L = v.pointC, F = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(P.x, P.y, P.z).applyMatrix4(u), scratchIntersectionFaceB.set(O.x, O.y, O.z).applyMatrix4(u), scratchIntersectionFaceC.set(L.x, L.y, L.z).applyMatrix4(u), new THREE.Vector3()), D = e.ray.direction.dot(F);
14320
+ var B = v.pointA, O = v.pointB, L = v.pointC, F = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(B.x, B.y, B.z).applyMatrix4(u), scratchIntersectionFaceB.set(O.x, O.y, O.z).applyMatrix4(u), scratchIntersectionFaceC.set(L.x, L.y, L.z).applyMatrix4(u), new THREE.Vector3()), D = e.ray.direction.dot(F);
14321
14321
  if (S.side === THREE.FrontSide && D >= 0 || S.side === THREE.BackSide && D <= 0)
14322
14322
  return !1;
14323
14323
  var k = new THREE.Face3(p ? p.array[b] : b, p ? p.array[b + 1] : b + 1, p ? p.array[b + 2] : b + 2, F), j = {
14324
14324
  distance: M,
14325
14325
  object: n,
14326
14326
  face: k,
14327
- point: B,
14327
+ point: P,
14328
14328
  distanceToRay: 0,
14329
14329
  faceIndex: T
14330
14330
  };
@@ -14344,18 +14344,18 @@ function raycastPoints(n, t, e, r) {
14344
14344
  var S = b.intersectionPoint, R = new THREE.Vector3(S.x, S.y, S.z).applyMatrix4(c), C = e.ray.origin.distanceTo(R);
14345
14345
  if (C < e.near || C > e.far)
14346
14346
  return !1;
14347
- var w = b.pointA, I = scratchIntersectionFaceA.set(w.x, w.y, w.z).applyMatrix4(c), B = b.index, M = m ? m.array[B] : B, P;
14347
+ var w = b.pointA, I = scratchIntersectionFaceA.set(w.x, w.y, w.z).applyMatrix4(c), P = b.index, M = m ? m.array[P] : P, B;
14348
14348
  if (g) {
14349
14349
  var O = new THREE.Vector3().fromBufferAttribute(A, M).applyNormalMatrix(scratchNormalMatrix);
14350
- P = new THREE.Face3(M, M, M, O);
14350
+ B = new THREE.Face3(M, M, M, O);
14351
14351
  }
14352
14352
  var L = {
14353
14353
  distance: C,
14354
14354
  object: n,
14355
- face: P,
14355
+ face: B,
14356
14356
  point: R,
14357
14357
  distanceToRay: R.distanceTo(I),
14358
- index: B
14358
+ index: P
14359
14359
  };
14360
14360
  return intersectsMap.set(b, L), d(L);
14361
14361
  }), v = y.length, E = 0; E < v; E++) {
@@ -15423,10 +15423,10 @@ var _object_pattern = /^[og]\s*(.+)?/, _material_library_pattern = /^mtllib /, _
15423
15423
  (d.hasNormal === !0 && v === void 0 || E === void 0 || T === void 0) && (d.hasNormal = !1), (d.hasUV === !0 && b === void 0 || S === void 0 || R === void 0) && (d.hasUV = !1);
15424
15424
  var C = [A, b, v].join(":"), w = d.indexMap[C];
15425
15425
  w === void 0 && (w = d.vertices.length / 3, d.indexMap[C] = w, d.vertices.push(this.vertices[A + 0], this.vertices[A + 1], this.vertices[A + 2]), d.hasColor && (this.colors[A] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[A + 0], this.colors[A + 1], this.colors[A + 2])), d.hasNormal && d.normals.push(this.normals[A + 0], this.normals[A + 1], this.normals[A + 2]), d.hasUV && d.uvs.push(this.uvs[b + 0], this.uvs[b + 1])), d.index.push(w);
15426
- var I = [g, S, E].join(":"), B = d.indexMap[I];
15427
- B === void 0 && (B = d.vertices.length / 3, d.indexMap[I] = B, d.vertices.push(this.vertices[g + 0], this.vertices[g + 1], this.vertices[g + 2]), d.hasColor && (this.colors[g] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[g + 0], this.colors[g + 1], this.colors[g + 2])), d.hasNormal && d.normals.push(this.normals[g + 0], this.normals[g + 1], this.normals[g + 2]), d.hasUV && d.uvs.push(this.uvs[S + 0], this.uvs[S + 1])), d.index.push(B);
15428
- var M = [y, R, T].join(":"), P = d.indexMap[M];
15429
- P === void 0 && (P = d.vertices.length / 3, d.indexMap[M] = P, d.vertices.push(this.vertices[y + 0], this.vertices[y + 1], this.vertices[y + 2]), d.hasColor && (this.colors[y] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[y + 0], this.colors[y + 1], this.colors[y + 2])), d.hasNormal && d.normals.push(this.normals[y + 0], this.normals[y + 1], this.normals[y + 2]), d.hasUV && d.uvs.push(this.uvs[R + 0], this.uvs[R + 1])), d.index.push(P);
15426
+ var I = [g, S, E].join(":"), P = d.indexMap[I];
15427
+ P === void 0 && (P = d.vertices.length / 3, d.indexMap[I] = P, d.vertices.push(this.vertices[g + 0], this.vertices[g + 1], this.vertices[g + 2]), d.hasColor && (this.colors[g] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[g + 0], this.colors[g + 1], this.colors[g + 2])), d.hasNormal && d.normals.push(this.normals[g + 0], this.normals[g + 1], this.normals[g + 2]), d.hasUV && d.uvs.push(this.uvs[S + 0], this.uvs[S + 1])), d.index.push(P);
15428
+ var M = [y, R, T].join(":"), B = d.indexMap[M];
15429
+ B === void 0 && (B = d.vertices.length / 3, d.indexMap[M] = B, d.vertices.push(this.vertices[y + 0], this.vertices[y + 1], this.vertices[y + 2]), d.hasColor && (this.colors[y] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[y + 0], this.colors[y + 1], this.colors[y + 2])), d.hasNormal && d.normals.push(this.normals[y + 0], this.normals[y + 1], this.normals[y + 2]), d.hasUV && d.uvs.push(this.uvs[R + 0], this.uvs[R + 1])), d.index.push(B);
15430
15430
  }, n;
15431
15431
  })()
15432
15432
  );
@@ -15566,23 +15566,23 @@ function build(n, t) {
15566
15566
  return g.dispose();
15567
15567
  }), g.setAttribute("position", new THREE.BufferAttribute(new Float32Array(p.vertices), 3)), p.normals.length > 0 && g.setAttribute("normal", new THREE.BufferAttribute(new Float32Array(p.normals), 3)), p.colors.length > 0 && (A = !0, g.setAttribute("color", new THREE.BufferAttribute(new Float32Array(p.colors), 3))), p.uvs.length > 0 && g.setAttribute("uv", new THREE.BufferAttribute(new Float32Array(p.uvs), 2)), p.index.length > 0 && g.setIndex(new THREE.BufferAttribute(new Uint32Array(p.index), 1)), g.computeBoundingBox(), g.computeBoundingSphere();
15568
15568
  for (var y = [], v = function(R, C) {
15569
- var w = m[R], I = w.name + "_" + w.smooth + "_" + A, B = n.materials[I];
15570
- if (!B) {
15571
- for (var M = null, P = 0, O = t; P < O.length; P++) {
15572
- var L = O[P], F = L.name, D = L.create;
15569
+ var w = m[R], I = w.name + "_" + w.smooth + "_" + A, P = n.materials[I];
15570
+ if (!P) {
15571
+ for (var M = null, B = 0, O = t; B < O.length; B++) {
15572
+ var L = O[B], F = L.name, D = L.create;
15573
15573
  F === w.mtllib && (M = D(w.name));
15574
15574
  }
15575
15575
  if (!M) {
15576
15576
  var k = new PBMMeshMaterial();
15577
15577
  M = [k, Promise.resolve([])];
15578
15578
  }
15579
- B = M[0], B.name = w.name, B.flatShading = !(w.smooth || g.attributes.normal), B.vertexColors = A, n.materials[I] = B;
15579
+ P = M[0], P.name = w.name, P.flatShading = !(w.smooth || g.attributes.normal), P.vertexColors = A, n.materials[I] = P;
15580
15580
  var j = M[1];
15581
15581
  r.push(j), o.push(function() {
15582
- return B.dispose();
15582
+ return P.dispose();
15583
15583
  });
15584
15584
  }
15585
- y.push(B);
15585
+ y.push(P);
15586
15586
  }, E = 0, T = m.length; E < T; E++)
15587
15587
  v(E);
15588
15588
  g.clearGroups();
@@ -16029,8 +16029,8 @@ function createPipeBufferGeometry(n, t, e, r) {
16029
16029
  var S = (m * r + y) * 6, R = (r + 1) * m + y, C = (r + 1) * (m + 1) + y, w = (r + 1) * (m + 1) + (y + 1), I = (r + 1) * m + (y + 1);
16030
16030
  l[S] = R, l[S + 1] = C, l[S + 2] = I, l[S + 3] = C, l[S + 4] = w, l[S + 5] = I;
16031
16031
  }
16032
- var B = new THREE.BufferGeometry();
16033
- return B.setIndex(new THREE.BufferAttribute(l, 1)), B.setAttribute("position", new THREE.BufferAttribute(o, 3)), B.setAttribute("normal", new THREE.BufferAttribute(s, 3)), B.setAttribute("uv", new THREE.BufferAttribute(u, 2)), B;
16032
+ var P = new THREE.BufferGeometry();
16033
+ return P.setIndex(new THREE.BufferAttribute(l, 1)), P.setAttribute("position", new THREE.BufferAttribute(o, 3)), P.setAttribute("normal", new THREE.BufferAttribute(s, 3)), P.setAttribute("uv", new THREE.BufferAttribute(u, 2)), P;
16034
16034
  }
16035
16035
  function parseTrajectoryObject(n, t) {
16036
16036
  for (var e = new THREE.Color(0).convertSRGBToLinear(), r = new THREE.Color(52949).convertSRGBToLinear(), o = new THREE.Color(3370495).convertSRGBToLinear(), s = new THREE.Color(16777215).convertSRGBToLinear(), u = 0, l = new THREE.CurvePath(), c = n.length, f = 3; f < c; f += 3) {
@@ -16078,8 +16078,8 @@ function parseTrajectoryObject(n, t) {
16078
16078
  side: THREE.FrontSide
16079
16079
  });
16080
16080
  I.uniforms.displacementScalar.value = -0.01, I.uniforms.diffuse.value = r;
16081
- var B = new THREE.Mesh(C, [w, I]);
16082
- B.position.fromArray(n, 0), b.add(B);
16081
+ var P = new THREE.Mesh(C, [w, I]);
16082
+ P.position.fromArray(n, 0), b.add(P);
16083
16083
  var M = new THREE.ShaderMaterial({
16084
16084
  vertexShader: TRAJECTOR_SPHERE_SHADER.vertexShader,
16085
16085
  fragmentShader: TRAJECTOR_SPHERE_SHADER.fragmentShader,
@@ -16087,8 +16087,8 @@ function parseTrajectoryObject(n, t) {
16087
16087
  side: THREE.FrontSide
16088
16088
  });
16089
16089
  M.uniforms.displacementScalar.value = -0.01, M.uniforms.diffuse.value = o;
16090
- var P = new THREE.Mesh(C, [w, M]);
16091
- return P.position.fromArray(n, n.length - 3), b.add(P), {
16090
+ var B = new THREE.Mesh(C, [w, M]);
16091
+ return B.position.fromArray(n, n.length - 3), b.add(B), {
16092
16092
  scene: b,
16093
16093
  dispose: function() {
16094
16094
  y.dispose(), v.dispose(), E.dispose(), T.dispose(), C.dispose(), w.dispose(), I.dispose(), M.dispose();
@@ -16447,10 +16447,10 @@ var Tile3D = (
16447
16447
  if (w === !1) {
16448
16448
  var I = g.progress >= 0.01 && g.progress <= 0.99;
16449
16449
  if (I) {
16450
- var B = new THREE.Vector3();
16451
- g.pano0 && B.setFromMatrixPosition(g.pano0.matrix);
16452
- var M = B.clone();
16453
- g.pano1 && M.setFromMatrixPosition(g.pano1.matrix), B.distanceTo(M) < 10 && (w = !0);
16450
+ var P = new THREE.Vector3();
16451
+ g.pano0 && P.setFromMatrixPosition(g.pano0.matrix);
16452
+ var M = P.clone();
16453
+ g.pano1 && M.setFromMatrixPosition(g.pano1.matrix), P.distanceTo(M) < 10 && (w = !0);
16454
16454
  }
16455
16455
  }
16456
16456
  if (w || this.tileset.update(R, C), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(se) {
@@ -16464,10 +16464,10 @@ var Tile3D = (
16464
16464
  c.refineProgress[0]++;
16465
16465
  }), this.loaded === !1 && this.autoRefine) {
16466
16466
  this.loaded = !0;
16467
- var P = !1;
16467
+ var B = !1;
16468
16468
  this.tileset.needsRefinedTiles.forEach(function(se) {
16469
16469
  if (c.loaded !== !1 && se.content) {
16470
- if (se.state.visible && (P = !0), R.skipLevelOfDetail) {
16470
+ if (se.state.visible && (B = !0), R.skipLevelOfDetail) {
16471
16471
  if (se.state.finalResolution) {
16472
16472
  var he = se.state.ancestorWithContentAvailable, Te = he && he.content ? he.content : se.content, Me = Te.loadState;
16473
16473
  (Me === "UNLOADED" || Me === "LOADING") && (c.loaded = !1);
@@ -16477,7 +16477,7 @@ var Tile3D = (
16477
16477
  (Me === "UNLOADED" || Me === "LOADING") && (c.loaded = !1);
16478
16478
  }
16479
16479
  }
16480
- }), P && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16480
+ }), B && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16481
16481
  }
16482
16482
  this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), R.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(se, he) {
16483
16483
  return se.floor !== he.floor ? se.floor - he.floor : se.levelOfContent !== he.levelOfContent ? he.levelOfContent - se.levelOfContent : se.state.distanceToCamera !== he.state.distanceToCamera ? se.state.distanceToCamera - he.state.distanceToCamera : se.state.centerZDepth - he.state.centerZDepth;
@@ -16503,24 +16503,24 @@ var Tile3D = (
16503
16503
  this.tileObjects.push(k);
16504
16504
  }
16505
16505
  }
16506
- var re = O.toString();
16507
- tileVersionMap.get(this) !== re && (tileVersionMap.set(this, re), A = !0), R.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), R.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16508
- for (var te = [], ne = 0, fe = this.tileset.selectedTrajectories; ne < fe.length; ne++) {
16509
- var le = fe[ne], ue = (h = le.content.data) === null || h === void 0 ? void 0 : h.object;
16510
- if (ue) {
16511
- var j = ue.update(e, r, o, this, le, g);
16512
- te.push(le.id), j && (A = !0), this.renderObjects.push(ue);
16506
+ var te = O.toString();
16507
+ tileVersionMap.get(this) !== te && (tileVersionMap.set(this, te), A = !0), R.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), R.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16508
+ for (var re = [], ne = 0, de = this.tileset.selectedTrajectories; ne < de.length; ne++) {
16509
+ var ue = de[ne], fe = (h = ue.content.data) === null || h === void 0 ? void 0 : h.object;
16510
+ if (fe) {
16511
+ var j = fe.update(e, r, o, this, ue, g);
16512
+ re.push(ue.id), j && (A = !0), this.renderObjects.push(fe);
16513
16513
  }
16514
16514
  }
16515
- var pe = te.toString();
16516
- trajectoryVersionMap.get(this) !== pe && (trajectoryVersionMap.set(this, pe), A = !0);
16517
- for (var ve = Math.min(0, ((m = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && m !== void 0 ? m : []).indexOf(this)), Ae = ve * 1e4, ie = function(se) {
16515
+ var me = re.toString();
16516
+ trajectoryVersionMap.get(this) !== me && (trajectoryVersionMap.set(this, me), A = !0);
16517
+ for (var pe = Math.min(0, ((m = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && m !== void 0 ? m : []).indexOf(this)), Ae = pe * 1e4, ie = function(se) {
16518
16518
  var he = ye.renderObjects[se], Te = se + Ae;
16519
16519
  he.traverse(function(Me) {
16520
16520
  (Me instanceof THREE.Mesh || Me instanceof THREE.Line || Me instanceof THREE.Points) && (Me.renderOrder = Te);
16521
16521
  }), ye.add(he);
16522
- }, ye = this, ce = 0; ce < this.renderObjects.length; ce++)
16523
- ie(ce);
16522
+ }, ye = this, le = 0; le < this.renderObjects.length; le++)
16523
+ ie(le);
16524
16524
  return A;
16525
16525
  }, t.prototype.dispose = function() {
16526
16526
  this.disposed = !0, this.tileset.reset(), this.tileset.root.children.length = 0, /^blob\:/.test(this.tileset.id) && URL.revokeObjectURL(this.tileset.id), this.remove.apply(this, this.children), this.refined = !1, this.loaded = !1, this.refineProgress[0] = this.refineProgress[1] = 0, this.error = null, this.onError = void 0, this.renderer = void 0;
@@ -16978,8 +16978,8 @@ var BufferGeometryUtils = {
16978
16978
  var p = new THREE.Vector3(), m = new THREE.Vector3(), A = new THREE.Vector3(), g = new THREE.Vector2(), y = new THREE.Vector2(), v = new THREE.Vector2(), E = new THREE.Vector3(), T = new THREE.Vector3();
16979
16979
  function b(V, J, U) {
16980
16980
  p.fromArray(o, V * 3), m.fromArray(o, J * 3), A.fromArray(o, U * 3), g.fromArray(u, V * 2), y.fromArray(u, J * 2), v.fromArray(u, U * 2);
16981
- var q = m.x - p.x, G = A.x - p.x, Z = m.y - p.y, W = A.y - p.y, ee = m.z - p.z, X = A.z - p.z, K = y.x - g.x, $ = v.x - g.x, re = y.y - g.y, te = v.y - g.y, ne = 1 / (K * te - $ * re);
16982
- E.set((te * q - re * G) * ne, (te * Z - re * W) * ne, (te * ee - re * X) * ne), T.set((K * G - $ * q) * ne, (K * W - $ * Z) * ne, (K * X - $ * ee) * ne), f[V].add(E), f[J].add(E), f[U].add(E), d[V].add(T), d[J].add(T), d[U].add(T);
16981
+ var q = m.x - p.x, G = A.x - p.x, Z = m.y - p.y, W = A.y - p.y, ee = m.z - p.z, X = A.z - p.z, K = y.x - g.x, $ = v.x - g.x, te = y.y - g.y, re = v.y - g.y, ne = 1 / (K * re - $ * te);
16982
+ E.set((re * q - te * G) * ne, (re * Z - te * W) * ne, (re * ee - te * X) * ne), T.set((K * G - $ * q) * ne, (K * W - $ * Z) * ne, (K * X - $ * ee) * ne), f[V].add(E), f[J].add(E), f[U].add(E), d[V].add(T), d[J].add(T), d[U].add(T);
16983
16983
  }
16984
16984
  var S = n.groups;
16985
16985
  S.length === 0 && (S = [{
@@ -16987,15 +16987,15 @@ var BufferGeometryUtils = {
16987
16987
  count: r.length
16988
16988
  }]);
16989
16989
  for (var h = 0, R = S.length; h < R; ++h)
16990
- for (var C = S[h], w = C.start, I = C.count, B = w, M = w + I; B < M; B += 3)
16991
- b(r[B + 0], r[B + 1], r[B + 2]);
16992
- var P = new THREE.Vector3(), O = new THREE.Vector3(), L = new THREE.Vector3(), F = new THREE.Vector3(), D, k, j;
16990
+ for (var C = S[h], w = C.start, I = C.count, P = w, M = w + I; P < M; P += 3)
16991
+ b(r[P + 0], r[P + 1], r[P + 2]);
16992
+ var B = new THREE.Vector3(), O = new THREE.Vector3(), L = new THREE.Vector3(), F = new THREE.Vector3(), D, k, j;
16993
16993
  function z(V) {
16994
- L.fromArray(s, V * 3), F.copy(L), k = f[V], P.copy(k), P.sub(L.multiplyScalar(L.dot(k))).normalize(), O.crossVectors(F, k), j = O.dot(d[V]), D = j < 0 ? -1 : 1, c[V * 4] = P.x, c[V * 4 + 1] = P.y, c[V * 4 + 2] = P.z, c[V * 4 + 3] = D;
16994
+ L.fromArray(s, V * 3), F.copy(L), k = f[V], B.copy(k), B.sub(L.multiplyScalar(L.dot(k))).normalize(), O.crossVectors(F, k), j = O.dot(d[V]), D = j < 0 ? -1 : 1, c[V * 4] = B.x, c[V * 4 + 1] = B.y, c[V * 4 + 2] = B.z, c[V * 4 + 3] = D;
16995
16995
  }
16996
16996
  for (var h = 0, R = S.length; h < R; ++h)
16997
- for (var C = S[h], w = C.start, I = C.count, B = w, M = w + I; B < M; B += 3)
16998
- z(r[B + 0]), z(r[B + 1]), z(r[B + 2]);
16997
+ for (var C = S[h], w = C.start, I = C.count, P = w, M = w + I; P < M; P += 3)
16998
+ z(r[P + 0]), z(r[P + 1]), z(r[P + 2]);
16999
16999
  },
17000
17000
  /**
17001
17001
  * @param {Array<THREE.BufferGeometry>} geometries
@@ -17130,10 +17130,10 @@ var BufferGeometryUtils = {
17130
17130
  else {
17131
17131
  for (var b = 0, m = l.length; b < m; b++)
17132
17132
  for (var A = l[b], S = n.getAttribute(A), g = n.morphAttributes[A], R = S.itemSize, w = c[A], I = f[A], C = 0; C < R; C++) {
17133
- var B = h[C];
17134
- if (w.push(S[B](E)), g)
17135
- for (var M = 0, P = g.length; M < P; M++)
17136
- I[M].push(g[M][B](E));
17133
+ var P = h[C];
17134
+ if (w.push(S[P](E)), g)
17135
+ for (var M = 0, B = g.length; M < B; M++)
17136
+ I[M].push(g[M][P](E));
17137
17137
  }
17138
17138
  e[T] = u, d.push(u), u++;
17139
17139
  }
@@ -17173,12 +17173,12 @@ function getEdgesBySphere(n, t, e) {
17173
17173
  E.push(R);
17174
17174
  }
17175
17175
  for (var b = 0, S = v.length; b < S; b += 3) {
17176
- var C = v[b], w = v[b + 1], I = v[b + 2], B = new THREE.Vector3().crossVectors(E[w].clone().sub(E[C]), E[I].clone().sub(E[C])).normalize();
17177
- T.push({ a: C, b: w, c: I, normal: B });
17176
+ var C = v[b], w = v[b + 1], I = v[b + 2], P = new THREE.Vector3().crossVectors(E[w].clone().sub(E[C]), E[I].clone().sub(E[C])).normalize();
17177
+ T.push({ a: C, b: w, c: I, normal: P });
17178
17178
  }
17179
17179
  for (var M = {}, b = 0, S = T.length; b < S; b++)
17180
- for (var P = T[b], O = 0; O < 3; O++) {
17181
- var L = P[A[O]], F = P[A[(O + 1) % 3]], D = [Math.min(L, F), Math.max(L, F)], k = D[0] + "-" + D[1];
17180
+ for (var B = T[b], O = 0; O < 3; O++) {
17181
+ var L = B[A[O]], F = B[A[(O + 1) % 3]], D = [Math.min(L, F), Math.max(L, F)], k = D[0] + "-" + D[1];
17182
17182
  M[k] === void 0 ? M[k] = { index1: D[0], index2: D[1], face1: b } : M[k].face2 = b;
17183
17183
  }
17184
17184
  for (var k in M) {
@@ -17929,32 +17929,32 @@ function parse(n, t) {
17929
17929
  writable: !1,
17930
17930
  value: Object.freeze(b.allowHosts)
17931
17931
  });
17932
- var B = T.reduce(function(q, G) {
17932
+ var P = T.reduce(function(q, G) {
17933
17933
  return jsonMerge(q, G);
17934
17934
  });
17935
17935
  defineProperty(t, "name", {
17936
17936
  enumerable: !0,
17937
17937
  configurable: !1,
17938
17938
  writable: !1,
17939
- value: String((e = B.name) !== null && e !== void 0 ? e : "Unknown")
17939
+ value: String((e = P.name) !== null && e !== void 0 ? e : "Unknown")
17940
17940
  }), defineProperty(t, "workCode", {
17941
17941
  enumerable: !0,
17942
17942
  writable: !0,
17943
- value: String(B.resource_code || B.basic_code || B.vr_code || B.code || B.project_id || B.work_code || B.workCode || createUuid())
17943
+ value: String(P.resource_code || P.basic_code || P.vr_code || P.code || P.project_id || P.work_code || P.workCode || createUuid())
17944
17944
  }), defineProperty(t, "projectId", {
17945
17945
  enumerable: !0,
17946
17946
  writable: !0,
17947
- value: B.project_id
17947
+ value: P.project_id
17948
17948
  }), defineProperty(t, "baseURL", {
17949
17949
  enumerable: !0,
17950
17950
  writable: !0,
17951
17951
  value: (function() {
17952
- var q, G = (q = B.base_url) !== null && q !== void 0 ? q : "";
17952
+ var q, G = (q = P.base_url) !== null && q !== void 0 ? q : "";
17953
17953
  return G && G[G.length - 1] !== "/" && (G += "/"), G;
17954
17954
  })()
17955
17955
  });
17956
17956
  var M = void 0;
17957
- typeof B.model == "object" && (M = {}, defineProperty(M, "work", {
17957
+ typeof P.model == "object" && (M = {}, defineProperty(M, "work", {
17958
17958
  enumerable: !1,
17959
17959
  configurable: !1,
17960
17960
  writable: !1,
@@ -17964,7 +17964,7 @@ function parse(n, t) {
17964
17964
  configurable: !1,
17965
17965
  writable: !1,
17966
17966
  value: (function() {
17967
- var q = B.model.file_url;
17967
+ var q = P.model.file_url;
17968
17968
  if (q)
17969
17969
  return relativeURL(q, t.baseURL);
17970
17970
  })()
@@ -17973,7 +17973,7 @@ function parse(n, t) {
17973
17973
  configurable: !1,
17974
17974
  writable: !1,
17975
17975
  value: (function() {
17976
- var q = B.model.material_base_url;
17976
+ var q = P.model.material_base_url;
17977
17977
  return q && (q = relativeURL(q, t.baseURL)), q;
17978
17978
  })()
17979
17979
  }), defineProperty(M, "textures", {
@@ -17982,7 +17982,7 @@ function parse(n, t) {
17982
17982
  writable: !1,
17983
17983
  value: (function() {
17984
17984
  var q = void 0;
17985
- return Array.isArray(B.model.material_textures) && (q = B.model.material_textures.slice(), Object.freeze(q)), q;
17985
+ return Array.isArray(P.model.material_textures) && (q = P.model.material_textures.slice(), Object.freeze(q)), q;
17986
17986
  })()
17987
17987
  }), defineProperty(M, "layers", {
17988
17988
  enumerable: !0,
@@ -17990,8 +17990,8 @@ function parse(n, t) {
17990
17990
  writable: !1,
17991
17991
  value: (function() {
17992
17992
  var q, G, Z, W = [];
17993
- if (Array.isArray(B.model.layers))
17994
- for (var ee = 0, X = B.model.layers; ee < X.length; ee++) {
17993
+ if (Array.isArray(P.model.layers))
17994
+ for (var ee = 0, X = P.model.layers; ee < X.length; ee++) {
17995
17995
  var K = X[ee];
17996
17996
  if (K && K.tileset_url) {
17997
17997
  var $ = {};
@@ -18023,8 +18023,8 @@ function parse(n, t) {
18023
18023
  }), W.push($);
18024
18024
  }
18025
18025
  }
18026
- if (typeof B.model.tiles == "object") {
18027
- var K = B.model.tiles;
18026
+ if (typeof P.model.tiles == "object") {
18027
+ var K = P.model.tiles;
18028
18028
  if (K && K.tileset_url) {
18029
18029
  var $ = {};
18030
18030
  defineProperty($, "work", {
@@ -18063,9 +18063,9 @@ function parse(n, t) {
18063
18063
  writable: !1,
18064
18064
  value: M
18065
18065
  });
18066
- var P = [];
18067
- if (Array.isArray(B.observers) && B.panorama && Array.isArray(B.panorama.list || B.panorama.info))
18068
- for (var O = B.observers, L = (r = B.panorama.list || B.panorama.info) !== null && r !== void 0 ? r : [], F = (f = (l = (s = (o = B.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = B.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = B.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", D = Math.min(O.length, L.length), k = function(q) {
18066
+ var B = [];
18067
+ if (Array.isArray(P.observers) && P.panorama && Array.isArray(P.panorama.list || P.panorama.info))
18068
+ for (var O = P.observers, L = (r = P.panorama.list || P.panorama.info) !== null && r !== void 0 ? r : [], F = (f = (l = (s = (o = P.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = P.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = P.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", D = Math.min(O.length, L.length), k = function(q) {
18069
18069
  var G = O[q], Z = L[q], W = {};
18070
18070
  defineProperty(W, "work", {
18071
18071
  enumerable: !1,
@@ -18142,8 +18142,8 @@ function parse(n, t) {
18142
18142
  configurable: !1,
18143
18143
  writable: !1,
18144
18144
  value: (function() {
18145
- var ee, X, K = ((X = (ee = G.accessible_nodes) !== null && ee !== void 0 ? ee : G.accessibleNodes) !== null && X !== void 0 ? X : []).filter(function(re) {
18146
- return re < D;
18145
+ var ee, X, K = ((X = (ee = G.accessible_nodes) !== null && ee !== void 0 ? ee : G.accessibleNodes) !== null && X !== void 0 ? X : []).filter(function(te) {
18146
+ return te < D;
18147
18147
  });
18148
18148
  if (K.length === 0)
18149
18149
  for (var $ = 0; $ < D; $++)
@@ -18155,8 +18155,8 @@ function parse(n, t) {
18155
18155
  configurable: !1,
18156
18156
  writable: !1,
18157
18157
  value: (function() {
18158
- var ee, X, K = ((X = (ee = G.visible_nodes) !== null && ee !== void 0 ? ee : G.visibleNodes) !== null && X !== void 0 ? X : []).filter(function(re) {
18159
- return re < D;
18158
+ var ee, X, K = ((X = (ee = G.visible_nodes) !== null && ee !== void 0 ? ee : G.visibleNodes) !== null && X !== void 0 ? X : []).filter(function(te) {
18159
+ return te < D;
18160
18160
  });
18161
18161
  if (K.length === 0)
18162
18162
  for (var $ = 0; $ < D; $++)
@@ -18189,23 +18189,23 @@ function parse(n, t) {
18189
18189
  configurable: !1,
18190
18190
  writable: !1,
18191
18191
  value: (function() {
18192
- var re = getImageSizeFromURL(ee[FACE_ORDER$1[0]]);
18193
- if (re) {
18192
+ var te = getImageSizeFromURL(ee[FACE_ORDER$1[0]]);
18193
+ if (te) {
18194
18194
  if (Z.size_list) {
18195
- var te = Z.size_list.slice().sort(function(ve, Ae) {
18196
- return ve - Ae;
18195
+ var re = Z.size_list.slice().sort(function(pe, Ae) {
18196
+ return pe - Ae;
18197
18197
  });
18198
- return Object.freeze(te);
18198
+ return Object.freeze(re);
18199
18199
  } else if (Z.tiles) {
18200
- for (var te = [
18201
- re
18200
+ for (var re = [
18201
+ te
18202
18202
  ], ne = Z.tiles.slice().sort(function(Ae, ie) {
18203
18203
  return Ae - ie;
18204
- }), fe = 0, le = ne; fe < le.length; fe++) {
18205
- var ue = le[fe], pe = 512 * Math.pow(2, ue);
18206
- pe > re && te.push(pe);
18204
+ }), de = 0, ue = ne; de < ue.length; de++) {
18205
+ var fe = ue[de], me = 512 * Math.pow(2, fe);
18206
+ me > te && re.push(me);
18207
18207
  }
18208
- return Object.freeze(te);
18208
+ return Object.freeze(re);
18209
18209
  }
18210
18210
  }
18211
18211
  return Object.freeze([]);
@@ -18215,18 +18215,18 @@ function parse(n, t) {
18215
18215
  configurable: !1,
18216
18216
  writable: !1,
18217
18217
  value: (function() {
18218
- var re = getImageSizeFromURL(ee.front);
18219
- if (re) {
18220
- var te = ee.sizeList.slice();
18221
- if (te[0]) {
18222
- var ne = getTileLevel(te[0]);
18218
+ var te = getImageSizeFromURL(ee.front);
18219
+ if (te) {
18220
+ var re = ee.sizeList.slice();
18221
+ if (re[0]) {
18222
+ var ne = getTileLevel(re[0]);
18223
18223
  if (ne)
18224
- for (var fe = ne - 1; fe >= 0; fe--)
18225
- te.unshift(512 * Math.pow(2, fe));
18224
+ for (var de = ne - 1; de >= 0; de--)
18225
+ re.unshift(512 * Math.pow(2, de));
18226
18226
  }
18227
- if (!(te.length <= 0)) {
18228
- for (var le = [], ue = 0, pe = te; ue < pe.length; ue++) {
18229
- var ve = pe[ue], Ae = getTileLevel(ve);
18227
+ if (!(re.length <= 0)) {
18228
+ for (var ue = [], fe = 0, me = re; fe < me.length; fe++) {
18229
+ var pe = me[fe], Ae = getTileLevel(pe);
18230
18230
  if (typeof Ae == "number") {
18231
18231
  var ie = {};
18232
18232
  if (defineProperty(ie, "work", {
@@ -18239,25 +18239,25 @@ function parse(n, t) {
18239
18239
  configurable: !1,
18240
18240
  writable: !1,
18241
18241
  value: Ae
18242
- }), ve > re) {
18242
+ }), pe > te) {
18243
18243
  defineProperty(ie, "size", {
18244
18244
  enumerable: !0,
18245
18245
  configurable: !1,
18246
18246
  writable: !1,
18247
- value: ve
18247
+ value: pe
18248
18248
  }), defineProperty(ie, "scale", {
18249
18249
  enumerable: !0,
18250
18250
  configurable: !1,
18251
18251
  writable: !1,
18252
18252
  value: 1
18253
18253
  });
18254
- for (var ye = 0, ce = FACE_ORDER$1; ye < ce.length; ye++) {
18255
- var se = ce[ye];
18254
+ for (var ye = 0, le = FACE_ORDER$1; ye < le.length; ye++) {
18255
+ var se = le[ye];
18256
18256
  defineProperty(ie, se, {
18257
18257
  enumerable: !0,
18258
18258
  configurable: !1,
18259
18259
  writable: !1,
18260
- value: replaceImageSize(ee[se], ve)
18260
+ value: replaceImageSize(ee[se], pe)
18261
18261
  });
18262
18262
  }
18263
18263
  } else {
@@ -18265,12 +18265,12 @@ function parse(n, t) {
18265
18265
  enumerable: !0,
18266
18266
  configurable: !1,
18267
18267
  writable: !1,
18268
- value: re
18268
+ value: te
18269
18269
  }), defineProperty(ie, "scale", {
18270
18270
  enumerable: !0,
18271
18271
  configurable: !1,
18272
18272
  writable: !1,
18273
- value: ve / re
18273
+ value: pe / te
18274
18274
  });
18275
18275
  for (var he = 0, Te = FACE_ORDER$1; he < Te.length; he++) {
18276
18276
  var se = Te[he];
@@ -18282,10 +18282,10 @@ function parse(n, t) {
18282
18282
  });
18283
18283
  }
18284
18284
  }
18285
- le.push(ie);
18285
+ ue.push(ie);
18286
18286
  }
18287
18287
  }
18288
- return le = sortTile(le), Object.freeze(le);
18288
+ return ue = sortTile(ue), Object.freeze(ue);
18289
18289
  }
18290
18290
  }
18291
18291
  })()
@@ -18319,14 +18319,14 @@ function parse(n, t) {
18319
18319
  value: new THREE.Vector2().fromArray(Z.video.size)
18320
18320
  })), ee;
18321
18321
  })()
18322
- }), P.push(W);
18322
+ }), B.push(W);
18323
18323
  }, j = 0; j < D; j++)
18324
18324
  k(j);
18325
18325
  defineProperty(t, "observers", {
18326
18326
  enumerable: !0,
18327
18327
  configurable: !1,
18328
18328
  writable: !1,
18329
- value: Object.freeze(P)
18329
+ value: Object.freeze(B)
18330
18330
  });
18331
18331
  var z = {};
18332
18332
  if (defineProperty(z, "work", {
@@ -18334,19 +18334,19 @@ function parse(n, t) {
18334
18334
  configurable: !1,
18335
18335
  writable: !1,
18336
18336
  value: t
18337
- }), B.initial) {
18337
+ }), P.initial) {
18338
18338
  if (t.observers.length > 0) {
18339
18339
  var V = void 0;
18340
- isNumber(B.initial.panoIndex) ? V = B.initial.panoIndex : isNumber(B.initial.pano_index) ? V = B.initial.pano_index : isNumber(B.initial.pano) && (V = B.initial.pano), typeof V == "number" && (V = clamp$1(V, 0, t.observers.length - 1), defineProperty(z, "panoIndex", {
18340
+ isNumber(P.initial.panoIndex) ? V = P.initial.panoIndex : isNumber(P.initial.pano_index) ? V = P.initial.pano_index : isNumber(P.initial.pano) && (V = P.initial.pano), typeof V == "number" && (V = clamp$1(V, 0, t.observers.length - 1), defineProperty(z, "panoIndex", {
18341
18341
  enumerable: !0,
18342
18342
  writable: !0,
18343
18343
  value: V
18344
18344
  }));
18345
18345
  }
18346
- if (B.initial.mode === "Panorama" && t.observers.length === 0 || B.initial.mode === "Floorplan" || B.initial.mode === "Topview" || B.initial.mode === "Model" || B.initial.mode === "Mapview" ? defineProperty(z, "mode", {
18346
+ if (P.initial.mode === "Panorama" && t.observers.length === 0 || P.initial.mode === "Floorplan" || P.initial.mode === "Topview" || P.initial.mode === "Model" || P.initial.mode === "Mapview" ? defineProperty(z, "mode", {
18347
18347
  enumerable: !0,
18348
18348
  writable: !0,
18349
- value: B.initial.mode
18349
+ value: P.initial.mode
18350
18350
  }) : typeof z.panoIndex == "number" ? defineProperty(z, "mode", {
18351
18351
  enumerable: !0,
18352
18352
  writable: !0,
@@ -18355,28 +18355,28 @@ function parse(n, t) {
18355
18355
  enumerable: !0,
18356
18356
  writable: !0,
18357
18357
  value: "Mapview"
18358
- }), isNumber(B.initial.latitude) && defineProperty(z, "latitude", {
18358
+ }), isNumber(P.initial.latitude) && defineProperty(z, "latitude", {
18359
18359
  enumerable: !0,
18360
18360
  writable: !0,
18361
- value: B.initial.latitude
18362
- }), isNumber(B.initial.longitude) ? defineProperty(z, "longitude", {
18361
+ value: P.initial.latitude
18362
+ }), isNumber(P.initial.longitude) ? defineProperty(z, "longitude", {
18363
18363
  enumerable: !0,
18364
18364
  writable: !0,
18365
- value: B.initial.longitude
18366
- }) : isNumber(B.initial.heading) && defineProperty(z, "longitude", {
18365
+ value: P.initial.longitude
18366
+ }) : isNumber(P.initial.heading) && defineProperty(z, "longitude", {
18367
18367
  enumerable: !0,
18368
18368
  writable: !0,
18369
- value: headingToLongitude(B.initial.heading)
18370
- }), isNumber(B.initial.fov) && defineProperty(z, "fov", {
18369
+ value: headingToLongitude(P.initial.heading)
18370
+ }), isNumber(P.initial.fov) && defineProperty(z, "fov", {
18371
18371
  enumerable: !0,
18372
18372
  writable: !0,
18373
- value: B.initial.fov
18374
- }), isNumber(B.initial.distance) && defineProperty(z, "distance", {
18373
+ value: P.initial.fov
18374
+ }), isNumber(P.initial.distance) && defineProperty(z, "distance", {
18375
18375
  enumerable: !0,
18376
18376
  writable: !0,
18377
- value: B.initial.distance
18378
- }), Array.isArray(B.initial.offset)) {
18379
- var J = B.initial.offset, U = [0, 0, 0].map(function(q, G) {
18377
+ value: P.initial.distance
18378
+ }), Array.isArray(P.initial.offset)) {
18379
+ var J = P.initial.offset, U = [0, 0, 0].map(function(q, G) {
18380
18380
  var Z = Number(J[G]);
18381
18381
  return isNaN(Z) || !isFinite(Z) ? 0 : Z;
18382
18382
  });
@@ -18385,13 +18385,13 @@ function parse(n, t) {
18385
18385
  writable: !0,
18386
18386
  value: new THREE.Vector3().fromArray(U)
18387
18387
  });
18388
- } else typeof B.initial.offset == "object" && typeof B.initial.offset.x == "number" && typeof B.initial.offset.y == "number" && typeof B.initial.offset.z == "number" && defineProperty(z, "offset", {
18388
+ } else typeof P.initial.offset == "object" && typeof P.initial.offset.x == "number" && typeof P.initial.offset.y == "number" && typeof P.initial.offset.z == "number" && defineProperty(z, "offset", {
18389
18389
  enumerable: !0,
18390
18390
  writable: !0,
18391
18391
  value: new THREE.Vector3().fromArray([
18392
- B.initial.offset.x,
18393
- B.initial.offset.y,
18394
- B.initial.offset.z
18392
+ P.initial.offset.x,
18393
+ P.initial.offset.y,
18394
+ P.initial.offset.z
18395
18395
  ])
18396
18396
  });
18397
18397
  }
@@ -20170,7 +20170,7 @@ var Hammer = (function(n, t, e, r) {
20170
20170
  function I(H) {
20171
20171
  return H.trim().split(/\s+/g);
20172
20172
  }
20173
- function B(H, _, N) {
20173
+ function P(H, _, N) {
20174
20174
  if (H.indexOf && !N)
20175
20175
  return H.indexOf(_);
20176
20176
  for (var Q = 0; Q < H.length; ) {
@@ -20183,10 +20183,10 @@ var Hammer = (function(n, t, e, r) {
20183
20183
  function M(H) {
20184
20184
  return Array.prototype.slice.call(H, 0);
20185
20185
  }
20186
- function P(H, _, N) {
20186
+ function B(H, _, N) {
20187
20187
  for (var Q = [], Y = [], ae = 0; ae < H.length; ) {
20188
20188
  var be = H[ae][_];
20189
- B(Y, be) < 0 && Q.push(H[ae]), Y[ae] = be, ae++;
20189
+ P(Y, be) < 0 && Q.push(H[ae]), Y[ae] = be, ae++;
20190
20190
  }
20191
20191
  return Q = Q.sort(function(Ye, He) {
20192
20192
  return Ye[_] > He[_];
@@ -20208,7 +20208,7 @@ var Hammer = (function(n, t, e, r) {
20208
20208
  var _ = H.ownerDocument || H;
20209
20209
  return _.defaultView || _.parentWindow || n;
20210
20210
  }
20211
- var k = /mobile|tablet|ip(ad|hone|od)|android/i, j = "ontouchstart" in n, z = O(n, "PointerEvent") !== r, V = j && k.test(navigator.userAgent), J = "touch", U = "pen", q = "mouse", G = "kinect", Z = 25, W = 1, ee = 2, X = 4, K = 8, $ = 1, re = 2, te = 4, ne = 8, fe = 16, le = re | te, ue = ne | fe, pe = le | ue, ve = ["x", "y"], Ae = ["clientX", "clientY"];
20211
+ var k = /mobile|tablet|ip(ad|hone|od)|android/i, j = "ontouchstart" in n, z = O(n, "PointerEvent") !== r, V = j && k.test(navigator.userAgent), J = "touch", U = "pen", q = "mouse", G = "kinect", Z = 25, W = 1, ee = 2, X = 4, K = 8, $ = 1, te = 2, re = 4, ne = 8, de = 16, ue = te | re, fe = ne | de, me = ue | fe, pe = ["x", "y"], Ae = ["clientX", "clientY"];
20212
20212
  function ie(H, _) {
20213
20213
  var N = this;
20214
20214
  this.manager = H, this.callback = _, this.element = H.element, this.target = H.options.inputTarget, this.domHandler = function(Q) {
@@ -20237,9 +20237,9 @@ var Hammer = (function(n, t, e, r) {
20237
20237
  };
20238
20238
  function ye(H) {
20239
20239
  var _, N = H.options.inputClass;
20240
- return N ? _ = N : z ? _ = nt : V ? _ = Ke : j ? _ = yt : _ = Pe, new _(H, ce);
20240
+ return N ? _ = N : z ? _ = nt : V ? _ = Ke : j ? _ = yt : _ = Pe, new _(H, le);
20241
20241
  }
20242
- function ce(H, _, N) {
20242
+ function le(H, _, N) {
20243
20243
  var Q = N.pointers.length, Y = N.changedPointers.length, ae = _ & W && Q - Y === 0, be = _ & (X | K) && Q - Y === 0;
20244
20244
  N.isFirst = !!ae, N.isFinal = !!be, ae && (H.session = {}), N.eventType = _, se(H, N), H.emit("hammer.input", N), H.recognize(N), H.session.prevInput = N;
20245
20245
  }
@@ -20247,7 +20247,7 @@ var Hammer = (function(n, t, e, r) {
20247
20247
  var N = H.session, Q = _.pointers, Y = Q.length;
20248
20248
  N.firstInput || (N.firstInput = Me(_)), Y > 1 && !N.firstMultiple ? N.firstMultiple = Me(_) : Y === 1 && (N.firstMultiple = !1);
20249
20249
  var ae = N.firstInput, be = N.firstMultiple, Ue = be ? be.center : ae.center, Ye = _.center = je(Q);
20250
- _.timeStamp = f(), _.deltaTime = _.timeStamp - ae.timeStamp, _.angle = ge(Ue, Ye), _.distance = me(Ue, Ye), he(N, _), _.offsetDirection = Ne(_.deltaX, _.deltaY);
20250
+ _.timeStamp = f(), _.deltaTime = _.timeStamp - ae.timeStamp, _.angle = ge(Ue, Ye), _.distance = ve(Ue, Ye), he(N, _), _.offsetDirection = Ne(_.deltaX, _.deltaY);
20251
20251
  var He = _e(_.deltaTime, _.deltaX, _.deltaY);
20252
20252
  _.overallVelocityX = He.x, _.overallVelocityY = He.y, _.overallVelocity = c(He.x) > c(He.y) ? He.x : He.y, _.scale = be ? Se(be.pointers, Q) : 1, _.rotation = be ? ke(be.pointers, Q) : 0, _.maxPointers = N.prevInput ? _.pointers.length > N.prevInput.maxPointers ? _.pointers.length : N.prevInput.maxPointers : _.pointers.length, Te(N, _);
20253
20253
  var xt = H.element;
@@ -20307,15 +20307,15 @@ var Hammer = (function(n, t, e, r) {
20307
20307
  };
20308
20308
  }
20309
20309
  function Ne(H, _) {
20310
- return H === _ ? $ : c(H) >= c(_) ? H < 0 ? re : te : _ < 0 ? ne : fe;
20310
+ return H === _ ? $ : c(H) >= c(_) ? H < 0 ? te : re : _ < 0 ? ne : de;
20311
20311
  }
20312
- function me(H, _, N) {
20313
- N || (N = ve);
20312
+ function ve(H, _, N) {
20313
+ N || (N = pe);
20314
20314
  var Q = _[N[0]] - H[N[0]], Y = _[N[1]] - H[N[1]];
20315
20315
  return Math.sqrt(Q * Q + Y * Y);
20316
20316
  }
20317
20317
  function ge(H, _, N) {
20318
- N || (N = ve);
20318
+ N || (N = pe);
20319
20319
  var Q = _[N[0]] - H[N[0]], Y = _[N[1]] - H[N[1]];
20320
20320
  return Math.atan2(Y, Q) * 180 / Math.PI;
20321
20321
  }
@@ -20323,7 +20323,7 @@ var Hammer = (function(n, t, e, r) {
20323
20323
  return ge(_[1], _[0], Ae) + ge(H[1], H[0], Ae);
20324
20324
  }
20325
20325
  function Se(H, _) {
20326
- return me(_[0], _[1], Ae) / me(H[0], H[1], Ae);
20326
+ return ve(_[0], _[1], Ae) / ve(H[0], H[1], Ae);
20327
20327
  }
20328
20328
  var Ge = {
20329
20329
  mousedown: W,
@@ -20371,7 +20371,7 @@ var Hammer = (function(n, t, e, r) {
20371
20371
  * @param {Object} ev
20372
20372
  */
20373
20373
  handler: function(_) {
20374
- var N = this.store, Q = !1, Y = !1, ae = _.type.toLowerCase().replace("ms", ""), be = Fe[ae], Ue = Be[_.pointerType] || _.pointerType, Ye = Ue == J, He = B(N, _.pointerId, "pointerId");
20374
+ var N = this.store, Q = !1, Y = !1, ae = _.type.toLowerCase().replace("ms", ""), be = Fe[ae], Ue = Be[_.pointerType] || _.pointerType, Ye = Ue == J, He = P(N, _.pointerId, "pointerId");
20375
20375
  be & W && (_.button === 0 || _.button === 2 || Ye) ? He < 0 && (N.push(_), He = N.length - 1) : be & (X | K) ? Q = !0 : !Ye && _.buttons === 0 && (Q = !0, Y = !0, be = Fe.pointerup), !(He < 0) && (Y || (N[He] = _), this.callback(this.manager, be, {
20376
20376
  pointers: N,
20377
20377
  changedPointers: [_],
@@ -20405,7 +20405,7 @@ var Hammer = (function(n, t, e, r) {
20405
20405
  });
20406
20406
  function Qe(H, _) {
20407
20407
  var N = M(H.touches), Q = M(H.changedTouches);
20408
- return _ & (X | K) && (N = P(N.concat(Q), "identifier")), [N, Q];
20408
+ return _ & (X | K) && (N = B(N.concat(Q), "identifier")), [N, Q];
20409
20409
  }
20410
20410
  var at = {
20411
20411
  touchstart: W,
@@ -20442,7 +20442,7 @@ var Hammer = (function(n, t, e, r) {
20442
20442
  if (Ue.length)
20443
20443
  return [
20444
20444
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
20445
- P(ae.concat(Ue), "identifier"),
20445
+ B(ae.concat(Ue), "identifier"),
20446
20446
  Ue
20447
20447
  ];
20448
20448
  }
@@ -20499,7 +20499,7 @@ var Hammer = (function(n, t, e, r) {
20499
20499
  }
20500
20500
  return !1;
20501
20501
  }
20502
- var st = s ? O(s.style, "touchAction") : r, de = st !== r, Ee = "compute", Re = "auto", Oe = "manipulation", Le = "none", ut = "pan-x", lt = "pan-y", Xe = Ft();
20502
+ var st = s ? O(s.style, "touchAction") : r, ce = st !== r, Ee = "compute", Re = "auto", Oe = "manipulation", Le = "none", ut = "pan-x", lt = "pan-y", Xe = Ft();
20503
20503
  function $e(H, _) {
20504
20504
  this.manager = H, this.set(_);
20505
20505
  }
@@ -20509,7 +20509,7 @@ var Hammer = (function(n, t, e, r) {
20509
20509
  * @param {String} value
20510
20510
  */
20511
20511
  set: function(H) {
20512
- H == Ee && (H = this.compute()), de && this.manager.element.style && Xe[H] && (this.manager.element.style[st] = H), this.actions = H.toLowerCase().trim();
20512
+ H == Ee && (H = this.compute()), ce && this.manager.element.style && Xe[H] && (this.manager.element.style[st] = H), this.actions = H.toLowerCase().trim();
20513
20513
  },
20514
20514
  /**
20515
20515
  * just re-set the touchAction value
@@ -20543,7 +20543,7 @@ var Hammer = (function(n, t, e, r) {
20543
20543
  if (Ue && Ye && He)
20544
20544
  return;
20545
20545
  }
20546
- if (!(be && ae) && (Y || ae && N & le || be && N & ue))
20546
+ if (!(be && ae) && (Y || ae && N & ue || be && N & fe))
20547
20547
  return this.preventSrc(_);
20548
20548
  },
20549
20549
  /**
@@ -20561,7 +20561,7 @@ var Hammer = (function(n, t, e, r) {
20561
20561
  return _ && N ? Le : _ || N ? _ ? ut : lt : w(H, Oe) ? Oe : Re;
20562
20562
  }
20563
20563
  function Ft() {
20564
- if (!de)
20564
+ if (!ce)
20565
20565
  return !1;
20566
20566
  var H = {}, _ = n.CSS && n.CSS.supports;
20567
20567
  return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(N) {
@@ -20614,7 +20614,7 @@ var Hammer = (function(n, t, e, r) {
20614
20614
  if (h(H, "requireFailure", this))
20615
20615
  return this;
20616
20616
  var _ = this.requireFail;
20617
- return H = Bt(H, this), B(_, H) === -1 && (_.push(H), H.requireFailure(this)), this;
20617
+ return H = Bt(H, this), P(_, H) === -1 && (_.push(H), H.requireFailure(this)), this;
20618
20618
  },
20619
20619
  /**
20620
20620
  * drop the requireFailure link. it does not remove the link on the other recognizer.
@@ -20625,7 +20625,7 @@ var Hammer = (function(n, t, e, r) {
20625
20625
  if (h(H, "dropRequireFailure", this))
20626
20626
  return this;
20627
20627
  H = Bt(H, this);
20628
- var _ = B(this.requireFail, H);
20628
+ var _ = P(this.requireFail, H);
20629
20629
  return _ > -1 && this.requireFail.splice(_, 1), this;
20630
20630
  },
20631
20631
  /**
@@ -20719,7 +20719,7 @@ var Hammer = (function(n, t, e, r) {
20719
20719
  return H & mt ? "cancel" : H & Tt ? "end" : H & It ? "move" : H & ct ? "start" : "";
20720
20720
  }
20721
20721
  function Lt(H) {
20722
- return H == fe ? "down" : H == ne ? "up" : H == re ? "left" : H == te ? "right" : "";
20722
+ return H == de ? "down" : H == ne ? "up" : H == te ? "left" : H == re ? "right" : "";
20723
20723
  }
20724
20724
  function Bt(H, _) {
20725
20725
  var N = _.manager;
@@ -20773,15 +20773,15 @@ var Hammer = (function(n, t, e, r) {
20773
20773
  event: "pan",
20774
20774
  threshold: 10,
20775
20775
  pointers: 1,
20776
- direction: pe
20776
+ direction: me
20777
20777
  },
20778
20778
  getTouchAction: function() {
20779
20779
  var H = this.options.direction, _ = [];
20780
- return H & le && _.push(lt), H & ue && _.push(ut), _;
20780
+ return H & ue && _.push(lt), H & fe && _.push(ut), _;
20781
20781
  },
20782
20782
  directionTest: function(H) {
20783
20783
  var _ = this.options, N = !0, Q = H.distance, Y = H.direction, ae = H.deltaX, be = H.deltaY;
20784
- return Y & _.direction || (_.direction & le ? (Y = ae === 0 ? $ : ae < 0 ? re : te, N = ae != this.pX, Q = Math.abs(H.deltaX)) : (Y = be === 0 ? $ : be < 0 ? ne : fe, N = be != this.pY, Q = Math.abs(H.deltaY))), H.direction = Y, N && Q > _.threshold && Y & _.direction;
20784
+ return Y & _.direction || (_.direction & ue ? (Y = ae === 0 ? $ : ae < 0 ? te : re, N = ae != this.pX, Q = Math.abs(H.deltaX)) : (Y = be === 0 ? $ : be < 0 ? ne : de, N = be != this.pY, Q = Math.abs(H.deltaY))), H.direction = Y, N && Q > _.threshold && Y & _.direction;
20785
20785
  },
20786
20786
  attrTest: function(H) {
20787
20787
  return tt.prototype.attrTest.call(this, H) && (this.state & ct || !(this.state & ct) && this.directionTest(H));
@@ -20889,7 +20889,7 @@ var Hammer = (function(n, t, e, r) {
20889
20889
  event: "swipe",
20890
20890
  threshold: 10,
20891
20891
  velocity: 0.3,
20892
- direction: le | ue,
20892
+ direction: ue | fe,
20893
20893
  pointers: 1
20894
20894
  },
20895
20895
  getTouchAction: function() {
@@ -20897,7 +20897,7 @@ var Hammer = (function(n, t, e, r) {
20897
20897
  },
20898
20898
  attrTest: function(H) {
20899
20899
  var _ = this.options.direction, N;
20900
- return _ & (le | ue) ? N = H.overallVelocity : _ & le ? N = H.overallVelocityX : _ & ue && (N = H.overallVelocityY), this._super.attrTest.call(this, H) && _ & H.offsetDirection && H.distance > this.options.threshold && H.maxPointers == this.options.pointers && c(N) > this.options.velocity && H.eventType & X;
20900
+ return _ & (ue | fe) ? N = H.overallVelocity : _ & ue ? N = H.overallVelocityX : _ & fe && (N = H.overallVelocityY), this._super.attrTest.call(this, H) && _ & H.offsetDirection && H.distance > this.options.threshold && H.maxPointers == this.options.pointers && c(N) > this.options.velocity && H.eventType & X;
20901
20901
  },
20902
20902
  emit: function(H) {
20903
20903
  var _ = Lt(H.offsetDirection);
@@ -20935,7 +20935,7 @@ var Hammer = (function(n, t, e, r) {
20935
20935
  if (Q && Y && N) {
20936
20936
  if (H.eventType != X)
20937
20937
  return this.failTimeout();
20938
- var ae = this.pTime ? H.timeStamp - this.pTime < _.interval : !0, be = !this.pCenter || me(this.pCenter, H.center) < _.posThreshold;
20938
+ var ae = this.pTime ? H.timeStamp - this.pTime < _.interval : !0, be = !this.pCenter || ve(this.pCenter, H.center) < _.posThreshold;
20939
20939
  this.pTime = H.timeStamp, this.pCenter = H.center, !be || !ae ? this.count = 1 : this.count += 1, this._input = H;
20940
20940
  var Ue = this.count % _.taps;
20941
20941
  if (Ue === 0)
@@ -21003,8 +21003,8 @@ var Hammer = (function(n, t, e, r) {
21003
21003
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
21004
21004
  [oe, { enable: !1 }],
21005
21005
  [wt, { enable: !1 }, ["rotate"]],
21006
- [we, { direction: le }],
21007
- [dt, { direction: le }, ["swipe"]],
21006
+ [we, { direction: ue }],
21007
+ [dt, { direction: ue }, ["swipe"]],
21008
21008
  [Ce],
21009
21009
  [Ce, { event: "doubletap", taps: 2 }, ["tap"]],
21010
21010
  [Ct]
@@ -21133,7 +21133,7 @@ var Hammer = (function(n, t, e, r) {
21133
21133
  if (h(H, "remove", this))
21134
21134
  return this;
21135
21135
  if (H = this.get(H), H) {
21136
- var _ = this.recognizers, N = B(_, H);
21136
+ var _ = this.recognizers, N = P(_, H);
21137
21137
  N !== -1 && (_.splice(N, 1), this.touchAction.update());
21138
21138
  }
21139
21139
  return this;
@@ -21162,7 +21162,7 @@ var Hammer = (function(n, t, e, r) {
21162
21162
  if (H !== r) {
21163
21163
  var N = this.handlers;
21164
21164
  return p(I(H), function(Q) {
21165
- _ ? N[Q] && N[Q].splice(B(N[Q], _), 1) : delete N[Q];
21165
+ _ ? N[Q] && N[Q].splice(P(N[Q], _), 1) : delete N[Q];
21166
21166
  }), this;
21167
21167
  }
21168
21168
  },
@@ -21216,13 +21216,13 @@ var Hammer = (function(n, t, e, r) {
21216
21216
  STATE_CANCELLED: mt,
21217
21217
  STATE_FAILED: gt,
21218
21218
  DIRECTION_NONE: $,
21219
- DIRECTION_LEFT: re,
21220
- DIRECTION_RIGHT: te,
21219
+ DIRECTION_LEFT: te,
21220
+ DIRECTION_RIGHT: re,
21221
21221
  DIRECTION_UP: ne,
21222
- DIRECTION_DOWN: fe,
21223
- DIRECTION_HORIZONTAL: le,
21224
- DIRECTION_VERTICAL: ue,
21225
- DIRECTION_ALL: pe,
21222
+ DIRECTION_DOWN: de,
21223
+ DIRECTION_HORIZONTAL: ue,
21224
+ DIRECTION_VERTICAL: fe,
21225
+ DIRECTION_ALL: me,
21226
21226
  Manager: qe,
21227
21227
  Input: ie,
21228
21228
  TouchAction: $e,
@@ -21406,11 +21406,11 @@ var BaseController = (
21406
21406
  return o.params.Points = { threshold: 0.1 }, o.firstHitOnly = !0, o.near = r.near, o.far = r.far, o.setFromCamera(e, this.camera), o;
21407
21407
  }, t.prototype.bindEvents = function(e) {
21408
21408
  var r = this, o = function(M) {
21409
- var P = calculateThreeMouse(M, r.element, r.viewport);
21410
- return !(Math.abs(P.x) > 1 || Math.abs(P.y) > 1);
21409
+ var B = calculateThreeMouse(M, r.element, r.viewport);
21410
+ return !(Math.abs(B.x) > 1 || Math.abs(B.y) > 1);
21411
21411
  }, s = new Hammer.Manager(e), u = function(M) {
21412
- var P = M.session;
21413
- return P.firstInput || null;
21412
+ var B = M.session;
21413
+ return B.firstInput || null;
21414
21414
  }, l = new Hammer.Pan({ threshold: 10, pointers: 0 }), c = new Hammer.Tap({ interval: 410 }), f = new Hammer.Pinch({ threshold: 0, pointers: 2 });
21415
21415
  s.add([
21416
21416
  l,
@@ -21418,8 +21418,8 @@ var BaseController = (
21418
21418
  c,
21419
21419
  f
21420
21420
  ]), s.on("panstart pan", function(M) {
21421
- var P = u(s);
21422
- if (!(P && !o(P.center))) {
21421
+ var B = u(s);
21422
+ if (!(B && !o(B.center))) {
21423
21423
  var O = createEvent("gesture.pan", {
21424
21424
  target: M.target,
21425
21425
  pointerType: M.pointerType,
@@ -21460,8 +21460,8 @@ var BaseController = (
21460
21460
  }
21461
21461
  }), s.on("tap", function(M) {
21462
21462
  if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
21463
- var P = u(s);
21464
- if (!(P && !o(P.center))) {
21463
+ var B = u(s);
21464
+ if (!(B && !o(B.center))) {
21465
21465
  var O = createEvent("gesture.tap", {
21466
21466
  target: M.target,
21467
21467
  pointerType: M.pointerType,
@@ -21502,8 +21502,8 @@ var BaseController = (
21502
21502
  }
21503
21503
  }
21504
21504
  }), s.on("pinchstart pinch pinchend", function(M) {
21505
- var P = u(s);
21506
- if (!(P && !o(P.center))) {
21505
+ var B = u(s);
21506
+ if (!(B && !o(B.center))) {
21507
21507
  var O = createEvent("gesture.pinch", {
21508
21508
  target: M.target,
21509
21509
  pointerType: M.pointerType,
@@ -21544,8 +21544,8 @@ var BaseController = (
21544
21544
  }
21545
21545
  }), s.on("dbltap", function(M) {
21546
21546
  if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
21547
- var P = u(s);
21548
- if (!(P && !o(P.center))) {
21547
+ var B = u(s);
21548
+ if (!(B && !o(B.center))) {
21549
21549
  var O = createEvent("gesture.dbltap", {
21550
21550
  target: M.target,
21551
21551
  pointerType: M.pointerType,
@@ -21586,11 +21586,11 @@ var BaseController = (
21586
21586
  }
21587
21587
  }
21588
21588
  });
21589
- var d = null, h = null, p = function(M, P, O) {
21589
+ var d = null, h = null, p = function(M, B, O) {
21590
21590
  var L = {
21591
21591
  x: O.clientX,
21592
21592
  y: O.clientY
21593
- }, F = r.relativeClientPosition(L), D = r.createRaycasterFromCamera(F, r.camera), k = __assign(__assign({}, L), { coords: F, raycaster: D, buttons: O.buttons, delta: 0 }), j = M === "pinchend" ? P : P - O.deltaY / 280, z = createEvent("gesture.pinch", {
21593
+ }, F = r.relativeClientPosition(L), D = r.createRaycasterFromCamera(F, r.camera), k = __assign(__assign({}, L), { coords: F, raycaster: D, buttons: O.buttons, delta: 0 }), j = M === "pinchend" ? B : B - O.deltaY / 280, z = createEvent("gesture.pinch", {
21594
21594
  target: O.target,
21595
21595
  pointerType: "mouse",
21596
21596
  srcEvent: O,
@@ -21608,10 +21608,10 @@ var BaseController = (
21608
21608
  });
21609
21609
  return z;
21610
21610
  }, m = function(M) {
21611
- var P, O = { x: M.clientX, y: M.clientY };
21611
+ var B, O = { x: M.clientX, y: M.clientY };
21612
21612
  if (o(O)) {
21613
21613
  if (M.preventDefault(), M.ctrlKey) {
21614
- var L = (P = d == null ? void 0 : d.prevEvent.scale) !== null && P !== void 0 ? P : 1, F = p(d ? "pinch" : "pinchstart", L, M);
21614
+ var L = (B = d == null ? void 0 : d.prevEvent.scale) !== null && B !== void 0 ? B : 1, F = p(d ? "pinch" : "pinchstart", L, M);
21615
21615
  d === null ? d = {
21616
21616
  firstEvent: F,
21617
21617
  prevEvent: F
@@ -21672,8 +21672,8 @@ var BaseController = (
21672
21672
  g();
21673
21673
  return;
21674
21674
  }
21675
- var P = !1;
21676
- r.mouseMoveState || (P = !0);
21675
+ var B = !1;
21676
+ r.mouseMoveState || (B = !0);
21677
21677
  var O = {
21678
21678
  x: M.clientX,
21679
21679
  y: M.clientY
@@ -21682,7 +21682,7 @@ var BaseController = (
21682
21682
  pointerType: "mouse",
21683
21683
  srcEvent: M,
21684
21684
  pointers: [__assign({}, D)],
21685
- isFirst: P,
21685
+ isFirst: B,
21686
21686
  isFinal: !1,
21687
21687
  scale: 0,
21688
21688
  center: __assign({}, D),
@@ -21709,13 +21709,13 @@ var BaseController = (
21709
21709
  T();
21710
21710
  return;
21711
21711
  }
21712
- var P = !1;
21713
- r.pressState || (P = !0, r.pressState = {
21712
+ var B = !1;
21713
+ r.pressState || (B = !0, r.pressState = {
21714
21714
  event: M,
21715
21715
  timeStamp: now(),
21716
21716
  stop: noop
21717
21717
  });
21718
- var O = now() - r.pressState.timeStamp, L = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst: P, isFinal: !1, center: __assign(__assign({}, r.pressState.event.center), { delta: O }), pointers: r.pressState.event.pointers.map(function(F) {
21718
+ var O = now() - r.pressState.timeStamp, L = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst: B, isFinal: !1, center: __assign(__assign({}, r.pressState.event.center), { delta: O }), pointers: r.pressState.event.pointers.map(function(F) {
21719
21719
  return __assign(__assign({}, F), { delta: O });
21720
21720
  }) }));
21721
21721
  r.onPressGesture(L), r.pressState && (r.pressState.stop = AnimationFrameLoop.shared.add(function(F) {
@@ -21723,10 +21723,10 @@ var BaseController = (
21723
21723
  }, !0, 1));
21724
21724
  }, v = function(M) {
21725
21725
  if (T(), !(M.touches.length > 1 || M.changedTouches.length <= 0)) {
21726
- var P = {
21726
+ var B = {
21727
21727
  x: M.changedTouches[0].clientX,
21728
21728
  y: M.changedTouches[0].clientY
21729
- }, O = r.relativeClientPosition(P), L = r.createRaycasterFromCamera(O, r.camera), F = __assign(__assign({}, P), { coords: O, raycaster: L, buttons: 0, delta: 0 }), D = createEvent("gesture.press", {
21729
+ }, O = r.relativeClientPosition(B), L = r.createRaycasterFromCamera(O, r.camera), F = __assign(__assign({}, B), { coords: O, raycaster: L, buttons: 0, delta: 0 }), D = createEvent("gesture.press", {
21730
21730
  target: M.target,
21731
21731
  pointerType: "touch",
21732
21732
  srcEvent: M,
@@ -21746,10 +21746,10 @@ var BaseController = (
21746
21746
  }
21747
21747
  }, E = function(M) {
21748
21748
  T();
21749
- var P = {
21749
+ var B = {
21750
21750
  x: M.clientX,
21751
21751
  y: M.clientY
21752
- }, O = r.relativeClientPosition(P), L = r.createRaycasterFromCamera(O, r.camera), F = __assign(__assign({}, P), { coords: O, raycaster: L, buttons: M.buttons, delta: 0 }), D = createEvent("gesture.press", {
21752
+ }, O = r.relativeClientPosition(B), L = r.createRaycasterFromCamera(O, r.camera), F = __assign(__assign({}, B), { coords: O, raycaster: L, buttons: M.buttons, delta: 0 }), D = createEvent("gesture.press", {
21753
21753
  target: M.target,
21754
21754
  pointerType: "mouse",
21755
21755
  srcEvent: M,
@@ -21769,13 +21769,13 @@ var BaseController = (
21769
21769
  }, T = function() {
21770
21770
  var M;
21771
21771
  if (r.pressState) {
21772
- var P = now() - r.pressState.timeStamp, O = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: P }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(L) {
21773
- return __assign(__assign({}, L), { delta: P });
21772
+ var B = now() - r.pressState.timeStamp, O = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: B }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(L) {
21773
+ return __assign(__assign({}, L), { delta: B });
21774
21774
  }) }));
21775
21775
  r.onPressGesture(O), (M = r.pressState) === null || M === void 0 || M.stop(), r.pressState = void 0;
21776
21776
  }
21777
21777
  }, b = null, S = function(M) {
21778
- var P, O = !1, L = !1;
21778
+ var B, O = !1, L = !1;
21779
21779
  switch (M.type) {
21780
21780
  case "gesturestart":
21781
21781
  O = !0;
@@ -21794,7 +21794,7 @@ var BaseController = (
21794
21794
  pointers: [__assign({}, j)],
21795
21795
  isFirst: O,
21796
21796
  isFinal: L,
21797
- scale: (P = M.scale) !== null && P !== void 0 ? P : 1,
21797
+ scale: (B = M.scale) !== null && B !== void 0 ? B : 1,
21798
21798
  center: __assign({}, j),
21799
21799
  velocityX: 0,
21800
21800
  velocityY: 0,
@@ -21806,34 +21806,34 @@ var BaseController = (
21806
21806
  return z;
21807
21807
  }, R = function(M) {
21808
21808
  if (M.preventDefault(), !isMobile) {
21809
- var P = S(M);
21809
+ var B = S(M);
21810
21810
  b = {
21811
- firstEvent: P
21811
+ firstEvent: B
21812
21812
  };
21813
21813
  var O = b.firstEvent;
21814
- O && !o(O.center) || r.onPinchGesture(P);
21814
+ O && !o(O.center) || r.onPinchGesture(B);
21815
21815
  }
21816
21816
  }, C = function(M) {
21817
21817
  if (M.preventDefault(), !isMobile && b) {
21818
- var P = S(M), O = b.firstEvent;
21819
- O && !o(O.center) || r.onPinchGesture(P);
21818
+ var B = S(M), O = b.firstEvent;
21819
+ O && !o(O.center) || r.onPinchGesture(B);
21820
21820
  }
21821
21821
  }, w = function(M) {
21822
21822
  if (M.preventDefault(), !isMobile && b) {
21823
- var P = S(M), O = b.firstEvent;
21824
- b = null, !(O && !o(O.center)) && r.onPinchGesture(P);
21823
+ var B = S(M), O = b.firstEvent;
21824
+ b = null, !(O && !o(O.center)) && r.onPinchGesture(B);
21825
21825
  }
21826
21826
  }, I = function(M) {
21827
21827
  if (M && typeof M.preventDefault == "function" && M.currentTarget === e && M.preventDefault(), typeof getSelection == "function") {
21828
- var P = getSelection();
21829
- P && P.focusNode && (P.removeAllRanges && P.removeAllRanges(), P.empty && P.empty());
21828
+ var B = getSelection();
21829
+ B && B.focusNode && (B.removeAllRanges && B.removeAllRanges(), B.empty && B.empty());
21830
21830
  }
21831
21831
  };
21832
21832
  this.enableWheel && e.addEventListener("wheel", m, { passive: !1 }), e.addEventListener("mousemove", A, !1), e.addEventListener("mouseout", g, !1), e.addEventListener("touchstart", v, { passive: !0 }), e.addEventListener("touchend", T, !1), e.addEventListener("touchcancel", T, !1), e.addEventListener("mousedown", E, !1), e.addEventListener("mouseup", T, !1), e.addEventListener("gesturestart", R, { passive: !1 }), e.addEventListener("gesturechange", C, { passive: !1 }), e.addEventListener("gestureend", w, { passive: !1 }), e.addEventListener("touchstart", I, { passive: !1 }), e.addEventListener("contextmenu", I, !1);
21833
- var B = function() {
21833
+ var P = function() {
21834
21834
  s.destroy(), e.removeEventListener("wheel", m, !1), e.removeEventListener("mousemove", A, !1), e.removeEventListener("mouseout", g, !1), e.removeEventListener("touchstart", v, !1), e.removeEventListener("touchend", T, !1), e.removeEventListener("touchcancel", T, !1), e.removeEventListener("mousedown", E, !1), e.removeEventListener("mouseup", T, !1), e.removeEventListener("gesturestart", R, !1), e.removeEventListener("gesturechange", C, !1), e.removeEventListener("gestureend", w, !1), e.removeEventListener("touchstart", I, !1), e.removeEventListener("contextmenu", I, !1);
21835
21835
  };
21836
- return Object.assign(B, { element: e });
21836
+ return Object.assign(P, { element: e });
21837
21837
  }, t;
21838
21838
  })(Subscribe)
21839
21839
  ), sharedGeometry$2 = new THREE.CircleBufferGeometry(0.1, 16), vertexShader$3 = `
@@ -22956,39 +22956,39 @@ void main() {
22956
22956
  C.sort(function(K, $) {
22957
22957
  if (K.level !== $.level)
22958
22958
  return K.level - $.level;
22959
- var re = w.get(K);
22960
- re === void 0 && (re = K.box.getCenter(scratchSortVector3).angleTo(R), w.set(K, re));
22961
- var te = w.get($);
22962
- return te === void 0 && (te = $.box.getCenter(scratchSortVector3).angleTo(R), w.set($, te)), re - te;
22959
+ var te = w.get(K);
22960
+ te === void 0 && (te = K.box.getCenter(scratchSortVector3).angleTo(R), w.set(K, te));
22961
+ var re = w.get($);
22962
+ return re === void 0 && (re = $.box.getCenter(scratchSortVector3).angleTo(R), w.set($, re)), te - re;
22963
22963
  });
22964
- var I = /* @__PURE__ */ new WeakSet(), B = this.observer.images.tiles;
22965
- if (B)
22964
+ var I = /* @__PURE__ */ new WeakSet(), P = this.observer.images.tiles;
22965
+ if (P)
22966
22966
  for (var M = function(K) {
22967
- var $ = B.find(function(ce) {
22968
- return ce.level === K.level;
22967
+ var $ = P.find(function(le) {
22968
+ return le.level === K.level;
22969
22969
  });
22970
22970
  if (!$)
22971
22971
  return "continue";
22972
22972
  I.add(K);
22973
- var re = P.tileMeshes.get(K);
22974
- if (re) {
22975
- re.appearDuration = P.appearDuration;
22976
- var te = re.updateTime(o);
22977
- return te && (r = !0), "continue";
22973
+ var te = B.tileMeshes.get(K);
22974
+ if (te) {
22975
+ te.appearDuration = B.appearDuration;
22976
+ var re = te.updateTime(o);
22977
+ return re && (r = !0), "continue";
22978
22978
  }
22979
- if (P.pedding >= P.maxRequest)
22979
+ if (B.pedding >= B.maxRequest)
22980
22980
  return "continue";
22981
- var ne = Math.pow(2, K.level) * K.position.y, fe = Math.pow(2, K.level) * K.position.x, le = panoStringify({
22982
- panoIndex: P.observer.panoIndex,
22983
- workCode: P.observer.work.workCode
22984
- }), ue = "".concat(le, ".").concat(K.face, ".").concat(K.level, ".").concat(ne, ".").concat(fe), pe = $.work.getURL($[K.face]), ve = $.size, Ae = P.imageOptions.transform, ie = __assign(__assign({}, pick(P.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(ue), size: $.scale >= 1 ? void 0 : ve * K.size * $.scale, cut: K.size === 1 ? void 0 : [
22985
- ve * K.position.x,
22986
- ve * K.position.y,
22987
- ve * K.size,
22988
- ve * K.size
22981
+ var ne = Math.pow(2, K.level) * K.position.y, de = Math.pow(2, K.level) * K.position.x, ue = panoStringify({
22982
+ panoIndex: B.observer.panoIndex,
22983
+ workCode: B.observer.work.workCode
22984
+ }), fe = "".concat(ue, ".").concat(K.face, ".").concat(K.level, ".").concat(ne, ".").concat(de), me = $.work.getURL($[K.face]), pe = $.size, Ae = B.imageOptions.transform, ie = __assign(__assign({}, pick(B.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(fe), size: $.scale >= 1 ? void 0 : pe * K.size * $.scale, cut: K.size === 1 ? void 0 : [
22985
+ pe * K.position.x,
22986
+ pe * K.position.y,
22987
+ pe * K.size,
22988
+ pe * K.size
22989
22989
  ] });
22990
- K.level === 1 && $.scale >= 0.5 && (ie.format === "jpg" || /\.jpg$/.test(pe)) && (ie.size = void 0, ie.quality || (ie.quality = 70)), K.size === 1 && console.warn("tile: ".concat(ie.key, " should not appear.")), P.pedding++;
22991
- var ye = P.textureLoader.loadTexture(pe, {
22990
+ K.level === 1 && $.scale >= 0.5 && (ie.format === "jpg" || /\.jpg$/.test(me)) && (ie.size = void 0, ie.quality || (ie.quality = 70)), K.size === 1 && console.warn("tile: ".concat(ie.key, " should not appear.")), B.pedding++;
22991
+ var ye = B.textureLoader.loadTexture(me, {
22992
22992
  imageURL: {
22993
22993
  transform: Ae,
22994
22994
  options: ie
@@ -22996,26 +22996,26 @@ void main() {
22996
22996
  minFilter: THREE.LinearFilter,
22997
22997
  magFilter: THREE.LinearFilter,
22998
22998
  generateMipmaps: !1,
22999
- fetcher: getFetcher(P.observer.work)
23000
- }).then(function(ce) {
23001
- return ce.body;
22999
+ fetcher: getFetcher(B.observer.work)
23000
+ }).then(function(le) {
23001
+ return le.body;
23002
23002
  });
23003
- ye.then(function(ce) {
23004
- return initTexture(ce, l);
23005
- }).then(function(ce) {
23006
- return e.pedding--, ce;
23007
- }, function(ce) {
23008
- return e.pedding--, Promise.reject(ce);
23009
- }), re = new TileMesh(K, ye), re.name = "tiling:tile-".concat(ue), re.visible = !1, re.appearDuration = P.appearDuration, P.tileMeshes.set(K, re), P.scene.add(re), re.updateTime(o), r = !0;
23010
- }, P = this, O = 0, L = C; O < L.length; O++) {
23003
+ ye.then(function(le) {
23004
+ return initTexture(le, l);
23005
+ }).then(function(le) {
23006
+ return e.pedding--, le;
23007
+ }, function(le) {
23008
+ return e.pedding--, Promise.reject(le);
23009
+ }), te = new TileMesh(K, ye), te.name = "tiling:tile-".concat(fe), te.visible = !1, te.appearDuration = B.appearDuration, B.tileMeshes.set(K, te), B.scene.add(te), te.updateTime(o), r = !0;
23010
+ }, B = this, O = 0, L = C; O < L.length; O++) {
23011
23011
  var F = L[O];
23012
23012
  M(F);
23013
23013
  }
23014
23014
  var D = [], k = [];
23015
23015
  this.tileMeshes.forEach(function(K, $) {
23016
23016
  I.has($) ? D.push(K) : k.push(K);
23017
- var re = $.level >= m && $.level <= A;
23018
- K.visible !== re && (K.visible = re, r = !0);
23017
+ var te = $.level >= m && $.level <= A;
23018
+ K.visible !== te && (K.visible = te, r = !0);
23019
23019
  });
23020
23020
  for (var j = k.sort(function(K, $) {
23021
23021
  return $.activeTime - K.activeTime;
@@ -23320,7 +23320,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23320
23320
  var h = {}, p = {}, m = this.camera.getDirection(new THREE.Vector3()), A = this.locationMotion.keyframes[0], g = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], y = this.locationMotion.getKeyFrameSegment(e), v = y[0], E = y[1], T = this.panoResourceFromLocationMotionKeyframe(v), b = this.panoResourceFromLocationMotionKeyframe(E), S = this.panoResourceFromLocationMotionKeyframe(A), R = this.panoResourceFromLocationMotionKeyframe(g), C = !1;
23321
23321
  if (this.cameraMotion.ended === !1 && (this.cameraMotion.update(e), p.longitude = this.cameraMotion.value.longitude, p.latitude = this.cameraMotion.value.latitude, p.fov = this.cameraMotion.value.fov), this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), h.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended === !1 && (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), this.locationMotion.ended === !1) {
23322
23322
  this.locationMotion.update(e);
23323
- var w = this.locationMotion.value.count - E.value.count + 1, I = new THREE.Vector3().copy(T.position), B = new THREE.Vector3().copy(b.position);
23323
+ var w = this.locationMotion.value.count - E.value.count + 1, I = new THREE.Vector3().copy(T.position), P = new THREE.Vector3().copy(b.position);
23324
23324
  if (h.progress = w, w >= 0.01 && w <= 0.99 && (h.progress = clamp$1(b.effectEasing(w), 0.01, 0.99)), b.panoPicture && (w < 1 ? T.panoPicture && (h.pano0 = T.panoPicture) : h.pano0 = b.panoPicture, h.pano1 = b.panoPicture), b.effect === "montage" ? h.transition = "BLACK" : b.effect === "spread" ? h.transition = "SPREAD" : h.transition = "FADE", (b.effect === "zoomin" || b.effect === "zoomout") && (h.progress = Math.pow(w, 3)), w < 1 && b.effect !== "fly") {
23325
23325
  if (h.pano0 && T.panoPicture) {
23326
23326
  var M = {
@@ -23329,12 +23329,12 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23329
23329
  mapSize: h.pano0.mapSize,
23330
23330
  zoom: h.pano0.zoom,
23331
23331
  matrix: T.panoPicture.matrix.clone().premultiply(T.fixCameraTransform).setPosition(b.position)
23332
- }, P = this.panoPictureObserverMap.get(h.pano0);
23333
- P && this.panoPictureObserverMap.set(M, P), h.pano0 = M;
23332
+ }, B = this.panoPictureObserverMap.get(h.pano0);
23333
+ B && this.panoPictureObserverMap.set(M, B), h.pano0 = M;
23334
23334
  }
23335
- I.copy(B), C = !0;
23335
+ I.copy(P), C = !0;
23336
23336
  }
23337
- p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(I.x + (B.x - I.x) * w, I.y + (B.y - I.y) * w, I.z + (B.z - I.z) * w);
23337
+ p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(I.x + (P.x - I.x) * w, I.y + (P.y - I.y) * w, I.z + (P.z - I.z) * w);
23338
23338
  for (var O = [], L = [], F = 0, D = this.locationMotion.keyframes; F < D.length; F++) {
23339
23339
  var k = D[F], j = k.key, z = k.progress;
23340
23340
  j !== void 0 && (O.push(j), z > this.locationMotion.progress && L.push(j));
@@ -23367,39 +23367,39 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23367
23367
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
23368
23368
  var W = this.works.getObserver(this.currentPano), ee = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, X = this.works.getObserver(T.panoId), K = this.works.getObserver(b.panoId);
23369
23369
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
23370
- for (var $ = [], re = W.work.observers, te = 0, ne = W.accessibleNodes; te < ne.length; te++) {
23371
- var fe = ne[te], P = re[fe];
23372
- P && $.push(P);
23370
+ for (var $ = [], te = W.work.observers, re = 0, ne = W.accessibleNodes; re < ne.length; re++) {
23371
+ var de = ne[re], B = te[de];
23372
+ B && $.push(B);
23373
23373
  }
23374
- var le = /* @__PURE__ */ new Map();
23375
- if ($.sort(function(de, Ee) {
23376
- var Re = le.get(de);
23377
- typeof Re == "undefined" && (Re = de.standingPosition.distanceTo(W.standingPosition), le.set(de, Re));
23378
- var Oe = le.get(de);
23379
- return typeof Oe == "undefined" && (Oe = Ee.standingPosition.distanceTo(W.standingPosition), le.set(Ee, Oe)), Re - Oe;
23374
+ var ue = /* @__PURE__ */ new Map();
23375
+ if ($.sort(function(ce, Ee) {
23376
+ var Re = ue.get(ce);
23377
+ typeof Re == "undefined" && (Re = ce.standingPosition.distanceTo(W.standingPosition), ue.set(ce, Re));
23378
+ var Oe = ue.get(ce);
23379
+ return typeof Oe == "undefined" && (Oe = Ee.standingPosition.distanceTo(W.standingPosition), ue.set(Ee, Oe)), Re - Oe;
23380
23380
  }), $.length) {
23381
23381
  this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % $.length;
23382
- var ue = $[this.accessibleObserverFloorCheckCount], pe = this.modelScene.models.find(function(de) {
23383
- return de.work === (ue == null ? void 0 : ue.work);
23382
+ var fe = $[this.accessibleObserverFloorCheckCount], me = this.modelScene.models.find(function(ce) {
23383
+ return ce.work === (fe == null ? void 0 : fe.work);
23384
23384
  });
23385
- if (ue && pe && pe.visible) {
23386
- var ve = 0.3, Ae = 0.05, ie = 5e-3, ye = ue.standingPosition.clone().applyMatrix4(ue.work.transform), ce = panoStringify({
23387
- panoIndex: ue.panoIndex,
23388
- workCode: ue.work.workCode
23389
- }), se = adjustPanoCircleMeshVectors.map(function(de) {
23390
- scratchRaycaster$1.ray.origin.copy(ye), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(de).setY(ve)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
23391
- var Ee = pe.intersectRaycaster(scratchRaycaster$1)[0];
23392
- return Ee && Ee.distance - ie <= ve ? new THREE.Vector3().copy(ye).setY(Ee.point.y + ie) : ye;
23385
+ if (fe && me && me.visible) {
23386
+ var pe = 0.3, Ae = 0.05, ie = 5e-3, ye = fe.standingPosition.clone().applyMatrix4(fe.work.transform), le = panoStringify({
23387
+ panoIndex: fe.panoIndex,
23388
+ workCode: fe.work.workCode
23389
+ }), se = adjustPanoCircleMeshVectors.map(function(ce) {
23390
+ scratchRaycaster$1.ray.origin.copy(ye), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(ce).setY(pe)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
23391
+ var Ee = me.intersectRaycaster(scratchRaycaster$1)[0];
23392
+ return Ee && Ee.distance - ie <= pe ? new THREE.Vector3().copy(ye).setY(Ee.point.y + ie) : ye;
23393
23393
  });
23394
- se.sort(function(de, Ee) {
23395
- return Ee.y - de.y;
23394
+ se.sort(function(ce, Ee) {
23395
+ return Ee.y - ce.y;
23396
23396
  });
23397
- var he = se[Math.floor(se.length / 2)], Te = se.filter(function(de) {
23398
- return de.distanceTo(he) <= Ae;
23397
+ var he = se[Math.floor(se.length / 2)], Te = se.filter(function(ce) {
23398
+ return ce.distanceTo(he) <= Ae;
23399
23399
  })[0];
23400
23400
  if (Te) {
23401
- var Me = new THREE.Vector4(ye.x, ye.y, ye.z, Te.y - ye.y), je = this.adjustPanoCircleMeshPositionFix.get(ce);
23402
- je && !Me.equals(je) && (this.needsRender = !0), this.adjustPanoCircleMeshPositionFix.set(ce, Me);
23401
+ var Me = new THREE.Vector4(ye.x, ye.y, ye.z, Te.y - ye.y), je = this.adjustPanoCircleMeshPositionFix.get(le);
23402
+ je && !Me.equals(je) && (this.needsRender = !0), this.adjustPanoCircleMeshPositionFix.set(le, Me);
23403
23403
  }
23404
23404
  }
23405
23405
  this.accessibleObserverFloorCheckCount++;
@@ -23407,71 +23407,71 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23407
23407
  }
23408
23408
  var _e = /* @__PURE__ */ new Map();
23409
23409
  if (X)
23410
- for (var Ne = 0, me = X.accessibleNodes; Ne < me.length; Ne++) {
23411
- var fe = me[Ne], P = X.work.observers[fe];
23412
- if (P) {
23413
- var ce = panoStringify({
23414
- panoIndex: P.panoIndex,
23415
- workCode: P.work.workCode
23410
+ for (var Ne = 0, ve = X.accessibleNodes; Ne < ve.length; Ne++) {
23411
+ var de = ve[Ne], B = X.work.observers[de];
23412
+ if (B) {
23413
+ var le = panoStringify({
23414
+ panoIndex: B.panoIndex,
23415
+ workCode: B.work.workCode
23416
23416
  });
23417
- _e.set(ce, P);
23417
+ _e.set(le, B);
23418
23418
  }
23419
23419
  }
23420
23420
  if (K)
23421
23421
  for (var ge = 0, ke = K.accessibleNodes; ge < ke.length; ge++) {
23422
- var fe = ke[ge], P = K.work.observers[fe];
23423
- if (P) {
23424
- var ce = panoStringify({
23425
- panoIndex: P.panoIndex,
23426
- workCode: P.work.workCode
23422
+ var de = ke[ge], B = K.work.observers[de];
23423
+ if (B) {
23424
+ var le = panoStringify({
23425
+ panoIndex: B.panoIndex,
23426
+ workCode: B.work.workCode
23427
23427
  });
23428
- _e.set(ce, P);
23428
+ _e.set(le, B);
23429
23429
  }
23430
23430
  }
23431
- if (this.panoMeshes.forEach(function(de, Ee) {
23431
+ if (this.panoMeshes.forEach(function(ce, Ee) {
23432
23432
  var Re = _e.get(Ee);
23433
- Re ? _e.delete(Ee) : (o.helper.remove(de), de.dispose(), o.panoMeshes.delete(Ee));
23434
- }), _e.forEach(function(de, Ee) {
23435
- var Re = o.panoCircleMeshCreator(de, {
23433
+ Re ? _e.delete(Ee) : (o.helper.remove(ce), ce.dispose(), o.panoMeshes.delete(Ee));
23434
+ }), _e.forEach(function(ce, Ee) {
23435
+ var Re = o.panoCircleMeshCreator(ce, {
23436
23436
  aerialObserverMinHeight: o.aerialObserverMinHeight
23437
23437
  });
23438
23438
  o.panoMeshes.set(Ee, Re), o.helper.add(Re), _e.delete(Ee);
23439
- }), this.panoMeshes.forEach(function(de, Ee) {
23439
+ }), this.panoMeshes.forEach(function(ce, Ee) {
23440
23440
  var Re = o.works.getObserver(Ee);
23441
23441
  if (Re) {
23442
23442
  var Oe = Re.position.distanceTo(Re.standingPosition) > o.aerialObserverMinHeight;
23443
23443
  if (Oe)
23444
- de.position.copy(Re.position).applyMatrix4(Re.work.transform), de.scale.setScalar(18);
23444
+ ce.position.copy(Re.position).applyMatrix4(Re.work.transform), ce.scale.setScalar(18);
23445
23445
  else {
23446
- de.position.copy(Re.standingPosition).applyMatrix4(Re.work.transform);
23446
+ ce.position.copy(Re.standingPosition).applyMatrix4(Re.work.transform);
23447
23447
  var Le = o.adjustPanoCircleMeshPositionFix.get(Re.panoId);
23448
- Le && (scratchVector3$3.set(Le.x, Le.y, Le.z), scratchVector3$3.equals(de.position) && (de.position.y += Le.w)), de.scale.setScalar(1.2);
23448
+ Le && (scratchVector3$3.set(Le.x, Le.y, Le.z), scratchVector3$3.equals(ce.position) && (ce.position.y += Le.w)), ce.scale.setScalar(1.2);
23449
23449
  }
23450
- var ut = o.camera.position.clone().setY(de.position.y), lt = new THREE.Vector3().copy(de.position).sub(ut).normalize();
23450
+ var ut = o.camera.position.clone().setY(ce.position.y), lt = new THREE.Vector3().copy(ce.position).sub(ut).normalize();
23451
23451
  if (Ee === panoStringify(o.currentPano)) {
23452
- var Xe = clamp$1((0.5 - ut.distanceTo(de.position)) / 0.5, 0, 1);
23452
+ var Xe = clamp$1((0.5 - ut.distanceTo(ce.position)) / 0.5, 0, 1);
23453
23453
  lt.multiplyScalar(1 - Xe).add(m.clone().multiplyScalar(Xe));
23454
23454
  }
23455
23455
  if (lt.length() > 0) {
23456
23456
  var $e = Oe ? -Math.PI / 2 : 0, vt = Math.atan2(lt.x, lt.z);
23457
- de.quaternion.setFromEuler(new THREE.Euler($e, vt, 0, "YXZ"));
23457
+ ce.quaternion.setFromEuler(new THREE.Euler($e, vt, 0, "YXZ"));
23458
23458
  }
23459
23459
  } else
23460
- de.visible = !1;
23460
+ ce.visible = !1;
23461
23461
  }), this.camera.pose.distance > 0.1 || C)
23462
- this.panoMeshes.forEach(function(de) {
23463
- de.setOpacity(0), de.setCurrent(!1), de.updateTime && de.updateTime(e, r), de.visible = !1;
23462
+ this.panoMeshes.forEach(function(ce) {
23463
+ ce.setOpacity(0), ce.setCurrent(!1), ce.updateTime && ce.updateTime(e, r), ce.visible = !1;
23464
23464
  });
23465
23465
  else if (W) {
23466
- var Se = W.work.observers, Ge = arrayMin(W.accessibleNodes, function(de) {
23467
- var Ee = Se[de];
23466
+ var Se = W.work.observers, Ge = arrayMin(W.accessibleNodes, function(ce) {
23467
+ var Ee = Se[ce];
23468
23468
  return Ee ? W.standingPosition.distanceTo(Ee.standingPosition) : 1 / 0;
23469
23469
  }, !0), xe = Ge[1];
23470
23470
  xe = clamp$1(xe, 3, 1 / 0);
23471
- var Ve = W.visibleNodes.concat(W.panoIndex).map(function(de) {
23472
- return panoStringify({ panoIndex: de, workCode: W.work.workCode });
23471
+ var Ve = W.visibleNodes.concat(W.panoIndex).map(function(ce) {
23472
+ return panoStringify({ panoIndex: ce, workCode: W.work.workCode });
23473
23473
  });
23474
- this.panoMeshes.forEach(function(de, Ee) {
23474
+ this.panoMeshes.forEach(function(ce, Ee) {
23475
23475
  var Re = o.works.getObserver(Ee), Oe = !1, Le = 1;
23476
23476
  if (Ve.indexOf(Ee) === -1)
23477
23477
  Oe = !1, Le = 0;
@@ -23480,22 +23480,22 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23480
23480
  else if (!Re.loadable && !Re.active)
23481
23481
  Oe = !1, Le = 0;
23482
23482
  else {
23483
- var ut = de.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
23484
- Oe = !de.loading && de.progress === 0 && ee !== null && panoStringify({ panoIndex: ee.panoIndex, workCode: ee.work.workCode }) === Ee, Le = ut < 0.01 ? 0 : clamp$1(xe / ut, 0.1, 0.85);
23483
+ var ut = ce.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
23484
+ Oe = !ce.loading && ce.progress === 0 && ee !== null && panoStringify({ panoIndex: ee.panoIndex, workCode: ee.work.workCode }) === Ee, Le = ut < 0.01 ? 0 : clamp$1(xe / ut, 0.1, 0.85);
23485
23485
  }
23486
23486
  if (Re && Re === K) {
23487
23487
  var lt = Re.position.distanceTo(Re.standingPosition) > o.aerialObserverMinHeight;
23488
23488
  if (lt) {
23489
- var ut = de.position.distanceTo(o.camera.position);
23489
+ var ut = ce.position.distanceTo(o.camera.position);
23490
23490
  ut < 35 && (Le = 0);
23491
23491
  }
23492
23492
  }
23493
- de.setCurrent(Oe), de.setOpacity(Le), de.updateTime && de.updateTime(e, r);
23493
+ ce.setCurrent(Oe), ce.setOpacity(Le), ce.updateTime && ce.updateTime(e, r);
23494
23494
  });
23495
23495
  }
23496
23496
  {
23497
- var w = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Pe = Math.round(w), Fe = this.modelScene.parameter.pano0, Be = this.modelScene.parameter.pano1, Je = Pe === 0 ? Fe : Be, P = void 0;
23498
- if (Je && (P = this.works.getObserver(Je.panoId), P || (P = this.panoPictureObserverMap.get(Je))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = w < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !P || !Je || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
23497
+ var w = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Pe = Math.round(w), Fe = this.modelScene.parameter.pano0, Be = this.modelScene.parameter.pano1, Je = Pe === 0 ? Fe : Be, B = void 0;
23498
+ if (Je && (B = this.works.getObserver(Je.panoId), B || (B = this.panoPictureObserverMap.get(Je))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = w < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !B || !Je || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
23499
23499
  this.tiling.setObserver(null);
23500
23500
  var De = {
23501
23501
  renderer: this.renderer,
@@ -23513,7 +23513,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23513
23513
  this.tiling.update(De), this.modelScene.parameter.set("refinedScreen", null);
23514
23514
  } else {
23515
23515
  var nt = getImageSizeLevel(Je.mapSize), Ze = nt + 1, At = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), it = Math.floor(this.tileLevelForFov(this.camera.fov, At)), St = it > nt ? it : 0;
23516
- this.tiling.setObserver(P);
23516
+ this.tiling.setObserver(B);
23517
23517
  var De = {
23518
23518
  renderer: this.renderer,
23519
23519
  resolution: this.camera.resolution,
@@ -23657,7 +23657,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23657
23657
  I.dispose();
23658
23658
  else {
23659
23659
  I.name = g;
23660
- var B = Array.isArray(I.image) ? I.image[0] : I.image, M = (C = B == null ? void 0 : B.width) !== null && C !== void 0 ? C : 2048, P = {
23660
+ var P = Array.isArray(I.image) ? I.image[0] : I.image, M = (C = P == null ? void 0 : P.width) !== null && C !== void 0 ? C : 2048, B = {
23661
23661
  panoId: d,
23662
23662
  effect: f,
23663
23663
  effectEasing: (w = r.effectEasing) !== null && w !== void 0 ? w : defaultEffectEase,
@@ -23671,7 +23671,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23671
23671
  position: h.position.clone().applyMatrix4(h.work.transform),
23672
23672
  fixCameraTransform: new THREE.Matrix4()
23673
23673
  };
23674
- P.panoPicture && s.panoPictureObserverMap.set(P.panoPicture, h), s.doMoveToPano(e, P, r);
23674
+ B.panoPicture && s.panoPictureObserverMap.set(B.panoPicture, h), s.doMoveToPano(e, B, r);
23675
23675
  }
23676
23676
  },
23677
23677
  onError: function(R) {
@@ -23796,13 +23796,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23796
23796
  if (this.locationMotion.ended) {
23797
23797
  var C = this.locationMotion.getKeyFrameSegment(v);
23798
23798
  C[0];
23799
- var w = C[1], I = this.locationMotion.value, B = ((u = this.panoResourceFromLocationMotionKeyframe(w)) !== null && u !== void 0 ? u : this.camera).position, M = r.position;
23800
- b = Math.max(B.distanceTo(M), T), S = [
23799
+ var w = C[1], I = this.locationMotion.value, P = ((u = this.panoResourceFromLocationMotionKeyframe(w)) !== null && u !== void 0 ? u : this.camera).position, M = r.position;
23800
+ b = Math.max(P.distanceTo(M), T), S = [
23801
23801
  { key: w.key, progress: 0, value: __assign(__assign({}, I), { count: 0 }) },
23802
23802
  { key: E, progress: 1, value: { distance: 0, count: 1 } }
23803
23803
  ], R = 0;
23804
23804
  } else {
23805
- var P = this.locationMotion.getKeyFrameSegment(v), O = P[0], w = P[1], I = this.locationMotion.value, L = this.panoResourceFromLocationMotionKeyframe(O).position, B = this.panoResourceFromLocationMotionKeyframe(w).position, M = r.position, F = w.value.count - I.count, D = Math.max(L.distanceTo(B), T) * F, k = Math.max(B.distanceTo(M), T);
23805
+ var B = this.locationMotion.getKeyFrameSegment(v), O = B[0], w = B[1], I = this.locationMotion.value, L = this.panoResourceFromLocationMotionKeyframe(O).position, P = this.panoResourceFromLocationMotionKeyframe(w).position, M = r.position, F = w.value.count - I.count, D = Math.max(L.distanceTo(P), T) * F, k = Math.max(P.distanceTo(M), T);
23806
23806
  b = D + k, S = [
23807
23807
  { key: O.key, progress: 0, value: __assign({}, I) },
23808
23808
  { key: w.key, progress: D / b, value: w.value },
@@ -23836,13 +23836,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23836
23836
  W.lookAt(G);
23837
23837
  var ee = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
23838
23838
  W.lookAt(Z);
23839
- var X = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), K = new THREE.Matrix4().getInverse(ee).premultiply(X), $ = this.cameraMotion.value.fov, re = (p = J.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, te = 1;
23840
- r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
23841
- for (var ne = clamp$1(re * te, 1, 170), fe = 0; fe < S.length - 1; fe++) {
23842
- var le = S[fe].key;
23843
- if (le) {
23844
- var ue = this.panoResources[le];
23845
- ue && (ue.fixCameraTransform.copy(K), ue.panoPicture && (ue.panoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan($ / 2 / 180 * Math.PI)));
23839
+ var X = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), K = new THREE.Matrix4().getInverse(ee).premultiply(X), $ = this.cameraMotion.value.fov, te = (p = J.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, re = 1;
23840
+ r.effect === "zoomin" ? re = 1.5 : r.effect === "zoomout" && (re = 0.4);
23841
+ for (var ne = clamp$1(te * re, 1, 170), de = 0; de < S.length - 1; de++) {
23842
+ var ue = S[de].key;
23843
+ if (ue) {
23844
+ var fe = this.panoResources[ue];
23845
+ fe && (fe.fixCameraTransform.copy(K), fe.panoPicture && (fe.panoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan($ / 2 / 180 * Math.PI)));
23846
23846
  }
23847
23847
  }
23848
23848
  this.cameraMotion.setKeyframes([
@@ -23867,18 +23867,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23867
23867
  value: {
23868
23868
  longitude: (g = J.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
23869
23869
  latitude: (y = J.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
23870
- fov: re
23870
+ fov: te
23871
23871
  }
23872
23872
  }
23873
23873
  ], V).catch(noop);
23874
23874
  }
23875
- var pe = this.locationMotion.setKeyframes(S, V, R);
23876
- pe.then(
23875
+ var me = this.locationMotion.setKeyframes(S, V, R);
23876
+ me.then(
23877
23877
  // resolve
23878
23878
  // 动画结束
23879
23879
  function() {
23880
- for (var ve = 0, Ae = s.modelScene.children; ve < Ae.length; ve++) {
23881
- var ie = Ae[ve];
23880
+ for (var pe = 0, Ae = s.modelScene.children; pe < Ae.length; pe++) {
23881
+ var ie = Ae[pe];
23882
23882
  ie instanceof Model && ie.show();
23883
23883
  }
23884
23884
  var ye = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: s.camera.pose.distance });
@@ -23890,21 +23890,21 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23890
23890
  userAction: s.userAction,
23891
23891
  error: null
23892
23892
  })), o.moveEndCallback && o.moveEndCallback(ye);
23893
- var ce = s.works.getObserver(e);
23894
- if (ce && ce.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23893
+ var le = s.works.getObserver(e);
23894
+ if (le && le.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23895
23895
  var se = {
23896
23896
  map: s.videoTexture,
23897
- size: ce.video.size.clone(),
23898
- matrix: ce.video.matrix.clone(),
23899
- panoMatrix: ce.matrix.clone().premultiply(ce.work.transform),
23897
+ size: le.video.size.clone(),
23898
+ matrix: le.video.matrix.clone(),
23899
+ panoMatrix: le.matrix.clone().premultiply(le.work.transform),
23900
23900
  alpha: 1
23901
23901
  }, he = createUuid(), Te = s.videoTexture.image;
23902
23902
  Te.setAttribute("uuid", he), Te.oncanplay = noop, Te.ontimeupdate = noop, canplayVideo().then(function(je) {
23903
- je && ce.video && Te.getAttribute("uuid") === he && (Te.oncanplay = function() {
23903
+ je && le.video && Te.getAttribute("uuid") === he && (Te.oncanplay = function() {
23904
23904
  Te.oncanplay = noop, Te.play();
23905
23905
  }, Te.ontimeupdate = function() {
23906
23906
  Te.currentTime > 0.5 && (Te.ontimeupdate = noop, s.panoVideo.setMaterial(se));
23907
- }, Te.src = ce.video.source);
23907
+ }, Te.src = le.video.source);
23908
23908
  }).catch((function() {
23909
23909
  Te.removeAttribute("uuid");
23910
23910
  }));
@@ -23966,14 +23966,14 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23966
23966
  return w;
23967
23967
  }
23968
23968
  }
23969
- var B = null;
23969
+ var P = null;
23970
23970
  if (r) {
23971
23971
  var M = r.ray.intersectBox(this.modelScene.boundingBox, scratchVector3$3);
23972
- M && (M.project(e), Math.abs(M.z) <= 1 && (B = M.clone()));
23972
+ M && (M.project(e), Math.abs(M.z) <= 1 && (P = M.clone()));
23973
23973
  } else
23974
- B = new THREE.Vector3(0, 0, 0);
23975
- if (B) {
23976
- var P = 0.4, O = s.accessibleNodes.filter(function(j) {
23974
+ P = new THREE.Vector3(0, 0, 0);
23975
+ if (P) {
23976
+ var B = 0.4, O = s.accessibleNodes.filter(function(j) {
23977
23977
  if (j === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
23978
23978
  return !1;
23979
23979
  var z = A[j];
@@ -23994,7 +23994,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23994
23994
  var M = scratchVector3$3.copy(w.position).applyMatrix4(w.work.transform);
23995
23995
  if (M.project(e), Math.abs(M.z) > 1)
23996
23996
  continue;
23997
- if (Math.pow(B.x - M.x, 2) + Math.pow(B.y - M.y, 2) < Math.pow(P, 2))
23997
+ if (Math.pow(P.x - M.x, 2) + Math.pow(P.y - M.y, 2) < Math.pow(B, 2))
23998
23998
  return w;
23999
23999
  }
24000
24000
  }
@@ -24037,10 +24037,10 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24037
24037
  if (!l)
24038
24038
  this.emit("gesture.tap", e), e.defaultPrevented || this.locationMotion.ended === !0 && this.cameraBounce();
24039
24039
  else {
24040
- for (var T = {}, b = Math.PI / 6, S = Math.PI / 12, R = l.position.clone().applyMatrix4(l.work.transform).setY(0).sub(c.position.clone().applyMatrix4(l.work.transform).setY(0)).normalize(), C = [], w = [], I = [], B = l.work.observers, M = 0, P = l.accessibleNodes; M < P.length; M++) {
24041
- var m = P[M];
24040
+ for (var T = {}, b = Math.PI / 6, S = Math.PI / 12, R = l.position.clone().applyMatrix4(l.work.transform).setY(0).sub(c.position.clone().applyMatrix4(l.work.transform).setY(0)).normalize(), C = [], w = [], I = [], P = l.work.observers, M = 0, B = l.accessibleNodes; M < B.length; M++) {
24041
+ var m = B[M];
24042
24042
  if (l.panoIndex !== m && !(m === this.currentPano.panoIndex && l.work.workCode === this.currentPano.workCode)) {
24043
- var O = B[m];
24043
+ var O = P[m];
24044
24044
  if (O) {
24045
24045
  var L = O.position.clone().applyMatrix4(O.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
24046
24046
  R.angleTo(L) < b && I.push(L);
@@ -24170,8 +24170,8 @@ var updateEyeViewMatrices = /* @__PURE__ */ (function() {
24170
24170
  return o === r ? (r[12] = o[0] * u + o[4] * l + o[8] * c + o[12], r[13] = o[1] * u + o[5] * l + o[9] * c + o[13], r[14] = o[2] * u + o[6] * l + o[10] * c + o[14], r[15] = o[3] * u + o[7] * l + o[11] * c + o[15]) : (f = o[0], d = o[1], h = o[2], p = o[3], m = o[4], A = o[5], g = o[6], y = o[7], v = o[8], E = o[9], T = o[10], b = o[11], r[0] = f, r[1] = d, r[2] = h, r[3] = p, r[4] = m, r[5] = A, r[6] = g, r[7] = y, r[8] = v, r[9] = E, r[10] = T, r[11] = b, r[12] = f * u + m * l + v * c + o[12], r[13] = d * u + A * l + E * c + o[13], r[14] = h * u + g * l + T * c + o[14], r[15] = p * u + y * l + b * c + o[15]), r;
24171
24171
  }
24172
24172
  function e(r, o) {
24173
- var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], y = o[11], v = o[12], E = o[13], T = o[14], b = o[15], S = s * d - u * f, R = s * h - l * f, C = s * p - c * f, w = u * h - l * d, I = u * p - c * d, B = l * p - c * h, M = m * E - A * v, P = m * T - g * v, O = m * b - y * v, L = A * T - g * E, F = A * b - y * E, D = g * b - y * T, k = S * D - R * F + C * L + w * O - I * P + B * M;
24174
- return k ? (k = 1 / k, r[0] = (d * D - h * F + p * L) * k, r[1] = (l * F - u * D - c * L) * k, r[2] = (E * B - T * I + b * w) * k, r[3] = (g * I - A * B - y * w) * k, r[4] = (h * O - f * D - p * P) * k, r[5] = (s * D - l * O + c * P) * k, r[6] = (T * C - v * B - b * R) * k, r[7] = (m * B - g * C + y * R) * k, r[8] = (f * F - d * O + p * M) * k, r[9] = (u * O - s * F - c * M) * k, r[10] = (v * I - E * C + b * S) * k, r[11] = (A * C - m * I - y * S) * k, r[12] = (d * P - f * L - h * M) * k, r[13] = (s * L - u * P + l * M) * k, r[14] = (E * R - v * w - T * S) * k, r[15] = (m * w - A * R + g * S) * k, r) : null;
24173
+ var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], y = o[11], v = o[12], E = o[13], T = o[14], b = o[15], S = s * d - u * f, R = s * h - l * f, C = s * p - c * f, w = u * h - l * d, I = u * p - c * d, P = l * p - c * h, M = m * E - A * v, B = m * T - g * v, O = m * b - y * v, L = A * T - g * E, F = A * b - y * E, D = g * b - y * T, k = S * D - R * F + C * L + w * O - I * B + P * M;
24174
+ return k ? (k = 1 / k, r[0] = (d * D - h * F + p * L) * k, r[1] = (l * F - u * D - c * L) * k, r[2] = (E * P - T * I + b * w) * k, r[3] = (g * I - A * P - y * w) * k, r[4] = (h * O - f * D - p * B) * k, r[5] = (s * D - l * O + c * B) * k, r[6] = (T * C - v * P - b * R) * k, r[7] = (m * P - g * C + y * R) * k, r[8] = (f * F - d * O + p * M) * k, r[9] = (u * O - s * F - c * M) * k, r[10] = (v * I - E * C + b * S) * k, r[11] = (A * C - m * I - y * S) * k, r[12] = (d * B - f * L - h * M) * k, r[13] = (s * L - u * B + l * M) * k, r[14] = (E * R - v * w - T * S) * k, r[15] = (m * w - A * R + g * S) * k, r) : null;
24175
24175
  }
24176
24176
  return function(r, o, s) {
24177
24177
  n(r, o), s && t(r, r, s), e(r, r);
@@ -24985,21 +24985,21 @@ void main() {
24985
24985
  var C = this.locationMotion.value.count - v.value.count + 1, w = new THREE.Vector3().copy(E.position), I = new THREE.Vector3().copy(T.position);
24986
24986
  if (h.progress = C, C >= 0.01 && C <= 0.99 && (h.progress = clamp$1(T.effectEasing(C), 0.01, 0.99)), T.panoPicture && (C < 1 ? E.panoPicture && (h.pano0 = E.panoPicture) : h.pano0 = T.panoPicture, h.pano1 = T.panoPicture), T.effect === "montage" ? h.transition = "BLACK" : T.effect === "spread" ? h.transition = "SPREAD" : h.transition = "FADE", (T.effect === "zoomin" || T.effect === "zoomout") && (h.progress = Math.pow(C, 3)), C < 1 && T.effect !== "fly") {
24987
24987
  if (h.pano0 && E.panoPicture) {
24988
- var B = {
24988
+ var P = {
24989
24989
  panoId: h.pano0.panoId,
24990
24990
  map: h.pano0.map,
24991
24991
  mapSize: h.pano0.mapSize,
24992
24992
  zoom: h.pano0.zoom,
24993
24993
  matrix: E.panoPicture.matrix.clone().setPosition(T.position)
24994
24994
  }, M = this.panoPictureObserverMap.get(h.pano0);
24995
- M && this.panoPictureObserverMap.set(B, M), h.pano0 = B;
24995
+ M && this.panoPictureObserverMap.set(P, M), h.pano0 = P;
24996
24996
  }
24997
24997
  w.copy(I), R = !0;
24998
24998
  }
24999
24999
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(w.x + (I.x - w.x) * C, w.y + (I.y - w.y) * C, w.z + (I.z - w.z) * C);
25000
- for (var P = [], O = [], L = 0, F = this.locationMotion.keyframes; L < F.length; L++) {
25000
+ for (var B = [], O = [], L = 0, F = this.locationMotion.keyframes; L < F.length; L++) {
25001
25001
  var D = F[L], k = D.key, j = D.progress;
25002
- k !== void 0 && (P.push(k), j > this.locationMotion.progress && O.push(k));
25002
+ k !== void 0 && (B.push(k), j > this.locationMotion.progress && O.push(k));
25003
25003
  }
25004
25004
  for (var z = 0, V = Object.keys(this.panoResources); z < V.length; z++) {
25005
25005
  var J = V[z];
@@ -25013,7 +25013,7 @@ void main() {
25013
25013
  q.dispose(), U.panoPicture = null;
25014
25014
  }
25015
25015
  }
25016
- P.indexOf(J) >= 0 || delete this.panoResources[J];
25016
+ B.indexOf(J) >= 0 || delete this.panoResources[J];
25017
25017
  }
25018
25018
  }
25019
25019
  this.currentPano = panoParse(T.panoId), this.emit("pano.moving", createEvent("pano.moving", {
@@ -25034,24 +25034,24 @@ void main() {
25034
25034
  var W = this.works.getObserver(E.panoId), ee = this.works.getObserver(T.panoId), X = /* @__PURE__ */ new Map();
25035
25035
  if (W)
25036
25036
  for (var K = 0, $ = W.accessibleNodes; K < $.length; K++) {
25037
- var re = $[K], M = W.work.observers[re];
25037
+ var te = $[K], M = W.work.observers[te];
25038
25038
  if (M) {
25039
- var te = panoStringify({
25039
+ var re = panoStringify({
25040
25040
  panoIndex: M.panoIndex,
25041
25041
  workCode: M.work.workCode
25042
25042
  });
25043
- X.set(te, M);
25043
+ X.set(re, M);
25044
25044
  }
25045
25045
  }
25046
25046
  if (ee)
25047
- for (var ne = 0, fe = ee.accessibleNodes; ne < fe.length; ne++) {
25048
- var re = fe[ne], M = ee.work.observers[re];
25047
+ for (var ne = 0, de = ee.accessibleNodes; ne < de.length; ne++) {
25048
+ var te = de[ne], M = ee.work.observers[te];
25049
25049
  if (M) {
25050
- var te = panoStringify({
25050
+ var re = panoStringify({
25051
25051
  panoIndex: M.panoIndex,
25052
25052
  workCode: M.work.workCode
25053
25053
  });
25054
- X.set(te, M);
25054
+ X.set(re, M);
25055
25055
  }
25056
25056
  }
25057
25057
  if (this.panoMeshes.forEach(function(xe, Ve) {
@@ -25075,13 +25075,13 @@ void main() {
25075
25075
  Be < 0.05 ? xe.setOpacity(0) : xe.setOpacity(clamp$1(1.5 / Be, 0, 1)), panoEqual(o.currentPano, Pe) && xe.setOpacity(0), xe.lookAt(o.camera.position);
25076
25076
  }
25077
25077
  }), this.locationMotion.ended) {
25078
- var le = this.intersect(e);
25078
+ var ue = this.intersect(e);
25079
25079
  this.panoMeshes.forEach(function(xe, Ve) {
25080
- xe.setCurrent(xe === le), xe.updateTime && xe.updateTime(e, r);
25080
+ xe.setCurrent(xe === ue), xe.updateTime && xe.updateTime(e, r);
25081
25081
  });
25082
25082
  }
25083
25083
  {
25084
- var C = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, ue = Math.round(C), pe = this.modelScene.parameter.pano0, ve = this.modelScene.parameter.pano1, Ae = ue === 0 ? pe : ve, M = void 0;
25084
+ var C = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, fe = Math.round(C), me = this.modelScene.parameter.pano0, pe = this.modelScene.parameter.pano1, Ae = fe === 0 ? me : pe, M = void 0;
25085
25085
  if (Ae && (M = this.works.getObserver(Ae.panoId), M || (M = this.panoPictureObserverMap.get(Ae))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = C < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !M || !Ae || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
25086
25086
  this.tiling.setObserver(null);
25087
25087
  var ie = {
@@ -25099,7 +25099,7 @@ void main() {
25099
25099
  };
25100
25100
  this.tiling.update(ie), this.modelScene.parameter.set("refinedScreen", null);
25101
25101
  } else {
25102
- var ye = getImageSizeLevel(Ae.mapSize), ce = ye + 1, se = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), he = Math.floor(this.tileLevelForFov(this.camera.fov, se)), Te = he > ye ? he : 0;
25102
+ var ye = getImageSizeLevel(Ae.mapSize), le = ye + 1, se = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), he = Math.floor(this.tileLevelForFov(this.camera.fov, se)), Te = he > ye ? he : 0;
25103
25103
  this.tiling.setObserver(M);
25104
25104
  var ie = {
25105
25105
  renderer: this.renderer,
@@ -25111,23 +25111,23 @@ void main() {
25111
25111
  panoMap: Ae.map,
25112
25112
  panoMatrix: Ae.matrix,
25113
25113
  panoZoom: Ae.zoom,
25114
- minLevel: ce,
25114
+ minLevel: le,
25115
25115
  level: Te
25116
25116
  }, Me = this.tiling.update(ie), je = {
25117
25117
  map: this.tiling.renderTarget.texture,
25118
25118
  matrixInverse: this.tiling.camera.matrixWorldInverse,
25119
25119
  projectionMatrix: this.tiling.camera.projectionMatrix,
25120
- pano: ue,
25121
- opacity: (pe == null ? void 0 : pe.panoId) === (ve == null ? void 0 : ve.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25120
+ pano: fe,
25121
+ opacity: (me == null ? void 0 : me.panoId) === (pe == null ? void 0 : pe.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25122
25122
  }, _e = this.modelScene.parameter.refinedScreen;
25123
25123
  (Me || je.pano !== (_e == null ? void 0 : _e.pano) || je.opacity !== (_e == null ? void 0 : _e.opacity)) && this.modelScene.parameter.set("refinedScreen", je);
25124
25124
  }
25125
25125
  }
25126
25126
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
25127
25127
  {
25128
- var Ne = T.effect, me = this.modelScene.parameter, pe = me.pano0, ve = me.pano1;
25129
- if (pe && ve && pe !== ve && Ne === "fly" && this.flyEffectUseDepthBuffer) {
25130
- if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== pe.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== ve.panoId) {
25128
+ var Ne = T.effect, ve = this.modelScene.parameter, me = ve.pano0, pe = ve.pano1;
25129
+ if (me && pe && me !== pe && Ne === "fly" && this.flyEffectUseDepthBuffer) {
25130
+ if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== me.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== pe.panoId) {
25131
25131
  var ge = 500, ke = 512;
25132
25132
  this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== ke && this.pano0DepthCubeRenderTarget.setSize(ke, ke) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(ke, {
25133
25133
  minFilter: THREE.NearestFilter,
@@ -25139,17 +25139,17 @@ void main() {
25139
25139
  generateMipmaps: !1
25140
25140
  });
25141
25141
  var Se = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
25142
- Se.matrix.copy(pe.matrix), Se.matrixWorld.copy(Se.matrix), Se.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Se, ge);
25142
+ Se.matrix.copy(me.matrix), Se.matrixWorld.copy(Se.matrix), Se.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Se, ge);
25143
25143
  var Ge = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
25144
- Ge.matrix.copy(ve.matrix), Ge.matrixWorld.copy(Ge.matrix), Ge.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ge, ge), this.modelScene.parameter.set({
25144
+ Ge.matrix.copy(pe.matrix), Ge.matrixWorld.copy(Ge.matrix), Ge.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ge, ge), this.modelScene.parameter.set({
25145
25145
  pano0Depth: {
25146
- panoId: pe.panoId,
25146
+ panoId: me.panoId,
25147
25147
  map: this.pano0DepthCubeRenderTarget.texture,
25148
25148
  mapSize: this.pano0DepthCubeRenderTarget.width,
25149
25149
  maxDepth: ge
25150
25150
  },
25151
25151
  pano1Depth: {
25152
- panoId: ve.panoId,
25152
+ panoId: pe.panoId,
25153
25153
  map: this.pano1DepthCubeRenderTarget.texture,
25154
25154
  mapSize: this.pano1DepthCubeRenderTarget.width,
25155
25155
  maxDepth: ge
@@ -25336,8 +25336,8 @@ void main() {
25336
25336
  if (this.perspToOrthoMotion.ended || (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), !this.locationMotion.ended) {
25337
25337
  this.locationMotion.update(e), s.distance = this.locationMotion.value.distance, s.offset = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z);
25338
25338
  for (var f = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), d = [], h = function(S) {
25339
- var R = p.modelScene.models.find(function(B) {
25340
- return B.work === S;
25339
+ var R = p.modelScene.models.find(function(P) {
25340
+ return P.work === S;
25341
25341
  });
25342
25342
  if (!R || R.visible === !1 || S.observers.length <= 0)
25343
25343
  return "continue";
@@ -25429,11 +25429,11 @@ void main() {
25429
25429
  y: e.y,
25430
25430
  z: e.z,
25431
25431
  distance: 0
25432
- }, B = {
25432
+ }, P = {
25433
25433
  longitude: r.longitude,
25434
25434
  latitude: r.latitude,
25435
25435
  fov: r.fov
25436
- }, M = [], P = function(J) {
25436
+ }, M = [], B = function(J) {
25437
25437
  var U = O.modelScene.models.find(function(W) {
25438
25438
  return W.work === J;
25439
25439
  });
@@ -25446,7 +25446,7 @@ void main() {
25446
25446
  }
25447
25447
  }, O = this, L = 0, F = this.works; L < F.length; L++) {
25448
25448
  var D = F[L];
25449
- P(D);
25449
+ B(D);
25450
25450
  }
25451
25451
  var k = arrayMin(M, function(J) {
25452
25452
  return scratchVector3$2.copy(J.position).applyMatrix4(J.work.transform).distanceTo(d);
@@ -25456,7 +25456,7 @@ void main() {
25456
25456
  } : {
25457
25457
  workCode: "",
25458
25458
  panoIndex: 0
25459
- }, z = __assign(__assign({}, j), { mode: this.mode, longitude: (u = B.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = B.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = B.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), V = this.currentPano;
25459
+ }, z = __assign(__assign({}, j), { mode: this.mode, longitude: (u = P.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = P.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = P.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), V = this.currentPano;
25460
25460
  this.emit("pano.moveTo", createEvent("pano.moveTo", {
25461
25461
  options: r,
25462
25462
  prevPano: V,
@@ -25464,7 +25464,7 @@ void main() {
25464
25464
  state: z,
25465
25465
  userAction: this.userAction,
25466
25466
  error: null
25467
- })), r.moveStartCallback && r.moveStartCallback(z), this.cameraMotion.set(B, w).catch(noop), this.locationMotion.set(I, w, C).then(
25467
+ })), r.moveStartCallback && r.moveStartCallback(z), this.cameraMotion.set(P, w).catch(noop), this.locationMotion.set(I, w, C).then(
25468
25468
  // resolve
25469
25469
  // 动画结束
25470
25470
  function() {
@@ -25876,8 +25876,8 @@ void main() {
25876
25876
  y: w.offset.y,
25877
25877
  z: w.offset.z
25878
25878
  }, 0).catch(noop)), e.isFinal) {
25879
- var I = this.renderer.getSize(new THREE.Vector2()), B = 2 * e.velocityX * T / I.y, M = 2 * e.velocityY * T / I.y, P = new THREE.Vector3(), O = new THREE.Vector3();
25880
- P.setFromMatrixColumn(this.camera.matrix, 0), P.multiplyScalar(-B), O.add(P), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? P.setFromMatrixColumn(this.camera.matrix, 1) : (P.setFromMatrixColumn(this.camera.matrix, 0), P.crossVectors(this.camera.up, P)), P.multiplyScalar(M), O.add(P), this.inMomentumMovement = {
25879
+ var I = this.renderer.getSize(new THREE.Vector2()), P = 2 * e.velocityX * T / I.y, M = 2 * e.velocityY * T / I.y, B = new THREE.Vector3(), O = new THREE.Vector3();
25880
+ B.setFromMatrixColumn(this.camera.matrix, 0), B.multiplyScalar(-P), O.add(B), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? B.setFromMatrixColumn(this.camera.matrix, 1) : (B.setFromMatrixColumn(this.camera.matrix, 0), B.crossVectors(this.camera.up, B)), B.multiplyScalar(M), O.add(B), this.inMomentumMovement = {
25881
25881
  uuid: createUuid()
25882
25882
  }, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: O.x, y: O.y, z: O.z }, 0);
25883
25883
  }
@@ -26666,8 +26666,8 @@ var LineSegments2 = (
26666
26666
  m.x *= f.x / 2, m.y *= f.y / 2, A.x *= f.x / 2, A.y *= f.y / 2, E.start.copy(m), E.start.z = 0, E.end.copy(A), E.end.z = 0;
26667
26667
  var I = E.closestPointToPointParameter(y, !0);
26668
26668
  E.at(I, T);
26669
- var B = THREE.MathUtils.lerp(m.z, A.z, I), M = B >= -1 && B <= 1, P = y.distanceTo(T) < d * 0.5;
26670
- if (M && P) {
26669
+ var P = THREE.MathUtils.lerp(m.z, A.z, I), M = P >= -1 && P <= 1, B = y.distanceTo(T) < d * 0.5;
26670
+ if (M && B) {
26671
26671
  E.start.fromBufferAttribute(h, S), E.end.fromBufferAttribute(p, S), E.start.applyMatrix4(b), E.end.applyMatrix4(b);
26672
26672
  var O = new THREE.Vector3(), L = new THREE.Vector3();
26673
26673
  o.distanceSqToSegment(E.start, E.end, L, O), r.push({
@@ -26751,7 +26751,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26751
26751
  }
26752
26752
  return Object.defineProperty(t, "version", {
26753
26753
  get: function() {
26754
- return "6.6.18";
26754
+ return "6.6.19";
26755
26755
  },
26756
26756
  enumerable: !1,
26757
26757
  configurable: !0
@@ -27283,15 +27283,15 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27283
27283
  panoId: d,
27284
27284
  hash: y,
27285
27285
  onLoad: function(w) {
27286
- var I, B, M = w.body;
27286
+ var I, P, M = w.body;
27287
27287
  if (s.destroyed)
27288
27288
  M.dispose();
27289
27289
  else {
27290
27290
  M.name = y;
27291
- var P = Array.isArray(M.image) ? M.image[0] : M.image, O = (I = P == null ? void 0 : P.width) !== null && I !== void 0 ? I : 2048, L = {
27291
+ var B = Array.isArray(M.image) ? M.image[0] : M.image, O = (I = B == null ? void 0 : B.width) !== null && I !== void 0 ? I : 2048, L = {
27292
27292
  panoId: d,
27293
27293
  effect: f,
27294
- effectEasing: (B = r.effectEasing) !== null && B !== void 0 ? B : defaultEffectEase,
27294
+ effectEasing: (P = r.effectEasing) !== null && P !== void 0 ? P : defaultEffectEase,
27295
27295
  leftPanoPicture: {
27296
27296
  panoId: d,
27297
27297
  map: M,
@@ -27331,24 +27331,24 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27331
27331
  format: THREE.RGBAFormat,
27332
27332
  fetcher: getFetcher(h.work)
27333
27333
  }, void 0, void 0, function(w) {
27334
- var I, B;
27335
- ((I = s.pendingTextureTask) === null || I === void 0 ? void 0 : I.hash) === y && ((B = s.panoMeshes.get(d)) === null || B === void 0 || B.setProgress(w)), s.emit("pano.texture.progress", createEvent("pano.texture.progress", {
27334
+ var I, P;
27335
+ ((I = s.pendingTextureTask) === null || I === void 0 ? void 0 : I.hash) === y && ((P = s.panoMeshes.get(d)) === null || P === void 0 || P.setProgress(w)), s.emit("pano.texture.progress", createEvent("pano.texture.progress", {
27336
27336
  error: null,
27337
27337
  progress: w,
27338
27338
  meta: null,
27339
27339
  pano: e
27340
27340
  }));
27341
27341
  }, this.renderer).then(function(w) {
27342
- var I, B;
27343
- s.pending.delete(C), ((I = s.pendingTextureTask) === null || I === void 0 ? void 0 : I.hash) === y ? (s.pendingTextureTask.onLoad(w), s.pendingTextureTask = void 0, (B = s.panoMeshes.get(d)) === null || B === void 0 || B.setProgress(0)) : w.body.dispose(), s.emit("pano.texture.success", createEvent("pano.texture.success", {
27342
+ var I, P;
27343
+ s.pending.delete(C), ((I = s.pendingTextureTask) === null || I === void 0 ? void 0 : I.hash) === y ? (s.pendingTextureTask.onLoad(w), s.pendingTextureTask = void 0, (P = s.panoMeshes.get(d)) === null || P === void 0 || P.setProgress(0)) : w.body.dispose(), s.emit("pano.texture.success", createEvent("pano.texture.success", {
27344
27344
  error: null,
27345
27345
  progress: 1,
27346
27346
  meta: w.meta,
27347
27347
  pano: e
27348
27348
  }));
27349
27349
  }).catch(function(w) {
27350
- var I, B;
27351
- s.pending.delete(C), ((I = s.pendingTextureTask) === null || I === void 0 ? void 0 : I.hash) === y && (s.pendingTextureTask.onError(w), s.pendingTextureTask = void 0, (B = s.panoMeshes.get(d)) === null || B === void 0 || B.setProgress(0)), s.emit("pano.texture.error", createEvent("pano.texture.error", {
27350
+ var I, P;
27351
+ s.pending.delete(C), ((I = s.pendingTextureTask) === null || I === void 0 ? void 0 : I.hash) === y && (s.pendingTextureTask.onError(w), s.pendingTextureTask = void 0, (P = s.panoMeshes.get(d)) === null || P === void 0 || P.setProgress(0)), s.emit("pano.texture.error", createEvent("pano.texture.error", {
27352
27352
  error: w,
27353
27353
  progress: 0,
27354
27354
  meta: null,
@@ -27369,15 +27369,15 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27369
27369
  if (this.locationMotion.ended) {
27370
27370
  var R = this.locationMotion.getKeyFrameSegment(y);
27371
27371
  R[0];
27372
- var C = R[1], w = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(C).position, B = r.position;
27373
- T = Math.max(I.distanceTo(B), E), b = [
27372
+ var C = R[1], w = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(C).position, P = r.position;
27373
+ T = Math.max(I.distanceTo(P), E), b = [
27374
27374
  { key: C.key, progress: 0, value: __assign(__assign({}, w), { count: 0 }) },
27375
27375
  { key: v, progress: 1, value: { distance: 0, count: 1 } }
27376
27376
  ], S = 0;
27377
27377
  } else {
27378
- var M = this.locationMotion.getKeyFrameSegment(y), P = M[0], C = M[1], w = this.locationMotion.value, O = this.panoResourceFromLocationMotionKeyframe(P).position, I = this.panoResourceFromLocationMotionKeyframe(C).position, B = r.position, L = C.value.count - w.count, F = Math.max(O.distanceTo(I), E) * L, D = Math.max(I.distanceTo(B), E);
27378
+ var M = this.locationMotion.getKeyFrameSegment(y), B = M[0], C = M[1], w = this.locationMotion.value, O = this.panoResourceFromLocationMotionKeyframe(B).position, I = this.panoResourceFromLocationMotionKeyframe(C).position, P = r.position, L = C.value.count - w.count, F = Math.max(O.distanceTo(I), E) * L, D = Math.max(I.distanceTo(P), E);
27379
27379
  T = F + D, b = [
27380
- { key: P.key, progress: 0, value: __assign({}, w) },
27380
+ { key: B.key, progress: 0, value: __assign({}, w) },
27381
27381
  { key: C.key, progress: F / T, value: C.value },
27382
27382
  { key: v, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
27383
27383
  ];
@@ -27409,13 +27409,13 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27409
27409
  Z.lookAt(q);
27410
27410
  var W = new THREE.Matrix4().makeRotationFromQuaternion(Z.quaternion);
27411
27411
  Z.lookAt(G);
27412
- var ee = new THREE.Matrix4().makeRotationFromQuaternion(Z.quaternion), X = new THREE.Matrix4().getInverse(W).premultiply(ee), K = this.cameraMotion.value.fov, $ = (h = V.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, re = 1;
27413
- r.effect === "zoomin" ? re = 1.5 : r.effect === "zoomout" && (re = 0.4);
27414
- for (var te = $ * re, ne = 0; ne < b.length - 1; ne++) {
27415
- var fe = b[ne].key;
27416
- if (fe) {
27417
- var le = this.panoResources[fe];
27418
- le && (le.fixCameraTransform.copy(X), le.leftPanoPicture && (le.leftPanoPicture.zoom = Math.tan(te / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27412
+ var ee = new THREE.Matrix4().makeRotationFromQuaternion(Z.quaternion), X = new THREE.Matrix4().getInverse(W).premultiply(ee), K = this.cameraMotion.value.fov, $ = (h = V.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
27413
+ r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
27414
+ for (var re = $ * te, ne = 0; ne < b.length - 1; ne++) {
27415
+ var de = b[ne].key;
27416
+ if (de) {
27417
+ var ue = this.panoResources[de];
27418
+ ue && (ue.fixCameraTransform.copy(X), ue.leftPanoPicture && (ue.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27419
27419
  }
27420
27420
  }
27421
27421
  this.cameraMotion.setKeyframes([
@@ -27432,7 +27432,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27432
27432
  value: {
27433
27433
  longitude: (p = V.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
27434
27434
  latitude: (m = V.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
27435
- fov: te
27435
+ fov: re
27436
27436
  }
27437
27437
  },
27438
27438
  {
@@ -27445,13 +27445,13 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27445
27445
  }
27446
27446
  ], z).catch(noop);
27447
27447
  }
27448
- var ue = this.locationMotion.setKeyframes(b, z, S);
27449
- ue.then(
27448
+ var fe = this.locationMotion.setKeyframes(b, z, S);
27449
+ fe.then(
27450
27450
  // resolve
27451
27451
  // 动画结束
27452
27452
  function() {
27453
- for (var pe = 0, ve = s.modelScene.children; pe < ve.length; pe++) {
27454
- var Ae = ve[pe];
27453
+ for (var me = 0, pe = s.modelScene.children; me < pe.length; me++) {
27454
+ var Ae = pe[me];
27455
27455
  Ae instanceof Model && Ae.show();
27456
27456
  }
27457
27457
  var ie = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: 0 });
@@ -27465,7 +27465,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27465
27465
  })), o.moveEndCallback && o.moveEndCallback(ie);
27466
27466
  var ye = s.works.getObserver(s.currentPano);
27467
27467
  if (ye && ye.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
27468
- var ce = {
27468
+ var le = {
27469
27469
  map: s.videoTexture,
27470
27470
  size: ye.video.size.clone(),
27471
27471
  matrix: ye.video.matrix.clone(),
@@ -27476,7 +27476,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27476
27476
  Te && ye.video && he.getAttribute("uuid") === se && (he.oncanplay = function() {
27477
27477
  he.oncanplay = noop, he.play();
27478
27478
  }, he.ontimeupdate = function() {
27479
- he.currentTime > 0.5 && (he.ontimeupdate = noop, s.panoVideo.setMaterial(ce));
27479
+ he.currentTime > 0.5 && (he.ontimeupdate = noop, s.panoVideo.setMaterial(le));
27480
27480
  }, he.src = ye.video.source);
27481
27481
  }).catch((function() {
27482
27482
  he.removeAttribute("uuid");
@@ -27587,7 +27587,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27587
27587
  for (var o = this, s, u, l, c, f, d, h, p, m, A = [], g = 2; g < arguments.length; g++)
27588
27588
  A[g - 2] = arguments[g];
27589
27589
  this.userAction = !0;
27590
- var y = {}, v = {}, E = this.camera.getDirection(new THREE.Vector3()), T = this.locationMotion.keyframes[0], b = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], S = this.locationMotion.getKeyFrameSegment(e), R = S[0], C = S[1], w = this.panoResourceFromLocationMotionKeyframe(R), I = this.panoResourceFromLocationMotionKeyframe(C), B = this.panoResourceFromLocationMotionKeyframe(T), M = this.panoResourceFromLocationMotionKeyframe(b), P = !1;
27590
+ var y = {}, v = {}, E = this.camera.getDirection(new THREE.Vector3()), T = this.locationMotion.keyframes[0], b = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], S = this.locationMotion.getKeyFrameSegment(e), R = S[0], C = S[1], w = this.panoResourceFromLocationMotionKeyframe(R), I = this.panoResourceFromLocationMotionKeyframe(C), P = this.panoResourceFromLocationMotionKeyframe(T), M = this.panoResourceFromLocationMotionKeyframe(b), B = !1;
27591
27591
  if (this.cameraMotion.ended === !1 && (this.cameraMotion.update(e), v.fov = this.cameraMotion.value.fov), this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), y.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended === !1 && (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), this.locationMotion.ended === !1) {
27592
27592
  this.locationMotion.update(e);
27593
27593
  var O = this.locationMotion.value.count - C.value.count + 1, L = new THREE.Vector3().copy(w.position), F = new THREE.Vector3().copy(I.position);
@@ -27602,7 +27602,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27602
27602
  }, k = this.panoPictureObserverMap.get(y.pano0);
27603
27603
  k && this.panoPictureObserverMap.set(D, k), y.pano0 = D;
27604
27604
  }
27605
- L.copy(F), P = !0;
27605
+ L.copy(F), B = !0;
27606
27606
  }
27607
27607
  v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(L.x + (F.x - L.x) * O, L.y + (F.y - L.y) * O, L.z + (F.z - L.z) * O);
27608
27608
  for (var j = [], z = [], V = 0, J = this.locationMotion.keyframes; V < J.length; V++) {
@@ -27627,7 +27627,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27627
27627
  var $ = panoParse(I.panoId);
27628
27628
  $ !== this.currentPano && (this.currentPano = $, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
27629
27629
  userAction: this.userAction,
27630
- prevPano: panoParse(B.panoId),
27630
+ prevPano: panoParse(P.panoId),
27631
27631
  state: __assign(__assign(__assign(__assign({}, panoParse(M.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), v),
27632
27632
  options: {},
27633
27633
  progress: this.locationMotion.progress,
@@ -27635,18 +27635,18 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27635
27635
  }));
27636
27636
  }
27637
27637
  this.camera.setFromPose(v), this.xrManager.cameraVR.projectionMatrix.copy(this.camera.projectionMatrix), this.xrManager.cameraVR.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.xrManager.cameraVR.matrix.copy(this.camera.matrix), this.xrManager.cameraVR.position.copy(this.camera.position), this.xrManager.cameraVR.quaternion.copy(this.camera.quaternion), this.xrManager.cameraVR.scale.copy(this.camera.scale), this.xrManager.cameraVR.matrixAutoUpdate = !1, this.xrManager.cameraVR.matrixWorld.copy(this.camera.matrixWorld);
27638
- var re = A, te = re[1], ne = new THREE.Vector3(0, 0, 0), fe = new THREE.Vector2().copy(this.camera.resolution);
27639
- if (te && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
27640
- var le = this.xrManager.cameraVR, ue = this.xrManager.referenceSpace, pe = this.xrManager.session.renderState.baseLayer, ve = te.getViewerPose(ue), Ae = (l = ve == null ? void 0 : ve.views) !== null && l !== void 0 ? l : [];
27641
- this.renderer.setFramebuffer(pe.framebuffer);
27638
+ var te = A, re = te[1], ne = new THREE.Vector3(0, 0, 0), de = new THREE.Vector2().copy(this.camera.resolution);
27639
+ if (re && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
27640
+ var ue = this.xrManager.cameraVR, fe = this.xrManager.referenceSpace, me = this.xrManager.session.renderState.baseLayer, pe = re.getViewerPose(fe), Ae = (l = pe == null ? void 0 : pe.views) !== null && l !== void 0 ? l : [];
27641
+ this.renderer.setFramebuffer(me.framebuffer);
27642
27642
  for (var ie = 0; ie < Ae.length; ie++) {
27643
- var ye = Ae[ie], ce = le.cameras[ie], se = pe.getViewport(ye);
27644
- se && (ce.projectionMatrix.fromArray(ye.projectionMatrix), ce.projectionMatrixInverse.getInverse(ce.projectionMatrix), ce.matrix.fromArray(ye.transform.matrix), ce.matrix.setPosition(this.camera.position), ce.matrix.decompose(ce.position, ce.quaternion, ce.scale), ce.matrixWorld.copy(ce.matrix), ce.matrixWorldInverse.getInverse(ce.matrixWorld), ce.matrixAutoUpdate = !1, ne.copy(ce.position), ce.viewport.set(se.x, se.y, se.width, se.height), fe.set(se.width, se.height));
27643
+ var ye = Ae[ie], le = ue.cameras[ie], se = me.getViewport(ye);
27644
+ se && (le.projectionMatrix.fromArray(ye.projectionMatrix), le.projectionMatrixInverse.getInverse(le.projectionMatrix), le.matrix.fromArray(ye.transform.matrix), le.matrix.setPosition(this.camera.position), le.matrix.decompose(le.position, le.quaternion, le.scale), le.matrixWorld.copy(le.matrix), le.matrixWorldInverse.getInverse(le.matrixWorld), le.matrixAutoUpdate = !1, ne.copy(le.position), le.viewport.set(se.x, se.y, se.width, se.height), de.set(se.width, se.height));
27645
27645
  }
27646
27646
  if (this.xrManager.setProjectionFromUnion(this.xrManager.cameraVR, this.xrManager.cameraL, this.xrManager.cameraR), this.camera.quaternion.copy(this.xrManager.cameraVR.quaternion), this.camera.scale.copy(this.xrManager.cameraVR.scale), this.camera.matrix.compose(this.camera.position, this.camera.quaternion, this.camera.scale), this.camera.computePose((c = v.distance) !== null && c !== void 0 ? c : this.camera.pose.distance), this.xrManager.session && this.xrManager.session.inputSources) {
27647
27647
  for (var ie = 0; ie < this.xrManager.session.inputSources.length; ie++)
27648
27648
  if (this.xrManager.session.inputSources[ie] && this.xrManager.session.inputSources[ie].targetRayMode === "transient-pointer") {
27649
- var he = te.getPose(this.xrManager.session.inputSources[ie].targetRaySpace, ue);
27649
+ var he = re.getPose(this.xrManager.session.inputSources[ie].targetRaySpace, fe);
27650
27650
  if (he) {
27651
27651
  var Te = he.transform.orientation, Me = new THREE.Quaternion(Te.x, Te.y, Te.z, Te.w), je = new THREE.Vector3(0, 0, -1).applyQuaternion(Me), _e = new THREE.Raycaster(this.camera.position, je);
27652
27652
  this.gazeRay = _e;
@@ -27654,11 +27654,11 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27654
27654
  }
27655
27655
  }
27656
27656
  if (this.xrManager.machineType === "Oculus" || this.xrManager.machineType === "Pico") {
27657
- for (var Ne = this.xrManager.session.inputSources, me = function(oe) {
27657
+ for (var Ne = this.xrManager.session.inputSources, ve = function(oe) {
27658
27658
  var we = ge.xrManager.controllers[oe], Ce = Ne[oe];
27659
27659
  if (!Ce)
27660
27660
  return "continue";
27661
- we && we.update(Ce, te, ue);
27661
+ we && we.update(Ce, re, fe);
27662
27662
  var ze = ge.xrManager.getController(oe), ht = new THREE.Vector3(0, 1.2, 0), rt = ze.position.clone().add(ne).sub(ht);
27663
27663
  Ce.handedness === "left" ? ge.xrControllerRay.left.set(rt, new THREE.Vector3(0, 0, -1).applyEuler(ze.rotation)) : Ce.handedness === "right" && ge.xrControllerRay.right.set(rt, new THREE.Vector3(0, 0, -1).applyEuler(ze.rotation)), ge.controllerWrappers[oe].position.copy(new THREE.Vector3(0, 0, 0).add(ne).sub(ht));
27664
27664
  var qe = ge.modelScene.intersectRaycaster(ge.xrControllerRay.right);
@@ -27689,14 +27689,14 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27689
27689
  } else
27690
27690
  ge.pointerLines.left.setPoints(rt, qe[0].point);
27691
27691
  }, ge = this, ie = 0; ie < Ne.length; ie++) {
27692
- var ke = me(ie);
27692
+ var ke = ve(ie);
27693
27693
  if (typeof ke == "object")
27694
27694
  return ke.value;
27695
27695
  }
27696
27696
  this.updateControllerHelper(Ne, e, r);
27697
27697
  }
27698
27698
  } else
27699
- te || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
27699
+ re || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
27700
27700
  isEmptyObject(y) === !1 && this.modelScene.parameter.set(y), this.emit("camera.update", createEvent("camera.update", {
27701
27701
  userAction: this.userAction,
27702
27702
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
@@ -27754,8 +27754,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27754
27754
  }
27755
27755
  }
27756
27756
  if (Ve)
27757
- for (var st = 0, de = Ve.accessibleNodes; st < de.length; st++) {
27758
- var De = de[st], k = Ve.work.observers[De];
27757
+ for (var st = 0, ce = Ve.accessibleNodes; st < ce.length; st++) {
27758
+ var De = ce[st], k = Ve.work.observers[De];
27759
27759
  if (k) {
27760
27760
  var Ie = panoStringify({
27761
27761
  panoIndex: k.panoIndex,
@@ -27794,7 +27794,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27794
27794
  }
27795
27795
  } else
27796
27796
  oe.visible = !1;
27797
- }), this.camera.pose.distance > 0.1 || P)
27797
+ }), this.camera.pose.distance > 0.1 || B)
27798
27798
  this.panoMeshes.forEach(function(oe) {
27799
27799
  oe.setOpacity(0), oe.setCurrent(!1), oe.updateTime && oe.updateTime(e, r), oe.visible = !1;
27800
27800
  });
@@ -27834,7 +27834,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27834
27834
  this.tiling.setObserver(null);
27835
27835
  var Ft = {
27836
27836
  renderer: this.renderer,
27837
- resolution: fe,
27837
+ resolution: de,
27838
27838
  pixelRatio: 1,
27839
27839
  time: this.camera.time,
27840
27840
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -27851,7 +27851,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27851
27851
  this.tiling.setObserver(k);
27852
27852
  var Ft = {
27853
27853
  renderer: this.renderer,
27854
- resolution: fe,
27854
+ resolution: de,
27855
27855
  pixelRatio: 1,
27856
27856
  time: this.camera.time,
27857
27857
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -29126,9 +29126,9 @@ void main() {
29126
29126
  if (typeof I == "function")
29127
29127
  I(g);
29128
29128
  else if (Array.isArray(I)) {
29129
- var B = I[0], M = I[1], P = I[2];
29130
- if (typeof B == "function") {
29131
- var O = B(g, P);
29129
+ var P = I[0], M = I[1], B = I[2];
29130
+ if (typeof P == "function") {
29131
+ var O = P(g, B);
29132
29132
  typeof M == "string" && (g.plugins[M] ? g.throwError(new Error("plugin name ".concat(M, " is exists."))) : g.plugins[M] = O);
29133
29133
  }
29134
29134
  }
@@ -29137,7 +29137,7 @@ void main() {
29137
29137
  }
29138
29138
  return Object.defineProperty(t, "version", {
29139
29139
  get: function() {
29140
- return "6.6.18";
29140
+ return "6.6.19";
29141
29141
  },
29142
29142
  enumerable: !1,
29143
29143
  configurable: !0
@@ -29372,11 +29372,11 @@ void main() {
29372
29372
  get networkSubscribe() {
29373
29373
  return K.networkSubscribe;
29374
29374
  },
29375
- requestProxy: function(re) {
29376
- return Promise.resolve(re).then(function(te) {
29377
- return K.requestProxy(te);
29378
- }).then(function(te) {
29379
- var ne = verifyURL(te, X.allowHosts);
29375
+ requestProxy: function(te) {
29376
+ return Promise.resolve(te).then(function(re) {
29377
+ return K.requestProxy(re);
29378
+ }).then(function(re) {
29379
+ var ne = verifyURL(re, X.allowHosts);
29380
29380
  if (ne instanceof Error)
29381
29381
  throw ne;
29382
29382
  return ne;
@@ -29384,18 +29384,18 @@ void main() {
29384
29384
  }
29385
29385
  });
29386
29386
  registerFetcher(X, $);
29387
- }, w = this, I = 0, B = R; I < B.length; I++) {
29388
- var M = B[I];
29387
+ }, w = this, I = 0, P = R; I < P.length; I++) {
29388
+ var M = P[I];
29389
29389
  C(M);
29390
29390
  }
29391
29391
  r === void 0 && (r = "inherit"), r === "inherit" && this.works === emptyWorks && (r = "initial");
29392
- var P = R.initial, O = P.work.observers[0], L = O ? {
29392
+ var B = R.initial, O = B.work.observers[0], L = O ? {
29393
29393
  workCode: O.work.workCode,
29394
29394
  panoIndex: O.panoIndex
29395
29395
  } : {
29396
- workCode: P.work.workCode,
29396
+ workCode: B.work.workCode,
29397
29397
  panoIndex: 0
29398
- }, F = (l = P.mode) !== null && l !== void 0 ? l : O ? "Panorama" : "Mapview", D = {};
29398
+ }, F = (l = B.mode) !== null && l !== void 0 ? l : O ? "Panorama" : "Mapview", D = {};
29399
29399
  if (r === "inherit") {
29400
29400
  F = this.currentMode;
29401
29401
  var k = (f = (c = R[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
@@ -29413,20 +29413,20 @@ void main() {
29413
29413
  offset: void 0
29414
29414
  };
29415
29415
  } else if (r === "initial")
29416
- typeof P.panoIndex == "number" && (L = {
29417
- workCode: P.work.workCode,
29418
- panoIndex: P.panoIndex
29419
- }), P.mode && (F = P.mode), D = {
29420
- longitude: P.longitude,
29421
- latitude: P.latitude,
29422
- fov: P.fov,
29423
- distance: P.distance,
29424
- offset: (d = P.offset) === null || d === void 0 ? void 0 : d.clone()
29416
+ typeof B.panoIndex == "number" && (L = {
29417
+ workCode: B.work.workCode,
29418
+ panoIndex: B.panoIndex
29419
+ }), B.mode && (F = B.mode), D = {
29420
+ longitude: B.longitude,
29421
+ latitude: B.latitude,
29422
+ fov: B.fov,
29423
+ distance: B.distance,
29424
+ offset: (d = B.offset) === null || d === void 0 ? void 0 : d.clone()
29425
29425
  };
29426
29426
  else {
29427
29427
  if (F = (h = r.mode) !== null && h !== void 0 ? h : this.currentMode, typeof r.panoIndex == "number") {
29428
29428
  var k = R.getObserver({
29429
- workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p : P.work.workCode) !== null && m !== void 0 ? m : "",
29429
+ workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p : B.work.workCode) !== null && m !== void 0 ? m : "",
29430
29430
  panoIndex: r.panoIndex
29431
29431
  });
29432
29432
  k && (L = {
@@ -29467,21 +29467,21 @@ void main() {
29467
29467
  if (u.controller)
29468
29468
  u.controller.destroy();
29469
29469
  else {
29470
- var re = Controllers[F].initAnimationEndState(X);
29471
- u.camera.setFromPose(re), u.emit("camera.update", createEvent("camera.update", {
29470
+ var te = Controllers[F].initAnimationEndState(X);
29471
+ u.camera.setFromPose(te), u.emit("camera.update", createEvent("camera.update", {
29472
29472
  state: u.getCurrentState(),
29473
29473
  userAction: s
29474
29474
  }));
29475
29475
  }
29476
29476
  u.controller = u.applyController(F, X);
29477
- var te = createEvent("mode.change", {
29477
+ var re = createEvent("mode.change", {
29478
29478
  prevMode: $,
29479
29479
  mode: F,
29480
29480
  state: K,
29481
29481
  userAction: s
29482
29482
  });
29483
29483
  try {
29484
- u.emit("mode.change", te);
29484
+ u.emit("mode.change", re);
29485
29485
  } catch (ne) {
29486
29486
  console.error(ne);
29487
29487
  }
@@ -29615,13 +29615,13 @@ void main() {
29615
29615
  });
29616
29616
  if (l.emit("mode.change.request", I), !I.defaultPrevented) {
29617
29617
  E && E.destroy(), l.controller = l.applyController(e, C);
29618
- var B = createEvent("mode.change", {
29618
+ var P = createEvent("mode.change", {
29619
29619
  prevMode: l.currentMode,
29620
29620
  mode: e,
29621
29621
  state: w,
29622
29622
  userAction: s
29623
29623
  });
29624
- l.emit("mode.change", B);
29624
+ l.emit("mode.change", P);
29625
29625
  }
29626
29626
  }
29627
29627
  c();
@@ -29648,19 +29648,19 @@ void main() {
29648
29648
  if (!this.renderer)
29649
29649
  throw new Error("renderer is not initialized.");
29650
29650
  var f = this.renderer.getPixelRatio(), d = this.renderer.getRenderTarget(), h = this.renderer.getSize(new THREE.Vector2()), p = 0, m = 0, A = 1, g = 1, y, v, E, T, b;
29651
- typeof e == "number" ? (p = e, typeof r == "number" && (m = r), typeof o == "number" && (A = o), typeof s == "number" && (g = s), y = u, v = l, b = c) : (p = e.x, m = e.y, A = e.width, g = e.height, y = e.pixelRatio, v = e.flipY, E = e.helperVisible, T = e.skipPanorama, b = e.buffer), p = Math.ceil(p), m = Math.ceil(m), A = Math.ceil(A), g = Math.ceil(g), y = Math.ceil(y != null ? y : f), v = v != null ? v : !1;
29651
+ typeof e == "number" ? (p = e, typeof r == "number" && (m = r), typeof o == "number" && (A = o), typeof s == "number" && (g = s), y = u, v = l, b = c) : (p = e.x, m = e.y, A = e.width, g = e.height, y = e.pixelRatio, v = e.flipY, E = e.helperVisible, T = e.skipPanorama, b = e.buffer), p = Math.floor(p), m = Math.floor(m), A = Math.floor(A), g = Math.floor(g), y = Math.floor(y != null ? y : f), v = v != null ? v : !1;
29652
29652
  var S = this.helperVisible, R = this.modelScene.parameter.modelAlpha;
29653
29653
  this.helperVisible = E != null ? E : this.helperVisible, T && (this.controller instanceof Controllers.Panorama || this.controller instanceof Controllers.VRPanorama || this.controller instanceof Controllers.XRPanorama) && T === !0 && this.modelScene.parameter.set("modelAlpha", 1), this.modelScene.update(this.renderer, this.camera);
29654
29654
  var C = this.getPixelsRenderTarget;
29655
29655
  C.setSize(A * y, g * y), this.renderer.setRenderTarget(C), this.camera.pixelRatio = y, this.camera.resolution.set(A, g), this.camera.setViewOffset(h.width, h.height, p, h.height - m - g, A, g), this.scene.update(this.renderer, this.camera), this.render(), this.helperVisible = S, R === void 0 ? this.modelScene.parameter.reset("modelAlpha") : this.modelScene.parameter.set("modelAlpha", R), this.renderer.setRenderTarget(d), this.camera.clearViewOffset(), this.camera.pixelRatio = f, this.getSize(this.camera.resolution), this.camera.aspect = this.camera.resolution.width / this.camera.resolution.height, this.modelScene.update(this.renderer, this.camera), this.scene.update(this.renderer, this.camera);
29656
- var w = A * y, I = g * y, B = w * I, M = B * 4;
29656
+ var w = A * y, I = g * y, P = w * I, M = P * 4;
29657
29657
  if (b) {
29658
29658
  if (b.length !== M)
29659
29659
  throw new Error("buffer length is not equals pixels ".concat(M));
29660
29660
  } else
29661
29661
  b = new Uint8Array(M);
29662
29662
  if (this.renderer.readRenderTargetPixels(C, 0, 0, A * y, g * y, b), v)
29663
- for (var P = B / 2, O = 0, L = 0, F = 0, D = 0; L < P; L++)
29663
+ for (var B = P / 2, O = 0, L = 0, F = 0, D = 0; L < B; L++)
29664
29664
  for (D = (I - Math.floor(L / w) - 1) * w + L % w, F = 0; F < 4; F++)
29665
29665
  O = b[L * 4 + F], b[L * 4 + F] = b[D * 4 + F], b[D * 4 + F] = O;
29666
29666
  return b;
@@ -29807,8 +29807,8 @@ void main() {
29807
29807
  };
29808
29808
  else {
29809
29809
  var y = (u = (s = this.work) === null || s === void 0 ? void 0 : s.workCode) !== null && u !== void 0 ? u : "", v = this.state.workCode;
29810
- this.works.filter(function(P) {
29811
- return P.workCode === v;
29810
+ this.works.filter(function(B) {
29811
+ return B.workCode === v;
29812
29812
  }).length > 0 && (y = v), g = {
29813
29813
  workCode: y,
29814
29814
  panoIndex: e.panoIndex
@@ -29831,8 +29831,8 @@ void main() {
29831
29831
  duration: this.modeChangeDuration,
29832
29832
  effect: "fly",
29833
29833
  userAction: !1
29834
- } }, this.commonParams()), this.controllerInits[E]), B = Controllers[E].initAnimationEndState(I);
29835
- T = B.longitude, b = B.latitude, S = B.fov, R = B.offset, C = B.distance;
29834
+ } }, this.commonParams()), this.controllerInits[E]), P = Controllers[E].initAnimationEndState(I);
29835
+ T = P.longitude, b = P.latitude, S = P.fov, R = P.offset, C = P.distance;
29836
29836
  } else
29837
29837
  T = (c = e.longitude) !== null && c !== void 0 ? c : this.state.longitude, b = (f = e.latitude) !== null && f !== void 0 ? f : this.state.latitude, S = (d = e.fov) !== null && d !== void 0 ? d : this.state.fov, R = (h = e.offset) !== null && h !== void 0 ? h : this.state.offset, C = (p = e.distance) !== null && p !== void 0 ? p : this.state.distance;
29838
29838
  var M = {
@@ -29910,7 +29910,7 @@ void main() {
29910
29910
  }), this.controller.stopMomentumMovement(), this.controller.cameraMotion.set(w, 0).catch(noop), this.controller.locationMotion.set(C, 0).catch(noop), !0;
29911
29911
  }
29912
29912
  } else {
29913
- var I = 1, B = Math.PI / 45, m = o ? this.state.fov : stepNumber(this.camera.pose.fov, this.state.fov, I), M = o ? { longitude: this.state.longitude, latitude: this.state.latitude } : stepCoordinates({ longitude: this.camera.pose.longitude, latitude: this.camera.pose.latitude }, { longitude: this.state.longitude, latitude: this.state.latitude }, B), S = M.longitude, R = M.latitude, y = this.state.distance, T = new THREE.Vector3().copy(this.state.offset);
29913
+ var I = 1, P = Math.PI / 45, m = o ? this.state.fov : stepNumber(this.camera.pose.fov, this.state.fov, I), M = o ? { longitude: this.state.longitude, latitude: this.state.latitude } : stepCoordinates({ longitude: this.camera.pose.longitude, latitude: this.camera.pose.latitude }, { longitude: this.state.longitude, latitude: this.state.latitude }, P), S = M.longitude, R = M.latitude, y = this.state.distance, T = new THREE.Vector3().copy(this.state.offset);
29914
29914
  if (notSimilarValue(y, this.camera.pose.distance) && (this.state.distance = this.camera.pose.distance), notSimilarVector3(T, this.camera.pose.offset) && (this.state.offset = this.camera.pose.offset.clone()), notSimilarValue(S, this.camera.pose.longitude, Math.PI * 2) || notSimilarValue(R, this.camera.pose.latitude) || notSimilarValue(m, this.camera.pose.fov))
29915
29915
  return this.controller.stopMomentumMovement(), this.controller.cameraMotion.set({ longitude: S, latitude: R, fov: m }, 0).catch(noop), !0;
29916
29916
  }
@@ -29918,7 +29918,7 @@ void main() {
29918
29918
  userAction: !1,
29919
29919
  state: this.state
29920
29920
  })), this.readyCallbacks.length && this.stateSynced) {
29921
- var P = this.currentMode, O = P === t.Mode.Floorplan || P === t.Mode.Topview || P === t.Mode.Mapview || P === t.Mode.Model;
29921
+ var B = this.currentMode, O = B === t.Mode.Floorplan || B === t.Mode.Topview || B === t.Mode.Mapview || B === t.Mode.Model;
29922
29922
  if (!O || this.modelScene.loaded) {
29923
29923
  var L = this.readyCallbacks.slice();
29924
29924
  this.readyCallbacks.length = 0;
@@ -29974,19 +29974,19 @@ void main() {
29974
29974
  w.viewerRequestVolume && (D.viewerRequestVolume = makeBoundingVolume(w.viewerRequestVolume)), D.parameter.set(omit(w, ["showLayers"])), w.showLayers === !1 ? D.visible = !1 : Array.isArray(w.showLayers) && (D.visible = w.showLayers.includes(D.name));
29975
29975
  }
29976
29976
  }), m.push(I), p && (I.visible = !1), E.modelScene.add(I);
29977
- var B = function() {
29977
+ var P = function() {
29978
29978
  AnimationFrameLoop.shared.add(function() {
29979
29979
  o.emit("model.load", createEvent("model.load", { work: S, model: I, error: null }));
29980
29980
  }, !0);
29981
29981
  }, M = function(L) {
29982
29982
  var F = L.error;
29983
29983
  o.emit("model.error", createEvent("model.error", { work: S, model: I, error: F })), o.throwError(F);
29984
- }, P = function() {
29984
+ }, B = function() {
29985
29985
  o.emit("model.changeShownFloor", createEvent("model.changeShownFloor", { work: S, model: I, error: null }));
29986
29986
  }, O = function() {
29987
- I.removeEventListener("load", B), I.removeEventListener("error", M), I.removeEventListener("changeShownFloor", P), I.removeEventListener("dispose", O);
29987
+ I.removeEventListener("load", P), I.removeEventListener("error", M), I.removeEventListener("changeShownFloor", B), I.removeEventListener("dispose", O);
29988
29988
  };
29989
- I.addEventListener("load", B), I.addEventListener("error", M), I.addEventListener("changeShownFloor", P), I.addEventListener("dispose", O), E.emit("model.request", createEvent("model.request", { work: S, model: I, error: null }));
29989
+ I.addEventListener("load", P), I.addEventListener("error", M), I.addEventListener("changeShownFloor", B), I.addEventListener("dispose", O), E.emit("model.request", createEvent("model.request", { work: S, model: I, error: null }));
29990
29990
  }
29991
29991
  }, E = this, T = 0; T < e.length; T++)
29992
29992
  v(T);