@realsee/dnalogel 3.50.16 → 3.50.18-alpha.0

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 (118) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +116 -0
  3. package/dist/ModelMakerPlugin/Controller.d.ts +2 -0
  4. package/dist/Sculpt/utils/export.d.ts +18 -0
  5. package/dist/index.cjs.js +207 -207
  6. package/dist/index.js +34867 -34776
  7. package/dist/index.umd.js +211 -211
  8. package/dist/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
  9. package/dist/shared-utils/index.d.ts +1 -0
  10. package/dist/shared-utils/tag.d.ts +41 -2
  11. package/dist/shared-utils/three/temp.d.ts +2 -2
  12. package/libs/AreaMakerPlugin/Controller.js +100 -46
  13. package/libs/AreaMakerPlugin/index.js +64 -10
  14. package/libs/AreaMakerPlugin/utils/Item.js +156 -100
  15. package/libs/CSS3DRenderPlugin/Controller.js +93 -44
  16. package/libs/CSS3DRenderPlugin/index.js +62 -13
  17. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +105 -49
  18. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +130 -77
  19. package/libs/CruisePlugin/BaseController.js +143 -89
  20. package/libs/CruisePlugin/Move.js +83 -39
  21. package/libs/CruisePlugin/Work.js +95 -51
  22. package/libs/CruisePlugin/index.js +66 -22
  23. package/libs/CurrentPanoImagePlugin/Controller.js +139 -85
  24. package/libs/CurrentPanoImagePlugin/index.js +63 -9
  25. package/libs/GuideLinePlugin/Controller.js +57 -13
  26. package/libs/GuideLinePlugin/GuideLineItem.js +63 -19
  27. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +6 -2
  28. package/libs/GuideLinePlugin/GuideLineModeItem.js +58 -14
  29. package/libs/GuideLinePlugin/index.js +66 -22
  30. package/libs/ModelMakerPlugin/Controller.d.ts +2 -0
  31. package/libs/ModelMakerPlugin/Controller.js +190 -129
  32. package/libs/ModelMakerPlugin/index.js +63 -21
  33. package/libs/ModelMakerPlugin/item/baseItem.js +4 -2
  34. package/libs/ModelMakerPlugin/item/boxItem.js +5 -3
  35. package/libs/ModelMakerPlugin/item/polygonItem.js +9 -7
  36. package/libs/ModelMakerPlugin/item/prismItem.js +5 -3
  37. package/libs/ModelTVVideoPlugin/Plugin.js +96 -47
  38. package/libs/ModelTVVideoPlugin/index.js +55 -6
  39. package/libs/Object3DHelperPlugin/Controller.js +42 -25
  40. package/libs/Object3DHelperPlugin/index.js +28 -12
  41. package/libs/PanoCompassPlugin/Controller.js +92 -44
  42. package/libs/PanoCompassPlugin/index.js +63 -15
  43. package/libs/PanoDoorLabelPlugin/BaseController.js +79 -25
  44. package/libs/PanoDoorLabelPlugin/Controller.js +132 -78
  45. package/libs/PanoDoorLabelPlugin/index.js +63 -9
  46. package/libs/PanoMeasurePlugin/Components/Controller0.js +126 -77
  47. package/libs/PanoMeasurePlugin/Components/Controller1.js +139 -90
  48. package/libs/PanoMeasurePlugin/Controller/EditController.js +120 -71
  49. package/libs/PanoMeasurePlugin/Controller/WatchController.js +120 -70
  50. package/libs/PanoMeasurePlugin/Controller/index.js +132 -86
  51. package/libs/PanoMeasurePlugin/Model/area.js +72 -22
  52. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +56 -0
  53. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +64 -15
  54. package/libs/PanoMeasurePlugin/index.js +62 -16
  55. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +57 -2
  56. package/libs/PanoRulerProPlugin/Controller.js +88 -33
  57. package/libs/PanoRulerProPlugin/RulerItems.js +146 -91
  58. package/libs/PanoRulerProPlugin/index.js +64 -9
  59. package/libs/PanoSpatialTagPlugin/Plugin.js +177 -128
  60. package/libs/PanoSpatialTagPlugin/index.js +53 -4
  61. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +116 -60
  62. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +192 -136
  63. package/libs/PanoTagPlugin/Components/Tag/index.js +194 -139
  64. package/libs/PanoTagPlugin/Components/TagContainer.js +112 -57
  65. package/libs/PanoTagPlugin/Components/TagItem.js +204 -149
  66. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +157 -101
  67. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +75 -20
  68. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +86 -31
  69. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +93 -37
  70. package/libs/PanoTagPlugin/controller/TagRender.js +62 -18
  71. package/libs/PanoTagPlugin/controller/TagUtil.js +123 -79
  72. package/libs/PanoTagPlugin/controller/index.js +110 -72
  73. package/libs/PanoTagPlugin/index.js +72 -28
  74. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +77 -21
  75. package/libs/PanoVideoPlugin/Controller.js +95 -41
  76. package/libs/PanoVideoPlugin/VideoMeshController.js +119 -63
  77. package/libs/PanoVideoPlugin/index.js +66 -12
  78. package/libs/PipelinePlugin/Controller.js +173 -119
  79. package/libs/PipelinePlugin/index.js +63 -9
  80. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +70 -14
  81. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +58 -2
  82. package/libs/PipelinePlugin/utils/Objects/Pipe.js +98 -42
  83. package/libs/Sculpt/Meshes/Box.js +3 -2
  84. package/libs/Sculpt/Meshes/Cylinder.js +10 -6
  85. package/libs/Sculpt/Meshes/Line.js +43 -38
  86. package/libs/Sculpt/Meshes/LineWithDots.js +14 -10
  87. package/libs/Sculpt/Meshes/Point.js +24 -20
  88. package/libs/Sculpt/Meshes/Polygon.js +5 -2
  89. package/libs/Sculpt/Meshes/Prism.js +19 -16
  90. package/libs/Sculpt/Objects/Line/Editor.js +6 -5
  91. package/libs/Sculpt/index.js +15 -14
  92. package/libs/Sculpt/utils/export.d.ts +18 -0
  93. package/libs/Sculpt/utils/export.js +21 -0
  94. package/libs/Sculpt/utils/three/ColoredMesh.js +26 -22
  95. package/libs/base/BasePlugin.js +14 -10
  96. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +146 -94
  97. package/libs/floorplan/MapviewFloorplanPlugin/index.js +62 -10
  98. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +109 -56
  99. package/libs/floorplan/ModelFloorplanPlugin/index.js +62 -9
  100. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +116 -63
  101. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +62 -9
  102. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +105 -52
  103. package/libs/floorplan/TopviewFloorplanPlugin/index.js +62 -9
  104. package/libs/floorplan/index.js +4 -0
  105. package/libs/index.js +208 -206
  106. package/libs/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
  107. package/libs/shared-utils/five/fiveEveryReadyListener.js +15 -0
  108. package/libs/shared-utils/five/index.js +6 -2
  109. package/libs/shared-utils/five/lookObject.js +31 -27
  110. package/libs/shared-utils/index.d.ts +1 -0
  111. package/libs/shared-utils/index.js +19 -17
  112. package/libs/shared-utils/logger.js +1 -1
  113. package/libs/shared-utils/tag.d.ts +41 -2
  114. package/libs/shared-utils/tag.js +139 -86
  115. package/libs/shared-utils/three/index.js +4 -0
  116. package/libs/shared-utils/three/temp.d.ts +2 -2
  117. package/libs/shared-utils/three/temp.js +4 -4
  118. package/package.json +1 -1
