@phila/layerboard 3.0.0-beta.0 → 3.0.0-beta.2

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