@defra/interactive-map 0.0.18-alpha → 0.0.19-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 (73) hide show
  1. package/assets/css/docusaurus.css +58 -34
  2. package/dist/css/index.css +1 -1
  3. package/dist/esm/im-core.js +1 -1
  4. package/dist/esm/im-shell.js +1 -1
  5. package/dist/umd/im-core.js +1 -1
  6. package/dist/umd/index.js +1 -1
  7. package/docs/api/panel-definition.md +16 -0
  8. package/docs/api.md +28 -4
  9. package/docs/assets/basic-map.jpg +0 -0
  10. package/docs/assets/button-first.jpg +0 -0
  11. package/docs/assets/maker-panel.jpg +0 -0
  12. package/docs/examples/add-marker-with-panel.mdx +59 -0
  13. package/docs/examples/basic-map.mdx +24 -0
  14. package/docs/examples/button-map.mdx +24 -0
  15. package/docs/examples/index.mdx +49 -0
  16. package/docs/index.mdx +1 -1
  17. package/docs/plugins/interact.md +32 -1
  18. package/docs/plugins.md +1 -1
  19. package/docusaurus.config.cjs +9 -1
  20. package/package.json +1 -1
  21. package/plugins/beta/datasets/dist/esm/im-datasets-plugin.js +1 -1
  22. package/plugins/beta/datasets/dist/umd/im-datasets-plugin.js +1 -1
  23. package/plugins/beta/draw-es/dist/esm/im-draw-es-plugin.js +1 -1
  24. package/plugins/beta/draw-ml/dist/css/index.css +2 -19
  25. package/plugins/beta/draw-ml/dist/esm/im-draw-ml-plugin.js +1 -1
  26. package/plugins/beta/draw-ml/dist/umd/im-draw-ml-plugin.js +1 -1
  27. package/plugins/beta/scale-bar/dist/css/index.css +1 -1
  28. package/plugins/beta/scale-bar/src/scaleBar.scss +1 -0
  29. package/plugins/interact/dist/esm/im-interact-plugin.js +1 -1
  30. package/plugins/interact/dist/umd/im-interact-plugin.js +1 -1
  31. package/plugins/interact/dist/umd/index.js +1 -1
  32. package/plugins/interact/src/InteractInit.jsx +5 -3
  33. package/plugins/interact/src/api/clear.js +1 -1
  34. package/plugins/interact/src/api/selectMarker.js +14 -0
  35. package/plugins/interact/src/api/selectMarker.test.js +25 -0
  36. package/plugins/interact/src/api/unselectMarker.js +14 -0
  37. package/plugins/interact/src/api/unselectMarker.test.js +14 -0
  38. package/plugins/interact/src/events.js +18 -30
  39. package/plugins/interact/src/events.test.js +113 -108
  40. package/plugins/interact/src/manifest.js +10 -2
  41. package/plugins/interact/src/reducer.js +36 -1
  42. package/plugins/interact/src/reducer.test.js +40 -1
  43. package/plugins/interact/src/utils/interactionModes.js +12 -0
  44. package/src/App/components/Panel/Panel.jsx +6 -6
  45. package/src/App/components/Panel/Panel.test.jsx +37 -0
  46. package/src/App/components/Viewport/Viewport.jsx +5 -15
  47. package/src/App/components/Viewport/Viewport.module.scss +2 -0
  48. package/src/App/components/Viewport/Viewport.test.jsx +16 -33
  49. package/src/App/hooks/useInterfaceAPI.js +7 -7
  50. package/src/App/hooks/useInterfaceAPI.test.js +15 -9
  51. package/src/App/hooks/useLayoutMeasurements.js +64 -72
  52. package/src/App/layout/Layout.jsx +1 -1
  53. package/src/App/layout/layout.module.scss +1 -8
  54. package/src/App/renderer/HtmlElementHost.jsx +10 -5
  55. package/src/App/renderer/mapPanels.js +2 -1
  56. package/src/App/store/appActionsMap.js +4 -4
  57. package/src/App/store/appActionsMap.test.js +10 -0
  58. package/src/InteractiveMap/InteractiveMap.js +59 -11
  59. package/src/InteractiveMap/InteractiveMap.test.js +126 -4
  60. package/src/InteractiveMap/domStateManager.js +18 -6
  61. package/src/InteractiveMap/domStateManager.test.js +21 -0
  62. package/src/InteractiveMap/historyManager.js +28 -16
  63. package/src/InteractiveMap/historyManager.test.js +17 -0
  64. package/src/config/appConfig.js +2 -1
  65. package/src/config/appConfig.test.js +3 -13
  66. package/src/config/defaults.js +2 -1
  67. package/src/config/events.js +20 -21
  68. package/src/services/closeApp.js +1 -10
  69. package/src/services/closeApp.test.js +3 -43
  70. package/src/types.js +6 -1
  71. package/src/utils/mapStateSync.js +48 -10
  72. package/src/utils/mapStateSync.test.js +29 -9
  73. package/docs/examples.mdx +0 -70
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import r from"@babel/runtime/helpers/asyncToGenerator";import{createRoot as n}from"preact/compat/client";import{g as o,E as i,s as a,r as l,t as s,a as c}from"./im-shell.js";import d,{useContext as u,createContext as p,useEffect as f,useRef as v,useReducer as m,useCallback as b,useMemo as g,useLayoutEffect as h,useState as y,createPortal as O,cloneElement as P}from"preact/compat";import{jsx as E,jsxs as w,Fragment as _}from"preact/jsx-runtime";var R=p(null);function j(){return u(R)}var S=[{id:"showKeyboardHelp",group:"General",title:"Show keyboard help",command:"<kbd>Alt</kbd> + <kbd>K</kbd>",enabled:!0},{id:"selectControl",group:"General",title:"Select a map control",command:"<kbd>Tab</kbd> or <kbd>Shift</kbd> + <kbd>Tab</kbd>",enabled:!0},{id:"moveLarge",group:"Navigation",title:"Move in large steps",command:"<kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!0},{id:"nudgeMap",group:"Navigation",title:"Nudge map",command:"<kbd>Shift</kbd> + <kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!1},{id:"zoomLarge",group:"Navigation",title:"Zoom in large steps",command:"<kbd>+</kbd> or <kbd>-</kbd>",enabled:!0},{id:"nudgeZoom",group:"Navigation",title:"Nudge zoom",command:"<kbd>Shift</kbd> + <kbd>+</kbd> or <kbd>-</kbd>",enabled:!1},{id:"highlightLabelAtCenter",group:"Labels",title:"Highlight label at centre",command:"<kbd>Alt</kbd> + <kbd>Enter</kbd>",enabled:!1,requiredConfig:["readMapText"]},{id:"highlightNextLabel",group:"Labels",title:"Highlight nearby label",command:"<kbd>Alt</kbd> + <kbd>→</kbd>, <kbd>←</kbd>, <kbd>↑</kbd> or <kbd>↓</kbd>",enabled:!1,requiredConfig:["readMapText"]}],T=[],C=new Set,A=new Set,D=()=>{var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[...S.filter(t=>!!A.has(t.id)&&(!t.requiredConfig||t.requiredConfig.every(t=>e[t]))),...T]}(j()).reduce((e,t)=>(e[t.group]=e[t.group]||[],e[t.group].push(t),e),{});return E("div",{className:"im-c-keyboard-help",children:Object.entries(e).map(e=>{var[t,r]=e;return E("div",{className:"im-c-keyboard-help__group",children:E("dl",{className:"im-c-keyboard-help__list",children:r.map(e=>w("div",{className:"im-c-keyboard-help__item",children:[E("dt",{className:"im-c-keyboard-help__title",children:e.title}),E("dd",{className:"im-c-keyboard-help__description",dangerouslySetInnerHTML:{__html:e.command}})]},e.id))})},t)})})};function M(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 k(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?M(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var I={slot:"middle",open:!1,dismissible:!0,modal:!0},L={slot:"right-top",showLabel:!1},N={slot:"top-left",showLabel:!1},B={buttons:[{id:"exit",label:"Exit",iconId:"close",onClick:(e,t)=>{var{services:r}=t;return r.closeApp()},excludeWhen:e=>{var{appConfig:t,appState:r}=e;return!t.hasExitButton||!(r.isFullscreen&&new URL(window.location.href).searchParams.has(t.mapViewParamKey))},mobile:N,tablet:N,desktop:N},{id:"fullscreen",label:()=>"".concat(document.fullscreenElement?"Exit":"Enter"," fullscreen"),iconId:()=>document.fullscreenElement?"minimise":"maximise",onClick:(e,t)=>{var{appState:r}=t,n=r.layoutRefs.appContainerRef.current;document.fullscreenElement?document.exitFullscreen():n.requestFullscreen()},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableFullscreen||t.isFullscreen},mobile:L,tablet:L,desktop:L},{id:"zoomIn",group:{name:"zoom",label:"Zoom controls",order:0},label:"Zoom in",iconId:"plus",onClick:(e,t)=>{var{mapProvider:r,appConfig:n}=t;return r.zoomIn(n.zoomDelta)},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableZoomControls||"touch"===t.interfaceType},enableWhen:e=>{var{mapState:t}=e;return!t.isAtMaxZoom},mobile:L,tablet:L,desktop:L},{id:"zoomOut",group:{name:"zoom",label:"Zoom controls",order:0},label:"Zoom out",iconId:"minus",onClick:(e,t)=>{var{mapProvider:r,appConfig:n}=t;return r.zoomOut(n.zoomDelta)},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableZoomControls||"touch"===t.interfaceType},enableWhen:e=>{var{mapState:t}=e;return!t.isAtMinZoom},mobile:L,tablet:L,desktop:L}],panels:[{id:"keyboardHelp",label:"Keyboard shortcuts",mobile:k({},I),tablet:k(k({},I),{},{width:"500px"}),desktop:k(k({},I),{},{width:"500px"}),render:()=>E(D,{})}],icons:[{id:"maximise",svgContent:'<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>'},{id:"minimise",svgContent:'<path d="m14 10 7-7"/><path d="M20 10h-6V4"/><path d="m3 21 7-7"/><path d="M4 14h6v6"/>'},{id:"plus",svgContent:'<path d="M5 12h14"/><path d="M12 5v14"/>'},{id:"minus",svgContent:'<path d="M5 12h14"/>'},{id:"chevron",svgContent:'<path d="m6 9 6 6 6-6"/>'}]},x={slot:"right-top",showLabel:!0},H={label:"Button",mobile:x,tablet:x,desktop:x},z={label:"Panel",mobile:{slot:"drawer",open:!0,dismissible:!0,modal:!1,showLabel:!0},tablet:{slot:"left-top",open:!0,dismissible:!0,modal:!1,showLabel:!0},desktop:{slot:"left-top",open:!0,dismissible:!0,modal:!1,showLabel:!0},render:null,html:null},V={label:"Control",mobile:{slot:"drawer"},tablet:{slot:"top-left"},desktop:{slot:"top-left"}},W={small:1,medium:1.5,large:2};function F(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}var G=(t,r)=>{var n=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?F(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t);for(var o in r)"object"!=typeof r[o]||Array.isArray(r[o])||null===r[o]?n[o]=r[o]:n[o]=G(t[o]||{},r[o]);return n};function U(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 Z(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?U(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var K=(e,t)=>Z(Z({},e),t),q=(e,t,r)=>{var n=G(H,r);return Z(Z({},e),{},{[t]:n})};function Y(){var e={};return{registerButton:t=>{e=K(e,t)},addButton:(t,r)=>(e=q(e,t,r),t),getButtonConfig:t=>((e,t)=>t?Object.fromEntries(Object.entries(e).filter(e=>{var[r,n]=e;return n.pluginId===t})):e)(e,t),clear:()=>{e={}}}}function X(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function $(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 J(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?$(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Q=(e,t)=>J(J({},e),t),ee=(e,t,r)=>{var n=G(z,r);return J(J({},e),{},{[t]:J(J({},n),{},{html:n.html,render:n.render})})},te=(e,r)=>{var{[r]:n}=e;return t(e,[r].map(X))};function re(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 ne(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?re(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var oe=(e,t)=>ne(ne({},e),t),ie=(e,t,r)=>{var n=G(V,r);return ne(ne({},e),{},{[t]:ne({id:t},n)})};function ae(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 le(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ae(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var se={close:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'},ce=()=>se,de=Object.freeze({SIDE:"side",BANNER:"banner",TOP_LEFT:"top-left",TOP_MIDDLE:"top-middle",TOP_RIGHT:"top-right",LEFT_TOP:"left-top",LEFT_BOTTOM:"left-bottom",MIDDLE:"middle",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",DRAWER:"drawer",ACTIONS:"actions",MODAL:"modal"}),ue=Object.freeze({control:[de.BANNER,de.TOP_LEFT,de.TOP_RIGHT,de.MIDDLE,de.RIGHT_BOTTOM,de.BOTTOM_RIGHT,de.DRAWER,de.ACTIONS],panel:[de.SIDE,de.BANNER,de.LEFT_TOP,de.LEFT_BOTTOM,de.MIDDLE,de.RIGHT_TOP,de.RIGHT_BOTTOM,de.DRAWER,de.MODAL],button:[de.TOP_LEFT,de.TOP_MIDDLE,de.TOP_RIGHT,de.LEFT_TOP,de.LEFT_BOTTOM,de.RIGHT_TOP,de.RIGHT_BOTTOM,de.BOTTOM_LEFT,de.BOTTOM_RIGHT,de.ACTIONS]}),pe="[interactive-map]",fe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.warn(pe,...t)};function ve(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 me(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ve(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var be=e=>Array.isArray(e)?e:[e],ge=["mobile","tablet","desktop"];function he(e,t){var r=ue[t];ge.forEach(n=>{var o,i=null===(o=e[n])||void 0===o?void 0:o.slot;!i||r.includes(i)||"panel"===t&&i.endsWith("-button")||fe("".concat(t,' "').concat(e.id,'" has invalid slot "').concat(i,'" at breakpoint "').concat(n,'". Allowed slots: ').concat(r.join(", "),"."))})}function ye(e){var{registerButton:t,registerPanel:r,registerControl:n}=e,o=[];return{registeredPlugins:o,registerPlugin:function(e){var i,a,{manifest:l}=e,s={pluginId:e.id,includeModes:null===(i=e.config)||void 0===i?void 0:i.includeModes,excludeModes:null===(a=e.config)||void 0===a?void 0:a.excludeModes};l.buttons&&be(l.buttons).forEach(e=>{var r;he(e,"button"),t({[e.id]:me(me({},s),e)}),null==e||null===(r=e.menuItems)||void 0===r||r.forEach(e=>{t({[e.id]:me(me(me({},s),e),{},{isMenuItem:!0})})})}),l.panels&&be(l.panels).forEach(e=>{he(e,"panel"),r({[e.id]:me(me({},s),e)})}),l.controls&&be(l.controls).forEach(e=>{he(e,"control"),n({[e.id]:me(me({},s),e)})}),l.icons&&be(l.icons).forEach(e=>(e=>{se=le(le({},se),e)})({[e.id]:e.svgContent})),l.keyboardShortcuts&&be(l.keyboardShortcuts).forEach(e=>(e=>{var{shortcut:t}=e;C.has(t.id)||(C.add(t.id),T.push(t))})(me(me({},s),{},{shortcut:e}))),o.push(e)},clear:function(){o.length=0}}}function Oe(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 Pe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Oe(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]);var r=new Map(e.map(e=>[e.id,e]));return t.forEach(e=>{null!=e&&e.id&&(r.has(e.id)?r.set(e.id,Pe(Pe({},r.get(e.id)),e)):r.set(e.id,e))}),Array.from(r.values())},n=Pe(Pe({},e),t);return(e.buttons||t.buttons)&&(n.buttons=r(e.buttons,t.buttons)),(e.panels||t.panels)&&(n.panels=r(e.panels,t.panels)),(e.controls||t.controls)&&(n.controls=r(e.controls,t.controls)),(e.icons||t.icons)&&(n.icons=r(e.icons,t.icons)),n}function we(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return Object.keys(e).forEach(o=>{var i,a=e[o][t];null!==(i=null==a?void 0:a.open)&&void 0!==i&&i&&(n[o]=r[o]||{props:{}})}),n}function _e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function Re(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 je(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Se(e,t,r,n){var o,i=e.panelConfig||e.panelRegistry.getPanelConfig(),a=null===(o=i[t])||void 0===o?void 0:o[r],l=!!a.exclusive&&!a.modal,s=!!a.modal,c=Object.fromEntries(Object.entries(e.openPanels).filter(e=>{var t,[n]=e;return!(null!==(t=i[n])&&void 0!==t&&null!==(t=t[r])&&void 0!==t&&t.exclusive)}));return je(je(je({},l?{}:c),s?e.openPanels:{}),{},{[t]:{props:n}})}var Te={SET_BREAKPOINT:(e,t)=>{var r,{behaviour:n,hybridWidth:i,maxMobileWidth:a}=t,l=Object.keys(e.openPanels),s=l[l.length-1],c="hybrid"===n?e.isFullscreen:o({behaviour:n,hybridWidth:i,maxMobileWidth:a}),d=s?Se(e,s,t.breakpoint,(null===(r=e.openPanels[s])||void 0===r?void 0:r.props)||{}):{},u=e.panelConfig||e.panelRegistry.getPanelConfig(),p=Object.fromEntries(Object.entries(u).filter(e=>{var[r,n]=e,o=n[t.breakpoint];return!0===(null==o?void 0:o.open)&&!1===(null==o?void 0:o.dismissible)&&!d[r]}).map(t=>{var[r]=t;return[r,e.openPanels[r]||{props:{}}]}));return je(je({},e),{},{breakpoint:t.breakpoint,isFullscreen:c,previousOpenPanels:e.openPanels,openPanels:je(je({},d),p)})},SET_MEDIA:(e,t)=>je(je({},e),t),SET_HYBRID_FULLSCREEN:(e,t)=>je(je({},e),{},{isFullscreen:t}),SET_INTERFACE_TYPE:(e,t)=>e.interfaceType===t?e:je(je({},e),{},{interfaceType:t}),SET_MODE:(e,t)=>{var r=e.panelConfig||e.panelRegistry.getPanelConfig();return je(je({},e),{},{mode:t,previousMode:e.mode,openPanels:we(r,e.breakpoint,e.openPanels)})},PLUGINS_EVALUATED:e=>e.arePluginsEvaluated?e:je(je({},e),{},{arePluginsEvaluated:!0}),CLEAR_PLUGINS_EVALUATED:e=>e.arePluginsEvaluated?je(je({},e),{},{arePluginsEvaluated:!1}):e,SET_SAFE_ZONE_INSET:(e,t)=>{var{safeZoneInset:r,syncMapPadding:n=!0}=t;return((e,t)=>{if(e===t)return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t)return!1;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>Object.is(e[r],t[r]))})(e.safeZoneInset,r)?e:je(je({},e),{},{safeZoneInset:r,syncMapPadding:n,isLayoutReady:!0})},REVERT_MODE:e=>{var t=e.panelConfig||e.panelRegistry.getPanelConfig();return je(je({},e),{},{mode:e.previousMode,previousMode:e.mode,openPanels:we(t,e.breakpoint,e.openPanels)})},OPEN_PANEL:(e,t)=>{var{panelId:r,props:n={}}=t;return je(je({},e),{},{previousOpenPanels:e.openPanels,openPanels:Se(e,r,e.breakpoint,n)})},CLOSE_PANEL:(e,r)=>{var n=e.openPanels,{[r]:o}=n,i=t(n,[r].map(_e));return je(je({},e),{},{previousOpenPanels:e.openPanels,openPanels:i})},CLOSE_ALL_PANELS:e=>je(je({},e),{},{previousOpenPanels:e.openPanels,openPanels:{}}),RESTORE_PREVIOUS_PANELS:e=>je(je({},e),{},{openPanels:e.previousOpenPanels||{},previousOpenPanels:e.openPanels}),TOGGLE_APP_VISIBLE:(e,t)=>je(je({},e),{},{appVisible:t}),TOGGLE_HAS_EXCLUSIVE_CONTROL:(e,t)=>je(je({},e),{},{hasExclusiveControl:t}),TOGGLE_BUTTON_DISABLED:(e,t)=>{var{id:r,isDisabled:n}=t,o=new Set(e.disabledButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{disabledButtons:o})},TOGGLE_BUTTON_HIDDEN:(e,t)=>{var{id:r,isHidden:n}=t,o=new Set(e.hiddenButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{hiddenButtons:o})},TOGGLE_BUTTON_PRESSED:(e,t)=>{var{id:r,isPressed:n}=t,o=new Set(e.pressedButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{pressedButtons:o})},TOGGLE_BUTTON_EXPANDED:(e,t)=>{var{id:r,isExpanded:n}=t,o=new Set(e.expandedButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{expandedButtons:o})},REGISTER_BUTTON:(e,t)=>je(je({},e),{},{buttonConfig:K(e.buttonConfig,t)}),ADD_BUTTON:(e,t)=>{var r,{id:n,config:o}=t,i=q(e.buttonConfig,n,o),a=new Set(e.hiddenButtons);o.isHidden&&a.add(n);var l=new Set(e.disabledButtons);o.isDisabled&&l.add(n);var s=new Set(e.pressedButtons);o.isPressed&&s.add(n);var c=new Set(e.expandedButtons);return o.isExpanded&&c.add(n),null!==(r=e.buttonRegistry)&&void 0!==r&&r.addButton&&e.buttonRegistry.addButton(n,o),je(je({},e),{},{buttonConfig:i,hiddenButtons:a,disabledButtons:l,pressedButtons:s,expandedButtons:c})},REGISTER_PANEL:(e,t)=>je(je({},e),{},{panelConfig:Q(e.panelConfig,t)}),ADD_PANEL:(e,t)=>{var r,{id:n,config:o}=t,i=ee(e.panelConfig,n,o),a=i[n];null!==(r=e.panelRegistry)&&void 0!==r&&r.addPanel&&e.panelRegistry.addPanel(n,o);var l=null==a?void 0:a[e.breakpoint],s=null==l?void 0:l.open;return je(je({},e),{},{panelConfig:i,openPanels:s?Se(je(je({},e),{},{panelConfig:i}),n,e.breakpoint,{}):e.openPanels})},REMOVE_PANEL:(e,r)=>{var n,o=r,i=e.openPanels,{[o]:a}=i,l=t(i,[o].map(_e));return null!==(n=e.panelRegistry)&&void 0!==n&&n.removePanel&&e.panelRegistry.removePanel(o),je(je({},e),{},{panelConfig:te(e.panelConfig,o),openPanels:l})},REGISTER_CONTROL:(e,t)=>je(je({},e),{},{controlConfig:oe(e.controlConfig,t)}),ADD_CONTROL:(e,t)=>{var r,{id:n,config:o}=t,i=ie(e.controlConfig,n,o);return null!==(r=e.controlRegistry)&&void 0!==r&&r.addControl&&e.controlRegistry.addControl(n,o),je(je({},e),{},{controlConfig:i})}};function Ce(){return{preferredColorScheme:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",prefersReducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches}}var Ae=(e,t)=>{var{type:r,payload:n}=t,o=Te[r];return o?o(e,n):e},De=["mobile","tablet","desktop"];function Me(e,t,r,n){var{type:o,payload:a}=e;if("CLOSE_PANEL"===o&&queueMicrotask(()=>{n.emit(i.APP_PANEL_CLOSED,{panelId:a})}),"CLOSE_ALL_PANELS"===o&&queueMicrotask(()=>{Object.keys(t.openPanels).forEach(e=>{n.emit(i.APP_PANEL_CLOSED,{panelId:e})})}),"OPEN_PANEL"===o){var{panelId:l,props:s}=a,c=function(e,t,r,n){var o,i=null===(o=n[e])||void 0===o?void 0:o[r],a=!(null==i||!i.exclusive||null!=i&&i.modal),l=!(null==i||!i.modal),s=[];if(l)return s;var c=Object.keys(t);return a?c.forEach(e=>{var t,o=null===(t=n[e])||void 0===t?void 0:t[r];null!=o&&o.exclusive||s.push(e)}):c.forEach(e=>{var t,o=null===(t=n[e])||void 0===t?void 0:t[r];null==o||!o.exclusive||null!=o&&o.modal||s.push(e)}),s}(l,t.openPanels,t.breakpoint,r);queueMicrotask(()=>{c.forEach(e=>{n.emit(i.APP_PANEL_CLOSED,{panelId:e})}),n.emit(i.APP_PANEL_OPENED,{panelId:l,props:s})})}if("ADD_BUTTON"===o){var{id:d,config:u}=a,p=G(H,u);De.forEach(e=>{var t,r=null===(t=p[e])||void 0===t?void 0:t.slot;r&&!ue.button.includes(r)&&fe('button "'.concat(d,'" has invalid slot "').concat(r,'" at breakpoint "').concat(e,'". Allowed slots: ').concat(ue.button.join(", "),"."))})}if("ADD_CONTROL"===o){var{id:f,config:v}=a,m=G(V,v);De.forEach(e=>{var t,r=null===(t=m[e])||void 0===t?void 0:t.slot;r&&!ue.control.includes(r)&&fe('control "'.concat(f,'" has invalid slot "').concat(r,'" at breakpoint "').concat(e,'". Allowed slots: ').concat(ue.control.join(", "),"."))})}if("ADD_PANEL"===o){var{id:b,config:g}=a,h=G(z,g);De.forEach(e=>{var t,r=null===(t=h[e])||void 0===t?void 0:t.slot;!r||ue.panel.includes(r)||r.endsWith("-button")||fe('panel "'.concat(b,'" has invalid slot "').concat(r,'" at breakpoint "').concat(e,'". Allowed slots: ').concat(ue.panel.join(", "),"."))});var y=h[t.breakpoint];null!=y&&y.open&&queueMicrotask(()=>{var e=y.slot,{visibleGeometry:t}=h,r={panelId:b,slot:e};t&&(r.visibleGeometry=t),n.emit(i.APP_PANEL_OPENED,r)})}}function ke(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 Ie(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ke(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Le=p(null),Ne=e=>{var{options:t,children:r}=e,{pluginRegistry:n,buttonRegistry:l,panelRegistry:s,controlRegistry:c,eventBus:d,breakpointDetector:u}=t,p={appContainerRef:v(null),sideRef:v(null),mainRef:v(null),topRef:v(null),topLeftColRef:v(null),topRightColRef:v(null),leftRef:v(null),leftTopRef:v(null),leftBottomRef:v(null),middleRef:v(null),rightRef:v(null),rightTopRef:v(null),rightBottomRef:v(null),drawerRef:v(null),bottomRef:v(null),bottomRightRef:v(null),attributionsRef:v(null),actionsRef:v(null),bannerRef:v(null),modalRef:v(null),viewportRef:v(null)},h=v({}),[y,O]=m(Ae,(e=>{var{initialBreakpoint:t,initialInterfaceType:r,appColorScheme:n,autoColorScheme:i,pluginRegistry:a,buttonRegistry:l,panelRegistry:s,controlRegistry:c,mode:d}=e,{preferredColorScheme:u,prefersReducedMotion:p}=Ce(),f=o(e),v=we(s.getPanelConfig(),t);return{appVisible:null,isLayoutReady:!1,arePluginsEvaluated:!1,breakpoint:t,interfaceType:r,preferredColorScheme:i?u:n,prefersReducedMotion:p,isFullscreen:f,mode:d||null,previousMode:null,safeZoneInset:null,disabledButtons:new Set,hiddenButtons:new Set,pressedButtons:new Set,expandedButtons:new Set,hasExclusiveControl:!1,openPanels:v,previousOpenPanels:{},syncMapPadding:!0,pluginRegistry:a,buttonRegistry:l,panelRegistry:s,controlRegistry:c,buttonConfig:l.getButtonConfig(),panelConfig:s.getPanelConfig(),controlConfig:c.getControlConfig()}})(t)),P=b(e=>{var r=y.panelConfig||t.panelRegistry.getPanelConfig(),n=y;O(e),Me(e,n,r,d)},[y,t,d]);!function(e,t){var{appColorScheme:r,autoColorScheme:n,behaviour:o,hybridWidth:i,maxMobileWidth:a}=t;f(()=>{var t=[window.matchMedia("(prefers-color-scheme: dark)"),window.matchMedia("(prefers-reduced-motion: reduce)")];function l(){var{preferredColorScheme:t,prefersReducedMotion:o}=Ce();e({type:"SET_MEDIA",payload:{preferredColorScheme:n?t:r,prefersReducedMotion:o}})}t.forEach(e=>e.addEventListener("change",l));var s=null,c=null;if("hybrid"===o){var d=null!=i?i:a;s=window.matchMedia("(max-width: ".concat(d,"px)")),c=t=>{e({type:"SET_HYBRID_FULLSCREEN",payload:t.matches})},s.addEventListener("change",c)}return()=>{t.forEach(e=>e.removeEventListener("change",l)),s&&c&&s.removeEventListener("change",c)}},[e,o,i,a])}(O,t);var w=e=>{P({type:"SET_MODE",payload:e})},_=()=>{P({type:"REVERT_MODE"})};f(()=>{d.on(i.APP_SET_MODE,w),d.on(i.APP_REVERT_MODE,_);var e=u.subscribe(e=>{P({type:"SET_BREAKPOINT",payload:{behaviour:t.behaviour,breakpoint:e,hybridWidth:t.hybridWidth,maxMobileWidth:t.maxMobileWidth}})}),r=a(e=>{P({type:"SET_INTERFACE_TYPE",payload:e})});return()=>{d.off(i.APP_SET_MODE,w),d.off(i.APP_REVERT_MODE,_),e(),r()}},[]);var j=g(()=>Ie(Ie({},y),{},{dispatch:P,layoutRefs:p,buttonRefs:h,pluginRegistry:n,buttonRegistry:l,panelRegistry:s,controlRegistry:c}),[y,P]);return E(R.Provider,{value:t,children:E(Le.Provider,{value:j,children:r})})};function Be(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 xe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Be(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var He=(e,t)=>xe(xe({},e),t),ze={SET_MAP_READY:e=>xe(xe({},e),{},{isMapReady:!0}),MAP_MOVE:He,MAP_MOVE_END:He,MAP_FIRST_IDLE:He,SET_MAP_STYLE:(e,t)=>xe(xe({},e),{},{mapStyle:t}),SET_MAP_SIZE:(e,t)=>xe(xe({},e),{},{mapSize:t}),UPDATE_CROSS_HAIR:(e,t)=>xe(xe({},e),{},{crossHair:xe(xe({},e.crossHair),t)}),UPSERT_LOCATION_MARKER:(e,t)=>{var r=new Map(e.markers.items.map(e=>[e.id,e]));r.set(t.id,t);var n=Array.from(r.values());return xe(xe({},e),{},{markers:xe(xe({},e.markers),{},{items:n})})},REMOVE_LOCATION_MARKER:(e,t)=>{var r=e.markers.items.filter(e=>e.id!==t);return xe(xe({},e),{},{markers:xe(xe({},e.markers),{},{items:r})})}},Ve=(e,t)=>{var{type:r,payload:n}=t,o=ze[r];return o?o(e,n):e};function We(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 Fe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?We(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Ge=p(null),Ue=e=>{var{options:t,children:r}=e,[n,o]=m(Ve,(e=>{var{center:t,zoom:r,bounds:n,extent:o,mapStyle:i,mapSize:a,markers:l}=e,{registeredPlugins:s}=e.pluginRegistry;return{isMapReady:!1,mapProvider:null,mapStyle:null!=s&&s.find(e=>{var t;return null===(t=e.config)||void 0===t?void 0:t.handlesMapStyle})?null:i,mapSize:a,center:t,zoom:r,bounds:n||o,resolution:null,isAtMaxZoom:null,isAtMinZoom:null,crossHair:{isVisible:!1,isPinnedToMap:!1,state:"active"},markers:{items:l||[]}}})(t)),{eventBus:a}=t,l=v(!1),s=()=>{o({type:"SET_MAP_READY"})},c=e=>{var r=localStorage.getItem("".concat(t.id,":mapStyleId")),n=e.find(e=>e.id===r)||e[0],i=localStorage.getItem("".concat(t.id,":mapSize"))||t.mapSize;o({type:"SET_MAP_STYLE",payload:n}),o({type:"SET_MAP_SIZE",payload:i})},d=e=>{o({type:"SET_MAP_STYLE",payload:e})},u=e=>{o({type:"SET_MAP_SIZE",payload:e})};f(()=>(a.on(i.MAP_READY,s),a.on(i.MAP_INIT_MAP_STYLES,c),a.on(i.MAP_SET_STYLE,d),a.on(i.MAP_SET_SIZE,u),()=>{a.off(i.MAP_READY,s),a.off(i.MAP_INIT_MAP_STYLES,c),a.off(i.MAP_SET_STYLE,d),a.off(i.MAP_SET_SIZE,u)}),[]),f(()=>{n.mapSize&&(l.current?a.emit(i.MAP_SIZE_CHANGE,{mapSize:n.mapSize}):l.current=!0)},[n.mapSize]),f(()=>{n.mapStyle&&n.mapSize&&(localStorage.setItem("".concat(t.id,":mapStyleId"),n.mapStyle.id),localStorage.setItem("".concat(t.id,":mapSize"),n.mapSize))},[n.mapStyle,n.mapSize]);var p=g(()=>Fe(Fe({},n),{},{dispatch:o}),[n]);return E(Ge.Provider,{value:p,children:r})};function Ze(e){var t,r,n,o,i=!1,a=t=>{null!=e&&e.current&&t&&(e.current.textContent="",setTimeout(()=>{e.current&&(e.current.textContent=t)},100))},l=(t=a,r=500,n=null,o=function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];clearTimeout(n),n=setTimeout(()=>{t(...o)},r)},o.cancel=()=>{n&&(clearTimeout(n),n=null)},o);return function(e){if(e)return"plugin"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core")?(i=!0,void a(e)):void(i?i=!1:l(e))}}var Ke=(e,t)=>{if(!e)return null;if("string"==typeof e)return e.trim();if("object"==typeof e){if(t&&e[t])return e[t];var r=Object.values(e)[0];return null!=r?r:null}return null},qe={symbol:"pin",backgroundColor:"#ca3535",foregroundColor:"#ffffff",haloWidth:"1",selectedWidth:"6"},Ye={dot:"M8 3c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.241 5-5-2.24-5-5-5z",cross:"M6 3H10V6H13V10H10V13H6V10H3V6H6Z",diamond:"M8 2L14 8L8 14L2 8Z",triangle:"M8 2L14 14H2Z",square:"M3 3H13V13H3Z"},Xe={id:"pin",viewBox:"0 0 38 38",anchor:[.5,.9],graphic:Ye.dot,svg:'<path d="M19 33.499c-5.318-5-12-9.509-12-16.998 0-6.583 5.417-12 12-12s12 5.417 12 12c0 7.489-6.682 11.998-12 16.998z" fill="none" stroke="{{selectedColor}}" stroke-width="{{selectedWidth}}"/>\n <path d="M19 33.499c-5.318-5-12-9.509-12-16.998 0-6.583 5.417-12 12-12s12 5.417 12 12c0 7.489-6.682 11.998-12 16.998z" fill="{{backgroundColor}}" stroke="{{haloColor}}" stroke-width="{{haloWidth}}"/>\n <g transform="translate(19, 16) scale(0.8) translate(-8, -8)"><path d="{{graphic}}" fill="{{foregroundColor}}"/></g>'},$e={id:"circle",viewBox:"0 0 38 38",anchor:[.5,.5],graphic:Ye.dot,svg:'<path d="M19 7C12.376 7 7 12.376 7 19s5.376 12 12 12a12.01 12.01 0 0 0 12-12A12.01 12.01 0 0 0 19 7z" fill="none" stroke="{{selectedColor}}" stroke-width="{{selectedWidth}}"/>\n <path d="M19 7C12.376 7 7 12.376 7 19s5.376 12 12 12a12.01 12.01 0 0 0 12-12A12.01 12.01 0 0 0 19 7z" fill="{{backgroundColor}}" stroke="{{haloColor}}" stroke-width="{{haloWidth}}"/>\n <g transform="translate(19, 19) scale(0.8) translate(-8, -8)"><path d="{{graphic}}" fill="{{foregroundColor}}"/></g>'},Je={id:"square",viewBox:"0 0 38 38",anchor:[.5,.5],graphic:Ye.dot,svg:'<path d="M28 7a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H10a3 3 0 0 1-3-3V10a3 3 0 0 1 3-3h18z" fill="none" stroke="{{selectedColor}}" stroke-width="{{selectedWidth}}"/>\n <path d="M28 7a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H10a3 3 0 0 1-3-3V10a3 3 0 0 1 3-3h18z" fill="{{backgroundColor}}" stroke="{{haloColor}}" stroke-width="{{haloWidth}}"/>\n <g transform="translate(19, 19) scale(0.8) translate(-8, -8)"><path d="{{graphic}}" fill="{{foregroundColor}}"/></g>'},Qe={light:{haloColor:"#ffffff",selectedColor:"#0b0c0c",foregroundColor:"#0b0c0c"},dark:{haloColor:"#0b0c0c",selectedColor:"#ffffff",foregroundColor:"#ffffff"}},et=e=>{var{haloColor:t,selectedColor:r,foregroundColor:n}=(e=>{var t,r,n,o,i=null!==(t=Qe[null==e?void 0:e.mapColorScheme])&&void 0!==t?t:Qe.light;return{haloColor:null!==(r=null==e?void 0:e.haloColor)&&void 0!==r?r:i.haloColor,selectedColor:null!==(n=null==e?void 0:e.selectedColor)&&void 0!==n?n:i.selectedColor,foregroundColor:null!==(o=null==e?void 0:e.foregroundColor)&&void 0!==o?o:i.foregroundColor}})(e);return{"--map-overlay-halo-color":t,"--map-overlay-selected-color":r,"--map-overlay-foreground-color":n}};function tt(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 rt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?tt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var nt=new Map,ot={},it=new Set(["id","svg","viewBox","anchor","symbol","symbolSvgContent"]),at=new Set([...it,"selectedWidth"]);function lt(e,t,r){var n,o,i,a=null==r?void 0:r.id,l=Object.fromEntries(Object.entries(e||{}).filter(e=>{var[t]=e;return!at.has(t)})),s=Object.fromEntries(Object.entries(ot).filter(e=>{var[t]=e;return!it.has(t)})),c=Object.fromEntries(Object.entries(t).filter(e=>{var[,t]=e;return null!=t})),d=rt(rt(rt(rt({},qe),s),l),c),u=null!==(n=Qe[null==r?void 0:r.mapColorScheme])&&void 0!==n?n:Qe.light;return d.haloColor=null!==(o=null==r?void 0:r.haloColor)&&void 0!==o?o:u.haloColor,d.selectedColor=null!==(i=null==r?void 0:r.selectedColor)&&void 0!==i?i:u.selectedColor,"string"==typeof d.graphic&&Ye[d.graphic]&&(d.graphic=Ye[d.graphic]),Object.fromEntries(Object.entries(d).map(e=>{var[t,r]=e;return[t,Ke(r,a)||""]}))}function st(e,t){return Object.entries(t).reduce((e,t)=>{var[r,n]=t;return e.replaceAll("{{".concat(r,"}}"),n)},e)}var ct={setDefaults(e){ot=e||{}},getDefaults:()=>rt(rt({},qe),ot),register(e){nt.set(e.id,e)},get:e=>nt.get(e),list:()=>[...nt.values()],resolve(e,t,r){var n=lt(e,t||{},r);return e?(n.selectedColor="",st(e.svg,n)):""},resolveSelected(e,t,r){var n=lt(e,t||{},r);return e?st(e.svg,n):""}};ct.register(Xe),ct.register($e),ct.register(Je);var dt=new Map,ut={register(e,t){dt.set(e,{id:e,svgContent:t})},get:e=>dt.get(e),list:()=>[...dt.values()]};Object.entries({"cross-hatch":'<path d="M0 4.486V3.485h3.5V.001h1v3.484h7.002V.001h1v3.484h3.5v1.001h-3.5v7h3.5v.999h-3.5v3.516h-1v-3.516H4.499v3.516h-1v-3.516H0v-.999h3.5v-7H0zm11.501 0H4.499v7h7.002v-7z" fill="{{foregroundColor}}"/>',"diagonal-cross-hatch":'<path d="M0 8.707V7.293L7.293 0h1.414L16 7.293v1.414L8.707 16H7.293L0 8.707zM.707 8L8 15.293 15.293 8 8 .707.707 8z" fill="{{foregroundColor}}"/>',"forward-diagonal-hatch":'<path d="M16 8.707V7.293L7.293 16h1.414L16 8.707zm-16 0L8.707 0H7.293L0 7.293v1.414z" fill="{{foregroundColor}}"/>',"backward-diagonal-hatch":'<path d="M0 8.707V7.293L8.707 16H7.293L0 8.707zm16 0L7.293 0h1.414L16 7.293v1.414z" fill="{{foregroundColor}}"/>',"horizontal-hatch":'<path d="M0 4.5V3.499h15.999V4.5H0zm0 7h15.999V12.5H0v-1.001z" fill="{{foregroundColor}}"/>',"vertical-hatch":'<path d="M3.501 16.001V0h1v16.001h-1zm7.998 0V0h1v16.001h-1z" fill="{{foregroundColor}}"/>',dot:'<path d="M3.999 2A2 2 0 0 1 6 3.999C6 5.103 5.103 6 3.999 6a2 2 0 0 1-1.999-2.001A2 2 0 0 1 3.999 2zm0 7.999C5.103 10 6 10.897 6 12.001A2 2 0 0 1 3.999 14a2 2 0 0 1-1.999-1.999A2 2 0 0 1 3.999 10zM11.999 2A2 2 0 0 1 14 3.999C14 5.103 13.103 6 11.999 6S10 5.103 10 3.999A2 2 0 0 1 11.999 2zm0 7.999c1.104 0 2.001.897 2.001 2.001A2 2 0 0 1 11.999 14 2 2 0 0 1 10 12.001c0-1.104.897-2.001 1.999-2.001z" fill="{{foregroundColor}}"/>',diamond:'<path d="M4 .465L7.535 4 4 7.535.465 4 4 .465zm0 7.999l3.535 3.535L4 15.535.465 11.999 4 8.464zm8-8l3.535 3.535-3.536 3.536L8.464 4 12 .464zm0 8.001L15.536 12 12 15.536 8.465 12 12 8.465z" fill="{{foregroundColor}}"/>'}).forEach(e=>{var[t,r]=e;ut.register(t,r)});var pt=p(null),ft=e=>{var{eventBus:t,children:r}=e,{id:n,handleExitClick:o,symbolDefaults:a}=j(),s=v(null),c=g(()=>Ze(s),[]);ct.setDefaults(a||{});var d=g(()=>({announce:c,reverseGeocode:(e,t)=>l(e,t),eventBus:t,mapStatusRef:s,closeApp:()=>function(e,t,r){var n;r.emit(i.MAP_EXIT,{mapId:e}),null!==(n=history.state)&&void 0!==n&&n.isBack?history.back():t()}(n,o,t),symbolRegistry:ct,patternRegistry:ut}),[c]);return E(pt.Provider,{value:d,children:r})};function vt(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 mt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?vt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var bt=p(null);var gt=e=>{var{children:t}=e,{pluginRegistry:r}=j(),n={},o={},i=v({});r.registeredPlugins.forEach(e=>{var t=e.reducer;if(t){var{initialState:r,actions:a}=t;n[e.id]=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=null==e?void 0:e[null==r?void 0:r.type];return n?n(t,r.payload):t}}(a),o[e.id]=r}i.current[e.id]||(i.current[e.id]={})});var[a,l]=m((e,t)=>{var{pluginId:r}=t;return r&&n[r]?mt(mt({},e),{},{[r]:n[r](e[r],t)}):e},o),s=(e,t)=>(i.current[e]||(i.current[e]={}),i.current[e][t]||(i.current[e][t]=d.createRef()),i.current[e][t]),c=g(()=>({state:a,dispatch:l,refs:i,getPluginRef:s}),[a,l]);return E(bt.Provider,{value:c,children:t})},ht=e=>{var t=u(bt);if(!t)throw new Error("usePlugin must be used within PluginProvider");var{state:r,dispatch:n,refs:o,getPluginRef:i}=t;return o.current[e]||(o.current[e]={}),mt(mt({},r[e]),{},{dispatch:t=>n(mt(mt({},t),{},{pluginId:e})),refs:o.current[e],useRef:t=>i(e,t)})};function yt(){return u(Le)}function Ot(){return u(Ge)}function Pt(){return u(pt)}function Et(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 wt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Et(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var _t=new Map;function Rt(e,t){var{pluginId:r,pluginConfig:n}=t,o=e;return _t.has(o)||_t.set(o,function(t){var o=j(),i=yt(),a=Ot(),l=Pt(),s=ht(r);return E(e,wt(wt({},t),{},{pluginConfig:n,pluginState:s,appConfig:o,appState:i,mapState:a,services:l,mapProvider:o.mapProvider,iconRegistry:ce(),buttonConfig:g(()=>Object.fromEntries(Object.entries(i.buttonConfig).filter(e=>{var[t,n]=e;return n.pluginId===r})),[i.buttonConfig])}))}),_t.get(o)}function jt(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 St(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?jt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Tt(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 Ct(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Tt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function At(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 Dt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?At(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Mt(){var e=j(),t=yt(),r=Ot(),n=Pt(),o=u(bt),i={appConfig:e,appState:t,mapState:r,services:n,mapProvider:null==e?void 0:e.mapProvider,iconRegistry:ce()};function a(t,r){var n,a;if(r){var l,s,c=e.pluginRegistry.registeredPlugins.find(e=>e.id===r);n=c?Dt({pluginId:c.id},c.config):{},a=Dt(Dt({},null!==(l=null==o||null===(s=o.state)||void 0===s?void 0:s[r])&&void 0!==l?l:{}),{},{dispatch:null==o?void 0:o.dispatch})}var d=Dt(Dt({},i),{},{pluginConfig:n,pluginState:a});return"function"==typeof t?t(d):t}return a.ctx=i,a}function kt(e){var t=yt(),{pluginRegistry:r}=j(),n=u(bt);h(()=>{if(null!=t&&t.dispatch&&n){var{dispatch:o}=t,i=0,a=e=>{i++,o(e)};r.registeredPlugins.forEach(r=>{var n,o;(null!==(n=null==r||null===(o=r.manifest)||void 0===o?void 0:o.buttons)&&void 0!==n?n:[]).flatMap(e=>{var t;return[e,...null!==(t=e.menuItems)&&void 0!==t?t:[]]}).forEach(n=>function(e){var{btn:t,pluginId:r,appState:n,dispatch:o,evaluateProp:i}=e;[{prop:"enableWhen",state:n.disabledButtons,action:"TOGGLE_BUTTON_DISABLED",invert:!0,key:"isDisabled"},{prop:"hiddenWhen",state:n.hiddenButtons,action:"TOGGLE_BUTTON_HIDDEN",key:"isHidden"},{prop:"pressedWhen",state:n.pressedButtons,action:"TOGGLE_BUTTON_PRESSED",key:"isPressed"},{prop:"expandedWhen",state:n.expandedButtons,action:"TOGGLE_BUTTON_EXPANDED",key:"isExpanded"}].forEach(e=>{var{prop:n,state:a,action:l,key:s,invert:c}=e;if("function"==typeof t[n])try{var d=i(t[n],r),u=c?!d:d;a.has(t.id)!==u&&o({type:l,payload:{id:t.id,[s]:u}})}catch(e){console.warn("".concat(n," error for button ").concat(t.id,":"),e)}})}({btn:n,pluginId:r.id,appState:t,dispatch:a,evaluateProp:e}))}),0!==i||t.arePluginsEvaluated||o({type:"PLUGINS_EVALUATED"})}},[t,n,e])}var It=["api"],Lt=e=>{var r,n,{plugin:o,mode:i}=e,a=function(e){var t=v(null),r=j(),n=yt(),o=Ot(),i=Pt(),a=ht(e);return f(()=>{t.current={appConfig:r,appState:n,mapState:o,services:i,mapProvider:r.mapProvider,pluginState:a}}),t}(o.id);f(()=>{o.api&&o._originalPlugin&&Object.entries(o.api).forEach(e=>{var[t,r]=e;o._originalPlugin[t]=function(e,t){var{pluginId:r,pluginConfig:n,stateRef:o}=t;return function(){var t=o.current;if(!t)throw new Error('Plugin API "'.concat(r,'" called before state is initialized'));for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e(St(St({},t),{},{pluginConfig:n,pluginId:r}),...a)}}(r,{pluginId:o.id,pluginConfig:(null==o?void 0:o.config)||{},stateRef:a})})},[o,a]);var{InitComponent:l}=o,s=(null==o?void 0:o.config)||{},{api:c}=s,d=t(s,It),{includeModes:u,excludeModes:p}=o.config||{},m=null===(r=null==u?void 0:u.includes(i))||void 0===r||r,b=null!==(n=null==p?void 0:p.includes(i))&&void 0!==n&&n;if(!m||b||!l)return null;var g=Rt(l,{pluginId:o.id,pluginConfig:d});return E(g,{})},Nt=()=>{var{mode:e}=yt(),{pluginRegistry:t}=j();(()=>{var{dispatch:e,hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o}=yt(),{eventBus:a}=Pt(),l=v(e),s=v({hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o});l.current=e,s.current={hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o},f(()=>{var e=e=>{var{id:t,config:r}=e;l.current({type:"ADD_BUTTON",payload:{id:t,config:r}}),Array.isArray(r.menuItems)&&r.menuItems.forEach(e=>{l.current({type:"ADD_BUTTON",payload:{id:e.id,config:Ct(Ct({},e),{},{isMenuItem:!0})}})})},t=e=>{var{id:t,prop:r,value:n}=e,{hiddenButtons:o,disabledButtons:i,pressedButtons:a,expandedButtons:c}=s.current;switch(r){case"hidden":var d="boolean"==typeof n?n:!o.has(t);l.current({type:"TOGGLE_BUTTON_HIDDEN",payload:{id:t,isHidden:d}});break;case"disabled":var u="boolean"==typeof n?n:!i.has(t);l.current({type:"TOGGLE_BUTTON_DISABLED",payload:{id:t,isDisabled:u}});break;case"pressed":var p="boolean"==typeof n?n:!a.has(t);l.current({type:"TOGGLE_BUTTON_PRESSED",payload:{id:t,isPressed:p}});break;case"expanded":var f="boolean"==typeof n?n:!c.has(t);l.current({type:"TOGGLE_BUTTON_EXPANDED",payload:{id:t,isExpanded:f}})}},r=()=>l.current({type:"TOGGLE_APP_VISIBLE",payload:!0}),n=()=>l.current({type:"TOGGLE_APP_VISIBLE",payload:!1}),o=e=>{var{id:t,config:r}=e;return l.current({type:"ADD_PANEL",payload:{id:t,config:r}})},c=e=>l.current({type:"REMOVE_PANEL",payload:e}),d=e=>l.current({type:"OPEN_PANEL",payload:{panelId:e}}),u=e=>l.current({type:"CLOSE_PANEL",payload:e}),p=e=>{var{id:t,config:r}=e;return l.current({type:"ADD_CONTROL",payload:{id:t,config:r}})};return a.on(i.APP_VISIBLE,r),a.on(i.APP_HIDDEN,n),a.on(i.APP_ADD_BUTTON,e),a.on(i.APP_TOGGLE_BUTTON_STATE,t),a.on(i.APP_ADD_PANEL,o),a.on(i.APP_REMOVE_PANEL,c),a.on(i.APP_SHOW_PANEL,d),a.on(i.APP_HIDE_PANEL,u),a.on(i.APP_ADD_CONTROL,p),()=>{a.off(i.APP_VISIBLE,r),a.off(i.APP_HIDDEN,n),a.off(i.APP_ADD_BUTTON,e),a.off(i.APP_TOGGLE_BUTTON_STATE,t),a.off(i.APP_ADD_PANEL,o),a.off(i.APP_REMOVE_PANEL,c),a.off(i.APP_SHOW_PANEL,d),a.off(i.APP_HIDE_PANEL,u),a.off(i.APP_ADD_CONTROL,p)}},[a])})();var r=Mt();return kt(r),E(_,{children:t.registeredPlugins.map((t,n)=>E(Lt,{plugin:t,mode:e,evaluateProp:r},"init-".concat(t.id,"-").concat(n)))})};var Bt=function(e){var{id:t,center:r,zoom:n,bounds:o}=e,i=((e,t)=>{var r=new URLSearchParams(t),n=r.get("".concat(e,":center")),o=r.get("".concat(e,":zoom"));if(!n||!o)return null;var[i,a]=n.split(",").map(Number);return{center:[i,a],zoom:Number(o)}})(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search);return i?{center:i.center,zoom:i.zoom}:o?{bounds:o}:{center:r,zoom:n}};function xt(){var{id:e}=j(),{eventBus:t}=Pt();f(()=>{if(e){var r=t=>{var{current:r}=t;!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.href,n=new URL(r||"http://localhost"),o=[...new URLSearchParams(n.search)].map(e=>{var[t,r]=e;return"".concat(t,"=").concat(r)}),i=[];t.center&&i.push("".concat(e,":center=").concat(t.center[0],",").concat(t.center[1])),null!=t.zoom&&i.push("".concat(e,":zoom=").concat(t.zoom));var a=o.filter(e=>!i.some(t=>t.split("=")[0]===e.split("=")[0])),l=n.hash||"",s="".concat(n.origin).concat(n.pathname,"?").concat([...a,...i].join("&")).concat(l);window.history.replaceState(window.history.state,"",s)}(e,{center:r.center,zoom:r.zoom})};return t.on(i.MAP_STATE_UPDATED,r),()=>t.off(i.MAP_STATE_UPDATED,r)}},[e])}var Ht=e=>{var{direction:t}=e;return"Map moved ".concat(t,".")},zt=e=>{var{from:t,to:r,areaDimensions:n,isAtMaxZoom:o,isAtMinZoom:i}=e;return"Map zoomed ".concat(r>t?"in":"out").concat(o?" (Maximum zoom)":"").concat(i?" (Minimum zoom)":"",". New area approximately ").concat(n,".")},Vt=e=>{var{areaDimensions:t,isAtMaxZoom:r,isAtMinZoom:n}=e;return"New area approximately ".concat(t).concat(r?" (Maximum zoom)":"").concat(n?" (Minimum zoom)":"",".")},Wt=e=>{var{isAtMaxZoom:t,isAtMinZoom:r}=e;return"No change, ".concat(t?"maximum zoom reached":"").concat(r?"minimum zoom reached":"",".")};function Ft(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 Gt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ft(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ut(){var{mapProvider:e}=j(),{eventBus:t,announce:r}=Pt();f(()=>{var n=t=>{var{previous:n,current:o}=t;if(null!=n&&n.center&&null!=o&&o.center){var i=((e,t,r)=>{var n=e.zoom!==t.zoom,o=e.center[0]!==t.center[0]||e.center[1]!==t.center[1],i=r.getAreaDimensions();if(o&&!n){var a=r.getCardinalMove(e.center,t.center);return Ht({direction:a,areaDimensions:i})}return!o&&n?zt(Gt(Gt({},t),{},{from:e.zoom,to:t.zoom,areaDimensions:i})):o||n?Vt(Gt(Gt({},t),{},{areaDimensions:i})):Wt(Gt({},t))})(n,o,e);i&&r(i,"core")}};return t.on(i.MAP_STATE_UPDATED,n),()=>{t.off(i.MAP_STATE_UPDATED,n)}},[e,r])}var Zt=e=>{if(null==e||!e.current)return{offsetWidth:0,offsetHeight:0};var t=e.current.firstElementChild;return null!=t&&t.classList.contains("im-c-panel")&&0!==t.offsetWidth&&0!==t.offsetHeight?{offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight}:{offsetWidth:0,offsetHeight:0}},Kt=e=>{var t,r=null==e||null===(t=e.current)||void 0===t?void 0:t.querySelector(".im-c-button-group");return r?r.offsetWidth:0},qt=(e,t,r,n)=>{var o=t/n,i=e/r;return o>=.5&&i>=.5?o>=i?{colH:t,colW:e,rowW:0,rowH:0}:{colH:0,colW:0,rowW:e,rowH:t}:{colH:t,colW:e,rowW:e,rowH:t}},Yt=(e,t,r,n,o,i,a)=>{var l=qt(e.offsetWidth,e.offsetHeight,r,n),s=qt(t.offsetWidth,t.offsetHeight,r,n),c=0===t.offsetHeight&&0===l.colH,d=0===e.offsetHeight&&0===s.colH,u=e.offsetHeight+t.offsetHeight+(e.offsetHeight>0&&t.offsetHeight>0?a:0)>o&&!c&&!d;return{panelInset:u?i+Math.max(e.offsetWidth,t.offsetWidth)+a:0,rowA:u?{w:0,h:0}:{w:l.rowW,h:l.rowH},rowB:u?{w:0,h:0}:{w:s.rowW,h:s.rowH}}},Xt=(e,t,r,n,o,i,a)=>e+t>o?i+Math.max(r,n)+a:0,$t=e=>{var{mainRef:t,leftRef:r,rightRef:n,actionsRef:o,bottomRef:i,leftTopRef:a,leftBottomRef:l,rightTopRef:s,rightBottomRef:c}=e;if(![t,r,n,o,i].some(e=>!(null!=e&&e.current))){var d=t.current,u=r.current,p=o.current,f=i.current,v=Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--divider-gap"),10),m=Zt(a),b=Zt(l),g=Zt(s),h=Zt(c),y=Math.max(Kt(r),Kt(n)),O=d.offsetLeft+u.offsetLeft+y+v,P=u.offsetLeft+y+v,E=u.offsetTop,w=d.offsetHeight-f.offsetTop-f.offsetHeight,_=Math.max(w,d.offsetHeight-f.offsetTop+v),R=Math.max(d.offsetHeight-p.offsetTop+v,_),j=d.offsetHeight-E-R,S=d.offsetWidth-(O-d.offsetLeft)-P,T=Yt(m,b,S,j,j/2,d.offsetLeft+u.offsetLeft,v),C=Yt(g,h,S,j,j/2,u.offsetLeft,v),A=T.panelInset,D=C.panelInset,M=Xt(T.rowA.w,C.rowA.w,T.rowA.h,C.rowA.h,S/2,E,v),k=Xt(T.rowB.w,C.rowB.w,T.rowB.h,C.rowB.h,S/2,_,v),I=d.offsetWidth-2*v,L=d.offsetHeight-2*v,N=d.offsetLeft+2*I/3,B=2*I/3,x=2*L/3;return{left:Math.max(O,Math.min(A,N)),right:Math.max(P,Math.min(D,B)),top:Math.max(E,Math.min(M,x)),bottom:Math.max(R,Math.min(k,x))}}},Jt=(e,t)=>Object.entries(e).reduce((e,r)=>{var[n,o]=r;return e[n]=Math.round(o/t),e},{}),Qt=e=>"Feature"===e.type?Qt(e.geometry):"Point"===e.type?e.coordinates:"MultiPoint"===e.type?e.coordinates[0]:null;function er(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 tr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?er(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var rr=e=>{var{mapContainerRef:t}=e,r=j(),{id:n,mapProvider:o}=r,{safeZoneInset:a,breakpoint:l,isLayoutReady:s,syncMapPadding:c}=yt(),{isMapReady:d,mapStyle:u,mapSize:p,center:m,zoom:b,bounds:g}=Ot(),h=v(!1),y=Bt({id:n,center:m,zoom:b,bounds:g});return f(()=>{if(a&&s&&u&&p&&!h.current)return requestAnimationFrame(()=>{o.initMap(tr(tr({},r),{},{pixelRatio:window.devicePixelRatio*W[p],container:t.current,padding:a,center:y.center,zoom:y.zoom,bounds:y.bounds,mapStyle:u,mapSize:p}))}),h.current=!0,()=>{}},[a,s,u,p]),function(){var{mapProvider:e}=j(),{dispatch:t}=Ot(),{eventBus:r}=Pt(),n=v(null),o=v(!1);f(()=>{if(e){var a=e=>{t({type:"MAP_MOVE",payload:e})},l=e=>{t({type:"MAP_MOVE_END",payload:e}),r.emit(i.MAP_STATE_UPDATED,{previous:n.current,current:e}),n.current=e},s=r=>{o.current||(n.current={center:e.getCenter(),zoom:e.getZoom()},o.current=!0),t({type:"MAP_FIRST_IDLE",payload:r})};return r.on(i.MAP_MOVE,a),r.on(i.MAP_MOVE_END,l),r.on(i.MAP_FIRST_IDLE,s),()=>{r.off(i.MAP_MOVE,a),r.off(i.MAP_MOVE_END,l),r.off(i.MAP_FIRST_IDLE,s)}}},[e,t])}(),xt(),Ut(),(()=>{var{mapProvider:e,eventBus:t}=j(),{dispatch:r,layoutRefs:n}=yt(),{mapSize:o}=Ot(),a=v(o);a.current=o;var l=()=>{var t=$t(n),o=Jt(t,W[a.current]);"function"==typeof r&&r({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:t,syncMapPadding:!1}}),"function"==typeof e.setPadding&&e.setPadding(o)};f(()=>{if(e){var t=e.fitToBounds;e.fitToBounds=function(r){if(r)return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||l(),t.call(e,r)};var r=e.setView;return e.setView=t=>{var{center:n,zoom:o}=t;if(n)return l(),r.call(e,{center:n,zoom:o})},()=>{e.fitToBounds=t,e.setView=r}}},[e,r,n,o]),f(()=>{if(e&&t){var r=t=>e.fitToBounds(t),n=t=>e.setView(t);return t.on(i.MAP_FIT_TO_BOUNDS,r),t.on(i.MAP_SET_VIEW,n),()=>{t.off(i.MAP_FIT_TO_BOUNDS,r),t.off(i.MAP_SET_VIEW,n)}}},[e,t])})(),(()=>{var{id:e,mapProvider:t,eventBus:r}=j(),{layoutRefs:n,panelConfig:o,panelRegistry:a,breakpoint:l}=yt(),s=v({layoutRefs:n,panelConfig:o,panelRegistry:a,breakpoint:l});s.current={layoutRefs:n,panelConfig:o,panelRegistry:a,breakpoint:l},f(()=>{if(t&&r){var o=r=>{var o,i,a,{panelId:l,visibleGeometry:c}=r,{panelConfig:d,panelRegistry:u}=s.current,p=null!=d&&d[l]?d:null!==(o=null==u?void 0:u.getPanelConfig())&&void 0!==o?o:d,f=null!=c?c:null==p||null===(i=p[l])||void 0===i?void 0:i.visibleGeometry,v=null===(a=n.appContainerRef.current)||void 0===a?void 0:a.querySelector("#".concat(e,"-panel-").concat(l));if(f&&"function"==typeof t.isGeometryObscured){var m=()=>{if(v){var e,r=v.getBoundingClientRect();if(r&&0!==r.width&&0!==r.height){if(t.isGeometryObscured(f,r))if("Point"===(e=(o=f)?"Feature"===o.type?null===(i=o.geometry)||void 0===i?void 0:i.type:o.type:null)||"MultiPoint"===e){var n=Qt(f);n&&t.setView({center:n})}else t.fitToBounds(f)}else requestAnimationFrame(m)}var o,i};requestAnimationFrame(m)}};return r.on(i.APP_PANEL_OPENED,o),()=>{r.off(i.APP_PANEL_OPENED,o)}}},[t,r])})(),f(()=>{d&&c&&o.setPadding(Jt(a,W[p]))},[d,p,l,a]),null};var nr={keydown:{ArrowUp:"panUp",ArrowDown:"panDown",ArrowLeft:"panLeft",ArrowRight:"panRight","+":"zoomIn","=":"zoomIn","-":"zoomOut",_:"zoomOut"},keyup:{"Alt+k":"showKeyboardControls","Alt+K":"showKeyboardControls","Alt+ArrowRight":"highlightNextLabel","Alt+ArrowLeft":"highlightNextLabel","Alt+ArrowUp":"highlightNextLabel","Alt+ArrowDown":"highlightNextLabel","Alt+Enter":"highlightLabelAtCenter","Alt+i":"getInfo","Alt+I":"getInfo",Escape:"clearSelection"}},or=(e,t,n)=>{var o,{containerRef:i,dispatch:a,panDelta:s,nudgePanDelta:c,zoomDelta:d,nudgeZoomDelta:u,readMapText:p}=n,f=e=>e?c:s,v=e=>e?u:d;return{showKeyboardControls:()=>{a({type:"OPEN_PANEL",payload:{panelId:"keyboardHelp",props:{triggeringElement:i.current}}})},panUp:t=>e.panBy([0,-f(t.shiftKey)]),panDown:t=>e.panBy([0,f(t.shiftKey)]),panLeft:t=>e.panBy([-f(t.shiftKey),0]),panRight:t=>e.panBy([f(t.shiftKey),0]),zoomIn:t=>e.zoomIn(v(t.shiftKey)),zoomOut:t=>e.zoomOut(v(t.shiftKey)),getInfo:(o=r(function*(r){var n,o=e.getCenter(),i=yield l(e.getZoom(),o),a=null===(n=e.getAreaDimensions)||void 0===n?void 0:n.call(e),s=a?"".concat(i,". Covering ").concat(a,"."):"".concat(i,".");t(s,"core")}),function(e){return o.apply(this,arguments)}),highlightNextLabel:r=>{if(p||!e.highlightNextLabel){var n=e.highlightNextLabel(r.key);t(n,"core")}},highlightLabelAtCenter:()=>{if(p||!e.highlightNextLabel){var r=e.highlightLabelAtCenter();t(r,"core")}},clearSelection:()=>{var t;return null==e||null===(t=e.clearHighlightedLabel)||void 0===t?void 0:t.call(e)}}};var ir=()=>{var{mapStatusRef:e}=Pt();return E("div",{ref:e,role:"status",className:"im-c-viewport__status","aria-live":"polite","aria-atomic":"true","aria-label":"Map updates"})},ar={active:"M5.035 20H1v-2h4.035C5.525 11.069 11.069 5.525 18 5.035V1h2v4.035c6.931.49 12.475 6.034 12.965 12.965H37v2h-4.035c-.49 6.931-6.034 12.475-12.965 12.965V37h-2v-4.035C11.069 32.475 5.525 26.931 5.035 20zM19 7c-6.581.005-11.995 5.419-12 12 .005 6.581 5.419 11.995 12 12 6.581-.005 11.995-5.419 12-12-.005-6.581-5.419-11.995-12-12zm0 10a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2z",inactive:"M5.035 20H1v-2h4.035a13.98 13.98 0 0 1 .246-1.8l1.96.399C7.083 17.375 7 18.178 7 19s.083 1.625.241 2.401l-1.96.399a13.98 13.98 0 0 1-.246-1.8zM20 5.035a13.98 13.98 0 0 1 1.8.246l-.399 1.96C20.625 7.083 19.822 7 19 7s-1.625.083-2.401.241l-.399-1.96a13.98 13.98 0 0 1 1.8-.246V1h2v4.035zm-2 27.93a13.98 13.98 0 0 1-1.8-.246l.399-1.96c.776.158 1.579.241 2.401.241s1.625-.083 2.401-.241l.399 1.96a13.98 13.98 0 0 1-1.8.246V37h-2v-4.035zM32.965 20a13.98 13.98 0 0 1-.246 1.8l-1.96-.399c.158-.776.241-1.579.241-2.401s-.083-1.625-.241-2.401l1.96-.399a13.98 13.98 0 0 1 .246 1.8H37v2h-4.035zM19 17a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2zm3.8-9.385l.634-1.897c1.789.598 3.438 1.553 4.848 2.805l-1.327 1.496c-1.196-1.06-2.605-1.886-4.155-2.404zm5.181 3.43l1.496-1.327c1.252 1.41 2.207 3.059 2.805 4.848l-1.897.634c-.518-1.55-1.344-2.959-2.404-4.155zM30.385 22.8l1.897.634c-.598 1.789-1.553 3.438-2.805 4.848l-1.496-1.327c1.06-1.196 1.886-2.605 2.404-4.155zm-3.43 5.181l1.327 1.496c-1.41 1.252-3.059 2.207-4.848 2.805l-.634-1.897c1.55-.518 2.959-1.344 4.155-2.404zM15.2 30.385l-.634 1.897c-1.789-.598-3.438-1.553-4.848-2.805l1.327-1.496c1.196 1.06 2.605 1.886 4.155 2.404zm-5.181-3.43l-1.496 1.327c-1.252-1.41-2.207-3.059-2.805-4.848l1.897-.634c.518 1.55 1.344 2.959 2.404 4.155zM7.615 15.2l-1.897-.634c.598-1.789 1.553-3.438 2.805-4.848l1.496 1.327c-1.06 1.196-1.886 2.605-2.404 4.155zm3.43-5.181L9.718 8.523c1.41-1.252 3.059-2.207 4.848-2.805l.634 1.897c-1.55.518-2.959 1.344-4.155 2.404z"},lr=()=>{var{id:e}=j(),{crossHairRef:t,crossHair:r}=(()=>{var{mapProvider:e}=j(),{safeZoneInset:t}=yt(),{eventBus:r}=Pt(),{crossHair:n,dispatch:o,mapSize:a}=Ot(),l=(e,r,n)=>{if(t){var o=r*W[a],i=n*W[a];e.style.transform="translate(".concat(o-t.left,"px, ").concat(i-t.top,"px)"),e.style.left="0",e.style.top="0",e.style.display="block"}},s=b(t=>{if(t){((e,t,r,n,o)=>{e.pinToMap=(i,a)=>{var{x:l,y:s}=r.mapToScreen(i);e.coords=i,n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!0,isVisible:!0,coords:i,state:a}}),o(t,l,s)},e.fixAtCenter=()=>{t.style.left="50%",t.style.top="50%",t.style.transform="translate(0,0)",t.style.display="block",n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!0}})},e.remove=()=>{t.style.display="none",n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!1}})},e.show=()=>{t.style.display="block",n({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!0}})},e.hide=()=>{t.style.display="none",n({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!1}})},e.setStyle=e=>{n({type:"UPDATE_CROSS_HAIR",payload:{state:e}})},e.getDetail=()=>{var t=e.isPinnedToMap?e.coords:r.getCenter();return{state:e.state,point:r.mapToScreen(t),zoom:r.getZoom(),coords:t}}})(n,t,e,o,l);var a=()=>{if(n.coords&&n.isPinnedToMap){var{x:r,y:o}=e.mapToScreen(n.coords);l(t,r,o)}};return r.on(i.MAP_RENDER,a),()=>{r.off(i.MAP_RENDER,a)}}},[n,e,a,o,t]);return f(()=>{n.coords&&n.isPinnedToMap&&n.pinToMap(n.coords,n.state)},[a]),{crossHair:n,crossHairRef:s}})(),{isVisible:n,isPinnedToMap:o,state:a}=r;return E("svg",{id:"".concat(e,"-cross-hair"),ref:t,className:"im-c-cross-hair",width:"38",height:"38",viewBox:"0 0 38 38",fillRule:"evenodd",fill:"currentColor",style:{position:"absolute",left:o?0:"50%",top:o?0:"50%",pointerEvents:"none",display:n?"block":"none"},children:E("path",{d:ar[a||"active"]})})};function sr(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 cr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?sr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var dr=(e,t,r,n)=>{if(!t||!n)return{x:0,y:0};var{x:o,y:i}=t.mapToScreen(e);return{x:o*W[r],y:i*W[r]}},ur=(e,t,r,n,o)=>{e.forEach(e=>{var i=t.get(e.id);if(i&&e.coords){var{x:a,y:l}=dr(e.coords,r,n,o);i.style.transform="translate(".concat(a,"px, ").concat(l,"px)"),i.style.display="block"}})},pr=()=>{var{mapProvider:e}=j(),{eventBus:t}=Pt(),{markers:r,dispatch:n,mapSize:o,isMapReady:a}=Ot(),l=v(new Map);h(()=>{e&&(r.markerRefs=l.current,r.add=(t,r,i)=>{var{x:l,y:s}=dr(r,e,o,a);n({type:"UPSERT_LOCATION_MARKER",payload:cr(cr({id:t,coords:r},i),{},{x:l,y:s,isVisible:!0})})},r.remove=e=>{n({type:"REMOVE_LOCATION_MARKER",payload:e})},r.getMarker=e=>r.items.find(t=>t.id===e))},[e,r,n,o]);var s=b(n=>s=>{if(s){l.current.set(n,s);var c=()=>{a&&e&&ur(r.items,l.current,e,o,a)};return t.on(i.MAP_RENDER,c),()=>{t.off(i.MAP_RENDER,c)}}l.current.delete(n)},[r,e,a,o]);return f(()=>{a&&e&&ur(r.items,l.current,e,o,a)},[o,r.items,e,a]),((e,t)=>{f(()=>{var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=e&&e.id&&null!=e&&e.coords){var{id:r,coords:n,options:o}=e;t.add(r,n,o)}};e.on(i.APP_ADD_MARKER,r);var n=e=>{e&&t.remove(e)};return e.on(i.APP_REMOVE_MARKER,n),()=>{e.off(i.APP_ADD_MARKER,r),e.off(i.APP_REMOVE_MARKER,n)}},[])})(t,r),{markers:r,markerRef:s}};function fr(e){return null==e?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var vr=new Set(["id","coords","x","y","isVisible","symbol","symbolSvgContent","viewBox","anchor","selectedColor","selectedWidth"]),mr=()=>{var{id:e}=j(),{mapStyle:t,mapSize:r}=Ot(),{markers:n,markerRef:o}=pr(),{symbolRegistry:i,eventBus:a}=Pt(),[l,s]=y(!1),[c,d]=y([]),u=v(null);if(f(()=>{var e=e=>{var{active:t,interactionModes:r=[]}=e;return s(t&&r.includes("selectMarker"))},t=e=>{var{selectedMarkers:t=[]}=e;return d(t)};return a.on("interact:active",e),a.on("interact:selectionchange",t),()=>{a.off("interact:active",e),a.off("interact:selectionchange",t)}},[a]),f(()=>{u.current=document.querySelector(".im-c-viewport")},[]),((e,t,r)=>{f(()=>{if(t){var n=r.current;if(n){var o=t=>{var r=e.items.some(r=>{var n,o=null===(n=e.markerRefs)||void 0===n?void 0:n.get(r.id);if(!o)return!1;var{left:i,top:a,right:l,bottom:s}=o.getBoundingClientRect();return t.clientX>=i&&t.clientX<=l&&t.clientY>=a&&t.clientY<=s});n.style.cursor=r?"pointer":""};return n.addEventListener("mousemove",o),()=>{n.removeEventListener("mousemove",o),n.style.cursor=""}}}},[e,t,r])})(n,l,u),t){var p=i.getDefaults();return E(_,{children:n.items.map(n=>{var a,l=((e,t,r)=>{var n=e.symbolSvgContent||t.symbolSvgContent;return n?{svg:n}:r.get(e.symbol||t.symbol)})(n,p,i),s=Object.fromEntries(Object.entries(n).filter(e=>{var[t]=e;return!vr.has(t)})),d=c.includes(n.id),u=d?i.resolveSelected(l,s,t):i.resolve(l,s,t),f=((e,t,r)=>e.viewBox||t.viewBox||(null==r?void 0:r.viewBox)||"0 0 38 38")(n,p,l),[,,v,m]=f.split(" ").map(Number),b=((e,t,r)=>{var n,o,i;return null!==(n=null!==(o=null!==(i=e.anchor)&&void 0!==i?i:t.anchor)&&void 0!==o?o:null==r?void 0:r.anchor)&&void 0!==n?n:[.5,.5]})(n,p,l),g=n.symbol||p.symbol,h=null!==(a=W[r])&&void 0!==a?a:1,y=v*h,O=m*h;return E("svg",{ref:o(n.id),id:"".concat(e,"-marker-").concat(n.id),className:["im-c-marker","im-c-marker--".concat(fr(g)),d&&"im-c-marker--selected"].filter(Boolean).join(" "),width:y,height:O,viewBox:f,overflow:"visible",style:{display:n.isVisible?"block":"none",marginLeft:"".concat(-b[0]*y,"px"),marginTop:"".concat(-b[1]*O,"px")},children:E("g",{dangerouslySetInnerHTML:{__html:u}})},n.id)})})}},br=e=>{var{keyboardHintPortalRef:t}=e,{id:r,mapProvider:n,mapLabel:o,keyboardHintText:a}=j(),{interfaceType:l,mode:s,previousMode:c,layoutRefs:d,safeZoneInset:u}=yt(),{mapSize:p}=Ot(),m=v(null),b=v(null),[g,h]=y(!1);!function(e){var{mapProvider:t,panDelta:r,nudgePanDelta:n,zoomDelta:o,nudgeZoomDelta:i,readMapText:a}=j(),{interfaceType:l,dispatch:s}=yt(),{announce:c}=Pt();f(()=>{var d=e.current;if(d&&"keyboard"===l){var u=or(t,c,{containerRef:e,dispatch:s,panDelta:r,nudgePanDelta:n,zoomDelta:o,nudgeZoomDelta:i,readMapText:a}),p=e=>t=>{var r=nr[e][(e=>{var t;return"Add"===(t=/^Key[A-Z]$/.test(e.code)?e.code.slice(3):e.key)||"NumpadAdd"===t?t="+":"Subtract"!==t&&"NumpadSubtract"!==t||(t="-"),e.altKey?"Alt+".concat(t):t})(t)];r&&u[r]&&(u[r](t),t.preventDefault())},f=p("keydown"),v=p("keyup");return d.addEventListener("keydown",f),d.addEventListener("keyup",v),()=>{d.removeEventListener("keydown",f),d.removeEventListener("keyup",v)}}},[e,l,t,r,n,o,i])}(d.viewportRef),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mapProvider:t}=j(),{eventBus:r}=Pt();f(()=>{if(t){var n={};return Object.entries(e).forEach(e=>{var[t,o]=e,i=e=>o(e);n[t]=i,r.on(t,i)}),()=>{Object.entries(n).forEach(e=>{var[t,n]=e;r.off(t,n)})}}},[t,e])}({[i.MAP_CLICK]:()=>{var e;return null==n||null===(e=n.clearHighlightedLabel)||void 0===e?void 0:e.call(n)}});var{showHint:P,handleFocus:R,handleBlur:S}=function(e){var{interfaceType:t,containerRef:r,keyboardHintRef:n,keyboardHintVisible:o,onViewportFocusChange:i}=e,a=o;return f(()=>{if(a&&r.current){var e=r.current,t=e=>{["Escape","Tab"].includes(e.key)&&i(!1)},o=t=>{var r,o=e.contains(t.target),a=null===(r=n.current)||void 0===r?void 0:r.contains(t.target);o&&!a&&i(!1)};return e.addEventListener("keydown",t),e.addEventListener("mousedown",o),()=>{e.removeEventListener("keydown",t),e.removeEventListener("mousedown",o)}}},[a,r,n,i]),{showHint:a,handleFocus:()=>{"keyboard"===t&&i(!0)},handleBlur:()=>{i(!1)}}}({interfaceType:l,containerRef:d.viewportRef,keyboardHintRef:b,keyboardHintVisible:g,onViewportFocusChange:h});return f(()=>{var e;s&&c&&s!==c&&(null===(e=d.viewportRef)||void 0===e||e.current.focus())},[s]),f(()=>{var e,t=null===(e=d.mainRef)||void 0===e?void 0:e.current;if(t)return t.classList.toggle("im-o-app__main--keyboard-hint-visible",P),()=>null==t?void 0:t.classList.remove("im-o-app__main--keyboard-hint-visible")},[P]),w(_,{children:[E(rr,{mapContainerRef:m}),w("div",{id:"".concat(r,"-viewport"),className:"im-c-viewport im-c-viewport--".concat(p),"aria-label":o,role:"application",tabIndex:"0",onFocus:R,onBlur:S,ref:d.viewportRef,children:[P&&(null==t?void 0:t.current)&&O(E("div",{className:"im-c-viewport__keyboard-hint","aria-hidden":"true",ref:b,dangerouslySetInnerHTML:{__html:a}}),t.current),E("div",{className:"im-c-viewport__map-container",ref:m}),E("div",{className:"im-c-viewport__features"}),E(ir,{}),E("div",{className:"im-c-viewport__safezone",style:u,ref:d.safeZoneRef,children:E(lr,{})}),E(mr,{})]})]})};function gr(e,t){var r=v(),n=v(new WeakMap);return f(()=>{var o=(Array.isArray(e)?e:[e]).map(e=>null==e?void 0:e.current).filter(Boolean);if(o.length&&t){var i=new window.ResizeObserver(e=>{for(var r of e){var{width:o,height:i}=r.contentRect,a=n.current.get(r.target)||{};a.width===o&&a.height===i||(n.current.set(r.target,{width:o,height:i}),t(r))}});return o.forEach(e=>i.observe(e)),()=>{i.disconnect(),r.current&&cancelAnimationFrame(r.current)}}},[e,t]),{frameRef:r}}var hr=e=>{var t,r;return null!==(t=null==e||null===(r=e.current)||void 0===r?void 0:r.offsetHeight)&&void 0!==t?t:0},yr=(e,t,r)=>e-(t?t+r:0);function Or(){var{dispatch:e,breakpoint:t,layoutRefs:r,arePluginsEvaluated:n,appVisible:o,isFullscreen:i}=yt(),{mapSize:a,isMapReady:l}=Ot(),{appContainerRef:s,mainRef:c,bannerRef:d,topRef:u,topLeftColRef:p,topRightColRef:f,leftTopRef:v,leftBottomRef:m,rightTopRef:b,rightBottomRef:g,bottomRef:y,bottomRightRef:O,attributionsRef:P,drawerRef:E,actionsRef:w}=r,_=()=>{var e,t,r=s.current,n=c.current,o=u.current,i=p.current,a=f.current,l=y.current,d=P.current;if(![n,o,l].some(e=>!e)){var h,E,w=document.documentElement,_=Number.parseInt(getComputedStyle(w).getPropertyValue("--divider-gap"),10);r.style.setProperty("--top-col-width","".concat((h=i.offsetWidth,E=a.offsetWidth,h||E?Math.max(h,E):0),"px"));var R=i.offsetHeight+o.offsetTop,j=l.offsetTop-R-_;r.style.setProperty("--left-offset-top","".concat(R,"px")),r.style.setProperty("--left-offset-bottom","".concat(n.offsetHeight-l.offsetTop+_,"px")),r.style.setProperty("--left-top-max-height","".concat(j,"px"));var S=null!==(e=null==O||null===(t=O.current)||void 0===t?void 0:t.offsetHeight)&&void 0!==e?e:0,T=n.offsetHeight-l.offsetTop-l.offsetHeight,C=a.offsetHeight+o.offsetTop,A=l.offsetTop+l.offsetHeight-S-C-_,D=T+(S>0?S+_:d.offsetHeight);r.style.setProperty("--right-offset-top","".concat(C,"px")),r.style.setProperty("--right-offset-bottom","".concat(D,"px")),r.style.setProperty("--right-top-max-height","".concat(A,"px")),r.style.setProperty("--left-top-panel-max-height","".concat(yr(j,hr(m),_),"px")),r.style.setProperty("--left-bottom-panel-max-height","".concat(yr(j,hr(v),_),"px")),r.style.setProperty("--right-top-panel-max-height","".concat(yr(A,hr(g),_),"px")),r.style.setProperty("--right-bottom-panel-max-height","".concat(yr(A,hr(b),_),"px"))}};h(()=>{e({type:"CLEAR_PLUGINS_EVALUATED"})},[t,a,l,o,i]),h(()=>{n&&requestAnimationFrame(()=>{_();var t=$t(r);t&&e({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:t}})})},[n]),gr([d,c,u,p,f,w,y,O,v,m,b,g,E],()=>{requestAnimationFrame(()=>{_()})})}var Pr=()=>{var{mapStyle:e}=Ot();if(null!=e&&e.logo)return E("img",{className:"im-c-logo",src:e.logo,alt:e.logoAltText})},Er=()=>{var{breakpoint:e}=yt(),{mapStyle:t}=Ot();return t?"mobile"!==e&&E("div",{className:"im-c-attributions",dangerouslySetInnerHTML:{__html:t.attribution}}):null},wr=(e,t)=>e.modal?"modal":"drawer"===e.slot&&["tablet","desktop"].includes(t)?"left-top":e.slot,_r=(e,t)=>{var r;return!(e.includeModes&&!e.includeModes.includes(t))&&(null===(r=e.excludeModes)||void 0===r||!r.includes(t))},Rr=e=>"string"==typeof e.html&&!e.pluginId;var jr={"left-top":{inset:"var(--left-offset-top) auto auto var(--primary-gap)",maxHeight:"var(--left-top-max-height)"},"left-bottom":{inset:"auto auto var(--left-offset-bottom) var(--primary-gap)",maxHeight:"var(--left-top-max-height)"},"right-top":{inset:"var(--right-offset-top) var(--primary-gap) auto auto",maxHeight:"var(--right-top-max-height)"},"right-bottom":{inset:"auto var(--primary-gap) var(--right-offset-bottom) auto",maxHeight:"var(--right-top-max-height)"}},Sr="--modal-inset",Tr="--modal-max-height",Cr=(e,t,r)=>{f(()=>{if(t){var n=t=>{"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),r()),"Tab"===t.key&&e.current&&function(e,t){if("Tab"===t.key){var r=Array.from(e.querySelectorAll(["a[href]:not([disabled])","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'*[tabindex="0"]:not([disabled])'].join(",")));if(0!==(r=r.filter(e=>!!e.offsetParent)).length){var n=r[0],o=r[r.length-1];!t.shiftKey||document.activeElement!==e&&document.activeElement!==n||(o.focus(),t.preventDefault()),t.shiftKey||document.activeElement!==o||(n.focus(),t.preventDefault())}}}(e.current,t)},o=e.current;return null==o||o.addEventListener("keydown",n),()=>{null==o||o.removeEventListener("keydown",n)}}},[t,e,r])};function Ar(e){var{mainRef:t,panelRef:r,isModal:n,rootEl:o,buttonContainerEl:i,handleClose:a}=e,{layoutRefs:l}=yt();Cr(r,n,a),gr([t],()=>{if(n&&t.current){var e=document.documentElement,o=getComputedStyle(e),a=Number.parseInt(o.getPropertyValue("--divider-gap"),10),s=Number.parseInt(o.getPropertyValue("--primary-gap"),10),c=r.current.dataset.slot;if(null!=c&&c.endsWith("-button")){var d,u,p,f=null===(d=r.current)||void 0===d?void 0:d.id,v=f?document.querySelector('[aria-controls="'.concat(f,'"]')):null,m=null!==(u=null!==(p=null==v?void 0:v.parentElement)&&void 0!==p?p:null!=i&&i.isConnected?i:null)&&void 0!==u?u:document.querySelector('[data-button-slot="'.concat(c,'"]'));if(!m)return;((e,t,r)=>{var n=document.documentElement,o=t.current.getBoundingClientRect(),i=e.getBoundingClientRect(),a=!!e.closest(".im-o-app__left-bottom, .im-o-app__right-bottom"),l=!!e.closest(".im-o-app__left-top, .im-o-app__left-bottom"),s=a?"auto":"".concat(Math.round(i.top-o.top),"px"),c=a?"".concat(Math.round(o.bottom-i.bottom),"px"):"auto",d=l?"auto":"".concat(Math.round(o.right-i.left+r),"px"),u=l?"".concat(Math.round(i.right-o.left+r),"px"):"auto",p=a?Math.round(o.bottom-i.bottom):Math.round(i.top-o.top);n.style.setProperty(Sr,"".concat(s," ").concat(d," ").concat(c," ").concat(u)),n.style.setProperty(Tr,"".concat(o.height-p-r,"px"))})(m,t,a)}else((e,t,r)=>{var n,o,i=document.documentElement,a=jr[e];if(a)return i.style.setProperty(Sr,a.inset),void i.style.setProperty(Tr,a.maxHeight);var l=null===(n=t["".concat(e[0].toLowerCase()+e.slice(1),"Ref")])||void 0===n?void 0:n.current,s=null===(o=t.mainRef)||void 0===o?void 0:o.current;if(l&&s){var c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),u=c.left-d.left,p=c.top-d.top;i.style.setProperty(Sr,"".concat(p,"px auto auto ").concat(u,"px")),i.style.setProperty(Tr,"".concat(d.height-p-r,"px"))}})(c,l,s)}}),f(()=>{if(n){var e=e=>{var t=e.target.closest(".im-o-app__modal-backdrop");o&&t&&o.contains(t)&&a()};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}},[n,o,a]),f(()=>{if(n&&r.current&&o)return s({containerEl:r.current,isFullscreen:!0,boundaryEl:o}),()=>{s({containerEl:r.current,isFullscreen:!1,boundaryEl:o})}},[n,r,o]),((e,t,r)=>{f(()=>{if(e){var n=e=>{var n=e.target,o=t.current;if(n&&o&&r){var i=r.contains(n),a=o.contains(n);i&&!a&&o.focus()}};return document.addEventListener("focusin",n),()=>{document.removeEventListener("focusin",n)}}},[e,t,r])})(n,r,o)}var Dr=e=>{var{id:t,svgContent:r,isMenu:n}=e,o=n?ce().chevron:ce()[t]||r;return E("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:o},className:"im-c-icon".concat(n?" im-c-icon--narrow":"")})};function Mr(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 kr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Mr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Ir=(e,t)=>e?"dialog":t?"complementary":"region",Lr=e=>{var t,r,n,{panelId:o,panelConfig:i,props:a,WrappedChild:l,label:s,html:c,children:d,isOpen:u=!0,rootRef:p}=e,{id:m}=j(),{dispatch:h,breakpoint:O,layoutRefs:P}=yt(),_=document.getElementById("".concat(m,"-im-app")),R=i[O],S="".concat(m,"-panel-").concat(fr(o)),{isDialog:T,isModal:C,isDismissible:A,shouldFocus:D,buttonContainerEl:M}=((e,t)=>{var r="side"===e.slot&&e.open&&!e.modal,n=!r&&e.dismissible,o=!0===e.modal;return{isAside:r,isDialog:n,isModal:o,isDismissible:!1!==e.dismissible,shouldFocus:Boolean(o||t),buttonContainerEl:e.slot.endsWith("button")?null==t?void 0:t.parentNode:void 0}})(R,null==a?void 0:a.triggeringElement),k=C&&u,I=P.mainRef,L=v(null),N=v(null),B=v(u),x=function(e){var[t,r]=y(!1),n=b(()=>{var t=null==e?void 0:e.current;t&&r(t.scrollHeight>t.clientHeight)},[e]);return gr(e,n),t}(N),H=p||L,z=()=>{requestAnimationFrame(()=>{var e,t;null===(e=(t=(null==a?void 0:a.triggeringElement)||P.viewportRef.current).focus)||void 0===e||e.call(t)}),h({type:"CLOSE_PANEL",payload:o})};Ar({mainRef:I,panelRef:H,isModal:k,rootEl:_,buttonContainerEl:M,handleClose:z}),f(()=>{var e,t=u&&!B.current;(B.current=u,D&&(t||u))&&(null===(e=H.current)||void 0===e||e.focus())},[u]);var V,W,F=(V=R.slot,W=null===(t=R.showLabel)||void 0===t||t,["im-c-panel","im-c-panel--".concat(V),!W&&"im-c-panel--no-heading"].filter(Boolean).join(" ")),G=((e,t)=>["im-c-panel__body",!e&&t&&"im-c-panel__body--offset"].filter(Boolean).join(" "))(null===(r=R.showLabel)||void 0===r||r,A),U=g(()=>c?{__html:c}:null,[c]),Z=(e=>{var{elementId:t,shouldFocus:r,isDialog:n,isDismissible:o,isModal:i,width:a,panelClass:l,slot:s}=e;return{id:t,"aria-labelledby":"".concat(t,"-label"),tabIndex:r?-1:void 0,role:Ir(n,o),"aria-modal":n&&i?"true":void 0,style:a?{width:a}:void 0,className:l,"data-slot":s}})({elementId:S,shouldFocus:D,isDialog:T,isDismissible:A,isModal:C,width:R.width,panelClass:F,slot:R.slot}),K=(e=>{var{bodyRef:t,panelBodyClass:r,isBodyScrollable:n,elementId:o}=e;return{ref:t,className:r,tabIndex:n?0:void 0,role:n?"region":void 0,"aria-labelledby":n?"".concat(o,"-label"):void 0}})({bodyRef:N,panelBodyClass:G,isBodyScrollable:x,elementId:S});return w("div",kr(kr({ref:H},Z),{},{children:[E("h2",{id:"".concat(S,"-label"),className:null===(n=R.showLabel)||void 0===n||n?"im-c-panel__heading im-e-heading-m":"im-u-visually-hidden",children:s}),A&&E("button",{"aria-label":"Close ".concat(s),className:"im-c-panel__close",onClick:z,children:E(Dr,{id:"close"})}),U?E("div",kr(kr({},K),{},{dangerouslySetInnerHTML:U})):w("div",kr(kr({},K),{},{children:[" ",l?E(l,kr({},a)):d]}))]}))};function Nr(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 Br(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Nr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function xr(e){var{slot:t,appState:r,evaluateProp:n}=e,{breakpoint:o,pluginRegistry:i,panelConfig:a,mode:l,openPanels:s}=r,c=Object.entries(s),d=c.filter(e=>{var t,[r]=e,n=null===(t=a[r])||void 0===t?void 0:t[o];return null==n?void 0:n.modal}),u=d.length>0?d[d.length-1][0]:null;return c.map(e=>{var s,[c,{props:d}]=e,p=a[c];if(!p)return null;if(Rr(p))return null;var f=p[o];if(!f)return null;var v=wr(f,o);if(!((e,t,r,n)=>{var{targetSlot:o,slot:i,mode:a,isFullscreen:l,allowedModalPanelId:s}=n,c=o.endsWith("-button");return!(!ue.panel.includes(o)&&!c||!_r(t,a)||!1===t.inline&&!l||o!==i||r.modal&&e!==s)})(c,p,f,{targetSlot:v,slot:t,mode:l,isFullscreen:r.isFullscreen,allowedModalPanelId:u}))return null;var m=i.registeredPlugins.find(e=>e.id===p.pluginId),b=null==m?void 0:m.id,g=p.render?Rt(p.render,Br(Br({},d),{},{pluginId:b,pluginConfig:null==m?void 0:m.config})):null;return{id:c,type:"panel",order:null!==(s=f.order)&&void 0!==s?s:0,element:E(Lr,{panelId:c,panelConfig:p,props:d,WrappedChild:g,label:n(p.label,b),html:b?n(p.html,b):p.html},c)}}).filter(Boolean)}var Hr=0,zr=e=>{var{children:t,content:r}=e,{interfaceType:n}=yt(),o=v(null),i=v(null),[a,l]=y(!1),[s,c]=y(!1),[d,u]=y(null),[p]=y(()=>"tooltip-".concat(Hr+=1)),m=v(null),b=v(null),g=()=>{clearTimeout(m.current),l(!1)},h=()=>{clearTimeout(b.current),m.current=setTimeout(()=>l(!0),500)},O=()=>{clearTimeout(m.current),b.current=setTimeout(()=>l(!1),0)};f(()=>{var e=e=>{"Escape"===e.key&&(clearTimeout(m.current),clearTimeout(b.current),l(!1))};if(window.addEventListener("keydown",e),a){var t=function(e,t){if(!e)return"bottom";t||(t=e.closest(".im-o-app__main"));var r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),o={top:r.top-n.top,bottom:n.bottom-r.bottom,left:r.left-n.left,right:n.right-r.right},i=Object.entries(o),a=i.toSorted((e,t)=>{var[,r]=e,[,n]=t;return r-n}),[l,s]=a[0];if("top"===l||"bottom"===l)for(var[c,d]of i)if(("left"===c||"right"===c)&&Math.abs(d-s)<=50)return"left"===c?"right":"left";return{top:"bottom",bottom:"top",left:"right",right:"left"}[l]}(o.current);u(t)}return()=>{window.removeEventListener("keydown",e),clearTimeout(m.current),clearTimeout(b.current)}},[a]);var _=P(t,{ref:e=>{var r;o.current=e;var n=null===(r=t.props)||void 0===r?void 0:r.ref;"function"==typeof n?n(e):n&&"object"==typeof n&&(n.current=e)},onMouseEnter:h,onMouseLeave:O,onMouseDown:g,onKeyDown:g,onFocus:()=>{"keyboard"===n&&h(),c(!0)},onBlur:()=>{O(),c(!1)},"aria-labelledby":p});return w("div",{className:"im-c-tooltip-wrapper".concat(s?" im-c-tooltip-wrapper--has-focus":""),children:[_,E("div",{id:p,ref:i,className:"im-c-tooltip im-c-tooltip--".concat(d||"hidden"," ").concat(a?"im-c-tooltip--is-visible":""),role:"tooltip","aria-hidden":!a,children:r})]})},Vr=(e,t,r)=>{var{buttonConfig:n,evaluateProp:o,pluginId:i,id:a}=r,l=n[t.id];if("function"==typeof(null==l?void 0:l.onClick)?l.onClick(e,o(e=>e,i)):"function"==typeof t.onClick&&t.onClick(e.nativeEvent),e.nativeEvent instanceof KeyboardEvent){var s=document.getElementById("".concat(a,"-").concat(fr(t.id)));if(s){var c=new MouseEvent("click",{bubbles:!0,cancelable:!0});c._fromKeyboardActivation=!0,s.dispatchEvent(c)}}},Wr=e=>{var{items:t,visibleIndices:r,index:n,setIndex:o,disabledButtons:i,instigator:a,setIsOpen:l,activateCtx:s}=e,c=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!=e&&e.preventDefault&&e.preventDefault(),a.focus(),l(!1)};return e=>{["Escape","Esc"].includes(e.key)?c(e,!0):"Tab"!==e.key?["ArrowDown","ArrowUp"].includes(e.key)?(e=>{e.preventDefault();var t=r.length;if(0!==t){var i,a=r.indexOf(n);i="ArrowDown"===e.key?-1===a?0:(a+1)%t:-1===a?t-1:(a-1+t)%t,o(r[i])}})(e):"Home"===e.key&&r.length?o(r[0]):"End"===e.key&&r.length?o(r[r.length-1]):("Enter"===e.key&&(e=>{e.preventDefault();var r=t[n];r&&!i.has(r.id)&&Vr(e,r,s),a.focus(),l(!1)})(e)," "===e.key&&(e=>{e.preventDefault();var r=t[n];r&&!i.has(r.id)&&(Vr(e,r,s),void 0!==r.isPressed||r.pressedWhen||(a.focus(),l(!1)))})(e)):c(e)}},Fr=e=>{var{items:t,hiddenButtons:r,startIndex:n,startPos:o,instigator:i,instigatorKey:a,buttonRefs:l,buttonConfig:s,disabledButtons:c,pluginId:d,evaluateProp:u,id:p,menuRef:v,setIsOpen:m,buttonRect:b}=e,h=g(()=>{var e=[];return t.forEach((t,n)=>{r.has(t.id)||e.push(n)}),e},[t,r]),[O,P]=y(()=>{return"number"==typeof n?n:"first"===o?null!==(e=h[0])&&void 0!==e?e:-1:"last"===o&&null!==(t=h[h.length-1])&&void 0!==t?t:-1;var e,t}),E={buttonConfig:s,evaluateProp:u,pluginId:d,id:p},w=Wr({items:t,visibleIndices:h,index:O,setIndex:P,disabledButtons:c,instigator:i,setIsOpen:m,activateCtx:E}),_=e=>{var t,r;null!==(t=v.current)&&void 0!==t&&t.contains(e.target)||null!==(r=l.current[a])&&void 0!==r&&r.contains(e.target)||m(!1)};f(()=>{var e,t;if(null===(e=v.current)||void 0===e||e.focus(),"first"===o)P(null!==(t=h[0])&&void 0!==t?t:-1);else if("last"===o){var r;P(null!==(r=h[h.length-1])&&void 0!==r?r:-1)}var n=()=>m(!1);return document.addEventListener("focusin",_),document.addEventListener("pointerdown",_),window.addEventListener("resize",n),()=>{document.removeEventListener("focusin",_),document.removeEventListener("pointerdown",_),window.removeEventListener("resize",n)}},[]);var{style:R,direction:j,halign:S}=(e=>{if(!e)return{style:{},direction:"below"};var t,r={};e.top>=window.innerHeight/2?(r.bottom="".concat(window.innerHeight-e.top,"px"),t="above"):(r.top="".concat(e.bottom,"px"),t="below");var n,o=(e.left+e.right)/2;return o>2*window.innerWidth/3?(r.right="".concat(window.innerWidth-e.right,"px"),n="right"):o<window.innerWidth/3?(r.left="".concat(e.left,"px"),n="left"):(r.left="".concat(o,"px"),n="center"),{style:r,direction:t,halign:n}})(b);return{index:O,handleMenuKeyDown:w,handleItemClick:(e,t)=>{e.nativeEvent._fromKeyboardActivation||c.has(t.id)||(m(!1),Vr(e,t,E))},menuStyle:R,menuDirection:j,menuHAlign:S}},Gr=e=>{var{item:t,isSelected:r,hiddenButtons:n,disabledButtons:o,pressedButtons:i,id:a,onItemClick:l}=e;return w("li",{id:"".concat(a,"-").concat(fr(t.id)),className:"im-c-popup-menu__item".concat(r?" im-c-popup-menu__item--selected":""),role:void 0!==t.isPressed||t.pressedWhen?"menuitemcheckbox":"menuitem","aria-disabled":o.has(t.id)||void 0,"aria-checked":void 0!==t.isPressed||t.pressedWhen?i.has(t.id):void 0,style:n.has(t.id)?{display:"none"}:void 0,onClick:e=>l(e,t),children:[(t.iconId||t.iconSvgContent)&&E(Dr,{id:t.iconId,svgContent:t.iconSvgContent}),E("span",{className:"im-c-popup-menu__item-label",children:t.label})]})},Ur=e=>{var t,r,{popupMenuId:n,buttonId:o,instigatorId:i,pluginId:a,startPos:l,startIndex:s,menuRef:c,items:d,setIsOpen:u,buttonRect:p}=e,{id:f}=j(),{buttonRefs:v,buttonConfig:m,hiddenButtons:b,disabledButtons:g,pressedButtons:h,layoutRefs:y}=yt(),P=null!=o?o:i,w=v.current[P],_=Mt(),{index:R,handleMenuKeyDown:S,handleItemClick:T,menuStyle:C,menuDirection:A,menuHAlign:D}=Fr({items:d,hiddenButtons:b,startIndex:s,startPos:l,instigator:w,instigatorKey:P,buttonRefs:v,buttonConfig:m,disabledButtons:g,pluginId:a,evaluateProp:_,id:f,menuRef:c,setIsOpen:u,buttonRect:p});return O(E("ul",{ref:c,id:n,className:"im-c-popup-menu","data-direction":A,"data-halign":D,style:C,role:"menu",tabIndex:"-1","aria-labelledby":P,"aria-activedescendant":R>=0?"".concat(f,"-").concat(fr(d[R].id)):void 0,onKeyDown:S,children:d.map((e,t)=>E(Gr,{item:e,isSelected:R===t,hiddenButtons:b,disabledButtons:g,pressedButtons:h,id:f,onItemClick:T},e.id))}),null!==(t=null==y||null===(r=y.appContainerRef)||void 0===r?void 0:r.current)&&void 0!==t?t:document.body)};function Zr(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 Kr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Zr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var qr=(e,t,r)=>["im-c-map-button",e&&"im-c-map-button--".concat(fr(e)),t&&"im-c-map-button--".concat(t),r&&"im-c-map-button--with-label"].filter(Boolean).join(" "),Yr=(e,t)=>["im-c-button-wrapper",e&&"im-c-button-wrapper--".concat(fr(e)),t&&"im-c-button-wrapper--wide"].filter(Boolean).join(" "),Xr=e=>{" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),e.currentTarget.click())},$r=(e,t,r)=>{var n=e.current[t];n&&r(n.getBoundingClientRect().toJSON())},Jr=e=>{var{buttonId:t,iconId:r,iconSvgContent:n,label:o,showLabel:i,isDisabled:a,isPressed:l,isExpanded:s,isHidden:c,isPanelOpen:d,variant:u,onClick:p,panelId:f,menuItems:m,idPrefix:b,href:g}=e,{id:h}=j(),{buttonRefs:O}=yt(),[P,_]=y(!1),[R,S]=y(null),[T,C]=y(null),A=v(null),D=g?"a":"button",M=(null==m?void 0:m.length)>=1,k=r||n||M,I=((e,t)=>e?"".concat(fr(t),"-button"):void 0)(f,t),L=(e=>{var{idPrefix:t,panelId:r,buttonId:n,hasMenu:o}=e;return r?{id:"".concat(t,"-panel-").concat(fr(r)),type:"panel"}:o?{id:"".concat(t,"-popup-").concat(fr(n)),type:"popup"}:null})({idPrefix:b,panelId:f,buttonId:t,hasMenu:M}),N=((e,t,r,n,o,i)=>a=>{e&&["ArrowDown","ArrowUp"].includes(a.key)&&(a.preventDefault(),n("ArrowUp"===a.key?"last":"first"),$r(t,r,o),i(!0))})(M,O,t,S,C,_),B=(e=>{var t,{appId:r,buttonId:n,className:o,onClick:i,onKeyUp:a,buttonRefs:l,isDisabled:s,isPressed:c,isExpanded:d,isPanelOpen:u,isPopupOpen:p,controlledElement:f,href:v}=e;return"panel"===(null==f?void 0:f.type)?t=String(u):"popup"===(null==f?void 0:f.type)?t=p:"boolean"==typeof d&&(t=d),Kr({id:"".concat(r,"-").concat(fr(n)),className:o,onClick:i,onKeyUp:a,ref:e=>{l.current&&n&&(l.current[n]=e)},"aria-disabled":s||void 0,"aria-expanded":t,"aria-pressed":"boolean"==typeof c?c:void 0,"aria-controls":null==f?void 0:f.id,"aria-haspopup":"popup"===(null==f?void 0:f.type)||void 0},v?{href:v,target:"_blank",onKeyUp:Xr,role:"button"}:{type:"button"})})({appId:h,buttonId:t,className:qr(t,u,i),onClick:e=>{if(!a){if("popup"===(null==L?void 0:L.type)){var r=""===e.nativeEvent.pointerType;S(r?"first":null),P||$r(O,t,C),_(e=>!e)}p&&p(e)}},onKeyUp:N,buttonRefs:O,isDisabled:a,isPressed:l,isExpanded:s,isPanelOpen:d,isPopupOpen:P,controlledElement:L,href:g}),x=w(D,Kr(Kr({},B),{},{children:[k&&E(Dr,{id:r,svgContent:n,isMenu:M}),i&&E("span",{children:o})]}));return w("div",{className:Yr(t,i),"data-button-slot":I,style:c?{display:"none"}:void 0,children:[i?x:E(zr,{content:o,children:x}),I&&E(ln,{slot:I}),P&&E(Ur,{popupMenuId:L.id,buttonId:t,startPos:R,menuRef:A,items:m,setIsOpen:_,buttonRect:T})]})};function Qr(e){var t,r,{btn:n,appState:o,appConfig:i,evaluateProp:a}=e,[l,s]=n,c=null!==(t=s[o.breakpoint])&&void 0!==t?t:{},d=function(e,t,r){var[,n]=e,o=!(!n.panelId||!t.openPanels[n.panelId]);return e=>{if("function"!=typeof n.onClick){if(n.panelId){var i=e.currentTarget;t.dispatch({type:o?"CLOSE_PANEL":"OPEN_PANEL",payload:o?n.panelId:{panelId:n.panelId,props:{triggeringElement:i}}})}}else n.onClick(e,r(e=>e,n.pluginId))}}(n,o,a),u=!(!s.panelId||!o.openPanels[s.panelId]);return E(Jr,{buttonId:l,iconId:a(s.iconId,s.pluginId),iconSvgContent:a(s.iconSvgContent,s.pluginId),variant:s.variant,label:a(s.label,s.pluginId),href:a(s.href,s.pluginId),showLabel:null===(r=c.showLabel)||void 0===r||r,isDisabled:o.disabledButtons.has(l),isHidden:o.hiddenButtons.has(l),isPressed:void 0!==s.isPressed||s.pressedWhen?o.pressedButtons.has(l):void 0,isExpanded:void 0!==s.isExpanded||s.expandedWhen?o.expandedButtons.has(l):void 0,isPanelOpen:u,onClick:d,panelId:s.panelId,menuItems:s.menuItems,idPrefix:i.id},l)}function en(e){var{slot:t,appState:r,appConfig:n,evaluateProp:o}=e,{buttonConfig:i,breakpoint:a}=r,l=function(e){var{appState:t,buttonConfig:r,slot:n,evaluateProp:o}=e,{breakpoint:i,mode:a}=t;return r?Object.entries(r).filter(e=>{var r,l,[s,c]=e,d=c[i];if(c.isMenuItem)return!1;if("function"==typeof c.excludeWhen&&o(c.excludeWhen,c.pluginId))return!1;if(c.includeModes&&(null===(r=c.includeModes)||void 0===r||!r.includes(a)))return!1;if(null!==(l=c.excludeModes)&&void 0!==l&&l.includes(a))return!1;if(!1===c.inline&&!t.isFullscreen)return!1;if(c.panelId){var u,p=null===(u=t.panelConfig)||void 0===u||null===(u=u[c.panelId])||void 0===u?void 0:u[i];if(!0===(null==p?void 0:p.open)&&!1===(null==p?void 0:p.dismissible))return!1}return!((null==d?void 0:d.slot)!==n||!ue.button.includes(d.slot))}):[]}({appState:r,buttonConfig:i,slot:t,evaluateProp:o});if(!l.length)return[];var s=new Map,c=[];l.forEach(e=>{var[t,r]=e,{group:n}=r;if(null!=n){var o=function(e){var t;return null==e?null:"string"==typeof e?e:null!==(t=e.name)&&void 0!==t?t:null}(n),i=function(e){var t,r;return e?"string"==typeof e?e:null!==(t=null!==(r=e.label)&&void 0!==r?r:e.name)&&void 0!==t?t:"":""}(n),a=function(e){var t;return e&&"string"!=typeof e&&null!==(t=e.order)&&void 0!==t?t:0}(n);s.has(o)?s.get(o):s.set(o,{label:i,order:a,members:[]}),s.get(o).members.push([t,r])}else c.push([t,r])});var d=[];for(var u of c){var p,f,[v,m]=u,b=null!==(p=null===(f=m[a])||void 0===f?void 0:f.order)&&void 0!==p?p:0;d.push({id:v,type:"button",order:b,element:Qr({btn:u,appState:r,appConfig:n,evaluateProp:o})})}for(var[g,{label:h,order:y,members:O}]of s)if(O.length<2){var P,w=O[0],[_,R]=w,j=y||(null===(P=R[a])||void 0===P?void 0:P.order)||0;d.push({id:_,type:"button",order:j,element:Qr({btn:w,appState:r,appConfig:n,evaluateProp:o})})}else{var S=[...O].sort((e,t)=>{var r,n,o,i;return(null!==(r=null===(n=e[1][a])||void 0===n?void 0:n.order)&&void 0!==r?r:0)-(null!==(o=null===(i=t[1][a])||void 0===i?void 0:i.order)&&void 0!==o?o:0)});d.push({id:"group-".concat(g),type:"group",order:y,element:E("div",{role:"group","aria-label":h,className:"im-c-button-group",children:S.map(e=>Qr({btn:e,appState:r,appConfig:n,evaluateProp:o}))},"group-".concat(g))})}return d}var tn=["evaluateProp"];function rn(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 nn(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?rn(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function on(e){var{evaluateProp:r}=e,n=t(e,tn),o=function(e){var{slot:t,appState:r,evaluateProp:n}=e,{breakpoint:o,mode:i,pluginRegistry:a,controlConfig:l}=r;return Object.values(l).filter(e=>{var n,a,l,s;if(Rr(e))return!1;var c=e[o];if(!c)return!1;var d=ue.control.includes(c.slot),u=null===(n=null===(a=e.includeModes)||void 0===a?void 0:a.includes(i))||void 0===n||n,p=null!==(l=null===(s=e.excludeModes)||void 0===s?void 0:s.includes(i))&&void 0!==l&&l;return!(!1===e.inline&&!r.isFullscreen)&&u&&!p&&c.slot===t&&d}).map(e=>{var t,r,i,l=a.registeredPlugins.find(t=>{var r;return null===(r=t.manifest)||void 0===r||null===(r=r.controls)||void 0===r?void 0:r.some(t=>t.id===e.id)}),s=null==l?void 0:l.id;if(e.html)i=E("div",{className:"im-c-control",dangerouslySetInnerHTML:{__html:n(e.html,s)}},e.id);else{var c=Rt(e.render,{pluginId:s,pluginConfig:null==l?void 0:l.config});i=E(c,{},e.id)}return{id:e.id,type:"control",order:null!==(t=null===(r=e[o])||void 0===r?void 0:r.order)&&void 0!==t?t:0,element:i}})}(nn({evaluateProp:r},n)),i=[...o,...xr(nn({evaluateProp:r},n)),...en(nn({evaluateProp:r},n))],a=i.filter(e=>null==e.order||0===e.order),l=i.filter(e=>null!=e.order&&0!==e.order);l.sort((e,t)=>e.order-t.order);var s=[...a];for(var c of l){var d=Math.min(Math.max(c.order-1,0),s.length);s.splice(d,0,c)}return s}var an=e=>{var{children:t}=e,{openPanels:r,panelConfig:n,breakpoint:o}=yt(),i=["im-c-panel","im-c-actions",!d.Children.toArray(t).find(e=>{var t,r;return!1===(null===(t=e.props)||void 0===t?void 0:t.isHidden)&&"touch"!==(null===(r=e.props)||void 0===r?void 0:r.variant)})&&"im-c-actions--hidden",Object.keys(r).some(e=>{var t;return"mobile"===o&&"drawer"===(null===(t=n[e])||void 0===t||null===(t=t[o])||void 0===t?void 0:t.slot)})&&"im-c-actions--border-top"].filter(Boolean).join(" ");return E("div",{className:i,children:t})},ln=e=>{var{slot:t}=e,r=on({slot:t,appConfig:j(),appState:yt(),evaluateProp:Mt()});return r.length?E(_,{children:"actions"===t?E(an,{slot:"actions",children:r.map(e=>e.element)}):E(_,{children:r.map(e=>e.element)})}):null},sn=(e,t,r,n,o)=>{h(()=>{var o=e.current;if(r){var i=((e,t)=>{var r={side:t.sideRef,banner:t.bannerRef,"top-left":t.topLeftColRef,"top-right":t.topRightColRef,"left-top":t.leftTopRef,"left-bottom":t.leftBottomRef,middle:t.middleRef,"right-top":t.rightTopRef,"right-bottom":t.rightBottomRef,"bottom-right":t.bottomRightRef,drawer:t.drawerRef,actions:t.actionsRef,modal:t.modalRef};if(null!=e&&e.endsWith("-button")){var n=document.querySelector('[data-button-slot="'.concat(e,'"]'));return n?{current:n}:null}return r[e]||null})(t,n);if(null!=i&&i.current){var a=i.current.querySelector(":scope > .im-o-app__modal-backdrop");a?i.current.insertBefore(o,a):i.current.appendChild(o),o.style.display=""}}else{var l,s;if(o.parentElement===(null===(l=n.modalRef)||void 0===l?void 0:l.current))null===(s=n.appContainerRef)||void 0===s||null===(s=s.current)||void 0===s||s.appendChild(o);o.style.display="none"}return()=>{o.style.display="none"}},[r,t,n,o,e])},cn=e=>{var{panelId:t,config:r,isOpen:n,openPanelProps:o,allowedModalPanelId:i,appState:a}=e,l=v(null),{breakpoint:s,mode:c,isFullscreen:d,layoutRefs:u}=a,p=r[s],f=p?wr(p,s):null,m=(()=>{if(!n||!p||!f)return!1;var e=f.endsWith("-button");if(!(ue.panel.includes(f)||e))return!1;var o=p.modal&&t!==i,a=!1===r.inline&&!d,l=!_r(r,c);return!(o||a||l)})();return sn(l,f,m,u,s),E(Lr,{panelId:t,panelConfig:r,props:o,html:r.html,label:r.label,isOpen:n,rootRef:l})},dn=e=>{var{control:t,appState:r}=e,n=v(null),{breakpoint:o,mode:i,isFullscreen:a,layoutRefs:l}=r,s=t[o],c=((e,t)=>{var{breakpoint:r,mode:n,isFullscreen:o}=t,i=e[r];return!(!i||!ue.control.includes(i.slot)||!_r(e,n)||!1===e.inline&&!o)})(t,{breakpoint:o,mode:i,isFullscreen:a}),d=(null==s?void 0:s.slot)||null;sn(n,d,c,l,o);var u=g(()=>({__html:t.html}),[t.html]);return E("div",{ref:n,className:"im-c-control",style:{display:"none"},dangerouslySetInnerHTML:u})},un=()=>{var e=yt(),{panelConfig:t={},controlConfig:r={},openPanels:n={},breakpoint:o}=e,i=g(()=>Object.entries(t).filter(e=>{var[t,r]=e;return Rr(r)}),[t]),a=g(()=>Object.values(r).filter(e=>Rr(e)),[r]),l=g(()=>{var e=Object.entries(n).filter(e=>{var r,[n]=e,i=null===(r=t[n])||void 0===r?void 0:r[o];return null==i?void 0:i.modal});return e.length>0?e[e.length-1][0]:null},[n,t,o]);return i.length||a.length?w(_,{children:[i.map(t=>{var r,[o,i]=t;return E(cn,{panelId:o,config:i,isOpen:!!n[o],openPanelProps:null===(r=n[o])||void 0===r?void 0:r.props,allowedModalPanelId:l,appState:e},o)}),a.map(t=>E(dn,{control:t,appState:e},t.id))]}):null};function pn(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 fn(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?pn(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var vn=()=>{var{id:e}=j(),{breakpoint:t,interfaceType:r,preferredColorScheme:n,layoutRefs:o,isLayoutReady:i,hasExclusiveControl:a,isFullscreen:l}=yt(),{mapStyle:s}=Ot();return Or(),function(){var{interfaceType:e,layoutRefs:t}=yt(),r=v(e);r.current=e,f(()=>{if(t.appContainerRef.current)return document.addEventListener("focusin",e),document.addEventListener("focusout",n),document.addEventListener("pointerdown",o),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",n),document.removeEventListener("pointerdown",o)};function e(e){e.target.dataset.focusVisible="keyboard"===r.current}function n(e){delete e.target.dataset.focusVisible}function o(){delete document.activeElement.dataset.focusVisible}},[t.appContainerRef])}(),w("div",{id:"".concat(e,"-im-app"),className:["im-o-app","im-o-app--".concat(t),"im-o-app--".concat(r),"im-o-app--".concat(l?"fullscreen":"inline"),"im-o-app--".concat((null==s?void 0:s.appColorScheme)||n,"-app"),a&&"im-o-app--exclusive-control"].filter(Boolean).join(" "),style:fn({backgroundColor:(null==s?void 0:s.backgroundColor)||void 0},et(s)),ref:o.appContainerRef,children:[E(br,{keyboardHintPortalRef:o.topRef}),w("div",{className:"im-o-app__overlay".concat(i?"":" im-o-app__overlay--not-ready"),children:[E("div",{className:"im-o-app__side",ref:o.sideRef,children:E(ln,{slot:de.SIDE})}),w("div",{className:"im-o-app__main",ref:o.mainRef,children:[["mobile","tablet"].includes(t)&&E("div",{className:"im-o-app__banner",ref:o.bannerRef,children:E(ln,{slot:de.BANNER})}),w("div",{className:"im-o-app__top",ref:o.topRef,children:[E("div",{className:"im-o-app__top-col",ref:o.topLeftColRef,children:E(ln,{slot:de.TOP_LEFT})}),w("div",{className:"im-o-app__top-col",children:[E(ln,{slot:de.TOP_MIDDLE}),["desktop"].includes(t)&&E("div",{className:"im-o-app__banner",ref:o.bannerRef,children:E(ln,{slot:de.BANNER})})]}),E("div",{className:"im-o-app__top-col",ref:o.topRightColRef,children:E(ln,{slot:de.TOP_RIGHT})})]}),w("div",{className:"im-o-app__left",ref:o.leftRef,children:[E("div",{className:"im-o-app__left-top",ref:o.leftTopRef,children:E(ln,{slot:de.LEFT_TOP})}),E("div",{className:"im-o-app__left-bottom",ref:o.leftBottomRef,children:E(ln,{slot:de.LEFT_BOTTOM})})]}),E("div",{className:"im-o-app__middle",ref:o.middleRef,children:E(ln,{slot:de.MIDDLE})}),w("div",{className:"im-o-app__right",ref:o.rightRef,children:[E("div",{className:"im-o-app__right-top",ref:o.rightTopRef,children:E(ln,{slot:de.RIGHT_TOP})}),E("div",{className:"im-o-app__right-bottom",ref:o.rightBottomRef,children:E(ln,{slot:de.RIGHT_BOTTOM})})]}),w("div",{className:"im-o-app__bottom",ref:o.bottomRef,children:[w("div",{className:"im-o-app__bottom-col",children:[E(Pr,{}),E("div",{className:"im-o-app__bottom-left",children:E(ln,{slot:de.BOTTOM_LEFT})})]}),w("div",{className:"im-o-app__bottom-col",children:[E("div",{className:"im-o-app__bottom-right",ref:o.bottomRightRef,children:E(ln,{slot:de.BOTTOM_RIGHT})}),E("div",{className:"im-o-app__attributions",ref:o.attributionsRef,children:E(Er,{})})]})]}),E("div",{className:"im-o-app__drawer",ref:o.drawerRef,children:E(ln,{slot:de.DRAWER})}),E("div",{className:"im-o-app__actions",ref:o.actionsRef,children:E(ln,{slot:de.ACTIONS})}),w("div",{className:"im-o-app__modal",ref:o.modalRef,children:[E(ln,{slot:de.MODAL}),E("div",{className:"im-o-app__modal-backdrop"})]})]})]}),E(un,{})]})},mn=e=>(f(()=>{c(),e.eventBus.emit(i.APP_READY)},[]),E(Ne,{options:e,children:E(Ue,{options:e,children:E(ft,{eventBus:e.eventBus,children:w(gt,{children:[E(Nt,{}),E(vn,{})]})})})})),bn=["id","load","manifest"],gn=["InitComponent","api","reducer"],hn=["MapProvider","mapProviderConfig","mapFramework","plugins"];function yn(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 On(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?yn(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Pn=new WeakMap,En=new WeakMap,wn=new WeakMap,_n=e=>{var t,r,n=wn.get(e);if(!n){var o=Y(),i=(r={},{registerPanel:e=>{r=Q(r,e)},addPanel:(e,t)=>(r=ee(r,e,t))[e],removePanel:e=>{r=te(r,e)},getPanelConfig:()=>r,clear:()=>{r={}}}),a=(t={},{registerControl:e=>{t=oe(t,e)},addControl:(e,r)=>(t=ie(t,e,r))[e],getControlConfig:()=>t,clear:()=>{t={}}});n={buttonRegistry:o,panelRegistry:i,controlRegistry:a,pluginRegistry:ye({registerButton:o.registerButton,registerPanel:i.registerPanel,registerControl:a.registerControl})},wn.set(e,n)}return n},Rn=function(){var e=r(function*(e,r){for(var n of e)if("function"==typeof n.load){var o=yield n.load(),{id:i,load:a,manifest:l}=n,s=t(n,bn),{InitComponent:c,api:d,reducer:u}=o;r({id:i,InitComponent:c,api:d,reducer:u,config:s,manifest:Ee(t(o,gn),l),_originalPlugin:n})}});return function(t,r){return e.apply(this,arguments)}}();function jn(e,t){return Sn.apply(this,arguments)}function Sn(){return Sn=r(function*(e,r){var o,{MapProvider:a,mapProviderConfig:l,mapFramework:s,plugins:c=[]}=r,d=t(r,hn),{eventBus:u}=d,p=En.get(e);p||(p=new a({mapFramework:s,mapProviderConfig:l,events:i,eventBus:u}),En.set(e,p)),null!==(o=p.capabilities)&&void 0!==o&&o.supportedShortcuts&&function(){A=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[])}(p.capabilities.supportedShortcuts);var{buttonRegistry:f,panelRegistry:v,controlRegistry:m,pluginRegistry:b}=_n(e),{registerPlugin:g}=b;b.clear(),g({id:"appConfig",manifest:B});var h=Pn.get(e);h||(h=n(e),Pn.set(e,h));var y={_root:h,on:u.on,off:u.off,emit:u.emit,unmount(){var t,r;h.unmount(),Pn.delete(e),null===(t=(r=p).destroyMap)||void 0===t||t.call(r),En.delete(e),b.clear()}};return yield Rn(c,g),h.render(E(mn,On(On({},d),{},{buttonRegistry:f,panelRegistry:v,controlRegistry:m,pluginRegistry:b,mapProvider:p}))),y}),Sn.apply(this,arguments)}export{jn as initialiseApp};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import r from"@babel/runtime/helpers/asyncToGenerator";import{createRoot as n}from"preact/compat/client";import{g as o,E as i,s as a,r as l,t as c,a as s}from"./im-shell.js";import u,{useContext as d,createContext as p,useEffect as f,useRef as v,useReducer as m,useCallback as b,useMemo as g,useLayoutEffect as h,useState as y,createPortal as O,cloneElement as P}from"preact/compat";import{jsx as E,jsxs as w,Fragment as _}from"preact/jsx-runtime";var R=p(null);function j(){return d(R)}var S=[{id:"showKeyboardHelp",group:"General",title:"Show keyboard help",command:"<kbd>Alt</kbd> + <kbd>K</kbd>",enabled:!0},{id:"selectControl",group:"General",title:"Select a map control",command:"<kbd>Tab</kbd> or <kbd>Shift</kbd> + <kbd>Tab</kbd>",enabled:!0},{id:"moveLarge",group:"Navigation",title:"Move in large steps",command:"<kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!0},{id:"nudgeMap",group:"Navigation",title:"Nudge map",command:"<kbd>Shift</kbd> + <kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!1},{id:"zoomLarge",group:"Navigation",title:"Zoom in large steps",command:"<kbd>+</kbd> or <kbd>-</kbd>",enabled:!0},{id:"nudgeZoom",group:"Navigation",title:"Nudge zoom",command:"<kbd>Shift</kbd> + <kbd>+</kbd> or <kbd>-</kbd>",enabled:!1},{id:"highlightLabelAtCenter",group:"Labels",title:"Highlight label at centre",command:"<kbd>Alt</kbd> + <kbd>Enter</kbd>",enabled:!1,requiredConfig:["readMapText"]},{id:"highlightNextLabel",group:"Labels",title:"Highlight nearby label",command:"<kbd>Alt</kbd> + <kbd>→</kbd>, <kbd>←</kbd>, <kbd>↑</kbd> or <kbd>↓</kbd>",enabled:!1,requiredConfig:["readMapText"]}],T=[],C=new Set,A=new Set,D=()=>{var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[...S.filter(t=>!!A.has(t.id)&&(!t.requiredConfig||t.requiredConfig.every(t=>e[t]))),...T]}(j()).reduce((e,t)=>(e[t.group]=e[t.group]||[],e[t.group].push(t),e),{});return E("div",{className:"im-c-keyboard-help",children:Object.entries(e).map(e=>{var[t,r]=e;return E("div",{className:"im-c-keyboard-help__group",children:E("dl",{className:"im-c-keyboard-help__list",children:r.map(e=>w("div",{className:"im-c-keyboard-help__item",children:[E("dt",{className:"im-c-keyboard-help__title",children:e.title}),E("dd",{className:"im-c-keyboard-help__description",dangerouslySetInnerHTML:{__html:e.command}})]},e.id))})},t)})})};function M(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 k(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?M(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var I={slot:"middle",open:!1,dismissible:!0,modal:!0},L={slot:"right-top",showLabel:!1},N={slot:"top-left",showLabel:!1},B={buttons:[{id:"exit",label:"Exit",iconId:"close",onClick:(e,t)=>{var{services:r}=t;return r.closeApp()},excludeWhen:e=>{var{appConfig:t,appState:r}=e;return!t.hasExitButton||!r.isFullscreen},mobile:N,tablet:N,desktop:N},{id:"fullscreen",label:()=>"".concat(document.fullscreenElement?"Exit":"Enter"," fullscreen"),iconId:()=>document.fullscreenElement?"minimise":"maximise",onClick:(e,t)=>{var{appState:r}=t,n=r.layoutRefs.appContainerRef.current;document.fullscreenElement?document.exitFullscreen():n.requestFullscreen()},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableFullscreen||t.isFullscreen},mobile:L,tablet:L,desktop:L},{id:"zoomIn",group:{name:"zoom",label:"Zoom controls",order:0},label:"Zoom in",iconId:"plus",onClick:(e,t)=>{var{mapProvider:r,appConfig:n}=t;return r.zoomIn(n.zoomDelta)},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableZoomControls||"touch"===t.interfaceType},enableWhen:e=>{var{mapState:t}=e;return!t.isAtMaxZoom},mobile:L,tablet:L,desktop:L},{id:"zoomOut",group:{name:"zoom",label:"Zoom controls",order:0},label:"Zoom out",iconId:"minus",onClick:(e,t)=>{var{mapProvider:r,appConfig:n}=t;return r.zoomOut(n.zoomDelta)},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableZoomControls||"touch"===t.interfaceType},enableWhen:e=>{var{mapState:t}=e;return!t.isAtMinZoom},mobile:L,tablet:L,desktop:L}],panels:[{id:"keyboardHelp",label:"Keyboard shortcuts",mobile:k({},I),tablet:k(k({},I),{},{width:"500px"}),desktop:k(k({},I),{},{width:"500px"}),render:()=>E(D,{})}],icons:[{id:"maximise",svgContent:'<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>'},{id:"minimise",svgContent:'<path d="m14 10 7-7"/><path d="M20 10h-6V4"/><path d="m3 21 7-7"/><path d="M4 14h6v6"/>'},{id:"plus",svgContent:'<path d="M5 12h14"/><path d="M12 5v14"/>'},{id:"minus",svgContent:'<path d="M5 12h14"/>'},{id:"chevron",svgContent:'<path d="m6 9 6 6 6-6"/>'}]},x={slot:"right-top",showLabel:!0},H={label:"Button",mobile:x,tablet:x,desktop:x},z={label:"Panel",focus:!0,mobile:{slot:"drawer",open:!0,dismissible:!0,modal:!1,showLabel:!0},tablet:{slot:"left-top",open:!0,dismissible:!0,modal:!1,showLabel:!0},desktop:{slot:"left-top",open:!0,dismissible:!0,modal:!1,showLabel:!0},render:null,html:null},W={label:"Control",mobile:{slot:"drawer"},tablet:{slot:"top-left"},desktop:{slot:"top-left"}},V={small:1,medium:1.5,large:2};function F(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}var G=(t,r)=>{var n=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?F(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t);for(var o in r)"object"!=typeof r[o]||Array.isArray(r[o])||null===r[o]?n[o]=r[o]:n[o]=G(t[o]||{},r[o]);return n};function U(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 Z(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?U(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var K=(e,t)=>Z(Z({},e),t),q=(e,t,r)=>{var n=G(H,r);return Z(Z({},e),{},{[t]:n})};function Y(){var e={};return{registerButton:t=>{e=K(e,t)},addButton:(t,r)=>(e=q(e,t,r),t),getButtonConfig:t=>((e,t)=>t?Object.fromEntries(Object.entries(e).filter(e=>{var[r,n]=e;return n.pluginId===t})):e)(e,t),clear:()=>{e={}}}}function X(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function $(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 J(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?$(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Q=(e,t)=>J(J({},e),t),ee=(e,t,r)=>{var n=G(z,r);return J(J({},e),{},{[t]:J(J({},n),{},{html:n.html,render:n.render})})},te=(e,r)=>{var{[r]:n}=e;return t(e,[r].map(X))};function re(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 ne(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?re(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var oe=(e,t)=>ne(ne({},e),t),ie=(e,t,r)=>{var n=G(W,r);return ne(ne({},e),{},{[t]:ne({id:t},n)})};function ae(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 le(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ae(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var ce={close:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'},se=()=>ce,ue=Object.freeze({SIDE:"side",BANNER:"banner",TOP_LEFT:"top-left",TOP_MIDDLE:"top-middle",TOP_RIGHT:"top-right",LEFT_TOP:"left-top",LEFT_BOTTOM:"left-bottom",MIDDLE:"middle",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",DRAWER:"drawer",ACTIONS:"actions",MODAL:"modal"}),de=Object.freeze({control:[ue.BANNER,ue.TOP_LEFT,ue.TOP_RIGHT,ue.MIDDLE,ue.RIGHT_BOTTOM,ue.BOTTOM_RIGHT,ue.DRAWER,ue.ACTIONS],panel:[ue.SIDE,ue.BANNER,ue.LEFT_TOP,ue.LEFT_BOTTOM,ue.MIDDLE,ue.RIGHT_TOP,ue.RIGHT_BOTTOM,ue.DRAWER,ue.MODAL],button:[ue.TOP_LEFT,ue.TOP_MIDDLE,ue.TOP_RIGHT,ue.LEFT_TOP,ue.LEFT_BOTTOM,ue.RIGHT_TOP,ue.RIGHT_BOTTOM,ue.BOTTOM_LEFT,ue.BOTTOM_RIGHT,ue.ACTIONS]}),pe="[interactive-map]",fe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.warn(pe,...t)};function ve(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 me(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ve(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var be=e=>Array.isArray(e)?e:[e],ge=["mobile","tablet","desktop"];function he(e,t){var r=de[t];ge.forEach(n=>{var o,i=null===(o=e[n])||void 0===o?void 0:o.slot;!i||r.includes(i)||"panel"===t&&i.endsWith("-button")||fe("".concat(t,' "').concat(e.id,'" has invalid slot "').concat(i,'" at breakpoint "').concat(n,'". Allowed slots: ').concat(r.join(", "),"."))})}function ye(e){var{registerButton:t,registerPanel:r,registerControl:n}=e,o=[];return{registeredPlugins:o,registerPlugin:function(e){var i,a,{manifest:l}=e,c={pluginId:e.id,includeModes:null===(i=e.config)||void 0===i?void 0:i.includeModes,excludeModes:null===(a=e.config)||void 0===a?void 0:a.excludeModes};l.buttons&&be(l.buttons).forEach(e=>{var r;he(e,"button"),t({[e.id]:me(me({},c),e)}),null==e||null===(r=e.menuItems)||void 0===r||r.forEach(e=>{t({[e.id]:me(me(me({},c),e),{},{isMenuItem:!0})})})}),l.panels&&be(l.panels).forEach(e=>{he(e,"panel"),r({[e.id]:me(me({},c),e)})}),l.controls&&be(l.controls).forEach(e=>{he(e,"control"),n({[e.id]:me(me({},c),e)})}),l.icons&&be(l.icons).forEach(e=>(e=>{ce=le(le({},ce),e)})({[e.id]:e.svgContent})),l.keyboardShortcuts&&be(l.keyboardShortcuts).forEach(e=>(e=>{var{shortcut:t}=e;C.has(t.id)||(C.add(t.id),T.push(t))})(me(me({},c),{},{shortcut:e}))),o.push(e)},clear:function(){o.length=0}}}function Oe(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 Pe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Oe(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]);var r=new Map(e.map(e=>[e.id,e]));return t.forEach(e=>{null!=e&&e.id&&(r.has(e.id)?r.set(e.id,Pe(Pe({},r.get(e.id)),e)):r.set(e.id,e))}),Array.from(r.values())},n=Pe(Pe({},e),t);return(e.buttons||t.buttons)&&(n.buttons=r(e.buttons,t.buttons)),(e.panels||t.panels)&&(n.panels=r(e.panels,t.panels)),(e.controls||t.controls)&&(n.controls=r(e.controls,t.controls)),(e.icons||t.icons)&&(n.icons=r(e.icons,t.icons)),n}function we(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return Object.keys(e).forEach(o=>{var i,a=e[o][t];null!==(i=null==a?void 0:a.open)&&void 0!==i&&i&&(n[o]=r[o]||{props:{}})}),n}function _e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function Re(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 je(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Se(e,t,r,n,o){var i,a=e.panelConfig||e.panelRegistry.getPanelConfig(),l=null===(i=a[t])||void 0===i?void 0:i[r],c=!!l.exclusive&&!l.modal,s=!!l.modal,u=Object.fromEntries(Object.entries(e.openPanels).filter(e=>{var t,[n]=e;return!(null!==(t=a[n])&&void 0!==t&&null!==(t=t[r])&&void 0!==t&&t.exclusive)}));return je(je(je({},c?{}:u),s?e.openPanels:{}),{},{[t]:je({props:n},o&&{focusOnOpen:!0})})}var Te={SET_BREAKPOINT:(e,t)=>{var r,{behaviour:n,hybridWidth:i,maxMobileWidth:a}=t,l=Object.keys(e.openPanels),c=l[l.length-1],s="hybrid"===n?e.isFullscreen:o({behaviour:n,hybridWidth:i,maxMobileWidth:a}),u=c?Se(e,c,t.breakpoint,(null===(r=e.openPanels[c])||void 0===r?void 0:r.props)||{}):{},d=e.panelConfig||e.panelRegistry.getPanelConfig(),p=Object.fromEntries(Object.entries(d).filter(e=>{var[r,n]=e,o=n[t.breakpoint];return!0===(null==o?void 0:o.open)&&!1===(null==o?void 0:o.dismissible)&&!u[r]}).map(t=>{var[r]=t;return[r,e.openPanels[r]||{props:{}}]}));return je(je({},e),{},{breakpoint:t.breakpoint,isFullscreen:s,previousOpenPanels:e.openPanels,openPanels:je(je({},u),p)})},SET_MEDIA:(e,t)=>je(je({},e),t),SET_HYBRID_FULLSCREEN:(e,t)=>je(je({},e),{},{isFullscreen:t}),SET_INTERFACE_TYPE:(e,t)=>e.interfaceType===t?e:je(je({},e),{},{interfaceType:t}),SET_MODE:(e,t)=>{var r=e.panelConfig||e.panelRegistry.getPanelConfig();return je(je({},e),{},{mode:t,previousMode:e.mode,openPanels:we(r,e.breakpoint,e.openPanels)})},PLUGINS_EVALUATED:e=>e.arePluginsEvaluated?e:je(je({},e),{},{arePluginsEvaluated:!0}),CLEAR_PLUGINS_EVALUATED:e=>e.arePluginsEvaluated?je(je({},e),{},{arePluginsEvaluated:!1}):e,SET_SAFE_ZONE_INSET:(e,t)=>{var{safeZoneInset:r,syncMapPadding:n=!0}=t;return((e,t)=>{if(e===t)return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t)return!1;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>Object.is(e[r],t[r]))})(e.safeZoneInset,r)?e:je(je({},e),{},{safeZoneInset:r,syncMapPadding:n,isLayoutReady:!0})},REVERT_MODE:e=>{var t=e.panelConfig||e.panelRegistry.getPanelConfig();return je(je({},e),{},{mode:e.previousMode,previousMode:e.mode,openPanels:we(t,e.breakpoint,e.openPanels)})},OPEN_PANEL:(e,t)=>{var{panelId:r,props:n={},focusOnOpen:o}=t;return je(je({},e),{},{previousOpenPanels:e.openPanels,openPanels:Se(e,r,e.breakpoint,n,o)})},CLOSE_PANEL:(e,r)=>{var n=e.openPanels,{[r]:o}=n,i=t(n,[r].map(_e));return je(je({},e),{},{previousOpenPanels:e.openPanels,openPanels:i})},CLOSE_ALL_PANELS:e=>je(je({},e),{},{previousOpenPanels:e.openPanels,openPanels:{}}),RESTORE_PREVIOUS_PANELS:e=>je(je({},e),{},{openPanels:e.previousOpenPanels||{},previousOpenPanels:e.openPanels}),TOGGLE_APP_VISIBLE:(e,t)=>je(je({},e),{},{appVisible:t}),TOGGLE_HAS_EXCLUSIVE_CONTROL:(e,t)=>je(je({},e),{},{hasExclusiveControl:t}),TOGGLE_BUTTON_DISABLED:(e,t)=>{var{id:r,isDisabled:n}=t,o=new Set(e.disabledButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{disabledButtons:o})},TOGGLE_BUTTON_HIDDEN:(e,t)=>{var{id:r,isHidden:n}=t,o=new Set(e.hiddenButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{hiddenButtons:o})},TOGGLE_BUTTON_PRESSED:(e,t)=>{var{id:r,isPressed:n}=t,o=new Set(e.pressedButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{pressedButtons:o})},TOGGLE_BUTTON_EXPANDED:(e,t)=>{var{id:r,isExpanded:n}=t,o=new Set(e.expandedButtons);return n?o.add(r):o.delete(r),je(je({},e),{},{expandedButtons:o})},REGISTER_BUTTON:(e,t)=>je(je({},e),{},{buttonConfig:K(e.buttonConfig,t)}),ADD_BUTTON:(e,t)=>{var r,{id:n,config:o}=t,i=q(e.buttonConfig,n,o),a=new Set(e.hiddenButtons);o.isHidden&&a.add(n);var l=new Set(e.disabledButtons);o.isDisabled&&l.add(n);var c=new Set(e.pressedButtons);o.isPressed&&c.add(n);var s=new Set(e.expandedButtons);return o.isExpanded&&s.add(n),null!==(r=e.buttonRegistry)&&void 0!==r&&r.addButton&&e.buttonRegistry.addButton(n,o),je(je({},e),{},{buttonConfig:i,hiddenButtons:a,disabledButtons:l,pressedButtons:c,expandedButtons:s})},REGISTER_PANEL:(e,t)=>je(je({},e),{},{panelConfig:Q(e.panelConfig,t)}),ADD_PANEL:(e,t)=>{var r,{id:n,config:o}=t,i=ee(e.panelConfig,n,o),a=i[n];null!==(r=e.panelRegistry)&&void 0!==r&&r.addPanel&&e.panelRegistry.addPanel(n,o);var l=null==a?void 0:a[e.breakpoint],c=null==l?void 0:l.open;return je(je({},e),{},{panelConfig:i,openPanels:c?Se(je(je({},e),{},{panelConfig:i}),n,e.breakpoint,{}):e.openPanels})},REMOVE_PANEL:(e,r)=>{var n,o=r,i=e.openPanels,{[o]:a}=i,l=t(i,[o].map(_e));return null!==(n=e.panelRegistry)&&void 0!==n&&n.removePanel&&e.panelRegistry.removePanel(o),je(je({},e),{},{panelConfig:te(e.panelConfig,o),openPanels:l})},REGISTER_CONTROL:(e,t)=>je(je({},e),{},{controlConfig:oe(e.controlConfig,t)}),ADD_CONTROL:(e,t)=>{var r,{id:n,config:o}=t,i=ie(e.controlConfig,n,o);return null!==(r=e.controlRegistry)&&void 0!==r&&r.addControl&&e.controlRegistry.addControl(n,o),je(je({},e),{},{controlConfig:i})}};function Ce(){return{preferredColorScheme:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",prefersReducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches}}var Ae=(e,t)=>{var{type:r,payload:n}=t,o=Te[r];return o?o(e,n):e},De=["mobile","tablet","desktop"];function Me(e,t,r,n){var{type:o,payload:a}=e;if("CLOSE_PANEL"===o&&queueMicrotask(()=>{n.emit(i.APP_PANEL_CLOSED,{panelId:a})}),"CLOSE_ALL_PANELS"===o&&queueMicrotask(()=>{Object.keys(t.openPanels).forEach(e=>{n.emit(i.APP_PANEL_CLOSED,{panelId:e})})}),"OPEN_PANEL"===o){var{panelId:l,props:c}=a,s=function(e,t,r,n){var o,i=null===(o=n[e])||void 0===o?void 0:o[r],a=!(null==i||!i.exclusive||null!=i&&i.modal),l=!(null==i||!i.modal),c=[];if(l)return c;var s=Object.keys(t);return a?s.forEach(e=>{var t,o=null===(t=n[e])||void 0===t?void 0:t[r];null!=o&&o.exclusive||c.push(e)}):s.forEach(e=>{var t,o=null===(t=n[e])||void 0===t?void 0:t[r];null==o||!o.exclusive||null!=o&&o.modal||c.push(e)}),c}(l,t.openPanels,t.breakpoint,r);queueMicrotask(()=>{s.forEach(e=>{n.emit(i.APP_PANEL_CLOSED,{panelId:e})}),n.emit(i.APP_PANEL_OPENED,{panelId:l,props:c})})}if("ADD_BUTTON"===o){var{id:u,config:d}=a,p=G(H,d);De.forEach(e=>{var t,r=null===(t=p[e])||void 0===t?void 0:t.slot;r&&!de.button.includes(r)&&fe('button "'.concat(u,'" has invalid slot "').concat(r,'" at breakpoint "').concat(e,'". Allowed slots: ').concat(de.button.join(", "),"."))})}if("ADD_CONTROL"===o){var{id:f,config:v}=a,m=G(W,v);De.forEach(e=>{var t,r=null===(t=m[e])||void 0===t?void 0:t.slot;r&&!de.control.includes(r)&&fe('control "'.concat(f,'" has invalid slot "').concat(r,'" at breakpoint "').concat(e,'". Allowed slots: ').concat(de.control.join(", "),"."))})}if("ADD_PANEL"===o){var{id:b,config:g}=a,h=G(z,g);De.forEach(e=>{var t,r=null===(t=h[e])||void 0===t?void 0:t.slot;!r||de.panel.includes(r)||r.endsWith("-button")||fe('panel "'.concat(b,'" has invalid slot "').concat(r,'" at breakpoint "').concat(e,'". Allowed slots: ').concat(de.panel.join(", "),"."))});var y=h[t.breakpoint];null!=y&&y.open&&queueMicrotask(()=>{var e=y.slot,{visibleGeometry:t}=h,r={panelId:b,slot:e};t&&(r.visibleGeometry=t),n.emit(i.APP_PANEL_OPENED,r)})}}function ke(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 Ie(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ke(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Le=p(null),Ne=e=>{var{options:t,children:r}=e,{pluginRegistry:n,buttonRegistry:l,panelRegistry:c,controlRegistry:s,eventBus:u,breakpointDetector:d}=t,p={appContainerRef:v(null),sideRef:v(null),mainRef:v(null),topRef:v(null),topLeftColRef:v(null),topRightColRef:v(null),leftRef:v(null),leftTopRef:v(null),leftBottomRef:v(null),middleRef:v(null),rightRef:v(null),rightTopRef:v(null),rightBottomRef:v(null),drawerRef:v(null),bottomRef:v(null),bottomRightRef:v(null),attributionsRef:v(null),actionsRef:v(null),bannerRef:v(null),modalRef:v(null),viewportRef:v(null)},h=v({}),[y,O]=m(Ae,(e=>{var{initialBreakpoint:t,initialInterfaceType:r,appColorScheme:n,autoColorScheme:i,pluginRegistry:a,buttonRegistry:l,panelRegistry:c,controlRegistry:s,mode:u}=e,{preferredColorScheme:d,prefersReducedMotion:p}=Ce(),f=o(e),v=we(c.getPanelConfig(),t);return{appVisible:null,isLayoutReady:!1,arePluginsEvaluated:!1,breakpoint:t,interfaceType:r,preferredColorScheme:i?d:n,prefersReducedMotion:p,isFullscreen:f,mode:u||null,previousMode:null,safeZoneInset:null,disabledButtons:new Set,hiddenButtons:new Set,pressedButtons:new Set,expandedButtons:new Set,hasExclusiveControl:!1,openPanels:v,previousOpenPanels:{},syncMapPadding:!0,pluginRegistry:a,buttonRegistry:l,panelRegistry:c,controlRegistry:s,buttonConfig:l.getButtonConfig(),panelConfig:c.getPanelConfig(),controlConfig:s.getControlConfig()}})(t)),P=b(e=>{var r=y.panelConfig||t.panelRegistry.getPanelConfig(),n=y;O(e),Me(e,n,r,u)},[y,t,u]);!function(e,t){var{appColorScheme:r,autoColorScheme:n,behaviour:o,hybridWidth:i,maxMobileWidth:a}=t;f(()=>{var t=[window.matchMedia("(prefers-color-scheme: dark)"),window.matchMedia("(prefers-reduced-motion: reduce)")];function l(){var{preferredColorScheme:t,prefersReducedMotion:o}=Ce();e({type:"SET_MEDIA",payload:{preferredColorScheme:n?t:r,prefersReducedMotion:o}})}t.forEach(e=>e.addEventListener("change",l));var c=null,s=null;if("hybrid"===o){var u=null!=i?i:a;c=window.matchMedia("(max-width: ".concat(u,"px)")),s=t=>{e({type:"SET_HYBRID_FULLSCREEN",payload:t.matches})},c.addEventListener("change",s)}return()=>{t.forEach(e=>e.removeEventListener("change",l)),c&&s&&c.removeEventListener("change",s)}},[e,o,i,a])}(O,t);var w=e=>{P({type:"SET_MODE",payload:e})},_=()=>{P({type:"REVERT_MODE"})};f(()=>{u.on(i.APP_SET_MODE,w),u.on(i.APP_REVERT_MODE,_);var e=d.subscribe(e=>{P({type:"SET_BREAKPOINT",payload:{behaviour:t.behaviour,breakpoint:e,hybridWidth:t.hybridWidth,maxMobileWidth:t.maxMobileWidth}})}),r=a(e=>{P({type:"SET_INTERFACE_TYPE",payload:e})});return()=>{u.off(i.APP_SET_MODE,w),u.off(i.APP_REVERT_MODE,_),e(),r()}},[]);var j=g(()=>Ie(Ie({},y),{},{dispatch:P,layoutRefs:p,buttonRefs:h,pluginRegistry:n,buttonRegistry:l,panelRegistry:c,controlRegistry:s}),[y,P]);return E(R.Provider,{value:t,children:E(Le.Provider,{value:j,children:r})})};function Be(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 xe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Be(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var He=(e,t)=>xe(xe({},e),t),ze={SET_MAP_READY:e=>xe(xe({},e),{},{isMapReady:!0}),MAP_MOVE:He,MAP_MOVE_END:He,MAP_FIRST_IDLE:He,SET_MAP_STYLE:(e,t)=>xe(xe({},e),{},{mapStyle:t}),SET_MAP_SIZE:(e,t)=>xe(xe({},e),{},{mapSize:t}),UPDATE_CROSS_HAIR:(e,t)=>xe(xe({},e),{},{crossHair:xe(xe({},e.crossHair),t)}),UPSERT_LOCATION_MARKER:(e,t)=>{var r=new Map(e.markers.items.map(e=>[e.id,e]));r.set(t.id,t);var n=Array.from(r.values());return xe(xe({},e),{},{markers:xe(xe({},e.markers),{},{items:n})})},REMOVE_LOCATION_MARKER:(e,t)=>{var r=e.markers.items.filter(e=>e.id!==t);return xe(xe({},e),{},{markers:xe(xe({},e.markers),{},{items:r})})}},We=(e,t)=>{var{type:r,payload:n}=t,o=ze[r];return o?o(e,n):e};function Ve(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 Fe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ve(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Ge=p(null),Ue=e=>{var{options:t,children:r}=e,[n,o]=m(We,(e=>{var{center:t,zoom:r,bounds:n,extent:o,mapStyle:i,mapSize:a,markers:l}=e,{registeredPlugins:c}=e.pluginRegistry;return{isMapReady:!1,mapProvider:null,mapStyle:null!=c&&c.find(e=>{var t;return null===(t=e.config)||void 0===t?void 0:t.handlesMapStyle})?null:i,mapSize:a,center:t,zoom:r,bounds:n||o,resolution:null,isAtMaxZoom:null,isAtMinZoom:null,crossHair:{isVisible:!1,isPinnedToMap:!1,state:"active"},markers:{items:l||[]}}})(t)),{eventBus:a}=t,l=v(!1),c=()=>{o({type:"SET_MAP_READY"})},s=e=>{var r=localStorage.getItem("".concat(t.id,":mapStyleId")),n=e.find(e=>e.id===r)||e[0],i=localStorage.getItem("".concat(t.id,":mapSize"))||t.mapSize;o({type:"SET_MAP_STYLE",payload:n}),o({type:"SET_MAP_SIZE",payload:i})},u=e=>{o({type:"SET_MAP_STYLE",payload:e})},d=e=>{o({type:"SET_MAP_SIZE",payload:e})};f(()=>(a.on(i.MAP_READY,c),a.on(i.MAP_INIT_MAP_STYLES,s),a.on(i.MAP_SET_STYLE,u),a.on(i.MAP_SET_SIZE,d),()=>{a.off(i.MAP_READY,c),a.off(i.MAP_INIT_MAP_STYLES,s),a.off(i.MAP_SET_STYLE,u),a.off(i.MAP_SET_SIZE,d)}),[]),f(()=>{n.mapSize&&(l.current?a.emit(i.MAP_SIZE_CHANGE,{mapSize:n.mapSize}):l.current=!0)},[n.mapSize]),f(()=>{n.mapStyle&&n.mapSize&&(localStorage.setItem("".concat(t.id,":mapStyleId"),n.mapStyle.id),localStorage.setItem("".concat(t.id,":mapSize"),n.mapSize))},[n.mapStyle,n.mapSize]);var p=g(()=>Fe(Fe({},n),{},{dispatch:o}),[n]);return E(Ge.Provider,{value:p,children:r})};function Ze(e){var t,r,n,o,i=!1,a=t=>{null!=e&&e.current&&t&&(e.current.textContent="",setTimeout(()=>{e.current&&(e.current.textContent=t)},100))},l=(t=a,r=500,n=null,o=function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];clearTimeout(n),n=setTimeout(()=>{t(...o)},r)},o.cancel=()=>{n&&(clearTimeout(n),n=null)},o);return function(e){if(e)return"plugin"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core")?(i=!0,void a(e)):void(i?i=!1:l(e))}}var Ke=(e,t)=>{if(!e)return null;if("string"==typeof e)return e.trim();if("object"==typeof e){if(t&&e[t])return e[t];var r=Object.values(e)[0];return null!=r?r:null}return null},qe={symbol:"pin",backgroundColor:"#ca3535",foregroundColor:"#ffffff",haloWidth:"1",selectedWidth:"6"},Ye={dot:"M8 3c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.241 5-5-2.24-5-5-5z",cross:"M6 3H10V6H13V10H10V13H6V10H3V6H6Z",diamond:"M8 2L14 8L8 14L2 8Z",triangle:"M8 2L14 14H2Z",square:"M3 3H13V13H3Z"},Xe={id:"pin",viewBox:"0 0 38 38",anchor:[.5,.9],graphic:Ye.dot,svg:'<path d="M19 33.499c-5.318-5-12-9.509-12-16.998 0-6.583 5.417-12 12-12s12 5.417 12 12c0 7.489-6.682 11.998-12 16.998z" fill="none" stroke="{{selectedColor}}" stroke-width="{{selectedWidth}}"/>\n <path d="M19 33.499c-5.318-5-12-9.509-12-16.998 0-6.583 5.417-12 12-12s12 5.417 12 12c0 7.489-6.682 11.998-12 16.998z" fill="{{backgroundColor}}" stroke="{{haloColor}}" stroke-width="{{haloWidth}}"/>\n <g transform="translate(19, 16) scale(0.8) translate(-8, -8)"><path d="{{graphic}}" fill="{{foregroundColor}}"/></g>'},$e={id:"circle",viewBox:"0 0 38 38",anchor:[.5,.5],graphic:Ye.dot,svg:'<path d="M19 7C12.376 7 7 12.376 7 19s5.376 12 12 12a12.01 12.01 0 0 0 12-12A12.01 12.01 0 0 0 19 7z" fill="none" stroke="{{selectedColor}}" stroke-width="{{selectedWidth}}"/>\n <path d="M19 7C12.376 7 7 12.376 7 19s5.376 12 12 12a12.01 12.01 0 0 0 12-12A12.01 12.01 0 0 0 19 7z" fill="{{backgroundColor}}" stroke="{{haloColor}}" stroke-width="{{haloWidth}}"/>\n <g transform="translate(19, 19) scale(0.8) translate(-8, -8)"><path d="{{graphic}}" fill="{{foregroundColor}}"/></g>'},Je={id:"square",viewBox:"0 0 38 38",anchor:[.5,.5],graphic:Ye.dot,svg:'<path d="M28 7a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H10a3 3 0 0 1-3-3V10a3 3 0 0 1 3-3h18z" fill="none" stroke="{{selectedColor}}" stroke-width="{{selectedWidth}}"/>\n <path d="M28 7a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H10a3 3 0 0 1-3-3V10a3 3 0 0 1 3-3h18z" fill="{{backgroundColor}}" stroke="{{haloColor}}" stroke-width="{{haloWidth}}"/>\n <g transform="translate(19, 19) scale(0.8) translate(-8, -8)"><path d="{{graphic}}" fill="{{foregroundColor}}"/></g>'},Qe={light:{haloColor:"#ffffff",selectedColor:"#0b0c0c",foregroundColor:"#0b0c0c"},dark:{haloColor:"#0b0c0c",selectedColor:"#ffffff",foregroundColor:"#ffffff"}},et=e=>{var{haloColor:t,selectedColor:r,foregroundColor:n}=(e=>{var t,r,n,o,i=null!==(t=Qe[null==e?void 0:e.mapColorScheme])&&void 0!==t?t:Qe.light;return{haloColor:null!==(r=null==e?void 0:e.haloColor)&&void 0!==r?r:i.haloColor,selectedColor:null!==(n=null==e?void 0:e.selectedColor)&&void 0!==n?n:i.selectedColor,foregroundColor:null!==(o=null==e?void 0:e.foregroundColor)&&void 0!==o?o:i.foregroundColor}})(e);return{"--map-overlay-halo-color":t,"--map-overlay-selected-color":r,"--map-overlay-foreground-color":n}};function tt(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 rt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?tt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var nt=new Map,ot={},it=new Set(["id","svg","viewBox","anchor","symbol","symbolSvgContent"]),at=new Set([...it,"selectedWidth"]);function lt(e,t,r){var n,o,i,a=null==r?void 0:r.id,l=Object.fromEntries(Object.entries(e||{}).filter(e=>{var[t]=e;return!at.has(t)})),c=Object.fromEntries(Object.entries(ot).filter(e=>{var[t]=e;return!it.has(t)})),s=Object.fromEntries(Object.entries(t).filter(e=>{var[,t]=e;return null!=t})),u=rt(rt(rt(rt({},qe),c),l),s),d=null!==(n=Qe[null==r?void 0:r.mapColorScheme])&&void 0!==n?n:Qe.light;return u.haloColor=null!==(o=null==r?void 0:r.haloColor)&&void 0!==o?o:d.haloColor,u.selectedColor=null!==(i=null==r?void 0:r.selectedColor)&&void 0!==i?i:d.selectedColor,"string"==typeof u.graphic&&Ye[u.graphic]&&(u.graphic=Ye[u.graphic]),Object.fromEntries(Object.entries(u).map(e=>{var[t,r]=e;return[t,Ke(r,a)||""]}))}function ct(e,t){return Object.entries(t).reduce((e,t)=>{var[r,n]=t;return e.replaceAll("{{".concat(r,"}}"),n)},e)}var st={setDefaults(e){ot=e||{}},getDefaults:()=>rt(rt({},qe),ot),register(e){nt.set(e.id,e)},get:e=>nt.get(e),list:()=>[...nt.values()],resolve(e,t,r){var n=lt(e,t||{},r);return e?(n.selectedColor="",ct(e.svg,n)):""},resolveSelected(e,t,r){var n=lt(e,t||{},r);return e?ct(e.svg,n):""}};st.register(Xe),st.register($e),st.register(Je);var ut=new Map,dt={register(e,t){ut.set(e,{id:e,svgContent:t})},get:e=>ut.get(e),list:()=>[...ut.values()]};Object.entries({"cross-hatch":'<path d="M0 4.486V3.485h3.5V.001h1v3.484h7.002V.001h1v3.484h3.5v1.001h-3.5v7h3.5v.999h-3.5v3.516h-1v-3.516H4.499v3.516h-1v-3.516H0v-.999h3.5v-7H0zm11.501 0H4.499v7h7.002v-7z" fill="{{foregroundColor}}"/>',"diagonal-cross-hatch":'<path d="M0 8.707V7.293L7.293 0h1.414L16 7.293v1.414L8.707 16H7.293L0 8.707zM.707 8L8 15.293 15.293 8 8 .707.707 8z" fill="{{foregroundColor}}"/>',"forward-diagonal-hatch":'<path d="M16 8.707V7.293L7.293 16h1.414L16 8.707zm-16 0L8.707 0H7.293L0 7.293v1.414z" fill="{{foregroundColor}}"/>',"backward-diagonal-hatch":'<path d="M0 8.707V7.293L8.707 16H7.293L0 8.707zm16 0L7.293 0h1.414L16 7.293v1.414z" fill="{{foregroundColor}}"/>',"horizontal-hatch":'<path d="M0 4.5V3.499h15.999V4.5H0zm0 7h15.999V12.5H0v-1.001z" fill="{{foregroundColor}}"/>',"vertical-hatch":'<path d="M3.501 16.001V0h1v16.001h-1zm7.998 0V0h1v16.001h-1z" fill="{{foregroundColor}}"/>',dot:'<path d="M3.999 2A2 2 0 0 1 6 3.999C6 5.103 5.103 6 3.999 6a2 2 0 0 1-1.999-2.001A2 2 0 0 1 3.999 2zm0 7.999C5.103 10 6 10.897 6 12.001A2 2 0 0 1 3.999 14a2 2 0 0 1-1.999-1.999A2 2 0 0 1 3.999 10zM11.999 2A2 2 0 0 1 14 3.999C14 5.103 13.103 6 11.999 6S10 5.103 10 3.999A2 2 0 0 1 11.999 2zm0 7.999c1.104 0 2.001.897 2.001 2.001A2 2 0 0 1 11.999 14 2 2 0 0 1 10 12.001c0-1.104.897-2.001 1.999-2.001z" fill="{{foregroundColor}}"/>',diamond:'<path d="M4 .465L7.535 4 4 7.535.465 4 4 .465zm0 7.999l3.535 3.535L4 15.535.465 11.999 4 8.464zm8-8l3.535 3.535-3.536 3.536L8.464 4 12 .464zm0 8.001L15.536 12 12 15.536 8.465 12 12 8.465z" fill="{{foregroundColor}}"/>'}).forEach(e=>{var[t,r]=e;dt.register(t,r)});var pt=p(null),ft=e=>{var{eventBus:t,children:r}=e,{id:n,handleExitClick:o,symbolDefaults:i}=j(),a=v(null),c=g(()=>Ze(a),[]);st.setDefaults(i||{});var s=g(()=>({announce:c,reverseGeocode:(e,t)=>l(e,t),eventBus:t,mapStatusRef:a,closeApp:()=>function(e,t){t()}(0,o),symbolRegistry:st,patternRegistry:dt}),[c]);return E(pt.Provider,{value:s,children:r})};function vt(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 mt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?vt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var bt=p(null);var gt=e=>{var{children:t}=e,{pluginRegistry:r}=j(),n={},o={},i=v({});r.registeredPlugins.forEach(e=>{var t=e.reducer;if(t){var{initialState:r,actions:a}=t;n[e.id]=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=null==e?void 0:e[null==r?void 0:r.type];return n?n(t,r.payload):t}}(a),o[e.id]=r}i.current[e.id]||(i.current[e.id]={})});var[a,l]=m((e,t)=>{var{pluginId:r}=t;return r&&n[r]?mt(mt({},e),{},{[r]:n[r](e[r],t)}):e},o),c=(e,t)=>(i.current[e]||(i.current[e]={}),i.current[e][t]||(i.current[e][t]=u.createRef()),i.current[e][t]),s=g(()=>({state:a,dispatch:l,refs:i,getPluginRef:c}),[a,l]);return E(bt.Provider,{value:s,children:t})},ht=e=>{var t=d(bt);if(!t)throw new Error("usePlugin must be used within PluginProvider");var{state:r,dispatch:n,refs:o,getPluginRef:i}=t;return o.current[e]||(o.current[e]={}),mt(mt({},r[e]),{},{dispatch:t=>n(mt(mt({},t),{},{pluginId:e})),refs:o.current[e],useRef:t=>i(e,t)})};function yt(){return d(Le)}function Ot(){return d(Ge)}function Pt(){return d(pt)}function Et(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 wt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Et(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var _t=new Map;function Rt(e,t){var{pluginId:r,pluginConfig:n}=t,o=e;return _t.has(o)||_t.set(o,function(t){var o=j(),i=yt(),a=Ot(),l=Pt(),c=ht(r);return E(e,wt(wt({},t),{},{pluginConfig:n,pluginState:c,appConfig:o,appState:i,mapState:a,services:l,mapProvider:o.mapProvider,iconRegistry:se(),buttonConfig:g(()=>Object.fromEntries(Object.entries(i.buttonConfig).filter(e=>{var[t,n]=e;return n.pluginId===r})),[i.buttonConfig])}))}),_t.get(o)}function jt(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 St(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?jt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Tt(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 Ct(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Tt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function At(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 Dt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?At(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Mt(){var e=j(),t=yt(),r=Ot(),n=Pt(),o=d(bt),i={appConfig:e,appState:t,mapState:r,services:n,mapProvider:null==e?void 0:e.mapProvider,iconRegistry:se()};function a(t,r){var n,a;if(r){var l,c,s=e.pluginRegistry.registeredPlugins.find(e=>e.id===r);n=s?Dt({pluginId:s.id},s.config):{},a=Dt(Dt({},null!==(l=null==o||null===(c=o.state)||void 0===c?void 0:c[r])&&void 0!==l?l:{}),{},{dispatch:null==o?void 0:o.dispatch})}var u=Dt(Dt({},i),{},{pluginConfig:n,pluginState:a});return"function"==typeof t?t(u):t}return a.ctx=i,a}function kt(e){var t=yt(),{pluginRegistry:r}=j(),n=d(bt);h(()=>{if(null!=t&&t.dispatch&&n){var{dispatch:o}=t,i=0,a=e=>{i++,o(e)};r.registeredPlugins.forEach(r=>{var n,o;(null!==(n=null==r||null===(o=r.manifest)||void 0===o?void 0:o.buttons)&&void 0!==n?n:[]).flatMap(e=>{var t;return[e,...null!==(t=e.menuItems)&&void 0!==t?t:[]]}).forEach(n=>function(e){var{btn:t,pluginId:r,appState:n,dispatch:o,evaluateProp:i}=e;[{prop:"enableWhen",state:n.disabledButtons,action:"TOGGLE_BUTTON_DISABLED",invert:!0,key:"isDisabled"},{prop:"hiddenWhen",state:n.hiddenButtons,action:"TOGGLE_BUTTON_HIDDEN",key:"isHidden"},{prop:"pressedWhen",state:n.pressedButtons,action:"TOGGLE_BUTTON_PRESSED",key:"isPressed"},{prop:"expandedWhen",state:n.expandedButtons,action:"TOGGLE_BUTTON_EXPANDED",key:"isExpanded"}].forEach(e=>{var{prop:n,state:a,action:l,key:c,invert:s}=e;if("function"==typeof t[n])try{var u=i(t[n],r),d=s?!u:u;a.has(t.id)!==d&&o({type:l,payload:{id:t.id,[c]:d}})}catch(e){console.warn("".concat(n," error for button ").concat(t.id,":"),e)}})}({btn:n,pluginId:r.id,appState:t,dispatch:a,evaluateProp:e}))}),0!==i||t.arePluginsEvaluated||o({type:"PLUGINS_EVALUATED"})}},[t,n,e])}var It=["api"],Lt=e=>{var r,n,{plugin:o,mode:i}=e,a=function(e){var t=v(null),r=j(),n=yt(),o=Ot(),i=Pt(),a=ht(e);return f(()=>{t.current={appConfig:r,appState:n,mapState:o,services:i,mapProvider:r.mapProvider,pluginState:a}}),t}(o.id);f(()=>{o.api&&o._originalPlugin&&Object.entries(o.api).forEach(e=>{var[t,r]=e;o._originalPlugin[t]=function(e,t){var{pluginId:r,pluginConfig:n,stateRef:o}=t;return function(){var t=o.current;if(!t)throw new Error('Plugin API "'.concat(r,'" called before state is initialized'));for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e(St(St({},t),{},{pluginConfig:n,pluginId:r}),...a)}}(r,{pluginId:o.id,pluginConfig:(null==o?void 0:o.config)||{},stateRef:a})})},[o,a]);var{InitComponent:l}=o,c=(null==o?void 0:o.config)||{},{api:s}=c,u=t(c,It),{includeModes:d,excludeModes:p}=o.config||{},m=null===(r=null==d?void 0:d.includes(i))||void 0===r||r,b=null!==(n=null==p?void 0:p.includes(i))&&void 0!==n&&n;if(!m||b||!l)return null;var g=Rt(l,{pluginId:o.id,pluginConfig:u});return E(g,{})},Nt=()=>{var{mode:e}=yt(),{pluginRegistry:t}=j();(()=>{var{dispatch:e,hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o}=yt(),{eventBus:a}=Pt(),l=v(e),c=v({hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o});l.current=e,c.current={hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o},f(()=>{var e=e=>{var{id:t,config:r}=e;l.current({type:"ADD_BUTTON",payload:{id:t,config:r}}),Array.isArray(r.menuItems)&&r.menuItems.forEach(e=>{l.current({type:"ADD_BUTTON",payload:{id:e.id,config:Ct(Ct({},e),{},{isMenuItem:!0})}})})},t=e=>{var{id:t,prop:r,value:n}=e,{hiddenButtons:o,disabledButtons:i,pressedButtons:a,expandedButtons:s}=c.current;switch(r){case"hidden":var u="boolean"==typeof n?n:!o.has(t);l.current({type:"TOGGLE_BUTTON_HIDDEN",payload:{id:t,isHidden:u}});break;case"disabled":var d="boolean"==typeof n?n:!i.has(t);l.current({type:"TOGGLE_BUTTON_DISABLED",payload:{id:t,isDisabled:d}});break;case"pressed":var p="boolean"==typeof n?n:!a.has(t);l.current({type:"TOGGLE_BUTTON_PRESSED",payload:{id:t,isPressed:p}});break;case"expanded":var f="boolean"==typeof n?n:!s.has(t);l.current({type:"TOGGLE_BUTTON_EXPANDED",payload:{id:t,isExpanded:f}})}},r=()=>l.current({type:"TOGGLE_APP_VISIBLE",payload:!0}),n=()=>l.current({type:"TOGGLE_APP_VISIBLE",payload:!1}),o=e=>{var{id:t,config:r}=e;return l.current({type:"ADD_PANEL",payload:{id:t,config:r}})},s=e=>l.current({type:"REMOVE_PANEL",payload:e}),u=e=>{var{id:t,focus:r=!0}=e;return l.current({type:"OPEN_PANEL",payload:{panelId:t,focusOnOpen:r}})},d=e=>l.current({type:"CLOSE_PANEL",payload:e}),p=e=>{var{id:t,config:r}=e;return l.current({type:"ADD_CONTROL",payload:{id:t,config:r}})};return a.on(i.APP_OPENED,r),a.on(i.APP_CLOSED,n),a.on(i.APP_ADD_BUTTON,e),a.on(i.APP_TOGGLE_BUTTON_STATE,t),a.on(i.APP_ADD_PANEL,o),a.on(i.APP_REMOVE_PANEL,s),a.on(i.APP_SHOW_PANEL,u),a.on(i.APP_HIDE_PANEL,d),a.on(i.APP_ADD_CONTROL,p),()=>{a.off(i.APP_OPENED,r),a.off(i.APP_CLOSED,n),a.off(i.APP_ADD_BUTTON,e),a.off(i.APP_TOGGLE_BUTTON_STATE,t),a.off(i.APP_ADD_PANEL,o),a.off(i.APP_REMOVE_PANEL,s),a.off(i.APP_SHOW_PANEL,u),a.off(i.APP_HIDE_PANEL,d),a.off(i.APP_ADD_CONTROL,p)}},[a])})();var r=Mt();return kt(r),E(_,{children:t.registeredPlugins.map((t,n)=>E(Lt,{plugin:t,mode:e,evaluateProp:r},"init-".concat(t.id,"-").concat(n)))})};var Bt=function(e){var{id:t,center:r,zoom:n,bounds:o}=e,i=((e,t)=>{var r=new URLSearchParams(t),n=r.get("".concat(e,":center")),o=r.get("".concat(e,":zoom"));if(!n||!o)return null;var[i,a]=n.split(",").map(Number);return{center:[i,a],zoom:Number(o)}})(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search);return i?{center:i.center,zoom:i.zoom}:o?{bounds:o}:{center:r,zoom:n}};function xt(){var{id:e}=j(),{eventBus:t}=Pt();f(()=>{if(e){var r=t=>{var{current:r}=t;!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.href,n=new URL(r||"http://localhost"),o=new Set,i=[];if(t.center){var a="".concat(e,":center");o.add(a),i.push("".concat(a,"=").concat(t.center[0],",").concat(t.center[1]))}if(null!=t.zoom){var l="".concat(e,":zoom");o.add(l),i.push("".concat(l,"=").concat(t.zoom))}var c=[];n.searchParams.forEach((e,t)=>{o.has(t)||c.push("".concat(t,"=").concat(e))});var s=[...c,...i].join("&"),u=s?"?"+s:"",d="".concat(n.origin).concat(n.pathname).concat(u).concat(n.hash);window.history.replaceState(window.history.state,"",d)}(e,{center:r.center,zoom:r.zoom})};return t.on(i.MAP_STATE_UPDATED,r),()=>t.off(i.MAP_STATE_UPDATED,r)}},[e])}var Ht=e=>{var{direction:t}=e;return"Map moved ".concat(t,".")},zt=e=>{var{from:t,to:r,areaDimensions:n,isAtMaxZoom:o,isAtMinZoom:i}=e;return"Map zoomed ".concat(r>t?"in":"out").concat(o?" (Maximum zoom)":"").concat(i?" (Minimum zoom)":"",". New area approximately ").concat(n,".")},Wt=e=>{var{areaDimensions:t,isAtMaxZoom:r,isAtMinZoom:n}=e;return"New area approximately ".concat(t).concat(r?" (Maximum zoom)":"").concat(n?" (Minimum zoom)":"",".")},Vt=e=>{var{isAtMaxZoom:t,isAtMinZoom:r}=e;return"No change, ".concat(t?"maximum zoom reached":"").concat(r?"minimum zoom reached":"",".")};function Ft(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 Gt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ft(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ut(){var{mapProvider:e}=j(),{eventBus:t,announce:r}=Pt();f(()=>{var n=t=>{var{previous:n,current:o}=t;if(null!=n&&n.center&&null!=o&&o.center){var i=((e,t,r)=>{var n=e.zoom!==t.zoom,o=e.center[0]!==t.center[0]||e.center[1]!==t.center[1],i=r.getAreaDimensions();if(o&&!n){var a=r.getCardinalMove(e.center,t.center);return Ht({direction:a,areaDimensions:i})}return!o&&n?zt(Gt(Gt({},t),{},{from:e.zoom,to:t.zoom,areaDimensions:i})):o||n?Wt(Gt(Gt({},t),{},{areaDimensions:i})):Vt(Gt({},t))})(n,o,e);i&&r(i,"core")}};return t.on(i.MAP_STATE_UPDATED,n),()=>{t.off(i.MAP_STATE_UPDATED,n)}},[e,r])}var Zt=e=>{if(null==e||!e.current)return{offsetWidth:0,offsetHeight:0};var t=e.current.firstElementChild;return null!=t&&t.classList.contains("im-c-panel")&&0!==t.offsetWidth&&0!==t.offsetHeight?{offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight}:{offsetWidth:0,offsetHeight:0}},Kt=e=>{var t,r=null==e||null===(t=e.current)||void 0===t?void 0:t.querySelector(".im-c-button-group");return r?r.offsetWidth:0},qt=(e,t,r,n)=>{var o=t/n,i=e/r;return o>=.5&&i>=.5?o>=i?{colH:t,colW:e,rowW:0,rowH:0}:{colH:0,colW:0,rowW:e,rowH:t}:{colH:t,colW:e,rowW:e,rowH:t}},Yt=(e,t,r,n,o,i,a)=>{var l=qt(e.offsetWidth,e.offsetHeight,r,n),c=qt(t.offsetWidth,t.offsetHeight,r,n),s=0===t.offsetHeight&&0===l.colH,u=0===e.offsetHeight&&0===c.colH,d=e.offsetHeight+t.offsetHeight+(e.offsetHeight>0&&t.offsetHeight>0?a:0)>o&&!s&&!u;return{panelInset:d?i+Math.max(e.offsetWidth,t.offsetWidth)+a:0,rowA:d?{w:0,h:0}:{w:l.rowW,h:l.rowH},rowB:d?{w:0,h:0}:{w:c.rowW,h:c.rowH}}},Xt=(e,t,r,n,o,i,a)=>e+t>o?i+Math.max(r,n)+a:0,$t=e=>{var{mainRef:t,leftRef:r,rightRef:n,actionsRef:o,bottomRef:i,leftTopRef:a,leftBottomRef:l,rightTopRef:c,rightBottomRef:s}=e;if(![t,r,n,o,i].some(e=>!(null!=e&&e.current))){var u=t.current,d=r.current,p=o.current,f=i.current,v=Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--divider-gap"),10),m=Zt(a),b=Zt(l),g=Zt(c),h=Zt(s),y=Math.max(Kt(r),Kt(n)),O=u.offsetLeft+d.offsetLeft+y+v,P=d.offsetLeft+y+v,E=d.offsetTop,w=u.offsetHeight-f.offsetTop-f.offsetHeight,_=Math.max(w,u.offsetHeight-f.offsetTop+v),R=Math.max(u.offsetHeight-p.offsetTop+v,_),j=u.offsetHeight-E-R,S=u.offsetWidth-(O-u.offsetLeft)-P,T=Yt(m,b,S,j,j/2,u.offsetLeft+d.offsetLeft,v),C=Yt(g,h,S,j,j/2,d.offsetLeft,v),A=T.panelInset,D=C.panelInset,M=Xt(T.rowA.w,C.rowA.w,T.rowA.h,C.rowA.h,S/2,E,v),k=Xt(T.rowB.w,C.rowB.w,T.rowB.h,C.rowB.h,S/2,_,v),I=u.offsetWidth-2*v,L=u.offsetHeight-2*v,N=u.offsetLeft+2*I/3,B=2*I/3,x=2*L/3;return{left:Math.max(O,Math.min(A,N)),right:Math.max(P,Math.min(D,B)),top:Math.max(E,Math.min(M,x)),bottom:Math.max(R,Math.min(k,x))}}},Jt=(e,t)=>Object.entries(e).reduce((e,r)=>{var[n,o]=r;return e[n]=Math.round(o/t),e},{}),Qt=e=>"Feature"===e.type?Qt(e.geometry):"Point"===e.type?e.coordinates:"MultiPoint"===e.type?e.coordinates[0]:null;function er(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 tr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?er(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var rr=e=>{var{mapContainerRef:t}=e,r=j(),{id:n,mapProvider:o}=r,{safeZoneInset:a,breakpoint:l,isLayoutReady:c,syncMapPadding:s}=yt(),{isMapReady:u,mapStyle:d,mapSize:p,center:m,zoom:b,bounds:g}=Ot(),h=v(!1),y=Bt({id:n,center:m,zoom:b,bounds:g});return f(()=>{if(a&&c&&d&&p&&!h.current)return requestAnimationFrame(()=>{o.initMap(tr(tr({},r),{},{pixelRatio:window.devicePixelRatio*V[p],container:t.current,padding:a,center:y.center,zoom:y.zoom,bounds:y.bounds,mapStyle:d,mapSize:p}))}),h.current=!0,()=>{}},[a,c,d,p]),function(){var{mapProvider:e}=j(),{dispatch:t}=Ot(),{eventBus:r}=Pt(),n=v(null),o=v(!1);f(()=>{if(e){var a=e=>{t({type:"MAP_MOVE",payload:e})},l=e=>{t({type:"MAP_MOVE_END",payload:e}),r.emit(i.MAP_STATE_UPDATED,{previous:n.current,current:e}),n.current=e},c=r=>{o.current||(n.current={center:e.getCenter(),zoom:e.getZoom()},o.current=!0),t({type:"MAP_FIRST_IDLE",payload:r})};return r.on(i.MAP_MOVE,a),r.on(i.MAP_MOVE_END,l),r.on(i.MAP_FIRST_IDLE,c),()=>{r.off(i.MAP_MOVE,a),r.off(i.MAP_MOVE_END,l),r.off(i.MAP_FIRST_IDLE,c)}}},[e,t])}(),xt(),Ut(),(()=>{var{mapProvider:e,eventBus:t}=j(),{dispatch:r,layoutRefs:n}=yt(),{mapSize:o}=Ot(),a=v(o);a.current=o;var l=()=>{var t=$t(n),o=Jt(t,V[a.current]);"function"==typeof r&&r({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:t,syncMapPadding:!1}}),"function"==typeof e.setPadding&&e.setPadding(o)};f(()=>{if(e){var t=e.fitToBounds;e.fitToBounds=function(r){if(r)return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||l(),t.call(e,r)};var r=e.setView;return e.setView=t=>{var{center:n,zoom:o}=t;if(n)return l(),r.call(e,{center:n,zoom:o})},()=>{e.fitToBounds=t,e.setView=r}}},[e,r,n,o]),f(()=>{if(e&&t){var r=t=>e.fitToBounds(t),n=t=>e.setView(t);return t.on(i.MAP_FIT_TO_BOUNDS,r),t.on(i.MAP_SET_VIEW,n),()=>{t.off(i.MAP_FIT_TO_BOUNDS,r),t.off(i.MAP_SET_VIEW,n)}}},[e,t])})(),(()=>{var{id:e,mapProvider:t,eventBus:r}=j(),{layoutRefs:n,panelConfig:o,panelRegistry:a,breakpoint:l}=yt(),c=v({layoutRefs:n,panelConfig:o,panelRegistry:a,breakpoint:l});c.current={layoutRefs:n,panelConfig:o,panelRegistry:a,breakpoint:l},f(()=>{if(t&&r){var o=r=>{var o,i,a,{panelId:l,visibleGeometry:s}=r,{panelConfig:u,panelRegistry:d}=c.current,p=null!=u&&u[l]?u:null!==(o=null==d?void 0:d.getPanelConfig())&&void 0!==o?o:u,f=null!=s?s:null==p||null===(i=p[l])||void 0===i?void 0:i.visibleGeometry,v=null===(a=n.appContainerRef.current)||void 0===a?void 0:a.querySelector("#".concat(e,"-panel-").concat(l));if(f&&"function"==typeof t.isGeometryObscured){var m=()=>{if(v){var e,r=v.getBoundingClientRect();if(r&&0!==r.width&&0!==r.height){if(t.isGeometryObscured(f,r))if("Point"===(e=(o=f)?"Feature"===o.type?null===(i=o.geometry)||void 0===i?void 0:i.type:o.type:null)||"MultiPoint"===e){var n=Qt(f);n&&t.setView({center:n})}else t.fitToBounds(f)}else requestAnimationFrame(m)}var o,i};requestAnimationFrame(m)}};return r.on(i.APP_PANEL_OPENED,o),()=>{r.off(i.APP_PANEL_OPENED,o)}}},[t,r])})(),f(()=>{u&&s&&o.setPadding(Jt(a,V[p]))},[u,p,l,a]),null};var nr={keydown:{ArrowUp:"panUp",ArrowDown:"panDown",ArrowLeft:"panLeft",ArrowRight:"panRight","+":"zoomIn","=":"zoomIn","-":"zoomOut",_:"zoomOut"},keyup:{"Alt+k":"showKeyboardControls","Alt+K":"showKeyboardControls","Alt+ArrowRight":"highlightNextLabel","Alt+ArrowLeft":"highlightNextLabel","Alt+ArrowUp":"highlightNextLabel","Alt+ArrowDown":"highlightNextLabel","Alt+Enter":"highlightLabelAtCenter","Alt+i":"getInfo","Alt+I":"getInfo",Escape:"clearSelection"}},or=(e,t,n)=>{var o,{containerRef:i,dispatch:a,panDelta:c,nudgePanDelta:s,zoomDelta:u,nudgeZoomDelta:d,readMapText:p}=n,f=e=>e?s:c,v=e=>e?d:u;return{showKeyboardControls:()=>{a({type:"OPEN_PANEL",payload:{panelId:"keyboardHelp",props:{triggeringElement:i.current}}})},panUp:t=>e.panBy([0,-f(t.shiftKey)]),panDown:t=>e.panBy([0,f(t.shiftKey)]),panLeft:t=>e.panBy([-f(t.shiftKey),0]),panRight:t=>e.panBy([f(t.shiftKey),0]),zoomIn:t=>e.zoomIn(v(t.shiftKey)),zoomOut:t=>e.zoomOut(v(t.shiftKey)),getInfo:(o=r(function*(r){var n,o=e.getCenter(),i=yield l(e.getZoom(),o),a=null===(n=e.getAreaDimensions)||void 0===n?void 0:n.call(e),c=a?"".concat(i,". Covering ").concat(a,"."):"".concat(i,".");t(c,"core")}),function(e){return o.apply(this,arguments)}),highlightNextLabel:r=>{if(p||!e.highlightNextLabel){var n=e.highlightNextLabel(r.key);t(n,"core")}},highlightLabelAtCenter:()=>{if(p||!e.highlightNextLabel){var r=e.highlightLabelAtCenter();t(r,"core")}},clearSelection:()=>{var t;return null==e||null===(t=e.clearHighlightedLabel)||void 0===t?void 0:t.call(e)}}};var ir=()=>{var{mapStatusRef:e}=Pt();return E("div",{ref:e,role:"status",className:"im-c-viewport__status","aria-live":"polite","aria-atomic":"true","aria-label":"Map updates"})},ar={active:"M5.035 20H1v-2h4.035C5.525 11.069 11.069 5.525 18 5.035V1h2v4.035c6.931.49 12.475 6.034 12.965 12.965H37v2h-4.035c-.49 6.931-6.034 12.475-12.965 12.965V37h-2v-4.035C11.069 32.475 5.525 26.931 5.035 20zM19 7c-6.581.005-11.995 5.419-12 12 .005 6.581 5.419 11.995 12 12 6.581-.005 11.995-5.419 12-12-.005-6.581-5.419-11.995-12-12zm0 10a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2z",inactive:"M5.035 20H1v-2h4.035a13.98 13.98 0 0 1 .246-1.8l1.96.399C7.083 17.375 7 18.178 7 19s.083 1.625.241 2.401l-1.96.399a13.98 13.98 0 0 1-.246-1.8zM20 5.035a13.98 13.98 0 0 1 1.8.246l-.399 1.96C20.625 7.083 19.822 7 19 7s-1.625.083-2.401.241l-.399-1.96a13.98 13.98 0 0 1 1.8-.246V1h2v4.035zm-2 27.93a13.98 13.98 0 0 1-1.8-.246l.399-1.96c.776.158 1.579.241 2.401.241s1.625-.083 2.401-.241l.399 1.96a13.98 13.98 0 0 1-1.8.246V37h-2v-4.035zM32.965 20a13.98 13.98 0 0 1-.246 1.8l-1.96-.399c.158-.776.241-1.579.241-2.401s-.083-1.625-.241-2.401l1.96-.399a13.98 13.98 0 0 1 .246 1.8H37v2h-4.035zM19 17a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2zm3.8-9.385l.634-1.897c1.789.598 3.438 1.553 4.848 2.805l-1.327 1.496c-1.196-1.06-2.605-1.886-4.155-2.404zm5.181 3.43l1.496-1.327c1.252 1.41 2.207 3.059 2.805 4.848l-1.897.634c-.518-1.55-1.344-2.959-2.404-4.155zM30.385 22.8l1.897.634c-.598 1.789-1.553 3.438-2.805 4.848l-1.496-1.327c1.06-1.196 1.886-2.605 2.404-4.155zm-3.43 5.181l1.327 1.496c-1.41 1.252-3.059 2.207-4.848 2.805l-.634-1.897c1.55-.518 2.959-1.344 4.155-2.404zM15.2 30.385l-.634 1.897c-1.789-.598-3.438-1.553-4.848-2.805l1.327-1.496c1.196 1.06 2.605 1.886 4.155 2.404zm-5.181-3.43l-1.496 1.327c-1.252-1.41-2.207-3.059-2.805-4.848l1.897-.634c.518 1.55 1.344 2.959 2.404 4.155zM7.615 15.2l-1.897-.634c.598-1.789 1.553-3.438 2.805-4.848l1.496 1.327c-1.06 1.196-1.886 2.605-2.404 4.155zm3.43-5.181L9.718 8.523c1.41-1.252 3.059-2.207 4.848-2.805l.634 1.897c-1.55.518-2.959 1.344-4.155 2.404z"},lr=()=>{var{id:e}=j(),{crossHairRef:t,crossHair:r}=(()=>{var{mapProvider:e}=j(),{safeZoneInset:t}=yt(),{eventBus:r}=Pt(),{crossHair:n,dispatch:o,mapSize:a}=Ot(),l=(e,r,n)=>{if(t){var o=r*V[a],i=n*V[a];e.style.transform="translate(".concat(o-t.left,"px, ").concat(i-t.top,"px)"),e.style.left="0",e.style.top="0",e.style.display="block"}},c=b(t=>{if(t){((e,t,r,n,o)=>{e.pinToMap=(i,a)=>{var{x:l,y:c}=r.mapToScreen(i);e.coords=i,n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!0,isVisible:!0,coords:i,state:a}}),o(t,l,c)},e.fixAtCenter=()=>{t.style.left="50%",t.style.top="50%",t.style.transform="translate(0,0)",t.style.display="block",n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!0}})},e.remove=()=>{t.style.display="none",n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!1}})},e.show=()=>{t.style.display="block",n({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!0}})},e.hide=()=>{t.style.display="none",n({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!1}})},e.setStyle=e=>{n({type:"UPDATE_CROSS_HAIR",payload:{state:e}})},e.getDetail=()=>{var t=e.isPinnedToMap?e.coords:r.getCenter();return{state:e.state,point:r.mapToScreen(t),zoom:r.getZoom(),coords:t}}})(n,t,e,o,l);var a=()=>{if(n.coords&&n.isPinnedToMap){var{x:r,y:o}=e.mapToScreen(n.coords);l(t,r,o)}};return r.on(i.MAP_RENDER,a),()=>{r.off(i.MAP_RENDER,a)}}},[n,e,a,o,t]);return f(()=>{n.coords&&n.isPinnedToMap&&n.pinToMap(n.coords,n.state)},[a]),{crossHair:n,crossHairRef:c}})(),{isVisible:n,isPinnedToMap:o,state:a}=r;return E("svg",{id:"".concat(e,"-cross-hair"),ref:t,className:"im-c-cross-hair",width:"38",height:"38",viewBox:"0 0 38 38",fillRule:"evenodd",fill:"currentColor",style:{position:"absolute",left:o?0:"50%",top:o?0:"50%",pointerEvents:"none",display:n?"block":"none"},children:E("path",{d:ar[a||"active"]})})};function cr(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 sr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?cr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var ur=(e,t,r,n)=>{if(!t||!n)return{x:0,y:0};var{x:o,y:i}=t.mapToScreen(e);return{x:o*V[r],y:i*V[r]}},dr=(e,t,r,n,o)=>{e.forEach(e=>{var i=t.get(e.id);if(i&&e.coords){var{x:a,y:l}=ur(e.coords,r,n,o);i.style.transform="translate(".concat(a,"px, ").concat(l,"px)"),i.style.display="block"}})},pr=()=>{var{mapProvider:e}=j(),{eventBus:t}=Pt(),{markers:r,dispatch:n,mapSize:o,isMapReady:a}=Ot(),l=v(new Map);h(()=>{e&&(r.markerRefs=l.current,r.add=(t,r,i)=>{var{x:l,y:c}=ur(r,e,o,a);n({type:"UPSERT_LOCATION_MARKER",payload:sr(sr({id:t,coords:r},i),{},{x:l,y:c,isVisible:!0})})},r.remove=e=>{n({type:"REMOVE_LOCATION_MARKER",payload:e})},r.getMarker=e=>r.items.find(t=>t.id===e))},[e,r,n,o]);var c=b(n=>c=>{if(c){l.current.set(n,c);var s=()=>{a&&e&&dr(r.items,l.current,e,o,a)};return t.on(i.MAP_RENDER,s),()=>{t.off(i.MAP_RENDER,s)}}l.current.delete(n)},[r,e,a,o]);return f(()=>{a&&e&&dr(r.items,l.current,e,o,a)},[o,r.items,e,a]),((e,t)=>{f(()=>{var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=e&&e.id&&null!=e&&e.coords){var{id:r,coords:n,options:o}=e;t.add(r,n,o)}};e.on(i.APP_ADD_MARKER,r);var n=e=>{e&&t.remove(e)};return e.on(i.APP_REMOVE_MARKER,n),()=>{e.off(i.APP_ADD_MARKER,r),e.off(i.APP_REMOVE_MARKER,n)}},[])})(t,r),{markers:r,markerRef:c}};function fr(e){return null==e?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var vr=new Set(["id","coords","x","y","isVisible","symbol","symbolSvgContent","viewBox","anchor","selectedColor","selectedWidth"]),mr=()=>{var{id:e}=j(),{mapStyle:t,mapSize:r}=Ot(),{markers:n,markerRef:o}=pr(),{symbolRegistry:i,eventBus:a}=Pt(),[l,c]=y(!1),[s,u]=y([]),d=v(null);if(f(()=>{var e=e=>{var{active:t,interactionModes:r=[]}=e;return c(t&&r.includes("selectMarker"))},t=e=>{var{selectedMarkers:t=[]}=e;return u(t)};return a.on("interact:active",e),a.on("interact:selectionchange",t),()=>{a.off("interact:active",e),a.off("interact:selectionchange",t)}},[a]),f(()=>{d.current=document.querySelector(".im-c-viewport")},[]),((e,t,r)=>{f(()=>{if(t){var n=r.current;if(n){var o=t=>{var r=e.items.some(r=>{var n,o=null===(n=e.markerRefs)||void 0===n?void 0:n.get(r.id);if(!o)return!1;var{left:i,top:a,right:l,bottom:c}=o.getBoundingClientRect();return t.clientX>=i&&t.clientX<=l&&t.clientY>=a&&t.clientY<=c});n.style.cursor=r?"pointer":""};return n.addEventListener("mousemove",o),()=>{n.removeEventListener("mousemove",o),n.style.cursor=""}}}},[e,t,r])})(n,l,d),t){var p=i.getDefaults();return E(_,{children:n.items.map(n=>{var a,l=((e,t,r)=>{var n=e.symbolSvgContent||t.symbolSvgContent;return n?{svg:n}:r.get(e.symbol||t.symbol)})(n,p,i),c=Object.fromEntries(Object.entries(n).filter(e=>{var[t]=e;return!vr.has(t)})),u=s.includes(n.id),d=u?i.resolveSelected(l,c,t):i.resolve(l,c,t),f=((e,t,r)=>e.viewBox||t.viewBox||(null==r?void 0:r.viewBox)||"0 0 38 38")(n,p,l),[,,v,m]=f.split(" ").map(Number),b=((e,t,r)=>{var n,o,i;return null!==(n=null!==(o=null!==(i=e.anchor)&&void 0!==i?i:t.anchor)&&void 0!==o?o:null==r?void 0:r.anchor)&&void 0!==n?n:[.5,.5]})(n,p,l),g=n.symbol||p.symbol,h=null!==(a=V[r])&&void 0!==a?a:1,y=v*h,O=m*h;return E("svg",{ref:o(n.id),id:"".concat(e,"-marker-").concat(n.id),className:["im-c-marker","im-c-marker--".concat(fr(g)),u&&"im-c-marker--selected"].filter(Boolean).join(" "),width:y,height:O,viewBox:f,overflow:"visible",style:{display:n.isVisible?"block":"none",marginLeft:"".concat(-b[0]*y,"px"),marginTop:"".concat(-b[1]*O,"px")},children:E("g",{dangerouslySetInnerHTML:{__html:d}})},n.id)})})}},br=()=>{var{id:e,mapProvider:t,mapLabel:r,keyboardHintText:n}=j(),{interfaceType:o,mode:a,previousMode:l,layoutRefs:c,safeZoneInset:s}=yt(),{mainRef:u}=c,{mapSize:d}=Ot(),p=v(null),m=v(null),[b,g]=y(!1);!function(e){var{mapProvider:t,panDelta:r,nudgePanDelta:n,zoomDelta:o,nudgeZoomDelta:i,readMapText:a}=j(),{interfaceType:l,dispatch:c}=yt(),{announce:s}=Pt();f(()=>{var u=e.current;if(u&&"keyboard"===l){var d=or(t,s,{containerRef:e,dispatch:c,panDelta:r,nudgePanDelta:n,zoomDelta:o,nudgeZoomDelta:i,readMapText:a}),p=e=>t=>{var r=nr[e][(e=>{var t;return"Add"===(t=/^Key[A-Z]$/.test(e.code)?e.code.slice(3):e.key)||"NumpadAdd"===t?t="+":"Subtract"!==t&&"NumpadSubtract"!==t||(t="-"),e.altKey?"Alt+".concat(t):t})(t)];r&&d[r]&&(d[r](t),t.preventDefault())},f=p("keydown"),v=p("keyup");return u.addEventListener("keydown",f),u.addEventListener("keyup",v),()=>{u.removeEventListener("keydown",f),u.removeEventListener("keyup",v)}}},[e,l,t,r,n,o,i])}(c.viewportRef),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mapProvider:t}=j(),{eventBus:r}=Pt();f(()=>{if(t){var n={};return Object.entries(e).forEach(e=>{var[t,o]=e,i=e=>o(e);n[t]=i,r.on(t,i)}),()=>{Object.entries(n).forEach(e=>{var[t,n]=e;r.off(t,n)})}}},[t,e])}({[i.MAP_CLICK]:()=>{var e;return null==t||null===(e=t.clearHighlightedLabel)||void 0===e?void 0:e.call(t)}});var{showHint:h,handleFocus:P,handleBlur:R}=function(e){var{interfaceType:t,containerRef:r,keyboardHintRef:n,keyboardHintVisible:o,onViewportFocusChange:i}=e,a=o;return f(()=>{if(a&&r.current){var e=r.current,t=e=>{["Escape","Tab"].includes(e.key)&&i(!1)},o=t=>{var r,o=e.contains(t.target),a=null===(r=n.current)||void 0===r?void 0:r.contains(t.target);o&&!a&&i(!1)};return e.addEventListener("keydown",t),e.addEventListener("mousedown",o),()=>{e.removeEventListener("keydown",t),e.removeEventListener("mousedown",o)}}},[a,r,n,i]),{showHint:a,handleFocus:()=>{"keyboard"===t&&i(!0)},handleBlur:()=>{i(!1)}}}({interfaceType:o,containerRef:c.viewportRef,keyboardHintRef:m,keyboardHintVisible:b,onViewportFocusChange:g});return f(()=>{var e;a&&l&&a!==l&&(null===(e=c.viewportRef)||void 0===e||e.current.focus())},[a]),w(_,{children:[E(rr,{mapContainerRef:p}),w("div",{id:"".concat(e,"-viewport"),className:"im-c-viewport im-c-viewport--".concat(d),"aria-label":r,role:"application",tabIndex:"0",onFocus:P,onBlur:R,ref:c.viewportRef,children:[h&&(null==u?void 0:u.current)&&O(E("div",{className:"im-c-viewport__keyboard-hint","aria-hidden":"true",ref:m,dangerouslySetInnerHTML:{__html:n}}),u.current),E("div",{className:"im-c-viewport__map-container",ref:p}),E("div",{className:"im-c-viewport__features"}),E(ir,{}),E("div",{className:"im-c-viewport__safezone",style:s,ref:c.safeZoneRef,children:E(lr,{})}),E(mr,{})]})]})};function gr(e,t){var r=v(),n=v(new WeakMap);return f(()=>{var o=(Array.isArray(e)?e:[e]).map(e=>null==e?void 0:e.current).filter(Boolean);if(o.length&&t){var i=new window.ResizeObserver(e=>{for(var r of e){var{width:o,height:i}=r.contentRect,a=n.current.get(r.target)||{};a.width===o&&a.height===i||(n.current.set(r.target,{width:o,height:i}),t(r))}});return o.forEach(e=>i.observe(e)),()=>{i.disconnect(),r.current&&cancelAnimationFrame(r.current)}}},[e,t]),{frameRef:r}}var hr=e=>{var t,r;return null!==(t=null==e||null===(r=e.current)||void 0===r?void 0:r.offsetHeight)&&void 0!==t?t:0},yr=(e,t,r)=>e-(t?t+r:0);function Or(e){var t,r,{appContainerRef:n,mainRef:o,topRef:i,topLeftColRef:a,topRightColRef:l,bottomRef:c,attributionsRef:s,bottomRightRef:u,leftTopRef:d,leftBottomRef:p,rightTopRef:f,rightBottomRef:v}=e,m=n.current,b=o.current,g=i.current,h=a.current,y=l.current,O=c.current,P=s.current;if(![b,g,O].some(e=>!e)){var E,w,_=document.documentElement,R=Number.parseInt(getComputedStyle(_).getPropertyValue("--divider-gap"),10);m.style.setProperty("--top-col-width","".concat((E=h.offsetWidth,w=y.offsetWidth,E||w?Math.max(E,w):0),"px"));var j=h.offsetHeight+g.offsetTop,S=O.offsetTop-j-R;m.style.setProperty("--left-offset-top","".concat(j,"px")),m.style.setProperty("--left-offset-bottom","".concat(b.offsetHeight-O.offsetTop+R,"px")),m.style.setProperty("--left-top-max-height","".concat(S,"px"));var T=null!==(t=null==u||null===(r=u.current)||void 0===r?void 0:r.offsetHeight)&&void 0!==t?t:0,C=b.offsetHeight-O.offsetTop-O.offsetHeight,A=y.offsetHeight+g.offsetTop,D=O.offsetTop+O.offsetHeight-T-A-R,M=C+(T>0?T+R:P.offsetHeight);m.style.setProperty("--right-offset-top","".concat(A,"px")),m.style.setProperty("--right-offset-bottom","".concat(M,"px")),m.style.setProperty("--right-top-max-height","".concat(D,"px")),m.style.setProperty("--keyboard-hint-bottom","".concat(b.offsetHeight-O.offsetTop-O.offsetHeight,"px")),m.style.setProperty("--left-top-panel-max-height","".concat(yr(S,hr(p),R),"px")),m.style.setProperty("--left-bottom-panel-max-height","".concat(yr(S,hr(d),R),"px")),m.style.setProperty("--right-top-panel-max-height","".concat(yr(D,hr(v),R),"px")),m.style.setProperty("--right-bottom-panel-max-height","".concat(yr(D,hr(f),R),"px"))}}var Pr=()=>{var{mapStyle:e}=Ot();if(null!=e&&e.logo)return E("img",{className:"im-c-logo",src:e.logo,alt:e.logoAltText})},Er=()=>{var{breakpoint:e}=yt(),{mapStyle:t}=Ot();return t?"mobile"!==e&&E("div",{className:"im-c-attributions",dangerouslySetInnerHTML:{__html:t.attribution}}):null},wr=(e,t)=>e.modal?"modal":"drawer"===e.slot&&["tablet","desktop"].includes(t)?"left-top":e.slot,_r=(e,t)=>{var r;return!(e.includeModes&&!e.includeModes.includes(t))&&(null===(r=e.excludeModes)||void 0===r||!r.includes(t))},Rr=e=>"string"==typeof e.html&&!e.pluginId;var jr={"left-top":{inset:"var(--left-offset-top) auto auto var(--primary-gap)",maxHeight:"var(--left-top-max-height)"},"left-bottom":{inset:"auto auto var(--left-offset-bottom) var(--primary-gap)",maxHeight:"var(--left-top-max-height)"},"right-top":{inset:"var(--right-offset-top) var(--primary-gap) auto auto",maxHeight:"var(--right-top-max-height)"},"right-bottom":{inset:"auto var(--primary-gap) var(--right-offset-bottom) auto",maxHeight:"var(--right-top-max-height)"}},Sr="--modal-inset",Tr="--modal-max-height",Cr=(e,t,r)=>{f(()=>{if(t){var n=t=>{"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),r()),"Tab"===t.key&&e.current&&function(e,t){if("Tab"===t.key){var r=Array.from(e.querySelectorAll(["a[href]:not([disabled])","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'*[tabindex="0"]:not([disabled])'].join(",")));if(0!==(r=r.filter(e=>!!e.offsetParent)).length){var n=r[0],o=r[r.length-1];!t.shiftKey||document.activeElement!==e&&document.activeElement!==n||(o.focus(),t.preventDefault()),t.shiftKey||document.activeElement!==o||(n.focus(),t.preventDefault())}}}(e.current,t)},o=e.current;return null==o||o.addEventListener("keydown",n),()=>{null==o||o.removeEventListener("keydown",n)}}},[t,e,r])};function Ar(e){var{mainRef:t,panelRef:r,isModal:n,rootEl:o,buttonContainerEl:i,handleClose:a}=e,{layoutRefs:l}=yt();Cr(r,n,a),gr([t],()=>{if(n&&t.current){var e=document.documentElement,o=getComputedStyle(e),a=Number.parseInt(o.getPropertyValue("--divider-gap"),10),c=Number.parseInt(o.getPropertyValue("--primary-gap"),10),s=r.current.dataset.slot;if(null!=s&&s.endsWith("-button")){var u,d,p,f=null===(u=r.current)||void 0===u?void 0:u.id,v=f?document.querySelector('[aria-controls="'.concat(f,'"]')):null,m=null!==(d=null!==(p=null==v?void 0:v.parentElement)&&void 0!==p?p:null!=i&&i.isConnected?i:null)&&void 0!==d?d:document.querySelector('[data-button-slot="'.concat(s,'"]'));if(!m)return;((e,t,r)=>{var n=document.documentElement,o=t.current.getBoundingClientRect(),i=e.getBoundingClientRect(),a=!!e.closest(".im-o-app__left-bottom, .im-o-app__right-bottom"),l=!!e.closest(".im-o-app__left-top, .im-o-app__left-bottom"),c=a?"auto":"".concat(Math.round(i.top-o.top),"px"),s=a?"".concat(Math.round(o.bottom-i.bottom),"px"):"auto",u=l?"auto":"".concat(Math.round(o.right-i.left+r),"px"),d=l?"".concat(Math.round(i.right-o.left+r),"px"):"auto",p=a?Math.round(o.bottom-i.bottom):Math.round(i.top-o.top);n.style.setProperty(Sr,"".concat(c," ").concat(u," ").concat(s," ").concat(d)),n.style.setProperty(Tr,"".concat(o.height-p-r,"px"))})(m,t,a)}else((e,t,r)=>{var n,o,i=document.documentElement,a=jr[e];if(a)return i.style.setProperty(Sr,a.inset),void i.style.setProperty(Tr,a.maxHeight);var l=null===(n=t["".concat(e[0].toLowerCase()+e.slice(1),"Ref")])||void 0===n?void 0:n.current,c=null===(o=t.mainRef)||void 0===o?void 0:o.current;if(l&&c){var s=l.getBoundingClientRect(),u=c.getBoundingClientRect(),d=s.left-u.left,p=s.top-u.top;i.style.setProperty(Sr,"".concat(p,"px auto auto ").concat(d,"px")),i.style.setProperty(Tr,"".concat(u.height-p-r,"px"))}})(s,l,c)}}),f(()=>{if(n){var e=e=>{var t=e.target.closest(".im-o-app__modal-backdrop");o&&t&&o.contains(t)&&a()};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}},[n,o,a]),f(()=>{if(n&&r.current&&o)return c({containerEl:r.current,isFullscreen:!0,boundaryEl:o}),()=>{c({containerEl:r.current,isFullscreen:!1,boundaryEl:o})}},[n,r,o]),((e,t,r)=>{f(()=>{if(e){var n=e=>{var n=e.target,o=t.current;if(n&&o&&r){var i=r.contains(n),a=o.contains(n);i&&!a&&o.focus()}};return document.addEventListener("focusin",n),()=>{document.removeEventListener("focusin",n)}}},[e,t,r])})(n,r,o)}var Dr=e=>{var{id:t,svgContent:r,isMenu:n}=e,o=n?se().chevron:se()[t]||r;return E("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:o},className:"im-c-icon".concat(n?" im-c-icon--narrow":"")})};function Mr(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 kr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Mr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Ir=(e,t)=>e?"dialog":t?"complementary":"region",Lr=e=>{var t,r,n,{panelId:o,panelConfig:i,props:a,focusOnOpen:l,WrappedChild:c,label:s,html:u,children:d,isOpen:p=!0,rootRef:m}=e,{id:h}=j(),{dispatch:O,breakpoint:P,layoutRefs:_,interfaceType:R}=yt(),S=document.getElementById("".concat(h,"-im-app")),T=i[P],C="".concat(h,"-panel-").concat(fr(o)),{isDialog:A,isModal:D,isDismissible:M,shouldFocus:k,buttonContainerEl:I}=((e,t,r,n)=>{var o="side"===e.slot&&e.open&&!e.modal,i=!o&&e.dismissible,a=!0===e.modal;return{isAside:o,isDialog:i,isModal:a,isDismissible:!1!==e.dismissible,shouldFocus:a||!1!==n&&(!0===n||!0===r||Boolean(t)),buttonContainerEl:e.slot.endsWith("button")?null==t?void 0:t.parentNode:void 0}})(T,null==a?void 0:a.triggeringElement,i.focus,l),L=D&&p,N=_.mainRef,B=v(null),x=v(null),H=v(p),z=function(e){var[t,r]=y(!1),n=b(()=>{var t=null==e?void 0:e.current;t&&r(t.scrollHeight>t.clientHeight)},[e]);return gr(e,n),t}(x),W=m||B,V=()=>{requestAnimationFrame(()=>{var e,t;null===(e=(t=(null==a?void 0:a.triggeringElement)||_.viewportRef.current).focus)||void 0===e||e.call(t,{preventScroll:"keyboard"!==R})}),O({type:"CLOSE_PANEL",payload:o})};Ar({mainRef:N,panelRef:W,isModal:L,rootEl:S,buttonContainerEl:I,handleClose:V}),f(()=>{var e,t=p&&!H.current;(H.current=p,k&&(t||p))&&(null===(e=W.current)||void 0===e||e.focus())},[p]);var F,G,U=(F=T.slot,G=null===(t=T.showLabel)||void 0===t||t,["im-c-panel","im-c-panel--".concat(F),!G&&"im-c-panel--no-heading"].filter(Boolean).join(" ")),Z=((e,t)=>["im-c-panel__body",!e&&t&&"im-c-panel__body--offset"].filter(Boolean).join(" "))(null===(r=T.showLabel)||void 0===r||r,M),K=g(()=>u?{__html:u}:null,[u]),q=(e=>{var{elementId:t,shouldFocus:r,isDialog:n,isDismissible:o,isModal:i,width:a,panelClass:l,slot:c}=e;return{id:t,"aria-labelledby":"".concat(t,"-label"),tabIndex:r?-1:void 0,role:Ir(n,o),"aria-modal":n&&i?"true":void 0,style:a?{width:a}:void 0,className:l,"data-slot":c}})({elementId:C,shouldFocus:k,isDialog:A,isDismissible:M,isModal:D,width:T.width,panelClass:U,slot:T.slot}),Y=(e=>{var{bodyRef:t,panelBodyClass:r,isBodyScrollable:n,elementId:o}=e;return{ref:t,className:r,tabIndex:n?0:void 0,role:n?"region":void 0,"aria-labelledby":n?"".concat(o,"-label"):void 0}})({bodyRef:x,panelBodyClass:Z,isBodyScrollable:z,elementId:C});return w("div",kr(kr({ref:W},q),{},{children:[E("h2",{id:"".concat(C,"-label"),className:null===(n=T.showLabel)||void 0===n||n?"im-c-panel__heading im-e-heading-m":"im-u-visually-hidden",children:s}),M&&E("button",{"aria-label":"Close ".concat(s),className:"im-c-panel__close",onClick:V,children:E(Dr,{id:"close"})}),K?E("div",kr(kr({},Y),{},{dangerouslySetInnerHTML:K})):w("div",kr(kr({},Y),{},{children:[" ",c?E(c,kr({},a)):d]}))]}))};function Nr(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 Br(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Nr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function xr(e){var{slot:t,appState:r,evaluateProp:n}=e,{breakpoint:o,pluginRegistry:i,panelConfig:a,mode:l,openPanels:c}=r,s=Object.entries(c),u=s.filter(e=>{var t,[r]=e,n=null===(t=a[r])||void 0===t?void 0:t[o];return null==n?void 0:n.modal}),d=u.length>0?u[u.length-1][0]:null;return s.map(e=>{var c,[s,{props:u,focusOnOpen:p}]=e,f=a[s];if(!f)return null;if(Rr(f))return null;var v=f[o];if(!v)return null;var m=wr(v,o);if(!((e,t,r,n)=>{var{targetSlot:o,slot:i,mode:a,isFullscreen:l,allowedModalPanelId:c}=n,s=o.endsWith("-button");return!(!de.panel.includes(o)&&!s||!_r(t,a)||!1===t.inline&&!l||o!==i||r.modal&&e!==c)})(s,f,v,{targetSlot:m,slot:t,mode:l,isFullscreen:r.isFullscreen,allowedModalPanelId:d}))return null;var b=i.registeredPlugins.find(e=>e.id===f.pluginId),g=null==b?void 0:b.id,h=f.render?Rt(f.render,Br(Br({},u),{},{pluginId:g,pluginConfig:null==b?void 0:b.config})):null;return{id:s,type:"panel",order:null!==(c=v.order)&&void 0!==c?c:0,element:E(Lr,{panelId:s,panelConfig:f,props:u,focusOnOpen:p,WrappedChild:h,label:n(f.label,g),html:g?n(f.html,g):f.html},s)}}).filter(Boolean)}var Hr=0,zr=e=>{var{children:t,content:r}=e,{interfaceType:n}=yt(),o=v(null),i=v(null),[a,l]=y(!1),[c,s]=y(!1),[u,d]=y(null),[p]=y(()=>"tooltip-".concat(Hr+=1)),m=v(null),b=v(null),g=()=>{clearTimeout(m.current),l(!1)},h=()=>{clearTimeout(b.current),m.current=setTimeout(()=>l(!0),500)},O=()=>{clearTimeout(m.current),b.current=setTimeout(()=>l(!1),0)};f(()=>{var e=e=>{"Escape"===e.key&&(clearTimeout(m.current),clearTimeout(b.current),l(!1))};if(window.addEventListener("keydown",e),a){var t=function(e,t){if(!e)return"bottom";t||(t=e.closest(".im-o-app__main"));var r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),o={top:r.top-n.top,bottom:n.bottom-r.bottom,left:r.left-n.left,right:n.right-r.right},i=Object.entries(o),a=i.toSorted((e,t)=>{var[,r]=e,[,n]=t;return r-n}),[l,c]=a[0];if("top"===l||"bottom"===l)for(var[s,u]of i)if(("left"===s||"right"===s)&&Math.abs(u-c)<=50)return"left"===s?"right":"left";return{top:"bottom",bottom:"top",left:"right",right:"left"}[l]}(o.current);d(t)}return()=>{window.removeEventListener("keydown",e),clearTimeout(m.current),clearTimeout(b.current)}},[a]);var _=P(t,{ref:e=>{var r;o.current=e;var n=null===(r=t.props)||void 0===r?void 0:r.ref;"function"==typeof n?n(e):n&&"object"==typeof n&&(n.current=e)},onMouseEnter:h,onMouseLeave:O,onMouseDown:g,onKeyDown:g,onFocus:()=>{"keyboard"===n&&h(),s(!0)},onBlur:()=>{O(),s(!1)},"aria-labelledby":p});return w("div",{className:"im-c-tooltip-wrapper".concat(c?" im-c-tooltip-wrapper--has-focus":""),children:[_,E("div",{id:p,ref:i,className:"im-c-tooltip im-c-tooltip--".concat(u||"hidden"," ").concat(a?"im-c-tooltip--is-visible":""),role:"tooltip","aria-hidden":!a,children:r})]})},Wr=(e,t,r)=>{var{buttonConfig:n,evaluateProp:o,pluginId:i,id:a}=r,l=n[t.id];if("function"==typeof(null==l?void 0:l.onClick)?l.onClick(e,o(e=>e,i)):"function"==typeof t.onClick&&t.onClick(e.nativeEvent),e.nativeEvent instanceof KeyboardEvent){var c=document.getElementById("".concat(a,"-").concat(fr(t.id)));if(c){var s=new MouseEvent("click",{bubbles:!0,cancelable:!0});s._fromKeyboardActivation=!0,c.dispatchEvent(s)}}},Vr=e=>{var{items:t,visibleIndices:r,index:n,setIndex:o,disabledButtons:i,instigator:a,setIsOpen:l,activateCtx:c}=e,s=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!=e&&e.preventDefault&&e.preventDefault(),a.focus(),l(!1)};return e=>{["Escape","Esc"].includes(e.key)?s(e,!0):"Tab"!==e.key?["ArrowDown","ArrowUp"].includes(e.key)?(e=>{e.preventDefault();var t=r.length;if(0!==t){var i,a=r.indexOf(n);i="ArrowDown"===e.key?-1===a?0:(a+1)%t:-1===a?t-1:(a-1+t)%t,o(r[i])}})(e):"Home"===e.key&&r.length?o(r[0]):"End"===e.key&&r.length?o(r[r.length-1]):("Enter"===e.key&&(e=>{e.preventDefault();var r=t[n];r&&!i.has(r.id)&&Wr(e,r,c),a.focus(),l(!1)})(e)," "===e.key&&(e=>{e.preventDefault();var r=t[n];r&&!i.has(r.id)&&(Wr(e,r,c),void 0!==r.isPressed||r.pressedWhen||(a.focus(),l(!1)))})(e)):s(e)}},Fr=e=>{var{items:t,hiddenButtons:r,startIndex:n,startPos:o,instigator:i,instigatorKey:a,buttonRefs:l,buttonConfig:c,disabledButtons:s,pluginId:u,evaluateProp:d,id:p,menuRef:v,setIsOpen:m,buttonRect:b}=e,h=g(()=>{var e=[];return t.forEach((t,n)=>{r.has(t.id)||e.push(n)}),e},[t,r]),[O,P]=y(()=>{return"number"==typeof n?n:"first"===o?null!==(e=h[0])&&void 0!==e?e:-1:"last"===o&&null!==(t=h[h.length-1])&&void 0!==t?t:-1;var e,t}),E={buttonConfig:c,evaluateProp:d,pluginId:u,id:p},w=Vr({items:t,visibleIndices:h,index:O,setIndex:P,disabledButtons:s,instigator:i,setIsOpen:m,activateCtx:E}),_=e=>{var t,r;null!==(t=v.current)&&void 0!==t&&t.contains(e.target)||null!==(r=l.current[a])&&void 0!==r&&r.contains(e.target)||m(!1)};f(()=>{var e,t;if(null===(e=v.current)||void 0===e||e.focus(),"first"===o)P(null!==(t=h[0])&&void 0!==t?t:-1);else if("last"===o){var r;P(null!==(r=h[h.length-1])&&void 0!==r?r:-1)}var n=()=>m(!1);return document.addEventListener("focusin",_),document.addEventListener("pointerdown",_),window.addEventListener("resize",n),()=>{document.removeEventListener("focusin",_),document.removeEventListener("pointerdown",_),window.removeEventListener("resize",n)}},[]);var{style:R,direction:j,halign:S}=(e=>{if(!e)return{style:{},direction:"below"};var t,r={};e.top>=window.innerHeight/2?(r.bottom="".concat(window.innerHeight-e.top,"px"),t="above"):(r.top="".concat(e.bottom,"px"),t="below");var n,o=(e.left+e.right)/2;return o>2*window.innerWidth/3?(r.right="".concat(window.innerWidth-e.right,"px"),n="right"):o<window.innerWidth/3?(r.left="".concat(e.left,"px"),n="left"):(r.left="".concat(o,"px"),n="center"),{style:r,direction:t,halign:n}})(b);return{index:O,handleMenuKeyDown:w,handleItemClick:(e,t)=>{e.nativeEvent._fromKeyboardActivation||s.has(t.id)||(m(!1),Wr(e,t,E))},menuStyle:R,menuDirection:j,menuHAlign:S}},Gr=e=>{var{item:t,isSelected:r,hiddenButtons:n,disabledButtons:o,pressedButtons:i,id:a,onItemClick:l}=e;return w("li",{id:"".concat(a,"-").concat(fr(t.id)),className:"im-c-popup-menu__item".concat(r?" im-c-popup-menu__item--selected":""),role:void 0!==t.isPressed||t.pressedWhen?"menuitemcheckbox":"menuitem","aria-disabled":o.has(t.id)||void 0,"aria-checked":void 0!==t.isPressed||t.pressedWhen?i.has(t.id):void 0,style:n.has(t.id)?{display:"none"}:void 0,onClick:e=>l(e,t),children:[(t.iconId||t.iconSvgContent)&&E(Dr,{id:t.iconId,svgContent:t.iconSvgContent}),E("span",{className:"im-c-popup-menu__item-label",children:t.label})]})},Ur=e=>{var t,r,{popupMenuId:n,buttonId:o,instigatorId:i,pluginId:a,startPos:l,startIndex:c,menuRef:s,items:u,setIsOpen:d,buttonRect:p}=e,{id:f}=j(),{buttonRefs:v,buttonConfig:m,hiddenButtons:b,disabledButtons:g,pressedButtons:h,layoutRefs:y}=yt(),P=null!=o?o:i,w=v.current[P],_=Mt(),{index:R,handleMenuKeyDown:S,handleItemClick:T,menuStyle:C,menuDirection:A,menuHAlign:D}=Fr({items:u,hiddenButtons:b,startIndex:c,startPos:l,instigator:w,instigatorKey:P,buttonRefs:v,buttonConfig:m,disabledButtons:g,pluginId:a,evaluateProp:_,id:f,menuRef:s,setIsOpen:d,buttonRect:p});return O(E("ul",{ref:s,id:n,className:"im-c-popup-menu","data-direction":A,"data-halign":D,style:C,role:"menu",tabIndex:"-1","aria-labelledby":P,"aria-activedescendant":R>=0?"".concat(f,"-").concat(fr(u[R].id)):void 0,onKeyDown:S,children:u.map((e,t)=>E(Gr,{item:e,isSelected:R===t,hiddenButtons:b,disabledButtons:g,pressedButtons:h,id:f,onItemClick:T},e.id))}),null!==(t=null==y||null===(r=y.appContainerRef)||void 0===r?void 0:r.current)&&void 0!==t?t:document.body)};function Zr(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 Kr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Zr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var qr=(e,t,r)=>["im-c-map-button",e&&"im-c-map-button--".concat(fr(e)),t&&"im-c-map-button--".concat(t),r&&"im-c-map-button--with-label"].filter(Boolean).join(" "),Yr=(e,t)=>["im-c-button-wrapper",e&&"im-c-button-wrapper--".concat(fr(e)),t&&"im-c-button-wrapper--wide"].filter(Boolean).join(" "),Xr=e=>{" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),e.currentTarget.click())},$r=(e,t,r)=>{var n=e.current[t];n&&r(n.getBoundingClientRect().toJSON())},Jr=e=>{var{buttonId:t,iconId:r,iconSvgContent:n,label:o,showLabel:i,isDisabled:a,isPressed:l,isExpanded:c,isHidden:s,isPanelOpen:u,variant:d,onClick:p,panelId:f,menuItems:m,idPrefix:b,href:g}=e,{id:h}=j(),{buttonRefs:O}=yt(),[P,_]=y(!1),[R,S]=y(null),[T,C]=y(null),A=v(null),D=g?"a":"button",M=(null==m?void 0:m.length)>=1,k=r||n||M,I=((e,t)=>e?"".concat(fr(t),"-button"):void 0)(f,t),L=(e=>{var{idPrefix:t,panelId:r,buttonId:n,hasMenu:o}=e;return r?{id:"".concat(t,"-panel-").concat(fr(r)),type:"panel"}:o?{id:"".concat(t,"-popup-").concat(fr(n)),type:"popup"}:null})({idPrefix:b,panelId:f,buttonId:t,hasMenu:M}),N=((e,t,r,n,o,i)=>a=>{e&&["ArrowDown","ArrowUp"].includes(a.key)&&(a.preventDefault(),n("ArrowUp"===a.key?"last":"first"),$r(t,r,o),i(!0))})(M,O,t,S,C,_),B=(e=>{var t,{appId:r,buttonId:n,className:o,onClick:i,onKeyUp:a,buttonRefs:l,isDisabled:c,isPressed:s,isExpanded:u,isPanelOpen:d,isPopupOpen:p,controlledElement:f,href:v}=e;return"panel"===(null==f?void 0:f.type)?t=String(d):"popup"===(null==f?void 0:f.type)?t=p:"boolean"==typeof u&&(t=u),Kr({id:"".concat(r,"-").concat(fr(n)),className:o,onClick:i,onKeyUp:a,ref:e=>{l.current&&n&&(l.current[n]=e)},"aria-disabled":c||void 0,"aria-expanded":t,"aria-pressed":"boolean"==typeof s?s:void 0,"aria-controls":null==f?void 0:f.id,"aria-haspopup":"popup"===(null==f?void 0:f.type)||void 0},v?{href:v,target:"_blank",onKeyUp:Xr,role:"button"}:{type:"button"})})({appId:h,buttonId:t,className:qr(t,d,i),onClick:e=>{if(!a){if("popup"===(null==L?void 0:L.type)){var r=""===e.nativeEvent.pointerType;S(r?"first":null),P||$r(O,t,C),_(e=>!e)}p&&p(e)}},onKeyUp:N,buttonRefs:O,isDisabled:a,isPressed:l,isExpanded:c,isPanelOpen:u,isPopupOpen:P,controlledElement:L,href:g}),x=w(D,Kr(Kr({},B),{},{children:[k&&E(Dr,{id:r,svgContent:n,isMenu:M}),i&&E("span",{children:o})]}));return w("div",{className:Yr(t,i),"data-button-slot":I,style:s?{display:"none"}:void 0,children:[i?x:E(zr,{content:o,children:x}),I&&E(ln,{slot:I}),P&&E(Ur,{popupMenuId:L.id,buttonId:t,startPos:R,menuRef:A,items:m,setIsOpen:_,buttonRect:T})]})};function Qr(e){var t,r,{btn:n,appState:o,appConfig:i,evaluateProp:a}=e,[l,c]=n,s=null!==(t=c[o.breakpoint])&&void 0!==t?t:{},u=function(e,t,r){var[,n]=e,o=!(!n.panelId||!t.openPanels[n.panelId]);return e=>{if("function"!=typeof n.onClick){if(n.panelId){var i=e.currentTarget;t.dispatch({type:o?"CLOSE_PANEL":"OPEN_PANEL",payload:o?n.panelId:{panelId:n.panelId,props:{triggeringElement:i}}})}}else n.onClick(e,r(e=>e,n.pluginId))}}(n,o,a),d=!(!c.panelId||!o.openPanels[c.panelId]);return E(Jr,{buttonId:l,iconId:a(c.iconId,c.pluginId),iconSvgContent:a(c.iconSvgContent,c.pluginId),variant:c.variant,label:a(c.label,c.pluginId),href:a(c.href,c.pluginId),showLabel:null===(r=s.showLabel)||void 0===r||r,isDisabled:o.disabledButtons.has(l),isHidden:o.hiddenButtons.has(l),isPressed:void 0!==c.isPressed||c.pressedWhen?o.pressedButtons.has(l):void 0,isExpanded:void 0!==c.isExpanded||c.expandedWhen?o.expandedButtons.has(l):void 0,isPanelOpen:d,onClick:u,panelId:c.panelId,menuItems:c.menuItems,idPrefix:i.id},l)}function en(e){var{slot:t,appState:r,appConfig:n,evaluateProp:o}=e,{buttonConfig:i,breakpoint:a}=r,l=function(e){var{appState:t,buttonConfig:r,slot:n,evaluateProp:o}=e,{breakpoint:i,mode:a}=t;return r?Object.entries(r).filter(e=>{var r,l,[c,s]=e,u=s[i];if(s.isMenuItem)return!1;if("function"==typeof s.excludeWhen&&o(s.excludeWhen,s.pluginId))return!1;if(s.includeModes&&(null===(r=s.includeModes)||void 0===r||!r.includes(a)))return!1;if(null!==(l=s.excludeModes)&&void 0!==l&&l.includes(a))return!1;if(!1===s.inline&&!t.isFullscreen)return!1;if(s.panelId){var d,p=null===(d=t.panelConfig)||void 0===d||null===(d=d[s.panelId])||void 0===d?void 0:d[i];if(!0===(null==p?void 0:p.open)&&!1===(null==p?void 0:p.dismissible))return!1}return!((null==u?void 0:u.slot)!==n||!de.button.includes(u.slot))}):[]}({appState:r,buttonConfig:i,slot:t,evaluateProp:o});if(!l.length)return[];var c=new Map,s=[];l.forEach(e=>{var[t,r]=e,{group:n}=r;if(null!=n){var o=function(e){var t;return null==e?null:"string"==typeof e?e:null!==(t=e.name)&&void 0!==t?t:null}(n),i=function(e){var t,r;return e?"string"==typeof e?e:null!==(t=null!==(r=e.label)&&void 0!==r?r:e.name)&&void 0!==t?t:"":""}(n),a=function(e){var t;return e&&"string"!=typeof e&&null!==(t=e.order)&&void 0!==t?t:0}(n);c.has(o)?c.get(o):c.set(o,{label:i,order:a,members:[]}),c.get(o).members.push([t,r])}else s.push([t,r])});var u=[];for(var d of s){var p,f,[v,m]=d,b=null!==(p=null===(f=m[a])||void 0===f?void 0:f.order)&&void 0!==p?p:0;u.push({id:v,type:"button",order:b,element:Qr({btn:d,appState:r,appConfig:n,evaluateProp:o})})}for(var[g,{label:h,order:y,members:O}]of c)if(O.length<2){var P,w=O[0],[_,R]=w,j=y||(null===(P=R[a])||void 0===P?void 0:P.order)||0;u.push({id:_,type:"button",order:j,element:Qr({btn:w,appState:r,appConfig:n,evaluateProp:o})})}else{var S=[...O].sort((e,t)=>{var r,n,o,i;return(null!==(r=null===(n=e[1][a])||void 0===n?void 0:n.order)&&void 0!==r?r:0)-(null!==(o=null===(i=t[1][a])||void 0===i?void 0:i.order)&&void 0!==o?o:0)});u.push({id:"group-".concat(g),type:"group",order:y,element:E("div",{role:"group","aria-label":h,className:"im-c-button-group",children:S.map(e=>Qr({btn:e,appState:r,appConfig:n,evaluateProp:o}))},"group-".concat(g))})}return u}var tn=["evaluateProp"];function rn(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 nn(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?rn(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function on(e){var{evaluateProp:r}=e,n=t(e,tn),o=function(e){var{slot:t,appState:r,evaluateProp:n}=e,{breakpoint:o,mode:i,pluginRegistry:a,controlConfig:l}=r;return Object.values(l).filter(e=>{var n,a,l,c;if(Rr(e))return!1;var s=e[o];if(!s)return!1;var u=de.control.includes(s.slot),d=null===(n=null===(a=e.includeModes)||void 0===a?void 0:a.includes(i))||void 0===n||n,p=null!==(l=null===(c=e.excludeModes)||void 0===c?void 0:c.includes(i))&&void 0!==l&&l;return!(!1===e.inline&&!r.isFullscreen)&&d&&!p&&s.slot===t&&u}).map(e=>{var t,r,i,l=a.registeredPlugins.find(t=>{var r;return null===(r=t.manifest)||void 0===r||null===(r=r.controls)||void 0===r?void 0:r.some(t=>t.id===e.id)}),c=null==l?void 0:l.id;if(e.html)i=E("div",{className:"im-c-control",dangerouslySetInnerHTML:{__html:n(e.html,c)}},e.id);else{var s=Rt(e.render,{pluginId:c,pluginConfig:null==l?void 0:l.config});i=E(s,{},e.id)}return{id:e.id,type:"control",order:null!==(t=null===(r=e[o])||void 0===r?void 0:r.order)&&void 0!==t?t:0,element:i}})}(nn({evaluateProp:r},n)),i=[...o,...xr(nn({evaluateProp:r},n)),...en(nn({evaluateProp:r},n))],a=i.filter(e=>null==e.order||0===e.order),l=i.filter(e=>null!=e.order&&0!==e.order);l.sort((e,t)=>e.order-t.order);var c=[...a];for(var s of l){var u=Math.min(Math.max(s.order-1,0),c.length);c.splice(u,0,s)}return c}var an=e=>{var{children:t}=e,{openPanels:r,panelConfig:n,breakpoint:o}=yt(),i=["im-c-panel","im-c-actions",!u.Children.toArray(t).find(e=>{var t,r;return!1===(null===(t=e.props)||void 0===t?void 0:t.isHidden)&&"touch"!==(null===(r=e.props)||void 0===r?void 0:r.variant)})&&"im-c-actions--hidden",Object.keys(r).some(e=>{var t;return"mobile"===o&&"drawer"===(null===(t=n[e])||void 0===t||null===(t=t[o])||void 0===t?void 0:t.slot)})&&"im-c-actions--border-top"].filter(Boolean).join(" ");return E("div",{className:i,children:t})},ln=e=>{var{slot:t}=e,r=on({slot:t,appConfig:j(),appState:yt(),evaluateProp:Mt()});return r.length?E(_,{children:"actions"===t?E(an,{slot:"actions",children:r.map(e=>e.element)}):E(_,{children:r.map(e=>e.element)})}):null},cn=(e,t,r,n,o)=>{var i=v(n);i.current=n,h(()=>{var n=e.current;if(r){var o=((e,t)=>{var r={side:t.sideRef,banner:t.bannerRef,"top-left":t.topLeftColRef,"top-right":t.topRightColRef,"left-top":t.leftTopRef,"left-bottom":t.leftBottomRef,middle:t.middleRef,"right-top":t.rightTopRef,"right-bottom":t.rightBottomRef,"bottom-right":t.bottomRightRef,drawer:t.drawerRef,actions:t.actionsRef,modal:t.modalRef};if(null!=e&&e.endsWith("-button")){var n=document.querySelector('[data-button-slot="'.concat(e,'"]'));return n?{current:n}:null}return r[e]||null})(t,i.current);if(null!=o&&o.current){var a=o.current.querySelector(":scope > .im-o-app__modal-backdrop");a?o.current.insertBefore(n,a):o.current.appendChild(n),n.style.display=""}}else{var l,c;if(n.parentElement===(null===(l=i.current.modalRef)||void 0===l?void 0:l.current))null===(c=i.current.appContainerRef)||void 0===c||null===(c=c.current)||void 0===c||c.appendChild(n);n.style.display="none"}return()=>{n.style.display="none"}},[r,t,o,e])},sn=e=>{var{panelId:t,config:r,isOpen:n,openPanelProps:o,focusOnOpen:i,allowedModalPanelId:a,appState:l}=e,c=v(null),{breakpoint:s,mode:u,isFullscreen:d,layoutRefs:p}=l,f=r[s],m=f?wr(f,s):null,b=(()=>{if(!n||!f||!m)return!1;var e=m.endsWith("-button");if(!(de.panel.includes(m)||e))return!1;var o=f.modal&&t!==a,i=!1===r.inline&&!d,l=!_r(r,u);return!(o||i||l)})();return cn(c,m,b,p,s),E(Lr,{panelId:t,panelConfig:r,props:o,focusOnOpen:i,html:r.html,label:r.label,isOpen:n,rootRef:c})},un=e=>{var{control:t,appState:r}=e,n=v(null),{breakpoint:o,mode:i,isFullscreen:a,layoutRefs:l}=r,c=t[o],s=((e,t)=>{var{breakpoint:r,mode:n,isFullscreen:o}=t,i=e[r];return!(!i||!de.control.includes(i.slot)||!_r(e,n)||!1===e.inline&&!o)})(t,{breakpoint:o,mode:i,isFullscreen:a}),u=(null==c?void 0:c.slot)||null;cn(n,u,s,l,o);var d=g(()=>({__html:t.html}),[t.html]);return E("div",{ref:n,className:"im-c-control",style:{display:"none"},dangerouslySetInnerHTML:d})},dn=()=>{var e=yt(),{panelConfig:t={},controlConfig:r={},openPanels:n={},breakpoint:o}=e,i=g(()=>Object.entries(t).filter(e=>{var[t,r]=e;return Rr(r)}),[t]),a=g(()=>Object.values(r).filter(e=>Rr(e)),[r]),l=g(()=>{var e=Object.entries(n).filter(e=>{var r,[n]=e,i=null===(r=t[n])||void 0===r?void 0:r[o];return null==i?void 0:i.modal});return e.length>0?e[e.length-1][0]:null},[n,t,o]);return i.length||a.length?w(_,{children:[i.map(t=>{var r,o,[i,a]=t;return E(sn,{panelId:i,config:a,isOpen:!!n[i],openPanelProps:null===(r=n[i])||void 0===r?void 0:r.props,focusOnOpen:null===(o=n[i])||void 0===o?void 0:o.focusOnOpen,allowedModalPanelId:l,appState:e},i)}),a.map(t=>E(un,{control:t,appState:e},t.id))]}):null};function pn(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 fn(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?pn(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var vn=()=>{var{id:e}=j(),{breakpoint:t,interfaceType:r,preferredColorScheme:n,layoutRefs:o,isLayoutReady:i,hasExclusiveControl:a,isFullscreen:l}=yt(),{mapStyle:c}=Ot();return function(){var{dispatch:e,breakpoint:t,layoutRefs:r,arePluginsEvaluated:n,appVisible:o,isFullscreen:i}=yt(),{mapSize:a,isMapReady:l}=Ot(),{bannerRef:c,mainRef:s,topRef:u,topLeftColRef:d,topRightColRef:p,bottomRef:f,bottomRightRef:v,leftTopRef:m,leftBottomRef:b,rightTopRef:g,rightBottomRef:y,drawerRef:O,actionsRef:P}=r;h(()=>{e({type:"CLEAR_PLUGINS_EVALUATED"})},[t,a,l,o,i]),h(()=>{n&&requestAnimationFrame(()=>{Or(r);var t=$t(r);t&&e({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:t}})})},[n]),gr([c,s,u,d,p,P,f,v,m,b,g,y,O],()=>{requestAnimationFrame(()=>{Or(r)})})}(),function(){var{interfaceType:e,layoutRefs:t}=yt(),r=v(e);r.current=e,f(()=>{if(t.appContainerRef.current)return document.addEventListener("focusin",e),document.addEventListener("focusout",n),document.addEventListener("pointerdown",o),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",n),document.removeEventListener("pointerdown",o)};function e(e){e.target.dataset.focusVisible="keyboard"===r.current}function n(e){delete e.target.dataset.focusVisible}function o(){delete document.activeElement.dataset.focusVisible}},[t.appContainerRef])}(),w("div",{id:"".concat(e,"-im-app"),className:["im-o-app","im-o-app--".concat(t),"im-o-app--".concat(r),"im-o-app--".concat(l?"fullscreen":"inline"),"im-o-app--".concat((null==c?void 0:c.appColorScheme)||n,"-app"),a&&"im-o-app--exclusive-control"].filter(Boolean).join(" "),style:fn({backgroundColor:(null==c?void 0:c.backgroundColor)||void 0},et(c)),ref:o.appContainerRef,children:[E(br,{}),w("div",{className:"im-o-app__overlay".concat(i?"":" im-o-app__overlay--not-ready"),children:[E("div",{className:"im-o-app__side",ref:o.sideRef,children:E(ln,{slot:ue.SIDE})}),w("div",{className:"im-o-app__main",ref:o.mainRef,children:[["mobile","tablet"].includes(t)&&E("div",{className:"im-o-app__banner",ref:o.bannerRef,children:E(ln,{slot:ue.BANNER})}),w("div",{className:"im-o-app__top",ref:o.topRef,children:[E("div",{className:"im-o-app__top-col",ref:o.topLeftColRef,children:E(ln,{slot:ue.TOP_LEFT})}),w("div",{className:"im-o-app__top-col",children:[E(ln,{slot:ue.TOP_MIDDLE}),["desktop"].includes(t)&&E("div",{className:"im-o-app__banner",ref:o.bannerRef,children:E(ln,{slot:ue.BANNER})})]}),E("div",{className:"im-o-app__top-col",ref:o.topRightColRef,children:E(ln,{slot:ue.TOP_RIGHT})})]}),w("div",{className:"im-o-app__left",ref:o.leftRef,children:[E("div",{className:"im-o-app__left-top",ref:o.leftTopRef,children:E(ln,{slot:ue.LEFT_TOP})}),E("div",{className:"im-o-app__left-bottom",ref:o.leftBottomRef,children:E(ln,{slot:ue.LEFT_BOTTOM})})]}),E("div",{className:"im-o-app__middle",ref:o.middleRef,children:E(ln,{slot:ue.MIDDLE})}),w("div",{className:"im-o-app__right",ref:o.rightRef,children:[E("div",{className:"im-o-app__right-top",ref:o.rightTopRef,children:E(ln,{slot:ue.RIGHT_TOP})}),E("div",{className:"im-o-app__right-bottom",ref:o.rightBottomRef,children:E(ln,{slot:ue.RIGHT_BOTTOM})})]}),w("div",{className:"im-o-app__bottom",ref:o.bottomRef,children:[w("div",{className:"im-o-app__bottom-col",children:[E(Pr,{}),E("div",{className:"im-o-app__bottom-left",children:E(ln,{slot:ue.BOTTOM_LEFT})})]}),w("div",{className:"im-o-app__bottom-col",children:[E("div",{className:"im-o-app__bottom-right",ref:o.bottomRightRef,children:E(ln,{slot:ue.BOTTOM_RIGHT})}),E("div",{className:"im-o-app__attributions",ref:o.attributionsRef,children:E(Er,{})})]})]}),E("div",{className:"im-o-app__drawer",ref:o.drawerRef,children:E(ln,{slot:ue.DRAWER})}),E("div",{className:"im-o-app__actions",ref:o.actionsRef,children:E(ln,{slot:ue.ACTIONS})}),w("div",{className:"im-o-app__modal",ref:o.modalRef,children:[E(ln,{slot:ue.MODAL}),E("div",{className:"im-o-app__modal-backdrop"})]})]})]}),E(dn,{})]})},mn=e=>(f(()=>{s(),e.eventBus.emit(i.APP_READY)},[]),E(Ne,{options:e,children:E(Ue,{options:e,children:E(ft,{eventBus:e.eventBus,children:w(gt,{children:[E(Nt,{}),E(vn,{})]})})})})),bn=["id","load","manifest"],gn=["InitComponent","api","reducer"],hn=["MapProvider","mapProviderConfig","mapFramework","plugins"];function yn(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 On(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?yn(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Pn=new WeakMap,En=new WeakMap,wn=new WeakMap,_n=e=>{var t,r,n=wn.get(e);if(!n){var o=Y(),i=(r={},{registerPanel:e=>{r=Q(r,e)},addPanel:(e,t)=>(r=ee(r,e,t))[e],removePanel:e=>{r=te(r,e)},getPanelConfig:()=>r,clear:()=>{r={}}}),a=(t={},{registerControl:e=>{t=oe(t,e)},addControl:(e,r)=>(t=ie(t,e,r))[e],getControlConfig:()=>t,clear:()=>{t={}}});n={buttonRegistry:o,panelRegistry:i,controlRegistry:a,pluginRegistry:ye({registerButton:o.registerButton,registerPanel:i.registerPanel,registerControl:a.registerControl})},wn.set(e,n)}return n},Rn=function(){var e=r(function*(e,r){for(var n of e)if("function"==typeof n.load){var o=yield n.load(),{id:i,load:a,manifest:l}=n,c=t(n,bn),{InitComponent:s,api:u,reducer:d}=o;r({id:i,InitComponent:s,api:u,reducer:d,config:c,manifest:Ee(t(o,gn),l),_originalPlugin:n})}});return function(t,r){return e.apply(this,arguments)}}();function jn(e,t){return Sn.apply(this,arguments)}function Sn(){return Sn=r(function*(e,r){var o,{MapProvider:a,mapProviderConfig:l,mapFramework:c,plugins:s=[]}=r,u=t(r,hn),{eventBus:d}=u,p=En.get(e);p||(p=new a({mapFramework:c,mapProviderConfig:l,events:i,eventBus:d}),En.set(e,p)),null!==(o=p.capabilities)&&void 0!==o&&o.supportedShortcuts&&function(){A=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[])}(p.capabilities.supportedShortcuts);var{buttonRegistry:f,panelRegistry:v,controlRegistry:m,pluginRegistry:b}=_n(e),{registerPlugin:g}=b;b.clear(),g({id:"appConfig",manifest:B});var h=Pn.get(e);h||(h=n(e),Pn.set(e,h));var y={_root:h,on:d.on,off:d.off,emit:d.emit,unmount(){var t,r;h.unmount(),Pn.delete(e),null===(t=(r=p).destroyMap)||void 0===t||t.call(r),En.delete(e),b.clear()}};return yield Rn(s,g),h.render(E(mn,On(On({},u),{},{buttonRegistry:f,panelRegistry:v,controlRegistry:m,pluginRegistry:b,mapProvider:p}))),y}),Sn.apply(this,arguments)}export{jn as initialiseApp};