leiting-bim 2.2.66 → 2.2.67

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.
@@ -1,24 +1,24 @@
1
- import { p as ht, c as Me, w as le } from "./create-DynflqE1.js";
2
- import { defineComponent as se, computed as m, openBlock as E, createElementBlock as H, normalizeStyle as $, normalizeClass as T, unref as M, toDisplayString as dt, createCommentVNode as te, createElementVNode as we, h as O, markRaw as P, render as X, inject as mt, onMounted as Te, watch as z, onUnmounted as yt, renderSlot as pt, ref as G, nextTick as bt, onBeforeUnmount as vt, createBlock as xt, resolveDynamicComponent as Ct } from "vue";
3
- import { MaterialManager as Se, MarkerEventBus as K, HtmlOverlayLabelPool as Q, BufferedHierarchicalAggregator as Mt, EntityLayerManager as wt, getPolylineFlowMaterialProperty as Tt, getDynamicImgMaterial as St, getWallMaterial as Le, MarkerEventKey as ee } from "leiting-bim/plugins-methods";
1
+ import { p as dt, c as we, w as le } from "./create-DynflqE1.js";
2
+ import { defineComponent as se, computed as m, openBlock as E, createElementBlock as D, normalizeStyle as $, normalizeClass as T, unref as M, toDisplayString as mt, createCommentVNode as te, createElementVNode as Te, h as O, markRaw as P, render as X, inject as yt, onMounted as Se, watch as Y, onUnmounted as pt, renderSlot as bt, ref as G, nextTick as vt, onBeforeUnmount as xt, createBlock as Ct, resolveDynamicComponent as Mt } from "vue";
3
+ import { MaterialManager as Le, MarkerEventBus as K, HtmlOverlayLabelPool as Q, BufferedHierarchicalAggregator as wt, EntityLayerManager as Tt, getPolylineFlowMaterialProperty as St, getDynamicImgMaterial as Lt, getWallMaterial as Oe, MarkerEventKey as ee } from "leiting-bim/plugins-methods";
4
4
  import { CxCardCarousel as ye } from "./components/card-carousel.js";
5
- import { CxMarkerBubbleLine as Oe, CxMarkerBubble as Pe } from "./components/marker-bubble.js";
5
+ import { CxMarkerBubbleLine as Pe, CxMarkerBubble as Ee } from "./components/marker-bubble.js";
6
6
  import { CxMarkerDefault as re } from "./components/marker-default.js";
