@phila/layerboard 3.0.0-beta.37 → 3.0.0-beta.38
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/components/Layerboard.vue.d.ts +6 -0
- package/dist/composables/useLayerConfig.d.ts +2 -0
- package/dist/composables/useLayerboard.d.ts +8 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +393 -381
- package/dist/layerboard.css +1 -1
- package/dist/types/layer.d.ts +3 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 J, unref as p, withCtx as He, createBlock as G, createCommentVNode as A, Fragment as ue, renderList as Le, useAttrs as Kt, toRef as Qt, normalizeClass as ne, createElementVNode as P, toDisplayString as H, renderSlot as he, withDirectives as Zt, mergeProps as vt, vModelDynamic as Xt, createTextVNode as $e, normalizeProps as Pt, guardReactiveProps as Ft, normalizeStyle as ye, withModifiers as Yt, readonly as q, provide as N, onBeforeUnmount as eo, useId as Tt, resolveComponent as to, vShow as oo } from "vue";
|
|
2
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
3
|
import { cn as bt, Icon as ke, BaseLink as ro, ActionContent as zt } from "@phila/phila-ui-core";
|
|
4
4
|
const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
@@ -24,21 +24,21 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["zoom", "layerLoading", "layerError"],
|
|
26
26
|
setup(e, { emit: a }) {
|
|
27
|
-
const l = e, o = a, r = x(null), n = x(null),
|
|
27
|
+
const l = e, o = a, r = x(null), n = x(null), c = x(0);
|
|
28
28
|
function w(t) {
|
|
29
|
-
o("zoom", t), n.value && (
|
|
29
|
+
o("zoom", t), n.value && (c.value = f(n.value));
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
const
|
|
33
|
-
return k * Math.cos(I) / Math.pow(2,
|
|
31
|
+
function f(t) {
|
|
32
|
+
const u = t.getZoom(), b = t.getCenter().lat, k = 559082264028e-3, I = b * Math.PI / 180;
|
|
33
|
+
return k * Math.cos(I) / Math.pow(2, u);
|
|
34
34
|
}
|
|
35
35
|
const S = x({}), y = x(null), m = x(/* @__PURE__ */ new Set());
|
|
36
|
-
async function i(t,
|
|
36
|
+
async function i(t, u, s, b, k) {
|
|
37
37
|
const I = encodeURIComponent(b || "1=1"), B = JSON.stringify({
|
|
38
|
-
xmin:
|
|
39
|
-
ymin:
|
|
40
|
-
xmax:
|
|
41
|
-
ymax:
|
|
38
|
+
xmin: u.west,
|
|
39
|
+
ymin: u.south,
|
|
40
|
+
xmax: u.east,
|
|
41
|
+
ymax: u.north,
|
|
42
42
|
spatialReference: { wkid: 4326 }
|
|
43
43
|
}), Y = k !== void 0 && k < 14 ? `&maxAllowableOffset=${360 / (Math.pow(2, k) * 512)}` : "", X = 2e3;
|
|
44
44
|
let pe = 0, we = [], se = !0;
|
|
@@ -46,14 +46,14 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
46
46
|
const te = `${t}/query?where=${I}&geometry=${encodeURIComponent(B)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${X}&resultOffset=${pe}${Y}&f=geojson`, R = await fetch(te);
|
|
47
47
|
if (!R.ok)
|
|
48
48
|
throw new Error(`HTTP ${R.status}: ${R.statusText}`);
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
const j = await R.json();
|
|
50
|
+
j.features && j.features.length > 0 ? (we = we.concat(j.features), pe += j.features.length, se = j.features.length === X) : se = !1;
|
|
51
51
|
}
|
|
52
52
|
return we = we.map((te) => {
|
|
53
53
|
if (te.properties) {
|
|
54
54
|
const R = {};
|
|
55
|
-
for (const
|
|
56
|
-
R[
|
|
55
|
+
for (const j of Object.keys(te.properties))
|
|
56
|
+
R[j.toLowerCase()] = te.properties[j];
|
|
57
57
|
return { ...te, properties: R };
|
|
58
58
|
}
|
|
59
59
|
return te;
|
|
@@ -62,8 +62,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
62
62
|
features: we
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
async function g(t,
|
|
66
|
-
const b =
|
|
65
|
+
async function g(t, u, s) {
|
|
66
|
+
const b = u.map(async (k) => {
|
|
67
67
|
const I = l.layerList.find((B) => B.config.id === k)?.config;
|
|
68
68
|
if (I) {
|
|
69
69
|
o("layerLoading", k, !0);
|
|
@@ -81,37 +81,37 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
81
81
|
await Promise.all(b);
|
|
82
82
|
}
|
|
83
83
|
function d(t) {
|
|
84
|
-
const
|
|
84
|
+
const u = new Set(t);
|
|
85
85
|
for (const s of l.layerList)
|
|
86
|
-
s.config.parentId &&
|
|
87
|
-
return [...
|
|
86
|
+
s.config.parentId && u.has(s.config.parentId) && u.add(s.config.id);
|
|
87
|
+
return [...u];
|
|
88
88
|
}
|
|
89
|
-
async function L(t,
|
|
89
|
+
async function L(t, u) {
|
|
90
90
|
const s = d([...l.visibleLayers]);
|
|
91
|
-
await g(t, s,
|
|
91
|
+
await g(t, s, u);
|
|
92
92
|
}
|
|
93
93
|
function C(t) {
|
|
94
94
|
y.value = t.bounds, L(t.bounds, t.zoom);
|
|
95
95
|
}
|
|
96
96
|
function E(t) {
|
|
97
97
|
n.value = t;
|
|
98
|
-
const
|
|
98
|
+
const u = t.getBounds();
|
|
99
99
|
y.value = {
|
|
100
|
-
west:
|
|
101
|
-
south:
|
|
102
|
-
east:
|
|
103
|
-
north:
|
|
100
|
+
west: u.getWest(),
|
|
101
|
+
south: u.getSouth(),
|
|
102
|
+
east: u.getEast(),
|
|
103
|
+
north: u.getNorth()
|
|
104
104
|
};
|
|
105
105
|
const s = t.getZoom();
|
|
106
|
-
o("zoom", s),
|
|
106
|
+
o("zoom", s), c.value = f(t), L(y.value, s);
|
|
107
107
|
}
|
|
108
108
|
Oe(
|
|
109
109
|
() => l.visibleLayers,
|
|
110
110
|
async () => {
|
|
111
111
|
if (re.value.length > 0 && Ie(), y.value) {
|
|
112
|
-
const t = new Set(l.visibleLayers),
|
|
112
|
+
const t = new Set(l.visibleLayers), u = [...t].filter((b) => !m.value.has(b));
|
|
113
113
|
m.value = new Set(t);
|
|
114
|
-
const s = d(
|
|
114
|
+
const s = d(u);
|
|
115
115
|
if (s.length > 0) {
|
|
116
116
|
const b = n.value?.getZoom();
|
|
117
117
|
await g(y.value, s, b);
|
|
@@ -121,8 +121,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
121
121
|
);
|
|
122
122
|
function F(t) {
|
|
123
123
|
if (l.visibleLayers.has(t)) return !0;
|
|
124
|
-
const
|
|
125
|
-
return !!
|
|
124
|
+
const u = l.layerList.find((s) => s.config.id === t)?.config;
|
|
125
|
+
return !!u?.parentId && l.visibleLayers.has(u.parentId);
|
|
126
126
|
}
|
|
127
127
|
function V(t) {
|
|
128
128
|
return !!S.value[t.id];
|
|
@@ -141,12 +141,12 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
141
141
|
Oe(ee, async (t) => {
|
|
142
142
|
if (t.length < 2) return;
|
|
143
143
|
await Ne();
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
144
|
+
const u = n.value;
|
|
145
|
+
if (u)
|
|
146
146
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
147
147
|
const b = s < t.length - 1 ? t[s + 1].id : "highlight-lines";
|
|
148
148
|
try {
|
|
149
|
-
|
|
149
|
+
u.getLayer(t[s].id) && u.moveLayer(t[s].id, b);
|
|
150
150
|
} catch {
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -173,7 +173,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
173
173
|
if (!Qe.value.has(t.id)) {
|
|
174
174
|
Qe.value.add(t.id);
|
|
175
175
|
try {
|
|
176
|
-
const
|
|
176
|
+
const u = t.url.replace(/\/$/, ""), s = await fetch(`${u}?f=json`);
|
|
177
177
|
if (!s.ok)
|
|
178
178
|
return;
|
|
179
179
|
const b = await s.json(), k = b.minScale || 0;
|
|
@@ -197,11 +197,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
197
197
|
function Xe(t) {
|
|
198
198
|
if (!t.scaleBasedRendering)
|
|
199
199
|
return "tiled";
|
|
200
|
-
const
|
|
201
|
-
if (!
|
|
200
|
+
const u = Ue.value[t.id];
|
|
201
|
+
if (!u)
|
|
202
202
|
return "tiled";
|
|
203
|
-
const s =
|
|
204
|
-
return s === 0 || s >
|
|
203
|
+
const s = c.value;
|
|
204
|
+
return s === 0 || s > u.maxScale ? "tiled" : "dynamic";
|
|
205
205
|
}
|
|
206
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
207
|
function je(t) {
|
|
@@ -212,24 +212,24 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
212
212
|
attribution: t.attribution || ""
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Pe(t) {
|
|
216
216
|
return { type: "geojson", data: S.value[t.id], tolerance: 0 };
|
|
217
217
|
}
|
|
218
218
|
function Fe(t) {
|
|
219
219
|
return l.layerOpacities[t] ?? 1;
|
|
220
220
|
}
|
|
221
221
|
function qe(t) {
|
|
222
|
-
const
|
|
222
|
+
const u = 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
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
226
|
if (B && Y) {
|
|
227
|
-
if (
|
|
227
|
+
if (u === 1)
|
|
228
228
|
return k;
|
|
229
229
|
{
|
|
230
230
|
const X = I.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
|
|
231
231
|
if (X && X[4]) {
|
|
232
|
-
const [, pe, we, se, te] = X, R = parseFloat(te) *
|
|
232
|
+
const [, pe, we, se, te] = X, R = parseFloat(te) * u;
|
|
233
233
|
k[b] = `rgba(${pe}, ${we}, ${se}, ${R})`, k[s] = 1;
|
|
234
234
|
}
|
|
235
235
|
return k;
|
|
@@ -242,33 +242,33 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
242
242
|
k[b] = `rgb(${pe}, ${we}, ${se})`;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
return k[s] =
|
|
245
|
+
return k[s] = u, k;
|
|
246
246
|
}
|
|
247
247
|
function dt(t) {
|
|
248
|
-
const
|
|
249
|
-
return { ...t.outlinePaint, "line-opacity":
|
|
248
|
+
const u = Fe(t.id);
|
|
249
|
+
return { ...t.outlinePaint, "line-opacity": u };
|
|
250
250
|
}
|
|
251
251
|
const re = x([]), Te = x(null), oe = x(0);
|
|
252
252
|
function _e(t) {
|
|
253
|
-
const
|
|
254
|
-
return l.layerList.find((b) => b.config.id ===
|
|
253
|
+
const u = t.replace(/-outline$/, "");
|
|
254
|
+
return l.layerList.find((b) => b.config.id === u)?.config;
|
|
255
255
|
}
|
|
256
|
-
function Ye(t,
|
|
256
|
+
function Ye(t, u) {
|
|
257
257
|
return t.replace(/\{([^}]+)\}/g, (s, b) => {
|
|
258
|
-
const k =
|
|
258
|
+
const k = u[b];
|
|
259
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 Ge(t,
|
|
265
|
+
function Ge(t, u, s) {
|
|
266
266
|
if (t == null) return "-";
|
|
267
|
-
if (
|
|
267
|
+
if (u?.dateFormat && typeof t == "number") {
|
|
268
268
|
const b = new Date(t);
|
|
269
|
-
if (s &&
|
|
269
|
+
if (s && u.dateFormat === "shortDateShortTime")
|
|
270
270
|
return b.toLocaleString(void 0, { dateStyle: "short", timeStyle: "short" });
|
|
271
|
-
switch (
|
|
271
|
+
switch (u.dateFormat) {
|
|
272
272
|
case "shortDateShortTime":
|
|
273
273
|
return b.toLocaleDateString();
|
|
274
274
|
case "longMonthDayYear":
|
|
@@ -282,9 +282,9 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
if (typeof t == "number") {
|
|
285
|
-
if (t > 1e12 && !
|
|
285
|
+
if (t > 1e12 && !u)
|
|
286
286
|
return new Date(t).toLocaleDateString();
|
|
287
|
-
const b =
|
|
287
|
+
const b = u?.places, k = u?.digitSeparator ?? !0;
|
|
288
288
|
if (b !== void 0) {
|
|
289
289
|
if (Number.isInteger(t) && b >= 0)
|
|
290
290
|
return String(t);
|
|
@@ -300,16 +300,16 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
300
300
|
return String(t);
|
|
301
301
|
}
|
|
302
302
|
function et(t) {
|
|
303
|
-
const
|
|
303
|
+
const u = /* @__PURE__ */ new Set();
|
|
304
304
|
return t.filter((s) => {
|
|
305
305
|
const k = `${s.layer.id.replace(/-outline$/, "")}:${JSON.stringify(s.properties)}`;
|
|
306
|
-
return
|
|
306
|
+
return u.has(k) ? !1 : (u.add(k), !0);
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
|
-
function Se(t,
|
|
309
|
+
function Se(t, u) {
|
|
310
310
|
const s = S.value[t];
|
|
311
311
|
if (!s?.features) return null;
|
|
312
|
-
const b =
|
|
312
|
+
const b = u.objectid ?? u.OBJECTID ?? u.FID;
|
|
313
313
|
if (b != null) {
|
|
314
314
|
const k = s.features.find(
|
|
315
315
|
(I) => (I.properties?.objectid ?? I.properties?.OBJECTID ?? I.properties?.FID) === b
|
|
@@ -318,9 +318,9 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
318
318
|
}
|
|
319
319
|
return null;
|
|
320
320
|
}
|
|
321
|
-
function ft(t,
|
|
321
|
+
function ft(t, u) {
|
|
322
322
|
const s = /* @__PURE__ */ new Map();
|
|
323
|
-
return
|
|
323
|
+
return u.forEach((b, k) => {
|
|
324
324
|
s.set(b.id, k);
|
|
325
325
|
}), t.sort((b, k) => {
|
|
326
326
|
const I = b.layer.id.replace(/-outline$/, ""), B = k.layer.id.replace(/-outline$/, ""), Y = s.get(I) ?? -1;
|
|
@@ -328,24 +328,24 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
function ae(t) {
|
|
331
|
-
const
|
|
332
|
-
if (!
|
|
331
|
+
const u = n.value;
|
|
332
|
+
if (!u) return;
|
|
333
333
|
const s = [];
|
|
334
334
|
l.layerList.forEach((R) => {
|
|
335
|
-
const
|
|
336
|
-
F(
|
|
335
|
+
const j = R.config;
|
|
336
|
+
F(j.id) && (s.push(j.id), j.outlinePaint && s.push(`${j.id}-outline`));
|
|
337
337
|
});
|
|
338
|
-
const b = s.filter((R) =>
|
|
338
|
+
const b = s.filter((R) => u.getLayer(R));
|
|
339
339
|
if (b.length === 0) return;
|
|
340
|
-
const k =
|
|
340
|
+
const k = u.project([t.lngLat.lng, t.lngLat.lat]), I = 10, B = [
|
|
341
341
|
[k.x - I, k.y - I],
|
|
342
342
|
[k.x + I, k.y + I]
|
|
343
|
-
], Y =
|
|
343
|
+
], Y = u.queryRenderedFeatures(B, {
|
|
344
344
|
layers: b
|
|
345
345
|
});
|
|
346
346
|
if (Y.length === 0) return;
|
|
347
347
|
const X = et(Y), pe = l.layerList.map((R) => R.config), se = ft(X, pe).map((R) => {
|
|
348
|
-
const
|
|
348
|
+
const j = R.layer.id.replace(/-outline$/, ""), ce = _e(j);
|
|
349
349
|
if (!ce) return null;
|
|
350
350
|
const yt = Se(ce.id, R.properties || {});
|
|
351
351
|
return {
|
|
@@ -357,10 +357,10 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
357
357
|
};
|
|
358
358
|
}).filter((R) => R !== null);
|
|
359
359
|
if (se.length === 0) return;
|
|
360
|
-
se.sort((R,
|
|
361
|
-
const ce = R.popupConfig?.popupSortField, yt =
|
|
360
|
+
se.sort((R, j) => {
|
|
361
|
+
const ce = R.popupConfig?.popupSortField, yt = j.popupConfig?.popupSortField;
|
|
362
362
|
if (!ce || ce !== yt) return 0;
|
|
363
|
-
const ht = R.properties[ce], mt =
|
|
363
|
+
const ht = R.properties[ce], mt = j.properties[ce];
|
|
364
364
|
if (ht == null || mt == null) return 0;
|
|
365
365
|
const Mt = R.popupConfig?.popupSortOrder !== "asc";
|
|
366
366
|
return ht < mt ? Mt ? 1 : -1 : ht > mt ? Mt ? -1 : 1 : 0;
|
|
@@ -369,10 +369,10 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
369
369
|
if (te) {
|
|
370
370
|
const R = _e(te.layerId);
|
|
371
371
|
if (R) {
|
|
372
|
-
const
|
|
372
|
+
const j = K(te.geometry), ce = Z(R.id, R.type);
|
|
373
373
|
$.value = {
|
|
374
374
|
geometry: te.geometry,
|
|
375
|
-
geometryType:
|
|
375
|
+
geometryType: j,
|
|
376
376
|
layerId: R.id,
|
|
377
377
|
properties: te.properties,
|
|
378
378
|
originalStyle: ce
|
|
@@ -385,8 +385,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
385
385
|
}
|
|
386
386
|
function Ee(t) {
|
|
387
387
|
if (re.value.length === 0) return;
|
|
388
|
-
const
|
|
389
|
-
if (!(
|
|
388
|
+
const u = t.target;
|
|
389
|
+
if (!(u.tagName === "INPUT" || u.tagName === "TEXTAREA" || u.isContentEditable))
|
|
390
390
|
switch (t.key) {
|
|
391
391
|
case "ArrowLeft":
|
|
392
392
|
case "ArrowUp":
|
|
@@ -419,16 +419,16 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
419
419
|
}), Ae = _(() => {
|
|
420
420
|
const t = ie.value;
|
|
421
421
|
if (!t) return "";
|
|
422
|
-
let
|
|
423
|
-
if (
|
|
424
|
-
|
|
422
|
+
let u = '<div class="popup-content">';
|
|
423
|
+
if (u += `<h3 class="popup-title">${be(Re.value)}</h3>`, t.popupConfig?.fields?.length) {
|
|
424
|
+
u += `<table class="popup-table" aria-label="${be(Re.value)}">`;
|
|
425
425
|
for (const s of t.popupConfig.fields) {
|
|
426
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}`, X = B ? `<a href="${be(Y)}" target="_blank" rel="noopener noreferrer">${be(b)}</a>` : be(b);
|
|
427
|
-
|
|
427
|
+
u += `<tr><th scope="row">${be(s.label)}</th><td>${X}</td></tr>`;
|
|
428
428
|
}
|
|
429
|
-
|
|
429
|
+
u += "</table>";
|
|
430
430
|
}
|
|
431
|
-
return
|
|
431
|
+
return u += "</div>", u;
|
|
432
432
|
}), le = x({
|
|
433
433
|
type: "FeatureCollection",
|
|
434
434
|
features: []
|
|
@@ -455,15 +455,15 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
455
455
|
function K(t) {
|
|
456
456
|
return t.type;
|
|
457
457
|
}
|
|
458
|
-
function Z(t,
|
|
458
|
+
function Z(t, u) {
|
|
459
459
|
const s = _e(t);
|
|
460
460
|
if (!s) return { radius: 5, width: 2 };
|
|
461
461
|
const b = s.paint || {};
|
|
462
|
-
if (
|
|
462
|
+
if (u === "circle") {
|
|
463
463
|
const k = b["circle-radius"];
|
|
464
464
|
return typeof k == "number" ? { radius: k } : { radius: 5 };
|
|
465
465
|
}
|
|
466
|
-
if (
|
|
466
|
+
if (u === "line" || u === "fill") {
|
|
467
467
|
const k = b["line-width"];
|
|
468
468
|
if (typeof k == "number")
|
|
469
469
|
return { width: k };
|
|
@@ -480,7 +480,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
480
480
|
return !t || t.length === 0 ? [] : t[0] ?? [];
|
|
481
481
|
}
|
|
482
482
|
function Ce(t) {
|
|
483
|
-
const { geometry:
|
|
483
|
+
const { geometry: u, geometryType: s, originalStyle: b } = t;
|
|
484
484
|
if (s === "Point" || s === "MultiPoint") {
|
|
485
485
|
const I = (b.radius || 5) + 3;
|
|
486
486
|
return {
|
|
@@ -488,7 +488,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
488
488
|
features: [
|
|
489
489
|
{
|
|
490
490
|
type: "Feature",
|
|
491
|
-
geometry:
|
|
491
|
+
geometry: u,
|
|
492
492
|
properties: {
|
|
493
493
|
highlightRadius: I
|
|
494
494
|
}
|
|
@@ -503,7 +503,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
503
503
|
features: [
|
|
504
504
|
{
|
|
505
505
|
type: "Feature",
|
|
506
|
-
geometry:
|
|
506
|
+
geometry: u,
|
|
507
507
|
properties: {
|
|
508
508
|
highlightWidth: I
|
|
509
509
|
}
|
|
@@ -512,7 +512,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
if (s === "Polygon") {
|
|
515
|
-
const k =
|
|
515
|
+
const k = u.coordinates, I = Q(k), Y = (b.width || 2) + 3;
|
|
516
516
|
return {
|
|
517
517
|
type: "FeatureCollection",
|
|
518
518
|
features: [
|
|
@@ -530,7 +530,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
532
|
if (s === "MultiPolygon") {
|
|
533
|
-
const k =
|
|
533
|
+
const k = u.coordinates, B = (b.width || 2) + 3;
|
|
534
534
|
return {
|
|
535
535
|
type: "FeatureCollection",
|
|
536
536
|
features: k.map((X) => ({
|
|
@@ -551,10 +551,10 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
function Ze(t) {
|
|
554
|
-
const { geometry:
|
|
554
|
+
const { geometry: u, geometryType: s } = t;
|
|
555
555
|
return s === "Polygon" || s === "MultiPolygon" ? {
|
|
556
556
|
type: "FeatureCollection",
|
|
557
|
-
features: [{ type: "Feature", geometry:
|
|
557
|
+
features: [{ type: "Feature", geometry: u, properties: {} }]
|
|
558
558
|
} : { type: "FeatureCollection", features: [] };
|
|
559
559
|
}
|
|
560
560
|
function Gt(t) {
|
|
@@ -562,8 +562,8 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
562
562
|
Ht();
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
|
-
const
|
|
566
|
-
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (le.value =
|
|
565
|
+
const u = Ce(t);
|
|
566
|
+
t.geometryType === "Point" || t.geometryType === "MultiPoint" ? (le.value = u, Be.value = { type: "FeatureCollection", features: [] }, Ve.value = { type: "FeatureCollection", features: [] }) : (Be.value = u, le.value = { type: "FeatureCollection", features: [] }, Ve.value = Ze(t));
|
|
567
567
|
}
|
|
568
568
|
function Ht() {
|
|
569
569
|
le.value = { type: "FeatureCollection", features: [] }, Be.value = { type: "FeatureCollection", features: [] }, Ve.value = { type: "FeatureCollection", features: [] };
|
|
@@ -582,13 +582,13 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
582
582
|
$.value = null;
|
|
583
583
|
return;
|
|
584
584
|
}
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
const s = K(t.geometry), b = Z(
|
|
585
|
+
const u = _e(t.layerId);
|
|
586
|
+
if (u) {
|
|
587
|
+
const s = K(t.geometry), b = Z(u.id, u.type);
|
|
588
588
|
$.value = {
|
|
589
589
|
geometry: t.geometry,
|
|
590
590
|
geometryType: s,
|
|
591
|
-
layerId:
|
|
591
|
+
layerId: u.id,
|
|
592
592
|
properties: t.properties,
|
|
593
593
|
originalStyle: b
|
|
594
594
|
};
|
|
@@ -596,11 +596,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
596
596
|
});
|
|
597
597
|
const $t = x(null);
|
|
598
598
|
function Jt(t) {
|
|
599
|
-
const [
|
|
600
|
-
$t.value = [
|
|
599
|
+
const [u, s] = t.geometry.coordinates;
|
|
600
|
+
$t.value = [u, s];
|
|
601
601
|
}
|
|
602
|
-
return (t,
|
|
603
|
-
|
|
602
|
+
return (t, u) => (h(), M("div", so, [
|
|
603
|
+
J(p(ao), {
|
|
604
604
|
ref_key: "mapRef",
|
|
605
605
|
ref: r,
|
|
606
606
|
zoom: l.initialZoom,
|
|
@@ -624,11 +624,11 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
624
624
|
onSearchResult: Jt
|
|
625
625
|
}, {
|
|
626
626
|
default: He(() => [
|
|
627
|
-
l.drawControlPosition !== null ? (h(),
|
|
627
|
+
l.drawControlPosition !== null ? (h(), G(p(io), {
|
|
628
628
|
key: 0,
|
|
629
629
|
position: l.drawControlPosition
|
|
630
630
|
}, null, 8, ["position"])) : A("", !0),
|
|
631
|
-
(h(!0), M(ue, null, Le(ut.value, (s) => (h(),
|
|
631
|
+
(h(!0), M(ue, null, Le(ut.value, (s) => (h(), G(p(It), {
|
|
632
632
|
id: "tiled-" + s.id,
|
|
633
633
|
key: "tiled-" + s.id,
|
|
634
634
|
source: ct(s),
|
|
@@ -637,7 +637,7 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
637
637
|
maxzoom: s.maxZoom,
|
|
638
638
|
"before-id": "highlight-circles"
|
|
639
639
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
640
|
-
(h(!0), M(ue, null, Le(De.value, (s) => (h(),
|
|
640
|
+
(h(!0), M(ue, null, Le(De.value, (s) => (h(), G(p(It), {
|
|
641
641
|
id: "dynamic-" + s.id,
|
|
642
642
|
key: "dynamic-" + s.id,
|
|
643
643
|
source: je(s),
|
|
@@ -646,69 +646,69 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
646
646
|
maxzoom: s.maxZoom,
|
|
647
647
|
"before-id": "highlight-circles"
|
|
648
648
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
649
|
-
(h(!0), M(ue, null, Le(T.value, (s) => (h(),
|
|
649
|
+
(h(!0), M(ue, null, Le(T.value, (s) => (h(), G(p(Et), {
|
|
650
650
|
id: s.id,
|
|
651
651
|
key: s.id,
|
|
652
|
-
source:
|
|
652
|
+
source: Pe(s),
|
|
653
653
|
paint: qe(s),
|
|
654
654
|
minzoom: s.minZoom,
|
|
655
655
|
maxzoom: s.maxZoom,
|
|
656
656
|
"before-id": "highlight-circles",
|
|
657
657
|
onClick: ae
|
|
658
658
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
659
|
-
(h(!0), M(ue, null, Le(O.value, (s) => (h(),
|
|
659
|
+
(h(!0), M(ue, null, Le(O.value, (s) => (h(), G(p(Ot), {
|
|
660
660
|
id: s.id,
|
|
661
661
|
key: s.id,
|
|
662
|
-
source:
|
|
662
|
+
source: Pe(s),
|
|
663
663
|
paint: qe(s),
|
|
664
664
|
minzoom: s.minZoom,
|
|
665
665
|
maxzoom: s.maxZoom,
|
|
666
666
|
"before-id": "highlight-circles",
|
|
667
667
|
onClick: ae
|
|
668
668
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
669
|
-
(h(!0), M(ue, null, Le(D.value, (s) => (h(),
|
|
669
|
+
(h(!0), M(ue, null, Le(D.value, (s) => (h(), G(p(gt), {
|
|
670
670
|
id: s.id + "-outline",
|
|
671
671
|
key: s.id + "-outline",
|
|
672
|
-
source:
|
|
672
|
+
source: Pe(s),
|
|
673
673
|
paint: dt(s),
|
|
674
674
|
minzoom: s.minZoom,
|
|
675
675
|
maxzoom: s.maxZoom,
|
|
676
676
|
"before-id": "highlight-lines",
|
|
677
677
|
onClick: ae
|
|
678
678
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
679
|
-
(h(!0), M(ue, null, Le(ee.value, (s) => (h(),
|
|
679
|
+
(h(!0), M(ue, null, Le(ee.value, (s) => (h(), G(p(gt), {
|
|
680
680
|
id: s.id,
|
|
681
681
|
key: s.id,
|
|
682
|
-
source:
|
|
682
|
+
source: Pe(s),
|
|
683
683
|
paint: qe(s),
|
|
684
684
|
minzoom: s.minZoom,
|
|
685
685
|
maxzoom: s.maxZoom,
|
|
686
686
|
"before-id": "highlight-lines",
|
|
687
687
|
onClick: ae
|
|
688
688
|
}, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
|
|
689
|
-
|
|
689
|
+
J(p(Et), {
|
|
690
690
|
id: "highlight-circles",
|
|
691
691
|
key: "highlight-circles-layer",
|
|
692
692
|
source: { type: "geojson", data: le.value },
|
|
693
693
|
paint: pt
|
|
694
694
|
}, null, 8, ["source"]),
|
|
695
|
-
|
|
695
|
+
J(p(Ot), {
|
|
696
696
|
id: "highlight-fill",
|
|
697
697
|
key: "highlight-fill-layer",
|
|
698
698
|
source: { type: "geojson", data: Ve.value },
|
|
699
699
|
paint: v
|
|
700
700
|
}, null, 8, ["source"]),
|
|
701
|
-
|
|
701
|
+
J(p(gt), {
|
|
702
702
|
id: "highlight-lines",
|
|
703
703
|
key: "highlight-lines-layer",
|
|
704
704
|
source: { type: "geojson", data: Be.value },
|
|
705
705
|
paint: ot
|
|
706
706
|
}, null, 8, ["source"]),
|
|
707
|
-
|
|
707
|
+
J(p(lo), {
|
|
708
708
|
"lng-lat": $t.value,
|
|
709
709
|
color: "#2176d2"
|
|
710
710
|
}, null, 8, ["lng-lat"]),
|
|
711
|
-
ie.value && Te.value ? (h(),
|
|
711
|
+
ie.value && Te.value ? (h(), G(p(no), {
|
|
712
712
|
key: 1,
|
|
713
713
|
"lng-lat": Te.value,
|
|
714
714
|
html: Ae.value,
|
|
@@ -727,12 +727,12 @@ const so = { class: "map-panel" }, co = /* @__PURE__ */ ge({
|
|
|
727
727
|
}, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
|
|
728
728
|
]));
|
|
729
729
|
}
|
|
730
|
-
}),
|
|
730
|
+
}), Me = (e, a) => {
|
|
731
731
|
const l = e.__vccOpts || e;
|
|
732
732
|
for (const [o, r] of a)
|
|
733
733
|
l[o] = r;
|
|
734
734
|
return l;
|
|
735
|
-
}, uo = /* @__PURE__ */
|
|
735
|
+
}, uo = /* @__PURE__ */ Me(co, [["__scopeId", "data-v-1f8b1f59"]]);
|
|
736
736
|
function Nt(e) {
|
|
737
737
|
let a = e.split("?")[0] || e;
|
|
738
738
|
return a = a.replace(/\/query$/, ""), a = a.replace(/\/$/, ""), a = a.replace(/^https?:\/\//, ""), a.toLowerCase();
|
|
@@ -759,7 +759,7 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
759
759
|
svgRaw: {}
|
|
760
760
|
},
|
|
761
761
|
setup(e) {
|
|
762
|
-
const a = e, l = (
|
|
762
|
+
const a = e, l = (c) => "href" in c && c.href !== void 0 || "to" in c && c.to !== void 0, o = _(() => bt(
|
|
763
763
|
"phila-button",
|
|
764
764
|
`phila-button--${a.variant}`,
|
|
765
765
|
a.size && `is-${a.size}`,
|
|
@@ -787,12 +787,12 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
787
787
|
size: a.size
|
|
788
788
|
})
|
|
789
789
|
);
|
|
790
|
-
return (
|
|
790
|
+
return (c, w) => l(a) ? (h(), G(p(ro), vt({ key: 0 }, { ...r.value, ...c.$attrs }, { role: "button" }), {
|
|
791
791
|
default: He(() => [
|
|
792
|
-
|
|
792
|
+
J(p(zt), Pt(Ft(n.value)), {
|
|
793
793
|
default: He(() => [
|
|
794
|
-
he(
|
|
795
|
-
|
|
794
|
+
he(c.$slots, "default", {}, () => [
|
|
795
|
+
$e(H(a.text), 1)
|
|
796
796
|
])
|
|
797
797
|
]),
|
|
798
798
|
_: 3
|
|
@@ -804,11 +804,11 @@ const fo = ["disabled"], po = /* @__PURE__ */ ge({
|
|
|
804
804
|
type: "button",
|
|
805
805
|
disabled: a.disabled,
|
|
806
806
|
class: o.value
|
|
807
|
-
},
|
|
808
|
-
|
|
807
|
+
}, c.$attrs), [
|
|
808
|
+
J(p(zt), Pt(Ft(n.value)), {
|
|
809
809
|
default: He(() => [
|
|
810
|
-
he(
|
|
811
|
-
|
|
810
|
+
he(c.$slots, "default", {}, () => [
|
|
811
|
+
$e(H(a.text), 1)
|
|
812
812
|
])
|
|
813
813
|
]),
|
|
814
814
|
_: 3
|
|
@@ -849,17 +849,17 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
849
849
|
},
|
|
850
850
|
emits: ["update:modelValue"],
|
|
851
851
|
setup(e, { emit: a }) {
|
|
852
|
-
const l = Kt(), o = e, r = _(() => typeof o.error == "string" ? o.error : o.error[0]), n = Qt(o, "id"),
|
|
852
|
+
const l = Kt(), o = e, r = _(() => typeof o.error == "string" ? o.error : o.error[0]), n = Qt(o, "id"), c = a, w = x(""), f = _({
|
|
853
853
|
get: () => o.modelValue !== void 0 ? o.modelValue : w.value,
|
|
854
854
|
set: (d) => {
|
|
855
|
-
|
|
855
|
+
c("update:modelValue", d), w.value = d;
|
|
856
856
|
}
|
|
857
857
|
}), S = _(() => {
|
|
858
858
|
const d = ["default-class"];
|
|
859
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);
|
|
860
860
|
}), y = _(() => {
|
|
861
861
|
const d = [];
|
|
862
|
-
return
|
|
862
|
+
return f.value !== "" && d.push("phila-text-field--filled"), o.className && d.push(o.className), bt(...d);
|
|
863
863
|
}), m = _(() => {
|
|
864
864
|
if (!(o.label || l["aria-label"]))
|
|
865
865
|
return o.placeholder || void 0;
|
|
@@ -873,13 +873,13 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
873
873
|
key: 0,
|
|
874
874
|
for: n.value,
|
|
875
875
|
class: "has-text-label-small phila-label"
|
|
876
|
-
},
|
|
876
|
+
}, H(o.label), 9, vo)) : A("", !0),
|
|
877
877
|
P("div", {
|
|
878
878
|
class: ne(["phila-text-field", y.value]),
|
|
879
879
|
onClick: g
|
|
880
880
|
}, [
|
|
881
881
|
P("div", bo, [
|
|
882
|
-
o.leadingIcon ? (h(),
|
|
882
|
+
o.leadingIcon ? (h(), G(p(ke), {
|
|
883
883
|
key: 0,
|
|
884
884
|
"icon-class": o.leadingIcon,
|
|
885
885
|
inline: "",
|
|
@@ -891,24 +891,24 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
891
891
|
id: n.value,
|
|
892
892
|
ref_key: "inputRef",
|
|
893
893
|
ref: i,
|
|
894
|
-
"onUpdate:modelValue": L[0] || (L[0] = (C) =>
|
|
894
|
+
"onUpdate:modelValue": L[0] || (L[0] = (C) => f.value = C),
|
|
895
895
|
class: "phila-text-field-input has-text-body-default",
|
|
896
896
|
placeholder: o.placeholder,
|
|
897
897
|
"aria-label": m.value
|
|
898
|
-
},
|
|
899
|
-
[Xt,
|
|
898
|
+
}, p(l)), null, 16, So), [
|
|
899
|
+
[Xt, f.value]
|
|
900
900
|
])
|
|
901
901
|
])
|
|
902
902
|
]),
|
|
903
|
-
|
|
903
|
+
f.value != "" ? (h(), G(p(po), {
|
|
904
904
|
key: 1,
|
|
905
905
|
variant: "standard",
|
|
906
906
|
size: "small",
|
|
907
907
|
"icon-only": "",
|
|
908
|
-
"icon-definition":
|
|
909
|
-
onClick: L[1] || (L[1] = (C) =>
|
|
908
|
+
"icon-definition": p(go),
|
|
909
|
+
onClick: L[1] || (L[1] = (C) => f.value = "")
|
|
910
910
|
}, null, 8, ["icon-definition"])) : A("", !0),
|
|
911
|
-
o.trailingIcon ? (h(),
|
|
911
|
+
o.trailingIcon ? (h(), G(p(ke), {
|
|
912
912
|
key: 2,
|
|
913
913
|
size: "small",
|
|
914
914
|
"icon-class": o.trailingIcon,
|
|
@@ -918,15 +918,15 @@ const vo = ["for"], bo = { class: "state-layer" }, wo = { class: "content" }, Lo
|
|
|
918
918
|
he(d.$slots, "trailing-action")
|
|
919
919
|
])
|
|
920
920
|
], 2),
|
|
921
|
-
o.supportingText ? (h(), M("div", Co,
|
|
921
|
+
o.supportingText ? (h(), M("div", Co, H(o.supportingText), 1)) : A("", !0),
|
|
922
922
|
r.value ? (h(), M("div", ko, [
|
|
923
|
-
|
|
924
|
-
"icon-definition":
|
|
923
|
+
J(p(ke), {
|
|
924
|
+
"icon-definition": p(ho),
|
|
925
925
|
size: "small",
|
|
926
926
|
inline: "",
|
|
927
927
|
decorative: ""
|
|
928
928
|
}, null, 8, ["icon-definition"]),
|
|
929
|
-
|
|
929
|
+
$e(" " + H(r.value), 1)
|
|
930
930
|
])) : A("", !0)
|
|
931
931
|
], 2));
|
|
932
932
|
}
|
|
@@ -982,7 +982,7 @@ const Io = {
|
|
|
982
982
|
e.unavailable ? (h(), M("span", Oo, " (zoom in) ")) : A("", !0)
|
|
983
983
|
], 64));
|
|
984
984
|
}
|
|
985
|
-
}), nt = /* @__PURE__ */
|
|
985
|
+
}), nt = /* @__PURE__ */ Me(zo, [["__scopeId", "data-v-19b1b402"]]), Do = { class: "opacity-control" }, _o = ["for"], Ro = ["id", "value", "aria-label"], Ao = /* @__PURE__ */ ge({
|
|
986
986
|
__name: "LayerOpacitySlider",
|
|
987
987
|
props: {
|
|
988
988
|
layerId: {},
|
|
@@ -1000,7 +1000,7 @@ const Io = {
|
|
|
1000
1000
|
P("label", {
|
|
1001
1001
|
class: "opacity-label",
|
|
1002
1002
|
for: "opacity-" + e.layerId
|
|
1003
|
-
}, " Opacity: " +
|
|
1003
|
+
}, " Opacity: " + H(Math.round(e.opacity * 100)) + "% ", 9, _o),
|
|
1004
1004
|
P("input", {
|
|
1005
1005
|
id: "opacity-" + e.layerId,
|
|
1006
1006
|
type: "range",
|
|
@@ -1014,7 +1014,7 @@ const Io = {
|
|
|
1014
1014
|
}, null, 40, Ro)
|
|
1015
1015
|
]));
|
|
1016
1016
|
}
|
|
1017
|
-
}), Lt = /* @__PURE__ */
|
|
1017
|
+
}), Lt = /* @__PURE__ */ Me(Ao, [["__scopeId", "data-v-1a025f6a"]]), Bo = ["aria-label"], Vo = {
|
|
1018
1018
|
key: 3,
|
|
1019
1019
|
class: "legend-label"
|
|
1020
1020
|
}, Zo = /* @__PURE__ */ ge({
|
|
@@ -1048,30 +1048,34 @@ const Io = {
|
|
|
1048
1048
|
}, null, 4)) : o.type === "fill" ? (h(), M("span", {
|
|
1049
1049
|
key: 2,
|
|
1050
1050
|
class: "legend-symbol legend-fill",
|
|
1051
|
-
style: ye({
|
|
1051
|
+
style: ye({
|
|
1052
|
+
backgroundColor: o.color,
|
|
1053
|
+
borderColor: o.outlineColor || "#666",
|
|
1054
|
+
borderWidth: o.outlineColor ? `${Math.max(o.outlineWidth || 2, 2)}px` : void 0
|
|
1055
|
+
}),
|
|
1052
1056
|
"aria-hidden": "true"
|
|
1053
1057
|
}, null, 4)) : A("", !0),
|
|
1054
|
-
e.items.length > 1 ? (h(), M("span", Vo,
|
|
1058
|
+
e.items.length > 1 ? (h(), M("span", Vo, H(o.label), 1)) : A("", !0)
|
|
1055
1059
|
]))), 128))
|
|
1056
1060
|
], 8, Bo));
|
|
1057
1061
|
}
|
|
1058
|
-
}), St = /* @__PURE__ */
|
|
1062
|
+
}), St = /* @__PURE__ */ Me(Zo, [["__scopeId", "data-v-3a9206ab"]]);
|
|
1059
1063
|
function Ct(e) {
|
|
1060
|
-
function a(
|
|
1061
|
-
return e().visibleLayerIds.has(
|
|
1064
|
+
function a(c) {
|
|
1065
|
+
return e().visibleLayerIds.has(c);
|
|
1062
1066
|
}
|
|
1063
|
-
function l(
|
|
1064
|
-
return e().layerOpacities[
|
|
1067
|
+
function l(c) {
|
|
1068
|
+
return e().layerOpacities[c] ?? 1;
|
|
1065
1069
|
}
|
|
1066
|
-
function o(
|
|
1067
|
-
return e().loadingLayerIds.has(
|
|
1070
|
+
function o(c) {
|
|
1071
|
+
return e().loadingLayerIds.has(c);
|
|
1068
1072
|
}
|
|
1069
|
-
function r(
|
|
1070
|
-
return e().layerErrors[
|
|
1073
|
+
function r(c) {
|
|
1074
|
+
return e().layerErrors[c] || null;
|
|
1071
1075
|
}
|
|
1072
|
-
function n(
|
|
1073
|
-
const w = e().currentZoom,
|
|
1074
|
-
return !(
|
|
1076
|
+
function n(c) {
|
|
1077
|
+
const w = e().currentZoom, f = c.minZoom, S = c.maxZoom;
|
|
1078
|
+
return !(f !== void 0 && w < f || S !== void 0 && w > S);
|
|
1075
1079
|
}
|
|
1076
1080
|
return { isVisible: a, getLayerOpacity: l, isLayerLoading: o, getLayerError: r, isLayerAvailableAtZoom: n };
|
|
1077
1081
|
}
|
|
@@ -1116,7 +1120,7 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1116
1120
|
const L = Nt(d);
|
|
1117
1121
|
return l.layerMetadata[L] || null;
|
|
1118
1122
|
}
|
|
1119
|
-
const
|
|
1123
|
+
const c = _(() => l.layerList.some((d) => n(d.config.url))), { isVisible: w, getLayerOpacity: f, isLayerLoading: S, getLayerError: y, isLayerAvailableAtZoom: m } = Ct(() => ({
|
|
1120
1124
|
visibleLayerIds: l.visibleLayers,
|
|
1121
1125
|
layerOpacities: l.layerOpacities,
|
|
1122
1126
|
loadingLayerIds: l.loadingLayers,
|
|
@@ -1131,15 +1135,15 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1131
1135
|
}
|
|
1132
1136
|
return (d, L) => (h(), M("div", No, [
|
|
1133
1137
|
e.showSearch ? (h(), M("div", Uo, [
|
|
1134
|
-
|
|
1138
|
+
J(p(xo), {
|
|
1135
1139
|
modelValue: i.value,
|
|
1136
1140
|
"onUpdate:modelValue": L[0] || (L[0] = (C) => i.value = C),
|
|
1137
1141
|
placeholder: e.searchPlaceholder,
|
|
1138
1142
|
"class-name": "layer-search-field"
|
|
1139
1143
|
}, {
|
|
1140
1144
|
"trailing-action": He(() => [
|
|
1141
|
-
|
|
1142
|
-
"icon-definition":
|
|
1145
|
+
J(p(ke), {
|
|
1146
|
+
"icon-definition": p($o),
|
|
1143
1147
|
size: "small",
|
|
1144
1148
|
inline: "",
|
|
1145
1149
|
decorative: ""
|
|
@@ -1154,7 +1158,7 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1154
1158
|
], !0)
|
|
1155
1159
|
])) : (h(), M("div", {
|
|
1156
1160
|
key: 2,
|
|
1157
|
-
class: ne(["layer-list", { "has-metadata":
|
|
1161
|
+
class: ne(["layer-list", { "has-metadata": c.value }])
|
|
1158
1162
|
}, [
|
|
1159
1163
|
(h(!0), M(ue, null, Le(r.value, (C) => (h(), M("div", {
|
|
1160
1164
|
key: C.config.id,
|
|
@@ -1171,53 +1175,53 @@ const No = { class: "layer-panel" }, Uo = {
|
|
|
1171
1175
|
onClick: L[1] || (L[1] = Yt(() => {
|
|
1172
1176
|
}, ["stop"]))
|
|
1173
1177
|
}, [
|
|
1174
|
-
|
|
1175
|
-
"icon-definition":
|
|
1178
|
+
J(p(ke), {
|
|
1179
|
+
"icon-definition": p(To),
|
|
1176
1180
|
size: "small",
|
|
1177
1181
|
inline: "",
|
|
1178
1182
|
decorative: ""
|
|
1179
1183
|
}, null, 8, ["icon-definition"])
|
|
1180
|
-
], 8, qo)) :
|
|
1184
|
+
], 8, qo)) : c.value ? (h(), M("span", Go)) : A("", !0),
|
|
1181
1185
|
P("label", {
|
|
1182
1186
|
class: ne(["layer-checkbox", {
|
|
1183
|
-
"layer-unavailable": !
|
|
1184
|
-
"layer-error":
|
|
1187
|
+
"layer-unavailable": !p(m)(C.config),
|
|
1188
|
+
"layer-error": p(y)(C.config.id)
|
|
1185
1189
|
}])
|
|
1186
1190
|
}, [
|
|
1187
1191
|
P("input", {
|
|
1188
1192
|
type: "checkbox",
|
|
1189
|
-
checked:
|
|
1190
|
-
disabled: !
|
|
1193
|
+
checked: p(w)(C.config.id),
|
|
1194
|
+
disabled: !p(m)(C.config),
|
|
1191
1195
|
onChange: (E) => g(C.config.id)
|
|
1192
1196
|
}, null, 40, Ho),
|
|
1193
1197
|
P("span", Jo, [
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
loading:
|
|
1197
|
-
error:
|
|
1198
|
-
unavailable: !
|
|
1198
|
+
$e(H(C.config.title) + " ", 1),
|
|
1199
|
+
J(nt, {
|
|
1200
|
+
loading: p(S)(C.config.id),
|
|
1201
|
+
error: p(y)(C.config.id),
|
|
1202
|
+
unavailable: !p(m)(C.config)
|
|
1199
1203
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
1200
1204
|
])
|
|
1201
1205
|
], 2)
|
|
1202
1206
|
]),
|
|
1203
|
-
e.showOpacity &&
|
|
1207
|
+
e.showOpacity && p(w)(C.config.id) && p(m)(C.config) ? (h(), G(Lt, {
|
|
1204
1208
|
key: 0,
|
|
1205
1209
|
"layer-id": C.config.id,
|
|
1206
1210
|
"layer-name": C.config.title,
|
|
1207
|
-
opacity: f
|
|
1211
|
+
opacity: p(f)(C.config.id),
|
|
1208
1212
|
"onUpdate:opacity": (E) => o("setOpacity", C.config.id, E)
|
|
1209
1213
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
1210
|
-
e.showLegend &&
|
|
1214
|
+
e.showLegend && p(w)(C.config.id) && p(m)(C.config) && C.config.legend?.length ? (h(), G(St, {
|
|
1211
1215
|
key: 1,
|
|
1212
1216
|
items: C.config.legend,
|
|
1213
1217
|
label: "Legend for " + C.config.title
|
|
1214
1218
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
1215
1219
|
]))), 128)),
|
|
1216
|
-
r.value.length === 0 ? (h(), M("div", Ko, 'No layers match "' +
|
|
1220
|
+
r.value.length === 0 ? (h(), M("div", Ko, 'No layers match "' + H(e.searchQuery) + '"', 1)) : A("", !0)
|
|
1217
1221
|
], 2))
|
|
1218
1222
|
]));
|
|
1219
1223
|
}
|
|
1220
|
-
}), Xo = /* @__PURE__ */
|
|
1224
|
+
}), Xo = /* @__PURE__ */ Me(Qo, [["__scopeId", "data-v-e48bb978"]]), Yo = {
|
|
1221
1225
|
esriSLSSolid: null,
|
|
1222
1226
|
esriSLSDash: [6, 1.5],
|
|
1223
1227
|
esriSLSDot: [1, 1.5],
|
|
@@ -1231,10 +1235,10 @@ function Ke(e) {
|
|
|
1231
1235
|
}
|
|
1232
1236
|
function ea(e, a, l, o, r) {
|
|
1233
1237
|
const n = [];
|
|
1234
|
-
let
|
|
1238
|
+
let c = a[0], w = [e[0]], f = 0;
|
|
1235
1239
|
for (let i = 1; i < e.length; i++)
|
|
1236
|
-
a[i] ===
|
|
1237
|
-
n.push({ style:
|
|
1240
|
+
a[i] === c ? w.push(e[i]) : (n.push({ style: c, breaks: w, startIndex: f }), c = a[i], w = [e[i]], f = i);
|
|
1241
|
+
n.push({ style: c, breaks: w, startIndex: f });
|
|
1238
1242
|
const S = [], y = /* @__PURE__ */ new Set();
|
|
1239
1243
|
let m = o.minValue ?? 0;
|
|
1240
1244
|
for (let i = 0; i < n.length; i++) {
|
|
@@ -1246,12 +1250,12 @@ function ea(e, a, l, o, r) {
|
|
|
1246
1250
|
"line-opacity": me(r)
|
|
1247
1251
|
};
|
|
1248
1252
|
if (L && (T["line-dasharray"] = L), d.length === 1)
|
|
1249
|
-
T["line-color"] = z(d[0].symbol?.color), T["line-width"] =
|
|
1253
|
+
T["line-color"] = z(d[0].symbol?.color), T["line-width"] = W(d[0].symbol?.width || 2);
|
|
1250
1254
|
else {
|
|
1251
1255
|
const U = ["step", ["get", l]], de = ["step", ["get", l]];
|
|
1252
|
-
U.push(z(d[0].symbol?.color)), de.push(
|
|
1256
|
+
U.push(z(d[0].symbol?.color)), de.push(W(d[0].symbol?.width || 2));
|
|
1253
1257
|
for (let ve = 1; ve < d.length; ve++)
|
|
1254
|
-
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(
|
|
1258
|
+
U.push(d[ve - 1].classMaxValue), U.push(z(d[ve].symbol?.color)), de.push(d[ve - 1].classMaxValue), de.push(W(d[ve].symbol?.width || 2));
|
|
1255
1259
|
T["line-color"] = U, T["line-width"] = de;
|
|
1256
1260
|
}
|
|
1257
1261
|
const O = [];
|
|
@@ -1259,7 +1263,7 @@ function ea(e, a, l, o, r) {
|
|
|
1259
1263
|
O.push({
|
|
1260
1264
|
type: "line",
|
|
1261
1265
|
color: z(U.symbol?.color),
|
|
1262
|
-
width:
|
|
1266
|
+
width: W(U.symbol?.width || 2),
|
|
1263
1267
|
label: U.label || `${m} - ${U.classMaxValue}`
|
|
1264
1268
|
}), m = U.classMaxValue + 1;
|
|
1265
1269
|
const D = g.style.replace("esriSLS", "").toLowerCase();
|
|
@@ -1274,19 +1278,19 @@ function ta(e, a, l, o, r) {
|
|
|
1274
1278
|
const y = S.symbol?.style || "esriSLSSolid";
|
|
1275
1279
|
n.has(y) || n.set(y, []), n.get(y).push(S);
|
|
1276
1280
|
}
|
|
1277
|
-
const
|
|
1278
|
-
let
|
|
1281
|
+
const c = [], w = /* @__PURE__ */ new Set();
|
|
1282
|
+
let f = !0;
|
|
1279
1283
|
for (const [S, y] of n) {
|
|
1280
1284
|
const m = Ke(S), g = y.map((F) => `${a} = '${String(F.value).replace(/'/g, "''")}'`).join(" OR "), d = {
|
|
1281
1285
|
"line-opacity": me(o)
|
|
1282
1286
|
};
|
|
1283
1287
|
if (m && (d["line-dasharray"] = m), y.length === 1)
|
|
1284
|
-
d["line-color"] = z(y[0].symbol?.color), d["line-width"] =
|
|
1288
|
+
d["line-color"] = z(y[0].symbol?.color), d["line-width"] = W(y[0].symbol?.width || 2);
|
|
1285
1289
|
else {
|
|
1286
1290
|
const F = ["match", ["to-string", ["get", a]]];
|
|
1287
1291
|
for (const V of y)
|
|
1288
1292
|
F.push(it(V.value)), F.push(z(V.symbol?.color));
|
|
1289
|
-
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] =
|
|
1293
|
+
F.push(l ? z(l.color) : "rgba(0, 0, 0, 0)"), d["line-color"] = F, d["line-width"] = W(y[0].symbol?.width || 2);
|
|
1290
1294
|
}
|
|
1291
1295
|
const L = [];
|
|
1292
1296
|
for (const F of y) {
|
|
@@ -1294,15 +1298,15 @@ function ta(e, a, l, o, r) {
|
|
|
1294
1298
|
L.push({
|
|
1295
1299
|
type: "line",
|
|
1296
1300
|
color: z(F.symbol?.color),
|
|
1297
|
-
width:
|
|
1301
|
+
width: W(F.symbol?.width || 1),
|
|
1298
1302
|
label: O
|
|
1299
1303
|
});
|
|
1300
1304
|
}
|
|
1301
1305
|
const C = S.replace("esriSLS", "").toLowerCase();
|
|
1302
1306
|
let E;
|
|
1303
|
-
|
|
1307
|
+
f ? E = "" : w.has(C) ? E = `-${C}-${c.length}` : E = `-${C}`, w.add(C), f = !1, c.push({ suffix: E, where: g, paint: d, legend: L });
|
|
1304
1308
|
}
|
|
1305
|
-
return
|
|
1309
|
+
return c;
|
|
1306
1310
|
}
|
|
1307
1311
|
function z(e) {
|
|
1308
1312
|
if (!e || !Array.isArray(e) || e.length < 3) return "#888888";
|
|
@@ -1312,7 +1316,7 @@ function z(e) {
|
|
|
1312
1316
|
function me(e) {
|
|
1313
1317
|
return e !== void 0 ? e : 1;
|
|
1314
1318
|
}
|
|
1315
|
-
function
|
|
1319
|
+
function W(e) {
|
|
1316
1320
|
return Math.round(e * (96 / 72) * 10) / 10;
|
|
1317
1321
|
}
|
|
1318
1322
|
const oa = 559082264;
|
|
@@ -1348,7 +1352,7 @@ function st(e) {
|
|
|
1348
1352
|
return "fill";
|
|
1349
1353
|
}
|
|
1350
1354
|
}
|
|
1351
|
-
function
|
|
1355
|
+
function xe(e) {
|
|
1352
1356
|
return !(!e || e.style === "esriSLSNull" || e.color === null || e.width === 0 || e.color && e.color[3] === 0);
|
|
1353
1357
|
}
|
|
1354
1358
|
function it(e) {
|
|
@@ -1356,20 +1360,28 @@ function it(e) {
|
|
|
1356
1360
|
}
|
|
1357
1361
|
function Ut(e, a, l) {
|
|
1358
1362
|
const o = e.symbol, r = st(o);
|
|
1359
|
-
let n = {},
|
|
1363
|
+
let n = {}, c = [], w = null;
|
|
1360
1364
|
if (r === "fill" && o) {
|
|
1361
|
-
const
|
|
1365
|
+
const f = o.color === null ? 0 : o.color?.[3] ?? 255, S = f === 0 ? "rgba(0, 0, 0, 0)" : z(o.color), y = f === 0 ? 0 : f < 255 ? 1 : me(a);
|
|
1362
1366
|
if (n = {
|
|
1363
1367
|
"fill-color": S,
|
|
1364
1368
|
"fill-opacity": y
|
|
1365
|
-
},
|
|
1366
|
-
const m =
|
|
1369
|
+
}, xe(o.outline)) {
|
|
1370
|
+
const m = W(o.outline.width || 1);
|
|
1367
1371
|
w = {
|
|
1368
1372
|
"line-color": z(o.outline.color),
|
|
1369
1373
|
"line-width": m
|
|
1370
1374
|
};
|
|
1371
1375
|
}
|
|
1372
|
-
|
|
1376
|
+
f === 0 && xe(o.outline) ? c = [
|
|
1377
|
+
{
|
|
1378
|
+
type: "fill",
|
|
1379
|
+
color: "transparent",
|
|
1380
|
+
outlineColor: z(o.outline.color),
|
|
1381
|
+
outlineWidth: W(o.outline.width || 1),
|
|
1382
|
+
label: e.label || "Feature"
|
|
1383
|
+
}
|
|
1384
|
+
] : c = [
|
|
1373
1385
|
{
|
|
1374
1386
|
type: "fill",
|
|
1375
1387
|
color: z(o.color),
|
|
@@ -1379,25 +1391,25 @@ function Ut(e, a, l) {
|
|
|
1379
1391
|
} else if (r === "line" && o) {
|
|
1380
1392
|
n = {
|
|
1381
1393
|
"line-color": z(o.color),
|
|
1382
|
-
"line-width":
|
|
1394
|
+
"line-width": W(o.width || 1),
|
|
1383
1395
|
"line-opacity": me(a)
|
|
1384
1396
|
};
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1397
|
+
const f = Ke(o.style);
|
|
1398
|
+
f && (n["line-dasharray"] = f), c = [
|
|
1387
1399
|
{
|
|
1388
1400
|
type: "line",
|
|
1389
1401
|
color: z(o.color),
|
|
1390
|
-
width:
|
|
1402
|
+
width: W(o.width || 1),
|
|
1391
1403
|
label: e.label || "Feature"
|
|
1392
1404
|
}
|
|
1393
1405
|
];
|
|
1394
1406
|
} else if (r === "circle" && o) {
|
|
1395
|
-
const
|
|
1407
|
+
const f = Math.round((o.size || 6) * 0.71 * 100) / 100;
|
|
1396
1408
|
n = {
|
|
1397
1409
|
"circle-color": z(o.color),
|
|
1398
|
-
"circle-radius":
|
|
1410
|
+
"circle-radius": f,
|
|
1399
1411
|
"circle-opacity": me(a)
|
|
1400
|
-
},
|
|
1412
|
+
}, xe(o.outline) && (n["circle-stroke-color"] = z(o.outline.color), n["circle-stroke-width"] = W(o.outline.width || 1)), c = [
|
|
1401
1413
|
{
|
|
1402
1414
|
type: "circle",
|
|
1403
1415
|
color: z(o.color),
|
|
@@ -1405,14 +1417,14 @@ function Ut(e, a, l) {
|
|
|
1405
1417
|
}
|
|
1406
1418
|
];
|
|
1407
1419
|
}
|
|
1408
|
-
return { paint: n, legend:
|
|
1420
|
+
return { paint: n, legend: c, geomType: r, outlinePaint: w };
|
|
1409
1421
|
}
|
|
1410
1422
|
function ia(e, a, l) {
|
|
1411
1423
|
const o = e.field1.toLowerCase(), r = e.uniqueValueInfos || [], n = e.defaultSymbol;
|
|
1412
1424
|
if (r.length === 0)
|
|
1413
1425
|
return Ut({ ...e, symbol: n }, a);
|
|
1414
|
-
const
|
|
1415
|
-
let
|
|
1426
|
+
const c = r[0]?.symbol || n, w = st(c);
|
|
1427
|
+
let f = {};
|
|
1416
1428
|
const S = [];
|
|
1417
1429
|
let y = null;
|
|
1418
1430
|
if (w === "fill") {
|
|
@@ -1430,13 +1442,13 @@ function ia(e, a, l) {
|
|
|
1430
1442
|
type: "fill",
|
|
1431
1443
|
color: z(n.color),
|
|
1432
1444
|
label: e.defaultLabel || "Other"
|
|
1433
|
-
}),
|
|
1445
|
+
}), f = {
|
|
1434
1446
|
"fill-color": m,
|
|
1435
1447
|
"fill-opacity": me(a)
|
|
1436
|
-
},
|
|
1437
|
-
const i =
|
|
1448
|
+
}, xe(c?.outline)) {
|
|
1449
|
+
const i = W(Math.max(c.outline.width || 1, 1));
|
|
1438
1450
|
y = {
|
|
1439
|
-
"line-color": z(
|
|
1451
|
+
"line-color": z(c.outline.color),
|
|
1440
1452
|
"line-width": i
|
|
1441
1453
|
};
|
|
1442
1454
|
}
|
|
@@ -1448,18 +1460,18 @@ function ia(e, a, l) {
|
|
|
1448
1460
|
S.push({
|
|
1449
1461
|
type: "line",
|
|
1450
1462
|
color: z(d.symbol?.color),
|
|
1451
|
-
width:
|
|
1463
|
+
width: W(d.symbol?.width || 1),
|
|
1452
1464
|
label: E
|
|
1453
1465
|
});
|
|
1454
1466
|
}
|
|
1455
1467
|
m.push(n ? z(n.color) : "rgba(0, 0, 0, 0)"), n && S.push({
|
|
1456
1468
|
type: "line",
|
|
1457
1469
|
color: z(n.color),
|
|
1458
|
-
width:
|
|
1470
|
+
width: W(n.width || 1),
|
|
1459
1471
|
label: e.defaultLabel || "Other"
|
|
1460
|
-
}),
|
|
1472
|
+
}), f = {
|
|
1461
1473
|
"line-color": m,
|
|
1462
|
-
"line-width":
|
|
1474
|
+
"line-width": W(c?.width || 2),
|
|
1463
1475
|
"line-opacity": me(a)
|
|
1464
1476
|
};
|
|
1465
1477
|
const i = r.map((d) => d.symbol?.style || "esriSLSSolid"), g = [...new Set(i)];
|
|
@@ -1469,7 +1481,7 @@ function ia(e, a, l) {
|
|
|
1469
1481
|
}
|
|
1470
1482
|
if (g.length === 1) {
|
|
1471
1483
|
const d = Ke(g[0]);
|
|
1472
|
-
d && (
|
|
1484
|
+
d && (f["line-dasharray"] = d);
|
|
1473
1485
|
}
|
|
1474
1486
|
} else if (w === "circle") {
|
|
1475
1487
|
const m = ["match", ["to-string", ["get", o]]];
|
|
@@ -1487,14 +1499,14 @@ function ia(e, a, l) {
|
|
|
1487
1499
|
color: z(n.color),
|
|
1488
1500
|
label: e.defaultLabel || "Other"
|
|
1489
1501
|
});
|
|
1490
|
-
const i = Math.round((
|
|
1491
|
-
|
|
1502
|
+
const i = Math.round((c?.size || 6) * 0.71 * 100) / 100;
|
|
1503
|
+
f = {
|
|
1492
1504
|
"circle-color": m,
|
|
1493
1505
|
"circle-radius": i,
|
|
1494
1506
|
"circle-opacity": me(a)
|
|
1495
|
-
},
|
|
1507
|
+
}, xe(c?.outline) && (f["circle-stroke-color"] = z(c.outline.color), f["circle-stroke-width"] = W(c.outline.width || 1));
|
|
1496
1508
|
}
|
|
1497
|
-
return { paint:
|
|
1509
|
+
return { paint: f, legend: S, geomType: w, outlinePaint: y };
|
|
1498
1510
|
}
|
|
1499
1511
|
function la(e, a) {
|
|
1500
1512
|
const l = e.field.toLowerCase(), o = e.classBreakInfos || [], r = e.visualVariables?.find((y) => y.type === "colorInfo");
|
|
@@ -1502,16 +1514,16 @@ function la(e, a) {
|
|
|
1502
1514
|
return na(r, l, e, a);
|
|
1503
1515
|
if (o.length === 0)
|
|
1504
1516
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1505
|
-
const n = o[0]?.symbol,
|
|
1517
|
+
const n = o[0]?.symbol, c = st(n);
|
|
1506
1518
|
let w = {};
|
|
1507
|
-
const
|
|
1519
|
+
const f = [];
|
|
1508
1520
|
let S = null;
|
|
1509
|
-
if (
|
|
1521
|
+
if (c === "fill") {
|
|
1510
1522
|
const y = ["step", ["get", l]];
|
|
1511
1523
|
y.push(z(o[0]?.symbol?.color));
|
|
1512
1524
|
for (let m = 0; m < o.length; m++) {
|
|
1513
1525
|
const i = o[m];
|
|
1514
|
-
m > 0 && (y.push(o[m - 1].classMaxValue), y.push(z(i.symbol?.color))),
|
|
1526
|
+
m > 0 && (y.push(o[m - 1].classMaxValue), y.push(z(i.symbol?.color))), f.push({
|
|
1515
1527
|
type: "fill",
|
|
1516
1528
|
color: z(i.symbol?.color),
|
|
1517
1529
|
label: i.label || `${i.classMaxValue}`
|
|
@@ -1520,32 +1532,32 @@ function la(e, a) {
|
|
|
1520
1532
|
if (w = {
|
|
1521
1533
|
"fill-color": y,
|
|
1522
1534
|
"fill-opacity": me(a)
|
|
1523
|
-
},
|
|
1524
|
-
const m =
|
|
1535
|
+
}, xe(n?.outline)) {
|
|
1536
|
+
const m = W(n.outline.width || 1);
|
|
1525
1537
|
S = {
|
|
1526
1538
|
"line-color": z(n.outline.color),
|
|
1527
1539
|
"line-width": m
|
|
1528
1540
|
};
|
|
1529
1541
|
}
|
|
1530
|
-
} else if (
|
|
1542
|
+
} else if (c === "line") {
|
|
1531
1543
|
const y = o.map((E) => E.symbol?.style || "esriSLSSolid"), m = [...new Set(y)];
|
|
1532
1544
|
if (m.length > 1) {
|
|
1533
1545
|
const E = ea(o, y, l, e, a);
|
|
1534
|
-
return { paint: {}, legend: [], geomType:
|
|
1546
|
+
return { paint: {}, legend: [], geomType: c, outlinePaint: S, splitLayers: E };
|
|
1535
1547
|
}
|
|
1536
1548
|
const g = ["step", ["get", l]];
|
|
1537
1549
|
g.push(z(o[0]?.symbol?.color));
|
|
1538
1550
|
let d = e.minValue ?? 0;
|
|
1539
1551
|
for (let E = 0; E < o.length; E++) {
|
|
1540
1552
|
const F = o[E];
|
|
1541
|
-
E > 0 && (g.push(o[E - 1].classMaxValue), g.push(z(F.symbol?.color))),
|
|
1553
|
+
E > 0 && (g.push(o[E - 1].classMaxValue), g.push(z(F.symbol?.color))), f.push({
|
|
1542
1554
|
type: "line",
|
|
1543
1555
|
color: z(F.symbol?.color),
|
|
1544
|
-
width:
|
|
1556
|
+
width: W(F.symbol?.width || n?.width || 2),
|
|
1545
1557
|
label: F.label || `${d} - ${F.classMaxValue}`
|
|
1546
1558
|
}), d = F.classMaxValue + 1;
|
|
1547
1559
|
}
|
|
1548
|
-
const L =
|
|
1560
|
+
const L = W(n?.width || 2);
|
|
1549
1561
|
w = {
|
|
1550
1562
|
"line-color": g,
|
|
1551
1563
|
"line-width": L,
|
|
@@ -1554,20 +1566,20 @@ function la(e, a) {
|
|
|
1554
1566
|
const C = Ke(m[0]);
|
|
1555
1567
|
C && (w["line-dasharray"] = C);
|
|
1556
1568
|
}
|
|
1557
|
-
return { paint: w, legend:
|
|
1569
|
+
return { paint: w, legend: f, geomType: c, outlinePaint: S };
|
|
1558
1570
|
}
|
|
1559
1571
|
function na(e, a, l, o) {
|
|
1560
1572
|
const r = e.stops || [];
|
|
1561
1573
|
if (r.length === 0)
|
|
1562
1574
|
return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
|
|
1563
|
-
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol,
|
|
1575
|
+
const n = l.classBreakInfos?.[0]?.symbol || l.defaultSymbol, c = st(n);
|
|
1564
1576
|
let w = {};
|
|
1565
|
-
const
|
|
1577
|
+
const f = [];
|
|
1566
1578
|
let S = null;
|
|
1567
|
-
if (
|
|
1579
|
+
if (c === "fill") {
|
|
1568
1580
|
const y = ["interpolate", ["linear"], ["get", a]];
|
|
1569
1581
|
for (const i of r)
|
|
1570
|
-
y.push(i.value), y.push(z(i.color)),
|
|
1582
|
+
y.push(i.value), y.push(z(i.color)), f.push({
|
|
1571
1583
|
type: "fill",
|
|
1572
1584
|
color: z(i.color),
|
|
1573
1585
|
label: i.label || `${i.value}`
|
|
@@ -1582,15 +1594,15 @@ function na(e, a, l, o) {
|
|
|
1582
1594
|
// Otherwise use the interpolated color
|
|
1583
1595
|
],
|
|
1584
1596
|
"fill-opacity": me(o)
|
|
1585
|
-
},
|
|
1586
|
-
const i =
|
|
1597
|
+
}, xe(n?.outline)) {
|
|
1598
|
+
const i = W(n.outline.width || 1);
|
|
1587
1599
|
S = {
|
|
1588
1600
|
"line-color": z(n.outline.color),
|
|
1589
1601
|
"line-width": i
|
|
1590
1602
|
};
|
|
1591
1603
|
}
|
|
1592
1604
|
}
|
|
1593
|
-
return { paint: w, legend:
|
|
1605
|
+
return { paint: w, legend: f, geomType: c, outlinePaint: S };
|
|
1594
1606
|
}
|
|
1595
1607
|
function ra(e, a, l, o) {
|
|
1596
1608
|
if (!e?.renderer)
|
|
@@ -1609,12 +1621,12 @@ function ra(e, a, l, o) {
|
|
|
1609
1621
|
}
|
|
1610
1622
|
function sa(e) {
|
|
1611
1623
|
if (!e) return null;
|
|
1612
|
-
const a = (e.title || "").replace(/\{([^}]+)\}/g, (n,
|
|
1613
|
-
const
|
|
1624
|
+
const a = (e.title || "").replace(/\{([^}]+)\}/g, (n, c) => `{${c.toLowerCase()}}`), o = (e.fieldInfos || []).filter((n) => n.visible === !0).map((n) => {
|
|
1625
|
+
const c = {
|
|
1614
1626
|
field: n.fieldName.toLowerCase(),
|
|
1615
1627
|
label: n.label || n.fieldName
|
|
1616
1628
|
};
|
|
1617
|
-
return n.format && (
|
|
1629
|
+
return n.format && (c.format = {}, n.format.dateFormat && (c.format.dateFormat = n.format.dateFormat), n.format.digitSeparator !== void 0 && (c.format.digitSeparator = n.format.digitSeparator), n.format.places !== void 0 && (c.format.places = n.format.places), Object.keys(c.format).length === 0 && delete c.format), c;
|
|
1618
1630
|
}), r = {
|
|
1619
1631
|
title: a,
|
|
1620
1632
|
fields: o
|
|
@@ -1639,8 +1651,8 @@ function fa(e) {
|
|
|
1639
1651
|
for (const r of l) {
|
|
1640
1652
|
const n = r.trim().match(o);
|
|
1641
1653
|
if (n) {
|
|
1642
|
-
const [,
|
|
1643
|
-
|
|
1654
|
+
const [, c, w] = n;
|
|
1655
|
+
c && w && a.set(c, w.trim());
|
|
1644
1656
|
}
|
|
1645
1657
|
}
|
|
1646
1658
|
return a;
|
|
@@ -1677,26 +1689,26 @@ async function Wt(e) {
|
|
|
1677
1689
|
for (const r of a)
|
|
1678
1690
|
if (r.url && !r.title?.toLowerCase().includes("(under construction)") && !(r.url && /\/MapServer(\/\d+)?$/i.test(r.url)))
|
|
1679
1691
|
try {
|
|
1680
|
-
let n = r.layerDefinition?.drawingInfo,
|
|
1681
|
-
const w = !n || !n.renderer,
|
|
1682
|
-
if ((w ||
|
|
1692
|
+
let n = r.layerDefinition?.drawingInfo, c;
|
|
1693
|
+
const w = !n || !n.renderer, f = o.includes(r.title), S = n?.renderer?.uniqueValueInfos?.[0]?.symbol?.outline || n?.renderer?.defaultSymbol?.outline;
|
|
1694
|
+
if ((w || f) && r.url) {
|
|
1683
1695
|
const O = await pa(r.url);
|
|
1684
1696
|
if (O) {
|
|
1685
|
-
if (n = O.drawingInfo, S &&
|
|
1697
|
+
if (n = O.drawingInfo, S && xe(S) && n?.renderer) {
|
|
1686
1698
|
const D = n.renderer, ee = D.uniqueValueInfos?.[0]?.symbol?.outline || D.defaultSymbol?.outline;
|
|
1687
|
-
if (!
|
|
1699
|
+
if (!xe(ee)) {
|
|
1688
1700
|
for (const U of D.uniqueValueInfos || [])
|
|
1689
1701
|
U.symbol && (U.symbol.outline = S);
|
|
1690
1702
|
D.defaultSymbol && (D.defaultSymbol.outline = S);
|
|
1691
1703
|
}
|
|
1692
1704
|
}
|
|
1693
|
-
O.description && (
|
|
1705
|
+
O.description && (c = fa(O.description), c.size > 0);
|
|
1694
1706
|
}
|
|
1695
1707
|
}
|
|
1696
1708
|
const { paint: y, legend: m, geomType: i, outlinePaint: g, splitLayers: d } = ra(
|
|
1697
1709
|
n,
|
|
1698
1710
|
r.opacity,
|
|
1699
|
-
|
|
1711
|
+
c,
|
|
1700
1712
|
r.title
|
|
1701
1713
|
), L = sa(r.popupInfo), C = ca(r.layerDefinition), E = aa(r.layerDefinition?.minScale, r.layerDefinition?.maxScale), F = ua(r.title), V = da(r.title), T = r.opacity ?? 1;
|
|
1702
1714
|
if (d && d.length > 0)
|
|
@@ -1885,11 +1897,11 @@ function va(e) {
|
|
|
1885
1897
|
const g = e.find((d) => d.id === i);
|
|
1886
1898
|
g && await o(g);
|
|
1887
1899
|
}
|
|
1888
|
-
function
|
|
1900
|
+
function c(i) {
|
|
1889
1901
|
return a.value[i]?.data ?? null;
|
|
1890
1902
|
}
|
|
1891
1903
|
const w = _(() => Object.values(a.value).some((i) => i.loading));
|
|
1892
|
-
function
|
|
1904
|
+
function f(i) {
|
|
1893
1905
|
return a.value[i]?.loading ?? !1;
|
|
1894
1906
|
}
|
|
1895
1907
|
function S(i) {
|
|
@@ -1915,7 +1927,7 @@ function va(e) {
|
|
|
1915
1927
|
m();
|
|
1916
1928
|
}), {
|
|
1917
1929
|
/** Reactive state for all data sources */
|
|
1918
|
-
state:
|
|
1930
|
+
state: q(a),
|
|
1919
1931
|
/** Whether any data source is currently loading */
|
|
1920
1932
|
isLoading: w,
|
|
1921
1933
|
/** Fetch all data sources */
|
|
@@ -1923,9 +1935,9 @@ function va(e) {
|
|
|
1923
1935
|
/** Refetch a specific data source by id */
|
|
1924
1936
|
refetch: n,
|
|
1925
1937
|
/** Get data for a specific source */
|
|
1926
|
-
getData:
|
|
1938
|
+
getData: c,
|
|
1927
1939
|
/** Check if a specific source is loading */
|
|
1928
|
-
isSourceLoading:
|
|
1940
|
+
isSourceLoading: f,
|
|
1929
1941
|
/** Get error for a specific source */
|
|
1930
1942
|
getError: S,
|
|
1931
1943
|
/** Stop all polling (useful for cleanup) */
|
|
@@ -1977,7 +1989,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
1977
1989
|
},
|
|
1978
1990
|
emits: ["configs-loaded", "load-error", "zoom"],
|
|
1979
1991
|
setup(e, { expose: a, emit: l }) {
|
|
1980
|
-
const o = e, r = l, n = x([]),
|
|
1992
|
+
const o = e, r = l, n = x([]), c = x(!0), w = x(null), f = x(12), S = x(""), y = x(/* @__PURE__ */ new Set()), m = x({}), i = x(/* @__PURE__ */ new Set()), g = x({}), d = x({}), L = x(/* @__PURE__ */ new Set()), C = x({});
|
|
1981
1993
|
function E() {
|
|
1982
1994
|
const v = {};
|
|
1983
1995
|
for (const $ of o.tiledLayers)
|
|
@@ -2000,7 +2012,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2000
2012
|
function de(v) {
|
|
2001
2013
|
return O?.refetch(v) ?? Promise.resolve();
|
|
2002
2014
|
}
|
|
2003
|
-
N("layerboard-layers",
|
|
2015
|
+
N("layerboard-layers", q(n)), N("layerboard-visible", y), N("layerboard-opacities", m), N("layerboard-loading", q(i)), N("layerboard-errors", q(g)), N("layerboard-zoom", q(f)), N("layerboard-toggle-layer", De), N("layerboard-set-layer-visible", je), N("layerboard-set-layers-visible", Pe), N("layerboard-set-opacity", Fe), N("layerboard-tiled-layers", q(_(() => o.tiledLayers))), N("layerboard-visible-tiled", L), N("layerboard-tiled-opacities", C), 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);
|
|
2004
2016
|
const ve = _(() => ({
|
|
2005
2017
|
backgroundColor: o.themeColor
|
|
2006
2018
|
})), ct = _(() => ({
|
|
@@ -2012,7 +2024,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2012
2024
|
}));
|
|
2013
2025
|
async function We() {
|
|
2014
2026
|
try {
|
|
2015
|
-
|
|
2027
|
+
c.value = !0, w.value = null;
|
|
2016
2028
|
const $ = (await wt(o.webMapId)).map((Z) => {
|
|
2017
2029
|
let Q = Z;
|
|
2018
2030
|
const Ce = o.layerStyleOverrides[Z.id];
|
|
@@ -2041,7 +2053,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2041
2053
|
const $ = v instanceof Error ? v.message : "Failed to load layer configurations";
|
|
2042
2054
|
w.value = $, r("load-error", $);
|
|
2043
2055
|
} finally {
|
|
2044
|
-
|
|
2056
|
+
c.value = !1;
|
|
2045
2057
|
}
|
|
2046
2058
|
}
|
|
2047
2059
|
async function Xe() {
|
|
@@ -2062,7 +2074,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2062
2074
|
}
|
|
2063
2075
|
}
|
|
2064
2076
|
function ut(v) {
|
|
2065
|
-
|
|
2077
|
+
f.value = v, r("zoom", v);
|
|
2066
2078
|
}
|
|
2067
2079
|
function De(v) {
|
|
2068
2080
|
y.value.has(v) ? y.value.delete(v) : y.value.add(v), y.value = new Set(y.value);
|
|
@@ -2070,7 +2082,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2070
2082
|
function je(v, $) {
|
|
2071
2083
|
$ ? y.value.add(v) : y.value.delete(v), y.value = new Set(y.value);
|
|
2072
2084
|
}
|
|
2073
|
-
function
|
|
2085
|
+
function Pe(v, $) {
|
|
2074
2086
|
for (const K of v)
|
|
2075
2087
|
$ ? y.value.add(K) : y.value.delete(K);
|
|
2076
2088
|
y.value = new Set(y.value);
|
|
@@ -2159,7 +2171,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2159
2171
|
v.shiftKey ? document.activeElement === K && (v.preventDefault(), Z.focus()) : document.activeElement === Z && (v.preventDefault(), K.focus());
|
|
2160
2172
|
}
|
|
2161
2173
|
}
|
|
2162
|
-
N("layerboard-open-modal", Ae), N("layerboard-close-modal", le), N("layerboard-is-modal-open",
|
|
2174
|
+
N("layerboard-open-modal", Ae), N("layerboard-close-modal", le), N("layerboard-is-modal-open", q(ie)), a({
|
|
2163
2175
|
/** Layer configurations */
|
|
2164
2176
|
layerList: n,
|
|
2165
2177
|
/** Set of visible layer IDs */
|
|
@@ -2171,13 +2183,13 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2171
2183
|
/** Map of layer errors by ID */
|
|
2172
2184
|
layerErrors: g,
|
|
2173
2185
|
/** Current map zoom level */
|
|
2174
|
-
currentZoom:
|
|
2186
|
+
currentZoom: f,
|
|
2175
2187
|
/** Toggle a layer's visibility */
|
|
2176
2188
|
toggleLayer: De,
|
|
2177
2189
|
/** Set a layer's visibility explicitly */
|
|
2178
2190
|
setLayerVisible: je,
|
|
2179
2191
|
/** Set multiple layers' visibility at once */
|
|
2180
|
-
setLayersVisible:
|
|
2192
|
+
setLayersVisible: Pe,
|
|
2181
2193
|
/** Set a layer's opacity */
|
|
2182
2194
|
setLayerOpacity: Fe,
|
|
2183
2195
|
/** Reload layer configurations */
|
|
@@ -2249,16 +2261,16 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2249
2261
|
"aria-label": "Toggle menu",
|
|
2250
2262
|
onClick: Ie
|
|
2251
2263
|
}, [
|
|
2252
|
-
|
|
2253
|
-
"icon-definition":
|
|
2264
|
+
J(p(ke), {
|
|
2265
|
+
"icon-definition": p(Fo),
|
|
2254
2266
|
size: "medium",
|
|
2255
2267
|
inline: "",
|
|
2256
2268
|
decorative: ""
|
|
2257
2269
|
}, null, 8, ["icon-definition"])
|
|
2258
2270
|
], 8, wa),
|
|
2259
2271
|
he(v.$slots, "header", {}, () => [
|
|
2260
|
-
P("h1", null,
|
|
2261
|
-
e.subtitle ? (h(), M("span", La,
|
|
2272
|
+
P("h1", null, H(e.title), 1),
|
|
2273
|
+
e.subtitle ? (h(), M("span", La, H(e.subtitle), 1)) : A("", !0)
|
|
2262
2274
|
], !0),
|
|
2263
2275
|
ae.value ? (h(), M("div", {
|
|
2264
2276
|
key: 0,
|
|
@@ -2277,7 +2289,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2277
2289
|
closeModal: le,
|
|
2278
2290
|
isModalOpen: ie.value
|
|
2279
2291
|
}, () => [
|
|
2280
|
-
$[0] || ($[0] =
|
|
2292
|
+
$[0] || ($[0] = $e(" City of Philadelphia ", -1))
|
|
2281
2293
|
], !0)
|
|
2282
2294
|
]),
|
|
2283
2295
|
P("button", {
|
|
@@ -2287,8 +2299,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2287
2299
|
"aria-label": "Close menu",
|
|
2288
2300
|
onClick: Ee
|
|
2289
2301
|
}, [
|
|
2290
|
-
|
|
2291
|
-
"icon-definition":
|
|
2302
|
+
J(p(ke), {
|
|
2303
|
+
"icon-definition": p(Dt),
|
|
2292
2304
|
size: "medium",
|
|
2293
2305
|
decorative: ""
|
|
2294
2306
|
}, null, 8, ["icon-definition"])
|
|
@@ -2301,15 +2313,15 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2301
2313
|
})) : A("", !0)
|
|
2302
2314
|
], 4),
|
|
2303
2315
|
P("div", Ca, [
|
|
2304
|
-
|
|
2316
|
+
c.value ? (h(), M("div", ka, [
|
|
2305
2317
|
P("div", {
|
|
2306
2318
|
class: "layerboard-spinner",
|
|
2307
2319
|
style: ye({ borderTopColor: e.themeColor })
|
|
2308
2320
|
}, null, 4),
|
|
2309
|
-
P("p", null, "Loading " +
|
|
2321
|
+
P("p", null, "Loading " + H(e.title) + "...", 1)
|
|
2310
2322
|
])) : w.value ? (h(), M("div", xa, [
|
|
2311
2323
|
$[3] || ($[3] = P("h2", null, "Error Loading Layers", -1)),
|
|
2312
|
-
P("p", null,
|
|
2324
|
+
P("p", null, H(w.value), 1),
|
|
2313
2325
|
P("button", {
|
|
2314
2326
|
class: "layerboard-retry-button",
|
|
2315
2327
|
style: ye({ backgroundColor: e.themeColor }),
|
|
@@ -2331,10 +2343,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2331
2343
|
layerOpacities: m.value,
|
|
2332
2344
|
loadingLayers: i.value,
|
|
2333
2345
|
layerErrors: g.value,
|
|
2334
|
-
currentZoom:
|
|
2346
|
+
currentZoom: f.value,
|
|
2335
2347
|
toggleLayer: De,
|
|
2336
2348
|
setLayerVisible: je,
|
|
2337
|
-
setLayersVisible:
|
|
2349
|
+
setLayersVisible: Pe,
|
|
2338
2350
|
setOpacity: Fe,
|
|
2339
2351
|
tiledLayers: e.tiledLayers,
|
|
2340
2352
|
visibleTiledLayers: L.value,
|
|
@@ -2347,14 +2359,14 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2347
2359
|
getDataSource: U,
|
|
2348
2360
|
refetchDataSource: de
|
|
2349
2361
|
}, () => [
|
|
2350
|
-
e.showDefaultSidebar ? (h(),
|
|
2362
|
+
e.showDefaultSidebar ? (h(), G(Xo, {
|
|
2351
2363
|
key: 0,
|
|
2352
2364
|
"layer-list": n.value,
|
|
2353
2365
|
"visible-layers": y.value,
|
|
2354
2366
|
"layer-opacities": m.value,
|
|
2355
2367
|
"loading-layers": i.value,
|
|
2356
2368
|
"layer-errors": g.value,
|
|
2357
|
-
"current-zoom":
|
|
2369
|
+
"current-zoom": f.value,
|
|
2358
2370
|
"search-query": S.value,
|
|
2359
2371
|
"layer-metadata": d.value,
|
|
2360
2372
|
onToggleLayer: De,
|
|
@@ -2368,7 +2380,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2368
2380
|
"aria-label": "Map",
|
|
2369
2381
|
class: ne(["layerboard-map", { "is-active": Se.value === "map" }])
|
|
2370
2382
|
}, [
|
|
2371
|
-
|
|
2383
|
+
J(uo, {
|
|
2372
2384
|
"visible-layers": y.value,
|
|
2373
2385
|
"layer-opacities": m.value,
|
|
2374
2386
|
"layer-list": n.value,
|
|
@@ -2398,8 +2410,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2398
2410
|
"aria-label": fe.value ? "Expand sidebar" : "Collapse sidebar",
|
|
2399
2411
|
onClick: tt
|
|
2400
2412
|
}, [
|
|
2401
|
-
|
|
2402
|
-
"icon-definition": fe.value ?
|
|
2413
|
+
J(p(ke), {
|
|
2414
|
+
"icon-definition": fe.value ? p(Mo) : p(Po),
|
|
2403
2415
|
size: "medium",
|
|
2404
2416
|
decorative: ""
|
|
2405
2417
|
}, null, 8, ["icon-definition"])
|
|
@@ -2413,7 +2425,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2413
2425
|
style: ye(Ue.value),
|
|
2414
2426
|
onClick: ft
|
|
2415
2427
|
}, [
|
|
2416
|
-
Se.value === "map" ? (h(), M("span", Ma,
|
|
2428
|
+
Se.value === "map" ? (h(), M("span", Ma, H(e.sidebarLabel), 1)) : (h(), M("span", Pa, H(e.mapLabel), 1))
|
|
2417
2429
|
], 4),
|
|
2418
2430
|
P("footer", {
|
|
2419
2431
|
class: "layerboard-footer",
|
|
@@ -2424,7 +2436,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2424
2436
|
closeModal: le,
|
|
2425
2437
|
isModalOpen: ie.value
|
|
2426
2438
|
}, () => [
|
|
2427
|
-
$[4] || ($[4] =
|
|
2439
|
+
$[4] || ($[4] = $e(" City of Philadelphia ", -1))
|
|
2428
2440
|
], !0)
|
|
2429
2441
|
], 4),
|
|
2430
2442
|
ie.value ? (h(), M("div", {
|
|
@@ -2448,8 +2460,8 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2448
2460
|
"aria-label": "Close modal",
|
|
2449
2461
|
onClick: le
|
|
2450
2462
|
}, [
|
|
2451
|
-
|
|
2452
|
-
"icon-definition":
|
|
2463
|
+
J(p(ke), {
|
|
2464
|
+
"icon-definition": p(Dt),
|
|
2453
2465
|
size: "medium",
|
|
2454
2466
|
decorative: ""
|
|
2455
2467
|
}, null, 8, ["icon-definition"])
|
|
@@ -2457,10 +2469,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2457
2469
|
he(v.$slots, "modal", { closeModal: le }, void 0, !0)
|
|
2458
2470
|
], 512)
|
|
2459
2471
|
], 32)) : A("", !0),
|
|
2460
|
-
P("span", Fa,
|
|
2472
|
+
P("span", Fa, H(Se.value === "sidebar" ? "Showing layers panel" : "Showing map"), 1)
|
|
2461
2473
|
]));
|
|
2462
2474
|
}
|
|
2463
|
-
}), Ya = /* @__PURE__ */
|
|
2475
|
+
}), Ya = /* @__PURE__ */ Me(Ta, [["__scopeId", "data-v-1c88d9ba"]]), Ia = ["aria-expanded"], Ea = {
|
|
2464
2476
|
key: 0,
|
|
2465
2477
|
class: "topic-icon"
|
|
2466
2478
|
}, Oa = { class: "topic-title" }, za = /* @__PURE__ */ ge({
|
|
@@ -2474,39 +2486,39 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2474
2486
|
},
|
|
2475
2487
|
emits: ["toggle", "layerChange"],
|
|
2476
2488
|
setup(e, { emit: a }) {
|
|
2477
|
-
const l = e, o = a, r = x(l.expanded), n = `topic-panel-${Tt()}`,
|
|
2489
|
+
const l = e, o = a, r = x(l.expanded), n = `topic-panel-${Tt()}`, c = `topic-header-${Tt()}`;
|
|
2478
2490
|
Oe(
|
|
2479
2491
|
() => l.expanded,
|
|
2480
|
-
(
|
|
2481
|
-
r.value =
|
|
2492
|
+
(f) => {
|
|
2493
|
+
r.value = f;
|
|
2482
2494
|
}
|
|
2483
2495
|
);
|
|
2484
2496
|
function w() {
|
|
2485
2497
|
r.value = !r.value, o("toggle", r.value);
|
|
2486
2498
|
}
|
|
2487
|
-
return (
|
|
2499
|
+
return (f, S) => {
|
|
2488
2500
|
const y = to("font-awesome-icon");
|
|
2489
2501
|
return h(), M("div", {
|
|
2490
2502
|
class: ne(["topic-accordion", { "is-expanded": r.value }])
|
|
2491
2503
|
}, [
|
|
2492
2504
|
P("button", {
|
|
2493
|
-
id:
|
|
2505
|
+
id: c,
|
|
2494
2506
|
class: ne(["topic-header", e.headerClass]),
|
|
2495
2507
|
type: "button",
|
|
2496
2508
|
"aria-expanded": r.value,
|
|
2497
2509
|
"aria-controls": n,
|
|
2498
2510
|
onClick: w
|
|
2499
2511
|
}, [
|
|
2500
|
-
e.icon ||
|
|
2501
|
-
he(
|
|
2502
|
-
e.icon ? (h(),
|
|
2512
|
+
e.icon || f.$slots.icon ? (h(), M("span", Ea, [
|
|
2513
|
+
he(f.$slots, "icon", {}, () => [
|
|
2514
|
+
e.icon ? (h(), G(y, {
|
|
2503
2515
|
key: 0,
|
|
2504
2516
|
icon: ["fas", e.icon],
|
|
2505
2517
|
"aria-hidden": "true"
|
|
2506
2518
|
}, null, 8, ["icon"])) : A("", !0)
|
|
2507
2519
|
], !0)
|
|
2508
2520
|
])) : A("", !0),
|
|
2509
|
-
P("span", Oa,
|
|
2521
|
+
P("span", Oa, H(e.title), 1),
|
|
2510
2522
|
P("span", {
|
|
2511
2523
|
class: ne(["topic-chevron", { "is-rotated": r.value }])
|
|
2512
2524
|
}, [...S[0] || (S[0] = [
|
|
@@ -2529,10 +2541,10 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2529
2541
|
Zt(P("div", {
|
|
2530
2542
|
id: n,
|
|
2531
2543
|
role: "region",
|
|
2532
|
-
"aria-labelledby":
|
|
2544
|
+
"aria-labelledby": c,
|
|
2533
2545
|
class: "topic-content"
|
|
2534
2546
|
}, [
|
|
2535
|
-
he(
|
|
2547
|
+
he(f.$slots, "default", {}, () => [
|
|
2536
2548
|
S[1] || (S[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
|
|
2537
2549
|
], !0)
|
|
2538
2550
|
], 512), [
|
|
@@ -2541,7 +2553,7 @@ const ba = { class: "layerboard-layout" }, wa = ["aria-expanded"], La = {
|
|
|
2541
2553
|
], 2);
|
|
2542
2554
|
};
|
|
2543
2555
|
}
|
|
2544
|
-
}), ei = /* @__PURE__ */
|
|
2556
|
+
}), ei = /* @__PURE__ */ Me(za, [["__scopeId", "data-v-a2023afa"]]);
|
|
2545
2557
|
function Da(e) {
|
|
2546
2558
|
return e.displayOptions?.shouldShowCheckbox !== !1;
|
|
2547
2559
|
}
|
|
@@ -2572,7 +2584,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2572
2584
|
},
|
|
2573
2585
|
emits: ["toggleLayer", "setOpacity"],
|
|
2574
2586
|
setup(e, { emit: a }) {
|
|
2575
|
-
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading:
|
|
2587
|
+
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: c, getLayerError: w, isLayerAvailableAtZoom: f } = Ct(
|
|
2576
2588
|
() => l
|
|
2577
2589
|
);
|
|
2578
2590
|
function S(y) {
|
|
@@ -2587,60 +2599,60 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2587
2599
|
key: i.id,
|
|
2588
2600
|
class: "layer-item"
|
|
2589
2601
|
}, [
|
|
2590
|
-
|
|
2602
|
+
p(Da)(i) ? (h(), M("label", {
|
|
2591
2603
|
key: 0,
|
|
2592
2604
|
class: ne(["layer-checkbox", {
|
|
2593
|
-
"layer-unavailable": !f
|
|
2594
|
-
"layer-error":
|
|
2605
|
+
"layer-unavailable": !p(f)(i),
|
|
2606
|
+
"layer-error": p(w)(i.id)
|
|
2595
2607
|
}])
|
|
2596
2608
|
}, [
|
|
2597
2609
|
P("input", {
|
|
2598
2610
|
type: "checkbox",
|
|
2599
|
-
checked:
|
|
2600
|
-
disabled: !f
|
|
2611
|
+
checked: p(r)(i.id),
|
|
2612
|
+
disabled: !p(f)(i),
|
|
2601
2613
|
onChange: (g) => S(i.id)
|
|
2602
2614
|
}, null, 40, Ra),
|
|
2603
2615
|
P("span", Aa, [
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
loading:
|
|
2607
|
-
error:
|
|
2608
|
-
unavailable: !f
|
|
2616
|
+
$e(H(p(ze)(i)) + " ", 1),
|
|
2617
|
+
J(nt, {
|
|
2618
|
+
loading: p(c)(i.id),
|
|
2619
|
+
error: p(w)(i.id),
|
|
2620
|
+
unavailable: !p(f)(i)
|
|
2609
2621
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2610
2622
|
])
|
|
2611
2623
|
], 2)) : (h(), M("div", {
|
|
2612
2624
|
key: 1,
|
|
2613
2625
|
class: ne(["layer-label-only", {
|
|
2614
|
-
"layer-unavailable": !f
|
|
2615
|
-
"layer-error":
|
|
2626
|
+
"layer-unavailable": !p(f)(i),
|
|
2627
|
+
"layer-error": p(w)(i.id)
|
|
2616
2628
|
}])
|
|
2617
2629
|
}, [
|
|
2618
2630
|
P("span", Ba, [
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
loading:
|
|
2622
|
-
error:
|
|
2623
|
-
unavailable: !f
|
|
2631
|
+
$e(H(p(ze)(i)) + " ", 1),
|
|
2632
|
+
J(nt, {
|
|
2633
|
+
loading: p(c)(i.id),
|
|
2634
|
+
error: p(w)(i.id),
|
|
2635
|
+
unavailable: !p(f)(i)
|
|
2624
2636
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2625
2637
|
])
|
|
2626
2638
|
], 2)),
|
|
2627
|
-
|
|
2639
|
+
p(jt)(i, e.showOpacity) && p(r)(i.id) && p(f)(i) ? (h(), G(Lt, {
|
|
2628
2640
|
key: 2,
|
|
2629
2641
|
"layer-id": i.id,
|
|
2630
|
-
"layer-name":
|
|
2631
|
-
opacity:
|
|
2642
|
+
"layer-name": p(ze)(i),
|
|
2643
|
+
opacity: p(n)(i.id),
|
|
2632
2644
|
"onUpdate:opacity": (g) => o("setOpacity", i.id, g)
|
|
2633
2645
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2634
|
-
|
|
2646
|
+
p(qt)(i, e.showLegend) && p(r)(i.id) && p(f)(i) && i.legend?.length ? (h(), G(St, {
|
|
2635
2647
|
key: 3,
|
|
2636
2648
|
items: i.legend,
|
|
2637
|
-
label: "Legend for " +
|
|
2649
|
+
label: "Legend for " + p(ze)(i)
|
|
2638
2650
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2639
2651
|
]))), 128)),
|
|
2640
2652
|
e.layers.length === 0 ? (h(), M("div", Va, "No layers available")) : A("", !0)
|
|
2641
2653
|
], 8, _a));
|
|
2642
2654
|
}
|
|
2643
|
-
}), ti = /* @__PURE__ */
|
|
2655
|
+
}), ti = /* @__PURE__ */ Me(Za, [["__scopeId", "data-v-bfcd7855"]]), Na = ["aria-label"], Ua = ["name", "checked", "disabled", "onChange"], Wa = { class: "layer-title" }, ja = {
|
|
2644
2656
|
key: 0,
|
|
2645
2657
|
class: "empty-state"
|
|
2646
2658
|
}, qa = /* @__PURE__ */ ge({
|
|
@@ -2659,7 +2671,7 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2659
2671
|
},
|
|
2660
2672
|
emits: ["selectLayer", "setOpacity"],
|
|
2661
2673
|
setup(e, { emit: a }) {
|
|
2662
|
-
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading:
|
|
2674
|
+
const l = e, o = a, { isVisible: r, getLayerOpacity: n, isLayerLoading: c, getLayerError: w, isLayerAvailableAtZoom: f } = Ct(
|
|
2663
2675
|
() => l
|
|
2664
2676
|
);
|
|
2665
2677
|
function S(y) {
|
|
@@ -2677,48 +2689,48 @@ const _a = ["aria-label"], Ra = ["checked", "disabled", "onChange"], Aa = { clas
|
|
|
2677
2689
|
}, [
|
|
2678
2690
|
P("label", {
|
|
2679
2691
|
class: ne(["layer-radio", {
|
|
2680
|
-
"layer-unavailable": !f
|
|
2681
|
-
"layer-error":
|
|
2692
|
+
"layer-unavailable": !p(f)(i),
|
|
2693
|
+
"layer-error": p(w)(i.id)
|
|
2682
2694
|
}])
|
|
2683
2695
|
}, [
|
|
2684
2696
|
P("input", {
|
|
2685
2697
|
type: "radio",
|
|
2686
2698
|
name: e.groupName,
|
|
2687
|
-
checked:
|
|
2688
|
-
disabled: !f
|
|
2699
|
+
checked: p(r)(i.id),
|
|
2700
|
+
disabled: !p(f)(i),
|
|
2689
2701
|
onChange: (g) => S(i.id)
|
|
2690
2702
|
}, null, 40, Ua),
|
|
2691
2703
|
P("span", Wa, [
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
loading:
|
|
2695
|
-
error:
|
|
2696
|
-
unavailable: !f
|
|
2704
|
+
$e(H(p(ze)(i)) + " ", 1),
|
|
2705
|
+
J(nt, {
|
|
2706
|
+
loading: p(c)(i.id),
|
|
2707
|
+
error: p(w)(i.id),
|
|
2708
|
+
unavailable: !p(f)(i)
|
|
2697
2709
|
}, null, 8, ["loading", "error", "unavailable"])
|
|
2698
2710
|
])
|
|
2699
2711
|
], 2),
|
|
2700
|
-
|
|
2712
|
+
p(jt)(i, e.showOpacity) && p(r)(i.id) && p(f)(i) ? (h(), G(Lt, {
|
|
2701
2713
|
key: 0,
|
|
2702
2714
|
"layer-id": i.id,
|
|
2703
|
-
"layer-name":
|
|
2704
|
-
opacity:
|
|
2715
|
+
"layer-name": p(ze)(i),
|
|
2716
|
+
opacity: p(n)(i.id),
|
|
2705
2717
|
"onUpdate:opacity": (g) => o("setOpacity", i.id, g)
|
|
2706
2718
|
}, null, 8, ["layer-id", "layer-name", "opacity", "onUpdate:opacity"])) : A("", !0),
|
|
2707
|
-
|
|
2719
|
+
p(qt)(i, e.showLegend) && p(r)(i.id) && p(f)(i) && i.legend?.length ? (h(), G(St, {
|
|
2708
2720
|
key: 1,
|
|
2709
2721
|
items: i.legend,
|
|
2710
|
-
label: "Legend for " +
|
|
2722
|
+
label: "Legend for " + p(ze)(i)
|
|
2711
2723
|
}, null, 8, ["items", "label"])) : A("", !0)
|
|
2712
2724
|
]))), 128)),
|
|
2713
2725
|
e.layers.length === 0 ? (h(), M("div", ja, "No layers available")) : A("", !0)
|
|
2714
2726
|
], 8, Na));
|
|
2715
2727
|
}
|
|
2716
|
-
}), oi = /* @__PURE__ */
|
|
2728
|
+
}), oi = /* @__PURE__ */ Me(qa, [["__scopeId", "data-v-c368d815"]]);
|
|
2717
2729
|
function ai(e) {
|
|
2718
|
-
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}),
|
|
2719
|
-
if (!
|
|
2730
|
+
const a = x([]), l = x(/* @__PURE__ */ new Set()), o = x({}), r = x(/* @__PURE__ */ new Set()), n = x({}), c = x(""), w = x(!1), f = x(!1), S = x(null), y = _(() => {
|
|
2731
|
+
if (!c.value.trim())
|
|
2720
2732
|
return a.value;
|
|
2721
|
-
const T =
|
|
2733
|
+
const T = c.value.toLowerCase();
|
|
2722
2734
|
return a.value.filter((O) => O.title.toLowerCase().includes(T));
|
|
2723
2735
|
}), m = _(() => a.value.map((T) => ({
|
|
2724
2736
|
config: T,
|
|
@@ -2726,7 +2738,7 @@ function ai(e) {
|
|
|
2726
2738
|
// "circle", "fill", or "line"
|
|
2727
2739
|
})));
|
|
2728
2740
|
async function i() {
|
|
2729
|
-
if (!
|
|
2741
|
+
if (!f.value) {
|
|
2730
2742
|
w.value = !0, S.value = null;
|
|
2731
2743
|
try {
|
|
2732
2744
|
let T;
|
|
@@ -2734,7 +2746,7 @@ function ai(e) {
|
|
|
2734
2746
|
const O = {};
|
|
2735
2747
|
T.forEach((D) => {
|
|
2736
2748
|
O[D.id] = D.opacity ?? 1;
|
|
2737
|
-
}), o.value = O,
|
|
2749
|
+
}), o.value = O, f.value = !0;
|
|
2738
2750
|
} catch (T) {
|
|
2739
2751
|
S.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
|
|
2740
2752
|
} finally {
|
|
@@ -2760,7 +2772,7 @@ function ai(e) {
|
|
|
2760
2772
|
};
|
|
2761
2773
|
}
|
|
2762
2774
|
function C(T) {
|
|
2763
|
-
|
|
2775
|
+
c.value = T;
|
|
2764
2776
|
}
|
|
2765
2777
|
function E(T, O) {
|
|
2766
2778
|
const D = new Set(r.value);
|
|
@@ -2775,19 +2787,19 @@ function ai(e) {
|
|
|
2775
2787
|
}
|
|
2776
2788
|
}
|
|
2777
2789
|
function V() {
|
|
2778
|
-
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {},
|
|
2790
|
+
a.value = [], l.value = /* @__PURE__ */ new Set(), o.value = {}, r.value = /* @__PURE__ */ new Set(), n.value = {}, c.value = "", w.value = !1, f.value = !1, S.value = null;
|
|
2779
2791
|
}
|
|
2780
2792
|
return {
|
|
2781
2793
|
// State (readonly)
|
|
2782
|
-
layerConfigs:
|
|
2783
|
-
visibleLayers:
|
|
2784
|
-
layerOpacities:
|
|
2785
|
-
loadingLayers:
|
|
2786
|
-
layerErrors:
|
|
2787
|
-
searchQuery:
|
|
2788
|
-
isLoading:
|
|
2789
|
-
isInitialized:
|
|
2790
|
-
error:
|
|
2794
|
+
layerConfigs: q(a),
|
|
2795
|
+
visibleLayers: q(l),
|
|
2796
|
+
layerOpacities: q(o),
|
|
2797
|
+
loadingLayers: q(r),
|
|
2798
|
+
layerErrors: q(n),
|
|
2799
|
+
searchQuery: q(c),
|
|
2800
|
+
isLoading: q(w),
|
|
2801
|
+
isInitialized: q(f),
|
|
2802
|
+
error: q(S),
|
|
2791
2803
|
// Computed
|
|
2792
2804
|
filteredLayerConfigs: y,
|
|
2793
2805
|
layerList: m,
|
|
@@ -2821,20 +2833,20 @@ function ii() {
|
|
|
2821
2833
|
}
|
|
2822
2834
|
function Ga(e) {
|
|
2823
2835
|
const a = x(null), l = x(!1), o = x(null), r = x(0);
|
|
2824
|
-
async function n(
|
|
2836
|
+
async function n(f = {}) {
|
|
2825
2837
|
l.value = !0, o.value = null;
|
|
2826
2838
|
const S = e.pageSize || 2e3;
|
|
2827
2839
|
let y = 0, m = [], i = !0;
|
|
2828
2840
|
try {
|
|
2829
2841
|
for (; i; ) {
|
|
2830
|
-
const d = e.url.replace(/\/$/, ""), L = encodeURIComponent(
|
|
2842
|
+
const d = e.url.replace(/\/$/, ""), L = encodeURIComponent(f.where || e.where || "1=1");
|
|
2831
2843
|
let C = `${d}/query?where=${L}&outFields=*&returnGeometry=true&resultRecordCount=${S}&resultOffset=${y}&f=geojson`;
|
|
2832
|
-
if (
|
|
2844
|
+
if (f.bounds) {
|
|
2833
2845
|
const V = JSON.stringify({
|
|
2834
|
-
xmin:
|
|
2835
|
-
ymin:
|
|
2836
|
-
xmax:
|
|
2837
|
-
ymax:
|
|
2846
|
+
xmin: f.bounds.west,
|
|
2847
|
+
ymin: f.bounds.south,
|
|
2848
|
+
xmax: f.bounds.east,
|
|
2849
|
+
ymax: f.bounds.north,
|
|
2838
2850
|
spatialReference: { wkid: 4326 }
|
|
2839
2851
|
});
|
|
2840
2852
|
C += `&geometry=${encodeURIComponent(V)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
|
|
@@ -2857,24 +2869,24 @@ function Ga(e) {
|
|
|
2857
2869
|
l.value = !1;
|
|
2858
2870
|
}
|
|
2859
2871
|
}
|
|
2860
|
-
function
|
|
2872
|
+
function c() {
|
|
2861
2873
|
a.value = null, r.value = 0, o.value = null;
|
|
2862
2874
|
}
|
|
2863
|
-
async function w(
|
|
2864
|
-
return n(
|
|
2875
|
+
async function w(f = {}) {
|
|
2876
|
+
return n(f);
|
|
2865
2877
|
}
|
|
2866
2878
|
return {
|
|
2867
2879
|
// State (readonly)
|
|
2868
|
-
data:
|
|
2869
|
-
isLoading:
|
|
2870
|
-
error:
|
|
2871
|
-
totalFeatures:
|
|
2880
|
+
data: q(a),
|
|
2881
|
+
isLoading: q(l),
|
|
2882
|
+
error: q(o),
|
|
2883
|
+
totalFeatures: q(r),
|
|
2872
2884
|
// Config
|
|
2873
2885
|
config: e,
|
|
2874
2886
|
// Methods
|
|
2875
2887
|
fetch: n,
|
|
2876
2888
|
refetch: w,
|
|
2877
|
-
clear:
|
|
2889
|
+
clear: c
|
|
2878
2890
|
};
|
|
2879
2891
|
}
|
|
2880
2892
|
function li(e, a, l) {
|