@@ -21,20 +21,20 @@ var j = (c, i) => {
21
21
  };
22
22
  var f = (c, i, e) => (M(c, typeof i != "symbol" ? i + "" : i, e), e);
23
23
  var y = (c, i, e) => new Promise((t, r) => {
24
- var n = (s) => {
24
+ var o = (n) => {
25
25
  try {
26
- o(e.next(s));
26
+ s(e.next(n));
27
27
  } catch (d) {
28
28
  r(d);
29
29
  }
30
- }, l = (s) => {
30
+ }, l = (n) => {
31
31
  try {
32
- o(e.throw(s));
32
+ s(e.throw(n));
33
33
  } catch (d) {
34
34
  r(d);
35
35
  }
36
- }, o = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(n, l);
37
- o((e = e.apply(c, i)).next());
36
+ }, s = (n) => n.done ? t(n.value) : Promise.resolve(n.value).then(o, l);
37
+ s((e = e.apply(c, i)).next());
38
38
  });
39
39
  import { Subscribe as Q } from "../../../shared-utils/Subscribe.js";
40
40
  import { calculateTagConfig as w } from "../../utils/tag/calculateTagConfig.js";
@@ -51,13 +51,17 @@ import "../../../vendor/three/examples/jsm/lines/LineGeometry.js";
51
51
  import { anyPositionToVector3 as A } from "../../../shared-utils/positionToVector3.js";
52
52
  import { toArray as ie } from "../../../shared-utils/util.js";
53
53
  import "../../../shared-utils/three/core/Sphere.js";
54
- import { blink as te, reblink as ne } from "../../../shared-utils/three/blink.js";
55
- import { vectorToCoordinates as se } from "../../../shared-utils/vectorToCoordinate.js";
54
+ import { blink as te, reblink as oe } from "../../../shared-utils/three/blink.js";
55
+ import { vectorToCoordinates as ne } from "../../../shared-utils/vectorToCoordinate.js";
56
56
  import { transformPosition as O } from "../../../shared-utils/five/transformPosition.js";
