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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/MapLibreBasedGeocodingControl.d.ts +70 -35
  2. package/leaflet-controller.d.ts +1 -1
  3. package/leaflet-controller.js +407 -398
  4. package/leaflet-controller.js.map +1 -1
  5. package/leaflet-controller.umd.js +3 -3
  6. package/leaflet-controller.umd.js.map +1 -1
  7. package/leaflet.d.ts +52 -16
  8. package/leaflet.js +888 -870
  9. package/leaflet.js.map +1 -1
  10. package/leaflet.umd.js +3 -3
  11. package/leaflet.umd.js.map +1 -1
  12. package/maplibregl-controller.d.ts +7 -7
  13. package/maplibregl-controller.js +421 -413
  14. package/maplibregl-controller.js.map +1 -1
  15. package/maplibregl-controller.umd.js +3 -3
  16. package/maplibregl-controller.umd.js.map +1 -1
  17. package/maplibregl.d.ts +29 -5
  18. package/maplibregl.js +1244 -1236
  19. package/maplibregl.js.map +1 -1
  20. package/maplibregl.umd.js +3 -3
  21. package/maplibregl.umd.js.map +1 -1
  22. package/maptilersdk.d.ts +29 -5
  23. package/maptilersdk.js +1194 -1180
  24. package/maptilersdk.js.map +1 -1
  25. package/maptilersdk.umd.js +3 -3
  26. package/maptilersdk.umd.js.map +1 -1
  27. package/openlayers.js +694 -692
  28. package/openlayers.js.map +1 -1
  29. package/openlayers.umd.js +3 -3
  30. package/openlayers.umd.js.map +1 -1
  31. package/package.json +5 -5
  32. package/react.js +671 -669
  33. package/react.js.map +1 -1
  34. package/react.umd.js +1 -1
  35. package/react.umd.js.map +1 -1
  36. package/svelte/GeocodingControl.svelte +4 -2
  37. package/svelte/GeocodingControl.svelte.d.ts +1 -0
  38. package/svelte/MapLibreBasedGeocodingControl.d.ts +70 -35
  39. package/svelte/MapLibreBasedGeocodingControl.js +69 -66
  40. package/svelte/leaflet-controller.d.ts +1 -1
  41. package/svelte/leaflet-controller.js +47 -24
  42. package/svelte/leaflet.d.ts +52 -16
  43. package/svelte/leaflet.js +14 -2
  44. package/svelte/maplibregl-controller.d.ts +7 -7
  45. package/svelte/maplibregl-controller.js +55 -34
  46. package/svelte/maplibregl.d.ts +29 -5
  47. package/svelte/maplibregl.js +3 -8
  48. package/svelte/maptilersdk.d.ts +29 -5
  49. package/svelte/maptilersdk.js +15 -18
  50. package/svelte/types.d.ts +6 -0
  51. package/types.d.ts +6 -0
  52. package/vanilla.js +392 -390
  53. package/vanilla.js.map +1 -1
  54. package/vanilla.umd.js +1 -1
  55. package/vanilla.umd.js.map +1 -1
