@realsee/five 6.7.0-alpha.22 → 6.7.0-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.AdaptiveLuminancePass.html +22 -0
  5. package/docs/classes/five.AnimationFrameLoop.html +1 -1
  6. package/docs/classes/five.BoundingMesh.html +1 -1
  7. package/docs/classes/five.EffectComposer.html +21 -0
  8. package/docs/classes/five.EyeDomeLightingPass.html +21 -0
  9. package/docs/classes/five.Five.html +78 -79
  10. package/docs/classes/five.FivePass.html +16 -18
  11. package/docs/classes/five.FiveRenderer.html +11 -0
  12. package/docs/classes/five.FullScreenQuad.html +3 -4
  13. package/docs/classes/five.Model.html +1 -1
  14. package/docs/classes/five.ModelScene.html +1 -1
  15. package/docs/classes/five.PBMContainer.html +1 -1
  16. package/docs/classes/five.PBMGroup.html +1 -1
  17. package/docs/classes/five.PBMMesh.html +1 -1
  18. package/docs/classes/five.PBMMeshMaterial.html +6 -7
  19. package/docs/classes/five.PBMPointCloud.html +1 -1
  20. package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
  21. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  22. package/docs/classes/five.Parameter.html +44 -46
  23. package/docs/classes/five.Tile3D.html +1 -1
  24. package/docs/classes/five.TileNode.html +1 -1
  25. package/docs/classes/five.Tileset.html +1 -1
  26. package/docs/classes/five.TrajectoryNode.html +1 -1
  27. package/docs/classes/five.WorkResolvedObserver.html +1 -1
  28. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  29. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  30. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  31. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  32. package/docs/classes/line.LineGeometry.html +1 -1
  33. package/docs/classes/line.LineMaterial.html +1 -1
  34. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  35. package/docs/classes/line.THREE_Line2.html +1 -1
  36. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  37. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  38. package/docs/classes/vfx.Airflow.html +1 -1
  39. package/docs/classes/vfx.Flame.html +1 -1
  40. package/docs/classes/vfx.Particle.html +1 -1
  41. package/docs/classes/vfx.ParticleGPU.html +1 -1
  42. package/docs/classes/vfx.SpotLight.html +1 -1
  43. package/docs/functions/react.withFive.html +1 -1
  44. package/docs/hierarchy.html +1 -1
  45. package/docs/interfaces/five.EventCallback.html +1 -1
  46. package/docs/interfaces/five.FiveInitArgs.html +3 -3
  47. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +1 -1
  48. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  49. package/docs/interfaces/five.PBMMaterial.html +1 -1
  50. package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -3
  51. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
  52. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  53. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  54. package/docs/interfaces/five.ParameterMaterialValue.html +29 -31
  55. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  56. package/docs/interfaces/five.ParameterValue.html +43 -45
  57. package/docs/interfaces/five.Pass.html +9 -0
  58. package/docs/interfaces/five.ResolvedParameterValue.html +43 -45
  59. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
  60. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  61. package/docs/interfaces/five.ViewLayer.html +1 -1
  62. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  63. package/docs/interfaces/five.WorkImage.html +1 -1
  64. package/docs/interfaces/five.WorkObserver.html +1 -1
  65. package/docs/interfaces/five.WorkTile.html +1 -1
  66. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  67. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  68. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  69. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +28 -27
  70. package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +18 -18
  71. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +9 -9
  72. package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +3 -3
  73. package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +5 -3
  74. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +4 -4
  75. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  76. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  77. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  78. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  79. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  80. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  81. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  82. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  83. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  84. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  85. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  86. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  87. package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
  88. package/docs/modules/five.html +1 -1
  89. package/docs/types/five.ParseOptions.html +1 -1
  90. package/docs/types/five.PostProcessingType.html +1 -1
  91. package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +2 -2
  92. package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +2 -2
  93. package/five/index.d.ts +116 -59
  94. package/five/index.js +238 -184
  95. package/five/index.mjs +4035 -4413
  96. package/gltf-loader/index.js +3 -3
  97. package/gltf-loader/index.mjs +3 -3
  98. package/line/index.js +3 -3
  99. package/line/index.mjs +3 -3
  100. package/package.json +1 -1
  101. package/plugins/index.d.ts +11 -4
  102. package/plugins/index.js +19 -17
  103. package/plugins/index.mjs +962 -922
  104. package/react/index.d.ts +1 -1
  105. package/react/index.js +2 -2
  106. package/react/index.mjs +2 -2
  107. package/shader-lib/index.js +3 -3
  108. package/shader-lib/index.mjs +3 -3
  109. package/sticker/index.js +3 -3
  110. package/sticker/index.mjs +3 -3
  111. package/umd/five-gltf-loader.js +3 -3
  112. package/umd/five-line.js +3 -3
  113. package/umd/five-plugins.js +19 -17
  114. package/umd/five-react.js +2 -2
  115. package/umd/five-shader-lib.js +3 -3
  116. package/umd/five-sticker.js +3 -3
  117. package/umd/five-vfx.js +2 -2
  118. package/umd/five-vue.js +2 -2
  119. package/umd/five.js +238 -184
  120. package/vfx/index.js +2 -2
  121. package/vfx/index.mjs +2 -2
  122. package/vue/index.js +2 -2
  123. package/vue/index.mjs +2 -2
  124. package/work-downloader/index.js +2 -2
  125. package/work-downloader/index.mjs +2 -2
  126. package/docs/classes/five.Pass.html +0 -11
package/plugins/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/1/2025
5
- * Version: 6.7.0-alpha.22
4
+ * Generated: 12/8/2025
5
+ * Version: 6.7.0-alpha.24
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,23 +252,23 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import { Subscribe as Pn, AnimationFrameLoop as ct, Camera as An, PanoCircleMesh as xn } from "@realsee/five";
255
+ */import { Subscribe as Mn, AnimationFrameLoop as Xe, Camera as An, PanoCircleMesh as xn } from "@realsee/five";
256
256
  import * as p from "three";
257
257
  import { EventDispatcher as Jt, Vector3 as ye, MOUSE as Se, TOUCH as _e, Spherical as Wt, Quaternion as Xt, Vector2 as Te, Object3D as $t, Matrix4 as Sn } from "three";
258
258
  import { BasePlugin as Ot } from "@realsee/five/plugins";
259
259
  function _n(h) {
260
260
  return /^https?:\/\/|^\/\//.test(h) || /^data:/.test(h);
261
261
  }
262
- function On(h, o) {
263
- return _n(o) ? o : "".concat(h).concat(o);
262
+ function On(h, s) {
263
+ return _n(s) ? s : "".concat(h).concat(s);
264
264
  }
265
- var Xe;
265
+ var qe;
266
266
  (function(h) {
267
- var o = (
267
+ var s = (
268
268
  /** @class */
269
269
  (function() {
270
270
  function e(n, t) {
271
- this.hooks = new Pn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = n, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
271
+ this.hooks = new Mn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = n, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
272
272
  }
273
273
  return e.prototype.getCurrentState = function() {
274
274
  return this.state;
@@ -277,131 +277,131 @@ var Xe;
277
277
  }, e;
278
278
  })()
279
279
  );
280
- h.Controller = o;
281
- })(Xe || (Xe = {}));
282
- var St = function(h, o) {
280
+ h.Controller = s;
281
+ })(qe || (qe = {}));
282
+ var St = function(h, s) {
283
283
  return St = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
284
284
  e.__proto__ = n;
285
285
  } || function(e, n) {
286
286
  for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
287
- }, St(h, o);
287
+ }, St(h, s);
288
288
  };
