@carto/ps-react-maps 1.3.1 → 1.3.3-alpha.0

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.
Files changed (29) hide show
  1. package/dist/index.cjs +10 -10
  2. package/dist/index.js +881 -542
  3. package/dist/types/assets/icons/ruler.d.ts +2 -0
  4. package/dist/types/common-stories/maps/deckgl-maps.component.d.ts +2 -0
  5. package/dist/types/common-stories/maps/google-maps.component.d.ts +3 -0
  6. package/dist/types/common-stories/maps/map-container.component.d.ts +4 -0
  7. package/dist/types/common-stories/maps/map.component.d.ts +2 -0
  8. package/dist/types/index.d.ts +1 -0
  9. package/dist/types/map-measurement-tool/custom-editable-geojson-layer.class.d.ts +10 -0
  10. package/dist/types/map-measurement-tool/custom-measurement-distance-mode.class.d.ts +6 -0
  11. package/dist/types/map-measurement-tool/index.d.ts +8 -0
  12. package/dist/types/map-measurement-tool/map-measurement-tool.component.d.ts +6 -0
  13. package/dist/types/map-measurement-tool/map-measurement-tool.const.d.ts +29 -0
  14. package/dist/types/map-measurement-tool/map-measurement-tool.context.d.ts +5 -0
  15. package/dist/types/map-measurement-tool/map-measurement-tool.hook.d.ts +2 -0
  16. package/dist/types/map-measurement-tool/map-measurement-tool.layer.d.ts +3 -0
  17. package/dist/types/map-measurement-tool/map-measurement-tool.provider.d.ts +2 -0
  18. package/dist/types/map-measurement-tool/map-measurement-tool.reducer.d.ts +13 -0
  19. package/dist/types/map-measurement-tool/map-measurement-tool.styles.d.ts +28 -0
  20. package/dist/types/map-measurement-tool/map-measurement-tool.types.d.ts +60 -0
  21. package/dist/types/map-measurement-tool/map-measurement-tool.util.d.ts +7 -0
  22. package/dist/types/map-provider/index.d.ts +1 -1
  23. package/dist/types/map-provider/map-provider.context.d.ts +1 -0
  24. package/dist/types/map-provider/map-provider.hook.d.ts +1 -1
  25. package/dist/types/utils/get-map-type/get-map-type.d.ts +1 -0
  26. package/dist/types/utils/get-map-type/index.d.ts +2 -0
  27. package/dist/types/utils/get-map-type/is-gmaps.d.ts +1 -0
  28. package/dist/types/utils/index.d.ts +1 -0
  29. package/package.json +9 -2