@@ -1,7 +1,7 @@
1
- var re = Object.defineProperty;
2
- var ie = (r, t, e) => t in r ? re(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var it = (r, t, e) => ie(r, typeof t != "symbol" ? t + "" : t, e);
4
- import * as F from "leaflet";
1
+ var ie = Object.defineProperty;
2
+ var oe = (r, t, e) => t in r ? ie(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var it = (r, t, e) => oe(r, typeof t != "symbol" ? t + "" : t, e);
4
+ import * as T from "leaflet";
5
5
  function V(r, t, e = {}) {
6
6
  const n = { type: "Feature" };
7
7
  return (e.id === 0 || e.id) && (n.id = e.id), e.bbox && (n.bbox = e.bbox), n.properties = t || {}, n.geometry = r, n;
@@ -27,21 +27,21 @@ function Z(r, t = {}) {
27
27
  const e = { type: "FeatureCollection" };
28
28
  return t.id && (e.id = t.id), t.bbox && (e.bbox = t.bbox), e.features = r, e;
29
29
  }
30
- function Qt(r, t, e = {}) {
30
+ function Ut(r, t, e = {}) {
31
31
  return V({
32
32
  type: "MultiPolygon",
33
33
  coordinates: r
34
34
  }, t, e);
35
35
  }
36
- function Ut(r, t, e) {
36
+ function Yt(r, t, e) {
37
37
  if (r !== null)
38
- for (var n, i, o, l, u, c, f, p = 0, s = 0, a, h = r.type, g = h === "FeatureCollection", y = h === "Feature", d = g ? r.features.length : 1, x = 0; x < d; x++) {
39
- f = g ? r.features[x].geometry : y ? r.geometry : r, a = f ? f.type === "GeometryCollection" : !1, u = a ? f.geometries.length : 1;
40
- for (var v = 0; v < u; v++) {
38
+ for (var n, i, o, u, l, c, f, p = 0, s = 0, a, h = r.type, g = h === "FeatureCollection", y = h === "Feature", x = g ? r.features.length : 1, d = 0; d < x; d++) {
39
+ f = g ? r.features[d].geometry : y ? r.geometry : r, a = f ? f.type === "GeometryCollection" : !1, l = a ? f.geometries.length : 1;
40
+ for (var v = 0; v < l; v++) {
41
41
  var m = 0, w = 0;
42
- if (l = a ? f.geometries[v] : f, l !== null) {
43
- c = l.coordinates;
44
- var E = l.type;
42
+ if (u = a ? f.geometries[v] : f, u !== null) {
43
+ c = u.coordinates;
44
+ var E = u.type;
45
45
  switch (p = 0, E) {
46
46
  case null:
47
47
  break;
@@ -49,7 +49,7 @@ function Ut(r, t, e) {
49
49
  if (t(
50
50
  c,
51
51
  s,
52
- x,
52
+ d,
53
53
  m,
54
54
  w
55
55
  ) === !1)
@@ -62,7 +62,7 @@ function Ut(r, t, e) {
62
62
  if (t(
63
63
  c[n],
64
64
  s,
65
- x,
65
+ d,
66
66
  m,
67
67
  w
68
68
  ) === !1)
@@ -78,7 +78,7 @@ function Ut(r, t, e) {
78
78
  if (t(
79
79
  c[n][i],
80
80
  s,
81
- x,
81
+ d,
82
82
  m,
83
83
  w
84
84
  ) === !1)
@@ -96,7 +96,7 @@ function Ut(r, t, e) {
96
96
  if (t(
97
97
  c[n][i][o],
98
98
  s,
99
- x,
99
+ d,
100
100
  m,
101
101
  w
102
102
  ) === !1)
@@ -109,8 +109,8 @@ function Ut(r, t, e) {
109
109
  }
110
110
  break;
111
111
  case "GeometryCollection":
112
- for (n = 0; n < l.geometries.length; n++)
113
- if (Ut(l.geometries[n], t) === !1)
112
+ for (n = 0; n < u.geometries.length; n++)
113
+ if (Yt(u.geometries[n], t) === !1)
114
114
  return !1;
115
115
  break;
116
116
  default:
@@ -120,11 +120,11 @@ function Ut(r, t, e) {
120
120
  }
121
121
  }
122
122
  }
123
- function mt(r, t) {
124
- var e, n, i, o, l, u, c, f, p, s, a = 0, h = r.type === "FeatureCollection", g = r.type === "Feature", y = h ? r.features.length : 1;
123
+ function vt(r, t) {
124
+ var e, n, i, o, u, l, c, f, p, s, a = 0, h = r.type === "FeatureCollection", g = r.type === "Feature", y = h ? r.features.length : 1;
125
125
  for (e = 0; e < y; e++) {
126
- for (u = h ? r.features[e].geometry : g ? r.geometry : r, f = h ? r.features[e].properties : g ? r.properties : {}, p = h ? r.features[e].bbox : g ? r.bbox : void 0, s = h ? r.features[e].id : g ? r.id : void 0, c = u ? u.type === "GeometryCollection" : !1, l = c ? u.geometries.length : 1, i = 0; i < l; i++) {
127
- if (o = c ? u.geometries[i] : u, o === null) {
126
+ for (l = h ? r.features[e].geometry : g ? r.geometry : r, f = h ? r.features[e].properties : g ? r.properties : {}, p = h ? r.features[e].bbox : g ? r.bbox : void 0, s = h ? r.features[e].id : g ? r.id : void 0, c = l ? l.type === "GeometryCollection" : !1, u = c ? l.geometries.length : 1, i = 0; i < u; i++) {
127
+ if (o = c ? l.geometries[i] : l, o === null) {
128
128
  if (t(
129
129
  null,
130
130
  a,
@@ -171,22 +171,22 @@ function mt(r, t) {
171
171
  a++;
172
172
  }
173
173
  }
174
- function oe(r, t) {
175
- mt(r, function(e, n, i, o, l) {
176
- var u = e === null ? null : e.type;
177
- switch (u) {
174
+ function se(r, t) {
175
+ vt(r, function(e, n, i, o, u) {
176
+ var l = e === null ? null : e.type;
177
+ switch (l) {
178
178
  case null:
179
179
  case "Point":
180
180
  case "LineString":
181
181
  case "Polygon":
182
182
  return t(
183
- V(e, i, { bbox: o, id: l }),
183
+ V(e, i, { bbox: o, id: u }),
184
184
  n,
185
185
  0
186
186
  ) === !1 ? !1 : void 0;
187
187
  }
188
188
  var c;
189
- switch (u) {
189
+ switch (l) {
190
190
  case "MultiPoint":
191
191
  c = "Point";
192
192
  break;
@@ -207,23 +207,23 @@ function oe(r, t) {
207
207
  }
208
208
  });
209
209
  }
210
- function se(r, t = {}) {
210
+ function le(r, t = {}) {
211
211
  if (r.bbox != null && t.recompute !== !0)
212
212
  return r.bbox;
213
213
  const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
214
- return Ut(r, (n) => {
214
+ return Yt(r, (n) => {
215
215
  e[0] > n[0] && (e[0] = n[0]), e[1] > n[1] && (e[1] = n[1]), e[2] < n[0] && (e[2] = n[0]), e[3] < n[1] && (e[3] = n[1]);
216
216
  }), e;
217
217
  }
218
- var ut = se;
219
- function le(r) {
218
+ var ut = le;
219
+ function ue(r) {
220
220
  if (!r)
221
221
  throw new Error("geojson is required");
222
222
  switch (r.type) {
223
223
  case "Feature":
224
- return Yt(r);
224
+ return Dt(r);
225
225
  case "FeatureCollection":
226
- return ue(r);
226
+ return fe(r);
227
227
  case "Point":
228
228
  case "LineString":
229
229
  case "Polygon":
@@ -231,12 +231,12 @@ function le(r) {
231
231
  case "MultiLineString":
232
232
  case "MultiPolygon":
233
233
  case "GeometryCollection":
234
- return vt(r);
234
+ return mt(r);
235
235
  default:
236
236
  throw new Error("unknown GeoJSON type");
237
237
  }
238
238
  }
239
- function Yt(r) {
239
+ function Dt(r) {
240
240
  const t = { type: "Feature" };
241
241
  return Object.keys(r).forEach((e) => {
242
242
  switch (e) {
@@ -247,16 +247,16 @@ function Yt(r) {
247
247
  default:
248
248
  t[e] = r[e];
249
249
  }
250
- }), t.properties = Dt(r.properties), r.geometry == null ? t.geometry = null : t.geometry = vt(r.geometry), t;
250
+ }), t.properties = jt(r.properties), r.geometry == null ? t.geometry = null : t.geometry = mt(r.geometry), t;
251
251
  }
252
- function Dt(r) {
252
+ function jt(r) {
253
253
  const t = {};
254
254
  return r && Object.keys(r).forEach((e) => {
255
255
  const n = r[e];
256
- typeof n == "object" ? n === null ? t[e] = null : Array.isArray(n) ? t[e] = n.map((i) => i) : t[e] = Dt(n) : t[e] = n;
256
+ typeof n == "object" ? n === null ? t[e] = null : Array.isArray(n) ? t[e] = n.map((i) => i) : t[e] = jt(n) : t[e] = n;
257
257
  }), t;
258
258
  }
259
- function ue(r) {
259
+ function fe(r) {
260
260
  const t = { type: "FeatureCollection" };
261
261
  return Object.keys(r).forEach((e) => {
262
262
  switch (e) {
@@ -266,17 +266,17 @@ function ue(r) {
266
266
  default:
267
267
  t[e] = r[e];
268
268
  }
269
- }), t.features = r.features.map((e) => Yt(e)), t;
269
+ }), t.features = r.features.map((e) => Dt(e)), t;
270
270
  }
271
- function vt(r) {
271
+ function mt(r) {
272
272
  const t = { type: r.type };
273
- return r.bbox && (t.bbox = r.bbox), r.type === "GeometryCollection" ? (t.geometries = r.geometries.map((e) => vt(e)), t) : (t.coordinates = jt(r.coordinates), t);
273
+ return r.bbox && (t.bbox = r.bbox), r.type === "GeometryCollection" ? (t.geometries = r.geometries.map((e) => mt(e)), t) : (t.coordinates = Xt(r.coordinates), t);
274
274
  }
275
- function jt(r) {
275
+ function Xt(r) {
276
276
  const t = r;
277
- return typeof t[0] != "object" ? t.slice() : t.map((e) => jt(e));
277
+ return typeof t[0] != "object" ? t.slice() : t.map((e) => Xt(e));
278
278
  }
279
- var fe = le;
279
+ var ce = ue;
280
280
  /**
281
281
  * splaytree v3.1.2
282
282
  * Fast Splay tree for Node and browser
@@ -299,15 +299,15 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
299
299
  See the Apache Version 2.0 License for specific language governing permissions
300
300
  and limitations under the License.
301
301
  ***************************************************************************** */
302
- function ce(r, t) {
302
+ function he(r, t) {
303
303
  var e = { label: 0, sent: function() {
304
304
  if (o[0] & 1) throw o[1];
305
305
  return o[1];
306
- }, trys: [], ops: [] }, n, i, o, l;
307
- return l = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
306
+ }, trys: [], ops: [] }, n, i, o, u;
307
+ return u = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
308
308
  return this;
309
- }), l;
310
- function u(f) {
309
+ }), u;
310
+ function l(f) {
311
311
  return function(p) {
312
312
  return c([f, p]);
313
313
  };
@@ -359,7 +359,7 @@ function ce(r, t) {
359
359
  return { value: f[0] ? f[1] : void 0, done: !0 };
360
360
  }
361
361
  }
362
- var T = (
362
+ var F = (
363
363
  /** @class */
364
364
  /* @__PURE__ */ function() {
365
365
  function r(t, e) {
@@ -368,27 +368,27 @@ var T = (
368
368
  return r;
369
369
  }()
370
370
  );
371
- function he(r, t) {
371
+ function ae(r, t) {
372
372
  return r > t ? 1 : r < t ? -1 : 0;
373
373
  }
374
374
  function B(r, t, e) {
375
- for (var n = new T(null, null), i = n, o = n; ; ) {
376
- var l = e(r, t.key);
377
- if (l < 0) {
375
+ for (var n = new F(null, null), i = n, o = n; ; ) {
376
+ var u = e(r, t.key);
377
+ if (u < 0) {
378
378
  if (t.left === null)
379
379
  break;
380
380
  if (e(r, t.left.key) < 0) {
381
- var u = t.left;
382
- if (t.left = u.right, u.right = t, t = u, t.left === null)
381
+ var l = t.left;
382
+ if (t.left = l.right, l.right = t, t = l, t.left === null)
383
383
  break;
384
384
  }
385
385
  o.left = t, o = t, t = t.left;
386
- } else if (l > 0) {
386
+ } else if (u > 0) {
387
387
  if (t.right === null)
388
388
  break;
389
389
  if (e(r, t.right.key) > 0) {
390
- var u = t.right;
391
- if (t.right = u.left, u.left = t, t = u, t.right === null)
390
+ var l = t.right;
391
+ if (t.right = l.left, l.left = t, t = l, t.right === null)
392
392
  break;
393
393
  }
394
394
  i.right = t, i = t, t = t.right;
@@ -398,7 +398,7 @@ function B(r, t, e) {
398
398
  return i.right = t.left, o.left = t.right, t.left = n.right, t.right = n.left, t;
399
399
  }
400
400
  function ot(r, t, e, n) {
401
- var i = new T(r, t);
401
+ var i = new F(r, t);
402
402
  if (e === null)
403
403
  return i.left = i.right = null, i;
404
404
  e = B(r, e, n);
@@ -414,7 +414,7 @@ function bt(r, t, e) {
414
414
  }
415
415
  return { left: n, right: i };
416
416
  }
417
- function ae(r, t, e) {
417
+ function pe(r, t, e) {
418
418
  return t === null ? r : (r === null || (t = B(r.key, t, e), t.left = r), t);
419
419
  }
420
420
  function ft(r, t, e, n, i) {
@@ -429,15 +429,15 @@ var wt = (
429
429
  /** @class */
430
430
  function() {
431
431
  function r(t) {
432
- t === void 0 && (t = he), this._root = null, this._size = 0, this._comparator = t;
432
+ t === void 0 && (t = ae), this._root = null, this._size = 0, this._comparator = t;
433
433
  }
434
434
  return r.prototype.insert = function(t, e) {
435
435
  return this._size++, this._root = ot(t, e, this._root, this._comparator);
436
436
  }, r.prototype.add = function(t, e) {
437
- var n = new T(t, e);
437
+ var n = new F(t, e);
438
438
  this._root === null && (n.left = n.right = null, this._size++, this._root = n);
439
- var i = this._comparator, o = B(t, this._root, i), l = i(t, o.key);
440
- return l === 0 ? this._root = o : (l < 0 ? (n.left = o.left, n.right = o, o.left = null) : l > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
439
+ var i = this._comparator, o = B(t, this._root, i), u = i(t, o.key);
440
+ return u === 0 ? this._root = o : (u < 0 ? (n.left = o.left, n.right = o, o.left = null) : u > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
441
441
  }, r.prototype.remove = function(t) {
442
442
  this._root = this._remove(t, this._root, this._comparator);
443
443
  }, r.prototype._remove = function(t, e, n) {
@@ -478,15 +478,15 @@ var wt = (
478
478
  n !== null ? (i.push(n), n = n.left) : i.length !== 0 ? (n = i.pop(), t.call(e, n), n = n.right) : o = !0;
479
479
  return this;
480
480
  }, r.prototype.range = function(t, e, n, i) {
481
- for (var o = [], l = this._comparator, u = this._root, c; o.length !== 0 || u; )
482
- if (u)
483
- o.push(u), u = u.left;
481
+ for (var o = [], u = this._comparator, l = this._root, c; o.length !== 0 || l; )
482
+ if (l)
483
+ o.push(l), l = l.left;
484
484
  else {
485
- if (u = o.pop(), c = l(u.key, e), c > 0)
485
+ if (l = o.pop(), c = u(l.key, e), c > 0)
486
486
  break;
487
- if (l(u.key, t) >= 0 && n.call(i, u))
487
+ if (u(l.key, t) >= 0 && n.call(i, l))
488
488
  return this;
489
- u = u.right;
489
+ l = l.right;
490
490
  }
491
491
  return this;
492
492
  }, r.prototype.keys = function() {
@@ -557,15 +557,15 @@ var wt = (
557
557
  }, r.prototype.clear = function() {
558
558
  return this._root = null, this._size = 0, this;
559
559
  }, r.prototype.toList = function() {
560
- return ge(this._root);
560
+ return ye(this._root);
561
561
  }, r.prototype.load = function(t, e, n) {
562
562
  e === void 0 && (e = []), n === void 0 && (n = !1);
563
563
  var i = t.length, o = this._comparator;
564
564
  if (n && at(t, e, 0, i - 1, o), this._root === null)
565
565
  this._root = ct(t, e, 0, i), this._size = i;
566
566
  else {
567
- var l = ye(this.toList(), pe(t, e), o);
568
- i = this._size + i, this._root = ht({ head: l }, 0, i);
567
+ var u = de(this.toList(), ge(t, e), o);
568
+ i = this._size + i, this._root = ht({ head: u }, 0, i);
569
569
  }
570
570
  return this;
571
571
  }, r.prototype.isEmpty = function() {
@@ -591,13 +591,13 @@ var wt = (
591
591
  return e.push(n);
592
592
  }, t), e.join("");
593
593
  }, r.prototype.update = function(t, e, n) {
594
- var i = this._comparator, o = bt(t, this._root, i), l = o.left, u = o.right;
595
- i(t, e) < 0 ? u = ot(e, n, u, i) : l = ot(e, n, l, i), this._root = ae(l, u, i);
594
+ var i = this._comparator, o = bt(t, this._root, i), u = o.left, l = o.right;
595
+ i(t, e) < 0 ? l = ot(e, n, l, i) : u = ot(e, n, u, i), this._root = pe(u, l, i);
596
596
  }, r.prototype.split = function(t) {
597
597
  return bt(t, this._root, this._comparator);
598
598
  }, r.prototype[Symbol.iterator] = function() {
599
599
  var t, e, n;
600
- return ce(this, function(i) {
600
+ return he(this, function(i) {
601
601
  switch (i.label) {
602
602
  case 0:
603
603
  t = this._root, e = [], n = !1, i.label = 1;
@@ -624,66 +624,66 @@ var wt = (
624
624
  function ct(r, t, e, n) {
625
625
  var i = n - e;
626
626
  if (i > 0) {
627
- var o = e + Math.floor(i / 2), l = r[o], u = t[o], c = new T(l, u);
627
+ var o = e + Math.floor(i / 2), u = r[o], l = t[o], c = new F(u, l);
628
628
  return c.left = ct(r, t, e, o), c.right = ct(r, t, o + 1, n), c;
629
629
  }
630
630
  return null;
631
631
  }
632
- function pe(r, t) {
633
- for (var e = new T(null, null), n = e, i = 0; i < r.length; i++)
634
- n = n.next = new T(r[i], t[i]);
632
+ function ge(r, t) {
633
+ for (var e = new F(null, null), n = e, i = 0; i < r.length; i++)
634
+ n = n.next = new F(r[i], t[i]);
635
635
  return n.next = null, e.next;
636
636
  }
637
- function ge(r) {
638
- for (var t = r, e = [], n = !1, i = new T(null, null), o = i; !n; )
637
+ function ye(r) {
638
+ for (var t = r, e = [], n = !1, i = new F(null, null), o = i; !n; )
639
639
  t ? (e.push(t), t = t.left) : e.length > 0 ? (t = o = o.next = e.pop(), t = t.right) : n = !0;
640
640
  return o.next = null, i.next;
641
641
  }
642
642
  function ht(r, t, e) {
643
643
  var n = e - t;
644
644
  if (n > 0) {
645
- var i = t + Math.floor(n / 2), o = ht(r, t, i), l = r.head;
646
- return l.left = o, r.head = r.head.next, l.right = ht(r, i + 1, e), l;
645
+ var i = t + Math.floor(n / 2), o = ht(r, t, i), u = r.head;
646
+ return u.left = o, r.head = r.head.next, u.right = ht(r, i + 1, e), u;
647
647
  }
648
648
  return null;
649
649
  }
650
- function ye(r, t, e) {
651
- for (var n = new T(null, null), i = n, o = r, l = t; o !== null && l !== null; )
652
- e(o.key, l.key) < 0 ? (i.next = o, o = o.next) : (i.next = l, l = l.next), i = i.next;
653
- return o !== null ? i.next = o : l !== null && (i.next = l), n.next;
650
+ function de(r, t, e) {
651
+ for (var n = new F(null, null), i = n, o = r, u = t; o !== null && u !== null; )
652
+ e(o.key, u.key) < 0 ? (i.next = o, o = o.next) : (i.next = u, u = u.next), i = i.next;
653
+ return o !== null ? i.next = o : u !== null && (i.next = u), n.next;
654
654
  }
655
655
  function at(r, t, e, n, i) {
656
656
  if (!(e >= n)) {
657
- for (var o = r[e + n >> 1], l = e - 1, u = n + 1; ; ) {
657
+ for (var o = r[e + n >> 1], u = e - 1, l = n + 1; ; ) {
658
658
  do
659
- l++;
660
- while (i(r[l], o) < 0);
659
+ u++;
660
+ while (i(r[u], o) < 0);
661
661
  do
662
- u--;
663
- while (i(r[u], o) > 0);
664
- if (l >= u)
662
+ l--;
663
+ while (i(r[l], o) > 0);
664
+ if (u >= l)
665
665
  break;
666
- var c = r[l];
667
- r[l] = r[u], r[u] = c, c = t[l], t[l] = t[u], t[u] = c;
666
+ var c = r[u];
667
+ r[u] = r[l], r[l] = c, c = t[u], t[u] = t[l], t[l] = c;
668
668
  }
669
- at(r, t, e, u, i), at(r, t, u + 1, n, i);
669
+ at(r, t, e, l, i), at(r, t, l + 1, n, i);
670
670
  }
671
671
  }
672
- const O = 11102230246251565e-32, S = 134217729, de = (3 + 8 * O) * O;
672
+ const O = 11102230246251565e-32, S = 134217729, xe = (3 + 8 * O) * O;
673
673
  function st(r, t, e, n, i) {
674
- let o, l, u, c, f = t[0], p = n[0], s = 0, a = 0;
674
+ let o, u, l, c, f = t[0], p = n[0], s = 0, a = 0;
675
675
  p > f == p > -f ? (o = f, f = t[++s]) : (o = p, p = n[++a]);
676
676
  let h = 0;
677
677
  if (s < r && a < e)
678
- for (p > f == p > -f ? (l = f + o, u = o - (l - f), f = t[++s]) : (l = p + o, u = o - (l - p), p = n[++a]), o = l, u !== 0 && (i[h++] = u); s < r && a < e; )
679
- p > f == p > -f ? (l = o + f, c = l - o, u = o - (l - c) + (f - c), f = t[++s]) : (l = o + p, c = l - o, u = o - (l - c) + (p - c), p = n[++a]), o = l, u !== 0 && (i[h++] = u);
678
+ for (p > f == p > -f ? (u = f + o, l = o - (u - f), f = t[++s]) : (u = p + o, l = o - (u - p), p = n[++a]), o = u, l !== 0 && (i[h++] = l); s < r && a < e; )
679
+ p > f == p > -f ? (u = o + f, c = u - o, l = o - (u - c) + (f - c), f = t[++s]) : (u = o + p, c = u - o, l = o - (u - c) + (p - c), p = n[++a]), o = u, l !== 0 && (i[h++] = l);
680
680
  for (; s < r; )
681
- l = o + f, c = l - o, u = o - (l - c) + (f - c), f = t[++s], o = l, u !== 0 && (i[h++] = u);
681
+ u = o + f, c = u - o, l = o - (u - c) + (f - c), f = t[++s], o = u, l !== 0 && (i[h++] = l);
682
682
  for (; a < e; )
683
- l = o + p, c = l - o, u = o - (l - c) + (p - c), p = n[++a], o = l, u !== 0 && (i[h++] = u);
683
+ u = o + p, c = u - o, l = o - (u - c) + (p - c), p = n[++a], o = u, l !== 0 && (i[h++] = l);
684
684
  return (o !== 0 || h === 0) && (i[h++] = o), h;
685
685
  }
686
- function xe(r, t) {
686
+ function ve(r, t) {
687
687
  let e = t[0];
688
688
  for (let n = 1; n < r; n++) e += t[n];
689
689
  return e;
@@ -691,24 +691,24 @@ function xe(r, t) {
691
691
  function K(r) {
692
692
  return new Float64Array(r);
693
693
  }
694
- const me = (3 + 16 * O) * O, ve = (2 + 12 * O) * O, we = (9 + 64 * O) * O * O, q = K(4), _t = K(8), St = K(12), Pt = K(16), P = K(4);
695
- function Ee(r, t, e, n, i, o, l) {
696
- let u, c, f, p, s, a, h, g, y, d, x, v, m, w, E, b, M, _;
697
- const C = r - i, R = e - i, k = t - o, I = n - o;
698
- w = C * I, a = S * C, h = a - (a - C), g = C - h, a = S * I, y = a - (a - I), d = I - y, E = g * d - (w - h * y - g * y - h * d), b = k * R, a = S * k, h = a - (a - k), g = k - h, a = S * R, y = a - (a - R), d = R - y, M = g * d - (b - h * y - g * y - h * d), x = E - M, s = E - x, q[0] = E - (x + s) + (s - M), v = w + x, s = v - w, m = w - (v - s) + (x - s), x = m - b, s = m - x, q[1] = m - (x + s) + (s - b), _ = v + x, s = _ - v, q[2] = v - (_ - s) + (x - s), q[3] = _;
699
- let A = xe(4, q), D = ve * l;
700
- if (A >= D || -A >= D || (s = r - C, u = r - (C + s) + (s - i), s = e - R, f = e - (R + s) + (s - i), s = t - k, c = t - (k + s) + (s - o), s = n - I, p = n - (I + s) + (s - o), u === 0 && c === 0 && f === 0 && p === 0) || (D = we * l + de * Math.abs(A), A += C * p + I * u - (k * f + R * c), A >= D || -A >= D)) return A;
701
- w = u * I, a = S * u, h = a - (a - u), g = u - h, a = S * I, y = a - (a - I), d = I - y, E = g * d - (w - h * y - g * y - h * d), b = c * R, a = S * c, h = a - (a - c), g = c - h, a = S * R, y = a - (a - R), d = R - y, M = g * d - (b - h * y - g * y - h * d), x = E - M, s = E - x, P[0] = E - (x + s) + (s - M), v = w + x, s = v - w, m = w - (v - s) + (x - s), x = m - b, s = m - x, P[1] = m - (x + s) + (s - b), _ = v + x, s = _ - v, P[2] = v - (_ - s) + (x - s), P[3] = _;
702
- const te = st(4, q, 4, P, _t);
703
- w = C * p, a = S * C, h = a - (a - C), g = C - h, a = S * p, y = a - (a - p), d = p - y, E = g * d - (w - h * y - g * y - h * d), b = k * f, a = S * k, h = a - (a - k), g = k - h, a = S * f, y = a - (a - f), d = f - y, M = g * d - (b - h * y - g * y - h * d), x = E - M, s = E - x, P[0] = E - (x + s) + (s - M), v = w + x, s = v - w, m = w - (v - s) + (x - s), x = m - b, s = m - x, P[1] = m - (x + s) + (s - b), _ = v + x, s = _ - v, P[2] = v - (_ - s) + (x - s), P[3] = _;
704
- const ee = st(te, _t, 4, P, St);
705
- w = u * p, a = S * u, h = a - (a - u), g = u - h, a = S * p, y = a - (a - p), d = p - y, E = g * d - (w - h * y - g * y - h * d), b = c * f, a = S * c, h = a - (a - c), g = c - h, a = S * f, y = a - (a - f), d = f - y, M = g * d - (b - h * y - g * y - h * d), x = E - M, s = E - x, P[0] = E - (x + s) + (s - M), v = w + x, s = v - w, m = w - (v - s) + (x - s), x = m - b, s = m - x, P[1] = m - (x + s) + (s - b), _ = v + x, s = _ - v, P[2] = v - (_ - s) + (x - s), P[3] = _;
706
- const ne = st(ee, St, 4, P, Pt);
707
- return Pt[ne - 1];
708
- }
709
- function be(r, t, e, n, i, o) {
710
- const l = (t - o) * (e - i), u = (r - i) * (n - o), c = l - u, f = Math.abs(l + u);
711
- return Math.abs(c) >= me * f ? c : -Ee(r, t, e, n, i, o, f);
694
+ const me = (3 + 16 * O) * O, we = (2 + 12 * O) * O, Ee = (9 + 64 * O) * O * O, q = K(4), _t = K(8), St = K(12), Pt = K(16), P = K(4);
695
+ function be(r, t, e, n, i, o, u) {
696
+ let l, c, f, p, s, a, h, g, y, x, d, v, m, w, E, b, M, _;
697
+ const C = r - i, R = e - i, I = t - o, $ = n - o;
698
+ w = C * $, a = S * C, h = a - (a - C), g = C - h, a = S * $, y = a - (a - $), x = $ - y, E = g * x - (w - h * y - g * y - h * x), b = I * R, a = S * I, h = a - (a - I), g = I - h, a = S * R, y = a - (a - R), x = R - y, M = g * x - (b - h * y - g * y - h * x), d = E - M, s = E - d, q[0] = E - (d + s) + (s - M), v = w + d, s = v - w, m = w - (v - s) + (d - s), d = m - b, s = m - d, q[1] = m - (d + s) + (s - b), _ = v + d, s = _ - v, q[2] = v - (_ - s) + (d - s), q[3] = _;
699
+ let A = ve(4, q), D = we * u;
700
+ if (A >= D || -A >= D || (s = r - C, l = r - (C + s) + (s - i), s = e - R, f = e - (R + s) + (s - i), s = t - I, c = t - (I + s) + (s - o), s = n - $, p = n - ($ + s) + (s - o), l === 0 && c === 0 && f === 0 && p === 0) || (D = Ee * u + xe * Math.abs(A), A += C * p + $ * l - (I * f + R * c), A >= D || -A >= D)) return A;
701
+ w = l * $, a = S * l, h = a - (a - l), g = l - h, a = S * $, y = a - (a - $), x = $ - y, E = g * x - (w - h * y - g * y - h * x), b = c * R, a = S * c, h = a - (a - c), g = c - h, a = S * R, y = a - (a - R), x = R - y, M = g * x - (b - h * y - g * y - h * x), d = E - M, s = E - d, P[0] = E - (d + s) + (s - M), v = w + d, s = v - w, m = w - (v - s) + (d - s), d = m - b, s = m - d, P[1] = m - (d + s) + (s - b), _ = v + d, s = _ - v, P[2] = v - (_ - s) + (d - s), P[3] = _;
702
+ const ee = st(4, q, 4, P, _t);
703
+ w = C * p, a = S * C, h = a - (a - C), g = C - h, a = S * p, y = a - (a - p), x = p - y, E = g * x - (w - h * y - g * y - h * x), b = I * f, a = S * I, h = a - (a - I), g = I - h, a = S * f, y = a - (a - f), x = f - y, M = g * x - (b - h * y - g * y - h * x), d = E - M, s = E - d, P[0] = E - (d + s) + (s - M), v = w + d, s = v - w, m = w - (v - s) + (d - s), d = m - b, s = m - d, P[1] = m - (d + s) + (s - b), _ = v + d, s = _ - v, P[2] = v - (_ - s) + (d - s), P[3] = _;
704
+ const ne = st(ee, _t, 4, P, St);
705
+ w = l * p, a = S * l, h = a - (a - l), g = l - h, a = S * p, y = a - (a - p), x = p - y, E = g * x - (w - h * y - g * y - h * x), b = c * f, a = S * c, h = a - (a - c), g = c - h, a = S * f, y = a - (a - f), x = f - y, M = g * x - (b - h * y - g * y - h * x), d = E - M, s = E - d, P[0] = E - (d + s) + (s - M), v = w + d, s = v - w, m = w - (v - s) + (d - s), d = m - b, s = m - d, P[1] = m - (d + s) + (s - b), _ = v + d, s = _ - v, P[2] = v - (_ - s) + (d - s), P[3] = _;
706
+ const re = st(ne, St, 4, P, Pt);
707
+ return Pt[re - 1];
708
+ }
709
+ function _e(r, t, e, n, i, o) {
710
+ const u = (t - o) * (e - i), l = (r - i) * (n - o), c = u - l, f = Math.abs(u + l);
711
+ return Math.abs(c) >= me * f ? c : -be(r, t, e, n, i, o, f);
712
712
  }
713
713
  const j = (r, t) => r.ll.x <= t.x && t.x <= r.ur.x && r.ll.y <= t.y && t.y <= r.ur.y, pt = (r, t) => {
714
714
  if (t.ur.x < r.ll.x || r.ur.x < t.ll.x || t.ur.y < r.ll.y || r.ur.y < t.ll.y) return null;
@@ -726,13 +726,13 @@ const j = (r, t) => r.ll.x <= t.x && t.x <= r.ur.x && r.ll.y <= t.y && t.y <= r.
726
726
  };
727
727
  let G = Number.EPSILON;
728
728
  G === void 0 && (G = Math.pow(2, -52));
729
- const _e = G * G, Mt = (r, t) => {
729
+ const Se = G * G, Mt = (r, t) => {
730
730
  if (-G < r && r < G && -G < t && t < G)
731
731
  return 0;
732
732
  const e = r - t;
733
- return e * e < _e * r * t ? 0 : r < t ? -1 : 1;
733
+ return e * e < Se * r * t ? 0 : r < t ? -1 : 1;
734
734
  };
735
- class Se {
735
+ class Pe {
736
736
  constructor() {
737
737
  this.reset();
738
738
  }
@@ -765,10 +765,10 @@ class Lt {
765
765
  return i !== null && Mt(e.key, i.key) === 0 ? (this.tree.remove(t), i.key) : t;
766
766
  }
767
767
  }
768
- const J = new Se(), tt = (r, t) => r.x * t.y - r.y * t.x, Xt = (r, t) => r.x * t.x + r.y * t.y, Ct = (r, t, e) => {
769
- const n = be(r.x, r.y, t.x, t.y, e.x, e.y);
768
+ const J = new Pe(), tt = (r, t) => r.x * t.y - r.y * t.x, Vt = (r, t) => r.x * t.x + r.y * t.y, Ct = (r, t, e) => {
769
+ const n = _e(r.x, r.y, t.x, t.y, e.x, e.y);
770
770
  return n > 0 ? -1 : n < 0 ? 1 : 0;
771
- }, et = (r) => Math.sqrt(Xt(r, r)), Pe = (r, t, e) => {
771
+ }, et = (r) => Math.sqrt(Vt(r, r)), Me = (r, t, e) => {
772
772
  const n = {
773
773
  x: t.x - r.x,
774
774
  y: t.y - r.y
@@ -777,7 +777,7 @@ const J = new Se(), tt = (r, t) => r.x * t.y - r.y * t.x, Xt = (r, t) => r.x * t
777
777
  y: e.y - r.y
778
778
  };
779
779
  return tt(i, n) / et(i) / et(n);
780
- }, Me = (r, t, e) => {
780
+ }, Le = (r, t, e) => {
781
781
  const n = {
782
782
  x: t.x - r.x,
783
783
  y: t.y - r.y
@@ -785,16 +785,16 @@ const J = new Se(), tt = (r, t) => r.x * t.y - r.y * t.x, Xt = (r, t) => r.x * t
785
785
  x: e.x - r.x,
786
786
  y: e.y - r.y
787
787
  };
788
- return Xt(i, n) / et(i) / et(n);
788
+ return Vt(i, n) / et(i) / et(n);
789
789
  }, Rt = (r, t, e) => t.y === 0 ? null : {
790
790
  x: r.x + t.x / t.y * (e - r.y),
791
791
  y: e
792
- }, kt = (r, t, e) => t.x === 0 ? null : {
792
+ }, It = (r, t, e) => t.x === 0 ? null : {
793
793
  x: e,
794
794
  y: r.y + t.y / t.x * (e - r.x)
795
- }, Le = (r, t, e, n) => {
796
- if (t.x === 0) return kt(e, n, r.x);
797
- if (n.x === 0) return kt(r, t, e.x);
795
+ }, Ce = (r, t, e, n) => {
796
+ if (t.x === 0) return It(e, n, r.x);
797
+ if (n.x === 0) return It(r, t, e.x);
798
798
  if (t.y === 0) return Rt(e, n, r.y);
799
799
  if (n.y === 0) return Rt(r, t, e.y);
800
800
  const i = tt(t, n);
@@ -802,7 +802,7 @@ const J = new Se(), tt = (r, t) => r.x * t.y - r.y * t.x, Xt = (r, t) => r.x * t
802
802
  const o = {
803
803
  x: e.x - r.x,
804
804
  y: e.y - r.y
805
- }, l = tt(o, t) / i, u = tt(o, n) / i, c = r.x + u * t.x, f = e.x + l * n.x, p = r.y + u * t.y, s = e.y + l * n.y, a = (c + f) / 2, h = (p + s) / 2;
805
+ }, u = tt(o, t) / i, l = tt(o, n) / i, c = r.x + l * t.x, f = e.x + u * n.x, p = r.y + l * t.y, s = e.y + u * n.y, a = (c + f) / 2, h = (p + s) / 2;
806
806
  return {
807
807
  x: a,
808
808
  y: h
@@ -867,24 +867,24 @@ class L {
867
867
  const e = /* @__PURE__ */ new Map(), n = (i) => {
868
868
  const o = i.otherSE;
869
869
  e.set(i, {
870
- sine: Pe(this.point, t.point, o.point),
871
- cosine: Me(this.point, t.point, o.point)
870
+ sine: Me(this.point, t.point, o.point),
871
+ cosine: Le(this.point, t.point, o.point)
872
872
  });
873
873
  };
874
874
  return (i, o) => {
875
875
  e.has(i) || n(i), e.has(o) || n(o);
876
876
  const {
877
- sine: l,
878
- cosine: u
877
+ sine: u,
878
+ cosine: l
879
879
  } = e.get(i), {
880
880
  sine: c,
881
881
  cosine: f
882
882
  } = e.get(o);
883
- return l >= 0 && c >= 0 ? u < f ? 1 : u > f ? -1 : 0 : l < 0 && c < 0 ? u < f ? -1 : u > f ? 1 : 0 : c < l ? -1 : c > l ? 1 : 0;
883
+ return u >= 0 && c >= 0 ? l < f ? 1 : l > f ? -1 : 0 : u < 0 && c < 0 ? l < f ? -1 : l > f ? 1 : 0 : c < u ? -1 : c > u ? 1 : 0;
884
884
  };
885
885
  }
886
886
  }
887
- let Ce = 0;
887
+ let Re = 0;
888
888
  class z {
889
889
  /* This compare() function is for ordering segments in the sweep
890
890
  * line tree, and does so according to the following criteria:
@@ -900,13 +900,13 @@ class z {
900
900
  * is directly on the right-more of the two left inputs.
901
901
  */
902
902
  static compare(t, e) {
903
- const n = t.leftSE.point.x, i = e.leftSE.point.x, o = t.rightSE.point.x, l = e.rightSE.point.x;
904
- if (l < n) return 1;
903
+ const n = t.leftSE.point.x, i = e.leftSE.point.x, o = t.rightSE.point.x, u = e.rightSE.point.x;
904
+ if (u < n) return 1;
905
905
  if (o < i) return -1;
906
- const u = t.leftSE.point.y, c = e.leftSE.point.y, f = t.rightSE.point.y, p = e.rightSE.point.y;
906
+ const l = t.leftSE.point.y, c = e.leftSE.point.y, f = t.rightSE.point.y, p = e.rightSE.point.y;
907
907
  if (n < i) {
908
- if (c < u && c < f) return 1;
909
- if (c > u && c > f) return -1;
908
+ if (c < l && c < f) return 1;
909
+ if (c > l && c > f) return -1;
910
910
  const s = t.comparePoint(e.leftSE.point);
911
911
  if (s < 0) return 1;
912
912
  if (s > 0) return -1;
@@ -914,46 +914,46 @@ class z {
914
914
  return a !== 0 ? a : -1;
915
915
  }
916
916
  if (n > i) {
917
- if (u < c && u < p) return -1;
918
- if (u > c && u > p) return 1;
917
+ if (l < c && l < p) return -1;
918
+ if (l > c && l > p) return 1;
919
919
  const s = e.comparePoint(t.leftSE.point);
920
920
  if (s !== 0) return s;
921
921
  const a = t.comparePoint(e.rightSE.point);
922
922
  return a < 0 ? 1 : a > 0 ? -1 : 1;
923
923
  }
924
- if (u < c) return -1;
925
- if (u > c) return 1;
926
- if (o < l) {
924
+ if (l < c) return -1;
925
+ if (l > c) return 1;
926
+ if (o < u) {
927
927
  const s = e.comparePoint(t.rightSE.point);
928
928
  if (s !== 0) return s;
929
929
  }
930
- if (o > l) {
930
+ if (o > u) {
931
931
  const s = t.comparePoint(e.rightSE.point);
932
932
  if (s < 0) return 1;
933
933
  if (s > 0) return -1;
934
934
  }
935
- if (o !== l) {
936
- const s = f - u, a = o - n, h = p - c, g = l - i;
935
+ if (o !== u) {
936
+ const s = f - l, a = o - n, h = p - c, g = u - i;
937
937
  if (s > a && h < g) return 1;
938
938
  if (s < a && h > g) return -1;
939
939
  }
940
- return o > l ? 1 : o < l || f < p ? -1 : f > p ? 1 : t.id < e.id ? -1 : t.id > e.id ? 1 : 0;
940
+ return o > u ? 1 : o < u || f < p ? -1 : f > p ? 1 : t.id < e.id ? -1 : t.id > e.id ? 1 : 0;
941
941
  }
942
942
  /* Warning: a reference to ringWindings input will be stored,
943
943
  * and possibly will be later modified */
944
944
  constructor(t, e, n, i) {
945
- this.id = ++Ce, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = n, this.windings = i;
945
+ this.id = ++Re, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = n, this.windings = i;
946
946
  }
947
947
  static fromRing(t, e, n) {
948
- let i, o, l;
949
- const u = L.comparePoints(t, e);
950
- if (u < 0)
951
- i = t, o = e, l = 1;
952
- else if (u > 0)
953
- i = e, o = t, l = -1;
948
+ let i, o, u;
949
+ const l = L.comparePoints(t, e);
950
+ if (l < 0)
951
+ i = t, o = e, u = 1;
952
+ else if (l > 0)
953
+ i = e, o = t, u = -1;
954
954
  else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);
955
955
  const c = new L(i, !0), f = new L(o, !1);
956
- return new z(c, f, [n], [l]);
956
+ return new z(c, f, [n], [u]);
957
957
  }
958
958
  /* When a segment is split, the rightSE is replaced with a new sweep event */
959
959
  replaceRightSE(t) {
@@ -1000,9 +1000,9 @@ class z {
1000
1000
  const e = this.leftSE.point, n = this.rightSE.point, i = this.vector();
1001
1001
  if (e.x === n.x)
1002
1002
  return t.x === e.x ? 0 : t.x < e.x ? 1 : -1;
1003
- const o = (t.y - e.y) / i.y, l = e.x + o * i.x;
1004
- if (t.x === l) return 0;
1005
- const u = (t.x - e.x) / i.x, c = e.y + u * i.y;
1003
+ const o = (t.y - e.y) / i.y, u = e.x + o * i.x;
1004
+ if (t.x === u) return 0;
1005
+ const l = (t.x - e.x) / i.x, c = e.y + l * i.y;
1006
1006
  return t.y === c ? 0 : t.y < c ? -1 : 1;
1007
1007
  }
1008
1008
  /**
@@ -1023,17 +1023,17 @@ class z {
1023
1023
  getIntersection(t) {
1024
1024
  const e = this.bbox(), n = t.bbox(), i = pt(e, n);
1025
1025
  if (i === null) return null;
1026
- const o = this.leftSE.point, l = this.rightSE.point, u = t.leftSE.point, c = t.rightSE.point, f = j(e, u) && this.comparePoint(u) === 0, p = j(n, o) && t.comparePoint(o) === 0, s = j(e, c) && this.comparePoint(c) === 0, a = j(n, l) && t.comparePoint(l) === 0;
1026
+ const o = this.leftSE.point, u = this.rightSE.point, l = t.leftSE.point, c = t.rightSE.point, f = j(e, l) && this.comparePoint(l) === 0, p = j(n, o) && t.comparePoint(o) === 0, s = j(e, c) && this.comparePoint(c) === 0, a = j(n, u) && t.comparePoint(u) === 0;
1027
1027
  if (p && f)
1028
- return a && !s ? l : !a && s ? c : null;
1028
+ return a && !s ? u : !a && s ? c : null;
1029
1029
  if (p)
1030
1030
  return s && o.x === c.x && o.y === c.y ? null : o;
1031
1031
  if (f)
1032
- return a && l.x === u.x && l.y === u.y ? null : u;
1032
+ return a && u.x === l.x && u.y === l.y ? null : l;
1033
1033
  if (a && s) return null;
1034
- if (a) return l;
1034
+ if (a) return u;
1035
1035
  if (s) return c;
1036
- const h = Le(o, this.vector(), u, t.vector());
1036
+ const h = Ce(o, this.vector(), l, t.vector());
1037
1037
  return h === null || !j(i, h) ? null : J.round(h.x, h.y);
1038
1038
  }
1039
1039
  /**
@@ -1049,10 +1049,10 @@ class z {
1049
1049
  * Warning: input array of points is modified
1050
1050
  */
1051
1051
  split(t) {
1052
- const e = [], n = t.events !== void 0, i = new L(t, !0), o = new L(t, !1), l = this.rightSE;
1052
+ const e = [], n = t.events !== void 0, i = new L(t, !0), o = new L(t, !1), u = this.rightSE;
1053
1053
  this.replaceRightSE(o), e.push(o), e.push(i);
1054
- const u = new z(i, l, this.rings.slice(), this.windings.slice());
1055
- return L.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), L.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (i.checkForConsuming(), o.checkForConsuming()), e;
1054
+ const l = new z(i, u, this.rings.slice(), this.windings.slice());
1055
+ return L.comparePoints(l.leftSE.point, l.rightSE.point) > 0 && l.swapEvents(), L.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (i.checkForConsuming(), o.checkForConsuming()), e;
1056
1056
  }
1057
1057
  /* Swap which event is left and right */
1058
1058
  swapEvents() {
@@ -1077,9 +1077,9 @@ class z {
1077
1077
  const o = e;
1078
1078
  e = n, n = o;
1079
1079
  }
1080
- for (let o = 0, l = n.rings.length; o < l; o++) {
1081
- const u = n.rings[o], c = n.windings[o], f = e.rings.indexOf(u);
1082
- f === -1 ? (e.rings.push(u), e.windings.push(c)) : e.windings[f] += c;
1080
+ for (let o = 0, u = n.rings.length; o < u; o++) {
1081
+ const l = n.rings[o], c = n.windings[o], f = e.rings.indexOf(l);
1082
+ f === -1 ? (e.rings.push(l), e.windings.push(c)) : e.windings[f] += c;
1083
1083
  }
1084
1084
  n.rings = null, n.windings = null, n.consumedBy = e, n.leftSE.consumedBy = e.leftSE, n.rightSE.consumedBy = e.rightSE;
1085
1085
  }
@@ -1110,24 +1110,24 @@ class z {
1110
1110
  multiPolys: []
1111
1111
  };
1112
1112
  const e = this._afterState.rings, n = this._afterState.windings, i = this._afterState.multiPolys;
1113
- for (let u = 0, c = this.rings.length; u < c; u++) {
1114
- const f = this.rings[u], p = this.windings[u], s = e.indexOf(f);
1113
+ for (let l = 0, c = this.rings.length; l < c; l++) {
1114
+ const f = this.rings[l], p = this.windings[l], s = e.indexOf(f);
1115
1115
  s === -1 ? (e.push(f), n.push(p)) : n[s] += p;
1116
1116
  }
1117
- const o = [], l = [];
1118
- for (let u = 0, c = e.length; u < c; u++) {
1119
- if (n[u] === 0) continue;
1120
- const f = e[u], p = f.poly;
1121
- if (l.indexOf(p) === -1)
1117
+ const o = [], u = [];
1118
+ for (let l = 0, c = e.length; l < c; l++) {
1119
+ if (n[l] === 0) continue;
1120
+ const f = e[l], p = f.poly;
1121
+ if (u.indexOf(p) === -1)
1122
1122
  if (f.isExterior) o.push(p);
1123
1123
  else {
1124
- l.indexOf(p) === -1 && l.push(p);
1124
+ u.indexOf(p) === -1 && u.push(p);
1125
1125
  const s = o.indexOf(f.poly);
1126
1126
  s !== -1 && o.splice(s, 1);
1127
1127
  }
1128
1128
  }
1129
- for (let u = 0, c = o.length; u < c; u++) {
1130
- const f = o[u].multiPoly;
1129
+ for (let l = 0, c = o.length; l < c; l++) {
1130
+ const f = o[l].multiPoly;
1131
1131
  i.indexOf(f) === -1 && i.push(f);
1132
1132
  }
1133
1133
  return this._afterState;
@@ -1137,7 +1137,7 @@ class z {
1137
1137
  if (this.consumedBy) return !1;
1138
1138
  if (this._isInResult !== void 0) return this._isInResult;
1139
1139
  const t = this.beforeState().multiPolys, e = this.afterState().multiPolys;
1140
- switch ($.type) {
1140
+ switch (k.type) {
1141
1141
  case "union": {
1142
1142
  const n = t.length === 0, i = e.length === 0;
1143
1143
  this._isInResult = n !== i;
@@ -1145,7 +1145,7 @@ class z {
1145
1145
  }
1146
1146
  case "intersection": {
1147
1147
  let n, i;
1148
- t.length < e.length ? (n = t.length, i = e.length) : (n = e.length, i = t.length), this._isInResult = i === $.numMultiPolys && n < i;
1148
+ t.length < e.length ? (n = t.length, i = e.length) : (n = e.length, i = t.length), this._isInResult = i === k.numMultiPolys && n < i;
1149
1149
  break;
1150
1150
  }
1151
1151
  case "xor": {
@@ -1159,12 +1159,12 @@ class z {
1159
1159
  break;
1160
1160
  }
1161
1161
  default:
1162
- throw new Error(`Unrecognized operation type found ${$.type}`);
1162
+ throw new Error(`Unrecognized operation type found ${k.type}`);
1163
1163
  }
1164
1164
  return this._isInResult;
1165
1165
  }
1166
1166
  }
1167
- class It {
1167
+ class $t {
1168
1168
  constructor(t, e, n) {
1169
1169
  if (!Array.isArray(t) || t.length === 0)
1170
1170
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
@@ -1182,10 +1182,10 @@ class It {
1182
1182
  }
1183
1183
  };
1184
1184
  let o = i;
1185
- for (let l = 1, u = t.length; l < u; l++) {
1186
- if (typeof t[l][0] != "number" || typeof t[l][1] != "number")
1185
+ for (let u = 1, l = t.length; u < l; u++) {
1186
+ if (typeof t[u][0] != "number" || typeof t[u][1] != "number")
1187
1187
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1188
- let c = J.round(t[l][0], t[l][1]);
1188
+ let c = J.round(t[u][0], t[u][1]);
1189
1189
  c.x === o.x && c.y === o.y || (this.segments.push(z.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);
1190
1190
  }
1191
1191
  (i.x !== o.x || i.y !== o.y) && this.segments.push(z.fromRing(o, i, this));
@@ -1199,11 +1199,11 @@ class It {
1199
1199
  return t;
1200
1200
  }
1201
1201
  }
1202
- class Re {
1202
+ class Ie {
1203
1203
  constructor(t, e) {
1204
1204
  if (!Array.isArray(t))
1205
1205
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1206
- this.exteriorRing = new It(t[0], this, !0), this.bbox = {
1206
+ this.exteriorRing = new $t(t[0], this, !0), this.bbox = {
1207
1207
  ll: {
1208
1208
  x: this.exteriorRing.bbox.ll.x,
1209
1209
  y: this.exteriorRing.bbox.ll.y
@@ -1214,7 +1214,7 @@ class Re {
1214
1214
  }
1215
1215
  }, this.interiorRings = [];
1216
1216
  for (let n = 1, i = t.length; n < i; n++) {
1217
- const o = new It(t[n], this, !1);
1217
+ const o = new $t(t[n], this, !1);
1218
1218
  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);
1219
1219
  }
1220
1220
  this.multiPoly = e;
@@ -1223,13 +1223,13 @@ class Re {
1223
1223
  const t = this.exteriorRing.getSweepEvents();
1224
1224
  for (let e = 0, n = this.interiorRings.length; e < n; e++) {
1225
1225
  const i = this.interiorRings[e].getSweepEvents();
1226
- for (let o = 0, l = i.length; o < l; o++)
1226
+ for (let o = 0, u = i.length; o < u; o++)
1227
1227
  t.push(i[o]);
1228
1228
  }
1229
1229
  return t;
1230
1230
  }
1231
1231
  }
1232
- class $t {
1232
+ class kt {
1233
1233
  constructor(t, e) {
1234
1234
  if (!Array.isArray(t))
1235
1235
  throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
@@ -1248,7 +1248,7 @@ class $t {
1248
1248
  }
1249
1249
  };
1250
1250
  for (let n = 0, i = t.length; n < i; n++) {
1251
- const o = new Re(t[n], this);
1251
+ const o = new Ie(t[n], this);
1252
1252
  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);
1253
1253
  }
1254
1254
  this.isSubject = e;
@@ -1257,7 +1257,7 @@ class $t {
1257
1257
  const t = [];
1258
1258
  for (let e = 0, n = this.polys.length; e < n; e++) {
1259
1259
  const i = this.polys[e].getSweepEvents();
1260
- for (let o = 0, l = i.length; o < l; o++)
1260
+ for (let o = 0, u = i.length; o < u; o++)
1261
1261
  t.push(i[o]);
1262
1262
  }
1263
1263
  return t;
@@ -1271,35 +1271,35 @@ class nt {
1271
1271
  for (let n = 0, i = t.length; n < i; n++) {
1272
1272
  const o = t[n];
1273
1273
  if (!o.isInResult() || o.ringOut) continue;
1274
- let l = null, u = o.leftSE, c = o.rightSE;
1275
- const f = [u], p = u.point, s = [];
1276
- for (; l = u, u = c, f.push(u), u.point !== p; )
1274
+ let u = null, l = o.leftSE, c = o.rightSE;
1275
+ const f = [l], p = l.point, s = [];
1276
+ for (; u = l, l = c, f.push(l), l.point !== p; )
1277
1277
  for (; ; ) {
1278
- const a = u.getAvailableLinkedEvents();
1278
+ const a = l.getAvailableLinkedEvents();
1279
1279
  if (a.length === 0) {
1280
- const y = f[0].point, d = f[f.length - 1].point;
1281
- throw new Error(`Unable to complete output ring starting at [${y.x}, ${y.y}]. Last matching segment found ends at [${d.x}, ${d.y}].`);
1280
+ const y = f[0].point, x = f[f.length - 1].point;
1281
+ throw new Error(`Unable to complete output ring starting at [${y.x}, ${y.y}]. Last matching segment found ends at [${x.x}, ${x.y}].`);
1282
1282
  }
1283
1283
  if (a.length === 1) {
1284
1284
  c = a[0].otherSE;
1285
1285
  break;
1286
1286
  }
1287
1287
  let h = null;
1288
- for (let y = 0, d = s.length; y < d; y++)
1289
- if (s[y].point === u.point) {
1288
+ for (let y = 0, x = s.length; y < x; y++)
1289
+ if (s[y].point === l.point) {
1290
1290
  h = y;
1291
1291
  break;
1292
1292
  }
1293
1293
  if (h !== null) {
1294
- const y = s.splice(h)[0], d = f.splice(y.index);
1295
- d.unshift(d[0].otherSE), e.push(new nt(d.reverse()));
1294
+ const y = s.splice(h)[0], x = f.splice(y.index);
1295
+ x.unshift(x[0].otherSE), e.push(new nt(x.reverse()));
1296
1296
  continue;
1297
1297
  }
1298
1298
  s.push({
1299
1299
  index: f.length,
1300
- point: u.point
1300
+ point: l.point
1301
1301
  });
1302
- const g = u.getLeftmostComparator(l);
1302
+ const g = l.getLeftmostComparator(u);
1303
1303
  c = a.sort(g)[0].otherSE;
1304
1304
  break;
1305
1305
  }
@@ -1323,8 +1323,8 @@ class nt {
1323
1323
  if (e.length === 1) return null;
1324
1324
  const n = e[0], i = e[1];
1325
1325
  Ct(n, t, i) === 0 && e.shift(), e.push(e[0]);
1326
- const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : e.length - 1, u = this.isExteriorRing() ? e.length : -1, c = [];
1327
- for (let f = l; f != u; f += o) c.push([e[f].x, e[f].y]);
1326
+ const o = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : e.length - 1, l = this.isExteriorRing() ? e.length : -1, c = [];
1327
+ for (let f = u; f != l; f += o) c.push([e[f].x, e[f].y]);
1328
1328
  return c;
1329
1329
  }
1330
1330
  isExteriorRing() {
@@ -1341,8 +1341,8 @@ class nt {
1341
1341
  _calcEnclosingRing() {
1342
1342
  let t = this.events[0];
1343
1343
  for (let i = 1, o = this.events.length; i < o; i++) {
1344
- const l = this.events[i];
1345
- L.compare(t, l) > 0 && (t = l);
1344
+ const u = this.events[i];
1345
+ L.compare(t, u) > 0 && (t = u);
1346
1346
  }
1347
1347
  let e = t.segment.prevInResult(), n = e ? e.prevInResult() : null;
1348
1348
  for (; ; ) {
@@ -1371,7 +1371,7 @@ class At {
1371
1371
  return t;
1372
1372
  }
1373
1373
  }
1374
- class ke {
1374
+ class $e {
1375
1375
  constructor(t) {
1376
1376
  this.rings = t, this.polys = this._composePolys(t);
1377
1377
  }
@@ -1390,14 +1390,14 @@ class ke {
1390
1390
  if (!o.poly)
1391
1391
  if (o.isExteriorRing()) e.push(new At(o));
1392
1392
  else {
1393
- const l = o.enclosingRing();
1394
- l.poly || e.push(new At(l)), l.poly.addInterior(o);
1393
+ const u = o.enclosingRing();
1394
+ u.poly || e.push(new At(u)), u.poly.addInterior(o);
1395
1395
  }
1396
1396
  }
1397
1397
  return e;
1398
1398
  }
1399
1399
  }
1400
- class Ie {
1400
+ class ke {
1401
1401
  constructor(t) {
1402
1402
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : z.compare;
1403
1403
  this.queue = t, this.tree = new wt(e), this.segments = [];
@@ -1408,17 +1408,17 @@ class Ie {
1408
1408
  return t.isLeft ? this.queue.remove(t.otherSE) : this.tree.remove(e), n;
1409
1409
  const i = t.isLeft ? this.tree.add(e) : this.tree.find(e);
1410
1410
  if (!i) throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);
1411
- let o = i, l = i, u, c;
1412
- for (; u === void 0; )
1413
- o = this.tree.prev(o), o === null ? u = null : o.key.consumedBy === void 0 && (u = o.key);
1411
+ let o = i, u = i, l, c;
1412
+ for (; l === void 0; )
1413
+ o = this.tree.prev(o), o === null ? l = null : o.key.consumedBy === void 0 && (l = o.key);
1414
1414
  for (; c === void 0; )
1415
- l = this.tree.next(l), l === null ? c = null : l.key.consumedBy === void 0 && (c = l.key);
1415
+ u = this.tree.next(u), u === null ? c = null : u.key.consumedBy === void 0 && (c = u.key);
1416
1416
  if (t.isLeft) {
1417
1417
  let f = null;
1418
- if (u) {
1419
- const s = u.getIntersection(e);
1420
- if (s !== null && (e.isAnEndpoint(s) || (f = s), !u.isAnEndpoint(s))) {
1421
- const a = this._splitSafely(u, s);
1418
+ if (l) {
1419
+ const s = l.getIntersection(e);
1420
+ if (s !== null && (e.isAnEndpoint(s) || (f = s), !l.isAnEndpoint(s))) {
1421
+ const a = this._splitSafely(l, s);
1422
1422
  for (let h = 0, g = a.length; h < g; h++)
1423
1423
  n.push(a[h]);
1424
1424
  }
@@ -1439,13 +1439,13 @@ class Ie {
1439
1439
  for (let h = 0, g = a.length; h < g; h++)
1440
1440
  n.push(a[h]);
1441
1441
  }
1442
- n.length > 0 ? (this.tree.remove(e), n.push(t)) : (this.segments.push(e), e.prev = u);
1442
+ n.length > 0 ? (this.tree.remove(e), n.push(t)) : (this.segments.push(e), e.prev = l);
1443
1443
  } else {
1444
- if (u && c) {
1445
- const f = u.getIntersection(c);
1444
+ if (l && c) {
1445
+ const f = l.getIntersection(c);
1446
1446
  if (f !== null) {
1447
- if (!u.isAnEndpoint(f)) {
1448
- const p = this._splitSafely(u, f);
1447
+ if (!l.isAnEndpoint(f)) {
1448
+ const p = this._splitSafely(l, f);
1449
1449
  for (let s = 0, a = p.length; s < a; s++)
1450
1450
  n.push(p[s]);
1451
1451
  }
@@ -1470,20 +1470,20 @@ class Ie {
1470
1470
  return i.push(n), t.consumedBy === void 0 && this.tree.add(t), i;
1471
1471
  }
1472
1472
  }
1473
- const Ot = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, $e = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
1474
- class Ae {
1473
+ const Ot = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Ae = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
1474
+ class Oe {
1475
1475
  run(t, e, n) {
1476
- $.type = t, J.reset();
1477
- const i = [new $t(e, !0)];
1476
+ k.type = t, J.reset();
1477
+ const i = [new kt(e, !0)];
1478
1478
  for (let s = 0, a = n.length; s < a; s++)
1479
- i.push(new $t(n[s], !1));
1480
- if ($.numMultiPolys = i.length, $.type === "difference") {
1479
+ i.push(new kt(n[s], !1));
1480
+ if (k.numMultiPolys = i.length, k.type === "difference") {
1481
1481
  const s = i[0];
1482
1482
  let a = 1;
1483
1483
  for (; a < i.length; )
1484
1484
  pt(i[a].bbox, s.bbox) !== null ? a++ : i.splice(a, 1);
1485
1485
  }
1486
- if ($.type === "intersection")
1486
+ if (k.type === "intersection")
1487
1487
  for (let s = 0, a = i.length; s < a; s++) {
1488
1488
  const h = i[s];
1489
1489
  for (let g = s + 1, y = i.length; g < y; g++)
@@ -1496,94 +1496,94 @@ class Ae {
1496
1496
  if (o.insert(h[g]), o.size > Ot)
1497
1497
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
1498
1498
  }
1499
- const l = new Ie(o);
1500
- let u = o.size, c = o.pop();
1499
+ const u = new ke(o);
1500
+ let l = o.size, c = o.pop();
1501
1501
  for (; c; ) {
1502
1502
  const s = c.key;
1503
- if (o.size === u) {
1503
+ if (o.size === l) {
1504
1504
  const h = s.segment;
1505
1505
  throw new Error(`Unable to pop() ${s.isLeft ? "left" : "right"} SweepEvent [${s.point.x}, ${s.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
1506
1506
  }
1507
1507
  if (o.size > Ot)
1508
1508
  throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
1509
- if (l.segments.length > $e)
1509
+ if (u.segments.length > Ae)
1510
1510
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
1511
- const a = l.process(s);
1511
+ const a = u.process(s);
1512
1512
  for (let h = 0, g = a.length; h < g; h++) {
1513
1513
  const y = a[h];
1514
1514
  y.consumedBy === void 0 && o.insert(y);
1515
1515
  }
1516
- u = o.size, c = o.pop();
1516
+ l = o.size, c = o.pop();
1517
1517
  }
1518
1518
  J.reset();
1519
- const f = nt.factory(l.segments);
1520
- return new ke(f).getGeom();
1519
+ const f = nt.factory(u.segments);
1520
+ return new $e(f).getGeom();
1521
1521
  }
1522
1522
  }
1523
- const $ = new Ae(), Oe = function(r) {
1524
- for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
1525
- e[n - 1] = arguments[n];
1526
- return $.run("union", r, e);
1527
- }, Ne = function(r) {
1523
+ const k = new Oe(), Ne = function(r) {
1528
1524
  for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
1529
1525
  e[n - 1] = arguments[n];
1530
- return $.run("intersection", r, e);
1526
+ return k.run("union", r, e);
1531
1527
  }, Be = function(r) {
1532
1528
  for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
1533
1529
  e[n - 1] = arguments[n];
1534
- return $.run("xor", r, e);
1530
+ return k.run("intersection", r, e);
1535
1531
  }, Ge = function(r) {
1536
1532
  for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
1537
1533
  e[n - 1] = arguments[n];
1538
- return $.run("difference", r, e);
1534
+ return k.run("xor", r, e);
1535
+ }, ze = function(r) {
1536
+ for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
1537
+ e[n - 1] = arguments[n];
1538
+ return k.run("difference", r, e);
1539
1539
  };
1540
- var Vt = {
1541
- union: Oe,
1542
- intersection: Ne,
1543
- xor: Be,
1544
- difference: Ge
1540
+ var Zt = {
1541
+ union: Ne,
1542
+ intersection: Be,
1543
+ xor: Ge,
1544
+ difference: ze
1545
1545
  };
1546
- function ze(r, t = {}) {
1546
+ function Fe(r, t = {}) {
1547
1547
  const e = [];
1548
- if (mt(r, (i) => {
1548
+ if (vt(r, (i) => {
1549
1549
  e.push(i.coordinates);
1550
1550
  }), e.length < 2)
1551
1551
  throw new Error("Must have at least 2 geometries");
1552
- const n = Vt.union(e[0], ...e.slice(1));
1553
- return n.length === 0 ? null : n.length === 1 ? xt(n[0], t.properties) : Qt(n, t.properties);
1552
+ const n = Zt.union(e[0], ...e.slice(1));
1553
+ return n.length === 0 ? null : n.length === 1 ? xt(n[0], t.properties) : Ut(n, t.properties);
1554
1554
  }
1555
- var Zt = ze;
1555
+ var Jt = Fe;
1556
1556
  function gt(r) {
1557
1557
  const t = [...r];
1558
1558
  return t[2] < t[0] && (Math.abs((t[0] + t[2] + 360) / 2) > Math.abs((t[0] - 360 + t[2]) / 2) ? t[0] -= 360 : t[2] += 360), t;
1559
1559
  }
1560
1560
  function W() {
1561
1561
  }
1562
- function Jt(r) {
1562
+ function Wt(r) {
1563
1563
  return r();
1564
1564
  }
1565
1565
  function Nt() {
1566
1566
  return /* @__PURE__ */ Object.create(null);
1567
1567
  }
1568
1568
  function rt(r) {
1569
- r.forEach(Jt);
1569
+ r.forEach(Wt);
1570
1570
  }
1571
- function Wt(r) {
1571
+ function Kt(r) {
1572
1572
  return typeof r == "function";
1573
1573
  }
1574
1574
  function Te(r, t) {
1575
1575
  return r != r ? t == t : r !== t || r && typeof r == "object" || typeof r == "function";
1576
1576
  }
1577
- function Fe(r) {
1577
+ function qe(r) {
1578
1578
  return Object.keys(r).length === 0;
1579
1579
  }
1580
- function qe(r, t) {
1580
+ function Qe(r, t) {
1581
1581
  r.appendChild(t);
1582
1582
  }
1583
- function Qe(r, t, e) {
1583
+ function Ue(r, t, e) {
1584
1584
  r.insertBefore(t, e || null);
1585
1585
  }
1586
- function Kt(r) {
1586
+ function Ht(r) {
1587
1587
  r.parentNode && r.parentNode.removeChild(r);
1588
1588
  }
1589
1589
  function Bt(r) {
@@ -1592,7 +1592,7 @@ function Bt(r) {
1592
1592
  function N(r, t, e) {
1593
1593
  e == null ? r.removeAttribute(t) : r.getAttribute(t) !== e && r.setAttribute(t, e);
1594
1594
  }
1595
- function Ue(r) {
1595
+ function Ye(r) {
1596
1596
  return Array.from(r.childNodes);
1597
1597
  }
1598
1598
  function H(r, t, e) {
@@ -1604,17 +1604,17 @@ function X(r) {
1604
1604
  }
1605
1605
  const U = [], Gt = [];
1606
1606
  let Y = [];
1607
- const zt = [], Ye = /* @__PURE__ */ Promise.resolve();
1607
+ const zt = [], De = /* @__PURE__ */ Promise.resolve();
1608
1608
  let yt = !1;
1609
- function De() {
1610
- yt || (yt = !0, Ye.then(Ht));
1609
+ function je() {
1610
+ yt || (yt = !0, De.then(te));
1611
1611
  }
1612
1612
  function dt(r) {
1613
1613
  Y.push(r);
1614
1614
  }
1615
1615
  const lt = /* @__PURE__ */ new Set();
1616
1616
  let Q = 0;
1617
- function Ht() {
1617
+ function te() {
1618
1618
  if (Q !== 0)
1619
1619
  return;
1620
1620
  const r = Et;
@@ -1622,7 +1622,7 @@ function Ht() {
1622
1622
  try {
1623
1623
  for (; Q < U.length; ) {
1624
1624
  const t = U[Q];
1625
- Q++, X(t), je(t.$$);
1625
+ Q++, X(t), Xe(t.$$);
1626
1626
  }
1627
1627
  } catch (t) {
1628
1628
  throw U.length = 0, Q = 0, t;
@@ -1638,36 +1638,36 @@ function Ht() {
1638
1638
  zt.pop()();
1639
1639
  yt = !1, lt.clear(), X(r);
1640
1640
  }
1641
- function je(r) {
1641
+ function Xe(r) {
1642
1642
  if (r.fragment !== null) {
1643
1643
  r.update(), rt(r.before_update);
1644
1644
  const t = r.dirty;
1645
1645
  r.dirty = [-1], r.fragment && r.fragment.p(r.ctx, t), r.after_update.forEach(dt);
1646
1646
  }
1647
1647
  }
1648
- function Xe(r) {
1648
+ function Ve(r) {
1649
1649
  const t = [], e = [];
1650
1650
  Y.forEach((n) => r.indexOf(n) === -1 ? t.push(n) : e.push(n)), e.forEach((n) => n()), Y = t;
1651
1651
  }
1652
- const Ve = /* @__PURE__ */ new Set();
1653
- function Ze(r, t) {
1654
- r && r.i && (Ve.delete(r), r.i(t));
1652
+ const Ze = /* @__PURE__ */ new Set();
1653
+ function Je(r, t) {
1654
+ r && r.i && (Ze.delete(r), r.i(t));
1655
1655
  }
1656
- function Je(r, t, e) {
1656
+ function We(r, t, e) {
1657
1657
  const { fragment: n, after_update: i } = r.$$;
1658
1658
  n && n.m(t, e), dt(() => {
1659
- const o = r.$$.on_mount.map(Jt).filter(Wt);
1659
+ const o = r.$$.on_mount.map(Wt).filter(Kt);
1660
1660
  r.$$.on_destroy ? r.$$.on_destroy.push(...o) : rt(o), r.$$.on_mount = [];
1661
1661
  }), i.forEach(dt);
1662
1662
  }
1663
- function We(r, t) {
1663
+ function Ke(r, t) {
1664
1664
  const e = r.$$;
1665
- e.fragment !== null && (Xe(e.after_update), rt(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
1665
+ e.fragment !== null && (Ve(e.after_update), rt(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
1666
1666
  }
1667
- function Ke(r, t) {
1668
- r.$$.dirty[0] === -1 && (U.push(r), De(), r.$$.dirty.fill(0)), r.$$.dirty[t / 31 | 0] |= 1 << t % 31;
1667
+ function He(r, t) {
1668
+ r.$$.dirty[0] === -1 && (U.push(r), je(), r.$$.dirty.fill(0)), r.$$.dirty[t / 31 | 0] |= 1 << t % 31;
1669
1669
  }
1670
- function He(r, t, e, n, i, o, l = null, u = [-1]) {
1670
+ function tn(r, t, e, n, i, o, u = null, l = [-1]) {
1671
1671
  const c = Et;
1672
1672
  X(r);
1673
1673
  const f = r.$$ = {
@@ -1687,26 +1687,26 @@ function He(r, t, e, n, i, o, l = null, u = [-1]) {
1687
1687
  context: new Map(t.context || (c ? c.$$.context : [])),
1688
1688
  // everything else
1689
1689
  callbacks: Nt(),
1690
- dirty: u,
1690
+ dirty: l,
1691
1691
  skip_bound: !1,
1692
1692
  root: t.target || c.$$.root
1693
1693
  };
1694
- l && l(f.root);
1694
+ u && u(f.root);
1695
1695
  let p = !1;
1696
1696
  if (f.ctx = e ? e(r, t.props || {}, (s, a, ...h) => {
1697
1697
  const g = h.length ? h[0] : a;
1698
- return f.ctx && i(f.ctx[s], f.ctx[s] = g) && (!f.skip_bound && f.bound[s] && f.bound[s](g), p && Ke(r, s)), a;
1698
+ return f.ctx && i(f.ctx[s], f.ctx[s] = g) && (!f.skip_bound && f.bound[s] && f.bound[s](g), p && He(r, s)), a;
1699
1699
  }) : [], f.update(), p = !0, rt(f.before_update), f.fragment = n ? n(f.ctx) : !1, t.target) {
1700
1700
  if (t.hydrate) {
1701
- const s = Ue(t.target);
1702
- f.fragment && f.fragment.l(s), s.forEach(Kt);
1701
+ const s = Ye(t.target);
1702
+ f.fragment && f.fragment.l(s), s.forEach(Ht);
1703
1703
  } else
1704
1704
  f.fragment && f.fragment.c();
1705
- t.intro && Ze(r.$$.fragment), Je(r, t.target, t.anchor), Ht();
1705
+ t.intro && Je(r.$$.fragment), We(r, t.target, t.anchor), te();
1706
1706
  }
1707
1707
  X(c);
1708
1708
  }
1709
- class tn {
1709
+ class en {
1710
1710
  constructor() {
1711
1711
  /**
1712
1712
  * ### PRIVATE API
@@ -1727,7 +1727,7 @@ class tn {
1727
1727
  }
1728
1728
  /** @returns {void} */
1729
1729
  $destroy() {
1730
- We(this, 1), this.$destroy = W;
1730
+ Ke(this, 1), this.$destroy = W;
1731
1731
  }
1732
1732
  /**
1733
1733
  * @template {Extract<keyof Events, string>} K
@@ -1736,7 +1736,7 @@ class tn {
1736
1736
  * @returns {() => void}
1737
1737
  */
1738
1738
  $on(t, e) {
1739
- if (!Wt(e))
1739
+ if (!Kt(e))
1740
1740
  return W;
1741
1741
  const n = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
1742
1742
  return n.push(e), () => {
@@ -1749,12 +1749,12 @@ class tn {
1749
1749
  * @returns {void}
1750
1750
  */
1751
1751
  $set(t) {
1752
- this.$$set && !Fe(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
1752
+ this.$$set && !qe(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
1753
1753
  }
1754
1754
  }
1755
- const en = "4";
1756
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(en);
1757
- function nn(r) {
1755
+ const nn = "4";
1756
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(nn);
1757
+ function rn(r) {
1758
1758
  let t, e, n;
1759
1759
  return {
1760
1760
  c() {
@@ -1772,7 +1772,7 @@ function nn(r) {
1772
1772
  );
1773
1773
  },
1774
1774
  m(i, o) {
1775
- Qe(i, t, o), qe(t, e);
1775
+ Ue(i, t, o), Qe(t, e);
1776
1776
  },
1777
1777
  p(i, [o]) {
1778
1778
  o & /*displayIn*/
@@ -1794,42 +1794,42 @@ function nn(r) {
1794
1794
  i: W,
1795
1795
  o: W,
1796
1796
  d(i) {
1797
- i && Kt(t);
1797
+ i && Ht(t);
1798
1798
  }
1799
1799
  };
1800
1800
  }
1801
- function rn(r, t, e) {
1801
+ function on(r, t, e) {
1802
1802
  let { displayIn: n } = t;
1803
1803
  return r.$$set = (i) => {
1804
1804
  "displayIn" in i && e(0, n = i.displayIn);
1805
1805
  }, [n];
1806
1806
  }
1807
- class on extends tn {
1807
+ class sn extends en {
1808
1808
  constructor(t) {
1809
- super(), He(this, t, rn, nn, Te, { displayIn: 0 });
1809
+ super(), tn(this, t, on, rn, Te, { displayIn: 0 });
1810
1810
  }
1811
1811
  }
1812
- function sn(r) {
1812
+ function ln(r) {
1813
1813
  const t = [];
1814
- if (mt(r, (i) => {
1814
+ if (vt(r, (i) => {
1815
1815
  t.push(i.coordinates);
1816
1816
  }), t.length < 2)
1817
1817
  throw new Error("Must have at least two features");
1818
- const e = r.features[0].properties || {}, n = Vt.difference(t[0], ...t.slice(1));
1819
- return n.length === 0 ? null : n.length === 1 ? xt(n[0], e) : Qt(n, e);
1818
+ const e = r.features[0].properties || {}, n = Zt.difference(t[0], ...t.slice(1));
1819
+ return n.length === 0 ? null : n.length === 1 ? xt(n[0], e) : Ut(n, e);
1820
1820
  }
1821
- var ln = sn;
1822
- function un(r) {
1821
+ var un = ln;
1822
+ function fn(r) {
1823
1823
  if (!r)
1824
1824
  throw new Error("geojson is required");
1825
1825
  var t = [];
1826
- return oe(r, function(e) {
1826
+ return se(r, function(e) {
1827
1827
  t.push(e);
1828
1828
  }), Z(t);
1829
1829
  }
1830
- var fn = un;
1831
- function Tt(r, t) {
1832
- const e = ln(
1830
+ var cn = fn;
1831
+ function Ft(r, t) {
1832
+ const e = un(
1833
1833
  Z([
1834
1834
  xt([
1835
1835
  [
@@ -1846,11 +1846,11 @@ function Tt(r, t) {
1846
1846
  if (!e)
1847
1847
  return;
1848
1848
  e.properties = { isMask: !0 };
1849
- const n = gt(ut(r)), i = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, l = n[2] > 180, u = fn(r);
1850
- if (u.features.length > 1 && (o || l))
1851
- for (const c of u.features) {
1849
+ const n = gt(ut(r)), i = (n[2] - n[0]) / 360 / 1e3, o = n[0] < -180, u = n[2] > 180, l = cn(r);
1850
+ if (l.features.length > 1 && (o || u))
1851
+ for (const c of l.features) {
1852
1852
  const f = gt(ut(c));
1853
- if (l && f[0] < -180 + i)
1853
+ if (u && f[0] < -180 + i)
1854
1854
  for (const p of c.geometry.coordinates)
1855
1855
  for (const s of p)
1856
1856
  s[0] += 360 - i;
@@ -1861,40 +1861,41 @@ function Tt(r, t) {
1861
1861
  }
1862
1862
  t(
1863
1863
  Z([
1864
- u.features.length < 2 ? r : Zt(u) ?? r,
1864
+ l.features.length < 2 ? r : Jt(l) ?? r,
1865
1865
  e
1866
1866
  ])
1867
1867
  );
1868
1868
  }
1869
- function hn(r, t = !0, e = !0, n = {}, i = {}, o = (l) => {
1870
- var f, p, s;
1871
- const u = (f = l == null ? void 0 : l.geometry) == null ? void 0 : f.type, c = (p = l == null ? void 0 : l.properties) != null && p.isMask ? 0 : u === "LineString" || u === "MultiLineString" ? 3 : 2;
1869
+ const Tt = (r) => {
1870
+ var n, i, o;
1871
+ const t = (n = r == null ? void 0 : r.geometry) == null ? void 0 : n.type, e = (i = r == null ? void 0 : r.properties) != null && i.isMask ? 0 : t === "LineString" || t === "MultiLineString" ? 3 : 2;
1872
1872
  return {
1873
1873
  color: "#3170fe",
1874
1874
  fillColor: "#000",
1875
- fillOpacity: (s = l == null ? void 0 : l.properties) != null && s.isMask ? 0.1 : 0,
1876
- weight: c,
1877
- dashArray: [c, c],
1875
+ fillOpacity: (o = r == null ? void 0 : r.properties) != null && o.isMask ? 0.1 : 0,
1876
+ weight: e,
1877
+ dashArray: [e, e],
1878
1878
  lineCap: "butt"
1879
1879
  };
1880
- }) {
1881
- let l;
1882
- const u = [];
1880
+ };
1881
+ function an(r, t = !0, e = !0, n = {}, i = {}, o = Tt) {
1882
+ let u;
1883
+ const l = [];
1883
1884
  let c, f;
1884
- const p = F.geoJSON(void 0, {
1885
- style: o,
1885
+ const p = T.geoJSON(void 0, {
1886
+ style: o === !0 ? Tt : o === !1 ? void 0 : o ?? void 0,
1886
1887
  interactive: !1
1887
1888
  }).addTo(r), s = (h) => {
1888
- l == null || l({
1889
+ u == null || u({
1889
1890
  type: "mapClick",
1890
1891
  coordinates: [h.latlng.lng, h.latlng.lat]
1891
1892
  });
1892
1893
  };
1893
1894
  function a(h, g = !1) {
1894
1895
  const y = document.createElement("div");
1895
- return new on({ props: { displayIn: "leaflet" }, target: y }), new F.Marker(h, {
1896
+ return new sn({ props: { displayIn: "leaflet" }, target: y }), new T.Marker(h, {
1896
1897
  interactive: g,
1897
- icon: new F.DivIcon({
1898
+ icon: new T.DivIcon({
1898
1899
  html: y,
1899
1900
  className: "",
1900
1901
  iconAnchor: [12, 26],
@@ -1905,7 +1906,7 @@ function hn(r, t = !0, e = !0, n = {}, i = {}, o = (l) => {
1905
1906
  }
1906
1907
  return {
1907
1908
  setEventHandler(h) {
1908
- h ? (l = h, r.on("click", s)) : (l = void 0, r.off("click", s));
1909
+ h ? (u = h, r.on("click", s)) : (u = void 0, r.off("click", s));
1909
1910
  },
1910
1911
  flyTo(h, g) {
1911
1912
  r.flyTo([h[1], h[0]], g, { duration: 2, ...n });
@@ -1932,90 +1933,98 @@ function hn(r, t = !0, e = !0, n = {}, i = {}, o = (l) => {
1932
1933
  if (!t)
1933
1934
  return;
1934
1935
  const g = h && [h[1], h[0]];
1935
- f ? g ? f.setLatLng(g) : (f.remove(), f = void 0) : g && (f = (typeof t == "object" ? new F.Marker(g, t) : a(g)).addTo(r), (y = f.getElement()) == null || y.classList.add("marker-reverse"));
1936
+ f ? g ? f.setLatLng(g) : (f.remove(), f = void 0) : g && (t instanceof Function ? f = t(r) ?? void 0 : (f = (typeof t == "object" ? new T.Marker(g, t) : a(g)).addTo(r), (y = f.getElement()) == null || y.classList.add("marker-reverse")));
1936
1937
  },
1937
1938
  setMarkers(h, g) {
1938
- if (!t)
1939
- return;
1940
- function y(d) {
1941
- p.clearLayers(), d && p.addData(d);
1939
+ function y(x) {
1940
+ p.clearLayers(), x && p.addData(x);
1942
1941
  }
1943
- for (const d of u)
1944
- d.remove();
1945
- if (u.length = 0, y(), g) {
1946
- let d = !1;
1942
+ for (const x of l)
1943
+ x.remove();
1944
+ if (l.length = 0, y(), g) {
1945
+ let x = !1;
1947
1946
  if (g.geometry.type === "GeometryCollection") {
1948
- const v = g.geometry.geometries.filter(
1949
- (m) => m.type === "Polygon" || m.type === "MultiPolygon"
1947
+ const d = g.geometry.geometries.filter(
1948
+ (v) => v.type === "Polygon" || v.type === "MultiPolygon"
1950
1949
  );
1951
- t: if (v.length > 0) {
1952
- const m = Zt(
1953
- Z(v.map((w) => V(w)))
1950
+ t: if (d.length > 0) {
1951
+ const v = Jt(
1952
+ Z(d.map((m) => V(m)))
1954
1953
  );
1955
- if (!m)
1954
+ if (!v)
1956
1955
  break t;
1957
- Tt(
1956
+ Ft(
1958
1957
  {
1959
1958
  ...g,
1960
- geometry: m.geometry
1959
+ geometry: v.geometry
1961
1960
  },
1962
1961
  y
1963
- ), d = !0;
1962
+ ), x = !0;
1964
1963
  } else {
1965
- const m = g.geometry.geometries.filter(
1966
- (w) => w.type === "LineString" || w.type === "MultiLineString"
1964
+ const v = g.geometry.geometries.filter(
1965
+ (m) => m.type === "LineString" || m.type === "MultiLineString"
1967
1966
  );
1968
- m.length > 0 && (y({
1967
+ v.length > 0 && (y({
1969
1968
  ...g,
1970
- geometry: { type: "GeometryCollection", geometries: m }
1971
- }), d = !0);
1969
+ geometry: { type: "GeometryCollection", geometries: v }
1970
+ }), x = !0);
1972
1971
  }
1973
1972
  }
1974
- if (!d) {
1973
+ if (!x) {
1975
1974
  if (g.geometry.type === "Polygon" || g.geometry.type === "MultiPolygon")
1976
- Tt(g, (v) => {
1977
- if (!v)
1975
+ Ft(g, (d) => {
1976
+ if (!d)
1978
1977
  return;
1979
- const m = [...v.features], w = gt(ut(g)), E = w[2] - w[0];
1980
- w[0] - E / 4 < -180 && m.push(...Ft(v, -360).features), w[2] + E / 4 > 180 && m.push(...Ft(v, 360).features), y(Z(m));
1978
+ const v = [...d.features], m = gt(ut(g)), w = m[2] - m[0];
1979
+ m[0] - w / 4 < -180 && v.push(...qt(d, -360).features), m[2] + w / 4 > 180 && v.push(...qt(d, 360).features), y(Z(v));
1981
1980
  });
1982
1981
  else if (g.geometry.type === "LineString" || g.geometry.type === "MultiLineString") {
1983
1982
  y(g);
1984
1983
  return;
1985
1984
  }
1986
1985
  }
1987
- const x = [g.center[1], g.center[0]];
1988
- u.push(
1989
- (typeof t == "object" ? new F.Marker(x, t) : a(x)).addTo(r)
1990
- );
1986
+ if (t instanceof Function) {
1987
+ const d = t(r, g);
1988
+ d && l.push(d.addTo(r));
1989
+ } else if (t) {
1990
+ const d = [g.center[1], g.center[0]];
1991
+ l.push(
1992
+ typeof t == "object" ? new T.Marker(d, t) : a(d).addTo(r)
1993
+ );
1994
+ }
1991
1995
  }
1992
1996
  if (e)
1993
- for (const d of h ?? []) {
1994
- if (d === g)
1997
+ for (const x of h ?? []) {
1998
+ if (x === g)
1995
1999
  continue;
1996
- const x = [
1997
- d.center[1],
1998
- d.center[0]
1999
- ], v = typeof e == "object" ? new F.Marker(x, e) : a(x, !0);
2000
- v.addTo(r).bindTooltip(
2001
- d.place_type[0] === "reverse" ? d.place_name : d.place_name.replace(/,.*/, ""),
2002
- {
2003
- direction: "top"
2004
- }
2005
- );
2000
+ const d = [
2001
+ x.center[1],
2002
+ x.center[0]
2003
+ ];
2004
+ let v;
2005
+ if (e instanceof Function) {
2006
+ if (v = e(r, x), !v)
2007
+ continue;
2008
+ } else
2009
+ v = (typeof e == "object" ? new T.Marker(d, e) : a(d, !0)).addTo(r).bindTooltip(
2010
+ x.place_type[0] === "reverse" ? x.place_name : x.place_name.replace(/,.*/, ""),
2011
+ {
2012
+ direction: "top"
2013
+ }
2014
+ );
2006
2015
  const m = v.getElement();
2007
2016
  m && (m.addEventListener("click", (w) => {
2008
- w.stopPropagation(), l == null || l({ type: "markerClick", id: d.id });
2017
+ w.stopPropagation(), u == null || u({ type: "markerClick", id: x.id });
2009
2018
  }), m.addEventListener("mouseenter", () => {
2010
- l == null || l({ type: "markerMouseEnter", id: d.id });
2019
+ u == null || u({ type: "markerMouseEnter", id: x.id });
2011
2020
  }), m.addEventListener("mouseleave", () => {
2012
- l == null || l({ type: "markerMouseLeave", id: d.id });
2013
- }), m.classList.toggle("marker-fuzzy", !!d.matching_text)), u.push(v);
2021
+ u == null || u({ type: "markerMouseLeave", id: x.id });
2022
+ }), m.classList.toggle("marker-fuzzy", !!x.matching_text)), l.push(v);
2014
2023
  }
2015
2024
  },
2016
2025
  setSelectedMarker(h) {
2017
2026
  var g, y;
2018
- c && ((g = c.getElement()) == null || g.classList.toggle("marker-selected", !1)), c = h > -1 ? u[h] : void 0, (y = c == null ? void 0 : c.getElement()) == null || y.classList.toggle("marker-selected", !0);
2027
+ c && ((g = c.getElement()) == null || g.classList.toggle("marker-selected", !1)), c = h > -1 ? l[h] : void 0, (y = c == null ? void 0 : c.getElement()) == null || y.classList.toggle("marker-selected", !0);
2019
2028
  },
2020
2029
  getCenterAndZoom() {
2021
2030
  const h = r.getCenter();
@@ -2023,22 +2032,22 @@ function hn(r, t = !0, e = !0, n = {}, i = {}, o = (l) => {
2023
2032
  }
2024
2033
  };
2025
2034
  }
2026
- function Ft(r, t) {
2027
- const e = fe(r);
2035
+ function qt(r, t) {
2036
+ const e = ce(r);
2028
2037
  for (const n of e.features)
2029
2038
  if (n.geometry.type == "MultiPolygon")
2030
2039
  for (const i of n.geometry.coordinates)
2031
- qt(i, t);
2040
+ Qt(i, t);
2032
2041
  else
2033
- qt(n.geometry.coordinates, t);
2042
+ Qt(n.geometry.coordinates, t);
2034
2043
  return e;
2035
2044
  }
2036
- function qt(r, t) {
2045
+ function Qt(r, t) {
2037
2046
  for (const e of r)
2038
2047
  for (const n of e)
2039
2048
  n[0] += t;
2040
2049
  }
2041
2050
  export {
2042
- hn as createLeafletMapController
2051
+ an as createLeafletMapController
2043
2052
  };
2044
2053
  //# sourceMappingURL=leaflet-controller.js.map