@maptiler/geocoding-control 1.4.2-dev.2 → 2.0.0

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.
Files changed (55) hide show
  1. package/MapLibreBasedGeocodingControl.d.ts +70 -35
  2. package/leaflet-controller.d.ts +1 -1
  3. package/leaflet-controller.js +407 -398
  4. package/leaflet-controller.js.map +1 -1
  5. package/leaflet-controller.umd.js +3 -3
  6. package/leaflet-controller.umd.js.map +1 -1
  7. package/leaflet.d.ts +52 -16
  8. package/leaflet.js +888 -870
  9. package/leaflet.js.map +1 -1
  10. package/leaflet.umd.js +3 -3
  11. package/leaflet.umd.js.map +1 -1
  12. package/maplibregl-controller.d.ts +7 -7
  13. package/maplibregl-controller.js +421 -413
  14. package/maplibregl-controller.js.map +1 -1
  15. package/maplibregl-controller.umd.js +3 -3
  16. package/maplibregl-controller.umd.js.map +1 -1
  17. package/maplibregl.d.ts +29 -5
  18. package/maplibregl.js +1244 -1236
  19. package/maplibregl.js.map +1 -1
  20. package/maplibregl.umd.js +3 -3
  21. package/maplibregl.umd.js.map +1 -1
  22. package/maptilersdk.d.ts +29 -5
  23. package/maptilersdk.js +1194 -1180
  24. package/maptilersdk.js.map +1 -1
  25. package/maptilersdk.umd.js +3 -3
  26. package/maptilersdk.umd.js.map +1 -1
  27. package/openlayers.js +694 -692
  28. package/openlayers.js.map +1 -1
  29. package/openlayers.umd.js +3 -3
  30. package/openlayers.umd.js.map +1 -1
  31. package/package.json +5 -5
  32. package/react.js +671 -669
  33. package/react.js.map +1 -1
  34. package/react.umd.js +1 -1
  35. package/react.umd.js.map +1 -1
  36. package/svelte/GeocodingControl.svelte +4 -2
  37. package/svelte/GeocodingControl.svelte.d.ts +1 -0
  38. package/svelte/MapLibreBasedGeocodingControl.d.ts +70 -35
  39. package/svelte/MapLibreBasedGeocodingControl.js +69 -66
  40. package/svelte/leaflet-controller.d.ts +1 -1
  41. package/svelte/leaflet-controller.js +47 -24
  42. package/svelte/leaflet.d.ts +52 -16
  43. package/svelte/leaflet.js +14 -2
  44. package/svelte/maplibregl-controller.d.ts +7 -7
  45. package/svelte/maplibregl-controller.js +55 -34
  46. package/svelte/maplibregl.d.ts +29 -5
  47. package/svelte/maplibregl.js +3 -8
  48. package/svelte/maptilersdk.d.ts +29 -5
  49. package/svelte/maptilersdk.js +15 -18
  50. package/svelte/types.d.ts +6 -0
  51. package/types.d.ts +6 -0
  52. package/vanilla.js +392 -390
  53. package/vanilla.js.map +1 -1
  54. package/vanilla.umd.js +1 -1
  55. package/vanilla.umd.js.map +1 -1
