leiting-bim 2.1.104 → 2.1.106

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 (31) hide show
  1. package/leiting-bim.es.js +1 -1
  2. package/leiting-bim.umd.js +2 -2
  3. package/package.json +1 -1
  4. package/plugins/cesium-core/dist/cesium-core.mjs +1538 -1409
  5. package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -1
  6. package/plugins/cesium-core/dist/cesium-core.umd.js +28 -28
  7. package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -1
  8. package/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +17 -0
  9. package/plugins/cesium-core/dist/components/HtmlOverlayLabelPool.d.ts +7 -0
  10. package/plugins/cesium-vue/dist/{HtmlOverlayLabelPool-B1gUt-p1.js → HtmlOverlayLabelPool-DgCFnmr3.js} +33 -20
  11. package/plugins/cesium-vue/dist/{HtmlOverlayLabelPool-B1gUt-p1.js.map → HtmlOverlayLabelPool-DgCFnmr3.js.map} +1 -1
  12. package/plugins/cesium-vue/dist/components/marker-manage.js +544 -429
  13. package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -1
  14. package/plugins/cesium-vue/dist/components/measurement.js +1 -1
  15. package/plugins/cesium-vue/dist/components/basic-audio/index.d.ts +0 -13
  16. package/plugins/cesium-vue/dist/components/basic-video/index.d.ts +0 -98
  17. package/plugins/cesium-vue/dist/components/card-carousel/index.d.ts +0 -147
  18. package/plugins/cesium-vue/dist/components/card-content/index.d.ts +0 -16
  19. package/plugins/cesium-vue/dist/components/card-page/index.d.ts +0 -64
  20. package/plugins/cesium-vue/dist/components/carousel-img/index.d.ts +0 -34
  21. package/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts +0 -63
  22. package/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts +0 -73
  23. package/plugins/cesium-vue/dist/components/marker-default/index.d.ts +0 -43
  24. package/plugins/cesium-vue/dist/components/marker-html/index.d.ts +0 -43
  25. package/plugins/cesium-vue/dist/components/marker-manage/index.d.ts +0 -159
  26. package/plugins/cesium-vue/dist/components/marker-text/index.d.ts +0 -25
  27. package/plugins/cesium-vue/dist/components/measurement/index.d.ts +0 -73
  28. package/plugins/cesium-vue/dist/components/position-picker/index.d.ts +0 -58
  29. package/plugins/cesium-vue/dist/index-C0pspk3x.js +0 -45856
  30. package/plugins/cesium-vue/dist/index-C0pspk3x.js.map +0 -1
  31. package/plugins/theme-chalk/dist/debug.log +0 -1