289
- function he(h, o) {
290
- if (typeof o != "function" && o !== null)
291
- throw new TypeError("Class extends value " + String(o) + " is not a constructor or null");
292
- St(h, o);
289
+ function he(h, s) {
290
+ if (typeof s != "function" && s !== null)
291
+ throw new TypeError("Class extends value " + String(s) + " is not a constructor or null");
292
+ St(h, s);
293
293
  function e() {
294
294
  this.constructor = h;
295
295
  }
296
- h.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
296
+ h.prototype = s === null ? Object.create(s) : (e.prototype = s.prototype, new e());
297
297
  }
298
298
  var V = function() {
299
- return V = Object.assign || function(o) {
299
+ return V = Object.assign || function(s) {
300
300
  for (var e, n = 1, t = arguments.length; n < t; n++) {
301
301
  e = arguments[n];
302
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (o[r] = e[r]);
302
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (s[r] = e[r]);
303
303
  }
304
- return o;
304
+ return s;
305
305
  }, V.apply(this, arguments);
306
306
  };
307
- function De(h, o, e, n) {
307
+ function De(h, s, e, n) {
308
308
  function t(r) {
309
- return r instanceof e ? r : new e(function(s) {
310
- s(r);
309
+ return r instanceof e ? r : new e(function(l) {
310
+ l(r);
311
311
  });
312
312
  }
313
- return new (e || (e = Promise))(function(r, s) {
314
- function l(m) {
313
+ return new (e || (e = Promise))(function(r, l) {
314
+ function o(m) {
315
315
  try {
316
- f(n.next(m));
316
+ c(n.next(m));
317
317
  } catch (y) {
318
- s(y);
318
+ l(y);
319
319
  }
320
320
  }
321
321
  function d(m) {
322
322
  try {
323
- f(n.throw(m));
323
+ c(n.throw(m));
324
324
  } catch (y) {
325
- s(y);
325
+ l(y);
326
326
  }
327
327
  }
328
- function f(m) {
329
- m.done ? r(m.value) : t(m.value).then(l, d);
328
+ function c(m) {
329
+ m.done ? r(m.value) : t(m.value).then(o, d);
330
330
  }
331
- f((n = n.apply(h, o || [])).next());
331
+ c((n = n.apply(h, s || [])).next());
332
332
  });
333
333
  }
334
- function Ne(h, o) {
334
+ function Ne(h, s) {
335
335
  var e = { label: 0, sent: function() {
336
336
  if (r[0] & 1) throw r[1];
337
337
  return r[1];
338
- }, trys: [], ops: [] }, n, t, r, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
- return s.next = l(0), s.throw = l(1), s.return = l(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
338
+ }, trys: [], ops: [] }, n, t, r, l = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
+ return l.next = o(0), l.throw = o(1), l.return = o(2), typeof Symbol == "function" && (l[Symbol.iterator] = function() {
340
340
  return this;
341
- }), s;
342
- function l(f) {
341
+ }), l;
342
+ function o(c) {
343
343
  return function(m) {
344
- return d([f, m]);
344
+ return d([c, m]);
345
345
  };
346
346
  }
347
- function d(f) {
347
+ function d(c) {
348
348
  if (n) throw new TypeError("Generator is already executing.");
349
- for (; s && (s = 0, f[0] && (e = 0)), e; ) try {
350
- if (n = 1, t && (r = f[0] & 2 ? t.return : f[0] ? t.throw || ((r = t.return) && r.call(t), 0) : t.next) && !(r = r.call(t, f[1])).done) return r;
351
- switch (t = 0, r && (f = [f[0] & 2, r.value]), f[0]) {
349
+ for (; l && (l = 0, c[0] && (e = 0)), e; ) try {
350
+ if (n = 1, t && (r = c[0] & 2 ? t.return : c[0] ? t.throw || ((r = t.return) && r.call(t), 0) : t.next) && !(r = r.call(t, c[1])).done) return r;
351
+ switch (t = 0, r && (c = [c[0] & 2, r.value]), c[0]) {
352
352
  case 0:
353
353
  case 1:
354
- r = f;
354
+ r = c;
355
355
  break;
356
356
  case 4:
357
- return e.label++, { value: f[1], done: !1 };
357
+ return e.label++, { value: c[1], done: !1 };
358
358
  case 5:
359
- e.label++, t = f[1], f = [0];
359
+ e.label++, t = c[1], c = [0];
360
360
  continue;
361
361
  case 7:
362
- f = e.ops.pop(), e.trys.pop();
362
+ c = e.ops.pop(), e.trys.pop();
363
363
  continue;
364
364
  default:
365
- if (r = e.trys, !(r = r.length > 0 && r[r.length - 1]) && (f[0] === 6 || f[0] === 2)) {
365
+ if (r = e.trys, !(r = r.length > 0 && r[r.length - 1]) && (c[0] === 6 || c[0] === 2)) {
366
366
  e = 0;
367
367
  continue;
368
368
  }
369
- if (f[0] === 3 && (!r || f[1] > r[0] && f[1] < r[3])) {
370
- e.label = f[1];
369
+ if (c[0] === 3 && (!r || c[1] > r[0] && c[1] < r[3])) {
370
+ e.label = c[1];
371
371
  break;
372
372
  }
373
- if (f[0] === 6 && e.label < r[1]) {
374
- e.label = r[1], r = f;
373
+ if (c[0] === 6 && e.label < r[1]) {
374
+ e.label = r[1], r = c;
375
375
  break;
376
376
  }
377
377
  if (r && e.label < r[2]) {
378
- e.label = r[2], e.ops.push(f);
378
+ e.label = r[2], e.ops.push(c);
379
379
  break;
380
380
  }
381
381
  r[2] && e.ops.pop(), e.trys.pop();
382
382
  continue;
383
383
  }
384
- f = o.call(h, e);
384
+ c = s.call(h, e);
385
385
  } catch (m) {
386
- f = [6, m], t = 0;
386
+ c = [6, m], t = 0;
387
387
  } finally {
388
388
  n = r = 0;
389
389
  }
390
- if (f[0] & 5) throw f[1];
391
- return { value: f[0] ? f[1] : void 0, done: !0 };
390
+ if (c[0] & 5) throw c[1];
391
+ return { value: c[0] ? c[1] : void 0, done: !0 };
392
392
  }
393
393
  }
394
- function qt(h, o, e) {
395
- if (e || arguments.length === 2) for (var n = 0, t = o.length, r; n < t; n++)
396
- (r || !(n in o)) && (r || (r = Array.prototype.slice.call(o, 0, n)), r[n] = o[n]);
397
- return h.concat(r || Array.prototype.slice.call(o));
394
+ function qt(h, s, e) {
395
+ if (e || arguments.length === 2) for (var n = 0, t = s.length, r; n < t; n++)
396
+ (r || !(n in s)) && (r || (r = Array.prototype.slice.call(s, 0, n)), r[n] = s[n]);
397
+ return h.concat(r || Array.prototype.slice.call(s));
398
398
  }
399
399
  function Cn(h) {
400
- return new Promise(function(o, e) {
400
+ return new Promise(function(s, e) {
401
401
  var n = new Image();
402
402
  n.onload = function() {
403
403
  n.onload = n.onerror = function() {
404
- }, o(n);
404
+ }, s(n);
405
405
  }, n.onerror = function(t) {
406
406
  n.onload = n.onerror = function() {
407
407
  }, e(t);
@@ -413,35 +413,35 @@ var Ln = typeof performance != "undefined" && typeof performance.timing != "unde
413
413
  }) : (function() {
414
414
  return Date.now();
415
415
  });
416
- function st(h, o, e) {
417
- return h + (o - h) * e;
416
+ function lt(h, s, e) {
417
+ return h + (s - h) * e;
418
418
  }
419
- function Fn(h, o, e, n) {
420
- var t = (o * e + 2 * h) / Math.pow(e, 3), r = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o, l = h;
421
- return t * Math.pow(n, 3) + r * Math.pow(n, 2) + s * n + l;
419
+ function Fn(h, s, e, n) {
420
+ var t = (s * e + 2 * h) / Math.pow(e, 3), r = -(2 * s * e + 3 * h) / Math.pow(e, 2), l = s, o = h;
421
+ return t * Math.pow(n, 3) + r * Math.pow(n, 2) + l * n + o;
422
422
  }
423
- function In(h, o, e, n) {
424
- var t = (o * e + 2 * h) / Math.pow(e, 3), r = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o;
425
- return 3 * t * Math.pow(n, 2) + 2 * r * n + s;
423
+ function In(h, s, e, n) {
424
+ var t = (s * e + 2 * h) / Math.pow(e, 3), r = -(2 * s * e + 3 * h) / Math.pow(e, 2), l = s;
425
+ return 3 * t * Math.pow(n, 2) + 2 * r * n + l;
426
426
  }
427
- function Dn(h, o, e, n) {
427
+ function Dn(h, s, e, n) {
428
428
  var t = n[1] - n[0];
429
- return h = lt(h, n), o = lt(o, n), o - h > t / 2 ? st(h + t, o, e) : h - o > t / 2 ? st(h - t, o, e) : st(h, o, e);
429
+ return h = ut(h, n), s = ut(s, n), s - h > t / 2 ? lt(h + t, s, e) : h - s > t / 2 ? lt(h - t, s, e) : lt(h, s, e);
430
430
  }
431
- function lt(h, o) {
432
- var e = o[1] - o[0];
433
- return h < o[0] ? lt(h + e, o) : h >= o[1] ? lt(h - e, o) : h;
431
+ function ut(h, s) {
432
+ var e = s[1] - s[0];
433
+ return h < s[0] ? ut(h + e, s) : h >= s[1] ? ut(h - e, s) : h;
434
434
  }
435
- function Nn(h, o, e, n) {
436
- return n ? Dn(h, o, e, n) : st(h, o, e);
435
+ function Nn(h, s, e, n) {
436
+ return n ? Dn(h, s, e, n) : lt(h, s, e);
437
437
  }
438
438
  var Kt = (
439
439
  /** @class */
440
440
  (function() {
441
- function h(o) {
441
+ function h(s) {
442
442
  this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = Et(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
443
- for (var e in o) {
444
- var n = o[e];
443
+ for (var e in s) {
444
+ var n = s[e];
445
445
  typeof n == "number" ? (this.value[e] = n, this.config[e] = { circle: !1 }) : (this.value[e] = n.value, this.config[e] = { circle: n.circle });
446
446
  }
447
447
  this.keyframes = [
@@ -449,49 +449,49 @@ var Kt = (
449
449
  { progress: 1, value: V({}, this.value) }
450
450
  ];
451
451
  }
452
- return h.prototype.getProgress = function(o) {
453
- var e = o - this.startTime;
452
+ return h.prototype.getProgress = function(s) {
453
+ var e = s - this.startTime;
454
454
  return e < 0 ? 0 : e >= this.duration ? 1 : 1 - Fn(1, this.startVelocity, this.duration, e);
455
- }, h.prototype.getValue = function(o) {
455
+ }, h.prototype.getValue = function(s) {
456
456
  for (var e = 1; e < this.keyframes.length; e++)
457
- if (this.keyframes[e].progress > o) {
457
+ if (this.keyframes[e].progress > s) {
458
458
  var n = this.keyframes[e - 1], t = this.keyframes[e], r = {};
459
- for (var s in this.config) {
460
- var l = (o - n.progress) / (t.progress - n.progress);
461
- r[s] = Nn(n.value[s], t.value[s], l, this.config[s].circle);
459
+ for (var l in this.config) {
460
+ var o = (s - n.progress) / (t.progress - n.progress);
461
+ r[l] = Nn(n.value[l], t.value[l], o, this.config[l].circle);
462
462
  }
463
463
  return r;
464
464
  }
465
465
  return V({}, this.keyframes[this.keyframes.length - 1].value);
466
- }, h.prototype.getProgressVelocity = function(o) {
467
- var e = o - this.startTime;
466
+ }, h.prototype.getProgressVelocity = function(s) {
467
+ var e = s - this.startTime;
468
468
  return e >= this.duration ? 0 : In(1, this.startVelocity, this.duration, e);
469
- }, h.prototype.update = function(o) {
470
- return this.ended ? !0 : (this.progress = Math.min(1, Math.max(0, this.progress, this.getProgress(o))), this.value = this.getValue(this.progress), this.ended = this.progress >= 1, this.ended && this.callbacks && (this.callbacks[0](), this.callbacks = void 0), this.ended);
471
- }, h.prototype.getKeyFrameSegment = function(o) {
472
- for (var e = this.getProgress(o), n = 1; n < this.keyframes.length; n++)
469
+ }, h.prototype.update = function(s) {
470
+ return this.ended ? !0 : (this.progress = Math.min(1, Math.max(0, this.progress, this.getProgress(s))), this.value = this.getValue(this.progress), this.ended = this.progress >= 1, this.ended && this.callbacks && (this.callbacks[0](), this.callbacks = void 0), this.ended);
471
+ }, h.prototype.getKeyFrameSegment = function(s) {
472
+ for (var e = this.getProgress(s), n = 1; n < this.keyframes.length; n++)
473
473
  if (this.keyframes[n].progress > e)
474
474
  return [this.keyframes[n - 1], this.keyframes[n]];
475
475
  return [this.keyframes[this.keyframes.length - 2], this.keyframes[this.keyframes.length - 1]];
476
476
  }, h.prototype.getTargetKeyframe = function() {
477
477
  return this.keyframes[this.keyframes.length - 1];
478
- }, h.prototype.set = function(o, e, n, t) {
478
+ }, h.prototype.set = function(s, e, n, t) {
479
479
  var r;
480
480
  n === void 0 && (n = 0), isNaN(e) && (e = 0), isNaN(n) && (n = 0), t = t != null ? t : Et();
481
- var s = this.getProgress(t), l = this.getValue(s), d = {};
482
- for (var f in this.config)
483
- d[f] = (r = o[f]) !== null && r !== void 0 ? r : l[f];
481
+ var l = this.getProgress(t), o = this.getValue(l), d = {};
482
+ for (var c in this.config)
483
+ d[c] = (r = s[c]) !== null && r !== void 0 ? r : o[c];
484
484
  var m = [
485
- { progress: 0, value: l },
485
+ { progress: 0, value: o },
486
486
  { progress: 1, value: d }
487
487
  ];
488
488
  return this.setKeyframes(m, e, n, t);
489
- }, h.prototype.setKeyframes = function(o, e, n, t) {
489
+ }, h.prototype.setKeyframes = function(s, e, n, t) {
490
490
  var r = this;
491
- if (n === void 0 && (n = 0), o.length < 2)
491
+ if (n === void 0 && (n = 0), s.length < 2)
492
492
  throw new Error("keyframes invalid.");
493
- return isNaN(e) && (e = 0), isNaN(n) && (n = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(s, l) {
494
- t = t != null ? t : Et(), r.progress = 0, r.ended = !1, r.startTime = t, r.startVelocity = n, r.keyframes = o, r.duration = e, e === 0 ? (r.progress = 1, r.value = V({}, o[o.length - 1].value)) : r.value = V({}, o[0].value), r.callbacks = [s, l];
493
+ return isNaN(e) && (e = 0), isNaN(n) && (n = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(l, o) {
494
+ t = t != null ? t : Et(), r.progress = 0, r.ended = !1, r.startTime = t, r.startVelocity = n, r.keyframes = s, r.duration = e, e === 0 ? (r.progress = 1, r.value = V({}, s[s.length - 1].value)) : r.value = V({}, s[0].value), r.callbacks = [l, o];
495
495
  });
496
496
  }, h.prototype.dispose = function() {
497
497
  this.callbacks && (this.callbacks[1](new Error("motion dispose.")), this.callbacks = void 0);
@@ -562,11 +562,11 @@ void main() {
562
562
  `, Vn = (
563
563
  /** @class */
564
564
  (function(h) {
565
- he(o, h);
566
- function o(e, n) {
565
+ he(s, h);
566
+ function s(e, n) {
567
567
  var t = h.call(this, e) || this;
568
568
  t.canvas = document.createElement("canvas"), t.group = new p.Group(), t.wrapper = document.createElement("div"), t.style = document.createElement("style"), t.itemMaskMesh = (function() {
569
- var l = new p.Mesh(new p.SphereBufferGeometry(1, 60, 40), new p.ShaderMaterial({
569
+ var o = new p.Mesh(new p.SphereBufferGeometry(1, 60, 40), new p.ShaderMaterial({
570
570
  vertexShader: Un,
571
571
  fragmentShader: Rn,
572
572
  uniforms: {
@@ -581,47 +581,47 @@ void main() {
581
581
  depthTest: !1,
582
582
  transparent: !0
583
583
  }));
584
- return l.renderOrder = -3, l.geometry.rotateY(-Math.PI / 2), l.geometry.scale(-1, 1, 1), l;
585
- })(), t.onFivePanoArrived = function(l) {
586
- t.state.mode === "mask" && t.loadPanoMask(l);
587
- }, t.onFiveWantsMoveToPano = function(l) {
584
+ return o.renderOrder = -3, o.geometry.rotateY(-Math.PI / 2), o.geometry.scale(-1, 1, 1), o;
585
+ })(), t.onFivePanoArrived = function(o) {
586
+ t.state.mode === "mask" && t.loadPanoMask(o);
587
+ }, t.onFiveWantsMoveToPano = function(o) {
588
588
  t.state.mode === "box" && t.select();
589
- }, t.loadPanoMask = function(l) {
589
+ }, t.loadPanoMask = function(o) {
590
590
  return De(t, void 0, void 0, function() {
591
- var d, f, m, y, A, E, P, x, C, w;
591
+ var d, c, m, y, M, w, A, x, C, E;
592
592
  return Ne(this, function(b) {
593
593
  switch (b.label) {
594
594
  case 0:
595
- return d = this, f = d.five, m = d.canvas, y = d.itemMaskMesh, A = d.data, E = m.getContext("2d"), P = f.observers[l], x = (w = A == null ? void 0 : A.object_mask_list.find(function(M) {
596
- return M.derived_id === String(P.derivedId);
597
- })) === null || w === void 0 ? void 0 : w.object_mask_url, x ? [4, Cn(x)] : [
595
+ return d = this, c = d.five, m = d.canvas, y = d.itemMaskMesh, M = d.data, w = m.getContext("2d"), A = c.observers[o], x = (E = M == null ? void 0 : M.object_mask_list.find(function(T) {
596
+ return T.derived_id === String(A.derivedId);
597
+ })) === null || E === void 0 ? void 0 : E.object_mask_url, x ? [4, Cn(x)] : [
598
598
  2
599
599
  /*return*/
600
600
  ];
601
601
  case 1:
602
- return C = b.sent(), m.width = C.width, m.height = C.height, E == null || E.drawImage(C, 0, 0, C.width, C.height), y.material.uniforms.map.value.image = C, y.material.uniforms.map.value.minFilter = p.LinearFilter, y.material.uniforms.map.value.needsUpdate = !0, y.position.copy(P.position), y.quaternion.copy(P.quaternion), f.scene.add(y), f.needsRender = !0, [
602
+ return C = b.sent(), m.width = C.width, m.height = C.height, w == null || w.drawImage(C, 0, 0, C.width, C.height), y.material.uniforms.map.value.image = C, y.material.uniforms.map.value.minFilter = p.LinearFilter, y.material.uniforms.map.value.needsUpdate = !0, y.position.copy(A.position), y.quaternion.copy(A.quaternion), c.scene.add(y), c.needsRender = !0, [
603
603
  2
604
604
  /*return*/
605
605
  ];
606
606
  }
607
607
  });
608
608
  });
609
- }, t.onFiveMouseMove = function(l) {
609
+ }, t.onFiveMouseMove = function(o) {
610
610
  var d;
611
611
  if (t.state.mode === "mask" && t.five.state.mode === "Panorama") {
612
- var f = t, m = f.five, y = f.itemMaskMesh, A = m.observers[m.state.panoIndex], E = (d = l.pointers[0]) === null || d === void 0 ? void 0 : d.raycaster;
613
- if (E) {
614
- var P = E.intersectObjects(t.group.children.filter(function(x) {
615
- return x.userData.visible_viewpoint.includes(String(A.derivedId));
612
+ var c = t, m = c.five, y = c.itemMaskMesh, M = m.observers[m.state.panoIndex], w = (d = o.pointers[0]) === null || d === void 0 ? void 0 : d.raycaster;
613
+ if (w) {
614
+ var A = w.intersectObjects(t.group.children.filter(function(x) {
615
+ return x.userData.visible_viewpoint.includes(String(M.derivedId));
616
616
  }), !0)[0];
617
- P ? y.material.uniforms.color.value = P.object.userData.color : y.material.uniforms.color.value = new p.Vector4(0, 0, 0, 1);
617
+ A ? y.material.uniforms.color.value = A.object.userData.color : y.material.uniforms.color.value = new p.Vector4(0, 0, 0, 1);
618
618
  }
619
619
  }
620
- }, t.onFiveTapGesture = function(l) {
621
- var d = t.five, f = d.observers[d.state.panoIndex];
622
- if (l) {
623
- var m = l.intersectObjects(t.group.children.filter(function(E) {
624
- return E.userData.visible_viewpoint.includes(String(f.derivedId));
620
+ }, t.onFiveTapGesture = function(o) {
621
+ var d = t.five, c = d.observers[d.state.panoIndex];
622
+ if (o) {
623
+ var m = o.intersectObjects(t.group.children.filter(function(w) {
624
+ return w.userData.visible_viewpoint.includes(String(c.derivedId));
625
625
  }), !0)[0];
626
626
  if (m) {
627
627
  t.select(m.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = m.point, t.changeTapScreenPosition();
@@ -629,23 +629,23 @@ void main() {
629
629
  opacity: 0,
630
630
  scale: 0,
631
631
  shadow: 2
632
- }), A = new Kt({
632
+ }), M = new Kt({
633
633
  opacity: 0,
634
634
  scale: 0,
635
635
  shadow: 2
636
636
  });
637
- return y.setKeyframes(kn, 1e3), A.setKeyframes(Bn, 1e3), t.stopAnimation = ct.shared.add(function(E, P) {
638
- var x, C = y.update(E), w = A.update(E);
639
- t.wrapper.firstChild.style.opacity = "".concat(y.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(y.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(y.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(A.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(A.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(A.value.shadow, "px #fff"), C && w && ((x = t.stopAnimation) === null || x === void 0 || x.call(t), t.stopAnimation = void 0, d.getElement().parentElement.removeChild(t.wrapper));
637
+ return y.setKeyframes(kn, 1e3), M.setKeyframes(Bn, 1e3), t.stopAnimation = Xe.shared.add(function(w, A) {
638
+ var x, C = y.update(w), E = M.update(w);
639
+ t.wrapper.firstChild.style.opacity = "".concat(y.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(y.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(y.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(M.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(M.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(M.value.shadow, "px #fff"), C && E && ((x = t.stopAnimation) === null || x === void 0 || x.call(t), t.stopAnimation = void 0, d.getElement().parentElement.removeChild(t.wrapper));
640
640
  }, !1, 0, 10), d.getElement().parentElement.appendChild(t.wrapper), !1;
641
641
  }
642
642
  }
643
643
  }, t.changeTapScreenPosition = function() {
644
644
  if (t.tapPosition) {
645
- var l = t.tapPosition.clone().project(t.five.camera), d = (l.x + 1) / 2, f = -(l.y - 1) / 2;
646
- t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(d * 100, "%, ").concat(f * 100, "%)");
645
+ var o = t.tapPosition.clone().project(t.five.camera), d = (o.x + 1) / 2, c = -(o.y - 1) / 2;
646
+ t.wrapper.style.opacity = o.z > 0 && o.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(d * 100, "%, ").concat(c * 100, "%)");
647
647
  }
648
- }, t.onFiveCameraUpdate = function(l) {
648
+ }, t.onFiveCameraUpdate = function(o) {
649
649
  t.changeTapScreenPosition();
650
650
  }, t.dispose = function() {
651
651
  t.disable();
@@ -658,8 +658,8 @@ void main() {
658
658
  selectAll: !1
659
659
  };
660
660
  t.state = Object.assign(r, n == null ? void 0 : n.initialState);
661
- var s = V({}, n == null ? void 0 : n.config);
662
- return t._config = s, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
661
+ var l = V({}, n == null ? void 0 : n.config);
662
+ return t._config = l, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
663
663
  .ItemMaskPlugin {
664
664
  position: absolute;
665
665
  top: 0;
@@ -679,25 +679,25 @@ void main() {
679
679
  }
680
680
  `, t.state.enabled && t._enable({ userAction: !1 }), t;
681
681
  }
682
- return Object.defineProperty(o.prototype, "config", {
682
+ return Object.defineProperty(s.prototype, "config", {
683
683
  get: function() {
684
684
  return V({}, this._config);
685
685
  },
686
686
  enumerable: !1,
687
687
  configurable: !0
688
- }), o.prototype.updateState = function(e, n) {
688
+ }), s.prototype.updateState = function(e, n) {
689
689
  var t = this.state;
690
690
  this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
691
- }, o.prototype.load = function(e) {
691
+ }, s.prototype.load = function(e) {
692
692
  return De(this, void 0, void 0, function() {
693
693
  var n, t, r = this;
694
- return Ne(this, function(s) {
695
- return this.data = e, n = e.data_list.map(function(l) {
696
- var d, f = l.position.end.map(function(O) {
694
+ return Ne(this, function(l) {
695
+ return this.data = e, n = e.data_list.map(function(o) {
696
+ var d, c = o.position.end.map(function(O) {
697
697
  return Number(O);
698
- }), m = l.position.start.map(function(O) {
698
+ }), m = o.position.start.map(function(O) {
699
699
  return Number(O);
700
- }), y = Math.abs(f[0] - m[0]), A = Math.abs(f[1] - m[1]), E = Math.abs(f[2] - m[2]), P = f[0] / 2 + m[0] / 2, x = f[1] / 2 + m[1] / 2, C = f[2] / 2 + m[2] / 2, w = new p.Vector3(P, x, C), b = new p.BoxBufferGeometry(y, A, E), M = new p.ShaderMaterial({
700
+ }), y = Math.abs(c[0] - m[0]), M = Math.abs(c[1] - m[1]), w = Math.abs(c[2] - m[2]), A = c[0] / 2 + m[0] / 2, x = c[1] / 2 + m[1] / 2, C = c[2] / 2 + m[2] / 2, E = new p.Vector3(A, x, C), b = new p.BoxBufferGeometry(y, M, w), T = new p.ShaderMaterial({
701
701
  vertexShader: `
702
702
  varying vec2 vUv;
703
703
  void main() {
@@ -726,78 +726,78 @@ void main() {
726
726
  }
727
727
  `,
728
728
  side: p.DoubleSide,
729
- visible: r.state.selectedId === "".concat(l.category_name).concat(l.index),
729
+ visible: r.state.selectedId === "".concat(o.category_name).concat(o.index),
730
730
  uniforms: {
731
731
  opacity: { value: r.state.mode === "box" ? 1 : 0 }
732
732
  },
733
733
  depthWrite: !1,
734
734
  depthTest: !1,
735
735
  transparent: !0
736
- }), c = new p.Mesh(b, M);
737
- return c.position.copy(w), c.name = "".concat(l.category_name).concat(l.index), c.userData.color = new ((d = p.Vector4).bind.apply(d, qt(qt([void 0], l.mask_color.map(function(O) {
736
+ }), f = new p.Mesh(b, T);
737
+ return f.position.copy(E), f.name = "".concat(o.category_name).concat(o.index), f.userData.color = new ((d = p.Vector4).bind.apply(d, qt(qt([void 0], o.mask_color.map(function(O) {
738
738
  return O / 255;
739
- }).reverse(), !1), [1], !1)))(), c.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), c;
739
+ }).reverse(), !1), [1], !1)))(), f.userData.visible_viewpoint = Object.keys(o.visible_viewpoint), f;
740
740
  }), (t = this.group).add.apply(t, n), [
741
741
  2
742
742
  /*return*/
743
743
  ];
744
744
  });
745
745
  });
746
- }, o.prototype.setState = function(e, n) {
746
+ }, s.prototype.setState = function(e, n) {
747
747
  n === void 0 && (n = {});
748
748
  var t = this.state, r = n.userAction !== void 0 ? n.userAction : !0;
749
749
  if (this.updateState(e, r), e.enabled !== void 0 && t.enabled !== e.enabled) {
750
- var s = { userAction: r };
751
- e.enabled ? this._enable(s) : this._disable(s);
750
+ var l = { userAction: r };
751
+ e.enabled ? this._enable(l) : this._disable(l);
752
752
  }
753
- }, o.prototype.setMode = function(e) {
753
+ }, s.prototype.setMode = function(e) {
754
754
  this.updateState({ mode: e }, !1), e === "mask" ? (this.group.children.forEach(function(n) {
755
755
  n.material.uniforms.opacity.value = 0;
756
756
  }), this.loadPanoMask(this.five.state.panoIndex)) : e === "box" && (this.itemMaskMesh.material.uniforms.color.value = new p.Vector4(0, 0, 0, 1), this.group.children.forEach(function(n) {
757
757
  n.material.uniforms.opacity.value = 1;
758
758
  }), this.five.needsRender = !0);
759
- }, o.prototype.select = function(e, n) {
759
+ }, s.prototype.select = function(e, n) {
760
760
  var t = this, r;
761
- this.updateState({ selectedId: e != null ? e : null }, (r = n == null ? void 0 : n.userAction) !== null && r !== void 0 ? r : !1), this.group.children.forEach(function(s) {
762
- s.material.visible = t.state.selectAll || s.name === e;
761
+ this.updateState({ selectedId: e != null ? e : null }, (r = n == null ? void 0 : n.userAction) !== null && r !== void 0 ? r : !1), this.group.children.forEach(function(l) {
762
+ l.material.visible = t.state.selectAll || l.name === e;
763
763
  }), this.five.needsRender = !0;
764
- }, o.prototype.selectAll = function(e) {
764
+ }, s.prototype.selectAll = function(e) {
765
765
  e === void 0 && (e = !0), this.updateState({ selectAll: !!e }, !1), this.select();
766
- }, o.prototype._enable = function(e) {
766
+ }, s.prototype._enable = function(e) {
767
767
  this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("wantsMoveToPano", this.onFiveWantsMoveToPano), this.five.on("gesture.mousemove", this.onFiveMouseMove), this.five.on("wantsTapGesture", this.onFiveTapGesture), this.five.on("cameraUpdate", this.onFiveCameraUpdate), this.five.scene.add(this.group), document.head.appendChild(this.style);
768
- }, o.prototype._disable = function(e) {
768
+ }, s.prototype._disable = function(e) {
769
769
  this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("wantsMoveToPano", this.onFiveWantsMoveToPano), this.five.off("gesture.mousemove", this.onFiveMouseMove), this.five.off("wantsTapGesture", this.onFiveTapGesture), this.five.off("cameraUpdate", this.onFiveCameraUpdate), this.five.scene.remove(this.group), document.head.removeChild(this.style);
770
- }, o.prototype.enable = function(e) {
770
+ }, s.prototype.enable = function(e) {
771
771
  var n;
772
772
  if (!this.state.enabled) {
773
773
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
774
774
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
775
775
  }
776
- }, o.prototype.disable = function(e) {
776
+ }, s.prototype.disable = function(e) {
777
777
  var n;
778
778
  if (this.state.enabled !== !1) {
779
779
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
780
780
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
781
781
  }
782
- }, o;
783
- })(Xe.Controller)
784
- ), tr = function(h, o) {
785
- return new Vn(h, o);
782
+ }, s;
783
+ })(qe.Controller)
784
+ ), tr = function(h, s) {
785
+ return new Vn(h, s);
786
786
  };
787
787
  /*! Hammer.JS - v2.0.7 - 2016-04-22
788
788
  * http://hammerjs.github.io/
789
789
  *
790
790
  * Copyright (c) 2016 Jorik Tangelder;
791
791
  * Licensed under the MIT license */
792
- var Tt = (function(h, o, e, n) {
793
- var t = ["", "webkit", "Moz", "MS", "ms", "o"], r = o.createElement ? o.createElement("div") : n, s = "function", l = Math.round, d = Math.abs, f = Date.now;
792
+ var Tt = (function(h, s, e, n) {
793
+ var t = ["", "webkit", "Moz", "MS", "ms", "o"], r = s.createElement ? s.createElement("div") : n, l = "function", o = Math.round, d = Math.abs, c = Date.now;
794
794
  function m(a, i, u) {
795
795
  return setTimeout(b(a, u), i);
796
796
  }
797
797
  function y(a, i, u) {
798
- return Array.isArray(a) ? (A(a, u[i], u), !0) : !1;
798
+ return Array.isArray(a) ? (M(a, u[i], u), !0) : !1;
799
799
  }
800
- function A(a, i, u) {
800
+ function M(a, i, u) {
801
801
  var g;
802
802
  if (a)
803
803
  if (a.forEach)
@@ -809,56 +809,56 @@ var Tt = (function(h, o, e, n) {
809
809
  for (g in a)
810
810
  a.hasOwnProperty(g) && i.call(u, a[g], g, a);
811
811
  }
812
- function E(a, i, u) {
812
+ function w(a, i, u) {
813
813
  var g = "DEPRECATED METHOD: " + i + `
814
814
  ` + u + ` AT
815
815
  `;
816
816
  return function() {
817
- var T = new Error("get-stack-trace"), _ = T && T.stack ? T.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", k = h.console && (h.console.warn || h.console.log);
817
+ var P = new Error("get-stack-trace"), _ = P && P.stack ? P.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", k = h.console && (h.console.warn || h.console.log);
818
818
  return k && k.call(h.console, g, _), a.apply(this, arguments);
819
819
  };
820
820
  }
821
- var P;
822
- typeof Object.assign != "function" ? P = function(i) {
821
+ var A;
822
+ typeof Object.assign != "function" ? A = function(i) {
823
823
  if (i === n || i === null)
824
824
  throw new TypeError("Cannot convert undefined or null to object");
825
825
  for (var u = Object(i), g = 1; g < arguments.length; g++) {
826
- var T = arguments[g];
827
- if (T !== n && T !== null)
828
- for (var _ in T)
829
- T.hasOwnProperty(_) && (u[_] = T[_]);
826
+ var P = arguments[g];
827
+ if (P !== n && P !== null)
828
+ for (var _ in P)
829
+ P.hasOwnProperty(_) && (u[_] = P[_]);
830
830
  }
831
831
  return u;
832
- } : P = Object.assign;
833
- var x = E(function(i, u, g) {
834
- for (var T = Object.keys(u), _ = 0; _ < T.length; )
835
- (!g || g && i[T[_]] === n) && (i[T[_]] = u[T[_]]), _++;
832
+ } : A = Object.assign;
833
+ var x = w(function(i, u, g) {
834
+ for (var P = Object.keys(u), _ = 0; _ < P.length; )
835
+ (!g || g && i[P[_]] === n) && (i[P[_]] = u[P[_]]), _++;
836
836
  return i;
837
- }, "extend", "Use `assign`."), C = E(function(i, u) {
837
+ }, "extend", "Use `assign`."), C = w(function(i, u) {
838
838
  return x(i, u, !0);
839
839
  }, "merge", "Use `assign`.");
840
- function w(a, i, u) {
841
- var g = i.prototype, T;
842
- T = a.prototype = Object.create(g), T.constructor = a, T._super = g, u && P(T, u);
840
+ function E(a, i, u) {
841
+ var g = i.prototype, P;
842
+ P = a.prototype = Object.create(g), P.constructor = a, P._super = g, u && A(P, u);
843
843
  }
844
844
  function b(a, i) {
845
845
  return function() {
846
846
  return a.apply(i, arguments);
847
847
  };
848
848
  }
849
- function M(a, i) {
850
- return typeof a == s ? a.apply(i && i[0] || n, i) : a;
849
+ function T(a, i) {
850
+ return typeof a == l ? a.apply(i && i[0] || n, i) : a;
851
851
  }
852
- function c(a, i) {
852
+ function f(a, i) {
853
853
  return a === n ? i : a;
854
854
  }
855
855
  function O(a, i, u) {
856
- A(H(i), function(g) {
856
+ M(H(i), function(g) {
857
857
  a.addEventListener(g, u, !1);
858
858
  });
859
859
  }
860
860
  function S(a, i, u) {
861
- A(H(i), function(g) {
861
+ M(H(i), function(g) {
862
862
  a.removeEventListener(g, u, !1);
863
863
  });
864
864
  }
@@ -890,17 +890,17 @@ var Tt = (function(h, o, e, n) {
890
890
  return Array.prototype.slice.call(a, 0);
891
891
  }
892
892
  function ae(a, i, u) {
893
- for (var g = [], T = [], _ = 0; _ < a.length; ) {
893
+ for (var g = [], P = [], _ = 0; _ < a.length; ) {
894
894
  var k = a[_][i];
895
- X(T, k) < 0 && g.push(a[_]), T[_] = k, _++;
895
+ X(P, k) < 0 && g.push(a[_]), P[_] = k, _++;
896
896
  }
897
897
  return g = g.sort(function(ce, ee) {
898
898
  return ce[i] > ee[i];
899
899
  }), g;
900
900
  }
901
901
  function z(a, i) {
902
- for (var u, g, T = i[0].toUpperCase() + i.slice(1), _ = 0; _ < t.length; ) {
903
- if (u = t[_], g = u ? u + T : i, g in a)
902
+ for (var u, g, P = i[0].toUpperCase() + i.slice(1), _ = 0; _ < t.length; ) {
903
+ if (u = t[_], g = u ? u + P : i, g in a)
904
904
  return g;
905
905
  _++;
906
906
  }
@@ -914,11 +914,11 @@ var Tt = (function(h, o, e, n) {
914
914
  var i = a.ownerDocument || a;
915
915
  return i.defaultView || i.parentWindow || h;
916
916
  }
917
- var F = /mobile|tablet|ip(ad|hone|od)|android/i, N = "ontouchstart" in h, j = z(h, "PointerEvent") !== n, ne = N && F.test(navigator.userAgent), K = "touch", U = "pen", te = "mouse", Y = "kinect", G = 25, B = 1, se = 2, Z = 4, Q = 8, Oe = 1, Pe = 2, Ce = 4, Le = 8, Ae = 16, ue = Pe | Ce, de = Le | Ae, Ue = ue | de, Re = ["x", "y"], Fe = ["clientX", "clientY"];
917
+ var F = /mobile|tablet|ip(ad|hone|od)|android/i, N = "ontouchstart" in h, j = z(h, "PointerEvent") !== n, ne = N && F.test(navigator.userAgent), K = "touch", U = "pen", te = "mouse", Y = "kinect", G = 25, B = 1, se = 2, Z = 4, Q = 8, Oe = 1, Me = 2, Ce = 4, Le = 8, Ae = 16, ue = Me | Ce, de = Le | Ae, Ue = ue | de, Re = ["x", "y"], Fe = ["clientX", "clientY"];
918
918
  function le(a, i) {
919
919
  var u = this;
920
920
  this.manager = a, this.callback = i, this.element = a.element, this.target = a.options.inputTarget, this.domHandler = function(g) {
921
- M(a.options.enable, [a]) && u.handler(g);
921
+ T(a.options.enable, [a]) && u.handler(g);
922
922
  }, this.init();
923
923
  }
924
924
  le.prototype = {
@@ -941,51 +941,51 @@ var Tt = (function(h, o, e, n) {
941
941
  this.evEl && S(this.element, this.evEl, this.domHandler), this.evTarget && S(this.target, this.evTarget, this.domHandler), this.evWin && S(L(this.element), this.evWin, this.domHandler);
942
942
  }
943
943
  };
944
- function Ke(a) {
944
+ function Ze(a) {
945
945
  var i, u = a.options.inputClass;
946
- return u ? i = u : j ? i = ht : ne ? i = $e : N ? i = dt : i = Je, new i(a, Ze);
946
+ return u ? i = u : j ? i = ht : ne ? i = et : N ? i = dt : i = $e, new i(a, Qe);
947
947
  }
948
- function Ze(a, i, u) {
949
- var g = u.pointers.length, T = u.changedPointers.length, _ = i & B && g - T === 0, k = i & (Z | Q) && g - T === 0;
948
+ function Qe(a, i, u) {
949
+ var g = u.pointers.length, P = u.changedPointers.length, _ = i & B && g - P === 0, k = i & (Z | Q) && g - P === 0;
950
950
  u.isFirst = !!_, u.isFinal = !!k, _ && (a.session = {}), u.eventType = i, v(a, u), a.emit("hammer.input", u), a.recognize(u), a.session.prevInput = u;
951
951
  }
952
952
  function v(a, i) {
953
- var u = a.session, g = i.pointers, T = g.length;
954
- u.firstInput || (u.firstInput = re(i)), T > 1 && !u.firstMultiple ? u.firstMultiple = re(i) : T === 1 && (u.firstMultiple = !1);
953
+ var u = a.session, g = i.pointers, P = g.length;
954
+ u.firstInput || (u.firstInput = re(i)), P > 1 && !u.firstMultiple ? u.firstMultiple = re(i) : P === 1 && (u.firstMultiple = !1);
955
955
  var _ = u.firstInput, k = u.firstMultiple, ie = k ? k.center : _.center, ce = i.center = pe(g);
956
- i.timeStamp = f(), i.deltaTime = i.timeStamp - _.timeStamp, i.angle = ft(ie, ce), i.distance = Qe(ie, ce), R(u, i), i.offsetDirection = be(i.deltaX, i.deltaY);
956
+ i.timeStamp = c(), i.deltaTime = i.timeStamp - _.timeStamp, i.angle = ft(ie, ce), i.distance = Je(ie, ce), R(u, i), i.offsetDirection = be(i.deltaX, i.deltaY);
957
957
  var ee = Ve(i.deltaTime, i.deltaX, i.deltaY);
958
958
  i.overallVelocityX = ee.x, i.overallVelocityY = ee.y, i.overallVelocity = d(ee.x) > d(ee.y) ? ee.x : ee.y, i.scale = k ? an(k.pointers, g) : 1, i.rotation = k ? rn(k.pointers, g) : 0, i.maxPointers = u.prevInput ? i.pointers.length > u.prevInput.maxPointers ? i.pointers.length : u.prevInput.maxPointers : i.pointers.length, J(u, i);
959
959
  var ge = a.element;
960
960
  D(i.srcEvent.target, ge) && (ge = i.srcEvent.target), i.target = ge;
961
961
  }
962
962
  function R(a, i) {
963
- var u = i.center, g = a.offsetDelta || {}, T = a.prevDelta || {}, _ = a.prevInput || {};
964
- (i.eventType === B || _.eventType === Z) && (T = a.prevDelta = {
963
+ var u = i.center, g = a.offsetDelta || {}, P = a.prevDelta || {}, _ = a.prevInput || {};
964
+ (i.eventType === B || _.eventType === Z) && (P = a.prevDelta = {
965
965
  x: _.deltaX || 0,
966
966
  y: _.deltaY || 0
967
967
  }, g = a.offsetDelta = {
968
968
  x: u.x,
969
969
  y: u.y
970
- }), i.deltaX = T.x + (u.x - g.x), i.deltaY = T.y + (u.y - g.y);
970
+ }), i.deltaX = P.x + (u.x - g.x), i.deltaY = P.y + (u.y - g.y);
971
971
  }
972
972
  function J(a, i) {
973
- var u = a.lastInterval || i, g = i.timeStamp - u.timeStamp, T, _, k, ie;
973
+ var u = a.lastInterval || i, g = i.timeStamp - u.timeStamp, P, _, k, ie;
974
974
  if (i.eventType != Q && (g > G || u.velocity === n)) {
975
975
  var ce = i.deltaX - u.deltaX, ee = i.deltaY - u.deltaY, ge = Ve(g, ce, ee);
976
- _ = ge.x, k = ge.y, T = d(ge.x) > d(ge.y) ? ge.x : ge.y, ie = be(ce, ee), a.lastInterval = i;
976
+ _ = ge.x, k = ge.y, P = d(ge.x) > d(ge.y) ? ge.x : ge.y, ie = be(ce, ee), a.lastInterval = i;
977
977
  } else
978
- T = u.velocity, _ = u.velocityX, k = u.velocityY, ie = u.direction;
979
- i.velocity = T, i.velocityX = _, i.velocityY = k, i.direction = ie;
978
+ P = u.velocity, _ = u.velocityX, k = u.velocityY, ie = u.direction;
979
+ i.velocity = P, i.velocityX = _, i.velocityY = k, i.direction = ie;
980
980
  }
981
981
  function re(a) {
982
982
  for (var i = [], u = 0; u < a.pointers.length; )
983
983
  i[u] = {
984
- clientX: l(a.pointers[u].clientX),
985
- clientY: l(a.pointers[u].clientY)
984
+ clientX: o(a.pointers[u].clientX),
985
+ clientY: o(a.pointers[u].clientY)
986
986
  }, u++;
987
987
  return {
988
- timeStamp: f(),
988
+ timeStamp: c(),
989
989
  pointers: i,
990
990
  center: pe(i),
991
991
  deltaX: a.deltaX,
@@ -996,14 +996,14 @@ var Tt = (function(h, o, e, n) {
996
996
  var i = a.length;
997
997
  if (i === 1)
998
998
  return {
999
- x: l(a[0].clientX),
1000
- y: l(a[0].clientY)
999
+ x: o(a[0].clientX),
1000
+ y: o(a[0].clientY)
1001
1001
  };
1002
- for (var u = 0, g = 0, T = 0; T < i; )
1003
- u += a[T].clientX, g += a[T].clientY, T++;
1002
+ for (var u = 0, g = 0, P = 0; P < i; )
1003
+ u += a[P].clientX, g += a[P].clientY, P++;
1004
1004
  return {
1005
- x: l(u / i),
1006
- y: l(g / i)
1005
+ x: o(u / i),
1006
+ y: o(g / i)
1007
1007
  };
1008
1008
  }
1009
1009
  function Ve(a, i, u) {
@@ -1013,33 +1013,33 @@ var Tt = (function(h, o, e, n) {
1013
1013
  };
1014
1014
  }
1015
1015
  function be(a, i) {
1016
- return a === i ? Oe : d(a) >= d(i) ? a < 0 ? Pe : Ce : i < 0 ? Le : Ae;
1016
+ return a === i ? Oe : d(a) >= d(i) ? a < 0 ? Me : Ce : i < 0 ? Le : Ae;
1017
1017
  }
1018
- function Qe(a, i, u) {
1018
+ function Je(a, i, u) {
1019
1019
  u || (u = Re);
1020
- var g = i[u[0]] - a[u[0]], T = i[u[1]] - a[u[1]];
1021
- return Math.sqrt(g * g + T * T);
1020
+ var g = i[u[0]] - a[u[0]], P = i[u[1]] - a[u[1]];
1021
+ return Math.sqrt(g * g + P * P);
1022
1022
  }
1023
1023
  function ft(a, i, u) {
1024
1024
  u || (u = Re);
1025
- var g = i[u[0]] - a[u[0]], T = i[u[1]] - a[u[1]];
1026
- return Math.atan2(T, g) * 180 / Math.PI;
1025
+ var g = i[u[0]] - a[u[0]], P = i[u[1]] - a[u[1]];
1026
+ return Math.atan2(P, g) * 180 / Math.PI;
1027
1027
  }
1028
1028
  function rn(a, i) {
1029
1029
  return ft(i[1], i[0], Fe) + ft(a[1], a[0], Fe);
1030
1030
  }
1031
1031
  function an(a, i) {
1032
- return Qe(i[0], i[1], Fe) / Qe(a[0], a[1], Fe);
1032
+ return Je(i[0], i[1], Fe) / Je(a[0], a[1], Fe);
1033
1033
  }
1034
1034
  var on = {
1035
1035
  mousedown: B,
1036
1036
  mousemove: se,
1037
1037
  mouseup: Z
1038
1038
  }, sn = "mousedown", ln = "mousemove mouseup";
1039
- function Je() {
1039
+ function $e() {
1040
1040
  this.evEl = sn, this.evWin = ln, this.pressed = !1, le.apply(this, arguments);
1041
1041
  }
1042
- w(Je, le, {
1042
+ E($e, le, {
1043
1043
  /**
1044
1044
  * handle mouse events
1045
1045
  * @param {Object} ev
@@ -1071,14 +1071,14 @@ var Tt = (function(h, o, e, n) {
1071
1071
  function ht() {
1072
1072
  this.evEl = It, this.evWin = Dt, le.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1073
1073
  }
1074
- w(ht, le, {
1074
+ E(ht, le, {
1075
1075
  /**
1076
1076
  * handle mouse events
1077
1077
  * @param {Object} ev
1078
1078
  */
1079
1079
  handler: function(i) {
1080
- var u = this.store, g = !1, T = !1, _ = i.type.toLowerCase().replace("ms", ""), k = Ft[_], ie = un[i.pointerType] || i.pointerType, ce = ie == K, ee = X(u, i.pointerId, "pointerId");
1081
- k & B && (i.button === 0 || i.button === 2 || ce) ? ee < 0 && (u.push(i), ee = u.length - 1) : k & (Z | Q) ? g = !0 : !ce && i.buttons === 0 && (g = !0, T = !0, k = Ft.pointerup), !(ee < 0) && (T || (u[ee] = i), this.callback(this.manager, k, {
1080
+ var u = this.store, g = !1, P = !1, _ = i.type.toLowerCase().replace("ms", ""), k = Ft[_], ie = un[i.pointerType] || i.pointerType, ce = ie == K, ee = X(u, i.pointerId, "pointerId");
1081
+ k & B && (i.button === 0 || i.button === 2 || ce) ? ee < 0 && (u.push(i), ee = u.length - 1) : k & (Z | Q) ? g = !0 : !ce && i.buttons === 0 && (g = !0, P = !0, k = Ft.pointerup), !(ee < 0) && (P || (u[ee] = i), this.callback(this.manager, k, {
1082
1082
  pointers: u,
1083
1083
  changedPointers: [i],
1084
1084
  pointerType: ie,
@@ -1095,7 +1095,7 @@ var Tt = (function(h, o, e, n) {
1095
1095
  function Nt() {
1096
1096
  this.evTarget = fn, this.evWin = hn, this.started = !1, le.apply(this, arguments);
1097
1097
  }
1098
- w(Nt, le, {
1098
+ E(Nt, le, {
1099
1099
  handler: function(i) {
1100
1100
  var u = cn[i.type];
1101
1101
  if (u === B && (this.started = !0), !!this.started) {
@@ -1119,10 +1119,10 @@ var Tt = (function(h, o, e, n) {
1119
1119
  touchend: Z,
1120
1120
  touchcancel: Q
1121
1121
  }, pn = "touchstart touchmove touchend touchcancel";
1122
- function $e() {
1122
+ function et() {
1123
1123
  this.evTarget = pn, this.targetIds = {}, le.apply(this, arguments);
1124
1124
  }
1125
- w($e, le, {
1125
+ E(et, le, {
1126
1126
  handler: function(i) {
1127
1127
  var u = vn[i.type], g = mn.call(this, i, u);
1128
1128
  g && this.callback(this.manager, u, {
@@ -1137,14 +1137,14 @@ var Tt = (function(h, o, e, n) {
1137
1137
  var u = $(a.touches), g = this.targetIds;
1138
1138
  if (i & (B | se) && u.length === 1)
1139
1139
  return g[u[0].identifier] = !0, [u, u];
1140
- var T, _, k = $(a.changedTouches), ie = [], ce = this.target;
1140
+ var P, _, k = $(a.changedTouches), ie = [], ce = this.target;
1141
1141
  if (_ = u.filter(function(ee) {
1142
1142
  return D(ee.target, ce);
1143
1143
  }), i === B)
1144
- for (T = 0; T < _.length; )
1145
- g[_[T].identifier] = !0, T++;
1146
- for (T = 0; T < k.length; )
1147
- g[k[T].identifier] && ie.push(k[T]), i & (Z | Q) && delete g[k[T].identifier], T++;
1144
+ for (P = 0; P < _.length; )
1145
+ g[_[P].identifier] = !0, P++;
1146
+ for (P = 0; P < k.length; )
1147
+ g[k[P].identifier] && ie.push(k[P]), i & (Z | Q) && delete g[k[P].identifier], P++;
1148
1148
  if (ie.length)
1149
1149
  return [
1150
1150
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -1156,9 +1156,9 @@ var Tt = (function(h, o, e, n) {
1156
1156
  function dt() {
1157
1157
  le.apply(this, arguments);
1158
1158
  var a = b(this.handler, this);
1159
- this.touch = new $e(this.manager, a), this.mouse = new Je(this.manager, a), this.primaryTouch = null, this.lastTouches = [];
1159
+ this.touch = new et(this.manager, a), this.mouse = new $e(this.manager, a), this.primaryTouch = null, this.lastTouches = [];
1160
1160
  }
1161
- w(dt, le, {
1161
+ E(dt, le, {
1162
1162
  /**
1163
1163
  * handle mouse and touch events
1164
1164
  * @param {Hammer} manager
@@ -1166,9 +1166,9 @@ var Tt = (function(h, o, e, n) {
1166
1166
  * @param {Object} inputData
1167
1167
  */
1168
1168
  handler: function(i, u, g) {
1169
- var T = g.pointerType == K, _ = g.pointerType == te;
1169
+ var P = g.pointerType == K, _ = g.pointerType == te;
1170
1170
  if (!(_ && g.sourceCapabilities && g.sourceCapabilities.firesTouchEvents)) {
1171
- if (T)
1171
+ if (P)
1172
1172
  yn.call(this, u, g);
1173
1173
  else if (_ && bn.call(this, g))
1174
1174
  return;
@@ -1190,22 +1190,22 @@ var Tt = (function(h, o, e, n) {
1190
1190
  if (i.identifier === this.primaryTouch) {
1191
1191
  var u = { x: i.clientX, y: i.clientY };
1192
1192
  this.lastTouches.push(u);
1193
- var g = this.lastTouches, T = function() {
1193
+ var g = this.lastTouches, P = function() {
1194
1194
  var _ = g.indexOf(u);
1195
1195
  _ > -1 && g.splice(_, 1);
1196
1196
  };
1197
- setTimeout(T, gn);
1197
+ setTimeout(P, gn);
1198
1198
  }
1199
1199
  }
1200
1200
  function bn(a) {
1201
1201
  for (var i = a.srcEvent.clientX, u = a.srcEvent.clientY, g = 0; g < this.lastTouches.length; g++) {
1202
- var T = this.lastTouches[g], _ = Math.abs(i - T.x), k = Math.abs(u - T.y);
1202
+ var P = this.lastTouches[g], _ = Math.abs(i - P.x), k = Math.abs(u - P.y);
1203
1203
  if (_ <= kt && k <= kt)
1204
1204
  return !0;
1205
1205
  }
1206
1206
  return !1;
1207
1207
  }
1208
- var Ut = r ? z(r.style, "touchAction") : n, Rt = Ut !== n, Vt = "compute", zt = "auto", vt = "manipulation", Ie = "none", ze = "pan-x", je = "pan-y", et = En();
1208
+ var Ut = r ? z(r.style, "touchAction") : n, Rt = Ut !== n, Vt = "compute", zt = "auto", vt = "manipulation", Ie = "none", ze = "pan-x", je = "pan-y", tt = En();
1209
1209
  function pt(a, i) {
1210
1210
  this.manager = a, this.set(i);
1211
1211
  }
@@ -1215,7 +1215,7 @@ var Tt = (function(h, o, e, n) {
1215
1215
  * @param {String} value
1216
1216
  */
1217
1217
  set: function(a) {
1218
- a == Vt && (a = this.compute()), Rt && this.manager.element.style && et[a] && (this.manager.element.style[Ut] = a), this.actions = a.toLowerCase().trim();
1218
+ a == Vt && (a = this.compute()), Rt && this.manager.element.style && tt[a] && (this.manager.element.style[Ut] = a), this.actions = a.toLowerCase().trim();
1219
1219
  },
1220
1220
  /**
1221
1221
  * just re-set the touchAction value
@@ -1229,8 +1229,8 @@ var Tt = (function(h, o, e, n) {
1229
1229
  */
1230
1230
  compute: function() {
1231
1231
  var a = [];
1232
- return A(this.manager.recognizers, function(i) {
1233
- M(i.options.enable, [i]) && (a = a.concat(i.getTouchAction()));
1232
+ return M(this.manager.recognizers, function(i) {
1233
+ T(i.options.enable, [i]) && (a = a.concat(i.getTouchAction()));
1234
1234
  }), wn(a.join(" "));
1235
1235
  },
1236
1236
  /**
@@ -1243,13 +1243,13 @@ var Tt = (function(h, o, e, n) {
1243
1243
  i.preventDefault();
1244
1244
  return;
1245
1245
  }
1246
- var g = this.actions, T = W(g, Ie) && !et[Ie], _ = W(g, je) && !et[je], k = W(g, ze) && !et[ze];
1247
- if (T) {
1246
+ var g = this.actions, P = W(g, Ie) && !tt[Ie], _ = W(g, je) && !tt[je], k = W(g, ze) && !tt[ze];
1247
+ if (P) {
1248
1248
  var ie = a.pointers.length === 1, ce = a.distance < 2, ee = a.deltaTime < 250;
1249
1249
  if (ie && ce && ee)
1250
1250
  return;
1251
1251
  }
1252
- if (!(k && _) && (T || _ && u & ue || k && u & de))
1252
+ if (!(k && _) && (P || _ && u & ue || k && u & de))
1253
1253
  return this.preventSrc(i);
1254
1254
  },
1255
1255
  /**
@@ -1274,9 +1274,9 @@ var Tt = (function(h, o, e, n) {
1274
1274
  a[u] = i ? h.CSS.supports("touch-action", u) : !0;
1275
1275
  }), a;
1276
1276
  }
1277
- var tt = 1, fe = 2, ke = 4, xe = 8, we = xe, Ge = 16, me = 32;
1277
+ var nt = 1, fe = 2, ke = 4, xe = 8, we = xe, Ge = 16, me = 32;
1278
1278
  function Ee(a) {
1279
- this.options = P({}, this.defaults, a || {}), this.id = I(), this.manager = null, this.options.enable = c(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1279
+ this.options = A({}, this.defaults, a || {}), this.id = I(), this.manager = null, this.options.enable = f(this.options.enable, !0), this.state = nt, this.simultaneous = {}, this.requireFail = [];
1280
1280
  }
1281
1281
  Ee.prototype = {
1282
1282
  /**
@@ -1290,7 +1290,7 @@ var Tt = (function(h, o, e, n) {
1290
1290
  * @return {Recognizer}
1291
1291
  */
1292
1292
  set: function(a) {
1293
- return P(this.options, a), this.manager && this.manager.touchAction.update(), this;
1293
+ return A(this.options, a), this.manager && this.manager.touchAction.update(), this;
1294
1294
  },
1295
1295
  /**
1296
1296
  * recognize simultaneous with an other recognizer.
@@ -1301,7 +1301,7 @@ var Tt = (function(h, o, e, n) {
1301
1301
  if (y(a, "recognizeWith", this))
1302
1302
  return this;
1303
1303
  var i = this.simultaneous;
1304
- return a = nt(a, this), i[a.id] || (i[a.id] = a, a.recognizeWith(this)), this;
1304
+ return a = rt(a, this), i[a.id] || (i[a.id] = a, a.recognizeWith(this)), this;
1305
1305
  },
1306
1306
  /**
1307
1307
  * drop the simultaneous link. it doesnt remove the link on the other recognizer.
@@ -1309,7 +1309,7 @@ var Tt = (function(h, o, e, n) {
1309
1309
  * @returns {Recognizer} this
1310
1310
  */
1311
1311
  dropRecognizeWith: function(a) {
1312
- return y(a, "dropRecognizeWith", this) ? this : (a = nt(a, this), delete this.simultaneous[a.id], this);
1312
+ return y(a, "dropRecognizeWith", this) ? this : (a = rt(a, this), delete this.simultaneous[a.id], this);
1313
1313
  },
1314
1314
  /**
1315
1315
  * recognizer can only run when an other is failing
@@ -1320,7 +1320,7 @@ var Tt = (function(h, o, e, n) {
1320
1320
  if (y(a, "requireFailure", this))
1321
1321
  return this;
1322
1322
  var i = this.requireFail;
1323
- return a = nt(a, this), X(i, a) === -1 && (i.push(a), a.requireFailure(this)), this;
1323
+ return a = rt(a, this), X(i, a) === -1 && (i.push(a), a.requireFailure(this)), this;
1324
1324
  },
1325
1325
  /**
1326
1326
  * drop the requireFailure link. it does not remove the link on the other recognizer.
@@ -1330,7 +1330,7 @@ var Tt = (function(h, o, e, n) {
1330
1330
  dropRequireFailure: function(a) {
1331
1331
  if (y(a, "dropRequireFailure", this))
1332
1332
  return this;
1333
- a = nt(a, this);
1333
+ a = rt(a, this);
1334
1334
  var i = X(this.requireFail, a);
1335
1335
  return i > -1 && this.requireFail.splice(i, 1), this;
1336
1336
  },
@@ -1356,8 +1356,8 @@ var Tt = (function(h, o, e, n) {
1356
1356
  */
1357
1357
  emit: function(a) {
1358
1358
  var i = this, u = this.state;
1359
- function g(T) {
1360
- i.manager.emit(T, a);
1359
+ function g(P) {
1360
+ i.manager.emit(P, a);
1361
1361
  }
1362
1362
  u < xe && g(i.options.event + jt(u)), g(i.options.event), a.additionalEvent && g(a.additionalEvent), u >= xe && g(i.options.event + jt(u));
1363
1363
  },
@@ -1378,7 +1378,7 @@ var Tt = (function(h, o, e, n) {
1378
1378
  */
1379
1379
  canEmit: function() {
1380
1380
  for (var a = 0; a < this.requireFail.length; ) {
1381
- if (!(this.requireFail[a].state & (me | tt)))
1381
+ if (!(this.requireFail[a].state & (me | nt)))
1382
1382
  return !1;
1383
1383
  a++;
1384
1384
  }
@@ -1389,12 +1389,12 @@ var Tt = (function(h, o, e, n) {
1389
1389
  * @param {Object} inputData
1390
1390
  */
1391
1391
  recognize: function(a) {
1392
- var i = P({}, a);
1393
- if (!M(this.options.enable, [this, i])) {
1392
+ var i = A({}, a);
1393
+ if (!T(this.options.enable, [this, i])) {
1394
1394
  this.reset(), this.state = me;
1395
1395
  return;
1396
1396
  }
1397
- this.state & (we | Ge | me) && (this.state = tt), this.state = this.process(i), this.state & (fe | ke | xe | Ge) && this.tryEmit(i);
1397
+ this.state & (we | Ge | me) && (this.state = nt), this.state = this.process(i), this.state & (fe | ke | xe | Ge) && this.tryEmit(i);
1398
1398
  },
1399
1399
  /**
1400
1400
  * return the state of the recognizer
@@ -1425,16 +1425,16 @@ var Tt = (function(h, o, e, n) {
1425
1425
  return a & Ge ? "cancel" : a & xe ? "end" : a & ke ? "move" : a & fe ? "start" : "";
1426
1426
  }
1427
1427
  function Gt(a) {
1428
- return a == Ae ? "down" : a == Le ? "up" : a == Pe ? "left" : a == Ce ? "right" : "";
1428
+ return a == Ae ? "down" : a == Le ? "up" : a == Me ? "left" : a == Ce ? "right" : "";
1429
1429
  }
1430
- function nt(a, i) {
1430
+ function rt(a, i) {
1431
1431
  var u = i.manager;
1432
1432
  return u ? u.get(a) : a;
1433
1433
  }
1434
1434
  function ve() {
1435
1435
  Ee.apply(this, arguments);
1436
1436
  }
1437
- w(ve, Ee, {
1437
+ E(ve, Ee, {
1438
1438
  /**
1439
1439
  * @namespace
1440
1440
  * @memberof AttrRecognizer
@@ -1463,14 +1463,14 @@ var Tt = (function(h, o, e, n) {
1463
1463
  * @returns {*} State
1464
1464
  */
1465
1465
  process: function(a) {
1466
- var i = this.state, u = a.eventType, g = i & (fe | ke), T = this.attrTest(a);
1467
- return g && (u & Q || !T) ? i | Ge : g || T ? u & Z ? i | xe : i & fe ? i | ke : fe : me;
1466
+ var i = this.state, u = a.eventType, g = i & (fe | ke), P = this.attrTest(a);
1467
+ return g && (u & Q || !P) ? i | Ge : g || P ? u & Z ? i | xe : i & fe ? i | ke : fe : me;
1468
1468
  }
1469
1469
  });
1470
- function rt() {
1470
+ function at() {
1471
1471
  ve.apply(this, arguments), this.pX = null, this.pY = null;
1472
1472
  }
1473
- w(rt, ve, {
1473
+ E(at, ve, {
1474
1474
  /**
1475
1475
  * @namespace
1476
1476
  * @memberof PanRecognizer
@@ -1486,8 +1486,8 @@ var Tt = (function(h, o, e, n) {
1486
1486
  return a & ue && i.push(je), a & de && i.push(ze), i;
1487
1487
  },
1488
1488
  directionTest: function(a) {
1489
- var i = this.options, u = !0, g = a.distance, T = a.direction, _ = a.deltaX, k = a.deltaY;
1490
- return T & i.direction || (i.direction & ue ? (T = _ === 0 ? Oe : _ < 0 ? Pe : Ce, u = _ != this.pX, g = Math.abs(a.deltaX)) : (T = k === 0 ? Oe : k < 0 ? Le : Ae, u = k != this.pY, g = Math.abs(a.deltaY))), a.direction = T, u && g > i.threshold && T & i.direction;
1489
+ var i = this.options, u = !0, g = a.distance, P = a.direction, _ = a.deltaX, k = a.deltaY;
1490
+ return P & i.direction || (i.direction & ue ? (P = _ === 0 ? Oe : _ < 0 ? Me : Ce, u = _ != this.pX, g = Math.abs(a.deltaX)) : (P = k === 0 ? Oe : k < 0 ? Le : Ae, u = k != this.pY, g = Math.abs(a.deltaY))), a.direction = P, u && g > i.threshold && P & i.direction;
1491
1491
  },
1492
1492
  attrTest: function(a) {
1493
1493
  return ve.prototype.attrTest.call(this, a) && (this.state & fe || !(this.state & fe) && this.directionTest(a));
@@ -1501,7 +1501,7 @@ var Tt = (function(h, o, e, n) {
1501
1501
  function mt() {
1502
1502
  ve.apply(this, arguments);
1503
1503
  }
1504
- w(mt, ve, {
1504
+ E(mt, ve, {
1505
1505
  /**
1506
1506
  * @namespace
1507
1507
  * @memberof PinchRecognizer
@@ -1528,7 +1528,7 @@ var Tt = (function(h, o, e, n) {
1528
1528
  function gt() {
1529
1529
  Ee.apply(this, arguments), this._timer = null, this._input = null;
1530
1530
  }
1531
- w(gt, Ee, {
1531
+ E(gt, Ee, {
1532
1532
  /**
1533
1533
  * @namespace
1534
1534
  * @memberof PressRecognizer
@@ -1545,8 +1545,8 @@ var Tt = (function(h, o, e, n) {
1545
1545
  return [zt];
1546
1546
  },
1547
1547
  process: function(a) {
1548
- var i = this.options, u = a.pointers.length === i.pointers, g = a.distance < i.threshold, T = a.deltaTime > i.time;
1549
- if (this._input = a, !g || !u || a.eventType & (Z | Q) && !T)
1548
+ var i = this.options, u = a.pointers.length === i.pointers, g = a.distance < i.threshold, P = a.deltaTime > i.time;
1549
+ if (this._input = a, !g || !u || a.eventType & (Z | Q) && !P)
1550
1550
  this.reset();
1551
1551
  else if (a.eventType & B)
1552
1552
  this.reset(), this._timer = m(function() {
@@ -1560,13 +1560,13 @@ var Tt = (function(h, o, e, n) {
1560
1560
  clearTimeout(this._timer);
1561
1561
  },
1562
1562
  emit: function(a) {
1563
- this.state === we && (a && a.eventType & Z ? this.manager.emit(this.options.event + "up", a) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
1563
+ this.state === we && (a && a.eventType & Z ? this.manager.emit(this.options.event + "up", a) : (this._input.timeStamp = c(), this.manager.emit(this.options.event, this._input)));
1564
1564
  }
1565
1565
  });
1566
1566
  function yt() {
1567
1567
  ve.apply(this, arguments);
1568
1568
  }
1569
- w(yt, ve, {
1569
+ E(yt, ve, {
1570
1570
  /**
1571
1571
  * @namespace
1572
1572
  * @memberof RotateRecognizer
@@ -1586,7 +1586,7 @@ var Tt = (function(h, o, e, n) {
1586
1586
  function bt() {
1587
1587
  ve.apply(this, arguments);
1588
1588
  }
1589
- w(bt, ve, {
1589
+ E(bt, ve, {
1590
1590
  /**
1591
1591
  * @namespace
1592
1592
  * @memberof SwipeRecognizer
@@ -1599,7 +1599,7 @@ var Tt = (function(h, o, e, n) {
1599
1599
  pointers: 1
1600
1600
  },
1601
1601
  getTouchAction: function() {
1602
- return rt.prototype.getTouchAction.call(this);
1602
+ return at.prototype.getTouchAction.call(this);
1603
1603
  },
1604
1604
  attrTest: function(a) {
1605
1605
  var i = this.options.direction, u;
@@ -1610,10 +1610,10 @@ var Tt = (function(h, o, e, n) {
1610
1610
  i && this.manager.emit(this.options.event + i, a), this.manager.emit(this.options.event, a);
1611
1611
  }
1612
1612
  });
1613
- function at() {
1613
+ function it() {
1614
1614
  Ee.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1615
1615
  }
1616
- w(at, Ee, {
1616
+ E(it, Ee, {
1617
1617
  /**
1618
1618
  * @namespace
1619
1619
  * @memberof PinchRecognizer
@@ -1635,13 +1635,13 @@ var Tt = (function(h, o, e, n) {
1635
1635
  return [vt];
1636
1636
  },
1637
1637
  process: function(a) {
1638
- var i = this.options, u = a.pointers.length === i.pointers, g = a.distance < i.threshold, T = a.deltaTime < i.time;
1638
+ var i = this.options, u = a.pointers.length === i.pointers, g = a.distance < i.threshold, P = a.deltaTime < i.time;
1639
1639
  if (this.reset(), a.eventType & B && this.count === 0)
1640
1640
  return this.failTimeout();
1641
- if (g && T && u) {
1641
+ if (g && P && u) {
1642
1642
  if (a.eventType != Z)
1643
1643
  return this.failTimeout();
1644
- var _ = this.pTime ? a.timeStamp - this.pTime < i.interval : !0, k = !this.pCenter || Qe(this.pCenter, a.center) < i.posThreshold;
1644
+ var _ = this.pTime ? a.timeStamp - this.pTime < i.interval : !0, k = !this.pCenter || Je(this.pCenter, a.center) < i.posThreshold;
1645
1645
  this.pTime = a.timeStamp, this.pCenter = a.center, !k || !_ ? this.count = 1 : this.count += 1, this._input = a;
1646
1646
  var ie = this.count % i.taps;
1647
1647
  if (ie === 0)
@@ -1664,7 +1664,7 @@ var Tt = (function(h, o, e, n) {
1664
1664
  }
1665
1665
  });
1666
1666
  function Be(a, i) {
1667
- return i = i || {}, i.recognizers = c(i.recognizers, Be.defaults.preset), new wt(a, i);
1667
+ return i = i || {}, i.recognizers = f(i.recognizers, Be.defaults.preset), new wt(a, i);
1668
1668
  }
1669
1669
  Be.VERSION = "2.0.7", Be.defaults = {
1670
1670
  /**
@@ -1710,9 +1710,9 @@ var Tt = (function(h, o, e, n) {
1710
1710
  [yt, { enable: !1 }],
1711
1711
  [mt, { enable: !1 }, ["rotate"]],
1712
1712
  [bt, { direction: ue }],
1713
- [rt, { direction: ue }, ["swipe"]],
1714
- [at],
1715
- [at, { event: "doubletap", taps: 2 }, ["tap"]],
1713
+ [at, { direction: ue }, ["swipe"]],
1714
+ [it],
1715
+ [it, { event: "doubletap", taps: 2 }, ["tap"]],
1716
1716
  [gt]
1717
1717
  ],
1718
1718
  /**
@@ -1764,7 +1764,7 @@ var Tt = (function(h, o, e, n) {
1764
1764
  };
1765
1765
  var Tn = 1, Yt = 2;
1766
1766
  function wt(a, i) {
1767
- this.options = P({}, Be.defaults, i || {}), this.options.inputTarget = this.options.inputTarget || a, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = a, this.input = Ke(this), this.touchAction = new pt(this, this.options.touchAction), Ht(this, !0), A(this.options.recognizers, function(u) {
1767
+ this.options = A({}, Be.defaults, i || {}), this.options.inputTarget = this.options.inputTarget || a, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = a, this.input = Ze(this), this.touchAction = new pt(this, this.options.touchAction), Ht(this, !0), M(this.options.recognizers, function(u) {
1768
1768
  var g = this.add(new u[0](u[1]));
1769
1769
  u[2] && g.recognizeWith(u[2]), u[3] && g.requireFailure(u[3]);
1770
1770
  }, this);
@@ -1776,7 +1776,7 @@ var Tt = (function(h, o, e, n) {
1776
1776
  * @returns {Manager}
1777
1777
  */
1778
1778
  set: function(a) {
1779
- return P(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this;
1779
+ return A(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this;
1780
1780
  },
1781
1781
  /**
1782
1782
  * stop recognizing for this session.
@@ -1797,12 +1797,12 @@ var Tt = (function(h, o, e, n) {
1797
1797
  var i = this.session;
1798
1798
  if (!i.stopped) {
1799
1799
  this.touchAction.preventDefaults(a);
1800
- var u, g = this.recognizers, T = i.curRecognizer;
1801
- (!T || T && T.state & we) && (T = i.curRecognizer = null);
1800
+ var u, g = this.recognizers, P = i.curRecognizer;
1801
+ (!P || P && P.state & we) && (P = i.curRecognizer = null);
1802
1802
  for (var _ = 0; _ < g.length; )
1803
1803
  u = g[_], i.stopped !== Yt && // 1
1804
- (!T || u == T || // 2
1805
- u.canRecognizeWith(T)) ? u.recognize(a) : u.reset(), !T && u.state & (fe | ke | xe) && (T = i.curRecognizer = u), _++;
1804
+ (!P || u == P || // 2
1805
+ u.canRecognizeWith(P)) ? u.recognize(a) : u.reset(), !P && u.state & (fe | ke | xe) && (P = i.curRecognizer = u), _++;
1806
1806
  }
1807
1807
  },
1808
1808
  /**
@@ -1853,7 +1853,7 @@ var Tt = (function(h, o, e, n) {
1853
1853
  on: function(a, i) {
1854
1854
  if (a !== n && i !== n) {
1855
1855
  var u = this.handlers;
1856
- return A(H(a), function(g) {
1856
+ return M(H(a), function(g) {
1857
1857
  u[g] = u[g] || [], u[g].push(i);
1858
1858
  }), this;
1859
1859
  }
@@ -1867,7 +1867,7 @@ var Tt = (function(h, o, e, n) {
1867
1867
  off: function(a, i) {
1868
1868
  if (a !== n) {
1869
1869
  var u = this.handlers;
1870
- return A(H(a), function(g) {
1870
+ return M(H(a), function(g) {
1871
1871
  i ? u[g] && u[g].splice(X(u[g], i), 1) : delete u[g];
1872
1872
  }), this;
1873
1873
  }
@@ -1878,7 +1878,7 @@ var Tt = (function(h, o, e, n) {
1878
1878
  * @param {Object} data
1879
1879
  */
1880
1880
  emit: function(a, i) {
1881
- this.options.domEvents && Mn(a, i);
1881
+ this.options.domEvents && Pn(a, i);
1882
1882
  var u = this.handlers[a] && this.handlers[a].slice();
1883
1883
  if (!(!u || !u.length)) {
1884
1884
  i.type = a, i.preventDefault = function() {
@@ -1900,21 +1900,21 @@ var Tt = (function(h, o, e, n) {
1900
1900
  var u = a.element;
1901
1901
  if (u.style) {
1902
1902
  var g;
1903
- A(a.options.cssProps, function(T, _) {
1904
- g = z(u.style, _), i ? (a.oldCssProps[g] = u.style[g], u.style[g] = T) : u.style[g] = a.oldCssProps[g] || "";
1903
+ M(a.options.cssProps, function(P, _) {
1904
+ g = z(u.style, _), i ? (a.oldCssProps[g] = u.style[g], u.style[g] = P) : u.style[g] = a.oldCssProps[g] || "";
1905
1905
  }), i || (a.oldCssProps = {});
1906
1906
  }
1907
1907
  }
1908
- function Mn(a, i) {
1909
- var u = o.createEvent("Event");
1908
+ function Pn(a, i) {
1909
+ var u = s.createEvent("Event");
1910
1910
  u.initEvent(a, !0, !0), u.gesture = i, i.target.dispatchEvent(u);
1911
1911
  }
1912
- return P(Be, {
1912
+ return A(Be, {
1913
1913
  INPUT_START: B,
1914
1914
  INPUT_MOVE: se,
1915
1915
  INPUT_END: Z,
1916
1916
  INPUT_CANCEL: Q,
1917
- STATE_POSSIBLE: tt,
1917
+ STATE_POSSIBLE: nt,
1918
1918
  STATE_BEGAN: fe,
1919
1919
  STATE_CHANGED: ke,
1920
1920
  STATE_ENDED: xe,
@@ -1922,7 +1922,7 @@ var Tt = (function(h, o, e, n) {
1922
1922
  STATE_CANCELLED: Ge,
1923
1923
  STATE_FAILED: me,
1924
1924
  DIRECTION_NONE: Oe,
1925
- DIRECTION_LEFT: Pe,
1925
+ DIRECTION_LEFT: Me,
1926
1926
  DIRECTION_RIGHT: Ce,
1927
1927
  DIRECTION_UP: Le,
1928
1928
  DIRECTION_DOWN: Ae,
@@ -1932,48 +1932,48 @@ var Tt = (function(h, o, e, n) {
1932
1932
  Manager: wt,
1933
1933
  Input: le,
1934
1934
  TouchAction: pt,
1935
- TouchInput: $e,
1936
- MouseInput: Je,
1935
+ TouchInput: et,
1936
+ MouseInput: $e,
1937
1937
  PointerEventInput: ht,
1938
1938
  TouchMouseInput: dt,
1939
1939
  SingleTouchInput: Nt,
1940
1940
  Recognizer: Ee,
1941
1941
  AttrRecognizer: ve,
1942
- Tap: at,
1943
- Pan: rt,
1942
+ Tap: it,
1943
+ Pan: at,
1944
1944
  Swipe: bt,
1945
1945
  Pinch: mt,
1946
1946
  Rotate: yt,
1947
1947
  Press: gt,
1948
1948
  on: O,
1949
1949
  off: S,
1950
- each: A,
1950
+ each: M,
1951
1951
  merge: C,
1952
1952
  extend: x,
1953
- assign: P,
1954
- inherit: w,
1953
+ assign: A,
1954
+ inherit: E,
1955
1955
  bindFn: b,
1956
1956
  prefixed: z
1957
1957
  }), Be;
1958
- })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = function(h, o) {
1959
- o === void 0 && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), o === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = h, this.domElement = o, this.enabled = !0, this.target = new ye(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: Se.ROTATE, MIDDLE: Se.DOLLY, RIGHT: Se.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
- return f.phi;
1958
+ })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), Ke = function(h, s) {
1959
+ s === void 0 && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), s === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = h, this.domElement = s, this.enabled = !0, this.target = new ye(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: Se.ROTATE, MIDDLE: Se.DOLLY, RIGHT: Se.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
+ return c.phi;
1961
1961
  }, this.getAzimuthalAngle = function() {
1962
- return f.theta;
1962
+ return c.theta;
1963
1963
  }, this.saveState = function() {
1964
1964
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
1965
1965
  }, this.reset = function() {
1966
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(n), e.update(), l = s.NONE;
1966
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(n), e.update(), o = l.NONE;
1967
1967
  }, this.update = (function() {
1968
1968
  var v = new ye(), R = new Xt().setFromUnitVectors(h.up, new ye(0, 1, 0)), J = R.clone().inverse(), re = new ye(), pe = new Xt();
1969
1969
  return function() {
1970
1970
  var be = e.object.position;
1971
- return v.copy(be).sub(e.target), v.applyQuaternion(R), f.setFromVector3(v), e.autoRotate && l === s.NONE && H(D()), e.enableDamping ? (f.theta += m.theta * e.dampingFactor, f.phi += m.phi * e.dampingFactor) : (f.theta += m.theta, f.phi += m.phi), f.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, f.theta)), f.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, f.phi)), f.makeSafe(), f.radius *= y, f.radius = Math.max(e.minDistance, Math.min(e.maxDistance, f.radius)), e.enableDamping === !0 ? e.target.addScaledVector(A, e.dampingFactor) : e.target.add(A), v.setFromSpherical(f), v.applyQuaternion(J), be.copy(e.target).add(v), e.object.lookAt(e.target), e.enableDamping === !0 ? (m.theta *= 1 - e.dampingFactor, m.phi *= 1 - e.dampingFactor, A.multiplyScalar(1 - e.dampingFactor)) : (m.set(0, 0, 0), A.set(0, 0, 0)), y = 1, E || re.distanceToSquared(e.object.position) > d || 8 * (1 - pe.dot(e.object.quaternion)) > d ? (e.dispatchEvent(n), re.copy(e.object.position), pe.copy(e.object.quaternion), E = !1, !0) : !1;
1971
+ return v.copy(be).sub(e.target), v.applyQuaternion(R), c.setFromVector3(v), e.autoRotate && o === l.NONE && H(D()), e.enableDamping ? (c.theta += m.theta * e.dampingFactor, c.phi += m.phi * e.dampingFactor) : (c.theta += m.theta, c.phi += m.phi), c.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), c.radius *= y, c.radius = Math.max(e.minDistance, Math.min(e.maxDistance, c.radius)), e.enableDamping === !0 ? e.target.addScaledVector(M, e.dampingFactor) : e.target.add(M), v.setFromSpherical(c), v.applyQuaternion(J), be.copy(e.target).add(v), e.object.lookAt(e.target), e.enableDamping === !0 ? (m.theta *= 1 - e.dampingFactor, m.phi *= 1 - e.dampingFactor, M.multiplyScalar(1 - e.dampingFactor)) : (m.set(0, 0, 0), M.set(0, 0, 0)), y = 1, w || re.distanceToSquared(e.object.position) > d || 8 * (1 - pe.dot(e.object.quaternion)) > d ? (e.dispatchEvent(n), re.copy(e.object.position), pe.copy(e.object.quaternion), w = !1, !0) : !1;
1972
1972
  };
1973
1973
  })(), this.dispose = function() {
1974
- e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", Ae, !1), e.domElement.removeEventListener("wheel", Ue, !1), e.domElement.removeEventListener("touchstart", Fe, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", le, !1), document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.domElement.removeEventListener("keydown", Re, !1);
1974
+ e.domElement.removeEventListener("contextmenu", Qe, !1), e.domElement.removeEventListener("mousedown", Ae, !1), e.domElement.removeEventListener("wheel", Ue, !1), e.domElement.removeEventListener("touchstart", Fe, !1), e.domElement.removeEventListener("touchend", Ze, !1), e.domElement.removeEventListener("touchmove", le, !1), document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.domElement.removeEventListener("keydown", Re, !1);
1975
1975
  };
1976
- var e = this, n = { type: "change" }, t = { type: "start" }, r = { type: "end" }, s = {
1976
+ var e = this, n = { type: "change" }, t = { type: "start" }, r = { type: "end" }, l = {
1977
1977
  NONE: -1,
1978
1978
  ROTATE: 0,
1979
1979
  DOLLY: 1,
@@ -1982,7 +1982,7 @@ var Tt = (function(h, o, e, n) {
1982
1982
  TOUCH_PAN: 4,
1983
1983
  TOUCH_DOLLY_PAN: 5,
1984
1984
  TOUCH_DOLLY_ROTATE: 6
1985
- }, l = s.NONE, d = 1e-6, f = new Wt(), m = new Wt(), y = 1, A = new ye(), E = !1, P = new Te(), x = new Te(), C = new Te(), w = new Te(), b = new Te(), M = new Te(), c = new Te(), O = new Te(), S = new Te();
1985
+ }, o = l.NONE, d = 1e-6, c = new Wt(), m = new Wt(), y = 1, M = new ye(), w = !1, A = new Te(), x = new Te(), C = new Te(), E = new Te(), b = new Te(), T = new Te(), f = new Te(), O = new Te(), S = new Te();
1986
1986
  function D() {
1987
1987
  return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
1988
1988
  }
@@ -1998,12 +1998,12 @@ var Tt = (function(h, o, e, n) {
1998
1998
  var $ = (function() {
1999
1999
  var v = new ye();
2000
2000
  return function(J, re) {
2001
- v.setFromMatrixColumn(re, 0), v.multiplyScalar(-J), A.add(v);
2001
+ v.setFromMatrixColumn(re, 0), v.multiplyScalar(-J), M.add(v);
2002
2002
  };
2003
2003
  })(), ae = (function() {
2004
2004
  var v = new ye();
2005
2005
  return function(J, re) {
2006
- e.screenSpacePanning === !0 ? v.setFromMatrixColumn(re, 1) : (v.setFromMatrixColumn(re, 0), v.crossVectors(e.object.up, v)), v.multiplyScalar(J), A.add(v);
2006
+ e.screenSpacePanning === !0 ? v.setFromMatrixColumn(re, 1) : (v.setFromMatrixColumn(re, 0), v.crossVectors(e.object.up, v)), v.multiplyScalar(J), M.add(v);
2007
2007
  };
2008
2008
  })(), z = (function() {
2009
2009
  var v = new ye();
@@ -2018,30 +2018,30 @@ var Tt = (function(h, o, e, n) {
2018
2018
  };
2019
2019
  })();
2020
2020
  function q(v) {
2021
- e.object.isPerspectiveCamera ? y /= v : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * v)), e.object.updateProjectionMatrix(), E = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2021
+ e.object.isPerspectiveCamera ? y /= v : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * v)), e.object.updateProjectionMatrix(), w = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2022
2022
  }
2023
2023
  function I(v) {
2024
- e.object.isPerspectiveCamera ? y *= v : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / v)), e.object.updateProjectionMatrix(), E = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2024
+ e.object.isPerspectiveCamera ? y *= v : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / v)), e.object.updateProjectionMatrix(), w = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2025
2025
  }
2026
2026
  function L(v) {
2027
- P.set(v.clientX, v.clientY);
2027
+ A.set(v.clientX, v.clientY);
2028
2028
  }
2029
2029
  function F(v) {
2030
- c.set(v.clientX, v.clientY);
2030
+ f.set(v.clientX, v.clientY);
2031
2031
  }
2032
2032
  function N(v) {
2033
- w.set(v.clientX, v.clientY);
2033
+ E.set(v.clientX, v.clientY);
2034
2034
  }
2035
2035
  function j(v) {
2036
- x.set(v.clientX, v.clientY), C.subVectors(x, P).multiplyScalar(e.rotateSpeed);
2036
+ x.set(v.clientX, v.clientY), C.subVectors(x, A).multiplyScalar(e.rotateSpeed);
2037
2037
  var R = e.domElement;
2038
- H(2 * Math.PI * C.x / R.clientHeight), X(2 * Math.PI * C.y / R.clientHeight), P.copy(x), e.update();
2038
+ H(2 * Math.PI * C.x / R.clientHeight), X(2 * Math.PI * C.y / R.clientHeight), A.copy(x), e.update();
2039
2039
  }
2040
2040
  function ne(v) {
2041
- O.set(v.clientX, v.clientY), S.subVectors(O, c), S.y > 0 ? q(W()) : S.y < 0 && I(W()), c.copy(O), e.update();
2041
+ O.set(v.clientX, v.clientY), S.subVectors(O, f), S.y > 0 ? q(W()) : S.y < 0 && I(W()), f.copy(O), e.update();
2042
2042
  }
2043
2043
  function K(v) {
2044
- b.set(v.clientX, v.clientY), M.subVectors(b, w).multiplyScalar(e.panSpeed), z(M.x, M.y), w.copy(b), e.update();
2044
+ b.set(v.clientX, v.clientY), T.subVectors(b, E).multiplyScalar(e.panSpeed), z(T.x, T.y), E.copy(b), e.update();
2045
2045
  }
2046
2046
  function U(v) {
2047
2047
  v.deltaY < 0 ? I(W()) : v.deltaY > 0 && q(W()), e.update();
@@ -2066,23 +2066,23 @@ var Tt = (function(h, o, e, n) {
2066
2066
  }
2067
2067
  function Y(v) {
2068
2068
  if (v.touches.length == 1)
2069
- P.set(v.touches[0].pageX, v.touches[0].pageY);
2069
+ A.set(v.touches[0].pageX, v.touches[0].pageY);
2070
2070
  else {
2071
2071
  var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2072
- P.set(R, J);
2072
+ A.set(R, J);
2073
2073
  }
2074
2074
  }
2075
2075
  function G(v) {
2076
2076
  if (v.touches.length == 1)
2077
- w.set(v.touches[0].pageX, v.touches[0].pageY);
2077
+ E.set(v.touches[0].pageX, v.touches[0].pageY);
2078
2078
  else {
2079
2079
  var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2080
- w.set(R, J);
2080
+ E.set(R, J);
2081
2081
  }
2082
2082
  }
2083
2083
  function B(v) {
2084
2084
  var R = v.touches[0].pageX - v.touches[1].pageX, J = v.touches[0].pageY - v.touches[1].pageY, re = Math.sqrt(R * R + J * J);
2085
- c.set(0, re);
2085
+ f.set(0, re);
2086
2086
  }
2087
2087
  function se(v) {
2088
2088
  e.enableZoom && B(v), e.enablePan && G(v);
@@ -2097,9 +2097,9 @@ var Tt = (function(h, o, e, n) {
2097
2097
  var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2098
2098
  x.set(R, J);
2099
2099
  }
2100
- C.subVectors(x, P).multiplyScalar(e.rotateSpeed);
2100
+ C.subVectors(x, A).multiplyScalar(e.rotateSpeed);
2101
2101
  var re = e.domElement;
2102
- H(2 * Math.PI * C.x / re.clientHeight), X(2 * Math.PI * C.y / re.clientHeight), P.copy(x);
2102
+ H(2 * Math.PI * C.x / re.clientHeight), X(2 * Math.PI * C.y / re.clientHeight), A.copy(x);
2103
2103
  }
2104
2104
  function Oe(v) {
2105
2105
  if (v.touches.length == 1)
@@ -2108,17 +2108,17 @@ var Tt = (function(h, o, e, n) {
2108
2108
  var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2109
2109
  b.set(R, J);
2110
2110
  }
2111
- M.subVectors(b, w).multiplyScalar(e.panSpeed), z(M.x, M.y), w.copy(b);
2111
+ T.subVectors(b, E).multiplyScalar(e.panSpeed), z(T.x, T.y), E.copy(b);
2112
2112
  }
2113
- function Pe(v) {
2113
+ function Me(v) {
2114
2114
  var R = v.touches[0].pageX - v.touches[1].pageX, J = v.touches[0].pageY - v.touches[1].pageY, re = Math.sqrt(R * R + J * J);
2115
- O.set(0, re), S.set(0, Math.pow(O.y / c.y, e.zoomSpeed)), q(S.y), c.copy(O);
2115
+ O.set(0, re), S.set(0, Math.pow(O.y / f.y, e.zoomSpeed)), q(S.y), f.copy(O);
2116
2116
  }
2117
2117
  function Ce(v) {
2118
- e.enableZoom && Pe(v), e.enablePan && Oe(v);
2118
+ e.enableZoom && Me(v), e.enablePan && Oe(v);
2119
2119
  }
2120
2120
  function Le(v) {
2121
- e.enableZoom && Pe(v), e.enableRotate && Q(v);
2121
+ e.enableZoom && Me(v), e.enableRotate && Q(v);
2122
2122
  }
2123
2123
  function Ae(v) {
2124
2124
  if (e.enabled !== !1) {
@@ -2140,54 +2140,54 @@ var Tt = (function(h, o, e, n) {
2140
2140
  switch (R) {
2141
2141
  case Se.DOLLY:
2142
2142
  if (e.enableZoom === !1) return;
2143
- F(v), l = s.DOLLY;
2143
+ F(v), o = l.DOLLY;
2144
2144
  break;
2145
2145
  case Se.ROTATE:
2146
2146
  if (v.ctrlKey || v.metaKey || v.shiftKey) {
2147
2147
  if (e.enablePan === !1) return;
2148
- N(v), l = s.PAN;
2148
+ N(v), o = l.PAN;
2149
2149
  } else {
2150
2150
  if (e.enableRotate === !1) return;
2151
- L(v), l = s.ROTATE;
2151
+ L(v), o = l.ROTATE;
2152
2152
  }
2153
2153
  break;
2154
2154
  case Se.PAN:
2155
2155
  if (v.ctrlKey || v.metaKey || v.shiftKey) {
2156
2156
  if (e.enableRotate === !1) return;
2157
- L(v), l = s.ROTATE;
2157
+ L(v), o = l.ROTATE;
2158
2158
  } else {
2159
2159
  if (e.enablePan === !1) return;
2160
- N(v), l = s.PAN;
2160
+ N(v), o = l.PAN;
2161
2161
  }
2162
2162
  break;
2163
2163
  default:
2164
- l = s.NONE;
2164
+ o = l.NONE;
2165
2165
  }
2166
- l !== s.NONE && (document.addEventListener("mousemove", ue, !1), document.addEventListener("mouseup", de, !1), e.dispatchEvent(t));
2166
+ o !== l.NONE && (document.addEventListener("mousemove", ue, !1), document.addEventListener("mouseup", de, !1), e.dispatchEvent(t));
2167
2167
  }
2168
2168
  }
2169
2169
  function ue(v) {
2170
2170
  if (e.enabled !== !1)
2171
- switch (v.preventDefault(), l) {
2172
- case s.ROTATE:
2171
+ switch (v.preventDefault(), o) {
2172
+ case l.ROTATE:
2173
2173
  if (e.enableRotate === !1) return;
2174
2174
  j(v);
2175
2175
  break;
2176
- case s.DOLLY:
2176
+ case l.DOLLY:
2177
2177
  if (e.enableZoom === !1) return;
2178
2178
  ne(v);
2179
2179
  break;
2180
- case s.PAN:
2180
+ case l.PAN:
2181
2181
  if (e.enablePan === !1) return;
2182
2182
  K(v);
2183
2183
  break;
2184
2184
  }
2185
2185
  }
2186
2186
  function de(v) {
2187
- e.enabled !== !1 && (document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.dispatchEvent(r), l = s.NONE);
2187
+ e.enabled !== !1 && (document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.dispatchEvent(r), o = l.NONE);
2188
2188
  }
2189
2189
  function Ue(v) {
2190
- e.enabled === !1 || e.enableZoom === !1 || l !== s.NONE && l !== s.ROTATE || (v.preventDefault(), v.stopPropagation(), e.dispatchEvent(t), U(v), e.dispatchEvent(r));
2190
+ e.enabled === !1 || e.enableZoom === !1 || o !== l.NONE && o !== l.ROTATE || (v.preventDefault(), v.stopPropagation(), e.dispatchEvent(t), U(v), e.dispatchEvent(r));
2191
2191
  }
2192
2192
  function Re(v) {
2193
2193
  e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || te(v);
@@ -2199,181 +2199,181 @@ var Tt = (function(h, o, e, n) {
2199
2199
  switch (e.touches.ONE) {
2200
2200
  case _e.ROTATE:
2201
2201
  if (e.enableRotate === !1) return;
2202
- Y(v), l = s.TOUCH_ROTATE;
2202
+ Y(v), o = l.TOUCH_ROTATE;
2203
2203
  break;
2204
2204
  case _e.PAN:
2205
2205
  if (e.enablePan === !1) return;
2206
- G(v), l = s.TOUCH_PAN;
2206
+ G(v), o = l.TOUCH_PAN;
2207
2207
  break;
2208
2208
  default:
2209
- l = s.NONE;
2209
+ o = l.NONE;
2210
2210
  }
2211
2211
  break;
2212
2212
  case 2:
2213
2213
  switch (e.touches.TWO) {
2214
2214
  case _e.DOLLY_PAN:
2215
2215
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2216
- se(v), l = s.TOUCH_DOLLY_PAN;
2216
+ se(v), o = l.TOUCH_DOLLY_PAN;
2217
2217
  break;
2218
2218
  case _e.DOLLY_ROTATE:
2219
2219
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2220
- Z(v), l = s.TOUCH_DOLLY_ROTATE;
2220
+ Z(v), o = l.TOUCH_DOLLY_ROTATE;
2221
2221
  break;
2222
2222
  default:
2223
- l = s.NONE;
2223
+ o = l.NONE;
2224
2224
  }
2225
2225
  break;
2226
2226
  default:
2227
- l = s.NONE;
2227
+ o = l.NONE;
2228
2228
  }
2229
- l !== s.NONE && e.dispatchEvent(t);
2229
+ o !== l.NONE && e.dispatchEvent(t);
2230
2230
  }
2231
2231
  }
2232
2232
  function le(v) {
2233
2233
  if (e.enabled !== !1)
2234
- switch (v.preventDefault(), v.stopPropagation(), l) {
2235
- case s.TOUCH_ROTATE:
2234
+ switch (v.preventDefault(), v.stopPropagation(), o) {
2235
+ case l.TOUCH_ROTATE:
2236
2236
  if (e.enableRotate === !1) return;
2237
2237
  Q(v), e.update();
2238
2238
  break;
2239
- case s.TOUCH_PAN:
2239
+ case l.TOUCH_PAN:
2240
2240
  if (e.enablePan === !1) return;
2241
2241
  Oe(v), e.update();
2242
2242
  break;
2243
- case s.TOUCH_DOLLY_PAN:
2243
+ case l.TOUCH_DOLLY_PAN:
2244
2244
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2245
2245
  Ce(v), e.update();
2246
2246
  break;
2247
- case s.TOUCH_DOLLY_ROTATE:
2247
+ case l.TOUCH_DOLLY_ROTATE:
2248
2248
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2249
2249
  Le(v), e.update();
2250
2250
  break;
2251
2251
  default:
2252
- l = s.NONE;
2252
+ o = l.NONE;
2253
2253
  }
2254
2254
  }
2255
- function Ke(v) {
2256
- e.enabled !== !1 && (e.dispatchEvent(r), l = s.NONE);
2257
- }
2258
2255
  function Ze(v) {
2256
+ e.enabled !== !1 && (e.dispatchEvent(r), o = l.NONE);
2257
+ }
2258
+ function Qe(v) {
2259
2259
  e.enabled !== !1 && v.preventDefault();
2260
2260
  }
2261
- e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", Ae, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Fe, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", le, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2261
+ e.domElement.addEventListener("contextmenu", Qe, !1), e.domElement.addEventListener("mousedown", Ae, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Fe, !1), e.domElement.addEventListener("touchend", Ze, !1), e.domElement.addEventListener("touchmove", le, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2262
2262
  };
2263
- qe.prototype = Object.create(Jt.prototype);
2264
- qe.prototype.constructor = qe;
2265
- var _t = function(h, o) {
2266
- qe.call(this, h, o), this.mouseButtons.LEFT = Se.PAN, this.mouseButtons.RIGHT = Se.ROTATE, this.touches.ONE = _e.PAN, this.touches.TWO = _e.DOLLY_ROTATE;
2263
+ Ke.prototype = Object.create(Jt.prototype);
2264
+ Ke.prototype.constructor = Ke;
2265
+ var _t = function(h, s) {
2266
+ Ke.call(this, h, s), this.mouseButtons.LEFT = Se.PAN, this.mouseButtons.RIGHT = Se.ROTATE, this.touches.ONE = _e.PAN, this.touches.TWO = _e.DOLLY_ROTATE;
2267
2267
  };
2268
2268
  _t.prototype = Object.create(Jt.prototype);
2269
2269
  _t.prototype.constructor = _t;
2270
- var Me = function(h) {
2270
+ var Pe = function(h) {
2271
2271
  $t.call(this), this.element = h, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2272
- this.traverse(function(o) {
2273
- o.element instanceof Element && o.element.parentNode !== null && o.element.parentNode.removeChild(o.element);
2272
+ this.traverse(function(s) {
2273
+ s.element instanceof Element && s.element.parentNode !== null && s.element.parentNode.removeChild(s.element);
2274
2274
  });
2275
2275
  });
2276
2276
  };
2277
- Me.prototype = Object.create($t.prototype);
2278
- Me.prototype.constructor = Me;
2279
- var ut = function(h) {
2280
- Me.call(this, h);
2277
+ Pe.prototype = Object.create($t.prototype);
2278
+ Pe.prototype.constructor = Pe;
2279
+ var ct = function(h) {
2280
+ Pe.call(this, h);
2281
2281
  };
2282
- ut.prototype = Object.create(Me.prototype);
2283
- ut.prototype.constructor = ut;
2282
+ ct.prototype = Object.create(Pe.prototype);
2283
+ ct.prototype.constructor = ct;
2284
2284
  var zn = function() {
2285
- var h = this, o, e, n, t, r = new Sn(), s = {
2285
+ var h = this, s, e, n, t, r = new Sn(), l = {
2286
2286
  camera: { fov: 0, style: "" },
2287
2287
  objects: /* @__PURE__ */ new WeakMap()
2288
- }, l = document.createElement("div");
2289
- l.style.overflow = "hidden", this.domElement = l;
2288
+ }, o = document.createElement("div");
2289
+ o.style.overflow = "hidden", this.domElement = o;
2290
2290
  var d = document.createElement("div");
2291
- d.style.WebkitTransformStyle = "preserve-3d", d.style.transformStyle = "preserve-3d", d.style.pointerEvents = "none", l.appendChild(d);
2292
- var f = /Trident/i.test(navigator.userAgent);
2291
+ d.style.WebkitTransformStyle = "preserve-3d", d.style.transformStyle = "preserve-3d", d.style.pointerEvents = "none", o.appendChild(d);
2292
+ var c = /Trident/i.test(navigator.userAgent);
2293
2293
  this.getSize = function() {
2294
2294
  return {
2295
- width: o,
2295
+ width: s,
2296
2296
  height: e
2297
2297
  };
2298
- }, this.setSize = function(w, b) {
2299
- o = w, e = b, n = o / 2, t = e / 2, l.style.width = w + "px", l.style.height = b + "px", d.style.width = w + "px", d.style.height = b + "px";
2298
+ }, this.setSize = function(E, b) {
2299
+ s = E, e = b, n = s / 2, t = e / 2, o.style.width = E + "px", o.style.height = b + "px", d.style.width = E + "px", d.style.height = b + "px";
2300
2300
  };
2301
- function m(w) {
2302
- return Math.abs(w) < 1e-10 ? 0 : w;
2301
+ function m(E) {
2302
+ return Math.abs(E) < 1e-10 ? 0 : E;
2303
2303
  }
2304
- function y(w) {
2305
- var b = w.elements;
2304
+ function y(E) {
2305
+ var b = E.elements;
2306
2306
  return "matrix3d(" + m(b[0]) + "," + m(-b[1]) + "," + m(b[2]) + "," + m(b[3]) + "," + m(b[4]) + "," + m(-b[5]) + "," + m(b[6]) + "," + m(b[7]) + "," + m(b[8]) + "," + m(-b[9]) + "," + m(b[10]) + "," + m(b[11]) + "," + m(b[12]) + "," + m(-b[13]) + "," + m(b[14]) + "," + m(b[15]) + ")";
2307
2307
  }
2308
- function A(w, b) {
2309
- var M = w.elements, c = "matrix3d(" + m(M[0]) + "," + m(M[1]) + "," + m(M[2]) + "," + m(M[3]) + "," + m(-M[4]) + "," + m(-M[5]) + "," + m(-M[6]) + "," + m(-M[7]) + "," + m(M[8]) + "," + m(M[9]) + "," + m(M[10]) + "," + m(M[11]) + "," + m(M[12]) + "," + m(M[13]) + "," + m(M[14]) + "," + m(M[15]) + ")";
2310
- return f ? "translate(-50%,-50%)translate(" + n + "px," + t + "px)" + b + c : "translate(-50%,-50%)" + c;
2308
+ function M(E, b) {
2309
+ var T = E.elements, f = "matrix3d(" + m(T[0]) + "," + m(T[1]) + "," + m(T[2]) + "," + m(T[3]) + "," + m(-T[4]) + "," + m(-T[5]) + "," + m(-T[6]) + "," + m(-T[7]) + "," + m(T[8]) + "," + m(T[9]) + "," + m(T[10]) + "," + m(T[11]) + "," + m(T[12]) + "," + m(T[13]) + "," + m(T[14]) + "," + m(T[15]) + ")";
2310
+ return c ? "translate(-50%,-50%)translate(" + n + "px," + t + "px)" + b + f : "translate(-50%,-50%)" + f;
2311
2311
  }
2312
- function E(w, b, M, c) {
2313
- if (w instanceof Me) {
2314
- w.onBeforeRender(h, b, M);
2312
+ function w(E, b, T, f) {
2313
+ if (E instanceof Pe) {
2314
+ E.onBeforeRender(h, b, T);
2315
2315
  var O;
2316
- w instanceof ut ? (r.copy(M.matrixWorldInverse), r.transpose(), r.copyPosition(w.matrixWorld), r.scale(w.scale), r.elements[3] = 0, r.elements[7] = 0, r.elements[11] = 0, r.elements[15] = 1, O = A(r, c)) : O = A(w.matrixWorld, c);
2317
- var S = w.element, D = s.objects.get(w);
2316
+ E instanceof ct ? (r.copy(T.matrixWorldInverse), r.transpose(), r.copyPosition(E.matrixWorld), r.scale(E.scale), r.elements[3] = 0, r.elements[7] = 0, r.elements[11] = 0, r.elements[15] = 1, O = M(r, f)) : O = M(E.matrixWorld, f);
2317
+ var S = E.element, D = l.objects.get(E);
2318
2318
  if (D === void 0 || D.style !== O) {
2319
2319
  S.style.WebkitTransform = O, S.style.transform = O;
2320
2320
  var W = { style: O };
2321
- f && (W.distanceToCameraSquared = P(M, w)), s.objects.set(w, W);
2321
+ c && (W.distanceToCameraSquared = A(T, E)), l.objects.set(E, W);
2322
2322
  }
2323
- S.style.display = w.visible ? "" : "none", S.parentNode !== d && d.appendChild(S), w.onAfterRender(h, b, M);
2323
+ S.style.display = E.visible ? "" : "none", S.parentNode !== d && d.appendChild(S), E.onAfterRender(h, b, T);
2324
2324
  }
2325
- for (var H = 0, X = w.children.length; H < X; H++)
2326
- E(w.children[H], b, M, c);
2325
+ for (var H = 0, X = E.children.length; H < X; H++)
2326
+ w(E.children[H], b, T, f);
2327
2327
  }
2328
- var P = (function() {
2329
- var w = new ye(), b = new ye();
2330
- return function(M, c) {
2331
- return w.setFromMatrixPosition(M.matrixWorld), b.setFromMatrixPosition(c.matrixWorld), w.distanceToSquared(b);
2328
+ var A = (function() {
2329
+ var E = new ye(), b = new ye();
2330
+ return function(T, f) {
2331
+ return E.setFromMatrixPosition(T.matrixWorld), b.setFromMatrixPosition(f.matrixWorld), E.distanceToSquared(b);
2332
2332
  };
2333
2333
  })();
2334
- function x(w) {
2334
+ function x(E) {
2335
2335
  var b = [];
2336
- return w.traverse(function(M) {
2337
- M instanceof Me && b.push(M);
2336
+ return E.traverse(function(T) {
2337
+ T instanceof Pe && b.push(T);
2338
2338
  }), b;
2339
2339
  }
2340
- function C(w) {
2341
- for (var b = x(w).sort(function(S, D) {
2342
- var W = s.objects.get(S).distanceToCameraSquared, H = s.objects.get(D).distanceToCameraSquared;
2340
+ function C(E) {
2341
+ for (var b = x(E).sort(function(S, D) {
2342
+ var W = l.objects.get(S).distanceToCameraSquared, H = l.objects.get(D).distanceToCameraSquared;
2343
2343
  return W - H;
2344
- }), M = b.length, c = 0, O = b.length; c < O; c++)
2345
- b[c].element.style.zIndex = M - c;
2344
+ }), T = b.length, f = 0, O = b.length; f < O; f++)
2345
+ b[f].element.style.zIndex = T - f;
2346
2346
  }
2347
- this.render = function(w, b) {
2348
- var M = b.projectionMatrix.elements[5] * t;
2349
- if (s.camera.fov !== M && (b.isPerspectiveCamera ? (l.style.WebkitPerspective = M + "px", l.style.perspective = M + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), s.camera.fov = M), w.autoUpdate === !0 && w.updateMatrixWorld(), b.parent === null && b.updateMatrixWorld(), b.isOrthographicCamera)
2350
- var c = -(b.right + b.left) / 2, O = (b.top + b.bottom) / 2;
2351
- var S = b.isOrthographicCamera ? "scale(" + M + ")translate(" + m(c) + "px," + m(O) + "px)" + y(b.matrixWorldInverse) : "translateZ(" + M + "px)" + y(b.matrixWorldInverse), D = S + "translate(" + n + "px," + t + "px)";
2352
- s.camera.style !== D && !f && (d.style.WebkitTransform = D, d.style.transform = D, s.camera.style = D), E(w, w, b, S), f && C(w);
2347
+ this.render = function(E, b) {
2348
+ var T = b.projectionMatrix.elements[5] * t;
2349
+ if (l.camera.fov !== T && (b.isPerspectiveCamera ? (o.style.WebkitPerspective = T + "px", o.style.perspective = T + "px") : (o.style.WebkitPerspective = "", o.style.perspective = ""), l.camera.fov = T), E.autoUpdate === !0 && E.updateMatrixWorld(), b.parent === null && b.updateMatrixWorld(), b.isOrthographicCamera)
2350
+ var f = -(b.right + b.left) / 2, O = (b.top + b.bottom) / 2;
2351
+ var S = b.isOrthographicCamera ? "scale(" + T + ")translate(" + m(f) + "px," + m(O) + "px)" + y(b.matrixWorldInverse) : "translateZ(" + T + "px)" + y(b.matrixWorldInverse), D = S + "translate(" + n + "px," + t + "px)";
2352
+ l.camera.style !== D && !c && (d.style.WebkitTransform = D, d.style.transform = D, l.camera.style = D), w(E, E, b, S), c && C(E);
2353
2353
  };
2354
2354
  };
2355
- function Zt(h, o, e) {
2356
- var n = o.getBoundingClientRect(), t = n.top, r = n.left, s = n.width, l = n.height;
2357
- return new p.Vector2((h.x - r) / s * 2 - 1, -(h.y - t) / l * 2 + 1);
2355
+ function Zt(h, s, e) {
2356
+ var n = s.getBoundingClientRect(), t = n.top, r = n.left, l = n.width, o = n.height;
2357
+ return new p.Vector2((h.x - r) / l * 2 - 1, -(h.y - t) / o * 2 + 1);
2358
2358
  }
2359
2359
  var jn = (
2360
2360
  /** @class */
2361
2361
  (function(h) {
2362
- he(o, h);
2363
- function o(e, n, t, r, s) {
2364
- var l = h.call(this) || this;
2365
- l.type = "RoundedBoxGeometry", s = isNaN(s) ? 1 : Math.max(1, Math.floor(s)), e = isNaN(e) ? 1 : e, n = isNaN(n) ? 1 : n, t = isNaN(t) ? 1 : t, r = isNaN(r) ? 0.15 : r, r = Math.min(r, Math.min(e, Math.min(n, Math.min(t))) / 2);
2366
- var d = e / 2 - r, f = n / 2 - r, m = t / 2 - r;
2367
- l.parameters = {
2362
+ he(s, h);
2363
+ function s(e, n, t, r, l) {
2364
+ var o = h.call(this) || this;
2365
+ o.type = "RoundedBoxGeometry", l = isNaN(l) ? 1 : Math.max(1, Math.floor(l)), e = isNaN(e) ? 1 : e, n = isNaN(n) ? 1 : n, t = isNaN(t) ? 1 : t, r = isNaN(r) ? 0.15 : r, r = Math.min(r, Math.min(e, Math.min(n, Math.min(t))) / 2);
2366
+ var d = e / 2 - r, c = n / 2 - r, m = t / 2 - r;
2367
+ o.parameters = {
2368
2368
  width: e,
2369
2369
  height: n,
2370
2370
  depth: t,
2371
2371
  radius: r,
2372
- radiusSegments: s
2372
+ radiusSegments: l
2373
2373
  };
2374
- var y = s + 1, A = y * s + 1 << 3, E = new p.BufferAttribute(new Float32Array(A * 3), 3), P = new p.BufferAttribute(new Float32Array(A * 3), 3), x = [], C = [];
2374
+ var y = l + 1, M = y * l + 1 << 3, w = new p.BufferAttribute(new Float32Array(M * 3), 3), A = new p.BufferAttribute(new Float32Array(M * 3), 3), x = [], C = [];
2375
2375
  new p.Vector3();
2376
- var w = new p.Vector3(), b = [], M = [], c = [], O = y * s, S = y * s + 1;
2376
+ var E = new p.Vector3(), b = [], T = [], f = [], O = y * l, S = y * l + 1;
2377
2377
  D(), H(), W(), X(), ae(), $();
2378
2378
  function D() {
2379
2379
  for (var I = [
@@ -2387,23 +2387,23 @@ var jn = (
2387
2387
  new p.Vector3(-1, -1, 1)
2388
2388
  ], L = 0; L < 8; L++)
2389
2389
  x.push([]), C.push([]);
2390
- for (var F = Math.PI / 2, N = new p.Vector3(d, f, m), j = 0; j <= s; j++) {
2391
- var ne = j / s, K = ne * F, U = Math.cos(K), te = Math.sin(K);
2392
- if (j == s) {
2393
- w.set(0, 1, 0);
2394
- var Y = w.clone().multiplyScalar(r).add(N);
2390
+ for (var F = Math.PI / 2, N = new p.Vector3(d, c, m), j = 0; j <= l; j++) {
2391
+ var ne = j / l, K = ne * F, U = Math.cos(K), te = Math.sin(K);
2392
+ if (j == l) {
2393
+ E.set(0, 1, 0);
2394
+ var Y = E.clone().multiplyScalar(r).add(N);
2395
2395
  x[0].push(Y), b.push(Y);
2396
- var G = w.clone();
2397
- C[0].push(G), M.push(G);
2396
+ var G = E.clone();
2397
+ C[0].push(G), T.push(G);
2398
2398
  continue;
2399
2399
  }
2400
- for (var B = 0; B <= s; B++) {
2401
- var se = B / s, Z = se * F;
2402
- w.x = U * Math.cos(Z), w.y = te, w.z = U * Math.sin(Z);
2403
- var Y = w.clone().multiplyScalar(r).add(N);
2400
+ for (var B = 0; B <= l; B++) {
2401
+ var se = B / l, Z = se * F;
2402
+ E.x = U * Math.cos(Z), E.y = te, E.z = U * Math.sin(Z);
2403
+ var Y = E.clone().multiplyScalar(r).add(N);
2404
2404
  x[0].push(Y), b.push(Y);
2405
- var G = w.clone().normalize();
2406
- C[0].push(G), M.push(G);
2405
+ var G = E.clone().normalize();
2406
+ C[0].push(G), T.push(G);
2407
2407
  }
2408
2408
  }
2409
2409
  for (var Q = 1; Q < 8; Q++)
@@ -2411,7 +2411,7 @@ var jn = (
2411
2411
  var Y = x[0][L].clone().multiply(I[Q]);
2412
2412
  x[Q].push(Y), b.push(Y);
2413
2413
  var G = C[0][L].clone().multiply(I[Q]);
2414
- C[Q].push(G), M.push(G);
2414
+ C[Q].push(G), T.push(G);
2415
2415
  }
2416
2416
  }
2417
2417
  function W() {
@@ -2424,136 +2424,136 @@ var jn = (
2424
2424
  !0,
2425
2425
  !1,
2426
2426
  !0
2427
- ], L = y * (s - 1), F = 0; F < 8; F++) {
2428
- for (var N = S * F, j = 0; j < s - 1; j++)
2429
- for (var ne = j * y, K = (j + 1) * y, U = 0; U < s; U++) {
2427
+ ], L = y * (l - 1), F = 0; F < 8; F++) {
2428
+ for (var N = S * F, j = 0; j < l - 1; j++)
2429
+ for (var ne = j * y, K = (j + 1) * y, U = 0; U < l; U++) {
2430
2430
  var te = U + 1, Y = N + ne + U, G = N + ne + te, B = N + K + U, se = N + K + te;
2431
- I[F] ? (c.push(Y), c.push(B), c.push(G), c.push(G), c.push(B), c.push(se)) : (c.push(Y), c.push(G), c.push(B), c.push(G), c.push(se), c.push(B));
2431
+ I[F] ? (f.push(Y), f.push(B), f.push(G), f.push(G), f.push(B), f.push(se)) : (f.push(Y), f.push(G), f.push(B), f.push(G), f.push(se), f.push(B));
2432
2432
  }
2433
- for (var U = 0; U < s; U++) {
2433
+ for (var U = 0; U < l; U++) {
2434
2434
  var Y = N + L + U, G = N + L + U + 1, B = N + O;
2435
- I[F] ? (c.push(Y), c.push(B), c.push(G)) : (c.push(Y), c.push(G), c.push(B));
2435
+ I[F] ? (f.push(Y), f.push(B), f.push(G)) : (f.push(Y), f.push(G), f.push(B));
2436
2436
  }
2437
2437
  }
2438
2438
  }
2439
2439
  function H() {
2440
2440
  var I = O, L = O + S, F = O + S * 2, N = O + S * 3;
2441
- c.push(I), c.push(L), c.push(F), c.push(I), c.push(F), c.push(N), I = O + S * 4, L = O + S * 5, F = O + S * 6, N = O + S * 7, c.push(I), c.push(F), c.push(L), c.push(I), c.push(N), c.push(F), I = 0, L = S, F = S * 4, N = S * 5, c.push(I), c.push(F), c.push(L), c.push(L), c.push(F), c.push(N), I = S * 2, L = S * 3, F = S * 6, N = S * 7, c.push(I), c.push(F), c.push(L), c.push(L), c.push(F), c.push(N), I = s, L = s + S * 3, F = s + S * 4, N = s + S * 7, c.push(I), c.push(L), c.push(F), c.push(L), c.push(N), c.push(F), I = s + S, L = s + S * 2, F = s + S * 5, N = s + S * 6, c.push(I), c.push(F), c.push(L), c.push(L), c.push(F), c.push(N);
2441
+ f.push(I), f.push(L), f.push(F), f.push(I), f.push(F), f.push(N), I = O + S * 4, L = O + S * 5, F = O + S * 6, N = O + S * 7, f.push(I), f.push(F), f.push(L), f.push(I), f.push(N), f.push(F), I = 0, L = S, F = S * 4, N = S * 5, f.push(I), f.push(F), f.push(L), f.push(L), f.push(F), f.push(N), I = S * 2, L = S * 3, F = S * 6, N = S * 7, f.push(I), f.push(F), f.push(L), f.push(L), f.push(F), f.push(N), I = l, L = l + S * 3, F = l + S * 4, N = l + S * 7, f.push(I), f.push(L), f.push(F), f.push(L), f.push(N), f.push(F), I = l + S, L = l + S * 2, F = l + S * 5, N = l + S * 6, f.push(I), f.push(F), f.push(L), f.push(L), f.push(F), f.push(N);
2442
2442
  }
2443
2443
  function X() {
2444
2444
  for (var I = 0; I < 4; I++)
2445
- for (var L = I * S, F = 4 * S + L, N = (I & 1) === 1, j = 0; j < s; j++) {
2445
+ for (var L = I * S, F = 4 * S + L, N = (I & 1) === 1, j = 0; j < l; j++) {
2446
2446
  var ne = j + 1, K = L + j, U = L + ne, te = F + j, Y = F + ne;
2447
- N ? (c.push(K), c.push(te), c.push(U), c.push(U), c.push(te), c.push(Y)) : (c.push(K), c.push(U), c.push(te), c.push(U), c.push(Y), c.push(te));
2447
+ N ? (f.push(K), f.push(te), f.push(U), f.push(U), f.push(te), f.push(Y)) : (f.push(K), f.push(U), f.push(te), f.push(U), f.push(Y), f.push(te));
2448
2448
  }
2449
2449
  }
2450
2450
  function $() {
2451
2451
  for (var I = [0, 2, 4, 6], L = [1, 3, 5, 7], F = 0; F < 4; F++)
2452
- for (var N = S * I[F], j = S * L[F], ne = 1 >= F, K = 0; K < s; K++) {
2452
+ for (var N = S * I[F], j = S * L[F], ne = 1 >= F, K = 0; K < l; K++) {
2453
2453
  var U = K * y, te = (K + 1) * y, Y = N + U, G = N + te, B = j + U, se = j + te;
2454
- ne ? (c.push(Y), c.push(B), c.push(G), c.push(G), c.push(B), c.push(se)) : (c.push(Y), c.push(G), c.push(B), c.push(G), c.push(se), c.push(B));
2454
+ ne ? (f.push(Y), f.push(B), f.push(G), f.push(G), f.push(B), f.push(se)) : (f.push(Y), f.push(G), f.push(B), f.push(G), f.push(se), f.push(B));
2455
2455
  }
2456
2456
  }
2457
2457
  function ae() {
2458
- for (var I = s - 1, L = [0, 1, 4, 5], F = [3, 2, 7, 6], N = [0, 1, 1, 0], j = 0; j < 4; j++)
2458
+ for (var I = l - 1, L = [0, 1, 4, 5], F = [3, 2, 7, 6], N = [0, 1, 1, 0], j = 0; j < 4; j++)
2459
2459
  for (var ne = L[j] * S, K = F[j] * S, U = 0; U <= I; U++) {
2460
- var te = ne + s + U * y, Y = ne + (U != I ? s + (U + 1) * y : S - 1), G = K + s + U * y, B = K + (U != I ? s + (U + 1) * y : S - 1);
2461
- N[j] ? (c.push(te), c.push(G), c.push(Y), c.push(Y), c.push(G), c.push(B)) : (c.push(te), c.push(Y), c.push(G), c.push(Y), c.push(B), c.push(G));
2460
+ var te = ne + l + U * y, Y = ne + (U != I ? l + (U + 1) * y : S - 1), G = K + l + U * y, B = K + (U != I ? l + (U + 1) * y : S - 1);
2461
+ N[j] ? (f.push(te), f.push(G), f.push(Y), f.push(Y), f.push(G), f.push(B)) : (f.push(te), f.push(Y), f.push(G), f.push(Y), f.push(B), f.push(G));
2462
2462
  }
2463
2463
  }
2464
2464
  for (var z = 0, q = 0; q < b.length; q++)
2465
- E.setXYZ(z, b[q].x, b[q].y, b[q].z), P.setXYZ(z, M[q].x, M[q].y, M[q].z), z++;
2466
- return l.setIndex(new p.BufferAttribute(new Uint16Array(c), 1)), l.setAttribute("position", E), l.setAttribute("normal", P), l;
2465
+ w.setXYZ(z, b[q].x, b[q].y, b[q].z), A.setXYZ(z, T[q].x, T[q].y, T[q].z), z++;
2466
+ return o.setIndex(new p.BufferAttribute(new Uint16Array(f), 1)), o.setAttribute("position", w), o.setAttribute("normal", A), o;
2467
2467
  }
2468
- return o;
2468
+ return s;
2469
2469
  })(p.BufferGeometry)
2470
2470
  );
2471
- function Ye(h, o) {
2472
- return typeof h != "number" || typeof o != "number" ? !1 : Math.abs(h - o) < 1e-3;
2471
+ function Ye(h, s) {
2472
+ return typeof h != "number" || typeof s != "number" ? !1 : Math.abs(h - s) < 1e-3;
2473
2473
  }
2474
- function He(h, o, e, n) {
2474
+ function He(h, s, e, n) {
2475
2475
  n === void 0 && (n = function(r) {
2476
2476
  return r;
2477
2477
  });
2478
2478
  var t = n(e);
2479
- return h * (1 - t) + o * t;
2479
+ return h * (1 - t) + s * t;
2480
2480
  }
2481
2481
  var oe = Number((Math.PI / 2).toFixed(5));
2482
- function Gn(h, o, e) {
2482
+ function Gn(h, s, e) {
2483
2483
  var n = new p.Shape();
2484
- return n.moveTo(e, 0), n.lineTo(h - e, 0), n.absarc(h - e, e, e, -oe, 0, !1), n.lineTo(h, o - e), n.absarc(h - e, o - e, e, 0, oe, !1), n.lineTo(e, o), n.absarc(e, o - e, e, oe, Math.PI, !1), n.lineTo(0, e), n.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), n;
2484
+ return n.moveTo(e, 0), n.lineTo(h - e, 0), n.absarc(h - e, e, e, -oe, 0, !1), n.lineTo(h, s - e), n.absarc(h - e, s - e, e, 0, oe, !1), n.lineTo(e, s), n.absarc(e, s - e, e, oe, Math.PI, !1), n.lineTo(0, e), n.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), n;
2485
2485
  }
2486
2486
  var We = function(h) {
2487
- var o = document.createElement("div");
2488
- o.innerText = h;
2489
- var e = new Me(o);
2490
- return e.name = h, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
- }, it = function(h) {
2492
- var o = new p.PlaneGeometry(5, 5), e = new p.MeshBasicMaterial({
2487
+ var s = document.createElement("div");
2488
+ s.innerText = h;
2489
+ var e = new Pe(s);
2490
+ return e.name = h, e.scale.set(0.3, 0.3, 0.3), s.style.pointerEvents = "none", s.style.backfaceVisibility = "hidden", e;
2491
+ }, ot = function(h) {
2492
+ var s = new p.PlaneGeometry(5, 5), e = new p.MeshBasicMaterial({
2493
2493
  transparent: !0,
2494
2494
  opacity: 0
2495
- }), n = new p.Mesh(o, e), t = document.createElement("div");
2495
+ }), n = new p.Mesh(s, e), t = document.createElement("div");
2496
2496
  t.innerText = h;
2497
- var r = new Me(t);
2497
+ var r = new Pe(t);
2498
2498
  return r.name = h, r.scale.set(0.3, 0.3, 0.3), t.style.color = "#ffffff", t.style.opacity = "0.5", t.style.pointerEvents = "none", t.style.backfaceVisibility = "hidden", n.rotateX(-oe), n.add(r), n;
2499
2499
  }, Yn = (
2500
2500
  /** @class */
2501
2501
  (function(h) {
2502
- he(o, h);
2503
- function o(e, n) {
2502
+ he(s, h);
2503
+ function s(e, n) {
2504
2504
  var t = h.call(this, e) || this;
2505
- t.camera = new An(90), t.scene = new p.Scene(), t.renderer = new p.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new zn(), t.ambientLight = new p.AmbientLight(16777215, 0.7), t.wrapper = document.createElement("div"), t.arrows = document.createElement("div"), t.arrowLeft = document.createElement("div"), t.arrowRight = document.createElement("div"), t.arrowFront = document.createElement("div"), t.arrowBack = document.createElement("div"), t.arrowTop = document.createElement("div"), t.arrowBottom = document.createElement("div"), t.spherical = null, t.dragging = !1, t.style = document.createElement("style"), t.directionalLight = new p.DirectionalLight(16777215, 0.2), t.box = new p.Mesh(new jn(8, 8, 8, 0.5, 20), new p.MeshPhongMaterial({ color: 16777215 })), t.faces = new p.Group(), t.orient = function(l) {
2506
- var d = l.longitude, f = l.latitude;
2505
+ t.camera = new An(90), t.scene = new p.Scene(), t.renderer = new p.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new zn(), t.ambientLight = new p.AmbientLight(16777215, 0.7), t.wrapper = document.createElement("div"), t.arrows = document.createElement("div"), t.arrowLeft = document.createElement("div"), t.arrowRight = document.createElement("div"), t.arrowFront = document.createElement("div"), t.arrowBack = document.createElement("div"), t.arrowTop = document.createElement("div"), t.arrowBottom = document.createElement("div"), t.spherical = null, t.dragging = !1, t.style = document.createElement("style"), t.directionalLight = new p.DirectionalLight(16777215, 0.2), t.box = new p.Mesh(new jn(8, 8, 8, 0.5, 20), new p.MeshPhongMaterial({ color: 16777215 })), t.faces = new p.Group(), t.orient = function(o) {
2506
+ var d = o.longitude, c = o.latitude;
2507
2507
  t.dragging = !1, t.spherical = null, t.controls.enableDamping = !1, t.five.setState(Object.assign({
2508
- latitude: f
2508
+ latitude: c
2509
2509
  }, d !== void 0 ? {
2510
2510
  longitude: d + t.config.fixedLongitude
2511
2511
  } : {})), t.five.ready().then(function() {
2512
2512
  t.controls.enableDamping = !0, t.setState({ arrowsVisible: !0 });
2513
2513
  });
2514
2514
  }, t.onRenderFrame = function() {
2515
- var l, d, f, m, y;
2516
- if (t.renderer.render(t.scene, t.camera), t.css3drenderer.render(t.scene, t.camera), t.directionalLight.position.copy(t.camera.position), (l = t.controls) === null || l === void 0 || l.update(), t.dragging) {
2515
+ var o, d, c, m, y;
2516
+ if (t.renderer.render(t.scene, t.camera), t.css3drenderer.render(t.scene, t.camera), t.directionalLight.position.copy(t.camera.position), (o = t.controls) === null || o === void 0 || o.update(), t.dragging) {
2517
2517
  t.camera.computePose(), t.updateByCamera();
2518
- var A = t.camera.pose, E = A.longitude, P = A.latitude;
2519
- t.five.setState({ longitude: E, latitude: P }, !0), t.updateArrows({ longitude: E, latitude: P });
2520
- } else if (t.spherical && (!Ye(t.spherical.pi, (d = t.controls) === null || d === void 0 ? void 0 : d.getPolarAngle()) || !Ye(t.spherical.theta, (f = t.controls) === null || f === void 0 ? void 0 : f.getAzimuthalAngle()))) {
2518
+ var M = t.camera.pose, w = M.longitude, A = M.latitude;
2519
+ t.five.setState({ longitude: w, latitude: A }, !0), t.updateArrows({ longitude: w, latitude: A });
2520
+ } else if (t.spherical && (!Ye(t.spherical.pi, (d = t.controls) === null || d === void 0 ? void 0 : d.getPolarAngle()) || !Ye(t.spherical.theta, (c = t.controls) === null || c === void 0 ? void 0 : c.getAzimuthalAngle()))) {
2521
2521
  t.spherical = { pi: (m = t.controls) === null || m === void 0 ? void 0 : m.getPolarAngle(), theta: (y = t.controls) === null || y === void 0 ? void 0 : y.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
- var x = t.camera.pose, E = x.longitude, P = x.latitude;
2523
- t.five.setState({ longitude: E, latitude: P }, !0), t.updateArrows({ longitude: E, latitude: P });
2522
+ var x = t.camera.pose, w = x.longitude, A = x.latitude;
2523
+ t.five.setState({ longitude: w, latitude: A }, !0), t.updateArrows({ longitude: w, latitude: A });
2524
2524
  } else
2525
2525
  t.spherical = null;
2526
- }, t.onTapGesture = function(l) {
2527
- var d = l.pointers[0].clientX, f = l.pointers[0].clientY, m = Zt({ x: d, y: f }, t.wrapper), y = new p.Raycaster();
2526
+ }, t.onTapGesture = function(o) {
2527
+ var d = o.pointers[0].clientX, c = o.pointers[0].clientY, m = Zt({ x: d, y: c }, t.wrapper), y = new p.Raycaster();
2528
2528
  y.setFromCamera(m, t.camera);
2529
- var A = y.intersectObjects(t.faces.children, !1)[0];
2530
- if (A) {
2531
- var E = A.object.userData, P = E.longitude, x = E.latitude;
2532
- t.orient({ longitude: P, latitude: x });
2529
+ var M = y.intersectObjects(t.faces.children, !1)[0];
2530
+ if (M) {
2531
+ var w = M.object.userData, A = w.longitude, x = w.latitude;
2532
+ t.orient({ longitude: A, latitude: x });
2533
2533
  }
2534
2534
  }, t.onFiveWantsGesture = function() {
2535
2535
  if (t.spherical)
2536
2536
  return !1;
2537
- }, t.onFiveModeChange = function(l) {
2538
- t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : oe);
2539
- }, t.onCameraUpdate = function(l) {
2540
- var d = l.state;
2537
+ }, t.onFiveModeChange = function(o) {
2538
+ t.controls && (t.controls.maxPolarAngle = o === "Topview" ? 0 : oe);
2539
+ }, t.onCameraUpdate = function(o) {
2540
+ var d = o.state;
2541
2541
  if (!t.dragging && !t.spherical) {
2542
- var f = d.longitude, m = d.latitude;
2543
- t.camera.pose.longitude === f && t.camera.pose.latitude === m || (t.camera.setFromPose({ longitude: f, latitude: m, distance: 20, offset: new p.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: f, latitude: m }));
2542
+ var c = d.longitude, m = d.latitude;
2543
+ t.camera.pose.longitude === c && t.camera.pose.latitude === m || (t.camera.setFromPose({ longitude: c, latitude: m, distance: 20, offset: new p.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: c, latitude: m }));
2544
2544
  }
2545
- }, t.onPanStart = function(l) {
2545
+ }, t.onPanStart = function(o) {
2546
2546
  t.dragging = !0, t.spherical = {};
2547
- }, t.onMouseMove = function(l) {
2547
+ }, t.onMouseMove = function(o) {
2548
2548
  if (!t.dragging) {
2549
- var d = Zt({ x: l.clientX, y: l.clientY }, t.wrapper), f = new p.Raycaster();
2550
- f.setFromCamera(d, t.camera);
2551
- var m = f.intersectObjects(t.faces.children, !1)[0];
2549
+ var d = Zt({ x: o.clientX, y: o.clientY }, t.wrapper), c = new p.Raycaster();
2550
+ c.setFromCamera(d, t.camera);
2551
+ var m = c.intersectObjects(t.faces.children, !1)[0];
2552
2552
  t.faces.children.forEach(function(y) {
2553
2553
  y.material.opacity = 0, y.children[0].element.style.color = "";
2554
2554
  }), m && (m.object.material.opacity = 0.3, m.object.children[0].element.style.color = "#336dff");
2555
2555
  }
2556
- }, t.onPanEnd = function(l) {
2556
+ }, t.onPanEnd = function(o) {
2557
2557
  t.dragging = !1, t.spherical = { pi: t.controls.getPolarAngle(), theta: t.controls.getAzimuthalAngle() };
2558
2558
  }, t.dispose = function() {
2559
2559
  t.disable();
@@ -2564,8 +2564,8 @@ var We = function(h) {
2564
2564
  arrowsVisible: !1
2565
2565
  };
2566
2566
  t.state = Object.assign(r, n == null ? void 0 : n.initialState);
2567
- var s = V({ fixedLongitude: 0, orthoView: !0 }, n == null ? void 0 : n.config);
2568
- return t._config = s, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new Tt.Manager(t.wrapper), t.mc.add(new Tt.Tap({ interval: 410 })), t.mc.add(new Tt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2567
+ var l = V({ fixedLongitude: 0, orthoView: !0 }, n == null ? void 0 : n.config);
2568
+ return t._config = l, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new Tt.Manager(t.wrapper), t.mc.add(new Tt.Tap({ interval: 410 })), t.mc.add(new Tt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2569
2569
  distance: 20,
2570
2570
  offset: new p.Vector3(0, 0, 0),
2571
2571
  longitude: e.camera.pose.latitude,
@@ -2617,34 +2617,34 @@ var We = function(h) {
2617
2617
  transparent: !0
2618
2618
  })), t.init(), t;
2619
2619
  }
2620
- return Object.defineProperty(o.prototype, "config", {
2620
+ return Object.defineProperty(s.prototype, "config", {
2621
2621
  get: function() {
2622
2622
  return V({}, this._config);
2623
2623
  },
2624
2624
  enumerable: !1,
2625
2625
  configurable: !0
2626
- }), o.prototype.updateState = function(e, n) {
2626
+ }), s.prototype.updateState = function(e, n) {
2627
2627
  var t = this.state;
2628
2628
  this.state = V(V({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
2629
- }, o.prototype.appendTo = function(e) {
2629
+ }, s.prototype.appendTo = function(e) {
2630
2630
  if (e) {
2631
2631
  e.appendChild(this.wrapper);
2632
2632
  var n = this.wrapper.getBoundingClientRect(), t = n.width, r = n.height;
2633
2633
  this.renderer.setSize(t, r), this.css3drenderer.setSize(t, r);
2634
2634
  }
2635
- }, o.prototype.init = function() {
2635
+ }, s.prototype.init = function() {
2636
2636
  this.renderer.setClearAlpha(0), this.renderer.domElement.style.outline = "none", this.initDom(), this.initFaces(), this.initControls(), this.initLights();
2637
2637
  var e = this.cylinder;
2638
2638
  e.position.y = -3;
2639
- var n = it("西");
2639
+ var n = ot("西");
2640
2640
  n.position.set(-19, 0, 0), e.add(n);
2641
- var t = it("东");
2641
+ var t = ot("东");
2642
2642
  t.position.set(19, 0, 0), e.add(t);
2643
- var r = it("北");
2643
+ var r = ot("北");
2644
2644
  r.position.set(0, 0, -19), e.add(r);
2645
- var s = it("南");
2646
- s.position.set(0, 0, 19), e.add(s), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2647
- }, o.prototype.initDom = function() {
2645
+ var l = ot("南");
2646
+ l.position.set(0, 0, 19), e.add(l), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2647
+ }, s.prototype.initDom = function() {
2648
2648
  this.style.innerHTML = `
2649
2649
  .OrientationPlugin .OrientationArrows {
2650
2650
  position: absolute;
@@ -2746,7 +2746,7 @@ var We = function(h) {
2746
2746
  transform: translate(0, -15px);
2747
2747
  }
2748
2748
  `, this.wrapper.className = "OrientationPlugin", this.arrows.className = "OrientationArrows", this.wrapper.style.cssText = "position: relative; width: 100%; height: 100%", this.wrapper.appendChild(this.arrows), this.arrowLeft.className = this.arrowRight.className = this.arrowTop.className = this.arrowBack.className = this.arrowFront.className = "OrientationArrow", this.arrowBottom.className = "OrientationArrow disabled", this.arrowBack.innerText = "后", this.arrowFront.innerText = "前", this.arrowLeft.innerText = "左", this.arrowRight.innerText = "右", this.arrowTop.innerText = "上", this.arrowBottom.innerText = "下", this.css3drenderer.domElement.style.cssText = "position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; color: #00000090;";
2749
- }, o.prototype.bindEvents = function() {
2749
+ }, s.prototype.bindEvents = function() {
2750
2750
  var e = this;
2751
2751
  this.five.on("renderFrame", this.onRenderFrame), this.five.on("camera.update", this.onCameraUpdate), this.five.on("wantsGesture", this.onFiveWantsGesture), this.five.on("modeChange", this.onFiveModeChange), this.mc.on("tap", this.onTapGesture), this.mc.on("panstart", this.onPanStart), this.mc.on("panend", this.onPanEnd), this.wrapper.addEventListener("mousemove", this.onMouseMove), this.arrowTop.onclick = function() {
2752
2752
  return e.orient({ longitude: 0, latitude: oe });
@@ -2759,35 +2759,35 @@ var We = function(h) {
2759
2759
  }, this.arrowBack.onclick = function() {
2760
2760
  return e.orient({ longitude: Math.PI, latitude: 0 });
2761
2761
  };
2762
- }, o.prototype.unbindEvents = function() {
2762
+ }, s.prototype.unbindEvents = function() {
2763
2763
  this.five.off("renderFrame", this.onRenderFrame), this.five.off("camera.update", this.onCameraUpdate), this.five.off("wantsGesture", this.onFiveWantsGesture), this.five.off("modeChange", this.onFiveModeChange), this.mc.off("tap", this.onTapGesture), this.mc.off("panstart", this.onPanStart), this.mc.off("panend", this.onPanEnd), this.wrapper.removeEventListener("mousemove", this.onMouseMove), this.arrowTop.onclick = null, this.arrowLeft.onclick = null, this.arrowRight.onclick = null, this.arrowFront.onclick = null, this.arrowBack.onclick = null;
2764
- }, o.prototype.updateByCamera = function() {
2765
- var e = He(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(l) {
2766
- return l * l;
2767
- }), n = He(11, 13, this.camera.pose.latitude / Math.PI * 2, function(l) {
2768
- return l * l;
2769
- }), t = He(12, 15, this.camera.pose.latitude / Math.PI * 2, function(l) {
2770
- return l * l;
2771
- }), r = He(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2772
- return l * l;
2773
- }), s = He(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(l) {
2774
- return l * l;
2764
+ }, s.prototype.updateByCamera = function() {
2765
+ var e = He(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(o) {
2766
+ return o * o;
2767
+ }), n = He(11, 13, this.camera.pose.latitude / Math.PI * 2, function(o) {
2768
+ return o * o;
2769
+ }), t = He(12, 15, this.camera.pose.latitude / Math.PI * 2, function(o) {
2770
+ return o * o;
2771
+ }), r = He(13, 19, this.camera.pose.latitude / Math.PI * 2, function(o) {
2772
+ return o * o;
2773
+ }), l = He(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(o) {
2774
+ return o * o;
2775
2775
  });
2776
- this.cylinder.geometry = new p.CylinderGeometry(n, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = n, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(l) {
2777
- l.position.normalize().multiplyScalar(r), l.scale.set(e, e, e);
2778
- var d = l.children[0];
2779
- d && (d.element.style.opacity = s.toString());
2776
+ this.cylinder.geometry = new p.CylinderGeometry(n, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = n, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(o) {
2777
+ o.position.normalize().multiplyScalar(r), o.scale.set(e, e, e);
2778
+ var d = o.children[0];
2779
+ d && (d.element.style.opacity = l.toString());
2780
2780
  });
2781
- }, o.prototype.updateArrows = function(e) {
2781
+ }, s.prototype.updateArrows = function(e) {
2782
2782
  e.longitude;
2783
2783
  var n = e.latitude, t = oe - n < 0.02;
2784
2784
  this.setState({ arrowsVisible: t });
2785
- }, o.prototype.handleArrowsVisible = function(e) {
2785
+ }, s.prototype.handleArrowsVisible = function(e) {
2786
2786
  var n = this;
2787
2787
  if (this.state.enabled)
2788
2788
  if (this.cylinder.material.uniforms.opacity.value = e ? 0.4 : 1, this.cylinder.material.needsUpdate = !0, e) {
2789
- var t = this.five.getCurrentState(), r = t.longitude, s = t.latitude;
2790
- if (oe - s < 0.03)
2789
+ var t = this.five.getCurrentState(), r = t.longitude, l = t.latitude;
2790
+ if (oe - l < 0.03)
2791
2791
  this.five.state.mode === "Topview" || this.five.state.mode === "Mapview" ? (this.faces.getObjectByName("上").element.className = "active", this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowFront), this.arrows.style.transform = "rotate(".concat((r - this.config.fixedLongitude) / Math.PI * 180, "deg)")) : (this.arrows.innerHTML = "", this.faces.getObjectByName("上").element.className = "");
2792
2792
  else {
2793
2793
  switch (this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowTop), this.config.orthoView && this.five.ready().then(function() {
@@ -2814,35 +2814,35 @@ var We = function(h) {
2814
2814
  } else
2815
2815
  this.config.orthoView && (this.five.controller.cameraType = "auto", this.five.ready().then(function() {
2816
2816
  return n.five.controller.cameraMotion.ended = !1;
2817
- })), this.arrows.style.display = "none", this.faces.children.forEach(function(l) {
2818
- l.children[0].element.className = "";
2817
+ })), this.arrows.style.display = "none", this.faces.children.forEach(function(o) {
2818
+ o.children[0].element.className = "";
2819
2819
  });
2820
- }, o.prototype.setState = function(e, n) {
2820
+ }, s.prototype.setState = function(e, n) {
2821
2821
  n === void 0 && (n = {});
2822
2822
  var t = this.state, r = n.userAction !== void 0 ? n.userAction : !0;
2823
2823
  if (this.updateState(e, r), e.enabled !== void 0 && t.enabled !== e.enabled) {
2824
- var s = { userAction: r };
2825
- e.enabled ? this._enable(s) : this._disable(s);
2824
+ var l = { userAction: r };
2825
+ e.enabled ? this._enable(l) : this._disable(l);
2826
2826
  }
2827
- }, o.prototype.initLights = function() {
2827
+ }, s.prototype.initLights = function() {
2828
2828
  this.directionalLight.target = this.box, this.scene.add(this.ambientLight, this.directionalLight);
2829
- }, o.prototype.initFaces = function() {
2829
+ }, s.prototype.initFaces = function() {
2830
2830
  var e = Gn(7, 7, 0.5), n = new p.ShapeGeometry(e);
2831
2831
  n.translate(-3.5, -3.5, 0);
2832
2832
  var t = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2833
2833
  t.userData = { longitude: 0, latitude: 0 }, t.position.z = 4.1, t.add(We("前"));
2834
2834
  var r = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
2835
  r.rotateY(Math.PI), r.position.z = -4.1, r.add(We("后")), r.userData = { longitude: Math.PI, latitude: 0 };
2836
- var s = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
- s.rotateY(oe), s.position.x = 4.1, s.add(We("右")), s.userData = { longitude: oe, latitude: 0 };
2838
2836
  var l = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
- l.rotateY(-oe), l.position.x = -4.1, l.add(We("")), l.userData = { longitude: -oe, latitude: 0 };
2837
+ l.rotateY(oe), l.position.x = 4.1, l.add(We("")), l.userData = { longitude: oe, latitude: 0 };
2838
+ var o = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
+ o.rotateY(-oe), o.position.x = -4.1, o.add(We("左")), o.userData = { longitude: -oe, latitude: 0 };
2840
2840
  var d = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
- d.rotateX(-oe), d.position.y = 4.1, d.add(We("上")), d.userData = { longitude: 0, latitude: oe }, this.faces.add(t, r, l, s, d);
2842
- }, o.prototype.initControls = function() {
2843
- var e = this.controls = new qe(this.camera, this.renderer.domElement);
2841
+ d.rotateX(-oe), d.position.y = 4.1, d.add(We("上")), d.userData = { longitude: 0, latitude: oe }, this.faces.add(t, r, o, l, d);
2842
+ }, s.prototype.initControls = function() {
2843
+ var e = this.controls = new Ke(this.camera, this.renderer.domElement);
2844
2844
  e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = oe, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2845
- }, o.prototype.load = function(e) {
2845
+ }, s.prototype.load = function(e) {
2846
2846
  return De(this, void 0, void 0, function() {
2847
2847
  return Ne(this, function(n) {
2848
2848
  return [
@@ -2851,36 +2851,36 @@ var We = function(h) {
2851
2851
  ];
2852
2852
  });
2853
2853
  });
2854
- }, o.prototype._enable = function(e) {
2854
+ }, s.prototype._enable = function(e) {
2855
2855
  var n = this.five.getCurrentState(), t = n.longitude, r = n.latitude;
2856
2856
  this.camera.setFromPose({ longitude: t, latitude: r, distance: 20, offset: new p.Vector3(0, 0, 0) }), this.updateByCamera(), this.wrapper.appendChild(this.renderer.domElement), this.wrapper.appendChild(this.css3drenderer.domElement), this.bindEvents();
2857
- }, o.prototype._disable = function(e) {
2857
+ }, s.prototype._disable = function(e) {
2858
2858
  this.wrapper.removeChild(this.renderer.domElement), this.wrapper.removeChild(this.css3drenderer.domElement), this.unbindEvents();
2859
- }, o.prototype.enable = function(e) {
2859
+ }, s.prototype.enable = function(e) {
2860
2860
  var n;
2861
2861
  if (!this.state.enabled) {
2862
2862
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
2863
2863
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t }), document.head.appendChild(this.style);
2864
2864
  }
2865
- }, o.prototype.disable = function(e) {
2865
+ }, s.prototype.disable = function(e) {
2866
2866
  var n;
2867
2867
  if (this.state.enabled !== !1) {
2868
2868
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
2869
2869
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t }), document.head.removeChild(this.style);
2870
2870
  }
2871
- }, o;
2872
- })(Xe.Controller)
2873
- ), nr = function(h, o) {
2874
- return new Yn(h, o);
2871
+ }, s;
2872
+ })(qe.Controller)
2873
+ ), nr = function(h, s) {
2874
+ return new Yn(h, s);
2875
2875
  }, Hn = (
2876
2876
  /** @class */
2877
2877
  (function(h) {
2878
- he(o, h);
2879
- function o(e, n) {
2878
+ he(s, h);
2879
+ function s(e, n) {
2880
2880
  var t = h.call(this, e) || this;
2881
2881
  return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(r) {
2882
- var s = (Math.PI / 2 - Math.max(r.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - s, 0) * 10;
2883
- t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - s) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(l * 100, "%, transparent ").concat(l * 120, "%)"));
2882
+ var l = (Math.PI / 2 - Math.max(r.latitude, 0)) / (Math.PI / 2), o = Math.max(0.2 - l, 0) * 10;
2883
+ t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - l) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(o * 100, "%, transparent ").concat(o * 120, "%)"));
2884
2884
  }, t._addEventListener = function() {
2885
2885
  t.five.on("cameraUpdate", t._onFiveCameraUpdate);
2886
2886
  }, t._removeEventListener = function() {
@@ -2894,19 +2894,19 @@ var We = function(h) {
2894
2894
  ];
2895
2895
  });
2896
2896
  });
2897
- }, t.setState = function(r, s) {
2897
+ }, t.setState = function(r, l) {
2898
2898
  }, t.enable = function() {
2899
- var r, s = (r = t.five.getElement()) === null || r === void 0 ? void 0 : r.parentNode;
2900
- if (!s) {
2899
+ var r, l = (r = t.five.getElement()) === null || r === void 0 ? void 0 : r.parentNode;
2900
+ if (!l) {
2901
2901
  t.five.ready().then(function() {
2902
2902
  return t.enable();
2903
2903
  });
2904
2904
  return;
2905
2905
  }
2906
- t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && s.appendChild(t.gradientBg), t.groundBg && s.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2906
+ t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && l.appendChild(t.gradientBg), t.groundBg && l.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2907
2907
  }, t.disable = function(r) {
2908
- var s, l, d, f;
2909
- t.state.enabled && ((l = (s = t.gradientBg) === null || s === void 0 ? void 0 : s.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (f = (d = t.groundBg) === null || d === void 0 ? void 0 : d.parentNode) === null || f === void 0 || f.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2908
+ var l, o, d, c;
2909
+ t.state.enabled && ((o = (l = t.gradientBg) === null || l === void 0 ? void 0 : l.parentNode) === null || o === void 0 || o.removeChild(t.gradientBg), (c = (d = t.groundBg) === null || d === void 0 ? void 0 : d.parentNode) === null || c === void 0 || c.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2910
2910
  }, t.dispose = function() {
2911
2911
  t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1;
2912
2912
  }, t.state = {
@@ -2934,10 +2934,10 @@ var We = function(h) {
2934
2934
  }
2935
2935
  `, t.enable()), t;
2936
2936
  }
2937
- return o;
2937
+ return s;
2938
2938
  })(Ot.Controller)
2939
- ), rr = function(h, o) {
2940
- return new Hn(h, o);
2939
+ ), rr = function(h, s) {
2940
+ return new Hn(h, s);
2941
2941
  };
2942
2942
  new p.Matrix4().fromArray([
2943
2943
  1,
@@ -2957,18 +2957,18 @@ new p.Matrix4().fromArray([
2957
2957
  0,
2958
2958
  1
2959
2959
  ]);
2960
- var Mt = (
2960
+ var Pt = (
2961
2961
  /** @class */
2962
2962
  (function() {
2963
- function h(o, e, n, t, r) {
2964
- this.R = o, this.Q = e, this.A = n, this.B = t, this.C = r, this.cov = NaN, this.x = NaN;
2963
+ function h(s, e, n, t, r) {
2964
+ this.R = s, this.Q = e, this.A = n, this.B = t, this.C = r, this.cov = NaN, this.x = NaN;
2965
2965
  }
2966
- return h.prototype.filter = function(o, e) {
2966
+ return h.prototype.filter = function(s, e) {
2967
2967
  if (e === void 0 && (e = 0), isNaN(this.x))
2968
- this.x = 1 / this.C * o, this.cov = 1 / this.C * this.Q * (1 / this.C);
2968
+ this.x = 1 / this.C * s, this.cov = 1 / this.C * this.Q * (1 / this.C);
2969
2969
  else {
2970
2970
  var n = this.A * this.x + this.B * e, t = this.A * this.cov * this.A + this.R, r = t * this.C * (1 / (this.C * t * this.C + this.Q));
2971
- this.x = n + r * (o - this.C * n), this.cov = t - r * this.C * t;
2971
+ this.x = n + r * (s - this.C * n), this.cov = t - r * this.C * t;
2972
2972
  }
2973
2973
  return this.x;
2974
2974
  }, h;
@@ -2976,8 +2976,8 @@ var Mt = (
2976
2976
  ), Wn = (
2977
2977
  /** @class */
2978
2978
  (function(h) {
2979
- he(o, h);
2980
- function o(e, n) {
2979
+ he(s, h);
2980
+ function s(e, n) {
2981
2981
  var t = h.call(this, e) || this;
2982
2982
  t.dispose = function() {
2983
2983
  t.disable();
@@ -2987,8 +2987,8 @@ var Mt = (
2987
2987
  visible: !0
2988
2988
  };
2989
2989
  t.state = Object.assign(r, n == null ? void 0 : n.initialState);
2990
- var s = V({}, n == null ? void 0 : n.config);
2991
- return t._config = s, t.state.enabled && t._enable({ userAction: !1 }), t.cancelAnimation = null, t.skipStart = 0, t.skipEnd = 0, t.location = 0, t.totalDistance = 0, t.trajectory = null, t.currentKeyFrame = null, t.nextKeyframe = null, t.nextButOneKeyframe = null, t.keyframes = [], t.rate = t.config.rate || 1, t.virualCamera = t.five.camera.clone(), t.playingState = {
2990
+ var l = V({}, n == null ? void 0 : n.config);
2991
+ return t._config = l, t.state.enabled && t._enable({ userAction: !1 }), t.cancelAnimation = null, t.skipStart = 0, t.skipEnd = 0, t.location = 0, t.totalDistance = 0, t.trajectory = null, t.currentKeyFrame = null, t.nextKeyframe = null, t.nextButOneKeyframe = null, t.keyframes = [], t.rate = t.config.rate || 1, t.virualCamera = t.five.camera.clone(), t.playingState = {
2992
2992
  keyframeIndex: null,
2993
2993
  progress: null
2994
2994
  }, Object.defineProperties(t, {
@@ -2996,22 +2996,22 @@ var Mt = (
2996
2996
  get: function() {
2997
2997
  return this._currentDistance;
2998
2998
  },
2999
- set: function(l) {
3000
- this._currentDistance = l;
2999
+ set: function(o) {
3000
+ this._currentDistance = o;
3001
3001
  }
3002
3002
  }
3003
3003
  }), t;
3004
3004
  }
3005
- return Object.defineProperty(o.prototype, "config", {
3005
+ return Object.defineProperty(s.prototype, "config", {
3006
3006
  get: function() {
3007
3007
  return V({}, this._config);
3008
3008
  },
3009
3009
  enumerable: !1,
3010
3010
  configurable: !0
3011
- }), o.prototype.updateState = function(e, n) {
3011
+ }), s.prototype.updateState = function(e, n) {
3012
3012
  var t = this.state;
3013
3013
  this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3014
- }, o.prototype.load = function(e) {
3014
+ }, s.prototype.load = function(e) {
3015
3015
  return De(this, void 0, void 0, function() {
3016
3016
  return Ne(this, function(n) {
3017
3017
  return [
@@ -3020,34 +3020,34 @@ var Mt = (
3020
3020
  ];
3021
3021
  });
3022
3022
  });
3023
- }, o.prototype.loadTrajectory = function(e) {
3023
+ }, s.prototype.loadTrajectory = function(e) {
3024
3024
  this.trajectory = e, this.cancelAnimation && this.cancelAnimation(), this.playingState.keyframeIndex = null, this.playingState.progress = null;
3025
- var n = 0.01, t = 0.1, r = 1, s = 0, l = 1, d = new Mt(n, t, r, s, l), f = new Mt(n, t, r, s, l), m = new Mt(n, t, r, s, l);
3025
+ var n = 0.01, t = 0.1, r = 1, l = 0, o = 1, d = new Pt(n, t, r, l, o), c = new Pt(n, t, r, l, o), m = new Pt(n, t, r, l, o);
3026
3026
  if (this.trajectory && this.trajectory.content.loadState === "READY") {
3027
- for (var y = this.trajectory.content.data.positionArray, A = new Float32Array(y.length / 3), E = 0; E < A.length; E++)
3028
- if (E === 0)
3029
- A[E] = 0;
3027
+ for (var y = this.trajectory.content.data.positionArray, M = new Float32Array(y.length / 3), w = 0; w < M.length; w++)
3028
+ if (w === 0)
3029
+ M[w] = 0;
3030
3030
  else {
3031
- var P = new p.Vector3(y[E - 3], y[E - 2], y[E - 1]), x = new p.Vector3(y[E], y[E + 1], y[E + 2]);
3032
- A[E] = x.distanceTo(P) + A[E - 1];
3031
+ var A = new p.Vector3(y[w - 3], y[w - 2], y[w - 1]), x = new p.Vector3(y[w], y[w + 1], y[w + 2]);
3032
+ M[w] = x.distanceTo(A) + M[w - 1];
3033
3033
  }
3034
- this.totalDistance = A[A.length - 1];
3035
- for (var E = 0; E < A.length; E++) {
3036
- for (var C = new p.Vector3(0, 0, 0), w = 0, b = E - 5; b < E + 6; b++)
3037
- b >= 0 && b < A.length && (C.add(new p.Vector3(y[b * 3], y[b * 3 + 1], y[b * 3 + 2])), w++);
3038
- C.divideScalar(w).applyMatrix4(e.transform);
3039
- var M = d.filter(C.x), c = f.filter(C.y), O = m.filter(C.z), S = {
3040
- position: new p.Vector3(M, c, O),
3041
- location: A[E]
3034
+ this.totalDistance = M[M.length - 1];
3035
+ for (var w = 0; w < M.length; w++) {
3036
+ for (var C = new p.Vector3(0, 0, 0), E = 0, b = w - 5; b < w + 6; b++)
3037
+ b >= 0 && b < M.length && (C.add(new p.Vector3(y[b * 3], y[b * 3 + 1], y[b * 3 + 2])), E++);
3038
+ C.divideScalar(E).applyMatrix4(e.transform);
3039
+ var T = d.filter(C.x), f = c.filter(C.y), O = m.filter(C.z), S = {
3040
+ position: new p.Vector3(T, f, O),
3041
+ location: M[w]
3042
3042
  };
3043
3043
  this.keyframes.push(S);
3044
3044
  }
3045
3045
  } else
3046
3046
  throw new Error("trajectory content is not ready");
3047
- }, o.prototype.setPlayingState = function(e) {
3047
+ }, s.prototype.setPlayingState = function(e) {
3048
3048
  (e.keyframeIndex !== null || e.progress !== null) && (this.cancelAnimation && this.cancelAnimation(), this.playingState.keyframeIndex = e.keyframeIndex ? e.keyframeIndex : this.playingState.keyframeIndex, this.playingState.progress = e.progress ? e.progress : this.playingState.progress, this.play());
3049
- }, o.prototype._enable = function(e) {
3050
- }, o.prototype.play = function() {
3049
+ }, s.prototype._enable = function(e) {
3050
+ }, s.prototype.play = function() {
3051
3051
  var e = this, n = this.keyframes.length;
3052
3052
  if (n < 2)
3053
3053
  throw new Error("keyframes length must be greater than 2");
@@ -3056,25 +3056,25 @@ var Mt = (
3056
3056
  progress: null
3057
3057
  };
3058
3058
  this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(V({}, this.virualCamera.pose)));
3059
- var r = this.playingState.keyframeIndex, s = 0;
3060
- this.cancelAnimation = ct.shared.add(function(l, d) {
3059
+ var r = this.playingState.keyframeIndex, l = 0;
3060
+ this.cancelAnimation = Xe.shared.add(function(o, d) {
3061
3061
  if (r === n - 1 - e.skipEnd && e.cancelAnimation) {
3062
3062
  e.cancelAnimation();
3063
3063
  return;
3064
3064
  }
3065
3065
  e.currentKeyFrame = e.keyframes[r], e.nextKeyframe = e.keyframes[r + 1], r + 2 <= n - 1 ? e.nextButOneKeyframe = e.keyframes[r + 2] : e.nextButOneKeyframe = null;
3066
- var f = e.currentKeyFrame.position.clone(), m = e.nextKeyframe.position.clone(), y = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), A = f.clone().add(y.clone().multiplyScalar(0.01)), E = new p.Vector3();
3067
- e.nextButOneKeyframe !== null ? E = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : E.copy(y);
3068
- var P = m.clone().add(E.clone().multiplyScalar(0.01));
3069
- s += d / 1e3 * e.rate;
3070
- var x = s / f.distanceTo(m);
3066
+ var c = e.currentKeyFrame.position.clone(), m = e.nextKeyframe.position.clone(), y = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), M = c.clone().add(y.clone().multiplyScalar(0.01)), w = new p.Vector3();
3067
+ e.nextButOneKeyframe !== null ? w = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : w.copy(y);
3068
+ var A = m.clone().add(w.clone().multiplyScalar(0.01));
3069
+ l += d / 1e3 * e.rate;
3070
+ var x = l / c.distanceTo(m);
3071
3071
  x = x >= 1 ? 1 : x, t.keyframeIndex !== null && t.progress !== null && (x = t.progress, t.keyframeIndex = null, t.progress = null);
3072
- var C = f.clone().lerp(m, x), w = A.clone().lerp(P, x);
3073
- e.virualCamera.position.copy(C), e.virualCamera.lookAt(w), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(V({}, e.virualCamera.pose)), e.location = e.keyframes[r].location + f.clone().distanceTo(C), x === 1 ? (s = 0, r++, e.playingState.keyframeIndex = r, e.playingState.progress = 0) : (e.playingState.keyframeIndex = r, e.playingState.progress = x);
3072
+ var C = c.clone().lerp(m, x), E = M.clone().lerp(A, x);
3073
+ e.virualCamera.position.copy(C), e.virualCamera.lookAt(E), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(V({}, e.virualCamera.pose)), e.location = e.keyframes[r].location + c.clone().distanceTo(C), x === 1 ? (l = 0, r++, e.playingState.keyframeIndex = r, e.playingState.progress = 0) : (e.playingState.keyframeIndex = r, e.playingState.progress = x);
3074
3074
  });
3075
- }, o.prototype.pause = function() {
3075
+ }, s.prototype.pause = function() {
3076
3076
  this.cancelAnimation && this.cancelAnimation();
3077
- }, o.prototype.findKeyFrameByLocation = function(e) {
3077
+ }, s.prototype.findKeyFrameByLocation = function(e) {
3078
3078
  if (this.keyframes.length !== 0) {
3079
3079
  for (var n = 0, t = this.keyframes.length - 1; n <= t; ) {
3080
3080
  var r = Math.floor((n + t) / 2);
@@ -3087,28 +3087,28 @@ var Mt = (
3087
3087
  progress: 0
3088
3088
  };
3089
3089
  }
3090
- }, o.prototype.resetPlayingState = function() {
3090
+ }, s.prototype.resetPlayingState = function() {
3091
3091
  this.playingState.keyframeIndex = null, this.playingState.progress = null;
3092
- }, o.prototype._disable = function(e) {
3093
- }, o.prototype.enable = function(e) {
3092
+ }, s.prototype._disable = function(e) {
3093
+ }, s.prototype.enable = function(e) {
3094
3094
  var n;
3095
3095
  if (!this.state.enabled) {
3096
3096
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3097
3097
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
3098
3098
  }
3099
- }, o.prototype.disable = function(e) {
3099
+ }, s.prototype.disable = function(e) {
3100
3100
  var n;
3101
3101
  if (this.state.enabled !== !1) {
3102
3102
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3103
3103
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3104
3104
  }
3105
- }, o;
3106
- })(Xe.Controller)
3107
- ), ar = function(h, o) {
3108
- return new Wn(h, o);
3105
+ }, s;
3106
+ })(qe.Controller)
3107
+ ), ar = function(h, s) {
3108
+ return new Wn(h, s);
3109
3109
  };
3110
- function Qt(h, o, e) {
3111
- return h < o ? o : h > e ? e : h;
3110
+ function Qt(h, s, e) {
3111
+ return h < s ? s : h > e ? e : h;
3112
3112
  }
3113
3113
  var Xn = (
3114
3114
  /* glsl */
@@ -3143,15 +3143,15 @@ void main() {
3143
3143
  gl_FragColor.a = gl_FragColor.a * opacity;
3144
3144
  }
3145
3145
  `
3146
- ), Kn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], Pt = 512, At = 512, ot = 128, Zn = (
3146
+ ), Kn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], Mt = 512, At = 512, st = 128, Zn = (
3147
3147
  /** @class */
3148
3148
  (function(h) {
3149
- he(o, h);
3150
- function o(e, n) {
3149
+ he(s, h);
3150
+ function s(e, n) {
3151
3151
  var t = h.call(this, e) || this;
3152
3152
  t.group = new p.Group(), t.mesh = (function() {
3153
- var l = new p.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3154
- l.translate(0, 0.5, 0);
3153
+ var o = new p.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3154
+ o.translate(0, 0.5, 0);
3155
3155
  var d = new p.ShaderMaterial({
3156
3156
  vertexShader: Xn,
3157
3157
  fragmentShader: qn,
@@ -3162,24 +3162,24 @@ void main() {
3162
3162
  },
3163
3163
  transparent: !0,
3164
3164
  depthTest: !1
3165
- }), f = new p.Mesh(l, d);
3166
- return f;
3165
+ }), c = new p.Mesh(o, d);
3166
+ return c;
3167
3167
  })(), t.panoMesh = new xn({ scale: 1.5 }), t.stop = function() {
3168
- }, t.drawLine = function(l, d) {
3168
+ }, t.drawLine = function(o, d) {
3169
3169
  if (t.ctx) {
3170
- var f = (function() {
3171
- var A, E = Pt / 16 | 0;
3172
- return E * ((A = Kn[l]) !== null && A !== void 0 ? A : 0);
3173
- })(), m = (1 - (d + l * 150) % 1200 / 1200) * (At + ot), y = t.ctx.createLinearGradient(0, m - ot, 0, m);
3174
- y.addColorStop(0, "rgba(255,255,255,0)"), y.addColorStop(0.5, "rgba(255,255,255,1)"), y.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = y, t.ctx.fillRect(f, m - ot, 3, ot);
3170
+ var c = (function() {
3171
+ var M, w = Mt / 16 | 0;
3172
+ return w * ((M = Kn[o]) !== null && M !== void 0 ? M : 0);
3173
+ })(), m = (1 - (d + o * 150) % 1200 / 1200) * (At + st), y = t.ctx.createLinearGradient(0, m - st, 0, m);
3174
+ y.addColorStop(0, "rgba(255,255,255,0)"), y.addColorStop(0.5, "rgba(255,255,255,1)"), y.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = y, t.ctx.fillRect(c, m - st, 3, st);
3175
3175
  }
3176
- }, t.anime = function(l) {
3176
+ }, t.anime = function(o) {
3177
3177
  if (t.ctx && t.startTime) {
3178
- t.ctx.clearRect(0, 0, Pt, At);
3178
+ t.ctx.clearRect(0, 0, Mt, At);
3179
3179
  for (var d = 0; d < 16; d++)
3180
- t.drawLine(d, l - t.startTime);
3181
- var f = Qt((l - t.startTime) / 1e3, 0, 1), m = Qt((l - t.startTime) / 300, 0, t.config.maxOpacity);
3182
- t.panoMesh.setOpacity(m), t.mesh.material.uniforms.progress.value = f, t.mesh.material.uniforms.opacity.value = m, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3180
+ t.drawLine(d, o - t.startTime);
3181
+ var c = Qt((o - t.startTime) / 1e3, 0, 1), m = Qt((o - t.startTime) / 300, 0, t.config.maxOpacity);
3182
+ t.panoMesh.setOpacity(m), t.mesh.material.uniforms.progress.value = c, t.mesh.material.uniforms.opacity.value = m, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3183
3183
  }
3184
3184
  }, t.dispose = function() {
3185
3185
  t.disable();
@@ -3189,24 +3189,24 @@ void main() {
3189
3189
  visible: !0
3190
3190
  };
3191
3191
  t.state = Object.assign(r, n == null ? void 0 : n.initialState);
3192
- var s = V(V({}, n == null ? void 0 : n.config), { maxOpacity: 1 });
3193
- return t._config = s, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = Pt, t.canvas.height = At, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new p.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3192
+ var l = V(V({}, n == null ? void 0 : n.config), { maxOpacity: 1 });
3193
+ return t._config = l, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = Mt, t.canvas.height = At, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new p.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3194
3194
  }
3195
- return Object.defineProperty(o.prototype, "config", {
3195
+ return Object.defineProperty(s.prototype, "config", {
3196
3196
  get: function() {
3197
3197
  return V({}, this._config);
3198
3198
  },
3199
3199
  enumerable: !1,
3200
3200
  configurable: !0
3201
- }), o.prototype.updateState = function(e, n) {
3201
+ }), s.prototype.updateState = function(e, n) {
3202
3202
  var t = this.state;
3203
3203
  this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3204
- }, o.prototype.updateConfig = function(e, n) {
3204
+ }, s.prototype.updateConfig = function(e, n) {
3205
3205
  var t;
3206
3206
  n === void 0 && (n = {});
3207
- var r = this.config, s = V(V({}, r), e);
3208
- this._config = s, this.hooks.emit("configChange", { prevConfig: r, config: s, userAction: (t = n.userAction) !== null && t !== void 0 ? t : !0 });
3209
- }, o.prototype.load = function(e) {
3207
+ var r = this.config, l = V(V({}, r), e);
3208
+ this._config = l, this.hooks.emit("configChange", { prevConfig: r, config: l, userAction: (t = n.userAction) !== null && t !== void 0 ? t : !0 });
3209
+ }, s.prototype.load = function(e) {
3210
3210
  return De(this, void 0, void 0, function() {
3211
3211
  return Ne(this, function(n) {
3212
3212
  return [
@@ -3215,93 +3215,93 @@ void main() {
3215
3215
  ];
3216
3216
  });
3217
3217
  });
3218
- }, o.prototype._enable = function(e) {
3218
+ }, s.prototype._enable = function(e) {
3219
3219
  var n = this;
3220
3220
  this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition), this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition), this.five.ready().then(function() {
3221
- n.five.scene.add(n.group), n.stop = ct.shared.add(function(t, r) {
3221
+ n.five.scene.add(n.group), n.stop = Xe.shared.add(function(t, r) {
3222
3222
  n.startTime || (n.startTime = t), n.panoMesh.updateTime(t, r), n.anime(t);
3223
3223
  });
3224
3224
  });
3225
- }, o.prototype._disable = function(e) {
3225
+ }, s.prototype._disable = function(e) {
3226
3226
  this.five.scene.remove(this.group), this.panoMesh.setOpacity(0), this.startTime = void 0, this.stop(), this.five.needsRender = !0;
3227
- }, o.prototype.enable = function(e) {
3227
+ }, s.prototype.enable = function(e) {
3228
3228
  var n;
3229
3229
  if (this.ctx && !this.state.enabled && this.five.observers[this.five.state.panoIndex]) {
3230
3230
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3231
3231
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
3232
3232
  }
3233
- }, o.prototype.disable = function(e) {
3233
+ }, s.prototype.disable = function(e) {
3234
3234
  var n;
3235
3235
  if (this.state.enabled !== !1) {
3236
3236
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
3237
3237
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3238
3238
  }
3239
- }, o.prototype.setState = function(e, n) {
3239
+ }, s.prototype.setState = function(e, n) {
3240
3240
  n === void 0 && (n = {});
3241
3241
  var t = this.state, r = n.userAction !== void 0 ? n.userAction : !0;
3242
3242
  if (this.updateState(e, r), e.enabled !== void 0 && t.enabled !== e.enabled) {
3243
- var s = { userAction: r };
3244
- e.enabled ? this._enable(s) : this._disable(s);
3243
+ var l = { userAction: r };
3244
+ e.enabled ? this._enable(l) : this._disable(l);
3245
3245
  }
3246
- }, o;
3246
+ }, s;
3247
3247
  })(Ot.Controller)
3248
- ), ir = function(h, o) {
3249
- return new Zn(h, o);
3248
+ ), ir = function(h, s) {
3249
+ return new Zn(h, s);
3250
3250
  }, Ct = (
3251
3251
  /** @class */
3252
3252
  (function(h) {
3253
- he(o, h);
3254
- function o() {
3253
+ he(s, h);
3254
+ function s() {
3255
3255
  var e = h.call(this) || this;
3256
3256
  e.type = "LineSegmentsGeometry";
3257
3257
  var n = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], t = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], r = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
3258
3258
  return e.setIndex(r), e.setAttribute("position", new p.Float32BufferAttribute(n, 3)), e.setAttribute("uv", new p.Float32BufferAttribute(t, 2)), e;
3259
3259
  }
3260
- return o.prototype.applyMatrix4 = function(e) {
3260
+ return s.prototype.applyMatrix4 = function(e) {
3261
3261
  var n = this.attributes.instanceStart, t = this.attributes.instanceEnd;
3262
3262
  return n !== void 0 && (n.applyMatrix4(e), t.applyMatrix4(e), n.needsUpdate = !0), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
3263
- }, o.prototype.setPositions = function(e) {
3263
+ }, s.prototype.setPositions = function(e) {
3264
3264
  var n;
3265
3265
  e instanceof Float32Array ? n = e : Array.isArray(e) ? n = new Float32Array(e) : n = new Float32Array();
3266
3266
  var t = new p.InstancedInterleavedBuffer(n, 6, 1);
3267
3267
  return this.setAttribute("instanceStart", new p.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceEnd", new p.InterleavedBufferAttribute(t, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
3268
- }, o.prototype.setColors = function(e) {
3268
+ }, s.prototype.setColors = function(e) {
3269
3269
  var n;
3270
3270
  e instanceof Float32Array ? n = e : Array.isArray(e) ? n = new Float32Array(e) : n = new Float32Array();
3271
3271
  var t = new p.InstancedInterleavedBuffer(n, 6, 1);
3272
3272
  return this.setAttribute("instanceColorStart", new p.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceColorEnd", new p.InterleavedBufferAttribute(t, 3, 3)), this;
3273
- }, o.prototype.fromWireframeGeometry = function(e) {
3273
+ }, s.prototype.fromWireframeGeometry = function(e) {
3274
3274
  return this.setPositions(e.attributes.position.array), this;
3275
- }, o.prototype.fromEdgesGeometry = function(e) {
3275
+ }, s.prototype.fromEdgesGeometry = function(e) {
3276
3276
  return this.setPositions(e.attributes.position.array), this;
3277
- }, o.prototype.fromMesh = function(e) {
3277
+ }, s.prototype.fromMesh = function(e) {
3278
3278
  return this.fromWireframeGeometry(new p.WireframeGeometry(e.geometry)), this;
3279
- }, o.prototype.fromLineSegments = function(e) {
3279
+ }, s.prototype.fromLineSegments = function(e) {
3280
3280
  var n = e.geometry;
3281
3281
  if (n instanceof p.Geometry) {
3282
3282
  var t = new p.BufferGeometry().fromGeometry(n);
3283
3283
  this.setPositions(t.attributes.position.array);
3284
3284
  } else n instanceof p.BufferGeometry && this.setPositions(n.attributes.position.array);
3285
3285
  return this;
3286
- }, o.prototype.computeBoundingBox = function() {
3286
+ }, s.prototype.computeBoundingBox = function() {
3287
3287
  this.boundingBox === null && (this.boundingBox = new p.Box3());
3288
3288
  var e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
3289
3289
  if (e !== void 0 && n !== void 0) {
3290
3290
  var t = new p.Box3();
3291
3291
  this.boundingBox.setFromBufferAttribute(e), t.setFromBufferAttribute(n), this.boundingBox.union(t);
3292
3292
  }
3293
- }, o.prototype.computeBoundingSphere = function() {
3293
+ }, s.prototype.computeBoundingSphere = function() {
3294
3294
  this.boundingSphere === null && (this.boundingSphere = new p.Sphere()), this.boundingBox === null && this.computeBoundingBox();
3295
3295
  var e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
3296
3296
  if (e !== void 0 && n !== void 0) {
3297
3297
  var t = this.boundingSphere.center;
3298
3298
  this.boundingBox.getCenter(t);
3299
- for (var r = 0, s = new p.Vector3(), l = 0, d = e.count; l < d; l++)
3300
- s.fromBufferAttribute(e, l), r = Math.max(r, t.distanceToSquared(s)), s.fromBufferAttribute(n, l), r = Math.max(r, t.distanceToSquared(s));
3299
+ for (var r = 0, l = new p.Vector3(), o = 0, d = e.count; o < d; o++)
3300
+ l.fromBufferAttribute(e, o), r = Math.max(r, t.distanceToSquared(l)), l.fromBufferAttribute(n, o), r = Math.max(r, t.distanceToSquared(l));
3301
3301
  this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
3302
3302
  }
3303
- }, o.prototype.toJSON = function() {
3304
- }, o;
3303
+ }, s.prototype.toJSON = function() {
3304
+ }, s;
3305
3305
  })(p.InstancedBufferGeometry)
3306
3306
  );
3307
3307
  Object.assign(Ct.prototype, { isLineSegmentsGeometry: !0 });
@@ -3500,7 +3500,7 @@ var xt = {
3500
3500
  if (len2 > 1.0) discard;
3501
3501
  }
3502
3502
 
3503
- vec4 diffuseColor = vec4(diffuse, opacity);
3503
+ vec4 diffuseColor = vec4(diffuse, 1.0);
3504
3504
  #include <logdepthbuf_fragment>
3505
3505
  #include <color_fragment>
3506
3506
 
@@ -3527,6 +3527,7 @@ var xt = {
3527
3527
  if (vDistanceProgress > endFadeStart) {
3528
3528
  gl_FragColor.a *= (1.0 - vDistanceProgress) / startFadeLength;
3529
3529
  }
3530
+ gl_FragColor.a *= opacity;
3530
3531
  #include <tonemapping_fragment>
3531
3532
  #include <fog_fragment>
3532
3533
  #include <premultiplied_alpha_fragment>
@@ -3535,8 +3536,8 @@ var xt = {
3535
3536
  }, Lt = (
3536
3537
  /** @class */
3537
3538
  (function(h) {
3538
- he(o, h);
3539
- function o(e) {
3539
+ he(s, h);
3540
+ function s(e) {
3540
3541
  var n = h.call(this, {
3541
3542
  uniforms: p.UniformsUtils.clone(xt.uniforms),
3542
3543
  vertexShader: xt.vertexShader,
@@ -3681,45 +3682,45 @@ var xt = {
3681
3682
  }
3682
3683
  }), n.setValues(e), n;
3683
3684
  }
3684
- return o;
3685
+ return s;
3685
3686
  })(p.ShaderMaterial)
3686
3687
  );
3687
3688
  Object.assign(Lt.prototype, { isLineMaterial: !0 });
3688
3689
  var en = (
3689
3690
  /** @class */
3690
3691
  (function(h) {
3691
- he(o, h);
3692
- function o(e, n) {
3692
+ he(s, h);
3693
+ function s(e, n) {
3693
3694
  var t = h.call(this) || this;
3694
3695
  return t.type = "LineSegments2", t.geometry = e !== void 0 ? e : new Ct(), t.material = n !== void 0 ? n : new Lt({ color: Math.random() * 16777215 }), t;
3695
3696
  }
3696
- return o.prototype.computeLineDistances = function() {
3697
- for (var e = this.geometry, n = e.attributes.instanceStart, t = e.attributes.instanceEnd, r = new Float32Array(2 * n.count), s = new p.Vector3(), l = new p.Vector3(), d = 0, f = 0, m = n.count; f < m; f++)
3698
- s.fromBufferAttribute(n, f), l.fromBufferAttribute(t, f), d += s.distanceTo(l);
3697
+ return s.prototype.computeLineDistances = function() {
3698
+ for (var e = this.geometry, n = e.attributes.instanceStart, t = e.attributes.instanceEnd, r = new Float32Array(2 * n.count), l = new p.Vector3(), o = new p.Vector3(), d = 0, c = 0, m = n.count; c < m; c++)
3699
+ l.fromBufferAttribute(n, c), o.fromBufferAttribute(t, c), d += l.distanceTo(o);
3699
3700
  this.material.uniforms.totalLength.value = d;
3700
- for (var f = 0, y = 0, m = n.count; f < m; f++, y += 2) {
3701
- s.fromBufferAttribute(n, f), l.fromBufferAttribute(t, f);
3702
- var A = s.distanceTo(l);
3703
- r[y] = y === 0 ? 0 : r[y - 1], r[y + 1] = r[y] + A;
3701
+ for (var c = 0, y = 0, m = n.count; c < m; c++, y += 2) {
3702
+ l.fromBufferAttribute(n, c), o.fromBufferAttribute(t, c);
3703
+ var M = l.distanceTo(o);
3704
+ r[y] = y === 0 ? 0 : r[y - 1], r[y + 1] = r[y] + M;
3704
3705
  }
3705
- var E = new p.InstancedInterleavedBuffer(r, 2, 1);
3706
- return e.setAttribute("instanceDistanceStart", new p.InterleavedBufferAttribute(E, 1, 0)), e.setAttribute("instanceDistanceEnd", new p.InterleavedBufferAttribute(E, 1, 1)), this;
3707
- }, o.prototype.raycast = function(e, n) {
3706
+ var w = new p.InstancedInterleavedBuffer(r, 2, 1);
3707
+ return e.setAttribute("instanceDistanceStart", new p.InterleavedBufferAttribute(w, 1, 0)), e.setAttribute("instanceDistanceEnd", new p.InterleavedBufferAttribute(w, 1, 1)), this;
3708
+ }, s.prototype.raycast = function(e, n) {
3708
3709
  e.camera === null && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');
3709
- var t = e.ray, r = e.camera, s = r.projectionMatrix, l = this.geometry, d = this.material, f = d.resolution, m = d.linewidth, y = l.attributes.instanceStart, A = l.attributes.instanceEnd, E = new p.Vector4(), P = new p.Vector4(), x = new p.Vector4(), C = new p.Vector3(), w = new p.Matrix4(), b = new p.Line3(), M = new p.Vector3();
3710
- t.at(1, x), x.w = 1, x.applyMatrix4(r.matrixWorldInverse), x.applyMatrix4(s), x.multiplyScalar(1 / x.w), x.x *= f.x / 2, x.y *= f.y / 2, x.z = 0, C.copy(x);
3711
- var c = this.matrixWorld;
3712
- w.multiplyMatrices(r.matrixWorldInverse, c);
3710
+ var t = e.ray, r = e.camera, l = r.projectionMatrix, o = this.geometry, d = this.material, c = d.resolution, m = d.linewidth, y = o.attributes.instanceStart, M = o.attributes.instanceEnd, w = new p.Vector4(), A = new p.Vector4(), x = new p.Vector4(), C = new p.Vector3(), E = new p.Matrix4(), b = new p.Line3(), T = new p.Vector3();
3711
+ t.at(1, x), x.w = 1, x.applyMatrix4(r.matrixWorldInverse), x.applyMatrix4(l), x.multiplyScalar(1 / x.w), x.x *= c.x / 2, x.y *= c.y / 2, x.z = 0, C.copy(x);
3712
+ var f = this.matrixWorld;
3713
+ E.multiplyMatrices(r.matrixWorldInverse, f);
3713
3714
  for (var O = 0, S = y.count; O < S; O++) {
3714
- E.fromBufferAttribute(y, O), P.fromBufferAttribute(A, O), E.w = 1, P.w = 1, E.applyMatrix4(w), P.applyMatrix4(w), E.applyMatrix4(s), P.applyMatrix4(s), E.multiplyScalar(1 / E.w), P.multiplyScalar(1 / P.w);
3715
- var D = E.z < -1 && P.z < -1, W = E.z > 1 && P.z > 1;
3715
+ w.fromBufferAttribute(y, O), A.fromBufferAttribute(M, O), w.w = 1, A.w = 1, w.applyMatrix4(E), A.applyMatrix4(E), w.applyMatrix4(l), A.applyMatrix4(l), w.multiplyScalar(1 / w.w), A.multiplyScalar(1 / A.w);
3716
+ var D = w.z < -1 && A.z < -1, W = w.z > 1 && A.z > 1;
3716
3717
  if (!(D || W)) {
3717
- E.x *= f.x / 2, E.y *= f.y / 2, P.x *= f.x / 2, P.y *= f.y / 2, b.start.copy(E), b.start.z = 0, b.end.copy(P), b.end.z = 0;
3718
+ w.x *= c.x / 2, w.y *= c.y / 2, A.x *= c.x / 2, A.y *= c.y / 2, b.start.copy(w), b.start.z = 0, b.end.copy(A), b.end.z = 0;
3718
3719
  var H = b.closestPointToPointParameter(C, !0);
3719
- b.at(H, M);
3720
- var X = p.MathUtils.lerp(E.z, P.z, H), $ = X >= -1 && X <= 1, ae = C.distanceTo(M) < m * 0.5;
3720
+ b.at(H, T);
3721
+ var X = p.MathUtils.lerp(w.z, A.z, H), $ = X >= -1 && X <= 1, ae = C.distanceTo(T) < m * 0.5;
3721
3722
  if ($ && ae) {
3722
- b.start.fromBufferAttribute(y, O), b.end.fromBufferAttribute(A, O), b.start.applyMatrix4(c), b.end.applyMatrix4(c);
3723
+ b.start.fromBufferAttribute(y, O), b.end.fromBufferAttribute(M, O), b.start.applyMatrix4(f), b.end.applyMatrix4(f);
3723
3724
  var z = new p.Vector3(), q = new p.Vector3();
3724
3725
  t.distanceSqToSegment(b.start, b.end, q, z), n.push({
3725
3726
  point: q,
@@ -3731,56 +3732,56 @@ var en = (
3731
3732
  }
3732
3733
  }
3733
3734
  }
3734
- }, o;
3735
+ }, s;
3735
3736
  })(p.Mesh)
3736
3737
  );
3737
3738
  Object.assign(en.prototype, { isLineSegments2: !0 });
3738
3739
  var tn = (
3739
3740
  /** @class */
3740
3741
  (function(h) {
3741
- he(o, h);
3742
- function o(e, n) {
3742
+ he(s, h);
3743
+ function s(e, n) {
3743
3744
  var t = h.call(this, e, n) || this;
3744
3745
  return t.type = "Line2", t;
3745
3746
  }
3746
- return o;
3747
+ return s;
3747
3748
  })(en)
3748
3749
  );
3749
3750
  Object.assign(tn.prototype, { isLine2: !0 });
3750
3751
  var nn = (
3751
3752
  /** @class */
3752
3753
  (function(h) {
3753
- he(o, h);
3754
- function o() {
3754
+ he(s, h);
3755
+ function s() {
3755
3756
  var e = h.call(this) || this;
3756
3757
  return e.type = "LineGeometry", e;
3757
3758
  }
3758
- return o.prototype.setPositions = function(e) {
3759
+ return s.prototype.setPositions = function(e) {
3759
3760
  for (var n = e.length - 3, t = new Float32Array(2 * n), r = 0; r < n; r += 3)
3760
3761
  t[2 * r] = e[r], t[2 * r + 1] = e[r + 1], t[2 * r + 2] = e[r + 2], t[2 * r + 3] = e[r + 3], t[2 * r + 4] = e[r + 4], t[2 * r + 5] = e[r + 5];
3761
3762
  return h.prototype.setPositions.call(this, t), this;
3762
- }, o.prototype.setColors = function(e) {
3763
+ }, s.prototype.setColors = function(e) {
3763
3764
  for (var n = e.length - 3, t = new Float32Array(2 * n), r = 0; r < n; r += 3)
3764
3765
  t[2 * r] = e[r], t[2 * r + 1] = e[r + 1], t[2 * r + 2] = e[r + 2], t[2 * r + 3] = e[r + 3], t[2 * r + 4] = e[r + 4], t[2 * r + 5] = e[r + 5];
3765
3766
  return h.prototype.setColors.call(this, t), this;
3766
- }, o.prototype.fromLine = function(e) {
3767
+ }, s.prototype.fromLine = function(e) {
3767
3768
  var n = e.geometry;
3768
3769
  if (n instanceof p.Geometry) {
3769
3770
  var t = new p.BufferGeometry().fromGeometry(n);
3770
3771
  this.setPositions(t.attributes.position.array);
3771
3772
  } else n instanceof p.BufferGeometry && this.setPositions(n.attributes.position.array);
3772
3773
  return this;
3773
- }, o.prototype.copy = function() {
3774
+ }, s.prototype.copy = function() {
3774
3775
  return this;
3775
- }, o;
3776
+ }, s;
3776
3777
  })(Ct)
3777
3778
  );
3778
3779
  Object.assign(nn.prototype, { isLineGeometry: !0 });
3779
3780
  var Qn = (
3780
3781
  /** @class */
3781
3782
  (function(h) {
3782
- he(o, h);
3783
- function o(e, n) {
3783
+ he(s, h);
3784
+ function s(e, n) {
3784
3785
  var t = h.call(this, e) || this;
3785
3786
  t.paths = /* @__PURE__ */ new Map(), t.up = new p.Vector3(0, 1, 0);
3786
3787
  var r = {
@@ -3789,7 +3790,7 @@ var Qn = (
3789
3790
  playing: !1
3790
3791
  };
3791
3792
  t.state = Object.assign(r, n == null ? void 0 : n.initialState);
3792
- var s = {
3793
+ var l = {
3793
3794
  lineCount: 6,
3794
3795
  spacing: 0.02,
3795
3796
  lineWidth: 2,
@@ -3811,51 +3812,51 @@ var Qn = (
3811
3812
  subMeshHighlightWidth: 1
3812
3813
  // 添加这一行
3813
3814
  };
3814
- return t._config = V(V({}, s), n == null ? void 0 : n.config), n != null && n.paths && n.paths.length > 0 && n.paths.forEach(function(l) {
3815
- t.addPath(l);
3815
+ return t._config = V(V({}, l), n == null ? void 0 : n.config), n != null && n.paths && n.paths.length > 0 && n.paths.forEach(function(o) {
3816
+ t.addPath(o);
3816
3817
  }), t.state.enabled && t._enable({ userAction: !1 }), t;
3817
3818
  }
3818
- return Object.defineProperty(o.prototype, "config", {
3819
+ return Object.defineProperty(s.prototype, "config", {
3819
3820
  get: function() {
3820
3821
  return V({}, this._config);
3821
3822
  },
3822
3823
  enumerable: !1,
3823
3824
  configurable: !0
3824
- }), o.prototype.updateState = function(e, n) {
3825
+ }), s.prototype.updateState = function(e, n) {
3825
3826
  var t = this.state;
3826
3827
  this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3827
- }, o.prototype.load = function(e, n) {
3828
+ }, s.prototype.load = function(e, n) {
3828
3829
  return De(this, void 0, void 0, function() {
3829
3830
  var t, r = this;
3830
- return Ne(this, function(s) {
3831
- return this.clearAllPaths(), e.paths.forEach(function(l) {
3832
- var d, f, m = l.points.map(function(y) {
3831
+ return Ne(this, function(l) {
3832
+ return this.clearAllPaths(), e.paths.forEach(function(o) {
3833
+ var d, c, m = o.points.map(function(y) {
3833
3834
  return new p.Vector3(y.x, y.y, y.z);
3834
3835
  });
3835
3836
  r.addPath({
3836
- id: l.id,
3837
+ id: o.id,
3837
3838
  points: m,
3838
- enabled: (d = l.enabled) !== null && d !== void 0 ? d : !0,
3839
- visible: (f = l.visible) !== null && f !== void 0 ? f : !0,
3840
- color: l.color,
3841
- lineWidth: l.lineWidth,
3842
- speed: l.speed
3839
+ enabled: (d = o.enabled) !== null && d !== void 0 ? d : !0,
3840
+ visible: (c = o.visible) !== null && c !== void 0 ? c : !0,
3841
+ color: o.color,
3842
+ lineWidth: o.lineWidth,
3843
+ speed: o.speed
3843
3844
  });
3844
- }), t = /* @__PURE__ */ new Map(), this.paths.forEach(function(l, d) {
3845
- t.set(d, l.config);
3845
+ }), t = /* @__PURE__ */ new Map(), this.paths.forEach(function(o, d) {
3846
+ t.set(d, o.config);
3846
3847
  }), this.data = { paths: t }, this.hooks.emit("dataLoaded", this.data), n && this.setState(n), [
3847
3848
  2
3848
3849
  /*return*/
3849
3850
  ];
3850
3851
  });
3851
3852
  });
3852
- }, o.prototype.addPath = function(e) {
3853
- var n, t, r, s, l, d, f, m;
3853
+ }, s.prototype.addPath = function(e) {
3854
+ var n, t, r, l, o, d, c, m;
3854
3855
  if (e.points.length < 2)
3855
3856
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 至少需要2个点")), !1;
3856
3857
  if (this.paths.has(e.id))
3857
3858
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 已存在")), !1;
3858
- var y = new p.CatmullRomCurve3(e.points), A = (n = e.subMeshColor) !== null && n !== void 0 ? n : this._config.subMeshColor, E = (t = e.subMeshWidth) !== null && t !== void 0 ? t : this._config.subMeshWidth, P = (r = e.subMeshOpacity) !== null && r !== void 0 ? r : this._config.subMeshOpacity, x = (s = e.enableSubMesh) !== null && s !== void 0 ? s : !0, C = (l = e.speed) !== null && l !== void 0 ? l : this._config.speed, w = (d = e.range) !== null && d !== void 0 ? d : this._config.range, b = this.createLines(e, y, w), M = this.createParticles(), c = M.particles, O = M.particleGeometry, S = M.particleMaterial, D = M.particleInfos, W = M.particlePositions, H = this.createSubMeshGeometry(e, y, E), X = y.getLength(), $ = this.createSubMeshMaterial(A, P, X, w);
3859
+ var y = new p.CatmullRomCurve3(e.points), M = (n = e.subMeshColor) !== null && n !== void 0 ? n : this._config.subMeshColor, w = (t = e.subMeshWidth) !== null && t !== void 0 ? t : this._config.subMeshWidth, A = (r = e.subMeshOpacity) !== null && r !== void 0 ? r : this._config.subMeshOpacity, x = (l = e.enableSubMesh) !== null && l !== void 0 ? l : !0, C = (o = e.speed) !== null && o !== void 0 ? o : this._config.speed, E = (d = e.range) !== null && d !== void 0 ? d : this._config.range, b = this.createLines(e, y, E), T = this.createParticles(), f = T.particles, O = T.particleGeometry, S = T.particleMaterial, D = T.particleInfos, W = T.particlePositions, H = this.createSubMeshGeometry(e, y, w), X = y.getLength(), $ = this.createSubMeshMaterial(M, A, X, E);
3859
3860
  $.uniforms.totalLength.value = X;
3860
3861
  var ae = new p.Mesh(H, $);
3861
3862
  ae.visible = x, this.five.scene.add(ae);
@@ -3864,12 +3865,12 @@ var Qn = (
3864
3865
  config: e,
3865
3866
  curve: y,
3866
3867
  lines: b,
3867
- particles: c,
3868
+ particles: f,
3868
3869
  particleGeometry: O,
3869
3870
  particleMaterial: S,
3870
3871
  particleInfos: D,
3871
3872
  particlePositions: W,
3872
- enabled: (f = e.enabled) !== null && f !== void 0 ? f : !0,
3873
+ enabled: (c = e.enabled) !== null && c !== void 0 ? c : !0,
3873
3874
  visible: (m = e.visible) !== null && m !== void 0 ? m : !0,
3874
3875
  startOffset: 0,
3875
3876
  endOffset: 0,
@@ -3884,93 +3885,96 @@ var Qn = (
3884
3885
  subMesh: ae,
3885
3886
  subMeshGeometry: H,
3886
3887
  subMeshMaterial: $,
3887
- subMeshColor: A,
3888
- subMeshWidth: E,
3889
- subMeshOpacity: P,
3888
+ subMeshColor: M,
3889
+ subMeshWidth: w,
3890
+ subMeshOpacity: A,
3890
3891
  speed: C,
3891
3892
  animationId: null,
3892
- enableSubMesh: x
3893
+ enableSubMesh: x,
3894
+ isPaused: !1,
3895
+ pausedProgress: 0,
3896
+ pausedTime: 0
3893
3897
  };
3894
3898
  this.paths.set(e.id, z);
3895
3899
  var q = this.data, I = /* @__PURE__ */ new Map();
3896
3900
  return this.paths.forEach(function(L, F) {
3897
3901
  I.set(F, L.config);
3898
3902
  }), this.data = { paths: I }, this.hooks.emit("dataChange", this.data, q), this.hooks.emit("pathAdd", e.id, e), this.state.playing && this.startPathAnimation(e.id), !0;
3899
- }, o.prototype.removePath = function(e) {
3903
+ }, s.prototype.removePath = function(e) {
3900
3904
  var n = this.paths.get(e);
3901
3905
  if (!n)
3902
3906
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
3903
3907
  this.stopPathAnimation(e), this.disposePathResources(n), this.paths.delete(e);
3904
3908
  var t = this.data, r = /* @__PURE__ */ new Map();
3905
- return this.paths.forEach(function(s, l) {
3906
- r.set(l, s.config);
3909
+ return this.paths.forEach(function(l, o) {
3910
+ r.set(o, l.config);
3907
3911
  }), this.data = { paths: r }, this.hooks.emit("dataChange", this.data, t), this.hooks.emit("pathRemove", e), !0;
3908
- }, o.prototype.enablePath = function(e) {
3912
+ }, s.prototype.enablePath = function(e) {
3909
3913
  var n = this.paths.get(e);
3910
3914
  return n ? (n.enabled = !0, this.hooks.emit("pathEnable", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3911
- }, o.prototype.disablePath = function(e) {
3915
+ }, s.prototype.disablePath = function(e) {
3912
3916
  var n = this.paths.get(e);
3913
3917
  return n ? (n.enabled = !1, this.hooks.emit("pathDisable", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3914
- }, o.prototype.showPath = function(e) {
3918
+ }, s.prototype.showPath = function(e) {
3915
3919
  var n = this.paths.get(e);
3916
3920
  return n ? (n.visible = !0, n.lines.forEach(function(t) {
3917
3921
  return t.visible = !0;
3918
3922
  }), n.particles.visible = !0, n.subMesh.visible = !0, this.hooks.emit("pathShow", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3919
- }, o.prototype.hidePath = function(e) {
3923
+ }, s.prototype.hidePath = function(e) {
3920
3924
  var n = this.paths.get(e);
3921
3925
  return n ? (n.visible = !1, n.lines.forEach(function(t) {
3922
3926
  return t.visible = !1;
3923
3927
  }), n.particles.visible = !1, n.subMesh.visible = !1, this.hooks.emit("pathHide", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3924
- }, o.prototype.getPathIds = function() {
3928
+ }, s.prototype.getPathIds = function() {
3925
3929
  return Array.from(this.paths.keys());
3926
- }, o.prototype.getPathConfig = function(e) {
3930
+ }, s.prototype.getPathConfig = function(e) {
3927
3931
  var n = this.paths.get(e);
3928
3932
  return n ? V({}, n.config) : void 0;
3929
- }, o.prototype.clearAllPaths = function() {
3933
+ }, s.prototype.clearAllPaths = function() {
3930
3934
  var e = this;
3931
- this.paths.forEach(function(r, s) {
3932
- e.stopPathAnimation(s), e.disposePathResources(r);
3935
+ this.paths.forEach(function(r, l) {
3936
+ e.stopPathAnimation(l), e.disposePathResources(r);
3933
3937
  }), this.paths.clear();
3934
3938
  var n = this.data, t = /* @__PURE__ */ new Map();
3935
- this.paths.forEach(function(r, s) {
3936
- t.set(s, r.config);
3939
+ this.paths.forEach(function(r, l) {
3940
+ t.set(l, r.config);
3937
3941
  }), this.data = { paths: t }, this.hooks.emit("dataChange", this.data, n);
3938
- }, o.prototype.getPositions = function(e, n) {
3939
- for (var t = [], r = [], s = 0, l = [], d = 0; d <= n; d++) {
3940
- var f = d / n, m = e.getPoint(f);
3941
- l.push(m.clone()), d > 0 && (s += m.distanceTo(l[d - 1]));
3942
+ }, s.prototype.getPositions = function(e, n) {
3943
+ for (var t = [], r = [], l = 0, o = [], d = 0; d <= n; d++) {
3944
+ var c = d / n, m = e.getPoint(c);
3945
+ o.push(m.clone()), d > 0 && (l += m.distanceTo(o[d - 1]));
3942
3946
  }
3943
3947
  for (var y = 0, d = 0; d < n; d++) {
3944
- d > 0 && (y += l[d].distanceTo(l[d - 1]));
3945
- var A = y / s;
3946
- t.push(l[d].x, l[d].y, l[d].z), r.push(A);
3948
+ d > 0 && (y += o[d].distanceTo(o[d - 1]));
3949
+ var M = y / l;
3950
+ t.push(o[d].x, o[d].y, o[d].z), r.push(M);
3947
3951
  }
3948
3952
  return { positions: t, distanceProgress: r };
3949
- }, o.prototype.createLines = function(e, n, t) {
3950
- for (var r = this, s, l, d = [], f = e.points.length * 40, m = this._config, y = m.lineCount, A = m.spacing, E = m.waveAmp, P = m.waveFreq, x = m.lineYOffset, C = (s = e.lineWidth) !== null && s !== void 0 ? s : this._config.lineWidth, w = (l = e.color) !== null && l !== void 0 ? l : this._config.color, b = n.getLength(), M = t / b, c = function(D) {
3951
- var W = (D - (y - 1) / 2) * A, H = e.points.map(function(I, L) {
3953
+ }, s.prototype.createLines = function(e, n, t) {
3954
+ for (var r = this, l, o, d = [], c = e.points.length * 40, m = this._config, y = m.lineCount, M = m.spacing, w = m.waveAmp, A = m.waveFreq, x = m.lineYOffset, C = (l = e.lineWidth) !== null && l !== void 0 ? l : this._config.lineWidth, E = (o = e.color) !== null && o !== void 0 ? o : this._config.color, b = n.getLength(), T = t / b, f = function(D) {
3955
+ var W = (D - (y - 1) / 2) * M, H = e.points.map(function(I, L) {
3952
3956
  var F = L / (e.points.length - 1), N = n.getTangent(F).normalize(), j = new p.Vector3().crossVectors(r.up, N).normalize(), ne = W * Math.abs((L - e.points.length / 2) / e.points.length - 0.5) * -1;
3953
3957
  return I.clone().addScaledVector(j, W + ne).add(new p.Vector3(0, x + 0.02 * (D % 2 === 0 ? 1 : 0), 0));
3954
- }), X = new p.CatmullRomCurve3(H), $ = O.getPositions(X, f).positions, ae = new nn();
3958
+ }), X = new p.CatmullRomCurve3(H), $ = O.getPositions(X, c).positions, ae = new nn();
3955
3959
  ae.setPositions($);
3956
3960
  var z = new Lt({
3957
- color: w,
3961
+ color: E,
3958
3962
  linewidth: C * (D % 2 === 0 ? 1 : 0.5),
3959
3963
  transparent: !0,
3960
3964
  opacity: 1,
3961
3965
  depthWrite: !1
3962
3966
  });
3963
- z.resolution.set(O.five.camera.resolution.x, O.five.camera.resolution.y), D === 0 ? z.waveDir = 1 : D === 1 ? z.waveDir = 2 : D === 2 ? z.waveDir = 0 : D === 3 ? z.waveDir = 3 : D === 4 && (z.waveDir = 1), z.waveAmp = E, z.waveFreq = P, Object.assign(z.uniforms, {
3967
+ z.resolution.set(O.five.camera.resolution.x, O.five.camera.resolution.y), D === 0 ? z.waveDir = 1 : D === 1 ? z.waveDir = 2 : D === 2 ? z.waveDir = 0 : D === 3 ? z.waveDir = 3 : D === 4 && (z.waveDir = 1), z.waveAmp = w, z.waveFreq = A, Object.assign(z.uniforms, {
3964
3968
  time: { value: 0 },
3965
3969
  startOffset: { value: 0 },
3966
- range: { value: M }
3970
+ range: { value: T }
3967
3971
  });
3968
3972
  var q = new tn(ae, z);
3969
3973
  q.computeLineDistances(), d.push(q), O.five.scene.add(q);
3970
3974
  }, O = this, S = 0; S < y; S++)
3971
- c(S);
3975
+ f(S);
3972
3976
  return d;
3973
- }, o.prototype.createParticleMaterial = function() {
3977
+ }, s.prototype.createParticleMaterial = function() {
3974
3978
  return new p.ShaderMaterial({
3975
3979
  transparent: !0,
3976
3980
  blending: p.AdditiveBlending,
@@ -3996,9 +4000,9 @@ var Qn = (
3996
4000
  }
3997
4001
  `
3998
4002
  });
3999
- }, o.prototype.createParticles = function() {
4000
- for (var e = this._config.particleCount, n = new Float32Array(e * 3), t = new p.BufferGeometry(), r = this.createParticleMaterial(), s = new p.Points(t, r), l = new Float32Array(e), d = [], f = 0; f < e; f++)
4001
- n[f * 3] = 9999, n[f * 3 + 1] = 9999, n[f * 3 + 2] = 9999, l[f] = p.MathUtils.randFloat(3, 9), d.push({
4003
+ }, s.prototype.createParticles = function() {
4004
+ for (var e = this._config.particleCount, n = new Float32Array(e * 3), t = new p.BufferGeometry(), r = this.createParticleMaterial(), l = new p.Points(t, r), o = new Float32Array(e), d = [], c = 0; c < e; c++)
4005
+ n[c * 3] = 9999, n[c * 3 + 1] = 9999, n[c * 3 + 2] = 9999, o[c] = p.MathUtils.randFloat(3, 9), d.push({
4002
4006
  velocity: new p.Vector3(),
4003
4007
  life: 3 + Math.random() * 2,
4004
4008
  age: 0,
@@ -4006,35 +4010,35 @@ var Qn = (
4006
4010
  alpha: 0,
4007
4011
  startPos: new p.Vector3()
4008
4012
  });
4009
- return t.setAttribute("position", new p.BufferAttribute(n, 3)), t.setAttribute("size", new p.BufferAttribute(l, 1)), s.frustumCulled = !1, this.five.scene.add(s), { particles: s, particleGeometry: t, particleMaterial: r, particleInfos: d, particlePositions: n };
4010
- }, o.prototype.createSubMeshGeometry = function(e, n, t) {
4011
- for (var r = e.points.length * 40, s = new p.BufferGeometry(), l = n.getPoints(r), d = [], f = [], m = [], y = [], A = 0, E = [0], P = 1; P < l.length; P++)
4012
- A += l[P].distanceTo(l[P - 1]), E.push(A);
4013
- for (var x = A, P = 0; P < l.length; P++) {
4014
- var C = l[P], w = P / (l.length - 1), b = n.getTangent(w).normalize(), M = new p.Vector3().crossVectors(this.up, b).normalize(), c = t / 2, O = C.clone().addScaledVector(M, -c);
4015
- d.push(O.x, O.y, O.z), f.push(0, E[P] / x), y.push(E[P] / x);
4016
- var S = C.clone().addScaledVector(M, c);
4017
- d.push(S.x, S.y, S.z), f.push(1, E[P] / x), y.push(E[P] / x);
4013
+ return t.setAttribute("position", new p.BufferAttribute(n, 3)), t.setAttribute("size", new p.BufferAttribute(o, 1)), l.frustumCulled = !1, this.five.scene.add(l), { particles: l, particleGeometry: t, particleMaterial: r, particleInfos: d, particlePositions: n };
4014
+ }, s.prototype.createSubMeshGeometry = function(e, n, t) {
4015
+ for (var r = e.points.length * 40, l = new p.BufferGeometry(), o = n.getPoints(r), d = [], c = [], m = [], y = [], M = 0, w = [0], A = 1; A < o.length; A++)
4016
+ M += o[A].distanceTo(o[A - 1]), w.push(M);
4017
+ for (var x = M, A = 0; A < o.length; A++) {
4018
+ var C = o[A], E = A / (o.length - 1), b = n.getTangent(E).normalize(), T = new p.Vector3().crossVectors(this.up, b).normalize(), f = t / 2, O = C.clone().addScaledVector(T, -f);
4019
+ d.push(O.x, O.y, O.z), c.push(0, w[A] / x), y.push(w[A] / x);
4020
+ var S = C.clone().addScaledVector(T, f);
4021
+ d.push(S.x, S.y, S.z), c.push(1, w[A] / x), y.push(w[A] / x);
4018
4022
  }
4019
- for (var P = 0; P < l.length - 1; P++) {
4020
- var D = P * 2;
4023
+ for (var A = 0; A < o.length - 1; A++) {
4024
+ var D = A * 2;
4021
4025
  m.push(D, D + 1, D + 2), m.push(D + 1, D + 3, D + 2);
4022
4026
  }
4023
- return s.setAttribute("position", new p.Float32BufferAttribute(d, 3)), s.setAttribute("uv", new p.Float32BufferAttribute(f, 2)), s.setAttribute("distanceProgress", new p.Float32BufferAttribute(y, 1)), s.setIndex(m), s.computeVertexNormals(), s;
4024
- }, o.prototype.createAlphaMapTexture = function(e, n, t, r, s) {
4025
- for (var l = 1024, d = 1, f = l * d, m = new Uint8Array(f), y = 1 / e, A = t / e, E = n / A, P = E / 2, x = 0; x < l; x++) {
4026
- var C = x / l, w = Math.floor(C / y), b = (C - w * y) / y, M = 0, c = b;
4027
- if (c > 0.5 && (c = 1 - c), c < P) {
4028
- var O = 1 - c / P, S = O;
4029
- M = r + (s - r) * S;
4027
+ return l.setAttribute("position", new p.Float32BufferAttribute(d, 3)), l.setAttribute("uv", new p.Float32BufferAttribute(c, 2)), l.setAttribute("distanceProgress", new p.Float32BufferAttribute(y, 1)), l.setIndex(m), l.computeVertexNormals(), l;
4028
+ }, s.prototype.createAlphaMapTexture = function(e, n, t, r, l) {
4029
+ for (var o = 1024, d = 1, c = o * d, m = new Uint8Array(c), y = 1 / e, M = t / e, w = n / M, A = w / 2, x = 0; x < o; x++) {
4030
+ var C = x / o, E = Math.floor(C / y), b = (C - E * y) / y, T = 0, f = b;
4031
+ if (f > 0.5 && (f = 1 - f), f < A) {
4032
+ var O = 1 - f / A, S = O;
4033
+ T = r + (l - r) * S;
4030
4034
  } else
4031
- M = r;
4032
- m[x] = Math.floor(M * 255);
4035
+ T = r;
4036
+ m[x] = Math.floor(T * 255);
4033
4037
  }
4034
- var D = new p.DataTexture(m, l, d, p.RedFormat);
4038
+ var D = new p.DataTexture(m, o, d, p.RedFormat);
4035
4039
  return D.needsUpdate = !0, D.wrapS = p.RepeatWrapping, D.wrapT = p.ClampToEdgeWrapping, D.minFilter = p.LinearFilter, D.magFilter = p.LinearFilter, D;
4036
- }, o.prototype.createSubMeshMaterial = function(e, n, t, r) {
4037
- var s = this._config, l = s.subMeshSegmentInterval, d = s.subMeshHighlightWidth, f = s.subMeshMaxOpacity, m = Math.max(1, Math.round(t / l)), y = r / t, A = this.createAlphaMapTexture(m, d, t, n, f);
4040
+ }, s.prototype.createSubMeshMaterial = function(e, n, t, r) {
4041
+ var l = this._config, o = l.subMeshSegmentInterval, d = l.subMeshHighlightWidth, c = l.subMeshMaxOpacity, m = Math.max(1, Math.round(t / o)), y = r / t, M = this.createAlphaMapTexture(m, d, t, n, c);
4038
4042
  return new p.ShaderMaterial({
4039
4043
  transparent: !0,
4040
4044
  side: p.BackSide,
@@ -4042,13 +4046,14 @@ var Qn = (
4042
4046
  uniforms: {
4043
4047
  baseColor: { value: new p.Color(e) },
4044
4048
  baseOpacity: { value: n },
4049
+ globalOpacity: { value: 1 },
4045
4050
  animationProgress: { value: 0 },
4046
4051
  range: { value: y },
4047
4052
  startOffset: { value: 0 },
4048
4053
  endOffset: { value: 0 },
4049
4054
  totalLength: { value: 1 },
4050
4055
  unfoldProgress: { value: 0 },
4051
- alphaMap: { value: A }
4056
+ alphaMap: { value: M }
4052
4057
  },
4053
4058
  vertexShader: `
4054
4059
  attribute float distanceProgress;
@@ -4064,6 +4069,7 @@ var Qn = (
4064
4069
  fragmentShader: `
4065
4070
  uniform vec3 baseColor;
4066
4071
  uniform float baseOpacity;
4072
+ uniform float globalOpacity;
4067
4073
  uniform float animationProgress;
4068
4074
  uniform float range;
4069
4075
  uniform float startOffset;
@@ -4117,215 +4123,249 @@ var Qn = (
4117
4123
  sampledAlpha *= (1.0 - adjustedProgress) / fadeLength;
4118
4124
  }
4119
4125
 
4120
- gl_FragColor = vec4(baseColor, sampledAlpha);
4126
+ gl_FragColor = vec4(baseColor, sampledAlpha * globalOpacity);
4121
4127
  }
4122
4128
  `
4123
4129
  });
4124
- }, o.prototype.projectPointsToScreen = function(e, n) {
4125
- for (var t = [], r = 0, s = 0; s < e.length; s++) {
4126
- var l = e[s];
4127
- s > 0 && (r += l.distanceTo(e[s - 1]));
4128
- var d = l.clone().project(n), f = d.x < -1 || d.x > 1 || d.y < -1 || d.y > 1 || d.z < -1 || d.z > 1;
4130
+ }, s.prototype.projectPointsToScreen = function(e, n) {
4131
+ for (var t = [], r = 0, l = 0; l < e.length; l++) {
4132
+ var o = e[l];
4133
+ l > 0 && (r += o.distanceTo(e[l - 1]));
4134
+ var d = o.clone().project(n), c = d.x < -1 || d.x > 1 || d.y < -1 || d.y > 1 || d.z < -1 || d.z > 1;
4129
4135
  t.push({
4130
- point: l.clone(),
4136
+ point: o.clone(),
4131
4137
  screenPos: new p.Vector2(d.x, d.y),
4132
4138
  distanceFromStart: r,
4133
- isOffscreen: f
4139
+ isOffscreen: c
4134
4140
  });
4135
4141
  }
4136
4142
  return t;
4137
- }, o.prototype.findNearestOffscreenPoint = function(e) {
4138
- for (var n = -1, t = 0, r = -1, s = 0; s < e.length; s++)
4139
- if (!e[s].isOffscreen) {
4140
- r = s;
4143
+ }, s.prototype.findNearestOffscreenPoint = function(e) {
4144
+ for (var n = -1, t = 0, r = -1, l = 0; l < e.length; l++)
4145
+ if (!e[l].isOffscreen) {
4146
+ r = l;
4141
4147
  break;
4142
4148
  }
4143
4149
  if (r === -1)
4144
4150
  return null;
4145
- for (var s = r - 1; s >= 0; s--)
4146
- if (e[s].isOffscreen) {
4147
- n = s, t = e[s].distanceFromStart;
4151
+ for (var l = r - 1; l >= 0; l--)
4152
+ if (e[l].isOffscreen) {
4153
+ n = l, t = e[l].distanceFromStart;
4148
4154
  break;
4149
4155
  }
4150
4156
  return n === -1 ? { index: 0, distance: 0 } : {
4151
4157
  index: n,
4152
4158
  distance: t
4153
4159
  };
4154
- }, o.prototype.findFarestOffscreenPoint = function(e) {
4155
- for (var n, t = ((n = e[e.length - 1]) === null || n === void 0 ? void 0 : n.distanceFromStart) || 0, r = -1, s = e.length - 1; s >= 0; s--)
4156
- if (!e[s].isOffscreen) {
4157
- r = s;
4160
+ }, s.prototype.findFarestOffscreenPoint = function(e) {
4161
+ for (var n, t = ((n = e[e.length - 1]) === null || n === void 0 ? void 0 : n.distanceFromStart) || 0, r = -1, l = e.length - 1; l >= 0; l--)
4162
+ if (!e[l].isOffscreen) {
4163
+ r = l;
4158
4164
  break;
4159
4165
  }
4160
4166
  if (r === -1)
4161
4167
  return null;
4162
- var l = r + 1;
4163
- return l < e.length && e[l].isOffscreen ? {
4164
- index: l,
4165
- distance: e[l].distanceFromStart,
4168
+ var o = r + 1;
4169
+ return o < e.length && e[o].isOffscreen ? {
4170
+ index: o,
4171
+ distance: e[o].distanceFromStart,
4166
4172
  totalLength: t
4167
4173
  } : { index: e.length - 1, distance: t, totalLength: t };
4168
- }, o.prototype.updatePathAnimation = function(e) {
4174
+ }, s.prototype.updatePathAnimation = function(e) {
4169
4175
  var n, t, r = this.paths.get(e);
4170
4176
  if (!(!r || !r.enabled)) {
4171
- var s = performance.now() / 1e3, l = this._config, d = l.particleCount, f = l.maxDistance, m = ((n = r.lines[0]) === null || n === void 0 ? void 0 : n.material.uniforms.totalLength.value) || 1, y = Math.max(0.01, m - r.startOffset - r.endOffset), A = r.speed, E = (s - r.cycleStartTime) * A / y % 1;
4177
+ var l = performance.now() / 1e3, o = this._config, d = o.particleCount, c = o.maxDistance, m = ((n = r.lines[0]) === null || n === void 0 ? void 0 : n.material.uniforms.totalLength.value) || 1, y = Math.max(0.01, m - r.startOffset - r.endOffset), M = r.speed, w = (l - r.cycleStartTime) * M / y % 1;
4172
4178
  if (r.isInitialAnimation) {
4173
- var P = E * y;
4174
- if (r.enableSubMesh && P >= 1 && !r.subMeshUnfoldStarted && (r.subMeshUnfoldStarted = !0, r.subMeshUnfoldStartTime = s), r.enableSubMesh && r.subMeshUnfoldStarted && r.subMeshUnfoldProgress < 1) {
4175
- var x = (t = r.config.range) !== null && t !== void 0 ? t : this._config.range, C = s - r.subMeshUnfoldStartTime;
4176
- r.subMeshUnfoldProgress = Math.min(1, C * A / (y - 2 * x)), r.subMeshMaterial.uniforms.unfoldProgress.value = r.subMeshUnfoldProgress;
4179
+ var A = w * y;
4180
+ if (r.enableSubMesh && A >= 1 && !r.subMeshUnfoldStarted && (r.subMeshUnfoldStarted = !0, r.subMeshUnfoldStartTime = l), r.enableSubMesh && r.subMeshUnfoldStarted && r.subMeshUnfoldProgress < 1 && !r.isPaused) {
4181
+ var x = (t = r.config.range) !== null && t !== void 0 ? t : this._config.range, C = l - r.subMeshUnfoldStartTime;
4182
+ r.subMeshUnfoldProgress = Math.min(1, C * M / (y - 2 * x)), r.subMeshMaterial.uniforms.unfoldProgress.value = r.subMeshUnfoldProgress;
4177
4183
  }
4178
- E < r.lastAnimationProgress && (r.isPathlineInitialAnimation = !1, (!r.enableSubMesh || r.subMeshUnfoldProgress >= 1) && (r.isInitialAnimation = !1));
4184
+ w < r.lastAnimationProgress && (r.isPathlineInitialAnimation = !1, (!r.enableSubMesh || r.subMeshUnfoldProgress >= 1) && (r.isInitialAnimation = !1));
4179
4185
  } else
4180
4186
  r.enableSubMesh && (r.subMeshMaterial.uniforms.unfoldProgress.value = 1);
4181
- if (r.lastAnimationProgress = E, r.lastUpdateTime = s, r.isPathlineInitialAnimation && r.lines.forEach(function(X) {
4182
- X.material.uniforms.time.value = s, X.material.uniforms.animationProgress.value = E;
4187
+ if (r.lastAnimationProgress = w, r.lastUpdateTime = l, r.isPathlineInitialAnimation && r.lines.forEach(function(X) {
4188
+ X.material.uniforms.time.value = l, X.material.uniforms.animationProgress.value = w;
4183
4189
  }), r.isPathlineInitialAnimation) {
4184
- var w = null, b = 1 / 0;
4190
+ var E = null, b = 1 / 0;
4185
4191
  if (r.lines.forEach(function(X) {
4186
4192
  for (var $ = X.geometry, ae = $.attributes.instanceDistanceStart, z = $.attributes.instanceDistanceEnd, q = ae.count, I = 0; I < q; I++) {
4187
4193
  var L = ae.getX(I) / X.material.uniforms.totalLength.value, F = z.getX(I) / X.material.uniforms.totalLength.value;
4188
- if (E >= L && E <= F) {
4189
- var N = (E - L) / (F - L), j = new p.Vector3().fromBufferAttribute($.attributes.instanceStart, I), ne = new p.Vector3().fromBufferAttribute($.attributes.instanceEnd, I), K = new p.Vector3().lerpVectors(j, ne, N), U = Math.abs(E - (L + F) / 2);
4190
- U < b && (b = U, w = K);
4194
+ if (w >= L && w <= F) {
4195
+ var N = (w - L) / (F - L), j = new p.Vector3().fromBufferAttribute($.attributes.instanceStart, I), ne = new p.Vector3().fromBufferAttribute($.attributes.instanceEnd, I), K = new p.Vector3().lerpVectors(j, ne, N), U = Math.abs(w - (L + F) / 2);
4196
+ U < b && (b = U, E = K);
4191
4197
  }
4192
4198
  }
4193
- }), w)
4194
- for (var M = 0; M < d; M++) {
4195
- var c = r.particleInfos[M];
4196
- !c.active && Math.random() < 0.05 && (c.active = !0, c.age = 0, c.life = 3 + Math.random() * 2, c.velocity.set((Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4), r.particlePositions[M * 3] = w.x, r.particlePositions[M * 3 + 1] = w.y, r.particlePositions[M * 3 + 2] = w.z, c.startPos.copy(w), c.alpha = 0);
4199
+ }), E)
4200
+ for (var T = 0; T < d; T++) {
4201
+ var f = r.particleInfos[T];
4202
+ !f.active && Math.random() < 0.05 && (f.active = !0, f.age = 0, f.life = 3 + Math.random() * 2, f.velocity.set((Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4), r.particlePositions[T * 3] = E.x, r.particlePositions[T * 3 + 1] = E.y, r.particlePositions[T * 3 + 2] = E.z, f.startPos.copy(E), f.alpha = 0);
4197
4203
  }
4198
- for (var M = 0; M < d; M++) {
4199
- var c = r.particleInfos[M];
4200
- if (c.active) {
4201
- c.age += 0.016;
4202
- var O = r.particlePositions[M * 3] - c.startPos.x, S = r.particlePositions[M * 3 + 1] - c.startPos.y, D = r.particlePositions[M * 3 + 2] - c.startPos.z, W = Math.sqrt(O * O + S * S + D * D);
4203
- (W >= f || c.age >= c.life) && (c.active = !1, r.particlePositions[M * 3] = 9999, r.particlePositions[M * 3 + 1] = 9999, r.particlePositions[M * 3 + 2] = 9999, c.alpha = 0), c.velocity.x += (Math.random() - 0.5) * 1e-4, c.velocity.z += (Math.random() - 0.5) * 1e-4, c.velocity.y += 1e-4, c.velocity.multiplyScalar(0.99), r.particlePositions[M * 3] += c.velocity.x, r.particlePositions[M * 3 + 1] += c.velocity.y, r.particlePositions[M * 3 + 2] += c.velocity.z;
4204
- var H = c.age / c.life;
4205
- H < 0.2 ? c.alpha = H / 0.2 : H > 0.8 ? c.alpha = (1 - H) / 0.2 : c.alpha = 1;
4204
+ for (var T = 0; T < d; T++) {
4205
+ var f = r.particleInfos[T];
4206
+ if (f.active) {
4207
+ f.age += 0.016;
4208
+ var O = r.particlePositions[T * 3] - f.startPos.x, S = r.particlePositions[T * 3 + 1] - f.startPos.y, D = r.particlePositions[T * 3 + 2] - f.startPos.z, W = Math.sqrt(O * O + S * S + D * D);
4209
+ (W >= c || f.age >= f.life) && (f.active = !1, r.particlePositions[T * 3] = 9999, r.particlePositions[T * 3 + 1] = 9999, r.particlePositions[T * 3 + 2] = 9999, f.alpha = 0), f.velocity.x += (Math.random() - 0.5) * 1e-4, f.velocity.z += (Math.random() - 0.5) * 1e-4, f.velocity.y += 1e-4, f.velocity.multiplyScalar(0.99), r.particlePositions[T * 3] += f.velocity.x, r.particlePositions[T * 3 + 1] += f.velocity.y, r.particlePositions[T * 3 + 2] += f.velocity.z;
4210
+ var H = f.age / f.life;
4211
+ H < 0.2 ? f.alpha = H / 0.2 : H > 0.8 ? f.alpha = (1 - H) / 0.2 : f.alpha = 1;
4206
4212
  }
4207
4213
  }
4208
4214
  r.particleGeometry.attributes.position.needsUpdate = !0, r.particleMaterial.opacity = 0.6;
4209
4215
  }
4210
- r.enableSubMesh && (r.subMeshMaterial.uniforms.animationProgress.value = E), this.five.needsRender = !0;
4216
+ r.enableSubMesh && (r.subMeshMaterial.uniforms.animationProgress.value = w), this.five.needsRender = !0;
4211
4217
  }
4212
- }, o.prototype.startPathAnimation = function(e, n) {
4213
- var t = this;
4214
- n === void 0 && (n = 0);
4215
- var r = this.paths.get(e);
4216
- if (!r)
4218
+ }, s.prototype.startPathAnimation = function(e, n) {
4219
+ var t = this, r, l, o = this.paths.get(e);
4220
+ if (!o)
4217
4221
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
4218
- if (r.animationId !== null)
4222
+ if (o.animationId !== null)
4219
4223
  return !1;
4220
- var s = 0;
4221
- if (n > 0) {
4222
- var l = r.config.points;
4223
- n >= l.length && (console.warn("DynamicPathLinePlugin: startPointIndex ".concat(n, " 超出范围,路径只有 ").concat(l.length, " 个点")), n = l.length - 1);
4224
- for (var d = 0; d < n; d++)
4225
- s += l[d].distanceTo(l[d + 1]);
4224
+ var d = (r = n == null ? void 0 : n.startPointIndex) !== null && r !== void 0 ? r : 0, c = (l = n == null ? void 0 : n.fromStart) !== null && l !== void 0 ? l : !1;
4225
+ if (!o.isPaused || c) {
4226
+ var m = 0, y = d;
4227
+ if (y > 0) {
4228
+ var M = o.config.points;
4229
+ y >= M.length && (console.warn("DynamicPathLinePlugin: startPointIndex ".concat(y, " 超出范围,路径只有 ").concat(M.length, " 个点")), y = M.length - 1);
4230
+ for (var w = 0; w < y; w++)
4231
+ m += M[w].distanceTo(M[w + 1]);
4232
+ }
4233
+ o.startOffset = m, o.lines.forEach(function(T) {
4234
+ T.material.uniforms.startOffset.value = m;
4235
+ }), o.enableSubMesh && (o.subMeshMaterial.uniforms.startOffset.value = m);
4226
4236
  }
4227
- r.startOffset = s, r.lines.forEach(function(m) {
4228
- m.material.uniforms.startOffset.value = s;
4229
- }), r.enableSubMesh && (r.subMeshMaterial.uniforms.startOffset.value = s);
4230
- var f = performance.now() / 1e3;
4231
- return r.cycleStartTime = f, r.lastUpdateTime = f, r.animationId = ct.shared.add(function() {
4237
+ var A = performance.now() / 1e3;
4238
+ if (!c && o.isPaused && o.pausedProgress > 0) {
4239
+ var x = o.curve.getLength(), C = Math.max(0.01, x - o.startOffset - o.endOffset), E = o.speed;
4240
+ if (o.cycleStartTime = A - o.pausedProgress * C / E, o.subMeshUnfoldStarted && o.subMeshUnfoldProgress < 1) {
4241
+ var b = o.pausedTime - o.subMeshUnfoldStartTime;
4242
+ o.subMeshUnfoldStartTime = A - b;
4243
+ }
4244
+ o.isPaused = !1;
4245
+ } else
4246
+ o.cycleStartTime = A, o.isPaused = !1, o.pausedProgress = 0;
4247
+ return o.lastUpdateTime = A, this.highlightPath(e, !0), o.animationId = Xe.shared.add(function() {
4232
4248
  t.updatePathAnimation(e);
4233
4249
  }), !0;
4234
- }, o.prototype.stopPathAnimation = function(e) {
4235
- var n = this.paths.get(e);
4236
- return n ? (n.animationId !== null && (n.animationId(), n.animationId = null), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
4237
- }, o.prototype._enable = function(e) {
4250
+ }, s.prototype.stopPathAnimation = function(e, n) {
4251
+ n === void 0 && (n = !1);
4252
+ var t = this.paths.get(e);
4253
+ if (!t)
4254
+ return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
4255
+ if (this.highlightPath(e, !1), t.animationId !== null) {
4256
+ if (n) {
4257
+ var r = performance.now() / 1e3, l = t.curve.getLength(), o = Math.max(0.01, l - t.startOffset - t.endOffset), d = t.speed;
4258
+ if (t.pausedProgress = (r - t.cycleStartTime) * d / o % 1, t.pausedTime = r, t.isPaused = !0, t.subMeshUnfoldStarted && t.subMeshUnfoldProgress < 1) {
4259
+ var c = r - t.subMeshUnfoldStartTime;
4260
+ t.subMeshUnfoldStartTime = r - c;
4261
+ }
4262
+ } else
4263
+ t.isPaused = !1, t.pausedProgress = 0, t.pausedTime = 0;
4264
+ t.animationId(), t.animationId = null;
4265
+ }
4266
+ return !0;
4267
+ }, s.prototype._enable = function(e) {
4238
4268
  this.paths.size > 0 && this.state.playing && this.play();
4239
- }, o.prototype._disable = function(e) {
4269
+ }, s.prototype._disable = function(e) {
4240
4270
  this.pause();
4241
- }, o.prototype.enable = function(e) {
4271
+ }, s.prototype.enable = function(e) {
4242
4272
  var n;
4243
4273
  if (!this.state.enabled) {
4244
4274
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4245
4275
  this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
4246
4276
  }
4247
- }, o.prototype.disable = function(e) {
4277
+ }, s.prototype.disable = function(e) {
4248
4278
  var n;
4249
4279
  if (this.state.enabled !== !1) {
4250
4280
  var t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4251
4281
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
4252
4282
  }
4253
- }, o.prototype.show = function(e) {
4283
+ }, s.prototype.show = function(e) {
4254
4284
  var n, t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4255
4285
  this.paths.forEach(function(r) {
4256
- r.lines.forEach(function(s) {
4257
- return s.visible = !0;
4286
+ r.lines.forEach(function(l) {
4287
+ return l.visible = !0;
4258
4288
  }), r.particles.visible = !0, r.subMesh.visible = !0;
4259
4289
  }), this.updateState({ visible: !0 }, t);
4260
- }, o.prototype.hide = function(e) {
4290
+ }, s.prototype.hide = function(e) {
4261
4291
  var n, t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4262
4292
  this.paths.forEach(function(r) {
4263
- r.lines.forEach(function(s) {
4264
- return s.visible = !1;
4293
+ r.lines.forEach(function(l) {
4294
+ return l.visible = !1;
4265
4295
  }), r.particles.visible = !1, r.subMesh.visible = !1;
4266
4296
  }), this.updateState({ visible: !1 }, t);
4267
- }, o.prototype.setState = function(e, n) {
4297
+ }, s.prototype.setState = function(e, n) {
4268
4298
  var t;
4269
4299
  t = n == null ? void 0 : n.userAction, e.enabled !== void 0 && e.enabled !== this.state.enabled && (e.enabled ? this.enable(n) : this.disable(n)), e.visible !== void 0 && e.visible !== this.state.visible && (e.visible ? this.show(n) : this.hide(n));
4270
- }, o.prototype.play = function() {
4271
- var e = this;
4272
- this.paths.forEach(function(n, t) {
4273
- e.startPathAnimation(t);
4300
+ }, s.prototype.play = function(e) {
4301
+ var n = this;
4302
+ e === void 0 && (e = !1), this.paths.forEach(function(t, r) {
4303
+ n.startPathAnimation(r, { fromStart: e });
4274
4304
  }), this.updateState({ playing: !0 }, !1), this.hooks.emit("animationStart");
4275
- }, o.prototype.pause = function() {
4305
+ }, s.prototype.pause = function() {
4276
4306
  var e = this;
4277
4307
  this.paths.forEach(function(n, t) {
4278
- e.stopPathAnimation(t);
4308
+ e.stopPathAnimation(t, !0);
4279
4309
  }), this.updateState({ playing: !1 }, !1), this.hooks.emit("animationStop");
4280
- }, o.prototype.reset = function() {
4310
+ }, s.prototype.reset = function() {
4281
4311
  var e = this;
4282
4312
  this.paths.forEach(function(n, t) {
4283
4313
  e.stopPathAnimation(t);
4284
4314
  }), this.paths.forEach(function(n) {
4285
- n.isInitialAnimation = !0, n.isPathlineInitialAnimation = !0, n.subMeshUnfoldProgress = 0, n.subMeshUnfoldStarted = !1, n.subMeshUnfoldStartTime = 0, n.lastAnimationProgress = 0, n.cycleStartTime = performance.now() / 1e3, n.lastUpdateTime = performance.now() / 1e3, n.startOffset = 0, n.endOffset = 0, n.lines.forEach(function(l) {
4286
- l.visible = !0, l.material.uniforms.time.value = 0, l.material.uniforms.animationProgress.value = 0, l.material.uniforms.startOffset.value = 0, l.material.uniforms.endOffset.value = 0;
4315
+ n.isInitialAnimation = !0, n.isPathlineInitialAnimation = !0, n.subMeshUnfoldProgress = 0, n.subMeshUnfoldStarted = !1, n.subMeshUnfoldStartTime = 0, n.lastAnimationProgress = 0, n.cycleStartTime = performance.now() / 1e3, n.lastUpdateTime = performance.now() / 1e3, n.startOffset = 0, n.endOffset = 0, n.isPaused = !1, n.pausedProgress = 0, n.pausedTime = 0, n.lines.forEach(function(o) {
4316
+ o.visible = !0, o.material.uniforms.time.value = 0, o.material.uniforms.animationProgress.value = 0, o.material.uniforms.startOffset.value = 0, o.material.uniforms.endOffset.value = 0;
4287
4317
  }), n.particles.visible = !0;
4288
4318
  for (var t = e._config.particleCount, r = 0; r < t; r++) {
4289
- var s = n.particleInfos[r];
4290
- s.active = !1, s.age = 0, s.alpha = 0, n.particlePositions[r * 3] = 9999, n.particlePositions[r * 3 + 1] = 9999, n.particlePositions[r * 3 + 2] = 9999;
4319
+ var l = n.particleInfos[r];
4320
+ l.active = !1, l.age = 0, l.alpha = 0, n.particlePositions[r * 3] = 9999, n.particlePositions[r * 3 + 1] = 9999, n.particlePositions[r * 3 + 2] = 9999;
4291
4321
  }
4292
4322
  n.particleGeometry.attributes.position.needsUpdate = !0, n.subMeshMaterial && (n.subMeshMaterial.uniforms.unfoldProgress.value = 0, n.subMeshMaterial.uniforms.animationProgress.value = 0, n.subMeshMaterial.uniforms.startOffset.value = 0, n.subMeshMaterial.uniforms.endOffset.value = 0);
4293
4323
  });
4294
- }, o.prototype.updateScreenProjection = function(e) {
4295
- var n = this, t = function(s) {
4296
- var l = n.projectPointsToScreen(s.config.points, n.five.camera), d = n.findNearestOffscreenPoint(l);
4297
- d && (s.startOffset = d.distance);
4298
- var f = n.findFarestOffscreenPoint(l);
4299
- f && (s.endOffset = f.totalLength - f.distance), s.lines.forEach(function(m) {
4300
- m.material.uniforms.startOffset.value = s.startOffset, m.material.uniforms.endOffset.value = s.endOffset;
4301
- }), s.subMeshMaterial.uniforms.startOffset.value = s.startOffset, s.subMeshMaterial.uniforms.endOffset.value = s.endOffset, s.cycleStartTime = performance.now() / 1e3, s.lastAnimationProgress = 0;
4324
+ }, s.prototype.highlightPath = function(e, n) {
4325
+ var t = this, r = this.paths.get(e);
4326
+ if (r)
4327
+ var l = r.lines, o = 0, d = 250, c = Xe.shared.add(function(m, y) {
4328
+ o = Math.min(1, o + y / d), n ? (l.forEach(function(M) {
4329
+ M.material.uniforms.opacity.value = 0.3 + o * 0.7;
4330
+ }), r.particleMaterial.opacity = 0.3 + o * 0.7, r.enableSubMesh && (r.subMeshMaterial.uniforms.globalOpacity.value = 0.3 + o * 0.7)) : (l.forEach(function(M) {
4331
+ M.material.uniforms.opacity.value = 1 - o * 0.7;
4332
+ }), r.particleMaterial.opacity = 0.6 * (1 - o * 0.7), r.enableSubMesh && (r.subMeshMaterial.uniforms.globalOpacity.value = 1 - o * 0.7)), t.five.needsRender = !0, o === 1 && c();
4333
+ });
4334
+ }, s.prototype.updateScreenProjection = function(e) {
4335
+ var n = this, t = function(l) {
4336
+ var o = n.projectPointsToScreen(l.config.points, n.five.camera), d = n.findNearestOffscreenPoint(o);
4337
+ d && (l.startOffset = d.distance);
4338
+ var c = n.findFarestOffscreenPoint(o);
4339
+ c && (l.endOffset = c.totalLength - c.distance), l.lines.forEach(function(m) {
4340
+ m.material.uniforms.startOffset.value = l.startOffset, m.material.uniforms.endOffset.value = l.endOffset;
4341
+ }), l.subMeshMaterial.uniforms.startOffset.value = l.startOffset, l.subMeshMaterial.uniforms.endOffset.value = l.endOffset, l.cycleStartTime = performance.now() / 1e3, l.lastAnimationProgress = 0;
4302
4342
  };
4303
4343
  if (e) {
4304
4344
  var r = this.paths.get(e);
4305
4345
  r && t(r);
4306
4346
  } else
4307
- this.paths.forEach(function(s) {
4308
- s.enabled && t(s);
4347
+ this.paths.forEach(function(l) {
4348
+ l.enabled && t(l);
4309
4349
  });
4310
- }, o.prototype.disposePathResources = function(e) {
4350
+ }, s.prototype.disposePathResources = function(e) {
4311
4351
  var n = this;
4312
4352
  e.lines.forEach(function(t) {
4313
4353
  n.five.scene.remove(t), t.geometry.dispose(), t.material.dispose();
4314
4354
  }), this.five.scene.remove(e.particles), e.particleGeometry.dispose(), e.particleMaterial.dispose(), this.five.scene.remove(e.subMesh), e.subMeshGeometry.dispose(), e.subMeshMaterial.dispose();
4315
- }, o.prototype.dispose = function() {
4355
+ }, s.prototype.dispose = function() {
4316
4356
  this.pause(), this.clearAllPaths(), this.hooks.emit("dispose");
4317
- }, o;
4357
+ }, s;
4318
4358
  })(Ot.Controller)
4319
- ), or = function(h, o) {
4320
- return new Qn(h, o);
4359
+ ), or = function(h, s) {
4360
+ return new Qn(h, s);
4321
4361
  };
4322
4362
  export {
4323
4363
  rr as BackgroundPlugin,
4324
- Xe as BasePlugin,
4364
+ qe as BasePlugin,
4325
4365
  zn as CSS3DRenderer,
4326
4366
  or as DynamicPathLinePlugin,
4327
4367
  tr as ItemMaskPlugin,
4328
- qe as OrbitControls,
4368
+ Ke as OrbitControls,
4329
4369
  nr as OrientationPlugin,
4330
4370
  ir as PanoAnimePlugin,
4331
4371
  jn as RoundedBoxGeometry,