57
57
  import { isNil as R, notNil as E } from "../../../shared-utils/isNil.js";
58
- import { lookPoint as oe } from "../../../shared-utils/five/lookPoint.js";
58
+ import { lookPoint as se } from "../../../shared-utils/five/lookPoint.js";
59
59
  import { uuid as re } from "../../../shared-utils/uuid.js";
60
60
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
61
+ import "../../../Sculpt/Meshes/Polygon.js";
62
+ import "../../../Sculpt/utils/Modules/Global.js";
63
+ import "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
64
+ import "../../../Sculpt/utils/three/rayOnLine.js";
61
65
  import { objectAssignDeepExports as b } from "../../../vendor/object-assign-deep/objectAssignDeep.js";
62
66
  import { getTagPosition as L, getTagCenterPosition as $ } from "../../utils/tagPosition.js";
63
67
  import { checkRange as k } from "../../utils/checkRange.js";
@@ -78,6 +82,8 @@ import "../../../shared-utils/Utils/FiveUtil.js";
78
82
  import "../../../shared-utils/Utils/BaseUtil.js";
79
83
  import "../../../shared-utils/Utils/WorkUtil.js";
80
84
  import "../../../shared-utils/dom/resizeObserver.js";
85
+ import "../../../shared-utils/five/fiveEveryReadyListener.js";
86
+ import "../../../shared-utils/throttle.js";
81
87
  import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
82
88
  import "../../../shared-utils/three/Magnifier.js";
83
89
  import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
@@ -86,6 +92,7 @@ import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
86
92
  import "../../../CSS3DRenderPlugin/utils/even.js";
87
93
  import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
88
94
  import "../../../shared-utils/three/getObjectVisible.js";
95
+ import "../../../shared-utils/three/core/Raycaster.js";
89
96
  import "../../../shared-utils/three/PointSelector/utils/html.js";
90
97
  import "../../../shared-utils/five/initialCSS3DRender.js";
91
98
  import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
@@ -106,8 +113,57 @@ import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
106
113
  import "../../../shared-utils/three/PointSelector/utils/contents.js";
107
114
  import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
108
115
  import "../../../vendor/three/build/three.module.js";
116
+ import "../../../shared-utils/three/generatePolygonGeometry.js";
117
+ import "../../../shared-utils/three/earcut3D.js";
118
+ import "earcut";
119
+ import "../../../shared-utils/three/getNormal.js";
120
+ import "../../../PanoMeasurePlugin/utils/isIntersecting.js";
121
+ import "../../../Sculpt/utils/three/ColoredMesh.js";
122
+ import "../../../shared-utils/three/geometryUtil.js";
123
+ import "../../../Sculpt/utils/Modules/Cursor.js";
124
+ import "../../../Object3DHelperPlugin/Controller.js";
125
+ import "../../../base/BasePlugin.js";
126
+ import "../../../shared-utils/url/absoluteUrl.js";
127
+ import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
128
+ import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
129
+ import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
130
+ import "../../../shared-utils/three/boundingBox.js";
131
+ import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
132
+ import "../../../shared-utils/Object3DHelper/utils/direction.js";
133
+ import "../../../shared-utils/Object3DHelper/Constants/color.js";
134
+ import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
135
+ import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
136
+ import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
137
+ import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
138
+ import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
139
+ import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
140
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
141
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
142
+ import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
143
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
144
+ import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
145
+ import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
146
+ import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
147
+ import "../../../shared-utils/threex/domevents/index.js";
148
+ import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
149
+ import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
150
+ import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
151
+ import "../../../shared-utils/Object3DHelper/index.js";
152
+ import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
153
+ import "../../../shared-utils/math/rad2Deg.js";
154
+ import "../../../shared-utils/math/deg2Rad.js";
155
+ import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
156
+ import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
157
+ import "../../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
158
+ import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
159
+ import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
160
+ import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
161
+ import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
162
+ import "../../../shared-utils/five/fiveModelLoad.js";
163
+ import "../../../shared-utils/five/FiveDomEvents.js";
164
+ import "../../../shared-utils/five/calculateThreeMouse.js";
109
165
  import "../../../shared-utils/formatRad.js";
