@phila/layerboard 3.0.0-beta.13 → 3.0.0-beta.14

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