@soonspacejs/plugin-tiles 2.15.15 → 2.15.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,25 +1,25 @@
1
- import I from "soonspacejs";
2
- import { TilesRenderer as T } from "um-3d-tiles-renderer";
3
- import { GLTFLoader as de } from "three/examples/jsm/loaders/GLTFLoader.js";
4
- import { MathUtils as f, MeshBasicMaterial as he, Color as L, PerspectiveCamera as V, Matrix4 as b, Vector3 as Oe, Box3 as Me, Sphere as ue, MeshStandardMaterial as Se, ShaderMaterial as Z } from "three";
5
- import { TilesFadePlugin as B, UpdateOnChangePlugin as H, QuantizedMeshPlugin as J, ImageOverlayPlugin as ce, XYZTilesOverlay as pe, ReorientationPlugin as j, StyledGeoJSONOverlay as K, CesiumIonOverlay as we, TMSTilesOverlay as Ce, UrlTemplateTilesOverlay as be, WMSTilesOverlay as Te, WMTSCapabilitiesLoader as Pe, WMTSTilesOverlay as Ee, CesiumIonAuthPlugin as ge } from "um-3d-tiles-renderer/plugins";
6
- import { CesiumGroundTextPrimitive as k, CesiumGroundPolylinePrimitive as R, CesiumGroundPolygonPrimitive as ee, CesiumGroundCirclePrimitive as te, CesiumGroundPointPrimitive as re, initializeApproximateTerrainHeights as ke, updateTerrainLogDepthUniforms as xe, CesiumGlobeDepth as Re, CESIUM_GROUND_NON_PICKABLE_LAYER as Ie } from "cesium-to-three/ground";
7
- import { createFineArrow as W, createCurvedArrow as fe, createSwallowtailAttackArrow as ye, createAttackArrow as me, createAssaultDirectionArrow as ve } from "cesium-to-three/arrow";
8
- class Ne {
1
+ import D from "soonspacejs";
2
+ import { TilesRenderer as I } from "um-3d-tiles-renderer";
3
+ import { GLTFLoader as Me } from "three/examples/jsm/loaders/GLTFLoader.js";
4
+ import { MathUtils as p, MeshBasicMaterial as Oe, Color as W, Vector3 as a, Matrix4 as g, Quaternion as Se, TextureLoader as Ne, PerspectiveCamera as ae, Box3 as Fe, Sphere as Ce, MeshStandardMaterial as Ae, ShaderMaterial as le } from "three";
5
+ import { TilesFadePlugin as ee, UpdateOnChangePlugin as te, QuantizedMeshPlugin as H, ImageOverlayPlugin as be, XYZTilesOverlay as ke, ReorientationPlugin as re, StyledGeoJSONOverlay as ce, CesiumIonOverlay as Le, TMSTilesOverlay as De, UrlTemplateTilesOverlay as Ge, WMSTilesOverlay as Ue, WMTSCapabilitiesLoader as We, WMTSTilesOverlay as Je, CesiumIonAuthPlugin as xe } from "um-3d-tiles-renderer/plugins";
6
+ import { CesiumGroundTextPrimitive as N, CesiumGroundPolylinePrimitive as L, CesiumGroundPointPrimitive as A, CesiumGroundPolygonPrimitive as he, CesiumGroundCirclePrimitive as de, initializeApproximateTerrainHeights as ze, updateTerrainLogDepthUniforms as Be, CesiumGlobeDepth as $e, CESIUM_GROUND_NON_PICKABLE_LAYER as je } from "cesium-to-three/ground";
7
+ import { createFineArrow as Q, createCurvedArrow as Te, createSwallowtailAttackArrow as Pe, createAttackArrow as Ie, createAssaultDirectionArrow as Ee } from "cesium-to-three/arrow";
8
+ class He {
9
9
  constructor(e) {
10
10
  this.parser = e, this.name = "KHR_texture_basisu_patch";
11
11
  }
12
12
  loadTexture(e) {
13
- const t = this.parser, r = t.json, n = r.textures[e].source, a = r.images[n];
14
- if (!a || a.mimeType !== "image/ktx2")
13
+ const t = this.parser, r = t.json, n = r.textures[e].source, o = r.images[n];
14
+ if (!o || o.mimeType !== "image/ktx2")
15
15
  return null;
16
- const o = t.options.ktx2Loader;
17
- if (!o)
18
- throw new Error(`${I.utils.consoleSspTitle}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`);
19
- return t.loadTextureImage(e, n, o);
16
+ const l = t.options.ktx2Loader;
17
+ if (!l)
18
+ throw new Error(`${D.utils.consoleSspTitle}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`);
19
+ return t.loadTextureImage(e, n, l);
20
20
  }
21
21
  }
22
- class bt {
22
+ class rr {
23
23
  constructor(e) {
24
24
  this.ssp = e;
25
25
  const { controls: t, viewport: r } = e;
@@ -46,21 +46,21 @@ class bt {
46
46
  downloadQueue = null;
47
47
  async loadTiles(e) {
48
48
  if (this.tilesMap.has(e)) {
49
- I.utils.warn(`${e} already loaded`);
49
+ D.utils.warn(`${e} already loaded`);
50
50
  return;
51
51
  }
52
- const { ssp: t, ssp: { viewport: r } } = this, i = new T(e);
52
+ const { ssp: t, ssp: { viewport: r } } = this, i = new I(e);
53
53
  this.lruCache === null ? this.lruCache = i.lruCache : i.lruCache = this.lruCache, this.parseQueue === null ? this.parseQueue = i.parseQueue : i.parseQueue = this.parseQueue, this.downloadQueue === null ? this.downloadQueue = i.downloadQueue : i.downloadQueue = this.downloadQueue;
54
- const n = new de(i.manager);
55
- n.register((h) => new Ne(h));
56
- const { dracoLoader: a, ktx2Loader: o, meshoptDecoder: d } = t.manager.store.modelManager.gltfLoader;
57
- a && n.setDRACOLoader(a), o && n.setKTX2Loader(o), d && n.setMeshoptDecoder(d), i.manager.addHandler(/\.gltf$/, n), this.tilesMap.set(e, i), i.setCamera(this._tilesCamera), i.setResolutionFromRenderer(this._tilesCamera, r.renderer), i.lruCache.maxSize = 600, i.lruCache.minSize = 300, i.lruCache.unloadPercent = 0.8, t.addObject(i.group);
58
- const l = () => {
54
+ const n = new Me(i.manager);
55
+ n.register((d) => new He(d));
56
+ const { dracoLoader: o, ktx2Loader: l, meshoptDecoder: h } = t.manager.store.modelManager.gltfLoader;
57
+ o && n.setDRACOLoader(o), l && n.setKTX2Loader(l), h && n.setMeshoptDecoder(h), i.manager.addHandler(/\.gltf$/, n), this.tilesMap.set(e, i), i.setCamera(this._tilesCamera), i.setResolutionFromRenderer(this._tilesCamera, r.renderer), i.lruCache.maxSize = 600, i.lruCache.minSize = 300, i.lruCache.unloadPercent = 0.8, t.addObject(i.group);
58
+ const c = () => {
59
59
  this.cameraTransitionStart || (this.needsUpdate = !0, t.render());
60
60
  };
61
- return i.addEventListener("load-model", l), new Promise((h) => {
61
+ return i.addEventListener("load-model", c), new Promise((d) => {
62
62
  i.addEventListener("load-tile-set", () => {
63
- l(), h(i);
63
+ c(), d(i);
64
64
  });
65
65
  });
66
66
  }
@@ -69,31 +69,31 @@ class bt {
69
69
  return t ? (t.dispose(), this.tilesMap.delete(e), this.ssp.removeObject(t.group), !0) : !1;
70
70
  }
71
71
  }
72
- let Ae = class {
72
+ let Qe = class {
73
73
  priority = -999;
74
74
  processTileModel(e) {
75
75
  e.traverse((t) => {
76
- t.material && (t.material = new he());
76
+ t.material && (t.material = new Oe());
77
77
  });
78
78
  }
79
79
  };
80
- const Le = "https://sooncps.xwbuilders.com/api/ugis-dataprocess/v1/terrain/NhBLlMx3/";
81
- class Pt {
80
+ const Ye = "https://sooncps.xwbuilders.com/api/ugis-dataprocess/v1/terrain/NhBLlMx3/";
81
+ class sr {
82
82
  constructor(e) {
83
- this.ssp = e, this.tiles = new T(Le), this.tiles.fetchData = async (t, r) => {
83
+ this.ssp = e, this.tiles = new I(Ye), this.tiles.fetchData = async (t, r) => {
84
84
  if (/layer\.json$/.test(t)) {
85
85
  const i = await fetch(t, r).then((n) => n.json());
86
86
  return i.metadataAvailability = -1, new Response(JSON.stringify(i));
87
87
  }
88
88
  return fetch(t, r);
89
- }, this.tilesFadePlugin = new B({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new H(), this.quantizedPlugin = new J({}), this.customMaterialPlugin = new Ae(), this.imageOverlayPlugin = new ce({
89
+ }, this.tilesFadePlugin = new ee({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new te(), this.quantizedPlugin = new H({}), this.customMaterialPlugin = new Qe(), this.imageOverlayPlugin = new be({
90
90
  renderer: e.viewport.renderer,
91
91
  overlays: [
92
- new pe({
92
+ new ke({
93
93
  url: "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
94
94
  })
95
95
  ]
96
- }), this.reorientationPlugin = new j({
96
+ }), this.reorientationPlugin = new re({
97
97
  lon: 120,
98
98
  lat: 30,
99
99
  height: 0.1
@@ -124,10 +124,10 @@ class Pt {
124
124
  }
125
125
  invalidate(e, t, r) {
126
126
  const i = () => {
127
- const a = f.degToRad(t), o = f.degToRad(e);
127
+ const o = p.degToRad(t), l = p.degToRad(e);
128
128
  this.reorientationPlugin.transformLatLonHeightToOrigin(
129
- a,
130
129
  o,
130
+ l,
131
131
  r
132
132
  ), this.ssp.render(), n();
133
133
  }, n = () => {
@@ -141,7 +141,7 @@ class Pt {
141
141
  ), this.loedTilesSets.clear(), this.tiles.removeEventListener("needs-render", this.render), this.tiles.removeEventListener("needs-update", this.render), this.tiles.dispose();
142
142
  }
143
143
  }
144
- class De {
144
+ class Xe {
145
145
  // 使用较低的 priority 确保在 ImageOverlayPlugin 之后执行
146
146
  // ImageOverlayPlugin 默认 priority 是 -1
147
147
  priority = -999;
@@ -152,7 +152,7 @@ class De {
152
152
  */
153
153
  processTileModel(e) {
154
154
  e.traverse((t) => {
155
- t.material && (t.material = new he());
155
+ t.material && (t.material = new Oe());
156
156
  });
157
157
  }
158
158
  /**
@@ -184,8 +184,8 @@ class De {
184
184
  e.needsUpdate = !0;
185
185
  }
186
186
  }
187
- var u = /* @__PURE__ */ ((s) => (s.GEOJSON = "geojson", s.CESIUM_ION = "cesiumIon", s.TMS = "tms", s.XYZ = "xyz", s.WMS = "wms", s.WMTS = "wmts", s.URL_TEMPLATE = "urlTemplate", s.PLOT = "plot", s))(u || {}), M = /* @__PURE__ */ ((s) => (s.QUANTIZED_MESH = "quantizedMesh", s.CESIUM_ION = "cesiumIon", s))(M || {});
188
- class N {
187
+ var u = /* @__PURE__ */ ((s) => (s.GEOJSON = "geojson", s.CESIUM_ION = "cesiumIon", s.TMS = "tms", s.XYZ = "xyz", s.WMS = "wms", s.WMTS = "wmts", s.URL_TEMPLATE = "urlTemplate", s.PLOT = "plot", s))(u || {}), k = /* @__PURE__ */ ((s) => (s.QUANTIZED_MESH = "quantizedMesh", s.CESIUM_ION = "cesiumIon", s))(k || {});
188
+ class G {
189
189
  constructor(e, t) {
190
190
  this.imageOverlayPlugin = e, this.resourceManager = t;
191
191
  }
@@ -209,8 +209,8 @@ class N {
209
209
  defaultStyle: this._buildGeoJSONDefaultStyle(e, r),
210
210
  ...this._getGeoJSONModeFlags(r)
211
211
  };
212
- e.color !== void 0 && (i.color = new L(e.color));
213
- const n = new K(i);
212
+ e.color !== void 0 && (i.color = new W(e.color));
213
+ const n = new ce(i);
214
214
  return t.addOverlay(n, e.order), this._instances.set(e.id, {
215
215
  id: e.id,
216
216
  type: e.type,
@@ -231,53 +231,53 @@ class N {
231
231
  updateGeoJSONDefaultStyle(e, t) {
232
232
  const r = this._instances.get(e);
233
233
  if (!r || r.type !== u.GEOJSON) return !1;
234
- const i = r.instance, n = r.options, a = {
234
+ const i = r.instance, n = r.options, o = {
235
235
  ...n.defaultStyle || {},
236
236
  ...t
237
- }, o = {
237
+ }, l = {
238
238
  ...n,
239
- defaultStyle: a
239
+ defaultStyle: o
240
240
  };
241
- return i.defaultStyle = this._buildGeoJSONDefaultStyle(o, o.mode ?? "overlay"), this._updateOverlayOptions(e, { defaultStyle: a }), !0;
241
+ return i.defaultStyle = this._buildGeoJSONDefaultStyle(l, l.mode ?? "overlay"), this._updateOverlayOptions(e, { defaultStyle: o }), !0;
242
242
  }
243
243
  updateGeoJSONStrokeStyle(e, t) {
244
244
  const r = this._instances.get(e);
245
245
  if (!r || r.type !== u.GEOJSON) return !1;
246
- const i = r.instance, n = r.options, a = {
246
+ const i = r.instance, n = r.options, o = {
247
247
  ...n.defaultStyle || {},
248
248
  strokeStyle: t
249
- }, o = {
249
+ }, l = {
250
250
  ...n,
251
251
  strokeStyle: t,
252
- defaultStyle: a
252
+ defaultStyle: o
253
253
  };
254
- return i.defaultStyle = this._buildGeoJSONDefaultStyle(o, o.mode ?? "overlay"), this._updateOverlayOptions(e, { strokeStyle: t, defaultStyle: a }), !0;
254
+ return i.defaultStyle = this._buildGeoJSONDefaultStyle(l, l.mode ?? "overlay"), this._updateOverlayOptions(e, { strokeStyle: t, defaultStyle: o }), !0;
255
255
  }
256
256
  updateGeoJSONStrokeWidth(e, t) {
257
257
  const r = this._instances.get(e);
258
258
  if (!r || r.type !== u.GEOJSON) return !1;
259
- const i = r.instance, n = r.options, a = {
259
+ const i = r.instance, n = r.options, o = {
260
260
  ...n.defaultStyle || {},
261
261
  strokeWidth: t
262
- }, o = {
262
+ }, l = {
263
263
  ...n,
264
264
  strokeWidth: t,
265
- defaultStyle: a
265
+ defaultStyle: o
266
266
  };
267
- return i.defaultStyle = this._buildGeoJSONDefaultStyle(o, o.mode ?? "overlay"), this._updateOverlayOptions(e, { strokeWidth: t, defaultStyle: a }), !0;
267
+ return i.defaultStyle = this._buildGeoJSONDefaultStyle(l, l.mode ?? "overlay"), this._updateOverlayOptions(e, { strokeWidth: t, defaultStyle: o }), !0;
268
268
  }
269
269
  updateGeoJSONFillStyle(e, t) {
270
270
  const r = this._instances.get(e);
271
271
  if (!r || r.type !== u.GEOJSON) return !1;
272
- const i = r.instance, n = r.options, a = {
272
+ const i = r.instance, n = r.options, o = {
273
273
  ...n.defaultStyle || {},
274
274
  fillStyle: t
275
- }, o = {
275
+ }, l = {
276
276
  ...n,
277
277
  fillStyle: t,
278
- defaultStyle: a
278
+ defaultStyle: o
279
279
  };
280
- return i.defaultStyle = this._buildGeoJSONDefaultStyle(o, o.mode ?? "overlay"), this._updateOverlayOptions(e, { fillStyle: t, defaultStyle: a }), !0;
280
+ return i.defaultStyle = this._buildGeoJSONDefaultStyle(l, l.mode ?? "overlay"), this._updateOverlayOptions(e, { fillStyle: t, defaultStyle: o }), !0;
281
281
  }
282
282
  updateGeoJSONMode(e, t) {
283
283
  const r = this._instances.get(e);
@@ -285,8 +285,8 @@ class N {
285
285
  const i = r.instance, n = {
286
286
  ...r.options,
287
287
  mode: t
288
- }, a = this._getGeoJSONModeFlags(t);
289
- return i.alphaInvert = a.alphaInvert, i.alphaMask = a.alphaMask, i.defaultStyle = this._buildGeoJSONDefaultStyle(n, t), i.requestUpdate?.(), this._updateOverlayOptions(e, { mode: t }), !0;
288
+ }, o = this._getGeoJSONModeFlags(t);
289
+ return i.alphaInvert = o.alphaInvert, i.alphaMask = o.alphaMask, i.defaultStyle = this._buildGeoJSONDefaultStyle(n, t), i.requestUpdate?.(), this._updateOverlayOptions(e, { mode: t }), !0;
290
290
  }
291
291
  setGeoJSON(e, t) {
292
292
  const r = this._instances.get(e);
@@ -301,8 +301,8 @@ class N {
301
301
  setMergedGeoJSON(e, t, r) {
302
302
  const i = this._instances.get(e);
303
303
  if (!i || i.type !== u.GEOJSON) return null;
304
- const a = i.instance.setMergedGeoJSON(t, r);
305
- return this._updateOverlayOptions(e, { geojson: a }), a;
304
+ const o = i.instance.setMergedGeoJSON(t, r);
305
+ return this._updateOverlayOptions(e, { geojson: o }), o;
306
306
  }
307
307
  getGeoJSONFeatureById(e, t) {
308
308
  const r = this._instances.get(e);
@@ -328,7 +328,7 @@ class N {
328
328
  addCesiumIonOverlay(e) {
329
329
  const t = this._getImageOverlayPluginForAdd(e.id);
330
330
  if (!t) return null;
331
- const r = new we({
331
+ const r = new Le({
332
332
  assetId: e.assetId,
333
333
  apiToken: e.apiToken,
334
334
  autoRefreshToken: e.autoRefreshToken ?? !0,
@@ -350,7 +350,7 @@ class N {
350
350
  addTMSOverlay(e) {
351
351
  const t = this._getImageOverlayPluginForAdd(e.id);
352
352
  if (!t) return null;
353
- const r = new Ce({
353
+ const r = new De({
354
354
  url: e.url,
355
355
  color: typeof e.color == "number" ? e.color : 16777215,
356
356
  opacity: e.opacity ?? 1
@@ -370,7 +370,7 @@ class N {
370
370
  addXYZOverlay(e) {
371
371
  const t = this._getImageOverlayPluginForAdd(e.id);
372
372
  if (!t) return null;
373
- const r = new pe({
373
+ const r = new ke({
374
374
  url: e.url,
375
375
  color: typeof e.color == "number" ? e.color : 16777215,
376
376
  opacity: e.opacity ?? 1
@@ -421,7 +421,7 @@ class N {
421
421
  addUrlTemplateOverlay(e) {
422
422
  const t = this._getImageOverlayPluginForAdd(e.id);
423
423
  if (!t) return null;
424
- const r = new be({
424
+ const r = new Ge({
425
425
  url: e.url,
426
426
  subdomains: e.subdomains,
427
427
  levels: e.levels,
@@ -453,14 +453,14 @@ class N {
453
453
  crs: e.crs || "EPSG:4326",
454
454
  format: e.format || "image/png",
455
455
  tileDimension: e.tileDimension || 256
456
- }, i = new Te({
456
+ }, i = new Ue({
457
457
  url: e.url,
458
458
  layer: r.layer,
459
459
  crs: r.crs,
460
460
  format: r.format,
461
461
  tileDimension: r.tileDimension,
462
462
  styles: r.styles,
463
- color: new L(typeof e.color == "number" ? e.color : 16777215),
463
+ color: new W(typeof e.color == "number" ? e.color : 16777215),
464
464
  opacity: e.opacity ?? 1
465
465
  });
466
466
  return t.addOverlay(i, e.order), this._instances.set(e.id, {
@@ -478,31 +478,31 @@ class N {
478
478
  async addWMTSOverlay(e) {
479
479
  const t = this._getImageOverlayPluginForAdd(e.id);
480
480
  if (!t) return null;
481
- const r = await new Pe().loadAsync(e.url), i = ["EPSG:4326", "EPSG:3857"];
481
+ const r = await new We().loadAsync(e.url), i = ["EPSG:4326", "EPSG:3857"];
482
482
  let n = e.layer || "";
483
- r.layers.find((o) => o.identifier === n) || (n = r.layers.find(
484
- (o) => o?.tileMatrixSets?.some((d) => i.includes(d.supportedCRS))
483
+ r.layers.find((l) => l.identifier === n) || (n = r.layers.find(
484
+ (l) => l?.tileMatrixSets?.some((h) => i.includes(h.supportedCRS))
485
485
  )?.identifier || r.layers[0].identifier);
486
- const a = new Ee({
486
+ const o = new Je({
487
487
  capabilities: r,
488
488
  layer: n,
489
489
  dimensions: e.dimensions || null,
490
490
  style: e.style || void 0,
491
491
  tileMatrixSet: e.tileMatrixSet || null,
492
492
  planar: !1,
493
- color: new L(typeof e.color == "number" ? e.color : 16777215),
493
+ color: new W(typeof e.color == "number" ? e.color : 16777215),
494
494
  opacity: e.opacity ?? 1
495
495
  });
496
- return t.addOverlay(a, e.order), this._instances.set(e.id, {
496
+ return t.addOverlay(o, e.order), this._instances.set(e.id, {
497
497
  id: e.id,
498
498
  type: e.type,
499
- instance: a,
499
+ instance: o,
500
500
  options: { ...e }
501
501
  }), this.resourceManager?.addOverlay({
502
502
  id: e.id,
503
503
  type: e.type,
504
504
  options: e
505
- }), a;
505
+ }), o;
506
506
  }
507
507
  // =============== 通用方法 ===============
508
508
  /**
@@ -668,7 +668,7 @@ class N {
668
668
  };
669
669
  }
670
670
  _getGeoJSONUtilityOverlay() {
671
- return this._geoJSONUtilityOverlay || (this._geoJSONUtilityOverlay = new K({})), this._geoJSONUtilityOverlay;
671
+ return this._geoJSONUtilityOverlay || (this._geoJSONUtilityOverlay = new ce({})), this._geoJSONUtilityOverlay;
672
672
  }
673
673
  _updateOverlayOptions(e, t) {
674
674
  const r = this._instances.get(e);
@@ -678,7 +678,7 @@ class N {
678
678
  }), this.resourceManager?.updateOverlay(e, t);
679
679
  }
680
680
  _getImageOverlayPluginForAdd(e) {
681
- return this.imageOverlayPlugin ? this._instances.has(e) ? (console.warn(`OverlayManager: Overlay "${e}" already exists`), null) : this._instances.size >= N.MAX_OVERLAY_INSTANCES ? (console.error(`OverlayManager: Cannot add overlay "${e}" because the maximum number of overlays is ${N.MAX_OVERLAY_INSTANCES}`), null) : this.imageOverlayPlugin : null;
681
+ return this.imageOverlayPlugin ? this._instances.has(e) ? (console.warn(`OverlayManager: Overlay "${e}" already exists`), null) : this._instances.size >= G.MAX_OVERLAY_INSTANCES ? (console.error(`OverlayManager: Cannot add overlay "${e}" because the maximum number of overlays is ${G.MAX_OVERLAY_INSTANCES}`), null) : this.imageOverlayPlugin : null;
682
682
  }
683
683
  /**
684
684
  * 获取本地影像数量(不依赖 ResourceManager)
@@ -704,7 +704,7 @@ class N {
704
704
  this.disposeInstances(), this.resourceManager?.clear();
705
705
  }
706
706
  }
707
- class Ge {
707
+ class Ve {
708
708
  /** Overlay 资源配置 */
709
709
  _overlays = /* @__PURE__ */ new Map();
710
710
  // =============== Overlay 资源管理 ===============
@@ -794,7 +794,7 @@ class Ge {
794
794
  e.overlays && (this._overlays.clear(), e.overlays.forEach((t) => this._overlays.set(t.id, { ...t })));
795
795
  }
796
796
  }
797
- class Fe {
797
+ class qe {
798
798
  /** 地形配置映射表 */
799
799
  _terrains = /* @__PURE__ */ new Map();
800
800
  /** 当前激活的地形 ID */
@@ -883,8 +883,8 @@ class Fe {
883
883
  this.clear();
884
884
  }
885
885
  }
886
- let Ue = 1;
887
- class O {
886
+ let Ze = 1;
887
+ class b {
888
888
  /** 自增字符串 id('1' / '2' / '3' ...) */
889
889
  id;
890
890
  /**
@@ -898,7 +898,7 @@ class O {
898
898
  */
899
899
  options;
900
900
  constructor(e) {
901
- this.id = String(Ue++), this.category = "", this.options = { ...e }, this.options.points && (this.options.points = this.options.points.map(
901
+ this.id = String(Ze++), this.category = "", this.options = { ...e }, this.options.points && (this.options.points = this.options.points.map(
902
902
  (t) => [t[0], t[1]]
903
903
  ));
904
904
  }
@@ -945,7 +945,7 @@ class O {
945
945
  return this.options.points || [];
946
946
  }
947
947
  }
948
- class Je extends O {
948
+ class Ke extends b {
949
949
  category = "point";
950
950
  constructor(e) {
951
951
  super(e);
@@ -964,7 +964,7 @@ class Je extends O {
964
964
  return this.getCenterPoints();
965
965
  }
966
966
  }
967
- class We extends O {
967
+ class et extends b {
968
968
  category = "line";
969
969
  constructor(e) {
970
970
  super(e);
@@ -974,7 +974,7 @@ class We extends O {
974
974
  this.options = { ...this.options, ...e };
975
975
  }
976
976
  }
977
- class $e extends O {
977
+ class tt extends b {
978
978
  category = "polygon";
979
979
  constructor(e) {
980
980
  super(e);
@@ -984,7 +984,7 @@ class $e extends O {
984
984
  this.options = { ...this.options, ...e };
985
985
  }
986
986
  }
987
- class ze extends O {
987
+ class rt extends b {
988
988
  category = "rectangle";
989
989
  constructor(e) {
990
990
  super(e);
@@ -994,8 +994,8 @@ class ze extends O {
994
994
  this.options = { ...this.options, ...e };
995
995
  }
996
996
  }
997
- const Be = f.DEG2RAD, ie = 111320;
998
- class He extends O {
997
+ const it = p.DEG2RAD, ue = 111320;
998
+ class st extends b {
999
999
  category = "sector";
1000
1000
  constructor(e) {
1001
1001
  super(e);
@@ -1008,14 +1008,14 @@ class He extends O {
1008
1008
  getExtentPoints() {
1009
1009
  const e = this.options.points;
1010
1010
  if (!e || e.length === 0) return [];
1011
- const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (ie * Math.cos(r * Be)), a = i / ie;
1011
+ const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (ue * Math.cos(r * it)), o = i / ue;
1012
1012
  return [
1013
- [t - n, r - a],
1014
- [t + n, r + a]
1013
+ [t - n, r - o],
1014
+ [t + n, r + o]
1015
1015
  ];
1016
1016
  }
1017
1017
  }
1018
- class je extends O {
1018
+ class nt extends b {
1019
1019
  category = "arrow";
1020
1020
  /** generateCoords() 填充的闭合多边形顶点;初始为空 */
1021
1021
  generatedCoords = [];
@@ -1043,22 +1043,22 @@ class je extends O {
1043
1043
  return this.generatedCoords = [], this.generatedCoords;
1044
1044
  switch (this.options.arrowType) {
1045
1045
  case "fine":
1046
- this.generatedCoords = W(e[0], e[1]);
1046
+ this.generatedCoords = Q(e[0], e[1]);
1047
1047
  break;
1048
1048
  case "assaultDirection":
1049
- this.generatedCoords = ve(e[0], e[1]);
1049
+ this.generatedCoords = Ee(e[0], e[1]);
1050
1050
  break;
1051
1051
  case "attack":
1052
- this.generatedCoords = me(e);
1052
+ this.generatedCoords = Ie(e);
1053
1053
  break;
1054
1054
  case "swallowtailAttack":
1055
- this.generatedCoords = ye(e);
1055
+ this.generatedCoords = Pe(e);
1056
1056
  break;
1057
1057
  case "curved":
1058
- this.generatedCoords = fe(e);
1058
+ this.generatedCoords = Te(e);
1059
1059
  break;
1060
1060
  default:
1061
- this.generatedCoords = W(e[0], e[e.length - 1]);
1061
+ this.generatedCoords = Q(e[0], e[e.length - 1]);
1062
1062
  break;
1063
1063
  }
1064
1064
  return this.generatedCoords;
@@ -1085,7 +1085,7 @@ class je extends O {
1085
1085
  };
1086
1086
  }
1087
1087
  }
1088
- class Qe extends O {
1088
+ class ot extends b {
1089
1089
  category = "text";
1090
1090
  constructor(e) {
1091
1091
  super(e);
@@ -1104,8 +1104,8 @@ class Qe extends O {
1104
1104
  return this.getCenterPoints();
1105
1105
  }
1106
1106
  }
1107
- const Ye = f.DEG2RAD, se = 111320;
1108
- class Xe extends O {
1107
+ const at = p.DEG2RAD, ge = 111320;
1108
+ class lt extends b {
1109
1109
  category = "circle";
1110
1110
  constructor(e) {
1111
1111
  super(e);
@@ -1118,52 +1118,614 @@ class Xe extends O {
1118
1118
  getExtentPoints() {
1119
1119
  const e = this.options.points;
1120
1120
  if (!e || e.length === 0) return [];
1121
- const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (se * Math.cos(r * Ye)), a = i / se;
1121
+ const t = e[0][0], r = e[0][1], i = this.options.radius || 0, n = i / (ge * Math.cos(r * at)), o = i / ge;
1122
1122
  return [
1123
- [t - n, r - a],
1124
- [t + n, r + a]
1123
+ [t - n, r - o],
1124
+ [t + n, r + o]
1125
1125
  ];
1126
1126
  }
1127
1127
  }
1128
- const qe = 3, Ve = 1e3;
1129
- function Ze(s) {
1128
+ const ct = 3, ht = 1e3;
1129
+ function dt(s) {
1130
1130
  return Number.isFinite(s) ? Math.max(Math.round(s), 0) : 0;
1131
1131
  }
1132
- function Ke(s) {
1133
- const e = Ze(s), t = Ve + e * qe;
1132
+ function ut(s) {
1133
+ const e = dt(s), t = ht + e * ct;
1134
1134
  if (!Number.isSafeInteger(t))
1135
1135
  throw new Error("Plot renderOrder exceeded JavaScript safe integer range.");
1136
1136
  return t;
1137
1137
  }
1138
- const $ = {
1139
- OutdoorFireHydrant: "outdoor-hydrant.svg",
1140
- UndergroundHydrant: "outdoor-hydrant-underground.svg",
1141
- AboveGroundHydrant: "outdoor-hydrant-above-ground.svg",
1142
- MunicipalFireHydrants: "municipal-hydrant.svg",
1143
- FireWaterReservoir: "fire-water-pool.svg",
1144
- NaturalWater: "natural-water-source.svg",
1145
- HospitalResourcePoint: "hospital-resource.svg",
1146
- PublicSecurityResourcePoint: "police-resource.svg",
1147
- SupportMaterialPoint: "emergency-supplies.svg",
1148
- FireStation: "fire-station.svg",
1149
- LinkageUnit: "coordination-unit.svg"
1150
- }, Et = Object.freeze(
1151
- Object.keys($)
1152
- ), et = "/node_modules/cesium-to-three/dist/icon/";
1153
- function tt(s) {
1138
+ new a(1, 1, 0);
1139
+ new a();
1140
+ new a();
1141
+ new a();
1142
+ new a();
1143
+ new a();
1144
+ new a();
1145
+ new a();
1146
+ new a();
1147
+ new a();
1148
+ new a();
1149
+ new a();
1150
+ new a();
1151
+ new a();
1152
+ new g();
1153
+ new a();
1154
+ new a();
1155
+ new a();
1156
+ new a();
1157
+ new a();
1158
+ new a();
1159
+ new a();
1160
+ new a();
1161
+ Object.freeze(new a(0, 0, 1));
1162
+ new a();
1163
+ new a();
1164
+ new a();
1165
+ new a();
1166
+ new a();
1167
+ new a();
1168
+ new a();
1169
+ new a();
1170
+ new Se();
1171
+ new Array(9);
1172
+ new a();
1173
+ new a();
1174
+ new a();
1175
+ new a();
1176
+ new a();
1177
+ new a();
1178
+ new a();
1179
+ new a();
1180
+ new a();
1181
+ new a();
1182
+ new a();
1183
+ new a();
1184
+ new a();
1185
+ new a();
1186
+ new a();
1187
+ new a();
1188
+ new g();
1189
+ new a();
1190
+ new a();
1191
+ new a();
1192
+ new Ne();
1193
+ new a();
1194
+ new a();
1195
+ new a();
1196
+ new a();
1197
+ new a();
1198
+ new a();
1199
+ new a();
1200
+ new a();
1201
+ new a();
1202
+ new a();
1203
+ new a();
1204
+ new a();
1205
+ new a();
1206
+ new a();
1207
+ new a();
1208
+ new a();
1209
+ new a();
1210
+ new a();
1211
+ new a();
1212
+ new a();
1213
+ new a();
1214
+ new a();
1215
+ new a();
1216
+ new a();
1217
+ new a();
1218
+ new a();
1219
+ new a();
1220
+ new Se();
1221
+ new a();
1222
+ new a();
1223
+ new a();
1224
+ new a();
1225
+ new a();
1226
+ new a();
1227
+ new a();
1228
+ new a();
1229
+ new a();
1230
+ new a();
1231
+ new a();
1232
+ new a();
1233
+ new a();
1234
+ new a();
1235
+ new a();
1236
+ new a();
1237
+ new a();
1238
+ new a();
1239
+ new a();
1240
+ new a();
1241
+ new a();
1242
+ new a();
1243
+ new a();
1244
+ new a();
1245
+ new a();
1246
+ new a();
1247
+ new a();
1248
+ new a();
1249
+ new g();
1250
+ new g();
1251
+ new a();
1252
+ new a();
1253
+ new a();
1254
+ new a();
1255
+ new a();
1256
+ new a();
1257
+ new a();
1258
+ new g();
1259
+ new g();
1260
+ new a();
1261
+ new a();
1262
+ new a();
1263
+ new g();
1264
+ new g();
1265
+ new a();
1266
+ new a();
1267
+ new a();
1268
+ new a();
1269
+ new g();
1270
+ new g();
1271
+ new a();
1272
+ new a();
1273
+ new a();
1274
+ new a();
1275
+ new a();
1276
+ new a();
1277
+ new a();
1278
+ new a();
1279
+ new a();
1280
+ new a();
1281
+ new a();
1282
+ new g();
1283
+ new a();
1284
+ new a();
1285
+ new a();
1286
+ new a();
1287
+ new a();
1288
+ new a();
1289
+ new a();
1290
+ new a();
1291
+ new a();
1292
+ new a();
1293
+ new a();
1294
+ new a();
1295
+ new a();
1296
+ new a();
1297
+ new g();
1298
+ new g();
1299
+ new a();
1300
+ new a();
1301
+ new a();
1302
+ new g();
1303
+ new g();
1304
+ new a();
1305
+ new a();
1306
+ new g();
1307
+ new g();
1308
+ new a();
1309
+ new a();
1310
+ new a();
1311
+ new a();
1312
+ new a();
1313
+ class C {
1314
+ constructor(e, t) {
1315
+ this.next = null, this.key = e, this.data = t, this.left = null, this.right = null;
1316
+ }
1317
+ }
1318
+ function gt(s, e) {
1319
+ return s > e ? 1 : s < e ? -1 : 0;
1320
+ }
1321
+ function O(s, e, t) {
1322
+ const r = new C(null, null);
1323
+ let i = r, n = r;
1324
+ for (; ; ) {
1325
+ const o = t(s, e.key);
1326
+ if (o < 0) {
1327
+ if (e.left === null) break;
1328
+ if (t(s, e.left.key) < 0) {
1329
+ const l = e.left;
1330
+ if (e.left = l.right, l.right = e, e = l, e.left === null) break;
1331
+ }
1332
+ n.left = e, n = e, e = e.left;
1333
+ } else if (o > 0) {
1334
+ if (e.right === null) break;
1335
+ if (t(s, e.right.key) > 0) {
1336
+ const l = e.right;
1337
+ if (e.right = l.left, l.left = e, e = l, e.right === null) break;
1338
+ }
1339
+ i.right = e, i = e, e = e.right;
1340
+ } else break;
1341
+ }
1342
+ return i.right = e.left, n.left = e.right, e.left = r.right, e.right = r.left, e;
1343
+ }
1344
+ function J(s, e, t, r) {
1345
+ const i = new C(s, e);
1346
+ if (t === null)
1347
+ return i.left = i.right = null, i;
1348
+ t = O(s, t, r);
1349
+ const n = r(s, t.key);
1350
+ return n < 0 ? (i.left = t.left, i.right = t, t.left = null) : n >= 0 && (i.right = t.right, i.left = t, t.right = null), i;
1351
+ }
1352
+ function pe(s, e, t) {
1353
+ let r = null, i = null;
1354
+ if (e) {
1355
+ e = O(s, e, t);
1356
+ const n = t(e.key, s);
1357
+ n === 0 ? (r = e.left, i = e.right) : n < 0 ? (i = e.right, e.right = null, r = e) : (r = e.left, e.left = null, i = e);
1358
+ }
1359
+ return { left: r, right: i };
1360
+ }
1361
+ function pt(s, e, t) {
1362
+ return e === null ? s : (s === null || (e = O(s.key, e, t), e.left = s), e);
1363
+ }
1364
+ function Y(s, e, t, r, i) {
1365
+ if (s) {
1366
+ r(`${e}${t ? "└── " : "├── "}${i(s)}
1367
+ `);
1368
+ const n = e + (t ? " " : "│ ");
1369
+ s.left && Y(s.left, n, !1, r, i), s.right && Y(s.right, n, !0, r, i);
1370
+ }
1371
+ }
1372
+ class ft {
1373
+ constructor(e = gt) {
1374
+ this._root = null, this._size = 0, this._comparator = e;
1375
+ }
1376
+ /**
1377
+ * Inserts a key, allows duplicates
1378
+ */
1379
+ insert(e, t) {
1380
+ return this._size++, this._root = J(e, t, this._root, this._comparator);
1381
+ }
1382
+ /**
1383
+ * Adds a key, if it is not present in the tree
1384
+ */
1385
+ add(e, t) {
1386
+ const r = new C(e, t);
1387
+ this._root === null && (r.left = r.right = null, this._size++, this._root = r);
1388
+ const i = this._comparator, n = O(e, this._root, i), o = i(e, n.key);
1389
+ return o === 0 ? this._root = n : (o < 0 ? (r.left = n.left, r.right = n, n.left = null) : o > 0 && (r.right = n.right, r.left = n, n.right = null), this._size++, this._root = r), this._root;
1390
+ }
1391
+ /**
1392
+ * @param {Key} key
1393
+ * @return {Node|null}
1394
+ */
1395
+ remove(e) {
1396
+ this._root = this._remove(e, this._root, this._comparator);
1397
+ }
1398
+ /**
1399
+ * Deletes i from the tree if it's there
1400
+ */
1401
+ _remove(e, t, r) {
1402
+ let i;
1403
+ return t === null ? null : (t = O(e, t, r), r(e, t.key) === 0 ? (t.left === null ? i = t.right : (i = O(e, t.left, r), i.right = t.right), this._size--, i) : t);
1404
+ }
1405
+ /**
1406
+ * Removes and returns the node with smallest key
1407
+ */
1408
+ pop() {
1409
+ let e = this._root;
1410
+ if (e) {
1411
+ for (; e.left; ) e = e.left;
1412
+ return this._root = O(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
1413
+ }
1414
+ return null;
1415
+ }
1416
+ /**
1417
+ * Find without splaying
1418
+ */
1419
+ findStatic(e) {
1420
+ let t = this._root;
1421
+ const r = this._comparator;
1422
+ for (; t; ) {
1423
+ const i = r(e, t.key);
1424
+ if (i === 0) return t;
1425
+ i < 0 ? t = t.left : t = t.right;
1426
+ }
1427
+ return null;
1428
+ }
1429
+ find(e) {
1430
+ return this._root && (this._root = O(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
1431
+ }
1432
+ contains(e) {
1433
+ let t = this._root;
1434
+ const r = this._comparator;
1435
+ for (; t; ) {
1436
+ const i = r(e, t.key);
1437
+ if (i === 0) return !0;
1438
+ i < 0 ? t = t.left : t = t.right;
1439
+ }
1440
+ return !1;
1441
+ }
1442
+ forEach(e, t) {
1443
+ let r = this._root;
1444
+ const i = [];
1445
+ let n = !1;
1446
+ for (; !n; )
1447
+ r !== null ? (i.push(r), r = r.left) : i.length !== 0 ? (r = i.pop(), e.call(t, r), r = r.right) : n = !0;
1448
+ return this;
1449
+ }
1450
+ /**
1451
+ * Walk key range from `low` to `high`. Stops if `fn` returns a value.
1452
+ */
1453
+ range(e, t, r, i) {
1454
+ const n = [], o = this._comparator;
1455
+ let l = this._root, h;
1456
+ for (; n.length !== 0 || l; )
1457
+ if (l)
1458
+ n.push(l), l = l.left;
1459
+ else {
1460
+ if (l = n.pop(), h = o(l.key, t), h > 0)
1461
+ break;
1462
+ if (o(l.key, e) >= 0 && r.call(i, l))
1463
+ return this;
1464
+ l = l.right;
1465
+ }
1466
+ return this;
1467
+ }
1468
+ /**
1469
+ * Returns array of keys
1470
+ */
1471
+ keys() {
1472
+ const e = [];
1473
+ return this.forEach(({ key: t }) => {
1474
+ e.push(t);
1475
+ }), e;
1476
+ }
1477
+ /**
1478
+ * Returns array of all the data in the nodes
1479
+ */
1480
+ values() {
1481
+ const e = [];
1482
+ return this.forEach(({ data: t }) => {
1483
+ e.push(t);
1484
+ }), e;
1485
+ }
1486
+ min() {
1487
+ return this._root ? this.minNode(this._root).key : null;
1488
+ }
1489
+ max() {
1490
+ return this._root ? this.maxNode(this._root).key : null;
1491
+ }
1492
+ minNode(e = this._root) {
1493
+ if (e) for (; e.left; ) e = e.left;
1494
+ return e;
1495
+ }
1496
+ maxNode(e = this._root) {
1497
+ if (e) for (; e.right; ) e = e.right;
1498
+ return e;
1499
+ }
1500
+ /**
1501
+ * Returns node at given index
1502
+ */
1503
+ at(e) {
1504
+ let t = this._root, r = !1, i = 0;
1505
+ const n = [];
1506
+ for (; !r; )
1507
+ if (t)
1508
+ n.push(t), t = t.left;
1509
+ else if (n.length > 0) {
1510
+ if (t = n.pop(), i === e) return t;
1511
+ i++, t = t.right;
1512
+ } else r = !0;
1513
+ return null;
1514
+ }
1515
+ next(e) {
1516
+ let t = this._root, r = null;
1517
+ if (e.right) {
1518
+ for (r = e.right; r.left; ) r = r.left;
1519
+ return r;
1520
+ }
1521
+ const i = this._comparator;
1522
+ for (; t; ) {
1523
+ const n = i(e.key, t.key);
1524
+ if (n === 0) break;
1525
+ n < 0 ? (r = t, t = t.left) : t = t.right;
1526
+ }
1527
+ return r;
1528
+ }
1529
+ prev(e) {
1530
+ let t = this._root, r = null;
1531
+ if (e.left !== null) {
1532
+ for (r = e.left; r.right; ) r = r.right;
1533
+ return r;
1534
+ }
1535
+ const i = this._comparator;
1536
+ for (; t; ) {
1537
+ const n = i(e.key, t.key);
1538
+ if (n === 0) break;
1539
+ n < 0 ? t = t.left : (r = t, t = t.right);
1540
+ }
1541
+ return r;
1542
+ }
1543
+ clear() {
1544
+ return this._root = null, this._size = 0, this;
1545
+ }
1546
+ toList() {
1547
+ return mt(this._root);
1548
+ }
1549
+ /**
1550
+ * Bulk-load items. Both array have to be same size
1551
+ */
1552
+ load(e, t = [], r = !1) {
1553
+ let i = e.length;
1554
+ const n = this._comparator;
1555
+ if (r && q(e, t, 0, i - 1, n), this._root === null)
1556
+ this._root = X(e, t, 0, i), this._size = i;
1557
+ else {
1558
+ const o = vt(
1559
+ this.toList(),
1560
+ yt(e, t),
1561
+ n
1562
+ );
1563
+ i = this._size + i, this._root = V({ head: o }, 0, i);
1564
+ }
1565
+ return this;
1566
+ }
1567
+ isEmpty() {
1568
+ return this._root === null;
1569
+ }
1570
+ get size() {
1571
+ return this._size;
1572
+ }
1573
+ get root() {
1574
+ return this._root;
1575
+ }
1576
+ toString(e = (t) => String(t.key)) {
1577
+ const t = [];
1578
+ return Y(this._root, "", !0, (r) => t.push(r), e), t.join("");
1579
+ }
1580
+ update(e, t, r) {
1581
+ const i = this._comparator;
1582
+ let { left: n, right: o } = pe(e, this._root, i);
1583
+ i(e, t) < 0 ? o = J(t, r, o, i) : n = J(t, r, n, i), this._root = pt(n, o, i);
1584
+ }
1585
+ split(e) {
1586
+ return pe(e, this._root, this._comparator);
1587
+ }
1588
+ *[Symbol.iterator]() {
1589
+ let e = this._root;
1590
+ const t = [];
1591
+ let r = !1;
1592
+ for (; !r; )
1593
+ e !== null ? (t.push(e), e = e.left) : t.length !== 0 ? (e = t.pop(), yield e, e = e.right) : r = !0;
1594
+ }
1595
+ }
1596
+ function X(s, e, t, r) {
1597
+ const i = r - t;
1598
+ if (i > 0) {
1599
+ const n = t + Math.floor(i / 2), o = s[n], l = e[n], h = new C(o, l);
1600
+ return h.left = X(s, e, t, n), h.right = X(s, e, n + 1, r), h;
1601
+ }
1602
+ return null;
1603
+ }
1604
+ function yt(s, e) {
1605
+ const t = new C(null, null);
1606
+ let r = t;
1607
+ for (let i = 0; i < s.length; i++)
1608
+ r = r.next = new C(s[i], e[i]);
1609
+ return r.next = null, t.next;
1610
+ }
1611
+ function mt(s) {
1612
+ let e = s;
1613
+ const t = [];
1614
+ let r = !1;
1615
+ const i = new C(null, null);
1616
+ let n = i;
1617
+ for (; !r; )
1618
+ e ? (t.push(e), e = e.left) : t.length > 0 ? (e = n = n.next = t.pop(), e = e.right) : r = !0;
1619
+ return n.next = null, i.next;
1620
+ }
1621
+ function V(s, e, t) {
1622
+ const r = t - e;
1623
+ if (r > 0) {
1624
+ const i = e + Math.floor(r / 2), n = V(s, e, i), o = s.head;
1625
+ return o.left = n, s.head = s.head.next, o.right = V(s, i + 1, t), o;
1626
+ }
1627
+ return null;
1628
+ }
1629
+ function vt(s, e, t) {
1630
+ const r = new C(null, null);
1631
+ let i = r, n = s, o = e;
1632
+ for (; n !== null && o !== null; )
1633
+ t(n.key, o.key) < 0 ? (i.next = n, n = n.next) : (i.next = o, o = o.next), i = i.next;
1634
+ return n !== null ? i.next = n : o !== null && (i.next = o), r.next;
1635
+ }
1636
+ function q(s, e, t, r, i) {
1637
+ if (t >= r) return;
1638
+ const n = s[t + r >> 1];
1639
+ let o = t - 1, l = r + 1;
1640
+ for (; ; ) {
1641
+ do
1642
+ o++;
1643
+ while (i(s[o], n) < 0);
1644
+ do
1645
+ l--;
1646
+ while (i(s[l], n) > 0);
1647
+ if (o >= l) break;
1648
+ let h = s[o];
1649
+ s[o] = s[l], s[l] = h, h = e[o], e[o] = e[l], e[l] = h;
1650
+ }
1651
+ q(s, e, t, l, i), q(s, e, l + 1, r, i);
1652
+ }
1653
+ let S = Number.EPSILON;
1654
+ S === void 0 && (S = Math.pow(2, -52));
1655
+ const wt = S * S, fe = (s, e) => {
1656
+ if (-S < s && s < S && -S < e && e < S)
1657
+ return 0;
1658
+ const t = s - e;
1659
+ return t * t < wt * s * e ? 0 : s < e ? -1 : 1;
1660
+ };
1661
+ class _t {
1662
+ constructor() {
1663
+ this.reset();
1664
+ }
1665
+ reset() {
1666
+ this.xRounder = new ye(), this.yRounder = new ye();
1667
+ }
1668
+ round(e, t) {
1669
+ return {
1670
+ x: this.xRounder.round(e),
1671
+ y: this.yRounder.round(t)
1672
+ };
1673
+ }
1674
+ }
1675
+ class ye {
1676
+ constructor() {
1677
+ this.tree = new ft(), this.round(0);
1678
+ }
1679
+ // Note: this can rounds input values backwards or forwards.
1680
+ // You might ask, why not restrict this to just rounding
1681
+ // forwards? Wouldn't that allow left endpoints to always
1682
+ // remain left endpoints during splitting (never change to
1683
+ // right). No - it wouldn't, because we snap intersections
1684
+ // to endpoints (to establish independence from the segment
1685
+ // angle for t-intersections).
1686
+ round(e) {
1687
+ const t = this.tree.add(e), r = this.tree.prev(t);
1688
+ if (r !== null && fe(t.key, r.key) === 0)
1689
+ return this.tree.remove(e), r.key;
1690
+ const i = this.tree.next(t);
1691
+ return i !== null && fe(t.key, i.key) === 0 ? (this.tree.remove(e), i.key) : e;
1692
+ }
1693
+ }
1694
+ new _t();
1695
+ typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE;
1696
+ typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS;
1697
+ p.DEG2RAD;
1698
+ p.DEG2RAD;
1699
+ const Mt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e联动单位%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:联动;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-linkage'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20fill='none'%3e%3cpath%20d='M50%2050L22%2024M50%2050l28-26M50%2050L20%2076M50%2050l30%2026'/%3e%3ccircle%20cx='50'%20cy='50'%20r='13'%20fill='currentColor'/%3e%3ccircle%20cx='22'%20cy='24'%20r='10'/%3e%3ccircle%20cx='78'%20cy='24'%20r='10'/%3e%3ccircle%20cx='20'%20cy='76'%20r='10'/%3e%3ccircle%20cx='80'%20cy='76'%20r='10'/%3e%3c/g%3e%3cpath%20d='M44%2050l4%204%209-10'%20fill='none'%20stroke='%23F8FAFC'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23B67CFF'%3e%3cuse%20href='%23icon-linkage'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Ot = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e保障物资点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:物资;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-supplies'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M18%2035l32-16%2032%2016v44L50%2092%2018%2079zM18%2035l32%2017%2032-17M50%2052v40'/%3e%3cpath%20d='M34%2027l32%2017'/%3e%3c/g%3e%3cpath%20d='M41%2058h18v8h-18zM46%2053h8v18h-8z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FFAD33'%3e%3cuse%20href='%23icon-supplies'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", St = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e消防站%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防站;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-fire-station'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M13%2088h74M20%2088V39l30-22%2030%2022v49M31%2088V60h38v28M41%2088V70h18v18'/%3e%3cpath%20d='M20%2041h60'/%3e%3c/g%3e%3cpath%20d='M50%2029c-9%2010-12%2016-9%2022%202%204%205%206%209%206s8-2%2010-6c3-6%200-12-10-22z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF6B2C'%3e%3cuse%20href='%23icon-fire-station'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Ct = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e消防水池%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:水源;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-fire-pool'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M16%2039h68v43H16zM25%2055c6-5%2012-5%2018%200s12%205%2018%200%2012-5%2018%200M25%2068c6-5%2012-5%2018%200s12%205%2018%200%2012-5%2018%200'/%3e%3cpath%20d='M67%2021v28M77%2021v28M67%2029h10M67%2039h10'/%3e%3c/g%3e%3cpath%20d='M28%2025h25l-6%207H28z'%20fill='currentColor'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2338BDF8'%3e%3cuse%20href='%23icon-fire-pool'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", bt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e医院资源点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:医疗;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hospital'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M18%2087V29h64v58M10%2087h80M29%2087V72h14v15M57%2087V72h14v15'/%3e%3cpath%20d='M50%2038v22M39%2049h22'%20stroke='%23F8FAFC'%20stroke-width='9'/%3e%3c/g%3e%3cpath%20d='M27%2022h46v12H27z'%20fill='currentColor'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2322D3EE'%3e%3cuse%20href='%23icon-hospital'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", kt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e市政消火栓%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-municipal'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M10%2086h80M18%2086V48h18v38M64%2086V35h20v51M21%2057h4M29%2057h4M21%2068h4M29%2068h4M69%2046h4M77%2046h4M69%2058h4M77%2058h4'%20opacity='0.7'/%3e%3cpath%20d='M42%2086V60h18v26M39%2060h24l-4-11H43zM46%2049v-7h10v7'/%3e%3cpath%20d='M42%2067h-8v12h8M60%2067h8v12h-8'/%3e%3c/g%3e%3ccircle%20cx='51'%20cy='72'%20r='5'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-municipal'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", xt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e天然水源%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:水源;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-natural-water'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M14%2050l20-24%2014%2016%2011-12%2027%2029'/%3e%3cpath%20d='M15%2064c8-6%2015-6%2023%200s15%206%2023%200%2015-6%2024%200M15%2078c8-6%2015-6%2023%200s15%206%2023%200%2015-6%2024%200'/%3e%3c/g%3e%3ccircle%20cx='72'%20cy='23'%20r='8'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%2338BDF8'%3e%3cuse%20href='%23icon-natural-water'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Tt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓(地上式)%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-ground'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='7'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M12%2084h76M38%2084V45h24v39M38%2057H24v16h14M62%2057h14v16H62'/%3e%3cpath%20d='M33%2045h34l-5-16H38zM44%2029v-8h12v8'/%3e%3ccircle%20cx='24'%20cy='65'%20r='5'%20fill='currentColor'/%3e%3ccircle%20cx='76'%20cy='65'%20r='5'%20fill='currentColor'/%3e%3c/g%3e%3cpath%20d='M50%2055l7%2012H43z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-ground'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Pt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓(地下式)%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-underground'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M12%2040h76'/%3e%3cellipse%20cx='50'%20cy='39'%20rx='22'%20ry='9'%20fill='currentColor'/%3e%3cpath%20d='M35%2045v30h30V45M42%2075v12M58%2075v12M31%2087h38'/%3e%3cpath%20d='M43%2054h14M50%2047v18'%20stroke='%23F8FAFC'/%3e%3c/g%3e%3cpath%20d='M25%2028l-7-8M75%2028l7-8'%20stroke='currentColor'%20stroke-width='5'%20stroke-linecap='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-underground'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", It = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e室外消火栓%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:消防;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-hydrant-general'%20viewBox='0%200%20100%20100'%3e%3cg%20stroke='currentColor'%20stroke-width='7'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3cpath%20d='M35%2087h30M39%2087V48h22v39M39%2056H25v17h14M61%2056h14v17H61'/%3e%3cpath%20d='M34%2048h32l-5-15H39zM44%2033v-9h12v9'/%3e%3ccircle%20cx='25'%20cy='64'%20r='5'%20fill='currentColor'/%3e%3ccircle%20cx='75'%20cy='64'%20r='5'%20fill='currentColor'/%3e%3c/g%3e%3cpath%20d='M50%2058c-7%209-10%2014-10%2019a10%2010%200%200%200%2020%200c0-5-3-10-10-19z'%20fill='%23F8FAFC'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%23FF4D3D'%3e%3cuse%20href='%23icon-hydrant-general'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Et = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3e公安资源点%3c/title%3e%3cdesc%20id='desc'%3eGIS%20点位图标;类别:公安;样式:classified%3c/desc%3e%3cdefs%3e%3csymbol%20id='icon-police'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M50%2014l32%2011v23c0%2021-13%2034-32%2041-19-7-32-20-32-41V25z'%20fill='none'%20stroke='currentColor'%20stroke-width='7'%20stroke-linejoin='round'/%3e%3cpath%20d='M50%2030l5.5%2011.2%2012.4%201.8-9%208.8%202.1%2012.4L50%2058.4l-11%205.8%202.1-12.4-9-8.8%2012.4-1.8z'%20fill='%23F8FAFC'/%3e%3cpath%20d='M35%2073h30'%20stroke='currentColor'%20stroke-width='6'%20stroke-linecap='round'/%3e%3c/symbol%3e%3c/defs%3e%3cg%20color='%235B7CFF'%3e%3cuse%20href='%23icon-police'%20x='16'%20y='16'%20width='96'%20height='96'/%3e%3c/g%3e%3c/svg%3e", Z = {
1700
+ OutdoorFireHydrant: It,
1701
+ UndergroundHydrant: Pt,
1702
+ AboveGroundHydrant: Tt,
1703
+ MunicipalFireHydrants: kt,
1704
+ FireWaterReservoir: Ct,
1705
+ NaturalWater: xt,
1706
+ HospitalResourcePoint: bt,
1707
+ PublicSecurityResourcePoint: Et,
1708
+ SupportMaterialPoint: Ot,
1709
+ FireStation: St,
1710
+ LinkageUnit: Mt
1711
+ }, nr = Object.freeze(
1712
+ Object.keys(Z)
1713
+ );
1714
+ function Rt(s) {
1154
1715
  const e = s?.trim();
1155
1716
  return !e || !Object.prototype.hasOwnProperty.call(
1156
- $,
1717
+ Z,
1157
1718
  e
1158
- ) ? null : et + $[e];
1719
+ ) ? null : Z[e];
1159
1720
  }
1160
- function rt(s) {
1161
- return s.imageUrl?.trim() || tt(s.ontologyId);
1721
+ function Nt(s) {
1722
+ return s.imageUrl?.trim() || Rt(s.ontologyId);
1162
1723
  }
1163
- function ne(s) {
1164
- return s instanceof R || s instanceof k ? s.group : s.classification.group;
1724
+ new g();
1725
+ function me(s) {
1726
+ return s instanceof L || s instanceof N ? s.group : s.classification.group;
1165
1727
  }
1166
- function it(s) {
1728
+ function Ft(s) {
1167
1729
  const e = s.options, t = JSON.stringify(e.points ?? []);
1168
1730
  switch (s.category) {
1169
1731
  case "circle":
@@ -1182,27 +1744,27 @@ function it(s) {
1182
1744
  return `${s.category}|${t}`;
1183
1745
  }
1184
1746
  }
1185
- function ae(s, e = "solid") {
1747
+ function ve(s, e = "solid") {
1186
1748
  return s === "unfilledArrow" ? "open" : s === "filledArrow" ? "solid" : e;
1187
1749
  }
1188
- function st(s) {
1750
+ function At(s) {
1189
1751
  if (s.showArrow === !1) return "none";
1190
1752
  const e = s.startArrowStyle !== void 0 && s.startArrowStyle !== null, t = s.endArrowStyle !== void 0 && s.endArrowStyle !== null;
1191
1753
  return e && t ? "both" : t ? "right" : e ? "left" : "none";
1192
1754
  }
1193
- function oe(s) {
1194
- const e = st(s), t = ae(s.startArrowStyle), r = ae(s.endArrowStyle);
1755
+ function we(s) {
1756
+ const e = At(s), t = ve(s.startArrowStyle), r = ve(s.endArrowStyle);
1195
1757
  return {
1196
1758
  arrowMode: e,
1197
1759
  startArrowStyle: t,
1198
1760
  endArrowStyle: r
1199
1761
  };
1200
1762
  }
1201
- function nt(s, e) {
1763
+ function Lt(s, e) {
1202
1764
  const t = s.options;
1203
1765
  return `${t.strokeColor}|${t.strokeWidth}|${t.strokeOpacity}|${t.fillColor}|${t.fillOpacity}|${e}|${t.fontColor ?? ""}|${t.fontSize ?? ""}`;
1204
1766
  }
1205
- class at {
1767
+ class Dt {
1206
1768
  /** 标绘 id → 渲染记录 */
1207
1769
  _entries = /* @__PURE__ */ new Map();
1208
1770
  /** 由 GroundDecalManager 写入的标绘集合(引用共享) */
@@ -1211,10 +1773,13 @@ class at {
1211
1773
  _opacity = 1;
1212
1774
  /** 挂载场景 */
1213
1775
  _scene;
1776
+ /** 图片资源异步就绪后请求宿主刷新;按 URL 去重监听 */
1777
+ _requestRender;
1778
+ _watchedImageUrls = /* @__PURE__ */ new Set();
1214
1779
  /** 已释放标记 */
1215
1780
  _disposed = !1;
1216
1781
  constructor(e) {
1217
- this._scene = e.scene;
1782
+ this._scene = e.scene, this._requestRender = e.requestRender;
1218
1783
  }
1219
1784
  // ── 协议 ──
1220
1785
  /** 接收 GroundDecalManager 交付的 Map */
@@ -1246,26 +1811,26 @@ class at {
1246
1811
  this._shapes.has(t) || (this._scene.remove(r.group), r.primitive.dispose(), this._entries.delete(t));
1247
1812
  let e = 0;
1248
1813
  for (const [t, r] of this._shapes) {
1249
- const i = Ke(e);
1814
+ const i = ut(e);
1250
1815
  e += 1;
1251
- const n = this._entries.get(t), a = it(r), o = nt(r, this._opacity);
1252
- if (n !== void 0 && n.signature === a && (this._supportsStyleHotUpdate(n.primitive) || n.styleSignature === o)) {
1253
- this._refreshLightweight(n, i), n.styleSignature = o;
1816
+ const n = this._entries.get(t), o = Ft(r), l = Lt(r, this._opacity);
1817
+ if (n !== void 0 && n.signature === o && (this._supportsStyleHotUpdate(n) || n.styleSignature === l)) {
1818
+ this._refreshLightweight(n, i), n.styleSignature = l;
1254
1819
  continue;
1255
1820
  }
1256
1821
  n !== void 0 && (this._scene.remove(n.group), n.primitive.dispose(), this._entries.delete(t));
1257
- const d = this._buildPrimitive(r, i);
1258
- if (d === null) continue;
1259
- const l = ne(d);
1260
- l.visible = r.options.visible !== !1, this._scene.add(l);
1261
- const h = {
1822
+ const h = this._buildPrimitive(r, i);
1823
+ if (h === null) continue;
1824
+ const c = me(h);
1825
+ c.visible = r.options.visible !== !1, this._scene.add(c);
1826
+ const d = {
1262
1827
  plot: r,
1263
- primitive: d,
1264
- group: l,
1265
- signature: a,
1266
- styleSignature: o
1828
+ primitive: h,
1829
+ group: c,
1830
+ signature: o,
1831
+ styleSignature: l
1267
1832
  };
1268
- this._entries.set(t, h), d instanceof k && this._refreshLightweight(h, i);
1833
+ this._entries.set(t, d), h instanceof N && this._refreshLightweight(d, i);
1269
1834
  }
1270
1835
  }
1271
1836
  /**
@@ -1287,10 +1852,11 @@ class at {
1287
1852
  // ── 内部:轻量刷新 / 样式热更新支持判定 ──
1288
1853
  /**
1289
1854
  * 当前图元是否支持样式热更新(颜色 / 描边等)。
1290
- * 折线(setColor / setWidth)与文字(setText)支持;面类不支持,需重建。
1855
+ * 折线(setColor / setWidth)、文字(setText)和图片点透明度支持;面类不支持,需重建。
1291
1856
  */
1292
1857
  _supportsStyleHotUpdate(e) {
1293
- return e instanceof R || e instanceof k;
1858
+ const { primitive: t, plot: r } = e;
1859
+ return t instanceof L || t instanceof N || t instanceof A && r.options.pointStyle === "image";
1294
1860
  }
1295
1861
  /**
1296
1862
  * 几何未变时的轻量刷新:
@@ -1299,21 +1865,25 @@ class at {
1299
1865
  * - 文字:setText(内容 + 颜色 + 不透明度)/ setVisible(不重建图元)。
1300
1866
  */
1301
1867
  _refreshLightweight(e, t) {
1302
- if (e.group.visible = e.plot.options.visible !== !1, e.primitive.setRenderOrder?.(t), e.primitive instanceof R) {
1868
+ if (e.group.visible = e.plot.options.visible !== !1, e.primitive.setRenderOrder?.(t), e.primitive instanceof L) {
1303
1869
  const r = e.plot.options, {
1304
1870
  startArrowStyle: i,
1305
1871
  endArrowStyle: n
1306
- } = oe(r);
1872
+ } = we(r);
1307
1873
  e.primitive.setColor(
1308
1874
  r.strokeColor,
1309
1875
  (r.strokeOpacity ?? 100) * this._opacity
1310
1876
  );
1311
- const a = typeof r.strokeWidth == "number" && r.strokeWidth > 0 ? r.strokeWidth : 5;
1312
- e.primitive.setWidth(a), e.primitive.setArrowStyles(i, n);
1313
- const o = Math.max(a * 4, 1), d = Math.max(a * 3, 0.8);
1314
- e.primitive.setArrowSizeMeters(o, d), e.primitive.setVisible(r.visible !== !1);
1877
+ const o = typeof r.strokeWidth == "number" && r.strokeWidth > 0 ? r.strokeWidth : 5;
1878
+ e.primitive.setWidth(o), e.primitive.setArrowStyles(i, n);
1879
+ const l = Math.max(o * 4, 1), h = Math.max(o * 3, 0.8);
1880
+ e.primitive.setArrowSizeMeters(l, h), e.primitive.setVisible(r.visible !== !1);
1315
1881
  }
1316
- if (e.primitive instanceof k) {
1882
+ if (e.primitive instanceof A) {
1883
+ const r = e.plot.options;
1884
+ r.pointStyle === "image" && e.primitive.setImageOpacity((r.fillOpacity ?? 100) * this._opacity);
1885
+ }
1886
+ if (e.primitive instanceof N) {
1317
1887
  const r = e.plot.options;
1318
1888
  e.primitive.setText({
1319
1889
  content: r.content,
@@ -1337,7 +1907,7 @@ class at {
1337
1907
  offsetEastMeters: r.offsetX,
1338
1908
  offsetNorthMeters: r.offsetY,
1339
1909
  metersPerPixel: r.scale
1340
- }), e.primitive.setVisible(r.visible !== !1), e.group = ne(e.primitive), e.group.visible = r.visible !== !1;
1910
+ }), e.primitive.setVisible(r.visible !== !1), e.group = me(e.primitive), e.group.visible = r.visible !== !1;
1341
1911
  }
1342
1912
  }
1343
1913
  // ── 内部:按 category 构建图元 ──
@@ -1348,165 +1918,184 @@ class at {
1348
1918
  * @returns 渲染图元;未知类型 / 退化情况返回 null。
1349
1919
  */
1350
1920
  _buildPrimitive(e, t) {
1351
- const r = e.options, i = r.points ?? [], n = this._opacity, a = (r.strokeOpacity ?? 100) * n, o = (r.fillOpacity ?? 100) * n, d = r.visible !== !1;
1921
+ const r = e.options, i = r.points ?? [], n = this._opacity, o = (r.strokeOpacity ?? 100) * n, l = (r.fillOpacity ?? 100) * n, h = r.visible !== !1;
1352
1922
  switch (e.category) {
1353
1923
  case "point": {
1354
1924
  if (i.length === 0) return null;
1355
- const l = r;
1356
- if (l.pointStyle === "image") {
1357
- const h = rt(l);
1358
- return h ? new re({
1925
+ const c = r;
1926
+ if (c.pointStyle === "image") {
1927
+ const d = Nt(c);
1928
+ return d ? (this._watchImageTexture(d), new A({
1359
1929
  position: i[0],
1360
1930
  shape: "image",
1361
- imageUrl: h,
1362
- imageWidth: l.imageWidth,
1363
- imageHeight: l.imageHeight,
1364
- rotation: l.rotation ?? 0,
1365
- strokeColor: l.strokeColor,
1366
- strokeWidth: l.strokeWidth ?? 0,
1367
- strokeOpacity: a,
1368
- fillColor: l.fillColor,
1369
- fillOpacity: o,
1370
- visible: d,
1931
+ imageUrl: d,
1932
+ imageWidth: c.imageWidth,
1933
+ imageHeight: c.imageHeight,
1934
+ rotation: c.rotation ?? 0,
1935
+ strokeColor: c.strokeColor,
1936
+ strokeWidth: c.strokeWidth ?? 0,
1937
+ strokeOpacity: o,
1938
+ fillColor: c.fillColor,
1939
+ fillOpacity: l,
1940
+ visible: h,
1371
1941
  renderOrder: t
1372
- }) : (console.warn(`[soonspacejs] Unknown point image ontology id: ${l.ontologyId ?? ""}`), null);
1942
+ })) : (console.warn(`[soonspacejs] Unknown point image ontology id: ${c.ontologyId ?? ""}`), null);
1373
1943
  }
1374
- return new re({
1944
+ return new A({
1375
1945
  position: i[0],
1376
- shape: l.pointStyle ?? "circle",
1377
- size: l.size ?? 100,
1378
- strokeColor: l.strokeColor,
1379
- strokeWidth: l.strokeWidth ?? 0,
1380
- strokeOpacity: a,
1381
- fillColor: l.fillColor,
1382
- fillOpacity: o,
1383
- visible: d,
1946
+ shape: c.pointStyle ?? "circle",
1947
+ size: c.size ?? 100,
1948
+ strokeColor: c.strokeColor,
1949
+ strokeWidth: c.strokeWidth ?? 0,
1950
+ strokeOpacity: o,
1951
+ fillColor: c.fillColor,
1952
+ fillOpacity: l,
1953
+ visible: h,
1384
1954
  renderOrder: t
1385
1955
  });
1386
1956
  }
1387
1957
  case "circle": {
1388
1958
  if (i.length === 0) return null;
1389
- const l = r;
1390
- return new te({
1959
+ const c = r;
1960
+ return new de({
1391
1961
  center: i[0],
1392
- radius: l.radius ?? 100,
1393
- strokeColor: l.strokeColor,
1394
- strokeWidth: l.strokeWidth ?? 0,
1395
- strokeOpacity: a,
1396
- fillColor: l.fillColor,
1397
- fillOpacity: o,
1398
- visible: d,
1962
+ radius: c.radius ?? 100,
1963
+ strokeColor: c.strokeColor,
1964
+ strokeWidth: c.strokeWidth ?? 0,
1965
+ strokeOpacity: o,
1966
+ fillColor: c.fillColor,
1967
+ fillOpacity: l,
1968
+ visible: h,
1399
1969
  renderOrder: t
1400
1970
  });
1401
1971
  }
1402
1972
  case "sector": {
1403
1973
  if (i.length === 0) return null;
1404
- const l = r;
1405
- return new te({
1974
+ const c = r;
1975
+ return new de({
1406
1976
  center: i[0],
1407
- radius: l.radius ?? 100,
1408
- strokeColor: l.strokeColor,
1409
- strokeWidth: l.strokeWidth ?? 0,
1410
- strokeOpacity: a,
1411
- fillColor: l.fillColor,
1412
- fillOpacity: o,
1413
- visible: d,
1414
- sectorStartDegrees: l.startAngle ?? 0,
1415
- sectorAngleDegrees: l.sectorAngle ?? 360,
1977
+ radius: c.radius ?? 100,
1978
+ strokeColor: c.strokeColor,
1979
+ strokeWidth: c.strokeWidth ?? 0,
1980
+ strokeOpacity: o,
1981
+ fillColor: c.fillColor,
1982
+ fillOpacity: l,
1983
+ visible: h,
1984
+ sectorStartDegrees: c.startAngle ?? 0,
1985
+ sectorAngleDegrees: c.sectorAngle ?? 360,
1416
1986
  renderOrder: t
1417
1987
  });
1418
1988
  }
1419
1989
  case "polygon":
1420
1990
  case "rectangle":
1421
- return i.length < 3 ? null : new ee({
1991
+ return i.length < 3 ? null : new he({
1422
1992
  points: i,
1423
1993
  strokeColor: r.strokeColor,
1424
1994
  strokeWidth: r.strokeWidth ?? 0,
1425
- strokeOpacity: a,
1995
+ strokeOpacity: o,
1426
1996
  fillColor: r.fillColor,
1427
- fillOpacity: o,
1428
- visible: d,
1997
+ fillOpacity: l,
1998
+ visible: h,
1429
1999
  renderOrder: t
1430
2000
  });
1431
2001
  case "arrow": {
1432
- const l = e.generateCoords();
1433
- if (l.length < 3) return null;
1434
- const h = r;
1435
- return new ee({
1436
- points: l,
1437
- strokeColor: h.strokeColor,
1438
- strokeWidth: h.strokeWidth ?? 0,
1439
- strokeOpacity: a,
1440
- fillColor: h.fillColor,
1441
- fillOpacity: o,
1442
- visible: d,
2002
+ const c = e.generateCoords();
2003
+ if (c.length < 3) return null;
2004
+ const d = r;
2005
+ return new he({
2006
+ points: c,
2007
+ strokeColor: d.strokeColor,
2008
+ strokeWidth: d.strokeWidth ?? 0,
2009
+ strokeOpacity: o,
2010
+ fillColor: d.fillColor,
2011
+ fillOpacity: l,
2012
+ visible: h,
1443
2013
  renderOrder: t
1444
2014
  });
1445
2015
  }
1446
2016
  case "line": {
1447
2017
  if (i.length < 2) return null;
1448
- const l = r, {
1449
- arrowMode: h,
1450
- startArrowStyle: c,
1451
- endArrowStyle: y
1452
- } = oe(l), _ = l.strokeStyle === "dashed", p = _ ? 60 : void 0, g = _ ? 40 : void 0, m = typeof l.strokeWidth == "number" && l.strokeWidth > 0 ? l.strokeWidth : 5, S = Math.max(m * 4, 1), w = Math.max(m * 3, 0.8);
1453
- return new R({
2018
+ const c = r, {
2019
+ arrowMode: d,
2020
+ startArrowStyle: f,
2021
+ endArrowStyle: v
2022
+ } = we(c), M = c.strokeStyle === "dashed", y = M ? 60 : void 0, m = M ? 40 : void 0, w = typeof c.strokeWidth == "number" && c.strokeWidth > 0 ? c.strokeWidth : 5, x = Math.max(w * 4, 1), T = Math.max(w * 3, 0.8);
2023
+ return new L({
1454
2024
  points: i,
1455
- strokeColor: l.strokeColor,
1456
- strokeOpacity: a,
2025
+ strokeColor: c.strokeColor,
2026
+ strokeOpacity: o,
1457
2027
  widthMode: "world",
1458
- widthMeters: m,
1459
- visible: d,
1460
- arrowMode: h,
1461
- arrowStyle: c,
1462
- startArrowStyle: c,
1463
- endArrowStyle: y,
2028
+ widthMeters: w,
2029
+ visible: h,
2030
+ arrowMode: d,
2031
+ arrowStyle: f,
2032
+ startArrowStyle: f,
2033
+ endArrowStyle: v,
1464
2034
  arrowWidthMode: "world",
1465
- arrowLengthMeters: S,
1466
- arrowWidthMeters: w,
1467
- dashLengthMeters: p,
1468
- gapLengthMeters: g,
2035
+ arrowLengthMeters: x,
2036
+ arrowWidthMeters: T,
2037
+ dashLengthMeters: y,
2038
+ gapLengthMeters: m,
1469
2039
  renderOrder: t
1470
2040
  });
1471
2041
  }
1472
2042
  case "text": {
1473
2043
  if (i.length === 0) return null;
1474
- const l = r;
1475
- return new k({
2044
+ const c = r;
2045
+ return new N({
1476
2046
  points: [i[0]],
1477
- content: l.content,
1478
- fontColor: l.fontColor,
1479
- fontSize: l.fontSize,
1480
- fillColor: l.fillColor,
1481
- fillOpacity: o,
1482
- strokeColor: l.strokeColor,
1483
- strokeOpacity: a,
1484
- strokeWidth: l.strokeWidth ?? 0,
1485
- textAlign: l.textAlign,
1486
- verticalAlign: l.verticalAlign,
1487
- anchorX: l.anchorX,
1488
- anchorY: l.anchorY,
1489
- layoutDirection: l.layoutDirection,
1490
- rotation: l.rotation,
1491
- boxWidth: l.boxWidth,
1492
- boxHeight: l.boxHeight,
1493
- padding: l.padding,
1494
- showBorder: l.showBorder,
1495
- visible: d,
2047
+ content: c.content,
2048
+ fontColor: c.fontColor,
2049
+ fontSize: c.fontSize,
2050
+ fillColor: c.fillColor,
2051
+ fillOpacity: l,
2052
+ strokeColor: c.strokeColor,
2053
+ strokeOpacity: o,
2054
+ strokeWidth: c.strokeWidth ?? 0,
2055
+ textAlign: c.textAlign,
2056
+ verticalAlign: c.verticalAlign,
2057
+ anchorX: c.anchorX,
2058
+ anchorY: c.anchorY,
2059
+ layoutDirection: c.layoutDirection,
2060
+ rotation: c.rotation,
2061
+ boxWidth: c.boxWidth,
2062
+ boxHeight: c.boxHeight,
2063
+ padding: c.padding,
2064
+ showBorder: c.showBorder,
2065
+ visible: h,
1496
2066
  renderOrder: t,
1497
2067
  // offsetX / offsetY → ENU 米偏移
1498
- offsetEastMeters: l.offsetX,
1499
- offsetNorthMeters: l.offsetY,
2068
+ offsetEastMeters: c.offsetX,
2069
+ offsetNorthMeters: c.offsetY,
1500
2070
  // scale → metersPerPixel(无 scale 时不传,默认 1.0)
1501
- metersPerPixel: l.scale
2071
+ metersPerPixel: c.scale
1502
2072
  });
1503
2073
  }
1504
2074
  default:
1505
2075
  return null;
1506
2076
  }
1507
2077
  }
2078
+ /**
2079
+ * 贴地图元依赖异步 TextureLoader,而 SoonSpace 默认按需渲染;
2080
+ * 图片解码完成后若没有新的渲染请求,纹理会等到相机交互才首次显示。
2081
+ * 用原生 Image 监听资源就绪并通知宿主,按 URL 去重避免重复监听。
2082
+ */
2083
+ _watchImageTexture(e) {
2084
+ const t = e.trim();
2085
+ if (t.length === 0 || this._watchedImageUrls.has(t) || typeof Image > "u") return;
2086
+ this._watchedImageUrls.add(t);
2087
+ const r = new Image();
2088
+ r.crossOrigin = "anonymous";
2089
+ let i = !1;
2090
+ const n = () => {
2091
+ i || (i = !0, this._watchedImageUrls.delete(t), r.onload = null, r.onerror = null, !this._disposed && (this._requestRender?.(), requestAnimationFrame(() => {
2092
+ this._disposed || this._requestRender?.();
2093
+ })));
2094
+ };
2095
+ r.onload = n, r.onerror = n, r.src = t, r.complete && queueMicrotask(n);
2096
+ }
1508
2097
  }
1509
- class ot {
2098
+ class Gt {
1510
2099
  /** 标绘 id → 实例;与桥接器的 shapes 共用同一引用 */
1511
2100
  _items = /* @__PURE__ */ new Map();
1512
2101
  /** 标绘管理器 id(对外常量,保持与参考项目一致) */
@@ -1520,7 +2109,10 @@ class ot {
1520
2109
  /** 合并同一帧内多次 _markDirty,值为 requestAnimationFrame 句柄 */
1521
2110
  _redrawTimer = null;
1522
2111
  constructor(e) {
1523
- this.ssp = e.ssp, this._bridge = new at({ scene: e.ssp.viewport.scene });
2112
+ this.ssp = e.ssp, this._bridge = new Dt({
2113
+ scene: e.ssp.viewport.scene,
2114
+ requestRender: () => this.ssp.render()
2115
+ });
1524
2116
  }
1525
2117
  /** 暴露内部桥接器,业务若需自定义场景接入可选择性使用 */
1526
2118
  get bridge() {
@@ -1553,42 +2145,42 @@ class ot {
1553
2145
  switch (e.type) {
1554
2146
  case "point": {
1555
2147
  const { type: r, ...i } = e;
1556
- t = new Je(i);
2148
+ t = new Ke(i);
1557
2149
  break;
1558
2150
  }
1559
2151
  case "line": {
1560
2152
  const { type: r, ...i } = e;
1561
- t = new We(i);
2153
+ t = new et(i);
1562
2154
  break;
1563
2155
  }
1564
2156
  case "polygon": {
1565
2157
  const { type: r, ...i } = e;
1566
- t = new $e(i);
2158
+ t = new tt(i);
1567
2159
  break;
1568
2160
  }
1569
2161
  case "rectangle": {
1570
2162
  const { type: r, ...i } = e;
1571
- t = new ze(i);
2163
+ t = new rt(i);
1572
2164
  break;
1573
2165
  }
1574
2166
  case "circle": {
1575
2167
  const { type: r, ...i } = e;
1576
- t = new Xe(i);
2168
+ t = new lt(i);
1577
2169
  break;
1578
2170
  }
1579
2171
  case "sector": {
1580
2172
  const { type: r, ...i } = e;
1581
- t = new He(i);
2173
+ t = new st(i);
1582
2174
  break;
1583
2175
  }
1584
2176
  case "text": {
1585
2177
  const { type: r, ...i } = e;
1586
- t = new Qe(i);
2178
+ t = new ot(i);
1587
2179
  break;
1588
2180
  }
1589
2181
  case "arrow": {
1590
2182
  const { type: r, ...i } = e;
1591
- t = new je(i);
2183
+ t = new nt(i);
1592
2184
  break;
1593
2185
  }
1594
2186
  default:
@@ -1707,10 +2299,10 @@ class ot {
1707
2299
  findNearestCoord(e, t, r) {
1708
2300
  const i = this._items.get(e);
1709
2301
  if (!i || !i.options.points || i.options.points.length === 0) return -1;
1710
- let n = 0, a = 1 / 0;
1711
- for (let o = 0; o < i.options.points.length; o++) {
1712
- const d = i.options.points[o][0] - t, l = i.options.points[o][1] - r, h = d * d + l * l;
1713
- h < a && (a = h, n = o);
2302
+ let n = 0, o = 1 / 0;
2303
+ for (let l = 0; l < i.options.points.length; l++) {
2304
+ const h = i.options.points[l][0] - t, c = i.options.points[l][1] - r, d = h * h + c * c;
2305
+ d < o && (o = d, n = l);
1714
2306
  }
1715
2307
  return n;
1716
2308
  }
@@ -1745,22 +2337,22 @@ class ot {
1745
2337
  }));
1746
2338
  }
1747
2339
  }
1748
- const lt = "https://sooncps.xwbuilders.com/api/ugis-dataprocess/v1/terrain/NhBLlMx3/", dt = "https://c.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png";
1749
- class kt {
2340
+ const Ut = "https://sooncps.xwbuilders.com/api/ugis-dataprocess/v1/terrain/NhBLlMx3/", Wt = "https://c.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png";
2341
+ class or {
1750
2342
  constructor(e, t = {}) {
1751
2343
  this.ssp = e, this.options = t;
1752
- const r = t.baseUrl || lt;
1753
- if (this.resourceManager = new Ge(), this.terrainManager = new Fe(), t.imageryUrl !== !1) {
1754
- const i = t.imageryUrl || dt;
2344
+ const r = t.baseUrl || Ut;
2345
+ if (this.resourceManager = new Ve(), this.terrainManager = new qe(), t.imageryUrl !== !1) {
2346
+ const i = t.imageryUrl || Wt;
1755
2347
  this.resourceManager.addOverlay({
1756
2348
  id: this.defaultImageryId,
1757
2349
  type: u.XYZ,
1758
2350
  options: { id: this.defaultImageryId, url: i, type: u.XYZ }
1759
2351
  });
1760
2352
  }
1761
- this.groundDecalManager = new ot({ ssp: this.ssp }), ke(), this._alphaClipMode = t.alphaClipMode ?? "alphaTest", this._currentTerrainConfig = {
2353
+ this.groundDecalManager = new Gt({ ssp: this.ssp }), ze(), this._alphaClipMode = t.alphaClipMode ?? "alphaTest", this._currentTerrainConfig = {
1762
2354
  id: this.defaultTerrainId,
1763
- type: M.QUANTIZED_MESH,
2355
+ type: k.QUANTIZED_MESH,
1764
2356
  url: r
1765
2357
  }, this.terrainManager.add(this._currentTerrainConfig), this.terrainManager.setCurrentId(this._currentTerrainConfig.id), this.tiles = this._initTilesRenderer(this._currentTerrainConfig), this._initPlugins(this.tiles, this._currentTerrainConfig);
1766
2358
  }
@@ -1779,9 +2371,9 @@ class kt {
1779
2371
  * 供 cesium-to-three 标绘图元的 RTE 着色器使用。标绘几何烘焙在绝对 ECEF,只有用
1780
2372
  * ECEF 相机投影才能与「重定向后地形」对齐,同时保持 reorientation 开启(地形不抖)。
1781
2373
  */
1782
- _plotVirtualCamera = new V();
1783
- _reorientInverse = new b();
1784
- _virtualScale = new Oe();
2374
+ _plotVirtualCamera = new ae();
2375
+ _reorientInverse = new g();
2376
+ _virtualScale = new a();
1785
2377
  /** 资源管理器(存储配置) */
1786
2378
  resourceManager;
1787
2379
  /** 地形管理器(记录地形列表) */
@@ -1802,7 +2394,7 @@ class kt {
1802
2394
  * 是否使用 Cesium Ion 地形
1803
2395
  */
1804
2396
  get isCesiumIon() {
1805
- return this._currentTerrainConfig.type === M.CESIUM_ION;
2397
+ return this._currentTerrainConfig.type === k.CESIUM_ION;
1806
2398
  }
1807
2399
  /**
1808
2400
  * 获取当前地形配置
@@ -1848,9 +2440,9 @@ class kt {
1848
2440
  this._alphaClipMode = e, this.customMaterialPlugin && (this.customMaterialPlugin.alphaClipMode = e), this._updateAlphaClipMode(), this.render();
1849
2441
  }
1850
2442
  _initTilesRenderer(e) {
1851
- return e.type === M.CESIUM_ION ? new T() : (
2443
+ return e.type === k.CESIUM_ION ? new I() : (
1852
2444
  // Cesium Ion 由插件设置 URL
1853
- new T(e.url)
2445
+ new I(e.url)
1854
2446
  );
1855
2447
  }
1856
2448
  /**
@@ -1858,35 +2450,35 @@ class kt {
1858
2450
  * @param config 地形配置
1859
2451
  */
1860
2452
  _initPlugins(e, t) {
1861
- if (this.tilesFadePlugin = new B({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new H(), e.registerPlugin(this.tilesFadePlugin), e.registerPlugin(this.updateOnChangePlugin), t.type === M.CESIUM_ION ? e.registerPlugin(
1862
- new ge({
2453
+ if (this.tilesFadePlugin = new ee({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new te(), e.registerPlugin(this.tilesFadePlugin), e.registerPlugin(this.updateOnChangePlugin), t.type === k.CESIUM_ION ? e.registerPlugin(
2454
+ new xe({
1863
2455
  apiToken: t.apiToken,
1864
2456
  assetId: t.assetId || "1",
1865
2457
  autoRefreshToken: t.autoRefreshToken ?? !0,
1866
2458
  assetTypeHandler: (r, i) => {
1867
2459
  r === "TERRAIN" && i.getPluginByName("QUANTIZED_MESH_PLUGIN") === null && i.registerPlugin(
1868
- new J({ useRecommendedSettings: !0 })
2460
+ new H({ useRecommendedSettings: !0 })
1869
2461
  );
1870
2462
  }
1871
2463
  })
1872
2464
  ) : (e.registerPlugin(
1873
- new J({ useRecommendedSettings: !0 })
2465
+ new H({ useRecommendedSettings: !0 })
1874
2466
  ), e.fetchData = async (r) => {
1875
2467
  const i = { method: "GET", mode: "cors" };
1876
2468
  if (/layer\.json$/.test(r)) {
1877
- const n = await fetch(r, i).then((a) => a.json());
2469
+ const n = await fetch(r, i).then((o) => o.json());
1878
2470
  return n.metadataAvailability = -1, new Response(JSON.stringify(n));
1879
2471
  }
1880
2472
  return fetch(r, i);
1881
- }), this.options.useCustomMaterial !== !1 && (this.customMaterialPlugin = new De(), this.customMaterialPlugin.alphaClipMode = this._alphaClipMode, e.registerPlugin(this.customMaterialPlugin)), this.imageOverlayPlugin = new ce({
2473
+ }), this.options.useCustomMaterial !== !1 && (this.customMaterialPlugin = new Xe(), this.customMaterialPlugin.alphaClipMode = this._alphaClipMode, e.registerPlugin(this.customMaterialPlugin)), this.imageOverlayPlugin = new be({
1882
2474
  renderer: this.ssp.viewport.renderer,
1883
2475
  overlays: []
1884
- }), e.registerPlugin(this.imageOverlayPlugin), this._ensureGlobeDepth(), this.overlayManager = new N(
2476
+ }), e.registerPlugin(this.imageOverlayPlugin), this._ensureGlobeDepth(), this.overlayManager = new G(
1885
2477
  this.imageOverlayPlugin,
1886
2478
  this.resourceManager
1887
2479
  ), this.overlayManager.restoreFromResourceManager(), this.options.reorientation !== !1) {
1888
2480
  const r = this.options.reorientation || { lon: 120, lat: 30 };
1889
- this.reorientationPlugin = new j({
2481
+ this.reorientationPlugin = new re({
1890
2482
  lon: r.lon,
1891
2483
  lat: r.lat,
1892
2484
  height: r.height ?? 0.1
@@ -1942,7 +2534,7 @@ class kt {
1942
2534
  setTerrain(e, t = void 0) {
1943
2535
  if (t && (this.options = { ...this.options, ...t }), this.terrainManager.has(e.id) || this.terrainManager.add(e), this.terrainManager.setCurrentId(e.id), this.terrainManager.currentId === e.id) {
1944
2536
  const r = this.terrainManager.getCurrent();
1945
- e.type === M.QUANTIZED_MESH && r?.type === M.QUANTIZED_MESH && (r.url = e.url);
2537
+ e.type === k.QUANTIZED_MESH && r?.type === k.QUANTIZED_MESH && (r.url = e.url);
1946
2538
  }
1947
2539
  this._disposeTilesRenderer(), this._currentTerrainConfig = e, this.tiles = this._initTilesRenderer(e), this._initPlugins(this.tiles, e), this._enabled && this.ssp.addObject(this.tiles.group), this.render();
1948
2540
  }
@@ -2112,15 +2704,15 @@ class kt {
2112
2704
  };
2113
2705
  beforeRenderHandler = () => {
2114
2706
  const { camera: e, renderer: t, scene: r } = this.ssp.viewport;
2115
- if (e.updateMatrixWorld(), this.tiles.setCamera(e), this.tiles.setResolutionFromRenderer(e, t), this.tiles.update(), this.groundDecalManager && e instanceof V) {
2116
- const i = this._ensureGlobeDepth(), n = t.domElement.width, a = t.domElement.height;
2117
- (i.target.width !== n || i.target.height !== a) && i.resize(n, a), xe(e.near, e.far), i.render(t, e, r, this.tiles.group);
2118
- const o = this._buildPlotVirtualCamera(e);
2707
+ if (e.updateMatrixWorld(), this.tiles.setCamera(e), this.tiles.setResolutionFromRenderer(e, t), this.tiles.update(), this.groundDecalManager && e instanceof ae) {
2708
+ const i = this._ensureGlobeDepth(), n = t.domElement.width, o = t.domElement.height;
2709
+ (i.target.width !== n || i.target.height !== o) && i.resize(n, o), Be(e.near, e.far), i.render(t, e, r, this.tiles.group);
2710
+ const l = this._buildPlotVirtualCamera(e);
2119
2711
  this.groundDecalManager.update({
2120
2712
  depthTexture: i.target.texture,
2121
2713
  width: n,
2122
- height: a,
2123
- camera: o,
2714
+ height: o,
2715
+ camera: l,
2124
2716
  pixelRatio: t.getPixelRatio()
2125
2717
  });
2126
2718
  }
@@ -2151,7 +2743,7 @@ class kt {
2151
2743
  _ensureGlobeDepth() {
2152
2744
  if (!this._globeDepth) {
2153
2745
  const { renderer: e } = this.ssp.viewport;
2154
- this._globeDepth = new Re(
2746
+ this._globeDepth = new $e(
2155
2747
  e.domElement.width,
2156
2748
  e.domElement.height
2157
2749
  );
@@ -2159,7 +2751,7 @@ class kt {
2159
2751
  return this._globeDepth;
2160
2752
  }
2161
2753
  enable() {
2162
- this._enabled = !0, this.ssp.viewport.camera.layers.enable(Ie), this.ssp.addObject(this.tiles.group), this.ssp.signals.beforeRender.add(this.beforeRenderHandler);
2754
+ this._enabled = !0, this.ssp.viewport.camera.layers.enable(je), this.ssp.addObject(this.tiles.group), this.ssp.signals.beforeRender.add(this.beforeRenderHandler);
2163
2755
  }
2164
2756
  disable() {
2165
2757
  this._enabled = !1, this.ssp.removeObject(this.tiles.group), this.ssp.signals.beforeRender.remove(this.beforeRenderHandler);
@@ -2177,12 +2769,12 @@ class kt {
2177
2769
  height: r
2178
2770
  };
2179
2771
  const n = () => {
2180
- const o = f.degToRad(t), d = f.degToRad(e);
2181
- i.transformLatLonHeightToOrigin(o, d, r), this.render(), a();
2182
- }, a = () => {
2772
+ const l = p.degToRad(t), h = p.degToRad(e);
2773
+ i.transformLatLonHeightToOrigin(l, h, r), this.render(), o();
2774
+ }, o = () => {
2183
2775
  this.tiles.removeEventListener("load-root-tileset", n), this.loedTilesSets.delete(n);
2184
2776
  };
2185
- return this.tiles.addEventListener("load-root-tileset", n), this.loedTilesSets.add(n), this.tiles.root && n(), a;
2777
+ return this.tiles.addEventListener("load-root-tileset", n), this.loedTilesSets.add(n), this.tiles.root && n(), o;
2186
2778
  }
2187
2779
  dispose() {
2188
2780
  this.disable(), this.terrainManager.dispose(), this.overlayManager.dispose(), this.groundDecalManager?.dispose(), this._globeDepth?.dispose(), this._globeDepth = void 0, this.loedTilesSets.forEach(
@@ -2190,12 +2782,12 @@ class kt {
2190
2782
  ), this.loedTilesSets.clear(), this.tiles.removeEventListener("needs-render", this.render), this.tiles.removeEventListener("needs-update", this.render), this.tiles.dispose();
2191
2783
  }
2192
2784
  }
2193
- const C = {
2785
+ const P = {
2194
2786
  DEFAULT: 0,
2195
2787
  GRADIENT: 1,
2196
2788
  TOPOGRAPHIC_LINES: 2,
2197
2789
  LIGHTING: 3
2198
- }, ht = {
2790
+ }, Jt = {
2199
2791
  vertexShader: (
2200
2792
  /* glsl */
2201
2793
  `
@@ -2221,7 +2813,7 @@ const C = {
2221
2813
  }
2222
2814
  `
2223
2815
  )
2224
- }, ut = {
2816
+ }, zt = {
2225
2817
  vertexShader: (
2226
2818
  /* glsl */
2227
2819
  `
@@ -2267,10 +2859,10 @@ const C = {
2267
2859
  `
2268
2860
  )
2269
2861
  };
2270
- let D = null, G = null, F = null;
2271
- class ct {
2862
+ let z = null, B = null, $ = null;
2863
+ class Bt {
2272
2864
  constructor(e, t) {
2273
- this.ssp = e, this.options = t, "url" in this.options ? this.tiles = new T(this.options.url) : (this.tiles = new T(), this._initCesiumIon(this.options)), this._initBasePlugins(this.options);
2865
+ this.ssp = e, this.options = t, "url" in this.options ? this.tiles = new I(this.options.url) : (this.tiles = new I(), this._initCesiumIon(this.options)), this._initBasePlugins(this.options);
2274
2866
  }
2275
2867
  tiles;
2276
2868
  tilesFadePlugin;
@@ -2278,10 +2870,10 @@ class ct {
2278
2870
  reorientationPlugin;
2279
2871
  options;
2280
2872
  // 用于模型居中
2281
- _box = new Me();
2282
- _sphere = new ue();
2873
+ _box = new Fe();
2874
+ _sphere = new Ce();
2283
2875
  // 当前材质类型
2284
- _materialType = C.DEFAULT;
2876
+ _materialType = P.DEFAULT;
2285
2877
  // 按需渲染标志
2286
2878
  _needsUpdate = !0;
2287
2879
  _cameraTransitionStart = !1;
@@ -2291,7 +2883,7 @@ class ct {
2291
2883
  */
2292
2884
  _initCesiumIon(e) {
2293
2885
  this.tiles.registerPlugin(
2294
- new ge({
2886
+ new xe({
2295
2887
  apiToken: e.apiToken,
2296
2888
  assetId: e.assetId,
2297
2889
  autoRefreshToken: e.autoRefreshToken ?? !0
@@ -2302,9 +2894,9 @@ class ct {
2302
2894
  * 初始化基础插件
2303
2895
  */
2304
2896
  _initBasePlugins(e) {
2305
- if (e._managedByPlugin || (D === null ? D = this.tiles.lruCache : this.tiles.lruCache = D, G === null ? G = this.tiles.parseQueue : this.tiles.parseQueue = G, F === null ? F = this.tiles.downloadQueue : this.tiles.downloadQueue = F, this.tiles.lruCache.maxSize = 600, this.tiles.lruCache.minSize = 300, this.tiles.lruCache.unloadPercent = 0.8), this._setupGLTFLoader(), this.tilesFadePlugin = new B({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new H(), this.tiles.registerPlugin(this.tilesFadePlugin), this.tiles.registerPlugin(this.updateOnChangePlugin), this.tiles.maxDepth = e.maxDepth ?? 20, this.tiles.errorTarget = e.errorTarget ?? 2, this.options.reorientation) {
2897
+ if (e._managedByPlugin || (z === null ? z = this.tiles.lruCache : this.tiles.lruCache = z, B === null ? B = this.tiles.parseQueue : this.tiles.parseQueue = B, $ === null ? $ = this.tiles.downloadQueue : this.tiles.downloadQueue = $, this.tiles.lruCache.maxSize = 600, this.tiles.lruCache.minSize = 300, this.tiles.lruCache.unloadPercent = 0.8), this._setupGLTFLoader(), this.tilesFadePlugin = new ee({ maximumFadeOutTiles: 200 }), this.updateOnChangePlugin = new te(), this.tiles.registerPlugin(this.tilesFadePlugin), this.tiles.registerPlugin(this.updateOnChangePlugin), this.tiles.maxDepth = e.maxDepth ?? 20, this.tiles.errorTarget = e.errorTarget ?? 2, this.options.reorientation) {
2306
2898
  const t = this.options.reorientation || { lon: 120, lat: 30 };
2307
- this.reorientationPlugin = new j({
2899
+ this.reorientationPlugin = new re({
2308
2900
  lon: t.lon,
2309
2901
  lat: t.lat,
2310
2902
  height: t.height ?? 0.1
@@ -2320,7 +2912,7 @@ class ct {
2320
2912
  * 设置 GLTF Loader
2321
2913
  */
2322
2914
  _setupGLTFLoader() {
2323
- const e = new de(this.tiles.manager), t = this.ssp.manager?.store?.modelManager;
2915
+ const e = new Me(this.tiles.manager), t = this.ssp.manager?.store?.modelManager;
2324
2916
  if (t?.gltfLoader) {
2325
2917
  const { dracoLoader: r, ktx2Loader: i, meshoptDecoder: n } = t.gltfLoader;
2326
2918
  r && e.setDRACOLoader(r), i && e.setKTX2Loader(i), n && e.setMeshoptDecoder(n);
@@ -2364,7 +2956,7 @@ class ct {
2364
2956
  onLoadModel = ({ scene: e }) => {
2365
2957
  e.traverse((t) => {
2366
2958
  t.isMesh && (t.originalMaterial = t.material);
2367
- }), this._materialType !== C.DEFAULT && this.updateMaterial(e);
2959
+ }), this._materialType !== P.DEFAULT && this.updateMaterial(e);
2368
2960
  };
2369
2961
  /**
2370
2962
  * 更新场景中所有网格的材质(参考 customMaterial.js)
@@ -2374,19 +2966,19 @@ class ct {
2374
2966
  e.traverse((r) => {
2375
2967
  if (r.isMesh)
2376
2968
  switch (r.material && r.material !== r.originalMaterial && r.material.dispose(), t) {
2377
- case C.DEFAULT:
2969
+ case P.DEFAULT:
2378
2970
  r.material = r.originalMaterial, r.material && (r.material.side = 2), r.receiveShadow = !1, r.castShadow = !1;
2379
2971
  break;
2380
- case C.GRADIENT:
2381
- r.material = new Z(ht), r.material.side = 2, r.receiveShadow = !1, r.castShadow = !1;
2972
+ case P.GRADIENT:
2973
+ r.material = new le(Jt), r.material.side = 2, r.receiveShadow = !1, r.castShadow = !1;
2382
2974
  break;
2383
- case C.TOPOGRAPHIC_LINES: {
2384
- const i = new Z(ut);
2975
+ case P.TOPOGRAPHIC_LINES: {
2976
+ const i = new le(zt);
2385
2977
  i.extensions = { derivatives: !0 }, i.side = 2, r.material = i, r.receiveShadow = !1, r.castShadow = !1;
2386
2978
  break;
2387
2979
  }
2388
- case C.LIGHTING:
2389
- r.material = new Se(), r.material.side = 2, r.receiveShadow = !0, r.castShadow = !0;
2980
+ case P.LIGHTING:
2981
+ r.material = new Ae(), r.material.side = 2, r.receiveShadow = !0, r.castShadow = !0;
2390
2982
  break;
2391
2983
  }
2392
2984
  });
@@ -2433,12 +3025,12 @@ class ct {
2433
3025
  height: r
2434
3026
  };
2435
3027
  const n = () => {
2436
- const o = f.degToRad(t), d = f.degToRad(e);
2437
- i.transformLatLonHeightToOrigin(o, d, r), this.render(), a();
2438
- }, a = () => {
3028
+ const l = p.degToRad(t), h = p.degToRad(e);
3029
+ i.transformLatLonHeightToOrigin(l, h, r), this.render(), o();
3030
+ }, o = () => {
2439
3031
  this.tiles.removeEventListener("load-root-tileset", n), this.loedTilesSets.delete(n);
2440
3032
  };
2441
- return this.tiles.addEventListener("load-root-tileset", n), this.loedTilesSets.add(n), this.tiles.root && n(), a;
3033
+ return this.tiles.addEventListener("load-root-tileset", n), this.loedTilesSets.add(n), this.tiles.root && n(), o;
2442
3034
  }
2443
3035
  dispose() {
2444
3036
  this.disable(), this.loedTilesSets.forEach(
@@ -2446,8 +3038,8 @@ class ct {
2446
3038
  ), this.loedTilesSets.clear(), this.tiles.removeEventListener("load-model", this.onLoadModel), this.tiles.removeEventListener("dispose-model", this.onDisposeModel), this.options._managedByPlugin || (this.tiles.removeEventListener("load-model", this._onNeedsRender), this.tiles.removeEventListener("needs-render", this._onNeedsRender), this.tiles.removeEventListener("needs-update", this._onNeedsRender)), this.tiles.dispose();
2447
3039
  }
2448
3040
  }
2449
- const U = 2;
2450
- class xt {
3041
+ const j = 2;
3042
+ class ar {
2451
3043
  constructor(e) {
2452
3044
  this.ssp = e;
2453
3045
  const { controls: t, viewport: r } = e;
@@ -2468,12 +3060,12 @@ class xt {
2468
3060
  _downloadQueue = null;
2469
3061
  _referenceOrigin = null;
2470
3062
  _referencePlacements = /* @__PURE__ */ new WeakMap();
2471
- _referenceFrame = new b();
2472
- _targetFrame = new b();
2473
- _sourceFrame = new b();
2474
- _placementMatrix = new b();
2475
- _upCorrectionMatrix = new b();
2476
- _boundingSphere = new ue();
3063
+ _referenceFrame = new g();
3064
+ _targetFrame = new g();
3065
+ _sourceFrame = new g();
3066
+ _placementMatrix = new g();
3067
+ _upCorrectionMatrix = new g();
3068
+ _boundingSphere = new Ce();
2477
3069
  _beforeRenderHandler = () => {
2478
3070
  this.needsUpdate && (this.needsUpdate = !1, this.ssp.viewport.camera.updateMatrixWorld(), this.tilesMap.forEach((e) => {
2479
3071
  e.tiles.setCamera(this.ssp.viewport.camera), e.tiles.setResolutionFromRenderer(this.ssp.viewport.camera, this.ssp.viewport.renderer), e.applyAutoCenter(), e.tiles.group.updateMatrixWorld(), e.tiles.update();
@@ -2513,21 +3105,21 @@ class xt {
2513
3105
  async loadTiles(e) {
2514
3106
  const t = "url" in e ? e.url : e.assetId;
2515
3107
  if (this.tilesMap.has(t))
2516
- return I.utils.warn(`${t} already loaded`), this.tilesMap.get(t);
2517
- const { ssp: r } = this, i = this._getReferencePlacement(e), n = this._getTilesRendererOptions(e, i), a = new ct(r, {
3108
+ return D.utils.warn(`${t} already loaded`), this.tilesMap.get(t);
3109
+ const { ssp: r } = this, i = this._getReferencePlacement(e), n = this._getTilesRendererOptions(e, i), o = new Bt(r, {
2518
3110
  ...n,
2519
3111
  _managedByPlugin: !0
2520
3112
  });
2521
- i && (this._referencePlacements.set(a, i), a.options.reorientation = i);
2522
- const { tiles: o } = a;
2523
- this._lruCache === null ? this._lruCache = o.lruCache : o.lruCache = this._lruCache, this._parseQueue === null ? this._parseQueue = o.parseQueue : o.parseQueue = this._parseQueue, this._downloadQueue === null ? this._downloadQueue = o.downloadQueue : o.downloadQueue = this._downloadQueue, o.lruCache.maxSize = 600, o.lruCache.minSize = 300, o.lruCache.unloadPercent = 0.8, this.tilesMap.set(t, a), o.setCamera(this._tilesCamera), o.setResolutionFromRenderer(this._tilesCamera, r.viewport.renderer), r.addObject(o.group), this._referenceOrigin && this.applyReferencePlacement(a, i);
2524
- const d = () => {
3113
+ i && (this._referencePlacements.set(o, i), o.options.reorientation = i);
3114
+ const { tiles: l } = o;
3115
+ this._lruCache === null ? this._lruCache = l.lruCache : l.lruCache = this._lruCache, this._parseQueue === null ? this._parseQueue = l.parseQueue : l.parseQueue = this._parseQueue, this._downloadQueue === null ? this._downloadQueue = l.downloadQueue : l.downloadQueue = this._downloadQueue, l.lruCache.maxSize = 600, l.lruCache.minSize = 300, l.lruCache.unloadPercent = 0.8, this.tilesMap.set(t, o), l.setCamera(this._tilesCamera), l.setResolutionFromRenderer(this._tilesCamera, r.viewport.renderer), r.addObject(l.group), this._referenceOrigin && this.applyReferencePlacement(o, i);
3116
+ const h = () => {
2525
3117
  this.cameraTransitionStart || (this.needsUpdate = !0, r.render());
2526
3118
  };
2527
- return o.addEventListener("load-model", d), new Promise((l) => {
2528
- o.addEventListener("load-tile-set", () => {
2529
- const h = this._referencePlacements.get(a);
2530
- this._referenceOrigin && this.applyReferencePlacement(a, h ?? null), d(), l(a);
3119
+ return l.addEventListener("load-model", h), new Promise((c) => {
3120
+ l.addEventListener("load-tile-set", () => {
3121
+ const d = this._referencePlacements.get(o);
3122
+ this._referenceOrigin && this.applyReferencePlacement(o, d ?? null), h(), c(o);
2531
3123
  });
2532
3124
  });
2533
3125
  }
@@ -2561,41 +3153,41 @@ class xt {
2561
3153
  }), this.tilesMap.clear();
2562
3154
  }
2563
3155
  invalidate(e, t, r, i) {
2564
- (i ? [i] : Array.from(this.tilesMap.values())).forEach((a) => {
2565
- const o = this._referencePlacements.get(a) ?? null;
2566
- this._referenceOrigin ? this.applyReferencePlacement(a, {
2567
- ...o ?? {},
3156
+ (i ? [i] : Array.from(this.tilesMap.values())).forEach((o) => {
3157
+ const l = this._referencePlacements.get(o) ?? null;
3158
+ this._referenceOrigin ? this.applyReferencePlacement(o, {
3159
+ ...l ?? {},
2568
3160
  lon: e,
2569
3161
  lat: t,
2570
3162
  height: r
2571
- }) : a.invalidate(e, t, r);
3163
+ }) : o.invalidate(e, t, r);
2572
3164
  });
2573
3165
  }
2574
3166
  applyReferencePlacement(e, t) {
2575
3167
  if (!this._referenceOrigin)
2576
- return I.utils.warn("TilesRendererManager: reference origin is not set."), !1;
2577
- const { ellipsoid: r, group: i } = e.tiles, n = this._referenceOrigin, a = this._isGeoreferenced(e);
3168
+ return D.utils.warn("TilesRendererManager: reference origin is not set."), !1;
3169
+ const { ellipsoid: r, group: i } = e.tiles, n = this._referenceOrigin, o = this._isGeoreferenced(e);
2578
3170
  if (r.getObjectFrame(
2579
- f.degToRad(n.lat),
2580
- f.degToRad(n.lon),
3171
+ p.degToRad(n.lat),
3172
+ p.degToRad(n.lon),
2581
3173
  n.height ?? 0.1,
2582
3174
  0,
2583
3175
  0,
2584
3176
  0,
2585
3177
  this._referenceFrame,
2586
- U
3178
+ j
2587
3179
  ), this._placementMatrix.copy(this._referenceFrame).invert(), t)
2588
3180
  r.getObjectFrame(
2589
- f.degToRad(t.lat),
2590
- f.degToRad(t.lon),
3181
+ p.degToRad(t.lat),
3182
+ p.degToRad(t.lon),
2591
3183
  t.height ?? 0,
2592
3184
  0,
2593
3185
  0,
2594
3186
  0,
2595
3187
  this._targetFrame,
2596
- U
2597
- ), this._placementMatrix.multiply(this._targetFrame), a ? (this._sourceFrame.copy(this._getSourceFrame(e)).invert(), this._placementMatrix.multiply(this._sourceFrame)) : (this._getUpCorrectionMatrix(t.up ?? "+z"), this._placementMatrix.multiply(this._upCorrectionMatrix));
2598
- else if (!a)
3188
+ j
3189
+ ), this._placementMatrix.multiply(this._targetFrame), o ? (this._sourceFrame.copy(this._getSourceFrame(e)).invert(), this._placementMatrix.multiply(this._sourceFrame)) : (this._getUpCorrectionMatrix(t.up ?? "+z"), this._placementMatrix.multiply(this._upCorrectionMatrix));
3190
+ else if (!o)
2599
3191
  return !1;
2600
3192
  return i.matrix.copy(this._placementMatrix), i.matrix.decompose(i.position, i.quaternion, i.scale), i.updateMatrixWorld(!0), t && (this._referencePlacements.set(e, t), e.options.reorientation = t), this.needsUpdate = !0, e.render(), !0;
2601
3193
  }
@@ -2619,7 +3211,7 @@ class xt {
2619
3211
  0,
2620
3212
  0,
2621
3213
  this._sourceFrame,
2622
- U
3214
+ j
2623
3215
  ), this._sourceFrame;
2624
3216
  }
2625
3217
  _getReferencePlacement(e) {
@@ -2665,228 +3257,228 @@ class xt {
2665
3257
  this.clear(), this.ssp.signals.beforeRender.remove(this._beforeRenderHandler), this.ssp.signals.cameraObjectChange.remove(this._onCameraObjectChange), this._lruCache = null, this._parseQueue = null, this._downloadQueue = null;
2666
3258
  }
2667
3259
  }
2668
- function Rt(s) {
3260
+ function lr(s) {
2669
3261
  if (s == null) return [0, 0, 0, 0];
2670
3262
  const e = String(s).trim().toLowerCase();
2671
3263
  if (e === "" || e === "transparent") return [0, 0, 0, 0];
2672
3264
  const t = /^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]*\.?[0-9]+)\s*\)$/.exec(e);
2673
3265
  if (t !== null) {
2674
- const i = Number(t[1]) / 255, n = Number(t[2]) / 255, a = Number(t[3]) / 255, o = Number(t[4]);
2675
- return [v(i), v(n), v(a), v(o)];
3266
+ const i = Number(t[1]) / 255, n = Number(t[2]) / 255, o = Number(t[3]) / 255, l = Number(t[4]);
3267
+ return [_(i), _(n), _(o), _(l)];
2676
3268
  }
2677
3269
  const r = /^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/.exec(e);
2678
3270
  if (r !== null) {
2679
- const i = Number(r[1]) / 255, n = Number(r[2]) / 255, a = Number(r[3]) / 255;
2680
- return [v(i), v(n), v(a), 1];
3271
+ const i = Number(r[1]) / 255, n = Number(r[2]) / 255, o = Number(r[3]) / 255;
3272
+ return [_(i), _(n), _(o), 1];
2681
3273
  }
2682
3274
  if (e.startsWith("#")) {
2683
3275
  const i = e.slice(1);
2684
3276
  if (i.length === 3) {
2685
- const n = parseInt(i[0] + i[0], 16) / 255, a = parseInt(i[1] + i[1], 16) / 255, o = parseInt(i[2] + i[2], 16) / 255;
2686
- if (Number.isFinite(n) && Number.isFinite(a) && Number.isFinite(o))
2687
- return [n, a, o, 1];
3277
+ const n = parseInt(i[0] + i[0], 16) / 255, o = parseInt(i[1] + i[1], 16) / 255, l = parseInt(i[2] + i[2], 16) / 255;
3278
+ if (Number.isFinite(n) && Number.isFinite(o) && Number.isFinite(l))
3279
+ return [n, o, l, 1];
2688
3280
  } else if (i.length === 6) {
2689
- const n = parseInt(i.slice(0, 2), 16) / 255, a = parseInt(i.slice(2, 4), 16) / 255, o = parseInt(i.slice(4, 6), 16) / 255;
2690
- if (Number.isFinite(n) && Number.isFinite(a) && Number.isFinite(o))
2691
- return [n, a, o, 1];
3281
+ const n = parseInt(i.slice(0, 2), 16) / 255, o = parseInt(i.slice(2, 4), 16) / 255, l = parseInt(i.slice(4, 6), 16) / 255;
3282
+ if (Number.isFinite(n) && Number.isFinite(o) && Number.isFinite(l))
3283
+ return [n, o, l, 1];
2692
3284
  } else if (i.length === 8) {
2693
- const n = parseInt(i.slice(0, 2), 16) / 255, a = parseInt(i.slice(2, 4), 16) / 255, o = parseInt(i.slice(4, 6), 16) / 255, d = parseInt(i.slice(6, 8), 16) / 255;
2694
- if (Number.isFinite(n) && Number.isFinite(a) && Number.isFinite(o) && Number.isFinite(d))
2695
- return [n, a, o, d];
3285
+ const n = parseInt(i.slice(0, 2), 16) / 255, o = parseInt(i.slice(2, 4), 16) / 255, l = parseInt(i.slice(4, 6), 16) / 255, h = parseInt(i.slice(6, 8), 16) / 255;
3286
+ if (Number.isFinite(n) && Number.isFinite(o) && Number.isFinite(l) && Number.isFinite(h))
3287
+ return [n, o, l, h];
2696
3288
  }
2697
3289
  }
2698
3290
  return [1, 1, 1, 1];
2699
3291
  }
2700
- function It(s, e) {
2701
- typeof s.fillOpacity == "number" && Number.isFinite(s.fillOpacity) ? e[0] = v(s.fillOpacity / 100) : typeof s.opacity == "number" && Number.isFinite(s.opacity) ? e[0] = v(s.opacity) : e[0] = 1, typeof s.strokeOpacity == "number" && Number.isFinite(s.strokeOpacity) ? e[1] = v(s.strokeOpacity / 100) : typeof s.opacity == "number" && Number.isFinite(s.opacity) ? e[1] = v(s.opacity) : e[1] = 1;
3292
+ function cr(s, e) {
3293
+ typeof s.fillOpacity == "number" && Number.isFinite(s.fillOpacity) ? e[0] = _(s.fillOpacity / 100) : typeof s.opacity == "number" && Number.isFinite(s.opacity) ? e[0] = _(s.opacity) : e[0] = 1, typeof s.strokeOpacity == "number" && Number.isFinite(s.strokeOpacity) ? e[1] = _(s.strokeOpacity / 100) : typeof s.opacity == "number" && Number.isFinite(s.opacity) ? e[1] = _(s.opacity) : e[1] = 1;
2702
3294
  }
2703
- function v(s) {
3295
+ function _(s) {
2704
3296
  return !Number.isFinite(s) || s < 0 ? 0 : s > 1 ? 1 : s;
2705
3297
  }
2706
- const le = 100, Q = 1e-4;
2707
- function P(s, e) {
3298
+ const _e = 100, ie = 1e-4;
3299
+ function E(s, e) {
2708
3300
  const t = s[0] - e[0], r = s[1] - e[1];
2709
3301
  return Math.sqrt(t * t + r * r);
2710
3302
  }
2711
- function pt(s) {
3303
+ function $t(s) {
2712
3304
  let e = 0;
2713
3305
  for (let t = 0; t < s.length - 1; t++)
2714
- e += P(s[t], s[t + 1]);
3306
+ e += E(s[t], s[t + 1]);
2715
3307
  return e;
2716
3308
  }
2717
- function Nt(s) {
2718
- return Math.pow(pt(s), 0.99);
3309
+ function hr(s) {
3310
+ return Math.pow($t(s), 0.99);
2719
3311
  }
2720
- function _e(s, e) {
3312
+ function Re(s, e) {
2721
3313
  return [(s[0] + e[0]) / 2, (s[1] + e[1]) / 2];
2722
3314
  }
2723
- function z(s, e) {
3315
+ function K(s, e) {
2724
3316
  let t;
2725
3317
  const r = Math.asin(
2726
- Math.abs(e[1] - s[1]) / P(s, e)
3318
+ Math.abs(e[1] - s[1]) / E(s, e)
2727
3319
  );
2728
3320
  return e[1] >= s[1] && e[0] >= s[0] ? t = r + Math.PI : e[1] >= s[1] && e[0] < s[0] ? t = Math.PI * 2 - r : e[1] < s[1] && e[0] < s[0] ? t = r : t = Math.PI - r, t;
2729
3321
  }
2730
- function At(s, e, t) {
2731
- const r = z(e, s) - z(e, t);
3322
+ function dr(s, e, t) {
3323
+ const r = K(e, s) - K(e, t);
2732
3324
  return r < 0 ? r + Math.PI * 2 : r;
2733
3325
  }
2734
- function gt(s, e, t) {
3326
+ function jt(s, e, t) {
2735
3327
  return (t[1] - s[1]) * (e[0] - s[0]) > (e[1] - s[1]) * (t[0] - s[0]);
2736
3328
  }
2737
- function Lt(s, e, t, r, i) {
2738
- const n = z(s, e), a = i ? n + t : n - t, o = r * Math.cos(a), d = r * Math.sin(a);
2739
- return [e[0] + o, e[1] + d];
3329
+ function ur(s, e, t, r, i) {
3330
+ const n = K(s, e), o = i ? n + t : n - t, l = r * Math.cos(o), h = r * Math.sin(o);
3331
+ return [e[0] + l, e[1] + h];
2740
3332
  }
2741
- function Y(s, e, t) {
3333
+ function se(s, e, t) {
2742
3334
  let r = s[0] - e[0], i = s[1] - e[1];
2743
3335
  const n = Math.sqrt(r * r + i * i);
2744
3336
  r /= n, i /= n;
2745
- let a = t[0] - e[0], o = t[1] - e[1];
2746
- const d = Math.sqrt(a * a + o * o);
2747
- return a /= d, o /= d, [r + a, i + o];
3337
+ let o = t[0] - e[0], l = t[1] - e[1];
3338
+ const h = Math.sqrt(o * o + l * l);
3339
+ return o /= h, l /= h, [r + o, i + l];
2748
3340
  }
2749
- function X(s, e, t, r) {
2750
- const i = Y(e, t, r);
2751
- let n, a, o, d, l;
2752
- const h = Math.sqrt(i[0] * i[0] + i[1] * i[1]), c = i[0] / h, y = i[1] / h, _ = P(e, t), p = P(t, r);
2753
- return h > Q ? gt(e, t, r) ? (o = s * _, d = t[0] - o * y, l = t[1] + o * c, n = [d, l], o = s * p, d = t[0] + o * y, l = t[1] - o * c, a = [d, l]) : (o = s * _, d = t[0] + o * y, l = t[1] - o * c, n = [d, l], o = s * p, d = t[0] - o * y, l = t[1] + o * c, a = [d, l]) : (d = t[0] + s * (e[0] - t[0]), l = t[1] + s * (e[1] - t[1]), n = [d, l], d = t[0] + s * (r[0] - t[0]), l = t[1] + s * (r[1] - t[1]), a = [d, l]), [n, a];
2754
- }
2755
- function ft(s) {
2756
- const e = s[0], t = s[1], r = s[2], n = X(0, e, t, r)[0], a = Y(e, t, r), o = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
2757
- let d;
2758
- if (o > Q) {
2759
- const l = _e(e, t), h = e[0] - l[0], c = e[1] - l[1], _ = 2 / P(e, t), p = -_ * c, g = _ * h, m = p * p - g * g, S = 2 * p * g, w = g * g - p * p, x = n[0] - l[0], E = n[1] - l[1];
2760
- d = [
2761
- l[0] + m * x + S * E,
2762
- l[1] + S * x + w * E
3341
+ function ne(s, e, t, r) {
3342
+ const i = se(e, t, r);
3343
+ let n, o, l, h, c;
3344
+ const d = Math.sqrt(i[0] * i[0] + i[1] * i[1]), f = i[0] / d, v = i[1] / d, M = E(e, t), y = E(t, r);
3345
+ return d > ie ? jt(e, t, r) ? (l = s * M, h = t[0] - l * v, c = t[1] + l * f, n = [h, c], l = s * y, h = t[0] + l * v, c = t[1] - l * f, o = [h, c]) : (l = s * M, h = t[0] + l * v, c = t[1] - l * f, n = [h, c], l = s * y, h = t[0] - l * v, c = t[1] + l * f, o = [h, c]) : (h = t[0] + s * (e[0] - t[0]), c = t[1] + s * (e[1] - t[1]), n = [h, c], h = t[0] + s * (r[0] - t[0]), c = t[1] + s * (r[1] - t[1]), o = [h, c]), [n, o];
3346
+ }
3347
+ function Ht(s) {
3348
+ const e = s[0], t = s[1], r = s[2], n = ne(0, e, t, r)[0], o = se(e, t, r), l = Math.sqrt(o[0] * o[0] + o[1] * o[1]);
3349
+ let h;
3350
+ if (l > ie) {
3351
+ const c = Re(e, t), d = e[0] - c[0], f = e[1] - c[1], M = 2 / E(e, t), y = -M * f, m = M * d, w = y * y - m * m, x = 2 * y * m, T = m * m - y * y, F = n[0] - c[0], R = n[1] - c[1];
3352
+ h = [
3353
+ c[0] + w * F + x * R,
3354
+ c[1] + x * F + T * R
2763
3355
  ];
2764
3356
  } else
2765
- d = [
2766
- e[0] + A(1) * (t[0] - e[0]),
2767
- e[1] + A(1) * (t[1] - e[1])
3357
+ h = [
3358
+ e[0] + U(1) * (t[0] - e[0]),
3359
+ e[1] + U(1) * (t[1] - e[1])
2768
3360
  ];
2769
- return d;
3361
+ return h;
2770
3362
  }
2771
- function A(s) {
3363
+ function U(s) {
2772
3364
  return 0.3 * s;
2773
3365
  }
2774
- function yt(s) {
2775
- const e = s.length, t = s[e - 3], r = s[e - 2], i = s[e - 1], a = X(0, t, r, i)[1], o = Y(t, r, i), d = Math.sqrt(o[0] * o[0] + o[1] * o[1]);
2776
- let l;
2777
- if (d > Q) {
2778
- const h = _e(r, i), c = i[0] - h[0], y = i[1] - h[1], p = 2 / P(r, i), g = -p * y, m = p * c, S = g * g - m * m, w = 2 * g * m, x = m * m - g * g, E = a[0] - h[0], q = a[1] - h[1];
2779
- l = [
2780
- h[0] + S * E + w * q,
2781
- h[1] + w * E + x * q
3366
+ function Qt(s) {
3367
+ const e = s.length, t = s[e - 3], r = s[e - 2], i = s[e - 1], o = ne(0, t, r, i)[1], l = se(t, r, i), h = Math.sqrt(l[0] * l[0] + l[1] * l[1]);
3368
+ let c;
3369
+ if (h > ie) {
3370
+ const d = Re(r, i), f = i[0] - d[0], v = i[1] - d[1], y = 2 / E(r, i), m = -y * v, w = y * f, x = m * m - w * w, T = 2 * m * w, F = w * w - m * m, R = o[0] - d[0], oe = o[1] - d[1];
3371
+ c = [
3372
+ d[0] + x * R + T * oe,
3373
+ d[1] + T * R + F * oe
2782
3374
  ];
2783
3375
  } else
2784
- l = [
2785
- i[0] + A(1) * (r[0] - i[0]),
2786
- i[1] + A(1) * (r[1] - i[1])
3376
+ c = [
3377
+ i[0] + U(1) * (r[0] - i[0]),
3378
+ i[1] + U(1) * (r[1] - i[1])
2787
3379
  ];
2788
- return l;
3380
+ return c;
2789
3381
  }
2790
- function Dt(s, e) {
2791
- const r = [ft(e)];
2792
- for (let a = 0; a < e.length - 2; a++) {
2793
- const o = e[a], d = e[a + 1], l = e[a + 2], h = X(s, o, d, l);
2794
- r.push(h[0], h[1]);
3382
+ function gr(s, e) {
3383
+ const r = [Ht(e)];
3384
+ for (let o = 0; o < e.length - 2; o++) {
3385
+ const l = e[o], h = e[o + 1], c = e[o + 2], d = ne(s, l, h, c);
3386
+ r.push(d[0], d[1]);
2795
3387
  }
2796
- const i = yt(e);
3388
+ const i = Qt(e);
2797
3389
  r.push(i);
2798
3390
  const n = [];
2799
- for (let a = 0; a < e.length - 1; a++) {
2800
- const o = e[a], d = e[a + 1];
2801
- n.push(o);
2802
- for (let l = 0; l < le; l++) {
2803
- const h = l / le, c = Math.pow(1 - h, 3) * o[0] + 3 * h * Math.pow(1 - h, 2) * r[a * 2][0] + 3 * h * h * (1 - h) * r[a * 2 + 1][0] + Math.pow(h, 3) * d[0], y = Math.pow(1 - h, 3) * o[1] + 3 * h * Math.pow(1 - h, 2) * r[a * 2][1] + 3 * h * h * (1 - h) * r[a * 2 + 1][1] + Math.pow(h, 3) * d[1];
2804
- n.push([c, y]);
3391
+ for (let o = 0; o < e.length - 1; o++) {
3392
+ const l = e[o], h = e[o + 1];
3393
+ n.push(l);
3394
+ for (let c = 0; c < _e; c++) {
3395
+ const d = c / _e, f = Math.pow(1 - d, 3) * l[0] + 3 * d * Math.pow(1 - d, 2) * r[o * 2][0] + 3 * d * d * (1 - d) * r[o * 2 + 1][0] + Math.pow(d, 3) * h[0], v = Math.pow(1 - d, 3) * l[1] + 3 * d * Math.pow(1 - d, 2) * r[o * 2][1] + 3 * d * d * (1 - d) * r[o * 2 + 1][1] + Math.pow(d, 3) * h[1];
3396
+ n.push([f, v]);
2805
3397
  }
2806
- n.push(d);
3398
+ n.push(h);
2807
3399
  }
2808
3400
  return n;
2809
3401
  }
2810
- function Gt(s) {
3402
+ function pr(s) {
2811
3403
  if (s.length <= 2) return s;
2812
3404
  const e = 2, t = [], r = s.length - e - 1;
2813
3405
  t.push(s[0]);
2814
3406
  for (let i = 0; i <= r; i++)
2815
3407
  for (let n = 0; n <= 1; n += 0.05) {
2816
- let a = 0, o = 0;
2817
- for (let d = 0; d <= e; d++) {
2818
- const l = mt(d, n);
2819
- a += l * s[i + d][0], o += l * s[i + d][1];
3408
+ let o = 0, l = 0;
3409
+ for (let h = 0; h <= e; h++) {
3410
+ const c = Yt(h, n);
3411
+ o += c * s[i + h][0], l += c * s[i + h][1];
2820
3412
  }
2821
- t.push([a, o]);
3413
+ t.push([o, l]);
2822
3414
  }
2823
3415
  return t.push(s[s.length - 1]), t;
2824
3416
  }
2825
- function mt(s, e) {
3417
+ function Yt(s, e) {
2826
3418
  return s === 0 ? Math.pow(e - 1, 2) / 2 : s === 1 ? (-2 * Math.pow(e, 2) + 2 * e + 1) / 2 : s === 2 ? Math.pow(e, 2) / 2 : 0;
2827
3419
  }
2828
- function Ft(s, e) {
2829
- return W(s, e);
3420
+ function fr(s, e) {
3421
+ return Q(s, e);
2830
3422
  }
2831
- function Ut(s, e) {
2832
- return ve(s, e);
3423
+ function yr(s, e) {
3424
+ return Ee(s, e);
2833
3425
  }
2834
- function Jt(s) {
2835
- return !s || s.length < 3 ? [] : me(s);
3426
+ function mr(s) {
3427
+ return !s || s.length < 3 ? [] : Ie(s);
2836
3428
  }
2837
- function Wt(s) {
2838
- return !s || s.length < 3 ? [] : ye(s);
3429
+ function vr(s) {
3430
+ return !s || s.length < 3 ? [] : Pe(s);
2839
3431
  }
2840
- function $t(s) {
2841
- return !s || s.length < 2 ? [] : fe(s);
3432
+ function wr(s) {
3433
+ return !s || s.length < 2 ? [] : Te(s);
2842
3434
  }
2843
3435
  export {
2844
- Pt as ArcgisTilesRenderer,
2845
- $ as EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID,
2846
- Et as EMERGENCY_RESOURCE_ONTOLOGY_IDS,
2847
- le as FITTING_COUNT,
2848
- je as GisPlotArrow,
2849
- O as GisPlotBase,
2850
- Xe as GisPlotCircle,
2851
- We as GisPlotLine,
2852
- Je as GisPlotPoint,
2853
- $e as GisPlotPolygon,
2854
- ze as GisPlotRectangle,
2855
- He as GisPlotSector,
2856
- Qe as GisPlotText,
2857
- ot as GroundDecalManager,
2858
- C as MaterialType,
2859
- P as MathDistance,
2860
- _e as Mid,
2861
- N as OverlayManager,
3436
+ sr as ArcgisTilesRenderer,
3437
+ Z as EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID,
3438
+ nr as EMERGENCY_RESOURCE_ONTOLOGY_IDS,
3439
+ _e as FITTING_COUNT,
3440
+ nt as GisPlotArrow,
3441
+ b as GisPlotBase,
3442
+ lt as GisPlotCircle,
3443
+ et as GisPlotLine,
3444
+ Ke as GisPlotPoint,
3445
+ tt as GisPlotPolygon,
3446
+ rt as GisPlotRectangle,
3447
+ st as GisPlotSector,
3448
+ ot as GisPlotText,
3449
+ Gt as GroundDecalManager,
3450
+ P as MaterialType,
3451
+ E as MathDistance,
3452
+ Re as Mid,
3453
+ G as OverlayManager,
2862
3454
  u as OverlayType,
2863
- at as PlotPrimitiveBridge,
2864
- kt as TerrainTilesRenderer,
2865
- M as TerrainType,
2866
- De as TileCustomMaterialPlugin,
2867
- ct as TilesRenderer,
2868
- xt as TilesRendererManager,
2869
- Q as ZERO_TOLERANCE,
2870
- Ut as createAssaultDirectionArrow,
2871
- Jt as createAttackArrow,
2872
- $t as createCurvedArrow,
2873
- Ft as createFineArrow,
2874
- Wt as createSwallowtailAttackArrow,
2875
- bt as default,
2876
- At as getAngleOfThreePoints,
2877
- z as getAzimuth,
2878
- Nt as getBaseLength,
2879
- X as getBisectorNormals,
2880
- Dt as getCurvePoints,
2881
- Y as getNormal,
2882
- Gt as getQBSplinePoints,
2883
- Lt as getThirdPoint,
2884
- gt as isClockWise,
2885
- Rt as parseColorToRGBA,
2886
- Ke as plotOrderToRenderOrder,
2887
- tt as resolveEmergencyResourceIcon,
2888
- It as resolveOpacity,
2889
- rt as resolvePlotPointImageUrl,
2890
- Ze as sanitizePlotOrder,
2891
- pt as wholeDistance
3455
+ Dt as PlotPrimitiveBridge,
3456
+ or as TerrainTilesRenderer,
3457
+ k as TerrainType,
3458
+ Xe as TileCustomMaterialPlugin,
3459
+ Bt as TilesRenderer,
3460
+ ar as TilesRendererManager,
3461
+ ie as ZERO_TOLERANCE,
3462
+ yr as createAssaultDirectionArrow,
3463
+ mr as createAttackArrow,
3464
+ wr as createCurvedArrow,
3465
+ fr as createFineArrow,
3466
+ vr as createSwallowtailAttackArrow,
3467
+ rr as default,
3468
+ dr as getAngleOfThreePoints,
3469
+ K as getAzimuth,
3470
+ hr as getBaseLength,
3471
+ ne as getBisectorNormals,
3472
+ gr as getCurvePoints,
3473
+ se as getNormal,
3474
+ pr as getQBSplinePoints,
3475
+ ur as getThirdPoint,
3476
+ jt as isClockWise,
3477
+ lr as parseColorToRGBA,
3478
+ ut as plotOrderToRenderOrder,
3479
+ Rt as resolveEmergencyResourceIcon,
3480
+ cr as resolveOpacity,
3481
+ Nt as resolvePlotPointImageUrl,
3482
+ dt as sanitizePlotOrder,
3483
+ $t as wholeDistance
2892
3484
  };