@performant-software/geospatial 3.0.6-beta.14 → 3.0.6-beta.15

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 (123) 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.cjs17.js +1 -1
  5. package/dist/index.cjs19.js +1 -1
  6. package/dist/index.cjs21.js +1 -1
  7. package/dist/index.cjs211.js +1 -1
  8. package/dist/index.cjs212.js +1 -1
  9. package/dist/index.cjs213.js +1 -1
  10. package/dist/index.cjs22.js +1 -1
  11. package/dist/index.cjs231.js +1 -1
  12. package/dist/index.cjs237.js +1 -1
  13. package/dist/index.cjs237.js.map +1 -1
  14. package/dist/index.cjs238.js +1 -1
  15. package/dist/index.cjs238.js.map +1 -1
  16. package/dist/index.cjs246.js +1 -1
  17. package/dist/index.cjs251.js +1 -1
  18. package/dist/index.cjs254.js +1 -1
  19. package/dist/index.cjs258.js +1 -1
  20. package/dist/index.cjs258.js.map +1 -1
  21. package/dist/index.cjs259.js +1 -1
  22. package/dist/index.cjs259.js.map +1 -1
  23. package/dist/index.cjs52.js +1 -1
  24. package/dist/index.cjs60.js +1 -1
  25. package/dist/index.cjs61.js +9 -1
  26. package/dist/index.cjs61.js.map +1 -1
  27. package/dist/index.cjs62.js +19 -1
  28. package/dist/index.cjs62.js.map +1 -1
  29. package/dist/index.cjs63.js +1 -9
  30. package/dist/index.cjs63.js.map +1 -1
  31. package/dist/index.cjs64.js +1 -19
  32. package/dist/index.cjs64.js.map +1 -1
  33. package/dist/index.cjs66.js +1 -1
  34. package/dist/index.cjs66.js.map +1 -1
  35. package/dist/index.cjs67.js +1 -1
  36. package/dist/index.cjs67.js.map +1 -1
  37. package/dist/index.cjs68.js +1 -1
  38. package/dist/index.cjs68.js.map +1 -1
  39. package/dist/index.cjs69.js +1 -1
  40. package/dist/index.cjs69.js.map +1 -1
  41. package/dist/index.cjs70.js +1 -1
  42. package/dist/index.cjs70.js.map +1 -1
  43. package/dist/index.cjs71.js +1 -1
  44. package/dist/index.cjs71.js.map +1 -1
  45. package/dist/index.cjs72.js +1 -1
  46. package/dist/index.cjs72.js.map +1 -1
  47. package/dist/index.cjs73.js +1 -1
  48. package/dist/index.cjs73.js.map +1 -1
  49. package/dist/index.cjs74.js +1 -1
  50. package/dist/index.cjs74.js.map +1 -1
  51. package/dist/index.cjs75.js +1 -1
  52. package/dist/index.cjs75.js.map +1 -1
  53. package/dist/index.cjs76.js +1 -1
  54. package/dist/index.cjs76.js.map +1 -1
  55. package/dist/index.cjs78.js +1 -1
  56. package/dist/index.cjs79.js +1 -1
  57. package/dist/index.cjs80.js +1 -1
  58. package/dist/index.cjs80.js.map +1 -1
  59. package/dist/index.cjs81.js +1 -1
  60. package/dist/index.cjs81.js.map +1 -1
  61. package/dist/index.es14.js +2 -2
  62. package/dist/index.es15.js +5 -5
  63. package/dist/index.es16.js +1 -1
  64. package/dist/index.es17.js +3 -3
  65. package/dist/index.es19.js +1 -1
  66. package/dist/index.es21.js +2 -2
  67. package/dist/index.es211.js +1 -1
  68. package/dist/index.es212.js +1 -1
  69. package/dist/index.es213.js +1 -1
  70. package/dist/index.es22.js +2 -2
  71. package/dist/index.es231.js +1 -1
  72. package/dist/index.es237.js +4 -6
  73. package/dist/index.es237.js.map +1 -1
  74. package/dist/index.es238.js +6 -4
  75. package/dist/index.es238.js.map +1 -1
  76. package/dist/index.es246.js +1 -1
  77. package/dist/index.es251.js +1 -1
  78. package/dist/index.es254.js +1 -1
  79. package/dist/index.es258.js +15 -4
  80. package/dist/index.es258.js.map +1 -1
  81. package/dist/index.es259.js +4 -15
  82. package/dist/index.es259.js.map +1 -1
  83. package/dist/index.es52.js +5 -5
  84. package/dist/index.es60.js +2 -6
  85. package/dist/index.es60.js.map +1 -1
  86. package/dist/index.es61.js +30 -2
  87. package/dist/index.es61.js.map +1 -1
  88. package/dist/index.es62.js +602 -2
  89. package/dist/index.es62.js.map +1 -1
  90. package/dist/index.es63.js +5 -29
  91. package/dist/index.es63.js.map +1 -1
  92. package/dist/index.es64.js +2 -602
  93. package/dist/index.es64.js.map +1 -1
  94. package/dist/index.es66.js +53 -105
  95. package/dist/index.es66.js.map +1 -1
  96. package/dist/index.es67.js +48 -12
  97. package/dist/index.es67.js.map +1 -1
  98. package/dist/index.es68.js +37 -55
  99. package/dist/index.es68.js.map +1 -1
  100. package/dist/index.es69.js +11 -47
  101. package/dist/index.es69.js.map +1 -1
  102. package/dist/index.es70.js +14 -38
  103. package/dist/index.es70.js.map +1 -1
  104. package/dist/index.es71.js +29 -11
  105. package/dist/index.es71.js.map +1 -1
  106. package/dist/index.es72.js +10 -10
  107. package/dist/index.es72.js.map +1 -1
  108. package/dist/index.es73.js +13 -29
  109. package/dist/index.es73.js.map +1 -1
  110. package/dist/index.es74.js +10 -12
  111. package/dist/index.es74.js.map +1 -1
  112. package/dist/index.es75.js +4 -14
  113. package/dist/index.es75.js.map +1 -1
  114. package/dist/index.es76.js +2 -11
  115. package/dist/index.es76.js.map +1 -1
  116. package/dist/index.es78.js +1 -1
  117. package/dist/index.es79.js +1 -1
  118. package/dist/index.es80.js +107 -2
  119. package/dist/index.es80.js.map +1 -1
  120. package/dist/index.es81.js +10 -2
  121. package/dist/index.es81.js.map +1 -1
  122. package/dist/style.css +1 -1
  123. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.es68.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,gBAAgB;AAKpC,UADAC,EAAWD,GAAUjB,CAAK,GACtB,CAACiB,EAAS,aAAaA,EAAS,UAAUjB,CAAK;AAC/C,QAAIA,EAAM,cACNe,IAASI,EAAO,MAAMnB,GAAOS,EAAa,OAAO,IAEhDM,MACDA,IAAS,IAAII,EAAOF,EAAS,KAAKjB,GAAOS,EAAa,OAAO,IAEpDE,EAAA,MAAMS,EAAUL,CAAM,GACnCJ,EAAa,SAASM,GACtBV,EAAeQ,CAAM,GACEZ,KAAA,QAAiDA,EAAmB,WAAWQ,EAAa,KAAKX,EAAM,EAAE;AAAA;AAG1H,cAAA,IAAI,MAAM,sCAAsC;AAAA,IAC1D,CACH,EACI,MAAM,CAASqB,MAAA;AACV,YAAA,EAAE,SAAAC,EAAY,IAAAtB;AACpB,MAAIsB,IACQA,EAAA;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,eAAe;AAAA,QACf,OAAAD;AAAA,MAAA,CACH,IAGD,QAAQ,MAAMA,CAAK;AAAA,IACvB,CACH,GACM,MAAM;AACG,MAAAP,IAAA,IACRC,MACAZ,KAAuB,QAAiDA,EAAmB,aAAaH,EAAM,EAAE,GAC5GA,EAAM,YACNe,EAAO,QAAQ,IAGfA,EAAO,QAAQ;AAAA,IAEvB;AAAA,EAER,GAAG,CAAE,CAAA,GACLQ,EAA0B,MAAM;AAC5B,IAAIjB,KACAA,EAAY,SAASN,CAAK;AAAA,EAC9B,CACH,GACDwB,EAAoBvB,GAAK,MAAMU,EAAa,KAAK,CAACL,CAAW,CAAC;AACxD,QAAAmB,IAAQC,EAAQ,OAAO;AAAA,IACzB,UAAU;AAAA,IACV,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,GAAG1B,EAAM;AAAA,EACT,IAAA,CAACA,EAAM,KAAK,CAAC,GACX2B,IAAwB;AAAA,IAC1B,QAAQ;AAAA,EAAA;AAEZ,SAAQ7B,EAAM,cAAc,OAAO,EAAE,IAAIE,EAAM,IAAI,KAAKS,GAAc,OAAAgB,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
