@maptiler/geocoding-control 2.1.4-rc1 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MapLibreBasedGeocodingControl.d.ts +51 -34
- package/leaflet-controller.js +1 -1
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +1 -1
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.js +161 -161
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +2 -2
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.js +29 -29
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +1 -1
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +51 -34
- package/maplibregl.js +1198 -1196
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +5 -5
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +51 -34
- package/maptilersdk.js +1199 -1197
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +5 -5
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers-controller.js +35 -35
- package/openlayers-controller.js.map +1 -1
- package/openlayers-controller.umd.js +1 -1
- package/openlayers-controller.umd.js.map +1 -1
- package/openlayers.js +3 -3
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -1
- package/openlayers.umd.js.map +1 -1
- package/package.json +15 -15
- package/react.js +2 -2
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +4 -2
- package/svelte/GeocodingControl.svelte.d.ts +1 -1
- package/svelte/MapLibreBasedGeocodingControl.d.ts +51 -34
- package/svelte/MapLibreBasedGeocodingControl.js +4 -0
- package/svelte/info.json +1 -1
- package/svelte/leaflet-controller.js +1 -1
- package/svelte/maplibregl-controller.js +1 -1
- package/svelte/maplibregl.d.ts +51 -34
- package/svelte/maptilersdk.d.ts +51 -34
- package/svelte/openlayers-controller.js +1 -1
- package/svelte/types.d.ts +1 -1
- package/types.d.ts +1 -1
- package/vanilla.js +2 -2
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/maptilersdk.js
CHANGED
|
@@ -3,8 +3,8 @@ var wi = (i) => {
|
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
5
|
var Un = (i, e, t) => e in i ? zn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var I = (i, e, t) => Un(i, typeof e != "symbol" ? e + "" : e, t), Ei = (i, e, t) => e.has(i) || wi("Cannot " + t);
|
|
7
|
+
var se = (i, e, t) => (Ei(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Ct = (i, e, t) => e.has(i) ? wi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), gt = (i, e, t, n) => (Ei(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
8
8
|
import * as Li from "@maptiler/sdk";
|
|
9
9
|
function ee() {
|
|
10
10
|
}
|
|
@@ -30,9 +30,9 @@ function en(i) {
|
|
|
30
30
|
function Qe(i, e) {
|
|
31
31
|
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
32
32
|
}
|
|
33
|
-
let
|
|
33
|
+
let Nt;
|
|
34
34
|
function me(i, e) {
|
|
35
|
-
return i === e ? !0 : (
|
|
35
|
+
return i === e ? !0 : (Nt || (Nt = document.createElement("a")), Nt.href = e, i === Nt.href);
|
|
36
36
|
}
|
|
37
37
|
function Fn(i) {
|
|
38
38
|
return Object.keys(i).length === 0;
|
|
@@ -64,7 +64,7 @@ function Vn(i) {
|
|
|
64
64
|
}
|
|
65
65
|
return -1;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Dt(i) {
|
|
68
68
|
return i ?? "";
|
|
69
69
|
}
|
|
70
70
|
function H(i, e) {
|
|
@@ -105,7 +105,7 @@ function x(i, e, t) {
|
|
|
105
105
|
function Qn(i) {
|
|
106
106
|
return Array.from(i.childNodes);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Lt(i, e) {
|
|
109
109
|
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
110
110
|
e);
|
|
111
111
|
}
|
|
@@ -118,13 +118,13 @@ function Be(i, e, t) {
|
|
|
118
118
|
function Xn(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
|
|
119
119
|
return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
|
|
120
120
|
}
|
|
121
|
-
let
|
|
122
|
-
function
|
|
123
|
-
|
|
121
|
+
let _t;
|
|
122
|
+
function Et(i) {
|
|
123
|
+
_t = i;
|
|
124
124
|
}
|
|
125
125
|
function nn() {
|
|
126
|
-
if (!
|
|
127
|
-
return
|
|
126
|
+
if (!_t) throw new Error("Function called outside component initialization");
|
|
127
|
+
return _t;
|
|
128
128
|
}
|
|
129
129
|
function Jn(i) {
|
|
130
130
|
nn().$$.on_destroy.push(i);
|
|
@@ -166,17 +166,17 @@ let lt = 0;
|
|
|
166
166
|
function sn() {
|
|
167
167
|
if (lt !== 0)
|
|
168
168
|
return;
|
|
169
|
-
const i =
|
|
169
|
+
const i = _t;
|
|
170
170
|
do {
|
|
171
171
|
try {
|
|
172
172
|
for (; lt < ut.length; ) {
|
|
173
173
|
const e = ut[lt];
|
|
174
|
-
lt++,
|
|
174
|
+
lt++, Et(e), ir(e.$$);
|
|
175
175
|
}
|
|
176
176
|
} catch (e) {
|
|
177
177
|
throw ut.length = 0, lt = 0, e;
|
|
178
178
|
}
|
|
179
|
-
for (
|
|
179
|
+
for (Et(null), ut.length = 0, lt = 0; ii.length; ) ii.pop()();
|
|
180
180
|
for (let e = 0; e < at.length; e += 1) {
|
|
181
181
|
const t = at[e];
|
|
182
182
|
$t.has(t) || ($t.add(t), t());
|
|
@@ -185,7 +185,7 @@ function sn() {
|
|
|
185
185
|
} while (ut.length);
|
|
186
186
|
for (; xi.length; )
|
|
187
187
|
xi.pop()();
|
|
188
|
-
ni = !1, $t.clear(),
|
|
188
|
+
ni = !1, $t.clear(), Et(i);
|
|
189
189
|
}
|
|
190
190
|
function ir(i) {
|
|
191
191
|
if (i.fragment !== null) {
|
|
@@ -198,9 +198,9 @@ function nr(i) {
|
|
|
198
198
|
const e = [], t = [];
|
|
199
199
|
at.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), at = e;
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const It = /* @__PURE__ */ new Set();
|
|
202
202
|
let rt;
|
|
203
|
-
function
|
|
203
|
+
function At() {
|
|
204
204
|
rt = {
|
|
205
205
|
r: 0,
|
|
206
206
|
c: [],
|
|
@@ -208,17 +208,17 @@ function Pt() {
|
|
|
208
208
|
// parent group
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function Bt() {
|
|
212
212
|
rt.r || je(rt.c), rt = rt.p;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
i && i.i && (
|
|
214
|
+
function le(i, e) {
|
|
215
|
+
i && i.i && (It.delete(i), i.i(e));
|
|
216
216
|
}
|
|
217
217
|
function he(i, e, t, n) {
|
|
218
218
|
if (i && i.o) {
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
if (It.has(i)) return;
|
|
220
|
+
It.add(i), rt.c.push(() => {
|
|
221
|
+
It.delete(i), n && (t && i.d(1), n());
|
|
222
222
|
}), i.o(e);
|
|
223
223
|
} else n && n();
|
|
224
224
|
}
|
|
@@ -230,30 +230,30 @@ function rr(i, e) {
|
|
|
230
230
|
e.delete(i.key);
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
|
-
function sr(i, e, t, n, r, u, h, o, g,
|
|
234
|
-
let
|
|
235
|
-
const
|
|
236
|
-
for (; O--; )
|
|
237
|
-
const M = [], k = /* @__PURE__ */ new Map(),
|
|
233
|
+
function sr(i, e, t, n, r, u, h, o, g, f, w, _) {
|
|
234
|
+
let N = i.length, R = u.length, O = N;
|
|
235
|
+
const W = {};
|
|
236
|
+
for (; O--; ) W[i[O].key] = O;
|
|
237
|
+
const M = [], k = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), C = [];
|
|
238
238
|
for (O = R; O--; ) {
|
|
239
|
-
const
|
|
239
|
+
const A = _(r, u, O), s = t(A);
|
|
240
240
|
let l = h.get(s);
|
|
241
|
-
l ?
|
|
241
|
+
l ? C.push(() => l.p(A, e)) : (l = f(s, A), l.c()), k.set(s, M[O] = l), s in W && S.set(s, Math.abs(O - W[s]));
|
|
242
242
|
}
|
|
243
|
-
const
|
|
244
|
-
function
|
|
245
|
-
|
|
243
|
+
const P = /* @__PURE__ */ new Set(), z = /* @__PURE__ */ new Set();
|
|
244
|
+
function q(A) {
|
|
245
|
+
le(A, 1), A.m(o, w), h.set(A.key, A), w = A.first, R--;
|
|
246
246
|
}
|
|
247
|
-
for (;
|
|
248
|
-
const
|
|
249
|
-
|
|
247
|
+
for (; N && R; ) {
|
|
248
|
+
const A = M[R - 1], s = i[N - 1], l = A.key, a = s.key;
|
|
249
|
+
A === s ? (w = A.first, N--, R--) : k.has(a) ? !h.has(l) || P.has(l) ? q(A) : z.has(a) ? N-- : S.get(l) > S.get(a) ? (z.add(l), q(A)) : (P.add(a), N--) : (g(s, h), N--);
|
|
250
250
|
}
|
|
251
|
-
for (;
|
|
252
|
-
const
|
|
253
|
-
k.has(
|
|
251
|
+
for (; N--; ) {
|
|
252
|
+
const A = i[N];
|
|
253
|
+
k.has(A.key) || g(A, h);
|
|
254
254
|
}
|
|
255
|
-
for (; R; )
|
|
256
|
-
return je(
|
|
255
|
+
for (; R; ) q(M[R - 1]);
|
|
256
|
+
return je(C), M;
|
|
257
257
|
}
|
|
258
258
|
function Ye(i) {
|
|
259
259
|
i && i.c();
|
|
@@ -273,9 +273,9 @@ function or(i, e) {
|
|
|
273
273
|
i.$$.dirty[0] === -1 && (ut.push(i), tr(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
274
274
|
}
|
|
275
275
|
function Xe(i, e, t, n, r, u, h = null, o = [-1]) {
|
|
276
|
-
const g =
|
|
277
|
-
|
|
278
|
-
const
|
|
276
|
+
const g = _t;
|
|
277
|
+
Et(i);
|
|
278
|
+
const f = i.$$ = {
|
|
279
279
|
fragment: null,
|
|
280
280
|
ctx: [],
|
|
281
281
|
// state
|
|
@@ -296,20 +296,20 @@ function Xe(i, e, t, n, r, u, h = null, o = [-1]) {
|
|
|
296
296
|
skip_bound: !1,
|
|
297
297
|
root: e.target || g.$$.root
|
|
298
298
|
};
|
|
299
|
-
h && h(
|
|
300
|
-
let
|
|
301
|
-
if (
|
|
302
|
-
const O = R.length ? R[0] :
|
|
303
|
-
return
|
|
304
|
-
}) : [],
|
|
299
|
+
h && h(f.root);
|
|
300
|
+
let w = !1;
|
|
301
|
+
if (f.ctx = t ? t(i, e.props || {}, (_, N, ...R) => {
|
|
302
|
+
const O = R.length ? R[0] : N;
|
|
303
|
+
return f.ctx && r(f.ctx[_], f.ctx[_] = O) && (!f.skip_bound && f.bound[_] && f.bound[_](O), w && or(i, _)), N;
|
|
304
|
+
}) : [], f.update(), w = !0, je(f.before_update), f.fragment = n ? n(f.ctx) : !1, e.target) {
|
|
305
305
|
if (e.hydrate) {
|
|
306
|
-
const
|
|
307
|
-
|
|
306
|
+
const _ = Qn(e.target);
|
|
307
|
+
f.fragment && f.fragment.l(_), _.forEach($);
|
|
308
308
|
} else
|
|
309
|
-
|
|
310
|
-
e.intro &&
|
|
309
|
+
f.fragment && f.fragment.c();
|
|
310
|
+
e.intro && le(i.$$.fragment), Ue(i, e.target, e.anchor), sn();
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
Et(g);
|
|
313
313
|
}
|
|
314
314
|
class Je {
|
|
315
315
|
constructor() {
|
|
@@ -320,7 +320,7 @@ class Je {
|
|
|
320
320
|
*
|
|
321
321
|
* @type {any}
|
|
322
322
|
*/
|
|
323
|
-
|
|
323
|
+
I(this, "$$");
|
|
324
324
|
/**
|
|
325
325
|
* ### PRIVATE API
|
|
326
326
|
*
|
|
@@ -328,7 +328,7 @@ class Je {
|
|
|
328
328
|
*
|
|
329
329
|
* @type {any}
|
|
330
330
|
*/
|
|
331
|
-
|
|
331
|
+
I(this, "$$set");
|
|
332
332
|
}
|
|
333
333
|
/** @returns {void} */
|
|
334
334
|
$destroy() {
|
|
@@ -809,7 +809,7 @@ function Mi(i) {
|
|
|
809
809
|
},
|
|
810
810
|
p(n, r) {
|
|
811
811
|
r & /*placeType*/
|
|
812
|
-
128 &&
|
|
812
|
+
128 && Lt(
|
|
813
813
|
t,
|
|
814
814
|
/*placeType*/
|
|
815
815
|
n[7]
|
|
@@ -821,7 +821,7 @@ function Mi(i) {
|
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
823
|
function br(i) {
|
|
824
|
-
let e, t, n, r, u, h, o, g,
|
|
824
|
+
let e, t, n, r, u, h, o, g, f, w = (
|
|
825
825
|
/*isReverse*/
|
|
826
826
|
(i[8] ? (
|
|
827
827
|
/*feature*/
|
|
@@ -830,7 +830,7 @@ function br(i) {
|
|
|
830
830
|
/*feature*/
|
|
831
831
|
i[0].place_name.replace(/,.*/, "")
|
|
832
832
|
)) + ""
|
|
833
|
-
),
|
|
833
|
+
), _, N, R = (
|
|
834
834
|
/*showPlaceType*/
|
|
835
835
|
i[2] === "always" || /*showPlaceType*/
|
|
836
836
|
i[2] !== "never" && !/*feature*/
|
|
@@ -841,18 +841,18 @@ function br(i) {
|
|
|
841
841
|
i[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
842
842
|
i[5]) && !/*isReverse*/
|
|
843
843
|
i[8]
|
|
844
|
-
), O,
|
|
844
|
+
), O, W, M = (
|
|
845
845
|
/*isReverse*/
|
|
846
846
|
(i[8] ? "" : (
|
|
847
847
|
/*feature*/
|
|
848
848
|
i[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
849
849
|
)) + ""
|
|
850
|
-
), k,
|
|
851
|
-
function
|
|
852
|
-
return
|
|
853
|
-
1 && (t = null),
|
|
854
|
-
1 && (n = null),
|
|
855
|
-
1 && (r = null),
|
|
850
|
+
), k, S, C, P, z, q;
|
|
851
|
+
function A(m, c) {
|
|
852
|
+
return c & /*feature*/
|
|
853
|
+
1 && (t = null), c & /*feature*/
|
|
854
|
+
1 && (n = null), c & /*feature*/
|
|
855
|
+
1 && (r = null), c & /*feature*/
|
|
856
856
|
1 && (u = null), Ne && /*spriteIcon*/
|
|
857
857
|
m[6] ? vr : (
|
|
858
858
|
/*imageUrl*/
|
|
@@ -869,18 +869,18 @@ function br(i) {
|
|
|
869
869
|
)
|
|
870
870
|
);
|
|
871
871
|
}
|
|
872
|
-
let s =
|
|
872
|
+
let s = A(i, -1), l = s(i), a = R && Mi(i);
|
|
873
873
|
return {
|
|
874
874
|
c() {
|
|
875
|
-
e = X("li"), l.c(), h = Ee(), o = X("span"), g = X("span"),
|
|
876
|
-
i[1] === "selected"), x(e, "aria-checked",
|
|
877
|
-
i[1] === "picked"), x(e, "class",
|
|
875
|
+
e = X("li"), l.c(), h = Ee(), o = X("span"), g = X("span"), f = X("span"), _ = Ke(w), N = Ee(), a && a.c(), O = Ee(), W = X("span"), k = Ke(M), x(f, "class", "primary svelte-w9y5n9"), x(g, "class", "svelte-w9y5n9"), x(W, "class", "line2 svelte-w9y5n9"), x(o, "class", "texts svelte-w9y5n9"), x(e, "tabindex", "-1"), x(e, "role", "option"), x(e, "aria-selected", S = /*style*/
|
|
876
|
+
i[1] === "selected"), x(e, "aria-checked", C = /*style*/
|
|
877
|
+
i[1] === "picked"), x(e, "class", P = Dt(
|
|
878
878
|
/*style*/
|
|
879
879
|
i[1]
|
|
880
880
|
) + " svelte-w9y5n9");
|
|
881
881
|
},
|
|
882
|
-
m(m,
|
|
883
|
-
te(m, e,
|
|
882
|
+
m(m, c) {
|
|
883
|
+
te(m, e, c), l.m(e, null), H(e, h), H(e, o), H(o, g), H(g, f), H(f, _), H(g, N), a && a.m(g, null), H(o, O), H(o, W), H(W, k), z || (q = [
|
|
884
884
|
ce(
|
|
885
885
|
e,
|
|
886
886
|
"mouseenter",
|
|
@@ -899,18 +899,18 @@ function br(i) {
|
|
|
899
899
|
/*click_handler*/
|
|
900
900
|
i[16]
|
|
901
901
|
)
|
|
902
|
-
],
|
|
902
|
+
], z = !0);
|
|
903
903
|
},
|
|
904
|
-
p(m, [
|
|
905
|
-
s === (s =
|
|
906
|
-
257 &&
|
|
904
|
+
p(m, [c]) {
|
|
905
|
+
s === (s = A(m, c)) && l ? l.p(m, c) : (l.d(1), l = s(m), l && (l.c(), l.m(e, h))), c & /*isReverse, feature*/
|
|
906
|
+
257 && w !== (w = /*isReverse*/
|
|
907
907
|
(m[8] ? (
|
|
908
908
|
/*feature*/
|
|
909
909
|
m[0].place_name
|
|
910
910
|
) : (
|
|
911
911
|
/*feature*/
|
|
912
912
|
m[0].place_name.replace(/,.*/, "")
|
|
913
|
-
)) + "") &&
|
|
913
|
+
)) + "") && Lt(_, w), c & /*showPlaceType, feature, imageUrl, isReverse*/
|
|
914
914
|
293 && (R = /*showPlaceType*/
|
|
915
915
|
m[2] === "always" || /*showPlaceType*/
|
|
916
916
|
m[2] !== "never" && !/*feature*/
|
|
@@ -920,87 +920,87 @@ function br(i) {
|
|
|
920
920
|
m[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
921
921
|
m[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
922
922
|
m[5]) && !/*isReverse*/
|
|
923
|
-
m[8]), R ?
|
|
923
|
+
m[8]), R ? a ? a.p(m, c) : (a = Mi(m), a.c(), a.m(g, null)) : a && (a.d(1), a = null), c & /*isReverse, feature*/
|
|
924
924
|
257 && M !== (M = /*isReverse*/
|
|
925
925
|
(m[8] ? "" : (
|
|
926
926
|
/*feature*/
|
|
927
927
|
m[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
928
|
-
)) + "") &&
|
|
929
|
-
2 &&
|
|
930
|
-
m[1] === "selected") && x(e, "aria-selected",
|
|
931
|
-
2 &&
|
|
932
|
-
m[1] === "picked") && x(e, "aria-checked",
|
|
933
|
-
2 &&
|
|
928
|
+
)) + "") && Lt(k, M), c & /*style*/
|
|
929
|
+
2 && S !== (S = /*style*/
|
|
930
|
+
m[1] === "selected") && x(e, "aria-selected", S), c & /*style*/
|
|
931
|
+
2 && C !== (C = /*style*/
|
|
932
|
+
m[1] === "picked") && x(e, "aria-checked", C), c & /*style*/
|
|
933
|
+
2 && P !== (P = Dt(
|
|
934
934
|
/*style*/
|
|
935
935
|
m[1]
|
|
936
|
-
) + " svelte-w9y5n9") && x(e, "class",
|
|
936
|
+
) + " svelte-w9y5n9") && x(e, "class", P);
|
|
937
937
|
},
|
|
938
938
|
i: ee,
|
|
939
939
|
o: ee,
|
|
940
940
|
d(m) {
|
|
941
|
-
m && $(e), l.d(),
|
|
941
|
+
m && $(e), l.d(), a && a.d(), z = !1, je(q);
|
|
942
942
|
}
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
945
|
const un = typeof devicePixelRatio > "u" ? 1 : devicePixelRatio > 1.25, si = un ? "@2x" : "", _e = un ? 2 : 1;
|
|
946
|
-
let Ne,
|
|
946
|
+
let Ne, kt;
|
|
947
947
|
function wr(i, e, t) {
|
|
948
|
-
let n, r, u, { feature: h } = e, { style: o = "default" } = e, { showPlaceType: g } = e, { missingIconsCache:
|
|
949
|
-
const
|
|
950
|
-
let
|
|
948
|
+
let n, r, u, { feature: h } = e, { style: o = "default" } = e, { showPlaceType: g } = e, { missingIconsCache: f } = e, { iconsBaseUrl: w } = e;
|
|
949
|
+
const _ = rn();
|
|
950
|
+
let N, R, O, W;
|
|
951
951
|
function M() {
|
|
952
|
-
|
|
952
|
+
kt ?? (kt = fetch(`${w}sprite${si}.json`).then((s) => s.json()).then((s) => {
|
|
953
953
|
Ne = s;
|
|
954
954
|
}).catch(() => {
|
|
955
955
|
Ne = null;
|
|
956
956
|
}));
|
|
957
957
|
}
|
|
958
958
|
function k() {
|
|
959
|
-
R &&
|
|
959
|
+
R && f.add(R), S();
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
Ne !== void 0 ?
|
|
961
|
+
function S() {
|
|
962
|
+
Ne !== void 0 ? C() : (M(), kt == null || kt.then(C));
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function C() {
|
|
965
965
|
do {
|
|
966
|
-
if (
|
|
966
|
+
if (W--, t(4, N = n == null ? void 0 : n[W]), t(6, O = N ? Ne == null ? void 0 : Ne.icons[N] : void 0), O)
|
|
967
967
|
break;
|
|
968
|
-
t(5, R =
|
|
969
|
-
} while (
|
|
968
|
+
t(5, R = N ? w + N.replace(/ /g, "_") + ".svg" : void 0);
|
|
969
|
+
} while (W > -1 && (!R || f.has(R)));
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function P(s) {
|
|
972
972
|
$n.call(this, i, s);
|
|
973
973
|
}
|
|
974
|
-
const
|
|
975
|
-
document.activeElement !== s.target &&
|
|
974
|
+
const z = () => k(), q = () => _("select", void 0), A = (s) => {
|
|
975
|
+
document.activeElement !== s.target && _("select", void 0);
|
|
976
976
|
};
|
|
977
977
|
return i.$$set = (s) => {
|
|
978
|
-
"feature" in s && t(0, h = s.feature), "style" in s && t(1, o = s.style), "showPlaceType" in s && t(2, g = s.showPlaceType), "missingIconsCache" in s && t(11,
|
|
978
|
+
"feature" in s && t(0, h = s.feature), "style" in s && t(1, o = s.style), "showPlaceType" in s && t(2, g = s.showPlaceType), "missingIconsCache" in s && t(11, f = s.missingIconsCache), "iconsBaseUrl" in s && t(3, w = s.iconsBaseUrl);
|
|
979
979
|
}, i.$$.update = () => {
|
|
980
|
-
var s, l,
|
|
980
|
+
var s, l, a, m, c;
|
|
981
981
|
i.$$.dirty & /*feature*/
|
|
982
982
|
1 && t(12, n = (s = h.properties) == null ? void 0 : s.categories), i.$$.dirty & /*feature*/
|
|
983
983
|
1 && t(8, r = h.place_type[0] === "reverse"), i.$$.dirty & /*feature*/
|
|
984
|
-
1 && t(7, u = ((
|
|
985
|
-
4096 && (
|
|
984
|
+
1 && t(7, u = ((a = (l = h.properties) == null ? void 0 : l.categories) == null ? void 0 : a.join(", ")) ?? ((c = (m = h.properties) == null ? void 0 : m.place_type_name) == null ? void 0 : c[0]) ?? h.place_type[0]), i.$$.dirty & /*categories*/
|
|
985
|
+
4096 && (W = (n == null ? void 0 : n.length) ?? 0, S());
|
|
986
986
|
}, [
|
|
987
987
|
h,
|
|
988
988
|
o,
|
|
989
989
|
g,
|
|
990
|
-
|
|
991
|
-
|
|
990
|
+
w,
|
|
991
|
+
N,
|
|
992
992
|
R,
|
|
993
993
|
O,
|
|
994
994
|
u,
|
|
995
995
|
r,
|
|
996
|
-
|
|
996
|
+
_,
|
|
997
997
|
k,
|
|
998
|
-
|
|
998
|
+
f,
|
|
999
999
|
n,
|
|
1000
|
-
|
|
1001
|
-
q,
|
|
1000
|
+
P,
|
|
1002
1001
|
z,
|
|
1003
|
-
|
|
1002
|
+
q,
|
|
1003
|
+
A
|
|
1004
1004
|
];
|
|
1005
1005
|
}
|
|
1006
1006
|
class Er extends Je {
|
|
@@ -1139,11 +1139,11 @@ function Or(i, e, t) {
|
|
|
1139
1139
|
const n = e[1], r = e[0], u = n - r;
|
|
1140
1140
|
return i === n && t ? i : ((i - r) % u + u) % u + r;
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function zt(i) {
|
|
1143
1143
|
const e = [...i];
|
|
1144
1144
|
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;
|
|
1145
1145
|
}
|
|
1146
|
-
let
|
|
1146
|
+
let mt;
|
|
1147
1147
|
async function Rr(i, e, t) {
|
|
1148
1148
|
const n = i == null ? void 0 : i.getCenterAndZoom();
|
|
1149
1149
|
for (const r of e ?? [])
|
|
@@ -1151,10 +1151,10 @@ async function Rr(i, e, t) {
|
|
|
1151
1151
|
if (r.type === "fixed")
|
|
1152
1152
|
return r.coordinates.join(",");
|
|
1153
1153
|
e: if (r.type === "client-geolocation") {
|
|
1154
|
-
if (
|
|
1155
|
-
if (!
|
|
1154
|
+
if (mt && r.cachedLocationExpiry && mt.time + r.cachedLocationExpiry > Date.now()) {
|
|
1155
|
+
if (!mt.coords)
|
|
1156
1156
|
break e;
|
|
1157
|
-
return
|
|
1157
|
+
return mt.coords;
|
|
1158
1158
|
}
|
|
1159
1159
|
let u;
|
|
1160
1160
|
try {
|
|
@@ -1164,7 +1164,7 @@ async function Rr(i, e, t) {
|
|
|
1164
1164
|
}), navigator.geolocation.getCurrentPosition(
|
|
1165
1165
|
(g) => {
|
|
1166
1166
|
h(
|
|
1167
|
-
[g.coords.longitude, g.coords.latitude].map((
|
|
1167
|
+
[g.coords.longitude, g.coords.latitude].map((f) => f.toFixed(6)).join(",")
|
|
1168
1168
|
);
|
|
1169
1169
|
},
|
|
1170
1170
|
(g) => {
|
|
@@ -1175,7 +1175,7 @@ async function Rr(i, e, t) {
|
|
|
1175
1175
|
}), u;
|
|
1176
1176
|
} catch {
|
|
1177
1177
|
} finally {
|
|
1178
|
-
r.cachedLocationExpiry && (
|
|
1178
|
+
r.cachedLocationExpiry && (mt = {
|
|
1179
1179
|
time: Date.now(),
|
|
1180
1180
|
coords: u
|
|
1181
1181
|
});
|
|
@@ -1197,16 +1197,16 @@ function Ir(i) {
|
|
|
1197
1197
|
const e = this.decimalCoordinates.split(",").map((R) => Number(R.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), u = Math.abs(n), h = t > 0 ? "N" : "S", o = n > 0 ? "E" : "W";
|
|
1198
1198
|
let g;
|
|
1199
1199
|
i == "DD" && (g = `${r}° ${h}, ${u}° ${o}`);
|
|
1200
|
-
const
|
|
1200
|
+
const f = Math.floor(r), w = Math.floor(u), _ = (r - f) * 60, N = (u - w) * 60;
|
|
1201
1201
|
if (i == "DM") {
|
|
1202
|
-
let R = Pi(
|
|
1203
|
-
R.endsWith(".000") && O.endsWith(".000") && (R = R.replace(/\.000$/, ""), O = O.replace(/\.000$/, "")), g = `${
|
|
1202
|
+
let R = Pi(_, 3).toFixed(3).padStart(6, "0"), O = Pi(N, 3).toFixed(3).padStart(6, "0");
|
|
1203
|
+
R.endsWith(".000") && O.endsWith(".000") && (R = R.replace(/\.000$/, ""), O = O.replace(/\.000$/, "")), g = `${f}° ${R}' ${h}, ${w}° ${O}' ${o}`;
|
|
1204
1204
|
}
|
|
1205
1205
|
if (i == "DMS") {
|
|
1206
|
-
const R = Math.floor(
|
|
1207
|
-
let
|
|
1208
|
-
const k = R.toString().padStart(2, "0"),
|
|
1209
|
-
|
|
1206
|
+
const R = Math.floor(_), O = Math.floor(N);
|
|
1207
|
+
let W = ((_ - R) * 60).toFixed(1).padStart(4, "0"), M = ((N - O) * 60).toFixed(1).padStart(4, "0");
|
|
1208
|
+
const k = R.toString().padStart(2, "0"), S = O.toString().padStart(2, "0");
|
|
1209
|
+
W.endsWith(".0") && M.endsWith(".0") && (W = W.replace(/\.0$/, ""), M = M.replace(/\.0$/, "")), g = `${f}° ${k}' ${W}" ${h}, ${w}° ${S}' ${M}" ${o}`;
|
|
1210
1210
|
}
|
|
1211
1211
|
return g;
|
|
1212
1212
|
} else
|
|
@@ -1222,12 +1222,12 @@ function fi(i, e) {
|
|
|
1222
1222
|
if (Pr.test(i))
|
|
1223
1223
|
throw new Error("invalid coordinate value");
|
|
1224
1224
|
if (Ci.test(i))
|
|
1225
|
-
if (o = Ci.exec(i), g =
|
|
1225
|
+
if (o = Ci.exec(i), g = pt(o), g)
|
|
1226
1226
|
t = Math.abs(o[1]) + o[2] / 60, Number(o[1]) < 0 && (t *= -1), n = Math.abs(o[3]) + o[4] / 60, Number(o[3]) < 0 && (n *= -1), h = "DM";
|
|
1227
1227
|
else
|
|
1228
1228
|
throw new Error("invalid coordinate format");
|
|
1229
1229
|
else if (Ni.test(i))
|
|
1230
|
-
if (o = Ni.exec(i), g =
|
|
1230
|
+
if (o = Ni.exec(i), g = pt(o), g) {
|
|
1231
1231
|
if (t = o[2], n = o[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), h = "DD", Number(Math.round(t)) == Number(t))
|
|
1232
1232
|
throw new Error("integer only coordinate provided");
|
|
1233
1233
|
if (Number(Math.round(n)) == Number(n))
|
|
@@ -1236,17 +1236,17 @@ function fi(i, e) {
|
|
|
1236
1236
|
} else
|
|
1237
1237
|
throw new Error("invalid decimal coordinate format");
|
|
1238
1238
|
else if (ki.test(i))
|
|
1239
|
-
if (o = ki.exec(i), g =
|
|
1239
|
+
if (o = ki.exec(i), g = pt(o), g)
|
|
1240
1240
|
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, h = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, h = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[9])), o[11] && (n += o[11] / 60), o[13] && (n += o[13].replace(",", ".") / 3600), parseInt(o[9]) < 0 && (n = -1 * n), o[1] ? (r = o[1], u = o[8]) : o[7] && (r = o[7], u = o[14]);
|
|
1241
1241
|
else
|
|
1242
1242
|
throw new Error("invalid DMS coordinates format");
|
|
1243
1243
|
else if (Oi.test(i))
|
|
1244
|
-
if (o = Oi.exec(i), g =
|
|
1244
|
+
if (o = Oi.exec(i), g = pt(o), g)
|
|
1245
1245
|
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, h = "DM"), o[6] && (t += o[6] / 3600, h = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12] / 60), o[14] && (n += o[14] / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], u = o[9]) : o[8] && (r = o[8], u = o[16]);
|
|
1246
1246
|
else
|
|
1247
1247
|
throw new Error("invalid DMS coordinates format");
|
|
1248
1248
|
else if (Ri.test(i)) {
|
|
1249
|
-
if (o = Ri.exec(i), g =
|
|
1249
|
+
if (o = Ri.exec(i), g = pt(o), o.filter((f) => f).length <= 5)
|
|
1250
1250
|
throw new Error("invalid coordinates format");
|
|
1251
1251
|
if (g)
|
|
1252
1252
|
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4].replace(",", ".") / 60, h = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, h = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12].replace(",", ".") / 60), o[14] && (n += o[14].replace(",", ".") / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], u = o[9]) : o[8] && (r = o[8], u = o[16]);
|
|
@@ -1263,39 +1263,39 @@ function fi(i, e) {
|
|
|
1263
1263
|
if (r && r == u)
|
|
1264
1264
|
throw new Error("invalid coordinates format");
|
|
1265
1265
|
t.toString().includes(",") && (t = t.replace(",", ".")), n.toString().includes(",") && (n = n.replace(",", "."));
|
|
1266
|
-
let
|
|
1267
|
-
|
|
1268
|
-
const
|
|
1269
|
-
let
|
|
1270
|
-
const R = /[,/;\u0020]/g, O =
|
|
1266
|
+
let f = /S|SOUTH/i;
|
|
1267
|
+
f.test(r) && t > 0 && (t = -1 * t), f = /W|WEST/i, f.test(u) && n > 0 && (n = -1 * n);
|
|
1268
|
+
const w = o[0].trim();
|
|
1269
|
+
let _, N;
|
|
1270
|
+
const R = /[,/;\u0020]/g, O = w.match(R);
|
|
1271
1271
|
if (O == null) {
|
|
1272
1272
|
const k = Math.floor(i.length / 2);
|
|
1273
|
-
|
|
1273
|
+
_ = w.substring(0, k).trim(), N = w.substring(k).trim();
|
|
1274
1274
|
} else {
|
|
1275
1275
|
let k;
|
|
1276
1276
|
O.length % 2 == 1 ? k = Math.floor(O.length / 2) : k = O.length / 2 - 1;
|
|
1277
|
-
let
|
|
1277
|
+
let S = 0;
|
|
1278
1278
|
if (k == 0)
|
|
1279
|
-
|
|
1279
|
+
S = w.indexOf(O[0]), _ = w.substring(0, S).trim(), N = w.substring(S + 1).trim();
|
|
1280
1280
|
else {
|
|
1281
|
-
let
|
|
1282
|
-
for (;
|
|
1283
|
-
|
|
1284
|
-
|
|
1281
|
+
let C = 0, P = 0;
|
|
1282
|
+
for (; C <= k; )
|
|
1283
|
+
S = w.indexOf(O[C], P), P = S + 1, C++;
|
|
1284
|
+
_ = w.substring(0, S).trim(), N = w.substring(S + 1).trim();
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
const
|
|
1288
|
-
if (
|
|
1287
|
+
const W = _.split(".");
|
|
1288
|
+
if (W.length == 2 && W[1] == 0 && W[1].length != 2)
|
|
1289
1289
|
throw new Error("invalid coordinates format");
|
|
1290
|
-
const M =
|
|
1290
|
+
const M = N.split(".");
|
|
1291
1291
|
if (M.length == 2 && M[1] == 0 && M[1].length != 2)
|
|
1292
1292
|
throw new Error("invalid coordinates format");
|
|
1293
|
-
if (/^\d+$/.test(
|
|
1293
|
+
if (/^\d+$/.test(_) || /^\d+$/.test(N))
|
|
1294
1294
|
throw new Error("degree only coordinate/s provided");
|
|
1295
1295
|
return t = Number(Number(t).toFixed(e)), n = Number(Number(n).toFixed(e)), Object.freeze({
|
|
1296
|
-
verbatimCoordinates:
|
|
1297
|
-
verbatimLatitude:
|
|
1298
|
-
verbatimLongitude:
|
|
1296
|
+
verbatimCoordinates: w,
|
|
1297
|
+
verbatimLatitude: _,
|
|
1298
|
+
verbatimLongitude: N,
|
|
1299
1299
|
decimalLatitude: t,
|
|
1300
1300
|
decimalLongitude: n,
|
|
1301
1301
|
decimalCoordinates: `${t},${n}`,
|
|
@@ -1306,7 +1306,7 @@ function fi(i, e) {
|
|
|
1306
1306
|
} else
|
|
1307
1307
|
throw new Error("coordinates pattern match failed");
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function pt(i) {
|
|
1310
1310
|
if (!isNaN(i[0]))
|
|
1311
1311
|
return !1;
|
|
1312
1312
|
const e = [...i];
|
|
@@ -1314,11 +1314,11 @@ function mt(i) {
|
|
|
1314
1314
|
return !1;
|
|
1315
1315
|
const t = /^[-+]?\d+([\.,]\d+)?$/, n = /[eastsouthnorthwest]+/i, r = e.length / 2;
|
|
1316
1316
|
for (let u = 0; u < r; u++) {
|
|
1317
|
-
const h = e[u], o = e[u + r], g = t.test(h) && t.test(o),
|
|
1317
|
+
const h = e[u], o = e[u + r], g = t.test(h) && t.test(o), f = n.test(h) && n.test(o), w = h == o;
|
|
1318
1318
|
if (!(h == null && o == null)) {
|
|
1319
1319
|
if (h == null || o == null)
|
|
1320
1320
|
return !1;
|
|
1321
|
-
if (g ||
|
|
1321
|
+
if (g || f || w)
|
|
1322
1322
|
continue;
|
|
1323
1323
|
return !1;
|
|
1324
1324
|
}
|
|
@@ -1733,7 +1733,7 @@ function Bi(i) {
|
|
|
1733
1733
|
Ue(e, n, r), t = !0;
|
|
1734
1734
|
},
|
|
1735
1735
|
i(n) {
|
|
1736
|
-
t || (
|
|
1736
|
+
t || (le(e.$$.fragment, n), t = !0);
|
|
1737
1737
|
},
|
|
1738
1738
|
o(n) {
|
|
1739
1739
|
he(e.$$.fragment, n), t = !1;
|
|
@@ -1783,7 +1783,7 @@ function Wi(i) {
|
|
|
1783
1783
|
);
|
|
1784
1784
|
},
|
|
1785
1785
|
i(h) {
|
|
1786
|
-
n || (
|
|
1786
|
+
n || (le(t.$$.fragment, h), n = !0);
|
|
1787
1787
|
},
|
|
1788
1788
|
o(h) {
|
|
1789
1789
|
he(t.$$.fragment, h), n = !1;
|
|
@@ -1798,27 +1798,27 @@ function jr(i) {
|
|
|
1798
1798
|
/*listFeatures*/
|
|
1799
1799
|
i[13]
|
|
1800
1800
|
);
|
|
1801
|
-
const g = (
|
|
1801
|
+
const g = (f) => (
|
|
1802
1802
|
/*feature*/
|
|
1803
|
-
|
|
1804
|
-
(
|
|
1805
|
-
|
|
1803
|
+
f[97].id + /*feature*/
|
|
1804
|
+
(f[97].address ? "," + /*feature*/
|
|
1805
|
+
f[97].address : "")
|
|
1806
1806
|
);
|
|
1807
|
-
for (let
|
|
1808
|
-
let
|
|
1809
|
-
n.set(
|
|
1807
|
+
for (let f = 0; f < o.length; f += 1) {
|
|
1808
|
+
let w = Ai(i, o, f), _ = g(w);
|
|
1809
|
+
n.set(_, t[f] = Gi(_, w));
|
|
1810
1810
|
}
|
|
1811
1811
|
return {
|
|
1812
1812
|
c() {
|
|
1813
1813
|
e = X("ul");
|
|
1814
|
-
for (let
|
|
1815
|
-
t[
|
|
1814
|
+
for (let f = 0; f < t.length; f += 1)
|
|
1815
|
+
t[f].c();
|
|
1816
1816
|
x(e, "class", "options svelte-bz0zu3"), x(e, "role", "listbox");
|
|
1817
1817
|
},
|
|
1818
|
-
m(
|
|
1819
|
-
te(
|
|
1820
|
-
for (let
|
|
1821
|
-
t[
|
|
1818
|
+
m(f, w) {
|
|
1819
|
+
te(f, e, w);
|
|
1820
|
+
for (let _ = 0; _ < t.length; _ += 1)
|
|
1821
|
+
t[_] && t[_].m(e, null);
|
|
1822
1822
|
r = !0, u || (h = [
|
|
1823
1823
|
ce(
|
|
1824
1824
|
e,
|
|
@@ -1840,29 +1840,29 @@ function jr(i) {
|
|
|
1840
1840
|
)
|
|
1841
1841
|
], u = !0);
|
|
1842
1842
|
},
|
|
1843
|
-
p(
|
|
1844
|
-
|
|
1843
|
+
p(f, w) {
|
|
1844
|
+
w[0] & /*listFeatures, showPlaceType, selectedItemIndex, picked, missingIconsCache, iconsBaseUrl, handleMouseEnter, pick*/
|
|
1845
1845
|
102823936 && (o = Ti(
|
|
1846
1846
|
/*listFeatures*/
|
|
1847
|
-
|
|
1848
|
-
),
|
|
1847
|
+
f[13]
|
|
1848
|
+
), At(), t = sr(t, w, g, 1, f, o, n, e, rr, Gi, null, Ai), Bt());
|
|
1849
1849
|
},
|
|
1850
|
-
i(
|
|
1850
|
+
i(f) {
|
|
1851
1851
|
if (!r) {
|
|
1852
|
-
for (let
|
|
1853
|
-
|
|
1852
|
+
for (let w = 0; w < o.length; w += 1)
|
|
1853
|
+
le(t[w]);
|
|
1854
1854
|
r = !0;
|
|
1855
1855
|
}
|
|
1856
1856
|
},
|
|
1857
|
-
o(
|
|
1858
|
-
for (let
|
|
1859
|
-
he(t[
|
|
1857
|
+
o(f) {
|
|
1858
|
+
for (let w = 0; w < t.length; w += 1)
|
|
1859
|
+
he(t[w]);
|
|
1860
1860
|
r = !1;
|
|
1861
1861
|
},
|
|
1862
|
-
d(
|
|
1863
|
-
|
|
1864
|
-
for (let
|
|
1865
|
-
t[
|
|
1862
|
+
d(f) {
|
|
1863
|
+
f && $(e);
|
|
1864
|
+
for (let w = 0; w < t.length; w += 1)
|
|
1865
|
+
t[w].d();
|
|
1866
1866
|
u = !1, je(h);
|
|
1867
1867
|
}
|
|
1868
1868
|
};
|
|
@@ -1881,14 +1881,14 @@ function Zr(i) {
|
|
|
1881
1881
|
},
|
|
1882
1882
|
p(o, g) {
|
|
1883
1883
|
(!h || g[0] & /*noResultsMessage*/
|
|
1884
|
-
256) &&
|
|
1884
|
+
256) && Lt(
|
|
1885
1885
|
u,
|
|
1886
1886
|
/*noResultsMessage*/
|
|
1887
1887
|
o[8]
|
|
1888
1888
|
);
|
|
1889
1889
|
},
|
|
1890
1890
|
i(o) {
|
|
1891
|
-
h || (
|
|
1891
|
+
h || (le(t.$$.fragment, o), h = !0);
|
|
1892
1892
|
},
|
|
1893
1893
|
o(o) {
|
|
1894
1894
|
he(t.$$.fragment, o), h = !1;
|
|
@@ -1916,7 +1916,7 @@ function Hr(i) {
|
|
|
1916
1916
|
};
|
|
1917
1917
|
}
|
|
1918
1918
|
function Vr(i) {
|
|
1919
|
-
let e, t, n, r, u, h, o, g,
|
|
1919
|
+
let e, t, n, r, u, h, o, g, f, w, _;
|
|
1920
1920
|
return t = new ln({}), g = new on({}), {
|
|
1921
1921
|
c() {
|
|
1922
1922
|
e = X("div"), Ye(t.$$.fragment), n = Ee(), r = X("div"), u = Ke(
|
|
@@ -1924,30 +1924,30 @@ function Vr(i) {
|
|
|
1924
1924
|
i[7]
|
|
1925
1925
|
), h = Ee(), o = X("button"), Ye(g.$$.fragment), x(r, "class", "svelte-bz0zu3"), x(o, "class", "svelte-bz0zu3"), x(e, "class", "error svelte-bz0zu3");
|
|
1926
1926
|
},
|
|
1927
|
-
m(
|
|
1928
|
-
te(
|
|
1927
|
+
m(N, R) {
|
|
1928
|
+
te(N, e, R), Ue(t, e, null), H(e, n), H(e, r), H(r, u), H(e, h), H(e, o), Ue(g, o, null), f = !0, w || (_ = ce(
|
|
1929
1929
|
o,
|
|
1930
1930
|
"click",
|
|
1931
1931
|
/*click_handler_4*/
|
|
1932
1932
|
i[80]
|
|
1933
|
-
),
|
|
1933
|
+
), w = !0);
|
|
1934
1934
|
},
|
|
1935
|
-
p(
|
|
1936
|
-
(!
|
|
1937
|
-
128) &&
|
|
1935
|
+
p(N, R) {
|
|
1936
|
+
(!f || R[0] & /*errorMessage*/
|
|
1937
|
+
128) && Lt(
|
|
1938
1938
|
u,
|
|
1939
1939
|
/*errorMessage*/
|
|
1940
|
-
|
|
1940
|
+
N[7]
|
|
1941
1941
|
);
|
|
1942
1942
|
},
|
|
1943
|
-
i(
|
|
1944
|
-
|
|
1943
|
+
i(N) {
|
|
1944
|
+
f || (le(t.$$.fragment, N), le(g.$$.fragment, N), f = !0);
|
|
1945
1945
|
},
|
|
1946
|
-
o(
|
|
1947
|
-
he(t.$$.fragment,
|
|
1946
|
+
o(N) {
|
|
1947
|
+
he(t.$$.fragment, N), he(g.$$.fragment, N), f = !1;
|
|
1948
1948
|
},
|
|
1949
|
-
d(
|
|
1950
|
-
|
|
1949
|
+
d(N) {
|
|
1950
|
+
N && $(e), qe(t), qe(g), w = !1, _();
|
|
1951
1951
|
}
|
|
1952
1952
|
};
|
|
1953
1953
|
}
|
|
@@ -2006,30 +2006,30 @@ function Gi(i, e) {
|
|
|
2006
2006
|
c() {
|
|
2007
2007
|
t = Kn(), Ye(n.$$.fragment), this.first = t;
|
|
2008
2008
|
},
|
|
2009
|
-
m(g,
|
|
2010
|
-
te(g, t,
|
|
2009
|
+
m(g, f) {
|
|
2010
|
+
te(g, t, f), Ue(n, g, f), r = !0;
|
|
2011
2011
|
},
|
|
2012
|
-
p(g,
|
|
2013
|
-
var
|
|
2012
|
+
p(g, f) {
|
|
2013
|
+
var _;
|
|
2014
2014
|
e = g;
|
|
2015
|
-
const
|
|
2016
|
-
|
|
2017
|
-
8192 && (
|
|
2018
|
-
e[97]),
|
|
2019
|
-
2048 && (
|
|
2020
|
-
e[11]),
|
|
2021
|
-
57344 && (
|
|
2015
|
+
const w = {};
|
|
2016
|
+
f[0] & /*listFeatures*/
|
|
2017
|
+
8192 && (w.feature = /*feature*/
|
|
2018
|
+
e[97]), f[0] & /*showPlaceType*/
|
|
2019
|
+
2048 && (w.showPlaceType = /*showPlaceType*/
|
|
2020
|
+
e[11]), f[0] & /*selectedItemIndex, listFeatures, picked*/
|
|
2021
|
+
57344 && (w.style = /*selectedItemIndex*/
|
|
2022
2022
|
e[15] === /*i*/
|
|
2023
2023
|
e[99] ? "selected" : (
|
|
2024
2024
|
/*picked*/
|
|
2025
|
-
((
|
|
2025
|
+
((_ = e[14]) == null ? void 0 : _.id) === /*feature*/
|
|
2026
2026
|
e[97].id ? "picked" : "default"
|
|
2027
|
-
)),
|
|
2028
|
-
4096 && (
|
|
2029
|
-
e[12]), n.$set(
|
|
2027
|
+
)), f[0] & /*iconsBaseUrl*/
|
|
2028
|
+
4096 && (w.iconsBaseUrl = /*iconsBaseUrl*/
|
|
2029
|
+
e[12]), n.$set(w);
|
|
2030
2030
|
},
|
|
2031
2031
|
i(g) {
|
|
2032
|
-
r || (
|
|
2032
|
+
r || (le(n.$$.fragment, g), r = !0);
|
|
2033
2033
|
},
|
|
2034
2034
|
o(g) {
|
|
2035
2035
|
he(n.$$.fragment, g), r = !1;
|
|
@@ -2040,9 +2040,9 @@ function Gi(i, e) {
|
|
|
2040
2040
|
};
|
|
2041
2041
|
}
|
|
2042
2042
|
function Kr(i) {
|
|
2043
|
-
let e, t, n, r, u, h, o, g,
|
|
2044
|
-
u = new kr({}),
|
|
2045
|
-
let
|
|
2043
|
+
let e, t, n, r, u, h, o, g, f, w, _, N, R, O, W, M, k, S, C, P, z, q = !1;
|
|
2044
|
+
u = new kr({}), _ = new on({});
|
|
2045
|
+
let A = (
|
|
2046
2046
|
/*abortController*/
|
|
2047
2047
|
i[20] && Bi()
|
|
2048
2048
|
), s = (
|
|
@@ -2052,33 +2052,33 @@ function Kr(i) {
|
|
|
2052
2052
|
const l = (
|
|
2053
2053
|
/*#slots*/
|
|
2054
2054
|
i[70].default
|
|
2055
|
-
),
|
|
2055
|
+
), a = jn(
|
|
2056
2056
|
l,
|
|
2057
2057
|
i,
|
|
2058
2058
|
/*$$scope*/
|
|
2059
2059
|
i[69],
|
|
2060
2060
|
null
|
|
2061
|
-
), m = [Vr, Hr, Zr, jr],
|
|
2062
|
-
function
|
|
2063
|
-
var v,
|
|
2061
|
+
), m = [Vr, Hr, Zr, jr], c = [];
|
|
2062
|
+
function p(y, d) {
|
|
2063
|
+
var v, b;
|
|
2064
2064
|
return (
|
|
2065
2065
|
/*error*/
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2066
|
+
y[19] ? 0 : !/*focusedDelayed*/
|
|
2067
|
+
y[16] && !/*keepListOpen*/
|
|
2068
|
+
y[4] ? 1 : (
|
|
2069
2069
|
/*listFeatures*/
|
|
2070
|
-
((v =
|
|
2070
|
+
((v = y[13]) == null ? void 0 : v.length) === 0 ? 2 : (
|
|
2071
2071
|
/*listFeatures*/
|
|
2072
|
-
(
|
|
2073
|
-
(
|
|
2074
|
-
|
|
2072
|
+
(b = y[13]) != null && b.length && /*focusedDelayed*/
|
|
2073
|
+
(y[16] || /*keepListOpen*/
|
|
2074
|
+
y[4]) ? 3 : -1
|
|
2075
2075
|
)
|
|
2076
2076
|
)
|
|
2077
2077
|
);
|
|
2078
2078
|
}
|
|
2079
|
-
return ~(M =
|
|
2079
|
+
return ~(M = p(i)) && (k = c[M] = m[M](i)), {
|
|
2080
2080
|
c() {
|
|
2081
|
-
e = Ee(), t = X("form"), n = X("div"), r = X("button"), Ye(u.$$.fragment), h = Ee(), o = X("input"), g = Ee(),
|
|
2081
|
+
e = Ee(), t = X("form"), n = X("div"), r = X("button"), Ye(u.$$.fragment), h = Ee(), o = X("input"), g = Ee(), f = X("div"), w = X("button"), Ye(_.$$.fragment), N = Ee(), A && A.c(), R = Ee(), s && s.c(), O = Ee(), a && a.c(), W = Ee(), k && k.c(), x(r, "class", "search-button svelte-bz0zu3"), x(r, "type", "button"), x(
|
|
2082
2082
|
o,
|
|
2083
2083
|
"placeholder",
|
|
2084
2084
|
/*placeholder*/
|
|
@@ -2088,17 +2088,17 @@ function Kr(i) {
|
|
|
2088
2088
|
"aria-label",
|
|
2089
2089
|
/*placeholder*/
|
|
2090
2090
|
i[9]
|
|
2091
|
-
), x(o, "class", "svelte-bz0zu3"), x(
|
|
2092
|
-
|
|
2091
|
+
), x(o, "class", "svelte-bz0zu3"), x(w, "type", "button"), x(
|
|
2092
|
+
w,
|
|
2093
2093
|
"title",
|
|
2094
2094
|
/*clearButtonTitle*/
|
|
2095
2095
|
i[3]
|
|
2096
|
-
), x(
|
|
2097
|
-
|
|
2096
|
+
), x(w, "class", "svelte-bz0zu3"), x(f, "class", "clear-button-container svelte-bz0zu3"), Be(
|
|
2097
|
+
f,
|
|
2098
2098
|
"displayable",
|
|
2099
2099
|
/*searchValue*/
|
|
2100
2100
|
i[1] !== ""
|
|
2101
|
-
), x(n, "class", "input-group svelte-bz0zu3"), x(t, "class",
|
|
2101
|
+
), x(n, "class", "input-group svelte-bz0zu3"), x(t, "class", S = Dt(
|
|
2102
2102
|
/*className*/
|
|
2103
2103
|
i[2]
|
|
2104
2104
|
) + " svelte-bz0zu3"), Be(
|
|
@@ -2109,12 +2109,12 @@ function Kr(i) {
|
|
|
2109
2109
|
i[1] === ""
|
|
2110
2110
|
);
|
|
2111
2111
|
},
|
|
2112
|
-
m(
|
|
2113
|
-
te(
|
|
2112
|
+
m(y, d) {
|
|
2113
|
+
te(y, e, d), te(y, t, d), H(t, n), H(n, r), Ue(u, r, null), H(n, h), H(n, o), i[72](o), Si(
|
|
2114
2114
|
o,
|
|
2115
2115
|
/*searchValue*/
|
|
2116
2116
|
i[1]
|
|
2117
|
-
), H(n, g), H(n,
|
|
2117
|
+
), H(n, g), H(n, f), H(f, w), Ue(_, w, null), H(f, N), A && A.m(f, null), H(n, R), s && s.m(n, null), H(n, O), a && a.m(n, null), H(t, W), ~M && c[M].m(t, null), C = !0, P || (z = [
|
|
2118
2118
|
ce(
|
|
2119
2119
|
r,
|
|
2120
2120
|
"click",
|
|
@@ -2164,7 +2164,7 @@ function Kr(i) {
|
|
|
2164
2164
|
i[77]
|
|
2165
2165
|
),
|
|
2166
2166
|
ce(
|
|
2167
|
-
|
|
2167
|
+
w,
|
|
2168
2168
|
"click",
|
|
2169
2169
|
/*click_handler_2*/
|
|
2170
2170
|
i[78]
|
|
@@ -2173,90 +2173,90 @@ function Kr(i) {
|
|
|
2173
2173
|
/*handleSubmit*/
|
|
2174
2174
|
i[22]
|
|
2175
2175
|
))
|
|
2176
|
-
],
|
|
2176
|
+
], P = !0);
|
|
2177
2177
|
},
|
|
2178
|
-
p(
|
|
2179
|
-
(!
|
|
2178
|
+
p(y, d) {
|
|
2179
|
+
(!C || d[0] & /*placeholder*/
|
|
2180
2180
|
512) && x(
|
|
2181
2181
|
o,
|
|
2182
2182
|
"placeholder",
|
|
2183
2183
|
/*placeholder*/
|
|
2184
|
-
|
|
2185
|
-
), (!
|
|
2184
|
+
y[9]
|
|
2185
|
+
), (!C || d[0] & /*placeholder*/
|
|
2186
2186
|
512) && x(
|
|
2187
2187
|
o,
|
|
2188
2188
|
"aria-label",
|
|
2189
2189
|
/*placeholder*/
|
|
2190
|
-
|
|
2190
|
+
y[9]
|
|
2191
2191
|
), d[0] & /*searchValue*/
|
|
2192
2192
|
2 && o.value !== /*searchValue*/
|
|
2193
|
-
|
|
2193
|
+
y[1] && Si(
|
|
2194
2194
|
o,
|
|
2195
2195
|
/*searchValue*/
|
|
2196
|
-
|
|
2197
|
-
), (!
|
|
2196
|
+
y[1]
|
|
2197
|
+
), (!C || d[0] & /*clearButtonTitle*/
|
|
2198
2198
|
8) && x(
|
|
2199
|
-
|
|
2199
|
+
w,
|
|
2200
2200
|
"title",
|
|
2201
2201
|
/*clearButtonTitle*/
|
|
2202
|
-
|
|
2202
|
+
y[3]
|
|
2203
2203
|
), /*abortController*/
|
|
2204
|
-
|
|
2205
|
-
1048576 &&
|
|
2206
|
-
|
|
2207
|
-
}),
|
|
2204
|
+
y[20] ? A ? d[0] & /*abortController*/
|
|
2205
|
+
1048576 && le(A, 1) : (A = Bi(), A.c(), le(A, 1), A.m(f, null)) : A && (At(), he(A, 1, 1, () => {
|
|
2206
|
+
A = null;
|
|
2207
|
+
}), Bt()), (!C || d[0] & /*searchValue*/
|
|
2208
2208
|
2) && Be(
|
|
2209
|
-
|
|
2209
|
+
f,
|
|
2210
2210
|
"displayable",
|
|
2211
2211
|
/*searchValue*/
|
|
2212
|
-
|
|
2212
|
+
y[1] !== ""
|
|
2213
2213
|
), /*enableReverse*/
|
|
2214
|
-
|
|
2215
|
-
64 &&
|
|
2214
|
+
y[6] === "button" ? s ? (s.p(y, d), d[0] & /*enableReverse*/
|
|
2215
|
+
64 && le(s, 1)) : (s = Wi(y), s.c(), le(s, 1), s.m(n, O)) : s && (At(), he(s, 1, 1, () => {
|
|
2216
2216
|
s = null;
|
|
2217
|
-
}),
|
|
2217
|
+
}), Bt()), a && a.p && (!C || d[2] & /*$$scope*/
|
|
2218
2218
|
128) && Hn(
|
|
2219
|
-
|
|
2219
|
+
a,
|
|
2220
2220
|
l,
|
|
2221
|
-
|
|
2221
|
+
y,
|
|
2222
2222
|
/*$$scope*/
|
|
2223
|
-
|
|
2224
|
-
|
|
2223
|
+
y[69],
|
|
2224
|
+
C ? Zn(
|
|
2225
2225
|
l,
|
|
2226
2226
|
/*$$scope*/
|
|
2227
|
-
|
|
2227
|
+
y[69],
|
|
2228
2228
|
d,
|
|
2229
2229
|
null
|
|
2230
2230
|
) : Vn(
|
|
2231
2231
|
/*$$scope*/
|
|
2232
|
-
|
|
2232
|
+
y[69]
|
|
2233
2233
|
),
|
|
2234
2234
|
null
|
|
2235
2235
|
);
|
|
2236
2236
|
let v = M;
|
|
2237
|
-
M =
|
|
2238
|
-
|
|
2239
|
-
}),
|
|
2240
|
-
4 &&
|
|
2237
|
+
M = p(y), M === v ? ~M && c[M].p(y, d) : (k && (At(), he(c[v], 1, 1, () => {
|
|
2238
|
+
c[v] = null;
|
|
2239
|
+
}), Bt()), ~M ? (k = c[M], k ? k.p(y, d) : (k = c[M] = m[M](y), k.c()), le(k, 1), k.m(t, null)) : k = null), (!C || d[0] & /*className*/
|
|
2240
|
+
4 && S !== (S = Dt(
|
|
2241
2241
|
/*className*/
|
|
2242
|
-
|
|
2243
|
-
) + " svelte-bz0zu3")) && x(t, "class",
|
|
2242
|
+
y[2]
|
|
2243
|
+
) + " svelte-bz0zu3")) && x(t, "class", S), (!C || d[0] & /*className, collapsed, searchValue*/
|
|
2244
2244
|
38) && Be(
|
|
2245
2245
|
t,
|
|
2246
2246
|
"can-collapse",
|
|
2247
2247
|
/*collapsed*/
|
|
2248
|
-
|
|
2249
|
-
|
|
2248
|
+
y[5] && /*searchValue*/
|
|
2249
|
+
y[1] === ""
|
|
2250
2250
|
);
|
|
2251
2251
|
},
|
|
2252
|
-
i(
|
|
2253
|
-
|
|
2252
|
+
i(y) {
|
|
2253
|
+
C || (le(q), le(u.$$.fragment, y), le(_.$$.fragment, y), le(A), le(s), le(a, y), le(k), C = !0);
|
|
2254
2254
|
},
|
|
2255
|
-
o(
|
|
2256
|
-
he(
|
|
2255
|
+
o(y) {
|
|
2256
|
+
he(q), he(u.$$.fragment, y), he(_.$$.fragment, y), he(A), he(s), he(a, y), he(k), C = !1;
|
|
2257
2257
|
},
|
|
2258
|
-
d(
|
|
2259
|
-
|
|
2258
|
+
d(y) {
|
|
2259
|
+
y && ($(e), $(t)), qe(u), i[72](null), qe(_), A && A.d(), s && s.d(), a && a.d(y), ~M && c[M].d(), P = !1, je(z);
|
|
2260
2260
|
}
|
|
2261
2261
|
};
|
|
2262
2262
|
}
|
|
@@ -2286,88 +2286,88 @@ function Yr(i, e, t) {
|
|
|
2286
2286
|
"poi.restaurant": 18,
|
|
2287
2287
|
"poi.aerodrome": 13
|
|
2288
2288
|
};
|
|
2289
|
-
let { class:
|
|
2290
|
-
const
|
|
2291
|
-
let { reverseGeocodingLimit: m =
|
|
2289
|
+
let { class: f = void 0 } = e, { apiKey: w } = e, { bbox: _ = void 0 } = e, { clearButtonTitle: N = "clear" } = e, { clearOnBlur: R = !1 } = e, { clearListOnPick: O = !1 } = e, { keepListOpen: W = !1 } = e, { collapsed: M = !1 } = e, { country: k = void 0 } = e, { debounceSearch: S = 200 } = e, { enableReverse: C = "never" } = e, { errorMessage: P = "Something went wrong…" } = e, { filter: z = () => !0 } = e, { flyTo: q = !0 } = e, { fuzzyMatch: A = !0 } = e, { language: s = void 0 } = e, { limit: l = void 0 } = e;
|
|
2290
|
+
const a = 41415112612;
|
|
2291
|
+
let { reverseGeocodingLimit: m = a } = e, { mapController: c = void 0 } = e, { minLength: p = 2 } = e, { noResultsMessage: y = "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: d = "Search" } = e, { proximity: v = [{ type: "server-geolocation" }] } = e, { reverseActive: b = C === "always" } = e, { reverseButtonTitle: E = "toggle reverse geocoding" } = e, { searchValue: T = "" } = e, { pickedResultStyle: B = "full-geometry" } = e, { showPlaceType: G = "if-needed" } = e, { showResultsWhileTyping: Z = !0 } = e, { selectFirst: K = !0 } = e, { flyToSelected: ie = !1 } = e, { markerOnSelected: j = !0 } = e, { types: V = void 0 } = e;
|
|
2292
2292
|
const ae = [];
|
|
2293
2293
|
let { reverseGeocodingTypes: Ge = ae } = e, { exhaustiveReverseGeocoding: et = !1 } = e, { excludeTypes: tt = !1 } = e;
|
|
2294
2294
|
const ye = void 0;
|
|
2295
|
-
let { reverseGeocodingExcludeTypes: Oe = ye } = e, { zoom: de = g } = e, { apiUrl: fe = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: J = {} } = e, { iconsBaseUrl: di = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.
|
|
2296
|
-
} } = e, { adjustUrl:
|
|
2295
|
+
let { reverseGeocodingExcludeTypes: Oe = ye } = e, { zoom: de = g } = e, { apiUrl: fe = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: J = {} } = e, { iconsBaseUrl: di = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.6/icons/" } = e, { adjustUrlQuery: Zt = () => {
|
|
2296
|
+
} } = e, { adjustUrl: Ht = () => {
|
|
2297
2297
|
} } = e;
|
|
2298
|
-
function yn(
|
|
2299
|
-
Me.focus(
|
|
2298
|
+
function yn(L) {
|
|
2299
|
+
Me.focus(L);
|
|
2300
2300
|
}
|
|
2301
2301
|
function vn() {
|
|
2302
2302
|
Me.blur();
|
|
2303
2303
|
}
|
|
2304
|
-
function gi(
|
|
2305
|
-
t(1, T =
|
|
2304
|
+
function gi(L, ne = !0, oe = !1) {
|
|
2305
|
+
t(1, T = L), ne ? (t(15, Y = -1), pi()) : (yi(void 0, !oe, oe), setTimeout(() => {
|
|
2306
2306
|
Me.focus(), Me.select();
|
|
2307
2307
|
}));
|
|
2308
2308
|
}
|
|
2309
2309
|
function bn() {
|
|
2310
|
-
t(13, F = void 0), t(14,
|
|
2310
|
+
t(13, F = void 0), t(14, D = void 0), t(15, Y = -1);
|
|
2311
2311
|
}
|
|
2312
2312
|
function wn() {
|
|
2313
|
-
t(64,
|
|
2313
|
+
t(64, ue = []), t(14, D = void 0);
|
|
2314
2314
|
}
|
|
2315
|
-
let F,
|
|
2315
|
+
let F, ue, D, mi = "", Me, Y = -1, Re, Tt = [], it, st, ot, Vt, De = !1;
|
|
2316
2316
|
const En = /* @__PURE__ */ new Set(), Ze = rn();
|
|
2317
2317
|
Jn(() => {
|
|
2318
|
-
|
|
2318
|
+
c && (c.setEventHandler(void 0), c.indicateReverse(!1), c.setSelectedMarker(-1), c.setFeatures(void 0, void 0, !1));
|
|
2319
2319
|
});
|
|
2320
|
-
function pi(
|
|
2320
|
+
function pi(L) {
|
|
2321
2321
|
if (t(17, De = !1), st && (clearTimeout(st), st = void 0), Y > -1 && F)
|
|
2322
|
-
t(14,
|
|
2322
|
+
t(14, D = F[Y]), t(1, T = D.place_type[0] === "reverse" ? D.place_name : D.place_name.replace(/,.*/, "")), t(19, Re = void 0), t(64, ue = void 0), t(15, Y = -1);
|
|
2323
2323
|
else if (T) {
|
|
2324
|
-
const ne =
|
|
2325
|
-
|
|
2326
|
-
t(64,
|
|
2327
|
-
}).catch((
|
|
2324
|
+
const ne = L || !Kt(T);
|
|
2325
|
+
Yt(T, { exact: !0 }).then(() => {
|
|
2326
|
+
t(64, ue = F), t(14, D = void 0), ne && Ln();
|
|
2327
|
+
}).catch((oe) => t(19, Re = oe));
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2330
|
+
function Kt(L) {
|
|
2331
2331
|
try {
|
|
2332
|
-
return Fr(
|
|
2332
|
+
return Fr(L, 6);
|
|
2333
2333
|
} catch {
|
|
2334
2334
|
return !1;
|
|
2335
2335
|
}
|
|
2336
2336
|
}
|
|
2337
|
-
async function
|
|
2337
|
+
async function Yt(L, { byId: ne = !1, exact: oe = !1 } = {}) {
|
|
2338
2338
|
var be, Pe, He;
|
|
2339
2339
|
t(19, Re = void 0), it == null || it.abort();
|
|
2340
2340
|
const ve = new AbortController();
|
|
2341
2341
|
t(20, it = ve);
|
|
2342
2342
|
try {
|
|
2343
|
-
const Q =
|
|
2343
|
+
const Q = Kt(L), ct = new URL(fe + "/" + encodeURIComponent(Q ? Q.decimalLongitude + "," + Q.decimalLatitude : L) + ".json"), Le = ct.searchParams;
|
|
2344
2344
|
s !== void 0 && Le.set("language", Array.isArray(s) ? s.join(",") : s ?? "");
|
|
2345
|
-
const [
|
|
2346
|
-
let Ie = (be = !Q || Ge === ae ? V : Ge) == null ? void 0 : be.map((ge) => typeof ge == "string" ? ge :
|
|
2345
|
+
const [Jt] = (c == null ? void 0 : c.getCenterAndZoom()) ?? [];
|
|
2346
|
+
let Ie = (be = !Q || Ge === ae ? V : Ge) == null ? void 0 : be.map((ge) => typeof ge == "string" ? ge : Jt === void 0 || (ge[0] ?? 0) <= Jt && Jt < (ge[1] ?? 1 / 0) ? ge[2] : void 0).filter((ge) => ge !== void 0);
|
|
2347
2347
|
Ie && (Ie = [...new Set(Ie)], Le.set("types", Ie.join(",")));
|
|
2348
2348
|
const bi = !Q || Oe === ye ? tt : Oe;
|
|
2349
|
-
if (bi && Le.set("excludeTypes", String(bi)),
|
|
2350
|
-
const ge = await Rr(
|
|
2351
|
-
ge && Le.set("proximity", ge), (
|
|
2349
|
+
if (bi && Le.set("excludeTypes", String(bi)), _ && Le.set("bbox", _.map((ge) => ge.toFixed(6)).join(",")), k && Le.set("country", Array.isArray(k) ? k.join(",") : k), !ne && !Q) {
|
|
2350
|
+
const ge = await Rr(c, v, ve);
|
|
2351
|
+
ge && Le.set("proximity", ge), (oe || !Z) && Le.set("autocomplete", "false"), Le.set("fuzzyMatch", String(A));
|
|
2352
2352
|
}
|
|
2353
|
-
const ht = m ===
|
|
2354
|
-
ht !== void 0 && ht > 1 && (Ie == null ? void 0 : Ie.length) !== 1 && console.warn("For reverse geocoding when limit > 1 then types must contain single value."), Q ? (ht === 1 || ht !== void 0 && (et || (Ie == null ? void 0 : Ie.length) === 1)) && Le.set("limit", String(ht)) : l !== void 0 && Le.set("limit", String(l)), Le.set("key",
|
|
2355
|
-
const Dn = ct.searchParams.get("types") === "" && ct.searchParams.get("excludeTypes") !== "true",
|
|
2356
|
-
if (
|
|
2357
|
-
ne ? (O && t(13, F = void 0), t(14,
|
|
2353
|
+
const ht = m === a ? l : m;
|
|
2354
|
+
ht !== void 0 && ht > 1 && (Ie == null ? void 0 : Ie.length) !== 1 && console.warn("For reverse geocoding when limit > 1 then types must contain single value."), Q ? (ht === 1 || ht !== void 0 && (et || (Ie == null ? void 0 : Ie.length) === 1)) && Le.set("limit", String(ht)) : l !== void 0 && Le.set("limit", String(l)), w && Le.set("key", w), Zt(Le), Ht(ct);
|
|
2355
|
+
const Dn = ct.searchParams.get("types") === "" && ct.searchParams.get("excludeTypes") !== "true", Mt = ct.toString();
|
|
2356
|
+
if (Mt === mi) {
|
|
2357
|
+
ne ? (O && t(13, F = void 0), t(14, D = Tt[0])) : (t(13, F = Tt), ((Pe = F[Y]) == null ? void 0 : Pe.id) !== (r == null ? void 0 : r.id) && t(15, Y = -1));
|
|
2358
2358
|
return;
|
|
2359
2359
|
}
|
|
2360
|
-
mi =
|
|
2360
|
+
mi = Mt;
|
|
2361
2361
|
let dt;
|
|
2362
2362
|
if (Dn)
|
|
2363
2363
|
dt = { type: "FeatureCollection", features: [] };
|
|
2364
2364
|
else {
|
|
2365
|
-
const ge = await fetch(
|
|
2365
|
+
const ge = await fetch(Mt, { signal: ve.signal, ...J });
|
|
2366
2366
|
if (!ge.ok)
|
|
2367
2367
|
throw new Error(await ge.text());
|
|
2368
2368
|
dt = await ge.json();
|
|
2369
2369
|
}
|
|
2370
|
-
Ze("response", { url:
|
|
2370
|
+
Ze("response", { url: Mt, featureCollection: dt }), ne ? (O && t(13, F = void 0), t(14, D = dt.features[0]), Tt = [D]) : (t(13, F = dt.features.filter(z)), Q && F.unshift({
|
|
2371
2371
|
type: "Feature",
|
|
2372
2372
|
properties: {},
|
|
2373
2373
|
id: "reverse_" + Q.decimalLongitude + "_" + Q.decimalLatitude,
|
|
@@ -2385,7 +2385,7 @@ function Yr(i, e, t) {
|
|
|
2385
2385
|
type: "Point",
|
|
2386
2386
|
coordinates: [Q.decimalLongitude, Q.decimalLatitude]
|
|
2387
2387
|
}
|
|
2388
|
-
}),
|
|
2388
|
+
}), Tt = F, ((He = F[Y]) == null ? void 0 : He.id) !== (r == null ? void 0 : r.id) && t(15, Y = -1), Q && Me.focus());
|
|
2389
2389
|
} catch (Q) {
|
|
2390
2390
|
if (Q && typeof Q == "object" && "name" in Q && Q.name === "AbortError")
|
|
2391
2391
|
return;
|
|
@@ -2396,27 +2396,27 @@ function Yr(i, e, t) {
|
|
|
2396
2396
|
}
|
|
2397
2397
|
function Ln() {
|
|
2398
2398
|
var ve;
|
|
2399
|
-
if (!(
|
|
2399
|
+
if (!(ue != null && ue.length) || !q)
|
|
2400
2400
|
return;
|
|
2401
|
-
const
|
|
2402
|
-
let
|
|
2403
|
-
for (const be of
|
|
2401
|
+
const L = [180, 90, -180, -90], ne = !ue.some((be) => !be.matching_text);
|
|
2402
|
+
let oe;
|
|
2403
|
+
for (const be of ue) {
|
|
2404
2404
|
const Pe = ft(be);
|
|
2405
|
-
if (
|
|
2405
|
+
if (oe = oe === void 0 ? Pe : Pe === void 0 ? oe : Math.max(oe, Pe), ne || !be.matching_text)
|
|
2406
2406
|
for (const He of [0, 1, 2, 3])
|
|
2407
|
-
|
|
2407
|
+
L[He] = Math[He < 2 ? "min" : "max"](L[He], ((ve = be.bbox) == null ? void 0 : ve[He]) ?? be.center[He % 2]);
|
|
2408
2408
|
}
|
|
2409
|
-
|
|
2409
|
+
c && ue.length > 0 && (D && L[0] === L[2] && L[1] === L[3] ? c.flyTo(D.center, ft(D)) : c.fitBounds(zt(L), 50, oe));
|
|
2410
2410
|
}
|
|
2411
|
-
function
|
|
2412
|
-
!
|
|
2411
|
+
function Qt() {
|
|
2412
|
+
!D || !c || (!D.bbox || D.bbox[0] === D.bbox[2] && D.bbox[1] === D.bbox[3] ? c.flyTo(D.center, ft(D)) : c.fitBounds(zt(D.bbox), 50, ft(D)));
|
|
2413
2413
|
}
|
|
2414
|
-
function ft(
|
|
2415
|
-
var
|
|
2416
|
-
if (!
|
|
2414
|
+
function ft(L) {
|
|
2415
|
+
var oe;
|
|
2416
|
+
if (!L.bbox || L.bbox[0] !== L.bbox[2] && L.bbox[1] !== L.bbox[3])
|
|
2417
2417
|
return;
|
|
2418
|
-
const ne =
|
|
2419
|
-
return (Array.isArray((
|
|
2418
|
+
const ne = L.id.replace(/\..*/, "");
|
|
2419
|
+
return (Array.isArray((oe = L.properties) == null ? void 0 : oe.categories) ? L.properties.categories.reduce(
|
|
2420
2420
|
(ve, be) => {
|
|
2421
2421
|
const Pe = de[ne + "." + be];
|
|
2422
2422
|
return ve === void 0 ? Pe : Pe === void 0 ? ve : Math.max(ve, Pe);
|
|
@@ -2424,139 +2424,139 @@ function Yr(i, e, t) {
|
|
|
2424
2424
|
void 0
|
|
2425
2425
|
) : void 0) ?? de[ne];
|
|
2426
2426
|
}
|
|
2427
|
-
function _n(
|
|
2428
|
-
t(0,
|
|
2427
|
+
function _n(L) {
|
|
2428
|
+
t(0, b = C === "always"), t(13, F = void 0), t(14, D = void 0), t(15, Y = -1), gi(L[1].toFixed(6) + ", " + Or(L[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2429
2429
|
}
|
|
2430
|
-
function Sn(
|
|
2430
|
+
function Sn(L) {
|
|
2431
2431
|
if (!F)
|
|
2432
2432
|
return;
|
|
2433
|
-
let ne =
|
|
2434
|
-
ne && (Me.focus(), t(17, De = !0),
|
|
2433
|
+
let ne = L.key === "ArrowDown" ? 1 : L.key === "ArrowUp" ? -1 : 0;
|
|
2434
|
+
ne && (Me.focus(), t(17, De = !0), L.preventDefault(), D && Y === -1 && t(15, Y = F.findIndex((oe) => oe.id === (D == null ? void 0 : D.id))), Y === (D || K ? 0 : -1) && ne === -1 && t(15, Y = F.length), t(15, Y += ne), Y >= F.length && t(15, Y = -1), Y < 0 && (D || K) && t(15, Y = 0));
|
|
2435
2435
|
}
|
|
2436
|
-
function yi(
|
|
2437
|
-
if (t(19, Re = void 0), t(14,
|
|
2438
|
-
if (st && clearTimeout(st), T.length <
|
|
2436
|
+
function yi(L, ne = !0, oe = !1) {
|
|
2437
|
+
if (t(19, Re = void 0), t(14, D = void 0), t(17, De = !0), Z || oe) {
|
|
2438
|
+
if (st && clearTimeout(st), T.length < p)
|
|
2439
2439
|
return;
|
|
2440
2440
|
const ve = T;
|
|
2441
2441
|
st = window.setTimeout(
|
|
2442
2442
|
() => {
|
|
2443
|
-
|
|
2443
|
+
Yt(ve).catch((be) => t(19, Re = be));
|
|
2444
2444
|
},
|
|
2445
|
-
ne ?
|
|
2445
|
+
ne ? S : 0
|
|
2446
2446
|
);
|
|
2447
2447
|
} else
|
|
2448
2448
|
t(13, F = void 0), t(19, Re = void 0);
|
|
2449
2449
|
}
|
|
2450
|
-
function
|
|
2451
|
-
|
|
2450
|
+
function Xt(L) {
|
|
2451
|
+
D && (D == null ? void 0 : D.id) === (L == null ? void 0 : L.id) ? Qt() : (t(14, D = L), t(1, T = L.place_name));
|
|
2452
2452
|
}
|
|
2453
|
-
function vi(
|
|
2454
|
-
t(15, Y =
|
|
2453
|
+
function vi(L) {
|
|
2454
|
+
t(15, Y = L);
|
|
2455
2455
|
}
|
|
2456
2456
|
function xn() {
|
|
2457
|
-
(!K ||
|
|
2457
|
+
(!K || D) && t(15, Y = -1), ie && Qt();
|
|
2458
2458
|
}
|
|
2459
2459
|
const Tn = () => Me.focus();
|
|
2460
|
-
function Mn(
|
|
2461
|
-
ii[
|
|
2462
|
-
Me =
|
|
2460
|
+
function Mn(L) {
|
|
2461
|
+
ii[L ? "unshift" : "push"](() => {
|
|
2462
|
+
Me = L, t(18, Me);
|
|
2463
2463
|
});
|
|
2464
2464
|
}
|
|
2465
2465
|
function Cn() {
|
|
2466
2466
|
T = this.value, t(1, T), t(17, De), t(31, R), t(16, ot);
|
|
2467
2467
|
}
|
|
2468
|
-
const Nn = () => t(17, De = !0), kn = () => t(17, De = !1), On = () => t(17, De = !0), Rn = () => t(14,
|
|
2469
|
-
t(1, T = ""), t(14,
|
|
2470
|
-
}, In = () => t(0,
|
|
2468
|
+
const Nn = () => t(17, De = !0), kn = () => t(17, De = !1), On = () => t(17, De = !0), Rn = () => t(14, D = void 0), Pn = () => {
|
|
2469
|
+
t(1, T = ""), t(14, D = void 0), Me.focus();
|
|
2470
|
+
}, In = () => t(0, b = !b), An = () => t(19, Re = void 0), Bn = (L) => vi(L), Wn = (L) => Xt(L), Gn = () => {
|
|
2471
2471
|
};
|
|
2472
|
-
return i.$$set = (
|
|
2473
|
-
"class" in
|
|
2472
|
+
return i.$$set = (L) => {
|
|
2473
|
+
"class" in L && t(2, f = L.class), "apiKey" in L && t(29, w = L.apiKey), "bbox" in L && t(30, _ = L.bbox), "clearButtonTitle" in L && t(3, N = L.clearButtonTitle), "clearOnBlur" in L && t(31, R = L.clearOnBlur), "clearListOnPick" in L && t(32, O = L.clearListOnPick), "keepListOpen" in L && t(4, W = L.keepListOpen), "collapsed" in L && t(5, M = L.collapsed), "country" in L && t(33, k = L.country), "debounceSearch" in L && t(34, S = L.debounceSearch), "enableReverse" in L && t(6, C = L.enableReverse), "errorMessage" in L && t(7, P = L.errorMessage), "filter" in L && t(35, z = L.filter), "flyTo" in L && t(36, q = L.flyTo), "fuzzyMatch" in L && t(37, A = L.fuzzyMatch), "language" in L && t(38, s = L.language), "limit" in L && t(39, l = L.limit), "reverseGeocodingLimit" in L && t(40, m = L.reverseGeocodingLimit), "mapController" in L && t(41, c = L.mapController), "minLength" in L && t(42, p = L.minLength), "noResultsMessage" in L && t(8, y = L.noResultsMessage), "placeholder" in L && t(9, d = L.placeholder), "proximity" in L && t(43, v = L.proximity), "reverseActive" in L && t(0, b = L.reverseActive), "reverseButtonTitle" in L && t(10, E = L.reverseButtonTitle), "searchValue" in L && t(1, T = L.searchValue), "pickedResultStyle" in L && t(44, B = L.pickedResultStyle), "showPlaceType" in L && t(11, G = L.showPlaceType), "showResultsWhileTyping" in L && t(45, Z = L.showResultsWhileTyping), "selectFirst" in L && t(46, K = L.selectFirst), "flyToSelected" in L && t(47, ie = L.flyToSelected), "markerOnSelected" in L && t(48, j = L.markerOnSelected), "types" in L && t(49, V = L.types), "reverseGeocodingTypes" in L && t(50, Ge = L.reverseGeocodingTypes), "exhaustiveReverseGeocoding" in L && t(51, et = L.exhaustiveReverseGeocoding), "excludeTypes" in L && t(52, tt = L.excludeTypes), "reverseGeocodingExcludeTypes" in L && t(53, Oe = L.reverseGeocodingExcludeTypes), "zoom" in L && t(54, de = L.zoom), "apiUrl" in L && t(55, fe = L.apiUrl), "fetchParameters" in L && t(56, J = L.fetchParameters), "iconsBaseUrl" in L && t(12, di = L.iconsBaseUrl), "adjustUrlQuery" in L && t(57, Zt = L.adjustUrlQuery), "adjustUrl" in L && t(58, Ht = L.adjustUrl), "$$scope" in L && t(69, o = L.$$scope);
|
|
2474
2474
|
}, i.$$.update = () => {
|
|
2475
2475
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2476
|
-
64 && t(0,
|
|
2476
|
+
64 && t(0, b = C === "always"), i.$$.dirty[0] & /*picked*/
|
|
2477
2477
|
16384 | i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2478
|
-
8192 &&
|
|
2478
|
+
8192 && B !== "marker-only" && D && !D.address && D.geometry.type === "Point" && D.place_type[0] !== "reverse" && Yt(D.id, { byId: !0 }).catch((L) => t(19, Re = L)), i.$$.dirty[0] & /*picked*/
|
|
2479
2479
|
16384 | i.$$.dirty[1] & /*mapController, flyTo, clearListOnPick*/
|
|
2480
2480
|
1058 | i.$$.dirty[2] & /*prevIdToFly*/
|
|
2481
|
-
8 && (
|
|
2481
|
+
8 && (c && D && D.id !== Vt && q && (Qt(), O && t(13, F = void 0), t(64, ue = void 0), t(15, Y = -1)), t(65, Vt = D == null ? void 0 : D.id)), i.$$.dirty[0] & /*focused, focusedDelayed*/
|
|
2482
2482
|
196608 | i.$$.dirty[1] & /*clearOnBlur*/
|
|
2483
2483
|
1 && setTimeout(() => {
|
|
2484
2484
|
t(16, ot = De), R && !ot && t(1, T = "");
|
|
2485
2485
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2486
2486
|
8194 | i.$$.dirty[1] & /*minLength*/
|
|
2487
|
-
2048 && T.length <
|
|
2487
|
+
2048 && T.length < p && (t(13, F = void 0), t(19, Re = void 0), t(64, ue = F)), i.$$.dirty[0] & /*listFeatures, selectedItemIndex, picked*/
|
|
2488
2488
|
57344 | i.$$.dirty[1] & /*selectFirst*/
|
|
2489
|
-
32768 && K && F != null && F.length && Y == -1 && !
|
|
2489
|
+
32768 && K && F != null && F.length && Y == -1 && !D && t(15, Y = 0), i.$$.dirty[0] & /*listFeatures*/
|
|
2490
2490
|
8192 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2491
|
-
4 &&
|
|
2491
|
+
4 && ue !== F && t(64, ue = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2492
2492
|
73729 | i.$$.dirty[1] & /*mapController*/
|
|
2493
2493
|
1024 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2494
|
-
4 &&
|
|
2495
|
-
switch (
|
|
2494
|
+
4 && c && c.setEventHandler((L) => {
|
|
2495
|
+
switch (L.type) {
|
|
2496
2496
|
case "mapClick":
|
|
2497
|
-
|
|
2497
|
+
b && _n(L.coordinates);
|
|
2498
2498
|
break;
|
|
2499
2499
|
case "markerClick":
|
|
2500
2500
|
{
|
|
2501
|
-
const ne = F == null ? void 0 : F.find((
|
|
2502
|
-
ne &&
|
|
2501
|
+
const ne = F == null ? void 0 : F.find((oe) => oe.id === L.id);
|
|
2502
|
+
ne && Xt(ne);
|
|
2503
2503
|
}
|
|
2504
2504
|
break;
|
|
2505
2505
|
case "markerMouseEnter":
|
|
2506
|
-
|
|
2506
|
+
ue && t(15, Y = ot ? (F == null ? void 0 : F.findIndex((ne) => ne.id === L.id)) ?? -1 : -1);
|
|
2507
2507
|
break;
|
|
2508
2508
|
case "markerMouseLeave":
|
|
2509
|
-
|
|
2509
|
+
ue && t(15, Y = -1);
|
|
2510
2510
|
break;
|
|
2511
2511
|
}
|
|
2512
2512
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2513
2513
|
40960 && t(66, r = F == null ? void 0 : F[Y]), i.$$.dirty[1] & /*mapController, flyTo, flyToSelected*/
|
|
2514
2514
|
66592 | i.$$.dirty[2] & /*selected*/
|
|
2515
|
-
16 &&
|
|
2516
|
-
8192 && t(68, n =
|
|
2515
|
+
16 && c && r && q && ie && c.flyTo(r.center, ft(r)), i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2516
|
+
8192 && t(68, n = B === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2517
2517
|
132096 | i.$$.dirty[2] & /*showPolygonMarker*/
|
|
2518
|
-
64 && (j ||
|
|
2518
|
+
64 && (j || c == null || c.setFeatures(void 0, void 0, n)), i.$$.dirty[0] & /*picked*/
|
|
2519
2519
|
16384 | i.$$.dirty[1] & /*mapController, markerOnSelected*/
|
|
2520
2520
|
132096 | i.$$.dirty[2] & /*markedFeatures, selected, showPolygonMarker*/
|
|
2521
|
-
84 &&
|
|
2521
|
+
84 && c && j && !ue && (c.setFeatures(r ? [r] : void 0, D, n), c.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[0] & /*picked*/
|
|
2522
2522
|
16384 | i.$$.dirty[1] & /*mapController*/
|
|
2523
2523
|
1024 | i.$$.dirty[2] & /*markedFeatures, showPolygonMarker*/
|
|
2524
|
-
68 &&
|
|
2524
|
+
68 && c && c.setFeatures(ue, D, n), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
2525
2525
|
32768 | i.$$.dirty[1] & /*mapController*/
|
|
2526
2526
|
1024 | i.$$.dirty[2] & /*markedFeatures*/
|
|
2527
|
-
4 &&
|
|
2527
|
+
4 && ue && c && c.setSelectedMarker(Y), i.$$.dirty[0] & /*searchValue*/
|
|
2528
2528
|
2 | i.$$.dirty[1] & /*mapController*/
|
|
2529
|
-
1024 &&
|
|
2530
|
-
const
|
|
2531
|
-
|
|
2529
|
+
1024 && c) {
|
|
2530
|
+
const L = Kt(T);
|
|
2531
|
+
c.setReverseMarker(L ? [L.decimalLongitude, L.decimalLatitude] : void 0);
|
|
2532
2532
|
}
|
|
2533
2533
|
i.$$.dirty[2] & /*selected*/
|
|
2534
2534
|
16 && Ze("select", { feature: r }), i.$$.dirty[0] & /*picked*/
|
|
2535
|
-
16384 && Ze("pick", { feature:
|
|
2536
|
-
73744 && t(67, u = !!(F != null && F.length) && (ot ||
|
|
2535
|
+
16384 && Ze("pick", { feature: D }), i.$$.dirty[0] & /*listFeatures, focusedDelayed, keepListOpen*/
|
|
2536
|
+
73744 && t(67, u = !!(F != null && F.length) && (ot || W)), i.$$.dirty[2] & /*optionsVisible*/
|
|
2537
2537
|
32 && Ze("optionsvisibilitychange", { optionsVisible: u }), i.$$.dirty[0] & /*listFeatures*/
|
|
2538
2538
|
8192 && Ze("featureslisted", { features: F }), i.$$.dirty[2] & /*markedFeatures*/
|
|
2539
|
-
4 && Ze("featuresmarked", { features:
|
|
2540
|
-
1 && Ze("reversetoggle", { reverse:
|
|
2539
|
+
4 && Ze("featuresmarked", { features: ue }), i.$$.dirty[0] & /*reverseActive*/
|
|
2540
|
+
1 && Ze("reversetoggle", { reverse: b }), i.$$.dirty[0] & /*searchValue*/
|
|
2541
2541
|
2 && Ze("querychange", { query: T }), i.$$.dirty[0] & /*reverseActive*/
|
|
2542
2542
|
1 | i.$$.dirty[1] & /*mapController*/
|
|
2543
|
-
1024 &&
|
|
2543
|
+
1024 && c && c.indicateReverse(b);
|
|
2544
2544
|
}, [
|
|
2545
|
-
|
|
2545
|
+
b,
|
|
2546
2546
|
T,
|
|
2547
|
-
|
|
2548
|
-
C,
|
|
2549
|
-
A,
|
|
2550
|
-
M,
|
|
2547
|
+
f,
|
|
2551
2548
|
N,
|
|
2552
|
-
D,
|
|
2553
|
-
p,
|
|
2554
|
-
d,
|
|
2555
|
-
L,
|
|
2556
2549
|
W,
|
|
2550
|
+
M,
|
|
2551
|
+
C,
|
|
2552
|
+
P,
|
|
2553
|
+
y,
|
|
2554
|
+
d,
|
|
2555
|
+
E,
|
|
2556
|
+
G,
|
|
2557
2557
|
di,
|
|
2558
2558
|
F,
|
|
2559
|
-
|
|
2559
|
+
D,
|
|
2560
2560
|
Y,
|
|
2561
2561
|
ot,
|
|
2562
2562
|
De,
|
|
@@ -2567,26 +2567,26 @@ function Yr(i, e, t) {
|
|
|
2567
2567
|
pi,
|
|
2568
2568
|
Sn,
|
|
2569
2569
|
yi,
|
|
2570
|
-
|
|
2570
|
+
Xt,
|
|
2571
2571
|
vi,
|
|
2572
2572
|
xn,
|
|
2573
2573
|
g,
|
|
2574
|
-
|
|
2575
|
-
|
|
2574
|
+
w,
|
|
2575
|
+
_,
|
|
2576
2576
|
R,
|
|
2577
2577
|
O,
|
|
2578
2578
|
k,
|
|
2579
|
-
|
|
2580
|
-
q,
|
|
2579
|
+
S,
|
|
2581
2580
|
z,
|
|
2582
|
-
|
|
2581
|
+
q,
|
|
2582
|
+
A,
|
|
2583
2583
|
s,
|
|
2584
2584
|
l,
|
|
2585
2585
|
m,
|
|
2586
|
-
|
|
2587
|
-
|
|
2586
|
+
c,
|
|
2587
|
+
p,
|
|
2588
2588
|
v,
|
|
2589
|
-
|
|
2589
|
+
B,
|
|
2590
2590
|
Z,
|
|
2591
2591
|
K,
|
|
2592
2592
|
ie,
|
|
@@ -2599,15 +2599,15 @@ function Yr(i, e, t) {
|
|
|
2599
2599
|
de,
|
|
2600
2600
|
fe,
|
|
2601
2601
|
J,
|
|
2602
|
-
|
|
2603
|
-
|
|
2602
|
+
Zt,
|
|
2603
|
+
Ht,
|
|
2604
2604
|
yn,
|
|
2605
2605
|
vn,
|
|
2606
2606
|
gi,
|
|
2607
2607
|
bn,
|
|
2608
2608
|
wn,
|
|
2609
|
-
|
|
2610
|
-
|
|
2609
|
+
ue,
|
|
2610
|
+
Vt,
|
|
2611
2611
|
r,
|
|
2612
2612
|
u,
|
|
2613
2613
|
n,
|
|
@@ -2710,7 +2710,7 @@ let Qr = class extends Je {
|
|
|
2710
2710
|
return this.$$.ctx[63];
|
|
2711
2711
|
}
|
|
2712
2712
|
};
|
|
2713
|
-
function
|
|
2713
|
+
function St(i, e, t = {}) {
|
|
2714
2714
|
const n = { type: "Feature" };
|
|
2715
2715
|
return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
|
|
2716
2716
|
}
|
|
@@ -2726,24 +2726,24 @@ function ci(i, e, t = {}) {
|
|
|
2726
2726
|
if (r[r.length - 1][u] !== r[0][u])
|
|
2727
2727
|
throw new Error("First and last Position are not equivalent.");
|
|
2728
2728
|
}
|
|
2729
|
-
return
|
|
2729
|
+
return St({
|
|
2730
2730
|
type: "Polygon",
|
|
2731
2731
|
coordinates: i
|
|
2732
2732
|
}, e, t);
|
|
2733
2733
|
}
|
|
2734
|
-
function
|
|
2734
|
+
function xt(i, e = {}) {
|
|
2735
2735
|
const t = { type: "FeatureCollection" };
|
|
2736
2736
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
|
|
2737
2737
|
}
|
|
2738
2738
|
function an(i, e, t = {}) {
|
|
2739
|
-
return
|
|
2739
|
+
return St({
|
|
2740
2740
|
type: "MultiPolygon",
|
|
2741
2741
|
coordinates: i
|
|
2742
2742
|
}, e, t);
|
|
2743
2743
|
}
|
|
2744
2744
|
var Xr = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, ei = Math.ceil, xe = Math.floor, pe = "[BigNumber Error] ", Di = pe + "Number primitive has more than 15 significant digits: ", Ce = 1e14, U = 14, zi = 9007199254740991, ti = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Ve = 1e7, we = 1e9;
|
|
2745
2745
|
function fn(i) {
|
|
2746
|
-
var e, t, n, r =
|
|
2746
|
+
var e, t, n, r = S.prototype = { constructor: S, toString: null, valueOf: null }, u = new S(1), h = 20, o = 4, g = -7, f = 21, w = -1e7, _ = 1e7, N = !1, R = 1, O = 0, W = {
|
|
2747
2747
|
prefix: "",
|
|
2748
2748
|
groupSize: 3,
|
|
2749
2749
|
secondaryGroupSize: 0,
|
|
@@ -2754,417 +2754,417 @@ function fn(i) {
|
|
|
2754
2754
|
// non-breaking space
|
|
2755
2755
|
suffix: ""
|
|
2756
2756
|
}, M = "0123456789abcdefghijklmnopqrstuvwxyz", k = !0;
|
|
2757
|
-
function
|
|
2758
|
-
var
|
|
2759
|
-
if (!(
|
|
2757
|
+
function S(s, l) {
|
|
2758
|
+
var a, m, c, p, y, d, v, b, E = this;
|
|
2759
|
+
if (!(E instanceof S)) return new S(s, l);
|
|
2760
2760
|
if (l == null) {
|
|
2761
2761
|
if (s && s._isBigNumber === !0) {
|
|
2762
|
-
|
|
2762
|
+
E.s = s.s, !s.c || s.e > _ ? E.c = E.e = null : s.e < w ? E.c = [E.e = 0] : (E.e = s.e, E.c = s.c.slice());
|
|
2763
2763
|
return;
|
|
2764
2764
|
}
|
|
2765
2765
|
if ((d = typeof s == "number") && s * 0 == 0) {
|
|
2766
|
-
if (
|
|
2767
|
-
for (
|
|
2768
|
-
|
|
2766
|
+
if (E.s = 1 / s < 0 ? (s = -s, -1) : 1, s === ~~s) {
|
|
2767
|
+
for (p = 0, y = s; y >= 10; y /= 10, p++) ;
|
|
2768
|
+
p > _ ? E.c = E.e = null : (E.e = p, E.c = [s]);
|
|
2769
2769
|
return;
|
|
2770
2770
|
}
|
|
2771
|
-
|
|
2771
|
+
b = String(s);
|
|
2772
2772
|
} else {
|
|
2773
|
-
if (!Xr.test(
|
|
2774
|
-
|
|
2773
|
+
if (!Xr.test(b = String(s))) return n(E, b, d);
|
|
2774
|
+
E.s = b.charCodeAt(0) == 45 ? (b = b.slice(1), -1) : 1;
|
|
2775
2775
|
}
|
|
2776
|
-
(
|
|
2776
|
+
(p = b.indexOf(".")) > -1 && (b = b.replace(".", "")), (y = b.search(/e/i)) > 0 ? (p < 0 && (p = y), p += +b.slice(y + 1), b = b.substring(0, y)) : p < 0 && (p = b.length);
|
|
2777
2777
|
} else {
|
|
2778
2778
|
if (re(l, 2, M.length, "Base"), l == 10 && k)
|
|
2779
|
-
return
|
|
2780
|
-
if (
|
|
2781
|
-
if (s * 0 != 0) return n(
|
|
2782
|
-
if (
|
|
2779
|
+
return E = new S(s), q(E, h + E.e + 1, o);
|
|
2780
|
+
if (b = String(s), d = typeof s == "number") {
|
|
2781
|
+
if (s * 0 != 0) return n(E, b, d, l);
|
|
2782
|
+
if (E.s = 1 / s < 0 ? (b = b.slice(1), -1) : 1, S.DEBUG && b.replace(/^0\.0*|\./, "").length > 15)
|
|
2783
2783
|
throw Error(Di + s);
|
|
2784
2784
|
} else
|
|
2785
|
-
|
|
2786
|
-
for (
|
|
2787
|
-
if (
|
|
2785
|
+
E.s = b.charCodeAt(0) === 45 ? (b = b.slice(1), -1) : 1;
|
|
2786
|
+
for (a = M.slice(0, l), p = y = 0, v = b.length; y < v; y++)
|
|
2787
|
+
if (a.indexOf(m = b.charAt(y)) < 0) {
|
|
2788
2788
|
if (m == ".") {
|
|
2789
|
-
if (
|
|
2790
|
-
|
|
2789
|
+
if (y > p) {
|
|
2790
|
+
p = v;
|
|
2791
2791
|
continue;
|
|
2792
2792
|
}
|
|
2793
|
-
} else if (!
|
|
2794
|
-
|
|
2793
|
+
} else if (!c && (b == b.toUpperCase() && (b = b.toLowerCase()) || b == b.toLowerCase() && (b = b.toUpperCase()))) {
|
|
2794
|
+
c = !0, y = -1, p = 0;
|
|
2795
2795
|
continue;
|
|
2796
2796
|
}
|
|
2797
|
-
return n(
|
|
2797
|
+
return n(E, String(s), d, l);
|
|
2798
2798
|
}
|
|
2799
|
-
d = !1,
|
|
2800
|
-
}
|
|
2801
|
-
for (
|
|
2802
|
-
for (v =
|
|
2803
|
-
if (
|
|
2804
|
-
if (v -=
|
|
2805
|
-
throw Error(Di +
|
|
2806
|
-
if ((
|
|
2807
|
-
|
|
2808
|
-
else if (
|
|
2809
|
-
|
|
2799
|
+
d = !1, b = t(b, l, 10, E.s), (p = b.indexOf(".")) > -1 ? b = b.replace(".", "") : p = b.length;
|
|
2800
|
+
}
|
|
2801
|
+
for (y = 0; b.charCodeAt(y) === 48; y++) ;
|
|
2802
|
+
for (v = b.length; b.charCodeAt(--v) === 48; ) ;
|
|
2803
|
+
if (b = b.slice(y, ++v)) {
|
|
2804
|
+
if (v -= y, d && S.DEBUG && v > 15 && (s > zi || s !== xe(s)))
|
|
2805
|
+
throw Error(Di + E.s * s);
|
|
2806
|
+
if ((p = p - y - 1) > _)
|
|
2807
|
+
E.c = E.e = null;
|
|
2808
|
+
else if (p < w)
|
|
2809
|
+
E.c = [E.e = 0];
|
|
2810
2810
|
else {
|
|
2811
|
-
if (
|
|
2812
|
-
for (
|
|
2813
|
-
|
|
2814
|
-
|
|
2811
|
+
if (E.e = p, E.c = [], y = (p + 1) % U, p < 0 && (y += U), y < v) {
|
|
2812
|
+
for (y && E.c.push(+b.slice(0, y)), v -= U; y < v; )
|
|
2813
|
+
E.c.push(+b.slice(y, y += U));
|
|
2814
|
+
y = U - (b = b.slice(y)).length;
|
|
2815
2815
|
} else
|
|
2816
|
-
|
|
2817
|
-
for (;
|
|
2818
|
-
|
|
2816
|
+
y -= v;
|
|
2817
|
+
for (; y--; b += "0") ;
|
|
2818
|
+
E.c.push(+b);
|
|
2819
2819
|
}
|
|
2820
2820
|
} else
|
|
2821
|
-
|
|
2821
|
+
E.c = [E.e = 0];
|
|
2822
2822
|
}
|
|
2823
|
-
|
|
2824
|
-
var l,
|
|
2823
|
+
S.clone = fn, S.ROUND_UP = 0, S.ROUND_DOWN = 1, S.ROUND_CEIL = 2, S.ROUND_FLOOR = 3, S.ROUND_HALF_UP = 4, S.ROUND_HALF_DOWN = 5, S.ROUND_HALF_EVEN = 6, S.ROUND_HALF_CEIL = 7, S.ROUND_HALF_FLOOR = 8, S.EUCLID = 9, S.config = S.set = function(s) {
|
|
2824
|
+
var l, a;
|
|
2825
2825
|
if (s != null)
|
|
2826
2826
|
if (typeof s == "object") {
|
|
2827
|
-
if (s.hasOwnProperty(l = "DECIMAL_PLACES") && (
|
|
2828
|
-
if (
|
|
2829
|
-
re(
|
|
2830
|
-
else if (re(
|
|
2831
|
-
|
|
2827
|
+
if (s.hasOwnProperty(l = "DECIMAL_PLACES") && (a = s[l], re(a, 0, we, l), h = a), s.hasOwnProperty(l = "ROUNDING_MODE") && (a = s[l], re(a, 0, 8, l), o = a), s.hasOwnProperty(l = "EXPONENTIAL_AT") && (a = s[l], a && a.pop ? (re(a[0], -1e9, 0, l), re(a[1], 0, we, l), g = a[0], f = a[1]) : (re(a, -1e9, we, l), g = -(f = a < 0 ? -a : a))), s.hasOwnProperty(l = "RANGE"))
|
|
2828
|
+
if (a = s[l], a && a.pop)
|
|
2829
|
+
re(a[0], -1e9, -1, l), re(a[1], 1, we, l), w = a[0], _ = a[1];
|
|
2830
|
+
else if (re(a, -1e9, we, l), a)
|
|
2831
|
+
w = -(_ = a < 0 ? -a : a);
|
|
2832
2832
|
else
|
|
2833
|
-
throw Error(pe + l + " cannot be zero: " +
|
|
2833
|
+
throw Error(pe + l + " cannot be zero: " + a);
|
|
2834
2834
|
if (s.hasOwnProperty(l = "CRYPTO"))
|
|
2835
|
-
if (
|
|
2836
|
-
if (
|
|
2835
|
+
if (a = s[l], a === !!a)
|
|
2836
|
+
if (a)
|
|
2837
2837
|
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
2838
|
-
|
|
2838
|
+
N = a;
|
|
2839
2839
|
else
|
|
2840
|
-
throw
|
|
2840
|
+
throw N = !a, Error(pe + "crypto unavailable");
|
|
2841
2841
|
else
|
|
2842
|
-
|
|
2842
|
+
N = a;
|
|
2843
2843
|
else
|
|
2844
|
-
throw Error(pe + l + " not true or false: " +
|
|
2845
|
-
if (s.hasOwnProperty(l = "MODULO_MODE") && (
|
|
2846
|
-
if (
|
|
2847
|
-
else throw Error(pe + l + " not an object: " +
|
|
2844
|
+
throw Error(pe + l + " not true or false: " + a);
|
|
2845
|
+
if (s.hasOwnProperty(l = "MODULO_MODE") && (a = s[l], re(a, 0, 9, l), R = a), s.hasOwnProperty(l = "POW_PRECISION") && (a = s[l], re(a, 0, we, l), O = a), s.hasOwnProperty(l = "FORMAT"))
|
|
2846
|
+
if (a = s[l], typeof a == "object") W = a;
|
|
2847
|
+
else throw Error(pe + l + " not an object: " + a);
|
|
2848
2848
|
if (s.hasOwnProperty(l = "ALPHABET"))
|
|
2849
|
-
if (
|
|
2850
|
-
k =
|
|
2849
|
+
if (a = s[l], typeof a == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(a))
|
|
2850
|
+
k = a.slice(0, 10) == "0123456789", M = a;
|
|
2851
2851
|
else
|
|
2852
|
-
throw Error(pe + l + " invalid: " +
|
|
2852
|
+
throw Error(pe + l + " invalid: " + a);
|
|
2853
2853
|
} else
|
|
2854
2854
|
throw Error(pe + "Object expected: " + s);
|
|
2855
2855
|
return {
|
|
2856
2856
|
DECIMAL_PLACES: h,
|
|
2857
2857
|
ROUNDING_MODE: o,
|
|
2858
|
-
EXPONENTIAL_AT: [g,
|
|
2859
|
-
RANGE: [
|
|
2860
|
-
CRYPTO:
|
|
2858
|
+
EXPONENTIAL_AT: [g, f],
|
|
2859
|
+
RANGE: [w, _],
|
|
2860
|
+
CRYPTO: N,
|
|
2861
2861
|
MODULO_MODE: R,
|
|
2862
2862
|
POW_PRECISION: O,
|
|
2863
|
-
FORMAT:
|
|
2863
|
+
FORMAT: W,
|
|
2864
2864
|
ALPHABET: M
|
|
2865
2865
|
};
|
|
2866
|
-
},
|
|
2866
|
+
}, S.isBigNumber = function(s) {
|
|
2867
2867
|
if (!s || s._isBigNumber !== !0) return !1;
|
|
2868
|
-
if (!
|
|
2869
|
-
var l,
|
|
2868
|
+
if (!S.DEBUG) return !0;
|
|
2869
|
+
var l, a, m = s.c, c = s.e, p = s.s;
|
|
2870
2870
|
e: if ({}.toString.call(m) == "[object Array]") {
|
|
2871
|
-
if ((
|
|
2871
|
+
if ((p === 1 || p === -1) && c >= -1e9 && c <= we && c === xe(c)) {
|
|
2872
2872
|
if (m[0] === 0) {
|
|
2873
|
-
if (
|
|
2873
|
+
if (c === 0 && m.length === 1) return !0;
|
|
2874
2874
|
break e;
|
|
2875
2875
|
}
|
|
2876
|
-
if (l = (
|
|
2876
|
+
if (l = (c + 1) % U, l < 1 && (l += U), String(m[0]).length == l) {
|
|
2877
2877
|
for (l = 0; l < m.length; l++)
|
|
2878
|
-
if (
|
|
2879
|
-
if (
|
|
2878
|
+
if (a = m[l], a < 0 || a >= Ce || a !== xe(a)) break e;
|
|
2879
|
+
if (a !== 0) return !0;
|
|
2880
2880
|
}
|
|
2881
2881
|
}
|
|
2882
|
-
} else if (m === null &&
|
|
2882
|
+
} else if (m === null && c === null && (p === null || p === 1 || p === -1))
|
|
2883
2883
|
return !0;
|
|
2884
2884
|
throw Error(pe + "Invalid BigNumber: " + s);
|
|
2885
|
-
},
|
|
2886
|
-
return
|
|
2887
|
-
},
|
|
2888
|
-
return
|
|
2889
|
-
},
|
|
2885
|
+
}, S.maximum = S.max = function() {
|
|
2886
|
+
return P(arguments, -1);
|
|
2887
|
+
}, S.minimum = S.min = function() {
|
|
2888
|
+
return P(arguments, 1);
|
|
2889
|
+
}, S.random = function() {
|
|
2890
2890
|
var s = 9007199254740992, l = Math.random() * s & 2097151 ? function() {
|
|
2891
2891
|
return xe(Math.random() * s);
|
|
2892
2892
|
} : function() {
|
|
2893
2893
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
2894
2894
|
};
|
|
2895
|
-
return function(
|
|
2896
|
-
var m,
|
|
2897
|
-
if (
|
|
2895
|
+
return function(a) {
|
|
2896
|
+
var m, c, p, y, d, v = 0, b = [], E = new S(u);
|
|
2897
|
+
if (a == null ? a = h : re(a, 0, we), y = ei(a / U), N)
|
|
2898
2898
|
if (crypto.getRandomValues) {
|
|
2899
|
-
for (m = crypto.getRandomValues(new Uint32Array(
|
|
2900
|
-
d = m[v] * 131072 + (m[v + 1] >>> 11), d >= 9e15 ? (
|
|
2901
|
-
v =
|
|
2899
|
+
for (m = crypto.getRandomValues(new Uint32Array(y *= 2)); v < y; )
|
|
2900
|
+
d = m[v] * 131072 + (m[v + 1] >>> 11), d >= 9e15 ? (c = crypto.getRandomValues(new Uint32Array(2)), m[v] = c[0], m[v + 1] = c[1]) : (b.push(d % 1e14), v += 2);
|
|
2901
|
+
v = y / 2;
|
|
2902
2902
|
} else if (crypto.randomBytes) {
|
|
2903
|
-
for (m = crypto.randomBytes(
|
|
2904
|
-
d = (m[v] & 31) * 281474976710656 + m[v + 1] * 1099511627776 + m[v + 2] * 4294967296 + m[v + 3] * 16777216 + (m[v + 4] << 16) + (m[v + 5] << 8) + m[v + 6], d >= 9e15 ? crypto.randomBytes(7).copy(m, v) : (
|
|
2905
|
-
v =
|
|
2903
|
+
for (m = crypto.randomBytes(y *= 7); v < y; )
|
|
2904
|
+
d = (m[v] & 31) * 281474976710656 + m[v + 1] * 1099511627776 + m[v + 2] * 4294967296 + m[v + 3] * 16777216 + (m[v + 4] << 16) + (m[v + 5] << 8) + m[v + 6], d >= 9e15 ? crypto.randomBytes(7).copy(m, v) : (b.push(d % 1e14), v += 7);
|
|
2905
|
+
v = y / 7;
|
|
2906
2906
|
} else
|
|
2907
|
-
throw
|
|
2908
|
-
if (!
|
|
2909
|
-
for (; v <
|
|
2910
|
-
d = l(), d < 9e15 && (
|
|
2911
|
-
for (
|
|
2907
|
+
throw N = !1, Error(pe + "crypto unavailable");
|
|
2908
|
+
if (!N)
|
|
2909
|
+
for (; v < y; )
|
|
2910
|
+
d = l(), d < 9e15 && (b[v++] = d % 1e14);
|
|
2911
|
+
for (y = b[--v], a %= U, y && a && (d = ti[U - a], b[v] = xe(y / d) * d); b[v] === 0; b.pop(), v--) ;
|
|
2912
2912
|
if (v < 0)
|
|
2913
|
-
|
|
2913
|
+
b = [p = 0];
|
|
2914
2914
|
else {
|
|
2915
|
-
for (
|
|
2916
|
-
for (v = 1, d =
|
|
2917
|
-
v < U && (
|
|
2915
|
+
for (p = -1; b[0] === 0; b.splice(0, 1), p -= U) ;
|
|
2916
|
+
for (v = 1, d = b[0]; d >= 10; d /= 10, v++) ;
|
|
2917
|
+
v < U && (p -= U - v);
|
|
2918
2918
|
}
|
|
2919
|
-
return
|
|
2919
|
+
return E.e = p, E.c = b, E;
|
|
2920
2920
|
};
|
|
2921
|
-
}(),
|
|
2922
|
-
for (var s = 1, l = arguments,
|
|
2923
|
-
return
|
|
2921
|
+
}(), S.sum = function() {
|
|
2922
|
+
for (var s = 1, l = arguments, a = new S(l[0]); s < l.length; ) a = a.plus(l[s++]);
|
|
2923
|
+
return a;
|
|
2924
2924
|
}, t = /* @__PURE__ */ function() {
|
|
2925
2925
|
var s = "0123456789";
|
|
2926
|
-
function l(
|
|
2927
|
-
for (var
|
|
2926
|
+
function l(a, m, c, p) {
|
|
2927
|
+
for (var y, d = [0], v, b = 0, E = a.length; b < E; ) {
|
|
2928
2928
|
for (v = d.length; v--; d[v] *= m) ;
|
|
2929
|
-
for (d[0] +=
|
|
2930
|
-
d[
|
|
2929
|
+
for (d[0] += p.indexOf(a.charAt(b++)), y = 0; y < d.length; y++)
|
|
2930
|
+
d[y] > c - 1 && (d[y + 1] == null && (d[y + 1] = 0), d[y + 1] += d[y] / c | 0, d[y] %= c);
|
|
2931
2931
|
}
|
|
2932
2932
|
return d.reverse();
|
|
2933
2933
|
}
|
|
2934
|
-
return function(
|
|
2935
|
-
var d, v,
|
|
2936
|
-
for (K >= 0 && (
|
|
2937
|
-
ze(Se(
|
|
2934
|
+
return function(a, m, c, p, y) {
|
|
2935
|
+
var d, v, b, E, T, B, G, Z, K = a.indexOf("."), ie = h, j = o;
|
|
2936
|
+
for (K >= 0 && (E = O, O = 0, a = a.replace(".", ""), Z = new S(m), B = Z.pow(a.length - K), O = E, Z.c = l(
|
|
2937
|
+
ze(Se(B.c), B.e, "0"),
|
|
2938
2938
|
10,
|
|
2939
|
-
|
|
2939
|
+
c,
|
|
2940
2940
|
s
|
|
2941
|
-
), Z.e = Z.c.length),
|
|
2942
|
-
if (!
|
|
2943
|
-
if (K < 0 ? --
|
|
2944
|
-
|
|
2941
|
+
), Z.e = Z.c.length), G = l(a, m, c, y ? (d = M, s) : (d = s, M)), b = E = G.length; G[--E] == 0; G.pop()) ;
|
|
2942
|
+
if (!G[0]) return d.charAt(0);
|
|
2943
|
+
if (K < 0 ? --b : (B.c = G, B.e = b, B.s = p, B = e(B, Z, ie, j, c), G = B.c, T = B.r, b = B.e), v = b + ie + 1, K = G[v], E = c / 2, T = T || v < 0 || G[v + 1] != null, T = j < 4 ? (K != null || T) && (j == 0 || j == (B.s < 0 ? 3 : 2)) : K > E || K == E && (j == 4 || T || j == 6 && G[v - 1] & 1 || j == (B.s < 0 ? 8 : 7)), v < 1 || !G[0])
|
|
2944
|
+
a = T ? ze(d.charAt(1), -ie, d.charAt(0)) : d.charAt(0);
|
|
2945
2945
|
else {
|
|
2946
|
-
if (
|
|
2947
|
-
for (--
|
|
2948
|
-
|
|
2949
|
-
for (
|
|
2950
|
-
for (K = 0,
|
|
2951
|
-
|
|
2946
|
+
if (G.length = v, T)
|
|
2947
|
+
for (--c; ++G[--v] > c; )
|
|
2948
|
+
G[v] = 0, v || (++b, G = [1].concat(G));
|
|
2949
|
+
for (E = G.length; !G[--E]; ) ;
|
|
2950
|
+
for (K = 0, a = ""; K <= E; a += d.charAt(G[K++])) ;
|
|
2951
|
+
a = ze(a, b, d.charAt(0));
|
|
2952
2952
|
}
|
|
2953
|
-
return
|
|
2953
|
+
return a;
|
|
2954
2954
|
};
|
|
2955
2955
|
}(), e = /* @__PURE__ */ function() {
|
|
2956
|
-
function s(m,
|
|
2957
|
-
var
|
|
2956
|
+
function s(m, c, p) {
|
|
2957
|
+
var y, d, v, b, E = 0, T = m.length, B = c % Ve, G = c / Ve | 0;
|
|
2958
2958
|
for (m = m.slice(); T--; )
|
|
2959
|
-
v = m[T] % Ve,
|
|
2960
|
-
return
|
|
2959
|
+
v = m[T] % Ve, b = m[T] / Ve | 0, y = G * v + b * B, d = B * v + y % Ve * Ve + E, E = (d / p | 0) + (y / Ve | 0) + G * b, m[T] = d % p;
|
|
2960
|
+
return E && (m = [E].concat(m)), m;
|
|
2961
2961
|
}
|
|
2962
|
-
function l(m,
|
|
2962
|
+
function l(m, c, p, y) {
|
|
2963
2963
|
var d, v;
|
|
2964
|
-
if (
|
|
2965
|
-
v =
|
|
2964
|
+
if (p != y)
|
|
2965
|
+
v = p > y ? 1 : -1;
|
|
2966
2966
|
else
|
|
2967
|
-
for (d = v = 0; d <
|
|
2968
|
-
if (m[d] !=
|
|
2969
|
-
v = m[d] >
|
|
2967
|
+
for (d = v = 0; d < p; d++)
|
|
2968
|
+
if (m[d] != c[d]) {
|
|
2969
|
+
v = m[d] > c[d] ? 1 : -1;
|
|
2970
2970
|
break;
|
|
2971
2971
|
}
|
|
2972
2972
|
return v;
|
|
2973
2973
|
}
|
|
2974
|
-
function
|
|
2975
|
-
for (var d = 0;
|
|
2976
|
-
m[
|
|
2974
|
+
function a(m, c, p, y) {
|
|
2975
|
+
for (var d = 0; p--; )
|
|
2976
|
+
m[p] -= d, d = m[p] < c[p] ? 1 : 0, m[p] = d * y + m[p] - c[p];
|
|
2977
2977
|
for (; !m[0] && m.length > 1; m.splice(0, 1)) ;
|
|
2978
2978
|
}
|
|
2979
|
-
return function(m,
|
|
2980
|
-
var v,
|
|
2979
|
+
return function(m, c, p, y, d) {
|
|
2980
|
+
var v, b, E, T, B, G, Z, K, ie, j, V, ae, Ge, et, tt, ye, Oe, de = m.s == c.s ? 1 : -1, fe = m.c, J = c.c;
|
|
2981
2981
|
if (!fe || !fe[0] || !J || !J[0])
|
|
2982
|
-
return new
|
|
2982
|
+
return new S(
|
|
2983
2983
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
2984
|
-
!m.s || !
|
|
2984
|
+
!m.s || !c.s || (fe ? J && fe[0] == J[0] : !J) ? NaN : (
|
|
2985
2985
|
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
2986
2986
|
fe && fe[0] == 0 || !J ? de * 0 : de / 0
|
|
2987
2987
|
)
|
|
2988
2988
|
);
|
|
2989
|
-
for (K = new
|
|
2990
|
-
if (J[
|
|
2989
|
+
for (K = new S(de), ie = K.c = [], b = m.e - c.e, de = p + b + 1, d || (d = Ce, b = Te(m.e / U) - Te(c.e / U), de = de / U | 0), E = 0; J[E] == (fe[E] || 0); E++) ;
|
|
2990
|
+
if (J[E] > (fe[E] || 0) && b--, de < 0)
|
|
2991
2991
|
ie.push(1), T = !0;
|
|
2992
2992
|
else {
|
|
2993
|
-
for (et = fe.length, ye = J.length,
|
|
2993
|
+
for (et = fe.length, ye = J.length, E = 0, de += 2, B = xe(d / (J[0] + 1)), B > 1 && (J = s(J, B, d), fe = s(fe, B, d), ye = J.length, et = fe.length), Ge = ye, j = fe.slice(0, ye), V = j.length; V < ye; j[V++] = 0) ;
|
|
2994
2994
|
Oe = J.slice(), Oe = [0].concat(Oe), tt = J[0], J[1] >= d / 2 && tt++;
|
|
2995
2995
|
do {
|
|
2996
|
-
if (
|
|
2997
|
-
if (ae = j[0], ye != V && (ae = ae * d + (j[1] || 0)),
|
|
2998
|
-
for (
|
|
2999
|
-
|
|
2996
|
+
if (B = 0, v = l(J, j, ye, V), v < 0) {
|
|
2997
|
+
if (ae = j[0], ye != V && (ae = ae * d + (j[1] || 0)), B = xe(ae / tt), B > 1)
|
|
2998
|
+
for (B >= d && (B = d - 1), G = s(J, B, d), Z = G.length, V = j.length; l(G, j, Z, V) == 1; )
|
|
2999
|
+
B--, a(G, ye < Z ? Oe : J, Z, d), Z = G.length, v = 1;
|
|
3000
3000
|
else
|
|
3001
|
-
|
|
3002
|
-
if (Z < V && (
|
|
3001
|
+
B == 0 && (v = B = 1), G = J.slice(), Z = G.length;
|
|
3002
|
+
if (Z < V && (G = [0].concat(G)), a(j, G, V, d), V = j.length, v == -1)
|
|
3003
3003
|
for (; l(J, j, ye, V) < 1; )
|
|
3004
|
-
|
|
3005
|
-
} else v === 0 && (
|
|
3006
|
-
ie[
|
|
3004
|
+
B++, a(j, ye < V ? Oe : J, V, d), V = j.length;
|
|
3005
|
+
} else v === 0 && (B++, j = [0]);
|
|
3006
|
+
ie[E++] = B, j[0] ? j[V++] = fe[Ge] || 0 : (j = [fe[Ge]], V = 1);
|
|
3007
3007
|
} while ((Ge++ < et || j[0] != null) && de--);
|
|
3008
3008
|
T = j[0] != null, ie[0] || ie.splice(0, 1);
|
|
3009
3009
|
}
|
|
3010
3010
|
if (d == Ce) {
|
|
3011
|
-
for (
|
|
3012
|
-
|
|
3011
|
+
for (E = 1, de = ie[0]; de >= 10; de /= 10, E++) ;
|
|
3012
|
+
q(K, p + (K.e = E + b * U - 1) + 1, y, T);
|
|
3013
3013
|
} else
|
|
3014
|
-
K.e =
|
|
3014
|
+
K.e = b, K.r = +T;
|
|
3015
3015
|
return K;
|
|
3016
3016
|
};
|
|
3017
3017
|
}();
|
|
3018
|
-
function
|
|
3019
|
-
var
|
|
3020
|
-
if (
|
|
3021
|
-
if (
|
|
3022
|
-
v = Se(s.c), v = m == 1 || m == 2 && (
|
|
3023
|
-
else if (s =
|
|
3018
|
+
function C(s, l, a, m) {
|
|
3019
|
+
var c, p, y, d, v;
|
|
3020
|
+
if (a == null ? a = o : re(a, 0, 8), !s.c) return s.toString();
|
|
3021
|
+
if (c = s.c[0], y = s.e, l == null)
|
|
3022
|
+
v = Se(s.c), v = m == 1 || m == 2 && (y <= g || y >= f) ? Rt(v, y) : ze(v, y, "0");
|
|
3023
|
+
else if (s = q(new S(s), l, a), p = s.e, v = Se(s.c), d = v.length, m == 1 || m == 2 && (l <= p || p <= g)) {
|
|
3024
3024
|
for (; d < l; v += "0", d++) ;
|
|
3025
|
-
v =
|
|
3026
|
-
} else if (l -=
|
|
3025
|
+
v = Rt(v, p);
|
|
3026
|
+
} else if (l -= y, v = ze(v, p, "0"), p + 1 > d) {
|
|
3027
3027
|
if (--l > 0) for (v += "."; l--; v += "0") ;
|
|
3028
|
-
} else if (l +=
|
|
3029
|
-
for (
|
|
3030
|
-
return s.s < 0 &&
|
|
3028
|
+
} else if (l += p - d, l > 0)
|
|
3029
|
+
for (p + 1 == d && (v += "."); l--; v += "0") ;
|
|
3030
|
+
return s.s < 0 && c ? "-" + v : v;
|
|
3031
3031
|
}
|
|
3032
|
-
function
|
|
3033
|
-
for (var
|
|
3034
|
-
m = new
|
|
3035
|
-
return
|
|
3032
|
+
function P(s, l) {
|
|
3033
|
+
for (var a, m, c = 1, p = new S(s[0]); c < s.length; c++)
|
|
3034
|
+
m = new S(s[c]), (!m.s || (a = nt(p, m)) === l || a === 0 && p.s === l) && (p = m);
|
|
3035
|
+
return p;
|
|
3036
3036
|
}
|
|
3037
|
-
function
|
|
3038
|
-
for (var m = 1,
|
|
3039
|
-
for (
|
|
3040
|
-
return (
|
|
3037
|
+
function z(s, l, a) {
|
|
3038
|
+
for (var m = 1, c = l.length; !l[--c]; l.pop()) ;
|
|
3039
|
+
for (c = l[0]; c >= 10; c /= 10, m++) ;
|
|
3040
|
+
return (a = m + a * U - 1) > _ ? s.c = s.e = null : a < w ? s.c = [s.e = 0] : (s.e = a, s.c = l), s;
|
|
3041
3041
|
}
|
|
3042
3042
|
n = /* @__PURE__ */ function() {
|
|
3043
|
-
var s = /^(-?)0([xbo])(?=\w[\w.]*$)/i, l = /^([^.]+)\.$/,
|
|
3044
|
-
return function(
|
|
3045
|
-
var
|
|
3046
|
-
if (m.test(
|
|
3047
|
-
|
|
3043
|
+
var s = /^(-?)0([xbo])(?=\w[\w.]*$)/i, l = /^([^.]+)\.$/, a = /^\.([^.]+)$/, m = /^-?(Infinity|NaN)$/, c = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
3044
|
+
return function(p, y, d, v) {
|
|
3045
|
+
var b, E = d ? y : y.replace(c, "");
|
|
3046
|
+
if (m.test(E))
|
|
3047
|
+
p.s = isNaN(E) ? null : E < 0 ? -1 : 1;
|
|
3048
3048
|
else {
|
|
3049
|
-
if (!d && (
|
|
3050
|
-
return
|
|
3051
|
-
}), v && (
|
|
3052
|
-
return new
|
|
3053
|
-
if (
|
|
3054
|
-
throw Error(pe + "Not a" + (v ? " base " + v : "") + " number: " +
|
|
3055
|
-
|
|
3049
|
+
if (!d && (E = E.replace(s, function(T, B, G) {
|
|
3050
|
+
return b = (G = G.toLowerCase()) == "x" ? 16 : G == "b" ? 2 : 8, !v || v == b ? B : T;
|
|
3051
|
+
}), v && (b = v, E = E.replace(l, "$1").replace(a, "0.$1")), y != E))
|
|
3052
|
+
return new S(E, b);
|
|
3053
|
+
if (S.DEBUG)
|
|
3054
|
+
throw Error(pe + "Not a" + (v ? " base " + v : "") + " number: " + y);
|
|
3055
|
+
p.s = null;
|
|
3056
3056
|
}
|
|
3057
|
-
|
|
3057
|
+
p.c = p.e = null;
|
|
3058
3058
|
};
|
|
3059
3059
|
}();
|
|
3060
|
-
function
|
|
3061
|
-
var
|
|
3060
|
+
function q(s, l, a, m) {
|
|
3061
|
+
var c, p, y, d, v, b, E, T = s.c, B = ti;
|
|
3062
3062
|
if (T) {
|
|
3063
3063
|
e: {
|
|
3064
|
-
for (
|
|
3065
|
-
if (
|
|
3066
|
-
|
|
3067
|
-
else if (
|
|
3064
|
+
for (c = 1, d = T[0]; d >= 10; d /= 10, c++) ;
|
|
3065
|
+
if (p = l - c, p < 0)
|
|
3066
|
+
p += U, y = l, v = T[b = 0], E = xe(v / B[c - y - 1] % 10);
|
|
3067
|
+
else if (b = ei((p + 1) / U), b >= T.length)
|
|
3068
3068
|
if (m) {
|
|
3069
|
-
for (; T.length <=
|
|
3070
|
-
v =
|
|
3069
|
+
for (; T.length <= b; T.push(0)) ;
|
|
3070
|
+
v = E = 0, c = 1, p %= U, y = p - U + 1;
|
|
3071
3071
|
} else
|
|
3072
3072
|
break e;
|
|
3073
3073
|
else {
|
|
3074
|
-
for (v = d = T[
|
|
3075
|
-
|
|
3074
|
+
for (v = d = T[b], c = 1; d >= 10; d /= 10, c++) ;
|
|
3075
|
+
p %= U, y = p - U + c, E = y < 0 ? 0 : xe(v / B[c - y - 1] % 10);
|
|
3076
3076
|
}
|
|
3077
3077
|
if (m = m || l < 0 || // Are there any non-zero digits after the rounding digit?
|
|
3078
3078
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
3079
3079
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
3080
|
-
T[
|
|
3081
|
-
(
|
|
3082
|
-
return T.length = 0, m ? (l -= s.e + 1, T[0] =
|
|
3083
|
-
if (
|
|
3080
|
+
T[b + 1] != null || (y < 0 ? v : v % B[c - y - 1]), m = a < 4 ? (E || m) && (a == 0 || a == (s.s < 0 ? 3 : 2)) : E > 5 || E == 5 && (a == 4 || m || a == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
3081
|
+
(p > 0 ? y > 0 ? v / B[c - y] : 0 : T[b - 1]) % 10 & 1 || a == (s.s < 0 ? 8 : 7)), l < 1 || !T[0])
|
|
3082
|
+
return T.length = 0, m ? (l -= s.e + 1, T[0] = B[(U - l % U) % U], s.e = -l || 0) : T[0] = s.e = 0, s;
|
|
3083
|
+
if (p == 0 ? (T.length = b, d = 1, b--) : (T.length = b + 1, d = B[U - p], T[b] = y > 0 ? xe(v / B[c - y] % B[y]) * d : 0), m)
|
|
3084
3084
|
for (; ; )
|
|
3085
|
-
if (
|
|
3086
|
-
for (
|
|
3087
|
-
for (
|
|
3088
|
-
|
|
3085
|
+
if (b == 0) {
|
|
3086
|
+
for (p = 1, y = T[0]; y >= 10; y /= 10, p++) ;
|
|
3087
|
+
for (y = T[0] += d, d = 1; y >= 10; y /= 10, d++) ;
|
|
3088
|
+
p != d && (s.e++, T[0] == Ce && (T[0] = 1));
|
|
3089
3089
|
break;
|
|
3090
3090
|
} else {
|
|
3091
|
-
if (T[
|
|
3092
|
-
T[
|
|
3091
|
+
if (T[b] += d, T[b] != Ce) break;
|
|
3092
|
+
T[b--] = 0, d = 1;
|
|
3093
3093
|
}
|
|
3094
|
-
for (
|
|
3094
|
+
for (p = T.length; T[--p] === 0; T.pop()) ;
|
|
3095
3095
|
}
|
|
3096
|
-
s.e >
|
|
3096
|
+
s.e > _ ? s.c = s.e = null : s.e < w && (s.c = [s.e = 0]);
|
|
3097
3097
|
}
|
|
3098
3098
|
return s;
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3101
|
-
var l,
|
|
3102
|
-
return
|
|
3100
|
+
function A(s) {
|
|
3101
|
+
var l, a = s.e;
|
|
3102
|
+
return a === null ? s.toString() : (l = Se(s.c), l = a <= g || a >= f ? Rt(l, a) : ze(l, a, "0"), s.s < 0 ? "-" + l : l);
|
|
3103
3103
|
}
|
|
3104
3104
|
return r.absoluteValue = r.abs = function() {
|
|
3105
|
-
var s = new
|
|
3105
|
+
var s = new S(this);
|
|
3106
3106
|
return s.s < 0 && (s.s = 1), s;
|
|
3107
3107
|
}, r.comparedTo = function(s, l) {
|
|
3108
|
-
return nt(this, new
|
|
3108
|
+
return nt(this, new S(s, l));
|
|
3109
3109
|
}, r.decimalPlaces = r.dp = function(s, l) {
|
|
3110
|
-
var
|
|
3110
|
+
var a, m, c, p = this;
|
|
3111
3111
|
if (s != null)
|
|
3112
|
-
return re(s, 0, we), l == null ? l = o : re(l, 0, 8),
|
|
3113
|
-
if (!(
|
|
3114
|
-
if (m = ((
|
|
3112
|
+
return re(s, 0, we), l == null ? l = o : re(l, 0, 8), q(new S(p), s + p.e + 1, l);
|
|
3113
|
+
if (!(a = p.c)) return null;
|
|
3114
|
+
if (m = ((c = a.length - 1) - Te(this.e / U)) * U, c = a[c]) for (; c % 10 == 0; c /= 10, m--) ;
|
|
3115
3115
|
return m < 0 && (m = 0), m;
|
|
3116
3116
|
}, r.dividedBy = r.div = function(s, l) {
|
|
3117
|
-
return e(this, new
|
|
3117
|
+
return e(this, new S(s, l), h, o);
|
|
3118
3118
|
}, r.dividedToIntegerBy = r.idiv = function(s, l) {
|
|
3119
|
-
return e(this, new
|
|
3119
|
+
return e(this, new S(s, l), 0, 1);
|
|
3120
3120
|
}, r.exponentiatedBy = r.pow = function(s, l) {
|
|
3121
|
-
var
|
|
3122
|
-
if (s = new
|
|
3123
|
-
throw Error(pe + "Exponent not an integer: " +
|
|
3124
|
-
if (l != null && (l = new
|
|
3125
|
-
return
|
|
3121
|
+
var a, m, c, p, y, d, v, b, E, T = this;
|
|
3122
|
+
if (s = new S(s), s.c && !s.isInteger())
|
|
3123
|
+
throw Error(pe + "Exponent not an integer: " + A(s));
|
|
3124
|
+
if (l != null && (l = new S(l)), d = s.e > 14, !T.c || !T.c[0] || T.c[0] == 1 && !T.e && T.c.length == 1 || !s.c || !s.c[0])
|
|
3125
|
+
return E = new S(Math.pow(+A(T), d ? s.s * (2 - Ot(s)) : +A(s))), l ? E.mod(l) : E;
|
|
3126
3126
|
if (v = s.s < 0, l) {
|
|
3127
|
-
if (l.c ? !l.c[0] : !l.s) return new
|
|
3127
|
+
if (l.c ? !l.c[0] : !l.s) return new S(NaN);
|
|
3128
3128
|
m = !v && T.isInteger() && l.isInteger(), m && (T = T.mod(l));
|
|
3129
3129
|
} else {
|
|
3130
3130
|
if (s.e > 9 && (T.e > 0 || T.e < -1 || (T.e == 0 ? T.c[0] > 1 || d && T.c[1] >= 24e7 : T.c[0] < 8e13 || d && T.c[0] <= 9999975e7)))
|
|
3131
|
-
return
|
|
3132
|
-
O && (
|
|
3131
|
+
return p = T.s < 0 && Ot(s) ? -0 : 0, T.e > -1 && (p = 1 / p), new S(v ? 1 / p : p);
|
|
3132
|
+
O && (p = ei(O / U + 2));
|
|
3133
3133
|
}
|
|
3134
|
-
for (d ? (
|
|
3135
|
-
if (
|
|
3136
|
-
if (
|
|
3137
|
-
|
|
3134
|
+
for (d ? (a = new S(0.5), v && (s.s = 1), b = Ot(s)) : (c = Math.abs(+A(s)), b = c % 2), E = new S(u); ; ) {
|
|
3135
|
+
if (b) {
|
|
3136
|
+
if (E = E.times(T), !E.c) break;
|
|
3137
|
+
p ? E.c.length > p && (E.c.length = p) : m && (E = E.mod(l));
|
|
3138
3138
|
}
|
|
3139
|
-
if (
|
|
3140
|
-
if (
|
|
3141
|
-
|
|
3142
|
-
} else if (s = s.times(
|
|
3143
|
-
|
|
3139
|
+
if (c) {
|
|
3140
|
+
if (c = xe(c / 2), c === 0) break;
|
|
3141
|
+
b = c % 2;
|
|
3142
|
+
} else if (s = s.times(a), q(s, s.e + 1, 1), s.e > 14)
|
|
3143
|
+
b = Ot(s);
|
|
3144
3144
|
else {
|
|
3145
|
-
if (
|
|
3146
|
-
|
|
3145
|
+
if (c = +A(s), c === 0) break;
|
|
3146
|
+
b = c % 2;
|
|
3147
3147
|
}
|
|
3148
|
-
T = T.times(T),
|
|
3148
|
+
T = T.times(T), p ? T.c && T.c.length > p && (T.c.length = p) : m && (T = T.mod(l));
|
|
3149
3149
|
}
|
|
3150
|
-
return m ?
|
|
3150
|
+
return m ? E : (v && (E = u.div(E)), l ? E.mod(l) : p ? q(E, O, o, y) : E);
|
|
3151
3151
|
}, r.integerValue = function(s) {
|
|
3152
|
-
var l = new
|
|
3153
|
-
return s == null ? s = o : re(s, 0, 8),
|
|
3152
|
+
var l = new S(this);
|
|
3153
|
+
return s == null ? s = o : re(s, 0, 8), q(l, l.e + 1, s);
|
|
3154
3154
|
}, r.isEqualTo = r.eq = function(s, l) {
|
|
3155
|
-
return nt(this, new
|
|
3155
|
+
return nt(this, new S(s, l)) === 0;
|
|
3156
3156
|
}, r.isFinite = function() {
|
|
3157
3157
|
return !!this.c;
|
|
3158
3158
|
}, r.isGreaterThan = r.gt = function(s, l) {
|
|
3159
|
-
return nt(this, new
|
|
3159
|
+
return nt(this, new S(s, l)) > 0;
|
|
3160
3160
|
}, r.isGreaterThanOrEqualTo = r.gte = function(s, l) {
|
|
3161
|
-
return (l = nt(this, new
|
|
3161
|
+
return (l = nt(this, new S(s, l))) === 1 || l === 0;
|
|
3162
3162
|
}, r.isInteger = function() {
|
|
3163
3163
|
return !!this.c && Te(this.e / U) > this.c.length - 2;
|
|
3164
3164
|
}, r.isLessThan = r.lt = function(s, l) {
|
|
3165
|
-
return nt(this, new
|
|
3165
|
+
return nt(this, new S(s, l)) < 0;
|
|
3166
3166
|
}, r.isLessThanOrEqualTo = r.lte = function(s, l) {
|
|
3167
|
-
return (l = nt(this, new
|
|
3167
|
+
return (l = nt(this, new S(s, l))) === -1 || l === 0;
|
|
3168
3168
|
}, r.isNaN = function() {
|
|
3169
3169
|
return !this.s;
|
|
3170
3170
|
}, r.isNegative = function() {
|
|
@@ -3174,145 +3174,145 @@ function fn(i) {
|
|
|
3174
3174
|
}, r.isZero = function() {
|
|
3175
3175
|
return !!this.c && this.c[0] == 0;
|
|
3176
3176
|
}, r.minus = function(s, l) {
|
|
3177
|
-
var
|
|
3178
|
-
if (s = new
|
|
3177
|
+
var a, m, c, p, y = this, d = y.s;
|
|
3178
|
+
if (s = new S(s, l), l = s.s, !d || !l) return new S(NaN);
|
|
3179
3179
|
if (d != l)
|
|
3180
|
-
return s.s = -l,
|
|
3181
|
-
var v =
|
|
3182
|
-
if (!v || !
|
|
3183
|
-
if (!
|
|
3184
|
-
if (!
|
|
3185
|
-
return T[0] ? (s.s = -l, s) : new
|
|
3180
|
+
return s.s = -l, y.plus(s);
|
|
3181
|
+
var v = y.e / U, b = s.e / U, E = y.c, T = s.c;
|
|
3182
|
+
if (!v || !b) {
|
|
3183
|
+
if (!E || !T) return E ? (s.s = -l, s) : new S(T ? y : NaN);
|
|
3184
|
+
if (!E[0] || !T[0])
|
|
3185
|
+
return T[0] ? (s.s = -l, s) : new S(E[0] ? y : (
|
|
3186
3186
|
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
|
|
3187
3187
|
o == 3 ? -0 : 0
|
|
3188
3188
|
));
|
|
3189
3189
|
}
|
|
3190
|
-
if (v = Te(v),
|
|
3191
|
-
for ((
|
|
3192
|
-
|
|
3190
|
+
if (v = Te(v), b = Te(b), E = E.slice(), d = v - b) {
|
|
3191
|
+
for ((p = d < 0) ? (d = -d, c = E) : (b = v, c = T), c.reverse(), l = d; l--; c.push(0)) ;
|
|
3192
|
+
c.reverse();
|
|
3193
3193
|
} else
|
|
3194
|
-
for (m = (
|
|
3195
|
-
if (
|
|
3196
|
-
|
|
3194
|
+
for (m = (p = (d = E.length) < (l = T.length)) ? d : l, d = l = 0; l < m; l++)
|
|
3195
|
+
if (E[l] != T[l]) {
|
|
3196
|
+
p = E[l] < T[l];
|
|
3197
3197
|
break;
|
|
3198
3198
|
}
|
|
3199
|
-
if (
|
|
3199
|
+
if (p && (c = E, E = T, T = c, s.s = -s.s), l = (m = T.length) - (a = E.length), l > 0) for (; l--; E[a++] = 0) ;
|
|
3200
3200
|
for (l = Ce - 1; m > d; ) {
|
|
3201
|
-
if (
|
|
3202
|
-
for (
|
|
3203
|
-
--
|
|
3201
|
+
if (E[--m] < T[m]) {
|
|
3202
|
+
for (a = m; a && !E[--a]; E[a] = l) ;
|
|
3203
|
+
--E[a], E[m] += Ce;
|
|
3204
3204
|
}
|
|
3205
|
-
|
|
3205
|
+
E[m] -= T[m];
|
|
3206
3206
|
}
|
|
3207
|
-
for (;
|
|
3208
|
-
return
|
|
3207
|
+
for (; E[0] == 0; E.splice(0, 1), --b) ;
|
|
3208
|
+
return E[0] ? z(s, E, b) : (s.s = o == 3 ? -1 : 1, s.c = [s.e = 0], s);
|
|
3209
3209
|
}, r.modulo = r.mod = function(s, l) {
|
|
3210
|
-
var
|
|
3211
|
-
return s = new
|
|
3210
|
+
var a, m, c = this;
|
|
3211
|
+
return s = new S(s, l), !c.c || !s.s || s.c && !s.c[0] ? new S(NaN) : !s.c || c.c && !c.c[0] ? new S(c) : (R == 9 ? (m = s.s, s.s = 1, a = e(c, s, 0, 3), s.s = m, a.s *= m) : a = e(c, s, 0, R), s = c.minus(a.times(s)), !s.c[0] && R == 1 && (s.s = c.s), s);
|
|
3212
3212
|
}, r.multipliedBy = r.times = function(s, l) {
|
|
3213
|
-
var
|
|
3213
|
+
var a, m, c, p, y, d, v, b, E, T, B, G, Z, K, ie, j = this, V = j.c, ae = (s = new S(s, l)).c;
|
|
3214
3214
|
if (!V || !ae || !V[0] || !ae[0])
|
|
3215
3215
|
return !j.s || !s.s || V && !V[0] && !ae || ae && !ae[0] && !V ? s.c = s.e = s.s = null : (s.s *= j.s, !V || !ae ? s.c = s.e = null : (s.c = [0], s.e = 0)), s;
|
|
3216
|
-
for (m = Te(j.e / U) + Te(s.e / U), s.s *= j.s, v = V.length, T = ae.length, v < T && (Z = V, V = ae, ae = Z,
|
|
3217
|
-
for (K = Ce, ie = Ve,
|
|
3218
|
-
for (
|
|
3219
|
-
|
|
3220
|
-
Z[
|
|
3216
|
+
for (m = Te(j.e / U) + Te(s.e / U), s.s *= j.s, v = V.length, T = ae.length, v < T && (Z = V, V = ae, ae = Z, c = v, v = T, T = c), c = v + T, Z = []; c--; Z.push(0)) ;
|
|
3217
|
+
for (K = Ce, ie = Ve, c = T; --c >= 0; ) {
|
|
3218
|
+
for (a = 0, B = ae[c] % ie, G = ae[c] / ie | 0, y = v, p = c + y; p > c; )
|
|
3219
|
+
b = V[--y] % ie, E = V[y] / ie | 0, d = G * b + E * B, b = B * b + d % ie * ie + Z[p] + a, a = (b / K | 0) + (d / ie | 0) + G * E, Z[p--] = b % K;
|
|
3220
|
+
Z[p] = a;
|
|
3221
3221
|
}
|
|
3222
|
-
return
|
|
3222
|
+
return a ? ++m : Z.splice(0, 1), z(s, Z, m);
|
|
3223
3223
|
}, r.negated = function() {
|
|
3224
|
-
var s = new
|
|
3224
|
+
var s = new S(this);
|
|
3225
3225
|
return s.s = -s.s || null, s;
|
|
3226
3226
|
}, r.plus = function(s, l) {
|
|
3227
|
-
var
|
|
3228
|
-
if (s = new
|
|
3229
|
-
if (
|
|
3227
|
+
var a, m = this, c = m.s;
|
|
3228
|
+
if (s = new S(s, l), l = s.s, !c || !l) return new S(NaN);
|
|
3229
|
+
if (c != l)
|
|
3230
3230
|
return s.s = -l, m.minus(s);
|
|
3231
|
-
var
|
|
3232
|
-
if (!
|
|
3233
|
-
if (!d || !v) return new
|
|
3234
|
-
if (!d[0] || !v[0]) return v[0] ? s : new
|
|
3235
|
-
}
|
|
3236
|
-
if (
|
|
3237
|
-
for (
|
|
3238
|
-
|
|
3239
|
-
}
|
|
3240
|
-
for (
|
|
3241
|
-
|
|
3242
|
-
return
|
|
3231
|
+
var p = m.e / U, y = s.e / U, d = m.c, v = s.c;
|
|
3232
|
+
if (!p || !y) {
|
|
3233
|
+
if (!d || !v) return new S(c / 0);
|
|
3234
|
+
if (!d[0] || !v[0]) return v[0] ? s : new S(d[0] ? m : c * 0);
|
|
3235
|
+
}
|
|
3236
|
+
if (p = Te(p), y = Te(y), d = d.slice(), c = p - y) {
|
|
3237
|
+
for (c > 0 ? (y = p, a = v) : (c = -c, a = d), a.reverse(); c--; a.push(0)) ;
|
|
3238
|
+
a.reverse();
|
|
3239
|
+
}
|
|
3240
|
+
for (c = d.length, l = v.length, c - l < 0 && (a = v, v = d, d = a, l = c), c = 0; l; )
|
|
3241
|
+
c = (d[--l] = d[l] + v[l] + c) / Ce | 0, d[l] = Ce === d[l] ? 0 : d[l] % Ce;
|
|
3242
|
+
return c && (d = [c].concat(d), ++y), z(s, d, y);
|
|
3243
3243
|
}, r.precision = r.sd = function(s, l) {
|
|
3244
|
-
var
|
|
3244
|
+
var a, m, c, p = this;
|
|
3245
3245
|
if (s != null && s !== !!s)
|
|
3246
|
-
return re(s, 1, we), l == null ? l = o : re(l, 0, 8),
|
|
3247
|
-
if (!(
|
|
3248
|
-
if (
|
|
3249
|
-
for (;
|
|
3250
|
-
for (
|
|
3246
|
+
return re(s, 1, we), l == null ? l = o : re(l, 0, 8), q(new S(p), s, l);
|
|
3247
|
+
if (!(a = p.c)) return null;
|
|
3248
|
+
if (c = a.length - 1, m = c * U + 1, c = a[c]) {
|
|
3249
|
+
for (; c % 10 == 0; c /= 10, m--) ;
|
|
3250
|
+
for (c = a[0]; c >= 10; c /= 10, m++) ;
|
|
3251
3251
|
}
|
|
3252
|
-
return s &&
|
|
3252
|
+
return s && p.e + 1 > m && (m = p.e + 1), m;
|
|
3253
3253
|
}, r.shiftedBy = function(s) {
|
|
3254
3254
|
return re(s, -9007199254740991, zi), this.times("1e" + s);
|
|
3255
3255
|
}, r.squareRoot = r.sqrt = function() {
|
|
3256
|
-
var s, l,
|
|
3257
|
-
if (d !== 1 || !
|
|
3258
|
-
return new
|
|
3259
|
-
if (d = Math.sqrt(+
|
|
3260
|
-
for (v =
|
|
3261
|
-
if (
|
|
3262
|
-
if (
|
|
3263
|
-
if (!m && (
|
|
3264
|
-
|
|
3256
|
+
var s, l, a, m, c, p = this, y = p.c, d = p.s, v = p.e, b = h + 4, E = new S("0.5");
|
|
3257
|
+
if (d !== 1 || !y || !y[0])
|
|
3258
|
+
return new S(!d || d < 0 && (!y || y[0]) ? NaN : y ? p : 1 / 0);
|
|
3259
|
+
if (d = Math.sqrt(+A(p)), d == 0 || d == 1 / 0 ? (l = Se(y), (l.length + v) % 2 == 0 && (l += "0"), d = Math.sqrt(+l), v = Te((v + 1) / 2) - (v < 0 || v % 2), d == 1 / 0 ? l = "5e" + v : (l = d.toExponential(), l = l.slice(0, l.indexOf("e") + 1) + v), a = new S(l)) : a = new S(d + ""), a.c[0]) {
|
|
3260
|
+
for (v = a.e, d = v + b, d < 3 && (d = 0); ; )
|
|
3261
|
+
if (c = a, a = E.times(c.plus(e(p, c, b, 1))), Se(c.c).slice(0, d) === (l = Se(a.c)).slice(0, d))
|
|
3262
|
+
if (a.e < v && --d, l = l.slice(d - 3, d + 1), l == "9999" || !m && l == "4999") {
|
|
3263
|
+
if (!m && (q(c, c.e + h + 2, 0), c.times(c).eq(p))) {
|
|
3264
|
+
a = c;
|
|
3265
3265
|
break;
|
|
3266
3266
|
}
|
|
3267
|
-
|
|
3267
|
+
b += 4, d += 4, m = 1;
|
|
3268
3268
|
} else {
|
|
3269
|
-
(!+l || !+l.slice(1) && l.charAt(0) == "5") && (
|
|
3269
|
+
(!+l || !+l.slice(1) && l.charAt(0) == "5") && (q(a, a.e + h + 2, 1), s = !a.times(a).eq(p));
|
|
3270
3270
|
break;
|
|
3271
3271
|
}
|
|
3272
3272
|
}
|
|
3273
|
-
return
|
|
3273
|
+
return q(a, a.e + h + 1, o, s);
|
|
3274
3274
|
}, r.toExponential = function(s, l) {
|
|
3275
|
-
return s != null && (re(s, 0, we), s++),
|
|
3275
|
+
return s != null && (re(s, 0, we), s++), C(this, s, l, 1);
|
|
3276
3276
|
}, r.toFixed = function(s, l) {
|
|
3277
|
-
return s != null && (re(s, 0, we), s = s + this.e + 1),
|
|
3278
|
-
}, r.toFormat = function(s, l,
|
|
3279
|
-
var m,
|
|
3280
|
-
if (
|
|
3281
|
-
s != null && l && typeof l == "object" ? (
|
|
3282
|
-
else if (typeof
|
|
3283
|
-
throw Error(pe + "Argument not an object: " +
|
|
3284
|
-
if (m =
|
|
3285
|
-
var
|
|
3286
|
-
if (v && (
|
|
3287
|
-
for (
|
|
3288
|
-
v > 0 && (
|
|
3277
|
+
return s != null && (re(s, 0, we), s = s + this.e + 1), C(this, s, l);
|
|
3278
|
+
}, r.toFormat = function(s, l, a) {
|
|
3279
|
+
var m, c = this;
|
|
3280
|
+
if (a == null)
|
|
3281
|
+
s != null && l && typeof l == "object" ? (a = l, l = null) : s && typeof s == "object" ? (a = s, s = l = null) : a = W;
|
|
3282
|
+
else if (typeof a != "object")
|
|
3283
|
+
throw Error(pe + "Argument not an object: " + a);
|
|
3284
|
+
if (m = c.toFixed(s, l), c.c) {
|
|
3285
|
+
var p, y = m.split("."), d = +a.groupSize, v = +a.secondaryGroupSize, b = a.groupSeparator || "", E = y[0], T = y[1], B = c.s < 0, G = B ? E.slice(1) : E, Z = G.length;
|
|
3286
|
+
if (v && (p = d, d = v, v = p, Z -= p), d > 0 && Z > 0) {
|
|
3287
|
+
for (p = Z % d || d, E = G.substr(0, p); p < Z; p += d) E += b + G.substr(p, d);
|
|
3288
|
+
v > 0 && (E += b + G.slice(p)), B && (E = "-" + E);
|
|
3289
3289
|
}
|
|
3290
|
-
m = T ?
|
|
3290
|
+
m = T ? E + (a.decimalSeparator || "") + ((v = +a.fractionGroupSize) ? T.replace(
|
|
3291
3291
|
new RegExp("\\d{" + v + "}\\B", "g"),
|
|
3292
|
-
"$&" + (
|
|
3293
|
-
) : T) :
|
|
3292
|
+
"$&" + (a.fractionGroupSeparator || "")
|
|
3293
|
+
) : T) : E;
|
|
3294
3294
|
}
|
|
3295
|
-
return (
|
|
3295
|
+
return (a.prefix || "") + m + (a.suffix || "");
|
|
3296
3296
|
}, r.toFraction = function(s) {
|
|
3297
|
-
var l,
|
|
3298
|
-
if (s != null && (d = new
|
|
3299
|
-
throw Error(pe + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") +
|
|
3300
|
-
if (!Z) return new
|
|
3301
|
-
for (l = new
|
|
3302
|
-
|
|
3303
|
-
return
|
|
3304
|
-
e(v,
|
|
3305
|
-
) < 1 ? [
|
|
3297
|
+
var l, a, m, c, p, y, d, v, b, E, T, B, G = this, Z = G.c;
|
|
3298
|
+
if (s != null && (d = new S(s), !d.isInteger() && (d.c || d.s !== 1) || d.lt(u)))
|
|
3299
|
+
throw Error(pe + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") + A(d));
|
|
3300
|
+
if (!Z) return new S(G);
|
|
3301
|
+
for (l = new S(u), b = a = new S(u), m = v = new S(u), B = Se(Z), p = l.e = B.length - G.e - 1, l.c[0] = ti[(y = p % U) < 0 ? U + y : y], s = !s || d.comparedTo(l) > 0 ? p > 0 ? l : b : d, y = _, _ = 1 / 0, d = new S(B), v.c[0] = 0; E = e(d, l, 0, 1), c = a.plus(E.times(m)), c.comparedTo(s) != 1; )
|
|
3302
|
+
a = m, m = c, b = v.plus(E.times(c = b)), v = c, l = d.minus(E.times(c = l)), d = c;
|
|
3303
|
+
return c = e(s.minus(a), m, 0, 1), v = v.plus(c.times(b)), a = a.plus(c.times(m)), v.s = b.s = G.s, p = p * 2, T = e(b, m, p, o).minus(G).abs().comparedTo(
|
|
3304
|
+
e(v, a, p, o).minus(G).abs()
|
|
3305
|
+
) < 1 ? [b, m] : [v, a], _ = y, T;
|
|
3306
3306
|
}, r.toNumber = function() {
|
|
3307
|
-
return +
|
|
3307
|
+
return +A(this);
|
|
3308
3308
|
}, r.toPrecision = function(s, l) {
|
|
3309
|
-
return s != null && re(s, 1, we),
|
|
3309
|
+
return s != null && re(s, 1, we), C(this, s, l, 2);
|
|
3310
3310
|
}, r.toString = function(s) {
|
|
3311
|
-
var l,
|
|
3312
|
-
return
|
|
3311
|
+
var l, a = this, m = a.s, c = a.e;
|
|
3312
|
+
return c === null ? m ? (l = "Infinity", m < 0 && (l = "-" + l)) : l = "NaN" : (s == null ? l = c <= g || c >= f ? Rt(Se(a.c), c) : ze(Se(a.c), c, "0") : s === 10 && k ? (a = q(new S(a), h + c + 1, o), l = ze(Se(a.c), a.e, "0")) : (re(s, 2, M.length, "Base"), l = t(ze(Se(a.c), c, "0"), 10, s, m, !0)), m < 0 && a.c[0] && (l = "-" + l)), l;
|
|
3313
3313
|
}, r.valueOf = r.toJSON = function() {
|
|
3314
|
-
return
|
|
3315
|
-
}, r._isBigNumber = !0, r[Symbol.toStringTag] = "BigNumber", r[Symbol.for("nodejs.util.inspect.custom")] = r.valueOf, i != null &&
|
|
3314
|
+
return A(this);
|
|
3315
|
+
}, r._isBigNumber = !0, r[Symbol.toStringTag] = "BigNumber", r[Symbol.for("nodejs.util.inspect.custom")] = r.valueOf, i != null && S.set(i), S;
|
|
3316
3316
|
}
|
|
3317
3317
|
function Te(i) {
|
|
3318
3318
|
var e = i | 0;
|
|
@@ -3327,24 +3327,24 @@ function Se(i) {
|
|
|
3327
3327
|
return u.slice(0, r + 1 || 1);
|
|
3328
3328
|
}
|
|
3329
3329
|
function nt(i, e) {
|
|
3330
|
-
var t, n, r = i.c, u = e.c, h = i.s, o = e.s, g = i.e,
|
|
3330
|
+
var t, n, r = i.c, u = e.c, h = i.s, o = e.s, g = i.e, f = e.e;
|
|
3331
3331
|
if (!h || !o) return null;
|
|
3332
3332
|
if (t = r && !r[0], n = u && !u[0], t || n) return t ? n ? 0 : -o : h;
|
|
3333
3333
|
if (h != o) return h;
|
|
3334
|
-
if (t = h < 0, n = g ==
|
|
3335
|
-
if (!n) return g >
|
|
3336
|
-
for (o = (g = r.length) < (
|
|
3337
|
-
return g ==
|
|
3334
|
+
if (t = h < 0, n = g == f, !r || !u) return n ? 0 : !r ^ t ? 1 : -1;
|
|
3335
|
+
if (!n) return g > f ^ t ? 1 : -1;
|
|
3336
|
+
for (o = (g = r.length) < (f = u.length) ? g : f, h = 0; h < o; h++) if (r[h] != u[h]) return r[h] > u[h] ^ t ? 1 : -1;
|
|
3337
|
+
return g == f ? 0 : g > f ^ t ? 1 : -1;
|
|
3338
3338
|
}
|
|
3339
3339
|
function re(i, e, t, n) {
|
|
3340
3340
|
if (i < e || i > t || i !== xe(i))
|
|
3341
3341
|
throw Error(pe + (n || "Argument") + (typeof i == "number" ? i < e || i > t ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(i));
|
|
3342
3342
|
}
|
|
3343
|
-
function
|
|
3343
|
+
function Ot(i) {
|
|
3344
3344
|
var e = i.c.length - 1;
|
|
3345
3345
|
return Te(i.e / U) == e && i.c[e] % 2 != 0;
|
|
3346
3346
|
}
|
|
3347
|
-
function
|
|
3347
|
+
function Rt(i, e) {
|
|
3348
3348
|
return (i.length > 1 ? i.charAt(0) + "." + i.slice(1) : i) + (e < 0 ? "e" : "e+") + e;
|
|
3349
3349
|
}
|
|
3350
3350
|
function ze(i, e, t) {
|
|
@@ -3360,20 +3360,20 @@ function ze(i, e, t) {
|
|
|
3360
3360
|
}
|
|
3361
3361
|
var We = fn(), Jr = class {
|
|
3362
3362
|
constructor(i) {
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3363
|
+
I(this, "key");
|
|
3364
|
+
I(this, "left", null);
|
|
3365
|
+
I(this, "right", null);
|
|
3366
3366
|
this.key = i;
|
|
3367
3367
|
}
|
|
3368
|
-
},
|
|
3368
|
+
}, yt = class extends Jr {
|
|
3369
3369
|
constructor(i) {
|
|
3370
3370
|
super(i);
|
|
3371
3371
|
}
|
|
3372
3372
|
}, $r = class {
|
|
3373
3373
|
constructor() {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3374
|
+
I(this, "size", 0);
|
|
3375
|
+
I(this, "modificationCount", 0);
|
|
3376
|
+
I(this, "splayCount", 0);
|
|
3377
3377
|
}
|
|
3378
3378
|
splay(i) {
|
|
3379
3379
|
const e = this.root;
|
|
@@ -3384,15 +3384,15 @@ var We = fn(), Jr = class {
|
|
|
3384
3384
|
let g;
|
|
3385
3385
|
for (; ; )
|
|
3386
3386
|
if (g = o(h.key, i), g > 0) {
|
|
3387
|
-
let
|
|
3388
|
-
if (
|
|
3387
|
+
let f = h.left;
|
|
3388
|
+
if (f == null || (g = o(f.key, i), g > 0 && (h.left = f.right, f.right = h, h = f, f = h.left, f == null)))
|
|
3389
3389
|
break;
|
|
3390
|
-
t == null ? n = h : t.left = h, t = h, h =
|
|
3390
|
+
t == null ? n = h : t.left = h, t = h, h = f;
|
|
3391
3391
|
} else if (g < 0) {
|
|
3392
|
-
let
|
|
3393
|
-
if (
|
|
3392
|
+
let f = h.right;
|
|
3393
|
+
if (f == null || (g = o(f.key, i), g < 0 && (h.right = f.left, f.left = h, h = f, f = h.right, f == null)))
|
|
3394
3394
|
break;
|
|
3395
|
-
r == null ? u = h : r.right = h, r = h, h =
|
|
3395
|
+
r == null ? u = h : r.right = h, r = h, h = f;
|
|
3396
3396
|
} else
|
|
3397
3397
|
break;
|
|
3398
3398
|
return r != null && (r.right = h.left, h.left = u), t != null && (t.left = h.right, h.right = n), this.root !== h && (this.root = h, this.splayCount++), g;
|
|
@@ -3467,13 +3467,13 @@ var We = fn(), Jr = class {
|
|
|
3467
3467
|
has: (i) => this.has(i)
|
|
3468
3468
|
};
|
|
3469
3469
|
}
|
|
3470
|
-
}, Xi, Ji,
|
|
3470
|
+
}, Xi, Ji, Ut = class bt extends $r {
|
|
3471
3471
|
constructor(t, n) {
|
|
3472
3472
|
super();
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3473
|
+
I(this, "root", null);
|
|
3474
|
+
I(this, "compare");
|
|
3475
|
+
I(this, "validKey");
|
|
3476
|
+
I(this, Xi, "[object Set]");
|
|
3477
3477
|
this.compare = t ?? this.defaultCompare(), this.validKey = n ?? ((r) => r != null && r != null);
|
|
3478
3478
|
}
|
|
3479
3479
|
delete(t) {
|
|
@@ -3491,11 +3491,11 @@ var We = fn(), Jr = class {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
add(t) {
|
|
3493
3493
|
const n = this.splay(t);
|
|
3494
|
-
return n != 0 && this.addNewRoot(new
|
|
3494
|
+
return n != 0 && this.addNewRoot(new yt(t), n), this;
|
|
3495
3495
|
}
|
|
3496
3496
|
addAndReturn(t) {
|
|
3497
3497
|
const n = this.splay(t);
|
|
3498
|
-
return n != 0 && this.addNewRoot(new
|
|
3498
|
+
return n != 0 && this.addNewRoot(new yt(t), n), this.root.key;
|
|
3499
3499
|
}
|
|
3500
3500
|
addAll(t) {
|
|
3501
3501
|
for (const n of t)
|
|
@@ -3543,7 +3543,7 @@ var We = fn(), Jr = class {
|
|
|
3543
3543
|
return r.key;
|
|
3544
3544
|
}
|
|
3545
3545
|
retainAll(t) {
|
|
3546
|
-
const n = new
|
|
3546
|
+
const n = new bt(this.compare, this.validKey), r = this.modificationCount;
|
|
3547
3547
|
for (const u of t) {
|
|
3548
3548
|
if (r != this.modificationCount)
|
|
3549
3549
|
throw "Concurrent modification during iteration.";
|
|
@@ -3555,13 +3555,13 @@ var We = fn(), Jr = class {
|
|
|
3555
3555
|
return !this.validKey(t) || this.splay(t) != 0 ? null : this.root.key;
|
|
3556
3556
|
}
|
|
3557
3557
|
intersection(t) {
|
|
3558
|
-
const n = new
|
|
3558
|
+
const n = new bt(this.compare, this.validKey);
|
|
3559
3559
|
for (const r of this)
|
|
3560
3560
|
t.has(r) && n.add(r);
|
|
3561
3561
|
return n;
|
|
3562
3562
|
}
|
|
3563
3563
|
difference(t) {
|
|
3564
|
-
const n = new
|
|
3564
|
+
const n = new bt(this.compare, this.validKey);
|
|
3565
3565
|
for (const r of this)
|
|
3566
3566
|
t.has(r) || n.add(r);
|
|
3567
3567
|
return n;
|
|
@@ -3571,7 +3571,7 @@ var We = fn(), Jr = class {
|
|
|
3571
3571
|
return n.addAll(t), n;
|
|
3572
3572
|
}
|
|
3573
3573
|
clone() {
|
|
3574
|
-
const t = new
|
|
3574
|
+
const t = new bt(this.compare, this.validKey);
|
|
3575
3575
|
return t.size = this.size, t.root = this.copyNode(this.root), t;
|
|
3576
3576
|
}
|
|
3577
3577
|
copyNode(t) {
|
|
@@ -3580,16 +3580,16 @@ var We = fn(), Jr = class {
|
|
|
3580
3580
|
let o, g;
|
|
3581
3581
|
do {
|
|
3582
3582
|
if (o = u.left, g = u.right, o != null) {
|
|
3583
|
-
const
|
|
3584
|
-
h.left =
|
|
3583
|
+
const f = new yt(o.key);
|
|
3584
|
+
h.left = f, n(o, f);
|
|
3585
3585
|
}
|
|
3586
3586
|
if (g != null) {
|
|
3587
|
-
const
|
|
3588
|
-
h.right =
|
|
3587
|
+
const f = new yt(g.key);
|
|
3588
|
+
h.right = f, u = g, h = f;
|
|
3589
3589
|
}
|
|
3590
3590
|
} while (g != null);
|
|
3591
3591
|
}
|
|
3592
|
-
const r = new
|
|
3592
|
+
const r = new yt(t.key);
|
|
3593
3593
|
return n(t, r), r;
|
|
3594
3594
|
}
|
|
3595
3595
|
toSet() {
|
|
@@ -3609,10 +3609,10 @@ var We = fn(), Jr = class {
|
|
|
3609
3609
|
}
|
|
3610
3610
|
}, cn = class {
|
|
3611
3611
|
constructor(i) {
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3612
|
+
I(this, "tree");
|
|
3613
|
+
I(this, "path", new Array());
|
|
3614
|
+
I(this, "modificationCount", null);
|
|
3615
|
+
I(this, "splayCount");
|
|
3616
3616
|
this.tree = i, this.splayCount = i.getSplayCount();
|
|
3617
3617
|
}
|
|
3618
3618
|
[Symbol.iterator]() {
|
|
@@ -3673,13 +3673,13 @@ function is(i) {
|
|
|
3673
3673
|
u.minus(n).exponentiatedBy(2).plus(h.minus(r).exponentiatedBy(2)).times(i)
|
|
3674
3674
|
) : hn(!1);
|
|
3675
3675
|
return (t, n, r) => {
|
|
3676
|
-
const u = t.x, h = t.y, o = r.x, g = r.y,
|
|
3677
|
-
return e(
|
|
3676
|
+
const u = t.x, h = t.y, o = r.x, g = r.y, f = h.minus(g).times(n.x.minus(o)).minus(u.minus(o).times(n.y.minus(g)));
|
|
3677
|
+
return e(f, u, h, o, g) ? 0 : f.comparedTo(0);
|
|
3678
3678
|
};
|
|
3679
3679
|
}
|
|
3680
3680
|
var ns = (i) => i, rs = (i) => {
|
|
3681
3681
|
if (i) {
|
|
3682
|
-
const e = new
|
|
3682
|
+
const e = new Ut(oi(i)), t = new Ut(oi(i)), n = (u, h) => h.addAndReturn(u), r = (u) => ({
|
|
3683
3683
|
x: n(u.x, e),
|
|
3684
3684
|
y: n(u.y, t)
|
|
3685
3685
|
});
|
|
@@ -3694,40 +3694,40 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3694
3694
|
compare: oi(i),
|
|
3695
3695
|
snap: rs(i),
|
|
3696
3696
|
orient: is(i)
|
|
3697
|
-
}), Fe = li(),
|
|
3697
|
+
}), Fe = li(), vt = (i, e) => i.ll.x.isLessThanOrEqualTo(e.x) && e.x.isLessThanOrEqualTo(i.ur.x) && i.ll.y.isLessThanOrEqualTo(e.y) && e.y.isLessThanOrEqualTo(i.ur.y), ui = (i, e) => {
|
|
3698
3698
|
if (e.ur.x.isLessThan(i.ll.x) || i.ur.x.isLessThan(e.ll.x) || e.ur.y.isLessThan(i.ll.y) || i.ur.y.isLessThan(e.ll.y))
|
|
3699
3699
|
return null;
|
|
3700
3700
|
const t = i.ll.x.isLessThan(e.ll.x) ? e.ll.x : i.ll.x, n = i.ur.x.isLessThan(e.ur.x) ? i.ur.x : e.ur.x, r = i.ll.y.isLessThan(e.ll.y) ? e.ll.y : i.ll.y, u = i.ur.y.isLessThan(e.ur.y) ? i.ur.y : e.ur.y;
|
|
3701
3701
|
return { ll: { x: t, y: r }, ur: { x: n, y: u } };
|
|
3702
|
-
},
|
|
3702
|
+
}, Wt = (i, e) => i.x.times(e.y).minus(i.y.times(e.x)), dn = (i, e) => i.x.times(e.x).plus(i.y.times(e.y)), qt = (i) => dn(i, i).sqrt(), ss = (i, e, t) => {
|
|
3703
3703
|
const n = { x: e.x.minus(i.x), y: e.y.minus(i.y) }, r = { x: t.x.minus(i.x), y: t.y.minus(i.y) };
|
|
3704
|
-
return
|
|
3704
|
+
return Wt(r, n).div(qt(r)).div(qt(n));
|
|
3705
3705
|
}, os = (i, e, t) => {
|
|
3706
3706
|
const n = { x: e.x.minus(i.x), y: e.y.minus(i.y) }, r = { x: t.x.minus(i.x), y: t.y.minus(i.y) };
|
|
3707
|
-
return dn(r, n).div(
|
|
3707
|
+
return dn(r, n).div(qt(r)).div(qt(n));
|
|
3708
3708
|
}, Ui = (i, e, t) => e.y.isZero() ? null : { x: i.x.plus(e.x.div(e.y).times(t.minus(i.y))), y: t }, qi = (i, e, t) => e.x.isZero() ? null : { x: t, y: i.y.plus(e.y.div(e.x).times(t.minus(i.x))) }, ls = (i, e, t, n) => {
|
|
3709
3709
|
if (e.x.isZero()) return qi(t, n, i.x);
|
|
3710
3710
|
if (n.x.isZero()) return qi(i, e, t.x);
|
|
3711
3711
|
if (e.y.isZero()) return Ui(t, n, i.y);
|
|
3712
3712
|
if (n.y.isZero()) return Ui(i, e, t.y);
|
|
3713
|
-
const r =
|
|
3713
|
+
const r = Wt(e, n);
|
|
3714
3714
|
if (r.isZero()) return null;
|
|
3715
|
-
const u = { x: t.x.minus(i.x), y: t.y.minus(i.y) }, h =
|
|
3716
|
-
return { x:
|
|
3715
|
+
const u = { x: t.x.minus(i.x), y: t.y.minus(i.y) }, h = Wt(u, e).div(r), o = Wt(u, n).div(r), g = i.x.plus(o.times(e.x)), f = t.x.plus(h.times(n.x)), w = i.y.plus(o.times(e.y)), _ = t.y.plus(h.times(n.y)), N = g.plus(f).div(2), R = w.plus(_).div(2);
|
|
3716
|
+
return { x: N, y: R };
|
|
3717
3717
|
}, Ae = class gn {
|
|
3718
3718
|
// Warning: 'point' input will be modified and re-used (for performance)
|
|
3719
3719
|
constructor(e, t) {
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3720
|
+
I(this, "point");
|
|
3721
|
+
I(this, "isLeft");
|
|
3722
|
+
I(this, "segment");
|
|
3723
|
+
I(this, "otherSE");
|
|
3724
|
+
I(this, "consumedBy");
|
|
3725
3725
|
e.events === void 0 ? e.events = [this] : e.events.push(this), this.point = e, this.isLeft = t;
|
|
3726
3726
|
}
|
|
3727
3727
|
// for ordering sweep events in the sweep event queue
|
|
3728
3728
|
static compare(e, t) {
|
|
3729
3729
|
const n = gn.comparePoints(e.point, t.point);
|
|
3730
|
-
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3730
|
+
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : jt.compare(e.segment, t.segment));
|
|
3731
3731
|
}
|
|
3732
3732
|
// for ordering points in sweep line order
|
|
3733
3733
|
static comparePoints(e, t) {
|
|
@@ -3784,16 +3784,16 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3784
3784
|
};
|
|
3785
3785
|
return (r, u) => {
|
|
3786
3786
|
t.has(r) || n(r), t.has(u) || n(u);
|
|
3787
|
-
const { sine: h, cosine: o } = t.get(r), { sine: g, cosine:
|
|
3788
|
-
return h.isGreaterThanOrEqualTo(0) && g.isGreaterThanOrEqualTo(0) ? o.isLessThan(
|
|
3787
|
+
const { sine: h, cosine: o } = t.get(r), { sine: g, cosine: f } = t.get(u);
|
|
3788
|
+
return h.isGreaterThanOrEqualTo(0) && g.isGreaterThanOrEqualTo(0) ? o.isLessThan(f) ? 1 : o.isGreaterThan(f) ? -1 : 0 : h.isLessThan(0) && g.isLessThan(0) ? o.isLessThan(f) ? -1 : o.isGreaterThan(f) ? 1 : 0 : g.isLessThan(h) ? -1 : g.isGreaterThan(h) ? 1 : 0;
|
|
3789
3789
|
};
|
|
3790
3790
|
}
|
|
3791
3791
|
}, us = class ai {
|
|
3792
3792
|
constructor(e) {
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3793
|
+
I(this, "events");
|
|
3794
|
+
I(this, "poly");
|
|
3795
|
+
I(this, "_isExteriorRing");
|
|
3796
|
+
I(this, "_enclosingRing");
|
|
3797
3797
|
this.events = e;
|
|
3798
3798
|
for (let t = 0, n = e.length; t < n; t++)
|
|
3799
3799
|
e[t].segment.ringOut = this;
|
|
@@ -3807,56 +3807,56 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3807
3807
|
const u = e[n];
|
|
3808
3808
|
if (!u.isInResult() || u.ringOut) continue;
|
|
3809
3809
|
let h = null, o = u.leftSE, g = u.rightSE;
|
|
3810
|
-
const
|
|
3811
|
-
for (; h = o, o = g,
|
|
3810
|
+
const f = [o], w = o.point, _ = [];
|
|
3811
|
+
for (; h = o, o = g, f.push(o), o.point !== w; )
|
|
3812
3812
|
for (; ; ) {
|
|
3813
|
-
const
|
|
3814
|
-
if (
|
|
3815
|
-
const
|
|
3813
|
+
const N = o.getAvailableLinkedEvents();
|
|
3814
|
+
if (N.length === 0) {
|
|
3815
|
+
const W = f[0].point, M = f[f.length - 1].point;
|
|
3816
3816
|
throw new Error(
|
|
3817
|
-
`Unable to complete output ring starting at [${
|
|
3817
|
+
`Unable to complete output ring starting at [${W.x}, ${W.y}]. Last matching segment found ends at [${M.x}, ${M.y}].`
|
|
3818
3818
|
);
|
|
3819
3819
|
}
|
|
3820
|
-
if (
|
|
3821
|
-
g =
|
|
3820
|
+
if (N.length === 1) {
|
|
3821
|
+
g = N[0].otherSE;
|
|
3822
3822
|
break;
|
|
3823
3823
|
}
|
|
3824
3824
|
let R = null;
|
|
3825
|
-
for (let
|
|
3826
|
-
if (
|
|
3827
|
-
R =
|
|
3825
|
+
for (let W = 0, M = _.length; W < M; W++)
|
|
3826
|
+
if (_[W].point === o.point) {
|
|
3827
|
+
R = W;
|
|
3828
3828
|
break;
|
|
3829
3829
|
}
|
|
3830
3830
|
if (R !== null) {
|
|
3831
|
-
const
|
|
3831
|
+
const W = _.splice(R)[0], M = f.splice(W.index);
|
|
3832
3832
|
M.unshift(M[0].otherSE), t.push(new ai(M.reverse()));
|
|
3833
3833
|
continue;
|
|
3834
3834
|
}
|
|
3835
|
-
|
|
3836
|
-
index:
|
|
3835
|
+
_.push({
|
|
3836
|
+
index: f.length,
|
|
3837
3837
|
point: o.point
|
|
3838
3838
|
});
|
|
3839
3839
|
const O = o.getLeftmostComparator(h);
|
|
3840
|
-
g =
|
|
3840
|
+
g = N.sort(O)[0].otherSE;
|
|
3841
3841
|
break;
|
|
3842
3842
|
}
|
|
3843
|
-
t.push(new ai(
|
|
3843
|
+
t.push(new ai(f));
|
|
3844
3844
|
}
|
|
3845
3845
|
return t;
|
|
3846
3846
|
}
|
|
3847
3847
|
getGeom() {
|
|
3848
3848
|
let e = this.events[0].point;
|
|
3849
3849
|
const t = [e];
|
|
3850
|
-
for (let
|
|
3851
|
-
const
|
|
3852
|
-
Fe.orient(
|
|
3850
|
+
for (let f = 1, w = this.events.length - 1; f < w; f++) {
|
|
3851
|
+
const _ = this.events[f].point, N = this.events[f + 1].point;
|
|
3852
|
+
Fe.orient(_, e, N) !== 0 && (t.push(_), e = _);
|
|
3853
3853
|
}
|
|
3854
3854
|
if (t.length === 1) return null;
|
|
3855
3855
|
const n = t[0], r = t[1];
|
|
3856
3856
|
Fe.orient(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3857
3857
|
const u = this.isExteriorRing() ? 1 : -1, h = this.isExteriorRing() ? 0 : t.length - 1, o = this.isExteriorRing() ? t.length : -1, g = [];
|
|
3858
|
-
for (let
|
|
3859
|
-
g.push([t[
|
|
3858
|
+
for (let f = h; f != o; f += u)
|
|
3859
|
+
g.push([t[f].x.toNumber(), t[f].y.toNumber()]);
|
|
3860
3860
|
return g;
|
|
3861
3861
|
}
|
|
3862
3862
|
isExteriorRing() {
|
|
@@ -3888,8 +3888,8 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3888
3888
|
}
|
|
3889
3889
|
}, Fi = class {
|
|
3890
3890
|
constructor(i) {
|
|
3891
|
-
|
|
3892
|
-
|
|
3891
|
+
I(this, "exteriorRing");
|
|
3892
|
+
I(this, "interiorRings");
|
|
3893
3893
|
this.exteriorRing = i, i.poly = this, this.interiorRings = [];
|
|
3894
3894
|
}
|
|
3895
3895
|
addInterior(i) {
|
|
@@ -3907,8 +3907,8 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3907
3907
|
}
|
|
3908
3908
|
}, as = class {
|
|
3909
3909
|
constructor(i) {
|
|
3910
|
-
|
|
3911
|
-
|
|
3910
|
+
I(this, "rings");
|
|
3911
|
+
I(this, "polys");
|
|
3912
3912
|
this.rings = i, this.polys = this._composePolys(i);
|
|
3913
3913
|
}
|
|
3914
3914
|
getGeom() {
|
|
@@ -3934,11 +3934,11 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3934
3934
|
return e;
|
|
3935
3935
|
}
|
|
3936
3936
|
}, fs = class {
|
|
3937
|
-
constructor(i, e =
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
this.queue = i, this.tree = new
|
|
3937
|
+
constructor(i, e = jt.compare) {
|
|
3938
|
+
I(this, "queue");
|
|
3939
|
+
I(this, "tree");
|
|
3940
|
+
I(this, "segments");
|
|
3941
|
+
this.queue = i, this.tree = new Ut(e), this.segments = [];
|
|
3942
3942
|
}
|
|
3943
3943
|
process(i) {
|
|
3944
3944
|
const e = i.segment, t = [];
|
|
@@ -3958,8 +3958,8 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3958
3958
|
const o = n.getIntersection(e);
|
|
3959
3959
|
if (o !== null && (e.isAnEndpoint(o) || (u = o), !n.isAnEndpoint(o))) {
|
|
3960
3960
|
const g = this._splitSafely(n, o);
|
|
3961
|
-
for (let
|
|
3962
|
-
t.push(g[
|
|
3961
|
+
for (let f = 0, w = g.length; f < w; f++)
|
|
3962
|
+
t.push(g[f]);
|
|
3963
3963
|
}
|
|
3964
3964
|
}
|
|
3965
3965
|
let h = null;
|
|
@@ -3967,8 +3967,8 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3967
3967
|
const o = r.getIntersection(e);
|
|
3968
3968
|
if (o !== null && (e.isAnEndpoint(o) || (h = o), !r.isAnEndpoint(o))) {
|
|
3969
3969
|
const g = this._splitSafely(r, o);
|
|
3970
|
-
for (let
|
|
3971
|
-
t.push(g[
|
|
3970
|
+
for (let f = 0, w = g.length; f < w; f++)
|
|
3971
|
+
t.push(g[f]);
|
|
3972
3972
|
}
|
|
3973
3973
|
}
|
|
3974
3974
|
if (u !== null || h !== null) {
|
|
@@ -3978,8 +3978,8 @@ var ns = (i) => i, rs = (i) => {
|
|
|
3978
3978
|
h
|
|
3979
3979
|
) <= 0 ? u : h, this.queue.delete(e.rightSE), t.push(e.rightSE);
|
|
3980
3980
|
const g = e.split(o);
|
|
3981
|
-
for (let
|
|
3982
|
-
t.push(g[
|
|
3981
|
+
for (let f = 0, w = g.length; f < w; f++)
|
|
3982
|
+
t.push(g[f]);
|
|
3983
3983
|
}
|
|
3984
3984
|
t.length > 0 ? (this.tree.delete(e), t.push(i)) : (this.segments.push(e), e.prev = n);
|
|
3985
3985
|
} else {
|
|
@@ -4013,39 +4013,39 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4013
4013
|
}
|
|
4014
4014
|
}, cs = class {
|
|
4015
4015
|
constructor() {
|
|
4016
|
-
|
|
4017
|
-
|
|
4016
|
+
I(this, "type");
|
|
4017
|
+
I(this, "numMultiPolys");
|
|
4018
4018
|
}
|
|
4019
4019
|
run(i, e, t) {
|
|
4020
|
-
|
|
4020
|
+
wt.type = i;
|
|
4021
4021
|
const n = [new Zi(e, !0)];
|
|
4022
|
-
for (let
|
|
4023
|
-
n.push(new Zi(t[
|
|
4024
|
-
if (
|
|
4025
|
-
const
|
|
4026
|
-
let
|
|
4027
|
-
for (;
|
|
4028
|
-
ui(n[
|
|
4029
|
-
}
|
|
4030
|
-
if (
|
|
4031
|
-
for (let
|
|
4032
|
-
const
|
|
4033
|
-
for (let
|
|
4034
|
-
if (ui(
|
|
4022
|
+
for (let f = 0, w = t.length; f < w; f++)
|
|
4023
|
+
n.push(new Zi(t[f], !1));
|
|
4024
|
+
if (wt.numMultiPolys = n.length, wt.type === "difference") {
|
|
4025
|
+
const f = n[0];
|
|
4026
|
+
let w = 1;
|
|
4027
|
+
for (; w < n.length; )
|
|
4028
|
+
ui(n[w].bbox, f.bbox) !== null ? w++ : n.splice(w, 1);
|
|
4029
|
+
}
|
|
4030
|
+
if (wt.type === "intersection")
|
|
4031
|
+
for (let f = 0, w = n.length; f < w; f++) {
|
|
4032
|
+
const _ = n[f];
|
|
4033
|
+
for (let N = f + 1, R = n.length; N < R; N++)
|
|
4034
|
+
if (ui(_.bbox, n[N].bbox) === null) return [];
|
|
4035
4035
|
}
|
|
4036
|
-
const r = new
|
|
4037
|
-
for (let
|
|
4038
|
-
const
|
|
4039
|
-
for (let
|
|
4040
|
-
r.add(
|
|
4036
|
+
const r = new Ut(Ae.compare);
|
|
4037
|
+
for (let f = 0, w = n.length; f < w; f++) {
|
|
4038
|
+
const _ = n[f].getSweepEvents();
|
|
4039
|
+
for (let N = 0, R = _.length; N < R; N++)
|
|
4040
|
+
r.add(_[N]);
|
|
4041
4041
|
}
|
|
4042
4042
|
const u = new fs(r);
|
|
4043
4043
|
let h = null;
|
|
4044
4044
|
for (r.size != 0 && (h = r.first(), r.delete(h)); h; ) {
|
|
4045
|
-
const
|
|
4046
|
-
for (let
|
|
4047
|
-
const
|
|
4048
|
-
|
|
4045
|
+
const f = u.process(h);
|
|
4046
|
+
for (let w = 0, _ = f.length; w < _; w++) {
|
|
4047
|
+
const N = f[w];
|
|
4048
|
+
N.consumedBy === void 0 && r.add(N);
|
|
4049
4049
|
}
|
|
4050
4050
|
r.size != 0 ? (h = r.first(), r.delete(h)) : h = null;
|
|
4051
4051
|
}
|
|
@@ -4053,22 +4053,22 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4053
4053
|
const o = us.factory(u.segments);
|
|
4054
4054
|
return new as(o).getGeom();
|
|
4055
4055
|
}
|
|
4056
|
-
},
|
|
4056
|
+
}, wt = new cs(), Ft = wt, hs = 0, jt = class Gt {
|
|
4057
4057
|
/* Warning: a reference to ringWindings input will be stored,
|
|
4058
4058
|
* and possibly will be later modified */
|
|
4059
4059
|
constructor(e, t, n, r) {
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4060
|
+
I(this, "id");
|
|
4061
|
+
I(this, "leftSE");
|
|
4062
|
+
I(this, "rightSE");
|
|
4063
|
+
I(this, "rings");
|
|
4064
|
+
I(this, "windings");
|
|
4065
|
+
I(this, "ringOut");
|
|
4066
|
+
I(this, "consumedBy");
|
|
4067
|
+
I(this, "prev");
|
|
4068
|
+
I(this, "_prevInResult");
|
|
4069
|
+
I(this, "_beforeState");
|
|
4070
|
+
I(this, "_afterState");
|
|
4071
|
+
I(this, "_isInResult");
|
|
4072
4072
|
this.id = ++hs, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
4073
4073
|
}
|
|
4074
4074
|
/* This compare() function is for ordering segments in the sweep
|
|
@@ -4088,41 +4088,41 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4088
4088
|
const n = e.leftSE.point.x, r = t.leftSE.point.x, u = e.rightSE.point.x, h = t.rightSE.point.x;
|
|
4089
4089
|
if (h.isLessThan(n)) return 1;
|
|
4090
4090
|
if (u.isLessThan(r)) return -1;
|
|
4091
|
-
const o = e.leftSE.point.y, g = t.leftSE.point.y,
|
|
4091
|
+
const o = e.leftSE.point.y, g = t.leftSE.point.y, f = e.rightSE.point.y, w = t.rightSE.point.y;
|
|
4092
4092
|
if (n.isLessThan(r)) {
|
|
4093
|
-
if (g.isLessThan(o) && g.isLessThan(
|
|
4094
|
-
if (g.isGreaterThan(o) && g.isGreaterThan(
|
|
4095
|
-
const
|
|
4096
|
-
if (
|
|
4097
|
-
if (
|
|
4098
|
-
const
|
|
4099
|
-
return
|
|
4093
|
+
if (g.isLessThan(o) && g.isLessThan(f)) return 1;
|
|
4094
|
+
if (g.isGreaterThan(o) && g.isGreaterThan(f)) return -1;
|
|
4095
|
+
const _ = e.comparePoint(t.leftSE.point);
|
|
4096
|
+
if (_ < 0) return 1;
|
|
4097
|
+
if (_ > 0) return -1;
|
|
4098
|
+
const N = t.comparePoint(e.rightSE.point);
|
|
4099
|
+
return N !== 0 ? N : -1;
|
|
4100
4100
|
}
|
|
4101
4101
|
if (n.isGreaterThan(r)) {
|
|
4102
|
-
if (o.isLessThan(g) && o.isLessThan(
|
|
4103
|
-
if (o.isGreaterThan(g) && o.isGreaterThan(
|
|
4104
|
-
const
|
|
4105
|
-
if (
|
|
4106
|
-
const
|
|
4107
|
-
return
|
|
4102
|
+
if (o.isLessThan(g) && o.isLessThan(w)) return -1;
|
|
4103
|
+
if (o.isGreaterThan(g) && o.isGreaterThan(w)) return 1;
|
|
4104
|
+
const _ = t.comparePoint(e.leftSE.point);
|
|
4105
|
+
if (_ !== 0) return _;
|
|
4106
|
+
const N = e.comparePoint(t.rightSE.point);
|
|
4107
|
+
return N < 0 ? 1 : N > 0 ? -1 : 1;
|
|
4108
4108
|
}
|
|
4109
4109
|
if (o.isLessThan(g)) return -1;
|
|
4110
4110
|
if (o.isGreaterThan(g)) return 1;
|
|
4111
4111
|
if (u.isLessThan(h)) {
|
|
4112
|
-
const
|
|
4113
|
-
if (
|
|
4112
|
+
const _ = t.comparePoint(e.rightSE.point);
|
|
4113
|
+
if (_ !== 0) return _;
|
|
4114
4114
|
}
|
|
4115
4115
|
if (u.isGreaterThan(h)) {
|
|
4116
|
-
const
|
|
4117
|
-
if (
|
|
4118
|
-
if (
|
|
4116
|
+
const _ = e.comparePoint(t.rightSE.point);
|
|
4117
|
+
if (_ < 0) return 1;
|
|
4118
|
+
if (_ > 0) return -1;
|
|
4119
4119
|
}
|
|
4120
4120
|
if (!u.eq(h)) {
|
|
4121
|
-
const
|
|
4122
|
-
if (
|
|
4123
|
-
if (
|
|
4121
|
+
const _ = f.minus(o), N = u.minus(n), R = w.minus(g), O = h.minus(r);
|
|
4122
|
+
if (_.isGreaterThan(N) && R.isLessThan(O)) return 1;
|
|
4123
|
+
if (_.isLessThan(N) && R.isGreaterThan(O)) return -1;
|
|
4124
4124
|
}
|
|
4125
|
-
return u.isGreaterThan(h) ? 1 : u.isLessThan(h) ||
|
|
4125
|
+
return u.isGreaterThan(h) ? 1 : u.isLessThan(h) || f.isLessThan(w) ? -1 : f.isGreaterThan(w) ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
4126
4126
|
}
|
|
4127
4127
|
static fromRing(e, t, n) {
|
|
4128
4128
|
let r, u, h;
|
|
@@ -4135,8 +4135,8 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4135
4135
|
throw new Error(
|
|
4136
4136
|
`Tried to create degenerate segment at [${e.x}, ${e.y}]`
|
|
4137
4137
|
);
|
|
4138
|
-
const g = new Ae(r, !0),
|
|
4139
|
-
return new
|
|
4138
|
+
const g = new Ae(r, !0), f = new Ae(u, !1);
|
|
4139
|
+
return new Gt(g, f, [n], [h]);
|
|
4140
4140
|
}
|
|
4141
4141
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
4142
4142
|
replaceRightSE(e) {
|
|
@@ -4193,18 +4193,18 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4193
4193
|
getIntersection(e) {
|
|
4194
4194
|
const t = this.bbox(), n = e.bbox(), r = ui(t, n);
|
|
4195
4195
|
if (r === null) return null;
|
|
4196
|
-
const u = this.leftSE.point, h = this.rightSE.point, o = e.leftSE.point, g = e.rightSE.point,
|
|
4197
|
-
if (
|
|
4198
|
-
return
|
|
4199
|
-
if (
|
|
4200
|
-
return
|
|
4201
|
-
if (
|
|
4202
|
-
return
|
|
4203
|
-
if (
|
|
4204
|
-
if (
|
|
4205
|
-
if (
|
|
4196
|
+
const u = this.leftSE.point, h = this.rightSE.point, o = e.leftSE.point, g = e.rightSE.point, f = vt(t, o) && this.comparePoint(o) === 0, w = vt(n, u) && e.comparePoint(u) === 0, _ = vt(t, g) && this.comparePoint(g) === 0, N = vt(n, h) && e.comparePoint(h) === 0;
|
|
4197
|
+
if (w && f)
|
|
4198
|
+
return N && !_ ? h : !N && _ ? g : null;
|
|
4199
|
+
if (w)
|
|
4200
|
+
return _ && u.x.eq(g.x) && u.y.eq(g.y) ? null : u;
|
|
4201
|
+
if (f)
|
|
4202
|
+
return N && h.x.eq(o.x) && h.y.eq(o.y) ? null : o;
|
|
4203
|
+
if (N && _) return null;
|
|
4204
|
+
if (N) return h;
|
|
4205
|
+
if (_) return g;
|
|
4206
4206
|
const R = ls(u, this.vector(), o, e.vector());
|
|
4207
|
-
return R === null || !
|
|
4207
|
+
return R === null || !vt(r, R) ? null : Fe.snap(R);
|
|
4208
4208
|
}
|
|
4209
4209
|
/**
|
|
4210
4210
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -4221,7 +4221,7 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4221
4221
|
split(e) {
|
|
4222
4222
|
const t = [], n = e.events !== void 0, r = new Ae(e, !0), u = new Ae(e, !1), h = this.rightSE;
|
|
4223
4223
|
this.replaceRightSE(u), t.push(u), t.push(r);
|
|
4224
|
-
const o = new
|
|
4224
|
+
const o = new Gt(
|
|
4225
4225
|
r,
|
|
4226
4226
|
h,
|
|
4227
4227
|
this.rings.slice(),
|
|
@@ -4242,7 +4242,7 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4242
4242
|
let t = this, n = e;
|
|
4243
4243
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
4244
4244
|
for (; n.consumedBy; ) n = n.consumedBy;
|
|
4245
|
-
const r =
|
|
4245
|
+
const r = Gt.compare(t, n);
|
|
4246
4246
|
if (r !== 0) {
|
|
4247
4247
|
if (r > 0) {
|
|
4248
4248
|
const u = t;
|
|
@@ -4253,8 +4253,8 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4253
4253
|
t = n, n = u;
|
|
4254
4254
|
}
|
|
4255
4255
|
for (let u = 0, h = n.rings.length; u < h; u++) {
|
|
4256
|
-
const o = n.rings[u], g = n.windings[u],
|
|
4257
|
-
|
|
4256
|
+
const o = n.rings[u], g = n.windings[u], f = t.rings.indexOf(o);
|
|
4257
|
+
f === -1 ? (t.rings.push(o), t.windings.push(g)) : t.windings[f] += g;
|
|
4258
4258
|
}
|
|
4259
4259
|
n.rings = null, n.windings = null, n.consumedBy = t, n.leftSE.consumedBy = t.leftSE, n.rightSE.consumedBy = t.rightSE;
|
|
4260
4260
|
}
|
|
@@ -4287,24 +4287,24 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4287
4287
|
};
|
|
4288
4288
|
const t = this._afterState.rings, n = this._afterState.windings, r = this._afterState.multiPolys;
|
|
4289
4289
|
for (let o = 0, g = this.rings.length; o < g; o++) {
|
|
4290
|
-
const
|
|
4291
|
-
|
|
4290
|
+
const f = this.rings[o], w = this.windings[o], _ = t.indexOf(f);
|
|
4291
|
+
_ === -1 ? (t.push(f), n.push(w)) : n[_] += w;
|
|
4292
4292
|
}
|
|
4293
4293
|
const u = [], h = [];
|
|
4294
4294
|
for (let o = 0, g = t.length; o < g; o++) {
|
|
4295
4295
|
if (n[o] === 0) continue;
|
|
4296
|
-
const
|
|
4297
|
-
if (h.indexOf(
|
|
4298
|
-
if (
|
|
4296
|
+
const f = t[o], w = f.poly;
|
|
4297
|
+
if (h.indexOf(w) === -1)
|
|
4298
|
+
if (f.isExterior) u.push(w);
|
|
4299
4299
|
else {
|
|
4300
|
-
h.indexOf(
|
|
4301
|
-
const
|
|
4302
|
-
|
|
4300
|
+
h.indexOf(w) === -1 && h.push(w);
|
|
4301
|
+
const _ = u.indexOf(f.poly);
|
|
4302
|
+
_ !== -1 && u.splice(_, 1);
|
|
4303
4303
|
}
|
|
4304
4304
|
}
|
|
4305
4305
|
for (let o = 0, g = u.length; o < g; o++) {
|
|
4306
|
-
const
|
|
4307
|
-
r.indexOf(
|
|
4306
|
+
const f = u[o].multiPoly;
|
|
4307
|
+
r.indexOf(f) === -1 && r.push(f);
|
|
4308
4308
|
}
|
|
4309
4309
|
return this._afterState;
|
|
4310
4310
|
}
|
|
@@ -4313,7 +4313,7 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4313
4313
|
if (this.consumedBy) return !1;
|
|
4314
4314
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
4315
4315
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
4316
|
-
switch (
|
|
4316
|
+
switch (Ft.type) {
|
|
4317
4317
|
case "union": {
|
|
4318
4318
|
const n = e.length === 0, r = t.length === 0;
|
|
4319
4319
|
this._isInResult = n !== r;
|
|
@@ -4321,7 +4321,7 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4321
4321
|
}
|
|
4322
4322
|
case "intersection": {
|
|
4323
4323
|
let n, r;
|
|
4324
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
4324
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === Ft.numMultiPolys && n < r;
|
|
4325
4325
|
break;
|
|
4326
4326
|
}
|
|
4327
4327
|
case "xor": {
|
|
@@ -4339,10 +4339,10 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4339
4339
|
}
|
|
4340
4340
|
}, ji = class {
|
|
4341
4341
|
constructor(i, e, t) {
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4342
|
+
I(this, "poly");
|
|
4343
|
+
I(this, "isExterior");
|
|
4344
|
+
I(this, "segments");
|
|
4345
|
+
I(this, "bbox");
|
|
4346
4346
|
if (!Array.isArray(i) || i.length === 0)
|
|
4347
4347
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
4348
4348
|
if (this.poly = e, this.isExterior = t, this.segments = [], typeof i[0][0] != "number" || typeof i[0][1] != "number")
|
|
@@ -4357,9 +4357,9 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4357
4357
|
if (typeof i[u][0] != "number" || typeof i[u][1] != "number")
|
|
4358
4358
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
4359
4359
|
const o = Fe.snap({ x: new We(i[u][0]), y: new We(i[u][1]) });
|
|
4360
|
-
o.x.eq(r.x) && o.y.eq(r.y) || (this.segments.push(
|
|
4360
|
+
o.x.eq(r.x) && o.y.eq(r.y) || (this.segments.push(jt.fromRing(r, o, this)), o.x.isLessThan(this.bbox.ll.x) && (this.bbox.ll.x = o.x), o.y.isLessThan(this.bbox.ll.y) && (this.bbox.ll.y = o.y), o.x.isGreaterThan(this.bbox.ur.x) && (this.bbox.ur.x = o.x), o.y.isGreaterThan(this.bbox.ur.y) && (this.bbox.ur.y = o.y), r = o);
|
|
4361
4361
|
}
|
|
4362
|
-
(!n.x.eq(r.x) || !n.y.eq(r.y)) && this.segments.push(
|
|
4362
|
+
(!n.x.eq(r.x) || !n.y.eq(r.y)) && this.segments.push(jt.fromRing(r, n, this));
|
|
4363
4363
|
}
|
|
4364
4364
|
getSweepEvents() {
|
|
4365
4365
|
const i = [];
|
|
@@ -4371,10 +4371,10 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4371
4371
|
}
|
|
4372
4372
|
}, ds = class {
|
|
4373
4373
|
constructor(i, e) {
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4374
|
+
I(this, "multiPoly");
|
|
4375
|
+
I(this, "exteriorRing");
|
|
4376
|
+
I(this, "interiorRings");
|
|
4377
|
+
I(this, "bbox");
|
|
4378
4378
|
if (!Array.isArray(i))
|
|
4379
4379
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
4380
4380
|
this.exteriorRing = new ji(i[0], this, !0), this.bbox = {
|
|
@@ -4398,9 +4398,9 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4398
4398
|
}
|
|
4399
4399
|
}, Zi = class {
|
|
4400
4400
|
constructor(i, e) {
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4401
|
+
I(this, "isSubject");
|
|
4402
|
+
I(this, "polys");
|
|
4403
|
+
I(this, "bbox");
|
|
4404
4404
|
if (!Array.isArray(i))
|
|
4405
4405
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
4406
4406
|
try {
|
|
@@ -4426,81 +4426,81 @@ var ns = (i) => i, rs = (i) => {
|
|
|
4426
4426
|
}
|
|
4427
4427
|
return i;
|
|
4428
4428
|
}
|
|
4429
|
-
}, gs = (i, ...e) =>
|
|
4429
|
+
}, gs = (i, ...e) => Ft.run("union", i, e), ms = (i, ...e) => Ft.run("difference", i, e);
|
|
4430
4430
|
Fe.set;
|
|
4431
4431
|
function mn(i, e, t) {
|
|
4432
4432
|
if (i !== null)
|
|
4433
|
-
for (var n, r, u, h, o, g,
|
|
4434
|
-
|
|
4435
|
-
for (var
|
|
4436
|
-
var
|
|
4437
|
-
if (h =
|
|
4433
|
+
for (var n, r, u, h, o, g, f, w = 0, _ = 0, N, R = i.type, O = R === "FeatureCollection", W = R === "Feature", M = O ? i.features.length : 1, k = 0; k < M; k++) {
|
|
4434
|
+
f = O ? i.features[k].geometry : W ? i.geometry : i, N = f ? f.type === "GeometryCollection" : !1, o = N ? f.geometries.length : 1;
|
|
4435
|
+
for (var S = 0; S < o; S++) {
|
|
4436
|
+
var C = 0, P = 0;
|
|
4437
|
+
if (h = N ? f.geometries[S] : f, h !== null) {
|
|
4438
4438
|
g = h.coordinates;
|
|
4439
|
-
var
|
|
4440
|
-
switch (
|
|
4439
|
+
var z = h.type;
|
|
4440
|
+
switch (w = 0, z) {
|
|
4441
4441
|
case null:
|
|
4442
4442
|
break;
|
|
4443
4443
|
case "Point":
|
|
4444
4444
|
if (e(
|
|
4445
4445
|
g,
|
|
4446
|
-
|
|
4446
|
+
_,
|
|
4447
4447
|
k,
|
|
4448
|
-
|
|
4449
|
-
|
|
4448
|
+
C,
|
|
4449
|
+
P
|
|
4450
4450
|
) === !1)
|
|
4451
4451
|
return !1;
|
|
4452
|
-
|
|
4452
|
+
_++, C++;
|
|
4453
4453
|
break;
|
|
4454
4454
|
case "LineString":
|
|
4455
4455
|
case "MultiPoint":
|
|
4456
4456
|
for (n = 0; n < g.length; n++) {
|
|
4457
4457
|
if (e(
|
|
4458
4458
|
g[n],
|
|
4459
|
-
|
|
4459
|
+
_,
|
|
4460
4460
|
k,
|
|
4461
|
-
|
|
4462
|
-
|
|
4461
|
+
C,
|
|
4462
|
+
P
|
|
4463
4463
|
) === !1)
|
|
4464
4464
|
return !1;
|
|
4465
|
-
|
|
4465
|
+
_++, z === "MultiPoint" && C++;
|
|
4466
4466
|
}
|
|
4467
|
-
|
|
4467
|
+
z === "LineString" && C++;
|
|
4468
4468
|
break;
|
|
4469
4469
|
case "Polygon":
|
|
4470
4470
|
case "MultiLineString":
|
|
4471
4471
|
for (n = 0; n < g.length; n++) {
|
|
4472
|
-
for (r = 0; r < g[n].length -
|
|
4472
|
+
for (r = 0; r < g[n].length - w; r++) {
|
|
4473
4473
|
if (e(
|
|
4474
4474
|
g[n][r],
|
|
4475
|
-
|
|
4475
|
+
_,
|
|
4476
4476
|
k,
|
|
4477
|
-
|
|
4478
|
-
|
|
4477
|
+
C,
|
|
4478
|
+
P
|
|
4479
4479
|
) === !1)
|
|
4480
4480
|
return !1;
|
|
4481
|
-
|
|
4481
|
+
_++;
|
|
4482
4482
|
}
|
|
4483
|
-
|
|
4483
|
+
z === "MultiLineString" && C++, z === "Polygon" && P++;
|
|
4484
4484
|
}
|
|
4485
|
-
|
|
4485
|
+
z === "Polygon" && C++;
|
|
4486
4486
|
break;
|
|
4487
4487
|
case "MultiPolygon":
|
|
4488
4488
|
for (n = 0; n < g.length; n++) {
|
|
4489
|
-
for (
|
|
4490
|
-
for (u = 0; u < g[n][r].length -
|
|
4489
|
+
for (P = 0, r = 0; r < g[n].length; r++) {
|
|
4490
|
+
for (u = 0; u < g[n][r].length - w; u++) {
|
|
4491
4491
|
if (e(
|
|
4492
4492
|
g[n][r][u],
|
|
4493
|
-
|
|
4493
|
+
_,
|
|
4494
4494
|
k,
|
|
4495
|
-
|
|
4496
|
-
|
|
4495
|
+
C,
|
|
4496
|
+
P
|
|
4497
4497
|
) === !1)
|
|
4498
4498
|
return !1;
|
|
4499
|
-
|
|
4499
|
+
_++;
|
|
4500
4500
|
}
|
|
4501
|
-
|
|
4501
|
+
P++;
|
|
4502
4502
|
}
|
|
4503
|
-
|
|
4503
|
+
C++;
|
|
4504
4504
|
}
|
|
4505
4505
|
break;
|
|
4506
4506
|
case "GeometryCollection":
|
|
@@ -4516,16 +4516,16 @@ function mn(i, e, t) {
|
|
|
4516
4516
|
}
|
|
4517
4517
|
}
|
|
4518
4518
|
function hi(i, e) {
|
|
4519
|
-
var t, n, r, u, h, o, g,
|
|
4520
|
-
for (t = 0; t <
|
|
4521
|
-
for (o = R ? i.features[t].geometry : O ? i.geometry : i,
|
|
4519
|
+
var t, n, r, u, h, o, g, f, w, _, N = 0, R = i.type === "FeatureCollection", O = i.type === "Feature", W = R ? i.features.length : 1;
|
|
4520
|
+
for (t = 0; t < W; t++) {
|
|
4521
|
+
for (o = R ? i.features[t].geometry : O ? i.geometry : i, f = R ? i.features[t].properties : O ? i.properties : {}, w = R ? i.features[t].bbox : O ? i.bbox : void 0, _ = R ? i.features[t].id : O ? i.id : void 0, g = o ? o.type === "GeometryCollection" : !1, h = g ? o.geometries.length : 1, r = 0; r < h; r++) {
|
|
4522
4522
|
if (u = g ? o.geometries[r] : o, u === null) {
|
|
4523
4523
|
if (e(
|
|
4524
4524
|
null,
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4525
|
+
N,
|
|
4526
|
+
f,
|
|
4527
|
+
w,
|
|
4528
|
+
_
|
|
4529
4529
|
) === !1)
|
|
4530
4530
|
return !1;
|
|
4531
4531
|
continue;
|
|
@@ -4539,10 +4539,10 @@ function hi(i, e) {
|
|
|
4539
4539
|
case "MultiPolygon": {
|
|
4540
4540
|
if (e(
|
|
4541
4541
|
u,
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4542
|
+
N,
|
|
4543
|
+
f,
|
|
4544
|
+
w,
|
|
4545
|
+
_
|
|
4546
4546
|
) === !1)
|
|
4547
4547
|
return !1;
|
|
4548
4548
|
break;
|
|
@@ -4551,10 +4551,10 @@ function hi(i, e) {
|
|
|
4551
4551
|
for (n = 0; n < u.geometries.length; n++)
|
|
4552
4552
|
if (e(
|
|
4553
4553
|
u.geometries[n],
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4554
|
+
N,
|
|
4555
|
+
f,
|
|
4556
|
+
w,
|
|
4557
|
+
_
|
|
4558
4558
|
) === !1)
|
|
4559
4559
|
return !1;
|
|
4560
4560
|
break;
|
|
@@ -4563,7 +4563,7 @@ function hi(i, e) {
|
|
|
4563
4563
|
throw new Error("Unknown Geometry Type");
|
|
4564
4564
|
}
|
|
4565
4565
|
}
|
|
4566
|
-
|
|
4566
|
+
N++;
|
|
4567
4567
|
}
|
|
4568
4568
|
}
|
|
4569
4569
|
function ps(i, e) {
|
|
@@ -4575,7 +4575,7 @@ function ps(i, e) {
|
|
|
4575
4575
|
case "LineString":
|
|
4576
4576
|
case "Polygon":
|
|
4577
4577
|
return e(
|
|
4578
|
-
|
|
4578
|
+
St(t, r, { bbox: u, id: h }),
|
|
4579
4579
|
n,
|
|
4580
4580
|
0
|
|
4581
4581
|
) === !1 ? !1 : void 0;
|
|
@@ -4592,12 +4592,12 @@ function ps(i, e) {
|
|
|
4592
4592
|
g = "Polygon";
|
|
4593
4593
|
break;
|
|
4594
4594
|
}
|
|
4595
|
-
for (var
|
|
4596
|
-
var
|
|
4595
|
+
for (var f = 0; f < t.coordinates.length; f++) {
|
|
4596
|
+
var w = t.coordinates[f], _ = {
|
|
4597
4597
|
type: g,
|
|
4598
|
-
coordinates:
|
|
4598
|
+
coordinates: w
|
|
4599
4599
|
};
|
|
4600
|
-
if (e(
|
|
4600
|
+
if (e(St(_, r), n, f) === !1)
|
|
4601
4601
|
return !1;
|
|
4602
4602
|
}
|
|
4603
4603
|
});
|
|
@@ -4636,12 +4636,12 @@ function Es(i) {
|
|
|
4636
4636
|
var e = [];
|
|
4637
4637
|
return ps(i, function(t) {
|
|
4638
4638
|
e.push(t);
|
|
4639
|
-
}),
|
|
4639
|
+
}), xt(e);
|
|
4640
4640
|
}
|
|
4641
4641
|
var Ls = Es;
|
|
4642
4642
|
function Vi(i, e) {
|
|
4643
4643
|
const t = ws(
|
|
4644
|
-
|
|
4644
|
+
xt([
|
|
4645
4645
|
ci([
|
|
4646
4646
|
[
|
|
4647
4647
|
[180, 90],
|
|
@@ -4657,21 +4657,21 @@ function Vi(i, e) {
|
|
|
4657
4657
|
if (!t)
|
|
4658
4658
|
return;
|
|
4659
4659
|
t.properties = { isMask: !0 };
|
|
4660
|
-
const n =
|
|
4660
|
+
const n = zt(Hi(i)), r = (n[2] - n[0]) / 360 / 1e3, u = n[0] < -180, h = n[2] > 180, o = Ls(i);
|
|
4661
4661
|
if (o.features.length > 1 && (u || h))
|
|
4662
4662
|
for (const g of o.features) {
|
|
4663
|
-
const
|
|
4664
|
-
if (h &&
|
|
4665
|
-
for (const
|
|
4666
|
-
for (const
|
|
4667
|
-
|
|
4668
|
-
if (u &&
|
|
4669
|
-
for (const
|
|
4670
|
-
for (const
|
|
4671
|
-
|
|
4663
|
+
const f = zt(Hi(g));
|
|
4664
|
+
if (h && f[0] < -180 + r)
|
|
4665
|
+
for (const w of g.geometry.coordinates)
|
|
4666
|
+
for (const _ of w)
|
|
4667
|
+
_[0] += 360 - r;
|
|
4668
|
+
if (u && f[2] > 180 - r)
|
|
4669
|
+
for (const w of g.geometry.coordinates)
|
|
4670
|
+
for (const _ of w)
|
|
4671
|
+
_[0] -= 360 - r;
|
|
4672
4672
|
}
|
|
4673
4673
|
e(
|
|
4674
|
-
|
|
4674
|
+
xt([
|
|
4675
4675
|
o.features.length < 2 ? i : pn(o) ?? i,
|
|
4676
4676
|
t
|
|
4677
4677
|
])
|
|
@@ -4696,26 +4696,26 @@ const Ki = {
|
|
|
4696
4696
|
},
|
|
4697
4697
|
filter: ["!", ["has", "isMask"]]
|
|
4698
4698
|
}
|
|
4699
|
-
},
|
|
4699
|
+
}, Pt = "mtlr-gc-full-geom", Yi = "mtlr-gc-full-geom-fill", Qi = "mtlr-gc-full-geom-line";
|
|
4700
4700
|
function _s(i, e, t = !0, n = !0, r = {}, u = {}, h = Ki) {
|
|
4701
4701
|
let o;
|
|
4702
4702
|
const g = [];
|
|
4703
|
-
let
|
|
4704
|
-
function
|
|
4703
|
+
let f, w, _;
|
|
4704
|
+
function N() {
|
|
4705
4705
|
if (!i.loaded) {
|
|
4706
|
-
i.once("load",
|
|
4706
|
+
i.once("load", N);
|
|
4707
4707
|
return;
|
|
4708
4708
|
}
|
|
4709
4709
|
const M = h ? h === !0 ? Ki : h : void 0;
|
|
4710
4710
|
if (!(M != null && M.fill) && !(M != null && M.line))
|
|
4711
4711
|
return;
|
|
4712
|
-
const k = i.getSource(
|
|
4712
|
+
const k = i.getSource(Pt);
|
|
4713
4713
|
if (k)
|
|
4714
|
-
k.setData(
|
|
4715
|
-
else if (
|
|
4716
|
-
i.addSource(
|
|
4714
|
+
k.setData(_ ?? xt([]));
|
|
4715
|
+
else if (_)
|
|
4716
|
+
i.addSource(Pt, {
|
|
4717
4717
|
type: "geojson",
|
|
4718
|
-
data:
|
|
4718
|
+
data: _
|
|
4719
4719
|
});
|
|
4720
4720
|
else
|
|
4721
4721
|
return;
|
|
@@ -4723,20 +4723,20 @@ function _s(i, e, t = !0, n = !0, r = {}, u = {}, h = Ki) {
|
|
|
4723
4723
|
...M == null ? void 0 : M.fill,
|
|
4724
4724
|
id: Yi,
|
|
4725
4725
|
type: "fill",
|
|
4726
|
-
source:
|
|
4726
|
+
source: Pt
|
|
4727
4727
|
}), !i.getLayer(Qi) && (M != null && M.line) && i.addLayer({
|
|
4728
4728
|
...M == null ? void 0 : M.line,
|
|
4729
4729
|
id: Qi,
|
|
4730
4730
|
type: "line",
|
|
4731
|
-
source:
|
|
4731
|
+
source: Pt
|
|
4732
4732
|
});
|
|
4733
4733
|
}
|
|
4734
4734
|
function R(M) {
|
|
4735
|
-
|
|
4735
|
+
_ = M, N();
|
|
4736
4736
|
}
|
|
4737
4737
|
i.on("styledata", () => {
|
|
4738
4738
|
setTimeout(() => {
|
|
4739
|
-
|
|
4739
|
+
_ && N();
|
|
4740
4740
|
});
|
|
4741
4741
|
});
|
|
4742
4742
|
const O = (M) => {
|
|
@@ -4745,7 +4745,7 @@ function _s(i, e, t = !0, n = !0, r = {}, u = {}, h = Ki) {
|
|
|
4745
4745
|
coordinates: [M.lngLat.lng, M.lngLat.lat]
|
|
4746
4746
|
});
|
|
4747
4747
|
};
|
|
4748
|
-
function
|
|
4748
|
+
function W(M = !1) {
|
|
4749
4749
|
if (!e)
|
|
4750
4750
|
throw new Error();
|
|
4751
4751
|
const k = document.createElement("div");
|
|
@@ -4761,55 +4761,55 @@ function _s(i, e, t = !0, n = !0, r = {}, u = {}, h = Ki) {
|
|
|
4761
4761
|
flyTo(M, k) {
|
|
4762
4762
|
i.flyTo({ center: M, ...k ? { zoom: k } : {}, ...r });
|
|
4763
4763
|
},
|
|
4764
|
-
fitBounds(M, k,
|
|
4764
|
+
fitBounds(M, k, S) {
|
|
4765
4765
|
i.fitBounds(
|
|
4766
4766
|
[
|
|
4767
4767
|
[M[0], M[1]],
|
|
4768
4768
|
[M[2], M[3]]
|
|
4769
4769
|
],
|
|
4770
|
-
{ padding: k, ...
|
|
4770
|
+
{ padding: k, ...S ? { maxZoom: S } : {}, ...u }
|
|
4771
4771
|
);
|
|
4772
4772
|
},
|
|
4773
4773
|
indicateReverse(M) {
|
|
4774
4774
|
i.getCanvasContainer().style.cursor = M ? "crosshair" : "";
|
|
4775
4775
|
},
|
|
4776
4776
|
setReverseMarker(M) {
|
|
4777
|
-
!e || !t || (
|
|
4777
|
+
!e || !t || (w ? M ? w.setLngLat(M) : (w.remove(), w = void 0) : M && (t instanceof Function ? w = t(i) ?? void 0 : (w = (typeof t == "object" ? new e.Marker(t) : W()).setLngLat(M).addTo(i), w.getElement().classList.add("marker-reverse"))));
|
|
4778
4778
|
},
|
|
4779
|
-
setFeatures(M, k,
|
|
4780
|
-
for (const
|
|
4781
|
-
|
|
4779
|
+
setFeatures(M, k, S) {
|
|
4780
|
+
for (const C of g)
|
|
4781
|
+
C.remove();
|
|
4782
4782
|
if (g.length = 0, R(void 0), !!e) {
|
|
4783
4783
|
e: if (k) {
|
|
4784
|
-
let
|
|
4784
|
+
let C = !1;
|
|
4785
4785
|
if (k.geometry.type === "GeometryCollection") {
|
|
4786
|
-
const
|
|
4787
|
-
(
|
|
4786
|
+
const P = k.geometry.geometries.filter(
|
|
4787
|
+
(z) => z.type === "Polygon" || z.type === "MultiPolygon"
|
|
4788
4788
|
);
|
|
4789
|
-
t: if (
|
|
4790
|
-
const
|
|
4791
|
-
|
|
4789
|
+
t: if (P.length > 0) {
|
|
4790
|
+
const z = pn(
|
|
4791
|
+
xt(P.map((q) => St(q)))
|
|
4792
4792
|
);
|
|
4793
|
-
if (!
|
|
4793
|
+
if (!z)
|
|
4794
4794
|
break t;
|
|
4795
4795
|
Vi(
|
|
4796
4796
|
{
|
|
4797
4797
|
...k,
|
|
4798
|
-
geometry:
|
|
4798
|
+
geometry: z.geometry
|
|
4799
4799
|
},
|
|
4800
4800
|
R
|
|
4801
|
-
),
|
|
4801
|
+
), C = !0;
|
|
4802
4802
|
} else {
|
|
4803
|
-
const
|
|
4804
|
-
(
|
|
4803
|
+
const z = k.geometry.geometries.filter(
|
|
4804
|
+
(q) => q.type === "LineString" || q.type === "MultiLineString"
|
|
4805
4805
|
);
|
|
4806
|
-
|
|
4806
|
+
z.length > 0 && (R({
|
|
4807
4807
|
...k,
|
|
4808
|
-
geometry: { type: "GeometryCollection", geometries:
|
|
4809
|
-
}),
|
|
4808
|
+
geometry: { type: "GeometryCollection", geometries: z }
|
|
4809
|
+
}), C = !0);
|
|
4810
4810
|
}
|
|
4811
4811
|
}
|
|
4812
|
-
if (!
|
|
4812
|
+
if (!C) {
|
|
4813
4813
|
if (k.geometry.type === "Polygon" || k.geometry.type === "MultiPolygon")
|
|
4814
4814
|
Vi(k, R);
|
|
4815
4815
|
else if (k.geometry.type === "LineString" || k.geometry.type === "MultiLineString") {
|
|
@@ -4817,47 +4817,47 @@ function _s(i, e, t = !0, n = !0, r = {}, u = {}, h = Ki) {
|
|
|
4817
4817
|
break e;
|
|
4818
4818
|
}
|
|
4819
4819
|
}
|
|
4820
|
-
if (!
|
|
4820
|
+
if (!S && !k.geometry.type.endsWith("Point"))
|
|
4821
4821
|
break e;
|
|
4822
4822
|
if (t instanceof Function) {
|
|
4823
|
-
const
|
|
4824
|
-
|
|
4823
|
+
const P = t(i, k);
|
|
4824
|
+
P && g.push(P);
|
|
4825
4825
|
} else t && g.push(
|
|
4826
|
-
typeof t == "object" ? new e.Marker(t) :
|
|
4826
|
+
typeof t == "object" ? new e.Marker(t) : W().setLngLat(k.center).addTo(i)
|
|
4827
4827
|
);
|
|
4828
4828
|
}
|
|
4829
4829
|
if (n)
|
|
4830
|
-
for (const
|
|
4831
|
-
if (
|
|
4830
|
+
for (const C of M ?? []) {
|
|
4831
|
+
if (C === k)
|
|
4832
4832
|
continue;
|
|
4833
|
-
let
|
|
4833
|
+
let P;
|
|
4834
4834
|
if (n instanceof Function) {
|
|
4835
|
-
if (
|
|
4835
|
+
if (P = n(i, C), !P)
|
|
4836
4836
|
continue;
|
|
4837
4837
|
} else
|
|
4838
|
-
|
|
4838
|
+
P = (typeof n == "object" ? new e.Marker(n) : W(!0)).setLngLat(C.center).setPopup(
|
|
4839
4839
|
new e.Popup({
|
|
4840
4840
|
offset: [1, -27],
|
|
4841
4841
|
closeButton: !1,
|
|
4842
4842
|
closeOnMove: !0,
|
|
4843
4843
|
className: "maptiler-gc-popup"
|
|
4844
4844
|
}).setText(
|
|
4845
|
-
|
|
4845
|
+
C.place_type[0] === "reverse" ? C.place_name : C.place_name.replace(/,.*/, "")
|
|
4846
4846
|
)
|
|
4847
4847
|
).addTo(i);
|
|
4848
|
-
const
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
}),
|
|
4852
|
-
o == null || o({ type: "markerMouseEnter", id:
|
|
4853
|
-
}),
|
|
4854
|
-
o == null || o({ type: "markerMouseLeave", id:
|
|
4855
|
-
}), g.push(
|
|
4848
|
+
const z = P.getElement();
|
|
4849
|
+
z.addEventListener("click", (q) => {
|
|
4850
|
+
q.stopPropagation(), o == null || o({ type: "markerClick", id: C.id });
|
|
4851
|
+
}), z.addEventListener("mouseenter", () => {
|
|
4852
|
+
o == null || o({ type: "markerMouseEnter", id: C.id }), P.togglePopup();
|
|
4853
|
+
}), z.addEventListener("mouseleave", () => {
|
|
4854
|
+
o == null || o({ type: "markerMouseLeave", id: C.id }), P.togglePopup();
|
|
4855
|
+
}), g.push(P);
|
|
4856
4856
|
}
|
|
4857
4857
|
}
|
|
4858
4858
|
},
|
|
4859
4859
|
setSelectedMarker(M) {
|
|
4860
|
-
|
|
4860
|
+
f && f.getElement().classList.toggle("marker-selected", !1), f = M > -1 ? g[M] : void 0, f == null || f.getElement().classList.toggle("marker-selected", !0);
|
|
4861
4861
|
},
|
|
4862
4862
|
getCenterAndZoom() {
|
|
4863
4863
|
const M = i.getCenter();
|
|
@@ -4866,159 +4866,161 @@ function _s(i, e, t = !0, n = !0, r = {}, u = {}, h = Ki) {
|
|
|
4866
4866
|
};
|
|
4867
4867
|
}
|
|
4868
4868
|
function Ss(i, e, t) {
|
|
4869
|
-
var O,
|
|
4869
|
+
var O, W, M;
|
|
4870
4870
|
class n {
|
|
4871
|
-
constructor(
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
this.type =
|
|
4871
|
+
constructor(S, C) {
|
|
4872
|
+
I(this, "type");
|
|
4873
|
+
I(this, "target");
|
|
4874
|
+
this.type = C, this.target = S;
|
|
4875
4875
|
}
|
|
4876
4876
|
}
|
|
4877
4877
|
class r extends n {
|
|
4878
|
-
constructor(
|
|
4879
|
-
super(
|
|
4880
|
-
|
|
4881
|
-
Object.assign(this,
|
|
4878
|
+
constructor(C, P) {
|
|
4879
|
+
super(C, "select");
|
|
4880
|
+
I(this, "feature");
|
|
4881
|
+
Object.assign(this, P);
|
|
4882
4882
|
}
|
|
4883
4883
|
}
|
|
4884
4884
|
class u extends n {
|
|
4885
|
-
constructor(
|
|
4886
|
-
super(
|
|
4887
|
-
|
|
4888
|
-
this.features =
|
|
4885
|
+
constructor(C, P) {
|
|
4886
|
+
super(C, "featureslisted");
|
|
4887
|
+
I(this, "features");
|
|
4888
|
+
this.features = P;
|
|
4889
4889
|
}
|
|
4890
4890
|
}
|
|
4891
4891
|
class h extends n {
|
|
4892
|
-
constructor(
|
|
4893
|
-
super(
|
|
4894
|
-
|
|
4895
|
-
this.features =
|
|
4892
|
+
constructor(C, P) {
|
|
4893
|
+
super(C, "featuresmarked");
|
|
4894
|
+
I(this, "features");
|
|
4895
|
+
this.features = P;
|
|
4896
4896
|
}
|
|
4897
4897
|
}
|
|
4898
4898
|
class o extends n {
|
|
4899
|
-
constructor(
|
|
4900
|
-
super(
|
|
4901
|
-
|
|
4902
|
-
this.optionsVisible =
|
|
4899
|
+
constructor(C, P) {
|
|
4900
|
+
super(C, "optionsvisibilitychange");
|
|
4901
|
+
I(this, "optionsVisible");
|
|
4902
|
+
this.optionsVisible = P;
|
|
4903
4903
|
}
|
|
4904
4904
|
}
|
|
4905
4905
|
class g extends n {
|
|
4906
|
-
constructor(
|
|
4907
|
-
super(
|
|
4908
|
-
|
|
4909
|
-
this.feature =
|
|
4906
|
+
constructor(C, P) {
|
|
4907
|
+
super(C, "pick");
|
|
4908
|
+
I(this, "feature");
|
|
4909
|
+
this.feature = P;
|
|
4910
4910
|
}
|
|
4911
4911
|
}
|
|
4912
|
-
class
|
|
4913
|
-
constructor(
|
|
4914
|
-
super(
|
|
4915
|
-
|
|
4916
|
-
this.query =
|
|
4912
|
+
class f extends n {
|
|
4913
|
+
constructor(C, P) {
|
|
4914
|
+
super(C, "querychange");
|
|
4915
|
+
I(this, "query");
|
|
4916
|
+
this.query = P;
|
|
4917
4917
|
}
|
|
4918
4918
|
}
|
|
4919
|
-
class
|
|
4920
|
-
constructor(
|
|
4921
|
-
super(
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
this.url =
|
|
4919
|
+
class w extends n {
|
|
4920
|
+
constructor(C, P, z) {
|
|
4921
|
+
super(C, "response");
|
|
4922
|
+
I(this, "url");
|
|
4923
|
+
I(this, "featureCollection");
|
|
4924
|
+
this.url = P, this.featureCollection = z;
|
|
4925
4925
|
}
|
|
4926
4926
|
}
|
|
4927
|
-
class
|
|
4928
|
-
constructor(
|
|
4929
|
-
super(
|
|
4930
|
-
|
|
4931
|
-
this.reverse =
|
|
4927
|
+
class _ extends n {
|
|
4928
|
+
constructor(C, P) {
|
|
4929
|
+
super(C, "reversetoggle");
|
|
4930
|
+
I(this, "reverse");
|
|
4931
|
+
this.reverse = P;
|
|
4932
4932
|
}
|
|
4933
4933
|
}
|
|
4934
|
-
class
|
|
4935
|
-
constructor(
|
|
4934
|
+
class N extends i {
|
|
4935
|
+
constructor(C = {}) {
|
|
4936
4936
|
super();
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4937
|
+
Ct(this, O);
|
|
4938
|
+
Ct(this, W);
|
|
4939
|
+
Ct(this, M);
|
|
4940
|
+
gt(this, W, C);
|
|
4941
|
+
}
|
|
4942
|
+
onAddInt(C) {
|
|
4943
|
+
const P = document.createElement("div");
|
|
4944
|
+
P.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
|
|
4944
4945
|
const {
|
|
4945
|
-
marker:
|
|
4946
|
+
marker: z,
|
|
4946
4947
|
showResultMarkers: q,
|
|
4947
|
-
flyTo:
|
|
4948
|
-
fullGeometryStyle:
|
|
4949
|
-
...
|
|
4950
|
-
} =
|
|
4948
|
+
flyTo: A,
|
|
4949
|
+
fullGeometryStyle: s,
|
|
4950
|
+
...l
|
|
4951
|
+
} = se(this, W), a = typeof A == "boolean" ? {} : A, c = {
|
|
4951
4952
|
mapController: _s(
|
|
4952
|
-
|
|
4953
|
+
C,
|
|
4953
4954
|
e,
|
|
4954
|
-
|
|
4955
|
+
z,
|
|
4955
4956
|
q,
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4957
|
+
a,
|
|
4958
|
+
a,
|
|
4959
|
+
s
|
|
4959
4960
|
),
|
|
4960
|
-
flyTo:
|
|
4961
|
+
flyTo: A === void 0 ? !0 : !!A,
|
|
4961
4962
|
apiKey: "",
|
|
4962
4963
|
// just to satisfy apiKey; TODO find a better solution
|
|
4963
|
-
...t == null ? void 0 : t(
|
|
4964
|
-
...
|
|
4964
|
+
...t == null ? void 0 : t(C, P),
|
|
4965
|
+
...l
|
|
4965
4966
|
};
|
|
4966
|
-
if (!
|
|
4967
|
+
if (!c.apiKey)
|
|
4967
4968
|
throw new Error("no apiKey provided");
|
|
4968
|
-
return
|
|
4969
|
-
this.fire(new r(this,
|
|
4970
|
-
}),
|
|
4971
|
-
this.fire(new g(this,
|
|
4972
|
-
}),
|
|
4973
|
-
this.fire(new u(this,
|
|
4974
|
-
}),
|
|
4975
|
-
this.fire(new h(this,
|
|
4976
|
-
}),
|
|
4969
|
+
return gt(this, O, new Qr({ target: P, props: c })), se(this, O).$on("select", (p) => {
|
|
4970
|
+
this.fire(new r(this, p.detail));
|
|
4971
|
+
}), se(this, O).$on("pick", (p) => {
|
|
4972
|
+
this.fire(new g(this, p.detail.feature));
|
|
4973
|
+
}), se(this, O).$on("featureslisted", (p) => {
|
|
4974
|
+
this.fire(new u(this, p.detail.features));
|
|
4975
|
+
}), se(this, O).$on("featuresmarked", (p) => {
|
|
4976
|
+
this.fire(new h(this, p.detail.features));
|
|
4977
|
+
}), se(this, O).$on("response", (p) => {
|
|
4977
4978
|
this.fire(
|
|
4978
|
-
new
|
|
4979
|
+
new w(
|
|
4979
4980
|
this,
|
|
4980
|
-
|
|
4981
|
-
|
|
4981
|
+
p.detail.url,
|
|
4982
|
+
p.detail.featureCollection
|
|
4982
4983
|
)
|
|
4983
4984
|
);
|
|
4984
|
-
}),
|
|
4985
|
+
}), se(this, O).$on("optionsvisibilitychange", (p) => {
|
|
4985
4986
|
this.fire(
|
|
4986
|
-
new o(this,
|
|
4987
|
+
new o(this, p.detail.optionsVisible)
|
|
4987
4988
|
);
|
|
4988
|
-
}),
|
|
4989
|
-
this.fire(new
|
|
4990
|
-
}),
|
|
4991
|
-
this.fire(new
|
|
4992
|
-
}),
|
|
4989
|
+
}), se(this, O).$on("reversetoggle", (p) => {
|
|
4990
|
+
this.fire(new _(this, p.detail.reverse));
|
|
4991
|
+
}), se(this, O).$on("querychange", (p) => {
|
|
4992
|
+
this.fire(new f(this, p.detail.query));
|
|
4993
|
+
}), gt(this, M, P), P;
|
|
4993
4994
|
}
|
|
4994
|
-
|
|
4995
|
-
|
|
4995
|
+
// TODO add backward type compatibility; in MapLibre v4 it returns `this`.
|
|
4996
|
+
on(C, P) {
|
|
4997
|
+
return super.on(C, P);
|
|
4996
4998
|
}
|
|
4997
|
-
once(
|
|
4998
|
-
return super.once(
|
|
4999
|
+
once(C, P) {
|
|
5000
|
+
return super.once(C, P);
|
|
4999
5001
|
}
|
|
5000
|
-
off(
|
|
5001
|
-
return super.off(
|
|
5002
|
+
off(C, P) {
|
|
5003
|
+
return super.off(C, P);
|
|
5002
5004
|
}
|
|
5003
|
-
listens(
|
|
5004
|
-
return super.listens(
|
|
5005
|
+
listens(C) {
|
|
5006
|
+
return super.listens(C);
|
|
5005
5007
|
}
|
|
5006
5008
|
/**
|
|
5007
5009
|
* Update the control options.
|
|
5008
5010
|
*
|
|
5009
5011
|
* @param options options to update
|
|
5010
5012
|
*/
|
|
5011
|
-
setOptions(
|
|
5012
|
-
var
|
|
5013
|
-
Object.assign(
|
|
5013
|
+
setOptions(C) {
|
|
5014
|
+
var l;
|
|
5015
|
+
Object.assign(se(this, W), C);
|
|
5014
5016
|
const {
|
|
5015
|
-
marker:
|
|
5016
|
-
showResultMarkers:
|
|
5017
|
+
marker: P,
|
|
5018
|
+
showResultMarkers: z,
|
|
5017
5019
|
flyTo: q,
|
|
5018
|
-
fullGeometryStyle:
|
|
5019
|
-
...
|
|
5020
|
-
} =
|
|
5021
|
-
(
|
|
5020
|
+
fullGeometryStyle: A,
|
|
5021
|
+
...s
|
|
5022
|
+
} = se(this, W);
|
|
5023
|
+
(l = se(this, O)) == null || l.$set(s);
|
|
5022
5024
|
}
|
|
5023
5025
|
/**
|
|
5024
5026
|
* Set the content of search input box.
|
|
@@ -5026,69 +5028,69 @@ function Ss(i, e, t) {
|
|
|
5026
5028
|
* @param value text to set
|
|
5027
5029
|
* @param submit perform the search
|
|
5028
5030
|
*/
|
|
5029
|
-
setQuery(
|
|
5030
|
-
var
|
|
5031
|
-
(
|
|
5031
|
+
setQuery(C, P = !0) {
|
|
5032
|
+
var z;
|
|
5033
|
+
(z = se(this, O)) == null || z.setQuery(C, P);
|
|
5032
5034
|
}
|
|
5033
5035
|
/**
|
|
5034
5036
|
* Clear geocoding search results from the map.
|
|
5035
5037
|
*/
|
|
5036
5038
|
clearMap() {
|
|
5037
|
-
var
|
|
5038
|
-
(
|
|
5039
|
+
var C;
|
|
5040
|
+
(C = se(this, O)) == null || C.clearMap();
|
|
5039
5041
|
}
|
|
5040
5042
|
/**
|
|
5041
5043
|
* Clear search result list.
|
|
5042
5044
|
*/
|
|
5043
5045
|
clearList() {
|
|
5044
|
-
var
|
|
5045
|
-
(
|
|
5046
|
+
var C;
|
|
5047
|
+
(C = se(this, O)) == null || C.clearList();
|
|
5046
5048
|
}
|
|
5047
5049
|
/**
|
|
5048
5050
|
* Set reverse geocoding mode.
|
|
5049
5051
|
*
|
|
5050
5052
|
* @param reverseActive reverse geocoding active
|
|
5051
5053
|
*/
|
|
5052
|
-
setReverseMode(
|
|
5053
|
-
var
|
|
5054
|
-
(
|
|
5054
|
+
setReverseMode(C) {
|
|
5055
|
+
var P;
|
|
5056
|
+
(P = se(this, O)) == null || P.$set({ reverseActive: C });
|
|
5055
5057
|
}
|
|
5056
5058
|
/**
|
|
5057
5059
|
* Focus the search input box.
|
|
5058
5060
|
*
|
|
5059
5061
|
* @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
5060
5062
|
*/
|
|
5061
|
-
focus(
|
|
5062
|
-
var
|
|
5063
|
-
(
|
|
5063
|
+
focus(C) {
|
|
5064
|
+
var P;
|
|
5065
|
+
(P = se(this, O)) == null || P.focus(C);
|
|
5064
5066
|
}
|
|
5065
5067
|
/**
|
|
5066
5068
|
* Blur the search input box.
|
|
5067
5069
|
*/
|
|
5068
5070
|
blur() {
|
|
5069
|
-
var
|
|
5070
|
-
(
|
|
5071
|
+
var C;
|
|
5072
|
+
(C = se(this, O)) == null || C.blur();
|
|
5071
5073
|
}
|
|
5072
5074
|
onRemove() {
|
|
5073
|
-
var
|
|
5074
|
-
(
|
|
5075
|
+
var C, P, z;
|
|
5076
|
+
(C = se(this, O)) == null || C.$destroy(), gt(this, O, void 0), (z = (P = se(this, M)) == null ? void 0 : P.parentNode) == null || z.removeChild(se(this, M));
|
|
5075
5077
|
}
|
|
5076
5078
|
}
|
|
5077
|
-
return O = new WeakMap(),
|
|
5078
|
-
MapLibreBasedGeocodingControl:
|
|
5079
|
+
return O = new WeakMap(), W = new WeakMap(), M = new WeakMap(), {
|
|
5080
|
+
MapLibreBasedGeocodingControl: N,
|
|
5079
5081
|
events: {
|
|
5080
5082
|
SelectEvent: r,
|
|
5081
5083
|
FeaturesListedEvent: u,
|
|
5082
5084
|
FeaturesMarkedEvent: h,
|
|
5083
5085
|
OptionsVisibilityChangeEvent: o,
|
|
5084
5086
|
PickEvent: g,
|
|
5085
|
-
QueryChangeEvent:
|
|
5086
|
-
ResponseEvent:
|
|
5087
|
-
ReverseToggleEvent:
|
|
5087
|
+
QueryChangeEvent: f,
|
|
5088
|
+
ResponseEvent: w,
|
|
5089
|
+
ReverseToggleEvent: _
|
|
5088
5090
|
}
|
|
5089
5091
|
};
|
|
5090
5092
|
}
|
|
5091
|
-
const xs = "@maptiler/geocoding-control", Ts = "2.1.
|
|
5093
|
+
const xs = "@maptiler/geocoding-control", Ts = "2.1.6", { MapLibreBasedGeocodingControl: Ms, events: $e } = Ss(
|
|
5092
5094
|
Li.Evented,
|
|
5093
5095
|
Li,
|
|
5094
5096
|
(i, e) => {
|