@maptiler/geocoding-control 2.1.0-rc1 → 2.1.0-with-autocomplete-timeout
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/leaflet.js +970 -951
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1238 -1219
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1240 -1221
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1033 -1014
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +1 -1
- package/react.js +701 -682
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +45 -17
- package/svelte/GeocodingControl.svelte.d.ts +1 -0
- package/svelte/types.d.ts +1 -0
- package/types.d.ts +1 -0
- package/vanilla.js +713 -694
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/openlayers.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Cn = Object.defineProperty;
|
|
2
|
+
var oi = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var re = (i, e, t) =>
|
|
7
|
-
var Z = (i, e, t) => (
|
|
8
|
-
import { Control as
|
|
9
|
-
import
|
|
10
|
-
import { Feature as
|
|
11
|
-
import { Point as
|
|
12
|
-
import
|
|
13
|
-
import { fromLonLat as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
function
|
|
21
|
-
}
|
|
22
|
-
function
|
|
5
|
+
var Pn = (i, e, t) => e in i ? Cn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
+
var re = (i, e, t) => Pn(i, typeof e != "symbol" ? e + "" : e, t), si = (i, e, t) => e.has(i) || oi("Cannot " + t);
|
|
7
|
+
var Z = (i, e, t) => (si(i, e, "read from private field"), t ? t.call(i) : e.get(i)), It = (i, e, t) => e.has(i) ? oi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), Ot = (i, e, t, n) => (si(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
8
|
+
import { Control as Nn } from "ol/control";
|
|
9
|
+
import Pe from "ol/events/Event";
|
|
10
|
+
import { Feature as me } from "ol";
|
|
11
|
+
import { Point as zt, Polygon as li, MultiPolygon as ui, GeometryCollection as Tn, LineString as ai, MultiLineString as ci } from "ol/geom";
|
|
12
|
+
import Rn from "ol/layer/Vector";
|
|
13
|
+
import { fromLonLat as at, transformExtent as In, toLonLat as fi, getUserProjection as On } from "ol/proj";
|
|
14
|
+
import zn from "ol/source/Vector";
|
|
15
|
+
import di from "ol/style/Fill";
|
|
16
|
+
import Wn from "ol/style/Icon";
|
|
17
|
+
import hi from "ol/style/Stroke";
|
|
18
|
+
import An from "ol/style/Style";
|
|
19
|
+
import Bn from "ol/style/Text";
|
|
20
|
+
function G() {
|
|
21
|
+
}
|
|
22
|
+
function Fn(i, e) {
|
|
23
23
|
for (const t in e) i[t] = e[t];
|
|
24
24
|
return (
|
|
25
25
|
/** @type {T & S} */
|
|
26
26
|
i
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Vi(i) {
|
|
30
30
|
return i();
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function mi() {
|
|
33
33
|
return /* @__PURE__ */ Object.create(null);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
i.forEach(
|
|
35
|
+
function ve(i) {
|
|
36
|
+
i.forEach(Vi);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Zi(i) {
|
|
39
39
|
return typeof i == "function";
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ze(i, e) {
|
|
42
42
|
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
43
43
|
}
|
|
44
|
-
let
|
|
45
|
-
function
|
|
46
|
-
return i === e ? !0 : (
|
|
44
|
+
let ct;
|
|
45
|
+
function $(i, e) {
|
|
46
|
+
return i === e ? !0 : (ct || (ct = document.createElement("a")), ct.href = e, i === ct.href);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Un(i) {
|
|
49
49
|
return Object.keys(i).length === 0;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Dn(i, e, t, n) {
|
|
52
52
|
if (i) {
|
|
53
|
-
const r =
|
|
53
|
+
const r = Hi(i, e, t, n);
|
|
54
54
|
return i[0](r);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return i[1] && n ?
|
|
57
|
+
function Hi(i, e, t, n) {
|
|
58
|
+
return i[1] && n ? Fn(t.ctx.slice(), i[1](n(e))) : t.ctx;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Gn(i, e, t, n) {
|
|
61
61
|
if (i[2] && n) {
|
|
62
62
|
const r = i[2](n(t));
|
|
63
63
|
if (e.dirty === void 0)
|
|
@@ -72,13 +72,13 @@ function Bn(i, e, t, n) {
|
|
|
72
72
|
}
|
|
73
73
|
return e.dirty;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function jn(i, e, t, n, r, o) {
|
|
76
76
|
if (r) {
|
|
77
|
-
const l =
|
|
77
|
+
const l = Hi(e, t, n, o);
|
|
78
78
|
i.p(l, r);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function qn(i) {
|
|
82
82
|
if (i.ctx.length > 32) {
|
|
83
83
|
const e = [], t = i.ctx.length / 32;
|
|
84
84
|
for (let n = 0; n < t; n++)
|
|
@@ -87,37 +87,37 @@ function Un(i) {
|
|
|
87
87
|
}
|
|
88
88
|
return -1;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function gt(i) {
|
|
91
91
|
return i ?? "";
|
|
92
92
|
}
|
|
93
93
|
function O(i, e) {
|
|
94
94
|
i.appendChild(e);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function j(i, e, t) {
|
|
97
97
|
i.insertBefore(e, t || null);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function U(i) {
|
|
100
100
|
i.parentNode && i.parentNode.removeChild(i);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function A(i) {
|
|
103
103
|
return document.createElement(i);
|
|
104
104
|
}
|
|
105
105
|
function ge(i) {
|
|
106
106
|
return document.createElementNS("http://www.w3.org/2000/svg", i);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Me(i) {
|
|
109
109
|
return document.createTextNode(i);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
return
|
|
111
|
+
function ie() {
|
|
112
|
+
return Me(" ");
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return
|
|
114
|
+
function Qn() {
|
|
115
|
+
return Me("");
|
|
116
116
|
}
|
|
117
117
|
function Y(i, e, t, n) {
|
|
118
118
|
return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Vn(i) {
|
|
121
121
|
return function(e) {
|
|
122
122
|
return e.preventDefault(), i.call(this, e);
|
|
123
123
|
};
|
|
@@ -125,39 +125,39 @@ function Gn(i) {
|
|
|
125
125
|
function p(i, e, t) {
|
|
126
126
|
t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Zn(i) {
|
|
129
129
|
return Array.from(i.childNodes);
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function Xe(i, e) {
|
|
132
132
|
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
133
133
|
e);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function gi(i, e) {
|
|
136
136
|
i.value = e ?? "";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ge(i, e, t) {
|
|
139
139
|
i.classList.toggle(e, !!t);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Hn(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
|
|
142
142
|
return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
|
|
143
143
|
}
|
|
144
|
-
let
|
|
145
|
-
function
|
|
146
|
-
|
|
144
|
+
let Ke;
|
|
145
|
+
function Ye(i) {
|
|
146
|
+
Ke = i;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
if (!
|
|
150
|
-
return
|
|
148
|
+
function Yi() {
|
|
149
|
+
if (!Ke) throw new Error("Function called outside component initialization");
|
|
150
|
+
return Ke;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
|
|
152
|
+
function Yn(i) {
|
|
153
|
+
Yi().$$.on_destroy.push(i);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
const i =
|
|
155
|
+
function Xi() {
|
|
156
|
+
const i = Yi();
|
|
157
157
|
return (e, t, { cancelable: n = !1 } = {}) => {
|
|
158
158
|
const r = i.$$.callbacks[e];
|
|
159
159
|
if (r) {
|
|
160
|
-
const o =
|
|
160
|
+
const o = Hn(
|
|
161
161
|
/** @type {string} */
|
|
162
162
|
e,
|
|
163
163
|
t,
|
|
@@ -170,142 +170,142 @@ function Zi() {
|
|
|
170
170
|
return !0;
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Xn(i, e) {
|
|
174
174
|
const t = i.$$.callbacks[e.type];
|
|
175
175
|
t && t.slice().forEach((n) => n.call(this, e));
|
|
176
176
|
}
|
|
177
|
-
const
|
|
178
|
-
let
|
|
179
|
-
const
|
|
180
|
-
let
|
|
181
|
-
function
|
|
182
|
-
|
|
177
|
+
const De = [], Ft = [];
|
|
178
|
+
let je = [];
|
|
179
|
+
const pi = [], Kn = /* @__PURE__ */ Promise.resolve();
|
|
180
|
+
let Ut = !1;
|
|
181
|
+
function Jn() {
|
|
182
|
+
Ut || (Ut = !0, Kn.then(Ki));
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
|
|
184
|
+
function Dt(i) {
|
|
185
|
+
je.push(i);
|
|
186
186
|
}
|
|
187
|
-
const
|
|
188
|
-
let
|
|
189
|
-
function
|
|
190
|
-
if (
|
|
187
|
+
const Wt = /* @__PURE__ */ new Set();
|
|
188
|
+
let Fe = 0;
|
|
189
|
+
function Ki() {
|
|
190
|
+
if (Fe !== 0)
|
|
191
191
|
return;
|
|
192
|
-
const i =
|
|
192
|
+
const i = Ke;
|
|
193
193
|
do {
|
|
194
194
|
try {
|
|
195
|
-
for (;
|
|
196
|
-
const e = Fe
|
|
197
|
-
|
|
195
|
+
for (; Fe < De.length; ) {
|
|
196
|
+
const e = De[Fe];
|
|
197
|
+
Fe++, Ye(e), $n(e.$$);
|
|
198
198
|
}
|
|
199
199
|
} catch (e) {
|
|
200
|
-
throw
|
|
200
|
+
throw De.length = 0, Fe = 0, e;
|
|
201
201
|
}
|
|
202
|
-
for (
|
|
203
|
-
for (let e = 0; e <
|
|
204
|
-
const t =
|
|
205
|
-
|
|
202
|
+
for (Ye(null), De.length = 0, Fe = 0; Ft.length; ) Ft.pop()();
|
|
203
|
+
for (let e = 0; e < je.length; e += 1) {
|
|
204
|
+
const t = je[e];
|
|
205
|
+
Wt.has(t) || (Wt.add(t), t());
|
|
206
206
|
}
|
|
207
|
-
|
|
208
|
-
} while (
|
|
209
|
-
for (;
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
je.length = 0;
|
|
208
|
+
} while (De.length);
|
|
209
|
+
for (; pi.length; )
|
|
210
|
+
pi.pop()();
|
|
211
|
+
Ut = !1, Wt.clear(), Ye(i);
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function $n(i) {
|
|
214
214
|
if (i.fragment !== null) {
|
|
215
|
-
i.update(),
|
|
215
|
+
i.update(), ve(i.before_update);
|
|
216
216
|
const e = i.dirty;
|
|
217
|
-
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(
|
|
217
|
+
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(Dt);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function er(i) {
|
|
221
221
|
const e = [], t = [];
|
|
222
|
-
|
|
222
|
+
je.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), je = e;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
225
|
-
let
|
|
226
|
-
function
|
|
227
|
-
|
|
224
|
+
const ft = /* @__PURE__ */ new Set();
|
|
225
|
+
let Ie;
|
|
226
|
+
function dt() {
|
|
227
|
+
Ie = {
|
|
228
228
|
r: 0,
|
|
229
229
|
c: [],
|
|
230
|
-
p:
|
|
230
|
+
p: Ie
|
|
231
231
|
// parent group
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
234
|
+
function ht() {
|
|
235
|
+
Ie.r || ve(Ie.c), Ie = Ie.p;
|
|
236
236
|
}
|
|
237
237
|
function Q(i, e) {
|
|
238
|
-
i && i.i && (
|
|
238
|
+
i && i.i && (ft.delete(i), i.i(e));
|
|
239
239
|
}
|
|
240
240
|
function X(i, e, t, n) {
|
|
241
241
|
if (i && i.o) {
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
if (ft.has(i)) return;
|
|
243
|
+
ft.add(i), Ie.c.push(() => {
|
|
244
|
+
ft.delete(i), n && (t && i.d(1), n());
|
|
245
245
|
}), i.o(e);
|
|
246
246
|
} else n && n();
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function yi(i) {
|
|
249
249
|
return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function tr(i, e) {
|
|
252
252
|
X(i, 1, 1, () => {
|
|
253
253
|
e.delete(i.key);
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
let d = i.length,
|
|
256
|
+
function ir(i, e, t, n, r, o, l, s, c, u, f, a) {
|
|
257
|
+
let d = i.length, m = o.length, g = d;
|
|
258
258
|
const y = {};
|
|
259
|
-
for (;
|
|
259
|
+
for (; g--; ) y[i[g].key] = g;
|
|
260
260
|
const v = [], b = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), E = [];
|
|
261
|
-
for (
|
|
262
|
-
const x = a(r, o,
|
|
261
|
+
for (g = m; g--; ) {
|
|
262
|
+
const x = a(r, o, g), S = t(x);
|
|
263
263
|
let N = l.get(S);
|
|
264
|
-
N ? E.push(() => N.p(x, e)) : (N = u(S, x), N.c()), b.set(S, v[
|
|
264
|
+
N ? E.push(() => N.p(x, e)) : (N = u(S, x), N.c()), b.set(S, v[g] = N), S in y && w.set(S, Math.abs(g - y[S]));
|
|
265
265
|
}
|
|
266
|
-
const L = /* @__PURE__ */ new Set(),
|
|
266
|
+
const L = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
|
|
267
267
|
function P(x) {
|
|
268
|
-
Q(x, 1), x.m(s, f), l.set(x.key, x), f = x.first,
|
|
268
|
+
Q(x, 1), x.m(s, f), l.set(x.key, x), f = x.first, m--;
|
|
269
269
|
}
|
|
270
|
-
for (; d &&
|
|
271
|
-
const x = v[
|
|
272
|
-
x === S ? (f = x.first, d--,
|
|
270
|
+
for (; d && m; ) {
|
|
271
|
+
const x = v[m - 1], S = i[d - 1], N = x.key, _ = S.key;
|
|
272
|
+
x === S ? (f = x.first, d--, m--) : b.has(_) ? !l.has(N) || L.has(N) ? P(x) : T.has(_) ? d-- : w.get(N) > w.get(_) ? (T.add(N), P(x)) : (L.add(_), d--) : (c(S, l), d--);
|
|
273
273
|
}
|
|
274
274
|
for (; d--; ) {
|
|
275
275
|
const x = i[d];
|
|
276
276
|
b.has(x.key) || c(x, l);
|
|
277
277
|
}
|
|
278
|
-
for (;
|
|
279
|
-
return
|
|
278
|
+
for (; m; ) P(v[m - 1]);
|
|
279
|
+
return ve(E), v;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function ke(i) {
|
|
282
282
|
i && i.c();
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function ye(i, e, t) {
|
|
285
285
|
const { fragment: n, after_update: r } = i.$$;
|
|
286
|
-
n && n.m(e, t),
|
|
287
|
-
const o = i.$$.on_mount.map(
|
|
288
|
-
i.$$.on_destroy ? i.$$.on_destroy.push(...o) :
|
|
289
|
-
}), r.forEach(
|
|
286
|
+
n && n.m(e, t), Dt(() => {
|
|
287
|
+
const o = i.$$.on_mount.map(Vi).filter(Zi);
|
|
288
|
+
i.$$.on_destroy ? i.$$.on_destroy.push(...o) : ve(o), i.$$.on_mount = [];
|
|
289
|
+
}), r.forEach(Dt);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function be(i, e) {
|
|
292
292
|
const t = i.$$;
|
|
293
|
-
t.fragment !== null && (
|
|
293
|
+
t.fragment !== null && (er(t.after_update), ve(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
i.$$.dirty[0] === -1 && (
|
|
295
|
+
function nr(i, e) {
|
|
296
|
+
i.$$.dirty[0] === -1 && (De.push(i), Jn(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
const c =
|
|
300
|
-
|
|
298
|
+
function We(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
299
|
+
const c = Ke;
|
|
300
|
+
Ye(i);
|
|
301
301
|
const u = i.$$ = {
|
|
302
302
|
fragment: null,
|
|
303
303
|
ctx: [],
|
|
304
304
|
// state
|
|
305
305
|
props: o,
|
|
306
|
-
update:
|
|
306
|
+
update: G,
|
|
307
307
|
not_equal: r,
|
|
308
|
-
bound:
|
|
308
|
+
bound: mi(),
|
|
309
309
|
// lifecycle
|
|
310
310
|
on_mount: [],
|
|
311
311
|
on_destroy: [],
|
|
@@ -314,27 +314,27 @@ function Te(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
|
314
314
|
after_update: [],
|
|
315
315
|
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
316
316
|
// everything else
|
|
317
|
-
callbacks:
|
|
317
|
+
callbacks: mi(),
|
|
318
318
|
dirty: s,
|
|
319
319
|
skip_bound: !1,
|
|
320
320
|
root: e.target || c.$$.root
|
|
321
321
|
};
|
|
322
322
|
l && l(u.root);
|
|
323
323
|
let f = !1;
|
|
324
|
-
if (u.ctx = t ? t(i, e.props || {}, (a, d, ...
|
|
325
|
-
const
|
|
326
|
-
return u.ctx && r(u.ctx[a], u.ctx[a] =
|
|
327
|
-
}) : [], u.update(), f = !0,
|
|
324
|
+
if (u.ctx = t ? t(i, e.props || {}, (a, d, ...m) => {
|
|
325
|
+
const g = m.length ? m[0] : d;
|
|
326
|
+
return u.ctx && r(u.ctx[a], u.ctx[a] = g) && (!u.skip_bound && u.bound[a] && u.bound[a](g), f && nr(i, a)), d;
|
|
327
|
+
}) : [], u.update(), f = !0, ve(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
|
328
328
|
if (e.hydrate) {
|
|
329
|
-
const a =
|
|
330
|
-
u.fragment && u.fragment.l(a), a.forEach(
|
|
329
|
+
const a = Zn(e.target);
|
|
330
|
+
u.fragment && u.fragment.l(a), a.forEach(U);
|
|
331
331
|
} else
|
|
332
332
|
u.fragment && u.fragment.c();
|
|
333
|
-
e.intro && Q(i.$$.fragment),
|
|
333
|
+
e.intro && Q(i.$$.fragment), ye(i, e.target, e.anchor), Ki();
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
Ye(c);
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class Ae {
|
|
338
338
|
constructor() {
|
|
339
339
|
/**
|
|
340
340
|
* ### PRIVATE API
|
|
@@ -355,7 +355,7 @@ class Ie {
|
|
|
355
355
|
}
|
|
356
356
|
/** @returns {void} */
|
|
357
357
|
$destroy() {
|
|
358
|
-
|
|
358
|
+
be(this, 1), this.$destroy = G;
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
361
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -364,8 +364,8 @@ class Ie {
|
|
|
364
364
|
* @returns {() => void}
|
|
365
365
|
*/
|
|
366
366
|
$on(e, t) {
|
|
367
|
-
if (!
|
|
368
|
-
return
|
|
367
|
+
if (!Zi(t))
|
|
368
|
+
return G;
|
|
369
369
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
370
370
|
return n.push(t), () => {
|
|
371
371
|
const r = n.indexOf(t);
|
|
@@ -377,60 +377,60 @@ class Ie {
|
|
|
377
377
|
* @returns {void}
|
|
378
378
|
*/
|
|
379
379
|
$set(e) {
|
|
380
|
-
this.$$set && !
|
|
380
|
+
this.$$set && !Un(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
385
|
-
function
|
|
383
|
+
const rr = "4";
|
|
384
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(rr);
|
|
385
|
+
function or(i) {
|
|
386
386
|
let e, t;
|
|
387
387
|
return {
|
|
388
388
|
c() {
|
|
389
389
|
e = ge("svg"), t = ge("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");
|
|
390
390
|
},
|
|
391
391
|
m(n, r) {
|
|
392
|
-
|
|
392
|
+
j(n, e, r), O(e, t);
|
|
393
393
|
},
|
|
394
|
-
p:
|
|
395
|
-
i:
|
|
396
|
-
o:
|
|
394
|
+
p: G,
|
|
395
|
+
i: G,
|
|
396
|
+
o: G,
|
|
397
397
|
d(n) {
|
|
398
|
-
n &&
|
|
398
|
+
n && U(e);
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Ji extends Ae {
|
|
403
403
|
constructor(e) {
|
|
404
|
-
super(),
|
|
404
|
+
super(), We(this, e, null, or, ze, {});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function sr(i) {
|
|
408
408
|
let e, t;
|
|
409
409
|
return {
|
|
410
410
|
c() {
|
|
411
411
|
e = ge("svg"), t = ge("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");
|
|
412
412
|
},
|
|
413
413
|
m(n, r) {
|
|
414
|
-
|
|
414
|
+
j(n, e, r), O(e, t);
|
|
415
415
|
},
|
|
416
|
-
p:
|
|
417
|
-
i:
|
|
418
|
-
o:
|
|
416
|
+
p: G,
|
|
417
|
+
i: G,
|
|
418
|
+
o: G,
|
|
419
419
|
d(n) {
|
|
420
|
-
n &&
|
|
420
|
+
n && U(e);
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class $i extends Ae {
|
|
425
425
|
constructor(e) {
|
|
426
|
-
super(),
|
|
426
|
+
super(), We(this, e, null, sr, ze, {});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function lr(i) {
|
|
430
430
|
let e, t;
|
|
431
431
|
return {
|
|
432
432
|
c() {
|
|
433
|
-
e =
|
|
433
|
+
e = A("img"), $(e.src, t = /*iconsBaseUrl*/
|
|
434
434
|
i[3] + "area.svg") || p(e, "src", t), p(
|
|
435
435
|
e,
|
|
436
436
|
"alt",
|
|
@@ -444,11 +444,11 @@ function nr(i) {
|
|
|
444
444
|
), p(e, "class", "svelte-z7p9pp");
|
|
445
445
|
},
|
|
446
446
|
m(n, r) {
|
|
447
|
-
|
|
447
|
+
j(n, e, r);
|
|
448
448
|
},
|
|
449
449
|
p(n, r) {
|
|
450
450
|
r & /*iconsBaseUrl*/
|
|
451
|
-
8 &&
|
|
451
|
+
8 && !$(e.src, t = /*iconsBaseUrl*/
|
|
452
452
|
n[3] + "area.svg") && p(e, "src", t), r & /*placeType*/
|
|
453
453
|
64 && p(
|
|
454
454
|
e,
|
|
@@ -464,15 +464,15 @@ function nr(i) {
|
|
|
464
464
|
);
|
|
465
465
|
},
|
|
466
466
|
d(n) {
|
|
467
|
-
n &&
|
|
467
|
+
n && U(e);
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function ur(i) {
|
|
472
472
|
let e, t;
|
|
473
473
|
return {
|
|
474
474
|
c() {
|
|
475
|
-
e =
|
|
475
|
+
e = A("img"), $(e.src, t = /*iconsBaseUrl*/
|
|
476
476
|
i[3] + "reverse.svg") || p(e, "src", t), p(
|
|
477
477
|
e,
|
|
478
478
|
"alt",
|
|
@@ -486,11 +486,11 @@ function rr(i) {
|
|
|
486
486
|
), p(e, "class", "svelte-z7p9pp");
|
|
487
487
|
},
|
|
488
488
|
m(n, r) {
|
|
489
|
-
|
|
489
|
+
j(n, e, r);
|
|
490
490
|
},
|
|
491
491
|
p(n, r) {
|
|
492
492
|
r & /*iconsBaseUrl*/
|
|
493
|
-
8 &&
|
|
493
|
+
8 && !$(e.src, t = /*iconsBaseUrl*/
|
|
494
494
|
n[3] + "reverse.svg") && p(e, "src", t), r & /*placeType*/
|
|
495
495
|
64 && p(
|
|
496
496
|
e,
|
|
@@ -506,15 +506,15 @@ function rr(i) {
|
|
|
506
506
|
);
|
|
507
507
|
},
|
|
508
508
|
d(n) {
|
|
509
|
-
n &&
|
|
509
|
+
n && U(e);
|
|
510
510
|
}
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function ar(i) {
|
|
514
514
|
let e, t;
|
|
515
515
|
return {
|
|
516
516
|
c() {
|
|
517
|
-
e =
|
|
517
|
+
e = A("img"), $(e.src, t = /*iconsBaseUrl*/
|
|
518
518
|
i[3] + "poi.svg") || p(e, "src", t), p(
|
|
519
519
|
e,
|
|
520
520
|
"alt",
|
|
@@ -528,11 +528,11 @@ function or(i) {
|
|
|
528
528
|
), p(e, "class", "svelte-z7p9pp");
|
|
529
529
|
},
|
|
530
530
|
m(n, r) {
|
|
531
|
-
|
|
531
|
+
j(n, e, r);
|
|
532
532
|
},
|
|
533
533
|
p(n, r) {
|
|
534
534
|
r & /*iconsBaseUrl*/
|
|
535
|
-
8 &&
|
|
535
|
+
8 && !$(e.src, t = /*iconsBaseUrl*/
|
|
536
536
|
n[3] + "poi.svg") && p(e, "src", t), r & /*placeType*/
|
|
537
537
|
64 && p(
|
|
538
538
|
e,
|
|
@@ -548,15 +548,15 @@ function or(i) {
|
|
|
548
548
|
);
|
|
549
549
|
},
|
|
550
550
|
d(n) {
|
|
551
|
-
n &&
|
|
551
|
+
n && U(e);
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function cr(i) {
|
|
556
556
|
let e, t;
|
|
557
557
|
return {
|
|
558
558
|
c() {
|
|
559
|
-
e =
|
|
559
|
+
e = A("img"), $(e.src, t = /*iconsBaseUrl*/
|
|
560
560
|
i[3] + "postal_code.svg") || p(e, "src", t), p(
|
|
561
561
|
e,
|
|
562
562
|
"alt",
|
|
@@ -570,11 +570,11 @@ function sr(i) {
|
|
|
570
570
|
), p(e, "class", "svelte-z7p9pp");
|
|
571
571
|
},
|
|
572
572
|
m(n, r) {
|
|
573
|
-
|
|
573
|
+
j(n, e, r);
|
|
574
574
|
},
|
|
575
575
|
p(n, r) {
|
|
576
576
|
r & /*iconsBaseUrl*/
|
|
577
|
-
8 &&
|
|
577
|
+
8 && !$(e.src, t = /*iconsBaseUrl*/
|
|
578
578
|
n[3] + "postal_code.svg") && p(e, "src", t), r & /*placeType*/
|
|
579
579
|
64 && p(
|
|
580
580
|
e,
|
|
@@ -590,15 +590,15 @@ function sr(i) {
|
|
|
590
590
|
);
|
|
591
591
|
},
|
|
592
592
|
d(n) {
|
|
593
|
-
n &&
|
|
593
|
+
n && U(e);
|
|
594
594
|
}
|
|
595
595
|
};
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function fr(i) {
|
|
598
598
|
let e, t;
|
|
599
599
|
return {
|
|
600
600
|
c() {
|
|
601
|
-
e =
|
|
601
|
+
e = A("img"), $(e.src, t = /*iconsBaseUrl*/
|
|
602
602
|
i[3] + "street.svg") || p(e, "src", t), p(
|
|
603
603
|
e,
|
|
604
604
|
"alt",
|
|
@@ -612,11 +612,11 @@ function lr(i) {
|
|
|
612
612
|
), p(e, "class", "svelte-z7p9pp");
|
|
613
613
|
},
|
|
614
614
|
m(n, r) {
|
|
615
|
-
|
|
615
|
+
j(n, e, r);
|
|
616
616
|
},
|
|
617
617
|
p(n, r) {
|
|
618
618
|
r & /*iconsBaseUrl*/
|
|
619
|
-
8 &&
|
|
619
|
+
8 && !$(e.src, t = /*iconsBaseUrl*/
|
|
620
620
|
n[3] + "street.svg") && p(e, "src", t), r & /*placeType*/
|
|
621
621
|
64 && p(
|
|
622
622
|
e,
|
|
@@ -632,15 +632,15 @@ function lr(i) {
|
|
|
632
632
|
);
|
|
633
633
|
},
|
|
634
634
|
d(n) {
|
|
635
|
-
n &&
|
|
635
|
+
n && U(e);
|
|
636
636
|
}
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function dr(i) {
|
|
640
640
|
let e, t;
|
|
641
641
|
return {
|
|
642
642
|
c() {
|
|
643
|
-
e =
|
|
643
|
+
e = A("img"), $(e.src, t = /*iconsBaseUrl*/
|
|
644
644
|
i[3] + "road.svg") || p(e, "src", t), p(
|
|
645
645
|
e,
|
|
646
646
|
"alt",
|
|
@@ -654,11 +654,11 @@ function ur(i) {
|
|
|
654
654
|
), p(e, "class", "svelte-z7p9pp");
|
|
655
655
|
},
|
|
656
656
|
m(n, r) {
|
|
657
|
-
|
|
657
|
+
j(n, e, r);
|
|
658
658
|
},
|
|
659
659
|
p(n, r) {
|
|
660
660
|
r & /*iconsBaseUrl*/
|
|
661
|
-
8 &&
|
|
661
|
+
8 && !$(e.src, t = /*iconsBaseUrl*/
|
|
662
662
|
n[3] + "road.svg") && p(e, "src", t), r & /*placeType*/
|
|
663
663
|
64 && p(
|
|
664
664
|
e,
|
|
@@ -674,15 +674,15 @@ function ur(i) {
|
|
|
674
674
|
);
|
|
675
675
|
},
|
|
676
676
|
d(n) {
|
|
677
|
-
n &&
|
|
677
|
+
n && U(e);
|
|
678
678
|
}
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function hr(i) {
|
|
682
682
|
let e, t;
|
|
683
683
|
return {
|
|
684
684
|
c() {
|
|
685
|
-
e =
|
|
685
|
+
e = A("img"), $(e.src, t = /*iconsBaseUrl*/
|
|
686
686
|
i[3] + "housenumber.svg") || p(e, "src", t), p(
|
|
687
687
|
e,
|
|
688
688
|
"alt",
|
|
@@ -696,11 +696,11 @@ function ar(i) {
|
|
|
696
696
|
), p(e, "class", "svelte-z7p9pp");
|
|
697
697
|
},
|
|
698
698
|
m(n, r) {
|
|
699
|
-
|
|
699
|
+
j(n, e, r);
|
|
700
700
|
},
|
|
701
701
|
p(n, r) {
|
|
702
702
|
r & /*iconsBaseUrl*/
|
|
703
|
-
8 &&
|
|
703
|
+
8 && !$(e.src, t = /*iconsBaseUrl*/
|
|
704
704
|
n[3] + "housenumber.svg") && p(e, "src", t), r & /*placeType*/
|
|
705
705
|
64 && p(
|
|
706
706
|
e,
|
|
@@ -716,15 +716,15 @@ function ar(i) {
|
|
|
716
716
|
);
|
|
717
717
|
},
|
|
718
718
|
d(n) {
|
|
719
|
-
n &&
|
|
719
|
+
n && U(e);
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function mr(i) {
|
|
724
724
|
let e, t, n, r;
|
|
725
725
|
return {
|
|
726
726
|
c() {
|
|
727
|
-
e =
|
|
727
|
+
e = A("img"), $(e.src, t = /*imageUrl*/
|
|
728
728
|
i[5]) || p(e, "src", t), p(
|
|
729
729
|
e,
|
|
730
730
|
"alt",
|
|
@@ -738,7 +738,7 @@ function cr(i) {
|
|
|
738
738
|
), p(e, "class", "svelte-z7p9pp");
|
|
739
739
|
},
|
|
740
740
|
m(o, l) {
|
|
741
|
-
|
|
741
|
+
j(o, e, l), n || (r = Y(
|
|
742
742
|
e,
|
|
743
743
|
"error",
|
|
744
744
|
/*error_handler*/
|
|
@@ -747,7 +747,7 @@ function cr(i) {
|
|
|
747
747
|
},
|
|
748
748
|
p(o, l) {
|
|
749
749
|
l & /*imageUrl*/
|
|
750
|
-
32 &&
|
|
750
|
+
32 && !$(e.src, t = /*imageUrl*/
|
|
751
751
|
o[5]) && p(e, "src", t), l & /*category*/
|
|
752
752
|
16 && p(
|
|
753
753
|
e,
|
|
@@ -763,36 +763,36 @@ function cr(i) {
|
|
|
763
763
|
);
|
|
764
764
|
},
|
|
765
765
|
d(o) {
|
|
766
|
-
o &&
|
|
766
|
+
o && U(e), n = !1, r();
|
|
767
767
|
}
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function bi(i) {
|
|
771
771
|
let e, t;
|
|
772
772
|
return {
|
|
773
773
|
c() {
|
|
774
|
-
e =
|
|
774
|
+
e = A("span"), t = Me(
|
|
775
775
|
/*placeType*/
|
|
776
776
|
i[6]
|
|
777
777
|
), p(e, "class", "secondary svelte-z7p9pp");
|
|
778
778
|
},
|
|
779
779
|
m(n, r) {
|
|
780
|
-
|
|
780
|
+
j(n, e, r), O(e, t);
|
|
781
781
|
},
|
|
782
782
|
p(n, r) {
|
|
783
783
|
r & /*placeType*/
|
|
784
|
-
64 &&
|
|
784
|
+
64 && Xe(
|
|
785
785
|
t,
|
|
786
786
|
/*placeType*/
|
|
787
787
|
n[6]
|
|
788
788
|
);
|
|
789
789
|
},
|
|
790
790
|
d(n) {
|
|
791
|
-
n &&
|
|
791
|
+
n && U(e);
|
|
792
792
|
}
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function gr(i) {
|
|
796
796
|
let e, t, n, r, o, l, s, c, u, f = (
|
|
797
797
|
/*isReverse*/
|
|
798
798
|
(i[8] ? (
|
|
@@ -802,7 +802,7 @@ function fr(i) {
|
|
|
802
802
|
/*feature*/
|
|
803
803
|
i[0].place_name.replace(/,.*/, "")
|
|
804
804
|
)) + ""
|
|
805
|
-
), a, d,
|
|
805
|
+
), a, d, m = (
|
|
806
806
|
/*showPlaceType*/
|
|
807
807
|
i[2] === "always" || /*showPlaceType*/
|
|
808
808
|
i[2] !== "never" && !/*feature*/
|
|
@@ -813,43 +813,43 @@ function fr(i) {
|
|
|
813
813
|
i[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
814
814
|
i[5]) && !/*isReverse*/
|
|
815
815
|
i[8]
|
|
816
|
-
),
|
|
816
|
+
), g, y, v = (
|
|
817
817
|
/*isReverse*/
|
|
818
818
|
(i[8] ? "" : (
|
|
819
819
|
/*feature*/
|
|
820
820
|
i[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
821
821
|
)) + ""
|
|
822
|
-
), b, w, E, L,
|
|
823
|
-
function x(M,
|
|
824
|
-
return
|
|
825
|
-
1 && (t = null),
|
|
826
|
-
1 && (n = null),
|
|
827
|
-
1 && (r = null),
|
|
822
|
+
), b, w, E, L, T, P;
|
|
823
|
+
function x(M, I) {
|
|
824
|
+
return I & /*feature*/
|
|
825
|
+
1 && (t = null), I & /*feature*/
|
|
826
|
+
1 && (n = null), I & /*feature*/
|
|
827
|
+
1 && (r = null), I & /*feature*/
|
|
828
828
|
1 && (o = null), /*imageUrl*/
|
|
829
|
-
M[5] ?
|
|
829
|
+
M[5] ? mr : (
|
|
830
830
|
/*feature*/
|
|
831
|
-
M[0].address ?
|
|
832
|
-
M[0].id.startsWith("road.")), t ?
|
|
833
|
-
M[0].id.startsWith("address.")), n ?
|
|
834
|
-
M[0].id.startsWith("postal_code.")), r ?
|
|
835
|
-
M[0].id.startsWith("poi.")), o ?
|
|
831
|
+
M[0].address ? hr : (t == null && (t = !!/*feature*/
|
|
832
|
+
M[0].id.startsWith("road.")), t ? dr : (n == null && (n = !!/*feature*/
|
|
833
|
+
M[0].id.startsWith("address.")), n ? fr : (r == null && (r = !!/*feature*/
|
|
834
|
+
M[0].id.startsWith("postal_code.")), r ? cr : (o == null && (o = !!/*feature*/
|
|
835
|
+
M[0].id.startsWith("poi.")), o ? ar : (
|
|
836
836
|
/*isReverse*/
|
|
837
|
-
M[8] ?
|
|
837
|
+
M[8] ? ur : lr
|
|
838
838
|
)))))
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
|
-
let S = x(i, -1), N = S(i), _ =
|
|
841
|
+
let S = x(i, -1), N = S(i), _ = m && bi(i);
|
|
842
842
|
return {
|
|
843
843
|
c() {
|
|
844
|
-
e =
|
|
844
|
+
e = A("li"), N.c(), l = ie(), s = A("span"), c = A("span"), u = A("span"), a = Me(f), d = ie(), _ && _.c(), g = ie(), y = A("span"), b = Me(v), p(u, "class", "primary svelte-z7p9pp"), p(c, "class", "svelte-z7p9pp"), p(y, "class", "line2 svelte-z7p9pp"), p(s, "class", "texts svelte-z7p9pp"), p(e, "tabindex", "-1"), p(e, "role", "option"), p(e, "aria-selected", w = /*style*/
|
|
845
845
|
i[1] === "selected"), p(e, "aria-checked", E = /*style*/
|
|
846
|
-
i[1] === "picked"), p(e, "class", L =
|
|
846
|
+
i[1] === "picked"), p(e, "class", L = gt(
|
|
847
847
|
/*style*/
|
|
848
848
|
i[1]
|
|
849
849
|
) + " svelte-z7p9pp");
|
|
850
850
|
},
|
|
851
|
-
m(M,
|
|
852
|
-
|
|
851
|
+
m(M, I) {
|
|
852
|
+
j(M, e, I), N.m(e, null), O(e, l), O(e, s), O(s, c), O(c, u), O(u, a), O(c, d), _ && _.m(c, null), O(s, g), O(s, y), O(y, b), T || (P = [
|
|
853
853
|
Y(
|
|
854
854
|
e,
|
|
855
855
|
"mouseenter",
|
|
@@ -868,10 +868,10 @@ function fr(i) {
|
|
|
868
868
|
/*click_handler*/
|
|
869
869
|
i[16]
|
|
870
870
|
)
|
|
871
|
-
],
|
|
871
|
+
], T = !0);
|
|
872
872
|
},
|
|
873
|
-
p(M, [
|
|
874
|
-
S === (S = x(M,
|
|
873
|
+
p(M, [I]) {
|
|
874
|
+
S === (S = x(M, I)) && N ? N.p(M, I) : (N.d(1), N = S(M), N && (N.c(), N.m(e, l))), I & /*feature*/
|
|
875
875
|
1 && f !== (f = /*isReverse*/
|
|
876
876
|
(M[8] ? (
|
|
877
877
|
/*feature*/
|
|
@@ -879,8 +879,8 @@ function fr(i) {
|
|
|
879
879
|
) : (
|
|
880
880
|
/*feature*/
|
|
881
881
|
M[0].place_name.replace(/,.*/, "")
|
|
882
|
-
)) + "") &&
|
|
883
|
-
37 && (
|
|
882
|
+
)) + "") && Xe(a, f), I & /*showPlaceType, feature, imageUrl*/
|
|
883
|
+
37 && (m = /*showPlaceType*/
|
|
884
884
|
M[2] === "always" || /*showPlaceType*/
|
|
885
885
|
M[2] !== "never" && !/*feature*/
|
|
886
886
|
M[0].address && !/*feature*/
|
|
@@ -889,38 +889,38 @@ function fr(i) {
|
|
|
889
889
|
M[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
890
890
|
M[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
891
891
|
M[5]) && !/*isReverse*/
|
|
892
|
-
M[8]),
|
|
892
|
+
M[8]), m ? _ ? _.p(M, I) : (_ = bi(M), _.c(), _.m(c, null)) : _ && (_.d(1), _ = null), I & /*feature*/
|
|
893
893
|
1 && v !== (v = /*isReverse*/
|
|
894
894
|
(M[8] ? "" : (
|
|
895
895
|
/*feature*/
|
|
896
896
|
M[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
897
|
-
)) + "") &&
|
|
897
|
+
)) + "") && Xe(b, v), I & /*style*/
|
|
898
898
|
2 && w !== (w = /*style*/
|
|
899
|
-
M[1] === "selected") && p(e, "aria-selected", w),
|
|
899
|
+
M[1] === "selected") && p(e, "aria-selected", w), I & /*style*/
|
|
900
900
|
2 && E !== (E = /*style*/
|
|
901
|
-
M[1] === "picked") && p(e, "aria-checked", E),
|
|
902
|
-
2 && L !== (L =
|
|
901
|
+
M[1] === "picked") && p(e, "aria-checked", E), I & /*style*/
|
|
902
|
+
2 && L !== (L = gt(
|
|
903
903
|
/*style*/
|
|
904
904
|
M[1]
|
|
905
905
|
) + " svelte-z7p9pp") && p(e, "class", L);
|
|
906
906
|
},
|
|
907
|
-
i:
|
|
908
|
-
o:
|
|
907
|
+
i: G,
|
|
908
|
+
o: G,
|
|
909
909
|
d(M) {
|
|
910
|
-
M &&
|
|
910
|
+
M && U(e), N.d(), _ && _.d(), T = !1, ve(P);
|
|
911
911
|
}
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
|
-
function
|
|
915
|
-
var
|
|
914
|
+
function pr(i, e, t) {
|
|
915
|
+
var T;
|
|
916
916
|
let n, r, { feature: o } = e, { style: l = "default" } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: u } = e;
|
|
917
|
-
const f =
|
|
918
|
-
let d,
|
|
917
|
+
const f = Xi(), a = (T = o.properties) == null ? void 0 : T.categories;
|
|
918
|
+
let d, m, g = 0, y = o.place_type[0] === "reverse";
|
|
919
919
|
function v() {
|
|
920
|
-
|
|
920
|
+
m && c.add(m), t(11, g++, g);
|
|
921
921
|
}
|
|
922
922
|
function b(P) {
|
|
923
|
-
|
|
923
|
+
Xn.call(this, i, P);
|
|
924
924
|
}
|
|
925
925
|
const w = () => v(), E = () => f("select", void 0), L = (P) => {
|
|
926
926
|
document.activeElement !== P.target && f("select", void 0);
|
|
@@ -932,8 +932,8 @@ function dr(i, e, t) {
|
|
|
932
932
|
if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
933
933
|
7224)
|
|
934
934
|
do
|
|
935
|
-
t(12, n--, n), t(4, d = a == null ? void 0 : a[n]), t(5,
|
|
936
|
-
while (n > -1 && (!
|
|
935
|
+
t(12, n--, n), t(4, d = a == null ? void 0 : a[n]), t(5, m = d ? u + d.replace(/ /g, "_") + ".svg" : void 0);
|
|
936
|
+
while (n > -1 && (!m || c.has(m)));
|
|
937
937
|
i.$$.dirty & /*feature*/
|
|
938
938
|
1 && t(6, r = ((x = (P = o.properties) == null ? void 0 : P.categories) == null ? void 0 : x.join(", ")) ?? ((N = (S = o.properties) == null ? void 0 : S.place_type_name) == null ? void 0 : N[0]) ?? o.place_type[0]);
|
|
939
939
|
}, t(12, n = (a == null ? void 0 : a.length) ?? 0), [
|
|
@@ -942,13 +942,13 @@ function dr(i, e, t) {
|
|
|
942
942
|
s,
|
|
943
943
|
u,
|
|
944
944
|
d,
|
|
945
|
-
|
|
945
|
+
m,
|
|
946
946
|
r,
|
|
947
947
|
f,
|
|
948
948
|
y,
|
|
949
949
|
v,
|
|
950
950
|
c,
|
|
951
|
-
|
|
951
|
+
g,
|
|
952
952
|
n,
|
|
953
953
|
b,
|
|
954
954
|
w,
|
|
@@ -956,9 +956,9 @@ function dr(i, e, t) {
|
|
|
956
956
|
L
|
|
957
957
|
];
|
|
958
958
|
}
|
|
959
|
-
class
|
|
959
|
+
class yr extends Ae {
|
|
960
960
|
constructor(e) {
|
|
961
|
-
super(),
|
|
961
|
+
super(), We(this, e, pr, gr, ze, {
|
|
962
962
|
feature: 0,
|
|
963
963
|
style: 1,
|
|
964
964
|
showPlaceType: 2,
|
|
@@ -967,92 +967,92 @@ class hr extends Ie {
|
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function br(i) {
|
|
971
971
|
let e;
|
|
972
972
|
return {
|
|
973
973
|
c() {
|
|
974
|
-
e =
|
|
974
|
+
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");
|
|
975
975
|
},
|
|
976
976
|
m(t, n) {
|
|
977
|
-
|
|
977
|
+
j(t, e, n);
|
|
978
978
|
},
|
|
979
|
-
p:
|
|
980
|
-
i:
|
|
981
|
-
o:
|
|
979
|
+
p: G,
|
|
980
|
+
i: G,
|
|
981
|
+
o: G,
|
|
982
982
|
d(t) {
|
|
983
|
-
t &&
|
|
983
|
+
t && U(e);
|
|
984
984
|
}
|
|
985
985
|
};
|
|
986
986
|
}
|
|
987
|
-
class
|
|
987
|
+
class vr extends Ae {
|
|
988
988
|
constructor(e) {
|
|
989
|
-
super(),
|
|
989
|
+
super(), We(this, e, null, br, ze, {});
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function wr(i) {
|
|
993
993
|
let e, t;
|
|
994
994
|
return {
|
|
995
995
|
c() {
|
|
996
996
|
e = ge("svg"), t = ge("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");
|
|
997
997
|
},
|
|
998
998
|
m(n, r) {
|
|
999
|
-
|
|
999
|
+
j(n, e, r), O(e, t);
|
|
1000
1000
|
},
|
|
1001
|
-
p:
|
|
1002
|
-
i:
|
|
1003
|
-
o:
|
|
1001
|
+
p: G,
|
|
1002
|
+
i: G,
|
|
1003
|
+
o: G,
|
|
1004
1004
|
d(n) {
|
|
1005
|
-
n &&
|
|
1005
|
+
n && U(e);
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
1008
|
}
|
|
1009
|
-
class
|
|
1009
|
+
class _r extends Ae {
|
|
1010
1010
|
constructor(e) {
|
|
1011
|
-
super(),
|
|
1011
|
+
super(), We(this, e, null, wr, ze, {});
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function Er(i) {
|
|
1015
1015
|
let e, t, n;
|
|
1016
1016
|
return {
|
|
1017
1017
|
c() {
|
|
1018
1018
|
e = ge("svg"), t = ge("circle"), n = ge("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");
|
|
1019
1019
|
},
|
|
1020
1020
|
m(r, o) {
|
|
1021
|
-
|
|
1021
|
+
j(r, e, o), O(e, t), O(e, n);
|
|
1022
1022
|
},
|
|
1023
|
-
p:
|
|
1024
|
-
i:
|
|
1025
|
-
o:
|
|
1023
|
+
p: G,
|
|
1024
|
+
i: G,
|
|
1025
|
+
o: G,
|
|
1026
1026
|
d(r) {
|
|
1027
|
-
r &&
|
|
1027
|
+
r && U(e);
|
|
1028
1028
|
}
|
|
1029
1029
|
};
|
|
1030
1030
|
}
|
|
1031
|
-
class
|
|
1031
|
+
class Lr extends Ae {
|
|
1032
1032
|
constructor(e) {
|
|
1033
|
-
super(),
|
|
1033
|
+
super(), We(this, e, null, Er, ze, {});
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Sr(i, e, t) {
|
|
1037
1037
|
const n = e[1], r = e[0], o = n - r;
|
|
1038
1038
|
return i === n && t ? i : ((i - r) % o + o) % o + r;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function pt(i) {
|
|
1041
1041
|
const e = [...i];
|
|
1042
1042
|
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;
|
|
1043
1043
|
}
|
|
1044
|
-
let
|
|
1045
|
-
async function
|
|
1044
|
+
let Ve;
|
|
1045
|
+
async function xr(i, e, t) {
|
|
1046
1046
|
const n = i == null ? void 0 : i.getCenterAndZoom();
|
|
1047
1047
|
for (const r of e ?? [])
|
|
1048
1048
|
if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
|
|
1049
1049
|
if (r.type === "fixed")
|
|
1050
1050
|
return r.coordinates.join(",");
|
|
1051
1051
|
e: if (r.type === "client-geolocation") {
|
|
1052
|
-
if (
|
|
1053
|
-
if (!
|
|
1052
|
+
if (Ve && r.cachedLocationExpiry && Ve.time + r.cachedLocationExpiry > Date.now()) {
|
|
1053
|
+
if (!Ve.coords)
|
|
1054
1054
|
break e;
|
|
1055
|
-
return
|
|
1055
|
+
return Ve.coords;
|
|
1056
1056
|
}
|
|
1057
1057
|
let o;
|
|
1058
1058
|
try {
|
|
@@ -1073,7 +1073,7 @@ async function _r(i, e, t) {
|
|
|
1073
1073
|
}), o;
|
|
1074
1074
|
} catch {
|
|
1075
1075
|
} finally {
|
|
1076
|
-
r.cachedLocationExpiry && (
|
|
1076
|
+
r.cachedLocationExpiry && (Ve = {
|
|
1077
1077
|
time: Date.now(),
|
|
1078
1078
|
coords: o
|
|
1079
1079
|
});
|
|
@@ -1087,45 +1087,45 @@ async function _r(i, e, t) {
|
|
|
1087
1087
|
return n[1].toFixed(6) + "," + n[2].toFixed(6);
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
|
-
const
|
|
1091
|
-
function
|
|
1090
|
+
const Mr = /^(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, vi = /^([+-]?[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,})$/, wi = /^(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, _i = /^(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, Ei = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, Li = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
|
|
1091
|
+
function kr(i) {
|
|
1092
1092
|
if (!["DMS", "DM", "DD"].includes(i))
|
|
1093
1093
|
throw new Error("invalid format specified");
|
|
1094
1094
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
1095
|
-
const e = this.decimalCoordinates.split(",").map((
|
|
1095
|
+
const e = this.decimalCoordinates.split(",").map((m) => Number(m.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), o = Math.abs(n), l = t > 0 ? "N" : "S", s = n > 0 ? "E" : "W";
|
|
1096
1096
|
let c;
|
|
1097
1097
|
i == "DD" && (c = `${r}° ${l}, ${o}° ${s}`);
|
|
1098
1098
|
const u = Math.floor(r), f = Math.floor(o), a = (r - u) * 60, d = (o - f) * 60;
|
|
1099
1099
|
if (i == "DM") {
|
|
1100
|
-
let
|
|
1101
|
-
|
|
1100
|
+
let m = Si(a, 3).toFixed(3).padStart(6, "0"), g = Si(d, 3).toFixed(3).padStart(6, "0");
|
|
1101
|
+
m.endsWith(".000") && g.endsWith(".000") && (m = m.replace(/\.000$/, ""), g = g.replace(/\.000$/, "")), c = `${u}° ${m}' ${l}, ${f}° ${g}' ${s}`;
|
|
1102
1102
|
}
|
|
1103
1103
|
if (i == "DMS") {
|
|
1104
|
-
const
|
|
1105
|
-
let y = ((a -
|
|
1106
|
-
const b =
|
|
1104
|
+
const m = Math.floor(a), g = Math.floor(d);
|
|
1105
|
+
let y = ((a - m) * 60).toFixed(1).padStart(4, "0"), v = ((d - g) * 60).toFixed(1).padStart(4, "0");
|
|
1106
|
+
const b = m.toString().padStart(2, "0"), w = g.toString().padStart(2, "0");
|
|
1107
1107
|
y.endsWith(".0") && v.endsWith(".0") && (y = y.replace(/\.0$/, ""), v = v.replace(/\.0$/, "")), c = `${u}° ${b}' ${y}" ${l}, ${f}° ${w}' ${v}" ${s}`;
|
|
1108
1108
|
}
|
|
1109
1109
|
return c;
|
|
1110
1110
|
} else
|
|
1111
1111
|
throw new Error("no decimal coordinates to convert");
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Si(i, e) {
|
|
1114
1114
|
const t = Math.pow(10, e);
|
|
1115
1115
|
return Math.round((i + Number.EPSILON) * t) / t;
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function Ht(i, e) {
|
|
1118
1118
|
e || (e = 5), i = i.replace(/\s+/g, " ").trim();
|
|
1119
1119
|
let t = null, n = null, r = "", o = "", l = null, s = [], c = !1;
|
|
1120
|
-
if (
|
|
1120
|
+
if (Mr.test(i))
|
|
1121
1121
|
throw new Error("invalid coordinate value");
|
|
1122
|
-
if (
|
|
1123
|
-
if (s =
|
|
1122
|
+
if (vi.test(i))
|
|
1123
|
+
if (s = vi.exec(i), c = Ze(s), c)
|
|
1124
1124
|
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), n = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (n *= -1), l = "DM";
|
|
1125
1125
|
else
|
|
1126
1126
|
throw new Error("invalid coordinate format");
|
|
1127
|
-
else if (
|
|
1128
|
-
if (s =
|
|
1127
|
+
else if (wi.test(i))
|
|
1128
|
+
if (s = wi.exec(i), c = Ze(s), c) {
|
|
1129
1129
|
if (t = s[2], n = s[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), l = "DD", Number(Math.round(t)) == Number(t))
|
|
1130
1130
|
throw new Error("integer only coordinate provided");
|
|
1131
1131
|
if (Number(Math.round(n)) == Number(n))
|
|
@@ -1133,18 +1133,18 @@ function Qt(i, e) {
|
|
|
1133
1133
|
s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
|
|
1134
1134
|
} else
|
|
1135
1135
|
throw new Error("invalid decimal coordinate format");
|
|
1136
|
-
else if (
|
|
1137
|
-
if (s =
|
|
1136
|
+
else if (_i.test(i))
|
|
1137
|
+
if (s = _i.exec(i), c = Ze(s), c)
|
|
1138
1138
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[9])), s[11] && (n += s[11] / 60), s[13] && (n += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
|
|
1139
1139
|
else
|
|
1140
1140
|
throw new Error("invalid DMS coordinates format");
|
|
1141
|
-
else if (
|
|
1142
|
-
if (s =
|
|
1141
|
+
else if (Ei.test(i))
|
|
1142
|
+
if (s = Ei.exec(i), c = Ze(s), c)
|
|
1143
1143
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6] / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12] / 60), s[14] && (n += s[14] / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1144
1144
|
else
|
|
1145
1145
|
throw new Error("invalid DMS coordinates format");
|
|
1146
|
-
else if (
|
|
1147
|
-
if (s =
|
|
1146
|
+
else if (Li.test(i)) {
|
|
1147
|
+
if (s = Li.exec(i), c = Ze(s), s.filter((u) => u).length <= 5)
|
|
1148
1148
|
throw new Error("invalid coordinates format");
|
|
1149
1149
|
if (c)
|
|
1150
1150
|
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12].replace(",", ".") / 60), s[14] && (n += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
@@ -1165,20 +1165,20 @@ function Qt(i, e) {
|
|
|
1165
1165
|
u.test(r) && t > 0 && (t = -1 * t), u = /W|WEST/i, u.test(o) && n > 0 && (n = -1 * n);
|
|
1166
1166
|
const f = s[0].trim();
|
|
1167
1167
|
let a, d;
|
|
1168
|
-
const
|
|
1169
|
-
if (
|
|
1168
|
+
const m = /[,/;\u0020]/g, g = f.match(m);
|
|
1169
|
+
if (g == null) {
|
|
1170
1170
|
const b = Math.floor(i.length / 2);
|
|
1171
1171
|
a = f.substring(0, b).trim(), d = f.substring(b).trim();
|
|
1172
1172
|
} else {
|
|
1173
1173
|
let b;
|
|
1174
|
-
|
|
1174
|
+
g.length % 2 == 1 ? b = Math.floor(g.length / 2) : b = g.length / 2 - 1;
|
|
1175
1175
|
let w = 0;
|
|
1176
1176
|
if (b == 0)
|
|
1177
|
-
w = f.indexOf(
|
|
1177
|
+
w = f.indexOf(g[0]), a = f.substring(0, w).trim(), d = f.substring(w + 1).trim();
|
|
1178
1178
|
else {
|
|
1179
1179
|
let E = 0, L = 0;
|
|
1180
1180
|
for (; E <= b; )
|
|
1181
|
-
w = f.indexOf(
|
|
1181
|
+
w = f.indexOf(g[E], L), L = w + 1, E++;
|
|
1182
1182
|
a = f.substring(0, w).trim(), d = f.substring(w + 1).trim();
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
@@ -1198,13 +1198,13 @@ function Qt(i, e) {
|
|
|
1198
1198
|
decimalLongitude: n,
|
|
1199
1199
|
decimalCoordinates: `${t},${n}`,
|
|
1200
1200
|
originalFormat: l,
|
|
1201
|
-
closeEnough:
|
|
1202
|
-
toCoordinateFormat:
|
|
1201
|
+
closeEnough: Cr,
|
|
1202
|
+
toCoordinateFormat: kr
|
|
1203
1203
|
});
|
|
1204
1204
|
} else
|
|
1205
1205
|
throw new Error("coordinates pattern match failed");
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function Ze(i) {
|
|
1208
1208
|
if (!isNaN(i[0]))
|
|
1209
1209
|
return !1;
|
|
1210
1210
|
const e = [...i];
|
|
@@ -1223,28 +1223,28 @@ function qe(i) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
return !0;
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function xi(i, e) {
|
|
1227
1227
|
const t = Math.abs(i - e);
|
|
1228
1228
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1230
|
+
function Cr(i) {
|
|
1231
1231
|
if (!i)
|
|
1232
1232
|
throw new Error("coords must be provided");
|
|
1233
1233
|
if (i.includes(",")) {
|
|
1234
1234
|
const e = i.split(",");
|
|
1235
1235
|
if (Number(e[0]) == NaN || Number(e[1]) == NaN)
|
|
1236
1236
|
throw new Error("coords are not valid decimals");
|
|
1237
|
-
return
|
|
1237
|
+
return xi(this.decimalLatitude, Number(e[0])) && xi(this.decimalLongitude, e[1]);
|
|
1238
1238
|
} else
|
|
1239
1239
|
throw new Error("coords being tested must be separated by a comma");
|
|
1240
1240
|
}
|
|
1241
|
-
const
|
|
1241
|
+
const Pr = Object.freeze({
|
|
1242
1242
|
DMS: "DMS",
|
|
1243
1243
|
DM: "DM",
|
|
1244
1244
|
DD: "DD"
|
|
1245
1245
|
});
|
|
1246
|
-
|
|
1247
|
-
const
|
|
1246
|
+
Ht.to = Pr;
|
|
1247
|
+
const Nr = [
|
|
1248
1248
|
{
|
|
1249
1249
|
verbatimCoordinates: "40.123, -74.123",
|
|
1250
1250
|
verbatimLatitude: "40.123",
|
|
@@ -1385,10 +1385,10 @@ const Mr = [
|
|
|
1385
1385
|
verbatimLatitude: "40 7 22.8",
|
|
1386
1386
|
verbatimLongitude: "-74 7 22.8"
|
|
1387
1387
|
}
|
|
1388
|
-
],
|
|
1388
|
+
], Tr = {
|
|
1389
1389
|
decimalLatitude: 40.123,
|
|
1390
1390
|
decimalLongitude: -74.123
|
|
1391
|
-
},
|
|
1391
|
+
}, Rr = [
|
|
1392
1392
|
{
|
|
1393
1393
|
verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
|
|
1394
1394
|
verbatimLatitude: `50°4'17.698"south`,
|
|
@@ -1473,7 +1473,7 @@ const Mr = [
|
|
|
1473
1473
|
decimalLatitude: -18.4,
|
|
1474
1474
|
decimalLongitude: 22.75
|
|
1475
1475
|
}
|
|
1476
|
-
],
|
|
1476
|
+
], Ir = [
|
|
1477
1477
|
{
|
|
1478
1478
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1479
1479
|
verbatimLatitude: "10.432342S",
|
|
@@ -1608,27 +1608,27 @@ const Mr = [
|
|
|
1608
1608
|
decimalLongitude: 18.33453
|
|
1609
1609
|
}
|
|
1610
1610
|
];
|
|
1611
|
-
function
|
|
1611
|
+
function Or() {
|
|
1612
1612
|
const i = [];
|
|
1613
|
-
return
|
|
1614
|
-
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...
|
|
1615
|
-
}), [...i, ...
|
|
1616
|
-
}
|
|
1617
|
-
const
|
|
1618
|
-
|
|
1619
|
-
const
|
|
1620
|
-
function
|
|
1613
|
+
return Nr.forEach((e) => {
|
|
1614
|
+
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...Tr });
|
|
1615
|
+
}), [...i, ...Rr, ...Ir];
|
|
1616
|
+
}
|
|
1617
|
+
const zr = Or();
|
|
1618
|
+
Ht.formats = zr.map((i) => i.verbatimCoordinates);
|
|
1619
|
+
const Wr = Ht;
|
|
1620
|
+
function Mi(i, e, t) {
|
|
1621
1621
|
const n = i.slice();
|
|
1622
|
-
return n[
|
|
1622
|
+
return n[94] = e[t], n[96] = t, n;
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function ki(i) {
|
|
1625
1625
|
let e, t;
|
|
1626
|
-
return e = new
|
|
1626
|
+
return e = new vr({}), {
|
|
1627
1627
|
c() {
|
|
1628
|
-
|
|
1628
|
+
ke(e.$$.fragment);
|
|
1629
1629
|
},
|
|
1630
1630
|
m(n, r) {
|
|
1631
|
-
|
|
1631
|
+
ye(e, n, r), t = !0;
|
|
1632
1632
|
},
|
|
1633
1633
|
i(n) {
|
|
1634
1634
|
t || (Q(e.$$.fragment, n), t = !0);
|
|
@@ -1637,20 +1637,20 @@ function Si(i) {
|
|
|
1637
1637
|
X(e.$$.fragment, n), t = !1;
|
|
1638
1638
|
},
|
|
1639
1639
|
d(n) {
|
|
1640
|
-
|
|
1640
|
+
be(e, n);
|
|
1641
1641
|
}
|
|
1642
1642
|
};
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function Ci(i) {
|
|
1645
1645
|
let e, t, n, r, o;
|
|
1646
|
-
return t = new
|
|
1646
|
+
return t = new _r({}), {
|
|
1647
1647
|
c() {
|
|
1648
|
-
e =
|
|
1648
|
+
e = A("button"), ke(t.$$.fragment), p(e, "type", "button"), p(
|
|
1649
1649
|
e,
|
|
1650
1650
|
"title",
|
|
1651
1651
|
/*reverseButtonTitle*/
|
|
1652
1652
|
i[10]
|
|
1653
|
-
), p(e, "class", "svelte-bz0zu3"),
|
|
1653
|
+
), p(e, "class", "svelte-bz0zu3"), Ge(
|
|
1654
1654
|
e,
|
|
1655
1655
|
"active",
|
|
1656
1656
|
/*reverseActive*/
|
|
@@ -1658,11 +1658,11 @@ function xi(i) {
|
|
|
1658
1658
|
);
|
|
1659
1659
|
},
|
|
1660
1660
|
m(l, s) {
|
|
1661
|
-
|
|
1661
|
+
j(l, e, s), ye(t, e, null), n = !0, r || (o = Y(
|
|
1662
1662
|
e,
|
|
1663
1663
|
"click",
|
|
1664
1664
|
/*click_handler_3*/
|
|
1665
|
-
i[
|
|
1665
|
+
i[78]
|
|
1666
1666
|
), r = !0);
|
|
1667
1667
|
},
|
|
1668
1668
|
p(l, s) {
|
|
@@ -1673,7 +1673,7 @@ function xi(i) {
|
|
|
1673
1673
|
/*reverseButtonTitle*/
|
|
1674
1674
|
l[10]
|
|
1675
1675
|
), (!n || s[0] & /*reverseActive*/
|
|
1676
|
-
1) &&
|
|
1676
|
+
1) && Ge(
|
|
1677
1677
|
e,
|
|
1678
1678
|
"active",
|
|
1679
1679
|
/*reverseActive*/
|
|
@@ -1687,34 +1687,34 @@ function xi(i) {
|
|
|
1687
1687
|
X(t.$$.fragment, l), n = !1;
|
|
1688
1688
|
},
|
|
1689
1689
|
d(l) {
|
|
1690
|
-
l &&
|
|
1690
|
+
l && U(e), be(t), r = !1, o();
|
|
1691
1691
|
}
|
|
1692
1692
|
};
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1695
|
-
let e, t = [], n = /* @__PURE__ */ new Map(), r, o, l, s =
|
|
1694
|
+
function Ar(i) {
|
|
1695
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), r, o, l, s = yi(
|
|
1696
1696
|
/*listFeatures*/
|
|
1697
1697
|
i[13]
|
|
1698
1698
|
);
|
|
1699
1699
|
const c = (u) => (
|
|
1700
1700
|
/*feature*/
|
|
1701
|
-
u[
|
|
1702
|
-
(u[
|
|
1703
|
-
u[
|
|
1701
|
+
u[94].id + /*feature*/
|
|
1702
|
+
(u[94].address ? "," + /*feature*/
|
|
1703
|
+
u[94].address : "")
|
|
1704
1704
|
);
|
|
1705
1705
|
for (let u = 0; u < s.length; u += 1) {
|
|
1706
|
-
let f =
|
|
1707
|
-
n.set(a, t[u] =
|
|
1706
|
+
let f = Mi(i, s, u), a = c(f);
|
|
1707
|
+
n.set(a, t[u] = Pi(a, f));
|
|
1708
1708
|
}
|
|
1709
1709
|
return {
|
|
1710
1710
|
c() {
|
|
1711
|
-
e =
|
|
1711
|
+
e = A("ul");
|
|
1712
1712
|
for (let u = 0; u < t.length; u += 1)
|
|
1713
1713
|
t[u].c();
|
|
1714
1714
|
p(e, "class", "options svelte-bz0zu3"), p(e, "role", "listbox");
|
|
1715
1715
|
},
|
|
1716
1716
|
m(u, f) {
|
|
1717
|
-
|
|
1717
|
+
j(u, e, f);
|
|
1718
1718
|
for (let a = 0; a < t.length; a += 1)
|
|
1719
1719
|
t[a] && t[a].m(e, null);
|
|
1720
1720
|
r = !0, o || (l = [
|
|
@@ -1728,7 +1728,7 @@ function Ir(i) {
|
|
|
1728
1728
|
e,
|
|
1729
1729
|
"blur",
|
|
1730
1730
|
/*blur_handler_1*/
|
|
1731
|
-
i[
|
|
1731
|
+
i[82]
|
|
1732
1732
|
),
|
|
1733
1733
|
Y(
|
|
1734
1734
|
e,
|
|
@@ -1740,10 +1740,10 @@ function Ir(i) {
|
|
|
1740
1740
|
},
|
|
1741
1741
|
p(u, f) {
|
|
1742
1742
|
f[0] & /*listFeatures, showPlaceType, selectedItemIndex, picked, missingIconsCache, iconsBaseUrl, handleMouseEnter, pick*/
|
|
1743
|
-
102823936 && (s =
|
|
1743
|
+
102823936 && (s = yi(
|
|
1744
1744
|
/*listFeatures*/
|
|
1745
1745
|
u[13]
|
|
1746
|
-
),
|
|
1746
|
+
), dt(), t = ir(t, f, c, 1, u, s, n, e, tr, Pi, null, Mi), ht());
|
|
1747
1747
|
},
|
|
1748
1748
|
i(u) {
|
|
1749
1749
|
if (!r) {
|
|
@@ -1758,28 +1758,28 @@ function Ir(i) {
|
|
|
1758
1758
|
r = !1;
|
|
1759
1759
|
},
|
|
1760
1760
|
d(u) {
|
|
1761
|
-
u &&
|
|
1761
|
+
u && U(e);
|
|
1762
1762
|
for (let f = 0; f < t.length; f += 1)
|
|
1763
1763
|
t[f].d();
|
|
1764
|
-
o = !1,
|
|
1764
|
+
o = !1, ve(l);
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function Br(i) {
|
|
1769
1769
|
let e, t, n, r, o, l;
|
|
1770
|
-
return t = new
|
|
1770
|
+
return t = new $i({}), {
|
|
1771
1771
|
c() {
|
|
1772
|
-
e =
|
|
1772
|
+
e = A("div"), ke(t.$$.fragment), n = ie(), r = A("div"), o = Me(
|
|
1773
1773
|
/*noResultsMessage*/
|
|
1774
1774
|
i[8]
|
|
1775
1775
|
), p(r, "class", "svelte-bz0zu3"), p(e, "class", "no-results svelte-bz0zu3");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(s, c) {
|
|
1778
|
-
|
|
1778
|
+
j(s, e, c), ye(t, e, null), O(e, n), O(e, r), O(r, o), l = !0;
|
|
1779
1779
|
},
|
|
1780
1780
|
p(s, c) {
|
|
1781
1781
|
(!l || c[0] & /*noResultsMessage*/
|
|
1782
|
-
256) &&
|
|
1782
|
+
256) && Xe(
|
|
1783
1783
|
o,
|
|
1784
1784
|
/*noResultsMessage*/
|
|
1785
1785
|
s[8]
|
|
@@ -1792,47 +1792,47 @@ function Or(i) {
|
|
|
1792
1792
|
X(t.$$.fragment, s), l = !1;
|
|
1793
1793
|
},
|
|
1794
1794
|
d(s) {
|
|
1795
|
-
s &&
|
|
1795
|
+
s && U(e), be(t);
|
|
1796
1796
|
}
|
|
1797
1797
|
};
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1799
|
+
function Fr(i) {
|
|
1800
1800
|
let e = "", t;
|
|
1801
1801
|
return {
|
|
1802
1802
|
c() {
|
|
1803
|
-
t =
|
|
1803
|
+
t = Me(e);
|
|
1804
1804
|
},
|
|
1805
1805
|
m(n, r) {
|
|
1806
|
-
|
|
1806
|
+
j(n, t, r);
|
|
1807
1807
|
},
|
|
1808
|
-
p:
|
|
1809
|
-
i:
|
|
1810
|
-
o:
|
|
1808
|
+
p: G,
|
|
1809
|
+
i: G,
|
|
1810
|
+
o: G,
|
|
1811
1811
|
d(n) {
|
|
1812
|
-
n &&
|
|
1812
|
+
n && U(t);
|
|
1813
1813
|
}
|
|
1814
1814
|
};
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function Ur(i) {
|
|
1817
1817
|
let e, t, n, r, o, l, s, c, u, f, a;
|
|
1818
|
-
return t = new
|
|
1818
|
+
return t = new $i({}), c = new Ji({}), {
|
|
1819
1819
|
c() {
|
|
1820
|
-
e =
|
|
1820
|
+
e = A("div"), ke(t.$$.fragment), n = ie(), r = A("div"), o = Me(
|
|
1821
1821
|
/*errorMessage*/
|
|
1822
1822
|
i[7]
|
|
1823
|
-
), l =
|
|
1823
|
+
), l = ie(), s = A("button"), ke(c.$$.fragment), p(r, "class", "svelte-bz0zu3"), p(s, "class", "svelte-bz0zu3"), p(e, "class", "error svelte-bz0zu3");
|
|
1824
1824
|
},
|
|
1825
|
-
m(d,
|
|
1826
|
-
|
|
1825
|
+
m(d, m) {
|
|
1826
|
+
j(d, e, m), ye(t, e, null), O(e, n), O(e, r), O(r, o), O(e, l), O(e, s), ye(c, s, null), u = !0, f || (a = Y(
|
|
1827
1827
|
s,
|
|
1828
1828
|
"click",
|
|
1829
1829
|
/*click_handler_4*/
|
|
1830
|
-
i[
|
|
1830
|
+
i[79]
|
|
1831
1831
|
), f = !0);
|
|
1832
1832
|
},
|
|
1833
|
-
p(d,
|
|
1834
|
-
(!u ||
|
|
1835
|
-
128) &&
|
|
1833
|
+
p(d, m) {
|
|
1834
|
+
(!u || m[0] & /*errorMessage*/
|
|
1835
|
+
128) && Xe(
|
|
1836
1836
|
o,
|
|
1837
1837
|
/*errorMessage*/
|
|
1838
1838
|
d[7]
|
|
@@ -1845,36 +1845,36 @@ function Wr(i) {
|
|
|
1845
1845
|
X(t.$$.fragment, d), X(c.$$.fragment, d), u = !1;
|
|
1846
1846
|
},
|
|
1847
1847
|
d(d) {
|
|
1848
|
-
d &&
|
|
1848
|
+
d && U(e), be(t), be(c), f = !1, a();
|
|
1849
1849
|
}
|
|
1850
1850
|
};
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function Pi(i, e) {
|
|
1853
1853
|
var s;
|
|
1854
1854
|
let t, n, r;
|
|
1855
1855
|
function o() {
|
|
1856
1856
|
return (
|
|
1857
1857
|
/*mouseenter_handler*/
|
|
1858
|
-
e[
|
|
1858
|
+
e[80](
|
|
1859
1859
|
/*i*/
|
|
1860
|
-
e[
|
|
1860
|
+
e[96]
|
|
1861
1861
|
)
|
|
1862
1862
|
);
|
|
1863
1863
|
}
|
|
1864
1864
|
function l() {
|
|
1865
1865
|
return (
|
|
1866
1866
|
/*select_handler*/
|
|
1867
|
-
e[
|
|
1867
|
+
e[81](
|
|
1868
1868
|
/*feature*/
|
|
1869
|
-
e[
|
|
1869
|
+
e[94]
|
|
1870
1870
|
)
|
|
1871
1871
|
);
|
|
1872
1872
|
}
|
|
1873
|
-
return n = new
|
|
1873
|
+
return n = new yr({
|
|
1874
1874
|
props: {
|
|
1875
1875
|
feature: (
|
|
1876
1876
|
/*feature*/
|
|
1877
|
-
e[
|
|
1877
|
+
e[94]
|
|
1878
1878
|
),
|
|
1879
1879
|
showPlaceType: (
|
|
1880
1880
|
/*showPlaceType*/
|
|
@@ -1883,10 +1883,10 @@ function Mi(i, e) {
|
|
|
1883
1883
|
style: (
|
|
1884
1884
|
/*selectedItemIndex*/
|
|
1885
1885
|
e[15] === /*i*/
|
|
1886
|
-
e[
|
|
1886
|
+
e[96] ? "selected" : (
|
|
1887
1887
|
/*picked*/
|
|
1888
1888
|
((s = e[14]) == null ? void 0 : s.id) === /*feature*/
|
|
1889
|
-
e[
|
|
1889
|
+
e[94].id ? "picked" : "default"
|
|
1890
1890
|
)
|
|
1891
1891
|
),
|
|
1892
1892
|
missingIconsCache: (
|
|
@@ -1902,10 +1902,10 @@ function Mi(i, e) {
|
|
|
1902
1902
|
key: i,
|
|
1903
1903
|
first: null,
|
|
1904
1904
|
c() {
|
|
1905
|
-
t =
|
|
1905
|
+
t = Qn(), ke(n.$$.fragment), this.first = t;
|
|
1906
1906
|
},
|
|
1907
1907
|
m(c, u) {
|
|
1908
|
-
|
|
1908
|
+
j(c, t, u), ye(n, c, u), r = !0;
|
|
1909
1909
|
},
|
|
1910
1910
|
p(c, u) {
|
|
1911
1911
|
var a;
|
|
@@ -1913,15 +1913,15 @@ function Mi(i, e) {
|
|
|
1913
1913
|
const f = {};
|
|
1914
1914
|
u[0] & /*listFeatures*/
|
|
1915
1915
|
8192 && (f.feature = /*feature*/
|
|
1916
|
-
e[
|
|
1916
|
+
e[94]), u[0] & /*showPlaceType*/
|
|
1917
1917
|
2048 && (f.showPlaceType = /*showPlaceType*/
|
|
1918
1918
|
e[11]), u[0] & /*selectedItemIndex, listFeatures, picked*/
|
|
1919
1919
|
57344 && (f.style = /*selectedItemIndex*/
|
|
1920
1920
|
e[15] === /*i*/
|
|
1921
|
-
e[
|
|
1921
|
+
e[96] ? "selected" : (
|
|
1922
1922
|
/*picked*/
|
|
1923
1923
|
((a = e[14]) == null ? void 0 : a.id) === /*feature*/
|
|
1924
|
-
e[
|
|
1924
|
+
e[94].id ? "picked" : "default"
|
|
1925
1925
|
)), u[0] & /*iconsBaseUrl*/
|
|
1926
1926
|
4096 && (f.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1927
1927
|
e[12]), n.$set(f);
|
|
@@ -1933,32 +1933,32 @@ function Mi(i, e) {
|
|
|
1933
1933
|
X(n.$$.fragment, c), r = !1;
|
|
1934
1934
|
},
|
|
1935
1935
|
d(c) {
|
|
1936
|
-
c &&
|
|
1936
|
+
c && U(t), be(n, c);
|
|
1937
1937
|
}
|
|
1938
1938
|
};
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1941
|
-
let e, t, n, r, o, l, s, c, u, f, a, d,
|
|
1942
|
-
o = new
|
|
1940
|
+
function Dr(i) {
|
|
1941
|
+
let e, t, n, r, o, l, s, c, u, f, a, d, m, g, y, v, b, w, E, L, T, P = !1;
|
|
1942
|
+
o = new Lr({}), a = new Ji({});
|
|
1943
1943
|
let x = (
|
|
1944
1944
|
/*abortController*/
|
|
1945
|
-
i[20] &&
|
|
1945
|
+
i[20] && ki()
|
|
1946
1946
|
), S = (
|
|
1947
1947
|
/*enableReverse*/
|
|
1948
|
-
i[6] === "button" &&
|
|
1948
|
+
i[6] === "button" && Ci(i)
|
|
1949
1949
|
);
|
|
1950
1950
|
const N = (
|
|
1951
1951
|
/*#slots*/
|
|
1952
|
-
i[
|
|
1953
|
-
), _ =
|
|
1952
|
+
i[69].default
|
|
1953
|
+
), _ = Dn(
|
|
1954
1954
|
N,
|
|
1955
1955
|
i,
|
|
1956
1956
|
/*$$scope*/
|
|
1957
|
-
i[
|
|
1957
|
+
i[68],
|
|
1958
1958
|
null
|
|
1959
|
-
), M = [
|
|
1960
|
-
function
|
|
1961
|
-
var se,
|
|
1959
|
+
), M = [Ur, Fr, Br, Ar], I = [];
|
|
1960
|
+
function ee(k, z) {
|
|
1961
|
+
var se, F;
|
|
1962
1962
|
return (
|
|
1963
1963
|
/*error*/
|
|
1964
1964
|
k[19] ? 0 : !/*focusedDelayed*/
|
|
@@ -1967,16 +1967,16 @@ function Ar(i) {
|
|
|
1967
1967
|
/*listFeatures*/
|
|
1968
1968
|
((se = k[13]) == null ? void 0 : se.length) === 0 ? 2 : (
|
|
1969
1969
|
/*listFeatures*/
|
|
1970
|
-
(
|
|
1970
|
+
(F = k[13]) != null && F.length && /*focusedDelayed*/
|
|
1971
1971
|
(k[16] || /*keepListOpen*/
|
|
1972
1972
|
k[4]) ? 3 : -1
|
|
1973
1973
|
)
|
|
1974
1974
|
)
|
|
1975
1975
|
);
|
|
1976
1976
|
}
|
|
1977
|
-
return ~(v =
|
|
1977
|
+
return ~(v = ee(i)) && (b = I[v] = M[v](i)), {
|
|
1978
1978
|
c() {
|
|
1979
|
-
e =
|
|
1979
|
+
e = ie(), t = A("form"), n = A("div"), r = A("button"), ke(o.$$.fragment), l = ie(), s = A("input"), c = ie(), u = A("div"), f = A("button"), ke(a.$$.fragment), d = ie(), x && x.c(), m = ie(), S && S.c(), g = ie(), _ && _.c(), y = ie(), b && b.c(), p(r, "class", "search-button svelte-bz0zu3"), p(r, "type", "button"), p(
|
|
1980
1980
|
s,
|
|
1981
1981
|
"placeholder",
|
|
1982
1982
|
/*placeholder*/
|
|
@@ -1991,15 +1991,15 @@ function Ar(i) {
|
|
|
1991
1991
|
"title",
|
|
1992
1992
|
/*clearButtonTitle*/
|
|
1993
1993
|
i[3]
|
|
1994
|
-
), p(f, "class", "svelte-bz0zu3"), p(u, "class", "clear-button-container svelte-bz0zu3"),
|
|
1994
|
+
), p(f, "class", "svelte-bz0zu3"), p(u, "class", "clear-button-container svelte-bz0zu3"), Ge(
|
|
1995
1995
|
u,
|
|
1996
1996
|
"displayable",
|
|
1997
1997
|
/*searchValue*/
|
|
1998
1998
|
i[1] !== ""
|
|
1999
|
-
), p(n, "class", "input-group svelte-bz0zu3"), p(t, "class", w =
|
|
1999
|
+
), p(n, "class", "input-group svelte-bz0zu3"), p(t, "class", w = gt(
|
|
2000
2000
|
/*className*/
|
|
2001
2001
|
i[2]
|
|
2002
|
-
) + " svelte-bz0zu3"),
|
|
2002
|
+
) + " svelte-bz0zu3"), Ge(
|
|
2003
2003
|
t,
|
|
2004
2004
|
"can-collapse",
|
|
2005
2005
|
/*collapsed*/
|
|
@@ -2007,41 +2007,41 @@ function Ar(i) {
|
|
|
2007
2007
|
i[1] === ""
|
|
2008
2008
|
);
|
|
2009
2009
|
},
|
|
2010
|
-
m(k,
|
|
2011
|
-
|
|
2010
|
+
m(k, z) {
|
|
2011
|
+
j(k, e, z), j(k, t, z), O(t, n), O(n, r), ye(o, r, null), O(n, l), O(n, s), i[71](s), gi(
|
|
2012
2012
|
s,
|
|
2013
2013
|
/*searchValue*/
|
|
2014
2014
|
i[1]
|
|
2015
|
-
), O(n, c), O(n, u), O(u, f),
|
|
2015
|
+
), O(n, c), O(n, u), O(u, f), ye(a, f, null), O(u, d), x && x.m(u, null), O(n, m), S && S.m(n, null), O(n, g), _ && _.m(n, null), O(t, y), ~v && I[v].m(t, null), E = !0, L || (T = [
|
|
2016
2016
|
Y(
|
|
2017
2017
|
r,
|
|
2018
2018
|
"click",
|
|
2019
2019
|
/*click_handler*/
|
|
2020
|
-
i[
|
|
2020
|
+
i[70]
|
|
2021
2021
|
),
|
|
2022
2022
|
Y(
|
|
2023
2023
|
s,
|
|
2024
2024
|
"input",
|
|
2025
2025
|
/*input_1_input_handler*/
|
|
2026
|
-
i[
|
|
2026
|
+
i[72]
|
|
2027
2027
|
),
|
|
2028
2028
|
Y(
|
|
2029
2029
|
s,
|
|
2030
2030
|
"focus",
|
|
2031
2031
|
/*focus_handler*/
|
|
2032
|
-
i[
|
|
2032
|
+
i[73]
|
|
2033
2033
|
),
|
|
2034
2034
|
Y(
|
|
2035
2035
|
s,
|
|
2036
2036
|
"blur",
|
|
2037
2037
|
/*blur_handler*/
|
|
2038
|
-
i[
|
|
2038
|
+
i[74]
|
|
2039
2039
|
),
|
|
2040
2040
|
Y(
|
|
2041
2041
|
s,
|
|
2042
2042
|
"click",
|
|
2043
2043
|
/*click_handler_1*/
|
|
2044
|
-
i[
|
|
2044
|
+
i[75]
|
|
2045
2045
|
),
|
|
2046
2046
|
Y(
|
|
2047
2047
|
s,
|
|
@@ -2059,87 +2059,87 @@ function Ar(i) {
|
|
|
2059
2059
|
s,
|
|
2060
2060
|
"change",
|
|
2061
2061
|
/*change_handler*/
|
|
2062
|
-
i[
|
|
2062
|
+
i[76]
|
|
2063
2063
|
),
|
|
2064
2064
|
Y(
|
|
2065
2065
|
f,
|
|
2066
2066
|
"click",
|
|
2067
2067
|
/*click_handler_2*/
|
|
2068
|
-
i[
|
|
2068
|
+
i[77]
|
|
2069
2069
|
),
|
|
2070
|
-
Y(t, "submit",
|
|
2070
|
+
Y(t, "submit", Vn(
|
|
2071
2071
|
/*handleSubmit*/
|
|
2072
2072
|
i[22]
|
|
2073
2073
|
))
|
|
2074
2074
|
], L = !0);
|
|
2075
2075
|
},
|
|
2076
|
-
p(k,
|
|
2077
|
-
(!E ||
|
|
2076
|
+
p(k, z) {
|
|
2077
|
+
(!E || z[0] & /*placeholder*/
|
|
2078
2078
|
512) && p(
|
|
2079
2079
|
s,
|
|
2080
2080
|
"placeholder",
|
|
2081
2081
|
/*placeholder*/
|
|
2082
2082
|
k[9]
|
|
2083
|
-
), (!E ||
|
|
2083
|
+
), (!E || z[0] & /*placeholder*/
|
|
2084
2084
|
512) && p(
|
|
2085
2085
|
s,
|
|
2086
2086
|
"aria-label",
|
|
2087
2087
|
/*placeholder*/
|
|
2088
2088
|
k[9]
|
|
2089
|
-
),
|
|
2089
|
+
), z[0] & /*searchValue*/
|
|
2090
2090
|
2 && s.value !== /*searchValue*/
|
|
2091
|
-
k[1] &&
|
|
2091
|
+
k[1] && gi(
|
|
2092
2092
|
s,
|
|
2093
2093
|
/*searchValue*/
|
|
2094
2094
|
k[1]
|
|
2095
|
-
), (!E ||
|
|
2095
|
+
), (!E || z[0] & /*clearButtonTitle*/
|
|
2096
2096
|
8) && p(
|
|
2097
2097
|
f,
|
|
2098
2098
|
"title",
|
|
2099
2099
|
/*clearButtonTitle*/
|
|
2100
2100
|
k[3]
|
|
2101
2101
|
), /*abortController*/
|
|
2102
|
-
k[20] ? x ?
|
|
2103
|
-
1048576 && Q(x, 1) : (x =
|
|
2102
|
+
k[20] ? x ? z[0] & /*abortController*/
|
|
2103
|
+
1048576 && Q(x, 1) : (x = ki(), x.c(), Q(x, 1), x.m(u, null)) : x && (dt(), X(x, 1, 1, () => {
|
|
2104
2104
|
x = null;
|
|
2105
|
-
}),
|
|
2106
|
-
2) &&
|
|
2105
|
+
}), ht()), (!E || z[0] & /*searchValue*/
|
|
2106
|
+
2) && Ge(
|
|
2107
2107
|
u,
|
|
2108
2108
|
"displayable",
|
|
2109
2109
|
/*searchValue*/
|
|
2110
2110
|
k[1] !== ""
|
|
2111
2111
|
), /*enableReverse*/
|
|
2112
|
-
k[6] === "button" ? S ? (S.p(k,
|
|
2113
|
-
64 && Q(S, 1)) : (S =
|
|
2112
|
+
k[6] === "button" ? S ? (S.p(k, z), z[0] & /*enableReverse*/
|
|
2113
|
+
64 && Q(S, 1)) : (S = Ci(k), S.c(), Q(S, 1), S.m(n, g)) : S && (dt(), X(S, 1, 1, () => {
|
|
2114
2114
|
S = null;
|
|
2115
|
-
}),
|
|
2116
|
-
|
|
2115
|
+
}), ht()), _ && _.p && (!E || z[2] & /*$$scope*/
|
|
2116
|
+
64) && jn(
|
|
2117
2117
|
_,
|
|
2118
2118
|
N,
|
|
2119
2119
|
k,
|
|
2120
2120
|
/*$$scope*/
|
|
2121
|
-
k[
|
|
2122
|
-
E ?
|
|
2121
|
+
k[68],
|
|
2122
|
+
E ? Gn(
|
|
2123
2123
|
N,
|
|
2124
2124
|
/*$$scope*/
|
|
2125
|
-
k[
|
|
2126
|
-
|
|
2125
|
+
k[68],
|
|
2126
|
+
z,
|
|
2127
2127
|
null
|
|
2128
|
-
) :
|
|
2128
|
+
) : qn(
|
|
2129
2129
|
/*$$scope*/
|
|
2130
|
-
k[
|
|
2130
|
+
k[68]
|
|
2131
2131
|
),
|
|
2132
2132
|
null
|
|
2133
2133
|
);
|
|
2134
2134
|
let se = v;
|
|
2135
|
-
v =
|
|
2136
|
-
|
|
2137
|
-
}),
|
|
2138
|
-
4 && w !== (w =
|
|
2135
|
+
v = ee(k), v === se ? ~v && I[v].p(k, z) : (b && (dt(), X(I[se], 1, 1, () => {
|
|
2136
|
+
I[se] = null;
|
|
2137
|
+
}), ht()), ~v ? (b = I[v], b ? b.p(k, z) : (b = I[v] = M[v](k), b.c()), Q(b, 1), b.m(t, null)) : b = null), (!E || z[0] & /*className*/
|
|
2138
|
+
4 && w !== (w = gt(
|
|
2139
2139
|
/*className*/
|
|
2140
2140
|
k[2]
|
|
2141
|
-
) + " svelte-bz0zu3")) && p(t, "class", w), (!E ||
|
|
2142
|
-
38) &&
|
|
2141
|
+
) + " svelte-bz0zu3")) && p(t, "class", w), (!E || z[0] & /*className, collapsed, searchValue*/
|
|
2142
|
+
38) && Ge(
|
|
2143
2143
|
t,
|
|
2144
2144
|
"can-collapse",
|
|
2145
2145
|
/*collapsed*/
|
|
@@ -2154,11 +2154,11 @@ function Ar(i) {
|
|
|
2154
2154
|
X(P), X(o.$$.fragment, k), X(a.$$.fragment, k), X(x), X(S), X(_, k), X(b), E = !1;
|
|
2155
2155
|
},
|
|
2156
2156
|
d(k) {
|
|
2157
|
-
k && (
|
|
2157
|
+
k && (U(e), U(t)), be(o), i[71](null), be(a), x && x.d(), S && S.d(), _ && _.d(k), ~v && I[v].d(), L = !1, ve(T);
|
|
2158
2158
|
}
|
|
2159
2159
|
};
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2161
|
+
function Gr(i, e, t) {
|
|
2162
2162
|
let n, r, o, { $$slots: l = {}, $$scope: s } = e;
|
|
2163
2163
|
const c = {
|
|
2164
2164
|
continental_marine: 4,
|
|
@@ -2184,279 +2184,295 @@ function Br(i, e, t) {
|
|
|
2184
2184
|
"poi.restaurant": 18,
|
|
2185
2185
|
"poi.aerodrome": 13
|
|
2186
2186
|
};
|
|
2187
|
-
let { class: u = void 0 } = e, { apiKey: f } = e, { bbox: a = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur:
|
|
2188
|
-
} } = e, { adjustUrl:
|
|
2187
|
+
let { class: u = void 0 } = e, { apiKey: f } = e, { bbox: a = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: m = !1 } = e, { clearListOnPick: g = !1 } = e, { keepListOpen: y = !1 } = e, { collapsed: v = !1 } = e, { country: b = void 0 } = e, { debounceSearch: w = 200 } = e, { enableReverse: E = "never" } = e, { errorMessage: L = "Something went wrong…" } = e, { filter: T = () => !0 } = e, { flyTo: P = !0 } = e, { fuzzyMatch: x = !0 } = e, { language: S = void 0 } = e, { limit: N = void 0 } = e, { mapController: _ = void 0 } = e, { minLength: M = 2 } = e, { noResultsMessage: I = "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: ee = "Search" } = e, { proximity: k = [{ type: "server-geolocation" }] } = e, { reverseActive: z = E === "always" } = e, { reverseButtonTitle: se = "toggle reverse geocoding" } = e, { searchValue: F = "" } = e, { pickedResultStyle: et = "full-geometry" } = e, { showPlaceType: Jt = "if-needed" } = e, { showResultsWhileTyping: tt = !0 } = e, { autocompleteTimeout: wt = void 0 } = e, { selectFirst: Ne = !0 } = e, { flyToSelected: it = !1 } = e, { markerOnSelected: nt = !0 } = e, { types: Te = void 0 } = e, { exhaustiveReverseGeocoding: _t = !1 } = e, { excludeTypes: rt = !1 } = e, { zoom: ot = c } = e, { apiUrl: Et = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: Lt = {} } = e, { iconsBaseUrl: $t = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.0-with-autocomplete-timeout/icons/" } = e, { adjustUrlQuery: St = () => {
|
|
2188
|
+
} } = e, { adjustUrl: xt = () => {
|
|
2189
2189
|
} } = e;
|
|
2190
|
-
function
|
|
2190
|
+
function on(h) {
|
|
2191
2191
|
le.focus(h);
|
|
2192
2192
|
}
|
|
2193
|
-
function
|
|
2193
|
+
function sn() {
|
|
2194
2194
|
le.blur();
|
|
2195
2195
|
}
|
|
2196
|
-
function
|
|
2197
|
-
t(1,
|
|
2196
|
+
function ei(h, D = !0, q = !1) {
|
|
2197
|
+
t(1, F = h), D ? (t(15, W = -1), ii()) : (ni(void 0, !q, q), setTimeout(() => {
|
|
2198
2198
|
le.focus(), le.select();
|
|
2199
2199
|
}));
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2202
|
-
t(13,
|
|
2201
|
+
function ln() {
|
|
2202
|
+
t(13, R = void 0), t(14, C = void 0), t(15, W = -1);
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2205
|
-
t(
|
|
2204
|
+
function un() {
|
|
2205
|
+
t(62, V = []), t(14, C = void 0);
|
|
2206
2206
|
}
|
|
2207
|
-
let
|
|
2208
|
-
const
|
|
2209
|
-
|
|
2207
|
+
let R, V, C, ti = "", le, W = -1, fe, st = [], Re, we, ne, Be, Mt, he = !1;
|
|
2208
|
+
const an = /* @__PURE__ */ new Set(), _e = Xi();
|
|
2209
|
+
function cn() {
|
|
2210
|
+
return !!ne;
|
|
2211
|
+
}
|
|
2212
|
+
Yn(() => {
|
|
2210
2213
|
_ && (_.setEventHandler(void 0), _.indicateReverse(!1), _.setSelectedMarker(-1), _.setFeatures(void 0, void 0, !1));
|
|
2211
2214
|
});
|
|
2212
|
-
function
|
|
2213
|
-
if (t(17,
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2215
|
+
function ii(h) {
|
|
2216
|
+
if (t(17, he = !1), we && (window.clearTimeout(we), we = void 0), ne) {
|
|
2217
|
+
window.clearTimeout(ne), t(63, ne = void 0), qe(F, { appendSpace: !0 });
|
|
2218
|
+
return;
|
|
2219
|
+
}
|
|
2220
|
+
if (W > -1 && R)
|
|
2221
|
+
t(14, C = R[W]), t(1, F = C.place_type[0] === "reverse" ? C.place_name : C.place_name.replace(/,.*/, "")), t(19, fe = void 0), t(62, V = void 0), t(15, W = -1);
|
|
2222
|
+
else if (F) {
|
|
2223
|
+
const D = h || !kt(F);
|
|
2224
|
+
qe(F, { exact: !0 }).then(() => {
|
|
2225
|
+
t(62, V = R), t(14, C = void 0), D && fn();
|
|
2226
|
+
}).catch((q) => t(19, fe = q));
|
|
2220
2227
|
}
|
|
2221
2228
|
}
|
|
2222
|
-
function
|
|
2229
|
+
function kt(h) {
|
|
2223
2230
|
try {
|
|
2224
|
-
return
|
|
2231
|
+
return Wr(h, 6);
|
|
2225
2232
|
} catch {
|
|
2226
2233
|
return !1;
|
|
2227
2234
|
}
|
|
2228
2235
|
}
|
|
2229
|
-
async function
|
|
2230
|
-
var
|
|
2231
|
-
t(19,
|
|
2232
|
-
const
|
|
2233
|
-
t(20,
|
|
2236
|
+
async function qe(h, { byId: D = !1, exact: q = !1, appendSpace: ue = !1 } = {}) {
|
|
2237
|
+
var de, Ee;
|
|
2238
|
+
t(19, fe = void 0), Re == null || Re.abort();
|
|
2239
|
+
const K = new AbortController();
|
|
2240
|
+
t(20, Re = K);
|
|
2234
2241
|
try {
|
|
2235
|
-
const
|
|
2236
|
-
if (S !== void 0 &&
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2242
|
+
const B = kt(h), Nt = new URL(Et + "/" + encodeURIComponent(B ? B.decimalLongitude + "," + B.decimalLatitude : h + (ue ? " " : "")) + ".json"), ae = Nt.searchParams;
|
|
2243
|
+
if (S !== void 0 && ae.set("language", Array.isArray(S) ? S.join(",") : S ?? ""), Te && ae.set("types", Te.join(",")), rt && ae.set("excludeTypes", String(rt)), a && ae.set("bbox", a.map((ut) => ut.toFixed(6)).join(",")), b && ae.set("country", Array.isArray(b) ? b.join(",") : b), !D && !B) {
|
|
2244
|
+
const ut = await xr(_, k, K);
|
|
2245
|
+
ut && ae.set("proximity", ut), (q || !tt) && ae.set("autocomplete", "false"), ae.set("fuzzyMatch", String(x));
|
|
2239
2246
|
}
|
|
2240
|
-
N !== void 0 && (
|
|
2241
|
-
const
|
|
2242
|
-
if (
|
|
2243
|
-
|
|
2247
|
+
N !== void 0 && (_t || !B || (Te == null ? void 0 : Te.length) === 1) && ae.set("limit", String(N)), ae.set("key", f), St(ae), xt(Nt);
|
|
2248
|
+
const lt = Nt.toString();
|
|
2249
|
+
if (lt === ti) {
|
|
2250
|
+
D ? (g && t(13, R = void 0), t(14, C = st[0])) : (t(13, R = st), ((de = R[W]) == null ? void 0 : de.id) !== (r == null ? void 0 : r.id) && t(15, W = -1));
|
|
2244
2251
|
return;
|
|
2245
2252
|
}
|
|
2246
|
-
|
|
2247
|
-
const
|
|
2248
|
-
if (!
|
|
2249
|
-
throw new Error(await
|
|
2250
|
-
const
|
|
2251
|
-
|
|
2253
|
+
ti = lt;
|
|
2254
|
+
const Tt = await fetch(lt, { signal: K.signal, ...Lt });
|
|
2255
|
+
if (!Tt.ok)
|
|
2256
|
+
throw new Error(await Tt.text());
|
|
2257
|
+
const Rt = await Tt.json();
|
|
2258
|
+
_e("response", { url: lt, featureCollection: Rt }), D ? (g && t(13, R = void 0), t(14, C = Rt.features[0]), st = [C]) : (t(13, R = Rt.features.filter(T)), B && R.unshift({
|
|
2252
2259
|
type: "Feature",
|
|
2253
2260
|
properties: {},
|
|
2254
|
-
id: "reverse_" +
|
|
2255
|
-
text:
|
|
2256
|
-
place_name:
|
|
2261
|
+
id: "reverse_" + B.decimalLongitude + "_" + B.decimalLatitude,
|
|
2262
|
+
text: B.decimalLatitude + ", " + B.decimalLongitude,
|
|
2263
|
+
place_name: B.decimalLatitude + ", " + B.decimalLongitude,
|
|
2257
2264
|
place_type: ["reverse"],
|
|
2258
|
-
center: [
|
|
2265
|
+
center: [B.decimalLongitude, B.decimalLatitude],
|
|
2259
2266
|
bbox: [
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2267
|
+
B.decimalLongitude,
|
|
2268
|
+
B.decimalLatitude,
|
|
2269
|
+
B.decimalLongitude,
|
|
2270
|
+
B.decimalLatitude
|
|
2264
2271
|
],
|
|
2265
2272
|
geometry: {
|
|
2266
2273
|
type: "Point",
|
|
2267
|
-
coordinates: [
|
|
2274
|
+
coordinates: [B.decimalLongitude, B.decimalLatitude]
|
|
2268
2275
|
}
|
|
2269
|
-
}),
|
|
2270
|
-
} catch (
|
|
2271
|
-
if (
|
|
2276
|
+
}), st = R, ((Ee = R[W]) == null ? void 0 : Ee.id) !== (r == null ? void 0 : r.id) && t(15, W = -1), B && le.focus());
|
|
2277
|
+
} catch (B) {
|
|
2278
|
+
if (B && typeof B == "object" && "name" in B && B.name === "AbortError")
|
|
2272
2279
|
return;
|
|
2273
|
-
throw
|
|
2280
|
+
throw B;
|
|
2274
2281
|
} finally {
|
|
2275
|
-
|
|
2282
|
+
K === Re && t(20, Re = void 0);
|
|
2276
2283
|
}
|
|
2277
2284
|
}
|
|
2278
|
-
function
|
|
2279
|
-
var
|
|
2285
|
+
function fn() {
|
|
2286
|
+
var ue;
|
|
2280
2287
|
if (!(V != null && V.length) || !P)
|
|
2281
2288
|
return;
|
|
2282
|
-
const h = [180, 90, -180, -90],
|
|
2289
|
+
const h = [180, 90, -180, -90], D = !V.some((K) => !K.matching_text);
|
|
2283
2290
|
let q;
|
|
2284
|
-
for (const
|
|
2285
|
-
const
|
|
2286
|
-
if (q = q === void 0 ?
|
|
2287
|
-
for (const
|
|
2288
|
-
h[
|
|
2291
|
+
for (const K of V) {
|
|
2292
|
+
const de = Qe(K);
|
|
2293
|
+
if (q = q === void 0 ? de : de === void 0 ? q : Math.max(q, de), D || !K.matching_text)
|
|
2294
|
+
for (const Ee of [0, 1, 2, 3])
|
|
2295
|
+
h[Ee] = Math[Ee < 2 ? "min" : "max"](h[Ee], ((ue = K.bbox) == null ? void 0 : ue[Ee]) ?? K.center[Ee % 2]);
|
|
2289
2296
|
}
|
|
2290
|
-
_ && V.length > 0 && (C && h[0] === h[2] && h[1] === h[3] ? _.flyTo(C.center,
|
|
2297
|
+
_ && V.length > 0 && (C && h[0] === h[2] && h[1] === h[3] ? _.flyTo(C.center, Qe(C)) : _.fitBounds(pt(h), 50, q));
|
|
2291
2298
|
}
|
|
2292
|
-
function
|
|
2293
|
-
!C || !_ || (!C.bbox || C.bbox[0] === C.bbox[2] && C.bbox[1] === C.bbox[3] ? _.flyTo(C.center,
|
|
2299
|
+
function Ct() {
|
|
2300
|
+
!C || !_ || (!C.bbox || C.bbox[0] === C.bbox[2] && C.bbox[1] === C.bbox[3] ? _.flyTo(C.center, Qe(C)) : _.fitBounds(pt(C.bbox), 50, Qe(C)));
|
|
2294
2301
|
}
|
|
2295
|
-
function
|
|
2302
|
+
function Qe(h) {
|
|
2296
2303
|
var q;
|
|
2297
2304
|
if (!h.bbox || h.bbox[0] !== h.bbox[2] && h.bbox[1] !== h.bbox[3])
|
|
2298
2305
|
return;
|
|
2299
|
-
const
|
|
2306
|
+
const D = h.id.replace(/\..*/, "");
|
|
2300
2307
|
return (Array.isArray((q = h.properties) == null ? void 0 : q.categories) ? h.properties.categories.reduce(
|
|
2301
|
-
(
|
|
2302
|
-
const
|
|
2303
|
-
return
|
|
2308
|
+
(ue, K) => {
|
|
2309
|
+
const de = ot[D + "." + K];
|
|
2310
|
+
return ue === void 0 ? de : de === void 0 ? ue : Math.max(ue, de);
|
|
2304
2311
|
},
|
|
2305
2312
|
void 0
|
|
2306
|
-
) : void 0) ??
|
|
2313
|
+
) : void 0) ?? ot[D];
|
|
2307
2314
|
}
|
|
2308
|
-
function
|
|
2309
|
-
t(0,
|
|
2315
|
+
function dn(h) {
|
|
2316
|
+
t(0, z = E === "always"), t(13, R = void 0), t(14, C = void 0), t(15, W = -1), ei(h[1].toFixed(6) + ", " + Sr(h[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2310
2317
|
}
|
|
2311
|
-
function
|
|
2312
|
-
if (!
|
|
2318
|
+
function hn(h) {
|
|
2319
|
+
if (!R)
|
|
2313
2320
|
return;
|
|
2314
|
-
let
|
|
2315
|
-
|
|
2321
|
+
let D = h.key === "ArrowDown" ? 1 : h.key === "ArrowUp" ? -1 : 0;
|
|
2322
|
+
D && (le.focus(), t(17, he = !0), h.preventDefault(), C && W === -1 && t(15, W = R.findIndex((q) => q.id === (C == null ? void 0 : C.id))), W === (C || Ne ? 0 : -1) && D === -1 && t(15, W = R.length), t(15, W += D), W >= R.length && t(15, W = -1), W < 0 && (C || Ne) && t(15, W = 0));
|
|
2316
2323
|
}
|
|
2317
|
-
function
|
|
2318
|
-
if (t(19,
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2324
|
+
function ni(h, D = !0, q = !1) {
|
|
2325
|
+
if (t(19, fe = void 0), t(14, C = void 0), t(17, he = !0), we && (window.clearTimeout(we), we = void 0), ne && (window.clearTimeout(ne), t(63, ne = void 0)), !tt && !q || F.length < M) {
|
|
2326
|
+
t(13, R = void 0);
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2329
|
+
const ue = F;
|
|
2330
|
+
we = window.setTimeout(
|
|
2331
|
+
() => {
|
|
2332
|
+
we = void 0, qe(ue).catch((K) => t(19, fe = K));
|
|
2333
|
+
},
|
|
2334
|
+
D ? w : 0
|
|
2335
|
+
), F.endsWith(" ") || t(63, ne = window.setTimeout(
|
|
2336
|
+
() => {
|
|
2337
|
+
t(63, ne = void 0), qe(ue, { appendSpace: !0 }).catch((K) => t(19, fe = K));
|
|
2338
|
+
},
|
|
2339
|
+
wt
|
|
2340
|
+
));
|
|
2330
2341
|
}
|
|
2331
|
-
function
|
|
2332
|
-
C && (C == null ? void 0 : C.id) === (h == null ? void 0 : h.id) ?
|
|
2342
|
+
function Pt(h) {
|
|
2343
|
+
C && (C == null ? void 0 : C.id) === (h == null ? void 0 : h.id) ? Ct() : (t(14, C = h), t(1, F = h.place_name));
|
|
2333
2344
|
}
|
|
2334
|
-
function
|
|
2335
|
-
t(15,
|
|
2345
|
+
function ri(h) {
|
|
2346
|
+
t(15, W = h);
|
|
2336
2347
|
}
|
|
2337
|
-
function
|
|
2338
|
-
(!
|
|
2348
|
+
function mn() {
|
|
2349
|
+
(!Ne || C) && t(15, W = -1), it && Ct();
|
|
2339
2350
|
}
|
|
2340
|
-
const
|
|
2341
|
-
function
|
|
2342
|
-
|
|
2351
|
+
const gn = () => le.focus();
|
|
2352
|
+
function pn(h) {
|
|
2353
|
+
Ft[h ? "unshift" : "push"](() => {
|
|
2343
2354
|
le = h, t(18, le);
|
|
2344
2355
|
});
|
|
2345
2356
|
}
|
|
2346
|
-
function
|
|
2347
|
-
|
|
2357
|
+
function yn() {
|
|
2358
|
+
F = this.value, t(1, F), t(17, he), t(31, m), t(16, Be);
|
|
2348
2359
|
}
|
|
2349
|
-
const
|
|
2350
|
-
t(1,
|
|
2351
|
-
},
|
|
2360
|
+
const bn = () => t(17, he = !0), vn = () => t(17, he = !1), wn = () => t(17, he = !0), _n = () => t(14, C = void 0), En = () => {
|
|
2361
|
+
t(1, F = ""), le.focus();
|
|
2362
|
+
}, Ln = () => t(0, z = !z), Sn = () => t(19, fe = void 0), xn = (h) => ri(h), Mn = (h) => Pt(h), kn = () => {
|
|
2352
2363
|
};
|
|
2353
2364
|
return i.$$set = (h) => {
|
|
2354
|
-
"class" in h && t(2, u = h.class), "apiKey" in h && t(29, f = h.apiKey), "bbox" in h && t(30, a = h.bbox), "clearButtonTitle" in h && t(3, d = h.clearButtonTitle), "clearOnBlur" in h && t(31,
|
|
2365
|
+
"class" in h && t(2, u = h.class), "apiKey" in h && t(29, f = h.apiKey), "bbox" in h && t(30, a = h.bbox), "clearButtonTitle" in h && t(3, d = h.clearButtonTitle), "clearOnBlur" in h && t(31, m = h.clearOnBlur), "clearListOnPick" in h && t(32, g = h.clearListOnPick), "keepListOpen" in h && t(4, y = h.keepListOpen), "collapsed" in h && t(5, v = h.collapsed), "country" in h && t(33, b = h.country), "debounceSearch" in h && t(34, w = h.debounceSearch), "enableReverse" in h && t(6, E = h.enableReverse), "errorMessage" in h && t(7, L = h.errorMessage), "filter" in h && t(35, T = h.filter), "flyTo" in h && t(36, P = h.flyTo), "fuzzyMatch" in h && t(37, x = h.fuzzyMatch), "language" in h && t(38, S = h.language), "limit" in h && t(39, N = h.limit), "mapController" in h && t(40, _ = h.mapController), "minLength" in h && t(41, M = h.minLength), "noResultsMessage" in h && t(8, I = h.noResultsMessage), "placeholder" in h && t(9, ee = h.placeholder), "proximity" in h && t(42, k = h.proximity), "reverseActive" in h && t(0, z = h.reverseActive), "reverseButtonTitle" in h && t(10, se = h.reverseButtonTitle), "searchValue" in h && t(1, F = h.searchValue), "pickedResultStyle" in h && t(43, et = h.pickedResultStyle), "showPlaceType" in h && t(11, Jt = h.showPlaceType), "showResultsWhileTyping" in h && t(44, tt = h.showResultsWhileTyping), "autocompleteTimeout" in h && t(45, wt = h.autocompleteTimeout), "selectFirst" in h && t(46, Ne = h.selectFirst), "flyToSelected" in h && t(47, it = h.flyToSelected), "markerOnSelected" in h && t(48, nt = h.markerOnSelected), "types" in h && t(49, Te = h.types), "exhaustiveReverseGeocoding" in h && t(50, _t = h.exhaustiveReverseGeocoding), "excludeTypes" in h && t(51, rt = h.excludeTypes), "zoom" in h && t(52, ot = h.zoom), "apiUrl" in h && t(53, Et = h.apiUrl), "fetchParameters" in h && t(54, Lt = h.fetchParameters), "iconsBaseUrl" in h && t(12, $t = h.iconsBaseUrl), "adjustUrlQuery" in h && t(55, St = h.adjustUrlQuery), "adjustUrl" in h && t(56, xt = h.adjustUrl), "$$scope" in h && t(68, s = h.$$scope);
|
|
2355
2366
|
}, i.$$.update = () => {
|
|
2356
2367
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2357
|
-
64 && t(0,
|
|
2368
|
+
64 && t(0, z = E === "always"), i.$$.dirty[0] & /*picked*/
|
|
2358
2369
|
16384 | i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2359
|
-
4096 &&
|
|
2370
|
+
4096 && et !== "marker-only" && C && !C.address && C.geometry.type === "Point" && C.place_type[0] !== "reverse" && qe(C.id, { byId: !0 }).catch((h) => t(19, fe = h)), i.$$.dirty[0] & /*picked*/
|
|
2360
2371
|
16384 | i.$$.dirty[1] & /*mapController, flyTo, clearListOnPick*/
|
|
2361
2372
|
546 | i.$$.dirty[2] & /*prevIdToFly*/
|
|
2362
|
-
|
|
2373
|
+
4 && (_ && C && C.id !== Mt && P && (Ct(), g && t(13, R = void 0), t(62, V = void 0), t(15, W = -1)), t(64, Mt = C == null ? void 0 : C.id)), i.$$.dirty[0] & /*focused, focusedDelayed*/
|
|
2363
2374
|
196608 | i.$$.dirty[1] & /*clearOnBlur*/
|
|
2364
2375
|
1 && setTimeout(() => {
|
|
2365
|
-
t(16,
|
|
2376
|
+
t(16, Be = he), m && !Be && t(1, F = "");
|
|
2366
2377
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2367
2378
|
8194 | i.$$.dirty[1] & /*minLength*/
|
|
2368
|
-
1024 &&
|
|
2379
|
+
1024 && F.length < M && (t(13, R = void 0), t(19, fe = void 0), t(62, V = R)), i.$$.dirty[0] & /*listFeatures*/
|
|
2380
|
+
8192 | i.$$.dirty[1] & /*selectFirst*/
|
|
2381
|
+
32768 && Ne && R != null && R.length && (cn() || t(15, W = 0)), i.$$.dirty[0] & /*listFeatures, selectedItemIndex, picked*/
|
|
2369
2382
|
57344 | i.$$.dirty[1] & /*selectFirst*/
|
|
2370
|
-
|
|
2371
|
-
8192 | i.$$.dirty[
|
|
2372
|
-
|
|
2373
|
-
73729 | i.$$.dirty[1] & /*mapController
|
|
2374
|
-
|
|
2383
|
+
32768 && Ne && R != null && R.length && W == -1 && !C && t(15, W = 0), i.$$.dirty[0] & /*listFeatures*/
|
|
2384
|
+
8192 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2385
|
+
1 && V !== R && t(62, V = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2386
|
+
73729 | i.$$.dirty[1] & /*mapController*/
|
|
2387
|
+
512 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2388
|
+
1 && _ && _.setEventHandler((h) => {
|
|
2375
2389
|
switch (h.type) {
|
|
2376
2390
|
case "mapClick":
|
|
2377
|
-
|
|
2391
|
+
z && dn(h.coordinates);
|
|
2378
2392
|
break;
|
|
2379
2393
|
case "markerClick":
|
|
2380
2394
|
{
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2395
|
+
const D = R == null ? void 0 : R.find((q) => q.id === h.id);
|
|
2396
|
+
D && Pt(D);
|
|
2383
2397
|
}
|
|
2384
2398
|
break;
|
|
2385
2399
|
case "markerMouseEnter":
|
|
2386
|
-
V && t(15,
|
|
2400
|
+
V && t(15, W = Be ? (R == null ? void 0 : R.findIndex((D) => D.id === h.id)) ?? -1 : -1);
|
|
2387
2401
|
break;
|
|
2388
2402
|
case "markerMouseLeave":
|
|
2389
|
-
V && t(15,
|
|
2403
|
+
V && t(15, W = -1);
|
|
2390
2404
|
break;
|
|
2391
2405
|
}
|
|
2392
2406
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2393
|
-
40960 && t(
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
4096 && t(
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
16384 | i.$$.dirty[1] & /*mapController, markerOnSelected
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
16384 | i.$$.dirty[1] & /*mapController
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
32768 | i.$$.dirty[1] & /*
|
|
2406
|
-
|
|
2407
|
+
40960 && t(65, r = R == null ? void 0 : R[W]), i.$$.dirty[1] & /*mapController, flyTo, flyToSelected*/
|
|
2408
|
+
66080 | i.$$.dirty[2] & /*selected*/
|
|
2409
|
+
8 && _ && r && P && it && _.flyTo(r.center, Qe(r)), i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2410
|
+
4096 && t(67, n = et === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2411
|
+
131584 | i.$$.dirty[2] & /*showPolygonMarker*/
|
|
2412
|
+
32 && (nt || _ == null || _.setFeatures(void 0, void 0, n)), i.$$.dirty[0] & /*picked*/
|
|
2413
|
+
16384 | i.$$.dirty[1] & /*mapController, markerOnSelected*/
|
|
2414
|
+
131584 | i.$$.dirty[2] & /*markedFeatures, selected, showPolygonMarker*/
|
|
2415
|
+
41 && _ && nt && !V && (_.setFeatures(r ? [r] : void 0, C, n), _.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[0] & /*picked*/
|
|
2416
|
+
16384 | i.$$.dirty[1] & /*mapController*/
|
|
2417
|
+
512 | i.$$.dirty[2] & /*markedFeatures, showPolygonMarker*/
|
|
2418
|
+
33 && _ && _.setFeatures(V, C, n), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
2419
|
+
32768 | i.$$.dirty[1] & /*mapController*/
|
|
2420
|
+
512 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2421
|
+
1 && V && _ && _.setSelectedMarker(W), i.$$.dirty[2] & /*selected, autocompleteTimeoutRef*/
|
|
2422
|
+
10 && r && (window.clearTimeout(ne), t(63, ne = void 0)), i.$$.dirty[0] & /*searchValue*/
|
|
2407
2423
|
2 | i.$$.dirty[1] & /*mapController*/
|
|
2408
2424
|
512 && _) {
|
|
2409
|
-
const h =
|
|
2425
|
+
const h = kt(F);
|
|
2410
2426
|
_.setReverseMarker(h ? [h.decimalLongitude, h.decimalLatitude] : void 0);
|
|
2411
2427
|
}
|
|
2412
2428
|
i.$$.dirty[2] & /*selected*/
|
|
2413
|
-
|
|
2414
|
-
16384 &&
|
|
2415
|
-
73744 && t(
|
|
2416
|
-
|
|
2417
|
-
8192 &&
|
|
2418
|
-
|
|
2419
|
-
1 &&
|
|
2420
|
-
2 &&
|
|
2429
|
+
8 && _e("select", { feature: r }), i.$$.dirty[0] & /*picked*/
|
|
2430
|
+
16384 && _e("pick", { feature: C }), i.$$.dirty[0] & /*listFeatures, focusedDelayed, keepListOpen*/
|
|
2431
|
+
73744 && t(66, o = !!(R != null && R.length) && (Be || y)), i.$$.dirty[2] & /*optionsVisible*/
|
|
2432
|
+
16 && _e("optionsvisibilitychange", { optionsVisible: o }), i.$$.dirty[0] & /*listFeatures*/
|
|
2433
|
+
8192 && _e("featureslisted", { features: R }), i.$$.dirty[2] & /*markedFeatures*/
|
|
2434
|
+
1 && _e("featuresmarked", { features: V }), i.$$.dirty[0] & /*reverseActive*/
|
|
2435
|
+
1 && _e("reversetoggle", { reverse: z }), i.$$.dirty[0] & /*searchValue*/
|
|
2436
|
+
2 && _e("querychange", { query: F }), i.$$.dirty[0] & /*reverseActive*/
|
|
2421
2437
|
1 | i.$$.dirty[1] & /*mapController*/
|
|
2422
|
-
512 && _ && _.indicateReverse(
|
|
2438
|
+
512 && _ && _.indicateReverse(z);
|
|
2423
2439
|
}, [
|
|
2424
|
-
|
|
2425
|
-
|
|
2440
|
+
z,
|
|
2441
|
+
F,
|
|
2426
2442
|
u,
|
|
2427
2443
|
d,
|
|
2428
2444
|
y,
|
|
2429
2445
|
v,
|
|
2430
2446
|
E,
|
|
2431
2447
|
L,
|
|
2432
|
-
T,
|
|
2433
|
-
$,
|
|
2434
|
-
se,
|
|
2435
|
-
Yt,
|
|
2436
|
-
Xt,
|
|
2437
2448
|
I,
|
|
2449
|
+
ee,
|
|
2450
|
+
se,
|
|
2451
|
+
Jt,
|
|
2452
|
+
$t,
|
|
2453
|
+
R,
|
|
2438
2454
|
C,
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2455
|
+
W,
|
|
2456
|
+
Be,
|
|
2457
|
+
he,
|
|
2442
2458
|
le,
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
sn,
|
|
2446
|
-
$t,
|
|
2459
|
+
fe,
|
|
2460
|
+
Re,
|
|
2447
2461
|
an,
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2462
|
+
ii,
|
|
2463
|
+
hn,
|
|
2464
|
+
ni,
|
|
2465
|
+
Pt,
|
|
2466
|
+
ri,
|
|
2467
|
+
mn,
|
|
2452
2468
|
c,
|
|
2453
2469
|
f,
|
|
2454
2470
|
a,
|
|
2455
|
-
g,
|
|
2456
2471
|
m,
|
|
2472
|
+
g,
|
|
2457
2473
|
b,
|
|
2458
2474
|
w,
|
|
2459
|
-
|
|
2475
|
+
T,
|
|
2460
2476
|
P,
|
|
2461
2477
|
x,
|
|
2462
2478
|
S,
|
|
@@ -2464,36 +2480,34 @@ function Br(i, e, t) {
|
|
|
2464
2480
|
_,
|
|
2465
2481
|
M,
|
|
2466
2482
|
k,
|
|
2467
|
-
Ke,
|
|
2468
|
-
Je,
|
|
2469
|
-
Oe,
|
|
2470
|
-
$e,
|
|
2471
2483
|
et,
|
|
2472
|
-
ke,
|
|
2473
|
-
yt,
|
|
2474
2484
|
tt,
|
|
2475
|
-
it,
|
|
2476
|
-
bt,
|
|
2477
|
-
vt,
|
|
2478
2485
|
wt,
|
|
2486
|
+
Ne,
|
|
2487
|
+
it,
|
|
2488
|
+
nt,
|
|
2489
|
+
Te,
|
|
2479
2490
|
_t,
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2491
|
+
rt,
|
|
2492
|
+
ot,
|
|
2493
|
+
Et,
|
|
2494
|
+
Lt,
|
|
2495
|
+
St,
|
|
2496
|
+
xt,
|
|
2484
2497
|
on,
|
|
2498
|
+
sn,
|
|
2499
|
+
ei,
|
|
2500
|
+
ln,
|
|
2501
|
+
un,
|
|
2485
2502
|
V,
|
|
2486
|
-
|
|
2503
|
+
ne,
|
|
2504
|
+
Mt,
|
|
2487
2505
|
r,
|
|
2488
2506
|
o,
|
|
2489
2507
|
n,
|
|
2490
2508
|
s,
|
|
2491
2509
|
l,
|
|
2492
|
-
fn,
|
|
2493
|
-
dn,
|
|
2494
|
-
hn,
|
|
2495
2510
|
gn,
|
|
2496
|
-
mn,
|
|
2497
2511
|
pn,
|
|
2498
2512
|
yn,
|
|
2499
2513
|
bn,
|
|
@@ -2501,17 +2515,21 @@ function Br(i, e, t) {
|
|
|
2501
2515
|
wn,
|
|
2502
2516
|
_n,
|
|
2503
2517
|
En,
|
|
2504
|
-
Ln
|
|
2518
|
+
Ln,
|
|
2519
|
+
Sn,
|
|
2520
|
+
xn,
|
|
2521
|
+
Mn,
|
|
2522
|
+
kn
|
|
2505
2523
|
];
|
|
2506
2524
|
}
|
|
2507
|
-
let
|
|
2525
|
+
let jr = class extends Ae {
|
|
2508
2526
|
constructor(e) {
|
|
2509
|
-
super(),
|
|
2527
|
+
super(), We(
|
|
2510
2528
|
this,
|
|
2511
2529
|
e,
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2530
|
+
Gr,
|
|
2531
|
+
Dr,
|
|
2532
|
+
ze,
|
|
2515
2533
|
{
|
|
2516
2534
|
ZOOM_DEFAULTS: 28,
|
|
2517
2535
|
class: 2,
|
|
@@ -2542,23 +2560,24 @@ let Fr = class extends Ie {
|
|
|
2542
2560
|
pickedResultStyle: 43,
|
|
2543
2561
|
showPlaceType: 11,
|
|
2544
2562
|
showResultsWhileTyping: 44,
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2563
|
+
autocompleteTimeout: 45,
|
|
2564
|
+
selectFirst: 46,
|
|
2565
|
+
flyToSelected: 47,
|
|
2566
|
+
markerOnSelected: 48,
|
|
2567
|
+
types: 49,
|
|
2568
|
+
exhaustiveReverseGeocoding: 50,
|
|
2569
|
+
excludeTypes: 51,
|
|
2570
|
+
zoom: 52,
|
|
2571
|
+
apiUrl: 53,
|
|
2572
|
+
fetchParameters: 54,
|
|
2554
2573
|
iconsBaseUrl: 12,
|
|
2555
|
-
adjustUrlQuery:
|
|
2556
|
-
adjustUrl:
|
|
2557
|
-
focus:
|
|
2558
|
-
blur:
|
|
2559
|
-
setQuery:
|
|
2560
|
-
clearList:
|
|
2561
|
-
clearMap:
|
|
2574
|
+
adjustUrlQuery: 55,
|
|
2575
|
+
adjustUrl: 56,
|
|
2576
|
+
focus: 57,
|
|
2577
|
+
blur: 58,
|
|
2578
|
+
setQuery: 59,
|
|
2579
|
+
clearList: 60,
|
|
2580
|
+
clearMap: 61
|
|
2562
2581
|
},
|
|
2563
2582
|
null,
|
|
2564
2583
|
[-1, -1, -1, -1]
|
|
@@ -2568,26 +2587,26 @@ let Fr = class extends Ie {
|
|
|
2568
2587
|
return this.$$.ctx[28];
|
|
2569
2588
|
}
|
|
2570
2589
|
get focus() {
|
|
2571
|
-
return this.$$.ctx[
|
|
2590
|
+
return this.$$.ctx[57];
|
|
2572
2591
|
}
|
|
2573
2592
|
get blur() {
|
|
2574
|
-
return this.$$.ctx[
|
|
2593
|
+
return this.$$.ctx[58];
|
|
2575
2594
|
}
|
|
2576
2595
|
get setQuery() {
|
|
2577
|
-
return this.$$.ctx[
|
|
2596
|
+
return this.$$.ctx[59];
|
|
2578
2597
|
}
|
|
2579
2598
|
get clearList() {
|
|
2580
|
-
return this.$$.ctx[
|
|
2599
|
+
return this.$$.ctx[60];
|
|
2581
2600
|
}
|
|
2582
2601
|
get clearMap() {
|
|
2583
|
-
return this.$$.ctx[
|
|
2602
|
+
return this.$$.ctx[61];
|
|
2584
2603
|
}
|
|
2585
2604
|
};
|
|
2586
|
-
function
|
|
2605
|
+
function yt(i, e, t = {}) {
|
|
2587
2606
|
const n = { type: "Feature" };
|
|
2588
2607
|
return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
|
|
2589
2608
|
}
|
|
2590
|
-
function
|
|
2609
|
+
function Yt(i, e, t = {}) {
|
|
2591
2610
|
for (const r of i) {
|
|
2592
2611
|
if (r.length < 4)
|
|
2593
2612
|
throw new Error(
|
|
@@ -2599,31 +2618,31 @@ function Vt(i, e, t = {}) {
|
|
|
2599
2618
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2600
2619
|
throw new Error("First and last Position are not equivalent.");
|
|
2601
2620
|
}
|
|
2602
|
-
return
|
|
2621
|
+
return yt({
|
|
2603
2622
|
type: "Polygon",
|
|
2604
2623
|
coordinates: i
|
|
2605
2624
|
}, e, t);
|
|
2606
2625
|
}
|
|
2607
|
-
function
|
|
2626
|
+
function Gt(i, e = {}) {
|
|
2608
2627
|
const t = { type: "FeatureCollection" };
|
|
2609
2628
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
|
|
2610
2629
|
}
|
|
2611
|
-
function
|
|
2612
|
-
return
|
|
2630
|
+
function en(i, e, t = {}) {
|
|
2631
|
+
return yt({
|
|
2613
2632
|
type: "MultiPolygon",
|
|
2614
2633
|
coordinates: i
|
|
2615
2634
|
}, e, t);
|
|
2616
2635
|
}
|
|
2617
|
-
function
|
|
2636
|
+
function tn(i, e, t) {
|
|
2618
2637
|
if (i !== null)
|
|
2619
|
-
for (var n, r, o, l, s, c, u, f = 0, a = 0, d,
|
|
2620
|
-
u =
|
|
2638
|
+
for (var n, r, o, l, s, c, u, f = 0, a = 0, d, m = i.type, g = m === "FeatureCollection", y = m === "Feature", v = g ? i.features.length : 1, b = 0; b < v; b++) {
|
|
2639
|
+
u = g ? i.features[b].geometry : y ? i.geometry : i, d = u ? u.type === "GeometryCollection" : !1, s = d ? u.geometries.length : 1;
|
|
2621
2640
|
for (var w = 0; w < s; w++) {
|
|
2622
2641
|
var E = 0, L = 0;
|
|
2623
2642
|
if (l = d ? u.geometries[w] : u, l !== null) {
|
|
2624
2643
|
c = l.coordinates;
|
|
2625
|
-
var
|
|
2626
|
-
switch (f = 0,
|
|
2644
|
+
var T = l.type;
|
|
2645
|
+
switch (f = 0, T) {
|
|
2627
2646
|
case null:
|
|
2628
2647
|
break;
|
|
2629
2648
|
case "Point":
|
|
@@ -2648,9 +2667,9 @@ function Ji(i, e, t) {
|
|
|
2648
2667
|
L
|
|
2649
2668
|
) === !1)
|
|
2650
2669
|
return !1;
|
|
2651
|
-
a++,
|
|
2670
|
+
a++, T === "MultiPoint" && E++;
|
|
2652
2671
|
}
|
|
2653
|
-
|
|
2672
|
+
T === "LineString" && E++;
|
|
2654
2673
|
break;
|
|
2655
2674
|
case "Polygon":
|
|
2656
2675
|
case "MultiLineString":
|
|
@@ -2666,9 +2685,9 @@ function Ji(i, e, t) {
|
|
|
2666
2685
|
return !1;
|
|
2667
2686
|
a++;
|
|
2668
2687
|
}
|
|
2669
|
-
|
|
2688
|
+
T === "MultiLineString" && E++, T === "Polygon" && L++;
|
|
2670
2689
|
}
|
|
2671
|
-
|
|
2690
|
+
T === "Polygon" && E++;
|
|
2672
2691
|
break;
|
|
2673
2692
|
case "MultiPolygon":
|
|
2674
2693
|
for (n = 0; n < c.length; n++) {
|
|
@@ -2691,7 +2710,7 @@ function Ji(i, e, t) {
|
|
|
2691
2710
|
break;
|
|
2692
2711
|
case "GeometryCollection":
|
|
2693
2712
|
for (n = 0; n < l.geometries.length; n++)
|
|
2694
|
-
if (
|
|
2713
|
+
if (tn(l.geometries[n], e) === !1)
|
|
2695
2714
|
return !1;
|
|
2696
2715
|
break;
|
|
2697
2716
|
default:
|
|
@@ -2701,10 +2720,10 @@ function Ji(i, e, t) {
|
|
|
2701
2720
|
}
|
|
2702
2721
|
}
|
|
2703
2722
|
}
|
|
2704
|
-
function
|
|
2705
|
-
var t, n, r, o, l, s, c, u, f, a, d = 0,
|
|
2723
|
+
function Xt(i, e) {
|
|
2724
|
+
var t, n, r, o, l, s, c, u, f, a, d = 0, m = i.type === "FeatureCollection", g = i.type === "Feature", y = m ? i.features.length : 1;
|
|
2706
2725
|
for (t = 0; t < y; t++) {
|
|
2707
|
-
for (s =
|
|
2726
|
+
for (s = m ? i.features[t].geometry : g ? i.geometry : i, u = m ? i.features[t].properties : g ? i.properties : {}, f = m ? i.features[t].bbox : g ? i.bbox : void 0, a = m ? i.features[t].id : g ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, l = c ? s.geometries.length : 1, r = 0; r < l; r++) {
|
|
2708
2727
|
if (o = c ? s.geometries[r] : s, o === null) {
|
|
2709
2728
|
if (e(
|
|
2710
2729
|
null,
|
|
@@ -2752,8 +2771,8 @@ function Zt(i, e) {
|
|
|
2752
2771
|
d++;
|
|
2753
2772
|
}
|
|
2754
2773
|
}
|
|
2755
|
-
function
|
|
2756
|
-
|
|
2774
|
+
function qr(i, e) {
|
|
2775
|
+
Xt(i, function(t, n, r, o, l) {
|
|
2757
2776
|
var s = t === null ? null : t.type;
|
|
2758
2777
|
switch (s) {
|
|
2759
2778
|
case null:
|
|
@@ -2761,7 +2780,7 @@ function Ur(i, e) {
|
|
|
2761
2780
|
case "LineString":
|
|
2762
2781
|
case "Polygon":
|
|
2763
2782
|
return e(
|
|
2764
|
-
|
|
2783
|
+
yt(t, r, { bbox: o, id: l }),
|
|
2765
2784
|
n,
|
|
2766
2785
|
0
|
|
2767
2786
|
) === !1 ? !1 : void 0;
|
|
@@ -2783,20 +2802,20 @@ function Ur(i, e) {
|
|
|
2783
2802
|
type: c,
|
|
2784
2803
|
coordinates: f
|
|
2785
2804
|
};
|
|
2786
|
-
if (e(
|
|
2805
|
+
if (e(yt(a, r), n, u) === !1)
|
|
2787
2806
|
return !1;
|
|
2788
2807
|
}
|
|
2789
2808
|
});
|
|
2790
2809
|
}
|
|
2791
|
-
function
|
|
2810
|
+
function Qr(i, e = {}) {
|
|
2792
2811
|
if (i.bbox != null && e.recompute !== !0)
|
|
2793
2812
|
return i.bbox;
|
|
2794
2813
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
2795
|
-
return
|
|
2814
|
+
return tn(i, (n) => {
|
|
2796
2815
|
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]);
|
|
2797
2816
|
}), t;
|
|
2798
2817
|
}
|
|
2799
|
-
var
|
|
2818
|
+
var Ni = Qr;
|
|
2800
2819
|
/**
|
|
2801
2820
|
* splaytree v3.1.2
|
|
2802
2821
|
* Fast Splay tree for Node and browser
|
|
@@ -2819,7 +2838,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2819
2838
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2820
2839
|
and limitations under the License.
|
|
2821
2840
|
***************************************************************************** */
|
|
2822
|
-
function
|
|
2841
|
+
function Vr(i, e) {
|
|
2823
2842
|
var t = { label: 0, sent: function() {
|
|
2824
2843
|
if (o[0] & 1) throw o[1];
|
|
2825
2844
|
return o[1];
|
|
@@ -2879,7 +2898,7 @@ function Gr(i, e) {
|
|
|
2879
2898
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
2880
2899
|
}
|
|
2881
2900
|
}
|
|
2882
|
-
var
|
|
2901
|
+
var Ce = (
|
|
2883
2902
|
/** @class */
|
|
2884
2903
|
/* @__PURE__ */ function() {
|
|
2885
2904
|
function i(e, t) {
|
|
@@ -2888,11 +2907,11 @@ var xe = (
|
|
|
2888
2907
|
return i;
|
|
2889
2908
|
}()
|
|
2890
2909
|
);
|
|
2891
|
-
function
|
|
2910
|
+
function Zr(i, e) {
|
|
2892
2911
|
return i > e ? 1 : i < e ? -1 : 0;
|
|
2893
2912
|
}
|
|
2894
|
-
function
|
|
2895
|
-
for (var n = new
|
|
2913
|
+
function Le(i, e, t) {
|
|
2914
|
+
for (var n = new Ce(null, null), r = n, o = n; ; ) {
|
|
2896
2915
|
var l = t(i, e.key);
|
|
2897
2916
|
if (l < 0) {
|
|
2898
2917
|
if (e.left === null)
|
|
@@ -2917,46 +2936,46 @@ function we(i, e, t) {
|
|
|
2917
2936
|
}
|
|
2918
2937
|
return r.right = e.left, o.left = e.right, e.left = n.right, e.right = n.left, e;
|
|
2919
2938
|
}
|
|
2920
|
-
function
|
|
2921
|
-
var r = new
|
|
2939
|
+
function At(i, e, t, n) {
|
|
2940
|
+
var r = new Ce(i, e);
|
|
2922
2941
|
if (t === null)
|
|
2923
2942
|
return r.left = r.right = null, r;
|
|
2924
|
-
t =
|
|
2943
|
+
t = Le(i, t, n);
|
|
2925
2944
|
var o = n(i, t.key);
|
|
2926
2945
|
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;
|
|
2927
2946
|
}
|
|
2928
|
-
function
|
|
2947
|
+
function Ti(i, e, t) {
|
|
2929
2948
|
var n = null, r = null;
|
|
2930
2949
|
if (e) {
|
|
2931
|
-
e =
|
|
2950
|
+
e = Le(i, e, t);
|
|
2932
2951
|
var o = t(e.key, i);
|
|
2933
2952
|
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);
|
|
2934
2953
|
}
|
|
2935
2954
|
return { left: n, right: r };
|
|
2936
2955
|
}
|
|
2937
|
-
function
|
|
2938
|
-
return e === null ? i : (i === null || (e =
|
|
2956
|
+
function Hr(i, e, t) {
|
|
2957
|
+
return e === null ? i : (i === null || (e = Le(i.key, e, t), e.left = i), e);
|
|
2939
2958
|
}
|
|
2940
|
-
function
|
|
2959
|
+
function jt(i, e, t, n, r) {
|
|
2941
2960
|
if (i) {
|
|
2942
2961
|
n("" + e + (t ? "└── " : "├── ") + r(i) + `
|
|
2943
2962
|
`);
|
|
2944
2963
|
var o = e + (t ? " " : "│ ");
|
|
2945
|
-
i.left &&
|
|
2964
|
+
i.left && jt(i.left, o, !1, n, r), i.right && jt(i.right, o, !0, n, r);
|
|
2946
2965
|
}
|
|
2947
2966
|
}
|
|
2948
|
-
var
|
|
2967
|
+
var Kt = (
|
|
2949
2968
|
/** @class */
|
|
2950
2969
|
function() {
|
|
2951
2970
|
function i(e) {
|
|
2952
|
-
e === void 0 && (e =
|
|
2971
|
+
e === void 0 && (e = Zr), this._root = null, this._size = 0, this._comparator = e;
|
|
2953
2972
|
}
|
|
2954
2973
|
return i.prototype.insert = function(e, t) {
|
|
2955
|
-
return this._size++, this._root =
|
|
2974
|
+
return this._size++, this._root = At(e, t, this._root, this._comparator);
|
|
2956
2975
|
}, i.prototype.add = function(e, t) {
|
|
2957
|
-
var n = new
|
|
2976
|
+
var n = new Ce(e, t);
|
|
2958
2977
|
this._root === null && (n.left = n.right = null, this._size++, this._root = n);
|
|
2959
|
-
var r = this._comparator, o =
|
|
2978
|
+
var r = this._comparator, o = Le(e, this._root, r), l = r(e, o.key);
|
|
2960
2979
|
return l === 0 ? this._root = o : (l < 0 ? (n.left = o.left, n.right = o, o.left = null) : l > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
|
|
2961
2980
|
}, i.prototype.remove = function(e) {
|
|
2962
2981
|
this._root = this._remove(e, this._root, this._comparator);
|
|
@@ -2964,15 +2983,15 @@ var Ht = (
|
|
|
2964
2983
|
var r;
|
|
2965
2984
|
if (t === null)
|
|
2966
2985
|
return null;
|
|
2967
|
-
t =
|
|
2986
|
+
t = Le(e, t, n);
|
|
2968
2987
|
var o = n(e, t.key);
|
|
2969
|
-
return o === 0 ? (t.left === null ? r = t.right : (r =
|
|
2988
|
+
return o === 0 ? (t.left === null ? r = t.right : (r = Le(e, t.left, n), r.right = t.right), this._size--, r) : t;
|
|
2970
2989
|
}, i.prototype.pop = function() {
|
|
2971
2990
|
var e = this._root;
|
|
2972
2991
|
if (e) {
|
|
2973
2992
|
for (; e.left; )
|
|
2974
2993
|
e = e.left;
|
|
2975
|
-
return this._root =
|
|
2994
|
+
return this._root = Le(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
|
|
2976
2995
|
}
|
|
2977
2996
|
return null;
|
|
2978
2997
|
}, i.prototype.findStatic = function(e) {
|
|
@@ -2984,7 +3003,7 @@ var Ht = (
|
|
|
2984
3003
|
}
|
|
2985
3004
|
return null;
|
|
2986
3005
|
}, i.prototype.find = function(e) {
|
|
2987
|
-
return this._root && (this._root =
|
|
3006
|
+
return this._root && (this._root = Le(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2988
3007
|
}, i.prototype.contains = function(e) {
|
|
2989
3008
|
for (var t = this._root, n = this._comparator; t; ) {
|
|
2990
3009
|
var r = n(e, t.key);
|
|
@@ -3077,15 +3096,15 @@ var Ht = (
|
|
|
3077
3096
|
}, i.prototype.clear = function() {
|
|
3078
3097
|
return this._root = null, this._size = 0, this;
|
|
3079
3098
|
}, i.prototype.toList = function() {
|
|
3080
|
-
return
|
|
3099
|
+
return Xr(this._root);
|
|
3081
3100
|
}, i.prototype.load = function(e, t, n) {
|
|
3082
3101
|
t === void 0 && (t = []), n === void 0 && (n = !1);
|
|
3083
3102
|
var r = e.length, o = this._comparator;
|
|
3084
|
-
if (n &&
|
|
3085
|
-
this._root =
|
|
3103
|
+
if (n && Vt(e, t, 0, r - 1, o), this._root === null)
|
|
3104
|
+
this._root = qt(e, t, 0, r), this._size = r;
|
|
3086
3105
|
else {
|
|
3087
|
-
var l =
|
|
3088
|
-
r = this._size + r, this._root =
|
|
3106
|
+
var l = Kr(this.toList(), Yr(e, t), o);
|
|
3107
|
+
r = this._size + r, this._root = Qt({ head: l }, 0, r);
|
|
3089
3108
|
}
|
|
3090
3109
|
return this;
|
|
3091
3110
|
}, i.prototype.isEmpty = function() {
|
|
@@ -3107,17 +3126,17 @@ var Ht = (
|
|
|
3107
3126
|
return String(n.key);
|
|
3108
3127
|
});
|
|
3109
3128
|
var t = [];
|
|
3110
|
-
return
|
|
3129
|
+
return jt(this._root, "", !0, function(n) {
|
|
3111
3130
|
return t.push(n);
|
|
3112
3131
|
}, e), t.join("");
|
|
3113
3132
|
}, i.prototype.update = function(e, t, n) {
|
|
3114
|
-
var r = this._comparator, o =
|
|
3115
|
-
r(e, t) < 0 ? s =
|
|
3133
|
+
var r = this._comparator, o = Ti(e, this._root, r), l = o.left, s = o.right;
|
|
3134
|
+
r(e, t) < 0 ? s = At(t, n, s, r) : l = At(t, n, l, r), this._root = Hr(l, s, r);
|
|
3116
3135
|
}, i.prototype.split = function(e) {
|
|
3117
|
-
return
|
|
3136
|
+
return Ti(e, this._root, this._comparator);
|
|
3118
3137
|
}, i.prototype[Symbol.iterator] = function() {
|
|
3119
3138
|
var e, t, n;
|
|
3120
|
-
return
|
|
3139
|
+
return Vr(this, function(r) {
|
|
3121
3140
|
switch (r.label) {
|
|
3122
3141
|
case 0:
|
|
3123
3142
|
e = this._root, t = [], n = !1, r.label = 1;
|
|
@@ -3141,38 +3160,38 @@ var Ht = (
|
|
|
3141
3160
|
}, i;
|
|
3142
3161
|
}()
|
|
3143
3162
|
);
|
|
3144
|
-
function
|
|
3163
|
+
function qt(i, e, t, n) {
|
|
3145
3164
|
var r = n - t;
|
|
3146
3165
|
if (r > 0) {
|
|
3147
|
-
var o = t + Math.floor(r / 2), l = i[o], s = e[o], c = new
|
|
3148
|
-
return c.left =
|
|
3166
|
+
var o = t + Math.floor(r / 2), l = i[o], s = e[o], c = new Ce(l, s);
|
|
3167
|
+
return c.left = qt(i, e, t, o), c.right = qt(i, e, o + 1, n), c;
|
|
3149
3168
|
}
|
|
3150
3169
|
return null;
|
|
3151
3170
|
}
|
|
3152
|
-
function
|
|
3153
|
-
for (var t = new
|
|
3154
|
-
n = n.next = new
|
|
3171
|
+
function Yr(i, e) {
|
|
3172
|
+
for (var t = new Ce(null, null), n = t, r = 0; r < i.length; r++)
|
|
3173
|
+
n = n.next = new Ce(i[r], e[r]);
|
|
3155
3174
|
return n.next = null, t.next;
|
|
3156
3175
|
}
|
|
3157
|
-
function
|
|
3158
|
-
for (var e = i, t = [], n = !1, r = new
|
|
3176
|
+
function Xr(i) {
|
|
3177
|
+
for (var e = i, t = [], n = !1, r = new Ce(null, null), o = r; !n; )
|
|
3159
3178
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : n = !0;
|
|
3160
3179
|
return o.next = null, r.next;
|
|
3161
3180
|
}
|
|
3162
|
-
function
|
|
3181
|
+
function Qt(i, e, t) {
|
|
3163
3182
|
var n = t - e;
|
|
3164
3183
|
if (n > 0) {
|
|
3165
|
-
var r = e + Math.floor(n / 2), o =
|
|
3166
|
-
return l.left = o, i.head = i.head.next, l.right =
|
|
3184
|
+
var r = e + Math.floor(n / 2), o = Qt(i, e, r), l = i.head;
|
|
3185
|
+
return l.left = o, i.head = i.head.next, l.right = Qt(i, r + 1, t), l;
|
|
3167
3186
|
}
|
|
3168
3187
|
return null;
|
|
3169
3188
|
}
|
|
3170
|
-
function
|
|
3171
|
-
for (var n = new
|
|
3189
|
+
function Kr(i, e, t) {
|
|
3190
|
+
for (var n = new Ce(null, null), r = n, o = i, l = e; o !== null && l !== null; )
|
|
3172
3191
|
t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
|
|
3173
3192
|
return o !== null ? r.next = o : l !== null && (r.next = l), n.next;
|
|
3174
3193
|
}
|
|
3175
|
-
function
|
|
3194
|
+
function Vt(i, e, t, n, r) {
|
|
3176
3195
|
if (!(t >= n)) {
|
|
3177
3196
|
for (var o = i[t + n >> 1], l = t - 1, s = n + 1; ; ) {
|
|
3178
3197
|
do
|
|
@@ -3186,51 +3205,51 @@ function jt(i, e, t, n, r) {
|
|
|
3186
3205
|
var c = i[l];
|
|
3187
3206
|
i[l] = i[s], i[s] = c, c = e[l], e[l] = e[s], e[s] = c;
|
|
3188
3207
|
}
|
|
3189
|
-
|
|
3208
|
+
Vt(i, e, t, s, r), Vt(i, e, s + 1, n, r);
|
|
3190
3209
|
}
|
|
3191
3210
|
}
|
|
3192
|
-
const
|
|
3193
|
-
function
|
|
3211
|
+
const pe = 11102230246251565e-32, J = 134217729, Jr = (3 + 8 * pe) * pe;
|
|
3212
|
+
function Bt(i, e, t, n, r) {
|
|
3194
3213
|
let o, l, s, c, u = e[0], f = n[0], a = 0, d = 0;
|
|
3195
3214
|
f > u == f > -u ? (o = u, u = e[++a]) : (o = f, f = n[++d]);
|
|
3196
|
-
let
|
|
3215
|
+
let m = 0;
|
|
3197
3216
|
if (a < i && d < t)
|
|
3198
|
-
for (f > u == f > -u ? (l = u + o, s = o - (l - u), u = e[++a]) : (l = f + o, s = o - (l - f), f = n[++d]), o = l, s !== 0 && (r[
|
|
3199
|
-
f > u == f > -u ? (l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a]) : (l = o + f, c = l - o, s = o - (l - c) + (f - c), f = n[++d]), o = l, s !== 0 && (r[
|
|
3217
|
+
for (f > u == f > -u ? (l = u + o, s = o - (l - u), u = e[++a]) : (l = f + o, s = o - (l - f), f = n[++d]), o = l, s !== 0 && (r[m++] = s); a < i && d < t; )
|
|
3218
|
+
f > u == f > -u ? (l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a]) : (l = o + f, c = l - o, s = o - (l - c) + (f - c), f = n[++d]), o = l, s !== 0 && (r[m++] = s);
|
|
3200
3219
|
for (; a < i; )
|
|
3201
|
-
l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a], o = l, s !== 0 && (r[
|
|
3220
|
+
l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a], o = l, s !== 0 && (r[m++] = s);
|
|
3202
3221
|
for (; d < t; )
|
|
3203
|
-
l = o + f, c = l - o, s = o - (l - c) + (f - c), f = n[++d], o = l, s !== 0 && (r[
|
|
3204
|
-
return (o !== 0 ||
|
|
3222
|
+
l = o + f, c = l - o, s = o - (l - c) + (f - c), f = n[++d], o = l, s !== 0 && (r[m++] = s);
|
|
3223
|
+
return (o !== 0 || m === 0) && (r[m++] = o), m;
|
|
3205
3224
|
}
|
|
3206
|
-
function
|
|
3225
|
+
function $r(i, e) {
|
|
3207
3226
|
let t = e[0];
|
|
3208
3227
|
for (let n = 1; n < i; n++) t += e[n];
|
|
3209
3228
|
return t;
|
|
3210
3229
|
}
|
|
3211
|
-
function
|
|
3230
|
+
function $e(i) {
|
|
3212
3231
|
return new Float64Array(i);
|
|
3213
3232
|
}
|
|
3214
|
-
const
|
|
3215
|
-
function
|
|
3216
|
-
let s, c, u, f, a, d,
|
|
3217
|
-
const N = i - r, _ = t - r, M = e - o,
|
|
3218
|
-
L = N *
|
|
3219
|
-
let
|
|
3220
|
-
if (
|
|
3221
|
-
L = s *
|
|
3222
|
-
const
|
|
3223
|
-
L = N * f, d =
|
|
3224
|
-
const se =
|
|
3225
|
-
L = s * f, d =
|
|
3226
|
-
const
|
|
3227
|
-
return
|
|
3228
|
-
}
|
|
3229
|
-
function
|
|
3233
|
+
const eo = (3 + 16 * pe) * pe, to = (2 + 12 * pe) * pe, io = (9 + 64 * pe) * pe * pe, Ue = $e(4), Ri = $e(8), Ii = $e(12), Oi = $e(16), te = $e(4);
|
|
3234
|
+
function no(i, e, t, n, r, o, l) {
|
|
3235
|
+
let s, c, u, f, a, d, m, g, y, v, b, w, E, L, T, P, x, S;
|
|
3236
|
+
const N = i - r, _ = t - r, M = e - o, I = n - o;
|
|
3237
|
+
L = N * I, d = J * N, m = d - (d - N), g = N - m, d = J * I, y = d - (d - I), v = I - y, T = g * v - (L - m * y - g * y - m * v), P = M * _, d = J * M, m = d - (d - M), g = M - m, d = J * _, y = d - (d - _), v = _ - y, x = g * v - (P - m * y - g * y - m * v), b = T - x, a = T - b, Ue[0] = T - (b + a) + (a - x), w = L + b, a = w - L, E = L - (w - a) + (b - a), b = E - P, a = E - b, Ue[1] = E - (b + a) + (a - P), S = w + b, a = S - w, Ue[2] = w - (S - a) + (b - a), Ue[3] = S;
|
|
3238
|
+
let ee = $r(4, Ue), k = to * l;
|
|
3239
|
+
if (ee >= k || -ee >= k || (a = i - N, s = i - (N + a) + (a - r), a = t - _, u = t - (_ + a) + (a - r), a = e - M, c = e - (M + a) + (a - o), a = n - I, f = n - (I + a) + (a - o), s === 0 && c === 0 && u === 0 && f === 0) || (k = io * l + Jr * Math.abs(ee), ee += N * f + I * s - (M * u + _ * c), ee >= k || -ee >= k)) return ee;
|
|
3240
|
+
L = s * I, d = J * s, m = d - (d - s), g = s - m, d = J * I, y = d - (d - I), v = I - y, T = g * v - (L - m * y - g * y - m * v), P = c * _, d = J * c, m = d - (d - c), g = c - m, d = J * _, y = d - (d - _), v = _ - y, x = g * v - (P - m * y - g * y - m * v), b = T - x, a = T - b, te[0] = T - (b + a) + (a - x), w = L + b, a = w - L, E = L - (w - a) + (b - a), b = E - P, a = E - b, te[1] = E - (b + a) + (a - P), S = w + b, a = S - w, te[2] = w - (S - a) + (b - a), te[3] = S;
|
|
3241
|
+
const z = Bt(4, Ue, 4, te, Ri);
|
|
3242
|
+
L = N * f, d = J * N, m = d - (d - N), g = N - m, d = J * f, y = d - (d - f), v = f - y, T = g * v - (L - m * y - g * y - m * v), P = M * u, d = J * M, m = d - (d - M), g = M - m, d = J * u, y = d - (d - u), v = u - y, x = g * v - (P - m * y - g * y - m * v), b = T - x, a = T - b, te[0] = T - (b + a) + (a - x), w = L + b, a = w - L, E = L - (w - a) + (b - a), b = E - P, a = E - b, te[1] = E - (b + a) + (a - P), S = w + b, a = S - w, te[2] = w - (S - a) + (b - a), te[3] = S;
|
|
3243
|
+
const se = Bt(z, Ri, 4, te, Ii);
|
|
3244
|
+
L = s * f, d = J * s, m = d - (d - s), g = s - m, d = J * f, y = d - (d - f), v = f - y, T = g * v - (L - m * y - g * y - m * v), P = c * u, d = J * c, m = d - (d - c), g = c - m, d = J * u, y = d - (d - u), v = u - y, x = g * v - (P - m * y - g * y - m * v), b = T - x, a = T - b, te[0] = T - (b + a) + (a - x), w = L + b, a = w - L, E = L - (w - a) + (b - a), b = E - P, a = E - b, te[1] = E - (b + a) + (a - P), S = w + b, a = S - w, te[2] = w - (S - a) + (b - a), te[3] = S;
|
|
3245
|
+
const F = Bt(se, Ii, 4, te, Oi);
|
|
3246
|
+
return Oi[F - 1];
|
|
3247
|
+
}
|
|
3248
|
+
function ro(i, e, t, n, r, o) {
|
|
3230
3249
|
const l = (e - o) * (t - r), s = (i - r) * (n - o), c = l - s, u = Math.abs(l + s);
|
|
3231
|
-
return Math.abs(c) >=
|
|
3250
|
+
return Math.abs(c) >= eo * u ? c : -no(i, e, t, n, r, o, u);
|
|
3232
3251
|
}
|
|
3233
|
-
const
|
|
3252
|
+
const He = (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) => {
|
|
3234
3253
|
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;
|
|
3235
3254
|
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;
|
|
3236
3255
|
return {
|
|
@@ -3244,20 +3263,20 @@ const Qe = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
|
|
|
3244
3263
|
}
|
|
3245
3264
|
};
|
|
3246
3265
|
};
|
|
3247
|
-
let
|
|
3248
|
-
|
|
3249
|
-
const
|
|
3250
|
-
if (-
|
|
3266
|
+
let Se = Number.EPSILON;
|
|
3267
|
+
Se === void 0 && (Se = Math.pow(2, -52));
|
|
3268
|
+
const oo = Se * Se, zi = (i, e) => {
|
|
3269
|
+
if (-Se < i && i < Se && -Se < e && e < Se)
|
|
3251
3270
|
return 0;
|
|
3252
3271
|
const t = i - e;
|
|
3253
|
-
return t * t <
|
|
3272
|
+
return t * t < oo * i * e ? 0 : i < e ? -1 : 1;
|
|
3254
3273
|
};
|
|
3255
|
-
class
|
|
3274
|
+
class so {
|
|
3256
3275
|
constructor() {
|
|
3257
3276
|
this.reset();
|
|
3258
3277
|
}
|
|
3259
3278
|
reset() {
|
|
3260
|
-
this.xRounder = new
|
|
3279
|
+
this.xRounder = new Wi(), this.yRounder = new Wi();
|
|
3261
3280
|
}
|
|
3262
3281
|
round(e, t) {
|
|
3263
3282
|
return {
|
|
@@ -3266,9 +3285,9 @@ class io {
|
|
|
3266
3285
|
};
|
|
3267
3286
|
}
|
|
3268
3287
|
}
|
|
3269
|
-
class
|
|
3288
|
+
class Wi {
|
|
3270
3289
|
constructor() {
|
|
3271
|
-
this.tree = new
|
|
3290
|
+
this.tree = new Kt(), this.round(0);
|
|
3272
3291
|
}
|
|
3273
3292
|
// Note: this can rounds input values backwards or forwards.
|
|
3274
3293
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3279,16 +3298,16 @@ class Ii {
|
|
|
3279
3298
|
// angle for t-intersections).
|
|
3280
3299
|
round(e) {
|
|
3281
3300
|
const t = this.tree.add(e), n = this.tree.prev(t);
|
|
3282
|
-
if (n !== null &&
|
|
3301
|
+
if (n !== null && zi(t.key, n.key) === 0)
|
|
3283
3302
|
return this.tree.remove(e), n.key;
|
|
3284
3303
|
const r = this.tree.next(t);
|
|
3285
|
-
return r !== null &&
|
|
3304
|
+
return r !== null && zi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3286
3305
|
}
|
|
3287
3306
|
}
|
|
3288
|
-
const
|
|
3289
|
-
const n =
|
|
3307
|
+
const Je = new so(), mt = (i, e) => i.x * e.y - i.y * e.x, nn = (i, e) => i.x * e.x + i.y * e.y, Ai = (i, e, t) => {
|
|
3308
|
+
const n = ro(i.x, i.y, e.x, e.y, t.x, t.y);
|
|
3290
3309
|
return n > 0 ? -1 : n < 0 ? 1 : 0;
|
|
3291
|
-
},
|
|
3310
|
+
}, bt = (i) => Math.sqrt(nn(i, i)), lo = (i, e, t) => {
|
|
3292
3311
|
const n = {
|
|
3293
3312
|
x: e.x - i.x,
|
|
3294
3313
|
y: e.y - i.y
|
|
@@ -3296,8 +3315,8 @@ const Ye = new io(), ft = (i, e) => i.x * e.y - i.y * e.x, $i = (i, e) => i.x *
|
|
|
3296
3315
|
x: t.x - i.x,
|
|
3297
3316
|
y: t.y - i.y
|
|
3298
3317
|
};
|
|
3299
|
-
return
|
|
3300
|
-
},
|
|
3318
|
+
return mt(r, n) / bt(r) / bt(n);
|
|
3319
|
+
}, uo = (i, e, t) => {
|
|
3301
3320
|
const n = {
|
|
3302
3321
|
x: e.x - i.x,
|
|
3303
3322
|
y: e.y - i.y
|
|
@@ -3305,34 +3324,34 @@ const Ye = new io(), ft = (i, e) => i.x * e.y - i.y * e.x, $i = (i, e) => i.x *
|
|
|
3305
3324
|
x: t.x - i.x,
|
|
3306
3325
|
y: t.y - i.y
|
|
3307
3326
|
};
|
|
3308
|
-
return
|
|
3309
|
-
},
|
|
3327
|
+
return nn(r, n) / bt(r) / bt(n);
|
|
3328
|
+
}, Bi = (i, e, t) => e.y === 0 ? null : {
|
|
3310
3329
|
x: i.x + e.x / e.y * (t - i.y),
|
|
3311
3330
|
y: t
|
|
3312
|
-
},
|
|
3331
|
+
}, Fi = (i, e, t) => e.x === 0 ? null : {
|
|
3313
3332
|
x: t,
|
|
3314
3333
|
y: i.y + e.y / e.x * (t - i.x)
|
|
3315
|
-
},
|
|
3316
|
-
if (e.x === 0) return
|
|
3317
|
-
if (n.x === 0) return
|
|
3318
|
-
if (e.y === 0) return
|
|
3319
|
-
if (n.y === 0) return
|
|
3320
|
-
const r =
|
|
3334
|
+
}, ao = (i, e, t, n) => {
|
|
3335
|
+
if (e.x === 0) return Fi(t, n, i.x);
|
|
3336
|
+
if (n.x === 0) return Fi(i, e, t.x);
|
|
3337
|
+
if (e.y === 0) return Bi(t, n, i.y);
|
|
3338
|
+
if (n.y === 0) return Bi(i, e, t.y);
|
|
3339
|
+
const r = mt(e, n);
|
|
3321
3340
|
if (r == 0) return null;
|
|
3322
3341
|
const o = {
|
|
3323
3342
|
x: t.x - i.x,
|
|
3324
3343
|
y: t.y - i.y
|
|
3325
|
-
}, l =
|
|
3344
|
+
}, l = mt(o, e) / r, s = mt(o, n) / r, c = i.x + s * e.x, u = t.x + l * n.x, f = i.y + s * e.y, a = t.y + l * n.y, d = (c + u) / 2, m = (f + a) / 2;
|
|
3326
3345
|
return {
|
|
3327
3346
|
x: d,
|
|
3328
|
-
y:
|
|
3347
|
+
y: m
|
|
3329
3348
|
};
|
|
3330
3349
|
};
|
|
3331
3350
|
class oe {
|
|
3332
3351
|
// for ordering sweep events in the sweep event queue
|
|
3333
3352
|
static compare(e, t) {
|
|
3334
3353
|
const n = oe.comparePoints(e.point, t.point);
|
|
3335
|
-
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3354
|
+
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : xe.compare(e.segment, t.segment));
|
|
3336
3355
|
}
|
|
3337
3356
|
// for ordering points in sweep line order
|
|
3338
3357
|
static comparePoints(e, t) {
|
|
@@ -3387,8 +3406,8 @@ class oe {
|
|
|
3387
3406
|
const t = /* @__PURE__ */ new Map(), n = (r) => {
|
|
3388
3407
|
const o = r.otherSE;
|
|
3389
3408
|
t.set(r, {
|
|
3390
|
-
sine:
|
|
3391
|
-
cosine:
|
|
3409
|
+
sine: lo(this.point, e.point, o.point),
|
|
3410
|
+
cosine: uo(this.point, e.point, o.point)
|
|
3392
3411
|
});
|
|
3393
3412
|
};
|
|
3394
3413
|
return (r, o) => {
|
|
@@ -3404,8 +3423,8 @@ class oe {
|
|
|
3404
3423
|
};
|
|
3405
3424
|
}
|
|
3406
3425
|
}
|
|
3407
|
-
let
|
|
3408
|
-
class
|
|
3426
|
+
let co = 0;
|
|
3427
|
+
class xe {
|
|
3409
3428
|
/* This compare() function is for ordering segments in the sweep
|
|
3410
3429
|
* line tree, and does so according to the following criteria:
|
|
3411
3430
|
*
|
|
@@ -3453,16 +3472,16 @@ class Ee {
|
|
|
3453
3472
|
if (a > 0) return -1;
|
|
3454
3473
|
}
|
|
3455
3474
|
if (o !== l) {
|
|
3456
|
-
const a = u - s, d = o - n,
|
|
3457
|
-
if (a > d &&
|
|
3458
|
-
if (a < d &&
|
|
3475
|
+
const a = u - s, d = o - n, m = f - c, g = l - r;
|
|
3476
|
+
if (a > d && m < g) return 1;
|
|
3477
|
+
if (a < d && m > g) return -1;
|
|
3459
3478
|
}
|
|
3460
3479
|
return o > l ? 1 : o < l || u < f ? -1 : u > f ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
3461
3480
|
}
|
|
3462
3481
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3463
3482
|
* and possibly will be later modified */
|
|
3464
3483
|
constructor(e, t, n, r) {
|
|
3465
|
-
this.id = ++
|
|
3484
|
+
this.id = ++co, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
3466
3485
|
}
|
|
3467
3486
|
static fromRing(e, t, n) {
|
|
3468
3487
|
let r, o, l;
|
|
@@ -3473,7 +3492,7 @@ class Ee {
|
|
|
3473
3492
|
r = t, o = e, l = -1;
|
|
3474
3493
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3475
3494
|
const c = new oe(r, !0), u = new oe(o, !1);
|
|
3476
|
-
return new
|
|
3495
|
+
return new xe(c, u, [n], [l]);
|
|
3477
3496
|
}
|
|
3478
3497
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3479
3498
|
replaceRightSE(e) {
|
|
@@ -3541,9 +3560,9 @@ class Ee {
|
|
|
3541
3560
|
* Else, return null.
|
|
3542
3561
|
*/
|
|
3543
3562
|
getIntersection(e) {
|
|
3544
|
-
const t = this.bbox(), n = e.bbox(), r =
|
|
3563
|
+
const t = this.bbox(), n = e.bbox(), r = Zt(t, n);
|
|
3545
3564
|
if (r === null) return null;
|
|
3546
|
-
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u =
|
|
3565
|
+
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u = He(t, s) && this.comparePoint(s) === 0, f = He(n, o) && e.comparePoint(o) === 0, a = He(t, c) && this.comparePoint(c) === 0, d = He(n, l) && e.comparePoint(l) === 0;
|
|
3547
3566
|
if (f && u)
|
|
3548
3567
|
return d && !a ? l : !d && a ? c : null;
|
|
3549
3568
|
if (f)
|
|
@@ -3553,8 +3572,8 @@ class Ee {
|
|
|
3553
3572
|
if (d && a) return null;
|
|
3554
3573
|
if (d) return l;
|
|
3555
3574
|
if (a) return c;
|
|
3556
|
-
const
|
|
3557
|
-
return
|
|
3575
|
+
const m = ao(o, this.vector(), s, e.vector());
|
|
3576
|
+
return m === null || !He(r, m) ? null : Je.round(m.x, m.y);
|
|
3558
3577
|
}
|
|
3559
3578
|
/**
|
|
3560
3579
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3571,7 +3590,7 @@ class Ee {
|
|
|
3571
3590
|
split(e) {
|
|
3572
3591
|
const t = [], n = e.events !== void 0, r = new oe(e, !0), o = new oe(e, !1), l = this.rightSE;
|
|
3573
3592
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3574
|
-
const s = new
|
|
3593
|
+
const s = new xe(r, l, this.rings.slice(), this.windings.slice());
|
|
3575
3594
|
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;
|
|
3576
3595
|
}
|
|
3577
3596
|
/* Swap which event is left and right */
|
|
@@ -3587,7 +3606,7 @@ class Ee {
|
|
|
3587
3606
|
let t = this, n = e;
|
|
3588
3607
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3589
3608
|
for (; n.consumedBy; ) n = n.consumedBy;
|
|
3590
|
-
const r =
|
|
3609
|
+
const r = xe.compare(t, n);
|
|
3591
3610
|
if (r !== 0) {
|
|
3592
3611
|
if (r > 0) {
|
|
3593
3612
|
const o = t;
|
|
@@ -3657,7 +3676,7 @@ class Ee {
|
|
|
3657
3676
|
if (this.consumedBy) return !1;
|
|
3658
3677
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3659
3678
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3660
|
-
switch (
|
|
3679
|
+
switch (ce.type) {
|
|
3661
3680
|
case "union": {
|
|
3662
3681
|
const n = e.length === 0, r = t.length === 0;
|
|
3663
3682
|
this._isInResult = n !== r;
|
|
@@ -3665,7 +3684,7 @@ class Ee {
|
|
|
3665
3684
|
}
|
|
3666
3685
|
case "intersection": {
|
|
3667
3686
|
let n, r;
|
|
3668
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
3687
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === ce.numMultiPolys && n < r;
|
|
3669
3688
|
break;
|
|
3670
3689
|
}
|
|
3671
3690
|
case "xor": {
|
|
@@ -3679,18 +3698,18 @@ class Ee {
|
|
|
3679
3698
|
break;
|
|
3680
3699
|
}
|
|
3681
3700
|
default:
|
|
3682
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3701
|
+
throw new Error(`Unrecognized operation type found ${ce.type}`);
|
|
3683
3702
|
}
|
|
3684
3703
|
return this._isInResult;
|
|
3685
3704
|
}
|
|
3686
3705
|
}
|
|
3687
|
-
class
|
|
3706
|
+
class Ui {
|
|
3688
3707
|
constructor(e, t, n) {
|
|
3689
3708
|
if (!Array.isArray(e) || e.length === 0)
|
|
3690
3709
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3691
3710
|
if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3692
3711
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3693
|
-
const r =
|
|
3712
|
+
const r = Je.round(e[0][0], e[0][1]);
|
|
3694
3713
|
this.bbox = {
|
|
3695
3714
|
ll: {
|
|
3696
3715
|
x: r.x,
|
|
@@ -3705,10 +3724,10 @@ class Ai {
|
|
|
3705
3724
|
for (let l = 1, s = e.length; l < s; l++) {
|
|
3706
3725
|
if (typeof e[l][0] != "number" || typeof e[l][1] != "number")
|
|
3707
3726
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3708
|
-
let c =
|
|
3709
|
-
c.x === o.x && c.y === o.y || (this.segments.push(
|
|
3727
|
+
let c = Je.round(e[l][0], e[l][1]);
|
|
3728
|
+
c.x === o.x && c.y === o.y || (this.segments.push(xe.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);
|
|
3710
3729
|
}
|
|
3711
|
-
(r.x !== o.x || r.y !== o.y) && this.segments.push(
|
|
3730
|
+
(r.x !== o.x || r.y !== o.y) && this.segments.push(xe.fromRing(o, r, this));
|
|
3712
3731
|
}
|
|
3713
3732
|
getSweepEvents() {
|
|
3714
3733
|
const e = [];
|
|
@@ -3719,11 +3738,11 @@ class Ai {
|
|
|
3719
3738
|
return e;
|
|
3720
3739
|
}
|
|
3721
3740
|
}
|
|
3722
|
-
class
|
|
3741
|
+
class fo {
|
|
3723
3742
|
constructor(e, t) {
|
|
3724
3743
|
if (!Array.isArray(e))
|
|
3725
3744
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3726
|
-
this.exteriorRing = new
|
|
3745
|
+
this.exteriorRing = new Ui(e[0], this, !0), this.bbox = {
|
|
3727
3746
|
ll: {
|
|
3728
3747
|
x: this.exteriorRing.bbox.ll.x,
|
|
3729
3748
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3734,7 +3753,7 @@ class lo {
|
|
|
3734
3753
|
}
|
|
3735
3754
|
}, this.interiorRings = [];
|
|
3736
3755
|
for (let n = 1, r = e.length; n < r; n++) {
|
|
3737
|
-
const o = new
|
|
3756
|
+
const o = new Ui(e[n], this, !1);
|
|
3738
3757
|
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);
|
|
3739
3758
|
}
|
|
3740
3759
|
this.multiPoly = t;
|
|
@@ -3749,7 +3768,7 @@ class lo {
|
|
|
3749
3768
|
return e;
|
|
3750
3769
|
}
|
|
3751
3770
|
}
|
|
3752
|
-
class
|
|
3771
|
+
class Di {
|
|
3753
3772
|
constructor(e, t) {
|
|
3754
3773
|
if (!Array.isArray(e))
|
|
3755
3774
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3768,7 +3787,7 @@ class Bi {
|
|
|
3768
3787
|
}
|
|
3769
3788
|
};
|
|
3770
3789
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3771
|
-
const o = new
|
|
3790
|
+
const o = new fo(e[n], this);
|
|
3772
3791
|
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);
|
|
3773
3792
|
}
|
|
3774
3793
|
this.isSubject = t;
|
|
@@ -3783,7 +3802,7 @@ class Bi {
|
|
|
3783
3802
|
return e;
|
|
3784
3803
|
}
|
|
3785
3804
|
}
|
|
3786
|
-
class
|
|
3805
|
+
class vt {
|
|
3787
3806
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3788
3807
|
* of closed rings from all the segments marked to be part of the result */
|
|
3789
3808
|
static factory(e) {
|
|
@@ -3804,26 +3823,26 @@ class pt {
|
|
|
3804
3823
|
c = d[0].otherSE;
|
|
3805
3824
|
break;
|
|
3806
3825
|
}
|
|
3807
|
-
let
|
|
3826
|
+
let m = null;
|
|
3808
3827
|
for (let y = 0, v = a.length; y < v; y++)
|
|
3809
3828
|
if (a[y].point === s.point) {
|
|
3810
|
-
|
|
3829
|
+
m = y;
|
|
3811
3830
|
break;
|
|
3812
3831
|
}
|
|
3813
|
-
if (
|
|
3814
|
-
const y = a.splice(
|
|
3815
|
-
v.unshift(v[0].otherSE), t.push(new
|
|
3832
|
+
if (m !== null) {
|
|
3833
|
+
const y = a.splice(m)[0], v = u.splice(y.index);
|
|
3834
|
+
v.unshift(v[0].otherSE), t.push(new vt(v.reverse()));
|
|
3816
3835
|
continue;
|
|
3817
3836
|
}
|
|
3818
3837
|
a.push({
|
|
3819
3838
|
index: u.length,
|
|
3820
3839
|
point: s.point
|
|
3821
3840
|
});
|
|
3822
|
-
const
|
|
3823
|
-
c = d.sort(
|
|
3841
|
+
const g = s.getLeftmostComparator(l);
|
|
3842
|
+
c = d.sort(g)[0].otherSE;
|
|
3824
3843
|
break;
|
|
3825
3844
|
}
|
|
3826
|
-
t.push(new
|
|
3845
|
+
t.push(new vt(u));
|
|
3827
3846
|
}
|
|
3828
3847
|
return t;
|
|
3829
3848
|
}
|
|
@@ -3838,11 +3857,11 @@ class pt {
|
|
|
3838
3857
|
const t = [e];
|
|
3839
3858
|
for (let u = 1, f = this.events.length - 1; u < f; u++) {
|
|
3840
3859
|
const a = this.events[u].point, d = this.events[u + 1].point;
|
|
3841
|
-
|
|
3860
|
+
Ai(a, e, d) !== 0 && (t.push(a), e = a);
|
|
3842
3861
|
}
|
|
3843
3862
|
if (t.length === 1) return null;
|
|
3844
3863
|
const n = t[0], r = t[1];
|
|
3845
|
-
|
|
3864
|
+
Ai(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3846
3865
|
const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3847
3866
|
for (let u = l; u != s; u += o) c.push([t[u].x, t[u].y]);
|
|
3848
3867
|
return c;
|
|
@@ -3874,7 +3893,7 @@ class pt {
|
|
|
3874
3893
|
}
|
|
3875
3894
|
}
|
|
3876
3895
|
}
|
|
3877
|
-
class
|
|
3896
|
+
class Gi {
|
|
3878
3897
|
constructor(e) {
|
|
3879
3898
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3880
3899
|
}
|
|
@@ -3891,7 +3910,7 @@ class Fi {
|
|
|
3891
3910
|
return e;
|
|
3892
3911
|
}
|
|
3893
3912
|
}
|
|
3894
|
-
class
|
|
3913
|
+
class ho {
|
|
3895
3914
|
constructor(e) {
|
|
3896
3915
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3897
3916
|
}
|
|
@@ -3908,19 +3927,19 @@ class uo {
|
|
|
3908
3927
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3909
3928
|
const o = e[n];
|
|
3910
3929
|
if (!o.poly)
|
|
3911
|
-
if (o.isExteriorRing()) t.push(new
|
|
3930
|
+
if (o.isExteriorRing()) t.push(new Gi(o));
|
|
3912
3931
|
else {
|
|
3913
3932
|
const l = o.enclosingRing();
|
|
3914
|
-
l.poly || t.push(new
|
|
3933
|
+
l.poly || t.push(new Gi(l)), l.poly.addInterior(o);
|
|
3915
3934
|
}
|
|
3916
3935
|
}
|
|
3917
3936
|
return t;
|
|
3918
3937
|
}
|
|
3919
3938
|
}
|
|
3920
|
-
class
|
|
3939
|
+
class mo {
|
|
3921
3940
|
constructor(e) {
|
|
3922
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3923
|
-
this.queue = e, this.tree = new
|
|
3941
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : xe.compare;
|
|
3942
|
+
this.queue = e, this.tree = new Kt(t), this.segments = [];
|
|
3924
3943
|
}
|
|
3925
3944
|
process(e) {
|
|
3926
3945
|
const t = e.segment, n = [];
|
|
@@ -3939,8 +3958,8 @@ class ao {
|
|
|
3939
3958
|
const a = s.getIntersection(t);
|
|
3940
3959
|
if (a !== null && (t.isAnEndpoint(a) || (u = a), !s.isAnEndpoint(a))) {
|
|
3941
3960
|
const d = this._splitSafely(s, a);
|
|
3942
|
-
for (let
|
|
3943
|
-
n.push(d[
|
|
3961
|
+
for (let m = 0, g = d.length; m < g; m++)
|
|
3962
|
+
n.push(d[m]);
|
|
3944
3963
|
}
|
|
3945
3964
|
}
|
|
3946
3965
|
let f = null;
|
|
@@ -3948,16 +3967,16 @@ class ao {
|
|
|
3948
3967
|
const a = c.getIntersection(t);
|
|
3949
3968
|
if (a !== null && (t.isAnEndpoint(a) || (f = a), !c.isAnEndpoint(a))) {
|
|
3950
3969
|
const d = this._splitSafely(c, a);
|
|
3951
|
-
for (let
|
|
3952
|
-
n.push(d[
|
|
3970
|
+
for (let m = 0, g = d.length; m < g; m++)
|
|
3971
|
+
n.push(d[m]);
|
|
3953
3972
|
}
|
|
3954
3973
|
}
|
|
3955
3974
|
if (u !== null || f !== null) {
|
|
3956
3975
|
let a = null;
|
|
3957
3976
|
u === null ? a = f : f === null ? a = u : a = oe.comparePoints(u, f) <= 0 ? u : f, this.queue.remove(t.rightSE), n.push(t.rightSE);
|
|
3958
3977
|
const d = t.split(a);
|
|
3959
|
-
for (let
|
|
3960
|
-
n.push(d[
|
|
3978
|
+
for (let m = 0, g = d.length; m < g; m++)
|
|
3979
|
+
n.push(d[m]);
|
|
3961
3980
|
}
|
|
3962
3981
|
n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev = s);
|
|
3963
3982
|
} else {
|
|
@@ -3990,112 +4009,112 @@ class ao {
|
|
|
3990
4009
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3991
4010
|
}
|
|
3992
4011
|
}
|
|
3993
|
-
const
|
|
3994
|
-
class
|
|
4012
|
+
const ji = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, go = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
4013
|
+
class po {
|
|
3995
4014
|
run(e, t, n) {
|
|
3996
|
-
|
|
3997
|
-
const r = [new
|
|
4015
|
+
ce.type = e, Je.reset();
|
|
4016
|
+
const r = [new Di(t, !0)];
|
|
3998
4017
|
for (let a = 0, d = n.length; a < d; a++)
|
|
3999
|
-
r.push(new
|
|
4000
|
-
if (
|
|
4018
|
+
r.push(new Di(n[a], !1));
|
|
4019
|
+
if (ce.numMultiPolys = r.length, ce.type === "difference") {
|
|
4001
4020
|
const a = r[0];
|
|
4002
4021
|
let d = 1;
|
|
4003
4022
|
for (; d < r.length; )
|
|
4004
|
-
|
|
4023
|
+
Zt(r[d].bbox, a.bbox) !== null ? d++ : r.splice(d, 1);
|
|
4005
4024
|
}
|
|
4006
|
-
if (
|
|
4025
|
+
if (ce.type === "intersection")
|
|
4007
4026
|
for (let a = 0, d = r.length; a < d; a++) {
|
|
4008
|
-
const
|
|
4009
|
-
for (let
|
|
4010
|
-
if (
|
|
4027
|
+
const m = r[a];
|
|
4028
|
+
for (let g = a + 1, y = r.length; g < y; g++)
|
|
4029
|
+
if (Zt(m.bbox, r[g].bbox) === null) return [];
|
|
4011
4030
|
}
|
|
4012
|
-
const o = new
|
|
4031
|
+
const o = new Kt(oe.compare);
|
|
4013
4032
|
for (let a = 0, d = r.length; a < d; a++) {
|
|
4014
|
-
const
|
|
4015
|
-
for (let
|
|
4016
|
-
if (o.insert(g
|
|
4033
|
+
const m = r[a].getSweepEvents();
|
|
4034
|
+
for (let g = 0, y = m.length; g < y; g++)
|
|
4035
|
+
if (o.insert(m[g]), o.size > ji)
|
|
4017
4036
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
4018
4037
|
}
|
|
4019
|
-
const l = new
|
|
4038
|
+
const l = new mo(o);
|
|
4020
4039
|
let s = o.size, c = o.pop();
|
|
4021
4040
|
for (; c; ) {
|
|
4022
4041
|
const a = c.key;
|
|
4023
4042
|
if (o.size === s) {
|
|
4024
|
-
const
|
|
4025
|
-
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${
|
|
4043
|
+
const m = a.segment;
|
|
4044
|
+
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${m.id} [${m.leftSE.point.x}, ${m.leftSE.point.y}] -> [${m.rightSE.point.x}, ${m.rightSE.point.y}] from queue.`);
|
|
4026
4045
|
}
|
|
4027
|
-
if (o.size >
|
|
4046
|
+
if (o.size > ji)
|
|
4028
4047
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
4029
|
-
if (l.segments.length >
|
|
4048
|
+
if (l.segments.length > go)
|
|
4030
4049
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
4031
4050
|
const d = l.process(a);
|
|
4032
|
-
for (let
|
|
4033
|
-
const y = d[
|
|
4051
|
+
for (let m = 0, g = d.length; m < g; m++) {
|
|
4052
|
+
const y = d[m];
|
|
4034
4053
|
y.consumedBy === void 0 && o.insert(y);
|
|
4035
4054
|
}
|
|
4036
4055
|
s = o.size, c = o.pop();
|
|
4037
4056
|
}
|
|
4038
|
-
|
|
4039
|
-
const u =
|
|
4040
|
-
return new
|
|
4057
|
+
Je.reset();
|
|
4058
|
+
const u = vt.factory(l.segments);
|
|
4059
|
+
return new ho(u).getGeom();
|
|
4041
4060
|
}
|
|
4042
4061
|
}
|
|
4043
|
-
const
|
|
4062
|
+
const ce = new po(), yo = function(i) {
|
|
4044
4063
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4045
4064
|
t[n - 1] = arguments[n];
|
|
4046
|
-
return
|
|
4047
|
-
},
|
|
4065
|
+
return ce.run("union", i, t);
|
|
4066
|
+
}, bo = function(i) {
|
|
4048
4067
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4049
4068
|
t[n - 1] = arguments[n];
|
|
4050
|
-
return
|
|
4051
|
-
},
|
|
4069
|
+
return ce.run("intersection", i, t);
|
|
4070
|
+
}, vo = function(i) {
|
|
4052
4071
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4053
4072
|
t[n - 1] = arguments[n];
|
|
4054
|
-
return
|
|
4055
|
-
},
|
|
4073
|
+
return ce.run("xor", i, t);
|
|
4074
|
+
}, wo = function(i) {
|
|
4056
4075
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
4057
4076
|
t[n - 1] = arguments[n];
|
|
4058
|
-
return
|
|
4077
|
+
return ce.run("difference", i, t);
|
|
4059
4078
|
};
|
|
4060
|
-
var
|
|
4061
|
-
union:
|
|
4062
|
-
intersection:
|
|
4063
|
-
xor:
|
|
4064
|
-
difference:
|
|
4079
|
+
var rn = {
|
|
4080
|
+
union: yo,
|
|
4081
|
+
intersection: bo,
|
|
4082
|
+
xor: vo,
|
|
4083
|
+
difference: wo
|
|
4065
4084
|
};
|
|
4066
|
-
function
|
|
4085
|
+
function _o(i) {
|
|
4067
4086
|
const e = [];
|
|
4068
|
-
if (
|
|
4087
|
+
if (Xt(i, (r) => {
|
|
4069
4088
|
e.push(r.coordinates);
|
|
4070
4089
|
}), e.length < 2)
|
|
4071
4090
|
throw new Error("Must have at least two features");
|
|
4072
|
-
const t = i.features[0].properties || {}, n =
|
|
4073
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4091
|
+
const t = i.features[0].properties || {}, n = rn.difference(e[0], ...e.slice(1));
|
|
4092
|
+
return n.length === 0 ? null : n.length === 1 ? Yt(n[0], t) : en(n, t);
|
|
4074
4093
|
}
|
|
4075
|
-
var
|
|
4076
|
-
function
|
|
4094
|
+
var Eo = _o;
|
|
4095
|
+
function Lo(i) {
|
|
4077
4096
|
if (!i)
|
|
4078
4097
|
throw new Error("geojson is required");
|
|
4079
4098
|
var e = [];
|
|
4080
|
-
return
|
|
4099
|
+
return qr(i, function(t) {
|
|
4081
4100
|
e.push(t);
|
|
4082
|
-
}),
|
|
4101
|
+
}), Gt(e);
|
|
4083
4102
|
}
|
|
4084
|
-
var
|
|
4085
|
-
function
|
|
4103
|
+
var So = Lo;
|
|
4104
|
+
function xo(i, e = {}) {
|
|
4086
4105
|
const t = [];
|
|
4087
|
-
if (
|
|
4106
|
+
if (Xt(i, (r) => {
|
|
4088
4107
|
t.push(r.coordinates);
|
|
4089
4108
|
}), t.length < 2)
|
|
4090
4109
|
throw new Error("Must have at least 2 geometries");
|
|
4091
|
-
const n =
|
|
4092
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4093
|
-
}
|
|
4094
|
-
var
|
|
4095
|
-
function
|
|
4096
|
-
const t =
|
|
4097
|
-
|
|
4098
|
-
|
|
4110
|
+
const n = rn.union(t[0], ...t.slice(1));
|
|
4111
|
+
return n.length === 0 ? null : n.length === 1 ? Yt(n[0], e.properties) : en(n, e.properties);
|
|
4112
|
+
}
|
|
4113
|
+
var Mo = xo;
|
|
4114
|
+
function qi(i, e) {
|
|
4115
|
+
const t = Eo(
|
|
4116
|
+
Gt([
|
|
4117
|
+
Yt([
|
|
4099
4118
|
[
|
|
4100
4119
|
[180, 90],
|
|
4101
4120
|
[-180, 90],
|
|
@@ -4110,10 +4129,10 @@ function Di(i, e) {
|
|
|
4110
4129
|
if (!t)
|
|
4111
4130
|
return;
|
|
4112
4131
|
t.properties = { isMask: !0 };
|
|
4113
|
-
const n =
|
|
4132
|
+
const n = pt(Ni(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, l = n[2] > 180, s = So(i);
|
|
4114
4133
|
if (s.features.length > 1 && (o || l))
|
|
4115
4134
|
for (const c of s.features) {
|
|
4116
|
-
const u =
|
|
4135
|
+
const u = pt(Ni(c));
|
|
4117
4136
|
if (l && u[0] < -180 + r)
|
|
4118
4137
|
for (const f of c.geometry.coordinates)
|
|
4119
4138
|
for (const a of f)
|
|
@@ -4124,36 +4143,36 @@ function Di(i, e) {
|
|
|
4124
4143
|
a[0] -= 360 - r;
|
|
4125
4144
|
}
|
|
4126
4145
|
e(
|
|
4127
|
-
|
|
4128
|
-
s.features.length < 2 ? i :
|
|
4146
|
+
Gt([
|
|
4147
|
+
s.features.length < 2 ? i : Mo(s) ?? i,
|
|
4129
4148
|
t
|
|
4130
4149
|
])
|
|
4131
4150
|
);
|
|
4132
4151
|
}
|
|
4133
|
-
const
|
|
4134
|
-
function
|
|
4152
|
+
const Qi = "EPSG:4326";
|
|
4153
|
+
function ko(i) {
|
|
4135
4154
|
var o;
|
|
4136
4155
|
const e = i.getProperties(), { isMask: t } = e, n = (o = i.getGeometry()) == null ? void 0 : o.getType(), r = t ? 0 : n === "LineString" || n === "MultiLineString" ? 3 : 2;
|
|
4137
|
-
return new
|
|
4138
|
-
stroke: t ? void 0 : new
|
|
4156
|
+
return new An({
|
|
4157
|
+
stroke: t ? void 0 : new hi({
|
|
4139
4158
|
color: "#3170fe",
|
|
4140
4159
|
lineDash: [r, r],
|
|
4141
4160
|
width: r,
|
|
4142
4161
|
lineCap: "butt"
|
|
4143
4162
|
}),
|
|
4144
|
-
fill: t ? new
|
|
4163
|
+
fill: t ? new di({
|
|
4145
4164
|
color: "#00000020"
|
|
4146
4165
|
}) : void 0,
|
|
4147
|
-
image: new
|
|
4166
|
+
image: new Wn({
|
|
4148
4167
|
src: `/icons/marker_${e.isReverse ? "reverse" : e.isSelected ? "selected" : "unselected"}.svg`,
|
|
4149
4168
|
anchor: [0.5, 1]
|
|
4150
4169
|
}),
|
|
4151
4170
|
zIndex: e.isSelected ? 2 : e.isReverse ? 0 : 1,
|
|
4152
|
-
text: e.isSelected && e.tooltip ? new
|
|
4153
|
-
backgroundFill: new
|
|
4171
|
+
text: e.isSelected && e.tooltip ? new Bn({
|
|
4172
|
+
backgroundFill: new di({ color: "white" }),
|
|
4154
4173
|
text: e.tooltip,
|
|
4155
4174
|
offsetY: -40,
|
|
4156
|
-
backgroundStroke: new
|
|
4175
|
+
backgroundStroke: new hi({
|
|
4157
4176
|
color: "white",
|
|
4158
4177
|
lineJoin: "round",
|
|
4159
4178
|
width: 3
|
|
@@ -4162,21 +4181,21 @@ function Lo(i) {
|
|
|
4162
4181
|
}) : void 0
|
|
4163
4182
|
});
|
|
4164
4183
|
}
|
|
4165
|
-
function
|
|
4184
|
+
function Co(i, e = {}, t = {}, n = ko) {
|
|
4166
4185
|
let r = -1, o, l, s, c = !1;
|
|
4167
|
-
const u = new
|
|
4186
|
+
const u = new Rn({
|
|
4168
4187
|
updateWhileAnimating: !0
|
|
4169
4188
|
});
|
|
4170
4189
|
i.addLayer(u);
|
|
4171
|
-
const f = new
|
|
4172
|
-
u.setSource(f), u.setStyle(n), i.on("click", (
|
|
4173
|
-
i.forEachFeatureAtPixel(
|
|
4190
|
+
const f = new zn({});
|
|
4191
|
+
u.setSource(f), u.setStyle(n), i.on("click", (g) => {
|
|
4192
|
+
i.forEachFeatureAtPixel(g.pixel, (y) => {
|
|
4174
4193
|
const v = y.getId();
|
|
4175
4194
|
if (v)
|
|
4176
|
-
return
|
|
4195
|
+
return g.stopPropagation(), l == null || l({ type: "markerClick", id: v }), y;
|
|
4177
4196
|
});
|
|
4178
|
-
}), i.on("pointermove", (
|
|
4179
|
-
const y = i.forEachFeatureAtPixel(
|
|
4197
|
+
}), i.on("pointermove", (g) => {
|
|
4198
|
+
const y = i.forEachFeatureAtPixel(g.pixel, (v) => v.getId());
|
|
4180
4199
|
o !== y && (o && (l == null || l({
|
|
4181
4200
|
type: "markerMouseLeave",
|
|
4182
4201
|
id: o
|
|
@@ -4186,57 +4205,57 @@ function So(i, e = {}, t = {}, n = Lo) {
|
|
|
4186
4205
|
})), i.getTargetElement().style.cursor = y ? "pointer" : c ? "crosshair" : "", o = y);
|
|
4187
4206
|
});
|
|
4188
4207
|
function a() {
|
|
4189
|
-
return
|
|
4208
|
+
return On() ?? i.getView().getProjection();
|
|
4190
4209
|
}
|
|
4191
|
-
function d(
|
|
4192
|
-
return
|
|
4210
|
+
function d(g) {
|
|
4211
|
+
return g.transform(Qi, a());
|
|
4193
4212
|
}
|
|
4194
|
-
const
|
|
4213
|
+
const m = (g) => {
|
|
4195
4214
|
l == null || l({
|
|
4196
4215
|
type: "mapClick",
|
|
4197
|
-
coordinates:
|
|
4216
|
+
coordinates: fi(g.coordinate, a())
|
|
4198
4217
|
});
|
|
4199
4218
|
};
|
|
4200
4219
|
return {
|
|
4201
|
-
setEventHandler(
|
|
4202
|
-
|
|
4220
|
+
setEventHandler(g) {
|
|
4221
|
+
g ? (l = g, i.on("click", m)) : (l = void 0, i.un("click", m));
|
|
4203
4222
|
},
|
|
4204
|
-
flyTo(
|
|
4223
|
+
flyTo(g, y) {
|
|
4205
4224
|
i.getView().animate({
|
|
4206
|
-
center:
|
|
4225
|
+
center: at(g, a()),
|
|
4207
4226
|
...y ? { zoom: y } : {},
|
|
4208
4227
|
duration: 2e3,
|
|
4209
4228
|
...e
|
|
4210
4229
|
});
|
|
4211
4230
|
},
|
|
4212
|
-
fitBounds(
|
|
4213
|
-
i.getView().fit(
|
|
4231
|
+
fitBounds(g, y, v) {
|
|
4232
|
+
i.getView().fit(In(g, Qi, a()), {
|
|
4214
4233
|
padding: [y, y, y, y],
|
|
4215
4234
|
...v ? { maxZoom: v } : {},
|
|
4216
4235
|
duration: 2e3,
|
|
4217
4236
|
...t
|
|
4218
4237
|
});
|
|
4219
4238
|
},
|
|
4220
|
-
indicateReverse(
|
|
4221
|
-
c =
|
|
4239
|
+
indicateReverse(g) {
|
|
4240
|
+
c = g, i.getTargetElement().style.cursor = g ? "crosshair" : "";
|
|
4222
4241
|
},
|
|
4223
|
-
setReverseMarker(
|
|
4224
|
-
s ?
|
|
4225
|
-
|
|
4226
|
-
) : (f.removeFeature(s), s.dispose(), s = void 0) :
|
|
4227
|
-
new
|
|
4242
|
+
setReverseMarker(g) {
|
|
4243
|
+
s ? g ? s.getGeometry().setCoordinates(
|
|
4244
|
+
at(g, a())
|
|
4245
|
+
) : (f.removeFeature(s), s.dispose(), s = void 0) : g && (s = new me(
|
|
4246
|
+
new zt(at(g, a()))
|
|
4228
4247
|
), s.setProperties({ isReverse: !0 }), f.addFeature(s));
|
|
4229
4248
|
},
|
|
4230
|
-
setFeatures(
|
|
4249
|
+
setFeatures(g, y, v) {
|
|
4231
4250
|
function b(w) {
|
|
4232
4251
|
var E;
|
|
4233
4252
|
if (w)
|
|
4234
4253
|
for (const L of w.features) {
|
|
4235
|
-
const
|
|
4236
|
-
|
|
4237
|
-
new
|
|
4254
|
+
const T = L.geometry.type === "Polygon" ? new li(L.geometry.coordinates) : L.geometry.type === "MultiPolygon" ? new ui(L.geometry.coordinates) : null;
|
|
4255
|
+
T && f.addFeature(
|
|
4256
|
+
new me({
|
|
4238
4257
|
isMask: !!((E = L.properties) != null && E.isMask),
|
|
4239
|
-
geometry: d(
|
|
4258
|
+
geometry: d(T)
|
|
4240
4259
|
})
|
|
4241
4260
|
);
|
|
4242
4261
|
}
|
|
@@ -4246,40 +4265,40 @@ function So(i, e = {}, t = {}, n = Lo) {
|
|
|
4246
4265
|
let w = !1;
|
|
4247
4266
|
if (y.geometry.type === "GeometryCollection") {
|
|
4248
4267
|
const E = y.geometry.geometries.map(
|
|
4249
|
-
(L) => L.type === "Polygon" ? new
|
|
4268
|
+
(L) => L.type === "Polygon" ? new li(L.coordinates) : L.type === "MultiPolygon" ? new ui(L.coordinates) : null
|
|
4250
4269
|
).filter((L) => !!L);
|
|
4251
4270
|
if (E.length > 0)
|
|
4252
4271
|
f.addFeature(
|
|
4253
|
-
new
|
|
4272
|
+
new me(d(new Tn(E)))
|
|
4254
4273
|
), w = !0;
|
|
4255
4274
|
else
|
|
4256
4275
|
for (const L of y.geometry.geometries)
|
|
4257
4276
|
L.type === "LineString" ? (f.addFeature(
|
|
4258
|
-
new
|
|
4259
|
-
d(new
|
|
4277
|
+
new me(
|
|
4278
|
+
d(new ai(L.coordinates))
|
|
4260
4279
|
)
|
|
4261
4280
|
), w = !0) : L.type === "MultiLineString" && f.addFeature(
|
|
4262
|
-
new
|
|
4263
|
-
d(new
|
|
4281
|
+
new me(
|
|
4282
|
+
d(new ci(L.coordinates))
|
|
4264
4283
|
)
|
|
4265
4284
|
), w = !0;
|
|
4266
4285
|
}
|
|
4267
4286
|
if (!w) {
|
|
4268
4287
|
if (y.geometry.type === "Polygon")
|
|
4269
|
-
|
|
4288
|
+
qi(y, b);
|
|
4270
4289
|
else if (y.geometry.type === "MultiPolygon")
|
|
4271
|
-
|
|
4290
|
+
qi(y, b);
|
|
4272
4291
|
else if (y.geometry.type === "LineString") {
|
|
4273
4292
|
f.addFeature(
|
|
4274
|
-
new
|
|
4275
|
-
d(new
|
|
4293
|
+
new me(
|
|
4294
|
+
d(new ai(y.geometry.coordinates))
|
|
4276
4295
|
)
|
|
4277
4296
|
);
|
|
4278
4297
|
break e;
|
|
4279
4298
|
} else if (y.geometry.type === "MultiLineString") {
|
|
4280
4299
|
f.addFeature(
|
|
4281
|
-
new
|
|
4282
|
-
d(new
|
|
4300
|
+
new me(
|
|
4301
|
+
d(new ci(y.geometry.coordinates))
|
|
4283
4302
|
)
|
|
4284
4303
|
);
|
|
4285
4304
|
break e;
|
|
@@ -4287,13 +4306,13 @@ function So(i, e = {}, t = {}, n = Lo) {
|
|
|
4287
4306
|
}
|
|
4288
4307
|
if (!v && y.geometry.type !== "Point")
|
|
4289
4308
|
break e;
|
|
4290
|
-
f.addFeature(new
|
|
4309
|
+
f.addFeature(new me(d(new zt(y.center))));
|
|
4291
4310
|
}
|
|
4292
|
-
for (const w of
|
|
4311
|
+
for (const w of g ?? []) {
|
|
4293
4312
|
if (w === y)
|
|
4294
4313
|
continue;
|
|
4295
|
-
const E = new
|
|
4296
|
-
new
|
|
4314
|
+
const E = new me(
|
|
4315
|
+
new zt(at(w.center, a()))
|
|
4297
4316
|
);
|
|
4298
4317
|
E.setId(w.id), E.setProperties({
|
|
4299
4318
|
fuzzy: !!w.matching_text,
|
|
@@ -4301,24 +4320,24 @@ function So(i, e = {}, t = {}, n = Lo) {
|
|
|
4301
4320
|
}), f.addFeature(E);
|
|
4302
4321
|
}
|
|
4303
4322
|
},
|
|
4304
|
-
setSelectedMarker(
|
|
4323
|
+
setSelectedMarker(g) {
|
|
4305
4324
|
var b, w, E;
|
|
4306
4325
|
const y = f.getFeatures(), v = (b = y[0]) != null && b.getProperties().isReverse ? 1 : 0;
|
|
4307
4326
|
r > -1 && ((w = y[r + v]) == null || w.setProperties({
|
|
4308
4327
|
isSelected: !1
|
|
4309
|
-
})),
|
|
4328
|
+
})), g > -1 && ((E = y[g + v]) == null || E.setProperties({
|
|
4310
4329
|
isSelected: !0
|
|
4311
|
-
})), r =
|
|
4330
|
+
})), r = g;
|
|
4312
4331
|
},
|
|
4313
4332
|
getCenterAndZoom() {
|
|
4314
|
-
const
|
|
4333
|
+
const g = i.getView(), y = g.getCenter(), v = g.getZoom();
|
|
4315
4334
|
if (!(!y || v === void 0))
|
|
4316
|
-
return [v, ...
|
|
4335
|
+
return [v, ...fi(y, a())];
|
|
4317
4336
|
}
|
|
4318
4337
|
};
|
|
4319
4338
|
}
|
|
4320
|
-
var H,
|
|
4321
|
-
class
|
|
4339
|
+
var H, Oe;
|
|
4340
|
+
class Ko extends Nn {
|
|
4322
4341
|
constructor(t) {
|
|
4323
4342
|
const n = document.createElement("div");
|
|
4324
4343
|
n.className = "ol-search";
|
|
@@ -4326,36 +4345,36 @@ class Zo extends Mn {
|
|
|
4326
4345
|
element: n,
|
|
4327
4346
|
target: t.target
|
|
4328
4347
|
});
|
|
4329
|
-
|
|
4330
|
-
|
|
4348
|
+
It(this, H);
|
|
4349
|
+
It(this, Oe);
|
|
4331
4350
|
const { flyTo: r, fullGeometryStyle: o, ...l } = t;
|
|
4332
|
-
|
|
4351
|
+
Ot(this, H, new jr({
|
|
4333
4352
|
target: n,
|
|
4334
4353
|
props: {
|
|
4335
4354
|
flyTo: r === void 0 ? !0 : !!r,
|
|
4336
4355
|
...l
|
|
4337
4356
|
}
|
|
4338
4357
|
})), Z(this, H).$on("select", (s) => {
|
|
4339
|
-
this.dispatchEvent(new xo(s.detail.feature));
|
|
4340
|
-
}), Z(this, H).$on("pick", (s) => {
|
|
4341
4358
|
this.dispatchEvent(new Po(s.detail.feature));
|
|
4359
|
+
}), Z(this, H).$on("pick", (s) => {
|
|
4360
|
+
this.dispatchEvent(new Io(s.detail.feature));
|
|
4342
4361
|
}), Z(this, H).$on("featureslisted", (s) => {
|
|
4343
|
-
this.dispatchEvent(new
|
|
4362
|
+
this.dispatchEvent(new No(s.detail.features));
|
|
4344
4363
|
}), Z(this, H).$on("featuresmarked", (s) => {
|
|
4345
|
-
this.dispatchEvent(new
|
|
4364
|
+
this.dispatchEvent(new To(s.detail.features));
|
|
4346
4365
|
}), Z(this, H).$on("response", (s) => {
|
|
4347
4366
|
this.dispatchEvent(
|
|
4348
|
-
new
|
|
4367
|
+
new zo(s.detail.url, s.detail.featureCollection)
|
|
4349
4368
|
);
|
|
4350
4369
|
}), Z(this, H).$on("optionsvisibilitychange", (s) => {
|
|
4351
4370
|
this.dispatchEvent(
|
|
4352
|
-
new
|
|
4371
|
+
new Ro(s.detail.optionsVisible)
|
|
4353
4372
|
);
|
|
4354
4373
|
}), Z(this, H).$on("reversetoggle", (s) => {
|
|
4355
|
-
this.dispatchEvent(new
|
|
4374
|
+
this.dispatchEvent(new Wo(s.detail.reverse));
|
|
4356
4375
|
}), Z(this, H).$on("querychange", (s) => {
|
|
4357
|
-
this.dispatchEvent(new
|
|
4358
|
-
}),
|
|
4376
|
+
this.dispatchEvent(new Oo(s.detail.query));
|
|
4377
|
+
}), Ot(this, Oe, t);
|
|
4359
4378
|
}
|
|
4360
4379
|
setMap(t) {
|
|
4361
4380
|
var n;
|
|
@@ -4365,7 +4384,7 @@ class Zo extends Mn {
|
|
|
4365
4384
|
// showResultMarkers,
|
|
4366
4385
|
flyTo: r,
|
|
4367
4386
|
fullGeometryStyle: o
|
|
4368
|
-
} = Z(this,
|
|
4387
|
+
} = Z(this, Oe), l = Co(
|
|
4369
4388
|
t,
|
|
4370
4389
|
typeof r == "boolean" ? void 0 : r,
|
|
4371
4390
|
typeof r == "boolean" ? void 0 : r,
|
|
@@ -4383,8 +4402,8 @@ class Zo extends Mn {
|
|
|
4383
4402
|
*/
|
|
4384
4403
|
setOptions(t) {
|
|
4385
4404
|
var l;
|
|
4386
|
-
Object.assign(Z(this,
|
|
4387
|
-
const { flyTo: n, fullGeometryStyle: r, ...o } = Z(this,
|
|
4405
|
+
Object.assign(Z(this, Oe), t);
|
|
4406
|
+
const { flyTo: n, fullGeometryStyle: r, ...o } = Z(this, Oe);
|
|
4388
4407
|
(l = Z(this, H)) == null || l.$set({
|
|
4389
4408
|
...o,
|
|
4390
4409
|
flyTo: n === void 0 ? !0 : !!n
|
|
@@ -4443,50 +4462,50 @@ class Zo extends Mn {
|
|
|
4443
4462
|
// this.#gc?.$destroy();
|
|
4444
4463
|
// }
|
|
4445
4464
|
}
|
|
4446
|
-
H = new WeakMap(),
|
|
4447
|
-
class
|
|
4465
|
+
H = new WeakMap(), Oe = new WeakMap();
|
|
4466
|
+
class Po extends Pe {
|
|
4448
4467
|
constructor(t) {
|
|
4449
4468
|
super("select");
|
|
4450
4469
|
re(this, "feature");
|
|
4451
4470
|
this.feature = t;
|
|
4452
4471
|
}
|
|
4453
4472
|
}
|
|
4454
|
-
class
|
|
4473
|
+
class No extends Pe {
|
|
4455
4474
|
constructor(t) {
|
|
4456
4475
|
super("featureslisted");
|
|
4457
4476
|
re(this, "features");
|
|
4458
4477
|
this.features = t;
|
|
4459
4478
|
}
|
|
4460
4479
|
}
|
|
4461
|
-
class
|
|
4480
|
+
class To extends Pe {
|
|
4462
4481
|
constructor(t) {
|
|
4463
4482
|
super("featuresmarked");
|
|
4464
4483
|
re(this, "features");
|
|
4465
4484
|
this.features = t;
|
|
4466
4485
|
}
|
|
4467
4486
|
}
|
|
4468
|
-
class
|
|
4487
|
+
class Ro extends Pe {
|
|
4469
4488
|
constructor(t) {
|
|
4470
4489
|
super("optionsvisibilitychange");
|
|
4471
4490
|
re(this, "optionsVisible");
|
|
4472
4491
|
this.optionsVisible = t;
|
|
4473
4492
|
}
|
|
4474
4493
|
}
|
|
4475
|
-
class
|
|
4494
|
+
class Io extends Pe {
|
|
4476
4495
|
constructor(t) {
|
|
4477
4496
|
super("pick");
|
|
4478
4497
|
re(this, "feature");
|
|
4479
4498
|
this.feature = t;
|
|
4480
4499
|
}
|
|
4481
4500
|
}
|
|
4482
|
-
class
|
|
4501
|
+
class Oo extends Pe {
|
|
4483
4502
|
constructor(t) {
|
|
4484
4503
|
super("querychange");
|
|
4485
4504
|
re(this, "query");
|
|
4486
4505
|
this.query = t;
|
|
4487
4506
|
}
|
|
4488
4507
|
}
|
|
4489
|
-
class
|
|
4508
|
+
class zo extends Pe {
|
|
4490
4509
|
constructor(t, n) {
|
|
4491
4510
|
super("response");
|
|
4492
4511
|
re(this, "url");
|
|
@@ -4494,7 +4513,7 @@ class Ro extends Me {
|
|
|
4494
4513
|
this.url = t, this.featureCollection = n;
|
|
4495
4514
|
}
|
|
4496
4515
|
}
|
|
4497
|
-
class
|
|
4516
|
+
class Wo extends Pe {
|
|
4498
4517
|
constructor(t) {
|
|
4499
4518
|
super("reversetoggle");
|
|
4500
4519
|
re(this, "reverse");
|
|
@@ -4502,15 +4521,15 @@ class To extends Me {
|
|
|
4502
4521
|
}
|
|
4503
4522
|
}
|
|
4504
4523
|
export {
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4524
|
+
No as FeaturesListedEvent,
|
|
4525
|
+
To as FeaturesMarkedEvent,
|
|
4526
|
+
Ko as GeocodingControl,
|
|
4527
|
+
Ro as OptionsVisibilityChangeEvent,
|
|
4528
|
+
Io as PickEvent,
|
|
4529
|
+
Oo as QueryChangeEvent,
|
|
4530
|
+
zo as ResponseEvent,
|
|
4531
|
+
Wo as ReverseToggleEvent,
|
|
4532
|
+
Po as SelectEvent,
|
|
4533
|
+
Co as createOpenLayersMapController
|
|
4515
4534
|
};
|
|
4516
4535
|
//# sourceMappingURL=openlayers.js.map
|