+ {"version":3,"file":"index.es68.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/popup.js"],"sourcesContent":["import { 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 { deepEqual } from '../utils/deep-equal';\n// Adapted from https://github.com/mapbox/mapbox-gl-js/blob/v1.13.0/src/ui/popup.js\nfunction getClassList(className) {\n return new Set(className ? className.trim().split(/\\s+/) : []);\n}\n/* eslint-disable complexity,max-statements */\nfunction Popup(props, ref) {\n const { map, mapLib } = useContext(MapContext);\n const container = useMemo(() => {\n return document.createElement('div');\n }, []);\n const thisRef = useRef({ props });\n thisRef.current.props = props;\n const popup = useMemo(() => {\n const options = { ...props };\n const pp = new mapLib.Popup(options);\n pp.setLngLat([props.longitude, props.latitude]);\n pp.once('open', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onOpen) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n return pp;\n }, []);\n useEffect(() => {\n const onClose = e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n };\n popup.on('close', onClose);\n popup.setDOMContent(container).addTo(map.getMap());\n return () => {\n // https://github.com/visgl/react-map-gl/issues/1825\n // onClose should not be fired if the popup is removed by unmounting\n // When using React strict mode, the component is mounted twice.\n // Firing the onClose callback here would be a false signal to remove the component.\n popup.off('close', onClose);\n if (popup.isOpen()) {\n popup.remove();\n }\n };\n }, []);\n useEffect(() => {\n applyReactStyle(popup.getElement(), props.style);\n }, [props.style]);\n useImperativeHandle(ref, () => popup, []);\n if (popup.isOpen()) {\n if (popup.getLngLat().lng !== props.longitude || popup.getLngLat().lat !== props.latitude) {\n popup.setLngLat([props.longitude, props.latitude]);\n }\n if (props.offset && !deepEqual(popup.options.offset, props.offset)) {\n popup.setOffset(props.offset);\n }\n if (popup.options.anchor !== props.anchor || popup.options.maxWidth !== props.maxWidth) {\n popup.options.anchor = props.anchor;\n popup.setMaxWidth(props.maxWidth);\n }\n if (popup.options.className !== props.className) {\n const prevClassList = getClassList(popup.options.className);\n const nextClassList = getClassList(props.className);\n for (const c of prevClassList) {\n if (!nextClassList.has(c)) {\n popup.removeClassName(c);\n }\n }\n for (const c of nextClassList) {\n if (!prevClassList.has(c)) {\n popup.addClassName(c);\n }\n }\n popup.options.className = props.className;\n }\n }\n return createPortal(props.children, container);\n}\nexport default memo(forwardRef(Popup));\n//# sourceMappingURL=popup.js.map"],"names":["getClassList","className","Popup","props","ref","map","mapLib","useContext","MapContext","container","useMemo","thisRef","useRef","popup","options","pp","e","_a","_b","useEffect","onClose","applyReactStyle","useImperativeHandle","deepEqual","prevClassList","nextClassList","c","createPortal","memo","forwardRef"],"mappings":";;;;;AAMA,SAASA,EAAaC,GAAW;AACtB,SAAA,IAAI,IAAIA,IAAYA,EAAU,OAAO,MAAM,KAAK,IAAI,CAAA,CAAE;AACjE;AAEA,SAASC,EAAMC,GAAOC,GAAK;AACvB,QAAM,EAAE,KAAAC,GAAK,QAAAC,EAAO,IAAIC,EAAWC,CAAU,GACvCC,IAAYC,EAAQ,MACf,SAAS,cAAc,KAAK,GACpC,CAAE,CAAA,GACCC,IAAUC,EAAO,EAAE,OAAAT,EAAO,CAAA;AAChC,EAAAQ,EAAQ,QAAQ,QAAQR;AAClB,QAAAU,IAAQH,EAAQ,MAAM;AAClB,UAAAI,IAAU,EAAE,GAAGX,KACfY,IAAK,IAAIT,EAAO,MAAMQ,CAAO;AACnC,WAAAC,EAAG,UAAU,CAACZ,EAAM,WAAWA,EAAM,QAAQ,CAAC,GAC3CY,EAAA,KAAK,QAAQ,CAAKC,MAAA;AACjB,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKN,EAAQ,QAAQ,OAAO,YAAY,QAAQO,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA,CAChG,GACMD;AAAA,EACX,GAAG,CAAE,CAAA;AAuBD,MAtBJI,EAAU,MAAM;AACZ,UAAMC,IAAU,CAAKJ,MAAA;AACjB,UAAIC,GAAIC;AACR,OAACA,KA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UM,CAAS;AACjD;AACemB,EAAKC,EAAW3B,CAAK,CAAC;","x_google_ignoreList":[0]}
@@ -1,49 +1,13 @@
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.es68.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());
1
+ import { memo as i, useEffect as r } from "react";
2
+ import { applyReactStyle as e } from "./index.es188.js";
3
+ import l from "./index.es16.js";
4
+ function m(t) {
5
+ const o = l(({ mapLib: n }) => new n.AttributionControl(t), {
6
+ position: t.position
7
+ });
8
+ return r(() => {
9
+ e(o._container, t.style);
10
+ }, [t.style]), null;
47
11
  }