package/dist/index.js CHANGED
@@ -1,24 +1,27 @@
1
- import Ue, { createContext as se, useContext as ue, useReducer as wr, useRef as Fe, useCallback as I } from "react";
2
- var Tr = /* @__PURE__ */ ((r) => (r.Roadmap = "roadmap", r.Satellite = "satellite", r.Hybrid = "hybrid", r))(Tr || {}), Cr = /* @__PURE__ */ ((r) => (r.DarkMatter = "dark-matter", r.Positron = "positron", r.Voyager = "voyager", r))(Cr || {});
3
- const ae = {
1
+ import Je, { createContext as J, useContext as K, useCallback as M, useReducer as Ke, useRef as pe, useMemo as Yt } from "react";
2
+ import { EditableGeoJsonLayer as Bt } from "@nebula.gl/layers";
3
+ import { MeasureDistanceMode as Wt } from "@nebula.gl/edit-modes";
4
+ import { EventManager as Ht } from "mjolnir.js";
5
+ var zt = /* @__PURE__ */ ((t) => (t.Roadmap = "roadmap", t.Satellite = "satellite", t.Hybrid = "hybrid", t))(zt || {}), qt = /* @__PURE__ */ ((t) => (t.DarkMatter = "dark-matter", t.Positron = "positron", t.Voyager = "voyager", t))(qt || {});
6
+ const de = {
4
7
  positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
5
8
  voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
6
9
  "dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
7
10
  };
8
- var Or = /* @__PURE__ */ ((r) => (r.Maplibre = "maplibre", r.GoogleMaps = "google-maps", r))(Or || {});
9
- const Ae = {
11
+ var Xe = /* @__PURE__ */ ((t) => (t.Maplibre = "maplibre", t.GoogleMaps = "google-maps", t))(Xe || {});
12
+ const ve = {
10
13
  positron: {
11
- url: ae.positron,
14
+ url: de.positron,
12
15
  type: "maplibre"
13
16
  /* Maplibre */
14
17
  },
15
18
  voyager: {
16
- url: ae.voyager,
19
+ url: de.voyager,
17
20
  type: "maplibre"
18
21
  /* Maplibre */
19
22
  },
20
23
  "dark-matter": {
21
- url: ae[
24
+ url: de[
22
25
  "dark-matter"
23
26
  /* DarkMatter */
24
27
  ],
@@ -37,9 +40,9 @@ const Ae = {
37
40
  type: "google-maps"
38
41
  /* GoogleMaps */
39
42
  }
40
- }, V = () => {
43
+ }, Y = () => {
41
44
  throw new Error("You forgot to wrap your component in <MapProvider>.");
42
- }, B = {
45
+ }, q = {
43
46
  state: {
44
47
  maps: {}
45
48
  // sync: false,
@@ -49,128 +52,137 @@ const Ae = {
49
52
  },
50
53
  actions: {
51
54
  // toggleSync: stub,
52
- setViewState: V,
53
- setBasemap: V,
54
- setResize: V,
55
- setZoom: V,
56
- setLoaded: V
55
+ setViewState: Y,
56
+ setBasemap: Y,
57
+ setResize: Y,
58
+ setZoom: Y,
59
+ setLoaded: Y
57
60
  }
58
- }, Ne = se(
59
- B.state
60
- ), Ve = se(B.references), Ye = se(
61
- B.actions
61
+ }, Qe = J(
62
+ q.state
63
+ ), et = J(q.references), tt = J(
64
+ q.actions
62
65
  );
63
- var D = /* @__PURE__ */ ((r) => (r.SetViewState = "SetViewState", r.SetBasemap = "SetBasemap", r.SetResize = "SetResize", r.SetZoom = "SetZoom", r.SetLoaded = "SetLoaded", r))(D || {});
64
- function Pr(r, { type: s, payload: d }) {
66
+ var F = /* @__PURE__ */ ((t) => (t.SetViewState = "SetViewState", t.SetBasemap = "SetBasemap", t.SetResize = "SetResize", t.SetZoom = "SetZoom", t.SetLoaded = "SetLoaded", t))(F || {});
67
+ function Gt(t, { type: n, payload: a }) {
65
68
  return {
66
69
  SetViewState: () => {
67
- const { id: o, viewState: y } = d, l = { ...r.maps };
68
- return l[o] = {
69
- ...r.maps[o],
70
- viewState: y
70
+ const { id: i, viewState: v } = a, l = { ...t.maps };
71
+ return l[i] = {
72
+ ...t.maps[i],
73
+ viewState: v
71
74
  }, {
72
- ...r,
75
+ ...t,
73
76
  maps: l
74
77
  };
75
78
  },
76
79
  SetResize: () => {
77
- const { id: o, width: y, height: l } = d, b = { ...r.maps };
78
- return b[o] = {
79
- ...r.maps[o],
80
+ const { id: i, width: v, height: l } = a, h = { ...t.maps };
81
+ return h[i] = {
82
+ ...t.maps[i],
80
83
  viewState: {
81
- ...r.maps[o].viewState,
82
- width: y,
84
+ ...t.maps[i].viewState,
85
+ width: v,
83
86
  height: l
84
87
  }
85
88
  }, {
86
- ...r,
87
- maps: b
89
+ ...t,
90
+ maps: h
88
91
  };
89
92
  },
90
93
  SetBasemap: () => {
91
- const { id: o, basemap: y } = d, l = { ...r.maps }, { basemap: b } = l[o], u = Ae[b]?.type, R = Ae[y]?.type, g = u === R;
92
- return l[o] = {
93
- ...r.maps[o],
94
- basemap: y,
95
- isLoaded: g
94
+ const { id: i, basemap: v } = a, l = { ...t.maps }, { basemap: h } = l[i], u = ve[h]?.type, y = ve[v]?.type, E = u === y;
95
+ return l[i] = {
96
+ ...t.maps[i],
97
+ basemap: v,
98
+ isLoaded: E
96
99
  }, {
97
- ...r,
100
+ ...t,
98
101
  maps: l
99
102
  };
100
103
  },
101
104
  SetZoom: () => {
102
- const { id: o, zoom: y } = d, l = { ...r.maps };
103
- return l[o] = {
104
- ...r.maps[o],
105
+ const { id: i, zoom: v } = a, l = { ...t.maps };
106
+ return l[i] = {
107
+ ...t.maps[i],
105
108
  viewState: {
106
- ...r.maps[o].viewState,
107
- zoom: y
109
+ ...t.maps[i].viewState,
110
+ zoom: v
108
111
  }
109
112
  }, {
110
- ...r,
113
+ ...t,
111
114
  maps: l
112
115
  };
113
116
  },
114
117
  SetLoaded: () => {
115
- const { id: o, value: y } = d, l = { ...r.maps };
116
- return l[o] = {
117
- ...r.maps[o],
118
- isLoaded: y
118
+ const { id: i, value: v } = a, l = { ...t.maps };
119
+ return l[i] = {
120
+ ...t.maps[i],
121
+ isLoaded: v
119
122
  }, {
120
- ...r,
123
+ ...t,
121
124
  maps: l
122
125
  };
123
126
  }
124
- }[s]?.() ?? r;
127
+ }[n]?.() ?? t;
125
128
  }
126
- function xr(r) {
127
- return ue(Ne).maps[r];
129
+ function rt(t) {
130
+ return K(Qe).maps[t];
128
131
  }
129
- function $e(r) {
130
- const s = ue(Ve), { instanceRef: d, overlayRef: _ } = s.current[r], o = () => {
131
- const R = d?.current;
132
- return R?.deck || R?._deck;
133
- }, y = () => _?.current, l = () => o()._getViewState(), b = (R) => o()?.getViewports(R);
132
+ function ge(t) {
133
+ const n = K(et), { instanceRef: a, overlayRef: c } = n.current[t], i = M(() => {
134
+ const y = a?.current;
135
+ return y?.deck || y?._deck;
136
+ }, [a]), v = M(() => c?.current, [c]), l = M(() => i()._getViewState(), [i]), h = M(
137
+ (y) => i()?.getViewports(y),
138
+ [i]
139
+ ), u = M(
140
+ (y = 0, E) => h(E)?.[y],
141
+ [h]
142
+ );
134
143
  return {
135
- instanceRef: d,
136
- overlayRef: _,
137
- getDeckInstance: o,
138
- getOverlayInstance: y,
144
+ instanceRef: a,
145
+ overlayRef: c,
146
+ getDeckInstance: i,
147
+ getOverlayInstance: v,
139
148
  getViewState: l,
140
- getViewport: (R = 0, g) => b(g)?.[R],
141
- getViewports: b
149
+ getViewport: u,
150
+ getViewports: h
142
151
  };
143
152
  }
144
- function jr(r) {
145
- const { setBasemap: s, setResize: d, setViewState: _, setZoom: o, setLoaded: y } = ue(Ye), { getViewport: l } = $e(r);
153
+ function Zt(t) {
154
+ const { setBasemap: n, setResize: a, setViewState: c, setZoom: i, setLoaded: v } = K(tt), { getViewport: l } = ge(t);
146
155
  return {
147
- setBasemap: (u) => s(u, r),
148
- setResize: (u) => d(u, r),
149
- setViewState: (u) => _(u, r),
150
- setZoom: (u) => o(u, r),
151
- setLoaded: (u) => y(u, r),
156
+ setBasemap: (u) => n(u, t),
157
+ setResize: (u) => a(u, t),
158
+ setViewState: (u) => c(u, t),
159
+ setZoom: (u) => i(u, t),
160
+ setLoaded: (u) => v(u, t),
152
161
  fitBounds: (u, {
153
- boundsOptions: R,
154
- viewStateOptions: g
162
+ boundsOptions: y,
163
+ viewStateOptions: E
155
164
  } = {}) => {
156
- const w = l(), { latitude: C, longitude: p, zoom: v } = w.fitBounds(
165
+ const _ = l(), { latitude: O, longitude: m, zoom: g } = _.fitBounds(
157
166
  u,
158
- R
167
+ y
159
168
  );
160
- _({ ...g, latitude: C, longitude: p, zoom: v }, r);
169
+ c({ ...E, latitude: O, longitude: m, zoom: g }, t);
161
170
  }
162
171
  };
163
172
  }
164
- function Yr(r) {
165
- return xr(r);
173
+ function kr(t) {
174
+ return rt(t);
166
175
  }
167
- function $r(r) {
168
- return $e(r);
176
+ function Lr(t) {
177
+ return ge(t);
169
178
  }
170
- function Br(r) {
171
- return jr(r);
179
+ function Ir(t) {
180
+ return Zt(t);
172
181
  }
173
- var ie = { exports: {} }, Y = {};
182
+ function Jt(t) {
183
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
184
+ }
185
+ var me = { exports: {} }, B = {};
174
186
  /**
175
187
  * @license React
176
188
  * react-jsx-runtime.development.js
@@ -180,91 +192,91 @@ var ie = { exports: {} }, Y = {};
180
192
  * This source code is licensed under the MIT license found in the
181
193
  * LICENSE file in the root directory of this source tree.
182
194
  */
183
- var Me;
184
- function kr() {
185
- return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
186
- var r = Ue, s = Symbol.for("react.element"), d = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), b = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, j = "@@iterator";
187
- function W(e) {
195
+ var Be;
196
+ function Kt() {
197
+ return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
198
+ var t = Je, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), h = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), g = Symbol.iterator, x = "@@iterator";
199
+ function T(e) {
188
200
  if (e === null || typeof e != "object")
189
201
  return null;
190
- var t = v && e[v] || e[j];
191
- return typeof t == "function" ? t : null;
202
+ var r = g && e[g] || e[x];
203
+ return typeof r == "function" ? r : null;
192
204
  }
193
- var k = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
194
- function S(e) {
205
+ var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
206
+ function w(e) {
195
207
  {
196
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
197
- n[a - 1] = arguments[a];
198
- ze("error", e, n);
208
+ for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
209
+ o[s - 1] = arguments[s];
210
+ ct("error", e, o);
199
211
  }
200
212
  }
201
- function ze(e, t, n) {
213
+ function ct(e, r, o) {
202
214
  {
203
- var a = k.ReactDebugCurrentFrame, f = a.getStackAddendum();
204
- f !== "" && (t += "%s", n = n.concat([f]));
205
- var m = n.map(function(c) {
206
- return String(c);
215
+ var s = P.ReactDebugCurrentFrame, p = s.getStackAddendum();
216
+ p !== "" && (r += "%s", o = o.concat([p]));
217
+ var b = o.map(function(d) {
218
+ return String(d);
207
219
  });
208
- m.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, m);
220
+ b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
209
221
  }
210
222
  }
211
- var Ze = !1, qe = !1, He = !1, Je = !1, Ge = !1, ce;
212
- ce = Symbol.for("react.module.reference");
213
- function Ke(e) {
214
- return !!(typeof e == "string" || typeof e == "function" || e === _ || e === y || Ge || e === o || e === R || e === g || Je || e === p || Ze || qe || He || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === w || e.$$typeof === l || e.$$typeof === b || e.$$typeof === u || // This needs to include all possible module reference object
223
+ var lt = !1, ft = !1, dt = !1, pt = !1, vt = !1, be;
224
+ be = Symbol.for("react.module.reference");
225
+ function mt(e) {
226
+ return !!(typeof e == "string" || typeof e == "function" || e === c || e === v || vt || e === i || e === y || e === E || pt || e === m || lt || ft || dt || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === h || e.$$typeof === u || // This needs to include all possible module reference object
215
227
  // types supported by any Flight configuration anywhere since
216
228
  // we don't know which Flight build this will end up being used
217
229
  // with.
218
- e.$$typeof === ce || e.getModuleId !== void 0));
230
+ e.$$typeof === be || e.getModuleId !== void 0));
219
231
  }
220
- function Xe(e, t, n) {
221
- var a = e.displayName;
222
- if (a)
223
- return a;
224
- var f = t.displayName || t.name || "";
225
- return f !== "" ? n + "(" + f + ")" : n;
232
+ function gt(e, r, o) {
233
+ var s = e.displayName;
234
+ if (s)
235
+ return s;
236
+ var p = r.displayName || r.name || "";
237
+ return p !== "" ? o + "(" + p + ")" : o;
226
238
  }
227
- function le(e) {
239
+ function he(e) {
228
240
  return e.displayName || "Context";
229
241
  }
230
- function P(e) {
242
+ function A(e) {
231
243
  if (e == null)
232
244
  return null;
233
- if (typeof e.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
245
+ if (typeof e.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
234
246
  return e.displayName || e.name || null;
235
247
  if (typeof e == "string")
236
248
  return e;
237
249
  switch (e) {
238
- case _:
250
+ case c:
239
251
  return "Fragment";
240
- case d:
252
+ case a:
241
253
  return "Portal";
242
- case y:
254
+ case v:
243
255
  return "Profiler";
244
- case o:
256
+ case i:
245
257
  return "StrictMode";
246
- case R:
258
+ case y:
247
259
  return "Suspense";
248
- case g:
260
+ case E:
249
261
  return "SuspenseList";
250
262
  }
251
263
  if (typeof e == "object")
252
264
  switch (e.$$typeof) {
253
- case b:
254
- var t = e;
255
- return le(t) + ".Consumer";
265
+ case h:
266
+ var r = e;
267
+ return he(r) + ".Consumer";
256
268
  case l:
257
- var n = e;
258
- return le(n._context) + ".Provider";
269
+ var o = e;
270
+ return he(o._context) + ".Provider";
259
271
  case u:
260
- return Xe(e, e.render, "ForwardRef");
261
- case w:
262
- var a = e.displayName || null;
263
- return a !== null ? a : P(e.type) || "Memo";
264
- case C: {
265
- var f = e, m = f._payload, c = f._init;
272
+ return gt(e, e.render, "ForwardRef");
273
+ case _:
274
+ var s = e.displayName || null;
275
+ return s !== null ? s : A(e.type) || "Memo";
276
+ case O: {
277
+ var p = e, b = p._payload, d = p._init;
266
278
  try {
267
- return P(c(m));
279
+ return A(d(b));
268
280
  } catch {
269
281
  return null;
270
282
  }
@@ -272,18 +284,18 @@ function kr() {
272
284
  }
273
285
  return null;
274
286
  }
275
- var A = Object.assign, U = 0, fe, de, pe, ve, me, ye, ge;
276
- function Re() {
287
+ var L = Object.assign, $ = 0, Re, Se, _e, Te, we, Me, Oe;
288
+ function Pe() {
277
289
  }
278
- Re.__reactDisabledLog = !0;
279
- function Qe() {
290
+ Pe.__reactDisabledLog = !0;
291
+ function yt() {
280
292
  {
281
- if (U === 0) {
282
- fe = console.log, de = console.info, pe = console.warn, ve = console.error, me = console.group, ye = console.groupCollapsed, ge = console.groupEnd;
293
+ if ($ === 0) {
294
+ Re = console.log, Se = console.info, _e = console.warn, Te = console.error, we = console.group, Me = console.groupCollapsed, Oe = console.groupEnd;
283
295
  var e = {
284
296
  configurable: !0,
285
297
  enumerable: !0,
286
- value: Re,
298
+ value: Pe,
287
299
  writable: !0
288
300
  };
289
301
  Object.defineProperties(console, {
@@ -296,336 +308,336 @@ function kr() {
296
308
  groupEnd: e
297
309
  });
298
310
  }
299
- U++;
311
+ $++;
300
312
  }
301
313
  }
302
- function er() {
314
+ function Et() {
303
315
  {
304
- if (U--, U === 0) {
316
+ if ($--, $ === 0) {
305
317
  var e = {
306
318
  configurable: !0,
307
319
  enumerable: !0,
308
320
  writable: !0
309
321
  };
310
322
  Object.defineProperties(console, {
311
- log: A({}, e, {
312
- value: fe
323
+ log: L({}, e, {
324
+ value: Re
313
325
  }),
314
- info: A({}, e, {
315
- value: de
326
+ info: L({}, e, {
327
+ value: Se
316
328
  }),
317
- warn: A({}, e, {
318
- value: pe
329
+ warn: L({}, e, {
330
+ value: _e
319
331
  }),
320
- error: A({}, e, {
321
- value: ve
332
+ error: L({}, e, {
333
+ value: Te
322
334
  }),
323
- group: A({}, e, {
324
- value: me
335
+ group: L({}, e, {
336
+ value: we
325
337
  }),
326
- groupCollapsed: A({}, e, {
327
- value: ye
338
+ groupCollapsed: L({}, e, {
339
+ value: Me
328
340
  }),
329
- groupEnd: A({}, e, {
330
- value: ge
341
+ groupEnd: L({}, e, {
342
+ value: Oe
331
343
  })
332
344
  });
333
345
  }
334
- U < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
346
+ $ < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
335
347
  }
336
348
  }
337
- var G = k.ReactCurrentDispatcher, K;
338
- function z(e, t, n) {
349
+ var ae = P.ReactCurrentDispatcher, oe;
350
+ function X(e, r, o) {
339
351
  {
340
- if (K === void 0)
352
+ if (oe === void 0)
341
353
  try {
342
354
  throw Error();
343
- } catch (f) {
344
- var a = f.stack.trim().match(/\n( *(at )?)/);
345
- K = a && a[1] || "";
355
+ } catch (p) {
356
+ var s = p.stack.trim().match(/\n( *(at )?)/);
357
+ oe = s && s[1] || "";
346
358
  }
347
359
  return `
348
- ` + K + e;
360
+ ` + oe + e;
349
361
  }
350
362
  }
351
- var X = !1, Z;
363
+ var ie = !1, Q;
352
364
  {
353
- var rr = typeof WeakMap == "function" ? WeakMap : Map;
354
- Z = new rr();
365
+ var bt = typeof WeakMap == "function" ? WeakMap : Map;
366
+ Q = new bt();
355
367
  }
356
- function Ee(e, t) {
357
- if (!e || X)
368
+ function Ce(e, r) {
369
+ if (!e || ie)
358
370
  return "";
359
371
  {
360
- var n = Z.get(e);
361
- if (n !== void 0)
362
- return n;
372
+ var o = Q.get(e);
373
+ if (o !== void 0)
374
+ return o;
363
375
  }
364
- var a;
365
- X = !0;
366
- var f = Error.prepareStackTrace;
376
+ var s;
377
+ ie = !0;
378
+ var p = Error.prepareStackTrace;
367
379
  Error.prepareStackTrace = void 0;
368
- var m;
369
- m = G.current, G.current = null, Qe();
380
+ var b;
381
+ b = ae.current, ae.current = null, yt();
370
382
  try {
371
- if (t) {
372
- var c = function() {
383
+ if (r) {
384
+ var d = function() {
373
385
  throw Error();
374
386
  };
375
- if (Object.defineProperty(c.prototype, "props", {
387
+ if (Object.defineProperty(d.prototype, "props", {
376
388
  set: function() {
377
389
  throw Error();
378
390
  }
379
391
  }), typeof Reflect == "object" && Reflect.construct) {
380
392
  try {
381
- Reflect.construct(c, []);
382
- } catch (x) {
383
- a = x;
393
+ Reflect.construct(d, []);
394
+ } catch (D) {
395
+ s = D;
384
396
  }
385
- Reflect.construct(e, [], c);
397
+ Reflect.construct(e, [], d);
386
398
  } else {
387
399
  try {
388
- c.call();
389
- } catch (x) {
390
- a = x;
400
+ d.call();
401
+ } catch (D) {
402
+ s = D;
391
403
  }
392
- e.call(c.prototype);
404
+ e.call(d.prototype);
393
405
  }
394
406
  } else {
395
407
  try {
396
408
  throw Error();
397
- } catch (x) {
398
- a = x;
409
+ } catch (D) {
410
+ s = D;
399
411
  }
400
412
  e();
401
413
  }
402
- } catch (x) {
403
- if (x && a && typeof x.stack == "string") {
404
- for (var i = x.stack.split(`
405
- `), T = a.stack.split(`
406
- `), E = i.length - 1, h = T.length - 1; E >= 1 && h >= 0 && i[E] !== T[h]; )
407
- h--;
408
- for (; E >= 1 && h >= 0; E--, h--)
409
- if (i[E] !== T[h]) {
410
- if (E !== 1 || h !== 1)
414
+ } catch (D) {
415
+ if (D && s && typeof D.stack == "string") {
416
+ for (var f = D.stack.split(`
417
+ `), C = s.stack.split(`
418
+ `), R = f.length - 1, S = C.length - 1; R >= 1 && S >= 0 && f[R] !== C[S]; )
419
+ S--;
420
+ for (; R >= 1 && S >= 0; R--, S--)
421
+ if (f[R] !== C[S]) {
422
+ if (R !== 1 || S !== 1)
411
423
  do
412
- if (E--, h--, h < 0 || i[E] !== T[h]) {
413
- var O = `
414
- ` + i[E].replace(" at new ", " at ");
415
- return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, O), O;
424
+ if (R--, S--, S < 0 || f[R] !== C[S]) {
425
+ var j = `
426
+ ` + f[R].replace(" at new ", " at ");
427
+ return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, j), j;
416
428
  }
417
- while (E >= 1 && h >= 0);
429
+ while (R >= 1 && S >= 0);
418
430
  break;
419
431
  }
420
432
  }
421
433
  } finally {
422
- X = !1, G.current = m, er(), Error.prepareStackTrace = f;
434
+ ie = !1, ae.current = b, Et(), Error.prepareStackTrace = p;
423
435
  }
424
- var L = e ? e.displayName || e.name : "", De = L ? z(L) : "";
425
- return typeof e == "function" && Z.set(e, De), De;
436
+ var N = e ? e.displayName || e.name : "", Ye = N ? X(N) : "";
437
+ return typeof e == "function" && Q.set(e, Ye), Ye;
426
438
  }
427
- function tr(e, t, n) {
428
- return Ee(e, !1);
439
+ function ht(e, r, o) {
440
+ return Ce(e, !1);
429
441
  }
430
- function nr(e) {
431
- var t = e.prototype;
432
- return !!(t && t.isReactComponent);
442
+ function Rt(e) {
443
+ var r = e.prototype;
444
+ return !!(r && r.isReactComponent);
433
445
  }
434
- function q(e, t, n) {
446
+ function ee(e, r, o) {
435
447
  if (e == null)
436
448
  return "";
437
449
  if (typeof e == "function")
438
- return Ee(e, nr(e));
450
+ return Ce(e, Rt(e));
439
451
  if (typeof e == "string")
440
- return z(e);
452
+ return X(e);
441
453
  switch (e) {
442
- case R:
443
- return z("Suspense");
444
- case g:
445
- return z("SuspenseList");
454
+ case y:
455
+ return X("Suspense");
456
+ case E:
457
+ return X("SuspenseList");
446
458
  }
447
459
  if (typeof e == "object")
448
460
  switch (e.$$typeof) {
449
461
  case u:
450
- return tr(e.render);
451
- case w:
452
- return q(e.type, t, n);
453
- case C: {
454
- var a = e, f = a._payload, m = a._init;
462
+ return ht(e.render);
463
+ case _:
464
+ return ee(e.type, r, o);
465
+ case O: {
466
+ var s = e, p = s._payload, b = s._init;
455
467
  try {
456
- return q(m(f), t, n);
468
+ return ee(b(p), r, o);
457
469
  } catch {
458
470
  }
459
471
  }
460
472
  }
461
473
  return "";
462
474
  }
463
- var H = Object.prototype.hasOwnProperty, be = {}, he = k.ReactDebugCurrentFrame;
464
- function J(e) {
475
+ var te = Object.prototype.hasOwnProperty, je = {}, xe = P.ReactDebugCurrentFrame;
476
+ function re(e) {
465
477
  if (e) {
466
- var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
467
- he.setExtraStackFrame(n);
478
+ var r = e._owner, o = ee(e.type, e._source, r ? r.type : null);
479
+ xe.setExtraStackFrame(o);
468
480
  } else
469
- he.setExtraStackFrame(null);
481
+ xe.setExtraStackFrame(null);
470
482
  }
471
- function ar(e, t, n, a, f) {
483
+ function St(e, r, o, s, p) {
472
484
  {
473
- var m = Function.call.bind(H);
474
- for (var c in e)
475
- if (m(e, c)) {
476
- var i = void 0;
485
+ var b = Function.call.bind(te);
486
+ for (var d in e)
487
+ if (b(e, d)) {
488
+ var f = void 0;
477
489
  try {
478
- if (typeof e[c] != "function") {
479
- var T = Error((a || "React class") + ": " + n + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
480
- throw T.name = "Invariant Violation", T;
490
+ if (typeof e[d] != "function") {
491
+ var C = Error((s || "React class") + ": " + o + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
492
+ throw C.name = "Invariant Violation", C;
481
493
  }
482
- i = e[c](t, c, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
483
- } catch (E) {
484
- i = E;
494
+ f = e[d](r, d, s, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
495
+ } catch (R) {
496
+ f = R;
485
497
  }
486
- i && !(i instanceof Error) && (J(f), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, c, typeof i), J(null)), i instanceof Error && !(i.message in be) && (be[i.message] = !0, J(f), S("Failed %s type: %s", n, i.message), J(null));
498
+ f && !(f instanceof Error) && (re(p), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", o, d, typeof f), re(null)), f instanceof Error && !(f.message in je) && (je[f.message] = !0, re(p), w("Failed %s type: %s", o, f.message), re(null));
487
499
  }
488
500
  }
489
501
  }
490
- var or = Array.isArray;
491
- function Q(e) {
492
- return or(e);
502
+ var _t = Array.isArray;
503
+ function se(e) {
504
+ return _t(e);
493
505
  }
494
- function ir(e) {
506
+ function Tt(e) {
495
507
  {
496
- var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
497
- return n;
508
+ var r = typeof Symbol == "function" && Symbol.toStringTag, o = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
509
+ return o;
498
510
  }
499
511
  }
500
- function sr(e) {
512
+ function wt(e) {
501
513
  try {
502
- return _e(e), !1;
514
+ return Ae(e), !1;
503
515
  } catch {
504
516
  return !0;
505
517
  }
506
518
  }
507
- function _e(e) {
519
+ function Ae(e) {
508
520
  return "" + e;
509
521
  }
510
- function Se(e) {
511
- if (sr(e))
512
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(e)), _e(e);
522
+ function De(e) {
523
+ if (wt(e))
524
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tt(e)), Ae(e);
513
525
  }
514
- var N = k.ReactCurrentOwner, ur = {
526
+ var V = P.ReactCurrentOwner, Mt = {
515
527
  key: !0,
516
528
  ref: !0,
517
529
  __self: !0,
518
530
  __source: !0
519
- }, we, Te, ee;
520
- ee = {};
521
- function cr(e) {
522
- if (H.call(e, "ref")) {
523
- var t = Object.getOwnPropertyDescriptor(e, "ref").get;
524
- if (t && t.isReactWarning)
531
+ }, Fe, ke, ue;
532
+ ue = {};
533
+ function Ot(e) {
534
+ if (te.call(e, "ref")) {
535
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
536
+ if (r && r.isReactWarning)
525
537
  return !1;
526
538
  }
527
539
  return e.ref !== void 0;
528
540
  }
529
- function lr(e) {
530
- if (H.call(e, "key")) {
531
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
532
- if (t && t.isReactWarning)
541
+ function Pt(e) {
542
+ if (te.call(e, "key")) {
543
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
544
+ if (r && r.isReactWarning)
533
545
  return !1;
534
546
  }
535
547
  return e.key !== void 0;
536
548
  }
537
- function fr(e, t) {
538
- if (typeof e.ref == "string" && N.current && t && N.current.stateNode !== t) {
539
- var n = P(N.current.type);
540
- ee[n] || (S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(N.current.type), e.ref), ee[n] = !0);
549
+ function Ct(e, r) {
550
+ if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
551
+ var o = A(V.current.type);
552
+ ue[o] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', A(V.current.type), e.ref), ue[o] = !0);
541
553
  }
542
554
  }
543
- function dr(e, t) {
555
+ function jt(e, r) {
544
556
  {
545
- var n = function() {
546
- we || (we = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
557
+ var o = function() {
558
+ Fe || (Fe = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
547
559
  };
548
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
549
- get: n,
560
+ o.isReactWarning = !0, Object.defineProperty(e, "key", {
561
+ get: o,
550
562
  configurable: !0
551
563
  });
552
564
  }
553
565
  }
554
- function pr(e, t) {
566
+ function xt(e, r) {
555
567
  {
556
- var n = function() {
557
- Te || (Te = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
568
+ var o = function() {
569
+ ke || (ke = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
558
570
  };
559
- n.isReactWarning = !0, Object.defineProperty(e, "ref", {
560
- get: n,
571
+ o.isReactWarning = !0, Object.defineProperty(e, "ref", {
572
+ get: o,
561
573
  configurable: !0
562
574
  });
563
575
  }
564
576
  }
565
- var vr = function(e, t, n, a, f, m, c) {
566
- var i = {
577
+ var At = function(e, r, o, s, p, b, d) {
578
+ var f = {
567
579
  // This tag allows us to uniquely identify this as a React Element
568
- $$typeof: s,
580
+ $$typeof: n,
569
581
  // Built-in properties that belong on the element
570
582
  type: e,
571
- key: t,
572
- ref: n,
573
- props: c,
583
+ key: r,
584
+ ref: o,
585
+ props: d,
574
586
  // Record the component responsible for creating this element.
575
- _owner: m
587
+ _owner: b
576
588
  };
577
- return i._store = {}, Object.defineProperty(i._store, "validated", {
589
+ return f._store = {}, Object.defineProperty(f._store, "validated", {
578
590
  configurable: !1,
579
591
  enumerable: !1,
580
592
  writable: !0,
581
593
  value: !1
582
- }), Object.defineProperty(i, "_self", {
594
+ }), Object.defineProperty(f, "_self", {
583
595
  configurable: !1,
584
596
  enumerable: !1,
585
597
  writable: !1,
586
- value: a
587
- }), Object.defineProperty(i, "_source", {
598
+ value: s
599
+ }), Object.defineProperty(f, "_source", {
588
600
  configurable: !1,
589
601
  enumerable: !1,
590
602
  writable: !1,
591
- value: f
592
- }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
603
+ value: p
604
+ }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
593
605
  };
594
- function mr(e, t, n, a, f) {
606
+ function Dt(e, r, o, s, p) {
595
607
  {
596
- var m, c = {}, i = null, T = null;
597
- n !== void 0 && (Se(n), i = "" + n), lr(t) && (Se(t.key), i = "" + t.key), cr(t) && (T = t.ref, fr(t, f));
598
- for (m in t)
599
- H.call(t, m) && !ur.hasOwnProperty(m) && (c[m] = t[m]);
608
+ var b, d = {}, f = null, C = null;
609
+ o !== void 0 && (De(o), f = "" + o), Pt(r) && (De(r.key), f = "" + r.key), Ot(r) && (C = r.ref, Ct(r, p));
610
+ for (b in r)
611
+ te.call(r, b) && !Mt.hasOwnProperty(b) && (d[b] = r[b]);
600
612
  if (e && e.defaultProps) {
601
- var E = e.defaultProps;
602
- for (m in E)
603
- c[m] === void 0 && (c[m] = E[m]);
613
+ var R = e.defaultProps;
614
+ for (b in R)
615
+ d[b] === void 0 && (d[b] = R[b]);
604
616
  }
605
- if (i || T) {
606
- var h = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
607
- i && dr(c, h), T && pr(c, h);
617
+ if (f || C) {
618
+ var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
619
+ f && jt(d, S), C && xt(d, S);
608
620
  }
609
- return vr(e, i, T, f, a, N.current, c);
621
+ return At(e, f, C, p, s, V.current, d);
610
622
  }
611
623
  }
612
- var re = k.ReactCurrentOwner, Ce = k.ReactDebugCurrentFrame;
613
- function M(e) {
624
+ var ce = P.ReactCurrentOwner, Le = P.ReactDebugCurrentFrame;
625
+ function I(e) {
614
626
  if (e) {
615
- var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
616
- Ce.setExtraStackFrame(n);
627
+ var r = e._owner, o = ee(e.type, e._source, r ? r.type : null);
628
+ Le.setExtraStackFrame(o);
617
629
  } else
618
- Ce.setExtraStackFrame(null);
630
+ Le.setExtraStackFrame(null);
619
631
  }
620
- var te;
621
- te = !1;
622
- function ne(e) {
623
- return typeof e == "object" && e !== null && e.$$typeof === s;
632
+ var le;
633
+ le = !1;
634
+ function fe(e) {
635
+ return typeof e == "object" && e !== null && e.$$typeof === n;
624
636
  }
625
- function Oe() {
637
+ function Ie() {
626
638
  {
627
- if (re.current) {
628
- var e = P(re.current.type);
639
+ if (ce.current) {
640
+ var e = A(ce.current.type);
629
641
  if (e)
630
642
  return `
631
643
 
@@ -634,140 +646,140 @@ Check the render method of \`` + e + "`.";
634
646
  return "";
635
647
  }
636
648
  }
637
- function yr(e) {
649
+ function Ft(e) {
638
650
  {
639
651
  if (e !== void 0) {
640
- var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
652
+ var r = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
641
653
  return `
642
654
 
643
- Check your code at ` + t + ":" + n + ".";
655
+ Check your code at ` + r + ":" + o + ".";
644
656
  }
645
657
  return "";
646
658
  }
647
659
  }
648
- var Pe = {};
649
- function gr(e) {
660
+ var Ne = {};
661
+ function kt(e) {
650
662
  {
651
- var t = Oe();
652
- if (!t) {
653
- var n = typeof e == "string" ? e : e.displayName || e.name;
654
- n && (t = `
663
+ var r = Ie();
664
+ if (!r) {
665
+ var o = typeof e == "string" ? e : e.displayName || e.name;
666
+ o && (r = `
655
667
 
656
- Check the top-level render call using <` + n + ">.");
668
+ Check the top-level render call using <` + o + ">.");
657
669
  }
658
- return t;
670
+ return r;
659
671
  }
660
672
  }
661
- function xe(e, t) {
673
+ function Ue(e, r) {
662
674
  {
663
675
  if (!e._store || e._store.validated || e.key != null)
664
676
  return;
665
677
  e._store.validated = !0;
666
- var n = gr(t);
667
- if (Pe[n])
678
+ var o = kt(r);
679
+ if (Ne[o])
668
680
  return;
669
- Pe[n] = !0;
670
- var a = "";
671
- e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + P(e._owner.type) + "."), M(e), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, a), M(null);
681
+ Ne[o] = !0;
682
+ var s = "";
683
+ e && e._owner && e._owner !== ce.current && (s = " It was passed a child from " + A(e._owner.type) + "."), I(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, s), I(null);
672
684
  }
673
685
  }
674
- function je(e, t) {
686
+ function $e(e, r) {
675
687
  {
676
688
  if (typeof e != "object")
677
689
  return;
678
- if (Q(e))
679
- for (var n = 0; n < e.length; n++) {
680
- var a = e[n];
681
- ne(a) && xe(a, t);
690
+ if (se(e))
691
+ for (var o = 0; o < e.length; o++) {
692
+ var s = e[o];
693
+ fe(s) && Ue(s, r);
682
694
  }
683
- else if (ne(e))
695
+ else if (fe(e))
684
696
  e._store && (e._store.validated = !0);
685
697
  else if (e) {
686
- var f = W(e);
687
- if (typeof f == "function" && f !== e.entries)
688
- for (var m = f.call(e), c; !(c = m.next()).done; )
689
- ne(c.value) && xe(c.value, t);
698
+ var p = T(e);
699
+ if (typeof p == "function" && p !== e.entries)
700
+ for (var b = p.call(e), d; !(d = b.next()).done; )
701
+ fe(d.value) && Ue(d.value, r);
690
702
  }
691
703
  }
692
704
  }
693
- function Rr(e) {
705
+ function Lt(e) {
694
706
  {
695
- var t = e.type;
696
- if (t == null || typeof t == "string")
707
+ var r = e.type;
708
+ if (r == null || typeof r == "string")
697
709
  return;
698
- var n;
699
- if (typeof t == "function")
700
- n = t.propTypes;
701
- else if (typeof t == "object" && (t.$$typeof === u || // Note: Memo only checks outer props here.
710
+ var o;
711
+ if (typeof r == "function")
712
+ o = r.propTypes;
713
+ else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
702
714
  // Inner props are checked in the reconciler.
703
- t.$$typeof === w))
704
- n = t.propTypes;
715
+ r.$$typeof === _))
716
+ o = r.propTypes;
705
717
  else
706
718
  return;
707
- if (n) {
708
- var a = P(t);
709
- ar(n, e.props, "prop", a, e);
710
- } else if (t.PropTypes !== void 0 && !te) {
711
- te = !0;
712
- var f = P(t);
713
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
719
+ if (o) {
720
+ var s = A(r);
721
+ St(o, e.props, "prop", s, e);
722
+ } else if (r.PropTypes !== void 0 && !le) {
723
+ le = !0;
724
+ var p = A(r);
725
+ w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
714
726
  }
715
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
727
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
716
728
  }
717
729
  }
718
- function Er(e) {
730
+ function It(e) {
719
731
  {
720
- for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
721
- var a = t[n];
722
- if (a !== "children" && a !== "key") {
723
- M(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), M(null);
732
+ for (var r = Object.keys(e.props), o = 0; o < r.length; o++) {
733
+ var s = r[o];
734
+ if (s !== "children" && s !== "key") {
735
+ I(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), I(null);
724
736
  break;
725
737
  }
726
738
  }
727
- e.ref !== null && (M(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
739
+ e.ref !== null && (I(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
728
740
  }
729
741
  }
730
- function ke(e, t, n, a, f, m) {
742
+ function Ve(e, r, o, s, p, b) {
731
743
  {
732
- var c = Ke(e);
733
- if (!c) {
734
- var i = "";
735
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
736
- var T = yr(f);
737
- T ? i += T : i += Oe();
738
- var E;
739
- e === null ? E = "null" : Q(e) ? E = "array" : e !== void 0 && e.$$typeof === s ? (E = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, i);
744
+ var d = mt(e);
745
+ if (!d) {
746
+ var f = "";
747
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
748
+ var C = Ft(p);
749
+ C ? f += C : f += Ie();
750
+ var R;
751
+ e === null ? R = "null" : se(e) ? R = "array" : e !== void 0 && e.$$typeof === n ? (R = "<" + (A(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, f);
740
752
  }
741
- var h = mr(e, t, n, f, m);
742
- if (h == null)
743
- return h;
744
- if (c) {
745
- var O = t.children;
746
- if (O !== void 0)
747
- if (a)
748
- if (Q(O)) {
749
- for (var L = 0; L < O.length; L++)
750
- je(O[L], e);
751
- Object.freeze && Object.freeze(O);
753
+ var S = Dt(e, r, o, p, b);
754
+ if (S == null)
755
+ return S;
756
+ if (d) {
757
+ var j = r.children;
758
+ if (j !== void 0)
759
+ if (s)
760
+ if (se(j)) {
761
+ for (var N = 0; N < j.length; N++)
762
+ $e(j[N], e);
763
+ Object.freeze && Object.freeze(j);
752
764
  } else
753
- S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
765
+ w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
754
766
  else
755
- je(O, e);
767
+ $e(j, e);
756
768
  }
757
- return e === _ ? Er(h) : Rr(h), h;
769
+ return e === c ? It(S) : Lt(S), S;
758
770
  }
759
771
  }
760
- function br(e, t, n) {
761
- return ke(e, t, n, !0);
772
+ function Nt(e, r, o) {
773
+ return Ve(e, r, o, !0);
762
774
  }
763
- function hr(e, t, n) {
764
- return ke(e, t, n, !1);
775
+ function Ut(e, r, o) {
776
+ return Ve(e, r, o, !1);
765
777
  }
766
- var _r = hr, Sr = br;
767
- Y.Fragment = _, Y.jsx = _r, Y.jsxs = Sr;
768
- }()), Y;
778
+ var $t = Ut, Vt = Nt;
779
+ B.Fragment = c, B.jsx = $t, B.jsxs = Vt;
780
+ }()), B;
769
781
  }
770
- var $ = {};
782
+ var W = {};
771
783
  /**
772
784
  * @license React
773
785
  * react-jsx-runtime.production.min.js
@@ -777,120 +789,207 @@ var $ = {};
777
789
  * This source code is licensed under the MIT license found in the
778
790
  * LICENSE file in the root directory of this source tree.
779
791
  */
780
- var Le;
781
- function Dr() {
782
- if (Le)
783
- return $;
784
- Le = 1;
785
- var r = Ue, s = Symbol.for("react.element"), d = Symbol.for("react.fragment"), _ = Object.prototype.hasOwnProperty, o = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
786
- function l(b, u, R) {
787
- var g, w = {}, C = null, p = null;
788
- R !== void 0 && (C = "" + R), u.key !== void 0 && (C = "" + u.key), u.ref !== void 0 && (p = u.ref);
789
- for (g in u)
790
- _.call(u, g) && !y.hasOwnProperty(g) && (w[g] = u[g]);
791
- if (b && b.defaultProps)
792
- for (g in u = b.defaultProps, u)
793
- w[g] === void 0 && (w[g] = u[g]);
794
- return { $$typeof: s, type: b, key: C, ref: p, props: w, _owner: o.current };
792
+ var We;
793
+ function Xt() {
794
+ if (We)
795
+ return W;
796
+ We = 1;
797
+ var t = Je, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
798
+ function l(h, u, y) {
799
+ var E, _ = {}, O = null, m = null;
800
+ y !== void 0 && (O = "" + y), u.key !== void 0 && (O = "" + u.key), u.ref !== void 0 && (m = u.ref);
801
+ for (E in u)
802
+ c.call(u, E) && !v.hasOwnProperty(E) && (_[E] = u[E]);
803
+ if (h && h.defaultProps)
804
+ for (E in u = h.defaultProps, u)
805
+ _[E] === void 0 && (_[E] = u[E]);
806
+ return { $$typeof: n, type: h, key: O, ref: m, props: _, _owner: i.current };
795
807
  }
796
- return $.Fragment = d, $.jsx = l, $.jsxs = l, $;
797
- }
798
- process.env.NODE_ENV === "production" ? ie.exports = Dr() : ie.exports = kr();
799
- var oe = ie.exports;
800
- function Wr({
801
- children: r,
802
- maps: s,
803
- externalSync: d
808
+ return W.Fragment = a, W.jsx = l, W.jsxs = l, W;
809
+ }
810
+ process.env.NODE_ENV === "production" ? me.exports = Xt() : me.exports = Kt();
811
+ var z = me.exports;
812
+ function Nr({
813
+ children: t,
814
+ maps: n,
815
+ externalSync: a
804
816
  }) {
805
- const [_, o] = wr(Pr, {
806
- ...B.state,
807
- maps: s.reduce((p, v) => (p[v.id] = {
808
- ...v,
817
+ const [c, i] = Ke(Gt, {
818
+ ...q.state,
819
+ maps: n.reduce((m, g) => (m[g.id] = {
820
+ ...g,
809
821
  isLoaded: !1
810
- }, p), B.state.maps)
811
- }), y = Fe(
812
- s.reduce((p, v) => (p[v.id] = {
822
+ }, m), q.state.maps)
823
+ }), v = pe(
824
+ n.reduce((m, g) => (m[g.id] = {
813
825
  instanceRef: {
814
826
  current: null
815
827
  },
816
828
  overlayRef: {
817
829
  current: null
818
830
  }
819
- }, p), {})
820
- ), l = I(
821
- (p, v, j) => {
822
- s[0].id === p && d?.({
823
- type: v,
824
- payload: j
831
+ }, m), {})
832
+ ), l = M(
833
+ (m, g, x) => {
834
+ n[0].id === m && a?.({
835
+ type: g,
836
+ payload: x
825
837
  });
826
838
  },
827
- [d, s]
828
- ), b = I(
829
- (p, v) => {
830
- o({
831
- type: D.SetViewState,
839
+ [a, n]
840
+ ), h = M(
841
+ (m, g) => {
842
+ i({
843
+ type: F.SetViewState,
832
844
  payload: {
833
- id: v,
834
- viewState: p
845
+ id: g,
846
+ viewState: m
835
847
  }
836
- }), l(v, D.SetViewState, p);
848
+ }), l(g, F.SetViewState, m);
837
849
  },
838
- [o, l]
839
- ), u = I(
840
- ({ height: p, width: v }, j) => {
841
- o({
842
- type: D.SetResize,
850
+ [i, l]
851
+ ), u = M(
852
+ ({ height: m, width: g }, x) => {
853
+ i({
854
+ type: F.SetResize,
843
855
  payload: {
844
- id: j,
845
- height: p,
846
- width: v
856
+ id: x,
857
+ height: m,
858
+ width: g
847
859
  }
848
- }), l(j, D.SetResize, { height: p, width: v });
860
+ }), l(x, F.SetResize, { height: m, width: g });
849
861
  },
850
- [o, l]
851
- ), R = I(
852
- (p, v) => {
853
- o({
854
- type: D.SetBasemap,
862
+ [i, l]
863
+ ), y = M(
864
+ (m, g) => {
865
+ i({
866
+ type: F.SetBasemap,
855
867
  payload: {
856
- id: v,
857
- basemap: p
868
+ id: g,
869
+ basemap: m
858
870
  }
859
871
  });
860
872
  },
861
- [o]
862
- ), g = I(
863
- (p, v) => {
864
- o({
865
- type: D.SetZoom,
873
+ [i]
874
+ ), E = M(
875
+ (m, g) => {
876
+ i({
877
+ type: F.SetZoom,
866
878
  payload: {
867
- id: v,
868
- zoom: p
879
+ id: g,
880
+ zoom: m
869
881
  }
870
882
  });
871
883
  },
872
- [o]
873
- ), w = I(
874
- (p, v) => {
875
- o({
876
- type: D.SetLoaded,
884
+ [i]
885
+ ), _ = M(
886
+ (m, g) => {
887
+ i({
888
+ type: F.SetLoaded,
877
889
  payload: {
878
- id: v,
879
- value: p
890
+ id: g,
891
+ value: m
880
892
  }
881
893
  });
882
894
  },
883
- [o]
884
- ), C = Fe({
885
- setViewState: b,
886
- setBasemap: R,
895
+ [i]
896
+ ), O = pe({
897
+ setViewState: h,
898
+ setBasemap: y,
887
899
  setResize: u,
888
- setZoom: g,
889
- setLoaded: w
900
+ setZoom: E,
901
+ setLoaded: _
890
902
  });
891
- return /* @__PURE__ */ oe.jsx(Ye.Provider, { value: C.current, children: /* @__PURE__ */ oe.jsx(Ve.Provider, { value: y, children: /* @__PURE__ */ oe.jsx(Ne.Provider, { value: _, children: r }) }) });
903
+ return /* @__PURE__ */ z.jsx(tt.Provider, { value: O.current, children: /* @__PURE__ */ z.jsx(et.Provider, { value: v, children: /* @__PURE__ */ z.jsx(Qe.Provider, { value: c, children: t }) }) });
892
904
  }
893
- const Be = {
905
+ var ye = /* @__PURE__ */ ((t) => (t.kilometer = "kilometer", t.mile = "mile", t))(ye || {}), Qt = /* @__PURE__ */ ((t) => (t.kilometer = "kilometers", t.mile = "miles", t))(Qt || {}), G = /* @__PURE__ */ ((t) => (t.AddPosition = "addPosition", t.Finish = "finish", t))(G || {});
906
+ class er extends Wt {
907
+ handleClick(n, a) {
908
+ super.handleClick(n, a), a.onEdit({
909
+ // data is the same
910
+ updatedData: a.data,
911
+ editType: G.AddPosition,
912
+ editContext: {
913
+ distance: this._currentDistance
914
+ }
915
+ });
916
+ }
917
+ handleKeyUp(n, a) {
918
+ if (this._isMeasuringSessionFinished)
919
+ return;
920
+ n.stopPropagation();
921
+ const { key: c } = n, i = this.getClickSequence().length;
922
+ switch (c) {
923
+ case "Enter":
924
+ case "Escape":
925
+ this._isMeasuringSessionFinished = !0, i === 1 && (this.resetClickSequence(), this._currentTooltips = []), a.onUpdateCursor("cell"), a.onEdit({
926
+ updatedData: a.data,
927
+ editType: G.Finish,
928
+ editContext: {
929
+ finished: this._isMeasuringSessionFinished
930
+ }
931
+ });
932
+ break;
933
+ }
934
+ }
935
+ }
936
+ const He = [
937
+ "anyclick",
938
+ "pointermove",
939
+ "panstart",
940
+ "panmove",
941
+ "panend",
942
+ "keyup"
943
+ ], tr = "mapMeasureLayer", rr = {
944
+ mode: er,
945
+ id: tr,
946
+ pickable: !0,
947
+ billboard: !1,
948
+ editHandlePointRadiusUnits: "pixels",
949
+ editHandlePointStrokeWidth: 2,
950
+ editHandlePointRadiusMinPixels: 1,
951
+ editHandlePointRadiusMaxPixels: 12,
952
+ getEditHandlePointRadius: 3,
953
+ _subLayerProps: {
954
+ tooltips: {
955
+ fontFamily: "Open Sans, Inter, sans-serif",
956
+ fontWeight: "lighter",
957
+ getSize: 13,
958
+ lineHeight: 0.85,
959
+ getPixelOffset: [0, 20],
960
+ getTextAnchor: "middle",
961
+ getAlignmentBaseline: "center",
962
+ updateTriggers: {}
963
+ },
964
+ guides: {
965
+ // getLineColor: conditionalRgbColor,
966
+ getLineWidth: 2
967
+ }
968
+ }
969
+ };
970
+ class nr extends Bt {
971
+ eventManager;
972
+ constructor(n) {
973
+ super(n), this.eventManager = n.eventManager;
974
+ }
975
+ _addEventHandlers() {
976
+ const n = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
977
+ for (const c of He)
978
+ n.on(c, a, {
979
+ // give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
980
+ priority: 100
981
+ });
982
+ }
983
+ _removeEventHandlers(n = void 0) {
984
+ const a = n || this._getEventManager(), { eventHandler: c } = this.state._editableLayerState;
985
+ for (const i of He)
986
+ a.off(i, c);
987
+ }
988
+ _getEventManager() {
989
+ return this.eventManager || this.context.deck.eventManager;
990
+ }
991
+ }
992
+ const nt = {
894
993
  NUMBER: {
895
994
  style: "decimal",
896
995
  maximumFractionDigits: 1,
@@ -912,85 +1011,325 @@ const Be = {
912
1011
  day: "2-digit"
913
1012
  }
914
1013
  };
915
- function We(r, s, d) {
916
- return Intl.NumberFormat(s, d).format(r);
1014
+ function at(t, n, a) {
1015
+ return Intl.NumberFormat(n, a).format(t);
917
1016
  }
918
- function Fr(r, s, d = {}) {
919
- return We(r, s, { ...Be.NUMBER, ...d });
1017
+ function ot(t, n, a = {}) {
1018
+ return at(t, n, { ...nt.NUMBER, ...a });
920
1019
  }
921
- function Ar(r, s, d = {}) {
922
- return We(r, s, { ...Be.CURRENCY, ...d });
1020
+ function ar(t, n, a = {}) {
1021
+ return at(t, n, { ...nt.CURRENCY, ...a });
923
1022
  }
924
- var F = /* @__PURE__ */ ((r) => (r.CURRENCY = "CURRENCY", r.DEFAULT = "DEFAULT", r.NUMBER = "NUMBER", r))(F || {});
925
- const Ie = {
926
- [F.CURRENCY]: {
927
- type: F.CURRENCY,
928
- format: (r, s) => Ar(r, s)
1023
+ var k = /* @__PURE__ */ ((t) => (t.CURRENCY = "CURRENCY", t.DEFAULT = "DEFAULT", t.NUMBER = "NUMBER", t))(k || {});
1024
+ const ze = {
1025
+ [k.CURRENCY]: {
1026
+ type: k.CURRENCY,
1027
+ format: (t, n) => ar(t, n)
929
1028
  },
930
- [F.NUMBER]: {
931
- type: F.NUMBER,
932
- format: (r, s) => Fr(r, s)
1029
+ [k.NUMBER]: {
1030
+ type: k.NUMBER,
1031
+ format: (t, n) => ot(t, n)
933
1032
  },
934
- [F.DEFAULT]: {
935
- type: F.DEFAULT,
936
- format: (r) => r.toLocaleString()
1033
+ [k.DEFAULT]: {
1034
+ type: k.DEFAULT,
1035
+ format: (t) => t.toLocaleString()
937
1036
  }
938
1037
  };
939
- function zr({
940
- properties: r,
941
- formatters: s = {},
942
- includeColumns: d = Object.keys(r),
943
- locale: _ = "en-US",
944
- showColumnName: o = !0,
945
- title: y,
946
- getColumnName: l = Nr,
947
- getFieldHtml: b = Lr,
948
- getTitle: u = Mr,
949
- getValue: R = Ir
1038
+ function or({
1039
+ properties: t,
1040
+ formatters: n = {},
1041
+ includeColumns: a = Object.keys(t),
1042
+ locale: c = "en-US",
1043
+ showColumnName: i = !0,
1044
+ title: v,
1045
+ getColumnName: l = lr,
1046
+ getFieldHtml: h = sr,
1047
+ getTitle: u = ir,
1048
+ getValue: y = ur
950
1049
  }) {
951
- const g = y ? u(y) : "", C = d.reduce((p, v) => {
952
- const j = s[v], W = r[v], k = R(W, _, j), S = o ? l(v) : "";
953
- return p + b(S, k);
1050
+ const E = v ? u(v) : "", O = a.reduce((m, g) => {
1051
+ const x = n[g], T = t[g], P = y(T, c, x), w = i ? l(g) : "";
1052
+ return m + h(w, P);
954
1053
  }, "");
955
- return g + C;
1054
+ return E + O;
956
1055
  }
957
- function Mr(r) {
958
- return `<h3 style="margin: 0"><strong>${r}</strong></h3></br>`;
1056
+ function ir(t) {
1057
+ return `<h3 style="margin: 0"><strong>${t}</strong></h3></br>`;
959
1058
  }
960
- function Lr(r, s) {
961
- return `${r}${s}</br>`;
1059
+ function sr(t, n) {
1060
+ return `${t}${n}</br>`;
962
1061
  }
963
- function Ir(r, s, d) {
1062
+ function ur(t, n, a) {
964
1063
  try {
965
- return Ur(d)(r, s);
1064
+ return cr(a)(t, n);
966
1065
  } catch {
967
- return r;
1066
+ return t;
968
1067
  }
969
1068
  }
970
- function Ur(r) {
971
- return typeof r == "function" ? r : (r && Ie[r] || Ie[F.DEFAULT]).format;
1069
+ function cr(t) {
1070
+ return typeof t == "function" ? t : (t && ze[t] || ze[k.DEFAULT]).format;
1071
+ }
1072
+ function lr(t) {
1073
+ return `<strong>${t}</strong>: `;
1074
+ }
1075
+ var fr = function(n) {
1076
+ return dr(n) && !pr(n);
1077
+ };
1078
+ function dr(t) {
1079
+ return !!t && typeof t == "object";
1080
+ }
1081
+ function pr(t) {
1082
+ var n = Object.prototype.toString.call(t);
1083
+ return n === "[object RegExp]" || n === "[object Date]" || gr(t);
1084
+ }
1085
+ var vr = typeof Symbol == "function" && Symbol.for, mr = vr ? Symbol.for("react.element") : 60103;
1086
+ function gr(t) {
1087
+ return t.$$typeof === mr;
1088
+ }
1089
+ function yr(t) {
1090
+ return Array.isArray(t) ? [] : {};
972
1091
  }
973
- function Nr(r) {
974
- return `<strong>${r}</strong>: `;
1092
+ function Z(t, n) {
1093
+ return n.clone !== !1 && n.isMergeableObject(t) ? U(yr(t), t, n) : t;
1094
+ }
1095
+ function Er(t, n, a) {
1096
+ return t.concat(n).map(function(c) {
1097
+ return Z(c, a);
1098
+ });
1099
+ }
1100
+ function br(t, n) {
1101
+ if (!n.customMerge)
1102
+ return U;
1103
+ var a = n.customMerge(t);
1104
+ return typeof a == "function" ? a : U;
1105
+ }
1106
+ function hr(t) {
1107
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(n) {
1108
+ return Object.propertyIsEnumerable.call(t, n);
1109
+ }) : [];
1110
+ }
1111
+ function qe(t) {
1112
+ return Object.keys(t).concat(hr(t));
1113
+ }
1114
+ function it(t, n) {
1115
+ try {
1116
+ return n in t;
1117
+ } catch {
1118
+ return !1;
1119
+ }
1120
+ }
1121
+ function Rr(t, n) {
1122
+ return it(t, n) && !(Object.hasOwnProperty.call(t, n) && Object.propertyIsEnumerable.call(t, n));
1123
+ }
1124
+ function Sr(t, n, a) {
1125
+ var c = {};
1126
+ return a.isMergeableObject(t) && qe(t).forEach(function(i) {
1127
+ c[i] = Z(t[i], a);
1128
+ }), qe(n).forEach(function(i) {
1129
+ Rr(t, i) || (it(t, i) && a.isMergeableObject(n[i]) ? c[i] = br(i, a)(t[i], n[i], a) : c[i] = Z(n[i], a));
1130
+ }), c;
1131
+ }
1132
+ function U(t, n, a) {
1133
+ a = a || {}, a.arrayMerge = a.arrayMerge || Er, a.isMergeableObject = a.isMergeableObject || fr, a.cloneUnlessOtherwiseSpecified = Z;
1134
+ var c = Array.isArray(n), i = Array.isArray(t), v = c === i;
1135
+ return v ? c ? a.arrayMerge(t, n, a) : Sr(t, n, a) : Z(n, a);
1136
+ }
1137
+ U.all = function(n, a) {
1138
+ if (!Array.isArray(n))
1139
+ throw new Error("first argument should be an array");
1140
+ return n.reduce(function(c, i) {
1141
+ return U(c, i, a);
1142
+ }, {});
1143
+ };
1144
+ var _r = U, Tr = _r;
1145
+ const Ge = /* @__PURE__ */ Jt(Tr), ne = () => {
1146
+ throw new Error(
1147
+ "You forgot to wrap your component in <MeasurementToolsProvider>."
1148
+ );
1149
+ }, Ee = {
1150
+ state: {
1151
+ enable: !1,
1152
+ finished: !0,
1153
+ distance: 0,
1154
+ unit: ye.kilometer
1155
+ },
1156
+ actions: {
1157
+ setEnable: ne,
1158
+ setFinished: ne,
1159
+ setUnit: ne,
1160
+ setDistance: ne
1161
+ }
1162
+ }, st = J(Ee.state), ut = J(Ee.actions);
1163
+ function wr() {
1164
+ return K(
1165
+ st
1166
+ );
1167
+ }
1168
+ function Mr() {
1169
+ return K(
1170
+ ut
1171
+ );
1172
+ }
1173
+ function Or(t, n) {
1174
+ const a = n === ye.kilometer ? 1 : 0.621371;
1175
+ return t * a;
1176
+ }
1177
+ function Ze({
1178
+ text: t,
1179
+ unit: n,
1180
+ locale: a
1181
+ }) {
1182
+ return `${ot(Or(t, n), a, {
1183
+ style: "unit",
1184
+ unit: n
1185
+ })}`;
1186
+ }
1187
+ function Pr(t) {
1188
+ return ve[t]?.type;
1189
+ }
1190
+ function Cr(t) {
1191
+ return Pr(t) === Xe.GoogleMaps;
1192
+ }
1193
+ function Ur({
1194
+ mapId: t,
1195
+ defaultProps: { locale: n = "en", getColumnName: a } = {
1196
+ getColumnName: "<b>Total distance</b> "
1197
+ },
1198
+ layerProps: c = {}
1199
+ }) {
1200
+ const { distance: i, enable: v, unit: l } = wr(), { setDistance: h, setFinished: u } = Mr(), { isLoaded: y, basemap: E } = rt(t), { getOverlayInstance: _ } = ge(t), O = Yt(() => {
1201
+ if (!y || !Cr(E))
1202
+ return null;
1203
+ const T = _()?.getDiv();
1204
+ return new Ht(T, {});
1205
+ }, [y, _, E]), m = M(
1206
+ (T, P) => {
1207
+ T.html = or({
1208
+ properties: {
1209
+ distance: Ze({
1210
+ text: P.distance,
1211
+ locale: P.locale,
1212
+ unit: l
1213
+ })
1214
+ },
1215
+ getColumnName: () => a
1216
+ });
1217
+ },
1218
+ [a, l]
1219
+ );
1220
+ if (!v || !y)
1221
+ return null;
1222
+ const g = Ge(c, {
1223
+ modeConfig: {
1224
+ // We force distance due to conversion is addressed at feature getText level
1225
+ formatTooltip: (T) => T
1226
+ },
1227
+ onHover: (T) => (c?.onHover || m)(T, { distance: i, locale: n, unit: l }),
1228
+ onEdit: ({ editType: T, editContext: P }) => {
1229
+ T === G.AddPosition && h(P.distance), T === G.Finish && u(!0);
1230
+ },
1231
+ _subLayerProps: {
1232
+ tooltips: {
1233
+ getText: (T) => Ze({ ...T, locale: n, unit: l }),
1234
+ updateTriggers: {
1235
+ getText: [l, n]
1236
+ }
1237
+ }
1238
+ }
1239
+ }), x = Ge(rr, g);
1240
+ return new nr({
1241
+ ...x,
1242
+ eventManager: O
1243
+ });
1244
+ }
1245
+ var H = /* @__PURE__ */ ((t) => (t.SetEnable = "SET_ENABLE", t.SetFinished = "SET_FINISHED", t.SetDistance = "SET_DISTANCE", t.SetUnit = "SET_UNIT", t))(H || {});
1246
+ function jr(t, { type: n, payload: a }) {
1247
+ return {
1248
+ SET_ENABLE: () => ({
1249
+ ...t,
1250
+ enable: a,
1251
+ finished: !1
1252
+ }),
1253
+ SET_FINISHED: () => ({
1254
+ ...t,
1255
+ finished: a
1256
+ }),
1257
+ SET_DISTANCE: () => ({
1258
+ ...t,
1259
+ distance: a
1260
+ }),
1261
+ SET_UNIT: () => ({
1262
+ ...t,
1263
+ unit: a
1264
+ })
1265
+ }[n]?.() ?? t;
1266
+ }
1267
+ function $r({
1268
+ children: t
1269
+ }) {
1270
+ const [n, a] = Ke(jr, Ee.state), c = M(
1271
+ (u) => {
1272
+ a({ type: H.SetEnable, payload: u });
1273
+ },
1274
+ [a]
1275
+ ), i = M(
1276
+ (u) => {
1277
+ a({ type: H.SetFinished, payload: u });
1278
+ },
1279
+ [a]
1280
+ ), v = M(
1281
+ (u) => {
1282
+ a({ type: H.SetDistance, payload: u });
1283
+ },
1284
+ [a]
1285
+ ), l = M(
1286
+ (u) => {
1287
+ a({ type: H.SetUnit, payload: u });
1288
+ },
1289
+ [a]
1290
+ ), h = pe({
1291
+ setEnable: c,
1292
+ setFinished: i,
1293
+ setDistance: v,
1294
+ setUnit: l
1295
+ });
1296
+ return /* @__PURE__ */ z.jsx(ut.Provider, { value: h.current, children: /* @__PURE__ */ z.jsx(st.Provider, { value: n, children: t }) });
975
1297
  }
976
1298
  export {
977
- ae as CartoBasemapURL,
978
- Cr as CartoBasemapsNames,
979
- F as FormatterTypes,
980
- Tr as GMapsBasemap,
981
- Ae as MAPS_BASEMAP,
982
- D as MapActions,
983
- Ye as MapActionsContext,
984
- Ne as MapContext,
985
- Wr as MapProvider,
986
- Ve as MapReferencesContext,
987
- Or as MapsTypes,
988
- zr as objectToHtml,
989
- Pr as reducer,
990
- xr as useMap,
991
- jr as useMapActions,
992
- Br as useMapActionsByID,
993
- Yr as useMapByID,
994
- $e as useMapRefences,
995
- $r as useMapReferencesByID
1299
+ de as CartoBasemapURL,
1300
+ qt as CartoBasemapsNames,
1301
+ nr as CustomEditableGeojsonLayer,
1302
+ er as CustomMeasureDistanceMode,
1303
+ rr as DEFAULT_LAYER_PROPS,
1304
+ He as EVENT_MANAGER_EVENT_TYPES,
1305
+ G as EditType,
1306
+ k as FormatterTypes,
1307
+ zt as GMapsBasemap,
1308
+ ve as MAPS_BASEMAP,
1309
+ tr as MAP_MEASURE_LAYER_ID,
1310
+ F as MapActions,
1311
+ tt as MapActionsContext,
1312
+ Qe as MapContext,
1313
+ Ur as MapMeasurementToolsLayer,
1314
+ $r as MapMeasurementToolsProvider,
1315
+ ye as MapMeasurementUnit,
1316
+ Qt as MapMeasurementUnitTurf,
1317
+ Nr as MapProvider,
1318
+ et as MapReferencesContext,
1319
+ Xe as MapsTypes,
1320
+ Or as convertKmTo,
1321
+ Pr as getMapType,
1322
+ Ze as getTextLayerFormattedDistance,
1323
+ Cr as isGmaps,
1324
+ or as objectToHtml,
1325
+ Gt as reducer,
1326
+ rt as useMap,
1327
+ Zt as useMapActions,
1328
+ Ir as useMapActionsByID,
1329
+ kr as useMapByID,
1330
+ wr as useMapMeasurementTools,
1331
+ Mr as useMapMeasurementToolsActions,
1332
+ ge as useMapRefences,
1333
+ ge as useMapReferences,
1334
+ Lr as useMapReferencesByID
996
1335
  };