@performant-software/geospatial 3.1.0-beta.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) 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.cjs18.js +1 -1
  6. package/dist/index.cjs188.js +1 -1
  7. package/dist/index.cjs19.js +1 -1
  8. package/dist/index.cjs20.js +1 -1
  9. package/dist/index.cjs201.js +7 -1
  10. package/dist/index.cjs201.js.map +1 -1
  11. package/dist/index.cjs202.js +1 -1
  12. package/dist/index.cjs202.js.map +1 -1
  13. package/dist/index.cjs203.js +1 -1
  14. package/dist/index.cjs203.js.map +1 -1
  15. package/dist/index.cjs204.js +1 -1
  16. package/dist/index.cjs204.js.map +1 -1
  17. package/dist/index.cjs205.js +1 -1
  18. package/dist/index.cjs205.js.map +1 -1
  19. package/dist/index.cjs206.js +1 -1
  20. package/dist/index.cjs206.js.map +1 -1
  21. package/dist/index.cjs207.js +1 -1
  22. package/dist/index.cjs207.js.map +1 -1
  23. package/dist/index.cjs208.js +1 -1
  24. package/dist/index.cjs208.js.map +1 -1
  25. package/dist/index.cjs209.js +1 -7
  26. package/dist/index.cjs209.js.map +1 -1
  27. package/dist/index.cjs21.js +1 -1
  28. package/dist/index.cjs210.js +1 -1
  29. package/dist/index.cjs210.js.map +1 -1
  30. package/dist/index.cjs213.js +1 -1
  31. package/dist/index.cjs22.js +1 -1
  32. package/dist/index.cjs23.js +1 -1
  33. package/dist/index.cjs233.js +1 -1
  34. package/dist/index.cjs24.js +1 -1
  35. package/dist/index.cjs256.js +1 -1
  36. package/dist/index.cjs256.js.map +1 -1
  37. package/dist/index.cjs257.js +1 -1
  38. package/dist/index.cjs257.js.map +1 -1
  39. package/dist/index.cjs258.js +1 -1
  40. package/dist/index.cjs258.js.map +1 -1
  41. package/dist/index.cjs259.js +1 -1
  42. package/dist/index.cjs259.js.map +1 -1
  43. package/dist/index.cjs27.js +1 -1
  44. package/dist/index.cjs28.js +1 -1
  45. package/dist/index.cjs29.js +1 -1
  46. package/dist/index.cjs31.js +1 -1
  47. package/dist/index.cjs38.js +1 -1
  48. package/dist/index.cjs71.js +1 -743
  49. package/dist/index.cjs71.js.map +1 -1
  50. package/dist/index.cjs72.js +1 -1
  51. package/dist/index.cjs73.js +1 -1
  52. package/dist/index.cjs73.js.map +1 -1
  53. package/dist/index.cjs74.js +1 -1
  54. package/dist/index.cjs74.js.map +1 -1
  55. package/dist/index.cjs75.js +1 -9
  56. package/dist/index.cjs75.js.map +1 -1
  57. package/dist/index.cjs76.js +3 -11
  58. package/dist/index.cjs76.js.map +1 -1
  59. package/dist/index.cjs77.js +17 -1
  60. package/dist/index.cjs77.js.map +1 -1
  61. package/dist/index.cjs78.js +743 -1
  62. package/dist/index.cjs78.js.map +1 -1
  63. package/dist/index.es14.js +2 -2
  64. package/dist/index.es15.js +4 -4
  65. package/dist/index.es16.js +3 -3
  66. package/dist/index.es17.js +3 -3
  67. package/dist/index.es18.js +1 -1
  68. package/dist/index.es188.js +2 -2
  69. package/dist/index.es19.js +1 -1
  70. package/dist/index.es20.js +1 -1
  71. package/dist/index.es201.js +7505 -241
  72. package/dist/index.es201.js.map +1 -1
  73. package/dist/index.es202.js +2 -43
  74. package/dist/index.es202.js.map +1 -1
  75. package/dist/index.es203.js +243 -3
  76. package/dist/index.es203.js.map +1 -1
  77. package/dist/index.es204.js +40 -8
  78. package/dist/index.es204.js.map +1 -1
  79. package/dist/index.es205.js +3 -11
  80. package/dist/index.es205.js.map +1 -1
  81. package/dist/index.es206.js +9 -29
  82. package/dist/index.es206.js.map +1 -1
  83. package/dist/index.es207.js +10 -13
  84. package/dist/index.es207.js.map +1 -1
  85. package/dist/index.es208.js +30 -4
  86. package/dist/index.es208.js.map +1 -1
  87. package/dist/index.es209.js +13 -7506
  88. package/dist/index.es209.js.map +1 -1
  89. package/dist/index.es21.js +1 -1
  90. package/dist/index.es210.js +5 -2
  91. package/dist/index.es210.js.map +1 -1
  92. package/dist/index.es213.js +1 -1
  93. package/dist/index.es22.js +1 -1
  94. package/dist/index.es23.js +1 -1
  95. package/dist/index.es233.js +1 -1
  96. package/dist/index.es24.js +1 -1
  97. package/dist/index.es256.js +6 -19
  98. package/dist/index.es256.js.map +1 -1
  99. package/dist/index.es257.js +3 -23
  100. package/dist/index.es257.js.map +1 -1
  101. package/dist/index.es258.js +21 -3
  102. package/dist/index.es258.js.map +1 -1
  103. package/dist/index.es259.js +22 -7
  104. package/dist/index.es259.js.map +1 -1
  105. package/dist/index.es27.js +1 -1
  106. package/dist/index.es28.js +2 -2
  107. package/dist/index.es29.js +2 -2
  108. package/dist/index.es31.js +2 -2
  109. package/dist/index.es38.js +1 -1
  110. package/dist/index.es71.js +1954 -21313
  111. package/dist/index.es71.js.map +1 -1
  112. package/dist/index.es72.js +6 -2
  113. package/dist/index.es72.js.map +1 -1
  114. package/dist/index.es73.js +2 -8
  115. package/dist/index.es73.js.map +1 -1
  116. package/dist/index.es74.js +8 -2
  117. package/dist/index.es74.js.map +1 -1
  118. package/dist/index.es75.js +2 -26
  119. package/dist/index.es75.js.map +1 -1
  120. package/dist/index.es76.js +17 -580
  121. package/dist/index.es76.js.map +1 -1
  122. package/dist/index.es77.js +556 -1960
  123. package/dist/index.es77.js.map +1 -1
  124. package/dist/index.es78.js +21351 -5
  125. package/dist/index.es78.js.map +1 -1
  126. package/dist/index.es79.js +2 -2
  127. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { memo as i, useEffect as e } from "react";