@@ -1,11 +1,11 @@
1
- import { w as _e } from "../create-DynflqE1.js";
2
- import { h as S, markRaw as E, render as D, defineComponent as Le, inject as Pe, onMounted as Te, watch as X, onUnmounted as we, renderSlot as xe, unref as Se } from "vue";
3
- import { M as I, H as q, a as H } from "../HtmlOverlayLabelPool-B1gUt-p1.js";
4
- import { CxCardCarousel as j } from "./card-carousel.js";
5
- import { CxMarkerDefault as Z } from "./marker-default.js";
6
- import { CxMarkerHtml as Ee } from "./marker-html.js";
7
- import { i as K, b as re, a as L, S as A, d as J, c as N, e as ae, f as Ge, g as oe, M as ne, h as R, j as De, k as Ie, l as Oe, m as se, n as le, o as Ae, p as ke, q as Be, r as $e, s as He, t as he, u as Re, v as ze, w as Fe, x as Ke } from "../index-Kdqw0FJN.js";
8
- const Ne = {
1
+ import { w as we } from "../create-DynflqE1.js";
2
+ import { h as M, markRaw as T, render as I, defineComponent as xe, inject as Ie, onMounted as Se, watch as j, onUnmounted as De, renderSlot as Ee, unref as Ge } from "vue";
3
+ import { M as S, H as Z, a as H } from "../HtmlOverlayLabelPool-DgCFnmr3.js";
4
+ import { CxCardCarousel as J } from "./card-carousel.js";
5
+ import { CxMarkerDefault as Q } from "./marker-default.js";
6
+ import { CxMarkerHtml as Oe } from "./marker-html.js";
7
+ import { i as K, b as oe, a as L, S as E, d as ee, c as W, e as ne, f as Ae, g as se, M as le, h as N, j as ke, k as Re, l as $e, m as he, n as ce, o as Be, p as He, q as Ne, r as ze, s as Fe, t as de, u as Ke, v as We, w as Ve, x as Ye } from "../index-Kdqw0FJN.js";
8
+ const Ue = {
9
9
  id: { type: String, default: "marker" },
10
10
  Cesium: { type: Object },
11
11
  viewer: { type: Object },
@@ -16,8 +16,8 @@ const Ne = {
16
16
  themeConfig: { type: Object }
17
17
  // Optional override
18
18
  };
19
- var O = /* @__PURE__ */ ((r) => (r.左建选中模型 = "MODEL_LEFT_CLICK", r.标记左键点击 = "TAG_LEFT_CLICK", r.标记移入 = "TAG_MOUSEENTER", r.标记移出 = "TAG_MOUSELEAVE", r.模型位置保存 = "SAVE_REGION", r.模型加载完成 = "MODEL_READY", r))(O || {});
20
- class We {
19
+ var D = /* @__PURE__ */ ((r) => (r.左建选中模型 = "MODEL_LEFT_CLICK", r.标记左键点击 = "TAG_LEFT_CLICK", r.标记移入 = "TAG_MOUSEENTER", r.标记移出 = "TAG_MOUSELEAVE", r.模型位置保存 = "SAVE_REGION", r.模型加载完成 = "MODEL_READY", r))(D || {});
20
+ class Xe {
21
21
  Cesium;
22
22
  viewer;
23
23
  labelPool;
@@ -36,6 +36,8 @@ class We {
36
36
  minGlobalPointCount;
37
37
  groupByTheme;
38
38
  tilingScheme;
39
+ terrainLevelOffset;
40
+ debugTileCoordLayer = null;
39
41
  levelIndexByTileLevel = /* @__PURE__ */ new Map();
40
42
  _lastTileProvider = null;
41
43
  _updateTimer = null;
@@ -48,11 +50,13 @@ class We {
48
50
  // 默认显示的地图层级区间(兼容旧数据)
49
51
  defaultMinLevel = 0;
50
52
  defaultMaxLevel = 28;
53
+ // 单次从视图层级向下细分到聚合层级时,最多细分的层级数
54
+ maxRefineLevels = 2;
51
55
  constructor(e, t, i) {
52
- this.Cesium = e, this.viewer = t, this.labelPool = i.labelPool, this.threshold = i.threshold ?? 10, this.displayLimit = i.displayLimit ?? 100, this.maxLevel = i.maxLevel ?? 5, this.debugCurrentGrids = i.debugCurrentGrids ?? !1, this.clusterTheme = i.clusterTheme ?? "cluster-label", this.pointTheme = i.pointTheme ?? "point-label", this.centralPointMode = i.centralPointMode ?? "central", this.minGlobalPointCount = i.minGlobalPointCount ?? 0, this.groupByTheme = i.groupByTheme ?? !1;
53
- const o = this.viewer.scene && this.viewer.scene.globe, a = o && o._surface, n = a && a._tileProvider, l = n?.tilingScheme || new this.Cesium.GeographicTilingScheme();
54
- this._lastTileProvider = n, this.tilingScheme = l, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), o && (this._tileLoadListener = (s) => {
55
- s === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
56
+ this.Cesium = e, this.viewer = t, this.labelPool = i.labelPool, this.threshold = i.threshold ?? 10, this.displayLimit = i.displayLimit ?? 100, this.maxLevel = i.maxLevel ?? 5, this.debugCurrentGrids = i.debugCurrentGrids ?? !1, this.clusterTheme = i.clusterTheme ?? "cluster-label", this.pointTheme = i.pointTheme ?? "point-label", this.centralPointMode = i.centralPointMode ?? "central", this.minGlobalPointCount = i.minGlobalPointCount ?? 0, this.groupByTheme = i.groupByTheme ?? !1, this.terrainLevelOffset = i.terrainLevelOffset ?? 2;
57
+ const o = this.viewer.scene && this.viewer.scene.globe, a = o && o._surface, n = a && a._tileProvider, s = n?.tilingScheme || new this.Cesium.GeographicTilingScheme();
58
+ this._lastTileProvider = n, this.tilingScheme = s, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), this.debugCurrentGrids && this._ensureDebugImageryLayer(), o && (this._tileLoadListener = (h) => {
59
+ h === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
56
60
  }, o.tileLoadProgressEvent.addEventListener(this._tileLoadListener)), this._cameraChangedHandler = () => {
57
61
  this._update();
58
62
  }, this.viewer.camera.changed.addEventListener(this._cameraChangedHandler);
@@ -71,11 +75,11 @@ class We {
71
75
  this.threshold = e, t && this._update();
72
76
  }
73
77
  setDebugCurrentGrids(e, t = !0) {
74
- this.debugCurrentGrids = e, e || this._clearDebugGrids(), t && this._update();
78
+ this.debugCurrentGrids = e, e ? this._ensureDebugImageryLayer() : (this._clearDebugGrids(), this._removeDebugImageryLayer()), t && this._update();
75
79
  }
76
80
  _syncTilingSchemeAndLevels() {
77
81
  const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface, i = t && t._tileProvider, o = i?.tilingScheme || new this.Cesium.GeographicTilingScheme(), a = i !== this._lastTileProvider, n = this.tilingScheme !== o;
78
- !a && !n && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = o, this.levels = this._createLevels(), this._buildLevels());
82
+ !a && !n && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = o, this.levels = this._createLevels(), this._buildLevels(), this.debugCurrentGrids && (this._removeDebugImageryLayer(), this._ensureDebugImageryLayer()));
79
83
  }
80
84
  _createLevels() {
81
85
  const e = [];
@@ -112,25 +116,25 @@ class We {
112
116
  if (t === -1) return;
113
117
  const i = this.points[t];
114
118
  for (const a of this.levels) {
115
- const n = a.level, l = this.gridLayers.get(n);
116
- if (!l) continue;
117
- const s = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), d = this.tilingScheme.positionToTileXY(
118
- s,
119
+ const n = a.level, s = this.gridLayers.get(n);
120
+ if (!s) continue;
121
+ const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), d = this.tilingScheme.positionToTileXY(
122
+ h,
119
123
  n,
120
124
  new this.Cesium.Cartesian2()
121
125
  );
122
126
  if (!d) continue;
123
- const h = `${d.x}_${d.y}`, c = l.get(h);
127
+ const l = `${d.x}_${d.y}`, c = s.get(l);
124
128
  if (c) {
125
- const g = c.allPoints.findIndex((u) => u.id === e.id);
126
- if (g !== -1 && c.allPoints.splice(g, 1), i.data?.skipAggregation) {
127
- const u = c.skipPoints.findIndex((f) => f.id === e.id);
128
- u !== -1 && c.skipPoints.splice(u, 1);
129
+ const g = c.allPoints.findIndex((f) => f.id === e.id);
130
+ if (g !== -1 && c.allPoints.splice(g, 1), i.data?.billboard?.[0]?.skipAggregation) {
131
+ const f = c.skipPoints.findIndex((u) => u.id === e.id);
132
+ f !== -1 && c.skipPoints.splice(f, 1);
129
133
  } else {
130
- const u = this.groupByTheme ? i.data?.theme : this.clusterTheme, f = c.groups.get(u);
131
- if (f) {
132
- const P = f.findIndex((_) => _.id === e.id);
133
- P !== -1 && f.splice(P, 1), f.length === 0 && c.groups.delete(u);
134
+ const f = this.groupByTheme ? i.data?.theme : this.clusterTheme, u = c.groups.get(f);
135
+ if (u) {
136
+ const p = u.findIndex((y) => y.id === e.id);
137
+ p !== -1 && u.splice(p, 1), u.length === 0 && c.groups.delete(f);
134
138
  }
135
139
  }
136
140
  }
@@ -145,10 +149,10 @@ class We {
145
149
  const o = this.gridLayers.get(i.level);
146
150
  if (o)
147
151
  for (const [a, n] of o.entries()) {
148
- n.allPoints = n.allPoints.filter((l) => !t.has(l.id)), n.skipPoints = n.skipPoints.filter((l) => !t.has(l.id));
149
- for (const [l, s] of n.groups.entries()) {
150
- const d = s.filter((h) => !t.has(h.id));
151
- d.length === 0 ? n.groups.delete(l) : n.groups.set(l, d);
152
+ n.allPoints = n.allPoints.filter((s) => !t.has(s.id)), n.skipPoints = n.skipPoints.filter((s) => !t.has(s.id));
153
+ for (const [s, h] of n.groups.entries()) {
154
+ const d = h.filter((l) => !t.has(l.id));
155
+ d.length === 0 ? n.groups.delete(s) : n.groups.set(s, d);
152
156
  }
153
157
  n.allPoints.length === 0 && o.delete(a);
154
158
  }
@@ -172,17 +176,17 @@ class We {
172
176
  new this.Cesium.Cartesian2()
173
177
  );
174
178
  if (!n) continue;
175
- const l = `${n.x}_${n.y}`;
176
- let s = o.get(l);
177
- if (s || (s = {
179
+ const s = `${n.x}_${n.y}`;
180
+ let h = o.get(s);
181
+ if (h || (h = {
178
182
  allPoints: [],
179
183
  groups: /* @__PURE__ */ new Map(),
180
184
  skipPoints: []
181
- }, o.set(l, s)), s.allPoints.push(e), e.data?.billboard?.[0]?.skipAggregation)
182
- s.skipPoints.push(e);
185
+ }, o.set(s, h)), h.allPoints.push(e), e.data?.billboard?.[0]?.skipAggregation)
186
+ h.skipPoints.push(e);
183
187
  else {
184
188
  const d = this.groupByTheme ? e.data?.billboard?.[0]?.theme : this.clusterTheme;
185
- s.groups.has(d) || s.groups.set(d, []), s.groups.get(d).push(e);
189
+ h.groups.has(d) || h.groups.set(d, []), h.groups.get(d).push(e);
186
190
  }
187
191
  }
188
192
  }
@@ -192,8 +196,8 @@ class We {
192
196
  let i = t.minLevel, o = t.maxLevel;
193
197
  const a = t.levelRange;
194
198
  Array.isArray(a) ? (a.length > 0 && i == null && (i = a[0]), a.length > 1 && o == null && (o = a[1])) : a && typeof a == "object" && (i == null && typeof a.min == "number" && (i = a.min), o == null && typeof a.max == "number" && (o = a.max));
195
- const n = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, l = o == null ? this.defaultMaxLevel : Number(o) || this.defaultMaxLevel;
196
- e.__minLevel = n, e.__maxLevel = l;
199
+ const n = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, s = o == null ? this.defaultMaxLevel : Number(o) || this.defaultMaxLevel;
200
+ e.__minLevel = n, e.__maxLevel = s;
197
201
  }
198
202
  _isVisibleAtLevel(e, t) {
199
203
  if (t == null) return !0;
@@ -206,162 +210,255 @@ class We {
206
210
  this._syncTilingSchemeAndLevels(), this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
207
211
  const e = this.points.length < this.minGlobalPointCount ? 1 / 0 : this.threshold;
208
212
  let t = 0;
209
- const i = (o, a, n, l) => {
210
- if (t >= this.displayLimit || o < 0) return;
211
- o >= this.levels.length && (o = this.levels.length - 1);
212
- const s = this.levels[o], d = o === this.levels.length - 1, h = s.level, c = this.gridLayers.get(h);
213
- if (!c) return;
214
- const g = `${a}_${n}`, u = c.get(g);
215
- if (!u) return;
216
- const f = this.tilingScheme.tileXYToRectangle(a, n, h), P = this.Cesium.Math.toDegrees(f.west), _ = this.Cesium.Math.toDegrees(f.south), w = this.Cesium.Math.toDegrees(f.east), x = this.Cesium.Math.toDegrees(f.north), k = (P + w) / 2, B = (_ + x) / 2, T = l;
217
- for (const p of u.skipPoints)
218
- if (p.data?.show !== !1) {
219
- if (t >= this.displayLimit) break;
220
- this._isVisibleAtLevel(p, T) && (this.labelPool.add(p.data, {
221
- id: `point-${p.id}`,
222
- lon: p.lon,
223
- lat: p.lat,
224
- height: p.height,
225
- theme: p.data?.billboard?.[0]?.theme || this.pointTheme,
226
- style: p.style
227
- }), t++);
228
- }
229
- if (t >= this.displayLimit) {
230
- this.debugCurrentGrids && this._drawDebugGrid(P, _, w, x, g);
213
+ const i = (o, a, n, s) => {
214
+ t = this._processCell(
215
+ o,
216
+ a,
217
+ n,
218
+ s,
219
+ e,
220
+ t
221
+ );
222
+ };
223
+ try {
224
+ const o = this._getSurfaceTiles();
225
+ if (!o || o.length === 0) {
226
+ this._handleNoSurfaceTiles(t);
231
227
  return;
232
228
  }
233
- for (const [p, $] of u.groups) {
234
- const b = $.filter((m) => m.data?.show !== !1);
235
- if (b.length === 0) continue;
236
- let y = k, C = B, v = b[0]?.height || 0;
237
- if (this.centralPointMode == "firstPoint" && (y = b[0]?.lon || 0, C = b[0]?.lat || 0, v = b[0]?.height || 0), d || b.length < e)
238
- for (const m of b) {
239
- if (t >= this.displayLimit) break;
240
- this._isVisibleAtLevel(m, T) && (this.labelPool.add(m.data, {
241
- id: `point-${m.id}`,
242
- lon: m.lon,
243
- lat: m.lat,
244
- height: m.height,
245
- theme: m.data?.billboard?.[0]?.theme || this.pointTheme,
246
- style: m.style
247
- }), t++);
248
- }
249
- else {
250
- if (t >= this.displayLimit) break;
251
- const m = T == null ? b : b.filter((Me) => this._isVisibleAtLevel(Me, T));
252
- if (!m.length) continue;
253
- const G = m[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, Y = this.groupByTheme ? `cluster-${o}-${a}-${n}-${p}` : `cluster-${o}-${a}-${n}`;
254
- this.labelPool.add(
255
- {
256
- id: Y,
257
- billboard: m[0]?.data?.billboard || [],
258
- count: m.length,
259
- gridKey: g,
260
- points: m,
261
- aggregationGroup: p
262
- },
263
- {
264
- id: Y,
265
- lon: y,
266
- lat: C,
267
- height: v,
268
- theme: G
229
+ this._tilesRetryCount = 0, this._processTiles(o, i);
230
+ } catch {
231
+ this.labelPool.cleanup();
232
+ return;
233
+ }
234
+ this.labelPool.cleanup();
235
+ }
236
+ _getSurfaceTiles() {
237
+ const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface;
238
+ if (t)
239
+ return t._tilesToRender || t._tilesToRenderByTextureCount;
240
+ }
241
+ _handleNoSurfaceTiles(e) {
242
+ for (const t of this.points) {
243
+ if (e >= this.displayLimit) break;
244
+ t.data?.show !== !1 && (this.labelPool.add(t.data, {
245
+ id: `point-${t.id}`,
246
+ lon: t.lon,
247
+ lat: t.lat,
248
+ height: t.height,
249
+ theme: t.data?.billboard?.[0]?.theme || this.pointTheme,
250
+ style: t.style
251
+ }), e++);
252
+ }
253
+ this.labelPool.cleanup(), this.points.length > 0 && this._tilesRetryCount < this._tilesRetryMax && (this._tilesRetryCount++, this._scheduleUpdate());
254
+ }
255
+ _resolveLevelIndex(e) {
256
+ let t = this.levelIndexByTileLevel.get(e);
257
+ if (t !== void 0) return t;
258
+ if (this.levels.length === 0) return;
259
+ const i = this.levels[0].level, o = this.levels[this.levels.length - 1].level;
260
+ if (e > o)
261
+ return this.levels.length - 1;
262
+ if (e < i)
263
+ return 0;
264
+ let a = 0, n = 1 / 0;
265
+ for (let s = 0; s < this.levels.length; s++) {
266
+ const h = Math.abs(this.levels[s].level - e);
267
+ h < n && (n = h, a = s);
268
+ }
269
+ return a;
270
+ }
271
+ _isTerrainEnabled() {
272
+ const e = this.viewer.terrainProvider, t = this.viewer.scene, i = t && t.globe, o = i && i.terrainProvider, a = e || o;
273
+ return a ? !(a instanceof this.Cesium.EllipsoidTerrainProvider) : !1;
274
+ }
275
+ _getGridRefLevel(e) {
276
+ let t = e;
277
+ if (this._isTerrainEnabled() && (t += this.terrainLevelOffset), this.levels.length > 0) {
278
+ const i = this.levels[this.levels.length - 1].level;
279
+ t > i && (t = i);
280
+ }
281
+ return t;
282
+ }
283
+ _processTiles(e, t) {
284
+ const i = /* @__PURE__ */ new Set(), o = this.viewer.scene, a = o && o.globe, n = a && a.ellipsoid, s = n && o.camera.computeViewRectangle(n), h = (d, l, c) => {
285
+ if (!s) return !0;
286
+ const g = this.tilingScheme.tileXYToRectangle(d, l, c);
287
+ return !(!g || g.east <= s.west || g.west >= s.east || g.north <= s.south || g.south >= s.north);
288
+ };
289
+ for (const d of e) {
290
+ const l = d.rectangle, c = d._level ?? d.level;
291
+ if (!l || typeof c != "number") continue;
292
+ const g = this._getGridRefLevel(c), f = this._resolveLevelIndex(g);
293
+ if (f === void 0) continue;
294
+ const u = this.levels[f].level, p = d._x ?? d.x, y = d._y ?? d.y;
295
+ if (typeof p == "number" && typeof y == "number") {
296
+ const C = c - u;
297
+ if (C >= 0) {
298
+ const _ = 1 << C, v = Math.floor(p / _), w = Math.floor(y / _), x = `${u}_${v}_${w}`;
299
+ if (i.has(x)) continue;
300
+ i.add(x), t(f, v, w, c);
301
+ } else {
302
+ const v = 1 << Math.min(-C, this.maxRefineLevels), w = p * v, x = y * v;
303
+ for (let k = 0; k < v; k++)
304
+ for (let R = 0; R < v; R++) {
305
+ const $ = w + k, B = x + R;
306
+ if (!h($, B, u)) continue;
307
+ const q = `${u}_${$}_${B}`;
308
+ i.has(q) || (i.add(q), t(f, $, B, c));
269
309
  }
270
- ), t++;
271
310
  }
311
+ continue;
272
312
  }
273
- if (this.debugCurrentGrids) {
274
- const p = this.levels[o].level;
275
- this._drawDebugGrid(
276
- P,
277
- _,
278
- w,
279
- x,
280
- `L:${p} X:${a} Y:${n}`
281
- );
282
- }
283
- };
284
- try {
285
- const o = this.viewer.scene && this.viewer.scene.globe, a = o && o._surface;
286
- let n;
287
- if (a && (n = a._tilesToRender || a._tilesToRenderByTextureCount), !n || n.length === 0) {
288
- for (const s of this.points) {
289
- if (t >= this.displayLimit) break;
290
- s.data?.show !== !1 && (this.labelPool.add(s.data, {
291
- id: `point-${s.id}`,
292
- lon: s.lon,
293
- lat: s.lat,
294
- height: s.height,
295
- theme: s.data?.billboard?.[0]?.theme || this.pointTheme,
296
- style: s.style
297
- }), t++);
313
+ const b = this.levels[f].size, m = this.Cesium.Math.toDegrees(l.west), X = this.Cesium.Math.toDegrees(l.east), O = this.Cesium.Math.toDegrees(l.south), P = this.Cesium.Math.toDegrees(l.north), A = Math.floor((m - -180) / b), Me = Math.floor((X - -180) / b), Te = Math.floor((O - -90) / b), Pe = Math.floor((P - -90) / b);
314
+ for (let C = A; C <= Me; C++)
315
+ for (let _ = Te; _ <= Pe; _++) {
316
+ if (!h(C, _, u)) continue;
317
+ const v = `${u}_${C}_${_}`;
318
+ i.has(v) || (i.add(v), t(f, C, _, c));
298
319
  }
299
- this.labelPool.cleanup(), this.points.length > 0 && this._tilesRetryCount < this._tilesRetryMax && (this._tilesRetryCount++, this._scheduleUpdate());
300
- return;
320
+ }
321
+ }
322
+ _processCell(e, t, i, o, a, n) {
323
+ if (n >= this.displayLimit || e < 0) return n;
324
+ e >= this.levels.length && (e = this.levels.length - 1);
325
+ const s = this._getCellContext(e, t, i, o);
326
+ return s ? (n = this._processCellSkipPoints(s, n), n >= this.displayLimit ? (this._debugDrawCell(s), n) : (n = this._processCellGroups(s, a, n), this._debugDrawCell(s), n)) : n;
327
+ }
328
+ _getCellContext(e, t, i, o) {
329
+ const n = this.levels[e].level, s = this.gridLayers.get(n);
330
+ if (!s) return null;
331
+ const h = `${t}_${i}`, d = s.get(h);
332
+ if (!d) return null;
333
+ const l = this.tilingScheme.tileXYToRectangle(t, i, n), c = this.Cesium.Math.toDegrees(l.west), g = this.Cesium.Math.toDegrees(l.south), f = this.Cesium.Math.toDegrees(l.east), u = this.Cesium.Math.toDegrees(l.north), p = (c + f) / 2, y = (g + u) / 2;
334
+ return {
335
+ levelIdx: e,
336
+ tileLevel: n,
337
+ lonIdx: t,
338
+ latIdx: i,
339
+ key: h,
340
+ cell: d,
341
+ rect: l,
342
+ west: c,
343
+ south: g,
344
+ east: f,
345
+ north: u,
346
+ centerLon: p,
347
+ centerLat: y,
348
+ viewTileLevel: o
349
+ };
350
+ }
351
+ _processCellSkipPoints(e, t) {
352
+ const { cell: i, viewTileLevel: o } = e, a = o;
353
+ for (const n of i.skipPoints)
354
+ if (n.data?.show !== !1) {
355
+ if (t >= this.displayLimit) break;
356
+ this._isVisibleAtLevel(n, a) && (this.labelPool.add(n.data, {
357
+ id: `point-${n.id}`,
358
+ lon: n.lon,
359
+ lat: n.lat,
360
+ height: n.height,
361
+ theme: n.data?.billboard?.[0]?.theme || this.pointTheme,
362
+ style: n.style
363
+ }), t++);
301
364
  }
302
- this._tilesRetryCount = 0;
303
- const l = /* @__PURE__ */ new Set();
304
- for (const s of n) {
305
- const d = s.rectangle, h = s._level ?? s.level;
306
- if (!d || typeof h != "number") continue;
307
- let c = this.levelIndexByTileLevel.get(h);
308
- if (c === void 0) {
309
- if (this.levels.length === 0) continue;
310
- const y = this.levels[0].level, C = this.levels[this.levels.length - 1].level;
311
- if (h > C)
312
- c = this.levels.length - 1;
313
- else if (h < y)
314
- c = 0;
315
- else {
316
- let v = 0, m = 1 / 0;
317
- for (let M = 0; M < this.levels.length; M++) {
318
- const G = Math.abs(this.levels[M].level - h);
319
- G < m && (m = G, v = M);
320
- }
321
- c = v;
322
- }
323
- }
324
- if (c === void 0) continue;
325
- const g = this.levels[c].level, u = s._x ?? s.x, f = s._y ?? s.y;
326
- if (typeof u == "number" && typeof f == "number") {
327
- let y = u, C = f;
328
- const v = h - g;
329
- if (v > 0) {
330
- const M = 1 << v;
331
- y = Math.floor(u / M), C = Math.floor(f / M);
332
- } else if (v < 0) {
333
- const M = 1 << -v;
334
- y = u * M, C = f * M;
335
- }
336
- const m = `${g}_${y}_${C}`;
337
- if (l.has(m)) continue;
338
- l.add(m), i(c, y, C, h);
339
- continue;
365
+ return t;
366
+ }
367
+ _processCellGroups(e, t, i) {
368
+ const {
369
+ levelIdx: o,
370
+ lonIdx: a,
371
+ latIdx: n,
372
+ cell: s,
373
+ centerLon: h,
374
+ centerLat: d,
375
+ viewTileLevel: l
376
+ } = e, c = l;
377
+ for (const [g, f] of s.groups) {
378
+ const u = f.filter((m) => m.data?.show !== !1);
379
+ if (u.length === 0) continue;
380
+ let p = h, y = d, G = u[0]?.height || 0;
381
+ if (this.centralPointMode == "firstPoint" && (p = u[0]?.lon || 0, y = u[0]?.lat || 0, G = u[0]?.height || 0), o === this.levels.length - 1 || u.length < t)
382
+ for (const m of u) {
383
+ if (i >= this.displayLimit) break;
384
+ this._isVisibleAtLevel(m, c) && (this.labelPool.add(m.data, {
385
+ id: `point-${m.id}`,
386
+ lon: m.lon,
387
+ lat: m.lat,
388
+ height: m.height,
389
+ theme: m.data?.billboard?.[0]?.theme || this.pointTheme,
390
+ style: m.style
391
+ }), i++);
340
392
  }
341
- const _ = this.levels[c].size, w = this.Cesium.Math.toDegrees(d.west), x = this.Cesium.Math.toDegrees(d.east), k = this.Cesium.Math.toDegrees(d.south), B = this.Cesium.Math.toDegrees(d.north), T = Math.floor((w - -180) / _), p = Math.floor((x - -180) / _), $ = Math.floor((k - -90) / _), b = Math.floor((B - -90) / _);
342
- for (let y = T; y <= p; y++)
343
- for (let C = $; C <= b; C++) {
344
- const v = `${g}_${y}_${C}`;
345
- l.has(v) || (l.add(v), i(c, y, C, h));
393
+ else {
394
+ if (i >= this.displayLimit)
395
+ return i;
396
+ const m = c == null ? u : u.filter((A) => this._isVisibleAtLevel(A, c));
397
+ if (!m.length) return i;
398
+ const O = m[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, P = this.groupByTheme ? `cluster-${o}-${a}-${n}-${g}` : `cluster-${o}-${a}-${n}`;
399
+ this.labelPool.add(
400
+ {
401
+ id: P,
402
+ billboard: m[0]?.data?.billboard || [],
403
+ count: m.length,
404
+ gridKey: `${a}_${n}`,
405
+ points: m,
406
+ aggregationGroup: g
407
+ },
408
+ {
409
+ id: P,
410
+ lon: p,
411
+ lat: y,
412
+ height: G,
413
+ theme: O
346
414
  }
415
+ ), i++;
347
416
  }
348
- } catch {
349
- this.labelPool.cleanup();
350
- return;
351
417
  }
352
- this.labelPool.cleanup();
418
+ return i;
419
+ }
420
+ _debugDrawCell(e) {
421
+ if (!this.debugCurrentGrids) return;
422
+ const { levelIdx: t, west: i, south: o, east: a, north: n, lonIdx: s, latIdx: h } = e, d = this.levels[t].level;
423
+ this._drawDebugGrid(
424
+ i,
425
+ o,
426
+ a,
427
+ n,
428
+ `L:${d} X:${s} Y:${h}`
429
+ );
353
430
  }
354
431
  refresh() {
355
432
  this._update();
356
433
  }
357
434
  _drawDebugGrid(e, t, i, o, a) {
358
- const n = this.Cesium.Rectangle.fromDegrees(e, t, i, o), l = this.viewer.entities.add({
435
+ const n = this.Cesium.Rectangle.fromDegrees(e, t, i, o), s = this.Cesium.Cartesian3.fromDegreesArray([
436
+ e,
437
+ t,
438
+ i,
439
+ t,
440
+ i,
441
+ o,
442
+ e,
443
+ o,
444
+ e,
445
+ t
446
+ ]), h = this.viewer.entities.add({
359
447
  rectangle: {
360
448
  coordinates: n,
361
449
  material: this.Cesium.Color.YELLOW.withAlpha(0.2),
362
450
  outline: !0,
363
451
  outlineColor: this.Cesium.Color.RED,
364
- height: 0
452
+ // 贴地绘制调试网格
453
+ heightReference: this.Cesium.HeightReference.CLAMP_TO_GROUND,
454
+ classificationType: this.Cesium.ClassificationType.TERRAIN
455
+ },
456
+ // 额外一圈贴地边框线,避免依赖 rectangle.outline
457
+ polyline: {
458
+ positions: s,
459
+ width: 2,
460
+ material: this.Cesium.Color.RED,
461
+ clampToGround: !0
365
462
  },
366
463
  label: {
367
464
  text: a,
@@ -374,43 +471,61 @@ class We {
374
471
  horizontalOrigin: this.Cesium.HorizontalOrigin.CENTER
375
472
  }
376
473
  });
377
- this.debugGrids.push(l);
474
+ this.debugGrids.push(h);
378
475
  }
379
476
  _clearDebugGrids() {
380
477
  for (const e of this.debugGrids)
381
478
  this.viewer.entities.remove(e);
382
479
  this.debugGrids = [];
383
480
  }
481
+ _ensureDebugImageryLayer() {
482
+ if (this.debugTileCoordLayer || !this.viewer || !this.viewer.imageryLayers) return;
483
+ const e = {
484
+ tilingScheme: this.tilingScheme
485
+ };
486
+ this.debugTileCoordLayer = this.viewer.imageryLayers.addImageryProvider(
487
+ new this.Cesium.TileCoordinatesImageryProvider(e)
488
+ );
489
+ }
490
+ _removeDebugImageryLayer() {
491
+ if (!(!this.debugTileCoordLayer || !this.viewer || !this.viewer.imageryLayers)) {
492
+ try {
493
+ this.viewer.imageryLayers.remove(this.debugTileCoordLayer, !1);
494
+ } catch {
495
+ }
496
+ this.debugTileCoordLayer = null;
497
+ }
498
+ }
384
499
  destroy() {
385
500
  this._cameraChangedHandler && (this.viewer.camera.changed.removeEventListener(this._cameraChangedHandler), this._cameraChangedHandler = null);
386
501
  const e = this.viewer.scene, t = e && e.globe;
387
- t && this._tileLoadListener && (t.tileLoadProgressEvent.removeEventListener(this._tileLoadListener), this._tileLoadListener = null), this._updateTimer !== null && (clearTimeout(this._updateTimer), this._updateTimer = null), this.labelPool.reset(), this._clearDebugGrids();
502
+ t && this._tileLoadListener && (t.tileLoadProgressEvent.removeEventListener(this._tileLoadListener), this._tileLoadListener = null), this._updateTimer !== null && (clearTimeout(this._updateTimer), this._updateTimer = null), this.labelPool.reset(), this._clearDebugGrids(), this._removeDebugImageryLayer();
388
503
  }
389
504
  }
390
- var Ve = "[object Symbol]";
391
- function W(r) {
392
- return typeof r == "symbol" || K(r) && re(r) == Ve;
505
+ var qe = "[object Symbol]";
506
+ function V(r) {
507
+ return typeof r == "symbol" || K(r) && oe(r) == qe;
393
508
  }
394
- function ce(r, e) {
509
+ function ge(r, e) {
395
510
  for (var t = -1, i = r == null ? 0 : r.length, o = Array(i); ++t < i; )
396
511
  o[t] = e(r[t], t, r);
397
512
  return o;
398
513
  }
399
- var Q = A ? A.prototype : void 0, ee = Q ? Q.toString : void 0;
400
- function de(r) {
514
+ var te = E ? E.prototype : void 0, ie = te ? te.toString : void 0;
515
+ function ue(r) {
401
516
  if (typeof r == "string")
402
517
  return r;
403
518
  if (L(r))
404
- return ce(r, de) + "";
405
- if (W(r))
406
- return ee ? ee.call(r) : "";
519
+ return ge(r, ue) + "";
520
+ if (V(r))
521
+ return ie ? ie.call(r) : "";
407
522
  var e = r + "";
408
523
  return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
409
524
  }
410
- function ge(r) {
525
+ function fe(r) {
411
526
  return r;
412
527
  }
413
- function Ue(r, e, t) {
528
+ function je(r, e, t) {
414
529
  switch (t.length) {
415
530
  case 0:
416
531
  return r.call(e);
@@ -423,72 +538,72 @@ function Ue(r, e, t) {
423
538
  }
424
539
  return r.apply(e, t);
425
540
  }
426
- var Ye = 800, Xe = 16, qe = Date.now;
427
- function je(r) {
541
+ var Ze = 800, Je = 16, Qe = Date.now;
542
+ function et(r) {
428
543
  var e = 0, t = 0;
429
544
  return function() {
430
- var i = qe(), o = Xe - (i - t);
545
+ var i = Qe(), o = Je - (i - t);
431
546
  if (t = i, o > 0) {
432
- if (++e >= Ye)
547
+ if (++e >= Ze)
433
548
  return arguments[0];
434
549
  } else
435
550
  e = 0;
436
551
  return r.apply(void 0, arguments);
437
552
  };
438
553
  }
439
- function Ze(r) {
554
+ function tt(r) {
440
555
  return function() {
441
556
  return r;
442
557
  };
443
558
  }
444
- var Je = J ? function(r, e) {
445
- return J(r, "toString", {
559
+ var it = ee ? function(r, e) {
560
+ return ee(r, "toString", {
446
561
  configurable: !0,
447
562
  enumerable: !1,
448
- value: Ze(e),
563
+ value: tt(e),
449
564
  writable: !0
450
565
  });
451
- } : ge, ue = je(Je), te = Math.max;
452
- function fe(r, e, t) {
453
- return e = te(e === void 0 ? r.length - 1 : e, 0), function() {
454
- for (var i = arguments, o = -1, a = te(i.length - e, 0), n = Array(a); ++o < a; )
566
+ } : fe, me = et(it), re = Math.max;
567
+ function pe(r, e, t) {
568
+ return e = re(e === void 0 ? r.length - 1 : e, 0), function() {
569
+ for (var i = arguments, o = -1, a = re(i.length - e, 0), n = Array(a); ++o < a; )
455
570
  n[o] = i[e + o];
456
571
  o = -1;
457
- for (var l = Array(e + 1); ++o < e; )
458
- l[o] = i[o];
459
- return l[e] = t(n), Ue(r, this, l);
572
+ for (var s = Array(e + 1); ++o < e; )
573
+ s[o] = i[o];
574
+ return s[e] = t(n), je(r, this, s);
460
575
  };
461
576
  }
462
- function Qe(r, e) {
463
- return ue(fe(r, e, ge), r + "");
577
+ function rt(r, e) {
578
+ return me(pe(r, e, fe), r + "");
464
579
  }
465
- function et(r, e, t) {
466
- if (!N(t))
580
+ function at(r, e, t) {
581
+ if (!W(t))
467
582
  return !1;
468
583
  var i = typeof e;
469
- return (i == "number" ? ae(t) && Ge(e, t.length) : i == "string" && e in t) ? oe(t[e], r) : !1;
584
+ return (i == "number" ? ne(t) && Ae(e, t.length) : i == "string" && e in t) ? se(t[e], r) : !1;
470
585
  }
471
- function tt(r) {
472
- return Qe(function(e, t) {
586
+ function ot(r) {
587
+ return rt(function(e, t) {
473
588
  var i = -1, o = t.length, a = o > 1 ? t[o - 1] : void 0, n = o > 2 ? t[2] : void 0;
474
- for (a = r.length > 3 && typeof a == "function" ? (o--, a) : void 0, n && et(t[0], t[1], n) && (a = o < 3 ? void 0 : a, o = 1), e = Object(e); ++i < o; ) {
475
- var l = t[i];
476
- l && r(e, l, i, a);
589
+ for (a = r.length > 3 && typeof a == "function" ? (o--, a) : void 0, n && at(t[0], t[1], n) && (a = o < 3 ? void 0 : a, o = 1), e = Object(e); ++i < o; ) {
590
+ var s = t[i];
591
+ s && r(e, s, i, a);
477
592
  }
478
593
  return e;
479
594
  });
480
595
  }
481
- var it = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, rt = /^\w*$/;
482
- function at(r, e) {
596
+ var nt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, st = /^\w*$/;
597
+ function lt(r, e) {
483
598
  if (L(r))
484
599
  return !1;
485
600
  var t = typeof r;
486
- return t == "number" || t == "symbol" || t == "boolean" || r == null || W(r) ? !0 : rt.test(r) || !it.test(r) || e != null && r in Object(e);
601
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || V(r) ? !0 : st.test(r) || !nt.test(r) || e != null && r in Object(e);
487
602
  }
488
- var ot = "Expected a function";
489
- function V(r, e) {
603
+ var ht = "Expected a function";
604
+ function Y(r, e) {
490
605
  if (typeof r != "function" || e != null && typeof e != "function")
491
- throw new TypeError(ot);
606
+ throw new TypeError(ht);
492
607
  var t = function() {
493
608
  var i = arguments, o = e ? e.apply(this, i) : i[0], a = t.cache;
494
609
  if (a.has(o))
@@ -496,134 +611,134 @@ function V(r, e) {
496
611
  var n = r.apply(this, i);
497
612
  return t.cache = a.set(o, n) || a, n;
498
613
  };
499
- return t.cache = new (V.Cache || ne)(), t;
614
+ return t.cache = new (Y.Cache || le)(), t;
500
615
  }
501
- V.Cache = ne;
502
- var nt = 500;
503
- function st(r) {
504
- var e = V(r, function(i) {
505
- return t.size === nt && t.clear(), i;
616
+ Y.Cache = le;
617
+ var ct = 500;
618
+ function dt(r) {
619
+ var e = Y(r, function(i) {
620
+ return t.size === ct && t.clear(), i;
506
621
  }), t = e.cache;
507
622
  return e;
508
623
  }
509
- var lt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ht = /\\(\\)?/g, ct = st(function(r) {
624
+ var gt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ut = /\\(\\)?/g, ft = dt(function(r) {
510
625
  var e = [];
511
- return r.charCodeAt(0) === 46 && e.push(""), r.replace(lt, function(t, i, o, a) {
512
- e.push(o ? a.replace(ht, "$1") : i || t);
626
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(gt, function(t, i, o, a) {
627
+ e.push(o ? a.replace(ut, "$1") : i || t);
513
628
  }), e;
514
629
  });
515
- function dt(r) {
516
- return r == null ? "" : de(r);
630
+ function mt(r) {
631
+ return r == null ? "" : ue(r);
517
632
  }
518
633
  function U(r, e) {
519
- return L(r) ? r : at(r, e) ? [r] : ct(dt(r));
634
+ return L(r) ? r : lt(r, e) ? [r] : ft(mt(r));
520
635
  }
521
- function me(r) {
522
- if (typeof r == "string" || W(r))
636
+ function ye(r) {
637
+ if (typeof r == "string" || V(r))
523
638
  return r;
524
639
  var e = r + "";
525
640
  return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
526
641
  }
527
- function gt(r, e) {
642
+ function pt(r, e) {
528
643
  e = U(e, r);
529
644
  for (var t = 0, i = e.length; r != null && t < i; )
530
- r = r[me(e[t++])];
645
+ r = r[ye(e[t++])];
531
646
  return t && t == i ? r : void 0;
532
647
  }
533
- var ie = A ? A.isConcatSpreadable : void 0;
534
- function ut(r) {
535
- return L(r) || R(r) || !!(ie && r && r[ie]);
648
+ var ae = E ? E.isConcatSpreadable : void 0;
649
+ function yt(r) {
650
+ return L(r) || N(r) || !!(ae && r && r[ae]);
536
651
  }
537
- function ft(r, e, t, i, o) {
652
+ function vt(r, e, t, i, o) {
538
653
  var a = -1, n = r.length;
539
- for (t || (t = ut), o || (o = []); ++a < n; ) {
540
- var l = r[a];
541
- t(l) ? De(o, l) : o[o.length] = l;
654
+ for (t || (t = yt), o || (o = []); ++a < n; ) {
655
+ var s = r[a];
656
+ t(s) ? ke(o, s) : o[o.length] = s;
542
657
  }
543
658
  return o;
544
659
  }
545
- function mt(r) {
660
+ function Ct(r) {
546
661
  var e = r == null ? 0 : r.length;
547
- return e ? ft(r) : [];
662
+ return e ? vt(r) : [];
548
663
  }
549
- function pt(r) {
550
- return ue(fe(r, void 0, mt), r + "");
664
+ function _t(r) {
665
+ return me(pe(r, void 0, Ct), r + "");
551
666
  }
552
- var yt = "[object Object]", Ct = Function.prototype, vt = Object.prototype, pe = Ct.toString, bt = vt.hasOwnProperty, Mt = pe.call(Object);
553
- function ye(r) {
554
- if (!K(r) || re(r) != yt)
667
+ var Lt = "[object Object]", bt = Function.prototype, Mt = Object.prototype, ve = bt.toString, Tt = Mt.hasOwnProperty, Pt = ve.call(Object);
668
+ function Ce(r) {
669
+ if (!K(r) || oe(r) != Lt)
555
670
  return !1;
556
- var e = Ie(r);
671
+ var e = Re(r);
557
672
  if (e === null)
558
673
  return !0;
559
- var t = bt.call(e, "constructor") && e.constructor;
560
- return typeof t == "function" && t instanceof t && pe.call(t) == Mt;
674
+ var t = Tt.call(e, "constructor") && e.constructor;
675
+ return typeof t == "function" && t instanceof t && ve.call(t) == Pt;
561
676
  }
562
- function _t(r, e, t) {
677
+ function wt(r, e, t) {
563
678
  var i = -1, o = r.length;
564
679
  e < 0 && (e = -e > o ? 0 : o + e), t = t > o ? o : t, t < 0 && (t += o), o = e > t ? 0 : t - e >>> 0, e >>>= 0;
565
680
  for (var a = Array(o); ++i < o; )
566
681
  a[i] = r[i + e];
567
682
  return a;
568
683
  }
569
- function Lt(r) {
684
+ function xt(r) {
570
685
  return function(e, t, i) {
571
- for (var o = -1, a = Object(e), n = i(e), l = n.length; l--; ) {
572
- var s = n[++o];
573
- if (t(a[s], s, a) === !1)
686
+ for (var o = -1, a = Object(e), n = i(e), s = n.length; s--; ) {
687
+ var h = n[++o];
688
+ if (t(a[h], h, a) === !1)
574
689
  break;
575
690
  }
576
691
  return e;
577
692
  };
578
693
  }
579
- var Pt = Lt();
694
+ var It = xt();
580
695
  function z(r, e, t) {
581
- (t !== void 0 && !oe(r[e], t) || t === void 0 && !(e in r)) && Oe(r, e, t);
696
+ (t !== void 0 && !se(r[e], t) || t === void 0 && !(e in r)) && $e(r, e, t);
582
697
  }
583
- function Tt(r) {
584
- return K(r) && ae(r);
698
+ function St(r) {
699
+ return K(r) && ne(r);
585
700
  }
586
701
  function F(r, e) {
587
702
  if (!(e === "constructor" && typeof r[e] == "function") && e != "__proto__")
588
703
  return r[e];
589
704
  }
590
- function wt(r) {
591
- return se(r, le(r));
705
+ function Dt(r) {
706
+ return he(r, ce(r));
592
707
  }
593
- function xt(r, e, t, i, o, a, n) {
594
- var l = F(r, t), s = F(e, t), d = n.get(s);
708
+ function Et(r, e, t, i, o, a, n) {
709
+ var s = F(r, t), h = F(e, t), d = n.get(h);
595
710
  if (d) {
596
711
  z(r, t, d);
597
712
  return;
598
713
  }
599
- var h = a ? a(l, s, t + "", r, e, n) : void 0, c = h === void 0;
714
+ var l = a ? a(s, h, t + "", r, e, n) : void 0, c = l === void 0;
600
715
  if (c) {
601
- var g = L(s), u = !g && Ae(s), f = !g && !u && ke(s);
602
- h = s, g || u || f ? L(l) ? h = l : Tt(l) ? h = Be(l) : u ? (c = !1, h = $e(s, !0)) : f ? (c = !1, h = He(s, !0)) : h = [] : ye(s) || R(s) ? (h = l, R(l) ? h = wt(l) : (!N(l) || he(l)) && (h = Re(s))) : c = !1;
716
+ var g = L(h), f = !g && Be(h), u = !g && !f && He(h);
717
+ l = h, g || f || u ? L(s) ? l = s : St(s) ? l = Ne(s) : f ? (c = !1, l = ze(h, !0)) : u ? (c = !1, l = Fe(h, !0)) : l = [] : Ce(h) || N(h) ? (l = s, N(s) ? l = Dt(s) : (!W(s) || de(s)) && (l = Ke(h))) : c = !1;
603
718
  }
604
- c && (n.set(s, h), o(h, s, i, a, n), n.delete(s)), z(r, t, h);
719
+ c && (n.set(h, l), o(l, h, i, a, n), n.delete(h)), z(r, t, l);
605
720
  }
606
- function Ce(r, e, t, i, o) {
607
- r !== e && Pt(e, function(a, n) {
608
- if (o || (o = new ze()), N(a))
609
- xt(r, e, n, t, Ce, i, o);
721
+ function _e(r, e, t, i, o) {
722
+ r !== e && It(e, function(a, n) {
723
+ if (o || (o = new We()), W(a))
724
+ Et(r, e, n, t, _e, i, o);
610
725
  else {
611
- var l = i ? i(F(r, n), a, n + "", r, e, o) : void 0;
612
- l === void 0 && (l = a), z(r, n, l);
726
+ var s = i ? i(F(r, n), a, n + "", r, e, o) : void 0;
727
+ s === void 0 && (s = a), z(r, n, s);
613
728
  }
614
- }, le);
729
+ }, ce);
615
730
  }
616
- function St(r) {
731
+ function Gt(r) {
617
732
  var e = r == null ? 0 : r.length;
618
733
  return e ? r[e - 1] : void 0;
619
734
  }
620
- function Et(r, e) {
621
- return e.length < 2 ? r : gt(r, _t(e, 0, -1));
622
- }
623
- var Gt = tt(function(r, e, t) {
624
- Ce(r, e, t);
625
- }), Dt = Object.prototype, It = Dt.hasOwnProperty;
626
735
  function Ot(r, e) {
736
+ return e.length < 2 ? r : pt(r, wt(e, 0, -1));
737
+ }
738
+ var At = ot(function(r, e, t) {
739
+ _e(r, e, t);
740
+ }), kt = Object.prototype, Rt = kt.hasOwnProperty;
741
+ function $t(r, e) {
627
742
  e = U(e, r);
628
743
  var t = -1, i = e.length;
629
744
  if (!i)
@@ -631,7 +746,7 @@ function Ot(r, e) {
631
746
  for (var o = r == null || typeof r != "object" && typeof r != "function"; ++t < i; ) {
632
747
  var a = e[t];
633
748
  if (typeof a == "string") {
634
- if (a === "__proto__" && !It.call(r, "__proto__"))
749
+ if (a === "__proto__" && !Rt.call(r, "__proto__"))
635
750
  return !1;
636
751
  if (a === "constructor" && t + 1 < i && typeof e[t + 1] == "string" && e[t + 1] === "prototype") {
637
752
  if (o && t === 0)
@@ -640,25 +755,25 @@ function Ot(r, e) {
640
755
  }
641
756
  }
642
757
  }
643
- var n = Et(r, e);
644
- return n == null || delete n[me(St(e))];
758
+ var n = Ot(r, e);
759
+ return n == null || delete n[ye(Gt(e))];
645
760
  }
646
- function At(r) {
647
- return ye(r) ? void 0 : r;
761
+ function Bt(r) {
762
+ return Ce(r) ? void 0 : r;
648
763
  }
649
- var kt = 1, Bt = 2, $t = 4, Ht = pt(function(r, e) {
764
+ var Ht = 1, Nt = 2, zt = 4, Ft = _t(function(r, e) {
650
765
  var t = {};
651
766
  if (r == null)
652
767
  return t;
653
768
  var i = !1;
654
- e = ce(e, function(a) {
769
+ e = ge(e, function(a) {
655
770
  return a = U(a, r), i || (i = a.length > 1), a;
656
- }), se(r, Fe(r), t), i && (t = Ke(t, kt | Bt | $t, At));
771
+ }), he(r, Ve(r), t), i && (t = Ye(t, Ht | Nt | zt, Bt));
657
772
  for (var o = e.length; o--; )
658
- Ot(t, e[o]);
773
+ $t(t, e[o]);
659
774
  return t;
660
775
  });
661
- function Rt(r, e) {
776
+ function Kt(r, e) {
662
777
  const t = e.materialType || "DynamicImgMaterial" + Date.now() + Math.floor(Math.random() * 1e3);
663
778
  function i(a) {
664
779
  this._definitionChanged = new r.Event(), this._color = a.color, this._colorSubscription = void 0, this.color = a.color, this.duration = a.duration, this._time = Date.now();
@@ -721,7 +836,7 @@ function Rt(r, e) {
721
836
  }
722
837
  }), new i(e);
723
838
  }
724
- function ve(r, e) {
839
+ function Le(r, e) {
725
840
  const t = e.MaterialType || "wallType" + (/* @__PURE__ */ new Date()).getTime() + parseInt(Math.random() * 1e3 + "");
726
841
  function i(a) {
727
842
  this._definitionChanged = new r.Event(), this._color = void 0, this._colorSubscription = void 0, this.color = a.color, this.duration = a.duration, this._time = (/* @__PURE__ */ new Date()).getTime();
@@ -784,13 +899,13 @@ function ve(r, e) {
784
899
  }
785
900
  }), new i(e);
786
901
  }
787
- function zt(r, e) {
788
- const t = r.Color, i = Object.defineProperties, o = r.Event, a = r.createPropertyDescriptor, n = r.Property, l = (c, g) => c === void 0 ? g : c, s = {};
902
+ function Wt(r, e) {
903
+ const t = r.Color, i = Object.defineProperties, o = r.Event, a = r.createPropertyDescriptor, n = r.Property, s = (c, g) => c === void 0 ? g : c, h = {};
789
904
  let d = e.materialType || "PolylineFlow" + Date.now() + Math.floor(Math.random() * 1e3);
790
- function h(c) {
791
- c = l(c, s), this._definitionChanged = new o(), this._color = void 0, this._colorSubscription = void 0, this.color = c.color || t.fromBytes(0, 255, 255, 255), this._duration = void 0, this._durationSubscription = void 0, this.duration = l(c.duration, 45);
905
+ function l(c) {
906
+ c = s(c, h), this._definitionChanged = new o(), this._color = void 0, this._colorSubscription = void 0, this.color = c.color || t.fromBytes(0, 255, 255, 255), this._duration = void 0, this._durationSubscription = void 0, this.duration = s(c.duration, 45);
792
907
  }
793
- return i(h.prototype, {
908
+ return i(l.prototype, {
794
909
  isConstant: {
795
910
  get() {
796
911
  return !1;
@@ -801,21 +916,21 @@ function zt(r, e) {
801
916
  return this._definitionChanged;
802
917
  }
803
918
  }
804
- }), h.prototype.getType = function(c) {
919
+ }), l.prototype.getType = function(c) {
805
920
  return d;
806
- }, h.prototype.getValue = function(c, g) {
921
+ }, l.prototype.getValue = function(c, g) {
807
922
  return g || (g = {}), g.color = n.getValueOrClonedDefault(
808
923
  this._color,
809
924
  c,
810
925
  r.Color.WHITE,
811
926
  g.color
812
927
  ), g.duration = this._duration, g;
813
- }, h.prototype.equals = function(c) {
814
- return this === c || c instanceof h && n.equals(this._color, c._color);
815
- }, i(h.prototype, {
928
+ }, l.prototype.equals = function(c) {
929
+ return this === c || c instanceof l && n.equals(this._color, c._color);
930
+ }, i(l.prototype, {
816
931
  color: a("color"),
817
932
  duration: a("duration")
818
- }), r.PolylineFlowMaterialProperty = h, r.Material._materialCache.addMaterial(d, {
933
+ }), r.PolylineFlowMaterialProperty = l, r.Material._materialCache.addMaterial(d, {
819
934
  fabric: {
820
935
  type: d,
821
936
  uniforms: {
@@ -845,7 +960,7 @@ function zt(r, e) {
845
960
  translucent() {
846
961
  return !0;
847
962
  }
848
- }), new h(e);
963
+ }), new l(e);
849
964
  }
850
965
  class be {
851
966
  categoryMap = /* @__PURE__ */ new Map();
@@ -936,7 +1051,7 @@ class be {
936
1051
  return [...this.categoryMap.keys()];
937
1052
  }
938
1053
  }
939
- class Ft {
1054
+ class Vt {
940
1055
  id;
941
1056
  entities = [];
942
1057
  primitives = [];
@@ -944,8 +1059,8 @@ class Ft {
944
1059
  aggregator;
945
1060
  cardPool;
946
1061
  constructor(e) {
947
- const { id: t, entities: i = [], primitives: o = [], dataItem: a = {}, aggregator: n, cardPool: l } = e;
948
- this.id = t, this.entities = i, this.primitives = o, this.dataItem = a, this.aggregator = n, this.cardPool = l;
1062
+ const { id: t, entities: i = [], primitives: o = [], dataItem: a = {}, aggregator: n, cardPool: s } = e;
1063
+ this.id = t, this.entities = i, this.primitives = o, this.dataItem = a, this.aggregator = n, this.cardPool = s;
949
1064
  }
950
1065
  // 改造 setVisible 方法,支持 Entity 和 Primitive 的可见性控制
951
1066
  setVisible(e) {
@@ -972,7 +1087,7 @@ class Ft {
972
1087
  }), this.primitives = [], t && this.aggregator && Array.isArray(this.dataItem.billboard) && this.aggregator.removePointsById([this.dataItem.id]), t && this.cardPool && this.dataItem.card && this.cardPool.removeByIds([this.dataItem.id]), this.dataItem.id;
973
1088
  }
974
1089
  }
975
- class Kt {
1090
+ class Yt {
976
1091
  id;
977
1092
  groupMap = /* @__PURE__ */ new Map();
978
1093
  Cesium;
@@ -981,13 +1096,13 @@ class Kt {
981
1096
  aggregator;
982
1097
  cardPool;
983
1098
  constructor(e, t, i, o, a, n) {
984
- this.id = e, this.Cesium = t, this.viewer = i, this.materialManager = o, this.aggregator = a, this.cardPool = n, this.aggregator.labelPool.eventBus.addListener(I.Click, {
1099
+ this.id = e, this.Cesium = t, this.viewer = i, this.materialManager = o, this.aggregator = a, this.cardPool = n, this.aggregator.labelPool.eventBus.addListener(S.Click, {
985
1100
  name: "BufferedHierarchicalAggregator_maker_click",
986
- fn: (s, d) => {
987
- this.cardPool.showByIds([s.data.id]);
1101
+ fn: (h, d) => {
1102
+ this.cardPool.showByIds([h.data.id]);
988
1103
  }
989
1104
  }), new t.ScreenSpaceEventHandler(i.scene.canvas).setInputAction(() => {
990
- this.cardPool.hideFilter((s) => !s.initShow);
1105
+ this.cardPool.hideFilter((h) => !h.initShow);
991
1106
  }, t.ScreenSpaceEventType.LEFT_CLICK);
992
1107
  }
993
1108
  /** ====== 下面是抽出的创建函数 ====== */
@@ -1015,15 +1130,15 @@ class Kt {
1015
1130
  themeKey: e.theme,
1016
1131
  category: "wall",
1017
1132
  options: e
1018
- }), o = e.positions.length === e.minimumHeights?.length ? e.minimumHeights.map((s) => s - Number(e.minHeight || 0)) : e.positions.map((s) => (s[2] || 0) - Number(e.minHeight || 0)), a = e.positions.length === e.maximumHeights?.length ? e.maximumHeights.map((s) => s + Number(e.maxHeight || 0)) : e.positions.map((s) => (s[2] || 0) + Number(e.maxHeight || 0)), n = e.positions.map(
1019
- (s) => this.Cesium.Cartesian3.fromDegrees(s[0], s[1], s[2] || 0)
1133
+ }), o = e.positions.length === e.minimumHeights?.length ? e.minimumHeights.map((h) => h - Number(e.minHeight || 0)) : e.positions.map((h) => (h[2] || 0) - Number(e.minHeight || 0)), a = e.positions.length === e.maximumHeights?.length ? e.maximumHeights.map((h) => h + Number(e.maxHeight || 0)) : e.positions.map((h) => (h[2] || 0) + Number(e.maxHeight || 0)), n = e.positions.map(
1134
+ (h) => this.Cesium.Cartesian3.fromDegrees(h[0], h[1], h[2] || 0)
1020
1135
  );
1021
- let l = {
1136
+ let s = {
1022
1137
  ...e
1023
1138
  };
1024
- return i && (l.material = i), this.viewer.entities.add({
1139
+ return i && (s.material = i), this.viewer.entities.add({
1025
1140
  wall: {
1026
- ...l,
1141
+ ...s,
1027
1142
  positions: n,
1028
1143
  minimumHeights: o,
1029
1144
  maximumHeights: a
@@ -1038,16 +1153,16 @@ class Kt {
1038
1153
  category: "polygon",
1039
1154
  options: e
1040
1155
  }), o = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, a = this.Cesium.Cartesian3.fromDegreesArrayHeights(o), n = e.holes?.map((d) => {
1041
- let h = Array.isArray(d[0]) ? e.hierarchy.flat() : e.hole;
1042
- return this.Cesium.Cartesian3.fromDegreesArrayHeights(h.flat());
1043
- }) || [], l = new this.Cesium.PolygonHierarchy(a, n);
1044
- let s = {
1156
+ let l = Array.isArray(d[0]) ? e.hierarchy.flat() : e.hole;
1157
+ return this.Cesium.Cartesian3.fromDegreesArrayHeights(l.flat());
1158
+ }) || [], s = new this.Cesium.PolygonHierarchy(a, n);
1159
+ let h = {
1045
1160
  ...e
1046
1161
  };
1047
- return i && (s.material = i), this.viewer.entities.add({
1162
+ return i && (h.material = i), this.viewer.entities.add({
1048
1163
  polygon: {
1049
- ...s,
1050
- hierarchy: l
1164
+ ...h,
1165
+ hierarchy: s
1051
1166
  // 使用构建好的 PolygonHierarchy
1052
1167
  },
1053
1168
  show: (e.show ?? !0) && t
@@ -1084,19 +1199,19 @@ class Kt {
1084
1199
  const i = e.id || `${Date.now()}`;
1085
1200
  this.removeGroup(i);
1086
1201
  const o = [], a = e.show !== !1;
1087
- (e.polyline || []).forEach((s) => {
1088
- const d = this.createPolyline(s, a);
1202
+ (e.polyline || []).forEach((h) => {
1203
+ const d = this.createPolyline(h, a);
1089
1204
  d && o.push(d);
1090
- }), (e.wall || []).forEach((s) => {
1091
- const d = this.createWall(s, a);
1205
+ }), (e.wall || []).forEach((h) => {
1206
+ const d = this.createWall(h, a);
1092
1207
  d && o.push(d);
1093
- }), (e.polygon || []).forEach((s) => {
1094
- const d = this.createPolygon(s, a);
1208
+ }), (e.polygon || []).forEach((h) => {
1209
+ const d = this.createPolygon(h, a);
1095
1210
  d && o.push(d);
1096
1211
  });
1097
1212
  const n = this.createBillboardPoints(e);
1098
1213
  n.length && t && this.aggregator.appendPoints(n, !1), this.createCard(e);
1099
- const l = new Ft({
1214
+ const s = new Vt({
1100
1215
  id: i,
1101
1216
  entities: o,
1102
1217
  primitives: [],
@@ -1104,7 +1219,7 @@ class Kt {
1104
1219
  aggregator: this.aggregator,
1105
1220
  cardPool: this.cardPool
1106
1221
  });
1107
- return this.groupMap.set(i, l), n;
1222
+ return this.groupMap.set(i, s), n;
1108
1223
  }
1109
1224
  async addGroups(e) {
1110
1225
  const i = e.map((o) => this.addGroup(o, !1)).flat();
@@ -1144,7 +1259,7 @@ class Kt {
1144
1259
  this.groupMap.forEach((e) => e.removeAll(this.viewer)), this.groupMap.clear();
1145
1260
  }
1146
1261
  }
1147
- class Nt {
1262
+ class Ut {
1148
1263
  Cesium;
1149
1264
  viewer;
1150
1265
  layerMap = /* @__PURE__ */ new Map();
@@ -1157,7 +1272,7 @@ class Nt {
1157
1272
  addLayer(e) {
1158
1273
  this.layerMap.has(e) || this.layerMap.set(
1159
1274
  e,
1160
- new Kt(
1275
+ new Yt(
1161
1276
  e,
1162
1277
  this.Cesium,
1163
1278
  this.viewer,
@@ -1192,7 +1307,7 @@ class Nt {
1192
1307
  this.layerMap.get(e)?.removeGroups(t);
1193
1308
  }
1194
1309
  }
1195
- class Wt {
1310
+ class Xt {
1196
1311
  labelId;
1197
1312
  cardId;
1198
1313
  opt;
@@ -1206,10 +1321,10 @@ class Wt {
1206
1321
  initCore(e, t, i) {
1207
1322
  let { Cesium: o, viewer: a, aggregatorOptions: n } = e;
1208
1323
  t || (t = new H()), i || (i = new H());
1209
- const l = new q(o, a, this.labelId, t), s = new q(o, a, this.cardId, i, !1), d = new We(o, a, {
1324
+ const s = new Z(o, a, this.labelId, t), h = new Z(o, a, this.cardId, i, !1), d = new Xe(o, a, {
1210
1325
  //聚合
1211
1326
  threshold: n?.threshold || 16,
1212
- displayLimit: n?.displayLimit || 1e3,
1327
+ displayLimit: n?.displayLimit || 300,
1213
1328
  maxLevel: n?.maxLevel || 20,
1214
1329
  debugCurrentGrids: n?.debugCurrentGrids || !1,
1215
1330
  groupByTheme: n?.groupByTheme ?? !0,
@@ -1219,16 +1334,16 @@ class Wt {
1219
1334
  centralPointMode: n?.centralPointMode || "firstPoint",
1220
1335
  // 普通点的默认主题
1221
1336
  ...n,
1222
- labelPool: l
1223
- }), h = this.MaterialManager, c = new Nt(
1337
+ labelPool: s
1338
+ }), l = this.MaterialManager, c = new Ut(
1224
1339
  //实体图层管理
1225
1340
  o,
1226
1341
  a,
1227
- h,
1342
+ l,
1228
1343
  d,
1229
- s
1344
+ h
1230
1345
  );
1231
- return { materialManager: h, entityLayerManager: c, cardPool: s, labelPool: l, aggregator: d, eventBus: t, cardEventBus: i };
1346
+ return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator: d, eventBus: t, cardEventBus: i };
1232
1347
  }
1233
1348
  //添加标记
1234
1349
  set(e) {
@@ -1253,8 +1368,8 @@ class Wt {
1253
1368
  const o = i.map((a) => {
1254
1369
  const n = this.entityList.get(a.id);
1255
1370
  if (!n) return;
1256
- let l = Gt({}, n, a);
1257
- return this.entityList.set(a.id, l), l;
1371
+ let s = At({}, n, a);
1372
+ return this.entityList.set(a.id, s), s;
1258
1373
  }).filter(Boolean);
1259
1374
  t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default", o);
1260
1375
  }
@@ -1283,14 +1398,14 @@ class Wt {
1283
1398
  this.instance.aggregator.setDebugCurrentGrids(e || !1);
1284
1399
  }
1285
1400
  }
1286
- function Vt({
1401
+ function qt({
1287
1402
  Cesium: r,
1288
1403
  options: e,
1289
1404
  MaterialManager: t
1290
1405
  }) {
1291
1406
  if (e.data?.theme) {
1292
1407
  if (e.data?.lineType == "1") {
1293
- let i = zt(r, {
1408
+ let i = Wt(r, {
1294
1409
  color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
1295
1410
  duration: 100
1296
1411
  });
@@ -1330,7 +1445,7 @@ function Vt({
1330
1445
  category: "polyline"
1331
1446
  });
1332
1447
  } else if (e.data?.lineType == "5") {
1333
- let i = Rt(r, {
1448
+ let i = Kt(r, {
1334
1449
  image: e.img,
1335
1450
  color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
1336
1451
  duration: 5e3,
@@ -1346,7 +1461,7 @@ function Vt({
1346
1461
  }
1347
1462
  }
1348
1463
  }
1349
- function Ut({
1464
+ function jt({
1350
1465
  Cesium: r,
1351
1466
  options: e,
1352
1467
  MaterialManager: t
@@ -1369,7 +1484,7 @@ function Ut({
1369
1484
  category: "polygon"
1370
1485
  });
1371
1486
  } else if (e.data?.polygonType == "DynamicImgMaterial") {
1372
- let i = ve(r, {
1487
+ let i = Le(r, {
1373
1488
  image: e.img,
1374
1489
  color: new r.Color.fromCssColorString(e?.options?.color),
1375
1490
  duration: 5e3,
@@ -1385,7 +1500,7 @@ function Ut({
1385
1500
  }
1386
1501
  }
1387
1502
  }
1388
- function Yt({
1503
+ function Zt({
1389
1504
  Cesium: r,
1390
1505
  options: e,
1391
1506
  MaterialManager: t
@@ -1401,7 +1516,7 @@ function Yt({
1401
1516
  category: "wall"
1402
1517
  });
1403
1518
  } else if (e.data?.wallType == "DynamicImgMaterial") {
1404
- let i = ve(r, {
1519
+ let i = Le(r, {
1405
1520
  image: e.img,
1406
1521
  // color: new Cesium.Color.fromCssColorString(options?.options?.color),
1407
1522
  duration: 5e3,
@@ -1417,7 +1532,7 @@ function Yt({
1417
1532
  }
1418
1533
  }
1419
1534
  }
1420
- class Xt extends Wt {
1535
+ class Jt extends Xt {
1421
1536
  constructor(e) {
1422
1537
  const {
1423
1538
  labelId: t = "report-marker",
@@ -1425,25 +1540,25 @@ class Xt extends Wt {
1425
1540
  tagThemeConfig: o = [],
1426
1541
  lineThemeConfig: a = [],
1427
1542
  cardThemeConfig: n = [],
1428
- runListener: l = () => {
1543
+ runListener: s = () => {
1429
1544
  },
1430
- MaterialManager: s = new be(),
1545
+ MaterialManager: h = new be(),
1431
1546
  aggregatorOptions: d
1432
- } = e, h = [...o], c = [...a], g = [...n], u = {
1547
+ } = e, l = [...o], c = [...a], g = [...n], f = {
1433
1548
  clusterTheme: "Tag1007",
1434
1549
  pointTheme: "Tag1001",
1435
1550
  centralPointMode: "firstPoint",
1436
1551
  debugCurrentGrids: !1,
1437
1552
  ...d || {}
1438
- }, f = {
1553
+ }, u = {
1439
1554
  ...e,
1440
1555
  labelId: t,
1441
1556
  cardId: i,
1442
- MaterialManager: s,
1443
- aggregatorOptions: u,
1557
+ MaterialManager: h,
1558
+ aggregatorOptions: f,
1444
1559
  eventBus: new H()
1445
1560
  };
1446
- super(f), this.opt = { ...this.opt, ...f }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(h), this.loadLineThemeConfig(c), this.loadCardThemeConfig(g), this.initDefaultLineMaterials(), this.initDefaultTagTheme();
1561
+ super(u), this.opt = { ...this.opt, ...u }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(l), this.loadLineThemeConfig(c), this.loadCardThemeConfig(g), this.initDefaultLineMaterials(), this.initDefaultTagTheme();
1447
1562
  }
1448
1563
  initDefaultTagTheme() {
1449
1564
  this.setTagTheme({
@@ -1556,21 +1671,21 @@ class Xt extends Wt {
1556
1671
  const t = this.opt.Cesium, i = this.instance.materialManager || this.opt.MaterialManager;
1557
1672
  if (e.line?.length > 0)
1558
1673
  for (let o of e.line)
1559
- Vt({
1674
+ qt({
1560
1675
  options: o,
1561
1676
  Cesium: t,
1562
1677
  MaterialManager: i
1563
1678
  });
1564
1679
  if (e.polygon?.length > 0)
1565
1680
  for (let o of e.polygon)
1566
- Ut({
1681
+ jt({
1567
1682
  options: o,
1568
1683
  Cesium: t,
1569
1684
  MaterialManager: i
1570
1685
  });
1571
1686
  if (e.wall?.length > 0)
1572
1687
  for (let o of e.wall)
1573
- Yt({
1688
+ Zt({
1574
1689
  options: o,
1575
1690
  Cesium: t,
1576
1691
  MaterialManager: i
@@ -1603,8 +1718,8 @@ class Xt extends Wt {
1603
1718
  e.forEach((i) => {
1604
1719
  t.registerTheme(i.data.theme, {
1605
1720
  createElement(o, a) {
1606
- let n = a.data.data, l;
1607
- return i.comType == 1 ? l = S(E(j), {
1721
+ let n = a.data.data, s;
1722
+ return i.comType == 1 ? s = M(T(J), {
1608
1723
  data: n || {},
1609
1724
  imgSrc: i.data.img,
1610
1725
  styleConfig: {
@@ -1625,7 +1740,7 @@ class Xt extends Wt {
1625
1740
  top: "0px"
1626
1741
  },
1627
1742
  bgClass: [i.data.theme]
1628
- }) : i.comType == 3 && (l = S(E(j), {
1743
+ }) : i.comType == 3 && (s = M(T(J), {
1629
1744
  data: n || {},
1630
1745
  imgSrc: i.data.img,
1631
1746
  styleConfig: {
@@ -1648,7 +1763,7 @@ class Xt extends Wt {
1648
1763
  bgClass: [i.data.theme]
1649
1764
  // titleConfig: themeOptions.options.titleConfig,
1650
1765
  // pageInfoConfig: themeOptions.options.pageInfoConfig,
1651
- })), D(l, o), () => D(null, o);
1766
+ })), I(s, o), () => I(null, o);
1652
1767
  },
1653
1768
  options: {
1654
1769
  offset: i.data.pixelOffset,
@@ -1663,8 +1778,8 @@ class Xt extends Wt {
1663
1778
  t.registerTheme(e.data.theme, {
1664
1779
  createElement(i, o) {
1665
1780
  let a = o.data?.billboard?.[0];
1666
- const n = Ht(a, ["position", "options"]);
1667
- let l, s = {
1781
+ const n = Ft(a, ["position", "options"]);
1782
+ let s, h = {
1668
1783
  ...n,
1669
1784
  text: a?.options?.text,
1670
1785
  isFullLink: e?.isFullLink ?? !1,
@@ -1672,7 +1787,7 @@ class Xt extends Wt {
1672
1787
  textStyle: e?.data?.options?.textStyle,
1673
1788
  imgStyle: e?.data?.options?.imgStyle
1674
1789
  };
1675
- return o.data?.gridKey ? l = S(E(Z), {
1790
+ return o.data?.gridKey ? s = M(T(Q), {
1676
1791
  text: o.data?.count,
1677
1792
  isFullLink: e.isFullLink ?? !1,
1678
1793
  img: e?.data.options.img,
@@ -1692,7 +1807,7 @@ class Xt extends Wt {
1692
1807
  "text-align": "center",
1693
1808
  color: "white"
1694
1809
  }
1695
- }) : e.comType == 4 ? l = S(E(Ee), s) : l = S(E(Z), s), D(l, i), () => D(null, i);
1810
+ }) : e.comType == 4 ? s = M(T(Oe), h) : s = M(T(Q), h), I(s, i), () => I(null, i);
1696
1811
  },
1697
1812
  options: {
1698
1813
  offset: e?.data?.pixelOffset || {}
@@ -1702,41 +1817,41 @@ class Xt extends Wt {
1702
1817
  //标记监听事件
1703
1818
  initTagListener(e, t) {
1704
1819
  let { viewer: i, tagListeningOptions: o } = t;
1705
- e.addListener(I.Click, {
1820
+ e.addListener(S.Click, {
1706
1821
  name: "marker:click",
1707
1822
  fn: (a) => {
1708
- t.runListener?.(O.标记左键点击, a.data), he(a.data?.onClick) && a.data?.onClick(a.data), a.data?.cameraPoint && a.data?.billboard[0]?.isFlyToCameraPoint && i?.camera?.flyTo({
1823
+ t.runListener?.(D.标记左键点击, a.data), de(a.data?.onClick) && a.data?.onClick(a.data), a.data?.cameraPoint && a.data?.billboard[0]?.isFlyToCameraPoint && i?.camera?.flyTo({
1709
1824
  duration: 1,
1710
1825
  ...a.data?.cameraPoint
1711
1826
  });
1712
1827
  }
1713
- }), e.addListener(I.MouseEnter, {
1828
+ }), e.addListener(S.MouseEnter, {
1714
1829
  name: "marker:mouseenter",
1715
1830
  fn: (a) => {
1716
- let n = this.opt.Cesium, l = { x: 0, y: 0 };
1831
+ let n = this.opt.Cesium, s = { x: 0, y: 0 };
1717
1832
  try {
1718
1833
  if (a.data?.billboard?.[0]?.position?.length > 2) {
1719
- let s = a.data?.billboard[0]?.position, d = n.Cartesian3.fromDegrees(s[0], s[1], s[3] || 0), h = this.instance.labelPool.toWindowCoordinates(d);
1720
- l.x = h.x, l.y = h.y;
1834
+ let h = a.data?.billboard[0]?.position, d = n.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(d);
1835
+ s.x = l.x, s.y = l.y;
1721
1836
  }
1722
- } catch (s) {
1723
- console.log(s);
1837
+ } catch (h) {
1838
+ console.log(h);
1724
1839
  }
1725
- t.runListener?.(O.标记移入, a.data, l);
1840
+ t.runListener?.(D.标记移入, a.data, s);
1726
1841
  }
1727
- }), e.addListener(I.MouseLeave, {
1842
+ }), e.addListener(S.MouseLeave, {
1728
1843
  name: "marker:mouseleave",
1729
1844
  fn: (a) => {
1730
- let n = this.opt.Cesium, l = { x: 0, y: 0 };
1845
+ let n = this.opt.Cesium, s = { x: 0, y: 0 };
1731
1846
  try {
1732
1847
  if (a.data?.billboard?.[0]?.position?.length > 2) {
1733
- let s = a.data?.billboard[0]?.position, d = n.Cartesian3.fromDegrees(s[0], s[1], s[3] || 0), h = this.instance.labelPool.toWindowCoordinates(d);
1734
- l.x = h.x, l.y = h.y;
1848
+ let h = a.data?.billboard[0]?.position, d = n.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(d);
1849
+ s.x = l.x, s.y = l.y;
1735
1850
  }
1736
- } catch (s) {
1737
- console.log(s);
1851
+ } catch (h) {
1852
+ console.log(h);
1738
1853
  }
1739
- t.runListener?.(O.标记移出, a.data, l);
1854
+ t.runListener?.(D.标记移出, a.data, s);
1740
1855
  }
1741
1856
  }), o?.forEach((a) => {
1742
1857
  e.addListener(a.key, a.ListenerItem, a.overwrite);
@@ -1754,68 +1869,68 @@ class Xt extends Wt {
1754
1869
  });
1755
1870
  }
1756
1871
  }
1757
- const qt = /* @__PURE__ */ Le({
1872
+ const Qt = /* @__PURE__ */ xe({
1758
1873
  __name: "MarkerManage",
1759
- props: Ne,
1874
+ props: Ue,
1760
1875
  emits: ["register", "load", "marker-event"],
1761
1876
  setup(r, { expose: e, emit: t }) {
1762
- const i = r, o = t, a = Pe("leitingMethods");
1877
+ const i = r, o = t, a = Ie("leitingMethods");
1763
1878
  let n = null;
1764
- const l = (h = {}) => {
1879
+ const s = (l = {}) => {
1765
1880
  if (n) return n;
1766
1881
  const c = {
1767
1882
  ...i,
1768
- ...h,
1769
- Cesium: h.Cesium || i.Cesium,
1770
- viewer: h.viewer || i.viewer,
1771
- runListener: (g, u, ...f) => {
1772
- o("marker-event", { key: g, data: u, args: f });
1883
+ ...l,
1884
+ Cesium: l.Cesium || i.Cesium,
1885
+ viewer: l.viewer || i.viewer,
1886
+ runListener: (g, f, ...u) => {
1887
+ o("marker-event", { key: g, data: f, args: u });
1773
1888
  }
1774
1889
  };
1775
- return !c.Cesium || !c.viewer ? null : (n = new Xt(c), h.methods && (h.methods.setTagTheme = n.setTagTheme.bind(n), h.methods.setMaterial = n.setMaterial.bind(n), h.methods.setEntityList = n.set.bind(n), h.methods.addComItem = n.add.bind(n), h.methods.deleteComItem = n.delete.bind(n), h.methods.updateComItem = n.update.bind(n), h.methods.getEntityByID = n.getById.bind(n), h.methods.getOptions = n.getOptions.bind(n)), o("load", n), n);
1776
- }, s = {
1777
- init: l,
1778
- set: (h) => n?.set(h),
1779
- add: (h) => n?.add(h),
1780
- update: (h, c) => n?.update(h, c),
1781
- getById: (h) => n?.getById(h),
1890
+ return !c.Cesium || !c.viewer ? null : (n = new Jt(c), l.methods && (l.methods.setTagTheme = n.setTagTheme.bind(n), l.methods.setMaterial = n.setMaterial.bind(n), l.methods.setEntityList = n.set.bind(n), l.methods.addComItem = n.add.bind(n), l.methods.deleteComItem = n.delete.bind(n), l.methods.updateComItem = n.update.bind(n), l.methods.getEntityByID = n.getById.bind(n), l.methods.getOptions = n.getOptions.bind(n)), o("load", n), n);
1891
+ }, h = {
1892
+ init: s,
1893
+ set: (l) => n?.set(l),
1894
+ add: (l) => n?.add(l),
1895
+ update: (l, c) => n?.update(l, c),
1896
+ getById: (l) => n?.getById(l),
1782
1897
  getOptions: () => n?.getOptions(),
1783
- delete: (h) => n?.delete(h),
1784
- setMarkerAggregationEnabled: (h, c) => n?.setMarkerAggregationEnabled(h, c),
1785
- setDebugCurrentGridsEnabled: (h) => n?.setDebugCurrentGridsEnabled(h),
1786
- initThemes: (h) => n?.initThemes(h),
1787
- setTagTheme: (h) => n?.setTagTheme(h),
1788
- setMaterial: (h) => n?.setMaterial(h)
1898
+ delete: (l) => n?.delete(l),
1899
+ setMarkerAggregationEnabled: (l, c) => n?.setMarkerAggregationEnabled(l, c),
1900
+ setDebugCurrentGridsEnabled: (l) => n?.setDebugCurrentGridsEnabled(l),
1901
+ initThemes: (l) => n?.initThemes(l),
1902
+ setTagTheme: (l) => n?.setTagTheme(l),
1903
+ setMaterial: (l) => n?.setMaterial(l)
1789
1904
  };
1790
- e(s), o("register", s);
1905
+ e(h), o("register", h);
1791
1906
  function d() {
1792
1907
  if (n) return n;
1793
- const h = Se(a), c = h?.getCesium?.(), g = h?.getViewer?.();
1794
- c && g ? l({ Cesium: c, viewer: g, methods: h }) : i.Cesium && i.viewer && l({ methods: h });
1908
+ const l = Ge(a), c = l?.getCesium?.(), g = l?.getViewer?.();
1909
+ c && g ? s({ Cesium: c, viewer: g, methods: l }) : i.Cesium && i.viewer && s({ methods: l });
1795
1910
  }
1796
- return Te(() => {
1911
+ return Se(() => {
1797
1912
  d();
1798
- }), X(
1913
+ }), j(
1799
1914
  () => [i.Cesium, i.viewer],
1800
- ([h, c]) => {
1801
- h && c && !n && d();
1915
+ ([l, c]) => {
1916
+ l && c && !n && d();
1802
1917
  }
1803
- ), X(
1918
+ ), j(
1804
1919
  () => a?.value,
1805
- (h, c) => {
1920
+ (l, c) => {
1806
1921
  d();
1807
1922
  },
1808
1923
  { deep: !1 }
1809
- ), we(() => {
1810
- }), (h, c) => xe(h.$slots, "default");
1924
+ ), De(() => {
1925
+ }), (l, c) => Ee(l.$slots, "default");
1811
1926
  }
1812
- }), ri = _e(qt);
1927
+ }), si = we(Qt);
1813
1928
  export {
1814
- ri as CxMarkerManage,
1815
- Xt as MarkerManage,
1816
- Wt as MarkerManagerCore,
1817
- O as ReportListenerKey,
1818
- ri as default,
1819
- Ne as markerManageProps
1929
+ si as CxMarkerManage,
1930
+ Jt as MarkerManage,
1931
+ Xt as MarkerManagerCore,
1932
+ D as ReportListenerKey,
1933
+ si as default,
1934
+ Ue as markerManageProps
1820
1935
  };
1821
1936
  //# sourceMappingURL=marker-manage.js.map