@maptiler/geocoding-control 1.4.2-dev.3 → 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 (52) 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 +654 -638
  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 +1352 -1346
  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 +1315 -1303
  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 +1 -1
  28. package/openlayers.js.map +1 -1
  29. package/openlayers.umd.js +1 -1
  30. package/openlayers.umd.js.map +1 -1
  31. package/package.json +5 -5
  32. package/react.js +1 -1
  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 +1 -1
  37. package/svelte/MapLibreBasedGeocodingControl.d.ts +70 -35
  38. package/svelte/MapLibreBasedGeocodingControl.js +69 -66
  39. package/svelte/leaflet-controller.d.ts +1 -1
  40. package/svelte/leaflet-controller.js +47 -24
  41. package/svelte/leaflet.d.ts +52 -16
  42. package/svelte/leaflet.js +14 -2
  43. package/svelte/maplibregl-controller.d.ts +7 -7
  44. package/svelte/maplibregl-controller.js +55 -34
  45. package/svelte/maplibregl.d.ts +29 -5
  46. package/svelte/maplibregl.js +3 -8
  47. package/svelte/maptilersdk.d.ts +29 -5
  48. package/svelte/maptilersdk.js +15 -18
  49. package/vanilla.js +1 -1
  50. package/vanilla.js.map +1 -1
  51. package/vanilla.umd.js +1 -1
  52. package/vanilla.umd.js.map +1 -1
package/maptilersdk.js CHANGED
@@ -1,59 +1,59 @@
1
1
  var rn = Object.defineProperty;
