@realsee/five 6.6.0 → 6.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/search.js +1 -1
  3. package/docs/classes/five.Work.html +17 -15
  4. package/docs/functions/five.parseWork.html +1 -1
  5. package/docs/functions/five.workToJson.html +1 -1
  6. package/docs/functions/vue.useFiveWorks.html +2 -2
  7. package/docs/hierarchy.html +1 -1
  8. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +5 -5
  9. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  10. package/docs/interfaces/five.WorkImage.html +1 -1
  11. package/docs/interfaces/five.WorkInitialJson.html +2 -2
  12. package/docs/interfaces/five.WorkJson.html +2 -3
  13. package/docs/interfaces/five.WorkModelJson.html +2 -2
  14. package/docs/interfaces/five.WorkModelLayerJson.html +2 -2
  15. package/docs/interfaces/five.WorkObserver.html +1 -1
  16. package/docs/interfaces/five.WorkObserverJson.html +2 -2
  17. package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
  18. package/docs/interfaces/five.WorkPanoramasJson.html +2 -2
  19. package/docs/interfaces/five.WorkTile.html +1 -1
  20. package/docs/types/five.ParseOptions.html +6 -6
  21. package/five/index.d.ts +2 -1
  22. package/five/index.js +20 -20
  23. package/five/index.mjs +501 -495
  24. package/gltf-loader/index.js +2 -2
  25. package/gltf-loader/index.mjs +2 -2
  26. package/line/index.js +2 -2
  27. package/line/index.mjs +2 -2
  28. package/package.json +1 -1
  29. package/plugins/index.js +1 -1
  30. package/plugins/index.mjs +1 -1
  31. package/react/index.js +1 -1
  32. package/react/index.mjs +1 -1
  33. package/shader-lib/index.js +1 -1
  34. package/shader-lib/index.mjs +1 -1
  35. package/sticker/index.js +2 -2
  36. package/sticker/index.mjs +2 -2
  37. package/umd/five-gltf-loader.js +2 -2
  38. package/umd/five-line.js +2 -2
  39. package/umd/five-plugins.js +1 -1
  40. package/umd/five-react.js +1 -1
  41. package/umd/five-shader-lib.js +1 -1
  42. package/umd/five-sticker.js +2 -2
  43. package/umd/five-vfx.js +1 -1
  44. package/umd/five-vue.js +1 -1
  45. package/umd/five.js +20 -20
  46. package/vfx/index.js +1 -1
  47. package/vfx/index.mjs +1 -1
  48. package/vue/index.js +1 -1
  49. package/vue/index.mjs +1 -1
  50. package/work-downloader/index.js +1 -1
  51. package/work-downloader/index.mjs +1 -1
package/five/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  * @license
3
3
  * @realsee/five
4
4
  * Generated: 9/24/2025
