@skzz/components-gis 0.0.7 → 0.0.8

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.es.js CHANGED
@@ -1226,7 +1226,8 @@ var Fe = {
1226
1226
  dashLength: o,
1227
1227
  gapLength: s,
1228
1228
  borderColor: e.borderColor || r,
1229
- borderWidth: Number(e.borderWidth ?? t.borderWidth ?? 0)
1229
+ borderWidth: Number(e.borderWidth ?? t.borderWidth ?? 0),
1230
+ visible: e.visible !== !1
1230
1231
  };
1231
1232
  }
1232
1233
  function F(e = {}) {
@@ -1237,6 +1238,7 @@ var Fe = {
1237
1238
  radius: Number(t.radius ?? t.stroke?.radius ?? 8),
1238
1239
  borderColor: t.stroke?.outlineColor || t.borderColor || "#FFFFFF",
1239
1240
  borderWidth: Number(t.stroke?.outlineWidth ?? t.borderWidth ?? 1),
1241
+ strokeVisible: t.stroke?.visible !== !1,
1240
1242
  showIcon: !!t.showIcon,
1241
1243
  iconStyle: t.iconStyle || {
1242
1244
  url: null,
@@ -1256,6 +1258,7 @@ var Fe = {
1256
1258
  },
1257
1259
  line: {
1258
1260
  ...n,
1261
+ strokeVisible: n.stroke?.visible !== !1,
1259
1262
  stroke: P(n.stroke || n, {
1260
1263
  outlineColor: o,
1261
1264
  outlineWidth: s,
@@ -1266,6 +1269,7 @@ var Fe = {
1266
1269
  fill: r.fill || r.color || "rgba(255, 255, 0, 0.3)",
1267
1270
  outlineColor: i,
1268
1271
  outlineWidth: a,
1272
+ strokeVisible: r.stroke?.visible !== !1,
1269
1273
  stroke: P(r.stroke || {}, {
1270
1274
  outlineColor: i,
1271
1275
  outlineWidth: a,
@@ -1404,7 +1408,8 @@ var Fe = {
1404
1408
  dashLength: t.dashLength ?? 0,
1405
1409
  gapLength: t.gapLength ?? 0,
1406
1410
  borderColor: t.borderColor || t.outlineColor || e.outlineColor || "#409EFF",
1407
- borderWidth: Number(t.borderWidth ?? 0)
1411
+ borderWidth: Number(t.borderWidth ?? 0),
1412
+ visible: t.visible !== !1
1408
1413
  };
1409
1414
  }
1410
1415
  function ce(e) {
@@ -1538,9 +1543,10 @@ var Fe = {
1538
1543
  !r || !e.polyline || Se(e, O(E(t, r), n), n, { position: xe(e) });
1539
1544
  }
1540
1545
  function Ee(e, t) {
1541
- let n = F(l.value).polygon, r = se(n), i = he(), a = ve(oe(i) ? _e(t, i) : null, "polygon", i), o = Number(v.value ?? 0), s = Number.isFinite(o) && o > 0 && p.value;
1542
- e.polygon.material = new D.ColorMaterialProperty(N(a)), s ? e.polygon.zIndex = new D.ConstantProperty(o) : e.polygon.zIndex = void 0, e.polygon.outline = !0, e.polygon.outlineColor = new D.ConstantProperty(N(r.outlineColor)), e.polygon.outlineWidth = new D.ConstantProperty(r.outlineWidth), e.polyline = {
1546
+ let n = F(l.value).polygon, r = se(n), i = n.strokeVisible !== !1 && r.outlineWidth > 0, a = he(), o = ve(oe(a) ? _e(t, a) : null, "polygon", a), s = Number(v.value ?? 0), c = Number.isFinite(s) && s > 0 && p.value;
1547
+ e.polygon.material = new D.ColorMaterialProperty(N(o)), c ? e.polygon.zIndex = new D.ConstantProperty(s) : e.polygon.zIndex = void 0, e.polygon.outline = i, e.polygon.outlineColor = new D.ConstantProperty(i ? N(r.outlineColor) : D.Color.TRANSPARENT), e.polygon.outlineWidth = new D.ConstantProperty(i ? r.outlineWidth : 0), e.polyline = {
1543
1548
  positions: e.polygon.hierarchy._value.positions,
1549
+ show: i,
1544
1550
  width: r.outlineWidth,
1545
1551
  material: I({
1546
1552
  type: r.type,
@@ -1550,7 +1556,7 @@ var Fe = {
1550
1556
  borderColor: r.borderColor,
1551
1557
  borderWidth: r.borderWidth
1552
1558
  })
1553
- }, s && (e.polyline.clampToGround = !0, e.polyline.zIndex = o), b.value?.fieldName && we(e, t, b.value);
1559
+ }, c && (e.polyline.clampToGround = !0, e.polyline.zIndex = s), b.value?.fieldName && we(e, t, b.value);
1554
1560
  }
1555
1561
  function De(e, t) {
1556
1562
  let n = F(l.value).line, r = he(), i = ve(oe(r) ? _e(t, r) : null, "line", r);
@@ -1574,7 +1580,9 @@ var Fe = {
1574
1580
  }), n.showLabel && n.labelStyle && je(e, t, n.labelStyle), b.value?.fieldName && Ce(e, t, b.value);
1575
1581
  }
1576
1582
  function ke(e, t) {
1577
- e.point ||= new D.PointGraphics(), e.point.show = new D.ConstantProperty(!0), e.point.pixelSize = new D.ConstantProperty(t.radius), e.point.color = new D.ConstantProperty(N(t.color || t.fill)), e.point.outlineColor = new D.ConstantProperty(N(t.borderColor)), e.point.outlineWidth = new D.ConstantProperty(t.borderWidth);
1583
+ e.point ||= new D.PointGraphics();
1584
+ let n = t.strokeVisible !== !1 && Number(t.borderWidth) > 0;
1585
+ e.point.show = new D.ConstantProperty(!0), e.point.pixelSize = new D.ConstantProperty(t.radius), e.point.color = new D.ConstantProperty(N(t.color || t.fill)), e.point.outlineColor = new D.ConstantProperty(n ? N(t.borderColor) : D.Color.TRANSPARENT), e.point.outlineWidth = new D.ConstantProperty(n ? t.borderWidth : 0);
1578
1586
  }
1579
1587
  function Ae(e, t) {
1580
1588
  e.billboard ||= new D.BillboardGraphics(), e.billboard.show = new D.ConstantProperty(!0), e.billboard.image = new D.ConstantProperty(t.url), e.billboard.width = new D.ConstantProperty(t.width), e.billboard.height = new D.ConstantProperty(t.height), e.billboard.verticalOrigin = D.VerticalOrigin.BOTTOM;
@@ -1778,6 +1786,7 @@ var Fe = {
1778
1786
  fill: t.fill || t.color || "#FF0000",
1779
1787
  borderColor: t.stroke?.outlineColor || t.borderColor || "#FFFFFF",
1780
1788
  borderWidth: Number(t.stroke?.outlineWidth ?? t.borderWidth ?? 1),
1789
+ strokeVisible: t.stroke?.visible !== !1,
1781
1790
  stroke: {
1782
1791
  type: t.stroke?.type || "solid",
1783
1792
  color: t.stroke?.color || t.color || t.fill || "#FF0000",
@@ -1792,22 +1801,26 @@ var Fe = {
1792
1801
  };
1793
1802
  } else if (e.line) {
1794
1803
  let t = e.line || {};
1795
- return { stroke: {
1796
- type: t.stroke?.type || t.type || "solid",
1797
- color: t.stroke?.color || t.color || "#FFFF00",
1798
- outlineColor: t.stroke?.outlineColor || t.outlineColor || "#FFFF00",
1799
- outlineWidth: Number(t.stroke?.outlineWidth ?? t.outlineWidth ?? t.width ?? 1),
1800
- dashLength: Number(t.stroke?.dashLength ?? t.dashLength ?? 0),
1801
- gapLength: Number(t.stroke?.gapLength ?? t.gapLength ?? 0),
1802
- borderColor: t.stroke?.borderColor || t.borderColor || "#000000",
1803
- borderWidth: Number(t.stroke?.borderWidth ?? t.borderWidth ?? 0)
1804
- } };
1804
+ return {
1805
+ strokeVisible: t.stroke?.visible !== !1,
1806
+ stroke: {
1807
+ type: t.stroke?.type || t.type || "solid",
1808
+ color: t.stroke?.color || t.color || "#FFFF00",
1809
+ outlineColor: t.stroke?.outlineColor || t.outlineColor || "#FFFF00",
1810
+ outlineWidth: Number(t.stroke?.outlineWidth ?? t.outlineWidth ?? t.width ?? 1),
1811
+ dashLength: Number(t.stroke?.dashLength ?? t.dashLength ?? 0),
1812
+ gapLength: Number(t.stroke?.gapLength ?? t.gapLength ?? 0),
1813
+ borderColor: t.stroke?.borderColor || t.borderColor || "#000000",
1814
+ borderWidth: Number(t.stroke?.borderWidth ?? t.borderWidth ?? 0)
1815
+ }
1816
+ };
1805
1817
  } else if (e.polygon) {
1806
1818
  let t = e.polygon || {};
1807
1819
  return {
1808
1820
  fill: t.fill || t.color || "rgba(255, 255, 0, 0.3)",
1809
1821
  outlineColor: t.stroke?.outlineColor || t.outlineColor || "#FFFF00",
1810
1822
  outlineWidth: Number(t.stroke?.outlineWidth ?? t.outlineWidth ?? 2),
1823
+ strokeVisible: t.stroke?.visible !== !1,
1811
1824
  stroke: {
1812
1825
  type: t.stroke?.type || "solid",
1813
1826
  color: t.stroke?.color || t.color || "#FFFF00",
@@ -1945,10 +1958,10 @@ var Fe = {
1945
1958
  }
1946
1959
  return p.fill;
1947
1960
  }
1948
- })(), F = t.legendFilter || null, I = (e) => !F || !e ? e : {
1961
+ })(), F = p?.strokeVisible !== !1, I = t.legendFilter || null, L = (e) => !I || !e ? e : {
1949
1962
  ...e,
1950
- filter: F
1951
- }, L = o === "uniqueShp" || o === "gradedColor" ? P : p.stroke.outlineColor;
1963
+ filter: I
1964
+ }, R = p.stroke.outlineColor;
1952
1965
  if (u.point) return console.log("进入pointpointpoint"), {
1953
1966
  ...T(),
1954
1967
  sources: { [r.source]: {
@@ -1957,7 +1970,7 @@ var Fe = {
1957
1970
  minzoom: Number(t.minzoom ?? 1),
1958
1971
  maxzoom: Number(t.maxzoom ?? 14)
1959
1972
  } },
1960
- layers: [I({
1973
+ layers: [L({
1961
1974
  id: r.circle,
1962
1975
  type: "circle",
1963
1976
  source: r.source,
@@ -1967,11 +1980,11 @@ var Fe = {
1967
1980
  "circle-color": P,
1968
1981
  "circle-radius": p.stroke.radius,
1969
1982
  "circle-opacity": f,
1970
- "circle-stroke-color": p.stroke.outlineColor,
1971
- "circle-stroke-opacity": f,
1972
- "circle-stroke-width": p.stroke.outlineWidth
1983
+ "circle-stroke-color": F ? p.stroke.outlineColor : A,
1984
+ "circle-stroke-opacity": F ? f : 0,
1985
+ "circle-stroke-width": F ? p.stroke.outlineWidth : 0
1973
1986
  }
1974
- }), ...g ? [I({
1987
+ }), ...g ? [L({
1975
1988
  id: r.label,
1976
1989
  type: "symbol",
1977
1990
  source: r.source,
@@ -1988,7 +2001,7 @@ var Fe = {
1988
2001
  minzoom: Number(t.minzoom ?? 1),
1989
2002
  maxzoom: Number(t.maxzoom ?? 14)
1990
2003
  } },
1991
- layers: [I({
2004
+ layers: [L({
1992
2005
  id: "mvt-line",
1993
2006
  type: "line",
1994
2007
  source: "mvt:source",
@@ -1997,10 +2010,10 @@ var Fe = {
1997
2010
  paint: {
1998
2011
  "line-color": P,
1999
2012
  "line-opacity": f,
2000
- "line-width": p.stroke.outlineWidth || t.lineWidth,
2013
+ "line-width": p.stroke.outlineWidth ?? t.lineWidth,
2001
2014
  "line-dasharray": p.stroke.type === "dashed" ? [2, 2] : [1, 0]
2002
2015
  }
2003
- }), ...g ? [I({
2016
+ }), ...g ? [L({
2004
2017
  id: r.label,
2005
2018
  type: "symbol",
2006
2019
  source: "mvt:source",
@@ -2009,50 +2022,53 @@ var Fe = {
2009
2022
  paint: w
2010
2023
  })] : []]
2011
2024
  };
2012
- if (u.polygon) return {
2013
- ...T(),
2014
- sources: { "mvt:source": {
2015
- type: "vector",
2016
- tiles: i,
2017
- minzoom: Number(t.minzoom ?? 1),
2018
- maxzoom: Number(t.maxzoom ?? 14)
2019
- } },
2020
- layers: [
2021
- I({
2022
- id: "mvt-fill",
2023
- type: "fill",
2024
- source: "mvt:source",
2025
- "source-layer": n,
2026
- layout: { visibility: t.visibility },
2027
- paint: {
2028
- "fill-color": P,
2029
- "fill-opacity": b(t.fillOpacity),
2030
- "fill-outline-color": L
2031
- }
2032
- }),
2033
- I({
2034
- id: "mvt-line",
2035
- type: "line",
2036
- source: "mvt:source",
2037
- "source-layer": n,
2038
- layout: { visibility: t.visibility },
2039
- paint: {
2040
- "line-color": L,
2041
- "line-opacity": f,
2042
- "line-width": p.stroke.outlineWidth || t.lineWidth,
2043
- "line-dasharray": p.stroke.type === "dashed" ? [2, 2] : [1, 0]
2044
- }
2045
- }),
2046
- ...g ? [I({
2047
- id: "mvt-label",
2048
- type: "symbol",
2049
- source: "mvt:source",
2050
- "source-layer": n,
2051
- layout: v(m, d, { "text-offset": [0, -1.8] }),
2052
- paint: w
2053
- })] : []
2054
- ]
2055
- };
2025
+ if (u.polygon) {
2026
+ let e = F ? R : A;
2027
+ return {
2028
+ ...T(),
2029
+ sources: { "mvt:source": {
2030
+ type: "vector",
2031
+ tiles: i,
2032
+ minzoom: Number(t.minzoom ?? 1),
2033
+ maxzoom: Number(t.maxzoom ?? 14)
2034
+ } },
2035
+ layers: [
2036
+ L({
2037
+ id: "mvt-fill",
2038
+ type: "fill",
2039
+ source: "mvt:source",
2040
+ "source-layer": n,
2041
+ layout: { visibility: t.visibility },
2042
+ paint: {
2043
+ "fill-color": P,
2044
+ "fill-opacity": b(t.fillOpacity),
2045
+ "fill-outline-color": e
2046
+ }
2047
+ }),
2048
+ L({
2049
+ id: "mvt-line",
2050
+ type: "line",
2051
+ source: "mvt:source",
2052
+ "source-layer": n,
2053
+ layout: { visibility: t.visibility },
2054
+ paint: {
2055
+ "line-color": e,
2056
+ "line-opacity": F ? f : 0,
2057
+ "line-width": F ? p.stroke.outlineWidth ?? t.lineWidth : 0,
2058
+ "line-dasharray": p.stroke.type === "dashed" ? [2, 2] : [1, 0]
2059
+ }
2060
+ }),
2061
+ ...g ? [L({
2062
+ id: "mvt-label",
2063
+ type: "symbol",
2064
+ source: "mvt:source",
2065
+ "source-layer": n,
2066
+ layout: v(m, d, { "text-offset": [0, -1.8] }),
2067
+ paint: w
2068
+ })] : []
2069
+ ]
2070
+ };
2071
+ }
2056
2072
  }, M = () => {
2057
2073
  let e = i.value;
2058
2074
  s("loaded", e), (r?.value?.container || window)?.dispatchEvent(new CustomEvent("loaded", { detail: e }));
@@ -4718,15 +4734,23 @@ var Ua = class {
4718
4734
  };
4719
4735
  }
4720
4736
  _updatePrimitiveAlpha(e, t) {
4721
- if (e) {
4722
- for (let n of e) if (!(!n.primitive || n.primitive.isDestroyed?.())) for (let e = 0; e < n.instanceIds.length; e++) {
4723
- let r = n.instanceColors[e], i = new D.Color(r.red, r.green, r.blue, t);
4724
- try {
4725
- let t = n.primitive.getGeometryInstanceAttributes(n.instanceIds[e]);
4726
- t?.color && (t.color = D.ColorGeometryInstanceAttribute.toValue(i));
4727
- } catch {}
4728
- }
4737
+ if (!e) return;
4738
+ let n = this._normOpacity(t);
4739
+ for (let t of e) if (!(!t.primitive || t.primitive.isDestroyed?.())) for (let e = 0; e < t.instanceIds.length; e++) {
4740
+ let r = t.instanceColors[e], i = new D.Color(r.red, r.green, r.blue, n);
4741
+ try {
4742
+ let n = t.primitive.getGeometryInstanceAttributes(t.instanceIds[e]);
4743
+ n?.color && (n.color = D.ColorGeometryInstanceAttribute.toValue(i));
4744
+ } catch {}
4745
+ }
4746
+ }
4747
+ _applyLayerOpacity() {
4748
+ if (this.transitionAnimId !== null) {
4749
+ cancelAnimationFrame(this.transitionAnimId), this.transitionAnimId = null;
4750
+ for (let e of [...this.lodPrimitives.keys()]) e !== this.currentLod && this._destroyLodPrimitives(e);
4729
4751
  }
4752
+ let e = this.lodPrimitives.get(this.currentLod);
4753
+ e && this._updatePrimitiveAlpha(e, this.opacity);
4730
4754
  }
4731
4755
  _destroyLodPrimitives(e) {
4732
4756
  let t = this.lodPrimitives.get(e);
@@ -4744,9 +4768,9 @@ var Ua = class {
4744
4768
  let n = this.lodPrimitives.get(e) ?? void 0, r = this.lodPrimitives.get(t);
4745
4769
  if (!r) return;
4746
4770
  this._updatePrimitiveAlpha(r, 0);
4747
- let i = performance.now(), a = this.transitionDuration, o = () => {
4771
+ let i = performance.now(), a = this.transitionDuration, o = this.opacity, s = () => {
4748
4772
  let t = Math.min((performance.now() - i) / a, 1);
4749
- if (this._updatePrimitiveAlpha(r, t), n && this._updatePrimitiveAlpha(n, 1 - t), t < 1) this.transitionAnimId = requestAnimationFrame(o);
4773
+ if (this._updatePrimitiveAlpha(r, t * o), n && this._updatePrimitiveAlpha(n, (1 - t) * o), t < 1) this.transitionAnimId = requestAnimationFrame(s);
4750
4774
  else {
4751
4775
  if (n) {
4752
4776
  for (let e of n) e.primitive && !e.primitive.isDestroyed?.() && this.viewer.scene.primitives.remove(e.primitive);
@@ -4755,7 +4779,7 @@ var Ua = class {
4755
4779
  this.transitionAnimId = null;
4756
4780
  }
4757
4781
  };
4758
- this.transitionAnimId = requestAnimationFrame(o);
4782
+ this.transitionAnimId = requestAnimationFrame(s);
4759
4783
  }
4760
4784
  _renderBatched(e, t, n, r, i) {
4761
4785
  let a = [], o = [];
@@ -4768,7 +4792,7 @@ var Ua = class {
4768
4792
  d.push(t);
4769
4793
  let r = this._resolveFeatureColor(e, i);
4770
4794
  f.push(r);
4771
- let a = new D.Color(r.red, r.green, r.blue, n);
4795
+ let a = new D.Color(r.red, r.green, r.blue, this._normOpacity(n) * this.opacity);
4772
4796
  try {
4773
4797
  p.push(new D.GeometryInstance({
4774
4798
  geometry: new D.Geometry({
@@ -4926,14 +4950,28 @@ var Ua = class {
4926
4950
  console.log(`[ShpZzts] 图层 ${this.id} 已移除`);
4927
4951
  }
4928
4952
  updateOptions(e = {}) {
4929
- e.opacity !== void 0 && (this.opacity = this._normOpacity(e.opacity)), e.stackIndex !== void 0 && (this.stackIndex = e.stackIndex), e.subStackIndex !== void 0 && (this.subStackIndex = e.subStackIndex), e.groupKey !== void 0 && (this.groupKey = e.groupKey), e.color !== void 0 && (this._userColor = e.color || null), e.displayRange !== void 0 && (this.displayRange = Ba(e.displayRange));
4930
4953
  let t = !1;
4931
- e.dictCode !== void 0 && e.dictCode !== this.dictCode && (this.dictCode = e.dictCode || "", t = !0), e.serviceName !== void 0 && e.serviceName !== this.serviceName && (this.serviceName = e.serviceName || "", t = !0), e.enableServiceColor !== void 0 && !!e.enableServiceColor !== this.enableServiceColor && (this.enableServiceColor = !!e.enableServiceColor, t = !0), e.modelColorUrl !== void 0 && e.modelColorUrl !== this.modelColorUrl && (this.modelColorUrl = e.modelColorUrl || "/v1/zzts/style/render/modelColors", t = !0), t && this.modelColorCache.clear(), console.log(`[ShpZzts] 图层 ${this.id} 配置已更新`, {
4954
+ if (e.opacity !== void 0) {
4955
+ let n = this._normOpacity(e.opacity);
4956
+ n !== this.opacity && (this.opacity = n, t = !0);
4957
+ }
4958
+ e.stackIndex !== void 0 && (this.stackIndex = e.stackIndex), e.subStackIndex !== void 0 && (this.subStackIndex = e.subStackIndex), e.groupKey !== void 0 && (this.groupKey = e.groupKey), e.color !== void 0 && (this._userColor = e.color || null), e.displayRange !== void 0 && (this.displayRange = Ba(e.displayRange));
4959
+ let n = !1;
4960
+ e.dictCode !== void 0 && e.dictCode !== this.dictCode && (this.dictCode = e.dictCode || "", n = !0), e.serviceName !== void 0 && e.serviceName !== this.serviceName && (this.serviceName = e.serviceName || "", n = !0), e.enableServiceColor !== void 0 && !!e.enableServiceColor !== this.enableServiceColor && (this.enableServiceColor = !!e.enableServiceColor, n = !0), e.modelColorUrl !== void 0 && e.modelColorUrl !== this.modelColorUrl && (this.modelColorUrl = e.modelColorUrl || "/v1/zzts/style/render/modelColors", n = !0), n && this.modelColorCache.clear(), t && this._applyLayerOpacity(), console.log(`[ShpZzts] 图层 ${this.id} 配置已更新`, {
4932
4961
  opacity: this.opacity,
4933
4962
  stackIndex: this.stackIndex
4934
4963
  });
4935
4964
  }
4936
- }, Wa = new class {
4965
+ };
4966
+ function Wa(e, t) {
4967
+ return !e && !t ? !0 : !e || !t ? !1 : e.west === t.west && e.south === t.south && e.east === t.east && e.north === t.north;
4968
+ }
4969
+ function Ga(e, t = {}) {
4970
+ if (!e || e.destroyed) return !1;
4971
+ let n = t.layerId || t.id;
4972
+ return !(!n || e.id !== n || t.calTilesUrl && t.calTilesUrl !== e.calTilesUrl || t.tileUrl && t.tileUrl !== e.tileUrl || t.dictCode !== void 0 && (t.dictCode || "") !== (e.dictCode || "") || t.serviceName !== void 0 && (t.serviceName || "") !== (e.serviceName || "") || t.enableServiceColor !== void 0 && !!t.enableServiceColor !== e.enableServiceColor || t.modelColorUrl && t.modelColorUrl !== e.modelColorUrl || t.color !== void 0 && (t.color || null) !== (e._userColor || null) || t.displayRange !== void 0 && !Wa(e.displayRange, Ba(t.displayRange)));
4973
+ }
4974
+ var Ka = new class {
4937
4975
  constructor() {
4938
4976
  this.layers = /* @__PURE__ */ new Map();
4939
4977
  }
@@ -4954,9 +4992,9 @@ var Ua = class {
4954
4992
  removeAllLayers() {
4955
4993
  this.layers.forEach((e) => e.remove()), this.layers.clear();
4956
4994
  }
4957
- }(), Ga = async (e, t) => Wa.createLayer(e, t), Ka = (e) => {
4958
- Wa.removeLayer(e);
4959
- }, qa = (e) => Wa.getLayer(e), Ja = {
4995
+ }(), qa = async (e, t) => Ka.createLayer(e, t), Ja = (e) => {
4996
+ Ka.removeLayer(e);
4997
+ }, Ya = (e) => Ka.getLayer(e), Xa = {
4960
4998
  __name: "index",
4961
4999
  props: {
4962
5000
  config: {
@@ -4988,13 +5026,9 @@ var Ua = class {
4988
5026
  }, a = t(() => ({
4989
5027
  ...i,
4990
5028
  ...r.config
4991
- })), o = "", s = async () => {
4992
- let e = a.value;
4993
- if (!e.layerId) {
4994
- console.warn("[zzLayerShpZzts] 缺少 layerId,跳过初始化", e);
4995
- return;
4996
- }
4997
- let t = {
5029
+ })), o = "";
5030
+ function s(e) {
5031
+ return {
4998
5032
  layerId: e.layerId,
4999
5033
  calTilesUrl: e.calTilesUrl,
5000
5034
  tileUrl: e.tileUrl,
@@ -5011,17 +5045,31 @@ var Ua = class {
5011
5045
  subStackIndex: r.subStackIndex,
5012
5046
  groupKey: r.groupKey || e.layerId
5013
5047
  };
5048
+ }
5049
+ let l = async () => {
5050
+ let e = a.value;
5051
+ if (!e.layerId) {
5052
+ console.warn("[zzLayerShpZzts] 缺少 layerId,跳过初始化", e);
5053
+ return;
5054
+ }
5055
+ let t = s(e);
5056
+ o && o !== e.layerId && Ja(o);
5057
+ let r = Ya(e.layerId);
5058
+ if (r && Ga(r, t)) {
5059
+ r.updateOptions(t), o = e.layerId;
5060
+ return;
5061
+ }
5014
5062
  console.log("[zzLayerShpZzts] initLayer 入参 =", {
5015
5063
  layerId: t.layerId,
5016
5064
  calTilesUrl: t.calTilesUrl,
5017
5065
  tileUrl: t.tileUrl,
5018
5066
  opacity: t.opacity
5019
- }), await Ga(n.value, t), o = e.layerId;
5020
- }, l = () => {
5021
- Ka(a.value.layerId);
5067
+ }), await qa(n.value, t), o = e.layerId;
5068
+ }, u = () => {
5069
+ Ja(a.value.layerId);
5022
5070
  };
5023
5071
  return w(() => r.config, async () => {
5024
- console.log("[zzLayerShpZzts] props.config changed =", JSON.parse(JSON.stringify(r.config || {}))), await s();
5072
+ console.log("[zzLayerShpZzts] props.config changed =", JSON.parse(JSON.stringify(r.config || {}))), await l();
5025
5073
  }, {
5026
5074
  deep: !0,
5027
5075
  immediate: !0
@@ -5030,7 +5078,7 @@ var Ua = class {
5030
5078
  r.subStackIndex,
5031
5079
  r.groupKey
5032
5080
  ], () => {
5033
- let e = a.value, t = qa(e.layerId);
5081
+ let e = a.value, t = Ya(e.layerId);
5034
5082
  if (t && typeof t.updateOptions == "function") {
5035
5083
  t.updateOptions({
5036
5084
  stackIndex: r.stackIndex,
@@ -5039,20 +5087,20 @@ var Ua = class {
5039
5087
  });
5040
5088
  return;
5041
5089
  }
5042
- s();
5090
+ l();
5043
5091
  }), d(() => {
5044
5092
  console.log("[zzLayerShpZzts] 组件挂载");
5045
5093
  }), f(() => {
5046
- console.log("[zzLayerShpZzts] 组件卸载,开始清理资源..."), o ? Ka(o) : l();
5094
+ console.log("[zzLayerShpZzts] 组件卸载,开始清理资源..."), o ? Ja(o) : u();
5047
5095
  }), (e, t) => null;
5048
5096
  }
5049
5097
  };
5050
5098
  //#endregion
5051
5099
  //#region src/zz-layer/zz-layer-zzts3d-point/pointTileUtils.js
5052
- function Ya(e) {
5100
+ function Za(e) {
5053
5101
  return e instanceof ArrayBuffer ? e : ArrayBuffer.isView(e) ? e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength) : null;
5054
5102
  }
5055
- function Xa(e) {
5103
+ function Qa(e) {
5056
5104
  if (!e || e.byteLength === 0) return null;
5057
5105
  let t = new Uint8Array(e), n = t.find((e) => e > 32);
5058
5106
  if (n !== 123 && n !== 91) return null;
@@ -5062,41 +5110,41 @@ function Xa(e) {
5062
5110
  return null;
5063
5111
  }
5064
5112
  }
5065
- function Za(e, t = {}) {
5113
+ function $a(e, t = {}) {
5066
5114
  return console.warn("[zzts3d-point] skip invalid tile data:", e, t), [];
5067
5115
  }
5068
- var Qa = [
5116
+ var eo = [
5069
5117
  13,
5070
5118
  14,
5071
5119
  15,
5072
5120
  16,
5073
5121
  18
5074
- ], $a = 16;
5075
- function eo(e, t = $a) {
5122
+ ], to = 16;
5123
+ function no(e, t = to) {
5076
5124
  let n = Number(e);
5077
- if (Number.isFinite(n) && n > 0) return Qa.find((e) => n <= e) || Qa[Qa.length - 1];
5125
+ if (Number.isFinite(n) && n > 0) return eo.find((e) => n <= e) || eo[eo.length - 1];
5078
5126
  let r = Number(t);
5079
- return Number.isFinite(r) && r > 0 ? Qa.find((e) => r <= e) || Qa[Qa.length - 1] : $a;
5127
+ return Number.isFinite(r) && r > 0 ? eo.find((e) => r <= e) || eo[eo.length - 1] : to;
5080
5128
  }
5081
- function to(e, t) {
5129
+ function ro(e, t) {
5082
5130
  let n = (String(e ?? "").split("_")[0].match(/\d/g) || []).length;
5083
- return n > 0 ? eo(n, t) : eo(t);
5131
+ return n > 0 ? no(n, t) : no(t);
5084
5132
  }
5085
- function no(e, t) {
5086
- let n = Ya(e);
5087
- if (!n || n.byteLength < 4 || Xa(n)) return [];
5133
+ function io(e, t) {
5134
+ let n = Za(e);
5135
+ if (!n || n.byteLength < 4 || Qa(n)) return [];
5088
5136
  let r = [], i = new DataView(n), a = 0, o = i.getInt32(a, !0);
5089
- if (a += 4, o < 0 || o > 1e5) return Za("invalid entity count", {
5137
+ if (a += 4, o < 0 || o > 1e5) return $a("invalid entity count", {
5090
5138
  entityCount: o,
5091
5139
  byteLength: n.byteLength
5092
5140
  });
5093
5141
  for (let e = 0; e < o; e++) {
5094
- if (a + 4 > n.byteLength) return Za("missing compressed chunk length", {
5142
+ if (a + 4 > n.byteLength) return $a("missing compressed chunk length", {
5095
5143
  offset: a,
5096
5144
  byteLength: n.byteLength
5097
5145
  });
5098
5146
  let e = i.getInt32(a, !0);
5099
- if (a += 4, e <= 0 || a + e > n.byteLength) return Za("invalid compressed chunk length", {
5147
+ if (a += 4, e <= 0 || a + e > n.byteLength) return $a("invalid compressed chunk length", {
5100
5148
  compressedLength: e,
5101
5149
  offset: a,
5102
5150
  byteLength: n.byteLength
@@ -5110,11 +5158,11 @@ function no(e, t) {
5110
5158
  } catch {
5111
5159
  s = new DataView(o.buffer, o.byteOffset, o.byteLength);
5112
5160
  }
5113
- if (s.byteLength < 12) return Za("chunk too small", { byteLength: s.byteLength });
5161
+ if (s.byteLength < 12) return $a("chunk too small", { byteLength: s.byteLength });
5114
5162
  let c = 0, l = s.getBigInt64(c, !0);
5115
5163
  c += 8;
5116
5164
  let u = s.getInt32(c, !0);
5117
- if (c += 4, u < 0 || u % 12 != 0 || c + u > s.byteLength) return Za("invalid positions byte length", {
5165
+ if (c += 4, u < 0 || u % 12 != 0 || c + u > s.byteLength) return $a("invalid positions byte length", {
5118
5166
  positionsByteLength: u,
5119
5167
  innerOffset: c,
5120
5168
  byteLength: s.byteLength
@@ -5130,12 +5178,12 @@ function no(e, t) {
5130
5178
  }
5131
5179
  return r;
5132
5180
  }
5133
- function ro({ destroyed: e, currentVersion: t, requestVersion: n, cancelToken: r } = {}) {
5181
+ function ao({ destroyed: e, currentVersion: t, requestVersion: n, cancelToken: r } = {}) {
5134
5182
  return !e && t === n && !r?.token?.reason;
5135
5183
  }
5136
5184
  //#endregion
5137
5185
  //#region src/zz-layer/zz-layer-zzts3d-point/entityGrid.js
5138
- function io(e) {
5186
+ function oo(e) {
5139
5187
  if (!e) return null;
5140
5188
  let t = e;
5141
5189
  if (typeof e == "string") try {
@@ -5157,7 +5205,7 @@ function io(e) {
5157
5205
  north: a
5158
5206
  };
5159
5207
  }
5160
- function ao(e, t) {
5208
+ function so(e, t) {
5161
5209
  if (!e || !t) return null;
5162
5210
  let n = {
5163
5211
  west: Math.max(e.west, t.west),
@@ -5167,9 +5215,9 @@ function ao(e, t) {
5167
5215
  };
5168
5216
  return n.west < n.east && n.south < n.north ? n : null;
5169
5217
  }
5170
- var oo = class {
5218
+ var co = class {
5171
5219
  constructor(e, t = !1, n = null, r = "255,255,255", i = 5, a = 1, o = {}) {
5172
- this.id = e, this.isStatic = t, this.loadedTiles = /* @__PURE__ */ new Map(), this.currentTileIds = /* @__PURE__ */ new Set(), this.currentNewLevel = g(n || 15), this.gridDb = null, this.entityNum = 0, this.handlers = null, this.requestController = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.fadeAnimations = /* @__PURE__ */ new Map(), this.lastTime = 0, this.pointSize = i, this.opacity = a, this.fixedLevel = n, this.dictCode = o.dictCode || "", this.serviceName = o.serviceName || "", this.enableServiceColor = o.enableServiceColor === !0, this.modelColorUrl = o.modelColorUrl || "/v1/zzts/style/render/modelColors", this.displayRange = io(o.displayRange), this.modelColorCache = /* @__PURE__ */ new Map(), this.requestVersion = 0, this.destroyed = !1, this.initTimer = null, this.levels_add = window.levels_add_plus || 0, this.tileColor = r, this.tileSleepTime = window.tileSleepTime || 400, this.highlightModelId = null, this.highlightColor = "255,255,0", this.highlightOpacity = 1, this.highlightPointSize = null, this.modelPointIndex = /* @__PURE__ */ new Map(), this.tilePointIndex = /* @__PURE__ */ new Map();
5220
+ this.id = e, this.isStatic = t, this.loadedTiles = /* @__PURE__ */ new Map(), this.currentTileIds = /* @__PURE__ */ new Set(), this.currentNewLevel = g(n || 15), this.gridDb = null, this.entityNum = 0, this.handlers = null, this.requestController = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.fadeAnimations = /* @__PURE__ */ new Map(), this.lastTime = 0, this.pointSize = i, this.opacity = a, this.fixedLevel = n, this.dictCode = o.dictCode || "", this.serviceName = o.serviceName || "", this.enableServiceColor = o.enableServiceColor === !0, this.modelColorUrl = o.modelColorUrl || "/v1/zzts/style/render/modelColors", this.displayRange = oo(o.displayRange), this.modelColorCache = /* @__PURE__ */ new Map(), this.requestVersion = 0, this.destroyed = !1, this.initTimer = null, this.levels_add = window.levels_add_plus || 0, this.tileColor = r, this.tileSleepTime = window.tileSleepTime || 400, this.highlightModelId = null, this.highlightColor = "255,255,0", this.highlightOpacity = 1, this.highlightPointSize = null, this.modelPointIndex = /* @__PURE__ */ new Map(), this.tilePointIndex = /* @__PURE__ */ new Map();
5173
5221
  }
5174
5222
  getBaseStyle() {
5175
5223
  return {
@@ -5369,7 +5417,7 @@ var oo = class {
5369
5417
  south: i[1],
5370
5418
  east: i[2],
5371
5419
  north: i[3]
5372
- }, o = this.displayRange ? ao(a, this.displayRange) : a;
5420
+ }, o = this.displayRange ? so(a, this.displayRange) : a;
5373
5421
  if (!o) {
5374
5422
  this.clearAllTiles();
5375
5423
  return;
@@ -5408,11 +5456,11 @@ var oo = class {
5408
5456
  r.forEach((e) => {
5409
5457
  if (this.isStatic && this.fixedLevel) e.geoSot = e.geoSot, e.level = t;
5410
5458
  else {
5411
- let r = to(e.geoSot, t), i = Cesium.Cartesian3.distance(Cesium.Cartesian3.fromDegrees((e.xmax + e.xmin) / 2, (e.ymax + e.ymin) / 2, 0), Cesium.Cartesian3.fromDegrees(n.x, n.y, n.z));
5459
+ let r = ro(e.geoSot, t), i = Cesium.Cartesian3.distance(Cesium.Cartesian3.fromDegrees((e.xmax + e.xmin) / 2, (e.ymax + e.ymin) / 2, 0), Cesium.Cartesian3.fromDegrees(n.x, n.y, n.z));
5412
5460
  N.entityGridLevels.filter((e) => e.max >= i && e.min <= i), e.geoSot = e.geoSot, e.level = r;
5413
5461
  }
5414
5462
  });
5415
- let i = this.displayRange, a = r.filter((e) => i ? !!ao({
5463
+ let i = this.displayRange, a = r.filter((e) => i ? !!so({
5416
5464
  west: Number(e?.xmin),
5417
5465
  south: Number(e?.ymin),
5418
5466
  east: Number(e?.xmax),
@@ -5443,7 +5491,7 @@ var oo = class {
5443
5491
  this.fadeAnimations.set(t, { interval: i });
5444
5492
  }
5445
5493
  isActiveRequest(e, t) {
5446
- return ro({
5494
+ return ao({
5447
5495
  destroyed: this.destroyed,
5448
5496
  currentVersion: this.requestVersion,
5449
5497
  requestVersion: e,
@@ -5601,7 +5649,7 @@ var oo = class {
5601
5649
  this.handlers &&= (viewer.camera.changed.removeEventListener(this.handlers), null), this.clearAllTiles(), this.requestController &&= (this.requestController.abort(), null);
5602
5650
  }
5603
5651
  parseCompressedMeshData(e, t) {
5604
- return no(e, t);
5652
+ return io(e, t);
5605
5653
  }
5606
5654
  showPoint(e, t, n, r) {
5607
5655
  viewer.entities.add({
@@ -5622,7 +5670,7 @@ var oo = class {
5622
5670
  }
5623
5671
  });
5624
5672
  }
5625
- }, so = new class {
5673
+ }, lo = new class {
5626
5674
  constructor() {
5627
5675
  this.layers = /* @__PURE__ */ new Map();
5628
5676
  }
@@ -5632,9 +5680,9 @@ var oo = class {
5632
5680
  if (this.layers.has(t)) {
5633
5681
  console.warn(`图层 ${t} 已存在`);
5634
5682
  let i = this.layers.get(t), a = ja(i.renderSignature, e || {});
5635
- return n && (i.tileColor = n), i.dictCode = e?.dictCode || i.dictCode || "", i.serviceName = e?.serviceName || i.serviceName || "", e?.displayRange !== void 0 && (i.displayRange = io(e.displayRange)), e?.enableServiceColor !== void 0 && (i.enableServiceColor = !!e.enableServiceColor), i.modelColorUrl = e?.modelColorUrl || i.modelColorUrl || "/v1/zzts/style/render/modelColors", r != null && (i.fixedLevel = r, i.currentNewLevel.value = r), a && (i.renderSignature = Aa(e || {}), i.modelColorCache.clear(), i.clearAllTiles(), i.getViewportInfo()), i;
5683
+ return n && (i.tileColor = n), i.dictCode = e?.dictCode || i.dictCode || "", i.serviceName = e?.serviceName || i.serviceName || "", e?.displayRange !== void 0 && (i.displayRange = oo(e.displayRange)), e?.enableServiceColor !== void 0 && (i.enableServiceColor = !!e.enableServiceColor), i.modelColorUrl = e?.modelColorUrl || i.modelColorUrl || "/v1/zzts/style/render/modelColors", r != null && (i.fixedLevel = r, i.currentNewLevel.value = r), a && (i.renderSignature = Aa(e || {}), i.modelColorCache.clear(), i.clearAllTiles(), i.getViewportInfo()), i;
5636
5684
  }
5637
- let s = new oo(t, i, r, n, a, o, e);
5685
+ let s = new co(t, i, r, n, a, o, e);
5638
5686
  s.renderSignature = Aa(e || {}), this.layers.set(t, s);
5639
5687
  try {
5640
5688
  return await s.init(), s.destroyed ? (this.layers.delete(t), null) : s;
@@ -5663,20 +5711,20 @@ var oo = class {
5663
5711
  let t = this.layers.get(e);
5664
5712
  t && t.getViewportInfo();
5665
5713
  }
5666
- }(), co = async (e) => so.createLayer(e, !1), lo = (e) => {
5667
- so.removeLayer(e);
5668
- }, uo = (e) => so.getLayer(e);
5714
+ }(), uo = async (e) => lo.createLayer(e, !1), fo = (e) => {
5715
+ lo.removeLayer(e);
5716
+ }, po = (e) => lo.getLayer(e);
5669
5717
  t(() => {
5670
- let e = so.getLayerIds();
5718
+ let e = lo.getLayerIds();
5671
5719
  if (e.length > 0) {
5672
- let t = so.getLayer(e[0]);
5720
+ let t = lo.getLayer(e[0]);
5673
5721
  return t ? t.getCurrentLevel() : 15;
5674
5722
  }
5675
5723
  return 15;
5676
5724
  });
5677
5725
  //#endregion
5678
5726
  //#region src/zz-layer/zz-layer-zzts3d-point/index.vue
5679
- var fo = {
5727
+ var mo = {
5680
5728
  __name: "index",
5681
5729
  props: { config: {
5682
5730
  type: Object,
@@ -5742,8 +5790,8 @@ var fo = {
5742
5790
  let S = async () => {
5743
5791
  let e = ++u, t = _.value;
5744
5792
  if (!t.layerId) return;
5745
- let n = x(t), i = uo(t.layerId);
5746
- if (i && !ja(i.renderSignature, n) ? s.value = i : s.value = await co(n), !(m || e !== u)) {
5793
+ let n = x(t), i = po(t.layerId);
5794
+ if (i && !ja(i.renderSignature, n) ? s.value = i : s.value = await uo(n), !(m || e !== u)) {
5747
5795
  if (l.value && _.value.highlightEnabled && s.value?.setHighlight && s.value.setHighlight(l.value, {
5748
5796
  highlightColor: _.value.highlightColor,
5749
5797
  highlightOpacity: _.value.highlightOpacity,
@@ -5783,7 +5831,7 @@ var fo = {
5783
5831
  }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
5784
5832
  }
5785
5833
  }, C = () => {
5786
- b(), v(), s.value = null, lo(_.value.layerId || i.config.layerId);
5834
+ b(), v(), s.value = null, fo(_.value.layerId || i.config.layerId);
5787
5835
  };
5788
5836
  return w(_, () => {
5789
5837
  S();
@@ -5794,7 +5842,7 @@ var fo = {
5794
5842
  console.log("组件卸载,开始清理资源..."), m = !0, u++, d++, p?.abort(), p = null, C();
5795
5843
  }), (e, t) => null;
5796
5844
  }
5797
- }, po = {
5845
+ }, ho = {
5798
5846
  __name: "queryPoint",
5799
5847
  props: {
5800
5848
  config: {
@@ -5977,7 +6025,7 @@ var fo = {
5977
6025
  C(), x([]);
5978
6026
  }), (e, t) => null;
5979
6027
  }
5980
- }, mo = "__zzts3dGridPickable", ho = {
6028
+ }, go = "__zzts3dGridPickable", _o = {
5981
6029
  __name: "index",
5982
6030
  props: { config: {
5983
6031
  type: Object,
@@ -6077,7 +6125,7 @@ var fo = {
6077
6125
  b && y.remove(b), x && y.remove(x);
6078
6126
  } catch {}
6079
6127
  try {
6080
- b && delete b[mo], x && delete x[mo];
6128
+ b && delete b[go], x && delete x[go];
6081
6129
  } catch {}
6082
6130
  b = null, x = null;
6083
6131
  }
@@ -6096,7 +6144,7 @@ var fo = {
6096
6144
  return t.startsWith("grid_outline_") ? t.slice(13) : t;
6097
6145
  }
6098
6146
  function j() {
6099
- b && (b[mo] = !0), x && (x[mo] = !0);
6147
+ b && (b[go] = !0), x && (x[go] = !0);
6100
6148
  }
6101
6149
  function M(e, t) {
6102
6150
  return Cesium.ColorGeometryInstanceAttribute.toValue(C(e, t));
@@ -6139,7 +6187,7 @@ var fo = {
6139
6187
  if (!t?.length) return null;
6140
6188
  for (let e = 0; e < t.length; e++) {
6141
6189
  let n = t[e], r = n?.primitive;
6142
- if (r && (r[mo] === !0 || r === b || r === x)) return n;
6190
+ if (r && (r[go] === !0 || r === b || r === x)) return n;
6143
6191
  }
6144
6192
  return null;
6145
6193
  }
@@ -6285,11 +6333,11 @@ var fo = {
6285
6333
  p++, m++, v.forEach((e) => e.abort()), v.clear(), _.clear(), h = "", R();
6286
6334
  }), (e, t) => null;
6287
6335
  }
6288
- }, go = (e, t) => {
6336
+ }, vo = (e, t) => {
6289
6337
  let n = e.__vccOpts || e;
6290
6338
  for (let [e, r] of t) n[e] = r;
6291
6339
  return n;
6292
- }, _o = "__zzts3dGridColorPickable", vo = /*#__PURE__*/ go({
6340
+ }, yo = "__zzts3dGridColorPickable", bo = /*#__PURE__*/ vo({
6293
6341
  __name: "color",
6294
6342
  props: { config: {
6295
6343
  type: Object,
@@ -6390,7 +6438,7 @@ var fo = {
6390
6438
  D && E.remove(D), O && E.remove(O);
6391
6439
  } catch {}
6392
6440
  try {
6393
- D && delete D[_o], O && delete O[_o];
6441
+ D && delete D[yo], O && delete O[yo];
6394
6442
  } catch {}
6395
6443
  D = null, O = null;
6396
6444
  }
@@ -6420,7 +6468,7 @@ var fo = {
6420
6468
  return Number.isFinite(r) ? r : -1;
6421
6469
  }
6422
6470
  function ee() {
6423
- D && (D[_o] = !0), O && (O[_o] = !0);
6471
+ D && (D[yo] = !0), O && (O[yo] = !0);
6424
6472
  }
6425
6473
  function te(e, t) {
6426
6474
  return Cesium.ColorGeometryInstanceAttribute.toValue(j(e, t));
@@ -6468,7 +6516,7 @@ var fo = {
6468
6516
  if (!t?.length) return null;
6469
6517
  for (let e = 0; e < t.length; e++) {
6470
6518
  let n = t[e], r = n?.primitive;
6471
- if (r && (r[_o] === !0 || r === D || r === O)) return n;
6519
+ if (r && (r[yo] === !0 || r === D || r === O)) return n;
6472
6520
  }
6473
6521
  return null;
6474
6522
  }
@@ -6635,7 +6683,7 @@ var fo = {
6635
6683
  })
6636
6684
  }, null, 4)) : r("", !0);
6637
6685
  }
6638
- }, [["__scopeId", "data-v-c95c8119"]]), yo = {
6686
+ }, [["__scopeId", "data-v-719d18e0"]]), xo = {
6639
6687
  __name: "query",
6640
6688
  props: {
6641
6689
  config: {
@@ -6868,7 +6916,7 @@ var fo = {
6868
6916
  u++, h.forEach((e) => e.abort()), h.clear(), p.clear(), m.clear(), d = "", D();
6869
6917
  }), (e, t) => null;
6870
6918
  }
6871
- }, bo = {
6919
+ }, So = {
6872
6920
  __name: "interpolation",
6873
6921
  props: { config: {
6874
6922
  type: Object,
@@ -7073,7 +7121,7 @@ var fo = {
7073
7121
  o++, u.forEach((e) => e.abort()), u.clear(), l.clear(), s = "", x();
7074
7122
  }), (e, t) => null;
7075
7123
  }
7076
- }, xo = class {
7124
+ }, Co = class {
7077
7125
  constructor(e, t = !1, n = null, r = "255,255,255", i = "", a = 1, o = "") {
7078
7126
  this.id = e, this.dictCode = o == null ? "" : String(o), this.isStatic = t, this.loadedTiles = /* @__PURE__ */ new Map(), this.currentTileIds = /* @__PURE__ */ new Set(), this.currentNewLevel = g(n || 15), this.gridDb = null, this.entityNum = 0, this.handlers = null, this.requestController = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.fadeAnimations = /* @__PURE__ */ new Map(), this.lastTime = 0, this.serviceType = i, this.opacity = a, this.fixedLevel = n, this.levels_add = window.levels_add_plus || 0, this.tileColor = r, this.tileSleepTime = window.tileSleepTime || 400;
7079
7127
  }
@@ -7451,7 +7499,7 @@ var fo = {
7451
7499
  }
7452
7500
  });
7453
7501
  }
7454
- }, So = new class {
7502
+ }, wo = new class {
7455
7503
  constructor() {
7456
7504
  this.layers = /* @__PURE__ */ new Map();
7457
7505
  }
@@ -7467,7 +7515,7 @@ var fo = {
7467
7515
  }
7468
7516
  return i && (typeof e.clearAllTiles == "function" && e.clearAllTiles(), typeof e.getViewportInfo == "function" && e.getViewportInfo()), this.layers.get(t);
7469
7517
  }
7470
- let c = new xo(t, i, r, n, a, o, s);
7518
+ let c = new Co(t, i, r, n, a, o, s);
7471
7519
  return await c.init(), this.layers.set(t, c), c;
7472
7520
  }
7473
7521
  removeLayer(e) {
@@ -7491,20 +7539,20 @@ var fo = {
7491
7539
  let t = this.layers.get(e);
7492
7540
  t && t.getViewportInfo();
7493
7541
  }
7494
- }(), Co = async (e) => So.createLayer(e, !1), wo = (e) => {
7495
- So.removeLayer(e);
7542
+ }(), To = async (e) => wo.createLayer(e, !1), Eo = (e) => {
7543
+ wo.removeLayer(e);
7496
7544
  };
7497
7545
  t(() => {
7498
- let e = So.getLayerIds();
7546
+ let e = wo.getLayerIds();
7499
7547
  if (e.length > 0) {
7500
- let t = So.getLayer(e[0]);
7548
+ let t = wo.getLayer(e[0]);
7501
7549
  return t ? t.getCurrentLevel() : 15;
7502
7550
  }
7503
7551
  return 15;
7504
7552
  });
7505
7553
  //#endregion
7506
7554
  //#region src/zz-layer/zz-layer-zzts3dtype/index.vue
7507
- var To = {
7555
+ var Do = {
7508
7556
  __name: "index",
7509
7557
  props: { config: {
7510
7558
  type: Object,
@@ -7535,7 +7583,7 @@ var To = {
7535
7583
  console.error("创建图层失败:缺少id参数", i.value);
7536
7584
  return;
7537
7585
  }
7538
- Co({
7586
+ To({
7539
7587
  id: e,
7540
7588
  layerId: i.value.layerId || "",
7541
7589
  dictCode: i.value.layerId || "",
@@ -7546,7 +7594,7 @@ var To = {
7546
7594
  opacity: i.value.opacity
7547
7595
  });
7548
7596
  }, s = () => {
7549
- wo(a());
7597
+ Eo(a());
7550
7598
  };
7551
7599
  return w(i, () => {
7552
7600
  o();
@@ -7556,7 +7604,7 @@ var To = {
7556
7604
  console.log("组件卸载,开始清理资源..."), s();
7557
7605
  }), (e, t) => null;
7558
7606
  }
7559
- }, Eo = {
7607
+ }, Oo = {
7560
7608
  __name: "index",
7561
7609
  props: { config: {
7562
7610
  type: Object,
@@ -7594,7 +7642,7 @@ var To = {
7594
7642
  e && u();
7595
7643
  }), (e, t) => null;
7596
7644
  }
7597
- }, Do = {
7645
+ }, ko = {
7598
7646
  excavations: [],
7599
7647
  globalStyle: {
7600
7648
  show: !0,
@@ -7621,38 +7669,38 @@ var To = {
7621
7669
  maxArea: 5e3 * 1e3 * 1e3,
7622
7670
  maxPerimeter: 5e3 * 1e3
7623
7671
  }
7624
- }, Oo = (e = {}) => ({
7625
- ...Do,
7672
+ }, Ao = (e = {}) => ({
7673
+ ...ko,
7626
7674
  ...e,
7627
7675
  globalStyle: {
7628
- ...Do.globalStyle,
7676
+ ...ko.globalStyle,
7629
7677
  ...e.globalStyle
7630
7678
  },
7631
7679
  limits: {
7632
- ...Do.limits,
7680
+ ...ko.limits,
7633
7681
  ...e.limits
7634
7682
  },
7635
7683
  excavations: e.excavations || []
7636
- }), ko = (e, t, n = 1) => {
7684
+ }), jo = (e, t, n = 1) => {
7637
7685
  try {
7638
7686
  return D.Color.fromCssColorString(e).withAlpha(n);
7639
7687
  } catch {
7640
7688
  return D.Color.fromCssColorString(t).withAlpha(n);
7641
7689
  }
7642
- }, Ao = (e, t, n, r, i) => e ? D.Material.fromType("Image", {
7690
+ }, Mo = (e, t, n, r, i) => e ? D.Material.fromType("Image", {
7643
7691
  image: e,
7644
7692
  color: D.Color.WHITE.withAlpha(n),
7645
7693
  repeat: i || new D.Cartesian2(1, 1)
7646
- }) : D.Material.fromType("Color", { color: ko(t, r, n) }), jo = (e) => {
7694
+ }) : D.Material.fromType("Color", { color: jo(t, r, n) }), No = (e) => {
7647
7695
  if (e.length < 2) return 0;
7648
7696
  let t = 0;
7649
7697
  for (let n = 0; n < e.length - 1; n += 1) t += D.Cartesian3.distance(e[n], e[n + 1]);
7650
7698
  return t;
7651
- }, Mo = (e, t) => {
7699
+ }, Po = (e, t) => {
7652
7700
  if (!e) return;
7653
- let n = jo(t), r = Math.max(Math.ceil(n / 100), 1);
7701
+ let n = No(t), r = Math.max(Math.ceil(n / 100), 1);
7654
7702
  return new D.Cartesian2(r, 1);
7655
- }, No = (e, t, n, r = !1) => {
7703
+ }, Fo = (e, t, n, r = !1) => {
7656
7704
  let i = r ? {
7657
7705
  perPositionHeight: !1,
7658
7706
  heightReference: D.HeightReference.CLAMP_TO_GROUND
@@ -7672,7 +7720,7 @@ var To = {
7672
7720
  clampToGround: r
7673
7721
  }
7674
7722
  });
7675
- }, Po = (e, t, n = !1) => {
7723
+ }, Io = (e, t, n = !1) => {
7676
7724
  let r = n ? {
7677
7725
  perPositionHeight: !1,
7678
7726
  heightReference: D.HeightReference.CLAMP_TO_GROUND
@@ -7692,19 +7740,19 @@ var To = {
7692
7740
  clampToGround: n
7693
7741
  }
7694
7742
  });
7695
- }, Fo = async (e = 260) => {
7743
+ }, Lo = async (e = 260) => {
7696
7744
  await new Promise((t) => window.setTimeout(t, e));
7697
- }, Io = (e, t = e.height || 0) => D.Cartesian3.fromDegrees(e.lng, e.lat, t), Lo = (e) => D.Cartesian3.fromDegrees(e.lng, e.lat), Ro = (e, t) => D.Math.equalsEpsilon(e.lng, t.lng, D.Math.EPSILON12) && D.Math.equalsEpsilon(e.lat, t.lat, D.Math.EPSILON12), zo = (e) => {
7745
+ }, Ro = (e, t = e.height || 0) => D.Cartesian3.fromDegrees(e.lng, e.lat, t), zo = (e) => D.Cartesian3.fromDegrees(e.lng, e.lat), Bo = (e, t) => D.Math.equalsEpsilon(e.lng, t.lng, D.Math.EPSILON12) && D.Math.equalsEpsilon(e.lat, t.lat, D.Math.EPSILON12), Vo = (e) => {
7698
7746
  let t = e.reduce((e, t) => {
7699
7747
  let n = e.at(-1);
7700
- return (!n || !Ro(n, t)) && e.push(t), e;
7748
+ return (!n || !Bo(n, t)) && e.push(t), e;
7701
7749
  }, []);
7702
- return t.length > 1 && Ro(t[0], t[t.length - 1]) && t.pop(), t;
7703
- }, Bo = (e) => e <= 50 ? 5 : e <= 200 ? 10 : e <= 1e3 ? 20 : 50, Vo = (e) => {
7704
- let t = Bo(e);
7750
+ return t.length > 1 && Bo(t[0], t[t.length - 1]) && t.pop(), t;
7751
+ }, Ho = (e) => e <= 50 ? 5 : e <= 200 ? 10 : e <= 1e3 ? 20 : 50, Uo = (e) => {
7752
+ let t = Ho(e);
7705
7753
  return Math.min(Math.max(Math.ceil(e / t), 1), 800);
7706
- }, Ho = (e) => e.map((t, n) => {
7707
- let r = e[(n + 1) % e.length], i = D.Cartographic.fromDegrees(t.lng, t.lat), a = D.Cartographic.fromDegrees(r.lng, r.lat), o = new D.EllipsoidGeodesic(i, a), s = Vo(o.surfaceDistance), c = [t];
7754
+ }, Wo = (e) => e.map((t, n) => {
7755
+ let r = e[(n + 1) % e.length], i = D.Cartographic.fromDegrees(t.lng, t.lat), a = D.Cartographic.fromDegrees(r.lng, r.lat), o = new D.EllipsoidGeodesic(i, a), s = Uo(o.surfaceDistance), c = [t];
7708
7756
  for (let e = 1; e < s; e += 1) {
7709
7757
  let n = e / s, i = o.interpolateUsingFraction(n);
7710
7758
  c.push({
@@ -7714,10 +7762,10 @@ var To = {
7714
7762
  });
7715
7763
  }
7716
7764
  return c.push(r), { points: c };
7717
- }), Uo = (e) => e.flatMap((t, n) => {
7765
+ }), Go = (e) => e.flatMap((t, n) => {
7718
7766
  let r = n === 0 ? t.points : t.points.slice(1);
7719
- return n === e.length - 1 && r.length > 0 && Ro(r[r.length - 1], e[0].points[0]) ? r.slice(0, -1) : r;
7720
- }), Wo = (e) => {
7767
+ return n === e.length - 1 && r.length > 0 && Bo(r[r.length - 1], e[0].points[0]) ? r.slice(0, -1) : r;
7768
+ }), Ko = (e) => {
7721
7769
  if (e.length < 2) return 0;
7722
7770
  let t = 0;
7723
7771
  for (let n = 0; n < e.length; n += 1) {
@@ -7725,10 +7773,10 @@ var To = {
7725
7773
  t += s.surfaceDistance;
7726
7774
  }
7727
7775
  return t;
7728
- }, Go = (e) => {
7776
+ }, qo = (e) => {
7729
7777
  if (e.length < 3) return 0;
7730
7778
  let t = e[0].lng, n = D.Math.toRadians(e.reduce((e, t) => e + t.lat, 0) / e.length), r = D.Ellipsoid.WGS84.maximumRadius, i = e.map((e) => {
7731
- let i = Ko(e.lng, t);
7779
+ let i = Jo(e.lng, t);
7732
7780
  return {
7733
7781
  x: D.Math.toRadians(i) * r * Math.cos(n),
7734
7782
  y: D.Math.toRadians(e.lat) * r
@@ -7739,20 +7787,20 @@ var To = {
7739
7787
  a += t.x * n.y - n.x * t.y;
7740
7788
  }
7741
7789
  return Math.abs(a) / 2;
7742
- }, Ko = (e, t) => {
7790
+ }, Jo = (e, t) => {
7743
7791
  let n = e;
7744
7792
  for (; n - t > 180;) n -= 360;
7745
7793
  for (; n - t < -180;) n += 360;
7746
7794
  return n;
7747
- }, qo = (e) => e >= 1e3 ? `${(e / 1e3).toFixed(2)}公里` : `${Math.round(e)}米`, Jo = (e) => e >= 1e3 * 1e3 ? `${(e / 1e3 / 1e3).toFixed(2)}平方公里` : `${Math.round(e)}平方米`, Yo = (e, t) => {
7748
- let n = Go(e);
7749
- if (t.maxArea > 0 && n > t.maxArea) return `绘制区域过大,面积约 ${Jo(n)},已超过 ${Jo(t.maxArea)},请缩小范围或分块开挖`;
7750
- let r = Wo(e);
7751
- return t.maxPerimeter > 0 && r > t.maxPerimeter ? `绘制区域过大,周长约 ${qo(r)},已超过 ${qo(t.maxPerimeter)},请缩小范围或分块开挖` : "";
7752
- }, Xo = (e, t) => {
7795
+ }, Yo = (e) => e >= 1e3 ? `${(e / 1e3).toFixed(2)}公里` : `${Math.round(e)}米`, Xo = (e) => e >= 1e3 * 1e3 ? `${(e / 1e3 / 1e3).toFixed(2)}平方公里` : `${Math.round(e)}平方米`, Zo = (e, t) => {
7796
+ let n = qo(e);
7797
+ if (t.maxArea > 0 && n > t.maxArea) return `绘制区域过大,面积约 ${Xo(n)},已超过 ${Xo(t.maxArea)},请缩小范围或分块开挖`;
7798
+ let r = Ko(e);
7799
+ return t.maxPerimeter > 0 && r > t.maxPerimeter ? `绘制区域过大,周长约 ${Yo(r)},已超过 ${Yo(t.maxPerimeter)},请缩小范围或分块开挖` : "";
7800
+ }, Qo = (e, t) => {
7753
7801
  let n = t[0], r = 0;
7754
7802
  return e.map((i, a) => {
7755
- let o = a === e.length - 1 && i.points.length > 0 && e[0].points.length > 0 && Ro(i.points[i.points.length - 1], e[0].points[0]), s = i.points.length - (a === 0 ? 0 : 1) - !!o, c = t.slice(r, r + s);
7803
+ let o = a === e.length - 1 && i.points.length > 0 && e[0].points.length > 0 && Bo(i.points[i.points.length - 1], e[0].points[0]), s = i.points.length - (a === 0 ? 0 : 1) - !!o, c = t.slice(r, r + s);
7756
7804
  if (r += s, a === 0) return o ? [...c, n] : c;
7757
7805
  let l = t[r - s - 1];
7758
7806
  return o ? [
@@ -7761,10 +7809,10 @@ var To = {
7761
7809
  n
7762
7810
  ] : [l, ...c];
7763
7811
  });
7764
- }, Zo = (e, t) => {
7812
+ }, $o = (e, t) => {
7765
7813
  let n = Math.min(...e);
7766
7814
  return e.map(() => n - t);
7767
- }, Qo = (e, t, n) => ({
7815
+ }, es = (e, t, n) => ({
7768
7816
  id: e.id || n(),
7769
7817
  positions: e.positions || [],
7770
7818
  height: e.height ?? t.height,
@@ -7781,12 +7829,12 @@ var To = {
7781
7829
  showSide: e.showSide ?? t.showSide,
7782
7830
  showBottom: e.showBottom ?? t.showBottom,
7783
7831
  showEdge: e.showEdge ?? t.showEdge
7784
- }), $o = (e, t) => {
7832
+ }), ts = (e, t) => {
7785
7833
  e.clippingPolygons = t;
7786
- }, es = (e) => new D.ClippingPolygon({ positions: e.map((e) => Lo(e)) }), ts = (e) => new D.ClippingPolygonCollection({
7787
- polygons: e.filter((e) => e.length >= 3).map(es),
7834
+ }, ns = (e) => new D.ClippingPolygon({ positions: e.map((e) => zo(e)) }), rs = (e) => new D.ClippingPolygonCollection({
7835
+ polygons: e.filter((e) => e.length >= 3).map(ns),
7788
7836
  inverse: !1
7789
- }), ns = (e, t, n, r, i) => {
7837
+ }), is = (e, t, n, r, i) => {
7790
7838
  let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = null, l = !1, u = !1, d = !1, f = () => `excavation-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`, p = async (r) => {
7791
7839
  let i = e(), a = t(), o = r.map((e) => D.Cartographic.fromDegrees(e.lng, e.lat));
7792
7840
  if (i && a.sampleTerrain && !(i.terrainProvider instanceof D.EllipsoidTerrainProvider)) try {
@@ -7798,7 +7846,7 @@ var To = {
7798
7846
  let n = o[t], r = i?.scene.globe.getHeight(n);
7799
7847
  return e.height ?? r ?? 0;
7800
7848
  });
7801
- }, m = (e) => Qo(e, t().globalStyle, f), h = (e) => {
7849
+ }, m = (e) => es(e, t().globalStyle, f), h = (e) => {
7802
7850
  let n = t();
7803
7851
  return JSON.stringify({
7804
7852
  item: e,
@@ -7812,9 +7860,9 @@ var To = {
7812
7860
  e.height ?? null
7813
7861
  ])), n = s.get(t);
7814
7862
  if (n) return n;
7815
- let r = Ho(e), i = {
7863
+ let r = Wo(e), i = {
7816
7864
  renderBoundarySegments: r,
7817
- renderBoundaryPositions: Uo(r),
7865
+ renderBoundaryPositions: Go(r),
7818
7866
  clipBoundaryPositions: e,
7819
7867
  bottomBoundaryPositions: e
7820
7868
  };
@@ -7827,13 +7875,13 @@ var To = {
7827
7875
  y();
7828
7876
  return;
7829
7877
  }
7830
- l ||= (c = n.scene.globe.clippingPolygons, !0), $o(n.scene.globe, ts(i)), n.scene.requestRender();
7878
+ l ||= (c = n.scene.globe.clippingPolygons, !0), ts(n.scene.globe, rs(i)), n.scene.requestRender();
7831
7879
  }, v = () => {
7832
7880
  let n = e(), r = t();
7833
7881
  n && (d ||= (u = n.scene.globe.depthTestAgainstTerrain, !0), n.scene.globe.depthTestAgainstTerrain = r.depthTestAgainstTerrain, n.scene.requestRender());
7834
7882
  }, y = () => {
7835
7883
  let t = e();
7836
- t && (l &&= ($o(t.scene.globe, c || void 0), c = null, !1), t.scene.requestRender());
7884
+ t && (l &&= (ts(t.scene.globe, c || void 0), c = null, !1), t.scene.requestRender());
7837
7885
  }, b = () => {
7838
7886
  let t = e();
7839
7887
  !t || !d || (t.scene.globe.depthTestAgainstTerrain = u, d = !1, t.scene.requestRender());
@@ -7843,10 +7891,10 @@ var To = {
7843
7891
  }, S = async (r) => {
7844
7892
  let a = e();
7845
7893
  if (!a) return null;
7846
- let o = m(r), s = zo(o.positions);
7894
+ let o = m(r), s = Vo(o.positions);
7847
7895
  if (!s || s.length < 3) return n("excavation-error", /* @__PURE__ */ Error("地形开挖至少需要 3 个多边形点位")), null;
7848
7896
  let c = (e) => {
7849
- let r = Po(a, s.map((e) => Io(e, e.height || 0)), t().depthTestAgainstTerrain);
7897
+ let r = Io(a, s.map((e) => Ro(e, e.height || 0)), t().depthTestAgainstTerrain);
7850
7898
  return r.show = o.show, a.scene.requestRender(), n("excavation-error", Error(e)), P.warning(e), {
7851
7899
  item: {
7852
7900
  ...o,
@@ -7856,14 +7904,14 @@ var To = {
7856
7904
  primitives: [],
7857
7905
  terrainClipEnabled: !1
7858
7906
  };
7859
- }, l = Yo(s, t().limits);
7907
+ }, l = Zo(s, t().limits);
7860
7908
  if (l) return c(l);
7861
- let { renderBoundarySegments: u, renderBoundaryPositions: d, bottomBoundaryPositions: f } = g(s), h = No(a, o.id, s.map((e) => Io(e, e.height || 0)), t().depthTestAgainstTerrain);
7909
+ let { renderBoundarySegments: u, renderBoundaryPositions: d, bottomBoundaryPositions: f } = g(s), h = Fo(a, o.id, s.map((e) => Ro(e, e.height || 0)), t().depthTestAgainstTerrain);
7862
7910
  a.scene.requestRender();
7863
7911
  let _ = [], v = [];
7864
7912
  try {
7865
- await Promise.all([Fo(), i?.() || Promise.resolve()]);
7866
- let e = await p(d), t = Zo(e, o.height), n = Math.min(...e) - o.height, r = f.map((e) => Io(e, n)), s = d.map((t, n) => Io(t, e[n])), c = Xo(u, e), l = Xo(u, t), m = D.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, h = {
7913
+ await Promise.all([Lo(), i?.() || Promise.resolve()]);
7914
+ let e = await p(d), t = $o(e, o.height), n = Math.min(...e) - o.height, r = f.map((e) => Ro(e, n)), s = d.map((t, n) => Ro(t, e[n])), c = Qo(u, e), l = Qo(u, t), m = D.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, h = {
7867
7915
  depthTest: { enabled: !0 },
7868
7916
  depthMask: !0
7869
7917
  };
@@ -7879,7 +7927,7 @@ var To = {
7879
7927
  })
7880
7928
  }),
7881
7929
  appearance: new D.MaterialAppearance({
7882
- material: Ao(o.bottomTexture, o.bottomColor, o.bottomOpacity, Do.globalStyle.bottomColor),
7930
+ material: Mo(o.bottomTexture, o.bottomColor, o.bottomOpacity, ko.globalStyle.bottomColor),
7883
7931
  materialSupport: D.MaterialAppearance.MaterialSupport.TEXTURED,
7884
7932
  faceForward: !0,
7885
7933
  renderState: h
@@ -7889,7 +7937,7 @@ var To = {
7889
7937
  v.push(e);
7890
7938
  }
7891
7939
  if (o.showSide) for (let e = 0; e < u.length; e += 1) {
7892
- let t = u[e].points.map((e) => Io(e)), n = l[e], r = c[e], i = Mo(o.sideTexture, t), s = a.scene.primitives.add(new D.Primitive({
7940
+ let t = u[e].points.map((e) => Ro(e)), n = l[e], r = c[e], i = Po(o.sideTexture, t), s = a.scene.primitives.add(new D.Primitive({
7893
7941
  show: !1,
7894
7942
  geometryInstances: new D.GeometryInstance({
7895
7943
  id: `${o.id}-wall-${e}`,
@@ -7901,7 +7949,7 @@ var To = {
7901
7949
  })
7902
7950
  }),
7903
7951
  appearance: new D.MaterialAppearance({
7904
- material: Ao(o.sideTexture, o.sideColor, o.sideOpacity, Do.globalStyle.bottomColor, i),
7952
+ material: Mo(o.sideTexture, o.sideColor, o.sideOpacity, ko.globalStyle.bottomColor, i),
7905
7953
  materialSupport: D.MaterialAppearance.MaterialSupport.TEXTURED,
7906
7954
  faceForward: !0,
7907
7955
  renderState: h
@@ -7917,7 +7965,7 @@ var To = {
7917
7965
  polyline: {
7918
7966
  positions: e,
7919
7967
  width: o.edgeWidth,
7920
- material: ko(o.edgeColor, Do.globalStyle.bottomColor, o.edgeOpacity),
7968
+ material: jo(o.edgeColor, ko.globalStyle.bottomColor, o.edgeOpacity),
7921
7969
  clampToGround: !1
7922
7970
  }
7923
7971
  });
@@ -7986,7 +8034,7 @@ var To = {
7986
8034
  for (let t of i.excavations) {
7987
8035
  let n = m(t), r = {
7988
8036
  ...n,
7989
- positions: zo(n.positions)
8037
+ positions: Vo(n.positions)
7990
8038
  }, i = h(r), o = r.id;
7991
8039
  s.add(o);
7992
8040
  let c = a.get(o);
@@ -8033,7 +8081,7 @@ var To = {
8033
8081
  restoreDepthTestAgainstTerrain: b,
8034
8082
  getMethods: A
8035
8083
  };
8036
- }, rs = /* @__PURE__ */ s({
8084
+ }, as = /* @__PURE__ */ s({
8037
8085
  __name: "index",
8038
8086
  props: { config: {} },
8039
8087
  emits: [
@@ -8044,7 +8092,7 @@ var To = {
8044
8092
  "excavation-error"
8045
8093
  ],
8046
8094
  setup(e, { expose: n, emit: r }) {
8047
- let i = c("cesiumViewer"), a = r, o = e, s = t(() => Oo(o.config)), l = () => i?.value, u = () => {
8095
+ let i = c("cesiumViewer"), a = r, o = e, s = t(() => Ao(o.config)), l = () => i?.value, u = () => {
8048
8096
  let e = l();
8049
8097
  return e ? !(e.terrainProvider instanceof D.EllipsoidTerrainProvider) : !1;
8050
8098
  }, d = t(() => JSON.stringify({
@@ -8062,7 +8110,7 @@ var To = {
8062
8110
  });
8063
8111
  }, b = () => {
8064
8112
  !v() || _.size === 0 || (_.forEach((e) => e()), _.clear());
8065
- }, x = ns(l, () => s.value, p, () => m, y);
8113
+ }, x = is(l, () => s.value, p, () => m, y);
8066
8114
  m = x.getMethods();
8067
8115
  let S = async (e) => {
8068
8116
  l() && await x.syncExcavations(e);
@@ -8090,7 +8138,7 @@ var To = {
8090
8138
  _.clear(), h?.(), h = null, x.clearExcavations(), x.restoreDepthTestAgainstTerrain();
8091
8139
  }), n(m), (e, t) => null;
8092
8140
  }
8093
- }), is = {
8141
+ }), os = {
8094
8142
  __name: "index",
8095
8143
  props: {
8096
8144
  config: {
@@ -8149,7 +8197,7 @@ var To = {
8149
8197
  u();
8150
8198
  }), (e, t) => null;
8151
8199
  }
8152
- }, as = {
8200
+ }, ss = {
8153
8201
  __name: "index",
8154
8202
  props: { config: {
8155
8203
  type: Object,
@@ -8213,7 +8261,7 @@ var To = {
8213
8261
  u();
8214
8262
  }), (e, t) => null;
8215
8263
  }
8216
- }, os = {
8264
+ }, cs = {
8217
8265
  __name: "index",
8218
8266
  props: { config: {
8219
8267
  type: Object,
@@ -8402,7 +8450,7 @@ var To = {
8402
8450
  b();
8403
8451
  }), (e, t) => null;
8404
8452
  }
8405
- }, ss = {
8453
+ }, ls = {
8406
8454
  __name: "index",
8407
8455
  props: { config: {
8408
8456
  type: Object,
@@ -8589,7 +8637,7 @@ var To = {
8589
8637
  b();
8590
8638
  }), (e, t) => null;
8591
8639
  }
8592
- }, cs = {
8640
+ }, us = {
8593
8641
  __name: "index",
8594
8642
  props: { config: {
8595
8643
  type: Object,
@@ -8789,16 +8837,16 @@ var To = {
8789
8837
  b();
8790
8838
  }), (e, t) => null;
8791
8839
  }
8792
- }, ls = { class: "legend-panel__header" }, us = { class: "legend-panel__title" }, ds = { class: "legend-panel__body" }, fs = {
8840
+ }, ds = { class: "legend-panel__header" }, fs = { class: "legend-panel__title" }, ps = { class: "legend-panel__body" }, ms = {
8793
8841
  key: 0,
8794
8842
  class: "legend-panel__multiband"
8795
- }, ps = { class: "legend-panel__multiband-labels" }, ms = { class: "legend-panel__multiband-label legend-panel__multiband-label--top" }, hs = { class: "legend-panel__multiband-label legend-panel__multiband-label--bottom" }, gs = {
8843
+ }, hs = { class: "legend-panel__multiband-labels" }, gs = { class: "legend-panel__multiband-label legend-panel__multiband-label--top" }, _s = { class: "legend-panel__multiband-label legend-panel__multiband-label--bottom" }, vs = {
8796
8844
  key: 1,
8797
8845
  class: "legend-panel__list"
8798
- }, _s = {
8846
+ }, ys = {
8799
8847
  key: 0,
8800
8848
  class: "legend-panel__symbol legend-panel__symbol--line"
8801
- }, vs = { class: "legend-panel__label" }, ys = /* @__PURE__ */ s({
8849
+ }, bs = { class: "legend-panel__label" }, xs = /* @__PURE__ */ s({
8802
8850
  __name: "index",
8803
8851
  props: {
8804
8852
  visible: { type: Boolean },
@@ -8884,7 +8932,7 @@ var To = {
8884
8932
  return s.visible ? (p(), i("div", {
8885
8933
  key: 0,
8886
8934
  class: l(["legend-panel", g.value])
8887
- }, [a("div", ls, [a("span", us, x(v.value), 1), o(f, {
8935
+ }, [a("div", ds, [a("span", fs, x(v.value), 1), o(f, {
8888
8936
  text: "",
8889
8937
  size: "small",
8890
8938
  class: "legend-panel__toggle",
@@ -8895,14 +8943,14 @@ var To = {
8895
8943
  _: 1
8896
8944
  })]),
8897
8945
  _: 1
8898
- })]), a("div", ds, [c[1] ||= a("div", { class: "legend-panel__section-title" }, "图例", -1), S.value && w.value ? (p(), i("div", fs, [a("div", {
8946
+ })]), a("div", ps, [c[1] ||= a("div", { class: "legend-panel__section-title" }, "图例", -1), S.value && w.value ? (p(), i("div", ms, [a("div", {
8899
8947
  class: "legend-panel__multiband-bar",
8900
8948
  style: u(M.value)
8901
- }, null, 4), a("div", ps, [a("div", ms, x(w.value.MultibandValueNameTop), 1), a("div", hs, x(w.value.MultibandValueNameBot), 1)])])) : D.value.length ? (p(), i("div", gs, [(p(!0), i(e, null, _(D.value, (e, t) => (p(), i("div", {
8949
+ }, null, 4), a("div", hs, [a("div", gs, x(w.value.MultibandValueNameTop), 1), a("div", _s, x(w.value.MultibandValueNameBot), 1)])])) : D.value.length ? (p(), i("div", vs, [(p(!0), i(e, null, _(D.value, (e, t) => (p(), i("div", {
8902
8950
  key: R(e, t),
8903
8951
  class: l(["legend-panel__item", { "is-item-hidden": O.value && A(e) }])
8904
8952
  }, [
8905
- P(e) === "line" ? (p(), i("div", _s, [a("span", {
8953
+ P(e) === "line" ? (p(), i("div", ys, [a("span", {
8906
8954
  class: "legend-panel__line-bar",
8907
8955
  style: u(te(e))
8908
8956
  }, null, 4)])) : (p(), i("div", {
@@ -8910,7 +8958,7 @@ var To = {
8910
8958
  class: l(["legend-panel__symbol", N(e)]),
8911
8959
  style: u(ne(e))
8912
8960
  }, null, 6)),
8913
- a("div", vs, x(e.valueName || "-"), 1),
8961
+ a("div", bs, x(e.valueName || "-"), 1),
8914
8962
  O.value ? (p(), n(m, {
8915
8963
  key: 2,
8916
8964
  content: A(e) ? "显示" : "隐藏",
@@ -8933,8 +8981,8 @@ var To = {
8933
8981
  }))])], 2)) : r("", !0);
8934
8982
  };
8935
8983
  }
8936
- }), bs = (e) => {
8937
- e.component("zzViewer", xe), e.component("zz-viewer", xe), e.component("zzLayerWmts", Fe), e.component("zz-layer-wmts", Fe), e.component("zzLayerXyz", Ie), e.component("zz-layer-xyz", Ie), e.component("zzLayerWms", Le), e.component("zz-layer-wms", Le), e.component("zzLayerZzts", ze), e.component("zz-layer-zzts", ze), e.component("zzLayerZzts3d", za), e.component("zz-layer-zzts3d", za), e.component("zzLayerShpZzts", Ja), e.component("zz-layer-shp-zzts", Ja), e.component("zzLayerZzts3dPoint", fo), e.component("zz-layer-zzts3d-point", fo), e.component("zzLayerZzts3dPointQuery", po), e.component("zz-layer-zzts3d-point-query", po), e.component("zzLayerZzts3dGrid", ho), e.component("zz-layer-zzts3d-grid", ho), e.component("zzLayerZzts3dGridColor", vo), e.component("zz-layer-zzts3d-grid-color", vo), e.component("zzLayerZzts3dGridQuery", yo), e.component("zz-layer-zzts3d-grid-query", yo), e.component("zzLayerZzts3dGridInterpolation", bo), e.component("zz-layer-zzts3d-grid-interpolation", bo), e.component("zzLayerZzts3dtwintype", To), e.component("zz-layer-zzts3dtwintype", To), e.component("zzLayerGeojson", Be), e.component("zz-layer-geojson", Be), e.component("zzLayerMvt", He), e.component("zz-layer-mvt", He), e.component("zzTerrain", Eo), e.component("zz-terrain", Eo), e.component("zzTerrainExcavation", rs), e.component("zz-terrain-excavation", rs), e.component("zz3dtiles", is), e.component("zz-3dtiles", is), e.component("zzGltf", as), e.component("zz-gltf", as), e.component("zzEntityPoint", os), e.component("zz-entity-point", os), e.component("zzEntityPolyline", ss), e.component("zz-entity-polyline", ss), e.component("zzEntityPolygon", cs), e.component("zz-entity-polygon", cs), e.component("zzLegend", ys), e.component("zz-legend", ys);
8984
+ }), Ss = (e) => {
8985
+ e.component("zzViewer", xe), e.component("zz-viewer", xe), e.component("zzLayerWmts", Fe), e.component("zz-layer-wmts", Fe), e.component("zzLayerXyz", Ie), e.component("zz-layer-xyz", Ie), e.component("zzLayerWms", Le), e.component("zz-layer-wms", Le), e.component("zzLayerZzts", ze), e.component("zz-layer-zzts", ze), e.component("zzLayerZzts3d", za), e.component("zz-layer-zzts3d", za), e.component("zzLayerShpZzts", Xa), e.component("zz-layer-shp-zzts", Xa), e.component("zzLayerZzts3dPoint", mo), e.component("zz-layer-zzts3d-point", mo), e.component("zzLayerZzts3dPointQuery", ho), e.component("zz-layer-zzts3d-point-query", ho), e.component("zzLayerZzts3dGrid", _o), e.component("zz-layer-zzts3d-grid", _o), e.component("zzLayerZzts3dGridColor", bo), e.component("zz-layer-zzts3d-grid-color", bo), e.component("zzLayerZzts3dGridQuery", xo), e.component("zz-layer-zzts3d-grid-query", xo), e.component("zzLayerZzts3dGridInterpolation", So), e.component("zz-layer-zzts3d-grid-interpolation", So), e.component("zzLayerZzts3dtwintype", Do), e.component("zz-layer-zzts3dtwintype", Do), e.component("zzLayerGeojson", Be), e.component("zz-layer-geojson", Be), e.component("zzLayerMvt", He), e.component("zz-layer-mvt", He), e.component("zzTerrain", Oo), e.component("zz-terrain", Oo), e.component("zzTerrainExcavation", as), e.component("zz-terrain-excavation", as), e.component("zz3dtiles", os), e.component("zz-3dtiles", os), e.component("zzGltf", ss), e.component("zz-gltf", ss), e.component("zzEntityPoint", cs), e.component("zz-entity-point", cs), e.component("zzEntityPolyline", ls), e.component("zz-entity-polyline", ls), e.component("zzEntityPolygon", us), e.component("zz-entity-polygon", us), e.component("zzLegend", xs), e.component("zz-legend", xs);
8938
8986
  };
8939
8987
  //#endregion
8940
- export { R as LAYER_TYPE_BAND, ve as addImageryLayerWithStackIndex, ye as addPrimitiveWithStackIndex, he as applyImageryStackIndex, _e as applyPrimitiveStackIndex, bs as default, oe as moveImageryLayerToIndex, ge as moveImageryLayersToStackIndex, ce as movePrimitiveToIndex, pe as scheduleImageryLayerStackSync, me as schedulePrimitiveStackSync, le as syncImageryLayerStack, ue as syncPrimitiveStack, B as tagImageryLayerStackMeta, ae as tagPrimitiveStackMeta, is as zz3dtiles, os as zzEntityPoint, cs as zzEntityPolygon, ss as zzEntityPolyline, as as zzGltf, Be as zzLayerGeojson, He as zzLayerMvt, Ja as zzLayerShpZzts, Le as zzLayerWms, Fe as zzLayerWmts, Ie as zzLayerXyz, ze as zzLayerZzts, ys as zzLegendPanel, Eo as zzTerrain, rs as zzTerrainExcavation, xe as zzViewer };
8988
+ export { R as LAYER_TYPE_BAND, ve as addImageryLayerWithStackIndex, ye as addPrimitiveWithStackIndex, he as applyImageryStackIndex, _e as applyPrimitiveStackIndex, Ss as default, oe as moveImageryLayerToIndex, ge as moveImageryLayersToStackIndex, ce as movePrimitiveToIndex, pe as scheduleImageryLayerStackSync, me as schedulePrimitiveStackSync, le as syncImageryLayerStack, ue as syncPrimitiveStack, B as tagImageryLayerStackMeta, ae as tagPrimitiveStackMeta, os as zz3dtiles, cs as zzEntityPoint, us as zzEntityPolygon, ls as zzEntityPolyline, ss as zzGltf, Be as zzLayerGeojson, He as zzLayerMvt, Xa as zzLayerShpZzts, Le as zzLayerWms, Fe as zzLayerWmts, Ie as zzLayerXyz, ze as zzLayerZzts, xs as zzLegendPanel, Oo as zzTerrain, as as zzTerrainExcavation, xe as zzViewer };