2
- import { applyReactStyle as r } from "./index.es205.js";
2
+ import { applyReactStyle as r } from "./index.es207.js";
3
3
  import { useControl as l } from "./index.es25.js";
4
4
  function a(o) {
5
5
  const t = l(({ mapLib: n }) => new n.NavigationControl(o), {
@@ -1,5 +1,8 @@
1
- var s = { exports: {} };
1
+ function e(r, t) {
2
+ if (!r)
3
+ throw new Error(t);
4
+ }
2
5
  export {
3
- s as __module
6
+ e as default
4
7
  };
5
8
  //# sourceMappingURL=index.es210.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es210.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.es210.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/utils/assert.js"],"sourcesContent":["export default function assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\n//# sourceMappingURL=assert.js.map"],"names":["assert","condition","message"],"mappings":"AAAA,SAAwBA,EAAOC,GAAWC,GAAS;AAC/C,MAAI,CAACD;AACD,UAAM,IAAI,MAAMC,CAAO;AAE/B;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import e from "./index.es259.js";
1
+ import e from "./index.es256.js";
2
2
  import t from "./index.es215.js";
3
3
  const f = e(t);
4
4
  export {
@@ -1,5 +1,5 @@
1
1
  import { memo as m, useRef as u, useEffect as l } from "react";
2
- import { applyReactStyle as a } from "./index.es205.js";
2
+ import { applyReactStyle as a } from "./index.es207.js";
3
3
  import { useControl as f } from "./index.es25.js";
4
4
  function r(t) {
5
5
  const i = f(({ mapLib: c }) => new c.ScaleControl(t), {
@@ -1,5 +1,5 @@
1
1
  import { memo as r, useEffect as e } from "react";
2
- import { applyReactStyle as i } from "./index.es205.js";
2
+ import { applyReactStyle as i } from "./index.es207.js";
3
3
  import { useControl as l } from "./index.es25.js";
4
4
  function m(t) {
5
5
  const o = l(({ mapLib: n }) => new n.TerrainControl(t), {
@@ -1,4 +1,4 @@
1
- import e from "./index.es259.js";
1
+ import e from "./index.es256.js";
2
2
  import r from "./index.es214.js";
3
3
  const i = e(r);
4
4
  export {
@@ -1,5 +1,5 @@
1
1
  import { memo as e, useEffect as l } from "react";
2
- import { applyReactStyle as r } from "./index.es205.js";
2
+ import { applyReactStyle as r } from "./index.es207.js";
3
3
  import { useControl as i } from "./index.es25.js";
4
4
  function m(o) {
5
5
  const t = i(({ mapLib: n }) => new n.LogoControl(o), { position: o.position });
@@ -1,24 +1,11 @@
1
- import { deepEqual as a } from "./index.es206.js";
2
- function g(i) {
3
- return {
4
- longitude: i.center.lng,
5
- latitude: i.center.lat,
6
- zoom: i.zoom,
7
- pitch: i.pitch,
8
- bearing: i.bearing,
9
- padding: i.padding
1
+ import { MAX_ARRAY_INDEX as o } from "./index.es36.js";
2
+ function u(e) {
3
+ return function(t) {
4
+ var r = e(t);
5
+ return typeof r == "number" && r >= 0 && r <= o;
10
6
  };
11
7
  }
12
- function c(i, t) {
13
- const n = t.viewState || t, e = {};
14
- if ("longitude" in n && "latitude" in n && (n.longitude !== i.center.lng || n.latitude !== i.center.lat)) {
15
- const o = i.center.constructor;
16
- e.center = new o(n.longitude, n.latitude);
17
- }
18
- return "zoom" in n && n.zoom !== i.zoom && (e.zoom = n.zoom), "bearing" in n && n.bearing !== i.bearing && (e.bearing = n.bearing), "pitch" in n && n.pitch !== i.pitch && (e.pitch = n.pitch), n.padding && i.padding && !a(n.padding, i.padding) && (e.padding = n.padding), e;
19
- }
20
8
  export {
21
- c as applyViewStateToTransform,
22
- g as transformToViewState
9
+ u as default
23
10
  };
24
11
  //# sourceMappingURL=index.es256.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es256.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/utils/transform.js"],"sourcesContent":["import { deepEqual } from \"./deep-equal.js\";\n/**\n * Capture a transform's current state\n * @param transform\n * @returns descriptor of the view state\n */\nexport function transformToViewState(tr) {\n return {\n longitude: tr.center.lng,\n latitude: tr.center.lat,\n zoom: tr.zoom,\n pitch: tr.pitch,\n bearing: tr.bearing,\n padding: tr.padding\n };\n}\n/* eslint-disable complexity */\n/**\n * Applies requested view state to a transform\n * @returns an object containing detected changes\n */\nexport function applyViewStateToTransform(\n/** An object that describes Maplibre's camera state */\ntr, \n/** Props from Map component */\nprops) {\n const v = props.viewState || props;\n const changes = {};\n if ('longitude' in v &&\n 'latitude' in v &&\n (v.longitude !== tr.center.lng || v.latitude !== tr.center.lat)) {\n const LngLat = tr.center.constructor;\n // @ts-expect-error we should not import LngLat class from maplibre-gl because we don't know the source of mapLib\n changes.center = new LngLat(v.longitude, v.latitude);\n }\n if ('zoom' in v && v.zoom !== tr.zoom) {\n changes.zoom = v.zoom;\n }\n if ('bearing' in v && v.bearing !== tr.bearing) {\n changes.bearing = v.bearing;\n }\n if ('pitch' in v && v.pitch !== tr.pitch) {\n changes.pitch = v.pitch;\n }\n if (v.padding && tr.padding && !deepEqual(v.padding, tr.padding)) {\n changes.padding = v.padding;\n }\n return changes;\n}\n//# sourceMappingURL=transform.js.map"],"names":["transformToViewState","tr","applyViewStateToTransform","props","v","changes","LngLat","deepEqual"],"mappings":";AAMO,SAASA,EAAqBC,GAAI;AACrC,SAAO;AAAA,IACH,WAAWA,EAAG,OAAO;AAAA,IACrB,UAAUA,EAAG,OAAO;AAAA,IACpB,MAAMA,EAAG;AAAA,IACT,OAAOA,EAAG;AAAA,IACV,SAASA,EAAG;AAAA,IACZ,SAASA,EAAG;AAAA,EAAA;AAEpB;AAMO,SAASC,EAEhBD,GAEAE,GAAO;AACH,QAAMC,IAAID,EAAM,aAAaA,GACvBE,IAAU,CAAA;AAChB,MAAI,eAAeD,KACf,cAAcA,MACbA,EAAE,cAAcH,EAAG,OAAO,OAAOG,EAAE,aAAaH,EAAG,OAAO,MAAM;AACjE,UAAMK,IAASL,EAAG,OAAO;AAEzB,IAAAI,EAAQ,SAAS,IAAIC,EAAOF,EAAE,WAAWA,EAAE,QAAQ;AAAA,EACvD;AACA,SAAI,UAAUA,KAAKA,EAAE,SAASH,EAAG,SAC7BI,EAAQ,OAAOD,EAAE,OAEjB,aAAaA,KAAKA,EAAE,YAAYH,EAAG,YACnCI,EAAQ,UAAUD,EAAE,UAEpB,WAAWA,KAAKA,EAAE,UAAUH,EAAG,UAC/BI,EAAQ,QAAQD,EAAE,QAElBA,EAAE,WAAWH,EAAG,WAAW,CAACM,EAAUH,EAAE,SAASH,EAAG,OAAO,MAC3DI,EAAQ,UAAUD,EAAE,UAEjBC;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es256.js","sources":["../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AAC1B,QAAIC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EACjF;AACF;","x_google_ignoreList":[0]}
@@ -1,26 +1,6 @@
1
- const a = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
2
- function c(r) {
3
- if (!r)
4
- return null;
5
- if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
6
- return r;
7
- const t = {};
8
- for (const e of r.layers)
9
- t[e.id] = e;
10
- const f = r.layers.map((e) => {
11
- let n = null;
12
- "interactive" in e && (n = Object.assign({}, e), delete n.interactive);
13
- const o = t[e.ref];
14
- if (o) {
15
- n = n || Object.assign({}, e), delete n.ref;
16
- for (const i of a)
17
- i in o && (n[i] = o[i]);
18
- }
19
- return n || e;
20
- });
21
- return { ...r, layers: f };
22
- }
1
+ import t from "./index.es211.js";
2
+ const a = t("Object");
23
3
  export {
24
- c as normalizeStyle
4
+ a as default
25
5
  };
26
6
  //# sourceMappingURL=index.es257.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es257.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"AAAA,MAAMA,IAAW,CAAC,QAAQ,UAAU,gBAAgB,WAAW,WAAW,UAAU,QAAQ;AAIrF,SAASC,EAAeC,GAAO;AAClC,MAAI,CAACA;AACD,WAAO;AAQX,MANI,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,KAAA,IAEd,CAACA,EAAM;AACP,WAAOA;AAEX,QAAMC,IAAa,CAAA;AACnB,aAAWC,KAASF,EAAM;AACtB,IAAAC,EAAWC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAAAE,MAAS;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAA,GAAIF,CAAK,GAGzC,OAAOE,EAAgB;AAI3B,UAAMC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,CAAA,GAAIF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACZD,EAAgBE,CAAQ,IAAID,EAASC,CAAQ;AAAA,IAGzD;AACA,WAAOF,KAAmBF;AAAA,EAC9B,CAAC;AAED,SAAO,EAAE,GAAGF,GAAO,QAAAG,EAAA;AACvB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es257.js","sources":["../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAAA,IAAeC,EAAU,QAAQ;","x_google_ignoreList":[0]}
@@ -1,6 +1,24 @@
1
- import t from "./index.es211.js";
2
- const a = t("Object");
1
+ import { deepEqual as a } from "./index.es208.js";
2
+ function g(i) {
3
+ return {
4
+ longitude: i.center.lng,
5
+ latitude: i.center.lat,
6
+ zoom: i.zoom,
7
+ pitch: i.pitch,
8
+ bearing: i.bearing,
9
+ padding: i.padding
10
+ };
11
+ }
12
+ function c(i, t) {
13
+ const n = t.viewState || t, e = {};
14
+ if ("longitude" in n && "latitude" in n && (n.longitude !== i.center.lng || n.latitude !== i.center.lat)) {
15
+ const o = i.center.constructor;
16
+ e.center = new o(n.longitude, n.latitude);
17
+ }
18
+ return "zoom" in n && n.zoom !== i.zoom && (e.zoom = n.zoom), "bearing" in n && n.bearing !== i.bearing && (e.bearing = n.bearing), "pitch" in n && n.pitch !== i.pitch && (e.pitch = n.pitch), n.padding && i.padding && !a(n.padding, i.padding) && (e.padding = n.padding), e;
19
+ }
3
20
  export {
4
- a as default
21
+ c as applyViewStateToTransform,
22
+ g as transformToViewState
5
23
  };
6
24
  //# sourceMappingURL=index.es258.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es258.js","sources":["../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAAA,IAAeC,EAAU,QAAQ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es258.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/utils/transform.js"],"sourcesContent":["import { deepEqual } from \"./deep-equal.js\";\n/**\n * Capture a transform's current state\n * @param transform\n * @returns descriptor of the view state\n */\nexport function transformToViewState(tr) {\n return {\n longitude: tr.center.lng,\n latitude: tr.center.lat,\n zoom: tr.zoom,\n pitch: tr.pitch,\n bearing: tr.bearing,\n padding: tr.padding\n };\n}\n/* eslint-disable complexity */\n/**\n * Applies requested view state to a transform\n * @returns an object containing detected changes\n */\nexport function applyViewStateToTransform(\n/** An object that describes Maplibre's camera state */\ntr, \n/** Props from Map component */\nprops) {\n const v = props.viewState || props;\n const changes = {};\n if ('longitude' in v &&\n 'latitude' in v &&\n (v.longitude !== tr.center.lng || v.latitude !== tr.center.lat)) {\n const LngLat = tr.center.constructor;\n // @ts-expect-error we should not import LngLat class from maplibre-gl because we don't know the source of mapLib\n changes.center = new LngLat(v.longitude, v.latitude);\n }\n if ('zoom' in v && v.zoom !== tr.zoom) {\n changes.zoom = v.zoom;\n }\n if ('bearing' in v && v.bearing !== tr.bearing) {\n changes.bearing = v.bearing;\n }\n if ('pitch' in v && v.pitch !== tr.pitch) {\n changes.pitch = v.pitch;\n }\n if (v.padding && tr.padding && !deepEqual(v.padding, tr.padding)) {\n changes.padding = v.padding;\n }\n return changes;\n}\n//# sourceMappingURL=transform.js.map"],"names":["transformToViewState","tr","applyViewStateToTransform","props","v","changes","LngLat","deepEqual"],"mappings":";AAMO,SAASA,EAAqBC,GAAI;AACrC,SAAO;AAAA,IACH,WAAWA,EAAG,OAAO;AAAA,IACrB,UAAUA,EAAG,OAAO;AAAA,IACpB,MAAMA,EAAG;AAAA,IACT,OAAOA,EAAG;AAAA,IACV,SAASA,EAAG;AAAA,IACZ,SAASA,EAAG;AAAA,EAAA;AAEpB;AAMO,SAASC,EAEhBD,GAEAE,GAAO;AACH,QAAMC,IAAID,EAAM,aAAaA,GACvBE,IAAU,CAAA;AAChB,MAAI,eAAeD,KACf,cAAcA,MACbA,EAAE,cAAcH,EAAG,OAAO,OAAOG,EAAE,aAAaH,EAAG,OAAO,MAAM;AACjE,UAAMK,IAASL,EAAG,OAAO;AAEzB,IAAAI,EAAQ,SAAS,IAAIC,EAAOF,EAAE,WAAWA,EAAE,QAAQ;AAAA,EACvD;AACA,SAAI,UAAUA,KAAKA,EAAE,SAASH,EAAG,SAC7BI,EAAQ,OAAOD,EAAE,OAEjB,aAAaA,KAAKA,EAAE,YAAYH,EAAG,YACnCI,EAAQ,UAAUD,EAAE,UAEpB,WAAWA,KAAKA,EAAE,UAAUH,EAAG,UAC/BI,EAAQ,QAAQD,EAAE,QAElBA,EAAE,WAAWH,EAAG,WAAW,CAACM,EAAUH,EAAE,SAASH,EAAG,OAAO,MAC3DI,EAAQ,UAAUD,EAAE,UAEjBC;AACX;","x_google_ignoreList":[0]}
@@ -1,11 +1,26 @@
1
- import { MAX_ARRAY_INDEX as o } from "./index.es36.js";
2
- function u(e) {
3
- return function(t) {
4
- var r = e(t);
5
- return typeof r == "number" && r >= 0 && r <= o;
6
- };
1
+ const a = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
2
+ function c(r) {
3
+ if (!r)
4
+ return null;
5
+ if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
6
+ return r;
7
+ const t = {};
8
+ for (const e of r.layers)
9
+ t[e.id] = e;
10
+ const f = r.layers.map((e) => {
11
+ let n = null;
12
+ "interactive" in e && (n = Object.assign({}, e), delete n.interactive);
13
+ const o = t[e.ref];
14
+ if (o) {
15
+ n = n || Object.assign({}, e), delete n.ref;
16
+ for (const i of a)
17
+ i in o && (n[i] = o[i]);
18
+ }
19
+ return n || e;
20
+ });
21
+ return { ...r, layers: f };
7
22
  }
8
23
  export {
9
- u as default
24
+ c as normalizeStyle
10
25
  };
11
26
  //# sourceMappingURL=index.es259.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es259.js","sources":["../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AAC1B,QAAIC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EACjF;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es259.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"AAAA,MAAMA,IAAW,CAAC,QAAQ,UAAU,gBAAgB,WAAW,WAAW,UAAU,QAAQ;AAIrF,SAASC,EAAeC,GAAO;AAClC,MAAI,CAACA;AACD,WAAO;AAQX,MANI,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,KAAA,IAEd,CAACA,EAAM;AACP,WAAOA;AAEX,QAAMC,IAAa,CAAA;AACnB,aAAWC,KAASF,EAAM;AACtB,IAAAC,EAAWC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAAAE,MAAS;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAA,GAAIF,CAAK,GAGzC,OAAOE,EAAgB;AAI3B,UAAMC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,CAAA,GAAIF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACZD,EAAgBE,CAAQ,IAAID,EAASC,CAAQ;AAAA,IAGzD;AACA,WAAOF,KAAmBF;AAAA,EAC9B,CAAC;AAED,SAAO,EAAE,GAAGF,GAAO,QAAAG,EAAA;AACvB;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { __require as r } from "./index.es73.js";
1
+ import { __require as r } from "./index.es74.js";
2
2
  var i = r();
3
3
  export {
4
4
  i as j
@@ -1,8 +1,8 @@
1
1
  import * as d from "react";
2
2
  import { useContext as s, useRef as f, useState as y, useMemo as m, useEffect as g, cloneElement as S } from "react";
3
3
  import { MapContext as h } from "./index.es15.js";
4
- import u from "./index.es208.js";
5
- import { deepEqual as C } from "./index.es206.js";
4
+ import u from "./index.es210.js";
5
+ import { deepEqual as C } from "./index.es208.js";
6
6
  let b = 0;
7
7
  function k(t, e, a) {
8
8
  if (t.style && t.style._loaded) {
@@ -1,7 +1,7 @@
1
1
  import { useContext as m, useRef as L, useState as g, useMemo as x, useEffect as h } from "react";
2
2
  import { MapContext as b } from "./index.es15.js";
3
- import d from "./index.es208.js";
4
- import { deepEqual as l } from "./index.es206.js";
3
+ import d from "./index.es210.js";
4
+ import { deepEqual as l } from "./index.es208.js";
5
5
  function k(t, e, a, o) {
6
6
  if (d(a.id === o.id, "layer id changed"), d(a.type === o.type, "layer type changed"), a.type === "custom" || o.type === "custom")
7
7
  return;
@@ -1,5 +1,5 @@
1
- import { getDefaultExportFromCjs as f } from "./index.es78.js";
2
- import { __require as n } from "./index.es71.js";
1
+ import { getDefaultExportFromCjs as f } from "./index.es72.js";
2
+ import { __require as n } from "./index.es78.js";
3
3
  function s(t, i) {
4
4
  for (var o = 0; o < i.length; o++) {
5
5
  const e = i[o];
@@ -1,5 +1,5 @@
1
1
  import { supportsDataView as e } from "./index.es36.js";
2
- import a from "./index.es258.js";
2
+ import a from "./index.es257.js";
3
3
  var i = e && (!/\[native code\]/.test(String(DataView)) || a(new DataView(new ArrayBuffer(8)))), o = typeof Map < "u" && a(/* @__PURE__ */ new Map());
4
4
  export {
5
5
  i as hasDataViewBug,