7
- import { CxMarkerHtml as Lt } from "./components/marker-html.js";
8
- import { CxMarkerText as Ee } from "./components/marker-text.js";
9
- import { i as ce, b as Ie, a as S, S as V, d as pe, c as ue, e as _e, f as Ot, g as Ae, M as Ne, h as ae, j as Pt, k as Et, l as It, m as ke, n as He, o as _t, p as At, q as Nt, r as kt, s as Ht, t as Fe, u as Ft, v as Dt, w as Rt, x as Wt } from "./index-DcRdyqU6.js";
10
- const Bt = {
7
+ import { CxMarkerHtml as Ot } from "./components/marker-html.js";
8
+ import { CxMarkerText as _e } from "./components/marker-text.js";
9
+ import { i as ce, b as Ie, a as S, S as V, d as pe, c as ue, e as Ae, f as Pt, g as Ne, M as ke, h as ae, j as Et, k as _t, l as It, m as De, n as He, o as At, p as Nt, q as kt, r as Dt, s as Ht, t as Fe, u as Ft, v as Rt, w as Wt, x as Bt } from "./index-DcRdyqU6.js";
10
+ const Gt = {
11
11
  text: { type: String, default: "" },
12
12
  svg: { type: Object, default: () => ({}) },
13
13
  textStyle: { type: Object, default: () => ({}) },
14
14
  textPosition: { type: String, default: "top" },
15
15
  textGap: { type: Number, default: 8 }
16
- }, Gt = /* @__PURE__ */ se({
17
- name: `${ht}-marker-svg`,
16
+ }, $t = /* @__PURE__ */ se({
17
+ name: `${dt}-marker-svg`,
18
18
  __name: "MarkerSvg",
19
- props: Bt,
19
+ props: Gt,
20
20
  setup(t) {
21
- const e = t, r = Me("marker"), a = (u, h, b, p) => {
21
+ const e = t, r = we("marker"), a = (u, h, b, p) => {
22
22
  const w = Number(u);
23
23
  return Number.isFinite(w) ? Math.min(p, Math.max(b, w)) : h;
24
24
  }, n = m(() => a(e.svg.height, 48, 16, 160)), i = m(() => a(e.svg.width, n.value, 1, 320)), o = m(() => a(e.textGap, 8, 0, 80)), l = m(
@@ -51,23 +51,23 @@ const Bt = {
51
51
  }[l.value],
52
52
  ...e.textStyle
53
53
  }));
54
- return (u, h) => (E(), H("div", {
54
+ return (u, h) => (E(), D("div", {
55
55
  class: T(M(r).b("svg")),
56
56
  style: $(c.value)
57
57
  }, [
58
- u.text && u.textStyle.display !== "none" ? (E(), H("span", {
58
+ u.text && u.textStyle.display !== "none" ? (E(), D("span", {
59
59
  key: 0,
60
60
  class: T(M(r).be("svg", "text")),
61
61
  style: $(s.value)
62
- }, dt(u.text), 7)) : te("", !0),
63
- we("span", {
62
+ }, mt(u.text), 7)) : te("", !0),
63
+ Te("span", {
64
64
  class: T(M(r).be("svg", "image")),
65
65
  style: $(f.value),
66
66
  "aria-hidden": "true"
67
67
  }, null, 6)
68
68
  ], 6));
69
69
  }
70
- }), De = le(Gt), $t = {
70
+ }), Re = le($t), Xt = {
71
71
  id: { type: String, default: "marker" },
72
72
  Cesium: { type: Object },
73
73
  viewer: { type: Object },
@@ -78,30 +78,30 @@ const Bt = {
78
78
  themeConfig: { type: Object }
79
79
  // Optional override
80
80
  };
81
- var Y = /* @__PURE__ */ ((t) => (t.左建选中模型 = "MODEL_LEFT_CLICK", t.标记左键点击 = "TAG_LEFT_CLICK", t.标记移入 = "TAG_MOUSEENTER", t.标记移出 = "TAG_MOUSELEAVE", t.模型位置保存 = "SAVE_REGION", t.模型加载完成 = "MODEL_READY", t))(Y || {}), Xt = "[object Symbol]";
81
+ var z = /* @__PURE__ */ ((t) => (t.左建选中模型 = "MODEL_LEFT_CLICK", t.标记左键点击 = "TAG_LEFT_CLICK", t.标记移入 = "TAG_MOUSEENTER", t.标记移出 = "TAG_MOUSELEAVE", t.模型位置保存 = "SAVE_REGION", t.模型加载完成 = "MODEL_READY", t))(z || {}), Kt = "[object Symbol]";
82
82
  function fe(t) {
83
- return typeof t == "symbol" || ce(t) && Ie(t) == Xt;
83
+ return typeof t == "symbol" || ce(t) && Ie(t) == Kt;
84
84
  }
85
- function Re(t, e) {
85
+ function We(t, e) {
86
86
  for (var r = -1, a = t == null ? 0 : t.length, n = Array(a); ++r < a; )
87
87
  n[r] = e(t[r], r, t);
88
88
  return n;
89
89
  }
90
90
  var be = V ? V.prototype : void 0, ve = be ? be.toString : void 0;
91
- function We(t) {
91
+ function Be(t) {
92
92
  if (typeof t == "string")
93
93
  return t;
94
94
  if (S(t))
95
- return Re(t, We) + "";
95
+ return We(t, Be) + "";
96
96
  if (fe(t))
97
97
  return ve ? ve.call(t) : "";
98
98
  var e = t + "";
99
99
  return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
100
100
  }
101
- function Be(t) {
101
+ function Ge(t) {
102
102
  return t;
103
103
  }
104
- function Kt(t, e, r) {
104
+ function zt(t, e, r) {
105
105
  switch (r.length) {
106
106
  case 0:
107
107
  return t.call(e);
@@ -114,11 +114,11 @@ function Kt(t, e, r) {
114
114
  }
115
115
  return t.apply(e, r);
116
116
  }
117
- var Yt = 800, zt = 16, Vt = Date.now;
118
- function qt(t) {
117
+ var Yt = 800, Vt = 16, qt = Date.now;
118
+ function Ut(t) {
119
119
  var e = 0, r = 0;
120
120
  return function() {
121
- var a = Vt(), n = zt - (a - r);
121
+ var a = qt(), n = Vt - (a - r);
122
122
  if (r = a, n > 0) {
123
123
  if (++e >= Yt)
124
124
  return arguments[0];
@@ -127,59 +127,59 @@ function qt(t) {
127
127
  return t.apply(void 0, arguments);
128
128
  };
129
129
  }
130
- function Ut(t) {
130
+ function jt(t) {
131
131
  return function() {
132
132
  return t;
133
133
  };
134
134
  }
135
- var jt = pe ? function(t, e) {
135
+ var Zt = pe ? function(t, e) {
136
136
  return pe(t, "toString", {
137
137
  configurable: !0,
138
138
  enumerable: !1,
139
- value: Ut(e),
139
+ value: jt(e),
140
140
  writable: !0
141
141
  });
142
- } : Be, Ge = qt(jt), xe = Math.max;
143
- function $e(t, e, r) {
142
+ } : Ge, $e = Ut(Zt), xe = Math.max;
143
+ function Xe(t, e, r) {
144
144
  return e = xe(e === void 0 ? t.length - 1 : e, 0), function() {
145
145
  for (var a = arguments, n = -1, i = xe(a.length - e, 0), o = Array(i); ++n < i; )
146
146
  o[n] = a[e + n];
147
147
  n = -1;
148
148
  for (var l = Array(e + 1); ++n < e; )
149
149
  l[n] = a[n];
150
- return l[e] = r(o), Kt(t, this, l);
150
+ return l[e] = r(o), zt(t, this, l);
151
151
  };
152
152
  }
153
- function Zt(t, e) {
154
- return Ge($e(t, e, Be), t + "");
153
+ function Jt(t, e) {
154
+ return $e(Xe(t, e, Ge), t + "");
155
155
  }
156
- function Jt(t, e, r) {
156
+ function Qt(t, e, r) {
157
157
  if (!ue(r))
158
158
  return !1;
159
159
  var a = typeof e;
160
- return (a == "number" ? _e(r) && Ot(e, r.length) : a == "string" && e in r) ? Ae(r[e], t) : !1;
160
+ return (a == "number" ? Ae(r) && Pt(e, r.length) : a == "string" && e in r) ? Ne(r[e], t) : !1;
161
161
  }
162
- function Qt(t) {
163
- return Zt(function(e, r) {
162
+ function er(t) {
163
+ return Jt(function(e, r) {
164
164
  var a = -1, n = r.length, i = n > 1 ? r[n - 1] : void 0, o = n > 2 ? r[2] : void 0;
165
- for (i = t.length > 3 && typeof i == "function" ? (n--, i) : void 0, o && Jt(r[0], r[1], o) && (i = n < 3 ? void 0 : i, n = 1), e = Object(e); ++a < n; ) {
165
+ for (i = t.length > 3 && typeof i == "function" ? (n--, i) : void 0, o && Qt(r[0], r[1], o) && (i = n < 3 ? void 0 : i, n = 1), e = Object(e); ++a < n; ) {
166
166
  var l = r[a];
167
167
  l && t(e, l, a, i);
168
168
  }
169
169
  return e;
170
170
  });
171
171
  }
172
- var er = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, tr = /^\w*$/;
173
- function rr(t, e) {
172
+ var tr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, rr = /^\w*$/;
173
+ function ar(t, e) {
174
174
  if (S(t))
175
175
  return !1;
176
176
  var r = typeof t;
177
- return r == "number" || r == "symbol" || r == "boolean" || t == null || fe(t) ? !0 : tr.test(t) || !er.test(t) || e != null && t in Object(e);
177
+ return r == "number" || r == "symbol" || r == "boolean" || t == null || fe(t) ? !0 : rr.test(t) || !tr.test(t) || e != null && t in Object(e);
178
178
  }
179
- var ar = "Expected a function";
179
+ var nr = "Expected a function";
180
180
  function ge(t, e) {
181
181
  if (typeof t != "function" || e != null && typeof e != "function")
182
- throw new TypeError(ar);
182
+ throw new TypeError(nr);
183
183
  var r = function() {
184
184
  var a = arguments, n = e ? e.apply(this, a) : a[0], i = r.cache;
185
185
  if (i.has(n))
@@ -187,27 +187,27 @@ function ge(t, e) {
187
187
  var o = t.apply(this, a);
188
188
  return r.cache = i.set(n, o) || i, o;
189
189
  };
190
- return r.cache = new (ge.Cache || Ne)(), r;
190
+ return r.cache = new (ge.Cache || ke)(), r;
191
191
  }
192
- ge.Cache = Ne;
193
- var nr = 500;
194
- function ir(t) {
192
+ ge.Cache = ke;
193
+ var ir = 500;
194
+ function or(t) {
195
195
  var e = ge(t, function(a) {
196
- return r.size === nr && r.clear(), a;
196
+ return r.size === ir && r.clear(), a;
197
197
  }), r = e.cache;
198
198
  return e;
199
199
  }
200
- var or = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, lr = /\\(\\)?/g, sr = ir(function(t) {
200
+ var lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, sr = /\\(\\)?/g, cr = or(function(t) {
201
201
  var e = [];
202
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(or, function(r, a, n, i) {
203
- e.push(n ? i.replace(lr, "$1") : a || r);
202
+ return t.charCodeAt(0) === 46 && e.push(""), t.replace(lr, function(r, a, n, i) {
203
+ e.push(n ? i.replace(sr, "$1") : a || r);
204
204
  }), e;
205
205
  });
206
- function cr(t) {
207
- return t == null ? "" : We(t);
206
+ function ur(t) {
207
+ return t == null ? "" : Be(t);
208
208
  }
209
209
  function he(t, e) {
210
- return S(t) ? t : rr(t, e) ? [t] : sr(cr(t));
210
+ return S(t) ? t : ar(t, e) ? [t] : cr(ur(t));
211
211
  }
212
212
  function ne(t) {
213
213
  if (typeof t == "string" || fe(t))
@@ -215,49 +215,49 @@ function ne(t) {
215
215
  var e = t + "";
216
216
  return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
217
217
  }
218
- function ur(t, e) {
218
+ function fr(t, e) {
219
219
  e = he(e, t);
220
220
  for (var r = 0, a = e.length; t != null && r < a; )
221
221
  t = t[ne(e[r++])];
222
222
  return r && r == a ? t : void 0;
223
223
  }
224
224
  var Ce = V ? V.isConcatSpreadable : void 0;
225
- function fr(t) {
225
+ function gr(t) {
226
226
  return S(t) || ae(t) || !!(Ce && t && t[Ce]);
227
227
  }
228
- function gr(t, e, r, a, n) {
228
+ function hr(t, e, r, a, n) {
229
229
  var i = -1, o = t.length;
230
- for (r || (r = fr), n || (n = []); ++i < o; ) {
230
+ for (r || (r = gr), n || (n = []); ++i < o; ) {
231
231
  var l = t[i];
232
- r(l) ? Pt(n, l) : n[n.length] = l;
232
+ r(l) ? Et(n, l) : n[n.length] = l;
233
233
  }
234
234
  return n;
235
235
  }
236
- function hr(t) {
236
+ function dr(t) {
237
237
  var e = t == null ? 0 : t.length;
238
- return e ? gr(t) : [];
238
+ return e ? hr(t) : [];
239
239
  }
240
- function dr(t) {
241
- return Ge($e(t, void 0, hr), t + "");
240
+ function mr(t) {
241
+ return $e(Xe(t, void 0, dr), t + "");
242
242
  }
243
- var mr = "[object Object]", yr = Function.prototype, pr = Object.prototype, Xe = yr.toString, br = pr.hasOwnProperty, vr = Xe.call(Object);
244
- function Ke(t) {
245
- if (!ce(t) || Ie(t) != mr)
243
+ var yr = "[object Object]", pr = Function.prototype, br = Object.prototype, Ke = pr.toString, vr = br.hasOwnProperty, xr = Ke.call(Object);
244
+ function ze(t) {
245
+ if (!ce(t) || Ie(t) != yr)
246
246
  return !1;
247
- var e = Et(t);
247
+ var e = _t(t);
248
248
  if (e === null)
249
249
  return !0;
250
- var r = br.call(e, "constructor") && e.constructor;
251
- return typeof r == "function" && r instanceof r && Xe.call(r) == vr;
250
+ var r = vr.call(e, "constructor") && e.constructor;
251
+ return typeof r == "function" && r instanceof r && Ke.call(r) == xr;
252
252
  }
253
- function xr(t, e, r) {
253
+ function Cr(t, e, r) {
254
254
  var a = -1, n = t.length;
255
255
  e < 0 && (e = -e > n ? 0 : n + e), r = r > n ? n : r, r < 0 && (r += n), n = e > r ? 0 : r - e >>> 0, e >>>= 0;
256
256
  for (var i = Array(n); ++a < n; )
257
257
  i[a] = t[a + e];
258
258
  return i;
259
259
  }
260
- function Cr(t) {
260
+ function Mr(t) {
261
261
  return function(e, r, a) {
262
262
  for (var n = -1, i = Object(e), o = a(e), l = o.length; l--; ) {
263
263
  var c = o[++n];
@@ -267,21 +267,21 @@ function Cr(t) {
267
267
  return e;
268
268
  };
269
269
  }
270
- var Mr = Cr();
270
+ var wr = Mr();
271
271
  function ie(t, e, r) {
272
- (r !== void 0 && !Ae(t[e], r) || r === void 0 && !(e in t)) && It(t, e, r);
272
+ (r !== void 0 && !Ne(t[e], r) || r === void 0 && !(e in t)) && It(t, e, r);
273
273
  }
274
- function wr(t) {
275
- return ce(t) && _e(t);
274
+ function Tr(t) {
275
+ return ce(t) && Ae(t);
276
276
  }
277
277
  function oe(t, e) {
278
278
  if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
279
279
  return t[e];
280
280
  }
281
- function Tr(t) {
282
- return ke(t, He(t));
281
+ function Sr(t) {
282
+ return De(t, He(t));
283
283
  }
284
- function Sr(t, e, r, a, n, i, o) {
284
+ function Lr(t, e, r, a, n, i, o) {
285
285
  var l = oe(t, r), c = oe(e, r), f = o.get(c);
286
286
  if (f) {
287
287
  ie(t, r, f);
@@ -289,32 +289,32 @@ function Sr(t, e, r, a, n, i, o) {
289
289
  }
290
290
  var s = i ? i(l, c, r + "", t, e, o) : void 0, u = s === void 0;
291
291
  if (u) {
292
- var h = S(c), b = !h && _t(c), p = !h && !b && At(c);
293
- s = c, h || b || p ? S(l) ? s = l : wr(l) ? s = Nt(l) : b ? (u = !1, s = kt(c, !0)) : p ? (u = !1, s = Ht(c, !0)) : s = [] : Ke(c) || ae(c) ? (s = l, ae(l) ? s = Tr(l) : (!ue(l) || Fe(l)) && (s = Ft(c))) : u = !1;
292
+ var h = S(c), b = !h && At(c), p = !h && !b && Nt(c);
293
+ s = c, h || b || p ? S(l) ? s = l : Tr(l) ? s = kt(l) : b ? (u = !1, s = Dt(c, !0)) : p ? (u = !1, s = Ht(c, !0)) : s = [] : ze(c) || ae(c) ? (s = l, ae(l) ? s = Sr(l) : (!ue(l) || Fe(l)) && (s = Ft(c))) : u = !1;
294
294
  }
295
295
  u && (o.set(c, s), n(s, c, a, i, o), o.delete(c)), ie(t, r, s);
296
296
  }
297
297
  function Ye(t, e, r, a, n) {
298
- t !== e && Mr(e, function(i, o) {
299
- if (n || (n = new Dt()), ue(i))
300
- Sr(t, e, o, r, Ye, a, n);
298
+ t !== e && wr(e, function(i, o) {
299
+ if (n || (n = new Rt()), ue(i))
300
+ Lr(t, e, o, r, Ye, a, n);
301
301
  else {
302
302
  var l = a ? a(oe(t, o), i, o + "", t, e, n) : void 0;
303
303
  l === void 0 && (l = i), ie(t, o, l);
304
304
  }
305
305
  }, He);
306
306
  }
307
- function Lr(t) {
307
+ function Or(t) {
308
308
  var e = t == null ? 0 : t.length;
309
309
  return e ? t[e - 1] : void 0;
310
310
  }
311
- function Or(t, e) {
312
- return e.length < 2 ? t : ur(t, xr(e, 0, -1));
311
+ function Pr(t, e) {
312
+ return e.length < 2 ? t : fr(t, Cr(e, 0, -1));
313
313
  }
314
- var Pr = Qt(function(t, e, r) {
314
+ var Er = er(function(t, e, r) {
315
315
  Ye(t, e, r);
316
- }), Er = Object.prototype, Ir = Er.hasOwnProperty;
317
- function _r(t, e) {
316
+ }), _r = Object.prototype, Ir = _r.hasOwnProperty;
317
+ function Ar(t, e) {
318
318
  e = he(e, t);
319
319
  var r = -1, a = e.length;
320
320
  if (!a)
@@ -324,26 +324,37 @@ function _r(t, e) {
324
324
  if (n === "__proto__" && !Ir.call(t, "__proto__") || (n === "constructor" || n === "prototype") && r < a - 1)
325
325
  return !1;
326
326
  }
327
- var i = Or(t, e);
328
- return i == null || delete i[ne(Lr(e))];
327
+ var i = Pr(t, e);
328
+ return i == null || delete i[ne(Or(e))];
329
329
  }
330
- function Ar(t) {
331
- return Ke(t) ? void 0 : t;
330
+ function Nr(t) {
331
+ return ze(t) ? void 0 : t;
332
332
  }
333
- var Nr = 1, kr = 2, Hr = 4, Fr = dr(function(t, e) {
333
+ var kr = 1, Dr = 2, Hr = 4, Fr = mr(function(t, e) {
334
334
  var r = {};
335
335
  if (t == null)
336
336
  return r;
337
337
  var a = !1;
338
- e = Re(e, function(i) {
338
+ e = We(e, function(i) {
339
339
  return i = he(i, t), a || (a = i.length > 1), i;
340
- }), ke(t, Rt(t), r), a && (r = Wt(r, Nr | kr | Hr, Ar));
340
+ }), De(t, Wt(t), r), a && (r = Bt(r, kr | Dr | Hr, Nr));
341
341
  for (var n = e.length; n--; )
342
- _r(r, e[n]);
342
+ Ar(r, e[n]);
343
343
  return r;
344
344
  });
345
- const Dr = "__cx_overlay__:";
346
- class Rr {
345
+ const Rr = "__cx_overlay__:";
346
+ function Wr() {
347
+ if (typeof window > "u") return !1;
348
+ try {
349
+ return window.__DEVICE_ALARM_DEBUG__ === !0 || window.localStorage?.getItem("deviceAlarmDebug") === "1";
350
+ } catch {
351
+ return !1;
352
+ }
353
+ }
354
+ function Me(t, e = {}) {
355
+ Wr() && console.log("[DeviceAlarm][OverlayManager]", t, e);
356
+ }
357
+ class Br {
347
358
  constructor(e) {
348
359
  this.pool = e;
349
360
  }
@@ -360,9 +371,8 @@ class Rr {
360
371
  const r = String(e.id || "").trim(), a = String(e.renderer || "").trim();
361
372
  if (!r) throw new Error("Overlay id is required");
362
373
  if (!a || !this.renderers.has(a)) throw new Error(`Overlay renderer "${a}" is not registered`);
363
- const n = this.records.get(r), i = {
364
- ...n,
365
- ...e,
374
+ const n = this.records.get(r), i = n || {};
375
+ Object.assign(i, e, {
366
376
  id: r,
367
377
  renderer: a,
368
378
  position: { ...n?.position, ...e.position },
@@ -372,8 +382,13 @@ class Rr {
372
382
  y: this.number(e.offset?.y, n?.offset?.y ?? 0)
373
383
  },
374
384
  anchor: e.anchor || n?.anchor || "top-left"
375
- };
376
- this.records.set(r, i), this.ensureTheme(a), this.pool.add(i.data, {
385
+ }), this.records.set(r, i), this.ensureTheme(a), Me("add", {
386
+ id: r,
387
+ renderer: a,
388
+ visible: i.visible,
389
+ position: i.position,
390
+ records: this.records.size
391
+ }), this.pool.add(i, {
377
392
  id: r,
378
393
  lon: i.position.longitude,
379
394
  lat: i.position.latitude,
@@ -382,6 +397,8 @@ class Rr {
382
397
  show: i.visible,
383
398
  offset: i.offset,
384
399
  anchor: i.anchor,
400
+ // 覆盖层与设备标签共用位置池,但不能被设备聚合器的可见性清理误隐藏。
401
+ persistent: !0,
385
402
  style: { zIndex: String(i.zIndex ?? 1) }
386
403
  }), i.visible || this.pool.hideByIds([r]);
387
404
  }
@@ -392,7 +409,7 @@ class Rr {
392
409
  remove(e) {
393
410
  const r = Array.isArray(e) ? e : [e];
394
411
  for (const a of r)
395
- this.records.has(a) && (this.pool.removeByIds([a]), this.records.delete(a), this.mounted.delete(a));
412
+ this.records.has(a) && (Me("remove", { id: a, records: this.records.size }), this.pool.removeByIds([a]), this.records.delete(a), this.mounted.delete(a));
396
413
  }
397
414
  clear() {
398
415
  this.remove([...this.records.keys()]);
@@ -436,14 +453,14 @@ class Rr {
436
453
  };
437
454
  }
438
455
  themeName(e) {
439
- return `${Dr}${e}`;
456
+ return `${Rr}${e}`;
440
457
  }
441
458
  number(e, r) {
442
459
  const a = Number(e);
443
460
  return Number.isFinite(a) ? a : r;
444
461
  }
445
462
  }
446
- class Wr {
463
+ class Gr {
447
464
  labelId;
448
465
  cardId;
449
466
  opt;
@@ -453,7 +470,7 @@ class Wr {
453
470
  /** 不进入实体图层的通用地图内容容器。 */
454
471
  overlays;
455
472
  constructor(e) {
456
- this.labelId = e.labelId, this.cardId = e.cardId, this.opt = e, this.MaterialManager = e.MaterialManager || new Se(), this.instance = this.initCore(e, e.eventBus, e.cardEventBus), this.overlays = new Rr(this.instance.overlayPool);
473
+ this.labelId = e.labelId, this.cardId = e.cardId, this.opt = e, this.MaterialManager = e.MaterialManager || new Le(), this.instance = this.initCore(e, e.eventBus, e.cardEventBus), this.overlays = new Br(this.instance.overlayPool);
457
474
  }
458
475
  //初始化标记管理
459
476
  initCore(e, r, a) {
@@ -461,7 +478,7 @@ class Wr {
461
478
  r || (r = new K()), a || (a = new K());
462
479
  const l = new Q(n, i, this.labelId, r);
463
480
  l.setOcclusionOptions({ distanceEpsilon: 1 }), l.setOcclusionEnabled(!1);
464
- const c = new Q(n, i, this.cardId, a, !1), f = new Q(n, i, `${this.labelId}-overlay`, new K(), !1), s = new Mt(n, i, {
481
+ const c = new Q(n, i, this.cardId, a, !1), f = new Q(n, i, `${this.labelId}-overlay`, new K(), !1), s = new wt(n, i, {
465
482
  //聚合
466
483
  threshold: o?.threshold || 16,
467
484
  displayLimit: o?.displayLimit || 300,
@@ -475,7 +492,7 @@ class Wr {
475
492
  // 普通点的默认主题
476
493
  ...o,
477
494
  labelPool: l
478
- }), u = this.MaterialManager, h = new wt(
495
+ }), u = this.MaterialManager, h = new Tt(
479
496
  //实体图层管理
480
497
  n,
481
498
  i,
@@ -508,7 +525,7 @@ class Wr {
508
525
  const n = a.map((i) => {
509
526
  const o = this.entityList.get(i.id);
510
527
  if (!o) return;
511
- let l = Pr({}, o, i);
528
+ let l = Er({}, o, i);
512
529
  return this.entityList.set(i.id, l), l;
513
530
  }).filter(Boolean);
514
531
  r && this.instance.entityLayerManager.updateGroupToLayer("Layer_default", n);
@@ -554,7 +571,7 @@ class Wr {
554
571
  return this.instance?.labelPool?.getOcclusionOptions?.() || null;
555
572
  }
556
573
  }
557
- const I = {
574
+ const _ = {
558
575
  wallTileWidth: 2,
559
576
  wallTileHeight: 1,
560
577
  polygonTileWidth: 2,
@@ -567,10 +584,10 @@ function y(t, e) {
567
584
  function C(t) {
568
585
  return Number.isFinite(t) ? Math.max(1, t) : 1;
569
586
  }
570
- function Br(t, e) {
587
+ function $r(t, e) {
571
588
  return Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : e;
572
589
  }
573
- function Gr(t) {
590
+ function Xr(t) {
574
591
  const e = t?.repeat;
575
592
  if (Array.isArray(e) && e.length >= 2)
576
593
  return {
@@ -588,7 +605,7 @@ function Gr(t) {
588
605
  y: C(a)
589
606
  } : null;
590
607
  }
591
- function ze(t, e) {
608
+ function Ve(t, e) {
592
609
  const r = Array.isArray(e?.positions) ? e.positions : [];
593
610
  if (r.length < 2) return 1;
594
611
  let a = 0;
@@ -608,7 +625,7 @@ function ze(t, e) {
608
625
  }
609
626
  return a > 0 ? a : 1;
610
627
  }
611
- function Ve(t) {
628
+ function qe(t) {
612
629
  const e = t?.maximumHeights, r = t?.minimumHeights;
613
630
  if (Array.isArray(e) && Array.isArray(r) && e.length > 0 && e.length === r.length) {
614
631
  let i = 0, o = 0;
@@ -621,7 +638,7 @@ function Ve(t) {
621
638
  const a = Math.abs(y(t?.minHeight, 0)), n = Math.abs(y(t?.maxHeight, 0));
622
639
  return a > 0 || n > 0 ? a + n : 3;
623
640
  }
624
- function qe(t, e) {
641
+ function Ue(t, e) {
625
642
  const r = e?.hierarchy;
626
643
  if (!Array.isArray(r) || r.length < 3)
627
644
  return { width: 1, height: 1 };
@@ -640,42 +657,42 @@ function qe(t, e) {
640
657
  height: b > 0 ? b : 1
641
658
  };
642
659
  }
643
- function Ue({
660
+ function je({
644
661
  Cesium: t,
645
662
  themeOptions: e,
646
663
  entityOptions: r,
647
664
  category: a
648
665
  }) {
649
- const n = Gr(e);
666
+ const n = Xr(e);
650
667
  if (n) return n;
651
668
  if (e?.autoRepeat === !1)
652
669
  return { x: 1, y: 1 };
653
670
  if (a === "wall") {
654
- const c = ze(t, r), f = Ve(r), s = y(
671
+ const c = Ve(t, r), f = qe(r), s = y(
655
672
  e?.tileWidth ?? e?.textureWidth,
656
- I.wallTileWidth
673
+ _.wallTileWidth
657
674
  ), u = y(
658
675
  e?.tileHeight ?? e?.textureHeight,
659
- I.wallTileHeight
676
+ _.wallTileHeight
660
677
  );
661
678
  return {
662
679
  x: C(c / Math.max(s, 0.01)),
663
680
  y: C(f / Math.max(u, 0.01))
664
681
  };
665
682
  }
666
- const i = qe(t, r), o = y(
683
+ const i = Ue(t, r), o = y(
667
684
  e?.tileWidth ?? e?.textureWidth,
668
- I.polygonTileWidth
685
+ _.polygonTileWidth
669
686
  ), l = y(
670
687
  e?.tileHeight ?? e?.textureHeight,
671
- I.polygonTileHeight
688
+ _.polygonTileHeight
672
689
  );
673
690
  return {
674
691
  x: C(i.width / Math.max(o, 0.01)),
675
692
  y: C(i.height / Math.max(l, 0.01))
676
693
  };
677
694
  }
678
- function je({
695
+ function Ze({
679
696
  Cesium: t,
680
697
  themeOptions: e,
681
698
  entityOptions: r,
@@ -687,21 +704,21 @@ function je({
687
704
  if (e?.autoRepeat === !1)
688
705
  return 1;
689
706
  if (a === "wall") {
690
- const s = ze(t, r), u = Ve(r), h = y(
707
+ const s = Ve(t, r), u = qe(r), h = y(
691
708
  e?.tileWidth ?? e?.textureWidth,
692
- I.wallTileWidth
709
+ _.wallTileWidth
693
710
  ), b = y(
694
711
  e?.tileHeight ?? e?.textureHeight,
695
- I.wallTileHeight
712
+ _.wallTileHeight
696
713
  ), p = n === "vertical" ? u / Math.max(b, 0.01) : s / Math.max(h, 0.01);
697
714
  return C(Number(p.toFixed(2)));
698
715
  }
699
- const o = qe(t, r), l = y(
716
+ const o = Ue(t, r), l = y(
700
717
  e?.tileWidth ?? e?.textureWidth,
701
- I.polygonTileWidth
718
+ _.polygonTileWidth
702
719
  ), c = y(
703
720
  e?.tileHeight ?? e?.textureHeight,
704
- I.polygonTileHeight
721
+ _.polygonTileHeight
705
722
  ), f = n === "vertical" ? o.height / Math.max(c, 0.01) : o.width / Math.max(l, 0.01);
706
723
  return C(Number(f.toFixed(2)));
707
724
  }
@@ -709,24 +726,24 @@ function q(t) {
709
726
  const e = t;
710
727
  return e.__materialFactory = !0, e;
711
728
  }
712
- function Ze(t) {
729
+ function Je(t) {
713
730
  const e = String(t?.wallVerticalMode ?? t?.verticalMode ?? "stretch");
714
731
  return e === "repeat" || e === "bottom" || e === "stretch" ? e : "stretch";
715
732
  }
716
- function $r({
733
+ function Kr({
717
734
  Cesium: t,
718
735
  themeOptions: e,
719
736
  entityOptions: r
720
737
  }) {
721
- const a = Ue({
738
+ const a = je({
722
739
  Cesium: t,
723
740
  themeOptions: e,
724
741
  entityOptions: r,
725
742
  category: "wall"
726
743
  });
727
- return Ze(e) === "repeat" ? a : { x: a.x, y: 1 };
744
+ return Je(e) === "repeat" ? a : { x: a.x, y: 1 };
728
745
  }
729
- function Xr(t, e) {
746
+ function zr(t, e) {
730
747
  const r = "WallBottomImageMaterial_" + Date.now() + "_" + Math.floor(Math.random() * 1e3);
731
748
  function a(n) {
732
749
  this._definitionChanged = new t.Event(), this._color = n.color, this.color = n.color;
@@ -785,7 +802,7 @@ function Xr(t, e) {
785
802
  }
786
803
  }), new a(e);
787
804
  }
788
- function Kr({
805
+ function Yr({
789
806
  Cesium: t,
790
807
  options: e,
791
808
  MaterialManager: r,
@@ -793,7 +810,7 @@ function Kr({
793
810
  }) {
794
811
  if (e.data?.theme) {
795
812
  if (e.data?.lineType == "1") {
796
- let n = Tt(t, {
813
+ let n = St(t, {
797
814
  color: t.Color.fromCssColorString(e?.options?.color || "#ffffff"),
798
815
  duration: 100
799
816
  });
@@ -836,7 +853,7 @@ function Kr({
836
853
  category: "polyline"
837
854
  });
838
855
  } else if (e.data?.lineType == "5") {
839
- let n = St(t, {
856
+ let n = Lt(t, {
840
857
  image: e.img,
841
858
  color: t.Color.fromCssColorString(e?.options?.color || "#ffffff"),
842
859
  duration: 5e3,
@@ -853,7 +870,7 @@ function Kr({
853
870
  }
854
871
  }
855
872
  }
856
- function Yr({
873
+ function Vr({
857
874
  Cesium: t,
858
875
  options: e,
859
876
  MaterialManager: r,
@@ -875,7 +892,7 @@ function Yr({
875
892
  category: "polygon",
876
893
  force: a,
877
894
  material: q((i = {}) => {
878
- const o = Ue({
895
+ const o = je({
879
896
  Cesium: t,
880
897
  themeOptions: n,
881
898
  entityOptions: i,
@@ -894,14 +911,14 @@ function Yr({
894
911
  category: "polygon",
895
912
  force: a,
896
913
  material: q((i = {}) => {
897
- const o = e.data?.freely || "vertical", l = je({
914
+ const o = e.data?.freely || "vertical", l = Ze({
898
915
  Cesium: t,
899
916
  themeOptions: n,
900
917
  entityOptions: i,
901
918
  category: "polygon",
902
919
  freely: o
903
920
  });
904
- return Le(t, {
921
+ return Oe(t, {
905
922
  image: e.img,
906
923
  color: t.Color.fromCssColorString(n?.color || "#ffffff"),
907
924
  duration: y(n?.duration, 5e3),
@@ -914,7 +931,7 @@ function Yr({
914
931
  }
915
932
  }
916
933
  }
917
- function zr({
934
+ function qr({
918
935
  Cesium: t,
919
936
  options: e,
920
937
  MaterialManager: r,
@@ -928,17 +945,17 @@ function zr({
928
945
  category: "wall",
929
946
  force: a,
930
947
  material: q((i = {}) => {
931
- const o = Ze(n), l = $r({
948
+ const o = Je(n), l = Kr({
932
949
  Cesium: t,
933
950
  themeOptions: n,
934
951
  entityOptions: i
935
952
  });
936
953
  if (o === "bottom") {
937
- const c = Br(
954
+ const c = $r(
938
955
  y(n?.bottomHeightRatio, 0.3),
939
956
  0.3
940
957
  );
941
- return Xr(t, {
958
+ return zr(t, {
942
959
  image: e.img,
943
960
  repeatX: l.x,
944
961
  bottomHeightRatio: c,
@@ -959,14 +976,14 @@ function zr({
959
976
  category: "wall",
960
977
  force: a,
961
978
  material: q((i = {}) => {
962
- const o = e.data?.freely || "vertical", l = je({
979
+ const o = e.data?.freely || "vertical", l = Ze({
963
980
  Cesium: t,
964
981
  themeOptions: n,
965
982
  entityOptions: i,
966
983
  category: "wall",
967
984
  freely: o
968
985
  });
969
- return Le(t, {
986
+ return Oe(t, {
970
987
  image: e.img,
971
988
  color: t.Color.fromCssColorString(n?.color || "#ffffff"),
972
989
  duration: y(n?.duration, 5e3),
@@ -979,7 +996,7 @@ function zr({
979
996
  }
980
997
  }
981
998
  }
982
- class Vr extends Wr {
999
+ class Ur extends Gr {
983
1000
  getCurrentBillboard(e) {
984
1001
  return e?.__currentBillboard || e?.billboard?.[0];
985
1002
  }
@@ -992,7 +1009,7 @@ class Vr extends Wr {
992
1009
  cardThemeConfig: o = [],
993
1010
  runListener: l = () => {
994
1011
  },
995
- MaterialManager: c = new Se(),
1012
+ MaterialManager: c = new Le(),
996
1013
  aggregatorOptions: f
997
1014
  } = e, s = [...n], u = [...i], h = [...o], b = {
998
1015
  clusterTheme: "Tag1007",
@@ -1121,7 +1138,7 @@ class Vr extends Wr {
1121
1138
  const a = this.opt.Cesium, n = this.instance.materialManager || this.opt.MaterialManager;
1122
1139
  if (e.line?.length > 0)
1123
1140
  for (let i of e.line)
1124
- Kr({
1141
+ Yr({
1125
1142
  options: i,
1126
1143
  Cesium: a,
1127
1144
  MaterialManager: n,
@@ -1129,7 +1146,7 @@ class Vr extends Wr {
1129
1146
  });
1130
1147
  if (e.polygon?.length > 0)
1131
1148
  for (let i of e.polygon)
1132
- Yr({
1149
+ Vr({
1133
1150
  options: i,
1134
1151
  Cesium: a,
1135
1152
  MaterialManager: n,
@@ -1137,7 +1154,7 @@ class Vr extends Wr {
1137
1154
  });
1138
1155
  if (e.wall?.length > 0)
1139
1156
  for (let i of e.wall)
1140
- zr({
1157
+ qr({
1141
1158
  options: i,
1142
1159
  Cesium: a,
1143
1160
  MaterialManager: n,
@@ -1269,9 +1286,9 @@ class Vr extends Wr {
1269
1286
  }
1270
1287
  });
1271
1288
  else if (e.comType == 4)
1272
- c = O(P(Lt), f);
1289
+ c = O(P(Ot), f);
1273
1290
  else if (e.comType == 5 || e.comType == 8) {
1274
- const s = o?.options || {}, u = e?.data?.options || {}, h = o?.pixelOffset || e?.data?.pixelOffset || { x: 0, y: 0 }, b = s.otherOffset ?? u.otherOffset ?? { x: 0, y: -0 }, p = s.isCanDraggable ?? u.isCanDraggable ?? e?.isCanDraggable ?? !1, w = e.comType == 8 ? Oe : Pe;
1291
+ const s = o?.options || {}, u = e?.data?.options || {}, h = o?.pixelOffset || e?.data?.pixelOffset || { x: 0, y: 0 }, b = s.otherOffset ?? u.otherOffset ?? { x: 0, y: -0 }, p = s.isCanDraggable ?? u.isCanDraggable ?? e?.isCanDraggable ?? !1, w = e.comType == 8 ? Pe : Ee;
1275
1292
  c = O(P(w), {
1276
1293
  ...f,
1277
1294
  pixelOffset: h,
@@ -1281,18 +1298,18 @@ class Vr extends Wr {
1281
1298
  isCanDraggable: p,
1282
1299
  onCanDraggable: s.onCanDraggable || e?.onCanDraggable,
1283
1300
  onSetOtherOffset: (x) => {
1284
- const _ = a(i.data);
1285
- _?.options && (_.options.otherOffset = x), s.onSetOtherOffset?.(x), e?.onSetOtherOffset?.(i.data, x);
1301
+ const I = a(i.data);
1302
+ I?.options && (I.options.otherOffset = x), s.onSetOtherOffset?.(x), e?.onSetOtherOffset?.(i.data, x);
1286
1303
  },
1287
1304
  onSetLineStake: (x) => {
1288
- const _ = a(i.data);
1289
- _?.options && (_.options.lineStake = x), s.onSetLineStake?.(x), e?.onSetLineStake?.(i.data, x);
1305
+ const I = a(i.data);
1306
+ I?.options && (I.options.lineStake = x), s.onSetLineStake?.(x), e?.onSetLineStake?.(i.data, x);
1290
1307
  }
1291
1308
  });
1292
- } else e.comType == 6 || e.comType == 7 ? c = O(P(Ee), {
1309
+ } else e.comType == 6 || e.comType == 7 ? c = O(P(_e), {
1293
1310
  text: f.text,
1294
1311
  textStyle: f.textStyle
1295
- }) : e.comType == 9 ? c = O(P(De), {
1312
+ }) : e.comType == 9 ? c = O(P(Re), {
1296
1313
  text: f.text,
1297
1314
  svg: f.svg,
1298
1315
  textStyle: f.textStyle,
@@ -1312,7 +1329,7 @@ class Vr extends Wr {
1312
1329
  e.addListener(ee.Click, {
1313
1330
  name: "marker:click",
1314
1331
  fn: (i) => {
1315
- r.runListener?.(Y.标记左键点击, i.data), Fe(i.data?.onClick) && i.data?.onClick(i.data), i.data?.cameraPoint && this.getCurrentBillboard(i.data)?.isFlyToCameraPoint && a?.camera?.flyTo({
1332
+ r.runListener?.(z.标记左键点击, i.data), Fe(i.data?.onClick) && i.data?.onClick(i.data), i.data?.cameraPoint && this.getCurrentBillboard(i.data)?.isFlyToCameraPoint && a?.camera?.flyTo({
1316
1333
  duration: 1,
1317
1334
  ...i.data?.cameraPoint
1318
1335
  });
@@ -1330,7 +1347,7 @@ class Vr extends Wr {
1330
1347
  } catch (c) {
1331
1348
  console.log(c);
1332
1349
  }
1333
- r.runListener?.(Y.标记移入, i.data, l);
1350
+ r.runListener?.(z.标记移入, i.data, l);
1334
1351
  }
1335
1352
  }), e.addListener(ee.MouseLeave, {
1336
1353
  name: "marker:mouseleave",
@@ -1345,7 +1362,7 @@ class Vr extends Wr {
1345
1362
  } catch (c) {
1346
1363
  console.log(c);
1347
1364
  }
1348
- r.runListener?.(Y.标记移出, i.data, l);
1365
+ r.runListener?.(z.标记移出, i.data, l);
1349
1366
  }
1350
1367
  }), n?.forEach((i) => {
1351
1368
  e.addListener(i.key, i.ListenerItem, i.overwrite);
@@ -1363,12 +1380,12 @@ class Vr extends Wr {
1363
1380
  });
1364
1381
  }
1365
1382
  }
1366
- const qr = /* @__PURE__ */ se({
1383
+ const jr = /* @__PURE__ */ se({
1367
1384
  __name: "MarkerManage",
1368
- props: $t,
1385
+ props: Xt,
1369
1386
  emits: ["register", "load", "marker-event"],
1370
1387
  setup(t, { expose: e, emit: r }) {
1371
- const a = t, n = r, i = mt("leitingMethods");
1388
+ const a = t, n = r, i = yt("leitingMethods");
1372
1389
  let o = null;
1373
1390
  const l = (s = {}) => {
1374
1391
  if (o) return o;
@@ -1381,7 +1398,7 @@ const qr = /* @__PURE__ */ se({
1381
1398
  n("marker-event", { key: h, data: b, args: p });
1382
1399
  }
1383
1400
  };
1384
- return !u.Cesium || !u.viewer ? null : (o = new Vr(u), s.methods && (s.methods.setTagTheme = o.setTagTheme.bind(o), s.methods.setMaterial = o.setMaterial.bind(o), s.methods.setEntityList = o.set.bind(o), s.methods.addComItem = o.add.bind(o), s.methods.deleteComItem = o.delete.bind(o), s.methods.updateComItem = o.update.bind(o), s.methods.getEntityByID = o.getById.bind(o), s.methods.getOptions = o.getOptions.bind(o)), n("load", o), o);
1401
+ return !u.Cesium || !u.viewer ? null : (o = new Ur(u), s.methods && (s.methods.setTagTheme = o.setTagTheme.bind(o), s.methods.setMaterial = o.setMaterial.bind(o), s.methods.setEntityList = o.set.bind(o), s.methods.addComItem = o.add.bind(o), s.methods.deleteComItem = o.delete.bind(o), s.methods.updateComItem = o.update.bind(o), s.methods.getEntityByID = o.getById.bind(o), s.methods.getOptions = o.getOptions.bind(o)), n("load", o), o);
1385
1402
  }, c = {
1386
1403
  init: l,
1387
1404
  set: (s) => o?.set(s),
@@ -1407,23 +1424,23 @@ const qr = /* @__PURE__ */ se({
1407
1424
  const s = M(i), u = s?.getCesium?.(), h = s?.getViewer?.();
1408
1425
  u && h ? l({ Cesium: u, viewer: h, methods: s }) : a.Cesium && a.viewer && l({ methods: s });
1409
1426
  }
1410
- return Te(() => {
1427
+ return Se(() => {
1411
1428
  f();
1412
- }), z(
1429
+ }), Y(
1413
1430
  () => [a.Cesium, a.viewer],
1414
1431
  ([s, u]) => {
1415
1432
  s && u && !o && f();
1416
1433
  }
1417
- ), z(
1434
+ ), Y(
1418
1435
  () => i?.value,
1419
1436
  (s, u) => {
1420
1437
  f();
1421
1438
  },
1422
1439
  { deep: !1 }
1423
- ), yt(() => {
1424
- }), (s, u) => pt(s.$slots, "default");
1440
+ ), pt(() => {
1441
+ }), (s, u) => bt(s.$slots, "default");
1425
1442
  }
1426
- }), Ur = /* @__PURE__ */ se({
1443
+ }), Zr = /* @__PURE__ */ se({
1427
1444
  name: "CxMarkerPreview",
1428
1445
  __name: "MarkerPreview",
1429
1446
  props: {
@@ -1434,106 +1451,106 @@ const qr = /* @__PURE__ */ se({
1434
1451
  },
1435
1452
  emits: ["imageSize", "pixelOffsetSelect"],
1436
1453
  setup(t, { emit: e }) {
1437
- const r = t, a = e, n = Me("marker"), i = G(), o = G(), l = m(() => r.config?.data?.options || {}), c = m(() => Number(r.config?.comType ?? 2)), f = m(() => c.value === 5 ? Pe : c.value === 8 ? Oe : [6, 7].includes(c.value) ? Ee : c.value === 9 ? De : re), s = m(() => c.value === 2), u = m(() => r.img ?? l.value.img ?? r.config?.img ?? ""), h = m(() => l.value.textStyle || {}), b = m(() => l.value.imgStyle || {}), p = m(() => l.value.lineStyle || {}), w = m(() => l.value.svg || {}), x = m(() => String(l.value.textPosition || "top")), _ = m(() => Number(l.value.textGap ?? 8)), U = m(() => r.config?.data?.pixelOffset || { x: 0, y: 0 }), Je = m(() => l.value.otherOffset || { x: 0, y: 0 }), Qe = m(
1454
+ const r = t, a = e, n = we("marker"), i = G(), o = G(), l = m(() => r.config?.data?.options || {}), c = m(() => Number(r.config?.comType ?? 2)), f = m(() => c.value === 5 ? Ee : c.value === 8 ? Pe : [6, 7].includes(c.value) ? _e : c.value === 9 ? Re : re), s = m(() => c.value === 2), u = m(() => r.img ?? l.value.img ?? r.config?.img ?? ""), h = m(() => l.value.textStyle || {}), b = m(() => l.value.imgStyle || {}), p = m(() => l.value.lineStyle || {}), w = m(() => l.value.svg || {}), x = m(() => String(l.value.textPosition || "top")), I = m(() => Number(l.value.textGap ?? 8)), U = m(() => r.config?.data?.pixelOffset || { x: 0, y: 0 }), Qe = m(() => l.value.otherOffset || { x: 0, y: 0 }), et = m(
1438
1455
  () => JSON.stringify({
1439
1456
  comType: c.value,
1440
1457
  image: u.value,
1441
1458
  text: r.text,
1442
1459
  options: l.value
1443
1460
  })
1444
- ), W = G(!1), B = G(!1), L = G({ scale: 1, shiftX: 0, shiftY: 0 }), et = m(() => ({
1461
+ ), W = G(!1), B = G(!1), L = G({ scale: 1, shiftX: 0, shiftY: 0 }), tt = m(() => ({
1445
1462
  transform: `translate(${L.value.shiftX}px, ${L.value.shiftY}px) scale(${L.value.scale})`,
1446
1463
  visibility: W.value || s.value && (!u.value || !B.value) ? "hidden" : "visible"
1447
1464
  })), j = m(
1448
1465
  () => r.offsetSelectable && c.value === 2 && !!u.value && B.value
1449
- ), tt = m(() => {
1466
+ ), rt = m(() => {
1450
1467
  const d = Number(U.value.x), g = Number(U.value.y);
1451
1468
  return {
1452
1469
  left: `${Number.isFinite(d) ? -d : 0}px`,
1453
1470
  top: `${Number.isFinite(g) ? -g : 0}px`
1454
1471
  };
1455
1472
  });
1456
- function rt() {
1473
+ function at() {
1457
1474
  if (!i.value || !o.value || i.value.clientWidth <= 0 || i.value.clientHeight <= 0) return;
1458
1475
  const d = Array.from(o.value.querySelectorAll("*")).filter((v) => !v.classList.contains(n.be("preview", "anchor"))).map((v) => v.getBoundingClientRect()).filter((v) => v.width || v.height);
1459
1476
  if (!d.length) return;
1460
- const g = i.value.getBoundingClientRect(), N = Math.min(...d.map((v) => v.left)), k = Math.max(...d.map((v) => v.right)), D = Math.min(...d.map((v) => v.top)), R = Math.max(...d.map((v) => v.bottom)), ot = k - N, lt = R - D, me = L.value.scale || 1, st = Math.min(
1477
+ const g = i.value.getBoundingClientRect(), N = Math.min(...d.map((v) => v.left)), k = Math.max(...d.map((v) => v.right)), F = Math.min(...d.map((v) => v.top)), R = Math.max(...d.map((v) => v.bottom)), lt = k - N, st = R - F, me = L.value.scale || 1, ct = Math.min(
1461
1478
  1,
1462
- Math.max(1, g.width - 8) / Math.max(ot / me, 1),
1463
- Math.max(1, g.height - 8) / Math.max(lt / me, 1)
1464
- ), ct = (N + k) / 2, ut = (D + R) / 2, ft = g.left + g.width / 2, gt = g.top + g.height / 2;
1479
+ Math.max(1, g.width - 8) / Math.max(lt / me, 1),
1480
+ Math.max(1, g.height - 8) / Math.max(st / me, 1)
1481
+ ), ut = (N + k) / 2, ft = (F + R) / 2, gt = g.left + g.width / 2, ht = g.top + g.height / 2;
1465
1482
  L.value = {
1466
- scale: st,
1467
- shiftX: L.value.shiftX + ft - ct,
1468
- shiftY: L.value.shiftY + gt - ut
1483
+ scale: ct,
1484
+ shiftX: L.value.shiftX + gt - ut,
1485
+ shiftY: L.value.shiftY + ht - ft
1469
1486
  };
1470
1487
  }
1471
- function at(d) {
1488
+ function nt(d) {
1472
1489
  const g = d.target;
1473
1490
  !(g instanceof HTMLImageElement) || !o.value?.contains(g) || (B.value = !0, W.value = !1, a("imageSize", g.naturalHeight > 0 ? g.naturalWidth / g.naturalHeight : void 0), J());
1474
1491
  }
1475
- function nt(d) {
1492
+ function it(d) {
1476
1493
  !(d.target instanceof HTMLImageElement) || !o.value?.contains(d.target) || (W.value = !0, a("imageSize", void 0));
1477
1494
  }
1478
- function it(d) {
1495
+ function ot(d) {
1479
1496
  if (!j.value || !o.value) return;
1480
1497
  const g = o.value.querySelector(`.${n.b("default")}`);
1481
1498
  if (!g) return;
1482
- const N = g.getBoundingClientRect(), k = L.value.scale || 1, D = (d.clientX - N.left) / k, R = (d.clientY - N.top) / k;
1483
- D < 0 || R < 0 || D > N.width / k || R > N.height / k || a("pixelOffsetSelect", { x: -Math.round(D), y: -Math.round(R) });
1499
+ const N = g.getBoundingClientRect(), k = L.value.scale || 1, F = (d.clientX - N.left) / k, R = (d.clientY - N.top) / k;
1500
+ F < 0 || R < 0 || F > N.width / k || R > N.height / k || a("pixelOffsetSelect", { x: -Math.round(F), y: -Math.round(R) });
1484
1501
  }
1485
- z(
1502
+ Y(
1486
1503
  u,
1487
1504
  () => {
1488
1505
  B.value = !1, W.value = !1, a("imageSize", void 0);
1489
1506
  },
1490
1507
  { flush: "sync" }
1491
1508
  );
1492
- let F, Z = /* @__PURE__ */ new Set(), A;
1509
+ let H, Z = /* @__PURE__ */ new Set(), A;
1493
1510
  function J() {
1494
1511
  A !== void 0 && cancelAnimationFrame(A);
1495
1512
  let d = 0;
1496
1513
  const g = () => {
1497
- A = void 0, rt(), d += 1, d < 3 && (A = requestAnimationFrame(g));
1514
+ A = void 0, at(), d += 1, d < 3 && (A = requestAnimationFrame(g));
1498
1515
  };
1499
1516
  A = requestAnimationFrame(g);
1500
1517
  }
1501
1518
  function de() {
1502
1519
  const d = new Set(Array.from(o.value?.querySelectorAll("*") || []));
1503
- for (const g of Z) d.has(g) || F?.unobserve(g);
1504
- for (const g of d) Z.has(g) || F?.observe(g);
1520
+ for (const g of Z) d.has(g) || H?.unobserve(g);
1521
+ for (const g of d) Z.has(g) || H?.observe(g);
1505
1522
  Z = d, J();
1506
1523
  }
1507
- return z(Qe, () => bt(de)), Te(() => {
1508
- F = new ResizeObserver(J), i.value && F.observe(i.value), o.value && F.observe(o.value), de();
1509
- }), vt(() => {
1510
- F?.disconnect(), A !== void 0 && cancelAnimationFrame(A);
1511
- }), (d, g) => (E(), H("div", {
1524
+ return Y(et, () => vt(de)), Se(() => {
1525
+ H = new ResizeObserver(J), i.value && H.observe(i.value), o.value && H.observe(o.value), de();
1526
+ }), xt(() => {
1527
+ H?.disconnect(), A !== void 0 && cancelAnimationFrame(A);
1528
+ }), (d, g) => (E(), D("div", {
1512
1529
  ref_key: "host",
1513
1530
  ref: i,
1514
1531
  class: T([M(n).b("preview"), j.value ? M(n).bm("preview", "offset-picker") : ""]),
1515
1532
  "aria-hidden": "true"
1516
1533
  }, [
1517
- W.value ? (E(), H("div", {
1534
+ W.value ? (E(), D("div", {
1518
1535
  key: 0,
1519
1536
  class: T(M(n).be("preview", "message"))
1520
- }, "图片不可用", 2)) : s.value && !u.value ? (E(), H("div", {
1537
+ }, "图片不可用", 2)) : s.value && !u.value ? (E(), D("div", {
1521
1538
  key: 1,
1522
1539
  class: T(M(n).be("preview", "message"))
1523
- }, "请选择图片", 2)) : s.value && !B.value ? (E(), H("div", {
1540
+ }, "请选择图片", 2)) : s.value && !B.value ? (E(), D("div", {
1524
1541
  key: 2,
1525
1542
  class: T(M(n).be("preview", "message"))
1526
1543
  }, "图片加载中…", 2)) : te("", !0),
1527
- we("div", {
1544
+ Te("div", {
1528
1545
  ref_key: "content",
1529
1546
  ref: o,
1530
1547
  class: T(M(n).be("preview", "content")),
1531
- style: $(et.value),
1532
- onLoadCapture: at,
1533
- onErrorCapture: nt,
1534
- onClick: it
1548
+ style: $(tt.value),
1549
+ onLoadCapture: nt,
1550
+ onErrorCapture: it,
1551
+ onClick: ot
1535
1552
  }, [
1536
- (E(), xt(Ct(f.value), {
1553
+ (E(), Ct(Mt(f.value), {
1537
1554
  key: u.value,
1538
1555
  text: t.text,
1539
1556
  img: u.value,
@@ -1541,27 +1558,27 @@ const qr = /* @__PURE__ */ se({
1541
1558
  "img-style": b.value,
1542
1559
  "line-style": p.value,
1543
1560
  "pixel-offset": U.value,
1544
- "other-offset": Je.value,
1561
+ "other-offset": Qe.value,
1545
1562
  svg: w.value,
1546
1563
  "text-position": x.value,
1547
- "text-gap": _.value
1564
+ "text-gap": I.value
1548
1565
  }, null, 8, ["text", "img", "text-style", "img-style", "line-style", "pixel-offset", "other-offset", "svg", "text-position", "text-gap"])),
1549
- j.value ? (E(), H("span", {
1566
+ j.value ? (E(), D("span", {
1550
1567
  key: 0,
1551
1568
  class: T(M(n).be("preview", "anchor")),
1552
- style: $(tt.value)
1569
+ style: $(rt.value)
1553
1570
  }, null, 6)) : te("", !0)
1554
1571
  ], 38)
1555
1572
  ], 2));
1556
1573
  }
1557
- }), ia = le(qr), oa = le(Ur);
1574
+ }), la = le(jr), sa = le(Zr);
1558
1575
  export {
1559
- De as C,
1560
- Wr as M,
1561
- Y as R,
1562
- ia as a,
1563
- oa as b,
1564
- Rr as c,
1565
- Vr as d,
1566
- $t as m
1576
+ Re as C,
1577
+ Gr as M,
1578
+ z as R,
1579
+ la as a,
1580
+ sa as b,
1581
+ Br as c,
1582
+ Ur as d,
1583
+ Xt as m
1567
1584
  };