@carto/ps-react-maps 3.11.4 → 3.11.6
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 +85 -76
- package/dist/index.js.map +1 -1
- package/dist/types/models/use-common-model.d.ts +4 -2
- package/dist/types/models/use-widget-model.d.ts +3 -1
- package/dist/types/providers/sources/store.d.ts +3 -1
- package/dist/types/providers/sources/types.d.ts +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as Z, jsxs as ut } from "react/jsx-runtime";
|
|
2
2
|
import { c as O } from "react/compiler-runtime";
|
|
3
3
|
import { useImperativeHandle as je, useEffect as Q, useMemo as te, useCallback as W, useState as se, createContext as Ie, useContext as Ne, useRef as Me } from "react";
|
|
4
4
|
import { MapProvider as Ft, Map as At, useMap as Rt } from "react-map-gl/maplibre";
|
|
@@ -7,7 +7,7 @@ import { useMap as dt, APIProvider as $t, Map as xt } from "@vis.gl/react-google
|
|
|
7
7
|
import { GoogleMapsOverlay as Ut } from "@deck.gl/google-maps";
|
|
8
8
|
import { createStore as He, useStore as Ge, create as ft } from "zustand";
|
|
9
9
|
import { FlyToInterpolator as qt, WebMercatorViewport as pt } from "@deck.gl/core";
|
|
10
|
-
import { CompositeMode as Vt, TranslateMode as Bt, ModifyMode as jt, DrawPolygonByDraggingMode as It, DrawCircleFromCenterMode as mt, DrawRectangleMode as Nt, DrawPolygonMode as Ht, EditableGeoJsonLayer as Gt, MeasureAreaMode as
|
|
10
|
+
import { CompositeMode as Vt, TranslateMode as Bt, ModifyMode as jt, DrawPolygonByDraggingMode as It, DrawCircleFromCenterMode as mt, DrawRectangleMode as Nt, DrawPolygonMode as Ht, EditableGeoJsonLayer as Gt, MeasureAreaMode as Zt, getPickedEditHandle as zt, MeasureDistanceMode as Kt, ViewMode as Qt } from "@deck.gl-community/editable-layers";
|
|
11
11
|
import { DataFilterExtension as Wt, MaskExtension as Yt } from "@deck.gl/extensions";
|
|
12
12
|
import { EventManager as Jt } from "mjolnir.js";
|
|
13
13
|
import { GeoJsonLayer as Xt } from "@deck.gl/layers";
|
|
@@ -105,16 +105,16 @@ function hs(r) {
|
|
|
105
105
|
...g
|
|
106
106
|
}, e[17] = g, e[18] = b) : b = e[18];
|
|
107
107
|
let _;
|
|
108
|
-
e[19] !== h ? (_ = /* @__PURE__ */
|
|
108
|
+
e[19] !== h ? (_ = /* @__PURE__ */ Z(Ss, { overlayRef: h }), e[19] = h, e[20] = _) : _ = e[20];
|
|
109
109
|
let M;
|
|
110
110
|
e[21] !== l ? (M = () => l({
|
|
111
111
|
type: "load",
|
|
112
112
|
value: !0
|
|
113
113
|
}), e[21] = l, e[22] = M) : M = e[22];
|
|
114
114
|
let P;
|
|
115
|
-
e[23] !== c || e[24] !== M ? (P = /* @__PURE__ */
|
|
115
|
+
e[23] !== c || e[24] !== M ? (P = /* @__PURE__ */ Z(At, { reuseMaps: !1, mapStyle: c, onLoad: M, onRender: gs }), e[23] = c, e[24] = M, e[25] = P) : P = e[25];
|
|
116
116
|
let D;
|
|
117
|
-
return e[26] !== w || e[27] !== t || e[28] !== s || e[29] !== n || e[30] !== o || e[31] !== y || e[32] !== p || e[33] !== u || e[34] !== f || e[35] !== b || e[36] !== _ || e[37] !== P ? (D = /* @__PURE__ */
|
|
117
|
+
return e[26] !== w || e[27] !== t || e[28] !== s || e[29] !== n || e[30] !== o || e[31] !== y || e[32] !== p || e[33] !== u || e[34] !== f || e[35] !== b || e[36] !== _ || e[37] !== P ? (D = /* @__PURE__ */ Z(Ft, { children: /* @__PURE__ */ Z("div", { className: "deckgl-map", children: /* @__PURE__ */ ut(Dt, { controller: t, id: o, ref: u, layers: w, getCursor: s, getTooltip: n, onLoad: f, onViewStateChange: y, parameters: b, ...p, children: [
|
|
118
118
|
_,
|
|
119
119
|
P
|
|
120
120
|
] }) }) }), e[26] = w, e[27] = t, e[28] = s, e[29] = n, e[30] = o, e[31] = y, e[32] = p, e[33] = u, e[34] = f, e[35] = b, e[36] = _, e[37] = P, e[38] = D) : D = e[38], D;
|
|
@@ -178,11 +178,20 @@ function _s({
|
|
|
178
178
|
onViewStateChange: h,
|
|
179
179
|
...g
|
|
180
180
|
}) {
|
|
181
|
-
const p = te(() =>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
const p = te(() => {
|
|
182
|
+
if (typeof l == "boolean")
|
|
183
|
+
return {
|
|
184
|
+
dragPan: l,
|
|
185
|
+
doubleClickZoom: l,
|
|
186
|
+
scrollZoom: l
|
|
187
|
+
};
|
|
188
|
+
const u = l;
|
|
189
|
+
return {
|
|
190
|
+
dragPan: u?.dragPan ?? !0,
|
|
191
|
+
doubleClickZoom: u?.doubleClickZoom ?? !0,
|
|
192
|
+
scrollZoom: u?.scrollZoom ?? !0
|
|
193
|
+
};
|
|
194
|
+
}, [l]), v = te(() => s.filter((u) => !!u?.type).map(({
|
|
186
195
|
type: u,
|
|
187
196
|
props: f
|
|
188
197
|
}) => new u(f)), [s]), m = W(({
|
|
@@ -220,7 +229,7 @@ function _s({
|
|
|
220
229
|
}
|
|
221
230
|
});
|
|
222
231
|
}, [e, h]);
|
|
223
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ Z($t, { apiKey: n, ...o, children: /* @__PURE__ */ Z("div", { className: "deckgl-map", children: /* @__PURE__ */ ut(xt, { id: r, mapTypeId: t, disableDefaultUI: !0, ...i, center: {
|
|
224
233
|
lat: g.initialViewState?.latitude ?? 0,
|
|
225
234
|
lng: g.initialViewState?.longitude ?? 0
|
|
226
235
|
}, zoom: (g.initialViewState?.zoom ?? 0) + 1, tilt: g.initialViewState?.pitch, heading: g.initialViewState?.bearing, onTilesLoaded: () => {
|
|
@@ -229,8 +238,8 @@ function _s({
|
|
|
229
238
|
value: !0
|
|
230
239
|
}), w(g.initialViewState);
|
|
231
240
|
}, onBoundsChanged: (u) => w(m(u)), onZoomChanged: (u) => w(m(u)), scrollwheel: typeof p.scrollZoom == "boolean" ? p.scrollZoom : !!p.scrollZoom, gestureHandling: p.dragPan ? "greedy" : "none", disableDoubleClickZoom: !p.doubleClickZoom, children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ Z(Ms, { id: r, overlayRef: a }),
|
|
242
|
+
/* @__PURE__ */ Z(ws, { id: r, instanceRef: e, layers: v, onLoad: () => {
|
|
234
243
|
y({
|
|
235
244
|
type: "deckgl",
|
|
236
245
|
value: !0
|
|
@@ -299,10 +308,10 @@ function Es(r) {
|
|
|
299
308
|
n?.(k);
|
|
300
309
|
}, T = [D, n], e[19] = D, e[20] = n, e[21] = S, e[22] = T) : (S = e[21], T = e[22]), Q(S, T), j) {
|
|
301
310
|
let k;
|
|
302
|
-
return e[23] !== v || e[24] !== m || e[25] !== b || e[26] !== _ || e[27] !== t || e[28] !== w || e[29] !== s || e[30] !== f || e[31] !== M || e[32] !== o || e[33] !== i ? (k = /* @__PURE__ */
|
|
311
|
+
return e[23] !== v || e[24] !== m || e[25] !== b || e[26] !== _ || e[27] !== t || e[28] !== w || e[29] !== s || e[30] !== f || e[31] !== M || e[32] !== o || e[33] !== i ? (k = /* @__PURE__ */ Z(_s, { instanceRef: s, overlayRef: o, controller: m, id: w, basemap: v, layers: f, gmapsProps: t, getCursor: b, getTooltip: _, onLoad: E, onViewStateChange: M, ...i }), e[23] = v, e[24] = m, e[25] = b, e[26] = _, e[27] = t, e[28] = w, e[29] = s, e[30] = f, e[31] = M, e[32] = o, e[33] = i, e[34] = k) : k = e[34], k;
|
|
303
312
|
}
|
|
304
313
|
let C;
|
|
305
|
-
return e[35] !== m || e[36] !== b || e[37] !== _ || e[38] !== w || e[39] !== s || e[40] !== f || e[41] !== $ || e[42] !== M || e[43] !== o || e[44] !== i ? (C = /* @__PURE__ */
|
|
314
|
+
return e[35] !== m || e[36] !== b || e[37] !== _ || e[38] !== w || e[39] !== s || e[40] !== f || e[41] !== $ || e[42] !== M || e[43] !== o || e[44] !== i ? (C = /* @__PURE__ */ Z(hs, { instanceRef: s, overlayRef: o, controller: m, id: w, layers: f, mapStyle: $, getCursor: b, getTooltip: _, onLoad: E, onViewStateChange: M, ...i }), e[35] = m, e[36] = b, e[37] = _, e[38] = w, e[39] = s, e[40] = f, e[41] = $, e[42] = M, e[43] = o, e[44] = i, e[45] = C) : C = e[45], C;
|
|
306
315
|
}
|
|
307
316
|
function Ts(r) {
|
|
308
317
|
return r;
|
|
@@ -645,7 +654,7 @@ function xs(r) {
|
|
|
645
654
|
e[0] !== s ? (n = $s(s), e[0] = s, e[1] = n) : n = e[1];
|
|
646
655
|
const [o] = se(n);
|
|
647
656
|
let i;
|
|
648
|
-
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */
|
|
657
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ Z(St.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
649
658
|
}
|
|
650
659
|
function x(r) {
|
|
651
660
|
const e = Ne(St);
|
|
@@ -981,9 +990,9 @@ function Hs(r) {
|
|
|
981
990
|
e[0] !== s ? (n = () => Ns(s), e[0] = s, e[1] = n) : n = e[1];
|
|
982
991
|
const [o] = se(n);
|
|
983
992
|
let i;
|
|
984
|
-
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */
|
|
993
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ Z(_t.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
985
994
|
}
|
|
986
|
-
function
|
|
995
|
+
function K(r) {
|
|
987
996
|
const e = Ne(_t);
|
|
988
997
|
if (!Object.keys(e).length)
|
|
989
998
|
throw new Error("Missing LassoToolsProvider in the tree");
|
|
@@ -993,7 +1002,7 @@ function Gs({
|
|
|
993
1002
|
mapId: r,
|
|
994
1003
|
children: e
|
|
995
1004
|
}) {
|
|
996
|
-
const t =
|
|
1005
|
+
const t = K((p) => p.data[r]?.enabled), s = K((p) => p.setEnabled), n = K((p) => p.data[r]?.values), o = K((p) => p.setValue), i = K((p) => p.setVisibility), a = K((p) => p.data[r]?.modeSelected), c = K((p) => p.setModeSelected), l = K((p) => p.data[r]?.modes), y = K((p) => p.setModeInstance);
|
|
997
1006
|
Q(() => {
|
|
998
1007
|
const p = l[a];
|
|
999
1008
|
if (p && t) {
|
|
@@ -1037,11 +1046,11 @@ function Mt({
|
|
|
1037
1046
|
}) {
|
|
1038
1047
|
return Object.values(r ?? {}).filter((e) => e.type === "mask");
|
|
1039
1048
|
}
|
|
1040
|
-
const
|
|
1049
|
+
const Zs = ns({
|
|
1041
1050
|
length: rs
|
|
1042
1051
|
});
|
|
1043
1052
|
function et(r, e) {
|
|
1044
|
-
return
|
|
1053
|
+
return Zs(r).from(nt[N.meter]).to(nt[e]);
|
|
1045
1054
|
}
|
|
1046
1055
|
const tt = 1e4;
|
|
1047
1056
|
function Le({
|
|
@@ -1105,7 +1114,7 @@ function Et(r, e, t) {
|
|
|
1105
1114
|
}
|
|
1106
1115
|
return [];
|
|
1107
1116
|
}
|
|
1108
|
-
class
|
|
1117
|
+
class zs extends Zt {
|
|
1109
1118
|
_isMeasuringSessionFinished = !1;
|
|
1110
1119
|
area = 0;
|
|
1111
1120
|
tooltips = [];
|
|
@@ -1117,7 +1126,7 @@ class Ks extends zt {
|
|
|
1117
1126
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
1118
1127
|
const {
|
|
1119
1128
|
picks: s
|
|
1120
|
-
} = e, n =
|
|
1129
|
+
} = e, n = zt(s), o = this.getClickSequence();
|
|
1121
1130
|
let i = !1;
|
|
1122
1131
|
!n && !this.allowOverlapping(t) && (this.addClickSequence(e), i = !0), this.area = Qe({
|
|
1123
1132
|
type: "Polygon",
|
|
@@ -1220,7 +1229,7 @@ class Ks extends zt {
|
|
|
1220
1229
|
}) + "2";
|
|
1221
1230
|
}
|
|
1222
1231
|
}
|
|
1223
|
-
class
|
|
1232
|
+
class Ks extends mt {
|
|
1224
1233
|
_isMeasuringSessionFinished = !1;
|
|
1225
1234
|
_currentArea = 0;
|
|
1226
1235
|
resultPolygon = {
|
|
@@ -1293,7 +1302,7 @@ class Zs extends mt {
|
|
|
1293
1302
|
}) + "2";
|
|
1294
1303
|
}
|
|
1295
1304
|
}
|
|
1296
|
-
class Tt extends
|
|
1305
|
+
class Tt extends Kt {
|
|
1297
1306
|
handleClick(e, t) {
|
|
1298
1307
|
super.handleClick(e, t), t.onEdit({
|
|
1299
1308
|
// data is the same
|
|
@@ -1465,11 +1474,11 @@ const re = "mapMeasureLayer", Qs = {
|
|
|
1465
1474
|
},
|
|
1466
1475
|
buffer: {
|
|
1467
1476
|
value: "buffer",
|
|
1468
|
-
mode:
|
|
1477
|
+
mode: Ks
|
|
1469
1478
|
},
|
|
1470
1479
|
area: {
|
|
1471
1480
|
value: "area",
|
|
1472
|
-
mode:
|
|
1481
|
+
mode: zs
|
|
1473
1482
|
}
|
|
1474
1483
|
}, Xs = {
|
|
1475
1484
|
distance: rt,
|
|
@@ -1523,7 +1532,7 @@ function nn({
|
|
|
1523
1532
|
layerProps: n = {},
|
|
1524
1533
|
defaultType: o = "mask"
|
|
1525
1534
|
}) {
|
|
1526
|
-
const i =
|
|
1535
|
+
const i = K((E) => E.data[e]?.enabled), a = K((E) => E.setEnabled), c = K((E) => E.data[e]?.values), l = K((E) => E.setValue), y = K((E) => E.data[e]?.modeInstance), h = K((E) => E.data[e]?.modeSelected), g = de((E) => E.setLayer), p = x((E) => E.addLayers), v = x((E) => E.removeLayers), m = x(yt((E) => E.maps[e]?.layers.filter((F) => !sn.includes(F)))), w = x((E) => E.getDeckInstance), u = Me({});
|
|
1527
1536
|
Lt({
|
|
1528
1537
|
mapId: e,
|
|
1529
1538
|
layerId: le
|
|
@@ -1836,7 +1845,7 @@ function ln(r) {
|
|
|
1836
1845
|
e[0] !== s ? (n = an(s), e[0] = s, e[1] = n) : n = e[1];
|
|
1837
1846
|
const [o] = se(n);
|
|
1838
1847
|
let i;
|
|
1839
|
-
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */
|
|
1848
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ Z(Pt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1840
1849
|
}
|
|
1841
1850
|
function G(r) {
|
|
1842
1851
|
const e = Ne(Pt);
|
|
@@ -1897,9 +1906,9 @@ function kt(r) {
|
|
|
1897
1906
|
const B = R;
|
|
1898
1907
|
let H;
|
|
1899
1908
|
e[37] !== t ? (H = (A) => A.measurements[t].positions, e[37] = t, e[38] = H) : H = e[38];
|
|
1900
|
-
const V = G(H),
|
|
1909
|
+
const V = G(H), z = G(un);
|
|
1901
1910
|
let me;
|
|
1902
|
-
e[39] !==
|
|
1911
|
+
e[39] !== z || e[40] !== t ? (me = (A) => z(t, A), e[39] = z, e[40] = t, e[41] = me) : me = e[41];
|
|
1903
1912
|
const ue = me;
|
|
1904
1913
|
let ye;
|
|
1905
1914
|
e[42] !== t ? (ye = (A) => A.measurements[t].unit, e[42] = t, e[43] = ye) : ye = e[43];
|
|
@@ -2103,7 +2112,7 @@ function vn(r) {
|
|
|
2103
2112
|
let S, T;
|
|
2104
2113
|
e[24] !== p || e[25] !== q || e[26] !== s || e[27] !== $ || e[28] !== _ ? (S = () => {
|
|
2105
2114
|
$?.forEach((B) => {
|
|
2106
|
-
const H = q(s)?.props.layers.find((
|
|
2115
|
+
const H = q(s)?.props.layers.find((z) => z.props.id === B);
|
|
2107
2116
|
p && (U.current[B] = H?.props.pickable);
|
|
2108
2117
|
const V = !p && (U.current[B] ?? H?.props.pickable);
|
|
2109
2118
|
_(B, {
|
|
@@ -2124,8 +2133,8 @@ function vn(r) {
|
|
|
2124
2133
|
return;
|
|
2125
2134
|
}
|
|
2126
2135
|
H === J.addPosition && h(V.distance), m(!!V.finished);
|
|
2127
|
-
const
|
|
2128
|
-
|
|
2136
|
+
const z = V.positions;
|
|
2137
|
+
z?.length && u(z);
|
|
2129
2138
|
}, e[31] = b, e[32] = h, e[33] = m, e[34] = u, e[35] = C) : C = e[35];
|
|
2130
2139
|
const k = C;
|
|
2131
2140
|
let L, R;
|
|
@@ -2257,7 +2266,7 @@ function eo(r) {
|
|
|
2257
2266
|
}, e[34] = T, e[35] = t, e[36] = M, e[37] = C) : C = e[37];
|
|
2258
2267
|
const k = C;
|
|
2259
2268
|
let L;
|
|
2260
|
-
return e[38] !== a || e[39] !== q || e[40] !== w || e[41] !== S || e[42] !== k || e[43] !== F || e[44] !== U || e[45] !== t || e[46] !== l || e[47] !== h || e[48] !== o || e[49] !== v ? (L = /* @__PURE__ */
|
|
2269
|
+
return e[38] !== a || e[39] !== q || e[40] !== w || e[41] !== S || e[42] !== k || e[43] !== F || e[44] !== U || e[45] !== t || e[46] !== l || e[47] !== h || e[48] !== o || e[49] !== v ? (L = /* @__PURE__ */ Z(Es, { ...o, controller: w, id: t, layers: q, instanceRef: l, overlayRef: h, basemap: a, initialViewState: v, onLoad: F, onViewStateChange: U, onAfterRender: S, onDragEnd: k }), e[38] = a, e[39] = q, e[40] = w, e[41] = S, e[42] = k, e[43] = F, e[44] = U, e[45] = t, e[46] = l, e[47] = h, e[48] = o, e[49] = v, e[50] = L) : L = e[50], L;
|
|
2261
2270
|
}
|
|
2262
2271
|
function On(r) {
|
|
2263
2272
|
return r?.isLoaded;
|
|
@@ -2571,9 +2580,9 @@ function xn() {
|
|
|
2571
2580
|
headers: j(L.getAllResponseHeaders() || "")
|
|
2572
2581
|
};
|
|
2573
2582
|
k.url.indexOf("file://") === 0 && (L.status < 200 || L.status > 599) ? V.status = 200 : V.status = L.status, V.url = "responseURL" in L ? L.responseURL : V.headers.get("X-Request-URL");
|
|
2574
|
-
var
|
|
2583
|
+
var z = "response" in L ? L.response : L.responseText;
|
|
2575
2584
|
setTimeout(function() {
|
|
2576
|
-
T(new U(
|
|
2585
|
+
T(new U(z, V));
|
|
2577
2586
|
}, 0);
|
|
2578
2587
|
}, L.onerror = function() {
|
|
2579
2588
|
setTimeout(function() {
|
|
@@ -2599,12 +2608,12 @@ function xn() {
|
|
|
2599
2608
|
var H = [];
|
|
2600
2609
|
Object.getOwnPropertyNames(S.headers).forEach(function(V) {
|
|
2601
2610
|
H.push(g(V)), L.setRequestHeader(V, p(S.headers[V]));
|
|
2602
|
-
}), k.headers.forEach(function(V,
|
|
2603
|
-
H.indexOf(
|
|
2611
|
+
}), k.headers.forEach(function(V, z) {
|
|
2612
|
+
H.indexOf(z) === -1 && L.setRequestHeader(z, V);
|
|
2604
2613
|
});
|
|
2605
2614
|
} else
|
|
2606
|
-
k.headers.forEach(function(V,
|
|
2607
|
-
L.setRequestHeader(
|
|
2615
|
+
k.headers.forEach(function(V, z) {
|
|
2616
|
+
L.setRequestHeader(z, V);
|
|
2608
2617
|
});
|
|
2609
2618
|
k.signal && (k.signal.addEventListener("abort", R), L.onreadystatechange = function() {
|
|
2610
2619
|
L.readyState === 4 && k.signal.removeEventListener("abort", R);
|
|
@@ -2619,7 +2628,7 @@ function xn() {
|
|
|
2619
2628
|
}(_e, _e.exports)), _e.exports;
|
|
2620
2629
|
}
|
|
2621
2630
|
var Un = xn();
|
|
2622
|
-
const qn = /* @__PURE__ */ vt(Un),
|
|
2631
|
+
const qn = /* @__PURE__ */ vt(Un), Ze = "https://gcp-us-east1.api.carto.com", ze = "v3", Vn = "ps", ce = {
|
|
2623
2632
|
get: "GET",
|
|
2624
2633
|
post: "POST"
|
|
2625
2634
|
};
|
|
@@ -2712,9 +2721,9 @@ function Nn() {
|
|
|
2712
2721
|
return qe = w, qe;
|
|
2713
2722
|
}
|
|
2714
2723
|
var Hn = Nn();
|
|
2715
|
-
const
|
|
2724
|
+
const Ke = /* @__PURE__ */ In(Hn);
|
|
2716
2725
|
function lt(r) {
|
|
2717
|
-
return
|
|
2726
|
+
return Ke({
|
|
2718
2727
|
method: ce.get,
|
|
2719
2728
|
headers: {
|
|
2720
2729
|
Accept: "application/json"
|
|
@@ -2722,7 +2731,7 @@ function lt(r) {
|
|
|
2722
2731
|
}, r);
|
|
2723
2732
|
}
|
|
2724
2733
|
function Ve(r, e) {
|
|
2725
|
-
return
|
|
2734
|
+
return Ke({
|
|
2726
2735
|
method: ce.post,
|
|
2727
2736
|
headers: {
|
|
2728
2737
|
Accept: "application/json",
|
|
@@ -2738,14 +2747,14 @@ const Gn = {
|
|
|
2738
2747
|
PATCH: Ve,
|
|
2739
2748
|
DELETE: lt
|
|
2740
2749
|
};
|
|
2741
|
-
function
|
|
2750
|
+
function Zn({
|
|
2742
2751
|
body: r,
|
|
2743
2752
|
accessToken: e,
|
|
2744
2753
|
method: t,
|
|
2745
2754
|
...s
|
|
2746
2755
|
}) {
|
|
2747
2756
|
let n = e;
|
|
2748
|
-
return n && !n.includes("Bearer") && (n = "Bearer " + n), Gn[t](
|
|
2757
|
+
return n && !n.includes("Bearer") && (n = "Bearer " + n), Gn[t](Ke({
|
|
2749
2758
|
method: t,
|
|
2750
2759
|
headers: {
|
|
2751
2760
|
...!!n && {
|
|
@@ -2754,7 +2763,7 @@ function zn({
|
|
|
2754
2763
|
}
|
|
2755
2764
|
}, s), r);
|
|
2756
2765
|
}
|
|
2757
|
-
const
|
|
2766
|
+
const zn = 6144;
|
|
2758
2767
|
async function Ot({
|
|
2759
2768
|
signal: r,
|
|
2760
2769
|
body: e,
|
|
@@ -2766,7 +2775,7 @@ async function Ot({
|
|
|
2766
2775
|
requestOptions: {
|
|
2767
2776
|
getMaxUrlLength: a
|
|
2768
2777
|
} = {
|
|
2769
|
-
getMaxUrlLength:
|
|
2778
|
+
getMaxUrlLength: zn
|
|
2770
2779
|
},
|
|
2771
2780
|
...c
|
|
2772
2781
|
}) {
|
|
@@ -2775,7 +2784,7 @@ async function Ot({
|
|
|
2775
2784
|
params: o
|
|
2776
2785
|
}), y = e, h = n;
|
|
2777
2786
|
n === ce.get && l.length > a && (y = o, h = ce.post, l = i);
|
|
2778
|
-
const g =
|
|
2787
|
+
const g = Zn({
|
|
2779
2788
|
body: y,
|
|
2780
2789
|
accessToken: t ?? s?.accessToken,
|
|
2781
2790
|
method: h,
|
|
@@ -2801,9 +2810,9 @@ const Ee = ft()(fs((r, e) => ({
|
|
|
2801
2810
|
sources: o
|
|
2802
2811
|
};
|
|
2803
2812
|
const a = o[t], c = {
|
|
2804
|
-
apiBaseUrl:
|
|
2813
|
+
apiBaseUrl: Ze,
|
|
2805
2814
|
clientId: Vn,
|
|
2806
|
-
apiVersion:
|
|
2815
|
+
apiVersion: ze,
|
|
2807
2816
|
...a,
|
|
2808
2817
|
...s
|
|
2809
2818
|
}, l = Yn({
|
|
@@ -2869,7 +2878,7 @@ const Ee = ft()(fs((r, e) => ({
|
|
|
2869
2878
|
}, s);
|
|
2870
2879
|
}
|
|
2871
2880
|
})));
|
|
2872
|
-
function
|
|
2881
|
+
function Kn(r) {
|
|
2873
2882
|
const e = O(2);
|
|
2874
2883
|
let t;
|
|
2875
2884
|
return e[0] !== r ? (t = (s) => s.sources[r], e[0] = r, e[1] = t) : t = e[1], Ee(t);
|
|
@@ -2991,7 +3000,7 @@ function Xn(r, e) {
|
|
|
2991
3000
|
return bt(r, e);
|
|
2992
3001
|
}
|
|
2993
3002
|
function er(r, e) {
|
|
2994
|
-
const t =
|
|
3003
|
+
const t = Kn(e);
|
|
2995
3004
|
return te(() => {
|
|
2996
3005
|
const s = t?.widgets;
|
|
2997
3006
|
return !s || !r ? null : (s.props.accessToken = r, s);
|
|
@@ -3005,23 +3014,23 @@ function sr(r) {
|
|
|
3005
3014
|
return JSON.stringify(e);
|
|
3006
3015
|
}
|
|
3007
3016
|
function ie(r) {
|
|
3008
|
-
const e = O(
|
|
3017
|
+
const e = O(13), {
|
|
3009
3018
|
accessToken: t,
|
|
3010
3019
|
sourceId: s,
|
|
3011
3020
|
widgetProps: n,
|
|
3012
3021
|
additionalFilter: o
|
|
3013
|
-
} = r, i = Jn(s, o), a = er(t, s), c = a?.props.headers;
|
|
3014
|
-
let l;
|
|
3015
|
-
e[0] !== c ? (l = sr(c), e[0] = c, e[1] = l) : l = e[1];
|
|
3022
|
+
} = r, i = Jn(s, o), a = er(t, s), c = a?.props.queryParameters, l = a?.props.headers;
|
|
3016
3023
|
let y;
|
|
3017
|
-
e[
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3024
|
+
e[0] !== l ? (y = sr(l), e[0] = l, e[1] = y) : y = e[1];
|
|
3025
|
+
let h;
|
|
3026
|
+
e[2] !== t || e[3] !== i || e[4] !== s || e[5] !== c || e[6] !== y || e[7] !== n ? (h = [s, t, n, c, i, y], e[2] = t, e[3] = i, e[4] = s, e[5] = c, e[6] = y, e[7] = n, e[8] = h) : h = e[8];
|
|
3027
|
+
const g = h;
|
|
3028
|
+
let p;
|
|
3029
|
+
return e[9] !== i || e[10] !== g || e[11] !== a ? (p = {
|
|
3021
3030
|
mergedFilters: i,
|
|
3022
3031
|
widgetModel: a,
|
|
3023
|
-
queryKey:
|
|
3024
|
-
}, e[
|
|
3032
|
+
queryKey: g
|
|
3033
|
+
}, e[9] = i, e[10] = g, e[11] = a, e[12] = p) : p = e[12], p;
|
|
3025
3034
|
}
|
|
3026
3035
|
function nr(r) {
|
|
3027
3036
|
const e = O(21), {
|
|
@@ -3526,11 +3535,11 @@ function po(r) {
|
|
|
3526
3535
|
e[2] !== o ? (c = o === void 0 ? [] : o, e[2] = o, e[3] = c) : c = e[3];
|
|
3527
3536
|
const l = c;
|
|
3528
3537
|
let y;
|
|
3529
|
-
e[4] !== t || e[5] !== l ? (y = /* @__PURE__ */
|
|
3538
|
+
e[4] !== t || e[5] !== l ? (y = /* @__PURE__ */ Z(ln, { values: l, children: t }), e[4] = t, e[5] = l, e[6] = y) : y = e[6];
|
|
3530
3539
|
let h;
|
|
3531
|
-
e[7] !== a || e[8] !== y ? (h = /* @__PURE__ */
|
|
3540
|
+
e[7] !== a || e[8] !== y ? (h = /* @__PURE__ */ Z(Hs, { values: a, children: y }), e[7] = a, e[8] = y, e[9] = h) : h = e[9];
|
|
3532
3541
|
let g;
|
|
3533
|
-
return e[10] !== s || e[11] !== h ? (g = /* @__PURE__ */
|
|
3542
|
+
return e[10] !== s || e[11] !== h ? (g = /* @__PURE__ */ Z(xs, { values: s, children: h }), e[10] = s, e[11] = h, e[12] = g) : g = e[12], g;
|
|
3534
3543
|
}
|
|
3535
3544
|
function mo(r, e) {
|
|
3536
3545
|
const t = de((l) => l.layers), s = de((l) => l.setLayer), n = te(() => Ct(r.map((l) => t[l]).filter((l) => !!l?.legend)).toReversed(), [t, r]), o = te(() => n.map(e), [e, n]), i = W(({
|
|
@@ -3662,7 +3671,7 @@ function fr(r) {
|
|
|
3662
3671
|
} = r;
|
|
3663
3672
|
let s;
|
|
3664
3673
|
e[0] !== t ? (s = (i) => i.data[t]?.values, e[0] = t, e[1] = s) : s = e[1];
|
|
3665
|
-
const n =
|
|
3674
|
+
const n = K(s);
|
|
3666
3675
|
let o;
|
|
3667
3676
|
e: {
|
|
3668
3677
|
let i;
|
|
@@ -3832,7 +3841,7 @@ function Tr(r) {
|
|
|
3832
3841
|
return r.setZoom;
|
|
3833
3842
|
}
|
|
3834
3843
|
async function Lr({
|
|
3835
|
-
baseUrl: r =
|
|
3844
|
+
baseUrl: r = Ze,
|
|
3836
3845
|
connection: e,
|
|
3837
3846
|
accessToken: t,
|
|
3838
3847
|
query: s,
|
|
@@ -3843,7 +3852,7 @@ async function Lr({
|
|
|
3843
3852
|
} = {},
|
|
3844
3853
|
queryParameters: a,
|
|
3845
3854
|
params: c,
|
|
3846
|
-
apiVersion: l =
|
|
3855
|
+
apiVersion: l = ze
|
|
3847
3856
|
}) {
|
|
3848
3857
|
const y = `${r}/${l}/stats/${e}/${n}`;
|
|
3849
3858
|
return Ot({
|
|
@@ -3860,7 +3869,7 @@ async function Lr({
|
|
|
3860
3869
|
});
|
|
3861
3870
|
}
|
|
3862
3871
|
async function Pr({
|
|
3863
|
-
baseUrl: r =
|
|
3872
|
+
baseUrl: r = Ze,
|
|
3864
3873
|
connection: e,
|
|
3865
3874
|
accessToken: t,
|
|
3866
3875
|
table: s,
|
|
@@ -3870,7 +3879,7 @@ async function Pr({
|
|
|
3870
3879
|
signal: i,
|
|
3871
3880
|
...a
|
|
3872
3881
|
} = {},
|
|
3873
|
-
apiVersion: c =
|
|
3882
|
+
apiVersion: c = ze
|
|
3874
3883
|
}) {
|
|
3875
3884
|
const l = `${r}/${c}/stats/${e}/${s}/${n}`;
|
|
3876
3885
|
return Ot({
|
|
@@ -3992,8 +4001,8 @@ export {
|
|
|
3992
4001
|
no as CategoriesModel,
|
|
3993
4002
|
qs as CustomCompositeEditMode,
|
|
3994
4003
|
wt as CustomEditableGeojsonLayer,
|
|
3995
|
-
|
|
3996
|
-
|
|
4004
|
+
zs as CustomMeasureAreaMode,
|
|
4005
|
+
Ks as CustomMeasureBufferMode,
|
|
3997
4006
|
Tt as CustomMeasureDistanceMode,
|
|
3998
4007
|
Je as DEFAULT_LASSO_TOOLS_COLORS,
|
|
3999
4008
|
Vs as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
@@ -4056,7 +4065,7 @@ export {
|
|
|
4056
4065
|
or as useFormula,
|
|
4057
4066
|
ir as useHistogram,
|
|
4058
4067
|
fr as useLassoToolsSpatialFilter,
|
|
4059
|
-
|
|
4068
|
+
K as useLassoToolsState,
|
|
4060
4069
|
de as useLayerStore,
|
|
4061
4070
|
Ln as useLayers,
|
|
4062
4071
|
mo as useLegend,
|
|
@@ -4065,7 +4074,7 @@ export {
|
|
|
4065
4074
|
G as useMeasurementToolsState,
|
|
4066
4075
|
ar as useRange,
|
|
4067
4076
|
lr as useScatter,
|
|
4068
|
-
|
|
4077
|
+
Kn as useSource,
|
|
4069
4078
|
Ee as useSourceStore,
|
|
4070
4079
|
to as useSourceWithFilters,
|
|
4071
4080
|
ho as useSpatialFilter,
|