@defra/interactive-map 0.0.22-alpha → 0.0.23-alpha

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 (190) hide show
  1. package/dist/css/index.css +1 -1
  2. package/dist/esm/im-core.js +1 -1
  3. package/dist/esm/im-shell.js +1 -1
  4. package/dist/umd/im-core.js +1 -1
  5. package/dist/umd/index.js +1 -1
  6. package/docs/api/button-definition.md +39 -0
  7. package/docs/api/context.md +4 -4
  8. package/docs/api/map-style-config.md +11 -2
  9. package/docs/api/marker-config.md +38 -7
  10. package/docs/api/panel-definition.md +7 -3
  11. package/docs/api/symbol-config.md +10 -26
  12. package/docs/api/symbol-registry.md +28 -13
  13. package/docs/api.md +24 -2
  14. package/docs/assets/css/{docusaurus.css → docusaurus.scss} +18 -12
  15. package/docs/assets/images/toggle-marker-label.jpg +0 -0
  16. package/docs/examples/index.mdx +12 -0
  17. package/docs/examples/toggle-marker-label.mdx +89 -0
  18. package/docs/plugins/interact.md +4 -11
  19. package/docusaurus.config.cjs +2 -1
  20. package/package.json +8 -8
  21. package/plugins/beta/datasets/dist/adapters/maplibre/esm/im-datasets-ml-adapter.js +1 -1
  22. package/plugins/beta/datasets/dist/css/index.css +2 -2
  23. package/plugins/beta/datasets/dist/esm/im-datasets-plugin.js +1 -1
  24. package/plugins/beta/datasets/dist/umd/maplibre/im-datasets-maplibre-adapter.js +1 -1
  25. package/plugins/beta/datasets/dist/umd/maplibre/im-datasets-plugin.js +1 -1
  26. package/plugins/beta/datasets/dist/umd/maplibre/index.js +1 -1
  27. package/plugins/beta/datasets/src/adapters/maplibre/layerBuilders.js +5 -5
  28. package/plugins/beta/datasets/src/adapters/maplibre/maplibreLayerAdapter.js +24 -29
  29. package/plugins/beta/datasets/src/adapters/maplibre/patternImages.js +2 -2
  30. package/plugins/beta/datasets/src/adapters/maplibre/symbolImages.js +3 -3
  31. package/plugins/beta/datasets/src/components/KeySvg.jsx +2 -2
  32. package/plugins/beta/datasets/src/components/KeySvgPattern.jsx +1 -2
  33. package/plugins/beta/datasets/src/components/svgProperties.js +2 -2
  34. package/plugins/beta/datasets/src/panels/Key.module.scss +2 -2
  35. package/plugins/beta/draw-es/dist/esm/im-draw-es-plugin.js +1 -1
  36. package/plugins/beta/draw-ml/dist/esm/im-draw-ml-plugin.js +1 -1
  37. package/plugins/beta/draw-ml/dist/umd/im-draw-ml-plugin.js +1 -1
  38. package/plugins/beta/map-styles/dist/esm/im-map-styles-plugin.js +1 -1
  39. package/plugins/beta/map-styles/dist/umd/im-map-styles-plugin.js +1 -1
  40. package/plugins/beta/map-styles/dist/umd/index.js +1 -1
  41. package/plugins/beta/use-location/dist/esm/im-use-location-plugin.js +1 -1
  42. package/plugins/beta/use-location/dist/umd/im-use-location-plugin.js +1 -1
  43. package/plugins/beta/use-location/src/manifest.js +1 -0
  44. package/plugins/interact/dist/esm/im-interact-plugin.js +1 -1
  45. package/plugins/interact/dist/umd/im-interact-plugin.js +1 -1
  46. package/plugins/interact/dist/umd/index.js +1 -1
  47. package/plugins/interact/src/InteractInit.jsx +23 -55
  48. package/plugins/interact/src/InteractInit.test.js +58 -80
  49. package/plugins/interact/src/defaults.js +1 -3
  50. package/plugins/interact/src/hooks/useAttachEvents.js +46 -0
  51. package/plugins/interact/src/hooks/useAttachEvents.test.js +65 -0
  52. package/plugins/interact/src/hooks/useCrossHairVisibility.js +47 -0
  53. package/plugins/interact/src/hooks/useCrossHairVisibility.test.js +54 -0
  54. package/plugins/interact/src/hooks/useHighlightSync.js +30 -8
  55. package/plugins/interact/src/hooks/useHighlightSync.test.js +127 -80
  56. package/plugins/interact/src/hooks/useInteractionHandlers.js +18 -17
  57. package/plugins/interact/src/hooks/useInteractionHandlers.test.js +22 -61
  58. package/plugins/interact/src/hooks/useMapItemList.js +187 -0
  59. package/plugins/interact/src/hooks/useMapItemList.test.js +584 -0
  60. package/plugins/interact/src/index.js +0 -2
  61. package/plugins/interact/src/index.test.js +0 -2
  62. package/plugins/interact/src/manifest.js +37 -6
  63. package/plugins/interact/src/reducer.js +8 -4
  64. package/plugins/interact/src/reducer.test.js +18 -3
  65. package/plugins/interact/src/utils/buildStylesMap.js +21 -10
  66. package/plugins/interact/src/utils/buildStylesMap.test.js +29 -29
  67. package/plugins/interact/src/utils/spatial.js +0 -15
  68. package/plugins/interact/src/utils/spatial.test.js +1 -13
  69. package/plugins/search/dist/css/index.css +1 -1
  70. package/plugins/search/dist/esm/im-search-plugin.js +1 -1
  71. package/plugins/search/dist/umd/im-search-plugin.js +1 -1
  72. package/plugins/search/src/components/CloseButton/CloseButton.module.scss +2 -0
  73. package/plugins/search/src/components/OpenButton/OpenButton.jsx +1 -1
  74. package/plugins/search/src/components/OpenButton/OpenButton.module.scss +3 -0
  75. package/plugins/search/src/search.scss +1 -0
  76. package/providers/beta/esri/dist/esm/im-esri-provider.js +1 -1
  77. package/providers/beta/esri/src/esriProvider.js +4 -0
  78. package/providers/maplibre/dist/esm/im-maplibre-provider.js +1 -1
  79. package/providers/maplibre/dist/esm/index.js +1 -1
  80. package/providers/maplibre/dist/umd/im-maplibre-provider.js +1 -1
  81. package/providers/maplibre/dist/umd/index.js +1 -1
  82. package/providers/maplibre/src/index.js +1 -1
  83. package/providers/maplibre/src/index.test.js +9 -14
  84. package/providers/maplibre/src/mapEvents.js +11 -5
  85. package/providers/maplibre/src/mapEvents.test.js +14 -3
  86. package/providers/maplibre/src/maplibreProvider.js +18 -11
  87. package/providers/maplibre/src/maplibreProvider.test.js +43 -36
  88. package/providers/maplibre/src/utils/highlightFeatures.js +102 -57
  89. package/providers/maplibre/src/utils/highlightFeatures.test.js +162 -51
  90. package/providers/maplibre/src/utils/maplibreFixes.js +10 -0
  91. package/providers/maplibre/src/utils/maplibreFixes.test.js +31 -0
  92. package/providers/maplibre/src/utils/patternImages.js +10 -12
  93. package/providers/maplibre/src/utils/patternImages.test.js +145 -167
  94. package/providers/maplibre/src/utils/rasteriseToImageData.js +1 -4
  95. package/providers/maplibre/src/utils/rasteriseToImageData.test.js +23 -24
  96. package/providers/maplibre/src/utils/symbolImages.js +23 -86
  97. package/providers/maplibre/src/utils/symbolImages.test.js +60 -105
  98. package/src/App/components/Actions/Actions.module.scss +1 -0
  99. package/src/App/components/Actions/Actions.test.jsx +17 -4
  100. package/src/App/components/Hints/Hints.jsx +52 -0
  101. package/src/App/components/Hints/Hints.module.scss +37 -0
  102. package/src/App/components/Hints/Hints.test.jsx +104 -0
  103. package/src/App/components/KeyboardHelp/KeyboardHelp.jsx +57 -19
  104. package/src/App/components/KeyboardHelp/KeyboardHelp.module.scss +10 -0
  105. package/src/App/components/KeyboardHelp/KeyboardHelp.test.jsx +140 -31
  106. package/src/App/components/Markers/LabelMarker.jsx +14 -0
  107. package/src/App/components/Markers/LabelMarker.test.jsx +36 -0
  108. package/src/App/components/Markers/Markers.jsx +44 -75
  109. package/src/App/components/Markers/Markers.module.scss +58 -0
  110. package/src/App/components/Markers/Markers.test.jsx +90 -113
  111. package/src/App/components/Markers/SymbolLabelMarker.jsx +43 -0
  112. package/src/App/components/Markers/SymbolLabelMarker.test.jsx +56 -0
  113. package/src/App/components/Markers/SymbolMarker.jsx +31 -0
  114. package/src/App/components/Markers/SymbolMarker.test.jsx +72 -0
  115. package/src/App/components/Panel/Panel.jsx +1 -1
  116. package/src/App/components/Panel/Panel.module.scss +1 -0
  117. package/src/App/components/PopupMenu/PopupMenu.test.jsx +117 -1
  118. package/src/App/components/PopupMenu/usePopupMenu.js +132 -85
  119. package/src/App/components/Tabs/Tabs.jsx +68 -0
  120. package/src/App/components/Tabs/Tabs.module.scss +57 -0
  121. package/src/App/components/Tabs/Tabs.test.jsx +121 -0
  122. package/src/App/components/Tooltip/Tooltip.module.scss +1 -1
  123. package/src/App/components/Viewport/Features.jsx +35 -0
  124. package/src/App/components/Viewport/Features.module.scss +31 -0
  125. package/src/App/components/Viewport/Features.test.jsx +124 -0
  126. package/src/App/components/Viewport/MapStatus.jsx +0 -4
  127. package/src/App/components/Viewport/Viewport.jsx +35 -29
  128. package/src/App/components/Viewport/Viewport.module.scss +7 -21
  129. package/src/App/components/Viewport/Viewport.test.jsx +108 -65
  130. package/src/App/controls/keyboardActions.js +9 -3
  131. package/src/App/controls/keyboardActions.test.js +122 -87
  132. package/src/App/controls/keyboardShortcuts.js +1 -14
  133. package/src/App/hooks/useFeatureFocus.js +199 -0
  134. package/src/App/hooks/useFeatureFocus.test.js +635 -0
  135. package/src/App/hooks/useFeatureItems.js +30 -0
  136. package/src/App/hooks/useFeatureItems.test.js +97 -0
  137. package/src/App/hooks/useFocusVisible.js +4 -7
  138. package/src/App/hooks/useFocusVisible.test.js +6 -6
  139. package/src/App/hooks/useKeyboardHint.js +9 -34
  140. package/src/App/hooks/useKeyboardHint.test.js +34 -84
  141. package/src/App/hooks/useKeyboardShortcuts.js +8 -5
  142. package/src/App/hooks/useKeyboardShortcuts.test.js +16 -12
  143. package/src/App/hooks/useLayoutMeasurements.js +10 -4
  144. package/src/App/hooks/useLayoutMeasurements.test.js +30 -0
  145. package/src/App/hooks/useMarkerCursor.js +33 -0
  146. package/src/App/hooks/useMarkerCursor.test.js +87 -0
  147. package/src/App/hooks/useMarkersAPI.js +32 -9
  148. package/src/App/hooks/useMarkersAPI.test.js +162 -94
  149. package/src/App/layout/Layout.jsx +2 -0
  150. package/src/App/layout/Layout.test.jsx +3 -0
  151. package/src/App/registry/keyboardShortcutRegistry.js +3 -2
  152. package/src/App/registry/keyboardShortcutRegistry.test.js +6 -8
  153. package/src/App/renderer/mapButtons.js +5 -1
  154. package/src/App/renderer/mapButtons.test.js +37 -1
  155. package/src/App/store/ServiceProvider.jsx +4 -1
  156. package/src/App/store/ServiceProvider.test.jsx +11 -0
  157. package/src/App/store/appActionsMap.js +5 -1
  158. package/src/App/store/appActionsMap.test.js +13 -0
  159. package/src/App/store/appReducer.js +1 -0
  160. package/src/App/store/mapActionsMap.js +2 -1
  161. package/src/InteractiveMap/InteractiveMap.js +12 -0
  162. package/src/InteractiveMap/InteractiveMap.test.js +2 -0
  163. package/src/config/appConfig.js +3 -1
  164. package/src/config/appConfig.test.js +4 -0
  165. package/src/config/defaults.js +1 -1
  166. package/src/config/events.js +8 -0
  167. package/src/config/mapTheme.js +8 -4
  168. package/src/config/symbolConfig.js +23 -16
  169. package/src/scss/main.scss +3 -0
  170. package/src/scss/tools/_border-focus.scss +0 -1
  171. package/src/services/eventBus.js +15 -0
  172. package/src/services/eventBus.test.js +11 -0
  173. package/src/services/hints.js +47 -0
  174. package/src/services/hints.test.js +110 -0
  175. package/src/services/patternRegistry.js +69 -1
  176. package/src/services/patternRegistry.test.js +112 -1
  177. package/src/services/reverseGeocode.js +4 -0
  178. package/src/services/reverseGeocode.test.js +11 -1
  179. package/src/services/symbolRegistry.js +152 -17
  180. package/src/services/symbolRegistry.test.js +141 -31
  181. package/src/types.js +71 -14
  182. package/src/utils/constrainKeyboardFocus.js +5 -5
  183. package/src/utils/detectInterfaceType.js +27 -5
  184. package/src/utils/detectInterfaceType.test.js +29 -3
  185. package/src/utils/patternUtils.js +4 -67
  186. package/src/utils/patternUtils.test.js +1 -123
  187. package/src/utils/symbolUtils.js +11 -13
  188. package/src/utils/symbolUtils.test.js +18 -26
  189. package/plugins/interact/dist/css/index.css +0 -1
  190. package/plugins/interact/src/interact.scss +0 -24
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see im-datasets-maplibre-adapter.js.LICENSE.txt */
2
- "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[580],{438(t,r,e){e.r(r),e.d(r,{default:()=>Y});var n=function(t,r,e,n,o){if(t.getLayer(r)){var i=function(t,r,e){if(!e||0===e.length)return t;var n=["!",["in",r?["to-string",["get",r]]:["to-string",["id"]],["literal",e.map(String)]]];return t?["all",t,n]:n}(e,n,o);t.setFilter(r,i)}},o=e(449);function i(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}var a=function(t){return"string"==typeof t.geojson&&!!t.idProperty&&"function"==typeof t.transformRequest},l=function(t){var r,e=0,n=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,r){if(t){if("string"==typeof t)return i(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==e.return||e.return()}finally{if(u)throw a}}}}(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;e=Math.trunc((e<<5)-e+o.codePointAt(0))}}catch(t){n.e(t)}finally{n.f()}return Math.abs(e).toString(36)},u=function(t){if(t.tiles){var r=Array.isArray(t.tiles)?t.tiles.join(","):t.tiles;return"tiles-".concat(l(r))}return t.geojson?a(t)?"geojson-dynamic-".concat(t.id):"string"==typeof t.geojson?"geojson-".concat(l(t.geojson)):"geojson-".concat(t.id):"source-".concat(t.id)},s=function(t){if(function(t){return!!t.symbol}(t))return{fillLayerId:null,strokeLayerId:null,symbolLayerId:t.id};var r=!!t.fill&&"transparent"!==t.fill||(0,o.vY)(t),e=!!t.stroke,n=r?t.id:null,i=null;return e&&(i=r?"".concat(t.id,"-stroke"):t.id),{fillLayerId:n,strokeLayerId:i,symbolLayerId:null}},c=function(t,r){return{fillLayerId:"".concat(t,"-").concat(r),strokeLayerId:"".concat(t,"-").concat(r,"-stroke"),symbolLayerId:"".concat(t,"-").concat(r,"-symbol")}},y=function(t){var r;if(null!==(r=t.sublayers)&&void 0!==r&&r.length)return t.sublayers.flatMap(function(r){var e=c(t.id,r.id),n=e.fillLayerId;return[e.strokeLayerId,n,e.symbolLayerId]});var e=s(t),n=e.fillLayerId;return[e.strokeLayerId,n,e.symbolLayerId].filter(Boolean)},f=e(247),m=e(933),p=e(121);function d(t,r){if(t){if("string"==typeof t)return b(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?b(t,r):void 0}}function b(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}var v=function(t){var r,e,n=(e=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=i.call(e)).done)&&(l.push(n.value),l.length!==r);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(r,e)||d(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1],a=function(t){return t<=.25?"left":t>=.75?"right":""}(o),l=function(t){return t<=.25?"top":t>=.75?"bottom":""}(i);return l+(a&&l?"-":"")+a||"center"},h=function(t,r,e){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,i=(0,p.s8)(t,e);if(!i)return null;var a=(0,p.sR)(t),l=n?e.resolveSelected(i,a,r):e.resolve(i,a,r);return"symbol-".concat(n?"sel-":"").concat(function(t){var r,e=0,n=function(t){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=d(t))){r&&(t=r);var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;e=Math.trunc((e<<5)-e+o.codePointAt(0))}}catch(t){n.e(t)}finally{n.f()}return Math.abs(e).toString(36)}(l),"-").concat(o,"x")};function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function S(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function _(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?S(Object(e),!0).forEach(function(r){P(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):S(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}function P(t,r,e){return(r=function(t){var r=function(t){if("object"!=g(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=g(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}new Map;var w=function(t,r,e,n,i,a,l){var u=l.mapStyleId,s=l.patternRegistry,c=l.pixelRatio,y=void 0===c?1:c;if(e&&!t.getLayer(e)&&(r.fill||(0,o.vY)(r))){var m=(0,o.vY)(r)?(0,o.zp)(r,u,s,y):null,p=m?{"fill-pattern":m,"fill-opacity":r.opacity||1}:{"fill-color":(0,f.o)(r.fill,u),"fill-opacity":r.opacity||1};t.addLayer(_({id:e,type:"fill",source:n,"source-layer":i,minzoom:r.minZoom,maxzoom:r.maxZoom,layout:{visibility:a},paint:p},r.filter?{filter:r.filter}:{}))}},O=function(t,r,e,n,o,i,a){e&&r.stroke&&!t.getLayer(e)&&t.addLayer(_({id:e,type:"line",source:n,"source-layer":o,minzoom:r.minZoom,maxzoom:r.maxZoom,layout:{visibility:i},paint:_({"line-color":(0,f.o)(r.stroke,a),"line-width":r.strokeWidth||1,"line-opacity":r.opacity||1},r.strokeDashArray?{"line-dasharray":r.strokeDashArray}:{})},r.filter?{filter:r.filter}:{}))},k=function(t,r,e,n,o,i,a){var l=a.mapStyle,u=a.symbolRegistry,s=a.pixelRatio;if(e&&!t.getLayer(e)){var c=(0,p.s8)(r,u);if(c){var y=h(r,l,u,!1,s);if(y){var f=(0,p.Op)(r,c);t.addLayer(_({id:e,type:"symbol",source:n,"source-layer":o,minzoom:r.minZoom,maxzoom:r.maxZoom,layout:{visibility:i,"icon-image":y,"icon-anchor":v(f),"icon-allow-overlap":!0}},r.filter?{filter:r.filter}:{}))}}}},L=function(t,r,e,n,o,i){var a,l=i.mapStyle,u=i.symbolRegistry,s=i.patternRegistry,y=i.pixelRatio,f=l.id,d=(0,m.m)(r,e),b=c(r.id,e.id),v=b.fillLayerId,h=b.strokeLayerId,g=b.symbolLayerId,S="hidden"===r.visibility,_="hidden"===(null===(a=r.sublayerVisibility)||void 0===a?void 0:a[e.id]),P=S||_?"none":"visible";(0,p.Lo)(d)&&u?k(t,d,g,n,o,P,{mapStyle:l,symbolRegistry:u,pixelRatio:y}):(w(t,d,v,n,o,P,{mapStyleId:f,patternRegistry:s,pixelRatio:y}),O(t,d,h,n,o,P,f))},j=function(t,r){return t.flatMap(function(t){var r,e=(0,o.vY)(t)?[t]:[];return null!==(r=t.sublayers)&&void 0!==r&&r.length&&t.sublayers.forEach(function(r){var n=(0,m.m)(t,r);(0,o.vY)(n)&&e.push(n)}),e})},I=function(t){return t.flatMap(function(t){var r,e=(0,p.Lo)(t)?[t]:[];return null!==(r=t.sublayers)&&void 0!==r&&r.length&&t.sublayers.forEach(function(r){var n=(0,m.m)(t,r);(0,p.Lo)(n)&&e.push(n)}),e})};e(738);new Set,new Set,e(287);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function R(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function x(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?R(Object(e),!0).forEach(function(r){E(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):R(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}function E(t,r,e){return(r=function(t){var r=function(t){if("object"!=C(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=C(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==C(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var A={slot:"middle",open:!1,dismissible:!0,modal:!0},D=(x({},A),x(x({},A),{},{width:"500px"}),x(x({},A),{},{width:"500px"}),{small:1,medium:1.5,large:2});function F(t){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(t)}function M(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=i.call(e)).done)&&(l.push(n.value),l.length!==r);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,r)||function(t,r){if(t){if("string"==typeof t)return B(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?B(t,r):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function T(){var t,r,e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",o=e.toStringTag||"@@toStringTag";function i(e,n,o,i){var u=n&&n.prototype instanceof l?n:l,s=Object.create(u.prototype);return z(s,"_invoke",function(e,n,o){var i,l,u,s=0,c=o||[],y=!1,f={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(r,e){return i=r,l=0,u=t,f.n=e,a}};function m(e,n){for(l=e,u=n,r=0;!y&&s&&!o&&r<c.length;r++){var o,i=c[r],m=f.p,p=i[2];e>3?(o=p===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=m&&((o=e<2&&m<i[1])?(l=0,f.v=n,f.n=i[1]):m<p&&(o=e<3||i[0]>n||n>p)&&(i[4]=e,i[5]=n,f.n=p,l=0))}if(o||e>1)return a;throw y=!0,n}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(y&&1===c&&m(c,p),l=c,u=p;(r=l<2?t:u)||!y;){i||(l?l<3?(l>1&&(f.n=-1),m(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(o="next"),r=i[o]){if(!(r=r.call(i,u)))throw TypeError("iterator result is not an object");if(!r.done)return r;u=r.value,l<2&&(l=0)}else 1===l&&(r=i.return)&&r.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((r=(y=f.n<0)?u:e.call(n,f))!==a)break}catch(r){i=t,l=1,u=r}finally{s=1}}return{value:r,done:y}}}(e,o,i),!0),s}var a={};function l(){}function u(){}function s(){}r=Object.getPrototypeOf;var c=[][n]?r(r([][n]())):(z(r={},n,function(){return this}),r),y=s.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,z(t,o,"GeneratorFunction")),t.prototype=Object.create(y),t}return u.prototype=s,z(y,"constructor",s),z(s,"constructor",u),u.displayName="GeneratorFunction",z(s,o,"GeneratorFunction"),z(y),z(y,o,"Generator"),z(y,n,function(){return this}),z(y,"toString",function(){return"[object Generator]"}),(T=function(){return{w:i,m:f}})()}function z(t,r,e,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}z=function(t,r,e,n){function i(r,e){z(t,r,function(t){return this._invoke(r,e,t)})}r?o?o(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n}):t[r]=e:(i("next",0),i("throw",1),i("return",2))},z(t,r,e,n)}function Z(t,r,e,n,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void e(t)}l.done?r(u):Promise.resolve(u).then(n,o)}function W(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var i=t.apply(r,e);function a(t){Z(i,n,o,a,l,"next",t)}function l(t){Z(i,n,o,a,l,"throw",t)}a(void 0)})}}function V(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,G(n.key),n)}}function G(t){var r=function(t){if("object"!=F(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=F(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==F(r)?r:r+""}var Y=function(){return t=function t(r,e,n){!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this._mapProvider=r,this._map=r.map,this._symbolRegistry=e,this._patternRegistry=n,this._datasetSourceMap=new Map,this._symbolLayerIds=new Set},r=[{key:"init",value:(d=W(T().m(function t(r,e){var n,o,i=this;return T().w(function(t){for(;;)switch(t.n){case 0:return n=e.id,o=this._pixelRatio,t.n=1,Promise.all([this._mapProvider.registerPatterns(j(r,this._patternRegistry),n,this._patternRegistry),this._mapProvider.registerSymbols(I(r),e,this._symbolRegistry)]);case 1:return this._symbolLayerIds.clear(),r.forEach(function(t){return i._addLayers(t,e,o)}),t.n=2,new Promise(function(t){return i._map.once("idle",t)});case 2:return t.a(2)}},t,this)})),function(t,r){return d.apply(this,arguments)})},{key:"destroy",value:function(t){var r=this,e=new Set;t.forEach(function(t){var n=u(t);r._getLayersUsingSource(n).forEach(function(t){r._map.getLayer(t)&&r._map.removeLayer(t)}),!e.has(n)&&r._map.getSource(n)&&(r._map.removeSource(n),e.add(n))}),this._datasetSourceMap.clear()}},{key:"onStyleChange",value:(f=W(T().m(function t(r,e,n,o){var i,a,l=this;return T().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,new Promise(function(t){return l._map.once("idle",t)});case 1:return i=e.id,a=this._pixelRatio,t.n=2,Promise.all([this._mapProvider.registerPatterns(j(r,this._patternRegistry),i,this._patternRegistry),this._mapProvider.registerSymbols(I(r),e,this._symbolRegistry)]);case 2:this._symbolLayerIds.clear(),r.forEach(function(t){return l._addLayers(t,e,a)}),o.forEach(function(t){return t.reapply()}),Object.entries(n).forEach(function(t){var e=M(t,2),n=e[0],o=e[1],i=o.idProperty,a=o.ids,u=r.find(function(t){return t.id===n});u&&l._applyFeatureFilter(u,i,a)});case 3:return t.a(2)}},t,this)})),function(t,r,e,n){return f.apply(this,arguments)})},{key:"onSizeChange",value:(l=W(T().m(function t(r,e){var n,i=this;return T().w(function(t){for(;;)switch(t.n){case 0:return n=this._pixelRatio,t.n=1,Promise.all([this._mapProvider.registerSymbols(I(r),e,this._symbolRegistry),this._mapProvider.registerPatterns(j(r,this._patternRegistry),e.id,this._patternRegistry)]);case 1:r.forEach(function(t){var r;if(y(t).forEach(function(r){if(i._symbolLayerIds.has(r)&&i._map.getLayer(r)){var o=h(t,e,i._symbolRegistry,!1,n);o&&i._map.setLayoutProperty(r,"icon-image",o)}}),(0,o.vY)(t)){var a=s(t).fillLayerId;if(i._map.getLayer(a)){var l=(0,o.zp)(t,e.id,i._patternRegistry,n);l&&i._map.setPaintProperty(a,"fill-pattern",l)}}null===(r=t.sublayers)||void 0===r||r.forEach(function(r){var a=(0,m.m)(t,r),l=c(t.id,r.id),u=l.symbolLayerId,s=l.fillLayerId;if(i._map.getLayer(u)){var y=h(a,e,i._symbolRegistry,!1,n);y&&i._map.setLayoutProperty(u,"icon-image",y)}if((0,o.vY)(a)&&i._map.getLayer(s)){var f=(0,o.zp)(a,e.id,i._patternRegistry,n);f&&i._map.setPaintProperty(s,"fill-pattern",f)}})});case 2:return t.a(2)}},t,this)})),function(t,r){return l.apply(this,arguments)})},{key:"addDataset",value:function(t,r){this._addLayers(t,r,this._pixelRatio)}},{key:"removeDataset",value:function(t,r){var e=this,n=u(t);y(t).forEach(function(t){e._map.getLayer(t)&&e._map.removeLayer(t),e._symbolLayerIds.delete(t)}),!r.some(function(r){return r.id!==t.id&&u(r)===n})&&this._map.getSource(n)&&this._map.removeSource(n),this._datasetSourceMap.delete(t.id)}},{key:"showDataset",value:function(t){this._setDatasetVisibility(t,"visible")}},{key:"hideDataset",value:function(t){this._setDatasetVisibility(t,"none")}},{key:"showSublayer",value:function(t,r){var e=this,n=c(t,r);[n.fillLayerId,n.strokeLayerId,n.symbolLayerId].forEach(function(t){e._map.getLayer(t)&&e._map.setLayoutProperty(t,"visibility","visible")})}},{key:"hideSublayer",value:function(t,r){var e=this,n=c(t,r);[n.fillLayerId,n.strokeLayerId,n.symbolLayerId].forEach(function(t){e._map.getLayer(t)&&e._map.setLayoutProperty(t,"visibility","none")})}},{key:"showFeatures",value:function(t,r,e){this._applyFeatureFilter(t,r,e)}},{key:"hideFeatures",value:function(t,r,e){this._applyFeatureFilter(t,r,e)}},{key:"setStyle",value:(i=W(T().m(function t(r,e){var n,o,i=this;return T().w(function(t){for(;;)switch(t.n){case 0:return n=e.id,o=this._pixelRatio,y(r).forEach(function(t){i._map.getLayer(t)&&i._map.removeLayer(t),i._symbolLayerIds.delete(t)}),t.n=1,Promise.all([this._mapProvider.registerPatterns(j([r],this._patternRegistry),n,this._patternRegistry),this._mapProvider.registerSymbols(I([r]),e,this._symbolRegistry)]);case 1:this._addLayers(r,e,o);case 2:return t.a(2)}},t,this)})),function(t,r){return i.apply(this,arguments)})},{key:"setSublayerStyle",value:(e=W(T().m(function t(r,e,n){var o,i,a,l,u,s,y,f,m,p,d,b=this;return T().w(function(t){for(;;)switch(t.n){case 0:if(a=n.id,l=this._pixelRatio,u=c(r.id,e),s=u.fillLayerId,y=u.strokeLayerId,f=u.symbolLayerId,[s,y,f].forEach(function(t){b._map.getLayer(t)&&b._map.removeLayer(t),b._symbolLayerIds.delete(t)}),m=null===(o=r.sublayers)||void 0===o?void 0:o.find(function(t){return t.id===e})){t.n=1;break}return t.a(2);case 1:return t.n=2,Promise.all([this._mapProvider.registerPatterns(j([r],this._patternRegistry),a,this._patternRegistry),this._mapProvider.registerSymbols(I([r]),n,this._symbolRegistry)]);case 2:p=this._datasetSourceMap.get(r.id),d=null!==(i=r.tiles)&&void 0!==i&&i.length?r.sourceLayer:void 0,L(this._map,r,m,p,d,{mapStyle:n,symbolRegistry:this._symbolRegistry,patternRegistry:this._patternRegistry,pixelRatio:l}),this._maintainSymbolOrdering(r);case 3:return t.a(2)}},t,this)})),function(t,r,n){return e.apply(this,arguments)})},{key:"setOpacity",value:function(t,r){var e=this,n=this._map.getStyle();null!=n&&n.layers&&n.layers.filter(function(r){return r.id===t||r.id.startsWith("".concat(t,"-"))}).forEach(function(t){return e._setPaintOpacity(t.id,r)})}},{key:"setSublayerOpacity",value:function(t,r,e){var n=c(t,r),o=n.fillLayerId,i=n.strokeLayerId;this._setPaintOpacity(o,e),this._setPaintOpacity(i,e)}},{key:"setData",value:function(t,r){var e=this._datasetSourceMap.get(t);if(e){var n=this._map.getSource(e);n&&"function"==typeof n.setData&&n.setData(r)}}},{key:"_pixelRatio",get:function(){return this._mapProvider.map.getPixelRatio()*(D[this._mapProvider.mapSize]||1)}},{key:"_addLayers",value:function(t,r,e){var n=function(t,r,e,n,o,i){var l,c,y=e.id,f=u(r);!function(t,r,e){if(!t.getSource(e))if(r.tiles)t.addSource(e,{type:"vector",tiles:r.tiles,minzoom:r.minZoom||0,maxzoom:r.maxZoom||22});else if(r.geojson){var n=a(r)?{type:"FeatureCollection",features:[]}:r.geojson;t.addSource(e,{type:"geojson",data:n,generateId:!0})}}(t,r,f);var m=null!==(l=r.tiles)&&void 0!==l&&l.length?r.sourceLayer:void 0;if(null!==(c=r.sublayers)&&void 0!==c&&c.length)return r.sublayers.forEach(function(a){L(t,r,a,f,m,{mapStyle:e,symbolRegistry:n,patternRegistry:o,pixelRatio:i})}),f;var d=s(r),b=d.fillLayerId,v=d.strokeLayerId,h=d.symbolLayerId,g="hidden"===r.visibility?"none":"visible";return(0,p.Lo)(r)&&n?(k(t,r,h,f,m,g,{mapStyle:e,symbolRegistry:n,pixelRatio:i}),f):(w(t,r,b,f,m,g,{mapStyleId:y,patternRegistry:o,pixelRatio:i}),O(t,r,v,f,m,g,y),f)}(this._map,t,r,this._symbolRegistry,this._patternRegistry,e);this._datasetSourceMap.set(t.id,n),this._maintainSymbolOrdering(t)}},{key:"_getFirstSymbolLayerId",value:function(){var t,r=this,e=this._map.getStyle();if(null==e||!e.layers)return null;var n=e.layers.find(function(t){return r._symbolLayerIds.has(t.id)});return null!==(t=null==n?void 0:n.id)&&void 0!==t?t:null}},{key:"_maintainSymbolOrdering",value:function(t){var r=this,e=y(t).filter(function(t){return t&&r._map.getLayer(t)});e.forEach(function(t){var e;"symbol"===(null===(e=r._map.getLayer(t))||void 0===e?void 0:e.type)?r._symbolLayerIds.add(t):r._symbolLayerIds.delete(t)});var n=this._getFirstSymbolLayerId();n&&e.forEach(function(t){r._symbolLayerIds.has(t)||r._map.moveLayer(t,n)})}},{key:"_setDatasetVisibility",value:function(t,r){var e=this,n=this._map.getStyle();null!=n&&n.layers&&n.layers.filter(function(r){return r.id===t||r.id.startsWith("".concat(t,"-"))}).forEach(function(t){return e._map.setLayoutProperty(t.id,"visibility",r)})}},{key:"_applyFeatureFilter",value:function(t,r,e){var o,i=this;if(null!==(o=t.sublayers)&&void 0!==o&&o.length)t.sublayers.forEach(function(o){var a=c(t.id,o.id),l=a.fillLayerId,u=a.strokeLayerId,s=t.filter&&o.filter?["all",t.filter,o.filter]:o.filter||t.filter||null;n(i._map,l,s,r,e),n(i._map,u,s,r,e)});else{var a=s(t),l=a.fillLayerId,u=a.strokeLayerId,y=a.symbolLayerId,f=t.filter||null;[l,u,y].filter(Boolean).forEach(function(t){n(i._map,t,f,r,e)})}}},{key:"_setPaintOpacity",value:function(t,r){var e=this._map.getLayer(t);if(e){var n={line:"line-opacity",symbol:"icon-opacity"}[e.type]||"fill-opacity";this._map.setPaintProperty(t,n,r)}}},{key:"_getLayersUsingSource",value:function(t){var r=this._map.getStyle();return null!=r&&r.layers?r.layers.filter(function(r){return r.source===t}).map(function(t){return t.id}):[]}}],r&&V(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,e,i,l,f,d}()},772(t,r,e){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function i(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?o(Object(e),!0).forEach(function(r){a(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):o(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}function a(t,r,e){return(r=function(t){var r=function(t){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=n(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}e.d(r,{V:()=>l,ns:()=>y,p_:()=>c});var l={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visibility:"visible",style:{stroke:"#d4351c",strokeWidth:2,fill:"transparent",symbolDescription:"red outline"}},u=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription","keySymbolShape","symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"],s=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],c=function(t){return s.some(function(r){return r in t})},y=function(t,r){var e=t.style||{},n=i(i({},r.style),e);!("symbolDescription"in e)&&c(e)&&delete n.symbolDescription;var o=i({},t);delete o.style,u.forEach(function(t){return delete o[t]});var a=i({},r);return delete a.style,i(i(i({},a),o),n)}},933(t,r,e){e.d(r,{m:()=>u});var n=e(772);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function a(t,r,e){return(r=function(t){var r=function(t){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=o(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var l=function(t,r){return"symbolDescription"in r?r.symbolDescription:(0,n.p_)(r)?void 0:t.symbolDescription},u=function(t,r){var e,n,o,u,s,c,y,f,m,p,d,b,v,h,g,S,_,P=r.style||{},w=(S=t.filter,_=r.filter,S&&_?["all",S,_]:_||S||null);return function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?i(Object(e),!0).forEach(function(r){a(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):i(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}({id:r.id,label:r.label,stroke:null!==(e=P.stroke)&&void 0!==e?e:t.stroke,strokeWidth:null!==(n=P.strokeWidth)&&void 0!==n?n:t.strokeWidth,strokeDashArray:null!==(o=P.strokeDashArray)&&void 0!==o?o:t.strokeDashArray,opacity:null!==(u=P.opacity)&&void 0!==u?u:t.opacity,keySymbolShape:null!==(s=P.keySymbolShape)&&void 0!==s?s:t.keySymbolShape,symbolDescription:l(t,P),showInKey:null!==(c=r.showInKey)&&void 0!==c?c:t.showInKey,showInMenu:null!==(y=r.showInMenu)&&void 0!==y&&y,filter:w,minZoom:t.minZoom,maxZoom:t.maxZoom,symbol:null!==(f=P.symbol)&&void 0!==f?f:t.symbol,symbolSvgContent:null!==(m=P.symbolSvgContent)&&void 0!==m?m:t.symbolSvgContent,symbolViewBox:null!==(p=P.symbolViewBox)&&void 0!==p?p:t.symbolViewBox,symbolAnchor:null!==(d=P.symbolAnchor)&&void 0!==d?d:t.symbolAnchor,symbolBackgroundColor:null!==(b=P.symbolBackgroundColor)&&void 0!==b?b:t.symbolBackgroundColor,symbolForegroundColor:null!==(v=P.symbolForegroundColor)&&void 0!==v?v:t.symbolForegroundColor,symbolHaloWidth:null!==(h=P.symbolHaloWidth)&&void 0!==h?h:t.symbolHaloWidth,symbolGraphic:null!==(g=P.symbolGraphic)&&void 0!==g?g:t.symbolGraphic},function(t,r){var e,n;return r.fillPattern||r.fillPatternSvgContent?{fillPattern:r.fillPattern,fillPatternSvgContent:r.fillPatternSvgContent,fillPatternForegroundColor:null!==(e=r.fillPatternForegroundColor)&&void 0!==e?e:t.fillPatternForegroundColor,fillPatternBackgroundColor:null!==(n=r.fillPatternBackgroundColor)&&void 0!==n?n:t.fillPatternBackgroundColor}:"fill"in r?{fill:r.fill}:{fill:t.fill,fillPattern:t.fillPattern,fillPatternSvgContent:t.fillPatternSvgContent,fillPatternForegroundColor:t.fillPatternForegroundColor,fillPatternBackgroundColor:t.fillPatternBackgroundColor}}(t,P))}},247(t,r,e){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}e.d(r,{o:()=>o});var o=function(t,r){if(!t)return null;if("string"==typeof t)return t.trim();if("object"===n(t)){if(r&&t[r])return t[r];var e=Object.values(t)[0];return null!=e?e:null}return null}},449(t,r,e){e.d(r,{qS:()=>s,vY:()=>a,zp:()=>u});var n=e(247);function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}var i=function(t,r,e){return t.replace(/\{\{foregroundColor\}\}/g,r||"black").replace(/\{\{backgroundColor\}\}/g,e||"transparent")},a=function(t){return!(!t.fillPattern&&!t.fillPatternSvgContent)},l=function(t,r){return t.fillPatternSvgContent?t.fillPatternSvgContent:t.fillPattern&&null!==(e=null==r||null===(n=r.get(t.fillPattern))||void 0===n?void 0:n.svgContent)&&void 0!==e?e:null;var e,n},u=function(t,r,e){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=l(t,e);if(!a)return null;var u=(0,n.o)(t.fillPatternForegroundColor,r)||"black",s=(0,n.o)(t.fillPatternBackgroundColor,r)||"transparent",c=Math.max(2,i);return"pattern-".concat(function(t){var r,e=0,n=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,r){if(t){if("string"==typeof t)return o(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==e.return||e.return()}finally{if(u)throw a}}}}(t);try{for(n.s();!(r=n.n()).done;)e=(e<<5)-e+r.value.codePointAt(0),e&=e}catch(t){n.e(t)}finally{n.f()}return Math.abs(e).toString(36)}(a+u+s),"-").concat(c,"x")},s=function(t,r,e){var o=l(t,e);if(!o)return null;var a=(0,n.o)(t.fillPatternForegroundColor,r)||"black",u=(0,n.o)(t.fillPatternBackgroundColor,r)||"transparent",s=(0,n.o)(t.stroke,r)||a;return{border:i('<path d="M19 2.862v14.275c0 1.028-.835 1.862-1.862 1.862H2.863c-1.028 0-1.862-.835-1.862-1.862V2.862C1.001 1.834 1.836 1 2.863 1h14.275C18.166 1 19 1.835 19 2.862z" fill="{{backgroundColor}}" stroke="{{foregroundColor}}" stroke-width="2"/>',s,u),content:i(o,a,u)}}},121(t,r,e){e.d(r,{Lo:()=>o,Op:()=>u,n8:()=>l,s8:()=>i,sR:()=>a});var n=new Set(["symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"]),o=function(t){return!(!t.symbol&&!t.symbolSvgContent)},i=function(t,r){return t.symbolSvgContent?{svg:t.symbolSvgContent}:t.symbol?r.get(t.symbol):void 0},a=function(t){if(!o(t))return{};var r={};return n.forEach(function(e){if(null!=t[e]){var n=e.charAt(6).toLowerCase()+e.slice(7);r[n]=t[e]}}),r},l=function(t,r){var e;return t.symbolViewBox?t.symbolViewBox:null!==(e=null==r?void 0:r.viewBox)&&void 0!==e?e:"0 0 38 38"},u=function(t,r){var e;return t.symbolAnchor?t.symbolAnchor:null!==(e=null==r?void 0:r.anchor)&&void 0!==e?e:[.5,.5]}}}]);
2
+ "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[580],{132(t,r,e){e.r(r),e.d(r,{default:()=>F});var o=function(t,r,e,o,n){if(t.getLayer(r)){var i=function(t,r,e){if(!e||0===e.length)return t;var o=["!",["in",r?["to-string",["get",r]]:["to-string",["id"]],["literal",e.map(String)]]];return t?["all",t,o]:o}(e,o,n);t.setFilter(r,i)}},n=e(449);function i(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=Array(r);e<r;e++)o[e]=t[e];return o}var a=function(t){return"string"==typeof t.geojson&&!!t.idProperty&&"function"==typeof t.transformRequest},l=function(t){var r,e=0,o=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,r){if(t){if("string"==typeof t)return i(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0,n=function(){};return{s:n,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==e.return||e.return()}finally{if(u)throw a}}}}(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;e=Math.trunc((e<<5)-e+n.codePointAt(0))}}catch(t){o.e(t)}finally{o.f()}return Math.abs(e).toString(36)},u=function(t){if(t.tiles){var r=Array.isArray(t.tiles)?t.tiles.join(","):t.tiles;return"tiles-".concat(l(r))}return t.geojson?a(t)?"geojson-dynamic-".concat(t.id):"string"==typeof t.geojson?"geojson-".concat(l(t.geojson)):"geojson-".concat(t.id):"source-".concat(t.id)},s=function(t){if(function(t){return!!t.symbol}(t))return{fillLayerId:null,strokeLayerId:null,symbolLayerId:t.id};var r=!!t.fill&&"transparent"!==t.fill||(0,n.vY)(t),e=!!t.stroke,o=r?t.id:null,i=null;return e&&(i=r?"".concat(t.id,"-stroke"):t.id),{fillLayerId:o,strokeLayerId:i,symbolLayerId:null}},y=function(t,r){return{fillLayerId:"".concat(t,"-").concat(r),strokeLayerId:"".concat(t,"-").concat(r,"-stroke"),symbolLayerId:"".concat(t,"-").concat(r,"-symbol")}},c=function(t){var r;if(null!==(r=t.sublayers)&&void 0!==r&&r.length)return t.sublayers.flatMap(function(r){var e=y(t.id,r.id),o=e.fillLayerId;return[e.strokeLayerId,o,e.symbolLayerId]});var e=s(t),o=e.fillLayerId;return[e.strokeLayerId,o,e.symbolLayerId].filter(Boolean)},f=e(247),m=e(933),p=e(121);function d(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=Array(r);e<r;e++)o[e]=t[e];return o}var b=function(t){var r,e,o=(e=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var o,n,i,a,l=[],u=!0,s=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(o=i.call(e)).done)&&(l.push(o.value),l.length!==r);u=!0);}catch(t){s=!0,n=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw n}}return l}}(r,e)||function(t,r){if(t){if("string"==typeof t)return d(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?d(t,r):void 0}}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),n=o[0],i=o[1],a=function(t){return t<=.25?"left":t>=.75?"right":""}(n),l=function(t){return t<=.25?"top":t>=.75?"bottom":""}(i);return l+(a&&l?"-":"")+a||"center"};function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function h(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function g(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?h(Object(e),!0).forEach(function(r){S(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):h(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}function S(t,r,e){return(r=function(t){var r=function(t){if("object"!=v(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=v(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var _=function(t,r,e,o,i,a,l){var u=l.mapStyleId,s=l.patternRegistry,y=l.pixelRatio,c=void 0===y?1:y;if(e&&!t.getLayer(e)&&(r.fill||(0,n.vY)(r))){var m=(0,n.vY)(r)?s.getPatternImageId(r,u,c):null,p=m?{"fill-pattern":m,"fill-opacity":r.opacity||1}:{"fill-color":(0,f.o)(r.fill,u),"fill-opacity":r.opacity||1};t.addLayer(g({id:e,type:"fill",source:o,"source-layer":i,minzoom:r.minZoom,maxzoom:r.maxZoom,layout:{visibility:a},paint:p},r.filter?{filter:r.filter}:{}))}},P=function(t,r,e,o,n,i,a){e&&r.stroke&&!t.getLayer(e)&&t.addLayer(g({id:e,type:"line",source:o,"source-layer":n,minzoom:r.minZoom,maxzoom:r.maxZoom,layout:{visibility:i},paint:g({"line-color":(0,f.o)(r.stroke,a),"line-width":r.strokeWidth||1,"line-opacity":r.opacity||1},r.strokeDashArray?{"line-dasharray":r.strokeDashArray}:{})},r.filter?{filter:r.filter}:{}))},L=function(t,r,e,o,n,i,a){var l=a.mapStyle,u=a.symbolRegistry,s=a.pixelRatio;if(e&&!t.getLayer(e)){var y=u.getSymbolDef(r);if(y){var c=u.getSymbolImageId(r,l,!1,s);if(c){var f=(0,p.Op)(r,y);t.addLayer(g({id:e,type:"symbol",source:o,"source-layer":n,minzoom:r.minZoom,maxzoom:r.maxZoom,layout:{visibility:i,"icon-image":c,"icon-anchor":b(f),"icon-allow-overlap":!0}},r.filter?{filter:r.filter}:{}))}}}},w=function(t,r,e,o,n,i){var a,l=i.mapStyle,u=i.symbolRegistry,s=i.patternRegistry,c=i.pixelRatio,f=l.id,d=(0,m.m)(r,e),b=y(r.id,e.id),v=b.fillLayerId,h=b.strokeLayerId,g=b.symbolLayerId,S="hidden"===r.visibility,w="hidden"===(null===(a=r.sublayerVisibility)||void 0===a?void 0:a[e.id]),k=S||w?"none":"visible";(0,p.Lo)(d)&&u?L(t,d,g,o,n,k,{mapStyle:l,symbolRegistry:u,pixelRatio:c}):(_(t,d,v,o,n,k,{mapStyleId:f,patternRegistry:s,pixelRatio:c}),P(t,d,h,o,n,k,f))},k=function(t,r){return t.flatMap(function(t){var r,e=(0,n.vY)(t)?[t]:[];return null!==(r=t.sublayers)&&void 0!==r&&r.length&&t.sublayers.forEach(function(r){var o=(0,m.m)(t,r);(0,n.vY)(o)&&e.push(o)}),e})},O=function(t){return t.flatMap(function(t){var r,e=(0,p.Lo)(t)?[t]:[];return null!==(r=t.sublayers)&&void 0!==r&&r.length&&t.sublayers.forEach(function(r){var o=(0,m.m)(t,r);(0,p.Lo)(o)&&e.push(o)}),e})};function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function j(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var o,n,i,a,l=[],u=!0,s=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(o=i.call(e)).done)&&(l.push(o.value),l.length!==r);u=!0);}catch(t){s=!0,n=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw n}}return l}}(t,r)||function(t,r){if(t){if("string"==typeof t)return R(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?R(t,r):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=Array(r);e<r;e++)o[e]=t[e];return o}function C(){var t,r,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function i(e,o,n,i){var u=o&&o.prototype instanceof l?o:l,s=Object.create(u.prototype);return E(s,"_invoke",function(e,o,n){var i,l,u,s=0,y=n||[],c=!1,f={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(r,e){return i=r,l=0,u=t,f.n=e,a}};function m(e,o){for(l=e,u=o,r=0;!c&&s&&!n&&r<y.length;r++){var n,i=y[r],m=f.p,p=i[2];e>3?(n=p===o)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=m&&((n=e<2&&m<i[1])?(l=0,f.v=o,f.n=i[1]):m<p&&(n=e<3||i[0]>o||o>p)&&(i[4]=e,i[5]=o,f.n=p,l=0))}if(n||e>1)return a;throw c=!0,o}return function(n,y,p){if(s>1)throw TypeError("Generator is already running");for(c&&1===y&&m(y,p),l=y,u=p;(r=l<2?t:u)||!c;){i||(l?l<3?(l>1&&(f.n=-1),m(l,u)):f.n=u:f.v=u);try{if(s=2,i){if(l||(n="next"),r=i[n]){if(!(r=r.call(i,u)))throw TypeError("iterator result is not an object");if(!r.done)return r;u=r.value,l<2&&(l=0)}else 1===l&&(r=i.return)&&r.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+n+"' method"),l=1);i=t}else if((r=(c=f.n<0)?u:e.call(o,f))!==a)break}catch(r){i=t,l=1,u=r}finally{s=1}}return{value:r,done:c}}}(e,n,i),!0),s}var a={};function l(){}function u(){}function s(){}r=Object.getPrototypeOf;var y=[][o]?r(r([][o]())):(E(r={},o,function(){return this}),r),c=s.prototype=l.prototype=Object.create(y);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,E(t,n,"GeneratorFunction")),t.prototype=Object.create(c),t}return u.prototype=s,E(c,"constructor",s),E(s,"constructor",u),u.displayName="GeneratorFunction",E(s,n,"GeneratorFunction"),E(c),E(c,n,"Generator"),E(c,o,function(){return this}),E(c,"toString",function(){return"[object Generator]"}),(C=function(){return{w:i,m:f}})()}function E(t,r,e,o){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}E=function(t,r,e,o){function i(r,e){E(t,r,function(t){return this._invoke(r,e,t)})}r?n?n(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(i("next",0),i("throw",1),i("return",2))},E(t,r,e,o)}function x(t,r,e,o,n,i,a){try{var l=t[i](a),u=l.value}catch(t){return void e(t)}l.done?r(u):Promise.resolve(u).then(o,n)}function D(t){return function(){var r=this,e=arguments;return new Promise(function(o,n){var i=t.apply(r,e);function a(t){x(i,o,n,a,l,"next",t)}function l(t){x(i,o,n,a,l,"throw",t)}a(void 0)})}}function A(t,r){for(var e=0;e<r.length;e++){var o=r[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,M(o.key),o)}}function M(t){var r=function(t){if("object"!=I(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=I(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==I(r)?r:r+""}var F=function(){return t=function t(r,e,o){!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this._mapProvider=r,this._map=r.map,this._symbolRegistry=e,this._patternRegistry=o,this._datasetSourceMap=new Map,this._symbolLayerIds=new Set},r=[{key:"init",value:(d=D(C().m(function t(r,e){var o,n=this;return C().w(function(t){for(;;)switch(t.n){case 0:return o=e.id,t.n=1,Promise.all([this._mapProvider.addPatternsToMap(k(r,this._patternRegistry),o,this._patternRegistry),this._mapProvider.addSymbolsToMap(O(r),e,this._symbolRegistry)]);case 1:return this._symbolLayerIds.clear(),r.forEach(function(t){return n._addLayers(t,e)}),t.n=2,new Promise(function(t){return n._map.once("idle",t)});case 2:return t.a(2)}},t,this)})),function(t,r){return d.apply(this,arguments)})},{key:"destroy",value:function(t){var r=this,e=new Set;t.forEach(function(t){var o=u(t);r._getLayersUsingSource(o).forEach(function(t){r._map.getLayer(t)&&r._map.removeLayer(t)}),!e.has(o)&&r._map.getSource(o)&&(r._map.removeSource(o),e.add(o))}),this._datasetSourceMap.clear()}},{key:"onStyleChange",value:(f=D(C().m(function t(r,e,o,n){var i,a=this;return C().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,new Promise(function(t){return a._map.once("idle",t)});case 1:return i=e.id,t.n=2,Promise.all([this._mapProvider.addPatternsToMap(k(r,this._patternRegistry),i,this._patternRegistry),this._mapProvider.addSymbolsToMap(O(r),e,this._symbolRegistry)]);case 2:this._symbolLayerIds.clear(),r.forEach(function(t){return a._addLayers(t,e)}),n.forEach(function(t){return t.reapply()}),Object.entries(o).forEach(function(t){var e=j(t,2),o=e[0],n=e[1],i=n.idProperty,l=n.ids,u=r.find(function(t){return t.id===o});u&&a._applyFeatureFilter(u,i,l)});case 3:return t.a(2)}},t,this)})),function(t,r,e,o){return f.apply(this,arguments)})},{key:"onSizeChange",value:(l=D(C().m(function t(r,e){var o=this;return C().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.all([this._mapProvider.addSymbolsToMap(O(r),e,this._symbolRegistry),this._mapProvider.addPatternsToMap(k(r,this._patternRegistry),e.id,this._patternRegistry)]);case 1:r.forEach(function(t){var r;if(c(t).forEach(function(r){if(o._symbolLayerIds.has(r)&&o._map.getLayer(r)){var n=o._symbolRegistry.getSymbolImageId(t,e,!1,o._pixelRatio);n&&o._map.setLayoutProperty(r,"icon-image",n)}}),(0,n.vY)(t)){var i=s(t).fillLayerId;if(o._map.getLayer(i)){var a=o._patternRegistry.getPatternImageId(t,e.id,o._pixelRatio);a&&o._map.setPaintProperty(i,"fill-pattern",a)}}null===(r=t.sublayers)||void 0===r||r.forEach(function(r){var i=(0,m.m)(t,r),a=y(t.id,r.id),l=a.symbolLayerId,u=a.fillLayerId;if(o._map.getLayer(l)){var s=o._symbolRegistry.getSymbolImageId(i,e,!1,o._pixelRatio);s&&o._map.setLayoutProperty(l,"icon-image",s)}if((0,n.vY)(i)&&o._map.getLayer(u)){var c=o._patternRegistry.getPatternImageId(i,e.id,o._pixelRatio);c&&o._map.setPaintProperty(u,"fill-pattern",c)}})});case 2:return t.a(2)}},t,this)})),function(t,r){return l.apply(this,arguments)})},{key:"addDataset",value:function(t,r){this._addLayers(t,r)}},{key:"removeDataset",value:function(t,r){var e=this,o=u(t);c(t).forEach(function(t){e._map.getLayer(t)&&e._map.removeLayer(t),e._symbolLayerIds.delete(t)}),!r.some(function(r){return r.id!==t.id&&u(r)===o})&&this._map.getSource(o)&&this._map.removeSource(o),this._datasetSourceMap.delete(t.id)}},{key:"showDataset",value:function(t){this._setDatasetVisibility(t,"visible")}},{key:"hideDataset",value:function(t){this._setDatasetVisibility(t,"none")}},{key:"showSublayer",value:function(t,r){var e=this,o=y(t,r);[o.fillLayerId,o.strokeLayerId,o.symbolLayerId].forEach(function(t){e._map.getLayer(t)&&e._map.setLayoutProperty(t,"visibility","visible")})}},{key:"hideSublayer",value:function(t,r){var e=this,o=y(t,r);[o.fillLayerId,o.strokeLayerId,o.symbolLayerId].forEach(function(t){e._map.getLayer(t)&&e._map.setLayoutProperty(t,"visibility","none")})}},{key:"showFeatures",value:function(t,r,e){this._applyFeatureFilter(t,r,e)}},{key:"hideFeatures",value:function(t,r,e){this._applyFeatureFilter(t,r,e)}},{key:"setStyle",value:(i=D(C().m(function t(r,e){var o,n=this;return C().w(function(t){for(;;)switch(t.n){case 0:return o=e.id,c(r).forEach(function(t){n._map.getLayer(t)&&n._map.removeLayer(t),n._symbolLayerIds.delete(t)}),t.n=1,Promise.all([this._mapProvider.addPatternsToMap(k([r],this._patternRegistry),o,this._patternRegistry),this._mapProvider.addSymbolsToMap(O([r]),e,this._symbolRegistry)]);case 1:this._addLayers(r,e);case 2:return t.a(2)}},t,this)})),function(t,r){return i.apply(this,arguments)})},{key:"setSublayerStyle",value:(e=D(C().m(function t(r,e,o){var n,i,a,l,u,s,c,f,m,p,d,b=this;return C().w(function(t){for(;;)switch(t.n){case 0:if(a=o.id,l=this._pixelRatio,u=y(r.id,e),s=u.fillLayerId,c=u.strokeLayerId,f=u.symbolLayerId,[s,c,f].forEach(function(t){b._map.getLayer(t)&&b._map.removeLayer(t),b._symbolLayerIds.delete(t)}),m=null===(n=r.sublayers)||void 0===n?void 0:n.find(function(t){return t.id===e})){t.n=1;break}return t.a(2);case 1:return t.n=2,Promise.all([this._mapProvider.addPatternsToMap(k([r],this._patternRegistry),a,this._patternRegistry),this._mapProvider.addSymbolsToMap(O([r]),o,this._symbolRegistry)]);case 2:p=this._datasetSourceMap.get(r.id),d=null!==(i=r.tiles)&&void 0!==i&&i.length?r.sourceLayer:void 0,w(this._map,r,m,p,d,{mapStyle:o,symbolRegistry:this._symbolRegistry,patternRegistry:this._patternRegistry,pixelRatio:l}),this._maintainSymbolOrdering(r);case 3:return t.a(2)}},t,this)})),function(t,r,o){return e.apply(this,arguments)})},{key:"setOpacity",value:function(t,r){var e=this,o=this._map.getStyle();null!=o&&o.layers&&o.layers.filter(function(r){return r.id===t||r.id.startsWith("".concat(t,"-"))}).forEach(function(t){return e._setPaintOpacity(t.id,r)})}},{key:"setSublayerOpacity",value:function(t,r,e){var o=y(t,r),n=o.fillLayerId,i=o.strokeLayerId;this._setPaintOpacity(n,e),this._setPaintOpacity(i,e)}},{key:"setData",value:function(t,r){var e=this._datasetSourceMap.get(t);if(e){var o=this._map.getSource(e);o&&"function"==typeof o.setData&&o.setData(r)}}},{key:"_pixelRatio",get:function(){return this._mapProvider.map.getPixelRatio()}},{key:"_addLayers",value:function(t,r){var e=function(t,r,e,o,n,i){var l,y,c=e.id,f=u(r);!function(t,r,e){if(!t.getSource(e))if(r.tiles)t.addSource(e,{type:"vector",tiles:r.tiles,minzoom:r.minZoom||0,maxzoom:r.maxZoom||22});else if(r.geojson){var o=a(r)?{type:"FeatureCollection",features:[]}:r.geojson;t.addSource(e,{type:"geojson",data:o,generateId:!0})}}(t,r,f);var m=null!==(l=r.tiles)&&void 0!==l&&l.length?r.sourceLayer:void 0;if(null!==(y=r.sublayers)&&void 0!==y&&y.length)return r.sublayers.forEach(function(a){w(t,r,a,f,m,{mapStyle:e,symbolRegistry:o,patternRegistry:n,pixelRatio:i})}),f;var d=s(r),b=d.fillLayerId,v=d.strokeLayerId,h=d.symbolLayerId,g="hidden"===r.visibility?"none":"visible";return(0,p.Lo)(r)&&o?(L(t,r,h,f,m,g,{mapStyle:e,symbolRegistry:o,pixelRatio:i}),f):(_(t,r,b,f,m,g,{mapStyleId:c,patternRegistry:n,pixelRatio:i}),P(t,r,v,f,m,g,c),f)}(this._map,t,r,this._symbolRegistry,this._patternRegistry,this._pixelRatio);this._datasetSourceMap.set(t.id,e),this._maintainSymbolOrdering(t)}},{key:"_getFirstSymbolLayerId",value:function(){var t,r=this,e=this._map.getStyle();if(null==e||!e.layers)return null;var o=e.layers.find(function(t){return r._symbolLayerIds.has(t.id)});return null!==(t=null==o?void 0:o.id)&&void 0!==t?t:null}},{key:"_maintainSymbolOrdering",value:function(t){var r=this,e=c(t).filter(function(t){return t&&r._map.getLayer(t)});e.forEach(function(t){var e;"symbol"===(null===(e=r._map.getLayer(t))||void 0===e?void 0:e.type)?r._symbolLayerIds.add(t):r._symbolLayerIds.delete(t)});var o=this._getFirstSymbolLayerId();o&&e.forEach(function(t){r._symbolLayerIds.has(t)||r._map.moveLayer(t,o)})}},{key:"_setDatasetVisibility",value:function(t,r){var e=this,o=this._map.getStyle();null!=o&&o.layers&&o.layers.filter(function(r){return r.id===t||r.id.startsWith("".concat(t,"-"))}).forEach(function(t){return e._map.setLayoutProperty(t.id,"visibility",r)})}},{key:"_applyFeatureFilter",value:function(t,r,e){var n,i=this;if(null!==(n=t.sublayers)&&void 0!==n&&n.length)t.sublayers.forEach(function(n){var a=y(t.id,n.id),l=a.fillLayerId,u=a.strokeLayerId,s=t.filter&&n.filter?["all",t.filter,n.filter]:n.filter||t.filter||null;o(i._map,l,s,r,e),o(i._map,u,s,r,e)});else{var a=s(t),l=a.fillLayerId,u=a.strokeLayerId,c=a.symbolLayerId,f=t.filter||null;[l,u,c].filter(Boolean).forEach(function(t){o(i._map,t,f,r,e)})}}},{key:"_setPaintOpacity",value:function(t,r){var e=this._map.getLayer(t);if(e){var o={line:"line-opacity",symbol:"icon-opacity"}[e.type]||"fill-opacity";this._map.setPaintProperty(t,o,r)}}},{key:"_getLayersUsingSource",value:function(t){var r=this._map.getStyle();return null!=r&&r.layers?r.layers.filter(function(r){return r.source===t}).map(function(t){return t.id}):[]}}],r&&A(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,e,i,l,f,d}()},772(t,r,e){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function n(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function i(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?n(Object(e),!0).forEach(function(r){a(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):n(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}function a(t,r,e){return(r=function(t){var r=function(t){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=o(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}e.d(r,{V:()=>l,ns:()=>c,p_:()=>y});var l={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visibility:"visible",style:{stroke:"#d4351c",strokeWidth:2,fill:"transparent",symbolDescription:"red outline"}},u=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription","keySymbolShape","symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"],s=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],y=function(t){return s.some(function(r){return r in t})},c=function(t,r){var e=t.style||{},o=i(i({},r.style),e);!("symbolDescription"in e)&&y(e)&&delete o.symbolDescription;var n=i({},t);delete n.style,u.forEach(function(t){return delete n[t]});var a=i({},r);return delete a.style,i(i(i({},a),n),o)}},933(t,r,e){e.d(r,{m:()=>u});var o=e(772);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function a(t,r,e){return(r=function(t){var r=function(t){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=n(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var l=function(t,r){return"symbolDescription"in r?r.symbolDescription:(0,o.p_)(r)?void 0:t.symbolDescription},u=function(t,r){var e,o,n,u,s,y,c,f,m,p,d,b,v,h,g,S,_,P=r.style||{},L=(S=t.filter,_=r.filter,S&&_?["all",S,_]:_||S||null);return function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?i(Object(e),!0).forEach(function(r){a(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):i(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}({id:r.id,label:r.label,stroke:null!==(e=P.stroke)&&void 0!==e?e:t.stroke,strokeWidth:null!==(o=P.strokeWidth)&&void 0!==o?o:t.strokeWidth,strokeDashArray:null!==(n=P.strokeDashArray)&&void 0!==n?n:t.strokeDashArray,opacity:null!==(u=P.opacity)&&void 0!==u?u:t.opacity,keySymbolShape:null!==(s=P.keySymbolShape)&&void 0!==s?s:t.keySymbolShape,symbolDescription:l(t,P),showInKey:null!==(y=r.showInKey)&&void 0!==y?y:t.showInKey,showInMenu:null!==(c=r.showInMenu)&&void 0!==c&&c,filter:L,minZoom:t.minZoom,maxZoom:t.maxZoom,symbol:null!==(f=P.symbol)&&void 0!==f?f:t.symbol,symbolSvgContent:null!==(m=P.symbolSvgContent)&&void 0!==m?m:t.symbolSvgContent,symbolViewBox:null!==(p=P.symbolViewBox)&&void 0!==p?p:t.symbolViewBox,symbolAnchor:null!==(d=P.symbolAnchor)&&void 0!==d?d:t.symbolAnchor,symbolBackgroundColor:null!==(b=P.symbolBackgroundColor)&&void 0!==b?b:t.symbolBackgroundColor,symbolForegroundColor:null!==(v=P.symbolForegroundColor)&&void 0!==v?v:t.symbolForegroundColor,symbolHaloWidth:null!==(h=P.symbolHaloWidth)&&void 0!==h?h:t.symbolHaloWidth,symbolGraphic:null!==(g=P.symbolGraphic)&&void 0!==g?g:t.symbolGraphic},function(t,r){var e,o;return r.fillPattern||r.fillPatternSvgContent?{fillPattern:r.fillPattern,fillPatternSvgContent:r.fillPatternSvgContent,fillPatternForegroundColor:null!==(e=r.fillPatternForegroundColor)&&void 0!==e?e:t.fillPatternForegroundColor,fillPatternBackgroundColor:null!==(o=r.fillPatternBackgroundColor)&&void 0!==o?o:t.fillPatternBackgroundColor}:"fill"in r?{fill:r.fill}:{fill:t.fill,fillPattern:t.fillPattern,fillPatternSvgContent:t.fillPatternSvgContent,fillPatternForegroundColor:t.fillPatternForegroundColor,fillPatternBackgroundColor:t.fillPatternBackgroundColor}}(t,P))}},247(t,r,e){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}e.d(r,{o:()=>n});var n=function(t,r){if(!t)return null;if("string"==typeof t)return t.trim();if("object"===o(t)){if(r&&t[r])return t[r];var e=Object.values(t)[0];return null!=e?e:null}return null}},449(t,r,e){e.d(r,{vY:()=>o});var o=function(t){return!(!t.fillPattern&&!t.fillPatternSvgContent)}},121(t,r,e){e.d(r,{Lo:()=>n,Op:()=>l,n8:()=>a,sR:()=>i});var o=new Set(["symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"]),n=function(t){return!(!t.symbol&&!t.symbolSvgContent)},i=function(t){if(!n(t))return{};var r={};return o.forEach(function(e){if(null!=t[e]){var o=e.charAt(6).toLowerCase()+e.slice(7);r[o]=t[e]}}),r},a=function(t,r){var e;return t.symbolViewBox?t.symbolViewBox:null!==(e=null==r?void 0:r.viewBox)&&void 0!==e?e:"0 0 38 38"},l=function(t,r){var e;return t.symbolAnchor?t.symbolAnchor:null!==(e=null==r?void 0:r.anchor)&&void 0!==e?e:[.5,.5]}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see im-datasets-plugin.js.LICENSE.txt */
2
- "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[447],{772(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{V:()=>l,ns:()=>f,p_:()=>s});var l={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visibility:"visible",style:{stroke:"#d4351c",strokeWidth:2,fill:"transparent",symbolDescription:"red outline"}},u=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription","keySymbolShape","symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"],c=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],s=function(t){return c.some(function(e){return e in t})},f=function(t,e){var r=t.style||{},n=i(i({},e.style),r);!("symbolDescription"in r)&&s(r)&&delete n.symbolDescription;var o=i({},t);delete o.style,u.forEach(function(t){return delete o[t]});var a=i({},e);return delete a.style,i(i(i({},a),o),n)}},897(t,e,r){r.r(e),r.d(e,{manifest:()=>Yt});var n=r(772);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function l(t,e,r){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach(function(e){y(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function y(t,e,r){return(e=function(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p=function(t){var e;if(null===(e=t.sublayers)||void 0===e||!e.length)return t;var r={};return t.sublayers.forEach(function(t){r[t.id]="visible"}),d(d({},t),{},{sublayerVisibility:r})},b={BUILD_KEY_GROUPS:function(t){var e=t.datasets||[],r=new Set,n=[],o=!1;return e.forEach(function(t){var i;if(t.showInKey&&"hidden"!==t.visibility)if(null!==(i=t.sublayers)&&void 0!==i&&i.length){var a=t.sublayerVisibility,l=void 0===a?[]:a;Object.values(l).some(function(t){return"hidden"!==t})&&(o=!0,n.push({type:"sublayers",dataset:t}))}else{if(t.groupLabel){if(r.has(t.groupLabel))return;return r.add(t.groupLabel),o=!0,void n.push({type:"group",groupLabel:t.groupLabel,datasets:e.filter(function(e){var r;return!(null!==(r=e.sublayers)&&void 0!==r&&r.length)&&e.groupLabel===t.groupLabel})})}n.push({type:"flat",dataset:t})}}),a(a({},t),{},{key:{items:n,hasGroups:o}})},SET_DATASETS:function(t,e){var r=e.datasets,o=e.datasetDefaults;return d(d({},t),{},{datasets:r.map(function(t){return p((0,n.ns)(t,o))})})},ADD_DATASET:function(t,e){var r=e.dataset,o=e.datasetDefaults;return d(d({},t),{},{datasets:[].concat(c(t.datasets||[]),[p((0,n.ns)(r,o))])})},REMOVE_DATASET:function(t,e){var r,n=e.id;return d(d({},t),{},{datasets:(null===(r=t.datasets)||void 0===r?void 0:r.filter(function(t){return t.id!==n}))||[]})},SET_DATASET_VISIBILITY:function(t,e){var r,n=e.id,o=e.visibility;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id===n?d(d({},t),{},{visibility:o}):t})})},SET_GLOBAL_VISIBILITY:function(t,e){var r,n=e.visibility;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return d(d({},t),{},{visibility:n})})})},SET_SUBLAYER_VISIBILITY:function(t,e){var r,n=e.datasetId,o=e.sublayerId,i=e.visibility;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id!==n?t:d(d({},t),{},{sublayerVisibility:d(d({},t.sublayerVisibility),{},y({},o,i))})})})},SET_DATASET_STYLE:function(t,e){var r,n=e.datasetId,o=e.styleChanges;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id===n?d(d({},t),o):t})})},SET_SUBLAYER_STYLE:function(t,e){var r,n=e.datasetId,o=e.sublayerId,i=e.styleChanges;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){var e;return t.id!==n?t:d(d({},t),{},{sublayers:null===(e=t.sublayers)||void 0===e?void 0:e.map(function(t){return t.id===o?d(d({},t),{},{style:d(d({},t.style),i)}):t})})})})},SET_OPACITY:function(t,e){var r,n=e.datasetId,o=e.opacity;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id===n?d(d({},t),{},{opacity:o}):t})})},SET_GLOBAL_OPACITY:function(t,e){var r,n=e.opacity;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return d(d({},t),{},{opacity:n})})})},SET_SUBLAYER_OPACITY:function(t,e){var r,n=e.datasetId,o=e.sublayerId,i=e.opacity;return d(d({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){var e;return t.id!==n?t:d(d({},t),{},{sublayers:null===(e=t.sublayers)||void 0===e?void 0:e.map(function(t){return t.id===o?d(d({},t),{},{style:d(d({},t.style),{},{opacity:i})}):t})})})})},HIDE_FEATURES:function(t,e){var r=e.layerId,n=e.idProperty,o=e.featureIds,i=t.hiddenFeatures[r],a=(null==i?void 0:i.ids)||[],l=c(new Set([].concat(c(a),c(o))));return d(d({},t),{},{hiddenFeatures:d(d({},t.hiddenFeatures),{},y({},r,{idProperty:n,ids:l}))})},SHOW_FEATURES:function(t,e){var r=e.layerId,n=e.featureIds,o=t.hiddenFeatures[r];if(!o)return t;var i=o.ids.filter(function(t){return!n.includes(t)});if(0===i.length){var a=d({},t.hiddenFeatures);return delete a[r],d(d({},t),{},{hiddenFeatures:a})}return d(d({},t),{},{hiddenFeatures:d(d({},t.hiddenFeatures),{},y({},r,d(d({},o),{},{ids:i})))})},SET_LAYER_ADAPTER:function(t,e){return d(d({},t),{},{layerAdapter:e})}},v=r(738),m={APP_ADD_MARKER:"app:addmarker",APP_REMOVE_MARKER:"app:removemarker",APP_SET_MODE:"app:setmode",APP_REVERT_MODE:"app:revertmode",APP_ADD_BUTTON:"app:addbutton",APP_TOGGLE_BUTTON_STATE:"app:togglebuttonstate",APP_ADD_PANEL:"app:addpanel",APP_REMOVE_PANEL:"app:removepanel",APP_SHOW_PANEL:"app:showpanel",APP_HIDE_PANEL:"app:hidepanel",APP_ADD_CONTROL:"app:addcontrol",APP_READY:"app:ready",APP_OPENED:"app:opened",APP_CLOSED:"app:closed",APP_PANEL_OPENED:"app:panelopened",APP_PANEL_CLOSED:"app:panelclosed",MAP_SET_STYLE:"map:setstyle",MAP_SET_SIZE:"map:setsize",MAP_SET_PIXEL_RATIO:"map:setpixelratio",MAP_FIT_TO_BOUNDS:"map:fittobounds",MAP_SET_VIEW:"map:setview",MAP_INIT_MAP_STYLES:"map:initmapstyles",MAP_STYLE_CHANGE:"map:stylechange",MAP_LOADED:"map:loaded",MAP_READY:"map:ready",MAP_SIZE_CHANGE:"map:sizechange",MAP_FIRST_IDLE:"map:firstidle",MAP_MOVE_START:"map:movestart",MAP_MOVE:"map:move",MAP_MOVE_END:"map:moveend",MAP_STATE_UPDATED:"map:stateupdated",MAP_DATA_CHANGE:"map:datachange",MAP_RENDER:"map:render",MAP_CLICK:"map:click",MAP_DESTROY:"map:destroy"};function h(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof l?n:l,c=Object.create(u.prototype);return g(c,"_invoke",function(r,n,o){var i,l,u,c=0,s=o||[],f=!1,d={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return i=e,l=0,u=t,d.n=r,a}};function y(r,n){for(l=r,u=n,e=0;!f&&c&&!o&&e<s.length;e++){var o,i=s[e],y=d.p,p=i[2];r>3?(o=p===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=r<2&&y<i[1])?(l=0,d.v=n,d.n=i[1]):y<p&&(o=r<3||i[0]>n||n>p)&&(i[4]=r,i[5]=n,d.n=p,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,p),l=s,u=p;(e=l<2?t:u)||!f;){i||(l?l<3?(l>1&&(d.n=-1),y(l,u)):d.n=u:d.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(f=d.n<0)?u:r.call(n,d))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][n]?e(e([][n]())):(g(e={},n,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,g(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,g(f,"constructor",c),g(c,"constructor",u),u.displayName="GeneratorFunction",g(c,o,"GeneratorFunction"),g(f),g(f,o,"Generator"),g(f,n,function(){return this}),g(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:d}})()}function g(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}g=function(t,e,r,n){function i(e,r){g(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},g(t,e,r,n)}function S(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(n,o)}var O=function(){var t,e=(t=h().m(function t(e,r,n,o){var i,a,l,u,c,s,f;return h().w(function(t){for(;;)switch(t.n){case 0:return i=n(e,r),l=(a="string"==typeof i?{url:i}:i).url,u=a.headers,c=void 0===u?{}:u,t.n=1,fetch(l,{headers:c,signal:o});case 1:if((s=t.v).ok){t.n=2;break}throw new Error("Failed to fetch GeoJSON: ".concat(s.status," ").concat(s.statusText));case 2:return t.n=3,s.json();case 3:if("FeatureCollection"!==(f=t.v).type){t.n=4;break}return t.a(2,f);case 4:if("Feature"!==f.type){t.n=5;break}return t.a(2,{type:"FeatureCollection",features:[f]});case 5:if(!Array.isArray(f)){t.n=6;break}return t.a(2,{type:"FeatureCollection",features:f});case 6:throw new Error("Invalid GeoJSON response");case 7:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){S(i,n,o,a,l,"next",t)}function l(t){S(i,n,o,a,l,"throw",t)}a(void 0)})});return function(t,r,n,o){return e.apply(this,arguments)}}();function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var j=function(t){var e=t.getBounds();return[e.getWest(),e.getSouth(),e.getEast(),e.getNorth()]},w=function(t,e){return!(!t||!e)&&e[0]>=t[0]&&e[1]>=t[1]&&e[2]<=t[2]&&e[3]<=t[3]},A=function(t,e){return t?[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[2],e[2]),Math.max(t[3],e[3])]:function(t){if(Array.isArray(t))return P(t)}(r=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return P(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var r},E=function(t,e){return!(!t||!e||t[2]<e[0]||t[0]>e[2]||t[3]<e[1]||t[1]>e[3])},_=function(t){var e=1/0,r=1/0,n=-1/0,o=-1/0,i=function(t,a){var l;0===a?(l=t,e=Math.min(e,l[0]),r=Math.min(r,l[1]),n=Math.max(n,l[0]),o=Math.max(o,l[1])):t.forEach(function(t){return i(t,a-1)})};switch(t.type){case"Point":i(t.coordinates,0);break;case"LineString":case"MultiPoint":i(t.coordinates,1);break;case"Polygon":case"MultiLineString":i(t.coordinates,2);break;case"MultiPolygon":i(t.coordinates,3);break;case"GeometryCollection":t.geometries.forEach(function(t){var i=_(t);e=Math.min(e,i[0]),r=Math.min(r,i[1]),n=Math.max(n,i[2]),o=Math.max(o,i[3])});break;default:throw new Error("Unsupported geometry type: ".concat(t.type))}return[e,r,n,o]};function k(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof l?n:l,c=Object.create(u.prototype);return T(c,"_invoke",function(r,n,o){var i,l,u,c=0,s=o||[],f=!1,d={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return i=e,l=0,u=t,d.n=r,a}};function y(r,n){for(l=r,u=n,e=0;!f&&c&&!o&&e<s.length;e++){var o,i=s[e],y=d.p,p=i[2];r>3?(o=p===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=r<2&&y<i[1])?(l=0,d.v=n,d.n=i[1]):y<p&&(o=r<3||i[0]>n||n>p)&&(i[4]=r,i[5]=n,d.n=p,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,p),l=s,u=p;(e=l<2?t:u)||!f;){i||(l?l<3?(l>1&&(d.n=-1),y(l,u)):d.n=u:d.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(f=d.n<0)?u:r.call(n,d))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][n]?e(e([][n]())):(T(e={},n,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,T(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,T(f,"constructor",c),T(c,"constructor",u),u.displayName="GeneratorFunction",T(c,o,"GeneratorFunction"),T(f),T(f,o,"Generator"),T(f,n,function(){return this}),T(f,"toString",function(){return"[object Generator]"}),(k=function(){return{w:i,m:d}})()}function T(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}T=function(t,e,r,n){function i(e,r){T(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},T(t,e,r,n)}function D(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(n,o)}function I(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||x(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){if(t){if("string"==typeof t)return C(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(t,e):void 0}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var L=function(t){var e=t.adapter,r=t.pluginConfig,o=t.pluginStateRef,i=t.mapStyle,a=t.mapProvider,l=t.events,u=t.eventBus,c=r.datasets,s=new Map,f=function(){return o.current.datasets||c},d=c.map(function(t){return(0,n.ns)(t,n.V)});e.init(d,i).then(function(){d.forEach(function(t){if(function(t){return"string"==typeof t.geojson&&!!t.idProperty&&"function"==typeof t.transformRequest}(t)){var r=function(t){var e,r,n,o=t.dataset,i=t.map,a=t.onUpdate,l=o.geojson,u=o.idProperty,c=o.transformRequest,s=o.maxFeatures,f=o.minZoom,d=void 0===f?0:f,y=new Map,p=null,b=null,v=function(){return{type:"FeatureCollection",features:Array.from(y.values()).map(function(t){return t.feature})}},m=function(t){var e,r;return u&&null!==(e=null===(r=t.properties)||void 0===r?void 0:r[u])&&void 0!==e?e:t.id},h=function(t){if(s&&!(y.size<=1.2*s)){var e,r=s,n=[],o=[],i=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=x(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw o}}}}(y);try{for(i.s();!(e=i.n()).done;){var a=I(e.value,2),l=a[0],u=a[1];E(u.bbox,t)?n.push(l):o.push({id:l,lastSeenAt:u.lastSeenAt})}}catch(t){i.e(t)}finally{i.f()}o.sort(function(t,e){return t.lastSeenAt-e.lastSeenAt});for(var c=y.size-r,f=0;f<c&&f<o.length;f++)y.delete(o[f].id);if(y.size>r)for(var d=y.size-r,p=n.map(function(t){return{id:t,lastSeenAt:y.get(t).lastSeenAt}}).sort(function(t,e){return t.lastSeenAt-e.lastSeenAt}),b=0;b<d&&b<p.length;b++)y.delete(p[b].id)}},g=function(){var t,e=(t=k().m(function t(){var e,r,n,u,s,f,g;return k().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!((e=i.getZoom())<d)){t.n=1;break}return t.a(2);case 1:if(r=j(i),!p||!w(p,r)){t.n=2;break}return t.a(2);case 2:return b&&b.abort(),b=new AbortController,t.p=3,n={bbox:r,zoom:e,dataset:o},t.n=4,O(l,n,c,b.signal);case 4:u=t.v,s=Date.now(),u.features.forEach(function(t){var e=m(t);null!=e?y.set(e,{feature:t,bbox:_(t.geometry),lastSeenAt:s}):console.warn("Feature missing ID, skipping:",t)}),p=A(p,r),f=y.size,h(r),y.size<f&&(p=r),a(o.id,v()),t.n=7;break;case 5:if(t.p=5,"AbortError"!==(g=t.v).name){t.n=6;break}return t.a(2);case 6:console.error("Failed to fetch dynamic GeoJSON for ".concat(o.id,":"),g);case 7:return t.a(2)}},t,null,[[3,5]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,l,"next",t)}function l(t){D(i,n,o,a,l,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}(),S=(e=g,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,n)},200)},n.cancel=function(){clearTimeout(r),r=null},n),P=function(){S()};return i.on("moveend",P),g(),{destroy:function(){i.off("moveend",P),S.cancel(),b&&b.abort()},clear:function(){y.clear(),p=null,a(o.id,{type:"FeatureCollection",features:[]})},refresh:function(){y.clear(),p=null,g()},getFeatureCount:function(){return y.size},reapply:function(){y.size>0&&a(o.id,v())}}}({dataset:t,map:a.map,onUpdate:function(t,r){return e.setData(t,r)}});s.set(t.id,r)}}),u.emit("datasets:ready")});var y=i,p=function(t){y=t,e.onStyleChange(f(),t,o.current.hiddenFeatures||{},s)},b=function(){e.onSizeChange(f(),y)};return u.on(l.MAP_SET_STYLE,p),u.on(l.MAP_SIZE_CHANGE,b),{remove:function(){u.off(l.MAP_SET_STYLE,p),u.off(l.MAP_SIZE_CHANGE,b),s.forEach(function(t){return t.destroy()}),s.clear(),e.destroy(f())},refreshDataset:function(t){var e;null===(e=s.get(t))||void 0===e||e.refresh()},clearDatasetCache:function(t){var e;null===(e=s.get(t))||void 0===e||e.clear()},getFeatureCount:function(t){var e,r;return null!==(e=null===(r=s.get(t))||void 0===r?void 0:r.getFeatureCount())&&void 0!==e?e:null}}};function M(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof l?n:l,c=Object.create(u.prototype);return F(c,"_invoke",function(r,n,o){var i,l,u,c=0,s=o||[],f=!1,d={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return i=e,l=0,u=t,d.n=r,a}};function y(r,n){for(l=r,u=n,e=0;!f&&c&&!o&&e<s.length;e++){var o,i=s[e],y=d.p,p=i[2];r>3?(o=p===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=r<2&&y<i[1])?(l=0,d.v=n,d.n=i[1]):y<p&&(o=r<3||i[0]>n||n>p)&&(i[4]=r,i[5]=n,d.n=p,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,p),l=s,u=p;(e=l<2?t:u)||!f;){i||(l?l<3?(l>1&&(d.n=-1),y(l,u)):d.n=u:d.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(f=d.n<0)?u:r.call(n,d))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][n]?e(e([][n]())):(F(e={},n,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,F(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,F(f,"constructor",c),F(c,"constructor",u),u.displayName="GeneratorFunction",F(c,o,"GeneratorFunction"),F(f),F(f,o,"Generator"),F(f,n,function(){return this}),F(f,"toString",function(){return"[object Generator]"}),(M=function(){return{w:i,m:d}})()}function F(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}F=function(t,e,r,n){function i(e,r){F(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},F(t,e,r,n)}function N(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(n,o)}function R(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var G=function(t,e){var r,n,o=t.pluginState,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.datasetId,l=i.sublayerId;if(l){var u,c=e?"visible":"hidden";return null===(u=o.layerAdapter)||void 0===u||u[e?"showSublayer":"hideSublayer"](a,l),void o.dispatch({type:"SET_SUBLAYER_VISIBILITY",payload:{datasetId:a,sublayerId:l,visibility:c}})}if(a){if(null===(n=o.layerAdapter)||void 0===n||n[e?"showDataset":"hideDataset"](a),o.dispatch({type:"SET_DATASET_VISIBILITY",payload:{id:a,visibility:e?"visible":"hidden"}}),e){var s,f=null===(s=o.datasets)||void 0===s?void 0:s.find(function(t){return t.id===a});Object.entries((null==f?void 0:f.sublayerVisibility)||{}).forEach(function(t){var e,r=R(t,2),n=r[0];"hidden"===r[1]&&(null===(e=o.layerAdapter)||void 0===e||e.hideSublayer(a,n))})}}else o.dispatch({type:"SET_GLOBAL_VISIBILITY",payload:{visibility:e?"visible":"hidden"}}),null===(r=o.datasets)||void 0===r||r.forEach(function(t){var r;null===(r=o.layerAdapter)||void 0===r||r[e?"showDataset":"hideDataset"](t.id),e&&Object.entries(t.sublayerVisibility||{}).forEach(function(e){var r,n=R(e,2),i=n[0];"hidden"===n[1]&&(null===(r=o.layerAdapter)||void 0===r||r.hideSublayer(t.id,i))})})},V=r(287),Y="im-c-datasets-layers__item-label govuk-label govuk-checkboxes__label",W=function(t){var e;return null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu})},U=r(247),H=r(933),K=function(t){var e=t.text;return(0,V.jsx)("div",{className:"im-c-datasets-key",children:(0,V.jsx)("p",{className:"im-c-datasets-key__empty-message",children:e})})},z=r(121),Z=r(449);function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function J(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach(function(e){X(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function X(t,e,r){return(e=function(t){var e=function(t){if("object"!=$(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Q=20,tt={xmlns:"http://www.w3.org/2000/svg",width:Q,height:Q,viewBox:"0 0 ".concat(Q," ").concat(Q),className:"am-c-datasets-key-symbol","aria-hidden":"true",focusable:"false"},et=J(J({},tt),{},{width:38,height:38,className:"am-c-datasets-key-symbol am-c-datasets-key-symbol--point"});function rt(t){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(t)}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(r),!0).forEach(function(e){it(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function it(t,e,r){return(e=function(t){var e=function(t){if("object"!=rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var at=function(t){var e=t.patternRegistry,r=t.mapStyle,n=(0,Z.qS)(t,r.id,e);return(0,V.jsxs)("svg",ot(ot({},tt),{},{children:[(0,V.jsx)("g",{dangerouslySetInnerHTML:{__html:n.border}}),(0,V.jsx)("g",{transform:"translate(".concat(2,", ").concat(2,")"),dangerouslySetInnerHTML:{__html:n.content}})]}))};function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach(function(e){st(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function st(t,e,r){return(e=function(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ft=function(t){var e,r=t.symbolRegistry,n=t.mapStyle,o=t.symbolDef,i=null!==(e=null==n?void 0:n.appColorScheme)&&void 0!==e?e:"light",a=ct(ct({},n),{},{mapColorScheme:i}),l=r.resolve(o,(0,z.sR)(t),a),u=(0,z.n8)(t,o);return(0,V.jsx)("svg",ct(ct({},et),{},{viewBox:u,children:(0,V.jsx)("g",{dangerouslySetInnerHTML:{__html:l}})}))};function dt(t){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(t)}function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function pt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach(function(e){bt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function bt(t,e,r){return(e=function(t){var e=function(t){if("object"!=dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vt=function(t){var e=t.mapStyle;return(0,V.jsx)("svg",pt(pt({},tt),{},{children:(0,V.jsx)("line",{x1:t.strokeWidth/2,y1:10,x2:Q-t.strokeWidth/2,y2:10,stroke:(0,U.o)(t.stroke,e.id),strokeWidth:t.strokeWidth,strokeLinecap:"round"})}))};function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(r),!0).forEach(function(e){St(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function St(t,e,r){return(e=function(t){var e=function(t){if("object"!=mt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ot=function(t){var e=t.mapStyle;return(0,V.jsx)("svg",gt(gt({},tt),{},{children:(0,V.jsx)("rect",{x:t.strokeWidth/2,y:t.strokeWidth/2,width:Q-t.strokeWidth,height:Q-t.strokeWidth,rx:t.strokeWidth,ry:t.strokeWidth,fill:(0,U.o)(t.fill,e.id),stroke:(0,U.o)(t.stroke,e.id),strokeWidth:t.strokeWidth,strokeLinejoin:"round"})}))};function Pt(t){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(t)}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach(function(e){At(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function At(t,e,r){return(e=function(t){var e=function(t){if("object"!=Pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Et=function(t){var e=t.symbolRegistry,r=(0,z.Lo)(t)&&(0,z.s8)(t,e);return r?(0,V.jsx)(ft,wt(wt({},t),{},{symbolDef:r})):(0,Z.vY)(t)?(0,V.jsx)(at,wt({},t)):"line"===t.keySymbolShape?(0,V.jsx)(vt,wt({},t)):(0,V.jsx)(Ot,wt({},t))};function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}function kt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Tt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?kt(Object(r),!0).forEach(function(e){Dt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Dt(t,e,r){return(e=function(t){var e=function(t){if("object"!=_t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_t(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function It(t){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},It(t)}function xt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(r),!0).forEach(function(e){Lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Lt(t,e,r){return(e=function(t){var e=function(t){if("object"!=It(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==It(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mt(t){return function(t){if(Array.isArray(t))return Ft(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ft(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Nt(t){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}function Rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rt(Object(r),!0).forEach(function(e){Gt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Gt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Nt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vt="[interactive-map]",Yt={InitComponent:function(t){var e,r=t.pluginConfig,o=t.pluginState,i=t.appState,a=t.mapState,l=t.mapProvider,u=t.services,c=o.dispatch,s=u.eventBus,f=u.symbolRegistry,d=u.patternRegistry,y=!(null===(e=l.map)||void 0===e||!e.getStyle()),p=(0,v.useRef)(o);p.current=o;var b=(0,v.useRef)(null);return(0,v.useEffect)(function(){var t,e,u,v,h=null===(t=null===(e=r.includeModes)||void 0===e?void 0:e.includes(i.mode))||void 0===t||t,g=null!==(u=null===(v=r.excludeModes)||void 0===v?void 0:v.includes(i.mode))&&void 0!==u&&u;if(y&&h&&!g&&!b.current){o.datasets||c({type:"SET_DATASETS",payload:{datasets:r.datasets,datasetDefaults:n.V}});var S=function(){var t,e=(t=M().m(function t(){var e,n,o;return M().w(function(t){for(;;)switch(t.n){case 0:if(r.layerAdapter){t.n=1;break}throw new Error("datasets plugin: no layerAdapter provided. Import and pass maplibreLayerAdapter or a custom adapter.");case 1:return t.n=2,r.layerAdapter.load();case 2:e=t.v,n=e.default,o=new n(l,f,d),c({type:"SET_LAYER_ADAPTER",payload:o}),b.current=L({adapter:o,pluginConfig:r,pluginStateRef:p,mapStyle:a.mapStyle,mapProvider:l,events:m,eventBus:s});case 3:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){N(i,n,o,a,l,"next",t)}function l(t){N(i,n,o,a,l,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();S()}},[y,i.mode]),(0,v.useEffect)(function(){c({type:"BUILD_KEY_GROUPS",payload:null})},[o.datasets]),(0,v.useEffect)(function(){return function(){b.current&&(b.current.remove(),b.current=null),c({type:"SET_LAYER_ADAPTER",payload:null})}},[]),null},reducer:{initialState:{datasets:null,key:{items:[],hasGroups:!1},hiddenFeatures:{},layerAdapter:null},actions:b},panels:[{id:"datasetsLayers",label:"Layers",mobile:{slot:"drawer",modal:!0,dismissible:!0},tablet:{slot:"left-top",dismissible:!0,exclusive:!0,width:"260px"},desktop:{slot:"left-top",modal:!1,dismissible:!0,exclusive:!0,width:"280px"},render:function(t){var e,r,n,o=t.pluginState,i=function(t){var e=t.target,r=e.value,n=e.checked;G({pluginState:o},n,{datasetId:r})},a=function(t){var e=t.target.checked,r=t.target.dataset.datasetId,n=t.target.dataset.sublayerId;G({pluginState:o},e,{datasetId:r,sublayerId:n})},l=function(t){var e="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat("hidden"===t.visibility?"":" im-c-datasets-layers__item--checked");return(0,V.jsx)("div",{className:e,"data-module":"govuk-checkboxes",children:(0,V.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,V.jsx)("input",{className:"govuk-checkboxes__input",id:t.id,name:"layers",type:"checkbox",value:t.id,checked:"hidden"!==t.visibility,onChange:i}),(0,V.jsx)("label",{className:Y,htmlFor:t.id,children:t.label})]})},t.id)},u=(o.datasets||[]).filter(function(t){return t.showInMenu||W(t)}),c=(e=u,r=new Set,n=[],e.forEach(function(t){if(W(t))n.push({type:"sublayers",dataset:t});else{if(t.groupLabel){if(r.has(t.groupLabel))return;return r.add(t.groupLabel),void n.push({type:"group",groupLabel:t.groupLabel,datasets:e.filter(function(e){return!W(e)&&e.groupLabel===t.groupLabel})})}n.push({type:"flat",dataset:t})}}),n),s=c.some(function(t){return"sublayers"===t.type||"group"===t.type}),f="im-c-datasets-layers".concat(s?" im-c-datasets-layers--has-groups":"");return(0,V.jsx)("div",{className:f,children:c.map(function(t){if("sublayers"===t.type){var e=t.dataset,r=e.sublayers.filter(function(t){return t.showInMenu}).some(function(t){var r;return"hidden"!==(null===(r=e.sublayerVisibility)||void 0===r?void 0:r[t.id])}),n="govuk-form-group im-c-datasets-layers-group".concat(r?" im-c-datasets-layers-group--items-checked":"");return(0,V.jsx)("div",{className:n,children:(0,V.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,V.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:e.label}),e.sublayers.filter(function(t){return t.showInMenu}).map(function(t){var r,n="hidden"!==(null===(r=e.sublayerVisibility)||void 0===r?void 0:r[t.id]),o="".concat(e.id,"-").concat(t.id),i="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat(n?" im-c-datasets-layers__item--checked":"");return(0,V.jsx)("div",{className:i,"data-module":"govuk-checkboxes",children:(0,V.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,V.jsx)("input",{className:"govuk-checkboxes__input",id:o,type:"checkbox",checked:n,"data-dataset-id":e.id,"data-sublayer-id":t.id,onChange:a}),(0,V.jsx)("label",{className:Y,htmlFor:o,children:t.label})]})},t.id)})]})},e.id)}if("group"===t.type){var o=t.datasets.some(function(t){return"hidden"!==t.visibility}),i="govuk-form-group im-c-datasets-layers-group".concat(o?" im-c-datasets-layers-group--items-checked":"");return(0,V.jsx)("div",{className:i,children:(0,V.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,V.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:t.groupLabel}),t.datasets.map(function(t){return l(t)})]})},t.groupLabel)}return l(t.dataset)})})}},{id:"datasetsKey",label:"Key",mobile:{slot:"drawer",modal:!0},tablet:{slot:"left-top",width:"260px"},desktop:{slot:"left-top",width:"280px"},render:function(t){var e,r=t.pluginConfig,n=t.mapState,o=t.pluginState,i=t.services;if(null==o||null===(e=o.key)||void 0===e||null===(e=e.items)||void 0===e||!e.length)return(0,V.jsx)(K,{text:r.noKeyItemText});var a=n.mapStyle,l=i.symbolRegistry,u=i.patternRegistry,c=function(t,e){return(0,V.jsxs)("dl",{className:"im-c-datasets-key__item",children:[(0,V.jsx)("dt",{className:"im-c-datasets-key__item-symbol",children:(0,V.jsx)(Et,Tt(Tt({},e),{},{symbolRegistry:l,patternRegistry:u,mapStyle:a}))}),(0,V.jsxs)("dd",{className:"im-c-datasets-key__item-label",children:[e.label,e.symbolDescription&&(0,V.jsxs)("span",{className:"govuk-visually-hidden",children:["(",(0,U.o)(e.symbolDescription,a.id),")"]})]})]},t)},s=o.key,f=s.items,d=s.hasGroups,y="im-c-datasets-key".concat(d?" im-c-datasets-key--has-groups":"");return(0,V.jsx)("div",{className:y,children:f.map(function(t){if("sublayers"===t.type){var e="key-heading-".concat(t.dataset.id);return(0,V.jsxs)("section",{className:"im-c-datasets-key__group","aria-labelledby":e,children:[(0,V.jsx)("h3",{id:e,className:"im-c-datasets-key__group-heading",children:t.dataset.label}),t.dataset.sublayers.filter(function(e){var r;return"hidden"!==(null===(r=t.dataset.sublayerVisibility)||void 0===r?void 0:r[e.id])}).map(function(e){return c("".concat(t.dataset.id,"-").concat(e.id),(0,H.m)(t.dataset,e))})]},t.dataset.id)}if("group"===t.type){var r="key-heading-".concat(t.groupLabel.toLowerCase().replaceAll(/\s+/g,"-"));return(0,V.jsxs)("section",{className:"im-c-datasets-key__group","aria-labelledby":r,children:[(0,V.jsx)("h3",{id:r,className:"im-c-datasets-key__group-heading",children:t.groupLabel}),t.datasets.map(function(t){return c(t.id,t)})]},t.groupLabel)}return c(t.dataset.id,t.dataset)})})}}],buttons:[{id:"datasetsLayers",label:"Layers",panelId:"datasetsLayers",iconId:"layers",excludeWhen:function(t){return!t.pluginConfig.datasets.some(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))})},mobile:{slot:"top-left",showLabel:!0},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}},{id:"datasetsKey",label:"Key",panelId:"datasetsKey",iconId:"key",excludeWhen:function(t){return!t.pluginConfig.datasets.some(function(t){return t.showInKey})},mobile:{slot:"top-left",showLabel:!1},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}}],icons:[{id:"layers",svgContent:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"></path><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"></path><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"></path>'},{id:"key",svgContent:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>'}],api:{addDataset:function(t,e){var r,o=t.pluginState,i=t.mapState;null===(r=o.layerAdapter)||void 0===r||r.addDataset(Ct(Ct({},n.V),e),i.mapStyle),o.dispatch({type:"ADD_DATASET",payload:{dataset:e,datasetDefaults:n.V}})},removeDataset:function(t,e){var r,n,o=t.pluginState,i=null===(r=o.datasets)||void 0===r?void 0:r.find(function(t){return t.id===e});i&&(null===(n=o.layerAdapter)||void 0===n||n.removeDataset(i,o.datasets),o.dispatch({type:"REMOVE_DATASET",payload:{id:e}}))},setDatasetVisibility:G,setFeatureVisibility:function(t,e,r){var n,o=t.pluginState,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i.datasetId,l=i.idProperty,u=void 0===l?null:l,c=null===(n=o.datasets)||void 0===n?void 0:n.find(function(t){return t.id===a});if(c)if(e){var s,f=o.hiddenFeatures[a];if(!f)return;var d=f.ids.filter(function(t){return!r.includes(t)});o.dispatch({type:"SHOW_FEATURES",payload:{layerId:a,featureIds:r}}),null===(s=o.layerAdapter)||void 0===s||s.showFeatures(c,u,d)}else{var y,p=o.hiddenFeatures[a],b=(null==p?void 0:p.ids)||[],v=Mt(new Set([].concat(Mt(b),Mt(r))));o.dispatch({type:"HIDE_FEATURES",payload:{layerId:a,idProperty:u,featureIds:r}}),null===(y=o.layerAdapter)||void 0===y||y.hideFeatures(c,u,v)}},setStyle:function(t,e){var r,n,o=t.pluginState,i=t.mapState,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=a.datasetId,u=a.sublayerId,c=null===(r=o.datasets)||void 0===r?void 0:r.find(function(t){return t.id===l});if(c)if(u){var s,f;o.dispatch({type:"SET_SUBLAYER_STYLE",payload:{datasetId:l,sublayerId:u,styleChanges:e}});var d=Bt(Bt({},c),{},{sublayers:null===(s=c.sublayers)||void 0===s?void 0:s.map(function(t){return t.id===u?Bt(Bt({},t),{},{style:Bt(Bt({},t.style),e)}):t})});null===(f=o.layerAdapter)||void 0===f||f.setSublayerStyle(d,u,i.mapStyle)}else{o.dispatch({type:"SET_DATASET_STYLE",payload:{datasetId:l,styleChanges:e}});var y=Bt(Bt({},c),e);null===(n=o.layerAdapter)||void 0===n||n.setStyle(y,i.mapStyle)}},getStyle:function(t){var e,r,n=t.pluginState,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.datasetId,a=o.sublayerId,l=null===(e=n.datasets)||void 0===e?void 0:e.find(function(t){return t.id===i});if(!l)return null;if(a){var u,c,s=null===(u=l.sublayers)||void 0===u?void 0:u.find(function(t){return t.id===a});return null!==(c=null==s?void 0:s.style)&&void 0!==c?c:null}return null!==(r=l.style)&&void 0!==r?r:null},setOpacity:function(t,e,r){var n,o=t.pluginState,i=r||{},a=i.datasetId,l=i.sublayerId;if(l){var u,c;if(!(null===(u=o.datasets)||void 0===u?void 0:u.find(function(t){return t.id===a})))return;return o.dispatch({type:"SET_SUBLAYER_OPACITY",payload:{datasetId:a,sublayerId:l,opacity:e}}),void(null===(c=o.layerAdapter)||void 0===c||c.setSublayerOpacity(a,l,e))}if(a){var s,f;if(!(null===(s=o.datasets)||void 0===s?void 0:s.find(function(t){return t.id===a})))return;return o.dispatch({type:"SET_OPACITY",payload:{datasetId:a,opacity:e}}),void(null===(f=o.layerAdapter)||void 0===f||f.setOpacity(a,e))}o.dispatch({type:"SET_GLOBAL_OPACITY",payload:{opacity:e}}),null===(n=o.datasets)||void 0===n||n.forEach(function(t){var r;null===(r=o.layerAdapter)||void 0===r||r.setOpacity(t.id,e)})},getOpacity:function(t,e){var r,n,o=t.pluginState,i=e||{},a=i.datasetId,l=i.sublayerId;if(l){var u,c,s,f,d=null===(u=o.datasets)||void 0===u?void 0:u.find(function(t){return t.id===a}),y=null==d||null===(c=d.sublayers)||void 0===c?void 0:c.find(function(t){return t.id===l});return null!==(s=null==y||null===(f=y.style)||void 0===f?void 0:f.opacity)&&void 0!==s?s:null}if(a){var p,b,v=null===(p=o.datasets)||void 0===p?void 0:p.find(function(t){return t.id===a});return null!==(b=null==v?void 0:v.opacity)&&void 0!==b?b:null}return null!==(r=null===(n=o.datasets)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.opacity)&&void 0!==r?r:null},setData:function(t,e,r){var n,o,i=t.pluginState,a=r.datasetId,l=null===(n=i.datasets)||void 0===n?void 0:n.find(function(t){return t.id===a});null!=l&&l.tiles?function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=console).warn.apply(t,[Vt].concat(r))}('setData called on vector tile dataset "'.concat(a,'" — has no effect')):null===(o=i.layerAdapter)||void 0===o||o.setData(a,e)}}}},933(t,e,r){r.d(e,{m:()=>u});var n=r(772);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var l=function(t,e){return"symbolDescription"in e?e.symbolDescription:(0,n.p_)(e)?void 0:t.symbolDescription},u=function(t,e){var r,n,o,u,c,s,f,d,y,p,b,v,m,h,g,S,O,P=e.style||{},j=(S=t.filter,O=e.filter,S&&O?["all",S,O]:O||S||null);return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({id:e.id,label:e.label,stroke:null!==(r=P.stroke)&&void 0!==r?r:t.stroke,strokeWidth:null!==(n=P.strokeWidth)&&void 0!==n?n:t.strokeWidth,strokeDashArray:null!==(o=P.strokeDashArray)&&void 0!==o?o:t.strokeDashArray,opacity:null!==(u=P.opacity)&&void 0!==u?u:t.opacity,keySymbolShape:null!==(c=P.keySymbolShape)&&void 0!==c?c:t.keySymbolShape,symbolDescription:l(t,P),showInKey:null!==(s=e.showInKey)&&void 0!==s?s:t.showInKey,showInMenu:null!==(f=e.showInMenu)&&void 0!==f&&f,filter:j,minZoom:t.minZoom,maxZoom:t.maxZoom,symbol:null!==(d=P.symbol)&&void 0!==d?d:t.symbol,symbolSvgContent:null!==(y=P.symbolSvgContent)&&void 0!==y?y:t.symbolSvgContent,symbolViewBox:null!==(p=P.symbolViewBox)&&void 0!==p?p:t.symbolViewBox,symbolAnchor:null!==(b=P.symbolAnchor)&&void 0!==b?b:t.symbolAnchor,symbolBackgroundColor:null!==(v=P.symbolBackgroundColor)&&void 0!==v?v:t.symbolBackgroundColor,symbolForegroundColor:null!==(m=P.symbolForegroundColor)&&void 0!==m?m:t.symbolForegroundColor,symbolHaloWidth:null!==(h=P.symbolHaloWidth)&&void 0!==h?h:t.symbolHaloWidth,symbolGraphic:null!==(g=P.symbolGraphic)&&void 0!==g?g:t.symbolGraphic},function(t,e){var r,n;return e.fillPattern||e.fillPatternSvgContent?{fillPattern:e.fillPattern,fillPatternSvgContent:e.fillPatternSvgContent,fillPatternForegroundColor:null!==(r=e.fillPatternForegroundColor)&&void 0!==r?r:t.fillPatternForegroundColor,fillPatternBackgroundColor:null!==(n=e.fillPatternBackgroundColor)&&void 0!==n?n:t.fillPatternBackgroundColor}:"fill"in e?{fill:e.fill}:{fill:t.fill,fillPattern:t.fillPattern,fillPatternSvgContent:t.fillPatternSvgContent,fillPatternForegroundColor:t.fillPatternForegroundColor,fillPatternBackgroundColor:t.fillPatternBackgroundColor}}(t,P))}},247(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.d(e,{o:()=>o});var o=function(t,e){if(!t)return null;if("string"==typeof t)return t.trim();if("object"===n(t)){if(e&&t[e])return t[e];var r=Object.values(t)[0];return null!=r?r:null}return null}},449(t,e,r){r.d(e,{qS:()=>c,vY:()=>a,zp:()=>u});var n=r(247);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var i=function(t,e,r){return t.replace(/\{\{foregroundColor\}\}/g,e||"black").replace(/\{\{backgroundColor\}\}/g,r||"transparent")},a=function(t){return!(!t.fillPattern&&!t.fillPatternSvgContent)},l=function(t,e){return t.fillPatternSvgContent?t.fillPatternSvgContent:t.fillPattern&&null!==(r=null==e||null===(n=e.get(t.fillPattern))||void 0===n?void 0:n.svgContent)&&void 0!==r?r:null;var r,n},u=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=l(t,r);if(!a)return null;var u=(0,n.o)(t.fillPatternForegroundColor,e)||"black",c=(0,n.o)(t.fillPatternBackgroundColor,e)||"transparent",s=Math.max(2,i);return"pattern-".concat(function(t){var e,r=0,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==r.return||r.return()}finally{if(u)throw a}}}}(t);try{for(n.s();!(e=n.n()).done;)r=(r<<5)-r+e.value.codePointAt(0),r&=r}catch(t){n.e(t)}finally{n.f()}return Math.abs(r).toString(36)}(a+u+c),"-").concat(s,"x")},c=function(t,e,r){var o=l(t,r);if(!o)return null;var a=(0,n.o)(t.fillPatternForegroundColor,e)||"black",u=(0,n.o)(t.fillPatternBackgroundColor,e)||"transparent",c=(0,n.o)(t.stroke,e)||a;return{border:i('<path d="M19 2.862v14.275c0 1.028-.835 1.862-1.862 1.862H2.863c-1.028 0-1.862-.835-1.862-1.862V2.862C1.001 1.834 1.836 1 2.863 1h14.275C18.166 1 19 1.835 19 2.862z" fill="{{backgroundColor}}" stroke="{{foregroundColor}}" stroke-width="2"/>',c,u),content:i(o,a,u)}}},121(t,e,r){r.d(e,{Lo:()=>o,Op:()=>u,n8:()=>l,s8:()=>i,sR:()=>a});var n=new Set(["symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"]),o=function(t){return!(!t.symbol&&!t.symbolSvgContent)},i=function(t,e){return t.symbolSvgContent?{svg:t.symbolSvgContent}:t.symbol?e.get(t.symbol):void 0},a=function(t){if(!o(t))return{};var e={};return n.forEach(function(r){if(null!=t[r]){var n=r.charAt(6).toLowerCase()+r.slice(7);e[n]=t[r]}}),e},l=function(t,e){var r;return t.symbolViewBox?t.symbolViewBox:null!==(r=null==e?void 0:e.viewBox)&&void 0!==r?r:"0 0 38 38"},u=function(t,e){var r;return t.symbolAnchor?t.symbolAnchor:null!==(r=null==e?void 0:e.anchor)&&void 0!==r?r:[.5,.5]}}}]);
2
+ "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[447],{772(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{V:()=>l,ns:()=>f,p_:()=>c});var l={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visibility:"visible",style:{stroke:"#d4351c",strokeWidth:2,fill:"transparent",symbolDescription:"red outline"}},u=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription","keySymbolShape","symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"],s=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],c=function(t){return s.some(function(e){return e in t})},f=function(t,e){var r=t.style||{},n=i(i({},e.style),r);!("symbolDescription"in r)&&c(r)&&delete n.symbolDescription;var o=i({},t);delete o.style,u.forEach(function(t){return delete o[t]});var a=i({},e);return delete a.style,i(i(i({},a),o),n)}},897(t,e,r){r.r(e),r.d(e,{manifest:()=>Yt});var n=r(772);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function l(t,e,r){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=function(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p=function(t){var e;if(null===(e=t.sublayers)||void 0===e||!e.length)return t;var r={};return t.sublayers.forEach(function(t){r[t.id]="visible"}),y(y({},t),{},{sublayerVisibility:r})},b={BUILD_KEY_GROUPS:function(t){var e=t.datasets||[],r=new Set,n=[],o=!1;return e.forEach(function(t){var i;if(t.showInKey&&"hidden"!==t.visibility)if(null!==(i=t.sublayers)&&void 0!==i&&i.length){var a=t.sublayerVisibility,l=void 0===a?[]:a;Object.values(l).some(function(t){return"hidden"!==t})&&(o=!0,n.push({type:"sublayers",dataset:t}))}else{if(t.groupLabel){if(r.has(t.groupLabel))return;return r.add(t.groupLabel),o=!0,void n.push({type:"group",groupLabel:t.groupLabel,datasets:e.filter(function(e){var r;return!(null!==(r=e.sublayers)&&void 0!==r&&r.length)&&e.groupLabel===t.groupLabel})})}n.push({type:"flat",dataset:t})}}),a(a({},t),{},{key:{items:n,hasGroups:o}})},SET_DATASETS:function(t,e){var r=e.datasets,o=e.datasetDefaults;return y(y({},t),{},{datasets:r.map(function(t){return p((0,n.ns)(t,o))})})},ADD_DATASET:function(t,e){var r=e.dataset,o=e.datasetDefaults;return y(y({},t),{},{datasets:[].concat(s(t.datasets||[]),[p((0,n.ns)(r,o))])})},REMOVE_DATASET:function(t,e){var r,n=e.id;return y(y({},t),{},{datasets:(null===(r=t.datasets)||void 0===r?void 0:r.filter(function(t){return t.id!==n}))||[]})},SET_DATASET_VISIBILITY:function(t,e){var r,n=e.id,o=e.visibility;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id===n?y(y({},t),{},{visibility:o}):t})})},SET_GLOBAL_VISIBILITY:function(t,e){var r,n=e.visibility;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return y(y({},t),{},{visibility:n})})})},SET_SUBLAYER_VISIBILITY:function(t,e){var r,n=e.datasetId,o=e.sublayerId,i=e.visibility;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id!==n?t:y(y({},t),{},{sublayerVisibility:y(y({},t.sublayerVisibility),{},d({},o,i))})})})},SET_DATASET_STYLE:function(t,e){var r,n=e.datasetId,o=e.styleChanges;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id===n?y(y({},t),o):t})})},SET_SUBLAYER_STYLE:function(t,e){var r,n=e.datasetId,o=e.sublayerId,i=e.styleChanges;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){var e;return t.id!==n?t:y(y({},t),{},{sublayers:null===(e=t.sublayers)||void 0===e?void 0:e.map(function(t){return t.id===o?y(y({},t),{},{style:y(y({},t.style),i)}):t})})})})},SET_OPACITY:function(t,e){var r,n=e.datasetId,o=e.opacity;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return t.id===n?y(y({},t),{},{opacity:o}):t})})},SET_GLOBAL_OPACITY:function(t,e){var r,n=e.opacity;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){return y(y({},t),{},{opacity:n})})})},SET_SUBLAYER_OPACITY:function(t,e){var r,n=e.datasetId,o=e.sublayerId,i=e.opacity;return y(y({},t),{},{datasets:null===(r=t.datasets)||void 0===r?void 0:r.map(function(t){var e;return t.id!==n?t:y(y({},t),{},{sublayers:null===(e=t.sublayers)||void 0===e?void 0:e.map(function(t){return t.id===o?y(y({},t),{},{style:y(y({},t.style),{},{opacity:i})}):t})})})})},HIDE_FEATURES:function(t,e){var r=e.layerId,n=e.idProperty,o=e.featureIds,i=t.hiddenFeatures[r],a=(null==i?void 0:i.ids)||[],l=s(new Set([].concat(s(a),s(o))));return y(y({},t),{},{hiddenFeatures:y(y({},t.hiddenFeatures),{},d({},r,{idProperty:n,ids:l}))})},SHOW_FEATURES:function(t,e){var r=e.layerId,n=e.featureIds,o=t.hiddenFeatures[r];if(!o)return t;var i=o.ids.filter(function(t){return!n.includes(t)});if(0===i.length){var a=y({},t.hiddenFeatures);return delete a[r],y(y({},t),{},{hiddenFeatures:a})}return y(y({},t),{},{hiddenFeatures:y(y({},t.hiddenFeatures),{},d({},r,y(y({},o),{},{ids:i})))})},SET_LAYER_ADAPTER:function(t,e){return y(y({},t),{},{layerAdapter:e})}},v=r(738),m={APP_ADD_MARKER:"app:addmarker",APP_UPDATE_MARKER:"app:updatemarker",APP_REMOVE_MARKER:"app:removemarker",APP_SET_MODE:"app:setmode",APP_REVERT_MODE:"app:revertmode",APP_ADD_BUTTON:"app:addbutton",APP_TOGGLE_BUTTON_STATE:"app:togglebuttonstate",APP_ADD_PANEL:"app:addpanel",APP_REMOVE_PANEL:"app:removepanel",APP_SHOW_PANEL:"app:showpanel",APP_HIDE_PANEL:"app:hidepanel",APP_ADD_CONTROL:"app:addcontrol",APP_READY:"app:ready",APP_OPENED:"app:opened",APP_CLOSED:"app:closed",APP_PANEL_OPENED:"app:panelopened",APP_PANEL_CLOSED:"app:panelclosed",MAP_SET_STYLE:"map:setstyle",MAP_SET_SIZE:"map:setsize",MAP_SET_FEATURES:"map:setfeatures",MAP_SET_ACTIVE_FEATURE:"map:setactivefeature",MAP_SELECT_FEATURE:"map:selectfeature",MAP_SET_PIXEL_RATIO:"map:setpixelratio",MAP_FIT_TO_BOUNDS:"map:fittobounds",MAP_SET_VIEW:"map:setview",MAP_INIT_MAP_STYLES:"map:initmapstyles",MAP_STYLE_CHANGE:"map:stylechange",MAP_LOADED:"map:loaded",MAP_READY:"map:ready",MAP_SIZE_CHANGE:"map:sizechange",MAP_FIRST_IDLE:"map:firstidle",MAP_MOVE_START:"map:movestart",MAP_MOVE:"map:move",MAP_MOVE_END:"map:moveend",MAP_STATE_UPDATED:"map:stateupdated",MAP_DATA_CHANGE:"map:datachange",MAP_RENDER:"map:render",MAP_CLICK:"map:click",MAP_DESTROY:"map:destroy"};function h(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof l?n:l,s=Object.create(u.prototype);return g(s,"_invoke",function(r,n,o){var i,l,u,s=0,c=o||[],f=!1,y={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,l=0,u=t,y.n=r,a}};function d(r,n){for(l=r,u=n,e=0;!f&&s&&!o&&e<c.length;e++){var o,i=c[e],d=y.p,p=i[2];r>3?(o=p===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(l=0,y.v=n,y.n=i[1]):d<p&&(o=r<3||i[0]>n||n>p)&&(i[4]=r,i[5]=n,y.n=p,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(e=l<2?t:u)||!f;){i||(l?l<3?(l>1&&(y.n=-1),d(l,u)):y.n=u:y.v=u);try{if(s=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(f=y.n<0)?u:r.call(n,y))!==a)break}catch(e){i=t,l=1,u=e}finally{s=1}}return{value:e,done:f}}}(r,o,i),!0),s}var a={};function l(){}function u(){}function s(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(g(e={},n,function(){return this}),e),f=s.prototype=l.prototype=Object.create(c);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,g(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=s,g(f,"constructor",s),g(s,"constructor",u),u.displayName="GeneratorFunction",g(s,o,"GeneratorFunction"),g(f),g(f,o,"Generator"),g(f,n,function(){return this}),g(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:y}})()}function g(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}g=function(t,e,r,n){function i(e,r){g(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},g(t,e,r,n)}function S(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(n,o)}var O=function(){var t,e=(t=h().m(function t(e,r,n,o){var i,a,l,u,s,c,f;return h().w(function(t){for(;;)switch(t.n){case 0:return i=n(e,r),l=(a="string"==typeof i?{url:i}:i).url,u=a.headers,s=void 0===u?{}:u,t.n=1,fetch(l,{headers:s,signal:o});case 1:if((c=t.v).ok){t.n=2;break}throw new Error("Failed to fetch GeoJSON: ".concat(c.status," ").concat(c.statusText));case 2:return t.n=3,c.json();case 3:if("FeatureCollection"!==(f=t.v).type){t.n=4;break}return t.a(2,f);case 4:if("Feature"!==f.type){t.n=5;break}return t.a(2,{type:"FeatureCollection",features:[f]});case 5:if(!Array.isArray(f)){t.n=6;break}return t.a(2,{type:"FeatureCollection",features:f});case 6:throw new Error("Invalid GeoJSON response");case 7:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){S(i,n,o,a,l,"next",t)}function l(t){S(i,n,o,a,l,"throw",t)}a(void 0)})});return function(t,r,n,o){return e.apply(this,arguments)}}();function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var j=function(t){var e=t.getBounds();return[e.getWest(),e.getSouth(),e.getEast(),e.getNorth()]},w=function(t,e){return!(!t||!e)&&e[0]>=t[0]&&e[1]>=t[1]&&e[2]<=t[2]&&e[3]<=t[3]},A=function(t,e){return t?[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[2],e[2]),Math.max(t[3],e[3])]:function(t){if(Array.isArray(t))return P(t)}(r=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return P(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var r},E=function(t,e){return!(!t||!e||t[2]<e[0]||t[0]>e[2]||t[3]<e[1]||t[1]>e[3])},_=function(t){var e=1/0,r=1/0,n=-1/0,o=-1/0,i=function(t,a){var l;0===a?(l=t,e=Math.min(e,l[0]),r=Math.min(r,l[1]),n=Math.max(n,l[0]),o=Math.max(o,l[1])):t.forEach(function(t){return i(t,a-1)})};switch(t.type){case"Point":i(t.coordinates,0);break;case"LineString":case"MultiPoint":i(t.coordinates,1);break;case"Polygon":case"MultiLineString":i(t.coordinates,2);break;case"MultiPolygon":i(t.coordinates,3);break;case"GeometryCollection":t.geometries.forEach(function(t){var i=_(t);e=Math.min(e,i[0]),r=Math.min(r,i[1]),n=Math.max(n,i[2]),o=Math.max(o,i[3])});break;default:throw new Error("Unsupported geometry type: ".concat(t.type))}return[e,r,n,o]};function k(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof l?n:l,s=Object.create(u.prototype);return T(s,"_invoke",function(r,n,o){var i,l,u,s=0,c=o||[],f=!1,y={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,l=0,u=t,y.n=r,a}};function d(r,n){for(l=r,u=n,e=0;!f&&s&&!o&&e<c.length;e++){var o,i=c[e],d=y.p,p=i[2];r>3?(o=p===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(l=0,y.v=n,y.n=i[1]):d<p&&(o=r<3||i[0]>n||n>p)&&(i[4]=r,i[5]=n,y.n=p,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(e=l<2?t:u)||!f;){i||(l?l<3?(l>1&&(y.n=-1),d(l,u)):y.n=u:y.v=u);try{if(s=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(f=y.n<0)?u:r.call(n,y))!==a)break}catch(e){i=t,l=1,u=e}finally{s=1}}return{value:e,done:f}}}(r,o,i),!0),s}var a={};function l(){}function u(){}function s(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(T(e={},n,function(){return this}),e),f=s.prototype=l.prototype=Object.create(c);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,T(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=s,T(f,"constructor",s),T(s,"constructor",u),u.displayName="GeneratorFunction",T(s,o,"GeneratorFunction"),T(f),T(f,o,"Generator"),T(f,n,function(){return this}),T(f,"toString",function(){return"[object Generator]"}),(k=function(){return{w:i,m:y}})()}function T(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}T=function(t,e,r,n){function i(e,r){T(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},T(t,e,r,n)}function D(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(n,o)}function I(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,e)||x(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){if(t){if("string"==typeof t)return C(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(t,e):void 0}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var L=function(t){var e=t.adapter,r=t.pluginConfig,o=t.pluginStateRef,i=t.mapStyle,a=t.mapProvider,l=t.events,u=t.eventBus,s=r.datasets,c=new Map,f=function(){return o.current.datasets||s},y=s.map(function(t){return(0,n.ns)(t,n.V)});e.init(y,i).then(function(){y.forEach(function(t){if(function(t){return"string"==typeof t.geojson&&!!t.idProperty&&"function"==typeof t.transformRequest}(t)){var r=function(t){var e,r,n,o=t.dataset,i=t.map,a=t.onUpdate,l=o.geojson,u=o.idProperty,s=o.transformRequest,c=o.maxFeatures,f=o.minZoom,y=void 0===f?0:f,d=new Map,p=null,b=null,v=function(){return{type:"FeatureCollection",features:Array.from(d.values()).map(function(t){return t.feature})}},m=function(t){var e,r;return u&&null!==(e=null===(r=t.properties)||void 0===r?void 0:r[u])&&void 0!==e?e:t.id},h=function(t){if(c&&!(d.size<=1.2*c)){var e,r=c,n=[],o=[],i=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=x(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw o}}}}(d);try{for(i.s();!(e=i.n()).done;){var a=I(e.value,2),l=a[0],u=a[1];E(u.bbox,t)?n.push(l):o.push({id:l,lastSeenAt:u.lastSeenAt})}}catch(t){i.e(t)}finally{i.f()}o.sort(function(t,e){return t.lastSeenAt-e.lastSeenAt});for(var s=d.size-r,f=0;f<s&&f<o.length;f++)d.delete(o[f].id);if(d.size>r)for(var y=d.size-r,p=n.map(function(t){return{id:t,lastSeenAt:d.get(t).lastSeenAt}}).sort(function(t,e){return t.lastSeenAt-e.lastSeenAt}),b=0;b<y&&b<p.length;b++)d.delete(p[b].id)}},g=function(){var t,e=(t=k().m(function t(){var e,r,n,u,c,f,g;return k().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!((e=i.getZoom())<y)){t.n=1;break}return t.a(2);case 1:if(r=j(i),!p||!w(p,r)){t.n=2;break}return t.a(2);case 2:return b&&b.abort(),b=new AbortController,t.p=3,n={bbox:r,zoom:e,dataset:o},t.n=4,O(l,n,s,b.signal);case 4:u=t.v,c=Date.now(),u.features.forEach(function(t){var e=m(t);null!=e?d.set(e,{feature:t,bbox:_(t.geometry),lastSeenAt:c}):console.warn("Feature missing ID, skipping:",t)}),p=A(p,r),f=d.size,h(r),d.size<f&&(p=r),a(o.id,v()),t.n=7;break;case 5:if(t.p=5,"AbortError"!==(g=t.v).name){t.n=6;break}return t.a(2);case 6:console.error("Failed to fetch dynamic GeoJSON for ".concat(o.id,":"),g);case 7:return t.a(2)}},t,null,[[3,5]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,l,"next",t)}function l(t){D(i,n,o,a,l,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}(),S=(e=g,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,n)},200)},n.cancel=function(){clearTimeout(r),r=null},n),P=function(){S()};return i.on("moveend",P),g(),{destroy:function(){i.off("moveend",P),S.cancel(),b&&b.abort()},clear:function(){d.clear(),p=null,a(o.id,{type:"FeatureCollection",features:[]})},refresh:function(){d.clear(),p=null,g()},getFeatureCount:function(){return d.size},reapply:function(){d.size>0&&a(o.id,v())}}}({dataset:t,map:a.map,onUpdate:function(t,r){return e.setData(t,r)}});c.set(t.id,r)}}),u.emit("datasets:ready")});var d=i,p=function(t){d=t,e.onStyleChange(f(),t,o.current.hiddenFeatures||{},c)},b=function(){e.onSizeChange(f(),d)};return u.on(l.MAP_SET_STYLE,p),u.on(l.MAP_SIZE_CHANGE,b),{remove:function(){u.off(l.MAP_SET_STYLE,p),u.off(l.MAP_SIZE_CHANGE,b),c.forEach(function(t){return t.destroy()}),c.clear(),e.destroy(f())},refreshDataset:function(t){var e;null===(e=c.get(t))||void 0===e||e.refresh()},clearDatasetCache:function(t){var e;null===(e=c.get(t))||void 0===e||e.clear()},getFeatureCount:function(t){var e,r;return null!==(e=null===(r=c.get(t))||void 0===r?void 0:r.getFeatureCount())&&void 0!==e?e:null}}};function M(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof l?n:l,s=Object.create(u.prototype);return F(s,"_invoke",function(r,n,o){var i,l,u,s=0,c=o||[],f=!1,y={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,l=0,u=t,y.n=r,a}};function d(r,n){for(l=r,u=n,e=0;!f&&s&&!o&&e<c.length;e++){var o,i=c[e],d=y.p,p=i[2];r>3?(o=p===n)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(l=0,y.v=n,y.n=i[1]):d<p&&(o=r<3||i[0]>n||n>p)&&(i[4]=r,i[5]=n,y.n=p,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(e=l<2?t:u)||!f;){i||(l?l<3?(l>1&&(y.n=-1),d(l,u)):y.n=u:y.v=u);try{if(s=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(f=y.n<0)?u:r.call(n,y))!==a)break}catch(e){i=t,l=1,u=e}finally{s=1}}return{value:e,done:f}}}(r,o,i),!0),s}var a={};function l(){}function u(){}function s(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(F(e={},n,function(){return this}),e),f=s.prototype=l.prototype=Object.create(c);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,F(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=s,F(f,"constructor",s),F(s,"constructor",u),u.displayName="GeneratorFunction",F(s,o,"GeneratorFunction"),F(f),F(f,o,"Generator"),F(f,n,function(){return this}),F(f,"toString",function(){return"[object Generator]"}),(M=function(){return{w:i,m:y}})()}function F(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}F=function(t,e,r,n){function i(e,r){F(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},F(t,e,r,n)}function R(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(n,o)}function N(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var G=function(t,e){var r,n,o=t.pluginState,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.datasetId,l=i.sublayerId;if(l){var u,s=e?"visible":"hidden";return null===(u=o.layerAdapter)||void 0===u||u[e?"showSublayer":"hideSublayer"](a,l),void o.dispatch({type:"SET_SUBLAYER_VISIBILITY",payload:{datasetId:a,sublayerId:l,visibility:s}})}if(a){if(null===(n=o.layerAdapter)||void 0===n||n[e?"showDataset":"hideDataset"](a),o.dispatch({type:"SET_DATASET_VISIBILITY",payload:{id:a,visibility:e?"visible":"hidden"}}),e){var c,f=null===(c=o.datasets)||void 0===c?void 0:c.find(function(t){return t.id===a});Object.entries((null==f?void 0:f.sublayerVisibility)||{}).forEach(function(t){var e,r=N(t,2),n=r[0];"hidden"===r[1]&&(null===(e=o.layerAdapter)||void 0===e||e.hideSublayer(a,n))})}}else o.dispatch({type:"SET_GLOBAL_VISIBILITY",payload:{visibility:e?"visible":"hidden"}}),null===(r=o.datasets)||void 0===r||r.forEach(function(t){var r;null===(r=o.layerAdapter)||void 0===r||r[e?"showDataset":"hideDataset"](t.id),e&&Object.entries(t.sublayerVisibility||{}).forEach(function(e){var r,n=N(e,2),i=n[0];"hidden"===n[1]&&(null===(r=o.layerAdapter)||void 0===r||r.hideSublayer(t.id,i))})})},V=r(287),Y="im-c-datasets-layers__item-label govuk-label govuk-checkboxes__label",U=function(t){var e;return null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu})},W=r(247),H=r(933),K=function(t){var e=t.text;return(0,V.jsx)("div",{className:"im-c-datasets-key",children:(0,V.jsx)("p",{className:"im-c-datasets-key__empty-message",children:e})})},z=r(121),Z=r(449);function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function J(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?J(Object(r),!0).forEach(function(e){X(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function X(t,e,r){return(e=function(t){var e=function(t){if("object"!=$(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Q=20,tt={xmlns:"http://www.w3.org/2000/svg",width:Q,height:Q,viewBox:"0 0 ".concat(Q," ").concat(Q),className:"am-c-datasets-key-symbol","aria-hidden":"true",focusable:"false"},et=q(q({},tt),{},{width:44,height:44,className:"am-c-datasets-key-symbol am-c-datasets-key-symbol--point"});function rt(t){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(t)}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(r),!0).forEach(function(e){it(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function it(t,e,r){return(e=function(t){var e=function(t){if("object"!=rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var at=function(t){var e=t.patternRegistry,r=t.mapStyle,n=e.getKeyPatternPaths(t,r.id);return(0,V.jsxs)("svg",ot(ot({},tt),{},{children:[(0,V.jsx)("g",{dangerouslySetInnerHTML:{__html:n.border}}),(0,V.jsx)("g",{transform:"translate(".concat(2,", ").concat(2,")"),dangerouslySetInnerHTML:{__html:n.content}})]}))};function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function st(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach(function(e){ct(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function ct(t,e,r){return(e=function(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ft=function(t){var e,r=t.symbolRegistry,n=t.mapStyle,o=t.symbolDef,i=null!==(e=null==n?void 0:n.appColorScheme)&&void 0!==e?e:"light",a=st(st({},n),{},{mapColorScheme:i}),l=r.resolve(o,(0,z.sR)(t),a),u=(0,z.n8)(t,o);return(0,V.jsx)("svg",st(st({},et),{},{viewBox:u,children:(0,V.jsx)("g",{dangerouslySetInnerHTML:{__html:l}})}))};function yt(t){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(t)}function dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function pt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dt(Object(r),!0).forEach(function(e){bt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function bt(t,e,r){return(e=function(t){var e=function(t){if("object"!=yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vt=function(t){var e=t.mapStyle;return(0,V.jsx)("svg",pt(pt({},tt),{},{children:(0,V.jsx)("line",{x1:t.strokeWidth/2,y1:10,x2:Q-t.strokeWidth/2,y2:10,stroke:(0,W.o)(t.stroke,e.id),strokeWidth:t.strokeWidth,strokeLinecap:"round"})}))};function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(r),!0).forEach(function(e){St(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function St(t,e,r){return(e=function(t){var e=function(t){if("object"!=mt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ot=function(t){var e=t.mapStyle;return(0,V.jsx)("svg",gt(gt({},tt),{},{children:(0,V.jsx)("rect",{x:t.strokeWidth/2,y:t.strokeWidth/2,width:Q-t.strokeWidth,height:Q-t.strokeWidth,rx:t.strokeWidth,ry:t.strokeWidth,fill:(0,W.o)(t.fill,e.id),stroke:(0,W.o)(t.stroke,e.id),strokeWidth:t.strokeWidth,strokeLinejoin:"round"})}))};function Pt(t){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(t)}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach(function(e){At(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function At(t,e,r){return(e=function(t){var e=function(t){if("object"!=Pt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Et=function(t){var e=t.symbolRegistry,r=(0,z.Lo)(t)&&e.getSymbolDef(t);return r?(0,V.jsx)(ft,wt(wt({},t),{},{symbolDef:r})):(0,Z.vY)(t)?(0,V.jsx)(at,wt({},t)):"line"===t.keySymbolShape?(0,V.jsx)(vt,wt({},t)):(0,V.jsx)(Ot,wt({},t))};function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}function kt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Tt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?kt(Object(r),!0).forEach(function(e){Dt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Dt(t,e,r){return(e=function(t){var e=function(t){if("object"!=_t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_t(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function It(t){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},It(t)}function xt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(r),!0).forEach(function(e){Lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Lt(t,e,r){return(e=function(t){var e=function(t){if("object"!=It(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==It(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mt(t){return function(t){if(Array.isArray(t))return Ft(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ft(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Rt(t){return Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rt(t)}function Nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(r),!0).forEach(function(e){Gt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Gt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vt="[interactive-map]",Yt={InitComponent:function(t){var e,r=t.pluginConfig,o=t.pluginState,i=t.appState,a=t.mapState,l=t.mapProvider,u=t.services,s=o.dispatch,c=u.eventBus,f=u.symbolRegistry,y=u.patternRegistry,d=!(null===(e=l.map)||void 0===e||!e.getStyle()),p=(0,v.useRef)(o);p.current=o;var b=(0,v.useRef)(null);return(0,v.useEffect)(function(){var t,e,u,v,h=null===(t=null===(e=r.includeModes)||void 0===e?void 0:e.includes(i.mode))||void 0===t||t,g=null!==(u=null===(v=r.excludeModes)||void 0===v?void 0:v.includes(i.mode))&&void 0!==u&&u;if(d&&h&&!g&&!b.current){o.datasets||s({type:"SET_DATASETS",payload:{datasets:r.datasets,datasetDefaults:n.V}});var S=function(){var t,e=(t=M().m(function t(){var e,n,o;return M().w(function(t){for(;;)switch(t.n){case 0:if(r.layerAdapter){t.n=1;break}throw new Error("datasets plugin: no layerAdapter provided. Import and pass maplibreLayerAdapter or a custom adapter.");case 1:return t.n=2,r.layerAdapter.load();case 2:e=t.v,n=e.default,o=new n(l,f,y),s({type:"SET_LAYER_ADAPTER",payload:o}),b.current=L({adapter:o,pluginConfig:r,pluginStateRef:p,mapStyle:a.mapStyle,mapProvider:l,events:m,eventBus:c});case 3:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,l,"next",t)}function l(t){R(i,n,o,a,l,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();S()}},[d,i.mode]),(0,v.useEffect)(function(){s({type:"BUILD_KEY_GROUPS",payload:null})},[o.datasets]),(0,v.useEffect)(function(){return function(){b.current&&(b.current.remove(),b.current=null),s({type:"SET_LAYER_ADAPTER",payload:null})}},[]),null},reducer:{initialState:{datasets:null,key:{items:[],hasGroups:!1},hiddenFeatures:{},layerAdapter:null},actions:b},panels:[{id:"datasetsLayers",label:"Layers",mobile:{slot:"drawer",modal:!0,dismissible:!0},tablet:{slot:"left-top",dismissible:!0,exclusive:!0,width:"260px"},desktop:{slot:"left-top",modal:!1,dismissible:!0,exclusive:!0,width:"280px"},render:function(t){var e,r,n,o=t.pluginState,i=function(t){var e=t.target,r=e.value,n=e.checked;G({pluginState:o},n,{datasetId:r})},a=function(t){var e=t.target.checked,r=t.target.dataset.datasetId,n=t.target.dataset.sublayerId;G({pluginState:o},e,{datasetId:r,sublayerId:n})},l=function(t){var e="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat("hidden"===t.visibility?"":" im-c-datasets-layers__item--checked");return(0,V.jsx)("div",{className:e,"data-module":"govuk-checkboxes",children:(0,V.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,V.jsx)("input",{className:"govuk-checkboxes__input",id:t.id,name:"layers",type:"checkbox",value:t.id,checked:"hidden"!==t.visibility,onChange:i}),(0,V.jsx)("label",{className:Y,htmlFor:t.id,children:t.label})]})},t.id)},u=(o.datasets||[]).filter(function(t){return t.showInMenu||U(t)}),s=(e=u,r=new Set,n=[],e.forEach(function(t){if(U(t))n.push({type:"sublayers",dataset:t});else{if(t.groupLabel){if(r.has(t.groupLabel))return;return r.add(t.groupLabel),void n.push({type:"group",groupLabel:t.groupLabel,datasets:e.filter(function(e){return!U(e)&&e.groupLabel===t.groupLabel})})}n.push({type:"flat",dataset:t})}}),n),c=s.some(function(t){return"sublayers"===t.type||"group"===t.type}),f="im-c-datasets-layers".concat(c?" im-c-datasets-layers--has-groups":"");return(0,V.jsx)("div",{className:f,children:s.map(function(t){if("sublayers"===t.type){var e=t.dataset,r=e.sublayers.filter(function(t){return t.showInMenu}).some(function(t){var r;return"hidden"!==(null===(r=e.sublayerVisibility)||void 0===r?void 0:r[t.id])}),n="govuk-form-group im-c-datasets-layers-group".concat(r?" im-c-datasets-layers-group--items-checked":"");return(0,V.jsx)("div",{className:n,children:(0,V.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,V.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:e.label}),e.sublayers.filter(function(t){return t.showInMenu}).map(function(t){var r,n="hidden"!==(null===(r=e.sublayerVisibility)||void 0===r?void 0:r[t.id]),o="".concat(e.id,"-").concat(t.id),i="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat(n?" im-c-datasets-layers__item--checked":"");return(0,V.jsx)("div",{className:i,"data-module":"govuk-checkboxes",children:(0,V.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,V.jsx)("input",{className:"govuk-checkboxes__input",id:o,type:"checkbox",checked:n,"data-dataset-id":e.id,"data-sublayer-id":t.id,onChange:a}),(0,V.jsx)("label",{className:Y,htmlFor:o,children:t.label})]})},t.id)})]})},e.id)}if("group"===t.type){var o=t.datasets.some(function(t){return"hidden"!==t.visibility}),i="govuk-form-group im-c-datasets-layers-group".concat(o?" im-c-datasets-layers-group--items-checked":"");return(0,V.jsx)("div",{className:i,children:(0,V.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,V.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:t.groupLabel}),t.datasets.map(function(t){return l(t)})]})},t.groupLabel)}return l(t.dataset)})})}},{id:"datasetsKey",label:"Key",mobile:{slot:"drawer",modal:!0},tablet:{slot:"left-top",width:"260px"},desktop:{slot:"left-top",width:"280px"},render:function(t){var e,r=t.pluginConfig,n=t.mapState,o=t.pluginState,i=t.services;if(null==o||null===(e=o.key)||void 0===e||null===(e=e.items)||void 0===e||!e.length)return(0,V.jsx)(K,{text:r.noKeyItemText});var a=n.mapStyle,l=i.symbolRegistry,u=i.patternRegistry,s=function(t,e){return(0,V.jsxs)("dl",{className:"im-c-datasets-key__item",children:[(0,V.jsx)("dt",{className:"im-c-datasets-key__item-symbol",children:(0,V.jsx)(Et,Tt(Tt({},e),{},{symbolRegistry:l,patternRegistry:u,mapStyle:a}))}),(0,V.jsxs)("dd",{className:"im-c-datasets-key__item-label",children:[e.label,e.symbolDescription&&(0,V.jsxs)("span",{className:"govuk-visually-hidden",children:["(",(0,W.o)(e.symbolDescription,a.id),")"]})]})]},t)},c=o.key,f=c.items,y=c.hasGroups,d="im-c-datasets-key".concat(y?" im-c-datasets-key--has-groups":"");return(0,V.jsx)("div",{className:d,children:f.map(function(t){if("sublayers"===t.type){var e="key-heading-".concat(t.dataset.id);return(0,V.jsxs)("section",{className:"im-c-datasets-key__group","aria-labelledby":e,children:[(0,V.jsx)("h3",{id:e,className:"im-c-datasets-key__group-heading",children:t.dataset.label}),t.dataset.sublayers.filter(function(e){var r;return"hidden"!==(null===(r=t.dataset.sublayerVisibility)||void 0===r?void 0:r[e.id])}).map(function(e){return s("".concat(t.dataset.id,"-").concat(e.id),(0,H.m)(t.dataset,e))})]},t.dataset.id)}if("group"===t.type){var r="key-heading-".concat(t.groupLabel.toLowerCase().replaceAll(/\s+/g,"-"));return(0,V.jsxs)("section",{className:"im-c-datasets-key__group","aria-labelledby":r,children:[(0,V.jsx)("h3",{id:r,className:"im-c-datasets-key__group-heading",children:t.groupLabel}),t.datasets.map(function(t){return s(t.id,t)})]},t.groupLabel)}return s(t.dataset.id,t.dataset)})})}}],buttons:[{id:"datasetsLayers",label:"Layers",panelId:"datasetsLayers",iconId:"layers",excludeWhen:function(t){return!t.pluginConfig.datasets.some(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))})},mobile:{slot:"top-left",showLabel:!0},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}},{id:"datasetsKey",label:"Key",panelId:"datasetsKey",iconId:"key",excludeWhen:function(t){return!t.pluginConfig.datasets.some(function(t){return t.showInKey})},mobile:{slot:"top-left",showLabel:!1},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}}],icons:[{id:"layers",svgContent:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"></path><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"></path><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"></path>'},{id:"key",svgContent:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>'}],api:{addDataset:function(t,e){var r,o=t.pluginState,i=t.mapState;null===(r=o.layerAdapter)||void 0===r||r.addDataset(Ct(Ct({},n.V),e),i.mapStyle),o.dispatch({type:"ADD_DATASET",payload:{dataset:e,datasetDefaults:n.V}})},removeDataset:function(t,e){var r,n,o=t.pluginState,i=null===(r=o.datasets)||void 0===r?void 0:r.find(function(t){return t.id===e});i&&(null===(n=o.layerAdapter)||void 0===n||n.removeDataset(i,o.datasets),o.dispatch({type:"REMOVE_DATASET",payload:{id:e}}))},setDatasetVisibility:G,setFeatureVisibility:function(t,e,r){var n,o=t.pluginState,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i.datasetId,l=i.idProperty,u=void 0===l?null:l,s=null===(n=o.datasets)||void 0===n?void 0:n.find(function(t){return t.id===a});if(s)if(e){var c,f=o.hiddenFeatures[a];if(!f)return;var y=f.ids.filter(function(t){return!r.includes(t)});o.dispatch({type:"SHOW_FEATURES",payload:{layerId:a,featureIds:r}}),null===(c=o.layerAdapter)||void 0===c||c.showFeatures(s,u,y)}else{var d,p=o.hiddenFeatures[a],b=(null==p?void 0:p.ids)||[],v=Mt(new Set([].concat(Mt(b),Mt(r))));o.dispatch({type:"HIDE_FEATURES",payload:{layerId:a,idProperty:u,featureIds:r}}),null===(d=o.layerAdapter)||void 0===d||d.hideFeatures(s,u,v)}},setStyle:function(t,e){var r,n,o=t.pluginState,i=t.mapState,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=a.datasetId,u=a.sublayerId,s=null===(r=o.datasets)||void 0===r?void 0:r.find(function(t){return t.id===l});if(s)if(u){var c,f;o.dispatch({type:"SET_SUBLAYER_STYLE",payload:{datasetId:l,sublayerId:u,styleChanges:e}});var y=Bt(Bt({},s),{},{sublayers:null===(c=s.sublayers)||void 0===c?void 0:c.map(function(t){return t.id===u?Bt(Bt({},t),{},{style:Bt(Bt({},t.style),e)}):t})});null===(f=o.layerAdapter)||void 0===f||f.setSublayerStyle(y,u,i.mapStyle)}else{o.dispatch({type:"SET_DATASET_STYLE",payload:{datasetId:l,styleChanges:e}});var d=Bt(Bt({},s),e);null===(n=o.layerAdapter)||void 0===n||n.setStyle(d,i.mapStyle)}},getStyle:function(t){var e,r,n=t.pluginState,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.datasetId,a=o.sublayerId,l=null===(e=n.datasets)||void 0===e?void 0:e.find(function(t){return t.id===i});if(!l)return null;if(a){var u,s,c=null===(u=l.sublayers)||void 0===u?void 0:u.find(function(t){return t.id===a});return null!==(s=null==c?void 0:c.style)&&void 0!==s?s:null}return null!==(r=l.style)&&void 0!==r?r:null},setOpacity:function(t,e,r){var n,o=t.pluginState,i=r||{},a=i.datasetId,l=i.sublayerId;if(l){var u,s;if(!(null===(u=o.datasets)||void 0===u?void 0:u.find(function(t){return t.id===a})))return;return o.dispatch({type:"SET_SUBLAYER_OPACITY",payload:{datasetId:a,sublayerId:l,opacity:e}}),void(null===(s=o.layerAdapter)||void 0===s||s.setSublayerOpacity(a,l,e))}if(a){var c,f;if(!(null===(c=o.datasets)||void 0===c?void 0:c.find(function(t){return t.id===a})))return;return o.dispatch({type:"SET_OPACITY",payload:{datasetId:a,opacity:e}}),void(null===(f=o.layerAdapter)||void 0===f||f.setOpacity(a,e))}o.dispatch({type:"SET_GLOBAL_OPACITY",payload:{opacity:e}}),null===(n=o.datasets)||void 0===n||n.forEach(function(t){var r;null===(r=o.layerAdapter)||void 0===r||r.setOpacity(t.id,e)})},getOpacity:function(t,e){var r,n,o=t.pluginState,i=e||{},a=i.datasetId,l=i.sublayerId;if(l){var u,s,c,f,y=null===(u=o.datasets)||void 0===u?void 0:u.find(function(t){return t.id===a}),d=null==y||null===(s=y.sublayers)||void 0===s?void 0:s.find(function(t){return t.id===l});return null!==(c=null==d||null===(f=d.style)||void 0===f?void 0:f.opacity)&&void 0!==c?c:null}if(a){var p,b,v=null===(p=o.datasets)||void 0===p?void 0:p.find(function(t){return t.id===a});return null!==(b=null==v?void 0:v.opacity)&&void 0!==b?b:null}return null!==(r=null===(n=o.datasets)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.opacity)&&void 0!==r?r:null},setData:function(t,e,r){var n,o,i=t.pluginState,a=r.datasetId,l=null===(n=i.datasets)||void 0===n?void 0:n.find(function(t){return t.id===a});null!=l&&l.tiles?function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=console).warn.apply(t,[Vt].concat(r))}('setData called on vector tile dataset "'.concat(a,'" — has no effect')):null===(o=i.layerAdapter)||void 0===o||o.setData(a,e)}}}},933(t,e,r){r.d(e,{m:()=>u});var n=r(772);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var l=function(t,e){return"symbolDescription"in e?e.symbolDescription:(0,n.p_)(e)?void 0:t.symbolDescription},u=function(t,e){var r,n,o,u,s,c,f,y,d,p,b,v,m,h,g,S,O,P=e.style||{},j=(S=t.filter,O=e.filter,S&&O?["all",S,O]:O||S||null);return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({id:e.id,label:e.label,stroke:null!==(r=P.stroke)&&void 0!==r?r:t.stroke,strokeWidth:null!==(n=P.strokeWidth)&&void 0!==n?n:t.strokeWidth,strokeDashArray:null!==(o=P.strokeDashArray)&&void 0!==o?o:t.strokeDashArray,opacity:null!==(u=P.opacity)&&void 0!==u?u:t.opacity,keySymbolShape:null!==(s=P.keySymbolShape)&&void 0!==s?s:t.keySymbolShape,symbolDescription:l(t,P),showInKey:null!==(c=e.showInKey)&&void 0!==c?c:t.showInKey,showInMenu:null!==(f=e.showInMenu)&&void 0!==f&&f,filter:j,minZoom:t.minZoom,maxZoom:t.maxZoom,symbol:null!==(y=P.symbol)&&void 0!==y?y:t.symbol,symbolSvgContent:null!==(d=P.symbolSvgContent)&&void 0!==d?d:t.symbolSvgContent,symbolViewBox:null!==(p=P.symbolViewBox)&&void 0!==p?p:t.symbolViewBox,symbolAnchor:null!==(b=P.symbolAnchor)&&void 0!==b?b:t.symbolAnchor,symbolBackgroundColor:null!==(v=P.symbolBackgroundColor)&&void 0!==v?v:t.symbolBackgroundColor,symbolForegroundColor:null!==(m=P.symbolForegroundColor)&&void 0!==m?m:t.symbolForegroundColor,symbolHaloWidth:null!==(h=P.symbolHaloWidth)&&void 0!==h?h:t.symbolHaloWidth,symbolGraphic:null!==(g=P.symbolGraphic)&&void 0!==g?g:t.symbolGraphic},function(t,e){var r,n;return e.fillPattern||e.fillPatternSvgContent?{fillPattern:e.fillPattern,fillPatternSvgContent:e.fillPatternSvgContent,fillPatternForegroundColor:null!==(r=e.fillPatternForegroundColor)&&void 0!==r?r:t.fillPatternForegroundColor,fillPatternBackgroundColor:null!==(n=e.fillPatternBackgroundColor)&&void 0!==n?n:t.fillPatternBackgroundColor}:"fill"in e?{fill:e.fill}:{fill:t.fill,fillPattern:t.fillPattern,fillPatternSvgContent:t.fillPatternSvgContent,fillPatternForegroundColor:t.fillPatternForegroundColor,fillPatternBackgroundColor:t.fillPatternBackgroundColor}}(t,P))}},247(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.d(e,{o:()=>o});var o=function(t,e){if(!t)return null;if("string"==typeof t)return t.trim();if("object"===n(t)){if(e&&t[e])return t[e];var r=Object.values(t)[0];return null!=r?r:null}return null}},449(t,e,r){r.d(e,{vY:()=>n});var n=function(t){return!(!t.fillPattern&&!t.fillPatternSvgContent)}},121(t,e,r){r.d(e,{Lo:()=>o,Op:()=>l,n8:()=>a,sR:()=>i});var n=new Set(["symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"]),o=function(t){return!(!t.symbol&&!t.symbolSvgContent)},i=function(t){if(!o(t))return{};var e={};return n.forEach(function(r){if(null!=t[r]){var n=r.charAt(6).toLowerCase()+r.slice(7);e[n]=t[r]}}),e},a=function(t,e){var r;return t.symbolViewBox?t.symbolViewBox:null!==(r=null==e?void 0:e.viewBox)&&void 0!==r?r:"0 0 38 38"},l=function(t,e){var r;return t.symbolAnchor?t.symbolAnchor:null!==(r=null==e?void 0:e.anchor)&&void 0!==r?r:[.5,.5]}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.datasetsMaplibrePlugin=t())}(this,()=>(()=>{"use strict";var e,t,r={738(e){e.exports=preactCompat},287(e){e.exports=preactJsxRuntime}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>({447:"im-datasets-plugin",580:"im-datasets-maplibre-adapter"}[e]+".js"),o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="defra.datasetsMaplibrePlugin:",o.l=(r,n,i,a)=>{if(e[r])e[r].push(n);else{var u,c;if(void 0!==i)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p++){var l=f[p];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+i){u=l;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",t+i),u.src=r),e[r]=[n];var s=(t,n)=>{u.onerror=u.onload=null,clearTimeout(b);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach(e=>e(n)),t)return t(n)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),c&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={57:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=i);var a=o.p+o.u(t),u=new Error;o.l(a,r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,n[1](u)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[a,u,c]=r,f=0;if(a.some(t=>0!==e[t])){for(n in u)o.o(u,n)&&(o.m[n]=u[n]);c&&c(o)}for(t&&t(r);f<a.length;f++)i=a[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i={};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof f?n:f,p=Object.create(u.prototype);return c(p,"_invoke",function(r,n,o){var i,u,c,f=0,p=o||[],l=!1,s={p:0,n:0,v:e,a:b,f:b.bind(e,4),d:function(t,r){return i=t,u=0,c=e,s.n=r,a}};function b(r,n){for(u=r,c=n,t=0;!l&&f&&!o&&t<p.length;t++){var o,i=p[t],b=s.p,y=i[2];r>3?(o=y===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=b&&((o=r<2&&b<i[1])?(u=0,s.v=n,s.n=i[1]):b<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,s.n=y,u=0))}if(o||r>1)return a;throw l=!0,n}return function(o,p,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===p&&b(p,y),u=p,c=y;(t=u<2?e:c)||!l;){i||(u?u<3?(u>1&&(s.n=-1),b(u,c)):s.n=c:s.v=c);try{if(f=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(l=s.n<0)?c:r.call(n,s))!==a)break}catch(t){i=e,u=1,c=t}finally{f=1}}return{value:t,done:l}}}(r,o,i),!0),p}var a={};function f(){}function p(){}function l(){}t=Object.getPrototypeOf;var s=[][n]?t(t([][n]())):(c(t={},n,function(){return this}),t),b=l.prototype=f.prototype=Object.create(s);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,c(e,o,"GeneratorFunction")),e.prototype=Object.create(b),e}return p.prototype=l,c(b,"constructor",l),c(l,"constructor",p),p.displayName="GeneratorFunction",c(l,o,"GeneratorFunction"),c(b),c(b,o,"Generator"),c(b,n,function(){return this}),c(b,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:y}})()}function c(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}c=function(e,t,r,n){function i(t,r){c(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},c(e,t,r,n)}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return(t=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){v(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function v(e,t,r){return(t=function(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(){return function(){var e,t,r=l(l({noKeyItemText:"No features displayed"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{id:"datasets",load:(e=u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(447).then(o.bind(o,897));case 1:return t=e.v.manifest,e.a(2,t)}},e)}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)})},function(){return t.apply(this,arguments)})});return r}(d(d({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{layerAdapter:{load:function(){return o.e(580).then(o.bind(o,438))}}}))}return o.d(i,{default:()=>m}),i.default})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.datasetsMaplibrePlugin=t())}(this,()=>(()=>{"use strict";var e,t,r={738(e){e.exports=preactCompat},287(e){e.exports=preactJsxRuntime}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>({447:"im-datasets-plugin",580:"im-datasets-maplibre-adapter"}[e]+".js"),o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="defra.datasetsMaplibrePlugin:",o.l=(r,n,i,a)=>{if(e[r])e[r].push(n);else{var u,c;if(void 0!==i)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p++){var l=f[p];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+i){u=l;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",t+i),u.src=r),e[r]=[n];var s=(t,n)=>{u.onerror=u.onload=null,clearTimeout(b);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach(e=>e(n)),t)return t(n)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),c&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={57:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=i);var a=o.p+o.u(t),u=new Error;o.l(a,r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,n[1](u)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[a,u,c]=r,f=0;if(a.some(t=>0!==e[t])){for(n in u)o.o(u,n)&&(o.m[n]=u[n]);c&&c(o)}for(t&&t(r);f<a.length;f++)i=a[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i={};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof f?n:f,p=Object.create(u.prototype);return c(p,"_invoke",function(r,n,o){var i,u,c,f=0,p=o||[],l=!1,s={p:0,n:0,v:e,a:b,f:b.bind(e,4),d:function(t,r){return i=t,u=0,c=e,s.n=r,a}};function b(r,n){for(u=r,c=n,t=0;!l&&f&&!o&&t<p.length;t++){var o,i=p[t],b=s.p,y=i[2];r>3?(o=y===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=b&&((o=r<2&&b<i[1])?(u=0,s.v=n,s.n=i[1]):b<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,s.n=y,u=0))}if(o||r>1)return a;throw l=!0,n}return function(o,p,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===p&&b(p,y),u=p,c=y;(t=u<2?e:c)||!l;){i||(u?u<3?(u>1&&(s.n=-1),b(u,c)):s.n=c:s.v=c);try{if(f=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(l=s.n<0)?c:r.call(n,s))!==a)break}catch(t){i=e,u=1,c=t}finally{f=1}}return{value:t,done:l}}}(r,o,i),!0),p}var a={};function f(){}function p(){}function l(){}t=Object.getPrototypeOf;var s=[][n]?t(t([][n]())):(c(t={},n,function(){return this}),t),b=l.prototype=f.prototype=Object.create(s);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,c(e,o,"GeneratorFunction")),e.prototype=Object.create(b),e}return p.prototype=l,c(b,"constructor",l),c(l,"constructor",p),p.displayName="GeneratorFunction",c(l,o,"GeneratorFunction"),c(b),c(b,o,"Generator"),c(b,n,function(){return this}),c(b,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:y}})()}function c(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}c=function(e,t,r,n){function i(t,r){c(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},c(e,t,r,n)}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return(t=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){v(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function v(e,t,r){return(t=function(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(){return function(){var e,t,r=l(l({noKeyItemText:"No features displayed"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{id:"datasets",load:(e=u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(447).then(o.bind(o,897));case 1:return t=e.v.manifest,e.a(2,t)}},e)}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)})},function(){return t.apply(this,arguments)})});return r}(d(d({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{layerAdapter:{load:function(){return o.e(580).then(o.bind(o,132))}}}))}return o.d(i,{default:()=>m}),i.default})());
@@ -1,8 +1,8 @@
1
1
  import { getValueForStyle } from '../../../../../../src/utils/getValueForStyle.js'
2
- import { hasPattern, getPatternImageId } from './patternImages.js'
2
+ import { hasPattern } from './patternImages.js'
3
3
  import { mergeSublayer } from '../../utils/mergeSublayer.js'
4
4
  import { getSourceId, getLayerIds, getSublayerLayerIds, isDynamicSource, MAX_TILE_ZOOM } from './layerIds.js'
5
- import { hasSymbol, getSymbolDef, getSymbolAnchor, anchorToMaplibre, getSymbolImageId } from './symbolImages.js'
5
+ import { hasSymbol, getSymbolAnchor, anchorToMaplibre } from './symbolImages.js'
6
6
 
7
7
  // ─── Source ───────────────────────────────────────────────────────────────────
8
8
 
@@ -36,7 +36,7 @@ export const addFillLayer = (map, config, layerId, sourceId, sourceLayer, visibi
36
36
  if (!config.fill && !hasPattern(config)) {
37
37
  return
38
38
  }
39
- const patternImageId = hasPattern(config) ? getPatternImageId(config, mapStyleId, patternRegistry, pixelRatio) : null
39
+ const patternImageId = hasPattern(config) ? patternRegistry.getPatternImageId(config, mapStyleId, pixelRatio) : null
40
40
  const paint = patternImageId
41
41
  ? { 'fill-pattern': patternImageId, 'fill-opacity': config.opacity || 1 }
42
42
  : { 'fill-color': getValueForStyle(config.fill, mapStyleId), 'fill-opacity': config.opacity || 1 }
@@ -81,9 +81,9 @@ export const addStrokeLayer = (map, config, layerId, sourceId, sourceLayer, visi
81
81
 
82
82
  export const addSymbolLayer = (map, dataset, layerId, sourceId, sourceLayer, visibility, { mapStyle, symbolRegistry, pixelRatio }) => {
83
83
  if (!layerId || map.getLayer(layerId)) { return }
84
- const symbolDef = getSymbolDef(dataset, symbolRegistry)
84
+ const symbolDef = symbolRegistry.getSymbolDef(dataset)
85
85
  if (!symbolDef) { return }
86
- const imageId = getSymbolImageId(dataset, mapStyle, symbolRegistry, false, pixelRatio)
86
+ const imageId = symbolRegistry.getSymbolImageId(dataset, mapStyle, false, pixelRatio)
87
87
  if (!imageId) { return }
88
88
  const anchor = getSymbolAnchor(dataset, symbolDef)
89
89
  map.addLayer({