@phila/layerboard 3.0.0-beta.26 → 3.0.0-beta.28

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