48
- A(P(q));
12
+ i(m);
49
13
  //# sourceMappingURL=index.es69.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es69.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","arePointsEqual","createPortal","memo","forwardRef"],"mappings":";;;;;;AAQA,SAASA,EAAOC,GAAOC,GAAK;AACxB,QAAM,EAAE,KAAAC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,EAAWnC,CAAM,CAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es69.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/attribution-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction AttributionControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.AttributionControl(props), {\n position: props.position\n });\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(AttributionControl);\n//# sourceMappingURL=attribution-control.js.map"],"names":["AttributionControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","memo"],"mappings":";;;AAGA,SAASA,EAAmBC,GAAO;AACzB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,mBAAmBH,CAAK,GAAG;AAAA,IAC1E,UAAUA,EAAM;AAAA,EAAA,CACnB;AACD,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,YAAYD,EAAM,KAAK;AAAA,EAAA,GAC7C,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACeM,EAAKP,CAAkB;","x_google_ignoreList":[0]}
@@ -1,40 +1,16 @@
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.es68.js";
5
- import { deepEqual as y } from "./index.es189.js";
6
- function r(t) {
7
- return new Set(t ? t.trim().split(/\s+/) : []);
1
+ import { memo as o, useEffect as l } from "react";
2
+ import { applyReactStyle as r } from "./index.es188.js";
3
+ import c from "./index.es16.js";
4
+ function i(t) {
5
+ const n = c(({ mapLib: e }) => new e.FullscreenControl({
6
+ container: t.containerId && document.getElementById(t.containerId)
7
+ }), { position: t.position });
8
+ return l(() => {
9
+ r(n._controlContainer, t.style);
10
+ }, [t.style]), null;
8
11
  }
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();
26
- };
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);
38
- }
39
- L(v(E));
12
+ const s = o(i);
13
+ export {
14
+ s as default
15
+ };
40
16
  //# sourceMappingURL=index.es70.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es70.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/popup.js"],"sourcesContent":["import { 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 { deepEqual } from '../utils/deep-equal';\n// Adapted from https://github.com/mapbox/mapbox-gl-js/blob/v1.13.0/src/ui/popup.js\nfunction getClassList(className) {\n return new Set(className ? className.trim().split(/\\s+/) : []);\n}\n/* eslint-disable complexity,max-statements */\nfunction Popup(props, ref) {\n const { map, mapLib } = useContext(MapContext);\n const container = useMemo(() => {\n return document.createElement('div');\n }, []);\n const thisRef = useRef({ props });\n thisRef.current.props = props;\n const popup = useMemo(() => {\n const options = { ...props };\n const pp = new mapLib.Popup(options);\n pp.setLngLat([props.longitude, props.latitude]);\n pp.once('open', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onOpen) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n return pp;\n }, []);\n useEffect(() => {\n const onClose = e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n };\n popup.on('close', onClose);\n popup.setDOMContent(container).addTo(map.getMap());\n return () => {\n // https://github.com/visgl/react-map-gl/issues/1825\n // onClose should not be fired if the popup is removed by unmounting\n // When using React strict mode, the component is mounted twice.\n // Firing the onClose callback here would be a false signal to remove the component.\n popup.off('close', onClose);\n if (popup.isOpen()) {\n popup.remove();\n }\n };\n }, []);\n useEffect(() => {\n applyReactStyle(popup.getElement(), props.style);\n }, [props.style]);\n useImperativeHandle(ref, () => popup, []);\n if (popup.isOpen()) {\n if (popup.getLngLat().lng !== props.longitude || popup.getLngLat().lat !== props.latitude) {\n popup.setLngLat([props.longitude, props.latitude]);\n }\n if (props.offset && !deepEqual(popup.options.offset, props.offset)) {\n popup.setOffset(props.offset);\n }\n if (popup.options.anchor !== props.anchor || popup.options.maxWidth !== props.maxWidth) {\n popup.options.anchor = props.anchor;\n popup.setMaxWidth(props.maxWidth);\n }\n if (popup.options.className !== props.className) {\n const prevClassList = getClassList(popup.options.className);\n const nextClassList = getClassList(props.className);\n for (const c of prevClassList) {\n if (!nextClassList.has(c)) {\n popup.removeClassName(c);\n }\n }\n for (const c of nextClassList) {\n if (!prevClassList.has(c)) {\n popup.addClassName(c);\n }\n }\n popup.options.className = props.className;\n }\n }\n return createPortal(props.children, container);\n}\nexport default memo(forwardRef(Popup));\n//# sourceMappingURL=popup.js.map"],"names":["getClassList","className","Popup","props","ref","map","mapLib","useContext","MapContext","container","useMemo","thisRef","useRef","popup","options","pp","e","_a","_b","useEffect","onClose","applyReactStyle","useImperativeHandle","deepEqual","prevClassList","nextClassList","c","createPortal","memo","forwardRef"],"mappings":";;;;;AAMA,SAASA,EAAaC,GAAW;AACtB,SAAA,IAAI,IAAIA,IAAYA,EAAU,OAAO,MAAM,KAAK,IAAI,CAAA,CAAE;AACjE;AAEA,SAASC,EAAMC,GAAOC,GAAK;AACvB,QAAM,EAAE,KAAAC,GAAK,QAAAC,EAAO,IAAIC,EAAWC,CAAU,GACvCC,IAAYC,EAAQ,MACf,SAAS,cAAc,KAAK,GACpC,CAAE,CAAA,GACCC,IAAUC,EAAO,EAAE,OAAAT,EAAO,CAAA;AAChC,EAAAQ,EAAQ,QAAQ,QAAQR;AAClB,QAAAU,IAAQH,EAAQ,MAAM;AAClB,UAAAI,IAAU,EAAE,GAAGX,KACfY,IAAK,IAAIT,EAAO,MAAMQ,CAAO;AACnC,WAAAC,EAAG,UAAU,CAACZ,EAAM,WAAWA,EAAM,QAAQ,CAAC,GAC3CY,EAAA,KAAK,QAAQ,CAAKC,MAAA;AACjB,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKN,EAAQ,QAAQ,OAAO,YAAY,QAAQO,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA,CAChG,GACMD;AAAA,EACX,GAAG,CAAE,CAAA;AAuBD,MAtBJI,EAAU,MAAM;AACZ,UAAMC,IAAU,CAAKJ,MAAA;AACjB,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKN,EAAQ,QAAQ,OAAO,aAAa,QAAQO,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA;AAE5F,WAAAH,EAAA,GAAG,SAASO,CAAO,GACzBP,EAAM,cAAcJ,CAAS,EAAE,MAAMJ,EAAI,QAAQ,GAC1C,MAAM;AAKH,MAAAQ,EAAA,IAAI,SAASO,CAAO,GACtBP,EAAM,YACNA,EAAM,OAAO;AAAA,IACjB;AAAA,EAER,GAAG,CAAE,CAAA,GACLM,EAAU,MAAM;AACZ,IAAAE,EAAgBR,EAAM,WAAc,GAAAV,EAAM,KAAK;AAAA,EAAA,GAChD,CAACA,EAAM,KAAK,CAAC,GAChBmB,EAAoBlB,GAAK,MAAMS,GAAO,CAAE,CAAA,GACpCA,EAAM,cACFA,EAAM,YAAY,QAAQV,EAAM,aAAaU,EAAM,UAAU,EAAE,QAAQV,EAAM,aAC7EU,EAAM,UAAU,CAACV,EAAM,WAAWA,EAAM,QAAQ,CAAC,GAEjDA,EAAM,UAAU,CAACoB,EAAUV,EAAM,QAAQ,QAAQV,EAAM,MAAM,KACvDU,EAAA,UAAUV,EAAM,MAAM,IAE5BU,EAAM,QAAQ,WAAWV,EAAM,UAAUU,EAAM,QAAQ,aAAaV,EAAM,cACpEU,EAAA,QAAQ,SAASV,EAAM,QACvBU,EAAA,YAAYV,EAAM,QAAQ,IAEhCU,EAAM,QAAQ,cAAcV,EAAM,YAAW;AAC7C,UAAMqB,IAAgBxB,EAAaa,EAAM,QAAQ,SAAS,GACpDY,IAAgBzB,EAAaG,EAAM,SAAS;AAClD,eAAWuB,KAAKF;AACZ,MAAKC,EAAc,IAAIC,CAAC,KACpBb,EAAM,gBAAgBa,CAAC;AAG/B,eAAWA,KAAKD;AACZ,MAAKD,EAAc,IAAIE,CAAC,KACpBb,EAAM,aAAaa,CAAC;AAGtB,IAAAb,EAAA,QAAQ,YAAYV,EAAM;AAAA,EACpC;AAEG,SAAAwB,EAAaxB,EAAM,UAAUM,CAAS;AACjD;AACemB,EAAKC,EAAW3B,CAAK,CAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es70.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/fullscreen-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction FullscreenControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.FullscreenControl({\n container: props.containerId && document.getElementById(props.containerId)\n }), { position: props.position });\n useEffect(() => {\n applyReactStyle(ctrl._controlContainer, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(FullscreenControl);\n//# sourceMappingURL=fullscreen-control.js.map"],"names":["FullscreenControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","_FullscreenControl","memo"],"mappings":";;;AAGA,SAASA,EAAkBC,GAAO;AACxB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,kBAAkB;AAAA,IACjE,WAAWH,EAAM,eAAe,SAAS,eAAeA,EAAM,WAAW;AAAA,EAC5E,CAAA,GAAG,EAAE,UAAUA,EAAM,SAAU,CAAA;AAChC,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,mBAAmBD,EAAM,KAAK;AAAA,EAAA,GACpD,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACA,MAAeM,IAAAC,EAAKR,CAAiB;","x_google_ignoreList":[0]}