110
- class Ti {
166
+ class Ft {
111
167
  constructor(i, e) {
112
168
  f(this, "plugin");
113
169
  f(this, "id");
@@ -137,17 +193,17 @@ class Ti {
137
193
  f(this, "computedConfig");
138
194
  f(this, "cache");
139
195
  f(this, "entryFromModel");
140
- var s, d, h, u;
196
+ var n, d, h, u;
141
197
  this.plugin = i;
142
198
  const t = Y(e);
143
199
  e.stickType = t;
144
- const r = JSON.parse(JSON.stringify(e.data)), n = (s = e.initialConfig) != null ? s : e.config ? JSON.parse(JSON.stringify(e.config)) : {};
145
- e.initialConfig = n;
146
- const l = w(e, i.config), o = this.getConfig(e);
147
- e.config = o, this.id = (d = e.id) != null ? d : re(), this.enabled = (h = e.enabled) != null ? h : !0, this.contentType = e.contentType, this.data = (u = o.initialData) != null && u.important ? b(e.data, r, o.initialData) : b(e.data, o.initialData, r), this.state = p({
200
+ const r = JSON.parse(JSON.stringify(e.data)), o = (n = e.initialConfig) != null ? n : e.config ? JSON.parse(JSON.stringify(e.config)) : {};
201
+ e.initialConfig = o;
202
+ const l = w(e, i.config), s = this.getConfig(e);
203
+ e.config = s, this.id = (d = e.id) != null ? d : re(), this.enabled = (h = e.enabled) != null ? h : !0, this.contentType = e.contentType, this.data = (u = s.initialData) != null && u.important ? b(e.data, r, s.initialData) : b(e.data, s.initialData, r), this.state = p({
148
204
  visible: void 0,
149
205
  unfolded: !this.can("fold")
150
- }, o.initialState), this.originPosition = e.position, e.originPosition = this.originPosition, this.position = (() => {
206
+ }, s.initialState), this.originPosition = e.position, e.originPosition = this.originPosition, this.position = (() => {
151
207
  const a = e.originPosition;
152
208
  if (!a)
153
209
  return;
@@ -156,7 +212,7 @@ class Ti {
156
212
  })(), this.matrix = e.matrix ? (() => {
157
213
  const a = new B.Matrix4().fromArray(e.matrix);
158
214
  return a.premultiply(i.workUtil.transform), a.elements;
159
- })() : e.matrix, this.initialConfig = n, this.computedConfig = l, this.stickType = t, this.config = e.config, this.fiveState = e.fiveState, this.normal = e.normal, this.cache = new fe(), this.hooks = new Q(), Object.keys(e).forEach((a) => {
215
+ })() : e.matrix, this.initialConfig = o, this.computedConfig = l, this.stickType = t, this.config = e.config, this.fiveState = e.fiveState, this.normal = e.normal, this.cache = new fe(), this.hooks = new Q(), Object.keys(e).forEach((a) => {
160
216
  this[a] === void 0 && e[a] !== void 0 && (this[a] = e[a]);
161
217
  });
162
218
  }
@@ -174,9 +230,9 @@ class Ti {
174
230
  return ee(...Array.isArray(i) ? i : [i]);
175
231
  }
176
232
  get currentConfig() {
177
- var r, n;
233
+ var r, o;
178
234
  const i = w(this, this.plugin.config, { useCache: !0 }), e = this.five.getCurrentState().mode, t = (r = i.configWithFiveMode) == null ? void 0 : r[e];
179
- return (n = t != null ? t : i) != null ? n : {};
235
+ return (o = t != null ? t : i) != null ? o : {};
180
236
  }
181
237
  get currentVisible() {
182
238
  return !(!this.plugin.state.enabled || !this.plugin.state.visible || !this.enabled || !this.state.visible);
@@ -201,17 +257,17 @@ class Ti {
201
257
  return;
202
258
  const t = (r = i == null ? void 0 : i.targetMode) != null ? r : this.five.state.mode;
203
259
  if (t === "Panorama") {
204
- const n = e == null ? void 0 : e.panoIndex;
205
- if (R(n))
260
+ const o = e == null ? void 0 : e.panoIndex;
261
+ if (R(o))
206
262
  return;
207
- const l = this.workUtil.getObserverPosition(n), o = this.centerPosition.clone().sub(l).normalize();
263
+ const l = this.workUtil.getObserverPosition(o), s = this.centerPosition.clone().sub(l).normalize();
208
264
  this.five.setState(p({
209
265
  mode: "Panorama",
210
266
  workCode: this.workUtil.workCode,
211
- panoIndex: n
212
- }, se(o))), yield this.five.ready();
267
+ panoIndex: o
268
+ }, ne(s))), yield this.five.ready();
213
269
  } else
214
- t === "Mapview" && (yield oe(this.five, this.centerPosition, i == null ? void 0 : i.pointConfig));
270
+ t === "Mapview" && (yield se(this.five, this.centerPosition, i == null ? void 0 : i.pointConfig));
215
271
  });
216
272
  }
217
273
  /**
@@ -219,8 +275,8 @@ class Ti {
219
275
  */
220
276
  blink(i) {
221
277
  return y(this, null, function* () {
222
- var o, s, d, h;
223
- const e = (o = this.enabled) != null ? o : !0, t = (s = this.state) == null ? void 0 : s.visible, r = e && t;
278
+ var s, n, d, h;
279
+ const e = (s = this.enabled) != null ? s : !0, t = (n = this.state) == null ? void 0 : n.visible, r = e && t;
224
280
  r === !1 && (this.state.visible = !0, this.enabled = !0, this.applyVisible(), this.plugin.render(), this.computeRenderType() !== "Mesh" ? yield new Promise((u) => y(this, null, function* () {
225
281
  if (this.dom || this.contentDom) {
226
282
  u();
@@ -238,16 +294,16 @@ class Ti {
238
294
  this.mediaPlane && (u(), clearInterval(a));
239
295
  }, 16.7);
240
296
  }))), this.dom && (this.dom.style.visibility = "hidden"), this.contentDom && (this.contentDom.style.visibility = "hidden"));
241
- const n = (() => {
297
+ const o = (() => {
242
298
  var a;
243
299
  const u = [];
244
300
  return u.push(this.dom), this.stickType !== "2DPoint" && u.push(this.contentDom), u.push((a = this.model) == null ? void 0 : a.object), u.push(this.mediaPlane), u.filter(Boolean);
245
301
  })();
246
- if (!n.length) {
302
+ if (!o.length) {
247
303
  console.warn("tagDom is empty");
248
304
  return;
249
305
  }
250
- yield (r ? te : ne)(n, p({
306
+ yield (r ? te : oe)(o, p({
251
307
  begin: () => {
252
308
  r === !1 && (this.dom && (this.dom.style.visibility = ""), this.contentDom && (this.contentDom.style.visibility = ""));
253
309
  },
@@ -335,13 +391,13 @@ class Ti {
335
391
  this.zIndex = Math.round((1e4 - (i != null ? i : 0)) * 100);
336
392
  }
337
393
  getConfig(i, e) {
338
- var l, o, s;
339
- const t = w(i != null ? i : this, this.plugin.config, { useCache: e == null ? void 0 : e.useCache }), r = (l = e == null ? void 0 : e.fiveMode) != null ? l : this.five.getCurrentState().mode, n = (o = t.configWithFiveMode) == null ? void 0 : o[r];
340
- return (s = n != null ? n : t) != null ? s : {};
394
+ var l, s, n;
395
+ const t = w(i != null ? i : this, this.plugin.config, { useCache: e == null ? void 0 : e.useCache }), r = (l = e == null ? void 0 : e.fiveMode) != null ? l : this.five.getCurrentState().mode, o = (s = t.configWithFiveMode) == null ? void 0 : s[r];
396
+ return (n = o != null ? o : t) != null ? n : {};
341
397
  }
342
398
  getDistance(i, e = 3) {
343
- const t = p(p({}, this.five.getCurrentState()), i), { panoIndex: r, mode: n } = t, l = n === "Panorama" ? this.workUtil.getObserverPosition(r) : this.five.camera.position, o = this.centerPosition;
344
- return !l || !o ? -1 : l.distanceTo(o);
399
+ const t = p(p({}, this.five.getCurrentState()), i), { panoIndex: r, mode: o } = t, l = o === "Panorama" ? this.workUtil.getObserverPosition(r) : this.five.camera.position, s = this.centerPosition;
400
+ return !l || !s ? -1 : l.distanceTo(s);
345
401
  }
346
402
  getVisible(i) {
347
403
  if (!this.enabled || !this.plugin.state.enabled || !this.fiveUtil.model)
@@ -402,68 +458,68 @@ class Ti {
402
458
  return i != null ? i : "Dom";
403
459
  }
404
460
  computeVisible(i) {
405
- const e = p(p({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = e, n = [];
461
+ const e = p(p({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = e, o = [];
406
462
  return (() => {
407
463
  var d, u, a;
408
- const s = (d = this.getConfig().visibleConfig) != null ? d : {};
409
- if (typeof s == "function")
464
+ const n = (d = this.getConfig().visibleConfig) != null ? d : {};
465
+ if (typeof n == "function")
410
466
  return {
411
- value: s(this.five, { tag: this, distance: this.getDistance(e, void 0) }),
412
- checkedList: n,
467
+ value: n(this.five, { tag: this, distance: this.getDistance(e, void 0) }),
468
+ checkedList: o,
413
469
  reason: "config function result"
414
470
  };
415
471
  {
416
- if (s.keep === "hidden")
417
- return { value: !1, checkedList: n, reason: "config.keep is hidden" };
418
- if (s.keep === "visible")
419
- return { value: !0, checkedList: n, reason: "config.keep is visible" };
420
- const g = this.computeVisibleByFiveMode(s, r);
472
+ if (n.keep === "hidden")
473
+ return { value: !1, checkedList: o, reason: "config.keep is hidden" };
474
+ if (n.keep === "visible")
475
+ return { value: !0, checkedList: o, reason: "config.keep is visible" };
476
+ const g = this.computeVisibleByFiveMode(n, r);
421
477
  if ((g == null ? void 0 : g.value) === !1)
422
478
  return g;
423
- if (s.followModelVisibility === !0 && ["poincare", "aerophoto", "sand"].includes(this.workUtil.fromType) && (r === "Floorplan" || r === "Mapview")) {
479
+ if (n.followModelVisibility === !0 && ["poincare", "aerophoto", "sand"].includes(this.workUtil.fromType) && (r === "Floorplan" || r === "Mapview")) {
424
480
  const h = this.computeVisibleByFloorIndex(), { value: m } = h, v = j(h, ["value"]);
425
481
  if (m === !1)
426
- return p({ value: !1, checkedList: n, reason: "followModelVisibility check failed" }, v);
482
+ return p({ value: !1, checkedList: o, reason: "followModelVisibility check failed" }, v);
427
483
  }
428
- if (U(r) && s.visiblePanoIndex !== void 0 && s.visiblePanoIndex !== "all" && t !== void 0) {
429
- if (n.push("visiblePanoIndex"), Array.isArray(s.visiblePanoIndex) && !s.visiblePanoIndex.includes(t))
484
+ if (U(r) && n.visiblePanoIndex !== void 0 && n.visiblePanoIndex !== "all" && t !== void 0) {
485
+ if (o.push("visiblePanoIndex"), Array.isArray(n.visiblePanoIndex) && !n.visiblePanoIndex.includes(t))
430
486
  return {
431
487
  value: !1,
432
- checkedList: n,
433
- reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${t}, visiblePanoIndex: ${s.visiblePanoIndex}`
488
+ checkedList: o,
489
+ reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${t}, visiblePanoIndex: ${n.visiblePanoIndex}`
434
490
  };
435
- if (s.visiblePanoIndex === "current" && t !== ((u = this.fiveState) == null ? void 0 : u.panoIndex))
491
+ if (n.visiblePanoIndex === "current" && t !== ((u = this.fiveState) == null ? void 0 : u.panoIndex))
436
492
  return {
437
493
  value: !1,
438
- checkedList: n,
494
+ checkedList: o,
439
495
  reason: `current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${t}, tag.panoIndex: ${(a = this.fiveState) == null ? void 0 : a.panoIndex}`
440
496
  };
441
497
  }
442
- if (s.visibleDistance !== void 0 && (n.push("visibleDistance"), s.visibleDistance !== "unLimited")) {
498
+ if (n.visibleDistance !== void 0 && (o.push("visibleDistance"), n.visibleDistance !== "unLimited")) {
443
499
  const m = this.getDistance(e, 1);
444
- if (k(m, s.visibleDistance) === !1)
500
+ if (k(m, n.visibleDistance) === !1)
445
501
  return {
446
502
  value: !1,
447
- checkedList: n,
503
+ checkedList: o,
448
504
  panoIndex: t,
449
- visibleDistance: s.visibleDistance,
450
- reason: `distance is not in visibleDistance. distance: ${m}, visibleDistance: ${s.visibleDistance.min} - ${s.visibleDistance.max}`
505
+ visibleDistance: n.visibleDistance,
506
+ reason: `distance is not in visibleDistance. distance: ${m}, visibleDistance: ${n.visibleDistance.min} - ${n.visibleDistance.max}`
451
507
  };
452
508
  }
453
- if (s.intersectRaycaster !== !1 && (typeof s.intersectRaycaster != "object" || s.intersectRaycaster.enabled !== !1)) {
454
- if (n.push("intersectRaycaster"), t === void 0)
509
+ if (n.intersectRaycaster !== !1 && (typeof n.intersectRaycaster != "object" || n.intersectRaycaster.enabled !== !1)) {
510
+ if (o.push("intersectRaycaster"), t === void 0)
455
511
  return {
456
512
  value: !1,
457
- checkedList: n,
513
+ checkedList: o,
458
514
  reason: `intersectRaycaster check failed: panoIndex is ${t}`
459
515
  };
460
516
  const m = this.computeVisibleByIntersect(t);
461
517
  if (m.value === !1)
462
- return Object.assign(m, { checkedList: n });
518
+ return Object.assign(m, { checkedList: o });
463
519
  }
464
520
  return {
465
521
  value: !0,
466
- checkedList: n,
522
+ checkedList: o,
467
523
  reason: "all check passed"
468
524
  };
469
525
  }
@@ -474,28 +530,28 @@ class Ti {
474
530
  */
475
531
  computeVisibleByFiveMode(i, e) {
476
532
  const t = () => {
477
- var l, o;
478
- let n = typeof i.visibleFiveMode == "function" ? i.visibleFiveMode(this) : i.visibleFiveMode;
479
- if (n || (n = (o = (l = this.fiveState) == null ? void 0 : l.mode) != null ? o : this.workUtil.observers.length ? "Panorama" : "ModelLike"), Array.isArray(n))
480
- return n.includes(e);
481
- if (n === "ModelLike")
533
+ var l, s;
534
+ let o = typeof i.visibleFiveMode == "function" ? i.visibleFiveMode(this) : i.visibleFiveMode;
535
+ if (o || (o = (s = (l = this.fiveState) == null ? void 0 : l.mode) != null ? s : this.workUtil.observers.length ? "Panorama" : "ModelLike"), Array.isArray(o))
536
+ return o.includes(e);
537
+ if (o === "ModelLike")
482
538
  return C(e);
483
- if (n === "PanoramaLike")
539
+ if (o === "PanoramaLike")
484
540
  return !U(e);
485
- if (n === "all")
541
+ if (o === "all")
486
542
  return !0;
487
- if (typeof n == "string")
488
- return n === e;
543
+ if (typeof o == "string")
544
+ return o === e;
489
545
  };
490
546
  if ((() => {
491
547
  var l;
492
- const n = t();
548
+ const o = t();
493
549
  if (E((l = this.fiveState) == null ? void 0 : l.panoIndex) && i.entryFromModel) {
494
- if (C(e) && n ? this.entryFromModel = !1 : this.entryFromModel = !0, C(e))
550
+ if (C(e) && o ? this.entryFromModel = !1 : this.entryFromModel = !0, C(e))
495
551
  return !0;
496
552
  } else
497
553
  this.entryFromModel = !1;
498
- return n;
554
+ return o;
499
555
  })() === !1)
500
556
  return {
501
557
  value: !1,
@@ -506,19 +562,19 @@ class Ti {
506
562
  }
507
563
  /** 通过射线检测标签可用性 */
508
564
  computeVisibleByIntersect(i) {
509
- var s, d, h, u;
510
- const e = z(z((s = this.getConfig().visibleConfig) != null ? s : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, r = U(this.five.getCurrentState().mode) ? this.workUtil.getObserverPosition(t) : this.five.camera.position;
565
+ var n, d, h, u;
566
+ const e = z(z((n = this.getConfig().visibleConfig) != null ? n : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, r = U(this.five.getCurrentState().mode) ? this.workUtil.getObserverPosition(t) : this.five.camera.position;
511
567
  if (r === void 0)
512
568
  return { value: !1, reason: { type: "startPosition is undefined", fivePanoIndex: t } };
513
- const n = ie(
569
+ const o = ie(
514
570
  (() => {
515
571
  var g;
516
572
  const a = (g = e.checkPoints) != null ? g : "center";
517
573
  return a === "center" ? $(this) : a === "corner" ? L(this) : Array.isArray(a) ? a : [];
518
574
  })()
519
575
  );
520
- let l = 0, o = 0;
521
- for (const a of n) {
576
+ let l = 0, s = 0;
577
+ for (const a of o) {
522
578
  const g = new B.Vector3().subVectors(a, r).normalize();
523
579
  let m;
524
580
  V.set(r, g);
@@ -533,12 +589,12 @@ class Ti {
533
589
  }).filter(E), [q] = V.intersectObjects(_, !0);
534
590
  return q;
535
591
  })(), J = r.distanceTo(a), W = (d = e.distanceAccuracy) != null ? d : 0.01;
536
- m = Math.min(m != null ? m : 1 / 0, (h = x == null ? void 0 : x.distance) != null ? h : 1 / 0), m + W >= J ? l++ : o++;
592
+ m = Math.min(m != null ? m : 1 / 0, (h = x == null ? void 0 : x.distance) != null ? h : 1 / 0), m + W >= J ? l++ : s++;
537
593
  const H = (u = e.needPassed) != null ? u : 1;
538
594
  if (l >= H)
539
595
  return { value: !0 };
540
596
  }
541
- return o === 0 ? { value: !0 } : {
597
+ return s === 0 ? { value: !0 } : {
542
598
  value: !1,
543
599
  reason: {
544
600
  type: "intersectRaycaster check failed",
@@ -549,12 +605,12 @@ class Ti {
549
605
  };
550
606
  }
551
607
  computeVisibleByFloorIndex() {
552
- var r, n, l, o, s, d, h;
608
+ var r, o, l, s, n, d, h;
553
609
  let i = 0;
554
610
  const e = (r = this.fiveState) == null ? void 0 : r.panoIndex;
555
- e !== void 0 ? i = (n = this.workUtil.getObserver(e)) == null ? void 0 : n.floorIndex : i = ae(
611
+ e !== void 0 ? i = (o = this.workUtil.getObserver(e)) == null ? void 0 : o.floorIndex : i = ae(
556
612
  this.workUtil.work,
557
- (h = (d = (o = (l = this.model) == null ? void 0 : l.object) == null ? void 0 : o.position) != null ? d : (s = this.mediaPlane) == null ? void 0 : s.position) != null ? h : $(this)
613
+ (h = (d = (s = (l = this.model) == null ? void 0 : l.object) == null ? void 0 : s.position) != null ? d : (n = this.mediaPlane) == null ? void 0 : n.position) != null ? h : $(this)
558
614
  );
559
615
  const t = this.fiveUtil.model.shownFloor;
560
616
  return {
@@ -599,20 +655,20 @@ class Ti {
599
655
  return !1;
600
656
  }
601
657
  if (i.autoUnfold.strategy === "MinimumDistance") {
602
- const n = this.plugin.filterPointTag.filter((o) => o.currentVisible).filter((o) => {
603
- const s = this.computeTagProject();
604
- if (!s)
658
+ const o = this.plugin.filterPointTag.filter((s) => s.currentVisible).filter((s) => {
659
+ const n = this.computeTagProject();
660
+ if (!n)
605
661
  return !1;
606
- const { x: d, y: h, z: u } = s;
662
+ const { x: d, y: h, z: u } = n;
607
663
  return !(Math.abs(u) > 1 || Math.abs(d) > 1 || Math.abs(h) > 1);
608
- }).map((o) => ({ tag: o, id: o.id, tagConfig: o.getConfig().unfoldedConfig })).filter(({ tagConfig: o }) => {
609
- var s, d;
610
- return !(typeof o == "function" || o.keep || o.autoUnfold === !1 || ((s = o.autoUnfold) == null ? void 0 : s.enable) === !1 || ((d = o.autoUnfold) == null ? void 0 : d.strategy) !== "MinimumDistance");
611
- }).map((o) => I(p({}, o), { distance: o.tag.getDistance() })).filter(({ distance: o, tagConfig: s }) => {
612
- const d = s.autoUnfold.distance;
613
- return !(d && k(o, d) === !1);
614
- }).sort((o, s) => o.distance - s.distance).findIndex((o) => o.id === this.id);
615
- if (n === -1 || n <= ((e = i.autoUnfold.maxNumber) != null ? e : 1) - 1 === !1)
664
+ }).map((s) => ({ tag: s, id: s.id, tagConfig: s.getConfig().unfoldedConfig })).filter(({ tagConfig: s }) => {
665
+ var n, d;
666
+ return !(typeof s == "function" || s.keep || s.autoUnfold === !1 || ((n = s.autoUnfold) == null ? void 0 : n.enable) === !1 || ((d = s.autoUnfold) == null ? void 0 : d.strategy) !== "MinimumDistance");
667
+ }).map((s) => I(p({}, s), { distance: s.tag.getDistance() })).filter(({ distance: s, tagConfig: n }) => {
668
+ const d = n.autoUnfold.distance;
669
+ return !(d && k(s, d) === !1);
670
+ }).sort((s, n) => s.distance - n.distance).findIndex((s) => s.id === this.id);
671
+ if (o === -1 || o <= ((e = i.autoUnfold.maxNumber) != null ? e : 1) - 1 === !1)
616
672
  return !1;
617
673
  }
618
674
  return i.autoUnfold.strategy !== "FoldWhenMove";
@@ -630,14 +686,14 @@ class Ti {
630
686
  if (!e || !this.plugin.domEvents)
631
687
  return () => {
632
688
  };
633
- const r = () => !(!i.currentVisible || i.loading), n = (l) => {
689
+ const r = () => !(!i.currentVisible || i.loading), o = (l) => {
634
690
  if (!r())
635
691
  return !1;
636
692
  t(l.origDomEvent);
637
693
  };
638
- return this.plugin.domEvents.addEventListener(e, "click", n), () => {
694
+ return this.plugin.domEvents.addEventListener(e, "click", o), () => {
639
695
  var l;
640
- (l = this.plugin.domEvents) == null || l.removeEventListener(e, "click", n);
696
+ (l = this.plugin.domEvents) == null || l.removeEventListener(e, "click", o);
641
697
  };
642
698
  }
643
699
  whyHide() {
@@ -666,5 +722,5 @@ class Ti {
666
722
  }
667
723
  }
668
724
  export {
669
- Ti as BaseTag
725
+ Ft as BaseTag
670
726
  };