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