@realsee/five 6.7.0-alpha.30 → 6.7.0-alpha.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/five/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/15/2025
5
- * Version: 6.7.0-alpha.30
4
+ * Generated: 12/18/2025
5
+ * Version: 6.7.0-alpha.31
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
  M[w + 1] = M[w + 3], M[w + 3] = P, this._doCryptBlock(M, w, this._invKeySchedule, c, f, d, h, r), P = M[w + 1], M[w + 1] = M[w + 3], M[w + 3] = P;
759
759
  },
760
760
  _doCryptBlock: function(M, w, P, _, I, C, H, L) {
761
- for (var O = this._nRounds, U = M[w] ^ P[0], j = M[w + 1] ^ P[1], G = M[w + 2] ^ P[2], Q = M[w + 3] ^ P[3], k = 4, D = 1; D < O; D++)
762
- var q = _[U >>> 24] ^ I[j >>> 16 & 255] ^ C[G >>> 8 & 255] ^ H[Q & 255] ^ P[k++], z = _[j >>> 24] ^ I[G >>> 16 & 255] ^ C[Q >>> 8 & 255] ^ H[U & 255] ^ P[k++], V = _[G >>> 24] ^ I[Q >>> 16 & 255] ^ C[U >>> 8 & 255] ^ H[j & 255] ^ P[k++], Q = _[Q >>> 24] ^ I[U >>> 16 & 255] ^ C[j >>> 8 & 255] ^ H[G & 255] ^ P[k++], U = q, j = z, G = V;
763
- q = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[G >>> 8 & 255] << 8 | L[Q & 255]) ^ P[k++], z = (L[j >>> 24] << 24 | L[G >>> 16 & 255] << 16 | L[Q >>> 8 & 255] << 8 | L[U & 255]) ^ P[k++], V = (L[G >>> 24] << 24 | L[Q >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[j & 255]) ^ P[k++], Q = (L[Q >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[j >>> 8 & 255] << 8 | L[G & 255]) ^ P[k++], M[w] = q, M[w + 1] = z, M[w + 2] = V, M[w + 3] = Q;
761
+ for (var O = this._nRounds, U = M[w] ^ P[0], j = M[w + 1] ^ P[1], G = M[w + 2] ^ P[2], V = M[w + 3] ^ P[3], k = 4, D = 1; D < O; D++)
762
+ var q = _[U >>> 24] ^ I[j >>> 16 & 255] ^ C[G >>> 8 & 255] ^ H[V & 255] ^ P[k++], z = _[j >>> 24] ^ I[G >>> 16 & 255] ^ C[V >>> 8 & 255] ^ H[U & 255] ^ P[k++], J = _[G >>> 24] ^ I[V >>> 16 & 255] ^ C[U >>> 8 & 255] ^ H[j & 255] ^ P[k++], V = _[V >>> 24] ^ I[U >>> 16 & 255] ^ C[j >>> 8 & 255] ^ H[G & 255] ^ P[k++], U = q, j = z, G = J;
763
+ q = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[G >>> 8 & 255] << 8 | L[V & 255]) ^ P[k++], z = (L[j >>> 24] << 24 | L[G >>> 16 & 255] << 16 | L[V >>> 8 & 255] << 8 | L[U & 255]) ^ P[k++], J = (L[G >>> 24] << 24 | L[V >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[j & 255]) ^ P[k++], V = (L[V >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[j >>> 8 & 255] << 8 | L[G & 255]) ^ P[k++], M[w] = q, M[w + 1] = z, M[w + 2] = J, M[w + 3] = V;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -3191,8 +3191,8 @@ function X509(n) {
3191
3191
  var z = JSON.stringify(q.array).replace(/[\[\]\{\}\"]/g, "");
3192
3192
  return z;
3193
3193
  }, A = function(q) {
3194
- for (var z = "", V = q.array, Q = 0; Q < V.length; Q++) {
3195
- var U = V[Q];
3194
+ for (var z = "", J = q.array, V = 0; V < J.length; V++) {
3195
+ var U = J[V];
3196
3196
  if (z += " policy oid: " + U.policyoid + `
3197
3197
  `, U.array !== void 0)
3198
3198
  for (var j = 0; j < U.array.length; j++) {
@@ -3203,8 +3203,8 @@ function X509(n) {
3203
3203
  }
3204
3204
  return z;
3205
3205
  }, b = function(q) {
3206
- for (var z = "", V = q.array, Q = 0; Q < V.length; Q++) {
3207
- var U = V[Q];
3206
+ for (var z = "", J = q.array, V = 0; V < J.length; V++) {
3207
+ var U = J[V];
3208
3208
  try {
3209
3209
  U.dpname.full[0].uri !== void 0 && (z += " " + U.dpname.full[0].uri + `
3210
3210
  `);
@@ -3218,8 +3218,8 @@ function X509(n) {
3218
3218
  }
3219
3219
  return z;
3220
3220
  }, T = function(q) {
3221
- for (var z = "", V = q.array, Q = 0; Q < V.length; Q++) {
3222
- var U = V[Q];
3221
+ for (var z = "", J = q.array, V = 0; V < J.length; V++) {
3222
+ var U = J[V];
3223
3223
  U.caissuer !== void 0 && (z += " caissuer: " + U.caissuer + `
3224
3224
  `), U.ocsp !== void 0 && (z += " ocsp: " + U.ocsp + `
3225
3225
  `);
@@ -3959,9 +3959,9 @@ var PBMCustomShader = (
3959
3959
  `));
3960
3960
  var q = String(r.clippers.length);
3961
3961
  v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, q), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, q);
3962
- for (var z = 0, V = C; z < V.length; z++) {
3963
- var Q = V[z];
3964
- Q.onBeforeCompile && Q.onBeforeCompile(v, A);
3962
+ for (var z = 0, J = C; z < J.length; z++) {
3963
+ var V = J[z];
3964
+ V.onBeforeCompile && V.onBeforeCompile(v, A);
3965
3965
  }
3966
3966
  };
3967
3967
  var c = "";
@@ -5199,13 +5199,13 @@ function ajax(n, t, e, r, o) {
5199
5199
  }
5200
5200
  var L = w.split(","), O = (L[0].match(/:(.*?);/) || [])[1], k = L[1];
5201
5201
  if (t.responseType === "arraybuffer" || t.responseType === "blob") {
5202
- for (var D = atob(L[1]), q = D.length, z = new Uint8Array(q), V = 0; V < q; V++)
5203
- z[V] = D.charCodeAt(V);
5202
+ for (var D = atob(L[1]), q = D.length, z = new Uint8Array(q), J = 0; J < q; J++)
5203
+ z[J] = D.charCodeAt(J);
5204
5204
  t.responseType === "arraybuffer" ? k = z.buffer : k = new Blob([z], { type: O });
5205
5205
  }
5206
- var Q = {}, U = {
5206
+ var V = {}, U = {
5207
5207
  body: k,
5208
- meta: { origin: u, source: l, requestTime: s, responseTime: I, costs: C, headers: Q }
5208
+ meta: { origin: u, source: l, requestTime: s, responseTime: I, costs: C, headers: V }
5209
5209
  };
5210
5210
  e(U), c(U), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(U.meta)), g = !0;
5211
5211
  }
@@ -6066,8 +6066,8 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
6066
6066
  t[FACE_ORDER$2[5]]
6067
6067
  ], S = [], R = [0, 0, 0, 0, 0, 0], M = [], w = function(_) {
6068
6068
  var I = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, C = applyImageURLOptions(T[_], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, I), { key: I.key + "." + FACE_ORDER$2[_] })), H = function(q) {
6069
- R[_] = q, s(R.reduce(function(z, V) {
6070
- return z + V;
6069
+ R[_] = q, s(R.reduce(function(z, J) {
6070
+ return z + J;
6071
6071
  }, 0) / 6);
6072
6072
  }, L = (g = e.viaAjax) !== null && g !== void 0 ? g : !1;
6073
6073
  if (L) {
@@ -7438,8 +7438,8 @@ function parsePBMModel(n) {
7438
7438
  break;
7439
7439
  }
7440
7440
  }
7441
- for (var m = n.chunks.sort(function(Z, ne) {
7442
- return chunkOrder(Z) - chunkOrder(ne);
7441
+ for (var m = n.chunks.sort(function(te, re) {
7442
+ return chunkOrder(te) - chunkOrder(re);
7443
7443
  }), E = [], y = 0, v = m; y < v.length; y++) {
7444
7444
  var h = v[y], A = parseFloorName(h.name);
7445
7445
  E[A] || (E[A] = []), E[A].push(h);
@@ -7453,11 +7453,11 @@ function parsePBMModel(n) {
7453
7453
  S += h.faces.indices.length;
7454
7454
  }
7455
7455
  for (var M = new Float32Array(S * 3), w = new Float32Array(S * 2), P = new Float32Array(S * 3), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], H = 0, L = 0; L < T.length; L++) {
7456
- for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, D = h.vertices.uvs, q = h.faces.indices, z = h.faces.normals, V = h.vertices.marks, Q = q.length, R = 0; R < Q; R++) {
7456
+ for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, D = h.vertices.uvs, q = h.faces.indices, z = h.faces.normals, J = h.vertices.marks, V = q.length, R = 0; R < V; R++) {
7457
7457
  var U = q[R], j = M[H * 3 + R * 3] = k[U * 3], G = M[H * 3 + R * 3 + 1] = k[U * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[U * 3 + 2];
7458
- _ && (_[H + R] = V[U]), w[H * 2 + R * 2] = D[U * 2], w[H * 2 + R * 2 + 1] = D[U * 2 + 1];
7459
- var re = Math.floor(R / 3) * 3;
7460
- P[H * 3 + R * 3] = z[re], P[H * 3 + R * 3 + 1] = z[re + 1], P[H * 3 + R * 3 + 2] = z[re + 2], j < O[0] && (O[0] = j), G < O[1] && (O[1] = G), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), G > O[4] && (O[4] = G), ie > O[5] && (O[5] = ie);
7458
+ _ && (_[H + R] = J[U]), w[H * 2 + R * 2] = D[U * 2], w[H * 2 + R * 2 + 1] = D[U * 2 + 1];
7459
+ var ne = Math.floor(R / 3) * 3;
7460
+ P[H * 3 + R * 3] = z[ne], P[H * 3 + R * 3 + 1] = z[ne + 1], P[H * 3 + R * 3 + 2] = z[ne + 2], j < O[0] && (O[0] = j), G < O[1] && (O[1] = G), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), G > O[4] && (O[4] = G), ie > O[5] && (O[5] = ie);
7461
7461
  }
7462
7462
  O[0] < C[0] && (C[0] = O[0]), O[1] < C[1] && (C[1] = O[1]), O[2] < C[2] && (C[2] = O[2]), O[3] > C[3] && (C[3] = O[3]), O[4] > C[4] && (C[4] = O[4]), O[5] > C[5] && (C[5] = O[5]), I.push({
7463
7463
  materialIndex: L,
@@ -7466,7 +7466,7 @@ function parsePBMModel(n) {
7466
7466
  start: H,
7467
7467
  count: h.faces.indices.length,
7468
7468
  texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
7469
- }), H += Q;
7469
+ }), H += V;
7470
7470
  }
7471
7471
  var $ = {
7472
7472
  createAt: o,
@@ -7482,26 +7482,26 @@ function parsePBMModel(n) {
7482
7482
  };
7483
7483
  u.push($);
7484
7484
  } else {
7485
- for (var S = 0, ee = 0, R = 0; R < T.length; R++) {
7485
+ for (var S = 0, Z = 0, R = 0; R < T.length; R++) {
7486
7486
  var h = T[R];
7487
- ee += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7487
+ Z += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7488
7488
  }
7489
- for (var M = new Float32Array(ee * 3), w = new Float32Array(ee * 2), P = void 0, K = new Float32Array(ee), se = new Uint32Array(S), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], W = 0, H = 0, L = 0; L < T.length; L++) {
7490
- for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, X = h.vertices.marks, D = h.vertices.uvs, q = h.faces.indices, te = k.length / 3, Q = q.length, R = 0; R < te; R++) {
7489
+ for (var M = new Float32Array(Z * 3), w = new Float32Array(Z * 2), P = void 0, X = new Float32Array(Z), se = new Uint32Array(S), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], K = 0, H = 0, L = 0; L < T.length; L++) {
7490
+ for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, W = h.vertices.marks, D = h.vertices.uvs, q = h.faces.indices, ee = k.length / 3, V = q.length, R = 0; R < ee; R++) {
7491
7491
  var j = M[H * 3 + R * 3] = k[R * 3], G = M[H * 3 + R * 3 + 1] = k[R * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[R * 3 + 2];
7492
- _ && (_[H + R] = X[R]), w[H * 2 + R * 2] = D[R * 2], w[H * 2 + R * 2 + 1] = D[R * 2 + 1], K[H + R] = b, j < O[0] && (O[0] = j), G < O[1] && (O[1] = G), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), G > O[4] && (O[4] = G), ie > O[5] && (O[5] = ie);
7492
+ _ && (_[H + R] = W[R]), w[H * 2 + R * 2] = D[R * 2], w[H * 2 + R * 2 + 1] = D[R * 2 + 1], X[H + R] = b, j < O[0] && (O[0] = j), G < O[1] && (O[1] = G), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), G > O[4] && (O[4] = G), ie > O[5] && (O[5] = ie);
7493
7493
  }
7494
7494
  O[0] < C[0] && (C[0] = O[0]), O[1] < C[1] && (C[1] = O[1]), O[2] < C[2] && (C[2] = O[2]), O[3] > C[3] && (C[3] = O[3]), O[4] > C[4] && (C[4] = O[4]), O[5] > C[5] && (C[5] = O[5]);
7495
- for (var R = 0; R < Q; R++)
7496
- se[W + R] = H + q[R];
7495
+ for (var R = 0; R < V; R++)
7496
+ se[K + R] = H + q[R];
7497
7497
  I.push({
7498
7498
  materialIndex: L,
7499
7499
  name: h.name,
7500
7500
  chunkName: parseChunkName(h.name),
7501
- start: W,
7501
+ start: K,
7502
7502
  count: h.faces.indices.length,
7503
7503
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7504
- }), H += te, W += Q;
7504
+ }), H += ee, K += V;
7505
7505
  }
7506
7506
  var $ = {
7507
7507
  createAt: o,
@@ -7553,8 +7553,8 @@ function parse$4(n, t, e, r, o, s, u) {
7553
7553
  var O = q[D], z = void 0;
7554
7554
  if (O.texture) {
7555
7555
  if (z = O.texture, r.length > 0 && r.indexOf(O.texture) === -1) {
7556
- for (var V = 0, Q = r; V < Q.length; V++) {
7557
- var U = Q[V], j = isAbsoluteURL(U) ? U : pathJoin(e, U), G = j.slice(O.texture.length * -1) === O.texture;
7556
+ for (var J = 0, V = r; J < V.length; J++) {
7557
+ var U = V[J], j = isAbsoluteURL(U) ? U : pathJoin(e, U), G = j.slice(O.texture.length * -1) === O.texture;
7558
7558
  if (G) {
7559
7559
  z = U;
7560
7560
  break;
@@ -7567,41 +7567,41 @@ function parse$4(n, t, e, r, o, s, u) {
7567
7567
  var ie = new PBMMeshMaterial(t ? "phong" : "basic");
7568
7568
  ie.floorIndex = w, C.attributes.normal === void 0 && (ie.flatShading = !0), C.attributes._feature_id_rsmask && (ie.defines.USE_VERTEX_MARK = !0), k.push(ie), z ? (g++, h[z] ? h[z].push(ie) : h[z] = [ie]) : ie.color = new THREE.Color(16777215), p.add(ie);
7569
7569
  }
7570
- var re = new PBMMesh(C, k);
7571
- re.name = "model_floor_" + w, re.userData.createAt = v, re.userData.description = A, re.matrix.compose(re.position, re.quaternion, re.scale), re.matrixAutoUpdate = !1, re.frustumCulled = !1, c = v, f = A, d.push(re);
7570
+ var ne = new PBMMesh(C, k);
7571
+ ne.name = "model_floor_" + w, ne.userData.createAt = v, ne.userData.description = A, ne.matrix.compose(ne.position, ne.quaternion, ne.scale), ne.matrixAutoUpdate = !1, ne.frustumCulled = !1, c = v, f = A, d.push(ne);
7572
7572
  }
7573
7573
  o = autoRestImageOptionsByTextureLength(o, g);
7574
- for (var $ = [], ee = function(X) {
7575
- var te = void 0;
7576
- s && (te = s.get(X)), te || (te = loadTexture$1(X, e, o, u), s && s.set(X, te)), $.push(te.then(function(Z) {
7577
- for (var ne = 0, de = h[X]; ne < de.length; ne++) {
7578
- var ae = de[ne];
7579
- ae.map && (p.delete(ae.map), ae.map.dispose()), ae.map = Z, p.add(Z);
7580
- }
7581
- return Z;
7574
+ for (var $ = [], Z = function(W) {
7575
+ var ee = void 0;
7576
+ s && (ee = s.get(W)), ee || (ee = loadTexture$1(W, e, o, u), s && s.set(W, ee)), $.push(ee.then(function(te) {
7577
+ for (var re = 0, de = h[W]; re < de.length; re++) {
7578
+ var ae = de[re];
7579
+ ae.map && (p.delete(ae.map), ae.map.dispose()), ae.map = te, p.add(te);
7580
+ }
7581
+ return te;
7582
7582
  }).catch(function() {
7583
- for (var Z = 0, ne = h[X]; Z < ne.length; Z++) {
7584
- var de = ne[Z];
7583
+ for (var te = 0, re = h[W]; te < re.length; te++) {
7584
+ var de = re[te];
7585
7585
  de.map && (p.delete(de.map), de.map.dispose()), de.map = null, de.color = new THREE.Color(16777215);
7586
7586
  }
7587
7587
  return null;
7588
7588
  }));
7589
- }, K = 0, se = Object.keys(h); K < se.length; K++) {
7590
- var W = se[K];
7591
- ee(W);
7589
+ }, X = 0, se = Object.keys(h); X < se.length; X++) {
7590
+ var K = se[X];
7591
+ Z(K);
7592
7592
  }
7593
- return Promise.all($).then(function(X) {
7594
- var te = X.filter(function(Z) {
7595
- return Z instanceof THREE.Texture;
7593
+ return Promise.all($).then(function(W) {
7594
+ var ee = W.filter(function(te) {
7595
+ return te instanceof THREE.Texture;
7596
7596
  });
7597
7597
  return {
7598
7598
  createAt: c,
7599
7599
  description: f,
7600
7600
  objects: d,
7601
- textures: te,
7601
+ textures: ee,
7602
7602
  dispose: function() {
7603
- p.forEach(function(Z) {
7604
- Z.dispose();
7603
+ p.forEach(function(te) {
7604
+ te.dispose();
7605
7605
  }), p.clear();
7606
7606
  }
7607
7607
  };
@@ -8582,8 +8582,8 @@ function parse$3(n, t, e, r, o) {
8582
8582
  objects: s,
8583
8583
  textures: Array.from(E),
8584
8584
  dispose: function() {
8585
- l.forEach(function(V) {
8586
- V.dispose();
8585
+ l.forEach(function(J) {
8586
+ J.dispose();
8587
8587
  }), l.clear();
8588
8588
  }
8589
8589
  };
@@ -8990,10 +8990,10 @@ var Parser = (
8990
8990
  Promise.all(m)
8991
8991
  ]).then(function(M) {
8992
8992
  for (var w = M[0], P = M[1], _ = M[2], I = M[3], C = M[4], H = [], L = function(q, z) {
8993
- var V = w[q], Q = P[q], U = _[q], j = I[q], G = C[q];
8994
- if (V === void 0)
8993
+ var J = w[q], V = P[q], U = _[q], j = I[q], G = C[q];
8994
+ if (J === void 0)
8995
8995
  return "continue";
8996
- V.updateMatrix(), V.matrixAutoUpdate = !0;
8996
+ J.updateMatrix(), J.matrixAutoUpdate = !0;
8997
8997
  var ie = void 0;
8998
8998
  switch (PATH_PROPERTIES[G.path]) {
8999
8999
  case PATH_PROPERTIES.weights:
@@ -9008,19 +9008,19 @@ var Parser = (
9008
9008
  ie = THREE.VectorKeyframeTrack;
9009
9009
  break;
9010
9010
  }
9011
- var re = V.name ? V.name : V.uuid, $ = j.interpolation !== void 0 ? INTERPOLATION[j.interpolation] : THREE.InterpolateLinear, ee = [];
9012
- PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? V.traverse(function(ne) {
9013
- ne.morphTargetInfluences && ee.push(ne.name ? ne.name : ne.uuid);
9014
- }) : ee.push(re);
9015
- var K = U.array;
9011
+ var ne = J.name ? J.name : J.uuid, $ = j.interpolation !== void 0 ? INTERPOLATION[j.interpolation] : THREE.InterpolateLinear, Z = [];
9012
+ PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? J.traverse(function(re) {
9013
+ re.morphTargetInfluences && Z.push(re.name ? re.name : re.uuid);
9014
+ }) : Z.push(ne);
9015
+ var X = U.array;
9016
9016
  if (U.normalized) {
9017
- for (var se = getNormalizedComponentScale(K.constructor), W = new Float32Array(K.length), X = 0, te = K.length; X < te; X++)
9018
- W[X] = K[X] * se;
9019
- K = W;
9017
+ for (var se = getNormalizedComponentScale(X.constructor), K = new Float32Array(X.length), W = 0, ee = X.length; W < ee; W++)
9018
+ K[W] = X[W] * se;
9019
+ X = K;
9020
9020
  }
9021
- for (var X = 0, te = ee.length; X < te; X++) {
9022
- var Z = new ie(ee[X] + "." + PATH_PROPERTIES[G.path], Q.array, K, $);
9023
- H.push(Z);
9021
+ for (var W = 0, ee = Z.length; W < ee; W++) {
9022
+ var te = new ie(Z[W] + "." + PATH_PROPERTIES[G.path], V.array, X, $);
9023
+ H.push(te);
9024
9024
  }
9025
9025
  }, O = 0, k = w.length; O < k; O++)
9026
9026
  L(O);
@@ -11677,11 +11677,11 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11677
11677
  return e || new u8(0);
11678
11678
  var u = !e, l = u || t.i != 2, c = t.i;
11679
11679
  u && (e = new u8(o * 3));
11680
- var f = function(W) {
11681
- var X = e.length;
11682
- if (W > X) {
11683
- var te = new u8(Math.max(X * 2, W));
11684
- te.set(e), e = te;
11680
+ var f = function(K) {
11681
+ var W = e.length;
11682
+ if (K > W) {
11683
+ var ee = new u8(Math.max(W * 2, K));
11684
+ ee.set(e), e = ee;
11685
11685
  }
11686
11686
  }, d = t.f || 0, h = t.p || 0, p = t.b || 0, g = t.l, m = t.d, E = t.m, y = t.n, v = o * 8;
11687
11687
  do {
@@ -11728,8 +11728,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11728
11728
  }
11729
11729
  }
11730
11730
  l && f(p + 131072);
11731
- for (var V = (1 << E) - 1, Q = (1 << y) - 1, U = h; ; U = h) {
11732
- var k = g[bits16(n, h) & V], j = k >> 4;
11731
+ for (var J = (1 << E) - 1, V = (1 << y) - 1, U = h; ; U = h) {
11732
+ var k = g[bits16(n, h) & J], j = k >> 4;
11733
11733
  if (h += k & 15, h > v) {
11734
11734
  c && err(0);
11735
11735
  break;
@@ -11745,8 +11745,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11745
11745
  var I = j - 257, ie = fleb[I];
11746
11746
  G = bits(n, h, (1 << ie) - 1) + fl[I], h += ie;
11747
11747
  }
11748
- var re = m[bits16(n, h) & Q], $ = re >> 4;
11749
- re || err(3), h += re & 15;
11748
+ var ne = m[bits16(n, h) & V], $ = ne >> 4;
11749
+ ne || err(3), h += ne & 15;
11750
11750
  var z = fd[$];
11751
11751
  if ($ > 3) {
11752
11752
  var ie = fdeb[$];
@@ -11757,13 +11757,13 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11757
11757
  break;
11758
11758
  }
11759
11759
  l && f(p + 131072);
11760
- var ee = p + G;
11760
+ var Z = p + G;
11761
11761
  if (p < z) {
11762
- var K = s - z, se = Math.min(z, ee);
11763
- for (K + p < 0 && err(3); p < se; ++p)
11764
- e[p] = r[K + p];
11762
+ var X = s - z, se = Math.min(z, Z);
11763
+ for (X + p < 0 && err(3); p < se; ++p)
11764
+ e[p] = r[X + p];
11765
11765
  }
11766
- for (; p < ee; ++p)
11766
+ for (; p < Z; ++p)
11767
11767
  e[p] = e[p - z];
11768
11768
  }
11769
11769
  }
@@ -13459,9 +13459,9 @@ function loadX3p(n, t) {
13459
13459
  });
13460
13460
  }
13461
13461
  function parse$1(n, t) {
13462
- for (var e, r, o, s, u, l, c, f, d, h, p, g, m, E, y, v, A, b, T, S, R, M, w, P, _, I, C, H, L, O, k, D, q, z, V, Q, U, j, G, ie, re, $, ee, K, se, W, X, te, Z, ne, de, ae, ue, be, oe = unzipSync(n), le = "", me = null, ge = 0, Ae = Object.keys(oe); ge < Ae.length; ge++) {
13462
+ for (var e, r, o, s, u, l, c, f, d, h, p, g, m, E, y, v, A, b, T, S, R, M, w, P, _, I, C, H, L, O, k, D, q, z, J, V, U, j, G, ie, ne, $, Z, X, se, K, W, ee, te, re, de, ae, fe, be, oe = unzipSync(n), ue = "", me = null, ge = 0, Ae = Object.keys(oe); ge < Ae.length; ge++) {
13463
13463
  var Te = Ae[ge];
13464
- /(^|\/)main\.xml$/i.test(Te) && (me = oe[Te], le = Te.slice(0, Te.lastIndexOf("/") + 1));
13464
+ /(^|\/)main\.xml$/i.test(Te) && (me = oe[Te], ue = Te.slice(0, Te.lastIndexOf("/") + 1));
13465
13465
  }
13466
13466
  if (!me)
13467
13467
  throw new Error("X3p: main.xml not found.");
@@ -13487,15 +13487,15 @@ function parse$1(n, t) {
13487
13487
  offset: Number((k = (O = he == null ? void 0 : he.querySelector("CZ Offset")) === null || O === void 0 ? void 0 : O.textContent) !== null && k !== void 0 ? k : "0")
13488
13488
  }
13489
13489
  }, ye = null, Be = Ee.querySelector("Record1 Axes Rotation");
13490
- Be && (ye = new THREE.Matrix3(), ye.set(Number((q = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((V = (z = Be.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && V !== void 0 ? V : 0), Number((U = (Q = Be.querySelector("r13")) === null || Q === void 0 ? void 0 : Q.textContent) !== null && U !== void 0 ? U : 0), Number((G = (j = Be.querySelector("r21")) === null || j === void 0 ? void 0 : j.textContent) !== null && G !== void 0 ? G : 0), Number((re = (ie = Be.querySelector("r22")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && re !== void 0 ? re : 0), Number((ee = ($ = Be.querySelector("r23")) === null || $ === void 0 ? void 0 : $.textContent) !== null && ee !== void 0 ? ee : 0), Number((se = (K = Be.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && se !== void 0 ? se : 0), Number((X = (W = Be.querySelector("r32")) === null || W === void 0 ? void 0 : W.textContent) !== null && X !== void 0 ? X : 0), Number((Z = (te = Be.querySelector("r33")) === null || te === void 0 ? void 0 : te.textContent) !== null && Z !== void 0 ? Z : 0)));
13491
- var Ie = (ne = Ee.querySelector("Record3 DataLink PointDataLink")) === null || ne === void 0 ? void 0 : ne.textContent;
13490
+ Be && (ye = new THREE.Matrix3(), ye.set(Number((q = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((J = (z = Be.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((U = (V = Be.querySelector("r13")) === null || V === void 0 ? void 0 : V.textContent) !== null && U !== void 0 ? U : 0), Number((G = (j = Be.querySelector("r21")) === null || j === void 0 ? void 0 : j.textContent) !== null && G !== void 0 ? G : 0), Number((ne = (ie = Be.querySelector("r22")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ne !== void 0 ? ne : 0), Number((Z = ($ = Be.querySelector("r23")) === null || $ === void 0 ? void 0 : $.textContent) !== null && Z !== void 0 ? Z : 0), Number((se = (X = Be.querySelector("r31")) === null || X === void 0 ? void 0 : X.textContent) !== null && se !== void 0 ? se : 0), Number((W = (K = Be.querySelector("r32")) === null || K === void 0 ? void 0 : K.textContent) !== null && W !== void 0 ? W : 0), Number((te = (ee = Be.querySelector("r33")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && te !== void 0 ? te : 0)));
13491
+ var Ie = (re = Ee.querySelector("Record3 DataLink PointDataLink")) === null || re === void 0 ? void 0 : re.textContent;
13492
13492
  if (typeof Ie != "string")
13493
13493
  throw new Error("X3p: PointDataLink not found.");
13494
- Ie = pathJoin(le, Ie);
13494
+ Ie = pathJoin(ue, Ie);
13495
13495
  var $e = oe[Ie];
13496
13496
  if (!$e)
13497
13497
  throw new Error("X3p: ".concat($e, " not found."));
13498
- for (var Re = getPointArray($e.buffer, Ve.z.dataType), ze = Number((ae = (de = Ee.querySelector("Record3 MatrixDimension SizeX")) === null || de === void 0 ? void 0 : de.textContent) !== null && ae !== void 0 ? ae : "0"), Fe = Number((be = (ue = Ee.querySelector("Record3 MatrixDimension SizeY")) === null || ue === void 0 ? void 0 : ue.textContent) !== null && be !== void 0 ? be : "0"), Oe = Math.floor(ze - 1), Le = Math.floor(Fe - 1), Ue = Oe + 1, tt = Le + 1, lt = new Float32Array(Ue * tt * 3), nt = new Float32Array(Ue * tt * 2), ot = new Uint32Array(Oe * Le * 6), At = new THREE.Box3(), We = 0; We < tt; We++)
13498
+ for (var Re = getPointArray($e.buffer, Ve.z.dataType), ze = Number((ae = (de = Ee.querySelector("Record3 MatrixDimension SizeX")) === null || de === void 0 ? void 0 : de.textContent) !== null && ae !== void 0 ? ae : "0"), Fe = Number((be = (fe = Ee.querySelector("Record3 MatrixDimension SizeY")) === null || fe === void 0 ? void 0 : fe.textContent) !== null && be !== void 0 ? be : "0"), Oe = Math.floor(ze - 1), Le = Math.floor(Fe - 1), Ue = Oe + 1, tt = Le + 1, lt = new Float32Array(Ue * tt * 3), nt = new Float32Array(Ue * tt * 2), ot = new Uint32Array(Oe * Le * 6), At = new THREE.Box3(), We = 0; We < tt; We++)
13499
13499
  for (var Ct = We * Ve.y.increment + Ve.y.offset, He = 0; He < Ue; He++) {
13500
13500
  var Ne = We * Ue + He, bt = He * Ve.x.increment + Ve.x.offset, It = Re[Ne], Tt = !isNaN(It), yt = Tt ? It : NaN;
13501
13501
  _vector.set(bt, -Ct, yt), ye && _vector.applyMatrix3(ye), Tt && At.expandByPoint(_vector), lt[Ne * 3 + 0] = _vector.x, lt[Ne * 3 + 1] = _vector.y, lt[Ne * 3 + 2] = _vector.z, nt[Ne * 2 + 0] = He / Oe, nt[Ne * 2 + 1] = 1 - We / Le;
@@ -13505,15 +13505,15 @@ function parse$1(n, t) {
13505
13505
  var Rt = He + Ue * We, rt = He + Ue * (We + 1), it = He + 1 + Ue * (We + 1), ct = He + 1 + Ue * We, Xe = (We * Oe + He) * 6;
13506
13506
  ot[Xe + 0] = Rt, ot[Xe + 1] = rt, ot[Xe + 2] = ct, ot[Xe + 3] = rt, ot[Xe + 4] = it, ot[Xe + 5] = ct;
13507
13507
  }
13508
- var fe = new THREE.BufferGeometry();
13509
- fe.setAttribute("position", new THREE.BufferAttribute(lt, 3)), fe.setAttribute("uv", new THREE.BufferAttribute(nt, 2)), fe.setIndex(new THREE.BufferAttribute(ot, 1)), (!fe.groups || fe.groups.length === 0) && fe.addGroup(0, fe.index ? fe.index.count : fe.attributes.position.count, 0), fe.boundingBox = At;
13508
+ var ce = new THREE.BufferGeometry();
13509
+ ce.setAttribute("position", new THREE.BufferAttribute(lt, 3)), ce.setAttribute("uv", new THREE.BufferAttribute(nt, 2)), ce.setIndex(new THREE.BufferAttribute(ot, 1)), (!ce.groups || ce.groups.length === 0) && ce.addGroup(0, ce.index ? ce.index.count : ce.attributes.position.count, 0), ce.boundingBox = At;
13510
13510
  var Me = new PBMMeshMaterial(t.light ? "phong" : "basic");
13511
13511
  Me.flatShading = !0, Me.color.copy(pe);
13512
- var Ce = new PBMMesh(fe, [Me]);
13512
+ var Ce = new PBMMesh(ce, [Me]);
13513
13513
  return {
13514
13514
  object: Ce,
13515
13515
  dispose: function() {
13516
- fe.dispose(), Me.dispose();
13516
+ ce.dispose(), Me.dispose();
13517
13517
  }
13518
13518
  };
13519
13519
  }
@@ -14144,14 +14144,14 @@ var BVHVector3 = (
14144
14144
  function O(k) {
14145
14145
  var D = k.startIndex, q = k.endIndex, z = k.extents;
14146
14146
  C[0] = z[3] - z[0], C[1] = z[4] - z[1], C[2] = z[5] - z[2], H.sort(L);
14147
- for (var V = 0; V < 3; V++) {
14148
- for (var Q = H[V], U = z[Q] + z[Q + 3], j = D, G = q - 1, ie = -1, re = void 0; j <= G; )
14149
- ie === -1 ? (re = u[j], l[re * 6 + Q] + l[re * 6 + Q + 3] < U ? j++ : ie = re) : (re = u[G], l[re * 6 + Q] + l[re * 6 + Q + 3] >= U || (u[j] = re, u[G] = ie, ie = -1, j++), G--);
14147
+ for (var J = 0; J < 3; J++) {
14148
+ for (var V = H[J], U = z[V] + z[V + 3], j = D, G = q - 1, ie = -1, ne = void 0; j <= G; )
14149
+ ie === -1 ? (ne = u[j], l[ne * 6 + V] + l[ne * 6 + V + 3] < U ? j++ : ie = ne) : (ne = u[G], l[ne * 6 + V] + l[ne * 6 + V + 3] >= U || (u[j] = ne, u[G] = ie, ie = -1, j++), G--);
14150
14150
  if (j > D && j < q) {
14151
14151
  var $ = new BVHNode(++d, calcExtents(u, l, D, j, EPSILON$1), D, j, k.deepth + 1);
14152
14152
  $.deepth < r && $.endIndex - $.startIndex > e && (c[f++] = $);
14153
- var ee = new BVHNode(++d, calcExtents(u, l, j, q, EPSILON$1), j, q, k.deepth + 1);
14154
- ee.deepth < r && ee.endIndex - ee.startIndex > e && (c[f++] = ee), k.node0 = $, k.node1 = ee, k.startIndex = 0, k.endIndex = 0;
14153
+ var Z = new BVHNode(++d, calcExtents(u, l, j, q, EPSILON$1), j, q, k.deepth + 1);
14154
+ Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), k.node0 = $, k.node1 = Z, k.startIndex = 0, k.endIndex = 0;
14155
14155
  break;
14156
14156
  }
14157
14157
  }
@@ -14188,20 +14188,20 @@ var BVHVector3 = (
14188
14188
  this.getPositionByIndex(L, O);
14189
14189
  var k = O.x, D = O.y, q = O.z, z = new BVHVector3(0, 0, 0);
14190
14190
  this.getPositionByIndex(L + 1, z);
14191
- var V = z.x, Q = z.y, U = z.z, j = new BVHVector3(0, 0, 0);
14191
+ var J = z.x, V = z.y, U = z.z, j = new BVHVector3(0, 0, 0);
14192
14192
  this.getPositionByIndex(L + 2, j);
14193
- var G = j.x, ie = j.y, re = j.z, $ = V - k, ee = Q - D, K = U - q, se = G - k, W = ie - D, X = re - q, te = ee * X - K * W, Z = K * se - $ * X, ne = $ * W - ee * se, de = M * te + w * Z + P * ne, ae = void 0;
14193
+ var G = j.x, ie = j.y, ne = j.z, $ = J - k, Z = V - D, X = U - q, se = G - k, K = ie - D, W = ne - q, ee = Z * W - X * K, te = X * se - $ * W, re = $ * K - Z * se, de = M * ee + w * te + P * re, ae = void 0;
14194
14194
  if (de > 0)
14195
14195
  ae = 1;
14196
14196
  else if (de < 0)
14197
14197
  ae = -1, de = -de;
14198
14198
  else
14199
14199
  continue;
14200
- var ue = T - k, be = S - D, oe = R - q, le = ae * (M * (be * X - oe * W) + w * (oe * se - ue * X) + P * (ue * W - be * se));
14201
- if (!(le < 0)) {
14202
- var me = ae * (M * (ee * oe - K * be) + w * (K * ue - $ * oe) + P * ($ * be - ee * ue));
14203
- if (!(me < 0) && !(le + me > de)) {
14204
- var ge = -ae * (ue * te + be * Z + oe * ne);
14200
+ var fe = T - k, be = S - D, oe = R - q, ue = ae * (M * (be * W - oe * K) + w * (oe * se - fe * W) + P * (fe * K - be * se));
14201
+ if (!(ue < 0)) {
14202
+ var me = ae * (M * (Z * oe - X * be) + w * (X * fe - $ * oe) + P * ($ * be - Z * fe));
14203
+ if (!(me < 0) && !(ue + me > de)) {
14204
+ var ge = -ae * (fe * ee + be * te + oe * re);
14205
14205
  if (!(ge < 0)) {
14206
14206
  var Ae = ge / de, Te = new BVHVector3(T + M * Ae, S + w * Ae, R + P * Ae), pe = new BVHIntersect(O, z, j, H, Te);
14207
14207
  (!u || u(pe)) && (s ? Ae < v && (v = Ae, l.length > 0 && (l.length = 0), l.push(pe)) : l.push(pe));
@@ -14266,12 +14266,12 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14266
14266
  function P(_) {
14267
14267
  var I = _.startIndex, C = _.endIndex, H = _.extents;
14268
14268
  R[0] = H[3] - H[0], R[1] = H[4] - H[1], R[2] = H[5] - H[2];
14269
- for (var L = M.sort(w)[0], O = ORDER_AXISES[L], k = (H[L] + H[L + 3]) / 2, D = I, q = C - 1, z = -1, V; D <= q; )
14270
- z === -1 ? (V = l[D], s(V, scratchVector3$8), scratchVector3$8[O] < k ? D++ : z = V) : (V = l[q], s(V, scratchVector3$8), scratchVector3$8[O] >= k || (l[D] = V, l[q] = z, z = -1, D++), q--);
14269
+ for (var L = M.sort(w)[0], O = ORDER_AXISES[L], k = (H[L] + H[L + 3]) / 2, D = I, q = C - 1, z = -1, J; D <= q; )
14270
+ z === -1 ? (J = l[D], s(J, scratchVector3$8), scratchVector3$8[O] < k ? D++ : z = J) : (J = l[q], s(J, scratchVector3$8), scratchVector3$8[O] >= k || (l[D] = J, l[q] = z, z = -1, D++), q--);
14271
14271
  if (D > I) {
14272
- var Q = H.slice();
14273
- Q[L + 3] = k + EPSILON;
14274
- var U = new BVHNode(++d, Q, I, D, _.deepth + 1);
14272
+ var V = H.slice();
14273
+ V[L + 3] = k + EPSILON;
14274
+ var U = new BVHNode(++d, V, I, D, _.deepth + 1);
14275
14275
  U.deepth < r && U.endIndex - U.startIndex > e && (c[f++] = U), _.node0 = U;
14276
14276
  }
14277
14277
  if (C > D) {
@@ -14297,8 +14297,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14297
14297
  this.getPositionByIndex(w, P);
14298
14298
  var _ = P.x, I = P.y, C = P.z, H = e.x, L = e.y, O = e.z, k = r.x, D = r.y, q = r.z, z = k * (_ - H) + D * (I - L) + q * (C - O);
14299
14299
  if (z > 0 ? (H += k * z, L += D * z, O += q * z) : z < 0 && (z = 0), k = _ - H, D = I - L, q = C - O, k * k + D * D + q * q <= g) {
14300
- var V = new BVHVector3(H, L, O), Q = new BVHIntersect(P, P, P, w, V);
14301
- (!u || u(Q)) && (s ? z < A && (A = z, l.length > 0 && (l.length = 0), l.push(Q)) : l.push(Q));
14300
+ var J = new BVHVector3(H, L, O), V = new BVHIntersect(P, P, P, w, J);
14301
+ (!u || u(V)) && (s ? z < A && (A = z, l.length > 0 && (l.length = 0), l.push(V)) : l.push(V));
14302
14302
  }
14303
14303
  }
14304
14304
  var U = y * BYTES_PER_NODE / 2, j = p[U + 16], G = p[U + 17];
@@ -16526,44 +16526,44 @@ var Tile3D = (
16526
16526
  return pe.floor !== Se.floor ? pe.floor - Se.floor : pe.levelOfContent !== Se.levelOfContent ? Se.levelOfContent - pe.levelOfContent : pe.state.distanceToCamera !== Se.state.distanceToCamera ? pe.state.distanceToCamera - Se.state.distanceToCamera : pe.state.centerZDepth - Se.state.centerZDepth;
16527
16527
  });
16528
16528
  for (var k = [], D = 0, q = this.tileset.selectedTiles; D < q.length; D++) {
16529
- var z = q[D], V = (p = (h = z.content) === null || h === void 0 ? void 0 : h.data) === null || p === void 0 ? void 0 : p.object;
16530
- if (V) {
16531
- var Q = V.update(e, r, o, this, z, E);
16532
- if (k.push(z.id), Q && (m = !0), this.tileset.hasMixedContent && w.skipLevelOfDetail) {
16529
+ var z = q[D], J = (p = (h = z.content) === null || h === void 0 ? void 0 : h.data) === null || p === void 0 ? void 0 : p.object;
16530
+ if (J) {
16531
+ var V = J.update(e, r, o, this, z, E);
16532
+ if (k.push(z.id), V && (m = !0), this.tileset.hasMixedContent && w.skipLevelOfDetail) {
16533
16533
  if (!z.state.finalResolution) {
16534
- var U = cloneSkipBackfaceObject(V);
16535
- U.name = "skipBackface:" + V.name, this.backfaceObjects.push(U);
16534
+ var U = cloneSkipBackfaceObject(J);
16535
+ U.name = "skipBackface:" + J.name, this.backfaceObjects.push(U);
16536
16536
  }
16537
- for (var j = z.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | j << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, ie = THREE.GreaterEqualStencilFunc, re = STENCIL_CONSTANT.SKIP_LOD_MASK, $ = THREE.ReplaceStencilOp, ee = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, K = 0, se = V.materials; K < se.length; K++) {
16538
- var W = se[K];
16539
- W.stencilWrite = !0, W.stencilRef = G, W.stencilFunc = ie, W.stencilFuncMask = re, W.stencilZPass = $, W.stencilWriteMask = ee;
16537
+ for (var j = z.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | j << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, ie = THREE.GreaterEqualStencilFunc, ne = STENCIL_CONSTANT.SKIP_LOD_MASK, $ = THREE.ReplaceStencilOp, Z = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, se = J.materials; X < se.length; X++) {
16538
+ var K = se[X];
16539
+ K.stencilWrite = !0, K.stencilRef = G, K.stencilFunc = ie, K.stencilFuncMask = ne, K.stencilZPass = $, K.stencilWriteMask = Z;
16540
16540
  }
16541
16541
  } else
16542
- for (var X = 0, te = V.materials; X < te.length; X++) {
16543
- var W = te[X];
16544
- 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;
16542
+ for (var W = 0, ee = J.materials; W < ee.length; W++) {
16543
+ var K = ee[W];
16544
+ K.stencilWrite = !1, K.stencilRef = STENCIL_CONSTANT.TILE_MASK, K.stencilFunc = THREE.AlwaysStencilFunc, K.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, K.stencilZPass = THREE.ReplaceStencilOp, K.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16545
16545
  }
16546
- this.tileObjects.push(V);
16546
+ this.tileObjects.push(J);
16547
16547
  }
16548
16548
  }
16549
- var Z = k.toString();
16550
- if (tileVersionMap.get(this) !== Z && (tileVersionMap.set(this, Z), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length)
16549
+ var te = k.toString();
16550
+ if (tileVersionMap.get(this) !== te && (tileVersionMap.set(this, te), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length)
16551
16551
  for (var O = 0; O < this.backfaceObjects.length; O++)
16552
16552
  this.renderObjects.push(this.backfaceObjects[O]);
16553
16553
  if (this.tileObjects.length)
16554
16554
  for (var O = 0; O < this.tileObjects.length; O++)
16555
16555
  this.renderObjects.push(this.tileObjects[O]);
16556
16556
  w.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16557
- for (var ne = [], de = 0, ae = this.tileset.selectedTrajectories; de < ae.length; de++) {
16558
- var ue = ae[de], be = (g = ue.content.data) === null || g === void 0 ? void 0 : g.object;
16557
+ for (var re = [], de = 0, ae = this.tileset.selectedTrajectories; de < ae.length; de++) {
16558
+ var fe = ae[de], be = (g = fe.content.data) === null || g === void 0 ? void 0 : g.object;
16559
16559
  if (be) {
16560
- var Q = be.update(e, r, o, this, ue, E);
16561
- ne.push(ue.id), Q && (m = !0), this.renderObjects.push(be);
16560
+ var V = be.update(e, r, o, this, fe, E);
16561
+ re.push(fe.id), V && (m = !0), this.renderObjects.push(be);
16562
16562
  }
16563
16563
  }
16564
- var oe = ne.toString();
16564
+ var oe = re.toString();
16565
16565
  if (trajectoryVersionMap.get(this) !== oe && (trajectoryVersionMap.set(this, oe), m = !0), this.parent)
16566
- for (var le = this.parent.children.length + 1, me = Math.min(0, this.parent.children.indexOf(this)), ge = (me - le) * 1e4 + 1, Ae = function(pe) {
16566
+ for (var ue = this.parent.children.length + 1, me = Math.min(0, this.parent.children.indexOf(this)), ge = (me - ue) * 1e4 + 1, Ae = function(pe) {
16567
16567
  var Se = Te.renderObjects[pe], _e = pe + ge;
16568
16568
  Se.traverse(function(Ee) {
16569
16569
  (Ee instanceof THREE.Mesh || Ee instanceof THREE.Line || Ee instanceof THREE.Points) && (Ee.renderOrder = _e);
@@ -17198,13 +17198,13 @@ function getEdgesBySphere(n, t, e) {
17198
17198
  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;
17199
17199
  if (p && p.visible) {
17200
17200
  var g = [];
17201
- if (p.traverseVisible(function(Q) {
17202
- if (Q instanceof THREE.Mesh) {
17203
- var U = getBvhTreeForMesh(Q);
17201
+ if (p.traverseVisible(function(V) {
17202
+ if (V instanceof THREE.Mesh) {
17203
+ var U = getBvhTreeForMesh(V);
17204
17204
  if (U) {
17205
- scratchMatrix4$1.copy(Q.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17205
+ scratchMatrix4$1.copy(V.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17206
17206
  var j = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), G = new THREE.BufferGeometry();
17207
- G.setAttribute("position", new THREE.BufferAttribute(j, 3)), G.applyMatrix4(Q.matrixWorld), G = mergeVertices(G, 0.01), g.push(G);
17207
+ G.setAttribute("position", new THREE.BufferAttribute(j, 3)), G.applyMatrix4(V.matrixWorld), G = mergeVertices(G, 0.01), g.push(G);
17208
17208
  }
17209
17209
  }
17210
17210
  }), g.length === 0)
@@ -17225,8 +17225,8 @@ function getEdgesBySphere(n, t, e) {
17225
17225
  for (var D in I) {
17226
17226
  var q = I[D];
17227
17227
  if (q.face2 === void 0 || b[q.face1].normal.dot(b[q.face2].normal) <= r) {
17228
- var z = A[q.index1], V = A[q.index2];
17229
- o.push(new THREE.Line3(z, V));
17228
+ var z = A[q.index1], J = A[q.index2];
17229
+ o.push(new THREE.Line3(z, J));
17230
17230
  }
17231
17231
  }
17232
17232
  A.length = 0, b.length = 0;
@@ -18114,8 +18114,8 @@ function parse(n, t) {
18114
18114
  writable: !1,
18115
18115
  value: Object.freeze(R.allowHosts)
18116
18116
  });
18117
- var C = S.reduce(function(W, X) {
18118
- return jsonMerge(W, X);
18117
+ var C = S.reduce(function(K, W) {
18118
+ return jsonMerge(K, W);
18119
18119
  });
18120
18120
  defineProperty(t, "name", {
18121
18121
  enumerable: !0,
@@ -18134,8 +18134,8 @@ function parse(n, t) {
18134
18134
  enumerable: !0,
18135
18135
  writable: !0,
18136
18136
  value: (function() {
18137
- var W, X = (W = C.base_url) !== null && W !== void 0 ? W : "";
18138
- return X && X[X.length - 1] !== "/" && (X += "/"), X;
18137
+ var K, W = (K = C.base_url) !== null && K !== void 0 ? K : "";
18138
+ return W && W[W.length - 1] !== "/" && (W += "/"), W;
18139
18139
  })()
18140
18140
  });
18141
18141
  var H = void 0;
@@ -18149,25 +18149,25 @@ function parse(n, t) {
18149
18149
  configurable: !1,
18150
18150
  writable: !1,
18151
18151
  value: (function() {
18152
- var W = C.model.file_url;
18153
- if (W)
18154
- return relativeURL(W, t.baseURL);
18152
+ var K = C.model.file_url;
18153
+ if (K)
18154
+ return relativeURL(K, t.baseURL);
18155
18155
  })()
18156
18156
  }), defineProperty(H, "textureBase", {
18157
18157
  enumerable: !0,
18158
18158
  configurable: !1,
18159
18159
  writable: !1,
18160
18160
  value: (function() {
18161
- var W = C.model.material_base_url;
18162
- return W && (W = relativeURL(W, t.baseURL)), W;
18161
+ var K = C.model.material_base_url;
18162
+ return K && (K = relativeURL(K, t.baseURL)), K;
18163
18163
  })()
18164
18164
  }), defineProperty(H, "textures", {
18165
18165
  enumerable: !0,
18166
18166
  configurable: !1,
18167
18167
  writable: !1,
18168
18168
  value: (function() {
18169
- var W = void 0;
18170
- return Array.isArray(C.model.material_textures) && (W = C.model.material_textures.slice(), Object.freeze(W)), W;
18169
+ var K = void 0;
18170
+ return Array.isArray(C.model.material_textures) && (K = C.model.material_textures.slice(), Object.freeze(K)), K;
18171
18171
  })()
18172
18172
  }), defineProperty(H, "upAxis", {
18173
18173
  enumerable: !0,
@@ -18186,73 +18186,73 @@ function parse(n, t) {
18186
18186
  configurable: !1,
18187
18187
  writable: !1,
18188
18188
  value: (function() {
18189
- var W, X, te, Z = [];
18189
+ var K, W, ee, te = [];
18190
18190
  if (Array.isArray(C.model.layers))
18191
- for (var ne = 0, de = C.model.layers; ne < de.length; ne++) {
18192
- var ae = de[ne];
18191
+ for (var re = 0, de = C.model.layers; re < de.length; re++) {
18192
+ var ae = de[re];
18193
18193
  if (ae && ae.tileset_url) {
18194
- var ue = {};
18195
- defineProperty(ue, "work", {
18194
+ var fe = {};
18195
+ defineProperty(fe, "work", {
18196
18196
  enumerable: !1,
18197
18197
  configurable: !1,
18198
18198
  writable: !1,
18199
18199
  value: t
18200
- }), defineProperty(ue, "name", {
18200
+ }), defineProperty(fe, "name", {
18201
18201
  enumerable: !0,
18202
18202
  configurable: !1,
18203
18203
  writable: !1,
18204
- value: (W = ae.name) !== null && W !== void 0 ? W : ""
18205
- }), defineProperty(ue, "type", {
18204
+ value: (K = ae.name) !== null && K !== void 0 ? K : ""
18205
+ }), defineProperty(fe, "type", {
18206
18206
  enumerable: !0,
18207
18207
  configurable: !1,
18208
18208
  writable: !1,
18209
- value: (X = ae.type) !== null && X !== void 0 ? X : "mesh"
18210
- }), defineProperty(ue, "upAxis", {
18209
+ value: (W = ae.type) !== null && W !== void 0 ? W : "mesh"
18210
+ }), defineProperty(fe, "upAxis", {
18211
18211
  enumerable: !0,
18212
18212
  configurable: !1,
18213
18213
  writable: !1,
18214
- value: (te = ae.up_axis) !== null && te !== void 0 ? te : "Z"
18215
- }), defineProperty(ue, "tileset", {
18214
+ value: (ee = ae.up_axis) !== null && ee !== void 0 ? ee : "Z"
18215
+ }), defineProperty(fe, "tileset", {
18216
18216
  enumerable: !0,
18217
18217
  configurable: !1,
18218
18218
  writable: !1,
18219
18219
  value: relativeURL(ae.tileset_url, t.baseURL)
18220
- }), Z.push(ue);
18220
+ }), te.push(fe);
18221
18221
  }
18222
18222
  }
18223
18223
  if (typeof C.model.tiles == "object") {
18224
18224
  var ae = C.model.tiles;
18225
18225
  if (ae && ae.tileset_url) {
18226
- var ue = {};
18227
- defineProperty(ue, "work", {
18226
+ var fe = {};
18227
+ defineProperty(fe, "work", {
18228
18228
  enumerable: !1,
18229
18229
  configurable: !1,
18230
18230
  writable: !1,
18231
18231
  value: t
18232
- }), defineProperty(ue, "name", {
18232
+ }), defineProperty(fe, "name", {
18233
18233
  enumerable: !0,
18234
18234
  configurable: !1,
18235
18235
  writable: !1,
18236
18236
  value: "lod"
18237
- }), defineProperty(ue, "type", {
18237
+ }), defineProperty(fe, "type", {
18238
18238
  enumerable: !0,
18239
18239
  configurable: !1,
18240
18240
  writable: !1,
18241
18241
  value: "mesh"
18242
- }), defineProperty(ue, "upAxis", {
18242
+ }), defineProperty(fe, "upAxis", {
18243
18243
  enumerable: !0,
18244
18244
  configurable: !1,
18245
18245
  writable: !1,
18246
18246
  value: "-Y"
18247
- }), defineProperty(ue, "tileset", {
18247
+ }), defineProperty(fe, "tileset", {
18248
18248
  enumerable: !0,
18249
18249
  configurable: !1,
18250
18250
  writable: !1,
18251
18251
  value: relativeURL(ae.tileset_url, t.baseURL)
18252
- }), Z.push(ue);
18252
+ }), te.push(fe);
18253
18253
  }
18254
18254
  }
18255
- return Object.freeze(Z);
18255
+ return Object.freeze(te);
18256
18256
  })()
18257
18257
  })), defineProperty(t, "model", {
18258
18258
  enumerable: !0,
@@ -18262,162 +18262,162 @@ function parse(n, t) {
18262
18262
  });
18263
18263
  var L = [];
18264
18264
  if (Array.isArray(C.observers) && C.panorama && Array.isArray(C.panorama.list || C.panorama.info)) {
18265
- for (var O = C.observers, k = (r = C.panorama.list || C.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = C.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = C.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = C.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", q = Math.min(O.length, k.length), z = {}, V = function(W) {
18266
- var X = W, te = C.panorama.pattern[X];
18267
- if (typeof te == "string") {
18268
- var Z = new StringPattern(te);
18269
- z[X] = function(ne) {
18270
- return Z.stringify(ne);
18265
+ for (var O = C.observers, k = (r = C.panorama.list || C.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = C.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = C.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = C.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", q = Math.min(O.length, k.length), z = {}, J = function(K) {
18266
+ var W = K, ee = C.panorama.pattern[W];
18267
+ if (typeof ee == "string") {
18268
+ var te = new StringPattern(ee);
18269
+ z[W] = function(re) {
18270
+ return te.stringify(re);
18271
18271
  };
18272
18272
  } else
18273
- z[X] = function() {
18274
- return te;
18273
+ z[W] = function() {
18274
+ return ee;
18275
18275
  };
18276
- }, Q = 0, U = Object.keys((d = C.panorama.pattern) !== null && d !== void 0 ? d : {}); Q < U.length; Q++) {
18277
- var j = U[Q];
18278
- V(j);
18279
- }
18280
- for (var G = function(W, X) {
18281
- var te, Z = z[X];
18282
- return (te = W[X]) !== null && te !== void 0 ? te : Z ? Z(W) : void 0;
18283
- }, ie = function(W) {
18284
- var X = O[W], te = k[W], Z = {};
18285
- defineProperty(Z, "work", {
18276
+ }, V = 0, U = Object.keys((d = C.panorama.pattern) !== null && d !== void 0 ? d : {}); V < U.length; V++) {
18277
+ var j = U[V];
18278
+ J(j);
18279
+ }
18280
+ for (var G = function(K, W) {
18281
+ var ee, te = z[W];
18282
+ return (ee = K[W]) !== null && ee !== void 0 ? ee : te ? te(K) : void 0;
18283
+ }, ie = function(K) {
18284
+ var W = O[K], ee = k[K], te = {};
18285
+ defineProperty(te, "work", {
18286
18286
  enumerable: !1,
18287
18287
  configurable: !1,
18288
18288
  writable: !1,
18289
18289
  value: t
18290
- }), defineProperty(Z, "index", {
18290
+ }), defineProperty(te, "index", {
18291
18291
  enumerable: !0,
18292
18292
  configurable: !1,
18293
18293
  writable: !1,
18294
- value: W
18295
- }), defineProperty(Z, "panoIndex", {
18294
+ value: K
18295
+ }), defineProperty(te, "panoIndex", {
18296
18296
  enumerable: !0,
18297
18297
  configurable: !1,
18298
18298
  writable: !1,
18299
- value: W
18300
- }), defineProperty(Z, "panoId", {
18299
+ value: K
18300
+ }), defineProperty(te, "panoId", {
18301
18301
  enumerable: !0,
18302
18302
  configurable: !1,
18303
18303
  writable: !1,
18304
- value: panoStringify({ workCode: t.workCode, panoIndex: W })
18305
- }), defineProperty(Z, "floorIndex", {
18304
+ value: panoStringify({ workCode: t.workCode, panoIndex: K })
18305
+ }), defineProperty(te, "floorIndex", {
18306
18306
  enumerable: !0,
18307
18307
  configurable: !1,
18308
18308
  writable: !1,
18309
- value: (h = X.floor_index) !== null && h !== void 0 ? h : X.floor
18310
- }), defineProperty(Z, "derivedId", {
18309
+ value: (h = W.floor_index) !== null && h !== void 0 ? h : W.floor
18310
+ }), defineProperty(te, "derivedId", {
18311
18311
  enumerable: !0,
18312
18312
  configurable: !1,
18313
18313
  writable: !1,
18314
- value: (g = (p = X.derived_id) !== null && p !== void 0 ? p : G(te, "derived_id")) !== null && g !== void 0 ? g : 0
18315
- }), defineProperty(Z, "derivedIdStr", {
18314
+ value: (g = (p = W.derived_id) !== null && p !== void 0 ? p : G(ee, "derived_id")) !== null && g !== void 0 ? g : 0
18315
+ }), defineProperty(te, "derivedIdStr", {
18316
18316
  enumerable: !0,
18317
18317
  configurable: !1,
18318
18318
  writable: !1,
18319
- value: (E = (m = X.derived_id_str) !== null && m !== void 0 ? m : G(te, "derived_id_str")) !== null && E !== void 0 ? E : String(Z.derivedId)
18320
- }), defineProperty(Z, "active", {
18319
+ value: (E = (m = W.derived_id_str) !== null && m !== void 0 ? m : G(ee, "derived_id_str")) !== null && E !== void 0 ? E : String(te.derivedId)
18320
+ }), defineProperty(te, "active", {
18321
18321
  enumerable: !0,
18322
18322
  configurable: !1,
18323
18323
  writable: !1,
18324
- value: X.active !== !1 && G(te, "active") !== !1
18325
- }), defineProperty(Z, "loadable", {
18324
+ value: W.active !== !1 && G(ee, "active") !== !1
18325
+ }), defineProperty(te, "loadable", {
18326
18326
  enumerable: !0,
18327
18327
  configurable: !1,
18328
18328
  writable: !1,
18329
- value: (v = (y = X.loadable) !== null && y !== void 0 ? y : G(te, "loadable")) !== null && v !== void 0 ? v : !1
18330
- }), defineProperty(Z, "position", {
18329
+ value: (v = (y = W.loadable) !== null && y !== void 0 ? y : G(ee, "loadable")) !== null && v !== void 0 ? v : !1
18330
+ }), defineProperty(te, "position", {
18331
18331
  enumerable: !0,
18332
18332
  configurable: !1,
18333
18333
  writable: !1,
18334
- value: Object.freeze(new THREE.Vector3().fromArray((A = X.position) !== null && A !== void 0 ? A : [0, 0, 0]))
18335
- }), defineProperty(Z, "standingPosition", {
18334
+ value: Object.freeze(new THREE.Vector3().fromArray((A = W.position) !== null && A !== void 0 ? A : [0, 0, 0]))
18335
+ }), defineProperty(te, "standingPosition", {
18336
18336
  enumerable: !0,
18337
18337
  configurable: !1,
18338
18338
  writable: !1,
18339
- value: Object.freeze(new THREE.Vector3().fromArray((T = (b = X.standing_position) !== null && b !== void 0 ? b : X.standingPosition) !== null && T !== void 0 ? T : [0, 0, 0]))
18340
- }), defineProperty(Z, "quaternion", {
18339
+ value: Object.freeze(new THREE.Vector3().fromArray((T = (b = W.standing_position) !== null && b !== void 0 ? b : W.standingPosition) !== null && T !== void 0 ? T : [0, 0, 0]))
18340
+ }), defineProperty(te, "quaternion", {
18341
18341
  enumerable: !0,
18342
18342
  configurable: !1,
18343
18343
  writable: !1,
18344
- value: Object.freeze(new THREE.Quaternion().fromArray(X.quaternion ? [X.quaternion.x, X.quaternion.y, X.quaternion.z, X.quaternion.w] : [0, 0, 0, 1]))
18345
- }), defineProperty(Z, "matrix", {
18344
+ value: Object.freeze(new THREE.Quaternion().fromArray(W.quaternion ? [W.quaternion.x, W.quaternion.y, W.quaternion.z, W.quaternion.w] : [0, 0, 0, 1]))
18345
+ }), defineProperty(te, "matrix", {
18346
18346
  enumerable: !0,
18347
18347
  configurable: !1,
18348
18348
  writable: !1,
18349
- value: Object.freeze(new THREE.Matrix4().compose(Z.position, Z.quaternion, PANO_TEXTURE_SCALE))
18350
- }), defineProperty(Z, "accessibleNodes", {
18349
+ value: Object.freeze(new THREE.Matrix4().compose(te.position, te.quaternion, PANO_TEXTURE_SCALE))
18350
+ }), defineProperty(te, "accessibleNodes", {
18351
18351
  enumerable: !0,
18352
18352
  configurable: !1,
18353
18353
  writable: !1,
18354
18354
  value: (function() {
18355
- if (accessibleNodesSet.clear(), X.accessible_nodes && Array.isArray(X.accessible_nodes))
18356
- for (var ne = 0, de = X.accessible_nodes; ne < de.length; ne++) {
18357
- var ae = de[ne];
18358
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18355
+ if (accessibleNodesSet.clear(), W.accessible_nodes && Array.isArray(W.accessible_nodes))
18356
+ for (var re = 0, de = W.accessible_nodes; re < de.length; re++) {
18357
+ var ae = de[re];
18358
+ ae >= q || ae === K || accessibleNodesSet.add(ae);
18359
18359
  }
18360
- else if (X.accessibleNodes && Array.isArray(X.accessibleNodes))
18361
- for (var ue = 0, be = X.accessibleNodes; ue < be.length; ue++) {
18362
- var ae = be[ue];
18363
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18360
+ else if (W.accessibleNodes && Array.isArray(W.accessibleNodes))
18361
+ for (var fe = 0, be = W.accessibleNodes; fe < be.length; fe++) {
18362
+ var ae = be[fe];
18363
+ ae >= q || ae === K || accessibleNodesSet.add(ae);
18364
18364
  }
18365
- else if (X.visible_nodes && Array.isArray(X.visible_nodes))
18366
- for (var oe = 0, le = X.visible_nodes; oe < le.length; oe++) {
18367
- var ae = le[oe];
18368
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18365
+ else if (W.visible_nodes && Array.isArray(W.visible_nodes))
18366
+ for (var oe = 0, ue = W.visible_nodes; oe < ue.length; oe++) {
18367
+ var ae = ue[oe];
18368
+ ae >= q || ae === K || accessibleNodesSet.add(ae);
18369
18369
  }
18370
- else if (X.visibleNodes && Array.isArray(X.visibleNodes))
18371
- for (var me = 0, ge = X.visibleNodes; me < ge.length; me++) {
18370
+ else if (W.visibleNodes && Array.isArray(W.visibleNodes))
18371
+ for (var me = 0, ge = W.visibleNodes; me < ge.length; me++) {
18372
18372
  var ae = ge[me];
18373
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18373
+ ae >= q || ae === K || accessibleNodesSet.add(ae);
18374
18374
  }
18375
18375
  if (accessibleNodesSet.size === 0)
18376
18376
  for (var Ae = 0; Ae < q; Ae++)
18377
- Ae !== W && accessibleNodesSet.add(Ae);
18377
+ Ae !== K && accessibleNodesSet.add(Ae);
18378
18378
  var Te = Array.from(accessibleNodesSet);
18379
18379
  return accessibleNodesSet.clear(), Object.freeze(Te);
18380
18380
  })()
18381
- }), defineProperty(Z, "visibleNodes", {
18381
+ }), defineProperty(te, "visibleNodes", {
18382
18382
  enumerable: !0,
18383
18383
  configurable: !1,
18384
18384
  writable: !1,
18385
- value: Z.accessibleNodes
18386
- }), defineProperty(Z, "images", {
18385
+ value: te.accessibleNodes
18386
+ }), defineProperty(te, "images", {
18387
18387
  enumerable: !0,
18388
18388
  configurable: !1,
18389
18389
  writable: !1,
18390
18390
  value: (function() {
18391
- var ne = {};
18392
- defineProperty(ne, "work", {
18391
+ var re = {};
18392
+ defineProperty(re, "work", {
18393
18393
  enumerable: !1,
18394
18394
  configurable: !1,
18395
18395
  writable: !1,
18396
18396
  value: t
18397
18397
  });
18398
18398
  for (var de = function(oe) {
18399
- defineProperty(ne, oe, {
18399
+ defineProperty(re, oe, {
18400
18400
  enumerable: !0,
18401
18401
  configurable: !1,
18402
18402
  writable: !1,
18403
18403
  value: (function() {
18404
- var le;
18405
- return relativeURL(panoURL((le = G(te, oe)) !== null && le !== void 0 ? le : "", D, W), t.baseURL);
18404
+ var ue;
18405
+ return relativeURL(panoURL((ue = G(ee, oe)) !== null && ue !== void 0 ? ue : "", D, K), t.baseURL);
18406
18406
  })()
18407
18407
  });
18408
- }, ae = 0, ue = FACE_ORDER$1; ae < ue.length; ae++) {
18409
- var be = ue[ae];
18408
+ }, ae = 0, fe = FACE_ORDER$1; ae < fe.length; ae++) {
18409
+ var be = fe[ae];
18410
18410
  de(be);
18411
18411
  }
18412
- return defineProperty(ne, "sizeList", {
18412
+ return defineProperty(re, "sizeList", {
18413
18413
  enumerable: !0,
18414
18414
  configurable: !1,
18415
18415
  writable: !1,
18416
18416
  value: (function() {
18417
- var oe = getImageSizeFromURL(ne[FACE_ORDER$1[0]]), le = G(te, "size_list"), me = G(te, "tiles");
18417
+ var oe = getImageSizeFromURL(re[FACE_ORDER$1[0]]), ue = G(ee, "size_list"), me = G(ee, "tiles");
18418
18418
  if (oe) {
18419
- if (le) {
18420
- var ge = le.slice().sort(function(Ee, he) {
18419
+ if (ue) {
18420
+ var ge = ue.slice().sort(function(Ee, he) {
18421
18421
  return Ee - he;
18422
18422
  });
18423
18423
  return Object.freeze(ge);
@@ -18436,22 +18436,22 @@ function parse(n, t) {
18436
18436
  }
18437
18437
  return Object.freeze([]);
18438
18438
  })()
18439
- }), defineProperty(ne, "tiles", {
18439
+ }), defineProperty(re, "tiles", {
18440
18440
  enumerable: !0,
18441
18441
  configurable: !1,
18442
18442
  writable: !1,
18443
18443
  value: (function() {
18444
- var oe = getImageSizeFromURL(ne.front);
18444
+ var oe = getImageSizeFromURL(re.front);
18445
18445
  if (oe) {
18446
- var le = ne.sizeList.slice();
18447
- if (le[0]) {
18448
- var me = getTileLevel(le[0]);
18446
+ var ue = re.sizeList.slice();
18447
+ if (ue[0]) {
18448
+ var me = getTileLevel(ue[0]);
18449
18449
  if (me)
18450
18450
  for (var ge = me - 1; ge >= 0; ge--)
18451
- le.unshift(512 * Math.pow(2, ge));
18451
+ ue.unshift(512 * Math.pow(2, ge));
18452
18452
  }
18453
- if (!(le.length <= 0)) {
18454
- for (var Ae = [], Te = 0, pe = le; Te < pe.length; Te++) {
18453
+ if (!(ue.length <= 0)) {
18454
+ for (var Ae = [], Te = 0, pe = ue; Te < pe.length; Te++) {
18455
18455
  var Se = pe[Te], _e = getTileLevel(Se);
18456
18456
  if (typeof _e == "number") {
18457
18457
  var Ee = {};
@@ -18483,7 +18483,7 @@ function parse(n, t) {
18483
18483
  enumerable: !0,
18484
18484
  configurable: !1,
18485
18485
  writable: !1,
18486
- value: replaceImageSize(ne[ye], Se)
18486
+ value: replaceImageSize(re[ye], Se)
18487
18487
  });
18488
18488
  }
18489
18489
  } else {
@@ -18504,7 +18504,7 @@ function parse(n, t) {
18504
18504
  enumerable: !0,
18505
18505
  configurable: !1,
18506
18506
  writable: !1,
18507
- value: ne[ye]
18507
+ value: re[ye]
18508
18508
  });
18509
18509
  }
18510
18510
  }
@@ -18515,39 +18515,39 @@ function parse(n, t) {
18515
18515
  }
18516
18516
  }
18517
18517
  })()
18518
- }), defineProperty(ne, "video", {
18518
+ }), defineProperty(re, "video", {
18519
18519
  enumerable: !0,
18520
18520
  configurable: !1,
18521
18521
  writable: !1,
18522
18522
  value: (function() {
18523
- var oe = G(te, "video"), le = void 0;
18524
- return oe && (le = {}, defineProperty(le, "work", {
18523
+ var oe = G(ee, "video"), ue = void 0;
18524
+ return oe && (ue = {}, defineProperty(ue, "work", {
18525
18525
  enumerable: !1,
18526
18526
  configurable: !1,
18527
18527
  writable: !1,
18528
18528
  value: t
18529
- }), defineProperty(le, "source", {
18529
+ }), defineProperty(ue, "source", {
18530
18530
  enumerable: !0,
18531
18531
  configurable: !1,
18532
18532
  writable: !1,
18533
18533
  value: oe.source
18534
- }), defineProperty(le, "matrix", {
18534
+ }), defineProperty(ue, "matrix", {
18535
18535
  enumerable: !0,
18536
18536
  configurable: !1,
18537
18537
  writable: !1,
18538
18538
  value: new THREE.Matrix4().fromArray(oe.matrix)
18539
- }), defineProperty(le, "size", {
18539
+ }), defineProperty(ue, "size", {
18540
18540
  enumerable: !0,
18541
18541
  configurable: !1,
18542
18542
  writable: !1,
18543
18543
  value: new THREE.Vector2().fromArray(oe.size)
18544
- })), le;
18544
+ })), ue;
18545
18545
  })()
18546
- }), ne;
18546
+ }), re;
18547
18547
  })()
18548
- }), L.push(Z);
18549
- }, re = 0; re < q; re++)
18550
- ie(re);
18548
+ }), L.push(te);
18549
+ }, ne = 0; ne < q; ne++)
18550
+ ie(ne);
18551
18551
  }
18552
18552
  defineProperty(t, "observers", {
18553
18553
  enumerable: !0,
@@ -18563,11 +18563,11 @@ function parse(n, t) {
18563
18563
  value: t
18564
18564
  }), C.initial) {
18565
18565
  if (t.observers.length > 0) {
18566
- var ee = void 0;
18567
- isNumber(C.initial.panoIndex) ? ee = C.initial.panoIndex : isNumber(C.initial.pano_index) ? ee = C.initial.pano_index : isNumber(C.initial.pano) && (ee = C.initial.pano), typeof ee == "number" && (ee = clamp$1(ee, 0, t.observers.length - 1), defineProperty($, "panoIndex", {
18566
+ var Z = void 0;
18567
+ isNumber(C.initial.panoIndex) ? Z = C.initial.panoIndex : isNumber(C.initial.pano_index) ? Z = C.initial.pano_index : isNumber(C.initial.pano) && (Z = C.initial.pano), typeof Z == "number" && (Z = clamp$1(Z, 0, t.observers.length - 1), defineProperty($, "panoIndex", {
18568
18568
  enumerable: !0,
18569
18569
  writable: !0,
18570
- value: ee
18570
+ value: Z
18571
18571
  }));
18572
18572
  }
18573
18573
  if (C.initial.mode === "Panorama" && t.observers.length === 0 || C.initial.mode === "Floorplan" || C.initial.mode === "Topview" || C.initial.mode === "Model" || C.initial.mode === "Mapview" ? defineProperty($, "mode", {
@@ -18603,9 +18603,9 @@ function parse(n, t) {
18603
18603
  writable: !0,
18604
18604
  value: C.initial.distance
18605
18605
  }), Array.isArray(C.initial.offset)) {
18606
- var K = C.initial.offset, se = [0, 0, 0].map(function(W, X) {
18607
- var te = Number(K[X]);
18608
- return isNaN(te) || !isFinite(te) ? 0 : te;
18606
+ var X = C.initial.offset, se = [0, 0, 0].map(function(K, W) {
18607
+ var ee = Number(X[W]);
18608
+ return isNaN(ee) || !isFinite(ee) ? 0 : ee;
18609
18609
  });
18610
18610
  defineProperty($, "offset", {
18611
18611
  enumerable: !0,
@@ -20942,48 +20942,48 @@ var Hammer = (function(n, t, e, r) {
20942
20942
  return Array.isArray(B) ? (p(B, N[F], N), !0) : !1;
20943
20943
  }
20944
20944
  function p(B, F, N) {
20945
- var J;
20945
+ var Q;
20946
20946
  if (B)
20947
20947
  if (B.forEach)
20948
20948
  B.forEach(F, N);
20949
20949
  else if (B.length !== r)
20950
- for (J = 0; J < B.length; )
20951
- F.call(N, B[J], J, B), J++;
20950
+ for (Q = 0; Q < B.length; )
20951
+ F.call(N, B[Q], Q, B), Q++;
20952
20952
  else
20953
- for (J in B)
20954
- B.hasOwnProperty(J) && F.call(N, B[J], J, B);
20953
+ for (Q in B)
20954
+ B.hasOwnProperty(Q) && F.call(N, B[Q], Q, B);
20955
20955
  }
20956
20956
  function g(B, F, N) {
20957
- var J = "DEPRECATED METHOD: " + F + `
20957
+ var Q = "DEPRECATED METHOD: " + F + `
20958
20958
  ` + N + ` AT
20959
20959
  `;
20960
20960
  return function() {
20961
- var Y = new Error("get-stack-trace"), ce = Y && Y.stack ? Y.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", xe = n.console && (n.console.warn || n.console.log);
20962
- return xe && xe.call(n.console, J, ce), B.apply(this, arguments);
20961
+ var Y = new Error("get-stack-trace"), le = Y && Y.stack ? Y.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", xe = n.console && (n.console.warn || n.console.log);
20962
+ return xe && xe.call(n.console, Q, le), B.apply(this, arguments);
20963
20963
  };
20964
20964
  }
20965
20965
  var m;
20966
20966
  typeof Object.assign != "function" ? m = function(F) {
20967
20967
  if (F === r || F === null)
20968
20968
  throw new TypeError("Cannot convert undefined or null to object");
20969
- for (var N = Object(F), J = 1; J < arguments.length; J++) {
20970
- var Y = arguments[J];
20969
+ for (var N = Object(F), Q = 1; Q < arguments.length; Q++) {
20970
+ var Y = arguments[Q];
20971
20971
  if (Y !== r && Y !== null)
20972
- for (var ce in Y)
20973
- Y.hasOwnProperty(ce) && (N[ce] = Y[ce]);
20972
+ for (var le in Y)
20973
+ Y.hasOwnProperty(le) && (N[le] = Y[le]);
20974
20974
  }
20975
20975
  return N;
20976
20976
  } : m = Object.assign;
20977
- var E = g(function(F, N, J) {
20978
- for (var Y = Object.keys(N), ce = 0; ce < Y.length; )
20979
- (!J || J && F[Y[ce]] === r) && (F[Y[ce]] = N[Y[ce]]), ce++;
20977
+ var E = g(function(F, N, Q) {
20978
+ for (var Y = Object.keys(N), le = 0; le < Y.length; )
20979
+ (!Q || Q && F[Y[le]] === r) && (F[Y[le]] = N[Y[le]]), le++;
20980
20980
  return F;
20981
20981
  }, "extend", "Use `assign`."), y = g(function(F, N) {
20982
20982
  return E(F, N, !0);
20983
20983
  }, "merge", "Use `assign`.");
20984
20984
  function v(B, F, N) {
20985
- var J = F.prototype, Y;
20986
- Y = B.prototype = Object.create(J), Y.constructor = B, Y._super = J, N && m(Y, N);
20985
+ var Q = F.prototype, Y;
20986
+ Y = B.prototype = Object.create(Q), Y.constructor = B, Y._super = Q, N && m(Y, N);
20987
20987
  }
20988
20988
  function A(B, F) {
20989
20989
  return function() {
@@ -20997,13 +20997,13 @@ var Hammer = (function(n, t, e, r) {
20997
20997
  return B === r ? F : B;
20998
20998
  }
20999
20999
  function S(B, F, N) {
21000
- p(P(F), function(J) {
21001
- B.addEventListener(J, N, !1);
21000
+ p(P(F), function(Q) {
21001
+ B.addEventListener(Q, N, !1);
21002
21002
  });
21003
21003
  }
21004
21004
  function R(B, F, N) {
21005
- p(P(F), function(J) {
21006
- B.removeEventListener(J, N, !1);
21005
+ p(P(F), function(Q) {
21006
+ B.removeEventListener(Q, N, !1);
21007
21007
  });
21008
21008
  }
21009
21009
  function M(B, F) {
@@ -21023,10 +21023,10 @@ var Hammer = (function(n, t, e, r) {
21023
21023
  function _(B, F, N) {
21024
21024
  if (B.indexOf && !N)
21025
21025
  return B.indexOf(F);
21026
- for (var J = 0; J < B.length; ) {
21027
- if (N && B[J][N] == F || !N && B[J] === F)
21028
- return J;
21029
- J++;
21026
+ for (var Q = 0; Q < B.length; ) {
21027
+ if (N && B[Q][N] == F || !N && B[Q] === F)
21028
+ return Q;
21029
+ Q++;
21030
21030
  }
21031
21031
  return -1;
21032
21032
  }
@@ -21034,19 +21034,19 @@ var Hammer = (function(n, t, e, r) {
21034
21034
  return Array.prototype.slice.call(B, 0);
21035
21035
  }
21036
21036
  function C(B, F, N) {
21037
- for (var J = [], Y = [], ce = 0; ce < B.length; ) {
21038
- var xe = B[ce][F];
21039
- _(Y, xe) < 0 && J.push(B[ce]), Y[ce] = xe, ce++;
21037
+ for (var Q = [], Y = [], le = 0; le < B.length; ) {
21038
+ var xe = B[le][F];
21039
+ _(Y, xe) < 0 && Q.push(B[le]), Y[le] = xe, le++;
21040
21040
  }
21041
- return J = J.sort(function(Ze, De) {
21041
+ return Q = Q.sort(function(Ze, De) {
21042
21042
  return Ze[F] > De[F];
21043
- }), J;
21043
+ }), Q;
21044
21044
  }
21045
21045
  function H(B, F) {
21046
- for (var N, J, Y = F[0].toUpperCase() + F.slice(1), ce = 0; ce < o.length; ) {
21047
- if (N = o[ce], J = N ? N + Y : F, J in B)
21048
- return J;
21049
- ce++;
21046
+ for (var N, Q, Y = F[0].toUpperCase() + F.slice(1), le = 0; le < o.length; ) {
21047
+ if (N = o[le], Q = N ? N + Y : F, Q in B)
21048
+ return Q;
21049
+ le++;
21050
21050
  }
21051
21051
  return r;
21052
21052
  }
@@ -21058,11 +21058,11 @@ var Hammer = (function(n, t, e, r) {
21058
21058
  var F = B.ownerDocument || B;
21059
21059
  return F.defaultView || F.parentWindow || n;
21060
21060
  }
21061
- var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = H(n, "PointerEvent") !== r, V = q && D.test(navigator.userAgent), Q = "touch", U = "pen", j = "mouse", G = "kinect", ie = 25, re = 1, $ = 2, ee = 4, K = 8, se = 1, W = 2, X = 4, te = 8, Z = 16, ne = W | X, de = te | Z, ae = ne | de, ue = ["x", "y"], be = ["clientX", "clientY"];
21061
+ var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = H(n, "PointerEvent") !== r, J = q && D.test(navigator.userAgent), V = "touch", U = "pen", j = "mouse", G = "kinect", ie = 25, ne = 1, $ = 2, Z = 4, X = 8, se = 1, K = 2, W = 4, ee = 8, te = 16, re = K | W, de = ee | te, ae = re | de, fe = ["x", "y"], be = ["clientX", "clientY"];
21062
21062
  function oe(B, F) {
21063
21063
  var N = this;
21064
- this.manager = B, this.callback = F, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(J) {
21065
- b(B.options.enable, [B]) && N.handler(J);
21064
+ this.manager = B, this.callback = F, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(Q) {
21065
+ b(B.options.enable, [B]) && N.handler(Q);
21066
21066
  }, this.init();
21067
21067
  }
21068
21068
  oe.prototype = {
@@ -21085,42 +21085,42 @@ var Hammer = (function(n, t, e, r) {
21085
21085
  this.evEl && R(this.element, this.evEl, this.domHandler), this.evTarget && R(this.target, this.evTarget, this.domHandler), this.evWin && R(k(this.element), this.evWin, this.domHandler);
21086
21086
  }
21087
21087
  };
21088
- function le(B) {
21088
+ function ue(B) {
21089
21089
  var F, N = B.options.inputClass;
21090
- return N ? F = N : z ? F = tt : V ? F = Ne : q ? F = yt : F = ze, new F(B, me);
21090
+ return N ? F = N : z ? F = tt : J ? F = Ne : q ? F = yt : F = ze, new F(B, me);
21091
21091
  }
21092
21092
  function me(B, F, N) {
21093
- var J = N.pointers.length, Y = N.changedPointers.length, ce = F & re && J - Y === 0, xe = F & (ee | K) && J - Y === 0;
21094
- N.isFirst = !!ce, N.isFinal = !!xe, ce && (B.session = {}), N.eventType = F, ge(B, N), B.emit("hammer.input", N), B.recognize(N), B.session.prevInput = N;
21093
+ var Q = N.pointers.length, Y = N.changedPointers.length, le = F & ne && Q - Y === 0, xe = F & (Z | X) && Q - Y === 0;
21094
+ N.isFirst = !!le, N.isFinal = !!xe, le && (B.session = {}), N.eventType = F, ge(B, N), B.emit("hammer.input", N), B.recognize(N), B.session.prevInput = N;
21095
21095
  }
21096
21096
  function ge(B, F) {
21097
- var N = B.session, J = F.pointers, Y = J.length;
21097
+ var N = B.session, Q = F.pointers, Y = Q.length;
21098
21098
  N.firstInput || (N.firstInput = pe(F)), Y > 1 && !N.firstMultiple ? N.firstMultiple = pe(F) : Y === 1 && (N.firstMultiple = !1);
21099
- var ce = N.firstInput, xe = N.firstMultiple, Ge = xe ? xe.center : ce.center, Ze = F.center = Se(J);
21100
- F.timeStamp = f(), F.deltaTime = F.timeStamp - ce.timeStamp, F.angle = Ve(Ge, Ze), F.distance = he(Ge, Ze), Ae(N, F), F.offsetDirection = Ee(F.deltaX, F.deltaY);
21099
+ var le = N.firstInput, xe = N.firstMultiple, Ge = xe ? xe.center : le.center, Ze = F.center = Se(Q);
21100
+ F.timeStamp = f(), F.deltaTime = F.timeStamp - le.timeStamp, F.angle = Ve(Ge, Ze), F.distance = he(Ge, Ze), Ae(N, F), F.offsetDirection = Ee(F.deltaX, F.deltaY);
21101
21101
  var De = _e(F.deltaTime, F.deltaX, F.deltaY);
21102
- F.overallVelocityX = De.x, F.overallVelocityY = De.y, F.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, F.scale = xe ? Be(xe.pointers, J) : 1, F.rotation = xe ? ye(xe.pointers, J) : 0, F.maxPointers = N.prevInput ? F.pointers.length > N.prevInput.maxPointers ? F.pointers.length : N.prevInput.maxPointers : F.pointers.length, Te(N, F);
21102
+ F.overallVelocityX = De.x, F.overallVelocityY = De.y, F.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, F.scale = xe ? Be(xe.pointers, Q) : 1, F.rotation = xe ? ye(xe.pointers, Q) : 0, F.maxPointers = N.prevInput ? F.pointers.length > N.prevInput.maxPointers ? F.pointers.length : N.prevInput.maxPointers : F.pointers.length, Te(N, F);
21103
21103
  var St = B.element;
21104
21104
  M(F.srcEvent.target, St) && (St = F.srcEvent.target), F.target = St;
21105
21105
  }
21106
21106
  function Ae(B, F) {
21107
- var N = F.center, J = B.offsetDelta || {}, Y = B.prevDelta || {}, ce = B.prevInput || {};
21108
- (F.eventType === re || ce.eventType === ee) && (Y = B.prevDelta = {
21109
- x: ce.deltaX || 0,
21110
- y: ce.deltaY || 0
21111
- }, J = B.offsetDelta = {
21107
+ var N = F.center, Q = B.offsetDelta || {}, Y = B.prevDelta || {}, le = B.prevInput || {};
21108
+ (F.eventType === ne || le.eventType === Z) && (Y = B.prevDelta = {
21109
+ x: le.deltaX || 0,
21110
+ y: le.deltaY || 0
21111
+ }, Q = B.offsetDelta = {
21112
21112
  x: N.x,
21113
21113
  y: N.y
21114
- }), F.deltaX = Y.x + (N.x - J.x), F.deltaY = Y.y + (N.y - J.y);
21114
+ }), F.deltaX = Y.x + (N.x - Q.x), F.deltaY = Y.y + (N.y - Q.y);
21115
21115
  }
21116
21116
  function Te(B, F) {
21117
- var N = B.lastInterval || F, J = F.timeStamp - N.timeStamp, Y, ce, xe, Ge;
21118
- if (F.eventType != K && (J > ie || N.velocity === r)) {
21119
- var Ze = F.deltaX - N.deltaX, De = F.deltaY - N.deltaY, St = _e(J, Ze, De);
21120
- ce = St.x, xe = St.y, Y = c(St.x) > c(St.y) ? St.x : St.y, Ge = Ee(Ze, De), B.lastInterval = F;
21117
+ var N = B.lastInterval || F, Q = F.timeStamp - N.timeStamp, Y, le, xe, Ge;
21118
+ if (F.eventType != X && (Q > ie || N.velocity === r)) {
21119
+ var Ze = F.deltaX - N.deltaX, De = F.deltaY - N.deltaY, St = _e(Q, Ze, De);
21120
+ le = St.x, xe = St.y, Y = c(St.x) > c(St.y) ? St.x : St.y, Ge = Ee(Ze, De), B.lastInterval = F;
21121
21121
  } else
21122
- Y = N.velocity, ce = N.velocityX, xe = N.velocityY, Ge = N.direction;
21123
- F.velocity = Y, F.velocityX = ce, F.velocityY = xe, F.direction = Ge;
21122
+ Y = N.velocity, le = N.velocityX, xe = N.velocityY, Ge = N.direction;
21123
+ F.velocity = Y, F.velocityX = le, F.velocityY = xe, F.direction = Ge;
21124
21124
  }
21125
21125
  function pe(B) {
21126
21126
  for (var F = [], N = 0; N < B.pointers.length; )
@@ -21143,11 +21143,11 @@ var Hammer = (function(n, t, e, r) {
21143
21143
  x: l(B[0].clientX),
21144
21144
  y: l(B[0].clientY)
21145
21145
  };
21146
- for (var N = 0, J = 0, Y = 0; Y < F; )
21147
- N += B[Y].clientX, J += B[Y].clientY, Y++;
21146
+ for (var N = 0, Q = 0, Y = 0; Y < F; )
21147
+ N += B[Y].clientX, Q += B[Y].clientY, Y++;
21148
21148
  return {
21149
21149
  x: l(N / F),
21150
- y: l(J / F)
21150
+ y: l(Q / F)
21151
21151
  };
21152
21152
  }
21153
21153
  function _e(B, F, N) {
@@ -21157,17 +21157,17 @@ var Hammer = (function(n, t, e, r) {
21157
21157
  };
21158
21158
  }
21159
21159
  function Ee(B, F) {
21160
- return B === F ? se : c(B) >= c(F) ? B < 0 ? W : X : F < 0 ? te : Z;
21160
+ return B === F ? se : c(B) >= c(F) ? B < 0 ? K : W : F < 0 ? ee : te;
21161
21161
  }
21162
21162
  function he(B, F, N) {
21163
- N || (N = ue);
21164
- var J = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
21165
- return Math.sqrt(J * J + Y * Y);
21163
+ N || (N = fe);
21164
+ var Q = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
21165
+ return Math.sqrt(Q * Q + Y * Y);
21166
21166
  }
21167
21167
  function Ve(B, F, N) {
21168
- N || (N = ue);
21169
- var J = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
21170
- return Math.atan2(Y, J) * 180 / Math.PI;
21168
+ N || (N = fe);
21169
+ var Q = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
21170
+ return Math.atan2(Y, Q) * 180 / Math.PI;
21171
21171
  }
21172
21172
  function ye(B, F) {
21173
21173
  return Ve(F[1], F[0], be) + Ve(B[1], B[0], be);
@@ -21176,9 +21176,9 @@ var Hammer = (function(n, t, e, r) {
21176
21176
  return he(F[0], F[1], be) / he(B[0], B[1], be);
21177
21177
  }
21178
21178
  var Ie = {
21179
- mousedown: re,
21179
+ mousedown: ne,
21180
21180
  mousemove: $,
21181
- mouseup: ee
21181
+ mouseup: Z
21182
21182
  }, $e = "mousedown", Re = "mousemove mouseup";
21183
21183
  function ze() {
21184
21184
  this.evEl = $e, this.evWin = Re, this.pressed = !1, oe.apply(this, arguments);
@@ -21190,7 +21190,7 @@ var Hammer = (function(n, t, e, r) {
21190
21190
  */
21191
21191
  handler: function(F) {
21192
21192
  var N = Ie[F.type];
21193
- N & re && (F.button === 0 || F.button === 2) && (this.pressed = !0), N & $ && F.which !== 1 && (N = ee), this.pressed && (N & ee && (this.pressed = !1), this.callback(this.manager, N, {
21193
+ N & ne && (F.button === 0 || F.button === 2) && (this.pressed = !0), N & $ && F.which !== 1 && (N = Z), this.pressed && (N & Z && (this.pressed = !1), this.callback(this.manager, N, {
21194
21194
  pointers: [F],
21195
21195
  changedPointers: [F],
21196
21196
  pointerType: j,
@@ -21199,13 +21199,13 @@ var Hammer = (function(n, t, e, r) {
21199
21199
  }
21200
21200
  });
21201
21201
  var Fe = {
21202
- pointerdown: re,
21202
+ pointerdown: ne,
21203
21203
  pointermove: $,
21204
- pointerup: ee,
21205
- pointercancel: K,
21206
- pointerout: K
21204
+ pointerup: Z,
21205
+ pointercancel: X,
21206
+ pointerout: X
21207
21207
  }, Oe = {
21208
- 2: Q,
21208
+ 2: V,
21209
21209
  3: U,
21210
21210
  4: j,
21211
21211
  5: G
@@ -21221,20 +21221,20 @@ var Hammer = (function(n, t, e, r) {
21221
21221
  * @param {Object} ev
21222
21222
  */
21223
21223
  handler: function(F) {
21224
- var N = this.store, J = !1, Y = !1, ce = F.type.toLowerCase().replace("ms", ""), xe = Fe[ce], Ge = Oe[F.pointerType] || F.pointerType, Ze = Ge == Q, De = _(N, F.pointerId, "pointerId");
21225
- xe & re && (F.button === 0 || F.button === 2 || Ze) ? De < 0 && (N.push(F), De = N.length - 1) : xe & (ee | K) ? J = !0 : !Ze && F.buttons === 0 && (J = !0, Y = !0, xe = Fe.pointerup), !(De < 0) && (Y || (N[De] = F), this.callback(this.manager, xe, {
21224
+ var N = this.store, Q = !1, Y = !1, le = F.type.toLowerCase().replace("ms", ""), xe = Fe[le], Ge = Oe[F.pointerType] || F.pointerType, Ze = Ge == V, De = _(N, F.pointerId, "pointerId");
21225
+ xe & ne && (F.button === 0 || F.button === 2 || Ze) ? De < 0 && (N.push(F), De = N.length - 1) : xe & (Z | X) ? Q = !0 : !Ze && F.buttons === 0 && (Q = !0, Y = !0, xe = Fe.pointerup), !(De < 0) && (Y || (N[De] = F), this.callback(this.manager, xe, {
21226
21226
  pointers: N,
21227
21227
  changedPointers: [F],
21228
21228
  pointerType: Ge,
21229
21229
  srcEvent: N[De]
21230
- }), J && N.splice(De, 1));
21230
+ }), Q && N.splice(De, 1));
21231
21231
  }
21232
21232
  });
21233
21233
  var lt = {
21234
- touchstart: re,
21234
+ touchstart: ne,
21235
21235
  touchmove: $,
21236
- touchend: ee,
21237
- touchcancel: K
21236
+ touchend: Z,
21237
+ touchcancel: X
21238
21238
  }, nt = "touchstart", ot = "touchstart touchmove touchend touchcancel";
21239
21239
  function At() {
21240
21240
  this.evTarget = nt, this.evWin = ot, this.started = !1, oe.apply(this, arguments);
@@ -21242,57 +21242,57 @@ var Hammer = (function(n, t, e, r) {
21242
21242
  v(At, oe, {
21243
21243
  handler: function(F) {
21244
21244
  var N = lt[F.type];
21245
- if (N === re && (this.started = !0), !!this.started) {
21246
- var J = We.call(this, F, N);
21247
- N & (ee | K) && J[0].length - J[1].length === 0 && (this.started = !1), this.callback(this.manager, N, {
21248
- pointers: J[0],
21249
- changedPointers: J[1],
21250
- pointerType: Q,
21245
+ if (N === ne && (this.started = !0), !!this.started) {
21246
+ var Q = We.call(this, F, N);
21247
+ N & (Z | X) && Q[0].length - Q[1].length === 0 && (this.started = !1), this.callback(this.manager, N, {
21248
+ pointers: Q[0],
21249
+ changedPointers: Q[1],
21250
+ pointerType: V,
21251
21251
  srcEvent: F
21252
21252
  });
21253
21253
  }
21254
21254
  }
21255
21255
  });
21256
21256
  function We(B, F) {
21257
- var N = I(B.touches), J = I(B.changedTouches);
21258
- return F & (ee | K) && (N = C(N.concat(J), "identifier")), [N, J];
21257
+ var N = I(B.touches), Q = I(B.changedTouches);
21258
+ return F & (Z | X) && (N = C(N.concat(Q), "identifier")), [N, Q];
21259
21259
  }
21260
21260
  var Ct = {
21261
- touchstart: re,
21261
+ touchstart: ne,
21262
21262
  touchmove: $,
21263
- touchend: ee,
21264
- touchcancel: K
21263
+ touchend: Z,
21264
+ touchcancel: X
21265
21265
  }, He = "touchstart touchmove touchend touchcancel";
21266
21266
  function Ne() {
21267
21267
  this.evTarget = He, this.targetIds = {}, oe.apply(this, arguments);
21268
21268
  }
21269
21269
  v(Ne, oe, {
21270
21270
  handler: function(F) {
21271
- var N = Ct[F.type], J = bt.call(this, F, N);
21272
- J && this.callback(this.manager, N, {
21273
- pointers: J[0],
21274
- changedPointers: J[1],
21275
- pointerType: Q,
21271
+ var N = Ct[F.type], Q = bt.call(this, F, N);
21272
+ Q && this.callback(this.manager, N, {
21273
+ pointers: Q[0],
21274
+ changedPointers: Q[1],
21275
+ pointerType: V,
21276
21276
  srcEvent: F
21277
21277
  });
21278
21278
  }
21279
21279
  });
21280
21280
  function bt(B, F) {
21281
- var N = I(B.touches), J = this.targetIds;
21282
- if (F & (re | $) && N.length === 1)
21283
- return J[N[0].identifier] = !0, [N, N];
21284
- var Y, ce, xe = I(B.changedTouches), Ge = [], Ze = this.target;
21285
- if (ce = N.filter(function(De) {
21281
+ var N = I(B.touches), Q = this.targetIds;
21282
+ if (F & (ne | $) && N.length === 1)
21283
+ return Q[N[0].identifier] = !0, [N, N];
21284
+ var Y, le, xe = I(B.changedTouches), Ge = [], Ze = this.target;
21285
+ if (le = N.filter(function(De) {
21286
21286
  return M(De.target, Ze);
21287
- }), F === re)
21288
- for (Y = 0; Y < ce.length; )
21289
- J[ce[Y].identifier] = !0, Y++;
21287
+ }), F === ne)
21288
+ for (Y = 0; Y < le.length; )
21289
+ Q[le[Y].identifier] = !0, Y++;
21290
21290
  for (Y = 0; Y < xe.length; )
21291
- J[xe[Y].identifier] && Ge.push(xe[Y]), F & (ee | K) && delete J[xe[Y].identifier], Y++;
21291
+ Q[xe[Y].identifier] && Ge.push(xe[Y]), F & (Z | X) && delete Q[xe[Y].identifier], Y++;
21292
21292
  if (Ge.length)
21293
21293
  return [
21294
21294
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
21295
- C(ce.concat(Ge), "identifier"),
21295
+ C(le.concat(Ge), "identifier"),
21296
21296
  Ge
21297
21297
  ];
21298
21298
  }
@@ -21309,14 +21309,14 @@ var Hammer = (function(n, t, e, r) {
21309
21309
  * @param {String} inputEvent
21310
21310
  * @param {Object} inputData
21311
21311
  */
21312
- handler: function(F, N, J) {
21313
- var Y = J.pointerType == Q, ce = J.pointerType == j;
21314
- if (!(ce && J.sourceCapabilities && J.sourceCapabilities.firesTouchEvents)) {
21312
+ handler: function(F, N, Q) {
21313
+ var Y = Q.pointerType == V, le = Q.pointerType == j;
21314
+ if (!(le && Q.sourceCapabilities && Q.sourceCapabilities.firesTouchEvents)) {
21315
21315
  if (Y)
21316
- Rt.call(this, N, J);
21317
- else if (ce && it.call(this, J))
21316
+ Rt.call(this, N, Q);
21317
+ else if (le && it.call(this, Q))
21318
21318
  return;
21319
- this.callback(F, N, J);
21319
+ this.callback(F, N, Q);
21320
21320
  }
21321
21321
  },
21322
21322
  /**
@@ -21327,29 +21327,29 @@ var Hammer = (function(n, t, e, r) {
21327
21327
  }
21328
21328
  });
21329
21329
  function Rt(B, F) {
21330
- B & re ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (ee | K) && rt.call(this, F);
21330
+ B & ne ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (Z | X) && rt.call(this, F);
21331
21331
  }
21332
21332
  function rt(B) {
21333
21333
  var F = B.changedPointers[0];
21334
21334
  if (F.identifier === this.primaryTouch) {
21335
21335
  var N = { x: F.clientX, y: F.clientY };
21336
21336
  this.lastTouches.push(N);
21337
- var J = this.lastTouches, Y = function() {
21338
- var ce = J.indexOf(N);
21339
- ce > -1 && J.splice(ce, 1);
21337
+ var Q = this.lastTouches, Y = function() {
21338
+ var le = Q.indexOf(N);
21339
+ le > -1 && Q.splice(le, 1);
21340
21340
  };
21341
21341
  setTimeout(Y, It);
21342
21342
  }
21343
21343
  }
21344
21344
  function it(B) {
21345
- for (var F = B.srcEvent.clientX, N = B.srcEvent.clientY, J = 0; J < this.lastTouches.length; J++) {
21346
- var Y = this.lastTouches[J], ce = Math.abs(F - Y.x), xe = Math.abs(N - Y.y);
21347
- if (ce <= Tt && xe <= Tt)
21345
+ for (var F = B.srcEvent.clientX, N = B.srcEvent.clientY, Q = 0; Q < this.lastTouches.length; Q++) {
21346
+ var Y = this.lastTouches[Q], le = Math.abs(F - Y.x), xe = Math.abs(N - Y.y);
21347
+ if (le <= Tt && xe <= Tt)
21348
21348
  return !0;
21349
21349
  }
21350
21350
  return !1;
21351
21351
  }
21352
- var ct = s ? H(s.style, "touchAction") : r, Xe = ct !== r, fe = "compute", Me = "auto", Ce = "manipulation", ke = "none", je = "pan-x", st = "pan-y", Qe = Ht();
21352
+ var ct = s ? H(s.style, "touchAction") : r, Xe = ct !== r, ce = "compute", Me = "auto", Ce = "manipulation", ke = "none", je = "pan-x", st = "pan-y", Qe = Ht();
21353
21353
  function Je(B, F) {
21354
21354
  this.manager = B, this.set(F);
21355
21355
  }
@@ -21359,7 +21359,7 @@ var Hammer = (function(n, t, e, r) {
21359
21359
  * @param {String} value
21360
21360
  */
21361
21361
  set: function(B) {
21362
- B == fe && (B = this.compute()), Xe && this.manager.element.style && Qe[B] && (this.manager.element.style[ct] = B), this.actions = B.toLowerCase().trim();
21362
+ B == ce && (B = this.compute()), Xe && this.manager.element.style && Qe[B] && (this.manager.element.style[ct] = B), this.actions = B.toLowerCase().trim();
21363
21363
  },
21364
21364
  /**
21365
21365
  * just re-set the touchAction value
@@ -21387,13 +21387,13 @@ var Hammer = (function(n, t, e, r) {
21387
21387
  F.preventDefault();
21388
21388
  return;
21389
21389
  }
21390
- var J = this.actions, Y = w(J, ke) && !Qe[ke], ce = w(J, st) && !Qe[st], xe = w(J, je) && !Qe[je];
21390
+ var Q = this.actions, Y = w(Q, ke) && !Qe[ke], le = w(Q, st) && !Qe[st], xe = w(Q, je) && !Qe[je];
21391
21391
  if (Y) {
21392
21392
  var Ge = B.pointers.length === 1, Ze = B.distance < 2, De = B.deltaTime < 250;
21393
21393
  if (Ge && Ze && De)
21394
21394
  return;
21395
21395
  }
21396
- if (!(xe && ce) && (Y || ce && N & ne || xe && N & de))
21396
+ if (!(xe && le) && (Y || le && N & re || xe && N & de))
21397
21397
  return this.preventSrc(F);
21398
21398
  },
21399
21399
  /**
@@ -21500,10 +21500,10 @@ var Hammer = (function(n, t, e, r) {
21500
21500
  */
21501
21501
  emit: function(B) {
21502
21502
  var F = this, N = this.state;
21503
- function J(Y) {
21503
+ function Q(Y) {
21504
21504
  F.manager.emit(Y, B);
21505
21505
  }
21506
- N < xt && J(F.options.event + Lt(N)), J(F.options.event), B.additionalEvent && J(B.additionalEvent), N >= xt && J(F.options.event + Lt(N));
21506
+ N < xt && Q(F.options.event + Lt(N)), Q(F.options.event), B.additionalEvent && Q(B.additionalEvent), N >= xt && Q(F.options.event + Lt(N));
21507
21507
  },
21508
21508
  /**
21509
21509
  * Check that all the require failure recognizers has failed,
@@ -21569,7 +21569,7 @@ var Hammer = (function(n, t, e, r) {
21569
21569
  return B & mt ? "cancel" : B & xt ? "end" : B & Pt ? "move" : B & dt ? "start" : "";
21570
21570
  }
21571
21571
  function Ot(B) {
21572
- return B == Z ? "down" : B == te ? "up" : B == W ? "left" : B == X ? "right" : "";
21572
+ return B == te ? "down" : B == ee ? "up" : B == K ? "left" : B == W ? "right" : "";
21573
21573
  }
21574
21574
  function _t(B, F) {
21575
21575
  var N = F.manager;
@@ -21607,8 +21607,8 @@ var Hammer = (function(n, t, e, r) {
21607
21607
  * @returns {*} State
21608
21608
  */
21609
21609
  process: function(B) {
21610
- var F = this.state, N = B.eventType, J = F & (dt | Pt), Y = this.attrTest(B);
21611
- return J && (N & K || !Y) ? F | mt : J || Y ? N & ee ? F | xt : F & dt ? F | Pt : dt : gt;
21610
+ var F = this.state, N = B.eventType, Q = F & (dt | Pt), Y = this.attrTest(B);
21611
+ return Q && (N & X || !Y) ? F | mt : Q || Y ? N & Z ? F | xt : F & dt ? F | Pt : dt : gt;
21612
21612
  }
21613
21613
  });
21614
21614
  function vt() {
@@ -21627,11 +21627,11 @@ var Hammer = (function(n, t, e, r) {
21627
21627
  },
21628
21628
  getTouchAction: function() {
21629
21629
  var B = this.options.direction, F = [];
21630
- return B & ne && F.push(st), B & de && F.push(je), F;
21630
+ return B & re && F.push(st), B & de && F.push(je), F;
21631
21631
  },
21632
21632
  directionTest: function(B) {
21633
- var F = this.options, N = !0, J = B.distance, Y = B.direction, ce = B.deltaX, xe = B.deltaY;
21634
- return Y & F.direction || (F.direction & ne ? (Y = ce === 0 ? se : ce < 0 ? W : X, N = ce != this.pX, J = Math.abs(B.deltaX)) : (Y = xe === 0 ? se : xe < 0 ? te : Z, N = xe != this.pY, J = Math.abs(B.deltaY))), B.direction = Y, N && J > F.threshold && Y & F.direction;
21633
+ var F = this.options, N = !0, Q = B.distance, Y = B.direction, le = B.deltaX, xe = B.deltaY;
21634
+ return Y & F.direction || (F.direction & re ? (Y = le === 0 ? se : le < 0 ? K : W, N = le != this.pX, Q = Math.abs(B.deltaX)) : (Y = xe === 0 ? se : xe < 0 ? ee : te, N = xe != this.pY, Q = Math.abs(B.deltaY))), B.direction = Y, N && Q > F.threshold && Y & F.direction;
21635
21635
  },
21636
21636
  attrTest: function(B) {
21637
21637
  return at.prototype.attrTest.call(this, B) && (this.state & dt || !(this.state & dt) && this.directionTest(B));
@@ -21689,14 +21689,14 @@ var Hammer = (function(n, t, e, r) {
21689
21689
  return [Me];
21690
21690
  },
21691
21691
  process: function(B) {
21692
- var F = this.options, N = B.pointers.length === F.pointers, J = B.distance < F.threshold, Y = B.deltaTime > F.time;
21693
- if (this._input = B, !J || !N || B.eventType & (ee | K) && !Y)
21692
+ var F = this.options, N = B.pointers.length === F.pointers, Q = B.distance < F.threshold, Y = B.deltaTime > F.time;
21693
+ if (this._input = B, !Q || !N || B.eventType & (Z | X) && !Y)
21694
21694
  this.reset();
21695
- else if (B.eventType & re)
21695
+ else if (B.eventType & ne)
21696
21696
  this.reset(), this._timer = d(function() {
21697
21697
  this.state = pt, this.tryEmit();
21698
21698
  }, F.time, this);
21699
- else if (B.eventType & ee)
21699
+ else if (B.eventType & Z)
21700
21700
  return pt;
21701
21701
  return gt;
21702
21702
  },
@@ -21704,7 +21704,7 @@ var Hammer = (function(n, t, e, r) {
21704
21704
  clearTimeout(this._timer);
21705
21705
  },
21706
21706
  emit: function(B) {
21707
- this.state === pt && (B && B.eventType & ee ? this.manager.emit(this.options.event + "up", B) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
21707
+ this.state === pt && (B && B.eventType & Z ? this.manager.emit(this.options.event + "up", B) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
21708
21708
  }
21709
21709
  });
21710
21710
  function ve() {
@@ -21739,7 +21739,7 @@ var Hammer = (function(n, t, e, r) {
21739
21739
  event: "swipe",
21740
21740
  threshold: 10,
21741
21741
  velocity: 0.3,
21742
- direction: ne | de,
21742
+ direction: re | de,
21743
21743
  pointers: 1
21744
21744
  },
21745
21745
  getTouchAction: function() {
@@ -21747,7 +21747,7 @@ var Hammer = (function(n, t, e, r) {
21747
21747
  },
21748
21748
  attrTest: function(B) {
21749
21749
  var F = this.options.direction, N;
21750
- return F & (ne | de) ? N = B.overallVelocity : F & ne ? N = B.overallVelocityX : F & de && (N = B.overallVelocityY), this._super.attrTest.call(this, B) && F & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(N) > this.options.velocity && B.eventType & ee;
21750
+ return F & (re | de) ? N = B.overallVelocity : F & re ? N = B.overallVelocityX : F & de && (N = B.overallVelocityY), this._super.attrTest.call(this, B) && F & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(N) > this.options.velocity && B.eventType & Z;
21751
21751
  },
21752
21752
  emit: function(B) {
21753
21753
  var F = Ot(B.offsetDirection);
@@ -21779,14 +21779,14 @@ var Hammer = (function(n, t, e, r) {
21779
21779
  return [Ce];
21780
21780
  },
21781
21781
  process: function(B) {
21782
- var F = this.options, N = B.pointers.length === F.pointers, J = B.distance < F.threshold, Y = B.deltaTime < F.time;
21783
- if (this.reset(), B.eventType & re && this.count === 0)
21782
+ var F = this.options, N = B.pointers.length === F.pointers, Q = B.distance < F.threshold, Y = B.deltaTime < F.time;
21783
+ if (this.reset(), B.eventType & ne && this.count === 0)
21784
21784
  return this.failTimeout();
21785
- if (J && Y && N) {
21786
- if (B.eventType != ee)
21785
+ if (Q && Y && N) {
21786
+ if (B.eventType != Z)
21787
21787
  return this.failTimeout();
21788
- var ce = this.pTime ? B.timeStamp - this.pTime < F.interval : !0, xe = !this.pCenter || he(this.pCenter, B.center) < F.posThreshold;
21789
- this.pTime = B.timeStamp, this.pCenter = B.center, !xe || !ce ? this.count = 1 : this.count += 1, this._input = B;
21788
+ var le = this.pTime ? B.timeStamp - this.pTime < F.interval : !0, xe = !this.pCenter || he(this.pCenter, B.center) < F.posThreshold;
21789
+ this.pTime = B.timeStamp, this.pCenter = B.center, !xe || !le ? this.count = 1 : this.count += 1, this._input = B;
21790
21790
  var Ge = this.count % F.taps;
21791
21791
  if (Ge === 0)
21792
21792
  return this.hasRequireFailures() ? (this._timer = d(function() {
@@ -21824,7 +21824,7 @@ var Hammer = (function(n, t, e, r) {
21824
21824
  * @type {String}
21825
21825
  * @default compute
21826
21826
  */
21827
- touchAction: fe,
21827
+ touchAction: ce,
21828
21828
  /**
21829
21829
  * @type {Boolean}
21830
21830
  * @default true
@@ -21853,8 +21853,8 @@ var Hammer = (function(n, t, e, r) {
21853
21853
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
21854
21854
  [ve, { enable: !1 }],
21855
21855
  [wt, { enable: !1 }, ["rotate"]],
21856
- [Pe, { direction: ne }],
21857
- [vt, { direction: ne }, ["swipe"]],
21856
+ [Pe, { direction: re }],
21857
+ [vt, { direction: re }, ["swipe"]],
21858
21858
  [we],
21859
21859
  [we, { event: "doubletap", taps: 2 }, ["tap"]],
21860
21860
  [Mt]
@@ -21908,9 +21908,9 @@ var Hammer = (function(n, t, e, r) {
21908
21908
  };
21909
21909
  var Ye = 1, ut = 2;
21910
21910
  function Ke(B, F) {
21911
- this.options = m({}, qe.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input = le(this), this.touchAction = new Je(this, this.options.touchAction), ht(this, !0), p(this.options.recognizers, function(N) {
21912
- var J = this.add(new N[0](N[1]));
21913
- N[2] && J.recognizeWith(N[2]), N[3] && J.requireFailure(N[3]);
21911
+ this.options = m({}, qe.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input = ue(this), this.touchAction = new Je(this, this.options.touchAction), ht(this, !0), p(this.options.recognizers, function(N) {
21912
+ var Q = this.add(new N[0](N[1]));
21913
+ N[2] && Q.recognizeWith(N[2]), N[3] && Q.requireFailure(N[3]);
21914
21914
  }, this);
21915
21915
  }
21916
21916
  Ke.prototype = {
@@ -21941,12 +21941,12 @@ var Hammer = (function(n, t, e, r) {
21941
21941
  var F = this.session;
21942
21942
  if (!F.stopped) {
21943
21943
  this.touchAction.preventDefaults(B);
21944
- var N, J = this.recognizers, Y = F.curRecognizer;
21944
+ var N, Q = this.recognizers, Y = F.curRecognizer;
21945
21945
  (!Y || Y && Y.state & pt) && (Y = F.curRecognizer = null);
21946
- for (var ce = 0; ce < J.length; )
21947
- N = J[ce], F.stopped !== ut && // 1
21946
+ for (var le = 0; le < Q.length; )
21947
+ N = Q[le], F.stopped !== ut && // 1
21948
21948
  (!Y || N == Y || // 2
21949
- N.canRecognizeWith(Y)) ? N.recognize(B) : N.reset(), !Y && N.state & (dt | Pt | xt) && (Y = F.curRecognizer = N), ce++;
21949
+ N.canRecognizeWith(Y)) ? N.recognize(B) : N.reset(), !Y && N.state & (dt | Pt | xt) && (Y = F.curRecognizer = N), le++;
21950
21950
  }
21951
21951
  },
21952
21952
  /**
@@ -21997,8 +21997,8 @@ var Hammer = (function(n, t, e, r) {
21997
21997
  on: function(B, F) {
21998
21998
  if (B !== r && F !== r) {
21999
21999
  var N = this.handlers;
22000
- return p(P(B), function(J) {
22001
- N[J] = N[J] || [], N[J].push(F);
22000
+ return p(P(B), function(Q) {
22001
+ N[Q] = N[Q] || [], N[Q].push(F);
22002
22002
  }), this;
22003
22003
  }
22004
22004
  },
@@ -22011,8 +22011,8 @@ var Hammer = (function(n, t, e, r) {
22011
22011
  off: function(B, F) {
22012
22012
  if (B !== r) {
22013
22013
  var N = this.handlers;
22014
- return p(P(B), function(J) {
22015
- F ? N[J] && N[J].splice(_(N[J], F), 1) : delete N[J];
22014
+ return p(P(B), function(Q) {
22015
+ F ? N[Q] && N[Q].splice(_(N[Q], F), 1) : delete N[Q];
22016
22016
  }), this;
22017
22017
  }
22018
22018
  },
@@ -22028,8 +22028,8 @@ var Hammer = (function(n, t, e, r) {
22028
22028
  F.type = B, F.preventDefault = function() {
22029
22029
  F.srcEvent.preventDefault();
22030
22030
  };
22031
- for (var J = 0; J < N.length; )
22032
- N[J](F), J++;
22031
+ for (var Q = 0; Q < N.length; )
22032
+ N[Q](F), Q++;
22033
22033
  }
22034
22034
  },
22035
22035
  /**
@@ -22043,9 +22043,9 @@ var Hammer = (function(n, t, e, r) {
22043
22043
  function ht(B, F) {
22044
22044
  var N = B.element;
22045
22045
  if (N.style) {
22046
- var J;
22047
- p(B.options.cssProps, function(Y, ce) {
22048
- J = H(N.style, ce), F ? (B.oldCssProps[J] = N.style[J], N.style[J] = Y) : N.style[J] = B.oldCssProps[J] || "";
22046
+ var Q;
22047
+ p(B.options.cssProps, function(Y, le) {
22048
+ Q = H(N.style, le), F ? (B.oldCssProps[Q] = N.style[Q], N.style[Q] = Y) : N.style[Q] = B.oldCssProps[Q] || "";
22049
22049
  }), F || (B.oldCssProps = {});
22050
22050
  }
22051
22051
  }
@@ -22054,10 +22054,10 @@ var Hammer = (function(n, t, e, r) {
22054
22054
  N.initEvent(B, !0, !0), N.gesture = F, F.target.dispatchEvent(N);
22055
22055
  }
22056
22056
  return m(qe, {
22057
- INPUT_START: re,
22057
+ INPUT_START: ne,
22058
22058
  INPUT_MOVE: $,
22059
- INPUT_END: ee,
22060
- INPUT_CANCEL: K,
22059
+ INPUT_END: Z,
22060
+ INPUT_CANCEL: X,
22061
22061
  STATE_POSSIBLE: Ft,
22062
22062
  STATE_BEGAN: dt,
22063
22063
  STATE_CHANGED: Pt,
@@ -22066,11 +22066,11 @@ var Hammer = (function(n, t, e, r) {
22066
22066
  STATE_CANCELLED: mt,
22067
22067
  STATE_FAILED: gt,
22068
22068
  DIRECTION_NONE: se,
22069
- DIRECTION_LEFT: W,
22070
- DIRECTION_RIGHT: X,
22071
- DIRECTION_UP: te,
22072
- DIRECTION_DOWN: Z,
22073
- DIRECTION_HORIZONTAL: ne,
22069
+ DIRECTION_LEFT: K,
22070
+ DIRECTION_RIGHT: W,
22071
+ DIRECTION_UP: ee,
22072
+ DIRECTION_DOWN: te,
22073
+ DIRECTION_HORIZONTAL: re,
22074
22074
  DIRECTION_VERTICAL: de,
22075
22075
  DIRECTION_ALL: ae,
22076
22076
  Manager: Ke,
@@ -22471,15 +22471,15 @@ var Hammer = (function(n, t, e, r) {
22471
22471
  var k = (Math.abs(I.deltaY) > Math.abs(I.deltaX) ? I.deltaY : I.deltaX) / -60, D = r.mouseWheelState !== void 0, q = {
22472
22472
  x: I.clientX,
22473
22473
  y: I.clientY
22474
- }, z = r.relativeClientPosition(q), V = r.createRaycasterFromCamera(z, r.camera), Q = __assign(__assign({}, q), { coords: z, raycaster: V, buttons: I.buttons, delta: k }), O = createEvent("gesture.mousewheel", {
22474
+ }, z = r.relativeClientPosition(q), J = r.createRaycasterFromCamera(z, r.camera), V = __assign(__assign({}, q), { coords: z, raycaster: J, buttons: I.buttons, delta: k }), O = createEvent("gesture.mousewheel", {
22475
22475
  target: I.target,
22476
22476
  pointerType: "mouse",
22477
22477
  srcEvent: I,
22478
- pointers: [__assign({}, Q)],
22478
+ pointers: [__assign({}, V)],
22479
22479
  isFirst: D,
22480
22480
  isFinal: !1,
22481
22481
  scale: 0,
22482
- center: __assign({}, Q),
22482
+ center: __assign({}, V),
22483
22483
  velocityX: 0,
22484
22484
  velocityY: 0,
22485
22485
  overallVelocityX: 0,
@@ -22494,11 +22494,11 @@ var Hammer = (function(n, t, e, r) {
22494
22494
  target: I.target,
22495
22495
  pointerType: "mouse",
22496
22496
  srcEvent: I,
22497
- pointers: [__assign(__assign({}, Q), { delta: 0 })],
22497
+ pointers: [__assign(__assign({}, V), { delta: 0 })],
22498
22498
  isFirst: !1,
22499
22499
  isFinal: !0,
22500
22500
  scale: 0,
22501
- center: __assign(__assign({}, Q), { delta: 0 }),
22501
+ center: __assign(__assign({}, V), { delta: 0 }),
22502
22502
  velocityX: 0,
22503
22503
  velocityY: 0,
22504
22504
  overallVelocityX: 0,
@@ -23792,50 +23792,50 @@ void main() {
23792
23792
  var S = scratchCameraProjectMatrix.copy(f);
23793
23793
  S.elements[0] *= p, S.elements[5] *= p, this.camera.projectionMatrix.equals(S) || (this.camera.projectionMatrix.copy(S), this.camera.projectionMatrixInverse.getInverse(this.camera.projectionMatrix), r = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
23794
23794
  var R = this.frustum.planes[5].normal, M = [];
23795
- m >= g && traverseTileCubeNode(this.tileTree, function(K) {
23796
- if (!(K.level < g)) {
23797
- if (K.level > m || !e.frustum.intersectsBox(K.box))
23795
+ m >= g && traverseTileCubeNode(this.tileTree, function(X) {
23796
+ if (!(X.level < g)) {
23797
+ if (X.level > m || !e.frustum.intersectsBox(X.box))
23798
23798
  return !1;
23799
- M.push(K);
23799
+ M.push(X);
23800
23800
  }
23801
23801
  });
23802
23802
  var w = /* @__PURE__ */ new WeakMap();
23803
- M.sort(function(K, se) {
23804
- if (K.level !== se.level)
23805
- return K.level - se.level;
23806
- var W = w.get(K);
23807
- W === void 0 && (W = K.box.getCenter(scratchSortVector3).angleTo(R), w.set(K, W));
23808
- var X = w.get(se);
23809
- return X === void 0 && (X = se.box.getCenter(scratchSortVector3).angleTo(R), w.set(se, X)), W - X;
23803
+ M.sort(function(X, se) {
23804
+ if (X.level !== se.level)
23805
+ return X.level - se.level;
23806
+ var K = w.get(X);
23807
+ K === void 0 && (K = X.box.getCenter(scratchSortVector3).angleTo(R), w.set(X, K));
23808
+ var W = w.get(se);
23809
+ return W === void 0 && (W = se.box.getCenter(scratchSortVector3).angleTo(R), w.set(se, W)), K - W;
23810
23810
  });
23811
23811
  var P = /* @__PURE__ */ new WeakSet(), _ = this.observer.images.tiles;
23812
23812
  if (_)
23813
- for (var I = function(K) {
23813
+ for (var I = function(X) {
23814
23814
  var se = _.find(function(me) {
23815
- return me.level === K.level;
23815
+ return me.level === X.level;
23816
23816
  });
23817
23817
  if (!se)
23818
23818
  return "continue";
23819
- P.add(K);
23820
- var W = C.tileMeshes.get(K);
23821
- if (W) {
23822
- W.appearDuration = C.appearDuration;
23823
- var X = W.updateTime(o);
23824
- return X && (r = !0), "continue";
23819
+ P.add(X);
23820
+ var K = C.tileMeshes.get(X);
23821
+ if (K) {
23822
+ K.appearDuration = C.appearDuration;
23823
+ var W = K.updateTime(o);
23824
+ return W && (r = !0), "continue";
23825
23825
  }
23826
23826
  if (C.pedding >= C.maxRequest)
23827
23827
  return "continue";
23828
- var te = Math.pow(2, K.level) * K.position.y, Z = Math.pow(2, K.level) * K.position.x, ne = panoStringify({
23828
+ var ee = Math.pow(2, X.level) * X.position.y, te = Math.pow(2, X.level) * X.position.x, re = panoStringify({
23829
23829
  panoIndex: C.observer.panoIndex,
23830
23830
  workCode: C.observer.work.workCode
23831
- }), de = "".concat(ne, ".").concat(K.face, ".").concat(K.level, ".").concat(te, ".").concat(Z), ae = se.work.getURL(se[K.face]), ue = se.size, be = C.imageOptions.transform, oe = __assign(__assign({}, pick(C.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(de), size: se.scale >= 1 ? void 0 : ue * K.size * se.scale, cut: K.size === 1 ? void 0 : [
23832
- ue * K.position.x,
23833
- ue * K.position.y,
23834
- ue * K.size,
23835
- ue * K.size
23831
+ }), de = "".concat(re, ".").concat(X.face, ".").concat(X.level, ".").concat(ee, ".").concat(te), ae = se.work.getURL(se[X.face]), fe = se.size, be = C.imageOptions.transform, oe = __assign(__assign({}, pick(C.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(de), size: se.scale >= 1 ? void 0 : fe * X.size * se.scale, cut: X.size === 1 ? void 0 : [
23832
+ fe * X.position.x,
23833
+ fe * X.position.y,
23834
+ fe * X.size,
23835
+ fe * X.size
23836
23836
  ] });
23837
- K.level === 1 && se.scale >= 0.5 && (oe.format === "jpg" || /\.jpg$/.test(ae)) && (oe.size = void 0, oe.quality || (oe.quality = 70)), K.size === 1 && console.warn("tile: ".concat(oe.key, " should not appear.")), C.pedding++;
23838
- var le = C.textureLoader.loadTexture(ae, {
23837
+ X.level === 1 && se.scale >= 0.5 && (oe.format === "jpg" || /\.jpg$/.test(ae)) && (oe.size = void 0, oe.quality || (oe.quality = 70)), X.size === 1 && console.warn("tile: ".concat(oe.key, " should not appear.")), C.pedding++;
23838
+ var ue = C.textureLoader.loadTexture(ae, {
23839
23839
  imageURL: {
23840
23840
  transform: be,
23841
23841
  options: oe
@@ -23847,34 +23847,34 @@ void main() {
23847
23847
  }).then(function(me) {
23848
23848
  return me.body;
23849
23849
  });
23850
- le.then(function(me) {
23850
+ ue.then(function(me) {
23851
23851
  return initTexture(me, l);
23852
23852
  }).then(function(me) {
23853
23853
  return e.pedding--, me;
23854
23854
  }, function(me) {
23855
23855
  return e.pedding--, Promise.reject(me);
23856
- }), W = new TileMesh(K, le), W.name = "tiling:tile-".concat(de), W.visible = !1, W.appearDuration = C.appearDuration, C.tileMeshes.set(K, W), C.scene.add(W), W.updateTime(o), r = !0;
23856
+ }), K = new TileMesh(X, ue), K.name = "tiling:tile-".concat(de), K.visible = !1, K.appearDuration = C.appearDuration, C.tileMeshes.set(X, K), C.scene.add(K), K.updateTime(o), r = !0;
23857
23857
  }, C = this, H = 0, L = M; H < L.length; H++) {
23858
23858
  var O = L[H];
23859
23859
  I(O);
23860
23860
  }
23861
23861
  var k = [], D = [];
23862
- this.tileMeshes.forEach(function(K, se) {
23863
- P.has(se) ? k.push(K) : D.push(K);
23864
- var W = se.level >= g && se.level <= m;
23865
- K.visible !== W && (K.visible = W, r = !0);
23862
+ this.tileMeshes.forEach(function(X, se) {
23863
+ P.has(se) ? k.push(X) : D.push(X);
23864
+ var K = se.level >= g && se.level <= m;
23865
+ X.visible !== K && (X.visible = K, r = !0);
23866
23866
  });
23867
- for (var q = D.sort(function(K, se) {
23868
- return se.activeTime - K.activeTime;
23869
- }).slice(Math.max(0, this.maxCacheTile - k.length)), z = 0, V = q; z < V.length; z++) {
23870
- var Q = V[z];
23871
- this.tileMeshes.delete(Q.node), this.scene.remove(Q), Q.dispose(), r = !0;
23867
+ for (var q = D.sort(function(X, se) {
23868
+ return se.activeTime - X.activeTime;
23869
+ }).slice(Math.max(0, this.maxCacheTile - k.length)), z = 0, J = q; z < J.length; z++) {
23870
+ var V = J[z];
23871
+ this.tileMeshes.delete(V.node), this.scene.remove(V), V.dispose(), r = !0;
23872
23872
  }
23873
23873
  if (r) {
23874
23874
  var U = l.getRenderTarget();
23875
23875
  scratchPrevClearColor$1.copy(l.getClearColor());
23876
- var j = l.getClearAlpha(), G = l.autoClear, ie = l.autoClearColor, re = l.autoClearDepth, $ = l.autoClearStencil, ee = l.clippingPlanes;
23877
- 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(U), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear = G, l.autoClearColor = ie, l.autoClearDepth = re, l.autoClearStencil = $, l.clippingPlanes = ee;
23876
+ var j = l.getClearAlpha(), G = l.autoClear, ie = l.autoClearColor, ne = l.autoClearDepth, $ = l.autoClearStencil, Z = l.clippingPlanes;
23877
+ 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(U), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear = G, l.autoClearColor = ie, l.autoClearDepth = ne, l.autoClearStencil = $, l.clippingPlanes = Z;
23878
23878
  }
23879
23879
  return this.forceRenderWhenNextUpdate = !1, r;
23880
23880
  }, n;
@@ -24191,11 +24191,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24191
24191
  }
24192
24192
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(P.x + (_.x - P.x) * w, P.y + (_.y - P.y) * w, P.z + (_.z - P.z) * w);
24193
24193
  for (var L = [], O = [], k = 0, D = this.locationMotion.keyframes; k < D.length; k++) {
24194
- var q = D[k], z = q.key, V = q.progress;
24195
- z !== void 0 && (L.push(z), V > this.locationMotion.progress && O.push(z));
24194
+ var q = D[k], z = q.key, J = q.progress;
24195
+ z !== void 0 && (L.push(z), J > this.locationMotion.progress && O.push(z));
24196
24196
  }
24197
- for (var Q = 0, U = Object.keys(this.panoResources); Q < U.length; Q++) {
24198
- var j = U[Q];
24197
+ for (var V = 0, U = Object.keys(this.panoResources); V < U.length; V++) {
24198
+ var j = U[V];
24199
24199
  if (!(O.indexOf(j) >= 0)) {
24200
24200
  var G = this.panoResources[j];
24201
24201
  if (G.panoPicture) {
@@ -24209,8 +24209,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24209
24209
  L.indexOf(j) >= 0 || delete this.panoResources[j];
24210
24210
  }
24211
24211
  }
24212
- var re = panoParse(T.panoId);
24213
- re !== this.currentPano && (this.currentPano = re, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
24212
+ var ne = panoParse(T.panoId);
24213
+ ne !== this.currentPano && (this.currentPano = ne, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
24214
24214
  userAction: this.userAction,
24215
24215
  prevPano: panoParse(S.panoId),
24216
24216
  state: __assign(__assign(__assign(__assign({}, panoParse(R.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
@@ -24220,37 +24220,37 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24220
24220
  }));
24221
24221
  }
24222
24222
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
24223
- var $ = this.works.getObserver(this.currentPano), ee = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, K = this.works.getObserver(b.panoId), se = this.works.getObserver(T.panoId);
24223
+ var $ = this.works.getObserver(this.currentPano), Z = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, X = this.works.getObserver(b.panoId), se = this.works.getObserver(T.panoId);
24224
24224
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && $) {
24225
- for (var W = [], X = $.work.observers, te = 0, Z = $.accessibleNodes; te < Z.length; te++) {
24226
- var ne = Z[te], H = X[ne];
24227
- H && W.push(H);
24225
+ for (var K = [], W = $.work.observers, ee = 0, te = $.accessibleNodes; ee < te.length; ee++) {
24226
+ var re = te[ee], H = W[re];
24227
+ H && K.push(H);
24228
24228
  }
24229
24229
  var de = /* @__PURE__ */ new Map();
24230
- if (W.sort(function(fe, Me) {
24231
- var Ce = de.get(fe);
24232
- typeof Ce == "undefined" && (Ce = fe.standingPosition.distanceTo($.standingPosition), de.set(fe, Ce));
24233
- var ke = de.get(fe);
24230
+ if (K.sort(function(ce, Me) {
24231
+ var Ce = de.get(ce);
24232
+ typeof Ce == "undefined" && (Ce = ce.standingPosition.distanceTo($.standingPosition), de.set(ce, Ce));
24233
+ var ke = de.get(ce);
24234
24234
  return typeof ke == "undefined" && (ke = Me.standingPosition.distanceTo($.standingPosition), de.set(Me, ke)), Ce - ke;
24235
- }), W.length) {
24236
- this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % W.length;
24237
- var ae = W[this.accessibleObserverFloorCheckCount], ue = this.modelScene.models.find(function(fe) {
24238
- return fe.work === (ae == null ? void 0 : ae.work);
24235
+ }), K.length) {
24236
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % K.length;
24237
+ var ae = K[this.accessibleObserverFloorCheckCount], fe = this.modelScene.models.find(function(ce) {
24238
+ return ce.work === (ae == null ? void 0 : ae.work);
24239
24239
  });
24240
- if (ae && ue && ue.visible) {
24241
- var be = 0.3, oe = 0.05, le = 5e-3, me = ae.standingPosition.clone().applyMatrix4(ae.work.transform), ge = panoStringify({
24240
+ if (ae && fe && fe.visible) {
24241
+ var be = 0.3, oe = 0.05, ue = 5e-3, me = ae.standingPosition.clone().applyMatrix4(ae.work.transform), ge = panoStringify({
24242
24242
  panoIndex: ae.panoIndex,
24243
24243
  workCode: ae.work.workCode
24244
- }), Ae = adjustPanoCircleMeshVectors.map(function(fe) {
24245
- scratchRaycaster$1.ray.origin.copy(me), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(fe).setY(be)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
24246
- var Me = ue.intersectRaycaster(scratchRaycaster$1)[0];
24247
- return Me && Me.distance - le <= be ? new THREE.Vector3().copy(me).setY(Me.point.y + le) : me;
24244
+ }), Ae = adjustPanoCircleMeshVectors.map(function(ce) {
24245
+ scratchRaycaster$1.ray.origin.copy(me), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(ce).setY(be)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
24246
+ var Me = fe.intersectRaycaster(scratchRaycaster$1)[0];
24247
+ return Me && Me.distance - ue <= be ? new THREE.Vector3().copy(me).setY(Me.point.y + ue) : me;
24248
24248
  });
24249
- Ae.sort(function(fe, Me) {
24250
- return Me.y - fe.y;
24249
+ Ae.sort(function(ce, Me) {
24250
+ return Me.y - ce.y;
24251
24251
  });
24252
- var Te = Ae[Math.floor(Ae.length / 2)], pe = Ae.filter(function(fe) {
24253
- return fe.distanceTo(Te) <= oe;
24252
+ var Te = Ae[Math.floor(Ae.length / 2)], pe = Ae.filter(function(ce) {
24253
+ return ce.distanceTo(Te) <= oe;
24254
24254
  })[0];
24255
24255
  if (pe) {
24256
24256
  var Se = new THREE.Vector4(me.x, me.y, me.z, pe.y - me.y), _e = this.adjustPanoCircleMeshPositionFix.get(ge);
@@ -24261,9 +24261,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24261
24261
  }
24262
24262
  }
24263
24263
  var Ee = /* @__PURE__ */ new Map();
24264
- if (K)
24265
- for (var he = 0, Ve = K.accessibleNodes; he < Ve.length; he++) {
24266
- var ne = Ve[he], H = K.work.observers[ne];
24264
+ if (X)
24265
+ for (var he = 0, Ve = X.accessibleNodes; he < Ve.length; he++) {
24266
+ var re = Ve[he], H = X.work.observers[re];
24267
24267
  if (H) {
24268
24268
  var ge = panoStringify({
24269
24269
  panoIndex: H.panoIndex,
@@ -24274,7 +24274,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24274
24274
  }
24275
24275
  if (se)
24276
24276
  for (var ye = 0, Be = se.accessibleNodes; ye < Be.length; ye++) {
24277
- var ne = Be[ye], H = se.work.observers[ne];
24277
+ var re = Be[ye], H = se.work.observers[re];
24278
24278
  if (H) {
24279
24279
  var ge = panoStringify({
24280
24280
  panoIndex: H.panoIndex,
@@ -24283,50 +24283,50 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24283
24283
  Ee.set(ge, H);
24284
24284
  }
24285
24285
  }
24286
- if (this.panoMeshes.forEach(function(fe, Me) {
24286
+ if (this.panoMeshes.forEach(function(ce, Me) {
24287
24287
  var Ce = Ee.get(Me);
24288
- Ce ? Ee.delete(Me) : (o.helper.remove(fe), fe.dispose(), o.panoMeshes.delete(Me));
24289
- }), Ee.forEach(function(fe, Me) {
24290
- var Ce = o.panoCircleMeshCreator(fe, {
24288
+ Ce ? Ee.delete(Me) : (o.helper.remove(ce), ce.dispose(), o.panoMeshes.delete(Me));
24289
+ }), Ee.forEach(function(ce, Me) {
24290
+ var Ce = o.panoCircleMeshCreator(ce, {
24291
24291
  aerialObserverMinHeight: o.aerialObserverMinHeight
24292
24292
  });
24293
24293
  o.panoMeshes.set(Me, Ce), o.helper.add(Ce), Ee.delete(Me);
24294
- }), this.panoMeshes.forEach(function(fe, Me) {
24294
+ }), this.panoMeshes.forEach(function(ce, Me) {
24295
24295
  var Ce = o.works.getObserver(Me);
24296
24296
  if (Ce) {
24297
24297
  var ke = Ce.position.distanceTo(Ce.standingPosition) > o.aerialObserverMinHeight;
24298
24298
  if (ke)
24299
- fe.position.copy(Ce.position).applyMatrix4(Ce.work.transform), fe.scale.setScalar(18);
24299
+ ce.position.copy(Ce.position).applyMatrix4(Ce.work.transform), ce.scale.setScalar(18);
24300
24300
  else {
24301
- fe.position.copy(Ce.standingPosition).applyMatrix4(Ce.work.transform);
24301
+ ce.position.copy(Ce.standingPosition).applyMatrix4(Ce.work.transform);
24302
24302
  var je = o.adjustPanoCircleMeshPositionFix.get(Ce.panoId);
24303
- je && (scratchVector3$3.set(je.x, je.y, je.z), scratchVector3$3.equals(fe.position) && (fe.position.y += je.w)), fe.scale.setScalar(1.2);
24303
+ je && (scratchVector3$3.set(je.x, je.y, je.z), scratchVector3$3.equals(ce.position) && (ce.position.y += je.w)), ce.scale.setScalar(1.2);
24304
24304
  }
24305
- var st = o.camera.position.clone().setY(fe.position.y), Qe = new THREE.Vector3().copy(fe.position).sub(st).normalize();
24305
+ var st = o.camera.position.clone().setY(ce.position.y), Qe = new THREE.Vector3().copy(ce.position).sub(st).normalize();
24306
24306
  if (Me === panoStringify(o.currentPano)) {
24307
- var Je = clamp$1((0.5 - st.distanceTo(fe.position)) / 0.5, 0, 1);
24307
+ var Je = clamp$1((0.5 - st.distanceTo(ce.position)) / 0.5, 0, 1);
24308
24308
  Qe.multiplyScalar(1 - Je).add(g.clone().multiplyScalar(Je));
24309
24309
  }
24310
24310
  if (Qe.length() > 0) {
24311
24311
  var ft = ke ? -Math.PI / 2 : 0, Ht = Math.atan2(Qe.x, Qe.z);
24312
- fe.quaternion.setFromEuler(new THREE.Euler(ft, Ht, 0, "YXZ"));
24312
+ ce.quaternion.setFromEuler(new THREE.Euler(ft, Ht, 0, "YXZ"));
24313
24313
  }
24314
24314
  } else
24315
- fe.visible = !1;
24315
+ ce.visible = !1;
24316
24316
  }), this.camera.pose.distance > 0.1 || M)
24317
- this.panoMeshes.forEach(function(fe) {
24318
- fe.setOpacity(0), fe.setCurrent(!1), fe.updateTime && fe.updateTime(e, r), fe.visible = !1;
24317
+ this.panoMeshes.forEach(function(ce) {
24318
+ ce.setOpacity(0), ce.setCurrent(!1), ce.updateTime && ce.updateTime(e, r), ce.visible = !1;
24319
24319
  });
24320
24320
  else if ($) {
24321
- var Ie = $.work.observers, $e = arrayMin($.accessibleNodes, function(fe) {
24322
- var Me = Ie[fe];
24321
+ var Ie = $.work.observers, $e = arrayMin($.accessibleNodes, function(ce) {
24322
+ var Me = Ie[ce];
24323
24323
  return Me ? $.standingPosition.distanceTo(Me.standingPosition) : 1 / 0;
24324
24324
  }, !0), Re = $e[1];
24325
24325
  Re = clamp$1(Re, 3, 1 / 0);
24326
- var ze = $.accessibleNodes.concat($.panoIndex).map(function(fe) {
24327
- return panoStringify({ panoIndex: fe, workCode: $.work.workCode });
24326
+ var ze = $.accessibleNodes.concat($.panoIndex).map(function(ce) {
24327
+ return panoStringify({ panoIndex: ce, workCode: $.work.workCode });
24328
24328
  });
24329
- this.panoMeshes.forEach(function(fe, Me) {
24329
+ this.panoMeshes.forEach(function(ce, Me) {
24330
24330
  var Ce = o.works.getObserver(Me), ke = !1, je = 1;
24331
24331
  if (ze.indexOf(Me) === -1)
24332
24332
  ke = !1, je = 0;
@@ -24335,19 +24335,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24335
24335
  else if (!Ce.loadable && !Ce.active)
24336
24336
  ke = !1, je = 0;
24337
24337
  else {
24338
- var st = fe.position.clone().project(o.camera), Qe = Math.abs(st.x) < 1 && Math.abs(st.y) < 1 && Math.abs(st.z) < 1;
24339
- ke = Qe && !fe.loading && fe.progress === 0 && ee !== null && panoStringify({ panoIndex: ee.panoIndex, workCode: ee.work.workCode }) === Me;
24340
- var Je = fe.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
24338
+ var st = ce.position.clone().project(o.camera), Qe = Math.abs(st.x) < 1 && Math.abs(st.y) < 1 && Math.abs(st.z) < 1;
24339
+ ke = Qe && !ce.loading && ce.progress === 0 && Z !== null && panoStringify({ panoIndex: Z.panoIndex, workCode: Z.work.workCode }) === Me;
24340
+ var Je = ce.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
24341
24341
  je = Je < 0.01 ? 0 : clamp$1(Re / Je, 0.1, 0.85);
24342
24342
  }
24343
24343
  if (Ce && Ce === se) {
24344
24344
  var ft = Ce.position.distanceTo(Ce.standingPosition) > o.aerialObserverMinHeight;
24345
24345
  if (ft) {
24346
- var Je = fe.position.distanceTo(o.camera.position);
24346
+ var Je = ce.position.distanceTo(o.camera.position);
24347
24347
  Je < 35 && (je = 0);
24348
24348
  }
24349
24349
  }
24350
- o.modelScene.parameter.resolveValue().modelAlpha > 0 && (je = 0), fe.setCurrent(ke), fe.setOpacity(je), fe.updateTime && fe.updateTime(e, r);
24350
+ o.modelScene.parameter.resolveValue().modelAlpha > 0 && (je = 0), ce.setCurrent(ke), ce.setOpacity(je), ce.updateTime && ce.updateTime(e, r);
24351
24351
  });
24352
24352
  }
24353
24353
  {
@@ -24668,11 +24668,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24668
24668
  var q = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
24669
24669
  q === 0 || q === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * q / z;
24670
24670
  }
24671
- var V = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? T : 0), Q = {
24671
+ var J = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? T : 0), V = {
24672
24672
  longitude: o.longitude,
24673
24673
  latitude: o.latitude,
24674
24674
  fov: o.fov
24675
- }, U = __assign(__assign({}, e), { mode: this.mode, longitude: (l = Q.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = Q.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = Q.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), j = this.currentPano;
24675
+ }, U = __assign(__assign({}, e), { mode: this.mode, longitude: (l = V.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = V.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = V.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), j = this.currentPano;
24676
24676
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
24677
24677
  options: o,
24678
24678
  prevPano: j,
@@ -24681,25 +24681,25 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24681
24681
  userAction: this.userAction,
24682
24682
  error: null
24683
24683
  })), o.moveStartCallback && o.moveStartCallback(U), 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" || r.effect === "model")
24684
- this.cameraMotion.set(Q, V).catch(noop);
24684
+ this.cameraMotion.set(V, J).catch(noop);
24685
24685
  else {
24686
24686
  var G = coordinatesToVector({
24687
24687
  longitude: this.cameraMotion.value.longitude,
24688
24688
  latitude: this.cameraMotion.value.latitude
24689
24689
  }), ie = coordinatesToVector({
24690
- longitude: (d = Q.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
24691
- latitude: (h = Q.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
24692
- }), re = new THREE.Object3D();
24693
- re.lookAt(G);
24694
- var $ = new THREE.Matrix4().makeRotationFromQuaternion(re.quaternion);
24695
- re.lookAt(ie);
24696
- var ee = new THREE.Matrix4().makeRotationFromQuaternion(re.quaternion), K = new THREE.Matrix4().getInverse($).premultiply(ee), se = this.cameraMotion.value.fov, W = (p = Q.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, X = 1;
24697
- r.effect === "zoomin" ? X = 1.5 : r.effect === "zoomout" && (X = 0.4);
24698
- for (var te = clamp$1(W * X, 1, 170), Z = 0; Z < S.length - 1; Z++) {
24699
- var ne = S[Z].key;
24700
- if (ne) {
24701
- var de = this.panoResources[ne];
24702
- de && (de.fixCameraTransform.copy(K), de.panoPicture && (de.panoPicture.zoom = Math.tan(te / 2 / 180 * Math.PI) / Math.tan(se / 2 / 180 * Math.PI)));
24690
+ longitude: (d = V.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
24691
+ latitude: (h = V.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
24692
+ }), ne = new THREE.Object3D();
24693
+ ne.lookAt(G);
24694
+ var $ = new THREE.Matrix4().makeRotationFromQuaternion(ne.quaternion);
24695
+ ne.lookAt(ie);
24696
+ var Z = new THREE.Matrix4().makeRotationFromQuaternion(ne.quaternion), X = new THREE.Matrix4().getInverse($).premultiply(Z), se = this.cameraMotion.value.fov, K = (p = V.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, W = 1;
24697
+ r.effect === "zoomin" ? W = 1.5 : r.effect === "zoomout" && (W = 0.4);
24698
+ for (var ee = clamp$1(K * W, 1, 170), te = 0; te < S.length - 1; te++) {
24699
+ var re = S[te].key;
24700
+ if (re) {
24701
+ var de = this.panoResources[re];
24702
+ de && (de.fixCameraTransform.copy(X), de.panoPicture && (de.panoPicture.zoom = Math.tan(ee / 2 / 180 * Math.PI) / Math.tan(se / 2 / 180 * Math.PI)));
24703
24703
  }
24704
24704
  }
24705
24705
  this.cameraMotion.setKeyframes([
@@ -24714,39 +24714,39 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24714
24714
  {
24715
24715
  progress: 0,
24716
24716
  value: {
24717
- longitude: (g = Q.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
24718
- latitude: (m = Q.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
24719
- fov: te
24717
+ longitude: (g = V.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
24718
+ latitude: (m = V.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
24719
+ fov: ee
24720
24720
  }
24721
24721
  },
24722
24722
  {
24723
24723
  progress: 1,
24724
24724
  value: {
24725
- longitude: (E = Q.longitude) !== null && E !== void 0 ? E : this.cameraMotion.value.longitude,
24726
- latitude: (y = Q.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
24727
- fov: W
24725
+ longitude: (E = V.longitude) !== null && E !== void 0 ? E : this.cameraMotion.value.longitude,
24726
+ latitude: (y = V.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
24727
+ fov: K
24728
24728
  }
24729
24729
  }
24730
- ], V).catch(noop);
24730
+ ], J).catch(noop);
24731
24731
  }
24732
- var ae = this.locationMotion.setKeyframes(S, V, R);
24732
+ var ae = this.locationMotion.setKeyframes(S, J, R);
24733
24733
  ae.then(
24734
24734
  // resolve
24735
24735
  // 动画结束
24736
24736
  function() {
24737
- for (var ue = 0, be = s.modelScene.children; ue < be.length; ue++) {
24738
- var oe = be[ue];
24737
+ for (var fe = 0, be = s.modelScene.children; fe < be.length; fe++) {
24738
+ var oe = be[fe];
24739
24739
  oe instanceof Model && oe.show();
24740
24740
  }
24741
- var le = __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 });
24741
+ var ue = __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 });
24742
24742
  s.emit("pano.arrived", createEvent("pano.arrived", {
24743
24743
  options: o,
24744
24744
  prevPano: j,
24745
24745
  progress: 1,
24746
- state: le,
24746
+ state: ue,
24747
24747
  userAction: s.userAction,
24748
24748
  error: null
24749
- })), o.moveEndCallback && o.moveEndCallback(le);
24749
+ })), o.moveEndCallback && o.moveEndCallback(ue);
24750
24750
  var me = s.works.getObserver(e);
24751
24751
  if (me && me.images.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
24752
24752
  var ge = {
@@ -24805,13 +24805,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24805
24805
  var z = m[q];
24806
24806
  if (!z)
24807
24807
  return !1;
24808
- var V = z.standingPosition.clone().applyMatrix4(z.work.transform).project(e);
24809
- return Math.abs(V.z) > 1 || Math.abs(V.x) > 1 || Math.abs(V.y) > 1 ? !1 : z.loadable || z.active;
24808
+ var J = z.standingPosition.clone().applyMatrix4(z.work.transform).project(e);
24809
+ return Math.abs(J.z) > 1 || Math.abs(J.x) > 1 || Math.abs(J.y) > 1 ? !1 : z.loadable || z.active;
24810
24810
  }), y = /* @__PURE__ */ new Map(), v = E.slice().sort(function(q, z) {
24811
- var V = m[q], Q = y.get(V);
24812
- typeof Q == "undefined" && (Q = scratchVector3$3.copy(V.standingPosition).applyMatrix4(V.work.transform).distanceTo(l), y.set(V, Q));
24811
+ var J = m[q], V = y.get(J);
24812
+ typeof V == "undefined" && (V = scratchVector3$3.copy(J.standingPosition).applyMatrix4(J.work.transform).distanceTo(l), y.set(J, V));
24813
24813
  var U = m[z], j = y.get(U);
24814
- return typeof j == "undefined" && (j = scratchVector3$3.copy(U.standingPosition).applyMatrix4(U.work.transform).distanceTo(l), y.set(U, j)), Q - j;
24814
+ return typeof j == "undefined" && (j = scratchVector3$3.copy(U.standingPosition).applyMatrix4(U.work.transform).distanceTo(l), y.set(U, j)), V - j;
24815
24815
  });
24816
24816
  y.clear();
24817
24817
  for (var A = 0, b = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; A < b.length; A++)
@@ -24836,13 +24836,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24836
24836
  var z = m[q];
24837
24837
  if (!z)
24838
24838
  return !1;
24839
- var V = z.position.clone().applyMatrix4(z.work.transform).project(e);
24840
- return Math.abs(V.z) > 1 || Math.abs(V.x) > 1 || Math.abs(V.y) > 1 ? !1 : z.loadable || z.active;
24839
+ var J = z.position.clone().applyMatrix4(z.work.transform).project(e);
24840
+ return Math.abs(J.z) > 1 || Math.abs(J.x) > 1 || Math.abs(J.y) > 1 ? !1 : z.loadable || z.active;
24841
24841
  }), L = /* @__PURE__ */ new Map(), O = H.slice().sort(function(q, z) {
24842
- var V = m[q], Q = L.get(V);
24843
- typeof Q == "undefined" && (Q = scratchVector3$3.copy(V.position).applyMatrix4(V.work.transform).distanceTo(e.position), L.set(V, Q));
24842
+ var J = m[q], V = L.get(J);
24843
+ typeof V == "undefined" && (V = scratchVector3$3.copy(J.position).applyMatrix4(J.work.transform).distanceTo(e.position), L.set(J, V));
24844
24844
  var U = m[z], j = L.get(U);
24845
- return typeof j == "undefined" && (j = scratchVector3$3.copy(U.position).applyMatrix4(U.work.transform).distanceTo(e.position), L.set(U, j)), Q - j;
24845
+ return typeof j == "undefined" && (j = scratchVector3$3.copy(U.position).applyMatrix4(U.work.transform).distanceTo(e.position), L.set(U, j)), V - j;
24846
24846
  });
24847
24847
  L.clear();
24848
24848
  for (var k = 0, D = O; k < D.length; k++) {
@@ -24911,27 +24911,27 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24911
24911
  var D = e.state.fov, q = 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);
24912
24912
  b.latitude = clamp$1(0, q, z);
24913
24913
  }
24914
- var V = __assign({}, e.state);
24915
- if (V.workCode = l.work.workCode, V.panoIndex = l.panoIndex, b.longitude !== void 0 && (V.longitude = b.longitude), b.latitude !== void 0 && (V.latitude = b.latitude), b.fov !== void 0 && (V.fov = b.fov), V.distance = 0, V.offset = l.position.clone(), e.state = V, this.emit("gesture.tap", e), !e.defaultPrevented) {
24914
+ var J = __assign({}, e.state);
24915
+ if (J.workCode = l.work.workCode, J.panoIndex = l.panoIndex, b.longitude !== void 0 && (J.longitude = b.longitude), b.latitude !== void 0 && (J.latitude = b.latitude), b.fov !== void 0 && (J.fov = b.fov), J.distance = 0, J.offset = l.position.clone(), e.state = J, this.emit("gesture.tap", e), !e.defaultPrevented) {
24916
24916
  if (this.emit("pano.select", createEvent("pano.select", {
24917
24917
  prevPano: this.currentPano,
24918
- state: V,
24918
+ state: J,
24919
24919
  userAction: e.userAction,
24920
24920
  options: b,
24921
24921
  progress: 0,
24922
24922
  error: null
24923
24923
  })), l && !l.active) {
24924
- var Q = panoStringify({
24924
+ var V = panoStringify({
24925
24925
  panoIndex: l.panoIndex,
24926
24926
  workCode: l.work.workCode
24927
- }), U = this.panoMeshes.get(Q);
24927
+ }), U = this.panoMeshes.get(V);
24928
24928
  U && (U.setDisabled(!1), U.setLoading(!0));
24929
24929
  }
24930
24930
  l && l.active && this.emit("pano.request", createEvent("pano.request", {
24931
24931
  userAction: e.userAction,
24932
24932
  prevPano: this.currentPano,
24933
24933
  progress: 0,
24934
- state: V,
24934
+ state: J,
24935
24935
  options: b,
24936
24936
  error: null
24937
24937
  }));
@@ -25864,8 +25864,8 @@ void main() {
25864
25864
  var D = k[O], q = D.key, z = D.progress;
25865
25865
  q !== void 0 && (H.push(q), z > this.locationMotion.progress && L.push(q));
25866
25866
  }
25867
- for (var V = 0, Q = Object.keys(this.panoResources); V < Q.length; V++) {
25868
- var U = Q[V];
25867
+ for (var J = 0, V = Object.keys(this.panoResources); J < V.length; J++) {
25868
+ var U = V[J];
25869
25869
  if (!(L.indexOf(U) >= 0)) {
25870
25870
  var j = this.panoResources[U];
25871
25871
  if (j.panoPicture) {
@@ -25889,42 +25889,42 @@ void main() {
25889
25889
  }));
25890
25890
  }
25891
25891
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset);
25892
- var ie = this.camera.pose.longitude, re = this.camera.pose.latitude;
25893
- this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (ie !== this.camera.pose.longitude || re !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop), this.emit("camera.update", createEvent("camera.update", {
25892
+ var ie = this.camera.pose.longitude, ne = this.camera.pose.latitude;
25893
+ this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (ie !== this.camera.pose.longitude || ne !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop), this.emit("camera.update", createEvent("camera.update", {
25894
25894
  userAction: !0,
25895
25895
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
25896
25896
  }))), this.works.getObserver(this.currentPano);
25897
- var $ = this.works.getObserver(A.panoId), ee = this.works.getObserver(b.panoId), K = /* @__PURE__ */ new Map();
25897
+ var $ = this.works.getObserver(A.panoId), Z = this.works.getObserver(b.panoId), X = /* @__PURE__ */ new Map();
25898
25898
  if ($)
25899
- for (var se = 0, W = $.accessibleNodes; se < W.length; se++) {
25900
- var X = W[se], C = $.work.observers[X];
25899
+ for (var se = 0, K = $.accessibleNodes; se < K.length; se++) {
25900
+ var W = K[se], C = $.work.observers[W];
25901
25901
  if (C) {
25902
- var te = panoStringify({
25902
+ var ee = panoStringify({
25903
25903
  panoIndex: C.panoIndex,
25904
25904
  workCode: C.work.workCode
25905
25905
  });
25906
- K.set(te, C);
25906
+ X.set(ee, C);
25907
25907
  }
25908
25908
  }
25909
- if (ee)
25910
- for (var Z = 0, ne = ee.accessibleNodes; Z < ne.length; Z++) {
25911
- var X = ne[Z], C = ee.work.observers[X];
25909
+ if (Z)
25910
+ for (var te = 0, re = Z.accessibleNodes; te < re.length; te++) {
25911
+ var W = re[te], C = Z.work.observers[W];
25912
25912
  if (C) {
25913
- var te = panoStringify({
25913
+ var ee = panoStringify({
25914
25914
  panoIndex: C.panoIndex,
25915
25915
  workCode: C.work.workCode
25916
25916
  });
25917
- K.set(te, C);
25917
+ X.set(ee, C);
25918
25918
  }
25919
25919
  }
25920
25920
  if (this.panoMeshes.forEach(function(Re, ze) {
25921
- var Fe = K.get(ze);
25922
- Fe ? (Re.position.copy(Fe.position).applyMatrix4(Fe.work.transform), K.delete(ze)) : (o.helper.remove(Re), Re.dispose(), o.panoMeshes.delete(ze));
25923
- }), K.forEach(function(Re, ze) {
25921
+ var Fe = X.get(ze);
25922
+ Fe ? (Re.position.copy(Fe.position).applyMatrix4(Fe.work.transform), X.delete(ze)) : (o.helper.remove(Re), Re.dispose(), o.panoMeshes.delete(ze));
25923
+ }), X.forEach(function(Re, ze) {
25924
25924
  var Fe = new PanoSphereMesh();
25925
25925
  Fe.position.copy(Re.position).applyMatrix4(Re.work.transform);
25926
25926
  var Oe = Re.position.distanceTo(Re.standingPosition) > o.aerialObserverMinHeight;
25927
- Oe ? Fe.scale.setScalar(15) : Fe.scale.setScalar(1), o.panoMeshes.set(ze, Fe), o.helper.add(Fe), K.delete(ze);
25927
+ Oe ? Fe.scale.setScalar(15) : Fe.scale.setScalar(1), o.panoMeshes.set(ze, Fe), o.helper.add(Fe), X.delete(ze);
25928
25928
  }), this.camera.pose.distance > 0.1 || R ? this.panoMeshes.forEach(function(Re, ze) {
25929
25929
  Re.setOpacity(0), Re.updateTime && Re.updateTime(e, r), Re.visible = !1;
25930
25930
  }) : this.panoMeshes.forEach(function(Re, ze) {
@@ -25944,10 +25944,10 @@ void main() {
25944
25944
  });
25945
25945
  }
25946
25946
  {
25947
- var M = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, ae = Math.round(M), ue = this.modelScene.parameter.pano0, be = this.modelScene.parameter.pano1, oe = ae === 0 ? ue : be, C = void 0;
25947
+ var M = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, ae = Math.round(M), fe = this.modelScene.parameter.pano0, be = this.modelScene.parameter.pano1, oe = ae === 0 ? fe : be, C = void 0;
25948
25948
  if (oe && (C = this.works.getObserver(oe.panoId), C || (C = this.panoPictureObserverMap.get(oe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = M < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !C || !oe || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
25949
25949
  this.tiling.setObserver(null);
25950
- var le = {
25950
+ var ue = {
25951
25951
  renderer: this.renderer,
25952
25952
  resolution: this.camera.resolution,
25953
25953
  pixelRatio: this.camera.pixelRatio,
@@ -25960,11 +25960,11 @@ void main() {
25960
25960
  minLevel: 0,
25961
25961
  level: 0
25962
25962
  };
25963
- this.tiling.update(le), this.modelScene.parameter.set("refinedScreen", null);
25963
+ this.tiling.update(ue), this.modelScene.parameter.set("refinedScreen", null);
25964
25964
  } else {
25965
25965
  var me = getImageSizeLevel(oe.mapSize), ge = me + 1, Ae = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Te = Math.floor(this.tileLevelForFov(this.camera.fov, Ae)), pe = Te > me ? Te : 0;
25966
25966
  this.tiling.setObserver(C);
25967
- var le = {
25967
+ var ue = {
25968
25968
  renderer: this.renderer,
25969
25969
  resolution: this.camera.resolution,
25970
25970
  pixelRatio: this.camera.pixelRatio,
@@ -25976,21 +25976,21 @@ void main() {
25976
25976
  panoZoom: oe.zoom,
25977
25977
  minLevel: ge,
25978
25978
  level: pe
25979
- }, Se = this.tiling.update(le), _e = {
25979
+ }, Se = this.tiling.update(ue), _e = {
25980
25980
  map: this.tiling.renderTarget.texture,
25981
25981
  matrixInverse: this.tiling.camera.matrixWorldInverse,
25982
25982
  projectionMatrix: this.tiling.camera.projectionMatrix,
25983
25983
  pano: ae,
25984
- opacity: (ue == null ? void 0 : ue.panoId) === (be == null ? void 0 : be.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25984
+ opacity: (fe == null ? void 0 : fe.panoId) === (be == null ? void 0 : be.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25985
25985
  }, Ee = this.modelScene.parameter.refinedScreen;
25986
25986
  (Se || _e.pano !== (Ee == null ? void 0 : Ee.pano) || _e.opacity !== (Ee == null ? void 0 : Ee.opacity)) && this.modelScene.parameter.set("refinedScreen", _e);
25987
25987
  }
25988
25988
  }
25989
25989
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
25990
25990
  {
25991
- var he = b.effect, Ve = this.modelScene.parameter, ue = Ve.pano0, be = Ve.pano1;
25992
- if (ue && be && ue !== be && (he === "fly" || he === "model") && this.flyEffectUseDepthBuffer) {
25993
- if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== ue.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== be.panoId) {
25991
+ var he = b.effect, Ve = this.modelScene.parameter, fe = Ve.pano0, be = Ve.pano1;
25992
+ if (fe && be && fe !== be && (he === "fly" || he === "model") && this.flyEffectUseDepthBuffer) {
25993
+ if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== fe.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== be.panoId) {
25994
25994
  var ye = 500, Be = 512;
25995
25995
  this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Be && this.pano0DepthCubeRenderTarget.setSize(Be, Be) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Be, {
25996
25996
  minFilter: THREE.NearestFilter,
@@ -26002,11 +26002,11 @@ void main() {
26002
26002
  generateMipmaps: !1
26003
26003
  });
26004
26004
  var Ie = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
26005
- Ie.matrix.copy(ue.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, ye);
26005
+ Ie.matrix.copy(fe.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, ye);
26006
26006
  var $e = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
26007
26007
  $e.matrix.copy(be.matrix), $e.matrixWorld.copy($e.matrix), $e.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, $e, ye), this.modelScene.parameter.set({
26008
26008
  pano0Depth: {
26009
- panoId: ue.panoId,
26009
+ panoId: fe.panoId,
26010
26010
  map: this.pano0DepthCubeRenderTarget.texture,
26011
26011
  mapSize: this.pano0DepthCubeRenderTarget.width,
26012
26012
  maxDepth: ye
@@ -26296,14 +26296,14 @@ void main() {
26296
26296
  longitude: r.longitude,
26297
26297
  latitude: r.latitude,
26298
26298
  fov: r.fov
26299
- }, I = [], C = function(Q) {
26300
- var U = H.modelScene.models.find(function(re) {
26301
- return re.work === Q;
26299
+ }, I = [], C = function(V) {
26300
+ var U = H.modelScene.models.find(function(ne) {
26301
+ return ne.work === V;
26302
26302
  });
26303
- if (!U || U.visible === !1 || Q.observers.length <= 0)
26303
+ if (!U || U.visible === !1 || V.observers.length <= 0)
26304
26304
  return "continue";
26305
- if (scratchObserverBox$1.copy(Q.observerBox).expandByScalar(10).applyMatrix4(Q.transform), scratchObserverBox$1.containsPoint(d))
26306
- for (var j = 0, G = Q.observers; j < G.length; j++) {
26305
+ if (scratchObserverBox$1.copy(V.observerBox).expandByScalar(10).applyMatrix4(V.transform), scratchObserverBox$1.containsPoint(d))
26306
+ for (var j = 0, G = V.observers; j < G.length; j++) {
26307
26307
  var ie = G[j];
26308
26308
  I.push(ie);
26309
26309
  }
@@ -26311,18 +26311,18 @@ void main() {
26311
26311
  var k = O[L];
26312
26312
  C(k);
26313
26313
  }
26314
- var D = arrayMin(I, function(Q) {
26315
- return scratchVector3$2.copy(Q.position).applyMatrix4(Q.work.transform).distanceTo(d);
26314
+ var D = arrayMin(I, function(V) {
26315
+ return scratchVector3$2.copy(V.position).applyMatrix4(V.work.transform).distanceTo(d);
26316
26316
  }), q = D ? {
26317
26317
  workCode: D.work.workCode,
26318
26318
  panoIndex: D.panoIndex
26319
26319
  } : {
26320
26320
  workCode: "",
26321
26321
  panoIndex: 0
26322
- }, z = __assign(__assign({}, q), { mode: this.mode, longitude: (u = _.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = _.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = _.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), V = this.currentPano;
26322
+ }, z = __assign(__assign({}, q), { mode: this.mode, longitude: (u = _.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = _.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = _.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), J = this.currentPano;
26323
26323
  this.emit("pano.moveTo", createEvent("pano.moveTo", {
26324
26324
  options: r,
26325
- prevPano: V,
26325
+ prevPano: J,
26326
26326
  progress: 0,
26327
26327
  state: z,
26328
26328
  userAction: this.userAction,
@@ -26331,14 +26331,14 @@ void main() {
26331
26331
  // resolve
26332
26332
  // 动画结束
26333
26333
  function() {
26334
- for (var Q = 0, U = s.modelScene.children; Q < U.length; Q++) {
26335
- var j = U[Q];
26334
+ for (var V = 0, U = s.modelScene.children; V < U.length; V++) {
26335
+ var j = U[V];
26336
26336
  j instanceof Model && j.show();
26337
26337
  }
26338
26338
  var G = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
26339
26339
  s.emit("pano.arrived", createEvent("pano.arrived", {
26340
26340
  options: r,
26341
- prevPano: V,
26341
+ prevPano: J,
26342
26342
  progress: 0,
26343
26343
  state: G,
26344
26344
  userAction: s.userAction,
@@ -26350,7 +26350,7 @@ void main() {
26350
26350
  function() {
26351
26351
  r.moveCancelCallback && r.moveCancelCallback(), s.emit("pano.cancel", createEvent("pano.cancel", {
26352
26352
  options: r,
26353
- prevPano: V,
26353
+ prevPano: J,
26354
26354
  progress: 0,
26355
26355
  state: z,
26356
26356
  userAction: s.userAction,
@@ -26759,10 +26759,10 @@ void main() {
26759
26759
  longitude: w.longitude,
26760
26760
  latitude: w.latitude
26761
26761
  }, 0).catch(noop), e.isFinal) {
26762
- var V = e.velocityX, Q = e.velocityY;
26762
+ var J = e.velocityX, V = e.velocityY;
26763
26763
  this.inMomentumMovement = {
26764
26764
  uuid: createUuid()
26765
- }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: V, y: Q })), { x: 0, y: 0, z: 0 }), 0);
26765
+ }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: J, y: V })), { x: 0, y: 0, z: 0 }), 0);
26766
26766
  }
26767
26767
  }
26768
26768
  }
@@ -27613,7 +27613,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
27613
27613
  }
27614
27614
  return Object.defineProperty(t, "version", {
27615
27615
  get: function() {
27616
- return "6.7.0-alpha.30";
27616
+ return "6.7.0-alpha.31";
27617
27617
  },
27618
27618
  enumerable: !1,
27619
27619
  configurable: !0
@@ -28248,38 +28248,38 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28248
28248
  var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), q = this.locationMotionKeyframesLength(T);
28249
28249
  S = this.locationMotion.getProgressVelocity(y) * D / q;
28250
28250
  }
28251
- var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? b : 0), V = {
28251
+ var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? b : 0), J = {
28252
28252
  longitude: o.longitude,
28253
28253
  latitude: o.latitude,
28254
28254
  fov: o.fov
28255
- }, Q = __assign(__assign({}, e), { mode: this.mode, longitude: (u = V.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = V.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = V.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), U = this.currentPano;
28255
+ }, V = __assign(__assign({}, e), { mode: this.mode, longitude: (u = J.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = J.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = J.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), U = this.currentPano;
28256
28256
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
28257
28257
  options: o,
28258
28258
  prevPano: U,
28259
28259
  progress: 0,
28260
- state: Q,
28260
+ state: V,
28261
28261
  userAction: this.userAction,
28262
28262
  error: null
28263
- })), 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" || r.effect === "model")
28264
- this.cameraMotion.set(V, z).catch(noop);
28263
+ })), o.moveStartCallback && o.moveStartCallback(V), 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" || r.effect === "model")
28264
+ this.cameraMotion.set(J, z).catch(noop);
28265
28265
  else {
28266
28266
  var j = coordinatesToVector({
28267
28267
  longitude: this.cameraMotion.value.longitude,
28268
28268
  latitude: this.cameraMotion.value.latitude
28269
28269
  }), G = coordinatesToVector({
28270
- longitude: (f = V.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
28271
- latitude: (d = V.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
28270
+ longitude: (f = J.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
28271
+ latitude: (d = J.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
28272
28272
  }), ie = new THREE.Object3D();
28273
28273
  ie.lookAt(j);
28274
- var re = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion);
28274
+ var ne = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion);
28275
28275
  ie.lookAt(G);
28276
- var $ = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion), ee = new THREE.Matrix4().getInverse(re).premultiply($), K = this.cameraMotion.value.fov, se = (h = V.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, W = 1;
28277
- r.effect === "zoomin" ? W = 1.5 : r.effect === "zoomout" && (W = 0.4);
28278
- for (var X = se * W, te = 0; te < T.length - 1; te++) {
28279
- var Z = T[te].key;
28280
- if (Z) {
28281
- var ne = this.panoResources[Z];
28282
- ne && (ne.fixCameraTransform.copy(ee), ne.leftPanoPicture && (ne.leftPanoPicture.zoom = Math.tan(X / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
28276
+ var $ = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion), Z = new THREE.Matrix4().getInverse(ne).premultiply($), X = this.cameraMotion.value.fov, se = (h = J.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, K = 1;
28277
+ r.effect === "zoomin" ? K = 1.5 : r.effect === "zoomout" && (K = 0.4);
28278
+ for (var W = se * K, ee = 0; ee < T.length - 1; ee++) {
28279
+ var te = T[ee].key;
28280
+ if (te) {
28281
+ var re = this.panoResources[te];
28282
+ re && (re.fixCameraTransform.copy(Z), re.leftPanoPicture && (re.leftPanoPicture.zoom = Math.tan(W / 2 / 180 * Math.PI) / Math.tan(X / 2 / 180 * Math.PI)));
28283
28283
  }
28284
28284
  }
28285
28285
  this.cameraMotion.setKeyframes([
@@ -28294,16 +28294,16 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28294
28294
  {
28295
28295
  progress: 0,
28296
28296
  value: {
28297
- longitude: (p = V.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
28298
- latitude: (g = V.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
28299
- fov: X
28297
+ longitude: (p = J.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
28298
+ latitude: (g = J.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
28299
+ fov: W
28300
28300
  }
28301
28301
  },
28302
28302
  {
28303
28303
  progress: 1,
28304
28304
  value: {
28305
- longitude: (m = V.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
28306
- latitude: (E = V.latitude) !== null && E !== void 0 ? E : this.cameraMotion.value.latitude,
28305
+ longitude: (m = J.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
28306
+ latitude: (E = J.latitude) !== null && E !== void 0 ? E : this.cameraMotion.value.latitude,
28307
28307
  fov: se
28308
28308
  }
28309
28309
  }
@@ -28314,8 +28314,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28314
28314
  // resolve
28315
28315
  // 动画结束
28316
28316
  function() {
28317
- for (var ae = 0, ue = s.modelScene.children; ae < ue.length; ae++) {
28318
- var be = ue[ae];
28317
+ for (var ae = 0, fe = s.modelScene.children; ae < fe.length; ae++) {
28318
+ var be = fe[ae];
28319
28319
  be instanceof Model && be.show();
28320
28320
  }
28321
28321
  var oe = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: 0 });
@@ -28327,21 +28327,21 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28327
28327
  userAction: s.userAction,
28328
28328
  error: null
28329
28329
  })), o.moveEndCallback && o.moveEndCallback(oe);
28330
- var le = s.works.getObserver(s.currentPano);
28331
- if (le && le.images.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
28330
+ var ue = s.works.getObserver(s.currentPano);
28331
+ if (ue && ue.images.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
28332
28332
  var me = {
28333
28333
  map: s.videoTexture,
28334
- size: le.images.video.size.clone(),
28335
- matrix: le.images.video.matrix.clone(),
28336
- panoMatrix: le.matrix.clone().premultiply(le.work.transform),
28334
+ size: ue.images.video.size.clone(),
28335
+ matrix: ue.images.video.matrix.clone(),
28336
+ panoMatrix: ue.matrix.clone().premultiply(ue.work.transform),
28337
28337
  alpha: 1
28338
28338
  }, ge = createUuid(), Ae = s.videoTexture.image;
28339
28339
  Ae.setAttribute("uuid", ge), canplayVideo().then(function(Te) {
28340
- Te && le.images.video && Ae.getAttribute("uuid") === ge && (Ae.oncanplay = function() {
28340
+ Te && ue.images.video && Ae.getAttribute("uuid") === ge && (Ae.oncanplay = function() {
28341
28341
  Ae.oncanplay = noop, Ae.play();
28342
28342
  }, Ae.ontimeupdate = function() {
28343
28343
  Ae.currentTime > 0.5 && (Ae.ontimeupdate = noop, s.panoVideo.setMaterial(me));
28344
- }, Ae.src = le.images.video.source);
28344
+ }, Ae.src = ue.images.video.source);
28345
28345
  }).catch((function() {
28346
28346
  Ae.removeAttribute("uuid");
28347
28347
  }));
@@ -28354,7 +28354,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28354
28354
  options: o,
28355
28355
  prevPano: U,
28356
28356
  progress: 0,
28357
- state: Q,
28357
+ state: V,
28358
28358
  userAction: s.userAction,
28359
28359
  error: null
28360
28360
  })), o.moveCancelCallback && o.moveCancelCallback();
@@ -28475,27 +28475,27 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28475
28475
  L.copy(O), C = !0;
28476
28476
  }
28477
28477
  v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(L.x + (O.x - L.x) * H, L.y + (O.y - L.y) * H, L.z + (O.z - L.z) * H);
28478
- for (var z = [], V = [], Q = 0, U = this.locationMotion.keyframes; Q < U.length; Q++) {
28479
- var j = U[Q], G = j.key, ie = j.progress;
28480
- G !== void 0 && (z.push(G), ie > this.locationMotion.progress && V.push(G));
28481
- }
28482
- for (var re = 0, $ = Object.keys(this.panoResources); re < $.length; re++) {
28483
- var ee = $[re];
28484
- if (!(V.indexOf(ee) >= 0)) {
28485
- var K = this.panoResources[ee];
28486
- if (K.leftPanoPicture) {
28487
- var se = K.leftPanoPicture.map;
28478
+ for (var z = [], J = [], V = 0, U = this.locationMotion.keyframes; V < U.length; V++) {
28479
+ var j = U[V], G = j.key, ie = j.progress;
28480
+ G !== void 0 && (z.push(G), ie > this.locationMotion.progress && J.push(G));
28481
+ }
28482
+ for (var ne = 0, $ = Object.keys(this.panoResources); ne < $.length; ne++) {
28483
+ var Z = $[ne];
28484
+ if (!(J.indexOf(Z) >= 0)) {
28485
+ var X = this.panoResources[Z];
28486
+ if (X.leftPanoPicture) {
28487
+ var se = X.leftPanoPicture.map;
28488
28488
  if (se) {
28489
28489
  if (se === ((s = y.pano0) === null || s === void 0 ? void 0 : s.map) || se === ((u = y.pano1) === null || u === void 0 ? void 0 : u.map))
28490
28490
  continue;
28491
- se.dispose(), K.leftPanoPicture = null;
28491
+ se.dispose(), X.leftPanoPicture = null;
28492
28492
  }
28493
28493
  }
28494
- z.indexOf(ee) >= 0 || delete this.panoResources[ee];
28494
+ z.indexOf(Z) >= 0 || delete this.panoResources[Z];
28495
28495
  }
28496
28496
  }
28497
- var W = panoParse(P.panoId);
28498
- W !== this.currentPano && (this.currentPano = W, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
28497
+ var K = panoParse(P.panoId);
28498
+ K !== this.currentPano && (this.currentPano = K, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
28499
28499
  userAction: this.userAction,
28500
28500
  prevPano: panoParse(_.panoId),
28501
28501
  state: __assign(__assign(__assign(__assign({}, panoParse(I.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), v),
@@ -28505,16 +28505,16 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28505
28505
  }));
28506
28506
  }
28507
28507
  this.camera.setFromPose(v), this.xrManager.cameraVR.projectionMatrix.copy(this.camera.projectionMatrix), this.xrManager.cameraVR.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.xrManager.cameraVR.matrix.copy(this.camera.matrix), this.xrManager.cameraVR.position.copy(this.camera.position), this.xrManager.cameraVR.quaternion.copy(this.camera.quaternion), this.xrManager.cameraVR.scale.copy(this.camera.scale), this.xrManager.cameraVR.matrixAutoUpdate = !1, this.xrManager.cameraVR.matrixWorld.copy(this.camera.matrixWorld);
28508
- var X = m, te = X[1], Z = new THREE.Vector3(0, 0, 0), ne = new THREE.Vector2().copy(this.camera.resolution);
28509
- if (te && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
28510
- for (var de = this.xrManager.cameraVR, ae = this.xrManager.referenceSpace, ue = this.xrManager.session.renderState.baseLayer, be = te.getViewerPose(ae), oe = (l = be == null ? void 0 : be.views) !== null && l !== void 0 ? l : [], le = 0; le < oe.length; le++) {
28511
- var me = oe[le], ge = de.cameras[le], Ae = ue.getViewport(me);
28512
- Ae && (ge.projectionMatrix.fromArray(me.projectionMatrix), ge.projectionMatrixInverse.getInverse(ge.projectionMatrix), ge.matrix.fromArray(me.transform.matrix), ge.matrix.setPosition(this.camera.position), ge.matrix.decompose(ge.position, ge.quaternion, ge.scale), ge.matrixWorld.copy(ge.matrix), ge.matrixWorldInverse.getInverse(ge.matrixWorld), ge.matrixAutoUpdate = !1, Z.copy(ge.position), ge.viewport.set(Ae.x, Ae.y, Ae.width, Ae.height), ne.set(Ae.width, Ae.height));
28508
+ var W = m, ee = W[1], te = new THREE.Vector3(0, 0, 0), re = new THREE.Vector2().copy(this.camera.resolution);
28509
+ if (ee && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
28510
+ for (var de = this.xrManager.cameraVR, ae = this.xrManager.referenceSpace, fe = this.xrManager.session.renderState.baseLayer, be = ee.getViewerPose(ae), oe = (l = be == null ? void 0 : be.views) !== null && l !== void 0 ? l : [], ue = 0; ue < oe.length; ue++) {
28511
+ var me = oe[ue], ge = de.cameras[ue], Ae = fe.getViewport(me);
28512
+ Ae && (ge.projectionMatrix.fromArray(me.projectionMatrix), ge.projectionMatrixInverse.getInverse(ge.projectionMatrix), ge.matrix.fromArray(me.transform.matrix), ge.matrix.setPosition(this.camera.position), ge.matrix.decompose(ge.position, ge.quaternion, ge.scale), ge.matrixWorld.copy(ge.matrix), ge.matrixWorldInverse.getInverse(ge.matrixWorld), ge.matrixAutoUpdate = !1, te.copy(ge.position), ge.viewport.set(Ae.x, Ae.y, Ae.width, Ae.height), re.set(Ae.width, Ae.height));
28513
28513
  }
28514
28514
  if (this.xrManager.setProjectionFromUnion(this.xrManager.cameraVR, this.xrManager.cameraL, this.xrManager.cameraR), this.camera.quaternion.copy(this.xrManager.cameraVR.quaternion), this.camera.scale.copy(this.xrManager.cameraVR.scale), this.camera.matrix.compose(this.camera.position, this.camera.quaternion, this.camera.scale), this.camera.computePose((c = v.distance) !== null && c !== void 0 ? c : this.camera.pose.distance), this.xrManager.session.inputSources) {
28515
- for (var le = 0; le < this.xrManager.session.inputSources.length; le++)
28516
- if (this.xrManager.session.inputSources[le] && this.xrManager.session.inputSources[le].targetRayMode === "transient-pointer") {
28517
- var Te = te.getPose(this.xrManager.session.inputSources[le].targetRaySpace, ae);
28515
+ for (var ue = 0; ue < this.xrManager.session.inputSources.length; ue++)
28516
+ if (this.xrManager.session.inputSources[ue] && this.xrManager.session.inputSources[ue].targetRayMode === "transient-pointer") {
28517
+ var Te = ee.getPose(this.xrManager.session.inputSources[ue].targetRaySpace, ae);
28518
28518
  if (Te) {
28519
28519
  var pe = Te.transform.orientation, Se = new THREE.Quaternion(pe.x, pe.y, pe.z, pe.w), _e = new THREE.Vector3(0, 0, -1).applyQuaternion(Se), Ee = new THREE.Raycaster(this.camera.position, _e);
28520
28520
  this.gazeRay = Ee;
@@ -28526,9 +28526,9 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28526
28526
  var Pe = ye.xrManager.controllers[ve], we = he[ve];
28527
28527
  if (!we)
28528
28528
  return "continue";
28529
- Pe && Pe.update(we, te, ae);
28530
- var qe = ye.xrManager.getController(ve), Ye = new THREE.Vector3(0, 1.2, 0), ut = qe.position.clone().add(Z).sub(Ye);
28531
- we.handedness === "left" ? ye.xrControllerRay.left.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)) : we.handedness === "right" && ye.xrControllerRay.right.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)), ye.controllerWrappers[ve].position.copy(new THREE.Vector3(0, 0, 0).add(Z).sub(Ye));
28529
+ Pe && Pe.update(we, ee, ae);
28530
+ var qe = ye.xrManager.getController(ve), Ye = new THREE.Vector3(0, 1.2, 0), ut = qe.position.clone().add(te).sub(Ye);
28531
+ we.handedness === "left" ? ye.xrControllerRay.left.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)) : we.handedness === "right" && ye.xrControllerRay.right.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)), ye.controllerWrappers[ve].position.copy(new THREE.Vector3(0, 0, 0).add(te).sub(Ye));
28532
28532
  var Ke = ye.modelScene.intersectRaycaster(ye.xrControllerRay.right);
28533
28533
  if (Ke.length === 0) {
28534
28534
  var ht = ye.works.getResolvedObserver(ye.currentPano);
@@ -28541,30 +28541,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28541
28541
  if (we.handedness === "right") {
28542
28542
  var Bt = ye.xrControllerRay.right.intersectObject(ye.xrCustomObjectsScene, !0), B = Ke[0].face.normal, F = B.clone(), N = Ke[0].point.clone();
28543
28543
  ye.intersectMesh.position.copy(N);
28544
- var J = N.clone().add(F);
28545
- if (ye.intersectMesh.lookAt(J), Math.abs(B.y) > 0.99) {
28544
+ var Q = N.clone().add(F);
28545
+ if (ye.intersectMesh.lookAt(Q), Math.abs(B.y) > 0.99) {
28546
28546
  var Y = ye.camera.position.clone().sub(N);
28547
28547
  ye.intersectMesh.rotation.z = -Math.atan2(Y.z, Y.x);
28548
28548
  }
28549
28549
  ye.intersectMesh.visible = !0, ye.needsRender = !0, Bt.length > 0 ? (ye.pointerLines.right.setPoints(ut, Bt[0].point), ye.pointerLines.right.points.visible = !0, ye.intersectMesh.visible = !1) : (ye.pointerLines.right.points.visible = !1, ye.pointerLines.right.setPoints(ut, Ke[0].point));
28550
- var ce = Ke[0], xe = createEvent("intersect.update", {
28550
+ var le = Ke[0], xe = createEvent("intersect.update", {
28551
28551
  raycaster: (f = ye.xrControllerRay.right) !== null && f !== void 0 ? f : null,
28552
- intersection: ce != null ? ce : null,
28552
+ intersection: le != null ? le : null,
28553
28553
  object: ye.intersectMesh
28554
28554
  });
28555
28555
  if (ye.emit("intersect.update", xe), xe.defaultPrevented)
28556
28556
  return ye.hideIntersectMesh(), { value: void 0 };
28557
28557
  } else
28558
28558
  ye.pointerLines.left.setPoints(ut, Ke[0].point);
28559
- }, ye = this, le = 0; le < he.length; le++) {
28560
- var Be = Ve(le);
28559
+ }, ye = this, ue = 0; ue < he.length; ue++) {
28560
+ var Be = Ve(ue);
28561
28561
  if (typeof Be == "object")
28562
28562
  return Be.value;
28563
28563
  }
28564
28564
  this.updateControllerHelper(he, e, r);
28565
28565
  }
28566
28566
  } else
28567
- te || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
28567
+ ee || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
28568
28568
  isEmptyObject(y) === !1 && this.modelScene.parameter.set(y), this.emit("camera.update", createEvent("camera.update", {
28569
28569
  userAction: this.userAction,
28570
28570
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
@@ -28622,8 +28622,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28622
28622
  }
28623
28623
  }
28624
28624
  if (ze)
28625
- for (var Xe = 0, fe = ze.accessibleNodes; Xe < fe.length; Xe++) {
28626
- var tt = fe[Xe], q = ze.work.observers[tt];
28625
+ for (var Xe = 0, ce = ze.accessibleNodes; Xe < ce.length; Xe++) {
28626
+ var tt = ce[Xe], q = ze.work.observers[tt];
28627
28627
  if (q) {
28628
28628
  var Ne = panoStringify({
28629
28629
  panoIndex: q.panoIndex,
@@ -28705,7 +28705,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28705
28705
  this.tiling.setObserver(null);
28706
28706
  var Ht = {
28707
28707
  renderer: this.renderer,
28708
- resolution: ne,
28708
+ resolution: re,
28709
28709
  pixelRatio: 1,
28710
28710
  time: this.camera.time,
28711
28711
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -28722,7 +28722,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
28722
28722
  this.tiling.setObserver(q);
28723
28723
  var Ht = {
28724
28724
  renderer: this.renderer,
28725
- resolution: ne,
28725
+ resolution: re,
28726
28726
  pixelRatio: 1,
28727
28727
  time: this.camera.time,
28728
28728
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -29335,7 +29335,7 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29335
29335
  }
29336
29336
  return Object.defineProperty(t, "version", {
29337
29337
  get: function() {
29338
- return "6.7.0-alpha.30";
29338
+ return "6.7.0-alpha.31";
29339
29339
  },
29340
29340
  enumerable: !1,
29341
29341
  configurable: !0
@@ -29516,175 +29516,175 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29516
29516
  u.throwError(c);
29517
29517
  }), l;
29518
29518
  }, t.prototype.load_ = function(e, r, o, s) {
29519
- var u = this, l, c, f, d, h, p, g, m, E, y, v;
29519
+ var u = this, l, c, f, d, h, p, g, m, E, y;
29520
29520
  s === void 0 && (s = !0);
29521
+ var v = {};
29522
+ typeof o == "number" ? v.duration = o : typeof o == "object" && Object.assign(v, o), this.works === emptyWorks && (v.duration === void 0 && (v.duration = 0), v.effect === void 0 && (v.effect = "instant"));
29521
29523
  var A = {};
29522
- typeof o == "number" ? A.duration = o : typeof o == "object" && Object.assign(A, o), this.works === emptyWorks && (A.duration === void 0 && (A.duration = 0), A.effect === void 0 && (A.effect = "instant"));
29523
- var b = {};
29524
- Object.assign(b, A.model), !b["3d-tiles"] && A["3d-tiles"] && (b["3d-tiles"] = A["3d-tiles"]), !b.textureOptions && A.textureOptions && (b.textureOptions = A.textureOptions), !b.textureOptions && this.textureOptions && (b.textureOptions = this.textureOptions);
29525
- var T = [];
29524
+ Object.assign(A, v.model), !A["3d-tiles"] && v["3d-tiles"] && (A["3d-tiles"] = v["3d-tiles"]), !A.textureOptions && v.textureOptions && (A.textureOptions = v.textureOptions), !A.textureOptions && this.textureOptions && (A.textureOptions = this.textureOptions);
29525
+ var b = [];
29526
29526
  if (Array.isArray(e))
29527
- for (var S = 0, R = e; S < R.length; S++) {
29528
- var M = R[S];
29529
- M instanceof Work ? T.push(M) : typeof M != "string" && "work" in M ? T.push(parseWork(M.work, M)) : T.push(parseWork(M));
29527
+ for (var T = 0, S = e; T < S.length; T++) {
29528
+ var R = S[T];
29529
+ R instanceof Work ? b.push(R) : typeof R != "string" && "work" in R ? b.push(parseWork(R.work, R)) : b.push(parseWork(R));
29530
29530
  }
29531
29531
  else
29532
- e instanceof Work ? T.push(e) : T.push(parseWork(e));
29533
- A.mode === "add" && (T = [].concat(this.works, T));
29534
- var w;
29532
+ e instanceof Work ? b.push(e) : b.push(parseWork(e));
29533
+ v.mode === "add" && (b = [].concat(this.works, b));
29534
+ var M;
29535
29535
  try {
29536
- w = createWorks(T);
29537
- } catch (K) {
29538
- return this.throwError(K), Promise.reject(K);
29536
+ M = createWorks(b);
29537
+ } catch (Z) {
29538
+ return this.throwError(Z), Promise.reject(Z);
29539
29539
  }
29540
- for (var P = 0, _ = w; P < _.length; P++) {
29541
- var I = _[P];
29542
- this.bindWorkFetcher(I);
29540
+ for (var w = 0, P = M; w < P.length; w++) {
29541
+ var _ = P[w];
29542
+ this.bindWorkFetcher(_);
29543
29543
  }
29544
29544
  r === void 0 && (r = "inherit"), r === "inherit" && this.works === emptyWorks && (r = "initial");
29545
- var C = this.currentMode, H = w.initial, L = H.work.observers[0], O = L ? {
29546
- workCode: L.work.workCode,
29547
- panoIndex: L.panoIndex
29548
- } : {
29545
+ var I = this.currentMode, C = M.initial, H = C.work.observers[0], L = H ? {
29549
29546
  workCode: H.work.workCode,
29547
+ panoIndex: H.panoIndex
29548
+ } : {
29549
+ workCode: C.work.workCode,
29550
29550
  panoIndex: 0
29551
- }, k = (l = H.mode) !== null && l !== void 0 ? l : L ? "Panorama" : "Mapview", D = {};
29551
+ }, O = (l = C.mode) !== null && l !== void 0 ? l : H ? "Panorama" : "Mapview", k = {};
29552
29552
  if (r === "inherit") {
29553
- var q = this.getCurrentState(), z = w.filter(function(K) {
29554
- return K.workCode === q.workCode;
29553
+ var D = this.getCurrentState(), q = M.filter(function(Z) {
29554
+ return Z.workCode === D.workCode;
29555
29555
  })[0];
29556
- if (z)
29557
- O = {
29558
- workCode: q.workCode,
29559
- panoIndex: q.panoIndex
29560
- }, k = q.mode, D = {
29561
- longitude: q.latitude,
29562
- latitude: q.latitude,
29563
- fov: q.fov,
29564
- distance: q.distance,
29565
- offset: q.offset.clone()
29556
+ if (q)
29557
+ L = {
29558
+ workCode: D.workCode,
29559
+ panoIndex: D.panoIndex
29560
+ }, O = D.mode, k = {
29561
+ longitude: D.latitude,
29562
+ latitude: D.latitude,
29563
+ fov: D.fov,
29564
+ distance: D.distance,
29565
+ offset: D.offset.clone()
29566
29566
  };
29567
29567
  else {
29568
29568
  r = {
29569
- mode: C
29569
+ mode: I
29570
29570
  };
29571
- var V = (f = (c = w[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
29572
- V ? (r.workCode = V.work.workCode, r.panoIndex = V.panoIndex) : typeof w.initial.panoIndex == "number" ? (r.workCode = w.initial.work.workCode, r.panoIndex = w.initial.panoIndex) : (r.mode === "Panorama" || r.mode === "VRPanorama" || r.mode === "XRPanorama") && (r.mode = "Mapview"), r.mode === C && (r.longitude = this.camera.pose.longitude, r.latitude = this.camera.pose.latitude, r.fov = this.camera.pose.fov);
29573
- }
29574
- }
29575
- if (r === "initial" && (typeof H.panoIndex == "number" && (O = {
29576
- workCode: H.work.workCode,
29577
- panoIndex: H.panoIndex
29578
- }), H.mode && (k = H.mode), D = {
29579
- longitude: H.longitude,
29580
- latitude: H.latitude,
29581
- fov: H.fov,
29582
- distance: H.distance,
29583
- offset: (d = H.offset) === null || d === void 0 ? void 0 : d.clone()
29571
+ var z = (f = (c = M[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
29572
+ z ? (r.workCode = z.work.workCode, r.panoIndex = z.panoIndex) : typeof M.initial.panoIndex == "number" ? (r.workCode = M.initial.work.workCode, r.panoIndex = M.initial.panoIndex) : (r.mode === "Panorama" || r.mode === "VRPanorama" || r.mode === "XRPanorama") && (r.mode = "Mapview"), r.mode === I && (r.longitude = this.camera.pose.longitude, r.latitude = this.camera.pose.latitude, r.fov = this.camera.pose.fov);
29573
+ }
29574
+ }
29575
+ if (r === "initial" && (typeof C.panoIndex == "number" && (L = {
29576
+ workCode: C.work.workCode,
29577
+ panoIndex: C.panoIndex
29578
+ }), C.mode && (O = C.mode), k = {
29579
+ longitude: C.longitude,
29580
+ latitude: C.latitude,
29581
+ fov: C.fov,
29582
+ distance: C.distance,
29583
+ offset: (d = C.offset) === null || d === void 0 ? void 0 : d.clone()
29584
29584
  }), typeof r == "object") {
29585
- if (k = (h = r.mode) !== null && h !== void 0 ? h : C, typeof r.panoIndex == "number") {
29586
- var V = w.getObserver({
29587
- workCode: (g = (p = r.workCode) !== null && p !== void 0 ? p : H.work.workCode) !== null && g !== void 0 ? g : "",
29585
+ if (O = (h = r.mode) !== null && h !== void 0 ? h : I, typeof r.panoIndex == "number") {
29586
+ var z = M.getObserver({
29587
+ workCode: (g = (p = r.workCode) !== null && p !== void 0 ? p : C.work.workCode) !== null && g !== void 0 ? g : "",
29588
29588
  panoIndex: r.panoIndex
29589
29589
  });
29590
- V && (O = {
29591
- workCode: V.work.workCode,
29592
- panoIndex: V.panoIndex
29590
+ z && (L = {
29591
+ workCode: z.work.workCode,
29592
+ panoIndex: z.panoIndex
29593
29593
  });
29594
29594
  }
29595
- D = {
29595
+ k = {
29596
29596
  longitude: r.longitude,
29597
29597
  latitude: r.latitude,
29598
29598
  fov: r.fov,
29599
29599
  distance: r.distance,
29600
- offset: (m = r.offset) === null || m === void 0 ? void 0 : m.clone()
29600
+ offset: r.offset ? new THREE.Vector3().copy(r.offset) : void 0
29601
29601
  };
29602
29602
  }
29603
- var Q = (E = A.duration) !== null && E !== void 0 ? E : this.modeChangeDuration;
29604
- (k === "Floorplan" || k === "Topview" || k === "Mapview") && C === k && (Q = 0);
29605
- var U = "fly";
29606
- (k === "Panorama" || k === "VRPanorama" || k === "XRPanorama") && C === k && (U = (y = A.effect) !== null && y !== void 0 ? y : "fade"), this.emit("works.request", createEvent("works.request", {
29603
+ var J = (m = v.duration) !== null && m !== void 0 ? m : this.modeChangeDuration;
29604
+ (O === "Floorplan" || O === "Topview" || O === "Mapview") && I === O && (J = 0);
29605
+ var V = "fly";
29606
+ (O === "Panorama" || O === "VRPanorama" || O === "XRPanorama") && I === O && (V = (E = v.effect) !== null && E !== void 0 ? E : "fade"), this.emit("works.request", createEvent("works.request", {
29607
29607
  input: e,
29608
- works: w,
29608
+ works: M,
29609
29609
  userAction: s
29610
29610
  }));
29611
- var j = function(K, se, W) {
29612
- var X = u.getCurrentState(), te = __assign(__assign({ mode: K }, se), W);
29613
- r === "inherit" && (te = u.getCurrentState()), u.pano = se;
29614
- var Z = __assign(__assign({ initial: {
29615
- state: te,
29616
- currentState: X,
29617
- duration: Q,
29618
- effect: U,
29611
+ var U = function(Z, X, se) {
29612
+ var K = u.getCurrentState(), W = __assign(__assign({ mode: Z }, X), se);
29613
+ r === "inherit" && (W = u.getCurrentState()), u.pano = X;
29614
+ var ee = __assign(__assign({ initial: {
29615
+ state: W,
29616
+ currentState: K,
29617
+ duration: J,
29618
+ effect: V,
29619
29619
  userAction: s
29620
- } }, u.commonParams()), u.controllerInits[K]), ne = Controllers[te.mode].initAnimationEndState(Z);
29621
- if (u.controller && C === K)
29622
- u.controller.updateWork(w, ne, { effect: U, duration: Q }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(K, Z));
29620
+ } }, u.commonParams()), u.controllerInits[Z]), te = Controllers[W.mode].initAnimationEndState(ee);
29621
+ if (u.controller && I === Z)
29622
+ u.controller.updateWork(M, te, { effect: V, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(Z, ee));
29623
29623
  else {
29624
29624
  if (u.controller)
29625
29625
  u.controller.destroy();
29626
29626
  else {
29627
- var de = Controllers[K].initAnimationEndState(Z);
29628
- u.camera.setFromPose(de), u.emit("camera.update", createEvent("camera.update", {
29627
+ var re = Controllers[Z].initAnimationEndState(ee);
29628
+ u.camera.setFromPose(re), u.emit("camera.update", createEvent("camera.update", {
29629
29629
  state: u.getCurrentState(),
29630
29630
  userAction: s
29631
29631
  }));
29632
29632
  }
29633
- u.controller = u.applyController(K, Z);
29634
- var ae = createEvent("mode.change", {
29635
- prevMode: C,
29636
- mode: K,
29637
- state: ne,
29633
+ u.controller = u.applyController(Z, ee);
29634
+ var de = createEvent("mode.change", {
29635
+ prevMode: I,
29636
+ mode: Z,
29637
+ state: te,
29638
29638
  userAction: s
29639
29639
  });
29640
29640
  try {
29641
- u.emit("mode.change", ae);
29642
- } catch (ue) {
29643
- console.error(ue);
29641
+ u.emit("mode.change", de);
29642
+ } catch (ae) {
29643
+ console.error(ae);
29644
29644
  }
29645
29645
  }
29646
29646
  u.updateTime.apply(u, __spreadArray([u.currentUpdateArgs.time, 0], u.currentUpdateArgs.args, !1));
29647
29647
  };
29648
- worksMap.set(this, w);
29649
- var G = Promise.resolve();
29650
- if (k === t.Mode.Floorplan || k === t.Mode.Topview || k === t.Mode.Mapview || k === t.Mode.Model) {
29651
- this.modelScene.loaded === !1 && (this.camera.setFromPose(D), assignPose(this.state, this.camera.pose));
29652
- var ie = this.modelScene.setModels(w, b);
29653
- G = Promise.all(ie.map(function(K) {
29654
- return K.loadedReady;
29648
+ worksMap.set(this, M);
29649
+ var j = Promise.resolve();
29650
+ if (O === t.Mode.Floorplan || O === t.Mode.Topview || O === t.Mode.Mapview || O === t.Mode.Model) {
29651
+ this.modelScene.loaded === !1 && (this.camera.setFromPose(k), assignPose(this.state, this.camera.pose));
29652
+ var G = this.modelScene.setModels(M, A);
29653
+ j = Promise.all(G.map(function(Z) {
29654
+ return Z.loadedReady;
29655
29655
  })).then(function() {
29656
- u.needsRender = !0, j(k, O, D), u.emit("camera.update", createEvent("camera.update", {
29656
+ u.needsRender = !0, U(O, L, k), u.emit("camera.update", createEvent("camera.update", {
29657
29657
  state: u.getCurrentState(),
29658
29658
  userAction: s
29659
29659
  }));
29660
29660
  });
29661
29661
  } else {
29662
- j(k, O, D);
29663
- var re = this.controller, $ = !1;
29662
+ U(O, L, k);
29663
+ var ie = this.controller, ne = !1;
29664
29664
  this.modelScene.autoRefine = !1;
29665
- var ee = function() {
29666
- u.works === w && $ === !1 && (u.needsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29665
+ var $ = function() {
29666
+ u.works === M && ne === !1 && (u.needsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29667
29667
  state: u.getCurrentState(),
29668
29668
  userAction: s
29669
- })), $ = !0, u.modelScene.autoRefine = !0), re.off("pano.arrived", ee), re.off("pano.cancel", ee);
29670
- }, ie = this.modelScene.setModels(w, b);
29671
- G = Promise.all(ie.map(function(se) {
29672
- return se.initReady;
29673
- })).then(noop), re.once("pano.arrived", ee), re.once("pano.cancel", ee), setTimeout(ee, ((v = A.duration) !== null && v !== void 0 ? v : this.modeChangeDuration) + 1e3);
29669
+ })), ne = !0, u.modelScene.autoRefine = !0), ie.off("pano.arrived", $), ie.off("pano.cancel", $);
29670
+ }, G = this.modelScene.setModels(M, A);
29671
+ j = Promise.all(G.map(function(X) {
29672
+ return X.initReady;
29673
+ })).then(noop), ie.once("pano.arrived", $), ie.once("pano.cancel", $), setTimeout($, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29674
29674
  }
29675
29675
  return this.emit("works.load", createEvent("works.load", {
29676
29676
  input: e,
29677
29677
  userAction: s,
29678
- works: w
29679
- })), G.then(function() {
29678
+ works: M
29679
+ })), j.then(function() {
29680
29680
  return u.ready();
29681
29681
  }).then(function() {
29682
- var K;
29682
+ var Z;
29683
29683
  u.emit("works.ready", createEvent("works.ready", {
29684
29684
  input: e,
29685
29685
  userAction: s,
29686
- works: w
29687
- })), (K = u.analysis) === null || K === void 0 || K.work(w);
29686
+ works: M
29687
+ })), (Z = u.analysis) === null || Z === void 0 || Z.work(M);
29688
29688
  });
29689
29689
  }, t.prototype.reset = function() {
29690
29690
  var e = this, r = this.loadWorkTask.then(function() {
@@ -29799,14 +29799,14 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
29799
29799
  this.renderer.autoClear = !0, this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0, this.renderer.autoClearStencil = !0, this.renderer.setScissorTest(!1);
29800
29800
  var k = this.scene.background;
29801
29801
  this.scene.background = this.camera.isOrthographicCamera ? null : k, this.renderer.render(this.scene, this.camera), this.scene.background = k, this.renderer.autoClear = P, this.renderer.autoClearColor = _, this.renderer.autoClearDepth = I, this.renderer.autoClearStencil = C, this.renderer.setClearColor(H, L), this.renderer.setScissorTest(O), this.helperVisible = R, M === void 0 ? this.modelScene.parameter.reset("modelAlpha") : this.modelScene.parameter.set("modelAlpha", M), this.renderer.setRenderTarget(h), this.camera.clearViewOffset(), this.camera.pixelRatio = d, this.camera.resolution.copy(p), this.camera.aspect = this.camera.resolution.width / this.camera.resolution.height, this.camera.updateTime(f), this.modelScene.update(this.renderer, this.camera), this.scene.update(this.renderer, this.camera);
29802
- var D = E * v, q = y * v, z = D * q, V = z * 4;
29802
+ var D = E * v, q = y * v, z = D * q, J = z * 4;
29803
29803
  if (S) {
29804
- if (S.length !== V)
29805
- throw new Error("buffer length is not equals pixels ".concat(V));
29804
+ if (S.length !== J)
29805
+ throw new Error("buffer length is not equals pixels ".concat(J));
29806
29806
  } else
29807
- S = new Uint8Array(V);
29807
+ S = new Uint8Array(J);
29808
29808
  if (this.renderer.readRenderTargetPixels(w, 0, 0, E * v, y * v, S), A)
29809
- for (var Q = z / 2, U = 0, j = 0, G = 0, ie = 0; j < Q; j++)
29809
+ for (var V = z / 2, U = 0, j = 0, G = 0, ie = 0; j < V; j++)
29810
29810
  for (ie = (q - Math.floor(j / D) - 1) * D + j % D, G = 0; G < 4; G++)
29811
29811
  U = S[j * 4 + G], S[j * 4 + G] = S[ie * 4 + G], S[ie * 4 + G] = U;
29812
29812
  return S;