package/maptilersdk.js CHANGED
@@ -1,11 +1,11 @@
1
- var nn = Object.defineProperty;
2
- var Ft = (n) => {
1
+ var rn = Object.defineProperty;
2
+ var zt = (n) => {
3
3
  throw TypeError(n);
4
4
  };
5
- var rn = (n, e, t) => e in n ? nn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
- var wt = (n, e, t) => rn(n, typeof e != "symbol" ? e + "" : e, t), jt = (n, e, t) => e.has(n) || Ft("Cannot " + t);
7
- var ne = (n, e, t) => (jt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), _t = (n, e, t) => e.has(n) ? Ft("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), et = (n, e, t, i) => (jt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
8
- import * as on from "@maptiler/sdk";
5
+ var on = (n, e, t) => e in n ? rn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
+ var bt = (n, e, t) => on(n, typeof e != "symbol" ? e + "" : e, t), Gt = (n, e, t) => e.has(n) || zt("Cannot " + t);
7
+ var ie = (n, e, t) => (Gt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), wt = (n, e, t) => e.has(n) ? zt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), Je = (n, e, t, i) => (Gt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
8
+ import * as Ft from "@maptiler/sdk";
9
9
  function A() {
10
10
  }
11
11
  function sn(n, e) {
@@ -15,35 +15,35 @@ function sn(n, e) {
15
15
  n
16
16
  );
17
17
  }
18
- function Li(n) {
18
+ function Si(n) {
19
19
  return n();
20
20
  }
21
- function Zt() {
21
+ function jt() {
22
22
  return /* @__PURE__ */ Object.create(null);
23
23
  }
24
- function me(n) {
25
- n.forEach(Li);
24
+ function ge(n) {
25
+ n.forEach(Si);
26
26
  }
27
27
  function xi(n) {
28
28
  return typeof n == "function";
29
29
  }
30
- function Le(n, e) {
30
+ function Ee(n, e) {
31
31
  return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
32
32
  }
33
- let tt;
33
+ let $e;
34
34
  function K(n, e) {
35
- return n === e ? !0 : (tt || (tt = document.createElement("a")), tt.href = e, n === tt.href);
35
+ return n === e ? !0 : ($e || ($e = document.createElement("a")), $e.href = e, n === $e.href);
36
36
  }
37
37
  function ln(n) {
38
38
  return Object.keys(n).length === 0;
39
39
  }
40
40
  function un(n, e, t, i) {
41
41
  if (n) {
42
- const r = Si(n, e, t, i);
42
+ const r = Mi(n, e, t, i);
43
43
  return n[0](r);
44
44
  }
45
45
  }
46
- function Si(n, e, t, i) {
46
+ function Mi(n, e, t, i) {
47
47
  return n[1] && i ? sn(t.ctx.slice(), n[1](i(e))) : t.ctx;
48
48
  }
49
49
  function an(n, e, t, i) {
@@ -52,8 +52,8 @@ function an(n, e, t, i) {
52
52
  if (e.dirty === void 0)
53
53
  return r;
54
54
  if (typeof r == "object") {
55
- const o = [], l = Math.max(e.dirty.length, r.length);
56
- for (let s = 0; s < l; s += 1)
55
+ const o = [], a = Math.max(e.dirty.length, r.length);
56
+ for (let s = 0; s < a; s += 1)
57
57
  o[s] = e.dirty[s] | r[s];
58
58
  return o;
59
59
  }
@@ -63,8 +63,8 @@ function an(n, e, t, i) {
63
63
  }
64
64
  function cn(n, e, t, i, r, o) {
65
65
  if (r) {
66
- const l = Si(e, t, i, o);
67
- n.p(l, r);
66
+ const a = Mi(e, t, i, o);
67
+ n.p(a, r);
68
68
  }
69
69
  }
70
70
  function fn(n) {
@@ -76,7 +76,7 @@ function fn(n) {
76
76
  }
77
77
  return -1;
78
78
  }
79
- function qt(n) {
79
+ function Zt(n) {
80
80
  return n ?? "";
81
81
  }
82
82
  function P(n, e) {
@@ -91,17 +91,17 @@ function B(n) {
91
91
  function W(n) {
92
92
  return document.createElement(n);
93
93
  }
94
- function ue(n) {
94
+ function le(n) {
95
95
  return document.createElementNS("http://www.w3.org/2000/svg", n);
96
96
  }
97
- function we(n) {
97
+ function be(n) {
98
98
  return document.createTextNode(n);
99
99
  }
100
- function ie() {
101
- return we(" ");
100
+ function te() {
101
+ return be(" ");
102
102
  }
103
103
  function dn() {
104
- return we("");
104
+ return be("");
105
105
  }
106
106
  function J(n, e, t, i) {
107
107
  return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
@@ -117,32 +117,32 @@ function v(n, e, t) {
117
117
  function gn(n) {
118
118
  return Array.from(n.childNodes);
119
119
  }
120
- function Fe(n, e) {
120
+ function ze(n, e) {
121
121
  e = "" + e, n.data !== e && (n.data = /** @type {string} */
122
122
  e);
123
123
  }
124
- function Gt(n, e) {
124
+ function qt(n, e) {
125
125
  n.value = e ?? "";
126
126
  }
127
- function oe(n, e, t) {
127
+ function re(n, e, t) {
128
128
  n.classList.toggle(e, !!t);
129
129
  }
130
130
  function mn(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
131
131
  return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
132
132
  }
133
- let je;
134
- function ze(n) {
135
- je = n;
133
+ let Ge;
134
+ function Ue(n) {
135
+ Ge = n;
136
136
  }
137
- function Mi() {
138
- if (!je) throw new Error("Function called outside component initialization");
139
- return je;
137
+ function Ci() {
138
+ if (!Ge) throw new Error("Function called outside component initialization");
139
+ return Ge;
140
140
  }
141
- function pn(n) {
142
- Mi().$$.on_destroy.push(n);
141
+ function yn(n) {
142
+ Ci().$$.on_destroy.push(n);
143
143
  }
144
144
  function vn() {
145
- const n = Mi();
145
+ const n = Ci();
146
146
  return (e, t, { cancelable: i = !1 } = {}) => {
147
147
  const r = n.$$.callbacks[e];
148
148
  if (r) {
@@ -152,8 +152,8 @@ function vn() {
152
152
  t,
153
153
  { cancelable: i }
154
154
  );
155
- return r.slice().forEach((l) => {
156
- l.call(n, o);
155
+ return r.slice().forEach((a) => {
156
+ a.call(n, o);
157
157
  }), !o.defaultPrevented;
158
158
  }
159
159
  return !0;
@@ -163,74 +163,74 @@ function Qt(n, e) {
163
163
  const t = n.$$.callbacks[e.type];
164
164
  t && t.slice().forEach((i) => i.call(this, e));
165
165
  }
166
- const Oe = [], St = [];
167
- let We = [];
168
- const Ht = [], yn = /* @__PURE__ */ Promise.resolve();
169
- let Mt = !1;
166
+ const Ie = [], St = [];
167
+ let Oe = [];
168
+ const Ht = [], pn = /* @__PURE__ */ Promise.resolve();
169
+ let xt = !1;
170
170
  function bn() {
171
- Mt || (Mt = !0, yn.then(ki));
171
+ xt || (xt = !0, pn.then(ki));
172
172
  }
173
- function kt(n) {
174
- We.push(n);
173
+ function Mt(n) {
174
+ Oe.push(n);
175
175
  }
176
- const Et = /* @__PURE__ */ new Set();
177
- let Re = 0;
176
+ const _t = /* @__PURE__ */ new Set();
177
+ let Pe = 0;
178
178
  function ki() {
179
- if (Re !== 0)
179
+ if (Pe !== 0)
180
180
  return;
181
- const n = je;
181
+ const n = Ge;
182
182
  do {
183
183
  try {
184
- for (; Re < Oe.length; ) {
185
- const e = Oe[Re];
186
- Re++, ze(e), wn(e.$$);
184
+ for (; Pe < Ie.length; ) {
185
+ const e = Ie[Pe];
186
+ Pe++, Ue(e), wn(e.$$);
187
187
  }
188
188
  } catch (e) {
189
- throw Oe.length = 0, Re = 0, e;
189
+ throw Ie.length = 0, Pe = 0, e;
190
190
  }
191
- for (ze(null), Oe.length = 0, Re = 0; St.length; ) St.pop()();
192
- for (let e = 0; e < We.length; e += 1) {
193
- const t = We[e];
194
- Et.has(t) || (Et.add(t), t());
191
+ for (Ue(null), Ie.length = 0, Pe = 0; St.length; ) St.pop()();
192
+ for (let e = 0; e < Oe.length; e += 1) {
193
+ const t = Oe[e];
194
+ _t.has(t) || (_t.add(t), t());
195
195
  }
196
- We.length = 0;
197
- } while (Oe.length);
196
+ Oe.length = 0;
197
+ } while (Ie.length);
198
198
  for (; Ht.length; )
199
199
  Ht.pop()();
200
- Mt = !1, Et.clear(), ze(n);
200
+ xt = !1, _t.clear(), Ue(n);
201
201
  }
202
202
  function wn(n) {
203
203
  if (n.fragment !== null) {
204
- n.update(), me(n.before_update);
204
+ n.update(), ge(n.before_update);
205
205
  const e = n.dirty;
206
- n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(kt);
206
+ n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Mt);
207
207
  }
208
208
  }
209
209
  function _n(n) {
210
210
  const e = [], t = [];
211
- We.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), We = e;
211
+ Oe.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), Oe = e;
212
212
  }
213
- const it = /* @__PURE__ */ new Set();
214
- let ke;
215
- function nt() {
216
- ke = {
213
+ const et = /* @__PURE__ */ new Set();
214
+ let Ce;
215
+ function tt() {
216
+ Ce = {
217
217
  r: 0,
218
218
  c: [],
219
- p: ke
219
+ p: Ce
220
220
  // parent group
221
221
  };
222
222
  }
223
- function rt() {
224
- ke.r || me(ke.c), ke = ke.p;
223
+ function it() {
224
+ Ce.r || ge(Ce.c), Ce = Ce.p;
225
225
  }
226
- function q(n, e) {
227
- n && n.i && (it.delete(n), n.i(e));
226
+ function Z(n, e) {
227
+ n && n.i && (et.delete(n), n.i(e));
228
228
  }
229
229
  function V(n, e, t, i) {
230
230
  if (n && n.o) {
231
- if (it.has(n)) return;
232
- it.add(n), ke.c.push(() => {
233
- it.delete(n), i && (t && n.d(1), i());
231
+ if (et.has(n)) return;
232
+ et.add(n), Ce.c.push(() => {
233
+ et.delete(n), i && (t && n.d(1), i());
234
234
  }), n.o(e);
235
235
  } else i && i();
236
236
  }
@@ -242,86 +242,86 @@ function En(n, e) {
242
242
  e.delete(n.key);
243
243
  });
244
244
  }
245
- function Ln(n, e, t, i, r, o, l, s, c, u, d, a) {
246
- let f = n.length, h = o.length, y = f;
245
+ function Ln(n, e, t, i, r, o, a, s, u, l, d, c) {
246
+ let f = n.length, h = o.length, p = f;
247
247
  const b = {};
248
- for (; y--; ) b[n[y].key] = y;
249
- const p = [], m = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), S = [];
250
- for (y = h; y--; ) {
251
- const L = a(r, o, y), w = t(L);
252
- let C = l.get(w);
253
- C ? S.push(() => C.p(L, e)) : (C = u(w, L), C.c()), m.set(w, p[y] = C), w in b && E.set(w, Math.abs(y - b[w]));
248
+ for (; p--; ) b[n[p].key] = p;
249
+ const m = [], y = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), L = [];
250
+ for (p = h; p--; ) {
251
+ const S = c(r, o, p), w = t(S);
252
+ let k = a.get(w);
253
+ k ? L.push(() => k.p(S, e)) : (k = l(w, S), k.c()), y.set(w, m[p] = k), w in b && _.set(w, Math.abs(p - b[w]));
254
254
  }
255
- const _ = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set();
256
- function x(L) {
257
- q(L, 1), L.m(s, d), l.set(L.key, L), d = L.first, h--;
255
+ const E = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Set();
256
+ function x(S) {
257
+ Z(S, 1), S.m(s, d), a.set(S.key, S), d = S.first, h--;
258
258
  }
259
259
  for (; f && h; ) {
260
- const L = p[h - 1], w = n[f - 1], C = L.key, I = w.key;
261
- L === w ? (d = L.first, f--, h--) : m.has(I) ? !l.has(C) || _.has(C) ? x(L) : k.has(I) ? f-- : E.get(C) > E.get(I) ? (k.add(C), x(L)) : (_.add(I), f--) : (c(w, l), f--);
260
+ const S = m[h - 1], w = n[f - 1], k = S.key, I = w.key;
261
+ S === w ? (d = S.first, f--, h--) : y.has(I) ? !a.has(k) || E.has(k) ? x(S) : C.has(I) ? f-- : _.get(k) > _.get(I) ? (C.add(k), x(S)) : (E.add(I), f--) : (u(w, a), f--);
262
262
  }
263
263
  for (; f--; ) {
264
- const L = n[f];
265
- m.has(L.key) || c(L, l);
264
+ const S = n[f];
265
+ y.has(S.key) || u(S, a);
266
266
  }
267
- for (; h; ) x(p[h - 1]);
268
- return me(S), p;
267
+ for (; h; ) x(m[h - 1]);
268
+ return ge(L), m;
269
269
  }
270
- function _e(n) {
270
+ function we(n) {
271
271
  n && n.c();
272
272
  }
273
- function he(n, e, t) {
273
+ function de(n, e, t) {
274
274
  const { fragment: i, after_update: r } = n.$$;
275
- i && i.m(e, t), kt(() => {
276
- const o = n.$$.on_mount.map(Li).filter(xi);
277
- n.$$.on_destroy ? n.$$.on_destroy.push(...o) : me(o), n.$$.on_mount = [];
278
- }), r.forEach(kt);
275
+ i && i.m(e, t), Mt(() => {
276
+ const o = n.$$.on_mount.map(Si).filter(xi);
277
+ n.$$.on_destroy ? n.$$.on_destroy.push(...o) : ge(o), n.$$.on_mount = [];
278
+ }), r.forEach(Mt);
279
279
  }
280
- function ge(n, e) {
280
+ function he(n, e) {
281
281
  const t = n.$$;
282
- t.fragment !== null && (_n(t.after_update), me(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
282
+ t.fragment !== null && (_n(t.after_update), ge(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
283
283
  }
284
- function xn(n, e) {
285
- n.$$.dirty[0] === -1 && (Oe.push(n), bn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
284
+ function Sn(n, e) {
285
+ n.$$.dirty[0] === -1 && (Ie.push(n), bn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
286
286
  }
287
- function xe(n, e, t, i, r, o, l = null, s = [-1]) {
288
- const c = je;
289
- ze(n);
290
- const u = n.$$ = {
287
+ function Le(n, e, t, i, r, o, a = null, s = [-1]) {
288
+ const u = Ge;
289
+ Ue(n);
290
+ const l = n.$$ = {
291
291
  fragment: null,
292
292
  ctx: [],
293
293
  // state
294
294
  props: o,
295
295
  update: A,
296
296
  not_equal: r,
297
- bound: Zt(),
297
+ bound: jt(),
298
298
  // lifecycle
299
299
  on_mount: [],
300
300
  on_destroy: [],
301
301
  on_disconnect: [],
302
302
  before_update: [],
303
303
  after_update: [],
304
- context: new Map(e.context || (c ? c.$$.context : [])),
304
+ context: new Map(e.context || (u ? u.$$.context : [])),
305
305
  // everything else
306
- callbacks: Zt(),
306
+ callbacks: jt(),
307
307
  dirty: s,
308
308
  skip_bound: !1,
309
- root: e.target || c.$$.root
309
+ root: e.target || u.$$.root
310
310
  };
311
- l && l(u.root);
311
+ a && a(l.root);
312
312
  let d = !1;
313
- if (u.ctx = t ? t(n, e.props || {}, (a, f, ...h) => {
314
- const y = h.length ? h[0] : f;
315
- return u.ctx && r(u.ctx[a], u.ctx[a] = y) && (!u.skip_bound && u.bound[a] && u.bound[a](y), d && xn(n, a)), f;
316
- }) : [], u.update(), d = !0, me(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
313
+ if (l.ctx = t ? t(n, e.props || {}, (c, f, ...h) => {
314
+ const p = h.length ? h[0] : f;
315
+ return l.ctx && r(l.ctx[c], l.ctx[c] = p) && (!l.skip_bound && l.bound[c] && l.bound[c](p), d && Sn(n, c)), f;
316
+ }) : [], l.update(), d = !0, ge(l.before_update), l.fragment = i ? i(l.ctx) : !1, e.target) {
317
317
  if (e.hydrate) {
318
- const a = gn(e.target);
319
- u.fragment && u.fragment.l(a), a.forEach(B);
318
+ const c = gn(e.target);
319
+ l.fragment && l.fragment.l(c), c.forEach(B);
320
320
  } else
321
- u.fragment && u.fragment.c();
322
- e.intro && q(n.$$.fragment), he(n, e.target, e.anchor), ki();
321
+ l.fragment && l.fragment.c();
322
+ e.intro && Z(n.$$.fragment), de(n, e.target, e.anchor), ki();
323
323
  }
324
- ze(c);
324
+ Ue(u);
325
325
  }
326
326
  class Se {
327
327
  constructor() {
@@ -332,7 +332,7 @@ class Se {
332
332
  *
333
333
  * @type {any}
334
334
  */
335
- wt(this, "$$");
335
+ bt(this, "$$");
336
336
  /**
337
337
  * ### PRIVATE API
338
338
  *
@@ -340,11 +340,11 @@ class Se {
340
340
  *
341
341
  * @type {any}
342
342
  */
343
- wt(this, "$$set");
343
+ bt(this, "$$set");
344
344
  }
345
345
  /** @returns {void} */
346
346
  $destroy() {
347
- ge(this, 1), this.$destroy = A;
347
+ he(this, 1), this.$destroy = A;
348
348
  }
349
349
  /**
350
350
  * @template {Extract<keyof Events, string>} K
@@ -369,13 +369,13 @@ class Se {
369
369
  this.$$set && !ln(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
370
370
  }
371
371
  }
372
- const Sn = "4";
373
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Sn);
372
+ const xn = "4";
373
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(xn);
374
374
  function Mn(n) {
375
375
  let e, t;
376
376
  return {
377
377
  c() {
378
- e = ue("svg"), t = ue("path"), v(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), v(e, "viewBox", "0 0 14 14"), v(e, "width", "13"), v(e, "height", "13"), v(e, "class", "svelte-en2qvf");
378
+ e = le("svg"), t = le("path"), v(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), v(e, "viewBox", "0 0 14 14"), v(e, "width", "13"), v(e, "height", "13"), v(e, "class", "svelte-en2qvf");
379
379
  },
380
380
  m(i, r) {
381
381
  z(i, e, r), P(e, t);
@@ -388,16 +388,16 @@ function Mn(n) {
388
388
  }
389
389
  };
390
390
  }
391
- class Ci extends Se {
391
+ class Ni extends Se {
392
392
  constructor(e) {
393
- super(), xe(this, e, null, Mn, Le, {});
393
+ super(), Le(this, e, null, Mn, Ee, {});
394
394
  }
395
395
  }
396
- function kn(n) {
396
+ function Cn(n) {
397
397
  let e, t;
398
398
  return {
399
399
  c() {
400
- e = ue("svg"), t = ue("path"), v(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), v(e, "viewBox", "0 0 30 30"), v(e, "fill", "none"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "class", "svelte-d2loi5");
400
+ e = le("svg"), t = le("path"), v(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), v(e, "viewBox", "0 0 30 30"), v(e, "fill", "none"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "class", "svelte-d2loi5");
401
401
  },
402
402
  m(i, r) {
403
403
  z(i, e, r), P(e, t);
@@ -410,12 +410,12 @@ function kn(n) {
410
410
  }
411
411
  };
412
412
  }
413
- class Ni extends Se {
413
+ class Ti extends Se {
414
414
  constructor(e) {
415
- super(), xe(this, e, null, kn, Le, {});
415
+ super(), Le(this, e, null, Cn, Ee, {});
416
416
  }
417
417
  }
418
- function Cn(n) {
418
+ function kn(n) {
419
419
  let e, t;
420
420
  return {
421
421
  c() {
@@ -644,18 +644,18 @@ function Wn(n) {
644
644
  n[4]
645
645
  ), v(e, "class", "svelte-ltkwvy");
646
646
  },
647
- m(o, l) {
648
- z(o, e, l), i || (r = J(
647
+ m(o, a) {
648
+ z(o, e, a), i || (r = J(
649
649
  e,
650
650
  "error",
651
651
  /*error_handler*/
652
652
  n[14]
653
653
  ), i = !0);
654
654
  },
655
- p(o, l) {
656
- l & /*imageUrl*/
655
+ p(o, a) {
656
+ a & /*imageUrl*/
657
657
  32 && !K(e.src, t = /*imageUrl*/
658
- o[5]) && v(e, "src", t), l & /*category*/
658
+ o[5]) && v(e, "src", t), a & /*category*/
659
659
  16 && v(
660
660
  e,
661
661
  "alt",
@@ -672,7 +672,7 @@ function Yt(n) {
672
672
  let e, t;
673
673
  return {
674
674
  c() {
675
- e = W("span"), t = we(
675
+ e = W("span"), t = be(
676
676
  /*placeType*/
677
677
  n[6]
678
678
  ), v(e, "class", "secondary svelte-ltkwvy");
@@ -682,7 +682,7 @@ function Yt(n) {
682
682
  },
683
683
  p(i, r) {
684
684
  r & /*placeType*/
685
- 64 && Fe(
685
+ 64 && ze(
686
686
  t,
687
687
  /*placeType*/
688
688
  i[6]
@@ -694,7 +694,7 @@ function Yt(n) {
694
694
  };
695
695
  }
696
696
  function An(n) {
697
- let e, t, i, r, o, l, s, c, u, d = (
697
+ let e, t, i, r, o, a, s, u, l, d = (
698
698
  /*isReverse*/
699
699
  (n[7] ? (
700
700
  /*feature*/
@@ -703,7 +703,7 @@ function An(n) {
703
703
  /*feature*/
704
704
  n[0].place_name.replace(/,.*/, "")
705
705
  )) + ""
706
- ), a, f, h = (
706
+ ), c, f, h = (
707
707
  /*showPlaceType*/
708
708
  n[2] === "always" || /*showPlaceType*/
709
709
  n[2] && !/*feature*/
@@ -714,18 +714,18 @@ function An(n) {
714
714
  n[0].id.startsWith("poi.") || !/*imageUrl*/
715
715
  n[5]) && !/*isReverse*/
716
716
  n[7]
717
- ), y, b, p = (
717
+ ), p, b, m = (
718
718
  /*isReverse*/
719
719
  (n[7] ? "" : (
720
720
  /*feature*/
721
721
  n[0].place_name.replace(/[^,]*,?\s*/, "")
722
722
  )) + ""
723
- ), m, E, S;
724
- function _(w, C) {
725
- return C & /*feature*/
726
- 1 && (t = null), C & /*feature*/
727
- 1 && (i = null), C & /*feature*/
728
- 1 && (r = null), C & /*feature*/
723
+ ), y, _, L;
724
+ function E(w, k) {
725
+ return k & /*feature*/
726
+ 1 && (t = null), k & /*feature*/
727
+ 1 && (i = null), k & /*feature*/
728
+ 1 && (r = null), k & /*feature*/
729
729
  1 && (o = null), /*imageUrl*/
730
730
  w[5] ? Wn : (
731
731
  /*feature*/
@@ -735,27 +735,27 @@ function An(n) {
735
735
  w[0].id.startsWith("postal_code.")), r ? Pn : (o == null && (o = !!/*feature*/
736
736
  w[0].id.startsWith("poi.")), o ? Tn : (
737
737
  /*isReverse*/
738
- w[7] ? Nn : Cn
738
+ w[7] ? Nn : kn
739
739
  )))))
740
740
  );
741
741
  }
742
- let k = _(n, -1), x = k(n), L = h && Yt(n);
742
+ let C = E(n, -1), x = C(n), S = h && Yt(n);
743
743
  return {
744
744
  c() {
745
- e = W("li"), x.c(), l = ie(), s = W("span"), c = W("span"), u = W("span"), a = we(d), f = ie(), L && L.c(), y = ie(), b = W("span"), m = we(p), v(u, "class", "primary svelte-ltkwvy"), v(c, "class", "svelte-ltkwvy"), v(b, "class", "line2 svelte-ltkwvy"), v(s, "class", "texts svelte-ltkwvy"), v(e, "tabindex", "0"), v(
745
+ e = W("li"), x.c(), a = te(), s = W("span"), u = W("span"), l = W("span"), c = be(d), f = te(), S && S.c(), p = te(), b = W("span"), y = be(m), v(l, "class", "primary svelte-ltkwvy"), v(u, "class", "svelte-ltkwvy"), v(b, "class", "line2 svelte-ltkwvy"), v(s, "class", "texts svelte-ltkwvy"), v(e, "tabindex", "0"), v(
746
746
  e,
747
747
  "data-selected",
748
748
  /*selected*/
749
749
  n[1]
750
- ), v(e, "class", "svelte-ltkwvy"), oe(
750
+ ), v(e, "class", "svelte-ltkwvy"), re(
751
751
  e,
752
752
  "selected",
753
753
  /*selected*/
754
754
  n[1]
755
755
  );
756
756
  },
757
- m(w, C) {
758
- z(w, e, C), x.m(e, null), P(e, l), P(e, s), P(s, c), P(c, u), P(u, a), P(c, f), L && L.m(c, null), P(s, y), P(s, b), P(b, m), E || (S = [
757
+ m(w, k) {
758
+ z(w, e, k), x.m(e, null), P(e, a), P(e, s), P(s, u), P(u, l), P(l, c), P(u, f), S && S.m(u, null), P(s, p), P(s, b), P(b, y), _ || (L = [
759
759
  J(
760
760
  e,
761
761
  "mouseenter",
@@ -768,10 +768,10 @@ function An(n) {
768
768
  /*focus_handler*/
769
769
  n[13]
770
770
  )
771
- ], E = !0);
771
+ ], _ = !0);
772
772
  },
773
- p(w, [C]) {
774
- k === (k = _(w, C)) && x ? x.p(w, C) : (x.d(1), x = k(w), x && (x.c(), x.m(e, l))), C & /*feature*/
773
+ p(w, [k]) {
774
+ C === (C = E(w, k)) && x ? x.p(w, k) : (x.d(1), x = C(w), x && (x.c(), x.m(e, a))), k & /*feature*/
775
775
  1 && d !== (d = /*isReverse*/
776
776
  (w[7] ? (
777
777
  /*feature*/
@@ -779,7 +779,7 @@ function An(n) {
779
779
  ) : (
780
780
  /*feature*/
781
781
  w[0].place_name.replace(/,.*/, "")
782
- )) + "") && Fe(a, d), C & /*showPlaceType, feature, imageUrl*/
782
+ )) + "") && ze(c, d), k & /*showPlaceType, feature, imageUrl*/
783
783
  37 && (h = /*showPlaceType*/
784
784
  w[2] === "always" || /*showPlaceType*/
785
785
  w[2] && !/*feature*/
@@ -789,19 +789,19 @@ function An(n) {
789
789
  w[0].id.startsWith("postal_code.") && (!/*feature*/
790
790
  w[0].id.startsWith("poi.") || !/*imageUrl*/
791
791
  w[5]) && !/*isReverse*/
792
- w[7]), h ? L ? L.p(w, C) : (L = Yt(w), L.c(), L.m(c, null)) : L && (L.d(1), L = null), C & /*feature*/
793
- 1 && p !== (p = /*isReverse*/
792
+ w[7]), h ? S ? S.p(w, k) : (S = Yt(w), S.c(), S.m(u, null)) : S && (S.d(1), S = null), k & /*feature*/
793
+ 1 && m !== (m = /*isReverse*/
794
794
  (w[7] ? "" : (
795
795
  /*feature*/
796
796
  w[0].place_name.replace(/[^,]*,?\s*/, "")
797
- )) + "") && Fe(m, p), C & /*selected*/
797
+ )) + "") && ze(y, m), k & /*selected*/
798
798
  2 && v(
799
799
  e,
800
800
  "data-selected",
801
801
  /*selected*/
802
802
  w[1]
803
- ), C & /*selected*/
804
- 2 && oe(
803
+ ), k & /*selected*/
804
+ 2 && re(
805
805
  e,
806
806
  "selected",
807
807
  /*selected*/
@@ -811,57 +811,57 @@ function An(n) {
811
811
  i: A,
812
812
  o: A,
813
813
  d(w) {
814
- w && B(e), x.d(), L && L.d(), E = !1, me(S);
814
+ w && B(e), x.d(), S && S.d(), _ = !1, ge(L);
815
815
  }
816
816
  };
817
817
  }
818
818
  function Bn(n, e, t) {
819
- var S;
820
- let i, r, { feature: o } = e, { selected: l = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: u } = e;
821
- const d = (S = o.properties) == null ? void 0 : S.categories;
822
- let a, f, h = 0, y = o.place_type[0] === "reverse";
819
+ var L;
820
+ let i, r, { feature: o } = e, { selected: a = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: u } = e, { iconsBaseUrl: l } = e;
821
+ const d = (L = o.properties) == null ? void 0 : L.categories;
822
+ let c, f, h = 0, p = o.place_type[0] === "reverse";
823
823
  function b() {
824
- f && c.add(f), t(10, h++, h);
824
+ f && u.add(f), t(10, h++, h);
825
825
  }
826
- function p(_) {
827
- Qt.call(this, n, _);
826
+ function m(E) {
827
+ Qt.call(this, n, E);
828
828
  }
829
- function m(_) {
830
- Qt.call(this, n, _);
829
+ function y(E) {
830
+ Qt.call(this, n, E);
831
831
  }
832
- const E = () => b();
833
- return n.$$set = (_) => {
834
- "feature" in _ && t(0, o = _.feature), "selected" in _ && t(1, l = _.selected), "showPlaceType" in _ && t(2, s = _.showPlaceType), "missingIconsCache" in _ && t(9, c = _.missingIconsCache), "iconsBaseUrl" in _ && t(3, u = _.iconsBaseUrl);
832
+ const _ = () => b();
833
+ return n.$$set = (E) => {
834
+ "feature" in E && t(0, o = E.feature), "selected" in E && t(1, a = E.selected), "showPlaceType" in E && t(2, s = E.showPlaceType), "missingIconsCache" in E && t(9, u = E.missingIconsCache), "iconsBaseUrl" in E && t(3, l = E.iconsBaseUrl);
835
835
  }, n.$$.update = () => {
836
- var _, k, x, L;
836
+ var E, C, x, S;
837
837
  if (n.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
838
838
  3640)
839
839
  do
840
- t(11, i--, i), t(4, a = d == null ? void 0 : d[i]), t(5, f = a ? u + a.replace(/ /g, "_") + ".svg" : void 0);
841
- while (i > -1 && (!f || c.has(f)));
840
+ t(11, i--, i), t(4, c = d == null ? void 0 : d[i]), t(5, f = c ? l + c.replace(/ /g, "_") + ".svg" : void 0);
841
+ while (i > -1 && (!f || u.has(f)));
842
842
  n.$$.dirty & /*feature*/
843
- 1 && t(6, r = ((k = (_ = o.properties) == null ? void 0 : _.categories) == null ? void 0 : k.join(", ")) ?? ((L = (x = o.properties) == null ? void 0 : x.place_type_name) == null ? void 0 : L[0]) ?? o.place_type[0]);
843
+ 1 && t(6, r = ((C = (E = o.properties) == null ? void 0 : E.categories) == null ? void 0 : C.join(", ")) ?? ((S = (x = o.properties) == null ? void 0 : x.place_type_name) == null ? void 0 : S[0]) ?? o.place_type[0]);
844
844
  }, t(11, i = (d == null ? void 0 : d.length) ?? 0), [
845
845
  o,
846
- l,
847
- s,
848
- u,
849
846
  a,
847
+ s,
848
+ l,
849
+ c,
850
850
  f,
851
851
  r,
852
- y,
852
+ p,
853
853
  b,
854
- c,
854
+ u,
855
855
  h,
856
856
  i,
857
- p,
858
857
  m,
859
- E
858
+ y,
859
+ _
860
860
  ];
861
861
  }
862
862
  class Dn extends Se {
863
863
  constructor(e) {
864
- super(), xe(this, e, Bn, An, Le, {
864
+ super(), Le(this, e, Bn, An, Ee, {
865
865
  feature: 0,
866
866
  selected: 1,
867
867
  showPlaceType: 2,
@@ -889,20 +889,20 @@ function Un(n) {
889
889
  }
890
890
  class zn extends Se {
891
891
  constructor(e) {
892
- super(), xe(this, e, null, Un, Le, {});
892
+ super(), Le(this, e, null, Un, Ee, {});
893
893
  }
894
894
  }
895
- function Fn(n) {
895
+ function Gn(n) {
896
896
  let e, t, i;
897
897
  return {
898
898
  c() {
899
- e = ue("svg"), t = ue("path"), v(t, "stroke-width", "4"), v(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), v(t, "class", "svelte-gzo3ar"), v(e, "width", i = /*displayIn*/
900
- n[0] === "list" ? 20 : void 0), v(e, "viewBox", "0 0 70 85"), v(e, "fill", "none"), v(e, "class", "svelte-gzo3ar"), oe(
899
+ e = le("svg"), t = le("path"), v(t, "stroke-width", "4"), v(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), v(t, "class", "svelte-gzo3ar"), v(e, "width", i = /*displayIn*/
900
+ n[0] === "list" ? 20 : void 0), v(e, "viewBox", "0 0 70 85"), v(e, "fill", "none"), v(e, "class", "svelte-gzo3ar"), re(
901
901
  e,
902
902
  "in-map",
903
903
  /*displayIn*/
904
904
  n[0] !== "list"
905
- ), oe(
905
+ ), re(
906
906
  e,
907
907
  "list-icon",
908
908
  /*displayIn*/
@@ -916,13 +916,13 @@ function Fn(n) {
916
916
  o & /*displayIn*/
917
917
  1 && i !== (i = /*displayIn*/
918
918
  r[0] === "list" ? 20 : void 0) && v(e, "width", i), o & /*displayIn*/
919
- 1 && oe(
919
+ 1 && re(
920
920
  e,
921
921
  "in-map",
922
922
  /*displayIn*/
923
923
  r[0] !== "list"
924
924
  ), o & /*displayIn*/
925
- 1 && oe(
925
+ 1 && re(
926
926
  e,
927
927
  "list-icon",
928
928
  /*displayIn*/
@@ -936,22 +936,22 @@ function Fn(n) {
936
936
  }
937
937
  };
938
938
  }
939
- function jn(n, e, t) {
939
+ function Fn(n, e, t) {
940
940
  let { displayIn: i } = e;
941
941
  return n.$$set = (r) => {
942
942
  "displayIn" in r && t(0, i = r.displayIn);
943
943
  }, [i];
944
944
  }
945
- class Zn extends Se {
945
+ class jn extends Se {
946
946
  constructor(e) {
947
- super(), xe(this, e, jn, Fn, Le, { displayIn: 0 });
947
+ super(), Le(this, e, Fn, Gn, Ee, { displayIn: 0 });
948
948
  }
949
949
  }
950
- function qn(n) {
950
+ function Zn(n) {
951
951
  let e, t;
952
952
  return {
953
953
  c() {
954
- e = ue("svg"), t = ue("path"), v(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), v(e, "viewBox", "0 0 60.006 21.412"), v(e, "width", "14"), v(e, "height", "20"), v(e, "class", "svelte-en2qvf");
954
+ e = le("svg"), t = le("path"), v(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), v(e, "viewBox", "0 0 60.006 21.412"), v(e, "width", "14"), v(e, "height", "20"), v(e, "class", "svelte-en2qvf");
955
955
  },
956
956
  m(i, r) {
957
957
  z(i, e, r), P(e, t);
@@ -964,16 +964,16 @@ function qn(n) {
964
964
  }
965
965
  };
966
966
  }
967
- class Gn extends Se {
967
+ class qn extends Se {
968
968
  constructor(e) {
969
- super(), xe(this, e, null, qn, Le, {});
969
+ super(), Le(this, e, null, Zn, Ee, {});
970
970
  }
971
971
  }
972
972
  function Qn(n) {
973
973
  let e, t, i;
974
974
  return {
975
975
  c() {
976
- e = ue("svg"), t = ue("circle"), i = ue("path"), v(t, "cx", "4.789"), v(t, "cy", "4.787"), v(t, "r", "3.85"), v(t, "class", "svelte-1aq105l"), v(i, "d", "M12.063 12.063 7.635 7.635"), v(i, "class", "svelte-1aq105l"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "width", "13"), v(e, "height", "13"), v(e, "viewBox", "0 0 13 13"), v(e, "class", "svelte-1aq105l");
976
+ e = le("svg"), t = le("circle"), i = le("path"), v(t, "cx", "4.789"), v(t, "cy", "4.787"), v(t, "r", "3.85"), v(t, "class", "svelte-1aq105l"), v(i, "d", "M12.063 12.063 7.635 7.635"), v(i, "class", "svelte-1aq105l"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "width", "13"), v(e, "height", "13"), v(e, "viewBox", "0 0 13 13"), v(e, "class", "svelte-1aq105l");
977
977
  },
978
978
  m(r, o) {
979
979
  z(r, e, o), P(e, t), P(e, i);
@@ -988,18 +988,18 @@ function Qn(n) {
988
988
  }
989
989
  class Hn extends Se {
990
990
  constructor(e) {
991
- super(), xe(this, e, null, Qn, Le, {});
991
+ super(), Le(this, e, null, Qn, Ee, {});
992
992
  }
993
993
  }
994
994
  function Vn(n, e, t) {
995
995
  const i = e[1], r = e[0], o = i - r;
996
996
  return n === i && t ? n : ((n - r) % o + o) % o + r;
997
997
  }
998
- function st(n) {
998
+ function rt(n) {
999
999
  const e = [...n];
1000
1000
  return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
1001
1001
  }
1002
- let Be;
1002
+ let Ae;
1003
1003
  async function Yn(n, e, t) {
1004
1004
  const i = n == null ? void 0 : n.getCenterAndZoom();
1005
1005
  for (const r of e ?? [])
@@ -1007,31 +1007,31 @@ async function Yn(n, e, t) {
1007
1007
  if (r.type === "fixed")
1008
1008
  return r.coordinates.join(",");
1009
1009
  e: if (r.type === "client-geolocation") {
1010
- if (Be && r.cachedLocationExpiry && Be.time + r.cachedLocationExpiry > Date.now()) {
1011
- if (!Be.coords)
1010
+ if (Ae && r.cachedLocationExpiry && Ae.time + r.cachedLocationExpiry > Date.now()) {
1011
+ if (!Ae.coords)
1012
1012
  break e;
1013
- return Be.coords;
1013
+ return Ae.coords;
1014
1014
  }
1015
1015
  let o;
1016
1016
  try {
1017
- return o = await new Promise((l, s) => {
1017
+ return o = await new Promise((a, s) => {
1018
1018
  t.signal.addEventListener("abort", () => {
1019
1019
  s(Error("aborted"));
1020
1020
  }), navigator.geolocation.getCurrentPosition(
1021
- (c) => {
1022
- l(
1023
- [c.coords.longitude, c.coords.latitude].map((u) => u.toFixed(6)).join(",")
1021
+ (u) => {
1022
+ a(
1023
+ [u.coords.longitude, u.coords.latitude].map((l) => l.toFixed(6)).join(",")
1024
1024
  );
1025
1025
  },
1026
- (c) => {
1027
- s(c);
1026
+ (u) => {
1027
+ s(u);
1028
1028
  },
1029
1029
  r
1030
1030
  );
1031
1031
  }), o;
1032
1032
  } catch {
1033
1033
  } finally {
1034
- r.cachedLocationExpiry && (Be = {
1034
+ r.cachedLocationExpiry && (Ae = {
1035
1035
  time: Date.now(),
1036
1036
  coords: o
1037
1037
  });
@@ -1050,21 +1050,21 @@ function Xn(n) {
1050
1050
  if (!["DMS", "DM", "DD"].includes(n))
1051
1051
  throw new Error("invalid format specified");
1052
1052
  if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
1053
- const e = this.decimalCoordinates.split(",").map((h) => Number(h.trim())), t = Number(e[0]), i = Number(e[1]), r = Math.abs(t), o = Math.abs(i), l = t > 0 ? "N" : "S", s = i > 0 ? "E" : "W";
1054
- let c;
1055
- n == "DD" && (c = `${r}° ${l}, ${o}° ${s}`);
1056
- const u = Math.floor(r), d = Math.floor(o), a = (r - u) * 60, f = (o - d) * 60;
1053
+ const e = this.decimalCoordinates.split(",").map((h) => Number(h.trim())), t = Number(e[0]), i = Number(e[1]), r = Math.abs(t), o = Math.abs(i), a = t > 0 ? "N" : "S", s = i > 0 ? "E" : "W";
1054
+ let u;
1055
+ n == "DD" && (u = `${r}° ${a}, ${o}° ${s}`);
1056
+ const l = Math.floor(r), d = Math.floor(o), c = (r - l) * 60, f = (o - d) * 60;
1057
1057
  if (n == "DM") {
1058
- let h = ti(a, 3).toFixed(3).padStart(6, "0"), y = ti(f, 3).toFixed(3).padStart(6, "0");
1059
- h.endsWith(".000") && y.endsWith(".000") && (h = h.replace(/\.000$/, ""), y = y.replace(/\.000$/, "")), c = `${u}° ${h}' ${l}, ${d}° ${y}' ${s}`;
1058
+ let h = ti(c, 3).toFixed(3).padStart(6, "0"), p = ti(f, 3).toFixed(3).padStart(6, "0");
1059
+ h.endsWith(".000") && p.endsWith(".000") && (h = h.replace(/\.000$/, ""), p = p.replace(/\.000$/, "")), u = `${l}° ${h}' ${a}, ${d}° ${p}' ${s}`;
1060
1060
  }
1061
1061
  if (n == "DMS") {
1062
- const h = Math.floor(a), y = Math.floor(f);
1063
- let b = ((a - h) * 60).toFixed(1).padStart(4, "0"), p = ((f - y) * 60).toFixed(1).padStart(4, "0");
1064
- const m = h.toString().padStart(2, "0"), E = y.toString().padStart(2, "0");
1065
- b.endsWith(".0") && p.endsWith(".0") && (b = b.replace(/\.0$/, ""), p = p.replace(/\.0$/, "")), c = `${u}° ${m}' ${b}" ${l}, ${d}° ${E}' ${p}" ${s}`;
1062
+ const h = Math.floor(c), p = Math.floor(f);
1063
+ let b = ((c - h) * 60).toFixed(1).padStart(4, "0"), m = ((f - p) * 60).toFixed(1).padStart(4, "0");
1064
+ const y = h.toString().padStart(2, "0"), _ = p.toString().padStart(2, "0");
1065
+ b.endsWith(".0") && m.endsWith(".0") && (b = b.replace(/\.0$/, ""), m = m.replace(/\.0$/, "")), u = `${l}° ${y}' ${b}" ${a}, ${d}° ${_}' ${m}" ${s}`;
1066
1066
  }
1067
- return c;
1067
+ return u;
1068
1068
  } else
1069
1069
  throw new Error("no decimal coordinates to convert");
1070
1070
  }
@@ -1072,19 +1072,19 @@ function ti(n, e) {
1072
1072
  const t = Math.pow(10, e);
1073
1073
  return Math.round((n + Number.EPSILON) * t) / t;
1074
1074
  }
1075
- function It(n, e) {
1075
+ function Rt(n, e) {
1076
1076
  e || (e = 5), n = n.replace(/\s+/g, " ").trim();
1077
- let t = null, i = null, r = "", o = "", l = null, s = [], c = !1;
1077
+ let t = null, i = null, r = "", o = "", a = null, s = [], u = !1;
1078
1078
  if (Kn.test(n))
1079
1079
  throw new Error("invalid coordinate value");
1080
1080
  if (Kt.test(n))
1081
- if (s = Kt.exec(n), c = De(s), c)
1082
- t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), i = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (i *= -1), l = "DM";
1081
+ if (s = Kt.exec(n), u = Be(s), u)
1082
+ t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), i = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (i *= -1), a = "DM";
1083
1083
  else
1084
1084
  throw new Error("invalid coordinate format");
1085
1085
  else if (Xt.test(n))
1086
- if (s = Xt.exec(n), c = De(s), c) {
1087
- if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")), l = "DD", Number(Math.round(t)) == Number(t))
1086
+ if (s = Xt.exec(n), u = Be(s), u) {
1087
+ if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")), a = "DD", Number(Math.round(t)) == Number(t))
1088
1088
  throw new Error("integer only coordinate provided");
1089
1089
  if (Number(Math.round(i)) == Number(i))
1090
1090
  throw new Error("integer only coordinate provided");
@@ -1092,24 +1092,24 @@ function It(n, e) {
1092
1092
  } else
1093
1093
  throw new Error("invalid decimal coordinate format");
1094
1094
  else if (Jt.test(n))
1095
- if (s = Jt.exec(n), c = De(s), c)
1096
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[9])), s[11] && (i += s[11] / 60), s[13] && (i += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
1095
+ if (s = Jt.exec(n), u = Be(s), u)
1096
+ t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, a = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, a = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[9])), s[11] && (i += s[11] / 60), s[13] && (i += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
1097
1097
  else
1098
1098
  throw new Error("invalid DMS coordinates format");
1099
1099
  else if ($t.test(n))
1100
- if (s = $t.exec(n), c = De(s), c)
1101
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6] / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12] / 60), s[14] && (i += s[14] / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1100
+ if (s = $t.exec(n), u = Be(s), u)
1101
+ t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, a = "DM"), s[6] && (t += s[6] / 3600, a = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12] / 60), s[14] && (i += s[14] / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1102
1102
  else
1103
1103
  throw new Error("invalid DMS coordinates format");
1104
1104
  else if (ei.test(n)) {
1105
- if (s = ei.exec(n), c = De(s), s.filter((u) => u).length <= 5)
1105
+ if (s = ei.exec(n), u = Be(s), s.filter((l) => l).length <= 5)
1106
1106
  throw new Error("invalid coordinates format");
1107
- if (c)
1108
- t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12].replace(",", ".") / 60), s[14] && (i += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1107
+ if (u)
1108
+ t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, a = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, a = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12].replace(",", ".") / 60), s[14] && (i += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
1109
1109
  else
1110
1110
  throw new Error("invalid coordinates format");
1111
1111
  }
1112
- if (c) {
1112
+ if (u) {
1113
1113
  if (Math.abs(i) >= 180)
1114
1114
  throw new Error("invalid longitude value");
1115
1115
  if (Math.abs(t) >= 90)
@@ -1119,50 +1119,50 @@ function It(n, e) {
1119
1119
  if (r && r == o)
1120
1120
  throw new Error("invalid coordinates format");
1121
1121
  t.toString().includes(",") && (t = t.replace(",", ".")), i.toString().includes(",") && (i = i.replace(",", "."));
1122
- let u = /S|SOUTH/i;
1123
- u.test(r) && t > 0 && (t = -1 * t), u = /W|WEST/i, u.test(o) && i > 0 && (i = -1 * i);
1122
+ let l = /S|SOUTH/i;
1123
+ l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(o) && i > 0 && (i = -1 * i);
1124
1124
  const d = s[0].trim();
1125
- let a, f;
1126
- const h = /[,/;\u0020]/g, y = d.match(h);
1127
- if (y == null) {
1128
- const m = Math.floor(n.length / 2);
1129
- a = d.substring(0, m).trim(), f = d.substring(m).trim();
1125
+ let c, f;
1126
+ const h = /[,/;\u0020]/g, p = d.match(h);
1127
+ if (p == null) {
1128
+ const y = Math.floor(n.length / 2);
1129
+ c = d.substring(0, y).trim(), f = d.substring(y).trim();
1130
1130
  } else {
1131
- let m;
1132
- y.length % 2 == 1 ? m = Math.floor(y.length / 2) : m = y.length / 2 - 1;
1133
- let E = 0;
1134
- if (m == 0)
1135
- E = d.indexOf(y[0]), a = d.substring(0, E).trim(), f = d.substring(E + 1).trim();
1131
+ let y;
1132
+ p.length % 2 == 1 ? y = Math.floor(p.length / 2) : y = p.length / 2 - 1;
1133
+ let _ = 0;
1134
+ if (y == 0)
1135
+ _ = d.indexOf(p[0]), c = d.substring(0, _).trim(), f = d.substring(_ + 1).trim();
1136
1136
  else {
1137
- let S = 0, _ = 0;
1138
- for (; S <= m; )
1139
- E = d.indexOf(y[S], _), _ = E + 1, S++;
1140
- a = d.substring(0, E).trim(), f = d.substring(E + 1).trim();
1137
+ let L = 0, E = 0;
1138
+ for (; L <= y; )
1139
+ _ = d.indexOf(p[L], E), E = _ + 1, L++;
1140
+ c = d.substring(0, _).trim(), f = d.substring(_ + 1).trim();
1141
1141
  }
1142
1142
  }
1143
- const b = a.split(".");
1143
+ const b = c.split(".");
1144
1144
  if (b.length == 2 && b[1] == 0 && b[1].length != 2)
1145
1145
  throw new Error("invalid coordinates format");
1146
- const p = f.split(".");
1147
- if (p.length == 2 && p[1] == 0 && p[1].length != 2)
1146
+ const m = f.split(".");
1147
+ if (m.length == 2 && m[1] == 0 && m[1].length != 2)
1148
1148
  throw new Error("invalid coordinates format");
1149
- if (/^\d+$/.test(a) || /^\d+$/.test(f))
1149
+ if (/^\d+$/.test(c) || /^\d+$/.test(f))
1150
1150
  throw new Error("degree only coordinate/s provided");
1151
1151
  return t = Number(Number(t).toFixed(e)), i = Number(Number(i).toFixed(e)), Object.freeze({
1152
1152
  verbatimCoordinates: d,
1153
- verbatimLatitude: a,
1153
+ verbatimLatitude: c,
1154
1154
  verbatimLongitude: f,
1155
1155
  decimalLatitude: t,
1156
1156
  decimalLongitude: i,
1157
1157
  decimalCoordinates: `${t},${i}`,
1158
- originalFormat: l,
1158
+ originalFormat: a,
1159
1159
  closeEnough: Jn,
1160
1160
  toCoordinateFormat: Xn
1161
1161
  });
1162
1162
  } else
1163
1163
  throw new Error("coordinates pattern match failed");
1164
1164
  }
1165
- function De(n) {
1165
+ function Be(n) {
1166
1166
  if (!isNaN(n[0]))
1167
1167
  return !1;
1168
1168
  const e = [...n];
@@ -1170,11 +1170,11 @@ function De(n) {
1170
1170
  return !1;
1171
1171
  const t = /^[-+]?\d+([\.,]\d+)?$/, i = /[eastsouthnorthwest]+/i, r = e.length / 2;
1172
1172
  for (let o = 0; o < r; o++) {
1173
- const l = e[o], s = e[o + r], c = t.test(l) && t.test(s), u = i.test(l) && i.test(s), d = l == s;
1174
- if (!(l == null && s == null)) {
1175
- if (l == null || s == null)
1173
+ const a = e[o], s = e[o + r], u = t.test(a) && t.test(s), l = i.test(a) && i.test(s), d = a == s;
1174
+ if (!(a == null && s == null)) {
1175
+ if (a == null || s == null)
1176
1176
  return !1;
1177
- if (c || u || d)
1177
+ if (u || l || d)
1178
1178
  continue;
1179
1179
  return !1;
1180
1180
  }
@@ -1201,7 +1201,7 @@ const $n = Object.freeze({
1201
1201
  DM: "DM",
1202
1202
  DD: "DD"
1203
1203
  });
1204
- It.to = $n;
1204
+ Rt.to = $n;
1205
1205
  const er = [
1206
1206
  {
1207
1207
  verbatimCoordinates: "40.123, -74.123",
@@ -1573,178 +1573,178 @@ function rr() {
1573
1573
  }), [...n, ...ir, ...nr];
1574
1574
  }
1575
1575
  const or = rr();
1576
- It.formats = or.map((n) => n.verbatimCoordinates);
1577
- const sr = It;
1576
+ Rt.formats = or.map((n) => n.verbatimCoordinates);
1577
+ const sr = Rt;
1578
1578
  function ni(n, e, t) {
1579
1579
  const i = n.slice();
1580
- return i[83] = e[t], i[85] = t, i;
1580
+ return i[84] = e[t], i[86] = t, i;
1581
1581
  }
1582
1582
  function ri(n) {
1583
1583
  let e, t;
1584
1584
  return e = new zn({}), {
1585
1585
  c() {
1586
- _e(e.$$.fragment);
1586
+ we(e.$$.fragment);
1587
1587
  },
1588
1588
  m(i, r) {
1589
- he(e, i, r), t = !0;
1589
+ de(e, i, r), t = !0;
1590
1590
  },
1591
1591
  i(i) {
1592
- t || (q(e.$$.fragment, i), t = !0);
1592
+ t || (Z(e.$$.fragment, i), t = !0);
1593
1593
  },
1594
1594
  o(i) {
1595
1595
  V(e.$$.fragment, i), t = !1;
1596
1596
  },
1597
1597
  d(i) {
1598
- ge(e, i);
1598
+ he(e, i);
1599
1599
  }
1600
1600
  };
1601
1601
  }
1602
1602
  function oi(n) {
1603
1603
  let e, t, i, r, o;
1604
- return t = new Gn({}), {
1604
+ return t = new qn({}), {
1605
1605
  c() {
1606
- e = W("button"), _e(t.$$.fragment), v(e, "type", "button"), v(
1606
+ e = W("button"), we(t.$$.fragment), v(e, "type", "button"), v(
1607
1607
  e,
1608
1608
  "title",
1609
1609
  /*reverseButtonTitle*/
1610
1610
  n[9]
1611
- ), v(e, "class", "svelte-1uvos7g"), oe(
1611
+ ), v(e, "class", "svelte-1uvos7g"), re(
1612
1612
  e,
1613
1613
  "active",
1614
1614
  /*reverseActive*/
1615
1615
  n[0]
1616
1616
  );
1617
1617
  },
1618
- m(l, s) {
1619
- z(l, e, s), he(t, e, null), i = !0, r || (o = J(
1618
+ m(a, s) {
1619
+ z(a, e, s), de(t, e, null), i = !0, r || (o = J(
1620
1620
  e,
1621
1621
  "click",
1622
1622
  /*click_handler_2*/
1623
- n[68]
1623
+ n[69]
1624
1624
  ), r = !0);
1625
1625
  },
1626
- p(l, s) {
1626
+ p(a, s) {
1627
1627
  (!i || s[0] & /*reverseButtonTitle*/
1628
1628
  512) && v(
1629
1629
  e,
1630
1630
  "title",
1631
1631
  /*reverseButtonTitle*/
1632
- l[9]
1632
+ a[9]
1633
1633
  ), (!i || s[0] & /*reverseActive*/
1634
- 1) && oe(
1634
+ 1) && re(
1635
1635
  e,
1636
1636
  "active",
1637
1637
  /*reverseActive*/
1638
- l[0]
1638
+ a[0]
1639
1639
  );
1640
1640
  },
1641
- i(l) {
1642
- i || (q(t.$$.fragment, l), i = !0);
1641
+ i(a) {
1642
+ i || (Z(t.$$.fragment, a), i = !0);
1643
1643
  },
1644
- o(l) {
1645
- V(t.$$.fragment, l), i = !1;
1644
+ o(a) {
1645
+ V(t.$$.fragment, a), i = !1;
1646
1646
  },
1647
- d(l) {
1648
- l && B(e), ge(t), r = !1, o();
1647
+ d(a) {
1648
+ a && B(e), he(t), r = !1, o();
1649
1649
  }
1650
1650
  };
1651
1651
  }
1652
1652
  function lr(n) {
1653
- let e, t = [], i = /* @__PURE__ */ new Map(), r, o, l, s = Vt(
1653
+ let e, t = [], i = /* @__PURE__ */ new Map(), r, o, a, s = Vt(
1654
1654
  /*listFeatures*/
1655
1655
  n[14]
1656
1656
  );
1657
- const c = (u) => (
1657
+ const u = (l) => (
1658
1658
  /*feature*/
1659
- u[83].id + /*feature*/
1660
- (u[83].address ? "," + /*feature*/
1661
- u[83].address : "")
1659
+ l[84].id + /*feature*/
1660
+ (l[84].address ? "," + /*feature*/
1661
+ l[84].address : "")
1662
1662
  );
1663
- for (let u = 0; u < s.length; u += 1) {
1664
- let d = ni(n, s, u), a = c(d);
1665
- i.set(a, t[u] = si(a, d));
1663
+ for (let l = 0; l < s.length; l += 1) {
1664
+ let d = ni(n, s, l), c = u(d);
1665
+ i.set(c, t[l] = si(c, d));
1666
1666
  }
1667
1667
  return {
1668
1668
  c() {
1669
1669
  e = W("ul");
1670
- for (let u = 0; u < t.length; u += 1)
1671
- t[u].c();
1670
+ for (let l = 0; l < t.length; l += 1)
1671
+ t[l].c();
1672
1672
  v(e, "class", "svelte-1uvos7g");
1673
1673
  },
1674
- m(u, d) {
1675
- z(u, e, d);
1676
- for (let a = 0; a < t.length; a += 1)
1677
- t[a] && t[a].m(e, null);
1678
- r = !0, o || (l = [
1674
+ m(l, d) {
1675
+ z(l, e, d);
1676
+ for (let c = 0; c < t.length; c += 1)
1677
+ t[c] && t[c].m(e, null);
1678
+ r = !0, o || (a = [
1679
1679
  J(
1680
1680
  e,
1681
1681
  "mouseleave",
1682
1682
  /*mouseleave_handler*/
1683
- n[72]
1683
+ n[73]
1684
1684
  ),
1685
1685
  J(
1686
1686
  e,
1687
1687
  "blur",
1688
1688
  /*blur_handler_1*/
1689
- n[73]
1689
+ n[74]
1690
1690
  )
1691
1691
  ], o = !0);
1692
1692
  },
1693
- p(u, d) {
1693
+ p(l, d) {
1694
1694
  d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
1695
1695
  17880064 && (s = Vt(
1696
1696
  /*listFeatures*/
1697
- u[14]
1698
- ), nt(), t = Ln(t, d, c, 1, u, s, i, e, En, si, null, ni), rt());
1697
+ l[14]
1698
+ ), tt(), t = Ln(t, d, u, 1, l, s, i, e, En, si, null, ni), it());
1699
1699
  },
1700
- i(u) {
1700
+ i(l) {
1701
1701
  if (!r) {
1702
1702
  for (let d = 0; d < s.length; d += 1)
1703
- q(t[d]);
1703
+ Z(t[d]);
1704
1704
  r = !0;
1705
1705
  }
1706
1706
  },
1707
- o(u) {
1707
+ o(l) {
1708
1708
  for (let d = 0; d < t.length; d += 1)
1709
1709
  V(t[d]);
1710
1710
  r = !1;
1711
1711
  },
1712
- d(u) {
1713
- u && B(e);
1712
+ d(l) {
1713
+ l && B(e);
1714
1714
  for (let d = 0; d < t.length; d += 1)
1715
1715
  t[d].d();
1716
- o = !1, me(l);
1716
+ o = !1, ge(a);
1717
1717
  }
1718
1718
  };
1719
1719
  }
1720
1720
  function ur(n) {
1721
- let e, t, i, r, o, l;
1722
- return t = new Ni({}), {
1721
+ let e, t, i, r, o, a;
1722
+ return t = new Ti({}), {
1723
1723
  c() {
1724
- e = W("div"), _e(t.$$.fragment), i = ie(), r = W("div"), o = we(
1724
+ e = W("div"), we(t.$$.fragment), i = te(), r = W("div"), o = be(
1725
1725
  /*noResultsMessage*/
1726
1726
  n[7]
1727
1727
  ), v(r, "class", "svelte-1uvos7g"), v(e, "class", "no-results svelte-1uvos7g");
1728
1728
  },
1729
- m(s, c) {
1730
- z(s, e, c), he(t, e, null), P(e, i), P(e, r), P(r, o), l = !0;
1729
+ m(s, u) {
1730
+ z(s, e, u), de(t, e, null), P(e, i), P(e, r), P(r, o), a = !0;
1731
1731
  },
1732
- p(s, c) {
1733
- (!l || c[0] & /*noResultsMessage*/
1734
- 128) && Fe(
1732
+ p(s, u) {
1733
+ (!a || u[0] & /*noResultsMessage*/
1734
+ 128) && ze(
1735
1735
  o,
1736
1736
  /*noResultsMessage*/
1737
1737
  s[7]
1738
1738
  );
1739
1739
  },
1740
1740
  i(s) {
1741
- l || (q(t.$$.fragment, s), l = !0);
1741
+ a || (Z(t.$$.fragment, s), a = !0);
1742
1742
  },
1743
1743
  o(s) {
1744
- V(t.$$.fragment, s), l = !1;
1744
+ V(t.$$.fragment, s), a = !1;
1745
1745
  },
1746
1746
  d(s) {
1747
- s && B(e), ge(t);
1747
+ s && B(e), he(t);
1748
1748
  }
1749
1749
  };
1750
1750
  }
@@ -1752,7 +1752,7 @@ function ar(n) {
1752
1752
  let e = "", t;
1753
1753
  return {
1754
1754
  c() {
1755
- t = we(e);
1755
+ t = be(e);
1756
1756
  },
1757
1757
  m(i, r) {
1758
1758
  z(i, t, r);
@@ -1766,38 +1766,38 @@ function ar(n) {
1766
1766
  };
1767
1767
  }
1768
1768
  function cr(n) {
1769
- let e, t, i, r, o, l, s, c, u, d, a;
1770
- return t = new Ni({}), c = new Ci({}), {
1769
+ let e, t, i, r, o, a, s, u, l, d, c;
1770
+ return t = new Ti({}), u = new Ni({}), {
1771
1771
  c() {
1772
- e = W("div"), _e(t.$$.fragment), i = ie(), r = W("div"), o = we(
1772
+ e = W("div"), we(t.$$.fragment), i = te(), r = W("div"), o = be(
1773
1773
  /*errorMessage*/
1774
1774
  n[6]
1775
- ), l = ie(), s = W("button"), _e(c.$$.fragment), v(r, "class", "svelte-1uvos7g"), v(s, "class", "svelte-1uvos7g"), v(e, "class", "error svelte-1uvos7g");
1775
+ ), a = te(), s = W("button"), we(u.$$.fragment), v(r, "class", "svelte-1uvos7g"), v(s, "class", "svelte-1uvos7g"), v(e, "class", "error svelte-1uvos7g");
1776
1776
  },
1777
1777
  m(f, h) {
1778
- z(f, e, h), he(t, e, null), P(e, i), P(e, r), P(r, o), P(e, l), P(e, s), he(c, s, null), u = !0, d || (a = J(
1778
+ z(f, e, h), de(t, e, null), P(e, i), P(e, r), P(r, o), P(e, a), P(e, s), de(u, s, null), l = !0, d || (c = J(
1779
1779
  s,
1780
1780
  "click",
1781
1781
  /*click_handler_3*/
1782
- n[69]
1782
+ n[70]
1783
1783
  ), d = !0);
1784
1784
  },
1785
1785
  p(f, h) {
1786
- (!u || h[0] & /*errorMessage*/
1787
- 64) && Fe(
1786
+ (!l || h[0] & /*errorMessage*/
1787
+ 64) && ze(
1788
1788
  o,
1789
1789
  /*errorMessage*/
1790
1790
  f[6]
1791
1791
  );
1792
1792
  },
1793
1793
  i(f) {
1794
- u || (q(t.$$.fragment, f), q(c.$$.fragment, f), u = !0);
1794
+ l || (Z(t.$$.fragment, f), Z(u.$$.fragment, f), l = !0);
1795
1795
  },
1796
1796
  o(f) {
1797
- V(t.$$.fragment, f), V(c.$$.fragment, f), u = !1;
1797
+ V(t.$$.fragment, f), V(u.$$.fragment, f), l = !1;
1798
1798
  },
1799
1799
  d(f) {
1800
- f && B(e), ge(t), ge(c), d = !1, a();
1800
+ f && B(e), he(t), he(u), d = !1, c();
1801
1801
  }
1802
1802
  };
1803
1803
  }
@@ -1806,18 +1806,18 @@ function si(n, e) {
1806
1806
  function o() {
1807
1807
  return (
1808
1808
  /*mouseenter_handler*/
1809
- e[70](
1809
+ e[71](
1810
1810
  /*i*/
1811
- e[85]
1811
+ e[86]
1812
1812
  )
1813
1813
  );
1814
1814
  }
1815
- function l() {
1815
+ function a() {
1816
1816
  return (
1817
1817
  /*focus_handler_1*/
1818
- e[71](
1818
+ e[72](
1819
1819
  /*feature*/
1820
- e[83]
1820
+ e[84]
1821
1821
  )
1822
1822
  );
1823
1823
  }
@@ -1825,7 +1825,7 @@ function si(n, e) {
1825
1825
  props: {
1826
1826
  feature: (
1827
1827
  /*feature*/
1828
- e[83]
1828
+ e[84]
1829
1829
  ),
1830
1830
  showPlaceType: (
1831
1831
  /*showPlaceType*/
@@ -1834,7 +1834,7 @@ function si(n, e) {
1834
1834
  selected: (
1835
1835
  /*selectedItemIndex*/
1836
1836
  e[15] === /*i*/
1837
- e[85]
1837
+ e[86]
1838
1838
  ),
1839
1839
  missingIconsCache: (
1840
1840
  /*missingIconsCache*/
@@ -1845,62 +1845,62 @@ function si(n, e) {
1845
1845
  e[12]
1846
1846
  )
1847
1847
  }
1848
- }), i.$on("mouseenter", o), i.$on("focus", l), {
1848
+ }), i.$on("mouseenter", o), i.$on("focus", a), {
1849
1849
  key: n,
1850
1850
  first: null,
1851
1851
  c() {
1852
- t = dn(), _e(i.$$.fragment), this.first = t;
1852
+ t = dn(), we(i.$$.fragment), this.first = t;
1853
1853
  },
1854
- m(s, c) {
1855
- z(s, t, c), he(i, s, c), r = !0;
1854
+ m(s, u) {
1855
+ z(s, t, u), de(i, s, u), r = !0;
1856
1856
  },
1857
- p(s, c) {
1857
+ p(s, u) {
1858
1858
  e = s;
1859
- const u = {};
1860
- c[0] & /*listFeatures*/
1861
- 16384 && (u.feature = /*feature*/
1862
- e[83]), c[0] & /*showPlaceType*/
1863
- 1024 && (u.showPlaceType = /*showPlaceType*/
1864
- e[10]), c[0] & /*selectedItemIndex, listFeatures*/
1865
- 49152 && (u.selected = /*selectedItemIndex*/
1859
+ const l = {};
1860
+ u[0] & /*listFeatures*/
1861
+ 16384 && (l.feature = /*feature*/
1862
+ e[84]), u[0] & /*showPlaceType*/
1863
+ 1024 && (l.showPlaceType = /*showPlaceType*/
1864
+ e[10]), u[0] & /*selectedItemIndex, listFeatures*/
1865
+ 49152 && (l.selected = /*selectedItemIndex*/
1866
1866
  e[15] === /*i*/
1867
- e[85]), c[0] & /*iconsBaseUrl*/
1868
- 4096 && (u.iconsBaseUrl = /*iconsBaseUrl*/
1869
- e[12]), i.$set(u);
1867
+ e[86]), u[0] & /*iconsBaseUrl*/
1868
+ 4096 && (l.iconsBaseUrl = /*iconsBaseUrl*/
1869
+ e[12]), i.$set(l);
1870
1870
  },
1871
1871
  i(s) {
1872
- r || (q(i.$$.fragment, s), r = !0);
1872
+ r || (Z(i.$$.fragment, s), r = !0);
1873
1873
  },
1874
1874
  o(s) {
1875
1875
  V(i.$$.fragment, s), r = !1;
1876
1876
  },
1877
1877
  d(s) {
1878
- s && B(t), ge(i, s);
1878
+ s && B(t), he(i, s);
1879
1879
  }
1880
1880
  };
1881
1881
  }
1882
1882
  function fr(n) {
1883
- let e, t, i, r, o, l, s, c, u, d, a, f, h, y, b, p, m, E, S, _, k, x = !1;
1884
- o = new Hn({}), a = new Ci({});
1885
- let L = (
1883
+ let e, t, i, r, o, a, s, u, l, d, c, f, h, p, b, m, y, _, L, E, C, x = !1;
1884
+ o = new Hn({}), c = new Ni({});
1885
+ let S = (
1886
1886
  /*abortController*/
1887
1887
  n[19] && ri()
1888
1888
  ), w = (
1889
1889
  /*enableReverse*/
1890
1890
  n[5] === !0 && oi(n)
1891
1891
  );
1892
- const C = (
1892
+ const k = (
1893
1893
  /*#slots*/
1894
- n[60].default
1894
+ n[61].default
1895
1895
  ), I = un(
1896
- C,
1896
+ k,
1897
1897
  n,
1898
1898
  /*$$scope*/
1899
- n[59],
1899
+ n[60],
1900
1900
  null
1901
- ), D = [cr, ar, ur, lr], F = [];
1902
- function O(M, j) {
1903
- var $, se;
1901
+ ), D = [cr, ar, ur, lr], G = [];
1902
+ function O(M, F) {
1903
+ var $, oe;
1904
1904
  return (
1905
1905
  /*error*/
1906
1906
  M[18] ? 0 : (
@@ -1910,15 +1910,15 @@ function fr(n) {
1910
1910
  (($ = M[14]) == null ? void 0 : $.length) === 0 ? 2 : (
1911
1911
  /*focusedDelayed*/
1912
1912
  M[16] && /*listFeatures*/
1913
- ((se = M[14]) != null && se.length) ? 3 : -1
1913
+ ((oe = M[14]) != null && oe.length) ? 3 : -1
1914
1914
  )
1915
1915
  ) : 1
1916
1916
  )
1917
1917
  );
1918
1918
  }
1919
- return ~(p = O(n)) && (m = F[p] = D[p](n)), {
1919
+ return ~(m = O(n)) && (y = G[m] = D[m](n)), {
1920
1920
  c() {
1921
- e = ie(), t = W("form"), i = W("div"), r = W("button"), _e(o.$$.fragment), l = ie(), s = W("input"), c = ie(), u = W("div"), d = W("button"), _e(a.$$.fragment), f = ie(), L && L.c(), h = ie(), w && w.c(), y = ie(), I && I.c(), b = ie(), m && m.c(), v(r, "class", "search-button svelte-1uvos7g"), v(r, "type", "button"), v(
1921
+ e = te(), t = W("form"), i = W("div"), r = W("button"), we(o.$$.fragment), a = te(), s = W("input"), u = te(), l = W("div"), d = W("button"), we(c.$$.fragment), f = te(), S && S.c(), h = te(), w && w.c(), p = te(), I && I.c(), b = te(), y && y.c(), v(r, "class", "search-button svelte-1uvos7g"), v(r, "type", "button"), v(
1922
1922
  s,
1923
1923
  "placeholder",
1924
1924
  /*placeholder*/
@@ -1933,15 +1933,15 @@ function fr(n) {
1933
1933
  "title",
1934
1934
  /*clearButtonTitle*/
1935
1935
  n[3]
1936
- ), v(d, "class", "svelte-1uvos7g"), v(u, "class", "clear-button-container svelte-1uvos7g"), oe(
1937
- u,
1936
+ ), v(d, "class", "svelte-1uvos7g"), v(l, "class", "clear-button-container svelte-1uvos7g"), re(
1937
+ l,
1938
1938
  "displayable",
1939
1939
  /*searchValue*/
1940
1940
  n[1] !== ""
1941
- ), v(i, "class", "input-group svelte-1uvos7g"), v(t, "tabindex", "0"), v(t, "class", E = qt(
1941
+ ), v(i, "class", "input-group svelte-1uvos7g"), v(t, "tabindex", "0"), v(t, "class", _ = Zt(
1942
1942
  /*className*/
1943
1943
  n[2]
1944
- ) + " svelte-1uvos7g"), oe(
1944
+ ) + " svelte-1uvos7g"), re(
1945
1945
  t,
1946
1946
  "can-collapse",
1947
1947
  /*collapsed*/
@@ -1949,35 +1949,35 @@ function fr(n) {
1949
1949
  n[1] === ""
1950
1950
  );
1951
1951
  },
1952
- m(M, j) {
1953
- z(M, e, j), z(M, t, j), P(t, i), P(i, r), he(o, r, null), P(i, l), P(i, s), n[62](s), Gt(
1952
+ m(M, F) {
1953
+ z(M, e, F), z(M, t, F), P(t, i), P(i, r), de(o, r, null), P(i, a), P(i, s), n[63](s), qt(
1954
1954
  s,
1955
1955
  /*searchValue*/
1956
1956
  n[1]
1957
- ), P(i, c), P(i, u), P(u, d), he(a, d, null), P(u, f), L && L.m(u, null), P(i, h), w && w.m(i, null), P(i, y), I && I.m(i, null), P(t, b), ~p && F[p].m(t, null), S = !0, _ || (k = [
1957
+ ), P(i, u), P(i, l), P(l, d), de(c, d, null), P(l, f), S && S.m(l, null), P(i, h), w && w.m(i, null), P(i, p), I && I.m(i, null), P(t, b), ~m && G[m].m(t, null), L = !0, E || (C = [
1958
1958
  J(
1959
1959
  r,
1960
1960
  "click",
1961
1961
  /*click_handler*/
1962
- n[61]
1962
+ n[62]
1963
1963
  ),
1964
1964
  J(
1965
1965
  s,
1966
1966
  "input",
1967
1967
  /*input_1_input_handler*/
1968
- n[63]
1968
+ n[64]
1969
1969
  ),
1970
1970
  J(
1971
1971
  s,
1972
1972
  "focus",
1973
1973
  /*focus_handler*/
1974
- n[64]
1974
+ n[65]
1975
1975
  ),
1976
1976
  J(
1977
1977
  s,
1978
1978
  "blur",
1979
1979
  /*blur_handler*/
1980
- n[65]
1980
+ n[66]
1981
1981
  ),
1982
1982
  J(
1983
1983
  s,
@@ -1989,87 +1989,87 @@ function fr(n) {
1989
1989
  s,
1990
1990
  "input",
1991
1991
  /*input_handler*/
1992
- n[66]
1992
+ n[67]
1993
1993
  ),
1994
1994
  J(
1995
1995
  d,
1996
1996
  "click",
1997
1997
  /*click_handler_1*/
1998
- n[67]
1998
+ n[68]
1999
1999
  ),
2000
2000
  J(t, "submit", hn(
2001
2001
  /*handleOnSubmit*/
2002
2002
  n[21]
2003
2003
  ))
2004
- ], _ = !0);
2004
+ ], E = !0);
2005
2005
  },
2006
- p(M, j) {
2007
- (!S || j[0] & /*placeholder*/
2006
+ p(M, F) {
2007
+ (!L || F[0] & /*placeholder*/
2008
2008
  256) && v(
2009
2009
  s,
2010
2010
  "placeholder",
2011
2011
  /*placeholder*/
2012
2012
  M[8]
2013
- ), (!S || j[0] & /*placeholder*/
2013
+ ), (!L || F[0] & /*placeholder*/
2014
2014
  256) && v(
2015
2015
  s,
2016
2016
  "aria-label",
2017
2017
  /*placeholder*/
2018
2018
  M[8]
2019
- ), j[0] & /*searchValue*/
2019
+ ), F[0] & /*searchValue*/
2020
2020
  2 && s.value !== /*searchValue*/
2021
- M[1] && Gt(
2021
+ M[1] && qt(
2022
2022
  s,
2023
2023
  /*searchValue*/
2024
2024
  M[1]
2025
- ), (!S || j[0] & /*clearButtonTitle*/
2025
+ ), (!L || F[0] & /*clearButtonTitle*/
2026
2026
  8) && v(
2027
2027
  d,
2028
2028
  "title",
2029
2029
  /*clearButtonTitle*/
2030
2030
  M[3]
2031
2031
  ), /*abortController*/
2032
- M[19] ? L ? j[0] & /*abortController*/
2033
- 524288 && q(L, 1) : (L = ri(), L.c(), q(L, 1), L.m(u, null)) : L && (nt(), V(L, 1, 1, () => {
2034
- L = null;
2035
- }), rt()), (!S || j[0] & /*searchValue*/
2036
- 2) && oe(
2037
- u,
2032
+ M[19] ? S ? F[0] & /*abortController*/
2033
+ 524288 && Z(S, 1) : (S = ri(), S.c(), Z(S, 1), S.m(l, null)) : S && (tt(), V(S, 1, 1, () => {
2034
+ S = null;
2035
+ }), it()), (!L || F[0] & /*searchValue*/
2036
+ 2) && re(
2037
+ l,
2038
2038
  "displayable",
2039
2039
  /*searchValue*/
2040
2040
  M[1] !== ""
2041
2041
  ), /*enableReverse*/
2042
- M[5] === !0 ? w ? (w.p(M, j), j[0] & /*enableReverse*/
2043
- 32 && q(w, 1)) : (w = oi(M), w.c(), q(w, 1), w.m(i, y)) : w && (nt(), V(w, 1, 1, () => {
2042
+ M[5] === !0 ? w ? (w.p(M, F), F[0] & /*enableReverse*/
2043
+ 32 && Z(w, 1)) : (w = oi(M), w.c(), Z(w, 1), w.m(i, p)) : w && (tt(), V(w, 1, 1, () => {
2044
2044
  w = null;
2045
- }), rt()), I && I.p && (!S || j[1] & /*$$scope*/
2046
- 268435456) && cn(
2045
+ }), it()), I && I.p && (!L || F[1] & /*$$scope*/
2046
+ 536870912) && cn(
2047
2047
  I,
2048
- C,
2048
+ k,
2049
2049
  M,
2050
2050
  /*$$scope*/
2051
- M[59],
2052
- S ? an(
2053
- C,
2051
+ M[60],
2052
+ L ? an(
2053
+ k,
2054
2054
  /*$$scope*/
2055
- M[59],
2056
- j,
2055
+ M[60],
2056
+ F,
2057
2057
  null
2058
2058
  ) : fn(
2059
2059
  /*$$scope*/
2060
- M[59]
2060
+ M[60]
2061
2061
  ),
2062
2062
  null
2063
2063
  );
2064
- let $ = p;
2065
- p = O(M), p === $ ? ~p && F[p].p(M, j) : (m && (nt(), V(F[$], 1, 1, () => {
2066
- F[$] = null;
2067
- }), rt()), ~p ? (m = F[p], m ? m.p(M, j) : (m = F[p] = D[p](M), m.c()), q(m, 1), m.m(t, null)) : m = null), (!S || j[0] & /*className*/
2068
- 4 && E !== (E = qt(
2064
+ let $ = m;
2065
+ m = O(M), m === $ ? ~m && G[m].p(M, F) : (y && (tt(), V(G[$], 1, 1, () => {
2066
+ G[$] = null;
2067
+ }), it()), ~m ? (y = G[m], y ? y.p(M, F) : (y = G[m] = D[m](M), y.c()), Z(y, 1), y.m(t, null)) : y = null), (!L || F[0] & /*className*/
2068
+ 4 && _ !== (_ = Zt(
2069
2069
  /*className*/
2070
2070
  M[2]
2071
- ) + " svelte-1uvos7g")) && v(t, "class", E), (!S || j[0] & /*className, collapsed, searchValue*/
2072
- 22) && oe(
2071
+ ) + " svelte-1uvos7g")) && v(t, "class", _), (!L || F[0] & /*className, collapsed, searchValue*/
2072
+ 22) && re(
2073
2073
  t,
2074
2074
  "can-collapse",
2075
2075
  /*collapsed*/
@@ -2078,19 +2078,19 @@ function fr(n) {
2078
2078
  );
2079
2079
  },
2080
2080
  i(M) {
2081
- S || (q(x), q(o.$$.fragment, M), q(a.$$.fragment, M), q(L), q(w), q(I, M), q(m), S = !0);
2081
+ L || (Z(x), Z(o.$$.fragment, M), Z(c.$$.fragment, M), Z(S), Z(w), Z(I, M), Z(y), L = !0);
2082
2082
  },
2083
2083
  o(M) {
2084
- V(x), V(o.$$.fragment, M), V(a.$$.fragment, M), V(L), V(w), V(I, M), V(m), S = !1;
2084
+ V(x), V(o.$$.fragment, M), V(c.$$.fragment, M), V(S), V(w), V(I, M), V(y), L = !1;
2085
2085
  },
2086
2086
  d(M) {
2087
- M && (B(e), B(t)), ge(o), n[62](null), ge(a), L && L.d(), w && w.d(), I && I.d(M), ~p && F[p].d(), _ = !1, me(k);
2087
+ M && (B(e), B(t)), he(o), n[63](null), he(c), S && S.d(), w && w.d(), I && I.d(M), ~m && G[m].d(), E = !1, ge(C);
2088
2088
  }
2089
2089
  };
2090
2090
  }
2091
2091
  function dr(n, e, t) {
2092
2092
  let i, { $$slots: r = {}, $$scope: o } = e;
2093
- const l = {
2093
+ const a = {
2094
2094
  continental_marine: 4,
2095
2095
  country: 4,
2096
2096
  major_landform: 8,
@@ -2114,69 +2114,69 @@ function dr(n, e, t) {
2114
2114
  "poi.restaurant": 18,
2115
2115
  "poi.aerodrome": 13
2116
2116
  };
2117
- let { class: s = void 0 } = e, { apiKey: c } = e, { bbox: u = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: a = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: y = 200 } = e, { enableReverse: b = !1 } = e, { errorMessage: p = "Something went wrong…" } = e, { filter: m = () => !0 } = e, { flyTo: E = !0 } = e, { fuzzyMatch: S = !0 } = e, { language: _ = void 0 } = e, { limit: k = void 0 } = e, { mapController: x = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: w = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: C = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: D = b === "always" } = e, { reverseButtonTitle: F = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType: j = "ifNeeded" } = e, { showResultsWhileTyping: $ = !0 } = e, { selectFirst: se = !0 } = e, { flyToSelected: at = !1 } = e, { markerOnSelected: He = !0 } = e, { types: Ve = void 0 } = e, { excludeTypes: Ye = !1 } = e, { zoom: Ne = l } = e, { maxZoom: Ke = void 0 } = e, { apiUrl: ct = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ft = {} } = e, { iconsBaseUrl: Bt = "https://cdn.maptiler.com/maptiler-geocoding-control/v1.4.2-dev.2/icons/" } = e, { adjustUrlQuery: dt = () => {
2117
+ let { class: s = void 0 } = e, { apiKey: u } = e, { bbox: l = void 0 } = e, { clearButtonTitle: d = "clear" } = e, { clearOnBlur: c = !1 } = e, { collapsed: f = !1 } = e, { country: h = void 0 } = e, { debounceSearch: p = 200 } = e, { enableReverse: b = !1 } = e, { errorMessage: m = "Something went wrong…" } = e, { filter: y = () => !0 } = e, { flyTo: _ = !0 } = e, { fuzzyMatch: L = !0 } = e, { language: E = void 0 } = e, { limit: C = void 0 } = e, { mapController: x = void 0 } = e, { minLength: S = 2 } = e, { noResultsMessage: w = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: k = "Search" } = e, { proximity: I = [{ type: "server-geolocation" }] } = e, { reverseActive: D = b === "always" } = e, { reverseButtonTitle: G = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { showFullGeometry: M = !0 } = e, { showPlaceType: F = "ifNeeded" } = e, { showResultsWhileTyping: $ = !0 } = e, { selectFirst: oe = !0 } = e, { flyToSelected: lt = !1 } = e, { markerOnSelected: Qe = !0 } = e, { types: xe = void 0 } = e, { exhaustiveReverseGeocoding: ut = !1 } = e, { excludeTypes: He = !1 } = e, { zoom: ke = a } = e, { maxZoom: Ve = void 0 } = e, { apiUrl: at = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ct = {} } = e, { iconsBaseUrl: At = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0/icons/" } = e, { adjustUrlQuery: ft = () => {
2118
2118
  } } = e;
2119
- function Wi() {
2120
- ae.focus();
2121
- }
2122
2119
  function Ai() {
2123
- ae.blur();
2124
- }
2125
- function Dt(g, Z = !0, H = !1) {
2126
- t(1, O = g), Z ? (t(15, U = -1), zt()) : (pt(!H, H), setTimeout(() => {
2127
- ae.focus(), ae.select();
2128
- }));
2120
+ ue.focus();
2129
2121
  }
2130
2122
  function Bi() {
2131
- t(14, R = void 0), t(56, N = void 0), t(15, U = -1);
2123
+ ue.blur();
2124
+ }
2125
+ function Bt(g, j = !0, H = !1) {
2126
+ t(1, O = g), j ? (t(15, U = -1), Ut()) : (mt(!H, H), setTimeout(() => {
2127
+ ue.focus(), ue.select();
2128
+ }));
2132
2129
  }
2133
2130
  function Di() {
2134
- t(55, G = []), t(56, N = void 0);
2131
+ t(14, R = void 0), t(57, N = void 0), t(15, U = -1);
2135
2132
  }
2136
- let Te = !1, R, G, N, Ut = "", ae, U = -1, ce, Xe = [], Me, Pe, Je, ht;
2137
- const Ui = /* @__PURE__ */ new Set(), pe = vn();
2138
- pn(() => {
2133
+ function Ui() {
2134
+ t(56, q = []), t(57, N = void 0);
2135
+ }
2136
+ let Ne = !1, R, q, N, Dt = "", ue, U = -1, ae, Ye = [], Me, Te, Ke, dt;
2137
+ const zi = /* @__PURE__ */ new Set(), me = vn();
2138
+ yn(() => {
2139
2139
  x && (x.setEventHandler(void 0), x.indicateReverse(!1), x.setSelectedMarker(-1), x.setMarkers(void 0, void 0));
2140
2140
  });
2141
- function zt(g) {
2142
- if (Pe && (clearTimeout(Pe), Pe = void 0), U > -1 && R)
2143
- t(56, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(55, G = void 0), t(15, U = -1);
2141
+ function Ut(g) {
2142
+ if (Te && (clearTimeout(Te), Te = void 0), U > -1 && R)
2143
+ t(57, N = R[U]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ae = void 0), t(56, q = void 0), t(15, U = -1);
2144
2144
  else if (O) {
2145
- const Z = g || !gt(O);
2146
- mt(O, { exact: !0 }).then(() => {
2147
- t(55, G = R), t(56, N = void 0), Z && zi();
2148
- }).catch((H) => t(18, ce = H));
2145
+ const j = g || !ht(O);
2146
+ gt(O, { exact: !0 }).then(() => {
2147
+ t(56, q = R), t(57, N = void 0), j && Gi();
2148
+ }).catch((H) => t(18, ae = H));
2149
2149
  }
2150
2150
  }
2151
- function gt(g) {
2151
+ function ht(g) {
2152
2152
  try {
2153
2153
  return sr(g, 6);
2154
2154
  } catch {
2155
2155
  return !1;
2156
2156
  }
2157
2157
  }
2158
- async function mt(g, { byId: Z = !1, exact: H = !1 } = {}) {
2159
- t(18, ce = void 0), Me == null || Me.abort();
2158
+ async function gt(g, { byId: j = !1, exact: H = !1 } = {}) {
2159
+ t(18, ae = void 0), Me == null || Me.abort();
2160
2160
  const ee = new AbortController();
2161
2161
  t(19, Me = ee);
2162
2162
  try {
2163
- const T = gt(g), Q = new URLSearchParams();
2164
- if (_ !== void 0 && Q.set("language", Array.isArray(_) ? _.join(",") : _ ?? ""), Ve && Q.set("types", Ve.join(",")), Ye && Q.set("excludeTypes", String(Ye)), u && Q.set("bbox", u.map(($e) => $e.toFixed(6)).join(",")), h && Q.set("country", Array.isArray(h) ? h.join(",") : h), !Z && !T) {
2165
- const $e = await Yn(x, I, ee);
2166
- $e && Q.set("proximity", $e), (H || !$) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(S));
2163
+ const T = ht(g), Q = new URLSearchParams();
2164
+ if (E !== void 0 && Q.set("language", Array.isArray(E) ? E.join(",") : E ?? ""), xe && Q.set("types", xe.join(",")), He && Q.set("excludeTypes", String(He)), l && Q.set("bbox", l.map((Xe) => Xe.toFixed(6)).join(",")), h && Q.set("country", Array.isArray(h) ? h.join(",") : h), !j && !T) {
2165
+ const Xe = await Yn(x, I, ee);
2166
+ Xe && Q.set("proximity", Xe), (H || !$) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(L));
2167
2167
  }
2168
- k !== void 0 && Q.set("limit", String(k)), Q.set("key", c), dt(Q);
2169
- const fe = ct + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : g) + ".json?" + Q.toString();
2170
- if (fe === Ut) {
2171
- Z ? (t(14, R = void 0), t(56, N = Xe[0])) : t(14, R = Xe);
2168
+ C !== void 0 && (ut || !T || (xe == null ? void 0 : xe.length) === 1) && Q.set("limit", String(C)), Q.set("key", u), ft(Q);
2169
+ const ce = at + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : g) + ".json?" + Q.toString();
2170
+ if (ce === Dt) {
2171
+ j ? (t(14, R = void 0), t(57, N = Ye[0])) : t(14, R = Ye);
2172
2172
  return;
2173
2173
  }
2174
- Ut = fe;
2175
- const yt = await fetch(fe, { signal: ee.signal, ...ft });
2176
- if (!yt.ok)
2177
- throw new Error(await yt.text());
2178
- const bt = await yt.json();
2179
- pe("response", { url: fe, featureCollection: bt }), Z ? (t(14, R = void 0), t(56, N = bt.features[0]), Xe = [N]) : (t(14, R = bt.features.filter(m)), T && R.unshift({
2174
+ Dt = ce;
2175
+ const vt = await fetch(ce, { signal: ee.signal, ...ct });
2176
+ if (!vt.ok)
2177
+ throw new Error(await vt.text());
2178
+ const pt = await vt.json();
2179
+ me("response", { url: ce, featureCollection: pt }), j ? (t(14, R = void 0), t(57, N = pt.features[0]), Ye = [N]) : (t(14, R = pt.features.filter(y)), T && R.unshift({
2180
2180
  type: "Feature",
2181
2181
  properties: {},
2182
2182
  id: "reverse_" + T.decimalLongitude + "_" + T.decimalLatitude,
@@ -2194,7 +2194,7 @@ function dr(n, e, t) {
2194
2194
  type: "Point",
2195
2195
  coordinates: [T.decimalLongitude, T.decimalLatitude]
2196
2196
  }
2197
- }), Xe = R, T && ae.focus());
2197
+ }), Ye = R, T && ue.focus());
2198
2198
  } catch (T) {
2199
2199
  if (T && typeof T == "object" && "name" in T && T.name === "AbortError")
2200
2200
  return;
@@ -2203,132 +2203,132 @@ function dr(n, e, t) {
2203
2203
  ee === Me && t(19, Me = void 0);
2204
2204
  }
2205
2205
  }
2206
- function zi() {
2206
+ function Gi() {
2207
2207
  var ee;
2208
- if (!(G != null && G.length) || !E)
2208
+ if (!(q != null && q.length) || !_)
2209
2209
  return;
2210
- const g = [180, 90, -180, -90], Z = !G.some((T) => !T.matching_text);
2210
+ const g = [180, 90, -180, -90], j = !q.some((T) => !T.matching_text);
2211
2211
  let H;
2212
- for (const T of G) {
2213
- const Q = Ae(T);
2214
- if (H = Ke ?? (H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q)), Z || !T.matching_text)
2215
- for (const fe of [0, 1, 2, 3])
2216
- g[fe] = Math[fe < 2 ? "min" : "max"](g[fe], ((ee = T.bbox) == null ? void 0 : ee[fe]) ?? T.center[fe % 2]);
2212
+ for (const T of q) {
2213
+ const Q = We(T);
2214
+ if (H = Ve ?? (H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q)), j || !T.matching_text)
2215
+ for (const ce of [0, 1, 2, 3])
2216
+ g[ce] = Math[ce < 2 ? "min" : "max"](g[ce], ((ee = T.bbox) == null ? void 0 : ee[ce]) ?? T.center[ce % 2]);
2217
2217
  }
2218
- x && G.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center, Ae(N)) : x.fitBounds(st(g), 50, H));
2218
+ x && q.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center, We(N)) : x.fitBounds(rt(g), 50, H));
2219
2219
  }
2220
- function Ae(g) {
2220
+ function We(g) {
2221
2221
  var H;
2222
2222
  if (!g.bbox || g.bbox[0] !== g.bbox[2] && g.bbox[1] !== g.bbox[3])
2223
2223
  return;
2224
- if (typeof Ne == "number")
2225
- return g.id.startsWith("poi.") || g.id.startsWith("address.") ? Ke : Ne;
2226
- const Z = g.id.replace(/\..*/, "");
2224
+ if (typeof ke == "number")
2225
+ return g.id.startsWith("poi.") || g.id.startsWith("address.") ? Ve : ke;
2226
+ const j = g.id.replace(/\..*/, "");
2227
2227
  return (Array.isArray((H = g.properties) == null ? void 0 : H.categories) ? g.properties.categories.reduce(
2228
2228
  (ee, T) => {
2229
- const Q = Ne[Z + "." + T];
2229
+ const Q = ke[j + "." + T];
2230
2230
  return ee === void 0 ? Q : Q === void 0 ? ee : Math.max(ee, Q);
2231
2231
  },
2232
2232
  void 0
2233
- ) : void 0) ?? Ne[Z];
2233
+ ) : void 0) ?? ke[j];
2234
2234
  }
2235
2235
  function Fi(g) {
2236
- t(0, D = b === "always"), t(14, R = void 0), t(56, N = void 0), t(15, U = -1), Dt(g[1].toFixed(6) + ", " + Vn(g[0], [-180, 180], !0).toFixed(6), !1, !0);
2236
+ t(0, D = b === "always"), t(14, R = void 0), t(57, N = void 0), t(15, U = -1), Bt(g[1].toFixed(6) + ", " + Vn(g[0], [-180, 180], !0).toFixed(6), !1, !0);
2237
2237
  }
2238
2238
  function ji(g) {
2239
2239
  if (!R)
2240
2240
  return;
2241
- let Z = g.key === "ArrowDown" ? 1 : g.key === "ArrowUp" ? -1 : 0;
2242
- Z && (U === (se ? 0 : -1) && Z === -1 && t(15, U = R.length), t(15, U += Z), U >= R.length && t(15, U = -1), U < 0 && se && t(15, U = 0), g.preventDefault());
2241
+ let j = g.key === "ArrowDown" ? 1 : g.key === "ArrowUp" ? -1 : 0;
2242
+ j && (U === (oe ? 0 : -1) && j === -1 && t(15, U = R.length), t(15, U += j), U >= R.length && t(15, U = -1), U < 0 && oe && t(15, U = 0), g.preventDefault());
2243
2243
  }
2244
- function pt(g = !0, Z = !1) {
2245
- if (t(18, ce = void 0), $ || Z) {
2246
- if (Pe && clearTimeout(Pe), O.length < L)
2244
+ function mt(g = !0, j = !1) {
2245
+ if (t(18, ae = void 0), $ || j) {
2246
+ if (Te && clearTimeout(Te), O.length < S)
2247
2247
  return;
2248
2248
  const H = O;
2249
- Pe = window.setTimeout(
2249
+ Te = window.setTimeout(
2250
2250
  () => {
2251
- mt(H).catch((ee) => t(18, ce = ee));
2251
+ gt(H).catch((ee) => t(18, ae = ee));
2252
2252
  },
2253
- g ? y : 0
2253
+ g ? p : 0
2254
2254
  );
2255
2255
  } else
2256
- t(14, R = void 0), t(18, ce = void 0);
2256
+ t(14, R = void 0), t(18, ae = void 0);
2257
2257
  }
2258
- function vt(g) {
2259
- t(56, N = g), t(1, O = g.place_name), t(15, U = -1);
2258
+ function yt(g) {
2259
+ t(57, N = g), t(1, O = g.place_name), t(15, U = -1);
2260
2260
  }
2261
- const Zi = () => ae.focus();
2261
+ const Zi = () => ue.focus();
2262
2262
  function qi(g) {
2263
2263
  St[g ? "unshift" : "push"](() => {
2264
- ae = g, t(17, ae);
2264
+ ue = g, t(17, ue);
2265
2265
  });
2266
2266
  }
2267
- function Gi() {
2268
- O = this.value, t(1, O), t(13, Te), t(28, a);
2267
+ function Qi() {
2268
+ O = this.value, t(1, O), t(13, Ne), t(28, c);
2269
2269
  }
2270
- const Qi = () => t(13, Te = !0), Hi = () => t(13, Te = !1), Vi = () => pt(), Yi = () => {
2271
- t(1, O = ""), ae.focus();
2272
- }, Ki = () => t(0, D = !D), Xi = () => t(18, ce = void 0), Ji = (g) => t(15, U = g), $i = (g) => vt(g), en = () => {
2273
- se || t(15, U = -1);
2274
- }, tn = () => {
2270
+ const Hi = () => t(13, Ne = !0), Vi = () => t(13, Ne = !1), Yi = () => mt(), Ki = () => {
2271
+ t(1, O = ""), ue.focus();
2272
+ }, Xi = () => t(0, D = !D), Ji = () => t(18, ae = void 0), $i = (g) => t(15, U = g), en = (g) => yt(g), tn = () => {
2273
+ oe || t(15, U = -1);
2274
+ }, nn = () => {
2275
2275
  };
2276
2276
  return n.$$set = (g) => {
2277
- "class" in g && t(2, s = g.class), "apiKey" in g && t(26, c = g.apiKey), "bbox" in g && t(27, u = g.bbox), "clearButtonTitle" in g && t(3, d = g.clearButtonTitle), "clearOnBlur" in g && t(28, a = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, h = g.country), "debounceSearch" in g && t(30, y = g.debounceSearch), "enableReverse" in g && t(5, b = g.enableReverse), "errorMessage" in g && t(6, p = g.errorMessage), "filter" in g && t(31, m = g.filter), "flyTo" in g && t(32, E = g.flyTo), "fuzzyMatch" in g && t(33, S = g.fuzzyMatch), "language" in g && t(34, _ = g.language), "limit" in g && t(35, k = g.limit), "mapController" in g && t(36, x = g.mapController), "minLength" in g && t(37, L = g.minLength), "noResultsMessage" in g && t(7, w = g.noResultsMessage), "placeholder" in g && t(8, C = g.placeholder), "proximity" in g && t(38, I = g.proximity), "reverseActive" in g && t(0, D = g.reverseActive), "reverseButtonTitle" in g && t(9, F = g.reverseButtonTitle), "searchValue" in g && t(1, O = g.searchValue), "showFullGeometry" in g && t(39, M = g.showFullGeometry), "showPlaceType" in g && t(10, j = g.showPlaceType), "showResultsWhileTyping" in g && t(40, $ = g.showResultsWhileTyping), "selectFirst" in g && t(11, se = g.selectFirst), "flyToSelected" in g && t(41, at = g.flyToSelected), "markerOnSelected" in g && t(42, He = g.markerOnSelected), "types" in g && t(43, Ve = g.types), "excludeTypes" in g && t(44, Ye = g.excludeTypes), "zoom" in g && t(45, Ne = g.zoom), "maxZoom" in g && t(46, Ke = g.maxZoom), "apiUrl" in g && t(47, ct = g.apiUrl), "fetchParameters" in g && t(48, ft = g.fetchParameters), "iconsBaseUrl" in g && t(12, Bt = g.iconsBaseUrl), "adjustUrlQuery" in g && t(49, dt = g.adjustUrlQuery), "$$scope" in g && t(59, o = g.$$scope);
2277
+ "class" in g && t(2, s = g.class), "apiKey" in g && t(26, u = g.apiKey), "bbox" in g && t(27, l = g.bbox), "clearButtonTitle" in g && t(3, d = g.clearButtonTitle), "clearOnBlur" in g && t(28, c = g.clearOnBlur), "collapsed" in g && t(4, f = g.collapsed), "country" in g && t(29, h = g.country), "debounceSearch" in g && t(30, p = g.debounceSearch), "enableReverse" in g && t(5, b = g.enableReverse), "errorMessage" in g && t(6, m = g.errorMessage), "filter" in g && t(31, y = g.filter), "flyTo" in g && t(32, _ = g.flyTo), "fuzzyMatch" in g && t(33, L = g.fuzzyMatch), "language" in g && t(34, E = g.language), "limit" in g && t(35, C = g.limit), "mapController" in g && t(36, x = g.mapController), "minLength" in g && t(37, S = g.minLength), "noResultsMessage" in g && t(7, w = g.noResultsMessage), "placeholder" in g && t(8, k = g.placeholder), "proximity" in g && t(38, I = g.proximity), "reverseActive" in g && t(0, D = g.reverseActive), "reverseButtonTitle" in g && t(9, G = g.reverseButtonTitle), "searchValue" in g && t(1, O = g.searchValue), "showFullGeometry" in g && t(39, M = g.showFullGeometry), "showPlaceType" in g && t(10, F = g.showPlaceType), "showResultsWhileTyping" in g && t(40, $ = g.showResultsWhileTyping), "selectFirst" in g && t(11, oe = g.selectFirst), "flyToSelected" in g && t(41, lt = g.flyToSelected), "markerOnSelected" in g && t(42, Qe = g.markerOnSelected), "types" in g && t(43, xe = g.types), "exhaustiveReverseGeocoding" in g && t(44, ut = g.exhaustiveReverseGeocoding), "excludeTypes" in g && t(45, He = g.excludeTypes), "zoom" in g && t(46, ke = g.zoom), "maxZoom" in g && t(47, Ve = g.maxZoom), "apiUrl" in g && t(48, at = g.apiUrl), "fetchParameters" in g && t(49, ct = g.fetchParameters), "iconsBaseUrl" in g && t(12, At = g.iconsBaseUrl), "adjustUrlQuery" in g && t(50, ft = g.adjustUrlQuery), "$$scope" in g && t(60, o = g.$$scope);
2278
2278
  }, n.$$.update = () => {
2279
2279
  if (n.$$.dirty[0] & /*enableReverse*/
2280
2280
  32 && t(0, D = b === "always"), n.$$.dirty[0] & /*focused, clearOnBlur*/
2281
2281
  268443648 && setTimeout(() => {
2282
- t(16, Je = Te), a && !Te && t(1, O = "");
2282
+ t(16, Ke = Ne), c && !Ne && t(1, O = "");
2283
2283
  }), n.$$.dirty[0] & /*searchValue, listFeatures*/
2284
2284
  16386 | n.$$.dirty[1] & /*minLength*/
2285
- 64 && O.length < L && (t(56, N = void 0), t(14, R = void 0), t(18, ce = void 0), t(55, G = R)), n.$$.dirty[1] & /*showFullGeometry, picked*/
2286
- 33554688 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && mt(N.id, { byId: !0 }).catch((g) => t(18, ce = g)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
2287
- 100663330 && (x && N && N.id !== ht && E && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, Ae(N)) : x.fitBounds(st(N.bbox), 50, Ae(N)), t(14, R = void 0), t(55, G = void 0), t(15, U = -1)), t(57, ht = N == null ? void 0 : N.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
2288
- 18432 && se && R != null && R.length && t(15, U = 0), n.$$.dirty[0] & /*searchValue*/
2285
+ 64 && O.length < S && (t(57, N = void 0), t(14, R = void 0), t(18, ae = void 0), t(56, q = R)), n.$$.dirty[1] & /*showFullGeometry, picked*/
2286
+ 67109120 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && gt(N.id, { byId: !0 }).catch((g) => t(18, ae = g)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
2287
+ 201326626 && (x && N && N.id !== dt && _ && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, We(N)) : x.fitBounds(rt(N.bbox), 50, We(N)), t(14, R = void 0), t(56, q = void 0), t(15, U = -1)), t(58, dt = N == null ? void 0 : N.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
2288
+ 18432 && oe && R != null && R.length && t(15, U = 0), n.$$.dirty[0] & /*searchValue*/
2289
2289
  2 && t(15, U = -1), n.$$.dirty[0] & /*listFeatures*/
2290
2290
  16384 | n.$$.dirty[1] & /*markedFeatures*/
2291
- 16777216 && G !== R && t(55, G = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2291
+ 33554432 && q !== R && t(56, q = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2292
2292
  81921 | n.$$.dirty[1] & /*mapController, markedFeatures*/
2293
- 16777248 && x && x.setEventHandler((g) => {
2293
+ 33554464 && x && x.setEventHandler((g) => {
2294
2294
  switch (g.type) {
2295
2295
  case "mapClick":
2296
2296
  D && Fi(g.coordinates);
2297
2297
  break;
2298
2298
  case "markerClick":
2299
2299
  {
2300
- const Z = R == null ? void 0 : R.find((H) => H.id === g.id);
2301
- Z && vt(Z);
2300
+ const j = R == null ? void 0 : R.find((H) => H.id === g.id);
2301
+ j && yt(j);
2302
2302
  }
2303
2303
  break;
2304
2304
  case "markerMouseEnter":
2305
- G && t(15, U = Je ? (R == null ? void 0 : R.findIndex((Z) => Z.id === g.id)) ?? -1 : -1);
2305
+ q && t(15, U = Ke ? (R == null ? void 0 : R.findIndex((j) => j.id === g.id)) ?? -1 : -1);
2306
2306
  break;
2307
2307
  case "markerMouseLeave":
2308
- G && t(15, U = -1);
2308
+ q && t(15, U = -1);
2309
2309
  break;
2310
2310
  }
2311
2311
  }), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
2312
- 49152 && t(58, i = R == null ? void 0 : R[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
2313
- 134218786 && x && i && E && at && x.flyTo(i.center, Ae(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
2314
- 2080 && (He || x == null || x.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
2315
- 150997024 && x && He && !G && (x.setMarkers(i ? [i] : void 0, void 0), x.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
2316
- 50331680 && x && x.setMarkers(G, N), n.$$.dirty[0] & /*selectedItemIndex*/
2312
+ 49152 && t(59, i = R == null ? void 0 : R[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
2313
+ 268436514 && x && i && _ && lt && x.flyTo(i.center, We(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
2314
+ 2080 && (Qe || x == null || x.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
2315
+ 301991968 && x && Qe && !q && (x.setMarkers(i ? [i] : void 0, void 0), x.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
2316
+ 100663328 && x && x.setMarkers(q, N), n.$$.dirty[0] & /*selectedItemIndex*/
2317
2317
  32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
2318
- 16777248 && G && x && x.setSelectedMarker(U), n.$$.dirty[0] & /*searchValue*/
2318
+ 33554464 && q && x && x.setSelectedMarker(U), n.$$.dirty[0] & /*searchValue*/
2319
2319
  2 | n.$$.dirty[1] & /*mapController*/
2320
2320
  32 && x) {
2321
- const g = gt(O);
2321
+ const g = ht(O);
2322
2322
  x.setReverseMarker(g ? [g.decimalLongitude, g.decimalLatitude] : void 0);
2323
2323
  }
2324
2324
  n.$$.dirty[1] & /*selected*/
2325
- 134217728 && pe("select", i), n.$$.dirty[1] & /*picked*/
2326
- 33554432 && pe("pick", N), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
2327
- 81920 && pe("optionsVisibilityChange", Je && !!R), n.$$.dirty[0] & /*listFeatures*/
2328
- 16384 && pe("featuresListed", R), n.$$.dirty[1] & /*markedFeatures*/
2329
- 16777216 && pe("featuresMarked", G), n.$$.dirty[0] & /*reverseActive*/
2330
- 1 && pe("reverseToggle", D), n.$$.dirty[0] & /*searchValue*/
2331
- 2 && pe("queryChange", O), n.$$.dirty[0] & /*reverseActive*/
2325
+ 268435456 && me("select", i), n.$$.dirty[1] & /*picked*/
2326
+ 67108864 && me("pick", N), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
2327
+ 81920 && me("optionsVisibilityChange", Ke && !!R), n.$$.dirty[0] & /*listFeatures*/
2328
+ 16384 && me("featuresListed", R), n.$$.dirty[1] & /*markedFeatures*/
2329
+ 33554432 && me("featuresMarked", q), n.$$.dirty[0] & /*reverseActive*/
2330
+ 1 && me("reverseToggle", D), n.$$.dirty[0] & /*searchValue*/
2331
+ 2 && me("queryChange", O), n.$$.dirty[0] & /*reverseActive*/
2332
2332
  1 | n.$$.dirty[1] & /*mapController*/
2333
2333
  32 && x && x.indicateReverse(D);
2334
2334
  }, [
@@ -2338,64 +2338,64 @@ function dr(n, e, t) {
2338
2338
  d,
2339
2339
  f,
2340
2340
  b,
2341
- p,
2341
+ m,
2342
2342
  w,
2343
- C,
2343
+ k,
2344
+ G,
2344
2345
  F,
2345
- j,
2346
- se,
2347
- Bt,
2348
- Te,
2346
+ oe,
2347
+ At,
2348
+ Ne,
2349
2349
  R,
2350
2350
  U,
2351
- Je,
2351
+ Ke,
2352
+ ue,
2352
2353
  ae,
2353
- ce,
2354
2354
  Me,
2355
- Ui,
2356
- zt,
2355
+ zi,
2356
+ Ut,
2357
2357
  ji,
2358
- pt,
2359
- vt,
2358
+ mt,
2359
+ yt,
2360
+ a,
2361
+ u,
2360
2362
  l,
2361
2363
  c,
2362
- u,
2363
- a,
2364
2364
  h,
2365
+ p,
2365
2366
  y,
2366
- m,
2367
- E,
2368
- S,
2369
2367
  _,
2370
- k,
2371
- x,
2372
2368
  L,
2369
+ E,
2370
+ C,
2371
+ x,
2372
+ S,
2373
2373
  I,
2374
2374
  M,
2375
2375
  $,
2376
- at,
2376
+ lt,
2377
+ Qe,
2378
+ xe,
2379
+ ut,
2377
2380
  He,
2381
+ ke,
2378
2382
  Ve,
2379
- Ye,
2380
- Ne,
2381
- Ke,
2383
+ at,
2382
2384
  ct,
2383
2385
  ft,
2384
- dt,
2385
- Wi,
2386
2386
  Ai,
2387
- Dt,
2388
2387
  Bi,
2388
+ Bt,
2389
2389
  Di,
2390
- G,
2390
+ Ui,
2391
+ q,
2391
2392
  N,
2392
- ht,
2393
+ dt,
2393
2394
  i,
2394
2395
  o,
2395
2396
  r,
2396
2397
  Zi,
2397
2398
  qi,
2398
- Gi,
2399
2399
  Qi,
2400
2400
  Hi,
2401
2401
  Vi,
@@ -2405,17 +2405,18 @@ function dr(n, e, t) {
2405
2405
  Ji,
2406
2406
  $i,
2407
2407
  en,
2408
- tn
2408
+ tn,
2409
+ nn
2409
2410
  ];
2410
2411
  }
2411
2412
  let hr = class extends Se {
2412
2413
  constructor(e) {
2413
- super(), xe(
2414
+ super(), Le(
2414
2415
  this,
2415
2416
  e,
2416
2417
  dr,
2417
2418
  fr,
2418
- Le,
2419
+ Ee,
2419
2420
  {
2420
2421
  ZOOM_DEFAULTS: 25,
2421
2422
  class: 2,
@@ -2448,18 +2449,19 @@ let hr = class extends Se {
2448
2449
  flyToSelected: 41,
2449
2450
  markerOnSelected: 42,
2450
2451
  types: 43,
2451
- excludeTypes: 44,
2452
- zoom: 45,
2453
- maxZoom: 46,
2454
- apiUrl: 47,
2455
- fetchParameters: 48,
2452
+ exhaustiveReverseGeocoding: 44,
2453
+ excludeTypes: 45,
2454
+ zoom: 46,
2455
+ maxZoom: 47,
2456
+ apiUrl: 48,
2457
+ fetchParameters: 49,
2456
2458
  iconsBaseUrl: 12,
2457
- adjustUrlQuery: 49,
2458
- focus: 50,
2459
- blur: 51,
2460
- setQuery: 52,
2461
- clearList: 53,
2462
- clearMap: 54
2459
+ adjustUrlQuery: 50,
2460
+ focus: 51,
2461
+ blur: 52,
2462
+ setQuery: 53,
2463
+ clearList: 54,
2464
+ clearMap: 55
2463
2465
  },
2464
2466
  null,
2465
2467
  [-1, -1, -1]
@@ -2469,26 +2471,26 @@ let hr = class extends Se {
2469
2471
  return this.$$.ctx[25];
2470
2472
  }
2471
2473
  get focus() {
2472
- return this.$$.ctx[50];
2474
+ return this.$$.ctx[51];
2473
2475
  }
2474
2476
  get blur() {
2475
- return this.$$.ctx[51];
2477
+ return this.$$.ctx[52];
2476
2478
  }
2477
2479
  get setQuery() {
2478
- return this.$$.ctx[52];
2480
+ return this.$$.ctx[53];
2479
2481
  }
2480
2482
  get clearList() {
2481
- return this.$$.ctx[53];
2483
+ return this.$$.ctx[54];
2482
2484
  }
2483
2485
  get clearMap() {
2484
- return this.$$.ctx[54];
2486
+ return this.$$.ctx[55];
2485
2487
  }
2486
2488
  };
2487
- function Ze(n, e, t = {}) {
2489
+ function Fe(n, e, t = {}) {
2488
2490
  const i = { type: "Feature" };
2489
2491
  return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
2490
2492
  }
2491
- function Ot(n, e, t = {}) {
2493
+ function It(n, e, t = {}) {
2492
2494
  for (const r of n) {
2493
2495
  if (r.length < 4)
2494
2496
  throw new Error(
@@ -2500,17 +2502,17 @@ function Ot(n, e, t = {}) {
2500
2502
  if (r[r.length - 1][o] !== r[0][o])
2501
2503
  throw new Error("First and last Position are not equivalent.");
2502
2504
  }
2503
- return Ze({
2505
+ return Fe({
2504
2506
  type: "Polygon",
2505
2507
  coordinates: n
2506
2508
  }, e, t);
2507
2509
  }
2508
- function qe(n, e = {}) {
2510
+ function je(n, e = {}) {
2509
2511
  const t = { type: "FeatureCollection" };
2510
2512
  return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
2511
2513
  }
2512
- function Ti(n, e, t = {}) {
2513
- return Ze({
2514
+ function Pi(n, e, t = {}) {
2515
+ return Fe({
2514
2516
  type: "MultiPolygon",
2515
2517
  coordinates: n
2516
2518
  }, e, t);
@@ -2541,63 +2543,63 @@ function gr(n, e) {
2541
2543
  var t = { label: 0, sent: function() {
2542
2544
  if (o[0] & 1) throw o[1];
2543
2545
  return o[1];
2544
- }, trys: [], ops: [] }, i, r, o, l;
2545
- return l = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
2546
+ }, trys: [], ops: [] }, i, r, o, a;
2547
+ return a = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
2546
2548
  return this;
2547
- }), l;
2548
- function s(u) {
2549
+ }), a;
2550
+ function s(l) {
2549
2551
  return function(d) {
2550
- return c([u, d]);
2552
+ return u([l, d]);
2551
2553
  };
2552
2554
  }
2553
- function c(u) {
2555
+ function u(l) {
2554
2556
  if (i) throw new TypeError("Generator is already executing.");
2555
2557
  for (; t; ) try {
2556
- if (i = 1, r && (o = u[0] & 2 ? r.return : u[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, u[1])).done) return o;
2557
- switch (r = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
2558
+ if (i = 1, r && (o = l[0] & 2 ? r.return : l[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, l[1])).done) return o;
2559
+ switch (r = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
2558
2560
  case 0:
2559
2561
  case 1:
2560
- o = u;
2562
+ o = l;
2561
2563
  break;
2562
2564
  case 4:
2563
- return t.label++, { value: u[1], done: !1 };
2565
+ return t.label++, { value: l[1], done: !1 };
2564
2566
  case 5:
2565
- t.label++, r = u[1], u = [0];
2567
+ t.label++, r = l[1], l = [0];
2566
2568
  continue;
2567
2569
  case 7:
2568
- u = t.ops.pop(), t.trys.pop();
2570
+ l = t.ops.pop(), t.trys.pop();
2569
2571
  continue;
2570
2572
  default:
2571
- if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
2573
+ if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
2572
2574
  t = 0;
2573
2575
  continue;
2574
2576
  }
2575
- if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
2576
- t.label = u[1];
2577
+ if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
2578
+ t.label = l[1];
2577
2579
  break;
2578
2580
  }
2579
- if (u[0] === 6 && t.label < o[1]) {
2580
- t.label = o[1], o = u;
2581
+ if (l[0] === 6 && t.label < o[1]) {
2582
+ t.label = o[1], o = l;
2581
2583
  break;
2582
2584
  }
2583
2585
  if (o && t.label < o[2]) {
2584
- t.label = o[2], t.ops.push(u);
2586
+ t.label = o[2], t.ops.push(l);
2585
2587
  break;
2586
2588
  }
2587
2589
  o[2] && t.ops.pop(), t.trys.pop();
2588
2590
  continue;
2589
2591
  }
2590
- u = e.call(n, t);
2592
+ l = e.call(n, t);
2591
2593
  } catch (d) {
2592
- u = [6, d], r = 0;
2594
+ l = [6, d], r = 0;
2593
2595
  } finally {
2594
2596
  i = o = 0;
2595
2597
  }
2596
- if (u[0] & 5) throw u[1];
2597
- return { value: u[0] ? u[1] : void 0, done: !0 };
2598
+ if (l[0] & 5) throw l[1];
2599
+ return { value: l[0] ? l[1] : void 0, done: !0 };
2598
2600
  }
2599
2601
  }
2600
- var Ee = (
2602
+ var _e = (
2601
2603
  /** @class */
2602
2604
  /* @__PURE__ */ function() {
2603
2605
  function n(e, t) {
@@ -2609,10 +2611,10 @@ var Ee = (
2609
2611
  function mr(n, e) {
2610
2612
  return n > e ? 1 : n < e ? -1 : 0;
2611
2613
  }
2612
- function ve(n, e, t) {
2613
- for (var i = new Ee(null, null), r = i, o = i; ; ) {
2614
- var l = t(n, e.key);
2615
- if (l < 0) {
2614
+ function ye(n, e, t) {
2615
+ for (var i = new _e(null, null), r = i, o = i; ; ) {
2616
+ var a = t(n, e.key);
2617
+ if (a < 0) {
2616
2618
  if (e.left === null)
2617
2619
  break;
2618
2620
  if (t(n, e.left.key) < 0) {
@@ -2621,7 +2623,7 @@ function ve(n, e, t) {
2621
2623
  break;
2622
2624
  }
2623
2625
  o.left = e, o = e, e = e.left;
2624
- } else if (l > 0) {
2626
+ } else if (a > 0) {
2625
2627
  if (e.right === null)
2626
2628
  break;
2627
2629
  if (t(n, e.right.key) > 0) {
@@ -2635,25 +2637,25 @@ function ve(n, e, t) {
2635
2637
  }
2636
2638
  return r.right = e.left, o.left = e.right, e.left = i.right, e.right = i.left, e;
2637
2639
  }
2638
- function Lt(n, e, t, i) {
2639
- var r = new Ee(n, e);
2640
+ function Et(n, e, t, i) {
2641
+ var r = new _e(n, e);
2640
2642
  if (t === null)
2641
2643
  return r.left = r.right = null, r;
2642
- t = ve(n, t, i);
2644
+ t = ye(n, t, i);
2643
2645
  var o = i(n, t.key);
2644
2646
  return o < 0 ? (r.left = t.left, r.right = t, t.left = null) : o >= 0 && (r.right = t.right, r.left = t, t.right = null), r;
2645
2647
  }
2646
2648
  function li(n, e, t) {
2647
2649
  var i = null, r = null;
2648
2650
  if (e) {
2649
- e = ve(n, e, t);
2651
+ e = ye(n, e, t);
2650
2652
  var o = t(e.key, n);
2651
2653
  o === 0 ? (i = e.left, r = e.right) : o < 0 ? (r = e.right, e.right = null, i = e) : (i = e.left, e.left = null, r = e);
2652
2654
  }
2653
2655
  return { left: i, right: r };
2654
2656
  }
2655
- function pr(n, e, t) {
2656
- return e === null ? n : (n === null || (e = ve(n.key, e, t), e.left = n), e);
2657
+ function yr(n, e, t) {
2658
+ return e === null ? n : (n === null || (e = ye(n.key, e, t), e.left = n), e);
2657
2659
  }
2658
2660
  function Ct(n, e, t, i, r) {
2659
2661
  if (n) {
@@ -2663,34 +2665,34 @@ function Ct(n, e, t, i, r) {
2663
2665
  n.left && Ct(n.left, o, !1, i, r), n.right && Ct(n.right, o, !0, i, r);
2664
2666
  }
2665
2667
  }
2666
- var Wt = (
2668
+ var Ot = (
2667
2669
  /** @class */
2668
2670
  function() {
2669
2671
  function n(e) {
2670
2672
  e === void 0 && (e = mr), this._root = null, this._size = 0, this._comparator = e;
2671
2673
  }
2672
2674
  return n.prototype.insert = function(e, t) {
2673
- return this._size++, this._root = Lt(e, t, this._root, this._comparator);
2675
+ return this._size++, this._root = Et(e, t, this._root, this._comparator);
2674
2676
  }, n.prototype.add = function(e, t) {
2675
- var i = new Ee(e, t);
2677
+ var i = new _e(e, t);
2676
2678
  this._root === null && (i.left = i.right = null, this._size++, this._root = i);
2677
- var r = this._comparator, o = ve(e, this._root, r), l = r(e, o.key);
2678
- return l === 0 ? this._root = o : (l < 0 ? (i.left = o.left, i.right = o, o.left = null) : l > 0 && (i.right = o.right, i.left = o, o.right = null), this._size++, this._root = i), this._root;
2679
+ var r = this._comparator, o = ye(e, this._root, r), a = r(e, o.key);
2680
+ return a === 0 ? this._root = o : (a < 0 ? (i.left = o.left, i.right = o, o.left = null) : a > 0 && (i.right = o.right, i.left = o, o.right = null), this._size++, this._root = i), this._root;
2679
2681
  }, n.prototype.remove = function(e) {
2680
2682
  this._root = this._remove(e, this._root, this._comparator);
2681
2683
  }, n.prototype._remove = function(e, t, i) {
2682
2684
  var r;
2683
2685
  if (t === null)
2684
2686
  return null;
2685
- t = ve(e, t, i);
2687
+ t = ye(e, t, i);
2686
2688
  var o = i(e, t.key);
2687
- return o === 0 ? (t.left === null ? r = t.right : (r = ve(e, t.left, i), r.right = t.right), this._size--, r) : t;
2689
+ return o === 0 ? (t.left === null ? r = t.right : (r = ye(e, t.left, i), r.right = t.right), this._size--, r) : t;
2688
2690
  }, n.prototype.pop = function() {
2689
2691
  var e = this._root;
2690
2692
  if (e) {
2691
2693
  for (; e.left; )
2692
2694
  e = e.left;
2693
- return this._root = ve(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
2695
+ return this._root = ye(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
2694
2696
  }
2695
2697
  return null;
2696
2698
  }, n.prototype.findStatic = function(e) {
@@ -2702,7 +2704,7 @@ var Wt = (
2702
2704
  }
2703
2705
  return null;
2704
2706
  }, n.prototype.find = function(e) {
2705
- return this._root && (this._root = ve(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
2707
+ return this._root && (this._root = ye(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
2706
2708
  }, n.prototype.contains = function(e) {
2707
2709
  for (var t = this._root, i = this._comparator; t; ) {
2708
2710
  var r = i(e, t.key);
@@ -2716,13 +2718,13 @@ var Wt = (
2716
2718
  i !== null ? (r.push(i), i = i.left) : r.length !== 0 ? (i = r.pop(), e.call(t, i), i = i.right) : o = !0;
2717
2719
  return this;
2718
2720
  }, n.prototype.range = function(e, t, i, r) {
2719
- for (var o = [], l = this._comparator, s = this._root, c; o.length !== 0 || s; )
2721
+ for (var o = [], a = this._comparator, s = this._root, u; o.length !== 0 || s; )
2720
2722
  if (s)
2721
2723
  o.push(s), s = s.left;
2722
2724
  else {
2723
- if (s = o.pop(), c = l(s.key, t), c > 0)
2725
+ if (s = o.pop(), u = a(s.key, t), u > 0)
2724
2726
  break;
2725
- if (l(s.key, e) >= 0 && i.call(r, s))
2727
+ if (a(s.key, e) >= 0 && i.call(r, s))
2726
2728
  return this;
2727
2729
  s = s.right;
2728
2730
  }
@@ -2795,15 +2797,15 @@ var Wt = (
2795
2797
  }, n.prototype.clear = function() {
2796
2798
  return this._root = null, this._size = 0, this;
2797
2799
  }, n.prototype.toList = function() {
2798
- return yr(this._root);
2800
+ return pr(this._root);
2799
2801
  }, n.prototype.load = function(e, t, i) {
2800
2802
  t === void 0 && (t = []), i === void 0 && (i = !1);
2801
2803
  var r = e.length, o = this._comparator;
2802
- if (i && Pt(e, t, 0, r - 1, o), this._root === null)
2803
- this._root = Nt(e, t, 0, r), this._size = r;
2804
+ if (i && Tt(e, t, 0, r - 1, o), this._root === null)
2805
+ this._root = kt(e, t, 0, r), this._size = r;
2804
2806
  else {
2805
- var l = br(this.toList(), vr(e, t), o);
2806
- r = this._size + r, this._root = Tt({ head: l }, 0, r);
2807
+ var a = br(this.toList(), vr(e, t), o);
2808
+ r = this._size + r, this._root = Nt({ head: a }, 0, r);
2807
2809
  }
2808
2810
  return this;
2809
2811
  }, n.prototype.isEmpty = function() {
@@ -2829,8 +2831,8 @@ var Wt = (
2829
2831
  return t.push(i);
2830
2832
  }, e), t.join("");
2831
2833
  }, n.prototype.update = function(e, t, i) {
2832
- var r = this._comparator, o = li(e, this._root, r), l = o.left, s = o.right;
2833
- r(e, t) < 0 ? s = Lt(t, i, s, r) : l = Lt(t, i, l, r), this._root = pr(l, s, r);
2834
+ var r = this._comparator, o = li(e, this._root, r), a = o.left, s = o.right;
2835
+ r(e, t) < 0 ? s = Et(t, i, s, r) : a = Et(t, i, a, r), this._root = yr(a, s, r);
2834
2836
  }, n.prototype.split = function(e) {
2835
2837
  return li(e, this._root, this._comparator);
2836
2838
  }, n.prototype[Symbol.iterator] = function() {
@@ -2859,66 +2861,66 @@ var Wt = (
2859
2861
  }, n;
2860
2862
  }()
2861
2863
  );
2862
- function Nt(n, e, t, i) {
2864
+ function kt(n, e, t, i) {
2863
2865
  var r = i - t;
2864
2866
  if (r > 0) {
2865
- var o = t + Math.floor(r / 2), l = n[o], s = e[o], c = new Ee(l, s);
2866
- return c.left = Nt(n, e, t, o), c.right = Nt(n, e, o + 1, i), c;
2867
+ var o = t + Math.floor(r / 2), a = n[o], s = e[o], u = new _e(a, s);
2868
+ return u.left = kt(n, e, t, o), u.right = kt(n, e, o + 1, i), u;
2867
2869
  }
2868
2870
  return null;
2869
2871
  }
2870
2872
  function vr(n, e) {
2871
- for (var t = new Ee(null, null), i = t, r = 0; r < n.length; r++)
2872
- i = i.next = new Ee(n[r], e[r]);
2873
+ for (var t = new _e(null, null), i = t, r = 0; r < n.length; r++)
2874
+ i = i.next = new _e(n[r], e[r]);
2873
2875
  return i.next = null, t.next;
2874
2876
  }
2875
- function yr(n) {
2876
- for (var e = n, t = [], i = !1, r = new Ee(null, null), o = r; !i; )
2877
+ function pr(n) {
2878
+ for (var e = n, t = [], i = !1, r = new _e(null, null), o = r; !i; )
2877
2879
  e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : i = !0;
2878
2880
  return o.next = null, r.next;
2879
2881
  }
2880
- function Tt(n, e, t) {
2882
+ function Nt(n, e, t) {
2881
2883
  var i = t - e;
2882
2884
  if (i > 0) {
2883
- var r = e + Math.floor(i / 2), o = Tt(n, e, r), l = n.head;
2884
- return l.left = o, n.head = n.head.next, l.right = Tt(n, r + 1, t), l;
2885
+ var r = e + Math.floor(i / 2), o = Nt(n, e, r), a = n.head;
2886
+ return a.left = o, n.head = n.head.next, a.right = Nt(n, r + 1, t), a;
2885
2887
  }
2886
2888
  return null;
2887
2889
  }
2888
2890
  function br(n, e, t) {
2889
- for (var i = new Ee(null, null), r = i, o = n, l = e; o !== null && l !== null; )
2890
- t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
2891
- return o !== null ? r.next = o : l !== null && (r.next = l), i.next;
2891
+ for (var i = new _e(null, null), r = i, o = n, a = e; o !== null && a !== null; )
2892
+ t(o.key, a.key) < 0 ? (r.next = o, o = o.next) : (r.next = a, a = a.next), r = r.next;
2893
+ return o !== null ? r.next = o : a !== null && (r.next = a), i.next;
2892
2894
  }
2893
- function Pt(n, e, t, i, r) {
2895
+ function Tt(n, e, t, i, r) {
2894
2896
  if (!(t >= i)) {
2895
- for (var o = n[t + i >> 1], l = t - 1, s = i + 1; ; ) {
2897
+ for (var o = n[t + i >> 1], a = t - 1, s = i + 1; ; ) {
2896
2898
  do
2897
- l++;
2898
- while (r(n[l], o) < 0);
2899
+ a++;
2900
+ while (r(n[a], o) < 0);
2899
2901
  do
2900
2902
  s--;
2901
2903
  while (r(n[s], o) > 0);
2902
- if (l >= s)
2904
+ if (a >= s)
2903
2905
  break;
2904
- var c = n[l];
2905
- n[l] = n[s], n[s] = c, c = e[l], e[l] = e[s], e[s] = c;
2906
+ var u = n[a];
2907
+ n[a] = n[s], n[s] = u, u = e[a], e[a] = e[s], e[s] = u;
2906
2908
  }
2907
- Pt(n, e, t, s, r), Pt(n, e, s + 1, i, r);
2909
+ Tt(n, e, t, s, r), Tt(n, e, s + 1, i, r);
2908
2910
  }
2909
2911
  }
2910
- const de = 11102230246251565e-32, Y = 134217729, wr = (3 + 8 * de) * de;
2911
- function xt(n, e, t, i, r) {
2912
- let o, l, s, c, u = e[0], d = i[0], a = 0, f = 0;
2913
- d > u == d > -u ? (o = u, u = e[++a]) : (o = d, d = i[++f]);
2912
+ const fe = 11102230246251565e-32, Y = 134217729, wr = (3 + 8 * fe) * fe;
2913
+ function Lt(n, e, t, i, r) {
2914
+ let o, a, s, u, l = e[0], d = i[0], c = 0, f = 0;
2915
+ d > l == d > -l ? (o = l, l = e[++c]) : (o = d, d = i[++f]);
2914
2916
  let h = 0;
2915
- if (a < n && f < t)
2916
- for (d > u == d > -u ? (l = u + o, s = o - (l - u), u = e[++a]) : (l = d + o, s = o - (l - d), d = i[++f]), o = l, s !== 0 && (r[h++] = s); a < n && f < t; )
2917
- d > u == d > -u ? (l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a]) : (l = o + d, c = l - o, s = o - (l - c) + (d - c), d = i[++f]), o = l, s !== 0 && (r[h++] = s);
2918
- for (; a < n; )
2919
- l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a], o = l, s !== 0 && (r[h++] = s);
2917
+ if (c < n && f < t)
2918
+ for (d > l == d > -l ? (a = l + o, s = o - (a - l), l = e[++c]) : (a = d + o, s = o - (a - d), d = i[++f]), o = a, s !== 0 && (r[h++] = s); c < n && f < t; )
2919
+ d > l == d > -l ? (a = o + l, u = a - o, s = o - (a - u) + (l - u), l = e[++c]) : (a = o + d, u = a - o, s = o - (a - u) + (d - u), d = i[++f]), o = a, s !== 0 && (r[h++] = s);
2920
+ for (; c < n; )
2921
+ a = o + l, u = a - o, s = o - (a - u) + (l - u), l = e[++c], o = a, s !== 0 && (r[h++] = s);
2920
2922
  for (; f < t; )
2921
- l = o + d, c = l - o, s = o - (l - c) + (d - c), d = i[++f], o = l, s !== 0 && (r[h++] = s);
2923
+ a = o + d, u = a - o, s = o - (a - u) + (d - u), d = i[++f], o = a, s !== 0 && (r[h++] = s);
2922
2924
  return (o !== 0 || h === 0) && (r[h++] = o), h;
2923
2925
  }
2924
2926
  function _r(n, e) {
@@ -2926,29 +2928,29 @@ function _r(n, e) {
2926
2928
  for (let i = 1; i < n; i++) t += e[i];
2927
2929
  return t;
2928
2930
  }
2929
- function Qe(n) {
2931
+ function qe(n) {
2930
2932
  return new Float64Array(n);
2931
2933
  }
2932
- const Er = (3 + 16 * de) * de, Lr = (2 + 12 * de) * de, xr = (9 + 64 * de) * de * de, Ie = Qe(4), ui = Qe(8), ai = Qe(12), ci = Qe(16), X = Qe(4);
2933
- function Sr(n, e, t, i, r, o, l) {
2934
- let s, c, u, d, a, f, h, y, b, p, m, E, S, _, k, x, L, w;
2935
- const C = n - r, I = t - r, D = e - o, F = i - o;
2936
- _ = C * F, f = Y * C, h = f - (f - C), y = C - h, f = Y * F, b = f - (f - F), p = F - b, k = y * p - (_ - h * b - y * b - h * p), x = D * I, f = Y * D, h = f - (f - D), y = D - h, f = Y * I, b = f - (f - I), p = I - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, Ie[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, Ie[1] = S - (m + a) + (a - x), w = E + m, a = w - E, Ie[2] = E - (w - a) + (m - a), Ie[3] = w;
2937
- let O = _r(4, Ie), M = Lr * l;
2938
- if (O >= M || -O >= M || (a = n - C, s = n - (C + a) + (a - r), a = t - I, u = t - (I + a) + (a - r), a = e - D, c = e - (D + a) + (a - o), a = i - F, d = i - (F + a) + (a - o), s === 0 && c === 0 && u === 0 && d === 0) || (M = xr * l + wr * Math.abs(O), O += C * d + F * s - (D * u + I * c), O >= M || -O >= M)) return O;
2939
- _ = s * F, f = Y * s, h = f - (f - s), y = s - h, f = Y * F, b = f - (f - F), p = F - b, k = y * p - (_ - h * b - y * b - h * p), x = c * I, f = Y * c, h = f - (f - c), y = c - h, f = Y * I, b = f - (f - I), p = I - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, X[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, X[1] = S - (m + a) + (a - x), w = E + m, a = w - E, X[2] = E - (w - a) + (m - a), X[3] = w;
2940
- const j = xt(4, Ie, 4, X, ui);
2941
- _ = C * d, f = Y * C, h = f - (f - C), y = C - h, f = Y * d, b = f - (f - d), p = d - b, k = y * p - (_ - h * b - y * b - h * p), x = D * u, f = Y * D, h = f - (f - D), y = D - h, f = Y * u, b = f - (f - u), p = u - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, X[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, X[1] = S - (m + a) + (a - x), w = E + m, a = w - E, X[2] = E - (w - a) + (m - a), X[3] = w;
2942
- const $ = xt(j, ui, 4, X, ai);
2943
- _ = s * d, f = Y * s, h = f - (f - s), y = s - h, f = Y * d, b = f - (f - d), p = d - b, k = y * p - (_ - h * b - y * b - h * p), x = c * u, f = Y * c, h = f - (f - c), y = c - h, f = Y * u, b = f - (f - u), p = u - b, L = y * p - (x - h * b - y * b - h * p), m = k - L, a = k - m, X[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, X[1] = S - (m + a) + (a - x), w = E + m, a = w - E, X[2] = E - (w - a) + (m - a), X[3] = w;
2944
- const se = xt($, ai, 4, X, ci);
2945
- return ci[se - 1];
2934
+ const Er = (3 + 16 * fe) * fe, Lr = (2 + 12 * fe) * fe, Sr = (9 + 64 * fe) * fe * fe, Re = qe(4), ui = qe(8), ai = qe(12), ci = qe(16), X = qe(4);
2935
+ function xr(n, e, t, i, r, o, a) {
2936
+ let s, u, l, d, c, f, h, p, b, m, y, _, L, E, C, x, S, w;
2937
+ const k = n - r, I = t - r, D = e - o, G = i - o;
2938
+ E = k * G, f = Y * k, h = f - (f - k), p = k - h, f = Y * G, b = f - (f - G), m = G - b, C = p * m - (E - h * b - p * b - h * m), x = D * I, f = Y * D, h = f - (f - D), p = D - h, f = Y * I, b = f - (f - I), m = I - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, Re[0] = C - (y + c) + (c - S), _ = E + y, c = _ - E, L = E - (_ - c) + (y - c), y = L - x, c = L - y, Re[1] = L - (y + c) + (c - x), w = _ + y, c = w - _, Re[2] = _ - (w - c) + (y - c), Re[3] = w;
2939
+ let O = _r(4, Re), M = Lr * a;
2940
+ if (O >= M || -O >= M || (c = n - k, s = n - (k + c) + (c - r), c = t - I, l = t - (I + c) + (c - r), c = e - D, u = e - (D + c) + (c - o), c = i - G, d = i - (G + c) + (c - o), s === 0 && u === 0 && l === 0 && d === 0) || (M = Sr * a + wr * Math.abs(O), O += k * d + G * s - (D * l + I * u), O >= M || -O >= M)) return O;
2941
+ E = s * G, f = Y * s, h = f - (f - s), p = s - h, f = Y * G, b = f - (f - G), m = G - b, C = p * m - (E - h * b - p * b - h * m), x = u * I, f = Y * u, h = f - (f - u), p = u - h, f = Y * I, b = f - (f - I), m = I - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, X[0] = C - (y + c) + (c - S), _ = E + y, c = _ - E, L = E - (_ - c) + (y - c), y = L - x, c = L - y, X[1] = L - (y + c) + (c - x), w = _ + y, c = w - _, X[2] = _ - (w - c) + (y - c), X[3] = w;
2942
+ const F = Lt(4, Re, 4, X, ui);
2943
+ E = k * d, f = Y * k, h = f - (f - k), p = k - h, f = Y * d, b = f - (f - d), m = d - b, C = p * m - (E - h * b - p * b - h * m), x = D * l, f = Y * D, h = f - (f - D), p = D - h, f = Y * l, b = f - (f - l), m = l - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, X[0] = C - (y + c) + (c - S), _ = E + y, c = _ - E, L = E - (_ - c) + (y - c), y = L - x, c = L - y, X[1] = L - (y + c) + (c - x), w = _ + y, c = w - _, X[2] = _ - (w - c) + (y - c), X[3] = w;
2944
+ const $ = Lt(F, ui, 4, X, ai);
2945
+ E = s * d, f = Y * s, h = f - (f - s), p = s - h, f = Y * d, b = f - (f - d), m = d - b, C = p * m - (E - h * b - p * b - h * m), x = u * l, f = Y * u, h = f - (f - u), p = u - h, f = Y * l, b = f - (f - l), m = l - b, S = p * m - (x - h * b - p * b - h * m), y = C - S, c = C - y, X[0] = C - (y + c) + (c - S), _ = E + y, c = _ - E, L = E - (_ - c) + (y - c), y = L - x, c = L - y, X[1] = L - (y + c) + (c - x), w = _ + y, c = w - _, X[2] = _ - (w - c) + (y - c), X[3] = w;
2946
+ const oe = Lt($, ai, 4, X, ci);
2947
+ return ci[oe - 1];
2946
2948
  }
2947
2949
  function Mr(n, e, t, i, r, o) {
2948
- const l = (e - o) * (t - r), s = (n - r) * (i - o), c = l - s, u = Math.abs(l + s);
2949
- return Math.abs(c) >= Er * u ? c : -Sr(n, e, t, i, r, o, u);
2950
+ const a = (e - o) * (t - r), s = (n - r) * (i - o), u = a - s, l = Math.abs(a + s);
2951
+ return Math.abs(u) >= Er * l ? u : -xr(n, e, t, i, r, o, l);
2950
2952
  }
2951
- const Ue = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, Rt = (n, e) => {
2953
+ const De = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, Pt = (n, e) => {
2952
2954
  if (e.ur.x < n.ll.x || n.ur.x < e.ll.x || e.ur.y < n.ll.y || n.ur.y < e.ll.y) return null;
2953
2955
  const t = n.ll.x < e.ll.x ? e.ll.x : n.ll.x, i = n.ur.x < e.ur.x ? n.ur.x : e.ur.x, r = n.ll.y < e.ll.y ? e.ll.y : n.ll.y, o = n.ur.y < e.ur.y ? n.ur.y : e.ur.y;
2954
2956
  return {
@@ -2962,15 +2964,15 @@ const Ue = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n
2962
2964
  }
2963
2965
  };
2964
2966
  };
2965
- let ye = Number.EPSILON;
2966
- ye === void 0 && (ye = Math.pow(2, -52));
2967
- const kr = ye * ye, fi = (n, e) => {
2968
- if (-ye < n && n < ye && -ye < e && e < ye)
2967
+ let ve = Number.EPSILON;
2968
+ ve === void 0 && (ve = Math.pow(2, -52));
2969
+ const Cr = ve * ve, fi = (n, e) => {
2970
+ if (-ve < n && n < ve && -ve < e && e < ve)
2969
2971
  return 0;
2970
2972
  const t = n - e;
2971
- return t * t < kr * n * e ? 0 : n < e ? -1 : 1;
2973
+ return t * t < Cr * n * e ? 0 : n < e ? -1 : 1;
2972
2974
  };
2973
- class Cr {
2975
+ class kr {
2974
2976
  constructor() {
2975
2977
  this.reset();
2976
2978
  }
@@ -2986,7 +2988,7 @@ class Cr {
2986
2988
  }
2987
2989
  class di {
2988
2990
  constructor() {
2989
- this.tree = new Wt(), this.round(0);
2991
+ this.tree = new Ot(), this.round(0);
2990
2992
  }
2991
2993
  // Note: this can rounds input values backwards or forwards.
2992
2994
  // You might ask, why not restrict this to just rounding
@@ -3003,10 +3005,10 @@ class di {
3003
3005
  return r !== null && fi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
3004
3006
  }
3005
3007
  }
3006
- const Ge = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Pi = (n, e) => n.x * e.x + n.y * e.y, hi = (n, e, t) => {
3008
+ const Ze = new kr(), nt = (n, e) => n.x * e.y - n.y * e.x, Ri = (n, e) => n.x * e.x + n.y * e.y, hi = (n, e, t) => {
3007
3009
  const i = Mr(n.x, n.y, e.x, e.y, t.x, t.y);
3008
3010
  return i > 0 ? -1 : i < 0 ? 1 : 0;
3009
- }, lt = (n) => Math.sqrt(Pi(n, n)), Nr = (n, e, t) => {
3011
+ }, ot = (n) => Math.sqrt(Ri(n, n)), Nr = (n, e, t) => {
3010
3012
  const i = {
3011
3013
  x: e.x - n.x,
3012
3014
  y: e.y - n.y
@@ -3014,7 +3016,7 @@ const Ge = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Pi = (n, e) => n.x *
3014
3016
  x: t.x - n.x,
3015
3017
  y: t.y - n.y
3016
3018
  };
3017
- return ot(r, i) / lt(r) / lt(i);
3019
+ return nt(r, i) / ot(r) / ot(i);
3018
3020
  }, Tr = (n, e, t) => {
3019
3021
  const i = {
3020
3022
  x: e.x - n.x,
@@ -3023,7 +3025,7 @@ const Ge = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Pi = (n, e) => n.x *
3023
3025
  x: t.x - n.x,
3024
3026
  y: t.y - n.y
3025
3027
  };
3026
- return Pi(r, i) / lt(r) / lt(i);
3028
+ return Ri(r, i) / ot(r) / ot(i);
3027
3029
  }, gi = (n, e, t) => e.y === 0 ? null : {
3028
3030
  x: n.x + e.x / e.y * (t - n.y),
3029
3031
  y: t
@@ -3035,22 +3037,22 @@ const Ge = new Cr(), ot = (n, e) => n.x * e.y - n.y * e.x, Pi = (n, e) => n.x *
3035
3037
  if (i.x === 0) return mi(n, e, t.x);
3036
3038
  if (e.y === 0) return gi(t, i, n.y);
3037
3039
  if (i.y === 0) return gi(n, e, t.y);
3038
- const r = ot(e, i);
3040
+ const r = nt(e, i);
3039
3041
  if (r == 0) return null;
3040
3042
  const o = {
3041
3043
  x: t.x - n.x,
3042
3044
  y: t.y - n.y
3043
- }, l = ot(o, e) / r, s = ot(o, i) / r, c = n.x + s * e.x, u = t.x + l * i.x, d = n.y + s * e.y, a = t.y + l * i.y, f = (c + u) / 2, h = (d + a) / 2;
3045
+ }, a = nt(o, e) / r, s = nt(o, i) / r, u = n.x + s * e.x, l = t.x + a * i.x, d = n.y + s * e.y, c = t.y + a * i.y, f = (u + l) / 2, h = (d + c) / 2;
3044
3046
  return {
3045
3047
  x: f,
3046
3048
  y: h
3047
3049
  };
3048
3050
  };
3049
- class re {
3051
+ class ne {
3050
3052
  // for ordering sweep events in the sweep event queue
3051
3053
  static compare(e, t) {
3052
- const i = re.comparePoints(e.point, t.point);
3053
- return i !== 0 ? i : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : be.compare(e.segment, t.segment));
3054
+ const i = ne.comparePoints(e.point, t.point);
3055
+ return i !== 0 ? i : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : pe.compare(e.segment, t.segment));
3054
3056
  }
3055
3057
  // for ordering points in sweep line order
3056
3058
  static comparePoints(e, t) {
@@ -3112,18 +3114,18 @@ class re {
3112
3114
  return (r, o) => {
3113
3115
  t.has(r) || i(r), t.has(o) || i(o);
3114
3116
  const {
3115
- sine: l,
3117
+ sine: a,
3116
3118
  cosine: s
3117
3119
  } = t.get(r), {
3118
- sine: c,
3119
- cosine: u
3120
+ sine: u,
3121
+ cosine: l
3120
3122
  } = t.get(o);
3121
- return l >= 0 && c >= 0 ? s < u ? 1 : s > u ? -1 : 0 : l < 0 && c < 0 ? s < u ? -1 : s > u ? 1 : 0 : c < l ? -1 : c > l ? 1 : 0;
3123
+ return a >= 0 && u >= 0 ? s < l ? 1 : s > l ? -1 : 0 : a < 0 && u < 0 ? s < l ? -1 : s > l ? 1 : 0 : u < a ? -1 : u > a ? 1 : 0;
3122
3124
  };
3123
3125
  }
3124
3126
  }
3125
3127
  let Rr = 0;
3126
- class be {
3128
+ class pe {
3127
3129
  /* This compare() function is for ordering segments in the sweep
3128
3130
  * line tree, and does so according to the following criteria:
3129
3131
  *
@@ -3138,44 +3140,44 @@ class be {
3138
3140
  * is directly on the right-more of the two left inputs.
3139
3141
  */
3140
3142
  static compare(e, t) {
3141
- const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, l = t.rightSE.point.x;
3142
- if (l < i) return 1;
3143
+ const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, a = t.rightSE.point.x;
3144
+ if (a < i) return 1;
3143
3145
  if (o < r) return -1;
3144
- const s = e.leftSE.point.y, c = t.leftSE.point.y, u = e.rightSE.point.y, d = t.rightSE.point.y;
3146
+ const s = e.leftSE.point.y, u = t.leftSE.point.y, l = e.rightSE.point.y, d = t.rightSE.point.y;
3145
3147
  if (i < r) {
3146
- if (c < s && c < u) return 1;
3147
- if (c > s && c > u) return -1;
3148
- const a = e.comparePoint(t.leftSE.point);
3149
- if (a < 0) return 1;
3150
- if (a > 0) return -1;
3148
+ if (u < s && u < l) return 1;
3149
+ if (u > s && u > l) return -1;
3150
+ const c = e.comparePoint(t.leftSE.point);
3151
+ if (c < 0) return 1;
3152
+ if (c > 0) return -1;
3151
3153
  const f = t.comparePoint(e.rightSE.point);
3152
3154
  return f !== 0 ? f : -1;
3153
3155
  }
3154
3156
  if (i > r) {
3155
- if (s < c && s < d) return -1;
3156
- if (s > c && s > d) return 1;
3157
- const a = t.comparePoint(e.leftSE.point);
3158
- if (a !== 0) return a;
3157
+ if (s < u && s < d) return -1;
3158
+ if (s > u && s > d) return 1;
3159
+ const c = t.comparePoint(e.leftSE.point);
3160
+ if (c !== 0) return c;
3159
3161
  const f = e.comparePoint(t.rightSE.point);
3160
3162
  return f < 0 ? 1 : f > 0 ? -1 : 1;
3161
3163
  }
3162
- if (s < c) return -1;
3163
- if (s > c) return 1;
3164
- if (o < l) {
3165
- const a = t.comparePoint(e.rightSE.point);
3166
- if (a !== 0) return a;
3164
+ if (s < u) return -1;
3165
+ if (s > u) return 1;
3166
+ if (o < a) {
3167
+ const c = t.comparePoint(e.rightSE.point);
3168
+ if (c !== 0) return c;
3167
3169
  }
3168
- if (o > l) {
3169
- const a = e.comparePoint(t.rightSE.point);
3170
- if (a < 0) return 1;
3171
- if (a > 0) return -1;
3170
+ if (o > a) {
3171
+ const c = e.comparePoint(t.rightSE.point);
3172
+ if (c < 0) return 1;
3173
+ if (c > 0) return -1;
3172
3174
  }
3173
- if (o !== l) {
3174
- const a = u - s, f = o - i, h = d - c, y = l - r;
3175
- if (a > f && h < y) return 1;
3176
- if (a < f && h > y) return -1;
3175
+ if (o !== a) {
3176
+ const c = l - s, f = o - i, h = d - u, p = a - r;
3177
+ if (c > f && h < p) return 1;
3178
+ if (c < f && h > p) return -1;
3177
3179
  }
3178
- return o > l ? 1 : o < l || u < d ? -1 : u > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
3180
+ return o > a ? 1 : o < a || l < d ? -1 : l > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
3179
3181
  }
3180
3182
  /* Warning: a reference to ringWindings input will be stored,
3181
3183
  * and possibly will be later modified */
@@ -3183,15 +3185,15 @@ class be {
3183
3185
  this.id = ++Rr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = i, this.windings = r;
3184
3186
  }
3185
3187
  static fromRing(e, t, i) {
3186
- let r, o, l;
3187
- const s = re.comparePoints(e, t);
3188
+ let r, o, a;
3189
+ const s = ne.comparePoints(e, t);
3188
3190
  if (s < 0)
3189
- r = e, o = t, l = 1;
3191
+ r = e, o = t, a = 1;
3190
3192
  else if (s > 0)
3191
- r = t, o = e, l = -1;
3193
+ r = t, o = e, a = -1;
3192
3194
  else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
3193
- const c = new re(r, !0), u = new re(o, !1);
3194
- return new be(c, u, [i], [l]);
3195
+ const u = new ne(r, !0), l = new ne(o, !1);
3196
+ return new pe(u, l, [i], [a]);
3195
3197
  }
3196
3198
  /* When a segment is split, the rightSE is replaced with a new sweep event */
3197
3199
  replaceRightSE(e) {
@@ -3238,10 +3240,10 @@ class be {
3238
3240
  const t = this.leftSE.point, i = this.rightSE.point, r = this.vector();
3239
3241
  if (t.x === i.x)
3240
3242
  return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
3241
- const o = (e.y - t.y) / r.y, l = t.x + o * r.x;
3242
- if (e.x === l) return 0;
3243
- const s = (e.x - t.x) / r.x, c = t.y + s * r.y;
3244
- return e.y === c ? 0 : e.y < c ? -1 : 1;
3243
+ const o = (e.y - t.y) / r.y, a = t.x + o * r.x;
3244
+ if (e.x === a) return 0;
3245
+ const s = (e.x - t.x) / r.x, u = t.y + s * r.y;
3246
+ return e.y === u ? 0 : e.y < u ? -1 : 1;
3245
3247
  }
3246
3248
  /**
3247
3249
  * Given another segment, returns the first non-trivial intersection
@@ -3259,20 +3261,20 @@ class be {
3259
3261
  * Else, return null.
3260
3262
  */
3261
3263
  getIntersection(e) {
3262
- const t = this.bbox(), i = e.bbox(), r = Rt(t, i);
3264
+ const t = this.bbox(), i = e.bbox(), r = Pt(t, i);
3263
3265
  if (r === null) return null;
3264
- const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u = Ue(t, s) && this.comparePoint(s) === 0, d = Ue(i, o) && e.comparePoint(o) === 0, a = Ue(t, c) && this.comparePoint(c) === 0, f = Ue(i, l) && e.comparePoint(l) === 0;
3265
- if (d && u)
3266
- return f && !a ? l : !f && a ? c : null;
3266
+ const o = this.leftSE.point, a = this.rightSE.point, s = e.leftSE.point, u = e.rightSE.point, l = De(t, s) && this.comparePoint(s) === 0, d = De(i, o) && e.comparePoint(o) === 0, c = De(t, u) && this.comparePoint(u) === 0, f = De(i, a) && e.comparePoint(a) === 0;
3267
+ if (d && l)
3268
+ return f && !c ? a : !f && c ? u : null;
3267
3269
  if (d)
3268
- return a && o.x === c.x && o.y === c.y ? null : o;
3269
- if (u)
3270
- return f && l.x === s.x && l.y === s.y ? null : s;
3271
- if (f && a) return null;
3272
- if (f) return l;
3273
- if (a) return c;
3270
+ return c && o.x === u.x && o.y === u.y ? null : o;
3271
+ if (l)
3272
+ return f && a.x === s.x && a.y === s.y ? null : s;
3273
+ if (f && c) return null;
3274
+ if (f) return a;
3275
+ if (c) return u;
3274
3276
  const h = Pr(o, this.vector(), s, e.vector());
3275
- return h === null || !Ue(r, h) ? null : Ge.round(h.x, h.y);
3277
+ return h === null || !De(r, h) ? null : Ze.round(h.x, h.y);
3276
3278
  }
3277
3279
  /**
3278
3280
  * Split the given segment into multiple segments on the given points.
@@ -3287,10 +3289,10 @@ class be {
3287
3289
  * Warning: input array of points is modified
3288
3290
  */
3289
3291
  split(e) {
3290
- const t = [], i = e.events !== void 0, r = new re(e, !0), o = new re(e, !1), l = this.rightSE;
3292
+ const t = [], i = e.events !== void 0, r = new ne(e, !0), o = new ne(e, !1), a = this.rightSE;
3291
3293
  this.replaceRightSE(o), t.push(o), t.push(r);
3292
- const s = new be(r, l, this.rings.slice(), this.windings.slice());
3293
- return re.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), re.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (r.checkForConsuming(), o.checkForConsuming()), t;
3294
+ const s = new pe(r, a, this.rings.slice(), this.windings.slice());
3295
+ return ne.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), ne.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (r.checkForConsuming(), o.checkForConsuming()), t;
3294
3296
  }
3295
3297
  /* Swap which event is left and right */
3296
3298
  swapEvents() {
@@ -3305,7 +3307,7 @@ class be {
3305
3307
  let t = this, i = e;
3306
3308
  for (; t.consumedBy; ) t = t.consumedBy;
3307
3309
  for (; i.consumedBy; ) i = i.consumedBy;
3308
- const r = be.compare(t, i);
3310
+ const r = pe.compare(t, i);
3309
3311
  if (r !== 0) {
3310
3312
  if (r > 0) {
3311
3313
  const o = t;
@@ -3315,9 +3317,9 @@ class be {
3315
3317
  const o = t;
3316
3318
  t = i, i = o;
3317
3319
  }
3318
- for (let o = 0, l = i.rings.length; o < l; o++) {
3319
- const s = i.rings[o], c = i.windings[o], u = t.rings.indexOf(s);
3320
- u === -1 ? (t.rings.push(s), t.windings.push(c)) : t.windings[u] += c;
3320
+ for (let o = 0, a = i.rings.length; o < a; o++) {
3321
+ const s = i.rings[o], u = i.windings[o], l = t.rings.indexOf(s);
3322
+ l === -1 ? (t.rings.push(s), t.windings.push(u)) : t.windings[l] += u;
3321
3323
  }
3322
3324
  i.rings = null, i.windings = null, i.consumedBy = t, i.leftSE.consumedBy = t.leftSE, i.rightSE.consumedBy = t.rightSE;
3323
3325
  }
@@ -3348,25 +3350,25 @@ class be {
3348
3350
  multiPolys: []
3349
3351
  };
3350
3352
  const t = this._afterState.rings, i = this._afterState.windings, r = this._afterState.multiPolys;
3351
- for (let s = 0, c = this.rings.length; s < c; s++) {
3352
- const u = this.rings[s], d = this.windings[s], a = t.indexOf(u);
3353
- a === -1 ? (t.push(u), i.push(d)) : i[a] += d;
3353
+ for (let s = 0, u = this.rings.length; s < u; s++) {
3354
+ const l = this.rings[s], d = this.windings[s], c = t.indexOf(l);
3355
+ c === -1 ? (t.push(l), i.push(d)) : i[c] += d;
3354
3356
  }
3355
- const o = [], l = [];
3356
- for (let s = 0, c = t.length; s < c; s++) {
3357
+ const o = [], a = [];
3358
+ for (let s = 0, u = t.length; s < u; s++) {
3357
3359
  if (i[s] === 0) continue;
3358
- const u = t[s], d = u.poly;
3359
- if (l.indexOf(d) === -1)
3360
- if (u.isExterior) o.push(d);
3360
+ const l = t[s], d = l.poly;
3361
+ if (a.indexOf(d) === -1)
3362
+ if (l.isExterior) o.push(d);
3361
3363
  else {
3362
- l.indexOf(d) === -1 && l.push(d);
3363
- const a = o.indexOf(u.poly);
3364
- a !== -1 && o.splice(a, 1);
3364
+ a.indexOf(d) === -1 && a.push(d);
3365
+ const c = o.indexOf(l.poly);
3366
+ c !== -1 && o.splice(c, 1);
3365
3367
  }
3366
3368
  }
3367
- for (let s = 0, c = o.length; s < c; s++) {
3368
- const u = o[s].multiPoly;
3369
- r.indexOf(u) === -1 && r.push(u);
3369
+ for (let s = 0, u = o.length; s < u; s++) {
3370
+ const l = o[s].multiPoly;
3371
+ r.indexOf(l) === -1 && r.push(l);
3370
3372
  }
3371
3373
  return this._afterState;
3372
3374
  }
@@ -3375,7 +3377,7 @@ class be {
3375
3377
  if (this.consumedBy) return !1;
3376
3378
  if (this._isInResult !== void 0) return this._isInResult;
3377
3379
  const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
3378
- switch (le.type) {
3380
+ switch (se.type) {
3379
3381
  case "union": {
3380
3382
  const i = e.length === 0, r = t.length === 0;
3381
3383
  this._isInResult = i !== r;
@@ -3383,7 +3385,7 @@ class be {
3383
3385
  }
3384
3386
  case "intersection": {
3385
3387
  let i, r;
3386
- e.length < t.length ? (i = e.length, r = t.length) : (i = t.length, r = e.length), this._isInResult = r === le.numMultiPolys && i < r;
3388
+ e.length < t.length ? (i = e.length, r = t.length) : (i = t.length, r = e.length), this._isInResult = r === se.numMultiPolys && i < r;
3387
3389
  break;
3388
3390
  }
3389
3391
  case "xor": {
@@ -3397,18 +3399,18 @@ class be {
3397
3399
  break;
3398
3400
  }
3399
3401
  default:
3400
- throw new Error(`Unrecognized operation type found ${le.type}`);
3402
+ throw new Error(`Unrecognized operation type found ${se.type}`);
3401
3403
  }
3402
3404
  return this._isInResult;
3403
3405
  }
3404
3406
  }
3405
- class pi {
3407
+ class yi {
3406
3408
  constructor(e, t, i) {
3407
3409
  if (!Array.isArray(e) || e.length === 0)
3408
3410
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3409
3411
  if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
3410
3412
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3411
- const r = Ge.round(e[0][0], e[0][1]);
3413
+ const r = Ze.round(e[0][0], e[0][1]);
3412
3414
  this.bbox = {
3413
3415
  ll: {
3414
3416
  x: r.x,
@@ -3420,13 +3422,13 @@ class pi {
3420
3422
  }
3421
3423
  };
3422
3424
  let o = r;
3423
- for (let l = 1, s = e.length; l < s; l++) {
3424
- if (typeof e[l][0] != "number" || typeof e[l][1] != "number")
3425
+ for (let a = 1, s = e.length; a < s; a++) {
3426
+ if (typeof e[a][0] != "number" || typeof e[a][1] != "number")
3425
3427
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3426
- let c = Ge.round(e[l][0], e[l][1]);
3427
- c.x === o.x && c.y === o.y || (this.segments.push(be.fromRing(o, c, this)), c.x < this.bbox.ll.x && (this.bbox.ll.x = c.x), c.y < this.bbox.ll.y && (this.bbox.ll.y = c.y), c.x > this.bbox.ur.x && (this.bbox.ur.x = c.x), c.y > this.bbox.ur.y && (this.bbox.ur.y = c.y), o = c);
3428
+ let u = Ze.round(e[a][0], e[a][1]);
3429
+ u.x === o.x && u.y === o.y || (this.segments.push(pe.fromRing(o, u, this)), u.x < this.bbox.ll.x && (this.bbox.ll.x = u.x), u.y < this.bbox.ll.y && (this.bbox.ll.y = u.y), u.x > this.bbox.ur.x && (this.bbox.ur.x = u.x), u.y > this.bbox.ur.y && (this.bbox.ur.y = u.y), o = u);
3428
3430
  }
3429
- (r.x !== o.x || r.y !== o.y) && this.segments.push(be.fromRing(o, r, this));
3431
+ (r.x !== o.x || r.y !== o.y) && this.segments.push(pe.fromRing(o, r, this));
3430
3432
  }
3431
3433
  getSweepEvents() {
3432
3434
  const e = [];
@@ -3441,7 +3443,7 @@ class Ir {
3441
3443
  constructor(e, t) {
3442
3444
  if (!Array.isArray(e))
3443
3445
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3444
- this.exteriorRing = new pi(e[0], this, !0), this.bbox = {
3446
+ this.exteriorRing = new yi(e[0], this, !0), this.bbox = {
3445
3447
  ll: {
3446
3448
  x: this.exteriorRing.bbox.ll.x,
3447
3449
  y: this.exteriorRing.bbox.ll.y
@@ -3452,7 +3454,7 @@ class Ir {
3452
3454
  }
3453
3455
  }, this.interiorRings = [];
3454
3456
  for (let i = 1, r = e.length; i < r; i++) {
3455
- const o = new pi(e[i], this, !1);
3457
+ const o = new yi(e[i], this, !1);
3456
3458
  o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.interiorRings.push(o);
3457
3459
  }
3458
3460
  this.multiPoly = t;
@@ -3461,7 +3463,7 @@ class Ir {
3461
3463
  const e = this.exteriorRing.getSweepEvents();
3462
3464
  for (let t = 0, i = this.interiorRings.length; t < i; t++) {
3463
3465
  const r = this.interiorRings[t].getSweepEvents();
3464
- for (let o = 0, l = r.length; o < l; o++)
3466
+ for (let o = 0, a = r.length; o < a; o++)
3465
3467
  e.push(r[o]);
3466
3468
  }
3467
3469
  return e;
@@ -3495,13 +3497,13 @@ class vi {
3495
3497
  const e = [];
3496
3498
  for (let t = 0, i = this.polys.length; t < i; t++) {
3497
3499
  const r = this.polys[t].getSweepEvents();
3498
- for (let o = 0, l = r.length; o < l; o++)
3500
+ for (let o = 0, a = r.length; o < a; o++)
3499
3501
  e.push(r[o]);
3500
3502
  }
3501
3503
  return e;
3502
3504
  }
3503
3505
  }
3504
- class ut {
3506
+ class st {
3505
3507
  /* Given the segments from the sweep line pass, compute & return a series
3506
3508
  * of closed rings from all the segments marked to be part of the result */
3507
3509
  static factory(e) {
@@ -3509,39 +3511,39 @@ class ut {
3509
3511
  for (let i = 0, r = e.length; i < r; i++) {
3510
3512
  const o = e[i];
3511
3513
  if (!o.isInResult() || o.ringOut) continue;
3512
- let l = null, s = o.leftSE, c = o.rightSE;
3513
- const u = [s], d = s.point, a = [];
3514
- for (; l = s, s = c, u.push(s), s.point !== d; )
3514
+ let a = null, s = o.leftSE, u = o.rightSE;
3515
+ const l = [s], d = s.point, c = [];
3516
+ for (; a = s, s = u, l.push(s), s.point !== d; )
3515
3517
  for (; ; ) {
3516
3518
  const f = s.getAvailableLinkedEvents();
3517
3519
  if (f.length === 0) {
3518
- const b = u[0].point, p = u[u.length - 1].point;
3519
- throw new Error(`Unable to complete output ring starting at [${b.x}, ${b.y}]. Last matching segment found ends at [${p.x}, ${p.y}].`);
3520
+ const b = l[0].point, m = l[l.length - 1].point;
3521
+ throw new Error(`Unable to complete output ring starting at [${b.x}, ${b.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`);
3520
3522
  }
3521
3523
  if (f.length === 1) {
3522
- c = f[0].otherSE;
3524
+ u = f[0].otherSE;
3523
3525
  break;
3524
3526
  }
3525
3527
  let h = null;
3526
- for (let b = 0, p = a.length; b < p; b++)
3527
- if (a[b].point === s.point) {
3528
+ for (let b = 0, m = c.length; b < m; b++)
3529
+ if (c[b].point === s.point) {
3528
3530
  h = b;
3529
3531
  break;
3530
3532
  }
3531
3533
  if (h !== null) {
3532
- const b = a.splice(h)[0], p = u.splice(b.index);
3533
- p.unshift(p[0].otherSE), t.push(new ut(p.reverse()));
3534
+ const b = c.splice(h)[0], m = l.splice(b.index);
3535
+ m.unshift(m[0].otherSE), t.push(new st(m.reverse()));
3534
3536
  continue;
3535
3537
  }
3536
- a.push({
3537
- index: u.length,
3538
+ c.push({
3539
+ index: l.length,
3538
3540
  point: s.point
3539
3541
  });
3540
- const y = s.getLeftmostComparator(l);
3541
- c = f.sort(y)[0].otherSE;
3542
+ const p = s.getLeftmostComparator(a);
3543
+ u = f.sort(p)[0].otherSE;
3542
3544
  break;
3543
3545
  }
3544
- t.push(new ut(u));
3546
+ t.push(new st(l));
3545
3547
  }
3546
3548
  return t;
3547
3549
  }
@@ -3554,16 +3556,16 @@ class ut {
3554
3556
  getGeom() {
3555
3557
  let e = this.events[0].point;
3556
3558
  const t = [e];
3557
- for (let u = 1, d = this.events.length - 1; u < d; u++) {
3558
- const a = this.events[u].point, f = this.events[u + 1].point;
3559
- hi(a, e, f) !== 0 && (t.push(a), e = a);
3559
+ for (let l = 1, d = this.events.length - 1; l < d; l++) {
3560
+ const c = this.events[l].point, f = this.events[l + 1].point;
3561
+ hi(c, e, f) !== 0 && (t.push(c), e = c);
3560
3562
  }
3561
3563
  if (t.length === 1) return null;
3562
3564
  const i = t[0], r = t[1];
3563
3565
  hi(i, e, r) === 0 && t.shift(), t.push(t[0]);
3564
- const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
3565
- for (let u = l; u != s; u += o) c.push([t[u].x, t[u].y]);
3566
- return c;
3566
+ const o = this.isExteriorRing() ? 1 : -1, a = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, u = [];
3567
+ for (let l = a; l != s; l += o) u.push([t[l].x, t[l].y]);
3568
+ return u;
3567
3569
  }
3568
3570
  isExteriorRing() {
3569
3571
  if (this._isExteriorRing === void 0) {
@@ -3579,8 +3581,8 @@ class ut {
3579
3581
  _calcEnclosingRing() {
3580
3582
  let e = this.events[0];
3581
3583
  for (let r = 1, o = this.events.length; r < o; r++) {
3582
- const l = this.events[r];
3583
- re.compare(e, l) > 0 && (e = l);
3584
+ const a = this.events[r];
3585
+ ne.compare(e, a) > 0 && (e = a);
3584
3586
  }
3585
3587
  let t = e.segment.prevInResult(), i = t ? t.prevInResult() : null;
3586
3588
  for (; ; ) {
@@ -3592,7 +3594,7 @@ class ut {
3592
3594
  }
3593
3595
  }
3594
3596
  }
3595
- class yi {
3597
+ class pi {
3596
3598
  constructor(e) {
3597
3599
  this.exteriorRing = e, e.poly = this, this.interiorRings = [];
3598
3600
  }
@@ -3626,10 +3628,10 @@ class Or {
3626
3628
  for (let i = 0, r = e.length; i < r; i++) {
3627
3629
  const o = e[i];
3628
3630
  if (!o.poly)
3629
- if (o.isExteriorRing()) t.push(new yi(o));
3631
+ if (o.isExteriorRing()) t.push(new pi(o));
3630
3632
  else {
3631
- const l = o.enclosingRing();
3632
- l.poly || t.push(new yi(l)), l.poly.addInterior(o);
3633
+ const a = o.enclosingRing();
3634
+ a.poly || t.push(new pi(a)), a.poly.addInterior(o);
3633
3635
  }
3634
3636
  }
3635
3637
  return t;
@@ -3637,8 +3639,8 @@ class Or {
3637
3639
  }
3638
3640
  class Wr {
3639
3641
  constructor(e) {
3640
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.compare;
3641
- this.queue = e, this.tree = new Wt(t), this.segments = [];
3642
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : pe.compare;
3643
+ this.queue = e, this.tree = new Ot(t), this.segments = [];
3642
3644
  }
3643
3645
  process(e) {
3644
3646
  const t = e.segment, i = [];
@@ -3646,51 +3648,51 @@ class Wr {
3646
3648
  return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), i;
3647
3649
  const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
3648
3650
  if (!r) throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);
3649
- let o = r, l = r, s, c;
3651
+ let o = r, a = r, s, u;
3650
3652
  for (; s === void 0; )
3651
3653
  o = this.tree.prev(o), o === null ? s = null : o.key.consumedBy === void 0 && (s = o.key);
3652
- for (; c === void 0; )
3653
- l = this.tree.next(l), l === null ? c = null : l.key.consumedBy === void 0 && (c = l.key);
3654
+ for (; u === void 0; )
3655
+ a = this.tree.next(a), a === null ? u = null : a.key.consumedBy === void 0 && (u = a.key);
3654
3656
  if (e.isLeft) {
3655
- let u = null;
3657
+ let l = null;
3656
3658
  if (s) {
3657
- const a = s.getIntersection(t);
3658
- if (a !== null && (t.isAnEndpoint(a) || (u = a), !s.isAnEndpoint(a))) {
3659
- const f = this._splitSafely(s, a);
3660
- for (let h = 0, y = f.length; h < y; h++)
3659
+ const c = s.getIntersection(t);
3660
+ if (c !== null && (t.isAnEndpoint(c) || (l = c), !s.isAnEndpoint(c))) {
3661
+ const f = this._splitSafely(s, c);
3662
+ for (let h = 0, p = f.length; h < p; h++)
3661
3663
  i.push(f[h]);
3662
3664
  }
3663
3665
  }
3664
3666
  let d = null;
3665
- if (c) {
3666
- const a = c.getIntersection(t);
3667
- if (a !== null && (t.isAnEndpoint(a) || (d = a), !c.isAnEndpoint(a))) {
3668
- const f = this._splitSafely(c, a);
3669
- for (let h = 0, y = f.length; h < y; h++)
3667
+ if (u) {
3668
+ const c = u.getIntersection(t);
3669
+ if (c !== null && (t.isAnEndpoint(c) || (d = c), !u.isAnEndpoint(c))) {
3670
+ const f = this._splitSafely(u, c);
3671
+ for (let h = 0, p = f.length; h < p; h++)
3670
3672
  i.push(f[h]);
3671
3673
  }
3672
3674
  }
3673
- if (u !== null || d !== null) {
3674
- let a = null;
3675
- u === null ? a = d : d === null ? a = u : a = re.comparePoints(u, d) <= 0 ? u : d, this.queue.remove(t.rightSE), i.push(t.rightSE);
3676
- const f = t.split(a);
3677
- for (let h = 0, y = f.length; h < y; h++)
3675
+ if (l !== null || d !== null) {
3676
+ let c = null;
3677
+ l === null ? c = d : d === null ? c = l : c = ne.comparePoints(l, d) <= 0 ? l : d, this.queue.remove(t.rightSE), i.push(t.rightSE);
3678
+ const f = t.split(c);
3679
+ for (let h = 0, p = f.length; h < p; h++)
3678
3680
  i.push(f[h]);
3679
3681
  }
3680
3682
  i.length > 0 ? (this.tree.remove(t), i.push(e)) : (this.segments.push(t), t.prev = s);
3681
3683
  } else {
3682
- if (s && c) {
3683
- const u = s.getIntersection(c);
3684
- if (u !== null) {
3685
- if (!s.isAnEndpoint(u)) {
3686
- const d = this._splitSafely(s, u);
3687
- for (let a = 0, f = d.length; a < f; a++)
3688
- i.push(d[a]);
3684
+ if (s && u) {
3685
+ const l = s.getIntersection(u);
3686
+ if (l !== null) {
3687
+ if (!s.isAnEndpoint(l)) {
3688
+ const d = this._splitSafely(s, l);
3689
+ for (let c = 0, f = d.length; c < f; c++)
3690
+ i.push(d[c]);
3689
3691
  }
3690
- if (!c.isAnEndpoint(u)) {
3691
- const d = this._splitSafely(c, u);
3692
- for (let a = 0, f = d.length; a < f; a++)
3693
- i.push(d[a]);
3692
+ if (!u.isAnEndpoint(l)) {
3693
+ const d = this._splitSafely(u, l);
3694
+ for (let c = 0, f = d.length; c < f; c++)
3695
+ i.push(d[c]);
3694
3696
  }
3695
3697
  }
3696
3698
  }
@@ -3711,154 +3713,154 @@ class Wr {
3711
3713
  const bi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Ar = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
3712
3714
  class Br {
3713
3715
  run(e, t, i) {
3714
- le.type = e, Ge.reset();
3716
+ se.type = e, Ze.reset();
3715
3717
  const r = [new vi(t, !0)];
3716
- for (let a = 0, f = i.length; a < f; a++)
3717
- r.push(new vi(i[a], !1));
3718
- if (le.numMultiPolys = r.length, le.type === "difference") {
3719
- const a = r[0];
3718
+ for (let c = 0, f = i.length; c < f; c++)
3719
+ r.push(new vi(i[c], !1));
3720
+ if (se.numMultiPolys = r.length, se.type === "difference") {
3721
+ const c = r[0];
3720
3722
  let f = 1;
3721
3723
  for (; f < r.length; )
3722
- Rt(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
3724
+ Pt(r[f].bbox, c.bbox) !== null ? f++ : r.splice(f, 1);
3723
3725
  }
3724
- if (le.type === "intersection")
3725
- for (let a = 0, f = r.length; a < f; a++) {
3726
- const h = r[a];
3727
- for (let y = a + 1, b = r.length; y < b; y++)
3728
- if (Rt(h.bbox, r[y].bbox) === null) return [];
3726
+ if (se.type === "intersection")
3727
+ for (let c = 0, f = r.length; c < f; c++) {
3728
+ const h = r[c];
3729
+ for (let p = c + 1, b = r.length; p < b; p++)
3730
+ if (Pt(h.bbox, r[p].bbox) === null) return [];
3729
3731
  }
3730
- const o = new Wt(re.compare);
3731
- for (let a = 0, f = r.length; a < f; a++) {
3732
- const h = r[a].getSweepEvents();
3733
- for (let y = 0, b = h.length; y < b; y++)
3734
- if (o.insert(h[y]), o.size > bi)
3732
+ const o = new Ot(ne.compare);
3733
+ for (let c = 0, f = r.length; c < f; c++) {
3734
+ const h = r[c].getSweepEvents();
3735
+ for (let p = 0, b = h.length; p < b; p++)
3736
+ if (o.insert(h[p]), o.size > bi)
3735
3737
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
3736
3738
  }
3737
- const l = new Wr(o);
3738
- let s = o.size, c = o.pop();
3739
- for (; c; ) {
3740
- const a = c.key;
3739
+ const a = new Wr(o);
3740
+ let s = o.size, u = o.pop();
3741
+ for (; u; ) {
3742
+ const c = u.key;
3741
3743
  if (o.size === s) {
3742
- const h = a.segment;
3743
- throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
3744
+ const h = c.segment;
3745
+ throw new Error(`Unable to pop() ${c.isLeft ? "left" : "right"} SweepEvent [${c.point.x}, ${c.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
3744
3746
  }
3745
3747
  if (o.size > bi)
3746
3748
  throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
3747
- if (l.segments.length > Ar)
3749
+ if (a.segments.length > Ar)
3748
3750
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
3749
- const f = l.process(a);
3750
- for (let h = 0, y = f.length; h < y; h++) {
3751
+ const f = a.process(c);
3752
+ for (let h = 0, p = f.length; h < p; h++) {
3751
3753
  const b = f[h];
3752
3754
  b.consumedBy === void 0 && o.insert(b);
3753
3755
  }
3754
- s = o.size, c = o.pop();
3756
+ s = o.size, u = o.pop();
3755
3757
  }
3756
- Ge.reset();
3757
- const u = ut.factory(l.segments);
3758
- return new Or(u).getGeom();
3758
+ Ze.reset();
3759
+ const l = st.factory(a.segments);
3760
+ return new Or(l).getGeom();
3759
3761
  }
3760
3762
  }
3761
- const le = new Br(), Dr = function(n) {
3763
+ const se = new Br(), Dr = function(n) {
3762
3764
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3763
3765
  t[i - 1] = arguments[i];
3764
- return le.run("union", n, t);
3766
+ return se.run("union", n, t);
3765
3767
  }, Ur = function(n) {
3766
3768
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3767
3769
  t[i - 1] = arguments[i];
3768
- return le.run("intersection", n, t);
3770
+ return se.run("intersection", n, t);
3769
3771
  }, zr = function(n) {
3770
3772
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3771
3773
  t[i - 1] = arguments[i];
3772
- return le.run("xor", n, t);
3773
- }, Fr = function(n) {
3774
+ return se.run("xor", n, t);
3775
+ }, Gr = function(n) {
3774
3776
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3775
3777
  t[i - 1] = arguments[i];
3776
- return le.run("difference", n, t);
3778
+ return se.run("difference", n, t);
3777
3779
  };
3778
- var Ri = {
3780
+ var Ii = {
3779
3781
  union: Dr,
3780
3782
  intersection: Ur,
3781
3783
  xor: zr,
3782
- difference: Fr
3784
+ difference: Gr
3783
3785
  };
3784
- function Ii(n, e, t) {
3786
+ function Oi(n, e, t) {
3785
3787
  if (n !== null)
3786
- for (var i, r, o, l, s, c, u, d = 0, a = 0, f, h = n.type, y = h === "FeatureCollection", b = h === "Feature", p = y ? n.features.length : 1, m = 0; m < p; m++) {
3787
- u = y ? n.features[m].geometry : b ? n.geometry : n, f = u ? u.type === "GeometryCollection" : !1, s = f ? u.geometries.length : 1;
3788
- for (var E = 0; E < s; E++) {
3789
- var S = 0, _ = 0;
3790
- if (l = f ? u.geometries[E] : u, l !== null) {
3791
- c = l.coordinates;
3792
- var k = l.type;
3793
- switch (d = 0, k) {
3788
+ for (var i, r, o, a, s, u, l, d = 0, c = 0, f, h = n.type, p = h === "FeatureCollection", b = h === "Feature", m = p ? n.features.length : 1, y = 0; y < m; y++) {
3789
+ l = p ? n.features[y].geometry : b ? n.geometry : n, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
3790
+ for (var _ = 0; _ < s; _++) {
3791
+ var L = 0, E = 0;
3792
+ if (a = f ? l.geometries[_] : l, a !== null) {
3793
+ u = a.coordinates;
3794
+ var C = a.type;
3795
+ switch (d = 0, C) {
3794
3796
  case null:
3795
3797
  break;
3796
3798
  case "Point":
3797
3799
  if (e(
3800
+ u,
3798
3801
  c,
3799
- a,
3800
- m,
3801
- S,
3802
- _
3802
+ y,
3803
+ L,
3804
+ E
3803
3805
  ) === !1)
3804
3806
  return !1;
3805
- a++, S++;
3807
+ c++, L++;
3806
3808
  break;
3807
3809
  case "LineString":
3808
3810
  case "MultiPoint":
3809
- for (i = 0; i < c.length; i++) {
3811
+ for (i = 0; i < u.length; i++) {
3810
3812
  if (e(
3811
- c[i],
3812
- a,
3813
- m,
3814
- S,
3815
- _
3813
+ u[i],
3814
+ c,
3815
+ y,
3816
+ L,
3817
+ E
3816
3818
  ) === !1)
3817
3819
  return !1;
3818
- a++, k === "MultiPoint" && S++;
3820
+ c++, C === "MultiPoint" && L++;
3819
3821
  }
3820
- k === "LineString" && S++;
3822
+ C === "LineString" && L++;
3821
3823
  break;
3822
3824
  case "Polygon":
3823
3825
  case "MultiLineString":
3824
- for (i = 0; i < c.length; i++) {
3825
- for (r = 0; r < c[i].length - d; r++) {
3826
+ for (i = 0; i < u.length; i++) {
3827
+ for (r = 0; r < u[i].length - d; r++) {
3826
3828
  if (e(
3827
- c[i][r],
3828
- a,
3829
- m,
3830
- S,
3831
- _
3829
+ u[i][r],
3830
+ c,
3831
+ y,
3832
+ L,
3833
+ E
3832
3834
  ) === !1)
3833
3835
  return !1;
3834
- a++;
3836
+ c++;
3835
3837
  }
3836
- k === "MultiLineString" && S++, k === "Polygon" && _++;
3838
+ C === "MultiLineString" && L++, C === "Polygon" && E++;
3837
3839
  }
3838
- k === "Polygon" && S++;
3840
+ C === "Polygon" && L++;
3839
3841
  break;
3840
3842
  case "MultiPolygon":
3841
- for (i = 0; i < c.length; i++) {
3842
- for (_ = 0, r = 0; r < c[i].length; r++) {
3843
- for (o = 0; o < c[i][r].length - d; o++) {
3843
+ for (i = 0; i < u.length; i++) {
3844
+ for (E = 0, r = 0; r < u[i].length; r++) {
3845
+ for (o = 0; o < u[i][r].length - d; o++) {
3844
3846
  if (e(
3845
- c[i][r][o],
3846
- a,
3847
- m,
3848
- S,
3849
- _
3847
+ u[i][r][o],
3848
+ c,
3849
+ y,
3850
+ L,
3851
+ E
3850
3852
  ) === !1)
3851
3853
  return !1;
3852
- a++;
3854
+ c++;
3853
3855
  }
3854
- _++;
3856
+ E++;
3855
3857
  }
3856
- S++;
3858
+ L++;
3857
3859
  }
3858
3860
  break;
3859
3861
  case "GeometryCollection":
3860
- for (i = 0; i < l.geometries.length; i++)
3861
- if (Ii(l.geometries[i], e) === !1)
3862
+ for (i = 0; i < a.geometries.length; i++)
3863
+ if (Oi(a.geometries[i], e) === !1)
3862
3864
  return !1;
3863
3865
  break;
3864
3866
  default:
@@ -3868,17 +3870,17 @@ function Ii(n, e, t) {
3868
3870
  }
3869
3871
  }
3870
3872
  }
3871
- function At(n, e) {
3872
- var t, i, r, o, l, s, c, u, d, a, f = 0, h = n.type === "FeatureCollection", y = n.type === "Feature", b = h ? n.features.length : 1;
3873
+ function Wt(n, e) {
3874
+ var t, i, r, o, a, s, u, l, d, c, f = 0, h = n.type === "FeatureCollection", p = n.type === "Feature", b = h ? n.features.length : 1;
3873
3875
  for (t = 0; t < b; t++) {
3874
- for (s = h ? n.features[t].geometry : y ? n.geometry : n, u = h ? n.features[t].properties : y ? n.properties : {}, d = h ? n.features[t].bbox : y ? n.bbox : void 0, a = h ? n.features[t].id : y ? n.id : void 0, c = s ? s.type === "GeometryCollection" : !1, l = c ? s.geometries.length : 1, r = 0; r < l; r++) {
3875
- if (o = c ? s.geometries[r] : s, o === null) {
3876
+ for (s = h ? n.features[t].geometry : p ? n.geometry : n, l = h ? n.features[t].properties : p ? n.properties : {}, d = h ? n.features[t].bbox : p ? n.bbox : void 0, c = h ? n.features[t].id : p ? n.id : void 0, u = s ? s.type === "GeometryCollection" : !1, a = u ? s.geometries.length : 1, r = 0; r < a; r++) {
3877
+ if (o = u ? s.geometries[r] : s, o === null) {
3876
3878
  if (e(
3877
3879
  null,
3878
3880
  f,
3879
- u,
3881
+ l,
3880
3882
  d,
3881
- a
3883
+ c
3882
3884
  ) === !1)
3883
3885
  return !1;
3884
3886
  continue;
@@ -3893,9 +3895,9 @@ function At(n, e) {
3893
3895
  if (e(
3894
3896
  o,
3895
3897
  f,
3896
- u,
3898
+ l,
3897
3899
  d,
3898
- a
3900
+ c
3899
3901
  ) === !1)
3900
3902
  return !1;
3901
3903
  break;
@@ -3905,9 +3907,9 @@ function At(n, e) {
3905
3907
  if (e(
3906
3908
  o.geometries[i],
3907
3909
  f,
3908
- u,
3910
+ l,
3909
3911
  d,
3910
- a
3912
+ c
3911
3913
  ) === !1)
3912
3914
  return !1;
3913
3915
  break;
@@ -3919,8 +3921,8 @@ function At(n, e) {
3919
3921
  f++;
3920
3922
  }
3921
3923
  }
3922
- function jr(n, e) {
3923
- At(n, function(t, i, r, o, l) {
3924
+ function Fr(n, e) {
3925
+ Wt(n, function(t, i, r, o, a) {
3924
3926
  var s = t === null ? null : t.type;
3925
3927
  switch (s) {
3926
3928
  case null:
@@ -3928,75 +3930,75 @@ function jr(n, e) {
3928
3930
  case "LineString":
3929
3931
  case "Polygon":
3930
3932
  return e(
3931
- Ze(t, r, { bbox: o, id: l }),
3933
+ Fe(t, r, { bbox: o, id: a }),
3932
3934
  i,
3933
3935
  0
3934
3936
  ) === !1 ? !1 : void 0;
3935
3937
  }
3936
- var c;
3938
+ var u;
3937
3939
  switch (s) {
3938
3940
  case "MultiPoint":
3939
- c = "Point";
3941
+ u = "Point";
3940
3942
  break;
3941
3943
  case "MultiLineString":
3942
- c = "LineString";
3944
+ u = "LineString";
3943
3945
  break;
3944
3946
  case "MultiPolygon":
3945
- c = "Polygon";
3947
+ u = "Polygon";
3946
3948
  break;
3947
3949
  }
3948
- for (var u = 0; u < t.coordinates.length; u++) {
3949
- var d = t.coordinates[u], a = {
3950
- type: c,
3950
+ for (var l = 0; l < t.coordinates.length; l++) {
3951
+ var d = t.coordinates[l], c = {
3952
+ type: u,
3951
3953
  coordinates: d
3952
3954
  };
3953
- if (e(Ze(a, r), i, u) === !1)
3955
+ if (e(Fe(c, r), i, l) === !1)
3954
3956
  return !1;
3955
3957
  }
3956
3958
  });
3957
3959
  }
3958
- function Zr(n, e = {}) {
3960
+ function jr(n, e = {}) {
3959
3961
  const t = [];
3960
- if (At(n, (r) => {
3962
+ if (Wt(n, (r) => {
3961
3963
  t.push(r.coordinates);
3962
3964
  }), t.length < 2)
3963
3965
  throw new Error("Must have at least 2 geometries");
3964
- const i = Ri.union(t[0], ...t.slice(1));
3965
- return i.length === 0 ? null : i.length === 1 ? Ot(i[0], e.properties) : Ti(i, e.properties);
3966
+ const i = Ii.union(t[0], ...t.slice(1));
3967
+ return i.length === 0 ? null : i.length === 1 ? It(i[0], e.properties) : Pi(i, e.properties);
3966
3968
  }
3967
- var Oi = Zr;
3968
- function qr(n, e = {}) {
3969
+ var Wi = jr;
3970
+ function Zr(n, e = {}) {
3969
3971
  if (n.bbox != null && e.recompute !== !0)
3970
3972
  return n.bbox;
3971
3973
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
3972
- return Ii(n, (i) => {
3974
+ return Oi(n, (i) => {
3973
3975
  t[0] > i[0] && (t[0] = i[0]), t[1] > i[1] && (t[1] = i[1]), t[2] < i[0] && (t[2] = i[0]), t[3] < i[1] && (t[3] = i[1]);
3974
3976
  }), t;
3975
3977
  }
3976
- var wi = qr;
3977
- function Gr(n) {
3978
+ var wi = Zr;
3979
+ function qr(n) {
3978
3980
  const e = [];
3979
- if (At(n, (r) => {
3981
+ if (Wt(n, (r) => {
3980
3982
  e.push(r.coordinates);
3981
3983
  }), e.length < 2)
3982
3984
  throw new Error("Must have at least two features");
3983
- const t = n.features[0].properties || {}, i = Ri.difference(e[0], ...e.slice(1));
3984
- return i.length === 0 ? null : i.length === 1 ? Ot(i[0], t) : Ti(i, t);
3985
+ const t = n.features[0].properties || {}, i = Ii.difference(e[0], ...e.slice(1));
3986
+ return i.length === 0 ? null : i.length === 1 ? It(i[0], t) : Pi(i, t);
3985
3987
  }
3986
- var Qr = Gr;
3988
+ var Qr = qr;
3987
3989
  function Hr(n) {
3988
3990
  if (!n)
3989
3991
  throw new Error("geojson is required");
3990
3992
  var e = [];
3991
- return jr(n, function(t) {
3993
+ return Fr(n, function(t) {
3992
3994
  e.push(t);
3993
- }), qe(e);
3995
+ }), je(e);
3994
3996
  }
3995
3997
  var Vr = Hr;
3996
3998
  function _i(n, e) {
3997
3999
  const t = Qr(
3998
- qe([
3999
- Ot([
4000
+ je([
4001
+ It([
4000
4002
  [
4001
4003
  [180, 90],
4002
4004
  [-180, 90],
@@ -4011,28 +4013,27 @@ function _i(n, e) {
4011
4013
  if (!t)
4012
4014
  return;
4013
4015
  t.properties = { isMask: !0 };
4014
- const i = st(wi(n)), r = (i[2] - i[0]) / 360 / 1e3, o = i[0] < -180, l = i[2] > 180, s = Vr(n);
4015
- if (s.features.length > 1 && (o || l))
4016
- for (const c of s.features) {
4017
- const u = st(wi(c));
4018
- if (l && u[0] < -180 + r)
4019
- for (const d of c.geometry.coordinates)
4020
- for (const a of d)
4021
- a[0] += 360 - r;
4022
- if (o && u[2] > 180 - r)
4023
- for (const d of c.geometry.coordinates)
4024
- for (const a of d)
4025
- a[0] -= 360 - r;
4016
+ const i = rt(wi(n)), r = (i[2] - i[0]) / 360 / 1e3, o = i[0] < -180, a = i[2] > 180, s = Vr(n);
4017
+ if (s.features.length > 1 && (o || a))
4018
+ for (const u of s.features) {
4019
+ const l = rt(wi(u));
4020
+ if (a && l[0] < -180 + r)
4021
+ for (const d of u.geometry.coordinates)
4022
+ for (const c of d)
4023
+ c[0] += 360 - r;
4024
+ if (o && l[2] > 180 - r)
4025
+ for (const d of u.geometry.coordinates)
4026
+ for (const c of d)
4027
+ c[0] -= 360 - r;
4026
4028
  }
4027
4029
  e(
4028
- qe([
4029
- s.features.length < 2 ? n : Oi(s) ?? n,
4030
+ je([
4031
+ s.features.length < 2 ? n : Wi(s) ?? n,
4030
4032
  t
4031
4033
  ])
4032
4034
  );
4033
4035
  }
4034
- const Ei = qe([]);
4035
- function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
4036
+ const Ei = je([]), Li = {
4036
4037
  fill: {
4037
4038
  paint: {
4038
4039
  "fill-color": "#000",
@@ -4051,262 +4052,275 @@ function Yr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
4051
4052
  },
4052
4053
  filter: ["!", ["has", "isMask"]]
4053
4054
  }
4054
- }) {
4055
+ };
4056
+ function Yr(n, e, t = !0, i = !0, r = {}, o = {}, a = Li) {
4055
4057
  let s;
4056
- const c = [];
4057
- let u, d, a;
4058
+ const u = [];
4059
+ let l, d, c;
4058
4060
  function f() {
4059
- !n.getSource("full-geom") && (l != null && l.fill || l != null && l.line) && n.addSource("full-geom", {
4061
+ const m = a ? a === !0 ? Li : a : void 0;
4062
+ !n.getSource("full-geom") && (m != null && m.fill || m != null && m.line) && n.addSource("full-geom", {
4060
4063
  type: "geojson",
4061
4064
  data: Ei
4062
- }), !n.getLayer("full-geom-fill") && (l != null && l.fill) && n.addLayer({
4063
- ...l == null ? void 0 : l.fill,
4065
+ }), !n.getLayer("full-geom-fill") && (m != null && m.fill) && n.addLayer({
4066
+ ...m == null ? void 0 : m.fill,
4064
4067
  id: "full-geom-fill",
4065
4068
  type: "fill",
4066
4069
  source: "full-geom"
4067
- }), !n.getLayer("full-geom-line") && (l != null && l.line) && n.addLayer({
4068
- ...l == null ? void 0 : l.line,
4070
+ }), !n.getLayer("full-geom-line") && (m != null && m.line) && n.addLayer({
4071
+ ...m == null ? void 0 : m.line,
4069
4072
  id: "full-geom-line",
4070
4073
  type: "line",
4071
4074
  source: "full-geom"
4072
- }), a && b(a);
4075
+ }), c && b(c);
4073
4076
  }
4074
4077
  n.loaded() ? f() : n.once("load", () => {
4075
4078
  f();
4076
4079
  }), n.on("styledata", () => {
4077
4080
  f();
4078
4081
  });
4079
- const h = (p) => {
4082
+ const h = (m) => {
4080
4083
  s == null || s({
4081
4084
  type: "mapClick",
4082
- coordinates: [p.lngLat.lng, p.lngLat.lat]
4085
+ coordinates: [m.lngLat.lng, m.lngLat.lat]
4083
4086
  });
4084
4087
  };
4085
- function y(p = !1) {
4088
+ function p(m = !1) {
4086
4089
  if (!e)
4087
4090
  throw new Error();
4088
- const m = document.createElement("div");
4089
- return p && m.classList.add("marker-interactive"), new Zn({
4091
+ const y = document.createElement("div");
4092
+ return m && y.classList.add("marker-interactive"), new jn({
4090
4093
  props: { displayIn: "maplibre" },
4091
- target: m
4092
- }), new e.Marker({ element: m, offset: [1, -13] });
4094
+ target: y
4095
+ }), new e.Marker({ element: y, offset: [1, -13] });
4093
4096
  }
4094
- function b(p) {
4095
- var m;
4096
- a = p, p && ((m = n.getSource("full-geom")) == null || m.setData(p));
4097
+ function b(m) {
4098
+ var y;
4099
+ c = m, m && ((y = n.getSource("full-geom")) == null || y.setData(m));
4097
4100
  }
4098
4101
  return {
4099
- setEventHandler(p) {
4100
- p ? (s = p, n.on("click", h)) : (s = void 0, n.off("click", h));
4102
+ setEventHandler(m) {
4103
+ m ? (s = m, n.on("click", h)) : (s = void 0, n.off("click", h));
4101
4104
  },
4102
- flyTo(p, m) {
4103
- n.flyTo({ center: p, ...m ? { zoom: m } : {}, ...r });
4105
+ flyTo(m, y) {
4106
+ n.flyTo({ center: m, ...y ? { zoom: y } : {}, ...r });
4104
4107
  },
4105
- fitBounds(p, m, E) {
4108
+ fitBounds(m, y, _) {
4106
4109
  n.fitBounds(
4107
4110
  [
4108
- [p[0], p[1]],
4109
- [p[2], p[3]]
4111
+ [m[0], m[1]],
4112
+ [m[2], m[3]]
4110
4113
  ],
4111
- { padding: m, ...E ? { maxZoom: E } : {}, ...o }
4114
+ { padding: y, ..._ ? { maxZoom: _ } : {}, ...o }
4112
4115
  );
4113
4116
  },
4114
- indicateReverse(p) {
4115
- n.getCanvasContainer().style.cursor = p ? "crosshair" : "";
4117
+ indicateReverse(m) {
4118
+ n.getCanvasContainer().style.cursor = m ? "crosshair" : "";
4116
4119
  },
4117
- setReverseMarker(p) {
4118
- !e || !t || (d ? p ? d.setLngLat(p) : (d.remove(), d = void 0) : p && (d = (typeof t == "object" ? new e.Marker(t) : y()).setLngLat(p).addTo(n), d.getElement().classList.add("marker-reverse")));
4120
+ setReverseMarker(m) {
4121
+ !e || !t || (d ? m ? d.setLngLat(m) : (d.remove(), d = void 0) : m && (t instanceof Function ? d = t(n) ?? void 0 : (d = (typeof t == "object" ? new e.Marker(t) : p()).setLngLat(m).addTo(n), d.getElement().classList.add("marker-reverse"))));
4119
4122
  },
4120
- setMarkers(p, m) {
4121
- if (t) {
4122
- for (const E of c)
4123
- E.remove();
4124
- if (c.length = 0, b(Ei), !!e) {
4125
- if (m) {
4126
- let E = !1;
4127
- if (m.geometry.type === "GeometryCollection") {
4128
- const S = m.geometry.geometries.filter(
4129
- (_) => _.type === "Polygon" || _.type === "MultiPolygon"
4123
+ setMarkers(m, y) {
4124
+ for (const _ of u)
4125
+ _.remove();
4126
+ if (u.length = 0, b(Ei), !!e) {
4127
+ if (y) {
4128
+ let _ = !1;
4129
+ if (y.geometry.type === "GeometryCollection") {
4130
+ const L = y.geometry.geometries.filter(
4131
+ (E) => E.type === "Polygon" || E.type === "MultiPolygon"
4132
+ );
4133
+ e: if (L.length > 0) {
4134
+ const E = Wi(
4135
+ je(L.map((C) => Fe(C)))
4130
4136
  );
4131
- e: if (S.length > 0) {
4132
- const _ = Oi(
4133
- qe(S.map((k) => Ze(k)))
4134
- );
4135
- if (!_)
4136
- break e;
4137
- _i(
4138
- {
4139
- ...m,
4140
- geometry: _.geometry
4141
- },
4142
- b
4143
- ), E = !0;
4144
- } else {
4145
- const _ = m.geometry.geometries.filter(
4146
- (k) => k.type === "LineString" || k.type === "MultiLineString"
4147
- );
4148
- _.length > 0 && (b({
4149
- ...m,
4150
- geometry: { type: "GeometryCollection", geometries: _ }
4151
- }), E = !0);
4152
- }
4137
+ if (!E)
4138
+ break e;
4139
+ _i(
4140
+ {
4141
+ ...y,
4142
+ geometry: E.geometry
4143
+ },
4144
+ b
4145
+ ), _ = !0;
4146
+ } else {
4147
+ const E = y.geometry.geometries.filter(
4148
+ (C) => C.type === "LineString" || C.type === "MultiLineString"
4149
+ );
4150
+ E.length > 0 && (b({
4151
+ ...y,
4152
+ geometry: { type: "GeometryCollection", geometries: E }
4153
+ }), _ = !0);
4153
4154
  }
4154
- if (!E) {
4155
- if (m.geometry.type === "Polygon" || m.geometry.type === "MultiPolygon")
4156
- _i(m, b);
4157
- else if (m.geometry.type === "LineString" || m.geometry.type === "MultiLineString") {
4158
- b(m);
4159
- return;
4160
- }
4155
+ }
4156
+ if (!_) {
4157
+ if (y.geometry.type === "Polygon" || y.geometry.type === "MultiPolygon")
4158
+ _i(y, b);
4159
+ else if (y.geometry.type === "LineString" || y.geometry.type === "MultiLineString") {
4160
+ b(y);
4161
+ return;
4161
4162
  }
4162
- t && c.push(
4163
- (typeof t == "object" ? new e.Marker(t) : y()).setLngLat(m.center).addTo(n)
4164
- );
4165
4163
  }
4166
- if (i)
4167
- for (const E of p ?? []) {
4168
- if (E === m)
4164
+ if (t instanceof Function) {
4165
+ const L = t(n, y);
4166
+ L && u.push(L);
4167
+ } else t && u.push(
4168
+ typeof t == "object" ? new e.Marker(t) : p().setLngLat(y.center).addTo(n)
4169
+ );
4170
+ }
4171
+ if (i)
4172
+ for (const _ of m ?? []) {
4173
+ if (_ === y)
4174
+ continue;
4175
+ let L;
4176
+ if (i instanceof Function) {
4177
+ if (L = i(n, _), !L)
4169
4178
  continue;
4170
- const S = (typeof i == "object" ? new e.Marker(i) : y(!0)).setLngLat(E.center).setPopup(
4179
+ } else
4180
+ L = (typeof i == "object" ? new e.Marker(i) : p(!0)).setLngLat(_.center).setPopup(
4171
4181
  new e.Popup({
4172
4182
  offset: [1, -27],
4173
4183
  closeButton: !1,
4174
4184
  closeOnMove: !0,
4175
4185
  className: "maptiler-gc-popup"
4176
4186
  }).setText(
4177
- E.place_type[0] === "reverse" ? E.place_name : E.place_name.replace(/,.*/, "")
4187
+ _.place_type[0] === "reverse" ? _.place_name : _.place_name.replace(/,.*/, "")
4178
4188
  )
4179
- ).addTo(n), _ = S.getElement();
4180
- _.addEventListener("click", (k) => {
4181
- k.stopPropagation(), s == null || s({ type: "markerClick", id: E.id });
4182
- }), _.addEventListener("mouseenter", () => {
4183
- s == null || s({ type: "markerMouseEnter", id: E.id }), S.togglePopup();
4184
- }), _.addEventListener("mouseleave", () => {
4185
- s == null || s({ type: "markerMouseLeave", id: E.id }), S.togglePopup();
4186
- }), c.push(S);
4187
- }
4188
- }
4189
+ ).addTo(n);
4190
+ const E = L.getElement();
4191
+ E.addEventListener("click", (C) => {
4192
+ C.stopPropagation(), s == null || s({ type: "markerClick", id: _.id });
4193
+ }), E.addEventListener("mouseenter", () => {
4194
+ s == null || s({ type: "markerMouseEnter", id: _.id }), L.togglePopup();
4195
+ }), E.addEventListener("mouseleave", () => {
4196
+ s == null || s({ type: "markerMouseLeave", id: _.id }), L.togglePopup();
4197
+ }), u.push(L);
4198
+ }
4189
4199
  }
4190
4200
  },
4191
- setSelectedMarker(p) {
4192
- u && u.getElement().classList.toggle("marker-selected", !1), u = p > -1 ? c[p] : void 0, u == null || u.getElement().classList.toggle("marker-selected", !0);
4201
+ setSelectedMarker(m) {
4202
+ l && l.getElement().classList.toggle("marker-selected", !1), l = m > -1 ? u[m] : void 0, l == null || l.getElement().classList.toggle("marker-selected", !0);
4193
4203
  },
4194
4204
  getCenterAndZoom() {
4195
- const p = n.getCenter();
4196
- return [n.getZoom(), p.lng, p.lat];
4205
+ const m = n.getCenter();
4206
+ return [n.getZoom(), m.lng, m.lat];
4197
4207
  }
4198
4208
  };
4199
4209
  }
4200
- var te, Ce;
4201
- class Kr extends EventTarget {
4202
- constructor(t = {}) {
4203
- super();
4204
- _t(this, te);
4205
- _t(this, Ce);
4206
- et(this, Ce, t);
4207
- }
4208
- onAddInt(t) {
4209
- const i = document.createElement("div");
4210
- i.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
4211
- const {
4212
- marker: r,
4213
- showResultMarkers: o,
4214
- flyTo: l,
4215
- fullGeometryStyle: s,
4216
- ...c
4217
- } = ne(this, Ce), u = typeof l == "boolean" ? {} : l, d = this.getExtraProps(t, i), f = {
4218
- mapController: Yr(
4219
- t,
4220
- this.getMapLibreGl(),
4221
- r,
4222
- o,
4223
- u,
4224
- u,
4225
- s
4226
- ),
4227
- flyTo: l === void 0 ? !0 : !!l,
4228
- apiKey: "",
4229
- // just to satisfy apiKey; TODO find a better solution
4230
- ...d,
4231
- ...c
4232
- };
4233
- if (!f.apiKey)
4234
- throw new Error("no apiKey provided");
4235
- et(this, te, new hr({ target: i, props: f }));
4236
- for (const h of [
4237
- "select",
4238
- "pick",
4239
- "featuresListed",
4240
- "featuresMarked",
4241
- "response",
4242
- "optionsVisibilityChange",
4243
- "reverseToggle",
4244
- "queryChange"
4245
- ])
4246
- ne(this, te).$on(h, (y) => this.dispatchEvent(y));
4247
- return i;
4248
- }
4249
- setOptions(t) {
4250
- var c;
4251
- et(this, Ce, t);
4252
- const {
4253
- marker: i,
4254
- showResultMarkers: r,
4255
- flyTo: o,
4256
- fullGeometryStyle: l,
4257
- ...s
4258
- } = ne(this, Ce);
4259
- (c = ne(this, te)) == null || c.$set(s);
4260
- }
4261
- setQuery(t, i = !0) {
4262
- var r;
4263
- (r = ne(this, te)) == null || r.setQuery(t, i);
4264
- }
4265
- clearMap() {
4266
- var t;
4267
- (t = ne(this, te)) == null || t.clearMap();
4268
- }
4269
- clearList() {
4270
- var t;
4271
- (t = ne(this, te)) == null || t.clearList();
4272
- }
4273
- setReverseMode(t) {
4274
- var i;
4275
- (i = ne(this, te)) == null || i.$set({ reverseActive: t });
4276
- }
4277
- focus() {
4278
- var t;
4279
- (t = ne(this, te)) == null || t.focus();
4280
- }
4281
- blur() {
4282
- var t;
4283
- (t = ne(this, te)) == null || t.blur();
4284
- }
4285
- onRemove() {
4286
- var t;
4287
- (t = ne(this, te)) == null || t.$destroy();
4288
- }
4289
- }
4290
- te = new WeakMap(), Ce = new WeakMap();
4291
- class $r extends Kr {
4292
- getMapLibreGl() {
4293
- return on;
4210
+ function Kr(n, e, t) {
4211
+ var i, r, o;
4212
+ return o = class extends n {
4213
+ constructor(u = {}) {
4214
+ super();
4215
+ wt(this, i);
4216
+ wt(this, r);
4217
+ Je(this, r, u);
4218
+ }
4219
+ onAddInt(u) {
4220
+ const l = document.createElement("div");
4221
+ l.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
4222
+ const {
4223
+ marker: d,
4224
+ showResultMarkers: c,
4225
+ flyTo: f,
4226
+ fullGeometryStyle: h,
4227
+ ...p
4228
+ } = ie(this, r), b = typeof f == "boolean" ? {} : f, y = {
4229
+ mapController: Yr(
4230
+ u,
4231
+ e,
4232
+ d,
4233
+ c,
4234
+ b,
4235
+ b,
4236
+ h
4237
+ ),
4238
+ flyTo: f === void 0 ? !0 : !!f,
4239
+ apiKey: "",
4240
+ // just to satisfy apiKey; TODO find a better solution
4241
+ ...t == null ? void 0 : t(u, l),
4242
+ ...p
4243
+ };
4244
+ if (!y.apiKey)
4245
+ throw new Error("no apiKey provided");
4246
+ Je(this, i, new hr({ target: l, props: y }));
4247
+ for (const _ of [
4248
+ "select",
4249
+ "pick",
4250
+ "featuresListed",
4251
+ "featuresMarked",
4252
+ "response",
4253
+ "optionsVisibilityChange",
4254
+ "reverseToggle",
4255
+ "queryChange"
4256
+ ])
4257
+ ie(this, i).$on(_, (L) => {
4258
+ this.fire(_, L.detail);
4259
+ });
4260
+ return l;
4261
+ }
4262
+ setOptions(u) {
4263
+ var p;
4264
+ Je(this, r, u);
4265
+ const {
4266
+ marker: l,
4267
+ showResultMarkers: d,
4268
+ flyTo: c,
4269
+ fullGeometryStyle: f,
4270
+ ...h
4271
+ } = ie(this, r);
4272
+ (p = ie(this, i)) == null || p.$set(h);
4273
+ }
4274
+ setQuery(u, l = !0) {
4275
+ var d;
4276
+ (d = ie(this, i)) == null || d.setQuery(u, l);
4277
+ }
4278
+ clearMap() {
4279
+ var u;
4280
+ (u = ie(this, i)) == null || u.clearMap();
4281
+ }
4282
+ clearList() {
4283
+ var u;
4284
+ (u = ie(this, i)) == null || u.clearList();
4285
+ }
4286
+ setReverseMode(u) {
4287
+ var l;
4288
+ (l = ie(this, i)) == null || l.$set({ reverseActive: u });
4289
+ }
4290
+ focus() {
4291
+ var u;
4292
+ (u = ie(this, i)) == null || u.focus();
4293
+ }
4294
+ blur() {
4295
+ var u;
4296
+ (u = ie(this, i)) == null || u.blur();
4297
+ }
4298
+ onRemove() {
4299
+ var u;
4300
+ (u = ie(this, i)) == null || u.$destroy();
4301
+ }
4302
+ }, i = new WeakMap(), r = new WeakMap(), o;
4303
+ }
4304
+ const Xr = Kr(
4305
+ Ft.Evented,
4306
+ Ft,
4307
+ (n, e) => {
4308
+ const t = {};
4309
+ if (!("getSdkConfig" in n && typeof n.getSdkConfig == "function"))
4310
+ throw new Error("MapTiler SDK not detected");
4311
+ const { primaryLanguage: i, apiKey: r } = n.getSdkConfig();
4312
+ t.apiKey = r;
4313
+ const o = /^([a-z]{2})($|_|-)/.exec(i);
4314
+ return o && (t.language = o[1]), e.className += " maptiler-ctrl", t;
4294
4315
  }
4316
+ );
4317
+ class to extends Xr {
4295
4318
  onAdd(e) {
4296
4319
  return super.onAddInt(e);
4297
4320
  }
4298
- getExtraProps(e, t) {
4299
- const i = {};
4300
- if (!("getSdkConfig" in e && typeof e.getSdkConfig == "function"))
4301
- throw new Error("MapTiler SDK not detected");
4302
- const { primaryLanguage: r, apiKey: o } = e.getSdkConfig();
4303
- i.apiKey = o;
4304
- const l = /^([a-z]{2})($|_|-)/.exec(r);
4305
- return l && (i.language = l[1]), t.className += " maptiler-ctrl", i;
4306
- }
4307
4321
  }
4308
4322
  export {
4309
- $r as GeocodingControl,
4323
+ to as GeocodingControl,
4310
4324
  Yr as createMapLibreGlMapController
4311
4325
  };
4312
4326
  //# sourceMappingURL=maptilersdk.js.map