@phila/layerboard 3.0.0-beta.16 → 3.0.0-beta.18

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.mjs CHANGED
@@ -1,115 +1,7 @@
1
- import { defineComponent as Ce, ref as $, watch as ze, computed as I, onMounted as Qe, onUnmounted as Ft, createElementBlock as v, openBlock as p, createVNode as X, unref as O, withCtx as Ue, createBlock as oe, createCommentVNode as T, Fragment as ie, renderList as re, useAttrs as Dt, toRef as Bt, normalizeClass as ae, createElementVNode as _, toDisplayString as U, renderSlot as ce, withDirectives as Tt, mergeProps as ft, vModelDynamic as Zt, createTextVNode as be, normalizeProps as bt, guardReactiveProps as wt, withModifiers as At, normalizeStyle as K, readonly as G, provide as W, onBeforeUnmount as Vt, nextTick as Ne, useId as Lt, resolveComponent as Nt, vShow as Ut } from "vue";
2
- import { Map as Wt, DrawTool as jt, RasterLayer as St, CircleLayer as Ct, FillLayer as kt, LineLayer as ut, MapMarker as qt, MapPopup as Gt } from "@phila/phila-ui-map-core";
3
- import { cn as pt, Icon as me, BaseLink as Ht, ActionContent as $t } from "@phila/phila-ui-core";
4
- function Ye(e, i, t = {}) {
5
- const n = { type: "Feature" };
6
- return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = i || {}, n.geometry = e, n;
7
- }
8
- function Jt(e, i, t = {}) {
9
- for (const a of e) {
10
- if (a.length < 4)
11
- throw new Error(
12
- "Each LinearRing of a Polygon must have 4 or more Positions."
13
- );
14
- if (a[a.length - 1].length !== a[0].length)
15
- throw new Error("First and last Position are not equivalent.");
16
- for (let l = 0; l < a[a.length - 1].length; l++)
17
- if (a[a.length - 1][l] !== a[0][l])
18
- throw new Error("First and last Position are not equivalent.");
19
- }
20
- return Ye({
21
- type: "Polygon",
22
- coordinates: e
23
- }, i, t);
24
- }
25
- function Kt(e, i, t = {}) {
26
- if (e.length < 2)
27
- throw new Error("coordinates must be an array of two or more positions");
28
- return Ye({
29
- type: "LineString",
30
- coordinates: e
31
- }, i, t);
32
- }
33
- function Qt(e, i, t = {}) {
34
- return Ye({
35
- type: "MultiLineString",
36
- coordinates: e
37
- }, i, t);
38
- }
39
- function Xt(e, i, t = {}) {
40
- return Ye({
41
- type: "MultiPolygon",
42
- coordinates: e
43
- }, i, t);
44
- }
45
- function Yt(e) {
46
- return e.type === "Feature" ? e.geometry : e;
47
- }
48
- function eo(e, i, t) {
49
- var n = e.length, a = Ie(e[0], i), l = [], c, w, y;
50
- let P, b;
51
- for (t || (t = []), c = 1; c < n; c++) {
52
- for (P = e[c - 1], b = e[c], w = y = Ie(b, i); ; )
53
- if (a | w) {
54
- if (a & w)
55
- break;
56
- a ? (P = yt(P, b, a, i), a = Ie(P, i)) : (b = yt(P, b, w, i), w = Ie(b, i));
57
- } else {
58
- l.push(P), w !== y ? (l.push(b), c < n - 1 && (t.push(l), l = [])) : c === n - 1 && l.push(b);
59
- break;
60
- }
61
- a = y;
62
- }
63
- return l.length && t.push(l), t;
64
- }
65
- function to(e, i) {
66
- var t, n, a, l, c, w, y;
67
- for (n = 1; n <= 8; n *= 2) {
68
- for (t = [], a = e[e.length - 1], l = !(Ie(a, i) & n), c = 0; c < e.length; c++)
69
- w = e[c], y = !(Ie(w, i) & n), y !== l && t.push(yt(a, w, n, i)), y && t.push(w), a = w, l = y;
70
- if (e = t, !e.length) break;
71
- }
72
- return t;
73
- }
74
- function yt(e, i, t, n) {
75
- return t & 8 ? [e[0] + (i[0] - e[0]) * (n[3] - e[1]) / (i[1] - e[1]), n[3]] : t & 4 ? [e[0] + (i[0] - e[0]) * (n[1] - e[1]) / (i[1] - e[1]), n[1]] : t & 2 ? [n[2], e[1] + (i[1] - e[1]) * (n[2] - e[0]) / (i[0] - e[0])] : t & 1 ? [n[0], e[1] + (i[1] - e[1]) * (n[0] - e[0]) / (i[0] - e[0])] : null;
76
- }
77
- function Ie(e, i) {
78
- var t = 0;
79
- return e[0] < i[0] ? t |= 1 : e[0] > i[2] && (t |= 2), e[1] < i[1] ? t |= 4 : e[1] > i[3] && (t |= 8), t;
80
- }
81
- function oo(e, i) {
82
- const t = Yt(e), n = t.type, a = e.type === "Feature" ? e.properties : {};
83
- let l = t.coordinates;
84
- switch (n) {
85
- case "LineString":
86
- case "MultiLineString": {
87
- const c = [];
88
- return n === "LineString" && (l = [l]), l.forEach((w) => {
89
- eo(w, i, c);
90
- }), c.length === 1 ? Kt(c[0], a) : Qt(c, a);
91
- }
92
- case "Polygon":
93
- return Jt(xt(l, i), a);
94
- case "MultiPolygon":
95
- return Xt(
96
- l.map((c) => xt(c, i)),
97
- a
98
- );
99
- default:
100
- throw new Error("geometry " + n + " not supported");
101
- }
102
- }
103
- function xt(e, i) {
104
- const t = [];
105
- for (const n of e) {
106
- const a = to(n, i);
107
- a.length > 0 && ((a[0][0] !== a[a.length - 1][0] || a[0][1] !== a[a.length - 1][1]) && a.push(a[0]), a.length >= 4 && t.push(a));
108
- }
109
- return t;
110
- }
111
- var no = oo;
112
- const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
1
+ import { defineComponent as $e, ref as k, watch as Re, computed as z, onMounted as Xe, onUnmounted as Pt, createElementBlock as h, openBlock as f, createVNode as Q, unref as O, withCtx as Ue, createBlock as te, createCommentVNode as E, Fragment as ie, renderList as se, useAttrs as Ot, toRef as zt, normalizeClass as ne, createElementVNode as P, toDisplayString as N, renderSlot as fe, withDirectives as Mt, mergeProps as dt, vModelDynamic as It, createTextVNode as Le, normalizeProps as mt, guardReactiveProps as vt, withModifiers as Rt, normalizeStyle as J, readonly as j, provide as V, onBeforeUnmount as Dt, nextTick as Ve, useId as bt, resolveComponent as Zt, vShow as Bt } from "vue";
2
+ import { Map as At, DrawTool as Nt, RasterLayer as wt, CircleLayer as Lt, FillLayer as St, LineLayer as ct, MapMarker as Vt, MapPopup as Ut } from "@phila/phila-ui-map-core";
3
+ import { cn as ft, Icon as be, BaseLink as Wt, ActionContent as Ct } from "@phila/phila-ui-core";
4
+ const jt = { class: "map-panel" }, qt = /* @__PURE__ */ $e({
113
5
  __name: "MapPanel",
114
6
  props: {
115
7
  visibleLayers: {},
@@ -131,440 +23,428 @@ const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
131
23
  initialCenter: {}
132
24
  },
133
25
  emits: ["zoom", "layerLoading", "layerError"],
134
- setup(e, { emit: i }) {
135
- const t = e, n = i, a = $(null), l = $(null), c = $(0);
136
- function w(o) {
137
- n("zoom", o), l.value && (c.value = y(l.value));
138
- }
139
- function y(o) {
140
- const d = o.getZoom(), S = o.getCenter().lat, E = 559082264028e-3, M = S * Math.PI / 180;
141
- return E * Math.cos(M) / Math.pow(2, d);
142
- }
143
- const P = $({}), b = $(null), C = $(/* @__PURE__ */ new Set()), s = ["fema-100-year-floodplain", "fema-500-year-floodplain"];
144
- async function k(o, d, r, S) {
145
- const E = encodeURIComponent(S || "1=1"), M = JSON.stringify({
26
+ setup(t, { emit: i }) {
27
+ const a = t, o = i, l = k(null), n = k(null), y = k(0);
28
+ function $(e) {
29
+ o("zoom", e), n.value && (y.value = m(n.value));
30
+ }
31
+ function m(e) {
32
+ const d = e.getZoom(), w = e.getCenter().lat, _ = 559082264028e-3, T = w * Math.PI / 180;
33
+ return _ * Math.cos(T) / Math.pow(2, d);
34
+ }
35
+ const M = k({}), L = k(null), S = k(/* @__PURE__ */ new Set());
36
+ async function s(e, d, r, w, _) {
37
+ const T = encodeURIComponent(w || "1=1"), B = JSON.stringify({
146
38
  xmin: d.west,
147
39
  ymin: d.south,
148
40
  xmax: d.east,
149
41
  ymax: d.north,
150
42
  spatialReference: { wkid: 4326 }
151
- }), N = 2e3;
152
- let Y = 0, V = [], Q = !0;
153
- for (; Q; ) {
154
- const D = `${o}/query?where=${E}&geometry=${encodeURIComponent(M)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${N}&resultOffset=${Y}&f=geojson`, Z = await fetch(D);
155
- if (!Z.ok)
156
- throw new Error(`HTTP ${Z.status}: ${Z.statusText}`);
157
- const q = await Z.json();
158
- q.features && q.features.length > 0 ? (V = V.concat(q.features), Y += q.features.length, Q = q.features.length === N) : Q = !1;
43
+ }), ee = _ !== void 0 ? `&maxAllowableOffset=${360 / (Math.pow(2, _) * 512)}` : "", U = 2e3;
44
+ let X = 0, A = [], K = !0;
45
+ for (; K; ) {
46
+ const H = `${e}/query?where=${T}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${U}&resultOffset=${X}${ee}&f=geojson`, de = await fetch(H);
47
+ if (!de.ok)
48
+ throw new Error(`HTTP ${de.status}: ${de.statusText}`);
49
+ const ke = await de.json();
50
+ ke.features && ke.features.length > 0 ? (A = A.concat(ke.features), X += ke.features.length, K = ke.features.length === U) : K = !1;
159
51
  }
160
- if (V = V.map((D) => {
161
- if (D.properties) {
162
- const Z = {};
163
- for (const q of Object.keys(D.properties))
164
- Z[q.toLowerCase()] = D.properties[q];
165
- return { ...D, properties: Z };
52
+ return A = A.map((H) => {
53
+ if (H.properties) {
54
+ const de = {};
55
+ for (const ke of Object.keys(H.properties))
56
+ de[ke.toLowerCase()] = H.properties[ke];
57
+ return { ...H, properties: de };
166
58
  }
167
- return D;
168
- }), s.includes(r)) {
169
- const D = [d.west, d.south, d.east, d.north];
170
- V = V.map((Z) => {
171
- if (Z.geometry && (Z.geometry.type === "Polygon" || Z.geometry.type === "MultiPolygon"))
172
- try {
173
- return no(Z, D);
174
- } catch {
175
- return Z;
176
- }
177
- return Z;
178
- });
179
- }
180
- return {
59
+ return H;
60
+ }), {
181
61
  type: "FeatureCollection",
182
- features: V
62
+ features: A
183
63
  };
184
64
  }
185
- async function g(o, d) {
186
- const r = d.map(async (S) => {
187
- const E = t.layerList.find((M) => M.config.id === S)?.config;
188
- if (E) {
189
- n("layerLoading", S, !0);
65
+ async function C(e, d) {
66
+ const r = d.map(async (w) => {
67
+ const _ = a.layerList.find((T) => T.config.id === w)?.config;
68
+ if (_) {
69
+ o("layerLoading", w, !0);
190
70
  try {
191
- const M = await k(E.url, o, S, E.where);
192
- P.value = { ...P.value, [S]: M }, n("layerError", S, null);
193
- } catch (M) {
194
- const N = M instanceof Error ? M.message : "Failed to load";
195
- n("layerError", S, N);
71
+ const T = n.value?.getZoom(), B = await s(_.url, e, w, _.where, T);
72
+ M.value = { ...M.value, [w]: B }, o("layerError", w, null);
73
+ } catch (T) {
74
+ const B = T instanceof Error ? T.message : "Failed to load";
75
+ o("layerError", w, B);
196
76
  } finally {
197
- n("layerLoading", S, !1);
77
+ o("layerLoading", w, !1);
198
78
  }
199
79
  }
200
80
  });
201
81
  await Promise.all(r);
202
82
  }
203
- async function h(o) {
204
- const d = [...t.visibleLayers];
205
- await g(o, d);
83
+ async function p(e) {
84
+ const d = [...a.visibleLayers];
85
+ await C(e, d);
206
86
  }
207
- function u(o) {
208
- b.value = o.bounds, h(o.bounds);
87
+ function g(e) {
88
+ L.value = e.bounds, p(e.bounds);
209
89
  }
210
- function f(o) {
211
- l.value = o;
212
- const d = o.getBounds();
213
- b.value = {
90
+ function c(e) {
91
+ n.value = e;
92
+ const d = e.getBounds();
93
+ L.value = {
214
94
  west: d.getWest(),
215
95
  south: d.getSouth(),
216
96
  east: d.getEast(),
217
97
  north: d.getNorth()
218
98
  };
219
- const r = o.getZoom();
220
- n("zoom", r), c.value = y(o), h(b.value);
99
+ const r = e.getZoom();
100
+ o("zoom", r), y.value = m(e), p(L.value);
221
101
  }
222
- ze(
223
- () => t.visibleLayers.size,
102
+ Re(
103
+ () => a.visibleLayers.size,
224
104
  async () => {
225
- if (le.value.length > 0 && te(), b.value) {
226
- const o = new Set(t.visibleLayers), d = [...o].filter((r) => !C.value.has(r));
227
- C.value = new Set(o), d.length > 0 && await g(b.value, d);
105
+ if (le.value.length > 0 && Me(), L.value) {
106
+ const e = new Set(a.visibleLayers), d = [...e].filter((r) => !S.value.has(r));
107
+ S.value = new Set(e), d.length > 0 && await C(L.value, d);
228
108
  }
229
109
  }
230
110
  );
231
- function L(o) {
232
- return t.visibleLayers.has(o);
233
- }
234
- function z(o) {
235
- return !!P.value[o.id];
236
- }
237
- const F = I(
238
- () => t.layerList.filter((o) => o.config.type === "circle" && L(o.config.id) && z(o.config)).map((o) => o.config)
239
- ), R = I(
240
- () => t.layerList.filter((o) => o.config.type === "fill" && L(o.config.id) && z(o.config)).map((o) => o.config)
241
- ), A = I(
242
- () => t.layerList.filter(
243
- (o) => o.config.type === "fill" && o.config.outlinePaint && L(o.config.id) && z(o.config)
244
- ).map((o) => o.config)
245
- ), de = I(
246
- () => t.layerList.filter((o) => o.config.type === "line" && L(o.config.id) && z(o.config)).map((o) => o.config)
111
+ function u(e) {
112
+ return a.visibleLayers.has(e);
113
+ }
114
+ function b(e) {
115
+ return !!M.value[e.id];
116
+ }
117
+ const I = z(
118
+ () => a.layerList.filter((e) => e.config.type === "circle" && u(e.config.id) && b(e.config)).map((e) => e.config)
119
+ ), F = z(
120
+ () => a.layerList.filter((e) => e.config.type === "fill" && u(e.config.id) && b(e.config)).map((e) => e.config)
121
+ ), R = z(
122
+ () => a.layerList.filter(
123
+ (e) => e.config.type === "fill" && e.config.outlinePaint && u(e.config.id) && b(e.config)
124
+ ).map((e) => e.config)
125
+ ), Z = z(
126
+ () => a.layerList.filter((e) => e.config.type === "line" && u(e.config.id) && b(e.config)).map((e) => e.config)
247
127
  );
248
- function fe(o) {
249
- return t.visibleTiledLayers?.has(o) ?? !1;
128
+ function pe(e) {
129
+ return a.visibleTiledLayers?.has(e) ?? !1;
250
130
  }
251
- function Pe(o) {
252
- return t.tiledLayerOpacities?.[o] ?? 1;
131
+ function ye(e) {
132
+ return a.tiledLayerOpacities?.[e] ?? 1;
253
133
  }
254
- function tt(o) {
255
- return `${o.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
134
+ function Ze(e) {
135
+ return `${e.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
256
136
  }
257
- function ot(o) {
137
+ function tt(e) {
258
138
  return {
259
139
  type: "raster",
260
- tiles: [tt(o.url)],
140
+ tiles: [Ze(e.url)],
261
141
  tileSize: 256,
262
- attribution: o.attribution || ""
142
+ attribution: e.attribution || ""
263
143
  };
264
144
  }
265
- const De = $({}), je = $(/* @__PURE__ */ new Set());
266
- async function Be(o) {
267
- if (!je.value.has(o.id)) {
268
- je.value.add(o.id);
145
+ const Be = k({}), je = k(/* @__PURE__ */ new Set());
146
+ async function ot(e) {
147
+ if (!je.value.has(e.id)) {
148
+ je.value.add(e.id);
269
149
  try {
270
- const d = o.url.replace(/\/$/, ""), r = await fetch(`${d}?f=json`);
150
+ const d = e.url.replace(/\/$/, ""), r = await fetch(`${d}?f=json`);
271
151
  if (!r.ok)
272
152
  return;
273
- const S = await r.json(), E = S.minScale || 0;
274
- let M = S.maxScale || 0;
275
- if (S.layers && S.layers.length > 0)
276
- for (const N of S.layers)
277
- N.maxScale && N.maxScale > 0 && (M === 0 || N.maxScale < M) && (M = N.maxScale);
278
- M === 0 && (M = 72e3), De.value = {
279
- ...De.value,
280
- [o.id]: { minScale: E, maxScale: M }
153
+ const w = await r.json(), _ = w.minScale || 0;
154
+ let T = w.maxScale || 0;
155
+ if (w.layers && w.layers.length > 0)
156
+ for (const B of w.layers)
157
+ B.maxScale && B.maxScale > 0 && (T === 0 || B.maxScale < T) && (T = B.maxScale);
158
+ T === 0 && (T = 72e3), Be.value = {
159
+ ...Be.value,
160
+ [e.id]: { minScale: _, maxScale: T }
281
161
  };
282
162
  } catch {
283
163
  }
284
164
  }
285
165
  }
286
- Qe(() => {
287
- if (t.tiledLayers)
288
- for (const o of t.tiledLayers)
289
- o.scaleBasedRendering && Be(o);
166
+ Xe(() => {
167
+ if (a.tiledLayers)
168
+ for (const e of a.tiledLayers)
169
+ e.scaleBasedRendering && ot(e);
290
170
  });
291
- function qe(o) {
292
- if (!o.scaleBasedRendering)
171
+ function Fe(e) {
172
+ if (!e.scaleBasedRendering)
293
173
  return "tiled";
294
- const d = De.value[o.id];
174
+ const d = Be.value[e.id];
295
175
  if (!d)
296
176
  return "tiled";
297
- const r = c.value;
177
+ const r = y.value;
298
178
  return r === 0 || r > d.maxScale ? "tiled" : "dynamic";
299
179
  }
300
- const nt = I(() => t.tiledLayers ? t.tiledLayers.filter((o) => fe(o.id) ? o.scaleBasedRendering ? qe(o) === "tiled" : !0 : !1) : []), it = I(() => t.tiledLayers ? t.tiledLayers.filter((o) => fe(o.id) && o.scaleBasedRendering ? qe(o) === "dynamic" : !1) : []);
301
- function _e(o) {
180
+ const at = z(() => a.tiledLayers ? a.tiledLayers.filter((e) => pe(e.id) ? e.scaleBasedRendering ? Fe(e) === "tiled" : !0 : !1) : []), it = z(() => a.tiledLayers ? a.tiledLayers.filter((e) => pe(e.id) && e.scaleBasedRendering ? Fe(e) === "dynamic" : !1) : []);
181
+ function nt(e) {
302
182
  return {
303
183
  type: "raster",
304
- tiles: [`${o.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
184
+ tiles: [`${e.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
305
185
  tileSize: 256,
306
- attribution: o.attribution || ""
186
+ attribution: e.attribution || ""
307
187
  };
308
188
  }
309
- function we(o) {
310
- return { type: "geojson", data: P.value[o.id] };
189
+ function ge(e) {
190
+ return { type: "geojson", data: M.value[e.id] };
311
191
  }
312
- function Ee(o) {
313
- return t.layerOpacities[o] ?? 1;
192
+ function Ee(e) {
193
+ return a.layerOpacities[e] ?? 1;
314
194
  }
315
- function Le(o) {
316
- const d = Ee(o.id), r = o.type === "circle" ? "circle-opacity" : o.type === "fill" ? "fill-opacity" : "line-opacity";
317
- if (o.type === "fill" && o.paint["fill-opacity"] === 0)
318
- return { ...o.paint, "fill-opacity": 0 };
319
- const S = o.type === "circle" ? "circle-color" : o.type === "fill" ? "fill-color" : "line-color", E = { ...o.paint }, M = E[S], N = E[r] === 1, Y = typeof M == "string" && M.startsWith("rgba(");
320
- if (N && Y) {
195
+ function _e(e) {
196
+ const d = Ee(e.id), r = e.type === "circle" ? "circle-opacity" : e.type === "fill" ? "fill-opacity" : "line-opacity";
197
+ if (e.type === "fill" && e.paint["fill-opacity"] === 0)
198
+ return { ...e.paint, "fill-opacity": 0 };
199
+ const w = e.type === "circle" ? "circle-color" : e.type === "fill" ? "fill-color" : "line-color", _ = { ...e.paint }, T = _[w], B = _[r] === 1, ee = typeof T == "string" && T.startsWith("rgba(");
200
+ if (B && ee) {
321
201
  if (d === 1)
322
- return E;
202
+ return _;
323
203
  {
324
- const V = M.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
325
- if (V && V[4]) {
326
- const [, Q, D, Z, q] = V, ct = parseFloat(q) * d;
327
- E[S] = `rgba(${Q}, ${D}, ${Z}, ${ct})`, E[r] = 1;
204
+ const U = T.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
205
+ if (U && U[4]) {
206
+ const [, X, A, K, H] = U, de = parseFloat(H) * d;
207
+ _[w] = `rgba(${X}, ${A}, ${K}, ${de})`, _[r] = 1;
328
208
  }
329
- return E;
209
+ return _;
330
210
  }
331
211
  }
332
- if (Y) {
333
- const V = M.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
334
- if (V) {
335
- const [, Q, D, Z] = V;
336
- E[S] = `rgb(${Q}, ${D}, ${Z})`;
212
+ if (ee) {
213
+ const U = T.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
214
+ if (U) {
215
+ const [, X, A, K] = U;
216
+ _[w] = `rgb(${X}, ${A}, ${K})`;
337
217
  }
338
218
  }
339
- return E[r] = d, E;
219
+ return _[r] = d, _;
340
220
  }
341
- function at(o) {
342
- const d = Ee(o.id);
343
- return { ...o.outlinePaint, "line-opacity": d };
221
+ function Oe(e) {
222
+ const d = Ee(e.id);
223
+ return { ...e.outlinePaint, "line-opacity": d };
344
224
  }
345
- const le = $([]), Me = $(null), ee = $(0);
346
- function ke(o) {
347
- const d = o.replace(/-outline$/, "");
348
- return t.layerList.find((S) => S.config.id === d)?.config;
225
+ const le = k([]), ze = k(null), oe = k(0);
226
+ function Pe(e) {
227
+ const d = e.replace(/-outline$/, "");
228
+ return a.layerList.find((w) => w.config.id === d)?.config;
349
229
  }
350
- function lt(o, d) {
351
- return o.replace(/\{([^}]+)\}/g, (r, S) => {
352
- const E = d[S];
353
- return E == null ? "" : String(E);
230
+ function qe(e, d) {
231
+ return e.replace(/\{([^}]+)\}/g, (r, w) => {
232
+ const _ = d[w];
233
+ return _ == null ? "" : String(_);
354
234
  });
355
235
  }
356
- function pe(o) {
357
- return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
236
+ function Se(e) {
237
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
358
238
  }
359
- function Ze(o, d, r) {
360
- if (o == null) return "-";
361
- if (d?.dateFormat && typeof o == "number") {
362
- const S = new Date(o);
239
+ function Ge(e, d, r) {
240
+ if (e == null) return "-";
241
+ if (d?.dateFormat && typeof e == "number") {
242
+ const w = new Date(e);
363
243
  if (r && d.dateFormat === "shortDateShortTime")
364
- return S.toLocaleString(void 0, { dateStyle: "short", timeStyle: "short" });
244
+ return w.toLocaleString(void 0, { dateStyle: "short", timeStyle: "short" });
365
245
  switch (d.dateFormat) {
366
246
  case "shortDateShortTime":
367
- return S.toLocaleDateString();
247
+ return w.toLocaleDateString();
368
248
  case "longMonthDayYear":
369
- return S.toLocaleDateString(void 0, { month: "long", day: "numeric", year: "numeric" });
249
+ return w.toLocaleDateString(void 0, { month: "long", day: "numeric", year: "numeric" });
370
250
  case "shortDate":
371
- return S.toLocaleDateString();
251
+ return w.toLocaleDateString();
372
252
  case "longDate":
373
- return S.toLocaleDateString(void 0, { weekday: "long", month: "long", day: "numeric", year: "numeric" });
253
+ return w.toLocaleDateString(void 0, { weekday: "long", month: "long", day: "numeric", year: "numeric" });
374
254
  default:
375
- return S.toLocaleDateString();
255
+ return w.toLocaleDateString();
376
256
  }
377
257
  }
378
- if (typeof o == "number") {
379
- if (o > 1e12 && !d)
380
- return new Date(o).toLocaleDateString();
381
- const S = d?.places, E = d?.digitSeparator ?? !0;
382
- if (S !== void 0) {
383
- if (Number.isInteger(o) && S >= 0)
384
- return String(o);
385
- const M = o.toFixed(S);
386
- if (E) {
387
- const N = M.split("."), Y = N[0] || "0", V = N[1], Q = Y.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
388
- return V ? `${Q}.${V}` : Q;
258
+ if (typeof e == "number") {
259
+ if (e > 1e12 && !d)
260
+ return new Date(e).toLocaleDateString();
261
+ const w = d?.places, _ = d?.digitSeparator ?? !0;
262
+ if (w !== void 0) {
263
+ if (Number.isInteger(e) && w >= 0)
264
+ return String(e);
265
+ const T = e.toFixed(w);
266
+ if (_) {
267
+ const B = T.split("."), ee = B[0] || "0", U = B[1], X = ee.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
268
+ return U ? `${X}.${U}` : X;
389
269
  }
390
- return M;
270
+ return T;
391
271
  }
392
- return Number.isInteger(o) ? String(o) : E ? o.toLocaleString() : String(o);
272
+ return Number.isInteger(e) ? String(e) : _ ? e.toLocaleString() : String(e);
393
273
  }
394
- return String(o);
274
+ return String(e);
395
275
  }
396
- function Ae(o) {
276
+ function Ae(e) {
397
277
  const d = /* @__PURE__ */ new Set();
398
- return o.filter((r) => {
399
- const E = `${r.layer.id.replace(/-outline$/, "")}:${JSON.stringify(r.properties)}`;
400
- return d.has(E) ? !1 : (d.add(E), !0);
278
+ return e.filter((r) => {
279
+ const _ = `${r.layer.id.replace(/-outline$/, "")}:${JSON.stringify(r.properties)}`;
280
+ return d.has(_) ? !1 : (d.add(_), !0);
401
281
  });
402
282
  }
403
- function Ge(o, d) {
404
- const r = P.value[o];
283
+ function Ne(e, d) {
284
+ const r = M.value[e];
405
285
  if (!r?.features) return null;
406
- const S = d.objectid ?? d.OBJECTID ?? d.FID;
407
- if (S != null) {
408
- const E = r.features.find(
409
- (M) => (M.properties?.objectid ?? M.properties?.OBJECTID ?? M.properties?.FID) === S
286
+ const w = d.objectid ?? d.OBJECTID ?? d.FID;
287
+ if (w != null) {
288
+ const _ = r.features.find(
289
+ (T) => (T.properties?.objectid ?? T.properties?.OBJECTID ?? T.properties?.FID) === w
410
290
  );
411
- if (E) return E.geometry;
291
+ if (_) return _.geometry;
412
292
  }
413
293
  return null;
414
294
  }
415
- function ye(o, d) {
295
+ function He(e, d) {
416
296
  const r = /* @__PURE__ */ new Map();
417
- return d.forEach((S, E) => {
418
- r.set(S.id, E);
419
- }), o.sort((S, E) => {
420
- const M = S.layer.id.replace(/-outline$/, ""), N = E.layer.id.replace(/-outline$/, ""), Y = r.get(M) ?? -1;
421
- return (r.get(N) ?? -1) - Y;
297
+ return d.forEach((w, _) => {
298
+ r.set(w.id, _);
299
+ }), e.sort((w, _) => {
300
+ const T = w.layer.id.replace(/-outline$/, ""), B = _.layer.id.replace(/-outline$/, ""), ee = r.get(T) ?? -1;
301
+ return (r.get(B) ?? -1) - ee;
422
302
  });
423
303
  }
424
- function Fe(o) {
425
- const d = l.value;
304
+ function re(e) {
305
+ const d = n.value;
426
306
  if (!d) return;
427
307
  const r = [];
428
- t.layerList.forEach((D) => {
429
- const Z = D.config;
430
- t.visibleLayers.has(Z.id) && (r.push(Z.id), Z.outlinePaint && r.push(`${Z.id}-outline`));
308
+ a.layerList.forEach((A) => {
309
+ const K = A.config;
310
+ a.visibleLayers.has(K.id) && (r.push(K.id), K.outlinePaint && r.push(`${K.id}-outline`));
431
311
  });
432
- const S = d.project([o.lngLat.lng, o.lngLat.lat]), E = d.queryRenderedFeatures(S, {
312
+ const w = d.project([e.lngLat.lng, e.lngLat.lat]), _ = d.queryRenderedFeatures(w, {
433
313
  layers: r
434
314
  });
435
- if (E.length === 0) return;
436
- const M = Ae(E), N = t.layerList.map((D) => D.config), V = ye(M, N).map((D) => {
437
- const Z = D.layer.id.replace(/-outline$/, ""), q = ke(Z);
438
- if (!q) return null;
439
- const ct = Ge(q.id, D.properties || {});
315
+ if (_.length === 0) return;
316
+ const T = Ae(_), B = a.layerList.map((A) => A.config), U = He(T, B).map((A) => {
317
+ const K = A.layer.id.replace(/-outline$/, ""), H = Pe(K);
318
+ if (!H) return null;
319
+ const de = Ne(H.id, A.properties || {});
440
320
  return {
441
- layerId: q.id,
442
- layerTitle: q.title,
443
- properties: D.properties || {},
444
- geometry: ct || D.geometry,
445
- popupConfig: q.popup
321
+ layerId: H.id,
322
+ layerTitle: H.title,
323
+ properties: A.properties || {},
324
+ geometry: de || A.geometry,
325
+ popupConfig: H.popup
446
326
  };
447
- }).filter((D) => D !== null);
448
- if (V.length === 0) return;
449
- le.value = V, ee.value = 0, Me.value = [o.lngLat.lng, o.lngLat.lat];
450
- const Q = V[0];
451
- if (Q) {
452
- const D = ke(Q.layerId);
453
- if (D) {
454
- const Z = x(Q.geometry), q = H(D.id, D.type);
455
- m.value = {
456
- geometry: Q.geometry,
457
- geometryType: Z,
458
- layerId: D.id,
459
- properties: Q.properties,
460
- originalStyle: q
327
+ }).filter((A) => A !== null);
328
+ if (U.length === 0) return;
329
+ le.value = U, oe.value = 0, ze.value = [e.lngLat.lng, e.lngLat.lat];
330
+ const X = U[0];
331
+ if (X) {
332
+ const A = Pe(X.layerId);
333
+ if (A) {
334
+ const K = v(X.geometry), H = x(A.id, A.type);
335
+ ue.value = {
336
+ geometry: X.geometry,
337
+ geometryType: K,
338
+ layerId: A.id,
339
+ properties: X.properties,
340
+ originalStyle: H
461
341
  };
462
342
  }
463
343
  }
464
344
  }
465
- function te() {
466
- le.value = [], Me.value = null, ee.value = 0, m.value = null;
345
+ function Me() {
346
+ le.value = [], ze.value = null, oe.value = 0, ue.value = null;
467
347
  }
468
- function He(o) {
348
+ function ce(e) {
469
349
  if (le.value.length === 0) return;
470
- const d = o.target;
350
+ const d = e.target;
471
351
  if (!(d.tagName === "INPUT" || d.tagName === "TEXTAREA" || d.isContentEditable))
472
- switch (o.key) {
352
+ switch (e.key) {
473
353
  case "ArrowLeft":
474
354
  case "ArrowUp":
475
- o.preventDefault(), se();
355
+ e.preventDefault(), Te();
476
356
  break;
477
357
  case "ArrowRight":
478
358
  case "ArrowDown":
479
- o.preventDefault(), $e();
359
+ e.preventDefault(), Je();
480
360
  break;
481
361
  case "Escape":
482
- o.preventDefault(), te();
362
+ e.preventDefault(), Me();
483
363
  break;
484
364
  }
485
365
  }
486
- Qe(() => {
487
- window.addEventListener("keydown", He);
488
- }), Ft(() => {
489
- window.removeEventListener("keydown", He);
366
+ Xe(() => {
367
+ window.addEventListener("keydown", ce);
368
+ }), Pt(() => {
369
+ window.removeEventListener("keydown", ce);
490
370
  });
491
- function $e() {
492
- const o = le.value.length;
493
- o <= 1 || ee.value >= o - 1 || (ee.value = ee.value + 1);
494
- }
495
- function se() {
496
- le.value.length <= 1 || ee.value <= 0 || (ee.value = ee.value - 1);
497
- }
498
- const xe = I(() => le.value.length === 0 ? null : le.value[ee.value]), ue = I(() => {
499
- const o = xe.value;
500
- return !o || !o.popupConfig ? o?.layerTitle || "" : lt(o.popupConfig.title, o.properties);
501
- }), Ve = I(() => {
502
- const o = xe.value;
503
- if (!o) return "";
371
+ function Je() {
372
+ const e = le.value.length;
373
+ e <= 1 || oe.value >= e - 1 || (oe.value = oe.value + 1);
374
+ }
375
+ function Te() {
376
+ le.value.length <= 1 || oe.value <= 0 || (oe.value = oe.value - 1);
377
+ }
378
+ const Y = z(() => le.value.length === 0 ? null : le.value[oe.value]), Ke = z(() => {
379
+ const e = Y.value;
380
+ return !e || !e.popupConfig ? e?.layerTitle || "" : qe(e.popupConfig.title, e.properties);
381
+ }), he = z(() => {
382
+ const e = Y.value;
383
+ if (!e) return "";
504
384
  let d = '<div class="popup-content">';
505
- if (d += `<h3 class="popup-title">${pe(ue.value)}</h3>`, o.popupConfig?.fields?.length) {
506
- d += `<table class="popup-table" aria-label="${pe(ue.value)}">`;
507
- for (const r of o.popupConfig.fields) {
508
- const S = Ze(o.properties[r.field], r.format, o.popupConfig.showTime), E = r.label.toLowerCase(), M = E.includes("url") || E.includes("website"), N = S.startsWith("http://") || S.startsWith("https://") || S.startsWith("www.") || M && S.includes("."), Y = S.startsWith("http://") || S.startsWith("https://") ? S : `https://${S}`, V = N ? `<a href="${pe(Y)}" target="_blank" rel="noopener noreferrer">${pe(S)}</a>` : pe(S);
509
- d += `<tr><th scope="row">${pe(r.label)}</th><td>${V}</td></tr>`;
385
+ if (d += `<h3 class="popup-title">${Se(Ke.value)}</h3>`, e.popupConfig?.fields?.length) {
386
+ d += `<table class="popup-table" aria-label="${Se(Ke.value)}">`;
387
+ for (const r of e.popupConfig.fields) {
388
+ const w = Ge(e.properties[r.field], r.format, e.popupConfig.showTime), _ = r.label.toLowerCase(), T = _.includes("url") || _.includes("website"), B = w.startsWith("http://") || w.startsWith("https://") || w.startsWith("www.") || T && w.includes("."), ee = w.startsWith("http://") || w.startsWith("https://") ? w : `https://${w}`, U = B ? `<a href="${Se(ee)}" target="_blank" rel="noopener noreferrer">${Se(w)}</a>` : Se(w);
389
+ d += `<tr><th scope="row">${Se(r.label)}</th><td>${U}</td></tr>`;
510
390
  }
511
391
  d += "</table>";
512
392
  }
513
393
  return d += "</div>", d;
514
- }), ge = $({
394
+ }), Ce = k({
515
395
  type: "FeatureCollection",
516
396
  features: []
517
- }), ne = $({
397
+ }), me = k({
518
398
  type: "FeatureCollection",
519
399
  features: []
520
- }), Te = $({
400
+ }), ae = k({
521
401
  type: "FeatureCollection",
522
402
  features: []
523
- }), rt = {
403
+ }), lt = {
524
404
  "circle-radius": ["get", "highlightRadius"],
525
405
  "circle-color": "#00FFFF",
526
406
  "circle-opacity": 0.8,
527
407
  "circle-stroke-width": 2,
528
408
  "circle-stroke-color": "#FFFFFF"
529
- }, st = {
409
+ }, rt = {
530
410
  "line-width": ["get", "highlightWidth"],
531
411
  "line-color": "#00FFFF",
532
412
  "line-opacity": 0.9
533
- }, Je = {
413
+ }, st = {
534
414
  "fill-color": "#808080",
535
415
  "fill-opacity": 0.5
536
- }, m = $(null);
537
- function x(o) {
538
- return o.type;
416
+ }, ue = k(null);
417
+ function v(e) {
418
+ return e.type;
539
419
  }
540
- function H(o, d) {
541
- const r = ke(o);
420
+ function x(e, d) {
421
+ const r = Pe(e);
542
422
  if (!r) return { radius: 5, width: 2 };
543
- const S = r.paint || {};
423
+ const w = r.paint || {};
544
424
  if (d === "circle") {
545
- const E = S["circle-radius"];
546
- return typeof E == "number" ? { radius: E } : { radius: 5 };
425
+ const _ = w["circle-radius"];
426
+ return typeof _ == "number" ? { radius: _ } : { radius: 5 };
547
427
  }
548
428
  if (d === "line" || d === "fill") {
549
- const E = S["line-width"];
550
- if (typeof E == "number")
551
- return { width: E };
429
+ const _ = w["line-width"];
430
+ if (typeof _ == "number")
431
+ return { width: _ };
552
432
  if (r.outlinePaint && r.outlinePaint["line-width"]) {
553
- const M = r.outlinePaint["line-width"];
554
- if (typeof M == "number")
555
- return { width: M };
433
+ const T = r.outlinePaint["line-width"];
434
+ if (typeof T == "number")
435
+ return { width: T };
556
436
  }
557
437
  return { width: 2 };
558
438
  }
559
439
  return { radius: 5, width: 2 };
560
440
  }
561
- function j(o) {
562
- return !o || o.length === 0 ? [] : o[0] ?? [];
441
+ function q(e) {
442
+ return !e || e.length === 0 ? [] : e[0] ?? [];
563
443
  }
564
- function J(o) {
565
- const { geometry: d, geometryType: r, originalStyle: S } = o;
444
+ function W(e) {
445
+ const { geometry: d, geometryType: r, originalStyle: w } = e;
566
446
  if (r === "Point" || r === "MultiPoint") {
567
- const M = (S.radius || 5) + 3;
447
+ const T = (w.radius || 5) + 3;
568
448
  return {
569
449
  type: "FeatureCollection",
570
450
  features: [
@@ -572,14 +452,14 @@ const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
572
452
  type: "Feature",
573
453
  geometry: d,
574
454
  properties: {
575
- highlightRadius: M
455
+ highlightRadius: T
576
456
  }
577
457
  }
578
458
  ]
579
459
  };
580
460
  }
581
461
  if (r === "LineString" || r === "MultiLineString") {
582
- const M = (S.width || 2) + 3;
462
+ const T = (w.width || 2) + 3;
583
463
  return {
584
464
  type: "FeatureCollection",
585
465
  features: [
@@ -587,14 +467,14 @@ const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
587
467
  type: "Feature",
588
468
  geometry: d,
589
469
  properties: {
590
- highlightWidth: M
470
+ highlightWidth: T
591
471
  }
592
472
  }
593
473
  ]
594
474
  };
595
475
  }
596
476
  if (r === "Polygon") {
597
- const E = d.coordinates, M = j(E), Y = (S.width || 2) + 3;
477
+ const _ = d.coordinates, T = q(_), ee = (w.width || 2) + 3;
598
478
  return {
599
479
  type: "FeatureCollection",
600
480
  features: [
@@ -602,27 +482,27 @@ const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
602
482
  type: "Feature",
603
483
  geometry: {
604
484
  type: "LineString",
605
- coordinates: M
485
+ coordinates: T
606
486
  },
607
487
  properties: {
608
- highlightWidth: Y
488
+ highlightWidth: ee
609
489
  }
610
490
  }
611
491
  ]
612
492
  };
613
493
  }
614
494
  if (r === "MultiPolygon") {
615
- const E = d.coordinates, N = (S.width || 2) + 3;
495
+ const _ = d.coordinates, B = (w.width || 2) + 3;
616
496
  return {
617
497
  type: "FeatureCollection",
618
- features: E.map((V) => ({
498
+ features: _.map((U) => ({
619
499
  type: "Feature",
620
500
  geometry: {
621
501
  type: "LineString",
622
- coordinates: j(V)
502
+ coordinates: q(U)
623
503
  },
624
504
  properties: {
625
- highlightWidth: N
505
+ highlightWidth: B
626
506
  }
627
507
  }))
628
508
  };
@@ -632,187 +512,187 @@ const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
632
512
  features: []
633
513
  };
634
514
  }
635
- function he(o) {
636
- const { geometry: d, geometryType: r } = o;
515
+ function G(e) {
516
+ const { geometry: d, geometryType: r } = e;
637
517
  return r === "Polygon" || r === "MultiPolygon" ? {
638
518
  type: "FeatureCollection",
639
519
  features: [{ type: "Feature", geometry: d, properties: {} }]
640
520
  } : { type: "FeatureCollection", features: [] };
641
521
  }
642
- function Oe(o) {
643
- if (!o) {
644
- It();
522
+ function ve(e) {
523
+ if (!e) {
524
+ Ie();
645
525
  return;
646
526
  }
647
- const d = J(o);
648
- o.geometryType === "Point" || o.geometryType === "MultiPoint" ? (ge.value = d, ne.value = { type: "FeatureCollection", features: [] }, Te.value = { type: "FeatureCollection", features: [] }) : (ne.value = d, ge.value = { type: "FeatureCollection", features: [] }, Te.value = he(o));
649
- }
650
- function It() {
651
- ge.value = { type: "FeatureCollection", features: [] }, ne.value = { type: "FeatureCollection", features: [] }, Te.value = { type: "FeatureCollection", features: [] };
652
- }
653
- ze(m, (o) => {
654
- Oe(o);
655
- }), ze(
656
- () => t.visibleLayers,
657
- (o) => {
658
- m.value && !o.has(m.value.layerId) && (m.value = null, te());
527
+ const d = W(e);
528
+ e.geometryType === "Point" || e.geometryType === "MultiPoint" ? (Ce.value = d, me.value = { type: "FeatureCollection", features: [] }, ae.value = { type: "FeatureCollection", features: [] }) : (me.value = d, Ce.value = { type: "FeatureCollection", features: [] }, ae.value = G(e));
529
+ }
530
+ function Ie() {
531
+ Ce.value = { type: "FeatureCollection", features: [] }, me.value = { type: "FeatureCollection", features: [] }, ae.value = { type: "FeatureCollection", features: [] };
532
+ }
533
+ Re(ue, (e) => {
534
+ ve(e);
535
+ }), Re(
536
+ () => a.visibleLayers,
537
+ (e) => {
538
+ ue.value && !e.has(ue.value.layerId) && (ue.value = null, Me());
659
539
  },
660
540
  { deep: !0 }
661
- ), ze(ee, () => {
662
- const o = xe.value;
663
- if (!o) {
664
- m.value = null;
541
+ ), Re(oe, () => {
542
+ const e = Y.value;
543
+ if (!e) {
544
+ ue.value = null;
665
545
  return;
666
546
  }
667
- const d = ke(o.layerId);
547
+ const d = Pe(e.layerId);
668
548
  if (d) {
669
- const r = x(o.geometry), S = H(d.id, d.type);
670
- m.value = {
671
- geometry: o.geometry,
549
+ const r = v(e.geometry), w = x(d.id, d.type);
550
+ ue.value = {
551
+ geometry: e.geometry,
672
552
  geometryType: r,
673
553
  layerId: d.id,
674
- properties: o.properties,
675
- originalStyle: S
554
+ properties: e.properties,
555
+ originalStyle: w
676
556
  };
677
557
  }
678
558
  });
679
- const vt = $(null);
680
- function Rt(o) {
681
- const [d, r] = o.geometry.coordinates;
682
- vt.value = [d, r];
559
+ const ht = k(null);
560
+ function Et(e) {
561
+ const [d, r] = e.geometry.coordinates;
562
+ ht.value = [d, r];
683
563
  }
684
- return (o, d) => (p(), v("div", io, [
685
- X(O(Wt), {
564
+ return (e, d) => (f(), h("div", jt, [
565
+ Q(O(At), {
686
566
  ref_key: "mapRef",
687
- ref: a,
688
- zoom: t.initialZoom,
689
- center: t.initialCenter,
690
- "navigation-controls": { position: t.navigationControlPosition },
691
- "geolocation-control": { position: t.geolocationControlPosition },
692
- "basemap-change-controls": { toggle: !0, dropdown: !0, position: t.basemapControlPosition },
693
- "map-search-control": { position: t.searchControlPosition },
567
+ ref: l,
568
+ zoom: a.initialZoom,
569
+ center: a.initialCenter,
570
+ "navigation-controls": { position: a.navigationControlPosition },
571
+ "geolocation-control": { position: a.geolocationControlPosition },
572
+ "basemap-change-controls": { toggle: !0, dropdown: !0, position: a.basemapControlPosition },
573
+ "map-search-control": { position: a.searchControlPosition },
694
574
  "enable-cyclomedia": !0,
695
- "cyclomedia-config": t.cyclomediaConfig,
696
- "cyclomedia-button-position": t.cyclomediaButtonPosition,
575
+ "cyclomedia-config": a.cyclomediaConfig,
576
+ "cyclomedia-button-position": a.cyclomediaButtonPosition,
697
577
  "enable-pictometry": !0,
698
- "pictometry-credentials": t.pictometryCredentials,
699
- "pictometry-button-position": t.pictometryButtonPosition,
578
+ "pictometry-credentials": a.pictometryCredentials,
579
+ "pictometry-button-position": a.pictometryButtonPosition,
700
580
  "tool-panel-layout": "vertical",
701
581
  "tool-panel-split-ratio": 50,
702
- onZoom: w,
703
- onClick: te,
704
- onMoveend: u,
705
- onLoad: f,
706
- onSearchResult: Rt
582
+ onZoom: $,
583
+ onClick: Me,
584
+ onMoveend: g,
585
+ onLoad: c,
586
+ onSearchResult: Et
707
587
  }, {
708
588
  default: Ue(() => [
709
- t.drawControlPosition !== null ? (p(), oe(O(jt), {
589
+ a.drawControlPosition !== null ? (f(), te(O(Nt), {
710
590
  key: 0,
711
- position: t.drawControlPosition
712
- }, null, 8, ["position"])) : T("", !0),
713
- (p(!0), v(ie, null, re(nt.value, (r) => (p(), oe(O(St), {
591
+ position: a.drawControlPosition
592
+ }, null, 8, ["position"])) : E("", !0),
593
+ (f(!0), h(ie, null, se(at.value, (r) => (f(), te(O(wt), {
714
594
  id: "tiled-" + r.id,
715
595
  key: "tiled-" + r.id,
716
- source: ot(r),
717
- paint: { "raster-opacity": Pe(r.id) },
596
+ source: tt(r),
597
+ paint: { "raster-opacity": ye(r.id) },
718
598
  minzoom: r.minZoom,
719
599
  maxzoom: r.maxZoom
720
600
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
721
- (p(!0), v(ie, null, re(it.value, (r) => (p(), oe(O(St), {
601
+ (f(!0), h(ie, null, se(it.value, (r) => (f(), te(O(wt), {
722
602
  id: "dynamic-" + r.id,
723
603
  key: "dynamic-" + r.id,
724
- source: _e(r),
725
- paint: { "raster-opacity": Pe(r.id) },
604
+ source: nt(r),
605
+ paint: { "raster-opacity": ye(r.id) },
726
606
  minzoom: r.minZoom,
727
607
  maxzoom: r.maxZoom
728
608
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
729
- (p(!0), v(ie, null, re(F.value, (r) => (p(), oe(O(Ct), {
609
+ (f(!0), h(ie, null, se(I.value, (r) => (f(), te(O(Lt), {
730
610
  id: r.id,
731
611
  key: r.id,
732
- source: we(r),
733
- paint: Le(r),
612
+ source: ge(r),
613
+ paint: _e(r),
734
614
  minzoom: r.minZoom,
735
615
  maxzoom: r.maxZoom,
736
616
  "before-id": "highlight-circles",
737
- onClick: Fe
617
+ onClick: re
738
618
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
739
- (p(!0), v(ie, null, re(R.value, (r) => (p(), oe(O(kt), {
619
+ (f(!0), h(ie, null, se(F.value, (r) => (f(), te(O(St), {
740
620
  id: r.id,
741
621
  key: r.id,
742
- source: we(r),
743
- paint: Le(r),
622
+ source: ge(r),
623
+ paint: _e(r),
744
624
  minzoom: r.minZoom,
745
625
  maxzoom: r.maxZoom,
746
626
  "before-id": "highlight-circles",
747
- onClick: Fe
627
+ onClick: re
748
628
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
749
- (p(!0), v(ie, null, re(A.value, (r) => (p(), oe(O(ut), {
629
+ (f(!0), h(ie, null, se(R.value, (r) => (f(), te(O(ct), {
750
630
  id: r.id + "-outline",
751
631
  key: r.id + "-outline",
752
- source: we(r),
753
- paint: at(r),
632
+ source: ge(r),
633
+ paint: Oe(r),
754
634
  minzoom: r.minZoom,
755
635
  maxzoom: r.maxZoom,
756
636
  "before-id": "highlight-lines",
757
- onClick: Fe
637
+ onClick: re
758
638
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
759
- (p(!0), v(ie, null, re(de.value, (r) => (p(), oe(O(ut), {
639
+ (f(!0), h(ie, null, se(Z.value, (r) => (f(), te(O(ct), {
760
640
  id: r.id,
761
641
  key: r.id,
762
- source: we(r),
763
- paint: Le(r),
642
+ source: ge(r),
643
+ paint: _e(r),
764
644
  minzoom: r.minZoom,
765
645
  maxzoom: r.maxZoom,
766
646
  "before-id": "highlight-lines",
767
- onClick: Fe
647
+ onClick: re
768
648
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
769
- X(O(Ct), {
649
+ Q(O(Lt), {
770
650
  id: "highlight-circles",
771
651
  key: "highlight-circles-layer",
772
- source: { type: "geojson", data: ge.value },
773
- paint: rt
652
+ source: { type: "geojson", data: Ce.value },
653
+ paint: lt
774
654
  }, null, 8, ["source"]),
775
- X(O(kt), {
655
+ Q(O(St), {
776
656
  id: "highlight-fill",
777
657
  key: "highlight-fill-layer",
778
- source: { type: "geojson", data: Te.value },
779
- paint: Je
658
+ source: { type: "geojson", data: ae.value },
659
+ paint: st
780
660
  }, null, 8, ["source"]),
781
- X(O(ut), {
661
+ Q(O(ct), {
782
662
  id: "highlight-lines",
783
663
  key: "highlight-lines-layer",
784
- source: { type: "geojson", data: ne.value },
785
- paint: st
664
+ source: { type: "geojson", data: me.value },
665
+ paint: rt
786
666
  }, null, 8, ["source"]),
787
- X(O(qt), {
788
- "lng-lat": vt.value,
667
+ Q(O(Vt), {
668
+ "lng-lat": ht.value,
789
669
  color: "#2176d2"
790
670
  }, null, 8, ["lng-lat"]),
791
- xe.value && Me.value ? (p(), oe(O(Gt), {
671
+ Y.value && ze.value ? (f(), te(O(Ut), {
792
672
  key: 1,
793
- "lng-lat": Me.value,
794
- html: Ve.value,
673
+ "lng-lat": ze.value,
674
+ html: he.value,
795
675
  "close-on-click": !1,
796
676
  offset: [0, -15],
797
677
  "show-navigation": le.value.length > 1,
798
- "current-feature-index": ee.value,
678
+ "current-feature-index": oe.value,
799
679
  "total-features": le.value.length,
800
- "layer-name": xe.value.layerTitle,
801
- onClose: te,
802
- onNext: $e,
803
- onPrevious: se
804
- }, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : T("", !0)
680
+ "layer-name": Y.value.layerTitle,
681
+ onClose: Me,
682
+ onNext: Je,
683
+ onPrevious: Te
684
+ }, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : E("", !0)
805
685
  ]),
806
686
  _: 1
807
687
  }, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
808
688
  ]));
809
689
  }
810
- }), Re = (e, i) => {
811
- const t = e.__vccOpts || e;
812
- for (const [n, a] of i)
813
- t[n] = a;
814
- return t;
815
- }, lo = /* @__PURE__ */ Re(ao, [["__scopeId", "data-v-8ba101d1"]]), ro = ["disabled"], so = /* @__PURE__ */ Ce({
690
+ }), De = (t, i) => {
691
+ const a = t.__vccOpts || t;
692
+ for (const [o, l] of i)
693
+ a[o] = l;
694
+ return a;
695
+ }, Gt = /* @__PURE__ */ De(qt, [["__scopeId", "data-v-ead53fa0"]]), Ht = ["disabled"], Jt = /* @__PURE__ */ $e({
816
696
  inheritAttrs: !1,
817
697
  __name: "PhlButton",
818
698
  props: {
@@ -833,25 +713,25 @@ const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
833
713
  src: {},
834
714
  svgRaw: {}
835
715
  },
836
- setup(e) {
837
- const i = e, t = (c) => "href" in c && c.href !== void 0 || "to" in c && c.to !== void 0, n = I(() => pt(
716
+ setup(t) {
717
+ const i = t, a = (y) => "href" in y && y.href !== void 0 || "to" in y && y.to !== void 0, o = z(() => ft(
838
718
  "phila-button",
839
719
  `phila-button--${i.variant}`,
840
720
  i.size && `is-${i.size}`,
841
721
  i.iconOnly && "icon-button",
842
722
  i.iconOnly && i.variant === "standard" && "icon-button--standard",
843
723
  i.className
844
- )), a = I(() => t(i) ? "to" in i && i.to !== void 0 ? {
724
+ )), l = z(() => a(i) ? "to" in i && i.to !== void 0 ? {
845
725
  to: i.to,
846
726
  disabled: i.disabled,
847
- className: n.value
727
+ className: o.value
848
728
  } : {
849
729
  href: i.href,
850
730
  target: i.target,
851
731
  rel: i.rel,
852
732
  disabled: i.disabled,
853
- className: n.value
854
- } : {}), l = I(
733
+ className: o.value
734
+ } : {}), n = z(
855
735
  () => ({
856
736
  iconDefinition: i.iconDefinition,
857
737
  iconClass: i.iconClass,
@@ -862,51 +742,51 @@ const io = { class: "map-panel" }, ao = /* @__PURE__ */ Ce({
862
742
  size: i.size
863
743
  })
864
744
  );
865
- return (c, w) => t(i) ? (p(), oe(O(Ht), ft({ key: 0 }, { ...a.value, ...c.$attrs }, { role: "button" }), {
745
+ return (y, $) => a(i) ? (f(), te(O(Wt), dt({ key: 0 }, { ...l.value, ...y.$attrs }, { role: "button" }), {
866
746
  default: Ue(() => [
867
- X(O($t), bt(wt(l.value)), {
747
+ Q(O(Ct), mt(vt(n.value)), {
868
748
  default: Ue(() => [
869
- ce(c.$slots, "default", {}, () => [
870
- be(U(i.text), 1)
749
+ fe(y.$slots, "default", {}, () => [
750
+ Le(N(i.text), 1)
871
751
  ])
872
752
  ]),
873
753
  _: 3
874
754
  }, 16)
875
755
  ]),
876
756
  _: 3
877
- }, 16)) : (p(), v("button", ft({
757
+ }, 16)) : (f(), h("button", dt({
878
758
  key: 1,
879
759
  type: "button",
880
760
  disabled: i.disabled,
881
- class: n.value
882
- }, c.$attrs), [
883
- X(O($t), bt(wt(l.value)), {
761
+ class: o.value
762
+ }, y.$attrs), [
763
+ Q(O(Ct), mt(vt(n.value)), {
884
764
  default: Ue(() => [
885
- ce(c.$slots, "default", {}, () => [
886
- be(U(i.text), 1)
765
+ fe(y.$slots, "default", {}, () => [
766
+ Le(N(i.text), 1)
887
767
  ])
888
768
  ]),
889
769
  _: 3
890
770
  }, 16)
891
- ], 16, ro));
771
+ ], 16, Ht));
892
772
  }
893
773
  });
894
- var co = {
774
+ var Kt = {
895
775
  prefix: "fas",
896
776
  iconName: "circle-exclamation",
897
777
  icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
898
- }, uo = co, fo = {
778
+ }, Qt = Kt, Xt = {
899
779
  prefix: "fas",
900
780
  iconName: "xmark",
901
781
  icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
902
- }, po = fo;
903
- const yo = ["for"], go = { class: "state-layer" }, ho = { class: "content" }, mo = { class: "input-text-container" }, vo = ["id", "placeholder", "aria-label"], bo = {
782
+ }, Yt = Xt;
783
+ const eo = ["for"], to = { class: "state-layer" }, oo = { class: "content" }, ao = { class: "input-text-container" }, io = ["id", "placeholder", "aria-label"], no = {
904
784
  key: 1,
905
785
  class: "has-text-body-small phila-supporting-text"
906
- }, wo = {
786
+ }, lo = {
907
787
  key: 2,
908
788
  class: "has-text-body-small phila-error-text"
909
- }, Lo = /* @__PURE__ */ Ce({
789
+ }, ro = /* @__PURE__ */ $e({
910
790
  inheritAttrs: !1,
911
791
  __name: "TextField",
912
792
  props: {
@@ -923,137 +803,137 @@ const yo = ["for"], go = { class: "state-layer" }, ho = { class: "content" }, mo
923
803
  } }
924
804
  },
925
805
  emits: ["update:modelValue"],
926
- setup(e, { emit: i }) {
927
- const t = Dt(), n = e, a = I(() => typeof n.error == "string" ? n.error : n.error[0]), l = Bt(n, "id"), c = i, w = $(""), y = I({
928
- get: () => n.modelValue !== void 0 ? n.modelValue : w.value,
929
- set: (g) => {
930
- c("update:modelValue", g), w.value = g;
806
+ setup(t, { emit: i }) {
807
+ const a = Ot(), o = t, l = z(() => typeof o.error == "string" ? o.error : o.error[0]), n = zt(o, "id"), y = i, $ = k(""), m = z({
808
+ get: () => o.modelValue !== void 0 ? o.modelValue : $.value,
809
+ set: (p) => {
810
+ y("update:modelValue", p), $.value = p;
931
811
  }
932
- }), P = I(() => {
933
- const g = ["default-class"];
934
- return t.disabled != null && g.push("phila-input--disabled"), a.value && g.push("phila-input--error"), t.required != null && g.push("phila-input--required"), pt(...g);
935
- }), b = I(() => {
936
- const g = [];
937
- return y.value !== "" && g.push("phila-text-field--filled"), n.className && g.push(n.className), pt(...g);
938
- }), C = I(() => {
939
- if (!(n.label || t["aria-label"]))
940
- return n.placeholder || void 0;
941
- }), s = $(null), k = (g) => {
942
- g.target.closest("button") || s.value?.focus();
812
+ }), M = z(() => {
813
+ const p = ["default-class"];
814
+ return a.disabled != null && p.push("phila-input--disabled"), l.value && p.push("phila-input--error"), a.required != null && p.push("phila-input--required"), ft(...p);
815
+ }), L = z(() => {
816
+ const p = [];
817
+ return m.value !== "" && p.push("phila-text-field--filled"), o.className && p.push(o.className), ft(...p);
818
+ }), S = z(() => {
819
+ if (!(o.label || a["aria-label"]))
820
+ return o.placeholder || void 0;
821
+ }), s = k(null), C = (p) => {
822
+ p.target.closest("button") || s.value?.focus();
943
823
  };
944
- return (g, h) => (p(), v("div", {
945
- class: ae(["phila-input", P.value])
824
+ return (p, g) => (f(), h("div", {
825
+ class: ne(["phila-input", M.value])
946
826
  }, [
947
- n.label ? (p(), v("label", {
827
+ o.label ? (f(), h("label", {
948
828
  key: 0,
949
- for: l.value,
829
+ for: n.value,
950
830
  class: "has-text-label-small phila-label"
951
- }, U(n.label), 9, yo)) : T("", !0),
952
- _("div", {
953
- class: ae(["phila-text-field", b.value]),
954
- onClick: k
831
+ }, N(o.label), 9, eo)) : E("", !0),
832
+ P("div", {
833
+ class: ne(["phila-text-field", L.value]),
834
+ onClick: C
955
835
  }, [
956
- _("div", go, [
957
- n.leadingIcon ? (p(), oe(O(me), {
836
+ P("div", to, [
837
+ o.leadingIcon ? (f(), te(O(be), {
958
838
  key: 0,
959
- "icon-class": n.leadingIcon,
839
+ "icon-class": o.leadingIcon,
960
840
  inline: "",
961
841
  decorative: ""
962
- }, null, 8, ["icon-class"])) : T("", !0),
963
- _("div", ho, [
964
- _("div", mo, [
965
- Tt(_("input", ft({
966
- id: l.value,
842
+ }, null, 8, ["icon-class"])) : E("", !0),
843
+ P("div", oo, [
844
+ P("div", ao, [
845
+ Mt(P("input", dt({
846
+ id: n.value,
967
847
  ref_key: "inputRef",
968
848
  ref: s,
969
- "onUpdate:modelValue": h[0] || (h[0] = (u) => y.value = u),
849
+ "onUpdate:modelValue": g[0] || (g[0] = (c) => m.value = c),
970
850
  class: "phila-text-field-input has-text-body-default",
971
- placeholder: n.placeholder,
972
- "aria-label": C.value
973
- }, O(t)), null, 16, vo), [
974
- [Zt, y.value]
851
+ placeholder: o.placeholder,
852
+ "aria-label": S.value
853
+ }, O(a)), null, 16, io), [
854
+ [It, m.value]
975
855
  ])
976
856
  ])
977
857
  ]),
978
- y.value != "" ? (p(), oe(O(so), {
858
+ m.value != "" ? (f(), te(O(Jt), {
979
859
  key: 1,
980
860
  variant: "standard",
981
861
  size: "small",
982
862
  "icon-only": "",
983
- "icon-definition": O(po),
984
- onClick: h[1] || (h[1] = (u) => y.value = "")
985
- }, null, 8, ["icon-definition"])) : T("", !0),
986
- n.trailingIcon ? (p(), oe(O(me), {
863
+ "icon-definition": O(Yt),
864
+ onClick: g[1] || (g[1] = (c) => m.value = "")
865
+ }, null, 8, ["icon-definition"])) : E("", !0),
866
+ o.trailingIcon ? (f(), te(O(be), {
987
867
  key: 2,
988
868
  size: "small",
989
- "icon-class": n.trailingIcon,
869
+ "icon-class": o.trailingIcon,
990
870
  inline: "",
991
871
  decorative: ""
992
- }, null, 8, ["icon-class"])) : T("", !0),
993
- ce(g.$slots, "trailing-action")
872
+ }, null, 8, ["icon-class"])) : E("", !0),
873
+ fe(p.$slots, "trailing-action")
994
874
  ])
995
875
  ], 2),
996
- n.supportingText ? (p(), v("div", bo, U(n.supportingText), 1)) : T("", !0),
997
- a.value ? (p(), v("div", wo, [
998
- X(O(me), {
999
- "icon-definition": O(uo),
876
+ o.supportingText ? (f(), h("div", no, N(o.supportingText), 1)) : E("", !0),
877
+ l.value ? (f(), h("div", lo, [
878
+ Q(O(be), {
879
+ "icon-definition": O(Qt),
1000
880
  size: "small",
1001
881
  inline: "",
1002
882
  decorative: ""
1003
883
  }, null, 8, ["icon-definition"]),
1004
- be(" " + U(a.value), 1)
1005
- ])) : T("", !0)
884
+ Le(" " + N(l.value), 1)
885
+ ])) : E("", !0)
1006
886
  ], 2));
1007
887
  }
1008
888
  });
1009
- var So = {
889
+ var so = {
1010
890
  prefix: "fas",
1011
891
  iconName: "filter",
1012
892
  icon: [512, 512, [], "f0b0", "M32 64C19.1 64 7.4 71.8 2.4 83.8S.2 109.5 9.4 118.6L192 301.3 192 416c0 8.5 3.4 16.6 9.4 22.6l64 64c9.2 9.2 22.9 11.9 34.9 6.9S320 492.9 320 480l0-178.7 182.6-182.6c9.2-9.2 11.9-22.9 6.9-34.9S492.9 64 480 64L32 64z"]
1013
- }, Co = {
893
+ }, co = {
1014
894
  prefix: "fas",
1015
895
  iconName: "caret-right",
1016
896
  icon: [256, 512, [], "f0da", "M249.3 235.8c10.2 12.6 9.5 31.1-2.2 42.8l-128 128c-9.2 9.2-22.9 11.9-34.9 6.9S64.5 396.9 64.5 384l0-256c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l128 128 2.2 2.4z"]
1017
- }, ko = {
897
+ }, uo = {
1018
898
  prefix: "fas",
1019
899
  iconName: "caret-left",
1020
900
  icon: [256, 512, [], "f0d9", "M7.7 235.8c-10.3 12.6-9.5 31.1 2.2 42.8l128 128c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-256c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-128 128-2.2 2.4z"]
1021
- }, Pt = {
901
+ }, kt = {
1022
902
  prefix: "fas",
1023
903
  iconName: "xmark",
1024
904
  icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
1025
- }, $o = {
905
+ }, fo = {
1026
906
  prefix: "fas",
1027
907
  iconName: "bars",
1028
908
  icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
1029
- }, xo = {
909
+ }, po = {
1030
910
  prefix: "fas",
1031
911
  iconName: "circle-info",
1032
912
  icon: [512, 512, ["info-circle"], "f05a", "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]
1033
913
  };
1034
- const Po = { class: "layer-panel" }, _o = {
914
+ const yo = { class: "layer-panel" }, go = {
1035
915
  key: 0,
1036
916
  class: "search-box"
1037
- }, Eo = {
917
+ }, ho = {
1038
918
  key: 1,
1039
919
  class: "topics-container"
1040
- }, Mo = { class: "layer-row" }, Fo = ["href", "aria-label"], To = {
920
+ }, mo = { class: "layer-row" }, vo = ["href", "aria-label"], bo = {
1041
921
  key: 1,
1042
922
  class: "metadata-placeholder"
1043
- }, Oo = ["checked", "disabled", "onChange"], zo = { class: "layer-title" }, Io = {
923
+ }, wo = ["checked", "disabled", "onChange"], Lo = { class: "layer-title" }, So = {
1044
924
  key: 0,
1045
925
  class: "loading-indicator",
1046
926
  role: "status"
1047
- }, Ro = ["aria-label"], Do = {
927
+ }, Co = ["aria-label"], ko = {
1048
928
  key: 2,
1049
929
  class: "zoom-indicator"
1050
- }, Bo = {
930
+ }, xo = {
1051
931
  key: 0,
1052
932
  class: "opacity-control"
1053
- }, Zo = ["for"], Ao = ["id", "value", "aria-label", "onInput"], Vo = ["aria-label"], No = { class: "legend-label" }, Uo = {
933
+ }, $o = ["for"], _o = ["id", "value", "aria-label", "onInput"], Po = ["aria-label"], Mo = { class: "legend-label" }, To = {
1054
934
  key: 0,
1055
935
  class: "no-results"
1056
- }, Wo = /* @__PURE__ */ Ce({
936
+ }, Fo = /* @__PURE__ */ $e({
1057
937
  __name: "LayerPanel",
1058
938
  props: {
1059
939
  layerList: {},
@@ -1071,60 +951,60 @@ const Po = { class: "layer-panel" }, _o = {
1071
951
  searchPlaceholder: { default: "Filter layers..." }
1072
952
  },
1073
953
  emits: ["toggleLayer", "setOpacity", "updateSearch"],
1074
- setup(e, { emit: i }) {
1075
- const t = e, n = i, a = I(() => {
1076
- if (!t.searchQuery.trim())
1077
- return t.layerList;
1078
- const u = t.searchQuery.toLowerCase();
1079
- return t.layerList.filter((f) => f.config.title.toLowerCase().includes(u));
954
+ setup(t, { emit: i }) {
955
+ const a = t, o = i, l = z(() => {
956
+ if (!a.searchQuery.trim())
957
+ return a.layerList;
958
+ const c = a.searchQuery.toLowerCase();
959
+ return a.layerList.filter((u) => u.config.title.toLowerCase().includes(c));
1080
960
  });
1081
- function l(u) {
1082
- let f = u.split("?")[0] || u;
1083
- return f = f.replace(/\/query$/, ""), f = f.replace(/\/$/, ""), f.toLowerCase();
961
+ function n(c) {
962
+ let u = c.split("?")[0] || c;
963
+ return u = u.replace(/\/query$/, ""), u = u.replace(/\/$/, ""), u.toLowerCase();
1084
964
  }
1085
- function c(u) {
1086
- const f = l(u);
1087
- return t.layerMetadata[f] || null;
965
+ function y(c) {
966
+ const u = n(c);
967
+ return a.layerMetadata[u] || null;
1088
968
  }
1089
- const w = I(() => t.layerList.some((u) => c(u.config.url)));
1090
- function y(u) {
1091
- return t.visibleLayers.has(u);
969
+ const $ = z(() => a.layerList.some((c) => y(c.config.url)));
970
+ function m(c) {
971
+ return a.visibleLayers.has(c);
1092
972
  }
1093
- function P(u) {
1094
- return t.layerOpacities[u] ?? 1;
973
+ function M(c) {
974
+ return a.layerOpacities[c] ?? 1;
1095
975
  }
1096
- function b(u) {
1097
- return t.loadingLayers.has(u);
976
+ function L(c) {
977
+ return a.loadingLayers.has(c);
1098
978
  }
1099
- function C(u) {
1100
- return t.layerErrors[u] || null;
979
+ function S(c) {
980
+ return a.layerErrors[c] || null;
1101
981
  }
1102
- function s(u) {
1103
- const f = t.currentZoom, L = u.minZoom, z = u.maxZoom;
1104
- return !(L !== void 0 && f < L || z !== void 0 && f > z);
982
+ function s(c) {
983
+ const u = a.currentZoom, b = c.minZoom, I = c.maxZoom;
984
+ return !(b !== void 0 && u < b || I !== void 0 && u > I);
1105
985
  }
1106
- const k = I({
1107
- get: () => t.searchQuery,
1108
- set: (u) => n("updateSearch", u)
986
+ const C = z({
987
+ get: () => a.searchQuery,
988
+ set: (c) => o("updateSearch", c)
1109
989
  });
1110
- function g(u) {
1111
- n("toggleLayer", u);
1112
- }
1113
- function h(u, f) {
1114
- const L = f.target, z = parseFloat(L.value);
1115
- n("setOpacity", u, z);
1116
- }
1117
- return (u, f) => (p(), v("div", Po, [
1118
- e.showSearch ? (p(), v("div", _o, [
1119
- X(O(Lo), {
1120
- modelValue: k.value,
1121
- "onUpdate:modelValue": f[0] || (f[0] = (L) => k.value = L),
1122
- placeholder: e.searchPlaceholder,
990
+ function p(c) {
991
+ o("toggleLayer", c);
992
+ }
993
+ function g(c, u) {
994
+ const b = u.target, I = parseFloat(b.value);
995
+ o("setOpacity", c, I);
996
+ }
997
+ return (c, u) => (f(), h("div", yo, [
998
+ t.showSearch ? (f(), h("div", go, [
999
+ Q(O(ro), {
1000
+ modelValue: C.value,
1001
+ "onUpdate:modelValue": u[0] || (u[0] = (b) => C.value = b),
1002
+ placeholder: t.searchPlaceholder,
1123
1003
  "class-name": "layer-search-field"
1124
1004
  }, {
1125
1005
  "trailing-action": Ue(() => [
1126
- X(O(me), {
1127
- "icon-definition": O(So),
1006
+ Q(O(be), {
1007
+ "icon-definition": O(so),
1128
1008
  size: "small",
1129
1009
  inline: "",
1130
1010
  decorative: ""
@@ -1132,143 +1012,143 @@ const Po = { class: "layer-panel" }, _o = {
1132
1012
  ]),
1133
1013
  _: 1
1134
1014
  }, 8, ["modelValue", "placeholder"])
1135
- ])) : T("", !0),
1136
- e.mode === "topics" ? (p(), v("div", Eo, [
1137
- ce(u.$slots, "topics", {}, () => [
1138
- f[2] || (f[2] = _("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
1015
+ ])) : E("", !0),
1016
+ t.mode === "topics" ? (f(), h("div", ho, [
1017
+ fe(c.$slots, "topics", {}, () => [
1018
+ u[2] || (u[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
1139
1019
  ], !0)
1140
- ])) : (p(), v("div", {
1020
+ ])) : (f(), h("div", {
1141
1021
  key: 2,
1142
- class: ae(["layer-list", { "has-metadata": w.value }])
1022
+ class: ne(["layer-list", { "has-metadata": $.value }])
1143
1023
  }, [
1144
- (p(!0), v(ie, null, re(a.value, (L) => (p(), v("div", {
1145
- key: L.config.id,
1024
+ (f(!0), h(ie, null, se(l.value, (b) => (f(), h("div", {
1025
+ key: b.config.id,
1146
1026
  class: "layer-item"
1147
1027
  }, [
1148
- _("div", Mo, [
1149
- c(L.config.url) ? (p(), v("a", {
1028
+ P("div", mo, [
1029
+ y(b.config.url) ? (f(), h("a", {
1150
1030
  key: 0,
1151
- href: c(L.config.url) || "",
1031
+ href: y(b.config.url) || "",
1152
1032
  target: "_blank",
1153
1033
  rel: "noopener noreferrer",
1154
1034
  class: "metadata-link",
1155
- "aria-label": "View metadata for " + L.config.title,
1156
- onClick: f[1] || (f[1] = At(() => {
1035
+ "aria-label": "View metadata for " + b.config.title,
1036
+ onClick: u[1] || (u[1] = Rt(() => {
1157
1037
  }, ["stop"]))
1158
1038
  }, [
1159
- X(O(me), {
1160
- "icon-definition": O(xo),
1039
+ Q(O(be), {
1040
+ "icon-definition": O(po),
1161
1041
  size: "small",
1162
1042
  inline: "",
1163
1043
  decorative: ""
1164
1044
  }, null, 8, ["icon-definition"])
1165
- ], 8, Fo)) : w.value ? (p(), v("span", To)) : T("", !0),
1166
- _("label", {
1167
- class: ae(["layer-checkbox", {
1168
- "layer-unavailable": !s(L.config),
1169
- "layer-error": C(L.config.id)
1045
+ ], 8, vo)) : $.value ? (f(), h("span", bo)) : E("", !0),
1046
+ P("label", {
1047
+ class: ne(["layer-checkbox", {
1048
+ "layer-unavailable": !s(b.config),
1049
+ "layer-error": S(b.config.id)
1170
1050
  }])
1171
1051
  }, [
1172
- _("input", {
1052
+ P("input", {
1173
1053
  type: "checkbox",
1174
- checked: y(L.config.id),
1175
- disabled: !s(L.config),
1176
- onChange: (z) => g(L.config.id)
1177
- }, null, 40, Oo),
1178
- _("span", zo, [
1179
- be(U(L.config.title) + " ", 1),
1180
- b(L.config.id) ? (p(), v("span", Io, " Loading... ")) : T("", !0),
1181
- C(L.config.id) ? (p(), v("span", {
1054
+ checked: m(b.config.id),
1055
+ disabled: !s(b.config),
1056
+ onChange: (I) => p(b.config.id)
1057
+ }, null, 40, wo),
1058
+ P("span", Lo, [
1059
+ Le(N(b.config.title) + " ", 1),
1060
+ L(b.config.id) ? (f(), h("span", So, " Loading... ")) : E("", !0),
1061
+ S(b.config.id) ? (f(), h("span", {
1182
1062
  key: 1,
1183
1063
  class: "error-indicator",
1184
- "aria-label": C(L.config.id) || "Error",
1064
+ "aria-label": S(b.config.id) || "Error",
1185
1065
  role: "status"
1186
- }, " Error ", 8, Ro)) : T("", !0),
1187
- s(L.config) ? T("", !0) : (p(), v("span", Do, " (zoom in) "))
1066
+ }, " Error ", 8, Co)) : E("", !0),
1067
+ s(b.config) ? E("", !0) : (f(), h("span", ko, " (zoom in) "))
1188
1068
  ])
1189
1069
  ], 2)
1190
1070
  ]),
1191
- e.showOpacity && y(L.config.id) ? (p(), v("div", Bo, [
1192
- _("label", {
1071
+ t.showOpacity && m(b.config.id) ? (f(), h("div", xo, [
1072
+ P("label", {
1193
1073
  class: "opacity-label",
1194
- for: "opacity-" + L.config.id
1195
- }, " Opacity: " + U(Math.round(P(L.config.id) * 100)) + "% ", 9, Zo),
1196
- _("input", {
1197
- id: "opacity-" + L.config.id,
1074
+ for: "opacity-" + b.config.id
1075
+ }, " Opacity: " + N(Math.round(M(b.config.id) * 100)) + "% ", 9, $o),
1076
+ P("input", {
1077
+ id: "opacity-" + b.config.id,
1198
1078
  type: "range",
1199
1079
  min: "0",
1200
1080
  max: "1",
1201
1081
  step: "0.05",
1202
- value: P(L.config.id),
1203
- "aria-label": "Opacity for " + L.config.title,
1082
+ value: M(b.config.id),
1083
+ "aria-label": "Opacity for " + b.config.title,
1204
1084
  class: "opacity-slider",
1205
- onInput: (z) => h(L.config.id, z)
1206
- }, null, 40, Ao)
1207
- ])) : T("", !0),
1208
- e.showLegend && y(L.config.id) && L.config.legend?.length ? (p(), v("ul", {
1085
+ onInput: (I) => g(b.config.id, I)
1086
+ }, null, 40, _o)
1087
+ ])) : E("", !0),
1088
+ t.showLegend && m(b.config.id) && b.config.legend?.length ? (f(), h("ul", {
1209
1089
  key: 1,
1210
1090
  class: "layer-legend",
1211
- "aria-label": "Legend for " + L.config.title
1091
+ "aria-label": "Legend for " + b.config.title
1212
1092
  }, [
1213
- (p(!0), v(ie, null, re(L.config.legend, (z, F) => (p(), v("li", {
1093
+ (f(!0), h(ie, null, se(b.config.legend, (I, F) => (f(), h("li", {
1214
1094
  key: F,
1215
1095
  class: "legend-item"
1216
1096
  }, [
1217
- z.type === "circle" ? (p(), v("span", {
1097
+ I.type === "circle" ? (f(), h("span", {
1218
1098
  key: 0,
1219
1099
  class: "legend-symbol legend-circle",
1220
- style: K({ backgroundColor: z.color }),
1100
+ style: J({ backgroundColor: I.color }),
1221
1101
  "aria-hidden": "true"
1222
- }, null, 4)) : z.type === "line" ? (p(), v("span", {
1102
+ }, null, 4)) : I.type === "line" ? (f(), h("span", {
1223
1103
  key: 1,
1224
1104
  class: "legend-symbol legend-line",
1225
- style: K({
1226
- backgroundColor: z.color,
1227
- height: `${z.width || 2}px`
1105
+ style: J({
1106
+ backgroundColor: I.color,
1107
+ height: `${I.width || 2}px`
1228
1108
  }),
1229
1109
  "aria-hidden": "true"
1230
- }, null, 4)) : z.type === "fill" ? (p(), v("span", {
1110
+ }, null, 4)) : I.type === "fill" ? (f(), h("span", {
1231
1111
  key: 2,
1232
1112
  class: "legend-symbol legend-fill",
1233
- style: K({ backgroundColor: z.color }),
1113
+ style: J({ backgroundColor: I.color }),
1234
1114
  "aria-hidden": "true"
1235
- }, null, 4)) : T("", !0),
1236
- _("span", No, U(z.label), 1)
1115
+ }, null, 4)) : E("", !0),
1116
+ P("span", Mo, N(I.label), 1)
1237
1117
  ]))), 128))
1238
- ], 8, Vo)) : T("", !0)
1118
+ ], 8, Po)) : E("", !0)
1239
1119
  ]))), 128)),
1240
- a.value.length === 0 ? (p(), v("div", Uo, 'No layers match "' + U(e.searchQuery) + '"', 1)) : T("", !0)
1120
+ l.value.length === 0 ? (f(), h("div", To, 'No layers match "' + N(t.searchQuery) + '"', 1)) : E("", !0)
1241
1121
  ], 2))
1242
1122
  ]));
1243
1123
  }
1244
- }), jo = /* @__PURE__ */ Re(Wo, [["__scopeId", "data-v-0a3d0d7e"]]);
1245
- function B(e) {
1246
- if (!e || !Array.isArray(e) || e.length < 3) return "#888888";
1247
- const i = e[0], t = e[1], n = e[2], l = (e[3] ?? 255) / 255;
1248
- return l === 1 ? `#${i.toString(16).padStart(2, "0")}${t.toString(16).padStart(2, "0")}${n.toString(16).padStart(2, "0")}` : `rgba(${i}, ${t}, ${n}, ${l.toFixed(2)})`;
1124
+ }), Eo = /* @__PURE__ */ De(Fo, [["__scopeId", "data-v-0a3d0d7e"]]);
1125
+ function D(t) {
1126
+ if (!t || !Array.isArray(t) || t.length < 3) return "#888888";
1127
+ const i = t[0], a = t[1], o = t[2], n = (t[3] ?? 255) / 255;
1128
+ return n === 1 ? `#${i.toString(16).padStart(2, "0")}${a.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}` : `rgba(${i}, ${a}, ${o}, ${n.toFixed(2)})`;
1249
1129
  }
1250
- function ve(e) {
1251
- return e !== void 0 ? e : 1;
1130
+ function we(t) {
1131
+ return t !== void 0 ? t : 1;
1252
1132
  }
1253
- const qo = 559082264;
1254
- function _t(e) {
1255
- return !e || e <= 0 ? null : Math.round(Math.log2(qo / e) * 100) / 100;
1133
+ const Oo = 559082264;
1134
+ function xt(t) {
1135
+ return !t || t <= 0 ? null : Math.round(Math.log2(Oo / t) * 100) / 100;
1256
1136
  }
1257
- function Go(e, i) {
1258
- const t = {};
1259
- if (e && e > 0) {
1260
- const n = _t(e);
1261
- n !== null && (t.minZoom = n);
1137
+ function zo(t, i) {
1138
+ const a = {};
1139
+ if (t && t > 0) {
1140
+ const o = xt(t);
1141
+ o !== null && (a.minZoom = o);
1262
1142
  }
1263
1143
  if (i && i > 0) {
1264
- const n = _t(i);
1265
- n !== null && (t.maxZoom = n);
1144
+ const o = xt(i);
1145
+ o !== null && (a.maxZoom = o);
1266
1146
  }
1267
- return t;
1147
+ return a;
1268
1148
  }
1269
- function et(e) {
1270
- if (!e) return "fill";
1271
- switch (e.type) {
1149
+ function et(t) {
1150
+ if (!t) return "fill";
1151
+ switch (t.type) {
1272
1152
  case "esriSFS":
1273
1153
  return "fill";
1274
1154
  case "esriSLS":
@@ -1283,539 +1163,539 @@ function et(e) {
1283
1163
  return "fill";
1284
1164
  }
1285
1165
  }
1286
- function Se(e) {
1287
- return !(!e || e.style === "esriSLSNull" || e.color === null || e.width === 0 || e.color && e.color[3] === 0);
1166
+ function xe(t) {
1167
+ return !(!t || t.style === "esriSLSNull" || t.color === null || t.width === 0 || t.color && t.color[3] === 0);
1288
1168
  }
1289
- function dt(e) {
1290
- return String(e);
1169
+ function ut(t) {
1170
+ return String(t);
1291
1171
  }
1292
- function Ot(e, i, t) {
1293
- const n = e.symbol, a = et(n);
1294
- let l = {}, c = [], w = null;
1295
- if (a === "fill" && n) {
1296
- const y = n.color === null ? 0 : n.color?.[3] ?? 255, P = y === 0 ? "rgba(0, 0, 0, 0)" : B(n.color), b = y === 0 ? 0 : y < 255 ? 1 : ve(i);
1297
- if (l = {
1298
- "fill-color": P,
1299
- "fill-opacity": b
1300
- }, Se(n.outline)) {
1301
- const C = n.outline.width || 1;
1302
- w = {
1303
- "line-color": B(n.outline.color),
1304
- "line-width": C
1172
+ function Tt(t, i, a) {
1173
+ const o = t.symbol, l = et(o);
1174
+ let n = {}, y = [], $ = null;
1175
+ if (l === "fill" && o) {
1176
+ const m = o.color === null ? 0 : o.color?.[3] ?? 255, M = m === 0 ? "rgba(0, 0, 0, 0)" : D(o.color), L = m === 0 ? 0 : m < 255 ? 1 : we(i);
1177
+ if (n = {
1178
+ "fill-color": M,
1179
+ "fill-opacity": L
1180
+ }, xe(o.outline)) {
1181
+ const S = o.outline.width || 1;
1182
+ $ = {
1183
+ "line-color": D(o.outline.color),
1184
+ "line-width": S
1305
1185
  };
1306
1186
  }
1307
- c = [
1187
+ y = [
1308
1188
  {
1309
1189
  type: "fill",
1310
- color: B(n.color),
1311
- label: e.label || "Feature"
1190
+ color: D(o.color),
1191
+ label: t.label || "Feature"
1312
1192
  }
1313
1193
  ];
1314
- } else if (a === "line" && n)
1315
- l = {
1316
- "line-color": B(n.color),
1317
- "line-width": n.width || 1,
1318
- "line-opacity": ve(i)
1319
- }, c = [
1194
+ } else if (l === "line" && o)
1195
+ n = {
1196
+ "line-color": D(o.color),
1197
+ "line-width": o.width || 1,
1198
+ "line-opacity": we(i)
1199
+ }, y = [
1320
1200
  {
1321
1201
  type: "line",
1322
- color: B(n.color),
1323
- width: n.width || 1,
1324
- label: e.label || "Feature"
1202
+ color: D(o.color),
1203
+ width: o.width || 1,
1204
+ label: t.label || "Feature"
1325
1205
  }
1326
1206
  ];
1327
- else if (a === "circle" && n) {
1328
- const y = Math.round((n.size || 6) * 0.71 * 100) / 100;
1329
- l = {
1330
- "circle-color": B(n.color),
1331
- "circle-radius": y,
1332
- "circle-opacity": ve(i)
1333
- }, Se(n.outline) && (l["circle-stroke-color"] = B(n.outline.color), l["circle-stroke-width"] = n.outline.width || 1), c = [
1207
+ else if (l === "circle" && o) {
1208
+ const m = Math.round((o.size || 6) * 0.71 * 100) / 100;
1209
+ n = {
1210
+ "circle-color": D(o.color),
1211
+ "circle-radius": m,
1212
+ "circle-opacity": we(i)
1213
+ }, xe(o.outline) && (n["circle-stroke-color"] = D(o.outline.color), n["circle-stroke-width"] = o.outline.width || 1), y = [
1334
1214
  {
1335
1215
  type: "circle",
1336
- color: B(n.color),
1337
- label: e.label || "Feature"
1216
+ color: D(o.color),
1217
+ label: t.label || "Feature"
1338
1218
  }
1339
1219
  ];
1340
1220
  }
1341
- return { paint: l, legend: c, geomType: a, outlinePaint: w };
1221
+ return { paint: n, legend: y, geomType: l, outlinePaint: $ };
1342
1222
  }
1343
- function Ho(e, i, t) {
1344
- const n = e.field1.toLowerCase(), a = e.uniqueValueInfos || [], l = e.defaultSymbol;
1345
- if (a.length === 0)
1346
- return Ot({ ...e, symbol: l }, i);
1347
- const c = a[0]?.symbol || l, w = et(c);
1348
- let y = {};
1349
- const P = [];
1350
- let b = null;
1351
- if (w === "fill") {
1352
- const C = ["match", ["to-string", ["get", n]]];
1353
- for (const s of a) {
1354
- C.push(dt(s.value)), C.push(B(s.symbol?.color));
1355
- const k = String(s.value), h = t?.get(k) || s.label || k;
1356
- P.push({
1223
+ function Io(t, i, a) {
1224
+ const o = t.field1.toLowerCase(), l = t.uniqueValueInfos || [], n = t.defaultSymbol;
1225
+ if (l.length === 0)
1226
+ return Tt({ ...t, symbol: n }, i);
1227
+ const y = l[0]?.symbol || n, $ = et(y);
1228
+ let m = {};
1229
+ const M = [];
1230
+ let L = null;
1231
+ if ($ === "fill") {
1232
+ const S = ["match", ["to-string", ["get", o]]];
1233
+ for (const s of l) {
1234
+ S.push(ut(s.value)), S.push(D(s.symbol?.color));
1235
+ const C = String(s.value), g = a?.get(C) || s.label || C;
1236
+ M.push({
1357
1237
  type: "fill",
1358
- color: B(s.symbol?.color),
1359
- label: h
1238
+ color: D(s.symbol?.color),
1239
+ label: g
1360
1240
  });
1361
1241
  }
1362
- if (C.push(l ? B(l.color) : "rgba(0, 0, 0, 0)"), y = {
1363
- "fill-color": C,
1364
- "fill-opacity": ve(i)
1365
- }, Se(c?.outline)) {
1366
- const s = Math.max(c.outline.width || 1, 1);
1367
- b = {
1368
- "line-color": B(c.outline.color),
1242
+ if (S.push(n ? D(n.color) : "rgba(0, 0, 0, 0)"), m = {
1243
+ "fill-color": S,
1244
+ "fill-opacity": we(i)
1245
+ }, xe(y?.outline)) {
1246
+ const s = Math.max(y.outline.width || 1, 1);
1247
+ L = {
1248
+ "line-color": D(y.outline.color),
1369
1249
  "line-width": s
1370
1250
  };
1371
1251
  }
1372
- } else if (w === "line") {
1373
- const C = ["match", ["to-string", ["get", n]]];
1374
- for (const s of a) {
1375
- C.push(dt(s.value)), C.push(B(s.symbol?.color));
1376
- const k = String(s.value), h = t?.get(k) || s.label || k;
1377
- P.push({
1252
+ } else if ($ === "line") {
1253
+ const S = ["match", ["to-string", ["get", o]]];
1254
+ for (const s of l) {
1255
+ S.push(ut(s.value)), S.push(D(s.symbol?.color));
1256
+ const C = String(s.value), g = a?.get(C) || s.label || C;
1257
+ M.push({
1378
1258
  type: "line",
1379
- color: B(s.symbol?.color),
1259
+ color: D(s.symbol?.color),
1380
1260
  width: s.symbol?.width || 1,
1381
- label: h
1261
+ label: g
1382
1262
  });
1383
1263
  }
1384
- C.push(l ? B(l.color) : "rgba(0, 0, 0, 0)"), y = {
1385
- "line-color": C,
1386
- "line-width": c?.width || 2,
1387
- "line-opacity": ve(i)
1264
+ S.push(n ? D(n.color) : "rgba(0, 0, 0, 0)"), m = {
1265
+ "line-color": S,
1266
+ "line-width": y?.width || 2,
1267
+ "line-opacity": we(i)
1388
1268
  };
1389
- } else if (w === "circle") {
1390
- const C = ["match", ["to-string", ["get", n]]];
1391
- for (const k of a) {
1392
- C.push(dt(k.value)), C.push(B(k.symbol?.color));
1393
- const g = String(k.value), u = t?.get(g) || k.label || g;
1394
- P.push({
1269
+ } else if ($ === "circle") {
1270
+ const S = ["match", ["to-string", ["get", o]]];
1271
+ for (const C of l) {
1272
+ S.push(ut(C.value)), S.push(D(C.symbol?.color));
1273
+ const p = String(C.value), c = a?.get(p) || C.label || p;
1274
+ M.push({
1395
1275
  type: "circle",
1396
- color: B(k.symbol?.color),
1397
- label: u
1276
+ color: D(C.symbol?.color),
1277
+ label: c
1398
1278
  });
1399
1279
  }
1400
- C.push(l ? B(l.color) : "rgba(0, 0, 0, 0)");
1401
- const s = Math.round((c?.size || 6) * 0.71 * 100) / 100;
1402
- y = {
1403
- "circle-color": C,
1280
+ S.push(n ? D(n.color) : "rgba(0, 0, 0, 0)");
1281
+ const s = Math.round((y?.size || 6) * 0.71 * 100) / 100;
1282
+ m = {
1283
+ "circle-color": S,
1404
1284
  "circle-radius": s,
1405
- "circle-opacity": ve(i)
1406
- }, Se(c?.outline) && (y["circle-stroke-color"] = B(c.outline.color), y["circle-stroke-width"] = c.outline.width || 1);
1285
+ "circle-opacity": we(i)
1286
+ }, xe(y?.outline) && (m["circle-stroke-color"] = D(y.outline.color), m["circle-stroke-width"] = y.outline.width || 1);
1407
1287
  }
1408
- return { paint: y, legend: P, geomType: w, outlinePaint: b };
1288
+ return { paint: m, legend: M, geomType: $, outlinePaint: L };
1409
1289
  }
1410
- function Jo(e, i) {
1411
- const t = e.field.toLowerCase(), n = e.classBreakInfos || [], a = e.visualVariables?.find((b) => b.type === "colorInfo");
1412
- if (a?.stops && a.stops.length > 0)
1413
- return Ko(a, t, e, i);
1414
- if (n.length === 0)
1290
+ function Ro(t, i) {
1291
+ const a = t.field.toLowerCase(), o = t.classBreakInfos || [], l = t.visualVariables?.find((L) => L.type === "colorInfo");
1292
+ if (l?.stops && l.stops.length > 0)
1293
+ return Do(l, a, t, i);
1294
+ if (o.length === 0)
1415
1295
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1416
- const l = n[0]?.symbol, c = et(l);
1417
- let w = {};
1418
- const y = [];
1419
- let P = null;
1420
- if (c === "fill") {
1421
- const b = ["step", ["get", t]];
1422
- b.push(B(n[0]?.symbol?.color));
1423
- for (let C = 0; C < n.length; C++) {
1424
- const s = n[C];
1425
- C > 0 && (b.push(n[C - 1].classMaxValue), b.push(B(s.symbol?.color))), y.push({
1296
+ const n = o[0]?.symbol, y = et(n);
1297
+ let $ = {};
1298
+ const m = [];
1299
+ let M = null;
1300
+ if (y === "fill") {
1301
+ const L = ["step", ["get", a]];
1302
+ L.push(D(o[0]?.symbol?.color));
1303
+ for (let S = 0; S < o.length; S++) {
1304
+ const s = o[S];
1305
+ S > 0 && (L.push(o[S - 1].classMaxValue), L.push(D(s.symbol?.color))), m.push({
1426
1306
  type: "fill",
1427
- color: B(s.symbol?.color),
1307
+ color: D(s.symbol?.color),
1428
1308
  label: s.label || `${s.classMaxValue}`
1429
1309
  });
1430
1310
  }
1431
- if (w = {
1432
- "fill-color": b,
1433
- "fill-opacity": ve(i)
1434
- }, Se(l?.outline)) {
1435
- const C = l.outline.width || 1;
1436
- P = {
1437
- "line-color": B(l.outline.color),
1438
- "line-width": C
1311
+ if ($ = {
1312
+ "fill-color": L,
1313
+ "fill-opacity": we(i)
1314
+ }, xe(n?.outline)) {
1315
+ const S = n.outline.width || 1;
1316
+ M = {
1317
+ "line-color": D(n.outline.color),
1318
+ "line-width": S
1439
1319
  };
1440
1320
  }
1441
- } else if (c === "line") {
1442
- const b = ["step", ["get", t]];
1443
- b.push(B(n[0]?.symbol?.color));
1444
- let C = e.minValue ?? 0;
1445
- for (let k = 0; k < n.length; k++) {
1446
- const g = n[k];
1447
- k > 0 && (b.push(n[k - 1].classMaxValue), b.push(B(g.symbol?.color))), y.push({
1321
+ } else if (y === "line") {
1322
+ const L = ["step", ["get", a]];
1323
+ L.push(D(o[0]?.symbol?.color));
1324
+ let S = t.minValue ?? 0;
1325
+ for (let C = 0; C < o.length; C++) {
1326
+ const p = o[C];
1327
+ C > 0 && (L.push(o[C - 1].classMaxValue), L.push(D(p.symbol?.color))), m.push({
1448
1328
  type: "line",
1449
- color: B(g.symbol?.color),
1450
- width: g.symbol?.width || l?.width || 2,
1451
- label: g.label || `${C} - ${g.classMaxValue}`
1452
- }), C = g.classMaxValue + 1;
1453
- }
1454
- const s = l?.width || 2;
1455
- w = {
1456
- "line-color": b,
1329
+ color: D(p.symbol?.color),
1330
+ width: p.symbol?.width || n?.width || 2,
1331
+ label: p.label || `${S} - ${p.classMaxValue}`
1332
+ }), S = p.classMaxValue + 1;
1333
+ }
1334
+ const s = n?.width || 2;
1335
+ $ = {
1336
+ "line-color": L,
1457
1337
  "line-width": s,
1458
- "line-opacity": ve(i)
1338
+ "line-opacity": we(i)
1459
1339
  };
1460
1340
  }
1461
- return { paint: w, legend: y, geomType: c, outlinePaint: P };
1341
+ return { paint: $, legend: m, geomType: y, outlinePaint: M };
1462
1342
  }
1463
- function Ko(e, i, t, n) {
1464
- const a = e.stops || [];
1465
- if (a.length === 0)
1343
+ function Do(t, i, a, o) {
1344
+ const l = t.stops || [];
1345
+ if (l.length === 0)
1466
1346
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1467
- const l = t.classBreakInfos?.[0]?.symbol || t.defaultSymbol, c = et(l);
1468
- let w = {};
1469
- const y = [];
1470
- let P = null;
1471
- if (c === "fill") {
1472
- const b = ["interpolate", ["linear"], ["get", i]];
1473
- for (const s of a)
1474
- b.push(s.value), b.push(B(s.color)), y.push({
1347
+ const n = a.classBreakInfos?.[0]?.symbol || a.defaultSymbol, y = et(n);
1348
+ let $ = {};
1349
+ const m = [];
1350
+ let M = null;
1351
+ if (y === "fill") {
1352
+ const L = ["interpolate", ["linear"], ["get", i]];
1353
+ for (const s of l)
1354
+ L.push(s.value), L.push(D(s.color)), m.push({
1475
1355
  type: "fill",
1476
- color: B(s.color),
1356
+ color: D(s.color),
1477
1357
  label: s.label || `${s.value}`
1478
1358
  });
1479
- if (w = {
1359
+ if ($ = {
1480
1360
  "fill-color": [
1481
1361
  "case",
1482
1362
  ["==", ["get", i], null],
1483
1363
  "rgba(0, 0, 0, 0)",
1484
1364
  // Transparent for null/no-data values
1485
- b
1365
+ L
1486
1366
  // Otherwise use the interpolated color
1487
1367
  ],
1488
- "fill-opacity": ve(n)
1489
- }, Se(l?.outline)) {
1490
- const s = l.outline.width || 1;
1491
- P = {
1492
- "line-color": B(l.outline.color),
1368
+ "fill-opacity": we(o)
1369
+ }, xe(n?.outline)) {
1370
+ const s = n.outline.width || 1;
1371
+ M = {
1372
+ "line-color": D(n.outline.color),
1493
1373
  "line-width": s
1494
1374
  };
1495
1375
  }
1496
1376
  }
1497
- return { paint: w, legend: y, geomType: c, outlinePaint: P };
1377
+ return { paint: $, legend: m, geomType: y, outlinePaint: M };
1498
1378
  }
1499
- function Qo(e, i, t, n) {
1500
- if (!e?.renderer)
1379
+ function Zo(t, i, a, o) {
1380
+ if (!t?.renderer)
1501
1381
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1502
- const a = e.renderer;
1503
- switch (a.type) {
1382
+ const l = t.renderer;
1383
+ switch (l.type) {
1504
1384
  case "simple":
1505
- return Ot(a, i);
1385
+ return Tt(l, i);
1506
1386
  case "uniqueValue":
1507
- return Ho(a, i, t);
1387
+ return Io(l, i, a);
1508
1388
  case "classBreaks":
1509
- return Jo(a, i);
1389
+ return Ro(l, i);
1510
1390
  default:
1511
1391
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1512
1392
  }
1513
1393
  }
1514
- function Xo(e) {
1515
- if (!e) return null;
1516
- const i = (e.title || "").replace(/\{([^}]+)\}/g, (l, c) => `{${c.toLowerCase()}}`), n = (e.fieldInfos || []).filter((l) => l.visible === !0).map((l) => {
1517
- const c = {
1518
- field: l.fieldName.toLowerCase(),
1519
- label: l.label || l.fieldName
1394
+ function Bo(t) {
1395
+ if (!t) return null;
1396
+ const i = (t.title || "").replace(/\{([^}]+)\}/g, (n, y) => `{${y.toLowerCase()}}`), o = (t.fieldInfos || []).filter((n) => n.visible === !0).map((n) => {
1397
+ const y = {
1398
+ field: n.fieldName.toLowerCase(),
1399
+ label: n.label || n.fieldName
1520
1400
  };
1521
- return l.format && (c.format = {}, l.format.dateFormat && (c.format.dateFormat = l.format.dateFormat), l.format.digitSeparator !== void 0 && (c.format.digitSeparator = l.format.digitSeparator), l.format.places !== void 0 && (c.format.places = l.format.places), Object.keys(c.format).length === 0 && delete c.format), c;
1522
- }), a = {
1401
+ return n.format && (y.format = {}, n.format.dateFormat && (y.format.dateFormat = n.format.dateFormat), n.format.digitSeparator !== void 0 && (y.format.digitSeparator = n.format.digitSeparator), n.format.places !== void 0 && (y.format.places = n.format.places), Object.keys(y.format).length === 0 && delete y.format), y;
1402
+ }), l = {
1523
1403
  title: i,
1524
- fields: n
1404
+ fields: o
1525
1405
  };
1526
- return e.showTime && (a.showTime = !0), a;
1406
+ return t.showTime && (l.showTime = !0), l;
1527
1407
  }
1528
- function Yo(e) {
1529
- return e?.definitionExpression;
1408
+ function Ao(t) {
1409
+ return t?.definitionExpression;
1530
1410
  }
1531
- function en(e) {
1532
- return (e.includes("_") ? e.split("_").slice(1).join(" ") : e).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
1411
+ function No(t) {
1412
+ return (t.includes("_") ? t.split("_").slice(1).join(" ") : t).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
1533
1413
  }
1534
- function tn(e) {
1535
- return e.includes("_") ? e.split("_").slice(1).join(" ") : e;
1414
+ function Vo(t) {
1415
+ return t.includes("_") ? t.split("_").slice(1).join(" ") : t;
1536
1416
  }
1537
- function on(e) {
1417
+ function Uo(t) {
1538
1418
  const i = /* @__PURE__ */ new Map();
1539
- if (!e)
1419
+ if (!t)
1540
1420
  return i;
1541
- const t = e.split(`
1542
- `), n = /^(\d{1,3})\s+(.+)$/;
1543
- for (const a of t) {
1544
- const l = a.trim().match(n);
1545
- if (l) {
1546
- const [, c, w] = l;
1547
- c && w && i.set(c, w.trim());
1421
+ const a = t.split(`
1422
+ `), o = /^(\d{1,3})\s+(.+)$/;
1423
+ for (const l of a) {
1424
+ const n = l.trim().match(o);
1425
+ if (n) {
1426
+ const [, y, $] = n;
1427
+ y && $ && i.set(y, $.trim());
1548
1428
  }
1549
1429
  }
1550
1430
  return i;
1551
1431
  }
1552
- async function nn(e) {
1432
+ async function Wo(t) {
1553
1433
  try {
1554
- const i = await fetch(`${e}?f=json`);
1434
+ const i = await fetch(`${t}?f=json`);
1555
1435
  if (!i.ok)
1556
1436
  return null;
1557
- const t = await i.json();
1558
- return t.drawingInfo ? {
1559
- drawingInfo: t.drawingInfo,
1560
- description: t.description
1437
+ const a = await i.json();
1438
+ return a.drawingInfo ? {
1439
+ drawingInfo: a.drawingInfo,
1440
+ description: a.description
1561
1441
  } : null;
1562
1442
  } catch {
1563
1443
  return null;
1564
1444
  }
1565
1445
  }
1566
- async function zt(e) {
1567
- const i = e.operationalLayers || [], t = [], n = ["Zoning and Planning_Land Use"];
1568
- for (const a of i)
1569
- if (a.url && !a.title?.toLowerCase().includes("(under construction)"))
1446
+ async function Ft(t) {
1447
+ const i = t.operationalLayers || [], a = [], o = ["Zoning and Planning_Land Use"];
1448
+ for (const l of i)
1449
+ if (l.url && !l.title?.toLowerCase().includes("(under construction)"))
1570
1450
  try {
1571
- let l = a.layerDefinition?.drawingInfo, c;
1572
- const w = !l || !l.renderer, y = n.includes(a.title), P = l?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || l?.renderer?.defaultSymbol?.outline;
1573
- if ((w || y) && a.url) {
1574
- const R = await nn(a.url);
1451
+ let n = l.layerDefinition?.drawingInfo, y;
1452
+ const $ = !n || !n.renderer, m = o.includes(l.title), M = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
1453
+ if (($ || m) && l.url) {
1454
+ const R = await Wo(l.url);
1575
1455
  if (R) {
1576
- if (l = R.drawingInfo, P && Se(P) && l?.renderer) {
1577
- const A = l.renderer, de = A.uniqueValueInfos?.[0]?.symbol?.outline || A.defaultSymbol?.outline;
1578
- if (!Se(de)) {
1579
- for (const fe of A.uniqueValueInfos || [])
1580
- fe.symbol && (fe.symbol.outline = P);
1581
- A.defaultSymbol && (A.defaultSymbol.outline = P);
1456
+ if (n = R.drawingInfo, M && xe(M) && n?.renderer) {
1457
+ const Z = n.renderer, pe = Z.uniqueValueInfos?.[0]?.symbol?.outline || Z.defaultSymbol?.outline;
1458
+ if (!xe(pe)) {
1459
+ for (const ye of Z.uniqueValueInfos || [])
1460
+ ye.symbol && (ye.symbol.outline = M);
1461
+ Z.defaultSymbol && (Z.defaultSymbol.outline = M);
1582
1462
  }
1583
1463
  }
1584
- R.description && (c = on(R.description), c.size > 0);
1464
+ R.description && (y = Uo(R.description), y.size > 0);
1585
1465
  }
1586
1466
  }
1587
- const { paint: b, legend: C, geomType: s, outlinePaint: k } = Qo(
1588
- l,
1589
- a.opacity,
1590
- c,
1591
- a.title
1592
- ), g = Xo(a.popupInfo), h = Yo(a.layerDefinition), u = Go(a.layerDefinition?.minScale, a.layerDefinition?.maxScale), f = en(a.title), L = tn(a.title), z = a.opacity ?? 1, F = {
1593
- id: f,
1594
- title: L,
1467
+ const { paint: L, legend: S, geomType: s, outlinePaint: C } = Zo(
1468
+ n,
1469
+ l.opacity,
1470
+ y,
1471
+ l.title
1472
+ ), p = Bo(l.popupInfo), g = Ao(l.layerDefinition), c = zo(l.layerDefinition?.minScale, l.layerDefinition?.maxScale), u = No(l.title), b = Vo(l.title), I = l.opacity ?? 1, F = {
1473
+ id: u,
1474
+ title: b,
1595
1475
  type: s,
1596
- url: a.url,
1597
- opacity: z,
1598
- paint: b,
1599
- legend: C,
1600
- popup: g
1476
+ url: l.url,
1477
+ opacity: I,
1478
+ paint: L,
1479
+ legend: S,
1480
+ popup: p
1601
1481
  };
1602
- h && (F.where = h), u.minZoom !== void 0 && (F.minZoom = u.minZoom), u.maxZoom !== void 0 && (F.maxZoom = u.maxZoom), k && (F.outlinePaint = k), t.push(F);
1482
+ g && (F.where = g), c.minZoom !== void 0 && (F.minZoom = c.minZoom), c.maxZoom !== void 0 && (F.maxZoom = c.maxZoom), C && (F.outlinePaint = C), a.push(F);
1603
1483
  } catch {
1604
1484
  }
1605
- return t.sort((a, l) => a.title.localeCompare(l.title)), t;
1485
+ return a.sort((l, n) => l.title.localeCompare(n.title)), a;
1606
1486
  }
1607
- const Et = {}, ht = "376af635c84643cd816a8c5d017a53aa", li = ht;
1608
- function mt(e, i) {
1609
- let t = `https://www.arcgis.com/sharing/rest/content/items/${e}/data?f=json`;
1610
- return i && (t += `&token=${i}`), t;
1487
+ const $t = {}, yt = "376af635c84643cd816a8c5d017a53aa", qa = yt;
1488
+ function gt(t, i) {
1489
+ let a = `https://www.arcgis.com/sharing/rest/content/items/${t}/data?f=json`;
1490
+ return i && (a += `&token=${i}`), a;
1611
1491
  }
1612
- function ri() {
1613
- return mt(ht);
1492
+ function Ga() {
1493
+ return gt(yt);
1614
1494
  }
1615
- const Xe = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Map();
1616
- function an(e) {
1617
- e ? (Xe.delete(e), We.delete(e)) : (Xe.clear(), We.clear());
1495
+ const Ye = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Map();
1496
+ function jo(t) {
1497
+ t ? (Ye.delete(t), We.delete(t)) : (Ye.clear(), We.clear());
1618
1498
  }
1619
- let Ke, Mt = 0;
1620
- async function ln() {
1621
- const e = typeof import.meta < "u" && Et?.VITE_AGO_USERNAME, i = typeof import.meta < "u" && Et?.VITE_AGO_PASSWORD;
1622
- if (!(!e || !i)) {
1623
- if (Ke && Date.now() < Mt - 3e5)
1624
- return Ke;
1499
+ let Qe, _t = 0;
1500
+ async function qo() {
1501
+ const t = typeof import.meta < "u" && $t?.VITE_AGO_USERNAME, i = typeof import.meta < "u" && $t?.VITE_AGO_PASSWORD;
1502
+ if (!(!t || !i)) {
1503
+ if (Qe && Date.now() < _t - 3e5)
1504
+ return Qe;
1625
1505
  try {
1626
- const n = await (await fetch("https://www.arcgis.com/sharing/rest/generateToken", {
1506
+ const o = await (await fetch("https://www.arcgis.com/sharing/rest/generateToken", {
1627
1507
  method: "POST",
1628
1508
  headers: {
1629
1509
  "Content-Type": "application/x-www-form-urlencoded"
1630
1510
  },
1631
1511
  body: new URLSearchParams({
1632
1512
  f: "json",
1633
- username: e,
1513
+ username: t,
1634
1514
  password: i,
1635
1515
  referer: window.location.origin || "https://localhost",
1636
1516
  expiration: "120"
1637
1517
  // 2 hours
1638
1518
  })
1639
1519
  })).json();
1640
- return n.error ? void 0 : (Ke = n.token, Mt = n.expires, Ke);
1520
+ return o.error ? void 0 : (Qe = o.token, _t = o.expires, Qe);
1641
1521
  } catch {
1642
1522
  return;
1643
1523
  }
1644
1524
  }
1645
1525
  }
1646
- async function rn(e, i) {
1647
- const t = mt(e, i), n = await fetch(t, { cache: "no-store" });
1648
- if (!n.ok)
1649
- throw new Error(`Failed to fetch WebMap: ${n.status} ${n.statusText}`);
1650
- const a = await n.json();
1651
- if (a.error)
1652
- throw new Error(`ArcGIS error: ${a.error.message || a.error.code || "Unknown error"}`);
1653
- return a;
1526
+ async function Go(t, i) {
1527
+ const a = gt(t, i), o = await fetch(a, { cache: "no-store" });
1528
+ if (!o.ok)
1529
+ throw new Error(`Failed to fetch WebMap: ${o.status} ${o.statusText}`);
1530
+ const l = await o.json();
1531
+ if (l.error)
1532
+ throw new Error(`ArcGIS error: ${l.error.message || l.error.code || "Unknown error"}`);
1533
+ return l;
1654
1534
  }
1655
- async function sn(e) {
1535
+ async function Ho(t) {
1656
1536
  try {
1657
- const i = await ln(), t = await rn(e, i);
1658
- return await zt(t);
1537
+ const i = await qo(), a = await Go(t, i);
1538
+ return await Ft(a);
1659
1539
  } catch (i) {
1660
1540
  throw new Error(
1661
1541
  `Failed to load dynamic layer configs: ${i instanceof Error ? i.message : "Unknown error"}`
1662
1542
  );
1663
1543
  }
1664
1544
  }
1665
- async function gt(e = ht) {
1666
- const i = Xe.get(e);
1545
+ async function pt(t = yt) {
1546
+ const i = Ye.get(t);
1667
1547
  if (i)
1668
1548
  return i;
1669
- const t = We.get(e);
1670
- if (t)
1671
- return t;
1672
- const n = (async () => {
1549
+ const a = We.get(t);
1550
+ if (a)
1551
+ return a;
1552
+ const o = (async () => {
1673
1553
  try {
1674
- const a = await sn(e);
1675
- return Xe.set(e, a), a;
1554
+ const l = await Ho(t);
1555
+ return Ye.set(t, l), l;
1676
1556
  } finally {
1677
- We.delete(e);
1557
+ We.delete(t);
1678
1558
  }
1679
1559
  })();
1680
- return We.set(e, n), n;
1560
+ return We.set(t, o), o;
1681
1561
  }
1682
- function cn(e) {
1683
- const i = $({}), t = /* @__PURE__ */ new Map();
1684
- for (const s of e)
1562
+ function Jo(t) {
1563
+ const i = k({}), a = /* @__PURE__ */ new Map();
1564
+ for (const s of t)
1685
1565
  i.value[s.id] = {
1686
1566
  data: null,
1687
1567
  loading: !1,
1688
1568
  error: null,
1689
1569
  lastFetched: null
1690
1570
  };
1691
- async function n(s) {
1692
- const k = s.id;
1571
+ async function o(s) {
1572
+ const C = s.id;
1693
1573
  i.value = {
1694
1574
  ...i.value,
1695
- [k]: {
1696
- data: i.value[k]?.data ?? null,
1697
- lastFetched: i.value[k]?.lastFetched ?? null,
1575
+ [C]: {
1576
+ data: i.value[C]?.data ?? null,
1577
+ lastFetched: i.value[C]?.lastFetched ?? null,
1698
1578
  loading: !0,
1699
1579
  error: null
1700
1580
  }
1701
1581
  };
1702
1582
  try {
1703
- let g;
1583
+ let p;
1704
1584
  if (s.type === "http-get") {
1705
- const h = await fetch(s.url, {
1585
+ const g = await fetch(s.url, {
1706
1586
  method: "GET",
1707
1587
  ...s.options
1708
1588
  });
1709
- if (!h.ok)
1710
- throw new Error(`HTTP ${h.status}: ${h.statusText}`);
1711
- g = await h.json();
1589
+ if (!g.ok)
1590
+ throw new Error(`HTTP ${g.status}: ${g.statusText}`);
1591
+ p = await g.json();
1712
1592
  } else if (s.type === "http-post") {
1713
- const h = await fetch(s.url, {
1593
+ const g = await fetch(s.url, {
1714
1594
  method: "POST",
1715
1595
  ...s.options
1716
1596
  });
1717
- if (!h.ok)
1718
- throw new Error(`HTTP ${h.status}: ${h.statusText}`);
1719
- g = await h.json();
1597
+ if (!g.ok)
1598
+ throw new Error(`HTTP ${g.status}: ${g.statusText}`);
1599
+ p = await g.json();
1720
1600
  } else if (s.type === "esri") {
1721
- const u = `${s.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, f = await fetch(u, s.options);
1722
- if (!f.ok)
1723
- throw new Error(`HTTP ${f.status}: ${f.statusText}`);
1724
- g = (await f.json()).features?.map((z) => z.attributes) || [];
1601
+ const c = `${s.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, u = await fetch(c, s.options);
1602
+ if (!u.ok)
1603
+ throw new Error(`HTTP ${u.status}: ${u.statusText}`);
1604
+ p = (await u.json()).features?.map((I) => I.attributes) || [];
1725
1605
  } else
1726
1606
  throw new Error(`Unknown data source type: ${s.type}`);
1727
- s.transform && (g = s.transform(g)), i.value = {
1607
+ s.transform && (p = s.transform(p)), i.value = {
1728
1608
  ...i.value,
1729
- [k]: {
1730
- data: g,
1609
+ [C]: {
1610
+ data: p,
1731
1611
  loading: !1,
1732
1612
  error: null,
1733
1613
  lastFetched: Date.now()
1734
1614
  }
1735
1615
  };
1736
- } catch (g) {
1737
- const h = g instanceof Error ? g.message : "Unknown error";
1616
+ } catch (p) {
1617
+ const g = p instanceof Error ? p.message : "Unknown error";
1738
1618
  i.value = {
1739
1619
  ...i.value,
1740
- [k]: {
1741
- data: i.value[k]?.data ?? null,
1742
- lastFetched: i.value[k]?.lastFetched ?? null,
1620
+ [C]: {
1621
+ data: i.value[C]?.data ?? null,
1622
+ lastFetched: i.value[C]?.lastFetched ?? null,
1743
1623
  loading: !1,
1744
- error: h
1624
+ error: g
1745
1625
  }
1746
1626
  };
1747
1627
  }
1748
1628
  }
1749
- async function a() {
1750
- await Promise.all(e.map((s) => n(s)));
1629
+ async function l() {
1630
+ await Promise.all(t.map((s) => o(s)));
1751
1631
  }
1752
- async function l(s) {
1753
- const k = e.find((g) => g.id === s);
1754
- k && await n(k);
1632
+ async function n(s) {
1633
+ const C = t.find((p) => p.id === s);
1634
+ C && await o(C);
1755
1635
  }
1756
- function c(s) {
1636
+ function y(s) {
1757
1637
  return i.value[s]?.data ?? null;
1758
1638
  }
1759
- const w = I(() => Object.values(i.value).some((s) => s.loading));
1760
- function y(s) {
1639
+ const $ = z(() => Object.values(i.value).some((s) => s.loading));
1640
+ function m(s) {
1761
1641
  return i.value[s]?.loading ?? !1;
1762
1642
  }
1763
- function P(s) {
1643
+ function M(s) {
1764
1644
  return i.value[s]?.error ?? null;
1765
1645
  }
1766
- function b() {
1767
- for (const s of e)
1646
+ function L() {
1647
+ for (const s of t)
1768
1648
  if (s.pollInterval && s.pollInterval > 0) {
1769
- const k = window.setInterval(() => {
1770
- n(s);
1649
+ const C = window.setInterval(() => {
1650
+ o(s);
1771
1651
  }, s.pollInterval);
1772
- t.set(s.id, k);
1652
+ a.set(s.id, C);
1773
1653
  }
1774
1654
  }
1775
- function C() {
1776
- for (const [, s] of t)
1655
+ function S() {
1656
+ for (const [, s] of a)
1777
1657
  window.clearInterval(s);
1778
- t.clear();
1658
+ a.clear();
1779
1659
  }
1780
- return Qe(() => {
1781
- a(), b();
1782
- }), Ft(() => {
1783
- C();
1660
+ return Xe(() => {
1661
+ l(), L();
1662
+ }), Pt(() => {
1663
+ S();
1784
1664
  }), {
1785
1665
  /** Reactive state for all data sources */
1786
- state: G(i),
1666
+ state: j(i),
1787
1667
  /** Whether any data source is currently loading */
1788
- isLoading: w,
1668
+ isLoading: $,
1789
1669
  /** Fetch all data sources */
1790
- fetchAll: a,
1670
+ fetchAll: l,
1791
1671
  /** Refetch a specific data source by id */
1792
- refetch: l,
1672
+ refetch: n,
1793
1673
  /** Get data for a specific source */
1794
- getData: c,
1674
+ getData: y,
1795
1675
  /** Check if a specific source is loading */
1796
- isSourceLoading: y,
1676
+ isSourceLoading: m,
1797
1677
  /** Get error for a specific source */
1798
- getError: P,
1678
+ getError: M,
1799
1679
  /** Stop all polling (useful for cleanup) */
1800
- stopPolling: C
1680
+ stopPolling: S
1801
1681
  };
1802
1682
  }
1803
- const un = { class: "layerboard-layout" }, dn = ["aria-expanded"], fn = {
1683
+ const Ko = { class: "layerboard-layout" }, Qo = ["aria-expanded"], Xo = {
1804
1684
  key: 0,
1805
1685
  class: "layerboard-subtitle"
1806
- }, pn = { class: "layerboard-mobile-menu-content" }, yn = { class: "layerboard-main" }, gn = {
1686
+ }, Yo = { class: "layerboard-mobile-menu-content" }, ea = { class: "layerboard-main" }, ta = {
1807
1687
  key: 0,
1808
1688
  class: "layerboard-loading",
1809
1689
  role: "status",
1810
1690
  "aria-live": "polite"
1811
- }, hn = {
1691
+ }, oa = {
1812
1692
  key: 1,
1813
1693
  class: "layerboard-error",
1814
1694
  role: "alert"
1815
- }, mn = ["aria-expanded", "aria-label"], vn = { key: 0 }, bn = { key: 1 }, wn = {
1695
+ }, aa = ["aria-expanded", "aria-label"], ia = { key: 0 }, na = { key: 1 }, la = {
1816
1696
  class: "sr-only",
1817
1697
  "aria-live": "polite"
1818
- }, Ln = /* @__PURE__ */ Ce({
1698
+ }, ra = /* @__PURE__ */ $e({
1819
1699
  __name: "Layerboard",
1820
1700
  props: {
1821
1701
  title: {},
@@ -1844,498 +1724,498 @@ const un = { class: "layerboard-layout" }, dn = ["aria-expanded"], fn = {
1844
1724
  initialCenter: {}
1845
1725
  },
1846
1726
  emits: ["configs-loaded", "load-error", "zoom"],
1847
- setup(e, { expose: i, emit: t }) {
1848
- const n = e, a = t, l = $([]), c = $(!0), w = $(null), y = $(12), P = $(""), b = $(/* @__PURE__ */ new Set()), C = $({}), s = $(/* @__PURE__ */ new Set()), k = $({}), g = $({}), h = $(/* @__PURE__ */ new Set()), u = $({});
1849
- function f() {
1850
- const m = {};
1851
- for (const x of n.tiledLayers)
1852
- m[x.id] = x.opacity ?? 1;
1853
- u.value = m;
1854
- }
1855
- function L(m) {
1856
- h.value.has(m) ? h.value.delete(m) : h.value.add(m), h.value = new Set(h.value);
1857
- }
1858
- function z(m, x) {
1859
- x ? h.value.add(m) : h.value.delete(m), h.value = new Set(h.value);
1860
- }
1861
- function F(m, x) {
1862
- u.value = { ...u.value, [m]: x };
1863
- }
1864
- const R = n.dataSources.length > 0 ? cn(n.dataSources) : null, A = I(() => R?.state.value ?? {}), de = I(() => R?.isLoading.value ?? !1);
1865
- function fe(m) {
1866
- return R?.getData(m) ?? null;
1867
- }
1868
- function Pe(m) {
1869
- return R?.refetch(m) ?? Promise.resolve();
1870
- }
1871
- W("layerboard-layers", G(l)), W("layerboard-visible", b), W("layerboard-opacities", C), W("layerboard-loading", G(s)), W("layerboard-errors", G(k)), W("layerboard-zoom", G(y)), W("layerboard-toggle-layer", _e), W("layerboard-set-layer-visible", we), W("layerboard-set-layers-visible", Ee), W("layerboard-set-opacity", Le), W("layerboard-tiled-layers", G(I(() => n.tiledLayers))), W("layerboard-visible-tiled", h), W("layerboard-tiled-opacities", u), W("layerboard-toggle-tiled", L), W("layerboard-set-tiled-opacity", F), W("layerboard-set-tiled-visible", z), W("layerboard-data-sources-state", A), W("layerboard-data-sources-loading", de), W("layerboard-get-data-source", fe), W("layerboard-refetch-data-source", Pe);
1872
- const tt = I(() => ({
1873
- backgroundColor: n.themeColor
1874
- })), ot = I(() => ({
1875
- backgroundColor: n.themeColor
1876
- })), De = I(() => ({
1877
- backgroundColor: n.themeColor
1878
- })), je = I(() => ({
1879
- width: se.value ? "0" : n.sidebarWidth
1727
+ setup(t, { expose: i, emit: a }) {
1728
+ const o = t, l = a, n = k([]), y = k(!0), $ = k(null), m = k(12), M = k(""), L = k(/* @__PURE__ */ new Set()), S = k({}), s = k(/* @__PURE__ */ new Set()), C = k({}), p = k({}), g = k(/* @__PURE__ */ new Set()), c = k({});
1729
+ function u() {
1730
+ const v = {};
1731
+ for (const x of o.tiledLayers)
1732
+ v[x.id] = x.opacity ?? 1;
1733
+ c.value = v;
1734
+ }
1735
+ function b(v) {
1736
+ g.value.has(v) ? g.value.delete(v) : g.value.add(v), g.value = new Set(g.value);
1737
+ }
1738
+ function I(v, x) {
1739
+ x ? g.value.add(v) : g.value.delete(v), g.value = new Set(g.value);
1740
+ }
1741
+ function F(v, x) {
1742
+ c.value = { ...c.value, [v]: x };
1743
+ }
1744
+ const R = o.dataSources.length > 0 ? Jo(o.dataSources) : null, Z = z(() => R?.state.value ?? {}), pe = z(() => R?.isLoading.value ?? !1);
1745
+ function ye(v) {
1746
+ return R?.getData(v) ?? null;
1747
+ }
1748
+ function Ze(v) {
1749
+ return R?.refetch(v) ?? Promise.resolve();
1750
+ }
1751
+ V("layerboard-layers", j(n)), V("layerboard-visible", L), V("layerboard-opacities", S), V("layerboard-loading", j(s)), V("layerboard-errors", j(C)), V("layerboard-zoom", j(m)), V("layerboard-toggle-layer", ge), V("layerboard-set-layer-visible", Ee), V("layerboard-set-layers-visible", _e), V("layerboard-set-opacity", Oe), V("layerboard-tiled-layers", j(z(() => o.tiledLayers))), V("layerboard-visible-tiled", g), V("layerboard-tiled-opacities", c), V("layerboard-toggle-tiled", b), V("layerboard-set-tiled-opacity", F), V("layerboard-set-tiled-visible", I), V("layerboard-data-sources-state", Z), V("layerboard-data-sources-loading", pe), V("layerboard-get-data-source", ye), V("layerboard-refetch-data-source", Ze);
1752
+ const tt = z(() => ({
1753
+ backgroundColor: o.themeColor
1754
+ })), Be = z(() => ({
1755
+ backgroundColor: o.themeColor
1756
+ })), je = z(() => ({
1757
+ backgroundColor: o.themeColor
1758
+ })), ot = z(() => ({
1759
+ width: Y.value ? "0" : o.sidebarWidth
1880
1760
  }));
1881
- async function Be() {
1761
+ async function Fe() {
1882
1762
  try {
1883
- c.value = !0, w.value = null;
1884
- const x = (await gt(n.webMapId)).map((j) => {
1885
- let J = j;
1886
- const he = n.layerStyleOverrides[j.id];
1887
- he && (J = {
1888
- ...J,
1889
- paint: he.paint ?? J.paint,
1890
- outlinePaint: he.outlinePaint ?? J.outlinePaint,
1891
- legend: he.legend ?? J.legend,
1892
- type: he.type ?? J.type
1763
+ y.value = !0, $.value = null;
1764
+ const x = (await pt(o.webMapId)).map((W) => {
1765
+ let G = W;
1766
+ const ve = o.layerStyleOverrides[W.id];
1767
+ ve && (G = {
1768
+ ...G,
1769
+ paint: ve.paint ?? G.paint,
1770
+ outlinePaint: ve.outlinePaint ?? G.outlinePaint,
1771
+ legend: ve.legend ?? G.legend,
1772
+ type: ve.type ?? G.type
1893
1773
  });
1894
- const Oe = n.popupOverrides[j.id];
1895
- return Oe && J.popup && (J = {
1896
- ...J,
1897
- popup: { ...J.popup, ...Oe }
1898
- }), J;
1774
+ const Ie = o.popupOverrides[W.id];
1775
+ return Ie && G.popup && (G = {
1776
+ ...G,
1777
+ popup: { ...G.popup, ...Ie }
1778
+ }), G;
1899
1779
  });
1900
- l.value = x.map((j) => ({
1901
- config: j,
1902
- component: j.type
1780
+ n.value = x.map((W) => ({
1781
+ config: W,
1782
+ component: W.type
1903
1783
  }));
1904
- const H = {};
1905
- x.forEach((j) => {
1906
- H[j.id] = j.opacity ?? 1;
1907
- }), C.value = H, a("configs-loaded", x);
1908
- } catch (m) {
1909
- const x = m instanceof Error ? m.message : "Failed to load layer configurations";
1910
- w.value = x, a("load-error", x);
1784
+ const q = {};
1785
+ x.forEach((W) => {
1786
+ q[W.id] = W.opacity ?? 1;
1787
+ }), S.value = q, l("configs-loaded", x);
1788
+ } catch (v) {
1789
+ const x = v instanceof Error ? v.message : "Failed to load layer configurations";
1790
+ $.value = x, l("load-error", x);
1911
1791
  } finally {
1912
- c.value = !1;
1792
+ y.value = !1;
1913
1793
  }
1914
1794
  }
1915
- function qe(m) {
1916
- let x = m.split("?")[0] || m;
1795
+ function at(v) {
1796
+ let x = v.split("?")[0] || v;
1917
1797
  return x = x.replace(/\/query$/, ""), x = x.replace(/\/$/, ""), x.toLowerCase();
1918
1798
  }
1919
- async function nt() {
1920
- if (n.fetchMetadata)
1799
+ async function it() {
1800
+ if (o.fetchMetadata)
1921
1801
  try {
1922
- const m = "https://phl.carto.com/api/v2/sql?q=" + encodeURIComponent(
1802
+ const v = "https://phl.carto.com/api/v2/sql?q=" + encodeURIComponent(
1923
1803
  "select url_text, COALESCE(representation, '') as representation from phl.knack_metadata_reps_endpoints_join WHERE ( format = 'API' OR format = 'GeoService' ) AND url_text IS NOT null"
1924
- ), x = await fetch(m);
1804
+ ), x = await fetch(v);
1925
1805
  if (!x.ok) return;
1926
- const H = await x.json(), j = {};
1927
- for (const J of H.rows || [])
1928
- if (J.url_text && J.representation) {
1929
- const he = qe(J.url_text), Oe = `https://metadata.phila.gov/#home/representationdetails/${J.representation}/`;
1930
- j[he] = Oe;
1806
+ const q = await x.json(), W = {};
1807
+ for (const G of q.rows || [])
1808
+ if (G.url_text && G.representation) {
1809
+ const ve = at(G.url_text), Ie = `https://metadata.phila.gov/#home/representationdetails/${G.representation}/`;
1810
+ W[ve] = Ie;
1931
1811
  }
1932
- g.value = j;
1812
+ p.value = W;
1933
1813
  } catch {
1934
1814
  }
1935
1815
  }
1936
- function it(m) {
1937
- y.value = m, a("zoom", m);
1816
+ function nt(v) {
1817
+ m.value = v, l("zoom", v);
1938
1818
  }
1939
- function _e(m) {
1940
- b.value.has(m) ? b.value.delete(m) : b.value.add(m), b.value = new Set(b.value);
1819
+ function ge(v) {
1820
+ L.value.has(v) ? L.value.delete(v) : L.value.add(v), L.value = new Set(L.value);
1941
1821
  }
1942
- function we(m, x) {
1943
- x ? b.value.add(m) : b.value.delete(m), b.value = new Set(b.value);
1822
+ function Ee(v, x) {
1823
+ x ? L.value.add(v) : L.value.delete(v), L.value = new Set(L.value);
1944
1824
  }
1945
- function Ee(m, x) {
1946
- for (const H of m)
1947
- x ? b.value.add(H) : b.value.delete(H);
1948
- b.value = new Set(b.value);
1825
+ function _e(v, x) {
1826
+ for (const q of v)
1827
+ x ? L.value.add(q) : L.value.delete(q);
1828
+ L.value = new Set(L.value);
1949
1829
  }
1950
- function Le(m, x) {
1951
- C.value = { ...C.value, [m]: x };
1830
+ function Oe(v, x) {
1831
+ S.value = { ...S.value, [v]: x };
1952
1832
  }
1953
- function at(m, x) {
1954
- x ? s.value.add(m) : s.value.delete(m), s.value = new Set(s.value);
1833
+ function le(v, x) {
1834
+ x ? s.value.add(v) : s.value.delete(v), s.value = new Set(s.value);
1955
1835
  }
1956
- function le(m, x) {
1836
+ function ze(v, x) {
1957
1837
  if (x)
1958
- k.value = { ...k.value, [m]: x };
1838
+ C.value = { ...C.value, [v]: x };
1959
1839
  else {
1960
- const H = { ...k.value };
1961
- delete H[m], k.value = H;
1840
+ const q = { ...C.value };
1841
+ delete q[v], C.value = q;
1962
1842
  }
1963
1843
  }
1964
- function Me(m) {
1965
- P.value = m;
1844
+ function oe(v) {
1845
+ M.value = v;
1966
1846
  }
1967
- const ee = $(null), ke = $(null), lt = $(null), pe = $(null), Ze = $(null), Ae = $(null), Ge = $(null), ye = $("map");
1968
- function Fe() {
1969
- ye.value = ye.value === "sidebar" ? "map" : "sidebar", Ne(() => {
1970
- ye.value === "sidebar" && ee.value?.focus();
1847
+ const Pe = k(null), qe = k(null), Se = k(null), Ge = k(null), Ae = k(null), Ne = k(null), He = k(null), re = k("map");
1848
+ function Me() {
1849
+ re.value = re.value === "sidebar" ? "map" : "sidebar", Ve(() => {
1850
+ re.value === "sidebar" && Pe.value?.focus();
1971
1851
  });
1972
1852
  }
1973
- const te = $(!1);
1974
- function He() {
1975
- te.value = !te.value, te.value && Ne(() => {
1976
- pe.value?.focus();
1853
+ const ce = k(!1);
1854
+ function Je() {
1855
+ ce.value = !ce.value, ce.value && Ve(() => {
1856
+ Ge.value?.focus();
1977
1857
  });
1978
1858
  }
1979
- function $e() {
1980
- te.value = !1, Ne(() => {
1981
- ke.value?.focus();
1859
+ function Te() {
1860
+ ce.value = !1, Ve(() => {
1861
+ qe.value?.focus();
1982
1862
  });
1983
1863
  }
1984
- const se = $(!1);
1985
- function xe() {
1986
- se.value = !se.value;
1864
+ const Y = k(!1);
1865
+ function Ke() {
1866
+ Y.value = !Y.value;
1987
1867
  }
1988
- const ue = $(!1), Ve = $(null);
1989
- function ge() {
1990
- Ve.value = document.activeElement, ue.value = !0, Ne(() => {
1991
- Ge.value?.focus();
1868
+ const he = k(!1), Ce = k(null);
1869
+ function me() {
1870
+ Ce.value = document.activeElement, he.value = !0, Ve(() => {
1871
+ He.value?.focus();
1992
1872
  });
1993
1873
  }
1994
- function ne() {
1995
- ue.value = !1, Ne(() => {
1996
- Ve.value?.focus(), Ve.value = null;
1874
+ function ae() {
1875
+ he.value = !1, Ve(() => {
1876
+ Ce.value?.focus(), Ce.value = null;
1997
1877
  });
1998
1878
  }
1999
- function Te(m) {
2000
- m.target.classList.contains("layerboard-modal-backdrop") && ne();
1879
+ function lt(v) {
1880
+ v.target.classList.contains("layerboard-modal-backdrop") && ae();
2001
1881
  }
2002
- function rt(m) {
2003
- if (m.key === "Escape") {
2004
- $e();
1882
+ function rt(v) {
1883
+ if (v.key === "Escape") {
1884
+ Te();
2005
1885
  return;
2006
1886
  }
2007
- if (m.key === "Tab" && Ze.value) {
1887
+ if (v.key === "Tab" && Ae.value) {
2008
1888
  const x = Array.from(
2009
- Ze.value.querySelectorAll(
1889
+ Ae.value.querySelectorAll(
2010
1890
  'a[href], button:not([disabled]), textarea, input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
2011
1891
  )
2012
1892
  );
2013
1893
  if (x.length === 0) return;
2014
- const H = x[0], j = x[x.length - 1];
2015
- m.shiftKey ? document.activeElement === H && (m.preventDefault(), j.focus()) : document.activeElement === j && (m.preventDefault(), H.focus());
1894
+ const q = x[0], W = x[x.length - 1];
1895
+ v.shiftKey ? document.activeElement === q && (v.preventDefault(), W.focus()) : document.activeElement === W && (v.preventDefault(), q.focus());
2016
1896
  }
2017
1897
  }
2018
- function st(m) {
2019
- if (m.key === "Escape") {
2020
- ne();
1898
+ function st(v) {
1899
+ if (v.key === "Escape") {
1900
+ ae();
2021
1901
  return;
2022
1902
  }
2023
- if (m.key === "Tab" && Ae.value) {
1903
+ if (v.key === "Tab" && Ne.value) {
2024
1904
  const x = Array.from(
2025
- Ae.value.querySelectorAll(
1905
+ Ne.value.querySelectorAll(
2026
1906
  'a[href], button:not([disabled]), textarea, input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
2027
1907
  )
2028
1908
  );
2029
1909
  if (x.length === 0) return;
2030
- const H = x[0], j = x[x.length - 1];
2031
- m.shiftKey ? document.activeElement === H && (m.preventDefault(), j.focus()) : document.activeElement === j && (m.preventDefault(), H.focus());
1910
+ const q = x[0], W = x[x.length - 1];
1911
+ v.shiftKey ? document.activeElement === q && (v.preventDefault(), W.focus()) : document.activeElement === W && (v.preventDefault(), q.focus());
2032
1912
  }
2033
1913
  }
2034
- W("layerboard-open-modal", ge), W("layerboard-close-modal", ne), W("layerboard-is-modal-open", G(ue)), i({
1914
+ V("layerboard-open-modal", me), V("layerboard-close-modal", ae), V("layerboard-is-modal-open", j(he)), i({
2035
1915
  /** Layer configurations */
2036
- layerList: l,
1916
+ layerList: n,
2037
1917
  /** Set of visible layer IDs */
2038
- visibleLayers: b,
1918
+ visibleLayers: L,
2039
1919
  /** Layer opacity values */
2040
- layerOpacities: C,
1920
+ layerOpacities: S,
2041
1921
  /** Set of currently loading layer IDs */
2042
1922
  loadingLayers: s,
2043
1923
  /** Map of layer errors by ID */
2044
- layerErrors: k,
1924
+ layerErrors: C,
2045
1925
  /** Current map zoom level */
2046
- currentZoom: y,
1926
+ currentZoom: m,
2047
1927
  /** Toggle a layer's visibility */
2048
- toggleLayer: _e,
1928
+ toggleLayer: ge,
2049
1929
  /** Set a layer's visibility explicitly */
2050
- setLayerVisible: we,
1930
+ setLayerVisible: Ee,
2051
1931
  /** Set multiple layers' visibility at once */
2052
- setLayersVisible: Ee,
1932
+ setLayersVisible: _e,
2053
1933
  /** Set a layer's opacity */
2054
- setLayerOpacity: Le,
1934
+ setLayerOpacity: Oe,
2055
1935
  /** Reload layer configurations */
2056
- reloadConfigs: Be,
1936
+ reloadConfigs: Fe,
2057
1937
  /** Clear configuration cache */
2058
- clearCache: () => an(n.webMapId),
1938
+ clearCache: () => jo(o.webMapId),
2059
1939
  // Tiled layer APIs
2060
1940
  /** Set of visible tiled layer IDs */
2061
- visibleTiledLayers: h,
1941
+ visibleTiledLayers: g,
2062
1942
  /** Tiled layer opacity values */
2063
- tiledLayerOpacities: u,
1943
+ tiledLayerOpacities: c,
2064
1944
  /** Toggle a tiled layer's visibility */
2065
- toggleTiledLayer: L,
1945
+ toggleTiledLayer: b,
2066
1946
  /** Set a tiled layer's visibility explicitly */
2067
- setTiledLayerVisible: z,
1947
+ setTiledLayerVisible: I,
2068
1948
  /** Set a tiled layer's opacity */
2069
1949
  setTiledLayerOpacity: F,
2070
1950
  // Data source APIs
2071
1951
  /** State of all data sources */
2072
- dataSourcesState: A,
1952
+ dataSourcesState: Z,
2073
1953
  /** Whether any data source is loading */
2074
- dataSourcesLoading: de,
1954
+ dataSourcesLoading: pe,
2075
1955
  /** Get data from a specific data source */
2076
- getDataSourceData: fe,
1956
+ getDataSourceData: ye,
2077
1957
  /** Refetch a specific data source */
2078
- refetchDataSource: Pe,
1958
+ refetchDataSource: Ze,
2079
1959
  // Modal APIs
2080
1960
  /** Whether the modal is currently open */
2081
- isModalOpen: ue,
1961
+ isModalOpen: he,
2082
1962
  /** Open the modal */
2083
- openModal: ge,
1963
+ openModal: me,
2084
1964
  /** Close the modal */
2085
- closeModal: ne
1965
+ closeModal: ae
2086
1966
  });
2087
- function Je(m) {
2088
- m.key === "Escape" && te.value && $e();
2089
- }
2090
- return Qe(() => {
2091
- Be(), nt(), f(), document.addEventListener("keydown", Je);
2092
- }), Vt(() => {
2093
- document.removeEventListener("keydown", Je);
2094
- }), (m, x) => (p(), v("div", un, [
2095
- x[5] || (x[5] = _("a", {
1967
+ function ue(v) {
1968
+ v.key === "Escape" && ce.value && Te();
1969
+ }
1970
+ return Xe(() => {
1971
+ Fe(), it(), u(), document.addEventListener("keydown", ue);
1972
+ }), Dt(() => {
1973
+ document.removeEventListener("keydown", ue);
1974
+ }), (v, x) => (f(), h("div", Ko, [
1975
+ x[5] || (x[5] = P("a", {
2096
1976
  href: "#main-content",
2097
1977
  class: "skip-to-main-content-link"
2098
1978
  }, "Skip to main content", -1)),
2099
- _("header", {
1979
+ P("header", {
2100
1980
  class: "layerboard-header",
2101
- style: K(tt.value)
1981
+ style: J(tt.value)
2102
1982
  }, [
2103
- x[1] || (x[1] = _("a", {
1983
+ x[1] || (x[1] = P("a", {
2104
1984
  href: "https://www.phila.gov/",
2105
1985
  class: "layerboard-logo layerboard-desktop-only"
2106
1986
  }, [
2107
- _("img", {
1987
+ P("img", {
2108
1988
  src: "https://standards.phila.gov/img/logo/city-of-philadelphia-yellow-white.png",
2109
1989
  alt: "City of Philadelphia"
2110
1990
  })
2111
1991
  ], -1)),
2112
- x[2] || (x[2] = _("span", {
1992
+ x[2] || (x[2] = P("span", {
2113
1993
  class: "layerboard-header-divider layerboard-desktop-only",
2114
1994
  "aria-hidden": "true"
2115
1995
  }, null, -1)),
2116
- _("button", {
1996
+ P("button", {
2117
1997
  ref_key: "hamburgerRef",
2118
- ref: ke,
1998
+ ref: qe,
2119
1999
  class: "layerboard-hamburger layerboard-mobile-only",
2120
- "aria-expanded": te.value,
2000
+ "aria-expanded": ce.value,
2121
2001
  "aria-label": "Toggle menu",
2122
- onClick: He
2002
+ onClick: Je
2123
2003
  }, [
2124
- X(O(me), {
2125
- "icon-definition": O($o),
2004
+ Q(O(be), {
2005
+ "icon-definition": O(fo),
2126
2006
  size: "medium",
2127
2007
  inline: "",
2128
2008
  decorative: ""
2129
2009
  }, null, 8, ["icon-definition"])
2130
- ], 8, dn),
2131
- ce(m.$slots, "header", {}, () => [
2132
- _("h1", null, U(e.title), 1),
2133
- e.subtitle ? (p(), v("span", fn, U(e.subtitle), 1)) : T("", !0)
2010
+ ], 8, Qo),
2011
+ fe(v.$slots, "header", {}, () => [
2012
+ P("h1", null, N(t.title), 1),
2013
+ t.subtitle ? (f(), h("span", Xo, N(t.subtitle), 1)) : E("", !0)
2134
2014
  ], !0),
2135
- te.value ? (p(), v("div", {
2015
+ ce.value ? (f(), h("div", {
2136
2016
  key: 0,
2137
2017
  ref_key: "mobileMenuRef",
2138
- ref: Ze,
2018
+ ref: Ae,
2139
2019
  class: "layerboard-mobile-menu",
2140
2020
  role: "dialog",
2141
2021
  "aria-modal": "true",
2142
2022
  "aria-label": "Site menu",
2143
- style: K({ backgroundColor: e.themeColor }),
2023
+ style: J({ backgroundColor: t.themeColor }),
2144
2024
  onKeydown: rt
2145
2025
  }, [
2146
- _("div", pn, [
2147
- ce(m.$slots, "footer", {
2148
- openModal: ge,
2149
- closeModal: ne,
2150
- isModalOpen: ue.value
2026
+ P("div", Yo, [
2027
+ fe(v.$slots, "footer", {
2028
+ openModal: me,
2029
+ closeModal: ae,
2030
+ isModalOpen: he.value
2151
2031
  }, () => [
2152
- x[0] || (x[0] = be(" City of Philadelphia ", -1))
2032
+ x[0] || (x[0] = Le(" City of Philadelphia ", -1))
2153
2033
  ], !0)
2154
2034
  ]),
2155
- _("button", {
2035
+ P("button", {
2156
2036
  ref_key: "mobileMenuCloseRef",
2157
- ref: pe,
2037
+ ref: Ge,
2158
2038
  class: "layerboard-mobile-menu-close",
2159
2039
  "aria-label": "Close menu",
2160
- onClick: $e
2040
+ onClick: Te
2161
2041
  }, [
2162
- X(O(me), {
2163
- "icon-definition": O(Pt),
2042
+ Q(O(be), {
2043
+ "icon-definition": O(kt),
2164
2044
  size: "medium",
2165
2045
  decorative: ""
2166
2046
  }, null, 8, ["icon-definition"])
2167
2047
  ], 512)
2168
- ], 36)) : T("", !0),
2169
- te.value ? (p(), v("div", {
2048
+ ], 36)) : E("", !0),
2049
+ ce.value ? (f(), h("div", {
2170
2050
  key: 1,
2171
2051
  class: "layerboard-mobile-menu-backdrop",
2172
- onClick: $e
2173
- })) : T("", !0)
2052
+ onClick: Te
2053
+ })) : E("", !0)
2174
2054
  ], 4),
2175
- _("div", yn, [
2176
- c.value ? (p(), v("div", gn, [
2177
- _("div", {
2055
+ P("div", ea, [
2056
+ y.value ? (f(), h("div", ta, [
2057
+ P("div", {
2178
2058
  class: "layerboard-spinner",
2179
- style: K({ borderTopColor: e.themeColor })
2059
+ style: J({ borderTopColor: t.themeColor })
2180
2060
  }, null, 4),
2181
- _("p", null, "Loading " + U(e.title) + "...", 1)
2182
- ])) : w.value ? (p(), v("div", hn, [
2183
- x[3] || (x[3] = _("h2", null, "Error Loading Layers", -1)),
2184
- _("p", null, U(w.value), 1),
2185
- _("button", {
2061
+ P("p", null, "Loading " + N(t.title) + "...", 1)
2062
+ ])) : $.value ? (f(), h("div", oa, [
2063
+ x[3] || (x[3] = P("h2", null, "Error Loading Layers", -1)),
2064
+ P("p", null, N($.value), 1),
2065
+ P("button", {
2186
2066
  class: "layerboard-retry-button",
2187
- style: K({ backgroundColor: e.themeColor }),
2188
- onClick: Be
2067
+ style: J({ backgroundColor: t.themeColor }),
2068
+ onClick: Fe
2189
2069
  }, " Retry ", 4)
2190
- ])) : (p(), v(ie, { key: 2 }, [
2191
- _("aside", {
2070
+ ])) : (f(), h(ie, { key: 2 }, [
2071
+ P("aside", {
2192
2072
  id: "main-content",
2193
2073
  ref_key: "sidebarRef",
2194
- ref: ee,
2195
- class: ae(["layerboard-sidebar", { "is-active": ye.value === "sidebar" }]),
2196
- style: K(je.value),
2074
+ ref: Pe,
2075
+ class: ne(["layerboard-sidebar", { "is-active": re.value === "sidebar" }]),
2076
+ style: J(ot.value),
2197
2077
  "aria-label": "Map layers",
2198
2078
  tabindex: "-1"
2199
2079
  }, [
2200
- ce(m.$slots, "sidebar", {
2201
- layers: l.value,
2202
- visibleLayers: b.value,
2203
- layerOpacities: C.value,
2080
+ fe(v.$slots, "sidebar", {
2081
+ layers: n.value,
2082
+ visibleLayers: L.value,
2083
+ layerOpacities: S.value,
2204
2084
  loadingLayers: s.value,
2205
- layerErrors: k.value,
2206
- currentZoom: y.value,
2207
- toggleLayer: _e,
2208
- setLayerVisible: we,
2209
- setLayersVisible: Ee,
2210
- setOpacity: Le,
2211
- tiledLayers: e.tiledLayers,
2212
- visibleTiledLayers: h.value,
2213
- tiledLayerOpacities: u.value,
2214
- toggleTiledLayer: L,
2215
- setTiledLayerVisible: z,
2085
+ layerErrors: C.value,
2086
+ currentZoom: m.value,
2087
+ toggleLayer: ge,
2088
+ setLayerVisible: Ee,
2089
+ setLayersVisible: _e,
2090
+ setOpacity: Oe,
2091
+ tiledLayers: t.tiledLayers,
2092
+ visibleTiledLayers: g.value,
2093
+ tiledLayerOpacities: c.value,
2094
+ toggleTiledLayer: b,
2095
+ setTiledLayerVisible: I,
2216
2096
  setTiledLayerOpacity: F,
2217
- dataSourcesState: A.value,
2218
- dataSourcesLoading: de.value,
2219
- getDataSource: fe,
2220
- refetchDataSource: Pe
2097
+ dataSourcesState: Z.value,
2098
+ dataSourcesLoading: pe.value,
2099
+ getDataSource: ye,
2100
+ refetchDataSource: Ze
2221
2101
  }, () => [
2222
- e.showDefaultSidebar ? (p(), oe(jo, {
2102
+ t.showDefaultSidebar ? (f(), te(Eo, {
2223
2103
  key: 0,
2224
- "layer-list": l.value,
2225
- "visible-layers": b.value,
2226
- "layer-opacities": C.value,
2104
+ "layer-list": n.value,
2105
+ "visible-layers": L.value,
2106
+ "layer-opacities": S.value,
2227
2107
  "loading-layers": s.value,
2228
- "layer-errors": k.value,
2229
- "current-zoom": y.value,
2230
- "search-query": P.value,
2231
- "layer-metadata": g.value,
2232
- onToggleLayer: _e,
2233
- onSetOpacity: Le,
2234
- onUpdateSearch: Me
2235
- }, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) : T("", !0)
2108
+ "layer-errors": C.value,
2109
+ "current-zoom": m.value,
2110
+ "search-query": M.value,
2111
+ "layer-metadata": p.value,
2112
+ onToggleLayer: ge,
2113
+ onSetOpacity: Oe,
2114
+ onUpdateSearch: oe
2115
+ }, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) : E("", !0)
2236
2116
  ], !0)
2237
2117
  ], 6),
2238
- _("div", {
2118
+ P("div", {
2239
2119
  role: "main",
2240
2120
  "aria-label": "Map",
2241
- class: ae(["layerboard-map", { "is-active": ye.value === "map" }])
2121
+ class: ne(["layerboard-map", { "is-active": re.value === "map" }])
2242
2122
  }, [
2243
- X(lo, {
2244
- "visible-layers": b.value,
2245
- "layer-opacities": C.value,
2246
- "layer-list": l.value,
2247
- "tiled-layers": e.tiledLayers,
2248
- "visible-tiled-layers": h.value,
2249
- "tiled-layer-opacities": u.value,
2250
- "cyclomedia-config": e.cyclomediaConfig,
2251
- "pictometry-credentials": e.pictometryCredentials,
2252
- "basemap-control-position": e.basemapControlPosition,
2253
- "navigation-control-position": e.navigationControlPosition,
2254
- "geolocation-control-position": e.geolocationControlPosition,
2255
- "search-control-position": e.searchControlPosition,
2256
- "draw-control-position": e.drawControlPosition,
2257
- "cyclomedia-button-position": e.cyclomediaButtonPosition,
2258
- "pictometry-button-position": e.pictometryButtonPosition,
2259
- "initial-zoom": e.initialZoom,
2260
- "initial-center": e.initialCenter,
2261
- onZoom: it,
2262
- onLayerLoading: at,
2263
- onLayerError: le
2123
+ Q(Gt, {
2124
+ "visible-layers": L.value,
2125
+ "layer-opacities": S.value,
2126
+ "layer-list": n.value,
2127
+ "tiled-layers": t.tiledLayers,
2128
+ "visible-tiled-layers": g.value,
2129
+ "tiled-layer-opacities": c.value,
2130
+ "cyclomedia-config": t.cyclomediaConfig,
2131
+ "pictometry-credentials": t.pictometryCredentials,
2132
+ "basemap-control-position": t.basemapControlPosition,
2133
+ "navigation-control-position": t.navigationControlPosition,
2134
+ "geolocation-control-position": t.geolocationControlPosition,
2135
+ "search-control-position": t.searchControlPosition,
2136
+ "draw-control-position": t.drawControlPosition,
2137
+ "cyclomedia-button-position": t.cyclomediaButtonPosition,
2138
+ "pictometry-button-position": t.pictometryButtonPosition,
2139
+ "initial-zoom": t.initialZoom,
2140
+ "initial-center": t.initialCenter,
2141
+ onZoom: nt,
2142
+ onLayerLoading: le,
2143
+ onLayerError: ze
2264
2144
  }, null, 8, ["visible-layers", "layer-opacities", "layer-list", "tiled-layers", "visible-tiled-layers", "tiled-layer-opacities", "cyclomedia-config", "pictometry-credentials", "basemap-control-position", "navigation-control-position", "geolocation-control-position", "search-control-position", "draw-control-position", "cyclomedia-button-position", "pictometry-button-position", "initial-zoom", "initial-center"])
2265
2145
  ], 2),
2266
- _("button", {
2267
- class: ae(["layerboard-sidebar-toggle", { "is-collapsed": se.value }]),
2268
- style: K({ left: se.value ? "0" : n.sidebarWidth }),
2269
- "aria-expanded": !se.value,
2270
- "aria-label": se.value ? "Expand sidebar" : "Collapse sidebar",
2271
- onClick: xe
2146
+ P("button", {
2147
+ class: ne(["layerboard-sidebar-toggle", { "is-collapsed": Y.value }]),
2148
+ style: J({ left: Y.value ? "0" : o.sidebarWidth }),
2149
+ "aria-expanded": !Y.value,
2150
+ "aria-label": Y.value ? "Expand sidebar" : "Collapse sidebar",
2151
+ onClick: Ke
2272
2152
  }, [
2273
- X(O(me), {
2274
- "icon-definition": se.value ? O(Co) : O(ko),
2153
+ Q(O(be), {
2154
+ "icon-definition": Y.value ? O(co) : O(uo),
2275
2155
  size: "medium",
2276
2156
  decorative: ""
2277
2157
  }, null, 8, ["icon-definition"])
2278
- ], 14, mn)
2158
+ ], 14, aa)
2279
2159
  ], 64))
2280
2160
  ]),
2281
- _("button", {
2161
+ P("button", {
2282
2162
  ref_key: "mobileToggleRef",
2283
- ref: lt,
2163
+ ref: Se,
2284
2164
  class: "layerboard-mobile-toggle",
2285
- style: K(De.value),
2286
- onClick: Fe
2165
+ style: J(je.value),
2166
+ onClick: Me
2287
2167
  }, [
2288
- ye.value === "map" ? (p(), v("span", vn, U(e.sidebarLabel), 1)) : (p(), v("span", bn, U(e.mapLabel), 1))
2168
+ re.value === "map" ? (f(), h("span", ia, N(t.sidebarLabel), 1)) : (f(), h("span", na, N(t.mapLabel), 1))
2289
2169
  ], 4),
2290
- _("footer", {
2170
+ P("footer", {
2291
2171
  class: "layerboard-footer",
2292
- style: K(ot.value)
2172
+ style: J(Be.value)
2293
2173
  }, [
2294
- ce(m.$slots, "footer", {
2295
- openModal: ge,
2296
- closeModal: ne,
2297
- isModalOpen: ue.value
2174
+ fe(v.$slots, "footer", {
2175
+ openModal: me,
2176
+ closeModal: ae,
2177
+ isModalOpen: he.value
2298
2178
  }, () => [
2299
- x[4] || (x[4] = be(" City of Philadelphia ", -1))
2179
+ x[4] || (x[4] = Le(" City of Philadelphia ", -1))
2300
2180
  ], !0)
2301
2181
  ], 4),
2302
- ue.value ? (p(), v("div", {
2182
+ he.value ? (f(), h("div", {
2303
2183
  key: 0,
2304
2184
  class: "layerboard-modal-backdrop",
2305
- onClick: Te,
2185
+ onClick: lt,
2306
2186
  onKeydown: st
2307
2187
  }, [
2308
- _("div", {
2188
+ P("div", {
2309
2189
  ref_key: "modalRef",
2310
- ref: Ae,
2190
+ ref: Ne,
2311
2191
  class: "layerboard-modal",
2312
2192
  role: "dialog",
2313
2193
  "aria-modal": "true",
2314
2194
  "aria-label": "Application information"
2315
2195
  }, [
2316
- _("button", {
2196
+ P("button", {
2317
2197
  ref_key: "modalCloseRef",
2318
- ref: Ge,
2198
+ ref: He,
2319
2199
  class: "layerboard-modal-close",
2320
2200
  "aria-label": "Close modal",
2321
- onClick: ne
2201
+ onClick: ae
2322
2202
  }, [
2323
- X(O(me), {
2324
- "icon-definition": O(Pt),
2203
+ Q(O(be), {
2204
+ "icon-definition": O(kt),
2325
2205
  size: "medium",
2326
2206
  decorative: ""
2327
2207
  }, null, 8, ["icon-definition"])
2328
2208
  ], 512),
2329
- ce(m.$slots, "modal", { closeModal: ne }, void 0, !0)
2209
+ fe(v.$slots, "modal", { closeModal: ae }, void 0, !0)
2330
2210
  ], 512)
2331
- ], 32)) : T("", !0),
2332
- _("span", wn, U(ye.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
2211
+ ], 32)) : E("", !0),
2212
+ P("span", la, N(re.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
2333
2213
  ]));
2334
2214
  }
2335
- }), si = /* @__PURE__ */ Re(Ln, [["__scopeId", "data-v-863275b0"]]), Sn = ["aria-expanded"], Cn = {
2215
+ }), Ha = /* @__PURE__ */ De(ra, [["__scopeId", "data-v-863275b0"]]), sa = ["aria-expanded"], ca = {
2336
2216
  key: 0,
2337
2217
  class: "topic-icon"
2338
- }, kn = { class: "topic-title" }, $n = /* @__PURE__ */ Ce({
2218
+ }, ua = { class: "topic-title" }, da = /* @__PURE__ */ $e({
2339
2219
  __name: "TopicAccordion",
2340
2220
  props: {
2341
2221
  title: {},
@@ -2345,44 +2225,44 @@ const un = { class: "layerboard-layout" }, dn = ["aria-expanded"], fn = {
2345
2225
  headerClass: {}
2346
2226
  },
2347
2227
  emits: ["toggle", "layerChange"],
2348
- setup(e, { emit: i }) {
2349
- const t = e, n = i, a = $(t.expanded), l = `topic-panel-${Lt()}`, c = `topic-header-${Lt()}`;
2350
- ze(
2351
- () => t.expanded,
2352
- (y) => {
2353
- a.value = y;
2228
+ setup(t, { emit: i }) {
2229
+ const a = t, o = i, l = k(a.expanded), n = `topic-panel-${bt()}`, y = `topic-header-${bt()}`;
2230
+ Re(
2231
+ () => a.expanded,
2232
+ (m) => {
2233
+ l.value = m;
2354
2234
  }
2355
2235
  );
2356
- function w() {
2357
- a.value = !a.value, n("toggle", a.value);
2236
+ function $() {
2237
+ l.value = !l.value, o("toggle", l.value);
2358
2238
  }
2359
- return (y, P) => {
2360
- const b = Nt("font-awesome-icon");
2361
- return p(), v("div", {
2362
- class: ae(["topic-accordion", { "is-expanded": a.value }])
2239
+ return (m, M) => {
2240
+ const L = Zt("font-awesome-icon");
2241
+ return f(), h("div", {
2242
+ class: ne(["topic-accordion", { "is-expanded": l.value }])
2363
2243
  }, [
2364
- _("button", {
2365
- id: c,
2366
- class: ae(["topic-header", e.headerClass]),
2244
+ P("button", {
2245
+ id: y,
2246
+ class: ne(["topic-header", t.headerClass]),
2367
2247
  type: "button",
2368
- "aria-expanded": a.value,
2369
- "aria-controls": l,
2370
- onClick: w
2248
+ "aria-expanded": l.value,
2249
+ "aria-controls": n,
2250
+ onClick: $
2371
2251
  }, [
2372
- e.icon || y.$slots.icon ? (p(), v("span", Cn, [
2373
- ce(y.$slots, "icon", {}, () => [
2374
- e.icon ? (p(), oe(b, {
2252
+ t.icon || m.$slots.icon ? (f(), h("span", ca, [
2253
+ fe(m.$slots, "icon", {}, () => [
2254
+ t.icon ? (f(), te(L, {
2375
2255
  key: 0,
2376
- icon: ["fas", e.icon],
2256
+ icon: ["fas", t.icon],
2377
2257
  "aria-hidden": "true"
2378
- }, null, 8, ["icon"])) : T("", !0)
2258
+ }, null, 8, ["icon"])) : E("", !0)
2379
2259
  ], !0)
2380
- ])) : T("", !0),
2381
- _("span", kn, U(e.title), 1),
2382
- _("span", {
2383
- class: ae(["topic-chevron", { "is-rotated": a.value }])
2384
- }, [...P[0] || (P[0] = [
2385
- _("svg", {
2260
+ ])) : E("", !0),
2261
+ P("span", ua, N(t.title), 1),
2262
+ P("span", {
2263
+ class: ne(["topic-chevron", { "is-rotated": l.value }])
2264
+ }, [...M[0] || (M[0] = [
2265
+ P("svg", {
2386
2266
  xmlns: "http://www.w3.org/2000/svg",
2387
2267
  width: "20",
2388
2268
  height: "20",
@@ -2394,46 +2274,46 @@ const un = { class: "layerboard-layout" }, dn = ["aria-expanded"], fn = {
2394
2274
  "stroke-linejoin": "round",
2395
2275
  "aria-hidden": "true"
2396
2276
  }, [
2397
- _("polyline", { points: "6 9 12 15 18 9" })
2277
+ P("polyline", { points: "6 9 12 15 18 9" })
2398
2278
  ], -1)
2399
2279
  ])], 2)
2400
- ], 10, Sn),
2401
- Tt(_("div", {
2402
- id: l,
2280
+ ], 10, sa),
2281
+ Mt(P("div", {
2282
+ id: n,
2403
2283
  role: "region",
2404
- "aria-labelledby": c,
2284
+ "aria-labelledby": y,
2405
2285
  class: "topic-content"
2406
2286
  }, [
2407
- ce(y.$slots, "default", {}, () => [
2408
- P[1] || (P[1] = _("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
2287
+ fe(m.$slots, "default", {}, () => [
2288
+ M[1] || (M[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
2409
2289
  ], !0)
2410
2290
  ], 512), [
2411
- [Ut, a.value]
2291
+ [Bt, l.value]
2412
2292
  ])
2413
2293
  ], 2);
2414
2294
  };
2415
2295
  }
2416
- }), ci = /* @__PURE__ */ Re($n, [["__scopeId", "data-v-9af09394"]]), xn = ["aria-label"], Pn = ["checked", "disabled", "onChange"], _n = { class: "layer-title" }, En = {
2296
+ }), Ja = /* @__PURE__ */ De(da, [["__scopeId", "data-v-9af09394"]]), fa = ["aria-label"], pa = ["checked", "disabled", "onChange"], ya = { class: "layer-title" }, ga = {
2417
2297
  key: 0,
2418
2298
  class: "loading-indicator",
2419
2299
  role: "status"
2420
- }, Mn = ["aria-label"], Fn = {
2300
+ }, ha = ["aria-label"], ma = {
2421
2301
  key: 2,
2422
2302
  class: "zoom-indicator"
2423
- }, Tn = { class: "layer-title" }, On = {
2303
+ }, va = { class: "layer-title" }, ba = {
2424
2304
  key: 0,
2425
2305
  class: "loading-indicator",
2426
2306
  role: "status"
2427
- }, zn = ["aria-label"], In = {
2307
+ }, wa = ["aria-label"], La = {
2428
2308
  key: 2,
2429
2309
  class: "zoom-indicator"
2430
- }, Rn = {
2310
+ }, Sa = {
2431
2311
  key: 2,
2432
2312
  class: "opacity-control"
2433
- }, Dn = ["for"], Bn = ["id", "value", "aria-label", "onInput"], Zn = ["aria-label"], An = { class: "legend-label" }, Vn = {
2313
+ }, Ca = ["for"], ka = ["id", "value", "aria-label", "onInput"], xa = ["aria-label"], $a = { class: "legend-label" }, _a = {
2434
2314
  key: 0,
2435
2315
  class: "empty-state"
2436
- }, Nn = /* @__PURE__ */ Ce({
2316
+ }, Pa = /* @__PURE__ */ $e({
2437
2317
  __name: "LayerCheckboxSet",
2438
2318
  props: {
2439
2319
  layers: {},
@@ -2447,161 +2327,161 @@ const un = { class: "layerboard-layout" }, dn = ["aria-expanded"], fn = {
2447
2327
  groupLabel: {}
2448
2328
  },
2449
2329
  emits: ["toggleLayer", "setOpacity"],
2450
- setup(e, { emit: i }) {
2451
- const t = e, n = i;
2452
- function a(h) {
2453
- return t.visibleLayerIds.has(h);
2330
+ setup(t, { emit: i }) {
2331
+ const a = t, o = i;
2332
+ function l(g) {
2333
+ return a.visibleLayerIds.has(g);
2454
2334
  }
2455
- function l(h) {
2456
- return t.layerOpacities[h] ?? 1;
2335
+ function n(g) {
2336
+ return a.layerOpacities[g] ?? 1;
2457
2337
  }
2458
- function c(h) {
2459
- return t.loadingLayerIds.has(h);
2338
+ function y(g) {
2339
+ return a.loadingLayerIds.has(g);
2460
2340
  }
2461
- function w(h) {
2462
- return t.layerErrors[h] || null;
2341
+ function $(g) {
2342
+ return a.layerErrors[g] || null;
2463
2343
  }
2464
- function y(h) {
2465
- const u = t.currentZoom, f = h.minZoom, L = h.maxZoom;
2466
- return !(f !== void 0 && u < f || L !== void 0 && u > L);
2344
+ function m(g) {
2345
+ const c = a.currentZoom, u = g.minZoom, b = g.maxZoom;
2346
+ return !(u !== void 0 && c < u || b !== void 0 && c > b);
2467
2347
  }
2468
- function P(h) {
2469
- return h.displayOptions?.shouldShowCheckbox !== !1;
2348
+ function M(g) {
2349
+ return g.displayOptions?.shouldShowCheckbox !== !1;
2470
2350
  }
2471
- function b(h) {
2472
- return t.showOpacity ? h.displayOptions?.shouldShowSlider !== !1 : !1;
2351
+ function L(g) {
2352
+ return a.showOpacity ? g.displayOptions?.shouldShowSlider !== !1 : !1;
2473
2353
  }
2474
- function C(h) {
2475
- return t.showLegend ? h.displayOptions?.shouldShowLegendBox !== !1 : !1;
2354
+ function S(g) {
2355
+ return a.showLegend ? g.displayOptions?.shouldShowLegendBox !== !1 : !1;
2476
2356
  }
2477
- function s(h) {
2478
- return h.displayOptions?.layerNameChange || h.title;
2357
+ function s(g) {
2358
+ return g.displayOptions?.layerNameChange || g.title;
2479
2359
  }
2480
- function k(h) {
2481
- n("toggleLayer", h);
2360
+ function C(g) {
2361
+ o("toggleLayer", g);
2482
2362
  }
2483
- function g(h, u) {
2484
- const f = u.target;
2485
- n("setOpacity", h, parseFloat(f.value));
2363
+ function p(g, c) {
2364
+ const u = c.target;
2365
+ o("setOpacity", g, parseFloat(u.value));
2486
2366
  }
2487
- return (h, u) => (p(), v("fieldset", {
2367
+ return (g, c) => (f(), h("fieldset", {
2488
2368
  class: "layer-checkbox-set",
2489
2369
  role: "group",
2490
- "aria-label": e.groupLabel
2370
+ "aria-label": t.groupLabel
2491
2371
  }, [
2492
- (p(!0), v(ie, null, re(e.layers, (f) => (p(), v("div", {
2493
- key: f.id,
2372
+ (f(!0), h(ie, null, se(t.layers, (u) => (f(), h("div", {
2373
+ key: u.id,
2494
2374
  class: "layer-item"
2495
2375
  }, [
2496
- P(f) ? (p(), v("label", {
2376
+ M(u) ? (f(), h("label", {
2497
2377
  key: 0,
2498
- class: ae(["layer-checkbox", {
2499
- "layer-unavailable": !y(f),
2500
- "layer-error": w(f.id)
2378
+ class: ne(["layer-checkbox", {
2379
+ "layer-unavailable": !m(u),
2380
+ "layer-error": $(u.id)
2501
2381
  }])
2502
2382
  }, [
2503
- _("input", {
2383
+ P("input", {
2504
2384
  type: "checkbox",
2505
- checked: a(f.id),
2506
- disabled: !y(f),
2507
- onChange: (L) => k(f.id)
2508
- }, null, 40, Pn),
2509
- _("span", _n, [
2510
- be(U(s(f)) + " ", 1),
2511
- c(f.id) ? (p(), v("span", En, " Loading... ")) : T("", !0),
2512
- w(f.id) ? (p(), v("span", {
2385
+ checked: l(u.id),
2386
+ disabled: !m(u),
2387
+ onChange: (b) => C(u.id)
2388
+ }, null, 40, pa),
2389
+ P("span", ya, [
2390
+ Le(N(s(u)) + " ", 1),
2391
+ y(u.id) ? (f(), h("span", ga, " Loading... ")) : E("", !0),
2392
+ $(u.id) ? (f(), h("span", {
2513
2393
  key: 1,
2514
2394
  class: "error-indicator",
2515
- "aria-label": w(f.id) || "Error",
2395
+ "aria-label": $(u.id) || "Error",
2516
2396
  role: "status"
2517
- }, " Error ", 8, Mn)) : T("", !0),
2518
- y(f) ? T("", !0) : (p(), v("span", Fn, " (zoom in) "))
2397
+ }, " Error ", 8, ha)) : E("", !0),
2398
+ m(u) ? E("", !0) : (f(), h("span", ma, " (zoom in) "))
2519
2399
  ])
2520
- ], 2)) : (p(), v("div", {
2400
+ ], 2)) : (f(), h("div", {
2521
2401
  key: 1,
2522
- class: ae(["layer-label-only", {
2523
- "layer-unavailable": !y(f),
2524
- "layer-error": w(f.id)
2402
+ class: ne(["layer-label-only", {
2403
+ "layer-unavailable": !m(u),
2404
+ "layer-error": $(u.id)
2525
2405
  }])
2526
2406
  }, [
2527
- _("span", Tn, [
2528
- be(U(s(f)) + " ", 1),
2529
- c(f.id) ? (p(), v("span", On, " Loading... ")) : T("", !0),
2530
- w(f.id) ? (p(), v("span", {
2407
+ P("span", va, [
2408
+ Le(N(s(u)) + " ", 1),
2409
+ y(u.id) ? (f(), h("span", ba, " Loading... ")) : E("", !0),
2410
+ $(u.id) ? (f(), h("span", {
2531
2411
  key: 1,
2532
2412
  class: "error-indicator",
2533
- "aria-label": w(f.id) || "Error",
2413
+ "aria-label": $(u.id) || "Error",
2534
2414
  role: "status"
2535
- }, " Error ", 8, zn)) : T("", !0),
2536
- y(f) ? T("", !0) : (p(), v("span", In, " (zoom in) "))
2415
+ }, " Error ", 8, wa)) : E("", !0),
2416
+ m(u) ? E("", !0) : (f(), h("span", La, " (zoom in) "))
2537
2417
  ])
2538
2418
  ], 2)),
2539
- b(f) && a(f.id) ? (p(), v("div", Rn, [
2540
- _("label", {
2419
+ L(u) && l(u.id) ? (f(), h("div", Sa, [
2420
+ P("label", {
2541
2421
  class: "opacity-label",
2542
- for: "opacity-" + f.id
2543
- }, " Opacity: " + U(Math.round(l(f.id) * 100)) + "% ", 9, Dn),
2544
- _("input", {
2545
- id: "opacity-" + f.id,
2422
+ for: "opacity-" + u.id
2423
+ }, " Opacity: " + N(Math.round(n(u.id) * 100)) + "% ", 9, Ca),
2424
+ P("input", {
2425
+ id: "opacity-" + u.id,
2546
2426
  type: "range",
2547
2427
  min: "0",
2548
2428
  max: "1",
2549
2429
  step: "0.05",
2550
- value: l(f.id),
2551
- "aria-label": "Opacity for " + s(f),
2430
+ value: n(u.id),
2431
+ "aria-label": "Opacity for " + s(u),
2552
2432
  class: "opacity-slider",
2553
- onInput: (L) => g(f.id, L)
2554
- }, null, 40, Bn)
2555
- ])) : T("", !0),
2556
- C(f) && a(f.id) && f.legend?.length ? (p(), v("ul", {
2433
+ onInput: (b) => p(u.id, b)
2434
+ }, null, 40, ka)
2435
+ ])) : E("", !0),
2436
+ S(u) && l(u.id) && u.legend?.length ? (f(), h("ul", {
2557
2437
  key: 3,
2558
2438
  class: "layer-legend",
2559
- "aria-label": "Legend for " + s(f)
2439
+ "aria-label": "Legend for " + s(u)
2560
2440
  }, [
2561
- (p(!0), v(ie, null, re(f.legend, (L, z) => (p(), v("li", {
2562
- key: z,
2441
+ (f(!0), h(ie, null, se(u.legend, (b, I) => (f(), h("li", {
2442
+ key: I,
2563
2443
  class: "legend-item"
2564
2444
  }, [
2565
- L.type === "circle" ? (p(), v("span", {
2445
+ b.type === "circle" ? (f(), h("span", {
2566
2446
  key: 0,
2567
2447
  class: "legend-symbol legend-circle",
2568
- style: K({ backgroundColor: L.color }),
2448
+ style: J({ backgroundColor: b.color }),
2569
2449
  "aria-hidden": "true"
2570
- }, null, 4)) : L.type === "line" ? (p(), v("span", {
2450
+ }, null, 4)) : b.type === "line" ? (f(), h("span", {
2571
2451
  key: 1,
2572
2452
  class: "legend-symbol legend-line",
2573
- style: K({
2574
- backgroundColor: L.color,
2575
- height: `${L.width || 2}px`
2453
+ style: J({
2454
+ backgroundColor: b.color,
2455
+ height: `${b.width || 2}px`
2576
2456
  }),
2577
2457
  "aria-hidden": "true"
2578
- }, null, 4)) : L.type === "fill" ? (p(), v("span", {
2458
+ }, null, 4)) : b.type === "fill" ? (f(), h("span", {
2579
2459
  key: 2,
2580
2460
  class: "legend-symbol legend-fill",
2581
- style: K({ backgroundColor: L.color }),
2461
+ style: J({ backgroundColor: b.color }),
2582
2462
  "aria-hidden": "true"
2583
- }, null, 4)) : T("", !0),
2584
- _("span", An, U(L.label), 1)
2463
+ }, null, 4)) : E("", !0),
2464
+ P("span", $a, N(b.label), 1)
2585
2465
  ]))), 128))
2586
- ], 8, Zn)) : T("", !0)
2466
+ ], 8, xa)) : E("", !0)
2587
2467
  ]))), 128)),
2588
- e.layers.length === 0 ? (p(), v("div", Vn, "No layers available")) : T("", !0)
2589
- ], 8, xn));
2468
+ t.layers.length === 0 ? (f(), h("div", _a, "No layers available")) : E("", !0)
2469
+ ], 8, fa));
2590
2470
  }
2591
- }), ui = /* @__PURE__ */ Re(Nn, [["__scopeId", "data-v-55505629"]]), Un = ["aria-label"], Wn = ["name", "checked", "disabled", "onChange"], jn = { class: "layer-title" }, qn = {
2471
+ }), Ka = /* @__PURE__ */ De(Pa, [["__scopeId", "data-v-55505629"]]), Ma = ["aria-label"], Ta = ["name", "checked", "disabled", "onChange"], Fa = { class: "layer-title" }, Ea = {
2592
2472
  key: 0,
2593
2473
  class: "loading-indicator",
2594
2474
  role: "status"
2595
- }, Gn = ["aria-label"], Hn = {
2475
+ }, Oa = ["aria-label"], za = {
2596
2476
  key: 2,
2597
2477
  class: "zoom-indicator"
2598
- }, Jn = {
2478
+ }, Ia = {
2599
2479
  key: 0,
2600
2480
  class: "opacity-control"
2601
- }, Kn = ["for"], Qn = ["id", "value", "aria-label", "onInput"], Xn = ["aria-label"], Yn = { class: "legend-label" }, ei = {
2481
+ }, Ra = ["for"], Da = ["id", "value", "aria-label", "onInput"], Za = ["aria-label"], Ba = { class: "legend-label" }, Aa = {
2602
2482
  key: 0,
2603
2483
  class: "empty-state"
2604
- }, ti = /* @__PURE__ */ Ce({
2484
+ }, Na = /* @__PURE__ */ $e({
2605
2485
  __name: "LayerRadioButtonSet",
2606
2486
  props: {
2607
2487
  layers: {},
@@ -2616,320 +2496,320 @@ const un = { class: "layerboard-layout" }, dn = ["aria-expanded"], fn = {
2616
2496
  groupLabel: {}
2617
2497
  },
2618
2498
  emits: ["selectLayer", "setOpacity"],
2619
- setup(e, { emit: i }) {
2620
- const t = e, n = i;
2621
- function a(g) {
2622
- return t.visibleLayerIds.has(g);
2499
+ setup(t, { emit: i }) {
2500
+ const a = t, o = i;
2501
+ function l(p) {
2502
+ return a.visibleLayerIds.has(p);
2623
2503
  }
2624
- function l(g) {
2625
- return t.layerOpacities[g] ?? 1;
2504
+ function n(p) {
2505
+ return a.layerOpacities[p] ?? 1;
2626
2506
  }
2627
- function c(g) {
2628
- return t.loadingLayerIds.has(g);
2507
+ function y(p) {
2508
+ return a.loadingLayerIds.has(p);
2629
2509
  }
2630
- function w(g) {
2631
- return t.layerErrors[g] || null;
2510
+ function $(p) {
2511
+ return a.layerErrors[p] || null;
2632
2512
  }
2633
- function y(g) {
2634
- const h = t.currentZoom, u = g.minZoom, f = g.maxZoom;
2635
- return !(u !== void 0 && h < u || f !== void 0 && h > f);
2513
+ function m(p) {
2514
+ const g = a.currentZoom, c = p.minZoom, u = p.maxZoom;
2515
+ return !(c !== void 0 && g < c || u !== void 0 && g > u);
2636
2516
  }
2637
- function P(g) {
2638
- return t.showOpacity ? g.displayOptions?.shouldShowSlider !== !1 : !1;
2517
+ function M(p) {
2518
+ return a.showOpacity ? p.displayOptions?.shouldShowSlider !== !1 : !1;
2639
2519
  }
2640
- function b(g) {
2641
- return t.showLegend ? g.displayOptions?.shouldShowLegendBox !== !1 : !1;
2520
+ function L(p) {
2521
+ return a.showLegend ? p.displayOptions?.shouldShowLegendBox !== !1 : !1;
2642
2522
  }
2643
- function C(g) {
2644
- return g.displayOptions?.layerNameChange || g.title;
2523
+ function S(p) {
2524
+ return p.displayOptions?.layerNameChange || p.title;
2645
2525
  }
2646
- function s(g) {
2647
- const h = t.layers.filter((u) => t.visibleLayerIds.has(u.id) && u.id !== g).map((u) => u.id);
2648
- n("selectLayer", g, h);
2526
+ function s(p) {
2527
+ const g = a.layers.filter((c) => a.visibleLayerIds.has(c.id) && c.id !== p).map((c) => c.id);
2528
+ o("selectLayer", p, g);
2649
2529
  }
2650
- function k(g, h) {
2651
- const u = h.target;
2652
- n("setOpacity", g, parseFloat(u.value));
2530
+ function C(p, g) {
2531
+ const c = g.target;
2532
+ o("setOpacity", p, parseFloat(c.value));
2653
2533
  }
2654
- return (g, h) => (p(), v("div", {
2534
+ return (p, g) => (f(), h("div", {
2655
2535
  class: "layer-radio-set",
2656
2536
  role: "radiogroup",
2657
- "aria-label": e.groupLabel
2537
+ "aria-label": t.groupLabel
2658
2538
  }, [
2659
- (p(!0), v(ie, null, re(e.layers, (u) => (p(), v("div", {
2660
- key: u.id,
2539
+ (f(!0), h(ie, null, se(t.layers, (c) => (f(), h("div", {
2540
+ key: c.id,
2661
2541
  class: "layer-item"
2662
2542
  }, [
2663
- _("label", {
2664
- class: ae(["layer-radio", {
2665
- "layer-unavailable": !y(u),
2666
- "layer-error": w(u.id)
2543
+ P("label", {
2544
+ class: ne(["layer-radio", {
2545
+ "layer-unavailable": !m(c),
2546
+ "layer-error": $(c.id)
2667
2547
  }])
2668
2548
  }, [
2669
- _("input", {
2549
+ P("input", {
2670
2550
  type: "radio",
2671
- name: e.groupName,
2672
- checked: a(u.id),
2673
- disabled: !y(u),
2674
- onChange: (f) => s(u.id)
2675
- }, null, 40, Wn),
2676
- _("span", jn, [
2677
- be(U(C(u)) + " ", 1),
2678
- c(u.id) ? (p(), v("span", qn, " Loading... ")) : T("", !0),
2679
- w(u.id) ? (p(), v("span", {
2551
+ name: t.groupName,
2552
+ checked: l(c.id),
2553
+ disabled: !m(c),
2554
+ onChange: (u) => s(c.id)
2555
+ }, null, 40, Ta),
2556
+ P("span", Fa, [
2557
+ Le(N(S(c)) + " ", 1),
2558
+ y(c.id) ? (f(), h("span", Ea, " Loading... ")) : E("", !0),
2559
+ $(c.id) ? (f(), h("span", {
2680
2560
  key: 1,
2681
2561
  class: "error-indicator",
2682
- "aria-label": w(u.id) || "Error",
2562
+ "aria-label": $(c.id) || "Error",
2683
2563
  role: "status"
2684
- }, " Error ", 8, Gn)) : T("", !0),
2685
- y(u) ? T("", !0) : (p(), v("span", Hn, " (zoom in) "))
2564
+ }, " Error ", 8, Oa)) : E("", !0),
2565
+ m(c) ? E("", !0) : (f(), h("span", za, " (zoom in) "))
2686
2566
  ])
2687
2567
  ], 2),
2688
- P(u) && a(u.id) ? (p(), v("div", Jn, [
2689
- _("label", {
2568
+ M(c) && l(c.id) ? (f(), h("div", Ia, [
2569
+ P("label", {
2690
2570
  class: "opacity-label",
2691
- for: "opacity-" + u.id
2692
- }, " Opacity: " + U(Math.round(l(u.id) * 100)) + "% ", 9, Kn),
2693
- _("input", {
2694
- id: "opacity-" + u.id,
2571
+ for: "opacity-" + c.id
2572
+ }, " Opacity: " + N(Math.round(n(c.id) * 100)) + "% ", 9, Ra),
2573
+ P("input", {
2574
+ id: "opacity-" + c.id,
2695
2575
  type: "range",
2696
2576
  min: "0",
2697
2577
  max: "1",
2698
2578
  step: "0.05",
2699
- value: l(u.id),
2700
- "aria-label": "Opacity for " + C(u),
2579
+ value: n(c.id),
2580
+ "aria-label": "Opacity for " + S(c),
2701
2581
  class: "opacity-slider",
2702
- onInput: (f) => k(u.id, f)
2703
- }, null, 40, Qn)
2704
- ])) : T("", !0),
2705
- b(u) && a(u.id) && u.legend?.length ? (p(), v("ul", {
2582
+ onInput: (u) => C(c.id, u)
2583
+ }, null, 40, Da)
2584
+ ])) : E("", !0),
2585
+ L(c) && l(c.id) && c.legend?.length ? (f(), h("ul", {
2706
2586
  key: 1,
2707
2587
  class: "layer-legend",
2708
- "aria-label": "Legend for " + C(u)
2588
+ "aria-label": "Legend for " + S(c)
2709
2589
  }, [
2710
- (p(!0), v(ie, null, re(u.legend, (f, L) => (p(), v("li", {
2711
- key: L,
2590
+ (f(!0), h(ie, null, se(c.legend, (u, b) => (f(), h("li", {
2591
+ key: b,
2712
2592
  class: "legend-item"
2713
2593
  }, [
2714
- f.type === "circle" ? (p(), v("span", {
2594
+ u.type === "circle" ? (f(), h("span", {
2715
2595
  key: 0,
2716
2596
  class: "legend-symbol legend-circle",
2717
- style: K({ backgroundColor: f.color }),
2597
+ style: J({ backgroundColor: u.color }),
2718
2598
  "aria-hidden": "true"
2719
- }, null, 4)) : f.type === "line" ? (p(), v("span", {
2599
+ }, null, 4)) : u.type === "line" ? (f(), h("span", {
2720
2600
  key: 1,
2721
2601
  class: "legend-symbol legend-line",
2722
- style: K({
2723
- backgroundColor: f.color,
2724
- height: `${f.width || 2}px`
2602
+ style: J({
2603
+ backgroundColor: u.color,
2604
+ height: `${u.width || 2}px`
2725
2605
  }),
2726
2606
  "aria-hidden": "true"
2727
- }, null, 4)) : f.type === "fill" ? (p(), v("span", {
2607
+ }, null, 4)) : u.type === "fill" ? (f(), h("span", {
2728
2608
  key: 2,
2729
2609
  class: "legend-symbol legend-fill",
2730
- style: K({ backgroundColor: f.color }),
2610
+ style: J({ backgroundColor: u.color }),
2731
2611
  "aria-hidden": "true"
2732
- }, null, 4)) : T("", !0),
2733
- _("span", Yn, U(f.label), 1)
2612
+ }, null, 4)) : E("", !0),
2613
+ P("span", Ba, N(u.label), 1)
2734
2614
  ]))), 128))
2735
- ], 8, Xn)) : T("", !0)
2615
+ ], 8, Za)) : E("", !0)
2736
2616
  ]))), 128)),
2737
- e.layers.length === 0 ? (p(), v("div", ei, "No layers available")) : T("", !0)
2738
- ], 8, Un));
2617
+ t.layers.length === 0 ? (f(), h("div", Aa, "No layers available")) : E("", !0)
2618
+ ], 8, Ma));
2739
2619
  }
2740
- }), di = /* @__PURE__ */ Re(ti, [["__scopeId", "data-v-5e01b240"]]);
2741
- function fi(e) {
2742
- const i = $([]), t = $(/* @__PURE__ */ new Set()), n = $({}), a = $(/* @__PURE__ */ new Set()), l = $({}), c = $(""), w = $(!1), y = $(!1), P = $(null), b = I(() => {
2743
- if (!c.value.trim())
2620
+ }), Qa = /* @__PURE__ */ De(Na, [["__scopeId", "data-v-5e01b240"]]);
2621
+ function Xa(t) {
2622
+ const i = k([]), a = k(/* @__PURE__ */ new Set()), o = k({}), l = k(/* @__PURE__ */ new Set()), n = k({}), y = k(""), $ = k(!1), m = k(!1), M = k(null), L = z(() => {
2623
+ if (!y.value.trim())
2744
2624
  return i.value;
2745
- const F = c.value.toLowerCase();
2625
+ const F = y.value.toLowerCase();
2746
2626
  return i.value.filter((R) => R.title.toLowerCase().includes(F));
2747
- }), C = I(() => i.value.map((F) => ({
2627
+ }), S = z(() => i.value.map((F) => ({
2748
2628
  config: F,
2749
2629
  component: F.type
2750
2630
  // "circle", "fill", or "line"
2751
2631
  })));
2752
2632
  async function s() {
2753
- if (!y.value) {
2754
- w.value = !0, P.value = null;
2633
+ if (!m.value) {
2634
+ $.value = !0, M.value = null;
2755
2635
  try {
2756
2636
  let F;
2757
- e.mode === "dynamic" || !e.mode ? e.webMapId ? F = await k(e.webMapId) : F = await gt() : F = await gt(), i.value = F;
2637
+ t.mode === "dynamic" || !t.mode ? t.webMapId ? F = await C(t.webMapId) : F = await pt() : F = await pt(), i.value = F;
2758
2638
  const R = {};
2759
- F.forEach((A) => {
2760
- R[A.id] = A.opacity ?? 1;
2761
- }), n.value = R, y.value = !0;
2639
+ F.forEach((Z) => {
2640
+ R[Z.id] = Z.opacity ?? 1;
2641
+ }), o.value = R, m.value = !0;
2762
2642
  } catch (F) {
2763
- P.value = F instanceof Error ? F : new Error("Failed to initialize layerboard");
2643
+ M.value = F instanceof Error ? F : new Error("Failed to initialize layerboard");
2764
2644
  } finally {
2765
- w.value = !1;
2645
+ $.value = !1;
2766
2646
  }
2767
2647
  }
2768
2648
  }
2769
- async function k(F) {
2770
- const R = mt(F), A = await fetch(R, { cache: "no-store" });
2771
- if (!A.ok)
2772
- throw new Error(`Failed to fetch WebMap: ${A.status} ${A.statusText}`);
2773
- const de = await A.json();
2774
- return zt(de);
2649
+ async function C(F) {
2650
+ const R = gt(F), Z = await fetch(R, { cache: "no-store" });
2651
+ if (!Z.ok)
2652
+ throw new Error(`Failed to fetch WebMap: ${Z.status} ${Z.statusText}`);
2653
+ const pe = await Z.json();
2654
+ return Ft(pe);
2775
2655
  }
2776
- function g(F) {
2777
- const R = new Set(t.value);
2778
- R.has(F) ? R.delete(F) : R.add(F), t.value = R;
2656
+ function p(F) {
2657
+ const R = new Set(a.value);
2658
+ R.has(F) ? R.delete(F) : R.add(F), a.value = R;
2779
2659
  }
2780
- function h(F, R) {
2781
- n.value = {
2782
- ...n.value,
2660
+ function g(F, R) {
2661
+ o.value = {
2662
+ ...o.value,
2783
2663
  [F]: Math.max(0, Math.min(1, R))
2784
2664
  };
2785
2665
  }
2786
- function u(F) {
2787
- c.value = F;
2666
+ function c(F) {
2667
+ y.value = F;
2788
2668
  }
2789
- function f(F, R) {
2790
- const A = new Set(a.value);
2791
- R ? A.add(F) : A.delete(F), a.value = A;
2669
+ function u(F, R) {
2670
+ const Z = new Set(l.value);
2671
+ R ? Z.add(F) : Z.delete(F), l.value = Z;
2792
2672
  }
2793
- function L(F, R) {
2673
+ function b(F, R) {
2794
2674
  if (R)
2795
- l.value = { ...l.value, [F]: R };
2675
+ n.value = { ...n.value, [F]: R };
2796
2676
  else {
2797
- const A = { ...l.value };
2798
- delete A[F], l.value = A;
2677
+ const Z = { ...n.value };
2678
+ delete Z[F], n.value = Z;
2799
2679
  }
2800
2680
  }
2801
- function z() {
2802
- i.value = [], t.value = /* @__PURE__ */ new Set(), n.value = {}, a.value = /* @__PURE__ */ new Set(), l.value = {}, c.value = "", w.value = !1, y.value = !1, P.value = null;
2681
+ function I() {
2682
+ i.value = [], a.value = /* @__PURE__ */ new Set(), o.value = {}, l.value = /* @__PURE__ */ new Set(), n.value = {}, y.value = "", $.value = !1, m.value = !1, M.value = null;
2803
2683
  }
2804
2684
  return {
2805
2685
  // State (readonly)
2806
- layerConfigs: G(i),
2807
- visibleLayers: G(t),
2808
- layerOpacities: G(n),
2809
- loadingLayers: G(a),
2810
- layerErrors: G(l),
2811
- searchQuery: G(c),
2812
- isLoading: G(w),
2813
- isInitialized: G(y),
2814
- error: G(P),
2686
+ layerConfigs: j(i),
2687
+ visibleLayers: j(a),
2688
+ layerOpacities: j(o),
2689
+ loadingLayers: j(l),
2690
+ layerErrors: j(n),
2691
+ searchQuery: j(y),
2692
+ isLoading: j($),
2693
+ isInitialized: j(m),
2694
+ error: j(M),
2815
2695
  // Computed
2816
- filteredLayerConfigs: b,
2817
- layerList: C,
2696
+ filteredLayerConfigs: L,
2697
+ layerList: S,
2818
2698
  // Config
2819
- config: e,
2699
+ config: t,
2820
2700
  // Methods
2821
2701
  initialize: s,
2822
- toggleLayer: g,
2823
- setLayerOpacity: h,
2824
- filterLayers: u,
2825
- setLayerLoading: f,
2826
- setLayerError: L,
2827
- reset: z
2702
+ toggleLayer: p,
2703
+ setLayerOpacity: g,
2704
+ filterLayers: c,
2705
+ setLayerLoading: u,
2706
+ setLayerError: b,
2707
+ reset: I
2828
2708
  };
2829
2709
  }
2830
- function pi() {
2831
- const e = $([]), i = $(/* @__PURE__ */ new Set()), t = $(/* @__PURE__ */ new Set());
2832
- function n(l) {
2833
- i.value.has(l) ? i.value.delete(l) : i.value.add(l);
2710
+ function Ya() {
2711
+ const t = k([]), i = k(/* @__PURE__ */ new Set()), a = k(/* @__PURE__ */ new Set());
2712
+ function o(n) {
2713
+ i.value.has(n) ? i.value.delete(n) : i.value.add(n);
2834
2714
  }
2835
- function a(l) {
2836
- e.value = l;
2715
+ function l(n) {
2716
+ t.value = n;
2837
2717
  }
2838
2718
  return {
2839
- layers: I(() => e.value),
2840
- visibleLayerIds: I(() => i.value),
2841
- loadingLayerIds: I(() => t.value),
2842
- toggleLayer: n,
2843
- setLayers: a
2719
+ layers: z(() => t.value),
2720
+ visibleLayerIds: z(() => i.value),
2721
+ loadingLayerIds: z(() => a.value),
2722
+ toggleLayer: o,
2723
+ setLayers: l
2844
2724
  };
2845
2725
  }
2846
- function oi(e) {
2847
- const i = $(null), t = $(!1), n = $(null), a = $(0);
2848
- async function l(y = {}) {
2849
- t.value = !0, n.value = null;
2850
- const P = e.pageSize || 2e3;
2851
- let b = 0, C = [], s = !0;
2726
+ function Va(t) {
2727
+ const i = k(null), a = k(!1), o = k(null), l = k(0);
2728
+ async function n(m = {}) {
2729
+ a.value = !0, o.value = null;
2730
+ const M = t.pageSize || 2e3;
2731
+ let L = 0, S = [], s = !0;
2852
2732
  try {
2853
2733
  for (; s; ) {
2854
- const g = e.url.replace(/\/$/, ""), h = encodeURIComponent(y.where || e.where || "1=1");
2855
- let u = `${g}/query?where=${h}&outFields=*&returnGeometry=true&resultRecordCount=${P}&resultOffset=${b}&f=geojson`;
2856
- if (y.bounds) {
2857
- const z = JSON.stringify({
2858
- xmin: y.bounds.west,
2859
- ymin: y.bounds.south,
2860
- xmax: y.bounds.east,
2861
- ymax: y.bounds.north,
2734
+ const p = t.url.replace(/\/$/, ""), g = encodeURIComponent(m.where || t.where || "1=1");
2735
+ let c = `${p}/query?where=${g}&outFields=*&returnGeometry=true&resultRecordCount=${M}&resultOffset=${L}&f=geojson`;
2736
+ if (m.bounds) {
2737
+ const I = JSON.stringify({
2738
+ xmin: m.bounds.west,
2739
+ ymin: m.bounds.south,
2740
+ xmax: m.bounds.east,
2741
+ ymax: m.bounds.north,
2862
2742
  spatialReference: { wkid: 4326 }
2863
2743
  });
2864
- u += `&geometry=${encodeURIComponent(z)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
2744
+ c += `&geometry=${encodeURIComponent(I)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
2865
2745
  }
2866
- const f = await fetch(u);
2867
- if (!f.ok)
2868
- throw new Error(`HTTP ${f.status}: ${f.statusText}`);
2869
- const L = await f.json();
2870
- L.features && L.features.length > 0 ? (C = C.concat(L.features), b += L.features.length, s = L.features.length === P) : s = !1;
2746
+ const u = await fetch(c);
2747
+ if (!u.ok)
2748
+ throw new Error(`HTTP ${u.status}: ${u.statusText}`);
2749
+ const b = await u.json();
2750
+ b.features && b.features.length > 0 ? (S = S.concat(b.features), L += b.features.length, s = b.features.length === M) : s = !1;
2871
2751
  }
2872
- const k = {
2752
+ const C = {
2873
2753
  type: "FeatureCollection",
2874
- features: C
2754
+ features: S
2875
2755
  };
2876
- return i.value = k, a.value = C.length, k;
2877
- } catch (k) {
2878
- const g = k instanceof Error ? k : new Error("Failed to fetch features");
2879
- throw n.value = g, g;
2756
+ return i.value = C, l.value = S.length, C;
2757
+ } catch (C) {
2758
+ const p = C instanceof Error ? C : new Error("Failed to fetch features");
2759
+ throw o.value = p, p;
2880
2760
  } finally {
2881
- t.value = !1;
2761
+ a.value = !1;
2882
2762
  }
2883
2763
  }
2884
- function c() {
2885
- i.value = null, a.value = 0, n.value = null;
2764
+ function y() {
2765
+ i.value = null, l.value = 0, o.value = null;
2886
2766
  }
2887
- async function w(y = {}) {
2888
- return l(y);
2767
+ async function $(m = {}) {
2768
+ return n(m);
2889
2769
  }
2890
2770
  return {
2891
2771
  // State (readonly)
2892
- data: G(i),
2893
- isLoading: G(t),
2894
- error: G(n),
2895
- totalFeatures: G(a),
2772
+ data: j(i),
2773
+ isLoading: j(a),
2774
+ error: j(o),
2775
+ totalFeatures: j(l),
2896
2776
  // Config
2897
- config: e,
2777
+ config: t,
2898
2778
  // Methods
2899
- fetch: l,
2900
- refetch: w,
2901
- clear: c
2779
+ fetch: n,
2780
+ refetch: $,
2781
+ clear: y
2902
2782
  };
2903
2783
  }
2904
- function yi(e, i, t) {
2905
- const n = oi(e);
2906
- return ze(
2784
+ function ei(t, i, a) {
2785
+ const o = Va(t);
2786
+ return Re(
2907
2787
  i,
2908
- async (a) => {
2909
- if (a) {
2910
- const l = t(a);
2911
- await n.fetch(l);
2788
+ async (l) => {
2789
+ if (l) {
2790
+ const n = a(l);
2791
+ await o.fetch(n);
2912
2792
  }
2913
2793
  },
2914
2794
  { immediate: !0 }
2915
- ), n;
2795
+ ), o;
2916
2796
  }
2917
2797
  export {
2918
- ui as LayerCheckboxSet,
2919
- jo as LayerPanel,
2920
- di as LayerRadioButtonSet,
2921
- si as Layerboard,
2922
- lo as MapPanel,
2923
- ci as TopicAccordion,
2924
- li as WEBMAP_ID,
2925
- mt as buildWebMapUrl,
2926
- an as clearCache,
2927
- gt as getLayerConfigs,
2928
- ri as getWebMapUrl,
2929
- zt as transformWebMapToLayerConfigs,
2930
- cn as useApiDataSources,
2931
- oi as useDataSource,
2932
- pi as useLayerConfig,
2933
- fi as useLayerboard,
2934
- yi as useReactiveDataSource
2798
+ Ka as LayerCheckboxSet,
2799
+ Eo as LayerPanel,
2800
+ Qa as LayerRadioButtonSet,
2801
+ Ha as Layerboard,
2802
+ Gt as MapPanel,
2803
+ Ja as TopicAccordion,
2804
+ qa as WEBMAP_ID,
2805
+ gt as buildWebMapUrl,
2806
+ jo as clearCache,
2807
+ pt as getLayerConfigs,
2808
+ Ga as getWebMapUrl,
2809
+ Ft as transformWebMapToLayerConfigs,
2810
+ Jo as useApiDataSources,
2811
+ Va as useDataSource,
2812
+ Ya as useLayerConfig,
2813
+ Xa as useLayerboard,
2814
+ ei as useReactiveDataSource
2935
2815
  };