@realsee/five 6.6.0-alpha.20 → 6.6.0-alpha.21

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
@@ -2,7 +2,7 @@
2
2
  * @license
3
3
  * @realsee/five
4
4
  * Generated: 9/23/2025
5
- * Version: 6.6.0-alpha.20
5
+ * Version: 6.6.0-alpha.21
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -757,10 +757,10 @@ CryptoJS.lib.Cipher || (function(n) {
757
757
  var I = w[C + 1];
758
758
  w[C + 1] = w[C + 3], w[C + 3] = I, this._doCryptBlock(w, C, this._invKeySchedule, c, f, d, h, r), I = w[C + 1], w[C + 1] = w[C + 3], w[C + 3] = I;
759
759
  },
760
- _doCryptBlock: function(w, C, I, H, M, B, F, L) {
761
- for (var O = this._nRounds, Q = w[C] ^ I[0], U = w[C + 1] ^ I[1], j = w[C + 2] ^ I[2], V = w[C + 3] ^ I[3], N = 4, D = 1; D < O; D++)
762
- var J = H[Q >>> 24] ^ M[U >>> 16 & 255] ^ B[j >>> 8 & 255] ^ F[V & 255] ^ I[N++], z = H[U >>> 24] ^ M[j >>> 16 & 255] ^ B[V >>> 8 & 255] ^ F[Q & 255] ^ I[N++], G = H[j >>> 24] ^ M[V >>> 16 & 255] ^ B[Q >>> 8 & 255] ^ F[U & 255] ^ I[N++], V = H[V >>> 24] ^ M[Q >>> 16 & 255] ^ B[U >>> 8 & 255] ^ F[j & 255] ^ I[N++], Q = J, U = z, j = G;
763
- J = (L[Q >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[j >>> 8 & 255] << 8 | L[V & 255]) ^ I[N++], z = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[V >>> 8 & 255] << 8 | L[Q & 255]) ^ I[N++], G = (L[j >>> 24] << 24 | L[V >>> 16 & 255] << 16 | L[Q >>> 8 & 255] << 8 | L[U & 255]) ^ I[N++], V = (L[V >>> 24] << 24 | L[Q >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[j & 255]) ^ I[N++], w[C] = J, w[C + 1] = z, w[C + 2] = G, w[C + 3] = V;
760
+ _doCryptBlock: function(w, C, I, H, M, B, O, L) {
761
+ for (var F = this._nRounds, V = w[C] ^ I[0], U = w[C + 1] ^ I[1], j = w[C + 2] ^ I[2], J = w[C + 3] ^ I[3], N = 4, D = 1; D < F; D++)
762
+ var Q = H[V >>> 24] ^ M[U >>> 16 & 255] ^ B[j >>> 8 & 255] ^ O[J & 255] ^ I[N++], z = H[U >>> 24] ^ M[j >>> 16 & 255] ^ B[J >>> 8 & 255] ^ O[V & 255] ^ I[N++], G = H[j >>> 24] ^ M[J >>> 16 & 255] ^ B[V >>> 8 & 255] ^ O[U & 255] ^ I[N++], J = H[J >>> 24] ^ M[V >>> 16 & 255] ^ B[U >>> 8 & 255] ^ O[j & 255] ^ I[N++], V = Q, U = z, j = G;
763
+ Q = (L[V >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[j >>> 8 & 255] << 8 | L[J & 255]) ^ I[N++], z = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[J >>> 8 & 255] << 8 | L[V & 255]) ^ I[N++], G = (L[j >>> 24] << 24 | L[J >>> 16 & 255] << 16 | L[V >>> 8 & 255] << 8 | L[U & 255]) ^ I[N++], J = (L[J >>> 24] << 24 | L[V >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[j & 255]) ^ I[N++], w[C] = Q, w[C + 1] = z, w[C + 2] = G, w[C + 3] = J;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -2070,15 +2070,15 @@ KEYUTIL.getKey = function(n, t, e) {
2070
2070
  if (n.indexOf("-END PRIVATE KEY-") != -1)
2071
2071
  return h.getKeyFromPlainPrivatePKCS8PEM(n);
2072
2072
  if (n.indexOf("-END RSA PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") != -1) {
2073
- var F = h.getDecryptedKeyHex(n, t), L = new RSAKey();
2074
- return L.readPKCS5PrvKeyHex(F), L;
2073
+ var O = h.getDecryptedKeyHex(n, t), L = new RSAKey();
2074
+ return L.readPKCS5PrvKeyHex(O), L;
2075
2075
  }
2076
2076
  if (n.indexOf("-END EC PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") != -1) {
2077
- var w = h.getDecryptedKeyHex(n, t), p = s(w, 0, [1], "04"), O = s(w, 0, [2, 0], "06"), N = s(w, 0, [3, 0], "03").substr(2), D = "";
2078
- if (KJUR.crypto.OID.oidhex2name[O] !== void 0)
2079
- D = KJUR.crypto.OID.oidhex2name[O];
2077
+ var w = h.getDecryptedKeyHex(n, t), p = s(w, 0, [1], "04"), F = s(w, 0, [2, 0], "06"), N = s(w, 0, [3, 0], "03").substr(2), D = "";
2078
+ if (KJUR.crypto.OID.oidhex2name[F] !== void 0)
2079
+ D = KJUR.crypto.OID.oidhex2name[F];
2080
2080
  else
2081
- throw "undefined OID(hex) in KJUR.crypto.OID: " + O;
2081
+ throw "undefined OID(hex) in KJUR.crypto.OID: " + F;
2082
2082
  var m = new l({
2083
2083
  curve: D
2084
2084
  });
@@ -3187,41 +3187,41 @@ function X509(n) {
3187
3187
  return E(T).replace(/\//, "\\/");
3188
3188
  }).join("/");
3189
3189
  }, this.getInfo = function() {
3190
- var v = function(J) {
3191
- var z = JSON.stringify(J.array).replace(/[\[\]\{\}\"]/g, "");
3190
+ var v = function(Q) {
3191
+ var z = JSON.stringify(Q.array).replace(/[\[\]\{\}\"]/g, "");
3192
3192
  return z;
3193
- }, E = function(J) {
3194
- for (var z = "", G = J.array, V = 0; V < G.length; V++) {
3195
- var Q = G[V];
3196
- if (z += " policy oid: " + Q.policyoid + `
3197
- `, Q.array !== void 0)
3198
- for (var U = 0; U < Q.array.length; U++) {
3199
- var j = Q.array[U];
3193
+ }, E = function(Q) {
3194
+ for (var z = "", G = Q.array, J = 0; J < G.length; J++) {
3195
+ var V = G[J];
3196
+ if (z += " policy oid: " + V.policyoid + `
3197
+ `, V.array !== void 0)
3198
+ for (var U = 0; U < V.array.length; U++) {
3199
+ var j = V.array[U];
3200
3200
  j.cps !== void 0 && (z += " cps: " + j.cps + `
3201
3201
  `);
3202
3202
  }
3203
3203
  }
3204
3204
  return z;
3205
- }, b = function(J) {
3206
- for (var z = "", G = J.array, V = 0; V < G.length; V++) {
3207
- var Q = G[V];
3205
+ }, b = function(Q) {
3206
+ for (var z = "", G = Q.array, J = 0; J < G.length; J++) {
3207
+ var V = G[J];
3208
3208
  try {
3209
- Q.dpname.full[0].uri !== void 0 && (z += " " + Q.dpname.full[0].uri + `
3209
+ V.dpname.full[0].uri !== void 0 && (z += " " + V.dpname.full[0].uri + `
3210
3210
  `);
3211
3211
  } catch (U) {
3212
3212
  }
3213
3213
  try {
3214
- Q.dname.full[0].dn.hex !== void 0 && (z += " " + X509.hex2dn(Q.dpname.full[0].dn.hex) + `
3214
+ V.dname.full[0].dn.hex !== void 0 && (z += " " + X509.hex2dn(V.dpname.full[0].dn.hex) + `
3215
3215
  `);
3216
3216
  } catch (U) {
3217
3217
  }
3218
3218
  }
3219
3219
  return z;
3220
- }, T = function(J) {
3221
- for (var z = "", G = J.array, V = 0; V < G.length; V++) {
3222
- var Q = G[V];
3223
- Q.caissuer !== void 0 && (z += " caissuer: " + Q.caissuer + `
3224
- `), Q.ocsp !== void 0 && (z += " ocsp: " + Q.ocsp + `
3220
+ }, T = function(Q) {
3221
+ for (var z = "", G = Q.array, J = 0; J < G.length; J++) {
3222
+ var V = G[J];
3223
+ V.caissuer !== void 0 && (z += " caissuer: " + V.caissuer + `
3224
+ `), V.ocsp !== void 0 && (z += " ocsp: " + V.ocsp + `
3225
3225
  `);
3226
3226
  }
3227
3227
  return z;
@@ -3257,16 +3257,16 @@ function X509(n) {
3257
3257
  S += " " + this.getExtSubjectKeyIdentifier().kid.hex + `
3258
3258
  `;
3259
3259
  else if (H === "authorityKeyIdentifier") {
3260
- var F = this.getExtAuthorityKeyIdentifier();
3261
- F.kid !== void 0 && (S += " kid=" + F.kid.hex + `
3260
+ var O = this.getExtAuthorityKeyIdentifier();
3261
+ O.kid !== void 0 && (S += " kid=" + O.kid.hex + `
3262
3262
  `);
3263
3263
  } else if (H === "extKeyUsage") {
3264
3264
  var L = this.getExtExtKeyUsage().array;
3265
3265
  S += " " + L.join(", ") + `
3266
3266
  `;
3267
3267
  } else if (H === "subjectAltName") {
3268
- var O = v(this.getExtSubjectAltName());
3269
- S += " " + O + `
3268
+ var F = v(this.getExtSubjectAltName());
3269
+ S += " " + F + `
3270
3270
  `;
3271
3271
  } else if (H === "cRLDistributionPoints") {
3272
3272
  var N = this.getExtCRLDistributionPoints();
@@ -3904,56 +3904,56 @@ var PBMCustomShader = (
3904
3904
  var M = H[I];
3905
3905
  M in uniformsLib$1 || delete l[M];
3906
3906
  }
3907
- for (var B = r.customShaders.filter(function(Q) {
3908
- return Q.type.includes(S);
3909
- }), F = 0, L = B; F < L.length; F++) {
3910
- var O = L[F];
3911
- for (var N in O.defines)
3912
- N in u || Object.assign(u, (b = {}, b[N] = O.defines[N], b));
3913
- for (var D in O.uniforms)
3914
- D in l || Object.assign(l, (T = {}, T[D] = O.uniforms[D], T));
3915
- }
3916
- v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, B.map(function(Q) {
3917
- return Q.vertex.mainBefore;
3918
- }).filter(function(Q) {
3919
- return !!Q;
3907
+ for (var B = r.customShaders.filter(function(V) {
3908
+ return V.type.includes(S);
3909
+ }), O = 0, L = B; O < L.length; O++) {
3910
+ var F = L[O];
3911
+ for (var N in F.defines)
3912
+ N in u || Object.assign(u, (b = {}, b[N] = F.defines[N], b));
3913
+ for (var D in F.uniforms)
3914
+ D in l || Object.assign(l, (T = {}, T[D] = F.uniforms[D], T));
3915
+ }
3916
+ v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, B.map(function(V) {
3917
+ return V.vertex.mainBefore;
3918
+ }).filter(function(V) {
3919
+ return !!V;
3920
3920
  }).join(`
3921
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, B.map(function(Q) {
3922
- return Q.vertex.mainStart;
3923
- }).filter(function(Q) {
3924
- return !!Q;
3921
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, B.map(function(V) {
3922
+ return V.vertex.mainStart;
3923
+ }).filter(function(V) {
3924
+ return !!V;
3925
3925
  }).join(`
3926
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, B.map(function(Q) {
3927
- return Q.vertex.mainEnd;
3928
- }).filter(function(Q) {
3929
- return !!Q;
3926
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, B.map(function(V) {
3927
+ return V.vertex.mainEnd;
3928
+ }).filter(function(V) {
3929
+ return !!V;
3930
3930
  }).join(`
3931
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, B.map(function(Q) {
3932
- return Q.fragment.mainBefore;
3933
- }).filter(function(Q) {
3934
- return !!Q;
3931
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, B.map(function(V) {
3932
+ return V.fragment.mainBefore;
3933
+ }).filter(function(V) {
3934
+ return !!V;
3935
3935
  }).join(`
3936
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, B.map(function(Q) {
3937
- return Q.fragment.mainStart;
3938
- }).filter(function(Q) {
3939
- return !!Q;
3936
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, B.map(function(V) {
3937
+ return V.fragment.mainStart;
3938
+ }).filter(function(V) {
3939
+ return !!V;
3940
3940
  }).join(`
3941
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, B.map(function(Q) {
3942
- return Q.fragment.mainEnd;
3943
- }).filter(function(Q) {
3944
- return !!Q;
3941
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, B.map(function(V) {
3942
+ return V.fragment.mainEnd;
3943
+ }).filter(function(V) {
3944
+ return !!V;
3945
3945
  }).join(`
3946
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, B.map(function(Q) {
3947
- return Q.fragment.mainModelColor;
3948
- }).filter(function(Q) {
3949
- return !!Q;
3946
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, B.map(function(V) {
3947
+ return V.fragment.mainModelColor;
3948
+ }).filter(function(V) {
3949
+ return !!V;
3950
3950
  }).join(`
3951
3951
  `));
3952
- var J = String(r.clippers.length);
3953
- v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, J), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, J);
3952
+ var Q = String(r.clippers.length);
3953
+ v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, Q), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, Q);
3954
3954
  for (var z = 0, G = B; z < G.length; z++) {
3955
- var V = G[z];
3956
- V.onBeforeCompile && V.onBeforeCompile(v, E);
3955
+ var J = G[z];
3956
+ J.onBeforeCompile && J.onBeforeCompile(v, E);
3957
3957
  }
3958
3958
  };
3959
3959
  var c = "";
@@ -4368,8 +4368,8 @@ var scratchViewport$1 = new THREE.Vector4(), pbmUniforms = {
4368
4368
  var E = v[y];
4369
4369
  E in uniformsLib || (s[E] = void 0);
4370
4370
  }
4371
- for (var b = r.customShaders.filter(function(F) {
4372
- return F.type.includes(p);
4371
+ for (var b = r.customShaders.filter(function(O) {
4372
+ return O.type.includes(p);
4373
4373
  }), T = 0, S = b; T < S.length; T++) {
4374
4374
  var R = S[T];
4375
4375
  for (var w in R.uniforms)
@@ -4377,40 +4377,40 @@ var scratchViewport$1 = new THREE.Vector4(), pbmUniforms = {
4377
4377
  for (var C in R.defines)
4378
4378
  C in o || Object.assign(o, (h = {}, h[C] = R.defines[C], h));
4379
4379
  }
4380
- toFastProperties(s), toFastProperties(o), c.vertexShader = c.vertexShader.replace(/MAIN_BEFORE/g, b.map(function(F) {
4381
- return F.vertex.mainBefore;
4382
- }).filter(function(F) {
4383
- return !!F;
4380
+ toFastProperties(s), toFastProperties(o), c.vertexShader = c.vertexShader.replace(/MAIN_BEFORE/g, b.map(function(O) {
4381
+ return O.vertex.mainBefore;
4382
+ }).filter(function(O) {
4383
+ return !!O;
4384
4384
  }).join(`
4385
- `)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g, b.map(function(F) {
4386
- return F.vertex.mainStart;
4387
- }).filter(function(F) {
4388
- return !!F;
4385
+ `)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g, b.map(function(O) {
4386
+ return O.vertex.mainStart;
4387
+ }).filter(function(O) {
4388
+ return !!O;
4389
4389
  }).join(`
4390
- `)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g, b.map(function(F) {
4391
- return F.vertex.mainEnd;
4392
- }).filter(function(F) {
4393
- return !!F;
4390
+ `)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g, b.map(function(O) {
4391
+ return O.vertex.mainEnd;
4392
+ }).filter(function(O) {
4393
+ return !!O;
4394
4394
  }).join(`
4395
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g, b.map(function(F) {
4396
- return F.fragment.mainBefore;
4397
- }).filter(function(F) {
4398
- return !!F;
4395
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g, b.map(function(O) {
4396
+ return O.fragment.mainBefore;
4397
+ }).filter(function(O) {
4398
+ return !!O;
4399
4399
  }).join(`
4400
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g, b.map(function(F) {
4401
- return F.fragment.mainStart;
4402
- }).filter(function(F) {
4403
- return !!F;
4400
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g, b.map(function(O) {
4401
+ return O.fragment.mainStart;
4402
+ }).filter(function(O) {
4403
+ return !!O;
4404
4404
  }).join(`
4405
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g, b.map(function(F) {
4406
- return F.fragment.mainEnd;
4407
- }).filter(function(F) {
4408
- return !!F;
4405
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g, b.map(function(O) {
4406
+ return O.fragment.mainEnd;
4407
+ }).filter(function(O) {
4408
+ return !!O;
4409
4409
  }).join(`
4410
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_MODEL_COLOR/g, b.map(function(F) {
4411
- return F.fragment.mainModelColor;
4412
- }).filter(function(F) {
4413
- return !!F;
4410
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_MODEL_COLOR/g, b.map(function(O) {
4411
+ return O.fragment.mainModelColor;
4412
+ }).filter(function(O) {
4413
+ return !!O;
4414
4414
  }).join(`
4415
4415
  `));
4416
4416
  var I = String(r.clippers.length);
@@ -5201,21 +5201,21 @@ function ajax(n, t, e, r, o) {
5201
5201
  var I, H, M = now(), B = M - s;
5202
5202
  if (delete h[d], A.parentNode && A.parentNode.removeChild(A), p !== null && (window.clearTimeout(p), p = null), m !== !0) {
5203
5203
  if (C.indexOf("data:") !== 0) {
5204
- var F = new NetworkResponseError(l, "XMLHttpRequest", 500);
5205
- r(F), f(F), (I = t.networkSubscribe) === null || I === void 0 || I.emit("network", l, "XMLHttpRequest", "error", F.message);
5204
+ var O = new NetworkResponseError(l, "XMLHttpRequest", 500);
5205
+ r(O), f(O), (I = t.networkSubscribe) === null || I === void 0 || I.emit("network", l, "XMLHttpRequest", "error", O.message);
5206
5206
  return;
5207
5207
  }
5208
- var L = C.split(","), O = (L[0].match(/:(.*?);/) || [])[1], N = L[1];
5208
+ var L = C.split(","), F = (L[0].match(/:(.*?);/) || [])[1], N = L[1];
5209
5209
  if (t.responseType === "arraybuffer" || t.responseType === "blob") {
5210
- for (var D = atob(L[1]), J = D.length, z = new Uint8Array(J), G = 0; G < J; G++)
5210
+ for (var D = atob(L[1]), Q = D.length, z = new Uint8Array(Q), G = 0; G < Q; G++)
5211
5211
  z[G] = D.charCodeAt(G);
5212
- t.responseType === "arraybuffer" ? N = z.buffer : N = new Blob([z], { type: O });
5212
+ t.responseType === "arraybuffer" ? N = z.buffer : N = new Blob([z], { type: F });
5213
5213
  }
5214
- var V = {}, Q = {
5214
+ var J = {}, V = {
5215
5215
  body: N,
5216
- meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: V }
5216
+ meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: J }
5217
5217
  };
5218
- e(Q), c(Q), (H = t.networkSubscribe) === null || H === void 0 || H.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(Q.meta)), m = !0;
5218
+ e(V), c(V), (H = t.networkSubscribe) === null || H === void 0 || H.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(V.meta)), m = !0;
5219
5219
  }
5220
5220
  };
5221
5221
  h[d] = y, A.src = l, document.body.appendChild(A), typeof t.timeout == "number" && (p = window.setTimeout(g, t.timeout));
@@ -5237,11 +5237,11 @@ function ajax(n, t, e, r, o) {
5237
5237
  var H = this.status;
5238
5238
  if (H === 0 || H >= 200 && H < 400) {
5239
5239
  v = !0, b();
5240
- var M = now(), B = M - s, F = parseHeaders(this.getAllResponseHeaders()), L = C.total, O = {
5240
+ var M = now(), B = M - s, O = parseHeaders(this.getAllResponseHeaders()), L = C.total, F = {
5241
5241
  body: this.response,
5242
- meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: F, size: L }
5242
+ meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: B, headers: O, size: L }
5243
5243
  };
5244
- e(O), c(O), (I = t.networkSubscribe) === null || I === void 0 || I.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(O.meta));
5244
+ e(F), c(F), (I = t.networkSubscribe) === null || I === void 0 || I.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(F.meta));
5245
5245
  } else
5246
5246
  w.call(this);
5247
5247
  }
@@ -6032,14 +6032,14 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
6032
6032
  t[FACE_ORDER$2[4]],
6033
6033
  t[FACE_ORDER$2[5]]
6034
6034
  ], y = [], v = [0, 0, 0, 0, 0, 0], E = [], b = function(S) {
6035
- var R = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, w = applyImageURLOptions(g[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$2[S] })), C = function(F) {
6036
- v[S] = F, s(v.reduce(function(L, O) {
6037
- return L + O;
6035
+ var R = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, w = applyImageURLOptions(g[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$2[S] })), C = function(O) {
6036
+ v[S] = O, s(v.reduce(function(L, F) {
6037
+ return L + F;
6038
6038
  }, 0) / 6);
6039
6039
  }, I = (m = e.viaAjax) !== null && m !== void 0 ? m : !1;
6040
6040
  if (I) {
6041
- var H = "blob", M = e.fetcher.ajax(w, { timeout: e.timeout, responseType: H }, void 0, void 0, C).then(function(F) {
6042
- return E[S] = F.meta, createImageBitmapLike(F.body);
6041
+ var H = "blob", M = e.fetcher.ajax(w, { timeout: e.timeout, responseType: H }, void 0, void 0, C).then(function(O) {
6042
+ return E[S] = O.meta, createImageBitmapLike(O.body);
6043
6043
  });
6044
6044
  y.push(M);
6045
6045
  } else {
@@ -7439,8 +7439,8 @@ function parsePBMModel(n) {
7439
7439
  break;
7440
7440
  }
7441
7441
  }
7442
- for (var A = n.chunks.sort(function(pe, le) {
7443
- return chunkOrder(pe) - chunkOrder(le);
7442
+ for (var A = n.chunks.sort(function(ce, ae) {
7443
+ return chunkOrder(ce) - chunkOrder(ae);
7444
7444
  }), g = [], y = 0, v = A; y < v.length; y++) {
7445
7445
  var h = v[y], E = parseFloorName(h.name);
7446
7446
  g[E] || (g[E] = []), g[E].push(h);
@@ -7453,23 +7453,23 @@ function parsePBMModel(n) {
7453
7453
  var h = T[R];
7454
7454
  S += h.faces.indices.length;
7455
7455
  }
7456
- for (var w = new Float32Array(S * 3), C = new Float32Array(S * 2), I = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], F = 0, L = 0; L < T.length; L++) {
7457
- for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], N = h.vertices.xyz, D = h.vertices.uvs, J = h.faces.indices, z = h.faces.normals, G = h.vertices.marks, V = J.length, R = 0; R < V; R++) {
7458
- var Q = J[R], U = w[F * 3 + R * 3] = N[Q * 3], j = w[F * 3 + R * 3 + 1] = N[Q * 3 + 1], Y = w[F * 3 + R * 3 + 2] = N[Q * 3 + 2];
7459
- H && (H[F + R] = G[Q]), C[F * 2 + R * 2] = D[Q * 2], C[F * 2 + R * 2 + 1] = D[Q * 2 + 1];
7460
- var Z = Math.floor(R / 3) * 3;
7461
- I[F * 3 + R * 3] = z[Z], I[F * 3 + R * 3 + 1] = z[Z + 1], I[F * 3 + R * 3 + 2] = z[Z + 2], U < O[0] && (O[0] = U), j < O[1] && (O[1] = j), Y < O[2] && (O[2] = Y), U > O[3] && (O[3] = U), j > O[4] && (O[4] = j), Y > O[5] && (O[5] = Y);
7456
+ for (var w = new Float32Array(S * 3), C = new Float32Array(S * 2), I = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], O = 0, L = 0; L < T.length; L++) {
7457
+ for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], N = h.vertices.xyz, D = h.vertices.uvs, Q = h.faces.indices, z = h.faces.normals, G = h.vertices.marks, J = Q.length, R = 0; R < J; R++) {
7458
+ var V = Q[R], U = w[O * 3 + R * 3] = N[V * 3], j = w[O * 3 + R * 3 + 1] = N[V * 3 + 1], X = w[O * 3 + R * 3 + 2] = N[V * 3 + 2];
7459
+ H && (H[O + R] = G[V]), C[O * 2 + R * 2] = D[V * 2], C[O * 2 + R * 2 + 1] = D[V * 2 + 1];
7460
+ var Y = Math.floor(R / 3) * 3;
7461
+ I[O * 3 + R * 3] = z[Y], I[O * 3 + R * 3 + 1] = z[Y + 1], I[O * 3 + R * 3 + 2] = z[Y + 2], U < F[0] && (F[0] = U), j < F[1] && (F[1] = j), X < F[2] && (F[2] = X), U > F[3] && (F[3] = U), j > F[4] && (F[4] = j), X > F[5] && (F[5] = X);
7462
7462
  }
7463
- O[0] < B[0] && (B[0] = O[0]), O[1] < B[1] && (B[1] = O[1]), O[2] < B[2] && (B[2] = O[2]), O[3] > B[3] && (B[3] = O[3]), O[4] > B[4] && (B[4] = O[4]), O[5] > B[5] && (B[5] = O[5]), M.push({
7463
+ F[0] < B[0] && (B[0] = F[0]), F[1] < B[1] && (B[1] = F[1]), F[2] < B[2] && (B[2] = F[2]), F[3] > B[3] && (B[3] = F[3]), F[4] > B[4] && (B[4] = F[4]), F[5] > B[5] && (B[5] = F[5]), M.push({
7464
7464
  materialIndex: L,
7465
7465
  name: h.name,
7466
7466
  chunkName: parseChunkName(h.name),
7467
- start: F,
7467
+ start: O,
7468
7468
  count: h.faces.indices.length,
7469
7469
  texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
7470
- }), F += V;
7470
+ }), O += J;
7471
7471
  }
7472
- var X = {
7472
+ var W = {
7473
7473
  createAt: o,
7474
7474
  description: s,
7475
7475
  vertices: w,
@@ -7481,20 +7481,20 @@ function parsePBMModel(n) {
7481
7481
  groups: M,
7482
7482
  extents: B
7483
7483
  };
7484
- u.push(X);
7484
+ u.push(W);
7485
7485
  } else {
7486
- for (var S = 0, W = 0, R = 0; R < T.length; R++) {
7486
+ for (var S = 0, Z = 0, R = 0; R < T.length; R++) {
7487
7487
  var h = T[R];
7488
- W += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7488
+ Z += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7489
7489
  }
7490
- for (var w = new Float32Array(W * 3), C = new Float32Array(W * 2), I = void 0, K = new Float32Array(W), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, F = 0, L = 0; L < T.length; L++) {
7491
- for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs, J = h.faces.indices, ae = N.length / 3, V = J.length, R = 0; R < ae; R++) {
7492
- var U = w[F * 3 + R * 3] = N[R * 3], j = w[F * 3 + R * 3 + 1] = N[R * 3 + 1], Y = w[F * 3 + R * 3 + 2] = N[R * 3 + 2];
7493
- H && (H[F + R] = re[R]), C[F * 2 + R * 2] = D[R * 2], C[F * 2 + R * 2 + 1] = D[R * 2 + 1], K[F + R] = b, U < O[0] && (O[0] = U), j < O[1] && (O[1] = j), Y < O[2] && (O[2] = Y), U > O[3] && (O[3] = U), j > O[4] && (O[4] = j), Y > O[5] && (O[5] = Y);
7490
+ for (var w = new Float32Array(Z * 3), C = new Float32Array(Z * 2), I = void 0, K = new Float32Array(Z), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, O = 0, L = 0; L < T.length; L++) {
7491
+ for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs, Q = h.faces.indices, ie = N.length / 3, J = Q.length, R = 0; R < ie; R++) {
7492
+ var U = w[O * 3 + R * 3] = N[R * 3], j = w[O * 3 + R * 3 + 1] = N[R * 3 + 1], X = w[O * 3 + R * 3 + 2] = N[R * 3 + 2];
7493
+ H && (H[O + R] = re[R]), C[O * 2 + R * 2] = D[R * 2], C[O * 2 + R * 2 + 1] = D[R * 2 + 1], K[O + R] = b, U < F[0] && (F[0] = U), j < F[1] && (F[1] = j), X < F[2] && (F[2] = X), U > F[3] && (F[3] = U), j > F[4] && (F[4] = j), X > F[5] && (F[5] = X);
7494
7494
  }
7495
- O[0] < B[0] && (B[0] = O[0]), O[1] < B[1] && (B[1] = O[1]), O[2] < B[2] && (B[2] = O[2]), O[3] > B[3] && (B[3] = O[3]), O[4] > B[4] && (B[4] = O[4]), O[5] > B[5] && (B[5] = O[5]);
7496
- for (var R = 0; R < V; R++)
7497
- ee[te + R] = F + J[R];
7495
+ F[0] < B[0] && (B[0] = F[0]), F[1] < B[1] && (B[1] = F[1]), F[2] < B[2] && (B[2] = F[2]), F[3] > B[3] && (B[3] = F[3]), F[4] > B[4] && (B[4] = F[4]), F[5] > B[5] && (B[5] = F[5]);
7496
+ for (var R = 0; R < J; R++)
7497
+ ee[te + R] = O + Q[R];
7498
7498
  M.push({
7499
7499
  materialIndex: L,
7500
7500
  name: h.name,
@@ -7502,9 +7502,9 @@ function parsePBMModel(n) {
7502
7502
  start: te,
7503
7503
  count: h.faces.indices.length,
7504
7504
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7505
- }), F += ae, te += V;
7505
+ }), O += ie, te += J;
7506
7506
  }
7507
- var X = {
7507
+ var W = {
7508
7508
  createAt: o,
7509
7509
  description: s,
7510
7510
  vertices: w,
@@ -7516,7 +7516,7 @@ function parsePBMModel(n) {
7516
7516
  groups: M,
7517
7517
  extents: B
7518
7518
  };
7519
- u.push(X);
7519
+ u.push(W);
7520
7520
  }
7521
7521
  }
7522
7522
  return u;
@@ -7545,50 +7545,64 @@ function parse$4(n, t, e, r, o, s, u) {
7545
7545
  M.min.x = H[0], M.min.y = H[1], M.min.z = H[2], M.max.x = H[3], M.max.y = H[4], M.max.z = H[5];
7546
7546
  var B = new THREE.BufferGeometry();
7547
7547
  B.setAttribute("position", new THREE.BufferAttribute(b, 3)), B.setAttribute("uv", new THREE.BufferAttribute(S, 2)), R && B.setAttribute("normal", new THREE.BufferAttribute(R, 3)), T && B.setAttribute("_feature_id_rsmask", new THREE.BufferAttribute(T, 1)), w && B.setIndex(new THREE.BufferAttribute(w, 1)), B.boundingBox = M, B.boundingSphere = M.getBoundingSphere(new THREE.Sphere());
7548
- for (var F = 0, L = I; F < L.length; F++) {
7549
- var O = L[F];
7550
- B.addGroup(O.start, O.count, O.materialIndex);
7548
+ for (var O = 0, L = I; O < L.length; O++) {
7549
+ var F = L[O];
7550
+ B.addGroup(F.start, F.count, F.materialIndex);
7551
7551
  }
7552
7552
  p.add(B);
7553
- for (var N = [], D = 0, J = I; D < J.length; D++) {
7554
- var O = J[D], z = O.texture ? pathJoin(e || "", O.texture) : void 0, G = new PBMMeshMaterial(t ? "phong" : "basic");
7555
- G.floorIndex = C, B.attributes.normal === void 0 && (G.flatShading = !0), B.attributes._feature_id_rsmask && (G.defines.USE_VERTEX_MARK = !0), N.push(G), z ? (m++, h[z] ? h[z].push(G) : h[z] = [G]) : G.color = new THREE.Color(16777215), p.add(G);
7553
+ for (var N = [], D = 0, Q = I; D < Q.length; D++) {
7554
+ var F = Q[D], z = void 0;
7555
+ if (F.texture) {
7556
+ if (z = F.texture, r.length > 0 && r.indexOf(F.texture) === -1) {
7557
+ for (var G = F.texture, J = 0, V = r; J < V.length; J++) {
7558
+ var U = V[J], j = pathJoin(e, U), X = j.slice(G.length * -1) === G;
7559
+ if (X) {
7560
+ z = U;
7561
+ break;
7562
+ }
7563
+ }
7564
+ console.warn("At3d/Pbm textures is not matched. use ends-with guess mode. texture: ".concat(G, " -> ").concat(z));
7565
+ }
7566
+ z = pathJoin(e, z);
7567
+ }
7568
+ var Y = new PBMMeshMaterial(t ? "phong" : "basic");
7569
+ Y.floorIndex = C, B.attributes.normal === void 0 && (Y.flatShading = !0), B.attributes._feature_id_rsmask && (Y.defines.USE_VERTEX_MARK = !0), N.push(Y), z ? (m++, h[z] ? h[z].push(Y) : h[z] = [Y]) : Y.color = new THREE.Color(16777215), p.add(Y);
7556
7570
  }
7557
- var V = new PBMMesh(B, N);
7558
- V.name = "model_floor_" + C, V.userData.createAt = v, V.userData.description = E, V.matrix.compose(V.position, V.quaternion, V.scale), V.matrixAutoUpdate = !1, V.frustumCulled = !1, c = v, f = E, d.push(V);
7571
+ var W = new PBMMesh(B, N);
7572
+ W.name = "model_floor_" + C, W.userData.createAt = v, W.userData.description = E, W.matrix.compose(W.position, W.quaternion, W.scale), W.matrixAutoUpdate = !1, W.frustumCulled = !1, c = v, f = E, d.push(W);
7559
7573
  }
7560
7574
  o = autoRestImageOptionsByTextureLength(o, m);
7561
- for (var Q = [], U = function(X) {
7562
- var W = void 0;
7563
- s && (W = s.get(X)), W || (W = loadTexture$1(X, e, o, u), s && s.set(X, W)), Q.push(W.then(function(K) {
7564
- for (var ee = 0, te = h[X]; ee < te.length; ee++) {
7565
- var re = te[ee];
7566
- re.map && (p.delete(re.map), re.map.dispose()), re.map = K, p.add(K);
7567
- }
7568
- return K;
7575
+ for (var Z = [], K = function(re) {
7576
+ var ie = void 0;
7577
+ s && (ie = s.get(re)), ie || (ie = loadTexture$1(re, e, o, u), s && s.set(re, ie)), Z.push(ie.then(function(ce) {
7578
+ for (var ae = 0, de = h[re]; ae < de.length; ae++) {
7579
+ var ge = de[ae];
7580
+ ge.map && (p.delete(ge.map), ge.map.dispose()), ge.map = ce, p.add(ce);
7581
+ }
7582
+ return ce;
7569
7583
  }).catch(function() {
7570
- for (var K = 0, ee = h[X]; K < ee.length; K++) {
7571
- var te = ee[K];
7572
- te.map && (p.delete(te.map), te.map.dispose()), te.map = null, te.color = new THREE.Color(16777215);
7584
+ for (var ce = 0, ae = h[re]; ce < ae.length; ce++) {
7585
+ var de = ae[ce];
7586
+ de.map && (p.delete(de.map), de.map.dispose()), de.map = null, de.color = new THREE.Color(16777215);
7573
7587
  }
7574
7588
  return null;
7575
7589
  }));
7576
- }, j = 0, Y = Object.keys(h); j < Y.length; j++) {
7577
- var Z = Y[j];
7578
- U(Z);
7590
+ }, ee = 0, te = Object.keys(h); ee < te.length; ee++) {
7591
+ var G = te[ee];
7592
+ K(G);
7579
7593
  }
7580
- return Promise.all(Q).then(function(X) {
7581
- var W = X.filter(function(K) {
7582
- return K instanceof THREE.Texture;
7594
+ return Promise.all(Z).then(function(re) {
7595
+ var ie = re.filter(function(ce) {
7596
+ return ce instanceof THREE.Texture;
7583
7597
  });
7584
7598
  return {
7585
7599
  createAt: c,
7586
7600
  description: f,
7587
7601
  objects: d,
7588
- textures: W,
7602
+ textures: ie,
7589
7603
  dispose: function() {
7590
- p.forEach(function(K) {
7591
- K.dispose();
7604
+ p.forEach(function(ce) {
7605
+ ce.dispose();
7592
7606
  }), p.clear();
7593
7607
  }
7594
7608
  };
@@ -8552,9 +8566,9 @@ function parse$3(n, t, e, r, o) {
8552
8566
  for (var I = new THREE.Group(), H = 0; H < T.length; H++) {
8553
8567
  var M = parseGeometry(T[H].geometry);
8554
8568
  M.applyMatrix4(d), d.decompose(h, p, m), m.x * m.y * m.z < 0 && M.attributes.normal && M.attributes.position && M.attributes.uv && flipBufferGeometryNormals(M), l.add(M);
8555
- for (var B = [], F = 0, L = T[H].material; F < L.length; F++) {
8556
- var O = L[F], N = parseMaterial(O, t, e || "", r, f, o, A, l, g), D = N.material, J = N.textureReady;
8557
- u.push(J), B.push(D);
8569
+ for (var B = [], O = 0, L = T[H].material; O < L.length; O++) {
8570
+ var F = L[O], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material, Q = N.textureReady;
8571
+ u.push(Q), B.push(D);
8558
8572
  }
8559
8573
  var z = new PBMMesh(M, B);
8560
8574
  z.name = "chunk_" + H, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, I.add(z);
@@ -8982,43 +8996,43 @@ var Parser = (
8982
8996
  Promise.all(m),
8983
8997
  Promise.all(A)
8984
8998
  ]).then(function(w) {
8985
- for (var C = w[0], I = w[1], H = w[2], M = w[3], B = w[4], F = [], L = function(J, z) {
8986
- var G = C[J], V = I[J], Q = H[J], U = M[J], j = B[J];
8999
+ for (var C = w[0], I = w[1], H = w[2], M = w[3], B = w[4], O = [], L = function(Q, z) {
9000
+ var G = C[Q], J = I[Q], V = H[Q], U = M[Q], j = B[Q];
8987
9001
  if (G === void 0)
8988
9002
  return "continue";
8989
9003
  G.updateMatrix(), G.matrixAutoUpdate = !0;
8990
- var Y = void 0;
9004
+ var X = void 0;
8991
9005
  switch (PATH_PROPERTIES[j.path]) {
8992
9006
  case PATH_PROPERTIES.weights:
8993
- Y = THREE.NumberKeyframeTrack;
9007
+ X = THREE.NumberKeyframeTrack;
8994
9008
  break;
8995
9009
  case PATH_PROPERTIES.rotation:
8996
- Y = THREE.QuaternionKeyframeTrack;
9010
+ X = THREE.QuaternionKeyframeTrack;
8997
9011
  break;
8998
9012
  case PATH_PROPERTIES.position:
8999
9013
  case PATH_PROPERTIES.scale:
9000
9014
  default:
9001
- Y = THREE.VectorKeyframeTrack;
9015
+ X = THREE.VectorKeyframeTrack;
9002
9016
  break;
9003
9017
  }
9004
- var Z = G.name ? G.name : G.uuid, X = U.interpolation !== void 0 ? INTERPOLATION[U.interpolation] : THREE.InterpolateLinear, W = [];
9005
- PATH_PROPERTIES[j.path] === PATH_PROPERTIES.weights ? G.traverse(function(le) {
9006
- le.morphTargetInfluences && W.push(le.name ? le.name : le.uuid);
9007
- }) : W.push(Z);
9008
- var K = Q.array;
9009
- if (Q.normalized) {
9010
- for (var ee = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), re = 0, ae = K.length; re < ae; re++)
9018
+ var Y = G.name ? G.name : G.uuid, W = U.interpolation !== void 0 ? INTERPOLATION[U.interpolation] : THREE.InterpolateLinear, Z = [];
9019
+ PATH_PROPERTIES[j.path] === PATH_PROPERTIES.weights ? G.traverse(function(ae) {
9020
+ ae.morphTargetInfluences && Z.push(ae.name ? ae.name : ae.uuid);
9021
+ }) : Z.push(Y);
9022
+ var K = V.array;
9023
+ if (V.normalized) {
9024
+ for (var ee = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), re = 0, ie = K.length; re < ie; re++)
9011
9025
  te[re] = K[re] * ee;
9012
9026
  K = te;
9013
9027
  }
9014
- for (var re = 0, ae = W.length; re < ae; re++) {
9015
- var pe = new Y(W[re] + "." + PATH_PROPERTIES[j.path], V.array, K, X);
9016
- F.push(pe);
9028
+ for (var re = 0, ie = Z.length; re < ie; re++) {
9029
+ var ce = new X(Z[re] + "." + PATH_PROPERTIES[j.path], J.array, K, W);
9030
+ O.push(ce);
9017
9031
  }
9018
- }, O = 0, N = C.length; O < N; O++)
9019
- L(O);
9032
+ }, F = 0, N = C.length; F < N; F++)
9033
+ L(F);
9020
9034
  var D = f.name ? f.name : "animation_" + t;
9021
- return new THREE.AnimationClip(D, void 0, F);
9035
+ return new THREE.AnimationClip(D, void 0, O);
9022
9036
  });
9023
9037
  }
9024
9038
  return this.cache.set(e, o), o;
@@ -9081,7 +9095,7 @@ var Parser = (
9081
9095
  if (u.sparse !== void 0) {
9082
9096
  var R = WEBGL_TYPE_SIZES.SCALAR, w = WEBGL_COMPONENT_TYPES[u.sparse.indices.componentType], C = u.sparse.indices.byteOffset || 0, I = u.sparse.values.byteOffset || 0, H = new w(c[1], C, u.sparse.count * R), M = new h(c[2], I, u.sparse.count * d);
9083
9097
  f !== null && (E = new THREE.BufferAttribute(E.array.slice(), E.itemSize, E.normalized));
9084
- for (var B = 0, F = H.length; B < F; B++) {
9098
+ for (var B = 0, O = H.length; B < O; B++) {
9085
9099
  var L = H[B];
9086
9100
  if (E.setX(L, M[B * d]), d >= 2 && E.setY(L, M[B * d + 1]), d >= 3 && E.setZ(L, M[B * d + 2]), d >= 4 && E.setW(L, M[B * d + 3]), d >= 5)
9087
9101
  throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
@@ -9456,12 +9470,12 @@ var Parser = (
9456
9470
  return t;
9457
9471
  var H = [];
9458
9472
  t.morphTargetsRelative = !0;
9459
- for (var M = function(B, F) {
9473
+ for (var M = function(B, O) {
9460
9474
  var L = e.targets[B];
9461
- S ? H.push(r.loadAccessor(L.POSITION).then(function(O) {
9462
- O && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[B] = O);
9463
- })) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[B] = t.attributes.position), R ? H.push(r.loadAccessor(L.NORMAL).then(function(O) {
9464
- O && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[B] = O);
9475
+ S ? H.push(r.loadAccessor(L.POSITION).then(function(F) {
9476
+ F && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[B] = F);
9477
+ })) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[B] = t.attributes.position), R ? H.push(r.loadAccessor(L.NORMAL).then(function(F) {
9478
+ F && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[B] = F);
9465
9479
  })) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[B] = t.attributes.normal);
9466
9480
  }, w = 0, C = e.targets.length; w < C; w++)
9467
9481
  M(w, C);
@@ -11648,8 +11662,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11648
11662
  var f = function(te) {
11649
11663
  var re = e.length;
11650
11664
  if (te > re) {
11651
- var ae = new u8(Math.max(re * 2, te));
11652
- ae.set(e), e = ae;
11665
+ var ie = new u8(Math.max(re * 2, te));
11666
+ ie.set(e), e = ie;
11653
11667
  }
11654
11668
  }, d = t.f || 0, h = t.p || 0, p = t.b || 0, m = t.l, A = t.d, g = t.m, y = t.n, v = o * 8;
11655
11669
  do {
@@ -11665,10 +11679,10 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11665
11679
  for (var I = new u8(C), H = new u8(19), M = 0; M < w; ++M)
11666
11680
  H[clim[M]] = bits(n, h + M * 3, 7);
11667
11681
  h += w * 3;
11668
- for (var B = max(H), F = (1 << B) - 1, L = hMap(H, B, 1), M = 0; M < C; ) {
11669
- var O = L[bits(n, h, F)];
11670
- h += O & 15;
11671
- var b = O >> 4;
11682
+ for (var B = max(H), O = (1 << B) - 1, L = hMap(H, B, 1), M = 0; M < C; ) {
11683
+ var F = L[bits(n, h, O)];
11684
+ h += F & 15;
11685
+ var b = F >> 4;
11672
11686
  if (b < 16)
11673
11687
  I[M++] = b;
11674
11688
  else {
@@ -11677,8 +11691,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11677
11691
  I[M++] = N;
11678
11692
  }
11679
11693
  }
11680
- var J = I.subarray(0, R), z = I.subarray(R);
11681
- g = max(J), y = max(z), m = hMap(J, g, 1), A = hMap(z, y, 1);
11694
+ var Q = I.subarray(0, R), z = I.subarray(R);
11695
+ g = max(Q), y = max(z), m = hMap(Q, g, 1), A = hMap(z, y, 1);
11682
11696
  } else
11683
11697
  err(1);
11684
11698
  else {
@@ -11696,7 +11710,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11696
11710
  }
11697
11711
  }
11698
11712
  l && f(p + 131072);
11699
- for (var G = (1 << g) - 1, V = (1 << y) - 1, Q = h; ; Q = h) {
11713
+ for (var G = (1 << g) - 1, J = (1 << y) - 1, V = h; ; V = h) {
11700
11714
  var N = m[bits16(n, h) & G], U = N >> 4;
11701
11715
  if (h += N & 15, h > v) {
11702
11716
  c && err(0);
@@ -11705,37 +11719,37 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11705
11719
  if (N || err(2), U < 256)
11706
11720
  e[p++] = U;
11707
11721
  else if (U == 256) {
11708
- Q = h, m = null;
11722
+ V = h, m = null;
11709
11723
  break;
11710
11724
  } else {
11711
11725
  var j = U - 254;
11712
11726
  if (U > 264) {
11713
- var M = U - 257, Y = fleb[M];
11714
- j = bits(n, h, (1 << Y) - 1) + fl[M], h += Y;
11727
+ var M = U - 257, X = fleb[M];
11728
+ j = bits(n, h, (1 << X) - 1) + fl[M], h += X;
11715
11729
  }
11716
- var Z = A[bits16(n, h) & V], X = Z >> 4;
11717
- Z || err(3), h += Z & 15;
11718
- var z = fd[X];
11719
- if (X > 3) {
11720
- var Y = fdeb[X];
11721
- z += bits16(n, h) & (1 << Y) - 1, h += Y;
11730
+ var Y = A[bits16(n, h) & J], W = Y >> 4;
11731
+ Y || err(3), h += Y & 15;
11732
+ var z = fd[W];
11733
+ if (W > 3) {
11734
+ var X = fdeb[W];
11735
+ z += bits16(n, h) & (1 << X) - 1, h += X;
11722
11736
  }
11723
11737
  if (h > v) {
11724
11738
  c && err(0);
11725
11739
  break;
11726
11740
  }
11727
11741
  l && f(p + 131072);
11728
- var W = p + j;
11742
+ var Z = p + j;
11729
11743
  if (p < z) {
11730
- var K = s - z, ee = Math.min(z, W);
11744
+ var K = s - z, ee = Math.min(z, Z);
11731
11745
  for (K + p < 0 && err(3); p < ee; ++p)
11732
11746
  e[p] = r[K + p];
11733
11747
  }
11734
- for (; p < W; ++p)
11748
+ for (; p < Z; ++p)
11735
11749
  e[p] = e[p - z];
11736
11750
  }
11737
11751
  }
11738
- t.l = m, t.p = Q, t.b = p, t.f = d, m && (d = 1, t.m = g, t.d = A, t.n = y);
11752
+ t.l = m, t.p = V, t.b = p, t.f = d, m && (d = 1, t.m = g, t.d = A, t.n = y);
11739
11753
  } while (!d);
11740
11754
  return p != e.length && u ? slc(e, 0, p) : e.subarray(0, p);
11741
11755
  }, et = /* @__PURE__ */ new u8(0), b2 = function(n, t) {
@@ -12434,9 +12448,9 @@ var FBXTreeParser = (
12434
12448
  var T = [0, 0, 0, 0], S = [0, 0, 0, 0];
12435
12449
  E.forEach(function(w, C) {
12436
12450
  var I = w, H = v[C];
12437
- S.forEach(function(M, B, F) {
12451
+ S.forEach(function(M, B, O) {
12438
12452
  if (I > M) {
12439
- F[B] = I, I = M;
12453
+ O[B] = I, I = M;
12440
12454
  var L = T[B];
12441
12455
  T[B] = H, H = L;
12442
12456
  }
@@ -12484,9 +12498,9 @@ var FBXTreeParser = (
12484
12498
  h = THREE.ShapeUtils.triangulateShape(E, []);
12485
12499
  } else
12486
12500
  h = [[0, 1, 2]];
12487
- for (var R = function(F, L, O) {
12488
- t.vertex.push(e.vertexPositions[r[F * 3]]), t.vertex.push(e.vertexPositions[r[F * 3 + 1]]), t.vertex.push(e.vertexPositions[r[F * 3 + 2]]), t.vertex.push(e.vertexPositions[r[L * 3]]), t.vertex.push(e.vertexPositions[r[L * 3 + 1]]), t.vertex.push(e.vertexPositions[r[L * 3 + 2]]), t.vertex.push(e.vertexPositions[r[O * 3]]), t.vertex.push(e.vertexPositions[r[O * 3 + 1]]), t.vertex.push(e.vertexPositions[r[O * 3 + 2]]), e.skeleton && (t.vertexWeights.push(c[F * 4]), t.vertexWeights.push(c[F * 4 + 1]), t.vertexWeights.push(c[F * 4 + 2]), t.vertexWeights.push(c[F * 4 + 3]), t.vertexWeights.push(c[L * 4]), t.vertexWeights.push(c[L * 4 + 1]), t.vertexWeights.push(c[L * 4 + 2]), t.vertexWeights.push(c[L * 4 + 3]), t.vertexWeights.push(c[O * 4]), t.vertexWeights.push(c[O * 4 + 1]), t.vertexWeights.push(c[O * 4 + 2]), t.vertexWeights.push(c[O * 4 + 3]), t.weightsIndices.push(f[F * 4]), t.weightsIndices.push(f[F * 4 + 1]), t.weightsIndices.push(f[F * 4 + 2]), t.weightsIndices.push(f[F * 4 + 3]), t.weightsIndices.push(f[L * 4]), t.weightsIndices.push(f[L * 4 + 1]), t.weightsIndices.push(f[L * 4 + 2]), t.weightsIndices.push(f[L * 4 + 3]), t.weightsIndices.push(f[O * 4]), t.weightsIndices.push(f[O * 4 + 1]), t.weightsIndices.push(f[O * 4 + 2]), t.weightsIndices.push(f[O * 4 + 3])), e.color && (t.colors.push(u[F * 3]), t.colors.push(u[F * 3 + 1]), t.colors.push(u[F * 3 + 2]), t.colors.push(u[L * 3]), t.colors.push(u[L * 3 + 1]), t.colors.push(u[L * 3 + 2]), t.colors.push(u[O * 3]), t.colors.push(u[O * 3 + 1]), t.colors.push(u[O * 3 + 2])), e.material && e.material.mappingType !== "AllSame" && (t.materialIndex.push(o), t.materialIndex.push(o), t.materialIndex.push(o)), e.normal && (t.normal.push(s[F * 3]), t.normal.push(s[F * 3 + 1]), t.normal.push(s[F * 3 + 2]), t.normal.push(s[L * 3]), t.normal.push(s[L * 3 + 1]), t.normal.push(s[L * 3 + 2]), t.normal.push(s[O * 3]), t.normal.push(s[O * 3 + 1]), t.normal.push(s[O * 3 + 2])), e.uv && e.uv.forEach(function(N, D) {
12489
- t.uvs[D] === void 0 && (t.uvs[D] = []), t.uvs[D].push(l[D][F * 2]), t.uvs[D].push(l[D][F * 2 + 1]), t.uvs[D].push(l[D][L * 2]), t.uvs[D].push(l[D][L * 2 + 1]), t.uvs[D].push(l[D][O * 2]), t.uvs[D].push(l[D][O * 2 + 1]);
12501
+ for (var R = function(O, L, F) {
12502
+ t.vertex.push(e.vertexPositions[r[O * 3]]), t.vertex.push(e.vertexPositions[r[O * 3 + 1]]), t.vertex.push(e.vertexPositions[r[O * 3 + 2]]), t.vertex.push(e.vertexPositions[r[L * 3]]), t.vertex.push(e.vertexPositions[r[L * 3 + 1]]), t.vertex.push(e.vertexPositions[r[L * 3 + 2]]), t.vertex.push(e.vertexPositions[r[F * 3]]), t.vertex.push(e.vertexPositions[r[F * 3 + 1]]), t.vertex.push(e.vertexPositions[r[F * 3 + 2]]), e.skeleton && (t.vertexWeights.push(c[O * 4]), t.vertexWeights.push(c[O * 4 + 1]), t.vertexWeights.push(c[O * 4 + 2]), t.vertexWeights.push(c[O * 4 + 3]), t.vertexWeights.push(c[L * 4]), t.vertexWeights.push(c[L * 4 + 1]), t.vertexWeights.push(c[L * 4 + 2]), t.vertexWeights.push(c[L * 4 + 3]), t.vertexWeights.push(c[F * 4]), t.vertexWeights.push(c[F * 4 + 1]), t.vertexWeights.push(c[F * 4 + 2]), t.vertexWeights.push(c[F * 4 + 3]), t.weightsIndices.push(f[O * 4]), t.weightsIndices.push(f[O * 4 + 1]), t.weightsIndices.push(f[O * 4 + 2]), t.weightsIndices.push(f[O * 4 + 3]), t.weightsIndices.push(f[L * 4]), t.weightsIndices.push(f[L * 4 + 1]), t.weightsIndices.push(f[L * 4 + 2]), t.weightsIndices.push(f[L * 4 + 3]), t.weightsIndices.push(f[F * 4]), t.weightsIndices.push(f[F * 4 + 1]), t.weightsIndices.push(f[F * 4 + 2]), t.weightsIndices.push(f[F * 4 + 3])), e.color && (t.colors.push(u[O * 3]), t.colors.push(u[O * 3 + 1]), t.colors.push(u[O * 3 + 2]), t.colors.push(u[L * 3]), t.colors.push(u[L * 3 + 1]), t.colors.push(u[L * 3 + 2]), t.colors.push(u[F * 3]), t.colors.push(u[F * 3 + 1]), t.colors.push(u[F * 3 + 2])), e.material && e.material.mappingType !== "AllSame" && (t.materialIndex.push(o), t.materialIndex.push(o), t.materialIndex.push(o)), e.normal && (t.normal.push(s[O * 3]), t.normal.push(s[O * 3 + 1]), t.normal.push(s[O * 3 + 2]), t.normal.push(s[L * 3]), t.normal.push(s[L * 3 + 1]), t.normal.push(s[L * 3 + 2]), t.normal.push(s[F * 3]), t.normal.push(s[F * 3 + 1]), t.normal.push(s[F * 3 + 2])), e.uv && e.uv.forEach(function(N, D) {
12503
+ t.uvs[D] === void 0 && (t.uvs[D] = []), t.uvs[D].push(l[D][O * 2]), t.uvs[D].push(l[D][O * 2 + 1]), t.uvs[D].push(l[D][L * 2]), t.uvs[D].push(l[D][L * 2 + 1]), t.uvs[D].push(l[D][F * 2]), t.uvs[D].push(l[D][F * 2 + 1]);
12490
12504
  });
12491
12505
  }, w = 0, C = h; w < C.length; w++) {
12492
12506
  var I = C[w], H = I[0], M = I[1], B = I[2];
@@ -13192,7 +13206,7 @@ function generateTransform(n) {
13192
13206
  var w = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), C = new THREE.Matrix4().getInverse(w), I = T.clone().multiply(C);
13193
13207
  R.copy(v).multiply(y).multiply(I).multiply(S);
13194
13208
  }
13195
- var H = new THREE.Matrix4().getInverse(f), M = new THREE.Matrix4().getInverse(u), B = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(H).multiply(l).multiply(u).multiply(s).multiply(M), F = new THREE.Matrix4().copyPosition(B), L = d.clone().multiply(F);
13209
+ var H = new THREE.Matrix4().getInverse(f), M = new THREE.Matrix4().getInverse(u), B = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(H).multiply(l).multiply(u).multiply(s).multiply(M), O = new THREE.Matrix4().copyPosition(B), L = d.clone().multiply(O);
13196
13210
  return p.copyPosition(L), B = p.clone().multiply(R), B.premultiply(new THREE.Matrix4().getInverse(d)), B;
13197
13211
  }
13198
13212
  function getEulerOrder(n) {
@@ -13427,61 +13441,61 @@ function loadX3p(n, t) {
13427
13441
  });
13428
13442
  }
13429
13443
  function parse$1(n, t) {
13430
- for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, w, C, I, H, M, B, F, L, O, N, D, J, z, G, V, Q, U, j, Y, Z, X, W, K, ee, te, re, ae, pe, le, ve, xe, Ae, Te, ue = unzipSync(n), fe = "", ne = null, oe = 0, de = Object.keys(ue); oe < de.length; oe++) {
13431
- var me = de[oe];
13432
- /(^|\/)main\.xml$/i.test(me) && (ne = ue[me], fe = me.slice(0, me.lastIndexOf("/") + 1));
13444
+ for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, w, C, I, H, M, B, O, L, F, N, D, Q, z, G, J, V, U, j, X, Y, W, Z, K, ee, te, re, ie, ce, ae, de, ge, ye, xe, le = unzipSync(n), he = "", ne = null, se = 0, pe = Object.keys(le); se < pe.length; se++) {
13445
+ var me = pe[se];
13446
+ /(^|\/)main\.xml$/i.test(me) && (ne = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
13433
13447
  }
13434
13448
  if (!ne)
13435
13449
  throw new Error("X3p: main.xml not found.");
13436
13450
  if (typeof DOMParser == "undefined")
13437
13451
  throw new Error("X3p: DOMParser not found.");
13438
- var Ne = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), qe = new DOMParser(), Ye = decodeText(ne), Ve = qe.parseFromString(Ye, "text/xml"), he = Ve.querySelector("Record1 Axes"), Ke = {
13452
+ var Ne = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), qe = new DOMParser(), Ye = decodeText(ne), Ve = qe.parseFromString(Ye, "text/xml"), ve = Ve.querySelector("Record1 Axes"), Ke = {
13439
13453
  x: {
13440
- type: (s = (o = (r = he == null ? void 0 : he.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
13441
- dataType: (c = (l = (u = he == null ? void 0 : he.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
13442
- increment: Number((d = (f = he == null ? void 0 : he.querySelector("CX Increment")) === null || f === void 0 ? void 0 : f.textContent) !== null && d !== void 0 ? d : "1"),
13443
- offset: Number((p = (h = he == null ? void 0 : he.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13454
+ type: (s = (o = (r = ve == null ? void 0 : ve.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
13455
+ dataType: (c = (l = (u = ve == null ? void 0 : ve.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
13456
+ increment: Number((d = (f = ve == null ? void 0 : ve.querySelector("CX Increment")) === null || f === void 0 ? void 0 : f.textContent) !== null && d !== void 0 ? d : "1"),
13457
+ offset: Number((p = (h = ve == null ? void 0 : ve.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13444
13458
  },
13445
13459
  y: {
13446
- type: (g = (A = (m = he == null ? void 0 : he.querySelector("CY AxisType")) === null || m === void 0 ? void 0 : m.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && g !== void 0 ? g : "I",
13447
- dataType: (E = (v = (y = he == null ? void 0 : he.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && E !== void 0 ? E : "D",
13448
- increment: Number((T = (b = he == null ? void 0 : he.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
13449
- offset: Number((R = (S = he == null ? void 0 : he.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13460
+ type: (g = (A = (m = ve == null ? void 0 : ve.querySelector("CY AxisType")) === null || m === void 0 ? void 0 : m.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && g !== void 0 ? g : "I",
13461
+ dataType: (E = (v = (y = ve == null ? void 0 : ve.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && E !== void 0 ? E : "D",
13462
+ increment: Number((T = (b = ve == null ? void 0 : ve.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
13463
+ offset: Number((R = (S = ve == null ? void 0 : ve.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13450
13464
  },
13451
13465
  z: {
13452
- type: (I = (C = (w = he == null ? void 0 : he.querySelector("CZ AxisType")) === null || w === void 0 ? void 0 : w.textContent) === null || C === void 0 ? void 0 : C.toUpperCase()) !== null && I !== void 0 ? I : "A",
13453
- dataType: (B = (M = (H = he == null ? void 0 : he.querySelector("CZ DataType")) === null || H === void 0 ? void 0 : H.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && B !== void 0 ? B : "D",
13454
- increment: Number((L = (F = he == null ? void 0 : he.querySelector("CZ Increment")) === null || F === void 0 ? void 0 : F.textContent) !== null && L !== void 0 ? L : "1"),
13455
- offset: Number((N = (O = he == null ? void 0 : he.querySelector("CZ Offset")) === null || O === void 0 ? void 0 : O.textContent) !== null && N !== void 0 ? N : "0")
13456
- }
13457
- }, be = null, Le = Ve.querySelector("Record1 Axes Rotation");
13458
- Le && (be = new THREE.Matrix3(), be.set(Number((J = (D = Le.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && J !== void 0 ? J : 0), Number((G = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && G !== void 0 ? G : 0), Number((Q = (V = Le.querySelector("r13")) === null || V === void 0 ? void 0 : V.textContent) !== null && Q !== void 0 ? Q : 0), Number((j = (U = Le.querySelector("r21")) === null || U === void 0 ? void 0 : U.textContent) !== null && j !== void 0 ? j : 0), Number((Z = (Y = Le.querySelector("r22")) === null || Y === void 0 ? void 0 : Y.textContent) !== null && Z !== void 0 ? Z : 0), Number((W = (X = Le.querySelector("r23")) === null || X === void 0 ? void 0 : X.textContent) !== null && W !== void 0 ? W : 0), Number((ee = (K = Le.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && ee !== void 0 ? ee : 0), Number((re = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && re !== void 0 ? re : 0), Number((pe = (ae = Le.querySelector("r33")) === null || ae === void 0 ? void 0 : ae.textContent) !== null && pe !== void 0 ? pe : 0)));
13459
- var Ie = (le = Ve.querySelector("Record3 DataLink PointDataLink")) === null || le === void 0 ? void 0 : le.textContent;
13466
+ type: (I = (C = (w = ve == null ? void 0 : ve.querySelector("CZ AxisType")) === null || w === void 0 ? void 0 : w.textContent) === null || C === void 0 ? void 0 : C.toUpperCase()) !== null && I !== void 0 ? I : "A",
13467
+ dataType: (B = (M = (H = ve == null ? void 0 : ve.querySelector("CZ DataType")) === null || H === void 0 ? void 0 : H.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && B !== void 0 ? B : "D",
13468
+ increment: Number((L = (O = ve == null ? void 0 : ve.querySelector("CZ Increment")) === null || O === void 0 ? void 0 : O.textContent) !== null && L !== void 0 ? L : "1"),
13469
+ offset: Number((N = (F = ve == null ? void 0 : ve.querySelector("CZ Offset")) === null || F === void 0 ? void 0 : F.textContent) !== null && N !== void 0 ? N : "0")
13470
+ }
13471
+ }, Te = null, Le = Ve.querySelector("Record1 Axes Rotation");
13472
+ Le && (Te = new THREE.Matrix3(), Te.set(Number((Q = (D = Le.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && Q !== void 0 ? Q : 0), Number((G = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && G !== void 0 ? G : 0), Number((V = (J = Le.querySelector("r13")) === null || J === void 0 ? void 0 : J.textContent) !== null && V !== void 0 ? V : 0), Number((j = (U = Le.querySelector("r21")) === null || U === void 0 ? void 0 : U.textContent) !== null && j !== void 0 ? j : 0), Number((Y = (X = Le.querySelector("r22")) === null || X === void 0 ? void 0 : X.textContent) !== null && Y !== void 0 ? Y : 0), Number((Z = (W = Le.querySelector("r23")) === null || W === void 0 ? void 0 : W.textContent) !== null && Z !== void 0 ? Z : 0), Number((ee = (K = Le.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && ee !== void 0 ? ee : 0), Number((re = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && re !== void 0 ? re : 0), Number((ce = (ie = Le.querySelector("r33")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ce !== void 0 ? ce : 0)));
13473
+ var Ie = (ae = Ve.querySelector("Record3 DataLink PointDataLink")) === null || ae === void 0 ? void 0 : ae.textContent;
13460
13474
  if (typeof Ie != "string")
13461
13475
  throw new Error("X3p: PointDataLink not found.");
13462
- Ie = pathJoin(fe, Ie);
13463
- var $e = ue[Ie];
13476
+ Ie = pathJoin(he, Ie);
13477
+ var $e = le[Ie];
13464
13478
  if (!$e)
13465
13479
  throw new Error("X3p: ".concat($e, " not found."));
13466
- for (var tt = getPointArray($e.buffer, Ke.z.dataType), ke = Number((xe = (ve = Ve.querySelector("Record3 MatrixDimension SizeX")) === null || ve === void 0 ? void 0 : ve.textContent) !== null && xe !== void 0 ? xe : "0"), Pe = Number((Te = (Ae = Ve.querySelector("Record3 MatrixDimension SizeY")) === null || Ae === void 0 ? void 0 : Ae.textContent) !== null && Te !== void 0 ? Te : "0"), _e = Math.floor(ke - 1), ye = Math.floor(Pe - 1), Ce = _e + 1, Be = ye + 1, je = new Float32Array(Ce * Be * 3), Qe = new Float32Array(Ce * Be * 2), We = new Uint32Array(_e * ye * 6), gt = new THREE.Box3(), Je = 0; Je < Be; Je++)
13480
+ for (var tt = getPointArray($e.buffer, Ke.z.dataType), ke = Number((ge = (de = Ve.querySelector("Record3 MatrixDimension SizeX")) === null || de === void 0 ? void 0 : de.textContent) !== null && ge !== void 0 ? ge : "0"), Pe = Number((xe = (ye = Ve.querySelector("Record3 MatrixDimension SizeY")) === null || ye === void 0 ? void 0 : ye.textContent) !== null && xe !== void 0 ? xe : "0"), _e = Math.floor(ke - 1), Ee = Math.floor(Pe - 1), Ce = _e + 1, Be = Ee + 1, je = new Float32Array(Ce * Be * 3), Qe = new Float32Array(Ce * Be * 2), We = new Uint32Array(_e * Ee * 6), gt = new THREE.Box3(), Je = 0; Je < Be; Je++)
13467
13481
  for (var At = Je * Ke.y.increment + Ke.y.offset, we = 0; we < Ce; we++) {
13468
13482
  var Ue = Je * Ce + we, yt = we * Ke.x.increment + Ke.x.offset, Mt = tt[Ue], Et = !isNaN(Mt), ht = Et ? Mt : NaN;
13469
- _vector.set(yt, -At, ht), be && _vector.applyMatrix3(be), Et && gt.expandByPoint(_vector), je[Ue * 3 + 0] = _vector.x, je[Ue * 3 + 1] = _vector.y, je[Ue * 3 + 2] = _vector.z, Qe[Ue * 2 + 0] = we / _e, Qe[Ue * 2 + 1] = 1 - Je / ye;
13483
+ _vector.set(yt, -At, ht), Te && _vector.applyMatrix3(Te), Et && gt.expandByPoint(_vector), je[Ue * 3 + 0] = _vector.x, je[Ue * 3 + 1] = _vector.y, je[Ue * 3 + 2] = _vector.z, Qe[Ue * 2 + 0] = we / _e, Qe[Ue * 2 + 1] = 1 - Je / Ee;
13470
13484
  }
13471
- for (var Je = 0; Je < ye; Je++)
13485
+ for (var Je = 0; Je < Ee; Je++)
13472
13486
  for (var we = 0; we < _e; we++) {
13473
- var pt = we + Ce * Je, ze = we + Ce * (Je + 1), ut = we + 1 + Ce * (Je + 1), rt = we + 1 + Ce * Je, se = (Je * _e + we) * 6;
13474
- We[se + 0] = pt, We[se + 1] = ze, We[se + 2] = rt, We[se + 3] = ze, We[se + 4] = ut, We[se + 5] = rt;
13487
+ var pt = we + Ce * Je, ze = we + Ce * (Je + 1), ut = we + 1 + Ce * (Je + 1), rt = we + 1 + Ce * Je, ue = (Je * _e + we) * 6;
13488
+ We[ue + 0] = pt, We[ue + 1] = ze, We[ue + 2] = rt, We[ue + 3] = ze, We[ue + 4] = ut, We[ue + 5] = rt;
13475
13489
  }
13476
- var ge = new THREE.BufferGeometry();
13477
- ge.setAttribute("position", new THREE.BufferAttribute(je, 3)), ge.setAttribute("uv", new THREE.BufferAttribute(Qe, 2)), ge.setIndex(new THREE.BufferAttribute(We, 1)), (!ge.groups || ge.groups.length === 0) && ge.addGroup(0, ge.index ? ge.index.count : ge.attributes.position.count, 0), ge.boundingBox = gt;
13490
+ var Ae = new THREE.BufferGeometry();
13491
+ Ae.setAttribute("position", new THREE.BufferAttribute(je, 3)), Ae.setAttribute("uv", new THREE.BufferAttribute(Qe, 2)), Ae.setIndex(new THREE.BufferAttribute(We, 1)), (!Ae.groups || Ae.groups.length === 0) && Ae.addGroup(0, Ae.index ? Ae.index.count : Ae.attributes.position.count, 0), Ae.boundingBox = gt;
13478
13492
  var Me = new PBMMeshMaterial(t.light ? "phong" : "basic");
13479
13493
  Me.flatShading = !0, Me.color.copy(Ne);
13480
- var He = new PBMMesh(ge, [Me]);
13494
+ var He = new PBMMesh(Ae, [Me]);
13481
13495
  return {
13482
13496
  object: He,
13483
13497
  dispose: function() {
13484
- ge.dispose(), Me.dispose();
13498
+ Ae.dispose(), Me.dispose();
13485
13499
  }
13486
13500
  };
13487
13501
  }
@@ -14085,26 +14099,26 @@ var BVHVector3 = (
14085
14099
  }
14086
14100
  var M = new BVHNode(++d, o, 0, s, 0);
14087
14101
  c[f++] = M;
14088
- var B = [], F = [0, 1, 2], L = function(N, D) {
14102
+ var B = [], O = [0, 1, 2], L = function(N, D) {
14089
14103
  return B[D] - B[N];
14090
14104
  };
14091
- function O(N) {
14092
- var D = N.startIndex, J = N.endIndex, z = N.extents;
14093
- B[0] = z[3] - z[0], B[1] = z[4] - z[1], B[2] = z[5] - z[2], F.sort(L);
14105
+ function F(N) {
14106
+ var D = N.startIndex, Q = N.endIndex, z = N.extents;
14107
+ B[0] = z[3] - z[0], B[1] = z[4] - z[1], B[2] = z[5] - z[2], O.sort(L);
14094
14108
  for (var G = 0; G < 3; G++) {
14095
- for (var V = F[G], Q = z[V] + z[V + 3], U = D, j = J - 1, Y = -1, Z = void 0; U <= j; )
14096
- Y === -1 ? (Z = u[U], l[Z * 6 + V] + l[Z * 6 + V + 3] < Q ? U++ : Y = Z) : (Z = u[j], l[Z * 6 + V] + l[Z * 6 + V + 3] >= Q || (u[U] = Z, u[j] = Y, Y = -1, U++), j--);
14097
- if (U > D && U < J) {
14098
- var X = new BVHNode(++d, calcExtents(u, l, D, U, EPSILON$1), D, U, N.deepth + 1);
14099
- X.deepth < r && X.endIndex - X.startIndex > e && (c[f++] = X);
14100
- var W = new BVHNode(++d, calcExtents(u, l, U, J, EPSILON$1), U, J, N.deepth + 1);
14101
- W.deepth < r && W.endIndex - W.startIndex > e && (c[f++] = W), N.node0 = X, N.node1 = W, N.startIndex = 0, N.endIndex = 0;
14109
+ for (var J = O[G], V = z[J] + z[J + 3], U = D, j = Q - 1, X = -1, Y = void 0; U <= j; )
14110
+ X === -1 ? (Y = u[U], l[Y * 6 + J] + l[Y * 6 + J + 3] < V ? U++ : X = Y) : (Y = u[j], l[Y * 6 + J] + l[Y * 6 + J + 3] >= V || (u[U] = Y, u[j] = X, X = -1, U++), j--);
14111
+ if (U > D && U < Q) {
14112
+ var W = new BVHNode(++d, calcExtents(u, l, D, U, EPSILON$1), D, U, N.deepth + 1);
14113
+ W.deepth < r && W.endIndex - W.startIndex > e && (c[f++] = W);
14114
+ var Z = new BVHNode(++d, calcExtents(u, l, U, Q, EPSILON$1), U, Q, N.deepth + 1);
14115
+ Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), N.node0 = W, N.node1 = Z, N.startIndex = 0, N.endIndex = 0;
14102
14116
  break;
14103
14117
  }
14104
14118
  }
14105
14119
  }
14106
14120
  for (; f; )
14107
- O(c[--f]);
14121
+ F(c[--f]);
14108
14122
  return this.offsetArray = u, this.rootNodePacked = packBVHNode(M, d + 1), c.length = 0, this;
14109
14123
  }, t.prototype.trianglesInSphere = function(e, r) {
14110
14124
  for (var o = this.offsetArray, s = this.rootNodePacked, u = new Float32Array(s), l = new Uint32Array(s), c = new Uint16Array(s), f = [0], d = [], h; (h = f.pop()) !== void 0; ) {
@@ -14131,27 +14145,27 @@ var BVHVector3 = (
14131
14145
  var b = intersectNodeBox(e, m, y, o);
14132
14146
  if (b !== null && !(s && b > v)) {
14133
14147
  for (var T = e.x, S = e.y, R = e.z, w = r.x, C = r.y, I = r.z, H = h[E + 6], M = h[E + 7], B = H; B < M; B++) {
14134
- var F = c[B], L = F * 3, O = new BVHVector3(0, 0, 0);
14135
- this.getPositionByIndex(L, O);
14136
- var N = O.x, D = O.y, J = O.z, z = new BVHVector3(0, 0, 0);
14148
+ var O = c[B], L = O * 3, F = new BVHVector3(0, 0, 0);
14149
+ this.getPositionByIndex(L, F);
14150
+ var N = F.x, D = F.y, Q = F.z, z = new BVHVector3(0, 0, 0);
14137
14151
  this.getPositionByIndex(L + 1, z);
14138
- var G = z.x, V = z.y, Q = z.z, U = new BVHVector3(0, 0, 0);
14152
+ var G = z.x, J = z.y, V = z.z, U = new BVHVector3(0, 0, 0);
14139
14153
  this.getPositionByIndex(L + 2, U);
14140
- var j = U.x, Y = U.y, Z = U.z, X = G - N, W = V - D, K = Q - J, ee = j - N, te = Y - D, re = Z - J, ae = W * re - K * te, pe = K * ee - X * re, le = X * te - W * ee, ve = w * ae + C * pe + I * le, xe = void 0;
14141
- if (ve > 0)
14142
- xe = 1;
14143
- else if (ve < 0)
14144
- xe = -1, ve = -ve;
14154
+ var j = U.x, X = U.y, Y = U.z, W = G - N, Z = J - D, K = V - Q, ee = j - N, te = X - D, re = Y - Q, ie = Z * re - K * te, ce = K * ee - W * re, ae = W * te - Z * ee, de = w * ie + C * ce + I * ae, ge = void 0;
14155
+ if (de > 0)
14156
+ ge = 1;
14157
+ else if (de < 0)
14158
+ ge = -1, de = -de;
14145
14159
  else
14146
14160
  continue;
14147
- var Ae = T - N, Te = S - D, ue = R - J, fe = xe * (w * (Te * re - ue * te) + C * (ue * ee - Ae * re) + I * (Ae * te - Te * ee));
14148
- if (!(fe < 0)) {
14149
- var ne = xe * (w * (W * ue - K * Te) + C * (K * Ae - X * ue) + I * (X * Te - W * Ae));
14150
- if (!(ne < 0) && !(fe + ne > ve)) {
14151
- var oe = -xe * (Ae * ae + Te * pe + ue * le);
14152
- if (!(oe < 0)) {
14153
- var de = oe / ve, me = new BVHVector3(T + w * de, S + C * de, R + I * de), Ne = new BVHIntersect(O, z, U, F, me);
14154
- (!u || u(Ne)) && (s ? de < v && (v = de, l.length > 0 && (l.length = 0), l.push(Ne)) : l.push(Ne));
14161
+ var ye = T - N, xe = S - D, le = R - Q, he = ge * (w * (xe * re - le * te) + C * (le * ee - ye * re) + I * (ye * te - xe * ee));
14162
+ if (!(he < 0)) {
14163
+ var ne = ge * (w * (Z * le - K * xe) + C * (K * ye - W * le) + I * (W * xe - Z * ye));
14164
+ if (!(ne < 0) && !(he + ne > de)) {
14165
+ var se = -ge * (ye * ie + xe * ce + le * ae);
14166
+ if (!(se < 0)) {
14167
+ var pe = se / de, me = new BVHVector3(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z, U, O, me);
14168
+ (!u || u(Ne)) && (s ? pe < v && (v = pe, l.length > 0 && (l.length = 0), l.push(Ne)) : l.push(Ne));
14155
14169
  }
14156
14170
  }
14157
14171
  }
@@ -14211,18 +14225,18 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14211
14225
  return R[M] - R[H];
14212
14226
  };
14213
14227
  function I(H) {
14214
- var M = H.startIndex, B = H.endIndex, F = H.extents;
14215
- R[0] = F[3] - F[0], R[1] = F[4] - F[1], R[2] = F[5] - F[2];
14216
- for (var L = w.sort(C)[0], O = ORDER_AXISES[L], N = (F[L] + F[L + 3]) / 2, D = M, J = B - 1, z = -1, G; D <= J; )
14217
- z === -1 ? (G = l[D], s(G, scratchVector3$8), scratchVector3$8[O] < N ? D++ : z = G) : (G = l[J], s(G, scratchVector3$8), scratchVector3$8[O] >= N || (l[D] = G, l[J] = z, z = -1, D++), J--);
14228
+ var M = H.startIndex, B = H.endIndex, O = H.extents;
14229
+ R[0] = O[3] - O[0], R[1] = O[4] - O[1], R[2] = O[5] - O[2];
14230
+ for (var L = w.sort(C)[0], F = ORDER_AXISES[L], N = (O[L] + O[L + 3]) / 2, D = M, Q = B - 1, z = -1, G; D <= Q; )
14231
+ z === -1 ? (G = l[D], s(G, scratchVector3$8), scratchVector3$8[F] < N ? D++ : z = G) : (G = l[Q], s(G, scratchVector3$8), scratchVector3$8[F] >= N || (l[D] = G, l[Q] = z, z = -1, D++), Q--);
14218
14232
  if (D > M) {
14219
- var V = F.slice();
14220
- V[L + 3] = N + EPSILON;
14221
- var Q = new BVHNode(++d, V, M, D, H.deepth + 1);
14222
- Q.deepth < r && Q.endIndex - Q.startIndex > e && (c[f++] = Q), H.node0 = Q;
14233
+ var J = O.slice();
14234
+ J[L + 3] = N + EPSILON;
14235
+ var V = new BVHNode(++d, J, M, D, H.deepth + 1);
14236
+ V.deepth < r && V.endIndex - V.startIndex > e && (c[f++] = V), H.node0 = V;
14223
14237
  }
14224
14238
  if (B > D) {
14225
- var U = F.slice();
14239
+ var U = O.slice();
14226
14240
  U[L] = N - EPSILON;
14227
14241
  var j = new BVHNode(++d, U, D, B, H.deepth + 1);
14228
14242
  j.deepth < r && j.endIndex - j.startIndex > e && (c[f++] = j), H.node1 = j;
@@ -14242,13 +14256,13 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14242
14256
  for (var S = h[b + 6], R = h[b + 7], w = S; w < R; w++) {
14243
14257
  var C = c[w], I = new BVHVector3(0, 0, 0);
14244
14258
  this.getPositionByIndex(C, I);
14245
- var H = I.x, M = I.y, B = I.z, F = e.x, L = e.y, O = e.z, N = r.x, D = r.y, J = r.z, z = N * (H - F) + D * (M - L) + J * (B - O);
14246
- if (z > 0 ? (F += N * z, L += D * z, O += J * z) : z < 0 && (z = 0), N = H - F, D = M - L, J = B - O, N * N + D * D + J * J <= m) {
14247
- var G = new BVHVector3(F, L, O), V = new BVHIntersect(I, I, I, C, G);
14248
- (!u || u(V)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(V)) : l.push(V));
14259
+ var H = I.x, M = I.y, B = I.z, O = e.x, L = e.y, F = e.z, N = r.x, D = r.y, Q = r.z, z = N * (H - O) + D * (M - L) + Q * (B - F);
14260
+ if (z > 0 ? (O += N * z, L += D * z, F += Q * z) : z < 0 && (z = 0), N = H - O, D = M - L, Q = B - F, N * N + D * D + Q * Q <= m) {
14261
+ var G = new BVHVector3(O, L, F), J = new BVHIntersect(I, I, I, C, G);
14262
+ (!u || u(J)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(J)) : l.push(J));
14249
14263
  }
14250
14264
  }
14251
- var Q = y * BYTES_PER_NODE / 2, U = p[Q + 16], j = p[Q + 17];
14265
+ var V = y * BYTES_PER_NODE / 2, U = p[V + 16], j = p[V + 17];
14252
14266
  U && g.push(U), j && g.push(j);
14253
14267
  }
14254
14268
  }
@@ -14305,10 +14319,10 @@ function raycastMesh(n, t, e, r) {
14305
14319
  var I = v.intersectionPoint, H = new THREE.Vector3(I.x, I.y, I.z).applyMatrix4(u), M = e.ray.origin.distanceTo(H);
14306
14320
  if (M < e.near || M > e.far)
14307
14321
  return !1;
14308
- var B = v.pointA, F = v.pointB, L = v.pointC, O = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(B.x, B.y, B.z).applyMatrix4(u), scratchIntersectionFaceB.set(F.x, F.y, F.z).applyMatrix4(u), scratchIntersectionFaceC.set(L.x, L.y, L.z).applyMatrix4(u), new THREE.Vector3()), N = e.ray.direction.dot(O);
14322
+ var B = v.pointA, O = v.pointB, L = v.pointC, F = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(B.x, B.y, B.z).applyMatrix4(u), scratchIntersectionFaceB.set(O.x, O.y, O.z).applyMatrix4(u), scratchIntersectionFaceC.set(L.x, L.y, L.z).applyMatrix4(u), new THREE.Vector3()), N = e.ray.direction.dot(F);
14309
14323
  if (S.side === THREE.FrontSide && N >= 0 || S.side === THREE.BackSide && N <= 0)
14310
14324
  return !1;
14311
- var D = new THREE.Face3(p ? p.array[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, O), J = {
14325
+ var D = new THREE.Face3(p ? p.array[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, F), Q = {
14312
14326
  distance: M,
14313
14327
  object: n,
14314
14328
  face: D,
@@ -14316,7 +14330,7 @@ function raycastMesh(n, t, e, r) {
14316
14330
  distanceToRay: 0,
14317
14331
  faceIndex: b
14318
14332
  };
14319
- return intersectsMap.set(v, J), l(J);
14333
+ return intersectsMap.set(v, Q), l(Q);
14320
14334
  }), A = m.length, g = 0; g < A; g++) {
14321
14335
  var y = intersectsMap.get(m[g]);
14322
14336
  y && r.push(y);
@@ -14334,8 +14348,8 @@ function raycastPoints(n, t, e, r) {
14334
14348
  return !1;
14335
14349
  var C = T.pointA, I = scratchIntersectionFaceA.set(C.x, C.y, C.z).applyMatrix4(c), H = T.index, M = m ? m.array[H] : H, B;
14336
14350
  if (g) {
14337
- var F = new THREE.Vector3().fromBufferAttribute(A, M).applyNormalMatrix(scratchNormalMatrix);
14338
- B = new THREE.Face3(M, M, M, F);
14351
+ var O = new THREE.Vector3().fromBufferAttribute(A, M).applyNormalMatrix(scratchNormalMatrix);
14352
+ B = new THREE.Face3(M, M, M, O);
14339
14353
  }
14340
14354
  var L = {
14341
14355
  distance: w,
@@ -15556,17 +15570,17 @@ function build(n, t) {
15556
15570
  for (var y = [], v = function(R, w) {
15557
15571
  var C = m[R], I = C.name + "_" + C.smooth + "_" + A, H = n.materials[I];
15558
15572
  if (!H) {
15559
- for (var M = null, B = 0, F = t; B < F.length; B++) {
15560
- var L = F[B], O = L.name, N = L.create;
15561
- O === C.mtllib && (M = N(C.name));
15573
+ for (var M = null, B = 0, O = t; B < O.length; B++) {
15574
+ var L = O[B], F = L.name, N = L.create;
15575
+ F === C.mtllib && (M = N(C.name));
15562
15576
  }
15563
15577
  if (!M) {
15564
15578
  var D = new PBMMeshMaterial();
15565
15579
  M = [D, Promise.resolve([])];
15566
15580
  }
15567
15581
  H = M[0], H.name = C.name, H.flatShading = !(C.smooth || g.attributes.normal), H.vertexColors = A, n.materials[I] = H;
15568
- var J = M[1];
15569
- r.push(J), o.push(function() {
15582
+ var Q = M[1];
15583
+ r.push(Q), o.push(function() {
15570
15584
  return H.dispose();
15571
15585
  });
15572
15586
  }
@@ -16443,8 +16457,8 @@ var Tile3D = (
16443
16457
  }
16444
16458
  if (w || this.tileset.update(S, R), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(ne) {
16445
16459
  if (c.refineProgress[1]++, ne.content) {
16446
- var oe = ne.content.loadState;
16447
- if (oe === "UNLOADED" || oe === "LOADING") {
16460
+ var se = ne.content.loadState;
16461
+ if (se === "UNLOADED" || se === "LOADING") {
16448
16462
  c.refined = !1;
16449
16463
  return;
16450
16464
  }
@@ -16457,7 +16471,7 @@ var Tile3D = (
16457
16471
  if (c.loaded !== !1 && ne.content) {
16458
16472
  if (ne.state.visible && (M = !0), S.skipLevelOfDetail) {
16459
16473
  if (ne.state.finalResolution) {
16460
- var oe = ne.state.ancestorWithContentAvailable, de = oe && oe.content ? oe.content : ne.content, me = de.loadState;
16474
+ var se = ne.state.ancestorWithContentAvailable, pe = se && se.content ? se.content : ne.content, me = pe.loadState;
16461
16475
  (me === "UNLOADED" || me === "LOADING") && (c.loaded = !1);
16462
16476
  }
16463
16477
  } else if (ne.state.visible && ne.levelOfContent <= 0) {
@@ -16467,48 +16481,48 @@ var Tile3D = (
16467
16481
  }
16468
16482
  }), M && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16469
16483
  }
16470
- this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), S.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(ne, oe) {
16471
- return ne.floor !== oe.floor ? ne.floor - oe.floor : ne.levelOfContent !== oe.levelOfContent ? oe.levelOfContent - ne.levelOfContent : ne.state.distanceToCamera !== oe.state.distanceToCamera ? ne.state.distanceToCamera - oe.state.distanceToCamera : ne.state.centerZDepth - oe.state.centerZDepth;
16484
+ this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), S.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(ne, se) {
16485
+ return ne.floor !== se.floor ? ne.floor - se.floor : ne.levelOfContent !== se.levelOfContent ? se.levelOfContent - ne.levelOfContent : ne.state.distanceToCamera !== se.state.distanceToCamera ? ne.state.distanceToCamera - se.state.distanceToCamera : ne.state.centerZDepth - se.state.centerZDepth;
16472
16486
  });
16473
- for (var B = [], F = 0, L = this.tileset.selectedTiles; F < L.length; F++) {
16474
- var O = L[F], N = (d = (f = O.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
16487
+ for (var B = [], O = 0, L = this.tileset.selectedTiles; O < L.length; O++) {
16488
+ var F = L[O], N = (d = (f = F.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
16475
16489
  if (N) {
16476
- var D = N.update(e, r, o, this, O, g);
16477
- if (B.push(O.id), D && (A = !0), this.tileset.hasMixedContent && S.skipLevelOfDetail) {
16478
- if (!O.state.finalResolution) {
16479
- var J = cloneSkipBackfaceObject(N);
16480
- J.name = "skipBackface:" + N.name, this.backfaceObjects.push(J);
16490
+ var D = N.update(e, r, o, this, F, g);
16491
+ if (B.push(F.id), D && (A = !0), this.tileset.hasMixedContent && S.skipLevelOfDetail) {
16492
+ if (!F.state.finalResolution) {
16493
+ var Q = cloneSkipBackfaceObject(N);
16494
+ Q.name = "skipBackface:" + N.name, this.backfaceObjects.push(Q);
16481
16495
  }
16482
- for (var z = O.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, V = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, j = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, Y = 0, Z = N.materials; Y < Z.length; Y++) {
16483
- var X = Z[Y];
16484
- X.stencilWrite = !0, X.stencilRef = G, X.stencilFunc = V, X.stencilFuncMask = Q, X.stencilZPass = U, X.stencilWriteMask = j;
16496
+ for (var z = F.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, J = THREE.GreaterEqualStencilFunc, V = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, j = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, Y = N.materials; X < Y.length; X++) {
16497
+ var W = Y[X];
16498
+ W.stencilWrite = !0, W.stencilRef = G, W.stencilFunc = J, W.stencilFuncMask = V, W.stencilZPass = U, W.stencilWriteMask = j;
16485
16499
  }
16486
16500
  } else
16487
- for (var W = 0, K = N.materials; W < K.length; W++) {
16488
- var X = K[W];
16489
- X.stencilWrite = !1, X.stencilRef = STENCIL_CONSTANT.TILE_MASK, X.stencilFunc = THREE.AlwaysStencilFunc, X.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, X.stencilZPass = THREE.ReplaceStencilOp, X.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16501
+ for (var Z = 0, K = N.materials; Z < K.length; Z++) {
16502
+ var W = K[Z];
16503
+ W.stencilWrite = !1, W.stencilRef = STENCIL_CONSTANT.TILE_MASK, W.stencilFunc = THREE.AlwaysStencilFunc, W.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, W.stencilZPass = THREE.ReplaceStencilOp, W.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16490
16504
  }
16491
16505
  this.tileObjects.push(N);
16492
16506
  }
16493
16507
  }
16494
16508
  var ee = B.toString();
16495
16509
  tileVersionMap.get(this) !== ee && (tileVersionMap.set(this, ee), A = !0), S.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), S.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16496
- for (var te = [], re = 0, ae = this.tileset.selectedTrajectories; re < ae.length; re++) {
16497
- var pe = ae[re], le = (h = pe.content.data) === null || h === void 0 ? void 0 : h.object;
16498
- if (le) {
16499
- var D = le.update(e, r, o, this, pe, g);
16500
- te.push(pe.id), D && (A = !0), this.renderObjects.push(le);
16501
- }
16502
- }
16503
- var ve = te.toString();
16504
- trajectoryVersionMap.get(this) !== ve && (trajectoryVersionMap.set(this, ve), A = !0);
16505
- for (var xe = Math.min(0, ((m = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && m !== void 0 ? m : []).indexOf(this)), Ae = xe * 1e4, Te = function(ne) {
16506
- var oe = ue.renderObjects[ne], de = ne + Ae;
16507
- oe.traverse(function(me) {
16508
- (me instanceof THREE.Mesh || me instanceof THREE.Line || me instanceof THREE.Points) && (me.renderOrder = de);
16509
- }), ue.add(oe);
16510
- }, ue = this, fe = 0; fe < this.renderObjects.length; fe++)
16511
- Te(fe);
16510
+ for (var te = [], re = 0, ie = this.tileset.selectedTrajectories; re < ie.length; re++) {
16511
+ var ce = ie[re], ae = (h = ce.content.data) === null || h === void 0 ? void 0 : h.object;
16512
+ if (ae) {
16513
+ var D = ae.update(e, r, o, this, ce, g);
16514
+ te.push(ce.id), D && (A = !0), this.renderObjects.push(ae);
16515
+ }
16516
+ }
16517
+ var de = te.toString();
16518
+ trajectoryVersionMap.get(this) !== de && (trajectoryVersionMap.set(this, de), A = !0);
16519
+ for (var ge = Math.min(0, ((m = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && m !== void 0 ? m : []).indexOf(this)), ye = ge * 1e4, xe = function(ne) {
16520
+ var se = le.renderObjects[ne], pe = ne + ye;
16521
+ se.traverse(function(me) {
16522
+ (me instanceof THREE.Mesh || me instanceof THREE.Line || me instanceof THREE.Points) && (me.renderOrder = pe);
16523
+ }), le.add(se);
16524
+ }, le = this, he = 0; he < this.renderObjects.length; he++)
16525
+ xe(he);
16512
16526
  return A;
16513
16527
  }, t.prototype.dispose = function() {
16514
16528
  this.disposed = !0, this.tileset.reset(), this.tileset.root.children.length = 0, /^blob\:/.test(this.tileset.id) && URL.revokeObjectURL(this.tileset.id), this.remove.apply(this, this.children), this.refined = !1, this.loaded = !1, this.refineProgress[0] = this.refineProgress[1] = 0, this.error = null, this.onError = void 0, this.renderer = void 0;
@@ -16964,10 +16978,10 @@ var BufferGeometryUtils = {
16964
16978
  for (var c = e.tangent.array, f = [], d = [], h = 0; h < l; h++)
16965
16979
  f[h] = new THREE.Vector3(), d[h] = new THREE.Vector3();
16966
16980
  var p = new THREE.Vector3(), m = new THREE.Vector3(), A = new THREE.Vector3(), g = new THREE.Vector2(), y = new THREE.Vector2(), v = new THREE.Vector2(), E = new THREE.Vector3(), b = new THREE.Vector3();
16967
- function T(G, V, Q) {
16968
- p.fromArray(o, G * 3), m.fromArray(o, V * 3), A.fromArray(o, Q * 3), g.fromArray(u, G * 2), y.fromArray(u, V * 2), v.fromArray(u, Q * 2);
16969
- var U = m.x - p.x, j = A.x - p.x, Y = m.y - p.y, Z = A.y - p.y, X = m.z - p.z, W = A.z - p.z, K = y.x - g.x, ee = v.x - g.x, te = y.y - g.y, re = v.y - g.y, ae = 1 / (K * re - ee * te);
16970
- E.set((re * U - te * j) * ae, (re * Y - te * Z) * ae, (re * X - te * W) * ae), b.set((K * j - ee * U) * ae, (K * Z - ee * Y) * ae, (K * W - ee * X) * ae), f[G].add(E), f[V].add(E), f[Q].add(E), d[G].add(b), d[V].add(b), d[Q].add(b);
16981
+ function T(G, J, V) {
16982
+ p.fromArray(o, G * 3), m.fromArray(o, J * 3), A.fromArray(o, V * 3), g.fromArray(u, G * 2), y.fromArray(u, J * 2), v.fromArray(u, V * 2);
16983
+ var U = m.x - p.x, j = A.x - p.x, X = m.y - p.y, Y = A.y - p.y, W = m.z - p.z, Z = A.z - p.z, K = y.x - g.x, ee = v.x - g.x, te = y.y - g.y, re = v.y - g.y, ie = 1 / (K * re - ee * te);
16984
+ E.set((re * U - te * j) * ie, (re * X - te * Y) * ie, (re * W - te * Z) * ie), b.set((K * j - ee * U) * ie, (K * Y - ee * X) * ie, (K * Z - ee * W) * ie), f[G].add(E), f[J].add(E), f[V].add(E), d[G].add(b), d[J].add(b), d[V].add(b);
16971
16985
  }
16972
16986
  var S = n.groups;
16973
16987
  S.length === 0 && (S = [{
@@ -16977,9 +16991,9 @@ var BufferGeometryUtils = {
16977
16991
  for (var h = 0, R = S.length; h < R; ++h)
16978
16992
  for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
16979
16993
  T(r[H + 0], r[H + 1], r[H + 2]);
16980
- var B = new THREE.Vector3(), F = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), N, D, J;
16994
+ var B = new THREE.Vector3(), O = new THREE.Vector3(), L = new THREE.Vector3(), F = new THREE.Vector3(), N, D, Q;
16981
16995
  function z(G) {
16982
- L.fromArray(s, G * 3), O.copy(L), D = f[G], B.copy(D), B.sub(L.multiplyScalar(L.dot(D))).normalize(), F.crossVectors(O, D), J = F.dot(d[G]), N = J < 0 ? -1 : 1, c[G * 4] = B.x, c[G * 4 + 1] = B.y, c[G * 4 + 2] = B.z, c[G * 4 + 3] = N;
16996
+ L.fromArray(s, G * 3), F.copy(L), D = f[G], B.copy(D), B.sub(L.multiplyScalar(L.dot(D))).normalize(), O.crossVectors(F, D), Q = O.dot(d[G]), N = Q < 0 ? -1 : 1, c[G * 4] = B.x, c[G * 4 + 1] = B.y, c[G * 4 + 2] = B.z, c[G * 4 + 3] = N;
16983
16997
  }
16984
16998
  for (var h = 0, R = S.length; h < R; ++h)
16985
16999
  for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
@@ -17126,15 +17140,15 @@ var BufferGeometryUtils = {
17126
17140
  e[b] = u, d.push(u), u++;
17127
17141
  }
17128
17142
  }
17129
- for (var F = n.clone(), p = 0, m = l.length; p < m; p++) {
17130
- var A = l[p], L = n.getAttribute(A), O = new L.array.constructor(c[A]), S = new THREE.BufferAttribute(O, L.itemSize, L.normalized);
17131
- if (F.setAttribute(A, S), A in f)
17143
+ for (var O = n.clone(), p = 0, m = l.length; p < m; p++) {
17144
+ var A = l[p], L = n.getAttribute(A), F = new L.array.constructor(c[A]), S = new THREE.BufferAttribute(F, L.itemSize, L.normalized);
17145
+ if (O.setAttribute(A, S), A in f)
17132
17146
  for (var T = 0; T < f[A].length; T++) {
17133
- var N = n.morphAttributes[A][T], O = new N.array.constructor(f[A][T]), D = new THREE.BufferAttribute(O, N.itemSize, N.normalized);
17134
- F.morphAttributes[A][T] = D;
17147
+ var N = n.morphAttributes[A][T], F = new N.array.constructor(f[A][T]), D = new THREE.BufferAttribute(F, N.itemSize, N.normalized);
17148
+ O.morphAttributes[A][T] = D;
17135
17149
  }
17136
17150
  }
17137
- return F.setIndex(d), F;
17151
+ return O.setIndex(d), O;
17138
17152
  }
17139
17153
  }, scratchSphere$1 = new THREE.Sphere(), scratchMatrix4$1 = new THREE.Matrix4(), scratchMatrix4Inverse = new THREE.Matrix4();
17140
17154
  function getEdgesBySphere(n, t, e) {
@@ -17145,13 +17159,13 @@ function getEdgesBySphere(n, t, e) {
17145
17159
  var f, d, h, p = (d = (f = c.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
17146
17160
  if (p && p.visible) {
17147
17161
  var m = [];
17148
- if (p.traverseVisible(function(V) {
17149
- if (V instanceof THREE.Mesh) {
17150
- var Q = getBvhTreeForMesh(V);
17151
- if (Q) {
17152
- scratchMatrix4$1.copy(V.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17153
- var U = Q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), j = new THREE.BufferGeometry();
17154
- j.setAttribute("position", new THREE.BufferAttribute(U, 3)), j.applyMatrix4(V.matrixWorld), j = BufferGeometryUtils.mergeVertices(j, 0.01), m.push(j);
17162
+ if (p.traverseVisible(function(J) {
17163
+ if (J instanceof THREE.Mesh) {
17164
+ var V = getBvhTreeForMesh(J);
17165
+ if (V) {
17166
+ scratchMatrix4$1.copy(J.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17167
+ var U = V.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), j = new THREE.BufferGeometry();
17168
+ j.setAttribute("position", new THREE.BufferAttribute(U, 3)), j.applyMatrix4(J.matrixWorld), j = BufferGeometryUtils.mergeVertices(j, 0.01), m.push(j);
17155
17169
  }
17156
17170
  }
17157
17171
  }), m.length === 0)
@@ -17165,14 +17179,14 @@ function getEdgesBySphere(n, t, e) {
17165
17179
  b.push({ a: w, b: C, c: I, normal: H });
17166
17180
  }
17167
17181
  for (var M = {}, T = 0, S = b.length; T < S; T++)
17168
- for (var B = b[T], F = 0; F < 3; F++) {
17169
- var L = B[A[F]], O = B[A[(F + 1) % 3]], N = [Math.min(L, O), Math.max(L, O)], D = N[0] + "-" + N[1];
17182
+ for (var B = b[T], O = 0; O < 3; O++) {
17183
+ var L = B[A[O]], F = B[A[(O + 1) % 3]], N = [Math.min(L, F), Math.max(L, F)], D = N[0] + "-" + N[1];
17170
17184
  M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: T } : M[D].face2 = T;
17171
17185
  }
17172
17186
  for (var D in M) {
17173
- var J = M[D];
17174
- if (J.face2 === void 0 || b[J.face1].normal.dot(b[J.face2].normal) <= r) {
17175
- var z = E[J.index1], G = E[J.index2];
17187
+ var Q = M[D];
17188
+ if (Q.face2 === void 0 || b[Q.face1].normal.dot(b[Q.face2].normal) <= r) {
17189
+ var z = E[Q.index1], G = E[Q.index2];
17176
17190
  o.push(new THREE.Line3(z, G));
17177
17191
  }
17178
17192
  }
@@ -17967,10 +17981,10 @@ function parse(n, t) {
17967
17981
  configurable: !1,
17968
17982
  writable: !1,
17969
17983
  value: (function() {
17970
- var U, j, Y, Z = [];
17984
+ var U, j, X, Y = [];
17971
17985
  if (Array.isArray(H.model.layers))
17972
- for (var X = 0, W = H.model.layers; X < W.length; X++) {
17973
- var K = W[X];
17986
+ for (var W = 0, Z = H.model.layers; W < Z.length; W++) {
17987
+ var K = Z[W];
17974
17988
  if (K && K.tileset_url) {
17975
17989
  var ee = {};
17976
17990
  defineProperty(ee, "work", {
@@ -17992,13 +18006,13 @@ function parse(n, t) {
17992
18006
  enumerable: !0,
17993
18007
  configurable: !1,
17994
18008
  writable: !1,
17995
- value: (Y = K.up_axis) !== null && Y !== void 0 ? Y : "Z"
18009
+ value: (X = K.up_axis) !== null && X !== void 0 ? X : "Z"
17996
18010
  }), defineProperty(ee, "tileset", {
17997
18011
  enumerable: !0,
17998
18012
  configurable: !1,
17999
18013
  writable: !1,
18000
18014
  value: relativeURL(K.tileset_url, t.baseURL)
18001
- }), Z.push(ee);
18015
+ }), Y.push(ee);
18002
18016
  }
18003
18017
  }
18004
18018
  if (typeof H.model.tiles == "object") {
@@ -18030,10 +18044,10 @@ function parse(n, t) {
18030
18044
  configurable: !1,
18031
18045
  writable: !1,
18032
18046
  value: relativeURL(K.tileset_url, t.baseURL)
18033
- }), Z.push(ee);
18047
+ }), Y.push(ee);
18034
18048
  }
18035
18049
  }
18036
- return Object.freeze(Z);
18050
+ return Object.freeze(Y);
18037
18051
  })()
18038
18052
  })), defineProperty(t, "model", {
18039
18053
  enumerable: !0,
@@ -18043,84 +18057,84 @@ function parse(n, t) {
18043
18057
  });
18044
18058
  var B = [];
18045
18059
  if (Array.isArray(H.observers) && H.panorama && Array.isArray(H.panorama.list || H.panorama.info))
18046
- for (var F = H.observers, L = (r = H.panorama.list || H.panorama.info) !== null && r !== void 0 ? r : [], O = (f = (l = (s = (o = H.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = H.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = H.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", N = Math.min(F.length, L.length), D = function(U) {
18047
- var j = F[U], Y = L[U], Z = {};
18048
- defineProperty(Z, "work", {
18060
+ for (var O = H.observers, L = (r = H.panorama.list || H.panorama.info) !== null && r !== void 0 ? r : [], F = (f = (l = (s = (o = H.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = H.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = H.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", N = Math.min(O.length, L.length), D = function(U) {
18061
+ var j = O[U], X = L[U], Y = {};
18062
+ defineProperty(Y, "work", {
18049
18063
  enumerable: !1,
18050
18064
  configurable: !1,
18051
18065
  writable: !1,
18052
18066
  value: t
18053
- }), defineProperty(Z, "index", {
18067
+ }), defineProperty(Y, "index", {
18054
18068
  enumerable: !0,
18055
18069
  configurable: !1,
18056
18070
  writable: !1,
18057
18071
  value: U
18058
- }), defineProperty(Z, "panoIndex", {
18072
+ }), defineProperty(Y, "panoIndex", {
18059
18073
  enumerable: !0,
18060
18074
  configurable: !1,
18061
18075
  writable: !1,
18062
18076
  value: U
18063
- }), defineProperty(Z, "panoId", {
18077
+ }), defineProperty(Y, "panoId", {
18064
18078
  enumerable: !0,
18065
18079
  configurable: !1,
18066
18080
  writable: !1,
18067
18081
  value: panoStringify({ workCode: t.workCode, panoIndex: U })
18068
- }), defineProperty(Z, "derivedId", {
18082
+ }), defineProperty(Y, "derivedId", {
18069
18083
  enumerable: !0,
18070
18084
  configurable: !1,
18071
18085
  writable: !1,
18072
- value: (d = j.derived_id) !== null && d !== void 0 ? d : Y.derived_id
18073
- }), defineProperty(Z, "floorIndex", {
18086
+ value: (d = j.derived_id) !== null && d !== void 0 ? d : X.derived_id
18087
+ }), defineProperty(Y, "floorIndex", {
18074
18088
  enumerable: !0,
18075
18089
  configurable: !1,
18076
18090
  writable: !1,
18077
18091
  value: (h = j.floor_index) !== null && h !== void 0 ? h : j.floor
18078
- }), defineProperty(Z, "derivedId", {
18092
+ }), defineProperty(Y, "derivedId", {
18079
18093
  enumerable: !0,
18080
18094
  configurable: !1,
18081
18095
  writable: !1,
18082
- value: (p = j.derived_id) !== null && p !== void 0 ? p : Y.derived_id
18083
- }), defineProperty(Z, "derivedIdStr", {
18096
+ value: (p = j.derived_id) !== null && p !== void 0 ? p : X.derived_id
18097
+ }), defineProperty(Y, "derivedIdStr", {
18084
18098
  enumerable: !0,
18085
18099
  configurable: !1,
18086
18100
  writable: !1,
18087
- value: (m = j.derived_id_str) !== null && m !== void 0 ? m : Y.derived_id_str
18088
- }), defineProperty(Z, "active", {
18101
+ value: (m = j.derived_id_str) !== null && m !== void 0 ? m : X.derived_id_str
18102
+ }), defineProperty(Y, "active", {
18089
18103
  enumerable: !0,
18090
18104
  configurable: !1,
18091
18105
  writable: !1,
18092
- value: j.active !== !1 && Y.active !== !1
18093
- }), defineProperty(Z, "loadable", {
18106
+ value: j.active !== !1 && X.active !== !1
18107
+ }), defineProperty(Y, "loadable", {
18094
18108
  enumerable: !0,
18095
18109
  configurable: !1,
18096
18110
  writable: !1,
18097
- value: (g = (A = j.active) !== null && A !== void 0 ? A : Y.active) !== null && g !== void 0 ? g : !1
18098
- }), defineProperty(Z, "position", {
18111
+ value: (g = (A = j.active) !== null && A !== void 0 ? A : X.active) !== null && g !== void 0 ? g : !1
18112
+ }), defineProperty(Y, "position", {
18099
18113
  enumerable: !0,
18100
18114
  configurable: !1,
18101
18115
  writable: !1,
18102
18116
  value: Object.freeze(new THREE.Vector3().fromArray((y = j.position) !== null && y !== void 0 ? y : [0, 0, 0]))
18103
- }), defineProperty(Z, "standingPosition", {
18117
+ }), defineProperty(Y, "standingPosition", {
18104
18118
  enumerable: !0,
18105
18119
  configurable: !1,
18106
18120
  writable: !1,
18107
18121
  value: Object.freeze(new THREE.Vector3().fromArray((E = (v = j.standing_position) !== null && v !== void 0 ? v : j.standingPosition) !== null && E !== void 0 ? E : [0, 0, 0]))
18108
- }), defineProperty(Z, "quaternion", {
18122
+ }), defineProperty(Y, "quaternion", {
18109
18123
  enumerable: !0,
18110
18124
  configurable: !1,
18111
18125
  writable: !1,
18112
18126
  value: Object.freeze(new THREE.Quaternion().fromArray(j.quaternion ? [j.quaternion.x, j.quaternion.y, j.quaternion.z, j.quaternion.w] : [0, 0, 0, 1]))
18113
- }), defineProperty(Z, "matrix", {
18127
+ }), defineProperty(Y, "matrix", {
18114
18128
  enumerable: !0,
18115
18129
  configurable: !1,
18116
18130
  writable: !1,
18117
- value: Object.freeze(new THREE.Matrix4().compose(Z.position, Z.quaternion, PANO_TEXTURE_SCALE))
18118
- }), defineProperty(Z, "accessibleNodes", {
18131
+ value: Object.freeze(new THREE.Matrix4().compose(Y.position, Y.quaternion, PANO_TEXTURE_SCALE))
18132
+ }), defineProperty(Y, "accessibleNodes", {
18119
18133
  enumerable: !0,
18120
18134
  configurable: !1,
18121
18135
  writable: !1,
18122
18136
  value: (function() {
18123
- var X, W, K = ((W = (X = j.accessible_nodes) !== null && X !== void 0 ? X : j.accessibleNodes) !== null && W !== void 0 ? W : []).filter(function(te) {
18137
+ var W, Z, K = ((Z = (W = j.accessible_nodes) !== null && W !== void 0 ? W : j.accessibleNodes) !== null && Z !== void 0 ? Z : []).filter(function(te) {
18124
18138
  return te < N;
18125
18139
  });
18126
18140
  if (K.length === 0)
@@ -18128,12 +18142,12 @@ function parse(n, t) {
18128
18142
  ee !== U && K.push(ee);
18129
18143
  return Object.freeze(K);
18130
18144
  })()
18131
- }), defineProperty(Z, "visibleNodes", {
18145
+ }), defineProperty(Y, "visibleNodes", {
18132
18146
  enumerable: !0,
18133
18147
  configurable: !1,
18134
18148
  writable: !1,
18135
18149
  value: (function() {
18136
- var X, W, K = ((W = (X = j.visible_nodes) !== null && X !== void 0 ? X : j.visibleNodes) !== null && W !== void 0 ? W : []).filter(function(te) {
18150
+ var W, Z, K = ((Z = (W = j.visible_nodes) !== null && W !== void 0 ? W : j.visibleNodes) !== null && Z !== void 0 ? Z : []).filter(function(te) {
18137
18151
  return te < N;
18138
18152
  });
18139
18153
  if (K.length === 0)
@@ -18141,165 +18155,165 @@ function parse(n, t) {
18141
18155
  ee !== U && K.push(ee);
18142
18156
  return Object.freeze(K);
18143
18157
  })()
18144
- }), defineProperty(Z, "images", {
18158
+ }), defineProperty(Y, "images", {
18145
18159
  enumerable: !0,
18146
18160
  configurable: !1,
18147
18161
  writable: !1,
18148
18162
  value: (function() {
18149
- var X = {};
18150
- defineProperty(X, "work", {
18163
+ var W = {};
18164
+ defineProperty(W, "work", {
18151
18165
  enumerable: !1,
18152
18166
  configurable: !1,
18153
18167
  writable: !1,
18154
18168
  value: t
18155
18169
  });
18156
- for (var W = 0, K = FACE_ORDER$1; W < K.length; W++) {
18157
- var ee = K[W];
18158
- defineProperty(X, ee, {
18170
+ for (var Z = 0, K = FACE_ORDER$1; Z < K.length; Z++) {
18171
+ var ee = K[Z];
18172
+ defineProperty(W, ee, {
18159
18173
  enumerable: !0,
18160
18174
  configurable: !1,
18161
18175
  writable: !1,
18162
- value: relativeURL(panoURL(Y[ee], O, U), t.baseURL)
18176
+ value: relativeURL(panoURL(X[ee], F, U), t.baseURL)
18163
18177
  });
18164
18178
  }
18165
- return defineProperty(X, "sizeList", {
18179
+ return defineProperty(W, "sizeList", {
18166
18180
  enumerable: !0,
18167
18181
  configurable: !1,
18168
18182
  writable: !1,
18169
18183
  value: (function() {
18170
- var te = getImageSizeFromURL(X[FACE_ORDER$1[0]]);
18184
+ var te = getImageSizeFromURL(W[FACE_ORDER$1[0]]);
18171
18185
  if (te) {
18172
- if (Y.size_list) {
18173
- var re = Y.size_list.slice().sort(function(Ae, Te) {
18174
- return Ae - Te;
18186
+ if (X.size_list) {
18187
+ var re = X.size_list.slice().sort(function(ye, xe) {
18188
+ return ye - xe;
18175
18189
  });
18176
18190
  return Object.freeze(re);
18177
- } else if (Y.tiles) {
18191
+ } else if (X.tiles) {
18178
18192
  for (var re = [
18179
18193
  te
18180
- ], ae = Y.tiles.slice().sort(function(Te, ue) {
18181
- return Te - ue;
18182
- }), pe = 0, le = ae; pe < le.length; pe++) {
18183
- var ve = le[pe], xe = 512 * Math.pow(2, ve);
18184
- xe > te && re.push(xe);
18194
+ ], ie = X.tiles.slice().sort(function(xe, le) {
18195
+ return xe - le;
18196
+ }), ce = 0, ae = ie; ce < ae.length; ce++) {
18197
+ var de = ae[ce], ge = 512 * Math.pow(2, de);
18198
+ ge > te && re.push(ge);
18185
18199
  }
18186
18200
  return Object.freeze(re);
18187
18201
  }
18188
18202
  }
18189
18203
  return Object.freeze([]);
18190
18204
  })()
18191
- }), defineProperty(X, "tiles", {
18205
+ }), defineProperty(W, "tiles", {
18192
18206
  enumerable: !0,
18193
18207
  configurable: !1,
18194
18208
  writable: !1,
18195
18209
  value: (function() {
18196
- var te = getImageSizeFromURL(X.front);
18210
+ var te = getImageSizeFromURL(W.front);
18197
18211
  if (te) {
18198
- var re = X.sizeList.slice();
18212
+ var re = W.sizeList.slice();
18199
18213
  if (re[0]) {
18200
- var ae = getTileLevel(re[0]);
18201
- if (ae)
18202
- for (var pe = ae - 1; pe >= 0; pe--)
18203
- re.unshift(512 * Math.pow(2, pe));
18214
+ var ie = getTileLevel(re[0]);
18215
+ if (ie)
18216
+ for (var ce = ie - 1; ce >= 0; ce--)
18217
+ re.unshift(512 * Math.pow(2, ce));
18204
18218
  }
18205
18219
  if (!(re.length <= 0)) {
18206
- for (var le = [], ve = 0, xe = re; ve < xe.length; ve++) {
18207
- var Ae = xe[ve], Te = getTileLevel(Ae);
18208
- if (typeof Te == "number") {
18209
- var ue = {};
18210
- if (defineProperty(ue, "work", {
18220
+ for (var ae = [], de = 0, ge = re; de < ge.length; de++) {
18221
+ var ye = ge[de], xe = getTileLevel(ye);
18222
+ if (typeof xe == "number") {
18223
+ var le = {};
18224
+ if (defineProperty(le, "work", {
18211
18225
  enumerable: !1,
18212
18226
  configurable: !1,
18213
18227
  writable: !1,
18214
18228
  value: t
18215
- }), defineProperty(ue, "level", {
18229
+ }), defineProperty(le, "level", {
18216
18230
  enumerable: !0,
18217
18231
  configurable: !1,
18218
18232
  writable: !1,
18219
- value: Te
18220
- }), Ae > te) {
18221
- defineProperty(ue, "size", {
18233
+ value: xe
18234
+ }), ye > te) {
18235
+ defineProperty(le, "size", {
18222
18236
  enumerable: !0,
18223
18237
  configurable: !1,
18224
18238
  writable: !1,
18225
- value: Ae
18226
- }), defineProperty(ue, "scale", {
18239
+ value: ye
18240
+ }), defineProperty(le, "scale", {
18227
18241
  enumerable: !0,
18228
18242
  configurable: !1,
18229
18243
  writable: !1,
18230
18244
  value: 1
18231
18245
  });
18232
- for (var fe = 0, ne = FACE_ORDER$1; fe < ne.length; fe++) {
18233
- var oe = ne[fe];
18234
- defineProperty(ue, oe, {
18246
+ for (var he = 0, ne = FACE_ORDER$1; he < ne.length; he++) {
18247
+ var se = ne[he];
18248
+ defineProperty(le, se, {
18235
18249
  enumerable: !0,
18236
18250
  configurable: !1,
18237
18251
  writable: !1,
18238
- value: replaceImageSize(X[oe], Ae)
18252
+ value: replaceImageSize(W[se], ye)
18239
18253
  });
18240
18254
  }
18241
18255
  } else {
18242
- defineProperty(ue, "size", {
18256
+ defineProperty(le, "size", {
18243
18257
  enumerable: !0,
18244
18258
  configurable: !1,
18245
18259
  writable: !1,
18246
18260
  value: te
18247
- }), defineProperty(ue, "scale", {
18261
+ }), defineProperty(le, "scale", {
18248
18262
  enumerable: !0,
18249
18263
  configurable: !1,
18250
18264
  writable: !1,
18251
- value: Ae / te
18265
+ value: ye / te
18252
18266
  });
18253
- for (var de = 0, me = FACE_ORDER$1; de < me.length; de++) {
18254
- var oe = me[de];
18255
- defineProperty(ue, oe, {
18267
+ for (var pe = 0, me = FACE_ORDER$1; pe < me.length; pe++) {
18268
+ var se = me[pe];
18269
+ defineProperty(le, se, {
18256
18270
  enumerable: !0,
18257
18271
  configurable: !1,
18258
18272
  writable: !1,
18259
- value: X[oe]
18273
+ value: W[se]
18260
18274
  });
18261
18275
  }
18262
18276
  }
18263
- le.push(ue);
18277
+ ae.push(le);
18264
18278
  }
18265
18279
  }
18266
- return le = sortTile(le), Object.freeze(le);
18280
+ return ae = sortTile(ae), Object.freeze(ae);
18267
18281
  }
18268
18282
  }
18269
18283
  })()
18270
- }), X;
18284
+ }), W;
18271
18285
  })()
18272
- }), defineProperty(Z, "video", {
18286
+ }), defineProperty(Y, "video", {
18273
18287
  enumerable: !0,
18274
18288
  configurable: !1,
18275
18289
  writable: !1,
18276
18290
  value: (function() {
18277
- var X = void 0;
18278
- return Y.video && (X = {}, defineProperty(X, "work", {
18291
+ var W = void 0;
18292
+ return X.video && (W = {}, defineProperty(W, "work", {
18279
18293
  enumerable: !1,
18280
18294
  configurable: !1,
18281
18295
  writable: !1,
18282
18296
  value: t
18283
- }), defineProperty(X, "source", {
18297
+ }), defineProperty(W, "source", {
18284
18298
  enumerable: !0,
18285
18299
  configurable: !1,
18286
18300
  writable: !1,
18287
- value: Y.video.source
18288
- }), defineProperty(X, "matrix", {
18301
+ value: X.video.source
18302
+ }), defineProperty(W, "matrix", {
18289
18303
  enumerable: !0,
18290
18304
  configurable: !1,
18291
18305
  writable: !1,
18292
- value: new THREE.Matrix4().fromArray(Y.video.matrix)
18293
- }), defineProperty(X, "size", {
18306
+ value: new THREE.Matrix4().fromArray(X.video.matrix)
18307
+ }), defineProperty(W, "size", {
18294
18308
  enumerable: !0,
18295
18309
  configurable: !1,
18296
18310
  writable: !1,
18297
- value: new THREE.Vector2().fromArray(Y.video.size)
18298
- })), X;
18311
+ value: new THREE.Vector2().fromArray(X.video.size)
18312
+ })), W;
18299
18313
  })()
18300
- }), B.push(Z);
18301
- }, J = 0; J < N; J++)
18302
- D(J);
18314
+ }), B.push(Y);
18315
+ }, Q = 0; Q < N; Q++)
18316
+ D(Q);
18303
18317
  defineProperty(t, "observers", {
18304
18318
  enumerable: !0,
18305
18319
  configurable: !1,
@@ -18354,14 +18368,14 @@ function parse(n, t) {
18354
18368
  writable: !0,
18355
18369
  value: H.initial.distance
18356
18370
  }), Array.isArray(H.initial.offset)) {
18357
- var V = H.initial.offset, Q = [0, 0, 0].map(function(U, j) {
18358
- var Y = Number(V[j]);
18359
- return isNaN(Y) || !isFinite(Y) ? 0 : Y;
18371
+ var J = H.initial.offset, V = [0, 0, 0].map(function(U, j) {
18372
+ var X = Number(J[j]);
18373
+ return isNaN(X) || !isFinite(X) ? 0 : X;
18360
18374
  });
18361
18375
  defineProperty(z, "offset", {
18362
18376
  enumerable: !0,
18363
18377
  writable: !0,
18364
- value: new THREE.Vector3().fromArray(Q)
18378
+ value: new THREE.Vector3().fromArray(V)
18365
18379
  });
18366
18380
  } else typeof H.initial.offset == "object" && typeof H.initial.offset.x == "number" && typeof H.initial.offset.y == "number" && typeof H.initial.offset.z == "number" && defineProperty(z, "offset", {
18367
18381
  enumerable: !0,
@@ -20074,8 +20088,8 @@ var Hammer = (function(n, t, e, r) {
20074
20088
  ` + k + ` AT
20075
20089
  `;
20076
20090
  return function() {
20077
- var $ = new Error("get-stack-trace"), ie = $ && $.stack ? $.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", Ee = n.console && (n.console.warn || n.console.log);
20078
- return Ee && Ee.call(n.console, q, ie), P.apply(this, arguments);
20091
+ var $ = new Error("get-stack-trace"), oe = $ && $.stack ? $.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", be = n.console && (n.console.warn || n.console.log);
20092
+ return be && be.call(n.console, q, oe), P.apply(this, arguments);
20079
20093
  };
20080
20094
  }
20081
20095
  var A;
@@ -20085,14 +20099,14 @@ var Hammer = (function(n, t, e, r) {
20085
20099
  for (var k = Object(_), q = 1; q < arguments.length; q++) {
20086
20100
  var $ = arguments[q];
20087
20101
  if ($ !== r && $ !== null)
20088
- for (var ie in $)
20089
- $.hasOwnProperty(ie) && (k[ie] = $[ie]);
20102
+ for (var oe in $)
20103
+ $.hasOwnProperty(oe) && (k[oe] = $[oe]);
20090
20104
  }
20091
20105
  return k;
20092
20106
  } : A = Object.assign;
20093
20107
  var g = m(function(_, k, q) {
20094
- for (var $ = Object.keys(k), ie = 0; ie < $.length; )
20095
- (!q || q && _[$[ie]] === r) && (_[$[ie]] = k[$[ie]]), ie++;
20108
+ for (var $ = Object.keys(k), oe = 0; oe < $.length; )
20109
+ (!q || q && _[$[oe]] === r) && (_[$[oe]] = k[$[oe]]), oe++;
20096
20110
  return _;
20097
20111
  }, "extend", "Use `assign`."), y = m(function(_, k) {
20098
20112
  return g(_, k, !0);
@@ -20150,38 +20164,38 @@ var Hammer = (function(n, t, e, r) {
20150
20164
  return Array.prototype.slice.call(P, 0);
20151
20165
  }
20152
20166
  function B(P, _, k) {
20153
- for (var q = [], $ = [], ie = 0; ie < P.length; ) {
20154
- var Ee = P[ie][_];
20155
- H($, Ee) < 0 && q.push(P[ie]), $[ie] = Ee, ie++;
20167
+ for (var q = [], $ = [], oe = 0; oe < P.length; ) {
20168
+ var be = P[oe][_];
20169
+ H($, be) < 0 && q.push(P[oe]), $[oe] = be, oe++;
20156
20170
  }
20157
20171
  return q = q.sort(function(Xe, Fe) {
20158
20172
  return Xe[_] > Fe[_];
20159
20173
  }), q;
20160
20174
  }
20161
- function F(P, _) {
20162
- for (var k, q, $ = _[0].toUpperCase() + _.slice(1), ie = 0; ie < o.length; ) {
20163
- if (k = o[ie], q = k ? k + $ : _, q in P)
20175
+ function O(P, _) {
20176
+ for (var k, q, $ = _[0].toUpperCase() + _.slice(1), oe = 0; oe < o.length; ) {
20177
+ if (k = o[oe], q = k ? k + $ : _, q in P)
20164
20178
  return q;
20165
- ie++;
20179
+ oe++;
20166
20180
  }
20167
20181
  return r;
20168
20182
  }
20169
20183
  var L = 1;
20170
- function O() {
20184
+ function F() {
20171
20185
  return L++;
20172
20186
  }
20173
20187
  function N(P) {
20174
20188
  var _ = P.ownerDocument || P;
20175
20189
  return _.defaultView || _.parentWindow || n;
20176
20190
  }
20177
- var D = /mobile|tablet|ip(ad|hone|od)|android/i, J = "ontouchstart" in n, z = F(n, "PointerEvent") !== r, G = J && D.test(navigator.userAgent), V = "touch", Q = "pen", U = "mouse", j = "kinect", Y = 25, Z = 1, X = 2, W = 4, K = 8, ee = 1, te = 2, re = 4, ae = 8, pe = 16, le = te | re, ve = ae | pe, xe = le | ve, Ae = ["x", "y"], Te = ["clientX", "clientY"];
20178
- function ue(P, _) {
20191
+ var D = /mobile|tablet|ip(ad|hone|od)|android/i, Q = "ontouchstart" in n, z = O(n, "PointerEvent") !== r, G = Q && D.test(navigator.userAgent), J = "touch", V = "pen", U = "mouse", j = "kinect", X = 25, Y = 1, W = 2, Z = 4, K = 8, ee = 1, te = 2, re = 4, ie = 8, ce = 16, ae = te | re, de = ie | ce, ge = ae | de, ye = ["x", "y"], xe = ["clientX", "clientY"];
20192
+ function le(P, _) {
20179
20193
  var k = this;
20180
20194
  this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(q) {
20181
20195
  b(P.options.enable, [P]) && k.handler(q);
20182
20196
  }, this.init();
20183
20197
  }
20184
- ue.prototype = {
20198
+ le.prototype = {
20185
20199
  /**
20186
20200
  * should handle the inputEvent data and trigger the callback
20187
20201
  * @virtual
@@ -20201,42 +20215,42 @@ var Hammer = (function(n, t, e, r) {
20201
20215
  this.evEl && R(this.element, this.evEl, this.domHandler), this.evTarget && R(this.target, this.evTarget, this.domHandler), this.evWin && R(N(this.element), this.evWin, this.domHandler);
20202
20216
  }
20203
20217
  };
20204
- function fe(P) {
20218
+ function he(P) {
20205
20219
  var _, k = P.options.inputClass;
20206
- return k ? _ = k : z ? _ = Be : G ? _ = Ue : J ? _ = ht : _ = ke, new _(P, ne);
20220
+ return k ? _ = k : z ? _ = Be : G ? _ = Ue : Q ? _ = ht : _ = ke, new _(P, ne);
20207
20221
  }
20208
20222
  function ne(P, _, k) {
20209
- var q = k.pointers.length, $ = k.changedPointers.length, ie = _ & Z && q - $ === 0, Ee = _ & (W | K) && q - $ === 0;
20210
- k.isFirst = !!ie, k.isFinal = !!Ee, ie && (P.session = {}), k.eventType = _, oe(P, k), P.emit("hammer.input", k), P.recognize(k), P.session.prevInput = k;
20223
+ var q = k.pointers.length, $ = k.changedPointers.length, oe = _ & Y && q - $ === 0, be = _ & (Z | K) && q - $ === 0;
20224
+ k.isFirst = !!oe, k.isFinal = !!be, oe && (P.session = {}), k.eventType = _, se(P, k), P.emit("hammer.input", k), P.recognize(k), P.session.prevInput = k;
20211
20225
  }
20212
- function oe(P, _) {
20226
+ function se(P, _) {
20213
20227
  var k = P.session, q = _.pointers, $ = q.length;
20214
20228
  k.firstInput || (k.firstInput = Ne(_)), $ > 1 && !k.firstMultiple ? k.firstMultiple = Ne(_) : $ === 1 && (k.firstMultiple = !1);
20215
- var ie = k.firstInput, Ee = k.firstMultiple, De = Ee ? Ee.center : ie.center, Xe = _.center = qe(q);
20216
- _.timeStamp = f(), _.deltaTime = _.timeStamp - ie.timeStamp, _.angle = Ke(De, Xe), _.distance = he(De, Xe), de(k, _), _.offsetDirection = Ve(_.deltaX, _.deltaY);
20229
+ var oe = k.firstInput, be = k.firstMultiple, De = be ? be.center : oe.center, Xe = _.center = qe(q);
20230
+ _.timeStamp = f(), _.deltaTime = _.timeStamp - oe.timeStamp, _.angle = Ke(De, Xe), _.distance = ve(De, Xe), pe(k, _), _.offsetDirection = Ve(_.deltaX, _.deltaY);
20217
20231
  var Fe = Ye(_.deltaTime, _.deltaX, _.deltaY);
20218
- _.overallVelocityX = Fe.x, _.overallVelocityY = Fe.y, _.overallVelocity = c(Fe.x) > c(Fe.y) ? Fe.x : Fe.y, _.scale = Ee ? Le(Ee.pointers, q) : 1, _.rotation = Ee ? be(Ee.pointers, q) : 0, _.maxPointers = k.prevInput ? _.pointers.length > k.prevInput.maxPointers ? _.pointers.length : k.prevInput.maxPointers : _.pointers.length, me(k, _);
20232
+ _.overallVelocityX = Fe.x, _.overallVelocityY = Fe.y, _.overallVelocity = c(Fe.x) > c(Fe.y) ? Fe.x : Fe.y, _.scale = be ? Le(be.pointers, q) : 1, _.rotation = be ? Te(be.pointers, q) : 0, _.maxPointers = k.prevInput ? _.pointers.length > k.prevInput.maxPointers ? _.pointers.length : k.prevInput.maxPointers : _.pointers.length, me(k, _);
20219
20233
  var lt = P.element;
20220
20234
  w(_.srcEvent.target, lt) && (lt = _.srcEvent.target), _.target = lt;
20221
20235
  }
20222
- function de(P, _) {
20223
- var k = _.center, q = P.offsetDelta || {}, $ = P.prevDelta || {}, ie = P.prevInput || {};
20224
- (_.eventType === Z || ie.eventType === W) && ($ = P.prevDelta = {
20225
- x: ie.deltaX || 0,
20226
- y: ie.deltaY || 0
20236
+ function pe(P, _) {
20237
+ var k = _.center, q = P.offsetDelta || {}, $ = P.prevDelta || {}, oe = P.prevInput || {};
20238
+ (_.eventType === Y || oe.eventType === Z) && ($ = P.prevDelta = {
20239
+ x: oe.deltaX || 0,
20240
+ y: oe.deltaY || 0
20227
20241
  }, q = P.offsetDelta = {
20228
20242
  x: k.x,
20229
20243
  y: k.y
20230
20244
  }), _.deltaX = $.x + (k.x - q.x), _.deltaY = $.y + (k.y - q.y);
20231
20245
  }
20232
20246
  function me(P, _) {
20233
- var k = P.lastInterval || _, q = _.timeStamp - k.timeStamp, $, ie, Ee, De;
20234
- if (_.eventType != K && (q > Y || k.velocity === r)) {
20247
+ var k = P.lastInterval || _, q = _.timeStamp - k.timeStamp, $, oe, be, De;
20248
+ if (_.eventType != K && (q > X || k.velocity === r)) {
20235
20249
  var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(q, Xe, Fe);
20236
- ie = lt.x, Ee = lt.y, $ = c(lt.x) > c(lt.y) ? lt.x : lt.y, De = Ve(Xe, Fe), P.lastInterval = _;
20250
+ oe = lt.x, be = lt.y, $ = c(lt.x) > c(lt.y) ? lt.x : lt.y, De = Ve(Xe, Fe), P.lastInterval = _;
20237
20251
  } else
20238
- $ = k.velocity, ie = k.velocityX, Ee = k.velocityY, De = k.direction;
20239
- _.velocity = $, _.velocityX = ie, _.velocityY = Ee, _.direction = De;
20252
+ $ = k.velocity, oe = k.velocityX, be = k.velocityY, De = k.direction;
20253
+ _.velocity = $, _.velocityX = oe, _.velocityY = be, _.direction = De;
20240
20254
  }
20241
20255
  function Ne(P) {
20242
20256
  for (var _ = [], k = 0; k < P.pointers.length; )
@@ -20273,40 +20287,40 @@ var Hammer = (function(n, t, e, r) {
20273
20287
  };
20274
20288
  }
20275
20289
  function Ve(P, _) {
20276
- return P === _ ? ee : c(P) >= c(_) ? P < 0 ? te : re : _ < 0 ? ae : pe;
20290
+ return P === _ ? ee : c(P) >= c(_) ? P < 0 ? te : re : _ < 0 ? ie : ce;
20277
20291
  }
20278
- function he(P, _, k) {
20279
- k || (k = Ae);
20292
+ function ve(P, _, k) {
20293
+ k || (k = ye);
20280
20294
  var q = _[k[0]] - P[k[0]], $ = _[k[1]] - P[k[1]];
20281
20295
  return Math.sqrt(q * q + $ * $);
20282
20296
  }
20283
20297
  function Ke(P, _, k) {
20284
- k || (k = Ae);
20298
+ k || (k = ye);
20285
20299
  var q = _[k[0]] - P[k[0]], $ = _[k[1]] - P[k[1]];
20286
20300
  return Math.atan2($, q) * 180 / Math.PI;
20287
20301
  }
20288
- function be(P, _) {
20289
- return Ke(_[1], _[0], Te) + Ke(P[1], P[0], Te);
20302
+ function Te(P, _) {
20303
+ return Ke(_[1], _[0], xe) + Ke(P[1], P[0], xe);
20290
20304
  }
20291
20305
  function Le(P, _) {
20292
- return he(_[0], _[1], Te) / he(P[0], P[1], Te);
20306
+ return ve(_[0], _[1], xe) / ve(P[0], P[1], xe);
20293
20307
  }
20294
20308
  var Ie = {
20295
- mousedown: Z,
20296
- mousemove: X,
20297
- mouseup: W
20309
+ mousedown: Y,
20310
+ mousemove: W,
20311
+ mouseup: Z
20298
20312
  }, $e = "mousedown", tt = "mousemove mouseup";
20299
20313
  function ke() {
20300
- this.evEl = $e, this.evWin = tt, this.pressed = !1, ue.apply(this, arguments);
20314
+ this.evEl = $e, this.evWin = tt, this.pressed = !1, le.apply(this, arguments);
20301
20315
  }
20302
- v(ke, ue, {
20316
+ v(ke, le, {
20303
20317
  /**
20304
20318
  * handle mouse events
20305
20319
  * @param {Object} ev
20306
20320
  */
20307
20321
  handler: function(_) {
20308
20322
  var k = Ie[_.type];
20309
- k & Z && (_.button === 0 || _.button === 2) && (this.pressed = !0), k & X && _.which !== 1 && (k = W), this.pressed && (k & W && (this.pressed = !1), this.callback(this.manager, k, {
20323
+ k & Y && (_.button === 0 || _.button === 2) && (this.pressed = !0), k & W && _.which !== 1 && (k = Z), this.pressed && (k & Z && (this.pressed = !1), this.callback(this.manager, k, {
20310
20324
  pointers: [_],
20311
20325
  changedPointers: [_],
20312
20326
  pointerType: U,
@@ -20315,30 +20329,30 @@ var Hammer = (function(n, t, e, r) {
20315
20329
  }
20316
20330
  });
20317
20331
  var Pe = {
20318
- pointerdown: Z,
20319
- pointermove: X,
20320
- pointerup: W,
20332
+ pointerdown: Y,
20333
+ pointermove: W,
20334
+ pointerup: Z,
20321
20335
  pointercancel: K,
20322
20336
  pointerout: K
20323
20337
  }, _e = {
20324
- 2: V,
20325
- 3: Q,
20338
+ 2: J,
20339
+ 3: V,
20326
20340
  4: U,
20327
20341
  5: j
20328
20342
  // see https://twitter.com/jacobrossi/status/480596438489890816
20329
- }, ye = "pointerdown", Ce = "pointermove pointerup pointercancel";
20330
- n.MSPointerEvent && !n.PointerEvent && (ye = "MSPointerDown", Ce = "MSPointerMove MSPointerUp MSPointerCancel");
20343
+ }, Ee = "pointerdown", Ce = "pointermove pointerup pointercancel";
20344
+ n.MSPointerEvent && !n.PointerEvent && (Ee = "MSPointerDown", Ce = "MSPointerMove MSPointerUp MSPointerCancel");
20331
20345
  function Be() {
20332
- this.evEl = ye, this.evWin = Ce, ue.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
20346
+ this.evEl = Ee, this.evWin = Ce, le.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
20333
20347
  }
20334
- v(Be, ue, {
20348
+ v(Be, le, {
20335
20349
  /**
20336
20350
  * handle mouse events
20337
20351
  * @param {Object} ev
20338
20352
  */
20339
20353
  handler: function(_) {
20340
- var k = this.store, q = !1, $ = !1, ie = _.type.toLowerCase().replace("ms", ""), Ee = Pe[ie], De = _e[_.pointerType] || _.pointerType, Xe = De == V, Fe = H(k, _.pointerId, "pointerId");
20341
- Ee & Z && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : Ee & (W | K) ? q = !0 : !Xe && _.buttons === 0 && (q = !0, $ = !0, Ee = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, Ee, {
20354
+ var k = this.store, q = !1, $ = !1, oe = _.type.toLowerCase().replace("ms", ""), be = Pe[oe], De = _e[_.pointerType] || _.pointerType, Xe = De == J, Fe = H(k, _.pointerId, "pointerId");
20355
+ be & Y && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Z | K) ? q = !0 : !Xe && _.buttons === 0 && (q = !0, $ = !0, be = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, be, {
20342
20356
  pointers: k,
20343
20357
  changedPointers: [_],
20344
20358
  pointerType: De,
@@ -20347,23 +20361,23 @@ var Hammer = (function(n, t, e, r) {
20347
20361
  }
20348
20362
  });
20349
20363
  var je = {
20350
- touchstart: Z,
20351
- touchmove: X,
20352
- touchend: W,
20364
+ touchstart: Y,
20365
+ touchmove: W,
20366
+ touchend: Z,
20353
20367
  touchcancel: K
20354
20368
  }, Qe = "touchstart", We = "touchstart touchmove touchend touchcancel";
20355
20369
  function gt() {
20356
- this.evTarget = Qe, this.evWin = We, this.started = !1, ue.apply(this, arguments);
20370
+ this.evTarget = Qe, this.evWin = We, this.started = !1, le.apply(this, arguments);
20357
20371
  }
20358
- v(gt, ue, {
20372
+ v(gt, le, {
20359
20373
  handler: function(_) {
20360
20374
  var k = je[_.type];
20361
- if (k === Z && (this.started = !0), !!this.started) {
20375
+ if (k === Y && (this.started = !0), !!this.started) {
20362
20376
  var q = Je.call(this, _, k);
20363
- k & (W | K) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20377
+ k & (Z | K) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20364
20378
  pointers: q[0],
20365
20379
  changedPointers: q[1],
20366
- pointerType: V,
20380
+ pointerType: J,
20367
20381
  srcEvent: _
20368
20382
  });
20369
20383
  }
@@ -20371,54 +20385,54 @@ var Hammer = (function(n, t, e, r) {
20371
20385
  });
20372
20386
  function Je(P, _) {
20373
20387
  var k = M(P.touches), q = M(P.changedTouches);
20374
- return _ & (W | K) && (k = B(k.concat(q), "identifier")), [k, q];
20388
+ return _ & (Z | K) && (k = B(k.concat(q), "identifier")), [k, q];
20375
20389
  }
20376
20390
  var At = {
20377
- touchstart: Z,
20378
- touchmove: X,
20379
- touchend: W,
20391
+ touchstart: Y,
20392
+ touchmove: W,
20393
+ touchend: Z,
20380
20394
  touchcancel: K
20381
20395
  }, we = "touchstart touchmove touchend touchcancel";
20382
20396
  function Ue() {
20383
- this.evTarget = we, this.targetIds = {}, ue.apply(this, arguments);
20397
+ this.evTarget = we, this.targetIds = {}, le.apply(this, arguments);
20384
20398
  }
20385
- v(Ue, ue, {
20399
+ v(Ue, le, {
20386
20400
  handler: function(_) {
20387
20401
  var k = At[_.type], q = yt.call(this, _, k);
20388
20402
  q && this.callback(this.manager, k, {
20389
20403
  pointers: q[0],
20390
20404
  changedPointers: q[1],
20391
- pointerType: V,
20405
+ pointerType: J,
20392
20406
  srcEvent: _
20393
20407
  });
20394
20408
  }
20395
20409
  });
20396
20410
  function yt(P, _) {
20397
20411
  var k = M(P.touches), q = this.targetIds;
20398
- if (_ & (Z | X) && k.length === 1)
20412
+ if (_ & (Y | W) && k.length === 1)
20399
20413
  return q[k[0].identifier] = !0, [k, k];
20400
- var $, ie, Ee = M(P.changedTouches), De = [], Xe = this.target;
20401
- if (ie = k.filter(function(Fe) {
20414
+ var $, oe, be = M(P.changedTouches), De = [], Xe = this.target;
20415
+ if (oe = k.filter(function(Fe) {
20402
20416
  return w(Fe.target, Xe);
20403
- }), _ === Z)
20404
- for ($ = 0; $ < ie.length; )
20405
- q[ie[$].identifier] = !0, $++;
20406
- for ($ = 0; $ < Ee.length; )
20407
- q[Ee[$].identifier] && De.push(Ee[$]), _ & (W | K) && delete q[Ee[$].identifier], $++;
20417
+ }), _ === Y)
20418
+ for ($ = 0; $ < oe.length; )
20419
+ q[oe[$].identifier] = !0, $++;
20420
+ for ($ = 0; $ < be.length; )
20421
+ q[be[$].identifier] && De.push(be[$]), _ & (Z | K) && delete q[be[$].identifier], $++;
20408
20422
  if (De.length)
20409
20423
  return [
20410
20424
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
20411
- B(ie.concat(De), "identifier"),
20425
+ B(oe.concat(De), "identifier"),
20412
20426
  De
20413
20427
  ];
20414
20428
  }
20415
20429
  var Mt = 2500, Et = 25;
20416
20430
  function ht() {
20417
- ue.apply(this, arguments);
20431
+ le.apply(this, arguments);
20418
20432
  var P = E(this.handler, this);
20419
20433
  this.touch = new Ue(this.manager, P), this.mouse = new ke(this.manager, P), this.primaryTouch = null, this.lastTouches = [];
20420
20434
  }
20421
- v(ht, ue, {
20435
+ v(ht, le, {
20422
20436
  /**
20423
20437
  * handle mouse and touch events
20424
20438
  * @param {Hammer} manager
@@ -20426,11 +20440,11 @@ var Hammer = (function(n, t, e, r) {
20426
20440
  * @param {Object} inputData
20427
20441
  */
20428
20442
  handler: function(_, k, q) {
20429
- var $ = q.pointerType == V, ie = q.pointerType == U;
20430
- if (!(ie && q.sourceCapabilities && q.sourceCapabilities.firesTouchEvents)) {
20443
+ var $ = q.pointerType == J, oe = q.pointerType == U;
20444
+ if (!(oe && q.sourceCapabilities && q.sourceCapabilities.firesTouchEvents)) {
20431
20445
  if ($)
20432
20446
  pt.call(this, k, q);
20433
- else if (ie && ut.call(this, q))
20447
+ else if (oe && ut.call(this, q))
20434
20448
  return;
20435
20449
  this.callback(_, k, q);
20436
20450
  }
@@ -20443,7 +20457,7 @@ var Hammer = (function(n, t, e, r) {
20443
20457
  }
20444
20458
  });
20445
20459
  function pt(P, _) {
20446
- P & Z ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (W | K) && ze.call(this, _);
20460
+ P & Y ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Z | K) && ze.call(this, _);
20447
20461
  }
20448
20462
  function ze(P) {
20449
20463
  var _ = P.changedPointers[0];
@@ -20451,21 +20465,21 @@ var Hammer = (function(n, t, e, r) {
20451
20465
  var k = { x: _.clientX, y: _.clientY };
20452
20466
  this.lastTouches.push(k);
20453
20467
  var q = this.lastTouches, $ = function() {
20454
- var ie = q.indexOf(k);
20455
- ie > -1 && q.splice(ie, 1);
20468
+ var oe = q.indexOf(k);
20469
+ oe > -1 && q.splice(oe, 1);
20456
20470
  };
20457
20471
  setTimeout($, Mt);
20458
20472
  }
20459
20473
  }
20460
20474
  function ut(P) {
20461
20475
  for (var _ = P.srcEvent.clientX, k = P.srcEvent.clientY, q = 0; q < this.lastTouches.length; q++) {
20462
- var $ = this.lastTouches[q], ie = Math.abs(_ - $.x), Ee = Math.abs(k - $.y);
20463
- if (ie <= Et && Ee <= Et)
20476
+ var $ = this.lastTouches[q], oe = Math.abs(_ - $.x), be = Math.abs(k - $.y);
20477
+ if (oe <= Et && be <= Et)
20464
20478
  return !0;
20465
20479
  }
20466
20480
  return !1;
20467
20481
  }
20468
- var rt = s ? F(s.style, "touchAction") : r, se = rt !== r, ge = "compute", Me = "auto", He = "manipulation", nt = "none", ct = "pan-x", bt = "pan-y", Ht = Tt();
20482
+ var rt = s ? O(s.style, "touchAction") : r, ue = rt !== r, Ae = "compute", Me = "auto", He = "manipulation", nt = "none", ct = "pan-x", bt = "pan-y", Ht = Tt();
20469
20483
  function it(P, _) {
20470
20484
  this.manager = P, this.set(_);
20471
20485
  }
@@ -20475,7 +20489,7 @@ var Hammer = (function(n, t, e, r) {
20475
20489
  * @param {String} value
20476
20490
  */
20477
20491
  set: function(P) {
20478
- P == ge && (P = this.compute()), se && this.manager.element.style && Ht[P] && (this.manager.element.style[rt] = P), this.actions = P.toLowerCase().trim();
20492
+ P == Ae && (P = this.compute()), ue && this.manager.element.style && Ht[P] && (this.manager.element.style[rt] = P), this.actions = P.toLowerCase().trim();
20479
20493
  },
20480
20494
  /**
20481
20495
  * just re-set the touchAction value
@@ -20503,13 +20517,13 @@ var Hammer = (function(n, t, e, r) {
20503
20517
  _.preventDefault();
20504
20518
  return;
20505
20519
  }
20506
- var q = this.actions, $ = C(q, nt) && !Ht[nt], ie = C(q, bt) && !Ht[bt], Ee = C(q, ct) && !Ht[ct];
20520
+ var q = this.actions, $ = C(q, nt) && !Ht[nt], oe = C(q, bt) && !Ht[bt], be = C(q, ct) && !Ht[ct];
20507
20521
  if ($) {
20508
20522
  var De = P.pointers.length === 1, Xe = P.distance < 2, Fe = P.deltaTime < 250;
20509
20523
  if (De && Xe && Fe)
20510
20524
  return;
20511
20525
  }
20512
- if (!(Ee && ie) && ($ || ie && k & le || Ee && k & ve))
20526
+ if (!(be && oe) && ($ || oe && k & ae || be && k & de))
20513
20527
  return this.preventSrc(_);
20514
20528
  },
20515
20529
  /**
@@ -20527,7 +20541,7 @@ var Hammer = (function(n, t, e, r) {
20527
20541
  return _ && k ? nt : _ || k ? _ ? ct : bt : C(P, He) ? He : Me;
20528
20542
  }
20529
20543
  function Tt() {
20530
- if (!se)
20544
+ if (!ue)
20531
20545
  return !1;
20532
20546
  var P = {}, _ = n.CSS && n.CSS.supports;
20533
20547
  return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(k) {
@@ -20536,7 +20550,7 @@ var Hammer = (function(n, t, e, r) {
20536
20550
  }
20537
20551
  var It = 1, at = 2, Pt = 4, xt = 8, vt = xt, St = 16, Ge = 32;
20538
20552
  function mt(P) {
20539
- this.options = A({}, this.defaults, P || {}), this.id = O(), this.manager = null, this.options.enable = T(this.options.enable, !0), this.state = It, this.simultaneous = {}, this.requireFail = [];
20553
+ this.options = A({}, this.defaults, P || {}), this.id = F(), this.manager = null, this.options.enable = T(this.options.enable, !0), this.state = It, this.simultaneous = {}, this.requireFail = [];
20540
20554
  }
20541
20555
  mt.prototype = {
20542
20556
  /**
@@ -20685,7 +20699,7 @@ var Hammer = (function(n, t, e, r) {
20685
20699
  return P & St ? "cancel" : P & xt ? "end" : P & Pt ? "move" : P & at ? "start" : "";
20686
20700
  }
20687
20701
  function Lt(P) {
20688
- return P == pe ? "down" : P == ae ? "up" : P == te ? "left" : P == re ? "right" : "";
20702
+ return P == ce ? "down" : P == ie ? "up" : P == te ? "left" : P == re ? "right" : "";
20689
20703
  }
20690
20704
  function _t(P, _) {
20691
20705
  var k = _.manager;
@@ -20724,7 +20738,7 @@ var Hammer = (function(n, t, e, r) {
20724
20738
  */
20725
20739
  process: function(P) {
20726
20740
  var _ = this.state, k = P.eventType, q = _ & (at | Pt), $ = this.attrTest(P);
20727
- return q && (k & K || !$) ? _ | St : q || $ ? k & W ? _ | xt : _ & at ? _ | Pt : at : Ge;
20741
+ return q && (k & K || !$) ? _ | St : q || $ ? k & Z ? _ | xt : _ & at ? _ | Pt : at : Ge;
20728
20742
  }
20729
20743
  });
20730
20744
  function Rt() {
@@ -20739,15 +20753,15 @@ var Hammer = (function(n, t, e, r) {
20739
20753
  event: "pan",
20740
20754
  threshold: 10,
20741
20755
  pointers: 1,
20742
- direction: xe
20756
+ direction: ge
20743
20757
  },
20744
20758
  getTouchAction: function() {
20745
20759
  var P = this.options.direction, _ = [];
20746
- return P & le && _.push(bt), P & ve && _.push(ct), _;
20760
+ return P & ae && _.push(bt), P & de && _.push(ct), _;
20747
20761
  },
20748
20762
  directionTest: function(P) {
20749
- var _ = this.options, k = !0, q = P.distance, $ = P.direction, ie = P.deltaX, Ee = P.deltaY;
20750
- return $ & _.direction || (_.direction & le ? ($ = ie === 0 ? ee : ie < 0 ? te : re, k = ie != this.pX, q = Math.abs(P.deltaX)) : ($ = Ee === 0 ? ee : Ee < 0 ? ae : pe, k = Ee != this.pY, q = Math.abs(P.deltaY))), P.direction = $, k && q > _.threshold && $ & _.direction;
20763
+ var _ = this.options, k = !0, q = P.distance, $ = P.direction, oe = P.deltaX, be = P.deltaY;
20764
+ return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : re, k = oe != this.pX, q = Math.abs(P.deltaX)) : ($ = be === 0 ? ee : be < 0 ? ie : ce, k = be != this.pY, q = Math.abs(P.deltaY))), P.direction = $, k && q > _.threshold && $ & _.direction;
20751
20765
  },
20752
20766
  attrTest: function(P) {
20753
20767
  return ot.prototype.attrTest.call(this, P) && (this.state & at || !(this.state & at) && this.directionTest(P));
@@ -20806,13 +20820,13 @@ var Hammer = (function(n, t, e, r) {
20806
20820
  },
20807
20821
  process: function(P) {
20808
20822
  var _ = this.options, k = P.pointers.length === _.pointers, q = P.distance < _.threshold, $ = P.deltaTime > _.time;
20809
- if (this._input = P, !q || !k || P.eventType & (W | K) && !$)
20823
+ if (this._input = P, !q || !k || P.eventType & (Z | K) && !$)
20810
20824
  this.reset();
20811
- else if (P.eventType & Z)
20825
+ else if (P.eventType & Y)
20812
20826
  this.reset(), this._timer = d(function() {
20813
20827
  this.state = vt, this.tryEmit();
20814
20828
  }, _.time, this);
20815
- else if (P.eventType & W)
20829
+ else if (P.eventType & Z)
20816
20830
  return vt;
20817
20831
  return Ge;
20818
20832
  },
@@ -20820,7 +20834,7 @@ var Hammer = (function(n, t, e, r) {
20820
20834
  clearTimeout(this._timer);
20821
20835
  },
20822
20836
  emit: function(P) {
20823
- this.state === vt && (P && P.eventType & W ? this.manager.emit(this.options.event + "up", P) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
20837
+ this.state === vt && (P && P.eventType & Z ? this.manager.emit(this.options.event + "up", P) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
20824
20838
  }
20825
20839
  });
20826
20840
  function Ct() {
@@ -20843,10 +20857,10 @@ var Hammer = (function(n, t, e, r) {
20843
20857
  return this._super.attrTest.call(this, P) && (Math.abs(P.rotation) > this.options.threshold || this.state & at);
20844
20858
  }
20845
20859
  });
20846
- function ce() {
20860
+ function fe() {
20847
20861
  ot.apply(this, arguments);
20848
20862
  }
20849
- v(ce, ot, {
20863
+ v(fe, ot, {
20850
20864
  /**
20851
20865
  * @namespace
20852
20866
  * @memberof SwipeRecognizer
@@ -20855,7 +20869,7 @@ var Hammer = (function(n, t, e, r) {
20855
20869
  event: "swipe",
20856
20870
  threshold: 10,
20857
20871
  velocity: 0.3,
20858
- direction: le | ve,
20872
+ direction: ae | de,
20859
20873
  pointers: 1
20860
20874
  },
20861
20875
  getTouchAction: function() {
@@ -20863,7 +20877,7 @@ var Hammer = (function(n, t, e, r) {
20863
20877
  },
20864
20878
  attrTest: function(P) {
20865
20879
  var _ = this.options.direction, k;
20866
- return _ & (le | ve) ? k = P.overallVelocity : _ & le ? k = P.overallVelocityX : _ & ve && (k = P.overallVelocityY), this._super.attrTest.call(this, P) && _ & P.offsetDirection && P.distance > this.options.threshold && P.maxPointers == this.options.pointers && c(k) > this.options.velocity && P.eventType & W;
20880
+ return _ & (ae | de) ? k = P.overallVelocity : _ & ae ? k = P.overallVelocityX : _ & de && (k = P.overallVelocityY), this._super.attrTest.call(this, P) && _ & P.offsetDirection && P.distance > this.options.threshold && P.maxPointers == this.options.pointers && c(k) > this.options.velocity && P.eventType & Z;
20867
20881
  },
20868
20882
  emit: function(P) {
20869
20883
  var _ = Lt(P.offsetDirection);
@@ -20896,13 +20910,13 @@ var Hammer = (function(n, t, e, r) {
20896
20910
  },
20897
20911
  process: function(P) {
20898
20912
  var _ = this.options, k = P.pointers.length === _.pointers, q = P.distance < _.threshold, $ = P.deltaTime < _.time;
20899
- if (this.reset(), P.eventType & Z && this.count === 0)
20913
+ if (this.reset(), P.eventType & Y && this.count === 0)
20900
20914
  return this.failTimeout();
20901
20915
  if (q && $ && k) {
20902
- if (P.eventType != W)
20916
+ if (P.eventType != Z)
20903
20917
  return this.failTimeout();
20904
- var ie = this.pTime ? P.timeStamp - this.pTime < _.interval : !0, Ee = !this.pCenter || he(this.pCenter, P.center) < _.posThreshold;
20905
- this.pTime = P.timeStamp, this.pCenter = P.center, !Ee || !ie ? this.count = 1 : this.count += 1, this._input = P;
20918
+ var oe = this.pTime ? P.timeStamp - this.pTime < _.interval : !0, be = !this.pCenter || ve(this.pCenter, P.center) < _.posThreshold;
20919
+ this.pTime = P.timeStamp, this.pCenter = P.center, !be || !oe ? this.count = 1 : this.count += 1, this._input = P;
20906
20920
  var De = this.count % _.taps;
20907
20921
  if (De === 0)
20908
20922
  return this.hasRequireFailures() ? (this._timer = d(function() {
@@ -20940,7 +20954,7 @@ var Hammer = (function(n, t, e, r) {
20940
20954
  * @type {String}
20941
20955
  * @default compute
20942
20956
  */
20943
- touchAction: ge,
20957
+ touchAction: Ae,
20944
20958
  /**
20945
20959
  * @type {Boolean}
20946
20960
  * @default true
@@ -20969,8 +20983,8 @@ var Hammer = (function(n, t, e, r) {
20969
20983
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
20970
20984
  [Ct, { enable: !1 }],
20971
20985
  [dt, { enable: !1 }, ["rotate"]],
20972
- [ce, { direction: le }],
20973
- [Rt, { direction: le }, ["swipe"]],
20986
+ [fe, { direction: ae }],
20987
+ [Rt, { direction: ae }, ["swipe"]],
20974
20988
  [Se],
20975
20989
  [Se, { event: "doubletap", taps: 2 }, ["tap"]],
20976
20990
  [wt]
@@ -21024,7 +21038,7 @@ var Hammer = (function(n, t, e, r) {
21024
21038
  };
21025
21039
  var Oe = 1, Bt = 2;
21026
21040
  function st(P, _) {
21027
- this.options = A({}, Re.defaults, _ || {}), this.options.inputTarget = this.options.inputTarget || P, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = P, this.input = fe(this), this.touchAction = new it(this, this.options.touchAction), Ze(this, !0), p(this.options.recognizers, function(k) {
21041
+ this.options = A({}, Re.defaults, _ || {}), this.options.inputTarget = this.options.inputTarget || P, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = P, this.input = he(this), this.touchAction = new it(this, this.options.touchAction), Ze(this, !0), p(this.options.recognizers, function(k) {
21028
21042
  var q = this.add(new k[0](k[1]));
21029
21043
  k[2] && q.recognizeWith(k[2]), k[3] && q.requireFailure(k[3]);
21030
21044
  }, this);
@@ -21059,10 +21073,10 @@ var Hammer = (function(n, t, e, r) {
21059
21073
  this.touchAction.preventDefaults(P);
21060
21074
  var k, q = this.recognizers, $ = _.curRecognizer;
21061
21075
  (!$ || $ && $.state & vt) && ($ = _.curRecognizer = null);
21062
- for (var ie = 0; ie < q.length; )
21063
- k = q[ie], _.stopped !== Bt && // 1
21076
+ for (var oe = 0; oe < q.length; )
21077
+ k = q[oe], _.stopped !== Bt && // 1
21064
21078
  (!$ || k == $ || // 2
21065
- k.canRecognizeWith($)) ? k.recognize(P) : k.reset(), !$ && k.state & (at | Pt | xt) && ($ = _.curRecognizer = k), ie++;
21079
+ k.canRecognizeWith($)) ? k.recognize(P) : k.reset(), !$ && k.state & (at | Pt | xt) && ($ = _.curRecognizer = k), oe++;
21066
21080
  }
21067
21081
  },
21068
21082
  /**
@@ -21160,8 +21174,8 @@ var Hammer = (function(n, t, e, r) {
21160
21174
  var k = P.element;
21161
21175
  if (k.style) {
21162
21176
  var q;
21163
- p(P.options.cssProps, function($, ie) {
21164
- q = F(k.style, ie), _ ? (P.oldCssProps[q] = k.style[q], k.style[q] = $) : k.style[q] = P.oldCssProps[q] || "";
21177
+ p(P.options.cssProps, function($, oe) {
21178
+ q = O(k.style, oe), _ ? (P.oldCssProps[q] = k.style[q], k.style[q] = $) : k.style[q] = P.oldCssProps[q] || "";
21165
21179
  }), _ || (P.oldCssProps = {});
21166
21180
  }
21167
21181
  }
@@ -21170,9 +21184,9 @@ var Hammer = (function(n, t, e, r) {
21170
21184
  k.initEvent(P, !0, !0), k.gesture = _, _.target.dispatchEvent(k);
21171
21185
  }
21172
21186
  return A(Re, {
21173
- INPUT_START: Z,
21174
- INPUT_MOVE: X,
21175
- INPUT_END: W,
21187
+ INPUT_START: Y,
21188
+ INPUT_MOVE: W,
21189
+ INPUT_END: Z,
21176
21190
  INPUT_CANCEL: K,
21177
21191
  STATE_POSSIBLE: It,
21178
21192
  STATE_BEGAN: at,
@@ -21184,13 +21198,13 @@ var Hammer = (function(n, t, e, r) {
21184
21198
  DIRECTION_NONE: ee,
21185
21199
  DIRECTION_LEFT: te,
21186
21200
  DIRECTION_RIGHT: re,
21187
- DIRECTION_UP: ae,
21188
- DIRECTION_DOWN: pe,
21189
- DIRECTION_HORIZONTAL: le,
21190
- DIRECTION_VERTICAL: ve,
21191
- DIRECTION_ALL: xe,
21201
+ DIRECTION_UP: ie,
21202
+ DIRECTION_DOWN: ce,
21203
+ DIRECTION_HORIZONTAL: ae,
21204
+ DIRECTION_VERTICAL: de,
21205
+ DIRECTION_ALL: ge,
21192
21206
  Manager: st,
21193
- Input: ue,
21207
+ Input: le,
21194
21208
  TouchAction: it,
21195
21209
  TouchInput: Ue,
21196
21210
  MouseInput: ke,
@@ -21201,7 +21215,7 @@ var Hammer = (function(n, t, e, r) {
21201
21215
  AttrRecognizer: ot,
21202
21216
  Tap: Se,
21203
21217
  Pan: Rt,
21204
- Swipe: ce,
21218
+ Swipe: fe,
21205
21219
  Pinch: dt,
21206
21220
  Rotate: Ct,
21207
21221
  Press: wt,
@@ -21213,7 +21227,7 @@ var Hammer = (function(n, t, e, r) {
21213
21227
  assign: A,
21214
21228
  inherit: v,
21215
21229
  bindFn: E,
21216
- prefixed: F
21230
+ prefixed: O
21217
21231
  }), Re;
21218
21232
  })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {});
21219
21233
  function calculateThreeMouse(n, t, e) {
@@ -21386,18 +21400,18 @@ var BaseController = (
21386
21400
  ]), s.on("panstart pan", function(M) {
21387
21401
  var B = u(s);
21388
21402
  if (!(B && !o(B.center))) {
21389
- var F = createEvent("gesture.pan", {
21403
+ var O = createEvent("gesture.pan", {
21390
21404
  target: M.target,
21391
21405
  pointerType: M.pointerType,
21392
21406
  srcEvent: M.srcEvent,
21393
21407
  pointers: M.pointers.map(function(L) {
21394
- var O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera);
21408
+ var F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera);
21395
21409
  return {
21396
21410
  x: L.x,
21397
21411
  y: L.y,
21398
21412
  delta: 0,
21399
21413
  buttons: 0,
21400
- coords: O,
21414
+ coords: F,
21401
21415
  raycaster: N
21402
21416
  };
21403
21417
  }),
@@ -21405,13 +21419,13 @@ var BaseController = (
21405
21419
  isFinal: M.isFinal,
21406
21420
  scale: M.scale,
21407
21421
  center: (function(L) {
21408
- var O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera);
21422
+ var F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera);
21409
21423
  return {
21410
21424
  x: L.x,
21411
21425
  y: L.y,
21412
21426
  delta: 0,
21413
21427
  buttons: 0,
21414
- coords: O,
21428
+ coords: F,
21415
21429
  raycaster: N
21416
21430
  };
21417
21431
  })(M.center),
@@ -21422,24 +21436,24 @@ var BaseController = (
21422
21436
  userAction: !0,
21423
21437
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21424
21438
  });
21425
- r.onPanGesture(F), b();
21439
+ r.onPanGesture(O), b();
21426
21440
  }
21427
21441
  }), s.on("tap", function(M) {
21428
21442
  if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
21429
21443
  var B = u(s);
21430
21444
  if (!(B && !o(B.center))) {
21431
- var F = createEvent("gesture.tap", {
21445
+ var O = createEvent("gesture.tap", {
21432
21446
  target: M.target,
21433
21447
  pointerType: M.pointerType,
21434
21448
  srcEvent: M.srcEvent,
21435
21449
  pointers: M.pointers.map(function(L) {
21436
- var O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera);
21450
+ var F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera);
21437
21451
  return {
21438
21452
  x: L.x,
21439
21453
  y: L.y,
21440
21454
  delta: 0,
21441
21455
  buttons: 0,
21442
- coords: O,
21456
+ coords: F,
21443
21457
  raycaster: N
21444
21458
  };
21445
21459
  }),
@@ -21447,13 +21461,13 @@ var BaseController = (
21447
21461
  isFinal: !0,
21448
21462
  scale: M.scale,
21449
21463
  center: (function(L) {
21450
- var O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera);
21464
+ var F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera);
21451
21465
  return {
21452
21466
  x: L.x,
21453
21467
  y: L.y,
21454
21468
  delta: 0,
21455
21469
  buttons: 0,
21456
- coords: O,
21470
+ coords: F,
21457
21471
  raycaster: N
21458
21472
  };
21459
21473
  })(M.center),
@@ -21464,22 +21478,22 @@ var BaseController = (
21464
21478
  userAction: !0,
21465
21479
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21466
21480
  });
21467
- r.onTapGesture(F), b();
21481
+ r.onTapGesture(O), b();
21468
21482
  }
21469
21483
  }
21470
21484
  }), s.on("pinchstart pinch pinchend", function(M) {
21471
21485
  var B = u(s);
21472
21486
  if (!(B && !o(B.center))) {
21473
- var F = createEvent("gesture.pinch", {
21487
+ var O = createEvent("gesture.pinch", {
21474
21488
  target: M.target,
21475
21489
  pointerType: M.pointerType,
21476
21490
  srcEvent: M.srcEvent,
21477
21491
  pointers: M.pointers.map(function(L) {
21478
- var O, N = r.relativeClientPosition(L), D = new THREE.Raycaster();
21492
+ var F, N = r.relativeClientPosition(L), D = new THREE.Raycaster();
21479
21493
  return D.params.Points = { threshold: 0.1 }, D.setFromCamera(N, r.camera), {
21480
21494
  x: L.x,
21481
21495
  y: L.y,
21482
- delta: (O = L.delta) !== null && O !== void 0 ? O : 0,
21496
+ delta: (F = L.delta) !== null && F !== void 0 ? F : 0,
21483
21497
  buttons: 0,
21484
21498
  coords: N,
21485
21499
  raycaster: D
@@ -21489,13 +21503,13 @@ var BaseController = (
21489
21503
  isFinal: M.type === "pinchend",
21490
21504
  scale: M.scale,
21491
21505
  center: (function(L) {
21492
- var O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera);
21506
+ var F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera);
21493
21507
  return {
21494
21508
  x: L.x,
21495
21509
  y: L.y,
21496
21510
  delta: 0,
21497
21511
  buttons: 0,
21498
- coords: O,
21512
+ coords: F,
21499
21513
  raycaster: N
21500
21514
  };
21501
21515
  })(M.center),
@@ -21506,24 +21520,24 @@ var BaseController = (
21506
21520
  userAction: !0,
21507
21521
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21508
21522
  });
21509
- r.onPinchGesture(F), b();
21523
+ r.onPinchGesture(O), b();
21510
21524
  }
21511
21525
  }), s.on("dbltap", function(M) {
21512
21526
  if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
21513
21527
  var B = u(s);
21514
21528
  if (!(B && !o(B.center))) {
21515
- var F = createEvent("gesture.dbltap", {
21529
+ var O = createEvent("gesture.dbltap", {
21516
21530
  target: M.target,
21517
21531
  pointerType: M.pointerType,
21518
21532
  srcEvent: M.srcEvent,
21519
21533
  pointers: M.pointers.map(function(L) {
21520
- var O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera);
21534
+ var F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera);
21521
21535
  return {
21522
21536
  x: L.x,
21523
21537
  y: L.y,
21524
21538
  delta: 0,
21525
21539
  buttons: 0,
21526
- coords: O,
21540
+ coords: F,
21527
21541
  raycaster: N
21528
21542
  };
21529
21543
  }),
@@ -21531,13 +21545,13 @@ var BaseController = (
21531
21545
  isFinal: !0,
21532
21546
  scale: M.scale,
21533
21547
  center: (function(L) {
21534
- var O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera);
21548
+ var F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera);
21535
21549
  return {
21536
21550
  x: L.x,
21537
21551
  y: L.y,
21538
21552
  delta: 0,
21539
21553
  buttons: 0,
21540
- coords: O,
21554
+ coords: F,
21541
21555
  raycaster: N
21542
21556
  };
21543
21557
  })(M.center),
@@ -21548,22 +21562,22 @@ var BaseController = (
21548
21562
  userAction: !0,
21549
21563
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21550
21564
  });
21551
- r.onDblTapGesture(F), b();
21565
+ r.onDblTapGesture(O), b();
21552
21566
  }
21553
21567
  }
21554
21568
  });
21555
- var d = null, h = null, p = function(M, B, F) {
21569
+ var d = null, h = null, p = function(M, B, O) {
21556
21570
  var L = {
21557
- x: F.clientX,
21558
- y: F.clientY
21559
- }, O = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(O, r.camera), D = __assign(__assign({}, L), { coords: O, raycaster: N, buttons: F.buttons, delta: 0 }), J = M === "pinchend" ? B : B - F.deltaY / 280, z = createEvent("gesture.pinch", {
21560
- target: F.target,
21571
+ x: O.clientX,
21572
+ y: O.clientY
21573
+ }, F = r.relativeClientPosition(L), N = r.createRaycasterFromCamera(F, r.camera), D = __assign(__assign({}, L), { coords: F, raycaster: N, buttons: O.buttons, delta: 0 }), Q = M === "pinchend" ? B : B - O.deltaY / 280, z = createEvent("gesture.pinch", {
21574
+ target: O.target,
21561
21575
  pointerType: "mouse",
21562
- srcEvent: F,
21576
+ srcEvent: O,
21563
21577
  pointers: [__assign({}, D)],
21564
21578
  isFirst: M === "pinchstart",
21565
21579
  isFinal: M === "pinchend",
21566
- scale: clamp$1(J, 0.1, 10),
21580
+ scale: clamp$1(Q, 0.1, 10),
21567
21581
  center: __assign({}, D),
21568
21582
  velocityX: 0,
21569
21583
  velocityY: 0,
@@ -21574,32 +21588,32 @@ var BaseController = (
21574
21588
  });
21575
21589
  return z;
21576
21590
  }, m = function(M) {
21577
- var B, F = { x: M.clientX, y: M.clientY };
21578
- if (o(F)) {
21591
+ var B, O = { x: M.clientX, y: M.clientY };
21592
+ if (o(O)) {
21579
21593
  if (M.preventDefault(), M.ctrlKey) {
21580
- var L = (B = d == null ? void 0 : d.prevEvent.scale) !== null && B !== void 0 ? B : 1, O = p(d ? "pinch" : "pinchstart", L, M);
21594
+ var L = (B = d == null ? void 0 : d.prevEvent.scale) !== null && B !== void 0 ? B : 1, F = p(d ? "pinch" : "pinchstart", L, M);
21581
21595
  d === null ? d = {
21582
- firstEvent: O,
21583
- prevEvent: O
21584
- } : d.prevEvent = O, r.onPinchGesture(O), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
21585
- var Q;
21596
+ firstEvent: F,
21597
+ prevEvent: F
21598
+ } : d.prevEvent = F, r.onPinchGesture(F), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
21599
+ var V;
21586
21600
  h = null;
21587
- var U = (Q = d == null ? void 0 : d.prevEvent.scale) !== null && Q !== void 0 ? Q : 1, j = p("pinchend", U, M);
21601
+ var U = (V = d == null ? void 0 : d.prevEvent.scale) !== null && V !== void 0 ? V : 1, j = p("pinchend", U, M);
21588
21602
  d = null, r.onPinchGesture(j);
21589
21603
  }, 200);
21590
21604
  } else {
21591
- var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, J = {
21605
+ var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, Q = {
21592
21606
  x: M.clientX,
21593
21607
  y: M.clientY
21594
- }, z = r.relativeClientPosition(J), G = r.createRaycasterFromCamera(z, r.camera), V = __assign(__assign({}, J), { coords: z, raycaster: G, buttons: M.buttons, delta: N }), O = createEvent("gesture.mousewheel", {
21608
+ }, z = r.relativeClientPosition(Q), G = r.createRaycasterFromCamera(z, r.camera), J = __assign(__assign({}, Q), { coords: z, raycaster: G, buttons: M.buttons, delta: N }), F = createEvent("gesture.mousewheel", {
21595
21609
  target: M.target,
21596
21610
  pointerType: "mouse",
21597
21611
  srcEvent: M,
21598
- pointers: [__assign({}, V)],
21612
+ pointers: [__assign({}, J)],
21599
21613
  isFirst: D,
21600
21614
  isFinal: !1,
21601
21615
  scale: 0,
21602
- center: __assign({}, V),
21616
+ center: __assign({}, J),
21603
21617
  velocityX: 0,
21604
21618
  velocityY: 0,
21605
21619
  overallVelocityX: 0,
@@ -21607,18 +21621,18 @@ var BaseController = (
21607
21621
  userAction: !0,
21608
21622
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21609
21623
  });
21610
- r.onMouseWheel(O), r.mouseWheelState && clearTimeout(r.mouseWheelState.timer), r.mouseWheelState = {
21624
+ r.onMouseWheel(F), r.mouseWheelState && clearTimeout(r.mouseWheelState.timer), r.mouseWheelState = {
21611
21625
  timer: setTimeout(function() {
21612
21626
  r.mouseWheelState = void 0;
21613
21627
  var U = createEvent("gesture.mousewheel", {
21614
21628
  target: M.target,
21615
21629
  pointerType: "mouse",
21616
21630
  srcEvent: M,
21617
- pointers: [__assign(__assign({}, V), { delta: 0 })],
21631
+ pointers: [__assign(__assign({}, J), { delta: 0 })],
21618
21632
  isFirst: !1,
21619
21633
  isFinal: !0,
21620
21634
  scale: 0,
21621
- center: __assign(__assign({}, V), { delta: 0 }),
21635
+ center: __assign(__assign({}, J), { delta: 0 }),
21622
21636
  velocityX: 0,
21623
21637
  velocityY: 0,
21624
21638
  overallVelocityX: 0,
@@ -21640,10 +21654,10 @@ var BaseController = (
21640
21654
  }
21641
21655
  var B = !1;
21642
21656
  r.mouseMoveState || (B = !0);
21643
- var F = {
21657
+ var O = {
21644
21658
  x: M.clientX,
21645
21659
  y: M.clientY
21646
- }, L = r.relativeClientPosition(F), O = r.createRaycasterFromCamera(L, r.camera), N = __assign(__assign({}, F), { coords: L, raycaster: O, buttons: M.buttons, delta: 0 }), D = createEvent("gesture.mousemove", {
21660
+ }, L = r.relativeClientPosition(O), F = r.createRaycasterFromCamera(L, r.camera), N = __assign(__assign({}, O), { coords: L, raycaster: F, buttons: M.buttons, delta: 0 }), D = createEvent("gesture.mousemove", {
21647
21661
  target: M.target,
21648
21662
  pointerType: "mouse",
21649
21663
  srcEvent: M,
@@ -21681,10 +21695,10 @@ var BaseController = (
21681
21695
  timeStamp: now(),
21682
21696
  stop: noop
21683
21697
  });
21684
- var F = now() - r.pressState.timeStamp, L = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst: B, isFinal: !1, center: __assign(__assign({}, r.pressState.event.center), { delta: F }), pointers: r.pressState.event.pointers.map(function(O) {
21685
- return __assign(__assign({}, O), { delta: F });
21698
+ var O = now() - r.pressState.timeStamp, L = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst: B, isFinal: !1, center: __assign(__assign({}, r.pressState.event.center), { delta: O }), pointers: r.pressState.event.pointers.map(function(F) {
21699
+ return __assign(__assign({}, F), { delta: O });
21686
21700
  }) }));
21687
- r.onPressGesture(L), r.pressState && (r.pressState.stop = AnimationFrameLoop.shared.add(function(O) {
21701
+ r.onPressGesture(L), r.pressState && (r.pressState.stop = AnimationFrameLoop.shared.add(function(F) {
21688
21702
  y(M);
21689
21703
  }, !0, 1));
21690
21704
  }, v = function(M) {
@@ -21692,15 +21706,15 @@ var BaseController = (
21692
21706
  var B = {
21693
21707
  x: M.changedTouches[0].clientX,
21694
21708
  y: M.changedTouches[0].clientY
21695
- }, F = r.relativeClientPosition(B), L = r.createRaycasterFromCamera(F, r.camera), O = __assign(__assign({}, B), { coords: F, raycaster: L, buttons: 0, delta: 0 }), N = createEvent("gesture.press", {
21709
+ }, O = r.relativeClientPosition(B), L = r.createRaycasterFromCamera(O, r.camera), F = __assign(__assign({}, B), { coords: O, raycaster: L, buttons: 0, delta: 0 }), N = createEvent("gesture.press", {
21696
21710
  target: M.target,
21697
21711
  pointerType: "touch",
21698
21712
  srcEvent: M,
21699
- pointers: [__assign({}, O)],
21713
+ pointers: [__assign({}, F)],
21700
21714
  isFirst: !1,
21701
21715
  isFinal: !1,
21702
21716
  scale: 0,
21703
- center: O,
21717
+ center: F,
21704
21718
  velocityX: 0,
21705
21719
  velocityY: 0,
21706
21720
  overallVelocityX: 0,
@@ -21715,15 +21729,15 @@ var BaseController = (
21715
21729
  var B = {
21716
21730
  x: M.clientX,
21717
21731
  y: M.clientY
21718
- }, F = r.relativeClientPosition(B), L = r.createRaycasterFromCamera(F, r.camera), O = __assign(__assign({}, B), { coords: F, raycaster: L, buttons: M.buttons, delta: 0 }), N = createEvent("gesture.press", {
21732
+ }, O = r.relativeClientPosition(B), L = r.createRaycasterFromCamera(O, r.camera), F = __assign(__assign({}, B), { coords: O, raycaster: L, buttons: M.buttons, delta: 0 }), N = createEvent("gesture.press", {
21719
21733
  target: M.target,
21720
21734
  pointerType: "mouse",
21721
21735
  srcEvent: M,
21722
- pointers: [__assign({}, O)],
21736
+ pointers: [__assign({}, F)],
21723
21737
  isFirst: !1,
21724
21738
  isFinal: !1,
21725
21739
  scale: 0,
21726
- center: O,
21740
+ center: F,
21727
21741
  velocityX: 0,
21728
21742
  velocityY: 0,
21729
21743
  overallVelocityX: 0,
@@ -21735,33 +21749,33 @@ var BaseController = (
21735
21749
  }, b = function() {
21736
21750
  var M;
21737
21751
  if (r.pressState) {
21738
- var B = now() - r.pressState.timeStamp, F = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: B }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(L) {
21752
+ var B = now() - r.pressState.timeStamp, O = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: B }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(L) {
21739
21753
  return __assign(__assign({}, L), { delta: B });
21740
21754
  }) }));
21741
- r.onPressGesture(F), (M = r.pressState) === null || M === void 0 || M.stop(), r.pressState = void 0;
21755
+ r.onPressGesture(O), (M = r.pressState) === null || M === void 0 || M.stop(), r.pressState = void 0;
21742
21756
  }
21743
21757
  }, T = null, S = function(M) {
21744
- var B, F = !1, L = !1;
21758
+ var B, O = !1, L = !1;
21745
21759
  switch (M.type) {
21746
21760
  case "gesturestart":
21747
- F = !0;
21761
+ O = !0;
21748
21762
  break;
21749
21763
  case "gestureend":
21750
21764
  L = !0;
21751
21765
  break;
21752
21766
  }
21753
- var O = {
21767
+ var F = {
21754
21768
  x: M.clientX,
21755
21769
  y: M.clientY
21756
- }, N = r.relativeClientPosition(O), D = r.createRaycasterFromCamera(N, r.camera), J = __assign(__assign({}, O), { coords: N, raycaster: D, buttons: 0, delta: 0 }), z = createEvent("gesture.pinch", {
21770
+ }, N = r.relativeClientPosition(F), D = r.createRaycasterFromCamera(N, r.camera), Q = __assign(__assign({}, F), { coords: N, raycaster: D, buttons: 0, delta: 0 }), z = createEvent("gesture.pinch", {
21757
21771
  target: M.target,
21758
21772
  pointerType: "mouse",
21759
21773
  srcEvent: M,
21760
- pointers: [__assign({}, J)],
21761
- isFirst: F,
21774
+ pointers: [__assign({}, Q)],
21775
+ isFirst: O,
21762
21776
  isFinal: L,
21763
21777
  scale: (B = M.scale) !== null && B !== void 0 ? B : 1,
21764
- center: __assign({}, J),
21778
+ center: __assign({}, Q),
21765
21779
  velocityX: 0,
21766
21780
  velocityY: 0,
21767
21781
  overallVelocityX: 0,
@@ -21776,18 +21790,18 @@ var BaseController = (
21776
21790
  T = {
21777
21791
  firstEvent: B
21778
21792
  };
21779
- var F = T.firstEvent;
21780
- F && !o(F.center) || r.onPinchGesture(B);
21793
+ var O = T.firstEvent;
21794
+ O && !o(O.center) || r.onPinchGesture(B);
21781
21795
  }
21782
21796
  }, w = function(M) {
21783
21797
  if (M.preventDefault(), !isMobile && T) {
21784
- var B = S(M), F = T.firstEvent;
21785
- F && !o(F.center) || r.onPinchGesture(B);
21798
+ var B = S(M), O = T.firstEvent;
21799
+ O && !o(O.center) || r.onPinchGesture(B);
21786
21800
  }
21787
21801
  }, C = function(M) {
21788
21802
  if (M.preventDefault(), !isMobile && T) {
21789
- var B = S(M), F = T.firstEvent;
21790
- T = null, !(F && !o(F.center)) && r.onPinchGesture(B);
21803
+ var B = S(M), O = T.firstEvent;
21804
+ T = null, !(O && !o(O.center)) && r.onPinchGesture(B);
21791
21805
  }
21792
21806
  }, I = function(M) {
21793
21807
  if (M && typeof M.preventDefault == "function" && M.currentTarget === e && M.preventDefault(), typeof getSelection == "function") {
@@ -22938,20 +22952,20 @@ void main() {
22938
22952
  }
22939
22953
  if (B.pedding >= B.maxRequest)
22940
22954
  return "continue";
22941
- var ae = Math.pow(2, K.level) * K.position.y, pe = Math.pow(2, K.level) * K.position.x, le = panoStringify({
22955
+ var ie = Math.pow(2, K.level) * K.position.y, ce = Math.pow(2, K.level) * K.position.x, ae = panoStringify({
22942
22956
  panoIndex: B.observer.panoIndex,
22943
22957
  workCode: B.observer.work.workCode
22944
- }), ve = "".concat(le, ".").concat(K.face, ".").concat(K.level, ".").concat(ae, ".").concat(pe), xe = ee.work.getURL(ee[K.face]), Ae = ee.size, Te = B.imageOptions.transform, ue = __assign(__assign({}, pick(B.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(ve), size: ee.scale >= 1 ? void 0 : Ae * K.size * ee.scale, cut: K.size === 1 ? void 0 : [
22945
- Ae * K.position.x,
22946
- Ae * K.position.y,
22947
- Ae * K.size,
22948
- Ae * K.size
22958
+ }), de = "".concat(ae, ".").concat(K.face, ".").concat(K.level, ".").concat(ie, ".").concat(ce), ge = ee.work.getURL(ee[K.face]), ye = ee.size, xe = B.imageOptions.transform, le = __assign(__assign({}, pick(B.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(de), size: ee.scale >= 1 ? void 0 : ye * K.size * ee.scale, cut: K.size === 1 ? void 0 : [
22959
+ ye * K.position.x,
22960
+ ye * K.position.y,
22961
+ ye * K.size,
22962
+ ye * K.size
22949
22963
  ] });
22950
- K.level === 1 && ee.scale >= 0.5 && (ue.format === "jpg" || /\.jpg$/.test(xe)) && (ue.size = void 0, ue.quality || (ue.quality = 70)), K.size === 1 && console.warn("tile: ".concat(ue.key, " should not appear.")), B.pedding++;
22951
- var fe = B.textureLoader.loadTexture(xe, {
22964
+ K.level === 1 && ee.scale >= 0.5 && (le.format === "jpg" || /\.jpg$/.test(ge)) && (le.size = void 0, le.quality || (le.quality = 70)), K.size === 1 && console.warn("tile: ".concat(le.key, " should not appear.")), B.pedding++;
22965
+ var he = B.textureLoader.loadTexture(ge, {
22952
22966
  imageURL: {
22953
- transform: Te,
22954
- options: ue
22967
+ transform: xe,
22968
+ options: le
22955
22969
  },
22956
22970
  minFilter: THREE.LinearFilter,
22957
22971
  magFilter: THREE.LinearFilter,
@@ -22960,16 +22974,16 @@ void main() {
22960
22974
  }).then(function(ne) {
22961
22975
  return ne.body;
22962
22976
  });
22963
- fe.then(function(ne) {
22977
+ he.then(function(ne) {
22964
22978
  return initTexture(ne, l);
22965
22979
  }).then(function(ne) {
22966
22980
  return e.pedding--, ne;
22967
22981
  }, function(ne) {
22968
22982
  return e.pedding--, Promise.reject(ne);
22969
- }), te = new TileMesh(K, fe), te.name = "tiling:tile-".concat(ve), te.visible = !1, te.appearDuration = B.appearDuration, B.tileMeshes.set(K, te), B.scene.add(te), te.updateTime(o), r = !0;
22970
- }, B = this, F = 0, L = w; F < L.length; F++) {
22971
- var O = L[F];
22972
- M(O);
22983
+ }), te = new TileMesh(K, he), te.name = "tiling:tile-".concat(de), te.visible = !1, te.appearDuration = B.appearDuration, B.tileMeshes.set(K, te), B.scene.add(te), te.updateTime(o), r = !0;
22984
+ }, B = this, O = 0, L = w; O < L.length; O++) {
22985
+ var F = L[O];
22986
+ M(F);
22973
22987
  }
22974
22988
  var N = [], D = [];
22975
22989
  this.tileMeshes.forEach(function(K, ee) {
@@ -22977,17 +22991,17 @@ void main() {
22977
22991
  var te = ee.level >= m && ee.level <= A;
22978
22992
  K.visible !== te && (K.visible = te, r = !0);
22979
22993
  });
22980
- for (var J = D.sort(function(K, ee) {
22994
+ for (var Q = D.sort(function(K, ee) {
22981
22995
  return ee.activeTime - K.activeTime;
22982
- }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, G = J; z < G.length; z++) {
22983
- var V = G[z];
22984
- this.tileMeshes.delete(V.node), this.scene.remove(V), V.dispose(), r = !0;
22996
+ }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, G = Q; z < G.length; z++) {
22997
+ var J = G[z];
22998
+ this.tileMeshes.delete(J.node), this.scene.remove(J), J.dispose(), r = !0;
22985
22999
  }
22986
23000
  if (r) {
22987
- var Q = l.getRenderTarget();
23001
+ var V = l.getRenderTarget();
22988
23002
  scratchPrevClearColor$1.copy(l.getClearColor());
22989
- var U = l.getClearAlpha(), j = l.autoClear, Y = l.autoClearColor, Z = l.autoClearDepth, X = l.autoClearStencil, W = l.clippingPlanes;
22990
- l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(Q), l.setClearColor(scratchPrevClearColor$1, U), l.autoClear = j, l.autoClearColor = Y, l.autoClearDepth = Z, l.autoClearStencil = X, l.clippingPlanes = W;
23003
+ var U = l.getClearAlpha(), j = l.autoClear, X = l.autoClearColor, Y = l.autoClearDepth, W = l.autoClearStencil, Z = l.clippingPlanes;
23004
+ 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(V), l.setClearColor(scratchPrevClearColor$1, U), l.autoClear = j, l.autoClearColor = X, l.autoClearDepth = Y, l.autoClearStencil = W, l.clippingPlanes = Z;
22991
23005
  }
22992
23006
  return this.forceRenderWhenNextUpdate = !1, r;
22993
23007
  }, n;
@@ -23290,23 +23304,23 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23290
23304
  w.copy(C), R = !0;
23291
23305
  }
23292
23306
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(w.x + (C.x - w.x) * I, w.y + (C.y - w.y) * I, w.z + (C.z - w.z) * I);
23293
- for (var B = [], F = [], L = 0, O = this.locationMotion.keyframes; L < O.length; L++) {
23294
- var N = O[L], D = N.key, J = N.progress;
23295
- D !== void 0 && (B.push(D), J > this.locationMotion.progress && F.push(D));
23307
+ for (var B = [], O = [], L = 0, F = this.locationMotion.keyframes; L < F.length; L++) {
23308
+ var N = F[L], D = N.key, Q = N.progress;
23309
+ D !== void 0 && (B.push(D), Q > this.locationMotion.progress && O.push(D));
23296
23310
  }
23297
23311
  for (var z = 0, G = Object.keys(this.panoResources); z < G.length; z++) {
23298
- var V = G[z];
23299
- if (!(F.indexOf(V) >= 0)) {
23300
- var Q = this.panoResources[V];
23301
- if (Q.panoPicture) {
23302
- var U = Q.panoPicture.map;
23312
+ var J = G[z];
23313
+ if (!(O.indexOf(J) >= 0)) {
23314
+ var V = this.panoResources[J];
23315
+ if (V.panoPicture) {
23316
+ var U = V.panoPicture.map;
23303
23317
  if (U) {
23304
23318
  if (U === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || U === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
23305
23319
  continue;
23306
- U.dispose(), Q.panoPicture = null;
23320
+ U.dispose(), V.panoPicture = null;
23307
23321
  }
23308
23322
  }
23309
- B.indexOf(V) >= 0 || delete this.panoResources[V];
23323
+ B.indexOf(J) >= 0 || delete this.panoResources[J];
23310
23324
  }
23311
23325
  }
23312
23326
  var j = panoParse(b.panoId);
@@ -23320,119 +23334,119 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23320
23334
  }));
23321
23335
  }
23322
23336
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
23323
- var Y = this.works.getObserver(this.currentPano), Z = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, X = this.works.getObserver(E.panoId), W = this.works.getObserver(b.panoId);
23324
- if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Y) {
23325
- for (var K = [], ee = Y.work.observers, te = 0, re = Y.accessibleNodes; te < re.length; te++) {
23326
- var ae = re[te], M = ee[ae];
23337
+ var X = this.works.getObserver(this.currentPano), Y = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, W = this.works.getObserver(E.panoId), Z = this.works.getObserver(b.panoId);
23338
+ if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && X) {
23339
+ for (var K = [], ee = X.work.observers, te = 0, re = X.accessibleNodes; te < re.length; te++) {
23340
+ var ie = re[te], M = ee[ie];
23327
23341
  M && K.push(M);
23328
23342
  }
23329
- var pe = /* @__PURE__ */ new Map();
23330
- if (K.sort(function(se, ge) {
23331
- var Me = pe.get(se);
23332
- typeof Me == "undefined" && (Me = se.standingPosition.distanceTo(Y.standingPosition), pe.set(se, Me));
23333
- var He = pe.get(se);
23334
- return typeof He == "undefined" && (He = ge.standingPosition.distanceTo(Y.standingPosition), pe.set(ge, He)), Me - He;
23343
+ var ce = /* @__PURE__ */ new Map();
23344
+ if (K.sort(function(ue, Ae) {
23345
+ var Me = ce.get(ue);
23346
+ typeof Me == "undefined" && (Me = ue.standingPosition.distanceTo(X.standingPosition), ce.set(ue, Me));
23347
+ var He = ce.get(ue);
23348
+ return typeof He == "undefined" && (He = Ae.standingPosition.distanceTo(X.standingPosition), ce.set(Ae, He)), Me - He;
23335
23349
  }), K.length) {
23336
23350
  this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % K.length;
23337
- var le = K[this.accessibleObserverFloorCheckCount], ve = this.modelScene.models.find(function(se) {
23338
- return se.work === (le == null ? void 0 : le.work);
23351
+ var ae = K[this.accessibleObserverFloorCheckCount], de = this.modelScene.models.find(function(ue) {
23352
+ return ue.work === (ae == null ? void 0 : ae.work);
23339
23353
  });
23340
- if (le && ve && ve.visible) {
23341
- var xe = 0.3, Ae = 0.05, Te = 5e-3, ue = le.standingPosition.clone().applyMatrix4(le.work.transform), fe = panoStringify({
23342
- panoIndex: le.panoIndex,
23343
- workCode: le.work.workCode
23344
- }), ne = adjustPanoCircleMeshVectors.map(function(se) {
23345
- scratchRaycaster$1.ray.origin.copy(ue), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(se).setY(xe)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
23346
- var ge = ve.intersectRaycaster(scratchRaycaster$1)[0];
23347
- return ge && ge.distance - Te <= xe ? new THREE.Vector3().copy(ue).setY(ge.point.y + Te) : ue;
23354
+ if (ae && de && de.visible) {
23355
+ var ge = 0.3, ye = 0.05, xe = 5e-3, le = ae.standingPosition.clone().applyMatrix4(ae.work.transform), he = panoStringify({
23356
+ panoIndex: ae.panoIndex,
23357
+ workCode: ae.work.workCode
23358
+ }), ne = adjustPanoCircleMeshVectors.map(function(ue) {
23359
+ scratchRaycaster$1.ray.origin.copy(le), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(ue).setY(ge)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
23360
+ var Ae = de.intersectRaycaster(scratchRaycaster$1)[0];
23361
+ return Ae && Ae.distance - xe <= ge ? new THREE.Vector3().copy(le).setY(Ae.point.y + xe) : le;
23348
23362
  });
23349
- ne.sort(function(se, ge) {
23350
- return ge.y - se.y;
23363
+ ne.sort(function(ue, Ae) {
23364
+ return Ae.y - ue.y;
23351
23365
  });
23352
- var oe = ne[Math.floor(ne.length / 2)], de = ne.filter(function(se) {
23353
- return se.distanceTo(oe) <= Ae;
23366
+ var se = ne[Math.floor(ne.length / 2)], pe = ne.filter(function(ue) {
23367
+ return ue.distanceTo(se) <= ye;
23354
23368
  })[0];
23355
- if (de) {
23356
- var me = new THREE.Vector4(ue.x, ue.y, ue.z, de.y - ue.y), Ne = this.adjustPanoCircleMeshPositionFix.get(fe);
23357
- Ne && !me.equals(Ne) && (this.needsRender = !0), this.adjustPanoCircleMeshPositionFix.set(fe, me);
23369
+ if (pe) {
23370
+ var me = new THREE.Vector4(le.x, le.y, le.z, pe.y - le.y), Ne = this.adjustPanoCircleMeshPositionFix.get(he);
23371
+ Ne && !me.equals(Ne) && (this.needsRender = !0), this.adjustPanoCircleMeshPositionFix.set(he, me);
23358
23372
  }
23359
23373
  }
23360
23374
  this.accessibleObserverFloorCheckCount++;
23361
23375
  }
23362
23376
  }
23363
23377
  var qe = /* @__PURE__ */ new Map();
23364
- if (X)
23365
- for (var Ye = 0, Ve = X.accessibleNodes; Ye < Ve.length; Ye++) {
23366
- var ae = Ve[Ye], M = X.work.observers[ae];
23378
+ if (W)
23379
+ for (var Ye = 0, Ve = W.accessibleNodes; Ye < Ve.length; Ye++) {
23380
+ var ie = Ve[Ye], M = W.work.observers[ie];
23367
23381
  if (M) {
23368
- var fe = panoStringify({
23382
+ var he = panoStringify({
23369
23383
  panoIndex: M.panoIndex,
23370
23384
  workCode: M.work.workCode
23371
23385
  });
23372
- qe.set(fe, M);
23386
+ qe.set(he, M);
23373
23387
  }
23374
23388
  }
23375
- if (W)
23376
- for (var he = 0, Ke = W.accessibleNodes; he < Ke.length; he++) {
23377
- var ae = Ke[he], M = W.work.observers[ae];
23389
+ if (Z)
23390
+ for (var ve = 0, Ke = Z.accessibleNodes; ve < Ke.length; ve++) {
23391
+ var ie = Ke[ve], M = Z.work.observers[ie];
23378
23392
  if (M) {
23379
- var fe = panoStringify({
23393
+ var he = panoStringify({
23380
23394
  panoIndex: M.panoIndex,
23381
23395
  workCode: M.work.workCode
23382
23396
  });
23383
- qe.set(fe, M);
23397
+ qe.set(he, M);
23384
23398
  }
23385
23399
  }
23386
- if (this.panoMeshes.forEach(function(se, ge) {
23387
- var Me = qe.get(ge);
23400
+ if (this.panoMeshes.forEach(function(ue, Ae) {
23401
+ var Me = qe.get(Ae);
23388
23402
  if (Me) {
23389
- se.position.copy(Me.standingPosition).applyMatrix4(Me.work.transform);
23390
- var He = o.adjustPanoCircleMeshPositionFix.get(ge);
23391
- He && (scratchVector3$3.set(He.x, He.y, He.z), scratchVector3$3.equals(se.position) && (se.position.y += He.w)), se.scale.setScalar(1.2), qe.delete(ge);
23403
+ ue.position.copy(Me.standingPosition).applyMatrix4(Me.work.transform);
23404
+ var He = o.adjustPanoCircleMeshPositionFix.get(Ae);
23405
+ He && (scratchVector3$3.set(He.x, He.y, He.z), scratchVector3$3.equals(ue.position) && (ue.position.y += He.w)), ue.scale.setScalar(1.2), qe.delete(Ae);
23392
23406
  } else
23393
- o.helper.remove(se), se.dispose(), o.panoMeshes.delete(ge);
23394
- }), qe.forEach(function(se, ge) {
23395
- var Me = o.panoCircleMeshCreator(panoParse(ge));
23396
- Me.position.copy(se.standingPosition).applyMatrix4(se.work.transform);
23397
- var He = o.adjustPanoCircleMeshPositionFix.get(ge);
23398
- He && (scratchVector3$3.set(He.x, He.y, He.z), scratchVector3$3.equals(Me.position) && (Me.position.y += He.w)), Me.scale.setScalar(1.2), o.panoMeshes.set(ge, Me), o.helper.add(Me), qe.delete(ge);
23407
+ o.helper.remove(ue), ue.dispose(), o.panoMeshes.delete(Ae);
23408
+ }), qe.forEach(function(ue, Ae) {
23409
+ var Me = o.panoCircleMeshCreator(panoParse(Ae));
23410
+ Me.position.copy(ue.standingPosition).applyMatrix4(ue.work.transform);
23411
+ var He = o.adjustPanoCircleMeshPositionFix.get(Ae);
23412
+ He && (scratchVector3$3.set(He.x, He.y, He.z), scratchVector3$3.equals(Me.position) && (Me.position.y += He.w)), Me.scale.setScalar(1.2), o.panoMeshes.set(Ae, Me), o.helper.add(Me), qe.delete(Ae);
23399
23413
  }), this.camera.pose.distance > 0.1 || R)
23400
- this.panoMeshes.forEach(function(se) {
23401
- se.setOpacity(0), se.setCurrent(!1), se.updateTime && se.updateTime(e, r), se.visible = !1;
23414
+ this.panoMeshes.forEach(function(ue) {
23415
+ ue.setOpacity(0), ue.setCurrent(!1), ue.updateTime && ue.updateTime(e, r), ue.visible = !1;
23402
23416
  });
23403
- else if (Y) {
23404
- var be = Y.work.observers, Le = arrayMin(Y.accessibleNodes, function(se) {
23405
- var ge = be[se];
23406
- return ge ? Y.standingPosition.distanceTo(ge.standingPosition) : 1 / 0;
23417
+ else if (X) {
23418
+ var Te = X.work.observers, Le = arrayMin(X.accessibleNodes, function(ue) {
23419
+ var Ae = Te[ue];
23420
+ return Ae ? X.standingPosition.distanceTo(Ae.standingPosition) : 1 / 0;
23407
23421
  }, !0), Ie = Le[1];
23408
23422
  Ie = clamp$1(Ie, 2.5, 1 / 0);
23409
- var $e = Y.visibleNodes.concat(Y.panoIndex).map(function(se) {
23410
- return panoStringify({ panoIndex: se, workCode: Y.work.workCode });
23423
+ var $e = X.visibleNodes.concat(X.panoIndex).map(function(ue) {
23424
+ return panoStringify({ panoIndex: ue, workCode: X.work.workCode });
23411
23425
  }), tt = this.camera.getDirection(new THREE.Vector3());
23412
- this.panoMeshes.forEach(function(se, ge) {
23413
- var Me = o.works.getObserver(ge);
23414
- if ($e.indexOf(ge) === -1)
23415
- se.setCurrent(!1), se.setOpacity(0);
23426
+ this.panoMeshes.forEach(function(ue, Ae) {
23427
+ var Me = o.works.getObserver(Ae);
23428
+ if ($e.indexOf(Ae) === -1)
23429
+ ue.setCurrent(!1), ue.setOpacity(0);
23416
23430
  else if (!Me)
23417
- se.setCurrent(!1), se.setOpacity(0);
23431
+ ue.setCurrent(!1), ue.setOpacity(0);
23418
23432
  else if (!Me.loadable && !Me.active)
23419
- se.setCurrent(!1), se.setOpacity(0);
23433
+ ue.setCurrent(!1), ue.setOpacity(0);
23420
23434
  else {
23421
- var He = se.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
23422
- se.setCurrent(!se.loading && se.progress === 0 && Z !== null && panoStringify({ panoIndex: Z.panoIndex, workCode: Z.work.workCode }) === ge), se.setOpacity(He < 0.01 ? 0 : clamp$1(Ie / He * 1.2, 0.4, 0.85));
23423
- var nt = o.camera.position.clone().setY(se.position.y), ct = new THREE.Vector3().copy(se.position).sub(nt).normalize();
23424
- if (ge === panoStringify(o.currentPano)) {
23425
- var bt = clamp$1((0.5 - nt.distanceTo(se.position)) / 0.5, 0, 1);
23435
+ var He = ue.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
23436
+ ue.setCurrent(!ue.loading && ue.progress === 0 && Y !== null && panoStringify({ panoIndex: Y.panoIndex, workCode: Y.work.workCode }) === Ae), ue.setOpacity(He < 0.01 ? 0 : clamp$1(Ie / He * 1.2, 0.4, 0.85));
23437
+ var nt = o.camera.position.clone().setY(ue.position.y), ct = new THREE.Vector3().copy(ue.position).sub(nt).normalize();
23438
+ if (Ae === panoStringify(o.currentPano)) {
23439
+ var bt = clamp$1((0.5 - nt.distanceTo(ue.position)) / 0.5, 0, 1);
23426
23440
  ct.multiplyScalar(1 - bt).add(tt.clone().multiplyScalar(bt));
23427
23441
  }
23428
- ct.length() > 0 && se.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(ct.x, ct.z), 0));
23442
+ ct.length() > 0 && ue.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(ct.x, ct.z), 0));
23429
23443
  }
23430
- se.updateTime && se.updateTime(e, r);
23444
+ ue.updateTime && ue.updateTime(e, r);
23431
23445
  });
23432
23446
  }
23433
23447
  {
23434
- var I = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, ke = Math.round(I), Pe = this.modelScene.parameter.pano0, _e = this.modelScene.parameter.pano1, ye = ke === 0 ? Pe : _e, M = void 0;
23435
- if (ye && (M = this.works.getObserver(ye.panoId), M || (M = this.panoPictureObserverMap.get(ye))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = I < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !M || !ye || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
23448
+ var I = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, ke = Math.round(I), Pe = this.modelScene.parameter.pano0, _e = this.modelScene.parameter.pano1, Ee = ke === 0 ? Pe : _e, M = void 0;
23449
+ if (Ee && (M = this.works.getObserver(Ee.panoId), M || (M = this.panoPictureObserverMap.get(Ee))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = I < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !M || !Ee || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
23436
23450
  this.tiling.setObserver(null);
23437
23451
  var Ce = {
23438
23452
  renderer: this.renderer,
@@ -23449,7 +23463,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23449
23463
  };
23450
23464
  this.tiling.update(Ce), this.modelScene.parameter.set("refinedScreen", null);
23451
23465
  } else {
23452
- var Be = getImageSizeLevel(ye.mapSize), je = Be + 1, Qe = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), We = Math.floor(this.tileLevelForFov(this.camera.fov, Qe)), gt = We > Be ? We : 0;
23466
+ var Be = getImageSizeLevel(Ee.mapSize), je = Be + 1, Qe = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), We = Math.floor(this.tileLevelForFov(this.camera.fov, Qe)), gt = We > Be ? We : 0;
23453
23467
  this.tiling.setObserver(M);
23454
23468
  var Ce = {
23455
23469
  renderer: this.renderer,
@@ -23458,9 +23472,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23458
23472
  time: this.camera.time,
23459
23473
  cameraMatrix: this.camera.matrixWorld,
23460
23474
  cameraProjectionMatrix: this.camera.projectionMatrix,
23461
- panoMap: ye.map,
23462
- panoMatrix: ye.matrix,
23463
- panoZoom: ye.zoom,
23475
+ panoMap: Ee.map,
23476
+ panoMatrix: Ee.matrix,
23477
+ panoZoom: Ee.zoom,
23464
23478
  minLevel: je,
23465
23479
  level: gt
23466
23480
  }, Je = this.tiling.update(Ce), At = {
@@ -23473,7 +23487,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23473
23487
  (Je || At.pano !== (we == null ? void 0 : we.pano) || At.opacity !== (we == null ? void 0 : we.opacity)) && this.modelScene.parameter.set("refinedScreen", At);
23474
23488
  }
23475
23489
  }
23476
- if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), Y && Y.video && (this.needsRender = !0), this.intersectMesh && this.intersectMesh.parent && Y && Y.position.y - Y.standingPosition.y > 10) {
23490
+ if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), X && X.video && (this.needsRender = !0), this.intersectMesh && this.intersectMesh.parent && X && X.position.y - X.standingPosition.y > 10) {
23477
23491
  var Ue = this.camera.position.distanceTo(this.intersectMesh.position), yt = 2 * Math.tan(0.5 * this.camera.fov / 180 * Math.PI), Mt = Ue * yt / 5;
23478
23492
  this.intersectMesh.scale.setScalar(Mt);
23479
23493
  } else
@@ -23740,47 +23754,47 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23740
23754
  { key: E, progress: 1, value: { distance: 0, count: 1 } }
23741
23755
  ], R = 0;
23742
23756
  } else {
23743
- var B = this.locationMotion.getKeyFrameSegment(v), F = B[0], C = B[1], I = this.locationMotion.value, L = this.panoResourceFromLocationMotionKeyframe(F).position, H = this.panoResourceFromLocationMotionKeyframe(C).position, M = r.position, O = C.value.count - I.count, N = Math.max(L.distanceTo(H), b) * O, D = Math.max(H.distanceTo(M), b);
23757
+ var B = this.locationMotion.getKeyFrameSegment(v), O = B[0], C = B[1], I = this.locationMotion.value, L = this.panoResourceFromLocationMotionKeyframe(O).position, H = this.panoResourceFromLocationMotionKeyframe(C).position, M = r.position, F = C.value.count - I.count, N = Math.max(L.distanceTo(H), b) * F, D = Math.max(H.distanceTo(M), b);
23744
23758
  T = N + D, S = [
23745
- { key: F.key, progress: 0, value: __assign({}, I) },
23759
+ { key: O.key, progress: 0, value: __assign({}, I) },
23746
23760
  { key: C.key, progress: N / T, value: C.value },
23747
23761
  { key: E, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
23748
23762
  ];
23749
- var J = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23750
- J === 0 || J === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * J / z;
23763
+ var Q = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23764
+ Q === 0 || Q === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * Q / z;
23751
23765
  }
23752
- var G = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), V = {
23766
+ var G = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), J = {
23753
23767
  longitude: o.longitude,
23754
23768
  latitude: o.latitude,
23755
23769
  fov: o.fov
23756
- }, Q = __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 }), U = this.currentPano;
23770
+ }, V = __assign(__assign({}, e), { mode: this.mode, longitude: (l = J.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = J.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = J.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), U = this.currentPano;
23757
23771
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
23758
23772
  options: o,
23759
23773
  prevPano: U,
23760
23774
  progress: 0,
23761
- state: Q,
23775
+ state: V,
23762
23776
  userAction: this.userAction,
23763
23777
  error: null
23764
- })), 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")
23765
- this.cameraMotion.set(V, G).catch(noop);
23778
+ })), 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")
23779
+ this.cameraMotion.set(J, G).catch(noop);
23766
23780
  else {
23767
23781
  var j = coordinatesToVector({
23768
23782
  longitude: this.cameraMotion.value.longitude,
23769
23783
  latitude: this.cameraMotion.value.latitude
23770
- }), Y = coordinatesToVector({
23771
- longitude: (d = V.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
23772
- latitude: (h = V.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
23773
- }), Z = new THREE.Object3D();
23774
- Z.lookAt(j);
23775
- var X = new THREE.Matrix4().makeRotationFromQuaternion(Z.quaternion);
23776
- Z.lookAt(Y);
23777
- var W = new THREE.Matrix4().makeRotationFromQuaternion(Z.quaternion), K = new THREE.Matrix4().getInverse(X).premultiply(W), ee = this.cameraMotion.value.fov, te = (p = V.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, re = 1;
23784
+ }), X = coordinatesToVector({
23785
+ longitude: (d = J.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
23786
+ latitude: (h = J.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
23787
+ }), Y = new THREE.Object3D();
23788
+ Y.lookAt(j);
23789
+ var W = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion);
23790
+ Y.lookAt(X);
23791
+ var Z = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion), K = new THREE.Matrix4().getInverse(W).premultiply(Z), ee = this.cameraMotion.value.fov, te = (p = J.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, re = 1;
23778
23792
  r.effect === "zoomin" ? re = 1.5 : r.effect === "zoomout" && (re = 0.4);
23779
- for (var ae = clamp$1(te * re, 1, 170), pe = 0; pe < S.length - 1; pe++) {
23780
- var le = S[pe].key;
23781
- if (le) {
23782
- var ve = this.panoResources[le];
23783
- ve && (ve.fixCameraTransform.copy(K), ve.panoPicture && (ve.panoPicture.zoom = Math.tan(ae / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
23793
+ for (var ie = clamp$1(te * re, 1, 170), ce = 0; ce < S.length - 1; ce++) {
23794
+ var ae = S[ce].key;
23795
+ if (ae) {
23796
+ var de = this.panoResources[ae];
23797
+ de && (de.fixCameraTransform.copy(K), de.panoPicture && (de.panoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
23784
23798
  }
23785
23799
  }
23786
23800
  this.cameraMotion.setKeyframes([
@@ -23795,53 +23809,53 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23795
23809
  {
23796
23810
  progress: 0,
23797
23811
  value: {
23798
- longitude: (m = V.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
23799
- latitude: (A = V.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
23800
- fov: ae
23812
+ longitude: (m = J.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
23813
+ latitude: (A = J.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
23814
+ fov: ie
23801
23815
  }
23802
23816
  },
23803
23817
  {
23804
23818
  progress: 1,
23805
23819
  value: {
23806
- longitude: (g = V.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
23807
- latitude: (y = V.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
23820
+ longitude: (g = J.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
23821
+ latitude: (y = J.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
23808
23822
  fov: te
23809
23823
  }
23810
23824
  }
23811
23825
  ], G).catch(noop);
23812
23826
  }
23813
- var xe = this.locationMotion.setKeyframes(S, G, R);
23814
- xe.then(
23827
+ var ge = this.locationMotion.setKeyframes(S, G, R);
23828
+ ge.then(
23815
23829
  // resolve
23816
23830
  // 动画结束
23817
23831
  function() {
23818
- for (var Ae = 0, Te = s.modelScene.children; Ae < Te.length; Ae++) {
23819
- var ue = Te[Ae];
23820
- ue instanceof Model && ue.show();
23832
+ for (var ye = 0, xe = s.modelScene.children; ye < xe.length; ye++) {
23833
+ var le = xe[ye];
23834
+ le instanceof Model && le.show();
23821
23835
  }
23822
- var fe = __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 });
23836
+ var he = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: s.camera.pose.distance });
23823
23837
  s.emit("pano.arrived", createEvent("pano.arrived", {
23824
23838
  options: o,
23825
23839
  prevPano: U,
23826
23840
  progress: 1,
23827
- state: fe,
23841
+ state: he,
23828
23842
  userAction: s.userAction,
23829
23843
  error: null
23830
- })), o.moveEndCallback && o.moveEndCallback(fe);
23844
+ })), o.moveEndCallback && o.moveEndCallback(he);
23831
23845
  var ne = s.works.getObserver(e);
23832
23846
  if (ne && ne.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23833
- var oe = {
23847
+ var se = {
23834
23848
  map: s.videoTexture,
23835
23849
  size: ne.video.size.clone(),
23836
23850
  matrix: ne.video.matrix.clone(),
23837
23851
  panoMatrix: ne.matrix.clone().premultiply(ne.work.transform),
23838
23852
  alpha: 1
23839
- }, de = createUuid(), me = s.videoTexture.image;
23840
- me.setAttribute("uuid", de), me.oncanplay = noop, me.ontimeupdate = noop, canplayVideo().then(function(qe) {
23841
- qe && ne.video && me.getAttribute("uuid") === de && (me.oncanplay = function() {
23853
+ }, pe = createUuid(), me = s.videoTexture.image;
23854
+ me.setAttribute("uuid", pe), me.oncanplay = noop, me.ontimeupdate = noop, canplayVideo().then(function(qe) {
23855
+ qe && ne.video && me.getAttribute("uuid") === pe && (me.oncanplay = function() {
23842
23856
  me.oncanplay = noop, me.play();
23843
23857
  }, me.ontimeupdate = function() {
23844
- me.currentTime > 0.5 && (me.ontimeupdate = noop, s.panoVideo.setMaterial(oe));
23858
+ me.currentTime > 0.5 && (me.ontimeupdate = noop, s.panoVideo.setMaterial(se));
23845
23859
  }, me.src = ne.video.source);
23846
23860
  }).catch((function() {
23847
23861
  me.removeAttribute("uuid");
@@ -23858,7 +23872,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23858
23872
  options: o,
23859
23873
  prevPano: U,
23860
23874
  progress: 0,
23861
- state: Q,
23875
+ state: V,
23862
23876
  userAction: s.userAction,
23863
23877
  error: null
23864
23878
  })), o.moveCancelCallback && o.moveCancelCallback();
@@ -23886,13 +23900,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23886
23900
  var B = A[M];
23887
23901
  if (!B)
23888
23902
  return !1;
23889
- var F = B.standingPosition.clone().applyMatrix4(B.work.transform).project(e);
23890
- return Math.abs(F.z) > 1 || Math.abs(F.x) > 1 || Math.abs(F.y) > 1 ? !1 : B.loadable || B.active;
23903
+ var O = B.standingPosition.clone().applyMatrix4(B.work.transform).project(e);
23904
+ return Math.abs(O.z) > 1 || Math.abs(O.x) > 1 || Math.abs(O.y) > 1 ? !1 : B.loadable || B.active;
23891
23905
  }), y = /* @__PURE__ */ new Map(), v = g.slice().sort(function(M, B) {
23892
- var F = A[M], L = y.get(F);
23893
- typeof L == "undefined" && (L = scratchVector3$3.copy(F.standingPosition).applyMatrix4(F.work.transform).distanceTo(l), y.set(F, L));
23894
- var O = A[B], N = y.get(O);
23895
- return typeof N == "undefined" && (N = scratchVector3$3.copy(O.standingPosition).applyMatrix4(O.work.transform).distanceTo(l), y.set(O, N)), L - N;
23906
+ var O = A[M], L = y.get(O);
23907
+ typeof L == "undefined" && (L = scratchVector3$3.copy(O.standingPosition).applyMatrix4(O.work.transform).distanceTo(l), y.set(O, L));
23908
+ var F = A[B], N = y.get(F);
23909
+ return typeof N == "undefined" && (N = scratchVector3$3.copy(F.standingPosition).applyMatrix4(F.work.transform).distanceTo(l), y.set(F, N)), L - N;
23896
23910
  });
23897
23911
  y.clear();
23898
23912
  for (var E = 0, b = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; E < b.length; E++)
@@ -23924,16 +23938,16 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23924
23938
  var j = f[U];
23925
23939
  if (!j)
23926
23940
  return !1;
23927
- var Y = scratchVector3$3.copy(j.position).applyMatrix4(j.work.transform);
23928
- return Y.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : j.loadable || j.active;
23941
+ var X = scratchVector3$3.copy(j.position).applyMatrix4(j.work.transform);
23942
+ return X.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : j.loadable || j.active;
23929
23943
  }), h = this.modelScene.intersectRaycaster(s)[0];
23930
23944
  if (h) {
23931
23945
  var p = arrayMin(d, function(U) {
23932
23946
  var j = f[U];
23933
23947
  if (!j)
23934
23948
  return 1 / 0;
23935
- var Y = scratchVector3$3.copy(j.standingPosition).applyMatrix4(j.work.transform);
23936
- return Y.distanceTo(h.point);
23949
+ var X = scratchVector3$3.copy(j.standingPosition).applyMatrix4(j.work.transform);
23950
+ return X.distanceTo(h.point);
23937
23951
  }, !0), m = p[0], A = p[1];
23938
23952
  typeof m == "number" && A < this.panoTapTriggerRadius && (l = (o = f[m]) !== null && o !== void 0 ? o : null);
23939
23953
  }
@@ -23951,19 +23965,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23951
23965
  for (var b = {}, T = Math.PI / 6, S = Math.PI / 12, R = l.position.clone().applyMatrix4(l.work.transform).setY(0).sub(c.position.clone().applyMatrix4(l.work.transform).setY(0)).normalize(), w = [], C = [], I = [], H = l.work.observers, M = 0, B = l.accessibleNodes; M < B.length; M++) {
23952
23966
  var m = B[M];
23953
23967
  if (l.panoIndex !== m && !(m === this.currentPano.panoIndex && l.work.workCode === this.currentPano.workCode)) {
23954
- var F = H[m];
23955
- if (F) {
23956
- var L = F.position.clone().applyMatrix4(F.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
23968
+ var O = H[m];
23969
+ if (O) {
23970
+ var L = O.position.clone().applyMatrix4(O.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
23957
23971
  R.angleTo(L) < T && I.push(L);
23958
23972
  }
23959
23973
  }
23960
23974
  }
23961
- var O = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = O.slice().sort(function(U, j) {
23975
+ var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(U, j) {
23962
23976
  return U.angleTo(R) - j.angleTo(R);
23963
23977
  })[0];
23964
23978
  if (N && N.angleTo(u) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
23965
- var D = e.state.fov, J = 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);
23966
- b.latitude = clamp$1(0, J, z);
23979
+ 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);
23980
+ b.latitude = clamp$1(0, Q, z);
23967
23981
  }
23968
23982
  var G = __assign({}, e.state);
23969
23983
  if (G.workCode = l.work.workCode, G.panoIndex = l.panoIndex, b.longitude !== void 0 && (G.longitude = b.longitude), b.latitude !== void 0 && (G.latitude = b.latitude), b.fov !== void 0 && (G.fov = b.fov), G.distance = 0, G.offset = l.position.clone(), e.state = G, this.emit("gesture.tap", e), !e.defaultPrevented) {
@@ -23975,11 +23989,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23975
23989
  progress: 0,
23976
23990
  error: null
23977
23991
  })), l && !l.active) {
23978
- var V = panoStringify({
23992
+ var J = panoStringify({
23979
23993
  panoIndex: l.panoIndex,
23980
23994
  workCode: l.work.workCode
23981
- }), Q = this.panoMeshes.get(V);
23982
- Q && (Q.setDisabled(!1), Q.setLoading(!0));
23995
+ }), V = this.panoMeshes.get(J);
23996
+ V && (V.setDisabled(!1), V.setLoading(!0));
23983
23997
  }
23984
23998
  l && l.active && this.emit("pano.request", createEvent("pano.request", {
23985
23999
  userAction: e.userAction,
@@ -24081,8 +24095,8 @@ var updateEyeViewMatrices = /* @__PURE__ */ (function() {
24081
24095
  return o === r ? (r[12] = o[0] * u + o[4] * l + o[8] * c + o[12], r[13] = o[1] * u + o[5] * l + o[9] * c + o[13], r[14] = o[2] * u + o[6] * l + o[10] * c + o[14], r[15] = o[3] * u + o[7] * l + o[11] * c + o[15]) : (f = o[0], d = o[1], h = o[2], p = o[3], m = o[4], A = o[5], g = o[6], y = o[7], v = o[8], E = o[9], b = o[10], T = o[11], r[0] = f, r[1] = d, r[2] = h, r[3] = p, r[4] = m, r[5] = A, r[6] = g, r[7] = y, r[8] = v, r[9] = E, r[10] = b, r[11] = T, r[12] = f * u + m * l + v * c + o[12], r[13] = d * u + A * l + E * c + o[13], r[14] = h * u + g * l + b * c + o[14], r[15] = p * u + y * l + T * c + o[15]), r;
24082
24096
  }
24083
24097
  function e(r, o) {
24084
- var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], y = o[11], v = o[12], E = o[13], b = o[14], T = o[15], S = s * d - u * f, R = s * h - l * f, w = s * p - c * f, C = u * h - l * d, I = u * p - c * d, H = l * p - c * h, M = m * E - A * v, B = m * b - g * v, F = m * T - y * v, L = A * b - g * E, O = A * T - y * E, N = g * T - y * b, D = S * N - R * O + w * L + C * F - I * B + H * M;
24085
- return D ? (D = 1 / D, r[0] = (d * N - h * O + p * L) * D, r[1] = (l * O - u * N - c * L) * D, r[2] = (E * H - b * I + T * C) * D, r[3] = (g * I - A * H - y * C) * D, r[4] = (h * F - f * N - p * B) * D, r[5] = (s * N - l * F + c * B) * D, r[6] = (b * w - v * H - T * R) * D, r[7] = (m * H - g * w + y * R) * D, r[8] = (f * O - d * F + p * M) * D, r[9] = (u * F - s * O - c * M) * D, r[10] = (v * I - E * w + T * S) * D, r[11] = (A * w - m * I - y * S) * D, r[12] = (d * B - f * L - h * M) * D, r[13] = (s * L - u * B + l * M) * D, r[14] = (E * R - v * C - b * S) * D, r[15] = (m * C - A * R + g * S) * D, r) : null;
24098
+ var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], y = o[11], v = o[12], E = o[13], b = o[14], T = o[15], S = s * d - u * f, R = s * h - l * f, w = s * p - c * f, C = u * h - l * d, I = u * p - c * d, H = l * p - c * h, M = m * E - A * v, B = m * b - g * v, O = m * T - y * v, L = A * b - g * E, F = A * T - y * E, N = g * T - y * b, D = S * N - R * F + w * L + C * O - I * B + H * M;
24099
+ return D ? (D = 1 / D, r[0] = (d * N - h * F + p * L) * D, r[1] = (l * F - u * N - c * L) * D, r[2] = (E * H - b * I + T * C) * D, r[3] = (g * I - A * H - y * C) * D, r[4] = (h * O - f * N - p * B) * D, r[5] = (s * N - l * O + c * B) * D, r[6] = (b * w - v * H - T * R) * D, r[7] = (m * H - g * w + y * R) * D, r[8] = (f * F - d * O + p * M) * D, r[9] = (u * O - s * F - c * M) * D, r[10] = (v * I - E * w + T * S) * D, r[11] = (A * w - m * I - y * S) * D, r[12] = (d * B - f * L - h * M) * D, r[13] = (s * L - u * B + l * M) * D, r[14] = (E * R - v * C - b * S) * D, r[15] = (m * C - A * R + g * S) * D, r) : null;
24086
24100
  }
24087
24101
  return function(r, o, s) {
24088
24102
  n(r, o), s && t(r, r, s), e(r, r);
@@ -24893,38 +24907,38 @@ void main() {
24893
24907
  var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), y = g[0], v = g[1], E = this.panoResourceFromLocationMotionKeyframe(y), b = this.panoResourceFromLocationMotionKeyframe(v), T = this.panoResourceFromLocationMotionKeyframe(m), S = this.panoResourceFromLocationMotionKeyframe(A), R = !1;
24894
24908
  if (this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), h.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended === !1 && (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), this.locationMotion.ended === !1) {
24895
24909
  this.locationMotion.update(e);
24896
- var w = this.locationMotion.getKeyFrameSegment(e), C = w[0], I = w[1], H = this.panoResourceFromLocationMotionKeyframe(C), M = this.panoResourceFromLocationMotionKeyframe(I), B = H.position, F = M.position, L = this.locationMotion.value.count - I.value.count + 1;
24910
+ var w = this.locationMotion.getKeyFrameSegment(e), C = w[0], I = w[1], H = this.panoResourceFromLocationMotionKeyframe(C), M = this.panoResourceFromLocationMotionKeyframe(I), B = H.position, O = M.position, L = this.locationMotion.value.count - I.value.count + 1;
24897
24911
  if (h.progress = L, M.panoPicture && (L < 1 ? H.panoPicture && (h.pano0 = H.panoPicture) : h.pano0 = M.panoPicture, h.pano1 = M.panoPicture), M.effect === "montage" ? h.transition = "BLACK" : M.effect === "spread" ? h.transition = "SPREAD" : h.transition = "FADE", (M.effect === "zoomin" || M.effect === "zoomout") && (h.progress = Math.pow(L, 3)), L < 1 && M.effect !== "fly") {
24898
24912
  if (h.pano0 && H.panoPicture) {
24899
- var O = {
24913
+ var F = {
24900
24914
  panoId: h.pano0.panoId,
24901
24915
  map: h.pano0.map,
24902
24916
  mapSize: h.pano0.mapSize,
24903
24917
  zoom: h.pano0.zoom,
24904
24918
  matrix: H.panoPicture.matrix.clone().setPosition(M.position)
24905
24919
  }, N = this.panoPictureObserverMap.get(h.pano0);
24906
- N && this.panoPictureObserverMap.set(O, N), h.pano0 = O;
24920
+ N && this.panoPictureObserverMap.set(F, N), h.pano0 = F;
24907
24921
  }
24908
- B.copy(F), R = !0;
24922
+ B.copy(O), R = !0;
24909
24923
  }
24910
- p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(B.x + (F.x - B.x) * L, B.y + (F.y - B.y) * L, B.z + (F.z - B.z) * L);
24911
- for (var D = [], J = [], z = 0, G = this.locationMotion.keyframes; z < G.length; z++) {
24912
- var V = G[z], Q = V.key, U = V.progress;
24913
- Q !== void 0 && (D.push(Q), U > this.locationMotion.progress && J.push(Q));
24924
+ p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(B.x + (O.x - B.x) * L, B.y + (O.y - B.y) * L, B.z + (O.z - B.z) * L);
24925
+ for (var D = [], Q = [], z = 0, G = this.locationMotion.keyframes; z < G.length; z++) {
24926
+ var J = G[z], V = J.key, U = J.progress;
24927
+ V !== void 0 && (D.push(V), U > this.locationMotion.progress && Q.push(V));
24914
24928
  }
24915
- for (var j = 0, Y = Object.keys(this.panoResources); j < Y.length; j++) {
24916
- var Z = Y[j];
24917
- if (!(J.indexOf(Z) >= 0)) {
24918
- var X = this.panoResources[Z];
24919
- if (X.panoPicture) {
24920
- var W = X.panoPicture.map;
24921
- if (W) {
24922
- if (W === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || W === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
24929
+ for (var j = 0, X = Object.keys(this.panoResources); j < X.length; j++) {
24930
+ var Y = X[j];
24931
+ if (!(Q.indexOf(Y) >= 0)) {
24932
+ var W = this.panoResources[Y];
24933
+ if (W.panoPicture) {
24934
+ var Z = W.panoPicture.map;
24935
+ if (Z) {
24936
+ if (Z === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || Z === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
24923
24937
  continue;
24924
- W.dispose(), X.panoPicture = null;
24938
+ Z.dispose(), W.panoPicture = null;
24925
24939
  }
24926
24940
  }
24927
- D.indexOf(Z) >= 0 || delete this.panoResources[Z];
24941
+ D.indexOf(Y) >= 0 || delete this.panoResources[Y];
24928
24942
  }
24929
24943
  }
24930
24944
  this.currentPano = panoParse(M.panoId), this.emit("pano.moving", createEvent("pano.moving", {
@@ -24942,56 +24956,56 @@ void main() {
24942
24956
  userAction: !0,
24943
24957
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
24944
24958
  }))), this.works.getObserver(this.currentPano);
24945
- var te = this.works.getObserver(E.panoId), re = this.works.getObserver(b.panoId), ae = /* @__PURE__ */ new Map();
24959
+ var te = this.works.getObserver(E.panoId), re = this.works.getObserver(b.panoId), ie = /* @__PURE__ */ new Map();
24946
24960
  if (te)
24947
- for (var pe = 0, le = te.accessibleNodes; pe < le.length; pe++) {
24948
- var ve = le[pe], N = te.work.observers[ve];
24961
+ for (var ce = 0, ae = te.accessibleNodes; ce < ae.length; ce++) {
24962
+ var de = ae[ce], N = te.work.observers[de];
24949
24963
  if (N) {
24950
- var xe = panoStringify({
24964
+ var ge = panoStringify({
24951
24965
  panoIndex: N.panoIndex,
24952
24966
  workCode: N.work.workCode
24953
24967
  });
24954
- ae.set(xe, N);
24968
+ ie.set(ge, N);
24955
24969
  }
24956
24970
  }
24957
24971
  if (re)
24958
- for (var Ae = 0, Te = re.accessibleNodes; Ae < Te.length; Ae++) {
24959
- var ve = Te[Ae], N = re.work.observers[ve];
24972
+ for (var ye = 0, xe = re.accessibleNodes; ye < xe.length; ye++) {
24973
+ var de = xe[ye], N = re.work.observers[de];
24960
24974
  if (N) {
24961
- var xe = panoStringify({
24975
+ var ge = panoStringify({
24962
24976
  panoIndex: N.panoIndex,
24963
24977
  workCode: N.work.workCode
24964
24978
  });
24965
- ae.set(xe, N);
24979
+ ie.set(ge, N);
24966
24980
  }
24967
24981
  }
24968
- if (this.panoMeshes.forEach(function(ye, Ce) {
24969
- var Be = ae.get(Ce);
24970
- Be ? (ye.position.copy(Be.position).applyMatrix4(Be.work.transform), ae.delete(Ce)) : (o.helper.remove(ye), ye.dispose(), o.panoMeshes.delete(Ce));
24971
- }), ae.forEach(function(ye, Ce) {
24982
+ if (this.panoMeshes.forEach(function(Ee, Ce) {
24983
+ var Be = ie.get(Ce);
24984
+ Be ? (Ee.position.copy(Be.position).applyMatrix4(Be.work.transform), ie.delete(Ce)) : (o.helper.remove(Ee), Ee.dispose(), o.panoMeshes.delete(Ce));
24985
+ }), ie.forEach(function(Ee, Ce) {
24972
24986
  var Be = new PanoSphereMesh();
24973
- Be.position.copy(ye.position).applyMatrix4(ye.work.transform), o.panoMeshes.set(Ce, Be), o.helper.add(Be), ae.delete(Ce);
24974
- }), this.camera.pose.distance > 0.1 || R ? this.panoMeshes.forEach(function(ye, Ce) {
24975
- ye.setOpacity(0), ye.updateTime && ye.updateTime(e, r), ye.visible = !1;
24976
- }) : this.panoMeshes.forEach(function(ye, Ce) {
24987
+ Be.position.copy(Ee.position).applyMatrix4(Ee.work.transform), o.panoMeshes.set(Ce, Be), o.helper.add(Be), ie.delete(Ce);
24988
+ }), this.camera.pose.distance > 0.1 || R ? this.panoMeshes.forEach(function(Ee, Ce) {
24989
+ Ee.setOpacity(0), Ee.updateTime && Ee.updateTime(e, r), Ee.visible = !1;
24990
+ }) : this.panoMeshes.forEach(function(Ee, Ce) {
24977
24991
  var Be = panoParse(Ce), je = o.works.getObserver(Be);
24978
24992
  if (je) {
24979
24993
  if (!je.loadable && !je.active) {
24980
- ye.setOpacity(0);
24994
+ Ee.setOpacity(0);
24981
24995
  return;
24982
24996
  }
24983
- var Qe = ye.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
24984
- Qe < 0.05 ? ye.setOpacity(0) : ye.setOpacity(clamp$1(1.5 / Qe, 0, 1)), panoEqual(o.currentPano, Be) && ye.setOpacity(0), ye.lookAt(o.camera.position);
24997
+ var Qe = Ee.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
24998
+ Qe < 0.05 ? Ee.setOpacity(0) : Ee.setOpacity(clamp$1(1.5 / Qe, 0, 1)), panoEqual(o.currentPano, Be) && Ee.setOpacity(0), Ee.lookAt(o.camera.position);
24985
24999
  }
24986
25000
  }), this.locationMotion.ended) {
24987
- var ue = this.intersect(e);
24988
- this.panoMeshes.forEach(function(ye, Ce) {
24989
- ye.setCurrent(ye === ue), ye.updateTime && ye.updateTime(e, r);
25001
+ var le = this.intersect(e);
25002
+ this.panoMeshes.forEach(function(Ee, Ce) {
25003
+ Ee.setCurrent(Ee === le), Ee.updateTime && Ee.updateTime(e, r);
24990
25004
  });
24991
25005
  }
24992
25006
  {
24993
- var L = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, fe = Math.round(L), ne = this.modelScene.parameter.pano0, oe = this.modelScene.parameter.pano1, de = fe === 0 ? ne : oe, N = void 0;
24994
- if (de && (N = this.works.getObserver(de.panoId), N || (N = this.panoPictureObserverMap.get(de))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = L < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !N || !de || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
25007
+ var L = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, he = Math.round(L), ne = this.modelScene.parameter.pano0, se = this.modelScene.parameter.pano1, pe = he === 0 ? ne : se, N = void 0;
25008
+ if (pe && (N = this.works.getObserver(pe.panoId), N || (N = this.panoPictureObserverMap.get(pe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = L < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !N || !pe || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
24995
25009
  this.tiling.setObserver(null);
24996
25010
  var me = {
24997
25011
  renderer: this.renderer,
@@ -25008,7 +25022,7 @@ void main() {
25008
25022
  };
25009
25023
  this.tiling.update(me), this.modelScene.parameter.set("refinedScreen", null);
25010
25024
  } else {
25011
- var Ne = getImageSizeLevel(de.mapSize), qe = Ne + 1, Ye = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Ve = Math.floor(this.tileLevelForFov(this.camera.fov, Ye)), he = Ve > Ne ? Ve : 0;
25025
+ var Ne = getImageSizeLevel(pe.mapSize), qe = Ne + 1, Ye = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Ve = Math.floor(this.tileLevelForFov(this.camera.fov, Ye)), ve = Ve > Ne ? Ve : 0;
25012
25026
  this.tiling.setObserver(N);
25013
25027
  var me = {
25014
25028
  renderer: this.renderer,
@@ -25017,26 +25031,26 @@ void main() {
25017
25031
  time: this.camera.time,
25018
25032
  cameraMatrix: this.camera.matrixWorld,
25019
25033
  cameraProjectionMatrix: this.camera.projectionMatrix,
25020
- panoMap: de.map,
25021
- panoMatrix: de.matrix,
25022
- panoZoom: de.zoom,
25034
+ panoMap: pe.map,
25035
+ panoMatrix: pe.matrix,
25036
+ panoZoom: pe.zoom,
25023
25037
  minLevel: qe,
25024
- level: he
25025
- }, Ke = this.tiling.update(me), be = {
25038
+ level: ve
25039
+ }, Ke = this.tiling.update(me), Te = {
25026
25040
  map: this.tiling.renderTarget.texture,
25027
25041
  matrixInverse: this.tiling.camera.matrixWorldInverse,
25028
25042
  projectionMatrix: this.tiling.camera.projectionMatrix,
25029
- pano: fe,
25030
- opacity: (ne == null ? void 0 : ne.panoId) === (oe == null ? void 0 : oe.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25043
+ pano: he,
25044
+ opacity: (ne == null ? void 0 : ne.panoId) === (se == null ? void 0 : se.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25031
25045
  }, Le = this.modelScene.parameter.refinedScreen;
25032
- (Ke || be.pano !== (Le == null ? void 0 : Le.pano) || be.opacity !== (Le == null ? void 0 : Le.opacity)) && this.modelScene.parameter.set("refinedScreen", be);
25046
+ (Ke || Te.pano !== (Le == null ? void 0 : Le.pano) || Te.opacity !== (Le == null ? void 0 : Le.opacity)) && this.modelScene.parameter.set("refinedScreen", Te);
25033
25047
  }
25034
25048
  }
25035
25049
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
25036
25050
  {
25037
- var Ie = b.effect, $e = this.modelScene.parameter, ne = $e.pano0, oe = $e.pano1;
25038
- if (ne && oe && ne !== oe && Ie === "fly" && this.flyEffectUseDepthBuffer) {
25039
- if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== ne.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== oe.panoId) {
25051
+ var Ie = b.effect, $e = this.modelScene.parameter, ne = $e.pano0, se = $e.pano1;
25052
+ if (ne && se && ne !== se && Ie === "fly" && this.flyEffectUseDepthBuffer) {
25053
+ if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== ne.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== se.panoId) {
25040
25054
  var tt = 500, ke = 512;
25041
25055
  this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== ke && this.pano0DepthCubeRenderTarget.setSize(ke, ke) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(ke, {
25042
25056
  minFilter: THREE.NearestFilter,
@@ -25050,7 +25064,7 @@ void main() {
25050
25064
  var Pe = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
25051
25065
  Pe.matrix.copy(ne.matrix), Pe.matrixWorld.copy(Pe.matrix), Pe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Pe, tt);
25052
25066
  var _e = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
25053
- _e.matrix.copy(oe.matrix), _e.matrixWorld.copy(_e.matrix), _e.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, _e, tt), this.modelScene.parameter.set({
25067
+ _e.matrix.copy(se.matrix), _e.matrixWorld.copy(_e.matrix), _e.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, _e, tt), this.modelScene.parameter.set({
25054
25068
  pano0Depth: {
25055
25069
  panoId: ne.panoId,
25056
25070
  map: this.pano0DepthCubeRenderTarget.texture,
@@ -25058,7 +25072,7 @@ void main() {
25058
25072
  maxDepth: tt
25059
25073
  },
25060
25074
  pano1Depth: {
25061
- panoId: oe.panoId,
25075
+ panoId: se.panoId,
25062
25076
  map: this.pano1DepthCubeRenderTarget.texture,
25063
25077
  mapSize: this.pano1DepthCubeRenderTarget.width,
25064
25078
  maxDepth: tt
@@ -25343,30 +25357,30 @@ void main() {
25343
25357
  longitude: r.longitude,
25344
25358
  latitude: r.latitude,
25345
25359
  fov: r.fov
25346
- }, M = [], B = function(V) {
25347
- var Q = F.modelScene.models.find(function(Z) {
25348
- return Z.work === V;
25360
+ }, M = [], B = function(J) {
25361
+ var V = O.modelScene.models.find(function(Y) {
25362
+ return Y.work === J;
25349
25363
  });
25350
- if (!Q || Q.visible === !1 || V.observers.length <= 0)
25364
+ if (!V || V.visible === !1 || J.observers.length <= 0)
25351
25365
  return "continue";
25352
- if (scratchObserverBox$1.copy(V.observerBox).expandByScalar(10).applyMatrix4(V.transform), scratchObserverBox$1.containsPoint(d))
25353
- for (var U = 0, j = V.observers; U < j.length; U++) {
25354
- var Y = j[U];
25355
- M.push(Y);
25366
+ if (scratchObserverBox$1.copy(J.observerBox).expandByScalar(10).applyMatrix4(J.transform), scratchObserverBox$1.containsPoint(d))
25367
+ for (var U = 0, j = J.observers; U < j.length; U++) {
25368
+ var X = j[U];
25369
+ M.push(X);
25356
25370
  }
25357
- }, F = this, L = 0, O = this.works; L < O.length; L++) {
25358
- var N = O[L];
25371
+ }, O = this, L = 0, F = this.works; L < F.length; L++) {
25372
+ var N = F[L];
25359
25373
  B(N);
25360
25374
  }
25361
- var D = arrayMin(M, function(V) {
25362
- return scratchVector3$2.copy(V.position).applyMatrix4(V.work.transform).distanceTo(d);
25363
- }), J = D ? {
25375
+ var D = arrayMin(M, function(J) {
25376
+ return scratchVector3$2.copy(J.position).applyMatrix4(J.work.transform).distanceTo(d);
25377
+ }), Q = D ? {
25364
25378
  workCode: D.work.workCode,
25365
25379
  panoIndex: D.panoIndex
25366
25380
  } : {
25367
25381
  workCode: "",
25368
25382
  panoIndex: 0
25369
- }, z = __assign(__assign({}, J), { mode: this.mode, longitude: (u = H.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = H.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = H.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), G = this.currentPano;
25383
+ }, z = __assign(__assign({}, Q), { mode: this.mode, longitude: (u = H.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = H.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = H.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), G = this.currentPano;
25370
25384
  this.emit("pano.moveTo", createEvent("pano.moveTo", {
25371
25385
  options: r,
25372
25386
  prevPano: G,
@@ -25378,11 +25392,11 @@ void main() {
25378
25392
  // resolve
25379
25393
  // 动画结束
25380
25394
  function() {
25381
- for (var V = 0, Q = s.modelScene.children; V < Q.length; V++) {
25382
- var U = Q[V];
25395
+ for (var J = 0, V = s.modelScene.children; J < V.length; J++) {
25396
+ var U = V[J];
25383
25397
  U instanceof Model && U.show();
25384
25398
  }
25385
- var j = __assign(__assign(__assign({}, J), { mode: s.mode }), clonePose(s.camera.pose));
25399
+ var j = __assign(__assign(__assign({}, Q), { mode: s.mode }), clonePose(s.camera.pose));
25386
25400
  s.emit("pano.arrived", createEvent("pano.arrived", {
25387
25401
  options: r,
25388
25402
  prevPano: G,
@@ -25787,18 +25801,18 @@ void main() {
25787
25801
  y: C.offset.y,
25788
25802
  z: C.offset.z
25789
25803
  }, 0).catch(noop)), e.isFinal) {
25790
- var I = this.renderer.getSize(new THREE.Vector2()), H = 2 * e.velocityX * b / I.y, M = 2 * e.velocityY * b / I.y, B = new THREE.Vector3(), F = new THREE.Vector3();
25791
- B.setFromMatrixColumn(this.camera.matrix, 0), B.multiplyScalar(-H), F.add(B), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? B.setFromMatrixColumn(this.camera.matrix, 1) : (B.setFromMatrixColumn(this.camera.matrix, 0), B.crossVectors(this.camera.up, B)), B.multiplyScalar(M), F.add(B), this.inMomentumMovement = {
25804
+ var I = this.renderer.getSize(new THREE.Vector2()), H = 2 * e.velocityX * b / I.y, M = 2 * e.velocityY * b / I.y, B = new THREE.Vector3(), O = new THREE.Vector3();
25805
+ B.setFromMatrixColumn(this.camera.matrix, 0), B.multiplyScalar(-H), O.add(B), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? B.setFromMatrixColumn(this.camera.matrix, 1) : (B.setFromMatrixColumn(this.camera.matrix, 0), B.crossVectors(this.camera.up, B)), B.multiplyScalar(M), O.add(B), this.inMomentumMovement = {
25792
25806
  uuid: createUuid()
25793
- }, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: F.x, y: F.y, z: F.z }, 0);
25807
+ }, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: O.x, y: O.y, z: O.z }, 0);
25794
25808
  }
25795
25809
  } else {
25796
25810
  var y = {
25797
25811
  x: e.center.x - o.x,
25798
25812
  y: e.center.y - o.y
25799
- }, L = this.coordinatesForOffset(y), O = formatRad$1(this.cameraMotion.value.longitude + L.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), J = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(this.cameraMotion.value.latitude + L.latitude, D, J);
25813
+ }, L = this.coordinatesForOffset(y), F = formatRad$1(this.cameraMotion.value.longitude + L.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), Q = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(this.cameraMotion.value.latitude + L.latitude, D, Q);
25800
25814
  this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (z = this.cameraMotion.value.latitude);
25801
- var C = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: O, latitude: z, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
25815
+ var C = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: F, latitude: z, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
25802
25816
  if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = C, this.emit("gesture.pan", e), e.defaultPrevented)
25803
25817
  return;
25804
25818
  if (e.isFinal ? this.locationMotion.set({
@@ -25810,10 +25824,10 @@ void main() {
25810
25824
  longitude: C.longitude,
25811
25825
  latitude: C.latitude
25812
25826
  }, 0).catch(noop), e.isFinal) {
25813
- var G = e.velocityX, V = e.velocityY;
25827
+ var G = e.velocityX, J = e.velocityY;
25814
25828
  this.inMomentumMovement = {
25815
25829
  uuid: createUuid()
25816
- }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: G, y: V })), { x: 0, y: 0, z: 0 }), 0);
25830
+ }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: G, y: J })), { x: 0, y: 0, z: 0 }), 0);
25817
25831
  }
25818
25832
  }
25819
25833
  }
@@ -26580,10 +26594,10 @@ var LineSegments2 = (
26580
26594
  var H = THREE.MathUtils.lerp(m.z, A.z, I), M = H >= -1 && H <= 1, B = y.distanceTo(b) < d * 0.5;
26581
26595
  if (M && B) {
26582
26596
  E.start.fromBufferAttribute(h, S), E.end.fromBufferAttribute(p, S), E.start.applyMatrix4(T), E.end.applyMatrix4(T);
26583
- var F = new THREE.Vector3(), L = new THREE.Vector3();
26584
- o.distanceSqToSegment(E.start, E.end, L, F), r.push({
26597
+ var O = new THREE.Vector3(), L = new THREE.Vector3();
26598
+ o.distanceSqToSegment(E.start, E.end, L, O), r.push({
26585
26599
  point: L,
26586
- pointOnLine: F,
26600
+ pointOnLine: O,
26587
26601
  distance: o.origin.distanceTo(L),
26588
26602
  object: this,
26589
26603
  faceIndex: S
@@ -26662,7 +26676,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26662
26676
  }
26663
26677
  return Object.defineProperty(t, "version", {
26664
26678
  get: function() {
26665
- return "6.6.0-alpha.20";
26679
+ return "6.6.0-alpha.21";
26666
26680
  },
26667
26681
  enumerable: !1,
26668
26682
  configurable: !0
@@ -27286,28 +27300,28 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27286
27300
  { key: v, progress: 1, value: { distance: 0, count: 1 } }
27287
27301
  ], S = 0;
27288
27302
  } else {
27289
- var M = this.locationMotion.getKeyFrameSegment(y), B = M[0], w = M[1], C = this.locationMotion.value, F = this.panoResourceFromLocationMotionKeyframe(B).position, I = this.panoResourceFromLocationMotionKeyframe(w).position, H = r.position, L = w.value.count - C.count, O = Math.max(F.distanceTo(I), E) * L, N = Math.max(I.distanceTo(H), E);
27290
- b = O + N, T = [
27303
+ var M = this.locationMotion.getKeyFrameSegment(y), B = M[0], w = M[1], C = this.locationMotion.value, O = this.panoResourceFromLocationMotionKeyframe(B).position, I = this.panoResourceFromLocationMotionKeyframe(w).position, H = r.position, L = w.value.count - C.count, F = Math.max(O.distanceTo(I), E) * L, N = Math.max(I.distanceTo(H), E);
27304
+ b = F + N, T = [
27291
27305
  { key: B.key, progress: 0, value: __assign({}, C) },
27292
- { key: w.key, progress: O / b, value: w.value },
27306
+ { key: w.key, progress: F / b, value: w.value },
27293
27307
  { key: v, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
27294
27308
  ];
27295
- var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), J = this.locationMotionKeyframesLength(T);
27296
- S = this.locationMotion.getProgressVelocity(y) * D / J;
27309
+ var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), Q = this.locationMotionKeyframesLength(T);
27310
+ S = this.locationMotion.getProgressVelocity(y) * D / Q;
27297
27311
  }
27298
27312
  var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), G = {
27299
27313
  longitude: o.longitude,
27300
27314
  latitude: o.latitude,
27301
27315
  fov: o.fov
27302
- }, V = __assign(__assign({}, e), { mode: this.mode, longitude: (u = G.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = G.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = G.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), Q = this.currentPano;
27316
+ }, J = __assign(__assign({}, e), { mode: this.mode, longitude: (u = G.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = G.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = G.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), V = this.currentPano;
27303
27317
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
27304
27318
  options: o,
27305
- prevPano: Q,
27319
+ prevPano: V,
27306
27320
  progress: 0,
27307
- state: V,
27321
+ state: J,
27308
27322
  userAction: this.userAction,
27309
27323
  error: null
27310
- })), 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")
27324
+ })), o.moveStartCallback && o.moveStartCallback(J), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
27311
27325
  this.cameraMotion.set(G, z).catch(noop);
27312
27326
  else {
27313
27327
  var U = coordinatesToVector({
@@ -27316,17 +27330,17 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27316
27330
  }), j = coordinatesToVector({
27317
27331
  longitude: (f = G.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
27318
27332
  latitude: (d = G.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
27319
- }), Y = new THREE.Object3D();
27320
- Y.lookAt(U);
27321
- var Z = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion);
27322
- Y.lookAt(j);
27323
- var X = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion), W = new THREE.Matrix4().getInverse(Z).premultiply(X), K = this.cameraMotion.value.fov, ee = (h = G.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
27333
+ }), X = new THREE.Object3D();
27334
+ X.lookAt(U);
27335
+ var Y = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion);
27336
+ X.lookAt(j);
27337
+ var W = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion), Z = new THREE.Matrix4().getInverse(Y).premultiply(W), K = this.cameraMotion.value.fov, ee = (h = G.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
27324
27338
  r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
27325
- for (var re = ee * te, ae = 0; ae < T.length - 1; ae++) {
27326
- var pe = T[ae].key;
27327
- if (pe) {
27328
- var le = this.panoResources[pe];
27329
- le && (le.fixCameraTransform.copy(W), le.leftPanoPicture && (le.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27339
+ for (var re = ee * te, ie = 0; ie < T.length - 1; ie++) {
27340
+ var ce = T[ie].key;
27341
+ if (ce) {
27342
+ var ae = this.panoResources[ce];
27343
+ ae && (ae.fixCameraTransform.copy(Z), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27330
27344
  }
27331
27345
  }
27332
27346
  this.cameraMotion.setKeyframes([
@@ -27356,41 +27370,41 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27356
27370
  }
27357
27371
  ], z).catch(noop);
27358
27372
  }
27359
- var ve = this.locationMotion.setKeyframes(T, z, S);
27360
- ve.then(
27373
+ var de = this.locationMotion.setKeyframes(T, z, S);
27374
+ de.then(
27361
27375
  // resolve
27362
27376
  // 动画结束
27363
27377
  function() {
27364
- for (var xe = 0, Ae = s.modelScene.children; xe < Ae.length; xe++) {
27365
- var Te = Ae[xe];
27366
- Te instanceof Model && Te.show();
27378
+ for (var ge = 0, ye = s.modelScene.children; ge < ye.length; ge++) {
27379
+ var xe = ye[ge];
27380
+ xe instanceof Model && xe.show();
27367
27381
  }
27368
- 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: 0 });
27382
+ 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: 0 });
27369
27383
  s.emit("pano.arrived", createEvent("pano.arrived", {
27370
27384
  options: o,
27371
- prevPano: Q,
27385
+ prevPano: V,
27372
27386
  progress: 1,
27373
- state: ue,
27387
+ state: le,
27374
27388
  userAction: s.userAction,
27375
27389
  error: null
27376
- })), o.moveEndCallback && o.moveEndCallback(ue);
27377
- var fe = s.works.getObserver(s.currentPano);
27378
- if (fe && fe.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
27390
+ })), o.moveEndCallback && o.moveEndCallback(le);
27391
+ var he = s.works.getObserver(s.currentPano);
27392
+ if (he && he.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
27379
27393
  var ne = {
27380
27394
  map: s.videoTexture,
27381
- size: fe.video.size.clone(),
27382
- matrix: fe.video.matrix.clone(),
27383
- panoMatrix: fe.matrix.clone().premultiply(fe.work.transform),
27395
+ size: he.video.size.clone(),
27396
+ matrix: he.video.matrix.clone(),
27397
+ panoMatrix: he.matrix.clone().premultiply(he.work.transform),
27384
27398
  alpha: 1
27385
- }, oe = createUuid(), de = s.videoTexture.image;
27386
- de.setAttribute("uuid", oe), canplayVideo().then(function(me) {
27387
- me && fe.video && de.getAttribute("uuid") === oe && (de.oncanplay = function() {
27388
- de.oncanplay = noop, de.play();
27389
- }, de.ontimeupdate = function() {
27390
- de.currentTime > 0.5 && (de.ontimeupdate = noop, s.panoVideo.setMaterial(ne));
27391
- }, de.src = fe.video.source);
27399
+ }, se = createUuid(), pe = s.videoTexture.image;
27400
+ pe.setAttribute("uuid", se), canplayVideo().then(function(me) {
27401
+ me && he.video && pe.getAttribute("uuid") === se && (pe.oncanplay = function() {
27402
+ pe.oncanplay = noop, pe.play();
27403
+ }, pe.ontimeupdate = function() {
27404
+ pe.currentTime > 0.5 && (pe.ontimeupdate = noop, s.panoVideo.setMaterial(ne));
27405
+ }, pe.src = he.video.source);
27392
27406
  }).catch((function() {
27393
- de.removeAttribute("uuid");
27407
+ pe.removeAttribute("uuid");
27394
27408
  }));
27395
27409
  }
27396
27410
  },
@@ -27399,9 +27413,9 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27399
27413
  function() {
27400
27414
  s.emit("pano.cancel", createEvent("pano.cancel", {
27401
27415
  options: o,
27402
- prevPano: Q,
27416
+ prevPano: V,
27403
27417
  progress: 0,
27404
- state: V,
27418
+ state: J,
27405
27419
  userAction: s.userAction,
27406
27420
  error: null
27407
27421
  })), o.moveCancelCallback && o.moveCancelCallback();
@@ -27503,7 +27517,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27503
27517
  this.locationMotion.update(e);
27504
27518
  var B = this.locationMotion.getKeyFrameSegment(e);
27505
27519
  B[0];
27506
- var F = B[1], L = new THREE.Vector3().copy(w.position), O = new THREE.Vector3().copy(C.position), N = this.locationMotion.value.count - F.value.count + 1;
27520
+ var O = B[1], L = new THREE.Vector3().copy(w.position), F = new THREE.Vector3().copy(C.position), N = this.locationMotion.value.count - O.value.count + 1;
27507
27521
  if (y.progress = N, C.leftPanoPicture && (N < 1 ? w.leftPanoPicture && (y.pano0 = w.leftPanoPicture) : y.pano0 = C.leftPanoPicture, y.pano1 = C.leftPanoPicture), C.effect === "montage" ? y.transition = "BLACK" : C.effect === "spread" ? y.transition = "SPREAD" : y.transition = "FADE", (C.effect === "zoomin" || C.effect === "zoomout") && (y.progress = Math.pow(N, 3)), N < 1 && C.effect !== "fly") {
27508
27522
  if (y.pano0 && w.leftPanoPicture) {
27509
27523
  var D = {
@@ -27512,20 +27526,20 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27512
27526
  mapSize: y.pano0.mapSize,
27513
27527
  zoom: y.pano0.zoom,
27514
27528
  matrix: w.leftPanoPicture.matrix.clone().setPosition(C.position)
27515
- }, J = this.panoPictureObserverMap.get(y.pano0);
27516
- J && this.panoPictureObserverMap.set(D, J), y.pano0 = D;
27529
+ }, Q = this.panoPictureObserverMap.get(y.pano0);
27530
+ Q && this.panoPictureObserverMap.set(D, Q), y.pano0 = D;
27517
27531
  }
27518
- L.copy(O), M = !0;
27532
+ L.copy(F), M = !0;
27519
27533
  }
27520
- v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(L.x + (O.x - L.x) * N, L.y + (O.y - L.y) * N, L.z + (O.z - L.z) * N);
27521
- for (var z = [], G = [], V = 0, Q = this.locationMotion.keyframes; V < Q.length; V++) {
27522
- var U = Q[V], j = U.key, Y = U.progress;
27523
- j !== void 0 && (z.push(j), Y > this.locationMotion.progress && G.push(j));
27534
+ v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(L.x + (F.x - L.x) * N, L.y + (F.y - L.y) * N, L.z + (F.z - L.z) * N);
27535
+ for (var z = [], G = [], J = 0, V = this.locationMotion.keyframes; J < V.length; J++) {
27536
+ var U = V[J], j = U.key, X = U.progress;
27537
+ j !== void 0 && (z.push(j), X > this.locationMotion.progress && G.push(j));
27524
27538
  }
27525
- for (var Z = 0, X = Object.keys(this.panoResources); Z < X.length; Z++) {
27526
- var W = X[Z];
27527
- if (!(G.indexOf(W) >= 0)) {
27528
- var K = this.panoResources[W];
27539
+ for (var Y = 0, W = Object.keys(this.panoResources); Y < W.length; Y++) {
27540
+ var Z = W[Y];
27541
+ if (!(G.indexOf(Z) >= 0)) {
27542
+ var K = this.panoResources[Z];
27529
27543
  if (K.leftPanoPicture) {
27530
27544
  var ee = K.leftPanoPicture.map;
27531
27545
  if (ee) {
@@ -27534,7 +27548,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27534
27548
  ee.dispose(), K.leftPanoPicture = null;
27535
27549
  }
27536
27550
  }
27537
- z.indexOf(W) >= 0 || delete this.panoResources[W];
27551
+ z.indexOf(Z) >= 0 || delete this.panoResources[Z];
27538
27552
  }
27539
27553
  }
27540
27554
  var te = panoParse(C.panoId);
@@ -27548,18 +27562,18 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27548
27562
  }));
27549
27563
  }
27550
27564
  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);
27551
- var re = A, ae = re[1], pe = new THREE.Vector3(0, 0, 0), le = new THREE.Vector2().copy(this.camera.resolution);
27552
- if (ae && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
27553
- var ve = this.xrManager.cameraVR, xe = this.xrManager.referenceSpace, Ae = this.xrManager.session.renderState.baseLayer, Te = ae.getViewerPose(xe), ue = (l = Te == null ? void 0 : Te.views) !== null && l !== void 0 ? l : [];
27554
- this.renderer.setFramebuffer(Ae.framebuffer);
27555
- for (var fe = 0; fe < ue.length; fe++) {
27556
- var ne = ue[fe], oe = ve.cameras[fe], de = Ae.getViewport(ne);
27557
- de && (oe.projectionMatrix.fromArray(ne.projectionMatrix), oe.projectionMatrixInverse.getInverse(oe.projectionMatrix), oe.matrix.fromArray(ne.transform.matrix), oe.matrix.setPosition(this.camera.position), oe.matrix.decompose(oe.position, oe.quaternion, oe.scale), oe.matrixWorld.copy(oe.matrix), oe.matrixWorldInverse.getInverse(oe.matrixWorld), oe.matrixAutoUpdate = !1, pe.copy(oe.position), oe.viewport.set(de.x, de.y, de.width, de.height), le.set(de.width, de.height));
27565
+ var re = A, ie = re[1], ce = new THREE.Vector3(0, 0, 0), ae = new THREE.Vector2().copy(this.camera.resolution);
27566
+ if (ie && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
27567
+ var de = this.xrManager.cameraVR, ge = this.xrManager.referenceSpace, ye = this.xrManager.session.renderState.baseLayer, xe = ie.getViewerPose(ge), le = (l = xe == null ? void 0 : xe.views) !== null && l !== void 0 ? l : [];
27568
+ this.renderer.setFramebuffer(ye.framebuffer);
27569
+ for (var he = 0; he < le.length; he++) {
27570
+ var ne = le[he], se = de.cameras[he], pe = ye.getViewport(ne);
27571
+ pe && (se.projectionMatrix.fromArray(ne.projectionMatrix), se.projectionMatrixInverse.getInverse(se.projectionMatrix), se.matrix.fromArray(ne.transform.matrix), se.matrix.setPosition(this.camera.position), se.matrix.decompose(se.position, se.quaternion, se.scale), se.matrixWorld.copy(se.matrix), se.matrixWorldInverse.getInverse(se.matrixWorld), se.matrixAutoUpdate = !1, ce.copy(se.position), se.viewport.set(pe.x, pe.y, pe.width, pe.height), ae.set(pe.width, pe.height));
27558
27572
  }
27559
27573
  if (this.xrManager.setProjectionFromUnion(this.xrManager.cameraVR, this.xrManager.cameraL, this.xrManager.cameraR), this.camera.quaternion.copy(this.xrManager.cameraVR.quaternion), this.camera.scale.copy(this.xrManager.cameraVR.scale), this.camera.matrix.compose(this.camera.position, this.camera.quaternion, this.camera.scale), this.camera.computePose((c = v.distance) !== null && c !== void 0 ? c : this.camera.pose.distance), this.xrManager.session && this.xrManager.session.inputSources) {
27560
- for (var fe = 0; fe < this.xrManager.session.inputSources.length; fe++)
27561
- if (this.xrManager.session.inputSources[fe] && this.xrManager.session.inputSources[fe].targetRayMode === "transient-pointer") {
27562
- var me = ae.getPose(this.xrManager.session.inputSources[fe].targetRaySpace, xe);
27574
+ for (var he = 0; he < this.xrManager.session.inputSources.length; he++)
27575
+ if (this.xrManager.session.inputSources[he] && this.xrManager.session.inputSources[he].targetRayMode === "transient-pointer") {
27576
+ var me = ie.getPose(this.xrManager.session.inputSources[he].targetRaySpace, ge);
27563
27577
  if (me) {
27564
27578
  var Ne = me.transform.orientation, qe = new THREE.Quaternion(Ne.x, Ne.y, Ne.z, Ne.w), Ye = new THREE.Vector3(0, 0, -1).applyQuaternion(qe), Ve = new THREE.Raycaster(this.camera.position, Ye);
27565
27579
  this.gazeRay = Ve;
@@ -27567,84 +27581,84 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27567
27581
  }
27568
27582
  }
27569
27583
  if (this.xrManager.machineType === "Oculus" || this.xrManager.machineType === "Pico") {
27570
- for (var he = this.xrManager.session.inputSources, Ke = function(ce) {
27571
- var Se = be.xrManager.controllers[ce], Re = he[ce];
27584
+ for (var ve = this.xrManager.session.inputSources, Ke = function(fe) {
27585
+ var Se = Te.xrManager.controllers[fe], Re = ve[fe];
27572
27586
  if (!Re)
27573
27587
  return "continue";
27574
- Se && Se.update(Re, ae, xe);
27575
- var Oe = be.xrManager.getController(ce), Bt = new THREE.Vector3(0, 1.2, 0), st = Oe.position.clone().add(pe).sub(Bt);
27576
- Re.handedness === "left" ? be.xrControllerRay.left.set(st, new THREE.Vector3(0, 0, -1).applyEuler(Oe.rotation)) : Re.handedness === "right" && be.xrControllerRay.right.set(st, new THREE.Vector3(0, 0, -1).applyEuler(Oe.rotation)), be.controllerWrappers[ce].position.copy(new THREE.Vector3(0, 0, 0).add(pe).sub(Bt));
27577
- var Ze = be.modelScene.intersectRaycaster(be.xrControllerRay.right);
27588
+ Se && Se.update(Re, ie, ge);
27589
+ var Oe = Te.xrManager.getController(fe), Bt = new THREE.Vector3(0, 1.2, 0), st = Oe.position.clone().add(ce).sub(Bt);
27590
+ Re.handedness === "left" ? Te.xrControllerRay.left.set(st, new THREE.Vector3(0, 0, -1).applyEuler(Oe.rotation)) : Re.handedness === "right" && Te.xrControllerRay.right.set(st, new THREE.Vector3(0, 0, -1).applyEuler(Oe.rotation)), Te.controllerWrappers[fe].position.copy(new THREE.Vector3(0, 0, 0).add(ce).sub(Bt));
27591
+ var Ze = Te.modelScene.intersectRaycaster(Te.xrControllerRay.right);
27578
27592
  if (Ze.length === 0) {
27579
- var Ft = be.works.getResolvedObserver(be.currentPano);
27580
- Ze = be.xrControllerRay.right.intersectObject(be.boundingMesh, !0).map(function(Xe) {
27593
+ var Ft = Te.works.getResolvedObserver(Te.currentPano);
27594
+ Ze = Te.xrControllerRay.right.intersectObject(Te.boundingMesh, !0).map(function(Xe) {
27581
27595
  var Fe, lt = (Fe = Ft == null ? void 0 : Ft.floorIndex) !== null && Fe !== void 0 ? Fe : 0;
27582
27596
  return __assign({ floorIndex: lt, floor: lt }, Xe);
27583
27597
  });
27584
27598
  }
27585
27599
  if (Ze.length >= 1 && Ze[0].face)
27586
27600
  if (Re.handedness === "right") {
27587
- var P = be.xrControllerRay.right.intersectObject(be.xrCustomObjectsScene, !0), _ = Ze[0].face.normal, k = _.clone(), q = Ze[0].point.clone();
27588
- be.intersectMesh.position.copy(q);
27601
+ var P = Te.xrControllerRay.right.intersectObject(Te.xrCustomObjectsScene, !0), _ = Ze[0].face.normal, k = _.clone(), q = Ze[0].point.clone();
27602
+ Te.intersectMesh.position.copy(q);
27589
27603
  var $ = q.clone().add(k);
27590
- if (be.intersectMesh.lookAt($), Math.abs(_.y) > 0.99) {
27591
- var ie = be.camera.position.clone().sub(q);
27592
- be.intersectMesh.rotation.z = -Math.atan2(ie.z, ie.x);
27604
+ if (Te.intersectMesh.lookAt($), Math.abs(_.y) > 0.99) {
27605
+ var oe = Te.camera.position.clone().sub(q);
27606
+ Te.intersectMesh.rotation.z = -Math.atan2(oe.z, oe.x);
27593
27607
  }
27594
- be.intersectMesh.visible = !0, be.needsRender = !0, P.length > 0 ? (be.pointerLines.right.setPoints(st, P[0].point), be.pointerLines.right.points.visible = !0, be.intersectMesh.visible = !1) : (be.pointerLines.right.points.visible = !1, be.pointerLines.right.setPoints(st, Ze[0].point));
27595
- var Ee = Ze[0], De = createEvent("intersect.update", {
27596
- raycaster: (f = be.xrControllerRay.right) !== null && f !== void 0 ? f : null,
27597
- intersection: Ee != null ? Ee : null,
27598
- object: be.intersectMesh
27608
+ Te.intersectMesh.visible = !0, Te.needsRender = !0, P.length > 0 ? (Te.pointerLines.right.setPoints(st, P[0].point), Te.pointerLines.right.points.visible = !0, Te.intersectMesh.visible = !1) : (Te.pointerLines.right.points.visible = !1, Te.pointerLines.right.setPoints(st, Ze[0].point));
27609
+ var be = Ze[0], De = createEvent("intersect.update", {
27610
+ raycaster: (f = Te.xrControllerRay.right) !== null && f !== void 0 ? f : null,
27611
+ intersection: be != null ? be : null,
27612
+ object: Te.intersectMesh
27599
27613
  });
27600
- if (be.emit("intersect.update", De), De.defaultPrevented)
27601
- return be.hideIntersectMesh(), { value: void 0 };
27614
+ if (Te.emit("intersect.update", De), De.defaultPrevented)
27615
+ return Te.hideIntersectMesh(), { value: void 0 };
27602
27616
  } else
27603
- be.pointerLines.left.setPoints(st, Ze[0].point);
27604
- }, be = this, fe = 0; fe < he.length; fe++) {
27605
- var Le = Ke(fe);
27617
+ Te.pointerLines.left.setPoints(st, Ze[0].point);
27618
+ }, Te = this, he = 0; he < ve.length; he++) {
27619
+ var Le = Ke(he);
27606
27620
  if (typeof Le == "object")
27607
27621
  return Le.value;
27608
27622
  }
27609
- this.updateControllerHelper(he, e, r);
27623
+ this.updateControllerHelper(ve, e, r);
27610
27624
  }
27611
27625
  } else
27612
- ae || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
27626
+ ie || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
27613
27627
  isEmptyObject(y) === !1 && this.modelScene.parameter.set(y), this.emit("camera.update", createEvent("camera.update", {
27614
27628
  userAction: this.userAction,
27615
27629
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
27616
27630
  }));
27617
27631
  var Ie = this.works.getResolvedObserver(this.currentPano), $e = this.locationMotion.ended ? this.getForwardObserverOrNot(this.xrManager.cameraVR) : null, tt = this.works.getObserver(w.panoId), ke = this.works.getObserver(C.panoId);
27618
27632
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Ie) {
27619
- for (var Pe = [], _e = Ie.work.observers, ye = 0, Ce = Ie.accessibleNodes; ye < Ce.length; ye++) {
27620
- var Be = Ce[ye], J = _e[Be];
27621
- J && Pe.push(J);
27633
+ for (var Pe = [], _e = Ie.work.observers, Ee = 0, Ce = Ie.accessibleNodes; Ee < Ce.length; Ee++) {
27634
+ var Be = Ce[Ee], Q = _e[Be];
27635
+ Q && Pe.push(Q);
27622
27636
  }
27623
27637
  var je = /* @__PURE__ */ new Map();
27624
- if (Pe.sort(function(ce, Se) {
27625
- var Re = je.get(ce);
27626
- typeof Re == "undefined" && (Re = ce.standingPosition.distanceTo(Ie.standingPosition), je.set(ce, Re));
27627
- var Oe = je.get(ce);
27638
+ if (Pe.sort(function(fe, Se) {
27639
+ var Re = je.get(fe);
27640
+ typeof Re == "undefined" && (Re = fe.standingPosition.distanceTo(Ie.standingPosition), je.set(fe, Re));
27641
+ var Oe = je.get(fe);
27628
27642
  return typeof Oe == "undefined" && (Oe = Se.standingPosition.distanceTo(Ie.standingPosition), je.set(Se, Oe)), Re - Oe;
27629
27643
  }), Pe.length) {
27630
27644
  this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % Pe.length;
27631
- var Qe = Pe[this.accessibleObserverFloorCheckCount], We = this.modelScene.models.find(function(ce) {
27632
- return ce.work === (Qe == null ? void 0 : Qe.work);
27645
+ var Qe = Pe[this.accessibleObserverFloorCheckCount], We = this.modelScene.models.find(function(fe) {
27646
+ return fe.work === (Qe == null ? void 0 : Qe.work);
27633
27647
  });
27634
27648
  if (Qe && We && We.visible) {
27635
27649
  var gt = 0.3, Je = 0.05, At = 5e-3, we = Qe.standingPosition.clone().applyMatrix4(Qe.work.transform), Ue = panoStringify({
27636
27650
  panoIndex: Qe.panoIndex,
27637
27651
  workCode: Qe.work.workCode
27638
- }), yt = adjustPanoCircleMeshVectors.map(function(ce) {
27639
- scratchRaycaster.ray.origin.copy(we), scratchRaycaster.ray.origin.add(scratchVector3.copy(ce).setY(gt)), scratchRaycaster.ray.direction.set(0, -1, 0), scratchRaycaster.firstHitOnly = !0, scratchRaycaster.floorIndex = -1;
27652
+ }), yt = adjustPanoCircleMeshVectors.map(function(fe) {
27653
+ scratchRaycaster.ray.origin.copy(we), scratchRaycaster.ray.origin.add(scratchVector3.copy(fe).setY(gt)), scratchRaycaster.ray.direction.set(0, -1, 0), scratchRaycaster.firstHitOnly = !0, scratchRaycaster.floorIndex = -1;
27640
27654
  var Se = We.intersectRaycaster(scratchRaycaster)[0];
27641
27655
  return Se && Se.distance - At <= gt ? new THREE.Vector3().copy(we).setY(Se.point.y + At) : we;
27642
27656
  });
27643
- yt.sort(function(ce, Se) {
27644
- return Se.y - ce.y;
27657
+ yt.sort(function(fe, Se) {
27658
+ return Se.y - fe.y;
27645
27659
  });
27646
- var Mt = yt[Math.floor(yt.length / 2)], Et = yt.filter(function(ce) {
27647
- return ce.distanceTo(Mt) <= Je;
27660
+ var Mt = yt[Math.floor(yt.length / 2)], Et = yt.filter(function(fe) {
27661
+ return fe.distanceTo(Mt) <= Je;
27648
27662
  })[0];
27649
27663
  if (Et) {
27650
27664
  var ht = new THREE.Vector4(we.x, we.y, we.z, Et.y - we.y), pt = this.adjustPanoCircleMeshPositionFix.get(Ue);
@@ -27657,80 +27671,80 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27657
27671
  var ze = /* @__PURE__ */ new Map();
27658
27672
  if (tt)
27659
27673
  for (var ut = 0, rt = tt.accessibleNodes; ut < rt.length; ut++) {
27660
- var Be = rt[ut], J = tt.work.observers[Be];
27661
- if (J) {
27674
+ var Be = rt[ut], Q = tt.work.observers[Be];
27675
+ if (Q) {
27662
27676
  var Ue = panoStringify({
27663
- panoIndex: J.panoIndex,
27664
- workCode: J.work.workCode
27677
+ panoIndex: Q.panoIndex,
27678
+ workCode: Q.work.workCode
27665
27679
  });
27666
- ze.set(Ue, J);
27680
+ ze.set(Ue, Q);
27667
27681
  }
27668
27682
  }
27669
27683
  if (ke)
27670
- for (var se = 0, ge = ke.accessibleNodes; se < ge.length; se++) {
27671
- var Be = ge[se], J = ke.work.observers[Be];
27672
- if (J) {
27684
+ for (var ue = 0, Ae = ke.accessibleNodes; ue < Ae.length; ue++) {
27685
+ var Be = Ae[ue], Q = ke.work.observers[Be];
27686
+ if (Q) {
27673
27687
  var Ue = panoStringify({
27674
- panoIndex: J.panoIndex,
27675
- workCode: J.work.workCode
27688
+ panoIndex: Q.panoIndex,
27689
+ workCode: Q.work.workCode
27676
27690
  });
27677
- ze.set(Ue, J);
27691
+ ze.set(Ue, Q);
27678
27692
  }
27679
27693
  }
27680
- if (this.panoMeshes.forEach(function(ce, Se) {
27694
+ if (this.panoMeshes.forEach(function(fe, Se) {
27681
27695
  var Re = ze.get(Se);
27682
27696
  if (Re) {
27683
- ce.position.copy(Re.standingPosition).applyMatrix4(Re.work.transform);
27697
+ fe.position.copy(Re.standingPosition).applyMatrix4(Re.work.transform);
27684
27698
  var Oe = o.adjustPanoCircleMeshPositionFix.get(Se);
27685
- Oe && (scratchVector3.set(Oe.x, Oe.y, Oe.z), scratchVector3.equals(ce.position) && (ce.position.y += Oe.w)), ce.scale.setScalar(1.2), ze.delete(Se);
27699
+ Oe && (scratchVector3.set(Oe.x, Oe.y, Oe.z), scratchVector3.equals(fe.position) && (fe.position.y += Oe.w)), fe.scale.setScalar(1.2), ze.delete(Se);
27686
27700
  } else
27687
- o.helper.remove(ce), ce.dispose(), o.panoMeshes.delete(Se);
27688
- }), ze.forEach(function(ce, Se) {
27701
+ o.helper.remove(fe), fe.dispose(), o.panoMeshes.delete(Se);
27702
+ }), ze.forEach(function(fe, Se) {
27689
27703
  var Re = o.panoCircleMeshCreator(panoParse(Se));
27690
- Re.position.copy(ce.standingPosition).applyMatrix4(ce.work.transform);
27704
+ Re.position.copy(fe.standingPosition).applyMatrix4(fe.work.transform);
27691
27705
  var Oe = o.adjustPanoCircleMeshPositionFix.get(Se);
27692
27706
  Oe && (scratchVector3.set(Oe.x, Oe.y, Oe.z), scratchVector3.equals(Re.position) && (Re.position.y += Oe.w)), Re.scale.setScalar(1.2), o.panoMeshes.set(Se, Re), o.helper.add(Re), ze.delete(Se);
27693
27707
  }), this.camera.pose.distance > 0.1 || M)
27694
- this.panoMeshes.forEach(function(ce) {
27695
- ce.setOpacity(0), ce.setCurrent(!1), ce.updateTime && ce.updateTime(e, r), ce.visible = !1;
27708
+ this.panoMeshes.forEach(function(fe) {
27709
+ fe.setOpacity(0), fe.setCurrent(!1), fe.updateTime && fe.updateTime(e, r), fe.visible = !1;
27696
27710
  });
27697
27711
  else if (Ie) {
27698
- var Me = Ie.work.observers, He = arrayMin(Ie.accessibleNodes, function(ce) {
27699
- var Se = Me[ce];
27712
+ var Me = Ie.work.observers, He = arrayMin(Ie.accessibleNodes, function(fe) {
27713
+ var Se = Me[fe];
27700
27714
  return Se ? Ie.standingPosition.distanceTo(Se.standingPosition) : 1 / 0;
27701
27715
  }, !0), nt = He[1];
27702
27716
  nt = clamp$1(nt, 2.5, 1 / 0);
27703
- var ct = Ie.visibleNodes.concat(Ie.panoIndex).map(function(ce) {
27704
- return panoStringify({ panoIndex: ce, workCode: Ie.work.workCode });
27717
+ var ct = Ie.visibleNodes.concat(Ie.panoIndex).map(function(fe) {
27718
+ return panoStringify({ panoIndex: fe, workCode: Ie.work.workCode });
27705
27719
  }), bt = this.camera.getDirection(new THREE.Vector3());
27706
- this.panoMeshes.forEach(function(ce, Se) {
27720
+ this.panoMeshes.forEach(function(fe, Se) {
27707
27721
  var Re = o.works.getObserver(Se);
27708
27722
  if (ct.indexOf(Se) === -1)
27709
- ce.setCurrent(!1), ce.setOpacity(0);
27723
+ fe.setCurrent(!1), fe.setOpacity(0);
27710
27724
  else if (!Re)
27711
- ce.setCurrent(!1), ce.setOpacity(0);
27725
+ fe.setCurrent(!1), fe.setOpacity(0);
27712
27726
  else if (!Re.loadable && !Re.active)
27713
- ce.setCurrent(!1), ce.setOpacity(0);
27727
+ fe.setCurrent(!1), fe.setOpacity(0);
27714
27728
  else {
27715
- var Oe = ce.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
27716
- ce.setCurrent(!ce.loading && ce.progress === 0 && $e !== null && panoStringify({ panoIndex: $e.panoIndex, workCode: $e.work.workCode }) === Se), ce.setOpacity(Oe < 0.01 ? 0 : clamp$1(nt / Oe * 1.2, 0.65, 0.98));
27717
- var Bt = o.camera.position.clone().setY(ce.position.y), st = new THREE.Vector3().copy(ce.position).sub(Bt).normalize();
27729
+ var Oe = fe.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
27730
+ fe.setCurrent(!fe.loading && fe.progress === 0 && $e !== null && panoStringify({ panoIndex: $e.panoIndex, workCode: $e.work.workCode }) === Se), fe.setOpacity(Oe < 0.01 ? 0 : clamp$1(nt / Oe * 1.2, 0.65, 0.98));
27731
+ var Bt = o.camera.position.clone().setY(fe.position.y), st = new THREE.Vector3().copy(fe.position).sub(Bt).normalize();
27718
27732
  if (Se === panoStringify(o.currentPano)) {
27719
- var Ze = clamp$1((0.5 - Bt.distanceTo(ce.position)) / 0.5, 0, 1);
27733
+ var Ze = clamp$1((0.5 - Bt.distanceTo(fe.position)) / 0.5, 0, 1);
27720
27734
  st.multiplyScalar(1 - Ze).add(bt.clone().multiplyScalar(Ze));
27721
27735
  }
27722
- st.length() > 0 && ce.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(st.x, st.z), 0));
27736
+ st.length() > 0 && fe.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(st.x, st.z), 0));
27723
27737
  }
27724
- ce.updateTime && ce.updateTime(e, r);
27738
+ fe.updateTime && fe.updateTime(e, r);
27725
27739
  });
27726
27740
  }
27727
27741
  {
27728
- var N = (d = this.modelScene.parameter.progress) !== null && d !== void 0 ? d : 1, Ht = Math.round(N), it = this.modelScene.parameter.pano0, ft = this.modelScene.parameter.pano1, Tt = Ht === 0 ? it : ft, J = void 0;
27729
- if (Tt && (J = this.works.getObserver(Tt.panoId), J || (J = this.panoPictureObserverMap.get(Tt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !J || !Tt || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
27742
+ var N = (d = this.modelScene.parameter.progress) !== null && d !== void 0 ? d : 1, Ht = Math.round(N), it = this.modelScene.parameter.pano0, ft = this.modelScene.parameter.pano1, Tt = Ht === 0 ? it : ft, Q = void 0;
27743
+ if (Tt && (Q = this.works.getObserver(Tt.panoId), Q || (Q = this.panoPictureObserverMap.get(Tt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !Q || !Tt || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
27730
27744
  this.tiling.setObserver(null);
27731
27745
  var It = {
27732
27746
  renderer: this.renderer,
27733
- resolution: le,
27747
+ resolution: ae,
27734
27748
  pixelRatio: 1,
27735
27749
  time: this.camera.time,
27736
27750
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -27744,10 +27758,10 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27744
27758
  this.tiling.update(It), this.modelScene.parameter.set("refinedScreen", null);
27745
27759
  } else {
27746
27760
  var at = getImageSizeLevel(Tt.mapSize), Pt = at + 1, xt = 4;
27747
- this.tiling.setObserver(J);
27761
+ this.tiling.setObserver(Q);
27748
27762
  var It = {
27749
27763
  renderer: this.renderer,
27750
- resolution: le,
27764
+ resolution: ae,
27751
27765
  pixelRatio: 1,
27752
27766
  time: this.camera.time,
27753
27767
  cameraMatrix: this.xrManager.cameraVR.matrixWorld,
@@ -28947,27 +28961,27 @@ void main() {
28947
28961
  });
28948
28962
  var y = getViewportScale();
28949
28963
  g.renderer.setPixelRatio(y === 1 ? window.devicePixelRatio : 1), g.renderer.setSize(512, 512), g.renderer.setClearColor(g.backgroundColor, g.backgroundAlpha);
28950
- } catch (F) {
28951
- F instanceof Error && g.throwError(F);
28964
+ } catch (O) {
28965
+ O instanceof Error && g.throwError(O);
28952
28966
  }
28953
28967
  g.getPixelsRenderTarget = new THREE.WebGLRenderTarget(1, 1, {
28954
28968
  encoding: (p = (h = g.renderer) === null || h === void 0 ? void 0 : h.outputEncoding) !== null && p !== void 0 ? p : THREE.sRGBEncoding,
28955
28969
  generateMipmaps: !1
28956
- }), g.viewport = Object.assign({ left: 0, bottom: 0, width: 1, height: 1 }, e.viewport), g.camera = new Camera(DEFAULT_CAMERA_FOV), g.scene = new Scene(), g.xrCustomObjectsScene = new THREE.Scene(), g.scene.add(g.xrCustomObjectsScene), g.scene.matrixAutoUpdate = !1, g.loadWorkTask = Promise.resolve(), g.requestProxy = (m = e.requestProxy) !== null && m !== void 0 ? m : DEFAULT_REQUEST_PROXY, g.networkSubscribe = new NetworkSubscribe(), g.networkSubscribe.on("network", function(F, L, O, N) {
28970
+ }), g.viewport = Object.assign({ left: 0, bottom: 0, width: 1, height: 1 }, e.viewport), g.camera = new Camera(DEFAULT_CAMERA_FOV), g.scene = new Scene(), g.xrCustomObjectsScene = new THREE.Scene(), g.scene.add(g.xrCustomObjectsScene), g.scene.matrixAutoUpdate = !1, g.loadWorkTask = Promise.resolve(), g.requestProxy = (m = e.requestProxy) !== null && m !== void 0 ? m : DEFAULT_REQUEST_PROXY, g.networkSubscribe = new NetworkSubscribe(), g.networkSubscribe.on("network", function(O, L, F, N) {
28957
28971
  var D;
28958
28972
  g.emit("network.resource", createEvent("network.resource", {
28959
- source: F,
28973
+ source: O,
28960
28974
  requestType: L,
28961
- requestState: O,
28975
+ requestState: F,
28962
28976
  detail: N
28963
- })), (D = g.analysis) === null || D === void 0 || D.network(g.works, F, L, O, N);
28977
+ })), (D = g.analysis) === null || D === void 0 || D.network(g.works, O, L, F, N);
28964
28978
  }), g.boundingMesh = new BoundingMesh$1(), g.boundingMesh.name = "bounding", g.readyCallbacks = [], g.syncingState = !1, g.helperGroup = new THREE.Group(), g.helperGroup.name = "helper", g.helperGroup.matrixAutoUpdate = !1, g.scene.add(g.helperGroup);
28965
28979
  var v = new Model(emptyWorks[0]);
28966
28980
  worksMap.set(g, emptyWorks), g.modelScene = new ModelScene(), g.modelScene.add(v), g.modelScene.add(g.boundingMesh), defineProperty(v, "loaded", {
28967
28981
  get: function() {
28968
28982
  return !1;
28969
28983
  },
28970
- set: function(F) {
28984
+ set: function(O) {
28971
28985
  }
28972
28986
  }), g.videoTexture = new THREE.VideoTexture(e.videoInstance || generateDefaultVideoElement());
28973
28987
  var E = initLights();
@@ -28977,22 +28991,22 @@ void main() {
28977
28991
  get: function() {
28978
28992
  return E.children;
28979
28993
  },
28980
- set: function(F) {
28981
- E.children = F;
28994
+ set: function(O) {
28995
+ E.children = O;
28982
28996
  }
28983
28997
  }), defineProperty(b, "visible", {
28984
28998
  get: function() {
28985
28999
  return E.visible;
28986
29000
  },
28987
- set: function(F) {
28988
- E.visible = F;
29001
+ set: function(O) {
29002
+ E.visible = O;
28989
29003
  }
28990
29004
  }), defineProperty(b, "name", {
28991
29005
  get: function() {
28992
29006
  return E.name;
28993
29007
  },
28994
- set: function(F) {
28995
- E.name = F;
29008
+ set: function(O) {
29009
+ E.name = O;
28996
29010
  }
28997
29011
  }), g.modelScene.add(b), g.state = {
28998
29012
  mode: g.currentMode,
@@ -29003,10 +29017,10 @@ void main() {
29003
29017
  fov: g.camera.pose.fov,
29004
29018
  offset: g.camera.pose.offset.clone(),
29005
29019
  distance: g.camera.pose.distance
29006
- }, g.stateSynced = !1, g.destroyed = !1, g.paused = !0, typeof window != "undefined" && (e.play !== !1 && g.play(), g.stopAnimationLoop = AnimationFrameLoop.shared.add(function(F, L) {
29007
- for (var O = [], N = 2; N < arguments.length; N++)
29008
- O[N - 2] = arguments[N];
29009
- g.updateTime.apply(g, __spreadArray([F, L], O, !1));
29020
+ }, g.stateSynced = !1, g.destroyed = !1, g.paused = !0, typeof window != "undefined" && (e.play !== !1 && g.play(), g.stopAnimationLoop = AnimationFrameLoop.shared.add(function(O, L) {
29021
+ for (var F = [], N = 2; N < arguments.length; N++)
29022
+ F[N - 2] = arguments[N];
29023
+ g.updateTime.apply(g, __spreadArray([O, L], F, !1));
29010
29024
  }, !1, 0, 10));
29011
29025
  var T = function() {
29012
29026
  typeof document != "undefined" && document.fullscreenElement === null && g.currentMode === "VRPanorama" && g.controller.emit("vr.requestExit", createEvent("vr.requestExit", {}));
@@ -29032,7 +29046,7 @@ void main() {
29032
29046
  }
29033
29047
  return Object.defineProperty(t, "version", {
29034
29048
  get: function() {
29035
- return "6.6.0-alpha.20";
29049
+ return "6.6.0-alpha.21";
29036
29050
  },
29037
29051
  enumerable: !1,
29038
29052
  configurable: !0
@@ -29261,7 +29275,7 @@ void main() {
29261
29275
  }
29262
29276
  else
29263
29277
  e instanceof Work ? E.push(e) : E.push(parseWork(e));
29264
- for (var R = createWorks(E), w = function(W) {
29278
+ for (var R = createWorks(E), w = function(Z) {
29265
29279
  var K = C, ee = new Fetcher({
29266
29280
  get networkSubscribe() {
29267
29281
  return K.networkSubscribe;
@@ -29270,7 +29284,7 @@ void main() {
29270
29284
  return Promise.resolve(te).then(function(re) {
29271
29285
  return K.requestProxy(re);
29272
29286
  }).then(function(re) {
29273
- return verifyURL(re, W.allowHosts);
29287
+ return verifyURL(re, Z.allowHosts);
29274
29288
  }).then(function(re) {
29275
29289
  if (re instanceof Error)
29276
29290
  throw re;
@@ -29278,21 +29292,21 @@ void main() {
29278
29292
  });
29279
29293
  }
29280
29294
  });
29281
- registerFetcher(W, ee);
29295
+ registerFetcher(Z, ee);
29282
29296
  }, C = this, I = 0, H = R; I < H.length; I++) {
29283
29297
  var M = H[I];
29284
29298
  w(M);
29285
29299
  }
29286
29300
  r === void 0 && (r = "inherit"), r === "inherit" && this.works === emptyWorks && (r = "initial");
29287
- var B = R.initial, F = B.work.observers[0], L = F ? {
29288
- workCode: F.work.workCode,
29289
- panoIndex: F.panoIndex
29301
+ var B = R.initial, O = B.work.observers[0], L = O ? {
29302
+ workCode: O.work.workCode,
29303
+ panoIndex: O.panoIndex
29290
29304
  } : {
29291
29305
  workCode: B.work.workCode,
29292
29306
  panoIndex: 0
29293
- }, O = (l = B.mode) !== null && l !== void 0 ? l : F ? "Panorama" : "Mapview", N = {};
29307
+ }, F = (l = B.mode) !== null && l !== void 0 ? l : O ? "Panorama" : "Mapview", N = {};
29294
29308
  if (r === "inherit") {
29295
- O = this.currentMode;
29309
+ F = this.currentMode;
29296
29310
  var D = (f = (c = R[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
29297
29311
  D ? L = {
29298
29312
  workCode: D.work.workCode,
@@ -29300,7 +29314,7 @@ void main() {
29300
29314
  } : typeof R.initial.panoIndex == "number" ? L = {
29301
29315
  workCode: R.initial.work.workCode,
29302
29316
  panoIndex: R.initial.panoIndex
29303
- } : (O === "Panorama" || O === "VRPanorama" || O === "XRPanorama") && (O = "Mapview"), N = {
29317
+ } : (F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && (F = "Mapview"), N = {
29304
29318
  longitude: this.camera.pose.longitude,
29305
29319
  latitude: this.camera.pose.latitude,
29306
29320
  fov: this.camera.pose.fov,
@@ -29311,7 +29325,7 @@ void main() {
29311
29325
  typeof B.panoIndex == "number" && (L = {
29312
29326
  workCode: B.work.workCode,
29313
29327
  panoIndex: B.panoIndex
29314
- }), B.mode && (O = B.mode), N = {
29328
+ }), B.mode && (F = B.mode), N = {
29315
29329
  longitude: B.longitude,
29316
29330
  latitude: B.latitude,
29317
29331
  fov: B.fov,
@@ -29319,7 +29333,7 @@ void main() {
29319
29333
  offset: (d = B.offset) === null || d === void 0 ? void 0 : d.clone()
29320
29334
  };
29321
29335
  else {
29322
- if (O = (h = r.mode) !== null && h !== void 0 ? h : this.currentMode, typeof r.panoIndex == "number") {
29336
+ if (F = (h = r.mode) !== null && h !== void 0 ? h : this.currentMode, typeof r.panoIndex == "number") {
29323
29337
  var D = R.getObserver({
29324
29338
  workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p : B.work.workCode) !== null && m !== void 0 ? m : "",
29325
29339
  panoIndex: r.panoIndex
@@ -29337,78 +29351,78 @@ void main() {
29337
29351
  offset: r.offset
29338
29352
  };
29339
29353
  }
29340
- var J = __assign(__assign(__assign({}, L), { mode: O }), N), z = this.getCurrentState(), G = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29341
- (O === "Floorplan" || O === "Topview" || O === "Mapview") && this.currentMode === O && (G = 0);
29342
- var V = "fly";
29343
- (O === "Panorama" || O === "VRPanorama" || O === "XRPanorama") && this.currentMode === O && (V = (g = v.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
29354
+ var Q = __assign(__assign(__assign({}, L), { mode: F }), N), z = this.getCurrentState(), G = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29355
+ (F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (G = 0);
29356
+ var J = "fly";
29357
+ (F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && this.currentMode === F && (J = (g = v.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
29344
29358
  input: e,
29345
29359
  works: R,
29346
- state: J,
29360
+ state: Q,
29347
29361
  userAction: s
29348
29362
  }));
29349
- var Q = function() {
29363
+ var V = function() {
29350
29364
  u.pano = L;
29351
- var W = __assign(__assign({ initial: {
29352
- state: J,
29365
+ var Z = __assign(__assign({ initial: {
29366
+ state: Q,
29353
29367
  currentState: z,
29354
29368
  duration: G,
29355
- effect: V,
29369
+ effect: J,
29356
29370
  userAction: s
29357
- } }, u.commonParams()), u.controllerInits[O]), K = Controllers[O].initAnimationEndState(W);
29358
- if (u.controller && u.currentMode === O)
29359
- u.controller.updateWork(R, K, { effect: V, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(O, W));
29371
+ } }, u.commonParams()), u.controllerInits[F]), K = Controllers[F].initAnimationEndState(Z);
29372
+ if (u.controller && u.currentMode === F)
29373
+ u.controller.updateWork(R, K, { effect: J, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Z));
29360
29374
  else {
29361
29375
  var ee = u.currentMode;
29362
29376
  if (u.controller)
29363
29377
  u.controller.destroy();
29364
29378
  else {
29365
- var te = Controllers[O].initAnimationEndState(W);
29379
+ var te = Controllers[F].initAnimationEndState(Z);
29366
29380
  u.camera.setFromPose(te), u.emit("camera.update", createEvent("camera.update", {
29367
29381
  state: u.getCurrentState(),
29368
29382
  userAction: s
29369
29383
  }));
29370
29384
  }
29371
- u.controller = u.applyController(O, W);
29385
+ u.controller = u.applyController(F, Z);
29372
29386
  var re = createEvent("mode.change", {
29373
29387
  prevMode: ee,
29374
- mode: O,
29388
+ mode: F,
29375
29389
  state: K,
29376
29390
  userAction: s
29377
29391
  });
29378
29392
  try {
29379
29393
  u.emit("mode.change", re);
29380
- } catch (ae) {
29381
- console.error(ae);
29394
+ } catch (ie) {
29395
+ console.error(ie);
29382
29396
  }
29383
29397
  }
29384
29398
  u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
29385
29399
  };
29386
29400
  worksMap.set(this, R);
29387
29401
  var U = Promise.resolve();
29388
- if (O === t.Mode.Floorplan || O === t.Mode.Topview || O === t.Mode.Mapview || O === t.Mode.Model) {
29389
- this.modelScene.loaded === !1 && (this.camera.setFromPose(J), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = O);
29402
+ if (F === t.Mode.Floorplan || F === t.Mode.Topview || F === t.Mode.Mapview || F === t.Mode.Model) {
29403
+ this.modelScene.loaded === !1 && (this.camera.setFromPose(Q), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = F);
29390
29404
  var j = this.loadModels(R, v);
29391
- U = Promise.all(j.map(function(W) {
29392
- return W.loadedReady;
29405
+ U = Promise.all(j.map(function(Z) {
29406
+ return Z.loadedReady;
29393
29407
  })).then(function() {
29394
- u.needsRender = !0, u.modelSceneNeedsRender = !0, Q(), u.emit("camera.update", createEvent("camera.update", {
29408
+ u.needsRender = !0, u.modelSceneNeedsRender = !0, V(), u.emit("camera.update", createEvent("camera.update", {
29395
29409
  state: u.getCurrentState(),
29396
29410
  userAction: s
29397
29411
  }));
29398
29412
  });
29399
29413
  } else {
29400
- Q();
29401
- var Y = this.controller, Z = !1;
29414
+ V();
29415
+ var X = this.controller, Y = !1;
29402
29416
  this.modelScene.autoRefine = !1;
29403
- var X = function() {
29404
- u.works === R && Z === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29417
+ var W = function() {
29418
+ u.works === R && Y === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
29405
29419
  state: u.getCurrentState(),
29406
29420
  userAction: s
29407
- })), Z = !0, u.modelScene.autoRefine = !0), Y.off("pano.arrived", X), Y.off("pano.cancel", X);
29421
+ })), Y = !0, u.modelScene.autoRefine = !0), X.off("pano.arrived", W), X.off("pano.cancel", W);
29408
29422
  }, j = this.loadModels(R, v);
29409
29423
  U = Promise.all(j.map(function(K) {
29410
29424
  return K.initReady;
29411
- })).then(noop), Y.once("pano.arrived", X), Y.once("pano.cancel", X), setTimeout(X, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29425
+ })).then(noop), X.once("pano.arrived", W), X.once("pano.cancel", W), setTimeout(W, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29412
29426
  }
29413
29427
  return this.emit("works.load", createEvent("works.load", {
29414
29428
  input: e,
@@ -29418,13 +29432,13 @@ void main() {
29418
29432
  })), U.then(function() {
29419
29433
  return u.ready();
29420
29434
  }).then(function() {
29421
- var W;
29435
+ var Z;
29422
29436
  u.emit("works.ready", createEvent("works.ready", {
29423
29437
  input: e,
29424
29438
  state: u.getCurrentState(),
29425
29439
  userAction: s,
29426
29440
  works: R
29427
- })), (W = u.analysis) === null || W === void 0 || W.work(R);
29441
+ })), (Z = u.analysis) === null || Z === void 0 || Z.work(R);
29428
29442
  });
29429
29443
  }, t.prototype.reset = function() {
29430
29444
  var e = this, r = this.loadWorkTask.then(function() {
@@ -29553,9 +29567,9 @@ void main() {
29553
29567
  } else
29554
29568
  T = new Uint8Array(M);
29555
29569
  if (this.renderer.readRenderTargetPixels(w, 0, 0, A * y, g * y, T), v)
29556
- for (var B = H / 2, F = 0, L = 0, O = 0, N = 0; L < B; L++)
29557
- for (N = (I - Math.floor(L / C) - 1) * C + L % C, O = 0; O < 4; O++)
29558
- F = T[L * 4 + O], T[L * 4 + O] = T[N * 4 + O], T[N * 4 + O] = F;
29570
+ for (var B = H / 2, O = 0, L = 0, F = 0, N = 0; L < B; L++)
29571
+ for (N = (I - Math.floor(L / C) - 1) * C + L % C, F = 0; F < 4; F++)
29572
+ O = T[L * 4 + F], T[L * 4 + F] = T[N * 4 + F], T[N * 4 + F] = O;
29559
29573
  return T;
29560
29574
  }, t.prototype.getElement = function() {
29561
29575
  var e;
@@ -29811,12 +29825,12 @@ void main() {
29811
29825
  userAction: !1,
29812
29826
  state: this.state
29813
29827
  })), this.readyCallbacks.length && this.stateSynced) {
29814
- var B = this.currentMode, F = B === t.Mode.Floorplan || B === t.Mode.Topview || B === t.Mode.Mapview || B === t.Mode.Model;
29815
- if (!F || this.modelScene.loaded) {
29828
+ var B = this.currentMode, O = B === t.Mode.Floorplan || B === t.Mode.Topview || B === t.Mode.Mapview || B === t.Mode.Model;
29829
+ if (!O || this.modelScene.loaded) {
29816
29830
  var L = this.readyCallbacks.slice();
29817
29831
  this.readyCallbacks.length = 0;
29818
- for (var O = 0, N = L; O < N.length; O++) {
29819
- var D = N[O];
29832
+ for (var F = 0, N = L; F < N.length; F++) {
29833
+ var D = N[F];
29820
29834
  this.controller instanceof Controllers.Panorama && D.tile === !0 && !this.controller.isTileReady() ? this.readyCallbacks.push(D) : D();
29821
29835
  }
29822
29836
  }
@@ -29857,13 +29871,13 @@ void main() {
29857
29871
  I.initReady.then(function() {
29858
29872
  if (C)
29859
29873
  if (typeof C == "function")
29860
- for (var L = 0, O = I.viewLayers; L < O.length; L++) {
29861
- var N = O[L], D = C(N, I, T);
29874
+ for (var L = 0, F = I.viewLayers; L < F.length; L++) {
29875
+ var N = F[L], D = C(N, I, T);
29862
29876
  D && (D.viewerRequestVolume && (N.viewerRequestVolume = makeBoundingVolume(D.viewerRequestVolume)), N.parameter.set(omit(D, ["showLayers"])), D.showLayers === !1 ? N.visible = !1 : Array.isArray(D.showLayers) && (N.visible = D.showLayers.includes(N.name)));
29863
29877
  }
29864
29878
  else
29865
- for (var J = 0, z = I.viewLayers; J < z.length; J++) {
29866
- var N = z[J];
29879
+ for (var Q = 0, z = I.viewLayers; Q < z.length; Q++) {
29880
+ var N = z[Q];
29867
29881
  C.viewerRequestVolume && (N.viewerRequestVolume = makeBoundingVolume(C.viewerRequestVolume)), N.parameter.set(omit(C, ["showLayers"])), C.showLayers === !1 ? N.visible = !1 : Array.isArray(C.showLayers) && (N.visible = C.showLayers.includes(N.name));
29868
29882
  }
29869
29883
  }), m.push(I), p && (I.visible = !1), E.modelScene.add(I);
@@ -29872,14 +29886,14 @@ void main() {
29872
29886
  o.emit("model.load", createEvent("model.load", { work: S, model: I, error: null }));
29873
29887
  }, !0);
29874
29888
  }, M = function(L) {
29875
- var O = L.error;
29876
- o.emit("model.error", createEvent("model.error", { work: S, model: I, error: O })), o.throwError(O);
29889
+ var F = L.error;
29890
+ o.emit("model.error", createEvent("model.error", { work: S, model: I, error: F })), o.throwError(F);
29877
29891
  }, B = function() {
29878
29892
  o.emit("model.changeShownFloor", createEvent("model.changeShownFloor", { work: S, model: I, error: null }));
29879
- }, F = function() {
29880
- I.removeEventListener("load", H), I.removeEventListener("error", M), I.removeEventListener("changeShownFloor", B), I.removeEventListener("dispose", F);
29893
+ }, O = function() {
29894
+ I.removeEventListener("load", H), I.removeEventListener("error", M), I.removeEventListener("changeShownFloor", B), I.removeEventListener("dispose", O);
29881
29895
  };
29882
- I.addEventListener("load", H), I.addEventListener("error", M), I.addEventListener("changeShownFloor", B), I.addEventListener("dispose", F), E.emit("model.request", createEvent("model.request", { work: S, model: I, error: null }));
29896
+ I.addEventListener("load", H), I.addEventListener("error", M), I.addEventListener("changeShownFloor", B), I.addEventListener("dispose", O), E.emit("model.request", createEvent("model.request", { work: S, model: I, error: null }));
29883
29897
  }
29884
29898
  }, E = this, b = 0; b < e.length; b++)
29885
29899
  v(b);