5
- * Version: 6.6.0
5
+ * Version: 6.6.2
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -758,9 +758,9 @@ CryptoJS.lib.Cipher || (function(n) {
758
758
  w[C + 1] = w[C + 3], w[C + 3] = I, this._doCryptBlock(w, C, this._invKeySchedule, c, f, d, h, r), I = w[C + 1], w[C + 1] = w[C + 3], w[C + 3] = I;
759
759
  },
760
760
  _doCryptBlock: function(w, C, I, H, M, B, L, O) {
761
- for (var F = this._nRounds, Q = w[C] ^ I[0], U = w[C + 1] ^ I[1], j = w[C + 2] ^ I[2], J = w[C + 3] ^ I[3], N = 4, D = 1; D < F; D++)
762
- var V = H[Q >>> 24] ^ M[U >>> 16 & 255] ^ B[j >>> 8 & 255] ^ L[J & 255] ^ I[N++], z = H[U >>> 24] ^ M[j >>> 16 & 255] ^ B[J >>> 8 & 255] ^ L[Q & 255] ^ I[N++], G = H[j >>> 24] ^ M[J >>> 16 & 255] ^ B[Q >>> 8 & 255] ^ L[U & 255] ^ I[N++], J = H[J >>> 24] ^ M[Q >>> 16 & 255] ^ B[U >>> 8 & 255] ^ L[j & 255] ^ I[N++], Q = V, U = z, j = G;
763
- V = (O[Q >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[j >>> 8 & 255] << 8 | O[J & 255]) ^ I[N++], z = (O[U >>> 24] << 24 | O[j >>> 16 & 255] << 16 | O[J >>> 8 & 255] << 8 | O[Q & 255]) ^ I[N++], G = (O[j >>> 24] << 24 | O[J >>> 16 & 255] << 16 | O[Q >>> 8 & 255] << 8 | O[U & 255]) ^ I[N++], J = (O[J >>> 24] << 24 | O[Q >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[j & 255]) ^ I[N++], w[C] = V, w[C + 1] = z, w[C + 2] = G, w[C + 3] = J;
761
+ for (var F = this._nRounds, Q = w[C] ^ I[0], V = w[C + 1] ^ I[1], J = w[C + 2] ^ I[2], j = w[C + 3] ^ I[3], N = 4, D = 1; D < F; D++)
762
+ var U = H[Q >>> 24] ^ M[V >>> 16 & 255] ^ B[J >>> 8 & 255] ^ L[j & 255] ^ I[N++], z = H[V >>> 24] ^ M[J >>> 16 & 255] ^ B[j >>> 8 & 255] ^ L[Q & 255] ^ I[N++], G = H[J >>> 24] ^ M[j >>> 16 & 255] ^ B[Q >>> 8 & 255] ^ L[V & 255] ^ I[N++], j = H[j >>> 24] ^ M[Q >>> 16 & 255] ^ B[V >>> 8 & 255] ^ L[J & 255] ^ I[N++], Q = U, V = z, J = G;
763
+ U = (O[Q >>> 24] << 24 | O[V >>> 16 & 255] << 16 | O[J >>> 8 & 255] << 8 | O[j & 255]) ^ I[N++], z = (O[V >>> 24] << 24 | O[J >>> 16 & 255] << 16 | O[j >>> 8 & 255] << 8 | O[Q & 255]) ^ I[N++], G = (O[J >>> 24] << 24 | O[j >>> 16 & 255] << 16 | O[Q >>> 8 & 255] << 8 | O[V & 255]) ^ I[N++], j = (O[j >>> 24] << 24 | O[Q >>> 16 & 255] << 16 | O[V >>> 8 & 255] << 8 | O[J & 255]) ^ I[N++], w[C] = U, w[C + 1] = z, w[C + 2] = G, w[C + 3] = j;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -3187,39 +3187,39 @@ function X509(n) {
3187
3187
  return E(T).replace(/\//, "\\/");
3188
3188
  }).join("/");
3189
3189
  }, this.getInfo = function() {
3190
- var v = function(V) {
3191
- var z = JSON.stringify(V.array).replace(/[\[\]\{\}\"]/g, "");
3190
+ var v = function(U) {
3191
+ var z = JSON.stringify(U.array).replace(/[\[\]\{\}\"]/g, "");
3192
3192
  return z;
3193
- }, E = function(V) {
3194
- for (var z = "", G = V.array, J = 0; J < G.length; J++) {
3195
- var Q = G[J];
3193
+ }, E = function(U) {
3194
+ for (var z = "", G = U.array, j = 0; j < G.length; j++) {
3195
+ var Q = G[j];
3196
3196
  if (z += " policy oid: " + Q.policyoid + `
3197
3197
  `, Q.array !== void 0)
3198
- for (var U = 0; U < Q.array.length; U++) {
3199
- var j = Q.array[U];
3200
- j.cps !== void 0 && (z += " cps: " + j.cps + `
3198
+ for (var V = 0; V < Q.array.length; V++) {
3199
+ var J = Q.array[V];
3200
+ J.cps !== void 0 && (z += " cps: " + J.cps + `
3201
3201
  `);
3202
3202
  }
3203
3203
  }
3204
3204
  return z;
3205
- }, b = function(V) {
3206
- for (var z = "", G = V.array, J = 0; J < G.length; J++) {
3207
- var Q = G[J];
3205
+ }, b = function(U) {
3206
+ for (var z = "", G = U.array, j = 0; j < G.length; j++) {
3207
+ var Q = G[j];
3208
3208
  try {
3209
3209
  Q.dpname.full[0].uri !== void 0 && (z += " " + Q.dpname.full[0].uri + `
3210
3210
  `);
3211
- } catch (U) {
3211
+ } catch (V) {
3212
3212
  }
3213
3213
  try {
3214
3214
  Q.dname.full[0].dn.hex !== void 0 && (z += " " + X509.hex2dn(Q.dpname.full[0].dn.hex) + `
3215
3215
  `);
3216
- } catch (U) {
3216
+ } catch (V) {
3217
3217
  }
3218
3218
  }
3219
3219
  return z;
3220
- }, T = function(V) {
3221
- for (var z = "", G = V.array, J = 0; J < G.length; J++) {
3222
- var Q = G[J];
3220
+ }, T = function(U) {
3221
+ for (var z = "", G = U.array, j = 0; j < G.length; j++) {
3222
+ var Q = G[j];
3223
3223
  Q.caissuer !== void 0 && (z += " caissuer: " + Q.caissuer + `
3224
3224
  `), Q.ocsp !== void 0 && (z += " ocsp: " + Q.ocsp + `
3225
3225
  `);
@@ -3949,11 +3949,11 @@ var PBMCustomShader = (
3949
3949
  return !!Q;
3950
3950
  }).join(`
3951
3951
  `));
3952
- var V = String(r.clippers.length);
3953
- v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, V), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, V);
3952
+ var U = String(r.clippers.length);
3953
+ v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, U), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, U);
3954
3954
  for (var z = 0, G = B; z < G.length; z++) {
3955
- var J = G[z];
3956
- J.onBeforeCompile && J.onBeforeCompile(v, E);
3955
+ var j = G[z];
3956
+ j.onBeforeCompile && j.onBeforeCompile(v, E);
3957
3957
  }
3958
3958
  };
3959
3959
  var c = "";
@@ -5180,7 +5180,7 @@ function ajax(n, t, e, r, o) {
5180
5180
  return Promise.resolve().then(function() {
5181
5181
  return t.requestProxy ? t.requestProxy(n) : n;
5182
5182
  }).then(function(l) {
5183
- return locationIsHttps && /^http\:/.test(l) ? (console.warn("The page at '".concat(locationIsHttps, "' was loaded over HTTPS, but requested an insecure element '").concat(l, "'. This request was automatically upgraded to HTTPS")), l.replace(/^http\:/, "https:")) : l;
5183
+ return locationIsHttps && /^http\:/.test(l) ? (console.warn("The page at '".concat(locationHref, "' was loaded over HTTPS, but requested an insecure element '").concat(l, "'. This request was automatically upgraded to HTTPS")), l.replace(/^http\:/, "https:")) : l;
5184
5184
  }).catch(function(l) {
5185
5185
  var c;
5186
5186
  matchJsonpFunctionName(n);
@@ -5207,13 +5207,13 @@ function ajax(n, t, e, r, o) {
5207
5207
  }
5208
5208
  var O = C.split(","), F = (O[0].match(/:(.*?);/) || [])[1], N = O[1];
5209
5209
  if (t.responseType === "arraybuffer" || t.responseType === "blob") {
5210
- for (var D = atob(O[1]), V = D.length, z = new Uint8Array(V), G = 0; G < V; G++)
5210
+ for (var D = atob(O[1]), U = D.length, z = new Uint8Array(U), G = 0; G < U; G++)
5211
5211
  z[G] = D.charCodeAt(G);
5212
5212
  t.responseType === "arraybuffer" ? N = z.buffer : N = new Blob([z], { type: F });
5213
5213
  }
5214
- var J = {}, Q = {
5214
+ var j = {}, Q = {
5215
5215
  body: N,
5216
- meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: J }
5216
+ meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: j }
5217
5217
  };
5218
5218
  e(Q), c(Q), (H = t.networkSubscribe) === null || H === void 0 || H.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(Q.meta)), m = !0;
5219
5219
  }
@@ -5265,7 +5265,7 @@ function preload(n, t) {
5265
5265
  return Promise.resolve().then(function() {
5266
5266
  return t.requestProxy ? t.requestProxy(n) : n;
5267
5267
  }).then(function(o) {
5268
- return locationIsHttps && /^http\:/.test(o) ? (console.warn("The page at '".concat(locationIsHttps, "' was loaded over HTTPS, but requested an insecure element '").concat(o, "'. This request was automatically upgraded to HTTPS")), o.replace(/^http\:/, "https:")) : o;
5268
+ return locationIsHttps && /^http\:/.test(o) ? (console.warn("The page at '".concat(locationHref, "' was loaded over HTTPS, but requested an insecure element '").concat(o, "'. This request was automatically upgraded to HTTPS")), o.replace(/^http\:/, "https:")) : o;
5269
5269
  }).catch(function(o) {
5270
5270
  var s, u = new NetworkProxyError(r, "Link", o && o.message ? String(o.message) : String(o));
5271
5271
  return (s = t.networkSubscribe) === null || s === void 0 || s.emit("network", n, "Link", "forbidden", u.message), Promise.reject(u);
@@ -5305,7 +5305,7 @@ function loadImage(n, t, e, r, o, s) {
5305
5305
  return Promise.resolve().then(function() {
5306
5306
  return t.requestProxy ? t.requestProxy(n) : n;
5307
5307
  }).then(function(c) {
5308
- return locationIsHttps && /^http\:/.test(c) ? (console.warn("The page at '".concat(locationIsHttps, "' was loaded over HTTPS, but requested an insecure element '").concat(c, "'. This request was automatically upgraded to HTTPS")), c.replace(/^http\:/, "https:")) : c;
5308
+ return locationIsHttps && /^http\:/.test(c) ? (console.warn("The page at '".concat(locationHref, "' was loaded over HTTPS, but requested an insecure element '").concat(c, "'. This request was automatically upgraded to HTTPS")), c.replace(/^http\:/, "https:")) : c;
5309
5309
  }).catch(function(c) {
5310
5310
  var f, d = new NetworkProxyError(l, "Image", c && c.message ? String(c.message) : String(c));
5311
5311
  return (f = t.networkSubscribe) === null || f === void 0 || f.emit("network", n, "Image", "forbidden", d.message), Promise.reject(d);
@@ -7454,11 +7454,11 @@ function parsePBMModel(n) {
7454
7454
  S += h.faces.indices.length;
7455
7455
  }
7456
7456
  for (var w = new Float32Array(S * 3), C = new Float32Array(S * 2), I = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], L = 0, O = 0; O < T.length; O++) {
7457
- for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs, V = h.faces.indices, z = h.faces.normals, G = h.vertices.marks, J = V.length, R = 0; R < J; R++) {
7458
- var Q = V[R], U = w[L * 3 + R * 3] = N[Q * 3], j = w[L * 3 + R * 3 + 1] = N[Q * 3 + 1], X = w[L * 3 + R * 3 + 2] = N[Q * 3 + 2];
7457
+ for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs, U = h.faces.indices, z = h.faces.normals, G = h.vertices.marks, j = U.length, R = 0; R < j; R++) {
7458
+ var Q = U[R], V = w[L * 3 + R * 3] = N[Q * 3], J = w[L * 3 + R * 3 + 1] = N[Q * 3 + 1], W = w[L * 3 + R * 3 + 2] = N[Q * 3 + 2];
7459
7459
  H && (H[L + R] = G[Q]), C[L * 2 + R * 2] = D[Q * 2], C[L * 2 + R * 2 + 1] = D[Q * 2 + 1];
7460
- var Y = Math.floor(R / 3) * 3;
7461
- I[L * 3 + R * 3] = z[Y], I[L * 3 + R * 3 + 1] = z[Y + 1], I[L * 3 + R * 3 + 2] = z[Y + 2], U < F[0] && (F[0] = U), j < F[1] && (F[1] = j), X < F[2] && (F[2] = X), U > F[3] && (F[3] = U), j > F[4] && (F[4] = j), X > F[5] && (F[5] = X);
7460
+ var X = Math.floor(R / 3) * 3;
7461
+ I[L * 3 + R * 3] = z[X], I[L * 3 + R * 3 + 1] = z[X + 1], I[L * 3 + R * 3 + 2] = z[X + 2], V < F[0] && (F[0] = V), J < F[1] && (F[1] = J), W < F[2] && (F[2] = W), V > F[3] && (F[3] = V), J > F[4] && (F[4] = J), W > F[5] && (F[5] = W);
7462
7462
  }
7463
7463
  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({
7464
7464
  materialIndex: O,
@@ -7467,9 +7467,9 @@ function parsePBMModel(n) {
7467
7467
  start: L,
7468
7468
  count: h.faces.indices.length,
7469
7469
  texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
7470
- }), L += J;
7470
+ }), L += j;
7471
7471
  }
7472
- var W = {
7472
+ var Z = {
7473
7473
  createAt: o,
7474
7474
  description: s,
7475
7475
  vertices: w,
@@ -7481,20 +7481,20 @@ function parsePBMModel(n) {
7481
7481
  groups: M,
7482
7482
  extents: B
7483
7483
  };
7484
- u.push(W);
7484
+ u.push(Z);
7485
7485
  } else {
7486
- for (var S = 0, Z = 0, R = 0; R < T.length; R++) {
7486
+ for (var S = 0, Y = 0, R = 0; R < T.length; R++) {
7487
7487
  var h = T[R];
7488
- Z += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7488
+ Y += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7489
7489
  }
7490
- for (var w = new Float32Array(Z * 3), C = new Float32Array(Z * 2), I = void 0, K = new Float32Array(Z), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, L = 0, O = 0; O < T.length; O++) {
7491
- for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs, V = h.faces.indices, ie = N.length / 3, J = V.length, R = 0; R < ie; R++) {
7492
- var U = w[L * 3 + R * 3] = N[R * 3], j = w[L * 3 + R * 3 + 1] = N[R * 3 + 1], X = w[L * 3 + R * 3 + 2] = N[R * 3 + 2];
7493
- H && (H[L + R] = re[R]), C[L * 2 + R * 2] = D[R * 2], C[L * 2 + R * 2 + 1] = D[R * 2 + 1], K[L + R] = b, U < F[0] && (F[0] = U), j < F[1] && (F[1] = j), X < F[2] && (F[2] = X), U > F[3] && (F[3] = U), j > F[4] && (F[4] = j), X > F[5] && (F[5] = X);
7490
+ for (var w = new Float32Array(Y * 3), C = new Float32Array(Y * 2), I = void 0, K = new Float32Array(Y), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, L = 0, O = 0; O < T.length; O++) {
7491
+ for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs, U = h.faces.indices, ie = N.length / 3, j = U.length, R = 0; R < ie; R++) {
7492
+ var V = w[L * 3 + R * 3] = N[R * 3], J = w[L * 3 + R * 3 + 1] = N[R * 3 + 1], W = w[L * 3 + R * 3 + 2] = N[R * 3 + 2];
7493
+ H && (H[L + R] = re[R]), C[L * 2 + R * 2] = D[R * 2], C[L * 2 + R * 2 + 1] = D[R * 2 + 1], K[L + R] = b, V < F[0] && (F[0] = V), J < F[1] && (F[1] = J), W < F[2] && (F[2] = W), V > F[3] && (F[3] = V), J > F[4] && (F[4] = J), W > F[5] && (F[5] = W);
7494
7494
  }
7495
7495
  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]);
7496
- for (var R = 0; R < J; R++)
7497
- ee[te + R] = L + V[R];
7496
+ for (var R = 0; R < j; R++)
7497
+ ee[te + R] = L + U[R];
7498
7498
  M.push({
7499
7499
  materialIndex: O,
7500
7500
  name: h.name,
@@ -7502,9 +7502,9 @@ function parsePBMModel(n) {
7502
7502
  start: te,
7503
7503
  count: h.faces.indices.length,
7504
7504
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7505
- }), L += ie, te += J;
7505
+ }), L += ie, te += j;
7506
7506
  }
7507
- var W = {
7507
+ var Z = {
7508
7508
  createAt: o,
7509
7509
  description: s,
7510
7510
  vertices: w,
@@ -7516,7 +7516,7 @@ function parsePBMModel(n) {
7516
7516
  groups: M,
7517
7517
  extents: B
7518
7518
  };
7519
- u.push(W);
7519
+ u.push(Z);
7520
7520
  }
7521
7521
  }
7522
7522
  return u;
@@ -7550,29 +7550,29 @@ function parse$4(n, t, e, r, o, s, u) {
7550
7550
  B.addGroup(F.start, F.count, F.materialIndex);
7551
7551
  }
7552
7552
  p.add(B);
7553
- for (var N = [], D = 0, V = I; D < V.length; D++) {
7554
- var F = V[D], z = void 0;
7553
+ for (var N = [], D = 0, U = I; D < U.length; D++) {
7554
+ var F = U[D], z = void 0;
7555
7555
  if (F.texture) {
7556
7556
  if (z = F.texture, r.length > 0 && r.indexOf(F.texture) === -1) {
7557
- for (var G = F.texture, J = 0, Q = r; J < Q.length; J++) {
7558
- var U = Q[J], j = pathJoin(e, U), X = j.slice(G.length * -1) === G;
7559
- if (X) {
7560
- z = U;
7557
+ for (var G = 0, j = r; G < j.length; G++) {
7558
+ var Q = j[G], V = isAbsoluteURL(Q) ? Q : pathJoin(e, Q), J = V.slice(F.texture.length * -1) === F.texture;
7559
+ if (J) {
7560
+ z = Q;
7561
7561
  break;
7562
7562
  }
7563
7563
  }
7564
- console.warn("At3d/Pbm textures is not matched. use ends-with guess mode. texture: ".concat(G, " -> ").concat(z));
7564
+ console.warn("At3d/Pbm texture not matched. Use ends-guessing mode. ".concat(F.texture, " -> ").concat(z));
7565
7565
  }
7566
- z = pathJoin(e, z);
7566
+ isAbsoluteURL(z) || (z = pathJoin(e, z));
7567
7567
  }
7568
- var Y = new PBMMeshMaterial(t ? "phong" : "basic");
7569
- Y.floorIndex = C, B.attributes.normal === void 0 && (Y.flatShading = !0), B.attributes._feature_id_rsmask && (Y.defines.USE_VERTEX_MARK = !0), N.push(Y), z ? (m++, h[z] ? h[z].push(Y) : h[z] = [Y]) : Y.color = new THREE.Color(16777215), p.add(Y);
7568
+ var W = new PBMMeshMaterial(t ? "phong" : "basic");
7569
+ W.floorIndex = C, B.attributes.normal === void 0 && (W.flatShading = !0), B.attributes._feature_id_rsmask && (W.defines.USE_VERTEX_MARK = !0), N.push(W), z ? (m++, h[z] ? h[z].push(W) : h[z] = [W]) : W.color = new THREE.Color(16777215), p.add(W);
7570
7570
  }
7571
- var W = new PBMMesh(B, N);
7572
- W.name = "model_floor_" + C, 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
+ var X = new PBMMesh(B, N);
7572
+ X.name = "model_floor_" + C, X.userData.createAt = v, X.userData.description = E, X.matrix.compose(X.position, X.quaternion, X.scale), X.matrixAutoUpdate = !1, X.frustumCulled = !1, c = v, f = E, d.push(X);
7573
7573
  }
7574
7574
  o = autoRestImageOptionsByTextureLength(o, m);
7575
- for (var Z = [], K = function(re) {
7575
+ for (var Z = [], Y = function(re) {
7576
7576
  var ie = void 0;
7577
7577
  s && (ie = s.get(re)), ie || (ie = loadTexture$1(re, e, o, u), s && s.set(re, ie)), Z.push(ie.then(function(ce) {
7578
7578
  for (var ae = 0, de = h[re]; ae < de.length; ae++) {
@@ -7587,9 +7587,9 @@ function parse$4(n, t, e, r, o, s, u) {
7587
7587
  }
7588
7588
  return null;
7589
7589
  }));
7590
- }, ee = 0, te = Object.keys(h); ee < te.length; ee++) {
7591
- var G = te[ee];
7592
- K(G);
7590
+ }, K = 0, ee = Object.keys(h); K < ee.length; K++) {
7591
+ var te = ee[K];
7592
+ Y(te);
7593
7593
  }
7594
7594
  return Promise.all(Z).then(function(re) {
7595
7595
  var ie = re.filter(function(ce) {
@@ -8567,8 +8567,8 @@ function parse$3(n, t, e, r, o) {
8567
8567
  var M = parseGeometry(T[H].geometry);
8568
8568
  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);
8569
8569
  for (var B = [], L = 0, O = T[H].material; L < O.length; L++) {
8570
- var F = O[L], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material, V = N.textureReady;
8571
- u.push(V), B.push(D);
8570
+ var F = O[L], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material, U = N.textureReady;
8571
+ u.push(U), B.push(D);
8572
8572
  }
8573
8573
  var z = new PBMMesh(M, B);
8574
8574
  z.name = "chunk_" + H, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, I.add(z);
@@ -8996,37 +8996,37 @@ var Parser = (
8996
8996
  Promise.all(m),
8997
8997
  Promise.all(A)
8998
8998
  ]).then(function(w) {
8999
- for (var C = w[0], I = w[1], H = w[2], M = w[3], B = w[4], L = [], O = function(V, z) {
9000
- var G = C[V], J = I[V], Q = H[V], U = M[V], j = B[V];
8999
+ for (var C = w[0], I = w[1], H = w[2], M = w[3], B = w[4], L = [], O = function(U, z) {
9000
+ var G = C[U], j = I[U], Q = H[U], V = M[U], J = B[U];
9001
9001
  if (G === void 0)
9002
9002
  return "continue";
9003
9003
  G.updateMatrix(), G.matrixAutoUpdate = !0;
9004
- var X = void 0;
9005
- switch (PATH_PROPERTIES[j.path]) {
9004
+ var W = void 0;
9005
+ switch (PATH_PROPERTIES[J.path]) {
9006
9006
  case PATH_PROPERTIES.weights:
9007
- X = THREE.NumberKeyframeTrack;
9007
+ W = THREE.NumberKeyframeTrack;
9008
9008
  break;
9009
9009
  case PATH_PROPERTIES.rotation:
9010
- X = THREE.QuaternionKeyframeTrack;
9010
+ W = THREE.QuaternionKeyframeTrack;
9011
9011
  break;
9012
9012
  case PATH_PROPERTIES.position:
9013
9013
  case PATH_PROPERTIES.scale:
9014
9014
  default:
9015
- X = THREE.VectorKeyframeTrack;
9015
+ W = THREE.VectorKeyframeTrack;
9016
9016
  break;
9017
9017
  }
9018
- var Y = G.name ? G.name : G.uuid, W = U.interpolation !== void 0 ? INTERPOLATION[U.interpolation] : THREE.InterpolateLinear, Z = [];
9019
- PATH_PROPERTIES[j.path] === PATH_PROPERTIES.weights ? G.traverse(function(ae) {
9020
- ae.morphTargetInfluences && Z.push(ae.name ? ae.name : ae.uuid);
9021
- }) : Z.push(Y);
9018
+ var X = G.name ? G.name : G.uuid, Z = V.interpolation !== void 0 ? INTERPOLATION[V.interpolation] : THREE.InterpolateLinear, Y = [];
9019
+ PATH_PROPERTIES[J.path] === PATH_PROPERTIES.weights ? G.traverse(function(ae) {
9020
+ ae.morphTargetInfluences && Y.push(ae.name ? ae.name : ae.uuid);
9021
+ }) : Y.push(X);
9022
9022
  var K = Q.array;
9023
9023
  if (Q.normalized) {
9024
9024
  for (var ee = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), re = 0, ie = K.length; re < ie; re++)
9025
9025
  te[re] = K[re] * ee;
9026
9026
  K = te;
9027
9027
  }
9028
- for (var re = 0, ie = Z.length; re < ie; re++) {
9029
- var ce = new X(Z[re] + "." + PATH_PROPERTIES[j.path], J.array, K, W);
9028
+ for (var re = 0, ie = Y.length; re < ie; re++) {
9029
+ var ce = new W(Y[re] + "." + PATH_PROPERTIES[J.path], j.array, K, Z);
9030
9030
  L.push(ce);
9031
9031
  }
9032
9032
  }, F = 0, N = C.length; F < N; F++)
@@ -11691,8 +11691,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11691
11691
  I[M++] = N;
11692
11692
  }
11693
11693
  }
11694
- var V = I.subarray(0, R), z = I.subarray(R);
11695
- g = max(V), y = max(z), m = hMap(V, g, 1), A = hMap(z, y, 1);
11694
+ var U = I.subarray(0, R), z = I.subarray(R);
11695
+ g = max(U), y = max(z), m = hMap(U, g, 1), A = hMap(z, y, 1);
11696
11696
  } else
11697
11697
  err(1);
11698
11698
  else {
@@ -11710,42 +11710,42 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11710
11710
  }
11711
11711
  }
11712
11712
  l && f(p + 131072);
11713
- for (var G = (1 << g) - 1, J = (1 << y) - 1, Q = h; ; Q = h) {
11714
- var N = m[bits16(n, h) & G], U = N >> 4;
11713
+ for (var G = (1 << g) - 1, j = (1 << y) - 1, Q = h; ; Q = h) {
11714
+ var N = m[bits16(n, h) & G], V = N >> 4;
11715
11715
  if (h += N & 15, h > v) {
11716
11716
  c && err(0);
11717
11717
  break;
11718
11718
  }
11719
- if (N || err(2), U < 256)
11720
- e[p++] = U;
11721
- else if (U == 256) {
11719
+ if (N || err(2), V < 256)
11720
+ e[p++] = V;
11721
+ else if (V == 256) {
11722
11722
  Q = h, m = null;
11723
11723
  break;
11724
11724
  } else {
11725
- var j = U - 254;
11726
- if (U > 264) {
11727
- var M = U - 257, X = fleb[M];
11728
- j = bits(n, h, (1 << X) - 1) + fl[M], h += X;
11729
- }
11730
- var Y = A[bits16(n, h) & J], W = Y >> 4;
11731
- Y || err(3), h += Y & 15;
11732
- var z = fd[W];
11733
- if (W > 3) {
11734
- var X = fdeb[W];
11735
- z += bits16(n, h) & (1 << X) - 1, h += X;
11725
+ var J = V - 254;
11726
+ if (V > 264) {
11727
+ var M = V - 257, W = fleb[M];
11728
+ J = bits(n, h, (1 << W) - 1) + fl[M], h += W;
11729
+ }
11730
+ var X = A[bits16(n, h) & j], Z = X >> 4;
11731
+ X || err(3), h += X & 15;
11732
+ var z = fd[Z];
11733
+ if (Z > 3) {
11734
+ var W = fdeb[Z];
11735
+ z += bits16(n, h) & (1 << W) - 1, h += W;
11736
11736
  }
11737
11737
  if (h > v) {
11738
11738
  c && err(0);
11739
11739
  break;
11740
11740
  }
11741
11741
  l && f(p + 131072);
11742
- var Z = p + j;
11742
+ var Y = p + J;
11743
11743
  if (p < z) {
11744
- var K = s - z, ee = Math.min(z, Z);
11744
+ var K = s - z, ee = Math.min(z, Y);
11745
11745
  for (K + p < 0 && err(3); p < ee; ++p)
11746
11746
  e[p] = r[K + p];
11747
11747
  }
11748
- for (; p < Z; ++p)
11748
+ for (; p < Y; ++p)
11749
11749
  e[p] = e[p - z];
11750
11750
  }
11751
11751
  }
@@ -13441,7 +13441,7 @@ function loadX3p(n, t) {
13441
13441
  });
13442
13442
  }
13443
13443
  function parse$1(n, t) {
13444
- for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, w, C, I, H, M, B, L, O, F, N, D, V, z, G, J, Q, U, j, X, Y, W, Z, K, ee, te, re, ie, ce, ae, de, ge, ye, xe, le = unzipSync(n), he = "", ne = null, se = 0, pe = Object.keys(le); se < pe.length; se++) {
13444
+ for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, w, C, I, H, M, B, L, O, F, N, D, U, z, G, j, Q, V, J, W, X, Z, Y, K, ee, te, re, ie, ce, ae, de, ge, ye, xe, le = unzipSync(n), he = "", ne = null, se = 0, pe = Object.keys(le); se < pe.length; se++) {
13445
13445
  var me = pe[se];
13446
13446
  /(^|\/)main\.xml$/i.test(me) && (ne = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
13447
13447
  }
@@ -13469,7 +13469,7 @@ function parse$1(n, t) {
13469
13469
  offset: Number((N = (F = ve == null ? void 0 : ve.querySelector("CZ Offset")) === null || F === void 0 ? void 0 : F.textContent) !== null && N !== void 0 ? N : "0")
13470
13470
  }
13471
13471
  }, Te = null, Le = Ve.querySelector("Record1 Axes Rotation");
13472
- Le && (Te = new THREE.Matrix3(), Te.set(Number((V = (D = Le.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && V !== void 0 ? V : 0), Number((G = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && G !== void 0 ? G : 0), Number((Q = (J = Le.querySelector("r13")) === null || J === void 0 ? void 0 : J.textContent) !== null && Q !== void 0 ? Q : 0), Number((j = (U = Le.querySelector("r21")) === null || U === void 0 ? void 0 : U.textContent) !== null && j !== void 0 ? j : 0), Number((Y = (X = Le.querySelector("r22")) === null || X === void 0 ? void 0 : X.textContent) !== null && Y !== void 0 ? Y : 0), Number((Z = (W = Le.querySelector("r23")) === null || W === void 0 ? void 0 : W.textContent) !== null && Z !== void 0 ? Z : 0), Number((ee = (K = Le.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && ee !== void 0 ? ee : 0), Number((re = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && re !== void 0 ? re : 0), Number((ce = (ie = Le.querySelector("r33")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ce !== void 0 ? ce : 0)));
13472
+ Le && (Te = new THREE.Matrix3(), Te.set(Number((U = (D = Le.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && U !== void 0 ? U : 0), Number((G = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && G !== void 0 ? G : 0), Number((Q = (j = Le.querySelector("r13")) === null || j === void 0 ? void 0 : j.textContent) !== null && Q !== void 0 ? Q : 0), Number((J = (V = Le.querySelector("r21")) === null || V === void 0 ? void 0 : V.textContent) !== null && J !== void 0 ? J : 0), Number((X = (W = Le.querySelector("r22")) === null || W === void 0 ? void 0 : W.textContent) !== null && X !== void 0 ? X : 0), Number((Y = (Z = Le.querySelector("r23")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && Y !== void 0 ? Y : 0), Number((ee = (K = Le.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && ee !== void 0 ? ee : 0), Number((re = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && re !== void 0 ? re : 0), Number((ce = (ie = Le.querySelector("r33")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ce !== void 0 ? ce : 0)));
13473
13473
  var Ie = (ae = Ve.querySelector("Record3 DataLink PointDataLink")) === null || ae === void 0 ? void 0 : ae.textContent;
13474
13474
  if (typeof Ie != "string")
13475
13475
  throw new Error("X3p: PointDataLink not found.");
@@ -14103,16 +14103,16 @@ var BVHVector3 = (
14103
14103
  return B[D] - B[N];
14104
14104
  };
14105
14105
  function F(N) {
14106
- var D = N.startIndex, V = N.endIndex, z = N.extents;
14106
+ var D = N.startIndex, U = N.endIndex, z = N.extents;
14107
14107
  B[0] = z[3] - z[0], B[1] = z[4] - z[1], B[2] = z[5] - z[2], L.sort(O);
14108
14108
  for (var G = 0; G < 3; G++) {
14109
- for (var J = L[G], Q = z[J] + z[J + 3], U = D, j = V - 1, X = -1, Y = void 0; U <= j; )
14110
- X === -1 ? (Y = u[U], l[Y * 6 + J] + l[Y * 6 + J + 3] < Q ? U++ : X = Y) : (Y = u[j], l[Y * 6 + J] + l[Y * 6 + J + 3] >= Q || (u[U] = Y, u[j] = X, X = -1, U++), j--);
14111
- if (U > D && U < V) {
14112
- var W = new BVHNode(++d, calcExtents(u, l, D, U, EPSILON$1), D, U, N.deepth + 1);
14113
- W.deepth < r && W.endIndex - W.startIndex > e && (c[f++] = W);
14114
- var Z = new BVHNode(++d, calcExtents(u, l, U, V, EPSILON$1), U, V, N.deepth + 1);
14115
- Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), N.node0 = W, N.node1 = Z, N.startIndex = 0, N.endIndex = 0;
14109
+ for (var j = L[G], Q = z[j] + z[j + 3], V = D, J = U - 1, W = -1, X = void 0; V <= J; )
14110
+ W === -1 ? (X = u[V], l[X * 6 + j] + l[X * 6 + j + 3] < Q ? V++ : W = X) : (X = u[J], l[X * 6 + j] + l[X * 6 + j + 3] >= Q || (u[V] = X, u[J] = W, W = -1, V++), J--);
14111
+ if (V > D && V < U) {
14112
+ var Z = new BVHNode(++d, calcExtents(u, l, D, V, EPSILON$1), D, V, N.deepth + 1);
14113
+ Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z);
14114
+ var Y = new BVHNode(++d, calcExtents(u, l, V, U, EPSILON$1), V, U, N.deepth + 1);
14115
+ Y.deepth < r && Y.endIndex - Y.startIndex > e && (c[f++] = Y), N.node0 = Z, N.node1 = Y, N.startIndex = 0, N.endIndex = 0;
14116
14116
  break;
14117
14117
  }
14118
14118
  }
@@ -14147,24 +14147,24 @@ var BVHVector3 = (
14147
14147
  for (var T = e.x, S = e.y, R = e.z, w = r.x, C = r.y, I = r.z, H = h[E + 6], M = h[E + 7], B = H; B < M; B++) {
14148
14148
  var L = c[B], O = L * 3, F = new BVHVector3(0, 0, 0);
14149
14149
  this.getPositionByIndex(O, F);
14150
- var N = F.x, D = F.y, V = F.z, z = new BVHVector3(0, 0, 0);
14150
+ var N = F.x, D = F.y, U = F.z, z = new BVHVector3(0, 0, 0);
14151
14151
  this.getPositionByIndex(O + 1, z);
14152
- var G = z.x, J = z.y, Q = z.z, U = new BVHVector3(0, 0, 0);
14153
- this.getPositionByIndex(O + 2, U);
14154
- var j = U.x, X = U.y, Y = U.z, W = G - N, Z = J - D, K = Q - V, ee = j - N, te = X - D, re = Y - V, ie = Z * re - K * te, ce = K * ee - W * re, ae = W * te - Z * ee, de = w * ie + C * ce + I * ae, ge = void 0;
14152
+ var G = z.x, j = z.y, Q = z.z, V = new BVHVector3(0, 0, 0);
14153
+ this.getPositionByIndex(O + 2, V);
14154
+ var J = V.x, W = V.y, X = V.z, Z = G - N, Y = j - D, K = Q - U, ee = J - N, te = W - D, re = X - U, ie = Y * re - K * te, ce = K * ee - Z * re, ae = Z * te - Y * ee, de = w * ie + C * ce + I * ae, ge = void 0;
14155
14155
  if (de > 0)
14156
14156
  ge = 1;
14157
14157
  else if (de < 0)
14158
14158
  ge = -1, de = -de;
14159
14159
  else
14160
14160
  continue;
14161
- var ye = T - N, xe = S - D, le = R - V, he = ge * (w * (xe * re - le * te) + C * (le * ee - ye * re) + I * (ye * te - xe * ee));
14161
+ var ye = T - N, xe = S - D, le = R - U, he = ge * (w * (xe * re - le * te) + C * (le * ee - ye * re) + I * (ye * te - xe * ee));
14162
14162
  if (!(he < 0)) {
14163
- var ne = ge * (w * (Z * le - K * xe) + C * (K * ye - W * le) + I * (W * xe - Z * ye));
14163
+ var ne = ge * (w * (Y * le - K * xe) + C * (K * ye - Z * le) + I * (Z * xe - Y * ye));
14164
14164
  if (!(ne < 0) && !(he + ne > de)) {
14165
14165
  var se = -ge * (ye * ie + xe * ce + le * ae);
14166
14166
  if (!(se < 0)) {
14167
- var pe = se / de, me = new BVHVector3(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z, U, L, me);
14167
+ var pe = se / de, me = new BVHVector3(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z, V, L, me);
14168
14168
  (!u || u(Ne)) && (s ? pe < v && (v = pe, l.length > 0 && (l.length = 0), l.push(Ne)) : l.push(Ne));
14169
14169
  }
14170
14170
  }
@@ -14227,19 +14227,19 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14227
14227
  function I(H) {
14228
14228
  var M = H.startIndex, B = H.endIndex, L = H.extents;
14229
14229
  R[0] = L[3] - L[0], R[1] = L[4] - L[1], R[2] = L[5] - L[2];
14230
- for (var O = w.sort(C)[0], F = ORDER_AXISES[O], N = (L[O] + L[O + 3]) / 2, D = M, V = B - 1, z = -1, G; D <= V; )
14231
- z === -1 ? (G = l[D], s(G, scratchVector3$8), scratchVector3$8[F] < N ? D++ : z = G) : (G = l[V], s(G, scratchVector3$8), scratchVector3$8[F] >= N || (l[D] = G, l[V] = z, z = -1, D++), V--);
14230
+ for (var O = w.sort(C)[0], F = ORDER_AXISES[O], N = (L[O] + L[O + 3]) / 2, D = M, U = B - 1, z = -1, G; D <= U; )
14231
+ z === -1 ? (G = l[D], s(G, scratchVector3$8), scratchVector3$8[F] < N ? D++ : z = G) : (G = l[U], s(G, scratchVector3$8), scratchVector3$8[F] >= N || (l[D] = G, l[U] = z, z = -1, D++), U--);
14232
14232
  if (D > M) {
14233
- var J = L.slice();
14234
- J[O + 3] = N + EPSILON;
14235
- var Q = new BVHNode(++d, J, M, D, H.deepth + 1);
14233
+ var j = L.slice();
14234
+ j[O + 3] = N + EPSILON;
14235
+ var Q = new BVHNode(++d, j, M, D, H.deepth + 1);
14236
14236
  Q.deepth < r && Q.endIndex - Q.startIndex > e && (c[f++] = Q), H.node0 = Q;
14237
14237
  }
14238
14238
  if (B > D) {
14239
- var U = L.slice();
14240
- U[O] = N - EPSILON;
14241
- var j = new BVHNode(++d, U, D, B, H.deepth + 1);
14242
- j.deepth < r && j.endIndex - j.startIndex > e && (c[f++] = j), H.node1 = j;
14239
+ var V = L.slice();
14240
+ V[O] = N - EPSILON;
14241
+ var J = new BVHNode(++d, V, D, B, H.deepth + 1);
14242
+ J.deepth < r && J.endIndex - J.startIndex > e && (c[f++] = J), H.node1 = J;
14243
14243
  }
14244
14244
  H.startIndex = 0, H.endIndex = 0;
14245
14245
  }
@@ -14256,14 +14256,14 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14256
14256
  for (var S = h[b + 6], R = h[b + 7], w = S; w < R; w++) {
14257
14257
  var C = c[w], I = new BVHVector3(0, 0, 0);
14258
14258
  this.getPositionByIndex(C, I);
14259
- var H = I.x, M = I.y, B = I.z, L = e.x, O = e.y, F = e.z, N = r.x, D = r.y, V = r.z, z = N * (H - L) + D * (M - O) + V * (B - F);
14260
- if (z > 0 ? (L += N * z, O += D * z, F += V * z) : z < 0 && (z = 0), N = H - L, D = M - O, V = B - F, N * N + D * D + V * V <= m) {
14261
- var G = new BVHVector3(L, O, F), J = new BVHIntersect(I, I, I, C, G);
14262
- (!u || u(J)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(J)) : l.push(J));
14259
+ var H = I.x, M = I.y, B = I.z, L = e.x, O = e.y, F = e.z, N = r.x, D = r.y, U = r.z, z = N * (H - L) + D * (M - O) + U * (B - F);
14260
+ if (z > 0 ? (L += N * z, O += D * z, F += U * z) : z < 0 && (z = 0), N = H - L, D = M - O, U = B - F, N * N + D * D + U * U <= m) {
14261
+ var G = new BVHVector3(L, O, F), j = new BVHIntersect(I, I, I, C, G);
14262
+ (!u || u(j)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(j)) : l.push(j));
14263
14263
  }
14264
14264
  }
14265
- var Q = y * BYTES_PER_NODE / 2, U = p[Q + 16], j = p[Q + 17];
14266
- U && g.push(U), j && g.push(j);
14265
+ var Q = y * BYTES_PER_NODE / 2, V = p[Q + 16], J = p[Q + 17];
14266
+ V && g.push(V), J && g.push(J);
14267
14267
  }
14268
14268
  }
14269
14269
  return l;
@@ -14322,7 +14322,7 @@ function raycastMesh(n, t, e, r) {
14322
14322
  var B = v.pointA, L = v.pointB, O = v.pointC, F = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(B.x, B.y, B.z).applyMatrix4(u), scratchIntersectionFaceB.set(L.x, L.y, L.z).applyMatrix4(u), scratchIntersectionFaceC.set(O.x, O.y, O.z).applyMatrix4(u), new THREE.Vector3()), N = e.ray.direction.dot(F);
14323
14323
  if (S.side === THREE.FrontSide && N >= 0 || S.side === THREE.BackSide && N <= 0)
14324
14324
  return !1;
14325
- var D = new THREE.Face3(p ? p.array[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, F), V = {
14325
+ var D = new THREE.Face3(p ? p.array[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, F), U = {
14326
14326
  distance: M,
14327
14327
  object: n,
14328
14328
  face: D,
@@ -14330,7 +14330,7 @@ function raycastMesh(n, t, e, r) {
14330
14330
  distanceToRay: 0,
14331
14331
  faceIndex: b
14332
14332
  };
14333
- return intersectsMap.set(v, V), l(V);
14333
+ return intersectsMap.set(v, U), l(U);
14334
14334
  }), A = m.length, g = 0; g < A; g++) {
14335
14335
  var y = intersectsMap.get(m[g]);
14336
14336
  y && r.push(y);
@@ -15579,8 +15579,8 @@ function build(n, t) {
15579
15579
  M = [D, Promise.resolve([])];
15580
15580
  }
15581
15581
  H = M[0], H.name = C.name, H.flatShading = !(C.smooth || g.attributes.normal), H.vertexColors = A, n.materials[I] = H;
15582
- var V = M[1];
15583
- r.push(V), o.push(function() {
15582
+ var U = M[1];
15583
+ r.push(U), o.push(function() {
15584
15584
  return H.dispose();
15585
15585
  });
15586
15586
  }
@@ -16490,17 +16490,17 @@ var Tile3D = (
16490
16490
  var D = N.update(e, r, o, this, F, g);
16491
16491
  if (B.push(F.id), D && (A = !0), this.tileset.hasMixedContent && S.skipLevelOfDetail) {
16492
16492
  if (!F.state.finalResolution) {
16493
- var V = cloneSkipBackfaceObject(N);
16494
- V.name = "skipBackface:" + N.name, this.backfaceObjects.push(V);
16493
+ var U = cloneSkipBackfaceObject(N);
16494
+ U.name = "skipBackface:" + N.name, this.backfaceObjects.push(U);
16495
16495
  }
16496
- for (var z = F.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, J = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, j = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, Y = N.materials; X < Y.length; X++) {
16497
- var W = Y[X];
16498
- W.stencilWrite = !0, W.stencilRef = G, W.stencilFunc = J, W.stencilFuncMask = Q, W.stencilZPass = U, W.stencilWriteMask = j;
16496
+ for (var z = F.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, j = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, V = THREE.ReplaceStencilOp, J = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, W = 0, X = N.materials; W < X.length; W++) {
16497
+ var Z = X[W];
16498
+ Z.stencilWrite = !0, Z.stencilRef = G, Z.stencilFunc = j, Z.stencilFuncMask = Q, Z.stencilZPass = V, Z.stencilWriteMask = J;
16499
16499
  }
16500
16500
  } else
16501
- for (var Z = 0, K = N.materials; Z < K.length; Z++) {
16502
- var W = K[Z];
16503
- W.stencilWrite = !1, W.stencilRef = STENCIL_CONSTANT.TILE_MASK, W.stencilFunc = THREE.AlwaysStencilFunc, W.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, W.stencilZPass = THREE.ReplaceStencilOp, W.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16501
+ for (var Y = 0, K = N.materials; Y < K.length; Y++) {
16502
+ var Z = K[Y];
16503
+ Z.stencilWrite = !1, Z.stencilRef = STENCIL_CONSTANT.TILE_MASK, Z.stencilFunc = THREE.AlwaysStencilFunc, Z.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, Z.stencilZPass = THREE.ReplaceStencilOp, Z.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16504
16504
  }
16505
16505
  this.tileObjects.push(N);
16506
16506
  }
@@ -16978,10 +16978,10 @@ var BufferGeometryUtils = {
16978
16978
  for (var c = e.tangent.array, f = [], d = [], h = 0; h < l; h++)
16979
16979
  f[h] = new THREE.Vector3(), d[h] = new THREE.Vector3();
16980
16980
  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(), b = new THREE.Vector3();
16981
- function T(G, J, Q) {
16982
- p.fromArray(o, G * 3), m.fromArray(o, J * 3), A.fromArray(o, Q * 3), g.fromArray(u, G * 2), y.fromArray(u, J * 2), v.fromArray(u, Q * 2);
16983
- var U = m.x - p.x, j = A.x - p.x, X = m.y - p.y, Y = A.y - p.y, W = m.z - p.z, Z = A.z - p.z, K = y.x - g.x, ee = v.x - g.x, te = y.y - g.y, re = v.y - g.y, ie = 1 / (K * re - ee * te);
16984
- E.set((re * U - te * j) * ie, (re * X - te * Y) * ie, (re * W - te * Z) * ie), b.set((K * j - ee * U) * ie, (K * Y - ee * X) * ie, (K * Z - ee * W) * ie), f[G].add(E), f[J].add(E), f[Q].add(E), d[G].add(b), d[J].add(b), d[Q].add(b);
16981
+ function T(G, j, Q) {
16982
+ p.fromArray(o, G * 3), m.fromArray(o, j * 3), A.fromArray(o, Q * 3), g.fromArray(u, G * 2), y.fromArray(u, j * 2), v.fromArray(u, Q * 2);
16983
+ var V = m.x - p.x, J = A.x - p.x, W = m.y - p.y, X = A.y - p.y, Z = m.z - p.z, Y = A.z - p.z, K = y.x - g.x, ee = v.x - g.x, te = y.y - g.y, re = v.y - g.y, ie = 1 / (K * re - ee * te);
16984
+ E.set((re * V - te * J) * ie, (re * W - te * X) * ie, (re * Z - te * Y) * ie), b.set((K * J - ee * V) * ie, (K * X - ee * W) * ie, (K * Y - ee * Z) * ie), f[G].add(E), f[j].add(E), f[Q].add(E), d[G].add(b), d[j].add(b), d[Q].add(b);
16985
16985
  }
16986
16986
  var S = n.groups;
16987
16987
  S.length === 0 && (S = [{
@@ -16991,9 +16991,9 @@ var BufferGeometryUtils = {
16991
16991
  for (var h = 0, R = S.length; h < R; ++h)
16992
16992
  for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
16993
16993
  T(r[H + 0], r[H + 1], r[H + 2]);
16994
- var B = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), F = new THREE.Vector3(), N, D, V;
16994
+ var B = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), F = new THREE.Vector3(), N, D, U;
16995
16995
  function z(G) {
16996
- O.fromArray(s, G * 3), F.copy(O), D = f[G], B.copy(D), B.sub(O.multiplyScalar(O.dot(D))).normalize(), L.crossVectors(F, D), V = L.dot(d[G]), N = V < 0 ? -1 : 1, c[G * 4] = B.x, c[G * 4 + 1] = B.y, c[G * 4 + 2] = B.z, c[G * 4 + 3] = N;
16996
+ O.fromArray(s, G * 3), F.copy(O), D = f[G], B.copy(D), B.sub(O.multiplyScalar(O.dot(D))).normalize(), L.crossVectors(F, D), U = L.dot(d[G]), N = U < 0 ? -1 : 1, c[G * 4] = B.x, c[G * 4 + 1] = B.y, c[G * 4 + 2] = B.z, c[G * 4 + 3] = N;
16997
16997
  }
16998
16998
  for (var h = 0, R = S.length; h < R; ++h)
16999
16999
  for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
@@ -17159,13 +17159,13 @@ function getEdgesBySphere(n, t, e) {
17159
17159
  var f, d, h, p = (d = (f = c.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
17160
17160
  if (p && p.visible) {
17161
17161
  var m = [];
17162
- if (p.traverseVisible(function(J) {
17163
- if (J instanceof THREE.Mesh) {
17164
- var Q = getBvhTreeForMesh(J);
17162
+ if (p.traverseVisible(function(j) {
17163
+ if (j instanceof THREE.Mesh) {
17164
+ var Q = getBvhTreeForMesh(j);
17165
17165
  if (Q) {
17166
- scratchMatrix4$1.copy(J.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17167
- var U = Q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), j = new THREE.BufferGeometry();
17168
- j.setAttribute("position", new THREE.BufferAttribute(U, 3)), j.applyMatrix4(J.matrixWorld), j = BufferGeometryUtils.mergeVertices(j, 0.01), m.push(j);
17166
+ scratchMatrix4$1.copy(j.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17167
+ var V = Q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), J = new THREE.BufferGeometry();
17168
+ J.setAttribute("position", new THREE.BufferAttribute(V, 3)), J.applyMatrix4(j.matrixWorld), J = BufferGeometryUtils.mergeVertices(J, 0.01), m.push(J);
17169
17169
  }
17170
17170
  }
17171
17171
  }), m.length === 0)
@@ -17184,9 +17184,9 @@ function getEdgesBySphere(n, t, e) {
17184
17184
  M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: T } : M[D].face2 = T;
17185
17185
  }
17186
17186
  for (var D in M) {
17187
- var V = M[D];
17188
- if (V.face2 === void 0 || b[V.face1].normal.dot(b[V.face2].normal) <= r) {
17189
- var z = E[V.index1], G = E[V.index2];
17187
+ var U = M[D];
17188
+ if (U.face2 === void 0 || b[U.face1].normal.dot(b[U.face2].normal) <= r) {
17189
+ var z = E[U.index1], G = E[U.index2];
17190
17190
  o.push(new THREE.Line3(z, G));
17191
17191
  }
17192
17192
  }
@@ -17529,8 +17529,8 @@ var scratchBoundingBox$1 = new THREE.Box3(), scratchViewLayerBox = new THREE.Box
17529
17529
  })(THREE.Scene)
17530
17530
  );
17531
17531
  function workInitialToJson(n) {
17532
- var t, e = {};
17533
- return e.mode = n.mode, e.pano_index = n.panoIndex, e.longitude = n.longitude, e.latitude = n.latitude, e.fov = n.fov, e.distance = n.distance, e.offset = (t = n.offset) === null || t === void 0 ? void 0 : t.toArray(), e;
17532
+ var t = {};
17533
+ return typeof n.mode != "undefined" && (t.mode = n.mode), typeof n.panoIndex != "undefined" && (t.pano_index = n.panoIndex), typeof n.longitude != "undefined" && (t.longitude = n.longitude), typeof n.latitude != "undefined" && (t.latitude = n.latitude), typeof n.fov != "undefined" && (t.fov = n.fov), typeof n.distance != "undefined" && (t.distance = n.distance), typeof n.offset != "undefined" && (t.offset = n.offset.toArray()), t;
17534
17534
  }
17535
17535
  function workModelToJson(n) {
17536
17536
  var t;
@@ -17588,9 +17588,11 @@ function workObserverToPanoramaJson(n) {
17588
17588
  }
17589
17589
  function workToJson(n) {
17590
17590
  return {
17591
- _signature: "",
17591
+ // === 校验 ===
17592
17592
  allow_hosts: n.allowHosts.slice(),
17593
17593
  expire_at: n.expire.getTime().toString(),
17594
+ // === code ===
17595
+ project_id: n.projectId,
17594
17596
  code: n.workCode,
17595
17597
  name: n.name,
17596
17598
  // === base ===
@@ -17929,8 +17931,8 @@ function parse(n, t) {
17929
17931
  writable: !1,
17930
17932
  value: Object.freeze(T.allowHosts)
17931
17933
  });
17932
- var H = b.reduce(function(U, j) {
17933
- return jsonMerge(U, j);
17934
+ var H = b.reduce(function(V, J) {
17935
+ return jsonMerge(V, J);
17934
17936
  });
17935
17937
  defineProperty(t, "name", {
17936
17938
  enumerable: !0,
@@ -17941,12 +17943,16 @@ function parse(n, t) {
17941
17943
  enumerable: !0,
17942
17944
  writable: !0,
17943
17945
  value: String(H.resource_code || H.basic_code || H.vr_code || H.code || H.project_id || H.work_code || H.workCode || createUuid())
17946
+ }), defineProperty(t, "projectId", {
17947
+ enumerable: !0,
17948
+ writable: !0,
17949
+ value: H.project_id
17944
17950
  }), defineProperty(t, "baseURL", {
17945
17951
  enumerable: !0,
17946
17952
  writable: !0,
17947
17953
  value: (function() {
17948
- var U, j = (U = H.base_url) !== null && U !== void 0 ? U : "";
17949
- return j && j[j.length - 1] !== "/" && (j += "/"), j;
17954
+ var V, J = (V = H.base_url) !== null && V !== void 0 ? V : "";
17955
+ return J && J[J.length - 1] !== "/" && (J += "/"), J;
17950
17956
  })()
17951
17957
  });
17952
17958
  var M = void 0;
@@ -17960,35 +17966,35 @@ function parse(n, t) {
17960
17966
  configurable: !1,
17961
17967
  writable: !1,
17962
17968
  value: (function() {
17963
- var U = H.model.file_url;
17964
- if (U)
17965
- return relativeURL(U, t.baseURL);
17969
+ var V = H.model.file_url;
17970
+ if (V)
17971
+ return relativeURL(V, t.baseURL);
17966
17972
  })()
17967
17973
  }), defineProperty(M, "textureBase", {
17968
17974
  enumerable: !0,
17969
17975
  configurable: !1,
17970
17976
  writable: !1,
17971
17977
  value: (function() {
17972
- var U = H.model.material_base_url;
17973
- return U && (U = relativeURL(U, t.baseURL)), U;
17978
+ var V = H.model.material_base_url;
17979
+ return V && (V = relativeURL(V, t.baseURL)), V;
17974
17980
  })()
17975
17981
  }), defineProperty(M, "textures", {
17976
17982
  enumerable: !0,
17977
17983
  configurable: !1,
17978
17984
  writable: !1,
17979
17985
  value: (function() {
17980
- var U = void 0;
17981
- return Array.isArray(H.model.material_textures) && (U = H.model.material_textures.slice(), Object.freeze(U)), U;
17986
+ var V = void 0;
17987
+ return Array.isArray(H.model.material_textures) && (V = H.model.material_textures.slice(), Object.freeze(V)), V;
17982
17988
  })()
17983
17989
  }), defineProperty(M, "layers", {
17984
17990
  enumerable: !0,
17985
17991
  configurable: !1,
17986
17992
  writable: !1,
17987
17993
  value: (function() {
17988
- var U, j, X, Y = [];
17994
+ var V, J, W, X = [];
17989
17995
  if (Array.isArray(H.model.layers))
17990
- for (var W = 0, Z = H.model.layers; W < Z.length; W++) {
17991
- var K = Z[W];
17996
+ for (var Z = 0, Y = H.model.layers; Z < Y.length; Z++) {
17997
+ var K = Y[Z];
17992
17998
  if (K && K.tileset_url) {
17993
17999
  var ee = {};
17994
18000
  defineProperty(ee, "work", {
@@ -18000,23 +18006,23 @@ function parse(n, t) {
18000
18006
  enumerable: !0,
18001
18007
  configurable: !1,
18002
18008
  writable: !1,
18003
- value: (U = K.name) !== null && U !== void 0 ? U : ""
18009
+ value: (V = K.name) !== null && V !== void 0 ? V : ""
18004
18010
  }), defineProperty(ee, "type", {
18005
18011
  enumerable: !0,
18006
18012
  configurable: !1,
18007
18013
  writable: !1,
18008
- value: (j = K.type) !== null && j !== void 0 ? j : "mesh"
18014
+ value: (J = K.type) !== null && J !== void 0 ? J : "mesh"
18009
18015
  }), defineProperty(ee, "upAxis", {
18010
18016
  enumerable: !0,
18011
18017
  configurable: !1,
18012
18018
  writable: !1,
18013
- value: (X = K.up_axis) !== null && X !== void 0 ? X : "Z"
18019
+ value: (W = K.up_axis) !== null && W !== void 0 ? W : "Z"
18014
18020
  }), defineProperty(ee, "tileset", {
18015
18021
  enumerable: !0,
18016
18022
  configurable: !1,
18017
18023
  writable: !1,
18018
18024
  value: relativeURL(K.tileset_url, t.baseURL)
18019
- }), Y.push(ee);
18025
+ }), X.push(ee);
18020
18026
  }
18021
18027
  }
18022
18028
  if (typeof H.model.tiles == "object") {
@@ -18048,10 +18054,10 @@ function parse(n, t) {
18048
18054
  configurable: !1,
18049
18055
  writable: !1,
18050
18056
  value: relativeURL(K.tileset_url, t.baseURL)
18051
- }), Y.push(ee);
18057
+ }), X.push(ee);
18052
18058
  }
18053
18059
  }
18054
- return Object.freeze(Y);
18060
+ return Object.freeze(X);
18055
18061
  })()
18056
18062
  })), defineProperty(t, "model", {
18057
18063
  enumerable: !0,
@@ -18061,141 +18067,141 @@ function parse(n, t) {
18061
18067
  });
18062
18068
  var B = [];
18063
18069
  if (Array.isArray(H.observers) && H.panorama && Array.isArray(H.panorama.list || H.panorama.info))
18064
- for (var L = H.observers, O = (r = H.panorama.list || H.panorama.info) !== null && r !== void 0 ? r : [], F = (f = (l = (s = (o = H.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = H.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = H.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", N = Math.min(L.length, O.length), D = function(U) {
18065
- var j = L[U], X = O[U], Y = {};
18066
- defineProperty(Y, "work", {
18070
+ for (var L = H.observers, O = (r = H.panorama.list || H.panorama.info) !== null && r !== void 0 ? r : [], F = (f = (l = (s = (o = H.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = H.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = H.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", N = Math.min(L.length, O.length), D = function(V) {
18071
+ var J = L[V], W = O[V], X = {};
18072
+ defineProperty(X, "work", {
18067
18073
  enumerable: !1,
18068
18074
  configurable: !1,
18069
18075
  writable: !1,
18070
18076
  value: t
18071
- }), defineProperty(Y, "index", {
18077
+ }), defineProperty(X, "index", {
18072
18078
  enumerable: !0,
18073
18079
  configurable: !1,
18074
18080
  writable: !1,
18075
- value: U
18076
- }), defineProperty(Y, "panoIndex", {
18081
+ value: V
18082
+ }), defineProperty(X, "panoIndex", {
18077
18083
  enumerable: !0,
18078
18084
  configurable: !1,
18079
18085
  writable: !1,
18080
- value: U
18081
- }), defineProperty(Y, "panoId", {
18086
+ value: V
18087
+ }), defineProperty(X, "panoId", {
18082
18088
  enumerable: !0,
18083
18089
  configurable: !1,
18084
18090
  writable: !1,
18085
- value: panoStringify({ workCode: t.workCode, panoIndex: U })
18086
- }), defineProperty(Y, "derivedId", {
18091
+ value: panoStringify({ workCode: t.workCode, panoIndex: V })
18092
+ }), defineProperty(X, "derivedId", {
18087
18093
  enumerable: !0,
18088
18094
  configurable: !1,
18089
18095
  writable: !1,
18090
- value: (d = j.derived_id) !== null && d !== void 0 ? d : X.derived_id
18091
- }), defineProperty(Y, "floorIndex", {
18096
+ value: (d = J.derived_id) !== null && d !== void 0 ? d : W.derived_id
18097
+ }), defineProperty(X, "floorIndex", {
18092
18098
  enumerable: !0,
18093
18099
  configurable: !1,
18094
18100
  writable: !1,
18095
- value: (h = j.floor_index) !== null && h !== void 0 ? h : j.floor
18096
- }), defineProperty(Y, "derivedId", {
18101
+ value: (h = J.floor_index) !== null && h !== void 0 ? h : J.floor
18102
+ }), defineProperty(X, "derivedId", {
18097
18103
  enumerable: !0,
18098
18104
  configurable: !1,
18099
18105
  writable: !1,
18100
- value: (p = j.derived_id) !== null && p !== void 0 ? p : X.derived_id
18101
- }), defineProperty(Y, "derivedIdStr", {
18106
+ value: (p = J.derived_id) !== null && p !== void 0 ? p : W.derived_id
18107
+ }), defineProperty(X, "derivedIdStr", {
18102
18108
  enumerable: !0,
18103
18109
  configurable: !1,
18104
18110
  writable: !1,
18105
- value: (m = j.derived_id_str) !== null && m !== void 0 ? m : X.derived_id_str
18106
- }), defineProperty(Y, "active", {
18111
+ value: (m = J.derived_id_str) !== null && m !== void 0 ? m : W.derived_id_str
18112
+ }), defineProperty(X, "active", {
18107
18113
  enumerable: !0,
18108
18114
  configurable: !1,
18109
18115
  writable: !1,
18110
- value: j.active !== !1 && X.active !== !1
18111
- }), defineProperty(Y, "loadable", {
18116
+ value: J.active !== !1 && W.active !== !1
18117
+ }), defineProperty(X, "loadable", {
18112
18118
  enumerable: !0,
18113
18119
  configurable: !1,
18114
18120
  writable: !1,
18115
- value: (g = (A = j.active) !== null && A !== void 0 ? A : X.active) !== null && g !== void 0 ? g : !1
18116
- }), defineProperty(Y, "position", {
18121
+ value: (g = (A = J.active) !== null && A !== void 0 ? A : W.active) !== null && g !== void 0 ? g : !1
18122
+ }), defineProperty(X, "position", {
18117
18123
  enumerable: !0,
18118
18124
  configurable: !1,
18119
18125
  writable: !1,
18120
- value: Object.freeze(new THREE.Vector3().fromArray((y = j.position) !== null && y !== void 0 ? y : [0, 0, 0]))
18121
- }), defineProperty(Y, "standingPosition", {
18126
+ value: Object.freeze(new THREE.Vector3().fromArray((y = J.position) !== null && y !== void 0 ? y : [0, 0, 0]))
18127
+ }), defineProperty(X, "standingPosition", {
18122
18128
  enumerable: !0,
18123
18129
  configurable: !1,
18124
18130
  writable: !1,
18125
- value: Object.freeze(new THREE.Vector3().fromArray((E = (v = j.standing_position) !== null && v !== void 0 ? v : j.standingPosition) !== null && E !== void 0 ? E : [0, 0, 0]))
18126
- }), defineProperty(Y, "quaternion", {
18131
+ value: Object.freeze(new THREE.Vector3().fromArray((E = (v = J.standing_position) !== null && v !== void 0 ? v : J.standingPosition) !== null && E !== void 0 ? E : [0, 0, 0]))
18132
+ }), defineProperty(X, "quaternion", {
18127
18133
  enumerable: !0,
18128
18134
  configurable: !1,
18129
18135
  writable: !1,
18130
- value: Object.freeze(new THREE.Quaternion().fromArray(j.quaternion ? [j.quaternion.x, j.quaternion.y, j.quaternion.z, j.quaternion.w] : [0, 0, 0, 1]))
18131
- }), defineProperty(Y, "matrix", {
18136
+ value: Object.freeze(new THREE.Quaternion().fromArray(J.quaternion ? [J.quaternion.x, J.quaternion.y, J.quaternion.z, J.quaternion.w] : [0, 0, 0, 1]))
18137
+ }), defineProperty(X, "matrix", {
18132
18138
  enumerable: !0,
18133
18139
  configurable: !1,
18134
18140
  writable: !1,
18135
- value: Object.freeze(new THREE.Matrix4().compose(Y.position, Y.quaternion, PANO_TEXTURE_SCALE))
18136
- }), defineProperty(Y, "accessibleNodes", {
18141
+ value: Object.freeze(new THREE.Matrix4().compose(X.position, X.quaternion, PANO_TEXTURE_SCALE))
18142
+ }), defineProperty(X, "accessibleNodes", {
18137
18143
  enumerable: !0,
18138
18144
  configurable: !1,
18139
18145
  writable: !1,
18140
18146
  value: (function() {
18141
- var W, Z, K = ((Z = (W = j.accessible_nodes) !== null && W !== void 0 ? W : j.accessibleNodes) !== null && Z !== void 0 ? Z : []).filter(function(te) {
18147
+ var Z, Y, K = ((Y = (Z = J.accessible_nodes) !== null && Z !== void 0 ? Z : J.accessibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18142
18148
  return te < N;
18143
18149
  });
18144
18150
  if (K.length === 0)
18145
18151
  for (var ee = 0; ee < N; ee++)
18146
- ee !== U && K.push(ee);
18152
+ ee !== V && K.push(ee);
18147
18153
  return Object.freeze(K);
18148
18154
  })()
18149
- }), defineProperty(Y, "visibleNodes", {
18155
+ }), defineProperty(X, "visibleNodes", {
18150
18156
  enumerable: !0,
18151
18157
  configurable: !1,
18152
18158
  writable: !1,
18153
18159
  value: (function() {
18154
- var W, Z, K = ((Z = (W = j.visible_nodes) !== null && W !== void 0 ? W : j.visibleNodes) !== null && Z !== void 0 ? Z : []).filter(function(te) {
18160
+ var Z, Y, K = ((Y = (Z = J.visible_nodes) !== null && Z !== void 0 ? Z : J.visibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18155
18161
  return te < N;
18156
18162
  });
18157
18163
  if (K.length === 0)
18158
18164
  for (var ee = 0; ee < N; ee++)
18159
- ee !== U && K.push(ee);
18165
+ ee !== V && K.push(ee);
18160
18166
  return Object.freeze(K);
18161
18167
  })()
18162
- }), defineProperty(Y, "images", {
18168
+ }), defineProperty(X, "images", {
18163
18169
  enumerable: !0,
18164
18170
  configurable: !1,
18165
18171
  writable: !1,
18166
18172
  value: (function() {
18167
- var W = {};
18168
- defineProperty(W, "work", {
18173
+ var Z = {};
18174
+ defineProperty(Z, "work", {
18169
18175
  enumerable: !1,
18170
18176
  configurable: !1,
18171
18177
  writable: !1,
18172
18178
  value: t
18173
18179
  });
18174
- for (var Z = 0, K = FACE_ORDER$1; Z < K.length; Z++) {
18175
- var ee = K[Z];
18176
- defineProperty(W, ee, {
18180
+ for (var Y = 0, K = FACE_ORDER$1; Y < K.length; Y++) {
18181
+ var ee = K[Y];
18182
+ defineProperty(Z, ee, {
18177
18183
  enumerable: !0,
18178
18184
  configurable: !1,
18179
18185
  writable: !1,
18180
- value: relativeURL(panoURL(X[ee], F, U), t.baseURL)
18186
+ value: relativeURL(panoURL(W[ee], F, V), t.baseURL)
18181
18187
  });
18182
18188
  }
18183
- return defineProperty(W, "sizeList", {
18189
+ return defineProperty(Z, "sizeList", {
18184
18190
  enumerable: !0,
18185
18191
  configurable: !1,
18186
18192
  writable: !1,
18187
18193
  value: (function() {
18188
- var te = getImageSizeFromURL(W[FACE_ORDER$1[0]]);
18194
+ var te = getImageSizeFromURL(Z[FACE_ORDER$1[0]]);
18189
18195
  if (te) {
18190
- if (X.size_list) {
18191
- var re = X.size_list.slice().sort(function(ye, xe) {
18196
+ if (W.size_list) {
18197
+ var re = W.size_list.slice().sort(function(ye, xe) {
18192
18198
  return ye - xe;
18193
18199
  });
18194
18200
  return Object.freeze(re);
18195
- } else if (X.tiles) {
18201
+ } else if (W.tiles) {
18196
18202
  for (var re = [
18197
18203
  te
18198
- ], ie = X.tiles.slice().sort(function(xe, le) {
18204
+ ], ie = W.tiles.slice().sort(function(xe, le) {
18199
18205
  return xe - le;
18200
18206
  }), ce = 0, ae = ie; ce < ae.length; ce++) {
18201
18207
  var de = ae[ce], ge = 512 * Math.pow(2, de);
@@ -18206,14 +18212,14 @@ function parse(n, t) {
18206
18212
  }
18207
18213
  return Object.freeze([]);
18208
18214
  })()
18209
- }), defineProperty(W, "tiles", {
18215
+ }), defineProperty(Z, "tiles", {
18210
18216
  enumerable: !0,
18211
18217
  configurable: !1,
18212
18218
  writable: !1,
18213
18219
  value: (function() {
18214
- var te = getImageSizeFromURL(W.front);
18220
+ var te = getImageSizeFromURL(Z.front);
18215
18221
  if (te) {
18216
- var re = W.sizeList.slice();
18222
+ var re = Z.sizeList.slice();
18217
18223
  if (re[0]) {
18218
18224
  var ie = getTileLevel(re[0]);
18219
18225
  if (ie)
@@ -18253,7 +18259,7 @@ function parse(n, t) {
18253
18259
  enumerable: !0,
18254
18260
  configurable: !1,
18255
18261
  writable: !1,
18256
- value: replaceImageSize(W[se], ye)
18262
+ value: replaceImageSize(Z[se], ye)
18257
18263
  });
18258
18264
  }
18259
18265
  } else {
@@ -18274,7 +18280,7 @@ function parse(n, t) {
18274
18280
  enumerable: !0,
18275
18281
  configurable: !1,
18276
18282
  writable: !1,
18277
- value: W[se]
18283
+ value: Z[se]
18278
18284
  });
18279
18285
  }
18280
18286
  }
@@ -18285,39 +18291,39 @@ function parse(n, t) {
18285
18291
  }
18286
18292
  }
18287
18293
  })()
18288
- }), W;
18294
+ }), Z;
18289
18295
  })()
18290
- }), defineProperty(Y, "video", {
18296
+ }), defineProperty(X, "video", {
18291
18297
  enumerable: !0,
18292
18298
  configurable: !1,
18293
18299
  writable: !1,
18294
18300
  value: (function() {
18295
- var W = void 0;
18296
- return X.video && (W = {}, defineProperty(W, "work", {
18301
+ var Z = void 0;
18302
+ return W.video && (Z = {}, defineProperty(Z, "work", {
18297
18303
  enumerable: !1,
18298
18304
  configurable: !1,
18299
18305
  writable: !1,
18300
18306
  value: t
18301
- }), defineProperty(W, "source", {
18307
+ }), defineProperty(Z, "source", {
18302
18308
  enumerable: !0,
18303
18309
  configurable: !1,
18304
18310
  writable: !1,
18305
- value: X.video.source
18306
- }), defineProperty(W, "matrix", {
18311
+ value: W.video.source
18312
+ }), defineProperty(Z, "matrix", {
18307
18313
  enumerable: !0,
18308
18314
  configurable: !1,
18309
18315
  writable: !1,
18310
- value: new THREE.Matrix4().fromArray(X.video.matrix)
18311
- }), defineProperty(W, "size", {
18316
+ value: new THREE.Matrix4().fromArray(W.video.matrix)
18317
+ }), defineProperty(Z, "size", {
18312
18318
  enumerable: !0,
18313
18319
  configurable: !1,
18314
18320
  writable: !1,
18315
- value: new THREE.Vector2().fromArray(X.video.size)
18316
- })), W;
18321
+ value: new THREE.Vector2().fromArray(W.video.size)
18322
+ })), Z;
18317
18323
  })()
18318
- }), B.push(Y);
18319
- }, V = 0; V < N; V++)
18320
- D(V);
18324
+ }), B.push(X);
18325
+ }, U = 0; U < N; U++)
18326
+ D(U);
18321
18327
  defineProperty(t, "observers", {
18322
18328
  enumerable: !0,
18323
18329
  configurable: !1,
@@ -18372,9 +18378,9 @@ function parse(n, t) {
18372
18378
  writable: !0,
18373
18379
  value: H.initial.distance
18374
18380
  }), Array.isArray(H.initial.offset)) {
18375
- var J = H.initial.offset, Q = [0, 0, 0].map(function(U, j) {
18376
- var X = Number(J[j]);
18377
- return isNaN(X) || !isFinite(X) ? 0 : X;
18381
+ var j = H.initial.offset, Q = [0, 0, 0].map(function(V, J) {
18382
+ var W = Number(j[J]);
18383
+ return isNaN(W) || !isFinite(W) ? 0 : W;
18378
18384
  });
18379
18385
  defineProperty(z, "offset", {
18380
18386
  enumerable: !0,
@@ -20194,7 +20200,7 @@ var Hammer = (function(n, t, e, r) {
20194
20200
  var _ = P.ownerDocument || P;
20195
20201
  return _.defaultView || _.parentWindow || n;
20196
20202
  }
20197
- var D = /mobile|tablet|ip(ad|hone|od)|android/i, V = "ontouchstart" in n, z = L(n, "PointerEvent") !== r, G = V && D.test(navigator.userAgent), J = "touch", Q = "pen", U = "mouse", j = "kinect", X = 25, Y = 1, W = 2, Z = 4, K = 8, ee = 1, te = 2, re = 4, ie = 8, ce = 16, ae = te | re, de = ie | ce, ge = ae | de, ye = ["x", "y"], xe = ["clientX", "clientY"];
20203
+ var D = /mobile|tablet|ip(ad|hone|od)|android/i, U = "ontouchstart" in n, z = L(n, "PointerEvent") !== r, G = U && D.test(navigator.userAgent), j = "touch", Q = "pen", V = "mouse", J = "kinect", W = 25, X = 1, Z = 2, Y = 4, K = 8, ee = 1, te = 2, re = 4, ie = 8, ce = 16, ae = te | re, de = ie | ce, ge = ae | de, ye = ["x", "y"], xe = ["clientX", "clientY"];
20198
20204
  function le(P, _) {
20199
20205
  var k = this;
20200
20206
  this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(q) {
@@ -20223,10 +20229,10 @@ var Hammer = (function(n, t, e, r) {
20223
20229
  };
20224
20230
  function he(P) {
20225
20231
  var _, k = P.options.inputClass;
20226
- return k ? _ = k : z ? _ = Be : G ? _ = Ue : V ? _ = ht : _ = ke, new _(P, ne);
20232
+ return k ? _ = k : z ? _ = Be : G ? _ = Ue : U ? _ = ht : _ = ke, new _(P, ne);
20227
20233
  }
20228
20234
  function ne(P, _, k) {
20229
- var q = k.pointers.length, $ = k.changedPointers.length, oe = _ & Y && q - $ === 0, be = _ & (Z | K) && q - $ === 0;
20235
+ var q = k.pointers.length, $ = k.changedPointers.length, oe = _ & X && q - $ === 0, be = _ & (Y | K) && q - $ === 0;
20230
20236
  k.isFirst = !!oe, k.isFinal = !!be, oe && (P.session = {}), k.eventType = _, se(P, k), P.emit("hammer.input", k), P.recognize(k), P.session.prevInput = k;
20231
20237
  }
20232
20238
  function se(P, _) {
@@ -20241,7 +20247,7 @@ var Hammer = (function(n, t, e, r) {
20241
20247
  }
20242
20248
  function pe(P, _) {
20243
20249
  var k = _.center, q = P.offsetDelta || {}, $ = P.prevDelta || {}, oe = P.prevInput || {};
20244
- (_.eventType === Y || oe.eventType === Z) && ($ = P.prevDelta = {
20250
+ (_.eventType === X || oe.eventType === Y) && ($ = P.prevDelta = {
20245
20251
  x: oe.deltaX || 0,
20246
20252
  y: oe.deltaY || 0
20247
20253
  }, q = P.offsetDelta = {
@@ -20251,7 +20257,7 @@ var Hammer = (function(n, t, e, r) {
20251
20257
  }
20252
20258
  function me(P, _) {
20253
20259
  var k = P.lastInterval || _, q = _.timeStamp - k.timeStamp, $, oe, be, De;
20254
- if (_.eventType != K && (q > X || k.velocity === r)) {
20260
+ if (_.eventType != K && (q > W || k.velocity === r)) {
20255
20261
  var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(q, Xe, Fe);
20256
20262
  oe = lt.x, be = lt.y, $ = c(lt.x) > c(lt.y) ? lt.x : lt.y, De = Ve(Xe, Fe), P.lastInterval = _;
20257
20263
  } else
@@ -20312,9 +20318,9 @@ var Hammer = (function(n, t, e, r) {
20312
20318
  return ve(_[0], _[1], xe) / ve(P[0], P[1], xe);
20313
20319
  }
20314
20320
  var Ie = {
20315
- mousedown: Y,
20316
- mousemove: W,
20317
- mouseup: Z
20321
+ mousedown: X,
20322
+ mousemove: Z,
20323
+ mouseup: Y
20318
20324
  }, $e = "mousedown", tt = "mousemove mouseup";
20319
20325
  function ke() {
20320
20326
  this.evEl = $e, this.evWin = tt, this.pressed = !1, le.apply(this, arguments);
@@ -20326,25 +20332,25 @@ var Hammer = (function(n, t, e, r) {
20326
20332
  */
20327
20333
  handler: function(_) {
20328
20334
  var k = Ie[_.type];
20329
- k & Y && (_.button === 0 || _.button === 2) && (this.pressed = !0), k & W && _.which !== 1 && (k = Z), this.pressed && (k & Z && (this.pressed = !1), this.callback(this.manager, k, {
20335
+ k & X && (_.button === 0 || _.button === 2) && (this.pressed = !0), k & Z && _.which !== 1 && (k = Y), this.pressed && (k & Y && (this.pressed = !1), this.callback(this.manager, k, {
20330
20336
  pointers: [_],
20331
20337
  changedPointers: [_],
20332
- pointerType: U,
20338
+ pointerType: V,
20333
20339
  srcEvent: _
20334
20340
  }));
20335
20341
  }
20336
20342
  });
20337
20343
  var Pe = {
20338
- pointerdown: Y,
20339
- pointermove: W,
20340
- pointerup: Z,
20344
+ pointerdown: X,
20345
+ pointermove: Z,
20346
+ pointerup: Y,
20341
20347
  pointercancel: K,
20342
20348
  pointerout: K
20343
20349
  }, _e = {
20344
- 2: J,
20350
+ 2: j,
20345
20351
  3: Q,
20346
- 4: U,
20347
- 5: j
20352
+ 4: V,
20353
+ 5: J
20348
20354
  // see https://twitter.com/jacobrossi/status/480596438489890816
20349
20355
  }, Ee = "pointerdown", Ce = "pointermove pointerup pointercancel";
20350
20356
  n.MSPointerEvent && !n.PointerEvent && (Ee = "MSPointerDown", Ce = "MSPointerMove MSPointerUp MSPointerCancel");
@@ -20357,8 +20363,8 @@ var Hammer = (function(n, t, e, r) {
20357
20363
  * @param {Object} ev
20358
20364
  */
20359
20365
  handler: function(_) {
20360
- var k = this.store, q = !1, $ = !1, oe = _.type.toLowerCase().replace("ms", ""), be = Pe[oe], De = _e[_.pointerType] || _.pointerType, Xe = De == J, Fe = H(k, _.pointerId, "pointerId");
20361
- be & Y && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Z | K) ? q = !0 : !Xe && _.buttons === 0 && (q = !0, $ = !0, be = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, be, {
20366
+ var k = this.store, q = !1, $ = !1, oe = _.type.toLowerCase().replace("ms", ""), be = Pe[oe], De = _e[_.pointerType] || _.pointerType, Xe = De == j, Fe = H(k, _.pointerId, "pointerId");
20367
+ be & X && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Y | K) ? q = !0 : !Xe && _.buttons === 0 && (q = !0, $ = !0, be = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, be, {
20362
20368
  pointers: k,
20363
20369
  changedPointers: [_],
20364
20370
  pointerType: De,
@@ -20367,9 +20373,9 @@ var Hammer = (function(n, t, e, r) {
20367
20373
  }
20368
20374
  });
20369
20375
  var je = {
20370
- touchstart: Y,
20371
- touchmove: W,
20372
- touchend: Z,
20376
+ touchstart: X,
20377
+ touchmove: Z,
20378
+ touchend: Y,
20373
20379
  touchcancel: K
20374
20380
  }, Qe = "touchstart", We = "touchstart touchmove touchend touchcancel";
20375
20381
  function gt() {
@@ -20378,12 +20384,12 @@ var Hammer = (function(n, t, e, r) {
20378
20384
  v(gt, le, {
20379
20385
  handler: function(_) {
20380
20386
  var k = je[_.type];
20381
- if (k === Y && (this.started = !0), !!this.started) {
20387
+ if (k === X && (this.started = !0), !!this.started) {
20382
20388
  var q = Je.call(this, _, k);
20383
- k & (Z | K) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20389
+ k & (Y | K) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20384
20390
  pointers: q[0],
20385
20391
  changedPointers: q[1],
20386
- pointerType: J,
20392
+ pointerType: j,
20387
20393
  srcEvent: _
20388
20394
  });
20389
20395
  }
@@ -20391,12 +20397,12 @@ var Hammer = (function(n, t, e, r) {
20391
20397
  });
20392
20398
  function Je(P, _) {
20393
20399
  var k = M(P.touches), q = M(P.changedTouches);
20394
- return _ & (Z | K) && (k = B(k.concat(q), "identifier")), [k, q];
20400
+ return _ & (Y | K) && (k = B(k.concat(q), "identifier")), [k, q];
20395
20401
  }
20396
20402
  var At = {
20397
- touchstart: Y,
20398
- touchmove: W,
20399
- touchend: Z,
20403
+ touchstart: X,
20404
+ touchmove: Z,
20405
+ touchend: Y,
20400
20406
  touchcancel: K
20401
20407
  }, we = "touchstart touchmove touchend touchcancel";
20402
20408
  function Ue() {
@@ -20408,23 +20414,23 @@ var Hammer = (function(n, t, e, r) {
20408
20414
  q && this.callback(this.manager, k, {
20409
20415
  pointers: q[0],
20410
20416
  changedPointers: q[1],
20411
- pointerType: J,
20417
+ pointerType: j,
20412
20418
  srcEvent: _
20413
20419
  });
20414
20420
  }
20415
20421
  });
20416
20422
  function yt(P, _) {
20417
20423
  var k = M(P.touches), q = this.targetIds;
20418
- if (_ & (Y | W) && k.length === 1)
20424
+ if (_ & (X | Z) && k.length === 1)
20419
20425
  return q[k[0].identifier] = !0, [k, k];
20420
20426
  var $, oe, be = M(P.changedTouches), De = [], Xe = this.target;
20421
20427
  if (oe = k.filter(function(Fe) {
20422
20428
  return w(Fe.target, Xe);
20423
- }), _ === Y)
20429
+ }), _ === X)
20424
20430
  for ($ = 0; $ < oe.length; )
20425
20431
  q[oe[$].identifier] = !0, $++;
20426
20432
  for ($ = 0; $ < be.length; )
20427
- q[be[$].identifier] && De.push(be[$]), _ & (Z | K) && delete q[be[$].identifier], $++;
20433
+ q[be[$].identifier] && De.push(be[$]), _ & (Y | K) && delete q[be[$].identifier], $++;
20428
20434
  if (De.length)
20429
20435
  return [
20430
20436
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -20446,7 +20452,7 @@ var Hammer = (function(n, t, e, r) {
20446
20452
  * @param {Object} inputData
20447
20453
  */
20448
20454
  handler: function(_, k, q) {
20449
- var $ = q.pointerType == J, oe = q.pointerType == U;
20455
+ var $ = q.pointerType == j, oe = q.pointerType == V;
20450
20456
  if (!(oe && q.sourceCapabilities && q.sourceCapabilities.firesTouchEvents)) {
20451
20457
  if ($)
20452
20458
  pt.call(this, k, q);
@@ -20463,7 +20469,7 @@ var Hammer = (function(n, t, e, r) {
20463
20469
  }
20464
20470
  });
20465
20471
  function pt(P, _) {
20466
- P & Y ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Z | K) && ze.call(this, _);
20472
+ P & X ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Y | K) && ze.call(this, _);
20467
20473
  }
20468
20474
  function ze(P) {
20469
20475
  var _ = P.changedPointers[0];
@@ -20744,7 +20750,7 @@ var Hammer = (function(n, t, e, r) {
20744
20750
  */
20745
20751
  process: function(P) {
20746
20752
  var _ = this.state, k = P.eventType, q = _ & (at | Pt), $ = this.attrTest(P);
20747
- return q && (k & K || !$) ? _ | St : q || $ ? k & Z ? _ | xt : _ & at ? _ | Pt : at : Ge;
20753
+ return q && (k & K || !$) ? _ | St : q || $ ? k & Y ? _ | xt : _ & at ? _ | Pt : at : Ge;
20748
20754
  }
20749
20755
  });
20750
20756
  function Rt() {
@@ -20826,13 +20832,13 @@ var Hammer = (function(n, t, e, r) {
20826
20832
  },
20827
20833
  process: function(P) {
20828
20834
  var _ = this.options, k = P.pointers.length === _.pointers, q = P.distance < _.threshold, $ = P.deltaTime > _.time;
20829
- if (this._input = P, !q || !k || P.eventType & (Z | K) && !$)
20835
+ if (this._input = P, !q || !k || P.eventType & (Y | K) && !$)
20830
20836
  this.reset();
20831
- else if (P.eventType & Y)
20837
+ else if (P.eventType & X)
20832
20838
  this.reset(), this._timer = d(function() {
20833
20839
  this.state = vt, this.tryEmit();
20834
20840
  }, _.time, this);
20835
- else if (P.eventType & Z)
20841
+ else if (P.eventType & Y)
20836
20842
  return vt;
20837
20843
  return Ge;
20838
20844
  },
@@ -20840,7 +20846,7 @@ var Hammer = (function(n, t, e, r) {
20840
20846
  clearTimeout(this._timer);
20841
20847
  },
20842
20848
  emit: function(P) {
20843
- this.state === vt && (P && P.eventType & Z ? this.manager.emit(this.options.event + "up", P) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
20849
+ this.state === vt && (P && P.eventType & Y ? this.manager.emit(this.options.event + "up", P) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
20844
20850
  }
20845
20851
  });
20846
20852
  function Ct() {
@@ -20883,7 +20889,7 @@ var Hammer = (function(n, t, e, r) {
20883
20889
  },
20884
20890
  attrTest: function(P) {
20885
20891
  var _ = this.options.direction, k;
20886
- return _ & (ae | de) ? k = P.overallVelocity : _ & ae ? k = P.overallVelocityX : _ & de && (k = P.overallVelocityY), this._super.attrTest.call(this, P) && _ & P.offsetDirection && P.distance > this.options.threshold && P.maxPointers == this.options.pointers && c(k) > this.options.velocity && P.eventType & Z;
20892
+ return _ & (ae | de) ? k = P.overallVelocity : _ & ae ? k = P.overallVelocityX : _ & de && (k = P.overallVelocityY), this._super.attrTest.call(this, P) && _ & P.offsetDirection && P.distance > this.options.threshold && P.maxPointers == this.options.pointers && c(k) > this.options.velocity && P.eventType & Y;
20887
20893
  },
20888
20894
  emit: function(P) {
20889
20895
  var _ = Lt(P.offsetDirection);
@@ -20916,10 +20922,10 @@ var Hammer = (function(n, t, e, r) {
20916
20922
  },
20917
20923
  process: function(P) {
20918
20924
  var _ = this.options, k = P.pointers.length === _.pointers, q = P.distance < _.threshold, $ = P.deltaTime < _.time;
20919
- if (this.reset(), P.eventType & Y && this.count === 0)
20925
+ if (this.reset(), P.eventType & X && this.count === 0)
20920
20926
  return this.failTimeout();
20921
20927
  if (q && $ && k) {
20922
- if (P.eventType != Z)
20928
+ if (P.eventType != Y)
20923
20929
  return this.failTimeout();
20924
20930
  var oe = this.pTime ? P.timeStamp - this.pTime < _.interval : !0, be = !this.pCenter || ve(this.pCenter, P.center) < _.posThreshold;
20925
20931
  this.pTime = P.timeStamp, this.pCenter = P.center, !be || !oe ? this.count = 1 : this.count += 1, this._input = P;
@@ -21190,9 +21196,9 @@ var Hammer = (function(n, t, e, r) {
21190
21196
  k.initEvent(P, !0, !0), k.gesture = _, _.target.dispatchEvent(k);
21191
21197
  }
21192
21198
  return A(Re, {
21193
- INPUT_START: Y,
21194
- INPUT_MOVE: W,
21195
- INPUT_END: Z,
21199
+ INPUT_START: X,
21200
+ INPUT_MOVE: Z,
21201
+ INPUT_END: Y,
21196
21202
  INPUT_CANCEL: K,
21197
21203
  STATE_POSSIBLE: It,
21198
21204
  STATE_BEGAN: at,
@@ -21576,14 +21582,14 @@ var BaseController = (
21576
21582
  var O = {
21577
21583
  x: L.clientX,
21578
21584
  y: L.clientY
21579
- }, F = r.relativeClientPosition(O), N = r.createRaycasterFromCamera(F, r.camera), D = __assign(__assign({}, O), { coords: F, raycaster: N, buttons: L.buttons, delta: 0 }), V = M === "pinchend" ? B : B - L.deltaY / 280, z = createEvent("gesture.pinch", {
21585
+ }, F = r.relativeClientPosition(O), N = r.createRaycasterFromCamera(F, r.camera), D = __assign(__assign({}, O), { coords: F, raycaster: N, buttons: L.buttons, delta: 0 }), U = M === "pinchend" ? B : B - L.deltaY / 280, z = createEvent("gesture.pinch", {
21580
21586
  target: L.target,
21581
21587
  pointerType: "mouse",
21582
21588
  srcEvent: L,
21583
21589
  pointers: [__assign({}, D)],
21584
21590
  isFirst: M === "pinchstart",
21585
21591
  isFinal: M === "pinchend",
21586
- scale: clamp$1(V, 0.1, 10),
21592
+ scale: clamp$1(U, 0.1, 10),
21587
21593
  center: __assign({}, D),
21588
21594
  velocityX: 0,
21589
21595
  velocityY: 0,
@@ -21604,22 +21610,22 @@ var BaseController = (
21604
21610
  } : d.prevEvent = F, r.onPinchGesture(F), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
21605
21611
  var Q;
21606
21612
  h = null;
21607
- var U = (Q = d == null ? void 0 : d.prevEvent.scale) !== null && Q !== void 0 ? Q : 1, j = p("pinchend", U, M);
21608
- d = null, r.onPinchGesture(j);
21613
+ var V = (Q = d == null ? void 0 : d.prevEvent.scale) !== null && Q !== void 0 ? Q : 1, J = p("pinchend", V, M);
21614
+ d = null, r.onPinchGesture(J);
21609
21615
  }, 200);
21610
21616
  } else {
21611
- var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, V = {
21617
+ var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, U = {
21612
21618
  x: M.clientX,
21613
21619
  y: M.clientY
21614
- }, z = r.relativeClientPosition(V), G = r.createRaycasterFromCamera(z, r.camera), J = __assign(__assign({}, V), { coords: z, raycaster: G, buttons: M.buttons, delta: N }), F = createEvent("gesture.mousewheel", {
21620
+ }, z = r.relativeClientPosition(U), G = r.createRaycasterFromCamera(z, r.camera), j = __assign(__assign({}, U), { coords: z, raycaster: G, buttons: M.buttons, delta: N }), F = createEvent("gesture.mousewheel", {
21615
21621
  target: M.target,
21616
21622
  pointerType: "mouse",
21617
21623
  srcEvent: M,
21618
- pointers: [__assign({}, J)],
21624
+ pointers: [__assign({}, j)],
21619
21625
  isFirst: D,
21620
21626
  isFinal: !1,
21621
21627
  scale: 0,
21622
- center: __assign({}, J),
21628
+ center: __assign({}, j),
21623
21629
  velocityX: 0,
21624
21630
  velocityY: 0,
21625
21631
  overallVelocityX: 0,
@@ -21630,15 +21636,15 @@ var BaseController = (
21630
21636
  r.onMouseWheel(F), r.mouseWheelState && clearTimeout(r.mouseWheelState.timer), r.mouseWheelState = {
21631
21637
  timer: setTimeout(function() {
21632
21638
  r.mouseWheelState = void 0;
21633
- var U = createEvent("gesture.mousewheel", {
21639
+ var V = createEvent("gesture.mousewheel", {
21634
21640
  target: M.target,
21635
21641
  pointerType: "mouse",
21636
21642
  srcEvent: M,
21637
- pointers: [__assign(__assign({}, J), { delta: 0 })],
21643
+ pointers: [__assign(__assign({}, j), { delta: 0 })],
21638
21644
  isFirst: !1,
21639
21645
  isFinal: !0,
21640
21646
  scale: 0,
21641
- center: __assign(__assign({}, J), { delta: 0 }),
21647
+ center: __assign(__assign({}, j), { delta: 0 }),
21642
21648
  velocityX: 0,
21643
21649
  velocityY: 0,
21644
21650
  overallVelocityX: 0,
@@ -21646,7 +21652,7 @@ var BaseController = (
21646
21652
  userAction: !0,
21647
21653
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21648
21654
  });
21649
- r.onMouseWheel(U);
21655
+ r.onMouseWheel(V);
21650
21656
  }, 100)
21651
21657
  };
21652
21658
  }
@@ -21773,15 +21779,15 @@ var BaseController = (
21773
21779
  var F = {
21774
21780
  x: M.clientX,
21775
21781
  y: M.clientY
21776
- }, N = r.relativeClientPosition(F), D = r.createRaycasterFromCamera(N, r.camera), V = __assign(__assign({}, F), { coords: N, raycaster: D, buttons: 0, delta: 0 }), z = createEvent("gesture.pinch", {
21782
+ }, N = r.relativeClientPosition(F), D = r.createRaycasterFromCamera(N, r.camera), U = __assign(__assign({}, F), { coords: N, raycaster: D, buttons: 0, delta: 0 }), z = createEvent("gesture.pinch", {
21777
21783
  target: M.target,
21778
21784
  pointerType: "mouse",
21779
21785
  srcEvent: M,
21780
- pointers: [__assign({}, V)],
21786
+ pointers: [__assign({}, U)],
21781
21787
  isFirst: L,
21782
21788
  isFinal: O,
21783
21789
  scale: (B = M.scale) !== null && B !== void 0 ? B : 1,
21784
- center: __assign({}, V),
21790
+ center: __assign({}, U),
21785
21791
  velocityX: 0,
21786
21792
  velocityY: 0,
21787
21793
  overallVelocityX: 0,
@@ -22996,17 +23002,17 @@ void main() {
22996
23002
  var te = ee.level >= m && ee.level <= A;
22997
23003
  K.visible !== te && (K.visible = te, r = !0);
22998
23004
  });
22999
- for (var V = D.sort(function(K, ee) {
23005
+ for (var U = D.sort(function(K, ee) {
23000
23006
  return ee.activeTime - K.activeTime;
23001
- }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, G = V; z < G.length; z++) {
23002
- var J = G[z];
23003
- this.tileMeshes.delete(J.node), this.scene.remove(J), J.dispose(), r = !0;
23007
+ }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, G = U; z < G.length; z++) {
23008
+ var j = G[z];
23009
+ this.tileMeshes.delete(j.node), this.scene.remove(j), j.dispose(), r = !0;
23004
23010
  }
23005
23011
  if (r) {
23006
23012
  var Q = l.getRenderTarget();
23007
23013
  scratchPrevClearColor$1.copy(l.getClearColor());
23008
- var U = l.getClearAlpha(), j = l.autoClear, X = l.autoClearColor, Y = l.autoClearDepth, W = l.autoClearStencil, Z = l.clippingPlanes;
23009
- l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(Q), l.setClearColor(scratchPrevClearColor$1, U), l.autoClear = j, l.autoClearColor = X, l.autoClearDepth = Y, l.autoClearStencil = W, l.clippingPlanes = Z;
23014
+ var V = l.getClearAlpha(), J = l.autoClear, W = l.autoClearColor, X = l.autoClearDepth, Z = l.autoClearStencil, Y = l.clippingPlanes;
23015
+ l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(Q), l.setClearColor(scratchPrevClearColor$1, V), l.autoClear = J, l.autoClearColor = W, l.autoClearDepth = X, l.autoClearStencil = Z, l.clippingPlanes = Y;
23010
23016
  }
23011
23017
  return this.forceRenderWhenNextUpdate = !1, r;
23012
23018
  }, n;
@@ -23310,26 +23316,26 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23310
23316
  }
23311
23317
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(w.x + (C.x - w.x) * I, w.y + (C.y - w.y) * I, w.z + (C.z - w.z) * I);
23312
23318
  for (var B = [], L = [], O = 0, F = this.locationMotion.keyframes; O < F.length; O++) {
23313
- var N = F[O], D = N.key, V = N.progress;
23314
- D !== void 0 && (B.push(D), V > this.locationMotion.progress && L.push(D));
23319
+ var N = F[O], D = N.key, U = N.progress;
23320
+ D !== void 0 && (B.push(D), U > this.locationMotion.progress && L.push(D));
23315
23321
  }
23316
23322
  for (var z = 0, G = Object.keys(this.panoResources); z < G.length; z++) {
23317
- var J = G[z];
23318
- if (!(L.indexOf(J) >= 0)) {
23319
- var Q = this.panoResources[J];
23323
+ var j = G[z];
23324
+ if (!(L.indexOf(j) >= 0)) {
23325
+ var Q = this.panoResources[j];
23320
23326
  if (Q.panoPicture) {
23321
- var U = Q.panoPicture.map;
23322
- if (U) {
23323
- if (U === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || U === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
23327
+ var V = Q.panoPicture.map;
23328
+ if (V) {
23329
+ if (V === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || V === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
23324
23330
  continue;
23325
- U.dispose(), Q.panoPicture = null;
23331
+ V.dispose(), Q.panoPicture = null;
23326
23332
  }
23327
23333
  }
23328
- B.indexOf(J) >= 0 || delete this.panoResources[J];
23334
+ B.indexOf(j) >= 0 || delete this.panoResources[j];
23329
23335
  }
23330
23336
  }
23331
- var j = panoParse(b.panoId);
23332
- j !== this.currentPano && (this.currentPano = j, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
23337
+ var J = panoParse(b.panoId);
23338
+ J !== this.currentPano && (this.currentPano = J, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
23333
23339
  userAction: this.userAction,
23334
23340
  prevPano: panoParse(T.panoId),
23335
23341
  state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
@@ -23339,18 +23345,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23339
23345
  }));
23340
23346
  }
23341
23347
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
23342
- var X = this.works.getObserver(this.currentPano), Y = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, W = this.works.getObserver(E.panoId), Z = this.works.getObserver(b.panoId);
23343
- if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && X) {
23344
- for (var K = [], ee = X.work.observers, te = 0, re = X.accessibleNodes; te < re.length; te++) {
23348
+ var W = this.works.getObserver(this.currentPano), X = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Z = this.works.getObserver(E.panoId), Y = this.works.getObserver(b.panoId);
23349
+ if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
23350
+ for (var K = [], ee = W.work.observers, te = 0, re = W.accessibleNodes; te < re.length; te++) {
23345
23351
  var ie = re[te], M = ee[ie];
23346
23352
  M && K.push(M);
23347
23353
  }
23348
23354
  var ce = /* @__PURE__ */ new Map();
23349
23355
  if (K.sort(function(ue, Ae) {
23350
23356
  var Me = ce.get(ue);
23351
- typeof Me == "undefined" && (Me = ue.standingPosition.distanceTo(X.standingPosition), ce.set(ue, Me));
23357
+ typeof Me == "undefined" && (Me = ue.standingPosition.distanceTo(W.standingPosition), ce.set(ue, Me));
23352
23358
  var He = ce.get(ue);
23353
- return typeof He == "undefined" && (He = Ae.standingPosition.distanceTo(X.standingPosition), ce.set(Ae, He)), Me - He;
23359
+ return typeof He == "undefined" && (He = Ae.standingPosition.distanceTo(W.standingPosition), ce.set(Ae, He)), Me - He;
23354
23360
  }), K.length) {
23355
23361
  this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % K.length;
23356
23362
  var ae = K[this.accessibleObserverFloorCheckCount], de = this.modelScene.models.find(function(ue) {
@@ -23380,9 +23386,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23380
23386
  }
23381
23387
  }
23382
23388
  var qe = /* @__PURE__ */ new Map();
23383
- if (W)
23384
- for (var Ye = 0, Ve = W.accessibleNodes; Ye < Ve.length; Ye++) {
23385
- var ie = Ve[Ye], M = W.work.observers[ie];
23389
+ if (Z)
23390
+ for (var Ye = 0, Ve = Z.accessibleNodes; Ye < Ve.length; Ye++) {
23391
+ var ie = Ve[Ye], M = Z.work.observers[ie];
23386
23392
  if (M) {
23387
23393
  var he = panoStringify({
23388
23394
  panoIndex: M.panoIndex,
@@ -23391,9 +23397,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23391
23397
  qe.set(he, M);
23392
23398
  }
23393
23399
  }
23394
- if (Z)
23395
- for (var ve = 0, Ke = Z.accessibleNodes; ve < Ke.length; ve++) {
23396
- var ie = Ke[ve], M = Z.work.observers[ie];
23400
+ if (Y)
23401
+ for (var ve = 0, Ke = Y.accessibleNodes; ve < Ke.length; ve++) {
23402
+ var ie = Ke[ve], M = Y.work.observers[ie];
23397
23403
  if (M) {
23398
23404
  var he = panoStringify({
23399
23405
  panoIndex: M.panoIndex,
@@ -23419,14 +23425,14 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23419
23425
  this.panoMeshes.forEach(function(ue) {
23420
23426
  ue.setOpacity(0), ue.setCurrent(!1), ue.updateTime && ue.updateTime(e, r), ue.visible = !1;
23421
23427
  });
23422
- else if (X) {
23423
- var Te = X.work.observers, Le = arrayMin(X.accessibleNodes, function(ue) {
23428
+ else if (W) {
23429
+ var Te = W.work.observers, Le = arrayMin(W.accessibleNodes, function(ue) {
23424
23430
  var Ae = Te[ue];
23425
- return Ae ? X.standingPosition.distanceTo(Ae.standingPosition) : 1 / 0;
23431
+ return Ae ? W.standingPosition.distanceTo(Ae.standingPosition) : 1 / 0;
23426
23432
  }, !0), Ie = Le[1];
23427
23433
  Ie = clamp$1(Ie, 2.5, 1 / 0);
23428
- var $e = X.visibleNodes.concat(X.panoIndex).map(function(ue) {
23429
- return panoStringify({ panoIndex: ue, workCode: X.work.workCode });
23434
+ var $e = W.visibleNodes.concat(W.panoIndex).map(function(ue) {
23435
+ return panoStringify({ panoIndex: ue, workCode: W.work.workCode });
23430
23436
  }), tt = this.camera.getDirection(new THREE.Vector3());
23431
23437
  this.panoMeshes.forEach(function(ue, Ae) {
23432
23438
  var Me = o.works.getObserver(Ae);
@@ -23438,7 +23444,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23438
23444
  ue.setCurrent(!1), ue.setOpacity(0);
23439
23445
  else {
23440
23446
  var He = ue.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
23441
- ue.setCurrent(!ue.loading && ue.progress === 0 && Y !== null && panoStringify({ panoIndex: Y.panoIndex, workCode: Y.work.workCode }) === Ae), ue.setOpacity(He < 0.01 ? 0 : clamp$1(Ie / He * 1.2, 0.4, 0.85));
23447
+ ue.setCurrent(!ue.loading && ue.progress === 0 && X !== null && panoStringify({ panoIndex: X.panoIndex, workCode: X.work.workCode }) === Ae), ue.setOpacity(He < 0.01 ? 0 : clamp$1(Ie / He * 1.2, 0.4, 0.85));
23442
23448
  var nt = o.camera.position.clone().setY(ue.position.y), ct = new THREE.Vector3().copy(ue.position).sub(nt).normalize();
23443
23449
  if (Ae === panoStringify(o.currentPano)) {
23444
23450
  var bt = clamp$1((0.5 - nt.distanceTo(ue.position)) / 0.5, 0, 1);
@@ -23492,7 +23498,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23492
23498
  (Je || At.pano !== (we == null ? void 0 : we.pano) || At.opacity !== (we == null ? void 0 : we.opacity)) && this.modelScene.parameter.set("refinedScreen", At);
23493
23499
  }
23494
23500
  }
23495
- if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), X && X.video && (this.needsRender = !0), this.intersectMesh && this.intersectMesh.parent && X && X.position.y - X.standingPosition.y > 10) {
23501
+ if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), W && W.video && (this.needsRender = !0), this.intersectMesh && this.intersectMesh.parent && W && W.position.y - W.standingPosition.y > 10) {
23496
23502
  var Ue = this.camera.position.distanceTo(this.intersectMesh.position), yt = 2 * Math.tan(0.5 * this.camera.fov / 180 * Math.PI), Mt = Ue * yt / 5;
23497
23503
  this.intersectMesh.scale.setScalar(Mt);
23498
23504
  } else
@@ -23765,35 +23771,35 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23765
23771
  { key: C.key, progress: N / T, value: C.value },
23766
23772
  { key: E, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
23767
23773
  ];
23768
- var V = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23769
- V === 0 || V === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * V / z;
23774
+ var U = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23775
+ U === 0 || U === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * U / z;
23770
23776
  }
23771
- var G = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), J = {
23777
+ var G = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), j = {
23772
23778
  longitude: o.longitude,
23773
23779
  latitude: o.latitude,
23774
23780
  fov: o.fov
23775
- }, Q = __assign(__assign({}, e), { mode: this.mode, longitude: (l = J.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = J.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = J.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), U = this.currentPano;
23781
+ }, Q = __assign(__assign({}, e), { mode: this.mode, longitude: (l = j.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = j.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = j.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), V = this.currentPano;
23776
23782
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
23777
23783
  options: o,
23778
- prevPano: U,
23784
+ prevPano: V,
23779
23785
  progress: 0,
23780
23786
  state: Q,
23781
23787
  userAction: this.userAction,
23782
23788
  error: null
23783
23789
  })), o.moveStartCallback && o.moveStartCallback(Q), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
23784
- this.cameraMotion.set(J, G).catch(noop);
23790
+ this.cameraMotion.set(j, G).catch(noop);
23785
23791
  else {
23786
- var j = coordinatesToVector({
23792
+ var J = coordinatesToVector({
23787
23793
  longitude: this.cameraMotion.value.longitude,
23788
23794
  latitude: this.cameraMotion.value.latitude
23789
- }), X = coordinatesToVector({
23790
- longitude: (d = J.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
23791
- latitude: (h = J.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
23792
- }), Y = new THREE.Object3D();
23793
- Y.lookAt(j);
23794
- var W = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion);
23795
- Y.lookAt(X);
23796
- var Z = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion), K = new THREE.Matrix4().getInverse(W).premultiply(Z), ee = this.cameraMotion.value.fov, te = (p = J.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, re = 1;
23795
+ }), W = coordinatesToVector({
23796
+ longitude: (d = j.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
23797
+ latitude: (h = j.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
23798
+ }), X = new THREE.Object3D();
23799
+ X.lookAt(J);
23800
+ var Z = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion);
23801
+ X.lookAt(W);
23802
+ var Y = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion), K = new THREE.Matrix4().getInverse(Z).premultiply(Y), ee = this.cameraMotion.value.fov, te = (p = j.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, re = 1;
23797
23803
  r.effect === "zoomin" ? re = 1.5 : r.effect === "zoomout" && (re = 0.4);
23798
23804
  for (var ie = clamp$1(te * re, 1, 170), ce = 0; ce < S.length - 1; ce++) {
23799
23805
  var ae = S[ce].key;
@@ -23814,16 +23820,16 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23814
23820
  {
23815
23821
  progress: 0,
23816
23822
  value: {
23817
- longitude: (m = J.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
23818
- latitude: (A = J.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
23823
+ longitude: (m = j.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
23824
+ latitude: (A = j.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
23819
23825
  fov: ie
23820
23826
  }
23821
23827
  },
23822
23828
  {
23823
23829
  progress: 1,
23824
23830
  value: {
23825
- longitude: (g = J.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
23826
- latitude: (y = J.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
23831
+ longitude: (g = j.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
23832
+ latitude: (y = j.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
23827
23833
  fov: te
23828
23834
  }
23829
23835
  }
@@ -23841,7 +23847,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23841
23847
  var he = __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 });
23842
23848
  s.emit("pano.arrived", createEvent("pano.arrived", {
23843
23849
  options: o,
23844
- prevPano: U,
23850
+ prevPano: V,
23845
23851
  progress: 1,
23846
23852
  state: he,
23847
23853
  userAction: s.userAction,
@@ -23875,7 +23881,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23875
23881
  function() {
23876
23882
  s.emit("pano.cancel", createEvent("pano.cancel", {
23877
23883
  options: o,
23878
- prevPano: U,
23884
+ prevPano: V,
23879
23885
  progress: 0,
23880
23886
  state: Q,
23881
23887
  userAction: s.userAction,
@@ -23937,22 +23943,22 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23937
23943
  s.floorIndex = -1;
23938
23944
  var u = this.camera.getDirection(new THREE.Vector3()).setY(0), l = null, c = this.works.getObserver(this.currentPano);
23939
23945
  if (c) {
23940
- var f = c.work.observers, d = c.accessibleNodes.filter(function(U) {
23941
- if (U === r.currentPano.panoIndex && c.work.workCode === r.currentPano.workCode)
23946
+ var f = c.work.observers, d = c.accessibleNodes.filter(function(V) {
23947
+ if (V === r.currentPano.panoIndex && c.work.workCode === r.currentPano.workCode)
23942
23948
  return !1;
23943
- var j = f[U];
23944
- if (!j)
23949
+ var J = f[V];
23950
+ if (!J)
23945
23951
  return !1;
23946
- var X = scratchVector3$3.copy(j.position).applyMatrix4(j.work.transform);
23947
- return X.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : j.loadable || j.active;
23952
+ var W = scratchVector3$3.copy(J.position).applyMatrix4(J.work.transform);
23953
+ return W.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : J.loadable || J.active;
23948
23954
  }), h = this.modelScene.intersectRaycaster(s)[0];
23949
23955
  if (h) {
23950
- var p = arrayMin(d, function(U) {
23951
- var j = f[U];
23952
- if (!j)
23956
+ var p = arrayMin(d, function(V) {
23957
+ var J = f[V];
23958
+ if (!J)
23953
23959
  return 1 / 0;
23954
- var X = scratchVector3$3.copy(j.standingPosition).applyMatrix4(j.work.transform);
23955
- return X.distanceTo(h.point);
23960
+ var W = scratchVector3$3.copy(J.standingPosition).applyMatrix4(J.work.transform);
23961
+ return W.distanceTo(h.point);
23956
23962
  }, !0), m = p[0], A = p[1];
23957
23963
  typeof m == "number" && A < this.panoTapTriggerRadius && (l = (o = f[m]) !== null && o !== void 0 ? o : null);
23958
23964
  }
@@ -23977,12 +23983,12 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23977
23983
  }
23978
23984
  }
23979
23985
  }
23980
- var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(U, j) {
23981
- return U.angleTo(R) - j.angleTo(R);
23986
+ var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(V, J) {
23987
+ return V.angleTo(R) - J.angleTo(R);
23982
23988
  })[0];
23983
23989
  if (N && N.angleTo(u) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
23984
- var D = e.state.fov, V = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
23985
- b.latitude = clamp$1(0, V, z);
23990
+ var D = e.state.fov, U = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
23991
+ b.latitude = clamp$1(0, U, z);
23986
23992
  }
23987
23993
  var G = __assign({}, e.state);
23988
23994
  if (G.workCode = l.work.workCode, G.panoIndex = l.panoIndex, b.longitude !== void 0 && (G.longitude = b.longitude), b.latitude !== void 0 && (G.latitude = b.latitude), b.fov !== void 0 && (G.fov = b.fov), G.distance = 0, G.offset = l.position.clone(), e.state = G, this.emit("gesture.tap", e), !e.defaultPrevented) {
@@ -23994,10 +24000,10 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23994
24000
  progress: 0,
23995
24001
  error: null
23996
24002
  })), l && !l.active) {
23997
- var J = panoStringify({
24003
+ var j = panoStringify({
23998
24004
  panoIndex: l.panoIndex,
23999
24005
  workCode: l.work.workCode
24000
- }), Q = this.panoMeshes.get(J);
24006
+ }), Q = this.panoMeshes.get(j);
24001
24007
  Q && (Q.setDisabled(!1), Q.setLoading(!0));
24002
24008
  }
24003
24009
  l && l.active && this.emit("pano.request", createEvent("pano.request", {
@@ -24927,23 +24933,23 @@ void main() {
24927
24933
  B.copy(L), R = !0;
24928
24934
  }
24929
24935
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(B.x + (L.x - B.x) * O, B.y + (L.y - B.y) * O, B.z + (L.z - B.z) * O);
24930
- for (var D = [], V = [], z = 0, G = this.locationMotion.keyframes; z < G.length; z++) {
24931
- var J = G[z], Q = J.key, U = J.progress;
24932
- Q !== void 0 && (D.push(Q), U > this.locationMotion.progress && V.push(Q));
24936
+ for (var D = [], U = [], z = 0, G = this.locationMotion.keyframes; z < G.length; z++) {
24937
+ var j = G[z], Q = j.key, V = j.progress;
24938
+ Q !== void 0 && (D.push(Q), V > this.locationMotion.progress && U.push(Q));
24933
24939
  }
24934
- for (var j = 0, X = Object.keys(this.panoResources); j < X.length; j++) {
24935
- var Y = X[j];
24936
- if (!(V.indexOf(Y) >= 0)) {
24937
- var W = this.panoResources[Y];
24938
- if (W.panoPicture) {
24939
- var Z = W.panoPicture.map;
24940
- if (Z) {
24941
- if (Z === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || Z === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
24940
+ for (var J = 0, W = Object.keys(this.panoResources); J < W.length; J++) {
24941
+ var X = W[J];
24942
+ if (!(U.indexOf(X) >= 0)) {
24943
+ var Z = this.panoResources[X];
24944
+ if (Z.panoPicture) {
24945
+ var Y = Z.panoPicture.map;
24946
+ if (Y) {
24947
+ if (Y === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || Y === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
24942
24948
  continue;
24943
- Z.dispose(), W.panoPicture = null;
24949
+ Y.dispose(), Z.panoPicture = null;
24944
24950
  }
24945
24951
  }
24946
- D.indexOf(Y) >= 0 || delete this.panoResources[Y];
24952
+ D.indexOf(X) >= 0 || delete this.panoResources[X];
24947
24953
  }
24948
24954
  }
24949
24955
  this.currentPano = panoParse(M.panoId), this.emit("pano.moving", createEvent("pano.moving", {
@@ -25361,30 +25367,30 @@ void main() {
25361
25367
  longitude: r.longitude,
25362
25368
  latitude: r.latitude,
25363
25369
  fov: r.fov
25364
- }, M = [], B = function(J) {
25365
- var Q = L.modelScene.models.find(function(Y) {
25366
- return Y.work === J;
25370
+ }, M = [], B = function(j) {
25371
+ var Q = L.modelScene.models.find(function(X) {
25372
+ return X.work === j;
25367
25373
  });
25368
- if (!Q || Q.visible === !1 || J.observers.length <= 0)
25374
+ if (!Q || Q.visible === !1 || j.observers.length <= 0)
25369
25375
  return "continue";
25370
- if (scratchObserverBox$1.copy(J.observerBox).expandByScalar(10).applyMatrix4(J.transform), scratchObserverBox$1.containsPoint(d))
25371
- for (var U = 0, j = J.observers; U < j.length; U++) {
25372
- var X = j[U];
25373
- M.push(X);
25376
+ if (scratchObserverBox$1.copy(j.observerBox).expandByScalar(10).applyMatrix4(j.transform), scratchObserverBox$1.containsPoint(d))
25377
+ for (var V = 0, J = j.observers; V < J.length; V++) {
25378
+ var W = J[V];
25379
+ M.push(W);
25374
25380
  }
25375
25381
  }, L = this, O = 0, F = this.works; O < F.length; O++) {
25376
25382
  var N = F[O];
25377
25383
  B(N);
25378
25384
  }
25379
- var D = arrayMin(M, function(J) {
25380
- return scratchVector3$2.copy(J.position).applyMatrix4(J.work.transform).distanceTo(d);
25381
- }), V = D ? {
25385
+ var D = arrayMin(M, function(j) {
25386
+ return scratchVector3$2.copy(j.position).applyMatrix4(j.work.transform).distanceTo(d);
25387
+ }), U = D ? {
25382
25388
  workCode: D.work.workCode,
25383
25389
  panoIndex: D.panoIndex
25384
25390
  } : {
25385
25391
  workCode: "",
25386
25392
  panoIndex: 0
25387
- }, z = __assign(__assign({}, V), { mode: this.mode, longitude: (u = H.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = H.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = H.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), G = this.currentPano;
25393
+ }, z = __assign(__assign({}, U), { mode: this.mode, longitude: (u = H.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = H.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = H.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), G = this.currentPano;
25388
25394
  this.emit("pano.moveTo", createEvent("pano.moveTo", {
25389
25395
  options: r,
25390
25396
  prevPano: G,
@@ -25396,19 +25402,19 @@ void main() {
25396
25402
  // resolve
25397
25403
  // 动画结束
25398
25404
  function() {
25399
- for (var J = 0, Q = s.modelScene.children; J < Q.length; J++) {
25400
- var U = Q[J];
25401
- U instanceof Model && U.show();
25405
+ for (var j = 0, Q = s.modelScene.children; j < Q.length; j++) {
25406
+ var V = Q[j];
25407
+ V instanceof Model && V.show();
25402
25408
  }
25403
- var j = __assign(__assign(__assign({}, V), { mode: s.mode }), clonePose(s.camera.pose));
25409
+ var J = __assign(__assign(__assign({}, U), { mode: s.mode }), clonePose(s.camera.pose));
25404
25410
  s.emit("pano.arrived", createEvent("pano.arrived", {
25405
25411
  options: r,
25406
25412
  prevPano: G,
25407
25413
  progress: 0,
25408
- state: j,
25414
+ state: J,
25409
25415
  userAction: s.userAction,
25410
25416
  error: null
25411
- })), r.moveEndCallback && r.moveEndCallback(j);
25417
+ })), r.moveEndCallback && r.moveEndCallback(J);
25412
25418
  },
25413
25419
  // reject
25414
25420
  // 动画被取消
@@ -25813,7 +25819,7 @@ void main() {
25813
25819
  var y = {
25814
25820
  x: e.center.x - o.x,
25815
25821
  y: e.center.y - o.y
25816
- }, O = this.coordinatesForOffset(y), F = formatRad$1(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), V = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(this.cameraMotion.value.latitude + O.latitude, D, V);
25822
+ }, O = this.coordinatesForOffset(y), F = formatRad$1(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), U = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(this.cameraMotion.value.latitude + O.latitude, D, U);
25817
25823
  this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (z = this.cameraMotion.value.latitude);
25818
25824
  var C = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: F, latitude: z, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
25819
25825
  if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = C, this.emit("gesture.pan", e), e.defaultPrevented)
@@ -25827,10 +25833,10 @@ void main() {
25827
25833
  longitude: C.longitude,
25828
25834
  latitude: C.latitude
25829
25835
  }, 0).catch(noop), e.isFinal) {
25830
- var G = e.velocityX, J = e.velocityY;
25836
+ var G = e.velocityX, j = e.velocityY;
25831
25837
  this.inMomentumMovement = {
25832
25838
  uuid: createUuid()
25833
- }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: G, y: J })), { x: 0, y: 0, z: 0 }), 0);
25839
+ }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: G, y: j })), { x: 0, y: 0, z: 0 }), 0);
25834
25840
  }
25835
25841
  }
25836
25842
  }
@@ -26679,7 +26685,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26679
26685
  }
26680
26686
  return Object.defineProperty(t, "version", {
26681
26687
  get: function() {
26682
- return "6.6.0";
26688
+ return "6.6.2";
26683
26689
  },
26684
26690
  enumerable: !1,
26685
26691
  configurable: !0
@@ -27309,41 +27315,41 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27309
27315
  { key: w.key, progress: F / b, value: w.value },
27310
27316
  { key: v, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
27311
27317
  ];
27312
- var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), V = this.locationMotionKeyframesLength(T);
27313
- S = this.locationMotion.getProgressVelocity(y) * D / V;
27318
+ var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), U = this.locationMotionKeyframesLength(T);
27319
+ S = this.locationMotion.getProgressVelocity(y) * D / U;
27314
27320
  }
27315
27321
  var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), G = {
27316
27322
  longitude: o.longitude,
27317
27323
  latitude: o.latitude,
27318
27324
  fov: o.fov
27319
- }, J = __assign(__assign({}, e), { mode: this.mode, longitude: (u = G.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = G.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = G.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), Q = this.currentPano;
27325
+ }, j = __assign(__assign({}, e), { mode: this.mode, longitude: (u = G.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = G.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = G.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), Q = this.currentPano;
27320
27326
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
27321
27327
  options: o,
27322
27328
  prevPano: Q,
27323
27329
  progress: 0,
27324
- state: J,
27330
+ state: j,
27325
27331
  userAction: this.userAction,
27326
27332
  error: null
27327
- })), o.moveStartCallback && o.moveStartCallback(J), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
27333
+ })), o.moveStartCallback && o.moveStartCallback(j), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
27328
27334
  this.cameraMotion.set(G, z).catch(noop);
27329
27335
  else {
27330
- var U = coordinatesToVector({
27336
+ var V = coordinatesToVector({
27331
27337
  longitude: this.cameraMotion.value.longitude,
27332
27338
  latitude: this.cameraMotion.value.latitude
27333
- }), j = coordinatesToVector({
27339
+ }), J = coordinatesToVector({
27334
27340
  longitude: (f = G.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
27335
27341
  latitude: (d = G.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
27336
- }), X = new THREE.Object3D();
27337
- X.lookAt(U);
27338
- var Y = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion);
27339
- X.lookAt(j);
27340
- var W = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion), Z = new THREE.Matrix4().getInverse(Y).premultiply(W), K = this.cameraMotion.value.fov, ee = (h = G.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
27342
+ }), W = new THREE.Object3D();
27343
+ W.lookAt(V);
27344
+ var X = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
27345
+ W.lookAt(J);
27346
+ var Z = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), Y = new THREE.Matrix4().getInverse(X).premultiply(Z), K = this.cameraMotion.value.fov, ee = (h = G.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
27341
27347
  r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
27342
27348
  for (var re = ee * te, ie = 0; ie < T.length - 1; ie++) {
27343
27349
  var ce = T[ie].key;
27344
27350
  if (ce) {
27345
27351
  var ae = this.panoResources[ce];
27346
- ae && (ae.fixCameraTransform.copy(Z), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27352
+ ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27347
27353
  }
27348
27354
  }
27349
27355
  this.cameraMotion.setKeyframes([
@@ -27418,7 +27424,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27418
27424
  options: o,
27419
27425
  prevPano: Q,
27420
27426
  progress: 0,
27421
- state: J,
27427
+ state: j,
27422
27428
  userAction: s.userAction,
27423
27429
  error: null
27424
27430
  })), o.moveCancelCallback && o.moveCancelCallback();
@@ -27529,20 +27535,20 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27529
27535
  mapSize: y.pano0.mapSize,
27530
27536
  zoom: y.pano0.zoom,
27531
27537
  matrix: w.leftPanoPicture.matrix.clone().setPosition(C.position)
27532
- }, V = this.panoPictureObserverMap.get(y.pano0);
27533
- V && this.panoPictureObserverMap.set(D, V), y.pano0 = D;
27538
+ }, U = this.panoPictureObserverMap.get(y.pano0);
27539
+ U && this.panoPictureObserverMap.set(D, U), y.pano0 = D;
27534
27540
  }
27535
27541
  O.copy(F), M = !0;
27536
27542
  }
27537
27543
  v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(O.x + (F.x - O.x) * N, O.y + (F.y - O.y) * N, O.z + (F.z - O.z) * N);
27538
- for (var z = [], G = [], J = 0, Q = this.locationMotion.keyframes; J < Q.length; J++) {
27539
- var U = Q[J], j = U.key, X = U.progress;
27540
- j !== void 0 && (z.push(j), X > this.locationMotion.progress && G.push(j));
27541
- }
27542
- for (var Y = 0, W = Object.keys(this.panoResources); Y < W.length; Y++) {
27543
- var Z = W[Y];
27544
- if (!(G.indexOf(Z) >= 0)) {
27545
- var K = this.panoResources[Z];
27544
+ for (var z = [], G = [], j = 0, Q = this.locationMotion.keyframes; j < Q.length; j++) {
27545
+ var V = Q[j], J = V.key, W = V.progress;
27546
+ J !== void 0 && (z.push(J), W > this.locationMotion.progress && G.push(J));
27547
+ }
27548
+ for (var X = 0, Z = Object.keys(this.panoResources); X < Z.length; X++) {
27549
+ var Y = Z[X];
27550
+ if (!(G.indexOf(Y) >= 0)) {
27551
+ var K = this.panoResources[Y];
27546
27552
  if (K.leftPanoPicture) {
27547
27553
  var ee = K.leftPanoPicture.map;
27548
27554
  if (ee) {
@@ -27551,7 +27557,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27551
27557
  ee.dispose(), K.leftPanoPicture = null;
27552
27558
  }
27553
27559
  }
27554
- z.indexOf(Z) >= 0 || delete this.panoResources[Z];
27560
+ z.indexOf(Y) >= 0 || delete this.panoResources[Y];
27555
27561
  }
27556
27562
  }
27557
27563
  var te = panoParse(C.panoId);
@@ -27634,8 +27640,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27634
27640
  var Ie = this.works.getResolvedObserver(this.currentPano), $e = this.locationMotion.ended ? this.getForwardObserverOrNot(this.xrManager.cameraVR) : null, tt = this.works.getObserver(w.panoId), ke = this.works.getObserver(C.panoId);
27635
27641
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Ie) {
27636
27642
  for (var Pe = [], _e = Ie.work.observers, Ee = 0, Ce = Ie.accessibleNodes; Ee < Ce.length; Ee++) {
27637
- var Be = Ce[Ee], V = _e[Be];
27638
- V && Pe.push(V);
27643
+ var Be = Ce[Ee], U = _e[Be];
27644
+ U && Pe.push(U);
27639
27645
  }
27640
27646
  var je = /* @__PURE__ */ new Map();
27641
27647
  if (Pe.sort(function(fe, Se) {
@@ -27674,24 +27680,24 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27674
27680
  var ze = /* @__PURE__ */ new Map();
27675
27681
  if (tt)
27676
27682
  for (var ut = 0, rt = tt.accessibleNodes; ut < rt.length; ut++) {
27677
- var Be = rt[ut], V = tt.work.observers[Be];
27678
- if (V) {
27683
+ var Be = rt[ut], U = tt.work.observers[Be];
27684
+ if (U) {
27679
27685
  var Ue = panoStringify({
27680
- panoIndex: V.panoIndex,
27681
- workCode: V.work.workCode
27686
+ panoIndex: U.panoIndex,
27687
+ workCode: U.work.workCode
27682
27688
  });
27683
- ze.set(Ue, V);
27689
+ ze.set(Ue, U);
27684
27690
  }
27685
27691
  }
27686
27692
  if (ke)
27687
27693
  for (var ue = 0, Ae = ke.accessibleNodes; ue < Ae.length; ue++) {
27688
- var Be = Ae[ue], V = ke.work.observers[Be];
27689
- if (V) {
27694
+ var Be = Ae[ue], U = ke.work.observers[Be];
27695
+ if (U) {
27690
27696
  var Ue = panoStringify({
27691
- panoIndex: V.panoIndex,
27692
- workCode: V.work.workCode
27697
+ panoIndex: U.panoIndex,
27698
+ workCode: U.work.workCode
27693
27699
  });
27694
- ze.set(Ue, V);
27700
+ ze.set(Ue, U);
27695
27701
  }
27696
27702
  }
27697
27703
  if (this.panoMeshes.forEach(function(fe, Se) {
@@ -27742,8 +27748,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27742
27748
  });
27743
27749
  }
27744
27750
  {
27745
- var N = (d = this.modelScene.parameter.progress) !== null && d !== void 0 ? d : 1, Ht = Math.round(N), it = this.modelScene.parameter.pano0, ft = this.modelScene.parameter.pano1, Tt = Ht === 0 ? it : ft, V = void 0;
27746
- if (Tt && (V = this.works.getObserver(Tt.panoId), V || (V = this.panoPictureObserverMap.get(Tt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !V || !Tt || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
27751
+ var N = (d = this.modelScene.parameter.progress) !== null && d !== void 0 ? d : 1, Ht = Math.round(N), it = this.modelScene.parameter.pano0, ft = this.modelScene.parameter.pano1, Tt = Ht === 0 ? it : ft, U = void 0;
27752
+ if (Tt && (U = this.works.getObserver(Tt.panoId), U || (U = this.panoPictureObserverMap.get(Tt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !U || !Tt || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
27747
27753
  this.tiling.setObserver(null);
27748
27754
  var It = {
27749
27755
  renderer: this.renderer,
@@ -27761,7 +27767,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27761
27767
  this.tiling.update(It), this.modelScene.parameter.set("refinedScreen", null);
27762
27768
  } else {
27763
27769
  var at = getImageSizeLevel(Tt.mapSize), Pt = at + 1, xt = 4;
27764
- this.tiling.setObserver(V);
27770
+ this.tiling.setObserver(U);
27765
27771
  var It = {
27766
27772
  renderer: this.renderer,
27767
27773
  resolution: ae,
@@ -28972,13 +28978,13 @@ void main() {
28972
28978
  encoding: (p = (h = g.renderer) === null || h === void 0 ? void 0 : h.outputEncoding) !== null && p !== void 0 ? p : THREE.sRGBEncoding,
28973
28979
  generateMipmaps: !1
28974
28980
  }), g.viewport = Object.assign({ left: 0, bottom: 0, width: 1, height: 1 }, e.viewport), g.camera = new Camera(DEFAULT_CAMERA_FOV), g.scene = new Scene(), g.xrCustomObjectsScene = new THREE.Scene(), g.scene.add(g.xrCustomObjectsScene), g.scene.matrixAutoUpdate = !1, g.loadWorkTask = Promise.resolve(), g.requestProxy = (m = e.requestProxy) !== null && m !== void 0 ? m : DEFAULT_REQUEST_PROXY, g.networkSubscribe = new NetworkSubscribe(), g.networkSubscribe.on("network", function(O, F, N, D) {
28975
- var V;
28981
+ var U;
28976
28982
  g.emit("network.resource", createEvent("network.resource", {
28977
28983
  source: O,
28978
28984
  requestType: F,
28979
28985
  requestState: N,
28980
28986
  detail: D
28981
- })), (V = g.analysis) === null || V === void 0 || V.network(g.works, O, F, N, D);
28987
+ })), (U = g.analysis) === null || U === void 0 || U.network(g.works, O, F, N, D);
28982
28988
  }), g.boundingMesh = new BoundingMesh$1(), g.boundingMesh.name = "bounding", g.readyCallbacks = [], g.syncingState = !1, g.helperGroup = new THREE.Group(), g.helperGroup.name = "helper", g.helperGroup.matrixAutoUpdate = !1, g.scene.add(g.helperGroup);
28983
28989
  var E = new Model(emptyWorks[0]);
28984
28990
  worksMap.set(g, emptyWorks), g.modelScene = new ModelScene(), g.modelScene.add(E), g.modelScene.add(g.boundingMesh), defineProperty(E, "loaded", {
@@ -29050,7 +29056,7 @@ void main() {
29050
29056
  }
29051
29057
  return Object.defineProperty(t, "version", {
29052
29058
  get: function() {
29053
- return "6.6.0";
29059
+ return "6.6.2";
29054
29060
  },
29055
29061
  enumerable: !1,
29056
29062
  configurable: !0
@@ -29279,7 +29285,7 @@ void main() {
29279
29285
  }
29280
29286
  else
29281
29287
  e instanceof Work ? E.push(e) : E.push(parseWork(e));
29282
- for (var R = createWorks(E), w = function(Z) {
29288
+ for (var R = createWorks(E), w = function(Y) {
29283
29289
  var K = C, ee = new Fetcher({
29284
29290
  get networkSubscribe() {
29285
29291
  return K.networkSubscribe;
@@ -29288,14 +29294,14 @@ void main() {
29288
29294
  return Promise.resolve(te).then(function(re) {
29289
29295
  return K.requestProxy(re);
29290
29296
  }).then(function(re) {
29291
- var ie = verifyURL(re, Z.allowHosts);
29297
+ var ie = verifyURL(re, Y.allowHosts);
29292
29298
  if (ie instanceof Error)
29293
29299
  throw ie;
29294
29300
  return ie;
29295
29301
  });
29296
29302
  }
29297
29303
  });
29298
- registerFetcher(Z, ee);
29304
+ registerFetcher(Y, ee);
29299
29305
  }, C = this, I = 0, H = R; I < H.length; I++) {
29300
29306
  var M = H[I];
29301
29307
  w(M);
@@ -29354,38 +29360,38 @@ void main() {
29354
29360
  offset: r.offset
29355
29361
  };
29356
29362
  }
29357
- var V = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), G = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29363
+ var U = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), G = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29358
29364
  (F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (G = 0);
29359
- var J = "fly";
29360
- (F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && this.currentMode === F && (J = (g = v.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
29365
+ var j = "fly";
29366
+ (F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && this.currentMode === F && (j = (g = v.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
29361
29367
  input: e,
29362
29368
  works: R,
29363
- state: V,
29369
+ state: U,
29364
29370
  userAction: s
29365
29371
  }));
29366
29372
  var Q = function() {
29367
29373
  u.pano = O;
29368
- var Z = __assign(__assign({ initial: {
29369
- state: V,
29374
+ var Y = __assign(__assign({ initial: {
29375
+ state: U,
29370
29376
  currentState: z,
29371
29377
  duration: G,
29372
- effect: J,
29378
+ effect: j,
29373
29379
  userAction: s
29374
- } }, u.commonParams()), u.controllerInits[F]), K = Controllers[F].initAnimationEndState(Z);
29380
+ } }, u.commonParams()), u.controllerInits[F]), K = Controllers[F].initAnimationEndState(Y);
29375
29381
  if (u.controller && u.currentMode === F)
29376
- u.controller.updateWork(R, K, { effect: J, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Z));
29382
+ u.controller.updateWork(R, K, { effect: j, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Y));
29377
29383
  else {
29378
29384
  var ee = u.currentMode;
29379
29385
  if (u.controller)
29380
29386
  u.controller.destroy();
29381
29387
  else {
29382
- var te = Controllers[F].initAnimationEndState(Z);
29388
+ var te = Controllers[F].initAnimationEndState(Y);
29383
29389
  u.camera.setFromPose(te), u.emit("camera.update", createEvent("camera.update", {
29384
29390
  state: u.getCurrentState(),
29385
29391
  userAction: s
29386
29392
  }));
29387
29393
  }
29388
- u.controller = u.applyController(F, Z);
29394
+ u.controller = u.applyController(F, Y);
29389
29395
  var re = createEvent("mode.change", {
29390
29396
  prevMode: ee,
29391
29397
  mode: F,
@@ -29401,12 +29407,12 @@ void main() {
29401
29407
  u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
29402
29408
  };
29403
29409
  worksMap.set(this, R);
29404
- var U = Promise.resolve();
29410
+ var V = Promise.resolve();
29405
29411
  if (F === t.Mode.Floorplan || F === t.Mode.Topview || F === t.Mode.Mapview || F === t.Mode.Model) {
29406
- this.modelScene.loaded === !1 && (this.camera.setFromPose(V), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = F);
29407
- var j = this.loadModels(R, v);
29408
- U = Promise.all(j.map(function(Z) {
29409
- return Z.loadedReady;
29412
+ this.modelScene.loaded === !1 && (this.camera.setFromPose(U), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = F);
29413
+ var J = this.loadModels(R, v);
29414
+ V = Promise.all(J.map(function(Y) {
29415
+ return Y.loadedReady;
29410
29416
  })).then(function() {
29411
29417
  u.needsRender = !0, u.modelSceneNeedsRender = !0, Q(), u.emit("camera.update", createEvent("camera.update", {
29412
29418
  state: u.getCurrentState(),
@@ -29415,33 +29421,33 @@ void main() {
29415
29421
  });
29416
29422
  } else {
29417
29423
  Q();
29418
- var X = this.controller, Y = !1;
29424
+ var W = this.controller, X = !1;
29419
29425
  this.modelScene.autoRefine = !1;
29420
- var W = function() {
29421
- u.works === R && Y === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29426
+ var Z = function() {
29427
+ u.works === R && X === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29422
29428
  state: u.getCurrentState(),
29423
29429
  userAction: s
29424
- })), Y = !0, u.modelScene.autoRefine = !0), X.off("pano.arrived", W), X.off("pano.cancel", W);
29425
- }, j = this.loadModels(R, v);
29426
- U = Promise.all(j.map(function(K) {
29430
+ })), X = !0, u.modelScene.autoRefine = !0), W.off("pano.arrived", Z), W.off("pano.cancel", Z);
29431
+ }, J = this.loadModels(R, v);
29432
+ V = Promise.all(J.map(function(K) {
29427
29433
  return K.initReady;
29428
- })).then(noop), X.once("pano.arrived", W), X.once("pano.cancel", W), setTimeout(W, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29434
+ })).then(noop), W.once("pano.arrived", Z), W.once("pano.cancel", Z), setTimeout(Z, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29429
29435
  }
29430
29436
  return this.emit("works.load", createEvent("works.load", {
29431
29437
  input: e,
29432
29438
  state: this.getCurrentState(),
29433
29439
  userAction: s,
29434
29440
  works: R
29435
- })), U.then(function() {
29441
+ })), V.then(function() {
29436
29442
  return u.ready();
29437
29443
  }).then(function() {
29438
- var Z;
29444
+ var Y;
29439
29445
  u.emit("works.ready", createEvent("works.ready", {
29440
29446
  input: e,
29441
29447
  state: u.getCurrentState(),
29442
29448
  userAction: s,
29443
29449
  works: R
29444
- })), (Z = u.analysis) === null || Z === void 0 || Z.work(R);
29450
+ })), (Y = u.analysis) === null || Y === void 0 || Y.work(R);
29445
29451
  });
29446
29452
  }, t.prototype.reset = function() {
29447
29453
  var e = this, r = this.loadWorkTask.then(function() {
@@ -29881,8 +29887,8 @@ void main() {
29881
29887
  D && (D.viewerRequestVolume && (N.viewerRequestVolume = makeBoundingVolume(D.viewerRequestVolume)), N.parameter.set(omit(D, ["showLayers"])), D.showLayers === !1 ? N.visible = !1 : Array.isArray(D.showLayers) && (N.visible = D.showLayers.includes(N.name)));
29882
29888
  }
29883
29889
  else
29884
- for (var V = 0, z = I.viewLayers; V < z.length; V++) {
29885
- var N = z[V];
29890
+ for (var U = 0, z = I.viewLayers; U < z.length; U++) {
29891
+ var N = z[U];
29886
29892
  C.viewerRequestVolume && (N.viewerRequestVolume = makeBoundingVolume(C.viewerRequestVolume)), N.parameter.set(omit(C, ["showLayers"])), C.showLayers === !1 ? N.visible = !1 : Array.isArray(C.showLayers) && (N.visible = C.showLayers.includes(N.name));
29887
29893
  }
29888
29894
  }), m.push(I), p && (I.visible = !1), E.modelScene.add(I);