@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/maptilersdk.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var En = Object.defineProperty;
|
|
2
|
+
var ti = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var H = (i, e, t) => (
|
|
8
|
-
import * as
|
|
5
|
+
var wn = (i, e, t) => e in i ? En(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
+
var te = (i, e, t) => wn(i, typeof e != "symbol" ? e + "" : e, t), ii = (i, e, t) => e.has(i) || ti("Cannot " + t);
|
|
7
|
+
var H = (i, e, t) => (ii(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Rt = (i, e, t) => e.has(i) ? ti("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), Pt = (i, e, t, n) => (ii(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
8
|
+
import * as ni from "@maptiler/sdk";
|
|
9
9
|
function U() {
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function Ln(i, e) {
|
|
12
12
|
for (const t in e) i[t] = e[t];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
15
15
|
i
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Bi(i) {
|
|
19
19
|
return i();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function ri() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
i.forEach(
|
|
24
|
+
function ve(i) {
|
|
25
|
+
i.forEach(Bi);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ui(i) {
|
|
28
28
|
return typeof i == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Ce(i, e) {
|
|
31
31
|
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
32
32
|
}
|
|
33
|
-
let
|
|
34
|
-
function
|
|
35
|
-
return i === e ? !0 : (
|
|
33
|
+
let ut;
|
|
34
|
+
function J(i, e) {
|
|
35
|
+
return i === e ? !0 : (ut || (ut = document.createElement("a")), ut.href = e, i === ut.href);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Sn(i) {
|
|
38
38
|
return Object.keys(i).length === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function xn(i, e, t, n) {
|
|
41
41
|
if (i) {
|
|
42
|
-
const r =
|
|
42
|
+
const r = Di(i, e, t, n);
|
|
43
43
|
return i[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return i[1] && n ?
|
|
46
|
+
function Di(i, e, t, n) {
|
|
47
|
+
return i[1] && n ? Ln(t.ctx.slice(), i[1](n(e))) : t.ctx;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Mn(i, e, t, n) {
|
|
50
50
|
if (i[2] && n) {
|
|
51
51
|
const r = i[2](n(t));
|
|
52
52
|
if (e.dirty === void 0)
|
|
53
53
|
return r;
|
|
54
54
|
if (typeof r == "object") {
|
|
55
|
-
const
|
|
56
|
-
for (let
|
|
57
|
-
s
|
|
58
|
-
return
|
|
55
|
+
const o = [], u = Math.max(e.dirty.length, r.length);
|
|
56
|
+
for (let s = 0; s < u; s += 1)
|
|
57
|
+
o[s] = e.dirty[s] | r[s];
|
|
58
|
+
return o;
|
|
59
59
|
}
|
|
60
60
|
return e.dirty | r;
|
|
61
61
|
}
|
|
62
62
|
return e.dirty;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function kn(i, e, t, n, r, o) {
|
|
65
65
|
if (r) {
|
|
66
|
-
const u =
|
|
66
|
+
const u = Di(e, t, n, o);
|
|
67
67
|
i.p(u, r);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Cn(i) {
|
|
71
71
|
if (i.ctx.length > 32) {
|
|
72
72
|
const e = [], t = i.ctx.length / 32;
|
|
73
73
|
for (let n = 0; n < t; n++)
|
|
@@ -76,37 +76,37 @@ function Sn(i) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function gt(i) {
|
|
80
80
|
return i ?? "";
|
|
81
81
|
}
|
|
82
82
|
function O(i, e) {
|
|
83
83
|
i.appendChild(e);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function j(i, e, t) {
|
|
86
86
|
i.insertBefore(e, t || null);
|
|
87
87
|
}
|
|
88
88
|
function D(i) {
|
|
89
89
|
i.parentNode && i.parentNode.removeChild(i);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function W(i) {
|
|
92
92
|
return document.createElement(i);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ce(i) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", i);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function xe(i) {
|
|
98
98
|
return document.createTextNode(i);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
100
|
+
function ie() {
|
|
101
|
+
return xe(" ");
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
103
|
+
function Nn() {
|
|
104
|
+
return xe("");
|
|
105
105
|
}
|
|
106
106
|
function V(i, e, t, n) {
|
|
107
107
|
return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Tn(i) {
|
|
110
110
|
return function(e) {
|
|
111
111
|
return e.preventDefault(), i.call(this, e);
|
|
112
112
|
};
|
|
@@ -114,187 +114,187 @@ function Mn(i) {
|
|
|
114
114
|
function y(i, e, t) {
|
|
115
115
|
t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Rn(i) {
|
|
118
118
|
return Array.from(i.childNodes);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function He(i, e) {
|
|
121
121
|
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function oi(i, e) {
|
|
125
125
|
i.value = e ?? "";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function he(i, e, t) {
|
|
128
128
|
i.classList.toggle(e, !!t);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Pn(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
|
|
131
131
|
return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
|
|
132
132
|
}
|
|
133
|
-
let
|
|
134
|
-
function
|
|
135
|
-
|
|
133
|
+
let Ve;
|
|
134
|
+
function Ze(i) {
|
|
135
|
+
Ve = i;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
if (!
|
|
139
|
-
return
|
|
137
|
+
function Fi() {
|
|
138
|
+
if (!Ve) throw new Error("Function called outside component initialization");
|
|
139
|
+
return Ve;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function In(i) {
|
|
142
|
+
Fi().$$.on_destroy.push(i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const i =
|
|
144
|
+
function ji() {
|
|
145
|
+
const i = Fi();
|
|
146
146
|
return (e, t, { cancelable: n = !1 } = {}) => {
|
|
147
147
|
const r = i.$$.callbacks[e];
|
|
148
148
|
if (r) {
|
|
149
|
-
const
|
|
149
|
+
const o = Pn(
|
|
150
150
|
/** @type {string} */
|
|
151
151
|
e,
|
|
152
152
|
t,
|
|
153
153
|
{ cancelable: n }
|
|
154
154
|
);
|
|
155
155
|
return r.slice().forEach((u) => {
|
|
156
|
-
u.call(i,
|
|
157
|
-
}), !
|
|
156
|
+
u.call(i, o);
|
|
157
|
+
}), !o.defaultPrevented;
|
|
158
158
|
}
|
|
159
159
|
return !0;
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function On(i, e) {
|
|
163
163
|
const t = i.$$.callbacks[e.type];
|
|
164
164
|
t && t.slice().forEach((n) => n.call(this, e));
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
function
|
|
171
|
-
|
|
166
|
+
const Ue = [], At = [];
|
|
167
|
+
let De = [];
|
|
168
|
+
const si = [], zn = /* @__PURE__ */ Promise.resolve();
|
|
169
|
+
let Wt = !1;
|
|
170
|
+
function An() {
|
|
171
|
+
Wt || (Wt = !0, zn.then(Gi));
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
173
|
+
function Bt(i) {
|
|
174
|
+
De.push(i);
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
let
|
|
178
|
-
function
|
|
179
|
-
if (
|
|
176
|
+
const It = /* @__PURE__ */ new Set();
|
|
177
|
+
let We = 0;
|
|
178
|
+
function Gi() {
|
|
179
|
+
if (We !== 0)
|
|
180
180
|
return;
|
|
181
|
-
const i =
|
|
181
|
+
const i = Ve;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
|
-
for (;
|
|
185
|
-
const e = We
|
|
186
|
-
|
|
184
|
+
for (; We < Ue.length; ) {
|
|
185
|
+
const e = Ue[We];
|
|
186
|
+
We++, Ze(e), Wn(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw Ue.length = 0, We = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
192
|
-
for (let e = 0; e <
|
|
193
|
-
const t =
|
|
194
|
-
|
|
191
|
+
for (Ze(null), Ue.length = 0, We = 0; At.length; ) At.pop()();
|
|
192
|
+
for (let e = 0; e < De.length; e += 1) {
|
|
193
|
+
const t = De[e];
|
|
194
|
+
It.has(t) || (It.add(t), t());
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
} while (
|
|
198
|
-
for (;
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
De.length = 0;
|
|
197
|
+
} while (Ue.length);
|
|
198
|
+
for (; si.length; )
|
|
199
|
+
si.pop()();
|
|
200
|
+
Wt = !1, It.clear(), Ze(i);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Wn(i) {
|
|
203
203
|
if (i.fragment !== null) {
|
|
204
|
-
i.update(),
|
|
204
|
+
i.update(), ve(i.before_update);
|
|
205
205
|
const e = i.dirty;
|
|
206
|
-
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(
|
|
206
|
+
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(Bt);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Bn(i) {
|
|
210
210
|
const e = [], t = [];
|
|
211
|
-
|
|
211
|
+
De.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), De = e;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
let
|
|
215
|
-
function
|
|
216
|
-
|
|
213
|
+
const ct = /* @__PURE__ */ new Set();
|
|
214
|
+
let ze;
|
|
215
|
+
function ft() {
|
|
216
|
+
ze = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
219
|
-
p:
|
|
219
|
+
p: ze
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
223
|
+
function dt() {
|
|
224
|
+
ze.r || ve(ze.c), ze = ze.p;
|
|
225
225
|
}
|
|
226
226
|
function Q(i, e) {
|
|
227
|
-
i && i.i && (
|
|
227
|
+
i && i.i && (ct.delete(i), i.i(e));
|
|
228
228
|
}
|
|
229
229
|
function Y(i, e, t, n) {
|
|
230
230
|
if (i && i.o) {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
if (ct.has(i)) return;
|
|
232
|
+
ct.add(i), ze.c.push(() => {
|
|
233
|
+
ct.delete(i), n && (t && i.d(1), n());
|
|
234
234
|
}), i.o(e);
|
|
235
235
|
} else n && n();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function li(i) {
|
|
238
238
|
return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Un(i, e) {
|
|
241
241
|
Y(i, 1, 1, () => {
|
|
242
242
|
e.delete(i.key);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
let d = i.length,
|
|
245
|
+
function Dn(i, e, t, n, r, o, u, s, c, l, f, a) {
|
|
246
|
+
let d = i.length, g = o.length, v = d;
|
|
247
247
|
const E = {};
|
|
248
248
|
for (; v--; ) E[i[v].key] = v;
|
|
249
249
|
const m = [], p = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), _ = [];
|
|
250
|
-
for (v =
|
|
251
|
-
const M = a(r,
|
|
250
|
+
for (v = g; v--; ) {
|
|
251
|
+
const M = a(r, o, v), S = t(M);
|
|
252
252
|
let P = u.get(S);
|
|
253
253
|
P ? _.push(() => P.p(M, e)) : (P = l(S, M), P.c()), p.set(S, m[v] = P), S in E && b.set(S, Math.abs(v - E[S]));
|
|
254
254
|
}
|
|
255
255
|
const L = /* @__PURE__ */ new Set(), N = /* @__PURE__ */ new Set();
|
|
256
256
|
function x(M) {
|
|
257
|
-
Q(M, 1), M.m(
|
|
257
|
+
Q(M, 1), M.m(s, f), u.set(M.key, M), f = M.first, g--;
|
|
258
258
|
}
|
|
259
|
-
for (; d &&
|
|
260
|
-
const M = m[
|
|
261
|
-
M === S ? (f = M.first, d--,
|
|
259
|
+
for (; d && g; ) {
|
|
260
|
+
const M = m[g - 1], S = i[d - 1], P = M.key, w = S.key;
|
|
261
|
+
M === S ? (f = M.first, d--, g--) : p.has(w) ? !u.has(P) || L.has(P) ? x(M) : N.has(w) ? d-- : b.get(P) > b.get(w) ? (N.add(P), x(M)) : (L.add(w), d--) : (c(S, u), d--);
|
|
262
262
|
}
|
|
263
263
|
for (; d--; ) {
|
|
264
264
|
const M = i[d];
|
|
265
265
|
p.has(M.key) || c(M, u);
|
|
266
266
|
}
|
|
267
|
-
for (;
|
|
268
|
-
return
|
|
267
|
+
for (; g; ) x(m[g - 1]);
|
|
268
|
+
return ve(_), m;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Me(i) {
|
|
271
271
|
i && i.c();
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function pe(i, e, t) {
|
|
274
274
|
const { fragment: n, after_update: r } = i.$$;
|
|
275
|
-
n && n.m(e, t),
|
|
276
|
-
const
|
|
277
|
-
i.$$.on_destroy ? i.$$.on_destroy.push(...
|
|
278
|
-
}), r.forEach(
|
|
275
|
+
n && n.m(e, t), Bt(() => {
|
|
276
|
+
const o = i.$$.on_mount.map(Bi).filter(Ui);
|
|
277
|
+
i.$$.on_destroy ? i.$$.on_destroy.push(...o) : ve(o), i.$$.on_mount = [];
|
|
278
|
+
}), r.forEach(Bt);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ye(i, e) {
|
|
281
281
|
const t = i.$$;
|
|
282
|
-
t.fragment !== null && (
|
|
282
|
+
t.fragment !== null && (Bn(t.after_update), ve(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
i.$$.dirty[0] === -1 && (
|
|
284
|
+
function Fn(i, e) {
|
|
285
|
+
i.$$.dirty[0] === -1 && (Ue.push(i), An(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
const c =
|
|
289
|
-
|
|
287
|
+
function Ne(i, e, t, n, r, o, u = null, s = [-1]) {
|
|
288
|
+
const c = Ve;
|
|
289
|
+
Ze(i);
|
|
290
290
|
const l = i.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
293
293
|
// state
|
|
294
|
-
props:
|
|
294
|
+
props: o,
|
|
295
295
|
update: U,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: ri(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
@@ -303,27 +303,27 @@ function Me(i, e, t, n, r, s, u = null, o = [-1]) {
|
|
|
303
303
|
after_update: [],
|
|
304
304
|
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
305
305
|
// everything else
|
|
306
|
-
callbacks:
|
|
307
|
-
dirty:
|
|
306
|
+
callbacks: ri(),
|
|
307
|
+
dirty: s,
|
|
308
308
|
skip_bound: !1,
|
|
309
309
|
root: e.target || c.$$.root
|
|
310
310
|
};
|
|
311
311
|
u && u(l.root);
|
|
312
312
|
let f = !1;
|
|
313
|
-
if (l.ctx = t ? t(i, e.props || {}, (a, d, ...
|
|
314
|
-
const v =
|
|
315
|
-
return l.ctx && r(l.ctx[a], l.ctx[a] = v) && (!l.skip_bound && l.bound[a] && l.bound[a](v), f &&
|
|
316
|
-
}) : [], l.update(), f = !0,
|
|
313
|
+
if (l.ctx = t ? t(i, e.props || {}, (a, d, ...g) => {
|
|
314
|
+
const v = g.length ? g[0] : d;
|
|
315
|
+
return l.ctx && r(l.ctx[a], l.ctx[a] = v) && (!l.skip_bound && l.bound[a] && l.bound[a](v), f && Fn(i, a)), d;
|
|
316
|
+
}) : [], l.update(), f = !0, ve(l.before_update), l.fragment = n ? n(l.ctx) : !1, e.target) {
|
|
317
317
|
if (e.hydrate) {
|
|
318
|
-
const a =
|
|
318
|
+
const a = Rn(e.target);
|
|
319
319
|
l.fragment && l.fragment.l(a), a.forEach(D);
|
|
320
320
|
} else
|
|
321
321
|
l.fragment && l.fragment.c();
|
|
322
|
-
e.intro && Q(i.$$.fragment),
|
|
322
|
+
e.intro && Q(i.$$.fragment), pe(i, e.target, e.anchor), Gi();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
Ze(c);
|
|
325
325
|
}
|
|
326
|
-
class
|
|
326
|
+
class Te {
|
|
327
327
|
constructor() {
|
|
328
328
|
/**
|
|
329
329
|
* ### PRIVATE API
|
|
@@ -332,7 +332,7 @@ class ke {
|
|
|
332
332
|
*
|
|
333
333
|
* @type {any}
|
|
334
334
|
*/
|
|
335
|
-
|
|
335
|
+
te(this, "$$");
|
|
336
336
|
/**
|
|
337
337
|
* ### PRIVATE API
|
|
338
338
|
*
|
|
@@ -340,11 +340,11 @@ class ke {
|
|
|
340
340
|
*
|
|
341
341
|
* @type {any}
|
|
342
342
|
*/
|
|
343
|
-
|
|
343
|
+
te(this, "$$set");
|
|
344
344
|
}
|
|
345
345
|
/** @returns {void} */
|
|
346
346
|
$destroy() {
|
|
347
|
-
|
|
347
|
+
ye(this, 1), this.$destroy = U;
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -353,7 +353,7 @@ class ke {
|
|
|
353
353
|
* @returns {() => void}
|
|
354
354
|
*/
|
|
355
355
|
$on(e, t) {
|
|
356
|
-
if (!
|
|
356
|
+
if (!Ui(t))
|
|
357
357
|
return U;
|
|
358
358
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
359
359
|
return n.push(t), () => {
|
|
@@ -366,19 +366,19 @@ class ke {
|
|
|
366
366
|
* @returns {void}
|
|
367
367
|
*/
|
|
368
368
|
$set(e) {
|
|
369
|
-
this.$$set && !
|
|
369
|
+
this.$$set && !Sn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
const
|
|
373
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
374
|
-
function
|
|
372
|
+
const jn = "4";
|
|
373
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(jn);
|
|
374
|
+
function Gn(i) {
|
|
375
375
|
let e, t;
|
|
376
376
|
return {
|
|
377
377
|
c() {
|
|
378
|
-
e =
|
|
378
|
+
e = ce("svg"), t = ce("path"), y(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), y(e, "viewBox", "0 0 14 14"), y(e, "width", "13"), y(e, "height", "13"), y(e, "class", "svelte-en2qvf");
|
|
379
379
|
},
|
|
380
380
|
m(n, r) {
|
|
381
|
-
|
|
381
|
+
j(n, e, r), O(e, t);
|
|
382
382
|
},
|
|
383
383
|
p: U,
|
|
384
384
|
i: U,
|
|
@@ -388,19 +388,19 @@ function Un(i) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class qi extends Te {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(),
|
|
393
|
+
super(), Ne(this, e, null, Gn, Ce, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function qn(i) {
|
|
397
397
|
let e, t;
|
|
398
398
|
return {
|
|
399
399
|
c() {
|
|
400
|
-
e =
|
|
400
|
+
e = ce("svg"), t = ce("path"), y(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), y(e, "viewBox", "0 0 30 30"), y(e, "fill", "none"), y(e, "xmlns", "http://www.w3.org/2000/svg"), y(e, "class", "svelte-d2loi5");
|
|
401
401
|
},
|
|
402
402
|
m(n, r) {
|
|
403
|
-
|
|
403
|
+
j(n, e, r), O(e, t);
|
|
404
404
|
},
|
|
405
405
|
p: U,
|
|
406
406
|
i: U,
|
|
@@ -410,16 +410,16 @@ function Dn(i) {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class Qi extends Te {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(),
|
|
415
|
+
super(), Ne(this, e, null, qn, Ce, {});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Qn(i) {
|
|
419
419
|
let e, t;
|
|
420
420
|
return {
|
|
421
421
|
c() {
|
|
422
|
-
e =
|
|
422
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
423
423
|
i[3] + "area.svg") || y(e, "src", t), y(
|
|
424
424
|
e,
|
|
425
425
|
"alt",
|
|
@@ -433,11 +433,11 @@ function Fn(i) {
|
|
|
433
433
|
), y(e, "class", "svelte-z7p9pp");
|
|
434
434
|
},
|
|
435
435
|
m(n, r) {
|
|
436
|
-
|
|
436
|
+
j(n, e, r);
|
|
437
437
|
},
|
|
438
438
|
p(n, r) {
|
|
439
439
|
r & /*iconsBaseUrl*/
|
|
440
|
-
8 && !
|
|
440
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
441
441
|
n[3] + "area.svg") && y(e, "src", t), r & /*placeType*/
|
|
442
442
|
64 && y(
|
|
443
443
|
e,
|
|
@@ -457,11 +457,11 @@ function Fn(i) {
|
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Zn(i) {
|
|
461
461
|
let e, t;
|
|
462
462
|
return {
|
|
463
463
|
c() {
|
|
464
|
-
e =
|
|
464
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
465
465
|
i[3] + "reverse.svg") || y(e, "src", t), y(
|
|
466
466
|
e,
|
|
467
467
|
"alt",
|
|
@@ -475,11 +475,11 @@ function jn(i) {
|
|
|
475
475
|
), y(e, "class", "svelte-z7p9pp");
|
|
476
476
|
},
|
|
477
477
|
m(n, r) {
|
|
478
|
-
|
|
478
|
+
j(n, e, r);
|
|
479
479
|
},
|
|
480
480
|
p(n, r) {
|
|
481
481
|
r & /*iconsBaseUrl*/
|
|
482
|
-
8 && !
|
|
482
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
483
483
|
n[3] + "reverse.svg") && y(e, "src", t), r & /*placeType*/
|
|
484
484
|
64 && y(
|
|
485
485
|
e,
|
|
@@ -499,11 +499,11 @@ function jn(i) {
|
|
|
499
499
|
}
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Hn(i) {
|
|
503
503
|
let e, t;
|
|
504
504
|
return {
|
|
505
505
|
c() {
|
|
506
|
-
e =
|
|
506
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
507
507
|
i[3] + "poi.svg") || y(e, "src", t), y(
|
|
508
508
|
e,
|
|
509
509
|
"alt",
|
|
@@ -517,11 +517,11 @@ function Gn(i) {
|
|
|
517
517
|
), y(e, "class", "svelte-z7p9pp");
|
|
518
518
|
},
|
|
519
519
|
m(n, r) {
|
|
520
|
-
|
|
520
|
+
j(n, e, r);
|
|
521
521
|
},
|
|
522
522
|
p(n, r) {
|
|
523
523
|
r & /*iconsBaseUrl*/
|
|
524
|
-
8 && !
|
|
524
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
525
525
|
n[3] + "poi.svg") && y(e, "src", t), r & /*placeType*/
|
|
526
526
|
64 && y(
|
|
527
527
|
e,
|
|
@@ -541,11 +541,11 @@ function Gn(i) {
|
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Vn(i) {
|
|
545
545
|
let e, t;
|
|
546
546
|
return {
|
|
547
547
|
c() {
|
|
548
|
-
e =
|
|
548
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
549
549
|
i[3] + "postal_code.svg") || y(e, "src", t), y(
|
|
550
550
|
e,
|
|
551
551
|
"alt",
|
|
@@ -559,11 +559,11 @@ function qn(i) {
|
|
|
559
559
|
), y(e, "class", "svelte-z7p9pp");
|
|
560
560
|
},
|
|
561
561
|
m(n, r) {
|
|
562
|
-
|
|
562
|
+
j(n, e, r);
|
|
563
563
|
},
|
|
564
564
|
p(n, r) {
|
|
565
565
|
r & /*iconsBaseUrl*/
|
|
566
|
-
8 && !
|
|
566
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
567
567
|
n[3] + "postal_code.svg") && y(e, "src", t), r & /*placeType*/
|
|
568
568
|
64 && y(
|
|
569
569
|
e,
|
|
@@ -583,11 +583,11 @@ function qn(i) {
|
|
|
583
583
|
}
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Yn(i) {
|
|
587
587
|
let e, t;
|
|
588
588
|
return {
|
|
589
589
|
c() {
|
|
590
|
-
e =
|
|
590
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
591
591
|
i[3] + "street.svg") || y(e, "src", t), y(
|
|
592
592
|
e,
|
|
593
593
|
"alt",
|
|
@@ -601,11 +601,11 @@ function Qn(i) {
|
|
|
601
601
|
), y(e, "class", "svelte-z7p9pp");
|
|
602
602
|
},
|
|
603
603
|
m(n, r) {
|
|
604
|
-
|
|
604
|
+
j(n, e, r);
|
|
605
605
|
},
|
|
606
606
|
p(n, r) {
|
|
607
607
|
r & /*iconsBaseUrl*/
|
|
608
|
-
8 && !
|
|
608
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
609
609
|
n[3] + "street.svg") && y(e, "src", t), r & /*placeType*/
|
|
610
610
|
64 && y(
|
|
611
611
|
e,
|
|
@@ -625,11 +625,11 @@ function Qn(i) {
|
|
|
625
625
|
}
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Kn(i) {
|
|
629
629
|
let e, t;
|
|
630
630
|
return {
|
|
631
631
|
c() {
|
|
632
|
-
e =
|
|
632
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
633
633
|
i[3] + "road.svg") || y(e, "src", t), y(
|
|
634
634
|
e,
|
|
635
635
|
"alt",
|
|
@@ -643,11 +643,11 @@ function Zn(i) {
|
|
|
643
643
|
), y(e, "class", "svelte-z7p9pp");
|
|
644
644
|
},
|
|
645
645
|
m(n, r) {
|
|
646
|
-
|
|
646
|
+
j(n, e, r);
|
|
647
647
|
},
|
|
648
648
|
p(n, r) {
|
|
649
649
|
r & /*iconsBaseUrl*/
|
|
650
|
-
8 && !
|
|
650
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
651
651
|
n[3] + "road.svg") && y(e, "src", t), r & /*placeType*/
|
|
652
652
|
64 && y(
|
|
653
653
|
e,
|
|
@@ -667,11 +667,11 @@ function Zn(i) {
|
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Xn(i) {
|
|
671
671
|
let e, t;
|
|
672
672
|
return {
|
|
673
673
|
c() {
|
|
674
|
-
e =
|
|
674
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
675
675
|
i[3] + "housenumber.svg") || y(e, "src", t), y(
|
|
676
676
|
e,
|
|
677
677
|
"alt",
|
|
@@ -685,11 +685,11 @@ function Hn(i) {
|
|
|
685
685
|
), y(e, "class", "svelte-z7p9pp");
|
|
686
686
|
},
|
|
687
687
|
m(n, r) {
|
|
688
|
-
|
|
688
|
+
j(n, e, r);
|
|
689
689
|
},
|
|
690
690
|
p(n, r) {
|
|
691
691
|
r & /*iconsBaseUrl*/
|
|
692
|
-
8 && !
|
|
692
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
693
693
|
n[3] + "housenumber.svg") && y(e, "src", t), r & /*placeType*/
|
|
694
694
|
64 && y(
|
|
695
695
|
e,
|
|
@@ -709,11 +709,11 @@ function Hn(i) {
|
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Jn(i) {
|
|
713
713
|
let e, t, n, r;
|
|
714
714
|
return {
|
|
715
715
|
c() {
|
|
716
|
-
e =
|
|
716
|
+
e = W("img"), J(e.src, t = /*imageUrl*/
|
|
717
717
|
i[5]) || y(e, "src", t), y(
|
|
718
718
|
e,
|
|
719
719
|
"alt",
|
|
@@ -726,51 +726,51 @@ function Vn(i) {
|
|
|
726
726
|
i[6]
|
|
727
727
|
), y(e, "class", "svelte-z7p9pp");
|
|
728
728
|
},
|
|
729
|
-
m(
|
|
730
|
-
|
|
729
|
+
m(o, u) {
|
|
730
|
+
j(o, e, u), n || (r = V(
|
|
731
731
|
e,
|
|
732
732
|
"error",
|
|
733
733
|
/*error_handler*/
|
|
734
734
|
i[14]
|
|
735
735
|
), n = !0);
|
|
736
736
|
},
|
|
737
|
-
p(
|
|
737
|
+
p(o, u) {
|
|
738
738
|
u & /*imageUrl*/
|
|
739
|
-
32 && !
|
|
740
|
-
|
|
739
|
+
32 && !J(e.src, t = /*imageUrl*/
|
|
740
|
+
o[5]) && y(e, "src", t), u & /*category*/
|
|
741
741
|
16 && y(
|
|
742
742
|
e,
|
|
743
743
|
"alt",
|
|
744
744
|
/*category*/
|
|
745
|
-
|
|
745
|
+
o[4]
|
|
746
746
|
), u & /*placeType*/
|
|
747
747
|
64 && y(
|
|
748
748
|
e,
|
|
749
749
|
"title",
|
|
750
750
|
/*placeType*/
|
|
751
|
-
|
|
751
|
+
o[6]
|
|
752
752
|
);
|
|
753
753
|
},
|
|
754
|
-
d(
|
|
755
|
-
|
|
754
|
+
d(o) {
|
|
755
|
+
o && D(e), n = !1, r();
|
|
756
756
|
}
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function ui(i) {
|
|
760
760
|
let e, t;
|
|
761
761
|
return {
|
|
762
762
|
c() {
|
|
763
|
-
e =
|
|
763
|
+
e = W("span"), t = xe(
|
|
764
764
|
/*placeType*/
|
|
765
765
|
i[6]
|
|
766
766
|
), y(e, "class", "secondary svelte-z7p9pp");
|
|
767
767
|
},
|
|
768
768
|
m(n, r) {
|
|
769
|
-
|
|
769
|
+
j(n, e, r), O(e, t);
|
|
770
770
|
},
|
|
771
771
|
p(n, r) {
|
|
772
772
|
r & /*placeType*/
|
|
773
|
-
64 &&
|
|
773
|
+
64 && He(
|
|
774
774
|
t,
|
|
775
775
|
/*placeType*/
|
|
776
776
|
n[6]
|
|
@@ -781,8 +781,8 @@ function si(i) {
|
|
|
781
781
|
}
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
let e, t, n, r,
|
|
784
|
+
function $n(i) {
|
|
785
|
+
let e, t, n, r, o, u, s, c, l, f = (
|
|
786
786
|
/*isReverse*/
|
|
787
787
|
(i[8] ? (
|
|
788
788
|
/*feature*/
|
|
@@ -791,7 +791,7 @@ function Yn(i) {
|
|
|
791
791
|
/*feature*/
|
|
792
792
|
i[0].place_name.replace(/,.*/, "")
|
|
793
793
|
)) + ""
|
|
794
|
-
), a, d,
|
|
794
|
+
), a, d, g = (
|
|
795
795
|
/*showPlaceType*/
|
|
796
796
|
i[2] === "always" || /*showPlaceType*/
|
|
797
797
|
i[2] !== "never" && !/*feature*/
|
|
@@ -814,31 +814,31 @@ function Yn(i) {
|
|
|
814
814
|
1 && (t = null), C & /*feature*/
|
|
815
815
|
1 && (n = null), C & /*feature*/
|
|
816
816
|
1 && (r = null), C & /*feature*/
|
|
817
|
-
1 && (
|
|
818
|
-
k[5] ?
|
|
817
|
+
1 && (o = null), /*imageUrl*/
|
|
818
|
+
k[5] ? Jn : (
|
|
819
819
|
/*feature*/
|
|
820
|
-
k[0].address ?
|
|
821
|
-
k[0].id.startsWith("road.")), t ?
|
|
822
|
-
k[0].id.startsWith("address.")), n ?
|
|
823
|
-
k[0].id.startsWith("postal_code.")), r ?
|
|
824
|
-
k[0].id.startsWith("poi.")),
|
|
820
|
+
k[0].address ? Xn : (t == null && (t = !!/*feature*/
|
|
821
|
+
k[0].id.startsWith("road.")), t ? Kn : (n == null && (n = !!/*feature*/
|
|
822
|
+
k[0].id.startsWith("address.")), n ? Yn : (r == null && (r = !!/*feature*/
|
|
823
|
+
k[0].id.startsWith("postal_code.")), r ? Vn : (o == null && (o = !!/*feature*/
|
|
824
|
+
k[0].id.startsWith("poi.")), o ? Hn : (
|
|
825
825
|
/*isReverse*/
|
|
826
|
-
k[8] ?
|
|
826
|
+
k[8] ? Zn : Qn
|
|
827
827
|
)))))
|
|
828
828
|
);
|
|
829
829
|
}
|
|
830
|
-
let S = M(i, -1), P = S(i), w =
|
|
830
|
+
let S = M(i, -1), P = S(i), w = g && ui(i);
|
|
831
831
|
return {
|
|
832
832
|
c() {
|
|
833
|
-
e =
|
|
833
|
+
e = W("li"), P.c(), u = ie(), s = W("span"), c = W("span"), l = W("span"), a = xe(f), d = ie(), w && w.c(), v = ie(), E = W("span"), p = xe(m), y(l, "class", "primary svelte-z7p9pp"), y(c, "class", "svelte-z7p9pp"), y(E, "class", "line2 svelte-z7p9pp"), y(s, "class", "texts svelte-z7p9pp"), y(e, "tabindex", "-1"), y(e, "role", "option"), y(e, "aria-selected", b = /*style*/
|
|
834
834
|
i[1] === "selected"), y(e, "aria-checked", _ = /*style*/
|
|
835
|
-
i[1] === "picked"), y(e, "class", L =
|
|
835
|
+
i[1] === "picked"), y(e, "class", L = gt(
|
|
836
836
|
/*style*/
|
|
837
837
|
i[1]
|
|
838
838
|
) + " svelte-z7p9pp");
|
|
839
839
|
},
|
|
840
840
|
m(k, C) {
|
|
841
|
-
|
|
841
|
+
j(k, e, C), P.m(e, null), O(e, u), O(e, s), O(s, c), O(c, l), O(l, a), O(c, d), w && w.m(c, null), O(s, v), O(s, E), O(E, p), N || (x = [
|
|
842
842
|
V(
|
|
843
843
|
e,
|
|
844
844
|
"mouseenter",
|
|
@@ -868,8 +868,8 @@ function Yn(i) {
|
|
|
868
868
|
) : (
|
|
869
869
|
/*feature*/
|
|
870
870
|
k[0].place_name.replace(/,.*/, "")
|
|
871
|
-
)) + "") &&
|
|
872
|
-
37 && (
|
|
871
|
+
)) + "") && He(a, f), C & /*showPlaceType, feature, imageUrl*/
|
|
872
|
+
37 && (g = /*showPlaceType*/
|
|
873
873
|
k[2] === "always" || /*showPlaceType*/
|
|
874
874
|
k[2] !== "never" && !/*feature*/
|
|
875
875
|
k[0].address && !/*feature*/
|
|
@@ -878,17 +878,17 @@ function Yn(i) {
|
|
|
878
878
|
k[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
879
879
|
k[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
880
880
|
k[5]) && !/*isReverse*/
|
|
881
|
-
k[8]),
|
|
881
|
+
k[8]), g ? w ? w.p(k, C) : (w = ui(k), w.c(), w.m(c, null)) : w && (w.d(1), w = null), C & /*feature*/
|
|
882
882
|
1 && m !== (m = /*isReverse*/
|
|
883
883
|
(k[8] ? "" : (
|
|
884
884
|
/*feature*/
|
|
885
885
|
k[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
886
|
-
)) + "") &&
|
|
886
|
+
)) + "") && He(p, m), C & /*style*/
|
|
887
887
|
2 && b !== (b = /*style*/
|
|
888
888
|
k[1] === "selected") && y(e, "aria-selected", b), C & /*style*/
|
|
889
889
|
2 && _ !== (_ = /*style*/
|
|
890
890
|
k[1] === "picked") && y(e, "aria-checked", _), C & /*style*/
|
|
891
|
-
2 && L !== (L =
|
|
891
|
+
2 && L !== (L = gt(
|
|
892
892
|
/*style*/
|
|
893
893
|
k[1]
|
|
894
894
|
) + " svelte-z7p9pp") && y(e, "class", L);
|
|
@@ -896,42 +896,42 @@ function Yn(i) {
|
|
|
896
896
|
i: U,
|
|
897
897
|
o: U,
|
|
898
898
|
d(k) {
|
|
899
|
-
k && D(e), P.d(), w && w.d(), N = !1,
|
|
899
|
+
k && D(e), P.d(), w && w.d(), N = !1, ve(x);
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function er(i, e, t) {
|
|
904
904
|
var N;
|
|
905
|
-
let n, r, { feature:
|
|
906
|
-
const f =
|
|
907
|
-
let d,
|
|
905
|
+
let n, r, { feature: o } = e, { style: u = "default" } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: l } = e;
|
|
906
|
+
const f = ji(), a = (N = o.properties) == null ? void 0 : N.categories;
|
|
907
|
+
let d, g, v = 0, E = o.place_type[0] === "reverse";
|
|
908
908
|
function m() {
|
|
909
|
-
|
|
909
|
+
g && c.add(g), t(11, v++, v);
|
|
910
910
|
}
|
|
911
911
|
function p(x) {
|
|
912
|
-
|
|
912
|
+
On.call(this, i, x);
|
|
913
913
|
}
|
|
914
914
|
const b = () => m(), _ = () => f("select", void 0), L = (x) => {
|
|
915
915
|
document.activeElement !== x.target && f("select", void 0);
|
|
916
916
|
};
|
|
917
917
|
return i.$$set = (x) => {
|
|
918
|
-
"feature" in x && t(0,
|
|
918
|
+
"feature" in x && t(0, o = x.feature), "style" in x && t(1, u = x.style), "showPlaceType" in x && t(2, s = x.showPlaceType), "missingIconsCache" in x && t(10, c = x.missingIconsCache), "iconsBaseUrl" in x && t(3, l = x.iconsBaseUrl);
|
|
919
919
|
}, i.$$.update = () => {
|
|
920
920
|
var x, M, S, P;
|
|
921
921
|
if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
922
922
|
7224)
|
|
923
923
|
do
|
|
924
|
-
t(12, n--, n), t(4, d = a == null ? void 0 : a[n]), t(5,
|
|
925
|
-
while (n > -1 && (!
|
|
924
|
+
t(12, n--, n), t(4, d = a == null ? void 0 : a[n]), t(5, g = d ? l + d.replace(/ /g, "_") + ".svg" : void 0);
|
|
925
|
+
while (n > -1 && (!g || c.has(g)));
|
|
926
926
|
i.$$.dirty & /*feature*/
|
|
927
|
-
1 && t(6, r = ((M = (x =
|
|
927
|
+
1 && t(6, r = ((M = (x = o.properties) == null ? void 0 : x.categories) == null ? void 0 : M.join(", ")) ?? ((P = (S = o.properties) == null ? void 0 : S.place_type_name) == null ? void 0 : P[0]) ?? o.place_type[0]);
|
|
928
928
|
}, t(12, n = (a == null ? void 0 : a.length) ?? 0), [
|
|
929
|
-
s,
|
|
930
|
-
u,
|
|
931
929
|
o,
|
|
930
|
+
u,
|
|
931
|
+
s,
|
|
932
932
|
l,
|
|
933
933
|
d,
|
|
934
|
-
|
|
934
|
+
g,
|
|
935
935
|
r,
|
|
936
936
|
f,
|
|
937
937
|
E,
|
|
@@ -945,9 +945,9 @@ function Kn(i, e, t) {
|
|
|
945
945
|
L
|
|
946
946
|
];
|
|
947
947
|
}
|
|
948
|
-
class
|
|
948
|
+
class tr extends Te {
|
|
949
949
|
constructor(e) {
|
|
950
|
-
super(),
|
|
950
|
+
super(), Ne(this, e, er, $n, Ce, {
|
|
951
951
|
feature: 0,
|
|
952
952
|
style: 1,
|
|
953
953
|
showPlaceType: 2,
|
|
@@ -956,14 +956,14 @@ class Xn extends ke {
|
|
|
956
956
|
});
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function ir(i) {
|
|
960
960
|
let e;
|
|
961
961
|
return {
|
|
962
962
|
c() {
|
|
963
|
-
e =
|
|
963
|
+
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', y(e, "class", "svelte-7cmwmc");
|
|
964
964
|
},
|
|
965
965
|
m(t, n) {
|
|
966
|
-
|
|
966
|
+
j(t, e, n);
|
|
967
967
|
},
|
|
968
968
|
p: U,
|
|
969
969
|
i: U,
|
|
@@ -973,42 +973,42 @@ function Jn(i) {
|
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
class
|
|
976
|
+
class nr extends Te {
|
|
977
977
|
constructor(e) {
|
|
978
|
-
super(),
|
|
978
|
+
super(), Ne(this, e, null, ir, Ce, {});
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function rr(i) {
|
|
982
982
|
let e, t, n;
|
|
983
983
|
return {
|
|
984
984
|
c() {
|
|
985
|
-
e =
|
|
986
|
-
i[0] === "list" ? 20 : void 0), y(e, "viewBox", "0 0 70 85"), y(e, "fill", "none"), y(e, "class", "svelte-gzo3ar"),
|
|
985
|
+
e = ce("svg"), t = ce("path"), y(t, "stroke-width", "4"), y(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), y(t, "class", "svelte-gzo3ar"), y(e, "width", n = /*displayIn*/
|
|
986
|
+
i[0] === "list" ? 20 : void 0), y(e, "viewBox", "0 0 70 85"), y(e, "fill", "none"), y(e, "class", "svelte-gzo3ar"), he(
|
|
987
987
|
e,
|
|
988
988
|
"in-map",
|
|
989
989
|
/*displayIn*/
|
|
990
990
|
i[0] !== "list"
|
|
991
|
-
),
|
|
991
|
+
), he(
|
|
992
992
|
e,
|
|
993
993
|
"list-icon",
|
|
994
994
|
/*displayIn*/
|
|
995
995
|
i[0] === "list"
|
|
996
996
|
);
|
|
997
997
|
},
|
|
998
|
-
m(r,
|
|
999
|
-
|
|
998
|
+
m(r, o) {
|
|
999
|
+
j(r, e, o), O(e, t);
|
|
1000
1000
|
},
|
|
1001
|
-
p(r, [
|
|
1002
|
-
|
|
1001
|
+
p(r, [o]) {
|
|
1002
|
+
o & /*displayIn*/
|
|
1003
1003
|
1 && n !== (n = /*displayIn*/
|
|
1004
|
-
r[0] === "list" ? 20 : void 0) && y(e, "width", n),
|
|
1005
|
-
1 &&
|
|
1004
|
+
r[0] === "list" ? 20 : void 0) && y(e, "width", n), o & /*displayIn*/
|
|
1005
|
+
1 && he(
|
|
1006
1006
|
e,
|
|
1007
1007
|
"in-map",
|
|
1008
1008
|
/*displayIn*/
|
|
1009
1009
|
r[0] !== "list"
|
|
1010
|
-
),
|
|
1011
|
-
1 &&
|
|
1010
|
+
), o & /*displayIn*/
|
|
1011
|
+
1 && he(
|
|
1012
1012
|
e,
|
|
1013
1013
|
"list-icon",
|
|
1014
1014
|
/*displayIn*/
|
|
@@ -1022,25 +1022,25 @@ function er(i) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
};
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function or(i, e, t) {
|
|
1026
1026
|
let { displayIn: n } = e;
|
|
1027
1027
|
return i.$$set = (r) => {
|
|
1028
1028
|
"displayIn" in r && t(0, n = r.displayIn);
|
|
1029
1029
|
}, [n];
|
|
1030
1030
|
}
|
|
1031
|
-
class
|
|
1031
|
+
class sr extends Te {
|
|
1032
1032
|
constructor(e) {
|
|
1033
|
-
super(),
|
|
1033
|
+
super(), Ne(this, e, or, rr, Ce, { displayIn: 0 });
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function lr(i) {
|
|
1037
1037
|
let e, t;
|
|
1038
1038
|
return {
|
|
1039
1039
|
c() {
|
|
1040
|
-
e =
|
|
1040
|
+
e = ce("svg"), t = ce("path"), y(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), y(e, "viewBox", "0 0 60.006 21.412"), y(e, "width", "14"), y(e, "height", "20"), y(e, "class", "svelte-en2qvf");
|
|
1041
1041
|
},
|
|
1042
1042
|
m(n, r) {
|
|
1043
|
-
|
|
1043
|
+
j(n, e, r), O(e, t);
|
|
1044
1044
|
},
|
|
1045
1045
|
p: U,
|
|
1046
1046
|
i: U,
|
|
@@ -1050,19 +1050,19 @@ function nr(i) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
|
-
class
|
|
1053
|
+
class ur extends Te {
|
|
1054
1054
|
constructor(e) {
|
|
1055
|
-
super(),
|
|
1055
|
+
super(), Ne(this, e, null, lr, Ce, {});
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1058
|
+
function ar(i) {
|
|
1059
1059
|
let e, t, n;
|
|
1060
1060
|
return {
|
|
1061
1061
|
c() {
|
|
1062
|
-
e =
|
|
1062
|
+
e = ce("svg"), t = ce("circle"), n = ce("path"), y(t, "cx", "4.789"), y(t, "cy", "4.787"), y(t, "r", "3.85"), y(t, "class", "svelte-1aq105l"), y(n, "d", "M12.063 12.063 7.635 7.635"), y(n, "class", "svelte-1aq105l"), y(e, "xmlns", "http://www.w3.org/2000/svg"), y(e, "width", "13"), y(e, "height", "13"), y(e, "viewBox", "0 0 13 13"), y(e, "class", "svelte-1aq105l");
|
|
1063
1063
|
},
|
|
1064
|
-
m(r,
|
|
1065
|
-
|
|
1064
|
+
m(r, o) {
|
|
1065
|
+
j(r, e, o), O(e, t), O(e, n);
|
|
1066
1066
|
},
|
|
1067
1067
|
p: U,
|
|
1068
1068
|
i: U,
|
|
@@ -1072,37 +1072,37 @@ function sr(i) {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
1074
1074
|
}
|
|
1075
|
-
class
|
|
1075
|
+
class cr extends Te {
|
|
1076
1076
|
constructor(e) {
|
|
1077
|
-
super(),
|
|
1077
|
+
super(), Ne(this, e, null, ar, Ce, {});
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1081
|
-
const n = e[1], r = e[0],
|
|
1082
|
-
return i === n && t ? i : ((i - r) %
|
|
1080
|
+
function fr(i, e, t) {
|
|
1081
|
+
const n = e[1], r = e[0], o = n - r;
|
|
1082
|
+
return i === n && t ? i : ((i - r) % o + o) % o + r;
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function mt(i) {
|
|
1085
1085
|
const e = [...i];
|
|
1086
1086
|
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;
|
|
1087
1087
|
}
|
|
1088
|
-
let
|
|
1089
|
-
async function
|
|
1088
|
+
let Ge;
|
|
1089
|
+
async function dr(i, e, t) {
|
|
1090
1090
|
const n = i == null ? void 0 : i.getCenterAndZoom();
|
|
1091
1091
|
for (const r of e ?? [])
|
|
1092
1092
|
if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
|
|
1093
1093
|
if (r.type === "fixed")
|
|
1094
1094
|
return r.coordinates.join(",");
|
|
1095
1095
|
e: if (r.type === "client-geolocation") {
|
|
1096
|
-
if (
|
|
1097
|
-
if (!
|
|
1096
|
+
if (Ge && r.cachedLocationExpiry && Ge.time + r.cachedLocationExpiry > Date.now()) {
|
|
1097
|
+
if (!Ge.coords)
|
|
1098
1098
|
break e;
|
|
1099
|
-
return
|
|
1099
|
+
return Ge.coords;
|
|
1100
1100
|
}
|
|
1101
|
-
let
|
|
1101
|
+
let o;
|
|
1102
1102
|
try {
|
|
1103
|
-
return
|
|
1103
|
+
return o = await new Promise((u, s) => {
|
|
1104
1104
|
t.signal.addEventListener("abort", () => {
|
|
1105
|
-
|
|
1105
|
+
s(Error("aborted"));
|
|
1106
1106
|
}), navigator.geolocation.getCurrentPosition(
|
|
1107
1107
|
(c) => {
|
|
1108
1108
|
u(
|
|
@@ -1110,16 +1110,16 @@ async function ur(i, e, t) {
|
|
|
1110
1110
|
);
|
|
1111
1111
|
},
|
|
1112
1112
|
(c) => {
|
|
1113
|
-
|
|
1113
|
+
s(c);
|
|
1114
1114
|
},
|
|
1115
1115
|
r
|
|
1116
1116
|
);
|
|
1117
|
-
}),
|
|
1117
|
+
}), o;
|
|
1118
1118
|
} catch {
|
|
1119
1119
|
} finally {
|
|
1120
|
-
r.cachedLocationExpiry && (
|
|
1120
|
+
r.cachedLocationExpiry && (Ge = {
|
|
1121
1121
|
time: Date.now(),
|
|
1122
|
-
coords:
|
|
1122
|
+
coords: o
|
|
1123
1123
|
});
|
|
1124
1124
|
}
|
|
1125
1125
|
if (t.signal.aborted)
|
|
@@ -1131,67 +1131,67 @@ async function ur(i, e, t) {
|
|
|
1131
1131
|
return n[1].toFixed(6) + "," + n[2].toFixed(6);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
|
-
const
|
|
1135
|
-
function
|
|
1134
|
+
const hr = /^(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, ai = /^([+-]?[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,})$/, ci = /^(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, fi = /^(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, di = /^(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, hi = /^(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;
|
|
1135
|
+
function gr(i) {
|
|
1136
1136
|
if (!["DMS", "DM", "DD"].includes(i))
|
|
1137
1137
|
throw new Error("invalid format specified");
|
|
1138
1138
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
1139
|
-
const e = this.decimalCoordinates.split(",").map((
|
|
1139
|
+
const e = this.decimalCoordinates.split(",").map((g) => Number(g.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), o = Math.abs(n), u = t > 0 ? "N" : "S", s = n > 0 ? "E" : "W";
|
|
1140
1140
|
let c;
|
|
1141
|
-
i == "DD" && (c = `${r}° ${u}, ${
|
|
1142
|
-
const l = Math.floor(r), f = Math.floor(
|
|
1141
|
+
i == "DD" && (c = `${r}° ${u}, ${o}° ${s}`);
|
|
1142
|
+
const l = Math.floor(r), f = Math.floor(o), a = (r - l) * 60, d = (o - f) * 60;
|
|
1143
1143
|
if (i == "DM") {
|
|
1144
|
-
let
|
|
1145
|
-
|
|
1144
|
+
let g = gi(a, 3).toFixed(3).padStart(6, "0"), v = gi(d, 3).toFixed(3).padStart(6, "0");
|
|
1145
|
+
g.endsWith(".000") && v.endsWith(".000") && (g = g.replace(/\.000$/, ""), v = v.replace(/\.000$/, "")), c = `${l}° ${g}' ${u}, ${f}° ${v}' ${s}`;
|
|
1146
1146
|
}
|
|
1147
1147
|
if (i == "DMS") {
|
|
1148
|
-
const
|
|
1149
|
-
let E = ((a -
|
|
1150
|
-
const p =
|
|
1151
|
-
E.endsWith(".0") && m.endsWith(".0") && (E = E.replace(/\.0$/, ""), m = m.replace(/\.0$/, "")), c = `${l}° ${p}' ${E}" ${u}, ${f}° ${b}' ${m}" ${
|
|
1148
|
+
const g = Math.floor(a), v = Math.floor(d);
|
|
1149
|
+
let E = ((a - g) * 60).toFixed(1).padStart(4, "0"), m = ((d - v) * 60).toFixed(1).padStart(4, "0");
|
|
1150
|
+
const p = g.toString().padStart(2, "0"), b = v.toString().padStart(2, "0");
|
|
1151
|
+
E.endsWith(".0") && m.endsWith(".0") && (E = E.replace(/\.0$/, ""), m = m.replace(/\.0$/, "")), c = `${l}° ${p}' ${E}" ${u}, ${f}° ${b}' ${m}" ${s}`;
|
|
1152
1152
|
}
|
|
1153
1153
|
return c;
|
|
1154
1154
|
} else
|
|
1155
1155
|
throw new Error("no decimal coordinates to convert");
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function gi(i, e) {
|
|
1158
1158
|
const t = Math.pow(10, e);
|
|
1159
1159
|
return Math.round((i + Number.EPSILON) * t) / t;
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function qt(i, e) {
|
|
1162
1162
|
e || (e = 5), i = i.replace(/\s+/g, " ").trim();
|
|
1163
|
-
let t = null, n = null, r = "",
|
|
1164
|
-
if (
|
|
1163
|
+
let t = null, n = null, r = "", o = "", u = null, s = [], c = !1;
|
|
1164
|
+
if (hr.test(i))
|
|
1165
1165
|
throw new Error("invalid coordinate value");
|
|
1166
|
-
if (
|
|
1167
|
-
if (
|
|
1168
|
-
t = Math.abs(
|
|
1166
|
+
if (ai.test(i))
|
|
1167
|
+
if (s = ai.exec(i), c = qe(s), c)
|
|
1168
|
+
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), n = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (n *= -1), u = "DM";
|
|
1169
1169
|
else
|
|
1170
1170
|
throw new Error("invalid coordinate format");
|
|
1171
|
-
else if (
|
|
1172
|
-
if (
|
|
1173
|
-
if (t =
|
|
1171
|
+
else if (ci.test(i))
|
|
1172
|
+
if (s = ci.exec(i), c = qe(s), c) {
|
|
1173
|
+
if (t = s[2], n = s[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
|
|
1174
1174
|
throw new Error("integer only coordinate provided");
|
|
1175
1175
|
if (Number(Math.round(n)) == Number(n))
|
|
1176
1176
|
throw new Error("integer only coordinate provided");
|
|
1177
|
-
|
|
1177
|
+
s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
|
|
1178
1178
|
} else
|
|
1179
1179
|
throw new Error("invalid decimal coordinate format");
|
|
1180
|
-
else if (
|
|
1181
|
-
if (
|
|
1182
|
-
t = Math.abs(parseInt(
|
|
1180
|
+
else if (fi.test(i))
|
|
1181
|
+
if (s = fi.exec(i), c = qe(s), c)
|
|
1182
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[9])), s[11] && (n += s[11] / 60), s[13] && (n += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
|
|
1183
1183
|
else
|
|
1184
1184
|
throw new Error("invalid DMS coordinates format");
|
|
1185
|
-
else if (
|
|
1186
|
-
if (
|
|
1187
|
-
t = Math.abs(parseInt(
|
|
1185
|
+
else if (di.test(i))
|
|
1186
|
+
if (s = di.exec(i), c = qe(s), c)
|
|
1187
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, u = "DM"), s[6] && (t += s[6] / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12] / 60), s[14] && (n += s[14] / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1188
1188
|
else
|
|
1189
1189
|
throw new Error("invalid DMS coordinates format");
|
|
1190
|
-
else if (
|
|
1191
|
-
if (
|
|
1190
|
+
else if (hi.test(i)) {
|
|
1191
|
+
if (s = hi.exec(i), c = qe(s), s.filter((l) => l).length <= 5)
|
|
1192
1192
|
throw new Error("invalid coordinates format");
|
|
1193
1193
|
if (c)
|
|
1194
|
-
t = Math.abs(parseInt(
|
|
1194
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, u = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, u = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(s[10])), s[12] && (n += s[12].replace(",", ".") / 60), s[14] && (n += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (n = -1 * n), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1195
1195
|
else
|
|
1196
1196
|
throw new Error("invalid coordinates format");
|
|
1197
1197
|
}
|
|
@@ -1200,16 +1200,16 @@ function Ft(i, e) {
|
|
|
1200
1200
|
throw new Error("invalid longitude value");
|
|
1201
1201
|
if (Math.abs(t) >= 90)
|
|
1202
1202
|
throw new Error("invalid latitude value");
|
|
1203
|
-
if (r && !
|
|
1203
|
+
if (r && !o || !r && o)
|
|
1204
1204
|
throw new Error("invalid coordinates value");
|
|
1205
|
-
if (r && r ==
|
|
1205
|
+
if (r && r == o)
|
|
1206
1206
|
throw new Error("invalid coordinates format");
|
|
1207
1207
|
t.toString().includes(",") && (t = t.replace(",", ".")), n.toString().includes(",") && (n = n.replace(",", "."));
|
|
1208
1208
|
let l = /S|SOUTH/i;
|
|
1209
|
-
l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(
|
|
1210
|
-
const f =
|
|
1209
|
+
l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(o) && n > 0 && (n = -1 * n);
|
|
1210
|
+
const f = s[0].trim();
|
|
1211
1211
|
let a, d;
|
|
1212
|
-
const
|
|
1212
|
+
const g = /[,/;\u0020]/g, v = f.match(g);
|
|
1213
1213
|
if (v == null) {
|
|
1214
1214
|
const p = Math.floor(i.length / 2);
|
|
1215
1215
|
a = f.substring(0, p).trim(), d = f.substring(p).trim();
|
|
@@ -1242,23 +1242,23 @@ function Ft(i, e) {
|
|
|
1242
1242
|
decimalLongitude: n,
|
|
1243
1243
|
decimalCoordinates: `${t},${n}`,
|
|
1244
1244
|
originalFormat: u,
|
|
1245
|
-
closeEnough:
|
|
1246
|
-
toCoordinateFormat:
|
|
1245
|
+
closeEnough: mr,
|
|
1246
|
+
toCoordinateFormat: gr
|
|
1247
1247
|
});
|
|
1248
1248
|
} else
|
|
1249
1249
|
throw new Error("coordinates pattern match failed");
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function qe(i) {
|
|
1252
1252
|
if (!isNaN(i[0]))
|
|
1253
1253
|
return !1;
|
|
1254
1254
|
const e = [...i];
|
|
1255
1255
|
if (e.shift(), e.length % 2 > 0)
|
|
1256
1256
|
return !1;
|
|
1257
1257
|
const t = /^[-+]?\d+([\.,]\d+)?$/, n = /[eastsouthnorthwest]+/i, r = e.length / 2;
|
|
1258
|
-
for (let
|
|
1259
|
-
const u = e[
|
|
1260
|
-
if (!(u == null &&
|
|
1261
|
-
if (u == null ||
|
|
1258
|
+
for (let o = 0; o < r; o++) {
|
|
1259
|
+
const u = e[o], s = e[o + r], c = t.test(u) && t.test(s), l = n.test(u) && n.test(s), f = u == s;
|
|
1260
|
+
if (!(u == null && s == null)) {
|
|
1261
|
+
if (u == null || s == null)
|
|
1262
1262
|
return !1;
|
|
1263
1263
|
if (c || l || f)
|
|
1264
1264
|
continue;
|
|
@@ -1267,28 +1267,28 @@ function Fe(i) {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
return !0;
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function mi(i, e) {
|
|
1271
1271
|
const t = Math.abs(i - e);
|
|
1272
1272
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function mr(i) {
|
|
1275
1275
|
if (!i)
|
|
1276
1276
|
throw new Error("coords must be provided");
|
|
1277
1277
|
if (i.includes(",")) {
|
|
1278
1278
|
const e = i.split(",");
|
|
1279
1279
|
if (Number(e[0]) == NaN || Number(e[1]) == NaN)
|
|
1280
1280
|
throw new Error("coords are not valid decimals");
|
|
1281
|
-
return
|
|
1281
|
+
return mi(this.decimalLatitude, Number(e[0])) && mi(this.decimalLongitude, e[1]);
|
|
1282
1282
|
} else
|
|
1283
1283
|
throw new Error("coords being tested must be separated by a comma");
|
|
1284
1284
|
}
|
|
1285
|
-
const
|
|
1285
|
+
const pr = Object.freeze({
|
|
1286
1286
|
DMS: "DMS",
|
|
1287
1287
|
DM: "DM",
|
|
1288
1288
|
DD: "DD"
|
|
1289
1289
|
});
|
|
1290
|
-
|
|
1291
|
-
const
|
|
1290
|
+
qt.to = pr;
|
|
1291
|
+
const yr = [
|
|
1292
1292
|
{
|
|
1293
1293
|
verbatimCoordinates: "40.123, -74.123",
|
|
1294
1294
|
verbatimLatitude: "40.123",
|
|
@@ -1429,10 +1429,10 @@ const hr = [
|
|
|
1429
1429
|
verbatimLatitude: "40 7 22.8",
|
|
1430
1430
|
verbatimLongitude: "-74 7 22.8"
|
|
1431
1431
|
}
|
|
1432
|
-
],
|
|
1432
|
+
], vr = {
|
|
1433
1433
|
decimalLatitude: 40.123,
|
|
1434
1434
|
decimalLongitude: -74.123
|
|
1435
|
-
},
|
|
1435
|
+
}, br = [
|
|
1436
1436
|
{
|
|
1437
1437
|
verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
|
|
1438
1438
|
verbatimLatitude: `50°4'17.698"south`,
|
|
@@ -1517,7 +1517,7 @@ const hr = [
|
|
|
1517
1517
|
decimalLatitude: -18.4,
|
|
1518
1518
|
decimalLongitude: 22.75
|
|
1519
1519
|
}
|
|
1520
|
-
],
|
|
1520
|
+
], _r = [
|
|
1521
1521
|
{
|
|
1522
1522
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1523
1523
|
verbatimLatitude: "10.432342S",
|
|
@@ -1652,27 +1652,27 @@ const hr = [
|
|
|
1652
1652
|
decimalLongitude: 18.33453
|
|
1653
1653
|
}
|
|
1654
1654
|
];
|
|
1655
|
-
function
|
|
1655
|
+
function Er() {
|
|
1656
1656
|
const i = [];
|
|
1657
|
-
return
|
|
1658
|
-
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...
|
|
1659
|
-
}), [...i, ...
|
|
1660
|
-
}
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1663
|
-
const
|
|
1664
|
-
function
|
|
1657
|
+
return yr.forEach((e) => {
|
|
1658
|
+
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...vr });
|
|
1659
|
+
}), [...i, ...br, ..._r];
|
|
1660
|
+
}
|
|
1661
|
+
const wr = Er();
|
|
1662
|
+
qt.formats = wr.map((i) => i.verbatimCoordinates);
|
|
1663
|
+
const Lr = qt;
|
|
1664
|
+
function pi(i, e, t) {
|
|
1665
1665
|
const n = i.slice();
|
|
1666
|
-
return n[
|
|
1666
|
+
return n[94] = e[t], n[96] = t, n;
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1668
|
+
function yi(i) {
|
|
1669
1669
|
let e, t;
|
|
1670
|
-
return e = new
|
|
1670
|
+
return e = new nr({}), {
|
|
1671
1671
|
c() {
|
|
1672
|
-
|
|
1672
|
+
Me(e.$$.fragment);
|
|
1673
1673
|
},
|
|
1674
1674
|
m(n, r) {
|
|
1675
|
-
|
|
1675
|
+
pe(e, n, r), t = !0;
|
|
1676
1676
|
},
|
|
1677
1677
|
i(n) {
|
|
1678
1678
|
t || (Q(e.$$.fragment, n), t = !0);
|
|
@@ -1681,43 +1681,43 @@ function gi(i) {
|
|
|
1681
1681
|
Y(e.$$.fragment, n), t = !1;
|
|
1682
1682
|
},
|
|
1683
1683
|
d(n) {
|
|
1684
|
-
|
|
1684
|
+
ye(e, n);
|
|
1685
1685
|
}
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1689
|
-
let e, t, n, r,
|
|
1690
|
-
return t = new
|
|
1688
|
+
function vi(i) {
|
|
1689
|
+
let e, t, n, r, o;
|
|
1690
|
+
return t = new ur({}), {
|
|
1691
1691
|
c() {
|
|
1692
|
-
e =
|
|
1692
|
+
e = W("button"), Me(t.$$.fragment), y(e, "type", "button"), y(
|
|
1693
1693
|
e,
|
|
1694
1694
|
"title",
|
|
1695
1695
|
/*reverseButtonTitle*/
|
|
1696
1696
|
i[10]
|
|
1697
|
-
), y(e, "class", "svelte-bz0zu3"),
|
|
1697
|
+
), y(e, "class", "svelte-bz0zu3"), he(
|
|
1698
1698
|
e,
|
|
1699
1699
|
"active",
|
|
1700
1700
|
/*reverseActive*/
|
|
1701
1701
|
i[0]
|
|
1702
1702
|
);
|
|
1703
1703
|
},
|
|
1704
|
-
m(u,
|
|
1705
|
-
|
|
1704
|
+
m(u, s) {
|
|
1705
|
+
j(u, e, s), pe(t, e, null), n = !0, r || (o = V(
|
|
1706
1706
|
e,
|
|
1707
1707
|
"click",
|
|
1708
1708
|
/*click_handler_3*/
|
|
1709
|
-
i[
|
|
1709
|
+
i[78]
|
|
1710
1710
|
), r = !0);
|
|
1711
1711
|
},
|
|
1712
|
-
p(u,
|
|
1713
|
-
(!n ||
|
|
1712
|
+
p(u, s) {
|
|
1713
|
+
(!n || s[0] & /*reverseButtonTitle*/
|
|
1714
1714
|
1024) && y(
|
|
1715
1715
|
e,
|
|
1716
1716
|
"title",
|
|
1717
1717
|
/*reverseButtonTitle*/
|
|
1718
1718
|
u[10]
|
|
1719
|
-
), (!n ||
|
|
1720
|
-
1) &&
|
|
1719
|
+
), (!n || s[0] & /*reverseActive*/
|
|
1720
|
+
1) && he(
|
|
1721
1721
|
e,
|
|
1722
1722
|
"active",
|
|
1723
1723
|
/*reverseActive*/
|
|
@@ -1731,37 +1731,37 @@ function mi(i) {
|
|
|
1731
1731
|
Y(t.$$.fragment, u), n = !1;
|
|
1732
1732
|
},
|
|
1733
1733
|
d(u) {
|
|
1734
|
-
u && D(e),
|
|
1734
|
+
u && D(e), ye(t), r = !1, o();
|
|
1735
1735
|
}
|
|
1736
1736
|
};
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1739
|
-
let e, t = [], n = /* @__PURE__ */ new Map(), r,
|
|
1738
|
+
function Sr(i) {
|
|
1739
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), r, o, u, s = li(
|
|
1740
1740
|
/*listFeatures*/
|
|
1741
1741
|
i[13]
|
|
1742
1742
|
);
|
|
1743
1743
|
const c = (l) => (
|
|
1744
1744
|
/*feature*/
|
|
1745
|
-
l[
|
|
1746
|
-
(l[
|
|
1747
|
-
l[
|
|
1745
|
+
l[94].id + /*feature*/
|
|
1746
|
+
(l[94].address ? "," + /*feature*/
|
|
1747
|
+
l[94].address : "")
|
|
1748
1748
|
);
|
|
1749
|
-
for (let l = 0; l <
|
|
1750
|
-
let f =
|
|
1751
|
-
n.set(a, t[l] =
|
|
1749
|
+
for (let l = 0; l < s.length; l += 1) {
|
|
1750
|
+
let f = pi(i, s, l), a = c(f);
|
|
1751
|
+
n.set(a, t[l] = bi(a, f));
|
|
1752
1752
|
}
|
|
1753
1753
|
return {
|
|
1754
1754
|
c() {
|
|
1755
|
-
e =
|
|
1755
|
+
e = W("ul");
|
|
1756
1756
|
for (let l = 0; l < t.length; l += 1)
|
|
1757
1757
|
t[l].c();
|
|
1758
1758
|
y(e, "class", "options svelte-bz0zu3"), y(e, "role", "listbox");
|
|
1759
1759
|
},
|
|
1760
1760
|
m(l, f) {
|
|
1761
|
-
|
|
1761
|
+
j(l, e, f);
|
|
1762
1762
|
for (let a = 0; a < t.length; a += 1)
|
|
1763
1763
|
t[a] && t[a].m(e, null);
|
|
1764
|
-
r = !0,
|
|
1764
|
+
r = !0, o || (u = [
|
|
1765
1765
|
V(
|
|
1766
1766
|
e,
|
|
1767
1767
|
"mouseleave",
|
|
@@ -1772,7 +1772,7 @@ function _r(i) {
|
|
|
1772
1772
|
e,
|
|
1773
1773
|
"blur",
|
|
1774
1774
|
/*blur_handler_1*/
|
|
1775
|
-
i[
|
|
1775
|
+
i[82]
|
|
1776
1776
|
),
|
|
1777
1777
|
V(
|
|
1778
1778
|
e,
|
|
@@ -1780,18 +1780,18 @@ function _r(i) {
|
|
|
1780
1780
|
/*handleKeyDown*/
|
|
1781
1781
|
i[23]
|
|
1782
1782
|
)
|
|
1783
|
-
],
|
|
1783
|
+
], o = !0);
|
|
1784
1784
|
},
|
|
1785
1785
|
p(l, f) {
|
|
1786
1786
|
f[0] & /*listFeatures, showPlaceType, selectedItemIndex, picked, missingIconsCache, iconsBaseUrl, handleMouseEnter, pick*/
|
|
1787
|
-
102823936 && (
|
|
1787
|
+
102823936 && (s = li(
|
|
1788
1788
|
/*listFeatures*/
|
|
1789
1789
|
l[13]
|
|
1790
|
-
),
|
|
1790
|
+
), ft(), t = Dn(t, f, c, 1, l, s, n, e, Un, bi, null, pi), dt());
|
|
1791
1791
|
},
|
|
1792
1792
|
i(l) {
|
|
1793
1793
|
if (!r) {
|
|
1794
|
-
for (let f = 0; f <
|
|
1794
|
+
for (let f = 0; f < s.length; f += 1)
|
|
1795
1795
|
Q(t[f]);
|
|
1796
1796
|
r = !0;
|
|
1797
1797
|
}
|
|
@@ -1805,49 +1805,49 @@ function _r(i) {
|
|
|
1805
1805
|
l && D(e);
|
|
1806
1806
|
for (let f = 0; f < t.length; f += 1)
|
|
1807
1807
|
t[f].d();
|
|
1808
|
-
|
|
1808
|
+
o = !1, ve(u);
|
|
1809
1809
|
}
|
|
1810
1810
|
};
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1813
|
-
let e, t, n, r,
|
|
1814
|
-
return t = new
|
|
1812
|
+
function xr(i) {
|
|
1813
|
+
let e, t, n, r, o, u;
|
|
1814
|
+
return t = new Qi({}), {
|
|
1815
1815
|
c() {
|
|
1816
|
-
e =
|
|
1816
|
+
e = W("div"), Me(t.$$.fragment), n = ie(), r = W("div"), o = xe(
|
|
1817
1817
|
/*noResultsMessage*/
|
|
1818
1818
|
i[8]
|
|
1819
1819
|
), y(r, "class", "svelte-bz0zu3"), y(e, "class", "no-results svelte-bz0zu3");
|
|
1820
1820
|
},
|
|
1821
|
-
m(
|
|
1822
|
-
|
|
1821
|
+
m(s, c) {
|
|
1822
|
+
j(s, e, c), pe(t, e, null), O(e, n), O(e, r), O(r, o), u = !0;
|
|
1823
1823
|
},
|
|
1824
|
-
p(
|
|
1824
|
+
p(s, c) {
|
|
1825
1825
|
(!u || c[0] & /*noResultsMessage*/
|
|
1826
|
-
256) &&
|
|
1827
|
-
|
|
1826
|
+
256) && He(
|
|
1827
|
+
o,
|
|
1828
1828
|
/*noResultsMessage*/
|
|
1829
|
-
|
|
1829
|
+
s[8]
|
|
1830
1830
|
);
|
|
1831
1831
|
},
|
|
1832
|
-
i(
|
|
1833
|
-
u || (Q(t.$$.fragment,
|
|
1832
|
+
i(s) {
|
|
1833
|
+
u || (Q(t.$$.fragment, s), u = !0);
|
|
1834
1834
|
},
|
|
1835
|
-
o(
|
|
1836
|
-
Y(t.$$.fragment,
|
|
1835
|
+
o(s) {
|
|
1836
|
+
Y(t.$$.fragment, s), u = !1;
|
|
1837
1837
|
},
|
|
1838
|
-
d(
|
|
1839
|
-
|
|
1838
|
+
d(s) {
|
|
1839
|
+
s && D(e), ye(t);
|
|
1840
1840
|
}
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function Mr(i) {
|
|
1844
1844
|
let e = "", t;
|
|
1845
1845
|
return {
|
|
1846
1846
|
c() {
|
|
1847
|
-
t =
|
|
1847
|
+
t = xe(e);
|
|
1848
1848
|
},
|
|
1849
1849
|
m(n, r) {
|
|
1850
|
-
|
|
1850
|
+
j(n, t, r);
|
|
1851
1851
|
},
|
|
1852
1852
|
p: U,
|
|
1853
1853
|
i: U,
|
|
@@ -1857,27 +1857,27 @@ function wr(i) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
};
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1861
|
-
let e, t, n, r,
|
|
1862
|
-
return t = new
|
|
1860
|
+
function kr(i) {
|
|
1861
|
+
let e, t, n, r, o, u, s, c, l, f, a;
|
|
1862
|
+
return t = new Qi({}), c = new qi({}), {
|
|
1863
1863
|
c() {
|
|
1864
|
-
e =
|
|
1864
|
+
e = W("div"), Me(t.$$.fragment), n = ie(), r = W("div"), o = xe(
|
|
1865
1865
|
/*errorMessage*/
|
|
1866
1866
|
i[7]
|
|
1867
|
-
), u =
|
|
1867
|
+
), u = ie(), s = W("button"), Me(c.$$.fragment), y(r, "class", "svelte-bz0zu3"), y(s, "class", "svelte-bz0zu3"), y(e, "class", "error svelte-bz0zu3");
|
|
1868
1868
|
},
|
|
1869
|
-
m(d,
|
|
1870
|
-
|
|
1871
|
-
|
|
1869
|
+
m(d, g) {
|
|
1870
|
+
j(d, e, g), pe(t, e, null), O(e, n), O(e, r), O(r, o), O(e, u), O(e, s), pe(c, s, null), l = !0, f || (a = V(
|
|
1871
|
+
s,
|
|
1872
1872
|
"click",
|
|
1873
1873
|
/*click_handler_4*/
|
|
1874
|
-
i[
|
|
1874
|
+
i[79]
|
|
1875
1875
|
), f = !0);
|
|
1876
1876
|
},
|
|
1877
|
-
p(d,
|
|
1878
|
-
(!l ||
|
|
1879
|
-
128) &&
|
|
1880
|
-
|
|
1877
|
+
p(d, g) {
|
|
1878
|
+
(!l || g[0] & /*errorMessage*/
|
|
1879
|
+
128) && He(
|
|
1880
|
+
o,
|
|
1881
1881
|
/*errorMessage*/
|
|
1882
1882
|
d[7]
|
|
1883
1883
|
);
|
|
@@ -1889,36 +1889,36 @@ function Lr(i) {
|
|
|
1889
1889
|
Y(t.$$.fragment, d), Y(c.$$.fragment, d), l = !1;
|
|
1890
1890
|
},
|
|
1891
1891
|
d(d) {
|
|
1892
|
-
d && D(e),
|
|
1892
|
+
d && D(e), ye(t), ye(c), f = !1, a();
|
|
1893
1893
|
}
|
|
1894
1894
|
};
|
|
1895
1895
|
}
|
|
1896
|
-
function
|
|
1897
|
-
var
|
|
1896
|
+
function bi(i, e) {
|
|
1897
|
+
var s;
|
|
1898
1898
|
let t, n, r;
|
|
1899
|
-
function
|
|
1899
|
+
function o() {
|
|
1900
1900
|
return (
|
|
1901
1901
|
/*mouseenter_handler*/
|
|
1902
|
-
e[
|
|
1902
|
+
e[80](
|
|
1903
1903
|
/*i*/
|
|
1904
|
-
e[
|
|
1904
|
+
e[96]
|
|
1905
1905
|
)
|
|
1906
1906
|
);
|
|
1907
1907
|
}
|
|
1908
1908
|
function u() {
|
|
1909
1909
|
return (
|
|
1910
1910
|
/*select_handler*/
|
|
1911
|
-
e[
|
|
1911
|
+
e[81](
|
|
1912
1912
|
/*feature*/
|
|
1913
|
-
e[
|
|
1913
|
+
e[94]
|
|
1914
1914
|
)
|
|
1915
1915
|
);
|
|
1916
1916
|
}
|
|
1917
|
-
return n = new
|
|
1917
|
+
return n = new tr({
|
|
1918
1918
|
props: {
|
|
1919
1919
|
feature: (
|
|
1920
1920
|
/*feature*/
|
|
1921
|
-
e[
|
|
1921
|
+
e[94]
|
|
1922
1922
|
),
|
|
1923
1923
|
showPlaceType: (
|
|
1924
1924
|
/*showPlaceType*/
|
|
@@ -1927,10 +1927,10 @@ function pi(i, e) {
|
|
|
1927
1927
|
style: (
|
|
1928
1928
|
/*selectedItemIndex*/
|
|
1929
1929
|
e[15] === /*i*/
|
|
1930
|
-
e[
|
|
1930
|
+
e[96] ? "selected" : (
|
|
1931
1931
|
/*picked*/
|
|
1932
|
-
((
|
|
1933
|
-
e[
|
|
1932
|
+
((s = e[14]) == null ? void 0 : s.id) === /*feature*/
|
|
1933
|
+
e[94].id ? "picked" : "default"
|
|
1934
1934
|
)
|
|
1935
1935
|
),
|
|
1936
1936
|
missingIconsCache: (
|
|
@@ -1942,14 +1942,14 @@ function pi(i, e) {
|
|
|
1942
1942
|
e[12]
|
|
1943
1943
|
)
|
|
1944
1944
|
}
|
|
1945
|
-
}), n.$on("mouseenter",
|
|
1945
|
+
}), n.$on("mouseenter", o), n.$on("select", u), {
|
|
1946
1946
|
key: i,
|
|
1947
1947
|
first: null,
|
|
1948
1948
|
c() {
|
|
1949
|
-
t =
|
|
1949
|
+
t = Nn(), Me(n.$$.fragment), this.first = t;
|
|
1950
1950
|
},
|
|
1951
1951
|
m(c, l) {
|
|
1952
|
-
|
|
1952
|
+
j(c, t, l), pe(n, c, l), r = !0;
|
|
1953
1953
|
},
|
|
1954
1954
|
p(c, l) {
|
|
1955
1955
|
var a;
|
|
@@ -1957,15 +1957,15 @@ function pi(i, e) {
|
|
|
1957
1957
|
const f = {};
|
|
1958
1958
|
l[0] & /*listFeatures*/
|
|
1959
1959
|
8192 && (f.feature = /*feature*/
|
|
1960
|
-
e[
|
|
1960
|
+
e[94]), l[0] & /*showPlaceType*/
|
|
1961
1961
|
2048 && (f.showPlaceType = /*showPlaceType*/
|
|
1962
1962
|
e[11]), l[0] & /*selectedItemIndex, listFeatures, picked*/
|
|
1963
1963
|
57344 && (f.style = /*selectedItemIndex*/
|
|
1964
1964
|
e[15] === /*i*/
|
|
1965
|
-
e[
|
|
1965
|
+
e[96] ? "selected" : (
|
|
1966
1966
|
/*picked*/
|
|
1967
1967
|
((a = e[14]) == null ? void 0 : a.id) === /*feature*/
|
|
1968
|
-
e[
|
|
1968
|
+
e[94].id ? "picked" : "default"
|
|
1969
1969
|
)), l[0] & /*iconsBaseUrl*/
|
|
1970
1970
|
4096 && (f.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1971
1971
|
e[12]), n.$set(f);
|
|
@@ -1977,73 +1977,73 @@ function pi(i, e) {
|
|
|
1977
1977
|
Y(n.$$.fragment, c), r = !1;
|
|
1978
1978
|
},
|
|
1979
1979
|
d(c) {
|
|
1980
|
-
c && D(t),
|
|
1980
|
+
c && D(t), ye(n, c);
|
|
1981
1981
|
}
|
|
1982
1982
|
};
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1985
|
-
let e, t, n, r,
|
|
1986
|
-
|
|
1984
|
+
function Cr(i) {
|
|
1985
|
+
let e, t, n, r, o, u, s, c, l, f, a, d, g, v, E, m, p, b, _, L, N, x = !1;
|
|
1986
|
+
o = new cr({}), a = new qi({});
|
|
1987
1987
|
let M = (
|
|
1988
1988
|
/*abortController*/
|
|
1989
|
-
i[20] &&
|
|
1989
|
+
i[20] && yi()
|
|
1990
1990
|
), S = (
|
|
1991
1991
|
/*enableReverse*/
|
|
1992
|
-
i[6] === "button" &&
|
|
1992
|
+
i[6] === "button" && vi(i)
|
|
1993
1993
|
);
|
|
1994
1994
|
const P = (
|
|
1995
1995
|
/*#slots*/
|
|
1996
|
-
i[
|
|
1997
|
-
), w =
|
|
1996
|
+
i[69].default
|
|
1997
|
+
), w = xn(
|
|
1998
1998
|
P,
|
|
1999
1999
|
i,
|
|
2000
2000
|
/*$$scope*/
|
|
2001
|
-
i[
|
|
2001
|
+
i[68],
|
|
2002
2002
|
null
|
|
2003
|
-
), k = [
|
|
2004
|
-
function
|
|
2005
|
-
var
|
|
2003
|
+
), k = [kr, Mr, xr, Sr], C = [];
|
|
2004
|
+
function $(T, z) {
|
|
2005
|
+
var oe, F;
|
|
2006
2006
|
return (
|
|
2007
2007
|
/*error*/
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2008
|
+
T[19] ? 0 : !/*focusedDelayed*/
|
|
2009
|
+
T[16] && !/*keepListOpen*/
|
|
2010
|
+
T[4] ? 1 : (
|
|
2011
2011
|
/*listFeatures*/
|
|
2012
|
-
((
|
|
2012
|
+
((oe = T[13]) == null ? void 0 : oe.length) === 0 ? 2 : (
|
|
2013
2013
|
/*listFeatures*/
|
|
2014
|
-
(
|
|
2015
|
-
(
|
|
2016
|
-
|
|
2014
|
+
(F = T[13]) != null && F.length && /*focusedDelayed*/
|
|
2015
|
+
(T[16] || /*keepListOpen*/
|
|
2016
|
+
T[4]) ? 3 : -1
|
|
2017
2017
|
)
|
|
2018
2018
|
)
|
|
2019
2019
|
);
|
|
2020
2020
|
}
|
|
2021
|
-
return ~(m =
|
|
2021
|
+
return ~(m = $(i)) && (p = C[m] = k[m](i)), {
|
|
2022
2022
|
c() {
|
|
2023
|
-
e =
|
|
2024
|
-
|
|
2023
|
+
e = ie(), t = W("form"), n = W("div"), r = W("button"), Me(o.$$.fragment), u = ie(), s = W("input"), c = ie(), l = W("div"), f = W("button"), Me(a.$$.fragment), d = ie(), M && M.c(), g = ie(), S && S.c(), v = ie(), w && w.c(), E = ie(), p && p.c(), y(r, "class", "search-button svelte-bz0zu3"), y(r, "type", "button"), y(
|
|
2024
|
+
s,
|
|
2025
2025
|
"placeholder",
|
|
2026
2026
|
/*placeholder*/
|
|
2027
2027
|
i[9]
|
|
2028
2028
|
), y(
|
|
2029
|
-
|
|
2029
|
+
s,
|
|
2030
2030
|
"aria-label",
|
|
2031
2031
|
/*placeholder*/
|
|
2032
2032
|
i[9]
|
|
2033
|
-
), y(
|
|
2033
|
+
), y(s, "class", "svelte-bz0zu3"), y(f, "type", "button"), y(
|
|
2034
2034
|
f,
|
|
2035
2035
|
"title",
|
|
2036
2036
|
/*clearButtonTitle*/
|
|
2037
2037
|
i[3]
|
|
2038
|
-
), y(f, "class", "svelte-bz0zu3"), y(l, "class", "clear-button-container svelte-bz0zu3"),
|
|
2038
|
+
), y(f, "class", "svelte-bz0zu3"), y(l, "class", "clear-button-container svelte-bz0zu3"), he(
|
|
2039
2039
|
l,
|
|
2040
2040
|
"displayable",
|
|
2041
2041
|
/*searchValue*/
|
|
2042
2042
|
i[1] !== ""
|
|
2043
|
-
), y(n, "class", "input-group svelte-bz0zu3"), y(t, "class", b =
|
|
2043
|
+
), y(n, "class", "input-group svelte-bz0zu3"), y(t, "class", b = gt(
|
|
2044
2044
|
/*className*/
|
|
2045
2045
|
i[2]
|
|
2046
|
-
) + " svelte-bz0zu3"),
|
|
2046
|
+
) + " svelte-bz0zu3"), he(
|
|
2047
2047
|
t,
|
|
2048
2048
|
"can-collapse",
|
|
2049
2049
|
/*collapsed*/
|
|
@@ -2051,159 +2051,159 @@ function Sr(i) {
|
|
|
2051
2051
|
i[1] === ""
|
|
2052
2052
|
);
|
|
2053
2053
|
},
|
|
2054
|
-
m(
|
|
2055
|
-
|
|
2056
|
-
|
|
2054
|
+
m(T, z) {
|
|
2055
|
+
j(T, e, z), j(T, t, z), O(t, n), O(n, r), pe(o, r, null), O(n, u), O(n, s), i[71](s), oi(
|
|
2056
|
+
s,
|
|
2057
2057
|
/*searchValue*/
|
|
2058
2058
|
i[1]
|
|
2059
|
-
), O(n, c), O(n, l), O(l, f),
|
|
2059
|
+
), O(n, c), O(n, l), O(l, f), pe(a, f, null), O(l, d), M && M.m(l, null), O(n, g), S && S.m(n, null), O(n, v), w && w.m(n, null), O(t, E), ~m && C[m].m(t, null), _ = !0, L || (N = [
|
|
2060
2060
|
V(
|
|
2061
2061
|
r,
|
|
2062
2062
|
"click",
|
|
2063
2063
|
/*click_handler*/
|
|
2064
|
-
i[
|
|
2064
|
+
i[70]
|
|
2065
2065
|
),
|
|
2066
2066
|
V(
|
|
2067
|
-
|
|
2067
|
+
s,
|
|
2068
2068
|
"input",
|
|
2069
2069
|
/*input_1_input_handler*/
|
|
2070
|
-
i[
|
|
2070
|
+
i[72]
|
|
2071
2071
|
),
|
|
2072
2072
|
V(
|
|
2073
|
-
|
|
2073
|
+
s,
|
|
2074
2074
|
"focus",
|
|
2075
2075
|
/*focus_handler*/
|
|
2076
|
-
i[
|
|
2076
|
+
i[73]
|
|
2077
2077
|
),
|
|
2078
2078
|
V(
|
|
2079
|
-
|
|
2079
|
+
s,
|
|
2080
2080
|
"blur",
|
|
2081
2081
|
/*blur_handler*/
|
|
2082
|
-
i[
|
|
2082
|
+
i[74]
|
|
2083
2083
|
),
|
|
2084
2084
|
V(
|
|
2085
|
-
|
|
2085
|
+
s,
|
|
2086
2086
|
"click",
|
|
2087
2087
|
/*click_handler_1*/
|
|
2088
|
-
i[
|
|
2088
|
+
i[75]
|
|
2089
2089
|
),
|
|
2090
2090
|
V(
|
|
2091
|
-
|
|
2091
|
+
s,
|
|
2092
2092
|
"keydown",
|
|
2093
2093
|
/*handleKeyDown*/
|
|
2094
2094
|
i[23]
|
|
2095
2095
|
),
|
|
2096
2096
|
V(
|
|
2097
|
-
|
|
2097
|
+
s,
|
|
2098
2098
|
"input",
|
|
2099
2099
|
/*handleInput*/
|
|
2100
2100
|
i[24]
|
|
2101
2101
|
),
|
|
2102
2102
|
V(
|
|
2103
|
-
|
|
2103
|
+
s,
|
|
2104
2104
|
"change",
|
|
2105
2105
|
/*change_handler*/
|
|
2106
|
-
i[
|
|
2106
|
+
i[76]
|
|
2107
2107
|
),
|
|
2108
2108
|
V(
|
|
2109
2109
|
f,
|
|
2110
2110
|
"click",
|
|
2111
2111
|
/*click_handler_2*/
|
|
2112
|
-
i[
|
|
2112
|
+
i[77]
|
|
2113
2113
|
),
|
|
2114
|
-
V(t, "submit",
|
|
2114
|
+
V(t, "submit", Tn(
|
|
2115
2115
|
/*handleSubmit*/
|
|
2116
2116
|
i[22]
|
|
2117
2117
|
))
|
|
2118
2118
|
], L = !0);
|
|
2119
2119
|
},
|
|
2120
|
-
p(
|
|
2121
|
-
(!_ ||
|
|
2120
|
+
p(T, z) {
|
|
2121
|
+
(!_ || z[0] & /*placeholder*/
|
|
2122
2122
|
512) && y(
|
|
2123
|
-
|
|
2123
|
+
s,
|
|
2124
2124
|
"placeholder",
|
|
2125
2125
|
/*placeholder*/
|
|
2126
|
-
|
|
2127
|
-
), (!_ ||
|
|
2126
|
+
T[9]
|
|
2127
|
+
), (!_ || z[0] & /*placeholder*/
|
|
2128
2128
|
512) && y(
|
|
2129
|
-
|
|
2129
|
+
s,
|
|
2130
2130
|
"aria-label",
|
|
2131
2131
|
/*placeholder*/
|
|
2132
|
-
|
|
2133
|
-
),
|
|
2134
|
-
2 &&
|
|
2135
|
-
|
|
2136
|
-
|
|
2132
|
+
T[9]
|
|
2133
|
+
), z[0] & /*searchValue*/
|
|
2134
|
+
2 && s.value !== /*searchValue*/
|
|
2135
|
+
T[1] && oi(
|
|
2136
|
+
s,
|
|
2137
2137
|
/*searchValue*/
|
|
2138
|
-
|
|
2139
|
-
), (!_ ||
|
|
2138
|
+
T[1]
|
|
2139
|
+
), (!_ || z[0] & /*clearButtonTitle*/
|
|
2140
2140
|
8) && y(
|
|
2141
2141
|
f,
|
|
2142
2142
|
"title",
|
|
2143
2143
|
/*clearButtonTitle*/
|
|
2144
|
-
|
|
2144
|
+
T[3]
|
|
2145
2145
|
), /*abortController*/
|
|
2146
|
-
|
|
2147
|
-
1048576 && Q(M, 1) : (M =
|
|
2146
|
+
T[20] ? M ? z[0] & /*abortController*/
|
|
2147
|
+
1048576 && Q(M, 1) : (M = yi(), M.c(), Q(M, 1), M.m(l, null)) : M && (ft(), Y(M, 1, 1, () => {
|
|
2148
2148
|
M = null;
|
|
2149
|
-
}),
|
|
2150
|
-
2) &&
|
|
2149
|
+
}), dt()), (!_ || z[0] & /*searchValue*/
|
|
2150
|
+
2) && he(
|
|
2151
2151
|
l,
|
|
2152
2152
|
"displayable",
|
|
2153
2153
|
/*searchValue*/
|
|
2154
|
-
|
|
2154
|
+
T[1] !== ""
|
|
2155
2155
|
), /*enableReverse*/
|
|
2156
|
-
|
|
2157
|
-
64 && Q(S, 1)) : (S =
|
|
2156
|
+
T[6] === "button" ? S ? (S.p(T, z), z[0] & /*enableReverse*/
|
|
2157
|
+
64 && Q(S, 1)) : (S = vi(T), S.c(), Q(S, 1), S.m(n, v)) : S && (ft(), Y(S, 1, 1, () => {
|
|
2158
2158
|
S = null;
|
|
2159
|
-
}),
|
|
2160
|
-
|
|
2159
|
+
}), dt()), w && w.p && (!_ || z[2] & /*$$scope*/
|
|
2160
|
+
64) && kn(
|
|
2161
2161
|
w,
|
|
2162
2162
|
P,
|
|
2163
|
-
|
|
2163
|
+
T,
|
|
2164
2164
|
/*$$scope*/
|
|
2165
|
-
|
|
2166
|
-
_ ?
|
|
2165
|
+
T[68],
|
|
2166
|
+
_ ? Mn(
|
|
2167
2167
|
P,
|
|
2168
2168
|
/*$$scope*/
|
|
2169
|
-
|
|
2170
|
-
|
|
2169
|
+
T[68],
|
|
2170
|
+
z,
|
|
2171
2171
|
null
|
|
2172
|
-
) :
|
|
2172
|
+
) : Cn(
|
|
2173
2173
|
/*$$scope*/
|
|
2174
|
-
|
|
2174
|
+
T[68]
|
|
2175
2175
|
),
|
|
2176
2176
|
null
|
|
2177
2177
|
);
|
|
2178
|
-
let
|
|
2179
|
-
m =
|
|
2180
|
-
C[
|
|
2181
|
-
}),
|
|
2182
|
-
4 && b !== (b =
|
|
2178
|
+
let oe = m;
|
|
2179
|
+
m = $(T), m === oe ? ~m && C[m].p(T, z) : (p && (ft(), Y(C[oe], 1, 1, () => {
|
|
2180
|
+
C[oe] = null;
|
|
2181
|
+
}), dt()), ~m ? (p = C[m], p ? p.p(T, z) : (p = C[m] = k[m](T), p.c()), Q(p, 1), p.m(t, null)) : p = null), (!_ || z[0] & /*className*/
|
|
2182
|
+
4 && b !== (b = gt(
|
|
2183
2183
|
/*className*/
|
|
2184
|
-
|
|
2185
|
-
) + " svelte-bz0zu3")) && y(t, "class", b), (!_ ||
|
|
2186
|
-
38) &&
|
|
2184
|
+
T[2]
|
|
2185
|
+
) + " svelte-bz0zu3")) && y(t, "class", b), (!_ || z[0] & /*className, collapsed, searchValue*/
|
|
2186
|
+
38) && he(
|
|
2187
2187
|
t,
|
|
2188
2188
|
"can-collapse",
|
|
2189
2189
|
/*collapsed*/
|
|
2190
|
-
|
|
2191
|
-
|
|
2190
|
+
T[5] && /*searchValue*/
|
|
2191
|
+
T[1] === ""
|
|
2192
2192
|
);
|
|
2193
2193
|
},
|
|
2194
|
-
i(
|
|
2195
|
-
_ || (Q(x), Q(
|
|
2194
|
+
i(T) {
|
|
2195
|
+
_ || (Q(x), Q(o.$$.fragment, T), Q(a.$$.fragment, T), Q(M), Q(S), Q(w, T), Q(p), _ = !0);
|
|
2196
2196
|
},
|
|
2197
|
-
o(
|
|
2198
|
-
Y(x), Y(
|
|
2197
|
+
o(T) {
|
|
2198
|
+
Y(x), Y(o.$$.fragment, T), Y(a.$$.fragment, T), Y(M), Y(S), Y(w, T), Y(p), _ = !1;
|
|
2199
2199
|
},
|
|
2200
|
-
d(
|
|
2201
|
-
|
|
2200
|
+
d(T) {
|
|
2201
|
+
T && (D(e), D(t)), ye(o), i[71](null), ye(a), M && M.d(), S && S.d(), w && w.d(T), ~m && C[m].d(), L = !1, ve(N);
|
|
2202
2202
|
}
|
|
2203
2203
|
};
|
|
2204
2204
|
}
|
|
2205
|
-
function
|
|
2206
|
-
let n, r,
|
|
2205
|
+
function Nr(i, e, t) {
|
|
2206
|
+
let n, r, o, { $$slots: u = {}, $$scope: s } = e;
|
|
2207
2207
|
const c = {
|
|
2208
2208
|
continental_marine: 4,
|
|
2209
2209
|
country: 4,
|
|
@@ -2228,245 +2228,261 @@ function xr(i, e, t) {
|
|
|
2228
2228
|
"poi.restaurant": 18,
|
|
2229
2229
|
"poi.aerodrome": 13
|
|
2230
2230
|
};
|
|
2231
|
-
let { class: l = void 0 } = e, { apiKey: f } = e, { bbox: a = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur:
|
|
2232
|
-
} } = e, { adjustUrl:
|
|
2231
|
+
let { class: l = void 0 } = e, { apiKey: f } = e, { bbox: a = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: g = !1 } = e, { clearListOnPick: v = !1 } = e, { keepListOpen: E = !1 } = e, { collapsed: m = !1 } = e, { country: p = void 0 } = e, { debounceSearch: b = 200 } = e, { enableReverse: _ = "never" } = e, { errorMessage: L = "Something went wrong…" } = e, { filter: N = () => !0 } = e, { flyTo: x = !0 } = e, { fuzzyMatch: M = !0 } = e, { language: S = void 0 } = e, { limit: P = void 0 } = e, { mapController: w = void 0 } = e, { minLength: k = 2 } = e, { noResultsMessage: C = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: $ = "Search" } = e, { proximity: T = [{ type: "server-geolocation" }] } = e, { reverseActive: z = _ === "always" } = e, { reverseButtonTitle: oe = "toggle reverse geocoding" } = e, { searchValue: F = "" } = e, { pickedResultStyle: $e = "full-geometry" } = e, { showPlaceType: Vt = "if-needed" } = e, { showResultsWhileTyping: et = !0 } = e, { autocompleteTimeout: vt = void 0 } = e, { selectFirst: Pe = !0 } = e, { flyToSelected: tt = !1 } = e, { markerOnSelected: it = !0 } = e, { types: Ie = void 0 } = e, { exhaustiveReverseGeocoding: bt = !1 } = e, { excludeTypes: nt = !1 } = e, { zoom: rt = c } = e, { apiUrl: _t = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: Et = {} } = e, { iconsBaseUrl: Yt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.0-with-autocomplete-timeout/icons/" } = e, { adjustUrlQuery: wt = () => {
|
|
2232
|
+
} } = e, { adjustUrl: Lt = () => {
|
|
2233
2233
|
} } = e;
|
|
2234
|
-
function
|
|
2235
|
-
|
|
2234
|
+
function Xi(h) {
|
|
2235
|
+
se.focus(h);
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
|
|
2237
|
+
function Ji() {
|
|
2238
|
+
se.blur();
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2241
|
-
t(1,
|
|
2242
|
-
|
|
2240
|
+
function Kt(h, G = !0, q = !1) {
|
|
2241
|
+
t(1, F = h), G ? (t(15, A = -1), Jt()) : ($t(void 0, !q, q), setTimeout(() => {
|
|
2242
|
+
se.focus(), se.select();
|
|
2243
2243
|
}));
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2246
|
-
t(13, I = void 0), t(14,
|
|
2245
|
+
function $i() {
|
|
2246
|
+
t(13, I = void 0), t(14, R = void 0), t(15, A = -1);
|
|
2247
|
+
}
|
|
2248
|
+
function en() {
|
|
2249
|
+
t(62, Z = []), t(14, R = void 0);
|
|
2247
2250
|
}
|
|
2248
|
-
|
|
2249
|
-
|
|
2251
|
+
let I, Z, R, Xt = "", se, A = -1, fe, ot = [], Oe, be, ne, Ae, St, ge = !1;
|
|
2252
|
+
const tn = /* @__PURE__ */ new Set(), _e = ji();
|
|
2253
|
+
function nn() {
|
|
2254
|
+
return !!ne;
|
|
2250
2255
|
}
|
|
2251
|
-
|
|
2252
|
-
const Ji = /* @__PURE__ */ new Set(), ve = Ui();
|
|
2253
|
-
Nn(() => {
|
|
2256
|
+
In(() => {
|
|
2254
2257
|
w && (w.setEventHandler(void 0), w.indicateReverse(!1), w.setSelectedMarker(-1), w.setFeatures(void 0, void 0, !1));
|
|
2255
2258
|
});
|
|
2256
|
-
function
|
|
2257
|
-
if (t(17,
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2259
|
+
function Jt(h) {
|
|
2260
|
+
if (t(17, ge = !1), be && (window.clearTimeout(be), be = void 0), ne) {
|
|
2261
|
+
window.clearTimeout(ne), t(63, ne = void 0), Fe(F, { appendSpace: !0 });
|
|
2262
|
+
return;
|
|
2263
|
+
}
|
|
2264
|
+
if (A > -1 && I)
|
|
2265
|
+
t(14, R = I[A]), t(1, F = R.place_type[0] === "reverse" ? R.place_name : R.place_name.replace(/,.*/, "")), t(19, fe = void 0), t(62, Z = void 0), t(15, A = -1);
|
|
2266
|
+
else if (F) {
|
|
2267
|
+
const G = h || !xt(F);
|
|
2268
|
+
Fe(F, { exact: !0 }).then(() => {
|
|
2269
|
+
t(62, Z = I), t(14, R = void 0), G && rn();
|
|
2270
|
+
}).catch((q) => t(19, fe = q));
|
|
2264
2271
|
}
|
|
2265
2272
|
}
|
|
2266
|
-
function
|
|
2273
|
+
function xt(h) {
|
|
2267
2274
|
try {
|
|
2268
|
-
return
|
|
2275
|
+
return Lr(h, 6);
|
|
2269
2276
|
} catch {
|
|
2270
2277
|
return !1;
|
|
2271
2278
|
}
|
|
2272
2279
|
}
|
|
2273
|
-
async function
|
|
2274
|
-
var
|
|
2275
|
-
t(19,
|
|
2276
|
-
const
|
|
2277
|
-
t(20,
|
|
2280
|
+
async function Fe(h, { byId: G = !1, exact: q = !1, appendSpace: le = !1 } = {}) {
|
|
2281
|
+
var de, Ee;
|
|
2282
|
+
t(19, fe = void 0), Oe == null || Oe.abort();
|
|
2283
|
+
const K = new AbortController();
|
|
2284
|
+
t(20, Oe = K);
|
|
2278
2285
|
try {
|
|
2279
|
-
const
|
|
2280
|
-
if (S !== void 0 &&
|
|
2281
|
-
const
|
|
2282
|
-
|
|
2286
|
+
const B = xt(h), Ct = new URL(_t + "/" + encodeURIComponent(B ? B.decimalLongitude + "," + B.decimalLatitude : h + (le ? " " : "")) + ".json"), ue = Ct.searchParams;
|
|
2287
|
+
if (S !== void 0 && ue.set("language", Array.isArray(S) ? S.join(",") : S ?? ""), Ie && ue.set("types", Ie.join(",")), nt && ue.set("excludeTypes", String(nt)), a && ue.set("bbox", a.map((lt) => lt.toFixed(6)).join(",")), p && ue.set("country", Array.isArray(p) ? p.join(",") : p), !G && !B) {
|
|
2288
|
+
const lt = await dr(w, T, K);
|
|
2289
|
+
lt && ue.set("proximity", lt), (q || !et) && ue.set("autocomplete", "false"), ue.set("fuzzyMatch", String(M));
|
|
2283
2290
|
}
|
|
2284
|
-
P !== void 0 && (
|
|
2285
|
-
const
|
|
2286
|
-
if (
|
|
2287
|
-
|
|
2291
|
+
P !== void 0 && (bt || !B || (Ie == null ? void 0 : Ie.length) === 1) && ue.set("limit", String(P)), ue.set("key", f), wt(ue), Lt(Ct);
|
|
2292
|
+
const st = Ct.toString();
|
|
2293
|
+
if (st === Xt) {
|
|
2294
|
+
G ? (v && t(13, I = void 0), t(14, R = ot[0])) : (t(13, I = ot), ((de = I[A]) == null ? void 0 : de.id) !== (r == null ? void 0 : r.id) && t(15, A = -1));
|
|
2288
2295
|
return;
|
|
2289
2296
|
}
|
|
2290
|
-
|
|
2291
|
-
const
|
|
2292
|
-
if (!
|
|
2293
|
-
throw new Error(await
|
|
2294
|
-
const
|
|
2295
|
-
|
|
2297
|
+
Xt = st;
|
|
2298
|
+
const Nt = await fetch(st, { signal: K.signal, ...Et });
|
|
2299
|
+
if (!Nt.ok)
|
|
2300
|
+
throw new Error(await Nt.text());
|
|
2301
|
+
const Tt = await Nt.json();
|
|
2302
|
+
_e("response", { url: st, featureCollection: Tt }), G ? (v && t(13, I = void 0), t(14, R = Tt.features[0]), ot = [R]) : (t(13, I = Tt.features.filter(N)), B && I.unshift({
|
|
2296
2303
|
type: "Feature",
|
|
2297
2304
|
properties: {},
|
|
2298
|
-
id: "reverse_" +
|
|
2299
|
-
text:
|
|
2300
|
-
place_name:
|
|
2305
|
+
id: "reverse_" + B.decimalLongitude + "_" + B.decimalLatitude,
|
|
2306
|
+
text: B.decimalLatitude + ", " + B.decimalLongitude,
|
|
2307
|
+
place_name: B.decimalLatitude + ", " + B.decimalLongitude,
|
|
2301
2308
|
place_type: ["reverse"],
|
|
2302
|
-
center: [
|
|
2309
|
+
center: [B.decimalLongitude, B.decimalLatitude],
|
|
2303
2310
|
bbox: [
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2311
|
+
B.decimalLongitude,
|
|
2312
|
+
B.decimalLatitude,
|
|
2313
|
+
B.decimalLongitude,
|
|
2314
|
+
B.decimalLatitude
|
|
2308
2315
|
],
|
|
2309
2316
|
geometry: {
|
|
2310
2317
|
type: "Point",
|
|
2311
|
-
coordinates: [
|
|
2318
|
+
coordinates: [B.decimalLongitude, B.decimalLatitude]
|
|
2312
2319
|
}
|
|
2313
|
-
}),
|
|
2314
|
-
} catch (
|
|
2315
|
-
if (
|
|
2320
|
+
}), ot = I, ((Ee = I[A]) == null ? void 0 : Ee.id) !== (r == null ? void 0 : r.id) && t(15, A = -1), B && se.focus());
|
|
2321
|
+
} catch (B) {
|
|
2322
|
+
if (B && typeof B == "object" && "name" in B && B.name === "AbortError")
|
|
2316
2323
|
return;
|
|
2317
|
-
throw
|
|
2324
|
+
throw B;
|
|
2318
2325
|
} finally {
|
|
2319
|
-
|
|
2326
|
+
K === Oe && t(20, Oe = void 0);
|
|
2320
2327
|
}
|
|
2321
2328
|
}
|
|
2322
|
-
function
|
|
2323
|
-
var
|
|
2329
|
+
function rn() {
|
|
2330
|
+
var le;
|
|
2324
2331
|
if (!(Z != null && Z.length) || !x)
|
|
2325
2332
|
return;
|
|
2326
|
-
const
|
|
2333
|
+
const h = [180, 90, -180, -90], G = !Z.some((K) => !K.matching_text);
|
|
2327
2334
|
let q;
|
|
2328
|
-
for (const
|
|
2329
|
-
const
|
|
2330
|
-
if (q = q === void 0 ?
|
|
2331
|
-
for (const
|
|
2332
|
-
|
|
2335
|
+
for (const K of Z) {
|
|
2336
|
+
const de = je(K);
|
|
2337
|
+
if (q = q === void 0 ? de : de === void 0 ? q : Math.max(q, de), G || !K.matching_text)
|
|
2338
|
+
for (const Ee of [0, 1, 2, 3])
|
|
2339
|
+
h[Ee] = Math[Ee < 2 ? "min" : "max"](h[Ee], ((le = K.bbox) == null ? void 0 : le[Ee]) ?? K.center[Ee % 2]);
|
|
2333
2340
|
}
|
|
2334
|
-
w && Z.length > 0 && (
|
|
2341
|
+
w && Z.length > 0 && (R && h[0] === h[2] && h[1] === h[3] ? w.flyTo(R.center, je(R)) : w.fitBounds(mt(h), 50, q));
|
|
2335
2342
|
}
|
|
2336
|
-
function
|
|
2337
|
-
!
|
|
2343
|
+
function Mt() {
|
|
2344
|
+
!R || !w || (!R.bbox || R.bbox[0] === R.bbox[2] && R.bbox[1] === R.bbox[3] ? w.flyTo(R.center, je(R)) : w.fitBounds(mt(R.bbox), 50, je(R)));
|
|
2338
2345
|
}
|
|
2339
|
-
function
|
|
2346
|
+
function je(h) {
|
|
2340
2347
|
var q;
|
|
2341
|
-
if (!
|
|
2348
|
+
if (!h.bbox || h.bbox[0] !== h.bbox[2] && h.bbox[1] !== h.bbox[3])
|
|
2342
2349
|
return;
|
|
2343
|
-
const
|
|
2344
|
-
return (Array.isArray((q =
|
|
2345
|
-
(
|
|
2346
|
-
const
|
|
2347
|
-
return
|
|
2350
|
+
const G = h.id.replace(/\..*/, "");
|
|
2351
|
+
return (Array.isArray((q = h.properties) == null ? void 0 : q.categories) ? h.properties.categories.reduce(
|
|
2352
|
+
(le, K) => {
|
|
2353
|
+
const de = rt[G + "." + K];
|
|
2354
|
+
return le === void 0 ? de : de === void 0 ? le : Math.max(le, de);
|
|
2348
2355
|
},
|
|
2349
2356
|
void 0
|
|
2350
|
-
) : void 0) ??
|
|
2357
|
+
) : void 0) ?? rt[G];
|
|
2351
2358
|
}
|
|
2352
|
-
function
|
|
2353
|
-
t(0,
|
|
2359
|
+
function on(h) {
|
|
2360
|
+
t(0, z = _ === "always"), t(13, I = void 0), t(14, R = void 0), t(15, A = -1), Kt(h[1].toFixed(6) + ", " + fr(h[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2354
2361
|
}
|
|
2355
|
-
function
|
|
2362
|
+
function sn(h) {
|
|
2356
2363
|
if (!I)
|
|
2357
2364
|
return;
|
|
2358
|
-
let
|
|
2359
|
-
|
|
2365
|
+
let G = h.key === "ArrowDown" ? 1 : h.key === "ArrowUp" ? -1 : 0;
|
|
2366
|
+
G && (se.focus(), t(17, ge = !0), h.preventDefault(), R && A === -1 && t(15, A = I.findIndex((q) => q.id === (R == null ? void 0 : R.id))), A === (R || Pe ? 0 : -1) && G === -1 && t(15, A = I.length), t(15, A += G), A >= I.length && t(15, A = -1), A < 0 && (R || Pe) && t(15, A = 0));
|
|
2360
2367
|
}
|
|
2361
|
-
function
|
|
2362
|
-
if (t(19,
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2368
|
+
function $t(h, G = !0, q = !1) {
|
|
2369
|
+
if (t(19, fe = void 0), t(14, R = void 0), t(17, ge = !0), be && (window.clearTimeout(be), be = void 0), ne && (window.clearTimeout(ne), t(63, ne = void 0)), !et && !q || F.length < k) {
|
|
2370
|
+
t(13, I = void 0);
|
|
2371
|
+
return;
|
|
2372
|
+
}
|
|
2373
|
+
const le = F;
|
|
2374
|
+
be = window.setTimeout(
|
|
2375
|
+
() => {
|
|
2376
|
+
be = void 0, Fe(le).catch((K) => t(19, fe = K));
|
|
2377
|
+
},
|
|
2378
|
+
G ? b : 0
|
|
2379
|
+
), F.endsWith(" ") || t(63, ne = window.setTimeout(
|
|
2380
|
+
() => {
|
|
2381
|
+
t(63, ne = void 0), Fe(le, { appendSpace: !0 }).catch((K) => t(19, fe = K));
|
|
2382
|
+
},
|
|
2383
|
+
vt
|
|
2384
|
+
));
|
|
2374
2385
|
}
|
|
2375
|
-
function
|
|
2376
|
-
|
|
2386
|
+
function kt(h) {
|
|
2387
|
+
R && (R == null ? void 0 : R.id) === (h == null ? void 0 : h.id) ? Mt() : (t(14, R = h), t(1, F = h.place_name));
|
|
2377
2388
|
}
|
|
2378
|
-
function
|
|
2379
|
-
t(15,
|
|
2389
|
+
function ei(h) {
|
|
2390
|
+
t(15, A = h);
|
|
2380
2391
|
}
|
|
2381
|
-
function
|
|
2382
|
-
(!Pe ||
|
|
2392
|
+
function ln() {
|
|
2393
|
+
(!Pe || R) && t(15, A = -1), tt && Mt();
|
|
2383
2394
|
}
|
|
2384
|
-
const
|
|
2385
|
-
function
|
|
2386
|
-
|
|
2387
|
-
|
|
2395
|
+
const un = () => se.focus();
|
|
2396
|
+
function an(h) {
|
|
2397
|
+
At[h ? "unshift" : "push"](() => {
|
|
2398
|
+
se = h, t(18, se);
|
|
2388
2399
|
});
|
|
2389
2400
|
}
|
|
2390
|
-
function
|
|
2391
|
-
|
|
2401
|
+
function cn() {
|
|
2402
|
+
F = this.value, t(1, F), t(17, ge), t(31, g), t(16, Ae);
|
|
2392
2403
|
}
|
|
2393
|
-
const
|
|
2394
|
-
t(1,
|
|
2395
|
-
},
|
|
2404
|
+
const fn = () => t(17, ge = !0), dn = () => t(17, ge = !1), hn = () => t(17, ge = !0), gn = () => t(14, R = void 0), mn = () => {
|
|
2405
|
+
t(1, F = ""), se.focus();
|
|
2406
|
+
}, pn = () => t(0, z = !z), yn = () => t(19, fe = void 0), vn = (h) => ei(h), bn = (h) => kt(h), _n = () => {
|
|
2396
2407
|
};
|
|
2397
|
-
return i.$$set = (
|
|
2398
|
-
"class" in
|
|
2408
|
+
return i.$$set = (h) => {
|
|
2409
|
+
"class" in h && t(2, l = 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, g = h.clearOnBlur), "clearListOnPick" in h && t(32, v = h.clearListOnPick), "keepListOpen" in h && t(4, E = h.keepListOpen), "collapsed" in h && t(5, m = h.collapsed), "country" in h && t(33, p = h.country), "debounceSearch" in h && t(34, b = h.debounceSearch), "enableReverse" in h && t(6, _ = h.enableReverse), "errorMessage" in h && t(7, L = h.errorMessage), "filter" in h && t(35, N = h.filter), "flyTo" in h && t(36, x = h.flyTo), "fuzzyMatch" in h && t(37, M = h.fuzzyMatch), "language" in h && t(38, S = h.language), "limit" in h && t(39, P = h.limit), "mapController" in h && t(40, w = h.mapController), "minLength" in h && t(41, k = h.minLength), "noResultsMessage" in h && t(8, C = h.noResultsMessage), "placeholder" in h && t(9, $ = h.placeholder), "proximity" in h && t(42, T = h.proximity), "reverseActive" in h && t(0, z = h.reverseActive), "reverseButtonTitle" in h && t(10, oe = h.reverseButtonTitle), "searchValue" in h && t(1, F = h.searchValue), "pickedResultStyle" in h && t(43, $e = h.pickedResultStyle), "showPlaceType" in h && t(11, Vt = h.showPlaceType), "showResultsWhileTyping" in h && t(44, et = h.showResultsWhileTyping), "autocompleteTimeout" in h && t(45, vt = h.autocompleteTimeout), "selectFirst" in h && t(46, Pe = h.selectFirst), "flyToSelected" in h && t(47, tt = h.flyToSelected), "markerOnSelected" in h && t(48, it = h.markerOnSelected), "types" in h && t(49, Ie = h.types), "exhaustiveReverseGeocoding" in h && t(50, bt = h.exhaustiveReverseGeocoding), "excludeTypes" in h && t(51, nt = h.excludeTypes), "zoom" in h && t(52, rt = h.zoom), "apiUrl" in h && t(53, _t = h.apiUrl), "fetchParameters" in h && t(54, Et = h.fetchParameters), "iconsBaseUrl" in h && t(12, Yt = h.iconsBaseUrl), "adjustUrlQuery" in h && t(55, wt = h.adjustUrlQuery), "adjustUrl" in h && t(56, Lt = h.adjustUrl), "$$scope" in h && t(68, s = h.$$scope);
|
|
2399
2410
|
}, i.$$.update = () => {
|
|
2400
2411
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2401
|
-
64 && t(0,
|
|
2412
|
+
64 && t(0, z = _ === "always"), i.$$.dirty[0] & /*picked*/
|
|
2402
2413
|
16384 | i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2403
|
-
4096 &&
|
|
2414
|
+
4096 && $e !== "marker-only" && R && !R.address && R.geometry.type === "Point" && R.place_type[0] !== "reverse" && Fe(R.id, { byId: !0 }).catch((h) => t(19, fe = h)), i.$$.dirty[0] & /*picked*/
|
|
2404
2415
|
16384 | i.$$.dirty[1] & /*mapController, flyTo, clearListOnPick*/
|
|
2405
2416
|
546 | i.$$.dirty[2] & /*prevIdToFly*/
|
|
2406
|
-
|
|
2417
|
+
4 && (w && R && R.id !== St && x && (Mt(), v && t(13, I = void 0), t(62, Z = void 0), t(15, A = -1)), t(64, St = R == null ? void 0 : R.id)), i.$$.dirty[0] & /*focused, focusedDelayed*/
|
|
2407
2418
|
196608 | i.$$.dirty[1] & /*clearOnBlur*/
|
|
2408
2419
|
1 && setTimeout(() => {
|
|
2409
|
-
t(16,
|
|
2420
|
+
t(16, Ae = ge), g && !Ae && t(1, F = "");
|
|
2410
2421
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2411
2422
|
8194 | i.$$.dirty[1] & /*minLength*/
|
|
2412
|
-
1024 &&
|
|
2423
|
+
1024 && F.length < k && (t(13, I = void 0), t(19, fe = void 0), t(62, Z = I)), i.$$.dirty[0] & /*listFeatures*/
|
|
2424
|
+
8192 | i.$$.dirty[1] & /*selectFirst*/
|
|
2425
|
+
32768 && Pe && I != null && I.length && (nn() || t(15, A = 0)), i.$$.dirty[0] & /*listFeatures, selectedItemIndex, picked*/
|
|
2413
2426
|
57344 | i.$$.dirty[1] & /*selectFirst*/
|
|
2414
|
-
|
|
2415
|
-
8192 | i.$$.dirty[
|
|
2416
|
-
|
|
2417
|
-
73729 | i.$$.dirty[1] & /*mapController
|
|
2418
|
-
|
|
2419
|
-
|
|
2427
|
+
32768 && Pe && I != null && I.length && A == -1 && !R && t(15, A = 0), i.$$.dirty[0] & /*listFeatures*/
|
|
2428
|
+
8192 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2429
|
+
1 && Z !== I && t(62, Z = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2430
|
+
73729 | i.$$.dirty[1] & /*mapController*/
|
|
2431
|
+
512 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2432
|
+
1 && w && w.setEventHandler((h) => {
|
|
2433
|
+
switch (h.type) {
|
|
2420
2434
|
case "mapClick":
|
|
2421
|
-
|
|
2435
|
+
z && on(h.coordinates);
|
|
2422
2436
|
break;
|
|
2423
2437
|
case "markerClick":
|
|
2424
2438
|
{
|
|
2425
|
-
const
|
|
2426
|
-
|
|
2439
|
+
const G = I == null ? void 0 : I.find((q) => q.id === h.id);
|
|
2440
|
+
G && kt(G);
|
|
2427
2441
|
}
|
|
2428
2442
|
break;
|
|
2429
2443
|
case "markerMouseEnter":
|
|
2430
|
-
Z && t(15,
|
|
2444
|
+
Z && t(15, A = Ae ? (I == null ? void 0 : I.findIndex((G) => G.id === h.id)) ?? -1 : -1);
|
|
2431
2445
|
break;
|
|
2432
2446
|
case "markerMouseLeave":
|
|
2433
|
-
Z && t(15,
|
|
2447
|
+
Z && t(15, A = -1);
|
|
2434
2448
|
break;
|
|
2435
2449
|
}
|
|
2436
2450
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2437
|
-
40960 && t(
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
4096 && t(
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
16384 | i.$$.dirty[1] & /*mapController, markerOnSelected
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
16384 | i.$$.dirty[1] & /*mapController
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
32768 | i.$$.dirty[1] & /*
|
|
2450
|
-
|
|
2451
|
+
40960 && t(65, r = I == null ? void 0 : I[A]), i.$$.dirty[1] & /*mapController, flyTo, flyToSelected*/
|
|
2452
|
+
66080 | i.$$.dirty[2] & /*selected*/
|
|
2453
|
+
8 && w && r && x && tt && w.flyTo(r.center, je(r)), i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2454
|
+
4096 && t(67, n = $e === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2455
|
+
131584 | i.$$.dirty[2] & /*showPolygonMarker*/
|
|
2456
|
+
32 && (it || w == null || w.setFeatures(void 0, void 0, n)), i.$$.dirty[0] & /*picked*/
|
|
2457
|
+
16384 | i.$$.dirty[1] & /*mapController, markerOnSelected*/
|
|
2458
|
+
131584 | i.$$.dirty[2] & /*markedFeatures, selected, showPolygonMarker*/
|
|
2459
|
+
41 && w && it && !Z && (w.setFeatures(r ? [r] : void 0, R, n), w.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[0] & /*picked*/
|
|
2460
|
+
16384 | i.$$.dirty[1] & /*mapController*/
|
|
2461
|
+
512 | i.$$.dirty[2] & /*markedFeatures, showPolygonMarker*/
|
|
2462
|
+
33 && w && w.setFeatures(Z, R, n), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
2463
|
+
32768 | i.$$.dirty[1] & /*mapController*/
|
|
2464
|
+
512 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2465
|
+
1 && Z && w && w.setSelectedMarker(A), i.$$.dirty[2] & /*selected, autocompleteTimeoutRef*/
|
|
2466
|
+
10 && r && (window.clearTimeout(ne), t(63, ne = void 0)), i.$$.dirty[0] & /*searchValue*/
|
|
2451
2467
|
2 | i.$$.dirty[1] & /*mapController*/
|
|
2452
2468
|
512 && w) {
|
|
2453
|
-
const
|
|
2454
|
-
w.setReverseMarker(
|
|
2469
|
+
const h = xt(F);
|
|
2470
|
+
w.setReverseMarker(h ? [h.decimalLongitude, h.decimalLatitude] : void 0);
|
|
2455
2471
|
}
|
|
2456
2472
|
i.$$.dirty[2] & /*selected*/
|
|
2457
|
-
|
|
2458
|
-
16384 &&
|
|
2459
|
-
73744 && t(
|
|
2460
|
-
|
|
2461
|
-
8192 &&
|
|
2462
|
-
|
|
2463
|
-
1 &&
|
|
2464
|
-
2 &&
|
|
2473
|
+
8 && _e("select", { feature: r }), i.$$.dirty[0] & /*picked*/
|
|
2474
|
+
16384 && _e("pick", { feature: R }), i.$$.dirty[0] & /*listFeatures, focusedDelayed, keepListOpen*/
|
|
2475
|
+
73744 && t(66, o = !!(I != null && I.length) && (Ae || E)), i.$$.dirty[2] & /*optionsVisible*/
|
|
2476
|
+
16 && _e("optionsvisibilitychange", { optionsVisible: o }), i.$$.dirty[0] & /*listFeatures*/
|
|
2477
|
+
8192 && _e("featureslisted", { features: I }), i.$$.dirty[2] & /*markedFeatures*/
|
|
2478
|
+
1 && _e("featuresmarked", { features: Z }), i.$$.dirty[0] & /*reverseActive*/
|
|
2479
|
+
1 && _e("reversetoggle", { reverse: z }), i.$$.dirty[0] & /*searchValue*/
|
|
2480
|
+
2 && _e("querychange", { query: F }), i.$$.dirty[0] & /*reverseActive*/
|
|
2465
2481
|
1 | i.$$.dirty[1] & /*mapController*/
|
|
2466
|
-
512 && w && w.indicateReverse(
|
|
2482
|
+
512 && w && w.indicateReverse(z);
|
|
2467
2483
|
}, [
|
|
2468
|
-
|
|
2469
|
-
|
|
2484
|
+
z,
|
|
2485
|
+
F,
|
|
2470
2486
|
l,
|
|
2471
2487
|
d,
|
|
2472
2488
|
E,
|
|
@@ -2474,29 +2490,29 @@ function xr(i, e, t) {
|
|
|
2474
2490
|
_,
|
|
2475
2491
|
L,
|
|
2476
2492
|
C,
|
|
2477
|
-
|
|
2478
|
-
se,
|
|
2479
|
-
Qt,
|
|
2480
|
-
Zt,
|
|
2481
|
-
I,
|
|
2482
|
-
T,
|
|
2483
|
-
W,
|
|
2484
|
-
Oe,
|
|
2485
|
-
he,
|
|
2493
|
+
$,
|
|
2486
2494
|
oe,
|
|
2487
|
-
|
|
2488
|
-
Re,
|
|
2489
|
-
Ji,
|
|
2495
|
+
Vt,
|
|
2490
2496
|
Yt,
|
|
2497
|
+
I,
|
|
2498
|
+
R,
|
|
2499
|
+
A,
|
|
2500
|
+
Ae,
|
|
2501
|
+
ge,
|
|
2502
|
+
se,
|
|
2503
|
+
fe,
|
|
2504
|
+
Oe,
|
|
2491
2505
|
tn,
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2506
|
+
Jt,
|
|
2507
|
+
sn,
|
|
2508
|
+
$t,
|
|
2509
|
+
kt,
|
|
2510
|
+
ei,
|
|
2511
|
+
ln,
|
|
2496
2512
|
c,
|
|
2497
2513
|
f,
|
|
2498
2514
|
a,
|
|
2499
|
-
|
|
2515
|
+
g,
|
|
2500
2516
|
v,
|
|
2501
2517
|
p,
|
|
2502
2518
|
b,
|
|
@@ -2507,36 +2523,34 @@ function xr(i, e, t) {
|
|
|
2507
2523
|
P,
|
|
2508
2524
|
w,
|
|
2509
2525
|
k,
|
|
2510
|
-
|
|
2511
|
-
Ke,
|
|
2512
|
-
Xe,
|
|
2513
|
-
Pe,
|
|
2514
|
-
Je,
|
|
2526
|
+
T,
|
|
2515
2527
|
$e,
|
|
2516
|
-
Ne,
|
|
2517
|
-
mt,
|
|
2518
2528
|
et,
|
|
2519
|
-
tt,
|
|
2520
|
-
pt,
|
|
2521
|
-
yt,
|
|
2522
2529
|
vt,
|
|
2530
|
+
Pe,
|
|
2531
|
+
tt,
|
|
2532
|
+
it,
|
|
2533
|
+
Ie,
|
|
2523
2534
|
bt,
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2535
|
+
nt,
|
|
2536
|
+
rt,
|
|
2537
|
+
_t,
|
|
2538
|
+
Et,
|
|
2539
|
+
wt,
|
|
2540
|
+
Lt,
|
|
2528
2541
|
Xi,
|
|
2542
|
+
Ji,
|
|
2543
|
+
Kt,
|
|
2544
|
+
$i,
|
|
2545
|
+
en,
|
|
2529
2546
|
Z,
|
|
2530
|
-
|
|
2547
|
+
ne,
|
|
2548
|
+
St,
|
|
2531
2549
|
r,
|
|
2532
|
-
s,
|
|
2533
|
-
n,
|
|
2534
2550
|
o,
|
|
2551
|
+
n,
|
|
2552
|
+
s,
|
|
2535
2553
|
u,
|
|
2536
|
-
rn,
|
|
2537
|
-
sn,
|
|
2538
|
-
on,
|
|
2539
|
-
ln,
|
|
2540
2554
|
un,
|
|
2541
2555
|
an,
|
|
2542
2556
|
cn,
|
|
@@ -2545,17 +2559,21 @@ function xr(i, e, t) {
|
|
|
2545
2559
|
hn,
|
|
2546
2560
|
gn,
|
|
2547
2561
|
mn,
|
|
2548
|
-
pn
|
|
2562
|
+
pn,
|
|
2563
|
+
yn,
|
|
2564
|
+
vn,
|
|
2565
|
+
bn,
|
|
2566
|
+
_n
|
|
2549
2567
|
];
|
|
2550
2568
|
}
|
|
2551
|
-
let
|
|
2569
|
+
let Tr = class extends Te {
|
|
2552
2570
|
constructor(e) {
|
|
2553
|
-
super(),
|
|
2571
|
+
super(), Ne(
|
|
2554
2572
|
this,
|
|
2555
2573
|
e,
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2574
|
+
Nr,
|
|
2575
|
+
Cr,
|
|
2576
|
+
Ce,
|
|
2559
2577
|
{
|
|
2560
2578
|
ZOOM_DEFAULTS: 28,
|
|
2561
2579
|
class: 2,
|
|
@@ -2586,23 +2604,24 @@ let Mr = class extends ke {
|
|
|
2586
2604
|
pickedResultStyle: 43,
|
|
2587
2605
|
showPlaceType: 11,
|
|
2588
2606
|
showResultsWhileTyping: 44,
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2607
|
+
autocompleteTimeout: 45,
|
|
2608
|
+
selectFirst: 46,
|
|
2609
|
+
flyToSelected: 47,
|
|
2610
|
+
markerOnSelected: 48,
|
|
2611
|
+
types: 49,
|
|
2612
|
+
exhaustiveReverseGeocoding: 50,
|
|
2613
|
+
excludeTypes: 51,
|
|
2614
|
+
zoom: 52,
|
|
2615
|
+
apiUrl: 53,
|
|
2616
|
+
fetchParameters: 54,
|
|
2598
2617
|
iconsBaseUrl: 12,
|
|
2599
|
-
adjustUrlQuery:
|
|
2600
|
-
adjustUrl:
|
|
2601
|
-
focus:
|
|
2602
|
-
blur:
|
|
2603
|
-
setQuery:
|
|
2604
|
-
clearList:
|
|
2605
|
-
clearMap:
|
|
2618
|
+
adjustUrlQuery: 55,
|
|
2619
|
+
adjustUrl: 56,
|
|
2620
|
+
focus: 57,
|
|
2621
|
+
blur: 58,
|
|
2622
|
+
setQuery: 59,
|
|
2623
|
+
clearList: 60,
|
|
2624
|
+
clearMap: 61
|
|
2606
2625
|
},
|
|
2607
2626
|
null,
|
|
2608
2627
|
[-1, -1, -1, -1]
|
|
@@ -2612,26 +2631,26 @@ let Mr = class extends ke {
|
|
|
2612
2631
|
return this.$$.ctx[28];
|
|
2613
2632
|
}
|
|
2614
2633
|
get focus() {
|
|
2615
|
-
return this.$$.ctx[
|
|
2634
|
+
return this.$$.ctx[57];
|
|
2616
2635
|
}
|
|
2617
2636
|
get blur() {
|
|
2618
|
-
return this.$$.ctx[
|
|
2637
|
+
return this.$$.ctx[58];
|
|
2619
2638
|
}
|
|
2620
2639
|
get setQuery() {
|
|
2621
|
-
return this.$$.ctx[
|
|
2640
|
+
return this.$$.ctx[59];
|
|
2622
2641
|
}
|
|
2623
2642
|
get clearList() {
|
|
2624
|
-
return this.$$.ctx[
|
|
2643
|
+
return this.$$.ctx[60];
|
|
2625
2644
|
}
|
|
2626
2645
|
get clearMap() {
|
|
2627
|
-
return this.$$.ctx[
|
|
2646
|
+
return this.$$.ctx[61];
|
|
2628
2647
|
}
|
|
2629
2648
|
};
|
|
2630
|
-
function
|
|
2649
|
+
function Ye(i, e, t = {}) {
|
|
2631
2650
|
const n = { type: "Feature" };
|
|
2632
2651
|
return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
|
|
2633
2652
|
}
|
|
2634
|
-
function
|
|
2653
|
+
function Qt(i, e, t = {}) {
|
|
2635
2654
|
for (const r of i) {
|
|
2636
2655
|
if (r.length < 4)
|
|
2637
2656
|
throw new Error(
|
|
@@ -2639,21 +2658,21 @@ function jt(i, e, t = {}) {
|
|
|
2639
2658
|
);
|
|
2640
2659
|
if (r[r.length - 1].length !== r[0].length)
|
|
2641
2660
|
throw new Error("First and last Position are not equivalent.");
|
|
2642
|
-
for (let
|
|
2643
|
-
if (r[r.length - 1][
|
|
2661
|
+
for (let o = 0; o < r[r.length - 1].length; o++)
|
|
2662
|
+
if (r[r.length - 1][o] !== r[0][o])
|
|
2644
2663
|
throw new Error("First and last Position are not equivalent.");
|
|
2645
2664
|
}
|
|
2646
|
-
return
|
|
2665
|
+
return Ye({
|
|
2647
2666
|
type: "Polygon",
|
|
2648
2667
|
coordinates: i
|
|
2649
2668
|
}, e, t);
|
|
2650
2669
|
}
|
|
2651
|
-
function
|
|
2670
|
+
function Ke(i, e = {}) {
|
|
2652
2671
|
const t = { type: "FeatureCollection" };
|
|
2653
2672
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
|
|
2654
2673
|
}
|
|
2655
|
-
function
|
|
2656
|
-
return
|
|
2674
|
+
function Zi(i, e, t = {}) {
|
|
2675
|
+
return Ye({
|
|
2657
2676
|
type: "MultiPolygon",
|
|
2658
2677
|
coordinates: i
|
|
2659
2678
|
}, e, t);
|
|
@@ -2680,15 +2699,15 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2680
2699
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2681
2700
|
and limitations under the License.
|
|
2682
2701
|
***************************************************************************** */
|
|
2683
|
-
function
|
|
2702
|
+
function Rr(i, e) {
|
|
2684
2703
|
var t = { label: 0, sent: function() {
|
|
2685
|
-
if (
|
|
2686
|
-
return
|
|
2687
|
-
}, trys: [], ops: [] }, n, r,
|
|
2688
|
-
return u = { next:
|
|
2704
|
+
if (o[0] & 1) throw o[1];
|
|
2705
|
+
return o[1];
|
|
2706
|
+
}, trys: [], ops: [] }, n, r, o, u;
|
|
2707
|
+
return u = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
2689
2708
|
return this;
|
|
2690
2709
|
}), u;
|
|
2691
|
-
function
|
|
2710
|
+
function s(l) {
|
|
2692
2711
|
return function(f) {
|
|
2693
2712
|
return c([l, f]);
|
|
2694
2713
|
};
|
|
@@ -2696,11 +2715,11 @@ function kr(i, e) {
|
|
|
2696
2715
|
function c(l) {
|
|
2697
2716
|
if (n) throw new TypeError("Generator is already executing.");
|
|
2698
2717
|
for (; t; ) try {
|
|
2699
|
-
if (n = 1, r && (
|
|
2700
|
-
switch (r = 0,
|
|
2718
|
+
if (n = 1, r && (o = l[0] & 2 ? r.return : l[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, l[1])).done) return o;
|
|
2719
|
+
switch (r = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
|
|
2701
2720
|
case 0:
|
|
2702
2721
|
case 1:
|
|
2703
|
-
|
|
2722
|
+
o = l;
|
|
2704
2723
|
break;
|
|
2705
2724
|
case 4:
|
|
2706
2725
|
return t.label++, { value: l[1], done: !1 };
|
|
@@ -2711,36 +2730,36 @@ function kr(i, e) {
|
|
|
2711
2730
|
l = t.ops.pop(), t.trys.pop();
|
|
2712
2731
|
continue;
|
|
2713
2732
|
default:
|
|
2714
|
-
if (
|
|
2733
|
+
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
2715
2734
|
t = 0;
|
|
2716
2735
|
continue;
|
|
2717
2736
|
}
|
|
2718
|
-
if (l[0] === 3 && (!
|
|
2737
|
+
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
2719
2738
|
t.label = l[1];
|
|
2720
2739
|
break;
|
|
2721
2740
|
}
|
|
2722
|
-
if (l[0] === 6 && t.label <
|
|
2723
|
-
t.label =
|
|
2741
|
+
if (l[0] === 6 && t.label < o[1]) {
|
|
2742
|
+
t.label = o[1], o = l;
|
|
2724
2743
|
break;
|
|
2725
2744
|
}
|
|
2726
|
-
if (
|
|
2727
|
-
t.label =
|
|
2745
|
+
if (o && t.label < o[2]) {
|
|
2746
|
+
t.label = o[2], t.ops.push(l);
|
|
2728
2747
|
break;
|
|
2729
2748
|
}
|
|
2730
|
-
|
|
2749
|
+
o[2] && t.ops.pop(), t.trys.pop();
|
|
2731
2750
|
continue;
|
|
2732
2751
|
}
|
|
2733
2752
|
l = e.call(i, t);
|
|
2734
2753
|
} catch (f) {
|
|
2735
2754
|
l = [6, f], r = 0;
|
|
2736
2755
|
} finally {
|
|
2737
|
-
n =
|
|
2756
|
+
n = o = 0;
|
|
2738
2757
|
}
|
|
2739
2758
|
if (l[0] & 5) throw l[1];
|
|
2740
2759
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
2741
2760
|
}
|
|
2742
2761
|
}
|
|
2743
|
-
var
|
|
2762
|
+
var ke = (
|
|
2744
2763
|
/** @class */
|
|
2745
2764
|
/* @__PURE__ */ function() {
|
|
2746
2765
|
function i(e, t) {
|
|
@@ -2749,91 +2768,91 @@ var Se = (
|
|
|
2749
2768
|
return i;
|
|
2750
2769
|
}()
|
|
2751
2770
|
);
|
|
2752
|
-
function
|
|
2771
|
+
function Pr(i, e) {
|
|
2753
2772
|
return i > e ? 1 : i < e ? -1 : 0;
|
|
2754
2773
|
}
|
|
2755
|
-
function
|
|
2756
|
-
for (var n = new
|
|
2774
|
+
function we(i, e, t) {
|
|
2775
|
+
for (var n = new ke(null, null), r = n, o = n; ; ) {
|
|
2757
2776
|
var u = t(i, e.key);
|
|
2758
2777
|
if (u < 0) {
|
|
2759
2778
|
if (e.left === null)
|
|
2760
2779
|
break;
|
|
2761
2780
|
if (t(i, e.left.key) < 0) {
|
|
2762
|
-
var
|
|
2763
|
-
if (e.left =
|
|
2781
|
+
var s = e.left;
|
|
2782
|
+
if (e.left = s.right, s.right = e, e = s, e.left === null)
|
|
2764
2783
|
break;
|
|
2765
2784
|
}
|
|
2766
|
-
|
|
2785
|
+
o.left = e, o = e, e = e.left;
|
|
2767
2786
|
} else if (u > 0) {
|
|
2768
2787
|
if (e.right === null)
|
|
2769
2788
|
break;
|
|
2770
2789
|
if (t(i, e.right.key) > 0) {
|
|
2771
|
-
var
|
|
2772
|
-
if (e.right =
|
|
2790
|
+
var s = e.right;
|
|
2791
|
+
if (e.right = s.left, s.left = e, e = s, e.right === null)
|
|
2773
2792
|
break;
|
|
2774
2793
|
}
|
|
2775
2794
|
r.right = e, r = e, e = e.right;
|
|
2776
2795
|
} else
|
|
2777
2796
|
break;
|
|
2778
2797
|
}
|
|
2779
|
-
return r.right = e.left,
|
|
2798
|
+
return r.right = e.left, o.left = e.right, e.left = n.right, e.right = n.left, e;
|
|
2780
2799
|
}
|
|
2781
|
-
function
|
|
2782
|
-
var r = new
|
|
2800
|
+
function Ot(i, e, t, n) {
|
|
2801
|
+
var r = new ke(i, e);
|
|
2783
2802
|
if (t === null)
|
|
2784
2803
|
return r.left = r.right = null, r;
|
|
2785
|
-
t =
|
|
2786
|
-
var
|
|
2787
|
-
return
|
|
2804
|
+
t = we(i, t, n);
|
|
2805
|
+
var o = n(i, t.key);
|
|
2806
|
+
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;
|
|
2788
2807
|
}
|
|
2789
|
-
function
|
|
2808
|
+
function _i(i, e, t) {
|
|
2790
2809
|
var n = null, r = null;
|
|
2791
2810
|
if (e) {
|
|
2792
|
-
e =
|
|
2793
|
-
var
|
|
2794
|
-
|
|
2811
|
+
e = we(i, e, t);
|
|
2812
|
+
var o = t(e.key, i);
|
|
2813
|
+
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);
|
|
2795
2814
|
}
|
|
2796
2815
|
return { left: n, right: r };
|
|
2797
2816
|
}
|
|
2798
|
-
function
|
|
2799
|
-
return e === null ? i : (i === null || (e =
|
|
2817
|
+
function Ir(i, e, t) {
|
|
2818
|
+
return e === null ? i : (i === null || (e = we(i.key, e, t), e.left = i), e);
|
|
2800
2819
|
}
|
|
2801
|
-
function
|
|
2820
|
+
function Ut(i, e, t, n, r) {
|
|
2802
2821
|
if (i) {
|
|
2803
2822
|
n("" + e + (t ? "└── " : "├── ") + r(i) + `
|
|
2804
2823
|
`);
|
|
2805
|
-
var
|
|
2806
|
-
i.left &&
|
|
2824
|
+
var o = e + (t ? " " : "│ ");
|
|
2825
|
+
i.left && Ut(i.left, o, !1, n, r), i.right && Ut(i.right, o, !0, n, r);
|
|
2807
2826
|
}
|
|
2808
2827
|
}
|
|
2809
|
-
var
|
|
2828
|
+
var Zt = (
|
|
2810
2829
|
/** @class */
|
|
2811
2830
|
function() {
|
|
2812
2831
|
function i(e) {
|
|
2813
|
-
e === void 0 && (e =
|
|
2832
|
+
e === void 0 && (e = Pr), this._root = null, this._size = 0, this._comparator = e;
|
|
2814
2833
|
}
|
|
2815
2834
|
return i.prototype.insert = function(e, t) {
|
|
2816
|
-
return this._size++, this._root =
|
|
2835
|
+
return this._size++, this._root = Ot(e, t, this._root, this._comparator);
|
|
2817
2836
|
}, i.prototype.add = function(e, t) {
|
|
2818
|
-
var n = new
|
|
2837
|
+
var n = new ke(e, t);
|
|
2819
2838
|
this._root === null && (n.left = n.right = null, this._size++, this._root = n);
|
|
2820
|
-
var r = this._comparator,
|
|
2821
|
-
return u === 0 ? this._root =
|
|
2839
|
+
var r = this._comparator, o = we(e, this._root, r), u = r(e, o.key);
|
|
2840
|
+
return u === 0 ? this._root = o : (u < 0 ? (n.left = o.left, n.right = o, o.left = null) : u > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
|
|
2822
2841
|
}, i.prototype.remove = function(e) {
|
|
2823
2842
|
this._root = this._remove(e, this._root, this._comparator);
|
|
2824
2843
|
}, i.prototype._remove = function(e, t, n) {
|
|
2825
2844
|
var r;
|
|
2826
2845
|
if (t === null)
|
|
2827
2846
|
return null;
|
|
2828
|
-
t =
|
|
2829
|
-
var
|
|
2830
|
-
return
|
|
2847
|
+
t = we(e, t, n);
|
|
2848
|
+
var o = n(e, t.key);
|
|
2849
|
+
return o === 0 ? (t.left === null ? r = t.right : (r = we(e, t.left, n), r.right = t.right), this._size--, r) : t;
|
|
2831
2850
|
}, i.prototype.pop = function() {
|
|
2832
2851
|
var e = this._root;
|
|
2833
2852
|
if (e) {
|
|
2834
2853
|
for (; e.left; )
|
|
2835
2854
|
e = e.left;
|
|
2836
|
-
return this._root =
|
|
2855
|
+
return this._root = we(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
|
|
2837
2856
|
}
|
|
2838
2857
|
return null;
|
|
2839
2858
|
}, i.prototype.findStatic = function(e) {
|
|
@@ -2845,7 +2864,7 @@ var Gt = (
|
|
|
2845
2864
|
}
|
|
2846
2865
|
return null;
|
|
2847
2866
|
}, i.prototype.find = function(e) {
|
|
2848
|
-
return this._root && (this._root =
|
|
2867
|
+
return this._root && (this._root = we(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2849
2868
|
}, i.prototype.contains = function(e) {
|
|
2850
2869
|
for (var t = this._root, n = this._comparator; t; ) {
|
|
2851
2870
|
var r = n(e, t.key);
|
|
@@ -2855,19 +2874,19 @@ var Gt = (
|
|
|
2855
2874
|
}
|
|
2856
2875
|
return !1;
|
|
2857
2876
|
}, i.prototype.forEach = function(e, t) {
|
|
2858
|
-
for (var n = this._root, r = [],
|
|
2859
|
-
n !== null ? (r.push(n), n = n.left) : r.length !== 0 ? (n = r.pop(), e.call(t, n), n = n.right) :
|
|
2877
|
+
for (var n = this._root, r = [], o = !1; !o; )
|
|
2878
|
+
n !== null ? (r.push(n), n = n.left) : r.length !== 0 ? (n = r.pop(), e.call(t, n), n = n.right) : o = !0;
|
|
2860
2879
|
return this;
|
|
2861
2880
|
}, i.prototype.range = function(e, t, n, r) {
|
|
2862
|
-
for (var
|
|
2863
|
-
if (
|
|
2864
|
-
|
|
2881
|
+
for (var o = [], u = this._comparator, s = this._root, c; o.length !== 0 || s; )
|
|
2882
|
+
if (s)
|
|
2883
|
+
o.push(s), s = s.left;
|
|
2865
2884
|
else {
|
|
2866
|
-
if (
|
|
2885
|
+
if (s = o.pop(), c = u(s.key, t), c > 0)
|
|
2867
2886
|
break;
|
|
2868
|
-
if (u(
|
|
2887
|
+
if (u(s.key, e) >= 0 && n.call(r, s))
|
|
2869
2888
|
return this;
|
|
2870
|
-
|
|
2889
|
+
s = s.right;
|
|
2871
2890
|
}
|
|
2872
2891
|
return this;
|
|
2873
2892
|
}, i.prototype.keys = function() {
|
|
@@ -2897,11 +2916,11 @@ var Gt = (
|
|
|
2897
2916
|
e = e.right;
|
|
2898
2917
|
return e;
|
|
2899
2918
|
}, i.prototype.at = function(e) {
|
|
2900
|
-
for (var t = this._root, n = !1, r = 0,
|
|
2919
|
+
for (var t = this._root, n = !1, r = 0, o = []; !n; )
|
|
2901
2920
|
if (t)
|
|
2902
|
-
|
|
2903
|
-
else if (
|
|
2904
|
-
if (t =
|
|
2921
|
+
o.push(t), t = t.left;
|
|
2922
|
+
else if (o.length > 0) {
|
|
2923
|
+
if (t = o.pop(), r === e)
|
|
2905
2924
|
return t;
|
|
2906
2925
|
r++, t = t.right;
|
|
2907
2926
|
} else
|
|
@@ -2915,10 +2934,10 @@ var Gt = (
|
|
|
2915
2934
|
return n;
|
|
2916
2935
|
}
|
|
2917
2936
|
for (var r = this._comparator; t; ) {
|
|
2918
|
-
var
|
|
2919
|
-
if (
|
|
2937
|
+
var o = r(e.key, t.key);
|
|
2938
|
+
if (o === 0)
|
|
2920
2939
|
break;
|
|
2921
|
-
|
|
2940
|
+
o < 0 ? (n = t, t = t.left) : t = t.right;
|
|
2922
2941
|
}
|
|
2923
2942
|
return n;
|
|
2924
2943
|
}, i.prototype.prev = function(e) {
|
|
@@ -2929,24 +2948,24 @@ var Gt = (
|
|
|
2929
2948
|
return n;
|
|
2930
2949
|
}
|
|
2931
2950
|
for (var r = this._comparator; t; ) {
|
|
2932
|
-
var
|
|
2933
|
-
if (
|
|
2951
|
+
var o = r(e.key, t.key);
|
|
2952
|
+
if (o === 0)
|
|
2934
2953
|
break;
|
|
2935
|
-
|
|
2954
|
+
o < 0 ? t = t.left : (n = t, t = t.right);
|
|
2936
2955
|
}
|
|
2937
2956
|
return n;
|
|
2938
2957
|
}, i.prototype.clear = function() {
|
|
2939
2958
|
return this._root = null, this._size = 0, this;
|
|
2940
2959
|
}, i.prototype.toList = function() {
|
|
2941
|
-
return
|
|
2960
|
+
return zr(this._root);
|
|
2942
2961
|
}, i.prototype.load = function(e, t, n) {
|
|
2943
2962
|
t === void 0 && (t = []), n === void 0 && (n = !1);
|
|
2944
|
-
var r = e.length,
|
|
2945
|
-
if (n &&
|
|
2946
|
-
this._root =
|
|
2963
|
+
var r = e.length, o = this._comparator;
|
|
2964
|
+
if (n && jt(e, t, 0, r - 1, o), this._root === null)
|
|
2965
|
+
this._root = Dt(e, t, 0, r), this._size = r;
|
|
2947
2966
|
else {
|
|
2948
|
-
var u =
|
|
2949
|
-
r = this._size + r, this._root =
|
|
2967
|
+
var u = Ar(this.toList(), Or(e, t), o);
|
|
2968
|
+
r = this._size + r, this._root = Ft({ head: u }, 0, r);
|
|
2950
2969
|
}
|
|
2951
2970
|
return this;
|
|
2952
2971
|
}, i.prototype.isEmpty = function() {
|
|
@@ -2968,17 +2987,17 @@ var Gt = (
|
|
|
2968
2987
|
return String(n.key);
|
|
2969
2988
|
});
|
|
2970
2989
|
var t = [];
|
|
2971
|
-
return
|
|
2990
|
+
return Ut(this._root, "", !0, function(n) {
|
|
2972
2991
|
return t.push(n);
|
|
2973
2992
|
}, e), t.join("");
|
|
2974
2993
|
}, i.prototype.update = function(e, t, n) {
|
|
2975
|
-
var r = this._comparator,
|
|
2976
|
-
r(e, t) < 0 ?
|
|
2994
|
+
var r = this._comparator, o = _i(e, this._root, r), u = o.left, s = o.right;
|
|
2995
|
+
r(e, t) < 0 ? s = Ot(t, n, s, r) : u = Ot(t, n, u, r), this._root = Ir(u, s, r);
|
|
2977
2996
|
}, i.prototype.split = function(e) {
|
|
2978
|
-
return
|
|
2997
|
+
return _i(e, this._root, this._comparator);
|
|
2979
2998
|
}, i.prototype[Symbol.iterator] = function() {
|
|
2980
2999
|
var e, t, n;
|
|
2981
|
-
return
|
|
3000
|
+
return Rr(this, function(r) {
|
|
2982
3001
|
switch (r.label) {
|
|
2983
3002
|
case 0:
|
|
2984
3003
|
e = this._root, t = [], n = !1, r.label = 1;
|
|
@@ -3002,98 +3021,98 @@ var Gt = (
|
|
|
3002
3021
|
}, i;
|
|
3003
3022
|
}()
|
|
3004
3023
|
);
|
|
3005
|
-
function
|
|
3024
|
+
function Dt(i, e, t, n) {
|
|
3006
3025
|
var r = n - t;
|
|
3007
3026
|
if (r > 0) {
|
|
3008
|
-
var
|
|
3009
|
-
return c.left =
|
|
3027
|
+
var o = t + Math.floor(r / 2), u = i[o], s = e[o], c = new ke(u, s);
|
|
3028
|
+
return c.left = Dt(i, e, t, o), c.right = Dt(i, e, o + 1, n), c;
|
|
3010
3029
|
}
|
|
3011
3030
|
return null;
|
|
3012
3031
|
}
|
|
3013
|
-
function
|
|
3014
|
-
for (var t = new
|
|
3015
|
-
n = n.next = new
|
|
3032
|
+
function Or(i, e) {
|
|
3033
|
+
for (var t = new ke(null, null), n = t, r = 0; r < i.length; r++)
|
|
3034
|
+
n = n.next = new ke(i[r], e[r]);
|
|
3016
3035
|
return n.next = null, t.next;
|
|
3017
3036
|
}
|
|
3018
|
-
function
|
|
3019
|
-
for (var e = i, t = [], n = !1, r = new
|
|
3020
|
-
e ? (t.push(e), e = e.left) : t.length > 0 ? (e =
|
|
3021
|
-
return
|
|
3037
|
+
function zr(i) {
|
|
3038
|
+
for (var e = i, t = [], n = !1, r = new ke(null, null), o = r; !n; )
|
|
3039
|
+
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : n = !0;
|
|
3040
|
+
return o.next = null, r.next;
|
|
3022
3041
|
}
|
|
3023
|
-
function
|
|
3042
|
+
function Ft(i, e, t) {
|
|
3024
3043
|
var n = t - e;
|
|
3025
3044
|
if (n > 0) {
|
|
3026
|
-
var r = e + Math.floor(n / 2),
|
|
3027
|
-
return u.left =
|
|
3045
|
+
var r = e + Math.floor(n / 2), o = Ft(i, e, r), u = i.head;
|
|
3046
|
+
return u.left = o, i.head = i.head.next, u.right = Ft(i, r + 1, t), u;
|
|
3028
3047
|
}
|
|
3029
3048
|
return null;
|
|
3030
3049
|
}
|
|
3031
|
-
function
|
|
3032
|
-
for (var n = new
|
|
3033
|
-
t(
|
|
3034
|
-
return
|
|
3050
|
+
function Ar(i, e, t) {
|
|
3051
|
+
for (var n = new ke(null, null), r = n, o = i, u = e; o !== null && u !== null; )
|
|
3052
|
+
t(o.key, u.key) < 0 ? (r.next = o, o = o.next) : (r.next = u, u = u.next), r = r.next;
|
|
3053
|
+
return o !== null ? r.next = o : u !== null && (r.next = u), n.next;
|
|
3035
3054
|
}
|
|
3036
|
-
function
|
|
3055
|
+
function jt(i, e, t, n, r) {
|
|
3037
3056
|
if (!(t >= n)) {
|
|
3038
|
-
for (var
|
|
3057
|
+
for (var o = i[t + n >> 1], u = t - 1, s = n + 1; ; ) {
|
|
3039
3058
|
do
|
|
3040
3059
|
u++;
|
|
3041
|
-
while (r(i[u],
|
|
3060
|
+
while (r(i[u], o) < 0);
|
|
3042
3061
|
do
|
|
3043
|
-
|
|
3044
|
-
while (r(i[
|
|
3045
|
-
if (u >=
|
|
3062
|
+
s--;
|
|
3063
|
+
while (r(i[s], o) > 0);
|
|
3064
|
+
if (u >= s)
|
|
3046
3065
|
break;
|
|
3047
3066
|
var c = i[u];
|
|
3048
|
-
i[u] = i[
|
|
3067
|
+
i[u] = i[s], i[s] = c, c = e[u], e[u] = e[s], e[s] = c;
|
|
3049
3068
|
}
|
|
3050
|
-
|
|
3069
|
+
jt(i, e, t, s, r), jt(i, e, s + 1, n, r);
|
|
3051
3070
|
}
|
|
3052
3071
|
}
|
|
3053
|
-
const
|
|
3054
|
-
function
|
|
3055
|
-
let
|
|
3056
|
-
f > l == f > -l ? (
|
|
3057
|
-
let
|
|
3072
|
+
const me = 11102230246251565e-32, X = 134217729, Wr = (3 + 8 * me) * me;
|
|
3073
|
+
function zt(i, e, t, n, r) {
|
|
3074
|
+
let o, u, s, c, l = e[0], f = n[0], a = 0, d = 0;
|
|
3075
|
+
f > l == f > -l ? (o = l, l = e[++a]) : (o = f, f = n[++d]);
|
|
3076
|
+
let g = 0;
|
|
3058
3077
|
if (a < i && d < t)
|
|
3059
|
-
for (f > l == f > -l ? (u = l +
|
|
3060
|
-
f > l == f > -l ? (u =
|
|
3078
|
+
for (f > l == f > -l ? (u = l + o, s = o - (u - l), l = e[++a]) : (u = f + o, s = o - (u - f), f = n[++d]), o = u, s !== 0 && (r[g++] = s); a < i && d < t; )
|
|
3079
|
+
f > l == f > -l ? (u = o + l, c = u - o, s = o - (u - c) + (l - c), l = e[++a]) : (u = o + f, c = u - o, s = o - (u - c) + (f - c), f = n[++d]), o = u, s !== 0 && (r[g++] = s);
|
|
3061
3080
|
for (; a < i; )
|
|
3062
|
-
u =
|
|
3081
|
+
u = o + l, c = u - o, s = o - (u - c) + (l - c), l = e[++a], o = u, s !== 0 && (r[g++] = s);
|
|
3063
3082
|
for (; d < t; )
|
|
3064
|
-
u =
|
|
3065
|
-
return (
|
|
3083
|
+
u = o + f, c = u - o, s = o - (u - c) + (f - c), f = n[++d], o = u, s !== 0 && (r[g++] = s);
|
|
3084
|
+
return (o !== 0 || g === 0) && (r[g++] = o), g;
|
|
3066
3085
|
}
|
|
3067
|
-
function
|
|
3086
|
+
function Br(i, e) {
|
|
3068
3087
|
let t = e[0];
|
|
3069
3088
|
for (let n = 1; n < i; n++) t += e[n];
|
|
3070
3089
|
return t;
|
|
3071
3090
|
}
|
|
3072
|
-
function
|
|
3091
|
+
function Je(i) {
|
|
3073
3092
|
return new Float64Array(i);
|
|
3074
3093
|
}
|
|
3075
|
-
const
|
|
3076
|
-
function
|
|
3077
|
-
let
|
|
3078
|
-
const P = i - r, w = t - r, k = e -
|
|
3079
|
-
L = P * C, d =
|
|
3080
|
-
let
|
|
3081
|
-
if (
|
|
3082
|
-
L =
|
|
3083
|
-
const
|
|
3084
|
-
L = P * f, d =
|
|
3085
|
-
const
|
|
3086
|
-
L =
|
|
3087
|
-
const
|
|
3088
|
-
return
|
|
3089
|
-
}
|
|
3090
|
-
function
|
|
3091
|
-
const u = (e -
|
|
3092
|
-
return Math.abs(c) >=
|
|
3093
|
-
}
|
|
3094
|
-
const
|
|
3094
|
+
const Ur = (3 + 16 * me) * me, Dr = (2 + 12 * me) * me, Fr = (9 + 64 * me) * me * me, Be = Je(4), Ei = Je(8), wi = Je(12), Li = Je(16), ee = Je(4);
|
|
3095
|
+
function jr(i, e, t, n, r, o, u) {
|
|
3096
|
+
let s, c, l, f, a, d, g, v, E, m, p, b, _, L, N, x, M, S;
|
|
3097
|
+
const P = i - r, w = t - r, k = e - o, C = n - o;
|
|
3098
|
+
L = P * C, d = X * P, g = d - (d - P), v = P - g, d = X * C, E = d - (d - C), m = C - E, N = v * m - (L - g * E - v * E - g * m), x = k * w, d = X * k, g = d - (d - k), v = k - g, d = X * w, E = d - (d - w), m = w - E, M = v * m - (x - g * E - v * E - g * m), p = N - M, a = N - p, Be[0] = N - (p + a) + (a - M), b = L + p, a = b - L, _ = L - (b - a) + (p - a), p = _ - x, a = _ - p, Be[1] = _ - (p + a) + (a - x), S = b + p, a = S - b, Be[2] = b - (S - a) + (p - a), Be[3] = S;
|
|
3099
|
+
let $ = Br(4, Be), T = Dr * u;
|
|
3100
|
+
if ($ >= T || -$ >= T || (a = i - P, s = i - (P + a) + (a - r), a = t - w, l = t - (w + a) + (a - r), a = e - k, c = e - (k + a) + (a - o), a = n - C, f = n - (C + a) + (a - o), s === 0 && c === 0 && l === 0 && f === 0) || (T = Fr * u + Wr * Math.abs($), $ += P * f + C * s - (k * l + w * c), $ >= T || -$ >= T)) return $;
|
|
3101
|
+
L = s * C, d = X * s, g = d - (d - s), v = s - g, d = X * C, E = d - (d - C), m = C - E, N = v * m - (L - g * E - v * E - g * m), x = c * w, d = X * c, g = d - (d - c), v = c - g, d = X * w, E = d - (d - w), m = w - E, M = v * m - (x - g * E - v * E - g * m), p = N - M, a = N - p, ee[0] = N - (p + a) + (a - M), b = L + p, a = b - L, _ = L - (b - a) + (p - a), p = _ - x, a = _ - p, ee[1] = _ - (p + a) + (a - x), S = b + p, a = S - b, ee[2] = b - (S - a) + (p - a), ee[3] = S;
|
|
3102
|
+
const z = zt(4, Be, 4, ee, Ei);
|
|
3103
|
+
L = P * f, d = X * P, g = d - (d - P), v = P - g, d = X * f, E = d - (d - f), m = f - E, N = v * m - (L - g * E - v * E - g * m), x = k * l, d = X * k, g = d - (d - k), v = k - g, d = X * l, E = d - (d - l), m = l - E, M = v * m - (x - g * E - v * E - g * m), p = N - M, a = N - p, ee[0] = N - (p + a) + (a - M), b = L + p, a = b - L, _ = L - (b - a) + (p - a), p = _ - x, a = _ - p, ee[1] = _ - (p + a) + (a - x), S = b + p, a = S - b, ee[2] = b - (S - a) + (p - a), ee[3] = S;
|
|
3104
|
+
const oe = zt(z, Ei, 4, ee, wi);
|
|
3105
|
+
L = s * f, d = X * s, g = d - (d - s), v = s - g, d = X * f, E = d - (d - f), m = f - E, N = v * m - (L - g * E - v * E - g * m), x = c * l, d = X * c, g = d - (d - c), v = c - g, d = X * l, E = d - (d - l), m = l - E, M = v * m - (x - g * E - v * E - g * m), p = N - M, a = N - p, ee[0] = N - (p + a) + (a - M), b = L + p, a = b - L, _ = L - (b - a) + (p - a), p = _ - x, a = _ - p, ee[1] = _ - (p + a) + (a - x), S = b + p, a = S - b, ee[2] = b - (S - a) + (p - a), ee[3] = S;
|
|
3106
|
+
const F = zt(oe, wi, 4, ee, Li);
|
|
3107
|
+
return Li[F - 1];
|
|
3108
|
+
}
|
|
3109
|
+
function Gr(i, e, t, n, r, o) {
|
|
3110
|
+
const u = (e - o) * (t - r), s = (i - r) * (n - o), c = u - s, l = Math.abs(u + s);
|
|
3111
|
+
return Math.abs(c) >= Ur * l ? c : -jr(i, e, t, n, r, o, l);
|
|
3112
|
+
}
|
|
3113
|
+
const Qe = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, Gt = (i, e) => {
|
|
3095
3114
|
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;
|
|
3096
|
-
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,
|
|
3115
|
+
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;
|
|
3097
3116
|
return {
|
|
3098
3117
|
ll: {
|
|
3099
3118
|
x: t,
|
|
@@ -3101,24 +3120,24 @@ const je = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
|
|
|
3101
3120
|
},
|
|
3102
3121
|
ur: {
|
|
3103
3122
|
x: n,
|
|
3104
|
-
y:
|
|
3123
|
+
y: o
|
|
3105
3124
|
}
|
|
3106
3125
|
};
|
|
3107
3126
|
};
|
|
3108
|
-
let
|
|
3109
|
-
|
|
3110
|
-
const
|
|
3111
|
-
if (-
|
|
3127
|
+
let Le = Number.EPSILON;
|
|
3128
|
+
Le === void 0 && (Le = Math.pow(2, -52));
|
|
3129
|
+
const qr = Le * Le, Si = (i, e) => {
|
|
3130
|
+
if (-Le < i && i < Le && -Le < e && e < Le)
|
|
3112
3131
|
return 0;
|
|
3113
3132
|
const t = i - e;
|
|
3114
|
-
return t * t <
|
|
3133
|
+
return t * t < qr * i * e ? 0 : i < e ? -1 : 1;
|
|
3115
3134
|
};
|
|
3116
|
-
class
|
|
3135
|
+
class Qr {
|
|
3117
3136
|
constructor() {
|
|
3118
3137
|
this.reset();
|
|
3119
3138
|
}
|
|
3120
3139
|
reset() {
|
|
3121
|
-
this.xRounder = new
|
|
3140
|
+
this.xRounder = new xi(), this.yRounder = new xi();
|
|
3122
3141
|
}
|
|
3123
3142
|
round(e, t) {
|
|
3124
3143
|
return {
|
|
@@ -3127,9 +3146,9 @@ class Fr {
|
|
|
3127
3146
|
};
|
|
3128
3147
|
}
|
|
3129
3148
|
}
|
|
3130
|
-
class
|
|
3149
|
+
class xi {
|
|
3131
3150
|
constructor() {
|
|
3132
|
-
this.tree = new
|
|
3151
|
+
this.tree = new Zt(), this.round(0);
|
|
3133
3152
|
}
|
|
3134
3153
|
// Note: this can rounds input values backwards or forwards.
|
|
3135
3154
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3140,16 +3159,16 @@ class wi {
|
|
|
3140
3159
|
// angle for t-intersections).
|
|
3141
3160
|
round(e) {
|
|
3142
3161
|
const t = this.tree.add(e), n = this.tree.prev(t);
|
|
3143
|
-
if (n !== null &&
|
|
3162
|
+
if (n !== null && Si(t.key, n.key) === 0)
|
|
3144
3163
|
return this.tree.remove(e), n.key;
|
|
3145
3164
|
const r = this.tree.next(t);
|
|
3146
|
-
return r !== null &&
|
|
3165
|
+
return r !== null && Si(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3147
3166
|
}
|
|
3148
3167
|
}
|
|
3149
|
-
const
|
|
3150
|
-
const n =
|
|
3168
|
+
const Xe = new Qr(), ht = (i, e) => i.x * e.y - i.y * e.x, Hi = (i, e) => i.x * e.x + i.y * e.y, Mi = (i, e, t) => {
|
|
3169
|
+
const n = Gr(i.x, i.y, e.x, e.y, t.x, t.y);
|
|
3151
3170
|
return n > 0 ? -1 : n < 0 ? 1 : 0;
|
|
3152
|
-
},
|
|
3171
|
+
}, pt = (i) => Math.sqrt(Hi(i, i)), Zr = (i, e, t) => {
|
|
3153
3172
|
const n = {
|
|
3154
3173
|
x: e.x - i.x,
|
|
3155
3174
|
y: e.y - i.y
|
|
@@ -3157,8 +3176,8 @@ const Ve = new Fr(), ct = (i, e) => i.x * e.y - i.y * e.x, qi = (i, e) => i.x *
|
|
|
3157
3176
|
x: t.x - i.x,
|
|
3158
3177
|
y: t.y - i.y
|
|
3159
3178
|
};
|
|
3160
|
-
return
|
|
3161
|
-
},
|
|
3179
|
+
return ht(r, n) / pt(r) / pt(n);
|
|
3180
|
+
}, Hr = (i, e, t) => {
|
|
3162
3181
|
const n = {
|
|
3163
3182
|
x: e.x - i.x,
|
|
3164
3183
|
y: e.y - i.y
|
|
@@ -3166,34 +3185,34 @@ const Ve = new Fr(), ct = (i, e) => i.x * e.y - i.y * e.x, qi = (i, e) => i.x *
|
|
|
3166
3185
|
x: t.x - i.x,
|
|
3167
3186
|
y: t.y - i.y
|
|
3168
3187
|
};
|
|
3169
|
-
return
|
|
3170
|
-
},
|
|
3188
|
+
return Hi(r, n) / pt(r) / pt(n);
|
|
3189
|
+
}, ki = (i, e, t) => e.y === 0 ? null : {
|
|
3171
3190
|
x: i.x + e.x / e.y * (t - i.y),
|
|
3172
3191
|
y: t
|
|
3173
|
-
},
|
|
3192
|
+
}, Ci = (i, e, t) => e.x === 0 ? null : {
|
|
3174
3193
|
x: t,
|
|
3175
3194
|
y: i.y + e.y / e.x * (t - i.x)
|
|
3176
|
-
},
|
|
3177
|
-
if (e.x === 0) return
|
|
3178
|
-
if (n.x === 0) return
|
|
3179
|
-
if (e.y === 0) return
|
|
3180
|
-
if (n.y === 0) return
|
|
3181
|
-
const r =
|
|
3195
|
+
}, Vr = (i, e, t, n) => {
|
|
3196
|
+
if (e.x === 0) return Ci(t, n, i.x);
|
|
3197
|
+
if (n.x === 0) return Ci(i, e, t.x);
|
|
3198
|
+
if (e.y === 0) return ki(t, n, i.y);
|
|
3199
|
+
if (n.y === 0) return ki(i, e, t.y);
|
|
3200
|
+
const r = ht(e, n);
|
|
3182
3201
|
if (r == 0) return null;
|
|
3183
|
-
const
|
|
3202
|
+
const o = {
|
|
3184
3203
|
x: t.x - i.x,
|
|
3185
3204
|
y: t.y - i.y
|
|
3186
|
-
}, u =
|
|
3205
|
+
}, u = ht(o, e) / r, s = ht(o, n) / r, c = i.x + s * e.x, l = t.x + u * n.x, f = i.y + s * e.y, a = t.y + u * n.y, d = (c + l) / 2, g = (f + a) / 2;
|
|
3187
3206
|
return {
|
|
3188
3207
|
x: d,
|
|
3189
|
-
y:
|
|
3208
|
+
y: g
|
|
3190
3209
|
};
|
|
3191
3210
|
};
|
|
3192
3211
|
class re {
|
|
3193
3212
|
// for ordering sweep events in the sweep event queue
|
|
3194
3213
|
static compare(e, t) {
|
|
3195
3214
|
const n = re.comparePoints(e.point, t.point);
|
|
3196
|
-
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3215
|
+
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : Se.compare(e.segment, t.segment));
|
|
3197
3216
|
}
|
|
3198
3217
|
// for ordering points in sweep line order
|
|
3199
3218
|
static comparePoints(e, t) {
|
|
@@ -3208,8 +3227,8 @@ class re {
|
|
|
3208
3227
|
throw new Error("Tried to link already linked events");
|
|
3209
3228
|
const t = e.point.events;
|
|
3210
3229
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
3211
|
-
const
|
|
3212
|
-
this.point.events.push(
|
|
3230
|
+
const o = t[n];
|
|
3231
|
+
this.point.events.push(o), o.point = this.point;
|
|
3213
3232
|
}
|
|
3214
3233
|
this.checkForConsuming();
|
|
3215
3234
|
}
|
|
@@ -3221,8 +3240,8 @@ class re {
|
|
|
3221
3240
|
const n = this.point.events[t];
|
|
3222
3241
|
if (n.segment.consumedBy === void 0)
|
|
3223
3242
|
for (let r = t + 1; r < e; r++) {
|
|
3224
|
-
const
|
|
3225
|
-
|
|
3243
|
+
const o = this.point.events[r];
|
|
3244
|
+
o.consumedBy === void 0 && n.otherSE.point.events === o.otherSE.point.events && n.segment.consume(o.segment);
|
|
3226
3245
|
}
|
|
3227
3246
|
}
|
|
3228
3247
|
}
|
|
@@ -3246,27 +3265,27 @@ class re {
|
|
|
3246
3265
|
*/
|
|
3247
3266
|
getLeftmostComparator(e) {
|
|
3248
3267
|
const t = /* @__PURE__ */ new Map(), n = (r) => {
|
|
3249
|
-
const
|
|
3268
|
+
const o = r.otherSE;
|
|
3250
3269
|
t.set(r, {
|
|
3251
|
-
sine:
|
|
3252
|
-
cosine:
|
|
3270
|
+
sine: Zr(this.point, e.point, o.point),
|
|
3271
|
+
cosine: Hr(this.point, e.point, o.point)
|
|
3253
3272
|
});
|
|
3254
3273
|
};
|
|
3255
|
-
return (r,
|
|
3256
|
-
t.has(r) || n(r), t.has(
|
|
3274
|
+
return (r, o) => {
|
|
3275
|
+
t.has(r) || n(r), t.has(o) || n(o);
|
|
3257
3276
|
const {
|
|
3258
3277
|
sine: u,
|
|
3259
|
-
cosine:
|
|
3278
|
+
cosine: s
|
|
3260
3279
|
} = t.get(r), {
|
|
3261
3280
|
sine: c,
|
|
3262
3281
|
cosine: l
|
|
3263
|
-
} = t.get(
|
|
3264
|
-
return u >= 0 && c >= 0 ?
|
|
3282
|
+
} = t.get(o);
|
|
3283
|
+
return u >= 0 && c >= 0 ? s < l ? 1 : s > l ? -1 : 0 : u < 0 && c < 0 ? s < l ? -1 : s > l ? 1 : 0 : c < u ? -1 : c > u ? 1 : 0;
|
|
3265
3284
|
};
|
|
3266
3285
|
}
|
|
3267
3286
|
}
|
|
3268
|
-
let
|
|
3269
|
-
class
|
|
3287
|
+
let Yr = 0;
|
|
3288
|
+
class Se {
|
|
3270
3289
|
/* This compare() function is for ordering segments in the sweep
|
|
3271
3290
|
* line tree, and does so according to the following criteria:
|
|
3272
3291
|
*
|
|
@@ -3281,13 +3300,13 @@ class Ee {
|
|
|
3281
3300
|
* is directly on the right-more of the two left inputs.
|
|
3282
3301
|
*/
|
|
3283
3302
|
static compare(e, t) {
|
|
3284
|
-
const n = e.leftSE.point.x, r = t.leftSE.point.x,
|
|
3303
|
+
const n = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, u = t.rightSE.point.x;
|
|
3285
3304
|
if (u < n) return 1;
|
|
3286
|
-
if (
|
|
3287
|
-
const
|
|
3305
|
+
if (o < r) return -1;
|
|
3306
|
+
const s = e.leftSE.point.y, c = t.leftSE.point.y, l = e.rightSE.point.y, f = t.rightSE.point.y;
|
|
3288
3307
|
if (n < r) {
|
|
3289
|
-
if (c <
|
|
3290
|
-
if (c >
|
|
3308
|
+
if (c < s && c < l) return 1;
|
|
3309
|
+
if (c > s && c > l) return -1;
|
|
3291
3310
|
const a = e.comparePoint(t.leftSE.point);
|
|
3292
3311
|
if (a < 0) return 1;
|
|
3293
3312
|
if (a > 0) return -1;
|
|
@@ -3295,46 +3314,46 @@ class Ee {
|
|
|
3295
3314
|
return d !== 0 ? d : -1;
|
|
3296
3315
|
}
|
|
3297
3316
|
if (n > r) {
|
|
3298
|
-
if (
|
|
3299
|
-
if (
|
|
3317
|
+
if (s < c && s < f) return -1;
|
|
3318
|
+
if (s > c && s > f) return 1;
|
|
3300
3319
|
const a = t.comparePoint(e.leftSE.point);
|
|
3301
3320
|
if (a !== 0) return a;
|
|
3302
3321
|
const d = e.comparePoint(t.rightSE.point);
|
|
3303
3322
|
return d < 0 ? 1 : d > 0 ? -1 : 1;
|
|
3304
3323
|
}
|
|
3305
|
-
if (
|
|
3306
|
-
if (
|
|
3307
|
-
if (
|
|
3324
|
+
if (s < c) return -1;
|
|
3325
|
+
if (s > c) return 1;
|
|
3326
|
+
if (o < u) {
|
|
3308
3327
|
const a = t.comparePoint(e.rightSE.point);
|
|
3309
3328
|
if (a !== 0) return a;
|
|
3310
3329
|
}
|
|
3311
|
-
if (
|
|
3330
|
+
if (o > u) {
|
|
3312
3331
|
const a = e.comparePoint(t.rightSE.point);
|
|
3313
3332
|
if (a < 0) return 1;
|
|
3314
3333
|
if (a > 0) return -1;
|
|
3315
3334
|
}
|
|
3316
|
-
if (
|
|
3317
|
-
const a = l -
|
|
3318
|
-
if (a > d &&
|
|
3319
|
-
if (a < d &&
|
|
3335
|
+
if (o !== u) {
|
|
3336
|
+
const a = l - s, d = o - n, g = f - c, v = u - r;
|
|
3337
|
+
if (a > d && g < v) return 1;
|
|
3338
|
+
if (a < d && g > v) return -1;
|
|
3320
3339
|
}
|
|
3321
|
-
return
|
|
3340
|
+
return o > u ? 1 : o < u || l < f ? -1 : l > f ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
3322
3341
|
}
|
|
3323
3342
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3324
3343
|
* and possibly will be later modified */
|
|
3325
3344
|
constructor(e, t, n, r) {
|
|
3326
|
-
this.id = ++
|
|
3345
|
+
this.id = ++Yr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
3327
3346
|
}
|
|
3328
3347
|
static fromRing(e, t, n) {
|
|
3329
|
-
let r,
|
|
3330
|
-
const
|
|
3331
|
-
if (
|
|
3332
|
-
r = e,
|
|
3333
|
-
else if (
|
|
3334
|
-
r = t,
|
|
3348
|
+
let r, o, u;
|
|
3349
|
+
const s = re.comparePoints(e, t);
|
|
3350
|
+
if (s < 0)
|
|
3351
|
+
r = e, o = t, u = 1;
|
|
3352
|
+
else if (s > 0)
|
|
3353
|
+
r = t, o = e, u = -1;
|
|
3335
3354
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3336
|
-
const c = new re(r, !0), l = new re(
|
|
3337
|
-
return new
|
|
3355
|
+
const c = new re(r, !0), l = new re(o, !1);
|
|
3356
|
+
return new Se(c, l, [n], [u]);
|
|
3338
3357
|
}
|
|
3339
3358
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3340
3359
|
replaceRightSE(e) {
|
|
@@ -3381,9 +3400,9 @@ class Ee {
|
|
|
3381
3400
|
const t = this.leftSE.point, n = this.rightSE.point, r = this.vector();
|
|
3382
3401
|
if (t.x === n.x)
|
|
3383
3402
|
return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
|
|
3384
|
-
const
|
|
3403
|
+
const o = (e.y - t.y) / r.y, u = t.x + o * r.x;
|
|
3385
3404
|
if (e.x === u) return 0;
|
|
3386
|
-
const
|
|
3405
|
+
const s = (e.x - t.x) / r.x, c = t.y + s * r.y;
|
|
3387
3406
|
return e.y === c ? 0 : e.y < c ? -1 : 1;
|
|
3388
3407
|
}
|
|
3389
3408
|
/**
|
|
@@ -3402,20 +3421,20 @@ class Ee {
|
|
|
3402
3421
|
* Else, return null.
|
|
3403
3422
|
*/
|
|
3404
3423
|
getIntersection(e) {
|
|
3405
|
-
const t = this.bbox(), n = e.bbox(), r =
|
|
3424
|
+
const t = this.bbox(), n = e.bbox(), r = Gt(t, n);
|
|
3406
3425
|
if (r === null) return null;
|
|
3407
|
-
const
|
|
3426
|
+
const o = this.leftSE.point, u = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, l = Qe(t, s) && this.comparePoint(s) === 0, f = Qe(n, o) && e.comparePoint(o) === 0, a = Qe(t, c) && this.comparePoint(c) === 0, d = Qe(n, u) && e.comparePoint(u) === 0;
|
|
3408
3427
|
if (f && l)
|
|
3409
3428
|
return d && !a ? u : !d && a ? c : null;
|
|
3410
3429
|
if (f)
|
|
3411
|
-
return a &&
|
|
3430
|
+
return a && o.x === c.x && o.y === c.y ? null : o;
|
|
3412
3431
|
if (l)
|
|
3413
|
-
return d && u.x ===
|
|
3432
|
+
return d && u.x === s.x && u.y === s.y ? null : s;
|
|
3414
3433
|
if (d && a) return null;
|
|
3415
3434
|
if (d) return u;
|
|
3416
3435
|
if (a) return c;
|
|
3417
|
-
const
|
|
3418
|
-
return
|
|
3436
|
+
const g = Vr(o, this.vector(), s, e.vector());
|
|
3437
|
+
return g === null || !Qe(r, g) ? null : Xe.round(g.x, g.y);
|
|
3419
3438
|
}
|
|
3420
3439
|
/**
|
|
3421
3440
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3430,10 +3449,10 @@ class Ee {
|
|
|
3430
3449
|
* Warning: input array of points is modified
|
|
3431
3450
|
*/
|
|
3432
3451
|
split(e) {
|
|
3433
|
-
const t = [], n = e.events !== void 0, r = new re(e, !0),
|
|
3434
|
-
this.replaceRightSE(
|
|
3435
|
-
const
|
|
3436
|
-
return re.comparePoints(
|
|
3452
|
+
const t = [], n = e.events !== void 0, r = new re(e, !0), o = new re(e, !1), u = this.rightSE;
|
|
3453
|
+
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3454
|
+
const s = new Se(r, u, this.rings.slice(), this.windings.slice());
|
|
3455
|
+
return re.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), re.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (r.checkForConsuming(), o.checkForConsuming()), t;
|
|
3437
3456
|
}
|
|
3438
3457
|
/* Swap which event is left and right */
|
|
3439
3458
|
swapEvents() {
|
|
@@ -3448,19 +3467,19 @@ class Ee {
|
|
|
3448
3467
|
let t = this, n = e;
|
|
3449
3468
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3450
3469
|
for (; n.consumedBy; ) n = n.consumedBy;
|
|
3451
|
-
const r =
|
|
3470
|
+
const r = Se.compare(t, n);
|
|
3452
3471
|
if (r !== 0) {
|
|
3453
3472
|
if (r > 0) {
|
|
3454
|
-
const
|
|
3455
|
-
t = n, n =
|
|
3473
|
+
const o = t;
|
|
3474
|
+
t = n, n = o;
|
|
3456
3475
|
}
|
|
3457
3476
|
if (t.prev === n) {
|
|
3458
|
-
const
|
|
3459
|
-
t = n, n =
|
|
3477
|
+
const o = t;
|
|
3478
|
+
t = n, n = o;
|
|
3460
3479
|
}
|
|
3461
|
-
for (let
|
|
3462
|
-
const
|
|
3463
|
-
l === -1 ? (t.rings.push(
|
|
3480
|
+
for (let o = 0, u = n.rings.length; o < u; o++) {
|
|
3481
|
+
const s = n.rings[o], c = n.windings[o], l = t.rings.indexOf(s);
|
|
3482
|
+
l === -1 ? (t.rings.push(s), t.windings.push(c)) : t.windings[l] += c;
|
|
3464
3483
|
}
|
|
3465
3484
|
n.rings = null, n.windings = null, n.consumedBy = t, n.leftSE.consumedBy = t.leftSE, n.rightSE.consumedBy = t.rightSE;
|
|
3466
3485
|
}
|
|
@@ -3491,24 +3510,24 @@ class Ee {
|
|
|
3491
3510
|
multiPolys: []
|
|
3492
3511
|
};
|
|
3493
3512
|
const t = this._afterState.rings, n = this._afterState.windings, r = this._afterState.multiPolys;
|
|
3494
|
-
for (let
|
|
3495
|
-
const l = this.rings[
|
|
3513
|
+
for (let s = 0, c = this.rings.length; s < c; s++) {
|
|
3514
|
+
const l = this.rings[s], f = this.windings[s], a = t.indexOf(l);
|
|
3496
3515
|
a === -1 ? (t.push(l), n.push(f)) : n[a] += f;
|
|
3497
3516
|
}
|
|
3498
|
-
const
|
|
3499
|
-
for (let
|
|
3500
|
-
if (n[
|
|
3501
|
-
const l = t[
|
|
3517
|
+
const o = [], u = [];
|
|
3518
|
+
for (let s = 0, c = t.length; s < c; s++) {
|
|
3519
|
+
if (n[s] === 0) continue;
|
|
3520
|
+
const l = t[s], f = l.poly;
|
|
3502
3521
|
if (u.indexOf(f) === -1)
|
|
3503
|
-
if (l.isExterior)
|
|
3522
|
+
if (l.isExterior) o.push(f);
|
|
3504
3523
|
else {
|
|
3505
3524
|
u.indexOf(f) === -1 && u.push(f);
|
|
3506
|
-
const a =
|
|
3507
|
-
a !== -1 &&
|
|
3525
|
+
const a = o.indexOf(l.poly);
|
|
3526
|
+
a !== -1 && o.splice(a, 1);
|
|
3508
3527
|
}
|
|
3509
3528
|
}
|
|
3510
|
-
for (let
|
|
3511
|
-
const l = s
|
|
3529
|
+
for (let s = 0, c = o.length; s < c; s++) {
|
|
3530
|
+
const l = o[s].multiPoly;
|
|
3512
3531
|
r.indexOf(l) === -1 && r.push(l);
|
|
3513
3532
|
}
|
|
3514
3533
|
return this._afterState;
|
|
@@ -3518,7 +3537,7 @@ class Ee {
|
|
|
3518
3537
|
if (this.consumedBy) return !1;
|
|
3519
3538
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3520
3539
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3521
|
-
switch (
|
|
3540
|
+
switch (ae.type) {
|
|
3522
3541
|
case "union": {
|
|
3523
3542
|
const n = e.length === 0, r = t.length === 0;
|
|
3524
3543
|
this._isInResult = n !== r;
|
|
@@ -3526,7 +3545,7 @@ class Ee {
|
|
|
3526
3545
|
}
|
|
3527
3546
|
case "intersection": {
|
|
3528
3547
|
let n, r;
|
|
3529
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
3548
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === ae.numMultiPolys && n < r;
|
|
3530
3549
|
break;
|
|
3531
3550
|
}
|
|
3532
3551
|
case "xor": {
|
|
@@ -3540,18 +3559,18 @@ class Ee {
|
|
|
3540
3559
|
break;
|
|
3541
3560
|
}
|
|
3542
3561
|
default:
|
|
3543
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3562
|
+
throw new Error(`Unrecognized operation type found ${ae.type}`);
|
|
3544
3563
|
}
|
|
3545
3564
|
return this._isInResult;
|
|
3546
3565
|
}
|
|
3547
3566
|
}
|
|
3548
|
-
class
|
|
3567
|
+
class Ni {
|
|
3549
3568
|
constructor(e, t, n) {
|
|
3550
3569
|
if (!Array.isArray(e) || e.length === 0)
|
|
3551
3570
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3552
3571
|
if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3553
3572
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3554
|
-
const r =
|
|
3573
|
+
const r = Xe.round(e[0][0], e[0][1]);
|
|
3555
3574
|
this.bbox = {
|
|
3556
3575
|
ll: {
|
|
3557
3576
|
x: r.x,
|
|
@@ -3562,14 +3581,14 @@ class Mi {
|
|
|
3562
3581
|
y: r.y
|
|
3563
3582
|
}
|
|
3564
3583
|
};
|
|
3565
|
-
let
|
|
3566
|
-
for (let u = 1,
|
|
3584
|
+
let o = r;
|
|
3585
|
+
for (let u = 1, s = e.length; u < s; u++) {
|
|
3567
3586
|
if (typeof e[u][0] != "number" || typeof e[u][1] != "number")
|
|
3568
3587
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3569
|
-
let c =
|
|
3570
|
-
c.x ===
|
|
3588
|
+
let c = Xe.round(e[u][0], e[u][1]);
|
|
3589
|
+
c.x === o.x && c.y === o.y || (this.segments.push(Se.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);
|
|
3571
3590
|
}
|
|
3572
|
-
(r.x !==
|
|
3591
|
+
(r.x !== o.x || r.y !== o.y) && this.segments.push(Se.fromRing(o, r, this));
|
|
3573
3592
|
}
|
|
3574
3593
|
getSweepEvents() {
|
|
3575
3594
|
const e = [];
|
|
@@ -3580,11 +3599,11 @@ class Mi {
|
|
|
3580
3599
|
return e;
|
|
3581
3600
|
}
|
|
3582
3601
|
}
|
|
3583
|
-
class
|
|
3602
|
+
class Kr {
|
|
3584
3603
|
constructor(e, t) {
|
|
3585
3604
|
if (!Array.isArray(e))
|
|
3586
3605
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3587
|
-
this.exteriorRing = new
|
|
3606
|
+
this.exteriorRing = new Ni(e[0], this, !0), this.bbox = {
|
|
3588
3607
|
ll: {
|
|
3589
3608
|
x: this.exteriorRing.bbox.ll.x,
|
|
3590
3609
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3595,8 +3614,8 @@ class Zr {
|
|
|
3595
3614
|
}
|
|
3596
3615
|
}, this.interiorRings = [];
|
|
3597
3616
|
for (let n = 1, r = e.length; n < r; n++) {
|
|
3598
|
-
const
|
|
3599
|
-
|
|
3617
|
+
const o = new Ni(e[n], this, !1);
|
|
3618
|
+
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);
|
|
3600
3619
|
}
|
|
3601
3620
|
this.multiPoly = t;
|
|
3602
3621
|
}
|
|
@@ -3604,13 +3623,13 @@ class Zr {
|
|
|
3604
3623
|
const e = this.exteriorRing.getSweepEvents();
|
|
3605
3624
|
for (let t = 0, n = this.interiorRings.length; t < n; t++) {
|
|
3606
3625
|
const r = this.interiorRings[t].getSweepEvents();
|
|
3607
|
-
for (let
|
|
3608
|
-
e.push(r[
|
|
3626
|
+
for (let o = 0, u = r.length; o < u; o++)
|
|
3627
|
+
e.push(r[o]);
|
|
3609
3628
|
}
|
|
3610
3629
|
return e;
|
|
3611
3630
|
}
|
|
3612
3631
|
}
|
|
3613
|
-
class
|
|
3632
|
+
class Ti {
|
|
3614
3633
|
constructor(e, t) {
|
|
3615
3634
|
if (!Array.isArray(e))
|
|
3616
3635
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3629,8 +3648,8 @@ class ki {
|
|
|
3629
3648
|
}
|
|
3630
3649
|
};
|
|
3631
3650
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3632
|
-
const
|
|
3633
|
-
|
|
3651
|
+
const o = new Kr(e[n], this);
|
|
3652
|
+
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);
|
|
3634
3653
|
}
|
|
3635
3654
|
this.isSubject = t;
|
|
3636
3655
|
}
|
|
@@ -3638,25 +3657,25 @@ class ki {
|
|
|
3638
3657
|
const e = [];
|
|
3639
3658
|
for (let t = 0, n = this.polys.length; t < n; t++) {
|
|
3640
3659
|
const r = this.polys[t].getSweepEvents();
|
|
3641
|
-
for (let
|
|
3642
|
-
e.push(r[
|
|
3660
|
+
for (let o = 0, u = r.length; o < u; o++)
|
|
3661
|
+
e.push(r[o]);
|
|
3643
3662
|
}
|
|
3644
3663
|
return e;
|
|
3645
3664
|
}
|
|
3646
3665
|
}
|
|
3647
|
-
class
|
|
3666
|
+
class yt {
|
|
3648
3667
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3649
3668
|
* of closed rings from all the segments marked to be part of the result */
|
|
3650
3669
|
static factory(e) {
|
|
3651
3670
|
const t = [];
|
|
3652
3671
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3653
|
-
const
|
|
3654
|
-
if (!
|
|
3655
|
-
let u = null,
|
|
3656
|
-
const l = [
|
|
3657
|
-
for (; u =
|
|
3672
|
+
const o = e[n];
|
|
3673
|
+
if (!o.isInResult() || o.ringOut) continue;
|
|
3674
|
+
let u = null, s = o.leftSE, c = o.rightSE;
|
|
3675
|
+
const l = [s], f = s.point, a = [];
|
|
3676
|
+
for (; u = s, s = c, l.push(s), s.point !== f; )
|
|
3658
3677
|
for (; ; ) {
|
|
3659
|
-
const d =
|
|
3678
|
+
const d = s.getAvailableLinkedEvents();
|
|
3660
3679
|
if (d.length === 0) {
|
|
3661
3680
|
const E = l[0].point, m = l[l.length - 1].point;
|
|
3662
3681
|
throw new Error(`Unable to complete output ring starting at [${E.x}, ${E.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`);
|
|
@@ -3665,26 +3684,26 @@ class gt {
|
|
|
3665
3684
|
c = d[0].otherSE;
|
|
3666
3685
|
break;
|
|
3667
3686
|
}
|
|
3668
|
-
let
|
|
3687
|
+
let g = null;
|
|
3669
3688
|
for (let E = 0, m = a.length; E < m; E++)
|
|
3670
|
-
if (a[E].point ===
|
|
3671
|
-
|
|
3689
|
+
if (a[E].point === s.point) {
|
|
3690
|
+
g = E;
|
|
3672
3691
|
break;
|
|
3673
3692
|
}
|
|
3674
|
-
if (
|
|
3675
|
-
const E = a.splice(
|
|
3676
|
-
m.unshift(m[0].otherSE), t.push(new
|
|
3693
|
+
if (g !== null) {
|
|
3694
|
+
const E = a.splice(g)[0], m = l.splice(E.index);
|
|
3695
|
+
m.unshift(m[0].otherSE), t.push(new yt(m.reverse()));
|
|
3677
3696
|
continue;
|
|
3678
3697
|
}
|
|
3679
3698
|
a.push({
|
|
3680
3699
|
index: l.length,
|
|
3681
|
-
point:
|
|
3700
|
+
point: s.point
|
|
3682
3701
|
});
|
|
3683
|
-
const v =
|
|
3702
|
+
const v = s.getLeftmostComparator(u);
|
|
3684
3703
|
c = d.sort(v)[0].otherSE;
|
|
3685
3704
|
break;
|
|
3686
3705
|
}
|
|
3687
|
-
t.push(new
|
|
3706
|
+
t.push(new yt(l));
|
|
3688
3707
|
}
|
|
3689
3708
|
return t;
|
|
3690
3709
|
}
|
|
@@ -3699,13 +3718,13 @@ class gt {
|
|
|
3699
3718
|
const t = [e];
|
|
3700
3719
|
for (let l = 1, f = this.events.length - 1; l < f; l++) {
|
|
3701
3720
|
const a = this.events[l].point, d = this.events[l + 1].point;
|
|
3702
|
-
|
|
3721
|
+
Mi(a, e, d) !== 0 && (t.push(a), e = a);
|
|
3703
3722
|
}
|
|
3704
3723
|
if (t.length === 1) return null;
|
|
3705
3724
|
const n = t[0], r = t[1];
|
|
3706
|
-
|
|
3707
|
-
const
|
|
3708
|
-
for (let l = u; l !=
|
|
3725
|
+
Mi(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3726
|
+
const o = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3727
|
+
for (let l = u; l != s; l += o) c.push([t[l].x, t[l].y]);
|
|
3709
3728
|
return c;
|
|
3710
3729
|
}
|
|
3711
3730
|
isExteriorRing() {
|
|
@@ -3721,7 +3740,7 @@ class gt {
|
|
|
3721
3740
|
/* Returns the ring that encloses this one, if any */
|
|
3722
3741
|
_calcEnclosingRing() {
|
|
3723
3742
|
let e = this.events[0];
|
|
3724
|
-
for (let r = 1,
|
|
3743
|
+
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3725
3744
|
const u = this.events[r];
|
|
3726
3745
|
re.compare(e, u) > 0 && (e = u);
|
|
3727
3746
|
}
|
|
@@ -3735,7 +3754,7 @@ class gt {
|
|
|
3735
3754
|
}
|
|
3736
3755
|
}
|
|
3737
3756
|
}
|
|
3738
|
-
class
|
|
3757
|
+
class Ri {
|
|
3739
3758
|
constructor(e) {
|
|
3740
3759
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3741
3760
|
}
|
|
@@ -3752,7 +3771,7 @@ class Ci {
|
|
|
3752
3771
|
return e;
|
|
3753
3772
|
}
|
|
3754
3773
|
}
|
|
3755
|
-
class
|
|
3774
|
+
class Xr {
|
|
3756
3775
|
constructor(e) {
|
|
3757
3776
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3758
3777
|
}
|
|
@@ -3767,21 +3786,21 @@ class Hr {
|
|
|
3767
3786
|
_composePolys(e) {
|
|
3768
3787
|
const t = [];
|
|
3769
3788
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3770
|
-
const
|
|
3771
|
-
if (!
|
|
3772
|
-
if (
|
|
3789
|
+
const o = e[n];
|
|
3790
|
+
if (!o.poly)
|
|
3791
|
+
if (o.isExteriorRing()) t.push(new Ri(o));
|
|
3773
3792
|
else {
|
|
3774
|
-
const u =
|
|
3775
|
-
u.poly || t.push(new
|
|
3793
|
+
const u = o.enclosingRing();
|
|
3794
|
+
u.poly || t.push(new Ri(u)), u.poly.addInterior(o);
|
|
3776
3795
|
}
|
|
3777
3796
|
}
|
|
3778
3797
|
return t;
|
|
3779
3798
|
}
|
|
3780
3799
|
}
|
|
3781
|
-
class
|
|
3800
|
+
class Jr {
|
|
3782
3801
|
constructor(e) {
|
|
3783
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3784
|
-
this.queue = e, this.tree = new
|
|
3802
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Se.compare;
|
|
3803
|
+
this.queue = e, this.tree = new Zt(t), this.segments = [];
|
|
3785
3804
|
}
|
|
3786
3805
|
process(e) {
|
|
3787
3806
|
const t = e.segment, n = [];
|
|
@@ -3789,19 +3808,19 @@ class Vr {
|
|
|
3789
3808
|
return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), n;
|
|
3790
3809
|
const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
|
|
3791
3810
|
if (!r) throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);
|
|
3792
|
-
let
|
|
3793
|
-
for (;
|
|
3794
|
-
|
|
3811
|
+
let o = r, u = r, s, c;
|
|
3812
|
+
for (; s === void 0; )
|
|
3813
|
+
o = this.tree.prev(o), o === null ? s = null : o.key.consumedBy === void 0 && (s = o.key);
|
|
3795
3814
|
for (; c === void 0; )
|
|
3796
3815
|
u = this.tree.next(u), u === null ? c = null : u.key.consumedBy === void 0 && (c = u.key);
|
|
3797
3816
|
if (e.isLeft) {
|
|
3798
3817
|
let l = null;
|
|
3799
|
-
if (
|
|
3800
|
-
const a =
|
|
3801
|
-
if (a !== null && (t.isAnEndpoint(a) || (l = a), !
|
|
3802
|
-
const d = this._splitSafely(
|
|
3803
|
-
for (let
|
|
3804
|
-
n.push(d[
|
|
3818
|
+
if (s) {
|
|
3819
|
+
const a = s.getIntersection(t);
|
|
3820
|
+
if (a !== null && (t.isAnEndpoint(a) || (l = a), !s.isAnEndpoint(a))) {
|
|
3821
|
+
const d = this._splitSafely(s, a);
|
|
3822
|
+
for (let g = 0, v = d.length; g < v; g++)
|
|
3823
|
+
n.push(d[g]);
|
|
3805
3824
|
}
|
|
3806
3825
|
}
|
|
3807
3826
|
let f = null;
|
|
@@ -3809,24 +3828,24 @@ class Vr {
|
|
|
3809
3828
|
const a = c.getIntersection(t);
|
|
3810
3829
|
if (a !== null && (t.isAnEndpoint(a) || (f = a), !c.isAnEndpoint(a))) {
|
|
3811
3830
|
const d = this._splitSafely(c, a);
|
|
3812
|
-
for (let
|
|
3813
|
-
n.push(d[
|
|
3831
|
+
for (let g = 0, v = d.length; g < v; g++)
|
|
3832
|
+
n.push(d[g]);
|
|
3814
3833
|
}
|
|
3815
3834
|
}
|
|
3816
3835
|
if (l !== null || f !== null) {
|
|
3817
3836
|
let a = null;
|
|
3818
3837
|
l === null ? a = f : f === null ? a = l : a = re.comparePoints(l, f) <= 0 ? l : f, this.queue.remove(t.rightSE), n.push(t.rightSE);
|
|
3819
3838
|
const d = t.split(a);
|
|
3820
|
-
for (let
|
|
3821
|
-
n.push(d[
|
|
3839
|
+
for (let g = 0, v = d.length; g < v; g++)
|
|
3840
|
+
n.push(d[g]);
|
|
3822
3841
|
}
|
|
3823
|
-
n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev =
|
|
3842
|
+
n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev = s);
|
|
3824
3843
|
} else {
|
|
3825
|
-
if (
|
|
3826
|
-
const l =
|
|
3844
|
+
if (s && c) {
|
|
3845
|
+
const l = s.getIntersection(c);
|
|
3827
3846
|
if (l !== null) {
|
|
3828
|
-
if (!
|
|
3829
|
-
const f = this._splitSafely(
|
|
3847
|
+
if (!s.isAnEndpoint(l)) {
|
|
3848
|
+
const f = this._splitSafely(s, l);
|
|
3830
3849
|
for (let a = 0, d = f.length; a < d; a++)
|
|
3831
3850
|
n.push(f[a]);
|
|
3832
3851
|
}
|
|
@@ -3851,84 +3870,84 @@ class Vr {
|
|
|
3851
3870
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3852
3871
|
}
|
|
3853
3872
|
}
|
|
3854
|
-
const
|
|
3855
|
-
class
|
|
3873
|
+
const Pi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, $r = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3874
|
+
class eo {
|
|
3856
3875
|
run(e, t, n) {
|
|
3857
|
-
|
|
3858
|
-
const r = [new
|
|
3876
|
+
ae.type = e, Xe.reset();
|
|
3877
|
+
const r = [new Ti(t, !0)];
|
|
3859
3878
|
for (let a = 0, d = n.length; a < d; a++)
|
|
3860
|
-
r.push(new
|
|
3861
|
-
if (
|
|
3879
|
+
r.push(new Ti(n[a], !1));
|
|
3880
|
+
if (ae.numMultiPolys = r.length, ae.type === "difference") {
|
|
3862
3881
|
const a = r[0];
|
|
3863
3882
|
let d = 1;
|
|
3864
3883
|
for (; d < r.length; )
|
|
3865
|
-
|
|
3884
|
+
Gt(r[d].bbox, a.bbox) !== null ? d++ : r.splice(d, 1);
|
|
3866
3885
|
}
|
|
3867
|
-
if (
|
|
3886
|
+
if (ae.type === "intersection")
|
|
3868
3887
|
for (let a = 0, d = r.length; a < d; a++) {
|
|
3869
|
-
const
|
|
3888
|
+
const g = r[a];
|
|
3870
3889
|
for (let v = a + 1, E = r.length; v < E; v++)
|
|
3871
|
-
if (
|
|
3890
|
+
if (Gt(g.bbox, r[v].bbox) === null) return [];
|
|
3872
3891
|
}
|
|
3873
|
-
const
|
|
3892
|
+
const o = new Zt(re.compare);
|
|
3874
3893
|
for (let a = 0, d = r.length; a < d; a++) {
|
|
3875
|
-
const
|
|
3876
|
-
for (let v = 0, E =
|
|
3877
|
-
if (
|
|
3894
|
+
const g = r[a].getSweepEvents();
|
|
3895
|
+
for (let v = 0, E = g.length; v < E; v++)
|
|
3896
|
+
if (o.insert(g[v]), o.size > Pi)
|
|
3878
3897
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3879
3898
|
}
|
|
3880
|
-
const u = new
|
|
3881
|
-
let
|
|
3899
|
+
const u = new Jr(o);
|
|
3900
|
+
let s = o.size, c = o.pop();
|
|
3882
3901
|
for (; c; ) {
|
|
3883
3902
|
const a = c.key;
|
|
3884
|
-
if (
|
|
3885
|
-
const
|
|
3886
|
-
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${
|
|
3903
|
+
if (o.size === s) {
|
|
3904
|
+
const g = a.segment;
|
|
3905
|
+
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`);
|
|
3887
3906
|
}
|
|
3888
|
-
if (
|
|
3907
|
+
if (o.size > Pi)
|
|
3889
3908
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3890
|
-
if (u.segments.length >
|
|
3909
|
+
if (u.segments.length > $r)
|
|
3891
3910
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3892
3911
|
const d = u.process(a);
|
|
3893
|
-
for (let
|
|
3894
|
-
const E = d[
|
|
3895
|
-
E.consumedBy === void 0 &&
|
|
3912
|
+
for (let g = 0, v = d.length; g < v; g++) {
|
|
3913
|
+
const E = d[g];
|
|
3914
|
+
E.consumedBy === void 0 && o.insert(E);
|
|
3896
3915
|
}
|
|
3897
|
-
|
|
3916
|
+
s = o.size, c = o.pop();
|
|
3898
3917
|
}
|
|
3899
|
-
|
|
3900
|
-
const l =
|
|
3901
|
-
return new
|
|
3918
|
+
Xe.reset();
|
|
3919
|
+
const l = yt.factory(u.segments);
|
|
3920
|
+
return new Xr(l).getGeom();
|
|
3902
3921
|
}
|
|
3903
3922
|
}
|
|
3904
|
-
const
|
|
3923
|
+
const ae = new eo(), to = function(i) {
|
|
3905
3924
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3906
3925
|
t[n - 1] = arguments[n];
|
|
3907
|
-
return
|
|
3908
|
-
},
|
|
3926
|
+
return ae.run("union", i, t);
|
|
3927
|
+
}, io = function(i) {
|
|
3909
3928
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3910
3929
|
t[n - 1] = arguments[n];
|
|
3911
|
-
return
|
|
3912
|
-
},
|
|
3930
|
+
return ae.run("intersection", i, t);
|
|
3931
|
+
}, no = function(i) {
|
|
3913
3932
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3914
3933
|
t[n - 1] = arguments[n];
|
|
3915
|
-
return
|
|
3916
|
-
},
|
|
3934
|
+
return ae.run("xor", i, t);
|
|
3935
|
+
}, ro = function(i) {
|
|
3917
3936
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3918
3937
|
t[n - 1] = arguments[n];
|
|
3919
|
-
return
|
|
3938
|
+
return ae.run("difference", i, t);
|
|
3920
3939
|
};
|
|
3921
|
-
var
|
|
3922
|
-
union:
|
|
3923
|
-
intersection:
|
|
3924
|
-
xor:
|
|
3925
|
-
difference:
|
|
3940
|
+
var Vi = {
|
|
3941
|
+
union: to,
|
|
3942
|
+
intersection: io,
|
|
3943
|
+
xor: no,
|
|
3944
|
+
difference: ro
|
|
3926
3945
|
};
|
|
3927
|
-
function
|
|
3946
|
+
function Yi(i, e, t) {
|
|
3928
3947
|
if (i !== null)
|
|
3929
|
-
for (var n, r,
|
|
3930
|
-
l = v ? i.features[p].geometry : E ? i.geometry : i, d = l ? l.type === "GeometryCollection" : !1,
|
|
3931
|
-
for (var b = 0; b <
|
|
3948
|
+
for (var n, r, o, u, s, c, l, f = 0, a = 0, d, g = i.type, v = g === "FeatureCollection", E = g === "Feature", m = v ? i.features.length : 1, p = 0; p < m; p++) {
|
|
3949
|
+
l = v ? i.features[p].geometry : E ? i.geometry : i, d = l ? l.type === "GeometryCollection" : !1, s = d ? l.geometries.length : 1;
|
|
3950
|
+
for (var b = 0; b < s; b++) {
|
|
3932
3951
|
var _ = 0, L = 0;
|
|
3933
3952
|
if (u = d ? l.geometries[b] : l, u !== null) {
|
|
3934
3953
|
c = u.coordinates;
|
|
@@ -3983,9 +4002,9 @@ function Zi(i, e, t) {
|
|
|
3983
4002
|
case "MultiPolygon":
|
|
3984
4003
|
for (n = 0; n < c.length; n++) {
|
|
3985
4004
|
for (L = 0, r = 0; r < c[n].length; r++) {
|
|
3986
|
-
for (
|
|
4005
|
+
for (o = 0; o < c[n][r].length - f; o++) {
|
|
3987
4006
|
if (e(
|
|
3988
|
-
c[n][r][
|
|
4007
|
+
c[n][r][o],
|
|
3989
4008
|
a,
|
|
3990
4009
|
p,
|
|
3991
4010
|
_,
|
|
@@ -4001,7 +4020,7 @@ function Zi(i, e, t) {
|
|
|
4001
4020
|
break;
|
|
4002
4021
|
case "GeometryCollection":
|
|
4003
4022
|
for (n = 0; n < u.geometries.length; n++)
|
|
4004
|
-
if (
|
|
4023
|
+
if (Yi(u.geometries[n], e) === !1)
|
|
4005
4024
|
return !1;
|
|
4006
4025
|
break;
|
|
4007
4026
|
default:
|
|
@@ -4011,11 +4030,11 @@ function Zi(i, e, t) {
|
|
|
4011
4030
|
}
|
|
4012
4031
|
}
|
|
4013
4032
|
}
|
|
4014
|
-
function
|
|
4015
|
-
var t, n, r,
|
|
4033
|
+
function Ht(i, e) {
|
|
4034
|
+
var t, n, r, o, u, s, c, l, f, a, d = 0, g = i.type === "FeatureCollection", v = i.type === "Feature", E = g ? i.features.length : 1;
|
|
4016
4035
|
for (t = 0; t < E; t++) {
|
|
4017
|
-
for (
|
|
4018
|
-
if (
|
|
4036
|
+
for (s = g ? i.features[t].geometry : v ? i.geometry : i, l = g ? i.features[t].properties : v ? i.properties : {}, f = g ? i.features[t].bbox : v ? i.bbox : void 0, a = g ? i.features[t].id : v ? i.id : void 0, c = s ? s.type === "GeometryCollection" : !1, u = c ? s.geometries.length : 1, r = 0; r < u; r++) {
|
|
4037
|
+
if (o = c ? s.geometries[r] : s, o === null) {
|
|
4019
4038
|
if (e(
|
|
4020
4039
|
null,
|
|
4021
4040
|
d,
|
|
@@ -4026,7 +4045,7 @@ function qt(i, e) {
|
|
|
4026
4045
|
return !1;
|
|
4027
4046
|
continue;
|
|
4028
4047
|
}
|
|
4029
|
-
switch (
|
|
4048
|
+
switch (o.type) {
|
|
4030
4049
|
case "Point":
|
|
4031
4050
|
case "LineString":
|
|
4032
4051
|
case "MultiPoint":
|
|
@@ -4034,7 +4053,7 @@ function qt(i, e) {
|
|
|
4034
4053
|
case "MultiLineString":
|
|
4035
4054
|
case "MultiPolygon": {
|
|
4036
4055
|
if (e(
|
|
4037
|
-
|
|
4056
|
+
o,
|
|
4038
4057
|
d,
|
|
4039
4058
|
l,
|
|
4040
4059
|
f,
|
|
@@ -4044,9 +4063,9 @@ function qt(i, e) {
|
|
|
4044
4063
|
break;
|
|
4045
4064
|
}
|
|
4046
4065
|
case "GeometryCollection": {
|
|
4047
|
-
for (n = 0; n <
|
|
4066
|
+
for (n = 0; n < o.geometries.length; n++)
|
|
4048
4067
|
if (e(
|
|
4049
|
-
|
|
4068
|
+
o.geometries[n],
|
|
4050
4069
|
d,
|
|
4051
4070
|
l,
|
|
4052
4071
|
f,
|
|
@@ -4062,22 +4081,22 @@ function qt(i, e) {
|
|
|
4062
4081
|
d++;
|
|
4063
4082
|
}
|
|
4064
4083
|
}
|
|
4065
|
-
function
|
|
4066
|
-
|
|
4067
|
-
var
|
|
4068
|
-
switch (
|
|
4084
|
+
function oo(i, e) {
|
|
4085
|
+
Ht(i, function(t, n, r, o, u) {
|
|
4086
|
+
var s = t === null ? null : t.type;
|
|
4087
|
+
switch (s) {
|
|
4069
4088
|
case null:
|
|
4070
4089
|
case "Point":
|
|
4071
4090
|
case "LineString":
|
|
4072
4091
|
case "Polygon":
|
|
4073
4092
|
return e(
|
|
4074
|
-
|
|
4093
|
+
Ye(t, r, { bbox: o, id: u }),
|
|
4075
4094
|
n,
|
|
4076
4095
|
0
|
|
4077
4096
|
) === !1 ? !1 : void 0;
|
|
4078
4097
|
}
|
|
4079
4098
|
var c;
|
|
4080
|
-
switch (
|
|
4099
|
+
switch (s) {
|
|
4081
4100
|
case "MultiPoint":
|
|
4082
4101
|
c = "Point";
|
|
4083
4102
|
break;
|
|
@@ -4093,53 +4112,53 @@ function ts(i, e) {
|
|
|
4093
4112
|
type: c,
|
|
4094
4113
|
coordinates: f
|
|
4095
4114
|
};
|
|
4096
|
-
if (e(
|
|
4115
|
+
if (e(Ye(a, r), n, l) === !1)
|
|
4097
4116
|
return !1;
|
|
4098
4117
|
}
|
|
4099
4118
|
});
|
|
4100
4119
|
}
|
|
4101
|
-
function
|
|
4120
|
+
function so(i, e = {}) {
|
|
4102
4121
|
const t = [];
|
|
4103
|
-
if (
|
|
4122
|
+
if (Ht(i, (r) => {
|
|
4104
4123
|
t.push(r.coordinates);
|
|
4105
4124
|
}), t.length < 2)
|
|
4106
4125
|
throw new Error("Must have at least 2 geometries");
|
|
4107
|
-
const n =
|
|
4108
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4126
|
+
const n = Vi.union(t[0], ...t.slice(1));
|
|
4127
|
+
return n.length === 0 ? null : n.length === 1 ? Qt(n[0], e.properties) : Zi(n, e.properties);
|
|
4109
4128
|
}
|
|
4110
|
-
var
|
|
4111
|
-
function
|
|
4129
|
+
var Ki = so;
|
|
4130
|
+
function lo(i, e = {}) {
|
|
4112
4131
|
if (i.bbox != null && e.recompute !== !0)
|
|
4113
4132
|
return i.bbox;
|
|
4114
4133
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
4115
|
-
return
|
|
4134
|
+
return Yi(i, (n) => {
|
|
4116
4135
|
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]);
|
|
4117
4136
|
}), t;
|
|
4118
4137
|
}
|
|
4119
|
-
var
|
|
4120
|
-
function
|
|
4138
|
+
var Ii = lo;
|
|
4139
|
+
function uo(i) {
|
|
4121
4140
|
const e = [];
|
|
4122
|
-
if (
|
|
4141
|
+
if (Ht(i, (r) => {
|
|
4123
4142
|
e.push(r.coordinates);
|
|
4124
4143
|
}), e.length < 2)
|
|
4125
4144
|
throw new Error("Must have at least two features");
|
|
4126
|
-
const t = i.features[0].properties || {}, n =
|
|
4127
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
4145
|
+
const t = i.features[0].properties || {}, n = Vi.difference(e[0], ...e.slice(1));
|
|
4146
|
+
return n.length === 0 ? null : n.length === 1 ? Qt(n[0], t) : Zi(n, t);
|
|
4128
4147
|
}
|
|
4129
|
-
var
|
|
4130
|
-
function
|
|
4148
|
+
var ao = uo;
|
|
4149
|
+
function co(i) {
|
|
4131
4150
|
if (!i)
|
|
4132
4151
|
throw new Error("geojson is required");
|
|
4133
4152
|
var e = [];
|
|
4134
|
-
return
|
|
4153
|
+
return oo(i, function(t) {
|
|
4135
4154
|
e.push(t);
|
|
4136
|
-
}),
|
|
4155
|
+
}), Ke(e);
|
|
4137
4156
|
}
|
|
4138
|
-
var
|
|
4139
|
-
function
|
|
4140
|
-
const t =
|
|
4141
|
-
|
|
4142
|
-
|
|
4157
|
+
var fo = co;
|
|
4158
|
+
function Oi(i, e) {
|
|
4159
|
+
const t = ao(
|
|
4160
|
+
Ke([
|
|
4161
|
+
Qt([
|
|
4143
4162
|
[
|
|
4144
4163
|
[180, 90],
|
|
4145
4164
|
[-180, 90],
|
|
@@ -4154,27 +4173,27 @@ function Ti(i, e) {
|
|
|
4154
4173
|
if (!t)
|
|
4155
4174
|
return;
|
|
4156
4175
|
t.properties = { isMask: !0 };
|
|
4157
|
-
const n =
|
|
4158
|
-
if (
|
|
4159
|
-
for (const c of
|
|
4160
|
-
const l =
|
|
4176
|
+
const n = mt(Ii(i)), r = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, u = n[2] > 180, s = fo(i);
|
|
4177
|
+
if (s.features.length > 1 && (o || u))
|
|
4178
|
+
for (const c of s.features) {
|
|
4179
|
+
const l = mt(Ii(c));
|
|
4161
4180
|
if (u && l[0] < -180 + r)
|
|
4162
4181
|
for (const f of c.geometry.coordinates)
|
|
4163
4182
|
for (const a of f)
|
|
4164
4183
|
a[0] += 360 - r;
|
|
4165
|
-
if (
|
|
4184
|
+
if (o && l[2] > 180 - r)
|
|
4166
4185
|
for (const f of c.geometry.coordinates)
|
|
4167
4186
|
for (const a of f)
|
|
4168
4187
|
a[0] -= 360 - r;
|
|
4169
4188
|
}
|
|
4170
4189
|
e(
|
|
4171
|
-
|
|
4172
|
-
|
|
4190
|
+
Ke([
|
|
4191
|
+
s.features.length < 2 ? i : Ki(s) ?? i,
|
|
4173
4192
|
t
|
|
4174
4193
|
])
|
|
4175
4194
|
);
|
|
4176
4195
|
}
|
|
4177
|
-
const
|
|
4196
|
+
const zi = {
|
|
4178
4197
|
fill: {
|
|
4179
4198
|
paint: {
|
|
4180
4199
|
"fill-color": "#000",
|
|
@@ -4193,9 +4212,9 @@ const Pi = {
|
|
|
4193
4212
|
},
|
|
4194
4213
|
filter: ["!", ["has", "isMask"]]
|
|
4195
4214
|
}
|
|
4196
|
-
},
|
|
4197
|
-
function
|
|
4198
|
-
let
|
|
4215
|
+
}, at = "mtlr-gc-full-geom", Ai = "mtlr-gc-full-geom-fill", Wi = "mtlr-gc-full-geom-line";
|
|
4216
|
+
function ho(i, e, t = !0, n = !0, r = {}, o = {}, u = zi) {
|
|
4217
|
+
let s;
|
|
4199
4218
|
const c = [];
|
|
4200
4219
|
let l, f, a;
|
|
4201
4220
|
function d() {
|
|
@@ -4203,32 +4222,32 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4203
4222
|
i.once("load", d);
|
|
4204
4223
|
return;
|
|
4205
4224
|
}
|
|
4206
|
-
const m = u ? u === !0 ?
|
|
4225
|
+
const m = u ? u === !0 ? zi : u : void 0;
|
|
4207
4226
|
if (!(m != null && m.fill) && !(m != null && m.line))
|
|
4208
4227
|
return;
|
|
4209
|
-
const p = i.getSource(
|
|
4228
|
+
const p = i.getSource(at);
|
|
4210
4229
|
if (p)
|
|
4211
|
-
p.setData(a ??
|
|
4230
|
+
p.setData(a ?? Ke([]));
|
|
4212
4231
|
else if (a)
|
|
4213
|
-
i.addSource(
|
|
4232
|
+
i.addSource(at, {
|
|
4214
4233
|
type: "geojson",
|
|
4215
4234
|
data: a
|
|
4216
4235
|
});
|
|
4217
4236
|
else
|
|
4218
4237
|
return;
|
|
4219
|
-
!i.getLayer(
|
|
4238
|
+
!i.getLayer(Ai) && (m != null && m.fill) && i.addLayer({
|
|
4220
4239
|
...m == null ? void 0 : m.fill,
|
|
4221
|
-
id:
|
|
4240
|
+
id: Ai,
|
|
4222
4241
|
type: "fill",
|
|
4223
|
-
source:
|
|
4224
|
-
}), !i.getLayer(
|
|
4242
|
+
source: at
|
|
4243
|
+
}), !i.getLayer(Wi) && (m != null && m.line) && i.addLayer({
|
|
4225
4244
|
...m == null ? void 0 : m.line,
|
|
4226
|
-
id:
|
|
4245
|
+
id: Wi,
|
|
4227
4246
|
type: "line",
|
|
4228
|
-
source:
|
|
4247
|
+
source: at
|
|
4229
4248
|
});
|
|
4230
4249
|
}
|
|
4231
|
-
function
|
|
4250
|
+
function g(m) {
|
|
4232
4251
|
a = m, d();
|
|
4233
4252
|
}
|
|
4234
4253
|
i.on("styledata", () => {
|
|
@@ -4237,7 +4256,7 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4237
4256
|
});
|
|
4238
4257
|
});
|
|
4239
4258
|
const v = (m) => {
|
|
4240
|
-
|
|
4259
|
+
s == null || s({
|
|
4241
4260
|
type: "mapClick",
|
|
4242
4261
|
coordinates: [m.lngLat.lng, m.lngLat.lat]
|
|
4243
4262
|
});
|
|
@@ -4246,14 +4265,14 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4246
4265
|
if (!e)
|
|
4247
4266
|
throw new Error();
|
|
4248
4267
|
const p = document.createElement("div");
|
|
4249
|
-
return m && p.classList.add("marker-interactive"), new
|
|
4268
|
+
return m && p.classList.add("marker-interactive"), new sr({
|
|
4250
4269
|
props: { displayIn: "maplibre" },
|
|
4251
4270
|
target: p
|
|
4252
4271
|
}), new e.Marker({ element: p, offset: [1, -13] });
|
|
4253
4272
|
}
|
|
4254
4273
|
return {
|
|
4255
4274
|
setEventHandler(m) {
|
|
4256
|
-
m ? (
|
|
4275
|
+
m ? (s = m, i.on("click", v)) : (s = void 0, i.off("click", v));
|
|
4257
4276
|
},
|
|
4258
4277
|
flyTo(m, p) {
|
|
4259
4278
|
i.flyTo({ center: m, ...p ? { zoom: p } : {}, ...r });
|
|
@@ -4264,7 +4283,7 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4264
4283
|
[m[0], m[1]],
|
|
4265
4284
|
[m[2], m[3]]
|
|
4266
4285
|
],
|
|
4267
|
-
{ padding: p, ...b ? { maxZoom: b } : {}, ...
|
|
4286
|
+
{ padding: p, ...b ? { maxZoom: b } : {}, ...o }
|
|
4268
4287
|
);
|
|
4269
4288
|
},
|
|
4270
4289
|
indicateReverse(m) {
|
|
@@ -4276,7 +4295,7 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4276
4295
|
setFeatures(m, p, b) {
|
|
4277
4296
|
for (const _ of c)
|
|
4278
4297
|
_.remove();
|
|
4279
|
-
if (c.length = 0,
|
|
4298
|
+
if (c.length = 0, g(void 0), !!e) {
|
|
4280
4299
|
e: if (p) {
|
|
4281
4300
|
let _ = !1;
|
|
4282
4301
|
if (p.geometry.type === "GeometryCollection") {
|
|
@@ -4284,23 +4303,23 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4284
4303
|
(N) => N.type === "Polygon" || N.type === "MultiPolygon"
|
|
4285
4304
|
);
|
|
4286
4305
|
t: if (L.length > 0) {
|
|
4287
|
-
const N =
|
|
4288
|
-
|
|
4306
|
+
const N = Ki(
|
|
4307
|
+
Ke(L.map((x) => Ye(x)))
|
|
4289
4308
|
);
|
|
4290
4309
|
if (!N)
|
|
4291
4310
|
break t;
|
|
4292
|
-
|
|
4311
|
+
Oi(
|
|
4293
4312
|
{
|
|
4294
4313
|
...p,
|
|
4295
4314
|
geometry: N.geometry
|
|
4296
4315
|
},
|
|
4297
|
-
|
|
4316
|
+
g
|
|
4298
4317
|
), _ = !0;
|
|
4299
4318
|
} else {
|
|
4300
4319
|
const N = p.geometry.geometries.filter(
|
|
4301
4320
|
(x) => x.type === "LineString" || x.type === "MultiLineString"
|
|
4302
4321
|
);
|
|
4303
|
-
N.length > 0 && (
|
|
4322
|
+
N.length > 0 && (g({
|
|
4304
4323
|
...p,
|
|
4305
4324
|
geometry: { type: "GeometryCollection", geometries: N }
|
|
4306
4325
|
}), _ = !0);
|
|
@@ -4308,9 +4327,9 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4308
4327
|
}
|
|
4309
4328
|
if (!_) {
|
|
4310
4329
|
if (p.geometry.type === "Polygon" || p.geometry.type === "MultiPolygon")
|
|
4311
|
-
|
|
4330
|
+
Oi(p, g);
|
|
4312
4331
|
else if (p.geometry.type === "LineString" || p.geometry.type === "MultiLineString") {
|
|
4313
|
-
|
|
4332
|
+
g(p);
|
|
4314
4333
|
break e;
|
|
4315
4334
|
}
|
|
4316
4335
|
}
|
|
@@ -4344,11 +4363,11 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4344
4363
|
).addTo(i);
|
|
4345
4364
|
const N = L.getElement();
|
|
4346
4365
|
N.addEventListener("click", (x) => {
|
|
4347
|
-
x.stopPropagation(),
|
|
4366
|
+
x.stopPropagation(), s == null || s({ type: "markerClick", id: _.id });
|
|
4348
4367
|
}), N.addEventListener("mouseenter", () => {
|
|
4349
|
-
|
|
4368
|
+
s == null || s({ type: "markerMouseEnter", id: _.id }), L.togglePopup();
|
|
4350
4369
|
}), N.addEventListener("mouseleave", () => {
|
|
4351
|
-
|
|
4370
|
+
s == null || s({ type: "markerMouseLeave", id: _.id }), L.togglePopup();
|
|
4352
4371
|
}), c.push(L);
|
|
4353
4372
|
}
|
|
4354
4373
|
}
|
|
@@ -4362,78 +4381,78 @@ function us(i, e, t = !0, n = !0, r = {}, s = {}, u = Pi) {
|
|
|
4362
4381
|
}
|
|
4363
4382
|
};
|
|
4364
4383
|
}
|
|
4365
|
-
function
|
|
4384
|
+
function go(i, e, t) {
|
|
4366
4385
|
var v, E;
|
|
4367
4386
|
class n {
|
|
4368
4387
|
constructor(p, b) {
|
|
4369
|
-
|
|
4370
|
-
|
|
4388
|
+
te(this, "type");
|
|
4389
|
+
te(this, "target");
|
|
4371
4390
|
this.type = b, this.target = p;
|
|
4372
4391
|
}
|
|
4373
4392
|
}
|
|
4374
4393
|
class r extends n {
|
|
4375
4394
|
constructor(b, _) {
|
|
4376
4395
|
super(b, "select");
|
|
4377
|
-
|
|
4396
|
+
te(this, "feature");
|
|
4378
4397
|
Object.assign(this, _);
|
|
4379
4398
|
}
|
|
4380
4399
|
}
|
|
4381
|
-
class
|
|
4400
|
+
class o extends n {
|
|
4382
4401
|
constructor(b, _) {
|
|
4383
4402
|
super(b, "featureslisted");
|
|
4384
|
-
|
|
4403
|
+
te(this, "features");
|
|
4385
4404
|
this.features = _;
|
|
4386
4405
|
}
|
|
4387
4406
|
}
|
|
4388
4407
|
class u extends n {
|
|
4389
4408
|
constructor(b, _) {
|
|
4390
4409
|
super(b, "featuresmarked");
|
|
4391
|
-
|
|
4410
|
+
te(this, "features");
|
|
4392
4411
|
this.features = _;
|
|
4393
4412
|
}
|
|
4394
4413
|
}
|
|
4395
|
-
class
|
|
4414
|
+
class s extends n {
|
|
4396
4415
|
constructor(b, _) {
|
|
4397
4416
|
super(b, "optionsvisibilitychange");
|
|
4398
|
-
|
|
4417
|
+
te(this, "optionsVisible");
|
|
4399
4418
|
this.optionsVisible = _;
|
|
4400
4419
|
}
|
|
4401
4420
|
}
|
|
4402
4421
|
class c extends n {
|
|
4403
4422
|
constructor(b, _) {
|
|
4404
4423
|
super(b, "pick");
|
|
4405
|
-
|
|
4424
|
+
te(this, "feature");
|
|
4406
4425
|
this.feature = _;
|
|
4407
4426
|
}
|
|
4408
4427
|
}
|
|
4409
4428
|
class l extends n {
|
|
4410
4429
|
constructor(b, _) {
|
|
4411
4430
|
super(b, "querychange");
|
|
4412
|
-
|
|
4431
|
+
te(this, "query");
|
|
4413
4432
|
this.query = _;
|
|
4414
4433
|
}
|
|
4415
4434
|
}
|
|
4416
4435
|
class f extends n {
|
|
4417
4436
|
constructor(b, _, L) {
|
|
4418
4437
|
super(b, "response");
|
|
4419
|
-
|
|
4420
|
-
|
|
4438
|
+
te(this, "url");
|
|
4439
|
+
te(this, "featureCollection");
|
|
4421
4440
|
this.url = _, this.featureCollection = L;
|
|
4422
4441
|
}
|
|
4423
4442
|
}
|
|
4424
4443
|
class a extends n {
|
|
4425
4444
|
constructor(b, _) {
|
|
4426
4445
|
super(b, "reversetoggle");
|
|
4427
|
-
|
|
4446
|
+
te(this, "reverse");
|
|
4428
4447
|
this.reverse = _;
|
|
4429
4448
|
}
|
|
4430
4449
|
}
|
|
4431
4450
|
class d extends i {
|
|
4432
4451
|
constructor(b = {}) {
|
|
4433
4452
|
super();
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4453
|
+
Rt(this, v);
|
|
4454
|
+
Rt(this, E);
|
|
4455
|
+
Pt(this, E, b);
|
|
4437
4456
|
}
|
|
4438
4457
|
onAddInt(b) {
|
|
4439
4458
|
const _ = document.createElement("div");
|
|
@@ -4445,7 +4464,7 @@ function as(i, e, t) {
|
|
|
4445
4464
|
fullGeometryStyle: M,
|
|
4446
4465
|
...S
|
|
4447
4466
|
} = H(this, E), P = typeof x == "boolean" ? {} : x, k = {
|
|
4448
|
-
mapController:
|
|
4467
|
+
mapController: ho(
|
|
4449
4468
|
b,
|
|
4450
4469
|
e,
|
|
4451
4470
|
L,
|
|
@@ -4462,12 +4481,12 @@ function as(i, e, t) {
|
|
|
4462
4481
|
};
|
|
4463
4482
|
if (!k.apiKey)
|
|
4464
4483
|
throw new Error("no apiKey provided");
|
|
4465
|
-
return
|
|
4484
|
+
return Pt(this, v, new Tr({ target: _, props: k })), H(this, v).$on("select", (C) => {
|
|
4466
4485
|
this.fire(new r(this, C.detail));
|
|
4467
4486
|
}), H(this, v).$on("pick", (C) => {
|
|
4468
4487
|
this.fire(new c(this, C.detail.feature));
|
|
4469
4488
|
}), H(this, v).$on("featureslisted", (C) => {
|
|
4470
|
-
this.fire(new
|
|
4489
|
+
this.fire(new o(this, C.detail.features));
|
|
4471
4490
|
}), H(this, v).$on("featuresmarked", (C) => {
|
|
4472
4491
|
this.fire(new u(this, C.detail.features));
|
|
4473
4492
|
}), H(this, v).$on("response", (C) => {
|
|
@@ -4480,7 +4499,7 @@ function as(i, e, t) {
|
|
|
4480
4499
|
);
|
|
4481
4500
|
}), H(this, v).$on("optionsvisibilitychange", (C) => {
|
|
4482
4501
|
this.fire(
|
|
4483
|
-
new
|
|
4502
|
+
new s(this, C.detail.optionsVisible)
|
|
4484
4503
|
);
|
|
4485
4504
|
}), H(this, v).$on("reversetoggle", (C) => {
|
|
4486
4505
|
this.fire(new a(this, C.detail.reverse));
|
|
@@ -4575,9 +4594,9 @@ function as(i, e, t) {
|
|
|
4575
4594
|
MapLibreBasedGeocodingControl: d,
|
|
4576
4595
|
events: {
|
|
4577
4596
|
SelectEvent: r,
|
|
4578
|
-
FeaturesListedEvent:
|
|
4597
|
+
FeaturesListedEvent: o,
|
|
4579
4598
|
FeaturesMarkedEvent: u,
|
|
4580
|
-
OptionsVisibilityChangeEvent:
|
|
4599
|
+
OptionsVisibilityChangeEvent: s,
|
|
4581
4600
|
PickEvent: c,
|
|
4582
4601
|
QueryChangeEvent: l,
|
|
4583
4602
|
ResponseEvent: f,
|
|
@@ -4585,35 +4604,35 @@ function as(i, e, t) {
|
|
|
4585
4604
|
}
|
|
4586
4605
|
};
|
|
4587
4606
|
}
|
|
4588
|
-
const { MapLibreBasedGeocodingControl:
|
|
4589
|
-
|
|
4590
|
-
|
|
4607
|
+
const { MapLibreBasedGeocodingControl: mo, events: Re } = go(
|
|
4608
|
+
ni.Evented,
|
|
4609
|
+
ni,
|
|
4591
4610
|
(i, e) => {
|
|
4592
4611
|
const t = {};
|
|
4593
4612
|
if (!("getSdkConfig" in i && typeof i.getSdkConfig == "function"))
|
|
4594
4613
|
throw new Error("MapTiler SDK not detected");
|
|
4595
4614
|
const { primaryLanguage: n, apiKey: r } = i.getSdkConfig();
|
|
4596
4615
|
t.apiKey = r;
|
|
4597
|
-
const
|
|
4598
|
-
return
|
|
4616
|
+
const o = /^([a-z]{2})($|_|-)/.exec(n);
|
|
4617
|
+
return o && (t.language = o[1]), e.className += " maptiler-ctrl", t;
|
|
4599
4618
|
}
|
|
4600
4619
|
);
|
|
4601
|
-
class
|
|
4620
|
+
class vo extends mo {
|
|
4602
4621
|
onAdd(e) {
|
|
4603
4622
|
return super.onAddInt(e);
|
|
4604
4623
|
}
|
|
4605
4624
|
}
|
|
4606
|
-
const
|
|
4625
|
+
const bo = Re.SelectEvent, _o = Re.FeaturesListedEvent, Eo = Re.FeaturesMarkedEvent, wo = Re.OptionsVisibilityChangeEvent, Lo = Re.PickEvent, So = Re.QueryChangeEvent, xo = Re.ResponseEvent, Mo = Re.ReverseToggleEvent;
|
|
4607
4626
|
export {
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4627
|
+
_o as FeaturesListedEvent,
|
|
4628
|
+
Eo as FeaturesMarkedEvent,
|
|
4629
|
+
vo as GeocodingControl,
|
|
4630
|
+
wo as OptionsVisibilityChangeEvent,
|
|
4631
|
+
Lo as PickEvent,
|
|
4632
|
+
So as QueryChangeEvent,
|
|
4633
|
+
xo as ResponseEvent,
|
|
4634
|
+
Mo as ReverseToggleEvent,
|
|
4635
|
+
bo as SelectEvent,
|
|
4636
|
+
ho as createMapLibreGlMapController
|
|
4618
4637
|
};
|
|
4619
4638
|
//# sourceMappingURL=maptilersdk.js.map
|