@maptiler/geocoding-control 2.0.0-rc.4 → 2.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MapLibreBasedGeocodingControl.d.ts +18 -1
- package/leaflet-controller.d.ts +2 -1
- package/leaflet-controller.js +222 -219
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +2 -2
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.js +1013 -1022
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.d.ts +2 -1
- package/maplibregl-controller.js +213 -210
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +3 -3
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +17 -0
- package/maplibregl.js +1459 -1466
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +17 -0
- package/maptilersdk.js +1461 -1468
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers-controller.d.ts +2 -1
- package/openlayers-controller.js +298 -295
- package/openlayers-controller.js.map +1 -1
- package/openlayers-controller.umd.js +3 -3
- package/openlayers-controller.umd.js.map +1 -1
- package/openlayers.js +1301 -1310
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +680 -695
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +22 -47
- package/svelte/GeocodingControl.svelte.d.ts +0 -1
- package/svelte/MapLibreBasedGeocodingControl.d.ts +18 -1
- package/svelte/MapLibreBasedGeocodingControl.js +5 -1
- package/svelte/leaflet-controller.d.ts +2 -1
- package/svelte/leaflet-controller.js +6 -2
- package/svelte/leaflet.js +5 -1
- package/svelte/maplibregl-controller.d.ts +2 -1
- package/svelte/maplibregl-controller.js +6 -2
- package/svelte/maplibregl.d.ts +17 -0
- package/svelte/maptilersdk.d.ts +17 -0
- package/svelte/openlayers-controller.d.ts +2 -1
- package/svelte/openlayers-controller.js +6 -2
- package/svelte/openlayers.js +6 -3
- package/svelte/types.d.ts +1 -1
- package/types.d.ts +1 -1
- package/vanilla.js +610 -625
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/leaflet.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var dn = Object.defineProperty;
|
|
2
|
+
var Zt = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import * as
|
|
5
|
+
var hn = (i, e, t) => e in i ? dn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
+
var Lt = (i, e, t) => hn(i, typeof e != "symbol" ? e + "" : e, t), Qt = (i, e, t) => e.has(i) || Zt("Cannot " + t);
|
|
7
|
+
var $ = (i, e, t) => (Qt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), it = (i, e, t) => e.has(i) ? Zt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), nt = (i, e, t, n) => (Qt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
8
|
+
import * as le from "leaflet";
|
|
9
9
|
function W() {
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function gn(i, e) {
|
|
12
12
|
for (const t in e) i[t] = e[t];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
15
15
|
i
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ki(i) {
|
|
19
19
|
return i();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ht() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
24
|
function ye(i) {
|
|
25
|
-
i.forEach(
|
|
25
|
+
i.forEach(ki);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ni(i) {
|
|
28
28
|
return typeof i == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function xe(i, e) {
|
|
31
31
|
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
32
32
|
}
|
|
33
|
-
let
|
|
33
|
+
let rt;
|
|
34
34
|
function X(i, e) {
|
|
35
|
-
return i === e ? !0 : (
|
|
35
|
+
return i === e ? !0 : (rt || (rt = document.createElement("a")), rt.href = e, i === rt.href);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function mn(i) {
|
|
38
38
|
return Object.keys(i).length === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function yn(i, e, t, n) {
|
|
41
41
|
if (i) {
|
|
42
|
-
const r =
|
|
42
|
+
const r = Pi(i, e, t, n);
|
|
43
43
|
return i[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return i[1] && n ?
|
|
46
|
+
function Pi(i, e, t, n) {
|
|
47
|
+
return i[1] && n ? gn(t.ctx.slice(), i[1](n(e))) : t.ctx;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function pn(i, e, t, n) {
|
|
50
50
|
if (i[2] && n) {
|
|
51
51
|
const r = i[2](n(t));
|
|
52
52
|
if (e.dirty === void 0)
|
|
@@ -61,13 +61,13 @@ function wn(i, e, t, n) {
|
|
|
61
61
|
}
|
|
62
62
|
return e.dirty;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function bn(i, e, t, n, r, o) {
|
|
65
65
|
if (r) {
|
|
66
|
-
const u =
|
|
66
|
+
const u = Pi(e, t, n, o);
|
|
67
67
|
i.p(u, r);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function vn(i) {
|
|
71
71
|
if (i.ctx.length > 32) {
|
|
72
72
|
const e = [], t = i.ctx.length / 32;
|
|
73
73
|
for (let n = 0; n < t; n++)
|
|
@@ -76,10 +76,10 @@ function En(i) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Vt(i) {
|
|
80
80
|
return i ?? "";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function T(i, e) {
|
|
83
83
|
i.appendChild(e);
|
|
84
84
|
}
|
|
85
85
|
function U(i, e, t) {
|
|
@@ -91,22 +91,22 @@ function z(i) {
|
|
|
91
91
|
function A(i) {
|
|
92
92
|
return document.createElement(i);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ae(i) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", i);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Ee(i) {
|
|
98
98
|
return document.createTextNode(i);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
100
|
+
function ie() {
|
|
101
|
+
return Ee(" ");
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
103
|
+
function wn() {
|
|
104
|
+
return Ee("");
|
|
105
105
|
}
|
|
106
106
|
function J(i, e, t, n) {
|
|
107
107
|
return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function _n(i) {
|
|
110
110
|
return function(e) {
|
|
111
111
|
return e.preventDefault(), i.call(this, e);
|
|
112
112
|
};
|
|
@@ -114,39 +114,39 @@ function Sn(i) {
|
|
|
114
114
|
function p(i, e, t) {
|
|
115
115
|
t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function En(i) {
|
|
118
118
|
return Array.from(i.childNodes);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Ge(i, e) {
|
|
121
121
|
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Yt(i, e) {
|
|
125
125
|
i.value = e ?? "";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function oe(i, e, t) {
|
|
128
128
|
i.classList.toggle(e, !!t);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ln(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
|
|
131
131
|
return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
|
|
132
132
|
}
|
|
133
|
-
let
|
|
134
|
-
function
|
|
135
|
-
|
|
133
|
+
let je;
|
|
134
|
+
function Fe(i) {
|
|
135
|
+
je = i;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
if (!
|
|
139
|
-
return
|
|
137
|
+
function Ti() {
|
|
138
|
+
if (!je) throw new Error("Function called outside component initialization");
|
|
139
|
+
return je;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function Sn(i) {
|
|
142
|
+
Ti().$$.on_destroy.push(i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const i =
|
|
144
|
+
function xn() {
|
|
145
|
+
const i = Ti();
|
|
146
146
|
return (e, t, { cancelable: n = !1 } = {}) => {
|
|
147
147
|
const r = i.$$.callbacks[e];
|
|
148
148
|
if (r) {
|
|
149
|
-
const o =
|
|
149
|
+
const o = Ln(
|
|
150
150
|
/** @type {string} */
|
|
151
151
|
e,
|
|
152
152
|
t,
|
|
@@ -159,60 +159,60 @@ function kn() {
|
|
|
159
159
|
return !0;
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Xt(i, e) {
|
|
163
163
|
const t = i.$$.callbacks[e.type];
|
|
164
164
|
t && t.slice().forEach((n) => n.call(this, e));
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
function
|
|
171
|
-
|
|
166
|
+
const Ae = [], Ct = [];
|
|
167
|
+
let We = [];
|
|
168
|
+
const Kt = [], Mn = /* @__PURE__ */ Promise.resolve();
|
|
169
|
+
let kt = !1;
|
|
170
|
+
function Cn() {
|
|
171
|
+
kt || (kt = !0, Mn.then(Ri));
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
173
|
+
function Nt(i) {
|
|
174
|
+
We.push(i);
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
let
|
|
178
|
-
function
|
|
179
|
-
if (
|
|
176
|
+
const St = /* @__PURE__ */ new Set();
|
|
177
|
+
let Ie = 0;
|
|
178
|
+
function Ri() {
|
|
179
|
+
if (Ie !== 0)
|
|
180
180
|
return;
|
|
181
|
-
const i =
|
|
181
|
+
const i = je;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
|
-
for (;
|
|
185
|
-
const e =
|
|
186
|
-
|
|
184
|
+
for (; Ie < Ae.length; ) {
|
|
185
|
+
const e = Ae[Ie];
|
|
186
|
+
Ie++, Fe(e), kn(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw Ae.length = 0, Ie = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
192
|
-
for (let e = 0; e <
|
|
193
|
-
const t =
|
|
194
|
-
|
|
191
|
+
for (Fe(null), Ae.length = 0, Ie = 0; Ct.length; ) Ct.pop()();
|
|
192
|
+
for (let e = 0; e < We.length; e += 1) {
|
|
193
|
+
const t = We[e];
|
|
194
|
+
St.has(t) || (St.add(t), t());
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
} while (
|
|
198
|
-
for (;
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
We.length = 0;
|
|
197
|
+
} while (Ae.length);
|
|
198
|
+
for (; Kt.length; )
|
|
199
|
+
Kt.pop()();
|
|
200
|
+
kt = !1, St.clear(), Fe(i);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function kn(i) {
|
|
203
203
|
if (i.fragment !== null) {
|
|
204
204
|
i.update(), ye(i.before_update);
|
|
205
205
|
const e = i.dirty;
|
|
206
|
-
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(
|
|
206
|
+
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(Nt);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Nn(i) {
|
|
210
210
|
const e = [], t = [];
|
|
211
|
-
|
|
211
|
+
We.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), We = e;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const ot = /* @__PURE__ */ new Set();
|
|
214
214
|
let Pe;
|
|
215
|
-
function
|
|
215
|
+
function st() {
|
|
216
216
|
Pe = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
@@ -220,73 +220,73 @@ function ut() {
|
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function lt() {
|
|
224
224
|
Pe.r || ye(Pe.c), Pe = Pe.p;
|
|
225
225
|
}
|
|
226
226
|
function q(i, e) {
|
|
227
|
-
i && i.i && (
|
|
227
|
+
i && i.i && (ot.delete(i), i.i(e));
|
|
228
228
|
}
|
|
229
229
|
function V(i, e, t, n) {
|
|
230
230
|
if (i && i.o) {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
if (ot.has(i)) return;
|
|
232
|
+
ot.add(i), Pe.c.push(() => {
|
|
233
|
+
ot.delete(i), n && (t && i.d(1), n());
|
|
234
234
|
}), i.o(e);
|
|
235
235
|
} else n && n();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Jt(i) {
|
|
238
238
|
return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Pn(i, e) {
|
|
241
241
|
V(i, 1, 1, () => {
|
|
242
242
|
e.delete(i.key);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
let f = i.length, h = o.length,
|
|
247
|
-
const
|
|
248
|
-
for (;
|
|
249
|
-
const
|
|
250
|
-
for (
|
|
251
|
-
const
|
|
252
|
-
let k = u.get(
|
|
253
|
-
k ?
|
|
245
|
+
function Tn(i, e, t, n, r, o, u, s, c, l, d, a) {
|
|
246
|
+
let f = i.length, h = o.length, v = f;
|
|
247
|
+
const m = {};
|
|
248
|
+
for (; v--; ) m[i[v].key] = v;
|
|
249
|
+
const y = [], b = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), S = [];
|
|
250
|
+
for (v = h; v--; ) {
|
|
251
|
+
const x = a(r, o, v), _ = t(x);
|
|
252
|
+
let k = u.get(_);
|
|
253
|
+
k ? S.push(() => k.p(x, e)) : (k = l(_, x), k.c()), b.set(_, y[v] = k), _ in m && E.set(_, Math.abs(v - m[_]));
|
|
254
254
|
}
|
|
255
|
-
const
|
|
256
|
-
function x
|
|
257
|
-
q(
|
|
255
|
+
const w = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
256
|
+
function L(x) {
|
|
257
|
+
q(x, 1), x.m(s, d), u.set(x.key, x), d = x.first, h--;
|
|
258
258
|
}
|
|
259
259
|
for (; f && h; ) {
|
|
260
|
-
const
|
|
261
|
-
|
|
260
|
+
const x = y[h - 1], _ = i[f - 1], k = x.key, I = _.key;
|
|
261
|
+
x === _ ? (d = x.first, f--, h--) : b.has(I) ? !u.has(k) || w.has(k) ? L(x) : M.has(I) ? f-- : E.get(k) > E.get(I) ? (M.add(k), L(x)) : (w.add(I), f--) : (c(_, u), f--);
|
|
262
262
|
}
|
|
263
263
|
for (; f--; ) {
|
|
264
|
-
const
|
|
265
|
-
|
|
264
|
+
const x = i[f];
|
|
265
|
+
b.has(x.key) || c(x, u);
|
|
266
266
|
}
|
|
267
|
-
for (; h; )
|
|
268
|
-
return ye(
|
|
267
|
+
for (; h; ) L(y[h - 1]);
|
|
268
|
+
return ye(S), y;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Le(i) {
|
|
271
271
|
i && i.c();
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function ge(i, e, t) {
|
|
274
274
|
const { fragment: n, after_update: r } = i.$$;
|
|
275
|
-
n && n.m(e, t),
|
|
276
|
-
const o = i.$$.on_mount.map(
|
|
275
|
+
n && n.m(e, t), Nt(() => {
|
|
276
|
+
const o = i.$$.on_mount.map(ki).filter(Ni);
|
|
277
277
|
i.$$.on_destroy ? i.$$.on_destroy.push(...o) : ye(o), i.$$.on_mount = [];
|
|
278
|
-
}), r.forEach(
|
|
278
|
+
}), r.forEach(Nt);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function me(i, e) {
|
|
281
281
|
const t = i.$$;
|
|
282
|
-
t.fragment !== null && (
|
|
282
|
+
t.fragment !== null && (Nn(t.after_update), ye(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
i.$$.dirty[0] === -1 && (
|
|
284
|
+
function Rn(i, e) {
|
|
285
|
+
i.$$.dirty[0] === -1 && (Ae.push(i), Cn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
const c =
|
|
289
|
-
|
|
287
|
+
function Me(i, e, t, n, r, o, u = null, s = [-1]) {
|
|
288
|
+
const c = je;
|
|
289
|
+
Fe(i);
|
|
290
290
|
const l = i.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
@@ -294,7 +294,7 @@ function Ce(i, e, t, n, r, o, u = null, s = [-1]) {
|
|
|
294
294
|
props: o,
|
|
295
295
|
update: W,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: Ht(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
@@ -303,7 +303,7 @@ function Ce(i, e, t, n, r, o, u = null, s = [-1]) {
|
|
|
303
303
|
after_update: [],
|
|
304
304
|
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
305
305
|
// everything else
|
|
306
|
-
callbacks:
|
|
306
|
+
callbacks: Ht(),
|
|
307
307
|
dirty: s,
|
|
308
308
|
skip_bound: !1,
|
|
309
309
|
root: e.target || c.$$.root
|
|
@@ -311,19 +311,19 @@ function Ce(i, e, t, n, r, o, u = null, s = [-1]) {
|
|
|
311
311
|
u && u(l.root);
|
|
312
312
|
let d = !1;
|
|
313
313
|
if (l.ctx = t ? t(i, e.props || {}, (a, f, ...h) => {
|
|
314
|
-
const
|
|
315
|
-
return l.ctx && r(l.ctx[a], l.ctx[a] =
|
|
314
|
+
const v = h.length ? h[0] : f;
|
|
315
|
+
return l.ctx && r(l.ctx[a], l.ctx[a] = v) && (!l.skip_bound && l.bound[a] && l.bound[a](v), d && Rn(i, a)), f;
|
|
316
316
|
}) : [], l.update(), d = !0, ye(l.before_update), l.fragment = n ? n(l.ctx) : !1, e.target) {
|
|
317
317
|
if (e.hydrate) {
|
|
318
|
-
const a =
|
|
318
|
+
const a = En(e.target);
|
|
319
319
|
l.fragment && l.fragment.l(a), a.forEach(z);
|
|
320
320
|
} else
|
|
321
321
|
l.fragment && l.fragment.c();
|
|
322
|
-
e.intro && q(i.$$.fragment),
|
|
322
|
+
e.intro && q(i.$$.fragment), ge(i, e.target, e.anchor), Ri();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
Fe(c);
|
|
325
325
|
}
|
|
326
|
-
class
|
|
326
|
+
class Ce {
|
|
327
327
|
constructor() {
|
|
328
328
|
/**
|
|
329
329
|
* ### PRIVATE API
|
|
@@ -332,7 +332,7 @@ class ke {
|
|
|
332
332
|
*
|
|
333
333
|
* @type {any}
|
|
334
334
|
*/
|
|
335
|
-
|
|
335
|
+
Lt(this, "$$");
|
|
336
336
|
/**
|
|
337
337
|
* ### PRIVATE API
|
|
338
338
|
*
|
|
@@ -340,11 +340,11 @@ class ke {
|
|
|
340
340
|
*
|
|
341
341
|
* @type {any}
|
|
342
342
|
*/
|
|
343
|
-
|
|
343
|
+
Lt(this, "$$set");
|
|
344
344
|
}
|
|
345
345
|
/** @returns {void} */
|
|
346
346
|
$destroy() {
|
|
347
|
-
|
|
347
|
+
me(this, 1), this.$destroy = W;
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -353,7 +353,7 @@ class ke {
|
|
|
353
353
|
* @returns {() => void}
|
|
354
354
|
*/
|
|
355
355
|
$on(e, t) {
|
|
356
|
-
if (!
|
|
356
|
+
if (!Ni(t))
|
|
357
357
|
return W;
|
|
358
358
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
359
359
|
return n.push(t), () => {
|
|
@@ -366,19 +366,19 @@ class ke {
|
|
|
366
366
|
* @returns {void}
|
|
367
367
|
*/
|
|
368
368
|
$set(e) {
|
|
369
|
-
this.$$set && !
|
|
369
|
+
this.$$set && !mn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
const
|
|
373
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
374
|
-
function
|
|
372
|
+
const In = "4";
|
|
373
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(In);
|
|
374
|
+
function On(i) {
|
|
375
375
|
let e, t;
|
|
376
376
|
return {
|
|
377
377
|
c() {
|
|
378
|
-
e =
|
|
378
|
+
e = ae("svg"), t = ae("path"), p(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), p(e, "viewBox", "0 0 14 14"), p(e, "width", "13"), p(e, "height", "13"), p(e, "class", "svelte-en2qvf");
|
|
379
379
|
},
|
|
380
380
|
m(n, r) {
|
|
381
|
-
U(n, e, r),
|
|
381
|
+
U(n, e, r), T(e, t);
|
|
382
382
|
},
|
|
383
383
|
p: W,
|
|
384
384
|
i: W,
|
|
@@ -388,19 +388,19 @@ function zn(i) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class Ii extends Ce {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(),
|
|
393
|
+
super(), Me(this, e, null, On, xe, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function An(i) {
|
|
397
397
|
let e, t;
|
|
398
398
|
return {
|
|
399
399
|
c() {
|
|
400
|
-
e =
|
|
400
|
+
e = ae("svg"), t = ae("path"), p(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), p(e, "viewBox", "0 0 30 30"), p(e, "fill", "none"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "class", "svelte-d2loi5");
|
|
401
401
|
},
|
|
402
402
|
m(n, r) {
|
|
403
|
-
U(n, e, r),
|
|
403
|
+
U(n, e, r), T(e, t);
|
|
404
404
|
},
|
|
405
405
|
p: W,
|
|
406
406
|
i: W,
|
|
@@ -410,12 +410,12 @@ function Bn(i) {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class Oi extends Ce {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(),
|
|
415
|
+
super(), Me(this, e, null, An, xe, {});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Wn(i) {
|
|
419
419
|
let e, t;
|
|
420
420
|
return {
|
|
421
421
|
c() {
|
|
@@ -446,7 +446,7 @@ function Dn(i) {
|
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function zn(i) {
|
|
450
450
|
let e, t;
|
|
451
451
|
return {
|
|
452
452
|
c() {
|
|
@@ -477,7 +477,7 @@ function Un(i) {
|
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Bn(i) {
|
|
481
481
|
let e, t;
|
|
482
482
|
return {
|
|
483
483
|
c() {
|
|
@@ -508,7 +508,7 @@ function Fn(i) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Dn(i) {
|
|
512
512
|
let e, t;
|
|
513
513
|
return {
|
|
514
514
|
c() {
|
|
@@ -539,7 +539,7 @@ function Gn(i) {
|
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Un(i) {
|
|
543
543
|
let e, t;
|
|
544
544
|
return {
|
|
545
545
|
c() {
|
|
@@ -570,7 +570,7 @@ function jn(i) {
|
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Fn(i) {
|
|
574
574
|
let e, t;
|
|
575
575
|
return {
|
|
576
576
|
c() {
|
|
@@ -601,7 +601,7 @@ function qn(i) {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Gn(i) {
|
|
605
605
|
let e, t;
|
|
606
606
|
return {
|
|
607
607
|
c() {
|
|
@@ -632,7 +632,7 @@ function Zn(i) {
|
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function jn(i) {
|
|
636
636
|
let e, t, n, r;
|
|
637
637
|
return {
|
|
638
638
|
c() {
|
|
@@ -668,21 +668,21 @@ function Qn(i) {
|
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function $t(i) {
|
|
672
672
|
let e, t;
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
675
|
-
e = A("span"), t =
|
|
675
|
+
e = A("span"), t = Ee(
|
|
676
676
|
/*placeType*/
|
|
677
677
|
i[6]
|
|
678
678
|
), p(e, "class", "secondary svelte-ltkwvy");
|
|
679
679
|
},
|
|
680
680
|
m(n, r) {
|
|
681
|
-
U(n, e, r),
|
|
681
|
+
U(n, e, r), T(e, t);
|
|
682
682
|
},
|
|
683
683
|
p(n, r) {
|
|
684
684
|
r & /*placeType*/
|
|
685
|
-
64 &&
|
|
685
|
+
64 && Ge(
|
|
686
686
|
t,
|
|
687
687
|
/*placeType*/
|
|
688
688
|
n[6]
|
|
@@ -693,7 +693,7 @@ function ti(i) {
|
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function qn(i) {
|
|
697
697
|
let e, t, n, r, o, u, s, c, l, d = (
|
|
698
698
|
/*isReverse*/
|
|
699
699
|
(i[7] ? (
|
|
@@ -714,48 +714,48 @@ function Hn(i) {
|
|
|
714
714
|
i[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
715
715
|
i[5]) && !/*isReverse*/
|
|
716
716
|
i[7]
|
|
717
|
-
),
|
|
717
|
+
), v, m, y = (
|
|
718
718
|
/*isReverse*/
|
|
719
719
|
(i[7] ? "" : (
|
|
720
720
|
/*feature*/
|
|
721
721
|
i[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
722
722
|
)) + ""
|
|
723
|
-
),
|
|
724
|
-
function _
|
|
723
|
+
), b, E, S;
|
|
724
|
+
function w(_, k) {
|
|
725
725
|
return k & /*feature*/
|
|
726
726
|
1 && (t = null), k & /*feature*/
|
|
727
727
|
1 && (n = null), k & /*feature*/
|
|
728
728
|
1 && (r = null), k & /*feature*/
|
|
729
729
|
1 && (o = null), /*imageUrl*/
|
|
730
|
-
|
|
730
|
+
_[5] ? jn : (
|
|
731
731
|
/*feature*/
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
732
|
+
_[0].address ? Gn : (t == null && (t = !!/*feature*/
|
|
733
|
+
_[0].id.startsWith("road.")), t ? Fn : (n == null && (n = !!/*feature*/
|
|
734
|
+
_[0].id.startsWith("address.")), n ? Un : (r == null && (r = !!/*feature*/
|
|
735
|
+
_[0].id.startsWith("postal_code.")), r ? Dn : (o == null && (o = !!/*feature*/
|
|
736
|
+
_[0].id.startsWith("poi.")), o ? Bn : (
|
|
737
737
|
/*isReverse*/
|
|
738
|
-
|
|
738
|
+
_[7] ? zn : Wn
|
|
739
739
|
)))))
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
let
|
|
742
|
+
let M = w(i, -1), L = M(i), x = h && $t(i);
|
|
743
743
|
return {
|
|
744
744
|
c() {
|
|
745
|
-
e = A("li"),
|
|
745
|
+
e = A("li"), L.c(), u = ie(), s = A("span"), c = A("span"), l = A("span"), a = Ee(d), f = ie(), x && x.c(), v = ie(), m = A("span"), b = Ee(y), p(l, "class", "primary svelte-ltkwvy"), p(c, "class", "svelte-ltkwvy"), p(m, "class", "line2 svelte-ltkwvy"), p(s, "class", "texts svelte-ltkwvy"), p(e, "tabindex", "0"), p(
|
|
746
746
|
e,
|
|
747
747
|
"data-selected",
|
|
748
748
|
/*selected*/
|
|
749
749
|
i[1]
|
|
750
|
-
), p(e, "class", "svelte-ltkwvy"),
|
|
750
|
+
), p(e, "class", "svelte-ltkwvy"), oe(
|
|
751
751
|
e,
|
|
752
752
|
"selected",
|
|
753
753
|
/*selected*/
|
|
754
754
|
i[1]
|
|
755
755
|
);
|
|
756
756
|
},
|
|
757
|
-
m(
|
|
758
|
-
U(
|
|
757
|
+
m(_, k) {
|
|
758
|
+
U(_, e, k), L.m(e, null), T(e, u), T(e, s), T(s, c), T(c, l), T(l, a), T(c, f), x && x.m(c, null), T(s, v), T(s, m), T(m, b), E || (S = [
|
|
759
759
|
J(
|
|
760
760
|
e,
|
|
761
761
|
"mouseenter",
|
|
@@ -770,77 +770,77 @@ function Hn(i) {
|
|
|
770
770
|
)
|
|
771
771
|
], E = !0);
|
|
772
772
|
},
|
|
773
|
-
p(
|
|
774
|
-
|
|
773
|
+
p(_, [k]) {
|
|
774
|
+
M === (M = w(_, k)) && L ? L.p(_, k) : (L.d(1), L = M(_), L && (L.c(), L.m(e, u))), k & /*feature*/
|
|
775
775
|
1 && d !== (d = /*isReverse*/
|
|
776
|
-
(
|
|
776
|
+
(_[7] ? (
|
|
777
777
|
/*feature*/
|
|
778
|
-
|
|
778
|
+
_[0].place_name
|
|
779
779
|
) : (
|
|
780
780
|
/*feature*/
|
|
781
|
-
|
|
782
|
-
)) + "") &&
|
|
781
|
+
_[0].place_name.replace(/,.*/, "")
|
|
782
|
+
)) + "") && Ge(a, d), k & /*showPlaceType, feature, imageUrl*/
|
|
783
783
|
37 && (h = /*showPlaceType*/
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
1 &&
|
|
794
|
-
(
|
|
784
|
+
_[2] === "always" || /*showPlaceType*/
|
|
785
|
+
_[2] !== "never" && !/*feature*/
|
|
786
|
+
_[0].address && !/*feature*/
|
|
787
|
+
_[0].id.startsWith("road.") && !/*feature*/
|
|
788
|
+
_[0].id.startsWith("address.") && !/*feature*/
|
|
789
|
+
_[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
790
|
+
_[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
791
|
+
_[5]) && !/*isReverse*/
|
|
792
|
+
_[7]), h ? x ? x.p(_, k) : (x = $t(_), x.c(), x.m(c, null)) : x && (x.d(1), x = null), k & /*feature*/
|
|
793
|
+
1 && y !== (y = /*isReverse*/
|
|
794
|
+
(_[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
|
-
|
|
797
|
-
)) + "") &&
|
|
796
|
+
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
+
)) + "") && Ge(b, y), k & /*selected*/
|
|
798
798
|
2 && p(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
801
801
|
/*selected*/
|
|
802
|
-
|
|
802
|
+
_[1]
|
|
803
803
|
), k & /*selected*/
|
|
804
|
-
2 &&
|
|
804
|
+
2 && oe(
|
|
805
805
|
e,
|
|
806
806
|
"selected",
|
|
807
807
|
/*selected*/
|
|
808
|
-
|
|
808
|
+
_[1]
|
|
809
809
|
);
|
|
810
810
|
},
|
|
811
811
|
i: W,
|
|
812
812
|
o: W,
|
|
813
|
-
d(
|
|
814
|
-
|
|
813
|
+
d(_) {
|
|
814
|
+
_ && z(e), L.d(), x && x.d(), E = !1, ye(S);
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
var
|
|
818
|
+
function Zn(i, e, t) {
|
|
819
|
+
var S;
|
|
820
820
|
let n, r, { feature: o } = e, { selected: u = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: l } = e;
|
|
821
|
-
const d = (
|
|
822
|
-
let a, f, h = 0,
|
|
823
|
-
function
|
|
821
|
+
const d = (S = o.properties) == null ? void 0 : S.categories;
|
|
822
|
+
let a, f, h = 0, v = o.place_type[0] === "reverse";
|
|
823
|
+
function m() {
|
|
824
824
|
f && c.add(f), t(10, h++, h);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
826
|
+
function y(w) {
|
|
827
|
+
Xt.call(this, i, w);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
829
|
+
function b(w) {
|
|
830
|
+
Xt.call(this, i, w);
|
|
831
831
|
}
|
|
832
|
-
const E = () =>
|
|
833
|
-
return i.$$set = (
|
|
834
|
-
"feature" in
|
|
832
|
+
const E = () => m();
|
|
833
|
+
return i.$$set = (w) => {
|
|
834
|
+
"feature" in w && t(0, o = w.feature), "selected" in w && t(1, u = w.selected), "showPlaceType" in w && t(2, s = w.showPlaceType), "missingIconsCache" in w && t(9, c = w.missingIconsCache), "iconsBaseUrl" in w && t(3, l = w.iconsBaseUrl);
|
|
835
835
|
}, i.$$.update = () => {
|
|
836
|
-
var
|
|
836
|
+
var w, M, L, x;
|
|
837
837
|
if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
838
838
|
3640)
|
|
839
839
|
do
|
|
840
840
|
t(11, n--, n), t(4, a = d == null ? void 0 : d[n]), t(5, f = a ? l + a.replace(/ /g, "_") + ".svg" : void 0);
|
|
841
841
|
while (n > -1 && (!f || c.has(f)));
|
|
842
842
|
i.$$.dirty & /*feature*/
|
|
843
|
-
1 && t(6, r = ((
|
|
843
|
+
1 && t(6, r = ((M = (w = o.properties) == null ? void 0 : w.categories) == null ? void 0 : M.join(", ")) ?? ((x = (L = o.properties) == null ? void 0 : L.place_type_name) == null ? void 0 : x[0]) ?? o.place_type[0]);
|
|
844
844
|
}, t(11, n = (d == null ? void 0 : d.length) ?? 0), [
|
|
845
845
|
o,
|
|
846
846
|
u,
|
|
@@ -849,19 +849,19 @@ function Vn(i, e, t) {
|
|
|
849
849
|
a,
|
|
850
850
|
f,
|
|
851
851
|
r,
|
|
852
|
-
|
|
853
|
-
|
|
852
|
+
v,
|
|
853
|
+
m,
|
|
854
854
|
c,
|
|
855
855
|
h,
|
|
856
856
|
n,
|
|
857
|
+
y,
|
|
857
858
|
b,
|
|
858
|
-
v,
|
|
859
859
|
E
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
|
-
class
|
|
862
|
+
class Qn extends Ce {
|
|
863
863
|
constructor(e) {
|
|
864
|
-
super(),
|
|
864
|
+
super(), Me(this, e, Zn, qn, xe, {
|
|
865
865
|
feature: 0,
|
|
866
866
|
selected: 1,
|
|
867
867
|
showPlaceType: 2,
|
|
@@ -870,7 +870,7 @@ class Yn extends ke {
|
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Hn(i) {
|
|
874
874
|
let e;
|
|
875
875
|
return {
|
|
876
876
|
c() {
|
|
@@ -887,22 +887,22 @@ function Xn(i) {
|
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
class
|
|
890
|
+
class Vn extends Ce {
|
|
891
891
|
constructor(e) {
|
|
892
|
-
super(),
|
|
892
|
+
super(), Me(this, e, null, Hn, xe, {});
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Yn(i) {
|
|
896
896
|
let e, t, n;
|
|
897
897
|
return {
|
|
898
898
|
c() {
|
|
899
|
-
e =
|
|
900
|
-
i[0] === "list" ? 20 : void 0), p(e, "viewBox", "0 0 70 85"), p(e, "fill", "none"), p(e, "class", "svelte-gzo3ar"),
|
|
899
|
+
e = ae("svg"), t = ae("path"), p(t, "stroke-width", "4"), p(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), p(t, "class", "svelte-gzo3ar"), p(e, "width", n = /*displayIn*/
|
|
900
|
+
i[0] === "list" ? 20 : void 0), p(e, "viewBox", "0 0 70 85"), p(e, "fill", "none"), p(e, "class", "svelte-gzo3ar"), oe(
|
|
901
901
|
e,
|
|
902
902
|
"in-map",
|
|
903
903
|
/*displayIn*/
|
|
904
904
|
i[0] !== "list"
|
|
905
|
-
),
|
|
905
|
+
), oe(
|
|
906
906
|
e,
|
|
907
907
|
"list-icon",
|
|
908
908
|
/*displayIn*/
|
|
@@ -910,19 +910,19 @@ function Jn(i) {
|
|
|
910
910
|
);
|
|
911
911
|
},
|
|
912
912
|
m(r, o) {
|
|
913
|
-
U(r, e, o),
|
|
913
|
+
U(r, e, o), T(e, t);
|
|
914
914
|
},
|
|
915
915
|
p(r, [o]) {
|
|
916
916
|
o & /*displayIn*/
|
|
917
917
|
1 && n !== (n = /*displayIn*/
|
|
918
918
|
r[0] === "list" ? 20 : void 0) && p(e, "width", n), o & /*displayIn*/
|
|
919
|
-
1 &&
|
|
919
|
+
1 && oe(
|
|
920
920
|
e,
|
|
921
921
|
"in-map",
|
|
922
922
|
/*displayIn*/
|
|
923
923
|
r[0] !== "list"
|
|
924
924
|
), o & /*displayIn*/
|
|
925
|
-
1 &&
|
|
925
|
+
1 && oe(
|
|
926
926
|
e,
|
|
927
927
|
"list-icon",
|
|
928
928
|
/*displayIn*/
|
|
@@ -936,25 +936,25 @@ function Jn(i) {
|
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Xn(i, e, t) {
|
|
940
940
|
let { displayIn: n } = e;
|
|
941
941
|
return i.$$set = (r) => {
|
|
942
942
|
"displayIn" in r && t(0, n = r.displayIn);
|
|
943
943
|
}, [n];
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class Kn extends Ce {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(),
|
|
947
|
+
super(), Me(this, e, Xn, Yn, xe, { displayIn: 0 });
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Jn(i) {
|
|
951
951
|
let e, t;
|
|
952
952
|
return {
|
|
953
953
|
c() {
|
|
954
|
-
e =
|
|
954
|
+
e = ae("svg"), t = ae("path"), p(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), p(e, "viewBox", "0 0 60.006 21.412"), p(e, "width", "14"), p(e, "height", "20"), p(e, "class", "svelte-en2qvf");
|
|
955
955
|
},
|
|
956
956
|
m(n, r) {
|
|
957
|
-
U(n, e, r),
|
|
957
|
+
U(n, e, r), T(e, t);
|
|
958
958
|
},
|
|
959
959
|
p: W,
|
|
960
960
|
i: W,
|
|
@@ -964,19 +964,19 @@ function tr(i) {
|
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
|
-
class
|
|
967
|
+
class $n extends Ce {
|
|
968
968
|
constructor(e) {
|
|
969
|
-
super(),
|
|
969
|
+
super(), Me(this, e, null, Jn, xe, {});
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function er(i) {
|
|
973
973
|
let e, t, n;
|
|
974
974
|
return {
|
|
975
975
|
c() {
|
|
976
|
-
e =
|
|
976
|
+
e = ae("svg"), t = ae("circle"), n = ae("path"), p(t, "cx", "4.789"), p(t, "cy", "4.787"), p(t, "r", "3.85"), p(t, "class", "svelte-1aq105l"), p(n, "d", "M12.063 12.063 7.635 7.635"), p(n, "class", "svelte-1aq105l"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "width", "13"), p(e, "height", "13"), p(e, "viewBox", "0 0 13 13"), p(e, "class", "svelte-1aq105l");
|
|
977
977
|
},
|
|
978
978
|
m(r, o) {
|
|
979
|
-
U(r, e, o),
|
|
979
|
+
U(r, e, o), T(e, t), T(e, n);
|
|
980
980
|
},
|
|
981
981
|
p: W,
|
|
982
982
|
i: W,
|
|
@@ -986,31 +986,31 @@ function nr(i) {
|
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
class
|
|
989
|
+
class tr extends Ce {
|
|
990
990
|
constructor(e) {
|
|
991
|
-
super(),
|
|
991
|
+
super(), Me(this, e, null, er, xe, {});
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function ir(i, e, t) {
|
|
995
995
|
const n = e[1], r = e[0], o = n - r;
|
|
996
996
|
return i === n && t ? i : ((i - r) % o + o) % o + r;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function qe(i) {
|
|
999
999
|
const e = [...i];
|
|
1000
1000
|
return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
|
|
1001
1001
|
}
|
|
1002
|
-
let
|
|
1003
|
-
async function
|
|
1002
|
+
let Be;
|
|
1003
|
+
async function nr(i, e, t) {
|
|
1004
1004
|
const n = i == null ? void 0 : i.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
1006
1006
|
if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
|
|
1007
1007
|
if (r.type === "fixed")
|
|
1008
1008
|
return r.coordinates.join(",");
|
|
1009
1009
|
e: if (r.type === "client-geolocation") {
|
|
1010
|
-
if (
|
|
1011
|
-
if (!
|
|
1010
|
+
if (Be && r.cachedLocationExpiry && Be.time + r.cachedLocationExpiry > Date.now()) {
|
|
1011
|
+
if (!Be.coords)
|
|
1012
1012
|
break e;
|
|
1013
|
-
return
|
|
1013
|
+
return Be.coords;
|
|
1014
1014
|
}
|
|
1015
1015
|
let o;
|
|
1016
1016
|
try {
|
|
@@ -1031,7 +1031,7 @@ async function sr(i, e, t) {
|
|
|
1031
1031
|
}), o;
|
|
1032
1032
|
} catch {
|
|
1033
1033
|
} finally {
|
|
1034
|
-
r.cachedLocationExpiry && (
|
|
1034
|
+
r.cachedLocationExpiry && (Be = {
|
|
1035
1035
|
time: Date.now(),
|
|
1036
1036
|
coords: o
|
|
1037
1037
|
});
|
|
@@ -1045,8 +1045,8 @@ async function sr(i, e, t) {
|
|
|
1045
1045
|
return n[1].toFixed(6) + "," + n[2].toFixed(6);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1048
|
+
const rr = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, ei = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, ti = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, ii = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, ni = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, ri = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
|
|
1049
|
+
function or(i) {
|
|
1050
1050
|
if (!["DMS", "DM", "DD"].includes(i))
|
|
1051
1051
|
throw new Error("invalid format specified");
|
|
1052
1052
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
@@ -1055,35 +1055,35 @@ function ur(i) {
|
|
|
1055
1055
|
i == "DD" && (c = `${r}° ${u}, ${o}° ${s}`);
|
|
1056
1056
|
const l = Math.floor(r), d = Math.floor(o), a = (r - l) * 60, f = (o - d) * 60;
|
|
1057
1057
|
if (i == "DM") {
|
|
1058
|
-
let h =
|
|
1059
|
-
h.endsWith(".000") &&
|
|
1058
|
+
let h = oi(a, 3).toFixed(3).padStart(6, "0"), v = oi(f, 3).toFixed(3).padStart(6, "0");
|
|
1059
|
+
h.endsWith(".000") && v.endsWith(".000") && (h = h.replace(/\.000$/, ""), v = v.replace(/\.000$/, "")), c = `${l}° ${h}' ${u}, ${d}° ${v}' ${s}`;
|
|
1060
1060
|
}
|
|
1061
1061
|
if (i == "DMS") {
|
|
1062
|
-
const h = Math.floor(a),
|
|
1063
|
-
let
|
|
1064
|
-
const
|
|
1065
|
-
|
|
1062
|
+
const h = Math.floor(a), v = Math.floor(f);
|
|
1063
|
+
let m = ((a - h) * 60).toFixed(1).padStart(4, "0"), y = ((f - v) * 60).toFixed(1).padStart(4, "0");
|
|
1064
|
+
const b = h.toString().padStart(2, "0"), E = v.toString().padStart(2, "0");
|
|
1065
|
+
m.endsWith(".0") && y.endsWith(".0") && (m = m.replace(/\.0$/, ""), y = y.replace(/\.0$/, "")), c = `${l}° ${b}' ${m}" ${u}, ${d}° ${E}' ${y}" ${s}`;
|
|
1066
1066
|
}
|
|
1067
1067
|
return c;
|
|
1068
1068
|
} else
|
|
1069
1069
|
throw new Error("no decimal coordinates to convert");
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function oi(i, e) {
|
|
1072
1072
|
const t = Math.pow(10, e);
|
|
1073
1073
|
return Math.round((i + Number.EPSILON) * t) / t;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Wt(i, e) {
|
|
1076
1076
|
e || (e = 5), i = i.replace(/\s+/g, " ").trim();
|
|
1077
1077
|
let t = null, n = null, r = "", o = "", u = null, s = [], c = !1;
|
|
1078
|
-
if (
|
|
1078
|
+
if (rr.test(i))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
|
-
if (
|
|
1081
|
-
if (s =
|
|
1080
|
+
if (ei.test(i))
|
|
1081
|
+
if (s = ei.exec(i), c = De(s), c)
|
|
1082
1082
|
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), n = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (n *= -1), u = "DM";
|
|
1083
1083
|
else
|
|
1084
1084
|
throw new Error("invalid coordinate format");
|
|
1085
|
-
else if (
|
|
1086
|
-
if (s =
|
|
1085
|
+
else if (ti.test(i))
|
|
1086
|
+
if (s = ti.exec(i), c = De(s), c) {
|
|
1087
1087
|
if (t = s[2], n = s[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
|
|
1088
1088
|
throw new Error("integer only coordinate provided");
|
|
1089
1089
|
if (Number(Math.round(n)) == Number(n))
|
|
@@ -1091,18 +1091,18 @@ function Bt(i, e) {
|
|
|
1091
1091
|
s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
|
|
1092
1092
|
} else
|
|
1093
1093
|
throw new Error("invalid decimal coordinate format");
|
|
1094
|
-
else if (
|
|
1095
|
-
if (s =
|
|
1094
|
+
else if (ii.test(i))
|
|
1095
|
+
if (s = ii.exec(i), c = De(s), c)
|
|
1096
1096
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[9])), s[11] && (n += s[11] / 60), s[13] && (n += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
|
|
1097
1097
|
else
|
|
1098
1098
|
throw new Error("invalid DMS coordinates format");
|
|
1099
|
-
else if (
|
|
1100
|
-
if (s =
|
|
1099
|
+
else if (ni.test(i))
|
|
1100
|
+
if (s = ni.exec(i), c = De(s), c)
|
|
1101
1101
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6] / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12] / 60), s[14] && (n += s[14] / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1102
1102
|
else
|
|
1103
1103
|
throw new Error("invalid DMS coordinates format");
|
|
1104
|
-
else if (
|
|
1105
|
-
if (s =
|
|
1104
|
+
else if (ri.test(i)) {
|
|
1105
|
+
if (s = ri.exec(i), c = De(s), s.filter((l) => l).length <= 5)
|
|
1106
1106
|
throw new Error("invalid coordinates format");
|
|
1107
1107
|
if (c)
|
|
1108
1108
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12].replace(",", ".") / 60), s[14] && (n += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
@@ -1123,28 +1123,28 @@ function Bt(i, e) {
|
|
|
1123
1123
|
l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(o) && n > 0 && (n = -1 * n);
|
|
1124
1124
|
const d = s[0].trim();
|
|
1125
1125
|
let a, f;
|
|
1126
|
-
const h = /[,/;\u0020]/g,
|
|
1127
|
-
if (
|
|
1128
|
-
const
|
|
1129
|
-
a = d.substring(0,
|
|
1126
|
+
const h = /[,/;\u0020]/g, v = d.match(h);
|
|
1127
|
+
if (v == null) {
|
|
1128
|
+
const b = Math.floor(i.length / 2);
|
|
1129
|
+
a = d.substring(0, b).trim(), f = d.substring(b).trim();
|
|
1130
1130
|
} else {
|
|
1131
|
-
let
|
|
1132
|
-
|
|
1131
|
+
let b;
|
|
1132
|
+
v.length % 2 == 1 ? b = Math.floor(v.length / 2) : b = v.length / 2 - 1;
|
|
1133
1133
|
let E = 0;
|
|
1134
|
-
if (
|
|
1135
|
-
E = d.indexOf(
|
|
1134
|
+
if (b == 0)
|
|
1135
|
+
E = d.indexOf(v[0]), a = d.substring(0, E).trim(), f = d.substring(E + 1).trim();
|
|
1136
1136
|
else {
|
|
1137
|
-
let
|
|
1138
|
-
for (;
|
|
1139
|
-
E = d.indexOf(
|
|
1137
|
+
let S = 0, w = 0;
|
|
1138
|
+
for (; S <= b; )
|
|
1139
|
+
E = d.indexOf(v[S], w), w = E + 1, S++;
|
|
1140
1140
|
a = d.substring(0, E).trim(), f = d.substring(E + 1).trim();
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1143
|
+
const m = a.split(".");
|
|
1144
|
+
if (m.length == 2 && m[1] == 0 && m[1].length != 2)
|
|
1145
1145
|
throw new Error("invalid coordinates format");
|
|
1146
|
-
const
|
|
1147
|
-
if (
|
|
1146
|
+
const y = f.split(".");
|
|
1147
|
+
if (y.length == 2 && y[1] == 0 && y[1].length != 2)
|
|
1148
1148
|
throw new Error("invalid coordinates format");
|
|
1149
1149
|
if (/^\d+$/.test(a) || /^\d+$/.test(f))
|
|
1150
1150
|
throw new Error("degree only coordinate/s provided");
|
|
@@ -1156,13 +1156,13 @@ function Bt(i, e) {
|
|
|
1156
1156
|
decimalLongitude: n,
|
|
1157
1157
|
decimalCoordinates: `${t},${n}`,
|
|
1158
1158
|
originalFormat: u,
|
|
1159
|
-
closeEnough:
|
|
1160
|
-
toCoordinateFormat:
|
|
1159
|
+
closeEnough: sr,
|
|
1160
|
+
toCoordinateFormat: or
|
|
1161
1161
|
});
|
|
1162
1162
|
} else
|
|
1163
1163
|
throw new Error("coordinates pattern match failed");
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function De(i) {
|
|
1166
1166
|
if (!isNaN(i[0]))
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
const e = [...i];
|
|
@@ -1181,28 +1181,28 @@ function Ge(i) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
return !0;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function si(i, e) {
|
|
1185
1185
|
const t = Math.abs(i - e);
|
|
1186
1186
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function sr(i) {
|
|
1189
1189
|
if (!i)
|
|
1190
1190
|
throw new Error("coords must be provided");
|
|
1191
1191
|
if (i.includes(",")) {
|
|
1192
1192
|
const e = i.split(",");
|
|
1193
1193
|
if (Number(e[0]) == NaN || Number(e[1]) == NaN)
|
|
1194
1194
|
throw new Error("coords are not valid decimals");
|
|
1195
|
-
return
|
|
1195
|
+
return si(this.decimalLatitude, Number(e[0])) && si(this.decimalLongitude, e[1]);
|
|
1196
1196
|
} else
|
|
1197
1197
|
throw new Error("coords being tested must be separated by a comma");
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1199
|
+
const lr = Object.freeze({
|
|
1200
1200
|
DMS: "DMS",
|
|
1201
1201
|
DM: "DM",
|
|
1202
1202
|
DD: "DD"
|
|
1203
1203
|
});
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1204
|
+
Wt.to = lr;
|
|
1205
|
+
const ur = [
|
|
1206
1206
|
{
|
|
1207
1207
|
verbatimCoordinates: "40.123, -74.123",
|
|
1208
1208
|
verbatimLatitude: "40.123",
|
|
@@ -1343,10 +1343,10 @@ const fr = [
|
|
|
1343
1343
|
verbatimLatitude: "40 7 22.8",
|
|
1344
1344
|
verbatimLongitude: "-74 7 22.8"
|
|
1345
1345
|
}
|
|
1346
|
-
],
|
|
1346
|
+
], ar = {
|
|
1347
1347
|
decimalLatitude: 40.123,
|
|
1348
1348
|
decimalLongitude: -74.123
|
|
1349
|
-
},
|
|
1349
|
+
}, cr = [
|
|
1350
1350
|
{
|
|
1351
1351
|
verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
|
|
1352
1352
|
verbatimLatitude: `50°4'17.698"south`,
|
|
@@ -1431,7 +1431,7 @@ const fr = [
|
|
|
1431
1431
|
decimalLatitude: -18.4,
|
|
1432
1432
|
decimalLongitude: 22.75
|
|
1433
1433
|
}
|
|
1434
|
-
],
|
|
1434
|
+
], fr = [
|
|
1435
1435
|
{
|
|
1436
1436
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1437
1437
|
verbatimLatitude: "10.432342S",
|
|
@@ -1566,27 +1566,27 @@ const fr = [
|
|
|
1566
1566
|
decimalLongitude: 18.33453
|
|
1567
1567
|
}
|
|
1568
1568
|
];
|
|
1569
|
-
function
|
|
1569
|
+
function dr() {
|
|
1570
1570
|
const i = [];
|
|
1571
|
-
return
|
|
1572
|
-
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...
|
|
1573
|
-
}), [...i, ...
|
|
1574
|
-
}
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
function
|
|
1571
|
+
return ur.forEach((e) => {
|
|
1572
|
+
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...ar });
|
|
1573
|
+
}), [...i, ...cr, ...fr];
|
|
1574
|
+
}
|
|
1575
|
+
const hr = dr();
|
|
1576
|
+
Wt.formats = hr.map((i) => i.verbatimCoordinates);
|
|
1577
|
+
const gr = Wt;
|
|
1578
|
+
function li(i, e, t) {
|
|
1579
1579
|
const n = i.slice();
|
|
1580
|
-
return n[
|
|
1580
|
+
return n[83] = e[t], n[85] = t, n;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function ui(i) {
|
|
1583
1583
|
let e, t;
|
|
1584
|
-
return e = new
|
|
1584
|
+
return e = new Vn({}), {
|
|
1585
1585
|
c() {
|
|
1586
|
-
|
|
1586
|
+
Le(e.$$.fragment);
|
|
1587
1587
|
},
|
|
1588
1588
|
m(n, r) {
|
|
1589
|
-
|
|
1589
|
+
ge(e, n, r), t = !0;
|
|
1590
1590
|
},
|
|
1591
1591
|
i(n) {
|
|
1592
1592
|
t || (q(e.$$.fragment, n), t = !0);
|
|
@@ -1595,20 +1595,20 @@ function ci(i) {
|
|
|
1595
1595
|
V(e.$$.fragment, n), t = !1;
|
|
1596
1596
|
},
|
|
1597
1597
|
d(n) {
|
|
1598
|
-
|
|
1598
|
+
me(e, n);
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function ai(i) {
|
|
1603
1603
|
let e, t, n, r, o;
|
|
1604
|
-
return t = new
|
|
1604
|
+
return t = new $n({}), {
|
|
1605
1605
|
c() {
|
|
1606
|
-
e = A("button"),
|
|
1606
|
+
e = A("button"), Le(t.$$.fragment), p(e, "type", "button"), p(
|
|
1607
1607
|
e,
|
|
1608
1608
|
"title",
|
|
1609
1609
|
/*reverseButtonTitle*/
|
|
1610
1610
|
i[9]
|
|
1611
|
-
), p(e, "class", "svelte-bz0zu3"),
|
|
1611
|
+
), p(e, "class", "svelte-bz0zu3"), oe(
|
|
1612
1612
|
e,
|
|
1613
1613
|
"active",
|
|
1614
1614
|
/*reverseActive*/
|
|
@@ -1616,11 +1616,11 @@ function fi(i) {
|
|
|
1616
1616
|
);
|
|
1617
1617
|
},
|
|
1618
1618
|
m(u, s) {
|
|
1619
|
-
U(u, e, s),
|
|
1619
|
+
U(u, e, s), ge(t, e, null), n = !0, r || (o = J(
|
|
1620
1620
|
e,
|
|
1621
1621
|
"click",
|
|
1622
1622
|
/*click_handler_2*/
|
|
1623
|
-
i[
|
|
1623
|
+
i[68]
|
|
1624
1624
|
), r = !0);
|
|
1625
1625
|
},
|
|
1626
1626
|
p(u, s) {
|
|
@@ -1631,7 +1631,7 @@ function fi(i) {
|
|
|
1631
1631
|
/*reverseButtonTitle*/
|
|
1632
1632
|
u[9]
|
|
1633
1633
|
), (!n || s[0] & /*reverseActive*/
|
|
1634
|
-
1) &&
|
|
1634
|
+
1) && oe(
|
|
1635
1635
|
e,
|
|
1636
1636
|
"active",
|
|
1637
1637
|
/*reverseActive*/
|
|
@@ -1645,24 +1645,24 @@ function fi(i) {
|
|
|
1645
1645
|
V(t.$$.fragment, u), n = !1;
|
|
1646
1646
|
},
|
|
1647
1647
|
d(u) {
|
|
1648
|
-
u && z(e),
|
|
1648
|
+
u && z(e), me(t), r = !1, o();
|
|
1649
1649
|
}
|
|
1650
1650
|
};
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1653
|
-
let e, t = [], n = /* @__PURE__ */ new Map(), r, o, u, s =
|
|
1652
|
+
function mr(i) {
|
|
1653
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), r, o, u, s = Jt(
|
|
1654
1654
|
/*listFeatures*/
|
|
1655
1655
|
i[14]
|
|
1656
1656
|
);
|
|
1657
1657
|
const c = (l) => (
|
|
1658
1658
|
/*feature*/
|
|
1659
|
-
l[
|
|
1660
|
-
(l[
|
|
1661
|
-
l[
|
|
1659
|
+
l[83].id + /*feature*/
|
|
1660
|
+
(l[83].address ? "," + /*feature*/
|
|
1661
|
+
l[83].address : "")
|
|
1662
1662
|
);
|
|
1663
1663
|
for (let l = 0; l < s.length; l += 1) {
|
|
1664
|
-
let d =
|
|
1665
|
-
n.set(a, t[l] =
|
|
1664
|
+
let d = li(i, s, l), a = c(d);
|
|
1665
|
+
n.set(a, t[l] = ci(a, d));
|
|
1666
1666
|
}
|
|
1667
1667
|
return {
|
|
1668
1668
|
c() {
|
|
@@ -1680,22 +1680,22 @@ function vr(i) {
|
|
|
1680
1680
|
e,
|
|
1681
1681
|
"mouseleave",
|
|
1682
1682
|
/*mouseleave_handler*/
|
|
1683
|
-
i[
|
|
1683
|
+
i[72]
|
|
1684
1684
|
),
|
|
1685
1685
|
J(
|
|
1686
1686
|
e,
|
|
1687
1687
|
"blur",
|
|
1688
1688
|
/*blur_handler_1*/
|
|
1689
|
-
i[
|
|
1689
|
+
i[73]
|
|
1690
1690
|
)
|
|
1691
1691
|
], o = !0);
|
|
1692
1692
|
},
|
|
1693
1693
|
p(l, d) {
|
|
1694
1694
|
d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
|
|
1695
|
-
17880064 && (s =
|
|
1695
|
+
17880064 && (s = Jt(
|
|
1696
1696
|
/*listFeatures*/
|
|
1697
1697
|
l[14]
|
|
1698
|
-
),
|
|
1698
|
+
), st(), t = Tn(t, d, c, 1, l, s, n, e, Pn, ci, null, li), lt());
|
|
1699
1699
|
},
|
|
1700
1700
|
i(l) {
|
|
1701
1701
|
if (!r) {
|
|
@@ -1717,21 +1717,21 @@ function vr(i) {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function yr(i) {
|
|
1721
1721
|
let e, t, n, r, o, u;
|
|
1722
|
-
return t = new
|
|
1722
|
+
return t = new Oi({}), {
|
|
1723
1723
|
c() {
|
|
1724
|
-
e = A("div"),
|
|
1724
|
+
e = A("div"), Le(t.$$.fragment), n = ie(), r = A("div"), o = Ee(
|
|
1725
1725
|
/*noResultsMessage*/
|
|
1726
1726
|
i[7]
|
|
1727
1727
|
), p(r, "class", "svelte-bz0zu3"), p(e, "class", "no-results svelte-bz0zu3");
|
|
1728
1728
|
},
|
|
1729
1729
|
m(s, c) {
|
|
1730
|
-
U(s, e, c),
|
|
1730
|
+
U(s, e, c), ge(t, e, null), T(e, n), T(e, r), T(r, o), u = !0;
|
|
1731
1731
|
},
|
|
1732
1732
|
p(s, c) {
|
|
1733
1733
|
(!u || c[0] & /*noResultsMessage*/
|
|
1734
|
-
128) &&
|
|
1734
|
+
128) && Ge(
|
|
1735
1735
|
o,
|
|
1736
1736
|
/*noResultsMessage*/
|
|
1737
1737
|
s[7]
|
|
@@ -1744,15 +1744,15 @@ function br(i) {
|
|
|
1744
1744
|
V(t.$$.fragment, s), u = !1;
|
|
1745
1745
|
},
|
|
1746
1746
|
d(s) {
|
|
1747
|
-
s && z(e),
|
|
1747
|
+
s && z(e), me(t);
|
|
1748
1748
|
}
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function pr(i) {
|
|
1752
1752
|
let e = "", t;
|
|
1753
1753
|
return {
|
|
1754
1754
|
c() {
|
|
1755
|
-
t =
|
|
1755
|
+
t = Ee(e);
|
|
1756
1756
|
},
|
|
1757
1757
|
m(n, r) {
|
|
1758
1758
|
U(n, t, r);
|
|
@@ -1765,26 +1765,26 @@ function wr(i) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function br(i) {
|
|
1769
1769
|
let e, t, n, r, o, u, s, c, l, d, a;
|
|
1770
|
-
return t = new
|
|
1770
|
+
return t = new Oi({}), c = new Ii({}), {
|
|
1771
1771
|
c() {
|
|
1772
|
-
e = A("div"),
|
|
1772
|
+
e = A("div"), Le(t.$$.fragment), n = ie(), r = A("div"), o = Ee(
|
|
1773
1773
|
/*errorMessage*/
|
|
1774
1774
|
i[6]
|
|
1775
|
-
), u =
|
|
1775
|
+
), u = ie(), s = A("button"), Le(c.$$.fragment), p(r, "class", "svelte-bz0zu3"), p(s, "class", "svelte-bz0zu3"), p(e, "class", "error svelte-bz0zu3");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(f, h) {
|
|
1778
|
-
U(f, e, h),
|
|
1778
|
+
U(f, e, h), ge(t, e, null), T(e, n), T(e, r), T(r, o), T(e, u), T(e, s), ge(c, s, null), l = !0, d || (a = J(
|
|
1779
1779
|
s,
|
|
1780
1780
|
"click",
|
|
1781
1781
|
/*click_handler_3*/
|
|
1782
|
-
i[
|
|
1782
|
+
i[69]
|
|
1783
1783
|
), d = !0);
|
|
1784
1784
|
},
|
|
1785
1785
|
p(f, h) {
|
|
1786
1786
|
(!l || h[0] & /*errorMessage*/
|
|
1787
|
-
64) &&
|
|
1787
|
+
64) && Ge(
|
|
1788
1788
|
o,
|
|
1789
1789
|
/*errorMessage*/
|
|
1790
1790
|
f[6]
|
|
@@ -1797,35 +1797,35 @@ function _r(i) {
|
|
|
1797
1797
|
V(t.$$.fragment, f), V(c.$$.fragment, f), l = !1;
|
|
1798
1798
|
},
|
|
1799
1799
|
d(f) {
|
|
1800
|
-
f && z(e),
|
|
1800
|
+
f && z(e), me(t), me(c), d = !1, a();
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function ci(i, e) {
|
|
1805
1805
|
let t, n, r;
|
|
1806
1806
|
function o() {
|
|
1807
1807
|
return (
|
|
1808
1808
|
/*mouseenter_handler*/
|
|
1809
|
-
e[
|
|
1809
|
+
e[70](
|
|
1810
1810
|
/*i*/
|
|
1811
|
-
e[
|
|
1811
|
+
e[85]
|
|
1812
1812
|
)
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
1815
|
function u() {
|
|
1816
1816
|
return (
|
|
1817
1817
|
/*focus_handler_1*/
|
|
1818
|
-
e[
|
|
1818
|
+
e[71](
|
|
1819
1819
|
/*feature*/
|
|
1820
|
-
e[
|
|
1820
|
+
e[83]
|
|
1821
1821
|
)
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
return n = new
|
|
1824
|
+
return n = new Qn({
|
|
1825
1825
|
props: {
|
|
1826
1826
|
feature: (
|
|
1827
1827
|
/*feature*/
|
|
1828
|
-
e[
|
|
1828
|
+
e[83]
|
|
1829
1829
|
),
|
|
1830
1830
|
showPlaceType: (
|
|
1831
1831
|
/*showPlaceType*/
|
|
@@ -1834,7 +1834,7 @@ function di(i, e) {
|
|
|
1834
1834
|
selected: (
|
|
1835
1835
|
/*selectedItemIndex*/
|
|
1836
1836
|
e[15] === /*i*/
|
|
1837
|
-
e[
|
|
1837
|
+
e[85]
|
|
1838
1838
|
),
|
|
1839
1839
|
missingIconsCache: (
|
|
1840
1840
|
/*missingIconsCache*/
|
|
@@ -1849,22 +1849,22 @@ function di(i, e) {
|
|
|
1849
1849
|
key: i,
|
|
1850
1850
|
first: null,
|
|
1851
1851
|
c() {
|
|
1852
|
-
t =
|
|
1852
|
+
t = wn(), Le(n.$$.fragment), this.first = t;
|
|
1853
1853
|
},
|
|
1854
1854
|
m(s, c) {
|
|
1855
|
-
U(s, t, c),
|
|
1855
|
+
U(s, t, c), ge(n, s, c), r = !0;
|
|
1856
1856
|
},
|
|
1857
1857
|
p(s, c) {
|
|
1858
1858
|
e = s;
|
|
1859
1859
|
const l = {};
|
|
1860
1860
|
c[0] & /*listFeatures*/
|
|
1861
1861
|
16384 && (l.feature = /*feature*/
|
|
1862
|
-
e[
|
|
1862
|
+
e[83]), c[0] & /*showPlaceType*/
|
|
1863
1863
|
1024 && (l.showPlaceType = /*showPlaceType*/
|
|
1864
1864
|
e[10]), c[0] & /*selectedItemIndex, listFeatures*/
|
|
1865
1865
|
49152 && (l.selected = /*selectedItemIndex*/
|
|
1866
1866
|
e[15] === /*i*/
|
|
1867
|
-
e[
|
|
1867
|
+
e[85]), c[0] & /*iconsBaseUrl*/
|
|
1868
1868
|
4096 && (l.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1869
1869
|
e[12]), n.$set(l);
|
|
1870
1870
|
},
|
|
@@ -1875,50 +1875,50 @@ function di(i, e) {
|
|
|
1875
1875
|
V(n.$$.fragment, s), r = !1;
|
|
1876
1876
|
},
|
|
1877
1877
|
d(s) {
|
|
1878
|
-
s && z(t),
|
|
1878
|
+
s && z(t), me(n, s);
|
|
1879
1879
|
}
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1883
|
-
let e, t, n, r, o, u, s, c, l, d, a, f, h,
|
|
1884
|
-
o = new
|
|
1885
|
-
let
|
|
1882
|
+
function vr(i) {
|
|
1883
|
+
let e, t, n, r, o, u, s, c, l, d, a, f, h, v, m, y, b, E, S, w, M, L = !1;
|
|
1884
|
+
o = new tr({}), a = new Ii({});
|
|
1885
|
+
let x = (
|
|
1886
1886
|
/*abortController*/
|
|
1887
|
-
i[19] &&
|
|
1888
|
-
),
|
|
1887
|
+
i[19] && ui()
|
|
1888
|
+
), _ = (
|
|
1889
1889
|
/*enableReverse*/
|
|
1890
|
-
i[5]
|
|
1890
|
+
i[5] === "button" && ai(i)
|
|
1891
1891
|
);
|
|
1892
1892
|
const k = (
|
|
1893
1893
|
/*#slots*/
|
|
1894
|
-
i[
|
|
1895
|
-
), I =
|
|
1894
|
+
i[60].default
|
|
1895
|
+
), I = yn(
|
|
1896
1896
|
k,
|
|
1897
1897
|
i,
|
|
1898
1898
|
/*$$scope*/
|
|
1899
|
-
i[
|
|
1899
|
+
i[59],
|
|
1900
1900
|
null
|
|
1901
|
-
), B = [
|
|
1902
|
-
function O(
|
|
1903
|
-
var
|
|
1901
|
+
), B = [br, pr, yr, mr], F = [];
|
|
1902
|
+
function O(C, G) {
|
|
1903
|
+
var ee, se;
|
|
1904
1904
|
return (
|
|
1905
1905
|
/*error*/
|
|
1906
|
-
|
|
1906
|
+
C[18] ? 0 : (
|
|
1907
1907
|
/*focusedDelayed*/
|
|
1908
|
-
|
|
1908
|
+
C[16] ? (
|
|
1909
1909
|
/*listFeatures*/
|
|
1910
|
-
((
|
|
1910
|
+
((ee = C[14]) == null ? void 0 : ee.length) === 0 ? 2 : (
|
|
1911
1911
|
/*focusedDelayed*/
|
|
1912
|
-
|
|
1913
|
-
((
|
|
1912
|
+
C[16] && /*listFeatures*/
|
|
1913
|
+
((se = C[14]) != null && se.length) ? 3 : -1
|
|
1914
1914
|
)
|
|
1915
1915
|
) : 1
|
|
1916
1916
|
)
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
return ~(
|
|
1919
|
+
return ~(y = O(i)) && (b = F[y] = B[y](i)), {
|
|
1920
1920
|
c() {
|
|
1921
|
-
e =
|
|
1921
|
+
e = ie(), t = A("form"), n = A("div"), r = A("button"), Le(o.$$.fragment), u = ie(), s = A("input"), c = ie(), l = A("div"), d = A("button"), Le(a.$$.fragment), f = ie(), x && x.c(), h = ie(), _ && _.c(), v = ie(), I && I.c(), m = ie(), b && b.c(), p(r, "class", "search-button svelte-bz0zu3"), p(r, "type", "button"), p(
|
|
1922
1922
|
s,
|
|
1923
1923
|
"placeholder",
|
|
1924
1924
|
/*placeholder*/
|
|
@@ -1933,15 +1933,15 @@ function Er(i) {
|
|
|
1933
1933
|
"title",
|
|
1934
1934
|
/*clearButtonTitle*/
|
|
1935
1935
|
i[3]
|
|
1936
|
-
), p(d, "class", "svelte-bz0zu3"), p(l, "class", "clear-button-container svelte-bz0zu3"),
|
|
1936
|
+
), p(d, "class", "svelte-bz0zu3"), p(l, "class", "clear-button-container svelte-bz0zu3"), oe(
|
|
1937
1937
|
l,
|
|
1938
1938
|
"displayable",
|
|
1939
1939
|
/*searchValue*/
|
|
1940
1940
|
i[1] !== ""
|
|
1941
|
-
), p(n, "class", "input-group svelte-bz0zu3"), p(t, "tabindex", "0"), p(t, "class", E =
|
|
1941
|
+
), p(n, "class", "input-group svelte-bz0zu3"), p(t, "tabindex", "0"), p(t, "class", E = Vt(
|
|
1942
1942
|
/*className*/
|
|
1943
1943
|
i[2]
|
|
1944
|
-
) + " svelte-bz0zu3"),
|
|
1944
|
+
) + " svelte-bz0zu3"), oe(
|
|
1945
1945
|
t,
|
|
1946
1946
|
"can-collapse",
|
|
1947
1947
|
/*collapsed*/
|
|
@@ -1949,35 +1949,35 @@ function Er(i) {
|
|
|
1949
1949
|
i[1] === ""
|
|
1950
1950
|
);
|
|
1951
1951
|
},
|
|
1952
|
-
m(
|
|
1953
|
-
U(
|
|
1952
|
+
m(C, G) {
|
|
1953
|
+
U(C, e, G), U(C, t, G), T(t, n), T(n, r), ge(o, r, null), T(n, u), T(n, s), i[62](s), Yt(
|
|
1954
1954
|
s,
|
|
1955
1955
|
/*searchValue*/
|
|
1956
1956
|
i[1]
|
|
1957
|
-
),
|
|
1957
|
+
), T(n, c), T(n, l), T(l, d), ge(a, d, null), T(l, f), x && x.m(l, null), T(n, h), _ && _.m(n, null), T(n, v), I && I.m(n, null), T(t, m), ~y && F[y].m(t, null), S = !0, w || (M = [
|
|
1958
1958
|
J(
|
|
1959
1959
|
r,
|
|
1960
1960
|
"click",
|
|
1961
1961
|
/*click_handler*/
|
|
1962
|
-
i[
|
|
1962
|
+
i[61]
|
|
1963
1963
|
),
|
|
1964
1964
|
J(
|
|
1965
1965
|
s,
|
|
1966
1966
|
"input",
|
|
1967
1967
|
/*input_1_input_handler*/
|
|
1968
|
-
i[
|
|
1968
|
+
i[63]
|
|
1969
1969
|
),
|
|
1970
1970
|
J(
|
|
1971
1971
|
s,
|
|
1972
1972
|
"focus",
|
|
1973
1973
|
/*focus_handler*/
|
|
1974
|
-
i[
|
|
1974
|
+
i[64]
|
|
1975
1975
|
),
|
|
1976
1976
|
J(
|
|
1977
1977
|
s,
|
|
1978
1978
|
"blur",
|
|
1979
1979
|
/*blur_handler*/
|
|
1980
|
-
i[
|
|
1980
|
+
i[65]
|
|
1981
1981
|
),
|
|
1982
1982
|
J(
|
|
1983
1983
|
s,
|
|
@@ -1989,106 +1989,106 @@ function Er(i) {
|
|
|
1989
1989
|
s,
|
|
1990
1990
|
"input",
|
|
1991
1991
|
/*input_handler*/
|
|
1992
|
-
i[
|
|
1992
|
+
i[66]
|
|
1993
1993
|
),
|
|
1994
1994
|
J(
|
|
1995
1995
|
d,
|
|
1996
1996
|
"click",
|
|
1997
1997
|
/*click_handler_1*/
|
|
1998
|
-
i[
|
|
1998
|
+
i[67]
|
|
1999
1999
|
),
|
|
2000
|
-
J(t, "submit",
|
|
2001
|
-
/*
|
|
2000
|
+
J(t, "submit", _n(
|
|
2001
|
+
/*handleOnSubmit*/
|
|
2002
2002
|
i[21]
|
|
2003
2003
|
))
|
|
2004
|
-
],
|
|
2004
|
+
], w = !0);
|
|
2005
2005
|
},
|
|
2006
|
-
p(
|
|
2007
|
-
(!
|
|
2006
|
+
p(C, G) {
|
|
2007
|
+
(!S || G[0] & /*placeholder*/
|
|
2008
2008
|
256) && p(
|
|
2009
2009
|
s,
|
|
2010
2010
|
"placeholder",
|
|
2011
2011
|
/*placeholder*/
|
|
2012
|
-
|
|
2013
|
-
), (!
|
|
2012
|
+
C[8]
|
|
2013
|
+
), (!S || G[0] & /*placeholder*/
|
|
2014
2014
|
256) && p(
|
|
2015
2015
|
s,
|
|
2016
2016
|
"aria-label",
|
|
2017
2017
|
/*placeholder*/
|
|
2018
|
-
|
|
2018
|
+
C[8]
|
|
2019
2019
|
), G[0] & /*searchValue*/
|
|
2020
2020
|
2 && s.value !== /*searchValue*/
|
|
2021
|
-
|
|
2021
|
+
C[1] && Yt(
|
|
2022
2022
|
s,
|
|
2023
2023
|
/*searchValue*/
|
|
2024
|
-
|
|
2025
|
-
), (!
|
|
2024
|
+
C[1]
|
|
2025
|
+
), (!S || G[0] & /*clearButtonTitle*/
|
|
2026
2026
|
8) && p(
|
|
2027
2027
|
d,
|
|
2028
2028
|
"title",
|
|
2029
2029
|
/*clearButtonTitle*/
|
|
2030
|
-
|
|
2030
|
+
C[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
|
-
|
|
2033
|
-
524288 && q(
|
|
2034
|
-
|
|
2035
|
-
}),
|
|
2036
|
-
2) &&
|
|
2032
|
+
C[19] ? x ? G[0] & /*abortController*/
|
|
2033
|
+
524288 && q(x, 1) : (x = ui(), x.c(), q(x, 1), x.m(l, null)) : x && (st(), V(x, 1, 1, () => {
|
|
2034
|
+
x = null;
|
|
2035
|
+
}), lt()), (!S || G[0] & /*searchValue*/
|
|
2036
|
+
2) && oe(
|
|
2037
2037
|
l,
|
|
2038
2038
|
"displayable",
|
|
2039
2039
|
/*searchValue*/
|
|
2040
|
-
|
|
2040
|
+
C[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
|
-
|
|
2043
|
-
32 && q(
|
|
2044
|
-
|
|
2045
|
-
}),
|
|
2046
|
-
|
|
2042
|
+
C[5] === "button" ? _ ? (_.p(C, G), G[0] & /*enableReverse*/
|
|
2043
|
+
32 && q(_, 1)) : (_ = ai(C), _.c(), q(_, 1), _.m(n, v)) : _ && (st(), V(_, 1, 1, () => {
|
|
2044
|
+
_ = null;
|
|
2045
|
+
}), lt()), I && I.p && (!S || G[1] & /*$$scope*/
|
|
2046
|
+
268435456) && bn(
|
|
2047
2047
|
I,
|
|
2048
2048
|
k,
|
|
2049
|
-
|
|
2049
|
+
C,
|
|
2050
2050
|
/*$$scope*/
|
|
2051
|
-
|
|
2052
|
-
|
|
2051
|
+
C[59],
|
|
2052
|
+
S ? pn(
|
|
2053
2053
|
k,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
|
-
|
|
2055
|
+
C[59],
|
|
2056
2056
|
G,
|
|
2057
2057
|
null
|
|
2058
|
-
) :
|
|
2058
|
+
) : vn(
|
|
2059
2059
|
/*$$scope*/
|
|
2060
|
-
|
|
2060
|
+
C[59]
|
|
2061
2061
|
),
|
|
2062
2062
|
null
|
|
2063
2063
|
);
|
|
2064
|
-
let
|
|
2065
|
-
|
|
2066
|
-
F[
|
|
2067
|
-
}),
|
|
2068
|
-
4 && E !== (E =
|
|
2064
|
+
let ee = y;
|
|
2065
|
+
y = O(C), y === ee ? ~y && F[y].p(C, G) : (b && (st(), V(F[ee], 1, 1, () => {
|
|
2066
|
+
F[ee] = null;
|
|
2067
|
+
}), lt()), ~y ? (b = F[y], b ? b.p(C, G) : (b = F[y] = B[y](C), b.c()), q(b, 1), b.m(t, null)) : b = null), (!S || G[0] & /*className*/
|
|
2068
|
+
4 && E !== (E = Vt(
|
|
2069
2069
|
/*className*/
|
|
2070
|
-
|
|
2071
|
-
) + " svelte-bz0zu3")) && p(t, "class", E), (!
|
|
2072
|
-
22) &&
|
|
2070
|
+
C[2]
|
|
2071
|
+
) + " svelte-bz0zu3")) && p(t, "class", E), (!S || G[0] & /*className, collapsed, searchValue*/
|
|
2072
|
+
22) && oe(
|
|
2073
2073
|
t,
|
|
2074
2074
|
"can-collapse",
|
|
2075
2075
|
/*collapsed*/
|
|
2076
|
-
|
|
2077
|
-
|
|
2076
|
+
C[4] && /*searchValue*/
|
|
2077
|
+
C[1] === ""
|
|
2078
2078
|
);
|
|
2079
2079
|
},
|
|
2080
|
-
i(
|
|
2081
|
-
|
|
2080
|
+
i(C) {
|
|
2081
|
+
S || (q(L), q(o.$$.fragment, C), q(a.$$.fragment, C), q(x), q(_), q(I, C), q(b), S = !0);
|
|
2082
2082
|
},
|
|
2083
|
-
o(
|
|
2084
|
-
V(
|
|
2083
|
+
o(C) {
|
|
2084
|
+
V(L), V(o.$$.fragment, C), V(a.$$.fragment, C), V(x), V(_), V(I, C), V(b), S = !1;
|
|
2085
2085
|
},
|
|
2086
|
-
d(
|
|
2087
|
-
|
|
2086
|
+
d(C) {
|
|
2087
|
+
C && (z(e), z(t)), me(o), i[62](null), me(a), x && x.d(), _ && _.d(), I && I.d(C), ~y && F[y].d(), w = !1, ye(M);
|
|
2088
2088
|
}
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function wr(i, e, t) {
|
|
2092
2092
|
let n, { $$slots: r = {}, $$scope: o } = e;
|
|
2093
2093
|
const u = {
|
|
2094
2094
|
continental_marine: 4,
|
|
@@ -2114,299 +2114,288 @@ function Lr(i, e, t) {
|
|
|
2114
2114
|
"poi.restaurant": 18,
|
|
2115
2115
|
"poi.aerodrome": 13
|
|
2116
2116
|
};
|
|
2117
|
-
let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch:
|
|
2117
|
+
let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: v = 200 } = e, { enableReverse: m = "never" } = e, { errorMessage: y = "Something went wrong…" } = e, { filter: b = () => !0 } = e, { flyTo: E = !0 } = e, { fuzzyMatch: S = !0 } = e, { language: w = void 0 } = e, { limit: M = void 0 } = e, { mapController: L = void 0 } = e, { minLength: x = 2 } = e, { noResultsMessage: _ = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: k = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: B = m === "always" } = e, { reverseButtonTitle: F = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { pickedResultStyle: C = "full-geometry" } = e, { showPlaceType: G = "if-needed" } = e, { showResultsWhileTyping: ee = !0 } = e, { selectFirst: se = !0 } = e, { flyToSelected: ft = !1 } = e, { markerOnSelected: Xe = !0 } = e, { types: ke = void 0 } = e, { exhaustiveReverseGeocoding: dt = !1 } = e, { excludeTypes: Ke = !1 } = e, { zoom: Je = u } = e, { apiUrl: ht = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: gt = {} } = e, { iconsBaseUrl: Ft = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0-rc.6/icons/" } = e, { adjustUrlQuery: mt = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
|
-
function
|
|
2120
|
-
|
|
2119
|
+
function qi() {
|
|
2120
|
+
ce.focus();
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2123
|
-
|
|
2122
|
+
function Zi() {
|
|
2123
|
+
ce.blur();
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
t(1, O =
|
|
2127
|
-
|
|
2125
|
+
function Gt(g, j = !0, H = !1) {
|
|
2126
|
+
t(1, O = g), j ? (t(15, D = -1), qt()) : (vt(!H, H), setTimeout(() => {
|
|
2127
|
+
ce.focus(), ce.select();
|
|
2128
2128
|
}));
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2131
|
-
t(14, R = void 0), t(
|
|
2132
|
-
}
|
|
2133
|
-
function Yi() {
|
|
2134
|
-
t(56, Z = []), t(57, N = void 0);
|
|
2130
|
+
function Qi() {
|
|
2131
|
+
t(14, R = void 0), t(56, N = void 0), t(15, D = -1);
|
|
2135
2132
|
}
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
function Ki() {
|
|
2139
|
-
return !!ie;
|
|
2133
|
+
function Hi() {
|
|
2134
|
+
t(55, Z = []), t(56, N = void 0);
|
|
2140
2135
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2136
|
+
let Te = !1, R, Z, N, jt = "", ce, D = -1, fe, $e = [], Ne, Re, et, yt;
|
|
2137
|
+
const Vi = /* @__PURE__ */ new Set(), pe = xn();
|
|
2138
|
+
Sn(() => {
|
|
2139
|
+
L && (L.setEventHandler(void 0), L.indicateReverse(!1), L.setSelectedMarker(-1), L.setMarkers(void 0, void 0));
|
|
2143
2140
|
});
|
|
2144
|
-
function
|
|
2145
|
-
if (
|
|
2146
|
-
|
|
2147
|
-
return;
|
|
2148
|
-
}
|
|
2149
|
-
if (D > -1 && R)
|
|
2150
|
-
t(57, N = R[D]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, de = void 0), t(56, Z = void 0), t(15, D = -1);
|
|
2141
|
+
function qt(g) {
|
|
2142
|
+
if (Re && (clearTimeout(Re), Re = void 0), D > -1 && R)
|
|
2143
|
+
t(56, N = R[D]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, fe = void 0), t(55, Z = void 0), t(15, D = -1);
|
|
2151
2144
|
else if (O) {
|
|
2152
|
-
const j =
|
|
2153
|
-
|
|
2154
|
-
t(
|
|
2155
|
-
}).catch((
|
|
2145
|
+
const j = g || !pt(O);
|
|
2146
|
+
bt(O, { exact: !0 }).then(() => {
|
|
2147
|
+
t(55, Z = R), t(56, N = void 0), j && Yi();
|
|
2148
|
+
}).catch((H) => t(18, fe = H));
|
|
2156
2149
|
}
|
|
2157
2150
|
}
|
|
2158
|
-
function
|
|
2151
|
+
function pt(g) {
|
|
2159
2152
|
try {
|
|
2160
|
-
return
|
|
2153
|
+
return gr(g, 6);
|
|
2161
2154
|
} catch {
|
|
2162
2155
|
return !1;
|
|
2163
2156
|
}
|
|
2164
2157
|
}
|
|
2165
|
-
async function
|
|
2166
|
-
t(18,
|
|
2167
|
-
const
|
|
2168
|
-
t(19,
|
|
2158
|
+
async function bt(g, { byId: j = !1, exact: H = !1 } = {}) {
|
|
2159
|
+
t(18, fe = void 0), Ne == null || Ne.abort();
|
|
2160
|
+
const te = new AbortController();
|
|
2161
|
+
t(19, Ne = te);
|
|
2169
2162
|
try {
|
|
2170
|
-
const
|
|
2171
|
-
if (
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2163
|
+
const P = pt(g), Q = new URLSearchParams();
|
|
2164
|
+
if (w !== void 0 && Q.set("language", Array.isArray(w) ? w.join(",") : w ?? ""), ke && Q.set("types", ke.join(",")), Ke && Q.set("excludeTypes", String(Ke)), l && Q.set("bbox", l.map((tt) => tt.toFixed(6)).join(",")), h && Q.set("country", Array.isArray(h) ? h.join(",") : h), !j && !P) {
|
|
2165
|
+
const tt = await nr(L, I, te);
|
|
2166
|
+
tt && Q.set("proximity", tt), (H || !ee) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(S));
|
|
2174
2167
|
}
|
|
2175
|
-
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
j ? (t(14, R = void 0), t(
|
|
2168
|
+
M !== void 0 && (dt || !P || (ke == null ? void 0 : ke.length) === 1) && Q.set("limit", String(M)), Q.set("key", c), mt(Q);
|
|
2169
|
+
const de = ht + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : g) + ".json?" + Q.toString();
|
|
2170
|
+
if (de === jt) {
|
|
2171
|
+
j ? (t(14, R = void 0), t(56, N = $e[0])) : t(14, R = $e);
|
|
2179
2172
|
return;
|
|
2180
2173
|
}
|
|
2181
|
-
|
|
2182
|
-
const
|
|
2183
|
-
if (!
|
|
2184
|
-
throw new Error(await
|
|
2185
|
-
const
|
|
2186
|
-
|
|
2174
|
+
jt = de;
|
|
2175
|
+
const _t = await fetch(de, { signal: te.signal, ...gt });
|
|
2176
|
+
if (!_t.ok)
|
|
2177
|
+
throw new Error(await _t.text());
|
|
2178
|
+
const Et = await _t.json();
|
|
2179
|
+
pe("response", { url: de, featureCollection: Et }), j ? (t(14, R = void 0), t(56, N = Et.features[0]), $e = [N]) : (t(14, R = Et.features.filter(b)), P && R.unshift({
|
|
2187
2180
|
type: "Feature",
|
|
2188
2181
|
properties: {},
|
|
2189
|
-
id: "reverse_" +
|
|
2190
|
-
text:
|
|
2191
|
-
place_name:
|
|
2182
|
+
id: "reverse_" + P.decimalLongitude + "_" + P.decimalLatitude,
|
|
2183
|
+
text: P.decimalLatitude + ", " + P.decimalLongitude,
|
|
2184
|
+
place_name: P.decimalLatitude + ", " + P.decimalLongitude,
|
|
2192
2185
|
place_type: ["reverse"],
|
|
2193
|
-
center: [
|
|
2186
|
+
center: [P.decimalLongitude, P.decimalLatitude],
|
|
2194
2187
|
bbox: [
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2188
|
+
P.decimalLongitude,
|
|
2189
|
+
P.decimalLatitude,
|
|
2190
|
+
P.decimalLongitude,
|
|
2191
|
+
P.decimalLatitude
|
|
2199
2192
|
],
|
|
2200
2193
|
geometry: {
|
|
2201
2194
|
type: "Point",
|
|
2202
|
-
coordinates: [
|
|
2195
|
+
coordinates: [P.decimalLongitude, P.decimalLatitude]
|
|
2203
2196
|
}
|
|
2204
|
-
}),
|
|
2205
|
-
} catch (
|
|
2206
|
-
if (
|
|
2197
|
+
}), $e = R, P && ce.focus());
|
|
2198
|
+
} catch (P) {
|
|
2199
|
+
if (P && typeof P == "object" && "name" in P && P.name === "AbortError")
|
|
2207
2200
|
return;
|
|
2208
|
-
throw
|
|
2201
|
+
throw P;
|
|
2209
2202
|
} finally {
|
|
2210
|
-
|
|
2203
|
+
te === Ne && t(19, Ne = void 0);
|
|
2211
2204
|
}
|
|
2212
2205
|
}
|
|
2213
|
-
function
|
|
2214
|
-
var
|
|
2206
|
+
function Yi() {
|
|
2207
|
+
var te;
|
|
2215
2208
|
if (!(Z != null && Z.length) || !E)
|
|
2216
2209
|
return;
|
|
2217
|
-
const
|
|
2218
|
-
let
|
|
2219
|
-
for (const
|
|
2220
|
-
const
|
|
2221
|
-
if (
|
|
2222
|
-
for (const
|
|
2223
|
-
|
|
2210
|
+
const g = [180, 90, -180, -90], j = !Z.some((P) => !P.matching_text);
|
|
2211
|
+
let H;
|
|
2212
|
+
for (const P of Z) {
|
|
2213
|
+
const Q = ze(P);
|
|
2214
|
+
if (H = H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q), j || !P.matching_text)
|
|
2215
|
+
for (const de of [0, 1, 2, 3])
|
|
2216
|
+
g[de] = Math[de < 2 ? "min" : "max"](g[de], ((te = P.bbox) == null ? void 0 : te[de]) ?? P.center[de % 2]);
|
|
2224
2217
|
}
|
|
2225
|
-
|
|
2218
|
+
L && Z.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? L.flyTo(N.center, ze(N)) : L.fitBounds(qe(g), 50, H));
|
|
2226
2219
|
}
|
|
2227
|
-
function
|
|
2228
|
-
var
|
|
2229
|
-
if (!
|
|
2220
|
+
function ze(g) {
|
|
2221
|
+
var H;
|
|
2222
|
+
if (!g.bbox || g.bbox[0] !== g.bbox[2] && g.bbox[1] !== g.bbox[3])
|
|
2230
2223
|
return;
|
|
2231
|
-
const j =
|
|
2232
|
-
return (Array.isArray((
|
|
2233
|
-
(
|
|
2234
|
-
const
|
|
2235
|
-
return
|
|
2224
|
+
const j = g.id.replace(/\..*/, "");
|
|
2225
|
+
return (Array.isArray((H = g.properties) == null ? void 0 : H.categories) ? g.properties.categories.reduce(
|
|
2226
|
+
(te, P) => {
|
|
2227
|
+
const Q = Je[j + "." + P];
|
|
2228
|
+
return te === void 0 ? Q : Q === void 0 ? te : Math.max(te, Q);
|
|
2236
2229
|
},
|
|
2237
2230
|
void 0
|
|
2238
|
-
) : void 0) ??
|
|
2231
|
+
) : void 0) ?? Je[j];
|
|
2239
2232
|
}
|
|
2240
|
-
function
|
|
2241
|
-
t(0, B =
|
|
2233
|
+
function Xi(g) {
|
|
2234
|
+
t(0, B = m === "always"), t(14, R = void 0), t(56, N = void 0), t(15, D = -1), Gt(g[1].toFixed(6) + ", " + ir(g[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2242
2235
|
}
|
|
2243
|
-
function
|
|
2236
|
+
function Ki(g) {
|
|
2244
2237
|
if (!R)
|
|
2245
2238
|
return;
|
|
2246
|
-
let j =
|
|
2247
|
-
j && (D === (
|
|
2239
|
+
let j = g.key === "ArrowDown" ? 1 : g.key === "ArrowUp" ? -1 : 0;
|
|
2240
|
+
j && (D === (se ? 0 : -1) && j === -1 && t(15, D = R.length), t(15, D += j), D >= R.length && t(15, D = -1), D < 0 && se && t(15, D = 0), g.preventDefault());
|
|
2248
2241
|
}
|
|
2249
|
-
function
|
|
2250
|
-
if (t(18,
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
()
|
|
2262
|
-
t(58, ie = void 0), De(Q, { appendSpace: !0 }).catch((ne) => t(18, de = ne));
|
|
2263
|
-
},
|
|
2264
|
-
pe
|
|
2265
|
-
));
|
|
2242
|
+
function vt(g = !0, j = !1) {
|
|
2243
|
+
if (t(18, fe = void 0), ee || j) {
|
|
2244
|
+
if (Re && clearTimeout(Re), O.length < x)
|
|
2245
|
+
return;
|
|
2246
|
+
const H = O;
|
|
2247
|
+
Re = window.setTimeout(
|
|
2248
|
+
() => {
|
|
2249
|
+
bt(H).catch((te) => t(18, fe = te));
|
|
2250
|
+
},
|
|
2251
|
+
g ? v : 0
|
|
2252
|
+
);
|
|
2253
|
+
} else
|
|
2254
|
+
t(14, R = void 0), t(18, fe = void 0);
|
|
2266
2255
|
}
|
|
2267
|
-
function
|
|
2268
|
-
t(
|
|
2256
|
+
function wt(g) {
|
|
2257
|
+
t(56, N = g), t(1, O = g.place_name), t(15, D = -1);
|
|
2269
2258
|
}
|
|
2270
|
-
const
|
|
2271
|
-
function
|
|
2272
|
-
|
|
2273
|
-
|
|
2259
|
+
const Ji = () => ce.focus();
|
|
2260
|
+
function $i(g) {
|
|
2261
|
+
Ct[g ? "unshift" : "push"](() => {
|
|
2262
|
+
ce = g, t(17, ce);
|
|
2274
2263
|
});
|
|
2275
2264
|
}
|
|
2276
|
-
function
|
|
2277
|
-
O = this.value, t(1, O), t(13,
|
|
2265
|
+
function en() {
|
|
2266
|
+
O = this.value, t(1, O), t(13, Te), t(28, a);
|
|
2278
2267
|
}
|
|
2279
|
-
const
|
|
2280
|
-
t(1, O = ""),
|
|
2281
|
-
},
|
|
2282
|
-
|
|
2283
|
-
},
|
|
2268
|
+
const tn = () => t(13, Te = !0), nn = () => t(13, Te = !1), rn = () => vt(), on = () => {
|
|
2269
|
+
t(1, O = ""), ce.focus();
|
|
2270
|
+
}, sn = () => t(0, B = !B), ln = () => t(18, fe = void 0), un = (g) => t(15, D = g), an = (g) => wt(g), cn = () => {
|
|
2271
|
+
se || t(15, D = -1);
|
|
2272
|
+
}, fn = () => {
|
|
2284
2273
|
};
|
|
2285
|
-
return i.$$set = (
|
|
2286
|
-
"class" in
|
|
2274
|
+
return i.$$set = (g) => {
|
|
2275
|
+
"class" in g && t(2, s = g.class), "apiKey" in g && t(26, c = g.apiKey), "bbox" in g && t(27, l = g.bbox), "clearButtonTitle" in g && t(3, d = g.clearButtonTitle), "clearOnBlur" in g && t(28, a = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, h = g.country), "debounceSearch" in g && t(30, v = g.debounceSearch), "enableReverse" in g && t(5, m = g.enableReverse), "errorMessage" in g && t(6, y = g.errorMessage), "filter" in g && t(31, b = g.filter), "flyTo" in g && t(32, E = g.flyTo), "fuzzyMatch" in g && t(33, S = g.fuzzyMatch), "language" in g && t(34, w = g.language), "limit" in g && t(35, M = g.limit), "mapController" in g && t(36, L = g.mapController), "minLength" in g && t(37, x = g.minLength), "noResultsMessage" in g && t(7, _ = g.noResultsMessage), "placeholder" in g && t(8, k = g.placeholder), "proximity" in g && t(38, I = g.proximity), "reverseActive" in g && t(0, B = g.reverseActive), "reverseButtonTitle" in g && t(9, F = g.reverseButtonTitle), "searchValue" in g && t(1, O = g.searchValue), "pickedResultStyle" in g && t(39, C = g.pickedResultStyle), "showPlaceType" in g && t(10, G = g.showPlaceType), "showResultsWhileTyping" in g && t(40, ee = g.showResultsWhileTyping), "selectFirst" in g && t(11, se = g.selectFirst), "flyToSelected" in g && t(41, ft = g.flyToSelected), "markerOnSelected" in g && t(42, Xe = g.markerOnSelected), "types" in g && t(43, ke = g.types), "exhaustiveReverseGeocoding" in g && t(44, dt = g.exhaustiveReverseGeocoding), "excludeTypes" in g && t(45, Ke = g.excludeTypes), "zoom" in g && t(46, Je = g.zoom), "apiUrl" in g && t(47, ht = g.apiUrl), "fetchParameters" in g && t(48, gt = g.fetchParameters), "iconsBaseUrl" in g && t(12, Ft = g.iconsBaseUrl), "adjustUrlQuery" in g && t(49, mt = g.adjustUrlQuery), "$$scope" in g && t(59, o = g.$$scope);
|
|
2287
2276
|
}, i.$$.update = () => {
|
|
2288
2277
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2289
|
-
32 && t(0, B =
|
|
2278
|
+
32 && t(0, B = m === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2290
2279
|
268443648 && setTimeout(() => {
|
|
2291
|
-
t(16,
|
|
2280
|
+
t(16, et = Te), a && !Te && t(1, O = "");
|
|
2292
2281
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2293
2282
|
16386 | i.$$.dirty[1] & /*minLength*/
|
|
2294
|
-
64 && O.length <
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
18432 &&
|
|
2283
|
+
64 && O.length < x && (t(56, N = void 0), t(14, R = void 0), t(18, fe = void 0), t(55, Z = R)), i.$$.dirty[1] & /*pickedResultStyle, picked*/
|
|
2284
|
+
33554688 && C !== "marker-only" && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && bt(N.id, { byId: !0 }).catch((g) => t(18, fe = g)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2285
|
+
100663330 && (L && N && N.id !== yt && E && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? L.flyTo(N.center, ze(N)) : L.fitBounds(qe(N.bbox), 50, ze(N)), t(14, R = void 0), t(55, Z = void 0), t(15, D = -1)), t(57, yt = N == null ? void 0 : N.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2286
|
+
18432 && se && R != null && R.length && t(15, D = 0), i.$$.dirty[0] & /*searchValue*/
|
|
2298
2287
|
2 && t(15, D = -1), i.$$.dirty[0] & /*listFeatures*/
|
|
2299
2288
|
16384 | i.$$.dirty[1] & /*markedFeatures*/
|
|
2300
|
-
|
|
2289
|
+
16777216 && Z !== R && t(55, Z = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2301
2290
|
81921 | i.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2302
|
-
|
|
2303
|
-
switch (
|
|
2291
|
+
16777248 && L && L.setEventHandler((g) => {
|
|
2292
|
+
switch (g.type) {
|
|
2304
2293
|
case "mapClick":
|
|
2305
|
-
B &&
|
|
2294
|
+
B && Xi(g.coordinates);
|
|
2306
2295
|
break;
|
|
2307
2296
|
case "markerClick":
|
|
2308
2297
|
{
|
|
2309
|
-
const j = R == null ? void 0 : R.find((
|
|
2310
|
-
j &&
|
|
2298
|
+
const j = R == null ? void 0 : R.find((H) => H.id === g.id);
|
|
2299
|
+
j && wt(j);
|
|
2311
2300
|
}
|
|
2312
2301
|
break;
|
|
2313
2302
|
case "markerMouseEnter":
|
|
2314
|
-
Z && t(15, D =
|
|
2303
|
+
Z && t(15, D = et ? (R == null ? void 0 : R.findIndex((j) => j.id === g.id)) ?? -1 : -1);
|
|
2315
2304
|
break;
|
|
2316
2305
|
case "markerMouseLeave":
|
|
2317
2306
|
Z && t(15, D = -1);
|
|
2318
2307
|
break;
|
|
2319
2308
|
}
|
|
2320
2309
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2321
|
-
49152 && t(
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2310
|
+
49152 && t(58, n = R == null ? void 0 : R[D]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2311
|
+
134218786 && L && n && E && ft && L.flyTo(n.center, ze(n)), i.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2312
|
+
2080 && (Xe || L == null || L.setMarkers(void 0, void 0)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2313
|
+
150997024 && L && Xe && !Z && (L.setMarkers(n ? [n] : void 0, void 0), L.setSelectedMarker(n ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2314
|
+
50331680 && L && L.setMarkers(Z, N), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
2326
2315
|
32768 | i.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2327
|
-
|
|
2328
|
-
671088640 && n && (window.clearTimeout(ie), t(58, ie = void 0)), i.$$.dirty[0] & /*searchValue*/
|
|
2316
|
+
16777248 && Z && L && L.setSelectedMarker(D), i.$$.dirty[0] & /*searchValue*/
|
|
2329
2317
|
2 | i.$$.dirty[1] & /*mapController*/
|
|
2330
|
-
32 &&
|
|
2331
|
-
const
|
|
2332
|
-
|
|
2318
|
+
32 && L) {
|
|
2319
|
+
const g = pt(O);
|
|
2320
|
+
L.setReverseMarker(g ? [g.decimalLongitude, g.decimalLatitude] : void 0);
|
|
2333
2321
|
}
|
|
2334
2322
|
i.$$.dirty[1] & /*selected*/
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
81920 &&
|
|
2338
|
-
optionsVisible:
|
|
2323
|
+
134217728 && pe("select", { feature: n }), i.$$.dirty[1] & /*picked*/
|
|
2324
|
+
33554432 && pe("pick", { feature: N }), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2325
|
+
81920 && pe("optionsvisibilitychange", {
|
|
2326
|
+
optionsVisible: et && !!R
|
|
2339
2327
|
}), i.$$.dirty[0] & /*listFeatures*/
|
|
2340
|
-
16384 &&
|
|
2341
|
-
|
|
2342
|
-
1 &&
|
|
2343
|
-
2 &&
|
|
2328
|
+
16384 && pe("featureslisted", { features: R }), i.$$.dirty[1] & /*markedFeatures*/
|
|
2329
|
+
16777216 && pe("featuresmarked", { features: Z }), i.$$.dirty[0] & /*reverseActive*/
|
|
2330
|
+
1 && pe("reversetoggle", { reverse: B }), i.$$.dirty[0] & /*searchValue*/
|
|
2331
|
+
2 && pe("querychange", { query: O }), i.$$.dirty[0] & /*reverseActive*/
|
|
2344
2332
|
1 | i.$$.dirty[1] & /*mapController*/
|
|
2345
|
-
32 &&
|
|
2333
|
+
32 && L && L.indicateReverse(B);
|
|
2346
2334
|
}, [
|
|
2347
2335
|
B,
|
|
2348
2336
|
O,
|
|
2349
2337
|
s,
|
|
2350
2338
|
d,
|
|
2351
2339
|
f,
|
|
2340
|
+
m,
|
|
2352
2341
|
y,
|
|
2353
|
-
|
|
2354
|
-
w,
|
|
2342
|
+
_,
|
|
2355
2343
|
k,
|
|
2356
2344
|
F,
|
|
2357
2345
|
G,
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2346
|
+
se,
|
|
2347
|
+
Ft,
|
|
2348
|
+
Te,
|
|
2361
2349
|
R,
|
|
2362
2350
|
D,
|
|
2363
|
-
|
|
2351
|
+
et,
|
|
2352
|
+
ce,
|
|
2364
2353
|
fe,
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2354
|
+
Ne,
|
|
2355
|
+
Vi,
|
|
2356
|
+
qt,
|
|
2357
|
+
Ki,
|
|
2358
|
+
vt,
|
|
2370
2359
|
wt,
|
|
2371
|
-
_t,
|
|
2372
2360
|
u,
|
|
2373
2361
|
c,
|
|
2374
2362
|
l,
|
|
2375
2363
|
a,
|
|
2376
2364
|
h,
|
|
2377
|
-
g,
|
|
2378
2365
|
v,
|
|
2366
|
+
b,
|
|
2379
2367
|
E,
|
|
2368
|
+
S,
|
|
2369
|
+
w,
|
|
2370
|
+
M,
|
|
2380
2371
|
L,
|
|
2381
|
-
_,
|
|
2382
|
-
C,
|
|
2383
2372
|
x,
|
|
2384
|
-
S,
|
|
2385
2373
|
I,
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2374
|
+
C,
|
|
2375
|
+
ee,
|
|
2376
|
+
ft,
|
|
2377
|
+
Xe,
|
|
2378
|
+
ke,
|
|
2379
|
+
dt,
|
|
2380
|
+
Ke,
|
|
2390
2381
|
Je,
|
|
2391
|
-
|
|
2392
|
-
mt,
|
|
2393
|
-
$e,
|
|
2394
|
-
et,
|
|
2382
|
+
ht,
|
|
2395
2383
|
gt,
|
|
2396
|
-
|
|
2397
|
-
|
|
2384
|
+
mt,
|
|
2385
|
+
qi,
|
|
2386
|
+
Zi,
|
|
2387
|
+
Gt,
|
|
2398
2388
|
Qi,
|
|
2399
2389
|
Hi,
|
|
2400
|
-
qt,
|
|
2401
|
-
Vi,
|
|
2402
|
-
Yi,
|
|
2403
2390
|
Z,
|
|
2404
2391
|
N,
|
|
2405
|
-
|
|
2406
|
-
vt,
|
|
2392
|
+
yt,
|
|
2407
2393
|
n,
|
|
2408
2394
|
o,
|
|
2409
2395
|
r,
|
|
2396
|
+
Ji,
|
|
2397
|
+
$i,
|
|
2398
|
+
en,
|
|
2410
2399
|
tn,
|
|
2411
2400
|
nn,
|
|
2412
2401
|
rn,
|
|
@@ -2416,20 +2405,17 @@ function Lr(i, e, t) {
|
|
|
2416
2405
|
un,
|
|
2417
2406
|
an,
|
|
2418
2407
|
cn,
|
|
2419
|
-
fn
|
|
2420
|
-
dn,
|
|
2421
|
-
hn,
|
|
2422
|
-
mn
|
|
2408
|
+
fn
|
|
2423
2409
|
];
|
|
2424
2410
|
}
|
|
2425
|
-
let
|
|
2411
|
+
let _r = class extends Ce {
|
|
2426
2412
|
constructor(e) {
|
|
2427
|
-
super(),
|
|
2413
|
+
super(), Me(
|
|
2428
2414
|
this,
|
|
2429
2415
|
e,
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2416
|
+
wr,
|
|
2417
|
+
vr,
|
|
2418
|
+
xe,
|
|
2433
2419
|
{
|
|
2434
2420
|
ZOOM_DEFAULTS: 25,
|
|
2435
2421
|
class: 2,
|
|
@@ -2458,23 +2444,22 @@ let Sr = class extends ke {
|
|
|
2458
2444
|
pickedResultStyle: 39,
|
|
2459
2445
|
showPlaceType: 10,
|
|
2460
2446
|
showResultsWhileTyping: 40,
|
|
2461
|
-
autocompleteTimeout: 41,
|
|
2462
2447
|
selectFirst: 11,
|
|
2463
|
-
flyToSelected:
|
|
2464
|
-
markerOnSelected:
|
|
2465
|
-
types:
|
|
2466
|
-
exhaustiveReverseGeocoding:
|
|
2467
|
-
excludeTypes:
|
|
2468
|
-
zoom:
|
|
2469
|
-
apiUrl:
|
|
2470
|
-
fetchParameters:
|
|
2448
|
+
flyToSelected: 41,
|
|
2449
|
+
markerOnSelected: 42,
|
|
2450
|
+
types: 43,
|
|
2451
|
+
exhaustiveReverseGeocoding: 44,
|
|
2452
|
+
excludeTypes: 45,
|
|
2453
|
+
zoom: 46,
|
|
2454
|
+
apiUrl: 47,
|
|
2455
|
+
fetchParameters: 48,
|
|
2471
2456
|
iconsBaseUrl: 12,
|
|
2472
|
-
adjustUrlQuery:
|
|
2473
|
-
focus:
|
|
2474
|
-
blur:
|
|
2475
|
-
setQuery:
|
|
2476
|
-
clearList:
|
|
2477
|
-
clearMap:
|
|
2457
|
+
adjustUrlQuery: 49,
|
|
2458
|
+
focus: 50,
|
|
2459
|
+
blur: 51,
|
|
2460
|
+
setQuery: 52,
|
|
2461
|
+
clearList: 53,
|
|
2462
|
+
clearMap: 54
|
|
2478
2463
|
},
|
|
2479
2464
|
null,
|
|
2480
2465
|
[-1, -1, -1]
|
|
@@ -2484,26 +2469,26 @@ let Sr = class extends ke {
|
|
|
2484
2469
|
return this.$$.ctx[25];
|
|
2485
2470
|
}
|
|
2486
2471
|
get focus() {
|
|
2487
|
-
return this.$$.ctx[
|
|
2472
|
+
return this.$$.ctx[50];
|
|
2488
2473
|
}
|
|
2489
2474
|
get blur() {
|
|
2490
|
-
return this.$$.ctx[
|
|
2475
|
+
return this.$$.ctx[51];
|
|
2491
2476
|
}
|
|
2492
2477
|
get setQuery() {
|
|
2493
|
-
return this.$$.ctx[
|
|
2478
|
+
return this.$$.ctx[52];
|
|
2494
2479
|
}
|
|
2495
2480
|
get clearList() {
|
|
2496
|
-
return this.$$.ctx[
|
|
2481
|
+
return this.$$.ctx[53];
|
|
2497
2482
|
}
|
|
2498
2483
|
get clearMap() {
|
|
2499
|
-
return this.$$.ctx[
|
|
2484
|
+
return this.$$.ctx[54];
|
|
2500
2485
|
}
|
|
2501
2486
|
};
|
|
2502
|
-
function
|
|
2487
|
+
function Ze(i, e, t = {}) {
|
|
2503
2488
|
const n = { type: "Feature" };
|
|
2504
2489
|
return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
|
|
2505
2490
|
}
|
|
2506
|
-
function
|
|
2491
|
+
function zt(i, e, t = {}) {
|
|
2507
2492
|
for (const r of i) {
|
|
2508
2493
|
if (r.length < 4)
|
|
2509
2494
|
throw new Error(
|
|
@@ -2515,43 +2500,43 @@ function Dt(i, e, t = {}) {
|
|
|
2515
2500
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2516
2501
|
throw new Error("First and last Position are not equivalent.");
|
|
2517
2502
|
}
|
|
2518
|
-
return
|
|
2503
|
+
return Ze({
|
|
2519
2504
|
type: "Polygon",
|
|
2520
2505
|
coordinates: i
|
|
2521
2506
|
}, e, t);
|
|
2522
2507
|
}
|
|
2523
|
-
function
|
|
2508
|
+
function Qe(i, e = {}) {
|
|
2524
2509
|
const t = { type: "FeatureCollection" };
|
|
2525
2510
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
|
|
2526
2511
|
}
|
|
2527
|
-
function
|
|
2528
|
-
return
|
|
2512
|
+
function Ai(i, e, t = {}) {
|
|
2513
|
+
return Ze({
|
|
2529
2514
|
type: "MultiPolygon",
|
|
2530
2515
|
coordinates: i
|
|
2531
2516
|
}, e, t);
|
|
2532
2517
|
}
|
|
2533
|
-
function
|
|
2518
|
+
function Wi(i, e, t) {
|
|
2534
2519
|
if (i !== null)
|
|
2535
|
-
for (var n, r, o, u, s, c, l, d = 0, a = 0, f, h = i.type,
|
|
2536
|
-
l =
|
|
2520
|
+
for (var n, r, o, u, s, c, l, d = 0, a = 0, f, h = i.type, v = h === "FeatureCollection", m = h === "Feature", y = v ? i.features.length : 1, b = 0; b < y; b++) {
|
|
2521
|
+
l = v ? i.features[b].geometry : m ? i.geometry : i, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
|
|
2537
2522
|
for (var E = 0; E < s; E++) {
|
|
2538
|
-
var
|
|
2523
|
+
var S = 0, w = 0;
|
|
2539
2524
|
if (u = f ? l.geometries[E] : l, u !== null) {
|
|
2540
2525
|
c = u.coordinates;
|
|
2541
|
-
var
|
|
2542
|
-
switch (d = 0,
|
|
2526
|
+
var M = u.type;
|
|
2527
|
+
switch (d = 0, M) {
|
|
2543
2528
|
case null:
|
|
2544
2529
|
break;
|
|
2545
2530
|
case "Point":
|
|
2546
2531
|
if (e(
|
|
2547
2532
|
c,
|
|
2548
2533
|
a,
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2534
|
+
b,
|
|
2535
|
+
S,
|
|
2536
|
+
w
|
|
2552
2537
|
) === !1)
|
|
2553
2538
|
return !1;
|
|
2554
|
-
a++,
|
|
2539
|
+
a++, S++;
|
|
2555
2540
|
break;
|
|
2556
2541
|
case "LineString":
|
|
2557
2542
|
case "MultiPoint":
|
|
@@ -2559,14 +2544,14 @@ function Bi(i, e, t) {
|
|
|
2559
2544
|
if (e(
|
|
2560
2545
|
c[n],
|
|
2561
2546
|
a,
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2547
|
+
b,
|
|
2548
|
+
S,
|
|
2549
|
+
w
|
|
2565
2550
|
) === !1)
|
|
2566
2551
|
return !1;
|
|
2567
|
-
a++,
|
|
2552
|
+
a++, M === "MultiPoint" && S++;
|
|
2568
2553
|
}
|
|
2569
|
-
|
|
2554
|
+
M === "LineString" && S++;
|
|
2570
2555
|
break;
|
|
2571
2556
|
case "Polygon":
|
|
2572
2557
|
case "MultiLineString":
|
|
@@ -2575,39 +2560,39 @@ function Bi(i, e, t) {
|
|
|
2575
2560
|
if (e(
|
|
2576
2561
|
c[n][r],
|
|
2577
2562
|
a,
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2563
|
+
b,
|
|
2564
|
+
S,
|
|
2565
|
+
w
|
|
2581
2566
|
) === !1)
|
|
2582
2567
|
return !1;
|
|
2583
2568
|
a++;
|
|
2584
2569
|
}
|
|
2585
|
-
|
|
2570
|
+
M === "MultiLineString" && S++, M === "Polygon" && w++;
|
|
2586
2571
|
}
|
|
2587
|
-
|
|
2572
|
+
M === "Polygon" && S++;
|
|
2588
2573
|
break;
|
|
2589
2574
|
case "MultiPolygon":
|
|
2590
2575
|
for (n = 0; n < c.length; n++) {
|
|
2591
|
-
for (
|
|
2576
|
+
for (w = 0, r = 0; r < c[n].length; r++) {
|
|
2592
2577
|
for (o = 0; o < c[n][r].length - d; o++) {
|
|
2593
2578
|
if (e(
|
|
2594
2579
|
c[n][r][o],
|
|
2595
2580
|
a,
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2581
|
+
b,
|
|
2582
|
+
S,
|
|
2583
|
+
w
|
|
2599
2584
|
) === !1)
|
|
2600
2585
|
return !1;
|
|
2601
2586
|
a++;
|
|
2602
2587
|
}
|
|
2603
|
-
|
|
2588
|
+
w++;
|
|
2604
2589
|
}
|
|
2605
|
-
|
|
2590
|
+
S++;
|
|
2606
2591
|
}
|
|
2607
2592
|
break;
|
|
2608
2593
|
case "GeometryCollection":
|
|
2609
2594
|
for (n = 0; n < u.geometries.length; n++)
|
|
2610
|
-
if (
|
|
2595
|
+
if (Wi(u.geometries[n], e) === !1)
|
|
2611
2596
|
return !1;
|
|
2612
2597
|
break;
|
|
2613
2598
|
default:
|
|
@@ -2617,10 +2602,10 @@ function Bi(i, e, t) {
|
|
|
2617
2602
|
}
|
|
2618
2603
|
}
|
|
2619
2604
|
}
|
|
2620
|
-
function
|
|
2621
|
-
var t, n, r, o, u, s, c, l, d, a, f = 0, h = i.type === "FeatureCollection",
|
|
2622
|
-
for (t = 0; t <
|
|
2623
|
-
for (s = h ? i.features[t].geometry :
|
|
2605
|
+
function Bt(i, e) {
|
|
2606
|
+
var t, n, r, o, u, s, c, l, d, a, f = 0, h = i.type === "FeatureCollection", v = i.type === "Feature", m = h ? i.features.length : 1;
|
|
2607
|
+
for (t = 0; t < m; t++) {
|
|
2608
|
+
for (s = h ? i.features[t].geometry : v ? i.geometry : i, l = h ? i.features[t].properties : v ? i.properties : {}, d = h ? i.features[t].bbox : v ? i.bbox : void 0, a = h ? i.features[t].id : v ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, u = c ? s.geometries.length : 1, r = 0; r < u; r++) {
|
|
2624
2609
|
if (o = c ? s.geometries[r] : s, o === null) {
|
|
2625
2610
|
if (e(
|
|
2626
2611
|
null,
|
|
@@ -2668,8 +2653,8 @@ function Ut(i, e) {
|
|
|
2668
2653
|
f++;
|
|
2669
2654
|
}
|
|
2670
2655
|
}
|
|
2671
|
-
function
|
|
2672
|
-
|
|
2656
|
+
function Er(i, e) {
|
|
2657
|
+
Bt(i, function(t, n, r, o, u) {
|
|
2673
2658
|
var s = t === null ? null : t.type;
|
|
2674
2659
|
switch (s) {
|
|
2675
2660
|
case null:
|
|
@@ -2677,7 +2662,7 @@ function xr(i, e) {
|
|
|
2677
2662
|
case "LineString":
|
|
2678
2663
|
case "Polygon":
|
|
2679
2664
|
return e(
|
|
2680
|
-
|
|
2665
|
+
Ze(t, r, { bbox: o, id: u }),
|
|
2681
2666
|
n,
|
|
2682
2667
|
0
|
|
2683
2668
|
) === !1 ? !1 : void 0;
|
|
@@ -2699,28 +2684,28 @@ function xr(i, e) {
|
|
|
2699
2684
|
type: c,
|
|
2700
2685
|
coordinates: d
|
|
2701
2686
|
};
|
|
2702
|
-
if (e(
|
|
2687
|
+
if (e(Ze(a, r), n, l) === !1)
|
|
2703
2688
|
return !1;
|
|
2704
2689
|
}
|
|
2705
2690
|
});
|
|
2706
2691
|
}
|
|
2707
|
-
function
|
|
2692
|
+
function Lr(i, e = {}) {
|
|
2708
2693
|
if (i.bbox != null && e.recompute !== !0)
|
|
2709
2694
|
return i.bbox;
|
|
2710
2695
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
2711
|
-
return
|
|
2696
|
+
return Wi(i, (n) => {
|
|
2712
2697
|
t[0] > n[0] && (t[0] = n[0]), t[1] > n[1] && (t[1] = n[1]), t[2] < n[0] && (t[2] = n[0]), t[3] < n[1] && (t[3] = n[1]);
|
|
2713
2698
|
}), t;
|
|
2714
2699
|
}
|
|
2715
|
-
var
|
|
2716
|
-
function
|
|
2700
|
+
var Pt = Lr;
|
|
2701
|
+
function Sr(i) {
|
|
2717
2702
|
if (!i)
|
|
2718
2703
|
throw new Error("geojson is required");
|
|
2719
2704
|
switch (i.type) {
|
|
2720
2705
|
case "Feature":
|
|
2721
|
-
return
|
|
2706
|
+
return zi(i);
|
|
2722
2707
|
case "FeatureCollection":
|
|
2723
|
-
return
|
|
2708
|
+
return xr(i);
|
|
2724
2709
|
case "Point":
|
|
2725
2710
|
case "LineString":
|
|
2726
2711
|
case "Polygon":
|
|
@@ -2728,12 +2713,12 @@ function Cr(i) {
|
|
|
2728
2713
|
case "MultiLineString":
|
|
2729
2714
|
case "MultiPolygon":
|
|
2730
2715
|
case "GeometryCollection":
|
|
2731
|
-
return
|
|
2716
|
+
return Dt(i);
|
|
2732
2717
|
default:
|
|
2733
2718
|
throw new Error("unknown GeoJSON type");
|
|
2734
2719
|
}
|
|
2735
2720
|
}
|
|
2736
|
-
function
|
|
2721
|
+
function zi(i) {
|
|
2737
2722
|
const e = { type: "Feature" };
|
|
2738
2723
|
return Object.keys(i).forEach((t) => {
|
|
2739
2724
|
switch (t) {
|
|
@@ -2744,16 +2729,16 @@ function Di(i) {
|
|
|
2744
2729
|
default:
|
|
2745
2730
|
e[t] = i[t];
|
|
2746
2731
|
}
|
|
2747
|
-
}), e.properties =
|
|
2732
|
+
}), e.properties = Bi(i.properties), i.geometry == null ? e.geometry = null : e.geometry = Dt(i.geometry), e;
|
|
2748
2733
|
}
|
|
2749
|
-
function
|
|
2734
|
+
function Bi(i) {
|
|
2750
2735
|
const e = {};
|
|
2751
2736
|
return i && Object.keys(i).forEach((t) => {
|
|
2752
2737
|
const n = i[t];
|
|
2753
|
-
typeof n == "object" ? n === null ? e[t] = null : Array.isArray(n) ? e[t] = n.map((r) => r) : e[t] =
|
|
2738
|
+
typeof n == "object" ? n === null ? e[t] = null : Array.isArray(n) ? e[t] = n.map((r) => r) : e[t] = Bi(n) : e[t] = n;
|
|
2754
2739
|
}), e;
|
|
2755
2740
|
}
|
|
2756
|
-
function
|
|
2741
|
+
function xr(i) {
|
|
2757
2742
|
const e = { type: "FeatureCollection" };
|
|
2758
2743
|
return Object.keys(i).forEach((t) => {
|
|
2759
2744
|
switch (t) {
|
|
@@ -2763,17 +2748,17 @@ function kr(i) {
|
|
|
2763
2748
|
default:
|
|
2764
2749
|
e[t] = i[t];
|
|
2765
2750
|
}
|
|
2766
|
-
}), e.features = i.features.map((t) =>
|
|
2751
|
+
}), e.features = i.features.map((t) => zi(t)), e;
|
|
2767
2752
|
}
|
|
2768
|
-
function
|
|
2753
|
+
function Dt(i) {
|
|
2769
2754
|
const e = { type: i.type };
|
|
2770
|
-
return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) =>
|
|
2755
|
+
return i.bbox && (e.bbox = i.bbox), i.type === "GeometryCollection" ? (e.geometries = i.geometries.map((t) => Dt(t)), e) : (e.coordinates = Di(i.coordinates), e);
|
|
2771
2756
|
}
|
|
2772
|
-
function
|
|
2757
|
+
function Di(i) {
|
|
2773
2758
|
const e = i;
|
|
2774
|
-
return typeof e[0] != "object" ? e.slice() : e.map((t) =>
|
|
2759
|
+
return typeof e[0] != "object" ? e.slice() : e.map((t) => Di(t));
|
|
2775
2760
|
}
|
|
2776
|
-
var
|
|
2761
|
+
var Mr = Sr;
|
|
2777
2762
|
/**
|
|
2778
2763
|
* splaytree v3.1.2
|
|
2779
2764
|
* Fast Splay tree for Node and browser
|
|
@@ -2796,7 +2781,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2796
2781
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2797
2782
|
and limitations under the License.
|
|
2798
2783
|
***************************************************************************** */
|
|
2799
|
-
function
|
|
2784
|
+
function Cr(i, e) {
|
|
2800
2785
|
var t = { label: 0, sent: function() {
|
|
2801
2786
|
if (o[0] & 1) throw o[1];
|
|
2802
2787
|
return o[1];
|
|
@@ -2856,7 +2841,7 @@ function Tr(i, e) {
|
|
|
2856
2841
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
2857
2842
|
}
|
|
2858
2843
|
}
|
|
2859
|
-
var
|
|
2844
|
+
var Se = (
|
|
2860
2845
|
/** @class */
|
|
2861
2846
|
/* @__PURE__ */ function() {
|
|
2862
2847
|
function i(e, t) {
|
|
@@ -2865,11 +2850,11 @@ var xe = (
|
|
|
2865
2850
|
return i;
|
|
2866
2851
|
}()
|
|
2867
2852
|
);
|
|
2868
|
-
function
|
|
2853
|
+
function kr(i, e) {
|
|
2869
2854
|
return i > e ? 1 : i < e ? -1 : 0;
|
|
2870
2855
|
}
|
|
2871
|
-
function
|
|
2872
|
-
for (var n = new
|
|
2856
|
+
function be(i, e, t) {
|
|
2857
|
+
for (var n = new Se(null, null), r = n, o = n; ; ) {
|
|
2873
2858
|
var u = t(i, e.key);
|
|
2874
2859
|
if (u < 0) {
|
|
2875
2860
|
if (e.left === null)
|
|
@@ -2894,46 +2879,46 @@ function we(i, e, t) {
|
|
|
2894
2879
|
}
|
|
2895
2880
|
return r.right = e.left, o.left = e.right, e.left = n.right, e.right = n.left, e;
|
|
2896
2881
|
}
|
|
2897
|
-
function
|
|
2898
|
-
var r = new
|
|
2882
|
+
function xt(i, e, t, n) {
|
|
2883
|
+
var r = new Se(i, e);
|
|
2899
2884
|
if (t === null)
|
|
2900
2885
|
return r.left = r.right = null, r;
|
|
2901
|
-
t =
|
|
2886
|
+
t = be(i, t, n);
|
|
2902
2887
|
var o = n(i, t.key);
|
|
2903
2888
|
return o < 0 ? (r.left = t.left, r.right = t, t.left = null) : o >= 0 && (r.right = t.right, r.left = t, t.right = null), r;
|
|
2904
2889
|
}
|
|
2905
|
-
function
|
|
2890
|
+
function fi(i, e, t) {
|
|
2906
2891
|
var n = null, r = null;
|
|
2907
2892
|
if (e) {
|
|
2908
|
-
e =
|
|
2893
|
+
e = be(i, e, t);
|
|
2909
2894
|
var o = t(e.key, i);
|
|
2910
2895
|
o === 0 ? (n = e.left, r = e.right) : o < 0 ? (r = e.right, e.right = null, n = e) : (n = e.left, e.left = null, r = e);
|
|
2911
2896
|
}
|
|
2912
2897
|
return { left: n, right: r };
|
|
2913
2898
|
}
|
|
2914
|
-
function
|
|
2915
|
-
return e === null ? i : (i === null || (e =
|
|
2899
|
+
function Nr(i, e, t) {
|
|
2900
|
+
return e === null ? i : (i === null || (e = be(i.key, e, t), e.left = i), e);
|
|
2916
2901
|
}
|
|
2917
|
-
function
|
|
2902
|
+
function Tt(i, e, t, n, r) {
|
|
2918
2903
|
if (i) {
|
|
2919
2904
|
n("" + e + (t ? "└── " : "├── ") + r(i) + `
|
|
2920
2905
|
`);
|
|
2921
2906
|
var o = e + (t ? " " : "│ ");
|
|
2922
|
-
i.left &&
|
|
2907
|
+
i.left && Tt(i.left, o, !1, n, r), i.right && Tt(i.right, o, !0, n, r);
|
|
2923
2908
|
}
|
|
2924
2909
|
}
|
|
2925
|
-
var
|
|
2910
|
+
var Ut = (
|
|
2926
2911
|
/** @class */
|
|
2927
2912
|
function() {
|
|
2928
2913
|
function i(e) {
|
|
2929
|
-
e === void 0 && (e =
|
|
2914
|
+
e === void 0 && (e = kr), this._root = null, this._size = 0, this._comparator = e;
|
|
2930
2915
|
}
|
|
2931
2916
|
return i.prototype.insert = function(e, t) {
|
|
2932
|
-
return this._size++, this._root =
|
|
2917
|
+
return this._size++, this._root = xt(e, t, this._root, this._comparator);
|
|
2933
2918
|
}, i.prototype.add = function(e, t) {
|
|
2934
|
-
var n = new
|
|
2919
|
+
var n = new Se(e, t);
|
|
2935
2920
|
this._root === null && (n.left = n.right = null, this._size++, this._root = n);
|
|
2936
|
-
var r = this._comparator, o =
|
|
2921
|
+
var r = this._comparator, o = be(e, this._root, r), u = r(e, o.key);
|
|
2937
2922
|
return u === 0 ? this._root = o : (u < 0 ? (n.left = o.left, n.right = o, o.left = null) : u > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
|
|
2938
2923
|
}, i.prototype.remove = function(e) {
|
|
2939
2924
|
this._root = this._remove(e, this._root, this._comparator);
|
|
@@ -2941,15 +2926,15 @@ var Gt = (
|
|
|
2941
2926
|
var r;
|
|
2942
2927
|
if (t === null)
|
|
2943
2928
|
return null;
|
|
2944
|
-
t =
|
|
2929
|
+
t = be(e, t, n);
|
|
2945
2930
|
var o = n(e, t.key);
|
|
2946
|
-
return o === 0 ? (t.left === null ? r = t.right : (r =
|
|
2931
|
+
return o === 0 ? (t.left === null ? r = t.right : (r = be(e, t.left, n), r.right = t.right), this._size--, r) : t;
|
|
2947
2932
|
}, i.prototype.pop = function() {
|
|
2948
2933
|
var e = this._root;
|
|
2949
2934
|
if (e) {
|
|
2950
2935
|
for (; e.left; )
|
|
2951
2936
|
e = e.left;
|
|
2952
|
-
return this._root =
|
|
2937
|
+
return this._root = be(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
|
|
2953
2938
|
}
|
|
2954
2939
|
return null;
|
|
2955
2940
|
}, i.prototype.findStatic = function(e) {
|
|
@@ -2961,7 +2946,7 @@ var Gt = (
|
|
|
2961
2946
|
}
|
|
2962
2947
|
return null;
|
|
2963
2948
|
}, i.prototype.find = function(e) {
|
|
2964
|
-
return this._root && (this._root =
|
|
2949
|
+
return this._root && (this._root = be(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2965
2950
|
}, i.prototype.contains = function(e) {
|
|
2966
2951
|
for (var t = this._root, n = this._comparator; t; ) {
|
|
2967
2952
|
var r = n(e, t.key);
|
|
@@ -3054,15 +3039,15 @@ var Gt = (
|
|
|
3054
3039
|
}, i.prototype.clear = function() {
|
|
3055
3040
|
return this._root = null, this._size = 0, this;
|
|
3056
3041
|
}, i.prototype.toList = function() {
|
|
3057
|
-
return
|
|
3042
|
+
return Tr(this._root);
|
|
3058
3043
|
}, i.prototype.load = function(e, t, n) {
|
|
3059
3044
|
t === void 0 && (t = []), n === void 0 && (n = !1);
|
|
3060
3045
|
var r = e.length, o = this._comparator;
|
|
3061
|
-
if (n &&
|
|
3062
|
-
this._root =
|
|
3046
|
+
if (n && Ot(e, t, 0, r - 1, o), this._root === null)
|
|
3047
|
+
this._root = Rt(e, t, 0, r), this._size = r;
|
|
3063
3048
|
else {
|
|
3064
|
-
var u =
|
|
3065
|
-
r = this._size + r, this._root =
|
|
3049
|
+
var u = Rr(this.toList(), Pr(e, t), o);
|
|
3050
|
+
r = this._size + r, this._root = It({ head: u }, 0, r);
|
|
3066
3051
|
}
|
|
3067
3052
|
return this;
|
|
3068
3053
|
}, i.prototype.isEmpty = function() {
|
|
@@ -3084,17 +3069,17 @@ var Gt = (
|
|
|
3084
3069
|
return String(n.key);
|
|
3085
3070
|
});
|
|
3086
3071
|
var t = [];
|
|
3087
|
-
return
|
|
3072
|
+
return Tt(this._root, "", !0, function(n) {
|
|
3088
3073
|
return t.push(n);
|
|
3089
3074
|
}, e), t.join("");
|
|
3090
3075
|
}, i.prototype.update = function(e, t, n) {
|
|
3091
|
-
var r = this._comparator, o =
|
|
3092
|
-
r(e, t) < 0 ? s =
|
|
3076
|
+
var r = this._comparator, o = fi(e, this._root, r), u = o.left, s = o.right;
|
|
3077
|
+
r(e, t) < 0 ? s = xt(t, n, s, r) : u = xt(t, n, u, r), this._root = Nr(u, s, r);
|
|
3093
3078
|
}, i.prototype.split = function(e) {
|
|
3094
|
-
return
|
|
3079
|
+
return fi(e, this._root, this._comparator);
|
|
3095
3080
|
}, i.prototype[Symbol.iterator] = function() {
|
|
3096
3081
|
var e, t, n;
|
|
3097
|
-
return
|
|
3082
|
+
return Cr(this, function(r) {
|
|
3098
3083
|
switch (r.label) {
|
|
3099
3084
|
case 0:
|
|
3100
3085
|
e = this._root, t = [], n = !1, r.label = 1;
|
|
@@ -3118,38 +3103,38 @@ var Gt = (
|
|
|
3118
3103
|
}, i;
|
|
3119
3104
|
}()
|
|
3120
3105
|
);
|
|
3121
|
-
function
|
|
3106
|
+
function Rt(i, e, t, n) {
|
|
3122
3107
|
var r = n - t;
|
|
3123
3108
|
if (r > 0) {
|
|
3124
|
-
var o = t + Math.floor(r / 2), u = i[o], s = e[o], c = new
|
|
3125
|
-
return c.left =
|
|
3109
|
+
var o = t + Math.floor(r / 2), u = i[o], s = e[o], c = new Se(u, s);
|
|
3110
|
+
return c.left = Rt(i, e, t, o), c.right = Rt(i, e, o + 1, n), c;
|
|
3126
3111
|
}
|
|
3127
3112
|
return null;
|
|
3128
3113
|
}
|
|
3129
|
-
function
|
|
3130
|
-
for (var t = new
|
|
3131
|
-
n = n.next = new
|
|
3114
|
+
function Pr(i, e) {
|
|
3115
|
+
for (var t = new Se(null, null), n = t, r = 0; r < i.length; r++)
|
|
3116
|
+
n = n.next = new Se(i[r], e[r]);
|
|
3132
3117
|
return n.next = null, t.next;
|
|
3133
3118
|
}
|
|
3134
|
-
function
|
|
3135
|
-
for (var e = i, t = [], n = !1, r = new
|
|
3119
|
+
function Tr(i) {
|
|
3120
|
+
for (var e = i, t = [], n = !1, r = new Se(null, null), o = r; !n; )
|
|
3136
3121
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : n = !0;
|
|
3137
3122
|
return o.next = null, r.next;
|
|
3138
3123
|
}
|
|
3139
|
-
function
|
|
3124
|
+
function It(i, e, t) {
|
|
3140
3125
|
var n = t - e;
|
|
3141
3126
|
if (n > 0) {
|
|
3142
|
-
var r = e + Math.floor(n / 2), o =
|
|
3143
|
-
return u.left = o, i.head = i.head.next, u.right =
|
|
3127
|
+
var r = e + Math.floor(n / 2), o = It(i, e, r), u = i.head;
|
|
3128
|
+
return u.left = o, i.head = i.head.next, u.right = It(i, r + 1, t), u;
|
|
3144
3129
|
}
|
|
3145
3130
|
return null;
|
|
3146
3131
|
}
|
|
3147
|
-
function
|
|
3148
|
-
for (var n = new
|
|
3132
|
+
function Rr(i, e, t) {
|
|
3133
|
+
for (var n = new Se(null, null), r = n, o = i, u = e; o !== null && u !== null; )
|
|
3149
3134
|
t(o.key, u.key) < 0 ? (r.next = o, o = o.next) : (r.next = u, u = u.next), r = r.next;
|
|
3150
3135
|
return o !== null ? r.next = o : u !== null && (r.next = u), n.next;
|
|
3151
3136
|
}
|
|
3152
|
-
function
|
|
3137
|
+
function Ot(i, e, t, n, r) {
|
|
3153
3138
|
if (!(t >= n)) {
|
|
3154
3139
|
for (var o = i[t + n >> 1], u = t - 1, s = n + 1; ; ) {
|
|
3155
3140
|
do
|
|
@@ -3163,11 +3148,11 @@ function Wt(i, e, t, n, r) {
|
|
|
3163
3148
|
var c = i[u];
|
|
3164
3149
|
i[u] = i[s], i[s] = c, c = e[u], e[u] = e[s], e[s] = c;
|
|
3165
3150
|
}
|
|
3166
|
-
|
|
3151
|
+
Ot(i, e, t, s, r), Ot(i, e, s + 1, n, r);
|
|
3167
3152
|
}
|
|
3168
3153
|
}
|
|
3169
|
-
const he = 11102230246251565e-32, Y = 134217729,
|
|
3170
|
-
function
|
|
3154
|
+
const he = 11102230246251565e-32, Y = 134217729, Ir = (3 + 8 * he) * he;
|
|
3155
|
+
function Mt(i, e, t, n, r) {
|
|
3171
3156
|
let o, u, s, c, l = e[0], d = n[0], a = 0, f = 0;
|
|
3172
3157
|
d > l == d > -l ? (o = l, l = e[++a]) : (o = d, d = n[++f]);
|
|
3173
3158
|
let h = 0;
|
|
@@ -3180,34 +3165,34 @@ function kt(i, e, t, n, r) {
|
|
|
3180
3165
|
u = o + d, c = u - o, s = o - (u - c) + (d - c), d = n[++f], o = u, s !== 0 && (r[h++] = s);
|
|
3181
3166
|
return (o !== 0 || h === 0) && (r[h++] = o), h;
|
|
3182
3167
|
}
|
|
3183
|
-
function
|
|
3168
|
+
function Or(i, e) {
|
|
3184
3169
|
let t = e[0];
|
|
3185
3170
|
for (let n = 1; n < i; n++) t += e[n];
|
|
3186
3171
|
return t;
|
|
3187
3172
|
}
|
|
3188
|
-
function
|
|
3173
|
+
function Ye(i) {
|
|
3189
3174
|
return new Float64Array(i);
|
|
3190
3175
|
}
|
|
3191
|
-
const
|
|
3192
|
-
function
|
|
3193
|
-
let s, c, l, d, a, f, h,
|
|
3176
|
+
const Ar = (3 + 16 * he) * he, Wr = (2 + 12 * he) * he, zr = (9 + 64 * he) * he * he, Oe = Ye(4), di = Ye(8), hi = Ye(12), gi = Ye(16), K = Ye(4);
|
|
3177
|
+
function Br(i, e, t, n, r, o, u) {
|
|
3178
|
+
let s, c, l, d, a, f, h, v, m, y, b, E, S, w, M, L, x, _;
|
|
3194
3179
|
const k = i - r, I = t - r, B = e - o, F = n - o;
|
|
3195
|
-
|
|
3196
|
-
let O =
|
|
3197
|
-
if (O >=
|
|
3198
|
-
|
|
3199
|
-
const G =
|
|
3200
|
-
|
|
3201
|
-
const
|
|
3202
|
-
|
|
3203
|
-
const
|
|
3204
|
-
return
|
|
3205
|
-
}
|
|
3206
|
-
function
|
|
3180
|
+
w = k * F, f = Y * k, h = f - (f - k), v = k - h, f = Y * F, m = f - (f - F), y = F - m, M = v * y - (w - h * m - v * m - h * y), L = B * I, f = Y * B, h = f - (f - B), v = B - h, f = Y * I, m = f - (f - I), y = I - m, x = v * y - (L - h * m - v * m - h * y), b = M - x, a = M - b, Oe[0] = M - (b + a) + (a - x), E = w + b, a = E - w, S = w - (E - a) + (b - a), b = S - L, a = S - b, Oe[1] = S - (b + a) + (a - L), _ = E + b, a = _ - E, Oe[2] = E - (_ - a) + (b - a), Oe[3] = _;
|
|
3181
|
+
let O = Or(4, Oe), C = Wr * u;
|
|
3182
|
+
if (O >= C || -O >= C || (a = i - k, s = i - (k + a) + (a - r), a = t - I, l = t - (I + a) + (a - r), a = e - B, c = e - (B + a) + (a - o), a = n - F, d = n - (F + a) + (a - o), s === 0 && c === 0 && l === 0 && d === 0) || (C = zr * u + Ir * Math.abs(O), O += k * d + F * s - (B * l + I * c), O >= C || -O >= C)) return O;
|
|
3183
|
+
w = s * F, f = Y * s, h = f - (f - s), v = s - h, f = Y * F, m = f - (f - F), y = F - m, M = v * y - (w - h * m - v * m - h * y), L = c * I, f = Y * c, h = f - (f - c), v = c - h, f = Y * I, m = f - (f - I), y = I - m, x = v * y - (L - h * m - v * m - h * y), b = M - x, a = M - b, K[0] = M - (b + a) + (a - x), E = w + b, a = E - w, S = w - (E - a) + (b - a), b = S - L, a = S - b, K[1] = S - (b + a) + (a - L), _ = E + b, a = _ - E, K[2] = E - (_ - a) + (b - a), K[3] = _;
|
|
3184
|
+
const G = Mt(4, Oe, 4, K, di);
|
|
3185
|
+
w = k * d, f = Y * k, h = f - (f - k), v = k - h, f = Y * d, m = f - (f - d), y = d - m, M = v * y - (w - h * m - v * m - h * y), L = B * l, f = Y * B, h = f - (f - B), v = B - h, f = Y * l, m = f - (f - l), y = l - m, x = v * y - (L - h * m - v * m - h * y), b = M - x, a = M - b, K[0] = M - (b + a) + (a - x), E = w + b, a = E - w, S = w - (E - a) + (b - a), b = S - L, a = S - b, K[1] = S - (b + a) + (a - L), _ = E + b, a = _ - E, K[2] = E - (_ - a) + (b - a), K[3] = _;
|
|
3186
|
+
const ee = Mt(G, di, 4, K, hi);
|
|
3187
|
+
w = s * d, f = Y * s, h = f - (f - s), v = s - h, f = Y * d, m = f - (f - d), y = d - m, M = v * y - (w - h * m - v * m - h * y), L = c * l, f = Y * c, h = f - (f - c), v = c - h, f = Y * l, m = f - (f - l), y = l - m, x = v * y - (L - h * m - v * m - h * y), b = M - x, a = M - b, K[0] = M - (b + a) + (a - x), E = w + b, a = E - w, S = w - (E - a) + (b - a), b = S - L, a = S - b, K[1] = S - (b + a) + (a - L), _ = E + b, a = _ - E, K[2] = E - (_ - a) + (b - a), K[3] = _;
|
|
3188
|
+
const se = Mt(ee, hi, 4, K, gi);
|
|
3189
|
+
return gi[se - 1];
|
|
3190
|
+
}
|
|
3191
|
+
function Dr(i, e, t, n, r, o) {
|
|
3207
3192
|
const u = (e - o) * (t - r), s = (i - r) * (n - o), c = u - s, l = Math.abs(u + s);
|
|
3208
|
-
return Math.abs(c) >=
|
|
3193
|
+
return Math.abs(c) >= Ar * l ? c : -Br(i, e, t, n, r, o, l);
|
|
3209
3194
|
}
|
|
3210
|
-
const
|
|
3195
|
+
const Ue = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, At = (i, e) => {
|
|
3211
3196
|
if (e.ur.x < i.ll.x || i.ur.x < e.ll.x || e.ur.y < i.ll.y || i.ur.y < e.ll.y) return null;
|
|
3212
3197
|
const t = i.ll.x < e.ll.x ? e.ll.x : i.ll.x, n = i.ur.x < e.ur.x ? i.ur.x : e.ur.x, r = i.ll.y < e.ll.y ? e.ll.y : i.ll.y, o = i.ur.y < e.ur.y ? i.ur.y : e.ur.y;
|
|
3213
3198
|
return {
|
|
@@ -3221,20 +3206,20 @@ const je = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
|
|
|
3221
3206
|
}
|
|
3222
3207
|
};
|
|
3223
3208
|
};
|
|
3224
|
-
let
|
|
3225
|
-
|
|
3226
|
-
const
|
|
3227
|
-
if (-
|
|
3209
|
+
let we = Number.EPSILON;
|
|
3210
|
+
we === void 0 && (we = Math.pow(2, -52));
|
|
3211
|
+
const Ur = we * we, mi = (i, e) => {
|
|
3212
|
+
if (-we < i && i < we && -we < e && e < we)
|
|
3228
3213
|
return 0;
|
|
3229
3214
|
const t = i - e;
|
|
3230
|
-
return t * t <
|
|
3215
|
+
return t * t < Ur * i * e ? 0 : i < e ? -1 : 1;
|
|
3231
3216
|
};
|
|
3232
|
-
class
|
|
3217
|
+
class Fr {
|
|
3233
3218
|
constructor() {
|
|
3234
3219
|
this.reset();
|
|
3235
3220
|
}
|
|
3236
3221
|
reset() {
|
|
3237
|
-
this.xRounder = new
|
|
3222
|
+
this.xRounder = new yi(), this.yRounder = new yi();
|
|
3238
3223
|
}
|
|
3239
3224
|
round(e, t) {
|
|
3240
3225
|
return {
|
|
@@ -3243,9 +3228,9 @@ class qr {
|
|
|
3243
3228
|
};
|
|
3244
3229
|
}
|
|
3245
3230
|
}
|
|
3246
|
-
class
|
|
3231
|
+
class yi {
|
|
3247
3232
|
constructor() {
|
|
3248
|
-
this.tree = new
|
|
3233
|
+
this.tree = new Ut(), this.round(0);
|
|
3249
3234
|
}
|
|
3250
3235
|
// Note: this can rounds input values backwards or forwards.
|
|
3251
3236
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3256,16 +3241,16 @@ class vi {
|
|
|
3256
3241
|
// angle for t-intersections).
|
|
3257
3242
|
round(e) {
|
|
3258
3243
|
const t = this.tree.add(e), n = this.tree.prev(t);
|
|
3259
|
-
if (n !== null &&
|
|
3244
|
+
if (n !== null && mi(t.key, n.key) === 0)
|
|
3260
3245
|
return this.tree.remove(e), n.key;
|
|
3261
3246
|
const r = this.tree.next(t);
|
|
3262
|
-
return r !== null &&
|
|
3247
|
+
return r !== null && mi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3263
3248
|
}
|
|
3264
3249
|
}
|
|
3265
|
-
const
|
|
3266
|
-
const n =
|
|
3250
|
+
const He = new Fr(), ut = (i, e) => i.x * e.y - i.y * e.x, Ui = (i, e) => i.x * e.x + i.y * e.y, pi = (i, e, t) => {
|
|
3251
|
+
const n = Dr(i.x, i.y, e.x, e.y, t.x, t.y);
|
|
3267
3252
|
return n > 0 ? -1 : n < 0 ? 1 : 0;
|
|
3268
|
-
},
|
|
3253
|
+
}, at = (i) => Math.sqrt(Ui(i, i)), Gr = (i, e, t) => {
|
|
3269
3254
|
const n = {
|
|
3270
3255
|
x: e.x - i.x,
|
|
3271
3256
|
y: e.y - i.y
|
|
@@ -3273,8 +3258,8 @@ const Xe = new qr(), ct = (i, e) => i.x * e.y - i.y * e.x, Gi = (i, e) => i.x *
|
|
|
3273
3258
|
x: t.x - i.x,
|
|
3274
3259
|
y: t.y - i.y
|
|
3275
3260
|
};
|
|
3276
|
-
return
|
|
3277
|
-
},
|
|
3261
|
+
return ut(r, n) / at(r) / at(n);
|
|
3262
|
+
}, jr = (i, e, t) => {
|
|
3278
3263
|
const n = {
|
|
3279
3264
|
x: e.x - i.x,
|
|
3280
3265
|
y: e.y - i.y
|
|
@@ -3282,34 +3267,34 @@ const Xe = new qr(), ct = (i, e) => i.x * e.y - i.y * e.x, Gi = (i, e) => i.x *
|
|
|
3282
3267
|
x: t.x - i.x,
|
|
3283
3268
|
y: t.y - i.y
|
|
3284
3269
|
};
|
|
3285
|
-
return
|
|
3286
|
-
},
|
|
3270
|
+
return Ui(r, n) / at(r) / at(n);
|
|
3271
|
+
}, bi = (i, e, t) => e.y === 0 ? null : {
|
|
3287
3272
|
x: i.x + e.x / e.y * (t - i.y),
|
|
3288
3273
|
y: t
|
|
3289
|
-
},
|
|
3274
|
+
}, vi = (i, e, t) => e.x === 0 ? null : {
|
|
3290
3275
|
x: t,
|
|
3291
3276
|
y: i.y + e.y / e.x * (t - i.x)
|
|
3292
|
-
},
|
|
3293
|
-
if (e.x === 0) return
|
|
3294
|
-
if (n.x === 0) return
|
|
3295
|
-
if (e.y === 0) return
|
|
3296
|
-
if (n.y === 0) return
|
|
3297
|
-
const r =
|
|
3277
|
+
}, qr = (i, e, t, n) => {
|
|
3278
|
+
if (e.x === 0) return vi(t, n, i.x);
|
|
3279
|
+
if (n.x === 0) return vi(i, e, t.x);
|
|
3280
|
+
if (e.y === 0) return bi(t, n, i.y);
|
|
3281
|
+
if (n.y === 0) return bi(i, e, t.y);
|
|
3282
|
+
const r = ut(e, n);
|
|
3298
3283
|
if (r == 0) return null;
|
|
3299
3284
|
const o = {
|
|
3300
3285
|
x: t.x - i.x,
|
|
3301
3286
|
y: t.y - i.y
|
|
3302
|
-
}, u =
|
|
3287
|
+
}, u = ut(o, e) / r, s = ut(o, n) / r, c = i.x + s * e.x, l = t.x + u * n.x, d = i.y + s * e.y, a = t.y + u * n.y, f = (c + l) / 2, h = (d + a) / 2;
|
|
3303
3288
|
return {
|
|
3304
3289
|
x: f,
|
|
3305
3290
|
y: h
|
|
3306
3291
|
};
|
|
3307
3292
|
};
|
|
3308
|
-
class
|
|
3293
|
+
class re {
|
|
3309
3294
|
// for ordering sweep events in the sweep event queue
|
|
3310
3295
|
static compare(e, t) {
|
|
3311
|
-
const n =
|
|
3312
|
-
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3296
|
+
const n = re.comparePoints(e.point, t.point);
|
|
3297
|
+
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : _e.compare(e.segment, t.segment));
|
|
3313
3298
|
}
|
|
3314
3299
|
// for ordering points in sweep line order
|
|
3315
3300
|
static comparePoints(e, t) {
|
|
@@ -3364,8 +3349,8 @@ class oe {
|
|
|
3364
3349
|
const t = /* @__PURE__ */ new Map(), n = (r) => {
|
|
3365
3350
|
const o = r.otherSE;
|
|
3366
3351
|
t.set(r, {
|
|
3367
|
-
sine:
|
|
3368
|
-
cosine:
|
|
3352
|
+
sine: Gr(this.point, e.point, o.point),
|
|
3353
|
+
cosine: jr(this.point, e.point, o.point)
|
|
3369
3354
|
});
|
|
3370
3355
|
};
|
|
3371
3356
|
return (r, o) => {
|
|
@@ -3381,8 +3366,8 @@ class oe {
|
|
|
3381
3366
|
};
|
|
3382
3367
|
}
|
|
3383
3368
|
}
|
|
3384
|
-
let
|
|
3385
|
-
class
|
|
3369
|
+
let Zr = 0;
|
|
3370
|
+
class _e {
|
|
3386
3371
|
/* This compare() function is for ordering segments in the sweep
|
|
3387
3372
|
* line tree, and does so according to the following criteria:
|
|
3388
3373
|
*
|
|
@@ -3430,27 +3415,27 @@ class Ee {
|
|
|
3430
3415
|
if (a > 0) return -1;
|
|
3431
3416
|
}
|
|
3432
3417
|
if (o !== u) {
|
|
3433
|
-
const a = l - s, f = o - n, h = d - c,
|
|
3434
|
-
if (a > f && h <
|
|
3435
|
-
if (a < f && h >
|
|
3418
|
+
const a = l - s, f = o - n, h = d - c, v = u - r;
|
|
3419
|
+
if (a > f && h < v) return 1;
|
|
3420
|
+
if (a < f && h > v) return -1;
|
|
3436
3421
|
}
|
|
3437
3422
|
return o > u ? 1 : o < u || l < d ? -1 : l > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
3438
3423
|
}
|
|
3439
3424
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3440
3425
|
* and possibly will be later modified */
|
|
3441
3426
|
constructor(e, t, n, r) {
|
|
3442
|
-
this.id = ++
|
|
3427
|
+
this.id = ++Zr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
3443
3428
|
}
|
|
3444
3429
|
static fromRing(e, t, n) {
|
|
3445
3430
|
let r, o, u;
|
|
3446
|
-
const s =
|
|
3431
|
+
const s = re.comparePoints(e, t);
|
|
3447
3432
|
if (s < 0)
|
|
3448
3433
|
r = e, o = t, u = 1;
|
|
3449
3434
|
else if (s > 0)
|
|
3450
3435
|
r = t, o = e, u = -1;
|
|
3451
3436
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3452
|
-
const c = new
|
|
3453
|
-
return new
|
|
3437
|
+
const c = new re(r, !0), l = new re(o, !1);
|
|
3438
|
+
return new _e(c, l, [n], [u]);
|
|
3454
3439
|
}
|
|
3455
3440
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3456
3441
|
replaceRightSE(e) {
|
|
@@ -3518,9 +3503,9 @@ class Ee {
|
|
|
3518
3503
|
* Else, return null.
|
|
3519
3504
|
*/
|
|
3520
3505
|
getIntersection(e) {
|
|
3521
|
-
const t = this.bbox(), n = e.bbox(), r =
|
|
3506
|
+
const t = this.bbox(), n = e.bbox(), r = At(t, n);
|
|
3522
3507
|
if (r === null) return null;
|
|
3523
|
-
const o = this.leftSE.point, u = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, l =
|
|
3508
|
+
const o = this.leftSE.point, u = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, l = Ue(t, s) && this.comparePoint(s) === 0, d = Ue(n, o) && e.comparePoint(o) === 0, a = Ue(t, c) && this.comparePoint(c) === 0, f = Ue(n, u) && e.comparePoint(u) === 0;
|
|
3524
3509
|
if (d && l)
|
|
3525
3510
|
return f && !a ? u : !f && a ? c : null;
|
|
3526
3511
|
if (d)
|
|
@@ -3530,8 +3515,8 @@ class Ee {
|
|
|
3530
3515
|
if (f && a) return null;
|
|
3531
3516
|
if (f) return u;
|
|
3532
3517
|
if (a) return c;
|
|
3533
|
-
const h =
|
|
3534
|
-
return h === null || !
|
|
3518
|
+
const h = qr(o, this.vector(), s, e.vector());
|
|
3519
|
+
return h === null || !Ue(r, h) ? null : He.round(h.x, h.y);
|
|
3535
3520
|
}
|
|
3536
3521
|
/**
|
|
3537
3522
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3546,10 +3531,10 @@ class Ee {
|
|
|
3546
3531
|
* Warning: input array of points is modified
|
|
3547
3532
|
*/
|
|
3548
3533
|
split(e) {
|
|
3549
|
-
const t = [], n = e.events !== void 0, r = new
|
|
3534
|
+
const t = [], n = e.events !== void 0, r = new re(e, !0), o = new re(e, !1), u = this.rightSE;
|
|
3550
3535
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3551
|
-
const s = new
|
|
3552
|
-
return
|
|
3536
|
+
const s = new _e(r, u, this.rings.slice(), this.windings.slice());
|
|
3537
|
+
return re.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), re.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (r.checkForConsuming(), o.checkForConsuming()), t;
|
|
3553
3538
|
}
|
|
3554
3539
|
/* Swap which event is left and right */
|
|
3555
3540
|
swapEvents() {
|
|
@@ -3564,7 +3549,7 @@ class Ee {
|
|
|
3564
3549
|
let t = this, n = e;
|
|
3565
3550
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3566
3551
|
for (; n.consumedBy; ) n = n.consumedBy;
|
|
3567
|
-
const r =
|
|
3552
|
+
const r = _e.compare(t, n);
|
|
3568
3553
|
if (r !== 0) {
|
|
3569
3554
|
if (r > 0) {
|
|
3570
3555
|
const o = t;
|
|
@@ -3634,7 +3619,7 @@ class Ee {
|
|
|
3634
3619
|
if (this.consumedBy) return !1;
|
|
3635
3620
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3636
3621
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3637
|
-
switch (
|
|
3622
|
+
switch (ue.type) {
|
|
3638
3623
|
case "union": {
|
|
3639
3624
|
const n = e.length === 0, r = t.length === 0;
|
|
3640
3625
|
this._isInResult = n !== r;
|
|
@@ -3642,7 +3627,7 @@ class Ee {
|
|
|
3642
3627
|
}
|
|
3643
3628
|
case "intersection": {
|
|
3644
3629
|
let n, r;
|
|
3645
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
3630
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === ue.numMultiPolys && n < r;
|
|
3646
3631
|
break;
|
|
3647
3632
|
}
|
|
3648
3633
|
case "xor": {
|
|
@@ -3656,18 +3641,18 @@ class Ee {
|
|
|
3656
3641
|
break;
|
|
3657
3642
|
}
|
|
3658
3643
|
default:
|
|
3659
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3644
|
+
throw new Error(`Unrecognized operation type found ${ue.type}`);
|
|
3660
3645
|
}
|
|
3661
3646
|
return this._isInResult;
|
|
3662
3647
|
}
|
|
3663
3648
|
}
|
|
3664
|
-
class
|
|
3649
|
+
class wi {
|
|
3665
3650
|
constructor(e, t, n) {
|
|
3666
3651
|
if (!Array.isArray(e) || e.length === 0)
|
|
3667
3652
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3668
3653
|
if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3669
3654
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3670
|
-
const r =
|
|
3655
|
+
const r = He.round(e[0][0], e[0][1]);
|
|
3671
3656
|
this.bbox = {
|
|
3672
3657
|
ll: {
|
|
3673
3658
|
x: r.x,
|
|
@@ -3682,10 +3667,10 @@ class Ei {
|
|
|
3682
3667
|
for (let u = 1, s = e.length; u < s; u++) {
|
|
3683
3668
|
if (typeof e[u][0] != "number" || typeof e[u][1] != "number")
|
|
3684
3669
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3685
|
-
let c =
|
|
3686
|
-
c.x === o.x && c.y === o.y || (this.segments.push(
|
|
3670
|
+
let c = He.round(e[u][0], e[u][1]);
|
|
3671
|
+
c.x === o.x && c.y === o.y || (this.segments.push(_e.fromRing(o, c, this)), c.x < this.bbox.ll.x && (this.bbox.ll.x = c.x), c.y < this.bbox.ll.y && (this.bbox.ll.y = c.y), c.x > this.bbox.ur.x && (this.bbox.ur.x = c.x), c.y > this.bbox.ur.y && (this.bbox.ur.y = c.y), o = c);
|
|
3687
3672
|
}
|
|
3688
|
-
(r.x !== o.x || r.y !== o.y) && this.segments.push(
|
|
3673
|
+
(r.x !== o.x || r.y !== o.y) && this.segments.push(_e.fromRing(o, r, this));
|
|
3689
3674
|
}
|
|
3690
3675
|
getSweepEvents() {
|
|
3691
3676
|
const e = [];
|
|
@@ -3696,11 +3681,11 @@ class Ei {
|
|
|
3696
3681
|
return e;
|
|
3697
3682
|
}
|
|
3698
3683
|
}
|
|
3699
|
-
class
|
|
3684
|
+
class Qr {
|
|
3700
3685
|
constructor(e, t) {
|
|
3701
3686
|
if (!Array.isArray(e))
|
|
3702
3687
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3703
|
-
this.exteriorRing = new
|
|
3688
|
+
this.exteriorRing = new wi(e[0], this, !0), this.bbox = {
|
|
3704
3689
|
ll: {
|
|
3705
3690
|
x: this.exteriorRing.bbox.ll.x,
|
|
3706
3691
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3711,7 +3696,7 @@ class Yr {
|
|
|
3711
3696
|
}
|
|
3712
3697
|
}, this.interiorRings = [];
|
|
3713
3698
|
for (let n = 1, r = e.length; n < r; n++) {
|
|
3714
|
-
const o = new
|
|
3699
|
+
const o = new wi(e[n], this, !1);
|
|
3715
3700
|
o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.interiorRings.push(o);
|
|
3716
3701
|
}
|
|
3717
3702
|
this.multiPoly = t;
|
|
@@ -3726,7 +3711,7 @@ class Yr {
|
|
|
3726
3711
|
return e;
|
|
3727
3712
|
}
|
|
3728
3713
|
}
|
|
3729
|
-
class
|
|
3714
|
+
class _i {
|
|
3730
3715
|
constructor(e, t) {
|
|
3731
3716
|
if (!Array.isArray(e))
|
|
3732
3717
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3745,7 +3730,7 @@ class Li {
|
|
|
3745
3730
|
}
|
|
3746
3731
|
};
|
|
3747
3732
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3748
|
-
const o = new
|
|
3733
|
+
const o = new Qr(e[n], this);
|
|
3749
3734
|
o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
|
|
3750
3735
|
}
|
|
3751
3736
|
this.isSubject = t;
|
|
@@ -3760,7 +3745,7 @@ class Li {
|
|
|
3760
3745
|
return e;
|
|
3761
3746
|
}
|
|
3762
3747
|
}
|
|
3763
|
-
class
|
|
3748
|
+
class ct {
|
|
3764
3749
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3765
3750
|
* of closed rings from all the segments marked to be part of the result */
|
|
3766
3751
|
static factory(e) {
|
|
@@ -3774,33 +3759,33 @@ class dt {
|
|
|
3774
3759
|
for (; ; ) {
|
|
3775
3760
|
const f = s.getAvailableLinkedEvents();
|
|
3776
3761
|
if (f.length === 0) {
|
|
3777
|
-
const
|
|
3778
|
-
throw new Error(`Unable to complete output ring starting at [${
|
|
3762
|
+
const m = l[0].point, y = l[l.length - 1].point;
|
|
3763
|
+
throw new Error(`Unable to complete output ring starting at [${m.x}, ${m.y}]. Last matching segment found ends at [${y.x}, ${y.y}].`);
|
|
3779
3764
|
}
|
|
3780
3765
|
if (f.length === 1) {
|
|
3781
3766
|
c = f[0].otherSE;
|
|
3782
3767
|
break;
|
|
3783
3768
|
}
|
|
3784
3769
|
let h = null;
|
|
3785
|
-
for (let
|
|
3786
|
-
if (a[
|
|
3787
|
-
h =
|
|
3770
|
+
for (let m = 0, y = a.length; m < y; m++)
|
|
3771
|
+
if (a[m].point === s.point) {
|
|
3772
|
+
h = m;
|
|
3788
3773
|
break;
|
|
3789
3774
|
}
|
|
3790
3775
|
if (h !== null) {
|
|
3791
|
-
const
|
|
3792
|
-
|
|
3776
|
+
const m = a.splice(h)[0], y = l.splice(m.index);
|
|
3777
|
+
y.unshift(y[0].otherSE), t.push(new ct(y.reverse()));
|
|
3793
3778
|
continue;
|
|
3794
3779
|
}
|
|
3795
3780
|
a.push({
|
|
3796
3781
|
index: l.length,
|
|
3797
3782
|
point: s.point
|
|
3798
3783
|
});
|
|
3799
|
-
const
|
|
3800
|
-
c = f.sort(
|
|
3784
|
+
const v = s.getLeftmostComparator(u);
|
|
3785
|
+
c = f.sort(v)[0].otherSE;
|
|
3801
3786
|
break;
|
|
3802
3787
|
}
|
|
3803
|
-
t.push(new
|
|
3788
|
+
t.push(new ct(l));
|
|
3804
3789
|
}
|
|
3805
3790
|
return t;
|
|
3806
3791
|
}
|
|
@@ -3815,11 +3800,11 @@ class dt {
|
|
|
3815
3800
|
const t = [e];
|
|
3816
3801
|
for (let l = 1, d = this.events.length - 1; l < d; l++) {
|
|
3817
3802
|
const a = this.events[l].point, f = this.events[l + 1].point;
|
|
3818
|
-
|
|
3803
|
+
pi(a, e, f) !== 0 && (t.push(a), e = a);
|
|
3819
3804
|
}
|
|
3820
3805
|
if (t.length === 1) return null;
|
|
3821
3806
|
const n = t[0], r = t[1];
|
|
3822
|
-
|
|
3807
|
+
pi(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3823
3808
|
const o = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3824
3809
|
for (let l = u; l != s; l += o) c.push([t[l].x, t[l].y]);
|
|
3825
3810
|
return c;
|
|
@@ -3839,7 +3824,7 @@ class dt {
|
|
|
3839
3824
|
let e = this.events[0];
|
|
3840
3825
|
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3841
3826
|
const u = this.events[r];
|
|
3842
|
-
|
|
3827
|
+
re.compare(e, u) > 0 && (e = u);
|
|
3843
3828
|
}
|
|
3844
3829
|
let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
|
|
3845
3830
|
for (; ; ) {
|
|
@@ -3851,7 +3836,7 @@ class dt {
|
|
|
3851
3836
|
}
|
|
3852
3837
|
}
|
|
3853
3838
|
}
|
|
3854
|
-
class
|
|
3839
|
+
class Ei {
|
|
3855
3840
|
constructor(e) {
|
|
3856
3841
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3857
3842
|
}
|
|
@@ -3868,7 +3853,7 @@ class Si {
|
|
|
3868
3853
|
return e;
|
|
3869
3854
|
}
|
|
3870
3855
|
}
|
|
3871
|
-
class
|
|
3856
|
+
class Hr {
|
|
3872
3857
|
constructor(e) {
|
|
3873
3858
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3874
3859
|
}
|
|
@@ -3885,19 +3870,19 @@ class Xr {
|
|
|
3885
3870
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3886
3871
|
const o = e[n];
|
|
3887
3872
|
if (!o.poly)
|
|
3888
|
-
if (o.isExteriorRing()) t.push(new
|
|
3873
|
+
if (o.isExteriorRing()) t.push(new Ei(o));
|
|
3889
3874
|
else {
|
|
3890
3875
|
const u = o.enclosingRing();
|
|
3891
|
-
u.poly || t.push(new
|
|
3876
|
+
u.poly || t.push(new Ei(u)), u.poly.addInterior(o);
|
|
3892
3877
|
}
|
|
3893
3878
|
}
|
|
3894
3879
|
return t;
|
|
3895
3880
|
}
|
|
3896
3881
|
}
|
|
3897
|
-
class
|
|
3882
|
+
class Vr {
|
|
3898
3883
|
constructor(e) {
|
|
3899
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3900
|
-
this.queue = e, this.tree = new
|
|
3884
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _e.compare;
|
|
3885
|
+
this.queue = e, this.tree = new Ut(t), this.segments = [];
|
|
3901
3886
|
}
|
|
3902
3887
|
process(e) {
|
|
3903
3888
|
const t = e.segment, n = [];
|
|
@@ -3916,7 +3901,7 @@ class Kr {
|
|
|
3916
3901
|
const a = s.getIntersection(t);
|
|
3917
3902
|
if (a !== null && (t.isAnEndpoint(a) || (l = a), !s.isAnEndpoint(a))) {
|
|
3918
3903
|
const f = this._splitSafely(s, a);
|
|
3919
|
-
for (let h = 0,
|
|
3904
|
+
for (let h = 0, v = f.length; h < v; h++)
|
|
3920
3905
|
n.push(f[h]);
|
|
3921
3906
|
}
|
|
3922
3907
|
}
|
|
@@ -3925,15 +3910,15 @@ class Kr {
|
|
|
3925
3910
|
const a = c.getIntersection(t);
|
|
3926
3911
|
if (a !== null && (t.isAnEndpoint(a) || (d = a), !c.isAnEndpoint(a))) {
|
|
3927
3912
|
const f = this._splitSafely(c, a);
|
|
3928
|
-
for (let h = 0,
|
|
3913
|
+
for (let h = 0, v = f.length; h < v; h++)
|
|
3929
3914
|
n.push(f[h]);
|
|
3930
3915
|
}
|
|
3931
3916
|
}
|
|
3932
3917
|
if (l !== null || d !== null) {
|
|
3933
3918
|
let a = null;
|
|
3934
|
-
l === null ? a = d : d === null ? a = l : a =
|
|
3919
|
+
l === null ? a = d : d === null ? a = l : a = re.comparePoints(l, d) <= 0 ? l : d, this.queue.remove(t.rightSE), n.push(t.rightSE);
|
|
3935
3920
|
const f = t.split(a);
|
|
3936
|
-
for (let h = 0,
|
|
3921
|
+
for (let h = 0, v = f.length; h < v; h++)
|
|
3937
3922
|
n.push(f[h]);
|
|
3938
3923
|
}
|
|
3939
3924
|
n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev = s);
|
|
@@ -3967,33 +3952,33 @@ class Kr {
|
|
|
3967
3952
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3968
3953
|
}
|
|
3969
3954
|
}
|
|
3970
|
-
const
|
|
3971
|
-
class
|
|
3955
|
+
const Li = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Yr = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3956
|
+
class Xr {
|
|
3972
3957
|
run(e, t, n) {
|
|
3973
|
-
|
|
3974
|
-
const r = [new
|
|
3958
|
+
ue.type = e, He.reset();
|
|
3959
|
+
const r = [new _i(t, !0)];
|
|
3975
3960
|
for (let a = 0, f = n.length; a < f; a++)
|
|
3976
|
-
r.push(new
|
|
3977
|
-
if (
|
|
3961
|
+
r.push(new _i(n[a], !1));
|
|
3962
|
+
if (ue.numMultiPolys = r.length, ue.type === "difference") {
|
|
3978
3963
|
const a = r[0];
|
|
3979
3964
|
let f = 1;
|
|
3980
3965
|
for (; f < r.length; )
|
|
3981
|
-
|
|
3966
|
+
At(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3982
3967
|
}
|
|
3983
|
-
if (
|
|
3968
|
+
if (ue.type === "intersection")
|
|
3984
3969
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3985
3970
|
const h = r[a];
|
|
3986
|
-
for (let
|
|
3987
|
-
if (
|
|
3971
|
+
for (let v = a + 1, m = r.length; v < m; v++)
|
|
3972
|
+
if (At(h.bbox, r[v].bbox) === null) return [];
|
|
3988
3973
|
}
|
|
3989
|
-
const o = new
|
|
3974
|
+
const o = new Ut(re.compare);
|
|
3990
3975
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3991
3976
|
const h = r[a].getSweepEvents();
|
|
3992
|
-
for (let
|
|
3993
|
-
if (o.insert(h[
|
|
3977
|
+
for (let v = 0, m = h.length; v < m; v++)
|
|
3978
|
+
if (o.insert(h[v]), o.size > Li)
|
|
3994
3979
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3995
3980
|
}
|
|
3996
|
-
const u = new
|
|
3981
|
+
const u = new Vr(o);
|
|
3997
3982
|
let s = o.size, c = o.pop();
|
|
3998
3983
|
for (; c; ) {
|
|
3999
3984
|
const a = c.key;
|
|
@@ -4001,78 +3986,78 @@ class $r {
|
|
|
4001
3986
|
const h = a.segment;
|
|
4002
3987
|
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
|
|
4003
3988
|
}
|
|
4004
|
-
if (o.size >
|
|
3989
|
+
if (o.size > Li)
|
|
4005
3990
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
4006
|
-
if (u.segments.length >
|
|
3991
|
+
if (u.segments.length > Yr)
|
|
4007
3992
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
4008
3993
|
const f = u.process(a);
|
|
4009
|
-
for (let h = 0,
|
|
4010
|
-
const
|
|
4011
|
-
|
|
3994
|
+
for (let h = 0, v = f.length; h < v; h++) {
|
|
3995
|
+
const m = f[h];
|
|
3996
|
+
m.consumedBy === void 0 && o.insert(m);
|
|
4012
3997
|
}
|
|
4013
3998
|
s = o.size, c = o.pop();
|
|
4014
3999
|
}
|
|
4015
|
-
|
|
4016
|
-
const l =
|
|
4017
|
-
return new
|
|
4000
|
+
He.reset();
|
|
4001
|
+
const l = ct.factory(u.segments);
|
|
4002
|
+
return new Hr(l).getGeom();
|
|
4018
4003
|
}
|
|
4019
4004
|
}
|
|
4020
|
-
const
|
|
4005
|
+
const ue = new Xr(), Kr = function(i) {
|
|
4021
4006
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4022
4007
|
t[n - 1] = arguments[n];
|
|
4023
|
-
return
|
|
4024
|
-
},
|
|
4008
|
+
return ue.run("union", i, t);
|
|
4009
|
+
}, Jr = function(i) {
|
|
4025
4010
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4026
4011
|
t[n - 1] = arguments[n];
|
|
4027
|
-
return
|
|
4028
|
-
},
|
|
4012
|
+
return ue.run("intersection", i, t);
|
|
4013
|
+
}, $r = function(i) {
|
|
4029
4014
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4030
4015
|
t[n - 1] = arguments[n];
|
|
4031
|
-
return
|
|
4032
|
-
},
|
|
4016
|
+
return ue.run("xor", i, t);
|
|
4017
|
+
}, eo = function(i) {
|
|
4033
4018
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4034
4019
|
t[n - 1] = arguments[n];
|
|
4035
|
-
return
|
|
4020
|
+
return ue.run("difference", i, t);
|
|
4036
4021
|
};
|
|
4037
|
-
var
|
|
4038
|
-
union:
|
|
4039
|
-
intersection:
|
|
4040
|
-
xor:
|
|
4041
|
-
difference:
|
|
4022
|
+
var Fi = {
|
|
4023
|
+
union: Kr,
|
|
4024
|
+
intersection: Jr,
|
|
4025
|
+
xor: $r,
|
|
4026
|
+
difference: eo
|
|
4042
4027
|
};
|
|
4043
|
-
function
|
|
4028
|
+
function to(i, e = {}) {
|
|
4044
4029
|
const t = [];
|
|
4045
|
-
if (
|
|
4030
|
+
if (Bt(i, (r) => {
|
|
4046
4031
|
t.push(r.coordinates);
|
|
4047
4032
|
}), t.length < 2)
|
|
4048
4033
|
throw new Error("Must have at least 2 geometries");
|
|
4049
|
-
const n =
|
|
4050
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4034
|
+
const n = Fi.union(t[0], ...t.slice(1));
|
|
4035
|
+
return n.length === 0 ? null : n.length === 1 ? zt(n[0], e.properties) : Ai(n, e.properties);
|
|
4051
4036
|
}
|
|
4052
|
-
var
|
|
4053
|
-
function
|
|
4037
|
+
var Gi = to;
|
|
4038
|
+
function io(i) {
|
|
4054
4039
|
const e = [];
|
|
4055
|
-
if (
|
|
4040
|
+
if (Bt(i, (r) => {
|
|
4056
4041
|
e.push(r.coordinates);
|
|
4057
4042
|
}), e.length < 2)
|
|
4058
4043
|
throw new Error("Must have at least two features");
|
|
4059
|
-
const t = i.features[0].properties || {}, n =
|
|
4060
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4044
|
+
const t = i.features[0].properties || {}, n = Fi.difference(e[0], ...e.slice(1));
|
|
4045
|
+
return n.length === 0 ? null : n.length === 1 ? zt(n[0], t) : Ai(n, t);
|
|
4061
4046
|
}
|
|
4062
|
-
var
|
|
4063
|
-
function
|
|
4047
|
+
var no = io;
|
|
4048
|
+
function ro(i) {
|
|
4064
4049
|
if (!i)
|
|
4065
4050
|
throw new Error("geojson is required");
|
|
4066
4051
|
var e = [];
|
|
4067
|
-
return
|
|
4052
|
+
return Er(i, function(t) {
|
|
4068
4053
|
e.push(t);
|
|
4069
|
-
}),
|
|
4054
|
+
}), Qe(e);
|
|
4070
4055
|
}
|
|
4071
|
-
var
|
|
4072
|
-
function
|
|
4073
|
-
const t =
|
|
4074
|
-
|
|
4075
|
-
|
|
4056
|
+
var oo = ro;
|
|
4057
|
+
function Si(i, e) {
|
|
4058
|
+
const t = no(
|
|
4059
|
+
Qe([
|
|
4060
|
+
zt([
|
|
4076
4061
|
[
|
|
4077
4062
|
[180, 90],
|
|
4078
4063
|
[-180, 90],
|
|
@@ -4087,10 +4072,10 @@ function Mi(i, e) {
|
|
|
4087
4072
|
if (!t)
|
|
4088
4073
|
return;
|
|
4089
4074
|
t.properties = { isMask: !0 };
|
|
4090
|
-
const n =
|
|
4075
|
+
const n = qe(Pt(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, u = n[2] > 180, s = oo(i);
|
|
4091
4076
|
if (s.features.length > 1 && (o || u))
|
|
4092
4077
|
for (const c of s.features) {
|
|
4093
|
-
const l =
|
|
4078
|
+
const l = qe(Pt(c));
|
|
4094
4079
|
if (u && l[0] < -180 + r)
|
|
4095
4080
|
for (const d of c.geometry.coordinates)
|
|
4096
4081
|
for (const a of d)
|
|
@@ -4101,13 +4086,13 @@ function Mi(i, e) {
|
|
|
4101
4086
|
a[0] -= 360 - r;
|
|
4102
4087
|
}
|
|
4103
4088
|
e(
|
|
4104
|
-
|
|
4105
|
-
s.features.length < 2 ? i :
|
|
4089
|
+
Qe([
|
|
4090
|
+
s.features.length < 2 ? i : Gi(s) ?? i,
|
|
4106
4091
|
t
|
|
4107
4092
|
])
|
|
4108
4093
|
);
|
|
4109
4094
|
}
|
|
4110
|
-
const
|
|
4095
|
+
const xi = (i) => {
|
|
4111
4096
|
var n, r, o;
|
|
4112
4097
|
const e = (n = i == null ? void 0 : i.geometry) == null ? void 0 : n.type, t = (r = i == null ? void 0 : i.properties) != null && r.isMask ? 0 : e === "LineString" || e === "MultiLineString" ? 3 : 2;
|
|
4113
4098
|
return {
|
|
@@ -4119,24 +4104,24 @@ const Ci = (i) => {
|
|
|
4119
4104
|
lineCap: "butt"
|
|
4120
4105
|
};
|
|
4121
4106
|
};
|
|
4122
|
-
function
|
|
4107
|
+
function so(i, e = !0, t = !0, n = {}, r = {}, o = xi, u = !1) {
|
|
4123
4108
|
let s;
|
|
4124
4109
|
const c = [];
|
|
4125
|
-
let l, d;
|
|
4126
|
-
const
|
|
4127
|
-
style: o === !0 ?
|
|
4110
|
+
let l, d, a = u;
|
|
4111
|
+
const f = le.geoJSON(void 0, {
|
|
4112
|
+
style: o === !0 ? xi : o === !1 ? void 0 : o ?? void 0,
|
|
4128
4113
|
interactive: !1
|
|
4129
|
-
}).addTo(i),
|
|
4114
|
+
}).addTo(i), h = (m) => {
|
|
4130
4115
|
s == null || s({
|
|
4131
4116
|
type: "mapClick",
|
|
4132
|
-
coordinates: [
|
|
4117
|
+
coordinates: [m.latlng.lng, m.latlng.lat]
|
|
4133
4118
|
});
|
|
4134
4119
|
};
|
|
4135
|
-
function
|
|
4120
|
+
function v(m, y = !1) {
|
|
4136
4121
|
const b = document.createElement("div");
|
|
4137
|
-
return new
|
|
4122
|
+
return new Kn({ props: { displayIn: "leaflet" }, target: b }), new le.Marker(m, {
|
|
4138
4123
|
interactive: y,
|
|
4139
|
-
icon: new
|
|
4124
|
+
icon: new le.DivIcon({
|
|
4140
4125
|
html: b,
|
|
4141
4126
|
className: "",
|
|
4142
4127
|
iconAnchor: [12, 26],
|
|
@@ -4146,17 +4131,17 @@ function ao(i, e = !0, t = !0, n = {}, r = {}, o = Ci, u = !1) {
|
|
|
4146
4131
|
});
|
|
4147
4132
|
}
|
|
4148
4133
|
return {
|
|
4149
|
-
setEventHandler(
|
|
4150
|
-
|
|
4134
|
+
setEventHandler(m) {
|
|
4135
|
+
m ? (s = m, i.on("click", h)) : (s = void 0, i.off("click", h));
|
|
4151
4136
|
},
|
|
4152
|
-
flyTo(
|
|
4153
|
-
i.flyTo([
|
|
4137
|
+
flyTo(m, y) {
|
|
4138
|
+
i.flyTo([m[1], m[0]], y, { duration: 2, ...n });
|
|
4154
4139
|
},
|
|
4155
|
-
fitBounds(
|
|
4140
|
+
fitBounds(m, y, b) {
|
|
4156
4141
|
i.flyToBounds(
|
|
4157
4142
|
[
|
|
4158
|
-
[
|
|
4159
|
-
[
|
|
4143
|
+
[m[1], m[0]],
|
|
4144
|
+
[m[3], m[2]]
|
|
4160
4145
|
],
|
|
4161
4146
|
{
|
|
4162
4147
|
padding: [y, y],
|
|
@@ -4166,144 +4151,148 @@ function ao(i, e = !0, t = !0, n = {}, r = {}, o = Ci, u = !1) {
|
|
|
4166
4151
|
}
|
|
4167
4152
|
);
|
|
4168
4153
|
},
|
|
4169
|
-
indicateReverse(
|
|
4170
|
-
i.getContainer().style.cursor =
|
|
4154
|
+
indicateReverse(m) {
|
|
4155
|
+
i.getContainer().style.cursor = m ? "crosshair" : "";
|
|
4171
4156
|
},
|
|
4172
|
-
setReverseMarker(
|
|
4157
|
+
setReverseMarker(m) {
|
|
4173
4158
|
var b;
|
|
4174
4159
|
if (!e)
|
|
4175
4160
|
return;
|
|
4176
|
-
const y =
|
|
4177
|
-
d ? y ? d.setLatLng(y) : (d.remove(), d = void 0) : y && (e instanceof Function ? d = e(i) ?? void 0 : (d = (typeof e == "object" ? new
|
|
4161
|
+
const y = m && [m[1], m[0]];
|
|
4162
|
+
d ? y ? d.setLatLng(y) : (d.remove(), d = void 0) : y && (e instanceof Function ? d = e(i) ?? void 0 : (d = (typeof e == "object" ? new le.Marker(y, e) : v(y)).addTo(i), (b = d.getElement()) == null || b.classList.add("marker-reverse")));
|
|
4178
4163
|
},
|
|
4179
|
-
setMarkers(
|
|
4180
|
-
function b(
|
|
4181
|
-
|
|
4164
|
+
setMarkers(m, y) {
|
|
4165
|
+
function b(E) {
|
|
4166
|
+
f.clearLayers(), E && f.addData(E);
|
|
4182
4167
|
}
|
|
4183
|
-
for (const
|
|
4184
|
-
|
|
4168
|
+
for (const E of c)
|
|
4169
|
+
E.remove();
|
|
4185
4170
|
if (c.length = 0, b(), y) {
|
|
4186
|
-
let
|
|
4171
|
+
let E = !1;
|
|
4187
4172
|
if (y.geometry.type === "GeometryCollection") {
|
|
4188
|
-
const
|
|
4189
|
-
(
|
|
4173
|
+
const S = y.geometry.geometries.filter(
|
|
4174
|
+
(w) => w.type === "Polygon" || w.type === "MultiPolygon"
|
|
4190
4175
|
);
|
|
4191
|
-
e: if (
|
|
4192
|
-
const
|
|
4193
|
-
|
|
4176
|
+
e: if (S.length > 0) {
|
|
4177
|
+
const w = Gi(
|
|
4178
|
+
Qe(S.map((M) => Ze(M)))
|
|
4194
4179
|
);
|
|
4195
|
-
if (!
|
|
4180
|
+
if (!w)
|
|
4196
4181
|
break e;
|
|
4197
|
-
|
|
4182
|
+
Si(
|
|
4198
4183
|
{
|
|
4199
4184
|
...y,
|
|
4200
|
-
geometry:
|
|
4185
|
+
geometry: w.geometry
|
|
4201
4186
|
},
|
|
4202
4187
|
b
|
|
4203
|
-
),
|
|
4188
|
+
), E = !0;
|
|
4204
4189
|
} else {
|
|
4205
|
-
const
|
|
4206
|
-
(
|
|
4190
|
+
const w = y.geometry.geometries.filter(
|
|
4191
|
+
(M) => M.type === "LineString" || M.type === "MultiLineString"
|
|
4207
4192
|
);
|
|
4208
|
-
|
|
4193
|
+
w.length > 0 && (b({
|
|
4209
4194
|
...y,
|
|
4210
|
-
geometry: { type: "GeometryCollection", geometries:
|
|
4211
|
-
}),
|
|
4195
|
+
geometry: { type: "GeometryCollection", geometries: w }
|
|
4196
|
+
}), E = !0);
|
|
4212
4197
|
}
|
|
4213
4198
|
}
|
|
4214
|
-
if (!
|
|
4199
|
+
if (!E) {
|
|
4215
4200
|
if (y.geometry.type === "Polygon" || y.geometry.type === "MultiPolygon")
|
|
4216
|
-
|
|
4217
|
-
if (!
|
|
4201
|
+
Si(y, (S) => {
|
|
4202
|
+
if (!S)
|
|
4218
4203
|
return;
|
|
4219
|
-
const
|
|
4220
|
-
|
|
4204
|
+
const w = [...S.features], M = qe(Pt(y)), L = M[2] - M[0];
|
|
4205
|
+
M[0] - L / 4 < -180 && w.push(...Mi(S, -360).features), M[2] + L / 4 > 180 && w.push(...Mi(S, 360).features), b(Qe(w));
|
|
4221
4206
|
});
|
|
4222
4207
|
else if (y.geometry.type === "LineString" || y.geometry.type === "MultiLineString") {
|
|
4223
4208
|
b(y);
|
|
4224
4209
|
return;
|
|
4225
4210
|
}
|
|
4226
4211
|
}
|
|
4227
|
-
if (!
|
|
4212
|
+
if (!a && y.geometry.type !== "Point")
|
|
4228
4213
|
return;
|
|
4229
4214
|
if (e instanceof Function) {
|
|
4230
|
-
const
|
|
4231
|
-
|
|
4215
|
+
const S = e(i, y);
|
|
4216
|
+
S && c.push(S.addTo(i));
|
|
4232
4217
|
} else if (e) {
|
|
4233
|
-
const
|
|
4218
|
+
const S = [y.center[1], y.center[0]];
|
|
4234
4219
|
c.push(
|
|
4235
|
-
typeof e == "object" ? new
|
|
4220
|
+
typeof e == "object" ? new le.Marker(S, e) : v(S).addTo(i)
|
|
4236
4221
|
);
|
|
4237
4222
|
}
|
|
4238
4223
|
}
|
|
4239
4224
|
if (t)
|
|
4240
|
-
for (const
|
|
4241
|
-
if (
|
|
4225
|
+
for (const E of m ?? []) {
|
|
4226
|
+
if (E === y)
|
|
4242
4227
|
continue;
|
|
4243
|
-
const
|
|
4244
|
-
|
|
4245
|
-
|
|
4228
|
+
const S = [
|
|
4229
|
+
E.center[1],
|
|
4230
|
+
E.center[0]
|
|
4246
4231
|
];
|
|
4247
|
-
let
|
|
4232
|
+
let w;
|
|
4248
4233
|
if (t instanceof Function) {
|
|
4249
|
-
if (
|
|
4234
|
+
if (w = t(i, E), !w)
|
|
4250
4235
|
continue;
|
|
4251
4236
|
} else
|
|
4252
|
-
|
|
4253
|
-
|
|
4237
|
+
w = (typeof t == "object" ? new le.Marker(S, t) : v(S, !0)).addTo(i).bindTooltip(
|
|
4238
|
+
E.place_type[0] === "reverse" ? E.place_name : E.place_name.replace(/,.*/, ""),
|
|
4254
4239
|
{
|
|
4255
4240
|
direction: "top"
|
|
4256
4241
|
}
|
|
4257
4242
|
);
|
|
4258
|
-
const
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
}),
|
|
4262
|
-
s == null || s({ type: "markerMouseEnter", id:
|
|
4263
|
-
}),
|
|
4264
|
-
s == null || s({ type: "markerMouseLeave", id:
|
|
4265
|
-
}),
|
|
4243
|
+
const M = w.getElement();
|
|
4244
|
+
M && (M.addEventListener("click", (L) => {
|
|
4245
|
+
L.stopPropagation(), s == null || s({ type: "markerClick", id: E.id });
|
|
4246
|
+
}), M.addEventListener("mouseenter", () => {
|
|
4247
|
+
s == null || s({ type: "markerMouseEnter", id: E.id });
|
|
4248
|
+
}), M.addEventListener("mouseleave", () => {
|
|
4249
|
+
s == null || s({ type: "markerMouseLeave", id: E.id });
|
|
4250
|
+
}), M.classList.toggle("marker-fuzzy", !!E.matching_text)), c.push(w);
|
|
4266
4251
|
}
|
|
4267
4252
|
},
|
|
4268
|
-
setSelectedMarker(
|
|
4253
|
+
setSelectedMarker(m) {
|
|
4269
4254
|
var y, b;
|
|
4270
|
-
l && ((y = l.getElement()) == null || y.classList.toggle("marker-selected", !1)), l =
|
|
4255
|
+
l && ((y = l.getElement()) == null || y.classList.toggle("marker-selected", !1)), l = m > -1 ? c[m] : void 0, (b = l == null ? void 0 : l.getElement()) == null || b.classList.toggle("marker-selected", !0);
|
|
4271
4256
|
},
|
|
4272
4257
|
getCenterAndZoom() {
|
|
4273
|
-
const
|
|
4274
|
-
return [i.getZoom(),
|
|
4258
|
+
const m = i.getCenter();
|
|
4259
|
+
return [i.getZoom(), m.lng, m.lat];
|
|
4260
|
+
},
|
|
4261
|
+
setShowPolygonMarker(m) {
|
|
4262
|
+
a = m;
|
|
4275
4263
|
}
|
|
4276
4264
|
};
|
|
4277
4265
|
}
|
|
4278
|
-
function
|
|
4279
|
-
const t =
|
|
4266
|
+
function Mi(i, e) {
|
|
4267
|
+
const t = Mr(i);
|
|
4280
4268
|
for (const n of t.features)
|
|
4281
4269
|
if (n.geometry.type == "MultiPolygon")
|
|
4282
4270
|
for (const r of n.geometry.coordinates)
|
|
4283
|
-
|
|
4271
|
+
Ci(r, e);
|
|
4284
4272
|
else
|
|
4285
|
-
|
|
4273
|
+
Ci(n.geometry.coordinates, e);
|
|
4286
4274
|
return t;
|
|
4287
4275
|
}
|
|
4288
|
-
function
|
|
4276
|
+
function Ci(i, e) {
|
|
4289
4277
|
for (const t of i)
|
|
4290
4278
|
for (const n of t)
|
|
4291
4279
|
n[0] += e;
|
|
4292
4280
|
}
|
|
4293
|
-
class
|
|
4281
|
+
class ji extends le.Control {
|
|
4294
4282
|
}
|
|
4295
|
-
|
|
4296
|
-
var
|
|
4297
|
-
class
|
|
4283
|
+
le.Util.extend(ji.prototype, le.Evented.prototype);
|
|
4284
|
+
var ne, ve, Ve;
|
|
4285
|
+
class lo extends ji {
|
|
4298
4286
|
constructor(t) {
|
|
4299
4287
|
super(t);
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4288
|
+
it(this, ne);
|
|
4289
|
+
it(this, ve);
|
|
4290
|
+
it(this, Ve);
|
|
4291
|
+
nt(this, ve, t);
|
|
4303
4292
|
}
|
|
4304
4293
|
onAdd(t) {
|
|
4305
4294
|
const n = document.createElement("div");
|
|
4306
|
-
n.className = "leaflet-ctrl-geocoder",
|
|
4295
|
+
n.className = "leaflet-ctrl-geocoder", le.DomEvent.disableClickPropagation(n), le.DomEvent.disableScrollPropagation(n);
|
|
4307
4296
|
const {
|
|
4308
4297
|
marker: r,
|
|
4309
4298
|
showResultMarkers: o,
|
|
@@ -4311,7 +4300,7 @@ class co extends Zi {
|
|
|
4311
4300
|
fullGeometryStyle: s,
|
|
4312
4301
|
position: c,
|
|
4313
4302
|
...l
|
|
4314
|
-
} =
|
|
4303
|
+
} = $(this, ve), d = typeof u == "boolean" ? {} : u, a = so(
|
|
4315
4304
|
t,
|
|
4316
4305
|
r,
|
|
4317
4306
|
o,
|
|
@@ -4320,7 +4309,7 @@ class co extends Zi {
|
|
|
4320
4309
|
s,
|
|
4321
4310
|
l.pickedResultStyle === "full-geometry-including-polygon-center-marker"
|
|
4322
4311
|
);
|
|
4323
|
-
|
|
4312
|
+
nt(this, Ve, a), nt(this, ne, new _r({
|
|
4324
4313
|
target: n,
|
|
4325
4314
|
props: {
|
|
4326
4315
|
mapController: a,
|
|
@@ -4339,53 +4328,55 @@ class co extends Zi {
|
|
|
4339
4328
|
querychange: void 0
|
|
4340
4329
|
};
|
|
4341
4330
|
for (const h in f)
|
|
4342
|
-
|
|
4331
|
+
$(this, ne).$on(h, (v) => this.fire(h, v.detail));
|
|
4343
4332
|
return n;
|
|
4344
4333
|
}
|
|
4345
4334
|
setOptions(t) {
|
|
4346
|
-
var c;
|
|
4347
|
-
|
|
4335
|
+
var c, l;
|
|
4336
|
+
Object.assign($(this, ve), t);
|
|
4348
4337
|
const {
|
|
4349
4338
|
marker: n,
|
|
4350
4339
|
showResultMarkers: r,
|
|
4351
4340
|
flyTo: o,
|
|
4352
4341
|
fullGeometryStyle: u,
|
|
4353
4342
|
...s
|
|
4354
|
-
} =
|
|
4355
|
-
(c =
|
|
4343
|
+
} = $(this, ve);
|
|
4344
|
+
(c = $(this, ne)) == null || c.$set(s), (l = $(this, Ve)) == null || l.setShowPolygonMarker(
|
|
4345
|
+
$(this, ve).pickedResultStyle === "full-geometry-including-polygon-center-marker"
|
|
4346
|
+
);
|
|
4356
4347
|
}
|
|
4357
4348
|
setQuery(t, n = !0) {
|
|
4358
4349
|
var r;
|
|
4359
|
-
(r =
|
|
4350
|
+
(r = $(this, ne)) == null || r.setQuery(t, n);
|
|
4360
4351
|
}
|
|
4361
4352
|
clearMap() {
|
|
4362
4353
|
var t;
|
|
4363
|
-
(t =
|
|
4354
|
+
(t = $(this, ne)) == null || t.clearMap();
|
|
4364
4355
|
}
|
|
4365
4356
|
clearList() {
|
|
4366
4357
|
var t;
|
|
4367
|
-
(t =
|
|
4358
|
+
(t = $(this, ne)) == null || t.clearList();
|
|
4368
4359
|
}
|
|
4369
4360
|
focus() {
|
|
4370
4361
|
var t;
|
|
4371
|
-
(t =
|
|
4362
|
+
(t = $(this, ne)) == null || t.focus();
|
|
4372
4363
|
}
|
|
4373
4364
|
blur() {
|
|
4374
4365
|
var t;
|
|
4375
|
-
(t =
|
|
4366
|
+
(t = $(this, ne)) == null || t.blur();
|
|
4376
4367
|
}
|
|
4377
4368
|
onRemove() {
|
|
4378
4369
|
var t;
|
|
4379
|
-
(t =
|
|
4370
|
+
(t = $(this, ne)) == null || t.$destroy();
|
|
4380
4371
|
}
|
|
4381
4372
|
}
|
|
4382
|
-
|
|
4383
|
-
function
|
|
4384
|
-
return new
|
|
4373
|
+
ne = new WeakMap(), ve = new WeakMap(), Ve = new WeakMap();
|
|
4374
|
+
function uo(...i) {
|
|
4375
|
+
return new lo(...i);
|
|
4385
4376
|
}
|
|
4386
|
-
window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding =
|
|
4377
|
+
window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = uo);
|
|
4387
4378
|
export {
|
|
4388
|
-
|
|
4389
|
-
|
|
4379
|
+
lo as GeocodingControl,
|
|
4380
|
+
so as createLeafletMapController
|
|
4390
4381
|
};
|
|
4391
4382
|
//# sourceMappingURL=leaflet.js.map
|