@maptiler/geocoding-control 1.4.2-dev.3 → 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 +654 -638
- 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 +1352 -1346
- 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 +1315 -1303
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1 -1
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -1
- package/openlayers.umd.js.map +1 -1
- package/package.json +5 -5
- package/react.js +1 -1
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +1 -1
- 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/vanilla.js +1 -1
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/maplibregl.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
var rn = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var zt = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
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
|
|
7
|
-
var
|
|
8
|
-
import * as
|
|
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
|
-
function
|
|
11
|
+
function sn(n, e) {
|
|
12
12
|
for (const t in e) n[t] = e[t];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
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
|
-
function
|
|
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
|
-
function
|
|
37
|
+
function ln(n) {
|
|
38
38
|
return Object.keys(n).length === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function un(n, e, t, i) {
|
|
41
41
|
if (n) {
|
|
42
42
|
const r = Mi(n, e, t, i);
|
|
43
43
|
return n[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
function Mi(n, e, t, i) {
|
|
47
|
-
return n[1] && i ?
|
|
47
|
+
return n[1] && i ? sn(t.ctx.slice(), n[1](i(e))) : t.ctx;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function an(n, e, t, i) {
|
|
50
50
|
if (n[2] && i) {
|
|
51
51
|
const r = n[2](i(t));
|
|
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
|
}
|
|
@@ -61,13 +61,13 @@ function cn(n, e, t, i) {
|
|
|
61
61
|
}
|
|
62
62
|
return e.dirty;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
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
|
-
function
|
|
70
|
+
function fn(n) {
|
|
71
71
|
if (n.ctx.length > 32) {
|
|
72
72
|
const e = [], t = n.ctx.length / 32;
|
|
73
73
|
for (let i = 0; i < t; i++)
|
|
@@ -76,10 +76,10 @@ function dn(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,128 +91,128 @@ 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
|
-
function
|
|
104
|
-
return
|
|
103
|
+
function dn() {
|
|
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);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function hn(n) {
|
|
110
110
|
return function(e) {
|
|
111
111
|
return e.preventDefault(), n.call(this, e);
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function v(n, e, t) {
|
|
115
115
|
t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
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
|
-
function
|
|
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
|
-
function
|
|
145
|
-
const n =
|
|
144
|
+
function vn() {
|
|
145
|
+
const n = Ci();
|
|
146
146
|
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
147
147
|
const r = n.$$.callbacks[e];
|
|
148
148
|
if (r) {
|
|
149
|
-
const o =
|
|
149
|
+
const o = mn(
|
|
150
150
|
/** @type {string} */
|
|
151
151
|
e,
|
|
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;
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
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
|
|
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
|
|
178
|
-
function
|
|
179
|
-
if (
|
|
176
|
+
const wt = /* @__PURE__ */ new Set();
|
|
177
|
+
let Pe = 0;
|
|
178
|
+
function ki() {
|
|
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 (
|
|
198
|
-
for (;
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
Oe.length = 0;
|
|
197
|
+
} while (Ie.length);
|
|
198
|
+
for (; Ht.length; )
|
|
199
|
+
Ht.pop()();
|
|
200
|
+
xt = !1, wt.clear(), Ue(n);
|
|
201
201
|
}
|
|
202
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
|
|
213
|
+
const et = /* @__PURE__ */ new Set();
|
|
214
214
|
let Ce;
|
|
215
|
-
function
|
|
215
|
+
function tt() {
|
|
216
216
|
Ce = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
@@ -220,108 +220,108 @@ function nt() {
|
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
Ce.r ||
|
|
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
|
}
|
|
237
|
-
function
|
|
237
|
+
function Vt(n) {
|
|
238
238
|
return (n == null ? void 0 : n.length) !== void 0 ? n : Array.from(n);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function En(n, e) {
|
|
241
241
|
V(n, 1, 1, () => {
|
|
242
242
|
e.delete(n.key);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
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
284
|
function Sn(n, e) {
|
|
285
|
-
n.$$.dirty[0] === -1 && (
|
|
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
|
|
@@ -353,7 +353,7 @@ class Se {
|
|
|
353
353
|
* @returns {() => void}
|
|
354
354
|
*/
|
|
355
355
|
$on(e, t) {
|
|
356
|
-
if (!
|
|
356
|
+
if (!xi(t))
|
|
357
357
|
return A;
|
|
358
358
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
359
359
|
return i.push(t), () => {
|
|
@@ -366,19 +366,19 @@ class Se {
|
|
|
366
366
|
* @returns {void}
|
|
367
367
|
*/
|
|
368
368
|
$set(e) {
|
|
369
|
-
this.$$set && !
|
|
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(
|
|
374
|
-
function
|
|
372
|
+
const xn = "4";
|
|
373
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(xn);
|
|
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,
|
|
@@ -390,17 +390,17 @@ function kn(n) {
|
|
|
390
390
|
}
|
|
391
391
|
class Ni extends Se {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(),
|
|
393
|
+
super(), Le(this, e, null, Mn, Ee, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
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,22 +410,22 @@ function Cn(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() {
|
|
422
422
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
423
|
-
n[3] + "area.svg") ||
|
|
423
|
+
n[3] + "area.svg") || v(e, "src", t), v(
|
|
424
424
|
e,
|
|
425
425
|
"alt",
|
|
426
426
|
/*placeType*/
|
|
427
427
|
n[6]
|
|
428
|
-
),
|
|
428
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
429
429
|
},
|
|
430
430
|
m(i, r) {
|
|
431
431
|
z(i, e, r);
|
|
@@ -433,8 +433,8 @@ function Nn(n) {
|
|
|
433
433
|
p(i, r) {
|
|
434
434
|
r & /*iconsBaseUrl*/
|
|
435
435
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
436
|
-
i[3] + "area.svg") &&
|
|
437
|
-
64 &&
|
|
436
|
+
i[3] + "area.svg") && v(e, "src", t), r & /*placeType*/
|
|
437
|
+
64 && v(
|
|
438
438
|
e,
|
|
439
439
|
"alt",
|
|
440
440
|
/*placeType*/
|
|
@@ -446,17 +446,17 @@ function Nn(n) {
|
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Nn(n) {
|
|
450
450
|
let e, t;
|
|
451
451
|
return {
|
|
452
452
|
c() {
|
|
453
453
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
454
|
-
n[3] + "reverse.svg") ||
|
|
454
|
+
n[3] + "reverse.svg") || v(e, "src", t), v(
|
|
455
455
|
e,
|
|
456
456
|
"alt",
|
|
457
457
|
/*placeType*/
|
|
458
458
|
n[6]
|
|
459
|
-
),
|
|
459
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
460
460
|
},
|
|
461
461
|
m(i, r) {
|
|
462
462
|
z(i, e, r);
|
|
@@ -464,8 +464,8 @@ function Pn(n) {
|
|
|
464
464
|
p(i, r) {
|
|
465
465
|
r & /*iconsBaseUrl*/
|
|
466
466
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
467
|
-
i[3] + "reverse.svg") &&
|
|
468
|
-
64 &&
|
|
467
|
+
i[3] + "reverse.svg") && v(e, "src", t), r & /*placeType*/
|
|
468
|
+
64 && v(
|
|
469
469
|
e,
|
|
470
470
|
"alt",
|
|
471
471
|
/*placeType*/
|
|
@@ -482,12 +482,12 @@ function Tn(n) {
|
|
|
482
482
|
return {
|
|
483
483
|
c() {
|
|
484
484
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
485
|
-
n[3] + "poi.svg") ||
|
|
485
|
+
n[3] + "poi.svg") || v(e, "src", t), v(
|
|
486
486
|
e,
|
|
487
487
|
"alt",
|
|
488
488
|
/*placeType*/
|
|
489
489
|
n[6]
|
|
490
|
-
),
|
|
490
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
491
491
|
},
|
|
492
492
|
m(i, r) {
|
|
493
493
|
z(i, e, r);
|
|
@@ -495,8 +495,8 @@ function Tn(n) {
|
|
|
495
495
|
p(i, r) {
|
|
496
496
|
r & /*iconsBaseUrl*/
|
|
497
497
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
498
|
-
i[3] + "poi.svg") &&
|
|
499
|
-
64 &&
|
|
498
|
+
i[3] + "poi.svg") && v(e, "src", t), r & /*placeType*/
|
|
499
|
+
64 && v(
|
|
500
500
|
e,
|
|
501
501
|
"alt",
|
|
502
502
|
/*placeType*/
|
|
@@ -508,17 +508,17 @@ function Tn(n) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Pn(n) {
|
|
512
512
|
let e, t;
|
|
513
513
|
return {
|
|
514
514
|
c() {
|
|
515
515
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
516
|
-
n[3] + "postal_code.svg") ||
|
|
516
|
+
n[3] + "postal_code.svg") || v(e, "src", t), v(
|
|
517
517
|
e,
|
|
518
518
|
"alt",
|
|
519
519
|
/*placeType*/
|
|
520
520
|
n[6]
|
|
521
|
-
),
|
|
521
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
522
522
|
},
|
|
523
523
|
m(i, r) {
|
|
524
524
|
z(i, e, r);
|
|
@@ -526,8 +526,8 @@ function Rn(n) {
|
|
|
526
526
|
p(i, r) {
|
|
527
527
|
r & /*iconsBaseUrl*/
|
|
528
528
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
529
|
-
i[3] + "postal_code.svg") &&
|
|
530
|
-
64 &&
|
|
529
|
+
i[3] + "postal_code.svg") && v(e, "src", t), r & /*placeType*/
|
|
530
|
+
64 && v(
|
|
531
531
|
e,
|
|
532
532
|
"alt",
|
|
533
533
|
/*placeType*/
|
|
@@ -539,17 +539,17 @@ function Rn(n) {
|
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Rn(n) {
|
|
543
543
|
let e, t;
|
|
544
544
|
return {
|
|
545
545
|
c() {
|
|
546
546
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
547
|
-
n[3] + "street.svg") ||
|
|
547
|
+
n[3] + "street.svg") || v(e, "src", t), v(
|
|
548
548
|
e,
|
|
549
549
|
"alt",
|
|
550
550
|
/*placeType*/
|
|
551
551
|
n[6]
|
|
552
|
-
),
|
|
552
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
553
553
|
},
|
|
554
554
|
m(i, r) {
|
|
555
555
|
z(i, e, r);
|
|
@@ -557,8 +557,8 @@ function In(n) {
|
|
|
557
557
|
p(i, r) {
|
|
558
558
|
r & /*iconsBaseUrl*/
|
|
559
559
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
560
|
-
i[3] + "street.svg") &&
|
|
561
|
-
64 &&
|
|
560
|
+
i[3] + "street.svg") && v(e, "src", t), r & /*placeType*/
|
|
561
|
+
64 && v(
|
|
562
562
|
e,
|
|
563
563
|
"alt",
|
|
564
564
|
/*placeType*/
|
|
@@ -570,17 +570,17 @@ function In(n) {
|
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function In(n) {
|
|
574
574
|
let e, t;
|
|
575
575
|
return {
|
|
576
576
|
c() {
|
|
577
577
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
578
|
-
n[3] + "road.svg") ||
|
|
578
|
+
n[3] + "road.svg") || v(e, "src", t), v(
|
|
579
579
|
e,
|
|
580
580
|
"alt",
|
|
581
581
|
/*placeType*/
|
|
582
582
|
n[6]
|
|
583
|
-
),
|
|
583
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
584
584
|
},
|
|
585
585
|
m(i, r) {
|
|
586
586
|
z(i, e, r);
|
|
@@ -588,8 +588,8 @@ function On(n) {
|
|
|
588
588
|
p(i, r) {
|
|
589
589
|
r & /*iconsBaseUrl*/
|
|
590
590
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
591
|
-
i[3] + "road.svg") &&
|
|
592
|
-
64 &&
|
|
591
|
+
i[3] + "road.svg") && v(e, "src", t), r & /*placeType*/
|
|
592
|
+
64 && v(
|
|
593
593
|
e,
|
|
594
594
|
"alt",
|
|
595
595
|
/*placeType*/
|
|
@@ -601,17 +601,17 @@ function On(n) {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function On(n) {
|
|
605
605
|
let e, t;
|
|
606
606
|
return {
|
|
607
607
|
c() {
|
|
608
608
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
609
|
-
n[3] + "housenumber.svg") ||
|
|
609
|
+
n[3] + "housenumber.svg") || v(e, "src", t), v(
|
|
610
610
|
e,
|
|
611
611
|
"alt",
|
|
612
612
|
/*placeType*/
|
|
613
613
|
n[6]
|
|
614
|
-
),
|
|
614
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
615
615
|
},
|
|
616
616
|
m(i, r) {
|
|
617
617
|
z(i, e, r);
|
|
@@ -619,8 +619,8 @@ function Wn(n) {
|
|
|
619
619
|
p(i, r) {
|
|
620
620
|
r & /*iconsBaseUrl*/
|
|
621
621
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
622
|
-
i[3] + "housenumber.svg") &&
|
|
623
|
-
64 &&
|
|
622
|
+
i[3] + "housenumber.svg") && v(e, "src", t), r & /*placeType*/
|
|
623
|
+
64 && v(
|
|
624
624
|
e,
|
|
625
625
|
"alt",
|
|
626
626
|
/*placeType*/
|
|
@@ -632,31 +632,31 @@ function Wn(n) {
|
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function Wn(n) {
|
|
636
636
|
let e, t, i, r;
|
|
637
637
|
return {
|
|
638
638
|
c() {
|
|
639
639
|
e = W("img"), K(e.src, t = /*imageUrl*/
|
|
640
|
-
n[5]) ||
|
|
640
|
+
n[5]) || v(e, "src", t), v(
|
|
641
641
|
e,
|
|
642
642
|
"alt",
|
|
643
643
|
/*category*/
|
|
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]) &&
|
|
659
|
-
16 &&
|
|
658
|
+
o[5]) && v(e, "src", t), a & /*category*/
|
|
659
|
+
16 && v(
|
|
660
660
|
e,
|
|
661
661
|
"alt",
|
|
662
662
|
/*category*/
|
|
@@ -668,21 +668,21 @@ function An(n) {
|
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
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]
|
|
@@ -693,8 +693,8 @@ function Kt(n) {
|
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
let e, t, i, r, o,
|
|
696
|
+
function An(n) {
|
|
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 Bn(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 Bn(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
|
-
),
|
|
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 Bn(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
|
-
)) + "") &&
|
|
798
|
-
2 &&
|
|
796
|
+
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
+
)) + "") && ze(y, m), k & /*selected*/
|
|
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
|
-
function
|
|
819
|
-
var
|
|
820
|
-
let i, r, { feature: o } = e, { selected:
|
|
821
|
-
const d = (
|
|
822
|
-
let
|
|
823
|
-
function
|
|
824
|
-
f &&
|
|
818
|
+
function Bn(n, e, t) {
|
|
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
825
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
826
|
+
function m(E) {
|
|
827
|
+
Qt.call(this, n, E);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
829
|
+
function y(E) {
|
|
830
|
+
Qt.call(this, n, E);
|
|
831
831
|
}
|
|
832
|
-
const
|
|
833
|
-
return n.$$set = (
|
|
834
|
-
"feature" in
|
|
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
|
-
v,
|
|
858
857
|
m,
|
|
859
|
-
|
|
858
|
+
y,
|
|
859
|
+
w
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
|
-
class
|
|
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,
|
|
@@ -870,11 +870,11 @@ class Un extends Se {
|
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Un(n) {
|
|
874
874
|
let e;
|
|
875
875
|
return {
|
|
876
876
|
c() {
|
|
877
|
-
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',
|
|
877
|
+
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', v(e, "class", "svelte-7cmwmc");
|
|
878
878
|
},
|
|
879
879
|
m(t, i) {
|
|
880
880
|
z(t, e, i);
|
|
@@ -887,22 +887,22 @@ function zn(n) {
|
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
class
|
|
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),
|
|
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 jn(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
|
-
r[0] === "list" ? 20 : void 0) &&
|
|
919
|
-
1 &&
|
|
918
|
+
r[0] === "list" ? 20 : void 0) && v(e, "width", i), o & /*displayIn*/
|
|
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 jn(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
|
-
function
|
|
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,
|
|
@@ -986,52 +986,52 @@ function Hn(n) {
|
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
class
|
|
989
|
+
class Hn extends Se {
|
|
990
990
|
constructor(e) {
|
|
991
|
-
super(),
|
|
991
|
+
super(), Le(this, e, null, Qn, Ee, {});
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
function
|
|
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
|
|
1003
|
-
async function
|
|
1002
|
+
let Ae;
|
|
1003
|
+
async function Yn(n, e, t) {
|
|
1004
1004
|
const i = n == null ? void 0 : n.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
1006
1006
|
if (!(i && (r.minZoom != null && r.minZoom > i[0] || r.maxZoom != null && r.maxZoom < i[0]))) {
|
|
1007
1007
|
if (r.type === "fixed")
|
|
1008
1008
|
return r.coordinates.join(",");
|
|
1009
1009
|
e: if (r.type === "client-geolocation") {
|
|
1010
|
-
if (
|
|
1011
|
-
if (!
|
|
1010
|
+
if (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
|
});
|
|
@@ -1045,71 +1045,71 @@ async function Kn(n, e, t) {
|
|
|
1045
1045
|
return i[1].toFixed(6) + "," + i[2].toFixed(6);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1048
|
+
const Kn = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, Kt = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, Xt = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, Jt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, $t = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, ei = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
|
|
1049
|
+
function 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 =
|
|
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
|
}
|
|
1071
|
-
function
|
|
1071
|
+
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 = "",
|
|
1078
|
-
if (
|
|
1077
|
+
let t = null, i = null, r = "", o = "", a = null, s = [], u = !1;
|
|
1078
|
+
if (Kn.test(n))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
|
-
if (
|
|
1081
|
-
if (s =
|
|
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),
|
|
1080
|
+
if (Kt.test(n))
|
|
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
|
-
else if (
|
|
1086
|
-
if (s =
|
|
1087
|
-
if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")),
|
|
1085
|
+
else if (Xt.test(n))
|
|
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");
|
|
1091
1091
|
s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
|
|
1092
1092
|
} else
|
|
1093
1093
|
throw new Error("invalid decimal coordinate format");
|
|
1094
|
-
else if (
|
|
1095
|
-
if (s =
|
|
1096
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60,
|
|
1094
|
+
else if (Jt.test(n))
|
|
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
|
-
else if (
|
|
1100
|
-
if (s =
|
|
1101
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60,
|
|
1099
|
+
else if ($t.test(n))
|
|
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
|
-
else if (
|
|
1105
|
-
if (s =
|
|
1104
|
+
else if (ei.test(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 Ot(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:
|
|
1159
|
-
closeEnough:
|
|
1160
|
-
toCoordinateFormat:
|
|
1158
|
+
originalFormat: a,
|
|
1159
|
+
closeEnough: Jn,
|
|
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,39 +1170,39 @@ function Ue(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
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
return !0;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function ii(n, e) {
|
|
1185
1185
|
const t = Math.abs(n - e);
|
|
1186
1186
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function Jn(n) {
|
|
1189
1189
|
if (!n)
|
|
1190
1190
|
throw new Error("coords must be provided");
|
|
1191
1191
|
if (n.includes(",")) {
|
|
1192
1192
|
const e = n.split(",");
|
|
1193
1193
|
if (Number(e[0]) == NaN || Number(e[1]) == NaN)
|
|
1194
1194
|
throw new Error("coords are not valid decimals");
|
|
1195
|
-
return
|
|
1195
|
+
return ii(this.decimalLatitude, Number(e[0])) && ii(this.decimalLongitude, e[1]);
|
|
1196
1196
|
} else
|
|
1197
1197
|
throw new Error("coords being tested must be separated by a comma");
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1199
|
+
const $n = Object.freeze({
|
|
1200
1200
|
DMS: "DMS",
|
|
1201
1201
|
DM: "DM",
|
|
1202
1202
|
DD: "DD"
|
|
1203
1203
|
});
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1204
|
+
Rt.to = $n;
|
|
1205
|
+
const er = [
|
|
1206
1206
|
{
|
|
1207
1207
|
verbatimCoordinates: "40.123, -74.123",
|
|
1208
1208
|
verbatimLatitude: "40.123",
|
|
@@ -1343,10 +1343,10 @@ const tr = [
|
|
|
1343
1343
|
verbatimLatitude: "40 7 22.8",
|
|
1344
1344
|
verbatimLongitude: "-74 7 22.8"
|
|
1345
1345
|
}
|
|
1346
|
-
],
|
|
1346
|
+
], tr = {
|
|
1347
1347
|
decimalLatitude: 40.123,
|
|
1348
1348
|
decimalLongitude: -74.123
|
|
1349
|
-
},
|
|
1349
|
+
}, ir = [
|
|
1350
1350
|
{
|
|
1351
1351
|
verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
|
|
1352
1352
|
verbatimLatitude: `50°4'17.698"south`,
|
|
@@ -1431,7 +1431,7 @@ const tr = [
|
|
|
1431
1431
|
decimalLatitude: -18.4,
|
|
1432
1432
|
decimalLongitude: 22.75
|
|
1433
1433
|
}
|
|
1434
|
-
],
|
|
1434
|
+
], nr = [
|
|
1435
1435
|
{
|
|
1436
1436
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1437
1437
|
verbatimLatitude: "10.432342S",
|
|
@@ -1566,116 +1566,116 @@ const tr = [
|
|
|
1566
1566
|
decimalLongitude: 18.33453
|
|
1567
1567
|
}
|
|
1568
1568
|
];
|
|
1569
|
-
function
|
|
1569
|
+
function rr() {
|
|
1570
1570
|
const n = [];
|
|
1571
|
-
return
|
|
1572
|
-
e.decimalLatitude ? n.push(e) : n.push({ ...e, ...
|
|
1573
|
-
}), [...n, ...
|
|
1574
|
-
}
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
function
|
|
1571
|
+
return er.forEach((e) => {
|
|
1572
|
+
e.decimalLatitude ? n.push(e) : n.push({ ...e, ...tr });
|
|
1573
|
+
}), [...n, ...ir, ...nr];
|
|
1574
|
+
}
|
|
1575
|
+
const or = rr();
|
|
1576
|
+
Rt.formats = or.map((n) => n.verbatimCoordinates);
|
|
1577
|
+
const sr = Rt;
|
|
1578
|
+
function ni(n, e, t) {
|
|
1579
1579
|
const i = n.slice();
|
|
1580
1580
|
return i[84] = e[t], i[86] = t, i;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function ri(n) {
|
|
1583
1583
|
let e, t;
|
|
1584
|
-
return e = new
|
|
1584
|
+
return e = new zn({}), {
|
|
1585
1585
|
c() {
|
|
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
|
-
function
|
|
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
|
-
e = W("button"), _e(t.$$.fragment),
|
|
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
|
-
),
|
|
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
1623
|
n[69]
|
|
1624
1624
|
), r = !0);
|
|
1625
1625
|
},
|
|
1626
|
-
p(
|
|
1626
|
+
p(a, s) {
|
|
1627
1627
|
(!i || s[0] & /*reverseButtonTitle*/
|
|
1628
|
-
512) &&
|
|
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
|
-
function
|
|
1653
|
-
let e, t = [], i = /* @__PURE__ */ new Map(), r, o,
|
|
1652
|
+
function lr(n) {
|
|
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 =
|
|
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[
|
|
1672
|
-
|
|
1670
|
+
for (let l = 0; l < t.length; l += 1)
|
|
1671
|
+
t[l].c();
|
|
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",
|
|
@@ -1690,69 +1690,69 @@ function ur(n) {
|
|
|
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
|
-
17880064 && (s =
|
|
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
|
-
function
|
|
1721
|
-
let e, t, i, r, o,
|
|
1722
|
-
return t = new
|
|
1720
|
+
function ur(n) {
|
|
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
|
}
|
|
1751
|
-
function
|
|
1751
|
+
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);
|
|
@@ -1765,17 +1765,17 @@ function cr(n) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1769
|
-
let e, t, i, r, o,
|
|
1770
|
-
return t = new
|
|
1768
|
+
function cr(n) {
|
|
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*/
|
|
@@ -1783,25 +1783,25 @@ function fr(n) {
|
|
|
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
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function si(n, e) {
|
|
1805
1805
|
let t, i, r;
|
|
1806
1806
|
function o() {
|
|
1807
1807
|
return (
|
|
@@ -1812,7 +1812,7 @@ function li(n, e) {
|
|
|
1812
1812
|
)
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function a() {
|
|
1816
1816
|
return (
|
|
1817
1817
|
/*focus_handler_1*/
|
|
1818
1818
|
e[72](
|
|
@@ -1821,7 +1821,7 @@ function li(n, e) {
|
|
|
1821
1821
|
)
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
return i = new
|
|
1824
|
+
return i = new Dn({
|
|
1825
1825
|
props: {
|
|
1826
1826
|
feature: (
|
|
1827
1827
|
/*feature*/
|
|
@@ -1845,62 +1845,62 @@ function li(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
|
-
t =
|
|
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[84]),
|
|
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[86]),
|
|
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
|
-
function
|
|
1883
|
-
let e, t, i, r, o,
|
|
1884
|
-
o = new
|
|
1885
|
-
let
|
|
1882
|
+
function fr(n) {
|
|
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
|
-
n[19] &&
|
|
1888
|
-
),
|
|
1887
|
+
n[19] && ri()
|
|
1888
|
+
), _ = (
|
|
1889
1889
|
/*enableReverse*/
|
|
1890
|
-
n[5] === !0 &&
|
|
1890
|
+
n[5] === !0 && oi(n)
|
|
1891
1891
|
);
|
|
1892
|
-
const
|
|
1892
|
+
const k = (
|
|
1893
1893
|
/*#slots*/
|
|
1894
1894
|
n[61].default
|
|
1895
|
-
), I =
|
|
1896
|
-
|
|
1895
|
+
), I = un(
|
|
1896
|
+
k,
|
|
1897
1897
|
n,
|
|
1898
1898
|
/*$$scope*/
|
|
1899
1899
|
n[60],
|
|
1900
1900
|
null
|
|
1901
|
-
), D = [
|
|
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,38 +1910,38 @@ function dr(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*/
|
|
1925
1925
|
n[8]
|
|
1926
|
-
),
|
|
1926
|
+
), v(
|
|
1927
1927
|
s,
|
|
1928
1928
|
"aria-label",
|
|
1929
1929
|
/*placeholder*/
|
|
1930
1930
|
n[8]
|
|
1931
|
-
),
|
|
1931
|
+
), v(s, "class", "svelte-1uvos7g"), v(d, "type", "button"), v(
|
|
1932
1932
|
d,
|
|
1933
1933
|
"title",
|
|
1934
1934
|
/*clearButtonTitle*/
|
|
1935
1935
|
n[3]
|
|
1936
|
-
),
|
|
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
|
-
),
|
|
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,12 +1949,12 @@ function dr(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",
|
|
@@ -1997,79 +1997,79 @@ function dr(n) {
|
|
|
1997
1997
|
/*click_handler_1*/
|
|
1998
1998
|
n[68]
|
|
1999
1999
|
),
|
|
2000
|
-
J(t, "submit",
|
|
2000
|
+
J(t, "submit", hn(
|
|
2001
2001
|
/*handleOnSubmit*/
|
|
2002
2002
|
n[21]
|
|
2003
2003
|
))
|
|
2004
|
-
],
|
|
2004
|
+
], E = !0);
|
|
2005
2005
|
},
|
|
2006
|
-
p(M,
|
|
2007
|
-
(!
|
|
2008
|
-
256) &&
|
|
2006
|
+
p(M, F) {
|
|
2007
|
+
(!L || F[0] & /*placeholder*/
|
|
2008
|
+
256) && v(
|
|
2009
2009
|
s,
|
|
2010
2010
|
"placeholder",
|
|
2011
2011
|
/*placeholder*/
|
|
2012
2012
|
M[8]
|
|
2013
|
-
), (!
|
|
2014
|
-
256) &&
|
|
2013
|
+
), (!L || F[0] & /*placeholder*/
|
|
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
|
-
), (!
|
|
2026
|
-
8) &&
|
|
2025
|
+
), (!L || F[0] & /*clearButtonTitle*/
|
|
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
|
-
536870912) &&
|
|
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
2051
|
M[60],
|
|
2052
|
-
|
|
2053
|
-
|
|
2052
|
+
L ? an(
|
|
2053
|
+
k,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
2055
|
M[60],
|
|
2056
|
-
|
|
2056
|
+
F,
|
|
2057
2057
|
null
|
|
2058
|
-
) :
|
|
2058
|
+
) : fn(
|
|
2059
2059
|
/*$$scope*/
|
|
2060
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")) &&
|
|
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 dr(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
|
-
function
|
|
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,17 +2114,17 @@ function hr(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
2119
|
function Ai() {
|
|
2120
|
-
|
|
2120
|
+
ue.focus();
|
|
2121
2121
|
}
|
|
2122
2122
|
function Bi() {
|
|
2123
|
-
|
|
2123
|
+
ue.blur();
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
t(1, O = g),
|
|
2127
|
-
|
|
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
2128
|
}));
|
|
2129
2129
|
}
|
|
2130
2130
|
function Di() {
|
|
@@ -2133,159 +2133,159 @@ function hr(n, e, t) {
|
|
|
2133
2133
|
function Ui() {
|
|
2134
2134
|
t(56, q = []), t(57, N = void 0);
|
|
2135
2135
|
}
|
|
2136
|
-
let
|
|
2137
|
-
const zi = /* @__PURE__ */ new Set(),
|
|
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
|
|
2142
|
-
if (
|
|
2143
|
-
t(57, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18,
|
|
2141
|
+
function Ut(g) {
|
|
2142
|
+
if (Te && (clearTimeout(Te), Te = void 0), U > -1 && R)
|
|
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(56, q = R), t(57, N = void 0),
|
|
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
|
-
return
|
|
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
|
-
t(19,
|
|
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
|
-
ee ===
|
|
2203
|
+
ee === Me && t(19, Me = void 0);
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2206
|
+
function Gi() {
|
|
2207
2207
|
var ee;
|
|
2208
|
-
if (!(q != null && q.length) || !
|
|
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 && q.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center,
|
|
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
|
-
function
|
|
2236
|
-
t(0, D =
|
|
2235
|
+
function Fi(g) {
|
|
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
|
-
function
|
|
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 (
|
|
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
|
|
2258
|
+
function yt(g) {
|
|
2259
2259
|
t(57, N = g), t(1, O = g.place_name), t(15, U = -1);
|
|
2260
2260
|
}
|
|
2261
|
-
const
|
|
2261
|
+
const Zi = () => ue.focus();
|
|
2262
2262
|
function qi(g) {
|
|
2263
|
-
|
|
2264
|
-
|
|
2263
|
+
St[g ? "unshift" : "push"](() => {
|
|
2264
|
+
ue = g, t(17, ue);
|
|
2265
2265
|
});
|
|
2266
2266
|
}
|
|
2267
2267
|
function Qi() {
|
|
2268
|
-
O = this.value, t(1, O), t(13,
|
|
2268
|
+
O = this.value, t(1, O), t(13, Ne), t(28, c);
|
|
2269
2269
|
}
|
|
2270
|
-
const Hi = () => t(13,
|
|
2271
|
-
t(1, O = ""),
|
|
2272
|
-
}, Xi = () => t(0, D = !D), Ji = () => t(18,
|
|
2273
|
-
|
|
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
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
|
-
67109120 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" &&
|
|
2287
|
-
201326626 && (x && N && N.id !==
|
|
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*/
|
|
@@ -2293,16 +2293,16 @@ function hr(n, e, t) {
|
|
|
2293
2293
|
33554464 && x && x.setEventHandler((g) => {
|
|
2294
2294
|
switch (g.type) {
|
|
2295
2295
|
case "mapClick":
|
|
2296
|
-
D &&
|
|
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
|
-
q && t(15, U =
|
|
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);
|
|
@@ -2310,25 +2310,25 @@ function hr(n, e, t) {
|
|
|
2310
2310
|
}
|
|
2311
2311
|
}), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2312
2312
|
49152 && t(59, i = R == null ? void 0 : R[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2313
|
-
268436514 && x && i &&
|
|
2314
|
-
2080 && (
|
|
2315
|
-
301991968 && x &&
|
|
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
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
|
-
268435456 &&
|
|
2326
|
-
67108864 &&
|
|
2327
|
-
81920 &&
|
|
2328
|
-
16384 &&
|
|
2329
|
-
33554432 &&
|
|
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,64 +2337,64 @@ function hr(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
|
-
Te,
|
|
2346
|
+
oe,
|
|
2347
|
+
At,
|
|
2348
|
+
Ne,
|
|
2349
2349
|
R,
|
|
2350
2350
|
U,
|
|
2351
|
-
|
|
2351
|
+
Ke,
|
|
2352
|
+
ue,
|
|
2352
2353
|
ae,
|
|
2353
|
-
|
|
2354
|
-
ke,
|
|
2354
|
+
Me,
|
|
2355
2355
|
zi,
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2356
|
+
Ut,
|
|
2357
|
+
ji,
|
|
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,
|
|
2380
|
+
He,
|
|
2381
|
+
ke,
|
|
2377
2382
|
Ve,
|
|
2378
|
-
|
|
2383
|
+
at,
|
|
2379
2384
|
ct,
|
|
2380
|
-
Ye,
|
|
2381
|
-
Pe,
|
|
2382
|
-
Ke,
|
|
2383
2385
|
ft,
|
|
2384
|
-
dt,
|
|
2385
|
-
ht,
|
|
2386
2386
|
Ai,
|
|
2387
2387
|
Bi,
|
|
2388
|
-
|
|
2388
|
+
Bt,
|
|
2389
2389
|
Di,
|
|
2390
2390
|
Ui,
|
|
2391
2391
|
q,
|
|
2392
2392
|
N,
|
|
2393
|
-
|
|
2393
|
+
dt,
|
|
2394
2394
|
i,
|
|
2395
2395
|
o,
|
|
2396
2396
|
r,
|
|
2397
|
-
|
|
2397
|
+
Zi,
|
|
2398
2398
|
qi,
|
|
2399
2399
|
Qi,
|
|
2400
2400
|
Hi,
|
|
@@ -2409,14 +2409,14 @@ function hr(n, e, t) {
|
|
|
2409
2409
|
nn
|
|
2410
2410
|
];
|
|
2411
2411
|
}
|
|
2412
|
-
let
|
|
2412
|
+
let hr = class extends Se {
|
|
2413
2413
|
constructor(e) {
|
|
2414
|
-
super(),
|
|
2414
|
+
super(), Le(
|
|
2415
2415
|
this,
|
|
2416
2416
|
e,
|
|
2417
|
-
hr,
|
|
2418
2417
|
dr,
|
|
2419
|
-
|
|
2418
|
+
fr,
|
|
2419
|
+
Ee,
|
|
2420
2420
|
{
|
|
2421
2421
|
ZOOM_DEFAULTS: 25,
|
|
2422
2422
|
class: 2,
|
|
@@ -2486,11 +2486,11 @@ let gr = class extends Se {
|
|
|
2486
2486
|
return this.$$.ctx[55];
|
|
2487
2487
|
}
|
|
2488
2488
|
};
|
|
2489
|
-
function
|
|
2489
|
+
function Fe(n, e, t = {}) {
|
|
2490
2490
|
const i = { type: "Feature" };
|
|
2491
2491
|
return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
|
|
2492
2492
|
}
|
|
2493
|
-
function
|
|
2493
|
+
function It(n, e, t = {}) {
|
|
2494
2494
|
for (const r of n) {
|
|
2495
2495
|
if (r.length < 4)
|
|
2496
2496
|
throw new Error(
|
|
@@ -2502,17 +2502,17 @@ function Wt(n, e, t = {}) {
|
|
|
2502
2502
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2503
2503
|
throw new Error("First and last Position are not equivalent.");
|
|
2504
2504
|
}
|
|
2505
|
-
return
|
|
2505
|
+
return Fe({
|
|
2506
2506
|
type: "Polygon",
|
|
2507
2507
|
coordinates: n
|
|
2508
2508
|
}, e, t);
|
|
2509
2509
|
}
|
|
2510
|
-
function
|
|
2510
|
+
function je(n, e = {}) {
|
|
2511
2511
|
const t = { type: "FeatureCollection" };
|
|
2512
2512
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2515
|
-
return
|
|
2514
|
+
function Pi(n, e, t = {}) {
|
|
2515
|
+
return Fe({
|
|
2516
2516
|
type: "MultiPolygon",
|
|
2517
2517
|
coordinates: n
|
|
2518
2518
|
}, e, t);
|
|
@@ -2539,67 +2539,67 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2539
2539
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2540
2540
|
and limitations under the License.
|
|
2541
2541
|
***************************************************************************** */
|
|
2542
|
-
function
|
|
2542
|
+
function gr(n, e) {
|
|
2543
2543
|
var t = { label: 0, sent: function() {
|
|
2544
2544
|
if (o[0] & 1) throw o[1];
|
|
2545
2545
|
return o[1];
|
|
2546
|
-
}, trys: [], ops: [] }, i, r, o,
|
|
2547
|
-
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() {
|
|
2548
2548
|
return this;
|
|
2549
|
-
}),
|
|
2550
|
-
function s(
|
|
2549
|
+
}), a;
|
|
2550
|
+
function s(l) {
|
|
2551
2551
|
return function(d) {
|
|
2552
|
-
return
|
|
2552
|
+
return u([l, d]);
|
|
2553
2553
|
};
|
|
2554
2554
|
}
|
|
2555
|
-
function
|
|
2555
|
+
function u(l) {
|
|
2556
2556
|
if (i) throw new TypeError("Generator is already executing.");
|
|
2557
2557
|
for (; t; ) try {
|
|
2558
|
-
if (i = 1, r && (o =
|
|
2559
|
-
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]) {
|
|
2560
2560
|
case 0:
|
|
2561
2561
|
case 1:
|
|
2562
|
-
o =
|
|
2562
|
+
o = l;
|
|
2563
2563
|
break;
|
|
2564
2564
|
case 4:
|
|
2565
|
-
return t.label++, { value:
|
|
2565
|
+
return t.label++, { value: l[1], done: !1 };
|
|
2566
2566
|
case 5:
|
|
2567
|
-
t.label++, r =
|
|
2567
|
+
t.label++, r = l[1], l = [0];
|
|
2568
2568
|
continue;
|
|
2569
2569
|
case 7:
|
|
2570
|
-
|
|
2570
|
+
l = t.ops.pop(), t.trys.pop();
|
|
2571
2571
|
continue;
|
|
2572
2572
|
default:
|
|
2573
|
-
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)) {
|
|
2574
2574
|
t = 0;
|
|
2575
2575
|
continue;
|
|
2576
2576
|
}
|
|
2577
|
-
if (
|
|
2578
|
-
t.label =
|
|
2577
|
+
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
2578
|
+
t.label = l[1];
|
|
2579
2579
|
break;
|
|
2580
2580
|
}
|
|
2581
|
-
if (
|
|
2582
|
-
t.label = o[1], o =
|
|
2581
|
+
if (l[0] === 6 && t.label < o[1]) {
|
|
2582
|
+
t.label = o[1], o = l;
|
|
2583
2583
|
break;
|
|
2584
2584
|
}
|
|
2585
2585
|
if (o && t.label < o[2]) {
|
|
2586
|
-
t.label = o[2], t.ops.push(
|
|
2586
|
+
t.label = o[2], t.ops.push(l);
|
|
2587
2587
|
break;
|
|
2588
2588
|
}
|
|
2589
2589
|
o[2] && t.ops.pop(), t.trys.pop();
|
|
2590
2590
|
continue;
|
|
2591
2591
|
}
|
|
2592
|
-
|
|
2592
|
+
l = e.call(n, t);
|
|
2593
2593
|
} catch (d) {
|
|
2594
|
-
|
|
2594
|
+
l = [6, d], r = 0;
|
|
2595
2595
|
} finally {
|
|
2596
2596
|
i = o = 0;
|
|
2597
2597
|
}
|
|
2598
|
-
if (
|
|
2599
|
-
return { value:
|
|
2598
|
+
if (l[0] & 5) throw l[1];
|
|
2599
|
+
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
2600
2600
|
}
|
|
2601
2601
|
}
|
|
2602
|
-
var
|
|
2602
|
+
var we = (
|
|
2603
2603
|
/** @class */
|
|
2604
2604
|
/* @__PURE__ */ function() {
|
|
2605
2605
|
function n(e, t) {
|
|
@@ -2608,13 +2608,13 @@ var Ee = (
|
|
|
2608
2608
|
return n;
|
|
2609
2609
|
}()
|
|
2610
2610
|
);
|
|
2611
|
-
function
|
|
2611
|
+
function mr(n, e) {
|
|
2612
2612
|
return n > e ? 1 : n < e ? -1 : 0;
|
|
2613
2613
|
}
|
|
2614
|
-
function
|
|
2615
|
-
for (var i = new
|
|
2616
|
-
var
|
|
2617
|
-
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) {
|
|
2618
2618
|
if (e.left === null)
|
|
2619
2619
|
break;
|
|
2620
2620
|
if (t(n, e.left.key) < 0) {
|
|
@@ -2623,7 +2623,7 @@ function pe(n, e, t) {
|
|
|
2623
2623
|
break;
|
|
2624
2624
|
}
|
|
2625
2625
|
o.left = e, o = e, e = e.left;
|
|
2626
|
-
} else if (
|
|
2626
|
+
} else if (a > 0) {
|
|
2627
2627
|
if (e.right === null)
|
|
2628
2628
|
break;
|
|
2629
2629
|
if (t(n, e.right.key) > 0) {
|
|
@@ -2637,62 +2637,62 @@ function pe(n, e, t) {
|
|
|
2637
2637
|
}
|
|
2638
2638
|
return r.right = e.left, o.left = e.right, e.left = i.right, e.right = i.left, e;
|
|
2639
2639
|
}
|
|
2640
|
-
function
|
|
2641
|
-
var r = new
|
|
2640
|
+
function Et(n, e, t, i) {
|
|
2641
|
+
var r = new we(n, e);
|
|
2642
2642
|
if (t === null)
|
|
2643
2643
|
return r.left = r.right = null, r;
|
|
2644
|
-
t =
|
|
2644
|
+
t = ye(n, t, i);
|
|
2645
2645
|
var o = i(n, t.key);
|
|
2646
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;
|
|
2647
2647
|
}
|
|
2648
|
-
function
|
|
2648
|
+
function li(n, e, t) {
|
|
2649
2649
|
var i = null, r = null;
|
|
2650
2650
|
if (e) {
|
|
2651
|
-
e =
|
|
2651
|
+
e = ye(n, e, t);
|
|
2652
2652
|
var o = t(e.key, n);
|
|
2653
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);
|
|
2654
2654
|
}
|
|
2655
2655
|
return { left: i, right: r };
|
|
2656
2656
|
}
|
|
2657
|
-
function
|
|
2658
|
-
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);
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function Ct(n, e, t, i, r) {
|
|
2661
2661
|
if (n) {
|
|
2662
2662
|
i("" + e + (t ? "└── " : "├── ") + r(n) + `
|
|
2663
2663
|
`);
|
|
2664
2664
|
var o = e + (t ? " " : "│ ");
|
|
2665
|
-
n.left &&
|
|
2665
|
+
n.left && Ct(n.left, o, !1, i, r), n.right && Ct(n.right, o, !0, i, r);
|
|
2666
2666
|
}
|
|
2667
2667
|
}
|
|
2668
|
-
var
|
|
2668
|
+
var Ot = (
|
|
2669
2669
|
/** @class */
|
|
2670
2670
|
function() {
|
|
2671
2671
|
function n(e) {
|
|
2672
|
-
e === void 0 && (e =
|
|
2672
|
+
e === void 0 && (e = mr), this._root = null, this._size = 0, this._comparator = e;
|
|
2673
2673
|
}
|
|
2674
2674
|
return n.prototype.insert = function(e, t) {
|
|
2675
|
-
return this._size++, this._root =
|
|
2675
|
+
return this._size++, this._root = Et(e, t, this._root, this._comparator);
|
|
2676
2676
|
}, n.prototype.add = function(e, t) {
|
|
2677
|
-
var i = new
|
|
2677
|
+
var i = new we(e, t);
|
|
2678
2678
|
this._root === null && (i.left = i.right = null, this._size++, this._root = i);
|
|
2679
|
-
var r = this._comparator, o =
|
|
2680
|
-
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;
|
|
2681
2681
|
}, n.prototype.remove = function(e) {
|
|
2682
2682
|
this._root = this._remove(e, this._root, this._comparator);
|
|
2683
2683
|
}, n.prototype._remove = function(e, t, i) {
|
|
2684
2684
|
var r;
|
|
2685
2685
|
if (t === null)
|
|
2686
2686
|
return null;
|
|
2687
|
-
t =
|
|
2687
|
+
t = ye(e, t, i);
|
|
2688
2688
|
var o = i(e, t.key);
|
|
2689
|
-
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;
|
|
2690
2690
|
}, n.prototype.pop = function() {
|
|
2691
2691
|
var e = this._root;
|
|
2692
2692
|
if (e) {
|
|
2693
2693
|
for (; e.left; )
|
|
2694
2694
|
e = e.left;
|
|
2695
|
-
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 };
|
|
2696
2696
|
}
|
|
2697
2697
|
return null;
|
|
2698
2698
|
}, n.prototype.findStatic = function(e) {
|
|
@@ -2704,7 +2704,7 @@ var At = (
|
|
|
2704
2704
|
}
|
|
2705
2705
|
return null;
|
|
2706
2706
|
}, n.prototype.find = function(e) {
|
|
2707
|
-
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;
|
|
2708
2708
|
}, n.prototype.contains = function(e) {
|
|
2709
2709
|
for (var t = this._root, i = this._comparator; t; ) {
|
|
2710
2710
|
var r = i(e, t.key);
|
|
@@ -2718,13 +2718,13 @@ var At = (
|
|
|
2718
2718
|
i !== null ? (r.push(i), i = i.left) : r.length !== 0 ? (i = r.pop(), e.call(t, i), i = i.right) : o = !0;
|
|
2719
2719
|
return this;
|
|
2720
2720
|
}, n.prototype.range = function(e, t, i, r) {
|
|
2721
|
-
for (var o = [],
|
|
2721
|
+
for (var o = [], a = this._comparator, s = this._root, u; o.length !== 0 || s; )
|
|
2722
2722
|
if (s)
|
|
2723
2723
|
o.push(s), s = s.left;
|
|
2724
2724
|
else {
|
|
2725
|
-
if (s = o.pop(),
|
|
2725
|
+
if (s = o.pop(), u = a(s.key, t), u > 0)
|
|
2726
2726
|
break;
|
|
2727
|
-
if (
|
|
2727
|
+
if (a(s.key, e) >= 0 && i.call(r, s))
|
|
2728
2728
|
return this;
|
|
2729
2729
|
s = s.right;
|
|
2730
2730
|
}
|
|
@@ -2797,15 +2797,15 @@ var At = (
|
|
|
2797
2797
|
}, n.prototype.clear = function() {
|
|
2798
2798
|
return this._root = null, this._size = 0, this;
|
|
2799
2799
|
}, n.prototype.toList = function() {
|
|
2800
|
-
return
|
|
2800
|
+
return pr(this._root);
|
|
2801
2801
|
}, n.prototype.load = function(e, t, i) {
|
|
2802
2802
|
t === void 0 && (t = []), i === void 0 && (i = !1);
|
|
2803
2803
|
var r = e.length, o = this._comparator;
|
|
2804
|
-
if (i &&
|
|
2805
|
-
this._root =
|
|
2804
|
+
if (i && Tt(e, t, 0, r - 1, o), this._root === null)
|
|
2805
|
+
this._root = kt(e, t, 0, r), this._size = r;
|
|
2806
2806
|
else {
|
|
2807
|
-
var
|
|
2808
|
-
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);
|
|
2809
2809
|
}
|
|
2810
2810
|
return this;
|
|
2811
2811
|
}, n.prototype.isEmpty = function() {
|
|
@@ -2827,17 +2827,17 @@ var At = (
|
|
|
2827
2827
|
return String(i.key);
|
|
2828
2828
|
});
|
|
2829
2829
|
var t = [];
|
|
2830
|
-
return
|
|
2830
|
+
return Ct(this._root, "", !0, function(i) {
|
|
2831
2831
|
return t.push(i);
|
|
2832
2832
|
}, e), t.join("");
|
|
2833
2833
|
}, n.prototype.update = function(e, t, i) {
|
|
2834
|
-
var r = this._comparator, o =
|
|
2835
|
-
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);
|
|
2836
2836
|
}, n.prototype.split = function(e) {
|
|
2837
|
-
return
|
|
2837
|
+
return li(e, this._root, this._comparator);
|
|
2838
2838
|
}, n.prototype[Symbol.iterator] = function() {
|
|
2839
2839
|
var e, t, i;
|
|
2840
|
-
return
|
|
2840
|
+
return gr(this, function(r) {
|
|
2841
2841
|
switch (r.label) {
|
|
2842
2842
|
case 0:
|
|
2843
2843
|
e = this._root, t = [], i = !1, r.label = 1;
|
|
@@ -2861,96 +2861,96 @@ var At = (
|
|
|
2861
2861
|
}, n;
|
|
2862
2862
|
}()
|
|
2863
2863
|
);
|
|
2864
|
-
function
|
|
2864
|
+
function kt(n, e, t, i) {
|
|
2865
2865
|
var r = i - t;
|
|
2866
2866
|
if (r > 0) {
|
|
2867
|
-
var o = t + Math.floor(r / 2),
|
|
2868
|
-
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;
|
|
2869
2869
|
}
|
|
2870
2870
|
return null;
|
|
2871
2871
|
}
|
|
2872
|
-
function
|
|
2873
|
-
for (var t = new
|
|
2874
|
-
i = i.next = new
|
|
2872
|
+
function vr(n, e) {
|
|
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]);
|
|
2875
2875
|
return i.next = null, t.next;
|
|
2876
2876
|
}
|
|
2877
|
-
function
|
|
2878
|
-
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; )
|
|
2879
2879
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : i = !0;
|
|
2880
2880
|
return o.next = null, r.next;
|
|
2881
2881
|
}
|
|
2882
|
-
function
|
|
2882
|
+
function Nt(n, e, t) {
|
|
2883
2883
|
var i = t - e;
|
|
2884
2884
|
if (i > 0) {
|
|
2885
|
-
var r = e + Math.floor(i / 2), o =
|
|
2886
|
-
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;
|
|
2887
2887
|
}
|
|
2888
2888
|
return null;
|
|
2889
2889
|
}
|
|
2890
|
-
function
|
|
2891
|
-
for (var i = new
|
|
2892
|
-
t(o.key,
|
|
2893
|
-
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;
|
|
2894
2894
|
}
|
|
2895
|
-
function
|
|
2895
|
+
function Tt(n, e, t, i, r) {
|
|
2896
2896
|
if (!(t >= i)) {
|
|
2897
|
-
for (var o = n[t + i >> 1],
|
|
2897
|
+
for (var o = n[t + i >> 1], a = t - 1, s = i + 1; ; ) {
|
|
2898
2898
|
do
|
|
2899
|
-
|
|
2900
|
-
while (r(n[
|
|
2899
|
+
a++;
|
|
2900
|
+
while (r(n[a], o) < 0);
|
|
2901
2901
|
do
|
|
2902
2902
|
s--;
|
|
2903
2903
|
while (r(n[s], o) > 0);
|
|
2904
|
-
if (
|
|
2904
|
+
if (a >= s)
|
|
2905
2905
|
break;
|
|
2906
|
-
var
|
|
2907
|
-
n[
|
|
2906
|
+
var u = n[a];
|
|
2907
|
+
n[a] = n[s], n[s] = u, u = e[a], e[a] = e[s], e[s] = u;
|
|
2908
2908
|
}
|
|
2909
|
-
|
|
2909
|
+
Tt(n, e, t, s, r), Tt(n, e, s + 1, i, r);
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
const
|
|
2913
|
-
function
|
|
2914
|
-
let o,
|
|
2915
|
-
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]);
|
|
2916
2916
|
let h = 0;
|
|
2917
|
-
if (
|
|
2918
|
-
for (d >
|
|
2919
|
-
d >
|
|
2920
|
-
for (;
|
|
2921
|
-
|
|
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);
|
|
2922
2922
|
for (; f < t; )
|
|
2923
|
-
|
|
2923
|
+
a = o + d, u = a - o, s = o - (a - u) + (d - u), d = i[++f], o = a, s !== 0 && (r[h++] = s);
|
|
2924
2924
|
return (o !== 0 || h === 0) && (r[h++] = o), h;
|
|
2925
2925
|
}
|
|
2926
|
-
function
|
|
2926
|
+
function wr(n, e) {
|
|
2927
2927
|
let t = e[0];
|
|
2928
2928
|
for (let i = 1; i < n; i++) t += e[i];
|
|
2929
2929
|
return t;
|
|
2930
2930
|
}
|
|
2931
|
-
function
|
|
2931
|
+
function qe(n) {
|
|
2932
2932
|
return new Float64Array(n);
|
|
2933
2933
|
}
|
|
2934
|
-
const
|
|
2935
|
-
function
|
|
2936
|
-
let s,
|
|
2937
|
-
const
|
|
2938
|
-
|
|
2939
|
-
let O =
|
|
2940
|
-
if (O >= M || -O >= M || (
|
|
2941
|
-
|
|
2942
|
-
const
|
|
2943
|
-
|
|
2944
|
-
const $ =
|
|
2945
|
-
|
|
2946
|
-
const
|
|
2947
|
-
return
|
|
2948
|
-
}
|
|
2949
|
-
function
|
|
2950
|
-
const
|
|
2951
|
-
return Math.abs(
|
|
2952
|
-
}
|
|
2953
|
-
const
|
|
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];
|
|
2948
|
+
}
|
|
2949
|
+
function Mr(n, e, t, i, r, o) {
|
|
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);
|
|
2952
|
+
}
|
|
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) => {
|
|
2954
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;
|
|
2955
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;
|
|
2956
2956
|
return {
|
|
@@ -2964,20 +2964,20 @@ const ze = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n
|
|
|
2964
2964
|
}
|
|
2965
2965
|
};
|
|
2966
2966
|
};
|
|
2967
|
-
let
|
|
2968
|
-
|
|
2969
|
-
const Cr =
|
|
2970
|
-
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)
|
|
2971
2971
|
return 0;
|
|
2972
2972
|
const t = n - e;
|
|
2973
2973
|
return t * t < Cr * n * e ? 0 : n < e ? -1 : 1;
|
|
2974
2974
|
};
|
|
2975
|
-
class
|
|
2975
|
+
class kr {
|
|
2976
2976
|
constructor() {
|
|
2977
2977
|
this.reset();
|
|
2978
2978
|
}
|
|
2979
2979
|
reset() {
|
|
2980
|
-
this.xRounder = new
|
|
2980
|
+
this.xRounder = new di(), this.yRounder = new di();
|
|
2981
2981
|
}
|
|
2982
2982
|
round(e, t) {
|
|
2983
2983
|
return {
|
|
@@ -2986,9 +2986,9 @@ class Nr {
|
|
|
2986
2986
|
};
|
|
2987
2987
|
}
|
|
2988
2988
|
}
|
|
2989
|
-
class
|
|
2989
|
+
class di {
|
|
2990
2990
|
constructor() {
|
|
2991
|
-
this.tree = new
|
|
2991
|
+
this.tree = new Ot(), this.round(0);
|
|
2992
2992
|
}
|
|
2993
2993
|
// Note: this can rounds input values backwards or forwards.
|
|
2994
2994
|
// You might ask, why not restrict this to just rounding
|
|
@@ -2999,16 +2999,16 @@ class hi {
|
|
|
2999
2999
|
// angle for t-intersections).
|
|
3000
3000
|
round(e) {
|
|
3001
3001
|
const t = this.tree.add(e), i = this.tree.prev(t);
|
|
3002
|
-
if (i !== null &&
|
|
3002
|
+
if (i !== null && fi(t.key, i.key) === 0)
|
|
3003
3003
|
return this.tree.remove(e), i.key;
|
|
3004
3004
|
const r = this.tree.next(t);
|
|
3005
|
-
return r !== null &&
|
|
3005
|
+
return r !== null && fi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
3008
|
-
const
|
|
3009
|
-
const i =
|
|
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) => {
|
|
3009
|
+
const i = Mr(n.x, n.y, e.x, e.y, t.x, t.y);
|
|
3010
3010
|
return i > 0 ? -1 : i < 0 ? 1 : 0;
|
|
3011
|
-
},
|
|
3011
|
+
}, ot = (n) => Math.sqrt(Ri(n, n)), Nr = (n, e, t) => {
|
|
3012
3012
|
const i = {
|
|
3013
3013
|
x: e.x - n.x,
|
|
3014
3014
|
y: e.y - n.y
|
|
@@ -3016,7 +3016,7 @@ const Qe = new Nr(), ot = (n, e) => n.x * e.y - n.y * e.x, Ri = (n, e) => n.x *
|
|
|
3016
3016
|
x: t.x - n.x,
|
|
3017
3017
|
y: t.y - n.y
|
|
3018
3018
|
};
|
|
3019
|
-
return
|
|
3019
|
+
return nt(r, i) / ot(r) / ot(i);
|
|
3020
3020
|
}, Tr = (n, e, t) => {
|
|
3021
3021
|
const i = {
|
|
3022
3022
|
x: e.x - n.x,
|
|
@@ -3025,34 +3025,34 @@ const Qe = new Nr(), ot = (n, e) => n.x * e.y - n.y * e.x, Ri = (n, e) => n.x *
|
|
|
3025
3025
|
x: t.x - n.x,
|
|
3026
3026
|
y: t.y - n.y
|
|
3027
3027
|
};
|
|
3028
|
-
return Ri(r, i) /
|
|
3029
|
-
},
|
|
3028
|
+
return Ri(r, i) / ot(r) / ot(i);
|
|
3029
|
+
}, gi = (n, e, t) => e.y === 0 ? null : {
|
|
3030
3030
|
x: n.x + e.x / e.y * (t - n.y),
|
|
3031
3031
|
y: t
|
|
3032
|
-
},
|
|
3032
|
+
}, mi = (n, e, t) => e.x === 0 ? null : {
|
|
3033
3033
|
x: t,
|
|
3034
3034
|
y: n.y + e.y / e.x * (t - n.x)
|
|
3035
|
-
},
|
|
3036
|
-
if (e.x === 0) return
|
|
3037
|
-
if (i.x === 0) return
|
|
3038
|
-
if (e.y === 0) return
|
|
3039
|
-
if (i.y === 0) return
|
|
3040
|
-
const r =
|
|
3035
|
+
}, Pr = (n, e, t, i) => {
|
|
3036
|
+
if (e.x === 0) return mi(t, i, n.x);
|
|
3037
|
+
if (i.x === 0) return mi(n, e, t.x);
|
|
3038
|
+
if (e.y === 0) return gi(t, i, n.y);
|
|
3039
|
+
if (i.y === 0) return gi(n, e, t.y);
|
|
3040
|
+
const r = nt(e, i);
|
|
3041
3041
|
if (r == 0) return null;
|
|
3042
3042
|
const o = {
|
|
3043
3043
|
x: t.x - n.x,
|
|
3044
3044
|
y: t.y - n.y
|
|
3045
|
-
},
|
|
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;
|
|
3046
3046
|
return {
|
|
3047
3047
|
x: f,
|
|
3048
3048
|
y: h
|
|
3049
3049
|
};
|
|
3050
3050
|
};
|
|
3051
|
-
class
|
|
3051
|
+
class ne {
|
|
3052
3052
|
// for ordering sweep events in the sweep event queue
|
|
3053
3053
|
static compare(e, t) {
|
|
3054
|
-
const i =
|
|
3055
|
-
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));
|
|
3056
3056
|
}
|
|
3057
3057
|
// for ordering points in sweep line order
|
|
3058
3058
|
static comparePoints(e, t) {
|
|
@@ -3107,25 +3107,25 @@ class re {
|
|
|
3107
3107
|
const t = /* @__PURE__ */ new Map(), i = (r) => {
|
|
3108
3108
|
const o = r.otherSE;
|
|
3109
3109
|
t.set(r, {
|
|
3110
|
-
sine:
|
|
3110
|
+
sine: Nr(this.point, e.point, o.point),
|
|
3111
3111
|
cosine: Tr(this.point, e.point, o.point)
|
|
3112
3112
|
});
|
|
3113
3113
|
};
|
|
3114
3114
|
return (r, o) => {
|
|
3115
3115
|
t.has(r) || i(r), t.has(o) || i(o);
|
|
3116
3116
|
const {
|
|
3117
|
-
sine:
|
|
3117
|
+
sine: a,
|
|
3118
3118
|
cosine: s
|
|
3119
3119
|
} = t.get(r), {
|
|
3120
|
-
sine:
|
|
3121
|
-
cosine:
|
|
3120
|
+
sine: u,
|
|
3121
|
+
cosine: l
|
|
3122
3122
|
} = t.get(o);
|
|
3123
|
-
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;
|
|
3124
3124
|
};
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
|
-
let
|
|
3128
|
-
class
|
|
3127
|
+
let Rr = 0;
|
|
3128
|
+
class pe {
|
|
3129
3129
|
/* This compare() function is for ordering segments in the sweep
|
|
3130
3130
|
* line tree, and does so according to the following criteria:
|
|
3131
3131
|
*
|
|
@@ -3140,60 +3140,60 @@ class ye {
|
|
|
3140
3140
|
* is directly on the right-more of the two left inputs.
|
|
3141
3141
|
*/
|
|
3142
3142
|
static compare(e, t) {
|
|
3143
|
-
const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x,
|
|
3144
|
-
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;
|
|
3145
3145
|
if (o < r) return -1;
|
|
3146
|
-
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;
|
|
3147
3147
|
if (i < r) {
|
|
3148
|
-
if (
|
|
3149
|
-
if (
|
|
3150
|
-
const
|
|
3151
|
-
if (
|
|
3152
|
-
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;
|
|
3153
3153
|
const f = t.comparePoint(e.rightSE.point);
|
|
3154
3154
|
return f !== 0 ? f : -1;
|
|
3155
3155
|
}
|
|
3156
3156
|
if (i > r) {
|
|
3157
|
-
if (s <
|
|
3158
|
-
if (s >
|
|
3159
|
-
const
|
|
3160
|
-
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;
|
|
3161
3161
|
const f = e.comparePoint(t.rightSE.point);
|
|
3162
3162
|
return f < 0 ? 1 : f > 0 ? -1 : 1;
|
|
3163
3163
|
}
|
|
3164
|
-
if (s <
|
|
3165
|
-
if (s >
|
|
3166
|
-
if (o <
|
|
3167
|
-
const
|
|
3168
|
-
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;
|
|
3169
3169
|
}
|
|
3170
|
-
if (o >
|
|
3171
|
-
const
|
|
3172
|
-
if (
|
|
3173
|
-
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;
|
|
3174
3174
|
}
|
|
3175
|
-
if (o !==
|
|
3176
|
-
const
|
|
3177
|
-
if (
|
|
3178
|
-
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;
|
|
3179
3179
|
}
|
|
3180
|
-
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;
|
|
3181
3181
|
}
|
|
3182
3182
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3183
3183
|
* and possibly will be later modified */
|
|
3184
3184
|
constructor(e, t, i, r) {
|
|
3185
|
-
this.id = ++
|
|
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;
|
|
3186
3186
|
}
|
|
3187
3187
|
static fromRing(e, t, i) {
|
|
3188
|
-
let r, o,
|
|
3189
|
-
const s =
|
|
3188
|
+
let r, o, a;
|
|
3189
|
+
const s = ne.comparePoints(e, t);
|
|
3190
3190
|
if (s < 0)
|
|
3191
|
-
r = e, o = t,
|
|
3191
|
+
r = e, o = t, a = 1;
|
|
3192
3192
|
else if (s > 0)
|
|
3193
|
-
r = t, o = e,
|
|
3193
|
+
r = t, o = e, a = -1;
|
|
3194
3194
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3195
|
-
const
|
|
3196
|
-
return new
|
|
3195
|
+
const u = new ne(r, !0), l = new ne(o, !1);
|
|
3196
|
+
return new pe(u, l, [i], [a]);
|
|
3197
3197
|
}
|
|
3198
3198
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3199
3199
|
replaceRightSE(e) {
|
|
@@ -3240,10 +3240,10 @@ class ye {
|
|
|
3240
3240
|
const t = this.leftSE.point, i = this.rightSE.point, r = this.vector();
|
|
3241
3241
|
if (t.x === i.x)
|
|
3242
3242
|
return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
|
|
3243
|
-
const o = (e.y - t.y) / r.y,
|
|
3244
|
-
if (e.x ===
|
|
3245
|
-
const s = (e.x - t.x) / r.x,
|
|
3246
|
-
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;
|
|
3247
3247
|
}
|
|
3248
3248
|
/**
|
|
3249
3249
|
* Given another segment, returns the first non-trivial intersection
|
|
@@ -3261,20 +3261,20 @@ class ye {
|
|
|
3261
3261
|
* Else, return null.
|
|
3262
3262
|
*/
|
|
3263
3263
|
getIntersection(e) {
|
|
3264
|
-
const t = this.bbox(), i = e.bbox(), r =
|
|
3264
|
+
const t = this.bbox(), i = e.bbox(), r = Pt(t, i);
|
|
3265
3265
|
if (r === null) return null;
|
|
3266
|
-
const o = this.leftSE.point,
|
|
3267
|
-
if (d &&
|
|
3268
|
-
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;
|
|
3269
3269
|
if (d)
|
|
3270
|
-
return
|
|
3271
|
-
if (
|
|
3272
|
-
return f &&
|
|
3273
|
-
if (f &&
|
|
3274
|
-
if (f) return
|
|
3275
|
-
if (
|
|
3276
|
-
const h =
|
|
3277
|
-
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);
|
|
3278
3278
|
}
|
|
3279
3279
|
/**
|
|
3280
3280
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3289,10 +3289,10 @@ class ye {
|
|
|
3289
3289
|
* Warning: input array of points is modified
|
|
3290
3290
|
*/
|
|
3291
3291
|
split(e) {
|
|
3292
|
-
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;
|
|
3293
3293
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3294
|
-
const s = new
|
|
3295
|
-
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;
|
|
3296
3296
|
}
|
|
3297
3297
|
/* Swap which event is left and right */
|
|
3298
3298
|
swapEvents() {
|
|
@@ -3307,7 +3307,7 @@ class ye {
|
|
|
3307
3307
|
let t = this, i = e;
|
|
3308
3308
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3309
3309
|
for (; i.consumedBy; ) i = i.consumedBy;
|
|
3310
|
-
const r =
|
|
3310
|
+
const r = pe.compare(t, i);
|
|
3311
3311
|
if (r !== 0) {
|
|
3312
3312
|
if (r > 0) {
|
|
3313
3313
|
const o = t;
|
|
@@ -3317,9 +3317,9 @@ class ye {
|
|
|
3317
3317
|
const o = t;
|
|
3318
3318
|
t = i, i = o;
|
|
3319
3319
|
}
|
|
3320
|
-
for (let o = 0,
|
|
3321
|
-
const s = i.rings[o],
|
|
3322
|
-
|
|
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;
|
|
3323
3323
|
}
|
|
3324
3324
|
i.rings = null, i.windings = null, i.consumedBy = t, i.leftSE.consumedBy = t.leftSE, i.rightSE.consumedBy = t.rightSE;
|
|
3325
3325
|
}
|
|
@@ -3350,25 +3350,25 @@ class ye {
|
|
|
3350
3350
|
multiPolys: []
|
|
3351
3351
|
};
|
|
3352
3352
|
const t = this._afterState.rings, i = this._afterState.windings, r = this._afterState.multiPolys;
|
|
3353
|
-
for (let s = 0,
|
|
3354
|
-
const
|
|
3355
|
-
|
|
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;
|
|
3356
3356
|
}
|
|
3357
|
-
const o = [],
|
|
3358
|
-
for (let s = 0,
|
|
3357
|
+
const o = [], a = [];
|
|
3358
|
+
for (let s = 0, u = t.length; s < u; s++) {
|
|
3359
3359
|
if (i[s] === 0) continue;
|
|
3360
|
-
const
|
|
3361
|
-
if (
|
|
3362
|
-
if (
|
|
3360
|
+
const l = t[s], d = l.poly;
|
|
3361
|
+
if (a.indexOf(d) === -1)
|
|
3362
|
+
if (l.isExterior) o.push(d);
|
|
3363
3363
|
else {
|
|
3364
|
-
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3364
|
+
a.indexOf(d) === -1 && a.push(d);
|
|
3365
|
+
const c = o.indexOf(l.poly);
|
|
3366
|
+
c !== -1 && o.splice(c, 1);
|
|
3367
3367
|
}
|
|
3368
3368
|
}
|
|
3369
|
-
for (let s = 0,
|
|
3370
|
-
const
|
|
3371
|
-
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);
|
|
3372
3372
|
}
|
|
3373
3373
|
return this._afterState;
|
|
3374
3374
|
}
|
|
@@ -3377,7 +3377,7 @@ class ye {
|
|
|
3377
3377
|
if (this.consumedBy) return !1;
|
|
3378
3378
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3379
3379
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3380
|
-
switch (
|
|
3380
|
+
switch (se.type) {
|
|
3381
3381
|
case "union": {
|
|
3382
3382
|
const i = e.length === 0, r = t.length === 0;
|
|
3383
3383
|
this._isInResult = i !== r;
|
|
@@ -3385,7 +3385,7 @@ class ye {
|
|
|
3385
3385
|
}
|
|
3386
3386
|
case "intersection": {
|
|
3387
3387
|
let i, r;
|
|
3388
|
-
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;
|
|
3389
3389
|
break;
|
|
3390
3390
|
}
|
|
3391
3391
|
case "xor": {
|
|
@@ -3399,18 +3399,18 @@ class ye {
|
|
|
3399
3399
|
break;
|
|
3400
3400
|
}
|
|
3401
3401
|
default:
|
|
3402
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3402
|
+
throw new Error(`Unrecognized operation type found ${se.type}`);
|
|
3403
3403
|
}
|
|
3404
3404
|
return this._isInResult;
|
|
3405
3405
|
}
|
|
3406
3406
|
}
|
|
3407
|
-
class
|
|
3407
|
+
class yi {
|
|
3408
3408
|
constructor(e, t, i) {
|
|
3409
3409
|
if (!Array.isArray(e) || e.length === 0)
|
|
3410
3410
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3411
3411
|
if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3412
3412
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3413
|
-
const r =
|
|
3413
|
+
const r = Ze.round(e[0][0], e[0][1]);
|
|
3414
3414
|
this.bbox = {
|
|
3415
3415
|
ll: {
|
|
3416
3416
|
x: r.x,
|
|
@@ -3422,13 +3422,13 @@ class pi {
|
|
|
3422
3422
|
}
|
|
3423
3423
|
};
|
|
3424
3424
|
let o = r;
|
|
3425
|
-
for (let
|
|
3426
|
-
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")
|
|
3427
3427
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3428
|
-
let
|
|
3429
|
-
|
|
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);
|
|
3430
3430
|
}
|
|
3431
|
-
(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));
|
|
3432
3432
|
}
|
|
3433
3433
|
getSweepEvents() {
|
|
3434
3434
|
const e = [];
|
|
@@ -3439,11 +3439,11 @@ class pi {
|
|
|
3439
3439
|
return e;
|
|
3440
3440
|
}
|
|
3441
3441
|
}
|
|
3442
|
-
class
|
|
3442
|
+
class Ir {
|
|
3443
3443
|
constructor(e, t) {
|
|
3444
3444
|
if (!Array.isArray(e))
|
|
3445
3445
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3446
|
-
this.exteriorRing = new
|
|
3446
|
+
this.exteriorRing = new yi(e[0], this, !0), this.bbox = {
|
|
3447
3447
|
ll: {
|
|
3448
3448
|
x: this.exteriorRing.bbox.ll.x,
|
|
3449
3449
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3454,7 +3454,7 @@ class Or {
|
|
|
3454
3454
|
}
|
|
3455
3455
|
}, this.interiorRings = [];
|
|
3456
3456
|
for (let i = 1, r = e.length; i < r; i++) {
|
|
3457
|
-
const o = new
|
|
3457
|
+
const o = new yi(e[i], this, !1);
|
|
3458
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);
|
|
3459
3459
|
}
|
|
3460
3460
|
this.multiPoly = t;
|
|
@@ -3463,13 +3463,13 @@ class Or {
|
|
|
3463
3463
|
const e = this.exteriorRing.getSweepEvents();
|
|
3464
3464
|
for (let t = 0, i = this.interiorRings.length; t < i; t++) {
|
|
3465
3465
|
const r = this.interiorRings[t].getSweepEvents();
|
|
3466
|
-
for (let o = 0,
|
|
3466
|
+
for (let o = 0, a = r.length; o < a; o++)
|
|
3467
3467
|
e.push(r[o]);
|
|
3468
3468
|
}
|
|
3469
3469
|
return e;
|
|
3470
3470
|
}
|
|
3471
3471
|
}
|
|
3472
|
-
class
|
|
3472
|
+
class vi {
|
|
3473
3473
|
constructor(e, t) {
|
|
3474
3474
|
if (!Array.isArray(e))
|
|
3475
3475
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3488,7 +3488,7 @@ class bi {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
};
|
|
3490
3490
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3491
|
-
const o = new
|
|
3491
|
+
const o = new Ir(e[i], this);
|
|
3492
3492
|
o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
|
|
3493
3493
|
}
|
|
3494
3494
|
this.isSubject = t;
|
|
@@ -3497,13 +3497,13 @@ class bi {
|
|
|
3497
3497
|
const e = [];
|
|
3498
3498
|
for (let t = 0, i = this.polys.length; t < i; t++) {
|
|
3499
3499
|
const r = this.polys[t].getSweepEvents();
|
|
3500
|
-
for (let o = 0,
|
|
3500
|
+
for (let o = 0, a = r.length; o < a; o++)
|
|
3501
3501
|
e.push(r[o]);
|
|
3502
3502
|
}
|
|
3503
3503
|
return e;
|
|
3504
3504
|
}
|
|
3505
3505
|
}
|
|
3506
|
-
class
|
|
3506
|
+
class st {
|
|
3507
3507
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3508
3508
|
* of closed rings from all the segments marked to be part of the result */
|
|
3509
3509
|
static factory(e) {
|
|
@@ -3511,39 +3511,39 @@ class ut {
|
|
|
3511
3511
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3512
3512
|
const o = e[i];
|
|
3513
3513
|
if (!o.isInResult() || o.ringOut) continue;
|
|
3514
|
-
let
|
|
3515
|
-
const
|
|
3516
|
-
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; )
|
|
3517
3517
|
for (; ; ) {
|
|
3518
3518
|
const f = s.getAvailableLinkedEvents();
|
|
3519
3519
|
if (f.length === 0) {
|
|
3520
|
-
const
|
|
3521
|
-
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}].`);
|
|
3522
3522
|
}
|
|
3523
3523
|
if (f.length === 1) {
|
|
3524
|
-
|
|
3524
|
+
u = f[0].otherSE;
|
|
3525
3525
|
break;
|
|
3526
3526
|
}
|
|
3527
3527
|
let h = null;
|
|
3528
|
-
for (let
|
|
3529
|
-
if (
|
|
3530
|
-
h =
|
|
3528
|
+
for (let b = 0, m = c.length; b < m; b++)
|
|
3529
|
+
if (c[b].point === s.point) {
|
|
3530
|
+
h = b;
|
|
3531
3531
|
break;
|
|
3532
3532
|
}
|
|
3533
3533
|
if (h !== null) {
|
|
3534
|
-
const
|
|
3535
|
-
|
|
3534
|
+
const b = c.splice(h)[0], m = l.splice(b.index);
|
|
3535
|
+
m.unshift(m[0].otherSE), t.push(new st(m.reverse()));
|
|
3536
3536
|
continue;
|
|
3537
3537
|
}
|
|
3538
|
-
|
|
3539
|
-
index:
|
|
3538
|
+
c.push({
|
|
3539
|
+
index: l.length,
|
|
3540
3540
|
point: s.point
|
|
3541
3541
|
});
|
|
3542
|
-
const
|
|
3543
|
-
|
|
3542
|
+
const p = s.getLeftmostComparator(a);
|
|
3543
|
+
u = f.sort(p)[0].otherSE;
|
|
3544
3544
|
break;
|
|
3545
3545
|
}
|
|
3546
|
-
t.push(new
|
|
3546
|
+
t.push(new st(l));
|
|
3547
3547
|
}
|
|
3548
3548
|
return t;
|
|
3549
3549
|
}
|
|
@@ -3556,16 +3556,16 @@ class ut {
|
|
|
3556
3556
|
getGeom() {
|
|
3557
3557
|
let e = this.events[0].point;
|
|
3558
3558
|
const t = [e];
|
|
3559
|
-
for (let
|
|
3560
|
-
const
|
|
3561
|
-
|
|
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);
|
|
3562
3562
|
}
|
|
3563
3563
|
if (t.length === 1) return null;
|
|
3564
3564
|
const i = t[0], r = t[1];
|
|
3565
|
-
|
|
3566
|
-
const o = this.isExteriorRing() ? 1 : -1,
|
|
3567
|
-
for (let
|
|
3568
|
-
return
|
|
3565
|
+
hi(i, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
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;
|
|
3569
3569
|
}
|
|
3570
3570
|
isExteriorRing() {
|
|
3571
3571
|
if (this._isExteriorRing === void 0) {
|
|
@@ -3581,8 +3581,8 @@ class ut {
|
|
|
3581
3581
|
_calcEnclosingRing() {
|
|
3582
3582
|
let e = this.events[0];
|
|
3583
3583
|
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3584
|
-
const
|
|
3585
|
-
|
|
3584
|
+
const a = this.events[r];
|
|
3585
|
+
ne.compare(e, a) > 0 && (e = a);
|
|
3586
3586
|
}
|
|
3587
3587
|
let t = e.segment.prevInResult(), i = t ? t.prevInResult() : null;
|
|
3588
3588
|
for (; ; ) {
|
|
@@ -3594,7 +3594,7 @@ class ut {
|
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
3596
|
}
|
|
3597
|
-
class
|
|
3597
|
+
class pi {
|
|
3598
3598
|
constructor(e) {
|
|
3599
3599
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3600
3600
|
}
|
|
@@ -3611,7 +3611,7 @@ class yi {
|
|
|
3611
3611
|
return e;
|
|
3612
3612
|
}
|
|
3613
3613
|
}
|
|
3614
|
-
class
|
|
3614
|
+
class Or {
|
|
3615
3615
|
constructor(e) {
|
|
3616
3616
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3617
3617
|
}
|
|
@@ -3628,19 +3628,19 @@ class Wr {
|
|
|
3628
3628
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3629
3629
|
const o = e[i];
|
|
3630
3630
|
if (!o.poly)
|
|
3631
|
-
if (o.isExteriorRing()) t.push(new
|
|
3631
|
+
if (o.isExteriorRing()) t.push(new pi(o));
|
|
3632
3632
|
else {
|
|
3633
|
-
const
|
|
3634
|
-
|
|
3633
|
+
const a = o.enclosingRing();
|
|
3634
|
+
a.poly || t.push(new pi(a)), a.poly.addInterior(o);
|
|
3635
3635
|
}
|
|
3636
3636
|
}
|
|
3637
3637
|
return t;
|
|
3638
3638
|
}
|
|
3639
3639
|
}
|
|
3640
|
-
class
|
|
3640
|
+
class Wr {
|
|
3641
3641
|
constructor(e) {
|
|
3642
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3643
|
-
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 = [];
|
|
3644
3644
|
}
|
|
3645
3645
|
process(e) {
|
|
3646
3646
|
const t = e.segment, i = [];
|
|
@@ -3648,51 +3648,51 @@ class Ar {
|
|
|
3648
3648
|
return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), i;
|
|
3649
3649
|
const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
|
|
3650
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.`);
|
|
3651
|
-
let o = r,
|
|
3651
|
+
let o = r, a = r, s, u;
|
|
3652
3652
|
for (; s === void 0; )
|
|
3653
3653
|
o = this.tree.prev(o), o === null ? s = null : o.key.consumedBy === void 0 && (s = o.key);
|
|
3654
|
-
for (;
|
|
3655
|
-
|
|
3654
|
+
for (; u === void 0; )
|
|
3655
|
+
a = this.tree.next(a), a === null ? u = null : a.key.consumedBy === void 0 && (u = a.key);
|
|
3656
3656
|
if (e.isLeft) {
|
|
3657
|
-
let
|
|
3657
|
+
let l = null;
|
|
3658
3658
|
if (s) {
|
|
3659
|
-
const
|
|
3660
|
-
if (
|
|
3661
|
-
const f = this._splitSafely(s,
|
|
3662
|
-
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++)
|
|
3663
3663
|
i.push(f[h]);
|
|
3664
3664
|
}
|
|
3665
3665
|
}
|
|
3666
3666
|
let d = null;
|
|
3667
|
-
if (
|
|
3668
|
-
const
|
|
3669
|
-
if (
|
|
3670
|
-
const f = this._splitSafely(
|
|
3671
|
-
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++)
|
|
3672
3672
|
i.push(f[h]);
|
|
3673
3673
|
}
|
|
3674
3674
|
}
|
|
3675
|
-
if (
|
|
3676
|
-
let
|
|
3677
|
-
|
|
3678
|
-
const f = t.split(
|
|
3679
|
-
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++)
|
|
3680
3680
|
i.push(f[h]);
|
|
3681
3681
|
}
|
|
3682
3682
|
i.length > 0 ? (this.tree.remove(t), i.push(e)) : (this.segments.push(t), t.prev = s);
|
|
3683
3683
|
} else {
|
|
3684
|
-
if (s &&
|
|
3685
|
-
const
|
|
3686
|
-
if (
|
|
3687
|
-
if (!s.isAnEndpoint(
|
|
3688
|
-
const d = this._splitSafely(s,
|
|
3689
|
-
for (let
|
|
3690
|
-
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]);
|
|
3691
3691
|
}
|
|
3692
|
-
if (!
|
|
3693
|
-
const d = this._splitSafely(
|
|
3694
|
-
for (let
|
|
3695
|
-
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]);
|
|
3696
3696
|
}
|
|
3697
3697
|
}
|
|
3698
3698
|
}
|
|
@@ -3710,157 +3710,157 @@ class Ar {
|
|
|
3710
3710
|
return r.push(i), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3711
3711
|
}
|
|
3712
3712
|
}
|
|
3713
|
-
const
|
|
3714
|
-
class
|
|
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;
|
|
3714
|
+
class Br {
|
|
3715
3715
|
run(e, t, i) {
|
|
3716
|
-
|
|
3717
|
-
const r = [new
|
|
3718
|
-
for (let
|
|
3719
|
-
r.push(new
|
|
3720
|
-
if (
|
|
3721
|
-
const
|
|
3716
|
+
se.type = e, Ze.reset();
|
|
3717
|
+
const r = [new vi(t, !0)];
|
|
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];
|
|
3722
3722
|
let f = 1;
|
|
3723
3723
|
for (; f < r.length; )
|
|
3724
|
-
|
|
3724
|
+
Pt(r[f].bbox, c.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3725
3725
|
}
|
|
3726
|
-
if (
|
|
3727
|
-
for (let
|
|
3728
|
-
const h = r[
|
|
3729
|
-
for (let
|
|
3730
|
-
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 [];
|
|
3731
3731
|
}
|
|
3732
|
-
const o = new
|
|
3733
|
-
for (let
|
|
3734
|
-
const h = r[
|
|
3735
|
-
for (let
|
|
3736
|
-
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)
|
|
3737
3737
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3738
3738
|
}
|
|
3739
|
-
const
|
|
3740
|
-
let s = o.size,
|
|
3741
|
-
for (;
|
|
3742
|
-
const
|
|
3739
|
+
const a = new Wr(o);
|
|
3740
|
+
let s = o.size, u = o.pop();
|
|
3741
|
+
for (; u; ) {
|
|
3742
|
+
const c = u.key;
|
|
3743
3743
|
if (o.size === s) {
|
|
3744
|
-
const h =
|
|
3745
|
-
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.`);
|
|
3746
3746
|
}
|
|
3747
|
-
if (o.size >
|
|
3747
|
+
if (o.size > bi)
|
|
3748
3748
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3749
|
-
if (
|
|
3749
|
+
if (a.segments.length > Ar)
|
|
3750
3750
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3751
|
-
const f =
|
|
3752
|
-
for (let h = 0,
|
|
3753
|
-
const
|
|
3754
|
-
|
|
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);
|
|
3755
3755
|
}
|
|
3756
|
-
s = o.size,
|
|
3756
|
+
s = o.size, u = o.pop();
|
|
3757
3757
|
}
|
|
3758
|
-
|
|
3759
|
-
const
|
|
3760
|
-
return new
|
|
3758
|
+
Ze.reset();
|
|
3759
|
+
const l = st.factory(a.segments);
|
|
3760
|
+
return new Or(l).getGeom();
|
|
3761
3761
|
}
|
|
3762
3762
|
}
|
|
3763
|
-
const
|
|
3763
|
+
const se = new Br(), Dr = function(n) {
|
|
3764
3764
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3765
3765
|
t[i - 1] = arguments[i];
|
|
3766
|
-
return
|
|
3767
|
-
},
|
|
3766
|
+
return se.run("union", n, t);
|
|
3767
|
+
}, Ur = function(n) {
|
|
3768
3768
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3769
3769
|
t[i - 1] = arguments[i];
|
|
3770
|
-
return
|
|
3771
|
-
},
|
|
3770
|
+
return se.run("intersection", n, t);
|
|
3771
|
+
}, zr = function(n) {
|
|
3772
3772
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3773
3773
|
t[i - 1] = arguments[i];
|
|
3774
|
-
return
|
|
3775
|
-
},
|
|
3774
|
+
return se.run("xor", n, t);
|
|
3775
|
+
}, Gr = function(n) {
|
|
3776
3776
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3777
3777
|
t[i - 1] = arguments[i];
|
|
3778
|
-
return
|
|
3778
|
+
return se.run("difference", n, t);
|
|
3779
3779
|
};
|
|
3780
3780
|
var Ii = {
|
|
3781
|
-
union:
|
|
3782
|
-
intersection:
|
|
3783
|
-
xor:
|
|
3784
|
-
difference:
|
|
3781
|
+
union: Dr,
|
|
3782
|
+
intersection: Ur,
|
|
3783
|
+
xor: zr,
|
|
3784
|
+
difference: Gr
|
|
3785
3785
|
};
|
|
3786
3786
|
function Oi(n, e, t) {
|
|
3787
3787
|
if (n !== null)
|
|
3788
|
-
for (var i, r, o,
|
|
3789
|
-
|
|
3790
|
-
for (var
|
|
3791
|
-
var
|
|
3792
|
-
if (
|
|
3793
|
-
|
|
3794
|
-
var
|
|
3795
|
-
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) {
|
|
3796
3796
|
case null:
|
|
3797
3797
|
break;
|
|
3798
3798
|
case "Point":
|
|
3799
3799
|
if (e(
|
|
3800
|
+
u,
|
|
3800
3801
|
c,
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
_
|
|
3802
|
+
y,
|
|
3803
|
+
L,
|
|
3804
|
+
E
|
|
3805
3805
|
) === !1)
|
|
3806
3806
|
return !1;
|
|
3807
|
-
|
|
3807
|
+
c++, L++;
|
|
3808
3808
|
break;
|
|
3809
3809
|
case "LineString":
|
|
3810
3810
|
case "MultiPoint":
|
|
3811
|
-
for (i = 0; i <
|
|
3811
|
+
for (i = 0; i < u.length; i++) {
|
|
3812
3812
|
if (e(
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3813
|
+
u[i],
|
|
3814
|
+
c,
|
|
3815
|
+
y,
|
|
3816
|
+
L,
|
|
3817
|
+
E
|
|
3818
3818
|
) === !1)
|
|
3819
3819
|
return !1;
|
|
3820
|
-
|
|
3820
|
+
c++, C === "MultiPoint" && L++;
|
|
3821
3821
|
}
|
|
3822
|
-
|
|
3822
|
+
C === "LineString" && L++;
|
|
3823
3823
|
break;
|
|
3824
3824
|
case "Polygon":
|
|
3825
3825
|
case "MultiLineString":
|
|
3826
|
-
for (i = 0; i <
|
|
3827
|
-
for (r = 0; r <
|
|
3826
|
+
for (i = 0; i < u.length; i++) {
|
|
3827
|
+
for (r = 0; r < u[i].length - d; r++) {
|
|
3828
3828
|
if (e(
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3829
|
+
u[i][r],
|
|
3830
|
+
c,
|
|
3831
|
+
y,
|
|
3832
|
+
L,
|
|
3833
|
+
E
|
|
3834
3834
|
) === !1)
|
|
3835
3835
|
return !1;
|
|
3836
|
-
|
|
3836
|
+
c++;
|
|
3837
3837
|
}
|
|
3838
|
-
|
|
3838
|
+
C === "MultiLineString" && L++, C === "Polygon" && E++;
|
|
3839
3839
|
}
|
|
3840
|
-
|
|
3840
|
+
C === "Polygon" && L++;
|
|
3841
3841
|
break;
|
|
3842
3842
|
case "MultiPolygon":
|
|
3843
|
-
for (i = 0; i <
|
|
3844
|
-
for (
|
|
3845
|
-
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++) {
|
|
3846
3846
|
if (e(
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3847
|
+
u[i][r][o],
|
|
3848
|
+
c,
|
|
3849
|
+
y,
|
|
3850
|
+
L,
|
|
3851
|
+
E
|
|
3852
3852
|
) === !1)
|
|
3853
3853
|
return !1;
|
|
3854
|
-
|
|
3854
|
+
c++;
|
|
3855
3855
|
}
|
|
3856
|
-
|
|
3856
|
+
E++;
|
|
3857
3857
|
}
|
|
3858
|
-
|
|
3858
|
+
L++;
|
|
3859
3859
|
}
|
|
3860
3860
|
break;
|
|
3861
3861
|
case "GeometryCollection":
|
|
3862
|
-
for (i = 0; i <
|
|
3863
|
-
if (Oi(
|
|
3862
|
+
for (i = 0; i < a.geometries.length; i++)
|
|
3863
|
+
if (Oi(a.geometries[i], e) === !1)
|
|
3864
3864
|
return !1;
|
|
3865
3865
|
break;
|
|
3866
3866
|
default:
|
|
@@ -3870,17 +3870,17 @@ function Oi(n, e, t) {
|
|
|
3870
3870
|
}
|
|
3871
3871
|
}
|
|
3872
3872
|
}
|
|
3873
|
-
function
|
|
3874
|
-
var t, i, r, o,
|
|
3875
|
-
for (t = 0; t <
|
|
3876
|
-
for (s = h ? n.features[t].geometry :
|
|
3877
|
-
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) {
|
|
3878
3878
|
if (e(
|
|
3879
3879
|
null,
|
|
3880
3880
|
f,
|
|
3881
|
-
|
|
3881
|
+
l,
|
|
3882
3882
|
d,
|
|
3883
|
-
|
|
3883
|
+
c
|
|
3884
3884
|
) === !1)
|
|
3885
3885
|
return !1;
|
|
3886
3886
|
continue;
|
|
@@ -3895,9 +3895,9 @@ function Bt(n, e) {
|
|
|
3895
3895
|
if (e(
|
|
3896
3896
|
o,
|
|
3897
3897
|
f,
|
|
3898
|
-
|
|
3898
|
+
l,
|
|
3899
3899
|
d,
|
|
3900
|
-
|
|
3900
|
+
c
|
|
3901
3901
|
) === !1)
|
|
3902
3902
|
return !1;
|
|
3903
3903
|
break;
|
|
@@ -3907,9 +3907,9 @@ function Bt(n, e) {
|
|
|
3907
3907
|
if (e(
|
|
3908
3908
|
o.geometries[i],
|
|
3909
3909
|
f,
|
|
3910
|
-
|
|
3910
|
+
l,
|
|
3911
3911
|
d,
|
|
3912
|
-
|
|
3912
|
+
c
|
|
3913
3913
|
) === !1)
|
|
3914
3914
|
return !1;
|
|
3915
3915
|
break;
|
|
@@ -3921,8 +3921,8 @@ function Bt(n, e) {
|
|
|
3921
3921
|
f++;
|
|
3922
3922
|
}
|
|
3923
3923
|
}
|
|
3924
|
-
function
|
|
3925
|
-
|
|
3924
|
+
function Fr(n, e) {
|
|
3925
|
+
Wt(n, function(t, i, r, o, a) {
|
|
3926
3926
|
var s = t === null ? null : t.type;
|
|
3927
3927
|
switch (s) {
|
|
3928
3928
|
case null:
|
|
@@ -3930,44 +3930,44 @@ function Zr(n, e) {
|
|
|
3930
3930
|
case "LineString":
|
|
3931
3931
|
case "Polygon":
|
|
3932
3932
|
return e(
|
|
3933
|
-
|
|
3933
|
+
Fe(t, r, { bbox: o, id: a }),
|
|
3934
3934
|
i,
|
|
3935
3935
|
0
|
|
3936
3936
|
) === !1 ? !1 : void 0;
|
|
3937
3937
|
}
|
|
3938
|
-
var
|
|
3938
|
+
var u;
|
|
3939
3939
|
switch (s) {
|
|
3940
3940
|
case "MultiPoint":
|
|
3941
|
-
|
|
3941
|
+
u = "Point";
|
|
3942
3942
|
break;
|
|
3943
3943
|
case "MultiLineString":
|
|
3944
|
-
|
|
3944
|
+
u = "LineString";
|
|
3945
3945
|
break;
|
|
3946
3946
|
case "MultiPolygon":
|
|
3947
|
-
|
|
3947
|
+
u = "Polygon";
|
|
3948
3948
|
break;
|
|
3949
3949
|
}
|
|
3950
|
-
for (var
|
|
3951
|
-
var d = t.coordinates[
|
|
3952
|
-
type:
|
|
3950
|
+
for (var l = 0; l < t.coordinates.length; l++) {
|
|
3951
|
+
var d = t.coordinates[l], c = {
|
|
3952
|
+
type: u,
|
|
3953
3953
|
coordinates: d
|
|
3954
3954
|
};
|
|
3955
|
-
if (e(
|
|
3955
|
+
if (e(Fe(c, r), i, l) === !1)
|
|
3956
3956
|
return !1;
|
|
3957
3957
|
}
|
|
3958
3958
|
});
|
|
3959
3959
|
}
|
|
3960
|
-
function
|
|
3960
|
+
function jr(n, e = {}) {
|
|
3961
3961
|
const t = [];
|
|
3962
|
-
if (
|
|
3962
|
+
if (Wt(n, (r) => {
|
|
3963
3963
|
t.push(r.coordinates);
|
|
3964
3964
|
}), t.length < 2)
|
|
3965
3965
|
throw new Error("Must have at least 2 geometries");
|
|
3966
3966
|
const i = Ii.union(t[0], ...t.slice(1));
|
|
3967
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3967
|
+
return i.length === 0 ? null : i.length === 1 ? It(i[0], e.properties) : Pi(i, e.properties);
|
|
3968
3968
|
}
|
|
3969
|
-
var Wi =
|
|
3970
|
-
function
|
|
3969
|
+
var Wi = jr;
|
|
3970
|
+
function Zr(n, e = {}) {
|
|
3971
3971
|
if (n.bbox != null && e.recompute !== !0)
|
|
3972
3972
|
return n.bbox;
|
|
3973
3973
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
@@ -3975,30 +3975,30 @@ function qr(n, e = {}) {
|
|
|
3975
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]);
|
|
3976
3976
|
}), t;
|
|
3977
3977
|
}
|
|
3978
|
-
var _i =
|
|
3979
|
-
function
|
|
3978
|
+
var _i = Zr;
|
|
3979
|
+
function qr(n) {
|
|
3980
3980
|
const e = [];
|
|
3981
|
-
if (
|
|
3981
|
+
if (Wt(n, (r) => {
|
|
3982
3982
|
e.push(r.coordinates);
|
|
3983
3983
|
}), e.length < 2)
|
|
3984
3984
|
throw new Error("Must have at least two features");
|
|
3985
3985
|
const t = n.features[0].properties || {}, i = Ii.difference(e[0], ...e.slice(1));
|
|
3986
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3986
|
+
return i.length === 0 ? null : i.length === 1 ? It(i[0], t) : Pi(i, t);
|
|
3987
3987
|
}
|
|
3988
|
-
var
|
|
3989
|
-
function
|
|
3988
|
+
var Qr = qr;
|
|
3989
|
+
function Hr(n) {
|
|
3990
3990
|
if (!n)
|
|
3991
3991
|
throw new Error("geojson is required");
|
|
3992
3992
|
var e = [];
|
|
3993
|
-
return
|
|
3993
|
+
return Fr(n, function(t) {
|
|
3994
3994
|
e.push(t);
|
|
3995
|
-
}),
|
|
3995
|
+
}), je(e);
|
|
3996
3996
|
}
|
|
3997
|
-
var
|
|
3998
|
-
function
|
|
3999
|
-
const t =
|
|
4000
|
-
|
|
4001
|
-
|
|
3997
|
+
var Vr = Hr;
|
|
3998
|
+
function wi(n, e) {
|
|
3999
|
+
const t = Qr(
|
|
4000
|
+
je([
|
|
4001
|
+
It([
|
|
4002
4002
|
[
|
|
4003
4003
|
[180, 90],
|
|
4004
4004
|
[-180, 90],
|
|
@@ -4013,28 +4013,27 @@ function Ei(n, e) {
|
|
|
4013
4013
|
if (!t)
|
|
4014
4014
|
return;
|
|
4015
4015
|
t.properties = { isMask: !0 };
|
|
4016
|
-
const i =
|
|
4017
|
-
if (s.features.length > 1 && (o ||
|
|
4018
|
-
for (const
|
|
4019
|
-
const
|
|
4020
|
-
if (
|
|
4021
|
-
for (const d of
|
|
4022
|
-
for (const
|
|
4023
|
-
|
|
4024
|
-
if (o &&
|
|
4025
|
-
for (const d of
|
|
4026
|
-
for (const
|
|
4027
|
-
|
|
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;
|
|
4028
4028
|
}
|
|
4029
4029
|
e(
|
|
4030
|
-
|
|
4030
|
+
je([
|
|
4031
4031
|
s.features.length < 2 ? n : Wi(s) ?? n,
|
|
4032
4032
|
t
|
|
4033
4033
|
])
|
|
4034
4034
|
);
|
|
4035
4035
|
}
|
|
4036
|
-
const
|
|
4037
|
-
function Kr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
4036
|
+
const Ei = je([]), Li = {
|
|
4038
4037
|
fill: {
|
|
4039
4038
|
paint: {
|
|
4040
4039
|
"fill-color": "#000",
|
|
@@ -4053,256 +4052,263 @@ function Kr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
|
|
|
4053
4052
|
},
|
|
4054
4053
|
filter: ["!", ["has", "isMask"]]
|
|
4055
4054
|
}
|
|
4056
|
-
}
|
|
4055
|
+
};
|
|
4056
|
+
function Yr(n, e, t = !0, i = !0, r = {}, o = {}, a = Li) {
|
|
4057
4057
|
let s;
|
|
4058
|
-
const
|
|
4059
|
-
let
|
|
4058
|
+
const u = [];
|
|
4059
|
+
let l, d, c;
|
|
4060
4060
|
function f() {
|
|
4061
|
-
|
|
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", {
|
|
4062
4063
|
type: "geojson",
|
|
4063
|
-
data:
|
|
4064
|
-
}), !n.getLayer("full-geom-fill") && (
|
|
4065
|
-
...
|
|
4064
|
+
data: Ei
|
|
4065
|
+
}), !n.getLayer("full-geom-fill") && (m != null && m.fill) && n.addLayer({
|
|
4066
|
+
...m == null ? void 0 : m.fill,
|
|
4066
4067
|
id: "full-geom-fill",
|
|
4067
4068
|
type: "fill",
|
|
4068
4069
|
source: "full-geom"
|
|
4069
|
-
}), !n.getLayer("full-geom-line") && (
|
|
4070
|
-
...
|
|
4070
|
+
}), !n.getLayer("full-geom-line") && (m != null && m.line) && n.addLayer({
|
|
4071
|
+
...m == null ? void 0 : m.line,
|
|
4071
4072
|
id: "full-geom-line",
|
|
4072
4073
|
type: "line",
|
|
4073
4074
|
source: "full-geom"
|
|
4074
|
-
}),
|
|
4075
|
+
}), c && b(c);
|
|
4075
4076
|
}
|
|
4076
4077
|
n.loaded() ? f() : n.once("load", () => {
|
|
4077
4078
|
f();
|
|
4078
4079
|
}), n.on("styledata", () => {
|
|
4079
4080
|
f();
|
|
4080
4081
|
});
|
|
4081
|
-
const h = (
|
|
4082
|
+
const h = (m) => {
|
|
4082
4083
|
s == null || s({
|
|
4083
4084
|
type: "mapClick",
|
|
4084
|
-
coordinates: [
|
|
4085
|
+
coordinates: [m.lngLat.lng, m.lngLat.lat]
|
|
4085
4086
|
});
|
|
4086
4087
|
};
|
|
4087
|
-
function
|
|
4088
|
+
function p(m = !1) {
|
|
4088
4089
|
if (!e)
|
|
4089
4090
|
throw new Error();
|
|
4090
|
-
const
|
|
4091
|
-
return
|
|
4091
|
+
const y = document.createElement("div");
|
|
4092
|
+
return m && y.classList.add("marker-interactive"), new jn({
|
|
4092
4093
|
props: { displayIn: "maplibre" },
|
|
4093
|
-
target:
|
|
4094
|
-
}), new e.Marker({ element:
|
|
4094
|
+
target: y
|
|
4095
|
+
}), new e.Marker({ element: y, offset: [1, -13] });
|
|
4095
4096
|
}
|
|
4096
|
-
function
|
|
4097
|
-
var
|
|
4098
|
-
|
|
4097
|
+
function b(m) {
|
|
4098
|
+
var y;
|
|
4099
|
+
c = m, m && ((y = n.getSource("full-geom")) == null || y.setData(m));
|
|
4099
4100
|
}
|
|
4100
4101
|
return {
|
|
4101
|
-
setEventHandler(
|
|
4102
|
-
|
|
4102
|
+
setEventHandler(m) {
|
|
4103
|
+
m ? (s = m, n.on("click", h)) : (s = void 0, n.off("click", h));
|
|
4103
4104
|
},
|
|
4104
|
-
flyTo(
|
|
4105
|
-
n.flyTo({ center:
|
|
4105
|
+
flyTo(m, y) {
|
|
4106
|
+
n.flyTo({ center: m, ...y ? { zoom: y } : {}, ...r });
|
|
4106
4107
|
},
|
|
4107
|
-
fitBounds(
|
|
4108
|
+
fitBounds(m, y, w) {
|
|
4108
4109
|
n.fitBounds(
|
|
4109
4110
|
[
|
|
4110
|
-
[
|
|
4111
|
-
[
|
|
4111
|
+
[m[0], m[1]],
|
|
4112
|
+
[m[2], m[3]]
|
|
4112
4113
|
],
|
|
4113
|
-
{ padding:
|
|
4114
|
+
{ padding: y, ...w ? { maxZoom: w } : {}, ...o }
|
|
4114
4115
|
);
|
|
4115
4116
|
},
|
|
4116
|
-
indicateReverse(
|
|
4117
|
-
n.getCanvasContainer().style.cursor =
|
|
4117
|
+
indicateReverse(m) {
|
|
4118
|
+
n.getCanvasContainer().style.cursor = m ? "crosshair" : "";
|
|
4118
4119
|
},
|
|
4119
|
-
setReverseMarker(
|
|
4120
|
-
!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"))));
|
|
4121
4122
|
},
|
|
4122
|
-
setMarkers(
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
if (
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
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)))
|
|
4132
4136
|
);
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
_.length > 0 && (y({
|
|
4151
|
-
...m,
|
|
4152
|
-
geometry: { type: "GeometryCollection", geometries: _ }
|
|
4153
|
-
}), E = !0);
|
|
4154
|
-
}
|
|
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);
|
|
4155
4154
|
}
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
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;
|
|
4163
4162
|
}
|
|
4164
|
-
t && c.push(
|
|
4165
|
-
(typeof t == "object" ? new e.Marker(t) : b()).setLngLat(m.center).addTo(n)
|
|
4166
|
-
);
|
|
4167
4163
|
}
|
|
4168
|
-
if (
|
|
4169
|
-
|
|
4170
|
-
|
|
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)
|
|
4171
4178
|
continue;
|
|
4172
|
-
|
|
4179
|
+
} else
|
|
4180
|
+
L = (typeof i == "object" ? new e.Marker(i) : p(!0)).setLngLat(w.center).setPopup(
|
|
4173
4181
|
new e.Popup({
|
|
4174
4182
|
offset: [1, -27],
|
|
4175
4183
|
closeButton: !1,
|
|
4176
4184
|
closeOnMove: !0,
|
|
4177
4185
|
className: "maptiler-gc-popup"
|
|
4178
4186
|
}).setText(
|
|
4179
|
-
|
|
4187
|
+
w.place_type[0] === "reverse" ? w.place_name : w.place_name.replace(/,.*/, "")
|
|
4180
4188
|
)
|
|
4181
|
-
).addTo(n)
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
}),
|
|
4189
|
-
}
|
|
4190
|
-
|
|
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
|
+
}
|
|
4191
4199
|
}
|
|
4192
4200
|
},
|
|
4193
|
-
setSelectedMarker(
|
|
4194
|
-
|
|
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);
|
|
4195
4203
|
},
|
|
4196
4204
|
getCenterAndZoom() {
|
|
4197
|
-
const
|
|
4198
|
-
return [n.getZoom(),
|
|
4205
|
+
const m = n.getCenter();
|
|
4206
|
+
return [n.getZoom(), m.lng, m.lat];
|
|
4199
4207
|
}
|
|
4200
4208
|
};
|
|
4201
4209
|
}
|
|
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
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
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;
|
|
4291
4303
|
}
|
|
4292
|
-
|
|
4293
|
-
class
|
|
4294
|
-
getMapLibreGl() {
|
|
4295
|
-
return sn;
|
|
4296
|
-
}
|
|
4304
|
+
const Xr = Kr(Ft.Evented, Ft);
|
|
4305
|
+
class to extends Xr {
|
|
4297
4306
|
onAdd(e) {
|
|
4298
4307
|
return super.onAddInt(e);
|
|
4299
4308
|
}
|
|
4300
|
-
getExtraProps() {
|
|
4301
|
-
return {};
|
|
4302
|
-
}
|
|
4303
4309
|
}
|
|
4304
4310
|
export {
|
|
4305
|
-
|
|
4306
|
-
|
|
4311
|
+
to as GeocodingControl,
|
|
4312
|
+
Yr as createMapLibreGlMapController
|
|
4307
4313
|
};
|
|
4308
4314
|
//# sourceMappingURL=maplibregl.js.map
|