@maptiler/geocoding-control 1.4.2-dev.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MapLibreBasedGeocodingControl.d.ts +70 -35
- package/leaflet-controller.d.ts +1 -1
- package/leaflet-controller.js +407 -398
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +3 -3
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.d.ts +52 -16
- package/leaflet.js +888 -870
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.d.ts +7 -7
- package/maplibregl-controller.js +421 -413
- 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 +29 -5
- package/maplibregl.js +1244 -1236
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +29 -5
- package/maptilersdk.js +1194 -1180
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +694 -692
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +5 -5
- package/react.js +671 -669
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +4 -2
- package/svelte/GeocodingControl.svelte.d.ts +1 -0
- package/svelte/MapLibreBasedGeocodingControl.d.ts +70 -35
- package/svelte/MapLibreBasedGeocodingControl.js +69 -66
- package/svelte/leaflet-controller.d.ts +1 -1
- package/svelte/leaflet-controller.js +47 -24
- package/svelte/leaflet.d.ts +52 -16
- package/svelte/leaflet.js +14 -2
- package/svelte/maplibregl-controller.d.ts +7 -7
- package/svelte/maplibregl-controller.js +55 -34
- package/svelte/maplibregl.d.ts +29 -5
- package/svelte/maplibregl.js +3 -8
- package/svelte/maptilersdk.d.ts +29 -5
- package/svelte/maptilersdk.js +15 -18
- package/svelte/types.d.ts +6 -0
- package/types.d.ts +6 -0
- package/vanilla.js +392 -390
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/maplibregl.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var rn = Object.defineProperty;
|
|
2
|
+
var zt = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import * as
|
|
5
|
+
var on = (n, e, t) => e in n ? rn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
+
var bt = (n, e, t) => on(n, typeof e != "symbol" ? e + "" : e, t), Gt = (n, e, t) => e.has(n) || zt("Cannot " + t);
|
|
7
|
+
var ie = (n, e, t) => (Gt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), _t = (n, e, t) => e.has(n) ? zt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), Je = (n, e, t, i) => (Gt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
|
|
8
|
+
import * as Ft from "maplibre-gl";
|
|
9
9
|
function A() {
|
|
10
10
|
}
|
|
11
11
|
function sn(n, e) {
|
|
@@ -15,35 +15,35 @@ function sn(n, e) {
|
|
|
15
15
|
n
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Si(n) {
|
|
19
19
|
return n();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function jt() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
n.forEach(
|
|
24
|
+
function ge(n) {
|
|
25
|
+
n.forEach(Si);
|
|
26
26
|
}
|
|
27
27
|
function xi(n) {
|
|
28
28
|
return typeof n == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Ee(n, e) {
|
|
31
31
|
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
32
32
|
}
|
|
33
|
-
let
|
|
33
|
+
let $e;
|
|
34
34
|
function K(n, e) {
|
|
35
|
-
return n === e ? !0 : (
|
|
35
|
+
return n === e ? !0 : ($e || ($e = document.createElement("a")), $e.href = e, n === $e.href);
|
|
36
36
|
}
|
|
37
37
|
function ln(n) {
|
|
38
38
|
return Object.keys(n).length === 0;
|
|
39
39
|
}
|
|
40
40
|
function un(n, e, t, i) {
|
|
41
41
|
if (n) {
|
|
42
|
-
const r =
|
|
42
|
+
const r = Mi(n, e, t, i);
|
|
43
43
|
return n[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Mi(n, e, t, i) {
|
|
47
47
|
return n[1] && i ? sn(t.ctx.slice(), n[1](i(e))) : t.ctx;
|
|
48
48
|
}
|
|
49
49
|
function an(n, e, t, i) {
|
|
@@ -52,8 +52,8 @@ function an(n, e, t, i) {
|
|
|
52
52
|
if (e.dirty === void 0)
|
|
53
53
|
return r;
|
|
54
54
|
if (typeof r == "object") {
|
|
55
|
-
const o = [],
|
|
56
|
-
for (let s = 0; s <
|
|
55
|
+
const o = [], a = Math.max(e.dirty.length, r.length);
|
|
56
|
+
for (let s = 0; s < a; s += 1)
|
|
57
57
|
o[s] = e.dirty[s] | r[s];
|
|
58
58
|
return o;
|
|
59
59
|
}
|
|
@@ -63,8 +63,8 @@ function an(n, e, t, i) {
|
|
|
63
63
|
}
|
|
64
64
|
function cn(n, e, t, i, r, o) {
|
|
65
65
|
if (r) {
|
|
66
|
-
const
|
|
67
|
-
n.p(
|
|
66
|
+
const a = Mi(e, t, i, o);
|
|
67
|
+
n.p(a, r);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
function fn(n) {
|
|
@@ -76,10 +76,10 @@ function fn(n) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Zt(n) {
|
|
80
80
|
return n ?? "";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function P(n, e) {
|
|
83
83
|
n.appendChild(e);
|
|
84
84
|
}
|
|
85
85
|
function z(n, e, t) {
|
|
@@ -91,17 +91,17 @@ function B(n) {
|
|
|
91
91
|
function W(n) {
|
|
92
92
|
return document.createElement(n);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function le(n) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function be(n) {
|
|
98
98
|
return document.createTextNode(n);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
100
|
+
function te() {
|
|
101
|
+
return be(" ");
|
|
102
102
|
}
|
|
103
103
|
function dn() {
|
|
104
|
-
return
|
|
104
|
+
return be("");
|
|
105
105
|
}
|
|
106
106
|
function J(n, e, t, i) {
|
|
107
107
|
return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
|
|
@@ -117,32 +117,32 @@ function v(n, e, t) {
|
|
|
117
117
|
function gn(n) {
|
|
118
118
|
return Array.from(n.childNodes);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function ze(n, e) {
|
|
121
121
|
e = "" + e, n.data !== e && (n.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function qt(n, e) {
|
|
125
125
|
n.value = e ?? "";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function re(n, e, t) {
|
|
128
128
|
n.classList.toggle(e, !!t);
|
|
129
129
|
}
|
|
130
130
|
function mn(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
131
131
|
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
|
|
132
132
|
}
|
|
133
|
-
let
|
|
134
|
-
function
|
|
135
|
-
|
|
133
|
+
let Ge;
|
|
134
|
+
function Ue(n) {
|
|
135
|
+
Ge = n;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
if (!
|
|
139
|
-
return
|
|
137
|
+
function Ci() {
|
|
138
|
+
if (!Ge) throw new Error("Function called outside component initialization");
|
|
139
|
+
return Ge;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function yn(n) {
|
|
142
|
+
Ci().$$.on_destroy.push(n);
|
|
143
143
|
}
|
|
144
144
|
function vn() {
|
|
145
|
-
const n =
|
|
145
|
+
const n = Ci();
|
|
146
146
|
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
147
147
|
const r = n.$$.callbacks[e];
|
|
148
148
|
if (r) {
|
|
@@ -152,8 +152,8 @@ function vn() {
|
|
|
152
152
|
t,
|
|
153
153
|
{ cancelable: i }
|
|
154
154
|
);
|
|
155
|
-
return r.slice().forEach((
|
|
156
|
-
|
|
155
|
+
return r.slice().forEach((a) => {
|
|
156
|
+
a.call(n, o);
|
|
157
157
|
}), !o.defaultPrevented;
|
|
158
158
|
}
|
|
159
159
|
return !0;
|
|
@@ -163,74 +163,74 @@ function Qt(n, e) {
|
|
|
163
163
|
const t = n.$$.callbacks[e.type];
|
|
164
164
|
t && t.slice().forEach((i) => i.call(this, e));
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
const Ht = [],
|
|
169
|
-
let
|
|
170
|
-
function
|
|
171
|
-
|
|
166
|
+
const Ie = [], St = [];
|
|
167
|
+
let Oe = [];
|
|
168
|
+
const Ht = [], pn = /* @__PURE__ */ Promise.resolve();
|
|
169
|
+
let xt = !1;
|
|
170
|
+
function bn() {
|
|
171
|
+
xt || (xt = !0, pn.then(ki));
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
173
|
+
function Mt(n) {
|
|
174
|
+
Oe.push(n);
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
let
|
|
176
|
+
const wt = /* @__PURE__ */ new Set();
|
|
177
|
+
let Pe = 0;
|
|
178
178
|
function ki() {
|
|
179
|
-
if (
|
|
179
|
+
if (Pe !== 0)
|
|
180
180
|
return;
|
|
181
|
-
const n =
|
|
181
|
+
const n = Ge;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
|
-
for (;
|
|
185
|
-
const e =
|
|
186
|
-
|
|
184
|
+
for (; Pe < Ie.length; ) {
|
|
185
|
+
const e = Ie[Pe];
|
|
186
|
+
Pe++, Ue(e), _n(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw Ie.length = 0, Pe = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
192
|
-
for (let e = 0; e <
|
|
193
|
-
const t =
|
|
194
|
-
|
|
191
|
+
for (Ue(null), Ie.length = 0, Pe = 0; St.length; ) St.pop()();
|
|
192
|
+
for (let e = 0; e < Oe.length; e += 1) {
|
|
193
|
+
const t = Oe[e];
|
|
194
|
+
wt.has(t) || (wt.add(t), t());
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
} while (
|
|
196
|
+
Oe.length = 0;
|
|
197
|
+
} while (Ie.length);
|
|
198
198
|
for (; Ht.length; )
|
|
199
199
|
Ht.pop()();
|
|
200
|
-
|
|
200
|
+
xt = !1, wt.clear(), Ue(n);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function _n(n) {
|
|
203
203
|
if (n.fragment !== null) {
|
|
204
|
-
n.update(),
|
|
204
|
+
n.update(), ge(n.before_update);
|
|
205
205
|
const e = n.dirty;
|
|
206
|
-
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(
|
|
206
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Mt);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function wn(n) {
|
|
210
210
|
const e = [], t = [];
|
|
211
|
-
|
|
211
|
+
Oe.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), Oe = e;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
let
|
|
215
|
-
function
|
|
216
|
-
|
|
213
|
+
const et = /* @__PURE__ */ new Set();
|
|
214
|
+
let Ce;
|
|
215
|
+
function tt() {
|
|
216
|
+
Ce = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
219
|
-
p:
|
|
219
|
+
p: Ce
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
223
|
+
function it() {
|
|
224
|
+
Ce.r || ge(Ce.c), Ce = Ce.p;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
n && n.i && (
|
|
226
|
+
function Z(n, e) {
|
|
227
|
+
n && n.i && (et.delete(n), n.i(e));
|
|
228
228
|
}
|
|
229
229
|
function V(n, e, t, i) {
|
|
230
230
|
if (n && n.o) {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
if (et.has(n)) return;
|
|
232
|
+
et.add(n), Ce.c.push(() => {
|
|
233
|
+
et.delete(n), i && (t && n.d(1), i());
|
|
234
234
|
}), n.o(e);
|
|
235
235
|
} else i && i();
|
|
236
236
|
}
|
|
@@ -242,86 +242,86 @@ function En(n, e) {
|
|
|
242
242
|
e.delete(n.key);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function Ln(n, e, t, i, r, o,
|
|
246
|
-
let f = n.length, h = o.length,
|
|
247
|
-
const
|
|
248
|
-
for (;
|
|
249
|
-
const
|
|
250
|
-
for (
|
|
251
|
-
const
|
|
252
|
-
let
|
|
253
|
-
|
|
245
|
+
function Ln(n, e, t, i, r, o, a, s, u, l, d, c) {
|
|
246
|
+
let f = n.length, h = o.length, p = f;
|
|
247
|
+
const b = {};
|
|
248
|
+
for (; p--; ) b[n[p].key] = p;
|
|
249
|
+
const m = [], y = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), L = [];
|
|
250
|
+
for (p = h; p--; ) {
|
|
251
|
+
const S = c(r, o, p), _ = t(S);
|
|
252
|
+
let k = a.get(_);
|
|
253
|
+
k ? L.push(() => k.p(S, e)) : (k = l(_, S), k.c()), y.set(_, m[p] = k), _ in b && w.set(_, Math.abs(p - b[_]));
|
|
254
254
|
}
|
|
255
|
-
const
|
|
256
|
-
function x(
|
|
257
|
-
|
|
255
|
+
const E = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Set();
|
|
256
|
+
function x(S) {
|
|
257
|
+
Z(S, 1), S.m(s, d), a.set(S.key, S), d = S.first, h--;
|
|
258
258
|
}
|
|
259
259
|
for (; f && h; ) {
|
|
260
|
-
const
|
|
261
|
-
|
|
260
|
+
const S = m[h - 1], _ = n[f - 1], k = S.key, I = _.key;
|
|
261
|
+
S === _ ? (d = S.first, f--, h--) : y.has(I) ? !a.has(k) || E.has(k) ? x(S) : C.has(I) ? f-- : w.get(k) > w.get(I) ? (C.add(k), x(S)) : (E.add(I), f--) : (u(_, a), f--);
|
|
262
262
|
}
|
|
263
263
|
for (; f--; ) {
|
|
264
|
-
const
|
|
265
|
-
|
|
264
|
+
const S = n[f];
|
|
265
|
+
y.has(S.key) || u(S, a);
|
|
266
266
|
}
|
|
267
|
-
for (; h; ) x(
|
|
268
|
-
return
|
|
267
|
+
for (; h; ) x(m[h - 1]);
|
|
268
|
+
return ge(L), m;
|
|
269
269
|
}
|
|
270
270
|
function _e(n) {
|
|
271
271
|
n && n.c();
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function de(n, e, t) {
|
|
274
274
|
const { fragment: i, after_update: r } = n.$$;
|
|
275
|
-
i && i.m(e, t),
|
|
276
|
-
const o = n.$$.on_mount.map(
|
|
277
|
-
n.$$.on_destroy ? n.$$.on_destroy.push(...o) :
|
|
278
|
-
}), r.forEach(
|
|
275
|
+
i && i.m(e, t), Mt(() => {
|
|
276
|
+
const o = n.$$.on_mount.map(Si).filter(xi);
|
|
277
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...o) : ge(o), n.$$.on_mount = [];
|
|
278
|
+
}), r.forEach(Mt);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function he(n, e) {
|
|
281
281
|
const t = n.$$;
|
|
282
|
-
t.fragment !== null && (
|
|
282
|
+
t.fragment !== null && (wn(t.after_update), ge(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
n.$$.dirty[0] === -1 && (
|
|
284
|
+
function Sn(n, e) {
|
|
285
|
+
n.$$.dirty[0] === -1 && (Ie.push(n), bn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
const
|
|
287
|
+
function Le(n, e, t, i, r, o, a = null, s = [-1]) {
|
|
288
|
+
const u = Ge;
|
|
289
|
+
Ue(n);
|
|
290
|
+
const l = n.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
293
293
|
// state
|
|
294
294
|
props: o,
|
|
295
295
|
update: A,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: jt(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
301
301
|
on_disconnect: [],
|
|
302
302
|
before_update: [],
|
|
303
303
|
after_update: [],
|
|
304
|
-
context: new Map(e.context || (
|
|
304
|
+
context: new Map(e.context || (u ? u.$$.context : [])),
|
|
305
305
|
// everything else
|
|
306
|
-
callbacks:
|
|
306
|
+
callbacks: jt(),
|
|
307
307
|
dirty: s,
|
|
308
308
|
skip_bound: !1,
|
|
309
|
-
root: e.target ||
|
|
309
|
+
root: e.target || u.$$.root
|
|
310
310
|
};
|
|
311
|
-
|
|
311
|
+
a && a(l.root);
|
|
312
312
|
let d = !1;
|
|
313
|
-
if (
|
|
314
|
-
const
|
|
315
|
-
return
|
|
316
|
-
}) : [],
|
|
313
|
+
if (l.ctx = t ? t(n, e.props || {}, (c, f, ...h) => {
|
|
314
|
+
const p = h.length ? h[0] : f;
|
|
315
|
+
return l.ctx && r(l.ctx[c], l.ctx[c] = p) && (!l.skip_bound && l.bound[c] && l.bound[c](p), d && Sn(n, c)), f;
|
|
316
|
+
}) : [], l.update(), d = !0, ge(l.before_update), l.fragment = i ? i(l.ctx) : !1, e.target) {
|
|
317
317
|
if (e.hydrate) {
|
|
318
|
-
const
|
|
319
|
-
|
|
318
|
+
const c = gn(e.target);
|
|
319
|
+
l.fragment && l.fragment.l(c), c.forEach(B);
|
|
320
320
|
} else
|
|
321
|
-
|
|
322
|
-
e.intro &&
|
|
321
|
+
l.fragment && l.fragment.c();
|
|
322
|
+
e.intro && Z(n.$$.fragment), de(n, e.target, e.anchor), ki();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
Ue(u);
|
|
325
325
|
}
|
|
326
326
|
class Se {
|
|
327
327
|
constructor() {
|
|
@@ -332,7 +332,7 @@ class Se {
|
|
|
332
332
|
*
|
|
333
333
|
* @type {any}
|
|
334
334
|
*/
|
|
335
|
-
|
|
335
|
+
bt(this, "$$");
|
|
336
336
|
/**
|
|
337
337
|
* ### PRIVATE API
|
|
338
338
|
*
|
|
@@ -340,11 +340,11 @@ class Se {
|
|
|
340
340
|
*
|
|
341
341
|
* @type {any}
|
|
342
342
|
*/
|
|
343
|
-
|
|
343
|
+
bt(this, "$$set");
|
|
344
344
|
}
|
|
345
345
|
/** @returns {void} */
|
|
346
346
|
$destroy() {
|
|
347
|
-
|
|
347
|
+
he(this, 1), this.$destroy = A;
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -369,16 +369,16 @@ class Se {
|
|
|
369
369
|
this.$$set && !ln(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(
|
|
372
|
+
const xn = "4";
|
|
373
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(xn);
|
|
374
374
|
function Mn(n) {
|
|
375
375
|
let e, t;
|
|
376
376
|
return {
|
|
377
377
|
c() {
|
|
378
|
-
e =
|
|
378
|
+
e = le("svg"), t = le("path"), v(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"), v(e, "viewBox", "0 0 14 14"), v(e, "width", "13"), v(e, "height", "13"), v(e, "class", "svelte-en2qvf");
|
|
379
379
|
},
|
|
380
380
|
m(i, r) {
|
|
381
|
-
z(i, e, r),
|
|
381
|
+
z(i, e, r), P(e, t);
|
|
382
382
|
},
|
|
383
383
|
p: A,
|
|
384
384
|
i: A,
|
|
@@ -388,19 +388,19 @@ function Mn(n) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class Ni extends Se {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(),
|
|
393
|
+
super(), Le(this, e, null, Mn, Ee, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function Cn(n) {
|
|
397
397
|
let e, t;
|
|
398
398
|
return {
|
|
399
399
|
c() {
|
|
400
|
-
e =
|
|
400
|
+
e = le("svg"), t = le("path"), v(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"), v(e, "viewBox", "0 0 30 30"), v(e, "fill", "none"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "class", "svelte-d2loi5");
|
|
401
401
|
},
|
|
402
402
|
m(i, r) {
|
|
403
|
-
z(i, e, r),
|
|
403
|
+
z(i, e, r), P(e, t);
|
|
404
404
|
},
|
|
405
405
|
p: A,
|
|
406
406
|
i: A,
|
|
@@ -410,12 +410,12 @@ function kn(n) {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class Ti extends Se {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(),
|
|
415
|
+
super(), Le(this, e, null, Cn, Ee, {});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function kn(n) {
|
|
419
419
|
let e, t;
|
|
420
420
|
return {
|
|
421
421
|
c() {
|
|
@@ -477,7 +477,7 @@ function Nn(n) {
|
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Tn(n) {
|
|
481
481
|
let e, t;
|
|
482
482
|
return {
|
|
483
483
|
c() {
|
|
@@ -508,7 +508,7 @@ function Pn(n) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Pn(n) {
|
|
512
512
|
let e, t;
|
|
513
513
|
return {
|
|
514
514
|
c() {
|
|
@@ -644,18 +644,18 @@ function Wn(n) {
|
|
|
644
644
|
n[4]
|
|
645
645
|
), v(e, "class", "svelte-ltkwvy");
|
|
646
646
|
},
|
|
647
|
-
m(o,
|
|
648
|
-
z(o, e,
|
|
647
|
+
m(o, a) {
|
|
648
|
+
z(o, e, a), i || (r = J(
|
|
649
649
|
e,
|
|
650
650
|
"error",
|
|
651
651
|
/*error_handler*/
|
|
652
652
|
n[14]
|
|
653
653
|
), i = !0);
|
|
654
654
|
},
|
|
655
|
-
p(o,
|
|
656
|
-
|
|
655
|
+
p(o, a) {
|
|
656
|
+
a & /*imageUrl*/
|
|
657
657
|
32 && !K(e.src, t = /*imageUrl*/
|
|
658
|
-
o[5]) && v(e, "src", t),
|
|
658
|
+
o[5]) && v(e, "src", t), a & /*category*/
|
|
659
659
|
16 && v(
|
|
660
660
|
e,
|
|
661
661
|
"alt",
|
|
@@ -672,17 +672,17 @@ function Yt(n) {
|
|
|
672
672
|
let e, t;
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
675
|
-
e = W("span"), t =
|
|
675
|
+
e = W("span"), t = be(
|
|
676
676
|
/*placeType*/
|
|
677
677
|
n[6]
|
|
678
678
|
), v(e, "class", "secondary svelte-ltkwvy");
|
|
679
679
|
},
|
|
680
680
|
m(i, r) {
|
|
681
|
-
z(i, e, r),
|
|
681
|
+
z(i, e, r), P(e, t);
|
|
682
682
|
},
|
|
683
683
|
p(i, r) {
|
|
684
684
|
r & /*placeType*/
|
|
685
|
-
64 &&
|
|
685
|
+
64 && ze(
|
|
686
686
|
t,
|
|
687
687
|
/*placeType*/
|
|
688
688
|
i[6]
|
|
@@ -694,7 +694,7 @@ function Yt(n) {
|
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
696
|
function An(n) {
|
|
697
|
-
let e, t, i, r, o,
|
|
697
|
+
let e, t, i, r, o, a, s, u, l, d = (
|
|
698
698
|
/*isReverse*/
|
|
699
699
|
(n[7] ? (
|
|
700
700
|
/*feature*/
|
|
@@ -703,7 +703,7 @@ function An(n) {
|
|
|
703
703
|
/*feature*/
|
|
704
704
|
n[0].place_name.replace(/,.*/, "")
|
|
705
705
|
)) + ""
|
|
706
|
-
),
|
|
706
|
+
), c, f, h = (
|
|
707
707
|
/*showPlaceType*/
|
|
708
708
|
n[2] === "always" || /*showPlaceType*/
|
|
709
709
|
n[2] && !/*feature*/
|
|
@@ -714,48 +714,48 @@ function An(n) {
|
|
|
714
714
|
n[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
715
715
|
n[5]) && !/*isReverse*/
|
|
716
716
|
n[7]
|
|
717
|
-
),
|
|
717
|
+
), p, b, m = (
|
|
718
718
|
/*isReverse*/
|
|
719
719
|
(n[7] ? "" : (
|
|
720
720
|
/*feature*/
|
|
721
721
|
n[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
722
722
|
)) + ""
|
|
723
|
-
),
|
|
724
|
-
function _
|
|
725
|
-
return
|
|
726
|
-
1 && (t = null),
|
|
727
|
-
1 && (i = null),
|
|
728
|
-
1 && (r = null),
|
|
723
|
+
), y, w, L;
|
|
724
|
+
function E(_, k) {
|
|
725
|
+
return k & /*feature*/
|
|
726
|
+
1 && (t = null), k & /*feature*/
|
|
727
|
+
1 && (i = null), k & /*feature*/
|
|
728
|
+
1 && (r = null), k & /*feature*/
|
|
729
729
|
1 && (o = null), /*imageUrl*/
|
|
730
|
-
|
|
730
|
+
_[5] ? Wn : (
|
|
731
731
|
/*feature*/
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
732
|
+
_[0].address ? On : (t == null && (t = !!/*feature*/
|
|
733
|
+
_[0].id.startsWith("road.")), t ? In : (i == null && (i = !!/*feature*/
|
|
734
|
+
_[0].id.startsWith("address.")), i ? Rn : (r == null && (r = !!/*feature*/
|
|
735
|
+
_[0].id.startsWith("postal_code.")), r ? Pn : (o == null && (o = !!/*feature*/
|
|
736
|
+
_[0].id.startsWith("poi.")), o ? Tn : (
|
|
737
737
|
/*isReverse*/
|
|
738
|
-
|
|
738
|
+
_[7] ? Nn : kn
|
|
739
739
|
)))))
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
let
|
|
742
|
+
let C = E(n, -1), x = C(n), S = h && Yt(n);
|
|
743
743
|
return {
|
|
744
744
|
c() {
|
|
745
|
-
e = W("li"), x.c(),
|
|
745
|
+
e = W("li"), x.c(), a = te(), s = W("span"), u = W("span"), l = W("span"), c = be(d), f = te(), S && S.c(), p = te(), b = W("span"), y = be(m), v(l, "class", "primary svelte-ltkwvy"), v(u, "class", "svelte-ltkwvy"), v(b, "class", "line2 svelte-ltkwvy"), v(s, "class", "texts svelte-ltkwvy"), v(e, "tabindex", "0"), v(
|
|
746
746
|
e,
|
|
747
747
|
"data-selected",
|
|
748
748
|
/*selected*/
|
|
749
749
|
n[1]
|
|
750
|
-
), v(e, "class", "svelte-ltkwvy"),
|
|
750
|
+
), v(e, "class", "svelte-ltkwvy"), re(
|
|
751
751
|
e,
|
|
752
752
|
"selected",
|
|
753
753
|
/*selected*/
|
|
754
754
|
n[1]
|
|
755
755
|
);
|
|
756
756
|
},
|
|
757
|
-
m(
|
|
758
|
-
z(
|
|
757
|
+
m(_, k) {
|
|
758
|
+
z(_, e, k), x.m(e, null), P(e, a), P(e, s), P(s, u), P(u, l), P(l, c), P(u, f), S && S.m(u, null), P(s, p), P(s, b), P(b, y), w || (L = [
|
|
759
759
|
J(
|
|
760
760
|
e,
|
|
761
761
|
"mouseenter",
|
|
@@ -768,100 +768,100 @@ function An(n) {
|
|
|
768
768
|
/*focus_handler*/
|
|
769
769
|
n[13]
|
|
770
770
|
)
|
|
771
|
-
],
|
|
771
|
+
], w = !0);
|
|
772
772
|
},
|
|
773
|
-
p(
|
|
774
|
-
|
|
773
|
+
p(_, [k]) {
|
|
774
|
+
C === (C = E(_, k)) && x ? x.p(_, k) : (x.d(1), x = C(_), x && (x.c(), x.m(e, a))), 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
|
+
)) + "") && ze(c, 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] && !/*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 ? S ? S.p(_, k) : (S = Yt(_), S.c(), S.m(u, null)) : S && (S.d(1), S = null), k & /*feature*/
|
|
793
|
+
1 && m !== (m = /*isReverse*/
|
|
794
|
+
(_[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
|
-
|
|
797
|
-
)) + "") &&
|
|
796
|
+
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
+
)) + "") && ze(y, m), k & /*selected*/
|
|
798
798
|
2 && v(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
801
801
|
/*selected*/
|
|
802
|
-
|
|
803
|
-
),
|
|
804
|
-
2 &&
|
|
802
|
+
_[1]
|
|
803
|
+
), k & /*selected*/
|
|
804
|
+
2 && re(
|
|
805
805
|
e,
|
|
806
806
|
"selected",
|
|
807
807
|
/*selected*/
|
|
808
|
-
|
|
808
|
+
_[1]
|
|
809
809
|
);
|
|
810
810
|
},
|
|
811
811
|
i: A,
|
|
812
812
|
o: A,
|
|
813
|
-
d(
|
|
814
|
-
|
|
813
|
+
d(_) {
|
|
814
|
+
_ && B(e), x.d(), S && S.d(), w = !1, ge(L);
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
818
|
function Bn(n, e, t) {
|
|
819
|
-
var
|
|
820
|
-
let i, r, { feature: o } = e, { selected:
|
|
821
|
-
const d = (
|
|
822
|
-
let
|
|
823
|
-
function
|
|
824
|
-
f &&
|
|
825
|
-
}
|
|
826
|
-
function
|
|
827
|
-
Qt.call(this, n,
|
|
828
|
-
}
|
|
829
|
-
function
|
|
830
|
-
Qt.call(this, n,
|
|
831
|
-
}
|
|
832
|
-
const
|
|
833
|
-
return n.$$set = (
|
|
834
|
-
"feature" in
|
|
819
|
+
var L;
|
|
820
|
+
let i, r, { feature: o } = e, { selected: a = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: u } = e, { iconsBaseUrl: l } = e;
|
|
821
|
+
const d = (L = o.properties) == null ? void 0 : L.categories;
|
|
822
|
+
let c, f, h = 0, p = o.place_type[0] === "reverse";
|
|
823
|
+
function b() {
|
|
824
|
+
f && u.add(f), t(10, h++, h);
|
|
825
|
+
}
|
|
826
|
+
function m(E) {
|
|
827
|
+
Qt.call(this, n, E);
|
|
828
|
+
}
|
|
829
|
+
function y(E) {
|
|
830
|
+
Qt.call(this, n, E);
|
|
831
|
+
}
|
|
832
|
+
const w = () => b();
|
|
833
|
+
return n.$$set = (E) => {
|
|
834
|
+
"feature" in E && t(0, o = E.feature), "selected" in E && t(1, a = E.selected), "showPlaceType" in E && t(2, s = E.showPlaceType), "missingIconsCache" in E && t(9, u = E.missingIconsCache), "iconsBaseUrl" in E && t(3, l = E.iconsBaseUrl);
|
|
835
835
|
}, n.$$.update = () => {
|
|
836
|
-
var
|
|
836
|
+
var E, C, x, S;
|
|
837
837
|
if (n.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
838
838
|
3640)
|
|
839
839
|
do
|
|
840
|
-
t(11, i--, i), t(4,
|
|
841
|
-
while (i > -1 && (!f ||
|
|
840
|
+
t(11, i--, i), t(4, c = d == null ? void 0 : d[i]), t(5, f = c ? l + c.replace(/ /g, "_") + ".svg" : void 0);
|
|
841
|
+
while (i > -1 && (!f || u.has(f)));
|
|
842
842
|
n.$$.dirty & /*feature*/
|
|
843
|
-
1 && t(6, r = ((
|
|
843
|
+
1 && t(6, r = ((C = (E = o.properties) == null ? void 0 : E.categories) == null ? void 0 : C.join(", ")) ?? ((S = (x = o.properties) == null ? void 0 : x.place_type_name) == null ? void 0 : S[0]) ?? o.place_type[0]);
|
|
844
844
|
}, t(11, i = (d == null ? void 0 : d.length) ?? 0), [
|
|
845
845
|
o,
|
|
846
|
-
l,
|
|
847
|
-
s,
|
|
848
|
-
u,
|
|
849
846
|
a,
|
|
847
|
+
s,
|
|
848
|
+
l,
|
|
849
|
+
c,
|
|
850
850
|
f,
|
|
851
851
|
r,
|
|
852
|
+
p,
|
|
852
853
|
b,
|
|
853
|
-
|
|
854
|
-
c,
|
|
854
|
+
u,
|
|
855
855
|
h,
|
|
856
856
|
i,
|
|
857
|
-
p,
|
|
858
857
|
m,
|
|
859
|
-
|
|
858
|
+
y,
|
|
859
|
+
w
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
862
|
class Dn extends Se {
|
|
863
863
|
constructor(e) {
|
|
864
|
-
super(),
|
|
864
|
+
super(), Le(this, e, Bn, An, Ee, {
|
|
865
865
|
feature: 0,
|
|
866
866
|
selected: 1,
|
|
867
867
|
showPlaceType: 2,
|
|
@@ -889,20 +889,20 @@ function Un(n) {
|
|
|
889
889
|
}
|
|
890
890
|
class zn extends Se {
|
|
891
891
|
constructor(e) {
|
|
892
|
-
super(),
|
|
892
|
+
super(), Le(this, e, null, Un, Ee, {});
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Gn(n) {
|
|
896
896
|
let e, t, i;
|
|
897
897
|
return {
|
|
898
898
|
c() {
|
|
899
|
-
e =
|
|
900
|
-
n[0] === "list" ? 20 : void 0), v(e, "viewBox", "0 0 70 85"), v(e, "fill", "none"), v(e, "class", "svelte-gzo3ar"),
|
|
899
|
+
e = le("svg"), t = le("path"), v(t, "stroke-width", "4"), v(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"), v(t, "class", "svelte-gzo3ar"), v(e, "width", i = /*displayIn*/
|
|
900
|
+
n[0] === "list" ? 20 : void 0), v(e, "viewBox", "0 0 70 85"), v(e, "fill", "none"), v(e, "class", "svelte-gzo3ar"), re(
|
|
901
901
|
e,
|
|
902
902
|
"in-map",
|
|
903
903
|
/*displayIn*/
|
|
904
904
|
n[0] !== "list"
|
|
905
|
-
),
|
|
905
|
+
), re(
|
|
906
906
|
e,
|
|
907
907
|
"list-icon",
|
|
908
908
|
/*displayIn*/
|
|
@@ -910,19 +910,19 @@ function Fn(n) {
|
|
|
910
910
|
);
|
|
911
911
|
},
|
|
912
912
|
m(r, o) {
|
|
913
|
-
z(r, e, o),
|
|
913
|
+
z(r, e, o), P(e, t);
|
|
914
914
|
},
|
|
915
915
|
p(r, [o]) {
|
|
916
916
|
o & /*displayIn*/
|
|
917
917
|
1 && i !== (i = /*displayIn*/
|
|
918
918
|
r[0] === "list" ? 20 : void 0) && v(e, "width", i), o & /*displayIn*/
|
|
919
|
-
1 &&
|
|
919
|
+
1 && re(
|
|
920
920
|
e,
|
|
921
921
|
"in-map",
|
|
922
922
|
/*displayIn*/
|
|
923
923
|
r[0] !== "list"
|
|
924
924
|
), o & /*displayIn*/
|
|
925
|
-
1 &&
|
|
925
|
+
1 && re(
|
|
926
926
|
e,
|
|
927
927
|
"list-icon",
|
|
928
928
|
/*displayIn*/
|
|
@@ -936,25 +936,25 @@ function Fn(n) {
|
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Fn(n, e, t) {
|
|
940
940
|
let { displayIn: i } = e;
|
|
941
941
|
return n.$$set = (r) => {
|
|
942
942
|
"displayIn" in r && t(0, i = r.displayIn);
|
|
943
943
|
}, [i];
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class jn extends Se {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(),
|
|
947
|
+
super(), Le(this, e, Fn, Gn, Ee, { displayIn: 0 });
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Zn(n) {
|
|
951
951
|
let e, t;
|
|
952
952
|
return {
|
|
953
953
|
c() {
|
|
954
|
-
e =
|
|
954
|
+
e = le("svg"), t = le("path"), v(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"), v(e, "viewBox", "0 0 60.006 21.412"), v(e, "width", "14"), v(e, "height", "20"), v(e, "class", "svelte-en2qvf");
|
|
955
955
|
},
|
|
956
956
|
m(i, r) {
|
|
957
|
-
z(i, e, r),
|
|
957
|
+
z(i, e, r), P(e, t);
|
|
958
958
|
},
|
|
959
959
|
p: A,
|
|
960
960
|
i: A,
|
|
@@ -964,19 +964,19 @@ function qn(n) {
|
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
|
-
class
|
|
967
|
+
class qn extends Se {
|
|
968
968
|
constructor(e) {
|
|
969
|
-
super(),
|
|
969
|
+
super(), Le(this, e, null, Zn, Ee, {});
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
function Qn(n) {
|
|
973
973
|
let e, t, i;
|
|
974
974
|
return {
|
|
975
975
|
c() {
|
|
976
|
-
e =
|
|
976
|
+
e = le("svg"), t = le("circle"), i = le("path"), v(t, "cx", "4.789"), v(t, "cy", "4.787"), v(t, "r", "3.85"), v(t, "class", "svelte-1aq105l"), v(i, "d", "M12.063 12.063 7.635 7.635"), v(i, "class", "svelte-1aq105l"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "width", "13"), v(e, "height", "13"), v(e, "viewBox", "0 0 13 13"), v(e, "class", "svelte-1aq105l");
|
|
977
977
|
},
|
|
978
978
|
m(r, o) {
|
|
979
|
-
z(r, e, o),
|
|
979
|
+
z(r, e, o), P(e, t), P(e, i);
|
|
980
980
|
},
|
|
981
981
|
p: A,
|
|
982
982
|
i: A,
|
|
@@ -988,18 +988,18 @@ function Qn(n) {
|
|
|
988
988
|
}
|
|
989
989
|
class Hn extends Se {
|
|
990
990
|
constructor(e) {
|
|
991
|
-
super(),
|
|
991
|
+
super(), Le(this, e, null, Qn, Ee, {});
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
function Vn(n, e, t) {
|
|
995
995
|
const i = e[1], r = e[0], o = i - r;
|
|
996
996
|
return n === i && t ? n : ((n - r) % o + o) % o + r;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function rt(n) {
|
|
999
999
|
const e = [...n];
|
|
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
|
|
1002
|
+
let Ae;
|
|
1003
1003
|
async function Yn(n, e, t) {
|
|
1004
1004
|
const i = n == null ? void 0 : n.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
@@ -1007,31 +1007,31 @@ async function Yn(n, e, t) {
|
|
|
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 (Ae && r.cachedLocationExpiry && Ae.time + r.cachedLocationExpiry > Date.now()) {
|
|
1011
|
+
if (!Ae.coords)
|
|
1012
1012
|
break e;
|
|
1013
|
-
return
|
|
1013
|
+
return Ae.coords;
|
|
1014
1014
|
}
|
|
1015
1015
|
let o;
|
|
1016
1016
|
try {
|
|
1017
|
-
return o = await new Promise((
|
|
1017
|
+
return o = await new Promise((a, s) => {
|
|
1018
1018
|
t.signal.addEventListener("abort", () => {
|
|
1019
1019
|
s(Error("aborted"));
|
|
1020
1020
|
}), navigator.geolocation.getCurrentPosition(
|
|
1021
|
-
(
|
|
1022
|
-
|
|
1023
|
-
[
|
|
1021
|
+
(u) => {
|
|
1022
|
+
a(
|
|
1023
|
+
[u.coords.longitude, u.coords.latitude].map((l) => l.toFixed(6)).join(",")
|
|
1024
1024
|
);
|
|
1025
1025
|
},
|
|
1026
|
-
(
|
|
1027
|
-
s(
|
|
1026
|
+
(u) => {
|
|
1027
|
+
s(u);
|
|
1028
1028
|
},
|
|
1029
1029
|
r
|
|
1030
1030
|
);
|
|
1031
1031
|
}), o;
|
|
1032
1032
|
} catch {
|
|
1033
1033
|
} finally {
|
|
1034
|
-
r.cachedLocationExpiry && (
|
|
1034
|
+
r.cachedLocationExpiry && (Ae = {
|
|
1035
1035
|
time: Date.now(),
|
|
1036
1036
|
coords: o
|
|
1037
1037
|
});
|
|
@@ -1050,21 +1050,21 @@ function Xn(n) {
|
|
|
1050
1050
|
if (!["DMS", "DM", "DD"].includes(n))
|
|
1051
1051
|
throw new Error("invalid format specified");
|
|
1052
1052
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
1053
|
-
const e = this.decimalCoordinates.split(",").map((h) => Number(h.trim())), t = Number(e[0]), i = Number(e[1]), r = Math.abs(t), o = Math.abs(i),
|
|
1054
|
-
let
|
|
1055
|
-
n == "DD" && (
|
|
1056
|
-
const
|
|
1053
|
+
const e = this.decimalCoordinates.split(",").map((h) => Number(h.trim())), t = Number(e[0]), i = Number(e[1]), r = Math.abs(t), o = Math.abs(i), a = t > 0 ? "N" : "S", s = i > 0 ? "E" : "W";
|
|
1054
|
+
let u;
|
|
1055
|
+
n == "DD" && (u = `${r}° ${a}, ${o}° ${s}`);
|
|
1056
|
+
const l = Math.floor(r), d = Math.floor(o), c = (r - l) * 60, f = (o - d) * 60;
|
|
1057
1057
|
if (n == "DM") {
|
|
1058
|
-
let h = ti(
|
|
1059
|
-
h.endsWith(".000") &&
|
|
1058
|
+
let h = ti(c, 3).toFixed(3).padStart(6, "0"), p = ti(f, 3).toFixed(3).padStart(6, "0");
|
|
1059
|
+
h.endsWith(".000") && p.endsWith(".000") && (h = h.replace(/\.000$/, ""), p = p.replace(/\.000$/, "")), u = `${l}° ${h}' ${a}, ${d}° ${p}' ${s}`;
|
|
1060
1060
|
}
|
|
1061
1061
|
if (n == "DMS") {
|
|
1062
|
-
const h = Math.floor(
|
|
1063
|
-
let
|
|
1064
|
-
const
|
|
1065
|
-
|
|
1062
|
+
const h = Math.floor(c), p = Math.floor(f);
|
|
1063
|
+
let b = ((c - h) * 60).toFixed(1).padStart(4, "0"), m = ((f - p) * 60).toFixed(1).padStart(4, "0");
|
|
1064
|
+
const y = h.toString().padStart(2, "0"), w = p.toString().padStart(2, "0");
|
|
1065
|
+
b.endsWith(".0") && m.endsWith(".0") && (b = b.replace(/\.0$/, ""), m = m.replace(/\.0$/, "")), u = `${l}° ${y}' ${b}" ${a}, ${d}° ${w}' ${m}" ${s}`;
|
|
1066
1066
|
}
|
|
1067
|
-
return
|
|
1067
|
+
return u;
|
|
1068
1068
|
} else
|
|
1069
1069
|
throw new Error("no decimal coordinates to convert");
|
|
1070
1070
|
}
|
|
@@ -1072,19 +1072,19 @@ function ti(n, e) {
|
|
|
1072
1072
|
const t = Math.pow(10, e);
|
|
1073
1073
|
return Math.round((n + Number.EPSILON) * t) / t;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Rt(n, e) {
|
|
1076
1076
|
e || (e = 5), n = n.replace(/\s+/g, " ").trim();
|
|
1077
|
-
let t = null, i = null, r = "", o = "",
|
|
1077
|
+
let t = null, i = null, r = "", o = "", a = null, s = [], u = !1;
|
|
1078
1078
|
if (Kn.test(n))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
1080
|
if (Kt.test(n))
|
|
1081
|
-
if (s = Kt.exec(n),
|
|
1082
|
-
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), i = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (i *= -1),
|
|
1081
|
+
if (s = Kt.exec(n), u = Be(s), u)
|
|
1082
|
+
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), i = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (i *= -1), a = "DM";
|
|
1083
1083
|
else
|
|
1084
1084
|
throw new Error("invalid coordinate format");
|
|
1085
1085
|
else if (Xt.test(n))
|
|
1086
|
-
if (s = Xt.exec(n),
|
|
1087
|
-
if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")),
|
|
1086
|
+
if (s = Xt.exec(n), u = Be(s), u) {
|
|
1087
|
+
if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")), a = "DD", Number(Math.round(t)) == Number(t))
|
|
1088
1088
|
throw new Error("integer only coordinate provided");
|
|
1089
1089
|
if (Number(Math.round(i)) == Number(i))
|
|
1090
1090
|
throw new Error("integer only coordinate provided");
|
|
@@ -1092,24 +1092,24 @@ function It(n, e) {
|
|
|
1092
1092
|
} else
|
|
1093
1093
|
throw new Error("invalid decimal coordinate format");
|
|
1094
1094
|
else if (Jt.test(n))
|
|
1095
|
-
if (s = Jt.exec(n),
|
|
1096
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60,
|
|
1095
|
+
if (s = Jt.exec(n), u = Be(s), u)
|
|
1096
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, a = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, a = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[9])), s[11] && (i += s[11] / 60), s[13] && (i += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (i = -1 * i), 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
1099
|
else if ($t.test(n))
|
|
1100
|
-
if (s = $t.exec(n),
|
|
1101
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60,
|
|
1100
|
+
if (s = $t.exec(n), u = Be(s), u)
|
|
1101
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, a = "DM"), s[6] && (t += s[6] / 3600, a = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12] / 60), s[14] && (i += s[14] / 3600), parseInt(s[10]) < 0 && (i = -1 * i), 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
1104
|
else if (ei.test(n)) {
|
|
1105
|
-
if (s = ei.exec(n),
|
|
1105
|
+
if (s = ei.exec(n), u = Be(s), s.filter((l) => l).length <= 5)
|
|
1106
1106
|
throw new Error("invalid coordinates format");
|
|
1107
|
-
if (
|
|
1108
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60,
|
|
1107
|
+
if (u)
|
|
1108
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, a = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, a = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12].replace(",", ".") / 60), s[14] && (i += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1109
1109
|
else
|
|
1110
1110
|
throw new Error("invalid coordinates format");
|
|
1111
1111
|
}
|
|
1112
|
-
if (
|
|
1112
|
+
if (u) {
|
|
1113
1113
|
if (Math.abs(i) >= 180)
|
|
1114
1114
|
throw new Error("invalid longitude value");
|
|
1115
1115
|
if (Math.abs(t) >= 90)
|
|
@@ -1119,50 +1119,50 @@ function It(n, e) {
|
|
|
1119
1119
|
if (r && r == o)
|
|
1120
1120
|
throw new Error("invalid coordinates format");
|
|
1121
1121
|
t.toString().includes(",") && (t = t.replace(",", ".")), i.toString().includes(",") && (i = i.replace(",", "."));
|
|
1122
|
-
let
|
|
1123
|
-
|
|
1122
|
+
let l = /S|SOUTH/i;
|
|
1123
|
+
l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(o) && i > 0 && (i = -1 * i);
|
|
1124
1124
|
const d = s[0].trim();
|
|
1125
|
-
let
|
|
1126
|
-
const h = /[,/;\u0020]/g,
|
|
1127
|
-
if (
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1125
|
+
let c, f;
|
|
1126
|
+
const h = /[,/;\u0020]/g, p = d.match(h);
|
|
1127
|
+
if (p == null) {
|
|
1128
|
+
const y = Math.floor(n.length / 2);
|
|
1129
|
+
c = d.substring(0, y).trim(), f = d.substring(y).trim();
|
|
1130
1130
|
} else {
|
|
1131
|
-
let
|
|
1132
|
-
|
|
1133
|
-
let
|
|
1134
|
-
if (
|
|
1135
|
-
|
|
1131
|
+
let y;
|
|
1132
|
+
p.length % 2 == 1 ? y = Math.floor(p.length / 2) : y = p.length / 2 - 1;
|
|
1133
|
+
let w = 0;
|
|
1134
|
+
if (y == 0)
|
|
1135
|
+
w = d.indexOf(p[0]), c = d.substring(0, w).trim(), f = d.substring(w + 1).trim();
|
|
1136
1136
|
else {
|
|
1137
|
-
let
|
|
1138
|
-
for (;
|
|
1139
|
-
|
|
1140
|
-
|
|
1137
|
+
let L = 0, E = 0;
|
|
1138
|
+
for (; L <= y; )
|
|
1139
|
+
w = d.indexOf(p[L], E), E = w + 1, L++;
|
|
1140
|
+
c = d.substring(0, w).trim(), f = d.substring(w + 1).trim();
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1143
|
+
const b = c.split(".");
|
|
1144
|
+
if (b.length == 2 && b[1] == 0 && b[1].length != 2)
|
|
1145
1145
|
throw new Error("invalid coordinates format");
|
|
1146
|
-
const
|
|
1147
|
-
if (
|
|
1146
|
+
const m = f.split(".");
|
|
1147
|
+
if (m.length == 2 && m[1] == 0 && m[1].length != 2)
|
|
1148
1148
|
throw new Error("invalid coordinates format");
|
|
1149
|
-
if (/^\d+$/.test(
|
|
1149
|
+
if (/^\d+$/.test(c) || /^\d+$/.test(f))
|
|
1150
1150
|
throw new Error("degree only coordinate/s provided");
|
|
1151
1151
|
return t = Number(Number(t).toFixed(e)), i = Number(Number(i).toFixed(e)), Object.freeze({
|
|
1152
1152
|
verbatimCoordinates: d,
|
|
1153
|
-
verbatimLatitude:
|
|
1153
|
+
verbatimLatitude: c,
|
|
1154
1154
|
verbatimLongitude: f,
|
|
1155
1155
|
decimalLatitude: t,
|
|
1156
1156
|
decimalLongitude: i,
|
|
1157
1157
|
decimalCoordinates: `${t},${i}`,
|
|
1158
|
-
originalFormat:
|
|
1158
|
+
originalFormat: a,
|
|
1159
1159
|
closeEnough: Jn,
|
|
1160
1160
|
toCoordinateFormat: Xn
|
|
1161
1161
|
});
|
|
1162
1162
|
} else
|
|
1163
1163
|
throw new Error("coordinates pattern match failed");
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function Be(n) {
|
|
1166
1166
|
if (!isNaN(n[0]))
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
const e = [...n];
|
|
@@ -1170,11 +1170,11 @@ function De(n) {
|
|
|
1170
1170
|
return !1;
|
|
1171
1171
|
const t = /^[-+]?\d+([\.,]\d+)?$/, i = /[eastsouthnorthwest]+/i, r = e.length / 2;
|
|
1172
1172
|
for (let o = 0; o < r; o++) {
|
|
1173
|
-
const
|
|
1174
|
-
if (!(
|
|
1175
|
-
if (
|
|
1173
|
+
const a = e[o], s = e[o + r], u = t.test(a) && t.test(s), l = i.test(a) && i.test(s), d = a == s;
|
|
1174
|
+
if (!(a == null && s == null)) {
|
|
1175
|
+
if (a == null || s == null)
|
|
1176
1176
|
return !1;
|
|
1177
|
-
if (
|
|
1177
|
+
if (u || l || d)
|
|
1178
1178
|
continue;
|
|
1179
1179
|
return !1;
|
|
1180
1180
|
}
|
|
@@ -1201,7 +1201,7 @@ const $n = Object.freeze({
|
|
|
1201
1201
|
DM: "DM",
|
|
1202
1202
|
DD: "DD"
|
|
1203
1203
|
});
|
|
1204
|
-
|
|
1204
|
+
Rt.to = $n;
|
|
1205
1205
|
const er = [
|
|
1206
1206
|
{
|
|
1207
1207
|
verbatimCoordinates: "40.123, -74.123",
|
|
@@ -1573,11 +1573,11 @@ function rr() {
|
|
|
1573
1573
|
}), [...n, ...ir, ...nr];
|
|
1574
1574
|
}
|
|
1575
1575
|
const or = rr();
|
|
1576
|
-
|
|
1577
|
-
const sr =
|
|
1576
|
+
Rt.formats = or.map((n) => n.verbatimCoordinates);
|
|
1577
|
+
const sr = Rt;
|
|
1578
1578
|
function ni(n, e, t) {
|
|
1579
1579
|
const i = n.slice();
|
|
1580
|
-
return i[
|
|
1580
|
+
return i[84] = e[t], i[86] = t, i;
|
|
1581
1581
|
}
|
|
1582
1582
|
function ri(n) {
|
|
1583
1583
|
let e, t;
|
|
@@ -1586,165 +1586,165 @@ function ri(n) {
|
|
|
1586
1586
|
_e(e.$$.fragment);
|
|
1587
1587
|
},
|
|
1588
1588
|
m(i, r) {
|
|
1589
|
-
|
|
1589
|
+
de(e, i, r), t = !0;
|
|
1590
1590
|
},
|
|
1591
1591
|
i(i) {
|
|
1592
|
-
t || (
|
|
1592
|
+
t || (Z(e.$$.fragment, i), t = !0);
|
|
1593
1593
|
},
|
|
1594
1594
|
o(i) {
|
|
1595
1595
|
V(e.$$.fragment, i), t = !1;
|
|
1596
1596
|
},
|
|
1597
1597
|
d(i) {
|
|
1598
|
-
|
|
1598
|
+
he(e, i);
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
1602
|
function oi(n) {
|
|
1603
1603
|
let e, t, i, r, o;
|
|
1604
|
-
return t = new
|
|
1604
|
+
return t = new qn({}), {
|
|
1605
1605
|
c() {
|
|
1606
1606
|
e = W("button"), _e(t.$$.fragment), v(e, "type", "button"), v(
|
|
1607
1607
|
e,
|
|
1608
1608
|
"title",
|
|
1609
1609
|
/*reverseButtonTitle*/
|
|
1610
1610
|
n[9]
|
|
1611
|
-
), v(e, "class", "svelte-1uvos7g"),
|
|
1611
|
+
), v(e, "class", "svelte-1uvos7g"), re(
|
|
1612
1612
|
e,
|
|
1613
1613
|
"active",
|
|
1614
1614
|
/*reverseActive*/
|
|
1615
1615
|
n[0]
|
|
1616
1616
|
);
|
|
1617
1617
|
},
|
|
1618
|
-
m(
|
|
1619
|
-
z(
|
|
1618
|
+
m(a, s) {
|
|
1619
|
+
z(a, e, s), de(t, e, null), i = !0, r || (o = J(
|
|
1620
1620
|
e,
|
|
1621
1621
|
"click",
|
|
1622
1622
|
/*click_handler_2*/
|
|
1623
|
-
n[
|
|
1623
|
+
n[69]
|
|
1624
1624
|
), r = !0);
|
|
1625
1625
|
},
|
|
1626
|
-
p(
|
|
1626
|
+
p(a, s) {
|
|
1627
1627
|
(!i || s[0] & /*reverseButtonTitle*/
|
|
1628
1628
|
512) && v(
|
|
1629
1629
|
e,
|
|
1630
1630
|
"title",
|
|
1631
1631
|
/*reverseButtonTitle*/
|
|
1632
|
-
|
|
1632
|
+
a[9]
|
|
1633
1633
|
), (!i || s[0] & /*reverseActive*/
|
|
1634
|
-
1) &&
|
|
1634
|
+
1) && re(
|
|
1635
1635
|
e,
|
|
1636
1636
|
"active",
|
|
1637
1637
|
/*reverseActive*/
|
|
1638
|
-
|
|
1638
|
+
a[0]
|
|
1639
1639
|
);
|
|
1640
1640
|
},
|
|
1641
|
-
i(
|
|
1642
|
-
i || (
|
|
1641
|
+
i(a) {
|
|
1642
|
+
i || (Z(t.$$.fragment, a), i = !0);
|
|
1643
1643
|
},
|
|
1644
|
-
o(
|
|
1645
|
-
V(t.$$.fragment,
|
|
1644
|
+
o(a) {
|
|
1645
|
+
V(t.$$.fragment, a), i = !1;
|
|
1646
1646
|
},
|
|
1647
|
-
d(
|
|
1648
|
-
|
|
1647
|
+
d(a) {
|
|
1648
|
+
a && B(e), he(t), r = !1, o();
|
|
1649
1649
|
}
|
|
1650
1650
|
};
|
|
1651
1651
|
}
|
|
1652
1652
|
function lr(n) {
|
|
1653
|
-
let e, t = [], i = /* @__PURE__ */ new Map(), r, o,
|
|
1653
|
+
let e, t = [], i = /* @__PURE__ */ new Map(), r, o, a, s = Vt(
|
|
1654
1654
|
/*listFeatures*/
|
|
1655
1655
|
n[14]
|
|
1656
1656
|
);
|
|
1657
|
-
const
|
|
1657
|
+
const u = (l) => (
|
|
1658
1658
|
/*feature*/
|
|
1659
|
-
|
|
1660
|
-
(
|
|
1661
|
-
|
|
1659
|
+
l[84].id + /*feature*/
|
|
1660
|
+
(l[84].address ? "," + /*feature*/
|
|
1661
|
+
l[84].address : "")
|
|
1662
1662
|
);
|
|
1663
|
-
for (let
|
|
1664
|
-
let d = ni(n, s,
|
|
1665
|
-
i.set(
|
|
1663
|
+
for (let l = 0; l < s.length; l += 1) {
|
|
1664
|
+
let d = ni(n, s, l), c = u(d);
|
|
1665
|
+
i.set(c, t[l] = si(c, d));
|
|
1666
1666
|
}
|
|
1667
1667
|
return {
|
|
1668
1668
|
c() {
|
|
1669
1669
|
e = W("ul");
|
|
1670
|
-
for (let
|
|
1671
|
-
t[
|
|
1670
|
+
for (let l = 0; l < t.length; l += 1)
|
|
1671
|
+
t[l].c();
|
|
1672
1672
|
v(e, "class", "svelte-1uvos7g");
|
|
1673
1673
|
},
|
|
1674
|
-
m(
|
|
1675
|
-
z(
|
|
1676
|
-
for (let
|
|
1677
|
-
t[
|
|
1678
|
-
r = !0, o || (
|
|
1674
|
+
m(l, d) {
|
|
1675
|
+
z(l, e, d);
|
|
1676
|
+
for (let c = 0; c < t.length; c += 1)
|
|
1677
|
+
t[c] && t[c].m(e, null);
|
|
1678
|
+
r = !0, o || (a = [
|
|
1679
1679
|
J(
|
|
1680
1680
|
e,
|
|
1681
1681
|
"mouseleave",
|
|
1682
1682
|
/*mouseleave_handler*/
|
|
1683
|
-
n[
|
|
1683
|
+
n[73]
|
|
1684
1684
|
),
|
|
1685
1685
|
J(
|
|
1686
1686
|
e,
|
|
1687
1687
|
"blur",
|
|
1688
1688
|
/*blur_handler_1*/
|
|
1689
|
-
n[
|
|
1689
|
+
n[74]
|
|
1690
1690
|
)
|
|
1691
1691
|
], o = !0);
|
|
1692
1692
|
},
|
|
1693
|
-
p(
|
|
1693
|
+
p(l, d) {
|
|
1694
1694
|
d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
|
|
1695
1695
|
17880064 && (s = Vt(
|
|
1696
1696
|
/*listFeatures*/
|
|
1697
|
-
|
|
1698
|
-
),
|
|
1697
|
+
l[14]
|
|
1698
|
+
), tt(), t = Ln(t, d, u, 1, l, s, i, e, En, si, null, ni), it());
|
|
1699
1699
|
},
|
|
1700
|
-
i(
|
|
1700
|
+
i(l) {
|
|
1701
1701
|
if (!r) {
|
|
1702
1702
|
for (let d = 0; d < s.length; d += 1)
|
|
1703
|
-
|
|
1703
|
+
Z(t[d]);
|
|
1704
1704
|
r = !0;
|
|
1705
1705
|
}
|
|
1706
1706
|
},
|
|
1707
|
-
o(
|
|
1707
|
+
o(l) {
|
|
1708
1708
|
for (let d = 0; d < t.length; d += 1)
|
|
1709
1709
|
V(t[d]);
|
|
1710
1710
|
r = !1;
|
|
1711
1711
|
},
|
|
1712
|
-
d(
|
|
1713
|
-
|
|
1712
|
+
d(l) {
|
|
1713
|
+
l && B(e);
|
|
1714
1714
|
for (let d = 0; d < t.length; d += 1)
|
|
1715
1715
|
t[d].d();
|
|
1716
|
-
o = !1,
|
|
1716
|
+
o = !1, ge(a);
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
1720
|
function ur(n) {
|
|
1721
|
-
let e, t, i, r, o,
|
|
1722
|
-
return t = new
|
|
1721
|
+
let e, t, i, r, o, a;
|
|
1722
|
+
return t = new Ti({}), {
|
|
1723
1723
|
c() {
|
|
1724
|
-
e = W("div"), _e(t.$$.fragment), i =
|
|
1724
|
+
e = W("div"), _e(t.$$.fragment), i = te(), r = W("div"), o = be(
|
|
1725
1725
|
/*noResultsMessage*/
|
|
1726
1726
|
n[7]
|
|
1727
1727
|
), v(r, "class", "svelte-1uvos7g"), v(e, "class", "no-results svelte-1uvos7g");
|
|
1728
1728
|
},
|
|
1729
|
-
m(s,
|
|
1730
|
-
z(s, e,
|
|
1729
|
+
m(s, u) {
|
|
1730
|
+
z(s, e, u), de(t, e, null), P(e, i), P(e, r), P(r, o), a = !0;
|
|
1731
1731
|
},
|
|
1732
|
-
p(s,
|
|
1733
|
-
(!
|
|
1734
|
-
128) &&
|
|
1732
|
+
p(s, u) {
|
|
1733
|
+
(!a || u[0] & /*noResultsMessage*/
|
|
1734
|
+
128) && ze(
|
|
1735
1735
|
o,
|
|
1736
1736
|
/*noResultsMessage*/
|
|
1737
1737
|
s[7]
|
|
1738
1738
|
);
|
|
1739
1739
|
},
|
|
1740
1740
|
i(s) {
|
|
1741
|
-
|
|
1741
|
+
a || (Z(t.$$.fragment, s), a = !0);
|
|
1742
1742
|
},
|
|
1743
1743
|
o(s) {
|
|
1744
|
-
V(t.$$.fragment, s),
|
|
1744
|
+
V(t.$$.fragment, s), a = !1;
|
|
1745
1745
|
},
|
|
1746
1746
|
d(s) {
|
|
1747
|
-
s && B(e),
|
|
1747
|
+
s && B(e), he(t);
|
|
1748
1748
|
}
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
@@ -1752,7 +1752,7 @@ function ar(n) {
|
|
|
1752
1752
|
let e = "", t;
|
|
1753
1753
|
return {
|
|
1754
1754
|
c() {
|
|
1755
|
-
t =
|
|
1755
|
+
t = be(e);
|
|
1756
1756
|
},
|
|
1757
1757
|
m(i, r) {
|
|
1758
1758
|
z(i, t, r);
|
|
@@ -1766,38 +1766,38 @@ function ar(n) {
|
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
1768
|
function cr(n) {
|
|
1769
|
-
let e, t, i, r, o,
|
|
1770
|
-
return t = new
|
|
1769
|
+
let e, t, i, r, o, a, s, u, l, d, c;
|
|
1770
|
+
return t = new Ti({}), u = new Ni({}), {
|
|
1771
1771
|
c() {
|
|
1772
|
-
e = W("div"), _e(t.$$.fragment), i =
|
|
1772
|
+
e = W("div"), _e(t.$$.fragment), i = te(), r = W("div"), o = be(
|
|
1773
1773
|
/*errorMessage*/
|
|
1774
1774
|
n[6]
|
|
1775
|
-
),
|
|
1775
|
+
), a = te(), s = W("button"), _e(u.$$.fragment), v(r, "class", "svelte-1uvos7g"), v(s, "class", "svelte-1uvos7g"), v(e, "class", "error svelte-1uvos7g");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(f, h) {
|
|
1778
|
-
z(f, e, h),
|
|
1778
|
+
z(f, e, h), de(t, e, null), P(e, i), P(e, r), P(r, o), P(e, a), P(e, s), de(u, s, null), l = !0, d || (c = J(
|
|
1779
1779
|
s,
|
|
1780
1780
|
"click",
|
|
1781
1781
|
/*click_handler_3*/
|
|
1782
|
-
n[
|
|
1782
|
+
n[70]
|
|
1783
1783
|
), d = !0);
|
|
1784
1784
|
},
|
|
1785
1785
|
p(f, h) {
|
|
1786
|
-
(!
|
|
1787
|
-
64) &&
|
|
1786
|
+
(!l || h[0] & /*errorMessage*/
|
|
1787
|
+
64) && ze(
|
|
1788
1788
|
o,
|
|
1789
1789
|
/*errorMessage*/
|
|
1790
1790
|
f[6]
|
|
1791
1791
|
);
|
|
1792
1792
|
},
|
|
1793
1793
|
i(f) {
|
|
1794
|
-
|
|
1794
|
+
l || (Z(t.$$.fragment, f), Z(u.$$.fragment, f), l = !0);
|
|
1795
1795
|
},
|
|
1796
1796
|
o(f) {
|
|
1797
|
-
V(t.$$.fragment, f), V(
|
|
1797
|
+
V(t.$$.fragment, f), V(u.$$.fragment, f), l = !1;
|
|
1798
1798
|
},
|
|
1799
1799
|
d(f) {
|
|
1800
|
-
f && B(e),
|
|
1800
|
+
f && B(e), he(t), he(u), d = !1, c();
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
@@ -1806,18 +1806,18 @@ function si(n, e) {
|
|
|
1806
1806
|
function o() {
|
|
1807
1807
|
return (
|
|
1808
1808
|
/*mouseenter_handler*/
|
|
1809
|
-
e[
|
|
1809
|
+
e[71](
|
|
1810
1810
|
/*i*/
|
|
1811
|
-
e[
|
|
1811
|
+
e[86]
|
|
1812
1812
|
)
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function a() {
|
|
1816
1816
|
return (
|
|
1817
1817
|
/*focus_handler_1*/
|
|
1818
|
-
e[
|
|
1818
|
+
e[72](
|
|
1819
1819
|
/*feature*/
|
|
1820
|
-
e[
|
|
1820
|
+
e[84]
|
|
1821
1821
|
)
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
@@ -1825,7 +1825,7 @@ function si(n, e) {
|
|
|
1825
1825
|
props: {
|
|
1826
1826
|
feature: (
|
|
1827
1827
|
/*feature*/
|
|
1828
|
-
e[
|
|
1828
|
+
e[84]
|
|
1829
1829
|
),
|
|
1830
1830
|
showPlaceType: (
|
|
1831
1831
|
/*showPlaceType*/
|
|
@@ -1834,7 +1834,7 @@ function si(n, e) {
|
|
|
1834
1834
|
selected: (
|
|
1835
1835
|
/*selectedItemIndex*/
|
|
1836
1836
|
e[15] === /*i*/
|
|
1837
|
-
e[
|
|
1837
|
+
e[86]
|
|
1838
1838
|
),
|
|
1839
1839
|
missingIconsCache: (
|
|
1840
1840
|
/*missingIconsCache*/
|
|
@@ -1845,62 +1845,62 @@ function si(n, e) {
|
|
|
1845
1845
|
e[12]
|
|
1846
1846
|
)
|
|
1847
1847
|
}
|
|
1848
|
-
}), i.$on("mouseenter", o), i.$on("focus",
|
|
1848
|
+
}), i.$on("mouseenter", o), i.$on("focus", a), {
|
|
1849
1849
|
key: n,
|
|
1850
1850
|
first: null,
|
|
1851
1851
|
c() {
|
|
1852
1852
|
t = dn(), _e(i.$$.fragment), this.first = t;
|
|
1853
1853
|
},
|
|
1854
|
-
m(s,
|
|
1855
|
-
z(s, t,
|
|
1854
|
+
m(s, u) {
|
|
1855
|
+
z(s, t, u), de(i, s, u), r = !0;
|
|
1856
1856
|
},
|
|
1857
|
-
p(s,
|
|
1857
|
+
p(s, u) {
|
|
1858
1858
|
e = s;
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1861
|
-
16384 && (
|
|
1862
|
-
e[
|
|
1863
|
-
1024 && (
|
|
1864
|
-
e[10]),
|
|
1865
|
-
49152 && (
|
|
1859
|
+
const l = {};
|
|
1860
|
+
u[0] & /*listFeatures*/
|
|
1861
|
+
16384 && (l.feature = /*feature*/
|
|
1862
|
+
e[84]), u[0] & /*showPlaceType*/
|
|
1863
|
+
1024 && (l.showPlaceType = /*showPlaceType*/
|
|
1864
|
+
e[10]), u[0] & /*selectedItemIndex, listFeatures*/
|
|
1865
|
+
49152 && (l.selected = /*selectedItemIndex*/
|
|
1866
1866
|
e[15] === /*i*/
|
|
1867
|
-
e[
|
|
1868
|
-
4096 && (
|
|
1869
|
-
e[12]), i.$set(
|
|
1867
|
+
e[86]), u[0] & /*iconsBaseUrl*/
|
|
1868
|
+
4096 && (l.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1869
|
+
e[12]), i.$set(l);
|
|
1870
1870
|
},
|
|
1871
1871
|
i(s) {
|
|
1872
|
-
r || (
|
|
1872
|
+
r || (Z(i.$$.fragment, s), r = !0);
|
|
1873
1873
|
},
|
|
1874
1874
|
o(s) {
|
|
1875
1875
|
V(i.$$.fragment, s), r = !1;
|
|
1876
1876
|
},
|
|
1877
1877
|
d(s) {
|
|
1878
|
-
s && B(t),
|
|
1878
|
+
s && B(t), he(i, s);
|
|
1879
1879
|
}
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
1882
|
function fr(n) {
|
|
1883
|
-
let e, t, i, r, o,
|
|
1884
|
-
o = new Hn({}),
|
|
1885
|
-
let
|
|
1883
|
+
let e, t, i, r, o, a, s, u, l, d, c, f, h, p, b, m, y, w, L, E, C, x = !1;
|
|
1884
|
+
o = new Hn({}), c = new Ni({});
|
|
1885
|
+
let S = (
|
|
1886
1886
|
/*abortController*/
|
|
1887
1887
|
n[19] && ri()
|
|
1888
|
-
),
|
|
1888
|
+
), _ = (
|
|
1889
1889
|
/*enableReverse*/
|
|
1890
1890
|
n[5] === !0 && oi(n)
|
|
1891
1891
|
);
|
|
1892
|
-
const
|
|
1892
|
+
const k = (
|
|
1893
1893
|
/*#slots*/
|
|
1894
|
-
n[
|
|
1894
|
+
n[61].default
|
|
1895
1895
|
), I = un(
|
|
1896
|
-
|
|
1896
|
+
k,
|
|
1897
1897
|
n,
|
|
1898
1898
|
/*$$scope*/
|
|
1899
|
-
n[
|
|
1899
|
+
n[60],
|
|
1900
1900
|
null
|
|
1901
|
-
), D = [cr, ar, ur, lr],
|
|
1902
|
-
function O(M,
|
|
1903
|
-
var $,
|
|
1901
|
+
), D = [cr, ar, ur, lr], G = [];
|
|
1902
|
+
function O(M, F) {
|
|
1903
|
+
var $, oe;
|
|
1904
1904
|
return (
|
|
1905
1905
|
/*error*/
|
|
1906
1906
|
M[18] ? 0 : (
|
|
@@ -1910,15 +1910,15 @@ function fr(n) {
|
|
|
1910
1910
|
(($ = M[14]) == null ? void 0 : $.length) === 0 ? 2 : (
|
|
1911
1911
|
/*focusedDelayed*/
|
|
1912
1912
|
M[16] && /*listFeatures*/
|
|
1913
|
-
((
|
|
1913
|
+
((oe = M[14]) != null && oe.length) ? 3 : -1
|
|
1914
1914
|
)
|
|
1915
1915
|
) : 1
|
|
1916
1916
|
)
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
return ~(
|
|
1919
|
+
return ~(m = O(n)) && (y = G[m] = D[m](n)), {
|
|
1920
1920
|
c() {
|
|
1921
|
-
e =
|
|
1921
|
+
e = te(), t = W("form"), i = W("div"), r = W("button"), _e(o.$$.fragment), a = te(), s = W("input"), u = te(), l = W("div"), d = W("button"), _e(c.$$.fragment), f = te(), S && S.c(), h = te(), _ && _.c(), p = te(), I && I.c(), b = te(), y && y.c(), v(r, "class", "search-button svelte-1uvos7g"), v(r, "type", "button"), v(
|
|
1922
1922
|
s,
|
|
1923
1923
|
"placeholder",
|
|
1924
1924
|
/*placeholder*/
|
|
@@ -1933,15 +1933,15 @@ function fr(n) {
|
|
|
1933
1933
|
"title",
|
|
1934
1934
|
/*clearButtonTitle*/
|
|
1935
1935
|
n[3]
|
|
1936
|
-
), v(d, "class", "svelte-1uvos7g"), v(
|
|
1937
|
-
|
|
1936
|
+
), v(d, "class", "svelte-1uvos7g"), v(l, "class", "clear-button-container svelte-1uvos7g"), re(
|
|
1937
|
+
l,
|
|
1938
1938
|
"displayable",
|
|
1939
1939
|
/*searchValue*/
|
|
1940
1940
|
n[1] !== ""
|
|
1941
|
-
), v(i, "class", "input-group svelte-1uvos7g"), v(t, "tabindex", "0"), v(t, "class",
|
|
1941
|
+
), v(i, "class", "input-group svelte-1uvos7g"), v(t, "tabindex", "0"), v(t, "class", w = Zt(
|
|
1942
1942
|
/*className*/
|
|
1943
1943
|
n[2]
|
|
1944
|
-
) + " svelte-1uvos7g"),
|
|
1944
|
+
) + " svelte-1uvos7g"), re(
|
|
1945
1945
|
t,
|
|
1946
1946
|
"can-collapse",
|
|
1947
1947
|
/*collapsed*/
|
|
@@ -1949,35 +1949,35 @@ function fr(n) {
|
|
|
1949
1949
|
n[1] === ""
|
|
1950
1950
|
);
|
|
1951
1951
|
},
|
|
1952
|
-
m(M,
|
|
1953
|
-
z(M, e,
|
|
1952
|
+
m(M, F) {
|
|
1953
|
+
z(M, e, F), z(M, t, F), P(t, i), P(i, r), de(o, r, null), P(i, a), P(i, s), n[63](s), qt(
|
|
1954
1954
|
s,
|
|
1955
1955
|
/*searchValue*/
|
|
1956
1956
|
n[1]
|
|
1957
|
-
),
|
|
1957
|
+
), P(i, u), P(i, l), P(l, d), de(c, d, null), P(l, f), S && S.m(l, null), P(i, h), _ && _.m(i, null), P(i, p), I && I.m(i, null), P(t, b), ~m && G[m].m(t, null), L = !0, E || (C = [
|
|
1958
1958
|
J(
|
|
1959
1959
|
r,
|
|
1960
1960
|
"click",
|
|
1961
1961
|
/*click_handler*/
|
|
1962
|
-
n[
|
|
1962
|
+
n[62]
|
|
1963
1963
|
),
|
|
1964
1964
|
J(
|
|
1965
1965
|
s,
|
|
1966
1966
|
"input",
|
|
1967
1967
|
/*input_1_input_handler*/
|
|
1968
|
-
n[
|
|
1968
|
+
n[64]
|
|
1969
1969
|
),
|
|
1970
1970
|
J(
|
|
1971
1971
|
s,
|
|
1972
1972
|
"focus",
|
|
1973
1973
|
/*focus_handler*/
|
|
1974
|
-
n[
|
|
1974
|
+
n[65]
|
|
1975
1975
|
),
|
|
1976
1976
|
J(
|
|
1977
1977
|
s,
|
|
1978
1978
|
"blur",
|
|
1979
1979
|
/*blur_handler*/
|
|
1980
|
-
n[
|
|
1980
|
+
n[66]
|
|
1981
1981
|
),
|
|
1982
1982
|
J(
|
|
1983
1983
|
s,
|
|
@@ -1989,87 +1989,87 @@ function fr(n) {
|
|
|
1989
1989
|
s,
|
|
1990
1990
|
"input",
|
|
1991
1991
|
/*input_handler*/
|
|
1992
|
-
n[
|
|
1992
|
+
n[67]
|
|
1993
1993
|
),
|
|
1994
1994
|
J(
|
|
1995
1995
|
d,
|
|
1996
1996
|
"click",
|
|
1997
1997
|
/*click_handler_1*/
|
|
1998
|
-
n[
|
|
1998
|
+
n[68]
|
|
1999
1999
|
),
|
|
2000
2000
|
J(t, "submit", hn(
|
|
2001
2001
|
/*handleOnSubmit*/
|
|
2002
2002
|
n[21]
|
|
2003
2003
|
))
|
|
2004
|
-
],
|
|
2004
|
+
], E = !0);
|
|
2005
2005
|
},
|
|
2006
|
-
p(M,
|
|
2007
|
-
(!
|
|
2006
|
+
p(M, F) {
|
|
2007
|
+
(!L || F[0] & /*placeholder*/
|
|
2008
2008
|
256) && v(
|
|
2009
2009
|
s,
|
|
2010
2010
|
"placeholder",
|
|
2011
2011
|
/*placeholder*/
|
|
2012
2012
|
M[8]
|
|
2013
|
-
), (!
|
|
2013
|
+
), (!L || F[0] & /*placeholder*/
|
|
2014
2014
|
256) && v(
|
|
2015
2015
|
s,
|
|
2016
2016
|
"aria-label",
|
|
2017
2017
|
/*placeholder*/
|
|
2018
2018
|
M[8]
|
|
2019
|
-
),
|
|
2019
|
+
), F[0] & /*searchValue*/
|
|
2020
2020
|
2 && s.value !== /*searchValue*/
|
|
2021
|
-
M[1] &&
|
|
2021
|
+
M[1] && qt(
|
|
2022
2022
|
s,
|
|
2023
2023
|
/*searchValue*/
|
|
2024
2024
|
M[1]
|
|
2025
|
-
), (!
|
|
2025
|
+
), (!L || F[0] & /*clearButtonTitle*/
|
|
2026
2026
|
8) && v(
|
|
2027
2027
|
d,
|
|
2028
2028
|
"title",
|
|
2029
2029
|
/*clearButtonTitle*/
|
|
2030
2030
|
M[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
|
-
M[19] ?
|
|
2033
|
-
524288 &&
|
|
2034
|
-
|
|
2035
|
-
}),
|
|
2036
|
-
2) &&
|
|
2037
|
-
|
|
2032
|
+
M[19] ? S ? F[0] & /*abortController*/
|
|
2033
|
+
524288 && Z(S, 1) : (S = ri(), S.c(), Z(S, 1), S.m(l, null)) : S && (tt(), V(S, 1, 1, () => {
|
|
2034
|
+
S = null;
|
|
2035
|
+
}), it()), (!L || F[0] & /*searchValue*/
|
|
2036
|
+
2) && re(
|
|
2037
|
+
l,
|
|
2038
2038
|
"displayable",
|
|
2039
2039
|
/*searchValue*/
|
|
2040
2040
|
M[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
|
-
M[5] === !0 ?
|
|
2043
|
-
32 &&
|
|
2044
|
-
|
|
2045
|
-
}),
|
|
2046
|
-
|
|
2042
|
+
M[5] === !0 ? _ ? (_.p(M, F), F[0] & /*enableReverse*/
|
|
2043
|
+
32 && Z(_, 1)) : (_ = oi(M), _.c(), Z(_, 1), _.m(i, p)) : _ && (tt(), V(_, 1, 1, () => {
|
|
2044
|
+
_ = null;
|
|
2045
|
+
}), it()), I && I.p && (!L || F[1] & /*$$scope*/
|
|
2046
|
+
536870912) && cn(
|
|
2047
2047
|
I,
|
|
2048
|
-
|
|
2048
|
+
k,
|
|
2049
2049
|
M,
|
|
2050
2050
|
/*$$scope*/
|
|
2051
|
-
M[
|
|
2052
|
-
|
|
2053
|
-
|
|
2051
|
+
M[60],
|
|
2052
|
+
L ? an(
|
|
2053
|
+
k,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
|
-
M[
|
|
2056
|
-
|
|
2055
|
+
M[60],
|
|
2056
|
+
F,
|
|
2057
2057
|
null
|
|
2058
2058
|
) : fn(
|
|
2059
2059
|
/*$$scope*/
|
|
2060
|
-
M[
|
|
2060
|
+
M[60]
|
|
2061
2061
|
),
|
|
2062
2062
|
null
|
|
2063
2063
|
);
|
|
2064
|
-
let $ =
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
}),
|
|
2068
|
-
4 &&
|
|
2064
|
+
let $ = m;
|
|
2065
|
+
m = O(M), m === $ ? ~m && G[m].p(M, F) : (y && (tt(), V(G[$], 1, 1, () => {
|
|
2066
|
+
G[$] = null;
|
|
2067
|
+
}), it()), ~m ? (y = G[m], y ? y.p(M, F) : (y = G[m] = D[m](M), y.c()), Z(y, 1), y.m(t, null)) : y = null), (!L || F[0] & /*className*/
|
|
2068
|
+
4 && w !== (w = Zt(
|
|
2069
2069
|
/*className*/
|
|
2070
2070
|
M[2]
|
|
2071
|
-
) + " svelte-1uvos7g")) && v(t, "class",
|
|
2072
|
-
22) &&
|
|
2071
|
+
) + " svelte-1uvos7g")) && v(t, "class", w), (!L || F[0] & /*className, collapsed, searchValue*/
|
|
2072
|
+
22) && re(
|
|
2073
2073
|
t,
|
|
2074
2074
|
"can-collapse",
|
|
2075
2075
|
/*collapsed*/
|
|
@@ -2078,19 +2078,19 @@ function fr(n) {
|
|
|
2078
2078
|
);
|
|
2079
2079
|
},
|
|
2080
2080
|
i(M) {
|
|
2081
|
-
|
|
2081
|
+
L || (Z(x), Z(o.$$.fragment, M), Z(c.$$.fragment, M), Z(S), Z(_), Z(I, M), Z(y), L = !0);
|
|
2082
2082
|
},
|
|
2083
2083
|
o(M) {
|
|
2084
|
-
V(x), V(o.$$.fragment, M), V(
|
|
2084
|
+
V(x), V(o.$$.fragment, M), V(c.$$.fragment, M), V(S), V(_), V(I, M), V(y), L = !1;
|
|
2085
2085
|
},
|
|
2086
2086
|
d(M) {
|
|
2087
|
-
M && (B(e), B(t)),
|
|
2087
|
+
M && (B(e), B(t)), he(o), n[63](null), he(c), S && S.d(), _ && _.d(), I && I.d(M), ~m && G[m].d(), E = !1, ge(C);
|
|
2088
2088
|
}
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
2091
|
function dr(n, e, t) {
|
|
2092
2092
|
let i, { $$slots: r = {}, $$scope: o } = e;
|
|
2093
|
-
const
|
|
2093
|
+
const a = {
|
|
2094
2094
|
continental_marine: 4,
|
|
2095
2095
|
country: 4,
|
|
2096
2096
|
major_landform: 8,
|
|
@@ -2114,221 +2114,221 @@ function dr(n, e, t) {
|
|
|
2114
2114
|
"poi.restaurant": 18,
|
|
2115
2115
|
"poi.aerodrome": 13
|
|
2116
2116
|
};
|
|
2117
|
-
let { class: s = void 0 } = e, { apiKey:
|
|
2117
|
+
let { class: s = void 0 } = e, { apiKey: u } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: c = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: p = 200 } = e, { enableReverse: b = !1 } = e, { errorMessage: m = "Something went wrong…" } = e, { filter: y = () => !0 } = e, { flyTo: w = !0 } = e, { fuzzyMatch: L = !0 } = e, { language: E = void 0 } = e, { limit: C = void 0 } = e, { mapController: x = void 0 } = e, { minLength: S = 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: D = b === "always" } = e, { reverseButtonTitle: G = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType: F = "ifNeeded" } = e, { showResultsWhileTyping: $ = !0 } = e, { selectFirst: oe = !0 } = e, { flyToSelected: lt = !1 } = e, { markerOnSelected: Qe = !0 } = e, { types: xe = void 0 } = e, { exhaustiveReverseGeocoding: ut = !1 } = e, { excludeTypes: He = !1 } = e, { zoom: ke = a } = e, { maxZoom: Ve = void 0 } = e, { apiUrl: at = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ct = {} } = e, { iconsBaseUrl: At = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0/icons/" } = e, { adjustUrlQuery: ft = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
|
-
function Wi() {
|
|
2120
|
-
ae.focus();
|
|
2121
|
-
}
|
|
2122
2119
|
function Ai() {
|
|
2123
|
-
|
|
2124
|
-
}
|
|
2125
|
-
function Dt(g, Z = !0, H = !1) {
|
|
2126
|
-
t(1, O = g), Z ? (t(15, U = -1), zt()) : (pt(!H, H), setTimeout(() => {
|
|
2127
|
-
ae.focus(), ae.select();
|
|
2128
|
-
}));
|
|
2120
|
+
ue.focus();
|
|
2129
2121
|
}
|
|
2130
2122
|
function Bi() {
|
|
2131
|
-
|
|
2123
|
+
ue.blur();
|
|
2124
|
+
}
|
|
2125
|
+
function Bt(g, j = !0, H = !1) {
|
|
2126
|
+
t(1, O = g), j ? (t(15, U = -1), Ut()) : (mt(!H, H), setTimeout(() => {
|
|
2127
|
+
ue.focus(), ue.select();
|
|
2128
|
+
}));
|
|
2132
2129
|
}
|
|
2133
2130
|
function Di() {
|
|
2134
|
-
t(
|
|
2131
|
+
t(14, R = void 0), t(57, N = void 0), t(15, U = -1);
|
|
2132
|
+
}
|
|
2133
|
+
function Ui() {
|
|
2134
|
+
t(56, q = []), t(57, N = void 0);
|
|
2135
2135
|
}
|
|
2136
|
-
let
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2136
|
+
let Ne = !1, R, q, N, Dt = "", ue, U = -1, ae, Ye = [], Me, Te, Ke, dt;
|
|
2137
|
+
const zi = /* @__PURE__ */ new Set(), me = vn();
|
|
2138
|
+
yn(() => {
|
|
2139
2139
|
x && (x.setEventHandler(void 0), x.indicateReverse(!1), x.setSelectedMarker(-1), x.setMarkers(void 0, void 0));
|
|
2140
2140
|
});
|
|
2141
|
-
function
|
|
2141
|
+
function Ut(g) {
|
|
2142
2142
|
if (Te && (clearTimeout(Te), Te = void 0), U > -1 && R)
|
|
2143
|
-
t(
|
|
2143
|
+
t(57, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ae = void 0), t(56, q = void 0), t(15, U = -1);
|
|
2144
2144
|
else if (O) {
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2147
|
-
t(
|
|
2148
|
-
}).catch((H) => t(18,
|
|
2145
|
+
const j = g || !ht(O);
|
|
2146
|
+
gt(O, { exact: !0 }).then(() => {
|
|
2147
|
+
t(56, q = R), t(57, N = void 0), j && Gi();
|
|
2148
|
+
}).catch((H) => t(18, ae = H));
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
|
-
function
|
|
2151
|
+
function ht(g) {
|
|
2152
2152
|
try {
|
|
2153
2153
|
return sr(g, 6);
|
|
2154
2154
|
} catch {
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
|
-
async function
|
|
2159
|
-
t(18,
|
|
2158
|
+
async function gt(g, { byId: j = !1, exact: H = !1 } = {}) {
|
|
2159
|
+
t(18, ae = void 0), Me == null || Me.abort();
|
|
2160
2160
|
const ee = new AbortController();
|
|
2161
2161
|
t(19, Me = ee);
|
|
2162
2162
|
try {
|
|
2163
|
-
const
|
|
2164
|
-
if (
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2163
|
+
const T = ht(g), Q = new URLSearchParams();
|
|
2164
|
+
if (E !== void 0 && Q.set("language", Array.isArray(E) ? E.join(",") : E ?? ""), xe && Q.set("types", xe.join(",")), He && Q.set("excludeTypes", String(He)), l && Q.set("bbox", l.map((Xe) => Xe.toFixed(6)).join(",")), h && Q.set("country", Array.isArray(h) ? h.join(",") : h), !j && !T) {
|
|
2165
|
+
const Xe = await Yn(x, I, ee);
|
|
2166
|
+
Xe && Q.set("proximity", Xe), (H || !$) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(L));
|
|
2167
2167
|
}
|
|
2168
|
-
|
|
2169
|
-
const
|
|
2170
|
-
if (
|
|
2171
|
-
|
|
2168
|
+
C !== void 0 && (ut || !T || (xe == null ? void 0 : xe.length) === 1) && Q.set("limit", String(C)), Q.set("key", u), ft(Q);
|
|
2169
|
+
const ce = at + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : g) + ".json?" + Q.toString();
|
|
2170
|
+
if (ce === Dt) {
|
|
2171
|
+
j ? (t(14, R = void 0), t(57, N = Ye[0])) : t(14, R = Ye);
|
|
2172
2172
|
return;
|
|
2173
2173
|
}
|
|
2174
|
-
|
|
2175
|
-
const
|
|
2176
|
-
if (!
|
|
2177
|
-
throw new Error(await
|
|
2178
|
-
const
|
|
2179
|
-
|
|
2174
|
+
Dt = ce;
|
|
2175
|
+
const vt = await fetch(ce, { signal: ee.signal, ...ct });
|
|
2176
|
+
if (!vt.ok)
|
|
2177
|
+
throw new Error(await vt.text());
|
|
2178
|
+
const pt = await vt.json();
|
|
2179
|
+
me("response", { url: ce, featureCollection: pt }), j ? (t(14, R = void 0), t(57, N = pt.features[0]), Ye = [N]) : (t(14, R = pt.features.filter(y)), T && R.unshift({
|
|
2180
2180
|
type: "Feature",
|
|
2181
2181
|
properties: {},
|
|
2182
|
-
id: "reverse_" +
|
|
2183
|
-
text:
|
|
2184
|
-
place_name:
|
|
2182
|
+
id: "reverse_" + T.decimalLongitude + "_" + T.decimalLatitude,
|
|
2183
|
+
text: T.decimalLatitude + ", " + T.decimalLongitude,
|
|
2184
|
+
place_name: T.decimalLatitude + ", " + T.decimalLongitude,
|
|
2185
2185
|
place_type: ["reverse"],
|
|
2186
|
-
center: [
|
|
2186
|
+
center: [T.decimalLongitude, T.decimalLatitude],
|
|
2187
2187
|
bbox: [
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2188
|
+
T.decimalLongitude,
|
|
2189
|
+
T.decimalLatitude,
|
|
2190
|
+
T.decimalLongitude,
|
|
2191
|
+
T.decimalLatitude
|
|
2192
2192
|
],
|
|
2193
2193
|
geometry: {
|
|
2194
2194
|
type: "Point",
|
|
2195
|
-
coordinates: [
|
|
2195
|
+
coordinates: [T.decimalLongitude, T.decimalLatitude]
|
|
2196
2196
|
}
|
|
2197
|
-
}),
|
|
2198
|
-
} catch (
|
|
2199
|
-
if (
|
|
2197
|
+
}), Ye = R, T && ue.focus());
|
|
2198
|
+
} catch (T) {
|
|
2199
|
+
if (T && typeof T == "object" && "name" in T && T.name === "AbortError")
|
|
2200
2200
|
return;
|
|
2201
|
-
throw
|
|
2201
|
+
throw T;
|
|
2202
2202
|
} finally {
|
|
2203
2203
|
ee === Me && t(19, Me = void 0);
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2206
|
+
function Gi() {
|
|
2207
2207
|
var ee;
|
|
2208
|
-
if (!(
|
|
2208
|
+
if (!(q != null && q.length) || !w)
|
|
2209
2209
|
return;
|
|
2210
|
-
const g = [180, 90, -180, -90],
|
|
2210
|
+
const g = [180, 90, -180, -90], j = !q.some((T) => !T.matching_text);
|
|
2211
2211
|
let H;
|
|
2212
|
-
for (const
|
|
2213
|
-
const Q =
|
|
2214
|
-
if (H =
|
|
2215
|
-
for (const
|
|
2216
|
-
g[
|
|
2212
|
+
for (const T of q) {
|
|
2213
|
+
const Q = We(T);
|
|
2214
|
+
if (H = Ve ?? (H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q)), j || !T.matching_text)
|
|
2215
|
+
for (const ce of [0, 1, 2, 3])
|
|
2216
|
+
g[ce] = Math[ce < 2 ? "min" : "max"](g[ce], ((ee = T.bbox) == null ? void 0 : ee[ce]) ?? T.center[ce % 2]);
|
|
2217
2217
|
}
|
|
2218
|
-
x &&
|
|
2218
|
+
x && q.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center, We(N)) : x.fitBounds(rt(g), 50, H));
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2220
|
+
function We(g) {
|
|
2221
2221
|
var H;
|
|
2222
2222
|
if (!g.bbox || g.bbox[0] !== g.bbox[2] && g.bbox[1] !== g.bbox[3])
|
|
2223
2223
|
return;
|
|
2224
|
-
if (typeof
|
|
2225
|
-
return g.id.startsWith("poi.") || g.id.startsWith("address.") ?
|
|
2226
|
-
const
|
|
2224
|
+
if (typeof ke == "number")
|
|
2225
|
+
return g.id.startsWith("poi.") || g.id.startsWith("address.") ? Ve : ke;
|
|
2226
|
+
const j = g.id.replace(/\..*/, "");
|
|
2227
2227
|
return (Array.isArray((H = g.properties) == null ? void 0 : H.categories) ? g.properties.categories.reduce(
|
|
2228
|
-
(ee,
|
|
2229
|
-
const Q =
|
|
2228
|
+
(ee, T) => {
|
|
2229
|
+
const Q = ke[j + "." + T];
|
|
2230
2230
|
return ee === void 0 ? Q : Q === void 0 ? ee : Math.max(ee, Q);
|
|
2231
2231
|
},
|
|
2232
2232
|
void 0
|
|
2233
|
-
) : void 0) ??
|
|
2233
|
+
) : void 0) ?? ke[j];
|
|
2234
2234
|
}
|
|
2235
2235
|
function Fi(g) {
|
|
2236
|
-
t(0, D =
|
|
2236
|
+
t(0, D = b === "always"), t(14, R = void 0), t(57, N = void 0), t(15, U = -1), Bt(g[1].toFixed(6) + ", " + Vn(g[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2237
2237
|
}
|
|
2238
2238
|
function ji(g) {
|
|
2239
2239
|
if (!R)
|
|
2240
2240
|
return;
|
|
2241
|
-
let
|
|
2242
|
-
|
|
2241
|
+
let j = g.key === "ArrowDown" ? 1 : g.key === "ArrowUp" ? -1 : 0;
|
|
2242
|
+
j && (U === (oe ? 0 : -1) && j === -1 && t(15, U = R.length), t(15, U += j), U >= R.length && t(15, U = -1), U < 0 && oe && t(15, U = 0), g.preventDefault());
|
|
2243
2243
|
}
|
|
2244
|
-
function
|
|
2245
|
-
if (t(18,
|
|
2246
|
-
if (Te && clearTimeout(Te), O.length <
|
|
2244
|
+
function mt(g = !0, j = !1) {
|
|
2245
|
+
if (t(18, ae = void 0), $ || j) {
|
|
2246
|
+
if (Te && clearTimeout(Te), O.length < S)
|
|
2247
2247
|
return;
|
|
2248
2248
|
const H = O;
|
|
2249
2249
|
Te = window.setTimeout(
|
|
2250
2250
|
() => {
|
|
2251
|
-
|
|
2251
|
+
gt(H).catch((ee) => t(18, ae = ee));
|
|
2252
2252
|
},
|
|
2253
|
-
g ?
|
|
2253
|
+
g ? p : 0
|
|
2254
2254
|
);
|
|
2255
2255
|
} else
|
|
2256
|
-
t(14, R = void 0), t(18,
|
|
2256
|
+
t(14, R = void 0), t(18, ae = void 0);
|
|
2257
2257
|
}
|
|
2258
|
-
function
|
|
2259
|
-
t(
|
|
2258
|
+
function yt(g) {
|
|
2259
|
+
t(57, N = g), t(1, O = g.place_name), t(15, U = -1);
|
|
2260
2260
|
}
|
|
2261
|
-
const Zi = () =>
|
|
2261
|
+
const Zi = () => ue.focus();
|
|
2262
2262
|
function qi(g) {
|
|
2263
2263
|
St[g ? "unshift" : "push"](() => {
|
|
2264
|
-
|
|
2264
|
+
ue = g, t(17, ue);
|
|
2265
2265
|
});
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2268
|
-
O = this.value, t(1, O), t(13,
|
|
2267
|
+
function Qi() {
|
|
2268
|
+
O = this.value, t(1, O), t(13, Ne), t(28, c);
|
|
2269
2269
|
}
|
|
2270
|
-
const
|
|
2271
|
-
t(1, O = ""),
|
|
2272
|
-
},
|
|
2273
|
-
|
|
2274
|
-
},
|
|
2270
|
+
const Hi = () => t(13, Ne = !0), Vi = () => t(13, Ne = !1), Yi = () => mt(), Ki = () => {
|
|
2271
|
+
t(1, O = ""), ue.focus();
|
|
2272
|
+
}, Xi = () => t(0, D = !D), Ji = () => t(18, ae = void 0), $i = (g) => t(15, U = g), en = (g) => yt(g), tn = () => {
|
|
2273
|
+
oe || t(15, U = -1);
|
|
2274
|
+
}, nn = () => {
|
|
2275
2275
|
};
|
|
2276
2276
|
return n.$$set = (g) => {
|
|
2277
|
-
"class" in g && t(2, s = g.class), "apiKey" in g && t(26,
|
|
2277
|
+
"class" in g && t(2, s = g.class), "apiKey" in g && t(26, u = g.apiKey), "bbox" in g && t(27, l = g.bbox), "clearButtonTitle" in g && t(3, d = g.clearButtonTitle), "clearOnBlur" in g && t(28, c = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, h = g.country), "debounceSearch" in g && t(30, p = g.debounceSearch), "enableReverse" in g && t(5, b = g.enableReverse), "errorMessage" in g && t(6, m = g.errorMessage), "filter" in g && t(31, y = g.filter), "flyTo" in g && t(32, w = g.flyTo), "fuzzyMatch" in g && t(33, L = g.fuzzyMatch), "language" in g && t(34, E = g.language), "limit" in g && t(35, C = g.limit), "mapController" in g && t(36, x = g.mapController), "minLength" in g && t(37, S = 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, D = g.reverseActive), "reverseButtonTitle" in g && t(9, G = g.reverseButtonTitle), "searchValue" in g && t(1, O = g.searchValue), "showFullGeometry" in g && t(39, M = g.showFullGeometry), "showPlaceType" in g && t(10, F = g.showPlaceType), "showResultsWhileTyping" in g && t(40, $ = g.showResultsWhileTyping), "selectFirst" in g && t(11, oe = g.selectFirst), "flyToSelected" in g && t(41, lt = g.flyToSelected), "markerOnSelected" in g && t(42, Qe = g.markerOnSelected), "types" in g && t(43, xe = g.types), "exhaustiveReverseGeocoding" in g && t(44, ut = g.exhaustiveReverseGeocoding), "excludeTypes" in g && t(45, He = g.excludeTypes), "zoom" in g && t(46, ke = g.zoom), "maxZoom" in g && t(47, Ve = g.maxZoom), "apiUrl" in g && t(48, at = g.apiUrl), "fetchParameters" in g && t(49, ct = g.fetchParameters), "iconsBaseUrl" in g && t(12, At = g.iconsBaseUrl), "adjustUrlQuery" in g && t(50, ft = g.adjustUrlQuery), "$$scope" in g && t(60, o = g.$$scope);
|
|
2278
2278
|
}, n.$$.update = () => {
|
|
2279
2279
|
if (n.$$.dirty[0] & /*enableReverse*/
|
|
2280
|
-
32 && t(0, D =
|
|
2280
|
+
32 && t(0, D = b === "always"), n.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2281
2281
|
268443648 && setTimeout(() => {
|
|
2282
|
-
t(16,
|
|
2282
|
+
t(16, Ke = Ne), c && !Ne && t(1, O = "");
|
|
2283
2283
|
}), n.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2284
2284
|
16386 | n.$$.dirty[1] & /*minLength*/
|
|
2285
|
-
64 && O.length <
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
18432 &&
|
|
2285
|
+
64 && O.length < S && (t(57, N = void 0), t(14, R = void 0), t(18, ae = void 0), t(56, q = R)), n.$$.dirty[1] & /*showFullGeometry, picked*/
|
|
2286
|
+
67109120 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && gt(N.id, { byId: !0 }).catch((g) => t(18, ae = g)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2287
|
+
201326626 && (x && N && N.id !== dt && w && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, We(N)) : x.fitBounds(rt(N.bbox), 50, We(N)), t(14, R = void 0), t(56, q = void 0), t(15, U = -1)), t(58, dt = N == null ? void 0 : N.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2288
|
+
18432 && oe && R != null && R.length && t(15, U = 0), n.$$.dirty[0] & /*searchValue*/
|
|
2289
2289
|
2 && t(15, U = -1), n.$$.dirty[0] & /*listFeatures*/
|
|
2290
2290
|
16384 | n.$$.dirty[1] & /*markedFeatures*/
|
|
2291
|
-
|
|
2291
|
+
33554432 && q !== R && t(56, q = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2292
2292
|
81921 | n.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2293
|
-
|
|
2293
|
+
33554464 && x && x.setEventHandler((g) => {
|
|
2294
2294
|
switch (g.type) {
|
|
2295
2295
|
case "mapClick":
|
|
2296
2296
|
D && Fi(g.coordinates);
|
|
2297
2297
|
break;
|
|
2298
2298
|
case "markerClick":
|
|
2299
2299
|
{
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2300
|
+
const j = R == null ? void 0 : R.find((H) => H.id === g.id);
|
|
2301
|
+
j && yt(j);
|
|
2302
2302
|
}
|
|
2303
2303
|
break;
|
|
2304
2304
|
case "markerMouseEnter":
|
|
2305
|
-
|
|
2305
|
+
q && t(15, U = Ke ? (R == null ? void 0 : R.findIndex((j) => j.id === g.id)) ?? -1 : -1);
|
|
2306
2306
|
break;
|
|
2307
2307
|
case "markerMouseLeave":
|
|
2308
|
-
|
|
2308
|
+
q && t(15, U = -1);
|
|
2309
2309
|
break;
|
|
2310
2310
|
}
|
|
2311
2311
|
}), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2312
|
-
49152 && t(
|
|
2313
|
-
|
|
2314
|
-
2080 && (
|
|
2315
|
-
|
|
2316
|
-
|
|
2312
|
+
49152 && t(59, i = R == null ? void 0 : R[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2313
|
+
268436514 && x && i && w && lt && x.flyTo(i.center, We(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2314
|
+
2080 && (Qe || x == null || x.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2315
|
+
301991968 && x && Qe && !q && (x.setMarkers(i ? [i] : void 0, void 0), x.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2316
|
+
100663328 && x && x.setMarkers(q, N), n.$$.dirty[0] & /*selectedItemIndex*/
|
|
2317
2317
|
32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2318
|
-
|
|
2318
|
+
33554464 && q && x && x.setSelectedMarker(U), n.$$.dirty[0] & /*searchValue*/
|
|
2319
2319
|
2 | n.$$.dirty[1] & /*mapController*/
|
|
2320
2320
|
32 && x) {
|
|
2321
|
-
const g =
|
|
2321
|
+
const g = ht(O);
|
|
2322
2322
|
x.setReverseMarker(g ? [g.decimalLongitude, g.decimalLatitude] : void 0);
|
|
2323
2323
|
}
|
|
2324
2324
|
n.$$.dirty[1] & /*selected*/
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
81920 &&
|
|
2328
|
-
16384 &&
|
|
2329
|
-
|
|
2330
|
-
1 &&
|
|
2331
|
-
2 &&
|
|
2325
|
+
268435456 && me("select", i), n.$$.dirty[1] & /*picked*/
|
|
2326
|
+
67108864 && me("pick", N), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2327
|
+
81920 && me("optionsVisibilityChange", Ke && !!R), n.$$.dirty[0] & /*listFeatures*/
|
|
2328
|
+
16384 && me("featuresListed", R), n.$$.dirty[1] & /*markedFeatures*/
|
|
2329
|
+
33554432 && me("featuresMarked", q), n.$$.dirty[0] & /*reverseActive*/
|
|
2330
|
+
1 && me("reverseToggle", D), n.$$.dirty[0] & /*searchValue*/
|
|
2331
|
+
2 && me("queryChange", O), n.$$.dirty[0] & /*reverseActive*/
|
|
2332
2332
|
1 | n.$$.dirty[1] & /*mapController*/
|
|
2333
2333
|
32 && x && x.indicateReverse(D);
|
|
2334
2334
|
}, [
|
|
@@ -2337,65 +2337,65 @@ function dr(n, e, t) {
|
|
|
2337
2337
|
s,
|
|
2338
2338
|
d,
|
|
2339
2339
|
f,
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2340
|
+
b,
|
|
2341
|
+
m,
|
|
2342
|
+
_,
|
|
2343
|
+
k,
|
|
2344
|
+
G,
|
|
2344
2345
|
F,
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
Pe,
|
|
2346
|
+
oe,
|
|
2347
|
+
At,
|
|
2348
|
+
Ne,
|
|
2349
2349
|
R,
|
|
2350
2350
|
U,
|
|
2351
|
-
|
|
2351
|
+
Ke,
|
|
2352
|
+
ue,
|
|
2352
2353
|
ae,
|
|
2353
|
-
ce,
|
|
2354
2354
|
Me,
|
|
2355
|
-
|
|
2356
|
-
|
|
2355
|
+
zi,
|
|
2356
|
+
Ut,
|
|
2357
2357
|
ji,
|
|
2358
|
-
|
|
2359
|
-
|
|
2358
|
+
mt,
|
|
2359
|
+
yt,
|
|
2360
|
+
a,
|
|
2361
|
+
u,
|
|
2360
2362
|
l,
|
|
2361
2363
|
c,
|
|
2362
|
-
u,
|
|
2363
|
-
a,
|
|
2364
2364
|
h,
|
|
2365
|
-
|
|
2366
|
-
|
|
2365
|
+
p,
|
|
2366
|
+
y,
|
|
2367
|
+
w,
|
|
2368
|
+
L,
|
|
2367
2369
|
E,
|
|
2368
|
-
|
|
2369
|
-
_,
|
|
2370
|
-
k,
|
|
2370
|
+
C,
|
|
2371
2371
|
x,
|
|
2372
|
-
|
|
2372
|
+
S,
|
|
2373
2373
|
I,
|
|
2374
2374
|
M,
|
|
2375
2375
|
$,
|
|
2376
|
-
|
|
2376
|
+
lt,
|
|
2377
|
+
Qe,
|
|
2378
|
+
xe,
|
|
2379
|
+
ut,
|
|
2377
2380
|
He,
|
|
2381
|
+
ke,
|
|
2378
2382
|
Ve,
|
|
2379
|
-
|
|
2380
|
-
Ne,
|
|
2381
|
-
Ke,
|
|
2383
|
+
at,
|
|
2382
2384
|
ct,
|
|
2383
2385
|
ft,
|
|
2384
|
-
dt,
|
|
2385
|
-
Wi,
|
|
2386
2386
|
Ai,
|
|
2387
|
-
Dt,
|
|
2388
2387
|
Bi,
|
|
2388
|
+
Bt,
|
|
2389
2389
|
Di,
|
|
2390
|
-
|
|
2390
|
+
Ui,
|
|
2391
|
+
q,
|
|
2391
2392
|
N,
|
|
2392
|
-
|
|
2393
|
+
dt,
|
|
2393
2394
|
i,
|
|
2394
2395
|
o,
|
|
2395
2396
|
r,
|
|
2396
2397
|
Zi,
|
|
2397
2398
|
qi,
|
|
2398
|
-
Gi,
|
|
2399
2399
|
Qi,
|
|
2400
2400
|
Hi,
|
|
2401
2401
|
Vi,
|
|
@@ -2405,17 +2405,18 @@ function dr(n, e, t) {
|
|
|
2405
2405
|
Ji,
|
|
2406
2406
|
$i,
|
|
2407
2407
|
en,
|
|
2408
|
-
tn
|
|
2408
|
+
tn,
|
|
2409
|
+
nn
|
|
2409
2410
|
];
|
|
2410
2411
|
}
|
|
2411
2412
|
let hr = class extends Se {
|
|
2412
2413
|
constructor(e) {
|
|
2413
|
-
super(),
|
|
2414
|
+
super(), Le(
|
|
2414
2415
|
this,
|
|
2415
2416
|
e,
|
|
2416
2417
|
dr,
|
|
2417
2418
|
fr,
|
|
2418
|
-
|
|
2419
|
+
Ee,
|
|
2419
2420
|
{
|
|
2420
2421
|
ZOOM_DEFAULTS: 25,
|
|
2421
2422
|
class: 2,
|
|
@@ -2448,18 +2449,19 @@ let hr = class extends Se {
|
|
|
2448
2449
|
flyToSelected: 41,
|
|
2449
2450
|
markerOnSelected: 42,
|
|
2450
2451
|
types: 43,
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2452
|
+
exhaustiveReverseGeocoding: 44,
|
|
2453
|
+
excludeTypes: 45,
|
|
2454
|
+
zoom: 46,
|
|
2455
|
+
maxZoom: 47,
|
|
2456
|
+
apiUrl: 48,
|
|
2457
|
+
fetchParameters: 49,
|
|
2456
2458
|
iconsBaseUrl: 12,
|
|
2457
|
-
adjustUrlQuery:
|
|
2458
|
-
focus:
|
|
2459
|
-
blur:
|
|
2460
|
-
setQuery:
|
|
2461
|
-
clearList:
|
|
2462
|
-
clearMap:
|
|
2459
|
+
adjustUrlQuery: 50,
|
|
2460
|
+
focus: 51,
|
|
2461
|
+
blur: 52,
|
|
2462
|
+
setQuery: 53,
|
|
2463
|
+
clearList: 54,
|
|
2464
|
+
clearMap: 55
|
|
2463
2465
|
},
|
|
2464
2466
|
null,
|
|
2465
2467
|
[-1, -1, -1]
|
|
@@ -2469,26 +2471,26 @@ let hr = class extends Se {
|
|
|
2469
2471
|
return this.$$.ctx[25];
|
|
2470
2472
|
}
|
|
2471
2473
|
get focus() {
|
|
2472
|
-
return this.$$.ctx[
|
|
2474
|
+
return this.$$.ctx[51];
|
|
2473
2475
|
}
|
|
2474
2476
|
get blur() {
|
|
2475
|
-
return this.$$.ctx[
|
|
2477
|
+
return this.$$.ctx[52];
|
|
2476
2478
|
}
|
|
2477
2479
|
get setQuery() {
|
|
2478
|
-
return this.$$.ctx[
|
|
2480
|
+
return this.$$.ctx[53];
|
|
2479
2481
|
}
|
|
2480
2482
|
get clearList() {
|
|
2481
|
-
return this.$$.ctx[
|
|
2483
|
+
return this.$$.ctx[54];
|
|
2482
2484
|
}
|
|
2483
2485
|
get clearMap() {
|
|
2484
|
-
return this.$$.ctx[
|
|
2486
|
+
return this.$$.ctx[55];
|
|
2485
2487
|
}
|
|
2486
2488
|
};
|
|
2487
|
-
function
|
|
2489
|
+
function Fe(n, e, t = {}) {
|
|
2488
2490
|
const i = { type: "Feature" };
|
|
2489
2491
|
return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
|
|
2490
2492
|
}
|
|
2491
|
-
function
|
|
2493
|
+
function It(n, e, t = {}) {
|
|
2492
2494
|
for (const r of n) {
|
|
2493
2495
|
if (r.length < 4)
|
|
2494
2496
|
throw new Error(
|
|
@@ -2500,17 +2502,17 @@ function Ot(n, e, t = {}) {
|
|
|
2500
2502
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2501
2503
|
throw new Error("First and last Position are not equivalent.");
|
|
2502
2504
|
}
|
|
2503
|
-
return
|
|
2505
|
+
return Fe({
|
|
2504
2506
|
type: "Polygon",
|
|
2505
2507
|
coordinates: n
|
|
2506
2508
|
}, e, t);
|
|
2507
2509
|
}
|
|
2508
|
-
function
|
|
2510
|
+
function je(n, e = {}) {
|
|
2509
2511
|
const t = { type: "FeatureCollection" };
|
|
2510
2512
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
2511
2513
|
}
|
|
2512
2514
|
function Pi(n, e, t = {}) {
|
|
2513
|
-
return
|
|
2515
|
+
return Fe({
|
|
2514
2516
|
type: "MultiPolygon",
|
|
2515
2517
|
coordinates: n
|
|
2516
2518
|
}, e, t);
|
|
@@ -2541,63 +2543,63 @@ function gr(n, e) {
|
|
|
2541
2543
|
var t = { label: 0, sent: function() {
|
|
2542
2544
|
if (o[0] & 1) throw o[1];
|
|
2543
2545
|
return o[1];
|
|
2544
|
-
}, trys: [], ops: [] }, i, r, o,
|
|
2545
|
-
return
|
|
2546
|
+
}, trys: [], ops: [] }, i, r, o, a;
|
|
2547
|
+
return a = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
2546
2548
|
return this;
|
|
2547
|
-
}),
|
|
2548
|
-
function s(
|
|
2549
|
+
}), a;
|
|
2550
|
+
function s(l) {
|
|
2549
2551
|
return function(d) {
|
|
2550
|
-
return
|
|
2552
|
+
return u([l, d]);
|
|
2551
2553
|
};
|
|
2552
2554
|
}
|
|
2553
|
-
function
|
|
2555
|
+
function u(l) {
|
|
2554
2556
|
if (i) throw new TypeError("Generator is already executing.");
|
|
2555
2557
|
for (; t; ) try {
|
|
2556
|
-
if (i = 1, r && (o =
|
|
2557
|
-
switch (r = 0, o && (
|
|
2558
|
+
if (i = 1, r && (o = l[0] & 2 ? r.return : l[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, l[1])).done) return o;
|
|
2559
|
+
switch (r = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
|
|
2558
2560
|
case 0:
|
|
2559
2561
|
case 1:
|
|
2560
|
-
o =
|
|
2562
|
+
o = l;
|
|
2561
2563
|
break;
|
|
2562
2564
|
case 4:
|
|
2563
|
-
return t.label++, { value:
|
|
2565
|
+
return t.label++, { value: l[1], done: !1 };
|
|
2564
2566
|
case 5:
|
|
2565
|
-
t.label++, r =
|
|
2567
|
+
t.label++, r = l[1], l = [0];
|
|
2566
2568
|
continue;
|
|
2567
2569
|
case 7:
|
|
2568
|
-
|
|
2570
|
+
l = t.ops.pop(), t.trys.pop();
|
|
2569
2571
|
continue;
|
|
2570
2572
|
default:
|
|
2571
|
-
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (
|
|
2573
|
+
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
2572
2574
|
t = 0;
|
|
2573
2575
|
continue;
|
|
2574
2576
|
}
|
|
2575
|
-
if (
|
|
2576
|
-
t.label =
|
|
2577
|
+
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
2578
|
+
t.label = l[1];
|
|
2577
2579
|
break;
|
|
2578
2580
|
}
|
|
2579
|
-
if (
|
|
2580
|
-
t.label = o[1], o =
|
|
2581
|
+
if (l[0] === 6 && t.label < o[1]) {
|
|
2582
|
+
t.label = o[1], o = l;
|
|
2581
2583
|
break;
|
|
2582
2584
|
}
|
|
2583
2585
|
if (o && t.label < o[2]) {
|
|
2584
|
-
t.label = o[2], t.ops.push(
|
|
2586
|
+
t.label = o[2], t.ops.push(l);
|
|
2585
2587
|
break;
|
|
2586
2588
|
}
|
|
2587
2589
|
o[2] && t.ops.pop(), t.trys.pop();
|
|
2588
2590
|
continue;
|
|
2589
2591
|
}
|
|
2590
|
-
|
|
2592
|
+
l = e.call(n, t);
|
|
2591
2593
|
} catch (d) {
|
|
2592
|
-
|
|
2594
|
+
l = [6, d], r = 0;
|
|
2593
2595
|
} finally {
|
|
2594
2596
|
i = o = 0;
|
|
2595
2597
|
}
|
|
2596
|
-
if (
|
|
2597
|
-
return { value:
|
|
2598
|
+
if (l[0] & 5) throw l[1];
|
|
2599
|
+
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
2598
2600
|
}
|
|
2599
2601
|
}
|
|
2600
|
-
var
|
|
2602
|
+
var we = (
|
|
2601
2603
|
/** @class */
|
|
2602
2604
|
/* @__PURE__ */ function() {
|
|
2603
2605
|
function n(e, t) {
|
|
@@ -2609,10 +2611,10 @@ var Ee = (
|
|
|
2609
2611
|
function mr(n, e) {
|
|
2610
2612
|
return n > e ? 1 : n < e ? -1 : 0;
|
|
2611
2613
|
}
|
|
2612
|
-
function
|
|
2613
|
-
for (var i = new
|
|
2614
|
-
var
|
|
2615
|
-
if (
|
|
2614
|
+
function ye(n, e, t) {
|
|
2615
|
+
for (var i = new we(null, null), r = i, o = i; ; ) {
|
|
2616
|
+
var a = t(n, e.key);
|
|
2617
|
+
if (a < 0) {
|
|
2616
2618
|
if (e.left === null)
|
|
2617
2619
|
break;
|
|
2618
2620
|
if (t(n, e.left.key) < 0) {
|
|
@@ -2621,7 +2623,7 @@ function ve(n, e, t) {
|
|
|
2621
2623
|
break;
|
|
2622
2624
|
}
|
|
2623
2625
|
o.left = e, o = e, e = e.left;
|
|
2624
|
-
} else if (
|
|
2626
|
+
} else if (a > 0) {
|
|
2625
2627
|
if (e.right === null)
|
|
2626
2628
|
break;
|
|
2627
2629
|
if (t(n, e.right.key) > 0) {
|
|
@@ -2635,25 +2637,25 @@ function ve(n, e, t) {
|
|
|
2635
2637
|
}
|
|
2636
2638
|
return r.right = e.left, o.left = e.right, e.left = i.right, e.right = i.left, e;
|
|
2637
2639
|
}
|
|
2638
|
-
function
|
|
2639
|
-
var r = new
|
|
2640
|
+
function Et(n, e, t, i) {
|
|
2641
|
+
var r = new we(n, e);
|
|
2640
2642
|
if (t === null)
|
|
2641
2643
|
return r.left = r.right = null, r;
|
|
2642
|
-
t =
|
|
2644
|
+
t = ye(n, t, i);
|
|
2643
2645
|
var o = i(n, t.key);
|
|
2644
2646
|
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;
|
|
2645
2647
|
}
|
|
2646
2648
|
function li(n, e, t) {
|
|
2647
2649
|
var i = null, r = null;
|
|
2648
2650
|
if (e) {
|
|
2649
|
-
e =
|
|
2651
|
+
e = ye(n, e, t);
|
|
2650
2652
|
var o = t(e.key, n);
|
|
2651
2653
|
o === 0 ? (i = e.left, r = e.right) : o < 0 ? (r = e.right, e.right = null, i = e) : (i = e.left, e.left = null, r = e);
|
|
2652
2654
|
}
|
|
2653
2655
|
return { left: i, right: r };
|
|
2654
2656
|
}
|
|
2655
|
-
function
|
|
2656
|
-
return e === null ? n : (n === null || (e =
|
|
2657
|
+
function yr(n, e, t) {
|
|
2658
|
+
return e === null ? n : (n === null || (e = ye(n.key, e, t), e.left = n), e);
|
|
2657
2659
|
}
|
|
2658
2660
|
function Ct(n, e, t, i, r) {
|
|
2659
2661
|
if (n) {
|
|
@@ -2663,34 +2665,34 @@ function Ct(n, e, t, i, r) {
|
|
|
2663
2665
|
n.left && Ct(n.left, o, !1, i, r), n.right && Ct(n.right, o, !0, i, r);
|
|
2664
2666
|
}
|
|
2665
2667
|
}
|
|
2666
|
-
var
|
|
2668
|
+
var Ot = (
|
|
2667
2669
|
/** @class */
|
|
2668
2670
|
function() {
|
|
2669
2671
|
function n(e) {
|
|
2670
2672
|
e === void 0 && (e = mr), this._root = null, this._size = 0, this._comparator = e;
|
|
2671
2673
|
}
|
|
2672
2674
|
return n.prototype.insert = function(e, t) {
|
|
2673
|
-
return this._size++, this._root =
|
|
2675
|
+
return this._size++, this._root = Et(e, t, this._root, this._comparator);
|
|
2674
2676
|
}, n.prototype.add = function(e, t) {
|
|
2675
|
-
var i = new
|
|
2677
|
+
var i = new we(e, t);
|
|
2676
2678
|
this._root === null && (i.left = i.right = null, this._size++, this._root = i);
|
|
2677
|
-
var r = this._comparator, o =
|
|
2678
|
-
return
|
|
2679
|
+
var r = this._comparator, o = ye(e, this._root, r), a = r(e, o.key);
|
|
2680
|
+
return a === 0 ? this._root = o : (a < 0 ? (i.left = o.left, i.right = o, o.left = null) : a > 0 && (i.right = o.right, i.left = o, o.right = null), this._size++, this._root = i), this._root;
|
|
2679
2681
|
}, n.prototype.remove = function(e) {
|
|
2680
2682
|
this._root = this._remove(e, this._root, this._comparator);
|
|
2681
2683
|
}, n.prototype._remove = function(e, t, i) {
|
|
2682
2684
|
var r;
|
|
2683
2685
|
if (t === null)
|
|
2684
2686
|
return null;
|
|
2685
|
-
t =
|
|
2687
|
+
t = ye(e, t, i);
|
|
2686
2688
|
var o = i(e, t.key);
|
|
2687
|
-
return o === 0 ? (t.left === null ? r = t.right : (r =
|
|
2689
|
+
return o === 0 ? (t.left === null ? r = t.right : (r = ye(e, t.left, i), r.right = t.right), this._size--, r) : t;
|
|
2688
2690
|
}, n.prototype.pop = function() {
|
|
2689
2691
|
var e = this._root;
|
|
2690
2692
|
if (e) {
|
|
2691
2693
|
for (; e.left; )
|
|
2692
2694
|
e = e.left;
|
|
2693
|
-
return this._root =
|
|
2695
|
+
return this._root = ye(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
|
|
2694
2696
|
}
|
|
2695
2697
|
return null;
|
|
2696
2698
|
}, n.prototype.findStatic = function(e) {
|
|
@@ -2702,7 +2704,7 @@ var Wt = (
|
|
|
2702
2704
|
}
|
|
2703
2705
|
return null;
|
|
2704
2706
|
}, n.prototype.find = function(e) {
|
|
2705
|
-
return this._root && (this._root =
|
|
2707
|
+
return this._root && (this._root = ye(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2706
2708
|
}, n.prototype.contains = function(e) {
|
|
2707
2709
|
for (var t = this._root, i = this._comparator; t; ) {
|
|
2708
2710
|
var r = i(e, t.key);
|
|
@@ -2716,13 +2718,13 @@ var Wt = (
|
|
|
2716
2718
|
i !== null ? (r.push(i), i = i.left) : r.length !== 0 ? (i = r.pop(), e.call(t, i), i = i.right) : o = !0;
|
|
2717
2719
|
return this;
|
|
2718
2720
|
}, n.prototype.range = function(e, t, i, r) {
|
|
2719
|
-
for (var o = [],
|
|
2721
|
+
for (var o = [], a = this._comparator, s = this._root, u; o.length !== 0 || s; )
|
|
2720
2722
|
if (s)
|
|
2721
2723
|
o.push(s), s = s.left;
|
|
2722
2724
|
else {
|
|
2723
|
-
if (s = o.pop(),
|
|
2725
|
+
if (s = o.pop(), u = a(s.key, t), u > 0)
|
|
2724
2726
|
break;
|
|
2725
|
-
if (
|
|
2727
|
+
if (a(s.key, e) >= 0 && i.call(r, s))
|
|
2726
2728
|
return this;
|
|
2727
2729
|
s = s.right;
|
|
2728
2730
|
}
|
|
@@ -2795,15 +2797,15 @@ var Wt = (
|
|
|
2795
2797
|
}, n.prototype.clear = function() {
|
|
2796
2798
|
return this._root = null, this._size = 0, this;
|
|
2797
2799
|
}, n.prototype.toList = function() {
|
|
2798
|
-
return
|
|
2800
|
+
return pr(this._root);
|
|
2799
2801
|
}, n.prototype.load = function(e, t, i) {
|
|
2800
2802
|
t === void 0 && (t = []), i === void 0 && (i = !1);
|
|
2801
2803
|
var r = e.length, o = this._comparator;
|
|
2802
2804
|
if (i && Tt(e, t, 0, r - 1, o), this._root === null)
|
|
2803
|
-
this._root =
|
|
2805
|
+
this._root = kt(e, t, 0, r), this._size = r;
|
|
2804
2806
|
else {
|
|
2805
|
-
var
|
|
2806
|
-
r = this._size + r, this._root =
|
|
2807
|
+
var a = br(this.toList(), vr(e, t), o);
|
|
2808
|
+
r = this._size + r, this._root = Nt({ head: a }, 0, r);
|
|
2807
2809
|
}
|
|
2808
2810
|
return this;
|
|
2809
2811
|
}, n.prototype.isEmpty = function() {
|
|
@@ -2829,8 +2831,8 @@ var Wt = (
|
|
|
2829
2831
|
return t.push(i);
|
|
2830
2832
|
}, e), t.join("");
|
|
2831
2833
|
}, n.prototype.update = function(e, t, i) {
|
|
2832
|
-
var r = this._comparator, o = li(e, this._root, r),
|
|
2833
|
-
r(e, t) < 0 ? s =
|
|
2834
|
+
var r = this._comparator, o = li(e, this._root, r), a = o.left, s = o.right;
|
|
2835
|
+
r(e, t) < 0 ? s = Et(t, i, s, r) : a = Et(t, i, a, r), this._root = yr(a, s, r);
|
|
2834
2836
|
}, n.prototype.split = function(e) {
|
|
2835
2837
|
return li(e, this._root, this._comparator);
|
|
2836
2838
|
}, n.prototype[Symbol.iterator] = function() {
|
|
@@ -2859,96 +2861,96 @@ var Wt = (
|
|
|
2859
2861
|
}, n;
|
|
2860
2862
|
}()
|
|
2861
2863
|
);
|
|
2862
|
-
function
|
|
2864
|
+
function kt(n, e, t, i) {
|
|
2863
2865
|
var r = i - t;
|
|
2864
2866
|
if (r > 0) {
|
|
2865
|
-
var o = t + Math.floor(r / 2),
|
|
2866
|
-
return
|
|
2867
|
+
var o = t + Math.floor(r / 2), a = n[o], s = e[o], u = new we(a, s);
|
|
2868
|
+
return u.left = kt(n, e, t, o), u.right = kt(n, e, o + 1, i), u;
|
|
2867
2869
|
}
|
|
2868
2870
|
return null;
|
|
2869
2871
|
}
|
|
2870
2872
|
function vr(n, e) {
|
|
2871
|
-
for (var t = new
|
|
2872
|
-
i = i.next = new
|
|
2873
|
+
for (var t = new we(null, null), i = t, r = 0; r < n.length; r++)
|
|
2874
|
+
i = i.next = new we(n[r], e[r]);
|
|
2873
2875
|
return i.next = null, t.next;
|
|
2874
2876
|
}
|
|
2875
|
-
function
|
|
2876
|
-
for (var e = n, t = [], i = !1, r = new
|
|
2877
|
+
function pr(n) {
|
|
2878
|
+
for (var e = n, t = [], i = !1, r = new we(null, null), o = r; !i; )
|
|
2877
2879
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : i = !0;
|
|
2878
2880
|
return o.next = null, r.next;
|
|
2879
2881
|
}
|
|
2880
|
-
function
|
|
2882
|
+
function Nt(n, e, t) {
|
|
2881
2883
|
var i = t - e;
|
|
2882
2884
|
if (i > 0) {
|
|
2883
|
-
var r = e + Math.floor(i / 2), o =
|
|
2884
|
-
return
|
|
2885
|
+
var r = e + Math.floor(i / 2), o = Nt(n, e, r), a = n.head;
|
|
2886
|
+
return a.left = o, n.head = n.head.next, a.right = Nt(n, r + 1, t), a;
|
|
2885
2887
|
}
|
|
2886
2888
|
return null;
|
|
2887
2889
|
}
|
|
2888
|
-
function
|
|
2889
|
-
for (var i = new
|
|
2890
|
-
t(o.key,
|
|
2891
|
-
return o !== null ? r.next = o :
|
|
2890
|
+
function br(n, e, t) {
|
|
2891
|
+
for (var i = new we(null, null), r = i, o = n, a = e; o !== null && a !== null; )
|
|
2892
|
+
t(o.key, a.key) < 0 ? (r.next = o, o = o.next) : (r.next = a, a = a.next), r = r.next;
|
|
2893
|
+
return o !== null ? r.next = o : a !== null && (r.next = a), i.next;
|
|
2892
2894
|
}
|
|
2893
2895
|
function Tt(n, e, t, i, r) {
|
|
2894
2896
|
if (!(t >= i)) {
|
|
2895
|
-
for (var o = n[t + i >> 1],
|
|
2897
|
+
for (var o = n[t + i >> 1], a = t - 1, s = i + 1; ; ) {
|
|
2896
2898
|
do
|
|
2897
|
-
|
|
2898
|
-
while (r(n[
|
|
2899
|
+
a++;
|
|
2900
|
+
while (r(n[a], o) < 0);
|
|
2899
2901
|
do
|
|
2900
2902
|
s--;
|
|
2901
2903
|
while (r(n[s], o) > 0);
|
|
2902
|
-
if (
|
|
2904
|
+
if (a >= s)
|
|
2903
2905
|
break;
|
|
2904
|
-
var
|
|
2905
|
-
n[
|
|
2906
|
+
var u = n[a];
|
|
2907
|
+
n[a] = n[s], n[s] = u, u = e[a], e[a] = e[s], e[s] = u;
|
|
2906
2908
|
}
|
|
2907
2909
|
Tt(n, e, t, s, r), Tt(n, e, s + 1, i, r);
|
|
2908
2910
|
}
|
|
2909
2911
|
}
|
|
2910
|
-
const
|
|
2911
|
-
function
|
|
2912
|
-
let o,
|
|
2913
|
-
d >
|
|
2912
|
+
const fe = 11102230246251565e-32, Y = 134217729, _r = (3 + 8 * fe) * fe;
|
|
2913
|
+
function Lt(n, e, t, i, r) {
|
|
2914
|
+
let o, a, s, u, l = e[0], d = i[0], c = 0, f = 0;
|
|
2915
|
+
d > l == d > -l ? (o = l, l = e[++c]) : (o = d, d = i[++f]);
|
|
2914
2916
|
let h = 0;
|
|
2915
|
-
if (
|
|
2916
|
-
for (d >
|
|
2917
|
-
d >
|
|
2918
|
-
for (;
|
|
2919
|
-
|
|
2917
|
+
if (c < n && f < t)
|
|
2918
|
+
for (d > l == d > -l ? (a = l + o, s = o - (a - l), l = e[++c]) : (a = d + o, s = o - (a - d), d = i[++f]), o = a, s !== 0 && (r[h++] = s); c < n && f < t; )
|
|
2919
|
+
d > l == d > -l ? (a = o + l, u = a - o, s = o - (a - u) + (l - u), l = e[++c]) : (a = o + d, u = a - o, s = o - (a - u) + (d - u), d = i[++f]), o = a, s !== 0 && (r[h++] = s);
|
|
2920
|
+
for (; c < n; )
|
|
2921
|
+
a = o + l, u = a - o, s = o - (a - u) + (l - u), l = e[++c], o = a, s !== 0 && (r[h++] = s);
|
|
2920
2922
|
for (; f < t; )
|
|
2921
|
-
|
|
2923
|
+
a = o + d, u = a - o, s = o - (a - u) + (d - u), d = i[++f], o = a, s !== 0 && (r[h++] = s);
|
|
2922
2924
|
return (o !== 0 || h === 0) && (r[h++] = o), h;
|
|
2923
2925
|
}
|
|
2924
|
-
function
|
|
2926
|
+
function wr(n, e) {
|
|
2925
2927
|
let t = e[0];
|
|
2926
2928
|
for (let i = 1; i < n; i++) t += e[i];
|
|
2927
2929
|
return t;
|
|
2928
2930
|
}
|
|
2929
|
-
function
|
|
2931
|
+
function qe(n) {
|
|
2930
2932
|
return new Float64Array(n);
|
|
2931
2933
|
}
|
|
2932
|
-
const Er = (3 + 16 *
|
|
2933
|
-
function
|
|
2934
|
-
let s,
|
|
2935
|
-
const
|
|
2936
|
-
|
|
2937
|
-
let O =
|
|
2938
|
-
if (O >= M || -O >= M || (
|
|
2939
|
-
|
|
2940
|
-
const
|
|
2941
|
-
|
|
2942
|
-
const $ =
|
|
2943
|
-
|
|
2944
|
-
const
|
|
2945
|
-
return ci[
|
|
2934
|
+
const Er = (3 + 16 * fe) * fe, Lr = (2 + 12 * fe) * fe, Sr = (9 + 64 * fe) * fe * fe, Re = qe(4), ui = qe(8), ai = qe(12), ci = qe(16), X = qe(4);
|
|
2935
|
+
function xr(n, e, t, i, r, o, a) {
|
|
2936
|
+
let s, u, l, d, c, f, h, p, b, m, y, w, L, E, C, x, S, _;
|
|
2937
|
+
const k = n - r, I = t - r, D = e - o, G = i - o;
|
|
2938
|
+
E = k * G, f = Y * k, h = f - (f - k), p = k - h, f = Y * G, b = f - (f - G), m = G - b, C = p * m - (E - h * b - p * b - h * m), x = D * I, f = Y * D, h = f - (f - D), p = D - h, f = Y * I, b = f - (f - I), m = I - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, Re[0] = C - (y + c) + (c - S), w = E + y, c = w - E, L = E - (w - c) + (y - c), y = L - x, c = L - y, Re[1] = L - (y + c) + (c - x), _ = w + y, c = _ - w, Re[2] = w - (_ - c) + (y - c), Re[3] = _;
|
|
2939
|
+
let O = wr(4, Re), M = Lr * a;
|
|
2940
|
+
if (O >= M || -O >= M || (c = n - k, s = n - (k + c) + (c - r), c = t - I, l = t - (I + c) + (c - r), c = e - D, u = e - (D + c) + (c - o), c = i - G, d = i - (G + c) + (c - o), s === 0 && u === 0 && l === 0 && d === 0) || (M = Sr * a + _r * Math.abs(O), O += k * d + G * s - (D * l + I * u), O >= M || -O >= M)) return O;
|
|
2941
|
+
E = s * G, f = Y * s, h = f - (f - s), p = s - h, f = Y * G, b = f - (f - G), m = G - b, C = p * m - (E - h * b - p * b - h * m), x = u * I, f = Y * u, h = f - (f - u), p = u - h, f = Y * I, b = f - (f - I), m = I - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, X[0] = C - (y + c) + (c - S), w = E + y, c = w - E, L = E - (w - c) + (y - c), y = L - x, c = L - y, X[1] = L - (y + c) + (c - x), _ = w + y, c = _ - w, X[2] = w - (_ - c) + (y - c), X[3] = _;
|
|
2942
|
+
const F = Lt(4, Re, 4, X, ui);
|
|
2943
|
+
E = k * d, f = Y * k, h = f - (f - k), p = k - h, f = Y * d, b = f - (f - d), m = d - b, C = p * m - (E - h * b - p * b - h * m), x = D * l, f = Y * D, h = f - (f - D), p = D - h, f = Y * l, b = f - (f - l), m = l - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, X[0] = C - (y + c) + (c - S), w = E + y, c = w - E, L = E - (w - c) + (y - c), y = L - x, c = L - y, X[1] = L - (y + c) + (c - x), _ = w + y, c = _ - w, X[2] = w - (_ - c) + (y - c), X[3] = _;
|
|
2944
|
+
const $ = Lt(F, ui, 4, X, ai);
|
|
2945
|
+
E = s * d, f = Y * s, h = f - (f - s), p = s - h, f = Y * d, b = f - (f - d), m = d - b, C = p * m - (E - h * b - p * b - h * m), x = u * l, f = Y * u, h = f - (f - u), p = u - h, f = Y * l, b = f - (f - l), m = l - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, X[0] = C - (y + c) + (c - S), w = E + y, c = w - E, L = E - (w - c) + (y - c), y = L - x, c = L - y, X[1] = L - (y + c) + (c - x), _ = w + y, c = _ - w, X[2] = w - (_ - c) + (y - c), X[3] = _;
|
|
2946
|
+
const oe = Lt($, ai, 4, X, ci);
|
|
2947
|
+
return ci[oe - 1];
|
|
2946
2948
|
}
|
|
2947
2949
|
function Mr(n, e, t, i, r, o) {
|
|
2948
|
-
const
|
|
2949
|
-
return Math.abs(
|
|
2950
|
+
const a = (e - o) * (t - r), s = (n - r) * (i - o), u = a - s, l = Math.abs(a + s);
|
|
2951
|
+
return Math.abs(u) >= Er * l ? u : -xr(n, e, t, i, r, o, l);
|
|
2950
2952
|
}
|
|
2951
|
-
const
|
|
2953
|
+
const De = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, Pt = (n, e) => {
|
|
2952
2954
|
if (e.ur.x < n.ll.x || n.ur.x < e.ll.x || e.ur.y < n.ll.y || n.ur.y < e.ll.y) return null;
|
|
2953
2955
|
const t = n.ll.x < e.ll.x ? e.ll.x : n.ll.x, i = n.ur.x < e.ur.x ? n.ur.x : e.ur.x, r = n.ll.y < e.ll.y ? e.ll.y : n.ll.y, o = n.ur.y < e.ur.y ? n.ur.y : e.ur.y;
|
|
2954
2956
|
return {
|
|
@@ -2962,15 +2964,15 @@ const Ue = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n
|
|
|
2962
2964
|
}
|
|
2963
2965
|
};
|
|
2964
2966
|
};
|
|
2965
|
-
let
|
|
2966
|
-
|
|
2967
|
-
const
|
|
2968
|
-
if (-
|
|
2967
|
+
let ve = Number.EPSILON;
|
|
2968
|
+
ve === void 0 && (ve = Math.pow(2, -52));
|
|
2969
|
+
const Cr = ve * ve, fi = (n, e) => {
|
|
2970
|
+
if (-ve < n && n < ve && -ve < e && e < ve)
|
|
2969
2971
|
return 0;
|
|
2970
2972
|
const t = n - e;
|
|
2971
|
-
return t * t <
|
|
2973
|
+
return t * t < Cr * n * e ? 0 : n < e ? -1 : 1;
|
|
2972
2974
|
};
|
|
2973
|
-
class
|
|
2975
|
+
class kr {
|
|
2974
2976
|
constructor() {
|
|
2975
2977
|
this.reset();
|
|
2976
2978
|
}
|
|
@@ -2986,7 +2988,7 @@ class Cr {
|
|
|
2986
2988
|
}
|
|
2987
2989
|
class di {
|
|
2988
2990
|
constructor() {
|
|
2989
|
-
this.tree = new
|
|
2991
|
+
this.tree = new Ot(), this.round(0);
|
|
2990
2992
|
}
|
|
2991
2993
|
// Note: this can rounds input values backwards or forwards.
|
|
2992
2994
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3003,10 +3005,10 @@ class di {
|
|
|
3003
3005
|
return r !== null && fi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3004
3006
|
}
|
|
3005
3007
|
}
|
|
3006
|
-
const
|
|
3008
|
+
const Ze = new kr(), nt = (n, e) => n.x * e.y - n.y * e.x, Ri = (n, e) => n.x * e.x + n.y * e.y, hi = (n, e, t) => {
|
|
3007
3009
|
const i = Mr(n.x, n.y, e.x, e.y, t.x, t.y);
|
|
3008
3010
|
return i > 0 ? -1 : i < 0 ? 1 : 0;
|
|
3009
|
-
},
|
|
3011
|
+
}, ot = (n) => Math.sqrt(Ri(n, n)), Nr = (n, e, t) => {
|
|
3010
3012
|
const i = {
|
|
3011
3013
|
x: e.x - n.x,
|
|
3012
3014
|
y: e.y - n.y
|
|
@@ -3014,8 +3016,8 @@ const Ge = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Ti = (n, e) => n.x *
|
|
|
3014
3016
|
x: t.x - n.x,
|
|
3015
3017
|
y: t.y - n.y
|
|
3016
3018
|
};
|
|
3017
|
-
return
|
|
3018
|
-
},
|
|
3019
|
+
return nt(r, i) / ot(r) / ot(i);
|
|
3020
|
+
}, Tr = (n, e, t) => {
|
|
3019
3021
|
const i = {
|
|
3020
3022
|
x: e.x - n.x,
|
|
3021
3023
|
y: e.y - n.y
|
|
@@ -3023,34 +3025,34 @@ const Ge = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Ti = (n, e) => n.x *
|
|
|
3023
3025
|
x: t.x - n.x,
|
|
3024
3026
|
y: t.y - n.y
|
|
3025
3027
|
};
|
|
3026
|
-
return
|
|
3028
|
+
return Ri(r, i) / ot(r) / ot(i);
|
|
3027
3029
|
}, gi = (n, e, t) => e.y === 0 ? null : {
|
|
3028
3030
|
x: n.x + e.x / e.y * (t - n.y),
|
|
3029
3031
|
y: t
|
|
3030
3032
|
}, mi = (n, e, t) => e.x === 0 ? null : {
|
|
3031
3033
|
x: t,
|
|
3032
3034
|
y: n.y + e.y / e.x * (t - n.x)
|
|
3033
|
-
},
|
|
3035
|
+
}, Pr = (n, e, t, i) => {
|
|
3034
3036
|
if (e.x === 0) return mi(t, i, n.x);
|
|
3035
3037
|
if (i.x === 0) return mi(n, e, t.x);
|
|
3036
3038
|
if (e.y === 0) return gi(t, i, n.y);
|
|
3037
3039
|
if (i.y === 0) return gi(n, e, t.y);
|
|
3038
|
-
const r =
|
|
3040
|
+
const r = nt(e, i);
|
|
3039
3041
|
if (r == 0) return null;
|
|
3040
3042
|
const o = {
|
|
3041
3043
|
x: t.x - n.x,
|
|
3042
3044
|
y: t.y - n.y
|
|
3043
|
-
},
|
|
3045
|
+
}, a = nt(o, e) / r, s = nt(o, i) / r, u = n.x + s * e.x, l = t.x + a * i.x, d = n.y + s * e.y, c = t.y + a * i.y, f = (u + l) / 2, h = (d + c) / 2;
|
|
3044
3046
|
return {
|
|
3045
3047
|
x: f,
|
|
3046
3048
|
y: h
|
|
3047
3049
|
};
|
|
3048
3050
|
};
|
|
3049
|
-
class
|
|
3051
|
+
class ne {
|
|
3050
3052
|
// for ordering sweep events in the sweep event queue
|
|
3051
3053
|
static compare(e, t) {
|
|
3052
|
-
const i =
|
|
3053
|
-
return i !== 0 ? i : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3054
|
+
const i = ne.comparePoints(e.point, t.point);
|
|
3055
|
+
return i !== 0 ? i : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : pe.compare(e.segment, t.segment));
|
|
3054
3056
|
}
|
|
3055
3057
|
// for ordering points in sweep line order
|
|
3056
3058
|
static comparePoints(e, t) {
|
|
@@ -3106,24 +3108,24 @@ class re {
|
|
|
3106
3108
|
const o = r.otherSE;
|
|
3107
3109
|
t.set(r, {
|
|
3108
3110
|
sine: Nr(this.point, e.point, o.point),
|
|
3109
|
-
cosine:
|
|
3111
|
+
cosine: Tr(this.point, e.point, o.point)
|
|
3110
3112
|
});
|
|
3111
3113
|
};
|
|
3112
3114
|
return (r, o) => {
|
|
3113
3115
|
t.has(r) || i(r), t.has(o) || i(o);
|
|
3114
3116
|
const {
|
|
3115
|
-
sine:
|
|
3117
|
+
sine: a,
|
|
3116
3118
|
cosine: s
|
|
3117
3119
|
} = t.get(r), {
|
|
3118
|
-
sine:
|
|
3119
|
-
cosine:
|
|
3120
|
+
sine: u,
|
|
3121
|
+
cosine: l
|
|
3120
3122
|
} = t.get(o);
|
|
3121
|
-
return
|
|
3123
|
+
return a >= 0 && u >= 0 ? s < l ? 1 : s > l ? -1 : 0 : a < 0 && u < 0 ? s < l ? -1 : s > l ? 1 : 0 : u < a ? -1 : u > a ? 1 : 0;
|
|
3122
3124
|
};
|
|
3123
3125
|
}
|
|
3124
3126
|
}
|
|
3125
3127
|
let Rr = 0;
|
|
3126
|
-
class
|
|
3128
|
+
class pe {
|
|
3127
3129
|
/* This compare() function is for ordering segments in the sweep
|
|
3128
3130
|
* line tree, and does so according to the following criteria:
|
|
3129
3131
|
*
|
|
@@ -3138,44 +3140,44 @@ class ye {
|
|
|
3138
3140
|
* is directly on the right-more of the two left inputs.
|
|
3139
3141
|
*/
|
|
3140
3142
|
static compare(e, t) {
|
|
3141
|
-
const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x,
|
|
3142
|
-
if (
|
|
3143
|
+
const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, a = t.rightSE.point.x;
|
|
3144
|
+
if (a < i) return 1;
|
|
3143
3145
|
if (o < r) return -1;
|
|
3144
|
-
const s = e.leftSE.point.y,
|
|
3146
|
+
const s = e.leftSE.point.y, u = t.leftSE.point.y, l = e.rightSE.point.y, d = t.rightSE.point.y;
|
|
3145
3147
|
if (i < r) {
|
|
3146
|
-
if (
|
|
3147
|
-
if (
|
|
3148
|
-
const
|
|
3149
|
-
if (
|
|
3150
|
-
if (
|
|
3148
|
+
if (u < s && u < l) return 1;
|
|
3149
|
+
if (u > s && u > l) return -1;
|
|
3150
|
+
const c = e.comparePoint(t.leftSE.point);
|
|
3151
|
+
if (c < 0) return 1;
|
|
3152
|
+
if (c > 0) return -1;
|
|
3151
3153
|
const f = t.comparePoint(e.rightSE.point);
|
|
3152
3154
|
return f !== 0 ? f : -1;
|
|
3153
3155
|
}
|
|
3154
3156
|
if (i > r) {
|
|
3155
|
-
if (s <
|
|
3156
|
-
if (s >
|
|
3157
|
-
const
|
|
3158
|
-
if (
|
|
3157
|
+
if (s < u && s < d) return -1;
|
|
3158
|
+
if (s > u && s > d) return 1;
|
|
3159
|
+
const c = t.comparePoint(e.leftSE.point);
|
|
3160
|
+
if (c !== 0) return c;
|
|
3159
3161
|
const f = e.comparePoint(t.rightSE.point);
|
|
3160
3162
|
return f < 0 ? 1 : f > 0 ? -1 : 1;
|
|
3161
3163
|
}
|
|
3162
|
-
if (s <
|
|
3163
|
-
if (s >
|
|
3164
|
-
if (o <
|
|
3165
|
-
const
|
|
3166
|
-
if (
|
|
3164
|
+
if (s < u) return -1;
|
|
3165
|
+
if (s > u) return 1;
|
|
3166
|
+
if (o < a) {
|
|
3167
|
+
const c = t.comparePoint(e.rightSE.point);
|
|
3168
|
+
if (c !== 0) return c;
|
|
3167
3169
|
}
|
|
3168
|
-
if (o >
|
|
3169
|
-
const
|
|
3170
|
-
if (
|
|
3171
|
-
if (
|
|
3170
|
+
if (o > a) {
|
|
3171
|
+
const c = e.comparePoint(t.rightSE.point);
|
|
3172
|
+
if (c < 0) return 1;
|
|
3173
|
+
if (c > 0) return -1;
|
|
3172
3174
|
}
|
|
3173
|
-
if (o !==
|
|
3174
|
-
const
|
|
3175
|
-
if (
|
|
3176
|
-
if (
|
|
3175
|
+
if (o !== a) {
|
|
3176
|
+
const c = l - s, f = o - i, h = d - u, p = a - r;
|
|
3177
|
+
if (c > f && h < p) return 1;
|
|
3178
|
+
if (c < f && h > p) return -1;
|
|
3177
3179
|
}
|
|
3178
|
-
return o >
|
|
3180
|
+
return o > a ? 1 : o < a || l < d ? -1 : l > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
3179
3181
|
}
|
|
3180
3182
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3181
3183
|
* and possibly will be later modified */
|
|
@@ -3183,15 +3185,15 @@ class ye {
|
|
|
3183
3185
|
this.id = ++Rr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = i, this.windings = r;
|
|
3184
3186
|
}
|
|
3185
3187
|
static fromRing(e, t, i) {
|
|
3186
|
-
let r, o,
|
|
3187
|
-
const s =
|
|
3188
|
+
let r, o, a;
|
|
3189
|
+
const s = ne.comparePoints(e, t);
|
|
3188
3190
|
if (s < 0)
|
|
3189
|
-
r = e, o = t,
|
|
3191
|
+
r = e, o = t, a = 1;
|
|
3190
3192
|
else if (s > 0)
|
|
3191
|
-
r = t, o = e,
|
|
3193
|
+
r = t, o = e, a = -1;
|
|
3192
3194
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3193
|
-
const
|
|
3194
|
-
return new
|
|
3195
|
+
const u = new ne(r, !0), l = new ne(o, !1);
|
|
3196
|
+
return new pe(u, l, [i], [a]);
|
|
3195
3197
|
}
|
|
3196
3198
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3197
3199
|
replaceRightSE(e) {
|
|
@@ -3238,10 +3240,10 @@ class ye {
|
|
|
3238
3240
|
const t = this.leftSE.point, i = this.rightSE.point, r = this.vector();
|
|
3239
3241
|
if (t.x === i.x)
|
|
3240
3242
|
return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
|
|
3241
|
-
const o = (e.y - t.y) / r.y,
|
|
3242
|
-
if (e.x ===
|
|
3243
|
-
const s = (e.x - t.x) / r.x,
|
|
3244
|
-
return e.y ===
|
|
3243
|
+
const o = (e.y - t.y) / r.y, a = t.x + o * r.x;
|
|
3244
|
+
if (e.x === a) return 0;
|
|
3245
|
+
const s = (e.x - t.x) / r.x, u = t.y + s * r.y;
|
|
3246
|
+
return e.y === u ? 0 : e.y < u ? -1 : 1;
|
|
3245
3247
|
}
|
|
3246
3248
|
/**
|
|
3247
3249
|
* Given another segment, returns the first non-trivial intersection
|
|
@@ -3259,20 +3261,20 @@ class ye {
|
|
|
3259
3261
|
* Else, return null.
|
|
3260
3262
|
*/
|
|
3261
3263
|
getIntersection(e) {
|
|
3262
|
-
const t = this.bbox(), i = e.bbox(), r =
|
|
3264
|
+
const t = this.bbox(), i = e.bbox(), r = Pt(t, i);
|
|
3263
3265
|
if (r === null) return null;
|
|
3264
|
-
const o = this.leftSE.point,
|
|
3265
|
-
if (d &&
|
|
3266
|
-
return f && !
|
|
3266
|
+
const o = this.leftSE.point, a = this.rightSE.point, s = e.leftSE.point, u = e.rightSE.point, l = De(t, s) && this.comparePoint(s) === 0, d = De(i, o) && e.comparePoint(o) === 0, c = De(t, u) && this.comparePoint(u) === 0, f = De(i, a) && e.comparePoint(a) === 0;
|
|
3267
|
+
if (d && l)
|
|
3268
|
+
return f && !c ? a : !f && c ? u : null;
|
|
3267
3269
|
if (d)
|
|
3268
|
-
return
|
|
3269
|
-
if (
|
|
3270
|
-
return f &&
|
|
3271
|
-
if (f &&
|
|
3272
|
-
if (f) return
|
|
3273
|
-
if (
|
|
3274
|
-
const h =
|
|
3275
|
-
return h === null || !
|
|
3270
|
+
return c && o.x === u.x && o.y === u.y ? null : o;
|
|
3271
|
+
if (l)
|
|
3272
|
+
return f && a.x === s.x && a.y === s.y ? null : s;
|
|
3273
|
+
if (f && c) return null;
|
|
3274
|
+
if (f) return a;
|
|
3275
|
+
if (c) return u;
|
|
3276
|
+
const h = Pr(o, this.vector(), s, e.vector());
|
|
3277
|
+
return h === null || !De(r, h) ? null : Ze.round(h.x, h.y);
|
|
3276
3278
|
}
|
|
3277
3279
|
/**
|
|
3278
3280
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3287,10 +3289,10 @@ class ye {
|
|
|
3287
3289
|
* Warning: input array of points is modified
|
|
3288
3290
|
*/
|
|
3289
3291
|
split(e) {
|
|
3290
|
-
const t = [], i = e.events !== void 0, r = new
|
|
3292
|
+
const t = [], i = e.events !== void 0, r = new ne(e, !0), o = new ne(e, !1), a = this.rightSE;
|
|
3291
3293
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3292
|
-
const s = new
|
|
3293
|
-
return
|
|
3294
|
+
const s = new pe(r, a, this.rings.slice(), this.windings.slice());
|
|
3295
|
+
return ne.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), ne.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (r.checkForConsuming(), o.checkForConsuming()), t;
|
|
3294
3296
|
}
|
|
3295
3297
|
/* Swap which event is left and right */
|
|
3296
3298
|
swapEvents() {
|
|
@@ -3305,7 +3307,7 @@ class ye {
|
|
|
3305
3307
|
let t = this, i = e;
|
|
3306
3308
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3307
3309
|
for (; i.consumedBy; ) i = i.consumedBy;
|
|
3308
|
-
const r =
|
|
3310
|
+
const r = pe.compare(t, i);
|
|
3309
3311
|
if (r !== 0) {
|
|
3310
3312
|
if (r > 0) {
|
|
3311
3313
|
const o = t;
|
|
@@ -3315,9 +3317,9 @@ class ye {
|
|
|
3315
3317
|
const o = t;
|
|
3316
3318
|
t = i, i = o;
|
|
3317
3319
|
}
|
|
3318
|
-
for (let o = 0,
|
|
3319
|
-
const s = i.rings[o],
|
|
3320
|
-
|
|
3320
|
+
for (let o = 0, a = i.rings.length; o < a; o++) {
|
|
3321
|
+
const s = i.rings[o], u = i.windings[o], l = t.rings.indexOf(s);
|
|
3322
|
+
l === -1 ? (t.rings.push(s), t.windings.push(u)) : t.windings[l] += u;
|
|
3321
3323
|
}
|
|
3322
3324
|
i.rings = null, i.windings = null, i.consumedBy = t, i.leftSE.consumedBy = t.leftSE, i.rightSE.consumedBy = t.rightSE;
|
|
3323
3325
|
}
|
|
@@ -3348,25 +3350,25 @@ class ye {
|
|
|
3348
3350
|
multiPolys: []
|
|
3349
3351
|
};
|
|
3350
3352
|
const t = this._afterState.rings, i = this._afterState.windings, r = this._afterState.multiPolys;
|
|
3351
|
-
for (let s = 0,
|
|
3352
|
-
const
|
|
3353
|
-
|
|
3353
|
+
for (let s = 0, u = this.rings.length; s < u; s++) {
|
|
3354
|
+
const l = this.rings[s], d = this.windings[s], c = t.indexOf(l);
|
|
3355
|
+
c === -1 ? (t.push(l), i.push(d)) : i[c] += d;
|
|
3354
3356
|
}
|
|
3355
|
-
const o = [],
|
|
3356
|
-
for (let s = 0,
|
|
3357
|
+
const o = [], a = [];
|
|
3358
|
+
for (let s = 0, u = t.length; s < u; s++) {
|
|
3357
3359
|
if (i[s] === 0) continue;
|
|
3358
|
-
const
|
|
3359
|
-
if (
|
|
3360
|
-
if (
|
|
3360
|
+
const l = t[s], d = l.poly;
|
|
3361
|
+
if (a.indexOf(d) === -1)
|
|
3362
|
+
if (l.isExterior) o.push(d);
|
|
3361
3363
|
else {
|
|
3362
|
-
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3364
|
+
a.indexOf(d) === -1 && a.push(d);
|
|
3365
|
+
const c = o.indexOf(l.poly);
|
|
3366
|
+
c !== -1 && o.splice(c, 1);
|
|
3365
3367
|
}
|
|
3366
3368
|
}
|
|
3367
|
-
for (let s = 0,
|
|
3368
|
-
const
|
|
3369
|
-
r.indexOf(
|
|
3369
|
+
for (let s = 0, u = o.length; s < u; s++) {
|
|
3370
|
+
const l = o[s].multiPoly;
|
|
3371
|
+
r.indexOf(l) === -1 && r.push(l);
|
|
3370
3372
|
}
|
|
3371
3373
|
return this._afterState;
|
|
3372
3374
|
}
|
|
@@ -3375,7 +3377,7 @@ class ye {
|
|
|
3375
3377
|
if (this.consumedBy) return !1;
|
|
3376
3378
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3377
3379
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3378
|
-
switch (
|
|
3380
|
+
switch (se.type) {
|
|
3379
3381
|
case "union": {
|
|
3380
3382
|
const i = e.length === 0, r = t.length === 0;
|
|
3381
3383
|
this._isInResult = i !== r;
|
|
@@ -3383,7 +3385,7 @@ class ye {
|
|
|
3383
3385
|
}
|
|
3384
3386
|
case "intersection": {
|
|
3385
3387
|
let i, r;
|
|
3386
|
-
e.length < t.length ? (i = e.length, r = t.length) : (i = t.length, r = e.length), this._isInResult = r ===
|
|
3388
|
+
e.length < t.length ? (i = e.length, r = t.length) : (i = t.length, r = e.length), this._isInResult = r === se.numMultiPolys && i < r;
|
|
3387
3389
|
break;
|
|
3388
3390
|
}
|
|
3389
3391
|
case "xor": {
|
|
@@ -3397,18 +3399,18 @@ class ye {
|
|
|
3397
3399
|
break;
|
|
3398
3400
|
}
|
|
3399
3401
|
default:
|
|
3400
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3402
|
+
throw new Error(`Unrecognized operation type found ${se.type}`);
|
|
3401
3403
|
}
|
|
3402
3404
|
return this._isInResult;
|
|
3403
3405
|
}
|
|
3404
3406
|
}
|
|
3405
|
-
class
|
|
3407
|
+
class yi {
|
|
3406
3408
|
constructor(e, t, i) {
|
|
3407
3409
|
if (!Array.isArray(e) || e.length === 0)
|
|
3408
3410
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3409
3411
|
if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3410
3412
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3411
|
-
const r =
|
|
3413
|
+
const r = Ze.round(e[0][0], e[0][1]);
|
|
3412
3414
|
this.bbox = {
|
|
3413
3415
|
ll: {
|
|
3414
3416
|
x: r.x,
|
|
@@ -3420,13 +3422,13 @@ class pi {
|
|
|
3420
3422
|
}
|
|
3421
3423
|
};
|
|
3422
3424
|
let o = r;
|
|
3423
|
-
for (let
|
|
3424
|
-
if (typeof e[
|
|
3425
|
+
for (let a = 1, s = e.length; a < s; a++) {
|
|
3426
|
+
if (typeof e[a][0] != "number" || typeof e[a][1] != "number")
|
|
3425
3427
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3426
|
-
let
|
|
3427
|
-
|
|
3428
|
+
let u = Ze.round(e[a][0], e[a][1]);
|
|
3429
|
+
u.x === o.x && u.y === o.y || (this.segments.push(pe.fromRing(o, u, this)), u.x < this.bbox.ll.x && (this.bbox.ll.x = u.x), u.y < this.bbox.ll.y && (this.bbox.ll.y = u.y), u.x > this.bbox.ur.x && (this.bbox.ur.x = u.x), u.y > this.bbox.ur.y && (this.bbox.ur.y = u.y), o = u);
|
|
3428
3430
|
}
|
|
3429
|
-
(r.x !== o.x || r.y !== o.y) && this.segments.push(
|
|
3431
|
+
(r.x !== o.x || r.y !== o.y) && this.segments.push(pe.fromRing(o, r, this));
|
|
3430
3432
|
}
|
|
3431
3433
|
getSweepEvents() {
|
|
3432
3434
|
const e = [];
|
|
@@ -3441,7 +3443,7 @@ class Ir {
|
|
|
3441
3443
|
constructor(e, t) {
|
|
3442
3444
|
if (!Array.isArray(e))
|
|
3443
3445
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3444
|
-
this.exteriorRing = new
|
|
3446
|
+
this.exteriorRing = new yi(e[0], this, !0), this.bbox = {
|
|
3445
3447
|
ll: {
|
|
3446
3448
|
x: this.exteriorRing.bbox.ll.x,
|
|
3447
3449
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3452,7 +3454,7 @@ class Ir {
|
|
|
3452
3454
|
}
|
|
3453
3455
|
}, this.interiorRings = [];
|
|
3454
3456
|
for (let i = 1, r = e.length; i < r; i++) {
|
|
3455
|
-
const o = new
|
|
3457
|
+
const o = new yi(e[i], this, !1);
|
|
3456
3458
|
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);
|
|
3457
3459
|
}
|
|
3458
3460
|
this.multiPoly = t;
|
|
@@ -3461,7 +3463,7 @@ class Ir {
|
|
|
3461
3463
|
const e = this.exteriorRing.getSweepEvents();
|
|
3462
3464
|
for (let t = 0, i = this.interiorRings.length; t < i; t++) {
|
|
3463
3465
|
const r = this.interiorRings[t].getSweepEvents();
|
|
3464
|
-
for (let o = 0,
|
|
3466
|
+
for (let o = 0, a = r.length; o < a; o++)
|
|
3465
3467
|
e.push(r[o]);
|
|
3466
3468
|
}
|
|
3467
3469
|
return e;
|
|
@@ -3495,13 +3497,13 @@ class vi {
|
|
|
3495
3497
|
const e = [];
|
|
3496
3498
|
for (let t = 0, i = this.polys.length; t < i; t++) {
|
|
3497
3499
|
const r = this.polys[t].getSweepEvents();
|
|
3498
|
-
for (let o = 0,
|
|
3500
|
+
for (let o = 0, a = r.length; o < a; o++)
|
|
3499
3501
|
e.push(r[o]);
|
|
3500
3502
|
}
|
|
3501
3503
|
return e;
|
|
3502
3504
|
}
|
|
3503
3505
|
}
|
|
3504
|
-
class
|
|
3506
|
+
class st {
|
|
3505
3507
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3506
3508
|
* of closed rings from all the segments marked to be part of the result */
|
|
3507
3509
|
static factory(e) {
|
|
@@ -3509,39 +3511,39 @@ class ut {
|
|
|
3509
3511
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3510
3512
|
const o = e[i];
|
|
3511
3513
|
if (!o.isInResult() || o.ringOut) continue;
|
|
3512
|
-
let
|
|
3513
|
-
const
|
|
3514
|
-
for (;
|
|
3514
|
+
let a = null, s = o.leftSE, u = o.rightSE;
|
|
3515
|
+
const l = [s], d = s.point, c = [];
|
|
3516
|
+
for (; a = s, s = u, l.push(s), s.point !== d; )
|
|
3515
3517
|
for (; ; ) {
|
|
3516
3518
|
const f = s.getAvailableLinkedEvents();
|
|
3517
3519
|
if (f.length === 0) {
|
|
3518
|
-
const
|
|
3519
|
-
throw new Error(`Unable to complete output ring starting at [${
|
|
3520
|
+
const b = l[0].point, m = l[l.length - 1].point;
|
|
3521
|
+
throw new Error(`Unable to complete output ring starting at [${b.x}, ${b.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`);
|
|
3520
3522
|
}
|
|
3521
3523
|
if (f.length === 1) {
|
|
3522
|
-
|
|
3524
|
+
u = f[0].otherSE;
|
|
3523
3525
|
break;
|
|
3524
3526
|
}
|
|
3525
3527
|
let h = null;
|
|
3526
|
-
for (let
|
|
3527
|
-
if (
|
|
3528
|
-
h =
|
|
3528
|
+
for (let b = 0, m = c.length; b < m; b++)
|
|
3529
|
+
if (c[b].point === s.point) {
|
|
3530
|
+
h = b;
|
|
3529
3531
|
break;
|
|
3530
3532
|
}
|
|
3531
3533
|
if (h !== null) {
|
|
3532
|
-
const
|
|
3533
|
-
|
|
3534
|
+
const b = c.splice(h)[0], m = l.splice(b.index);
|
|
3535
|
+
m.unshift(m[0].otherSE), t.push(new st(m.reverse()));
|
|
3534
3536
|
continue;
|
|
3535
3537
|
}
|
|
3536
|
-
|
|
3537
|
-
index:
|
|
3538
|
+
c.push({
|
|
3539
|
+
index: l.length,
|
|
3538
3540
|
point: s.point
|
|
3539
3541
|
});
|
|
3540
|
-
const
|
|
3541
|
-
|
|
3542
|
+
const p = s.getLeftmostComparator(a);
|
|
3543
|
+
u = f.sort(p)[0].otherSE;
|
|
3542
3544
|
break;
|
|
3543
3545
|
}
|
|
3544
|
-
t.push(new
|
|
3546
|
+
t.push(new st(l));
|
|
3545
3547
|
}
|
|
3546
3548
|
return t;
|
|
3547
3549
|
}
|
|
@@ -3554,16 +3556,16 @@ class ut {
|
|
|
3554
3556
|
getGeom() {
|
|
3555
3557
|
let e = this.events[0].point;
|
|
3556
3558
|
const t = [e];
|
|
3557
|
-
for (let
|
|
3558
|
-
const
|
|
3559
|
-
hi(
|
|
3559
|
+
for (let l = 1, d = this.events.length - 1; l < d; l++) {
|
|
3560
|
+
const c = this.events[l].point, f = this.events[l + 1].point;
|
|
3561
|
+
hi(c, e, f) !== 0 && (t.push(c), e = c);
|
|
3560
3562
|
}
|
|
3561
3563
|
if (t.length === 1) return null;
|
|
3562
3564
|
const i = t[0], r = t[1];
|
|
3563
3565
|
hi(i, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3564
|
-
const o = this.isExteriorRing() ? 1 : -1,
|
|
3565
|
-
for (let
|
|
3566
|
-
return
|
|
3566
|
+
const o = this.isExteriorRing() ? 1 : -1, a = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, u = [];
|
|
3567
|
+
for (let l = a; l != s; l += o) u.push([t[l].x, t[l].y]);
|
|
3568
|
+
return u;
|
|
3567
3569
|
}
|
|
3568
3570
|
isExteriorRing() {
|
|
3569
3571
|
if (this._isExteriorRing === void 0) {
|
|
@@ -3579,8 +3581,8 @@ class ut {
|
|
|
3579
3581
|
_calcEnclosingRing() {
|
|
3580
3582
|
let e = this.events[0];
|
|
3581
3583
|
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3582
|
-
const
|
|
3583
|
-
|
|
3584
|
+
const a = this.events[r];
|
|
3585
|
+
ne.compare(e, a) > 0 && (e = a);
|
|
3584
3586
|
}
|
|
3585
3587
|
let t = e.segment.prevInResult(), i = t ? t.prevInResult() : null;
|
|
3586
3588
|
for (; ; ) {
|
|
@@ -3592,7 +3594,7 @@ class ut {
|
|
|
3592
3594
|
}
|
|
3593
3595
|
}
|
|
3594
3596
|
}
|
|
3595
|
-
class
|
|
3597
|
+
class pi {
|
|
3596
3598
|
constructor(e) {
|
|
3597
3599
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3598
3600
|
}
|
|
@@ -3626,10 +3628,10 @@ class Or {
|
|
|
3626
3628
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3627
3629
|
const o = e[i];
|
|
3628
3630
|
if (!o.poly)
|
|
3629
|
-
if (o.isExteriorRing()) t.push(new
|
|
3631
|
+
if (o.isExteriorRing()) t.push(new pi(o));
|
|
3630
3632
|
else {
|
|
3631
|
-
const
|
|
3632
|
-
|
|
3633
|
+
const a = o.enclosingRing();
|
|
3634
|
+
a.poly || t.push(new pi(a)), a.poly.addInterior(o);
|
|
3633
3635
|
}
|
|
3634
3636
|
}
|
|
3635
3637
|
return t;
|
|
@@ -3637,8 +3639,8 @@ class Or {
|
|
|
3637
3639
|
}
|
|
3638
3640
|
class Wr {
|
|
3639
3641
|
constructor(e) {
|
|
3640
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3641
|
-
this.queue = e, this.tree = new
|
|
3642
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : pe.compare;
|
|
3643
|
+
this.queue = e, this.tree = new Ot(t), this.segments = [];
|
|
3642
3644
|
}
|
|
3643
3645
|
process(e) {
|
|
3644
3646
|
const t = e.segment, i = [];
|
|
@@ -3646,51 +3648,51 @@ class Wr {
|
|
|
3646
3648
|
return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), i;
|
|
3647
3649
|
const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
|
|
3648
3650
|
if (!r) throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);
|
|
3649
|
-
let o = r,
|
|
3651
|
+
let o = r, a = r, s, u;
|
|
3650
3652
|
for (; s === void 0; )
|
|
3651
3653
|
o = this.tree.prev(o), o === null ? s = null : o.key.consumedBy === void 0 && (s = o.key);
|
|
3652
|
-
for (;
|
|
3653
|
-
|
|
3654
|
+
for (; u === void 0; )
|
|
3655
|
+
a = this.tree.next(a), a === null ? u = null : a.key.consumedBy === void 0 && (u = a.key);
|
|
3654
3656
|
if (e.isLeft) {
|
|
3655
|
-
let
|
|
3657
|
+
let l = null;
|
|
3656
3658
|
if (s) {
|
|
3657
|
-
const
|
|
3658
|
-
if (
|
|
3659
|
-
const f = this._splitSafely(s,
|
|
3660
|
-
for (let h = 0,
|
|
3659
|
+
const c = s.getIntersection(t);
|
|
3660
|
+
if (c !== null && (t.isAnEndpoint(c) || (l = c), !s.isAnEndpoint(c))) {
|
|
3661
|
+
const f = this._splitSafely(s, c);
|
|
3662
|
+
for (let h = 0, p = f.length; h < p; h++)
|
|
3661
3663
|
i.push(f[h]);
|
|
3662
3664
|
}
|
|
3663
3665
|
}
|
|
3664
3666
|
let d = null;
|
|
3665
|
-
if (
|
|
3666
|
-
const
|
|
3667
|
-
if (
|
|
3668
|
-
const f = this._splitSafely(
|
|
3669
|
-
for (let h = 0,
|
|
3667
|
+
if (u) {
|
|
3668
|
+
const c = u.getIntersection(t);
|
|
3669
|
+
if (c !== null && (t.isAnEndpoint(c) || (d = c), !u.isAnEndpoint(c))) {
|
|
3670
|
+
const f = this._splitSafely(u, c);
|
|
3671
|
+
for (let h = 0, p = f.length; h < p; h++)
|
|
3670
3672
|
i.push(f[h]);
|
|
3671
3673
|
}
|
|
3672
3674
|
}
|
|
3673
|
-
if (
|
|
3674
|
-
let
|
|
3675
|
-
|
|
3676
|
-
const f = t.split(
|
|
3677
|
-
for (let h = 0,
|
|
3675
|
+
if (l !== null || d !== null) {
|
|
3676
|
+
let c = null;
|
|
3677
|
+
l === null ? c = d : d === null ? c = l : c = ne.comparePoints(l, d) <= 0 ? l : d, this.queue.remove(t.rightSE), i.push(t.rightSE);
|
|
3678
|
+
const f = t.split(c);
|
|
3679
|
+
for (let h = 0, p = f.length; h < p; h++)
|
|
3678
3680
|
i.push(f[h]);
|
|
3679
3681
|
}
|
|
3680
3682
|
i.length > 0 ? (this.tree.remove(t), i.push(e)) : (this.segments.push(t), t.prev = s);
|
|
3681
3683
|
} else {
|
|
3682
|
-
if (s &&
|
|
3683
|
-
const
|
|
3684
|
-
if (
|
|
3685
|
-
if (!s.isAnEndpoint(
|
|
3686
|
-
const d = this._splitSafely(s,
|
|
3687
|
-
for (let
|
|
3688
|
-
i.push(d[
|
|
3684
|
+
if (s && u) {
|
|
3685
|
+
const l = s.getIntersection(u);
|
|
3686
|
+
if (l !== null) {
|
|
3687
|
+
if (!s.isAnEndpoint(l)) {
|
|
3688
|
+
const d = this._splitSafely(s, l);
|
|
3689
|
+
for (let c = 0, f = d.length; c < f; c++)
|
|
3690
|
+
i.push(d[c]);
|
|
3689
3691
|
}
|
|
3690
|
-
if (!
|
|
3691
|
-
const d = this._splitSafely(
|
|
3692
|
-
for (let
|
|
3693
|
-
i.push(d[
|
|
3692
|
+
if (!u.isAnEndpoint(l)) {
|
|
3693
|
+
const d = this._splitSafely(u, l);
|
|
3694
|
+
for (let c = 0, f = d.length; c < f; c++)
|
|
3695
|
+
i.push(d[c]);
|
|
3694
3696
|
}
|
|
3695
3697
|
}
|
|
3696
3698
|
}
|
|
@@ -3708,157 +3710,157 @@ class Wr {
|
|
|
3708
3710
|
return r.push(i), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3709
3711
|
}
|
|
3710
3712
|
}
|
|
3711
|
-
const
|
|
3713
|
+
const bi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Ar = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3712
3714
|
class Br {
|
|
3713
3715
|
run(e, t, i) {
|
|
3714
|
-
|
|
3716
|
+
se.type = e, Ze.reset();
|
|
3715
3717
|
const r = [new vi(t, !0)];
|
|
3716
|
-
for (let
|
|
3717
|
-
r.push(new vi(i[
|
|
3718
|
-
if (
|
|
3719
|
-
const
|
|
3718
|
+
for (let c = 0, f = i.length; c < f; c++)
|
|
3719
|
+
r.push(new vi(i[c], !1));
|
|
3720
|
+
if (se.numMultiPolys = r.length, se.type === "difference") {
|
|
3721
|
+
const c = r[0];
|
|
3720
3722
|
let f = 1;
|
|
3721
3723
|
for (; f < r.length; )
|
|
3722
|
-
|
|
3724
|
+
Pt(r[f].bbox, c.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3723
3725
|
}
|
|
3724
|
-
if (
|
|
3725
|
-
for (let
|
|
3726
|
-
const h = r[
|
|
3727
|
-
for (let
|
|
3728
|
-
if (
|
|
3726
|
+
if (se.type === "intersection")
|
|
3727
|
+
for (let c = 0, f = r.length; c < f; c++) {
|
|
3728
|
+
const h = r[c];
|
|
3729
|
+
for (let p = c + 1, b = r.length; p < b; p++)
|
|
3730
|
+
if (Pt(h.bbox, r[p].bbox) === null) return [];
|
|
3729
3731
|
}
|
|
3730
|
-
const o = new
|
|
3731
|
-
for (let
|
|
3732
|
-
const h = r[
|
|
3733
|
-
for (let
|
|
3734
|
-
if (o.insert(h[
|
|
3732
|
+
const o = new Ot(ne.compare);
|
|
3733
|
+
for (let c = 0, f = r.length; c < f; c++) {
|
|
3734
|
+
const h = r[c].getSweepEvents();
|
|
3735
|
+
for (let p = 0, b = h.length; p < b; p++)
|
|
3736
|
+
if (o.insert(h[p]), o.size > bi)
|
|
3735
3737
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3736
3738
|
}
|
|
3737
|
-
const
|
|
3738
|
-
let s = o.size,
|
|
3739
|
-
for (;
|
|
3740
|
-
const
|
|
3739
|
+
const a = new Wr(o);
|
|
3740
|
+
let s = o.size, u = o.pop();
|
|
3741
|
+
for (; u; ) {
|
|
3742
|
+
const c = u.key;
|
|
3741
3743
|
if (o.size === s) {
|
|
3742
|
-
const h =
|
|
3743
|
-
throw new Error(`Unable to pop() ${
|
|
3744
|
+
const h = c.segment;
|
|
3745
|
+
throw new Error(`Unable to pop() ${c.isLeft ? "left" : "right"} SweepEvent [${c.point.x}, ${c.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
|
|
3744
3746
|
}
|
|
3745
|
-
if (o.size >
|
|
3747
|
+
if (o.size > bi)
|
|
3746
3748
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3747
|
-
if (
|
|
3749
|
+
if (a.segments.length > Ar)
|
|
3748
3750
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3749
|
-
const f =
|
|
3750
|
-
for (let h = 0,
|
|
3751
|
-
const
|
|
3752
|
-
|
|
3751
|
+
const f = a.process(c);
|
|
3752
|
+
for (let h = 0, p = f.length; h < p; h++) {
|
|
3753
|
+
const b = f[h];
|
|
3754
|
+
b.consumedBy === void 0 && o.insert(b);
|
|
3753
3755
|
}
|
|
3754
|
-
s = o.size,
|
|
3756
|
+
s = o.size, u = o.pop();
|
|
3755
3757
|
}
|
|
3756
|
-
|
|
3757
|
-
const
|
|
3758
|
-
return new Or(
|
|
3758
|
+
Ze.reset();
|
|
3759
|
+
const l = st.factory(a.segments);
|
|
3760
|
+
return new Or(l).getGeom();
|
|
3759
3761
|
}
|
|
3760
3762
|
}
|
|
3761
|
-
const
|
|
3763
|
+
const se = new Br(), Dr = function(n) {
|
|
3762
3764
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3763
3765
|
t[i - 1] = arguments[i];
|
|
3764
|
-
return
|
|
3766
|
+
return se.run("union", n, t);
|
|
3765
3767
|
}, Ur = function(n) {
|
|
3766
3768
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3767
3769
|
t[i - 1] = arguments[i];
|
|
3768
|
-
return
|
|
3770
|
+
return se.run("intersection", n, t);
|
|
3769
3771
|
}, zr = function(n) {
|
|
3770
3772
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3771
3773
|
t[i - 1] = arguments[i];
|
|
3772
|
-
return
|
|
3773
|
-
},
|
|
3774
|
+
return se.run("xor", n, t);
|
|
3775
|
+
}, Gr = function(n) {
|
|
3774
3776
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3775
3777
|
t[i - 1] = arguments[i];
|
|
3776
|
-
return
|
|
3778
|
+
return se.run("difference", n, t);
|
|
3777
3779
|
};
|
|
3778
|
-
var
|
|
3780
|
+
var Ii = {
|
|
3779
3781
|
union: Dr,
|
|
3780
3782
|
intersection: Ur,
|
|
3781
3783
|
xor: zr,
|
|
3782
|
-
difference:
|
|
3784
|
+
difference: Gr
|
|
3783
3785
|
};
|
|
3784
|
-
function
|
|
3786
|
+
function Oi(n, e, t) {
|
|
3785
3787
|
if (n !== null)
|
|
3786
|
-
for (var i, r, o,
|
|
3787
|
-
|
|
3788
|
-
for (var
|
|
3789
|
-
var
|
|
3790
|
-
if (
|
|
3791
|
-
|
|
3792
|
-
var
|
|
3793
|
-
switch (d = 0,
|
|
3788
|
+
for (var i, r, o, a, s, u, l, d = 0, c = 0, f, h = n.type, p = h === "FeatureCollection", b = h === "Feature", m = p ? n.features.length : 1, y = 0; y < m; y++) {
|
|
3789
|
+
l = p ? n.features[y].geometry : b ? n.geometry : n, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
|
|
3790
|
+
for (var w = 0; w < s; w++) {
|
|
3791
|
+
var L = 0, E = 0;
|
|
3792
|
+
if (a = f ? l.geometries[w] : l, a !== null) {
|
|
3793
|
+
u = a.coordinates;
|
|
3794
|
+
var C = a.type;
|
|
3795
|
+
switch (d = 0, C) {
|
|
3794
3796
|
case null:
|
|
3795
3797
|
break;
|
|
3796
3798
|
case "Point":
|
|
3797
3799
|
if (e(
|
|
3800
|
+
u,
|
|
3798
3801
|
c,
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
_
|
|
3802
|
+
y,
|
|
3803
|
+
L,
|
|
3804
|
+
E
|
|
3803
3805
|
) === !1)
|
|
3804
3806
|
return !1;
|
|
3805
|
-
|
|
3807
|
+
c++, L++;
|
|
3806
3808
|
break;
|
|
3807
3809
|
case "LineString":
|
|
3808
3810
|
case "MultiPoint":
|
|
3809
|
-
for (i = 0; i <
|
|
3811
|
+
for (i = 0; i < u.length; i++) {
|
|
3810
3812
|
if (e(
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3813
|
+
u[i],
|
|
3814
|
+
c,
|
|
3815
|
+
y,
|
|
3816
|
+
L,
|
|
3817
|
+
E
|
|
3816
3818
|
) === !1)
|
|
3817
3819
|
return !1;
|
|
3818
|
-
|
|
3820
|
+
c++, C === "MultiPoint" && L++;
|
|
3819
3821
|
}
|
|
3820
|
-
|
|
3822
|
+
C === "LineString" && L++;
|
|
3821
3823
|
break;
|
|
3822
3824
|
case "Polygon":
|
|
3823
3825
|
case "MultiLineString":
|
|
3824
|
-
for (i = 0; i <
|
|
3825
|
-
for (r = 0; r <
|
|
3826
|
+
for (i = 0; i < u.length; i++) {
|
|
3827
|
+
for (r = 0; r < u[i].length - d; r++) {
|
|
3826
3828
|
if (e(
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3829
|
+
u[i][r],
|
|
3830
|
+
c,
|
|
3831
|
+
y,
|
|
3832
|
+
L,
|
|
3833
|
+
E
|
|
3832
3834
|
) === !1)
|
|
3833
3835
|
return !1;
|
|
3834
|
-
|
|
3836
|
+
c++;
|
|
3835
3837
|
}
|
|
3836
|
-
|
|
3838
|
+
C === "MultiLineString" && L++, C === "Polygon" && E++;
|
|
3837
3839
|
}
|
|
3838
|
-
|
|
3840
|
+
C === "Polygon" && L++;
|
|
3839
3841
|
break;
|
|
3840
3842
|
case "MultiPolygon":
|
|
3841
|
-
for (i = 0; i <
|
|
3842
|
-
for (
|
|
3843
|
-
for (o = 0; o <
|
|
3843
|
+
for (i = 0; i < u.length; i++) {
|
|
3844
|
+
for (E = 0, r = 0; r < u[i].length; r++) {
|
|
3845
|
+
for (o = 0; o < u[i][r].length - d; o++) {
|
|
3844
3846
|
if (e(
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3847
|
+
u[i][r][o],
|
|
3848
|
+
c,
|
|
3849
|
+
y,
|
|
3850
|
+
L,
|
|
3851
|
+
E
|
|
3850
3852
|
) === !1)
|
|
3851
3853
|
return !1;
|
|
3852
|
-
|
|
3854
|
+
c++;
|
|
3853
3855
|
}
|
|
3854
|
-
|
|
3856
|
+
E++;
|
|
3855
3857
|
}
|
|
3856
|
-
|
|
3858
|
+
L++;
|
|
3857
3859
|
}
|
|
3858
3860
|
break;
|
|
3859
3861
|
case "GeometryCollection":
|
|
3860
|
-
for (i = 0; i <
|
|
3861
|
-
if (
|
|
3862
|
+
for (i = 0; i < a.geometries.length; i++)
|
|
3863
|
+
if (Oi(a.geometries[i], e) === !1)
|
|
3862
3864
|
return !1;
|
|
3863
3865
|
break;
|
|
3864
3866
|
default:
|
|
@@ -3868,17 +3870,17 @@ function Ii(n, e, t) {
|
|
|
3868
3870
|
}
|
|
3869
3871
|
}
|
|
3870
3872
|
}
|
|
3871
|
-
function
|
|
3872
|
-
var t, i, r, o,
|
|
3873
|
-
for (t = 0; t <
|
|
3874
|
-
for (s = h ? n.features[t].geometry :
|
|
3875
|
-
if (o =
|
|
3873
|
+
function Wt(n, e) {
|
|
3874
|
+
var t, i, r, o, a, s, u, l, d, c, f = 0, h = n.type === "FeatureCollection", p = n.type === "Feature", b = h ? n.features.length : 1;
|
|
3875
|
+
for (t = 0; t < b; t++) {
|
|
3876
|
+
for (s = h ? n.features[t].geometry : p ? n.geometry : n, l = h ? n.features[t].properties : p ? n.properties : {}, d = h ? n.features[t].bbox : p ? n.bbox : void 0, c = h ? n.features[t].id : p ? n.id : void 0, u = s ? s.type === "GeometryCollection" : !1, a = u ? s.geometries.length : 1, r = 0; r < a; r++) {
|
|
3877
|
+
if (o = u ? s.geometries[r] : s, o === null) {
|
|
3876
3878
|
if (e(
|
|
3877
3879
|
null,
|
|
3878
3880
|
f,
|
|
3879
|
-
|
|
3881
|
+
l,
|
|
3880
3882
|
d,
|
|
3881
|
-
|
|
3883
|
+
c
|
|
3882
3884
|
) === !1)
|
|
3883
3885
|
return !1;
|
|
3884
3886
|
continue;
|
|
@@ -3893,9 +3895,9 @@ function At(n, e) {
|
|
|
3893
3895
|
if (e(
|
|
3894
3896
|
o,
|
|
3895
3897
|
f,
|
|
3896
|
-
|
|
3898
|
+
l,
|
|
3897
3899
|
d,
|
|
3898
|
-
|
|
3900
|
+
c
|
|
3899
3901
|
) === !1)
|
|
3900
3902
|
return !1;
|
|
3901
3903
|
break;
|
|
@@ -3905,9 +3907,9 @@ function At(n, e) {
|
|
|
3905
3907
|
if (e(
|
|
3906
3908
|
o.geometries[i],
|
|
3907
3909
|
f,
|
|
3908
|
-
|
|
3910
|
+
l,
|
|
3909
3911
|
d,
|
|
3910
|
-
|
|
3912
|
+
c
|
|
3911
3913
|
) === !1)
|
|
3912
3914
|
return !1;
|
|
3913
3915
|
break;
|
|
@@ -3919,8 +3921,8 @@ function At(n, e) {
|
|
|
3919
3921
|
f++;
|
|
3920
3922
|
}
|
|
3921
3923
|
}
|
|
3922
|
-
function
|
|
3923
|
-
|
|
3924
|
+
function Fr(n, e) {
|
|
3925
|
+
Wt(n, function(t, i, r, o, a) {
|
|
3924
3926
|
var s = t === null ? null : t.type;
|
|
3925
3927
|
switch (s) {
|
|
3926
3928
|
case null:
|
|
@@ -3928,75 +3930,75 @@ function jr(n, e) {
|
|
|
3928
3930
|
case "LineString":
|
|
3929
3931
|
case "Polygon":
|
|
3930
3932
|
return e(
|
|
3931
|
-
|
|
3933
|
+
Fe(t, r, { bbox: o, id: a }),
|
|
3932
3934
|
i,
|
|
3933
3935
|
0
|
|
3934
3936
|
) === !1 ? !1 : void 0;
|
|
3935
3937
|
}
|
|
3936
|
-
var
|
|
3938
|
+
var u;
|
|
3937
3939
|
switch (s) {
|
|
3938
3940
|
case "MultiPoint":
|
|
3939
|
-
|
|
3941
|
+
u = "Point";
|
|
3940
3942
|
break;
|
|
3941
3943
|
case "MultiLineString":
|
|
3942
|
-
|
|
3944
|
+
u = "LineString";
|
|
3943
3945
|
break;
|
|
3944
3946
|
case "MultiPolygon":
|
|
3945
|
-
|
|
3947
|
+
u = "Polygon";
|
|
3946
3948
|
break;
|
|
3947
3949
|
}
|
|
3948
|
-
for (var
|
|
3949
|
-
var d = t.coordinates[
|
|
3950
|
-
type:
|
|
3950
|
+
for (var l = 0; l < t.coordinates.length; l++) {
|
|
3951
|
+
var d = t.coordinates[l], c = {
|
|
3952
|
+
type: u,
|
|
3951
3953
|
coordinates: d
|
|
3952
3954
|
};
|
|
3953
|
-
if (e(
|
|
3955
|
+
if (e(Fe(c, r), i, l) === !1)
|
|
3954
3956
|
return !1;
|
|
3955
3957
|
}
|
|
3956
3958
|
});
|
|
3957
3959
|
}
|
|
3958
|
-
function
|
|
3960
|
+
function jr(n, e = {}) {
|
|
3959
3961
|
const t = [];
|
|
3960
|
-
if (
|
|
3962
|
+
if (Wt(n, (r) => {
|
|
3961
3963
|
t.push(r.coordinates);
|
|
3962
3964
|
}), t.length < 2)
|
|
3963
3965
|
throw new Error("Must have at least 2 geometries");
|
|
3964
|
-
const i =
|
|
3965
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3966
|
+
const i = Ii.union(t[0], ...t.slice(1));
|
|
3967
|
+
return i.length === 0 ? null : i.length === 1 ? It(i[0], e.properties) : Pi(i, e.properties);
|
|
3966
3968
|
}
|
|
3967
|
-
var
|
|
3968
|
-
function
|
|
3969
|
+
var Wi = jr;
|
|
3970
|
+
function Zr(n, e = {}) {
|
|
3969
3971
|
if (n.bbox != null && e.recompute !== !0)
|
|
3970
3972
|
return n.bbox;
|
|
3971
3973
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
3972
|
-
return
|
|
3974
|
+
return Oi(n, (i) => {
|
|
3973
3975
|
t[0] > i[0] && (t[0] = i[0]), t[1] > i[1] && (t[1] = i[1]), t[2] < i[0] && (t[2] = i[0]), t[3] < i[1] && (t[3] = i[1]);
|
|
3974
3976
|
}), t;
|
|
3975
3977
|
}
|
|
3976
|
-
var
|
|
3977
|
-
function
|
|
3978
|
+
var _i = Zr;
|
|
3979
|
+
function qr(n) {
|
|
3978
3980
|
const e = [];
|
|
3979
|
-
if (
|
|
3981
|
+
if (Wt(n, (r) => {
|
|
3980
3982
|
e.push(r.coordinates);
|
|
3981
3983
|
}), e.length < 2)
|
|
3982
3984
|
throw new Error("Must have at least two features");
|
|
3983
|
-
const t = n.features[0].properties || {}, i =
|
|
3984
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3985
|
+
const t = n.features[0].properties || {}, i = Ii.difference(e[0], ...e.slice(1));
|
|
3986
|
+
return i.length === 0 ? null : i.length === 1 ? It(i[0], t) : Pi(i, t);
|
|
3985
3987
|
}
|
|
3986
|
-
var Qr =
|
|
3988
|
+
var Qr = qr;
|
|
3987
3989
|
function Hr(n) {
|
|
3988
3990
|
if (!n)
|
|
3989
3991
|
throw new Error("geojson is required");
|
|
3990
3992
|
var e = [];
|
|
3991
|
-
return
|
|
3993
|
+
return Fr(n, function(t) {
|
|
3992
3994
|
e.push(t);
|
|
3993
|
-
}),
|
|
3995
|
+
}), je(e);
|
|
3994
3996
|
}
|
|
3995
3997
|
var Vr = Hr;
|
|
3996
|
-
function
|
|
3998
|
+
function wi(n, e) {
|
|
3997
3999
|
const t = Qr(
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
+
je([
|
|
4001
|
+
It([
|
|
4000
4002
|
[
|
|
4001
4003
|
[180, 90],
|
|
4002
4004
|
[-180, 90],
|
|
@@ -4011,28 +4013,27 @@ function _i(n, e) {
|
|
|
4011
4013
|
if (!t)
|
|
4012
4014
|
return;
|
|
4013
4015
|
t.properties = { isMask: !0 };
|
|
4014
|
-
const i =
|
|
4015
|
-
if (s.features.length > 1 && (o ||
|
|
4016
|
-
for (const
|
|
4017
|
-
const
|
|
4018
|
-
if (
|
|
4019
|
-
for (const d of
|
|
4020
|
-
for (const
|
|
4021
|
-
|
|
4022
|
-
if (o &&
|
|
4023
|
-
for (const d of
|
|
4024
|
-
for (const
|
|
4025
|
-
|
|
4016
|
+
const i = rt(_i(n)), r = (i[2] - i[0]) / 360 / 1e3, o = i[0] < -180, a = i[2] > 180, s = Vr(n);
|
|
4017
|
+
if (s.features.length > 1 && (o || a))
|
|
4018
|
+
for (const u of s.features) {
|
|
4019
|
+
const l = rt(_i(u));
|
|
4020
|
+
if (a && l[0] < -180 + r)
|
|
4021
|
+
for (const d of u.geometry.coordinates)
|
|
4022
|
+
for (const c of d)
|
|
4023
|
+
c[0] += 360 - r;
|
|
4024
|
+
if (o && l[2] > 180 - r)
|
|
4025
|
+
for (const d of u.geometry.coordinates)
|
|
4026
|
+
for (const c of d)
|
|
4027
|
+
c[0] -= 360 - r;
|
|
4026
4028
|
}
|
|
4027
4029
|
e(
|
|
4028
|
-
|
|
4029
|
-
s.features.length < 2 ? n :
|
|
4030
|
+
je([
|
|
4031
|
+
s.features.length < 2 ? n : Wi(s) ?? n,
|
|
4030
4032
|
t
|
|
4031
4033
|
])
|
|
4032
4034
|
);
|
|
4033
4035
|
}
|
|
4034
|
-
const Ei =
|
|
4035
|
-
function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
4036
|
+
const Ei = je([]), Li = {
|
|
4036
4037
|
fill: {
|
|
4037
4038
|
paint: {
|
|
4038
4039
|
"fill-color": "#000",
|
|
@@ -4051,256 +4052,263 @@ function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
|
4051
4052
|
},
|
|
4052
4053
|
filter: ["!", ["has", "isMask"]]
|
|
4053
4054
|
}
|
|
4054
|
-
}
|
|
4055
|
+
};
|
|
4056
|
+
function Yr(n, e, t = !0, i = !0, r = {}, o = {}, a = Li) {
|
|
4055
4057
|
let s;
|
|
4056
|
-
const
|
|
4057
|
-
let
|
|
4058
|
+
const u = [];
|
|
4059
|
+
let l, d, c;
|
|
4058
4060
|
function f() {
|
|
4059
|
-
|
|
4061
|
+
const m = a ? a === !0 ? Li : a : void 0;
|
|
4062
|
+
!n.getSource("full-geom") && (m != null && m.fill || m != null && m.line) && n.addSource("full-geom", {
|
|
4060
4063
|
type: "geojson",
|
|
4061
4064
|
data: Ei
|
|
4062
|
-
}), !n.getLayer("full-geom-fill") && (
|
|
4063
|
-
...
|
|
4065
|
+
}), !n.getLayer("full-geom-fill") && (m != null && m.fill) && n.addLayer({
|
|
4066
|
+
...m == null ? void 0 : m.fill,
|
|
4064
4067
|
id: "full-geom-fill",
|
|
4065
4068
|
type: "fill",
|
|
4066
4069
|
source: "full-geom"
|
|
4067
|
-
}), !n.getLayer("full-geom-line") && (
|
|
4068
|
-
...
|
|
4070
|
+
}), !n.getLayer("full-geom-line") && (m != null && m.line) && n.addLayer({
|
|
4071
|
+
...m == null ? void 0 : m.line,
|
|
4069
4072
|
id: "full-geom-line",
|
|
4070
4073
|
type: "line",
|
|
4071
4074
|
source: "full-geom"
|
|
4072
|
-
}),
|
|
4075
|
+
}), c && b(c);
|
|
4073
4076
|
}
|
|
4074
4077
|
n.loaded() ? f() : n.once("load", () => {
|
|
4075
4078
|
f();
|
|
4076
4079
|
}), n.on("styledata", () => {
|
|
4077
4080
|
f();
|
|
4078
4081
|
});
|
|
4079
|
-
const h = (
|
|
4082
|
+
const h = (m) => {
|
|
4080
4083
|
s == null || s({
|
|
4081
4084
|
type: "mapClick",
|
|
4082
|
-
coordinates: [
|
|
4085
|
+
coordinates: [m.lngLat.lng, m.lngLat.lat]
|
|
4083
4086
|
});
|
|
4084
4087
|
};
|
|
4085
|
-
function
|
|
4088
|
+
function p(m = !1) {
|
|
4086
4089
|
if (!e)
|
|
4087
4090
|
throw new Error();
|
|
4088
|
-
const
|
|
4089
|
-
return
|
|
4091
|
+
const y = document.createElement("div");
|
|
4092
|
+
return m && y.classList.add("marker-interactive"), new jn({
|
|
4090
4093
|
props: { displayIn: "maplibre" },
|
|
4091
|
-
target:
|
|
4092
|
-
}), new e.Marker({ element:
|
|
4094
|
+
target: y
|
|
4095
|
+
}), new e.Marker({ element: y, offset: [1, -13] });
|
|
4093
4096
|
}
|
|
4094
|
-
function
|
|
4095
|
-
var
|
|
4096
|
-
|
|
4097
|
+
function b(m) {
|
|
4098
|
+
var y;
|
|
4099
|
+
c = m, m && ((y = n.getSource("full-geom")) == null || y.setData(m));
|
|
4097
4100
|
}
|
|
4098
4101
|
return {
|
|
4099
|
-
setEventHandler(
|
|
4100
|
-
|
|
4102
|
+
setEventHandler(m) {
|
|
4103
|
+
m ? (s = m, n.on("click", h)) : (s = void 0, n.off("click", h));
|
|
4101
4104
|
},
|
|
4102
|
-
flyTo(
|
|
4103
|
-
n.flyTo({ center:
|
|
4105
|
+
flyTo(m, y) {
|
|
4106
|
+
n.flyTo({ center: m, ...y ? { zoom: y } : {}, ...r });
|
|
4104
4107
|
},
|
|
4105
|
-
fitBounds(
|
|
4108
|
+
fitBounds(m, y, w) {
|
|
4106
4109
|
n.fitBounds(
|
|
4107
4110
|
[
|
|
4108
|
-
[
|
|
4109
|
-
[
|
|
4111
|
+
[m[0], m[1]],
|
|
4112
|
+
[m[2], m[3]]
|
|
4110
4113
|
],
|
|
4111
|
-
{ padding:
|
|
4114
|
+
{ padding: y, ...w ? { maxZoom: w } : {}, ...o }
|
|
4112
4115
|
);
|
|
4113
4116
|
},
|
|
4114
|
-
indicateReverse(
|
|
4115
|
-
n.getCanvasContainer().style.cursor =
|
|
4117
|
+
indicateReverse(m) {
|
|
4118
|
+
n.getCanvasContainer().style.cursor = m ? "crosshair" : "";
|
|
4116
4119
|
},
|
|
4117
|
-
setReverseMarker(
|
|
4118
|
-
!e || !t || (d ?
|
|
4120
|
+
setReverseMarker(m) {
|
|
4121
|
+
!e || !t || (d ? m ? d.setLngLat(m) : (d.remove(), d = void 0) : m && (t instanceof Function ? d = t(n) ?? void 0 : (d = (typeof t == "object" ? new e.Marker(t) : p()).setLngLat(m).addTo(n), d.getElement().classList.add("marker-reverse"))));
|
|
4119
4122
|
},
|
|
4120
|
-
setMarkers(
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
if (
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4123
|
+
setMarkers(m, y) {
|
|
4124
|
+
for (const w of u)
|
|
4125
|
+
w.remove();
|
|
4126
|
+
if (u.length = 0, b(Ei), !!e) {
|
|
4127
|
+
if (y) {
|
|
4128
|
+
let w = !1;
|
|
4129
|
+
if (y.geometry.type === "GeometryCollection") {
|
|
4130
|
+
const L = y.geometry.geometries.filter(
|
|
4131
|
+
(E) => E.type === "Polygon" || E.type === "MultiPolygon"
|
|
4132
|
+
);
|
|
4133
|
+
e: if (L.length > 0) {
|
|
4134
|
+
const E = Wi(
|
|
4135
|
+
je(L.map((C) => Fe(C)))
|
|
4130
4136
|
);
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
_.length > 0 && (y({
|
|
4149
|
-
...m,
|
|
4150
|
-
geometry: { type: "GeometryCollection", geometries: _ }
|
|
4151
|
-
}), E = !0);
|
|
4152
|
-
}
|
|
4137
|
+
if (!E)
|
|
4138
|
+
break e;
|
|
4139
|
+
wi(
|
|
4140
|
+
{
|
|
4141
|
+
...y,
|
|
4142
|
+
geometry: E.geometry
|
|
4143
|
+
},
|
|
4144
|
+
b
|
|
4145
|
+
), w = !0;
|
|
4146
|
+
} else {
|
|
4147
|
+
const E = y.geometry.geometries.filter(
|
|
4148
|
+
(C) => C.type === "LineString" || C.type === "MultiLineString"
|
|
4149
|
+
);
|
|
4150
|
+
E.length > 0 && (b({
|
|
4151
|
+
...y,
|
|
4152
|
+
geometry: { type: "GeometryCollection", geometries: E }
|
|
4153
|
+
}), w = !0);
|
|
4153
4154
|
}
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4155
|
+
}
|
|
4156
|
+
if (!w) {
|
|
4157
|
+
if (y.geometry.type === "Polygon" || y.geometry.type === "MultiPolygon")
|
|
4158
|
+
wi(y, b);
|
|
4159
|
+
else if (y.geometry.type === "LineString" || y.geometry.type === "MultiLineString") {
|
|
4160
|
+
b(y);
|
|
4161
|
+
return;
|
|
4161
4162
|
}
|
|
4162
|
-
t && c.push(
|
|
4163
|
-
(typeof t == "object" ? new e.Marker(t) : b()).setLngLat(m.center).addTo(n)
|
|
4164
|
-
);
|
|
4165
4163
|
}
|
|
4166
|
-
if (
|
|
4167
|
-
|
|
4168
|
-
|
|
4164
|
+
if (t instanceof Function) {
|
|
4165
|
+
const L = t(n, y);
|
|
4166
|
+
L && u.push(L);
|
|
4167
|
+
} else t && u.push(
|
|
4168
|
+
typeof t == "object" ? new e.Marker(t) : p().setLngLat(y.center).addTo(n)
|
|
4169
|
+
);
|
|
4170
|
+
}
|
|
4171
|
+
if (i)
|
|
4172
|
+
for (const w of m ?? []) {
|
|
4173
|
+
if (w === y)
|
|
4174
|
+
continue;
|
|
4175
|
+
let L;
|
|
4176
|
+
if (i instanceof Function) {
|
|
4177
|
+
if (L = i(n, w), !L)
|
|
4169
4178
|
continue;
|
|
4170
|
-
|
|
4179
|
+
} else
|
|
4180
|
+
L = (typeof i == "object" ? new e.Marker(i) : p(!0)).setLngLat(w.center).setPopup(
|
|
4171
4181
|
new e.Popup({
|
|
4172
4182
|
offset: [1, -27],
|
|
4173
4183
|
closeButton: !1,
|
|
4174
4184
|
closeOnMove: !0,
|
|
4175
4185
|
className: "maptiler-gc-popup"
|
|
4176
4186
|
}).setText(
|
|
4177
|
-
|
|
4187
|
+
w.place_type[0] === "reverse" ? w.place_name : w.place_name.replace(/,.*/, "")
|
|
4178
4188
|
)
|
|
4179
|
-
).addTo(n)
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
}),
|
|
4187
|
-
}
|
|
4188
|
-
|
|
4189
|
+
).addTo(n);
|
|
4190
|
+
const E = L.getElement();
|
|
4191
|
+
E.addEventListener("click", (C) => {
|
|
4192
|
+
C.stopPropagation(), s == null || s({ type: "markerClick", id: w.id });
|
|
4193
|
+
}), E.addEventListener("mouseenter", () => {
|
|
4194
|
+
s == null || s({ type: "markerMouseEnter", id: w.id }), L.togglePopup();
|
|
4195
|
+
}), E.addEventListener("mouseleave", () => {
|
|
4196
|
+
s == null || s({ type: "markerMouseLeave", id: w.id }), L.togglePopup();
|
|
4197
|
+
}), u.push(L);
|
|
4198
|
+
}
|
|
4189
4199
|
}
|
|
4190
4200
|
},
|
|
4191
|
-
setSelectedMarker(
|
|
4192
|
-
|
|
4201
|
+
setSelectedMarker(m) {
|
|
4202
|
+
l && l.getElement().classList.toggle("marker-selected", !1), l = m > -1 ? u[m] : void 0, l == null || l.getElement().classList.toggle("marker-selected", !0);
|
|
4193
4203
|
},
|
|
4194
4204
|
getCenterAndZoom() {
|
|
4195
|
-
const
|
|
4196
|
-
return [n.getZoom(),
|
|
4205
|
+
const m = n.getCenter();
|
|
4206
|
+
return [n.getZoom(), m.lng, m.lat];
|
|
4197
4207
|
}
|
|
4198
4208
|
};
|
|
4199
4209
|
}
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4210
|
+
function Kr(n, e, t) {
|
|
4211
|
+
var i, r, o;
|
|
4212
|
+
return o = class extends n {
|
|
4213
|
+
constructor(u = {}) {
|
|
4214
|
+
super();
|
|
4215
|
+
_t(this, i);
|
|
4216
|
+
_t(this, r);
|
|
4217
|
+
Je(this, r, u);
|
|
4218
|
+
}
|
|
4219
|
+
onAddInt(u) {
|
|
4220
|
+
const l = document.createElement("div");
|
|
4221
|
+
l.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
|
|
4222
|
+
const {
|
|
4223
|
+
marker: d,
|
|
4224
|
+
showResultMarkers: c,
|
|
4225
|
+
flyTo: f,
|
|
4226
|
+
fullGeometryStyle: h,
|
|
4227
|
+
...p
|
|
4228
|
+
} = ie(this, r), b = typeof f == "boolean" ? {} : f, y = {
|
|
4229
|
+
mapController: Yr(
|
|
4230
|
+
u,
|
|
4231
|
+
e,
|
|
4232
|
+
d,
|
|
4233
|
+
c,
|
|
4234
|
+
b,
|
|
4235
|
+
b,
|
|
4236
|
+
h
|
|
4237
|
+
),
|
|
4238
|
+
flyTo: f === void 0 ? !0 : !!f,
|
|
4239
|
+
apiKey: "",
|
|
4240
|
+
// just to satisfy apiKey; TODO find a better solution
|
|
4241
|
+
...t == null ? void 0 : t(u, l),
|
|
4242
|
+
...p
|
|
4243
|
+
};
|
|
4244
|
+
if (!y.apiKey)
|
|
4245
|
+
throw new Error("no apiKey provided");
|
|
4246
|
+
Je(this, i, new hr({ target: l, props: y }));
|
|
4247
|
+
for (const w of [
|
|
4248
|
+
"select",
|
|
4249
|
+
"pick",
|
|
4250
|
+
"featuresListed",
|
|
4251
|
+
"featuresMarked",
|
|
4252
|
+
"response",
|
|
4253
|
+
"optionsVisibilityChange",
|
|
4254
|
+
"reverseToggle",
|
|
4255
|
+
"queryChange"
|
|
4256
|
+
])
|
|
4257
|
+
ie(this, i).$on(w, (L) => {
|
|
4258
|
+
this.fire(w, L.detail);
|
|
4259
|
+
});
|
|
4260
|
+
return l;
|
|
4261
|
+
}
|
|
4262
|
+
setOptions(u) {
|
|
4263
|
+
var p;
|
|
4264
|
+
Je(this, r, u);
|
|
4265
|
+
const {
|
|
4266
|
+
marker: l,
|
|
4267
|
+
showResultMarkers: d,
|
|
4268
|
+
flyTo: c,
|
|
4269
|
+
fullGeometryStyle: f,
|
|
4270
|
+
...h
|
|
4271
|
+
} = ie(this, r);
|
|
4272
|
+
(p = ie(this, i)) == null || p.$set(h);
|
|
4273
|
+
}
|
|
4274
|
+
setQuery(u, l = !0) {
|
|
4275
|
+
var d;
|
|
4276
|
+
(d = ie(this, i)) == null || d.setQuery(u, l);
|
|
4277
|
+
}
|
|
4278
|
+
clearMap() {
|
|
4279
|
+
var u;
|
|
4280
|
+
(u = ie(this, i)) == null || u.clearMap();
|
|
4281
|
+
}
|
|
4282
|
+
clearList() {
|
|
4283
|
+
var u;
|
|
4284
|
+
(u = ie(this, i)) == null || u.clearList();
|
|
4285
|
+
}
|
|
4286
|
+
setReverseMode(u) {
|
|
4287
|
+
var l;
|
|
4288
|
+
(l = ie(this, i)) == null || l.$set({ reverseActive: u });
|
|
4289
|
+
}
|
|
4290
|
+
focus() {
|
|
4291
|
+
var u;
|
|
4292
|
+
(u = ie(this, i)) == null || u.focus();
|
|
4293
|
+
}
|
|
4294
|
+
blur() {
|
|
4295
|
+
var u;
|
|
4296
|
+
(u = ie(this, i)) == null || u.blur();
|
|
4297
|
+
}
|
|
4298
|
+
onRemove() {
|
|
4299
|
+
var u;
|
|
4300
|
+
(u = ie(this, i)) == null || u.$destroy();
|
|
4301
|
+
}
|
|
4302
|
+
}, i = new WeakMap(), r = new WeakMap(), o;
|
|
4289
4303
|
}
|
|
4290
|
-
|
|
4291
|
-
class
|
|
4292
|
-
getMapLibreGl() {
|
|
4293
|
-
return on;
|
|
4294
|
-
}
|
|
4304
|
+
const Xr = Kr(Ft.Evented, Ft);
|
|
4305
|
+
class to extends Xr {
|
|
4295
4306
|
onAdd(e) {
|
|
4296
4307
|
return super.onAddInt(e);
|
|
4297
4308
|
}
|
|
4298
|
-
getExtraProps() {
|
|
4299
|
-
return {};
|
|
4300
|
-
}
|
|
4301
4309
|
}
|
|
4302
4310
|
export {
|
|
4303
|
-
|
|
4311
|
+
to as GeocodingControl,
|
|
4304
4312
|
Yr as createMapLibreGlMapController
|
|
4305
4313
|
};
|
|
4306
4314
|
//# sourceMappingURL=maplibregl.js.map
|