@vcmap/viewshed 2.0.3 → 2.0.5

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.js CHANGED
@@ -1,13 +1,13 @@
1
- var fe = Object.defineProperty;
2
- var ve = (s, e, t) => e in s ? fe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var Z = (s, e, t) => (ve(s, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { VcsCameraPrimitive as pe, VcsObject as we, VcsEvent as L, AbstractInteraction as me, EventType as D, Projection as I, SessionType as ge, CesiumMap as B, startEditFeaturesSession as _e, startEditGeometrySession as Ce, VectorLayer as Ee, wgs84Projection as Ve, maxZIndex as ye, markVolatile as be, Viewpoint as Me, TransformationMode as Te, Category as Oe, moduleIdSymbol as Se } from "../../../assets/core.js";
5
- import { Color as k, Matrix4 as Pe, Transforms as Ae, Primitive as q, GeometryInstance as Q, SphereGeometry as Ie, ColorGeometryInstanceAttribute as ee, PerInstanceColorAppearance as te, SphereOutlineGeometry as Re, Math as O, Cartesian3 as S, ShadowMap as $e, Camera as Ne, HeightReference as xe } from "../../../assets/cesium.js";
6
- import { shallowRef as H, ref as A, nextTick as De, inject as ie, computed as se, reactive as j, watchEffect as Le, watch as R, onMounted as Fe, onUnmounted as ke } from "../../../assets/vue.js";
7
- import { ol$Observable$unByKey as je, Feature as We, ol$geom$Point as Be, ol$style$Style as ze } from "../../../assets/ol.js";
8
- import { VcsTextField as Ge, VcsSlider as Ue, VcsLabel as ne, VcsFormSection as re, VcsSelect as ae, VcsFormButton as He, VcsFeatureTransforms as Xe, makeEditorCollectionComponentClass as Ke, WindowSlot as Ye, ToolboxType as Je, createListExportAction as Ze, downloadText as qe, createListImportAction as Qe, AbstractConfigEditor as et } from "../../../assets/ui.js";
9
- import { VContainer as le, VRow as ce, VCol as de, VDivider as tt, VColorPicker as it } from "../../../assets/vuetify.js";
10
- const x = [
1
+ var pe = Object.defineProperty;
2
+ var we = (s, e, i) => e in s ? pe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
3
+ var Q = (s, e, i) => (we(s, typeof e != "symbol" ? e + "" : e, i), i);
4
+ import { VcsCameraPrimitive as me, VcsObject as ge, VcsEvent as x, AbstractInteraction as _e, EventType as N, Projection as I, SessionType as Ce, CesiumMap as D, startEditFeaturesSession as Ee, startEditGeometrySession as ye, VectorLayer as Ve, wgs84Projection as be, maxZIndex as Me, markVolatile as Te, Viewpoint as Oe, TransformationMode as Se, Category as Pe, moduleIdSymbol as Ae } from "../../../assets/core.js";
5
+ import { Color as j, Matrix4 as Ie, Transforms as Re, Primitive as ee, GeometryInstance as te, SphereGeometry as $e, ColorGeometryInstanceAttribute as ie, PerInstanceColorAppearance as se, SphereOutlineGeometry as Ne, Math as T, Cartesian3 as O, ShadowMap as xe, Camera as De, HeightReference as Le } from "../../../assets/cesium.js";
6
+ import { shallowRef as K, ref as A, nextTick as ke, inject as oe, computed as ne, reactive as W, watchEffect as Fe, watch as R, onMounted as je, onUnmounted as We } from "../../../assets/vue.js";
7
+ import { ol$Observable$unByKey as Be, Feature as ze, ol$geom$Point as Ge, ol$style$Style as He } from "../../../assets/ol.js";
8
+ import { VcsTextField as Ue, VcsSlider as Ke, VcsLabel as ae, VcsFormSection as le, VcsSelect as ce, VcsFormButton as Xe, VcsFeatureTransforms as Ye, makeEditorCollectionComponentClass as Je, WindowSlot as Ze, ToolboxType as qe, createListExportAction as Qe, downloadText as et, createListImportAction as tt, AbstractConfigEditor as it } from "../../../assets/ui.js";
9
+ import { VContainer as de, VRow as he, VCol as ue, VDivider as st, VColorPicker as ot } from "../../../assets/vuetify.js";
10
+ const $ = [
11
11
  [String, "string"],
12
12
  [Number, "number"],
13
13
  [Boolean, "boolean"],
@@ -15,160 +15,160 @@ const x = [
15
15
  [void 0, "undefined"],
16
16
  [Symbol, "symbol"]
17
17
  ];
18
- function W(s) {
18
+ function B(s) {
19
19
  const e = {};
20
20
  if (!s || e.toString(s) !== "[object Object]")
21
21
  return !1;
22
- const t = Object.getPrototypeOf(s);
23
- if (!t)
22
+ const i = Object.getPrototypeOf(s);
23
+ if (!i)
24
24
  return !0;
25
- const i = e.hasOwnProperty, o = i.call(t, "constructor") && t.constructor;
26
- return typeof o == "function" && i.toString.call(o) === i.toString.call(Object);
25
+ const t = e.hasOwnProperty, o = t.call(i, "constructor") && i.constructor;
26
+ return typeof o == "function" && t.toString.call(o) === t.toString.call(Object);
27
27
  }
28
- function M(s, e) {
28
+ function b(s, e) {
29
29
  if (s === null)
30
30
  return "null";
31
31
  if (typeof s > "u")
32
32
  return "undefined";
33
33
  if (e)
34
34
  return typeof s;
35
- let t;
35
+ let i;
36
36
  if (Array.isArray(s))
37
- t = `[${s.map((o) => M(o, e)).join(",")}]`;
37
+ i = `[${s.map((o) => b(o, e)).join(",")}]`;
38
38
  else
39
39
  try {
40
- t = JSON.stringify(s);
40
+ i = JSON.stringify(s);
41
41
  } catch {
42
- t = typeof s;
42
+ i = typeof s;
43
43
  }
44
- return t = t || typeof s, t.length > 20 ? `${t.substr(0, 20)}...` : t;
44
+ return i = i || typeof s, i.length > 20 ? `${i.substr(0, 20)}...` : i;
45
45
  }
46
- function st(s, e) {
47
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" ? s === e ? !1 : `Expected ${M(s)} to equal ${e.toString()}` : null;
46
+ function nt(s, e) {
47
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" ? s === e ? !1 : `Expected ${b(s)} to equal ${e.toString()}` : null;
48
48
  }
49
- function ot(s, e, t) {
49
+ function rt(s, e, i) {
50
50
  if (Array.isArray(e)) {
51
51
  if (e.length !== 1)
52
52
  throw new Error("Array patterns may only have on type");
53
53
  if (Array.isArray(s)) {
54
- let i = !1;
55
- return s.findIndex((r) => {
54
+ let t = !1;
55
+ return s.findIndex((n) => {
56
56
  try {
57
- z(r, e[0], t);
57
+ z(n, e[0], i);
58
58
  } catch (a) {
59
- i = a.message.replace(/Match failed:\s/, "");
59
+ t = a.message.replace(/Match failed:\s/, "");
60
60
  }
61
- return i;
62
- }) > -1 ? `${i} in ${M(s)}` : !1;
61
+ return t;
62
+ }) > -1 ? `${t} in ${b(s)}` : !1;
63
63
  }
64
- return `Expected ${M(s)} to be an Array`;
64
+ return `Expected ${b(s)} to be an Array`;
65
65
  }
66
66
  return null;
67
67
  }
68
- function X(s, e, t) {
69
- const i = t ? `${t}.` : "";
70
- if (!W(s))
71
- return `Expected ${M(s)} to be a plain Object`;
72
- let r = !1;
73
- const a = Object.keys(e).find((l) => {
74
- const n = s[l];
75
- if (W(e[l]))
76
- r = X(n, e[l], i + l);
68
+ function X(s, e, i) {
69
+ const t = i ? `${i}.` : "";
70
+ if (!B(s))
71
+ return `Expected ${b(s)} to be a plain Object`;
72
+ let n = !1;
73
+ const a = Object.keys(e).find((c) => {
74
+ const r = s[c];
75
+ if (B(e[c]))
76
+ n = X(r, e[c], t + c);
77
77
  else
78
78
  try {
79
- z(n, e[l]);
80
- } catch (u) {
81
- r = u.message.replace(/Match failed:\s/, "");
79
+ z(r, e[c]);
80
+ } catch (f) {
81
+ n = f.message.replace(/Match failed:\s/, "");
82
82
  }
83
- return r;
83
+ return n;
84
84
  });
85
- return a ? `${r} in object.${i}${a}` : !1;
85
+ return a ? `${n} in object.${t}${a}` : !1;
86
86
  }
87
- function nt(s, e) {
87
+ function at(s, e) {
88
88
  if (e === Number)
89
- return Number.isFinite(s) ? !1 : `expected ${M(s)} to be a number, excluding NaN`;
90
- for (let t = x.length; t--; )
91
- if (e === x[t][0])
92
- return typeof s === x[t][1] ? !1 : `expected ${M(s)} to be a ${x[t][1]}`;
89
+ return Number.isFinite(s) ? !1 : `expected ${b(s)} to be a number, excluding NaN`;
90
+ for (let i = $.length; i--; )
91
+ if (e === $[i][0])
92
+ return typeof s === $[i][1] ? !1 : `expected ${b(s)} to be a ${$[i][1]}`;
93
93
  return null;
94
94
  }
95
- function K(s) {
95
+ function Y(s) {
96
96
  if (s === null)
97
97
  return "null";
98
- const e = x.find((o) => o[0] === s);
98
+ const e = $.find((o) => o[0] === s);
99
99
  if (e)
100
100
  return e[1];
101
- let t = s.toString();
101
+ let i = s.toString();
102
102
  if (s.className)
103
103
  return s.className;
104
- const i = t.match(/function (.*)\(/);
105
- if (i && i.length > 1)
106
- return i[1];
107
- if (W(s)) {
104
+ const t = i.match(/function (.*)\(/);
105
+ if (t && t.length > 1)
106
+ return t[1];
107
+ if (B(s)) {
108
108
  const o = {};
109
- Object.keys(s).forEach((r) => {
110
- o[r] = K(s[r]);
109
+ Object.keys(s).forEach((n) => {
110
+ o[n] = Y(s[n]);
111
111
  });
112
112
  try {
113
- t = `Object of ${JSON.stringify(o)}`;
113
+ i = `Object of ${JSON.stringify(o)}`;
114
114
  } catch {
115
- t = "Object";
115
+ i = "Object";
116
116
  }
117
117
  }
118
- return t;
118
+ return i;
119
119
  }
120
- function he(s, e, t) {
121
- const i = t ? `${t}.` : "";
120
+ function fe(s, e, i) {
121
+ const t = i ? `${i}.` : "";
122
122
  let o = !1;
123
123
  return Object.keys(s).find((a) => {
124
- if (W(e[a])) {
125
- const l = s[a];
126
- o = he(l, e[a], i + a);
124
+ if (B(e[a])) {
125
+ const c = s[a];
126
+ o = fe(c, e[a], t + a);
127
127
  } else
128
- e[a] || (o = `Found additional key ${i}${a}`);
128
+ e[a] || (o = `Found additional key ${t}${a}`);
129
129
  return o = o ? o.replace(/\sin.*/, "") : !1, o;
130
- }) ? `${o} in ${M(s)}` : !1;
130
+ }) ? `${o} in ${b(s)}` : !1;
131
131
  }
132
- function rt(s, e, t) {
133
- const i = function(a, l) {
134
- if (l == null)
135
- return a === l ? !1 : `Expected ${M(a)} to be ${l}`;
136
- const n = nt(a, l);
137
- if (n !== null)
138
- return n;
139
- const u = st(a, l);
140
- if (u !== null)
141
- return u;
142
- if (Array.isArray(l))
143
- return ot(a, l, t);
144
- if (l instanceof Function)
145
- return a instanceof l ? !1 : `Expected ${M(a, !0)} to be of Type ${K(l)}`;
146
- if (l === Object)
132
+ function lt(s, e, i) {
133
+ const t = function(a, c) {
134
+ if (c == null)
135
+ return a === c ? !1 : `Expected ${b(a)} to be ${c}`;
136
+ const r = at(a, c);
137
+ if (r !== null)
138
+ return r;
139
+ const f = nt(a, c);
140
+ if (f !== null)
141
+ return f;
142
+ if (Array.isArray(c))
143
+ return rt(a, c, i);
144
+ if (c instanceof Function)
145
+ return a instanceof c ? !1 : `Expected ${b(a, !0)} to be of Type ${Y(c)}`;
146
+ if (c === Object)
147
147
  return X(a, {});
148
- if (typeof l != "object")
149
- throw new Error(`Cannot handler pattern ${l}`);
150
- const c = X(a, l);
151
- return c || (t ? he(a, l) : !1);
148
+ if (typeof c != "object")
149
+ throw new Error(`Cannot handler pattern ${c}`);
150
+ const h = X(a, c);
151
+ return h || (i ? fe(a, c) : !1);
152
152
  };
153
153
  let o;
154
- return Array.isArray(e) && e.length > 1 ? e.every((a) => i(s, a)) && (o = `Expected ${M(s)} to be a ${e.map((a) => K(a)).join(" or ")}`) : o = i(s, e), o;
154
+ return Array.isArray(e) && e.length > 1 ? e.every((a) => t(s, a)) && (o = `Expected ${b(s)} to be a ${e.map((a) => Y(a)).join(" or ")}`) : o = t(s, e), o;
155
155
  }
156
- function z(s, e, t) {
157
- const i = rt(s, e, t);
158
- if (i)
159
- throw new Error(`Match failed: ${i}`);
156
+ function z(s, e, i) {
157
+ const t = lt(s, e, i);
158
+ if (t)
159
+ throw new Error(`Match failed: ${t}`);
160
160
  return !1;
161
161
  }
162
- function at(s, e, t) {
162
+ function ct(s, e, i) {
163
163
  if (s != null) {
164
- const i = Object.values(e).find((o) => o == s);
165
- if (i != null)
166
- return i;
164
+ const t = Object.values(e).find((o) => o == s);
165
+ if (t != null)
166
+ return t;
167
167
  }
168
- return t;
168
+ return i;
169
169
  }
170
- const lt = new k(), G = new Pe();
171
- class ct extends pe {
170
+ const dt = new j(), H = new Ie();
171
+ class ht extends me {
172
172
  constructor(e) {
173
173
  super(e), this.spot = e.spot;
174
174
  }
@@ -181,49 +181,49 @@ class ct extends pe {
181
181
  if (this.spot)
182
182
  super.update(e);
183
183
  else {
184
- const t = this._planesPrimitives, i = this._outlinePrimitives;
185
- t.length === 0 && (Ae.eastNorthUpToFixedFrame(
184
+ const i = this._planesPrimitives, t = this._outlinePrimitives;
185
+ i.length === 0 && (Re.eastNorthUpToFixedFrame(
186
186
  this._camera.positionWC,
187
187
  void 0,
188
- G
189
- ), t[0] = new q({
188
+ H
189
+ ), i[0] = new ee({
190
190
  allowPicking: this.allowPicking,
191
- geometryInstances: new Q({
192
- geometry: new Ie({
191
+ geometryInstances: new te({
192
+ geometry: new $e({
193
193
  radius: 2
194
194
  }),
195
195
  attributes: {
196
- color: ee.fromColor(
197
- k.fromAlpha(this._color, 0.1, lt)
196
+ color: ie.fromColor(
197
+ j.fromAlpha(this._color, 0.1, dt)
198
198
  )
199
199
  },
200
- modelMatrix: G
200
+ modelMatrix: H
201
201
  }),
202
- appearance: new te({
202
+ appearance: new se({
203
203
  translucent: !0,
204
204
  flat: !0
205
205
  }),
206
206
  asynchronous: !1
207
- }), i[0] = new q({
207
+ }), t[0] = new ee({
208
208
  allowPicking: this.allowPicking,
209
- geometryInstances: new Q({
210
- geometry: new Re({
209
+ geometryInstances: new te({
210
+ geometry: new Ne({
211
211
  radius: 2
212
212
  }),
213
213
  attributes: {
214
- color: ee.fromColor(this._color)
214
+ color: ie.fromColor(this._color)
215
215
  },
216
- modelMatrix: G
216
+ modelMatrix: H
217
217
  }),
218
- appearance: new te({
218
+ appearance: new se({
219
219
  translucent: !1,
220
220
  flat: !0
221
221
  }),
222
222
  asynchronous: !1
223
223
  }));
224
- const { length: o } = t;
225
- for (let r = 0; r < o; ++r)
226
- i[r].update(e), t[r].update(e);
224
+ const { length: o } = i;
225
+ for (let n = 0; n < o; ++n)
226
+ t[n].update(e), i[n].update(e);
227
227
  }
228
228
  }
229
229
  }
@@ -231,14 +231,14 @@ const w = {
231
231
  CONE: "cone",
232
232
  THREESIXTY: "360"
233
233
  };
234
- function dt(s, e) {
235
- const t = new Ne(s), i = (
234
+ function ut(s, e) {
235
+ const i = new De(s), t = (
236
236
  /** @type {import("@vcmap-cesium/engine").PerspectiveFrustum} */
237
- t.frustum
237
+ i.frustum
238
238
  );
239
- return i.fov = e.fov, i.near = e.near, i.aspectRatio = e.aspectRatio, i.far = e.far, t;
239
+ return t.fov = e.fov, t.near = e.near, t.aspectRatio = e.aspectRatio, t.far = e.far, i;
240
240
  }
241
- const E = class E extends we {
241
+ const E = class E extends ge {
242
242
  static get className() {
243
243
  return "Viewshed";
244
244
  }
@@ -249,7 +249,7 @@ const E = class E extends we {
249
249
  static getDefaultOptions() {
250
250
  return {
251
251
  frustum: {
252
- fov: O.PI / 3,
252
+ fov: T.PI / 3,
253
253
  near: 1,
254
254
  aspectRatio: 1,
255
255
  far: 300
@@ -266,32 +266,31 @@ const E = class E extends we {
266
266
  }
267
267
  /**
268
268
  * @param {ViewshedOptions} options The options for the viewshed.
269
- * @param {import("@vcmap/core").CesiumMap} [cesiumMap] The cesiumMap the viewshed should be applied to. If this parameter is passed, the viewshed is activated and all other viewsheds are deactivated.
270
269
  */
271
- constructor(e, t) {
272
- var i, o, r, a, l, n;
270
+ constructor(e) {
271
+ var i, t, o, n, a, c;
273
272
  super(e), this._cesiumMap = null, this._shadowCamera = null, this._scene = null, this._frustumOptions = {
274
273
  fov: ((i = e.frustumOptions) == null ? void 0 : i.fov) || E.getDefaultOptions().frustum.fov,
275
- far: ((o = e.frustumOptions) == null ? void 0 : o.far) || E.getDefaultOptions().frustum.far,
276
- near: ((r = e.frustumOptions) == null ? void 0 : r.near) || E.getDefaultOptions().frustum.near,
277
- aspectRatio: ((a = e.frustumOptions) == null ? void 0 : a.aspectRatio) || E.getDefaultOptions().frustum.aspectRatio
274
+ far: ((t = e.frustumOptions) == null ? void 0 : t.far) || E.getDefaultOptions().frustum.far,
275
+ near: ((o = e.frustumOptions) == null ? void 0 : o.near) || E.getDefaultOptions().frustum.near,
276
+ aspectRatio: ((n = e.frustumOptions) == null ? void 0 : n.aspectRatio) || E.getDefaultOptions().frustum.aspectRatio
278
277
  }, this._headingPitchRollValues = e.orientation || {
279
278
  ...E.getDefaultOptions().orientation
280
- }, this._position = e.position || E.getDefaultOptions().position, this._viewshedType = at(e.viewshedType, w), this._colors = {
281
- visibleColor: k.fromCssColorString(
282
- ((l = e.colorOptions) == null ? void 0 : l.visibleColor) || E.getDefaultOptions().visibleColor
279
+ }, this._position = e.position || E.getDefaultOptions().position, this._viewshedType = ct(e.viewshedType, w), this._colors = {
280
+ visibleColor: j.fromCssColorString(
281
+ ((a = e.colorOptions) == null ? void 0 : a.visibleColor) || E.getDefaultOptions().visibleColor
283
282
  ),
284
- shadowColor: k.fromCssColorString(
285
- ((n = e.colorOptions) == null ? void 0 : n.shadowColor) || E.getDefaultOptions().shadowColor
283
+ shadowColor: j.fromCssColorString(
284
+ ((c = e.colorOptions) == null ? void 0 : c.shadowColor) || E.getDefaultOptions().shadowColor
286
285
  )
287
- }, this._heightOffset = e.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!e.showPrimitive, this._shadowMapChangedListener = null, this._positionChanged = new L(), t ? this.activate(t) : this._active = !1;
286
+ }, this._heightOffset = e.heightOffset || 0, this._shadowMap = null, this._primitive = null, this._showPrimitive = !!e.showPrimitive, this._positionChanged = new x(), this._active = !1;
288
287
  }
289
288
  /**
290
289
  * Sets a new position for the shadow map. If no shadow map was created yet, due to missing position, this method triggers the creation of a shadow map.
291
290
  * @param {import("ol/coordinate").Coordinate} coords The new positions coordinates in degrees
292
291
  */
293
292
  set position(e) {
294
- z(e, [Number]), this._position = e, this._shadowCamera && (this._shadowCamera.position = S.fromDegrees(
293
+ z(e, [Number]), this._position = e, this._shadowCamera && (this._shadowCamera.position = O.fromDegrees(
295
294
  e[0],
296
295
  e[1],
297
296
  e[2] + this._heightOffset
@@ -315,11 +314,11 @@ const E = class E extends we {
315
314
  * @param {number} value the offset that is added to the position height.
316
315
  */
317
316
  set heightOffset(e) {
318
- this._heightOffset = e, this._shadowCamera && (this._shadowCamera.position = S.fromDegrees(
317
+ this._heightOffset = e, this._shadowCamera && (this._shadowCamera.position = O.fromDegrees(
319
318
  this.position[0],
320
319
  this.position[1],
321
320
  this.position[2] + e
322
- ), this._updateShadowMap(), this._updatePrimitive());
321
+ ), this._updatePrimitive());
323
322
  }
324
323
  /**
325
324
  * Getter for height offset.
@@ -333,7 +332,7 @@ const E = class E extends we {
333
332
  * @param {number} value The distance in meters.
334
333
  */
335
334
  set distance(e) {
336
- this._frustumOptions.far = e > E.MIN_DISTANCE ? e : E.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
335
+ this._frustumOptions.far = e > E.MIN_DISTANCE ? e : E.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === w.THREESIXTY && this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
337
336
  }
338
337
  /**
339
338
  * Returns the reach of the viewshed.
@@ -347,23 +346,23 @@ const E = class E extends we {
347
346
  * @param {number} value The field of view in degrees.
348
347
  */
349
348
  set fov(e) {
350
- this._frustumOptions.fov = e * O.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = e * O.RADIANS_PER_DEGREE, this._updateShadowMap(), this._viewshedType === w.CONE && this._updatePrimitive());
349
+ this._frustumOptions.fov = e * T.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = e * T.RADIANS_PER_DEGREE, this._viewshedType === w.CONE && this._updatePrimitive());
351
350
  }
352
351
  /**
353
352
  * Returns the field of view.
354
353
  * @returns {number} The field of view in degrees.
355
354
  */
356
355
  get fov() {
357
- return this._frustumOptions.fov * O.DEGREES_PER_RADIAN;
356
+ return this._frustumOptions.fov * T.DEGREES_PER_RADIAN;
358
357
  }
359
358
  /**
360
359
  * Sets the heading of a cone viewshed. Does not have impact on 360 viewshed.
361
360
  * @param {number} value Heading in degrees.
362
361
  */
363
362
  set heading(e) {
364
- this._headingPitchRollValues.heading = e * O.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
363
+ this._headingPitchRollValues.heading = e * T.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.setView({
365
364
  orientation: {
366
- heading: e * O.RADIANS_PER_DEGREE,
365
+ heading: e * T.RADIANS_PER_DEGREE,
367
366
  pitch: this._shadowCamera.pitch,
368
367
  roll: 0
369
368
  }
@@ -374,16 +373,16 @@ const E = class E extends we {
374
373
  * @returns {number} The heading in degress.
375
374
  */
376
375
  get heading() {
377
- return this._headingPitchRollValues.heading * O.DEGREES_PER_RADIAN;
376
+ return this._headingPitchRollValues.heading * T.DEGREES_PER_RADIAN;
378
377
  }
379
378
  /**
380
379
  * Sets the pitch of a cone viewshed. 0 is horizontal. Does not have impact on 360 viewshed.
381
380
  * @param {number} value The pitch in degrees.
382
381
  */
383
382
  set pitch(e) {
384
- if (this._headingPitchRollValues.pitch = e * O.RADIANS_PER_DEGREE, this._shadowCamera) {
385
- const t = e * O.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
386
- this._shadowCamera.lookUp(t), this._viewshedType === w.CONE && this._updatePrimitive();
383
+ if (this._headingPitchRollValues.pitch = e * T.RADIANS_PER_DEGREE, this._shadowCamera) {
384
+ const i = e * T.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
385
+ this._shadowCamera.lookUp(i), this._viewshedType === w.CONE && this._updatePrimitive();
387
386
  }
388
387
  }
389
388
  /**
@@ -391,7 +390,7 @@ const E = class E extends we {
391
390
  * @returns {number} The pitch in degrees.
392
391
  */
393
392
  get pitch() {
394
- return this._headingPitchRollValues.pitch * O.DEGREES_PER_RADIAN;
393
+ return this._headingPitchRollValues.pitch * T.DEGREES_PER_RADIAN;
395
394
  }
396
395
  /**
397
396
  * Sets whether the primitive of the viewshed should be shown or not.
@@ -408,41 +407,46 @@ const E = class E extends we {
408
407
  return this._showPrimitive;
409
408
  }
410
409
  /**
411
- * Retruns the type of the Viewshed.
410
+ * Returns the type of the Viewshed.
412
411
  * @returns {ViewshedTypes}
413
412
  */
414
413
  get type() {
415
414
  return this._viewshedType;
416
415
  }
417
416
  /**
418
- * Deactivates the viewshed by removing primitve and removing shadowMap.
417
+ * @returns {ShadowMap|null}
418
+ */
419
+ get shadowMap() {
420
+ return this._shadowMap;
421
+ }
422
+ /**
423
+ * Deactivates the viewshed by removing primitive and removing shadowMap.
419
424
  */
420
425
  deactivate() {
421
- var e, t, i, o;
422
- this._active && (this._removePrimitive(), (e = this._shadowMapChangedListener) == null || e.call(this), ((i = (t = this._cesiumMap) == null ? void 0 : t.getScene()) == null ? void 0 : i.shadowMap) === this._shadowMap && this._cesiumMap.setDefaultShadowMap(), (o = this._shadowMap) == null || o.destroy(), this._shadowCamera = null, this._scene = null, this._cesiumMap = null, this._active = !1);
426
+ var e;
427
+ this._active && (this._removePrimitive(), this._shadowMap.enabled = !1, (e = this._shadowMap) == null || e.destroy(), this._shadowCamera = null, this._scene = null, this._cesiumMap = null, this._shadowMap = null, this._active = !1);
423
428
  }
424
429
  /**
425
- * Activates viewshed. Sets the CesiumMap and adds shadowMapChanged listener to CesiumMap. If viewshed is active but
430
+ * Activates viewshed.
426
431
  * @param {import("@vcmap/core").CesiumMap} cesiumMap The cesium map to which the shadow map of the viewshed is applied to.
427
432
  */
428
433
  activate(e) {
429
434
  if (this._active || (this._active = !0), e !== this._cesiumMap) {
430
435
  this._cesiumMap = e;
431
- const t = e.getScene();
432
- if (t)
433
- this._shadowCamera = dt(t, this._frustumOptions), this._position && (this.position = this._position), this._scene = t;
436
+ const i = e.getScene();
437
+ if (i)
438
+ this._shadowCamera = ut(i, this._frustumOptions), this._position && (this.position = this._position), this._scene = i;
434
439
  else
435
440
  throw new Error("CesiumMap contains no scene");
436
- this._updateShadowMap(), this._updatePrimitive(), this._shadowMapChangedListener = this._cesiumMap.shadowMapChanged.addEventListener(() => {
437
- this.deactivate();
438
- });
441
+ this._updateShadowMap(), this._updatePrimitive();
439
442
  }
440
443
  }
441
444
  /**
442
445
  * Updates the shadow map by creating a new one and applying all the current parameters.
443
446
  */
444
447
  _updateShadowMap() {
445
- !this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || (this._shadowMap = new $e({
448
+ var e;
449
+ !this._active || !this._shadowCamera || !this._cesiumMap || !this._scene || ((e = this._shadowMap) == null || e.destroy(), this._shadowMap = new xe({
446
450
  // @ts-ignore
447
451
  context: this._scene.context,
448
452
  lightCamera: this._shadowCamera,
@@ -457,11 +461,11 @@ const E = class E extends we {
457
461
  }), this._shadowMap.viewshed = this._colors, this._cesiumMap.setShadowMap(this._shadowMap));
458
462
  }
459
463
  _removePrimitive() {
460
- var e;
461
- this._primitive && ((e = this._scene) == null || e.primitives.remove(this._primitive), this._primitive.destroy(), this._primitive = null);
464
+ var e, i, t;
465
+ this._primitive && !((i = (e = this._primitive).isDestroyed) != null && i.call(e)) && ((t = this._scene) == null || t.primitives.remove(this._primitive), this._primitive.destroy(), this._primitive = null);
462
466
  }
463
467
  _updatePrimitive() {
464
- this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new ct({
468
+ this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new ht({
465
469
  camera: this._shadowCamera,
466
470
  allowPicking: !1,
467
471
  spot: this._viewshedType === w.CONE
@@ -474,13 +478,13 @@ const E = class E extends we {
474
478
  lookAt(e) {
475
479
  if (!this._shadowCamera)
476
480
  return;
477
- const t = S.fromDegrees(e[0], e[1], e[2]);
478
- if (this.distance = S.distance(this._shadowCamera.position, t), this.type === w.CONE && !t.equals(this._shadowCamera.position)) {
479
- const i = new S();
480
- S.subtract(t, this._shadowCamera.position, t), S.normalize(t, t), S.normalize(this._shadowCamera.position, i), this._shadowCamera.setView({
481
+ const i = O.fromDegrees(e[0], e[1], e[2]);
482
+ if (this.distance = O.distance(this._shadowCamera.position, i), this.type === w.CONE && !i.equals(this._shadowCamera.position)) {
483
+ const t = new O();
484
+ O.subtract(i, this._shadowCamera.position, i), O.normalize(i, i), O.normalize(this._shadowCamera.position, t), this._shadowCamera.setView({
481
485
  orientation: {
482
- direction: t,
483
- up: i
486
+ direction: i,
487
+ up: t
484
488
  }
485
489
  }), this._headingPitchRollValues.heading = this._shadowCamera.heading, this._headingPitchRollValues.pitch = this._shadowCamera.pitch;
486
490
  }
@@ -509,18 +513,20 @@ const E = class E extends we {
509
513
  * Destroys the viewshed.
510
514
  */
511
515
  destroy() {
512
- this.deactivate();
516
+ var t;
517
+ const e = this._cesiumMap, i = this._shadowMap;
518
+ this.deactivate(), ((t = e == null ? void 0 : e.getScene()) == null ? void 0 : t.shadowMap) === i && e.setDefaultShadowMap();
513
519
  }
514
520
  };
515
- Z(E, "MIN_DISTANCE", 10);
516
- let T = E;
517
- class ht extends me {
521
+ Q(E, "MIN_DISTANCE", 10);
522
+ let M = E;
523
+ class ft extends _e {
518
524
  /**
519
525
  *
520
526
  * @param {import("./viewshed").default} viewshed
521
527
  */
522
528
  constructor(e) {
523
- super(D.CLICKMOVE), this._viewshed = e, this._positioned = new L(), this._finished = new L(), this._position = !1, this.setActive();
529
+ super(N.CLICKMOVE), this._viewshed = e, this._positioned = new x(), this._finished = new x(), this._position = !1, this.setActive();
524
530
  }
525
531
  get finished() {
526
532
  return this._finished;
@@ -529,237 +535,241 @@ class ht extends me {
529
535
  return this._positioned;
530
536
  }
531
537
  async pipe(e) {
532
- return e.position && (this._position ? (this._viewshed.lookAt(I.mercatorToWgs84(e.position)), e.type & D.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = I.mercatorToWgs84(e.position), e.type & D.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), e;
538
+ return e.position && (this._position ? (this._viewshed.lookAt(I.mercatorToWgs84(e.position)), e.type & N.CLICK && (this.setActive(!1), this._finished.raiseEvent(null))) : (this._viewshed.position = I.mercatorToWgs84(e.position), e.type & N.CLICK && (this._position = !0, this._positioned.raiseEvent(null)))), e;
533
539
  }
534
540
  destroy() {
535
541
  super.destroy(), this._finished.destroy(), this._positioned.destroy();
536
542
  }
537
543
  }
538
- const V = {
544
+ const y = {
539
545
  ABSOLUTE: "absolute",
540
546
  RELATIVE: "relative"
541
- }, g = {
547
+ }, m = {
542
548
  CREATE: "create",
543
549
  VIEW: "view",
544
550
  EDIT: "edit",
545
551
  MOVE: "move",
546
552
  MULTI_SELECT: "multiSelect"
547
- }, oe = 1.8;
548
- function ut(s) {
549
- const e = new Ee({
550
- projection: Ve.toJSON(),
551
- zIndex: ye - 1
553
+ }, re = 1.8;
554
+ function vt(s) {
555
+ const e = new Ve({
556
+ projection: be.toJSON(),
557
+ zIndex: Me - 1
552
558
  });
553
- be(e), e.activate();
554
- const t = new We(new Be(s));
555
- return t.setStyle(new ze({})), e.addFeatures([t]), e.vectorProperties.altitudeMode = xe.NONE, {
559
+ Te(e), e.activate();
560
+ const i = new ze(new Ge(s));
561
+ return i.setStyle(new He({})), e.addFeatures([i]), e.vectorProperties.altitudeMode = Le.NONE, {
556
562
  layer: e,
557
- feature: t,
563
+ feature: i,
558
564
  destroy() {
559
- t.dispose(), e.destroy();
565
+ i.dispose(), e.destroy();
560
566
  }
561
567
  };
562
568
  }
563
569
  function U(s, e) {
564
- const t = e === V.ABSOLUTE ? D.CLICKMOVE : D.NONE;
565
- s.setActive(t), s.pickPosition = t, s.pullPickedPosition = 1.8;
570
+ const i = e === y.ABSOLUTE ? N.CLICKMOVE : N.NONE;
571
+ s.setActive(i), s.pickPosition = i, s.pullPickedPosition = 1.8;
566
572
  }
567
- function ft(s, e, t) {
568
- const i = H(null), o = A(null), r = A(null), a = A(V.ABSOLUTE);
569
- let l = () => {
573
+ function pt(s, e, i) {
574
+ const t = K(null), o = A(null), n = A(null), a = A(y.ABSOLUTE);
575
+ let c = () => {
576
+ };
577
+ const r = K(null);
578
+ let f = () => {
570
579
  };
571
- const n = H(null);
572
- function u(h) {
573
- var f, d;
574
- o.value && i.value ? (i.value.deactivate(), t.setVisibility(i.value.name, !1)) : (f = i.value) == null || f.destroy(), i.value = h, (d = i.value) == null || d.activate(s.maps.activeMap);
580
+ function h() {
581
+ var l;
582
+ o.value && t.value ? (t.value.deactivate(), i.setVisibility(t.value.name, !1)) : (l = t.value) == null || l.destroy();
575
583
  }
576
- function c(h = !0) {
577
- l(), u(null), h && t.clearSelection(), o.value = null, r.value = null;
584
+ function v(l = !0) {
585
+ f(), c(), h(), t.value = null, l && i.clearSelection(), o.value = null, n.value = null;
578
586
  }
579
- async function m(h) {
580
- c(), await De();
581
- const { eventHandler: f } = s.maps, { featureInteraction: d } = f;
582
- i.value = new T(
583
- {
584
- viewshedType: h,
585
- colorOptions: {
586
- visibleColor: e.visibleColor,
587
- shadowColor: e.shadowColor
588
- },
589
- heightOffset: a.value === V.ABSOLUTE ? 0 : oe
587
+ function u(l) {
588
+ f(), h(), s.maps.activeMap instanceof D && (t.value = l, l.activate(s.maps.activeMap), f = s.maps.activeMap.shadowMapChanged.addEventListener((d) => {
589
+ var p;
590
+ d !== ((p = t.value) == null ? void 0 : p.shadowMap) && v(!1);
591
+ }));
592
+ }
593
+ async function _(l) {
594
+ v(), await ke();
595
+ const { eventHandler: d } = s.maps, { featureInteraction: p } = d, g = new M({
596
+ viewshedType: l,
597
+ colorOptions: {
598
+ visibleColor: e.visibleColor,
599
+ shadowColor: e.shadowColor
590
600
  },
591
- /** @type {import("@vcmap/core").CesiumMap} */
592
- s.maps.activeMap
593
- );
594
- const p = new ht(i.value);
595
- p.finished.addEventListener(() => {
596
- l(), i.value ? (i.value.showPrimitive = !0, r.value = g.EDIT) : c();
601
+ heightOffset: a.value === y.ABSOLUTE ? 0 : re
602
+ });
603
+ u(g);
604
+ const C = new ft(t.value);
605
+ C.finished.addEventListener(() => {
606
+ c(), t.value ? (t.value.showPrimitive = !0, n.value = m.EDIT) : v();
597
607
  });
598
- const C = f.addExclusiveInteraction(
599
- p,
608
+ const k = d.addExclusiveInteraction(
609
+ C,
600
610
  () => {
601
- p.destroy();
611
+ C.destroy();
602
612
  }
603
613
  );
604
- U(d, a.value), p.positioned.addEventListener(() => {
605
- U(d, V.ABSOLUTE);
606
- }), l = () => {
607
- C(), p.destroy(), d.setActive(), l = () => {
614
+ U(p, a.value), C.positioned.addEventListener(() => {
615
+ U(p, y.ABSOLUTE);
616
+ }), c = () => {
617
+ k(), C.destroy(), p.setActive(), c = () => {
608
618
  };
609
- }, r.value = g.CREATE;
619
+ }, n.value = m.CREATE;
610
620
  }
611
- function v(h) {
612
- var f;
613
- if (i.value && h) {
614
- l();
621
+ function V(l) {
622
+ var d;
623
+ if (t.value && l) {
624
+ c();
615
625
  const {
616
- layer: d,
617
- feature: p,
626
+ layer: p,
627
+ feature: g,
618
628
  destroy: C
619
- } = ut(i.value.position);
620
- s.layers.add(d), a.value === V.ABSOLUTE ? (n.value = _e(s, d), n.value.setFeatures([p])) : (n.value = Ce(s, d), n.value.setFeature(p)), n.value.stopped.addEventListener(() => {
621
- l();
629
+ } = vt(t.value.position);
630
+ s.layers.add(p), a.value === y.ABSOLUTE ? (r.value = Ee(s, p), r.value.setFeatures([g])) : (r.value = ye(s, p), r.value.setFeature(g)), r.value.stopped.addEventListener(() => {
631
+ c();
622
632
  });
623
- const b = (f = p.getGeometry()) == null ? void 0 : f.on("change", () => {
624
- i.value ? i.value.position = I.mercatorToWgs84(
633
+ const k = (d = g.getGeometry()) == null ? void 0 : d.on("change", () => {
634
+ t.value ? t.value.position = I.mercatorToWgs84(
625
635
  /** @type {import("ol/geom").Point} */
626
- p.getGeometry().getCoordinates()
627
- ) : c();
636
+ g.getGeometry().getCoordinates()
637
+ ) : v();
628
638
  });
629
- r.value = g.MOVE, l = () => {
630
- var N;
631
- l = () => {
632
- }, b && je(b), (N = n.value) == null || N.stop(), n.value = null, s.layers.remove(d), C(), r.value = g.EDIT;
639
+ n.value = m.MOVE, c = () => {
640
+ var q;
641
+ c = () => {
642
+ }, k && Be(k), (q = r.value) == null || q.stop(), r.value = null, s.layers.remove(p), C(), n.value = m.EDIT;
633
643
  };
634
644
  } else
635
- l();
645
+ c();
636
646
  }
637
- function _(h, f) {
638
- l(), i.value !== f && (u(f), a.value = f.heightOffset ? V.RELATIVE : V.ABSOLUTE), o.value = !!f.properties.title, r.value = h, o.value && t.setVisibility(f.name, !0);
647
+ function P(l, d) {
648
+ c(), t.value !== d && (u(d), a.value = d.heightOffset ? y.RELATIVE : y.ABSOLUTE), o.value = !!d.properties.title, n.value = l, o.value && i.setVisibility(d.name, !0);
639
649
  }
640
- const y = [
641
- t.collectionComponent.collection.removed.addEventListener(
642
- (h) => {
643
- var f;
644
- t.remove(h.name), ((f = i.value) == null ? void 0 : f.name) === h.name && c();
650
+ const L = [
651
+ i.collectionComponent.collection.removed.addEventListener(
652
+ (l) => {
653
+ var d;
654
+ i.remove(l.name), ((d = t.value) == null ? void 0 : d.name) === l.name && v();
645
655
  }
646
656
  ),
647
- t.renamed.addEventListener(({ item: h, title: f }) => {
648
- var p;
649
- const d = s.windowManager.get(
650
- `${t.collectionComponent.id}-editor`
657
+ i.renamed.addEventListener(({ item: l, title: d }) => {
658
+ var g;
659
+ const p = s.windowManager.get(
660
+ `${i.collectionComponent.id}-editor`
651
661
  );
652
- d && ((p = i.value) == null ? void 0 : p.name) === h.name && (d.state.headerTitle = f);
662
+ p && ((g = t.value) == null ? void 0 : g.name) === l.name && (p.state.headerTitle = d);
653
663
  }),
654
- t.visibilityChanged.addEventListener((h) => {
655
- var d;
656
- const f = ((d = i.value) == null ? void 0 : d.name) === h.name;
657
- f ? c() : (_(g.VIEW, h), t.clearSelection()), t.setVisibility(h.name, !f);
664
+ i.visibilityChanged.addEventListener((l) => {
665
+ var p;
666
+ const d = ((p = t.value) == null ? void 0 : p.name) === l.name;
667
+ d ? v() : (P(m.VIEW, l), i.clearSelection()), i.setVisibility(l.name, !d);
658
668
  })
659
669
  ];
660
- function $(h) {
661
- if (!(h === a.value || !i.value)) {
662
- if (a.value = h, r.value === g.MOVE && l(), r.value === g.CREATE)
670
+ function G(l) {
671
+ if (!(l === a.value || !t.value)) {
672
+ if (a.value = l, n.value === m.MOVE && c(), n.value === m.CREATE)
663
673
  U(
664
674
  s.maps.eventHandler.featureInteraction,
665
- h
666
- ), i.value.heightOffset = h === V.ABSOLUTE ? 0 : oe;
667
- else if (r.value === g.EDIT) {
668
- const { position: f, heightOffset: d } = i.value;
669
- h === V.RELATIVE ? s.maps.activeMap.getHeightFromTerrain([I.wgs84ToMercator(f)]).then((p) => {
670
- const C = I.mercatorToWgs84(p[0]);
671
- i.value && (i.value.heightOffset = f[2] - C[2], i.value.position = C);
672
- }) : (i.value.position = [
673
- f[0],
674
- f[1],
675
- f[2] + d
676
- ], i.value.heightOffset = 0);
675
+ l
676
+ ), t.value.heightOffset = l === y.ABSOLUTE ? 0 : re;
677
+ else if (n.value === m.EDIT) {
678
+ const { position: d, heightOffset: p } = t.value;
679
+ l === y.RELATIVE ? s.maps.activeMap.getHeightFromTerrain([I.wgs84ToMercator(d)]).then((g) => {
680
+ const C = I.mercatorToWgs84(g[0]);
681
+ t.value && (t.value.heightOffset = d[2] - C[2], t.value.position = C);
682
+ }) : (t.value.position = [
683
+ d[0],
684
+ d[1],
685
+ d[2] + p
686
+ ], t.value.heightOffset = 0);
677
687
  }
678
688
  }
679
689
  }
680
690
  return {
681
- currentViewshed: i,
691
+ currentViewshed: t,
682
692
  currentIsPersisted: o,
683
- currentEditSession: n,
684
- createViewshed: m,
685
- viewViewshed(h) {
686
- _(g.VIEW, h);
693
+ currentEditSession: r,
694
+ createViewshed: _,
695
+ viewViewshed(l) {
696
+ P(m.VIEW, l);
687
697
  },
688
- editViewshed(h) {
689
- _(g.EDIT, h), o.value && (t.setSelection(h.name), t.collectionComponent.openEditorWindow(h));
698
+ editViewshed(l) {
699
+ P(m.EDIT, l), o.value && (i.setSelection(l.name), i.collectionComponent.openEditorWindow(l));
690
700
  },
691
701
  persistCurrent() {
692
- i.value && (t.add(i.value), o.value = !0, t.setSelection(i.value.name), t.setVisibility(i.value.name, !0));
702
+ t.value && (i.add(t.value), o.value = !0, i.setSelection(t.value.name), i.setVisibility(t.value.name, !0));
693
703
  },
694
- moveCurrentViewshed: v,
704
+ moveCurrentViewshed: V,
695
705
  setupMultiSelect() {
696
- l(), r.value = g.MULTI_SELECT, u(null);
706
+ c(), n.value = m.MULTI_SELECT, h(), t.value = null;
697
707
  },
698
- mode: r,
708
+ mode: n,
699
709
  heightMode: a,
700
- changeHeightMode: $,
710
+ changeHeightMode: G,
701
711
  async placeCurrentFeaturesOnTerrain() {
702
- var h, f;
703
- if (i.value && ((h = n.value) == null ? void 0 : h.type) === ge.EDIT_FEATURES && s.maps.activeMap instanceof B) {
704
- const p = (await s.maps.activeMap.getHeightFromTerrain([
705
- I.wgs84ToMercator((f = i.value) == null ? void 0 : f.position)
706
- ]))[0][2] - i.value.position[2];
707
- n.value.translate(0, 0, p);
712
+ var l, d;
713
+ if (t.value && ((l = r.value) == null ? void 0 : l.type) === Ce.EDIT_FEATURES && s.maps.activeMap instanceof D) {
714
+ const g = (await s.maps.activeMap.getHeightFromTerrain([
715
+ I.wgs84ToMercator((d = t.value) == null ? void 0 : d.position)
716
+ ]))[0][2] - t.value.position[2];
717
+ r.value.translate(0, 0, g);
708
718
  }
709
719
  },
710
- stop: c,
720
+ stop: v,
711
721
  destroy() {
712
- c(), y.forEach((h) => h());
722
+ v(), L.forEach((l) => l());
713
723
  }
714
724
  };
715
725
  }
716
- function ue(s, e, t, i, o, r, a, l) {
717
- var n = typeof s == "function" ? s.options : s;
718
- e && (n.render = e, n.staticRenderFns = t, n._compiled = !0), i && (n.functional = !0), r && (n._scopeId = "data-v-" + r);
719
- var u;
720
- if (a ? (u = function(v) {
721
- v = v || // cached call
726
+ function ve(s, e, i, t, o, n, a, c) {
727
+ var r = typeof s == "function" ? s.options : s;
728
+ e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), t && (r.functional = !0), n && (r._scopeId = "data-v-" + n);
729
+ var f;
730
+ if (a ? (f = function(u) {
731
+ u = u || // cached call
722
732
  this.$vnode && this.$vnode.ssrContext || // stateful
723
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !v && typeof __VUE_SSR_CONTEXT__ < "u" && (v = __VUE_SSR_CONTEXT__), o && o.call(this, v), v && v._registeredComponents && v._registeredComponents.add(a);
724
- }, n._ssrRegister = u) : o && (u = l ? function() {
733
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !u && typeof __VUE_SSR_CONTEXT__ < "u" && (u = __VUE_SSR_CONTEXT__), o && o.call(this, u), u && u._registeredComponents && u._registeredComponents.add(a);
734
+ }, r._ssrRegister = f) : o && (f = c ? function() {
725
735
  o.call(
726
736
  this,
727
- (n.functional ? this.parent : this).$root.$options.shadowRoot
737
+ (r.functional ? this.parent : this).$root.$options.shadowRoot
728
738
  );
729
- } : o), u)
730
- if (n.functional) {
731
- n._injectStyles = u;
732
- var c = n.render;
733
- n.render = function(_, y) {
734
- return u.call(y), c(_, y);
739
+ } : o), f)
740
+ if (r.functional) {
741
+ r._injectStyles = f;
742
+ var h = r.render;
743
+ r.render = function(_, V) {
744
+ return f.call(V), h(_, V);
735
745
  };
736
746
  } else {
737
- var m = n.beforeCreate;
738
- n.beforeCreate = m ? [].concat(m, u) : [u];
747
+ var v = r.beforeCreate;
748
+ r.beforeCreate = v ? [].concat(v, f) : [f];
739
749
  }
740
750
  return {
741
751
  exports: s,
742
- options: n
752
+ options: r
743
753
  };
744
754
  }
745
- const vt = {
746
- distance: [T.MIN_DISTANCE, 2e3],
755
+ const wt = {
756
+ distance: [M.MIN_DISTANCE, 2e3],
747
757
  fov: [25, 85],
748
758
  heading: [0, 360],
749
759
  pitch: [-90, 90]
750
- }, pt = {
760
+ }, mt = {
751
761
  components: {
752
- VcsTextField: Ge,
753
- VContainer: le,
754
- VRow: ce,
755
- VCol: de,
756
- VcsSlider: Ue,
757
- VcsLabel: ne,
758
- VcsFormSection: re,
759
- VDivider: tt,
760
- VcsSelect: ae,
761
- VcsFormButton: He,
762
- VcsFeatureTransforms: Xe
762
+ VcsTextField: Ue,
763
+ VContainer: de,
764
+ VRow: he,
765
+ VCol: ue,
766
+ VcsSlider: Ke,
767
+ VcsLabel: ae,
768
+ VcsFormSection: le,
769
+ VDivider: st,
770
+ VcsSelect: ce,
771
+ VcsFormButton: Xe,
772
+ VcsFeatureTransforms: Ye
763
773
  },
764
774
  name: "ViewshedWindow",
765
775
  props: {
@@ -777,244 +787,244 @@ const vt = {
777
787
  setup(s) {
778
788
  const e = (
779
789
  /** @type {import("./viewshedManager.js").ViewshedManager} */
780
- ie("manager")
781
- ), t = (
790
+ oe("manager")
791
+ ), i = (
782
792
  /** @type {import("@vcmap/ui").VcsUiApp} */
783
- ie("vcsApp")
793
+ oe("vcsApp")
784
794
  ), {
785
- currentViewshed: i,
795
+ currentViewshed: t,
786
796
  mode: o,
787
- currentIsPersisted: r
788
- } = e, a = se(() => s.selection);
789
- let l = () => {
797
+ currentIsPersisted: n
798
+ } = e, a = ne(() => s.selection);
799
+ let c = () => {
790
800
  };
791
- const n = j({
801
+ const r = W({
792
802
  X: void 0,
793
803
  Y: void 0,
794
804
  Z: void 0
795
- }), u = H();
796
- let c = () => {
805
+ }), f = K();
806
+ let h = () => {
797
807
  };
798
- const m = j({
808
+ const v = W({
799
809
  showPrimitive: !1,
800
810
  distance: void 0,
801
811
  fov: void 0,
802
812
  heading: void 0,
803
813
  pitch: void 0
804
- }), v = A();
814
+ }), u = A();
805
815
  function _() {
806
- i.value && (n.X = i.value.position[0], n.Y = i.value.position[1], n.Z = e.heightMode.value === V.ABSOLUTE ? i.value.position[2] : i.value.heightOffset);
816
+ t.value && (r.X = t.value.position[0], r.Y = t.value.position[1], r.Z = e.heightMode.value === y.ABSOLUTE ? t.value.position[2] : t.value.heightOffset);
807
817
  }
808
- function y() {
809
- _(), i.value && (m.distance = i.value.distance, m.fov = i.value.fov, m.heading = i.value.heading, m.pitch = i.value.pitch, m.showPrimitive = i.value.showPrimitive, v.value = i.value.type);
818
+ function V() {
819
+ _(), t.value && (v.distance = t.value.distance, v.fov = t.value.fov, v.heading = t.value.heading, v.pitch = t.value.pitch, v.showPrimitive = t.value.showPrimitive, u.value = t.value.type);
810
820
  }
811
- Le(() => {
812
- i.value && o.value !== g.CREATE && y();
821
+ Fe(() => {
822
+ t.value && o.value !== m.CREATE && V();
813
823
  }), R(
814
- i,
824
+ t,
815
825
  () => {
816
- i.value && (l(), l = i.value.positionChanged.addEventListener(() => {
817
- _(), c();
826
+ t.value && (c(), c = t.value.positionChanged.addEventListener(() => {
827
+ _(), h();
818
828
  }));
819
829
  },
820
830
  { immediate: !0 }
821
831
  );
822
- async function $() {
823
- var C, b;
824
- (C = i.value) == null || C.deactivate();
825
- const d = (
832
+ async function P() {
833
+ var p, g;
834
+ (p = t.value) == null || p.deactivate();
835
+ const l = (
826
836
  /** @type {import("@vcmap/core").CesiumMap} */
827
- (b = t.maps.activeMap.getScene()) == null ? void 0 : b.camera
828
- ), p = d == null ? void 0 : d.changed.addEventListener(() => {
829
- c();
837
+ (g = i.maps.activeMap.getScene()) == null ? void 0 : g.camera
838
+ ), d = l == null ? void 0 : l.changed.addEventListener(() => {
839
+ h();
830
840
  });
831
- c = () => {
832
- var N;
833
- p == null || p(), u.value = null, (N = i.value) == null || N.activate(t.maps.activeMap), c = () => {
841
+ h = () => {
842
+ var C;
843
+ d == null || d(), f.value = null, (C = t.value) == null || C.activate(i.maps.activeMap), h = () => {
834
844
  };
835
845
  };
836
846
  }
837
- Fe(() => {
838
- var p;
839
- const d = (p = s.getViewshed) == null ? void 0 : p.call(s);
840
- d && e.editViewshed(d);
841
- }), ke(() => {
842
- l(), c(), r.value || ((o.value === g.EDIT || o.value === g.MOVE) && i.value ? e.viewViewshed(i.value) : o.value === g.CREATE && e.stop()), a.value && (a.value.length > 1 ? e.setupMultiSelect() : a.value.length === 1 && i.value ? e.viewViewshed(i.value) : (
847
+ je(() => {
848
+ var d;
849
+ const l = (d = s.getViewshed) == null ? void 0 : d.call(s);
850
+ l && e.editViewshed(l);
851
+ }), We(() => {
852
+ c(), h(), n.value || ((o.value === m.EDIT || o.value === m.MOVE) && t.value ? e.viewViewshed(t.value) : o.value === m.CREATE && e.stop()), a.value && (a.value.length > 1 ? e.setupMultiSelect() : a.value.length === 1 && t.value ? e.viewViewshed(t.value) : (
843
853
  // when a persited viewshed is deselected, stops plugin
844
- !a.value.length && o.value === g.EDIT && e.stop(!1)
854
+ !a.value.length && o.value === m.EDIT && e.stop(!1)
845
855
  ));
846
- }), y();
847
- function h(d, p) {
848
- c(), i.value && (m[d] = p, i.value[d] = p);
856
+ }), V();
857
+ function L(l, d) {
858
+ h(), t.value && (v[l] = d, t.value[l] = d);
849
859
  }
850
- const f = se(() => {
851
- const d = [];
852
- return v.value === w.CONE && d.push({
860
+ const G = ne(() => {
861
+ const l = [];
862
+ return u.value === w.CONE && l.push({
853
863
  name: "jumpToViewpoint",
854
- title: u.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
864
+ title: f.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
855
865
  icon: "mdi-human-male",
856
- active: !!u.value,
866
+ active: !!f.value,
857
867
  async callback() {
858
- var p, C, b;
859
- e.moveCurrentViewshed(!1), i.value && !u.value ? (u.value = await ((p = t.maps.activeMap) == null ? void 0 : p.getViewpoint()), await ((C = t.maps.activeMap) == null ? void 0 : C.gotoViewpoint(
860
- new Me({
868
+ var d, p, g;
869
+ e.moveCurrentViewshed(!1), t.value && !f.value ? (f.value = await ((d = i.maps.activeMap) == null ? void 0 : d.getViewpoint()), await ((p = i.maps.activeMap) == null ? void 0 : p.gotoViewpoint(
870
+ new Oe({
861
871
  groundPosition: [
862
- i.value.position[0],
863
- i.value.position[1],
864
- i.value.position[2] + i.value.heightOffset
872
+ t.value.position[0],
873
+ t.value.position[1],
874
+ t.value.position[2] + t.value.heightOffset
865
875
  ],
866
- heading: i.value.heading,
867
- pitch: i.value.pitch,
876
+ heading: t.value.heading,
877
+ pitch: t.value.pitch,
868
878
  distance: 0,
869
879
  animate: !0
870
880
  // if not animate, async does not work and the cameraChanged listener is triggered immediately. alternatively set timeout
871
881
  })
872
- )), $()) : u.value && ((b = t.maps.activeMap) == null || b.gotoViewpoint(u.value), c());
882
+ )), P()) : f.value && ((g = i.maps.activeMap) == null || g.gotoViewpoint(f.value), h());
873
883
  }
874
- }), d.push({
884
+ }), l.push({
875
885
  name: "moveViewshed",
876
886
  title: "viewshed.move",
877
- icon: e.heightMode.value === V.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
878
- active: o.value === g.MOVE,
887
+ icon: e.heightMode.value === y.RELATIVE ? "$vcsEditVertices" : "mdi-axis-arrow",
888
+ active: o.value === m.MOVE,
879
889
  callback() {
880
890
  e.moveCurrentViewshed(
881
- o.value !== g.MOVE
891
+ o.value !== m.MOVE
882
892
  );
883
893
  }
884
- }), d.unshift({
894
+ }), l.unshift({
885
895
  name: "showPrimitive",
886
896
  title: "viewshed.showPrimitive",
887
897
  icon: "mdi-eye",
888
- active: m.showPrimitive,
898
+ active: v.showPrimitive,
889
899
  callback() {
890
- this.active = !this.active, h("showPrimitive", this.active);
900
+ this.active = !this.active, L("showPrimitive", this.active);
891
901
  }
892
- }), d;
902
+ }), l;
893
903
  });
894
904
  return {
895
- position: n,
896
- setPosition(d, p, C) {
897
- if (c(), !!i.value) {
898
- if (C === 2 && e.heightMode.value === V.RELATIVE)
899
- i.value.heightOffset = Number(d);
905
+ position: r,
906
+ setPosition(l, d, p) {
907
+ if (h(), !!t.value) {
908
+ if (p === 2 && e.heightMode.value === y.RELATIVE)
909
+ t.value.heightOffset = Number(l);
900
910
  else {
901
- const b = [...i.value.position];
902
- b[C] = Number(d), i.value.position = b;
911
+ const g = [...t.value.position];
912
+ g[p] = Number(l), t.value.position = g;
903
913
  }
904
- n[p] = Number(d);
914
+ r[d] = Number(l);
905
915
  }
906
916
  },
907
- parameters: m,
908
- setParameter: h,
909
- parameterRanges: vt,
910
- ViewshedPluginModes: g,
917
+ parameters: v,
918
+ setParameter: L,
919
+ parameterRanges: wt,
920
+ ViewshedPluginModes: m,
911
921
  viewshedMode: o,
912
- currentIsPersisted: r,
913
- viewshedType: v,
922
+ currentIsPersisted: n,
923
+ viewshedType: u,
914
924
  ViewshedTypes: w,
915
- HeightModes: V,
925
+ HeightModes: y,
916
926
  heightMode: e.heightMode,
917
- TransformationMode: Te,
927
+ TransformationMode: Se,
918
928
  changeHeightMode: e.changeHeightMode,
919
929
  async createNewViewshed() {
920
- await e.createViewshed(v.value);
930
+ await e.createViewshed(u.value);
921
931
  },
922
932
  addToMyWorkspace: () => e.persistCurrent(),
923
933
  cancel: () => e.stop(),
924
- headerActions: f
934
+ headerActions: G
925
935
  };
926
936
  }
927
937
  };
928
- var wt = function() {
929
- var e = this, t = e._self._c;
930
- return t("div", [e.viewshedMode === e.ViewshedPluginModes.CREATE ? t("div", { staticClass: "px-2 py-1" }, [e._v(" " + e._s(e.$t("viewshed.createDescription")) + " ")]) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? t("VcsFormSection", { attrs: { "header-actions": e.headerActions, heading: "viewshed.viewpoint", "action-button-list-overflow-count": 3 } }, [t("v-container", { staticClass: "px-1 py-0" }, [t("v-row", { attrs: { "no-gutters": "" } }, [t("span", { staticClass: "px-1 py-0" }, [e._v(e._s(e.$t("viewshed.position")))])]), e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? t("v-row", { attrs: { "no-gutters": "" } }, [t("VcsFeatureTransforms", { attrs: { "transformation-mode": e.TransformationMode.TRANSLATE, "feature-properties": { altitudeMode: "absolute" }, "allow-z-input": !0 } })], 1) : t("v-row", { attrs: { "no-gutters": "" } }, e._l(e.position, function(i, o, r) {
931
- return t("v-col", { key: r, staticClass: "pb-1" }, [t("VcsTextField", { attrs: { value: i, type: "number", prefix: o, "show-spin-buttons": !0, step: o === "Z" ? 1 : 1e-4, unit: o === "Z" ? "m" : "°", decimals: o === "Z" ? 2 : 8, disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(o === "Z" && e.heightMode === e.HeightModes.RELATIVE) }, on: { input: (a) => e.setPosition(a, o, r) } })], 1);
932
- }), 1)], 1)], 1) : e._e(), t("v-divider"), t("v-container", { staticClass: "px-1 py-0" }, [t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", [e._v(" " + e._s(e.$t("viewshed.heightMode")) + " ")])], 1), t("v-col", [t("VcsSelect", { attrs: { items: Object.values(e.HeightModes).map((i) => ({
933
- value: i,
934
- text: `viewshed.${i}`
935
- })), value: e.heightMode }, on: { input: e.changeHeightMode } })], 1)], 1)], 1), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? t("v-container", { staticClass: "px-1 pt-0 pb-2" }, e._l(e.parameters, function(i, o) {
936
- return t("v-row", { key: o, attrs: { "no-gutters": "" } }, [o === "distance" || e.viewshedType === e.ViewshedTypes.CONE && o !== "showPrimitive" ? t("v-col", [t("v-row", { staticClass: "pr-1", attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": o } }, [e._v(" " + e._s(e.$t(`viewshed.${o}`)) + " ")])], 1), t("v-col", { staticClass: "d-flex justify-end align-center" }, [o === "distance" ? t("span", [e._v(e._s(`${i} m`))]) : t("span", [e._v(e._s(`${i} °`))])])], 1), t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsSlider", { attrs: { id: o, value: i, type: "number", step: "1", min: e.parameterRanges[o][0], max: e.parameterRanges[o][1], height: "15" }, on: { input: (r) => e.setParameter(o, r) } })], 1)], 1)], 1) : e._e()], 1);
937
- }), 1) : e._e(), t("v-divider"), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? t("div", { staticClass: "d-flex w-full justify-space-between px-2 pt-2 pb-1" }, [t("VcsFormButton", { attrs: { tooltip: "viewshed.addToMyWorkspace", icon: "$vcsComponentsPlus", disabled: e.currentIsPersisted || void 0 }, on: { click: function(i) {
938
+ var gt = function() {
939
+ var e = this, i = e._self._c;
940
+ return i("div", [e.viewshedMode === e.ViewshedPluginModes.CREATE ? i("div", { staticClass: "px-2 py-1" }, [e.viewshedType === e.ViewshedTypes.CONE ? [e._v(" " + e._s(e.$t("viewshed.createDescription")) + " ")] : e.viewshedType === e.ViewshedTypes.THREESIXTY ? [e._v(" " + e._s(e.$t("viewshed.createThreeSixtyDescription")) + " ")] : e._e()], 2) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? i("VcsFormSection", { attrs: { "header-actions": e.headerActions, heading: "viewshed.viewpoint", "action-button-list-overflow-count": 3 } }, [i("v-container", { staticClass: "px-1 py-0" }, [i("v-row", { attrs: { "no-gutters": "" } }, [i("span", { staticClass: "px-1 py-0" }, [e._v(e._s(e.$t("viewshed.position")))])]), e.viewshedMode === e.ViewshedPluginModes.MOVE && e.heightMode === e.HeightModes.ABSOLUTE ? i("v-row", { attrs: { "no-gutters": "" } }, [i("VcsFeatureTransforms", { attrs: { "transformation-mode": e.TransformationMode.TRANSLATE, "feature-properties": { altitudeMode: "absolute" }, "allow-z-input": !0 } })], 1) : i("v-row", { attrs: { "no-gutters": "" } }, e._l(e.position, function(t, o, n) {
941
+ return i("v-col", { key: n, staticClass: "pb-1" }, [i("VcsTextField", { attrs: { value: t, type: "number", prefix: o, "show-spin-buttons": !0, step: o === "Z" ? 1 : 1e-4, unit: o === "Z" ? "m" : "°", decimals: o === "Z" ? 2 : 8, disabled: e.viewshedMode === e.ViewshedPluginModes.MOVE && !(o === "Z" && e.heightMode === e.HeightModes.RELATIVE) }, on: { input: (a) => e.setPosition(a, o, n) } })], 1);
942
+ }), 1)], 1)], 1) : e._e(), i("v-divider"), i("v-container", { staticClass: "px-1 py-0" }, [i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", [e._v(" " + e._s(e.$t("viewshed.heightMode")) + " ")])], 1), i("v-col", [i("VcsSelect", { attrs: { items: Object.values(e.HeightModes).map((t) => ({
943
+ value: t,
944
+ text: `viewshed.${t}`
945
+ })), value: e.heightMode }, on: { input: e.changeHeightMode } })], 1)], 1)], 1), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? i("v-container", { staticClass: "px-1 pt-0 pb-2" }, e._l(e.parameters, function(t, o) {
946
+ return i("v-row", { key: o, attrs: { "no-gutters": "" } }, [o === "distance" || e.viewshedType === e.ViewshedTypes.CONE && o !== "showPrimitive" ? i("v-col", [i("v-row", { staticClass: "pr-1", attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": o } }, [e._v(" " + e._s(e.$t(`viewshed.${o}`)) + " ")])], 1), i("v-col", { staticClass: "d-flex justify-end align-center" }, [o === "distance" ? i("span", [e._v(e._s(`${t} m`))]) : i("span", [e._v(e._s(`${t} °`))])])], 1), i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsSlider", { attrs: { id: o, value: t, type: "number", step: "1", min: e.parameterRanges[o][0], max: e.parameterRanges[o][1], height: "15" }, on: { input: (n) => e.setParameter(o, n) } })], 1)], 1)], 1) : e._e()], 1);
947
+ }), 1) : e._e(), i("v-divider"), e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? i("div", { staticClass: "d-flex w-full justify-space-between px-2 pt-2 pb-1" }, [i("VcsFormButton", { attrs: { tooltip: "viewshed.addToMyWorkspace", icon: "$vcsComponentsPlus", disabled: e.currentIsPersisted || void 0 }, on: { click: function(t) {
938
948
  return e.addToMyWorkspace();
939
- } } }), t("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(i) {
949
+ } } }), i("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(t) {
940
950
  return e.createNewViewshed();
941
- } } }, [e._v(" " + e._s(e.$t("viewshed.new")) + " ")])], 1) : e.viewshedMode === e.ViewshedPluginModes.CREATE ? t("div", { staticClass: "d-flex w-full justify-end px-2 pt-2 pb-1" }, [t("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(i) {
951
+ } } }, [e._v(" " + e._s(e.$t("viewshed.new")) + " ")])], 1) : e.viewshedMode === e.ViewshedPluginModes.CREATE ? i("div", { staticClass: "d-flex w-full justify-end px-2 pt-2 pb-1" }, [i("VcsFormButton", { attrs: { variant: "filled" }, on: { click: function(t) {
942
952
  return e.cancel();
943
953
  } } }, [e._v(" " + e._s(e.$t("viewshed.cancel")) + " ")])], 1) : e._e()], 1);
944
- }, mt = [], gt = /* @__PURE__ */ ue(
945
- pt,
946
- wt,
954
+ }, _t = [], Ct = /* @__PURE__ */ ve(
947
955
  mt,
956
+ gt,
957
+ _t,
948
958
  !1,
949
959
  null,
950
960
  null,
951
961
  null,
952
962
  null
953
963
  );
954
- const _t = gt.exports, P = "@vcmap/viewshed", Ct = "2.0.3", Et = "^5.1", Y = {
964
+ const Et = Ct.exports, S = "@vcmap/viewshed", yt = "2.0.5", Vt = "^5.1", J = {
955
965
  [w.CONE]: "$vcsViewshed",
956
966
  [w.THREESIXTY]: "$vcsViewshedCone"
957
967
  };
958
- function Vt(s, e, t) {
959
- const i = A(), o = A(), r = `${t.id}-editor`, a = {
960
- component: _t,
968
+ function bt(s, e, i) {
969
+ const t = A(), o = A(), n = `${i.id}-editor`, a = {
970
+ component: Et,
961
971
  provides: {
962
972
  manager: s
963
973
  },
964
974
  state: {
965
- headerTitle: i,
975
+ headerTitle: t,
966
976
  headerIcon: o,
967
977
  styles: { width: "280px", height: "auto" },
968
978
  infoUrlCallback: e.getHelpUrlCallback("tools/viewshedTool.html")
969
979
  }
970
980
  };
971
- Ke(e, t, {
972
- editor: (v) => ({
981
+ Je(e, i, {
982
+ editor: (u) => ({
973
983
  ...a,
974
984
  props: {
975
- selection: t.selection,
976
- getViewshed: () => t.collection.getByKey(v.name)
985
+ selection: i.selection,
986
+ getViewshed: () => i.collection.getByKey(u.name)
977
987
  }
978
988
  })
979
989
  });
980
- function l() {
981
- s.currentViewshed.value && (o.value = Y[s.currentViewshed.value.type], s.currentIsPersisted.value ? i.value = s.currentViewshed.value.properties.title : s.mode.value === g.CREATE ? i.value = [
990
+ function c() {
991
+ s.currentViewshed.value && (o.value = J[s.currentViewshed.value.type], s.currentIsPersisted.value ? t.value = s.currentViewshed.value.properties.title : s.mode.value === m.CREATE ? t.value = [
982
992
  "viewshed.create",
983
993
  `viewshed.${s.currentViewshed.value.type}`
984
- ] : i.value = [
994
+ ] : t.value = [
985
995
  "viewshed.temporary",
986
996
  `viewshed.${s.currentViewshed.value.type}`
987
997
  ]);
988
998
  }
989
- function n() {
990
- l(), s.currentViewshed.value && !s.currentIsPersisted.value && (s.mode.value === g.EDIT || s.mode.value === g.MOVE || s.mode.value === g.CREATE) && (e.windowManager.has(r) || e.windowManager.add(
999
+ function r() {
1000
+ c(), s.currentViewshed.value && !s.currentIsPersisted.value && (s.mode.value === m.EDIT || s.mode.value === m.MOVE || s.mode.value === m.CREATE) && (e.windowManager.has(n) || e.windowManager.add(
991
1001
  {
992
1002
  ...a,
993
- id: r,
1003
+ id: n,
994
1004
  parentId: "category-manager",
995
- slot: Ye.DYNAMIC_LEFT
1005
+ slot: Ze.DYNAMIC_LEFT
996
1006
  },
997
- P
1007
+ S
998
1008
  ));
999
1009
  }
1000
- const u = R(s.currentViewshed, (v) => {
1001
- v && n();
1002
- }), c = R(s.currentIsPersisted, (v) => {
1003
- v && l();
1004
- }), m = R(s.mode, () => {
1005
- s.mode.value ? n() : e.windowManager.remove(r);
1010
+ const f = R(s.currentViewshed, (u) => {
1011
+ u && r();
1012
+ }), h = R(s.currentIsPersisted, (u) => {
1013
+ u && c();
1014
+ }), v = R(s.mode, () => {
1015
+ s.mode.value ? r() : e.windowManager.remove(n);
1006
1016
  });
1007
1017
  return {
1008
1018
  destroy() {
1009
- e.windowManager.remove(r), u(), m(), c();
1019
+ e.windowManager.remove(n), f(), v(), h();
1010
1020
  }
1011
1021
  };
1012
1022
  }
1013
- function yt(s, e, t, i) {
1023
+ function Mt(s, e, i, t) {
1014
1024
  const o = {
1015
- type: Je.SELECT,
1016
- action: j({
1017
- name: t,
1025
+ type: qe.SELECT,
1026
+ action: W({
1027
+ name: i,
1018
1028
  currentIndex: 0,
1019
1029
  active: !1,
1020
1030
  background: !1,
@@ -1023,193 +1033,193 @@ function yt(s, e, t, i) {
1023
1033
  if (this.active)
1024
1034
  this.background && e.currentViewshed.value ? e.editViewshed(e.currentViewshed.value) : e.stop();
1025
1035
  else {
1026
- const n = this.tools[this.currentIndex].name;
1027
- e.createViewshed(n);
1036
+ const r = this.tools[this.currentIndex].name;
1037
+ e.createViewshed(r);
1028
1038
  }
1029
1039
  },
1030
- selected(n) {
1031
- if (n !== this.currentIndex) {
1032
- this.currentIndex = n;
1033
- const u = this.tools[this.currentIndex].name;
1034
- e.createViewshed(u);
1040
+ selected(r) {
1041
+ if (r !== this.currentIndex) {
1042
+ this.currentIndex = r;
1043
+ const f = this.tools[this.currentIndex].name;
1044
+ e.createViewshed(f);
1035
1045
  }
1036
1046
  },
1037
- tools: i.flatMap((n) => n === w.CONE ? {
1047
+ tools: t.flatMap((r) => r === w.CONE ? {
1038
1048
  name: w.CONE,
1039
- icon: Y[w.CONE],
1049
+ icon: J[w.CONE],
1040
1050
  title: `viewshed.${w.CONE}`
1041
- } : n === w.THREESIXTY ? {
1051
+ } : r === w.THREESIXTY ? {
1042
1052
  name: w.THREESIXTY,
1043
- icon: Y[w.THREESIXTY],
1053
+ icon: J[w.THREESIXTY],
1044
1054
  title: `viewshed.${w.THREESIXTY}`
1045
1055
  } : [])
1046
1056
  })
1047
- }, r = R(e.mode, (n) => {
1048
- n === g.VIEW ? (o.action.background = !0, o.action.active = !0) : n ? (o.action.background = !1, o.action.active = !0) : (o.action.background = !1, o.action.active = !1);
1057
+ }, n = R(e.mode, (r) => {
1058
+ r === m.VIEW ? (o.action.background = !0, o.action.active = !0) : r ? (o.action.background = !1, o.action.active = !0) : (o.action.background = !1, o.action.active = !1);
1049
1059
  }), a = R(
1050
1060
  e.currentViewshed,
1051
- (n) => {
1052
- n && (o.action.currentIndex = o.action.tools.findIndex(
1053
- (u) => u.name === n.type
1061
+ (r) => {
1062
+ r && (o.action.currentIndex = o.action.tools.findIndex(
1063
+ (f) => f.name === r.type
1054
1064
  ));
1055
1065
  }
1056
- ), l = s.maps.mapActivated.addEventListener((n) => {
1057
- n instanceof B ? o.action.disabled = !1 : (o.action.disabled = !0, e.stop());
1066
+ ), c = s.maps.mapActivated.addEventListener((r) => {
1067
+ r instanceof D ? o.action.disabled = !1 : o.action.disabled = !0;
1058
1068
  });
1059
1069
  return {
1060
1070
  destroy() {
1061
- r(), a(), l();
1071
+ n(), a(), c();
1062
1072
  },
1063
1073
  toolbox: o
1064
1074
  };
1065
1075
  }
1066
- function bt(s, e, t, i) {
1067
- z(i, [Object.values(w)]);
1068
- const { toolbox: o, destroy: r } = yt(s, e, t, i), a = s.toolboxManager.add(o, t).id;
1076
+ function Tt(s, e, i, t) {
1077
+ z(t, [Object.values(w)]);
1078
+ const { toolbox: o, destroy: n } = Mt(s, e, i, t), a = s.toolboxManager.add(o, i).id;
1069
1079
  return () => {
1070
- s.toolboxManager.remove(a), r();
1080
+ s.toolboxManager.remove(a), n();
1071
1081
  };
1072
1082
  }
1073
- class J extends Oe {
1083
+ class Z extends Pe {
1074
1084
  static get className() {
1075
1085
  return "ViewshedCategory";
1076
1086
  }
1077
1087
  async _deserializeItem(e) {
1078
- var i;
1079
- const t = (
1088
+ var t;
1089
+ const i = (
1080
1090
  /** @type {import("@vcmap/core").CesiumMap | undefined} */
1081
- (i = this._app) == null ? void 0 : i.maps.getByType(B.className)[0]
1091
+ (t = this._app) == null ? void 0 : t.maps.getByType(D.className)[0]
1082
1092
  );
1083
- if (t)
1084
- return new T(e, t);
1093
+ if (i)
1094
+ return new M(e, i);
1085
1095
  throw new Error("No CesiumMap available");
1086
1096
  }
1087
1097
  }
1088
- function Mt(s, e) {
1089
- let t, i = 0;
1098
+ function Ot(s, e) {
1099
+ let i, t = 0;
1090
1100
  const o = new Set(
1091
- e.filter((r) => r.type === s).map((r) => r.properties.title)
1101
+ e.filter((n) => n.type === s).map((n) => n.properties.title)
1092
1102
  );
1093
1103
  do
1094
- i += 1, o.has(`${s}-${i}`) || (t = `${s}-${i}`);
1095
- while (!t);
1096
- return t;
1104
+ t += 1, o.has(`${s}-${t}`) || (i = `${s}-${t}`);
1105
+ while (!i);
1106
+ return i;
1097
1107
  }
1098
- async function Tt(s) {
1099
- const e = new L(), t = new L(), { collectionComponent: i, category: o } = await s.categoryManager.requestCategory(
1108
+ async function St(s) {
1109
+ const e = new x(), i = new x(), { collectionComponent: t, category: o } = await s.categoryManager.requestCategory(
1100
1110
  {
1101
- type: J.className,
1111
+ type: Z.className,
1102
1112
  name: "Viewsheds",
1103
1113
  title: "Viewsheds"
1104
1114
  },
1105
- P,
1115
+ S,
1106
1116
  {
1107
1117
  selectable: !0,
1108
1118
  renamable: !0,
1109
1119
  removable: !0
1110
1120
  }
1111
- ), r = (c, m, v) => {
1112
- v.title = c.properties.title, v.titleChanged = (_) => {
1113
- c.properties.title = _, v.title = _, e.raiseEvent({ item: c, title: _ });
1114
- }, v.actions.push(
1115
- j({
1121
+ ), n = (h, v, u) => {
1122
+ u.title = h.properties.title, u.titleChanged = (_) => {
1123
+ h.properties.title = _, u.title = _, e.raiseEvent({ item: h, title: _ });
1124
+ }, u.actions.push(
1125
+ W({
1116
1126
  name: "visibilityAction",
1117
1127
  icon: "$vcsCheckbox",
1118
1128
  callback() {
1119
- t.raiseEvent(c);
1129
+ i.raiseEvent(h);
1120
1130
  }
1121
1131
  })
1122
1132
  );
1123
1133
  };
1124
1134
  s.categoryManager.addMappingFunction(
1125
1135
  () => !0,
1126
- r,
1127
- P,
1128
- [i.id]
1136
+ n,
1137
+ S,
1138
+ [t.id]
1129
1139
  );
1130
- const { action: a, destroy: l } = Ze(
1131
- i.selection,
1140
+ const { action: a, destroy: c } = Qe(
1141
+ t.selection,
1132
1142
  () => {
1133
- const c = i.selection.value.map(
1134
- (m) => i.collection.getByKey(m.name)
1143
+ const h = t.selection.value.map(
1144
+ (v) => t.collection.getByKey(v.name)
1135
1145
  );
1136
- qe(JSON.stringify(c), "viewsheds.json");
1146
+ et(JSON.stringify(h), "viewsheds.json");
1137
1147
  },
1138
- P
1139
- ), { action: n, destroy: u } = Qe(
1140
- async (c) => {
1148
+ S
1149
+ ), { action: r, destroy: f } = tt(
1150
+ async (h) => {
1141
1151
  await Promise.all(
1142
- c.map(async (m) => {
1143
- const v = await m.text();
1144
- JSON.parse(v).forEach((y) => {
1145
- const $ = new T(y);
1146
- o.collection.add($);
1152
+ h.map(async (v) => {
1153
+ const u = await v.text();
1154
+ JSON.parse(u).forEach((V) => {
1155
+ const P = new M(V);
1156
+ o.collection.add(P);
1147
1157
  });
1148
1158
  })
1149
1159
  );
1150
1160
  },
1151
1161
  s.windowManager,
1152
- P,
1162
+ S,
1153
1163
  "category-manager"
1154
1164
  );
1155
- return i.addActions([a, n]), {
1165
+ return t.addActions([a, r]), {
1156
1166
  renamed: e,
1157
- visibilityChanged: t,
1158
- setSelection(c) {
1159
- c && (i.selection.value = i.items.value.filter((m) => c === m.name));
1167
+ visibilityChanged: i,
1168
+ setSelection(h) {
1169
+ h && (t.selection.value = t.items.value.filter((v) => h === v.name));
1160
1170
  },
1161
1171
  clearSelection() {
1162
- i.selection.value.length && (i.selection.value = []);
1172
+ t.selection.value.length && (t.selection.value = []);
1163
1173
  },
1164
- setVisibility(c, m) {
1165
- const v = i.items.value.find(
1166
- (_) => c === _.name
1174
+ setVisibility(h, v) {
1175
+ const u = t.items.value.find(
1176
+ (_) => h === _.name
1167
1177
  );
1168
- if (v) {
1169
- const _ = v.actions.find(
1170
- (y) => y.name === "visibilityAction"
1178
+ if (u) {
1179
+ const _ = u.actions.find(
1180
+ (V) => V.name === "visibilityAction"
1171
1181
  );
1172
- _ && (_.icon = m ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1182
+ _ && (_.icon = v ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1173
1183
  }
1174
1184
  },
1175
- add(c) {
1176
- c.properties.title = Mt(
1177
- c.type,
1185
+ add(h) {
1186
+ h.properties.title = Ot(
1187
+ h.type,
1178
1188
  /** @type {import("./viewshed.js").default[]} */
1179
1189
  [
1180
1190
  ...o.collection
1181
1191
  ]
1182
- ), o.collection.add(c);
1192
+ ), o.collection.add(h);
1183
1193
  },
1184
- remove(c) {
1185
- const m = o.collection.getByKey(c);
1186
- m && o.collection.remove(m);
1194
+ remove(h) {
1195
+ const v = o.collection.getByKey(h);
1196
+ v && o.collection.remove(v);
1187
1197
  },
1188
- collectionComponent: i,
1198
+ collectionComponent: t,
1189
1199
  destroy() {
1190
- s.categoryManager.removeOwner(P), e.destroy(), t.destroy(), l(), u();
1200
+ s.categoryManager.removeOwner(S), e.destroy(), i.destroy(), c(), f();
1191
1201
  }
1192
1202
  };
1193
1203
  }
1194
1204
  function F() {
1195
1205
  return {
1196
- visibleColor: T.getDefaultOptions().visibleColor,
1197
- shadowColor: T.getDefaultOptions().shadowColor,
1206
+ visibleColor: M.getDefaultOptions().visibleColor,
1207
+ shadowColor: M.getDefaultOptions().shadowColor,
1198
1208
  tools: [...Object.values(w)]
1199
1209
  };
1200
1210
  }
1201
- const Ot = {
1211
+ const Pt = {
1202
1212
  name: "ViewshedConfigEditor",
1203
1213
  title: "Viewshed Editor",
1204
1214
  components: {
1205
- AbstractConfigEditor: et,
1206
- VcsFormSection: re,
1207
- VContainer: le,
1208
- VRow: ce,
1209
- VCol: de,
1210
- VcsLabel: ne,
1211
- VcsSelect: ae,
1212
- VColorPicker: it
1215
+ AbstractConfigEditor: it,
1216
+ VcsFormSection: le,
1217
+ VContainer: de,
1218
+ VRow: he,
1219
+ VCol: ue,
1220
+ VcsLabel: ae,
1221
+ VcsSelect: ce,
1222
+ VColorPicker: ot
1213
1223
  },
1214
1224
  props: {
1215
1225
  getConfig: {
@@ -1223,91 +1233,99 @@ const Ot = {
1223
1233
  },
1224
1234
  setup(s) {
1225
1235
  const e = A({});
1226
- s.getConfig().then((i) => {
1227
- e.value = Object.assign(F(), i);
1236
+ s.getConfig().then((t) => {
1237
+ e.value = Object.assign(F(), t);
1228
1238
  });
1229
- async function t() {
1239
+ async function i() {
1230
1240
  await s.setConfig(e.value);
1231
1241
  }
1232
1242
  return {
1233
1243
  localConfig: e,
1234
1244
  ViewshedTypes: w,
1235
- apply: t,
1236
- toolItems: Object.values(w).map((i) => ({
1237
- value: i,
1238
- text: `viewshed.${i}`
1245
+ apply: i,
1246
+ toolItems: Object.values(w).map((t) => ({
1247
+ value: t,
1248
+ text: `viewshed.${t}`
1239
1249
  }))
1240
1250
  };
1241
1251
  }
1242
1252
  };
1243
- var St = function() {
1244
- var e = this, t = e._self._c;
1245
- return t("AbstractConfigEditor", e._b({ on: { submit: e.apply } }, "AbstractConfigEditor", { ...e.$attrs, ...e.$props }, !1), [e.localConfig ? t("VcsFormSection", { attrs: { heading: "viewshed.editor.general" } }, [t("v-container", { staticClass: "px-1 py-0" }, [t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": "viewshed-editor-tools" } }, [e._v(e._s(e.$t("viewshed.editor.tools")))])], 1), t("v-col", [t("VcsSelect", { attrs: { id: "viewshed-tools", items: e.toolItems, multiple: !0 }, model: { value: e.localConfig.tools, callback: function(i) {
1246
- e.$set(e.localConfig, "tools", i);
1247
- }, expression: "localConfig.tools" } })], 1)], 1), t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": "viewshed-editor-visible-color" } }, [e._v(e._s(e.$t("viewshed.editor.visibleColor")))])], 1), t("v-col", [t("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.visibleColor, callback: function(i) {
1248
- e.$set(e.localConfig, "visibleColor", i);
1249
- }, expression: "localConfig.visibleColor" } })], 1)], 1), t("v-row", { attrs: { "no-gutters": "" } }, [t("v-col", [t("VcsLabel", { attrs: { "html-for": "viewshed-editor-shadow-color" } }, [e._v(e._s(e.$t("viewshed.editor.shadowColor")))])], 1), t("v-col", [t("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.shadowColor, callback: function(i) {
1250
- e.$set(e.localConfig, "shadowColor", i);
1253
+ var At = function() {
1254
+ var e = this, i = e._self._c;
1255
+ return i("AbstractConfigEditor", e._b({ on: { submit: e.apply } }, "AbstractConfigEditor", { ...e.$attrs, ...e.$props }, !1), [e.localConfig ? i("VcsFormSection", { attrs: { heading: "viewshed.editor.general" } }, [i("v-container", { staticClass: "px-1 py-0" }, [i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": "viewshed-editor-tools" } }, [e._v(e._s(e.$t("viewshed.editor.tools")))])], 1), i("v-col", [i("VcsSelect", { attrs: { id: "viewshed-tools", items: e.toolItems, multiple: !0 }, model: { value: e.localConfig.tools, callback: function(t) {
1256
+ e.$set(e.localConfig, "tools", t);
1257
+ }, expression: "localConfig.tools" } })], 1)], 1), i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": "viewshed-editor-visible-color" } }, [e._v(e._s(e.$t("viewshed.editor.visibleColor")))])], 1), i("v-col", [i("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.visibleColor, callback: function(t) {
1258
+ e.$set(e.localConfig, "visibleColor", t);
1259
+ }, expression: "localConfig.visibleColor" } })], 1)], 1), i("v-row", { attrs: { "no-gutters": "" } }, [i("v-col", [i("VcsLabel", { attrs: { "html-for": "viewshed-editor-shadow-color" } }, [e._v(e._s(e.$t("viewshed.editor.shadowColor")))])], 1), i("v-col", [i("VColorPicker", { attrs: { mode: "rgba" }, model: { value: e.localConfig.shadowColor, callback: function(t) {
1260
+ e.$set(e.localConfig, "shadowColor", t);
1251
1261
  }, expression: "localConfig.shadowColor" } })], 1)], 1)], 1)], 1) : e._e()], 1);
1252
- }, Pt = [], At = /* @__PURE__ */ ue(
1253
- Ot,
1254
- St,
1262
+ }, It = [], Rt = /* @__PURE__ */ ve(
1255
1263
  Pt,
1264
+ At,
1265
+ It,
1256
1266
  !1,
1257
1267
  null,
1258
1268
  null,
1259
1269
  null,
1260
1270
  null
1261
1271
  );
1262
- const It = At.exports;
1263
- function kt(s) {
1264
- let e, t = () => {
1272
+ const $t = Rt.exports;
1273
+ function Wt(s) {
1274
+ let e, i = () => {
1265
1275
  };
1266
1276
  return {
1267
1277
  get name() {
1268
- return P;
1278
+ return S;
1269
1279
  },
1270
1280
  get version() {
1271
- return Ct;
1281
+ return yt;
1272
1282
  },
1273
1283
  get mapVersion() {
1274
- return Et;
1284
+ return Vt;
1275
1285
  },
1276
1286
  /**
1277
1287
  * @param {import("@vcmap/ui").VcsUiApp} vcsUiApp
1278
1288
  * @param {ViewshedPluginState=} state
1279
1289
  * @returns {Promise<void>}
1280
1290
  */
1281
- async initialize(i, o) {
1282
- i.categoryClassRegistry.registerClass(
1283
- this[Se],
1284
- J.className,
1285
- J
1291
+ async initialize(t, o) {
1292
+ t.categoryClassRegistry.registerClass(
1293
+ this[Ae],
1294
+ Z.className,
1295
+ Z
1286
1296
  );
1287
- const r = await Tt(i);
1288
- e = ft(
1289
- i,
1297
+ const n = await St(t);
1298
+ e = pt(
1299
+ t,
1290
1300
  s,
1291
- r
1301
+ n
1292
1302
  );
1293
- const a = bt(
1294
- i,
1303
+ const a = Tt(
1304
+ t,
1295
1305
  e,
1296
- P,
1306
+ S,
1297
1307
  s.tools || F().tools
1298
- ), { destroy: l } = Vt(
1308
+ ), { destroy: c } = bt(
1299
1309
  e,
1300
- i,
1301
- r.collectionComponent
1310
+ t,
1311
+ n.collectionComponent
1312
+ ), { activeMap: r } = t.maps;
1313
+ function f(u) {
1314
+ if (o != null && o.mode && o.currentViewshed && u instanceof D) {
1315
+ const _ = new M(o.currentViewshed, r);
1316
+ o.mode === m.VIEW ? e.viewViewshed(_) : e.editViewshed(_);
1317
+ }
1318
+ }
1319
+ let h = !1;
1320
+ r && (h = !0, f(r));
1321
+ const v = t.maps.mapActivated.addEventListener(
1322
+ (u) => {
1323
+ e.stop(), h || (f(u), h = !0);
1324
+ }
1302
1325
  );
1303
- t = () => {
1304
- a(), l(), r.destroy();
1326
+ i = () => {
1327
+ v(), a(), c(), n.destroy(), e.destroy();
1305
1328
  };
1306
- const { activeMap: n } = i.maps;
1307
- if (o != null && o.mode && o.currentViewshed && n instanceof B) {
1308
- const u = new T(o.currentViewshed, n);
1309
- o.mode === g.VIEW ? e.viewViewshed(u) : e.editViewshed(u);
1310
- }
1311
1329
  },
1312
1330
  /**
1313
1331
  * should return all default values of the configuration
@@ -1319,18 +1337,18 @@ function kt(s) {
1319
1337
  * @returns {ViewshedPluginOptions}
1320
1338
  */
1321
1339
  toJSON() {
1322
- const i = {};
1323
- return s.tools && F().tools.length !== s.tools.length && (i.tools = [...s.tools]), s.shadowColor && s.shadowColor !== T.getDefaultOptions().shadowColor && (i.shadowColor = s.shadowColor), s.visibleColor && s.visibleColor !== T.getDefaultOptions().visibleColor && (i.visibleColor = s.visibleColor), i;
1340
+ const t = {};
1341
+ return s.tools && F().tools.length !== s.tools.length && (t.tools = [...s.tools]), s.shadowColor && s.shadowColor !== M.getDefaultOptions().shadowColor && (t.shadowColor = s.shadowColor), s.visibleColor && s.visibleColor !== M.getDefaultOptions().visibleColor && (t.visibleColor = s.visibleColor), t;
1324
1342
  },
1325
1343
  /**
1326
1344
  * should return the plugins state
1327
1345
  * @returns {ViewshedPluginState}
1328
1346
  */
1329
1347
  getState() {
1330
- var i;
1348
+ var t;
1331
1349
  return {
1332
1350
  mode: e.mode.value,
1333
- currentViewshed: (i = e.currentViewshed.value) == null ? void 0 : i.toJSON()
1351
+ currentViewshed: (t = e.currentViewshed.value) == null ? void 0 : t.toJSON()
1334
1352
  };
1335
1353
  },
1336
1354
  /**
@@ -1338,9 +1356,9 @@ function kt(s) {
1338
1356
  * @returns {Array<import("@vcmap/ui").PluginConfigEditor>}
1339
1357
  */
1340
1358
  getConfigEditors() {
1341
- return [{ component: It }];
1359
+ return [{ component: $t }];
1342
1360
  },
1343
- destroy: t,
1361
+ destroy: i,
1344
1362
  i18n: {
1345
1363
  en: {
1346
1364
  viewshed: {
@@ -1366,9 +1384,10 @@ function kt(s) {
1366
1384
  returnToViewpoint: "Return to previous viewpoint",
1367
1385
  move: "Move viewpoint",
1368
1386
  createDescription: "Click the map twice. First click places the origin, second defines the distance and direction of the viewshed.",
1387
+ createThreeSixtyDescription: "Click the map twice. First click places the origin, second defines the distance of the viewshed.",
1369
1388
  remove: "Remove",
1370
1389
  editor: {
1371
- general: "General",
1390
+ general: "General Settings",
1372
1391
  visibleColor: "Visible color",
1373
1392
  shadowColor: "Shadow color",
1374
1393
  tools: "Tools"
@@ -1399,11 +1418,12 @@ function kt(s) {
1399
1418
  returnToViewpoint: "Zu vorherigem Viewpoint zurück springen",
1400
1419
  move: "Viewpoint verschieben",
1401
1420
  createDescription: "Klicke zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz und die Richtung des Viewsheds.",
1421
+ createThreeSixtyDescription: "Klicke zweimal in die Karte. Der erste Klick platziert den Ursprung, der zweite die Distanz des Viewsheds.",
1402
1422
  remove: "Entfernen",
1403
1423
  editor: {
1404
- general: "Generelles",
1424
+ general: "Allgemeine Einstellungen",
1405
1425
  visibleColor: "Sichtbarer Bereich",
1406
- shadowColor: "Schatten Bereich",
1426
+ shadowColor: "Nicht sichtbarer Bereich",
1407
1427
  tools: "Werkzeuge"
1408
1428
  }
1409
1429
  }
@@ -1412,5 +1432,5 @@ function kt(s) {
1412
1432
  };
1413
1433
  }
1414
1434
  export {
1415
- kt as default
1435
+ Wt as default
1416
1436
  };