@alfadocs/ui-kit 0.33.2 → 0.33.3
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/_chunks/{map-view-knHSNLoe.js → map-view-ZgbhfRqy.js} +384 -376
- package/dist/_chunks/{practice-results-Dwm5tzLV.js → practice-results-YD4dvqje.js} +2 -2
- package/dist/agent-catalog.json +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as z, jsxs as le } from "react/jsx-runtime";
|
|
2
2
|
import * as Fe from "react";
|
|
3
|
-
import A, { useMemo as N, useContext as F, useEffect as
|
|
3
|
+
import A, { useMemo as N, useContext as F, useEffect as E, useLayoutEffect as Q, forwardRef as H, useImperativeHandle as V, useState as k, useReducer as Ue, useCallback as ne, useRef as U, Children as Ce, createContext as tn, useId as on } from "react";
|
|
4
4
|
import { c as oe } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as He } from "react-i18next";
|
|
6
6
|
import { createPortal as ue } from "react-dom";
|
|
7
|
-
import { g as
|
|
8
|
-
import { B as
|
|
9
|
-
import { u as
|
|
10
|
-
import { M as
|
|
11
|
-
import { E as
|
|
12
|
-
var fe,
|
|
13
|
-
function
|
|
14
|
-
return
|
|
7
|
+
import { g as rn } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
8
|
+
import { B as an } from "./button-DD_0Xdmr.js";
|
|
9
|
+
import { u as sn } from "./registry-nPAVE19X.js";
|
|
10
|
+
import { M as ln } from "./map-pin-B8STOPMJ.js";
|
|
11
|
+
import { E as cn } from "./external-link-C6F25E6k.js";
|
|
12
|
+
var fe, ke;
|
|
13
|
+
function dn() {
|
|
14
|
+
return ke || (ke = 1, fe = function e(n, t) {
|
|
15
15
|
if (n === t) return !0;
|
|
16
16
|
if (n && t && typeof n == "object" && typeof t == "object") {
|
|
17
17
|
if (n.constructor !== t.constructor) return !1;
|
|
@@ -37,8 +37,8 @@ function cn() {
|
|
|
37
37
|
return n !== n && t !== t;
|
|
38
38
|
}), fe;
|
|
39
39
|
}
|
|
40
|
-
var
|
|
41
|
-
const re = /* @__PURE__ */
|
|
40
|
+
var un = dn();
|
|
41
|
+
const re = /* @__PURE__ */ rn(un), gn = "1.8.3";
|
|
42
42
|
function j(e, n) {
|
|
43
43
|
var t = {};
|
|
44
44
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
@@ -74,43 +74,43 @@ function Ie(e, n, t, o) {
|
|
|
74
74
|
c((o = o.apply(e, [])).next());
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function fn(e, n) {
|
|
78
78
|
e.src = n;
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const mn = (e) => {
|
|
81
81
|
var n, t, o, r = "The Google Maps JavaScript API", a = "google", i = "importLibrary", s = "__ib__", g = document, c = window, l = c[a] || (c[a] = {}), m = l.maps || (l.maps = {}), f = /* @__PURE__ */ new Set(), u = new URLSearchParams(), h = () => n || (n = new Promise(async (y, d) => {
|
|
82
82
|
var p;
|
|
83
83
|
await (t = g.createElement("script")), u.set("libraries", [...f] + "");
|
|
84
84
|
for (o in e)
|
|
85
85
|
u.set(o.replace(/[A-Z]/g, (b) => "_" + b[0].toLowerCase()), e[o]);
|
|
86
|
-
u.set("callback", a + ".maps." + s),
|
|
86
|
+
u.set("callback", a + ".maps." + s), fn(t, "https://maps.googleapis.com/maps/api/js?" + u), m[s] = y, t.onerror = () => n = d(Error(r + " could not load.")), t.nonce = ((p = g.querySelector("script[nonce]")) == null ? void 0 : p.nonce) || "", g.head.append(t);
|
|
87
87
|
}));
|
|
88
88
|
m[i] ? console.warn(r + " only loads once. Ignoring:", e) : m[i] = (y, ...d) => f.add(y) && h().then(() => m[i](y, ...d));
|
|
89
|
-
},
|
|
89
|
+
}, pn = (e) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`, hn = (e) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`, vn = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", yn = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", Ve = process.env.NODE_ENV !== "production", Oe = Ve ? (e) => {
|
|
90
90
|
console.warn(`[@googlemaps/js-api-loader] ${e}`);
|
|
91
91
|
} : () => {
|
|
92
|
-
},
|
|
92
|
+
}, bn = Ve ? (e) => {
|
|
93
93
|
console.info(`[@googlemaps/js-api-loader] ${e}`);
|
|
94
94
|
} : () => {
|
|
95
|
-
},
|
|
95
|
+
}, En = process.env.NODE_ENV !== "production";
|
|
96
96
|
let he = !1;
|
|
97
97
|
function Cn(e) {
|
|
98
98
|
if (he) {
|
|
99
|
-
Oe(
|
|
99
|
+
Oe(pn(e));
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
Mn(e), he = !0;
|
|
103
103
|
}
|
|
104
|
-
async function
|
|
104
|
+
async function On(e) {
|
|
105
105
|
var n, t;
|
|
106
|
-
if (he || Oe(
|
|
106
|
+
if (he || Oe(vn), !((t = (n = window == null ? void 0 : window.google) == null ? void 0 : n.maps) != null && t.importLibrary))
|
|
107
107
|
throw new Error("google.maps.importLibrary is not installed.");
|
|
108
108
|
return await google.maps.importLibrary(e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Mn(e) {
|
|
111
111
|
var t, o;
|
|
112
112
|
const n = !!((o = (t = window.google) == null ? void 0 : t.maps) != null && o.importLibrary);
|
|
113
|
-
n ?
|
|
113
|
+
n ? bn(hn(e)) : En && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && Oe(yn), n || mn(e);
|
|
114
114
|
}
|
|
115
115
|
const B = {
|
|
116
116
|
NOT_LOADED: "NOT_LOADED",
|
|
@@ -118,16 +118,16 @@ const B = {
|
|
|
118
118
|
LOADED: "LOADED",
|
|
119
119
|
FAILED: "FAILED",
|
|
120
120
|
AUTH_FAILURE: "AUTH_FAILURE"
|
|
121
|
-
},
|
|
122
|
-
`gmp_visgl_reactgooglemaps_v${
|
|
123
|
-
],
|
|
121
|
+
}, wn = "GMP_visgl_rgmlibrary_v1_default", Pn = [
|
|
122
|
+
`gmp_visgl_reactgooglemaps_v${gn}`
|
|
123
|
+
], ee = A.createContext(null);
|
|
124
124
|
let G = B.NOT_LOADED, ie;
|
|
125
125
|
const ve = /* @__PURE__ */ new Set();
|
|
126
126
|
function se(e) {
|
|
127
127
|
e !== G && (G = e, ve.forEach((n) => n(G)));
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
const [e, n] =
|
|
129
|
+
function An() {
|
|
130
|
+
const [e, n] = k({});
|
|
131
131
|
return { mapInstances: e, addMapInstance: (a, i = "default") => {
|
|
132
132
|
n((s) => Object.assign(Object.assign({}, s), { [i]: a }));
|
|
133
133
|
}, removeMapInstance: (a = "default") => {
|
|
@@ -141,8 +141,8 @@ function Pn() {
|
|
|
141
141
|
n({});
|
|
142
142
|
} };
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const [e, n] =
|
|
144
|
+
function Tn() {
|
|
145
|
+
const [e, n] = k({});
|
|
146
146
|
return {
|
|
147
147
|
map3dInstances: e,
|
|
148
148
|
addMap3DInstance: (a, i = "default") => {
|
|
@@ -161,8 +161,8 @@ function An() {
|
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
const { onLoad: n, onError: t, apiKey: o, version: r, libraries: a = [], region: i, language: s, authReferrerPolicy: g, channel: c, solutionChannel: l, fetchAppCheckToken: m } = e, [f, u] =
|
|
164
|
+
function Ln(e) {
|
|
165
|
+
const { onLoad: n, onError: t, apiKey: o, version: r, libraries: a = [], region: i, language: s, authReferrerPolicy: g, channel: c, solutionChannel: l, fetchAppCheckToken: m } = e, [f, u] = k(G), [h, y] = Ue((b, C) => b[C.name] ? b : Object.assign(Object.assign({}, b), { [C.name]: C.value }), {}), d = N(() => {
|
|
166
166
|
const b = {
|
|
167
167
|
apiKey: o,
|
|
168
168
|
version: r,
|
|
@@ -186,20 +186,20 @@ function Tn(e) {
|
|
|
186
186
|
]), p = ne((b) => Ie(this, void 0, void 0, function* () {
|
|
187
187
|
if (h[b])
|
|
188
188
|
return h[b];
|
|
189
|
-
const
|
|
190
|
-
return y({ name: b, value:
|
|
189
|
+
const C = yield On(b);
|
|
190
|
+
return y({ name: b, value: C }), C;
|
|
191
191
|
}), [h]);
|
|
192
|
-
return
|
|
192
|
+
return E(() => (ve.add(u), u(G), () => {
|
|
193
193
|
ve.delete(u);
|
|
194
|
-
}), []),
|
|
194
|
+
}), []), E(
|
|
195
195
|
() => {
|
|
196
196
|
Ie(this, void 0, void 0, function* () {
|
|
197
|
-
var b,
|
|
197
|
+
var b, C;
|
|
198
198
|
try {
|
|
199
199
|
ie && ie !== d && console.warn("The Google Maps JavaScript API has already been loaded with different parameters. The new parameters will be ignored. If you need to use different parameters, please refresh the page.");
|
|
200
|
-
const
|
|
201
|
-
if (!((
|
|
202
|
-
ie || se(B.LOADED), yield Promise.all(
|
|
200
|
+
const w = ["core", "maps", ...a];
|
|
201
|
+
if (!((C = (b = window.google) === null || b === void 0 ? void 0 : b.maps) === null || C === void 0) && C.importLibrary) {
|
|
202
|
+
ie || se(B.LOADED), yield Promise.all(w.map((v) => p(v))), n && n();
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
205
|
if (G === B.LOADING || G === B.LOADED) {
|
|
@@ -215,15 +215,15 @@ function Tn(e) {
|
|
|
215
215
|
language: s,
|
|
216
216
|
authReferrerPolicy: g
|
|
217
217
|
}).filter(([, v]) => v !== void 0));
|
|
218
|
-
c !== void 0 && c >= 0 && c <= 999 && (P.channel = String(c)), l === void 0 ? P.solutionChannel =
|
|
219
|
-
} catch (
|
|
220
|
-
se(B.FAILED), t ? t(
|
|
218
|
+
c !== void 0 && c >= 0 && c <= 999 && (P.channel = String(c)), l === void 0 ? P.solutionChannel = wn : l !== "" && (P.solutionChannel = l), Cn(P), yield Promise.all(w.map((v) => p(v))), se(B.LOADED), n && n();
|
|
219
|
+
} catch (w) {
|
|
220
|
+
se(B.FAILED), t ? t(w) : console.error("The Google Maps JavaScript API failed to load.", w);
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
},
|
|
224
224
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
225
225
|
[d, n, t, p, a]
|
|
226
|
-
),
|
|
226
|
+
), E(() => {
|
|
227
227
|
if (f !== B.LOADED)
|
|
228
228
|
return;
|
|
229
229
|
const b = google.maps.Settings.getInstance();
|
|
@@ -234,11 +234,11 @@ function Tn(e) {
|
|
|
234
234
|
importLibrary: p
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return N(() => e.disableUsageAttribution ? null :
|
|
237
|
+
function Dn(e) {
|
|
238
|
+
return N(() => e.disableUsageAttribution ? null : Pn, [e.disableUsageAttribution]);
|
|
239
239
|
}
|
|
240
|
-
const
|
|
241
|
-
const { children: n } = e, t = j(e, ["children"]), { mapInstances: o, addMapInstance: r, removeMapInstance: a, clearMapInstances: i } =
|
|
240
|
+
const Sn = (e) => {
|
|
241
|
+
const { children: n } = e, t = j(e, ["children"]), { mapInstances: o, addMapInstance: r, removeMapInstance: a, clearMapInstances: i } = An(), { map3dInstances: s, addMap3DInstance: g, removeMap3DInstance: c, clearMap3DInstances: l } = Tn(), { status: m, loadedLibraries: f, importLibrary: u } = Ln(t), h = Dn(t), y = N(() => ({
|
|
242
242
|
mapInstances: o,
|
|
243
243
|
addMapInstance: r,
|
|
244
244
|
removeMapInstance: a,
|
|
@@ -265,22 +265,22 @@ const Ln = (e) => {
|
|
|
265
265
|
u,
|
|
266
266
|
h
|
|
267
267
|
]);
|
|
268
|
-
return A.createElement(
|
|
268
|
+
return A.createElement(ee.Provider, { value: y }, n);
|
|
269
269
|
};
|
|
270
|
-
function
|
|
271
|
-
for (const t of
|
|
270
|
+
function _n(e, n) {
|
|
271
|
+
for (const t of xn) {
|
|
272
272
|
const o = n[t], r = Ge[t];
|
|
273
|
-
|
|
273
|
+
E(() => {
|
|
274
274
|
if (!e || !o)
|
|
275
275
|
return;
|
|
276
276
|
const a = google.maps.event.addListener(e, r, (i) => {
|
|
277
|
-
o(
|
|
277
|
+
o(kn(r, e, i));
|
|
278
278
|
});
|
|
279
279
|
return () => a.remove();
|
|
280
280
|
}, [e, r, o]);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function kn(e, n, t) {
|
|
284
284
|
var o;
|
|
285
285
|
const r = {
|
|
286
286
|
type: e,
|
|
@@ -290,7 +290,7 @@ function Sn(e, n, t) {
|
|
|
290
290
|
stop: () => {
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
|
-
if (
|
|
293
|
+
if (In.includes(e)) {
|
|
294
294
|
const a = r, i = n.getCenter(), s = n.getZoom(), g = n.getHeading() || 0, c = n.getTilt() || 0, l = n.getBounds();
|
|
295
295
|
return (!i || !l || !Number.isFinite(s)) && console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"), a.detail = {
|
|
296
296
|
center: (i == null ? void 0 : i.toJSON()) || { lat: 0, lng: 0 },
|
|
@@ -304,7 +304,7 @@ function Sn(e, n, t) {
|
|
|
304
304
|
west: -180
|
|
305
305
|
}
|
|
306
306
|
}, a;
|
|
307
|
-
} else if (
|
|
307
|
+
} else if (Nn.includes(e)) {
|
|
308
308
|
if (!t)
|
|
309
309
|
throw new Error("[createEvent] mouse events must provide a srcEvent");
|
|
310
310
|
const a = r;
|
|
@@ -341,31 +341,31 @@ const Ge = {
|
|
|
341
341
|
// since that is going to be fired in every situation where the camera is
|
|
342
342
|
// updated.
|
|
343
343
|
onCameraChanged: "bounds_changed"
|
|
344
|
-
},
|
|
344
|
+
}, In = [
|
|
345
345
|
"bounds_changed",
|
|
346
346
|
"center_changed",
|
|
347
347
|
"heading_changed",
|
|
348
348
|
"tilt_changed",
|
|
349
349
|
"zoom_changed"
|
|
350
|
-
],
|
|
350
|
+
], Nn = [
|
|
351
351
|
"click",
|
|
352
352
|
"contextmenu",
|
|
353
353
|
"dblclick",
|
|
354
354
|
"mousemove",
|
|
355
355
|
"mouseout",
|
|
356
356
|
"mouseover"
|
|
357
|
-
],
|
|
357
|
+
], xn = Object.keys(Ge);
|
|
358
358
|
function ae(e, n) {
|
|
359
359
|
const t = U(e);
|
|
360
360
|
return n(e, t.current) || (t.current = e), t.current;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
|
|
362
|
+
function Rn(e, n, t) {
|
|
363
|
+
E(e, [ae(n, t)]);
|
|
364
364
|
}
|
|
365
365
|
function Je(e, n) {
|
|
366
|
-
|
|
366
|
+
Rn(e, n, re);
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const zn = /* @__PURE__ */ new Set([
|
|
369
369
|
"backgroundColor",
|
|
370
370
|
"clickableIcons",
|
|
371
371
|
"controlSize",
|
|
@@ -402,21 +402,21 @@ const Rn = /* @__PURE__ */ new Set([
|
|
|
402
402
|
"zoomControl",
|
|
403
403
|
"zoomControlOptions"
|
|
404
404
|
]);
|
|
405
|
-
function
|
|
405
|
+
function jn(e, n) {
|
|
406
406
|
const t = {}, o = Object.keys(n);
|
|
407
407
|
for (const r of o)
|
|
408
|
-
|
|
408
|
+
zn.has(r) && (t[r] = n[r]);
|
|
409
409
|
Je(() => {
|
|
410
410
|
e && e.setOptions(t);
|
|
411
411
|
}, [t]);
|
|
412
412
|
}
|
|
413
413
|
function Ze() {
|
|
414
414
|
var e;
|
|
415
|
-
return ((e = F(
|
|
415
|
+
return ((e = F(ee)) === null || e === void 0 ? void 0 : e.status) || B.NOT_LOADED;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Bn(e, n) {
|
|
418
418
|
const { viewport: t, viewState: o } = n, r = !!t;
|
|
419
|
-
return
|
|
419
|
+
return Q(() => {
|
|
420
420
|
if (!e || !o)
|
|
421
421
|
return;
|
|
422
422
|
const { latitude: a, longitude: i, bearing: s, pitch: g, zoom: c } = o;
|
|
@@ -428,7 +428,7 @@ function jn(e, n) {
|
|
|
428
428
|
});
|
|
429
429
|
}, [e, o]), r;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Fn(e) {
|
|
432
432
|
return !e || typeof e != "object" || !("lat" in e && "lng" in e) ? !1 : Number.isFinite(e.lat) && Number.isFinite(e.lng);
|
|
433
433
|
}
|
|
434
434
|
function $e(e, n) {
|
|
@@ -438,7 +438,7 @@ function $e(e, n) {
|
|
|
438
438
|
return !(t.lat !== o.lat || t.lng !== o.lng);
|
|
439
439
|
}
|
|
440
440
|
function de(e) {
|
|
441
|
-
return
|
|
441
|
+
return Fn(e) ? e : e.toJSON();
|
|
442
442
|
}
|
|
443
443
|
function Ne(e) {
|
|
444
444
|
if ("north" in e && "south" in e && "east" in e && "west" in e)
|
|
@@ -451,7 +451,7 @@ function Ne(e) {
|
|
|
451
451
|
west: t.lng
|
|
452
452
|
};
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Un(e, n) {
|
|
455
455
|
if (!e || !n)
|
|
456
456
|
return !1;
|
|
457
457
|
const t = Ne(e), o = Ne(n);
|
|
@@ -468,7 +468,7 @@ function qe(e, n) {
|
|
|
468
468
|
return !1;
|
|
469
469
|
return !0;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Hn(e, n) {
|
|
472
472
|
if (!e || !n)
|
|
473
473
|
return e === n;
|
|
474
474
|
const t = "getArray" in n ? n.getArray().map((o) => o.getArray()) : n;
|
|
@@ -479,12 +479,12 @@ function Un(e, n) {
|
|
|
479
479
|
return !1;
|
|
480
480
|
return !0;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Vn(e, n, t) {
|
|
483
483
|
const o = t.center ? de(t.center) : null;
|
|
484
484
|
let r = null, a = null;
|
|
485
485
|
o && Number.isFinite(o.lat) && Number.isFinite(o.lng) && (r = o.lat, a = o.lng);
|
|
486
486
|
const i = Number.isFinite(t.zoom) ? t.zoom : null, s = Number.isFinite(t.heading) ? t.heading : null, g = Number.isFinite(t.tilt) ? t.tilt : null;
|
|
487
|
-
|
|
487
|
+
Q(() => {
|
|
488
488
|
if (!e)
|
|
489
489
|
return;
|
|
490
490
|
const c = {};
|
|
@@ -492,7 +492,7 @@ function Hn(e, n, t) {
|
|
|
492
492
|
r !== null && a !== null && (n.current.center.lat !== r || n.current.center.lng !== a) && (c.center = { lat: r, lng: a }, l = !0), i !== null && n.current.zoom !== i && (c.zoom = i, l = !0), s !== null && n.current.heading !== s && (c.heading = s, l = !0), g !== null && n.current.tilt !== g && (c.tilt = g, l = !0), l && e.moveCamera(c);
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
|
-
const
|
|
495
|
+
const Gn = () => {
|
|
496
496
|
const e = {
|
|
497
497
|
position: "absolute",
|
|
498
498
|
top: 0,
|
|
@@ -523,7 +523,7 @@ const Vn = () => {
|
|
|
523
523
|
);
|
|
524
524
|
};
|
|
525
525
|
function ye() {
|
|
526
|
-
const [e, n] =
|
|
526
|
+
const [e, n] = k(null), t = ne((o) => n(o), [n]);
|
|
527
527
|
return [e, t];
|
|
528
528
|
}
|
|
529
529
|
function We() {
|
|
@@ -533,7 +533,7 @@ function Ke() {
|
|
|
533
533
|
const [, e] = Ue((n) => n + 1, 0);
|
|
534
534
|
return e;
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Jn(e, n) {
|
|
537
537
|
const t = e.getCenter(), o = e.getZoom(), r = e.getHeading() || 0, a = e.getTilt() || 0, i = e.getBounds();
|
|
538
538
|
(!t || !i || !Number.isFinite(o)) && console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"), Object.assign(n.current, {
|
|
539
539
|
center: (t == null ? void 0 : t.toJSON()) || { lat: 0, lng: 0 },
|
|
@@ -542,18 +542,18 @@ function Gn(e, n) {
|
|
|
542
542
|
tilt: a
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Zn(e) {
|
|
546
546
|
const n = Ke(), t = U({
|
|
547
547
|
center: { lat: 0, lng: 0 },
|
|
548
548
|
heading: 0,
|
|
549
549
|
tilt: 0,
|
|
550
550
|
zoom: 0
|
|
551
551
|
});
|
|
552
|
-
return
|
|
552
|
+
return E(() => {
|
|
553
553
|
if (!e)
|
|
554
554
|
return;
|
|
555
555
|
const o = google.maps.event.addListener(e, "bounds_changed", () => {
|
|
556
|
-
|
|
556
|
+
Jn(e, t), n();
|
|
557
557
|
});
|
|
558
558
|
return () => o.remove();
|
|
559
559
|
}, [e, n]), t;
|
|
@@ -570,37 +570,37 @@ class ce {
|
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
ce.entries = {};
|
|
573
|
-
function
|
|
574
|
-
const t = We(), [o, r] =
|
|
575
|
-
!c && (!b || !
|
|
576
|
-
const
|
|
577
|
-
|
|
573
|
+
function $n(e, n) {
|
|
574
|
+
const t = We(), [o, r] = k(null), [a, i] = ye(), s = Zn(o), { id: g, defaultBounds: c, defaultCenter: l, defaultZoom: m, defaultHeading: f, defaultTilt: u, reuseMaps: h, renderingType: y, colorScheme: d } = e, p = j(e, ["id", "defaultBounds", "defaultCenter", "defaultZoom", "defaultHeading", "defaultTilt", "reuseMaps", "renderingType", "colorScheme"]), b = e.zoom !== void 0 || e.defaultZoom !== void 0, C = e.center !== void 0 || e.defaultCenter !== void 0;
|
|
575
|
+
!c && (!b || !C) && console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"), !p.center && l && (p.center = l), !p.zoom && Number.isFinite(m) && (p.zoom = m), !p.heading && Number.isFinite(f) && (p.heading = f), !p.tilt && Number.isFinite(u) && (p.tilt = u);
|
|
576
|
+
const w = p.internalUsageAttributionIds;
|
|
577
|
+
w == null ? p.internalUsageAttributionIds = n.internalUsageAttributionIds : p.internalUsageAttributionIds = [
|
|
578
578
|
...n.internalUsageAttributionIds || [],
|
|
579
|
-
...
|
|
579
|
+
...w
|
|
580
580
|
];
|
|
581
581
|
for (const v of Object.keys(p))
|
|
582
582
|
p[v] === void 0 && delete p[v];
|
|
583
583
|
const P = U(void 0);
|
|
584
|
-
return
|
|
584
|
+
return E(
|
|
585
585
|
() => {
|
|
586
586
|
if (!a || !t)
|
|
587
587
|
return;
|
|
588
|
-
const { addMapInstance: v, removeMapInstance: O } = n, { mapId:
|
|
588
|
+
const { addMapInstance: v, removeMapInstance: O } = n, { mapId: L } = e, _ = `${L || "default"}:${y || "default"}:${d || "LIGHT"}`;
|
|
589
589
|
let T, x;
|
|
590
|
-
if (h && ce.has(
|
|
590
|
+
if (h && ce.has(_) ? (x = ce.pop(_), T = x.getDiv(), a.appendChild(T), x.setOptions(p), setTimeout(() => x.moveCamera({}), 0)) : (T = document.createElement("div"), T.style.height = "100%", a.appendChild(T), x = new google.maps.Map(T, Object.assign(Object.assign(Object.assign({}, p), y ? { renderingType: y } : {}), d ? { colorScheme: d } : {}))), r(x), v(x, g), c) {
|
|
591
591
|
const { padding: R } = c, q = j(c, ["padding"]);
|
|
592
592
|
x.fitBounds(q, R);
|
|
593
|
-
} else (!b || !
|
|
593
|
+
} else (!b || !C) && x.fitBounds({ east: 180, west: -180, south: -90, north: 90 });
|
|
594
594
|
if (P.current) {
|
|
595
595
|
const { mapId: R, cameraState: q } = P.current;
|
|
596
|
-
R !==
|
|
596
|
+
R !== L && x.moveCamera(q);
|
|
597
597
|
}
|
|
598
598
|
return () => {
|
|
599
599
|
P.current = {
|
|
600
|
-
mapId:
|
|
600
|
+
mapId: L,
|
|
601
601
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
602
602
|
cameraState: s.current
|
|
603
|
-
}, T.remove(), h ? ce.push(
|
|
603
|
+
}, T.remove(), h ? ce.push(_, x) : google.maps.event.clearInstanceListeners(x), r(null), O(g);
|
|
604
604
|
};
|
|
605
605
|
},
|
|
606
606
|
// some dependencies are ignored in the list below:
|
|
@@ -621,13 +621,13 @@ function Zn(e, n) {
|
|
|
621
621
|
), [o, i, s];
|
|
622
622
|
}
|
|
623
623
|
const Ye = A.createContext(null), Xe = (e) => {
|
|
624
|
-
const { children: n, id: t, className: o, style: r } = e, a = F(
|
|
624
|
+
const { children: n, id: t, className: o, style: r } = e, a = F(ee), i = Ze();
|
|
625
625
|
if (!a)
|
|
626
626
|
throw new Error("<Map> can only be used inside an <ApiProvider> component.");
|
|
627
|
-
const [s, g, c] =
|
|
628
|
-
|
|
629
|
-
const l =
|
|
630
|
-
|
|
627
|
+
const [s, g, c] = $n(e, a);
|
|
628
|
+
Vn(s, c, e), _n(s, e), jn(s, e);
|
|
629
|
+
const l = Bn(s, e), m = !!e.controlled;
|
|
630
|
+
E(() => {
|
|
631
631
|
if (s)
|
|
632
632
|
return l && s.setOptions({ disableDefaultUI: !0 }), (l || m) && s.setOptions({
|
|
633
633
|
gestureHandling: "none",
|
|
@@ -649,15 +649,15 @@ const Ye = A.createContext(null), Xe = (e) => {
|
|
|
649
649
|
let u = null, h = null;
|
|
650
650
|
f && Number.isFinite(f.lat) && Number.isFinite(f.lng) && (u = f.lat, h = f.lng);
|
|
651
651
|
const y = N(() => {
|
|
652
|
-
var b,
|
|
652
|
+
var b, C, w;
|
|
653
653
|
return {
|
|
654
654
|
center: { lat: u ?? 0, lng: h ?? 0 },
|
|
655
655
|
zoom: (b = e.zoom) !== null && b !== void 0 ? b : 0,
|
|
656
|
-
heading: (
|
|
657
|
-
tilt: (
|
|
656
|
+
heading: (C = e.heading) !== null && C !== void 0 ? C : 0,
|
|
657
|
+
tilt: (w = e.tilt) !== null && w !== void 0 ? w : 0
|
|
658
658
|
};
|
|
659
659
|
}, [u, h, e.zoom, e.heading, e.tilt]);
|
|
660
|
-
|
|
660
|
+
Q(() => {
|
|
661
661
|
if (!s || !m)
|
|
662
662
|
return;
|
|
663
663
|
s.moveCamera(y);
|
|
@@ -676,7 +676,7 @@ const Ye = A.createContext(null), Xe = (e) => {
|
|
|
676
676
|
return i === B.AUTH_FAILURE ? A.createElement(
|
|
677
677
|
"div",
|
|
678
678
|
{ style: Object.assign({ position: "relative" }, o ? {} : d), className: o },
|
|
679
|
-
A.createElement(
|
|
679
|
+
A.createElement(Gn, null)
|
|
680
680
|
) : A.createElement("div", Object.assign({ ref: g, "data-testid": "map", style: o ? void 0 : d, className: o }, t ? { id: t } : {}), s ? A.createElement(Ye.Provider, { value: p }, n) : null);
|
|
681
681
|
};
|
|
682
682
|
Xe.deckGLViewProps = !0;
|
|
@@ -686,34 +686,34 @@ function te(...e) {
|
|
|
686
686
|
xe.has(n) || (xe.add(n), console.error(...e));
|
|
687
687
|
}
|
|
688
688
|
const Z = (e = null) => {
|
|
689
|
-
const n = F(
|
|
689
|
+
const n = F(ee), { map: t } = F(Ye) || {};
|
|
690
690
|
if (n === null)
|
|
691
691
|
return te("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."), null;
|
|
692
692
|
const { mapInstances: o } = n;
|
|
693
693
|
return e !== null ? o[e] || null : t || o.default || null;
|
|
694
694
|
};
|
|
695
695
|
function $(e) {
|
|
696
|
-
const n = We(), t = F(
|
|
697
|
-
return
|
|
696
|
+
const n = We(), t = F(ee);
|
|
697
|
+
return E(() => {
|
|
698
698
|
!n || !t || t.importLibrary(e);
|
|
699
699
|
}, [n, t, e]), (t == null ? void 0 : t.loadedLibraries[e]) || null;
|
|
700
700
|
}
|
|
701
701
|
var me;
|
|
702
|
-
const { useLayoutEffect:
|
|
703
|
-
function
|
|
702
|
+
const { useLayoutEffect: qn, useRef: Wn } = Fe, Kn = (me = Fe.useInsertionEffect) !== null && me !== void 0 ? me : qn;
|
|
703
|
+
function Yn() {
|
|
704
704
|
throw new Error("useEffectEvent: invalid call during rendering.");
|
|
705
705
|
}
|
|
706
|
-
function
|
|
707
|
-
const n =
|
|
708
|
-
return
|
|
706
|
+
function Xn(e) {
|
|
707
|
+
const n = Wn(Yn);
|
|
708
|
+
return Kn(() => {
|
|
709
709
|
n.current = e;
|
|
710
710
|
}, [e]), ((...t) => n.current(...t));
|
|
711
711
|
}
|
|
712
|
-
const Qe =
|
|
712
|
+
const Qe = Xn, Qn = () => {
|
|
713
713
|
};
|
|
714
|
-
function
|
|
715
|
-
const o = Qe(t ??
|
|
716
|
-
|
|
714
|
+
function D(e, n, t) {
|
|
715
|
+
const o = Qe(t ?? Qn), r = !!t;
|
|
716
|
+
E(() => {
|
|
717
717
|
if (!e || !n || !r)
|
|
718
718
|
return;
|
|
719
719
|
const a = google.maps.event.addListener(e, n, o);
|
|
@@ -721,22 +721,22 @@ function L(e, n, t) {
|
|
|
721
721
|
}, [e, n, r]);
|
|
722
722
|
}
|
|
723
723
|
function I(e, n, t) {
|
|
724
|
-
|
|
724
|
+
E(() => {
|
|
725
725
|
e && (e[n] = t);
|
|
726
726
|
}, [e, n, t]);
|
|
727
727
|
}
|
|
728
|
-
const
|
|
728
|
+
const et = () => {
|
|
729
729
|
};
|
|
730
730
|
function be(e, n, t) {
|
|
731
|
-
const o = Qe(t ??
|
|
732
|
-
|
|
731
|
+
const o = Qe(t ?? et), r = !!t;
|
|
732
|
+
E(() => {
|
|
733
733
|
if (!e || !n || !r)
|
|
734
734
|
return;
|
|
735
735
|
const a = o;
|
|
736
736
|
return e.addEventListener(n, a), () => e.removeEventListener(n, a);
|
|
737
737
|
}, [e, n, r]);
|
|
738
738
|
}
|
|
739
|
-
class
|
|
739
|
+
class nt {
|
|
740
740
|
constructor() {
|
|
741
741
|
this.renderedStyles = /* @__PURE__ */ new Set(), this.styleElement = null;
|
|
742
742
|
}
|
|
@@ -757,95 +757,95 @@ class et {
|
|
|
757
757
|
this.styleElement && (this.styleElement.remove(), this.styleElement = null, this.renderedStyles.clear());
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
|
-
const
|
|
761
|
-
function
|
|
760
|
+
const tt = new nt();
|
|
761
|
+
function ot(e, n) {
|
|
762
762
|
var t;
|
|
763
763
|
if (!(!((t = google == null ? void 0 : google.maps) === null || t === void 0) && t.version))
|
|
764
764
|
return;
|
|
765
765
|
const o = google.maps.version.split("."), r = parseInt(o[0], 10), a = parseInt(o[1], 10);
|
|
766
766
|
return r > e || r === e && a >= n;
|
|
767
767
|
}
|
|
768
|
-
const Me = A.createContext(null),
|
|
768
|
+
const Me = A.createContext(null), rt = {
|
|
769
769
|
BOTTOM: ["50%", "100%"]
|
|
770
770
|
}, en = H((e, n) => {
|
|
771
|
-
const { children: t, style: o, className: r, anchorPoint: a } = e, [i, s] =
|
|
772
|
-
return V(n, () => i, [i]), s ? A.createElement(Me.Provider, { value: g }, ue(A.createElement(
|
|
771
|
+
const { children: t, style: o, className: r, anchorPoint: a } = e, [i, s] = it(e), g = N(() => i ? { marker: i } : null, [i]);
|
|
772
|
+
return V(n, () => i, [i]), s ? A.createElement(Me.Provider, { value: g }, ue(A.createElement(at, { anchorPoint: a, styles: o, className: r }, t), s)) : null;
|
|
773
773
|
});
|
|
774
774
|
en.displayName = "AdvancedMarker";
|
|
775
|
-
function
|
|
775
|
+
function Ee(e) {
|
|
776
776
|
return e.nodeType === Node.ELEMENT_NODE;
|
|
777
777
|
}
|
|
778
|
-
const
|
|
779
|
-
function
|
|
780
|
-
const [n, t] =
|
|
781
|
-
return
|
|
778
|
+
const at = ({ children: e, styles: n, className: t }) => A.createElement("div", { className: t, style: n }, e);
|
|
779
|
+
function it(e) {
|
|
780
|
+
const [n, t] = k(null), [o, r] = k(null), a = Z(), i = $("marker"), { children: s, onClick: g, className: c, onMouseEnter: l, onMouseLeave: m, onDrag: f, onDragStart: u, onDragEnd: h, collisionBehavior: y, clickable: d, draggable: p, position: b, title: C, zIndex: w, anchorPoint: P, anchorLeft: v, anchorTop: O } = e, L = Ce.count(s);
|
|
781
|
+
return E(() => {
|
|
782
782
|
if (!a || !i)
|
|
783
783
|
return;
|
|
784
|
-
const
|
|
785
|
-
|
|
784
|
+
const _ = new i.AdvancedMarkerElement();
|
|
785
|
+
_.map = a, t(_);
|
|
786
786
|
let T = null;
|
|
787
|
-
return
|
|
788
|
-
|
|
787
|
+
return L > 0 && (T = document.createElement("div"), _.content = T, r(T)), () => {
|
|
788
|
+
_.map = null, T == null || T.remove(), t(null), r(null);
|
|
789
789
|
};
|
|
790
|
-
}, [a, i,
|
|
791
|
-
!(n != null && n.content) || !
|
|
792
|
-
}, [n, c,
|
|
790
|
+
}, [a, i, L]), E(() => {
|
|
791
|
+
!(n != null && n.content) || !Ee(n.content) || L > 0 || (n.content.className = c ?? "");
|
|
792
|
+
}, [n, c, L]), st(n, P, v, O, L > 0), I(n, "position", b), I(n, "title", C ?? ""), I(n, "zIndex", w), I(n, "collisionBehavior", y), E(() => {
|
|
793
793
|
n && (p !== void 0 ? n.gmpDraggable = p : f || u || h ? n.gmpDraggable = !0 : n.gmpDraggable = !1);
|
|
794
|
-
}, [n, p, f, h, u]),
|
|
794
|
+
}, [n, p, f, h, u]), E(() => {
|
|
795
795
|
if (!n)
|
|
796
796
|
return;
|
|
797
|
-
const
|
|
798
|
-
n.gmpClickable =
|
|
799
|
-
}, [n, d, g, l, m]),
|
|
797
|
+
const _ = d !== void 0 ? d : !!g || !!l || !!m;
|
|
798
|
+
n.gmpClickable = _, _ && (n != null && n.content) && Ee(n.content) && (n.content.style.pointerEvents = "all", g && (n.content.style.cursor = "pointer"));
|
|
799
|
+
}, [n, d, g, l, m]), D(n, "click", g), D(n, "drag", f), D(n, "dragstart", u), D(n, "dragend", h), be(n == null ? void 0 : n.element, "mouseenter", l), be(n == null ? void 0 : n.element, "mouseleave", m), [n, o];
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
|
|
801
|
+
function st(e, n, t, o, r) {
|
|
802
|
+
E(() => {
|
|
803
803
|
if (!e || !r)
|
|
804
804
|
return;
|
|
805
|
-
const a =
|
|
806
|
-
if (!(!i || !
|
|
805
|
+
const a = ot(3, 62), i = e.content;
|
|
806
|
+
if (!(!i || !Ee(i))) {
|
|
807
807
|
if (t !== void 0 || o !== void 0) {
|
|
808
808
|
a || console.warn(`AdvancedMarker: The anchorLeft and anchorTop props are only supported in Google Maps API version 3.62 and above. The current version is ${google.maps.version}.`), e.anchorLeft = t, e.anchorTop = o, n !== void 0 && console.warn("AdvancedMarker: the anchorPoint prop is ignored when anchorLeft and/or anchorTop are set.");
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
811
|
if (n !== void 0) {
|
|
812
|
-
const [s, g] = n ??
|
|
813
|
-
a ? (e.anchorLeft = c, e.anchorTop = l, i.style.transform = "") : (i.style.transform = `translate(50%, 100%) translate(${c}, ${l})`, e.dataset.origin = "rgm",
|
|
812
|
+
const [s, g] = n ?? rt.BOTTOM, c = `calc(-1 * ${s})`, l = `calc(-1 * ${g})`;
|
|
813
|
+
a ? (e.anchorLeft = c, e.anchorTop = l, i.style.transform = "") : (i.style.transform = `translate(50%, 100%) translate(${c}, ${l})`, e.dataset.origin = "rgm", tt.addAdvancedMarkerPointerEventsOverwrite());
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
}, [e, n, t, o, r]);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function lt(e) {
|
|
819
819
|
var n, t, o;
|
|
820
|
-
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onRadiusChanged: l, onCenterChanged: m, center: f, defaultCenter: u, radius: h, defaultRadius: y } = e, d = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onRadiusChanged", "onCenterChanged", "center", "defaultCenter", "radius", "defaultRadius"]), [p, b] =
|
|
821
|
-
return
|
|
822
|
-
if (!
|
|
823
|
-
|
|
820
|
+
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onRadiusChanged: l, onCenterChanged: m, center: f, defaultCenter: u, radius: h, defaultRadius: y } = e, d = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onRadiusChanged", "onCenterChanged", "center", "defaultCenter", "radius", "defaultRadius"]), [p, b] = k(null), C = Z(), w = ae(Object.assign(Object.assign({}, d), { clickable: (n = d.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = d.draggable) !== null && t !== void 0 ? t : !!(a || i || s || m), editable: (o = d.editable) !== null && o !== void 0 ? o : !!l }), re);
|
|
821
|
+
return E(() => {
|
|
822
|
+
if (!C) {
|
|
823
|
+
C === void 0 && console.error("<Circle> has to be inside a Map component.");
|
|
824
824
|
return;
|
|
825
825
|
}
|
|
826
|
-
const P = new google.maps.Circle(Object.assign(Object.assign({},
|
|
827
|
-
return P.setMap(
|
|
826
|
+
const P = new google.maps.Circle(Object.assign(Object.assign({}, w), { center: f ?? u, radius: h ?? y }));
|
|
827
|
+
return P.setMap(C), b(P), () => {
|
|
828
828
|
P.setMap(null), b(null);
|
|
829
829
|
};
|
|
830
|
-
}, [
|
|
830
|
+
}, [C]), D(p, "click", r), D(p, "drag", a), D(p, "dragstart", i), D(p, "dragend", s), D(p, "mouseover", g), D(p, "mouseout", c), D(p, "radius_changed", l ? () => {
|
|
831
831
|
const P = p == null ? void 0 : p.getRadius();
|
|
832
832
|
P !== void 0 && l(P);
|
|
833
|
-
} : null),
|
|
833
|
+
} : null), D(p, "center_changed", m ? () => {
|
|
834
834
|
m(p == null ? void 0 : p.getCenter());
|
|
835
|
-
} : null),
|
|
836
|
-
p && p.setOptions(
|
|
837
|
-
}, [p,
|
|
835
|
+
} : null), E(() => {
|
|
836
|
+
p && p.setOptions(w);
|
|
837
|
+
}, [p, w]), E(() => {
|
|
838
838
|
!p || !f || $e(f, p.getCenter()) || p.setCenter(f);
|
|
839
|
-
}, [p, f]),
|
|
839
|
+
}, [p, f]), E(() => {
|
|
840
840
|
!p || h === void 0 || h !== p.getRadius() && p.setRadius(h);
|
|
841
841
|
}, [p, h]), p;
|
|
842
842
|
}
|
|
843
|
-
const
|
|
844
|
-
const t =
|
|
843
|
+
const ct = H((e, n) => {
|
|
844
|
+
const t = lt(e);
|
|
845
845
|
return V(n, () => t, [t]), A.createElement(A.Fragment, null);
|
|
846
846
|
});
|
|
847
|
-
|
|
848
|
-
function
|
|
847
|
+
ct.displayName = "Circle";
|
|
848
|
+
function dt(e, n, t) {
|
|
849
849
|
if (n != null && typeof n != "object")
|
|
850
850
|
throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");
|
|
851
851
|
const o = e.style;
|
|
@@ -866,9 +866,9 @@ function ct(e, n, t) {
|
|
|
866
866
|
}
|
|
867
867
|
function Re(e, n, t) {
|
|
868
868
|
const o = n.indexOf("--") === 0;
|
|
869
|
-
t == null || typeof t == "boolean" || t === "" ? o ? e.setProperty(n, "") : n === "float" ? e.cssFloat = "" : e[n] = "" : o ? e.setProperty(n, t) : typeof t == "number" && t !== 0 && !
|
|
869
|
+
t == null || typeof t == "boolean" || t === "" ? o ? e.setProperty(n, "") : n === "float" ? e.cssFloat = "" : e[n] = "" : o ? e.setProperty(n, t) : typeof t == "number" && t !== 0 && !gt(n) ? e[n] = t + "px" : n === "float" ? e.cssFloat = t : e[n] = ("" + t).trim();
|
|
870
870
|
}
|
|
871
|
-
const
|
|
871
|
+
const ut = /* @__PURE__ */ new Set([
|
|
872
872
|
"animationIterationCount",
|
|
873
873
|
"aspectRatio",
|
|
874
874
|
"borderImageOutset",
|
|
@@ -915,8 +915,8 @@ const dt = /* @__PURE__ */ new Set([
|
|
|
915
915
|
"strokeOpacity",
|
|
916
916
|
"strokeWidth"
|
|
917
917
|
]);
|
|
918
|
-
function
|
|
919
|
-
return
|
|
918
|
+
function gt(e) {
|
|
919
|
+
return ut.has(e);
|
|
920
920
|
}
|
|
921
921
|
function ze(e) {
|
|
922
922
|
const n = e.getPaths(), t = [];
|
|
@@ -924,10 +924,10 @@ function ze(e) {
|
|
|
924
924
|
t.push(n.getAt(o).getArray());
|
|
925
925
|
return t;
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function ft(e) {
|
|
928
928
|
var n, t, o;
|
|
929
|
-
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathsChanged: l, polygon: m, encodedPaths: f, paths: u, defaultPaths: h } = e, y = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathsChanged", "polygon", "encodedPaths", "paths", "defaultPaths"]), [d, p] =
|
|
930
|
-
return
|
|
929
|
+
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathsChanged: l, polygon: m, encodedPaths: f, paths: u, defaultPaths: h } = e, y = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathsChanged", "polygon", "encodedPaths", "paths", "defaultPaths"]), [d, p] = k(null), b = Z(), C = $("geometry"), w = U(!1), P = ae(Object.assign(Object.assign({}, y), { clickable: (n = y.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = y.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = y.editable) !== null && o !== void 0 ? o : !!l }), re);
|
|
930
|
+
return E(() => {
|
|
931
931
|
if (!b) {
|
|
932
932
|
b === void 0 && console.error("<Polygon> has to be inside a Map component.");
|
|
933
933
|
return;
|
|
@@ -938,32 +938,32 @@ function gt(e) {
|
|
|
938
938
|
const O = u ?? h;
|
|
939
939
|
O && Array.isArray(O) && v.setPaths(O), v.setOptions(P);
|
|
940
940
|
} else {
|
|
941
|
-
const O = u ?? h,
|
|
942
|
-
O && Array.isArray(O) && (
|
|
941
|
+
const O = u ?? h, L = Object.assign({}, P);
|
|
942
|
+
O && Array.isArray(O) && (L.paths = O), v = new google.maps.Polygon(L);
|
|
943
943
|
}
|
|
944
944
|
return v.setMap(b), p(v), () => {
|
|
945
945
|
v.setMap(null), p(null);
|
|
946
946
|
};
|
|
947
|
-
}, [b, m]),
|
|
948
|
-
s == null || s(v), l && d && !
|
|
949
|
-
}),
|
|
947
|
+
}, [b, m]), D(d, "click", r), D(d, "drag", a), D(d, "dragstart", i), D(d, "mouseover", g), D(d, "mouseout", c), D(d, "dragend", (v) => {
|
|
948
|
+
s == null || s(v), l && d && !w.current && l(ze(d));
|
|
949
|
+
}), E(() => {
|
|
950
950
|
if (!d || !l)
|
|
951
951
|
return;
|
|
952
952
|
const v = [], O = d.getPaths();
|
|
953
953
|
if (typeof O.getLength != "function" || typeof O.getAt != "function")
|
|
954
954
|
return;
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
},
|
|
958
|
-
v.push(google.maps.event.addListener(T, "insert_at",
|
|
955
|
+
const L = () => {
|
|
956
|
+
w.current || l(ze(d));
|
|
957
|
+
}, _ = (T) => {
|
|
958
|
+
v.push(google.maps.event.addListener(T, "insert_at", L)), v.push(google.maps.event.addListener(T, "remove_at", L)), v.push(google.maps.event.addListener(T, "set_at", L));
|
|
959
959
|
};
|
|
960
960
|
for (let T = 0; T < O.getLength(); T++)
|
|
961
|
-
|
|
961
|
+
_(O.getAt(T));
|
|
962
962
|
return v.push(google.maps.event.addListener(O, "insert_at", (T) => {
|
|
963
|
-
|
|
963
|
+
_(O.getAt(T)), L();
|
|
964
964
|
})), v.push(google.maps.event.addListener(O, "set_at", (T) => {
|
|
965
|
-
|
|
966
|
-
})), v.push(google.maps.event.addListener(O, "remove_at",
|
|
965
|
+
_(O.getAt(T)), L();
|
|
966
|
+
})), v.push(google.maps.event.addListener(O, "remove_at", L)), () => {
|
|
967
967
|
v.forEach((T) => T.remove());
|
|
968
968
|
};
|
|
969
969
|
}, [
|
|
@@ -973,30 +973,30 @@ function gt(e) {
|
|
|
973
973
|
f,
|
|
974
974
|
P.editable,
|
|
975
975
|
P.draggable
|
|
976
|
-
]),
|
|
976
|
+
]), E(() => {
|
|
977
977
|
d && d.setOptions(P);
|
|
978
|
-
}, [d, P]),
|
|
978
|
+
}, [d, P]), E(() => {
|
|
979
979
|
if (!d || !u || !Array.isArray(u))
|
|
980
980
|
return;
|
|
981
|
-
const v = u[0], O = Array.isArray(v) ? u : [u],
|
|
982
|
-
|
|
983
|
-
}, [d, u]),
|
|
984
|
-
if (!d || !f || !
|
|
981
|
+
const v = u[0], O = Array.isArray(v) ? u : [u], L = d.getPaths();
|
|
982
|
+
Hn(O, L) || (w.current = !0, d.setPaths(u), w.current = !1);
|
|
983
|
+
}, [d, u]), E(() => {
|
|
984
|
+
if (!d || !f || !C)
|
|
985
985
|
return;
|
|
986
|
-
|
|
987
|
-
const v = f.map((O) =>
|
|
988
|
-
d.setPaths(v),
|
|
989
|
-
}, [d, f,
|
|
986
|
+
w.current = !0;
|
|
987
|
+
const v = f.map((O) => C.encoding.decodePath(O));
|
|
988
|
+
d.setPaths(v), w.current = !1;
|
|
989
|
+
}, [d, f, C]), d;
|
|
990
990
|
}
|
|
991
|
-
const
|
|
992
|
-
const t =
|
|
991
|
+
const mt = H((e, n) => {
|
|
992
|
+
const t = ft(e);
|
|
993
993
|
return V(n, () => t, [t]), A.createElement(A.Fragment, null);
|
|
994
994
|
});
|
|
995
|
-
|
|
996
|
-
function
|
|
995
|
+
mt.displayName = "Polygon";
|
|
996
|
+
function pt(e) {
|
|
997
997
|
var n, t, o;
|
|
998
|
-
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathChanged: l, polyline: m, encodedPath: f, path: u, defaultPath: h } = e, y = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathChanged", "polyline", "encodedPath", "path", "defaultPath"]), [d, p] =
|
|
999
|
-
return
|
|
998
|
+
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathChanged: l, polyline: m, encodedPath: f, path: u, defaultPath: h } = e, y = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathChanged", "polyline", "encodedPath", "path", "defaultPath"]), [d, p] = k(null), b = Z(), C = $("geometry"), w = U(!1), P = ae(Object.assign(Object.assign({}, y), { clickable: (n = y.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = y.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = y.editable) !== null && o !== void 0 ? o : !!l }), re);
|
|
999
|
+
return E(() => {
|
|
1000
1000
|
if (!b) {
|
|
1001
1001
|
b === void 0 && console.error("<Polyline> has to be inside a Map component.");
|
|
1002
1002
|
return;
|
|
@@ -1007,29 +1007,29 @@ function mt(e) {
|
|
|
1007
1007
|
const O = u ?? h;
|
|
1008
1008
|
O && Array.isArray(O) && v.setPath(O), v.setOptions(P);
|
|
1009
1009
|
} else {
|
|
1010
|
-
const O = u ?? h,
|
|
1011
|
-
O && Array.isArray(O) && (
|
|
1010
|
+
const O = u ?? h, L = Object.assign({}, P);
|
|
1011
|
+
O && Array.isArray(O) && (L.path = O), v = new google.maps.Polyline(L);
|
|
1012
1012
|
}
|
|
1013
1013
|
return v.setMap(b), p(v), () => {
|
|
1014
1014
|
v.setMap(null), p(null);
|
|
1015
1015
|
};
|
|
1016
|
-
}, [b, m]),
|
|
1017
|
-
s == null || s(v), l && d && !
|
|
1018
|
-
}),
|
|
1016
|
+
}, [b, m]), D(d, "click", r), D(d, "drag", a), D(d, "dragstart", i), D(d, "mouseover", g), D(d, "mouseout", c), D(d, "dragend", (v) => {
|
|
1017
|
+
s == null || s(v), l && d && !w.current && l(d.getPath().getArray());
|
|
1018
|
+
}), E(() => {
|
|
1019
1019
|
if (!d || !l)
|
|
1020
1020
|
return;
|
|
1021
1021
|
const v = d.getPath();
|
|
1022
1022
|
if (!v)
|
|
1023
1023
|
return;
|
|
1024
1024
|
const O = () => {
|
|
1025
|
-
|
|
1026
|
-
},
|
|
1025
|
+
w.current || l(v.getArray());
|
|
1026
|
+
}, L = [
|
|
1027
1027
|
google.maps.event.addListener(v, "insert_at", O),
|
|
1028
1028
|
google.maps.event.addListener(v, "remove_at", O),
|
|
1029
1029
|
google.maps.event.addListener(v, "set_at", O)
|
|
1030
1030
|
];
|
|
1031
1031
|
return () => {
|
|
1032
|
-
|
|
1032
|
+
L.forEach((_) => _.remove());
|
|
1033
1033
|
};
|
|
1034
1034
|
}, [
|
|
1035
1035
|
d,
|
|
@@ -1038,34 +1038,34 @@ function mt(e) {
|
|
|
1038
1038
|
f,
|
|
1039
1039
|
P.editable,
|
|
1040
1040
|
P.draggable
|
|
1041
|
-
]),
|
|
1041
|
+
]), E(() => {
|
|
1042
1042
|
d && d.setOptions(P);
|
|
1043
|
-
}, [d, P]),
|
|
1043
|
+
}, [d, P]), E(() => {
|
|
1044
1044
|
if (!d || !u)
|
|
1045
1045
|
return;
|
|
1046
1046
|
const v = d.getPath();
|
|
1047
|
-
qe(u, v) || (
|
|
1048
|
-
}, [d, u]),
|
|
1049
|
-
if (!d || !f || !
|
|
1047
|
+
qe(u, v) || (w.current = !0, d.setPath(u), w.current = !1);
|
|
1048
|
+
}, [d, u]), E(() => {
|
|
1049
|
+
if (!d || !f || !C)
|
|
1050
1050
|
return;
|
|
1051
|
-
|
|
1052
|
-
const v =
|
|
1053
|
-
d.setPath(v),
|
|
1054
|
-
}, [d, f,
|
|
1051
|
+
w.current = !0;
|
|
1052
|
+
const v = C.encoding.decodePath(f);
|
|
1053
|
+
d.setPath(v), w.current = !1;
|
|
1054
|
+
}, [d, f, C]), d;
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1057
|
-
const t =
|
|
1056
|
+
const ht = H((e, n) => {
|
|
1057
|
+
const t = pt(e);
|
|
1058
1058
|
return V(n, () => t, [t]), A.createElement(A.Fragment, null);
|
|
1059
1059
|
});
|
|
1060
|
-
|
|
1061
|
-
const
|
|
1060
|
+
ht.displayName = "Polyline";
|
|
1061
|
+
const vt = {
|
|
1062
1062
|
center: { lat: 0, lng: 0, altitude: 0 },
|
|
1063
1063
|
range: 0,
|
|
1064
1064
|
heading: 0,
|
|
1065
1065
|
tilt: 0,
|
|
1066
1066
|
roll: 0
|
|
1067
|
-
},
|
|
1068
|
-
function
|
|
1067
|
+
}, yt = ["center", "range", "heading", "tilt", "roll"];
|
|
1068
|
+
function bt(e, n, t) {
|
|
1069
1069
|
const o = e[t];
|
|
1070
1070
|
if (o != null)
|
|
1071
1071
|
if (t === "center") {
|
|
@@ -1074,15 +1074,15 @@ function yt(e, n, t) {
|
|
|
1074
1074
|
} else
|
|
1075
1075
|
n.current[t] = o;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1078
|
-
const n = Ke(), t = U(Object.assign({},
|
|
1079
|
-
return
|
|
1077
|
+
function Et(e) {
|
|
1078
|
+
const n = Ke(), t = U(Object.assign({}, vt));
|
|
1079
|
+
return E(() => {
|
|
1080
1080
|
if (!e)
|
|
1081
1081
|
return;
|
|
1082
1082
|
const o = [];
|
|
1083
|
-
for (const r of
|
|
1083
|
+
for (const r of yt) {
|
|
1084
1084
|
const a = `gmp-${r}change`, i = () => {
|
|
1085
|
-
|
|
1085
|
+
bt(e, t, r), n();
|
|
1086
1086
|
};
|
|
1087
1087
|
e.addEventListener(a, i), o.push(() => e.removeEventListener(a, i));
|
|
1088
1088
|
}
|
|
@@ -1093,12 +1093,12 @@ function bt(e) {
|
|
|
1093
1093
|
}, [e, n]), t;
|
|
1094
1094
|
}
|
|
1095
1095
|
function Ct(e) {
|
|
1096
|
-
const n = $("maps3d"), [t, o] =
|
|
1097
|
-
return
|
|
1096
|
+
const n = $("maps3d"), [t, o] = k(!1), [, r] = ye(), [a, i] = ye(), s = Et(a);
|
|
1097
|
+
return E(() => {
|
|
1098
1098
|
customElements.whenDefined("gmp-map-3d").then(() => {
|
|
1099
1099
|
o(!0);
|
|
1100
1100
|
});
|
|
1101
|
-
}, []),
|
|
1101
|
+
}, []), E(
|
|
1102
1102
|
() => {
|
|
1103
1103
|
if (!a)
|
|
1104
1104
|
return;
|
|
@@ -1114,13 +1114,13 @@ function Ct(e) {
|
|
|
1114
1114
|
defaultRange: p,
|
|
1115
1115
|
defaultRoll: b,
|
|
1116
1116
|
// Non-element props to exclude
|
|
1117
|
-
id:
|
|
1118
|
-
style:
|
|
1117
|
+
id: C,
|
|
1118
|
+
style: w,
|
|
1119
1119
|
className: P,
|
|
1120
1120
|
children: v,
|
|
1121
1121
|
onCenterChanged: O,
|
|
1122
|
-
onHeadingChanged:
|
|
1123
|
-
onTiltChanged:
|
|
1122
|
+
onHeadingChanged: L,
|
|
1123
|
+
onTiltChanged: _,
|
|
1124
1124
|
onRangeChanged: T,
|
|
1125
1125
|
onRollChanged: x,
|
|
1126
1126
|
onCameraChanged: R,
|
|
@@ -1129,9 +1129,9 @@ function Ct(e) {
|
|
|
1129
1129
|
onAnimationEnd: Ae,
|
|
1130
1130
|
onError: ge,
|
|
1131
1131
|
mode: Te,
|
|
1132
|
-
gestureHandling:
|
|
1133
|
-
} = e,
|
|
1134
|
-
|
|
1132
|
+
gestureHandling: Le
|
|
1133
|
+
} = e, M = j(e, ["center", "heading", "tilt", "range", "roll", "defaultCenter", "defaultHeading", "defaultTilt", "defaultRange", "defaultRoll", "id", "style", "className", "children", "onCenterChanged", "onHeadingChanged", "onTiltChanged", "onRangeChanged", "onRollChanged", "onCameraChanged", "onClick", "onSteadyChange", "onAnimationEnd", "onError", "mode", "gestureHandling"]), S = c ?? h, W = l ?? y, De = m ?? d, Se = f ?? p, _e = u ?? b, K = Object.assign({}, M);
|
|
1134
|
+
S && (K.center = S), W !== void 0 && (K.heading = W), De !== void 0 && (K.tilt = De), Se !== void 0 && (K.range = Se), _e !== void 0 && (K.roll = _e), Object.assign(a, K);
|
|
1135
1135
|
},
|
|
1136
1136
|
// this effect should only run when the map3d element first becomes
|
|
1137
1137
|
// available, so we skip re-running it when other props change.
|
|
@@ -1139,22 +1139,22 @@ function Ct(e) {
|
|
|
1139
1139
|
[a]
|
|
1140
1140
|
), [a, r, i, s, !!n && t];
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function Ot(e) {
|
|
1143
1143
|
return e ? "toJSON" in e && typeof e.toJSON == "function" ? e.toJSON() : e : null;
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function Mt(e, n, t) {
|
|
1146
1146
|
var o, r, a, i, s, g, c;
|
|
1147
|
-
const l =
|
|
1148
|
-
|
|
1147
|
+
const l = Ot(t.center), m = (o = l == null ? void 0 : l.lat) !== null && o !== void 0 ? o : null, f = (r = l == null ? void 0 : l.lng) !== null && r !== void 0 ? r : null, u = (a = l == null ? void 0 : l.altitude) !== null && a !== void 0 ? a : null, h = (i = t.range) !== null && i !== void 0 ? i : null, y = (s = t.heading) !== null && s !== void 0 ? s : null, d = (g = t.tilt) !== null && g !== void 0 ? g : null, p = (c = t.roll) !== null && c !== void 0 ? c : null;
|
|
1148
|
+
Q(() => {
|
|
1149
1149
|
var b;
|
|
1150
1150
|
if (!e)
|
|
1151
1151
|
return;
|
|
1152
|
-
const
|
|
1153
|
-
m !== null && f !== null && (
|
|
1152
|
+
const C = n.current;
|
|
1153
|
+
m !== null && f !== null && (C.center.lat !== m || C.center.lng !== f || u !== null && C.center.altitude !== u) && (e.center = {
|
|
1154
1154
|
lat: m,
|
|
1155
1155
|
lng: f,
|
|
1156
|
-
altitude: (b = u ??
|
|
1157
|
-
}), h !== null &&
|
|
1156
|
+
altitude: (b = u ?? C.center.altitude) !== null && b !== void 0 ? b : 0
|
|
1157
|
+
}), h !== null && C.range !== h && (e.range = h), y !== null && C.heading !== y && (e.heading = y), d !== null && C.tilt !== d && (e.tilt = d), p !== null && C.roll !== p && (e.roll = p);
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
1160
1160
|
const je = [
|
|
@@ -1164,7 +1164,7 @@ const je = [
|
|
|
1164
1164
|
"gmp-rangechange",
|
|
1165
1165
|
"gmp-rollchange"
|
|
1166
1166
|
];
|
|
1167
|
-
function
|
|
1167
|
+
function Y(e, n) {
|
|
1168
1168
|
const t = e.center;
|
|
1169
1169
|
let o;
|
|
1170
1170
|
return t && "toJSON" in t && typeof t.toJSON == "function" ? o = t.toJSON() : t ? o = t : o = { lat: 0, lng: 0, altitude: 0 }, {
|
|
@@ -1179,7 +1179,7 @@ function K(e, n) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function wt(e, n) {
|
|
1183
1183
|
const t = n;
|
|
1184
1184
|
return {
|
|
1185
1185
|
type: "gmp-click",
|
|
@@ -1190,7 +1190,7 @@ function Mt(e, n) {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
};
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Pt(e, n) {
|
|
1194
1194
|
return {
|
|
1195
1195
|
type: "gmp-steadychange",
|
|
1196
1196
|
map3d: e,
|
|
@@ -1199,13 +1199,13 @@ function wt(e, n) {
|
|
|
1199
1199
|
}
|
|
1200
1200
|
};
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function At(e, n) {
|
|
1203
1203
|
const { onCenterChanged: t, onHeadingChanged: o, onTiltChanged: r, onRangeChanged: a, onRollChanged: i, onCameraChanged: s, onClick: g, onSteadyChange: c, onAnimationEnd: l, onError: m } = n;
|
|
1204
|
-
J(e, "gmp-centerchange", t,
|
|
1204
|
+
J(e, "gmp-centerchange", t, Y), J(e, "gmp-headingchange", o, Y), J(e, "gmp-tiltchange", r, Y), J(e, "gmp-rangechange", a, Y), J(e, "gmp-rollchange", i, Y), E(() => {
|
|
1205
1205
|
if (!e || !s)
|
|
1206
1206
|
return;
|
|
1207
1207
|
const f = () => {
|
|
1208
|
-
s(
|
|
1208
|
+
s(Y(e, "camerachange"));
|
|
1209
1209
|
};
|
|
1210
1210
|
for (const u of je)
|
|
1211
1211
|
e.addEventListener(u, f);
|
|
@@ -1213,18 +1213,18 @@ function Pt(e, n) {
|
|
|
1213
1213
|
for (const u of je)
|
|
1214
1214
|
e.removeEventListener(u, f);
|
|
1215
1215
|
};
|
|
1216
|
-
}, [e, s]),
|
|
1216
|
+
}, [e, s]), E(() => {
|
|
1217
1217
|
if (!e || !g)
|
|
1218
1218
|
return;
|
|
1219
1219
|
const f = (u) => {
|
|
1220
|
-
g(
|
|
1220
|
+
g(wt(e, u));
|
|
1221
1221
|
};
|
|
1222
1222
|
return e.addEventListener("gmp-click", f), () => e.removeEventListener("gmp-click", f);
|
|
1223
|
-
}, [e, g]),
|
|
1223
|
+
}, [e, g]), E(() => {
|
|
1224
1224
|
if (!e || !c)
|
|
1225
1225
|
return;
|
|
1226
1226
|
const f = (u) => {
|
|
1227
|
-
c(
|
|
1227
|
+
c(Pt(e, u));
|
|
1228
1228
|
};
|
|
1229
1229
|
return e.addEventListener("gmp-steadychange", f), () => e.removeEventListener("gmp-steadychange", f);
|
|
1230
1230
|
}, [e, c]), J(e, "gmp-animationend", l, (f, u) => ({
|
|
@@ -1236,7 +1236,7 @@ function Pt(e, n) {
|
|
|
1236
1236
|
}));
|
|
1237
1237
|
}
|
|
1238
1238
|
function J(e, n, t, o) {
|
|
1239
|
-
|
|
1239
|
+
E(() => {
|
|
1240
1240
|
if (!e || !t)
|
|
1241
1241
|
return;
|
|
1242
1242
|
const r = () => {
|
|
@@ -1245,7 +1245,7 @@ function J(e, n, t, o) {
|
|
|
1245
1245
|
return e.addEventListener(n, r), () => e.removeEventListener(n, r);
|
|
1246
1246
|
}, [e, n, t, o]);
|
|
1247
1247
|
}
|
|
1248
|
-
const
|
|
1248
|
+
const Tt = /* @__PURE__ */ new Set([
|
|
1249
1249
|
"bounds",
|
|
1250
1250
|
"defaultUIHidden",
|
|
1251
1251
|
"gestureHandling",
|
|
@@ -1258,11 +1258,11 @@ const At = /* @__PURE__ */ new Set([
|
|
|
1258
1258
|
"minTilt",
|
|
1259
1259
|
"mode"
|
|
1260
1260
|
]);
|
|
1261
|
-
function
|
|
1261
|
+
function Lt(e, n) {
|
|
1262
1262
|
const t = N(() => {
|
|
1263
1263
|
const o = {}, r = Object.keys(n);
|
|
1264
1264
|
for (const a of r) {
|
|
1265
|
-
if (!
|
|
1265
|
+
if (!Tt.has(a))
|
|
1266
1266
|
continue;
|
|
1267
1267
|
const i = n[a];
|
|
1268
1268
|
i !== void 0 && (o[a] = i);
|
|
@@ -1273,16 +1273,16 @@ function Tt(e, n) {
|
|
|
1273
1273
|
e && Object.assign(e, t);
|
|
1274
1274
|
}, [e, t]);
|
|
1275
1275
|
}
|
|
1276
|
-
const
|
|
1276
|
+
const Dt = A.createContext(null), St = {
|
|
1277
1277
|
width: "100%",
|
|
1278
1278
|
height: "100%",
|
|
1279
1279
|
position: "relative"
|
|
1280
|
-
},
|
|
1281
|
-
const { children: t, id: o, className: r, style: a } = e, i = F(
|
|
1280
|
+
}, _t = H((e, n) => {
|
|
1281
|
+
const { children: t, id: o, className: r, style: a } = e, i = F(ee);
|
|
1282
1282
|
if (!i)
|
|
1283
1283
|
throw new Error("<Map3D> can only be used inside an <APIProvider> component.");
|
|
1284
1284
|
const { addMap3DInstance: s, removeMap3DInstance: g } = i, [c, l, m, f, u] = Ct(e);
|
|
1285
|
-
|
|
1285
|
+
Mt(c, f, e), At(c, e), Lt(c, e), E(() => {
|
|
1286
1286
|
if (!c)
|
|
1287
1287
|
return;
|
|
1288
1288
|
const d = o ?? "default";
|
|
@@ -1301,56 +1301,56 @@ const kt = A.createContext(null), Lt = {
|
|
|
1301
1301
|
c == null || c.stopCameraAnimation();
|
|
1302
1302
|
}
|
|
1303
1303
|
}), [c]);
|
|
1304
|
-
const h = N(() => Object.assign(Object.assign({},
|
|
1304
|
+
const h = N(() => Object.assign(Object.assign({}, St), a), [a]), y = N(() => ({ map3d: c }), [c]);
|
|
1305
1305
|
return u ? A.createElement(
|
|
1306
1306
|
"div",
|
|
1307
1307
|
Object.assign({ ref: l, "data-testid": "map-3d", style: r ? void 0 : h, className: r }, o ? { id: o } : {}),
|
|
1308
|
-
A.createElement("gmp-map-3d", { ref: m, style: { width: "100%", height: "100%" } }, c && A.createElement(
|
|
1308
|
+
A.createElement("gmp-map-3d", { ref: m, style: { width: "100%", height: "100%" } }, c && A.createElement(Dt.Provider, { value: y }, t))
|
|
1309
1309
|
) : A.createElement("div", Object.assign({ ref: l, "data-testid": "map-3d", style: r ? void 0 : h, className: r }, o ? { id: o } : {}));
|
|
1310
1310
|
});
|
|
1311
|
-
|
|
1312
|
-
const we =
|
|
1313
|
-
const { children: o, onClick: r, position: a, altitudeMode: i, collisionBehavior: s, drawsWhenOccluded: g, extruded: c, label: l, sizePreserved: m, zIndex: f, title: u } = n, h = !!r, [y, d] =
|
|
1311
|
+
_t.displayName = "Map3D";
|
|
1312
|
+
const we = tn(null), kt = H(function(n, t) {
|
|
1313
|
+
const { children: o, onClick: r, position: a, altitudeMode: i, collisionBehavior: s, drawsWhenOccluded: g, extruded: c, label: l, sizePreserved: m, zIndex: f, title: u } = n, h = !!r, [y, d] = k(null), [p, b] = k(!1), C = N(() => {
|
|
1314
1314
|
const v = document.createElement("div");
|
|
1315
1315
|
return v.style.display = "none", document.body.appendChild(v), v;
|
|
1316
1316
|
}, []);
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1317
|
+
E(() => () => C.remove(), [C]);
|
|
1318
|
+
const w = ne((v) => {
|
|
1319
1319
|
d(v), typeof t == "function" ? t(v) : t && (t.current = v);
|
|
1320
1320
|
}, [t]);
|
|
1321
|
-
be(y, "gmp-click", r),
|
|
1322
|
-
if (p || !y || !
|
|
1321
|
+
be(y, "gmp-click", r), Q(() => {
|
|
1322
|
+
if (p || !y || !C)
|
|
1323
1323
|
return;
|
|
1324
1324
|
for (; y.firstChild; )
|
|
1325
1325
|
y.removeChild(y.firstChild);
|
|
1326
|
-
const v = Array.from(
|
|
1326
|
+
const v = Array.from(C.childNodes);
|
|
1327
1327
|
for (const O of v) {
|
|
1328
1328
|
if (O.nodeType !== Node.ELEMENT_NODE)
|
|
1329
1329
|
continue;
|
|
1330
|
-
const
|
|
1331
|
-
if (
|
|
1330
|
+
const L = O, _ = L.tagName.toLowerCase();
|
|
1331
|
+
if (_ === "img" || _ === "svg") {
|
|
1332
1332
|
const T = document.createElement("template");
|
|
1333
|
-
T.content.appendChild(
|
|
1333
|
+
T.content.appendChild(L.cloneNode(!0)), y.appendChild(T);
|
|
1334
1334
|
} else
|
|
1335
|
-
y.appendChild(
|
|
1335
|
+
y.appendChild(L.cloneNode(!0));
|
|
1336
1336
|
}
|
|
1337
|
-
}, [y,
|
|
1337
|
+
}, [y, C, o, p]);
|
|
1338
1338
|
const P = N(() => ({ marker: y, setContentHandledExternally: b }), [y]);
|
|
1339
1339
|
return I(y, "position", a), I(y, "altitudeMode", i), I(y, "collisionBehavior", s), I(y, "drawsWhenOccluded", g), I(y, "extruded", c), I(y, "label", l), I(y, "sizePreserved", m), I(y, "zIndex", f), I(y, "title", u ?? ""), A.createElement(
|
|
1340
1340
|
we.Provider,
|
|
1341
1341
|
{ value: P },
|
|
1342
|
-
h ? A.createElement("gmp-marker-3d-interactive", { ref:
|
|
1343
|
-
ue(o,
|
|
1342
|
+
h ? A.createElement("gmp-marker-3d-interactive", { ref: w }) : A.createElement("gmp-marker-3d", { ref: w }),
|
|
1343
|
+
ue(o, C)
|
|
1344
1344
|
);
|
|
1345
1345
|
});
|
|
1346
|
-
|
|
1347
|
-
const
|
|
1346
|
+
kt.displayName = "Marker3D";
|
|
1347
|
+
const It = H(function(n, t) {
|
|
1348
1348
|
var o;
|
|
1349
|
-
const { children: r, headerContent: a, style: i, className: s, open: g = !0, position: c, anchor: l, anchorId: m, altitudeMode: f, lightDismissDisabled: u, autoPanDisabled: h, onClose: y } = n, [d, p] =
|
|
1350
|
-
V(t, () => d, [d]),
|
|
1351
|
-
const
|
|
1352
|
-
return I(d, "positionAnchor",
|
|
1353
|
-
d && (
|
|
1349
|
+
const { children: r, headerContent: a, style: i, className: s, open: g = !0, position: c, anchor: l, anchorId: m, altitudeMode: f, lightDismissDisabled: u, autoPanDisabled: h, onClose: y } = n, [d, p] = k(null), b = U(null);
|
|
1350
|
+
V(t, () => d, [d]), Nt(d, g, y), I(d, "open", g ?? !1), I(d, "altitudeMode", f), I(d, "lightDismissDisabled", u), I(d, "autoPanDisabled", h);
|
|
1351
|
+
const C = (o = l ?? m) !== null && o !== void 0 ? o : c;
|
|
1352
|
+
return I(d, "positionAnchor", C), Q(() => {
|
|
1353
|
+
d && (dt(d, i || null, b.current), b.current = i || null);
|
|
1354
1354
|
}, [d, i]), A.createElement(
|
|
1355
1355
|
"gmp-popover",
|
|
1356
1356
|
{ ref: p, className: s },
|
|
@@ -1358,12 +1358,12 @@ const _t = H(function(n, t) {
|
|
|
1358
1358
|
r
|
|
1359
1359
|
);
|
|
1360
1360
|
});
|
|
1361
|
-
|
|
1362
|
-
function
|
|
1361
|
+
It.displayName = "Popover";
|
|
1362
|
+
function Nt(e, n, t) {
|
|
1363
1363
|
const o = U(void 0), r = U(n);
|
|
1364
|
-
|
|
1364
|
+
E(() => {
|
|
1365
1365
|
r.current = n;
|
|
1366
|
-
}, [n]),
|
|
1366
|
+
}, [n]), E(() => {
|
|
1367
1367
|
if (!e || !t)
|
|
1368
1368
|
return;
|
|
1369
1369
|
const a = new MutationObserver((i) => {
|
|
@@ -1381,9 +1381,9 @@ function It(e, n, t) {
|
|
|
1381
1381
|
};
|
|
1382
1382
|
}, [e, t]);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
const [n, t] =
|
|
1386
|
-
return
|
|
1384
|
+
function xt(e) {
|
|
1385
|
+
const [n, t] = k(null), o = Z(), { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c } = e, l = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut"]), { position: m, draggable: f } = l;
|
|
1386
|
+
return E(() => {
|
|
1387
1387
|
if (!o) {
|
|
1388
1388
|
o === void 0 && console.error("<Marker> has to be inside a Map component.");
|
|
1389
1389
|
return;
|
|
@@ -1392,7 +1392,7 @@ function Nt(e) {
|
|
|
1392
1392
|
return u.setMap(o), t(u), () => {
|
|
1393
1393
|
u.setMap(null), t(null);
|
|
1394
1394
|
};
|
|
1395
|
-
}, [o]),
|
|
1395
|
+
}, [o]), E(() => {
|
|
1396
1396
|
if (!n)
|
|
1397
1397
|
return;
|
|
1398
1398
|
const u = n, h = google.maps.event;
|
|
@@ -1408,23 +1408,23 @@ function Nt(e) {
|
|
|
1408
1408
|
s,
|
|
1409
1409
|
g,
|
|
1410
1410
|
c
|
|
1411
|
-
]),
|
|
1411
|
+
]), E(() => {
|
|
1412
1412
|
n && l && n.setOptions(l);
|
|
1413
|
-
}, [n, l]),
|
|
1413
|
+
}, [n, l]), E(() => {
|
|
1414
1414
|
f || !m || !n || n.setPosition(m);
|
|
1415
1415
|
}, [f, m, n]), n;
|
|
1416
1416
|
}
|
|
1417
|
-
const
|
|
1418
|
-
const t =
|
|
1417
|
+
const nn = H((e, n) => {
|
|
1418
|
+
const t = xt(e);
|
|
1419
1419
|
return V(n, () => t, [t]), A.createElement(A.Fragment, null);
|
|
1420
1420
|
});
|
|
1421
|
-
|
|
1421
|
+
nn.displayName = "Marker";
|
|
1422
1422
|
const Rt = (e) => {
|
|
1423
1423
|
const n = F(Me), t = F(we), o = n == null ? void 0 : n.marker, r = t == null ? void 0 : t.marker, a = t == null ? void 0 : t.setContentHandledExternally, i = N(() => document.createElement("div"), []), s = $("marker");
|
|
1424
|
-
return
|
|
1424
|
+
return E(() => {
|
|
1425
1425
|
if (r && a)
|
|
1426
1426
|
return a(!0), () => a(!1);
|
|
1427
|
-
}, [r, a]),
|
|
1427
|
+
}, [r, a]), E(() => {
|
|
1428
1428
|
if (!r || !s)
|
|
1429
1429
|
return;
|
|
1430
1430
|
const g = Object.assign({}, e), c = new s.PinElement(g);
|
|
@@ -1432,7 +1432,7 @@ const Rt = (e) => {
|
|
|
1432
1432
|
r.removeChild(r.firstChild);
|
|
1433
1433
|
return r.append(c), () => {
|
|
1434
1434
|
};
|
|
1435
|
-
}, [r, s, i, e]),
|
|
1435
|
+
}, [r, s, i, e]), E(() => {
|
|
1436
1436
|
var g;
|
|
1437
1437
|
if (r)
|
|
1438
1438
|
return;
|
|
@@ -1440,7 +1440,7 @@ const Rt = (e) => {
|
|
|
1440
1440
|
o === void 0 && r === void 0 && console.error("The <Pin> component can only be used inside <AdvancedMarker> or <Marker3D>.");
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
|
-
e.glyph && e.children && te("The <Pin> component only uses children to render the glyph if both the glyph property and children are present."),
|
|
1443
|
+
e.glyph && e.children && te("The <Pin> component only uses children to render the glyph if both the glyph property and children are present."), Ce.count(e.children) > 1 && te("Passing multiple children to the <Pin> component might lead to unexpected results.");
|
|
1444
1444
|
const c = Object.assign({}, e), l = new google.maps.marker.PinElement(c);
|
|
1445
1445
|
e.children && (l.glyph = i);
|
|
1446
1446
|
const m = (g = o.content) === null || g === void 0 ? void 0 : g.firstChild;
|
|
@@ -1450,10 +1450,10 @@ const Rt = (e) => {
|
|
|
1450
1450
|
}, [o, i, r, e]), ue(e.children, i);
|
|
1451
1451
|
}, zt = (e) => {
|
|
1452
1452
|
const { children: n } = e, t = F(Me), o = F(we), r = t == null ? void 0 : t.marker, a = o == null ? void 0 : o.marker, i = o == null ? void 0 : o.setContentHandledExternally, s = N(() => document.createElement("div"), []), g = $("marker");
|
|
1453
|
-
return
|
|
1453
|
+
return E(() => {
|
|
1454
1454
|
if (a && i)
|
|
1455
1455
|
return i(!0), () => i(!1);
|
|
1456
|
-
}, [a, i]),
|
|
1456
|
+
}, [a, i]), E(() => {
|
|
1457
1457
|
if (!a || !g)
|
|
1458
1458
|
return;
|
|
1459
1459
|
const c = Object.assign({}, e), l = new g.PinElement(c);
|
|
@@ -1461,7 +1461,7 @@ const Rt = (e) => {
|
|
|
1461
1461
|
a.removeChild(a.firstChild);
|
|
1462
1462
|
return a.appendChild(l), () => {
|
|
1463
1463
|
};
|
|
1464
|
-
}, [a, g, s, n, e]),
|
|
1464
|
+
}, [a, g, s, n, e]), E(() => {
|
|
1465
1465
|
var c;
|
|
1466
1466
|
if (a)
|
|
1467
1467
|
return;
|
|
@@ -1469,7 +1469,7 @@ const Rt = (e) => {
|
|
|
1469
1469
|
r === void 0 && a === void 0 && console.error("The <Pin> component can only be used inside <AdvancedMarker> or <Marker3D>.");
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
|
-
(e.glyphSrc || e.glyphText) && n && te("The <Pin> component only uses children to render the glyph if both glyphSrc/glyphText and children are present."),
|
|
1472
|
+
(e.glyphSrc || e.glyphText) && n && te("The <Pin> component only uses children to render the glyph if both glyphSrc/glyphText and children are present."), Ce.count(n) > 1 && te("Passing multiple children to the <Pin> component might lead to unexpected results.");
|
|
1473
1473
|
const l = Object.assign({}, e), m = new g.PinElement(l);
|
|
1474
1474
|
n && m.appendChild(s);
|
|
1475
1475
|
const f = (c = r.content) === null || c === void 0 ? void 0 : c.firstChild;
|
|
@@ -1499,8 +1499,8 @@ const Rt = (e) => {
|
|
|
1499
1499
|
};
|
|
1500
1500
|
function Bt(e) {
|
|
1501
1501
|
var n, t, o;
|
|
1502
|
-
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onBoundsChanged: l, bounds: m, defaultBounds: f } = e, u = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onBoundsChanged", "bounds", "defaultBounds"]), [h, y] =
|
|
1503
|
-
return
|
|
1502
|
+
const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onBoundsChanged: l, bounds: m, defaultBounds: f } = e, u = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onBoundsChanged", "bounds", "defaultBounds"]), [h, y] = k(null), d = Z(), p = ae(Object.assign(Object.assign({}, u), { clickable: (n = u.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = u.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = u.editable) !== null && o !== void 0 ? o : !!l }), re);
|
|
1503
|
+
return E(() => {
|
|
1504
1504
|
if (!d) {
|
|
1505
1505
|
d === void 0 && console.error("<Rectangle> has to be inside a Map component.");
|
|
1506
1506
|
return;
|
|
@@ -1509,12 +1509,12 @@ function Bt(e) {
|
|
|
1509
1509
|
return b.setMap(d), y(b), () => {
|
|
1510
1510
|
b.setMap(null), y(null);
|
|
1511
1511
|
};
|
|
1512
|
-
}, [d]),
|
|
1512
|
+
}, [d]), D(h, "click", r), D(h, "drag", a), D(h, "dragstart", i), D(h, "dragend", s), D(h, "mouseover", g), D(h, "mouseout", c), D(h, "bounds_changed", l ? () => {
|
|
1513
1513
|
l(h == null ? void 0 : h.getBounds());
|
|
1514
|
-
} : null),
|
|
1514
|
+
} : null), E(() => {
|
|
1515
1515
|
h && h.setOptions(p);
|
|
1516
|
-
}, [h, p]),
|
|
1517
|
-
!h || !m ||
|
|
1516
|
+
}, [h, p]), E(() => {
|
|
1517
|
+
!h || !m || Un(m, h.getBounds()) || h.setBounds(m);
|
|
1518
1518
|
}, [h, m]), h;
|
|
1519
1519
|
}
|
|
1520
1520
|
const Ft = H((e, n) => {
|
|
@@ -1524,11 +1524,11 @@ const Ft = H((e, n) => {
|
|
|
1524
1524
|
]), A.createElement(A.Fragment, null);
|
|
1525
1525
|
});
|
|
1526
1526
|
Ft.displayName = "Rectangle";
|
|
1527
|
-
function
|
|
1527
|
+
function X(e) {
|
|
1528
1528
|
return typeof document > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
1529
1529
|
}
|
|
1530
1530
|
function pe() {
|
|
1531
|
-
const e =
|
|
1531
|
+
const e = X("--background"), n = X("--foreground"), t = X("--border"), o = X("--muted"), r = X("--muted-foreground"), a = X("--primary");
|
|
1532
1532
|
return [
|
|
1533
1533
|
// Hide business POIs — clinical-listing UIs don't want Google's
|
|
1534
1534
|
// restaurants / shops bleeding into the practice-location card.
|
|
@@ -1726,7 +1726,7 @@ function Zt({
|
|
|
1726
1726
|
onMarkerSelect: n
|
|
1727
1727
|
}) {
|
|
1728
1728
|
const t = Z();
|
|
1729
|
-
return
|
|
1729
|
+
return E(() => {
|
|
1730
1730
|
t && e({
|
|
1731
1731
|
panTo: (o) => t.panTo(o),
|
|
1732
1732
|
setZoom: (o) => t.setZoom(o),
|
|
@@ -1744,7 +1744,7 @@ function $t({
|
|
|
1744
1744
|
const { t: a } = He();
|
|
1745
1745
|
return /* @__PURE__ */ le("div", { className: Gt(), "data-testid": "map-view-consent", children: [
|
|
1746
1746
|
/* @__PURE__ */ z(
|
|
1747
|
-
|
|
1747
|
+
ln,
|
|
1748
1748
|
{
|
|
1749
1749
|
"aria-hidden": "true",
|
|
1750
1750
|
className: "ds:size-6 ds:text-[var(--muted-foreground)]"
|
|
@@ -1762,7 +1762,7 @@ function $t({
|
|
|
1762
1762
|
/* @__PURE__ */ z("p", { className: Be(), children: n }),
|
|
1763
1763
|
/* @__PURE__ */ le("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
|
|
1764
1764
|
r ?? /* @__PURE__ */ z(
|
|
1765
|
-
|
|
1765
|
+
an,
|
|
1766
1766
|
{
|
|
1767
1767
|
type: "button",
|
|
1768
1768
|
intent: "primary",
|
|
@@ -1781,7 +1781,7 @@ function $t({
|
|
|
1781
1781
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary)] ds:underline ds:underline-offset-2",
|
|
1782
1782
|
children: [
|
|
1783
1783
|
a("mapView.openInGoogleMaps"),
|
|
1784
|
-
/* @__PURE__ */ z(
|
|
1784
|
+
/* @__PURE__ */ z(cn, { "aria-hidden": "true", className: "ds:size-3" })
|
|
1785
1785
|
]
|
|
1786
1786
|
}
|
|
1787
1787
|
)
|
|
@@ -1809,75 +1809,75 @@ const qt = H(
|
|
|
1809
1809
|
className: d,
|
|
1810
1810
|
...p
|
|
1811
1811
|
}, b) => {
|
|
1812
|
-
const { t:
|
|
1812
|
+
const { t: C, i18n: w } = He(), P = on(), v = N(
|
|
1813
1813
|
() => `map-${P.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
1814
1814
|
[P]
|
|
1815
|
-
), [O,
|
|
1816
|
-
|
|
1815
|
+
), [O, L] = k(!1);
|
|
1816
|
+
E(() => {
|
|
1817
1817
|
if (typeof window > "u") return;
|
|
1818
|
-
const
|
|
1819
|
-
return
|
|
1818
|
+
const M = window.matchMedia("(prefers-reduced-motion: reduce)"), S = () => L(M.matches);
|
|
1819
|
+
return S(), M.addEventListener("change", S), () => M.removeEventListener("change", S);
|
|
1820
1820
|
}, []);
|
|
1821
|
-
const
|
|
1821
|
+
const _ = N(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${t.lat},${t.lng}`}`, [c, t.lat, t.lng]), [T, x] = k(
|
|
1822
1822
|
() => f ? [] : pe()
|
|
1823
1823
|
);
|
|
1824
|
-
|
|
1824
|
+
E(() => {
|
|
1825
1825
|
if (f || typeof document > "u") return;
|
|
1826
1826
|
x(pe());
|
|
1827
|
-
const
|
|
1827
|
+
const M = new MutationObserver(() => {
|
|
1828
1828
|
x(pe());
|
|
1829
1829
|
});
|
|
1830
|
-
return
|
|
1830
|
+
return M.observe(document.documentElement, {
|
|
1831
1831
|
attributes: !0,
|
|
1832
1832
|
attributeFilter: ["class"]
|
|
1833
|
-
}), () =>
|
|
1833
|
+
}), () => M.disconnect();
|
|
1834
1834
|
}, [f]);
|
|
1835
|
-
const R = U(null), q = ne((
|
|
1836
|
-
R.current =
|
|
1835
|
+
const R = U(null), q = ne((M) => {
|
|
1836
|
+
R.current = M;
|
|
1837
1837
|
}, []);
|
|
1838
1838
|
V(
|
|
1839
1839
|
b,
|
|
1840
1840
|
() => ({
|
|
1841
|
-
panTo: (
|
|
1842
|
-
var
|
|
1843
|
-
return (
|
|
1841
|
+
panTo: (M) => {
|
|
1842
|
+
var S;
|
|
1843
|
+
return (S = R.current) == null ? void 0 : S.panTo(M);
|
|
1844
1844
|
},
|
|
1845
|
-
setZoom: (
|
|
1846
|
-
var
|
|
1847
|
-
return (
|
|
1845
|
+
setZoom: (M) => {
|
|
1846
|
+
var S;
|
|
1847
|
+
return (S = R.current) == null ? void 0 : S.setZoom(M);
|
|
1848
1848
|
},
|
|
1849
|
-
selectMarker: (
|
|
1850
|
-
var
|
|
1851
|
-
return (
|
|
1849
|
+
selectMarker: (M) => {
|
|
1850
|
+
var S;
|
|
1851
|
+
return (S = R.current) == null ? void 0 : S.selectMarker(M);
|
|
1852
1852
|
}
|
|
1853
1853
|
}),
|
|
1854
1854
|
[]
|
|
1855
1855
|
);
|
|
1856
1856
|
const Pe = N(
|
|
1857
1857
|
() => ({
|
|
1858
|
-
panTo: (
|
|
1859
|
-
var
|
|
1860
|
-
return (
|
|
1858
|
+
panTo: (M) => {
|
|
1859
|
+
var S;
|
|
1860
|
+
return (S = R.current) == null ? void 0 : S.panTo(M);
|
|
1861
1861
|
},
|
|
1862
|
-
setZoom: (
|
|
1863
|
-
var
|
|
1864
|
-
return (
|
|
1862
|
+
setZoom: (M) => {
|
|
1863
|
+
var S;
|
|
1864
|
+
return (S = R.current) == null ? void 0 : S.setZoom(M);
|
|
1865
1865
|
},
|
|
1866
|
-
selectMarker: (
|
|
1867
|
-
var
|
|
1868
|
-
return (
|
|
1866
|
+
selectMarker: (M) => {
|
|
1867
|
+
var S;
|
|
1868
|
+
return (S = R.current) == null ? void 0 : S.selectMarker(M);
|
|
1869
1869
|
}
|
|
1870
1870
|
}),
|
|
1871
1871
|
[]
|
|
1872
1872
|
);
|
|
1873
|
-
|
|
1874
|
-
var
|
|
1875
|
-
O || (
|
|
1876
|
-
}, [t.lat, t.lng, O]),
|
|
1877
|
-
var
|
|
1878
|
-
(
|
|
1873
|
+
sn(Ut, Pe, e), E(() => {
|
|
1874
|
+
var M;
|
|
1875
|
+
O || (M = R.current) == null || M.panTo(t);
|
|
1876
|
+
}, [t.lat, t.lng, O]), E(() => {
|
|
1877
|
+
var M;
|
|
1878
|
+
(M = R.current) == null || M.setZoom(o);
|
|
1879
1879
|
}, [o]);
|
|
1880
|
-
const [Ae, ge] =
|
|
1880
|
+
const [Ae, ge] = k(!1), Te = s || Ae, Le = ne(() => {
|
|
1881
1881
|
if (g) {
|
|
1882
1882
|
g(), ge(!0);
|
|
1883
1883
|
return;
|
|
@@ -1891,13 +1891,13 @@ const qt = H(
|
|
|
1891
1891
|
"data-component": "map-view",
|
|
1892
1892
|
"data-component-id": e ?? v,
|
|
1893
1893
|
role: "region",
|
|
1894
|
-
"aria-label": y ??
|
|
1894
|
+
"aria-label": y ?? C("mapView.label"),
|
|
1895
1895
|
...p,
|
|
1896
1896
|
children: /* @__PURE__ */ z("div", { className: Vt({ size: u }), children: Te ? /* @__PURE__ */ z(
|
|
1897
|
-
|
|
1897
|
+
Sn,
|
|
1898
1898
|
{
|
|
1899
1899
|
apiKey: n,
|
|
1900
|
-
language:
|
|
1900
|
+
language: w.language,
|
|
1901
1901
|
children: /* @__PURE__ */ le(
|
|
1902
1902
|
Xe,
|
|
1903
1903
|
{
|
|
@@ -1914,21 +1914,21 @@ const qt = H(
|
|
|
1914
1914
|
Zt,
|
|
1915
1915
|
{
|
|
1916
1916
|
onHandleReady: q,
|
|
1917
|
-
onMarkerSelect: (
|
|
1917
|
+
onMarkerSelect: (M) => i == null ? void 0 : i(M)
|
|
1918
1918
|
}
|
|
1919
1919
|
),
|
|
1920
|
-
(r ?? []).map((
|
|
1921
|
-
const
|
|
1922
|
-
label:
|
|
1920
|
+
(r ?? []).map((M) => {
|
|
1921
|
+
const S = a != null && a === M.id, W = C("mapView.markerLabel", {
|
|
1922
|
+
label: M.label ?? M.id
|
|
1923
1923
|
});
|
|
1924
|
-
return /* @__PURE__ */ z(
|
|
1924
|
+
return f ? /* @__PURE__ */ z(
|
|
1925
1925
|
en,
|
|
1926
1926
|
{
|
|
1927
|
-
position:
|
|
1928
|
-
title:
|
|
1929
|
-
"aria-label":
|
|
1930
|
-
"data-selected":
|
|
1931
|
-
onClick: () => i == null ? void 0 : i(
|
|
1927
|
+
position: M.position,
|
|
1928
|
+
title: W,
|
|
1929
|
+
"aria-label": W,
|
|
1930
|
+
"data-selected": S ? "true" : "false",
|
|
1931
|
+
onClick: () => i == null ? void 0 : i(M.id),
|
|
1932
1932
|
children: /* @__PURE__ */ z(
|
|
1933
1933
|
jt,
|
|
1934
1934
|
{
|
|
@@ -1938,7 +1938,15 @@ const qt = H(
|
|
|
1938
1938
|
}
|
|
1939
1939
|
)
|
|
1940
1940
|
},
|
|
1941
|
-
|
|
1941
|
+
M.id
|
|
1942
|
+
) : /* @__PURE__ */ z(
|
|
1943
|
+
nn,
|
|
1944
|
+
{
|
|
1945
|
+
position: M.position,
|
|
1946
|
+
title: W,
|
|
1947
|
+
onClick: () => i == null ? void 0 : i(M.id)
|
|
1948
|
+
},
|
|
1949
|
+
M.id
|
|
1942
1950
|
);
|
|
1943
1951
|
})
|
|
1944
1952
|
]
|
|
@@ -1949,10 +1957,10 @@ const qt = H(
|
|
|
1949
1957
|
$t,
|
|
1950
1958
|
{
|
|
1951
1959
|
address: c,
|
|
1952
|
-
description: l ??
|
|
1953
|
-
onLoadMap:
|
|
1960
|
+
description: l ?? C("mapView.consentDescription"),
|
|
1961
|
+
onLoadMap: Le,
|
|
1954
1962
|
consentCta: m,
|
|
1955
|
-
openInGoogleMapsHref:
|
|
1963
|
+
openInGoogleMapsHref: _
|
|
1956
1964
|
}
|
|
1957
1965
|
) })
|
|
1958
1966
|
}
|
|
@@ -1963,4 +1971,4 @@ qt.displayName = "MapView";
|
|
|
1963
1971
|
export {
|
|
1964
1972
|
qt as M
|
|
1965
1973
|
};
|
|
1966
|
-
//# sourceMappingURL=map-view-
|
|
1974
|
+
//# sourceMappingURL=map-view-ZgbhfRqy.js.map
|