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