2
- var jt = (n) => {
2
+ var zt = (n) => {
3
3
  throw TypeError(n);
4
4
  };
5
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 _t = (n, e, t) => on(n, typeof e != "symbol" ? e + "" : e, t), Zt = (n, e, t) => e.has(n) || jt("Cannot " + t);
7
- var ne = (n, e, t) => (Zt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Et = (n, e, t) => e.has(n) ? jt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), et = (n, e, t, i) => (Zt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
8
- import * as sn from "@maptiler/sdk";
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
- function ln(n, e) {
11
+ function sn(n, e) {
12
12
  for (const t in e) n[t] = e[t];
13
13
  return (
14
14
  /** @type {T & S} */
15
15
  n
16
16
  );
17
17
  }
18
- function xi(n) {
18
+ function Si(n) {
19
19
  return n();
20
20
  }
21
- function Gt() {
21
+ function jt() {
22
22
  return /* @__PURE__ */ Object.create(null);
23
23
  }
24
- function me(n) {
25
- n.forEach(xi);
24
+ function ge(n) {
25
+ n.forEach(Si);
26
26
  }
27
- function Si(n) {
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
- function un(n) {
37
+ function ln(n) {
38
38
  return Object.keys(n).length === 0;
39
39
  }
40
- function an(n, e, t, i) {
40
+ function un(n, e, t, i) {
41
41
  if (n) {
42
42
  const r = Mi(n, e, t, i);
43
43
  return n[0](r);
44
44
  }
45
45
  }
46
46
  function Mi(n, e, t, i) {
47
- return n[1] && i ? ln(t.ctx.slice(), n[1](i(e))) : t.ctx;
47
+ return n[1] && i ? sn(t.ctx.slice(), n[1](i(e))) : t.ctx;
48
48
  }
49
- function cn(n, e, t, i) {
49
+ function an(n, e, t, i) {
50
50
  if (n[2] && i) {
51
51
  const r = n[2](i(t));
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
  }
@@ -61,13 +61,13 @@ function cn(n, e, t, i) {
61
61
  }
62
62
  return e.dirty;
63
63
  }
64
- function fn(n, e, t, i, r, o) {
64
+ function cn(n, e, t, i, r, o) {
65
65
  if (r) {
66
- const l = Mi(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
- function dn(n) {
70
+ function fn(n) {
71
71
  if (n.ctx.length > 32) {
72
72
  const e = [], t = n.ctx.length / 32;
73
73
  for (let i = 0; i < t; i++)
@@ -76,7 +76,7 @@ function dn(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,128 +91,128 @@ 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
- function hn() {
104
- return we("");
103
+ function dn() {
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);
108
108
  }
109
- function gn(n) {
109
+ function hn(n) {
110
110
  return function(e) {
111
111
  return e.preventDefault(), n.call(this, e);
112
112
  };
113
113
  }
114
- function p(n, e, t) {
114
+ function v(n, e, t) {
115
115
  t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
116
116
  }
117
- function mn(n) {
117
+ function gn(n) {
118
118
  return Array.from(n.childNodes);
119
119
  }
120
- function je(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 Qt(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
- function vn(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
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 Ze;
134
- function Fe(n) {
135
- Ze = n;
133
+ let Ge;
134
+ function Ue(n) {
135
+ Ge = n;
136
136
  }
137
- function ki() {
138
- if (!Ze) throw new Error("Function called outside component initialization");
139
- return Ze;
137
+ function Ci() {
138
+ if (!Ge) throw new Error("Function called outside component initialization");
139
+ return Ge;
140
140
  }
141
- function pn(n) {
142
- ki().$$.on_destroy.push(n);
141
+ function yn(n) {
142
+ Ci().$$.on_destroy.push(n);
143
143
  }
144
- function yn() {
145
- const n = ki();
144
+ function vn() {
145
+ const n = Ci();
146
146
  return (e, t, { cancelable: i = !1 } = {}) => {
147
147
  const r = n.$$.callbacks[e];
148
148
  if (r) {
149
- const o = vn(
149
+ const o = mn(
150
150
  /** @type {string} */
151
151
  e,
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;
160
160
  };
161
161
  }
162
- function Ht(n, e) {
162
+ 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 We = [], Mt = [];
167
- let Ae = [];
168
- const Vt = [], bn = /* @__PURE__ */ Promise.resolve();
169
- let kt = !1;
170
- function wn() {
171
- kt || (kt = !0, bn.then(Ci));
166
+ const Ie = [], St = [];
167
+ let Oe = [];
168
+ const Ht = [], pn = /* @__PURE__ */ Promise.resolve();
169
+ let xt = !1;
170
+ function bn() {
171
+ xt || (xt = !0, pn.then(ki));
172
172
  }
173
- function Ct(n) {
174
- Ae.push(n);
173
+ function Mt(n) {
174
+ Oe.push(n);
175
175
  }
176
- const Lt = /* @__PURE__ */ new Set();
177
- let Ie = 0;
178
- function Ci() {
179
- if (Ie !== 0)
176
+ const _t = /* @__PURE__ */ new Set();
177
+ let Pe = 0;
178
+ function ki() {
179
+ if (Pe !== 0)
180
180
  return;
181
- const n = Ze;
181
+ const n = Ge;
182
182
  do {
183
183
  try {
184
- for (; Ie < We.length; ) {
185
- const e = We[Ie];
186
- Ie++, Fe(e), _n(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 We.length = 0, Ie = 0, e;
189
+ throw Ie.length = 0, Pe = 0, e;
190
190
  }
191
- for (Fe(null), We.length = 0, Ie = 0; Mt.length; ) Mt.pop()();
192
- for (let e = 0; e < Ae.length; e += 1) {
193
- const t = Ae[e];
194
- Lt.has(t) || (Lt.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
- Ae.length = 0;
197
- } while (We.length);
198
- for (; Vt.length; )
199
- Vt.pop()();
200
- kt = !1, Lt.clear(), Fe(n);
196
+ Oe.length = 0;
197
+ } while (Ie.length);
198
+ for (; Ht.length; )
199
+ Ht.pop()();
200
+ xt = !1, _t.clear(), Ue(n);
201
201
  }
202
- function _n(n) {
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(Ct);
206
+ n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Mt);
207
207
  }
208
208
  }
209
- function En(n) {
209
+ function _n(n) {
210
210
  const e = [], t = [];
211
- Ae.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), Ae = 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();
213
+ const et = /* @__PURE__ */ new Set();
214
214
  let Ce;
215
- function nt() {
215
+ function tt() {
216
216
  Ce = {
217
217
  r: 0,
218
218
  c: [],
@@ -220,108 +220,108 @@ function nt() {
220
220
  // parent group
221
221
  };
222
222
  }
223
- function rt() {
224
- Ce.r || me(Ce.c), Ce = Ce.p;
223
+ function it() {
224
+ Ce.r || ge(Ce.c), Ce = Ce.p;
225
225
  }
226
- function G(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), Ce.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
  }
237
- function Yt(n) {
237
+ function Vt(n) {
238
238
  return (n == null ? void 0 : n.length) !== void 0 ? n : Array.from(n);
239
239
  }
240
- function Ln(n, e) {
240
+ function En(n, e) {
241
241
  V(n, 1, 1, () => {
242
242
  e.delete(n.key);
243
243
  });
244
244
  }
245
- function xn(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 v = [], 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, v[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
- G(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 = v[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(v[h - 1]);
268
- return me(S), v;
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), Ct(() => {
276
- const o = n.$$.on_mount.map(xi).filter(Si);
277
- n.$$.on_destroy ? n.$$.on_destroy.push(...o) : me(o), n.$$.on_mount = [];
278
- }), r.forEach(Ct);
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 && (En(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
284
  function Sn(n, e) {
285
- n.$$.dirty[0] === -1 && (We.push(n), wn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
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 = Ze;
289
- Fe(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: Gt(),
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: Gt(),
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 && Sn(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 = mn(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 && G(n.$$.fragment), he(n, e.target, e.anchor), Ci();
321
+ l.fragment && l.fragment.c();
322
+ e.intro && Z(n.$$.fragment), de(n, e.target, e.anchor), ki();
323
323
  }
324
- Fe(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
- _t(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
- _t(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
@@ -353,7 +353,7 @@ class Se {
353
353
  * @returns {() => void}
354
354
  */
355
355
  $on(e, t) {
356
- if (!Si(t))
356
+ if (!xi(t))
357
357
  return A;
358
358
  const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
359
359
  return i.push(t), () => {
@@ -366,16 +366,16 @@ class Se {
366
366
  * @returns {void}
367
367
  */
368
368
  $set(e) {
369
- this.$$set && !un(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
369
+ this.$$set && !ln(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
370
370
  }
371
371
  }
372
- const Mn = "4";
373
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Mn);
374
- function kn(n) {
372
+ const xn = "4";
373
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(xn);
374
+ function Mn(n) {
375
375
  let e, t;
376
376
  return {
377
377
  c() {
378
- e = ue("svg"), t = ue("path"), p(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), p(e, "viewBox", "0 0 14 14"), p(e, "width", "13"), p(e, "height", "13"), p(e, "class", "svelte-en2qvf");
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);
@@ -390,14 +390,14 @@ function kn(n) {
390
390
  }
391
391
  class Ni extends Se {
392
392
  constructor(e) {
393
- super(), xe(this, e, null, kn, Le, {});
393
+ super(), Le(this, e, null, Mn, Ee, {});
394
394
  }
395
395
  }
396
396
  function Cn(n) {
397
397
  let e, t;
398
398
  return {
399
399
  c() {
400
- e = ue("svg"), t = ue("path"), p(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), p(e, "viewBox", "0 0 30 30"), p(e, "fill", "none"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "class", "svelte-d2loi5");
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);
@@ -412,20 +412,20 @@ function Cn(n) {
412
412
  }
413
413
  class Ti extends Se {
414
414
  constructor(e) {
415
- super(), xe(this, e, null, Cn, Le, {});
415
+ super(), Le(this, e, null, Cn, Ee, {});
416
416
  }
417
417
  }
418
- function Nn(n) {
418
+ function kn(n) {
419
419
  let e, t;
420
420
  return {
421
421
  c() {
422
422
  e = W("img"), K(e.src, t = /*iconsBaseUrl*/
423
- n[3] + "area.svg") || p(e, "src", t), p(
423
+ n[3] + "area.svg") || v(e, "src", t), v(
424
424
  e,
425
425
  "alt",
426
426
  /*placeType*/
427
427
  n[6]
428
- ), p(e, "class", "svelte-ltkwvy");
428
+ ), v(e, "class", "svelte-ltkwvy");
429
429
  },
430
430
  m(i, r) {
431
431
  z(i, e, r);
@@ -433,8 +433,8 @@ function Nn(n) {
433
433
  p(i, r) {
434
434
  r & /*iconsBaseUrl*/
435
435
  8 && !K(e.src, t = /*iconsBaseUrl*/
436
- i[3] + "area.svg") && p(e, "src", t), r & /*placeType*/
437
- 64 && p(
436
+ i[3] + "area.svg") && v(e, "src", t), r & /*placeType*/
437
+ 64 && v(
438
438
  e,
439
439
  "alt",
440
440
  /*placeType*/
@@ -446,17 +446,17 @@ function Nn(n) {
446
446
  }
447
447
  };
448
448
  }
449
- function Tn(n) {
449
+ function Nn(n) {
450
450
  let e, t;
451
451
  return {
452
452
  c() {
453
453
  e = W("img"), K(e.src, t = /*iconsBaseUrl*/
454
- n[3] + "reverse.svg") || p(e, "src", t), p(
454
+ n[3] + "reverse.svg") || v(e, "src", t), v(
455
455
  e,
456
456
  "alt",
457
457
  /*placeType*/
458
458
  n[6]
459
- ), p(e, "class", "svelte-ltkwvy");
459
+ ), v(e, "class", "svelte-ltkwvy");
460
460
  },
461
461
  m(i, r) {
462
462
  z(i, e, r);
@@ -464,8 +464,8 @@ function Tn(n) {
464
464
  p(i, r) {
465
465
  r & /*iconsBaseUrl*/
466
466
  8 && !K(e.src, t = /*iconsBaseUrl*/
467
- i[3] + "reverse.svg") && p(e, "src", t), r & /*placeType*/
468
- 64 && p(
467
+ i[3] + "reverse.svg") && v(e, "src", t), r & /*placeType*/
468
+ 64 && v(
469
469
  e,
470
470
  "alt",
471
471
  /*placeType*/
@@ -477,17 +477,17 @@ function Tn(n) {
477
477
  }
478
478
  };
479
479
  }
480
- function Pn(n) {
480
+ function Tn(n) {
481
481
  let e, t;
482
482
  return {
483
483
  c() {
484
484
  e = W("img"), K(e.src, t = /*iconsBaseUrl*/
485
- n[3] + "poi.svg") || p(e, "src", t), p(
485
+ n[3] + "poi.svg") || v(e, "src", t), v(
486
486
  e,
487
487
  "alt",
488
488
  /*placeType*/
489
489
  n[6]
490
- ), p(e, "class", "svelte-ltkwvy");
490
+ ), v(e, "class", "svelte-ltkwvy");
491
491
  },
492
492
  m(i, r) {
493
493
  z(i, e, r);
@@ -495,8 +495,8 @@ function Pn(n) {
495
495
  p(i, r) {
496
496
  r & /*iconsBaseUrl*/
497
497
  8 && !K(e.src, t = /*iconsBaseUrl*/
498
- i[3] + "poi.svg") && p(e, "src", t), r & /*placeType*/
499
- 64 && p(
498
+ i[3] + "poi.svg") && v(e, "src", t), r & /*placeType*/
499
+ 64 && v(
500
500
  e,
501
501
  "alt",
502
502
  /*placeType*/
@@ -508,17 +508,17 @@ function Pn(n) {
508
508
  }
509
509
  };
510
510
  }
511
- function Rn(n) {
511
+ function Pn(n) {
512
512
  let e, t;
513
513
  return {
514
514
  c() {
515
515
  e = W("img"), K(e.src, t = /*iconsBaseUrl*/
516
- n[3] + "postal_code.svg") || p(e, "src", t), p(
516
+ n[3] + "postal_code.svg") || v(e, "src", t), v(
517
517
  e,
518
518
  "alt",
519
519
  /*placeType*/
520
520
  n[6]
521
- ), p(e, "class", "svelte-ltkwvy");
521
+ ), v(e, "class", "svelte-ltkwvy");
522
522
  },
523
523
  m(i, r) {
524
524
  z(i, e, r);
@@ -526,8 +526,8 @@ function Rn(n) {
526
526
  p(i, r) {
527
527
  r & /*iconsBaseUrl*/
528
528
  8 && !K(e.src, t = /*iconsBaseUrl*/
529
- i[3] + "postal_code.svg") && p(e, "src", t), r & /*placeType*/
530
- 64 && p(
529
+ i[3] + "postal_code.svg") && v(e, "src", t), r & /*placeType*/
530
+ 64 && v(
531
531
  e,
532
532
  "alt",
533
533
  /*placeType*/
@@ -539,17 +539,17 @@ function Rn(n) {
539
539
  }
540
540
  };
541
541
  }
542
- function In(n) {
542
+ function Rn(n) {
543
543
  let e, t;
544
544
  return {
545
545
  c() {
546
546
  e = W("img"), K(e.src, t = /*iconsBaseUrl*/
547
- n[3] + "street.svg") || p(e, "src", t), p(
547
+ n[3] + "street.svg") || v(e, "src", t), v(
548
548
  e,
549
549
  "alt",
550
550
  /*placeType*/
551
551
  n[6]
552
- ), p(e, "class", "svelte-ltkwvy");
552
+ ), v(e, "class", "svelte-ltkwvy");
553
553
  },
554
554
  m(i, r) {
555
555
  z(i, e, r);
@@ -557,8 +557,8 @@ function In(n) {
557
557
  p(i, r) {
558
558
  r & /*iconsBaseUrl*/
559
559
  8 && !K(e.src, t = /*iconsBaseUrl*/
560
- i[3] + "street.svg") && p(e, "src", t), r & /*placeType*/
561
- 64 && p(
560
+ i[3] + "street.svg") && v(e, "src", t), r & /*placeType*/
561
+ 64 && v(
562
562
  e,
563
563
  "alt",
564
564
  /*placeType*/
@@ -570,17 +570,17 @@ function In(n) {
570
570
  }
571
571
  };
572
572
  }
573
- function On(n) {
573
+ function In(n) {
574
574
  let e, t;
575
575
  return {
576
576
  c() {
577
577
  e = W("img"), K(e.src, t = /*iconsBaseUrl*/
578
- n[3] + "road.svg") || p(e, "src", t), p(
578
+ n[3] + "road.svg") || v(e, "src", t), v(
579
579
  e,
580
580
  "alt",
581
581
  /*placeType*/
582
582
  n[6]
583
- ), p(e, "class", "svelte-ltkwvy");
583
+ ), v(e, "class", "svelte-ltkwvy");
584
584
  },
585
585
  m(i, r) {
586
586
  z(i, e, r);
@@ -588,8 +588,8 @@ function On(n) {
588
588
  p(i, r) {
589
589
  r & /*iconsBaseUrl*/
590
590
  8 && !K(e.src, t = /*iconsBaseUrl*/
591
- i[3] + "road.svg") && p(e, "src", t), r & /*placeType*/
592
- 64 && p(
591
+ i[3] + "road.svg") && v(e, "src", t), r & /*placeType*/
592
+ 64 && v(
593
593
  e,
594
594
  "alt",
595
595
  /*placeType*/
@@ -601,17 +601,17 @@ function On(n) {
601
601
  }
602
602
  };
603
603
  }
604
- function Wn(n) {
604
+ function On(n) {
605
605
  let e, t;
606
606
  return {
607
607
  c() {
608
608
  e = W("img"), K(e.src, t = /*iconsBaseUrl*/
609
- n[3] + "housenumber.svg") || p(e, "src", t), p(
609
+ n[3] + "housenumber.svg") || v(e, "src", t), v(
610
610
  e,
611
611
  "alt",
612
612
  /*placeType*/
613
613
  n[6]
614
- ), p(e, "class", "svelte-ltkwvy");
614
+ ), v(e, "class", "svelte-ltkwvy");
615
615
  },
616
616
  m(i, r) {
617
617
  z(i, e, r);
@@ -619,8 +619,8 @@ function Wn(n) {
619
619
  p(i, r) {
620
620
  r & /*iconsBaseUrl*/
621
621
  8 && !K(e.src, t = /*iconsBaseUrl*/
622
- i[3] + "housenumber.svg") && p(e, "src", t), r & /*placeType*/
623
- 64 && p(
622
+ i[3] + "housenumber.svg") && v(e, "src", t), r & /*placeType*/
623
+ 64 && v(
624
624
  e,
625
625
  "alt",
626
626
  /*placeType*/
@@ -632,31 +632,31 @@ function Wn(n) {
632
632
  }
633
633
  };
634
634
  }
635
- function An(n) {
635
+ function Wn(n) {
636
636
  let e, t, i, r;
637
637
  return {
638
638
  c() {
639
639
  e = W("img"), K(e.src, t = /*imageUrl*/
640
- n[5]) || p(e, "src", t), p(
640
+ n[5]) || v(e, "src", t), v(
641
641
  e,
642
642
  "alt",
643
643
  /*category*/
644
644
  n[4]
645
- ), p(e, "class", "svelte-ltkwvy");
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]) && p(e, "src", t), l & /*category*/
659
- 16 && p(
658
+ o[5]) && v(e, "src", t), a & /*category*/
659
+ 16 && v(
660
660
  e,
661
661
  "alt",
662
662
  /*category*/
@@ -668,21 +668,21 @@ function An(n) {
668
668
  }
669
669
  };
670
670
  }
671
- function Kt(n) {
671
+ 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
- ), p(e, "class", "secondary svelte-ltkwvy");
678
+ ), v(e, "class", "secondary svelte-ltkwvy");
679
679
  },
680
680
  m(i, r) {
681
681
  z(i, e, r), P(e, t);
682
682
  },
683
683
  p(i, r) {
684
684
  r & /*placeType*/
685
- 64 && je(
685
+ 64 && ze(
686
686
  t,
687
687
  /*placeType*/
688
688
  i[6]
@@ -693,8 +693,8 @@ function Kt(n) {
693
693
  }
694
694
  };
695
695
  }
696
- function Bn(n) {
697
- let e, t, i, r, o, l, s, c, u, d = (
696
+ function An(n) {
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 Bn(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,48 +714,48 @@ function Bn(n) {
714
714
  n[0].id.startsWith("poi.") || !/*imageUrl*/
715
715
  n[5]) && !/*isReverse*/
716
716
  n[7]
717
- ), y, b, v = (
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
- w[5] ? An : (
730
+ w[5] ? Wn : (
731
731
  /*feature*/
732
- w[0].address ? Wn : (t == null && (t = !!/*feature*/
733
- w[0].id.startsWith("road.")), t ? On : (i == null && (i = !!/*feature*/
734
- w[0].id.startsWith("address.")), i ? In : (r == null && (r = !!/*feature*/
735
- w[0].id.startsWith("postal_code.")), r ? Rn : (o == null && (o = !!/*feature*/
736
- w[0].id.startsWith("poi.")), o ? Pn : (
732
+ w[0].address ? On : (t == null && (t = !!/*feature*/
733
+ w[0].id.startsWith("road.")), t ? In : (i == null && (i = !!/*feature*/
734
+ w[0].id.startsWith("address.")), i ? Rn : (r == null && (r = !!/*feature*/
735
+ w[0].id.startsWith("postal_code.")), r ? Pn : (o == null && (o = !!/*feature*/
736
+ w[0].id.startsWith("poi.")), o ? Tn : (
737
737
  /*isReverse*/
738
- w[7] ? Tn : Nn
738
+ w[7] ? Nn : kn
739
739
  )))))
740
740
  );
741
741
  }
742
- let k = _(n, -1), x = k(n), L = h && Kt(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(v), p(u, "class", "primary svelte-ltkwvy"), p(c, "class", "svelte-ltkwvy"), p(b, "class", "line2 svelte-ltkwvy"), p(s, "class", "texts svelte-ltkwvy"), p(e, "tabindex", "0"), p(
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
- ), p(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 Bn(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 Bn(n) {
779
779
  ) : (
780
780
  /*feature*/
781
781
  w[0].place_name.replace(/,.*/, "")
782
- )) + "") && je(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 Bn(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 = Kt(w), L.c(), L.m(c, null)) : L && (L.d(1), L = null), C & /*feature*/
793
- 1 && v !== (v = /*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
- )) + "") && je(m, v), C & /*selected*/
798
- 2 && p(
797
+ )) + "") && ze(y, m), k & /*selected*/
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 Bn(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
- function Dn(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";
818
+ function Bn(n, e, t) {
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 v(_) {
827
- Ht.call(this, n, _);
826
+ function m(E) {
827
+ Qt.call(this, n, E);
828
828
  }
829
- function m(_) {
830
- Ht.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
- v,
858
857
  m,
859
- E
858
+ y,
859
+ _
860
860
  ];
861
861
  }
862
- class Un extends Se {
862
+ class Dn extends Se {
863
863
  constructor(e) {
864
- super(), xe(this, e, Dn, Bn, Le, {
864
+ super(), Le(this, e, Bn, An, Ee, {
865
865
  feature: 0,
866
866
  selected: 1,
867
867
  showPlaceType: 2,
@@ -870,11 +870,11 @@ class Un extends Se {
870
870
  });
871
871
  }
872
872
  }
873
- function zn(n) {
873
+ function Un(n) {
874
874
  let e;
875
875
  return {
876
876
  c() {
877
- e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', p(e, "class", "svelte-7cmwmc");
877
+ e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', v(e, "class", "svelte-7cmwmc");
878
878
  },
879
879
  m(t, i) {
880
880
  z(t, e, i);
@@ -887,22 +887,22 @@ function zn(n) {
887
887
  }
888
888
  };
889
889
  }
890
- class Fn extends Se {
890
+ class zn extends Se {
891
891
  constructor(e) {
892
- super(), xe(this, e, null, zn, Le, {});
892
+ super(), Le(this, e, null, Un, Ee, {});
893
893
  }
894
894
  }
895
- function jn(n) {
895
+ function Gn(n) {
896
896
  let e, t, i;
897
897
  return {
898
898
  c() {
899
- e = ue("svg"), t = ue("path"), p(t, "stroke-width", "4"), p(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), p(t, "class", "svelte-gzo3ar"), p(e, "width", i = /*displayIn*/
900
- n[0] === "list" ? 20 : void 0), p(e, "viewBox", "0 0 70 85"), p(e, "fill", "none"), p(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*/
@@ -915,14 +915,14 @@ function jn(n) {
915
915
  p(r, [o]) {
916
916
  o & /*displayIn*/
917
917
  1 && i !== (i = /*displayIn*/
918
- r[0] === "list" ? 20 : void 0) && p(e, "width", i), o & /*displayIn*/
919
- 1 && oe(
918
+ r[0] === "list" ? 20 : void 0) && v(e, "width", i), o & /*displayIn*/
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 jn(n) {
936
936
  }
937
937
  };
938
938
  }
939
- function Zn(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 Gn extends Se {
945
+ class jn extends Se {
946
946
  constructor(e) {
947
- super(), xe(this, e, Zn, jn, 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"), p(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), p(e, "viewBox", "0 0 60.006 21.412"), p(e, "width", "14"), p(e, "height", "20"), p(e, "class", "svelte-en2qvf");
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 Qn 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
- function Hn(n) {
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"), p(t, "cx", "4.789"), p(t, "cy", "4.787"), p(t, "r", "3.85"), p(t, "class", "svelte-1aq105l"), p(i, "d", "M12.063 12.063 7.635 7.635"), p(i, "class", "svelte-1aq105l"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "width", "13"), p(e, "height", "13"), p(e, "viewBox", "0 0 13 13"), p(e, "class", "svelte-1aq105l");
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);
@@ -986,52 +986,52 @@ function Hn(n) {
986
986
  }
987
987
  };
988
988
  }
989
- class Vn extends Se {
989
+ class Hn extends Se {
990
990
  constructor(e) {
991
- super(), xe(this, e, null, Hn, Le, {});
991
+ super(), Le(this, e, null, Qn, Ee, {});
992
992
  }
993
993
  }
994
- function Yn(n, e, t) {
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 De;
1003
- async function Kn(n, e, t) {
1002
+ let Ae;
1003
+ async function Yn(n, e, t) {
1004
1004
  const i = n == null ? void 0 : n.getCenterAndZoom();
1005
1005
  for (const r of e ?? [])
1006
1006
  if (!(i && (r.minZoom != null && r.minZoom > i[0] || r.maxZoom != null && r.maxZoom < i[0]))) {
1007
1007
  if (r.type === "fixed")
1008
1008
  return r.coordinates.join(",");
1009
1009
  e: if (r.type === "client-geolocation") {
1010
- if (De && r.cachedLocationExpiry && De.time + r.cachedLocationExpiry > Date.now()) {
1011
- if (!De.coords)
1010
+ if (Ae && r.cachedLocationExpiry && Ae.time + r.cachedLocationExpiry > Date.now()) {
1011
+ if (!Ae.coords)
1012
1012
  break e;
1013
- return De.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 && (De = {
1034
+ r.cachedLocationExpiry && (Ae = {
1035
1035
  time: Date.now(),
1036
1036
  coords: o
1037
1037
  });
@@ -1045,71 +1045,71 @@ async function Kn(n, e, t) {
1045
1045
  return i[1].toFixed(6) + "," + i[2].toFixed(6);
1046
1046
  }
1047
1047
  }
1048
- const Xn = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, Xt = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, Jt = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, $t = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, ei = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, ti = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
1049
- function Jn(n) {
1048
+ const Kn = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, Kt = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, Xt = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, Jt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, $t = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, ei = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
1049
+ function 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 = ii(a, 3).toFixed(3).padStart(6, "0"), y = ii(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"), v = ((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") && v.endsWith(".0") && (b = b.replace(/\.0$/, ""), v = v.replace(/\.0$/, "")), c = `${u}° ${m}' ${b}" ${l}, ${d}° ${E}' ${v}" ${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
  }
1071
- function ii(n, e) {
1071
+ 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 Ot(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;
1078
- if (Xn.test(n))
1077
+ let t = null, i = null, r = "", o = "", a = null, s = [], u = !1;
1078
+ if (Kn.test(n))
1079
1079
  throw new Error("invalid coordinate value");
1080
- if (Xt.test(n))
1081
- if (s = Xt.exec(n), c = Ue(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";
1080
+ if (Kt.test(n))
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
- else if (Jt.test(n))
1086
- if (s = Jt.exec(n), c = Ue(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))
1085
+ else if (Xt.test(n))
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");
1091
1091
  s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
1092
1092
  } else
1093
1093
  throw new Error("invalid decimal coordinate format");
1094
- else if ($t.test(n))
1095
- if (s = $t.exec(n), c = Ue(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]);
1094
+ else if (Jt.test(n))
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
- else if (ei.test(n))
1100
- if (s = ei.exec(n), c = Ue(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]);
1099
+ else if ($t.test(n))
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
- else if (ti.test(n)) {
1105
- if (s = ti.exec(n), c = Ue(s), s.filter((u) => u).length <= 5)
1104
+ else if (ei.test(n)) {
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 Ot(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 v = f.split(".");
1147
- if (v.length == 2 && v[1] == 0 && v[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,
1159
- closeEnough: $n,
1160
- toCoordinateFormat: Jn
1158
+ originalFormat: a,
1159
+ closeEnough: Jn,
1160
+ toCoordinateFormat: Xn
1161
1161
  });
1162
1162
  } else
1163
1163
  throw new Error("coordinates pattern match failed");
1164
1164
  }
1165
- function Ue(n) {
1165
+ function Be(n) {
1166
1166
  if (!isNaN(n[0]))
1167
1167
  return !1;
1168
1168
  const e = [...n];
@@ -1170,39 +1170,39 @@ function Ue(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
  }
1181
1181
  }
1182
1182
  return !0;
1183
1183
  }
1184
- function ni(n, e) {
1184
+ function ii(n, e) {
1185
1185
  const t = Math.abs(n - e);
1186
1186
  return Number(t.toFixed(6)) <= 1e-5;
1187
1187
  }
1188
- function $n(n) {
1188
+ function Jn(n) {
1189
1189
  if (!n)
1190
1190
  throw new Error("coords must be provided");
1191
1191
  if (n.includes(",")) {
1192
1192
  const e = n.split(",");
1193
1193
  if (Number(e[0]) == NaN || Number(e[1]) == NaN)
1194
1194
  throw new Error("coords are not valid decimals");
1195
- return ni(this.decimalLatitude, Number(e[0])) && ni(this.decimalLongitude, e[1]);
1195
+ return ii(this.decimalLatitude, Number(e[0])) && ii(this.decimalLongitude, e[1]);
1196
1196
  } else
1197
1197
  throw new Error("coords being tested must be separated by a comma");
1198
1198
  }
1199
- const er = Object.freeze({
1199
+ const $n = Object.freeze({
1200
1200
  DMS: "DMS",
1201
1201
  DM: "DM",
1202
1202
  DD: "DD"
1203
1203
  });
1204
- Ot.to = er;
1205
- const tr = [
1204
+ Rt.to = $n;
1205
+ const er = [
1206
1206
  {
1207
1207
  verbatimCoordinates: "40.123, -74.123",
1208
1208
  verbatimLatitude: "40.123",
@@ -1343,10 +1343,10 @@ const tr = [
1343
1343
  verbatimLatitude: "40 7 22.8",
1344
1344
  verbatimLongitude: "-74 7 22.8"
1345
1345
  }
1346
- ], ir = {
1346
+ ], tr = {
1347
1347
  decimalLatitude: 40.123,
1348
1348
  decimalLongitude: -74.123
1349
- }, nr = [
1349
+ }, ir = [
1350
1350
  {
1351
1351
  verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
1352
1352
  verbatimLatitude: `50°4'17.698"south`,
@@ -1431,7 +1431,7 @@ const tr = [
1431
1431
  decimalLatitude: -18.4,
1432
1432
  decimalLongitude: 22.75
1433
1433
  }
1434
- ], rr = [
1434
+ ], nr = [
1435
1435
  {
1436
1436
  verbatimCoordinates: "10.432342S 10.6345345E",
1437
1437
  verbatimLatitude: "10.432342S",
@@ -1566,116 +1566,116 @@ const tr = [
1566
1566
  decimalLongitude: 18.33453
1567
1567
  }
1568
1568
  ];
1569
- function or() {
1569
+ function rr() {
1570
1570
  const n = [];
1571
- return tr.forEach((e) => {
1572
- e.decimalLatitude ? n.push(e) : n.push({ ...e, ...ir });
1573
- }), [...n, ...nr, ...rr];
1574
- }
1575
- const sr = or();
1576
- Ot.formats = sr.map((n) => n.verbatimCoordinates);
1577
- const lr = Ot;
1578
- function ri(n, e, t) {
1571
+ return er.forEach((e) => {
1572
+ e.decimalLatitude ? n.push(e) : n.push({ ...e, ...tr });
1573
+ }), [...n, ...ir, ...nr];
1574
+ }
1575
+ const or = rr();
1576
+ Rt.formats = or.map((n) => n.verbatimCoordinates);
1577
+ const sr = Rt;
1578
+ function ni(n, e, t) {
1579
1579
  const i = n.slice();
1580
1580
  return i[84] = e[t], i[86] = t, i;
1581
1581
  }
1582
- function oi(n) {
1582
+ function ri(n) {
1583
1583
  let e, t;
1584
- return e = new Fn({}), {
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 || (G(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
- function si(n) {
1602
+ function oi(n) {
1603
1603
  let e, t, i, r, o;
1604
- return t = new Qn({}), {
1604
+ return t = new qn({}), {
1605
1605
  c() {
1606
- e = W("button"), _e(t.$$.fragment), p(e, "type", "button"), p(
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
- ), p(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
1623
  n[69]
1624
1624
  ), r = !0);
1625
1625
  },
1626
- p(l, s) {
1626
+ p(a, s) {
1627
1627
  (!i || s[0] & /*reverseButtonTitle*/
1628
- 512) && p(
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 || (G(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
- function ur(n) {
1653
- let e, t = [], i = /* @__PURE__ */ new Map(), r, o, l, s = Yt(
1652
+ function lr(n) {
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[84].id + /*feature*/
1660
- (u[84].address ? "," + /*feature*/
1661
- u[84].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 = ri(n, s, u), a = c(d);
1665
- i.set(a, t[u] = li(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();
1672
- p(e, "class", "svelte-1uvos7g");
1670
+ for (let l = 0; l < t.length; l += 1)
1671
+ t[l].c();
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",
@@ -1690,69 +1690,69 @@ function ur(n) {
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
- 17880064 && (s = Yt(
1695
+ 17880064 && (s = Vt(
1696
1696
  /*listFeatures*/
1697
- u[14]
1698
- ), nt(), t = xn(t, d, c, 1, u, s, i, e, Ln, li, null, ri), 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
- G(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
- function ar(n) {
1721
- let e, t, i, r, o, l;
1720
+ function ur(n) {
1721
+ let e, t, i, r, o, a;
1722
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
- ), p(r, "class", "svelte-1uvos7g"), p(e, "class", "no-results svelte-1uvos7g");
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) && je(
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 || (G(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
  }
1751
- function cr(n) {
1751
+ 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);
@@ -1765,17 +1765,17 @@ function cr(n) {
1765
1765
  }
1766
1766
  };
1767
1767
  }
1768
- function fr(n) {
1769
- let e, t, i, r, o, l, s, c, u, d, a;
1770
- return t = new Ti({}), c = new Ni({}), {
1768
+ function cr(n) {
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), p(r, "class", "svelte-1uvos7g"), p(s, "class", "svelte-1uvos7g"), p(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*/
@@ -1783,25 +1783,25 @@ function fr(n) {
1783
1783
  ), d = !0);
1784
1784
  },
1785
1785
  p(f, h) {
1786
- (!u || h[0] & /*errorMessage*/
1787
- 64) && je(
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 || (G(t.$$.fragment, f), G(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
  }
1804
- function li(n, e) {
1804
+ function si(n, e) {
1805
1805
  let t, i, r;
1806
1806
  function o() {
1807
1807
  return (
@@ -1812,7 +1812,7 @@ function li(n, e) {
1812
1812
  )
1813
1813
  );
1814
1814
  }
1815
- function l() {
1815
+ function a() {
1816
1816
  return (
1817
1817
  /*focus_handler_1*/
1818
1818
  e[72](
@@ -1821,7 +1821,7 @@ function li(n, e) {
1821
1821
  )
1822
1822
  );
1823
1823
  }
1824
- return i = new Un({
1824
+ return i = new Dn({
1825
1825
  props: {
1826
1826
  feature: (
1827
1827
  /*feature*/
@@ -1845,62 +1845,62 @@ function li(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 = hn(), _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[84]), 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[86]), 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 || (G(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
- function dr(n) {
1883
- let e, t, i, r, o, l, s, c, u, d, a, f, h, y, b, v, m, E, S, _, k, x = !1;
1884
- o = new Vn({}), a = new Ni({});
1885
- let L = (
1882
+ function fr(n) {
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
- n[19] && oi()
1887
+ n[19] && ri()
1888
1888
  ), w = (
1889
1889
  /*enableReverse*/
1890
- n[5] === !0 && si(n)
1890
+ n[5] === !0 && oi(n)
1891
1891
  );
1892
- const C = (
1892
+ const k = (
1893
1893
  /*#slots*/
1894
1894
  n[61].default
1895
- ), I = an(
1896
- C,
1895
+ ), I = un(
1896
+ k,
1897
1897
  n,
1898
1898
  /*$$scope*/
1899
1899
  n[60],
1900
1900
  null
1901
- ), D = [fr, cr, ar, ur], 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,38 +1910,38 @@ function dr(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 ~(v = O(n)) && (m = F[v] = D[v](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(), p(r, "class", "search-button svelte-1uvos7g"), p(r, "type", "button"), p(
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*/
1925
1925
  n[8]
1926
- ), p(
1926
+ ), v(
1927
1927
  s,
1928
1928
  "aria-label",
1929
1929
  /*placeholder*/
1930
1930
  n[8]
1931
- ), p(s, "class", "svelte-1uvos7g"), p(d, "type", "button"), p(
1931
+ ), v(s, "class", "svelte-1uvos7g"), v(d, "type", "button"), v(
1932
1932
  d,
1933
1933
  "title",
1934
1934
  /*clearButtonTitle*/
1935
1935
  n[3]
1936
- ), p(d, "class", "svelte-1uvos7g"), p(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
- ), p(i, "class", "input-group svelte-1uvos7g"), p(t, "tabindex", "0"), p(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,12 +1949,12 @@ function dr(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[63](s), Qt(
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), ~v && F[v].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",
@@ -1997,79 +1997,79 @@ function dr(n) {
1997
1997
  /*click_handler_1*/
1998
1998
  n[68]
1999
1999
  ),
2000
- J(t, "submit", gn(
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*/
2008
- 256) && p(
2006
+ p(M, F) {
2007
+ (!L || F[0] & /*placeholder*/
2008
+ 256) && v(
2009
2009
  s,
2010
2010
  "placeholder",
2011
2011
  /*placeholder*/
2012
2012
  M[8]
2013
- ), (!S || j[0] & /*placeholder*/
2014
- 256) && p(
2013
+ ), (!L || F[0] & /*placeholder*/
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] && Qt(
2021
+ M[1] && qt(
2022
2022
  s,
2023
2023
  /*searchValue*/
2024
2024
  M[1]
2025
- ), (!S || j[0] & /*clearButtonTitle*/
2026
- 8) && p(
2025
+ ), (!L || F[0] & /*clearButtonTitle*/
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 && G(L, 1) : (L = oi(), L.c(), G(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 && G(w, 1)) : (w = si(M), w.c(), G(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
- 536870912) && fn(
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
2051
  M[60],
2052
- S ? cn(
2053
- C,
2052
+ L ? an(
2053
+ k,
2054
2054
  /*$$scope*/
2055
2055
  M[60],
2056
- j,
2056
+ F,
2057
2057
  null
2058
- ) : dn(
2058
+ ) : fn(
2059
2059
  /*$$scope*/
2060
2060
  M[60]
2061
2061
  ),
2062
2062
  null
2063
2063
  );
2064
- let $ = v;
2065
- v = O(M), v === $ ? ~v && F[v].p(M, j) : (m && (nt(), V(F[$], 1, 1, () => {
2066
- F[$] = null;
2067
- }), rt()), ~v ? (m = F[v], m ? m.p(M, j) : (m = F[v] = D[v](M), m.c()), G(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")) && p(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 dr(n) {
2078
2078
  );
2079
2079
  },
2080
2080
  i(M) {
2081
- S || (G(x), G(o.$$.fragment, M), G(a.$$.fragment, M), G(L), G(w), G(I, M), G(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[63](null), ge(a), L && L.d(), w && w.d(), I && I.d(M), ~v && F[v].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
- function hr(n, e, t) {
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,17 +2114,17 @@ function hr(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: v = "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: Ve = !0 } = e, { types: Me = void 0 } = e, { exhaustiveReverseGeocoding: ct = !1 } = e, { excludeTypes: Ye = !1 } = e, { zoom: Te = l } = e, { maxZoom: Ke = void 0 } = e, { apiUrl: ft = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: dt = {} } = e, { iconsBaseUrl: Dt = "https://cdn.maptiler.com/maptiler-geocoding-control/v1.4.2-dev.3/icons/" } = e, { adjustUrlQuery: ht = () => {
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
2119
  function Ai() {
2120
- ae.focus();
2120
+ ue.focus();
2121
2121
  }
2122
2122
  function Bi() {
2123
- ae.blur();
2123
+ ue.blur();
2124
2124
  }
2125
- function Ut(g, Z = !0, H = !1) {
2126
- t(1, O = g), Z ? (t(15, U = -1), Ft()) : (pt(!H, H), setTimeout(() => {
2127
- ae.focus(), ae.select();
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
2128
  }));
2129
2129
  }
2130
2130
  function Di() {
@@ -2133,50 +2133,50 @@ function hr(n, e, t) {
2133
2133
  function Ui() {
2134
2134
  t(56, q = []), t(57, N = void 0);
2135
2135
  }
2136
- let Pe = !1, R, q, N, zt = "", ae, U = -1, ce, Xe = [], ke, Re, Je, gt;
2137
- const zi = /* @__PURE__ */ new Set(), ve = yn();
2138
- pn(() => {
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 Ft(g) {
2142
- if (Re && (clearTimeout(Re), Re = 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, ce = void 0), t(56, q = 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 || !mt(O);
2146
- vt(O, { exact: !0 }).then(() => {
2147
- t(56, q = R), t(57, N = void 0), Z && Fi();
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 mt(g) {
2151
+ function ht(g) {
2152
2152
  try {
2153
- return lr(g, 6);
2153
+ return sr(g, 6);
2154
2154
  } catch {
2155
2155
  return !1;
2156
2156
  }
2157
2157
  }
2158
- async function vt(g, { byId: Z = !1, exact: H = !1 } = {}) {
2159
- t(18, ce = void 0), ke == null || ke.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
- t(19, ke = ee);
2161
+ t(19, Me = ee);
2162
2162
  try {
2163
- const T = mt(g), Q = new URLSearchParams();
2164
- if (_ !== void 0 && Q.set("language", Array.isArray(_) ? _.join(",") : _ ?? ""), Me && Q.set("types", Me.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 Kn(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 && (ct || !T || (Me == null ? void 0 : Me.length) === 1) && Q.set("limit", String(k)), Q.set("key", c), ht(Q);
2169
- const fe = ft + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : g) + ".json?" + Q.toString();
2170
- if (fe === zt) {
2171
- Z ? (t(14, R = void 0), t(57, 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
- zt = fe;
2175
- const bt = await fetch(fe, { signal: ee.signal, ...dt });
2176
- if (!bt.ok)
2177
- throw new Error(await bt.text());
2178
- const wt = await bt.json();
2179
- ve("response", { url: fe, featureCollection: wt }), Z ? (t(14, R = void 0), t(57, N = wt.features[0]), Xe = [N]) : (t(14, R = wt.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,98 +2194,98 @@ function hr(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;
2201
2201
  throw T;
2202
2202
  } finally {
2203
- ee === ke && t(19, ke = void 0);
2203
+ ee === Me && t(19, Me = void 0);
2204
2204
  }
2205
2205
  }
2206
- function Fi() {
2206
+ function Gi() {
2207
2207
  var ee;
2208
- if (!(q != null && q.length) || !E)
2208
+ if (!(q != null && q.length) || !_)
2209
2209
  return;
2210
- const g = [180, 90, -180, -90], Z = !q.some((T) => !T.matching_text);
2210
+ const g = [180, 90, -180, -90], j = !q.some((T) => !T.matching_text);
2211
2211
  let H;
2212
2212
  for (const T of q) {
2213
- const Q = Be(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]);
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 && q.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? x.flyTo(N.center, Be(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 Be(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 Te == "number")
2225
- return g.id.startsWith("poi.") || g.id.startsWith("address.") ? Ke : Te;
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 = Te[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) ?? Te[Z];
2233
+ ) : void 0) ?? ke[j];
2234
2234
  }
2235
- function ji(g) {
2236
- t(0, D = b === "always"), t(14, R = void 0), t(57, N = void 0), t(15, U = -1), Ut(g[1].toFixed(6) + ", " + Yn(g[0], [-180, 180], !0).toFixed(6), !1, !0);
2235
+ function Fi(g) {
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
- function Zi(g) {
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 (Re && clearTimeout(Re), 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
- Re = window.setTimeout(
2249
+ Te = window.setTimeout(
2250
2250
  () => {
2251
- vt(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
2258
  function yt(g) {
2259
2259
  t(57, N = g), t(1, O = g.place_name), t(15, U = -1);
2260
2260
  }
2261
- const Gi = () => ae.focus();
2261
+ const Zi = () => ue.focus();
2262
2262
  function qi(g) {
2263
- Mt[g ? "unshift" : "push"](() => {
2264
- ae = g, t(17, ae);
2263
+ St[g ? "unshift" : "push"](() => {
2264
+ ue = g, t(17, ue);
2265
2265
  });
2266
2266
  }
2267
2267
  function Qi() {
2268
- O = this.value, t(1, O), t(13, Pe), t(28, a);
2268
+ O = this.value, t(1, O), t(13, Ne), t(28, c);
2269
2269
  }
2270
- const Hi = () => t(13, Pe = !0), Vi = () => t(13, Pe = !1), Yi = () => pt(), Ki = () => {
2271
- t(1, O = ""), ae.focus();
2272
- }, Xi = () => t(0, D = !D), Ji = () => t(18, ce = void 0), $i = (g) => t(15, U = g), en = (g) => yt(g), tn = () => {
2273
- se || t(15, U = -1);
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
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, v = 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, Ve = g.markerOnSelected), "types" in g && t(43, Me = g.types), "exhaustiveReverseGeocoding" in g && t(44, ct = g.exhaustiveReverseGeocoding), "excludeTypes" in g && t(45, Ye = g.excludeTypes), "zoom" in g && t(46, Te = g.zoom), "maxZoom" in g && t(47, Ke = g.maxZoom), "apiUrl" in g && t(48, ft = g.apiUrl), "fetchParameters" in g && t(49, dt = g.fetchParameters), "iconsBaseUrl" in g && t(12, Dt = g.iconsBaseUrl), "adjustUrlQuery" in g && t(50, ht = g.adjustUrlQuery), "$$scope" in g && t(60, 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 = Pe), a && !Pe && 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(57, N = void 0), t(14, R = void 0), t(18, ce = 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" && vt(N.id, { byId: !0 }).catch((g) => t(18, ce = g)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
2287
- 201326626 && (x && N && N.id !== gt && E && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, Be(N)) : x.fitBounds(st(N.bbox), 50, Be(N)), t(14, R = void 0), t(56, q = void 0), t(15, U = -1)), t(58, gt = 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
2291
  33554432 && q !== R && t(56, q = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
@@ -2293,16 +2293,16 @@ function hr(n, e, t) {
2293
2293
  33554464 && x && x.setEventHandler((g) => {
2294
2294
  switch (g.type) {
2295
2295
  case "mapClick":
2296
- D && ji(g.coordinates);
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 && yt(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
- q && 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
2308
  q && t(15, U = -1);
@@ -2310,25 +2310,25 @@ function hr(n, e, t) {
2310
2310
  }
2311
2311
  }), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
2312
2312
  49152 && t(59, i = R == null ? void 0 : R[U]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
2313
- 268436514 && x && i && E && at && x.flyTo(i.center, Be(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
2314
- 2080 && (Ve || x == null || x.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
2315
- 301991968 && x && Ve && !q && (x.setMarkers(i ? [i] : void 0, void 0), x.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
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
2316
  100663328 && x && x.setMarkers(q, N), n.$$.dirty[0] & /*selectedItemIndex*/
2317
2317
  32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
2318
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 = mt(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
- 268435456 && ve("select", i), n.$$.dirty[1] & /*picked*/
2326
- 67108864 && ve("pick", N), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
2327
- 81920 && ve("optionsVisibilityChange", Je && !!R), n.$$.dirty[0] & /*listFeatures*/
2328
- 16384 && ve("featuresListed", R), n.$$.dirty[1] & /*markedFeatures*/
2329
- 33554432 && ve("featuresMarked", q), n.$$.dirty[0] & /*reverseActive*/
2330
- 1 && ve("reverseToggle", D), n.$$.dirty[0] & /*searchValue*/
2331
- 2 && ve("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,63 +2338,63 @@ function hr(n, e, t) {
2338
2338
  d,
2339
2339
  f,
2340
2340
  b,
2341
- v,
2341
+ m,
2342
2342
  w,
2343
- C,
2343
+ k,
2344
+ G,
2344
2345
  F,
2345
- j,
2346
- se,
2347
- Dt,
2348
- Pe,
2346
+ oe,
2347
+ At,
2348
+ Ne,
2349
2349
  R,
2350
2350
  U,
2351
- Je,
2351
+ Ke,
2352
+ ue,
2352
2353
  ae,
2353
- ce,
2354
- ke,
2354
+ Me,
2355
2355
  zi,
2356
- Ft,
2357
- Zi,
2358
- pt,
2356
+ Ut,
2357
+ ji,
2358
+ mt,
2359
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,
2380
+ He,
2381
+ ke,
2377
2382
  Ve,
2378
- Me,
2383
+ at,
2379
2384
  ct,
2380
- Ye,
2381
- Te,
2382
- Ke,
2383
2385
  ft,
2384
- dt,
2385
- ht,
2386
2386
  Ai,
2387
2387
  Bi,
2388
- Ut,
2388
+ Bt,
2389
2389
  Di,
2390
2390
  Ui,
2391
2391
  q,
2392
2392
  N,
2393
- gt,
2393
+ dt,
2394
2394
  i,
2395
2395
  o,
2396
2396
  r,
2397
- Gi,
2397
+ Zi,
2398
2398
  qi,
2399
2399
  Qi,
2400
2400
  Hi,
@@ -2409,14 +2409,14 @@ function hr(n, e, t) {
2409
2409
  nn
2410
2410
  ];
2411
2411
  }
2412
- let gr = class extends Se {
2412
+ let hr = class extends Se {
2413
2413
  constructor(e) {
2414
- super(), xe(
2414
+ super(), Le(
2415
2415
  this,
2416
2416
  e,
2417
- hr,
2418
2417
  dr,
2419
- Le,
2418
+ fr,
2419
+ Ee,
2420
2420
  {
2421
2421
  ZOOM_DEFAULTS: 25,
2422
2422
  class: 2,
@@ -2486,11 +2486,11 @@ let gr = class extends Se {
2486
2486
  return this.$$.ctx[55];
2487
2487
  }
2488
2488
  };
2489
- function Ge(n, e, t = {}) {
2489
+ function Fe(n, e, t = {}) {
2490
2490
  const i = { type: "Feature" };
2491
2491
  return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
2492
2492
  }
2493
- function Wt(n, e, t = {}) {
2493
+ function It(n, e, t = {}) {
2494
2494
  for (const r of n) {
2495
2495
  if (r.length < 4)
2496
2496
  throw new Error(
@@ -2502,17 +2502,17 @@ function Wt(n, e, t = {}) {
2502
2502
  if (r[r.length - 1][o] !== r[0][o])
2503
2503
  throw new Error("First and last Position are not equivalent.");
2504
2504
  }
2505
- return Ge({
2505
+ return Fe({
2506
2506
  type: "Polygon",
2507
2507
  coordinates: n
2508
2508
  }, e, t);
2509
2509
  }
2510
- function qe(n, e = {}) {
2510
+ function je(n, e = {}) {
2511
2511
  const t = { type: "FeatureCollection" };
2512
2512
  return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
2513
2513
  }
2514
2514
  function Pi(n, e, t = {}) {
2515
- return Ge({
2515
+ return Fe({
2516
2516
  type: "MultiPolygon",
2517
2517
  coordinates: n
2518
2518
  }, e, t);
@@ -2539,67 +2539,67 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
2539
2539
  See the Apache Version 2.0 License for specific language governing permissions
2540
2540
  and limitations under the License.
2541
2541
  ***************************************************************************** */
2542
- function mr(n, e) {
2542
+ function gr(n, e) {
2543
2543
  var t = { label: 0, sent: function() {
2544
2544
  if (o[0] & 1) throw o[1];
2545
2545
  return o[1];
2546
- }, trys: [], ops: [] }, i, r, o, l;
2547
- 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() {
2548
2548
  return this;
2549
- }), l;
2550
- function s(u) {
2549
+ }), a;
2550
+ function s(l) {
2551
2551
  return function(d) {
2552
- return c([u, d]);
2552
+ return u([l, d]);
2553
2553
  };
2554
2554
  }
2555
- function c(u) {
2555
+ function u(l) {
2556
2556
  if (i) throw new TypeError("Generator is already executing.");
2557
2557
  for (; t; ) try {
2558
- 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;
2559
- 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]) {
2560
2560
  case 0:
2561
2561
  case 1:
2562
- o = u;
2562
+ o = l;
2563
2563
  break;
2564
2564
  case 4:
2565
- return t.label++, { value: u[1], done: !1 };
2565
+ return t.label++, { value: l[1], done: !1 };
2566
2566
  case 5:
2567
- t.label++, r = u[1], u = [0];
2567
+ t.label++, r = l[1], l = [0];
2568
2568
  continue;
2569
2569
  case 7:
2570
- u = t.ops.pop(), t.trys.pop();
2570
+ l = t.ops.pop(), t.trys.pop();
2571
2571
  continue;
2572
2572
  default:
2573
- 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)) {
2574
2574
  t = 0;
2575
2575
  continue;
2576
2576
  }
2577
- if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
2578
- t.label = u[1];
2577
+ if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
2578
+ t.label = l[1];
2579
2579
  break;
2580
2580
  }
2581
- if (u[0] === 6 && t.label < o[1]) {
2582
- t.label = o[1], o = u;
2581
+ if (l[0] === 6 && t.label < o[1]) {
2582
+ t.label = o[1], o = l;
2583
2583
  break;
2584
2584
  }
2585
2585
  if (o && t.label < o[2]) {
2586
- t.label = o[2], t.ops.push(u);
2586
+ t.label = o[2], t.ops.push(l);
2587
2587
  break;
2588
2588
  }
2589
2589
  o[2] && t.ops.pop(), t.trys.pop();
2590
2590
  continue;
2591
2591
  }
2592
- u = e.call(n, t);
2592
+ l = e.call(n, t);
2593
2593
  } catch (d) {
2594
- u = [6, d], r = 0;
2594
+ l = [6, d], r = 0;
2595
2595
  } finally {
2596
2596
  i = o = 0;
2597
2597
  }
2598
- if (u[0] & 5) throw u[1];
2599
- 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 };
2600
2600
  }
2601
2601
  }
2602
- var Ee = (
2602
+ var _e = (
2603
2603
  /** @class */
2604
2604
  /* @__PURE__ */ function() {
2605
2605
  function n(e, t) {
@@ -2608,13 +2608,13 @@ var Ee = (
2608
2608
  return n;
2609
2609
  }()
2610
2610
  );
2611
- function vr(n, e) {
2611
+ function mr(n, e) {
2612
2612
  return n > e ? 1 : n < e ? -1 : 0;
2613
2613
  }
2614
- function pe(n, e, t) {
2615
- for (var i = new Ee(null, null), r = i, o = i; ; ) {
2616
- var l = t(n, e.key);
2617
- 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) {
2618
2618
  if (e.left === null)
2619
2619
  break;
2620
2620
  if (t(n, e.left.key) < 0) {
@@ -2623,7 +2623,7 @@ function pe(n, e, t) {
2623
2623
  break;
2624
2624
  }
2625
2625
  o.left = e, o = e, e = e.left;
2626
- } else if (l > 0) {
2626
+ } else if (a > 0) {
2627
2627
  if (e.right === null)
2628
2628
  break;
2629
2629
  if (t(n, e.right.key) > 0) {
@@ -2637,62 +2637,62 @@ function pe(n, e, t) {
2637
2637
  }
2638
2638
  return r.right = e.left, o.left = e.right, e.left = i.right, e.right = i.left, e;
2639
2639
  }
2640
- function xt(n, e, t, i) {
2641
- var r = new Ee(n, e);
2640
+ function Et(n, e, t, i) {
2641
+ var r = new _e(n, e);
2642
2642
  if (t === null)
2643
2643
  return r.left = r.right = null, r;
2644
- t = pe(n, t, i);
2644
+ t = ye(n, t, i);
2645
2645
  var o = i(n, t.key);
2646
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;
2647
2647
  }
2648
- function ui(n, e, t) {
2648
+ function li(n, e, t) {
2649
2649
  var i = null, r = null;
2650
2650
  if (e) {
2651
- e = pe(n, e, t);
2651
+ e = ye(n, e, t);
2652
2652
  var o = t(e.key, n);
2653
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);
2654
2654
  }
2655
2655
  return { left: i, right: r };
2656
2656
  }
2657
- function pr(n, e, t) {
2658
- return e === null ? n : (n === null || (e = pe(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);
2659
2659
  }
2660
- function Nt(n, e, t, i, r) {
2660
+ function Ct(n, e, t, i, r) {
2661
2661
  if (n) {
2662
2662
  i("" + e + (t ? "└── " : "├── ") + r(n) + `
2663
2663
  `);
2664
2664
  var o = e + (t ? " " : "│ ");
2665
- n.left && Nt(n.left, o, !1, i, r), n.right && Nt(n.right, o, !0, i, r);
2665
+ n.left && Ct(n.left, o, !1, i, r), n.right && Ct(n.right, o, !0, i, r);
2666
2666
  }
2667
2667
  }
2668
- var At = (
2668
+ var Ot = (
2669
2669
  /** @class */
2670
2670
  function() {
2671
2671
  function n(e) {
2672
- e === void 0 && (e = vr), this._root = null, this._size = 0, this._comparator = e;
2672
+ e === void 0 && (e = mr), this._root = null, this._size = 0, this._comparator = e;
2673
2673
  }
2674
2674
  return n.prototype.insert = function(e, t) {
2675
- return this._size++, this._root = xt(e, t, this._root, this._comparator);
2675
+ return this._size++, this._root = Et(e, t, this._root, this._comparator);
2676
2676
  }, n.prototype.add = function(e, t) {
2677
- var i = new Ee(e, t);
2677
+ var i = new _e(e, t);
2678
2678
  this._root === null && (i.left = i.right = null, this._size++, this._root = i);
2679
- var r = this._comparator, o = pe(e, this._root, r), l = r(e, o.key);
2680
- 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;
2681
2681
  }, n.prototype.remove = function(e) {
2682
2682
  this._root = this._remove(e, this._root, this._comparator);
2683
2683
  }, n.prototype._remove = function(e, t, i) {
2684
2684
  var r;
2685
2685
  if (t === null)
2686
2686
  return null;
2687
- t = pe(e, t, i);
2687
+ t = ye(e, t, i);
2688
2688
  var o = i(e, t.key);
2689
- return o === 0 ? (t.left === null ? r = t.right : (r = pe(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;
2690
2690
  }, n.prototype.pop = function() {
2691
2691
  var e = this._root;
2692
2692
  if (e) {
2693
2693
  for (; e.left; )
2694
2694
  e = e.left;
2695
- return this._root = pe(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 };
2696
2696
  }
2697
2697
  return null;
2698
2698
  }, n.prototype.findStatic = function(e) {
@@ -2704,7 +2704,7 @@ var At = (
2704
2704
  }
2705
2705
  return null;
2706
2706
  }, n.prototype.find = function(e) {
2707
- return this._root && (this._root = pe(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;
2708
2708
  }, n.prototype.contains = function(e) {
2709
2709
  for (var t = this._root, i = this._comparator; t; ) {
2710
2710
  var r = i(e, t.key);
@@ -2718,13 +2718,13 @@ var At = (
2718
2718
  i !== null ? (r.push(i), i = i.left) : r.length !== 0 ? (i = r.pop(), e.call(t, i), i = i.right) : o = !0;
2719
2719
  return this;
2720
2720
  }, n.prototype.range = function(e, t, i, r) {
2721
- 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; )
2722
2722
  if (s)
2723
2723
  o.push(s), s = s.left;
2724
2724
  else {
2725
- if (s = o.pop(), c = l(s.key, t), c > 0)
2725
+ if (s = o.pop(), u = a(s.key, t), u > 0)
2726
2726
  break;
2727
- if (l(s.key, e) >= 0 && i.call(r, s))
2727
+ if (a(s.key, e) >= 0 && i.call(r, s))
2728
2728
  return this;
2729
2729
  s = s.right;
2730
2730
  }
@@ -2797,15 +2797,15 @@ var At = (
2797
2797
  }, n.prototype.clear = function() {
2798
2798
  return this._root = null, this._size = 0, this;
2799
2799
  }, n.prototype.toList = function() {
2800
- return br(this._root);
2800
+ return pr(this._root);
2801
2801
  }, n.prototype.load = function(e, t, i) {
2802
2802
  t === void 0 && (t = []), i === void 0 && (i = !1);
2803
2803
  var r = e.length, o = this._comparator;
2804
- if (i && Rt(e, t, 0, r - 1, o), this._root === null)
2805
- this._root = Tt(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;
2806
2806
  else {
2807
- var l = wr(this.toList(), yr(e, t), o);
2808
- r = this._size + r, this._root = Pt({ 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);
2809
2809
  }
2810
2810
  return this;
2811
2811
  }, n.prototype.isEmpty = function() {
@@ -2827,17 +2827,17 @@ var At = (
2827
2827
  return String(i.key);
2828
2828
  });
2829
2829
  var t = [];
2830
- return Nt(this._root, "", !0, function(i) {
2830
+ return Ct(this._root, "", !0, function(i) {
2831
2831
  return t.push(i);
2832
2832
  }, e), t.join("");
2833
2833
  }, n.prototype.update = function(e, t, i) {
2834
- var r = this._comparator, o = ui(e, this._root, r), l = o.left, s = o.right;
2835
- r(e, t) < 0 ? s = xt(t, i, s, r) : l = xt(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);
2836
2836
  }, n.prototype.split = function(e) {
2837
- return ui(e, this._root, this._comparator);
2837
+ return li(e, this._root, this._comparator);
2838
2838
  }, n.prototype[Symbol.iterator] = function() {
2839
2839
  var e, t, i;
2840
- return mr(this, function(r) {
2840
+ return gr(this, function(r) {
2841
2841
  switch (r.label) {
2842
2842
  case 0:
2843
2843
  e = this._root, t = [], i = !1, r.label = 1;
@@ -2861,96 +2861,96 @@ var At = (
2861
2861
  }, n;
2862
2862
  }()
2863
2863
  );
2864
- function Tt(n, e, t, i) {
2864
+ function kt(n, e, t, i) {
2865
2865
  var r = i - t;
2866
2866
  if (r > 0) {
2867
- var o = t + Math.floor(r / 2), l = n[o], s = e[o], c = new Ee(l, s);
2868
- return c.left = Tt(n, e, t, o), c.right = Tt(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;
2869
2869
  }
2870
2870
  return null;
2871
2871
  }
2872
- function yr(n, e) {
2873
- for (var t = new Ee(null, null), i = t, r = 0; r < n.length; r++)
2874
- i = i.next = new Ee(n[r], e[r]);
2872
+ function vr(n, e) {
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]);
2875
2875
  return i.next = null, t.next;
2876
2876
  }
2877
- function br(n) {
2878
- 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; )
2879
2879
  e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : i = !0;
2880
2880
  return o.next = null, r.next;
2881
2881
  }
2882
- function Pt(n, e, t) {
2882
+ function Nt(n, e, t) {
2883
2883
  var i = t - e;
2884
2884
  if (i > 0) {
2885
- var r = e + Math.floor(i / 2), o = Pt(n, e, r), l = n.head;
2886
- return l.left = o, n.head = n.head.next, l.right = Pt(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;
2887
2887
  }
2888
2888
  return null;
2889
2889
  }
2890
- function wr(n, e, t) {
2891
- for (var i = new Ee(null, null), r = i, o = n, l = e; o !== null && l !== null; )
2892
- t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
2893
- return o !== null ? r.next = o : l !== null && (r.next = l), i.next;
2890
+ function br(n, e, t) {
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;
2894
2894
  }
2895
- function Rt(n, e, t, i, r) {
2895
+ function Tt(n, e, t, i, r) {
2896
2896
  if (!(t >= i)) {
2897
- 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; ; ) {
2898
2898
  do
2899
- l++;
2900
- while (r(n[l], o) < 0);
2899
+ a++;
2900
+ while (r(n[a], o) < 0);
2901
2901
  do
2902
2902
  s--;
2903
2903
  while (r(n[s], o) > 0);
2904
- if (l >= s)
2904
+ if (a >= s)
2905
2905
  break;
2906
- var c = n[l];
2907
- 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;
2908
2908
  }
2909
- Rt(n, e, t, s, r), Rt(n, e, s + 1, i, r);
2909
+ Tt(n, e, t, s, r), Tt(n, e, s + 1, i, r);
2910
2910
  }
2911
2911
  }
2912
- const de = 11102230246251565e-32, Y = 134217729, _r = (3 + 8 * de) * de;
2913
- function St(n, e, t, i, r) {
2914
- let o, l, s, c, u = e[0], d = i[0], a = 0, f = 0;
2915
- 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]);
2916
2916
  let h = 0;
2917
- if (a < n && f < t)
2918
- 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; )
2919
- 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);
2920
- for (; a < n; )
2921
- 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);
2922
2922
  for (; f < t; )
2923
- 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);
2924
2924
  return (o !== 0 || h === 0) && (r[h++] = o), h;
2925
2925
  }
2926
- function Er(n, e) {
2926
+ function _r(n, e) {
2927
2927
  let t = e[0];
2928
2928
  for (let i = 1; i < n; i++) t += e[i];
2929
2929
  return t;
2930
2930
  }
2931
- function He(n) {
2931
+ function qe(n) {
2932
2932
  return new Float64Array(n);
2933
2933
  }
2934
- const Lr = (3 + 16 * de) * de, xr = (2 + 12 * de) * de, Sr = (9 + 64 * de) * de * de, Oe = He(4), ai = He(8), ci = He(12), fi = He(16), X = He(4);
2935
- function Mr(n, e, t, i, r, o, l) {
2936
- let s, c, u, d, a, f, h, y, b, v, m, E, S, _, k, x, L, w;
2937
- const C = n - r, I = t - r, D = e - o, F = i - o;
2938
- _ = C * F, f = Y * C, h = f - (f - C), y = C - h, f = Y * F, b = f - (f - F), v = F - b, k = y * v - (_ - h * b - y * b - h * v), x = D * I, f = Y * D, h = f - (f - D), y = D - h, f = Y * I, b = f - (f - I), v = I - b, L = y * v - (x - h * b - y * b - h * v), m = k - L, a = k - m, Oe[0] = k - (m + a) + (a - L), E = _ + m, a = E - _, S = _ - (E - a) + (m - a), m = S - x, a = S - m, Oe[1] = S - (m + a) + (a - x), w = E + m, a = w - E, Oe[2] = E - (w - a) + (m - a), Oe[3] = w;
2939
- let O = Er(4, Oe), M = xr * l;
2940
- 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 = Sr * l + _r * Math.abs(O), O += C * d + F * s - (D * u + I * c), O >= M || -O >= M)) return O;
2941
- _ = s * F, f = Y * s, h = f - (f - s), y = s - h, f = Y * F, b = f - (f - F), v = F - b, k = y * v - (_ - h * b - y * b - h * v), x = c * I, f = Y * c, h = f - (f - c), y = c - h, f = Y * I, b = f - (f - I), v = I - b, L = y * v - (x - h * b - y * b - h * v), 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 j = St(4, Oe, 4, X, ai);
2943
- _ = C * d, f = Y * C, h = f - (f - C), y = C - h, f = Y * d, b = f - (f - d), v = d - b, k = y * v - (_ - h * b - y * b - h * v), x = D * u, f = Y * D, h = f - (f - D), y = D - h, f = Y * u, b = f - (f - u), v = u - b, L = y * v - (x - h * b - y * b - h * v), 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 $ = St(j, ai, 4, X, ci);
2945
- _ = s * d, f = Y * s, h = f - (f - s), y = s - h, f = Y * d, b = f - (f - d), v = d - b, k = y * v - (_ - h * b - y * b - h * v), x = c * u, f = Y * c, h = f - (f - c), y = c - h, f = Y * u, b = f - (f - u), v = u - b, L = y * v - (x - h * b - y * b - h * v), 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;
2946
- const se = St($, ci, 4, X, fi);
2947
- return fi[se - 1];
2948
- }
2949
- function kr(n, e, t, i, r, o) {
2950
- const l = (e - o) * (t - r), s = (n - r) * (i - o), c = l - s, u = Math.abs(l + s);
2951
- return Math.abs(c) >= Lr * u ? c : -Mr(n, e, t, i, r, o, u);
2952
- }
2953
- const ze = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, It = (n, e) => {
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];
2948
+ }
2949
+ function Mr(n, e, t, i, r, o) {
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);
2952
+ }
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) => {
2954
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;
2955
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;
2956
2956
  return {
@@ -2964,20 +2964,20 @@ const ze = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n
2964
2964
  }
2965
2965
  };
2966
2966
  };
2967
- let ye = Number.EPSILON;
2968
- ye === void 0 && (ye = Math.pow(2, -52));
2969
- const Cr = ye * ye, di = (n, e) => {
2970
- 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)
2971
2971
  return 0;
2972
2972
  const t = n - e;
2973
2973
  return t * t < Cr * n * e ? 0 : n < e ? -1 : 1;
2974
2974
  };
2975
- class Nr {
2975
+ class kr {
2976
2976
  constructor() {
2977
2977
  this.reset();
2978
2978
  }
2979
2979
  reset() {
2980
- this.xRounder = new hi(), this.yRounder = new hi();
2980
+ this.xRounder = new di(), this.yRounder = new di();
2981
2981
  }
2982
2982
  round(e, t) {
2983
2983
  return {
@@ -2986,9 +2986,9 @@ class Nr {
2986
2986
  };
2987
2987
  }
2988
2988
  }
2989
- class hi {
2989
+ class di {
2990
2990
  constructor() {
2991
- this.tree = new At(), this.round(0);
2991
+ this.tree = new Ot(), this.round(0);
2992
2992
  }
2993
2993
  // Note: this can rounds input values backwards or forwards.
2994
2994
  // You might ask, why not restrict this to just rounding
@@ -2999,16 +2999,16 @@ class hi {
2999
2999
  // angle for t-intersections).
3000
3000
  round(e) {
3001
3001
  const t = this.tree.add(e), i = this.tree.prev(t);
3002
- if (i !== null && di(t.key, i.key) === 0)
3002
+ if (i !== null && fi(t.key, i.key) === 0)
3003
3003
  return this.tree.remove(e), i.key;
3004
3004
  const r = this.tree.next(t);
3005
- return r !== null && di(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
3005
+ return r !== null && fi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
3006
3006
  }
3007
3007
  }
3008
- const Qe = new Nr(), ot = (n, e) => n.x * e.y - n.y * e.x, Ri = (n, e) => n.x * e.x + n.y * e.y, gi = (n, e, t) => {
3009
- const i = kr(n.x, n.y, e.x, e.y, t.x, t.y);
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) => {
3009
+ const i = Mr(n.x, n.y, e.x, e.y, t.x, t.y);
3010
3010
  return i > 0 ? -1 : i < 0 ? 1 : 0;
3011
- }, lt = (n) => Math.sqrt(Ri(n, n)), Tr = (n, e, t) => {
3011
+ }, ot = (n) => Math.sqrt(Ri(n, n)), Nr = (n, e, t) => {
3012
3012
  const i = {
3013
3013
  x: e.x - n.x,
3014
3014
  y: e.y - n.y
@@ -3016,8 +3016,8 @@ const Qe = new Nr(), ot = (n, e) => n.x * e.y - n.y * e.x, Ri = (n, e) => n.x *
3016
3016
  x: t.x - n.x,
3017
3017
  y: t.y - n.y
3018
3018
  };
3019
- return ot(r, i) / lt(r) / lt(i);
3020
- }, Pr = (n, e, t) => {
3019
+ return nt(r, i) / ot(r) / ot(i);
3020
+ }, Tr = (n, e, t) => {
3021
3021
  const i = {
3022
3022
  x: e.x - n.x,
3023
3023
  y: e.y - n.y
@@ -3025,34 +3025,34 @@ const Qe = new Nr(), ot = (n, e) => n.x * e.y - n.y * e.x, Ri = (n, e) => n.x *
3025
3025
  x: t.x - n.x,
3026
3026
  y: t.y - n.y
3027
3027
  };
3028
- return Ri(r, i) / lt(r) / lt(i);
3029
- }, mi = (n, e, t) => e.y === 0 ? null : {
3028
+ return Ri(r, i) / ot(r) / ot(i);
3029
+ }, gi = (n, e, t) => e.y === 0 ? null : {
3030
3030
  x: n.x + e.x / e.y * (t - n.y),
3031
3031
  y: t
3032
- }, vi = (n, e, t) => e.x === 0 ? null : {
3032
+ }, mi = (n, e, t) => e.x === 0 ? null : {
3033
3033
  x: t,
3034
3034
  y: n.y + e.y / e.x * (t - n.x)
3035
- }, Rr = (n, e, t, i) => {
3036
- if (e.x === 0) return vi(t, i, n.x);
3037
- if (i.x === 0) return vi(n, e, t.x);
3038
- if (e.y === 0) return mi(t, i, n.y);
3039
- if (i.y === 0) return mi(n, e, t.y);
3040
- const r = ot(e, i);
3035
+ }, Pr = (n, e, t, i) => {
3036
+ if (e.x === 0) return mi(t, i, n.x);
3037
+ if (i.x === 0) return mi(n, e, t.x);
3038
+ if (e.y === 0) return gi(t, i, n.y);
3039
+ if (i.y === 0) return gi(n, e, t.y);
3040
+ const r = nt(e, i);
3041
3041
  if (r == 0) return null;
3042
3042
  const o = {
3043
3043
  x: t.x - n.x,
3044
3044
  y: t.y - n.y
3045
- }, 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;
3046
3046
  return {
3047
3047
  x: f,
3048
3048
  y: h
3049
3049
  };
3050
3050
  };
3051
- class re {
3051
+ class ne {
3052
3052
  // for ordering sweep events in the sweep event queue
3053
3053
  static compare(e, t) {
3054
- const i = re.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 : 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));
3056
3056
  }
3057
3057
  // for ordering points in sweep line order
3058
3058
  static comparePoints(e, t) {
@@ -3107,25 +3107,25 @@ class re {
3107
3107
  const t = /* @__PURE__ */ new Map(), i = (r) => {
3108
3108
  const o = r.otherSE;
3109
3109
  t.set(r, {
3110
- sine: Tr(this.point, e.point, o.point),
3111
- cosine: Pr(this.point, e.point, o.point)
3110
+ sine: Nr(this.point, e.point, o.point),
3111
+ cosine: Tr(this.point, e.point, o.point)
3112
3112
  });
3113
3113
  };
3114
3114
  return (r, o) => {
3115
3115
  t.has(r) || i(r), t.has(o) || i(o);
3116
3116
  const {
3117
- sine: l,
3117
+ sine: a,
3118
3118
  cosine: s
3119
3119
  } = t.get(r), {
3120
- sine: c,
3121
- cosine: u
3120
+ sine: u,
3121
+ cosine: l
3122
3122
  } = t.get(o);
3123
- 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;
3124
3124
  };
3125
3125
  }
3126
3126
  }
3127
- let Ir = 0;
3128
- class be {
3127
+ let Rr = 0;
3128
+ class pe {
3129
3129
  /* This compare() function is for ordering segments in the sweep
3130
3130
  * line tree, and does so according to the following criteria:
3131
3131
  *
@@ -3140,60 +3140,60 @@ class be {
3140
3140
  * is directly on the right-more of the two left inputs.
3141
3141
  */
3142
3142
  static compare(e, t) {
3143
- const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, l = t.rightSE.point.x;
3144
- 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;
3145
3145
  if (o < r) return -1;
3146
- 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;
3147
3147
  if (i < r) {
3148
- if (c < s && c < u) return 1;
3149
- if (c > s && c > u) return -1;
3150
- const a = e.comparePoint(t.leftSE.point);
3151
- if (a < 0) return 1;
3152
- 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;
3153
3153
  const f = t.comparePoint(e.rightSE.point);
3154
3154
  return f !== 0 ? f : -1;
3155
3155
  }
3156
3156
  if (i > r) {
3157
- if (s < c && s < d) return -1;
3158
- if (s > c && s > d) return 1;
3159
- const a = t.comparePoint(e.leftSE.point);
3160
- 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;
3161
3161
  const f = e.comparePoint(t.rightSE.point);
3162
3162
  return f < 0 ? 1 : f > 0 ? -1 : 1;
3163
3163
  }
3164
- if (s < c) return -1;
3165
- if (s > c) return 1;
3166
- if (o < l) {
3167
- const a = t.comparePoint(e.rightSE.point);
3168
- 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;
3169
3169
  }
3170
- if (o > l) {
3171
- const a = e.comparePoint(t.rightSE.point);
3172
- if (a < 0) return 1;
3173
- 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;
3174
3174
  }
3175
- if (o !== l) {
3176
- const a = u - s, f = o - i, h = d - c, y = l - r;
3177
- if (a > f && h < y) return 1;
3178
- 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;
3179
3179
  }
3180
- 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;
3181
3181
  }
3182
3182
  /* Warning: a reference to ringWindings input will be stored,
3183
3183
  * and possibly will be later modified */
3184
3184
  constructor(e, t, i, r) {
3185
- this.id = ++Ir, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = i, this.windings = r;
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;
3186
3186
  }
3187
3187
  static fromRing(e, t, i) {
3188
- let r, o, l;
3189
- const s = re.comparePoints(e, t);
3188
+ let r, o, a;
3189
+ const s = ne.comparePoints(e, t);
3190
3190
  if (s < 0)
3191
- r = e, o = t, l = 1;
3191
+ r = e, o = t, a = 1;
3192
3192
  else if (s > 0)
3193
- r = t, o = e, l = -1;
3193
+ r = t, o = e, a = -1;
3194
3194
  else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
3195
- const c = new re(r, !0), u = new re(o, !1);
3196
- 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]);
3197
3197
  }
3198
3198
  /* When a segment is split, the rightSE is replaced with a new sweep event */
3199
3199
  replaceRightSE(e) {
@@ -3240,10 +3240,10 @@ class be {
3240
3240
  const t = this.leftSE.point, i = this.rightSE.point, r = this.vector();
3241
3241
  if (t.x === i.x)
3242
3242
  return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
3243
- const o = (e.y - t.y) / r.y, l = t.x + o * r.x;
3244
- if (e.x === l) return 0;
3245
- const s = (e.x - t.x) / r.x, c = t.y + s * r.y;
3246
- 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;
3247
3247
  }
3248
3248
  /**
3249
3249
  * Given another segment, returns the first non-trivial intersection
@@ -3261,20 +3261,20 @@ class be {
3261
3261
  * Else, return null.
3262
3262
  */
3263
3263
  getIntersection(e) {
3264
- const t = this.bbox(), i = e.bbox(), r = It(t, i);
3264
+ const t = this.bbox(), i = e.bbox(), r = Pt(t, i);
3265
3265
  if (r === null) return null;
3266
- const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u = ze(t, s) && this.comparePoint(s) === 0, d = ze(i, o) && e.comparePoint(o) === 0, a = ze(t, c) && this.comparePoint(c) === 0, f = ze(i, l) && e.comparePoint(l) === 0;
3267
- if (d && u)
3268
- 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;
3269
3269
  if (d)
3270
- return a && o.x === c.x && o.y === c.y ? null : o;
3271
- if (u)
3272
- return f && l.x === s.x && l.y === s.y ? null : s;
3273
- if (f && a) return null;
3274
- if (f) return l;
3275
- if (a) return c;
3276
- const h = Rr(o, this.vector(), s, e.vector());
3277
- return h === null || !ze(r, h) ? null : Qe.round(h.x, h.y);
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;
3276
+ const h = Pr(o, this.vector(), s, e.vector());
3277
+ return h === null || !De(r, h) ? null : Ze.round(h.x, h.y);
3278
3278
  }
3279
3279
  /**
3280
3280
  * Split the given segment into multiple segments on the given points.
@@ -3289,10 +3289,10 @@ class be {
3289
3289
  * Warning: input array of points is modified
3290
3290
  */
3291
3291
  split(e) {
3292
- 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;
3293
3293
  this.replaceRightSE(o), t.push(o), t.push(r);
3294
- const s = new be(r, l, this.rings.slice(), this.windings.slice());
3295
- 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;
3296
3296
  }
3297
3297
  /* Swap which event is left and right */
3298
3298
  swapEvents() {
@@ -3307,7 +3307,7 @@ class be {
3307
3307
  let t = this, i = e;
3308
3308
  for (; t.consumedBy; ) t = t.consumedBy;
3309
3309
  for (; i.consumedBy; ) i = i.consumedBy;
3310
- const r = be.compare(t, i);
3310
+ const r = pe.compare(t, i);
3311
3311
  if (r !== 0) {
3312
3312
  if (r > 0) {
3313
3313
  const o = t;
@@ -3317,9 +3317,9 @@ class be {
3317
3317
  const o = t;
3318
3318
  t = i, i = o;
3319
3319
  }
3320
- for (let o = 0, l = i.rings.length; o < l; o++) {
3321
- const s = i.rings[o], c = i.windings[o], u = t.rings.indexOf(s);
3322
- 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;
3323
3323
  }
3324
3324
  i.rings = null, i.windings = null, i.consumedBy = t, i.leftSE.consumedBy = t.leftSE, i.rightSE.consumedBy = t.rightSE;
3325
3325
  }
@@ -3350,25 +3350,25 @@ class be {
3350
3350
  multiPolys: []
3351
3351
  };
3352
3352
  const t = this._afterState.rings, i = this._afterState.windings, r = this._afterState.multiPolys;
3353
- for (let s = 0, c = this.rings.length; s < c; s++) {
3354
- const u = this.rings[s], d = this.windings[s], a = t.indexOf(u);
3355
- 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;
3356
3356
  }
3357
- const o = [], l = [];
3358
- 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++) {
3359
3359
  if (i[s] === 0) continue;
3360
- const u = t[s], d = u.poly;
3361
- if (l.indexOf(d) === -1)
3362
- 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);
3363
3363
  else {
3364
- l.indexOf(d) === -1 && l.push(d);
3365
- const a = o.indexOf(u.poly);
3366
- 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);
3367
3367
  }
3368
3368
  }
3369
- for (let s = 0, c = o.length; s < c; s++) {
3370
- const u = o[s].multiPoly;
3371
- 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);
3372
3372
  }
3373
3373
  return this._afterState;
3374
3374
  }
@@ -3377,7 +3377,7 @@ class be {
3377
3377
  if (this.consumedBy) return !1;
3378
3378
  if (this._isInResult !== void 0) return this._isInResult;
3379
3379
  const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
3380
- switch (le.type) {
3380
+ switch (se.type) {
3381
3381
  case "union": {
3382
3382
  const i = e.length === 0, r = t.length === 0;
3383
3383
  this._isInResult = i !== r;
@@ -3385,7 +3385,7 @@ class be {
3385
3385
  }
3386
3386
  case "intersection": {
3387
3387
  let i, r;
3388
- 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;
3389
3389
  break;
3390
3390
  }
3391
3391
  case "xor": {
@@ -3399,18 +3399,18 @@ class be {
3399
3399
  break;
3400
3400
  }
3401
3401
  default:
3402
- throw new Error(`Unrecognized operation type found ${le.type}`);
3402
+ throw new Error(`Unrecognized operation type found ${se.type}`);
3403
3403
  }
3404
3404
  return this._isInResult;
3405
3405
  }
3406
3406
  }
3407
- class pi {
3407
+ class yi {
3408
3408
  constructor(e, t, i) {
3409
3409
  if (!Array.isArray(e) || e.length === 0)
3410
3410
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3411
3411
  if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
3412
3412
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3413
- const r = Qe.round(e[0][0], e[0][1]);
3413
+ const r = Ze.round(e[0][0], e[0][1]);
3414
3414
  this.bbox = {
3415
3415
  ll: {
3416
3416
  x: r.x,
@@ -3422,13 +3422,13 @@ class pi {
3422
3422
  }
3423
3423
  };
3424
3424
  let o = r;
3425
- for (let l = 1, s = e.length; l < s; l++) {
3426
- 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")
3427
3427
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3428
- let c = Qe.round(e[l][0], e[l][1]);
3429
- 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);
3430
3430
  }
3431
- (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));
3432
3432
  }
3433
3433
  getSweepEvents() {
3434
3434
  const e = [];
@@ -3439,11 +3439,11 @@ class pi {
3439
3439
  return e;
3440
3440
  }
3441
3441
  }
3442
- class Or {
3442
+ class Ir {
3443
3443
  constructor(e, t) {
3444
3444
  if (!Array.isArray(e))
3445
3445
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
3446
- this.exteriorRing = new pi(e[0], this, !0), this.bbox = {
3446
+ this.exteriorRing = new yi(e[0], this, !0), this.bbox = {
3447
3447
  ll: {
3448
3448
  x: this.exteriorRing.bbox.ll.x,
3449
3449
  y: this.exteriorRing.bbox.ll.y
@@ -3454,7 +3454,7 @@ class Or {
3454
3454
  }
3455
3455
  }, this.interiorRings = [];
3456
3456
  for (let i = 1, r = e.length; i < r; i++) {
3457
- const o = new pi(e[i], this, !1);
3457
+ const o = new yi(e[i], this, !1);
3458
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);
3459
3459
  }
3460
3460
  this.multiPoly = t;
@@ -3463,13 +3463,13 @@ class Or {
3463
3463
  const e = this.exteriorRing.getSweepEvents();
3464
3464
  for (let t = 0, i = this.interiorRings.length; t < i; t++) {
3465
3465
  const r = this.interiorRings[t].getSweepEvents();
3466
- for (let o = 0, l = r.length; o < l; o++)
3466
+ for (let o = 0, a = r.length; o < a; o++)
3467
3467
  e.push(r[o]);
3468
3468
  }
3469
3469
  return e;
3470
3470
  }
3471
3471
  }
3472
- class yi {
3472
+ class vi {
3473
3473
  constructor(e, t) {
3474
3474
  if (!Array.isArray(e))
3475
3475
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
@@ -3488,7 +3488,7 @@ class yi {
3488
3488
  }
3489
3489
  };
3490
3490
  for (let i = 0, r = e.length; i < r; i++) {
3491
- const o = new Or(e[i], this);
3491
+ const o = new Ir(e[i], this);
3492
3492
  o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
3493
3493
  }
3494
3494
  this.isSubject = t;
@@ -3497,13 +3497,13 @@ class yi {
3497
3497
  const e = [];
3498
3498
  for (let t = 0, i = this.polys.length; t < i; t++) {
3499
3499
  const r = this.polys[t].getSweepEvents();
3500
- for (let o = 0, l = r.length; o < l; o++)
3500
+ for (let o = 0, a = r.length; o < a; o++)
3501
3501
  e.push(r[o]);
3502
3502
  }
3503
3503
  return e;
3504
3504
  }
3505
3505
  }
3506
- class ut {
3506
+ class st {
3507
3507
  /* Given the segments from the sweep line pass, compute & return a series
3508
3508
  * of closed rings from all the segments marked to be part of the result */
3509
3509
  static factory(e) {
@@ -3511,39 +3511,39 @@ class ut {
3511
3511
  for (let i = 0, r = e.length; i < r; i++) {
3512
3512
  const o = e[i];
3513
3513
  if (!o.isInResult() || o.ringOut) continue;
3514
- let l = null, s = o.leftSE, c = o.rightSE;
3515
- const u = [s], d = s.point, a = [];
3516
- 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; )
3517
3517
  for (; ; ) {
3518
3518
  const f = s.getAvailableLinkedEvents();
3519
3519
  if (f.length === 0) {
3520
- const b = u[0].point, v = u[u.length - 1].point;
3521
- throw new Error(`Unable to complete output ring starting at [${b.x}, ${b.y}]. Last matching segment found ends at [${v.x}, ${v.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}].`);
3522
3522
  }
3523
3523
  if (f.length === 1) {
3524
- c = f[0].otherSE;
3524
+ u = f[0].otherSE;
3525
3525
  break;
3526
3526
  }
3527
3527
  let h = null;
3528
- for (let b = 0, v = a.length; b < v; b++)
3529
- if (a[b].point === s.point) {
3528
+ for (let b = 0, m = c.length; b < m; b++)
3529
+ if (c[b].point === s.point) {
3530
3530
  h = b;
3531
3531
  break;
3532
3532
  }
3533
3533
  if (h !== null) {
3534
- const b = a.splice(h)[0], v = u.splice(b.index);
3535
- v.unshift(v[0].otherSE), t.push(new ut(v.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()));
3536
3536
  continue;
3537
3537
  }
3538
- a.push({
3539
- index: u.length,
3538
+ c.push({
3539
+ index: l.length,
3540
3540
  point: s.point
3541
3541
  });
3542
- const y = s.getLeftmostComparator(l);
3543
- c = f.sort(y)[0].otherSE;
3542
+ const p = s.getLeftmostComparator(a);
3543
+ u = f.sort(p)[0].otherSE;
3544
3544
  break;
3545
3545
  }
3546
- t.push(new ut(u));
3546
+ t.push(new st(l));
3547
3547
  }
3548
3548
  return t;
3549
3549
  }
@@ -3556,16 +3556,16 @@ class ut {
3556
3556
  getGeom() {
3557
3557
  let e = this.events[0].point;
3558
3558
  const t = [e];
3559
- for (let u = 1, d = this.events.length - 1; u < d; u++) {
3560
- const a = this.events[u].point, f = this.events[u + 1].point;
3561
- gi(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);
3562
3562
  }
3563
3563
  if (t.length === 1) return null;
3564
3564
  const i = t[0], r = t[1];
3565
- gi(i, e, r) === 0 && t.shift(), t.push(t[0]);
3566
- const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
3567
- for (let u = l; u != s; u += o) c.push([t[u].x, t[u].y]);
3568
- return c;
3565
+ hi(i, e, r) === 0 && t.shift(), t.push(t[0]);
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;
3569
3569
  }
3570
3570
  isExteriorRing() {
3571
3571
  if (this._isExteriorRing === void 0) {
@@ -3581,8 +3581,8 @@ class ut {
3581
3581
  _calcEnclosingRing() {
3582
3582
  let e = this.events[0];
3583
3583
  for (let r = 1, o = this.events.length; r < o; r++) {
3584
- const l = this.events[r];
3585
- re.compare(e, l) > 0 && (e = l);
3584
+ const a = this.events[r];
3585
+ ne.compare(e, a) > 0 && (e = a);
3586
3586
  }
3587
3587
  let t = e.segment.prevInResult(), i = t ? t.prevInResult() : null;
3588
3588
  for (; ; ) {
@@ -3594,7 +3594,7 @@ class ut {
3594
3594
  }
3595
3595
  }
3596
3596
  }
3597
- class bi {
3597
+ class pi {
3598
3598
  constructor(e) {
3599
3599
  this.exteriorRing = e, e.poly = this, this.interiorRings = [];
3600
3600
  }
@@ -3611,7 +3611,7 @@ class bi {
3611
3611
  return e;
3612
3612
  }
3613
3613
  }
3614
- class Wr {
3614
+ class Or {
3615
3615
  constructor(e) {
3616
3616
  this.rings = e, this.polys = this._composePolys(e);
3617
3617
  }
@@ -3628,19 +3628,19 @@ class Wr {
3628
3628
  for (let i = 0, r = e.length; i < r; i++) {
3629
3629
  const o = e[i];
3630
3630
  if (!o.poly)
3631
- if (o.isExteriorRing()) t.push(new bi(o));
3631
+ if (o.isExteriorRing()) t.push(new pi(o));
3632
3632
  else {
3633
- const l = o.enclosingRing();
3634
- l.poly || t.push(new bi(l)), l.poly.addInterior(o);
3633
+ const a = o.enclosingRing();
3634
+ a.poly || t.push(new pi(a)), a.poly.addInterior(o);
3635
3635
  }
3636
3636
  }
3637
3637
  return t;
3638
3638
  }
3639
3639
  }
3640
- class Ar {
3640
+ class Wr {
3641
3641
  constructor(e) {
3642
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.compare;
3643
- this.queue = e, this.tree = new At(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 = [];
3644
3644
  }
3645
3645
  process(e) {
3646
3646
  const t = e.segment, i = [];
@@ -3648,51 +3648,51 @@ class Ar {
3648
3648
  return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), i;
3649
3649
  const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
3650
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.`);
3651
- let o = r, l = r, s, c;
3651
+ let o = r, a = r, s, u;
3652
3652
  for (; s === void 0; )
3653
3653
  o = this.tree.prev(o), o === null ? s = null : o.key.consumedBy === void 0 && (s = o.key);
3654
- for (; c === void 0; )
3655
- 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);
3656
3656
  if (e.isLeft) {
3657
- let u = null;
3657
+ let l = null;
3658
3658
  if (s) {
3659
- const a = s.getIntersection(t);
3660
- if (a !== null && (t.isAnEndpoint(a) || (u = a), !s.isAnEndpoint(a))) {
3661
- const f = this._splitSafely(s, a);
3662
- 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++)
3663
3663
  i.push(f[h]);
3664
3664
  }
3665
3665
  }
3666
3666
  let d = null;
3667
- if (c) {
3668
- const a = c.getIntersection(t);
3669
- if (a !== null && (t.isAnEndpoint(a) || (d = a), !c.isAnEndpoint(a))) {
3670
- const f = this._splitSafely(c, a);
3671
- 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++)
3672
3672
  i.push(f[h]);
3673
3673
  }
3674
3674
  }
3675
- if (u !== null || d !== null) {
3676
- let a = null;
3677
- 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);
3678
- const f = t.split(a);
3679
- 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++)
3680
3680
  i.push(f[h]);
3681
3681
  }
3682
3682
  i.length > 0 ? (this.tree.remove(t), i.push(e)) : (this.segments.push(t), t.prev = s);
3683
3683
  } else {
3684
- if (s && c) {
3685
- const u = s.getIntersection(c);
3686
- if (u !== null) {
3687
- if (!s.isAnEndpoint(u)) {
3688
- const d = this._splitSafely(s, u);
3689
- for (let a = 0, f = d.length; a < f; a++)
3690
- 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]);
3691
3691
  }
3692
- if (!c.isAnEndpoint(u)) {
3693
- const d = this._splitSafely(c, u);
3694
- for (let a = 0, f = d.length; a < f; a++)
3695
- 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]);
3696
3696
  }
3697
3697
  }
3698
3698
  }
@@ -3710,157 +3710,157 @@ class Ar {
3710
3710
  return r.push(i), e.consumedBy === void 0 && this.tree.add(e), r;
3711
3711
  }
3712
3712
  }
3713
- const wi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Br = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
3714
- class Dr {
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;
3714
+ class Br {
3715
3715
  run(e, t, i) {
3716
- le.type = e, Qe.reset();
3717
- const r = [new yi(t, !0)];
3718
- for (let a = 0, f = i.length; a < f; a++)
3719
- r.push(new yi(i[a], !1));
3720
- if (le.numMultiPolys = r.length, le.type === "difference") {
3721
- const a = r[0];
3716
+ se.type = e, Ze.reset();
3717
+ const r = [new vi(t, !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];
3722
3722
  let f = 1;
3723
3723
  for (; f < r.length; )
3724
- It(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
3724
+ Pt(r[f].bbox, c.bbox) !== null ? f++ : r.splice(f, 1);
3725
3725
  }
3726
- if (le.type === "intersection")
3727
- for (let a = 0, f = r.length; a < f; a++) {
3728
- const h = r[a];
3729
- for (let y = a + 1, b = r.length; y < b; y++)
3730
- if (It(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 [];
3731
3731
  }
3732
- const o = new At(re.compare);
3733
- for (let a = 0, f = r.length; a < f; a++) {
3734
- const h = r[a].getSweepEvents();
3735
- for (let y = 0, b = h.length; y < b; y++)
3736
- if (o.insert(h[y]), o.size > wi)
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)
3737
3737
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
3738
3738
  }
3739
- const l = new Ar(o);
3740
- let s = o.size, c = o.pop();
3741
- for (; c; ) {
3742
- 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;
3743
3743
  if (o.size === s) {
3744
- const h = a.segment;
3745
- 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.`);
3746
3746
  }
3747
- if (o.size > wi)
3747
+ if (o.size > bi)
3748
3748
  throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
3749
- if (l.segments.length > Br)
3749
+ if (a.segments.length > Ar)
3750
3750
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
3751
- const f = l.process(a);
3752
- 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++) {
3753
3753
  const b = f[h];
3754
3754
  b.consumedBy === void 0 && o.insert(b);
3755
3755
  }
3756
- s = o.size, c = o.pop();
3756
+ s = o.size, u = o.pop();
3757
3757
  }
3758
- Qe.reset();
3759
- const u = ut.factory(l.segments);
3760
- return new Wr(u).getGeom();
3758
+ Ze.reset();
3759
+ const l = st.factory(a.segments);
3760
+ return new Or(l).getGeom();
3761
3761
  }
3762
3762
  }
3763
- const le = new Dr(), Ur = function(n) {
3763
+ const se = new Br(), Dr = function(n) {
3764
3764
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3765
3765
  t[i - 1] = arguments[i];
3766
- return le.run("union", n, t);
3767
- }, zr = function(n) {
3766
+ return se.run("union", n, t);
3767
+ }, Ur = function(n) {
3768
3768
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3769
3769
  t[i - 1] = arguments[i];
3770
- return le.run("intersection", n, t);
3771
- }, Fr = function(n) {
3770
+ return se.run("intersection", n, t);
3771
+ }, zr = function(n) {
3772
3772
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3773
3773
  t[i - 1] = arguments[i];
3774
- return le.run("xor", n, t);
3775
- }, jr = function(n) {
3774
+ return se.run("xor", n, t);
3775
+ }, Gr = function(n) {
3776
3776
  for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
3777
3777
  t[i - 1] = arguments[i];
3778
- return le.run("difference", n, t);
3778
+ return se.run("difference", n, t);
3779
3779
  };
3780
3780
  var Ii = {
3781
- union: Ur,
3782
- intersection: zr,
3783
- xor: Fr,
3784
- difference: jr
3781
+ union: Dr,
3782
+ intersection: Ur,
3783
+ xor: zr,
3784
+ difference: Gr
3785
3785
  };
3786
3786
  function Oi(n, e, t) {
3787
3787
  if (n !== null)
3788
- for (var i, r, o, l, s, c, u, d = 0, a = 0, f, h = n.type, y = h === "FeatureCollection", b = h === "Feature", v = y ? n.features.length : 1, m = 0; m < v; m++) {
3789
- u = y ? n.features[m].geometry : b ? n.geometry : n, f = u ? u.type === "GeometryCollection" : !1, s = f ? u.geometries.length : 1;
3790
- for (var E = 0; E < s; E++) {
3791
- var S = 0, _ = 0;
3792
- if (l = f ? u.geometries[E] : u, l !== null) {
3793
- c = l.coordinates;
3794
- var k = l.type;
3795
- 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) {
3796
3796
  case null:
3797
3797
  break;
3798
3798
  case "Point":
3799
3799
  if (e(
3800
+ u,
3800
3801
  c,
3801
- a,
3802
- m,
3803
- S,
3804
- _
3802
+ y,
3803
+ L,
3804
+ E
3805
3805
  ) === !1)
3806
3806
  return !1;
3807
- a++, S++;
3807
+ c++, L++;
3808
3808
  break;
3809
3809
  case "LineString":
3810
3810
  case "MultiPoint":
3811
- for (i = 0; i < c.length; i++) {
3811
+ for (i = 0; i < u.length; i++) {
3812
3812
  if (e(
3813
- c[i],
3814
- a,
3815
- m,
3816
- S,
3817
- _
3813
+ u[i],
3814
+ c,
3815
+ y,
3816
+ L,
3817
+ E
3818
3818
  ) === !1)
3819
3819
  return !1;
3820
- a++, k === "MultiPoint" && S++;
3820
+ c++, C === "MultiPoint" && L++;
3821
3821
  }
3822
- k === "LineString" && S++;
3822
+ C === "LineString" && L++;
3823
3823
  break;
3824
3824
  case "Polygon":
3825
3825
  case "MultiLineString":
3826
- for (i = 0; i < c.length; i++) {
3827
- 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++) {
3828
3828
  if (e(
3829
- c[i][r],
3830
- a,
3831
- m,
3832
- S,
3833
- _
3829
+ u[i][r],
3830
+ c,
3831
+ y,
3832
+ L,
3833
+ E
3834
3834
  ) === !1)
3835
3835
  return !1;
3836
- a++;
3836
+ c++;
3837
3837
  }
3838
- k === "MultiLineString" && S++, k === "Polygon" && _++;
3838
+ C === "MultiLineString" && L++, C === "Polygon" && E++;
3839
3839
  }
3840
- k === "Polygon" && S++;
3840
+ C === "Polygon" && L++;
3841
3841
  break;
3842
3842
  case "MultiPolygon":
3843
- for (i = 0; i < c.length; i++) {
3844
- for (_ = 0, r = 0; r < c[i].length; r++) {
3845
- 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++) {
3846
3846
  if (e(
3847
- c[i][r][o],
3848
- a,
3849
- m,
3850
- S,
3851
- _
3847
+ u[i][r][o],
3848
+ c,
3849
+ y,
3850
+ L,
3851
+ E
3852
3852
  ) === !1)
3853
3853
  return !1;
3854
- a++;
3854
+ c++;
3855
3855
  }
3856
- _++;
3856
+ E++;
3857
3857
  }
3858
- S++;
3858
+ L++;
3859
3859
  }
3860
3860
  break;
3861
3861
  case "GeometryCollection":
3862
- for (i = 0; i < l.geometries.length; i++)
3863
- if (Oi(l.geometries[i], e) === !1)
3862
+ for (i = 0; i < a.geometries.length; i++)
3863
+ if (Oi(a.geometries[i], e) === !1)
3864
3864
  return !1;
3865
3865
  break;
3866
3866
  default:
@@ -3870,17 +3870,17 @@ function Oi(n, e, t) {
3870
3870
  }
3871
3871
  }
3872
3872
  }
3873
- function Bt(n, e) {
3874
- 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;
3875
3875
  for (t = 0; t < b; t++) {
3876
- 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++) {
3877
- 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) {
3878
3878
  if (e(
3879
3879
  null,
3880
3880
  f,
3881
- u,
3881
+ l,
3882
3882
  d,
3883
- a
3883
+ c
3884
3884
  ) === !1)
3885
3885
  return !1;
3886
3886
  continue;
@@ -3895,9 +3895,9 @@ function Bt(n, e) {
3895
3895
  if (e(
3896
3896
  o,
3897
3897
  f,
3898
- u,
3898
+ l,
3899
3899
  d,
3900
- a
3900
+ c
3901
3901
  ) === !1)
3902
3902
  return !1;
3903
3903
  break;
@@ -3907,9 +3907,9 @@ function Bt(n, e) {
3907
3907
  if (e(
3908
3908
  o.geometries[i],
3909
3909
  f,
3910
- u,
3910
+ l,
3911
3911
  d,
3912
- a
3912
+ c
3913
3913
  ) === !1)
3914
3914
  return !1;
3915
3915
  break;
@@ -3921,8 +3921,8 @@ function Bt(n, e) {
3921
3921
  f++;
3922
3922
  }
3923
3923
  }
3924
- function Zr(n, e) {
3925
- Bt(n, function(t, i, r, o, l) {
3924
+ function Fr(n, e) {
3925
+ Wt(n, function(t, i, r, o, a) {
3926
3926
  var s = t === null ? null : t.type;
3927
3927
  switch (s) {
3928
3928
  case null:
@@ -3930,44 +3930,44 @@ function Zr(n, e) {
3930
3930
  case "LineString":
3931
3931
  case "Polygon":
3932
3932
  return e(
3933
- Ge(t, r, { bbox: o, id: l }),
3933
+ Fe(t, r, { bbox: o, id: a }),
3934
3934
  i,
3935
3935
  0
3936
3936
  ) === !1 ? !1 : void 0;
3937
3937
  }
3938
- var c;
3938
+ var u;
3939
3939
  switch (s) {
3940
3940
  case "MultiPoint":
3941
- c = "Point";
3941
+ u = "Point";
3942
3942
  break;
3943
3943
  case "MultiLineString":
3944
- c = "LineString";
3944
+ u = "LineString";
3945
3945
  break;
3946
3946
  case "MultiPolygon":
3947
- c = "Polygon";
3947
+ u = "Polygon";
3948
3948
  break;
3949
3949
  }
3950
- for (var u = 0; u < t.coordinates.length; u++) {
3951
- var d = t.coordinates[u], a = {
3952
- type: c,
3950
+ for (var l = 0; l < t.coordinates.length; l++) {
3951
+ var d = t.coordinates[l], c = {
3952
+ type: u,
3953
3953
  coordinates: d
3954
3954
  };
3955
- if (e(Ge(a, r), i, u) === !1)
3955
+ if (e(Fe(c, r), i, l) === !1)
3956
3956
  return !1;
3957
3957
  }
3958
3958
  });
3959
3959
  }
3960
- function Gr(n, e = {}) {
3960
+ function jr(n, e = {}) {
3961
3961
  const t = [];
3962
- if (Bt(n, (r) => {
3962
+ if (Wt(n, (r) => {
3963
3963
  t.push(r.coordinates);
3964
3964
  }), t.length < 2)
3965
3965
  throw new Error("Must have at least 2 geometries");
3966
3966
  const i = Ii.union(t[0], ...t.slice(1));
3967
- return i.length === 0 ? null : i.length === 1 ? Wt(i[0], e.properties) : Pi(i, e.properties);
3967
+ return i.length === 0 ? null : i.length === 1 ? It(i[0], e.properties) : Pi(i, e.properties);
3968
3968
  }
3969
- var Wi = Gr;
3970
- function qr(n, e = {}) {
3969
+ var Wi = jr;
3970
+ function Zr(n, e = {}) {
3971
3971
  if (n.bbox != null && e.recompute !== !0)
3972
3972
  return n.bbox;
3973
3973
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
@@ -3975,30 +3975,30 @@ function qr(n, e = {}) {
3975
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]);
3976
3976
  }), t;
3977
3977
  }
3978
- var _i = qr;
3979
- function Qr(n) {
3978
+ var wi = Zr;
3979
+ function qr(n) {
3980
3980
  const e = [];
3981
- if (Bt(n, (r) => {
3981
+ if (Wt(n, (r) => {
3982
3982
  e.push(r.coordinates);
3983
3983
  }), e.length < 2)
3984
3984
  throw new Error("Must have at least two features");
3985
3985
  const t = n.features[0].properties || {}, i = Ii.difference(e[0], ...e.slice(1));
3986
- return i.length === 0 ? null : i.length === 1 ? Wt(i[0], t) : Pi(i, t);
3986
+ return i.length === 0 ? null : i.length === 1 ? It(i[0], t) : Pi(i, t);
3987
3987
  }
3988
- var Hr = Qr;
3989
- function Vr(n) {
3988
+ var Qr = qr;
3989
+ function Hr(n) {
3990
3990
  if (!n)
3991
3991
  throw new Error("geojson is required");
3992
3992
  var e = [];
3993
- return Zr(n, function(t) {
3993
+ return Fr(n, function(t) {
3994
3994
  e.push(t);
3995
- }), qe(e);
3995
+ }), je(e);
3996
3996
  }
3997
- var Yr = Vr;
3998
- function Ei(n, e) {
3999
- const t = Hr(
4000
- qe([
4001
- Wt([
3997
+ var Vr = Hr;
3998
+ function _i(n, e) {
3999
+ const t = Qr(
4000
+ je([
4001
+ It([
4002
4002
  [
4003
4003
  [180, 90],
4004
4004
  [-180, 90],
@@ -4013,28 +4013,27 @@ function Ei(n, e) {
4013
4013
  if (!t)
4014
4014
  return;
4015
4015
  t.properties = { isMask: !0 };
4016
- const i = st(_i(n)), r = (i[2] - i[0]) / 360 / 1e3, o = i[0] < -180, l = i[2] > 180, s = Yr(n);
4017
- if (s.features.length > 1 && (o || l))
4018
- for (const c of s.features) {
4019
- const u = st(_i(c));
4020
- if (l && u[0] < -180 + r)
4021
- for (const d of c.geometry.coordinates)
4022
- for (const a of d)
4023
- a[0] += 360 - r;
4024
- if (o && u[2] > 180 - r)
4025
- for (const d of c.geometry.coordinates)
4026
- for (const a of d)
4027
- 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;
4028
4028
  }
4029
4029
  e(
4030
- qe([
4030
+ je([
4031
4031
  s.features.length < 2 ? n : Wi(s) ?? n,
4032
4032
  t
4033
4033
  ])
4034
4034
  );
4035
4035
  }
4036
- const Li = qe([]);
4037
- function Kr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
4036
+ const Ei = je([]), Li = {
4038
4037
  fill: {
4039
4038
  paint: {
4040
4039
  "fill-color": "#000",
@@ -4053,262 +4052,275 @@ function Kr(n, e, t = !0, i = !0, r = {}, o = {}, l = {
4053
4052
  },
4054
4053
  filter: ["!", ["has", "isMask"]]
4055
4054
  }
4056
- }) {
4055
+ };
4056
+ function Yr(n, e, t = !0, i = !0, r = {}, o = {}, a = Li) {
4057
4057
  let s;
4058
- const c = [];
4059
- let u, d, a;
4058
+ const u = [];
4059
+ let l, d, c;
4060
4060
  function f() {
4061
- !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", {
4062
4063
  type: "geojson",
4063
- data: Li
4064
- }), !n.getLayer("full-geom-fill") && (l != null && l.fill) && n.addLayer({
4065
- ...l == null ? void 0 : l.fill,
4064
+ data: Ei
4065
+ }), !n.getLayer("full-geom-fill") && (m != null && m.fill) && n.addLayer({
4066
+ ...m == null ? void 0 : m.fill,
4066
4067
  id: "full-geom-fill",
4067
4068
  type: "fill",
4068
4069
  source: "full-geom"
4069
- }), !n.getLayer("full-geom-line") && (l != null && l.line) && n.addLayer({
4070
- ...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,
4071
4072
  id: "full-geom-line",
4072
4073
  type: "line",
4073
4074
  source: "full-geom"
4074
- }), a && b(a);
4075
+ }), c && b(c);
4075
4076
  }
4076
4077
  n.loaded() ? f() : n.once("load", () => {
4077
4078
  f();
4078
4079
  }), n.on("styledata", () => {
4079
4080
  f();
4080
4081
  });
4081
- const h = (v) => {
4082
+ const h = (m) => {
4082
4083
  s == null || s({
4083
4084
  type: "mapClick",
4084
- coordinates: [v.lngLat.lng, v.lngLat.lat]
4085
+ coordinates: [m.lngLat.lng, m.lngLat.lat]
4085
4086
  });
4086
4087
  };
4087
- function y(v = !1) {
4088
+ function p(m = !1) {
4088
4089
  if (!e)
4089
4090
  throw new Error();
4090
- const m = document.createElement("div");
4091
- return v && m.classList.add("marker-interactive"), new Gn({
4091
+ const y = document.createElement("div");
4092
+ return m && y.classList.add("marker-interactive"), new jn({
4092
4093
  props: { displayIn: "maplibre" },
4093
- target: m
4094
- }), new e.Marker({ element: m, offset: [1, -13] });
4094
+ target: y
4095
+ }), new e.Marker({ element: y, offset: [1, -13] });
4095
4096
  }
4096
- function b(v) {
4097
- var m;
4098
- a = v, v && ((m = n.getSource("full-geom")) == null || m.setData(v));
4097
+ function b(m) {
4098
+ var y;
4099
+ c = m, m && ((y = n.getSource("full-geom")) == null || y.setData(m));
4099
4100
  }
4100
4101
  return {
4101
- setEventHandler(v) {
4102
- v ? (s = v, 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));
4103
4104
  },
4104
- flyTo(v, m) {
4105
- n.flyTo({ center: v, ...m ? { zoom: m } : {}, ...r });
4105
+ flyTo(m, y) {
4106
+ n.flyTo({ center: m, ...y ? { zoom: y } : {}, ...r });
4106
4107
  },
4107
- fitBounds(v, m, E) {
4108
+ fitBounds(m, y, _) {
4108
4109
  n.fitBounds(
4109
4110
  [
4110
- [v[0], v[1]],
4111
- [v[2], v[3]]
4111
+ [m[0], m[1]],
4112
+ [m[2], m[3]]
4112
4113
  ],
4113
- { padding: m, ...E ? { maxZoom: E } : {}, ...o }
4114
+ { padding: y, ..._ ? { maxZoom: _ } : {}, ...o }
4114
4115
  );
4115
4116
  },
4116
- indicateReverse(v) {
4117
- n.getCanvasContainer().style.cursor = v ? "crosshair" : "";
4117
+ indicateReverse(m) {
4118
+ n.getCanvasContainer().style.cursor = m ? "crosshair" : "";
4118
4119
  },
4119
- setReverseMarker(v) {
4120
- !e || !t || (d ? v ? d.setLngLat(v) : (d.remove(), d = void 0) : v && (d = (typeof t == "object" ? new e.Marker(t) : y()).setLngLat(v).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"))));
4121
4122
  },
4122
- setMarkers(v, m) {
4123
- if (t) {
4124
- for (const E of c)
4125
- E.remove();
4126
- if (c.length = 0, b(Li), !!e) {
4127
- if (m) {
4128
- let E = !1;
4129
- if (m.geometry.type === "GeometryCollection") {
4130
- const S = m.geometry.geometries.filter(
4131
- (_) => _.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)))
4132
4136
  );
4133
- e: if (S.length > 0) {
4134
- const _ = Wi(
4135
- qe(S.map((k) => Ge(k)))
4136
- );
4137
- if (!_)
4138
- break e;
4139
- Ei(
4140
- {
4141
- ...m,
4142
- geometry: _.geometry
4143
- },
4144
- b
4145
- ), E = !0;
4146
- } else {
4147
- const _ = m.geometry.geometries.filter(
4148
- (k) => k.type === "LineString" || k.type === "MultiLineString"
4149
- );
4150
- _.length > 0 && (b({
4151
- ...m,
4152
- geometry: { type: "GeometryCollection", geometries: _ }
4153
- }), E = !0);
4154
- }
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);
4155
4154
  }
4156
- if (!E) {
4157
- if (m.geometry.type === "Polygon" || m.geometry.type === "MultiPolygon")
4158
- Ei(m, b);
4159
- else if (m.geometry.type === "LineString" || m.geometry.type === "MultiLineString") {
4160
- b(m);
4161
- return;
4162
- }
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;
4163
4162
  }
4164
- t && c.push(
4165
- (typeof t == "object" ? new e.Marker(t) : y()).setLngLat(m.center).addTo(n)
4166
- );
4167
4163
  }
4168
- if (i)
4169
- for (const E of v ?? []) {
4170
- 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)
4171
4178
  continue;
4172
- 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(
4173
4181
  new e.Popup({
4174
4182
  offset: [1, -27],
4175
4183
  closeButton: !1,
4176
4184
  closeOnMove: !0,
4177
4185
  className: "maptiler-gc-popup"
4178
4186
  }).setText(
4179
- E.place_type[0] === "reverse" ? E.place_name : E.place_name.replace(/,.*/, "")
4187
+ _.place_type[0] === "reverse" ? _.place_name : _.place_name.replace(/,.*/, "")
4180
4188
  )
4181
- ).addTo(n), _ = S.getElement();
4182
- _.addEventListener("click", (k) => {
4183
- k.stopPropagation(), s == null || s({ type: "markerClick", id: E.id });
4184
- }), _.addEventListener("mouseenter", () => {
4185
- s == null || s({ type: "markerMouseEnter", id: E.id }), S.togglePopup();
4186
- }), _.addEventListener("mouseleave", () => {
4187
- s == null || s({ type: "markerMouseLeave", id: E.id }), S.togglePopup();
4188
- }), c.push(S);
4189
- }
4190
- }
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
+ }
4191
4199
  }
4192
4200
  },
4193
- setSelectedMarker(v) {
4194
- u && u.getElement().classList.toggle("marker-selected", !1), u = v > -1 ? c[v] : 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);
4195
4203
  },
4196
4204
  getCenterAndZoom() {
4197
- const v = n.getCenter();
4198
- return [n.getZoom(), v.lng, v.lat];
4205
+ const m = n.getCenter();
4206
+ return [n.getZoom(), m.lng, m.lat];
4199
4207
  }
4200
4208
  };
4201
4209
  }
4202
- var te, Ne;
4203
- class Xr extends EventTarget {
4204
- constructor(t = {}) {
4205
- super();
4206
- Et(this, te);
4207
- Et(this, Ne);
4208
- et(this, Ne, t);
4209
- }
4210
- onAddInt(t) {
4211
- const i = document.createElement("div");
4212
- i.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
4213
- const {
4214
- marker: r,
4215
- showResultMarkers: o,
4216
- flyTo: l,
4217
- fullGeometryStyle: s,
4218
- ...c
4219
- } = ne(this, Ne), u = typeof l == "boolean" ? {} : l, d = this.getExtraProps(t, i), f = {
4220
- mapController: Kr(
4221
- t,
4222
- this.getMapLibreGl(),
4223
- r,
4224
- o,
4225
- u,
4226
- u,
4227
- s
4228
- ),
4229
- flyTo: l === void 0 ? !0 : !!l,
4230
- apiKey: "",
4231
- // just to satisfy apiKey; TODO find a better solution
4232
- ...d,
4233
- ...c
4234
- };
4235
- if (!f.apiKey)
4236
- throw new Error("no apiKey provided");
4237
- et(this, te, new gr({ target: i, props: f }));
4238
- for (const h of [
4239
- "select",
4240
- "pick",
4241
- "featuresListed",
4242
- "featuresMarked",
4243
- "response",
4244
- "optionsVisibilityChange",
4245
- "reverseToggle",
4246
- "queryChange"
4247
- ])
4248
- ne(this, te).$on(h, (y) => this.dispatchEvent(y));
4249
- return i;
4250
- }
4251
- setOptions(t) {
4252
- var c;
4253
- et(this, Ne, t);
4254
- const {
4255
- marker: i,
4256
- showResultMarkers: r,
4257
- flyTo: o,
4258
- fullGeometryStyle: l,
4259
- ...s
4260
- } = ne(this, Ne);
4261
- (c = ne(this, te)) == null || c.$set(s);
4262
- }
4263
- setQuery(t, i = !0) {
4264
- var r;
4265
- (r = ne(this, te)) == null || r.setQuery(t, i);
4266
- }
4267
- clearMap() {
4268
- var t;
4269
- (t = ne(this, te)) == null || t.clearMap();
4270
- }
4271
- clearList() {
4272
- var t;
4273
- (t = ne(this, te)) == null || t.clearList();
4274
- }
4275
- setReverseMode(t) {
4276
- var i;
4277
- (i = ne(this, te)) == null || i.$set({ reverseActive: t });
4278
- }
4279
- focus() {
4280
- var t;
4281
- (t = ne(this, te)) == null || t.focus();
4282
- }
4283
- blur() {
4284
- var t;
4285
- (t = ne(this, te)) == null || t.blur();
4286
- }
4287
- onRemove() {
4288
- var t;
4289
- (t = ne(this, te)) == null || t.$destroy();
4290
- }
4291
- }
4292
- te = new WeakMap(), Ne = new WeakMap();
4293
- class eo extends Xr {
4294
- getMapLibreGl() {
4295
- return sn;
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;
4296
4315
  }
4316
+ );
4317
+ class to extends Xr {
4297
4318
  onAdd(e) {
4298
4319
  return super.onAddInt(e);
4299
4320
  }
4300
- getExtraProps(e, t) {
4301
- const i = {};
4302
- if (!("getSdkConfig" in e && typeof e.getSdkConfig == "function"))
4303
- throw new Error("MapTiler SDK not detected");
4304
- const { primaryLanguage: r, apiKey: o } = e.getSdkConfig();
4305
- i.apiKey = o;
4306
- const l = /^([a-z]{2})($|_|-)/.exec(r);
4307
- return l && (i.language = l[1]), t.className += " maptiler-ctrl", i;
4308
- }
4309
4321
  }
4310
4322
  export {
4311
- eo as GeocodingControl,
4312
- Kr as createMapLibreGlMapController
4323
+ to as GeocodingControl,
4324
+ Yr as createMapLibreGlMapController
4313
4325
  };
4314
4326
  //# sourceMappingURL=maptilersdk.js.map