@maptiler/geocoding-control 0.0.60 → 0.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/leaflet.js +925 -234
- package/dist/leaflet.umd.js +21 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/maplibregl.js +925 -234
- package/dist/maplibregl.umd.js +21 -1
- package/package.json +2 -2
- package/src/lib/GeocodingControl.svelte +4 -1
- package/src/lib/types.ts +1 -1
package/dist/leaflet.js
CHANGED
|
@@ -201,6 +201,7 @@ function Ro() {
|
|
|
201
201
|
r: 0,
|
|
202
202
|
c: [],
|
|
203
203
|
p: kr
|
|
204
|
+
// parent group
|
|
204
205
|
};
|
|
205
206
|
}
|
|
206
207
|
function Oo() {
|
|
@@ -242,16 +243,19 @@ function Mi(r, t, e, n, i, o, s, a = [-1]) {
|
|
|
242
243
|
const l = r.$$ = {
|
|
243
244
|
fragment: null,
|
|
244
245
|
ctx: [],
|
|
246
|
+
// state
|
|
245
247
|
props: o,
|
|
246
248
|
update: xt,
|
|
247
249
|
not_equal: i,
|
|
248
250
|
bound: ea(),
|
|
251
|
+
// lifecycle
|
|
249
252
|
on_mount: [],
|
|
250
253
|
on_destroy: [],
|
|
251
254
|
on_disconnect: [],
|
|
252
255
|
before_update: [],
|
|
253
256
|
after_update: [],
|
|
254
257
|
context: new Map(t.context || (u ? u.$$.context : [])),
|
|
258
|
+
// everything else
|
|
255
259
|
callbacks: ea(),
|
|
256
260
|
dirty: a,
|
|
257
261
|
skip_bound: !1,
|
|
@@ -359,13 +363,38 @@ function bl(r) {
|
|
|
359
363
|
let t, e, n;
|
|
360
364
|
return {
|
|
361
365
|
c() {
|
|
362
|
-
t = Ir("svg"), e = Ir("path"), B(e, "stroke-width", "4"), B(e, "fill-rule", "evenodd"), B(e, "clip-rule", "evenodd"), B(e, "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"), B(e, "class", "svelte-1k1cmht"), B(t, "width", n =
|
|
366
|
+
t = Ir("svg"), e = Ir("path"), B(e, "stroke-width", "4"), B(e, "fill-rule", "evenodd"), B(e, "clip-rule", "evenodd"), B(e, "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"), B(e, "class", "svelte-1k1cmht"), B(t, "width", n = /*displayIn*/
|
|
367
|
+
r[0] !== "list" ? void 0 : "20"), B(t, "viewBox", "0 0 70 85"), B(t, "fill", "none"), B(t, "class", "svelte-1k1cmht"), rn(
|
|
368
|
+
t,
|
|
369
|
+
"in-map",
|
|
370
|
+
/*displayIn*/
|
|
371
|
+
r[0] !== "list"
|
|
372
|
+
), rn(
|
|
373
|
+
t,
|
|
374
|
+
"list-icon",
|
|
375
|
+
/*displayIn*/
|
|
376
|
+
r[0] === "list"
|
|
377
|
+
);
|
|
363
378
|
},
|
|
364
379
|
m(i, o) {
|
|
365
380
|
Ke(i, t, o), lt(t, e);
|
|
366
381
|
},
|
|
367
382
|
p(i, [o]) {
|
|
368
|
-
o &
|
|
383
|
+
o & /*displayIn*/
|
|
384
|
+
1 && n !== (n = /*displayIn*/
|
|
385
|
+
i[0] !== "list" ? void 0 : "20") && B(t, "width", n), o & /*displayIn*/
|
|
386
|
+
1 && rn(
|
|
387
|
+
t,
|
|
388
|
+
"in-map",
|
|
389
|
+
/*displayIn*/
|
|
390
|
+
i[0] !== "list"
|
|
391
|
+
), o & /*displayIn*/
|
|
392
|
+
1 && rn(
|
|
393
|
+
t,
|
|
394
|
+
"list-icon",
|
|
395
|
+
/*displayIn*/
|
|
396
|
+
i[0] === "list"
|
|
397
|
+
);
|
|
369
398
|
},
|
|
370
399
|
i: xt,
|
|
371
400
|
o: xt,
|
|
@@ -435,13 +464,40 @@ function aa(r) {
|
|
|
435
464
|
let t, e, n, i, o;
|
|
436
465
|
return e = new Nl({}), {
|
|
437
466
|
c() {
|
|
438
|
-
t = Qt("button"), Qi(e.$$.fragment), B(t, "type", "button"), B(
|
|
467
|
+
t = Qt("button"), Qi(e.$$.fragment), B(t, "type", "button"), B(
|
|
468
|
+
t,
|
|
469
|
+
"title",
|
|
470
|
+
/*reverseButtonTitle*/
|
|
471
|
+
r[8]
|
|
472
|
+
), B(t, "class", "svelte-1h1zm6d"), rn(
|
|
473
|
+
t,
|
|
474
|
+
"active",
|
|
475
|
+
/*reverseActive*/
|
|
476
|
+
r[1]
|
|
477
|
+
);
|
|
439
478
|
},
|
|
440
479
|
m(s, a) {
|
|
441
|
-
Ke(s, t, a), ci(e, t, null), n = !0, i || (o = ke(
|
|
480
|
+
Ke(s, t, a), ci(e, t, null), n = !0, i || (o = ke(
|
|
481
|
+
t,
|
|
482
|
+
"click",
|
|
483
|
+
/*click_handler_2*/
|
|
484
|
+
r[55]
|
|
485
|
+
), i = !0);
|
|
442
486
|
},
|
|
443
487
|
p(s, a) {
|
|
444
|
-
(!n || a[0] &
|
|
488
|
+
(!n || a[0] & /*reverseButtonTitle*/
|
|
489
|
+
256) && B(
|
|
490
|
+
t,
|
|
491
|
+
"title",
|
|
492
|
+
/*reverseButtonTitle*/
|
|
493
|
+
s[8]
|
|
494
|
+
), (!n || a[0] & /*reverseActive*/
|
|
495
|
+
2) && rn(
|
|
496
|
+
t,
|
|
497
|
+
"active",
|
|
498
|
+
/*reverseActive*/
|
|
499
|
+
s[1]
|
|
500
|
+
);
|
|
445
501
|
},
|
|
446
502
|
i(s) {
|
|
447
503
|
n || (Kt(e.$$.fragment, s), n = !0);
|
|
@@ -455,7 +511,10 @@ function aa(r) {
|
|
|
455
511
|
};
|
|
456
512
|
}
|
|
457
513
|
function Dl(r) {
|
|
458
|
-
let t, e, n, i, o =
|
|
514
|
+
let t, e, n, i, o = (
|
|
515
|
+
/*listFeatures*/
|
|
516
|
+
r[12]
|
|
517
|
+
), s = [];
|
|
459
518
|
for (let u = 0; u < o.length; u += 1)
|
|
460
519
|
s[u] = la(oa(r, o, u));
|
|
461
520
|
const a = (u) => be(s[u], 1, 1, () => {
|
|
@@ -473,13 +532,25 @@ function Dl(r) {
|
|
|
473
532
|
for (let c = 0; c < s.length; c += 1)
|
|
474
533
|
s[c].m(t, null);
|
|
475
534
|
e = !0, n || (i = [
|
|
476
|
-
ke(
|
|
477
|
-
|
|
535
|
+
ke(
|
|
536
|
+
t,
|
|
537
|
+
"mouseout",
|
|
538
|
+
/*mouseout_handler*/
|
|
539
|
+
r[58]
|
|
540
|
+
),
|
|
541
|
+
ke(
|
|
542
|
+
t,
|
|
543
|
+
"blur",
|
|
544
|
+
/*blur_handler_1*/
|
|
545
|
+
r[59]
|
|
546
|
+
)
|
|
478
547
|
], n = !0);
|
|
479
548
|
},
|
|
480
549
|
p(u, l) {
|
|
481
|
-
if (l[0] &
|
|
482
|
-
|
|
550
|
+
if (l[0] & /*selectedItemIndex, pick, listFeatures, showPlaceType*/
|
|
551
|
+
2110464) {
|
|
552
|
+
o = /*listFeatures*/
|
|
553
|
+
u[12];
|
|
483
554
|
let c;
|
|
484
555
|
for (c = 0; c < o.length; c += 1) {
|
|
485
556
|
const f = oa(u, o, c);
|
|
@@ -512,13 +583,21 @@ function Tl(r) {
|
|
|
512
583
|
let t, e;
|
|
513
584
|
return {
|
|
514
585
|
c() {
|
|
515
|
-
t = Qt("div"), e = Vr(
|
|
586
|
+
t = Qt("div"), e = Vr(
|
|
587
|
+
/*noResultsMessage*/
|
|
588
|
+
r[5]
|
|
589
|
+
), B(t, "class", "no-results svelte-1h1zm6d");
|
|
516
590
|
},
|
|
517
591
|
m(n, i) {
|
|
518
592
|
Ke(n, t, i), lt(t, e);
|
|
519
593
|
},
|
|
520
594
|
p(n, i) {
|
|
521
|
-
i[0] &
|
|
595
|
+
i[0] & /*noResultsMessage*/
|
|
596
|
+
32 && ji(
|
|
597
|
+
e,
|
|
598
|
+
/*noResultsMessage*/
|
|
599
|
+
n[5]
|
|
600
|
+
);
|
|
522
601
|
},
|
|
523
602
|
i: xt,
|
|
524
603
|
o: xt,
|
|
@@ -548,13 +627,21 @@ function Al(r) {
|
|
|
548
627
|
let t, e;
|
|
549
628
|
return {
|
|
550
629
|
c() {
|
|
551
|
-
t = Qt("div"), e = Vr(
|
|
630
|
+
t = Qt("div"), e = Vr(
|
|
631
|
+
/*errorMessage*/
|
|
632
|
+
r[4]
|
|
633
|
+
), B(t, "class", "error svelte-1h1zm6d");
|
|
552
634
|
},
|
|
553
635
|
m(n, i) {
|
|
554
636
|
Ke(n, t, i), lt(t, e);
|
|
555
637
|
},
|
|
556
638
|
p(n, i) {
|
|
557
|
-
i[0] &
|
|
639
|
+
i[0] & /*errorMessage*/
|
|
640
|
+
16 && ji(
|
|
641
|
+
e,
|
|
642
|
+
/*errorMessage*/
|
|
643
|
+
n[4]
|
|
644
|
+
);
|
|
558
645
|
},
|
|
559
646
|
i: xt,
|
|
560
647
|
o: xt,
|
|
@@ -564,35 +651,73 @@ function Al(r) {
|
|
|
564
651
|
};
|
|
565
652
|
}
|
|
566
653
|
function ua(r) {
|
|
567
|
-
|
|
654
|
+
var i, o;
|
|
655
|
+
let t, e = (
|
|
656
|
+
/*feature*/
|
|
657
|
+
(((o = (i = r[68].properties) == null ? void 0 : i.place_type_name) == null ? void 0 : o[0]) ?? /*feature*/
|
|
658
|
+
r[68].place_type[0]) + ""
|
|
659
|
+
), n;
|
|
568
660
|
return {
|
|
569
661
|
c() {
|
|
570
662
|
t = Qt("span"), n = Vr(e), B(t, "class", "svelte-1h1zm6d");
|
|
571
663
|
},
|
|
572
|
-
m(
|
|
573
|
-
Ke(
|
|
664
|
+
m(s, a) {
|
|
665
|
+
Ke(s, t, a), lt(t, n);
|
|
574
666
|
},
|
|
575
|
-
p(
|
|
576
|
-
|
|
667
|
+
p(s, a) {
|
|
668
|
+
var u, l;
|
|
669
|
+
a[0] & /*listFeatures*/
|
|
670
|
+
4096 && e !== (e = /*feature*/
|
|
671
|
+
(((l = (u = s[68].properties) == null ? void 0 : u.place_type_name) == null ? void 0 : l[0]) ?? /*feature*/
|
|
672
|
+
s[68].place_type[0]) + "") && ji(n, e);
|
|
577
673
|
},
|
|
578
|
-
d(
|
|
579
|
-
|
|
674
|
+
d(s) {
|
|
675
|
+
s && Ae(t);
|
|
580
676
|
}
|
|
581
677
|
};
|
|
582
678
|
}
|
|
583
679
|
function la(r) {
|
|
584
|
-
let t, e, n, i, o, s, a =
|
|
680
|
+
let t, e, n, i, o, s, a = (
|
|
681
|
+
/*feature*/
|
|
682
|
+
r[68].place_name.replace(/,.*/, "") + ""
|
|
683
|
+
), u, l, c, f, h, g = (
|
|
684
|
+
/*feature*/
|
|
685
|
+
r[68].place_name.replace(/[^,]*,?\s*/, "") + ""
|
|
686
|
+
), p, m, d, y, I, C;
|
|
585
687
|
e = new Ka({ props: { displayIn: "list" } });
|
|
586
|
-
let x =
|
|
688
|
+
let x = (
|
|
689
|
+
/*showPlaceType*/
|
|
690
|
+
r[10] && ua(r)
|
|
691
|
+
);
|
|
587
692
|
function b() {
|
|
588
|
-
return
|
|
693
|
+
return (
|
|
694
|
+
/*mouseover_handler*/
|
|
695
|
+
r[56](
|
|
696
|
+
/*i*/
|
|
697
|
+
r[70]
|
|
698
|
+
)
|
|
699
|
+
);
|
|
589
700
|
}
|
|
590
701
|
function w() {
|
|
591
|
-
return
|
|
702
|
+
return (
|
|
703
|
+
/*focus_handler_1*/
|
|
704
|
+
r[57](
|
|
705
|
+
/*feature*/
|
|
706
|
+
r[68]
|
|
707
|
+
)
|
|
708
|
+
);
|
|
592
709
|
}
|
|
593
710
|
return {
|
|
594
711
|
c() {
|
|
595
|
-
t = Qt("li"), Qi(e.$$.fragment), n = qn(), i = Qt("span"), o = Qt("span"), s = Qt("span"), u = Vr(a), l = qn(), x && x.c(), c = qn(), f = Qt("span"), h = Qt("span"), p = Vr(g), m = qn(), B(s, "class", "svelte-1h1zm6d"), B(o, "class", "svelte-1h1zm6d"), B(i, "class", "svelte-1h1zm6d"), B(h, "class", "svelte-1h1zm6d"), B(f, "class", "svelte-1h1zm6d"), B(t, "tabindex", "0"), B(t, "data-selected", d =
|
|
712
|
+
t = Qt("li"), Qi(e.$$.fragment), n = qn(), i = Qt("span"), o = Qt("span"), s = Qt("span"), u = Vr(a), l = qn(), x && x.c(), c = qn(), f = Qt("span"), h = Qt("span"), p = Vr(g), m = qn(), B(s, "class", "svelte-1h1zm6d"), B(o, "class", "svelte-1h1zm6d"), B(i, "class", "svelte-1h1zm6d"), B(h, "class", "svelte-1h1zm6d"), B(f, "class", "svelte-1h1zm6d"), B(t, "tabindex", "0"), B(t, "data-selected", d = /*selectedItemIndex*/
|
|
713
|
+
r[13] === /*i*/
|
|
714
|
+
r[70]), B(t, "class", "svelte-1h1zm6d"), rn(
|
|
715
|
+
t,
|
|
716
|
+
"selected",
|
|
717
|
+
/*selectedItemIndex*/
|
|
718
|
+
r[13] === /*i*/
|
|
719
|
+
r[70]
|
|
720
|
+
);
|
|
596
721
|
},
|
|
597
722
|
m(D, T) {
|
|
598
723
|
Ke(D, t, T), ci(e, t, null), lt(t, n), lt(t, i), lt(i, o), lt(o, s), lt(s, u), lt(o, l), x && x.m(o, null), lt(t, c), lt(t, f), lt(f, h), lt(h, p), lt(t, m), y = !0, I || (C = [
|
|
@@ -601,7 +726,22 @@ function la(r) {
|
|
|
601
726
|
], I = !0);
|
|
602
727
|
},
|
|
603
728
|
p(D, T) {
|
|
604
|
-
r = D, (!y || T[0] &
|
|
729
|
+
r = D, (!y || T[0] & /*listFeatures*/
|
|
730
|
+
4096) && a !== (a = /*feature*/
|
|
731
|
+
r[68].place_name.replace(/,.*/, "") + "") && ji(u, a), /*showPlaceType*/
|
|
732
|
+
r[10] ? x ? x.p(r, T) : (x = ua(r), x.c(), x.m(o, null)) : x && (x.d(1), x = null), (!y || T[0] & /*listFeatures*/
|
|
733
|
+
4096) && g !== (g = /*feature*/
|
|
734
|
+
r[68].place_name.replace(/[^,]*,?\s*/, "") + "") && ji(p, g), (!y || T[0] & /*selectedItemIndex*/
|
|
735
|
+
8192 && d !== (d = /*selectedItemIndex*/
|
|
736
|
+
r[13] === /*i*/
|
|
737
|
+
r[70])) && B(t, "data-selected", d), (!y || T[0] & /*selectedItemIndex*/
|
|
738
|
+
8192) && rn(
|
|
739
|
+
t,
|
|
740
|
+
"selected",
|
|
741
|
+
/*selectedItemIndex*/
|
|
742
|
+
r[13] === /*i*/
|
|
743
|
+
r[70]
|
|
744
|
+
);
|
|
605
745
|
},
|
|
606
746
|
i(D) {
|
|
607
747
|
y || (Kt(e.$$.fragment, D), y = !0);
|
|
@@ -617,45 +757,200 @@ function la(r) {
|
|
|
617
757
|
function Fl(r) {
|
|
618
758
|
let t, e, n, i, o, s, a, u, l, c, f, h, g, p, m, d, y, I, C, x;
|
|
619
759
|
i = new Ol({}), c = new Sl({});
|
|
620
|
-
let b =
|
|
621
|
-
|
|
760
|
+
let b = (
|
|
761
|
+
/*abortController*/
|
|
762
|
+
r[17] && sa()
|
|
763
|
+
), w = (
|
|
764
|
+
/*enableReverse*/
|
|
765
|
+
r[7] === !0 && aa(r)
|
|
766
|
+
);
|
|
767
|
+
const D = (
|
|
768
|
+
/*#slots*/
|
|
769
|
+
r[47].default
|
|
770
|
+
), T = ul(
|
|
771
|
+
D,
|
|
772
|
+
r,
|
|
773
|
+
/*$$scope*/
|
|
774
|
+
r[46],
|
|
775
|
+
null
|
|
776
|
+
), F = [Al, Ml, Tl, Dl], j = [];
|
|
622
777
|
function k(O, Y) {
|
|
623
778
|
var P, X;
|
|
624
|
-
return
|
|
779
|
+
return (
|
|
780
|
+
/*error*/
|
|
781
|
+
O[16] ? 0 : (
|
|
782
|
+
/*focusedDelayed*/
|
|
783
|
+
O[14] ? (
|
|
784
|
+
/*listFeatures*/
|
|
785
|
+
((P = O[12]) == null ? void 0 : P.length) === 0 ? 2 : (
|
|
786
|
+
/*focusedDelayed*/
|
|
787
|
+
O[14] && /*listFeatures*/
|
|
788
|
+
((X = O[12]) != null && X.length) ? 3 : -1
|
|
789
|
+
)
|
|
790
|
+
) : 1
|
|
791
|
+
)
|
|
792
|
+
);
|
|
625
793
|
}
|
|
626
794
|
return ~(m = k(r)) && (d = j[m] = F[m](r)), {
|
|
627
795
|
c() {
|
|
628
|
-
t = Qt("form"), e = Qt("div"), n = Qt("button"), Qi(i.$$.fragment), o = qn(), s = Qt("input"), a = qn(), u = Qt("div"), l = Qt("button"), Qi(c.$$.fragment), f = qn(), b && b.c(), h = qn(), w && w.c(), g = qn(), T && T.c(), p = qn(), d && d.c(), B(n, "type", "button"), B(n, "class", "svelte-1h1zm6d"), B(
|
|
796
|
+
t = Qt("form"), e = Qt("div"), n = Qt("button"), Qi(i.$$.fragment), o = qn(), s = Qt("input"), a = qn(), u = Qt("div"), l = Qt("button"), Qi(c.$$.fragment), f = qn(), b && b.c(), h = qn(), w && w.c(), g = qn(), T && T.c(), p = qn(), d && d.c(), B(n, "type", "button"), B(n, "class", "svelte-1h1zm6d"), B(
|
|
797
|
+
s,
|
|
798
|
+
"placeholder",
|
|
799
|
+
/*placeholder*/
|
|
800
|
+
r[3]
|
|
801
|
+
), B(
|
|
802
|
+
s,
|
|
803
|
+
"aria-label",
|
|
804
|
+
/*placeholder*/
|
|
805
|
+
r[3]
|
|
806
|
+
), B(s, "class", "svelte-1h1zm6d"), B(l, "type", "button"), B(
|
|
807
|
+
l,
|
|
808
|
+
"title",
|
|
809
|
+
/*clearButtonTitle*/
|
|
810
|
+
r[9]
|
|
811
|
+
), B(l, "class", "svelte-1h1zm6d"), rn(
|
|
812
|
+
l,
|
|
813
|
+
"displayable",
|
|
814
|
+
/*searchValue*/
|
|
815
|
+
r[0] !== ""
|
|
816
|
+
), B(u, "class", "clear-button-container svelte-1h1zm6d"), B(e, "class", "input-group svelte-1h1zm6d"), B(t, "tabindex", "0"), B(t, "class", y = na(
|
|
817
|
+
/*className*/
|
|
818
|
+
r[2]
|
|
819
|
+
) + " svelte-1h1zm6d"), rn(
|
|
820
|
+
t,
|
|
821
|
+
"can-collapse",
|
|
822
|
+
/*collapsed*/
|
|
823
|
+
r[6] && /*searchValue*/
|
|
824
|
+
r[0] === ""
|
|
825
|
+
);
|
|
629
826
|
},
|
|
630
827
|
m(O, Y) {
|
|
631
|
-
Ke(O, t, Y), lt(t, e), lt(e, n), ci(i, n, null), lt(e, o), lt(e, s), r[49](s), ra(
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
ke(
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
828
|
+
Ke(O, t, Y), lt(t, e), lt(e, n), ci(i, n, null), lt(e, o), lt(e, s), r[49](s), ra(
|
|
829
|
+
s,
|
|
830
|
+
/*searchValue*/
|
|
831
|
+
r[0]
|
|
832
|
+
), lt(e, a), lt(e, u), lt(u, l), ci(c, l, null), lt(u, f), b && b.m(u, null), lt(e, h), w && w.m(e, null), lt(e, g), T && T.m(e, null), lt(t, p), ~m && j[m].m(t, null), I = !0, C || (x = [
|
|
833
|
+
ke(
|
|
834
|
+
n,
|
|
835
|
+
"click",
|
|
836
|
+
/*click_handler*/
|
|
837
|
+
r[48]
|
|
838
|
+
),
|
|
839
|
+
ke(
|
|
840
|
+
s,
|
|
841
|
+
"input",
|
|
842
|
+
/*input_1_input_handler*/
|
|
843
|
+
r[50]
|
|
844
|
+
),
|
|
845
|
+
ke(
|
|
846
|
+
s,
|
|
847
|
+
"focus",
|
|
848
|
+
/*focus_handler*/
|
|
849
|
+
r[51]
|
|
850
|
+
),
|
|
851
|
+
ke(
|
|
852
|
+
s,
|
|
853
|
+
"blur",
|
|
854
|
+
/*blur_handler*/
|
|
855
|
+
r[52]
|
|
856
|
+
),
|
|
857
|
+
ke(
|
|
858
|
+
s,
|
|
859
|
+
"keydown",
|
|
860
|
+
/*handleKeyDown*/
|
|
861
|
+
r[19]
|
|
862
|
+
),
|
|
863
|
+
ke(
|
|
864
|
+
s,
|
|
865
|
+
"input",
|
|
866
|
+
/*input_handler*/
|
|
867
|
+
r[53]
|
|
868
|
+
),
|
|
869
|
+
ke(
|
|
870
|
+
l,
|
|
871
|
+
"click",
|
|
872
|
+
/*click_handler_1*/
|
|
873
|
+
r[54]
|
|
874
|
+
),
|
|
875
|
+
ke(t, "submit", gl(
|
|
876
|
+
/*handleOnSubmit*/
|
|
877
|
+
r[18]
|
|
878
|
+
))
|
|
640
879
|
], C = !0);
|
|
641
880
|
},
|
|
642
881
|
p(O, Y) {
|
|
643
|
-
(!I || Y[0] &
|
|
882
|
+
(!I || Y[0] & /*placeholder*/
|
|
883
|
+
8) && B(
|
|
884
|
+
s,
|
|
885
|
+
"placeholder",
|
|
886
|
+
/*placeholder*/
|
|
887
|
+
O[3]
|
|
888
|
+
), (!I || Y[0] & /*placeholder*/
|
|
889
|
+
8) && B(
|
|
890
|
+
s,
|
|
891
|
+
"aria-label",
|
|
892
|
+
/*placeholder*/
|
|
893
|
+
O[3]
|
|
894
|
+
), Y[0] & /*searchValue*/
|
|
895
|
+
1 && s.value !== /*searchValue*/
|
|
896
|
+
O[0] && ra(
|
|
897
|
+
s,
|
|
898
|
+
/*searchValue*/
|
|
899
|
+
O[0]
|
|
900
|
+
), (!I || Y[0] & /*clearButtonTitle*/
|
|
901
|
+
512) && B(
|
|
902
|
+
l,
|
|
903
|
+
"title",
|
|
904
|
+
/*clearButtonTitle*/
|
|
905
|
+
O[9]
|
|
906
|
+
), (!I || Y[0] & /*searchValue*/
|
|
907
|
+
1) && rn(
|
|
908
|
+
l,
|
|
909
|
+
"displayable",
|
|
910
|
+
/*searchValue*/
|
|
911
|
+
O[0] !== ""
|
|
912
|
+
), /*abortController*/
|
|
913
|
+
O[17] ? b ? Y[0] & /*abortController*/
|
|
914
|
+
131072 && Kt(b, 1) : (b = sa(), b.c(), Kt(b, 1), b.m(u, null)) : b && (Ro(), be(b, 1, 1, () => {
|
|
644
915
|
b = null;
|
|
645
|
-
}), Oo()),
|
|
916
|
+
}), Oo()), /*enableReverse*/
|
|
917
|
+
O[7] === !0 ? w ? (w.p(O, Y), Y[0] & /*enableReverse*/
|
|
918
|
+
128 && Kt(w, 1)) : (w = aa(O), w.c(), Kt(w, 1), w.m(e, g)) : w && (Ro(), be(w, 1, 1, () => {
|
|
646
919
|
w = null;
|
|
647
|
-
}), Oo()), T && T.p && (!I || Y[1] &
|
|
920
|
+
}), Oo()), T && T.p && (!I || Y[1] & /*$$scope*/
|
|
921
|
+
32768) && cl(
|
|
648
922
|
T,
|
|
649
923
|
D,
|
|
650
924
|
O,
|
|
925
|
+
/*$$scope*/
|
|
651
926
|
O[46],
|
|
652
|
-
I ? ll(
|
|
927
|
+
I ? ll(
|
|
928
|
+
D,
|
|
929
|
+
/*$$scope*/
|
|
930
|
+
O[46],
|
|
931
|
+
Y,
|
|
932
|
+
null
|
|
933
|
+
) : fl(
|
|
934
|
+
/*$$scope*/
|
|
935
|
+
O[46]
|
|
936
|
+
),
|
|
653
937
|
null
|
|
654
938
|
);
|
|
655
939
|
let P = m;
|
|
656
940
|
m = k(O), m === P ? ~m && j[m].p(O, Y) : (d && (Ro(), be(j[P], 1, 1, () => {
|
|
657
941
|
j[P] = null;
|
|
658
|
-
}), Oo()), ~m ? (d = j[m], d ? d.p(O, Y) : (d = j[m] = F[m](O), d.c()), Kt(d, 1), d.m(t, null)) : d = null), (!I || Y[0] &
|
|
942
|
+
}), Oo()), ~m ? (d = j[m], d ? d.p(O, Y) : (d = j[m] = F[m](O), d.c()), Kt(d, 1), d.m(t, null)) : d = null), (!I || Y[0] & /*className*/
|
|
943
|
+
4 && y !== (y = na(
|
|
944
|
+
/*className*/
|
|
945
|
+
O[2]
|
|
946
|
+
) + " svelte-1h1zm6d")) && B(t, "class", y), (!I || Y[0] & /*className, collapsed, searchValue*/
|
|
947
|
+
69) && rn(
|
|
948
|
+
t,
|
|
949
|
+
"can-collapse",
|
|
950
|
+
/*collapsed*/
|
|
951
|
+
O[6] && /*searchValue*/
|
|
952
|
+
O[0] === ""
|
|
953
|
+
);
|
|
659
954
|
},
|
|
660
955
|
i(O) {
|
|
661
956
|
I || (Kt(i.$$.fragment, O), Kt(c.$$.fragment, O), Kt(b), Kt(w), Kt(T, O), Kt(d), I = !0);
|
|
@@ -780,9 +1075,22 @@ function Gl(r, t, e) {
|
|
|
780
1075
|
return r.$$set = (N) => {
|
|
781
1076
|
"class" in N && e(2, s = N.class), "mapController" in N && e(23, a = N.mapController), "apiKey" in N && e(24, u = N.apiKey), "debounceSearch" in N && e(25, l = N.debounceSearch), "placeholder" in N && e(3, c = N.placeholder), "errorMessage" in N && e(4, f = N.errorMessage), "noResultsMessage" in N && e(5, h = N.noResultsMessage), "proximity" in N && e(22, g = N.proximity), "bbox" in N && e(26, p = N.bbox), "trackProximity" in N && e(27, m = N.trackProximity), "minLength" in N && e(28, d = N.minLength), "language" in N && e(29, y = N.language), "showResultsWhileTyping" in N && e(30, I = N.showResultsWhileTyping), "zoom" in N && e(31, C = N.zoom), "flyTo" in N && e(32, x = N.flyTo), "collapsed" in N && e(6, b = N.collapsed), "clearOnBlur" in N && e(33, w = N.clearOnBlur), "enableReverse" in N && e(7, D = N.enableReverse), "reverseButtonTitle" in N && e(8, T = N.reverseButtonTitle), "clearButtonTitle" in N && e(9, F = N.clearButtonTitle), "filter" in N && e(34, j = N.filter), "searchValue" in N && e(0, k = N.searchValue), "reverseActive" in N && e(1, O = N.reverseActive), "showPlaceType" in N && e(10, Y = N.showPlaceType), "showFullGeometry" in N && e(35, P = N.showFullGeometry), "limit" in N && e(36, X = N.limit), "fuzzyMatch" in N && e(37, ut = N.fuzzyMatch), "country" in N && e(38, yt = N.country), "types" in N && e(39, Xt = N.types), "$$scope" in N && e(46, o = N.$$scope);
|
|
782
1077
|
}, r.$$.update = () => {
|
|
783
|
-
if (r.$$.dirty[0] &
|
|
1078
|
+
if (r.$$.dirty[0] & /*trackProximity*/
|
|
1079
|
+
134217728 && (m || e(22, g = void 0)), r.$$.dirty[0] & /*focused*/
|
|
1080
|
+
2048 | r.$$.dirty[1] & /*clearOnBlur*/
|
|
1081
|
+
4 && setTimeout(() => {
|
|
784
1082
|
e(14, Io = Le), w && !Le && e(0, k = "");
|
|
785
|
-
}), r.$$.dirty[0] &
|
|
1083
|
+
}), r.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
1084
|
+
4097 && (k || (e(44, it = void 0), e(12, J = void 0), e(16, gr = void 0), e(43, Mt = J))), r.$$.dirty[1] & /*showFullGeometry, picked*/
|
|
1085
|
+
8208 && P && it && !it.address && it.geometry.type === "Point" && ss(it.id, { byId: !0 }).catch((N) => e(16, gr = N)), r.$$.dirty[0] & /*mapController*/
|
|
1086
|
+
8388608 | r.$$.dirty[1] & /*picked, flyTo, zoom*/
|
|
1087
|
+
8195 && a && it && x && (!it.bbox || it.bbox[0] === it.bbox[2] && it.bbox[1] === it.bbox[3] ? a.flyTo(it.center, C) : a.fitBounds(it.bbox, 50), e(12, J = void 0), e(43, Mt = void 0), e(13, At = -1)), r.$$.dirty[0] & /*listFeatures*/
|
|
1088
|
+
4096 | r.$$.dirty[1] & /*markedFeatures*/
|
|
1089
|
+
4096 && Mt !== J && e(43, Mt = void 0), r.$$.dirty[0] & /*mapController*/
|
|
1090
|
+
8388608 | r.$$.dirty[1] & /*markedFeatures, picked*/
|
|
1091
|
+
12288 && a && a.setMarkers(Mt, it), r.$$.dirty[0] & /*searchValue*/
|
|
1092
|
+
1 && e(13, At = -1), r.$$.dirty[0] & /*mapController, reverseActive, trackProximity, listFeatures, focusedDelayed*/
|
|
1093
|
+
142626818 && a && a.setEventHandler((N) => {
|
|
786
1094
|
switch (N.type) {
|
|
787
1095
|
case "mapClick":
|
|
788
1096
|
O && Hu(N.coordinates);
|
|
@@ -803,11 +1111,22 @@ function Gl(r, t, e) {
|
|
|
803
1111
|
e(13, At = -1);
|
|
804
1112
|
break;
|
|
805
1113
|
}
|
|
806
|
-
}), r.$$.dirty[0] &
|
|
1114
|
+
}), r.$$.dirty[0] & /*mapController, selectedItemIndex*/
|
|
1115
|
+
8396800 && (a == null || a.setSelectedMarker(At)), r.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
1116
|
+
12288 && e(45, n = J == null ? void 0 : J[At]), r.$$.dirty[0] & /*searchValue, mapController*/
|
|
1117
|
+
8388609) {
|
|
807
1118
|
const N = /^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(k);
|
|
808
1119
|
a == null || a.setReverseMarker(N ? [Number(N[1]), Number(N[2])] : void 0);
|
|
809
1120
|
}
|
|
810
|
-
r.$$.dirty[1] &
|
|
1121
|
+
r.$$.dirty[1] & /*selected*/
|
|
1122
|
+
16384 && pr("select", n), r.$$.dirty[1] & /*picked*/
|
|
1123
|
+
8192 && pr("pick", it), r.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
1124
|
+
20480 && pr("optionsVisibilityChange", Io && !!J), r.$$.dirty[0] & /*listFeatures*/
|
|
1125
|
+
4096 && pr("featuresListed", J), r.$$.dirty[1] & /*markedFeatures*/
|
|
1126
|
+
4096 && pr("featuresMarked", Mt), r.$$.dirty[0] & /*reverseActive*/
|
|
1127
|
+
2 && pr("reverseToggle", O), r.$$.dirty[0] & /*searchValue*/
|
|
1128
|
+
1 && pr("queryChange", k), r.$$.dirty[0] & /*mapController, reverseActive*/
|
|
1129
|
+
8388610 && a && a.indicateReverse(O);
|
|
811
1130
|
}, [
|
|
812
1131
|
k,
|
|
813
1132
|
O,
|
|
@@ -927,6 +1246,28 @@ let kl = class extends Ai {
|
|
|
927
1246
|
return this.$$.ctx[42];
|
|
928
1247
|
}
|
|
929
1248
|
};
|
|
1249
|
+
/**
|
|
1250
|
+
* splaytree v3.1.1
|
|
1251
|
+
* Fast Splay tree for Node and browser
|
|
1252
|
+
*
|
|
1253
|
+
* @author Alexander Milevski <info@w8r.name>
|
|
1254
|
+
* @license MIT
|
|
1255
|
+
* @preserve
|
|
1256
|
+
*/
|
|
1257
|
+
/*! *****************************************************************************
|
|
1258
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1259
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
1260
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
1261
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1262
|
+
|
|
1263
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1264
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
1265
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
1266
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
1267
|
+
|
|
1268
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
1269
|
+
and limitations under the License.
|
|
1270
|
+
***************************************************************************** */
|
|
930
1271
|
function zl(r, t) {
|
|
931
1272
|
var e = { label: 0, sent: function() {
|
|
932
1273
|
if (o[0] & 1)
|
|
@@ -992,12 +1333,15 @@ function zl(r, t) {
|
|
|
992
1333
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
993
1334
|
}
|
|
994
1335
|
}
|
|
995
|
-
var Cr =
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
}
|
|
1336
|
+
var Cr = (
|
|
1337
|
+
/** @class */
|
|
1338
|
+
function() {
|
|
1339
|
+
function r(t, e) {
|
|
1340
|
+
this.next = null, this.key = t, this.data = e, this.left = null, this.right = null;
|
|
1341
|
+
}
|
|
1342
|
+
return r;
|
|
1343
|
+
}()
|
|
1344
|
+
);
|
|
1001
1345
|
function Vl(r, t) {
|
|
1002
1346
|
return r > t ? 1 : r < t ? -1 : 0;
|
|
1003
1347
|
}
|
|
@@ -1055,190 +1399,196 @@ function Es(r, t, e, n, i) {
|
|
|
1055
1399
|
r.left && Es(r.left, o, !1, n, i), r.right && Es(r.right, o, !0, n, i);
|
|
1056
1400
|
}
|
|
1057
1401
|
}
|
|
1058
|
-
var Ms =
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1402
|
+
var Ms = (
|
|
1403
|
+
/** @class */
|
|
1404
|
+
function() {
|
|
1405
|
+
function r(t) {
|
|
1406
|
+
t === void 0 && (t = Vl), this._root = null, this._size = 0, this._comparator = t;
|
|
1407
|
+
}
|
|
1408
|
+
return r.prototype.insert = function(t, e) {
|
|
1409
|
+
return this._size++, this._root = gs(t, e, this._root, this._comparator);
|
|
1410
|
+
}, r.prototype.add = function(t, e) {
|
|
1411
|
+
var n = new Cr(t, e);
|
|
1412
|
+
this._root === null && (n.left = n.right = null, this._size++, this._root = n);
|
|
1413
|
+
var i = this._comparator, o = yr(t, this._root, i), s = i(t, o.key);
|
|
1414
|
+
return s === 0 ? this._root = o : (s < 0 ? (n.left = o.left, n.right = o, o.left = null) : s > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
|
|
1415
|
+
}, r.prototype.remove = function(t) {
|
|
1416
|
+
this._root = this._remove(t, this._root, this._comparator);
|
|
1417
|
+
}, r.prototype._remove = function(t, e, n) {
|
|
1418
|
+
var i;
|
|
1419
|
+
if (e === null)
|
|
1420
|
+
return null;
|
|
1421
|
+
e = yr(t, e, n);
|
|
1422
|
+
var o = n(t, e.key);
|
|
1423
|
+
return o === 0 ? (e.left === null ? i = e.right : (i = yr(t, e.left, n), i.right = e.right), this._size--, i) : e;
|
|
1424
|
+
}, r.prototype.pop = function() {
|
|
1425
|
+
var t = this._root;
|
|
1426
|
+
if (t) {
|
|
1427
|
+
for (; t.left; )
|
|
1428
|
+
t = t.left;
|
|
1429
|
+
return this._root = yr(t.key, this._root, this._comparator), this._root = this._remove(t.key, this._root, this._comparator), { key: t.key, data: t.data };
|
|
1430
|
+
}
|
|
1074
1431
|
return null;
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
var
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1432
|
+
}, r.prototype.findStatic = function(t) {
|
|
1433
|
+
for (var e = this._root, n = this._comparator; e; ) {
|
|
1434
|
+
var i = n(t, e.key);
|
|
1435
|
+
if (i === 0)
|
|
1436
|
+
return e;
|
|
1437
|
+
i < 0 ? e = e.left : e = e.right;
|
|
1438
|
+
}
|
|
1439
|
+
return null;
|
|
1440
|
+
}, r.prototype.find = function(t) {
|
|
1441
|
+
return this._root && (this._root = yr(t, this._root, this._comparator), this._comparator(t, this._root.key) !== 0) ? null : this._root;
|
|
1442
|
+
}, r.prototype.contains = function(t) {
|
|
1443
|
+
for (var e = this._root, n = this._comparator; e; ) {
|
|
1444
|
+
var i = n(t, e.key);
|
|
1445
|
+
if (i === 0)
|
|
1446
|
+
return !0;
|
|
1447
|
+
i < 0 ? e = e.left : e = e.right;
|
|
1448
|
+
}
|
|
1449
|
+
return !1;
|
|
1450
|
+
}, r.prototype.forEach = function(t, e) {
|
|
1451
|
+
for (var n = this._root, i = [], o = !1; !o; )
|
|
1452
|
+
n !== null ? (i.push(n), n = n.left) : i.length !== 0 ? (n = i.pop(), t.call(e, n), n = n.right) : o = !0;
|
|
1453
|
+
return this;
|
|
1454
|
+
}, r.prototype.range = function(t, e, n, i) {
|
|
1455
|
+
for (var o = [], s = this._comparator, a = this._root, u; o.length !== 0 || a; )
|
|
1456
|
+
if (a)
|
|
1457
|
+
o.push(a), a = a.left;
|
|
1458
|
+
else {
|
|
1459
|
+
if (a = o.pop(), u = s(a.key, e), u > 0)
|
|
1460
|
+
break;
|
|
1461
|
+
if (s(a.key, t) >= 0 && n.call(i, a))
|
|
1462
|
+
return this;
|
|
1463
|
+
a = a.right;
|
|
1464
|
+
}
|
|
1465
|
+
return this;
|
|
1466
|
+
}, r.prototype.keys = function() {
|
|
1467
|
+
var t = [];
|
|
1468
|
+
return this.forEach(function(e) {
|
|
1469
|
+
var n = e.key;
|
|
1470
|
+
return t.push(n);
|
|
1471
|
+
}), t;
|
|
1472
|
+
}, r.prototype.values = function() {
|
|
1473
|
+
var t = [];
|
|
1474
|
+
return this.forEach(function(e) {
|
|
1475
|
+
var n = e.data;
|
|
1476
|
+
return t.push(n);
|
|
1477
|
+
}), t;
|
|
1478
|
+
}, r.prototype.min = function() {
|
|
1479
|
+
return this._root ? this.minNode(this._root).key : null;
|
|
1480
|
+
}, r.prototype.max = function() {
|
|
1481
|
+
return this._root ? this.maxNode(this._root).key : null;
|
|
1482
|
+
}, r.prototype.minNode = function(t) {
|
|
1483
|
+
if (t === void 0 && (t = this._root), t)
|
|
1484
|
+
for (; t.left; )
|
|
1485
|
+
t = t.left;
|
|
1486
|
+
return t;
|
|
1487
|
+
}, r.prototype.maxNode = function(t) {
|
|
1488
|
+
if (t === void 0 && (t = this._root), t)
|
|
1489
|
+
for (; t.right; )
|
|
1490
|
+
t = t.right;
|
|
1491
|
+
return t;
|
|
1492
|
+
}, r.prototype.at = function(t) {
|
|
1493
|
+
for (var e = this._root, n = !1, i = 0, o = []; !n; )
|
|
1494
|
+
if (e)
|
|
1495
|
+
o.push(e), e = e.left;
|
|
1496
|
+
else if (o.length > 0) {
|
|
1497
|
+
if (e = o.pop(), i === t)
|
|
1498
|
+
return e;
|
|
1499
|
+
i++, e = e.right;
|
|
1500
|
+
} else
|
|
1501
|
+
n = !0;
|
|
1502
|
+
return null;
|
|
1503
|
+
}, r.prototype.next = function(t) {
|
|
1504
|
+
var e = this._root, n = null;
|
|
1505
|
+
if (t.right) {
|
|
1506
|
+
for (n = t.right; n.left; )
|
|
1507
|
+
n = n.left;
|
|
1508
|
+
return n;
|
|
1509
|
+
}
|
|
1510
|
+
for (var i = this._comparator; e; ) {
|
|
1511
|
+
var o = i(t.key, e.key);
|
|
1512
|
+
if (o === 0)
|
|
1114
1513
|
break;
|
|
1115
|
-
|
|
1116
|
-
return this;
|
|
1117
|
-
a = a.right;
|
|
1514
|
+
o < 0 ? (n = e, e = e.left) : e = e.right;
|
|
1118
1515
|
}
|
|
1119
|
-
return this;
|
|
1120
|
-
}, r.prototype.keys = function() {
|
|
1121
|
-
var t = [];
|
|
1122
|
-
return this.forEach(function(e) {
|
|
1123
|
-
var n = e.key;
|
|
1124
|
-
return t.push(n);
|
|
1125
|
-
}), t;
|
|
1126
|
-
}, r.prototype.values = function() {
|
|
1127
|
-
var t = [];
|
|
1128
|
-
return this.forEach(function(e) {
|
|
1129
|
-
var n = e.data;
|
|
1130
|
-
return t.push(n);
|
|
1131
|
-
}), t;
|
|
1132
|
-
}, r.prototype.min = function() {
|
|
1133
|
-
return this._root ? this.minNode(this._root).key : null;
|
|
1134
|
-
}, r.prototype.max = function() {
|
|
1135
|
-
return this._root ? this.maxNode(this._root).key : null;
|
|
1136
|
-
}, r.prototype.minNode = function(t) {
|
|
1137
|
-
if (t === void 0 && (t = this._root), t)
|
|
1138
|
-
for (; t.left; )
|
|
1139
|
-
t = t.left;
|
|
1140
|
-
return t;
|
|
1141
|
-
}, r.prototype.maxNode = function(t) {
|
|
1142
|
-
if (t === void 0 && (t = this._root), t)
|
|
1143
|
-
for (; t.right; )
|
|
1144
|
-
t = t.right;
|
|
1145
|
-
return t;
|
|
1146
|
-
}, r.prototype.at = function(t) {
|
|
1147
|
-
for (var e = this._root, n = !1, i = 0, o = []; !n; )
|
|
1148
|
-
if (e)
|
|
1149
|
-
o.push(e), e = e.left;
|
|
1150
|
-
else if (o.length > 0) {
|
|
1151
|
-
if (e = o.pop(), i === t)
|
|
1152
|
-
return e;
|
|
1153
|
-
i++, e = e.right;
|
|
1154
|
-
} else
|
|
1155
|
-
n = !0;
|
|
1156
|
-
return null;
|
|
1157
|
-
}, r.prototype.next = function(t) {
|
|
1158
|
-
var e = this._root, n = null;
|
|
1159
|
-
if (t.right) {
|
|
1160
|
-
for (n = t.right; n.left; )
|
|
1161
|
-
n = n.left;
|
|
1162
1516
|
return n;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1517
|
+
}, r.prototype.prev = function(t) {
|
|
1518
|
+
var e = this._root, n = null;
|
|
1519
|
+
if (t.left !== null) {
|
|
1520
|
+
for (n = t.left; n.right; )
|
|
1521
|
+
n = n.right;
|
|
1522
|
+
return n;
|
|
1523
|
+
}
|
|
1524
|
+
for (var i = this._comparator; e; ) {
|
|
1525
|
+
var o = i(t.key, e.key);
|
|
1526
|
+
if (o === 0)
|
|
1527
|
+
break;
|
|
1528
|
+
o < 0 ? e = e.left : (n = e, e = e.right);
|
|
1529
|
+
}
|
|
1176
1530
|
return n;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}, r.prototype.load = function(t, e, n) {
|
|
1190
|
-
e === void 0 && (e = []), n === void 0 && (n = !1);
|
|
1191
|
-
var i = t.length, o = this._comparator;
|
|
1192
|
-
if (n && Ns(t, e, 0, i - 1, o), this._root === null)
|
|
1193
|
-
this._root = Is(t, e, 0, i), this._size = i;
|
|
1194
|
-
else {
|
|
1195
|
-
var s = Yl(this.toList(), ql(t, e), o);
|
|
1196
|
-
i = this._size + i, this._root = Cs({ head: s }, 0, i);
|
|
1197
|
-
}
|
|
1198
|
-
return this;
|
|
1199
|
-
}, r.prototype.isEmpty = function() {
|
|
1200
|
-
return this._root === null;
|
|
1201
|
-
}, Object.defineProperty(r.prototype, "size", {
|
|
1202
|
-
get: function() {
|
|
1203
|
-
return this._size;
|
|
1204
|
-
},
|
|
1205
|
-
enumerable: !0,
|
|
1206
|
-
configurable: !0
|
|
1207
|
-
}), Object.defineProperty(r.prototype, "root", {
|
|
1208
|
-
get: function() {
|
|
1209
|
-
return this._root;
|
|
1210
|
-
},
|
|
1211
|
-
enumerable: !0,
|
|
1212
|
-
configurable: !0
|
|
1213
|
-
}), r.prototype.toString = function(t) {
|
|
1214
|
-
t === void 0 && (t = function(n) {
|
|
1215
|
-
return String(n.key);
|
|
1216
|
-
});
|
|
1217
|
-
var e = [];
|
|
1218
|
-
return Es(this._root, "", !0, function(n) {
|
|
1219
|
-
return e.push(n);
|
|
1220
|
-
}, t), e.join("");
|
|
1221
|
-
}, r.prototype.update = function(t, e, n) {
|
|
1222
|
-
var i = this._comparator, o = ca(t, this._root, i), s = o.left, a = o.right;
|
|
1223
|
-
i(t, e) < 0 ? a = gs(e, n, a, i) : s = gs(e, n, s, i), this._root = Ul(s, a, i);
|
|
1224
|
-
}, r.prototype.split = function(t) {
|
|
1225
|
-
return ca(t, this._root, this._comparator);
|
|
1226
|
-
}, r.prototype[Symbol.iterator] = function() {
|
|
1227
|
-
var t;
|
|
1228
|
-
return zl(this, function(e) {
|
|
1229
|
-
switch (e.label) {
|
|
1230
|
-
case 0:
|
|
1231
|
-
t = this.minNode(), e.label = 1;
|
|
1232
|
-
case 1:
|
|
1233
|
-
return t ? [4, t] : [3, 3];
|
|
1234
|
-
case 2:
|
|
1235
|
-
return e.sent(), t = this.next(t), [3, 1];
|
|
1236
|
-
case 3:
|
|
1237
|
-
return [2];
|
|
1531
|
+
}, r.prototype.clear = function() {
|
|
1532
|
+
return this._root = null, this._size = 0, this;
|
|
1533
|
+
}, r.prototype.toList = function() {
|
|
1534
|
+
return Xl(this._root);
|
|
1535
|
+
}, r.prototype.load = function(t, e, n) {
|
|
1536
|
+
e === void 0 && (e = []), n === void 0 && (n = !1);
|
|
1537
|
+
var i = t.length, o = this._comparator;
|
|
1538
|
+
if (n && Ns(t, e, 0, i - 1, o), this._root === null)
|
|
1539
|
+
this._root = Is(t, e, 0, i), this._size = i;
|
|
1540
|
+
else {
|
|
1541
|
+
var s = Yl(this.toList(), ql(t, e), o);
|
|
1542
|
+
i = this._size + i, this._root = Cs({ head: s }, 0, i);
|
|
1238
1543
|
}
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1544
|
+
return this;
|
|
1545
|
+
}, r.prototype.isEmpty = function() {
|
|
1546
|
+
return this._root === null;
|
|
1547
|
+
}, Object.defineProperty(r.prototype, "size", {
|
|
1548
|
+
get: function() {
|
|
1549
|
+
return this._size;
|
|
1550
|
+
},
|
|
1551
|
+
enumerable: !0,
|
|
1552
|
+
configurable: !0
|
|
1553
|
+
}), Object.defineProperty(r.prototype, "root", {
|
|
1554
|
+
get: function() {
|
|
1555
|
+
return this._root;
|
|
1556
|
+
},
|
|
1557
|
+
enumerable: !0,
|
|
1558
|
+
configurable: !0
|
|
1559
|
+
}), r.prototype.toString = function(t) {
|
|
1560
|
+
t === void 0 && (t = function(n) {
|
|
1561
|
+
return String(n.key);
|
|
1562
|
+
});
|
|
1563
|
+
var e = [];
|
|
1564
|
+
return Es(this._root, "", !0, function(n) {
|
|
1565
|
+
return e.push(n);
|
|
1566
|
+
}, t), e.join("");
|
|
1567
|
+
}, r.prototype.update = function(t, e, n) {
|
|
1568
|
+
var i = this._comparator, o = ca(t, this._root, i), s = o.left, a = o.right;
|
|
1569
|
+
i(t, e) < 0 ? a = gs(e, n, a, i) : s = gs(e, n, s, i), this._root = Ul(s, a, i);
|
|
1570
|
+
}, r.prototype.split = function(t) {
|
|
1571
|
+
return ca(t, this._root, this._comparator);
|
|
1572
|
+
}, r.prototype[Symbol.iterator] = function() {
|
|
1573
|
+
var t;
|
|
1574
|
+
return zl(this, function(e) {
|
|
1575
|
+
switch (e.label) {
|
|
1576
|
+
case 0:
|
|
1577
|
+
t = this.minNode(), e.label = 1;
|
|
1578
|
+
case 1:
|
|
1579
|
+
return t ? [4, t] : [3, 3];
|
|
1580
|
+
case 2:
|
|
1581
|
+
return e.sent(), t = this.next(t), [3, 1];
|
|
1582
|
+
case 3:
|
|
1583
|
+
return [
|
|
1584
|
+
2
|
|
1585
|
+
/*return*/
|
|
1586
|
+
];
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
}, r;
|
|
1590
|
+
}()
|
|
1591
|
+
);
|
|
1242
1592
|
function Is(r, t, e, n) {
|
|
1243
1593
|
var i = n - e;
|
|
1244
1594
|
if (i > 0) {
|
|
@@ -1421,15 +1771,18 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1421
1771
|
}, Vn = /* @__PURE__ */ function() {
|
|
1422
1772
|
Ee(r, null, [{
|
|
1423
1773
|
key: "compare",
|
|
1774
|
+
// for ordering sweep events in the sweep event queue
|
|
1424
1775
|
value: function(e, n) {
|
|
1425
1776
|
var i = r.comparePoints(e.point, n.point);
|
|
1426
1777
|
return i !== 0 ? i : (e.point !== n.point && e.link(n), e.isLeft !== n.isLeft ? e.isLeft ? 1 : -1 : Ao.compare(e.segment, n.segment));
|
|
1427
1778
|
}
|
|
1779
|
+
// for ordering points in sweep line order
|
|
1428
1780
|
}, {
|
|
1429
1781
|
key: "comparePoints",
|
|
1430
1782
|
value: function(e, n) {
|
|
1431
1783
|
return e.x < n.x ? -1 : e.x > n.x ? 1 : e.y < n.y ? -1 : e.y > n.y ? 1 : 0;
|
|
1432
1784
|
}
|
|
1785
|
+
// Warning: 'point' input will be modified and re-used (for performance)
|
|
1433
1786
|
}]);
|
|
1434
1787
|
function r(t, e) {
|
|
1435
1788
|
yn(this, r), t.events === void 0 ? t.events = [this] : t.events.push(this), this.point = t, this.isLeft = e;
|
|
@@ -1445,6 +1798,8 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1445
1798
|
}
|
|
1446
1799
|
this.checkForConsuming();
|
|
1447
1800
|
}
|
|
1801
|
+
/* Do a pass over our linked events and check to see if any pair
|
|
1802
|
+
* of segments match, and should be consumed. */
|
|
1448
1803
|
}, {
|
|
1449
1804
|
key: "checkForConsuming",
|
|
1450
1805
|
value: function() {
|
|
@@ -1466,6 +1821,16 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1466
1821
|
}
|
|
1467
1822
|
return e;
|
|
1468
1823
|
}
|
|
1824
|
+
/**
|
|
1825
|
+
* Returns a comparator function for sorting linked events that will
|
|
1826
|
+
* favor the event that will give us the smallest left-side angle.
|
|
1827
|
+
* All ring construction starts as low as possible heading to the right,
|
|
1828
|
+
* so by always turning left as sharp as possible we'll get polygons
|
|
1829
|
+
* without uncessary loops & holes.
|
|
1830
|
+
*
|
|
1831
|
+
* The comparator function has a compute cache such that it avoids
|
|
1832
|
+
* re-computing already-computed values.
|
|
1833
|
+
*/
|
|
1469
1834
|
}, {
|
|
1470
1835
|
key: "getLeftmostComparator",
|
|
1471
1836
|
value: function(e) {
|
|
@@ -1486,6 +1851,19 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1486
1851
|
}(), Jl = 0, Ao = /* @__PURE__ */ function() {
|
|
1487
1852
|
Ee(r, null, [{
|
|
1488
1853
|
key: "compare",
|
|
1854
|
+
/* This compare() function is for ordering segments in the sweep
|
|
1855
|
+
* line tree, and does so according to the following criteria:
|
|
1856
|
+
*
|
|
1857
|
+
* Consider the vertical line that lies an infinestimal step to the
|
|
1858
|
+
* right of the right-more of the two left endpoints of the input
|
|
1859
|
+
* segments. Imagine slowly moving a point up from negative infinity
|
|
1860
|
+
* in the increasing y direction. Which of the two segments will that
|
|
1861
|
+
* point intersect first? That segment comes 'before' the other one.
|
|
1862
|
+
*
|
|
1863
|
+
* If neither segment would be intersected by such a line, (if one
|
|
1864
|
+
* or more of the segments are vertical) then the line to be considered
|
|
1865
|
+
* is directly on the right-more of the two left inputs.
|
|
1866
|
+
*/
|
|
1489
1867
|
value: function(e, n) {
|
|
1490
1868
|
var i = e.leftSE.point.x, o = n.leftSE.point.x, s = e.rightSE.point.x, a = n.rightSE.point.x;
|
|
1491
1869
|
if (a < i)
|
|
@@ -1542,12 +1920,15 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1542
1920
|
}
|
|
1543
1921
|
return s > a ? 1 : s < a || c < f ? -1 : c > f ? 1 : e.id < n.id ? -1 : e.id > n.id ? 1 : 0;
|
|
1544
1922
|
}
|
|
1923
|
+
/* Warning: a reference to ringWindings input will be stored,
|
|
1924
|
+
* and possibly will be later modified */
|
|
1545
1925
|
}]);
|
|
1546
1926
|
function r(t, e, n, i) {
|
|
1547
1927
|
yn(this, r), this.id = ++Jl, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = n, this.windings = i;
|
|
1548
1928
|
}
|
|
1549
1929
|
return Ee(r, [{
|
|
1550
1930
|
key: "replaceRightSE",
|
|
1931
|
+
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
1551
1932
|
value: function(e) {
|
|
1552
1933
|
this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
|
|
1553
1934
|
}
|
|
@@ -1566,6 +1947,7 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1566
1947
|
}
|
|
1567
1948
|
};
|
|
1568
1949
|
}
|
|
1950
|
+
/* A vector from the left point to the right */
|
|
1569
1951
|
}, {
|
|
1570
1952
|
key: "vector",
|
|
1571
1953
|
value: function() {
|
|
@@ -1579,6 +1961,19 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1579
1961
|
value: function(e) {
|
|
1580
1962
|
return e.x === this.leftSE.point.x && e.y === this.leftSE.point.y || e.x === this.rightSE.point.x && e.y === this.rightSE.point.y;
|
|
1581
1963
|
}
|
|
1964
|
+
/* Compare this segment with a point.
|
|
1965
|
+
*
|
|
1966
|
+
* A point P is considered to be colinear to a segment if there
|
|
1967
|
+
* exists a distance D such that if we travel along the segment
|
|
1968
|
+
* from one * endpoint towards the other a distance D, we find
|
|
1969
|
+
* ourselves at point P.
|
|
1970
|
+
*
|
|
1971
|
+
* Return value indicates:
|
|
1972
|
+
*
|
|
1973
|
+
* 1: point lies above the segment (to the left of vertical)
|
|
1974
|
+
* 0: point is colinear to segment
|
|
1975
|
+
* -1: point lies below the segment (to the right of vertical)
|
|
1976
|
+
*/
|
|
1582
1977
|
}, {
|
|
1583
1978
|
key: "comparePoint",
|
|
1584
1979
|
value: function(e) {
|
|
@@ -1593,6 +1988,21 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1593
1988
|
var u = (e.x - n.x) / o.x, l = n.y + u * o.y;
|
|
1594
1989
|
return e.y === l ? 0 : e.y < l ? -1 : 1;
|
|
1595
1990
|
}
|
|
1991
|
+
/**
|
|
1992
|
+
* Given another segment, returns the first non-trivial intersection
|
|
1993
|
+
* between the two segments (in terms of sweep line ordering), if it exists.
|
|
1994
|
+
*
|
|
1995
|
+
* A 'non-trivial' intersection is one that will cause one or both of the
|
|
1996
|
+
* segments to be split(). As such, 'trivial' vs. 'non-trivial' intersection:
|
|
1997
|
+
*
|
|
1998
|
+
* * endpoint of segA with endpoint of segB --> trivial
|
|
1999
|
+
* * endpoint of segA with point along segB --> non-trivial
|
|
2000
|
+
* * endpoint of segB with point along segA --> non-trivial
|
|
2001
|
+
* * point along segA with point along segB --> non-trivial
|
|
2002
|
+
*
|
|
2003
|
+
* If no non-trivial intersection exists, return null
|
|
2004
|
+
* Else, return null.
|
|
2005
|
+
*/
|
|
1596
2006
|
}, {
|
|
1597
2007
|
key: "getIntersection",
|
|
1598
2008
|
value: function(e) {
|
|
@@ -1615,6 +2025,18 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1615
2025
|
var p = Ql(s, this.vector(), u, e.vector());
|
|
1616
2026
|
return p === null || !Ui(o, p) ? null : Ji.round(p.x, p.y);
|
|
1617
2027
|
}
|
|
2028
|
+
/**
|
|
2029
|
+
* Split the given segment into multiple segments on the given points.
|
|
2030
|
+
* * Each existing segment will retain its leftSE and a new rightSE will be
|
|
2031
|
+
* generated for it.
|
|
2032
|
+
* * A new segment will be generated which will adopt the original segment's
|
|
2033
|
+
* rightSE, and a new leftSE will be generated for it.
|
|
2034
|
+
* * If there are more than two points given to split on, new segments
|
|
2035
|
+
* in the middle will be generated with new leftSE and rightSE's.
|
|
2036
|
+
* * An array of the newly generated SweepEvents will be returned.
|
|
2037
|
+
*
|
|
2038
|
+
* Warning: input array of points is modified
|
|
2039
|
+
*/
|
|
1618
2040
|
}, {
|
|
1619
2041
|
key: "split",
|
|
1620
2042
|
value: function(e) {
|
|
@@ -1623,6 +2045,7 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1623
2045
|
var u = new r(o, a, this.rings.slice(), this.windings.slice());
|
|
1624
2046
|
return Vn.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), Vn.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (o.checkForConsuming(), s.checkForConsuming()), n;
|
|
1625
2047
|
}
|
|
2048
|
+
/* Swap which event is left and right */
|
|
1626
2049
|
}, {
|
|
1627
2050
|
key: "swapEvents",
|
|
1628
2051
|
value: function() {
|
|
@@ -1631,6 +2054,8 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1631
2054
|
for (var n = 0, i = this.windings.length; n < i; n++)
|
|
1632
2055
|
this.windings[n] *= -1;
|
|
1633
2056
|
}
|
|
2057
|
+
/* Consume another segment. We take their rings under our wing
|
|
2058
|
+
* and mark them as consumed. Use for perfectly overlapping segments */
|
|
1634
2059
|
}, {
|
|
1635
2060
|
key: "consume",
|
|
1636
2061
|
value: function(e) {
|
|
@@ -1655,6 +2080,7 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1655
2080
|
i.rings = null, i.windings = null, i.consumedBy = n, i.leftSE.consumedBy = n.leftSE, i.rightSE.consumedBy = n.rightSE;
|
|
1656
2081
|
}
|
|
1657
2082
|
}
|
|
2083
|
+
/* The first segment previous segment chain that is in the result */
|
|
1658
2084
|
}, {
|
|
1659
2085
|
key: "prevInResult",
|
|
1660
2086
|
value: function() {
|
|
@@ -1710,6 +2136,7 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1710
2136
|
}
|
|
1711
2137
|
return this._afterState;
|
|
1712
2138
|
}
|
|
2139
|
+
/* Is this segment part of the final result? */
|
|
1713
2140
|
}, {
|
|
1714
2141
|
key: "isInResult",
|
|
1715
2142
|
value: function() {
|
|
@@ -1860,6 +2287,8 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1860
2287
|
}(), $l = /* @__PURE__ */ function() {
|
|
1861
2288
|
Ee(r, null, [{
|
|
1862
2289
|
key: "factory",
|
|
2290
|
+
/* Given the segments from the sweep line pass, compute & return a series
|
|
2291
|
+
* of closed rings from all the segments marked to be part of the result */
|
|
1863
2292
|
value: function(e) {
|
|
1864
2293
|
for (var n = [], i = 0, o = e.length; i < o; i++) {
|
|
1865
2294
|
var s = e[i];
|
|
@@ -1934,6 +2363,7 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
1934
2363
|
value: function() {
|
|
1935
2364
|
return this._enclosingRing === void 0 && (this._enclosingRing = this._calcEnclosingRing()), this._enclosingRing;
|
|
1936
2365
|
}
|
|
2366
|
+
/* Returns the ring that encloses this one, if any */
|
|
1937
2367
|
}, {
|
|
1938
2368
|
key: "_calcEnclosingRing",
|
|
1939
2369
|
value: function() {
|
|
@@ -2067,6 +2497,8 @@ var Hl = mr * mr, Ss = function(t, e) {
|
|
|
2067
2497
|
}
|
|
2068
2498
|
return i;
|
|
2069
2499
|
}
|
|
2500
|
+
/* Safely split a segment that is currently in the datastructures
|
|
2501
|
+
* IE - a segment other than the one that is currently being processed. */
|
|
2070
2502
|
}, {
|
|
2071
2503
|
key: "_splitSafely",
|
|
2072
2504
|
value: function(e, n) {
|
|
@@ -3520,6 +3952,7 @@ var $e = {
|
|
|
3520
3952
|
spaces: /\s+/,
|
|
3521
3953
|
parenComma: /\)\s*,\s*\(/,
|
|
3522
3954
|
doubleParenComma: /\)\s*\)\s*,\s*\(\s*\(/,
|
|
3955
|
+
// can't use {2} here
|
|
3523
3956
|
trimParens: /^\s*\(?(.*?)\)?\s*$/
|
|
3524
3957
|
}, Ko = function(t) {
|
|
3525
3958
|
this.geometryFactory = t || new H();
|
|
@@ -3546,14 +3979,35 @@ var kn = {
|
|
|
3546
3979
|
coordinate: function(t) {
|
|
3547
3980
|
return t.x + " " + t.y;
|
|
3548
3981
|
},
|
|
3982
|
+
/**
|
|
3983
|
+
* Return a space delimited string of point coordinates.
|
|
3984
|
+
*
|
|
3985
|
+
* @param {Point}
|
|
3986
|
+
* point
|
|
3987
|
+
* @return {String} A string of coordinates representing the point.
|
|
3988
|
+
*/
|
|
3549
3989
|
point: function(t) {
|
|
3550
3990
|
return kn.coordinate.call(this, t._coordinates._coordinates[0]);
|
|
3551
3991
|
},
|
|
3992
|
+
/**
|
|
3993
|
+
* Return a comma delimited string of point coordinates from a multipoint.
|
|
3994
|
+
*
|
|
3995
|
+
* @param {MultiPoint}
|
|
3996
|
+
* multipoint
|
|
3997
|
+
* @return {String} A string of point coordinate strings representing the
|
|
3998
|
+
* multipoint.
|
|
3999
|
+
*/
|
|
3552
4000
|
multipoint: function(t) {
|
|
3553
4001
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3554
4002
|
n.push("(" + kn.point.apply(e, [t._geometries[i]]) + ")");
|
|
3555
4003
|
return n.join(",");
|
|
3556
4004
|
},
|
|
4005
|
+
/**
|
|
4006
|
+
* Return a comma delimited string of point coordinates from a line.
|
|
4007
|
+
*
|
|
4008
|
+
* @param {LineString} linestring
|
|
4009
|
+
* @return {String} A string of point coordinate strings representing the linestring.
|
|
4010
|
+
*/
|
|
3557
4011
|
linestring: function(t) {
|
|
3558
4012
|
for (var e = this, n = [], i = 0, o = t._points._coordinates.length; i < o; ++i)
|
|
3559
4013
|
n.push(kn.coordinate.apply(e, [t._points._coordinates[i]]));
|
|
@@ -3564,11 +4018,24 @@ var kn = {
|
|
|
3564
4018
|
n.push(kn.coordinate.apply(e, [t._points._coordinates[i]]));
|
|
3565
4019
|
return n.join(",");
|
|
3566
4020
|
},
|
|
4021
|
+
/**
|
|
4022
|
+
* Return a comma delimited string of linestring strings from a
|
|
4023
|
+
* multilinestring.
|
|
4024
|
+
*
|
|
4025
|
+
* @param {MultiLineString} multilinestring
|
|
4026
|
+
* @return {String} A string of of linestring strings representing the multilinestring.
|
|
4027
|
+
*/
|
|
3567
4028
|
multilinestring: function(t) {
|
|
3568
4029
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3569
4030
|
n.push("(" + kn.linestring.apply(e, [t._geometries[i]]) + ")");
|
|
3570
4031
|
return n.join(",");
|
|
3571
4032
|
},
|
|
4033
|
+
/**
|
|
4034
|
+
* Return a comma delimited string of linear ring arrays from a polygon.
|
|
4035
|
+
*
|
|
4036
|
+
* @param {Polygon} polygon
|
|
4037
|
+
* @return {String} An array of linear ring arrays representing the polygon.
|
|
4038
|
+
*/
|
|
3572
4039
|
polygon: function(t) {
|
|
3573
4040
|
var e = this, n = [];
|
|
3574
4041
|
n.push("(" + kn.linestring.apply(this, [t._shell]) + ")");
|
|
@@ -3576,17 +4043,37 @@ var kn = {
|
|
|
3576
4043
|
n.push("(" + kn.linestring.apply(e, [t._holes[i]]) + ")");
|
|
3577
4044
|
return n.join(",");
|
|
3578
4045
|
},
|
|
4046
|
+
/**
|
|
4047
|
+
* Return an array of polygon arrays from a multipolygon.
|
|
4048
|
+
*
|
|
4049
|
+
* @param {MultiPolygon} multipolygon
|
|
4050
|
+
* @return {String} An array of polygon arrays representing the multipolygon.
|
|
4051
|
+
*/
|
|
3579
4052
|
multipolygon: function(t) {
|
|
3580
4053
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3581
4054
|
n.push("(" + kn.polygon.apply(e, [t._geometries[i]]) + ")");
|
|
3582
4055
|
return n.join(",");
|
|
3583
4056
|
},
|
|
4057
|
+
/**
|
|
4058
|
+
* Return the WKT portion between 'GEOMETRYCOLLECTION(' and ')' for an
|
|
4059
|
+
* geometrycollection.
|
|
4060
|
+
*
|
|
4061
|
+
* @param {GeometryCollection} collection
|
|
4062
|
+
* @return {String} internal WKT representation of the collection.
|
|
4063
|
+
*/
|
|
3584
4064
|
geometrycollection: function(t) {
|
|
3585
4065
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3586
4066
|
n.push(e.extractGeometry(t._geometries[i]));
|
|
3587
4067
|
return n.join(",");
|
|
3588
4068
|
}
|
|
3589
4069
|
}, li = {
|
|
4070
|
+
/**
|
|
4071
|
+
* Return point geometry given a point WKT fragment.
|
|
4072
|
+
*
|
|
4073
|
+
* @param {String} str A WKT fragment representing the point.
|
|
4074
|
+
* @return {Point} A point geometry.
|
|
4075
|
+
* @private
|
|
4076
|
+
*/
|
|
3590
4077
|
point: function(t) {
|
|
3591
4078
|
if (t === void 0)
|
|
3592
4079
|
return this.geometryFactory.createPoint();
|
|
@@ -3596,6 +4083,13 @@ var kn = {
|
|
|
3596
4083
|
Number.parseFloat(e[1])
|
|
3597
4084
|
));
|
|
3598
4085
|
},
|
|
4086
|
+
/**
|
|
4087
|
+
* Return a multipoint geometry given a multipoint WKT fragment.
|
|
4088
|
+
*
|
|
4089
|
+
* @param {String} str A WKT fragment representing the multipoint.
|
|
4090
|
+
* @return {Point} A multipoint feature.
|
|
4091
|
+
* @private
|
|
4092
|
+
*/
|
|
3599
4093
|
multipoint: function(t) {
|
|
3600
4094
|
var e = this;
|
|
3601
4095
|
if (t === void 0)
|
|
@@ -3604,6 +4098,13 @@ var kn = {
|
|
|
3604
4098
|
n = i[s].replace($e.trimParens, "$1"), o.push(li.point.apply(e, [n]));
|
|
3605
4099
|
return this.geometryFactory.createMultiPoint(o);
|
|
3606
4100
|
},
|
|
4101
|
+
/**
|
|
4102
|
+
* Return a linestring geometry given a linestring WKT fragment.
|
|
4103
|
+
*
|
|
4104
|
+
* @param {String} str A WKT fragment representing the linestring.
|
|
4105
|
+
* @return {LineString} A linestring geometry.
|
|
4106
|
+
* @private
|
|
4107
|
+
*/
|
|
3607
4108
|
linestring: function(t) {
|
|
3608
4109
|
if (t === void 0)
|
|
3609
4110
|
return this.geometryFactory.createLineString();
|
|
@@ -3611,6 +4112,13 @@ var kn = {
|
|
|
3611
4112
|
i = e[o].trim().split($e.spaces), n.push(new v(Number.parseFloat(i[0]), Number.parseFloat(i[1])));
|
|
3612
4113
|
return this.geometryFactory.createLineString(n);
|
|
3613
4114
|
},
|
|
4115
|
+
/**
|
|
4116
|
+
* Return a linearring geometry given a linearring WKT fragment.
|
|
4117
|
+
*
|
|
4118
|
+
* @param {String} str A WKT fragment representing the linearring.
|
|
4119
|
+
* @return {LinearRing} A linearring geometry.
|
|
4120
|
+
* @private
|
|
4121
|
+
*/
|
|
3614
4122
|
linearring: function(t) {
|
|
3615
4123
|
if (t === void 0)
|
|
3616
4124
|
return this.geometryFactory.createLinearRing();
|
|
@@ -3618,6 +4126,13 @@ var kn = {
|
|
|
3618
4126
|
i = e[o].trim().split($e.spaces), n.push(new v(Number.parseFloat(i[0]), Number.parseFloat(i[1])));
|
|
3619
4127
|
return this.geometryFactory.createLinearRing(n);
|
|
3620
4128
|
},
|
|
4129
|
+
/**
|
|
4130
|
+
* Return a multilinestring geometry given a multilinestring WKT fragment.
|
|
4131
|
+
*
|
|
4132
|
+
* @param {String} str A WKT fragment representing the multilinestring.
|
|
4133
|
+
* @return {MultiLineString} A multilinestring geometry.
|
|
4134
|
+
* @private
|
|
4135
|
+
*/
|
|
3621
4136
|
multilinestring: function(t) {
|
|
3622
4137
|
var e = this;
|
|
3623
4138
|
if (t === void 0)
|
|
@@ -3626,6 +4141,13 @@ var kn = {
|
|
|
3626
4141
|
n = i[s].replace($e.trimParens, "$1"), o.push(li.linestring.apply(e, [n]));
|
|
3627
4142
|
return this.geometryFactory.createMultiLineString(o);
|
|
3628
4143
|
},
|
|
4144
|
+
/**
|
|
4145
|
+
* Return a polygon geometry given a polygon WKT fragment.
|
|
4146
|
+
*
|
|
4147
|
+
* @param {String} str A WKT fragment representing the polygon.
|
|
4148
|
+
* @return {Polygon} A polygon geometry.
|
|
4149
|
+
* @private
|
|
4150
|
+
*/
|
|
3629
4151
|
polygon: function(t) {
|
|
3630
4152
|
var e = this;
|
|
3631
4153
|
if (t === void 0)
|
|
@@ -3634,6 +4156,13 @@ var kn = {
|
|
|
3634
4156
|
n = s[l].replace($e.trimParens, "$1"), i = li.linestring.apply(e, [n]), o = e.geometryFactory.createLinearRing(i._points), l === 0 ? a = o : u.push(o);
|
|
3635
4157
|
return this.geometryFactory.createPolygon(a, u);
|
|
3636
4158
|
},
|
|
4159
|
+
/**
|
|
4160
|
+
* Return a multipolygon geometry given a multipolygon WKT fragment.
|
|
4161
|
+
*
|
|
4162
|
+
* @param {String} str A WKT fragment representing the multipolygon.
|
|
4163
|
+
* @return {MultiPolygon} A multipolygon geometry.
|
|
4164
|
+
* @private
|
|
4165
|
+
*/
|
|
3637
4166
|
multipolygon: function(t) {
|
|
3638
4167
|
var e = this;
|
|
3639
4168
|
if (t === void 0)
|
|
@@ -3642,6 +4171,13 @@ var kn = {
|
|
|
3642
4171
|
n = i[s].replace($e.trimParens, "$1"), o.push(li.polygon.apply(e, [n]));
|
|
3643
4172
|
return this.geometryFactory.createMultiPolygon(o);
|
|
3644
4173
|
},
|
|
4174
|
+
/**
|
|
4175
|
+
* Return a geometrycollection given a geometrycollection WKT fragment.
|
|
4176
|
+
*
|
|
4177
|
+
* @param {String} str A WKT fragment representing the geometrycollection.
|
|
4178
|
+
* @return {GeometryCollection}
|
|
4179
|
+
* @private
|
|
4180
|
+
*/
|
|
3645
4181
|
geometrycollection: function(t) {
|
|
3646
4182
|
var e = this;
|
|
3647
4183
|
if (t === void 0)
|
|
@@ -6742,6 +7278,14 @@ ts.prototype.write = function(t) {
|
|
|
6742
7278
|
return zn[e].apply(this, [t]);
|
|
6743
7279
|
};
|
|
6744
7280
|
var en = {
|
|
7281
|
+
/**
|
|
7282
|
+
* Parse a GeoJSON Feature object
|
|
7283
|
+
*
|
|
7284
|
+
* @param {Object}
|
|
7285
|
+
* obj Object to parse.
|
|
7286
|
+
*
|
|
7287
|
+
* @return {Object} Feature with geometry/bbox converted to JSTS Geometries.
|
|
7288
|
+
*/
|
|
6745
7289
|
Feature: function(r) {
|
|
6746
7290
|
var t = {};
|
|
6747
7291
|
for (var e in r)
|
|
@@ -6754,6 +7298,14 @@ var en = {
|
|
|
6754
7298
|
}
|
|
6755
7299
|
return r.bbox && (t.bbox = en.bbox.apply(this, [r.bbox])), t;
|
|
6756
7300
|
},
|
|
7301
|
+
/**
|
|
7302
|
+
* Parse a GeoJSON FeatureCollection object
|
|
7303
|
+
*
|
|
7304
|
+
* @param {Object}
|
|
7305
|
+
* obj Object to parse.
|
|
7306
|
+
*
|
|
7307
|
+
* @return {Object} FeatureCollection with geometry/bbox converted to JSTS Geometries.
|
|
7308
|
+
*/
|
|
6757
7309
|
FeatureCollection: function(r) {
|
|
6758
7310
|
var t = this, e = {};
|
|
6759
7311
|
if (r.features) {
|
|
@@ -6763,6 +7315,14 @@ var en = {
|
|
|
6763
7315
|
}
|
|
6764
7316
|
return r.bbox && (e.bbox = this.parse.bbox.apply(this, [r.bbox])), e;
|
|
6765
7317
|
},
|
|
7318
|
+
/**
|
|
7319
|
+
* Convert the ordinates in an array to an array of Coordinates
|
|
7320
|
+
*
|
|
7321
|
+
* @param {Array}
|
|
7322
|
+
* array Array with {Number}s.
|
|
7323
|
+
*
|
|
7324
|
+
* @return {Array} Array with Coordinates.
|
|
7325
|
+
*/
|
|
6766
7326
|
coordinates: function(r) {
|
|
6767
7327
|
for (var t = [], e = 0; e < r.length; ++e) {
|
|
6768
7328
|
var n = r[e];
|
|
@@ -6770,6 +7330,14 @@ var en = {
|
|
|
6770
7330
|
}
|
|
6771
7331
|
return t;
|
|
6772
7332
|
},
|
|
7333
|
+
/**
|
|
7334
|
+
* Convert the bbox to a LinearRing
|
|
7335
|
+
*
|
|
7336
|
+
* @param {Array}
|
|
7337
|
+
* array Array with [xMin, yMin, xMax, yMax].
|
|
7338
|
+
*
|
|
7339
|
+
* @return {Array} Array with Coordinates.
|
|
7340
|
+
*/
|
|
6773
7341
|
bbox: function(r) {
|
|
6774
7342
|
return this.geometryFactory.createLinearRing([
|
|
6775
7343
|
new v(r[0], r[1]),
|
|
@@ -6779,24 +7347,64 @@ var en = {
|
|
|
6779
7347
|
new v(r[0], r[1])
|
|
6780
7348
|
]);
|
|
6781
7349
|
},
|
|
7350
|
+
/**
|
|
7351
|
+
* Convert an Array with ordinates to a Point
|
|
7352
|
+
*
|
|
7353
|
+
* @param {Array}
|
|
7354
|
+
* array Array with ordinates.
|
|
7355
|
+
*
|
|
7356
|
+
* @return {Point} Point.
|
|
7357
|
+
*/
|
|
6782
7358
|
Point: function(r) {
|
|
6783
7359
|
var t = new v(r[0], r[1]);
|
|
6784
7360
|
return this.geometryFactory.createPoint(t);
|
|
6785
7361
|
},
|
|
7362
|
+
/**
|
|
7363
|
+
* Convert an Array with coordinates to a MultiPoint
|
|
7364
|
+
*
|
|
7365
|
+
* @param {Array}
|
|
7366
|
+
* array Array with coordinates.
|
|
7367
|
+
*
|
|
7368
|
+
* @return {MultiPoint} MultiPoint.
|
|
7369
|
+
*/
|
|
6786
7370
|
MultiPoint: function(r) {
|
|
6787
7371
|
for (var t = this, e = [], n = 0; n < r.length; ++n)
|
|
6788
7372
|
e.push(en.Point.apply(t, [r[n]]));
|
|
6789
7373
|
return this.geometryFactory.createMultiPoint(e);
|
|
6790
7374
|
},
|
|
7375
|
+
/**
|
|
7376
|
+
* Convert an Array with coordinates to a LineString
|
|
7377
|
+
*
|
|
7378
|
+
* @param {Array}
|
|
7379
|
+
* array Array with coordinates.
|
|
7380
|
+
*
|
|
7381
|
+
* @return {LineString} LineString.
|
|
7382
|
+
*/
|
|
6791
7383
|
LineString: function(r) {
|
|
6792
7384
|
var t = en.coordinates.apply(this, [r]);
|
|
6793
7385
|
return this.geometryFactory.createLineString(t);
|
|
6794
7386
|
},
|
|
7387
|
+
/**
|
|
7388
|
+
* Convert an Array with coordinates to a MultiLineString
|
|
7389
|
+
*
|
|
7390
|
+
* @param {Array}
|
|
7391
|
+
* array Array with coordinates.
|
|
7392
|
+
*
|
|
7393
|
+
* @return {MultiLineString} MultiLineString.
|
|
7394
|
+
*/
|
|
6795
7395
|
MultiLineString: function(r) {
|
|
6796
7396
|
for (var t = this, e = [], n = 0; n < r.length; ++n)
|
|
6797
7397
|
e.push(en.LineString.apply(t, [r[n]]));
|
|
6798
7398
|
return this.geometryFactory.createMultiLineString(e);
|
|
6799
7399
|
},
|
|
7400
|
+
/**
|
|
7401
|
+
* Convert an Array to a Polygon
|
|
7402
|
+
*
|
|
7403
|
+
* @param {Array}
|
|
7404
|
+
* array Array with shell and holes.
|
|
7405
|
+
*
|
|
7406
|
+
* @return {Polygon} Polygon.
|
|
7407
|
+
*/
|
|
6800
7408
|
Polygon: function(r) {
|
|
6801
7409
|
for (var t = this, e = en.coordinates.apply(this, [r[0]]), n = this.geometryFactory.createLinearRing(e), i = [], o = 1; o < r.length; ++o) {
|
|
6802
7410
|
var s = r[o], a = en.coordinates.apply(t, [s]), u = t.geometryFactory.createLinearRing(a);
|
|
@@ -6804,6 +7412,14 @@ var en = {
|
|
|
6804
7412
|
}
|
|
6805
7413
|
return this.geometryFactory.createPolygon(n, i);
|
|
6806
7414
|
},
|
|
7415
|
+
/**
|
|
7416
|
+
* Convert an Array to a MultiPolygon
|
|
7417
|
+
*
|
|
7418
|
+
* @param {Array}
|
|
7419
|
+
* array Array of arrays with shell and rings.
|
|
7420
|
+
*
|
|
7421
|
+
* @return {MultiPolygon} MultiPolygon.
|
|
7422
|
+
*/
|
|
6807
7423
|
MultiPolygon: function(r) {
|
|
6808
7424
|
for (var t = this, e = [], n = 0; n < r.length; ++n) {
|
|
6809
7425
|
var i = r[n];
|
|
@@ -6811,6 +7427,14 @@ var en = {
|
|
|
6811
7427
|
}
|
|
6812
7428
|
return this.geometryFactory.createMultiPolygon(e);
|
|
6813
7429
|
},
|
|
7430
|
+
/**
|
|
7431
|
+
* Convert an Array to a GeometryCollection
|
|
7432
|
+
*
|
|
7433
|
+
* @param {Array}
|
|
7434
|
+
* array Array of GeoJSON geometries.
|
|
7435
|
+
*
|
|
7436
|
+
* @return {GeometryCollection} GeometryCollection.
|
|
7437
|
+
*/
|
|
6814
7438
|
GeometryCollection: function(r) {
|
|
6815
7439
|
for (var t = this, e = [], n = 0; n < r.length; ++n) {
|
|
6816
7440
|
var i = r[n];
|
|
@@ -6819,9 +7443,25 @@ var en = {
|
|
|
6819
7443
|
return this.geometryFactory.createGeometryCollection(e);
|
|
6820
7444
|
}
|
|
6821
7445
|
}, zn = {
|
|
7446
|
+
/**
|
|
7447
|
+
* Convert a Coordinate to an Array
|
|
7448
|
+
*
|
|
7449
|
+
* @param {Coordinate}
|
|
7450
|
+
* coordinate Coordinate to convert.
|
|
7451
|
+
*
|
|
7452
|
+
* @return {Array} Array of ordinates.
|
|
7453
|
+
*/
|
|
6822
7454
|
coordinate: function(r) {
|
|
6823
7455
|
return [r.x, r.y];
|
|
6824
7456
|
},
|
|
7457
|
+
/**
|
|
7458
|
+
* Convert a Point to a GeoJSON object
|
|
7459
|
+
*
|
|
7460
|
+
* @param {Point}
|
|
7461
|
+
* point Point to convert.
|
|
7462
|
+
*
|
|
7463
|
+
* @return {Array} Array of 2 ordinates (paired to a coordinate).
|
|
7464
|
+
*/
|
|
6825
7465
|
Point: function(r) {
|
|
6826
7466
|
var t = zn.coordinate.apply(this, [r.getCoordinate()]);
|
|
6827
7467
|
return {
|
|
@@ -6829,6 +7469,14 @@ var en = {
|
|
|
6829
7469
|
coordinates: t
|
|
6830
7470
|
};
|
|
6831
7471
|
},
|
|
7472
|
+
/**
|
|
7473
|
+
* Convert a MultiPoint to a GeoJSON object
|
|
7474
|
+
*
|
|
7475
|
+
* @param {MultiPoint}
|
|
7476
|
+
* multipoint MultiPoint to convert.
|
|
7477
|
+
*
|
|
7478
|
+
* @return {Array} Array of coordinates.
|
|
7479
|
+
*/
|
|
6832
7480
|
MultiPoint: function(r) {
|
|
6833
7481
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6834
7482
|
var i = r._geometries[n], o = zn.Point.apply(t, [i]);
|
|
@@ -6839,6 +7487,14 @@ var en = {
|
|
|
6839
7487
|
coordinates: e
|
|
6840
7488
|
};
|
|
6841
7489
|
},
|
|
7490
|
+
/**
|
|
7491
|
+
* Convert a LineString to a GeoJSON object
|
|
7492
|
+
*
|
|
7493
|
+
* @param {LineString}
|
|
7494
|
+
* linestring LineString to convert.
|
|
7495
|
+
*
|
|
7496
|
+
* @return {Array} Array of coordinates.
|
|
7497
|
+
*/
|
|
6842
7498
|
LineString: function(r) {
|
|
6843
7499
|
for (var t = this, e = [], n = r.getCoordinates(), i = 0; i < n.length; ++i) {
|
|
6844
7500
|
var o = n[i];
|
|
@@ -6849,6 +7505,14 @@ var en = {
|
|
|
6849
7505
|
coordinates: e
|
|
6850
7506
|
};
|
|
6851
7507
|
},
|
|
7508
|
+
/**
|
|
7509
|
+
* Convert a MultiLineString to a GeoJSON object
|
|
7510
|
+
*
|
|
7511
|
+
* @param {MultiLineString}
|
|
7512
|
+
* multilinestring MultiLineString to convert.
|
|
7513
|
+
*
|
|
7514
|
+
* @return {Array} Array of Array of coordinates.
|
|
7515
|
+
*/
|
|
6852
7516
|
MultiLineString: function(r) {
|
|
6853
7517
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6854
7518
|
var i = r._geometries[n], o = zn.LineString.apply(t, [i]);
|
|
@@ -6859,6 +7523,14 @@ var en = {
|
|
|
6859
7523
|
coordinates: e
|
|
6860
7524
|
};
|
|
6861
7525
|
},
|
|
7526
|
+
/**
|
|
7527
|
+
* Convert a Polygon to a GeoJSON object
|
|
7528
|
+
*
|
|
7529
|
+
* @param {Polygon}
|
|
7530
|
+
* polygon Polygon to convert.
|
|
7531
|
+
*
|
|
7532
|
+
* @return {Array} Array with shell, holes.
|
|
7533
|
+
*/
|
|
6862
7534
|
Polygon: function(r) {
|
|
6863
7535
|
var t = this, e = [], n = zn.LineString.apply(this, [r._shell]);
|
|
6864
7536
|
e.push(n.coordinates);
|
|
@@ -6871,6 +7543,14 @@ var en = {
|
|
|
6871
7543
|
coordinates: e
|
|
6872
7544
|
};
|
|
6873
7545
|
},
|
|
7546
|
+
/**
|
|
7547
|
+
* Convert a MultiPolygon to a GeoJSON object
|
|
7548
|
+
*
|
|
7549
|
+
* @param {MultiPolygon}
|
|
7550
|
+
* multipolygon MultiPolygon to convert.
|
|
7551
|
+
*
|
|
7552
|
+
* @return {Array} Array of polygons.
|
|
7553
|
+
*/
|
|
6874
7554
|
MultiPolygon: function(r) {
|
|
6875
7555
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6876
7556
|
var i = r._geometries[n], o = zn.Polygon.apply(t, [i]);
|
|
@@ -6881,6 +7561,14 @@ var en = {
|
|
|
6881
7561
|
coordinates: e
|
|
6882
7562
|
};
|
|
6883
7563
|
},
|
|
7564
|
+
/**
|
|
7565
|
+
* Convert a GeometryCollection to a GeoJSON object
|
|
7566
|
+
*
|
|
7567
|
+
* @param {GeometryCollection}
|
|
7568
|
+
* collection GeometryCollection to convert.
|
|
7569
|
+
*
|
|
7570
|
+
* @return {Array} Array of geometries.
|
|
7571
|
+
*/
|
|
6884
7572
|
GeometryCollection: function(r) {
|
|
6885
7573
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6886
7574
|
var i = r._geometries[n], o = i.getGeometryType();
|
|
@@ -14342,7 +15030,8 @@ function Uo() {
|
|
|
14342
15030
|
Uo.prototype = {
|
|
14343
15031
|
constructor: Uo,
|
|
14344
15032
|
reset: function() {
|
|
14345
|
-
this.s =
|
|
15033
|
+
this.s = // rounded value
|
|
15034
|
+
this.t = 0;
|
|
14346
15035
|
},
|
|
14347
15036
|
add: function(r) {
|
|
14348
15037
|
wa(No, r, this.t), wa(this, No.s, this.s), this.s ? this.t += No.t : this.s = No.t;
|
|
@@ -14899,6 +15588,8 @@ function Hc(r, t) {
|
|
|
14899
15588
|
lineEnd: function() {
|
|
14900
15589
|
g && c.lineEnd(), f = null;
|
|
14901
15590
|
},
|
|
15591
|
+
// Rejoin first and last segments if there were intersections and the first
|
|
15592
|
+
// and last points were visible.
|
|
14902
15593
|
clean: function() {
|
|
14903
15594
|
return m | (p && g) << 1;
|
|
14904
15595
|
}
|