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