@performant-software/geospatial 3.0.2-beta.0 → 3.0.2-beta.2

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 (89) hide show
  1. package/dist/index.cjs14.js +1 -1
  2. package/dist/index.cjs15.js +1 -1
  3. package/dist/index.cjs16.js +1 -1
  4. package/dist/index.cjs182.js +1 -1
  5. package/dist/index.cjs183.js +1 -1
  6. package/dist/index.cjs19.js +1 -1
  7. package/dist/index.cjs21.js +1 -1
  8. package/dist/index.cjs22.js +1 -1
  9. package/dist/index.cjs246.js +1 -1
  10. package/dist/index.cjs251.js +1 -1
  11. package/dist/index.cjs254.js +1 -1
  12. package/dist/index.cjs258.js +1 -1
  13. package/dist/index.cjs258.js.map +1 -1
  14. package/dist/index.cjs259.js +1 -1
  15. package/dist/index.cjs259.js.map +1 -1
  16. package/dist/index.cjs52.js +1 -1
  17. package/dist/index.cjs63.js +1 -1
  18. package/dist/index.cjs63.js.map +1 -1
  19. package/dist/index.cjs64.js +1 -1
  20. package/dist/index.cjs64.js.map +1 -1
  21. package/dist/index.cjs65.js +1 -1
  22. package/dist/index.cjs66.js +1 -1
  23. package/dist/index.cjs66.js.map +1 -1
  24. package/dist/index.cjs67.js +1 -1
  25. package/dist/index.cjs67.js.map +1 -1
  26. package/dist/index.cjs68.js +1 -1
  27. package/dist/index.cjs68.js.map +1 -1
  28. package/dist/index.cjs69.js +1 -1
  29. package/dist/index.cjs69.js.map +1 -1
  30. package/dist/index.cjs70.js +1 -1
  31. package/dist/index.cjs70.js.map +1 -1
  32. package/dist/index.cjs71.js +1 -1
  33. package/dist/index.cjs71.js.map +1 -1
  34. package/dist/index.cjs72.js +1 -1
  35. package/dist/index.cjs72.js.map +1 -1
  36. package/dist/index.cjs73.js +1 -1
  37. package/dist/index.cjs73.js.map +1 -1
  38. package/dist/index.cjs74.js +1 -1
  39. package/dist/index.cjs74.js.map +1 -1
  40. package/dist/index.cjs75.js +1 -1
  41. package/dist/index.cjs75.js.map +1 -1
  42. package/dist/index.cjs76.js +1 -1
  43. package/dist/index.cjs76.js.map +1 -1
  44. package/dist/index.es14.js +2 -2
  45. package/dist/index.es15.js +5 -5
  46. package/dist/index.es16.js +1 -1
  47. package/dist/index.es182.js +1 -1
  48. package/dist/index.es183.js +1 -1
  49. package/dist/index.es19.js +2 -2
  50. package/dist/index.es21.js +2 -2
  51. package/dist/index.es22.js +2 -2
  52. package/dist/index.es246.js +1 -1
  53. package/dist/index.es251.js +1 -1
  54. package/dist/index.es254.js +1 -1
  55. package/dist/index.es258.js +15 -4
  56. package/dist/index.es258.js.map +1 -1
  57. package/dist/index.es259.js +4 -15
  58. package/dist/index.es259.js.map +1 -1
  59. package/dist/index.es52.js +5 -5
  60. package/dist/index.es63.js +5 -106
  61. package/dist/index.es63.js.map +1 -1
  62. package/dist/index.es64.js +2 -10
  63. package/dist/index.es64.js.map +1 -1
  64. package/dist/index.es65.js +2 -6
  65. package/dist/index.es65.js.map +1 -1
  66. package/dist/index.es66.js +55 -2
  67. package/dist/index.es66.js.map +1 -1
  68. package/dist/index.es67.js +48 -4
  69. package/dist/index.es67.js.map +1 -1
  70. package/dist/index.es68.js +37 -55
  71. package/dist/index.es68.js.map +1 -1
  72. package/dist/index.es69.js +11 -47
  73. package/dist/index.es69.js.map +1 -1
  74. package/dist/index.es70.js +14 -38
  75. package/dist/index.es70.js.map +1 -1
  76. package/dist/index.es71.js +29 -11
  77. package/dist/index.es71.js.map +1 -1
  78. package/dist/index.es72.js +10 -10
  79. package/dist/index.es72.js.map +1 -1
  80. package/dist/index.es73.js +13 -29
  81. package/dist/index.es73.js.map +1 -1
  82. package/dist/index.es74.js +10 -12
  83. package/dist/index.es74.js.map +1 -1
  84. package/dist/index.es75.js +109 -14
  85. package/dist/index.es75.js.map +1 -1
  86. package/dist/index.es76.js +10 -11
  87. package/dist/index.es76.js.map +1 -1
  88. package/dist/style.css +1 -1
  89. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import * as i from "react";
2
- import p from "./index.es68.js";
2
+ import p from "./index.es66.js";
3
+ import "./index.es67.js";
4
+ import "./index.es68.js";
3
5
  import "./index.es69.js";
4
6
  import "./index.es70.js";
5
7
  import "./index.es71.js";
6
- import "./index.es72.js";
8
+ import m from "./index.es72.js";
7
9
  import "./index.es73.js";