@@ -1,13 +1,31 @@
1
- import { memo as i, useEffect as r } from "react";
2
- import { applyReactStyle as e } from "./index.es188.js";
3
- import l from "./index.es16.js";
4
- function m(t) {
5
- const o = l(({ mapLib: n }) => new n.AttributionControl(t), {
6
- position: t.position
7
- });
8
- return r(() => {
9
- e(o._container, t.style);
10
- }, [t.style]), null;
1
+ import { memo as s, forwardRef as d, useRef as v, useImperativeHandle as _, useEffect as f } from "react";
2
+ import { applyReactStyle as p } from "./index.es188.js";
3
+ import m from "./index.es16.js";
4
+ function b(e, c) {
5
+ const a = v({ props: e }), l = m(({ mapLib: i }) => {
6
+ const n = new i.GeolocateControl(e), u = n._setupUI;
7
+ return n._setupUI = (t) => {
8
+ n._container.hasChildNodes() || u(t);
9
+ }, n.on("geolocate", (t) => {
10
+ var r, o;
11
+ (o = (r = a.current.props).onGeolocate) === null || o === void 0 || o.call(r, t);
12
+ }), n.on("error", (t) => {
13
+ var r, o;
14
+ (o = (r = a.current.props).onError) === null || o === void 0 || o.call(r, t);
15
+ }), n.on("outofmaxbounds", (t) => {
16
+ var r, o;
17
+ (o = (r = a.current.props).onOutOfMaxBounds) === null || o === void 0 || o.call(r, t);
18
+ }), n.on("trackuserlocationstart", (t) => {
19
+ var r, o;
20
+ (o = (r = a.current.props).onTrackUserLocationStart) === null || o === void 0 || o.call(r, t);
21
+ }), n.on("trackuserlocationend", (t) => {
22
+ var r, o;
23
+ (o = (r = a.current.props).onTrackUserLocationEnd) === null || o === void 0 || o.call(r, t);
24
+ }), n;
25
+ }, { position: e.position });
26
+ return a.current.props = e, _(c, () => l, []), f(() => {
27
+ p(l._container, e.style);
28
+ }, [e.style]), null;
11
29
  }
12
- i(m);
30
+ s(d(b));
13
31
  //# sourceMappingURL=index.es71.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es71.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/attribution-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction AttributionControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.AttributionControl(props), {\n position: props.position\n });\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(AttributionControl);\n//# sourceMappingURL=attribution-control.js.map"],"names":["AttributionControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","memo"],"mappings":";;;AAGA,SAASA,EAAmBC,GAAO;AACzB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,mBAAmBH,CAAK,GAAG;AAAA,IAC1E,UAAUA,EAAM;AAAA,EAAA,CACnB;AACD,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,YAAYD,EAAM,KAAK;AAAA,EAAA,GAC7C,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACeM,EAAKP,CAAkB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es71.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/geolocate-control.js"],"sourcesContent":["import { useImperativeHandle, useRef, useEffect, forwardRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction GeolocateControl(props, ref) {\n const thisRef = useRef({ props });\n const ctrl = useControl(({ mapLib }) => {\n const gc = new mapLib.GeolocateControl(props);\n // Hack: fix GeolocateControl reuse\n // When using React strict mode, the component is mounted twice.\n // GeolocateControl's UI creation is asynchronous. Removing and adding it back causes the UI to be initialized twice.\n // @ts-expect-error private method\n const setupUI = gc._setupUI;\n // @ts-expect-error private method\n gc._setupUI = args => {\n if (!gc._container.hasChildNodes()) {\n setupUI(args);\n }\n };\n gc.on('geolocate', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onGeolocate) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('error', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('outofmaxbounds', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onOutOfMaxBounds) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('trackuserlocationstart', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onTrackUserLocationStart) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('trackuserlocationend', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onTrackUserLocationEnd) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n return gc;\n }, { position: props.position });\n thisRef.current.props = props;\n useImperativeHandle(ref, () => ctrl, []);\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(forwardRef(GeolocateControl));\n//# sourceMappingURL=geolocate-control.js.map"],"names":["GeolocateControl","props","ref","thisRef","useRef","ctrl","useControl","mapLib","gc","setupUI","args","e","_a","_b","useImperativeHandle","useEffect","applyReactStyle","memo","forwardRef"],"mappings":";;;AAGA,SAASA,EAAiBC,GAAOC,GAAK;AAClC,QAAMC,IAAUC,EAAO,EAAE,OAAAH,EAAO,CAAA,GAC1BI,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa;AACpC,UAAMC,IAAK,IAAID,EAAO,iBAAiBN,CAAK,GAKtCQ,IAAUD,EAAG;AAEnB,WAAAA,EAAG,WAAW,CAAQE,MAAA;AAClB,MAAKF,EAAG,WAAW,mBACfC,EAAQC,CAAI;AAAA,IAChB,GAEDF,EAAA,GAAG,aAAa,CAAKG,MAAA;AACpB,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKT,EAAQ,QAAQ,OAAO,iBAAiB,QAAQU,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA,CACrG,GACEH,EAAA,GAAG,SAAS,CAAKG,MAAA;AAChB,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKT,EAAQ,QAAQ,OAAO,aAAa,QAAQU,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA,CACjG,GACEH,EAAA,GAAG,kBAAkB,CAAKG,MAAA;AACzB,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKT,EAAQ,QAAQ,OAAO,sBAAsB,QAAQU,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA,CAC1G,GACEH,EAAA,GAAG,0BAA0B,CAAKG,MAAA;AACjC,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKT,EAAQ,QAAQ,OAAO,8BAA8B,QAAQU,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA,CAClH,GACEH,EAAA,GAAG,wBAAwB,CAAKG,MAAA;AAC/B,UAAIC,GAAIC;AACR,OAACA,KAAMD,IAAKT,EAAQ,QAAQ,OAAO,4BAA4B,QAAQU,MAAO,UAAkBA,EAAG,KAAKD,GAAID,CAAC;AAAA,IAAA,CAChH,GACMH;AAAA,EACR,GAAA,EAAE,UAAUP,EAAM,SAAU,CAAA;AAC/B,SAAAE,EAAQ,QAAQ,QAAQF,GACxBa,EAAoBZ,GAAK,MAAMG,GAAM,CAAE,CAAA,GACvCU,EAAU,MAAM;AACI,IAAAC,EAAAX,EAAK,YAAYJ,EAAM,KAAK;AAAA,EAAA,GAC7C,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACegB,EAAKC,EAAWlB,CAAgB,CAAC;","x_google_ignoreList":[0]}
@@ -1,15 +1,15 @@
1
- import { memo as o, useEffect as l } from "react";
2
- import { applyReactStyle as r } from "./index.es188.js";
3
- import c from "./index.es16.js";
4
- function i(t) {
5
- const n = c(({ mapLib: e }) => new e.FullscreenControl({
6
- container: t.containerId && document.getElementById(t.containerId)
7
- }), { position: t.position });
8
- return l(() => {
9
- r(n._controlContainer, t.style);
1
+ import { memo as i, useEffect as e } from "react";
2
+ import { applyReactStyle as l } from "./index.es188.js";
3
+ import r from "./index.es16.js";
4
+ function a(t) {
5
+ const o = r(({ mapLib: n }) => new n.NavigationControl(t), {
6
+ position: t.position
7
+ });
8
+ return e(() => {
9
+ l(o._container, t.style);
10
10
  }, [t.style]), null;
11
11
  }
12
- const s = o(i);
12
+ const s = i(a);
13
13
  export {
14
14
  s as default
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.es72.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/fullscreen-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction FullscreenControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.FullscreenControl({\n container: props.containerId && document.getElementById(props.containerId)\n }), { position: props.position });\n useEffect(() => {\n applyReactStyle(ctrl._controlContainer, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(FullscreenControl);\n//# sourceMappingURL=fullscreen-control.js.map"],"names":["FullscreenControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","_FullscreenControl","memo"],"mappings":";;;AAGA,SAASA,EAAkBC,GAAO;AACxB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,kBAAkB;AAAA,IACjE,WAAWH,EAAM,eAAe,SAAS,eAAeA,EAAM,WAAW;AAAA,EAC5E,CAAA,GAAG,EAAE,UAAUA,EAAM,SAAU,CAAA;AAChC,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,mBAAmBD,EAAM,KAAK;AAAA,EAAA,GACpD,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACA,MAAeM,IAAAC,EAAKR,CAAiB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es72.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/navigation-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction NavigationControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.NavigationControl(props), {\n position: props.position\n });\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(NavigationControl);\n//# sourceMappingURL=navigation-control.js.map"],"names":["NavigationControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","_NavigationControl","memo"],"mappings":";;;AAGA,SAASA,EAAkBC,GAAO;AACxB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,kBAAkBH,CAAK,GAAG;AAAA,IACzE,UAAUA,EAAM;AAAA,EAAA,CACnB;AACD,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,YAAYD,EAAM,KAAK;AAAA,EAAA,GAC7C,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACA,MAAeM,IAAAC,EAAKR,CAAiB;","x_google_ignoreList":[0]}
@@ -1,31 +1,15 @@
1
- import { memo as s, forwardRef as d, useRef as v, useImperativeHandle as _, useEffect as f } from "react";
2
- import { applyReactStyle as p } from "./index.es188.js";
3
- import m from "./index.es16.js";
4
- function b(e, c) {
5
- const a = v({ props: e }), l = m(({ mapLib: i }) => {
6
- const n = new i.GeolocateControl(e), u = n._setupUI;
7
- return n._setupUI = (t) => {
8
- n._container.hasChildNodes() || u(t);
9
- }, n.on("geolocate", (t) => {
10
- var r, o;
11
- (o = (r = a.current.props).onGeolocate) === null || o === void 0 || o.call(r, t);
12
- }), n.on("error", (t) => {
13
- var r, o;
14
- (o = (r = a.current.props).onError) === null || o === void 0 || o.call(r, t);
15
- }), n.on("outofmaxbounds", (t) => {
16
- var r, o;
17
- (o = (r = a.current.props).onOutOfMaxBounds) === null || o === void 0 || o.call(r, t);
18
- }), n.on("trackuserlocationstart", (t) => {
19
- var r, o;
20
- (o = (r = a.current.props).onTrackUserLocationStart) === null || o === void 0 || o.call(r, t);
21
- }), n.on("trackuserlocationend", (t) => {
22
- var r, o;
23
- (o = (r = a.current.props).onTrackUserLocationEnd) === null || o === void 0 || o.call(r, t);
24
- }), n;
25
- }, { position: e.position });
26
- return a.current.props = e, _(c, () => l, []), f(() => {
27
- p(l._container, e.style);
28
- }, [e.style]), null;
1
+ import { memo as m, useRef as u, useEffect as l } from "react";
2
+ import { applyReactStyle as a } from "./index.es188.js";
3
+ import f from "./index.es16.js";
4
+ function r(t) {
5
+ const i = f(({ mapLib: c }) => new c.ScaleControl(t), {
6
+ position: t.position
7
+ }), n = u(t), e = n.current;
8
+ n.current = t;
9
+ const { style: o } = t;
10
+ return t.maxWidth !== void 0 && t.maxWidth !== e.maxWidth && (i.options.maxWidth = t.maxWidth), t.unit !== void 0 && t.unit !== e.unit && i.setUnit(t.unit), l(() => {
11
+ a(i._container, o);
12
+ }, [o]), null;
29
13
  }
30
- s(d(b));
14
+ m(r);
31
15
  //# sourceMappingURL=index.es73.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es73.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/geolocate-control.js"],"sourcesContent":["import { useImperativeHandle, useRef, useEffect, forwardRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction GeolocateControl(props, ref) {\n const thisRef = useRef({ props });\n const ctrl = useControl(({ mapLib }) => {\n const gc = new mapLib.GeolocateControl(props);\n // Hack: fix GeolocateControl reuse\n // When using React strict mode, the component is mounted twice.\n // GeolocateControl's UI creation is asynchronous. Removing and adding it back causes the UI to be initialized twice.\n // @ts-expect-error private method\n const setupUI = gc._setupUI;\n // @ts-expect-error private method\n gc._setupUI = args => {\n if (!gc._container.hasChildNodes()) {\n setupUI(args);\n }\n };\n gc.on('geolocate', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onGeolocate) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('error', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('outofmaxbounds', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onOutOfMaxBounds) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('trackuserlocationstart', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onTrackUserLocationStart) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('trackuserlocationend', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onTrackUserLocationEnd) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n return gc;\n }, { position: props.position });\n thisRef.current.props = props;\n useImperativeHandle(ref, () => ctrl, []);\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(forwardRef(GeolocateControl));\n//# sourceMappingURL=geolocate-control.js.map"],"names":["GeolocateControl","props","ref","thisRef","useRef","ctrl","useControl","mapLib","gc","setupUI","args","e","_a","_b","useImperativeHandle","useEffect","appl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A,EACR,GAAA,EAAE,UAAUP,EAAM,SAAU,CAAA;AAC/B,SAAAE,EAAQ,QAAQ,QAAQF,GACxBa,EAAoBZ,GAAK,MAAMG,GAAM,CAAE,CAAA,GACvCU,EAAU,MAAM;AACI,IAAAC,EAAAX,EAAK,YAAYJ,EAAM,KAAK;AAAA,EAAA,GAC7C,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACegB,EAAKC,EAAWlB,CAAgB,CAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es73.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/scale-control.js"],"sourcesContent":["import { useEffect, useRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction ScaleControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.ScaleControl(props), {\n position: props.position\n });\n const propsRef = useRef(props);\n const prevProps = propsRef.current;\n propsRef.current = props;\n const { style } = props;\n if (props.maxWidth !== undefined && props.maxWidth !== prevProps.maxWidth) {\n ctrl.options.maxWidth = props.maxWidth;\n }\n if (props.unit !== undefined && props.unit !== prevProps.unit) {\n ctrl.setUnit(props.unit);\n }\n useEffect(() => {\n applyReactStyle(ctrl._container, style);\n }, [style]);\n return null;\n}\nexport default memo(ScaleControl);\n//# sourceMappingURL=scale-control.js.map"],"names":["ScaleControl","props","ctrl","useControl","mapLib","propsRef","useRef","prevProps","style","useEffect","applyReactStyle","memo"],"mappings":";;;AAGA,SAASA,EAAaC,GAAO;AACnB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,aAAaH,CAAK,GAAG;AAAA,IACpE,UAAUA,EAAM;AAAA,EAAA,CACnB,GACKI,IAAWC,EAAOL,CAAK,GACvBM,IAAYF,EAAS;AAC3B,EAAAA,EAAS,UAAUJ;AACb,QAAA,EAAE,OAAAO,EAAU,IAAAP;AAClB,SAAIA,EAAM,aAAa,UAAaA,EAAM,aAAaM,EAAU,aACxDL,EAAA,QAAQ,WAAWD,EAAM,WAE9BA,EAAM,SAAS,UAAaA,EAAM,SAASM,EAAU,QAChDL,EAAA,QAAQD,EAAM,IAAI,GAE3BQ,EAAU,MAAM;AACI,IAAAC,EAAAR,EAAK,YAAYM,CAAK;AAAA,EAAA,GACvC,CAACA,CAAK,CAAC,GACH;AACX;AACeG,EAAKX,CAAY;","x_google_ignoreList":[0]}
@@ -1,16 +1,14 @@
1
- import { memo as i, useEffect as e } from "react";
2
- import { applyReactStyle as l } from "./index.es188.js";
3
- import r from "./index.es16.js";
4
- function a(t) {
5
- const o = r(({ mapLib: n }) => new n.NavigationControl(t), {
6
- position: t.position
7
- });
8
- return e(() => {
9
- l(o._container, t.style);
10
- }, [t.style]), null;
1
+ import * as e from "react";
2
+ import { useContext as n, useMemo as a } from "react";
3
+ import { MapContext as u } from "./index.es66.js";
4
+ const p = e.createContext(null);
5
+ function c() {
6
+ var o;
7
+ const r = (o = n(p)) === null || o === void 0 ? void 0 : o.maps, t = n(u);
8
+ return a(() => ({ ...r, current: t == null ? void 0 : t.map }), [r, t]);
11
9
  }
12
- const s = i(a);
13
10
  export {
14
- s as default
11
+ p as MountedMapsContext,
12
+ c as useMap
15
13
  };
16
14
  //# sourceMappingURL=index.es74.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es74.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/navigation-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction NavigationControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.NavigationControl(props), {\n position: props.position\n });\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(NavigationControl);\n//# sourceMappingURL=navigation-control.js.map"],"names":["NavigationControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","_NavigationControl","memo"],"mappings":";;;AAGA,SAASA,EAAkBC,GAAO;AACxB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,kBAAkBH,CAAK,GAAG;AAAA,IACzE,UAAUA,EAAM;AAAA,EAAA,CACnB;AACD,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,YAAYD,EAAM,KAAK;AAAA,EAAA,GAC7C,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACA,MAAeM,IAAAC,EAAKR,CAAiB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es74.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/use-map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useCallback, useMemo, useContext } from 'react';\nimport { MapContext } from './map';\nexport const MountedMapsContext = React.createContext(null);\nexport const MapProvider = props => {\n const [maps, setMaps] = useState({});\n const onMapMount = useCallback((map, id = 'default') => {\n setMaps(currMaps => {\n if (id === 'current') {\n throw new Error(\"'current' cannot be used as map id\");\n }\n if (currMaps[id]) {\n throw new Error(`Multiple maps with the same id: ${id}`);\n }\n return { ...currMaps, [id]: map };\n });\n }, []);\n const onMapUnmount = useCallback((id = 'default') => {\n setMaps(currMaps => {\n if (currMaps[id]) {\n const nextMaps = { ...currMaps };\n delete nextMaps[id];\n return nextMaps;\n }\n return currMaps;\n });\n }, []);\n return (React.createElement(MountedMapsContext.Provider, { value: {\n maps,\n onMapMount,\n onMapUnmount\n } }, props.children));\n};\nexport function useMap() {\n var _a;\n const maps = (_a = useContext(MountedMapsContext)) === null || _a === void 0 ? void 0 : _a.maps;\n const currentMap = useContext(MapContext);\n const mapsWithCurrent = useMemo(() => {\n return { ...maps, current: currentMap === null || currentMap === void 0 ? void 0 : currentMap.map };\n }, [maps, currentMap]);\n return mapsWithCurrent;\n}\n//# sourceMappingURL=use-map.js.map"],"names":["MountedMapsContext","React","useMap","_a","maps","useContext","currentMap","MapContext","useMemo"],"mappings":";;;AAGa,MAAAA,IAAqBC,EAAM,cAAc,IAAI;AA8BnD,SAASC,IAAS;AACjB,MAAAC;AACE,QAAAC,KAAQD,IAAKE,EAAWL,CAAkB,OAAO,QAAQG,MAAO,SAAS,SAASA,EAAG,MACrFG,IAAaD,EAAWE,CAAU;AAIjC,SAHiBC,EAAQ,OACrB,EAAE,GAAGJ,GAAM,SAASE,KAAe,OAAgC,SAASA,EAAW,IAAI,IACnG,CAACF,GAAME,CAAU,CAAC;AAEzB;","x_google_ignoreList":[0]}
@@ -1,15 +1,5 @@
1
- import { memo as m, useRef as u, useEffect as l } from "react";
2
- import { applyReactStyle as a } from "./index.es188.js";
3
- import f from "./index.es16.js";
4
- function r(t) {
5
- const i = f(({ mapLib: c }) => new c.ScaleControl(t), {
6
- position: t.position
7
- }), n = u(t), e = n.current;
8
- n.current = t;
9
- const { style: o } = t;
10
- return t.maxWidth !== void 0 && t.maxWidth !== e.maxWidth && (i.options.maxWidth = t.maxWidth), t.unit !== void 0 && t.unit !== e.unit && i.setUnit(t.unit), l(() => {
11
- a(i._container, o);
12
- }, [o]), null;
13
- }
14
- m(r);
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
15
5
  //# sourceMappingURL=index.es75.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es75.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/scale-control.js"],"sourcesContent":["import { useEffect, useRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction ScaleControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.ScaleControl(props), {\n position: props.position\n });\n const propsRef = useRef(props);\n const prevProps = propsRef.current;\n propsRef.current = props;\n const { style } = props;\n if (props.maxWidth !== undefined && props.maxWidth !== prevProps.maxWidth) {\n ctrl.options.maxWidth = props.maxWidth;\n }\n if (props.unit !== undefined && props.unit !== prevProps.unit) {\n ctrl.setUnit(props.unit);\n }\n useEffect(() => {\n applyReactStyle(ctrl._container, style);\n }, [style]);\n return null;\n}\nexport default memo(ScaleControl);\n//# sourceMappingURL=scale-control.js.map"],"names":["ScaleControl","props","ctrl","useControl","mapLib","propsRef","useRef","prevProps","style","useEffect","applyReactStyle","memo"],"mappings":";;;AAGA,SAASA,EAAaC,GAAO;AACnB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,aAAaH,CAAK,GAAG;AAAA,IACpE,UAAUA,EAAM;AAAA,EAAA,CACnB,GACKI,IAAWC,EAAOL,CAAK,GACvBM,IAAYF,EAAS;AAC3B,EAAAA,EAAS,UAAUJ;AACb,QAAA,EAAE,OAAAO,EAAU,IAAAP;AAClB,SAAIA,EAAM,aAAa,UAAaA,EAAM,aAAaM,EAAU,aACxDL,EAAA,QAAQ,WAAWD,EAAM,WAE9BA,EAAM,SAAS,UAAaA,EAAM,SAASM,EAAU,QAChDL,EAAA,QAAQD,EAAM,IAAI,GAE3BQ,EAAU,MAAM;AACI,IAAAC,EAAAR,EAAK,YAAYM,CAAK;AAAA,EAAA,GACvC,CAACA,CAAK,CAAC,GACH;AACX;AACeG,EAAKX,CAAY;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es75.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,14 +1,5 @@
1
- import * as e from "react";
2
- import { useContext as n, useMemo as a } from "react";
3
- import { MapContext as u } from "./index.es68.js";
4
- const p = e.createContext(null);
5
- function c() {
6
- var o;
7
- const r = (o = n(p)) === null || o === void 0 ? void 0 : o.maps, t = n(u);
8
- return a(() => ({ ...r, current: t == null ? void 0 : t.map }), [r, t]);
9
- }
1
+ var e = {};
10
2
  export {
11
- p as MountedMapsContext,
12
- c as useMap
3
+ e as __exports
13
4
  };
14
5
  //# sourceMappingURL=index.es76.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es76.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/use-map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useCallback, useMemo, useContext } from 'react';\nimport { MapContext } from './map';\nexport const MountedMapsContext = React.createContext(null);\nexport const MapProvider = props => {\n const [maps, setMaps] = useState({});\n const onMapMount = useCallback((map, id = 'default') => {\n setMaps(currMaps => {\n if (id === 'current') {\n throw new Error(\"'current' cannot be used as map id\");\n }\n if (currMaps[id]) {\n throw new Error(`Multiple maps with the same id: ${id}`);\n }\n return { ...currMaps, [id]: map };\n });\n }, []);\n const onMapUnmount = useCallback((id = 'default') => {\n setMaps(currMaps => {\n if (currMaps[id]) {\n const nextMaps = { ...currMaps };\n delete nextMaps[id];\n return nextMaps;\n }\n return currMaps;\n });\n }, []);\n return (React.createElement(MountedMapsContext.Provider, { value: {\n maps,\n onMapMount,\n onMapUnmount\n } }, props.children));\n};\nexport function useMap() {\n var _a;\n const maps = (_a = useContext(MountedMapsContext)) === null || _a === void 0 ? void 0 : _a.maps;\n const currentMap = useContext(MapContext);\n const mapsWithCurrent = useMemo(() => {\n return { ...maps, current: currentMap === null || currentMap === void 0 ? void 0 : currentMap.map };\n }, [maps, currentMap]);\n return mapsWithCurrent;\n}\n//# sourceMappingURL=use-map.js.map"],"names":["MountedMapsContext","React","useMap","_a","maps","useContext","currentMap","MapContext","useMemo"],"mappings":";;;AAGa,MAAAA,IAAqBC,EAAM,cAAc,IAAI;AA8BnD,SAASC,IAAS;AACjB,MAAAC;AACE,QAAAC,KAAQD,IAAKE,EAAWL,CAAkB,OAAO,QAAQG,MAAO,SAAS,SAASA,EAAG,MACrFG,IAAaD,EAAWE,CAAU;AAIjC,SAHiBC,EAAQ,OACrB,EAAE,GAAGJ,GAAM,SAASE,KAAe,OAAgC,SAASA,EAAW,IAAI,IACnG,CAACF,GAAME,CAAU,CAAC;AAEzB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es76.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -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;