8
- import m from "./index.es74.js";
9
- import "./index.es75.js";
10
10
  import a from "./index.es182.js";
11
11
  import n from "./index.es183.js";
12
- import { useMap as e } from "./index.es76.js";
12
+ import { useMap as e } from "./index.es74.js";
13
13
  function C() {
14
14
  return e();
15
15
  }
@@ -1,5 +1,5 @@
1
1
  import { useContext as p, useMemo as r, useEffect as m } from "react";
2
- import { MapContext as d } from "./index.es68.js";
2
+ import { MapContext as d } from "./index.es66.js";
3
3
  function x(c, o, n, l) {
4
4
  const e = p(d), t = r(() => c(e), []);
5
5
  return m(() => {
@@ -1,5 +1,5 @@
1
1
  import { useContext as m, useRef as L, useState as g, useMemo as x, useEffect as h } from "react";
2
- import { MapContext as b } from "./index.es68.js";
2
+ import { MapContext as b } from "./index.es66.js";
3
3
  import d from "./index.es190.js";
4
4
  import { deepEqual as l } from "./index.es189.js";
5
5
  function k(t, e, a, o) {
@@ -1,6 +1,6 @@
1
1
  import * as u from "react";
2
2
  import { useContext as f, useRef as y, useState as m, useMemo as g, useEffect as S, cloneElement as h } from "react";
3
- import { MapContext as C } from "./index.es68.js";
3
+ import { MapContext as C } from "./index.es66.js";
4
4
  import s from "./index.es190.js";
5
5
  import { deepEqual as v } from "./index.es189.js";
6
6
  let x = 0;
@@ -1,5 +1,5 @@
1
- import { commonjsGlobal as nd, getDefaultExportFromCjs as od } from "./index.es65.js";
2
- import { __module as lu } from "./index.es66.js";
1
+ import { commonjsGlobal as nd, getDefaultExportFromCjs as od } from "./index.es63.js";
2
+ import { __module as lu } from "./index.es65.js";
3
3
  function ld(an, vl) {
4
4
  for (var Ur = 0; Ur < vl.length; Ur++) {
5
5
  const cr = vl[Ur];
@@ -1,5 +1,5 @@
1
- import { GenIcon as a } from "./index.es63.js";
2
- import "./index.es64.js";
1
+ import { GenIcon as a } from "./index.es75.js";
2
+ import "./index.es76.js";
3
3
  function c(t) {
4
4
  return a({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m14.12 10.163 1.715.858c.22.11.22.424 0 .534L8.267 15.34a.598.598 0 0 1-.534 0L.165 11.555a.299.299 0 0 1 0-.534l1.716-.858 5.317 2.659c.505.252 1.1.252 1.604 0l5.317-2.66zM7.733.063a.598.598 0 0 1 .534 0l7.568 3.784a.3.3 0 0 1 0 .535L8.267 8.165a.598.598 0 0 1-.534 0L.165 4.382a.299.299 0 0 1 0-.535L7.733.063z" }, child: [] }, { tag: "path", attr: { d: "m14.12 6.576 1.715.858c.22.11.22.424 0 .534l-7.568 3.784a.598.598 0 0 1-.534 0L.165 7.968a.299.299 0 0 1 0-.534l1.716-.858 5.317 2.659c.505.252 1.1.252 1.604 0l5.317-2.659z" }, child: [] }] })(t);
5
5
  }
@@ -1,5 +1,5 @@
1
- import { GenIcon as o } from "./index.es63.js";
2
- import "./index.es64.js";
1
+ import { GenIcon as o } from "./index.es75.js";
2
+ import "./index.es76.js";
3
3
  function e(t) {
4
4
  return o({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M416 128 192 384l-96-96" }, child: [] }] })(t);
5
5
  }
@@ -1,4 +1,4 @@
1
- import a from "./index.es258.js";
1
+ import a from "./index.es259.js";
2
2
  function g(f, v, h, o) {
3
3
  this.x = f, this.z = v, this.o = h, this.e = o, this.v = !1, this.n = this.p = null;
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { cartesian as Q, cartesianCross as T, cartesianDot as R, cartesianScale as g, cartesianAddInPlace as y, spherical as U } from "./index.es241.js";
2
2
  import { circleStream as $ } from "./index.es240.js";
3
3
  import { pi as v, cos as F, epsilon as x, abs as G, sqrt as b } from "./index.es242.js";
4
- import J from "./index.es258.js";
4
+ import J from "./index.es259.js";
5
5
  import m from "./index.es260.js";
6
6
  function fn(S, V) {
7
7
  var A = F(S), C = A > 0, W = G(A) > x;
@@ -1,5 +1,5 @@
1
1
  import c from "./index.es256.js";
2
- import n from "./index.es259.js";
2
+ import n from "./index.es258.js";
3
3
  function S(l, a, r) {
4
4
  var f = a[1][0] - a[0][0], m = a[1][1] - a[0][1], i = l.clipExtent && l.clipExtent();
5
5
  l.scale(150).translate([0, 0]), i != null && l.clipExtent(null), c(r, l.stream(n));
@@ -1,8 +1,19 @@
1
- import { abs as n, epsilon as r } from "./index.es242.js";
2
- function i(o, t) {
3
- return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
1
+ import r from "./index.es257.js";
2
+ var o = 1 / 0, f = o, t = -o, a = t, d = {
3
+ point: u,
4
+ lineStart: r,
5
+ lineEnd: r,
6
+ polygonStart: r,
7
+ polygonEnd: r,
8
+ result: function() {
9
+ var n = [[o, f], [t, a]];
10
+ return t = a = -(f = o = 1 / 0), n;
11
+ }
12
+ };
13
+ function u(n, i) {
14
+ n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
4
15
  }
5
16
  export {
6
- i as default
17
+ d as default
7
18
  };
8
19
  //# sourceMappingURL=index.es258.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es258.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es258.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
@@ -1,19 +1,8 @@
1
- import r from "./index.es257.js";
2
- var o = 1 / 0, f = o, t = -o, a = t, d = {
3
- point: u,
4
- lineStart: r,
5
- lineEnd: r,
6
- polygonStart: r,
7
- polygonEnd: r,
8
- result: function() {
9
- var n = [[o, f], [t, a]];
10
- return t = a = -(f = o = 1 / 0), n;
11
- }
12
- };
13
- function u(n, i) {
14
- n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
1
+ import { abs as n, epsilon as r } from "./index.es242.js";
2
+ function i(o, t) {
3
+ return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
15
4
  }
16
5
  export {
17
- d as default
6
+ i as default
18
7
  };
19
8
  //# sourceMappingURL=index.es259.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es259.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es259.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
@@ -1,13 +1,13 @@
1
1
  import * as m from "react";
2
- import p from "./index.es68.js";
2
+ import p from "./index.es66.js";
3
+ import "./index.es67.js";
4
+ import "./index.es68.js";
3
5
  import "./index.es69.js";
4
- import "./index.es70.js";
6
+ import i from "./index.es70.js";
5
7
  import "./index.es71.js";
6
- import i from "./index.es72.js";
8
+ import "./index.es72.js";
7
9
  import "./index.es73.js";
8
10
  import "./index.es74.js";
9
- import "./index.es75.js";
10
- import "./index.es76.js";
11
11
  const n = import("./index.es19.js").then((r) => r.o);
12
12
  m.forwardRef(function(o, t) {
13
13
  return p(o, t, n);
@@ -1,110 +1,9 @@
1
- import l from "react";
2
- import { IconContext as s, DefaultContext as y } from "./index.es64.js";
3
- var O = ["attr", "size", "title"];
4
- function v(e, t) {
5
- if (e == null)
6
- return {};
7
- var r = p(e, t), n, i;
8
- if (Object.getOwnPropertySymbols) {
9
- var o = Object.getOwnPropertySymbols(e);
10
- for (i = 0; i < o.length; i++)
11
- n = o[i], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
12
- }
13
- return r;
14
- }
15
- function p(e, t) {
16
- if (e == null)
17
- return {};
18
- var r = {}, n = Object.keys(e), i, o;
19
- for (o = 0; o < n.length; o++)
20
- i = n[o], !(t.indexOf(i) >= 0) && (r[i] = e[i]);
21
- return r;
22
- }
23
- function c() {
24
- return c = Object.assign ? Object.assign.bind() : function(e) {
25
- for (var t = 1; t < arguments.length; t++) {
26
- var r = arguments[t];
27
- for (var n in r)
28
- Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
29
- }
30
- return e;
31
- }, c.apply(this, arguments);
32
- }
33
- function m(e, t) {
34
- var r = Object.keys(e);
35
- if (Object.getOwnPropertySymbols) {
36
- var n = Object.getOwnPropertySymbols(e);
37
- t && (n = n.filter(function(i) {
38
- return Object.getOwnPropertyDescriptor(e, i).enumerable;
39
- })), r.push.apply(r, n);
40
- }
41
- return r;
42
- }
43
- function u(e) {
44
- for (var t = 1; t < arguments.length; t++) {
45
- var r = arguments[t] != null ? arguments[t] : {};
46
- t % 2 ? m(Object(r), !0).forEach(function(n) {
47
- j(e, n, r[n]);
48
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : m(Object(r)).forEach(function(n) {
49
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
50
- });
51
- }
52
- return e;
53
- }
54
- function j(e, t, r) {
55
- return t = P(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
56
- }
57
- function P(e) {
58
- var t = h(e, "string");
59
- return typeof t == "symbol" ? t : String(t);
60
- }
61
- function h(e, t) {
62
- if (typeof e != "object" || e === null)
63
- return e;
64
- var r = e[Symbol.toPrimitive];
65
- if (r !== void 0) {
66
- var n = r.call(e, t || "default");
67
- if (typeof n != "object")
68
- return n;
69
- throw new TypeError("@@toPrimitive must return a primitive value.");
70
- }
71
- return (t === "string" ? String : Number)(e);
72
- }
73
- function b(e) {
74
- return e && e.map((t, r) => /* @__PURE__ */ l.createElement(t.tag, u({
75
- key: r
76
- }, t.attr), b(t.child)));
77
- }
78
- function _(e) {
79
- return (t) => /* @__PURE__ */ l.createElement(d, c({
80
- attr: u({}, e.attr)
81
- }, t), b(e.child));
82
- }
83
- function d(e) {
84
- var t = (r) => {
85
- var {
86
- attr: n,
87
- size: i,
88
- title: o
89
- } = e, g = v(e, O), f = i || r.size || "1em", a;
90
- return r.className && (a = r.className), e.className && (a = (a ? a + " " : "") + e.className), /* @__PURE__ */ l.createElement("svg", c({
91
- stroke: "currentColor",
92
- fill: "currentColor",
93
- strokeWidth: "0"
94
- }, r.attr, n, g, {
95
- className: a,
96
- style: u(u({
97
- color: e.color || r.color
98
- }, r.style), e.style),
99
- height: f,
100
- width: f,
101
- xmlns: "http://www.w3.org/2000/svg"
102
- }), o && /* @__PURE__ */ l.createElement("title", null, o), e.children);
103
- };
104
- return s !== void 0 ? /* @__PURE__ */ l.createElement(s.Consumer, null, (r) => t(r)) : t(y);
1
+ var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function l(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
105
4
  }
106
5
  export {
107
- _ as GenIcon,
108
- d as IconBase
6
+ o as commonjsGlobal,
7
+ l as getDefaultExportFromCjs
109
8
  };
110
9
  //# sourceMappingURL=index.es63.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es63.js","sources":["../../../node_modules/react-icons/lib/iconBase.mjs"],"sourcesContent":["var _excluded = [\"attr\", \"size\", \"title\"];\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport React from \"react\";\nimport { IconContext, DefaultContext } from \"./iconContext.mjs\";\nfunction Tree2Element(tree) {\n return tree && tree.map((node, i) => /*#__PURE__*/React.createElement(node.tag, _objectSpread({\n key: i\n }, node.attr), Tree2Element(node.child)));\n}\nexport function GenIcon(data) {\n // eslint-disable-next-line react/display-name\n return props => /*#__PURE__*/React.createElement(IconBase, _extends({\n attr: _objectSpread({}, data.attr)\n }, props), Tree2Element(data.child));\n}\nexport function IconBase(props) {\n var elem = conf => {\n var {\n attr,\n size,\n title\n } = props,\n svgProps = _objectWithoutProperties(props, _excluded);\n var computedSize = size || conf.size || \"1em\";\n var className;\n if (conf.className) className = conf.className;\n if (props.className) className = (className ? className + \" \" : \"\") + props.className;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n stroke: \"currentColor\",\n fill: \"currentColor\",\n strokeWidth: \"0\"\n }, conf.attr, attr, svgProps, {\n className: className,\n style: _objectSpread(_objectSpread({\n color: props.color || conf.color\n }, conf.style), props.style),\n height: computedSize,\n width: computedSize,\n xmlns: \"http://www.w3.org/2000/svg\"\n }), title && /*#__PURE__*/React.createElement(\"title\", null, title), props.children);\n };\n return IconContext !== undefined ? /*#__PURE__*/React.createElement(IconContext.Consumer, null, conf => elem(conf)) : elem(DefaultContext);\n}"],"names":["_excluded","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","sourceSymbolKeys","sourceKeys","i","_extends","ownKeys","r","t","o","_objectSpread","_defineProperty","obj","value","_toPropertyKey","arg","_toPrimitive","input","hint","prim","res","Tree2Element","tree","node","React","GenIcon","data","props","IconBase","elem","conf","attr","size","title","svgProps","computedSize","className","IconContext","DefaultContext"],"mappings":";;AAAA,IAAIA,IAAY,CAAC,QAAQ,QAAQ,OAAO;AACxC,SAASC,EAAyBC,GAAQC,GAAU;AAAE,MAAID,KAAU;AAAM,WAAO;AAAI,MAAIE,IAASC,EAA8BH,GAAQC,CAAQ,GAAOG,GAAK;AAAG,MAAI,OAAO,uBAAuB;AAAE,QAAIC,IAAmB,OAAO,sBAAsBL,CAAM;AAAG,SAAK,IAAI,GAAG,IAAIK,EAAiB,QAAQ;AAAkC,MAA3BD,IAAMC,EAAiB,CAAC,GAAO,EAAAJ,EAAS,QAAQG,CAAG,KAAK,MAAkB,OAAO,UAAU,qBAAqB,KAAKJ,GAAQI,CAAG,MAAaF,EAAOE,CAAG,IAAIJ,EAAOI,CAAG;AAAA,EAAI;AAAG,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C1C;AACO,SAASE,EAAQC,GAAM;AAE5B,SAAO,CAAAC,MAAsBH,gBAAAA,EAAM,cAAcI,GAAUvB,EAAS;AAAA,IAClE,MAAMK,EAAc,IAAIgB,EAAK,IAAI;AAAA,EAClC,GAAEC,CAAK,GAAGN,EAAaK,EAAK,KAAK,CAAC;AACrC;AACO,SAASE,EAASD,GAAO;AAC9B,MAAIE,IAAO,CAAAC,MAAQ;AACjB,QAAI;AAAA,MACA,MAAAC;AAAA,MACA,MAAAC;AAAA,MACA,OAAAC;AAAA,IACR,IAAUN,GACJO,IAAWtC,EAAyB+B,GAAOhC,CAAS,GAClDwC,IAAeH,KAAQF,EAAK,QAAQ,OACpCM;AACJ,WAAIN,EAAK,cAAWM,IAAYN,EAAK,YACjCH,EAAM,cAAWS,KAAaA,IAAYA,IAAY,MAAM,MAAMT,EAAM,YACxDH,gBAAAA,EAAM,cAAc,OAAOnB,EAAS;AAAA,MACtD,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACd,GAAEyB,EAAK,MAAMC,GAAMG,GAAU;AAAA,MAC5B,WAAWE;AAAA,MACX,OAAO1B,EAAcA,EAAc;AAAA,QACjC,OAAOiB,EAAM,SAASG,EAAK;AAAA,MAC5B,GAAEA,EAAK,KAAK,GAAGH,EAAM,KAAK;AAAA,MAC3B,QAAQQ;AAAA,MACR,OAAOA;AAAA,MACP,OAAO;AAAA,IACb,CAAK,GAAGF,KAAsBT,gBAAAA,EAAM,cAAc,SAAS,MAAMS,CAAK,GAAGN,EAAM,QAAQ;AAAA,EACvF;AACE,SAAOU,MAAgB,SAAyBb,gBAAAA,EAAM,cAAca,EAAY,UAAU,MAAM,CAAAP,MAAQD,EAAKC,CAAI,CAAC,IAAID,EAAKS,CAAc;AAC3I;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es63.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,13 +1,5 @@
1
- import e from "react";
2
- var t = {
3
- color: void 0,
4
- size: void 0,
5
- className: void 0,
6
- style: void 0,
7
- attr: void 0
8
- }, d = e.createContext && /* @__PURE__ */ e.createContext(t);
1
+ var a = { exports: {} };
9
2
  export {
10
- t as DefaultContext,
11
- d as IconContext
3
+ a as __module
12
4
  };
13
5
  //# sourceMappingURL=index.es64.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es64.js","sources":["../../../node_modules/react-icons/lib/iconContext.mjs"],"sourcesContent":["import React from \"react\";\nexport var DefaultContext = {\n color: undefined,\n size: undefined,\n className: undefined,\n style: undefined,\n attr: undefined\n};\nexport var IconContext = React.createContext && /*#__PURE__*/React.createContext(DefaultContext);"],"names":["DefaultContext","IconContext","React"],"mappings":";AACU,IAACA,IAAiB;AAAA,EAC1B,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AACR,GACWC,IAAcC,EAAM,iBAA8BA,gBAAAA,EAAM,cAAcF,CAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es64.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,9 +1,5 @@
1
- var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function l(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
1
+ var e = { exports: {} };
5
2
  export {
6
- o as commonjsGlobal,
7
- l as getDefaultExportFromCjs
3
+ e as __module
8
4
  };
9
5
  //# sourceMappingURL=index.es65.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es65.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.es65.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,58 @@
1
- var e = { exports: {} };
1
+ import * as l from "react";
2
+ import { useContext as b, useState as E, useRef as c, useEffect as x, useImperativeHandle as w, useMemo as y } from "react";
3
+ import { MountedMapsContext as L } from "./index.es74.js";
4
+ import m from "./index.es184.js";
5
+ import I from "./index.es185.js";
6
+ import C from "./index.es186.js";
7
+ import g from "./index.es187.js";
8
+ const R = l.createContext(null);
9
+ function A(e, f, d) {
10
+ const o = b(L), [i, p] = E(null), s = c(), { current: a } = c({ mapLib: null, map: null });
11
+ x(() => {
12
+ const v = e.mapLib;
13
+ let u = !0, n;
14
+ return Promise.resolve(v || d).then((r) => {
15
+ if (!u)
16
+ return;
17
+ if (!r)
18
+ throw new Error("Invalid mapLib");
19
+ const t = "Map" in r ? r : r.default;
20
+ if (!t.Map)
21
+ throw new Error("Invalid mapLib");
22
+ if (g(t, e), !t.supported || t.supported(e))
23
+ e.reuseMaps && (n = m.reuse(e, s.current)), n || (n = new m(t.Map, e, s.current)), a.map = I(n), a.mapLib = t, p(n), o == null || o.onMapMount(a.map, e.id);
24
+ else
25
+ throw new Error("Map is not supported by this browser");
26
+ }).catch((r) => {
27
+ const { onError: t } = e;
28
+ t ? t({
29
+ type: "error",
30
+ target: null,
31
+ originalEvent: null,
32
+ error: r
33
+ }) : console.error(r);
34
+ }), () => {
35
+ u = !1, n && (o == null || o.onMapUnmount(e.id), e.reuseMaps ? n.recycle() : n.destroy());
36
+ };
37
+ }, []), C(() => {
38
+ i && i.setProps(e);
39
+ }), w(f, () => a.map, [i]);
40
+ const M = y(() => ({
41
+ position: "relative",
42
+ width: "100%",
43
+ height: "100%",
44
+ ...e.style
45
+ }), [e.style]), h = {
46
+ height: "100%"
47
+ };
48
+ return l.createElement("div", { id: e.id, ref: s, style: M }, i && l.createElement(
49
+ R.Provider,
50
+ { value: a },
51
+ l.createElement("div", { "mapboxgl-children": "", style: h }, e.children)
52
+ ));
53
+ }
2
54
  export {
3
- e as __module
55
+ R as MapContext,
56
+ A as default
4
57
  };
5
58
  //# sourceMappingURL=index.es66.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es66.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.es66.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useRef, useEffect, useContext, useMemo, useImperativeHandle } from 'react';\nimport { MountedMapsContext } from './use-map';\nimport Mapbox from '../mapbox/mapbox';\nimport createRef from '../mapbox/create-ref';\nimport useIsomorphicLayoutEffect from '../utils/use-isomorphic-layout-effect';\nimport setGlobals from '../utils/set-globals';\nexport const MapContext = React.createContext(null);\nexport default function Map(props, ref, defaultLib) {\n const mountedMapsContext = useContext(MountedMapsContext);\n const [mapInstance, setMapInstance] = useState(null);\n const containerRef = useRef();\n const { current: contextValue } = useRef({ mapLib: null, map: null });\n useEffect(() => {\n const mapLib = props.mapLib;\n let isMounted = true;\n let mapbox;\n Promise.resolve(mapLib || defaultLib)\n .then((module) => {\n if (!isMounted) {\n return;\n }\n if (!module) {\n throw new Error('Invalid mapLib');\n }\n const mapboxgl = 'Map' in module ? module : module.default;\n if (!mapboxgl.Map) {\n throw new Error('Invalid mapLib');\n }\n // workerUrl & workerClass may change the result of supported()\n // https://github.com/visgl/react-map-gl/discussions/2027\n setGlobals(mapboxgl, props);\n if (!mapboxgl.supported || mapboxgl.supported(props)) {\n if (props.reuseMaps) {\n mapbox = Mapbox.reuse(props, containerRef.current);\n }\n if (!mapbox) {\n mapbox = new Mapbox(mapboxgl.Map, props, containerRef.current);\n }\n contextValue.map = createRef(mapbox);\n contextValue.mapLib = mapboxgl;\n setMapInstance(mapbox);\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapMount(contextValue.map, props.id);\n }\n else {\n throw new Error('Map is not supported by this browser');\n }\n })\n .catch(error => {\n const { onError } = props;\n if (onError) {\n onError({\n type: 'error',\n target: null,\n originalEvent: null,\n error\n });\n }\n else {\n console.error(error); // eslint-disable-line\n }\n });\n return () => {\n isMounted = false;\n if (mapbox) {\n mountedMapsContext === null || mountedMapsContext === void 0 ? void 0 : mountedMapsContext.onMapUnmount(props.id);\n if (props.reuseMaps) {\n mapbox.recycle();\n }\n else {\n mapbox.destroy();\n }\n }\n };\n }, []);\n useIsomorphicLayoutEffect(() => {\n if (mapInstance) {\n mapInstance.setProps(props);\n }\n });\n useImperativeHandle(ref, () => contextValue.map, [mapInstance]);\n const style = useMemo(() => ({\n position: 'relative',\n width: '100%',\n height: '100%',\n ...props.style\n }), [props.style]);\n const CHILD_CONTAINER_STYLE = {\n height: '100%'\n };\n return (React.createElement(\"div\", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(MapContext.Provider, { value: contextValue },\n React.createElement(\"div\", { \"mapboxgl-children\": \"\", style: CHILD_CONTAINER_STYLE }, props.children)))));\n}\n//# sourceMappingURL=map.js.map"],"names":["MapContext","React","Map","props","ref","defaultLib","mountedMapsContext","useContext","MountedMapsContext","mapInstance","setMapInstance","useState","containerRef","useRef","contextValue","useEffect","mapLib","isMounted","mapbox","module","mapboxgl","setGlobals","Mapbox","createRef","error","onError","useIsomorphicLayoutEffect","useImperativeHandle","style","useMemo","CHILD_CONTAINER_STYLE"],"mappings":";;;;;;;AAOa,MAAAA,IAAaC,EAAM,cAAc,IAAI;AAC1B,SAAAC,EAAIC,GAAOC,GAAKC,GAAY;AAC1C,QAAAC,IAAqBC,EAAWC,CAAkB,GAClD,CAACC,GAAaC,CAAc,IAAIC,EAAS,IAAI,GAC7CC,IAAeC,KACf,EAAE,SAASC,EAAA,IAAiBD,EAAO,EAAE,QAAQ,MAAM,KAAK,KAAA,CAAM;AACpE,EAAAE,EAAU,MAAM;AACZ,UAAMC,IAASb,EAAM;AACrB,QAAIc,IAAY,IACZC;AACJ,mBAAQ,QAAQF,KAAUX,CAAU,EAC/B,KAAK,CAACc,MAAW;AAClB,UAAI,CAACF;AACD;AAEJ,UAAI,CAACE;AACK,cAAA,IAAI,MAAM,gBAAgB;AAEpC,YAAMC,IAAW,SAASD,IAASA,IAASA,EAAO;AAC/C,UAAA,CAACC,EAAS;AACJ,cAAA,IAAI,MAAM,gBAA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AAgB,EAAgB,GAAAnB,KAAgBR,EAAM;AAAA,IAAcD,EAAW;AAAA,IAAU,EAAE,OAAOc,EAAa;AAAA,IACjKb,EAAM,cAAc,OAAO,EAAE,qBAAqB,IAAI,OAAO6B,EAAA,GAAyB3B,EAAM,QAAQ;AAAA,EAAA,CAAG;AAC/G;","x_google_ignoreList":[0]}
@@ -1,5 +1,49 @@
1
- var a = { exports: {} };
2
- export {
3
- a as __module
4
- };
1
+ import * as k from "react";
2
+ import { memo as A, forwardRef as P, useContext as C, useRef as D, useMemo as M, useEffect as h, useImperativeHandle as y } from "react";
3
+ import { createPortal as w } from "react-dom";
4
+ import { applyReactStyle as x } from "./index.es188.js";
5
+ import { MapContext as O } from "./index.es66.js";
6
+ import { arePointsEqual as S } from "./index.es189.js";
7
+ function q(o, E) {
8
+ const { map: R, mapLib: b } = C(O), i = D({ props: o });
9
+ i.current.props = o;
10
+ const t = M(() => {
11
+ let L = !1;
12
+ k.Children.forEach(o.children, (a) => {
13
+ a && (L = !0);
14
+ });
15
+ const _ = {
16
+ ...o,
17
+ element: L ? document.createElement("div") : null
18
+ }, l = new b.Marker(_);
19
+ return l.setLngLat([o.longitude, o.latitude]), l.getElement().addEventListener("click", (a) => {
20
+ var n, e;
21
+ (e = (n = i.current.props).onClick) === null || e === void 0 || e.call(n, {
22
+ type: "click",
23
+ target: l,
24
+ originalEvent: a
25
+ });
26
+ }), l.on("dragstart", (a) => {
27
+ var n, e;
28
+ const r = a;
29
+ r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDragStart) === null || e === void 0 || e.call(n, r);
30
+ }), l.on("drag", (a) => {
31
+ var n, e;
32
+ const r = a;
33
+ r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDrag) === null || e === void 0 || e.call(n, r);
34
+ }), l.on("dragend", (a) => {
35
+ var n, e;
36
+ const r = a;
37
+ r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDragEnd) === null || e === void 0 || e.call(n, r);
38
+ }), l;
39
+ }, []);
40
+ h(() => (t.addTo(R.getMap()), () => {
41
+ t.remove();
42
+ }), []);
43
+ const { longitude: c, latitude: s, offset: g, style: m, draggable: u = !1, popup: d = null, rotation: f = 0, rotationAlignment: v = "auto", pitchAlignment: p = "auto" } = o;
44
+ return h(() => {
45
+ x(t.getElement(), m);
46
+ }, [m]), y(E, () => t, []), (t.getLngLat().lng !== c || t.getLngLat().lat !== s) && t.setLngLat([c, s]), g && !S(t.getOffset(), g) && t.setOffset(g), t.isDraggable() !== u && t.setDraggable(u), t.getRotation() !== f && t.setRotation(f), t.getRotationAlignment() !== v && t.setRotationAlignment(v), t.getPitchAlignment() !== p && t.setPitchAlignment(p), t.getPopup() !== d && t.setPopup(d), w(o.children, t.getElement());
47
+ }
48
+ A(P(q));
5
49
  //# sourceMappingURL=index.es67.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es67.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.es67.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/marker.js"],"sourcesContent":["/* global document */\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { useImperativeHandle, useEffect, useMemo, useRef, useContext, forwardRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport { MapContext } from './map';\nimport { arePointsEqual } from '../utils/deep-equal';\n/* eslint-disable complexity,max-statements */\nfunction Marker(props, ref) {\n const { map, mapLib } = useContext(MapContext);\n const thisRef = useRef({ props });\n thisRef.current.props = props;\n const marker = useMemo(() => {\n let hasChildren = false;\n React.Children.forEach(props.children, el => {\n if (el) {\n hasChildren = true;\n }\n });\n const options = {\n ...props,\n element: hasChildren ? document.createElement('div') : null\n };\n const mk = new mapLib.Marker(options);\n mk.setLngLat([props.longitude, props.latitude]);\n mk.getElement().addEventListener('click', (e) => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, {\n type: 'click',\n target: mk,\n originalEvent: e\n });\n });\n mk.on('dragstart', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDragStart) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n mk.on('drag', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDrag) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n mk.on('dragend', e => {\n var _a, _b;\n const evt = e;\n evt.lngLat = marker.getLngLat();\n (_b = (_a = thisRef.current.props).onDragEnd) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n });\n return mk;\n }, []);\n useEffect(() => {\n marker.addTo(map.getMap());\n return () => {\n marker.remove();\n };\n }, []);\n const { longitude, latitude, offset, style, draggable = false, popup = null, rotation = 0, rotationAlignment = 'auto', pitchAlignment = 'auto' } = props;\n useEffect(() => {\n applyReactStyle(marker.getElement(), style);\n }, [style]);\n useImperativeHandle(ref, () => marker, []);\n if (marker.getLngLat().lng !== longitude || marker.getLngLat().lat !== latitude) {\n marker.setLngLat([longitude, latitude]);\n }\n if (offset && !arePointsEqual(marker.getOffset(), offset)) {\n marker.setOffset(offset);\n }\n if (marker.isDraggable() !== draggable) {\n marker.setDraggable(draggable);\n }\n if (marker.getRotation() !== rotation) {\n marker.setRotation(rotation);\n }\n if (marker.getRotationAlignment() !== rotationAlignment) {\n marker.setRotationAlignment(rotationAlignment);\n }\n if (marker.getPitchAlignment() !== pitchAlignment) {\n marker.setPitchAlignment(pitchAlignment);\n }\n if (marker.getPopup() !== popup) {\n marker.setPopup(popup);\n }\n return createPortal(props.children, marker.getElement());\n}\nexport default memo(forwardRef(Marker));\n//# sourceMappingURL=marker.js.map"],"names":["Marker","props","ref","map","mapLib","useContext","MapContext","thisRef","useRef","marker","useMemo","hasChildren","React","el","options","mk","e","_a","_b","evt","useEffect","longitude","latitude","offset","style","draggable","popup","rotation","rotationAlignment","pitchAlignment","applyReactStyle","useImperativeHandle","arePoints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tBjB,EAAO,SAASiB,CAAK,GAElBO,EAAahC,EAAM,UAAUQ,EAAO,WAAY,CAAA;AAC3D;AACeyB,EAAKC,EAAWnC,CAAM,CAAC;","x_google_ignoreList":[0]}
@@ -1,58 +1,40 @@
1
- import * as l from "react";
2
- import { useContext as b, useState as E, useRef as c, useEffect as x, useImperativeHandle as w, useMemo as y } from "react";
3
- import { MountedMapsContext as L } from "./index.es76.js";
4
- import m from "./index.es184.js";
5
- import I from "./index.es185.js";
6
- import C from "./index.es186.js";
7
- import g from "./index.es187.js";
8
- const R = l.createContext(null);
9
- function A(e, f, d) {
10
- const o = b(L), [i, p] = E(null), s = c(), { current: a } = c({ mapLib: null, map: null });
11
- x(() => {
12
- const v = e.mapLib;
13
- let u = !0, n;
14
- return Promise.resolve(v || d).then((r) => {
15
- if (!u)
16
- return;
17
- if (!r)
18
- throw new Error("Invalid mapLib");
19
- const t = "Map" in r ? r : r.default;
20
- if (!t.Map)
21
- throw new Error("Invalid mapLib");
22
- if (g(t, e), !t.supported || t.supported(e))
23
- e.reuseMaps && (n = m.reuse(e, s.current)), n || (n = new m(t.Map, e, s.current)), a.map = I(n), a.mapLib = t, p(n), o == null || o.onMapMount(a.map, e.id);
24
- else
25
- throw new Error("Map is not supported by this browser");
26
- }).catch((r) => {
27
- const { onError: t } = e;
28
- t ? t({
29
- type: "error",
30
- target: null,
31
- originalEvent: null,
32
- error: r
33
- }) : console.error(r);
34
- }), () => {
35
- u = !1, n && (o == null || o.onMapUnmount(e.id), e.reuseMaps ? n.recycle() : n.destroy());
1
+ import { createPortal as h } from "react-dom";
2
+ import { memo as L, forwardRef as v, useContext as C, useMemo as f, useRef as x, useEffect as m, useImperativeHandle as N } from "react";
3
+ import { applyReactStyle as M } from "./index.es188.js";
4
+ import { MapContext as O } from "./index.es66.js";
5
+ import { deepEqual as y } from "./index.es189.js";
6
+ function r(t) {
7
+ return new Set(t ? t.trim().split(/\s+/) : []);
8
+ }
9
+ function E(t, u) {
10
+ const { map: d, mapLib: g } = C(O), c = f(() => document.createElement("div"), []), i = x({ props: t });
11
+ i.current.props = t;
12
+ const e = f(() => {
13
+ const a = { ...t }, o = new g.Popup(a);
14
+ return o.setLngLat([t.longitude, t.latitude]), o.once("open", (n) => {
15
+ var s, l;
16
+ (l = (s = i.current.props).onOpen) === null || l === void 0 || l.call(s, n);
17
+ }), o;
18
+ }, []);
19
+ if (m(() => {
20
+ const a = (o) => {
21
+ var n, s;
22
+ (s = (n = i.current.props).onClose) === null || s === void 0 || s.call(n, o);
23
+ };
24
+ return e.on("close", a), e.setDOMContent(c).addTo(d.getMap()), () => {
25
+ e.off("close", a), e.isOpen() && e.remove();
36
26
  };
37
- }, []), C(() => {
38
- i && i.setProps(e);
39
- }), w(f, () => a.map, [i]);
40
- const M = y(() => ({
41
- position: "relative",
42
- width: "100%",
43
- height: "100%",
44
- ...e.style
45
- }), [e.style]), h = {
46
- height: "100%"
47
- };
48
- return l.createElement("div", { id: e.id, ref: s, style: M }, i && l.createElement(
49
- R.Provider,
50
- { value: a },
51
- l.createElement("div", { "mapboxgl-children": "", style: h }, e.children)
52
- ));
27
+ }, []), m(() => {
28
+ M(e.getElement(), t.style);
29
+ }, [t.style]), N(u, () => e, []), e.isOpen() && ((e.getLngLat().lng !== t.longitude || e.getLngLat().lat !== t.latitude) && e.setLngLat([t.longitude, t.latitude]), t.offset && !y(e.options.offset, t.offset) && e.setOffset(t.offset), (e.options.anchor !== t.anchor || e.options.maxWidth !== t.maxWidth) && (e.options.anchor = t.anchor, e.setMaxWidth(t.maxWidth)), e.options.className !== t.className)) {
30
+ const a = r(e.options.className), o = r(t.className);
31
+ for (const n of a)
32
+ o.has(n) || e.removeClassName(n);
33
+ for (const n of o)
34
+ a.has(n) || e.addClassName(n);
35
+ e.options.className = t.className;
36
+ }
37
+ return h(t.children, c);
53
38
  }
54
- export {
55
- R as MapContext,
56
- A as default
57
- };
39
+ L(v(E));
58
40
  //# sourceMappingURL=index.es68.js.map